Support Forum

footer stats only on main forum page?

JS js
js
Member

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?

3 Answers

New Answer

MP Mr Papa
Mr Papa
Member

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…