vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Request: Custom Forum Headers? (https://vborg.vbsupport.ru/showthread.php?t=60224)

Amiga-uk 01-14-2004 09:52 PM

Request: Custom Forum Headers?
 
Hah.. Another request. Thanks loads to the people who've already helped me, btw :)

Okay, this one is for each individual forum to have a custom header file.. Im guessing it'd be an IF statement in the headerfile directing towards different templates for different forumid's, but a) im not sure if thats right, and b) i have no idea how to go about it.

So.. any help? Pretty please with sugar on top? :)

Kentaurus 01-15-2004 01:53 AM

Quote:

Originally Posted by Amiga-uk
Hah.. Another request. Thanks loads to the people who've already helped me, btw :)

Okay, this one is for each individual forum to have a custom header file.. Im guessing it'd be an IF statement in the headerfile directing towards different templates for different forumid's, but a) im not sure if thats right, and b) i have no idea how to go about it.

So.. any help? Pretty please with sugar on top? :)

I haven't tested it, but I think you can easily do this with conditionals:

<if condition="$_GET[forumid]==1">
yourheaderhere
</if>

<if condition="$_GET[forumid]==2">
yourheaderhere
</if>

<if condition="$_GET[forumid]==3">
yourheaderhere
</if>

heynurse 01-15-2004 07:02 AM

I'm looking for the same thing, actually, I am just looking to have specific advertising banner code to be in specific forums for targeting reasons, I don't not necessarily the entire header.

Any suggestions for that? I'm new to this whole conditional thing?

Amiga-uk 01-15-2004 11:48 AM

Thats what i thought it'd be like Kentaurus, i just dont know php very well.. heh..

Anyway, i'll test that and get back to ya. :) Thanks.

EDIT: Works perfectly, thanks mate.

^Heynurse, this works for that too..

Just put the if condition in a certain part of the header itself. Then it'll show the header in every forum, but only whats in the if conditions in the forum specified (hope you understood that)

Kentaurus 01-15-2004 02:04 PM

Quote:

Originally Posted by heynurse
I'm looking for the same thing, actually, I am just looking to have specific advertising banner code to be in specific forums for targeting reasons, I don't not necessarily the entire header.

Any suggestions for that? I'm new to this whole conditional thing?

Every forum has a forumid, you can check that in the admincp or when you enter the forum in the url, the conditional:

<if condition="$_GET[forumid]==1">
yourheaderhere
</if>

compares the forumid and in this case if the id is '1' whatever you have in "yourheaderhere" (html code probably) will appear only when you enter the forum 1. You can put as many conditions as you want only changing the forumid for different headers.

oldengine 11-08-2004 11:25 AM

Quote:

Originally Posted by Kentaurus
I haven't tested it, but I think you can easily do this with conditionals:

<if condition="$_GET[forumid]==1">
yourheaderhere
</if>

<if condition="$_GET[forumid]==2">
yourheaderhere
</if>

<if condition="$_GET[forumid]==3">
yourheaderhere
</if>

How would you apply an ELSE to this code so that if none of the above conditions are met, a common banner is shown?

oldengine 11-26-2004 12:38 PM

<if condition="$forumid == 6">

do

<else />
<if condition="$forumid == 1">

do

<else />
<if condition="$forumid == 7">

do

<else />
<if condition="$forumid == 9">

do

<else />
<if condition="$forumid == 20">

do

<else />
<if condition="$forumid == 21">

do

<else />
<if condition="$forumid == 22">

do

<else />

do the main thing

</if></if></if></if></if></if></if><br />

There are probably six different ways to do this, but I'm a hacker and I got it done.

SaN-DeeP 11-26-2004 04:21 PM

Check for Forum Home Annoucment hack from Logician one of his posts carries a good solution about same

Regards,


All times are GMT. The time now is 11:55 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.01024 seconds
  • Memory Usage 1,729KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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