vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Advanced Templates: Dynamic Templates Changing according to different conditions (https://vborg.vbsupport.ru/showthread.php?t=43325)

Boofo 01-21-2003 10:27 PM

Quote:

Originally posted by Mike11212
The second code because because I want to hide an add for 1 user group but have the rest see it.
Then use the first code and change the 19 to the number of the group you want to hide it from. The != means is not equal to.

Mike11212 01-21-2003 10:44 PM

I want to hide it from every group except 19

JakeC 01-22-2003 12:57 AM

What would be the correct variable for new private messages? I know that I use this to call the number of new messages: $unreadpm[messages]. I would like to simply use this hack to turn text red when there are more than 0 new messages. Thanks in advance.

JakeC

Boofo 01-22-2003 02:12 AM

Quote:

Originally posted by Mike11212
I want to hide it from every group except 19
Then use this:

[[($bbuserinfo[usergroupid]==19)]]

HTML CODE HERE

[[/($bbuserinfo[usergroupid]==19)]]

Boofo 01-22-2003 02:16 AM

Quote:

Originally posted by JakeC
What would be the correct variable for new private messages? I know that I use this to call the number of new messages: $unreadpm[messages]. I would like to simply use this hack to turn text red when there are more than 0 new messages. Thanks in advance.

JakeC

Try this and let me know if it works.

[[($unreadpm[messages]!=0)]]

HTML CODE HERE

[[/($unreadpm[messages]!=0)]]

arracing 01-23-2003 08:41 PM

wont someone please help me out with my question. What code should I use to make unregistered user group not able to access the top_stats link to vbstats.php. I want them to still be able to see the button but just when they click on it, it takes them to the user not registered page, please log in screen.

Im not sure what template to put this code in as it needs to be always used say if they are in another forum and are unregisterd, i still want them to not be able to access vbstats. And I need the code for this too.

Thanks

JakeC 01-24-2003 12:23 AM

Boofo,

It worked with >0 . I tried it with the !=0 and it didn't work. Thanks for pointing me in the right direction.

JakeC

Logician 01-24-2003 06:12 AM

Quote:

Originally posted by arracing
wont someone please help me out with my question. What code should I use to make unregistered user group not able to access the top_stats link to vbstats.php. I want them to still be able to see the button but just when they click on it, it takes them to the user not registered page, please log in screen.

This hack allows you to display/hide your stats button but this is not what you want. To achieve your goal, you have to either know the template your stats file display or edit the file vbstats.php, find

PHP Code:

require('./global.php'); 

and after that add:
PHP Code:

if ($bbuserinfo[userid]==0
{
  
show_nopermission();



arracing 01-24-2003 02:58 PM

well in stead of userid how about usergroupid to block whole groups from seeing it. Also please double check me, is it usergroupid or just usergroups? Also I want to include more than 1 usergroupid in the list of people not being able to see the stats. I try and put numbers like

if ($bbuserinfo[usergroupid]==1,3,4,11,12)
{
show_nopermission();
}

but that gives me an error.

What am i doing wrong.

I know if i use the code below it works fine to block guests.

if ($bbuserinfo[usergroupid]==1)
{
show_nopermission();
}

Boofo 01-24-2003 03:07 PM

Quote:

Originally posted by arracing
well in stead of userid how about usergroupid to block whole groups from seeing it. Also please double check me, is it usergroupid or just usergroups? Also I want to include more than 1 usergroupid in the list of people not being able to see the stats. I try and put numbers like

if ($bbuserinfo[usergroupid]==1,3,4,11,12)
{
show_nopermission();
}

but that gives me an error.

What am i doing wrong.

I know if i use the code below it works fine to block guests.

if ($bbuserinfo[usergroupid]==1)
{
show_nopermission();
}

Change this:

Code:

if ($bbuserinfo[usergroupid]==1,3,4,11,12)
{
  show_nopermission();
}

To this:

Code:

if (in_array($bbuserinfo['usergroupid'], array(1,3,4,11,12))) {
 show_nopermission();
}



All times are GMT. The time now is 06:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01347 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete