vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I get postbit plugins to work in PMs? (https://vborg.vbsupport.ru/showthread.php?t=117109)

Claygp 05-30-2006 06:58 AM

How do I get postbit plugins to work in PMs?
 
I created a custom plugin in postbit_display_start that checks to see if a user has custom comments. If the comment count is 0, in the postbit template, I use an if statement to NOT show it. This works perfect.

BUT - the comments are showing in the postbit header when reading PMs. So .. it appears that PMs are using the same template .. but the plugin is not working, or the conditional statement is not working or something.

I'm sure I'm not the first person to have this problem, but I can't find a solution via search.

I tried creating the same plugin on the hook: private_showpm_start .. but I'm not having any luck .. just errors.

Can anyone point me in the right direction?

Boofo 05-30-2006 09:04 AM

Post the code you are using here and we can better tell what you are trying to accomplish.

Claygp 05-30-2006 05:48 PM

Well .. I wasn't really asking for help with code .. I'm asking how to get postbit plugins to work in PMs. Is there a hook location i'm not seeing here? Whats the trick?

Anyways .. if you really want to see the plugin code .. here's one of them (in postbit_display_start - works perfectly in the forums, but NOT in PMs):

Code:

$collections_query = "select count('x') collectionscount from collections where user_id = $post[userid]";

$collections_result = $this->registry->db->query_read($collections_query);

$collections_row = $this->registry->db->fetch_array($collections_result);

$collections = $collections_row[collectionscount];

.. and in the postbit template:

Code:

<if condition="($collections > 0)"><a href="/collections.php?user=$post[userid]"><img src="/gfx/mycollection.gif" width="78" height="16" border="0"></a></if>
.. in PMs .. the image is showing up for EVERYONE.

Claygp 06-02-2006 03:40 AM

anyone?


All times are GMT. The time now is 02:13 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
  • Page Generation 0.01079 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete