vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Postbit - PHP (https://vborg.vbsupport.ru/showthread.php?t=197245)

neo1211 11-25-2008 11:28 PM

Postbit - PHP
 
How would I go about adding dynamic PHP code into the postbit? I don't think I can do it through the style manager.

Thanks in advanced.

Edit: Also, vBulletin 3.6.5.

SEOvB 11-25-2008 11:50 PM

You need to use the plugin system, http://vbulletin.com/docs has more information for you about how to do it.

neo1211 11-25-2008 11:54 PM

Hate to be a pain, but where in the manual might I find it? A search for "postbit" reveals nothing interesting.

Edit: I found it, but can you point me into the right direction as to what to add in the beginning of the file so that it knows that it's a plugin for the postbit template?

SEOvB 11-26-2008 12:07 AM

Quote:

Originally Posted by neo1211 (Post 1673040)
Hate to be a pain, but where in the manual might I find it? A search for "postbit" reveals nothing interesting.

Edit: I found it, but can you point me into the right direction as to what to add in the beginning of the file so that it knows that it's a plugin for the postbit template?

You just need to choose the correct hook location global_start usually always works, but you can probably find a better one be using the other locations and some testing.

neo1211 11-26-2008 12:10 AM

Quote:

Originally Posted by FRDS (Post 1673047)
You just need to choose the correct hook location global_start usually always works, but you can probably find a better one be using the other locations and some testing.

Err.
Honestly, I've never worked with plugins or anything with vBulletin, all I know is what I want to add, and where I want it (I can do the php, it's just the plugin part that messes me up)

Edit: I can't seem to get it to work, I've tried postbit_factory, postbit_start, and postbit_complete hooks, with the code: echo "Test"; - it doesn't work with any of them.
Edit2: My bad ;). The plugin system was disabled. Anyway, I can only seem to get the text to appear at the top of the page, how do I fix this?

Lynne 11-26-2008 12:54 AM

You 'fix' it by putting the text in a variable in the plugin ($myVar = 'Test'; ) and then putting the variable in your template where you want it.


All times are GMT. The time now is 10:33 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.01566 seconds
  • Memory Usage 1,725KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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