Thread: Miscellaneous Hacks - DJ's Dynamic Tab Content for Postbit_Legacy
View Single Post
  #237  
Old 01-07-2009, 03:42 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Head Roller View Post
Hello.... First of all.. thanks for the fantastic mod. If I get it all sorted out it is going to be a HUGE help to me and my members.

I am not a coder, I am 100% hack... I try to add to my coding knowledge as I run into issues hacking..... I need a little bit of general information that should allow me to get this sorted out... if anyone is willing...

I have NUMEROUS additions and modifications to my board, so my postbit is huge, which is why I need this hack. The issue I am having, however, is that a large number of the mods use the template hook[postbit_userinfo_right_after_posts], so even if I move the entire hook to a tab, it is too much. That is not what I want to do though. I want to figure out where the code is in each mod that is picked up by the hook so that I can "release" it from the hook and manually configure it into my postbit. Of course, I am only assuming that this is even possible.

Is there any article already written, source or easy response to help me? I am willing to buy a book, research, read or whatever it takes... I just need pointed in the right direction.

Thanks to anyone who can point the general direction to the needle in my haystack.
What you can try to do is check each of your modifications plugins that use the postbit's template hook. The easiest way to do this is to go through your Plugin Manager and peruse each of your product's plugins. Look for the plugins that use the postbit_display_complete hook. Disable them one at a time, each time checking to see if something disappears from your forum's postbits. You've likely found the right plugin.

Now the next part is trickier. In some cases, the plugin calls a template to display it's information. So in those cases, you can turn the plugin off and look for the template it calls and copy and paste that template information into your postbit_legacy template instead. For instance, DownloadsII postbit information is controlled via the downloads_postbit_display_complete plugin. And all that plugin says is:

PHP Code:
global $vbulletin;
if (
$vbulletin->options['ecshowmemberinfo'])
{
 eval(
'$template_hook[postbit_userinfo_right_after_posts] .= " ' fetch_template('downloads_memberinfo_postbit') . '";');

Notice the fetch_template part calls a template called downloads_memberinfo_postbit. That's the template you can go into and copy and paste what's in there into your postbit_legacy, in turn turning this plugin off.

In other cases, the plugin might reference a PHP file, in which case you'd have to go to that file and search for the code to duplicate. Another case might have the postibit code worked right into the plugin itself. In all cases though, provided you can find the HTML code used, you can just disable that one plugin and post the HTML code wherever you want (and however you want it to look) in your postbit_legacy template, removing any extraneous code inherent to PHP, like escaped quotations \"
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01150 seconds
  • Memory Usage 1,785KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete