Forum module: statistic tags in other then theme_stats
Posted: 28 August 2007 01:53 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  106
Joined  09-21-2004

Hi,

I’ve got a question. I need the statistic tags from the theme_stats template in the theme_global template. I could manage to get it done by adding this line:

'visitor_stats'                    => 'theme_global',

to the mod.forum.php

and by adding this function:

//-------------------------------------
//  visitor stats
//-------------------------------------
function visitor_stats()
{
return <<< EOF
{total_members}
EOF;}
// END

to the theme_global template. This seems to work on almost all pages,
but unfortunately not on the memberlist page. There the tag itself is
displayed. Can somebody tell me why it works almost all pages apart from
the memberlist?

thanks

/lars

 Signature 

http://www.lars-kirchhoff.de

Profile
 
 
Posted: 28 August 2007 07:36 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23537
Joined  05-20-2002

Lars, I’m going to have to dig into the code to see if I can figure this one out (assuming I can)- but in the meantime, I’m going to shift it to ‘How to’, as it’s more a brainstorming issue and not doable ‘out of the box’.  The extra eyeballs may solve the issue before I do.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 28 August 2007 10:41 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  106
Joined  09-21-2004

After further inspection I noticed, that after I added the code mentioned above,
the visitor stats on the bottom of the page, where not working anymore. So it’s not working, unfortunately.
It was just a quick shot and I was surprised that I could at least move the
action to the global theme template, but I need the statistic tags in both templates.

If somebody has an idea I would really like to know it.

/lars

 Signature 

http://www.lars-kirchhoff.de

Profile
 
 
Posted: 28 August 2007 01:15 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  106
Joined  09-21-2004

I rather found a hack how to add the stats in the templates. As I already
use php in the templates I just grabbed the STAT variable in the template
function.

global $STAT;

where all information that I need are stored.

/lars

 Signature 

http://www.lars-kirchhoff.de

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65015 Total Logged-in Users: 57
Total Topics: 82086 Total Anonymous Users: 39
Total Replies: 441141 Total Guests: 295
Total Posts: 523227    
Members ( View Memberlist )