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 02-19-2010, 01:24 AM
Bouncer222 Bouncer222 is offline
 
Join Date: Oct 2009
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 02-19-2010, 01:34 PM
Sarcoth Sarcoth is offline
 
Join Date: Mar 2006
Location: Huntsville
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 02-19-2010, 02:51 PM
Hunne Hunne is offline
 
Join Date: Apr 2006
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have the very same problem
Reply With Quote
  #4  
Old 02-19-2010, 04:11 PM
Bouncer222 Bouncer222 is offline
 
Join Date: Oct 2009
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 02-19-2010, 04:53 PM
Sarcoth Sarcoth is offline
 
Join Date: Mar 2006
Location: Huntsville
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 02-19-2010, 06:08 PM
Bouncer222 Bouncer222 is offline
 
Join Date: Oct 2009
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 02-19-2010, 06:52 PM
Sarcoth Sarcoth is offline
 
Join Date: Mar 2006
Location: Huntsville
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 02-19-2010, 07:00 PM
Bouncer222 Bouncer222 is offline
 
Join Date: Oct 2009
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 02-22-2010, 07:49 PM
Muller2 Muller2 is offline
 
Join Date: Aug 2009
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thanks,

Al
Reply With Quote
  #10  
Old 02-22-2010, 08:19 PM
Bouncer222 Bouncer222 is offline
 
Join Date: Oct 2009
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah its possible but I had someone else do it for me
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 02:53 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.04153 seconds
  • Memory Usage 2,239KB
  • Queries Executed 11 (?)
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)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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