The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
HTML Code:
<plugin active="1" executionorder="5" product="test"> <title>Test One (2)</title> <hookname>postbit_display_complete</hookname> <phpcode><![CDATA[global $vbulletin; if ($vbulletin->options['test_enable_global']) { $template_hook[postbit_user_popup] = print "->123<-"; } else { $template_hook[postbit_user_popup] = print "->456<-"; } ]]></phpcode> </plugin> |
#12
|
||||
|
||||
Thanks, Dismounted!
This one helped. P.S. Saying the truth I was trying to do the same way, but it didn't help I think I have to get some rest. |
#13
|
||||
|
||||
You should have a '.=' not an '='. You are let others use the hook if your hack gets processed after.
|
#14
|
||||
|
||||
Quote:
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> |
#15
|
||||
|
||||
I released a hack based on this code:
Quote Post in PM https://vborg.vbsupport.ru/showthread.php?t=151163 https://vborg.vbsupport.ru/misc.php?...help&pid=qpipm |
#16
|
||||
|
||||
This problem raised again in 4.0.0 PL1 with new hook memberaction_dropdown_items
The bug is here -> http://www.vbulletin.com/forum/proje...?issueid=35014 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|