vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Adding a new $code to call (https://vborg.vbsupport.ru/showthread.php?t=86659)

Logikos 03-24-2003 05:11 AM

Adding a new $code to call
 
I need to know how to add a new $callnamehere

Example i would like to make a new template for the "Forum Home Page Templates" So would i just create a new template called forumhome_offtopicbit with my html code inside that, and add $offtopicbit anywhere in the forum homes section?

Just wondering if im right or wrong or even close :P

Tony G 03-24-2003 06:02 AM

Requires hacking/phpinclude mod to get new variables to work in templates.

Logikos 03-24-2003 11:14 AM

Thanks Tony. You better be getting paid for all this :p

Brad 03-24-2003 06:55 PM

Also, adding a new varible via phpinclude to call a template will add one query.

Tony G 03-25-2003 03:29 AM

Does it add anything via file hacking?

Brad 03-25-2003 09:30 AM

Quote:

Originally Posted by Tony
Does it add anything via file hacking?

It can, if hacking is done incorrectly, basicly any template used on a page that is not in the $templateused section of the file will add a query.

Grunt 03-30-2003 10:59 PM

so if you add the new template name to $templateused it wont add a query?

Brad 03-31-2003 12:16 AM

Quote:

Originally Posted by Grunt
so if you add the new template name to $templateused it wont add a query?

yes, but you will have to hack to do so.

filburt1 03-31-2003 12:40 AM

Would be ubercool if you could just have a setting in the admin CP for which files and actions cache which templates.

Tony G 03-31-2003 04:48 AM

We can only dream. :( :p

Brad 03-31-2003 05:32 AM

Quote:

Originally Posted by filburt1
Would be ubercool if you could just have a setting in the admin CP for which files and actions cache which templates.

would be easy to write, but not wroth the time of editing nearly every file.

Logikos 03-31-2003 09:06 AM

Quote:

Originally Posted by Anime-loo
would be easy to write, but not wroth the time of editing nearly every file.


It would be easy if your just making it be able to read one template
from the variable you specify.

drives fast 04-09-2003 05:16 PM

create the template and then in your home.php (whatever it is called) you should find where templates are parsed down around the bottom of the script.....just add the template to that list and call it where you want it to appear on the page


All times are GMT. The time now is 01:08 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.01130 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_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