vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Where do plugins go? (https://vborg.vbsupport.ru/showthread.php?t=137406)

jbrohan 01-24-2007 04:43 PM

Where do plugins go?
 
Hello
I want to make a new custom page. I've finally figured out how to get Gary King's excellent article working. How to create your own vBulletin-powered page! (https://vborg.vbsupport.ru/showthread.php?t=62164).
My custom page is written in php. As I understand it I need to use the headers and the navbar in Gary's TEST template but I need to put my code into a plugin. This seems to be a variable that will contain all the php code, and this gets evaluated in the expansion of the template.

My question is where do I assign my php code to the variable?

ob_start();
include('path/to/this/file/myfile.php');
$includedphp = ob_get_contents();
ob_end_clean();

This code looks like it might fit into a template? The manual says to put it into :global_start but I do not know what and where that is?

Then there's the hooks, are these just suitable places in the code?

Thanks for any help. I'll write it up nicely when I'm done, remembering all the tings that puzzled (are still puzzling) me
John

Guest190829 01-29-2007 06:01 AM

Your php code should go into the .php file of your new vBulletin page. Plugins are used to insert PHP code into already existing vBulletin files.


All times are GMT. The time now is 04:05 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.02109 seconds
  • Memory Usage 1,710KB
  • 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)post_thanks_navbar_search
  • (1)printthread
  • (2)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