Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 04-01-2008, 01:53 AM
lukemax lukemax is offline
 
Join Date: Oct 2006
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #12  
Old 04-01-2008, 02:04 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I donlt see $providers in providers_hook.php. Where is that varibale at?
Reply With Quote
  #13  
Old 04-01-2008, 03:13 AM
lukemax lukemax is offline
 
Join Date: Oct 2006
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Attached Images
File Type: jpg screen.jpg (79.9 KB, 0 views)
File Type: jpg screen1.jpg (76.4 KB, 0 views)
Attached Files
File Type: php providers.php (1.3 KB, 1 views)
Reply With Quote
  #14  
Old 04-01-2008, 04:41 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #15  
Old 04-01-2008, 11:52 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #16  
Old 04-01-2008, 03:41 PM
lukemax lukemax is offline
 
Join Date: Oct 2006
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Attached Images
File Type: jpg screennn.jpg (62.9 KB, 0 views)
Attached Files
File Type: php providers.php (1.3 KB, 2 views)
Reply With Quote
  #17  
Old 04-02-2008, 05:21 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #18  
Old 04-02-2008, 06:13 AM
lukemax lukemax is offline
 
Join Date: Oct 2006
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #19  
Old 04-02-2008, 11:45 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you are getting confused. You DO still call the template, but you DO add your own code into the file.
Reply With Quote
  #20  
Old 04-02-2008, 12:36 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:50 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.04340 seconds
  • Memory Usage 2,280KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete