PDA

View Full Version : How do I get postbit plugins to work in PMs?


Claygp
05-30-2006, 06:58 AM
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):

$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:

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