vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Header link changes on forum=27 (https://vborg.vbsupport.ru/showthread.php?t=56615)

dennis00 08-30-2003 08:01 AM

Header link changes on forum=27
 
<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:
PHP Code:

unset($imodcache); 

Below, add

PHP Code:

if($forum[forumid] == 27) {
    
$headerlink "forumdisplay.php?forumid=27";
} else {
    
$headerlink "index.php?s=$session[sessionhash]";


Then in the header template, find:
Code:

index.php?s=$session[sessionhash]
(First one)

and replace with
Code:

$headerlink

dennis00 08-30-2003 09:07 AM

Headertemplate
Code:

<!-- 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>&nbsp;</smallfont></td>

Forumdisplay.php
Code:



// 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/forumd...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

Quote:

Today at 05:06 PM shufty-gnet said this in Post #12
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


All times are GMT. The time now is 11:49 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.01059 seconds
  • Memory Usage 1,743KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete