Welcome to Geeklog Friday, October 20 2017 @ 08:11 am EDT


Tor

Anonymous
where can I find the code to display the amount of articles and links that I have to place above the search box or in the header ?

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany
Quote by: Tor

where can I find the code to display the amount of articles and links that I have to place above the search box or in the header ?


You can use PHP code in header.thtml. I'd actually write a function in lib-custom.php and just add a "print myfunc()" call in header.thtml.

A simple way to count the number of stories would be
PHP Formatted Code
$numstories = DB_count($_TABLES['stories']);
That doesn't take story permissions into account, though.

bye, Dirk

All times are EDT. The time is now 08:11 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content