Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 08:40 pm EDT

Geeklog Forums

display story and link count above search box


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 ?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
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
Text Formatted Code
$numstories = DB_count($_TABLES['stories']);
That doesn't take story permissions into account, though.

bye, Dirk
 Quote

All times are EDT. The time is now 08:40 pm.

  • 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