The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Lizard Lounge (http://www.thevbgeek.com/forumdisplay.php?f=39)
-   -   Postbit tweak (http://www.thevbgeek.com/showthread.php?t=2866)

Tigratrus 02-18-2007 01:37 AM

Postbit tweak
 
Anyone know a script that can handle the postbit icons in a fashion similar to the product Icons here? We're looking to setup a system where we can give people "Supporter badges" for a given year when they donate to the site and have them show up in the postbit. Looking at the way GM seems to work here by promoting purchasers into special user groups gave me the basic idea.

I've dug around over on .org and found a couple sorta/kinda matches like YAAS, but they all seem to be either overkill or incompatible with 3.6.4.

Any ideas? Thanks in advance for any suggestion...

James and Susan

The Geek 02-18-2007 05:23 PM

All I do here is create a usergroup affiliated with the product, then in the postbit, do a simple <if condition="is_member_of(usergroupid, $bbuserinfo)">image here</if>

Its not perfect, but it does the trick :)

Tigratrus 02-18-2007 07:21 PM

That's pretty much what we're looking at...
 
Quote:

<if condition="is_member_of(usergroupid, $bbuserinfo)">image here</if>
I've been playing around with postbit layout a *cough* bit *cough* recently for another reason and I think I'm going to do something similar. I'm with you on everything in that statement with the exception of the $bbuserinfo parameter... Can you clarify that at all?

Thanks for the info! So many little "bits" to get a handle on;).

James and Susan

The Geek 02-19-2007 05:13 PM

Its just a parameter the function expects. However that actually is the userinfo for WHO is reading the post - I forgot I had to write a plugin for it.

Here is is:

Title: Thing
location: postbit_display_start
code:
PHP Code:

$secondary_icons "";
if (
$post['membergroupids'])
{
$ugs explode(",",$post['membergroupids']);
if (
is_array($ugs))
{
 if (
in_array(10$ugs))
    {
  
$secondary_icons.='<img src="gars_tiny.gif" width="20" height="20" border="0" title="Geek Article and Review System License Holder" />&nbsp;';
    }
 if (
in_array(9$ugs))
    {
  
$secondary_icons.='<img src="gmart_tiny.gif" width="20" height="20" border="0" title="GeekMart License Holder" />&nbsp;';
    }
 if (
in_array(11$ugs))
    {
  
$secondary_icons.='<img src="gal_tiny.gif" width="20" height="20" border="0" title="Geek Auto-Linker Pro License Holder" />&nbsp;';
    }
 if (
in_array(14$ugs))
    {
  
$secondary_icons.='<img src="gars_tiny.gif" width="20" height="20" border="0" title="Geek Advertising Banner License Holder" />&nbsp;';
    }
}


Not the cleanest code - but it works ;)

Tigratrus 02-22-2007 03:33 PM

Oops... Forgot to reply!
 
Just realized that I never said thank you!

I really appreciate your willingness to help with such a tangential issue ;). So

*ahem*

THANKS!

This'll help out as we implement phase 1 of our supporter recognition system...

James and Susan

Tigratrus 04-17-2007 02:53 AM

One more question?
 
Now that I've got our testbed up, I'm actually implementing the first stage of our member recognition system. So I'm pretty sure I follow the plugin you listed, and that doesn't match up with the:

<if condition="is_member_of(usergroupid, $bbuserinfo)">image here</if>
So what do you add in the postbit? Just $secondary_icons wherever you want the icons dropped in?

James and Susan

The Geek 04-17-2007 07:31 AM

$secondary_icons are already there :)


All times are GMT. The time now is 02:42 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.