Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
footer stats only on main forum page?
Avatar
js
Member
Free Members
sp_UserOfflineSmall Offline
Dec 29, 2013 - 8:16 pm

Hi I am trying to show the footer stats on only the main forum page which I think would be group view, I can see I could only show the stats to user groups like-

if ($spThisUser->admin ) {
sp_SectionStart('tagClass=spStatsSection', 'stats');
etc
etc
}

However, I haven't found anything about only displaying the stats on a particular "view" such as group, forum, or topic. Thought about maybe trying a wordpress function like- if is_page( xx );  but then I remembered that the forum really only uses one page so that probably wont work..... Before I start experimenting is there an easy solution?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 29, 2013 - 8:26 pm

you are looking for this set of simple press primitive api functions:

function sp_is_groupview() { }

function sp_is_forumview() { }

function sp_is_topicview() { }

function sp_is_profileview() { }

function sp_is_listview() { }

function sp_is_searchview() { }

function sp_is_forumpage() { }

There is one for group view...

please note, the forum resources will need to have been loaded first...

Avatar
js
Member
Free Members
sp_UserOfflineSmall Offline
Dec 29, 2013 - 9:40 pm

Thanks! @mr papa

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 29, 2013 - 11:06 pm

Np. Glad to help

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625