miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Master Class miniBB Support Forums / Master Class /  
 

How to know that user is on the main forums page

 
Author Vodicka
Partaker
#1 | Posted: 8 Feb 2009 11:29 
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
Active Member
#2 | Posted: 8 Feb 2009 17:51 
if($action=='')

Author Vodicka
Partaker
#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
Lead Developer 
#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
Partaker
#5 | Posted: 9 Feb 2009 04:18 
OK, thanks. It does work!

Master Class miniBB Support Forums / Master Class /
 How to know that user is on the main forums page
 Share Topic's Link

This topic is closed. New replies are not allowed.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑