vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   plugin not working? (https://vborg.vbsupport.ru/showthread.php?t=174611)

lukemax 04-01-2008 01:53 AM

no, that didn't work either, right now since I have the plugin disabled http://www.lvasp.com/forum/providers.php
but when I enable it, it doesn't work.
Thanks for the help.

Boofo 04-01-2008 02:04 AM

I donlt see $providers in providers_hook.php. Where is that varibale at?

lukemax 04-01-2008 03:13 AM

1 Attachment(s)
oh, I thought I was supposed to output that php page to a variable (see the hook I made) Then use that variable in the custom template I made (other screenshot) Lastly include this new template in providers.php.

Is this easy and do I make sence?
Thanks again

Dismounted 04-01-2008 04:41 AM

Why do you need the hook? You only need that data in your providers.php page, so you can place the code into that page directly.

Opserty 04-01-2008 11:52 AM

I think you are misunderstanding the concept of the Hooks & Plugins system. The system was purely put in place by vBulletin in order to make it easier for coders to modify code.

When you create a Plugin you hook it into existing vBulletin files, this means you don't need to edit the file directly, making it easier for people to maintain their boards when it comes to updates e.t.c. (Such as if files are overwritten it means people don't have to go back and edit the file each time).

If you are not using a default vBulletin file there is no need to use the Hook and Plugin system. You have control of this file so you don't need Plugins, you put your PHP inside your PHP file. Using the Plugin system is pointless, you have a custom PHP file so you should use it. I'm not sure why you are using a providers_hook.php page as you don't even need that, you just need to put that code into the main PHP file.

lukemax 04-01-2008 03:41 PM

1 Attachment(s)
yea, that makes soo much sense. But I followed that tutorial (https://vborg.vbsupport.ru/showthrea...n+powered+page) and made a PROVIDERS template and used the hook in there. Then all that providers.php does is call the template (the only reason I did this cause I wanted the vbulletin stuff (header navbar and footer) to be on the page (like http://www.lvasp.com/forum/providers.php) If you want, take a look at this (its similar to what I'm trying to mimic) http://www.lvasp.com/forum/reviews.php which was created also by a custom template (REVIEWS) and uses that pesky hook system. But when I plug the PHP code into the page which calls the template nothing happens, there is a way to do this without creating a template or using the hook system, but still having all the vbulletin stuff in it to.
Quote:

If you are not using a default vBulletin file there is no need to use the Hook and Plugin system. You have control of this file so you don't need Plugins, you put your PHP inside your PHP file. Using the Plugin system is pointless, you have a custom PHP file so you should use it. I'm not sure why you are using a providers_hook.php page as you don't even need that, you just need to put that code into the main PHP file.
I dont see how to plug the php code into the template directly, I get an error when I replace the $providers variable in the template (PROVIDERS) with the php code in providers_hook.php. I also tried pasting the code in providers_hook.php directly in the providers.php page into (at line 37 pf screenshot) but is that right?
Thanks and sorry for bugging you with this (again)
(Is my providers.php page ok how it calls the template, its attached too)

Dismounted 04-02-2008 05:21 AM

Once again, the Hooks/Plugin system, is supposed to be used for adding functionality into vBulletin, not for custom pages. You can put your code inside your custom page. It does not matter if you have followed that tutorial, as it is still PHP.

lukemax 04-02-2008 06:13 AM

ok, got it (1 more thing still..sorry) But do I need to have my php page call a template. How do add the vbulletin header, footer, and navbar (so the user can login from there) to be in the page too (isnt that what making the PROVIDERS template is for)? Do I even need to deal with making a template and only need a php page (which currently points to the custom template)?
Thanks for the help again.

Dismounted 04-02-2008 11:45 AM

I think you are getting confused. You DO still call the template, but you DO add your own code into the file.

Boofo 04-02-2008 12:36 PM

Download my site map hack and look at that. That is a php file hack. A simple one.


All times are GMT. The time now is 09:20 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.01186 seconds
  • Memory Usage 1,740KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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