February 08 2012 06:32:30
Languages
Navigation
Friends & Affiliates
Roadmap
[N] Error log like in P...
[N] Submit photo - Subc...
[N] Warnings - who can ...
[N] [edit profile]Save ...
[N] Moving panels with ...
[N] Forum thread deform...
[N] Thumbnails in downl...
[N] [Locale German] New...
[N] Warnings only for a...
[N] Different avatar sizes
Users Online
· Guests Online: 6

· Members Online: 0

· Total Members: 464
· Newest Member: Erikutis
Last Seen Users
· ritmi 1 day
· K-braun 2 days
· dalem 4 days
· Erikutis 4 days
· videry 5 days
· inflames 5 days
· SilverAngel 5 days
· jebajseti 6 days
· outchorn 6 days
· uygarozan 1 week

Login
 Username  Password  
View Thread: Adding read count to the news footer?
Who is here? 1 Guest
 Print Thread
Adding read count to the news footer?
spunk
I have no idea how to add the read count to my theme, here's the theme.php
I use jQ_Blog:

Download source  Code

function render_news($subject, $news, $info) {

global $locale, $aidlink, $data;

   if (!isset($_GET['readmore'])) {
   echo "<h1 class='ncapmain'><a href='news.php?readmore=".$data['news_id']."'>".$data['news_subject']."</a></h1>\n";
     } else {
   echo "<h1 class='ncapmain'>".$subject."</h1>\n";
     }
   echo $news."\n";

      echo "<p class='nfoot'>";
      echo "<img src='".THEME."images/author.gif' alt='' style='vertical-align:middle;border:0px;' /> <a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ".$locale['global_071'].showdate("longdate", $info['news_date']);
        if ($info['news_allow_comments']) { echo " | <img src='".THEME."images/comments.gif' alt='' style='vertical-align:middle;border:0px;' /> <a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].($info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> |";}
      echo " <a href='print.php?type=N&amp;item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['global_075']."' title='".$locale['global_075']."' style='vertical-align:middle;border:0px;' /></a>";
        if (iADMIN && checkrights("N")) { echo " <a href='".ADMIN."news.php".$aidlink."&amp;action=edit&amp;news_id=".$info['news_id']."'><img src='".IMAGES."edit.gif' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0px;' /></a>\n"; }
      echo "</p>";

}





I know that this is useful:
(but i want my layout...)

Download source  Code

echo "<p class='nfoot'><img src='".THEME."images/author.gif' alt='' style='vertical-align:middle;border:0px;' />".newsposter($info," &middot;").newsopts($info,"&middot;").itemoptions("N",$info['news_id'])."</p>";





Can someone help me?

And a little second Question: How can i remove the Categorie-Icon from news.php?

Thx!

Spunki.li
 
http://www.bdsm-ansichten.com
slaughter
Take a look at the file includes/theme_functions_include.php
In the variable $info['news_reads'] the count of reads is storred.
 
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
http://albrecords.net/news.php Seitenvorstellungen 2 16-10-2011 11:32
MySQL Datenbanfehler im Footer Bugs und Fehlermeldungen 2 12-08-2011 15:24
My news in three columns General Questions 3 12-08-2011 15:03
Fancybox für News & Artikel Modifikationen 1 03-05-2011 11:25
http://k-l.bplaced.net/news.php Seitenvorstellungen 5 28-04-2011 08:22
Share this thread
URL:
BB-Code:
HTML:
AddThis:
Share |
Render time: 0.09 seconds - 88 Queries 837,240 unique visits