vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   How to hook a plugin in template? (https://vborg.vbsupport.ru/showthread.php?t=236277)

Bouncer222 02-19-2010 01:24 AM

How to hook a plugin in template?
 
Ok so I created a plugin with the code

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 [DATE]1266610243[/DATE] at [TIME]1266610243[/TIME] ---------------

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 [DATE]1266614072[/DATE] at [TIME]1266614072[/TIME] ---------------

BTW it's supposed to show the kind of activity bars that you see here:
http://64.238.161.54/hlstatsx/hlstat...rs&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


All times are GMT. The time now is 09:21 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.01329 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete