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)

Marulatree 12-17-2003 10:20 AM

:( Please, I know I'm been a pain in the royal ass, but please...***resorts to begging****

Logician 12-17-2003 01:12 PM

change your header template like this:

Quote:

[[($bbuserinfo[usergroupid]==3 AND ($forumid==8 OR $thread[forumid]==8))]]
put your custom header's html code here
[[/($bbuserinfo[usergroupid]==3 AND ($forumid==8 OR $thread[forumid]==8))]]
put your regular header code here

Marulatree 12-17-2003 01:47 PM

Ahhhhhhhhhhhhhhhhh.....you beauty!!! Many thanks for helping a real pain in the ass!!! :)

Marulatree 12-17-2003 02:13 PM

oooops, Spoke to soon,

I have done that now and it add's my additional code in, but still inserts the original header information as well...any ideas? Maybe some type if IF statement to not include the original HEADER if userid you are userid 3?

Logician 12-17-2003 04:53 PM

ok try this:
PHP Code:

[[(($bbuserinfo[usergroupid]==AND ($forumid==OR $thread[forumid]==8)))]]
put your custom header's html code here
[[/(($bbuserinfo[usergroupid]==3 AND ($forumid==8 OR $thread[forumid]==8)))]]
[[(!($bbuserinfo[usergroupid]==3 AND ($forumid==8 OR $thread[forumid]==8)))]]
put your regular header code here
[[/(!($bbuserinfo[usergroupid]==3 AND ($forumid==8 OR $thread[forumid]==8)))]] 


Marulatree 12-17-2003 06:03 PM

Quote:

Originally Posted by Logician
ok try this:
PHP Code:

[[(($bbuserinfo[usergroupid]==AND ($forumid==OR $thread[forumid]==8)))]]
put your custom header's html code here
[[/(($bbuserinfo[usergroupid]==3 AND ($forumid==8 OR $thread[forumid]==8)))]]
[[(!($bbuserinfo[usergroupid]==3 AND ($forumid==8 OR $thread[forumid]==8)))]]
put your regular header code here
[[/(!($bbuserinfo[usergroupid]==3 AND ($forumid==8 OR $thread[forumid]==8)))]] 


I have explained what goes wrong in the below comments in the code:

Code:

[[(($bbuserinfo[usergroupid]==6 AND ($forumid==23 OR $thread[forumid]==23)))]]

This displays the different header perfectly when this usergroup logs into this forumid....

[[/(($bbuserinfo[usergroupid]==6 AND ($forumid==23 OR $thread[forumid]==23)))]]
[[(!($bbuserinfo[usergroupid]==1 AND ($forumid==8 OR $thread[forumid]==8)))]]


This is where the problem comes in....What ever I put in this condition it duplicates it underneath the new different HEADER.


[[/(!($bbuserinfo[usergroupid]==1 AND ($forumid==8 OR $thread[forumid]==8)))]]


Logician 12-17-2003 06:08 PM

well this is because you dont use my exact code, you change it. For instance usergroup numbers are changed in your quoted code.

My code will work ok for the given condition which you asked in the first place:
"If usergroup 3 logs into Forumid 8 change header to:"

Marulatree 12-17-2003 06:22 PM

ha-ha - Man I feel like a dumbass!!! Logican you are a pure genius, really!!! Thank you very very much!

Marulatree 12-17-2003 06:37 PM

.....I just can't get it!


-------------------------
Usergroupid's 2 and 3 that should see OLD HEADER when they click into
Forumid's: 21,3,4,17,26,27,24,20,25,32,7,33,34,35,30,8,5,29,9
-------------------------

AND

-------------------------
Usergroupid's 6,7 and 9 that should see NEW HEADER when they click into
Forumid's: 23 and 28. When these user id's click on any other forumid's the banner needs to return to the OLD HEADER state.
-------------------------

All I want to do is if a Member's Club member (userid: 6,7 and 9) enter the Members Club forum (forumid's 28 and 23) they get greeted with Member welcome HEADER and if they exit or go to another forum (forumid's: 21,3,4,17,26,27,24,20,25,32,7,33,34,35,30,8,5,29 and 9) they get that Normal HEADER (I would also like to include the FORUMHOME HEADER to be the normal HEADER all round for every member.

I just can't get it right! I tried and tried using your tutorial on the first page and no luck!

I hope I'm not giving you a headache (I hope headache ain't contageous :))

Logician 12-18-2003 08:02 AM

PHP Code:

[[((($bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==9) AND ($forumid==28 OR $thread[forumid]==28 OR $forumid==23 OR $thread[forumid]==23)))]] 
put your custom header's html code here 
[[/((($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==9) AND ($forumid==28 OR $thread[forumid]==28 OR $forumid==23 OR $thread[forumid]==23)))]] 
[[(!(($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==9) AND ($forumid==28 OR $thread[forumid]==28 OR $forumid==23 OR $thread[forumid]==23)))]] 

put your regular header code here 
[[/(!(($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==9) AND ($forumid==28 OR $thread[forumid]==28 OR $forumid==23 OR $thread[forumid]==23)))]] 

This will do the trick for your request. Though it will work only in forumdisplay pages, not thread read pages. I take a look at the showthread.php and see that changing the header inside threads is not possible with this hack.

Also you may consider trying unique forum header hack which changes forum headers according to forumid. Although it does not change according to usergroup, if you make that forum private and allow only these usergroups can access it, this wont be a problem.


All times are GMT. The time now is 10:47 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.01346 seconds
  • Memory Usage 1,756KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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