vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Integrating into templates (https://vborg.vbsupport.ru/showthread.php?t=223715)

General Ray 09-22-2009 02:22 AM

Integrating into templates
 
Just another noob modding question of mine. From what script is all the PHP code inserted into the templates? If I have a variable, say $var[test], how would I integrate that page into the vB templates so I can reference that variable?

Brother Malachi 09-22-2009 02:32 AM

Using plugins ;)
Which page are you trying to use that variable on? Where are you defining that variable?

General Ray 09-22-2009 06:38 PM

It's all custom work, actually. I just need to know where or how to plugin to the templates.

Lynne 09-22-2009 07:03 PM

If it is a custom page of yours, then you don't need to use the plugins.

You may want to read these regarding Plugins/Products:
https://vborg.vbsupport.ru/showthread.php?t=82625
https://vborg.vbsupport.ru/showthread.php?t=82923

General Ray 09-23-2009 12:25 AM

I know I don't need the plugins, that was the point of my upper post. I need to know how to include custom script into the templates.

Lynne 09-23-2009 03:58 AM

You cannot include custom script in a template. You do any sort of scripting in the php file, or plugin, and then just spit out the results in the template.

General Ray 09-23-2009 06:57 PM

That's what I need to know. How do I get said results to spit out to the templates?
I may have misused the word include, if that is the case, apologies. I don't normally work with templates, so I'm at a slight disadvantage here.

Lynne 09-23-2009 07:20 PM

You still haven't specified if you are writing your own php page or trying to add to an existing one. Either way, you will do the php code in your page, or in a plugin, and assign the results to a variable, $myvar = foo;, and then use that variable in the templates. It's very hard to answer your questions when you are being so vague.

General Ray 09-24-2009 01:19 AM

The script is all custom. Custom php files.

Lynne 09-24-2009 03:35 AM

OK, then in the custom script, you will assign results to variables and then use the variables in the templates. Have you seen these articles? How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.


All times are GMT. The time now is 09:16 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.00978 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete