vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   specific style for only one forumid? (https://vborg.vbsupport.ru/showthread.php?t=43382)

TECK 09-10-2002 07:23 AM

specific style for only one forumid?
 
what i try to acomplish to use a specifuc html style for a unique forum only, for example forumid 3. so instead of using the classic forumdisplay_threadslist template for example, i want to use a new one. there is always my hard way:
create a new template and use a if condition for the forumid to select the specific template...

i'm not good at all with multiple style integration. can you recommend me what is the best aproach?

Logician 09-10-2002 10:53 AM

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=43325" target="_blank">Advanced Templates</a> can help.. After the installation, edit your relevant template and use this format:
[[($forum[forumid]==X)]]
Your specific template for forum X
[[/($forum[forumid]==X)]]
[[($forum[forumid]!=X)]]
Your normal template for other forums
[[/($forum[forumid]!=X)]]

I didnt test it out but I believe it will work..

Admin 09-10-2002 10:54 AM

Why can't you create a new template set, assign it to a style and use that style in only that forum? Easier than hacking.

Or hack forumdisplay:
Code:

    // there are threads
    eval("\$forumdisplay[threadslist] = \"".gettemplate('forumdisplay_threadslist')."\";");

Change to something like:
Code:

    // there are threads
    eval('$forumdisplay[threadslist] = "'.gettemplate(iif($foruminfo['forumid'] == 3, 'forumdisplay_threadslist_specialversion', 'forumdisplay_threadslist')).'";');


TECK 09-10-2002 07:40 PM

that's exacly what i needed chen. thanks! i was gonna do it this way, hacking the gettemplate.
however, i want to learn to create a new template set. anyone knows any links with tutorials? are they available on members area? i could not find them. since styles are part of the default unhacked forums, they should have it included onto the online manual.

TECK 09-10-2002 07:50 PM

ok i created a new style and looked through it.. it adds all templates. cn i just create my own set? with the 3 templates? without replacement set, etc? and put there only the templataes that i'm interested to have them modified? thanks.

also a little detail:
2.2.7|||Master vBulletin Style Set!!!master!!!|||None|||None|||43|||479|||

vBulletin Style Set and master are separated by 3 exclamation marks? can you explain to me what should i replace the "master" word with? ty.

Dean C 09-11-2002 04:20 PM

^ no way in hell this is nakkid....

TECK 09-12-2002 03:03 AM

coding is not the same as making template style. i never did one. :)
so i'm a newbie creating template styles...

Dean C 09-12-2002 04:37 PM

oh i see lol.... i still find it hard to believe with all your hacks etc that you are a newbie at making styles etc...

- Mist

TECK 09-16-2002 11:53 PM

Quote:

Originally posted by FireFly
Why can't you create a new template set, assign it to a style and use that style in only that forum? Easier than hacking.

Or hack forumdisplay:
Code:

    // there are threads
    eval("\$forumdisplay[threadslist] = \"".gettemplate('forumdisplay_threadslist')."\";");

Change to something like:
Code:

    // there are threads
    eval('$forumdisplay[threadslist] = "'.gettemplate(iif($foruminfo['forumid'] == 3, 'forumdisplay_threadslist_specialversion', 'forumdisplay_threadslist')).'";');


this should aplay also for the child forums if my forumid is a parent forum, right firefly?
or should i use an array just to make sure...?


All times are GMT. The time now is 01:44 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.01615 seconds
  • Memory Usage 1,730KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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