Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2006, 02:22 PM
Inferno Dragon's Avatar
Inferno Dragon Inferno Dragon is offline
 
Join Date: Sep 2005
Location: United Kingdom
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Header(s) based on forum categories

Hi,
I would like to have different header templates within a style based on the forum categories! for example Xbox category and child-forums have different header template, PS2, PC etc and their child-forums can have their own different header template..

can we can do such sort of thing?
Reply With Quote
  #2  
Old 02-20-2006, 03:35 PM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could replace this in your header template

HTML Code:
<img src="$stylevar[titleimage]
with this

HTML Code:
<img src="./board/images/logo/logo-$forum[forumid].jpg" />
Then you would have a folder called /logo/ with
logo-1.jpg (for forum id 1)
logo-2.jpg (for forum id 2)
etc

I'm just wondering if there would be an easy way of adding a template conditional to show the default header if a customized one wasn't available but I think that would require adding a field to the db and marking it off to determine if one is available or not.
Reply With Quote
  #3  
Old 02-20-2006, 06:07 PM
Inferno Dragon's Avatar
Inferno Dragon Inferno Dragon is offline
 
Join Date: Sep 2005
Location: United Kingdom
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks "Reeve of shinra"! actually I had this in my mind already but as I said I want kind of modification which also change the header of the child-forums as well without creating lots of images..for example:

I want the Xbox header for:

- Xbox Section
- sub forum 1
- sub forum 2

- PS2
- sub forum 1
- sub forum 2

see..I if a user is browsing Xbox then I want that he/she will see xbox header in xbox forum as well as in its child forum etc...same goes with PS2 and other forums

Thanks,
Reply With Quote
  #4  
Old 02-20-2006, 06:12 PM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, ... we'll something like this might work. You may need to tweak the sytnax a bit.

HTML Code:
<if condition="$forum[forumid] = 1 OR $forum[forumid] = 3 OR $forum[forumid] = 5">
<img src="./board/images/logo/logo-xbox.jpg" />
<else />

<if condition="$forum[forumid] = 2 OR $forum[forumid] = 4 OR $forum[forumid] = 6">
<img src="./board/images/logo/logo-playstation.jpg" />
<else />

<img src="$stylevar[titleimage]" />
</if>
</if>
</if>
Reply With Quote
  #5  
Old 02-21-2006, 03:48 PM
Inferno Dragon's Avatar
Inferno Dragon Inferno Dragon is offline
 
Join Date: Sep 2005
Location: United Kingdom
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now that's much better..I will give it a try and thanks a lot for your idea/help!
Reply With Quote
  #6  
Old 03-25-2006, 09:36 PM
Lost_Prophet Lost_Prophet is offline
 
Join Date: Feb 2006
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,
I've been looking for something to do this, and tried out the suggestion in this post. However it's not working for me.

The path to the images is correct, I've verified this by taking out the call to $forum[forumid] and putting in a number.
Unfortunately switching back to the $forum[forumid] just yields a no-show.

The code I'm using is below.

Code:
<a href="index.php"><img src="http://www.hybrid-gamers.com/forums/images/headers/mxo/header-$forum[forumid].jpg" alt="" width="100%" height="150" border="0" /></a>
Reply With Quote
  #7  
Old 03-25-2006, 09:41 PM
Borgs8472 Borgs8472 is offline
 
Join Date: Apr 2004
Posts: 924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ ^
try using relative paths like in the example, e.g.
Code:
/images/headers/mxo/header-$forum[forumid].jpg" alt="" width="100%" height="150" border="0" /></a>
Reply With Quote
  #8  
Old 03-25-2006, 11:45 PM
Lost_Prophet Lost_Prophet is offline
 
Join Date: Feb 2006
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still no luck I'm afraid

A sunday /bump
I'm tempted to try out the
Code:
<if condition="$forum[forumid] = 1 OR $forum[forumid] = 3 OR $forum[forumid] = 5">
<img src="./board/images/logo/logo-xbox.jpg" />
<else />
stuff, but I'm looking to apply a different header for about 26 forums, so doing that would end up with a LOT of code!
Reply With Quote
  #9  
Old 03-27-2006, 05:51 PM
Lost_Prophet Lost_Prophet is offline
 
Join Date: Feb 2006
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I tried to use the if else version, but it still won't work.
Beware, it's long!
HTML Code:
<if condition="$forum[forumid] = 7 OR $forum[forumid] = 43 OR $forum[forumid] = 44 OR $forum[forumid] = 26 OR $forum[forumid] = 31">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-7.jpg" />
<else />

<if condition="$forum[forumid] = 27">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-27.jpg" />
<else />

<if condition="$forum[forumid] = 29">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-29.jpg" />
<else />

<if condition="$forum[forumid] = 147">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header147.jpg" />
<else />

<if condition="$forum[forumid] = 32">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-32.jpg" />
<else />

<if condition="$forum[forumid] = 33">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-33.jpg" />
<else />

<if condition="$forum[forumid] = 45">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-45.jpg" />
<else />

<if condition="$forum[forumid] = 66">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-66.jpg" />
<else />

<if condition="$forum[forumid] = 68">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-68.jpg" />
<else />

<if condition="$forum[forumid] = 67">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-67.jpg" />
<else />

<if condition="$forum[forumid] = 34">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-34.jpg" />
<else />

<if condition="$forum[forumid] = 35">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-35.jpg" />
<else />

<if condition="$forum[forumid] = 36">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-36.jpg" />
<else />

<if condition="$forum[forumid] = 190">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-190.jpg" />
<else />

<if condition="$forum[forumid] = 191">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-191.jpg" />
<else />

<if condition="$forum[forumid] = 37">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-37.jpg" />
<else />

<if condition="$forum[forumid] = 61">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-61.jpg" />
<else />

<if condition="$forum[forumid] = 130">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-130.jpg" />
<else />

<if condition="$forum[forumid] = 131">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-131.jpg" />
<else />

<if condition="$forum[forumid] = 132">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-132.jpg" />
<else />

<if condition="$forum[forumid] = 133">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-133.jpg" />
<else />

<img src="$stylevar[titleimage]" />
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
Here is my header sans that information. Can anyone see a reason why it wouldn't be working?

HTML Code:
<!-- logo -->
<a name="top" id="top"></a>
<table width="800" border="1" cellspacing="0" cellpadding="0" align="center" class="page">
  <tr>
    <td>
<table width="800" border="0" cellspacing="0" cellpadding="0" align="center" class="page">
  <tr>
    <td>
	<a href="index.php"><img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-7.jpg" alt="" width="100%" height="150" border="0" /></a></td>
	<tr>
	<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="center" class="vbmenu_control">&nbsp;</td>
      </tr>
    </table></td>
	
	</tr>
	<tr>
	  <td></td>
	  </tr>
	</table>
<!-- /logo -->

<!-- content table -->
<div align="center">
<div style="width:90%; text-align:left;">
$_phpinclude_output
Reply With Quote
  #10  
Old 03-27-2006, 06:18 PM
Nutz's Avatar
Nutz Nutz is offline
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<if condition="$forum[forumid] = 7 OR $forum[forumid] = 43 OR $forum[forumid] = 44 OR $forum[forumid] = 26 OR $forum[forumid] = 31">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-7.jpg" />
<else />

<if condition="$forum[forumid] = 27">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-27.jpg" />
<else />

<if condition="$forum[forumid] = 29">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-29.jpg" />
<else />

<if condition="$forum[forumid] = 147">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header147.jpg" />
<else />

<if condition="$forum[forumid] = 32">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-32.jpg" />
<else />

<if condition="$forum[forumid] = 33">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-33.jpg" />
<else />

<if condition="$forum[forumid] = 45">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-45.jpg" />
<else />

<if condition="$forum[forumid] = 66">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-66.jpg" />
<else />

<if condition="$forum[forumid] = 68">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-68.jpg" />
<else />

<if condition="$forum[forumid] = 67">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-67.jpg" />
<else />

<if condition="$forum[forumid] = 34">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-34.jpg" />
<else />

<if condition="$forum[forumid] = 35">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-35.jpg" />
<else />

<if condition="$forum[forumid] = 36">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-36.jpg" />
<else />

<if condition="$forum[forumid] = 190">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-190.jpg" />
<else />

<if condition="$forum[forumid] = 191">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-191.jpg" />
<else />

<if condition="$forum[forumid] = 37">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-37.jpg" />
<else />

<if condition="$forum[forumid] = 61">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-61.jpg" />
<else />

<if condition="$forum[forumid] = 130">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-130.jpg" />
<else />

<if condition="$forum[forumid] = 131">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-131.jpg" />
<else />

<if condition="$forum[forumid] = 132">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-132.jpg" />
<else />

<if condition="$forum[forumid] = 133">
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-133.jpg" />
<else />

<img src="$stylevar[titleimage]" />
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
</if>
You can replace all that with this:

HTML Code:
<img src="http://hybrid-gamers.com/forums/images/headers/mxo/header-$forum[forumid].jpg" />
As for the reset of your code, sorry but it was far to messed up for me to read/fix at the moment.

Thanks,
Mat
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:37 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.04267 seconds
  • Memory Usage 2,288KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (7)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete