miniBB ®
 
miniBB Community Forum
 | Forums | File Bank | Sign Up | Search | Statistics | Manual |
Forums Checker addon for miniBB Check-up your forums instantly without missing any new posting using the Forums Checker add-on!
Master Class miniBB Community Forum / Master Class /
Short link for this topic:

How to know that user is on the main forums page

Author Vodicka
Forums Member
#1 | Posted: 8 Feb 2009 11:29 | Edited by: Vodicka
I would like to apply some special styling to header when user is on homepage.
It is not difficult to test if he is somewhere else...

For instance:

if (action='vthread') ...; tests whether he is on posts page.

if($action=='userinfo') tests whether he is in profile page

if ($forum==3) test whether he is on page that belongs to some specific forum ID3


But how to test that he sees homepage (forums list and last discussions lis)?
Would you know?

I tried excluding all pages but home one, but that does not work, as some of them are not identifiable either (like some during register process - after captcha, updating profile, etc.) and this way it would be much more time consuming for server (too many questions if? if? if?).

Please help.
Author tom322
Forums Member
#2 | Posted: 8 Feb 2009 17:51
if($action=='')
Author Vodicka
Forums Member
#3 | Posted: 8 Feb 2009 18:17
tom322:
if($action=='')

parhaps. As I said some steps have now actions attached and stil they are not hompege. During register process - after captcha, updating profile, any actually some of those Error messages, but, well,... but the action may be hidden right? OK, let me try.
Author Paul
CEO
#4 | Posted: 9 Feb 2009 03:02
$action is always present and it exactly defines the operation type user is trying to execute, so above recommendation should work for you.
Author Vodicka
Forums Member
#5 | Posted: 9 Feb 2009 04:18
OK, thanks. It does work!
Master Class miniBB Community Forum / Master Class / How to know that user is on the main forums page Top
This topic is closed. You can't post a reply.
 
miniBB Community Forum Powered by Free Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts