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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-13-2011, 04:23 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Is this not possible? (version checking via plugin only)

I'm toying around with more code , and thought about trying to get rid of my version.php file (which holds all of my version checking for all of my modifications)

Now, in the file, I would have:
PHP Code:
if ($_REQUEST['do'] == 'my_product_id')
{
    echo 
'<version productid="my_product_id">1.2.3</version>';

And obviously it would be pulled by
Code:
www.usmilitarylife.com/version.php?do=my_product_id
Simple enough . Anyway, I'm trying to use the hook location misc_start with the same code as above, and again, by pulling it by:
Code:
www.usmilitarylife.com/misc.php?do=my_product_id
However, it returns that lovely "version check failed" error.

So, anyone else tried this? Anything I might be missing? Or is this just not possible to do via a plugin only? :erm:
Reply With Quote
  #2  
Old 10-15-2011, 10:13 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know if you're still trying this, but maybe you need an "exit" after your echo statement. I think if you don't do that it goes on to print out the list of smilies or something.
Reply With Quote
  #3  
Old 10-15-2011, 03:26 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
I don't know if you're still trying this, but maybe you need an "exit" after your echo statement. I think if you don't do that it goes on to print out the list of smilies or something.
Still no luck after adding
PHP Code:
exit; 
Reply With Quote
  #4  
Old 10-15-2011, 10:50 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try adding "die();" after your echo
Reply With Quote
  #5  
Old 10-15-2011, 11:19 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nerbert View Post
Try adding "die();" after your echo
Still no go lol. I just don't understand why something like this wouldn't work
Reply With Quote
  #6  
Old 10-16-2011, 01:38 AM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have no idea what version.php is but it's surely possible to convert an external file into a plugin -- I've done it several times. Can you post your plugin?
Reply With Quote
  #7  
Old 10-16-2011, 01:44 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nerbert View Post
I have no idea what version.php is but it's surely possible to convert an external file into a plugin -- I've done it several times. Can you post your plugin?
version.php was a file I created that had all of my version checking, for my products here on vbulletin.org, being done from that file.

The contents of my plugin are in the first post

I'll post it again though.

Hook location: misc_start
Plugin code:
PHP Code:
if ($_REQUEST['do'] == 'my_product_id')
{
    echo 
'<version productid="my_product_id">1.2.3</version>';

(which SHOULD allow me to call the version by going to mysiteurl.com/misc.php?do=my_product_id)
Reply With Quote
  #8  
Old 10-16-2011, 02:05 AM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't get what you're trying to do.

I put that plugin in misc.php and tried it and got Smilies with "1.2.3" at the top of the page. When I added"die();" in the plugin I got a white page with "1.2.3" at the top.

Just as I expected
Reply With Quote
  #9  
Old 10-16-2011, 02:19 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well isn't that a bit confusing.....

I tried that earlier, both using exit; and/or die(); and neither worked (on my test site)

Just put it on my live site and it works just fine....

Kind of sucks after I've been scratching my head over this for the past few days lol

--------------- Added [DATE]1318735283[/DATE] at [TIME]1318735283[/TIME] ---------------

UPDATE: Just tested it WITHOUT the exit; and/or die(); (again, on my live site) and it works just fine
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 07:50 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.07138 seconds
  • Memory Usage 2,248KB
  • 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
  • (2)bbcode_code
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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