![]() |
hook $template_hook[postbit_user_popup] - problems
1 Attachment(s)
There is hook:
$template_hook[postbit_user_popup] Example 1: HTML Code:
<template name="test" templatetype="template" date="1182869201" username="Makc666" version="1.0.0"> HTML Code:
<template name="test" templatetype="template" date="1182869201" username="Makc666" version="1.0.0"> The difference between Example 1 and Example 2 is on line: eval('$template_hook[postbit_user_popup] = "' . fetch_template('test') . '";'); In Example 1 there is NO . (dot) near = In Example 2 there is . (dot) near .= If I use Example 1 then I replace $template_hook[postbit_user_popup] with my template and no one will not be able to use $template_hook[postbit_user_popup] once again in another product. You will say, use Example 2 with . (dot) near .= as for example in this article is advised: https://vborg.vbsupport.ru/showthread.php?t=147447 But if I use Example 2 I have some problem... Look on screenshot. I don't know what to do... P.S. I don't want manual template changes. |
What other modifications do you have that uses this template hook?
|
Quote:
Do you understand what is the nature of that problem? I understand, but I can't find a sollution fot it. May be I am using wrong hookname... <hookname>postbit_display_complete</hookname |
I know what you mean, but since you have no mods, what's the problem with just assigning it? Anyway, try this:
HTML Code:
<template name="test" templatetype="template" date="1182869201" username="Makc666" version="1.0.0"> |
Quote:
I am making a product and don't want to assign it. I am realy wondering it that hook will real work there? Quote:
Yes it will display only one line of mine. But it will display in every post the line which belongs to the first post. Also it will not work on pages like this one: https://vborg.vbsupport.ru/showpost....78&postcount=4 I understand that I have to make some checkup but I can't "cook up" one and also I don't want to right a SQL query for that think up. |
Quote:
PHP Code:
|
1 Attachment(s)
Quote:
The answer for "old" post: I have replaced text: Test Phrase with text: Test Phrase - PostID $post[postid] - Postcount $post[postcount] in my first post: https://vborg.vbsupport.ru/showthread.php?t=150769 And I reuploaded the screenshot also. So you will understand now clearly :D But!!! Here is the answer for "new" post: I added a line you said me to my code and now it looks like: HTML Code:
<plugin active="1" executionorder="5"> P.S. Realy I had a thought to destroy the specified variable but... :eek: Thanks, Dismounted! I am very happy I now know this little tip now! :) P.S.S. Oh... I remade the code 100% the way you said... HTML Code:
<plugin active="1" executionorder="1"> Because both variants work there :) |
Cool!
Mike Sullivan just answer me on www.vbulletin.com that this one is connected with BUG introduced in 3.6.7: http://www.vbulletin.com/forum/showt...64#post1379664 Quote:
|
HTML Code:
<plugin active="1" executionorder="1"> |
Once again Thanks, Dismounted.
As I said that problem is connected with BUG: http://www.vbulletin.com/forum/proje...?issueid=22069 Now I meet with another strange problem. I added a check in my code: HTML Code:
<plugin active="1" executionorder="5" product="test"> As I see value $vbulletin->options['test_enable_global'] is not return to plugin. I attached test.xml which is a simle test product with that code. ->123<- or ->456<- are printed on forum/showthread.php page on the top. Moved attachment here: https://vborg.vbsupport.ru/showpost....4&postcount=14 Maybe you can help me with this one. As I realy don't understand if this one connected with that BUG: issueid=22069 |
HTML Code:
<plugin active="1" executionorder="5" product="test"> |
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. |
You should have a '.=' not an '='. You are let others use the hook if your hack gets processed after.
|
1 Attachment(s)
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"?> |
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 |
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 |
All times are GMT. The time now is 08:06 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|