Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
Prev Previous Post   Next Post Next
  #14  
Old 07-02-2007, 06:03 AM
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Location: MSK-RU
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Abe1 View Post
You should have a '.=' not an '='. You are let others use the hook if your hack gets processed after.
Yes. Thanks Abe1 for the note.

Realy, the code must have '.='

I attached a product Test Popup Menu in Postbit (test_postbit.xml) for anyone who want to check this one.

HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="test_postbit" active="1">
<title>Test Popup Menu in Postbit</title>
<description>A simple test product using hook $template_hook[postbit_user_popup] in popup menu of postbit and postbit_legacy template</description>
<version>1.0.0</version>

<templates>
		<template name="test_postbit1" templatetype="template" date="1182869201" username="Makc666" version="1.0.0"><![CDATA[
	<tr><td class="vbmenu_option">
	->123<- | UserName - $post[username] | Post ID - $post[postid]
	</td></tr>
	]]></template>
		<template name="test_postbit2" templatetype="template" date="1182869202" username="Makc666" version="1.0.0"><![CDATA[
	<tr><td class="vbmenu_option">
	->456<- | UserName - $post[username] | Post ID - $post[postid]
	</td></tr>
	]]></template>
</templates>

<plugins>

	<plugin active="1" executionorder="1" product="test_postbit">
			<title>Test Postbit One (1)</title>
			<hookname>postbit_display_start</hookname>
			<phpcode><![CDATA[
			unset($template_hook['postbit_user_popup']);
]]></phpcode>
	</plugin>
	
	<plugin active="1" executionorder="5" product="test_postbit">
			<title>Test Postbit One (2)</title>
			<hookname>postbit_display_complete</hookname>
			<phpcode><![CDATA[
	global $vbulletin;

	if ($vbulletin->options['test_postbit_enable_global'])
	{
		eval('$template_hook[postbit_user_popup] .= "' . fetch_template('test_postbit1') . '";');
	}
	else
	{
		eval('$template_hook[postbit_user_popup] .= "' . fetch_template('test_postbit2') . '";');
	}
]]></phpcode>
	</plugin>	

</plugins>

<phrases>
	<phrasetype name="vBulletin Settings" fieldname="vbsettings">
		<phrase name="settinggroup_test_postbit"><![CDATA[Test Postbit One]]></phrase>
		<phrase name="setting_test_postbit_enable_global_title"><![CDATA[Enable Whole Hack]]></phrase>
		<phrase name="setting_test_postbit_enable_global_desc"><![CDATA[If you want to disable, just set "No".]]></phrase>
	</phrasetype>
</phrases>

<options>
	<settinggroup name="test_postbit" displayorder="601">
		<setting varname="test_postbit_enable_global" displayorder="5">
			<datatype>free</datatype>
			<optioncode>yesno</optioncode>
			<defaultvalue>1</defaultvalue>
		</setting>
	</settinggroup>
</options>

</product>
Attached Images
File Type: png test_postbit.png (50.1 KB, 0 views)
Attached Files
File Type: xml test_postbit.xml (2.3 KB, 8 views)
Reply With Quote
 

Thread Tools
Display Modes

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 08:26 AM.


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.10212 seconds
  • Memory Usage 2,814KB
  • Queries Executed 13 (?)
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
  • (10)bbcode_html
  • (2)bbcode_php
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (16)postbit
  • (4)postbit_attachment
  • (16)postbit_onlinestatus
  • (16)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete