vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Looking Simple template Include .. (https://vborg.vbsupport.ru/showthread.php?t=45045)

CRego3D 10-27-2002 02:10 AM

Looking Simple template Include ..
 
I am lookign for somehting that you PHP gods might be able to help me with

I am lookign to include a teamplate in a specific forum (above the threads)

somethign that would say "if forumif=XX show $template_name"

is this easy to do ? :) .. I coudl create a second style, but when you have multiple skins it becomes inpractical ;)

cheers

DrkFusion 10-27-2002 02:35 AM

Open forumdisplay.php and find:
PHP Code:

eval("dooutput(\"".gettemplate('forumdisplay')."\");");


?> 

above it add
PHP Code:

// Get Show template for Forumid XX
$showbitifid='';
if (
$forumid == 'XX') {
    eval(
"\$showbitifid = \"".gettemplate('template_name')."\";");
}
// End -Arunan 

Replace XX with the forum id, and template_name with the actualy name of the template.

Open the Forum Display template and add
PHP Code:

$showbitifid 

Where ever you want the template to show when $forumid=XX

Good Luck
-Arunan

DrkFusion 10-27-2002 02:42 AM

Here is a little screenshot :)

-Arunan

CRego3D 10-27-2002 03:19 AM

excellent !!! .. will try and let you know inf a few :)

CRego3D 10-27-2002 03:28 AM

Works like a champ :D .. it will be on yaxay v.2 ;)

thank you very much :)

DrkFusion 10-27-2002 12:02 PM

No problem, looking forward to yaxay 2

-Arunan

Dean C 10-27-2002 02:44 PM

Aren't we all ;)

- miSt

Dean C 10-27-2002 02:49 PM

Carlos i just had a good idea which i think you'll find extrememly useful to use on yaxay...

I'd install this hack by Logician which allows you to have conditionals in your templates based on forumid's etc... Which will prevent you from having to edit the php code every time you want to do template includes :D

Take a look at it here:

https://vborg.vbsupport.ru/showthrea...threadid=43325

If you need to know how to do something with the conditionals hack then simply ask Logician and he'll help you within 1-2 days :D

Regards

- miSt


All times are GMT. The time now is 01:22 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.01024 seconds
  • Memory Usage 1,724KB
  • 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_php_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