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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-22-2008, 08:38 PM
ercollins ercollins is offline
 
Join Date: Jun 2007
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Hook Location

Ok I am creating a mod, and it calls and external xml file from include in a plugin.

What I need to know is, currently I had the plugin connected to Global_Start

(this was a very bad idea I found out) as every single time anyone does anything on the website it was calling this remote xml file)

And I only want the remote file called when the page that is displaying the information is called.

?

???

Thanks for any replies.
Reply With Quote
  #2  
Old 09-22-2008, 10:51 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, you determine the plugin by first defining which pages will use the code. It is only used on showthread.php pages? If so, you pick a hook that is called out in that php page. If you give us more information, we may be able to make suggestions on which hooks you may want to try.
Reply With Quote
  #3  
Old 09-23-2008, 12:31 AM
ercollins ercollins is offline
 
Join Date: Jun 2007
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well it is all better explain in my unpaid mods, thread but no one replies to it.

I have a set of custom templates I made in the acp.

Then I made a plugin for each page, to [include (file.php)]

File.php includes a call to a remote xml file.

The remote xml file comes from another server. then I parse it in the file.php, and output the parsed results in the custom templates I set up.

(well the place I am getting the remote xml file got pissed that i sent 500,000 requests for the file in an hour or something)

I am trying to learn how to cache the file locally but that is something new to me, so for now I would just like to know how to make a new hook, for the custom template pages.

Or a hook that would only be called when I open those pages.

Example of a page would be www.muteclan.com/forum/ps3_cod4.php

Hope this explains something better.
Reply With Quote
  #4  
Old 09-23-2008, 02:41 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The page you linked to probably has no custom hooks, so you would have to put the code directly into the php page.

If you are linking to an xml page on another site and they don't like that, why don't you ask them for a copy to put on your own site?
Reply With Quote
  #5  
Old 09-23-2008, 02:55 AM
ercollins ercollins is offline
 
Join Date: Jun 2007
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

they dont mind someone getting the information, they just dont want someone getting it as much as I was. But I got cache file working now so I dont think I have a problem.

Can you tell me how to create a custom hook or point me in the right direction?
Reply With Quote
  #6  
Old 09-23-2008, 03:03 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It does no good to create a hook in a custom page. A hook is so you don't have to modify the actual code, but it it's a custom page, you don't have any reason not to modify it. Just put your code right into that custom page.
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:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06647 seconds
  • Memory Usage 2,207KB
  • Queries Executed 13 (?)
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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete