View Full Version : Different styles, different header!
bargie
08-22-2001, 11:19 PM
I need to know how to make a new style, ok you can change colours and everything but i want to be able to change my layout. i use like most people Header and the Footer to make the layout how i want it, so when i thought i could change the styles i thought this would be good, now i can let my user selcet between x number of layouts, but the all aim at the same header and footer templates. ne1 know how to make it so that they don't??
kindest regards
jamie
sysmom
08-23-2001, 02:10 PM
You can 'force' a forum into a specific style in your Admin CP, it's a Forum property setting.
-deb
Admin
08-23-2001, 02:14 PM
If you want to change the templates (in this case, header and footer), you will have to create a new template set for the new style.
Then, make the style use the template set you just created.
bargie
08-23-2001, 02:21 PM
thanks
is there a way so that i dont have to edit all the templates again?
as i have a lot of edited templates.
jamie
Admin
08-23-2001, 02:24 PM
Not that I know of.
bargie
08-23-2001, 02:27 PM
do you think it could be done easily, one way i think would work is going through all of the files and adding something like $header[$stlye] and having more header files.
ne1 willing to work on this, i think it would be good for vb.
bargie
08-26-2001, 08:04 AM
I have managed to creat this hack, if any one wants it, post here. It gives you unlimited layouts of your site
sysmom
08-26-2001, 02:03 PM
Bargie:
I'd be interested in seeing it. I'm not sure I need it right this minute, but there's always tomorrow!
Do you have a URL you can show it off at, please? :)
deb
TuPPerWaR
08-27-2001, 05:02 PM
yeah!
I would love to see it too, but if you don't have a board just send the hack to me! ;)
I have tried to make that hack myself, but without lock!
bargie
08-27-2001, 07:44 PM
ok i have typed this up, i regret that i can't show youu my board at the moment as i am doing extensive work to it and this hack is only one of them.
This is v.1 i will call it and i know it works with v.2.00 should work with others, pls find attached. it is very easy and only a few line, it could have a lot done to it if someone wants to work at it, like when people add a new style ask if they want a new header and footer? stuff like that
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
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
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,
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
Robert9
10-26-2001, 03:07 PM
You mean you pass the var only with the cookie?
I have tried to pass it tru all the templates, but it fails on some.
(with adding &styleid=$styleid behind every link in every template.
If you work with the cookie; its only a problem, if someone changes from the styleid1 to 2 ?!
But then its the same problem for me.
VB should really add a feature to parse different vars tru all the templates; in theory i could not be a problem, to start the index.php, make a global var (as a string for one or more vars);
and pass it to eveywhere.
re
Steve Machol
10-26-2001, 03:12 PM
bargie,
You have been asked at least three times to enter your license info, as in this thread:
http://www.vbulletin.com/forum/showthread.php?s=&postid=166130#post166130
I'm sure you're friend is back from his trip now and can supply you with the info you need to enter into your user profile.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.