View Full Version : How to hook a plugin in template?
Bouncer222
02-19-2010, 01:24 AM
Ok so I created a plugin with the code
ob_start();
include('activitybar/activitybar.php');
echo 'test';
$activitybar = ob_get_contents();
ob_end_clean();
hook location: member_complete
product: vbulletin
Title: Activity Bar
Now this works with a php file also on my site together to generate an image bar.
Now what code do I put in MEMBERINFO template (doesnt matter where at the moment)
so that this image bar can be displayed?
If I'm saying this right..(im a noobie) what im trying to do is hook the plugin to a specific location in a template. If thats right to say.
Can anyone help me please?
Thanks.
Sarcoth
02-19-2010, 01:34 PM
Bounce, I'm not sure of an answer, but I have a suggestion on something else you can try if you don't get a response. Since you are using vbadvanced, you can probably get this to work from creating a new module (php) with the above code rather than doing it with a plugin.
Hunne
02-19-2010, 02:51 PM
I have the very same problem
Bouncer222
02-19-2010, 04:11 PM
Yeah except I don't need it used in vbadvanced. I need this bar to show up in the user's profile page . Vbadvanced has nothing to do with that.
Sarcoth
02-19-2010, 04:53 PM
Ahhhh. You did say MEMBERINFO. Sorry about that. I was stuck thinking FORUMHOME. Is the plugin only referencing the one .php file? If so, can you attach it. I'm curious now and will make some tests if you like.
Bouncer222
02-19-2010, 06:08 PM
yes it is referencing to only one php file.
Let me PM you the attachment as, there is some database information in it, and for testing purposes you will need the database information for it to connect and show the bar.
--------------- Added 1266610243 at 1266610243 ---------------
Pm Sent.
Sarcoth
02-19-2010, 06:52 PM
Okay, I'm currently stuck on my own problem right now so I need a break from that. I'll run some tests on this instead.
Bouncer222
02-19-2010, 07:00 PM
Ok cool thanks a lot. I will check this thread later in a couple of hours as I have to go somewhere right now.
--------------- Added 1266614072 at 1266614072 ---------------
BTW it's supposed to show the kind of activity bars that you see here:
http://64.238.161.54/hlstatsx/hlstats.php?mode=players&game=insmod
It's supposed to show the same exact bar on the user profile page on vbulletin, the php file gets the average of those activity bars from different games, its a statistics thing.
Muller2
02-22-2010, 07:49 PM
Bouncer222,
Did you find a solution to this issue? I have the same problem.... I have been hunting high and low and can't seem to find anyone that has got a PHP include working in VB4....I'm hoping that it is possible :confused:
Thanks,
Al
Bouncer222
02-22-2010, 08:19 PM
Yeah its possible but I had someone else do it for me
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.