View Full Version : Header link changes on forum=27
dennis00
08-30-2003, 08:01 AM
<a href="http://forums.saiyanarena.com/forumdisplay.php?forumid=27" target="_blank">http://forums.saiyanarena.com/forumd...php?forumid=27</a>
Is it possible to link this header to forumdisplay.php?forumid=27&ses.... without making a new template? So just changing the current template or changing code?
assassingod
08-30-2003, 08:20 AM
What do you mean? For forum 27 you want to the link in the header to be different?
dennis00
08-30-2003, 08:27 AM
Yes, that's want i'd like to have. I can't install another board for the English part, so i do it this way. (Best way, right?)
assassingod
08-30-2003, 08:31 AM
You can try this, it's untested but it may work:
Open forumdisplay.php, find:
unset($imodcache);
Below, add
if($forum[forumid] == 27) {
$headerlink = "forumdisplay.php?forumid=27";
} else {
$headerlink = "index.php?s=$session[sessionhash]";
}
Then in the header template, find:
index.php?s=$session[sessionhash]
(First one)
and replace with
$headerlink
dennis00
08-30-2003, 09:07 AM
Headertemplate <!-- header -->
<!-- logo -->
<a name="top"></a>
<table border="0" width="{tablewidth}" cellpadding="0" cellspacing="0" align="center" valign="bottom">
<tr>
<td background="{imagesfolder}/headbg.gif" align="left" valign="bottom"><a href="$headerlink"><img src="{imagesfolder}/header/logo.gif" border="0" alt="$bbtitle"></td>
<td background="{imagesfolder}/headbg.gif" align="right" valign="top"><smallfont><b><a href="$homeurl">Home</a> | <a href="$bburl">Forums</a> | <a href="$bburl/admin">Admin</a> </smallfont></td>
Forumdisplay.php
// get moderators
$forummoderators=$DB_site->query('SELECT user.userid,user.username,moderator.forumid
FROM moderator
LEFT JOIN user
ON (moderator.userid=user.userid)
ORDER BY user.username');
unset($imodcache);
if($forum[forumid] == 27) {
$headerlink = "forumdisplay.php?forumid=27";
} else {
$headerlink = "index.php?s=$session[sessionhash]";
}
while ($moderator=$DB_site->fetch_array($forummoderators)) {
$imodcache["$moderator[forumid]"][] = $moderator;
}
$DB_site->free_result($forummoderators);
http://forums.saiyanarena.com/forumdisplay.php?forumid=27 still doesn't work :(
assassingod
08-30-2003, 09:11 AM
You'll have to remove the code in your post:)
I'll see what I can to sort it
dennis00
08-30-2003, 11:57 AM
Do you think this is better? or do you need more info? THanks for trying to help me so good btw!
dennis00
09-01-2003, 01:26 PM
uh... mr. assasin?
assassingod
09-01-2003, 01:30 PM
Sorry - I will get to work on fixing this right away.
dennis00
09-02-2003, 11:20 AM
Thanks! Well, any improvements yet?
assassingod
09-02-2003, 11:26 AM
None, I realized my previous suggestion wouldn't work because since you want it in the header, it would be better to be used in global.php but it didn't work.
I also tried other ways like adding an option to vBOptions but that didnt help either. I cant think of any other way to make this work.
shufty-gnet
09-03-2003, 03:06 PM
duplicate the current style you have and apply it to the forum you want to have the new header link. then just edit the link
assassingod
09-03-2003, 03:09 PM
Today at 05:06 PM shufty-gnet said this in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=431002#post431002)
duplicate the current style you have and apply it to the forum you want to have the new header link. then just edit the link
That could but unless you make the entire styles global, you'd have to edit both styles each time you want to edit/add templates
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.