View Full Version : Is this not possible? (version checking via plugin only)
HMBeaty
10-13-2011, 04:23 AM
I'm toying around with more code :D, 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:
if ($_REQUEST['do'] == 'my_product_id')
{
echo '<version productid="my_product_id">1.2.3</version>';
}
And obviously it would be pulled by
www.usmilitarylife.com/version.php?do=my_product_id
Simple enough :p. Anyway, I'm trying to use the hook location misc_start with the same code as above, and again, by pulling it by:
www.usmilitarylife.com/misc.php?do=my_product_id
However, it returns that lovely "version check failed" error. :p
So, anyone else tried this? Anything I might be missing? Or is this just not possible to do via a plugin only? :erm:
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.
HMBeaty
10-15-2011, 03:26 PM
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 addingexit;
nerbert
10-15-2011, 10:50 PM
Try adding "die();" after your echo
HMBeaty
10-15-2011, 11:19 PM
Try adding "die();" after your echo
Still no go lol. I just don't understand why something like this wouldn't work :confused:
nerbert
10-16-2011, 01:38 AM
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?
HMBeaty
10-16-2011, 01:44 AM
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: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)
nerbert
10-16-2011, 02:05 AM
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
HMBeaty
10-16-2011, 02:19 AM
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 1318735283 at 1318735283 ---------------
UPDATE: Just tested it WITHOUT the exit; and/or die(); (again, on my live site) and it works just fine :p
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.