Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 27 Jun 2007, 10:16
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Real name: Maxim
hook $template_hook[postbit_user_popup] - problems

There is hook:
$template_hook[postbit_user_popup]

Example 1:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Example 2:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


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:
http://www.vbulletin.org/forum/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.
Attached Images
File Type: png postbit_user_popup_new.png (41.2 KB, 63 views)
__________________
...... ...... "А стукачков мы не любим!"

Last edited by Makc666; 27 Jun 2007 at 13:16.
Reply With Quote
  #2  
Old 27 Jun 2007, 10:27
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
What other modifications do you have that uses this template hook?
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #3  
Old 27 Jun 2007, 10:38
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Real name: Maxim
Originally Posted by Dismounted View Post
What other modifications do you have that uses this template hook?
There is any other modifications there... It is a clean board.

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
__________________
...... ...... "А стукачков мы не любим!"
Reply With Quote
  #4  
Old 27 Jun 2007, 10:54
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
I know what you mean, but since you have no mods, what's the problem with just assigning it? Anyway, try this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #5  
Old 27 Jun 2007, 11:19
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Real name: Maxim
Originally Posted by Dismounted View Post
I know what you mean, but since you have no mods, what's the problem with just assigning it?
I have no mods because this is a test forum Just for test.
I am making a product and don't want to assign it.

I am realy wondering it that hook will real work there?

Originally Posted by Dismounted View Post
Anyway, try this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
No, this one didn't help.
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:
http://www.vbulletin.org/forum/showp...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.
__________________
...... ...... "А стукачков мы не любим!"

Last edited by Makc666; 27 Jun 2007 at 11:27.
Reply With Quote
  #6  
Old 27 Jun 2007, 13:01
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Originally Posted by Makc666 View Post
No, this one didn't help.
Yes it will display only one line of mine.
But it will display in every post the line which belongs to the first post.
Hmm. Use your one, but add a plugin at postbit_display_start with this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Make sure the execution order is 1.
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #7  
Old 27 Jun 2007, 13:36
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Real name: Maxim
Originally Posted by Dismounted View Post
Hmm. Use your one, but add a plugin at postbit_display_start with this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Make sure the execution order is 1.
Dismounted, you edited your post while I was writing an answer for you

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:
http://www.vbulletin.org/forum/showthread.php?t=150769

And I reuploaded the screenshot also.
So you will understand now clearly

But!!!

Here is the answer for "new" post:

I added a line you said me to my code and now it looks like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And it is working now

P.S. Realy I had a thought to destroy the specified variable but...

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...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Am I right to your words?
Because both variants work there
Attached Images
File Type: png postbit_user_popup_02_fixed_w.png (45.1 KB, 18 views)
__________________
...... ...... "А стукачков мы не любим!"

Last edited by Makc666; 27 Jun 2007 at 13:42.
Reply With Quote
  #8  
Old 27 Jun 2007, 14:38
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Real name: Maxim
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

Originally Posted by Mike Sullivan
__________________
...... ...... "А стукачков мы не любим!"
Reply With Quote
  #9  
Old 28 Jun 2007, 07:56
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

First one should be at postbit_display_start as other mods may assign them at the first hook.
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #10  
Old 28 Jun 2007, 10:45
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Real name: Maxim
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But it (check) doesn't want to work!
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:
http://www.vbulletin.org/forum/showp...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
__________________
...... ...... "А стукачков мы не любим!"

Last edited by Makc666; 02 Jul 2007 at 08:04.
Reply With Quote
  #11  
Old 29 Jun 2007, 07:16
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #12  
Old 29 Jun 2007, 14:32
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Real name: Maxim
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.
__________________
...... ...... "А стукачков мы не любим!"
Reply With Quote
  #13  
Old 01 Jul 2007, 15:14
Abe1's Avatar
Abe1 Abe1 is offline
 
Join Date: Feb 2004
Real name: Abe
You should have a '.=' not an '='. You are let others use the hook if your hack gets processed after.
__________________
MY HACKS -

Active Link Security 3.0.X | Add Title to Rank Images 3.5.X | Admin Log In As User 3.5.X 3.6.X | Advanced BBCode Permissions 3.5.X 3.6.X | Can't See Attachments Before Thanking a Post 3.5.X | Can't Thank and Groan the Same Post 3.5.X | Delete Post when Giving Infraction 3.6.X | Edit New Thread Button 3.5.X | External Data Provider Usergroup Permissions Setting 3.5.X | Forms Hack 3.5.X, 3.6.X | Log Logins Hack 3.5.X 3.6.X | Moderator Statistics 3.5.X | Post Award Hack 3.0.X 3.5.X | [AJAX] Post Thank You Hack 3.0.X 3.5.X 3.6.X | [AJAX] Post Groan Hack 3.5.X 3.6.X | Post Thank You Hack Stats for vBadvanced CMPS 2.x 3.5.X | Search Title only in search drop-down 3.5.X, 3.6.X | 'vBMenu' DHTML User Option 3.5.X 3.6.X | vBShout on all pages! 3.5.X
Reply With Quote
  #14  
Old 02 Jul 2007, 08:03
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Real name: Maxim
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.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Attached Images
File Type: png test_postbit.png (50.1 KB, 11 views)
Attached Files
File Type: xml test_postbit.xml (2.3 KB, 7 views)
__________________
...... ...... "А стукачков мы не любим!"
Reply With Quote
  #15  
Old 02 Jul 2007, 12:34
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Real name: Maxim
I released a hack based on this code:
Quote Post in PM
http://www.vbulletin.org/forum/showthread.php?t=151163
http://www.vbulletin.org/forum/misc....help&pid=qpipm
__________________
...... ...... "А стукачков мы не любим!"
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 11:14.

Layout Options | Width: Wide Color: