vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Different styles, different header! (https://vborg.vbsupport.ru/showthread.php?t=26160)

Ruth 09-01-2001 07:20 PM

Thanks bargie for the hack, is it possbile to use this hack so that guests/unregistered view header_1 and registered members view header_2 ?

thanks again

bargie 09-01-2001 08:47 PM

it might be possible, but this would have to be done by setting a cookie, which may mean some people cant use it say, if they haven't got cookies enabled (most people have), that is the only way i can think of. but then if they are using a different computer and log in then they would have to change style on every computer, where as the hack allows users to log in and go straight to the style.

if ne 1 could help me with a fuction i want to add, or is this built into vb? is admin can select which style they want as there default.

I would like my site to say have christmas, easter, summer, winter, auterm, spring etc.. styles, and for me to say select the defult i want, say at xmas i want the xmas style as my default. Ok every one how has allready choosen a style won't be able to see it, but its a goood idea i think. also you could have this set up automaticly so on set dates the headers and footers change to the time of year, which means when it is all set up you want have to worry about it?

it will probably go something like
if ($styleid=="1") {
if ($date=="$xmasdates") {
if (!$header) {
eval("\$header = \"".gettemplate('headerxmas')."\";");
} else {
eval("\$header .= \"".gettemplate('headerxmas')."\";");
}
if (!$footer) {
eval("\$footer = \"".gettemplate('footerxmas')."\";");
} else {
eval("\$footer .= \"".gettemplate('footerxmas')."\";");
}
}
if ($date=="$summerdates") {
etc.

if any one know how this would be done then pls help

regards
jamie

bargie 09-02-2001 11:55 AM

so i read your post wrong this is how i think it would work in theroy it should could you tell me if it does?

in global.php find

if (!$header) {

add before

if ($bbuserinfo['userid']!=0) {

that bit checks if the user is loged on (registered)

now you should have

if ($bbuserinfo['userid']!=0) {
if (!$header) {
eval("\$header = \"".gettemplate('header_2')."\";");
} else {
eval("\$header .= \"".gettemplate('header_2')."\";");
}
if (!$footer) {
eval("\$footer = \"".gettemplate('footer_2')."\";");
} else {
eval("\$footer .= \"".gettemplate('footer_2')."\";");
}

then add below that

} else {
if (!$header) {
eval("\$header = \"".gettemplate('header_1')."\";");
} else {
eval("\$header .= \"".gettemplate('header_1')."\";");
}
if (!$footer) {
eval("\$footer = \"".gettemplate('footer_1')."\";");
} else {
eval("\$footer .= \"".gettemplate('footer_1')."\";");
}
}

that should be it, remember to add to the get templates, the templates you want to have used!

regards

jamie

Ruth 09-02-2001 03:05 PM

it is working :D

this will save me lots of time changing the templates

Thanks so much bargie!

bargie 09-04-2001 04:17 PM

ruth can i have the url for your board as i wish to have a look

Ruth 09-04-2001 04:44 PM

i had to resit everything back to original until i finish designing the headers and footers, i'll show it to you once it's comlete.

cheers,

imom 09-09-2001 12:26 PM

you are a LIFESAVER! Thanks! And I'll let you know how it goes. :D

Liz

bargie 10-14-2001 09:17 PM

anyone want this or can i get rid of it,

Robert9 10-25-2001 11:38 PM

Your hack do the trick, but only at the first page!

Then the var will not passed and the old style comes again.

Robert

bargie 10-26-2001 01:41 PM

it does work, but the problem is that the cookie dosen't over write i'm working on not using the cookie.

can you explain you problem fully pls.

jamie


All times are GMT. The time now is 09:47 PM.

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.01025 seconds
  • Memory Usage 1,732KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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