PDA

View Full Version : Mini Mods - Site Supporter button in postbit!


Bratz-Designs
05-24-2007, 10:00 PM
Hello all,

This small modification was requested here. It will ad a small button to your postbit template.

1. Upload the button.

Pick the button you want to use and rename it to "subscriber.gif" after that upload it to your 'Misc' folder.

2. Change templates Postbit_lecacy and Postbit.

Change the X in the code to the # of the subscribersgroup!

Find:
<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em> </div>
<!-- / edit note -->
</if>

After ad:
<!-- Subscriber button -->
<br /><if condition="is_member_of($bbuserinfo, X) "><img src="images/misc/subscriber.gif" border="0"></if>
<!-- / Subscriber button -->

Mark

SuperTaz
05-26-2007, 03:43 PM
reserved

Snatch
05-26-2007, 05:57 PM
I use this modification, but it dount show me the image.

If I use this code only "<img src="images/misc/subscriber.gif" border="0">" I see the Image. But when I put the complete Code I can not see the Image. all the same with all usergroup IDs that I have replased the X.

GreeTz
Snatch

ragtek
05-26-2007, 06:02 PM
you have to change in if condition="is_member_of($bbuserinfo, X) the x with the groupid!!!

Snatch
05-26-2007, 06:05 PM
you have to change in if condition="is_member_of($bbuserinfo, X) the x with the groupid!!!

Yes I know. I have change it to UID 18 <- that ist my Supporter uID.

Benutzergruppe: CM-Supporter (ID: 18)


But it dont show me the Image.

ragtek
05-26-2007, 06:12 PM
now your code is:
<!-- Subscriber button -->
<br /><if condition="is_member_of($bbuserinfo, 18) "><img src="images/misc/subscriber.gif" border="0"></if>
<!-- / Subscriber button --> ???

und auf was man hier achten sollte: dieser code f?gt zu einem jeden postbit eine datenbankabfrage hinzu!! also achte auf die performance;)

english:
this code addes to every postbit an query
so if you have 20 posts on a site there will be 20 extraquerys

Snatch
05-27-2007, 05:26 AM
Hallo,

nun habe ich den Fehler gefunden, wusste doch, dass ich alles richtig gemacht habe.
Die Grafik kann mit diesem Code nur v?n den Supportern selbst gesehen werden.
Ich m?chte jedoch, dass nur Supporter diese Grafik im Postbit haben, zu sehen sein soll sie aber dann f?r alle. Ich denke die Supporter wissen selbst das sie Supporter sind :)

Mein Englisch ist leider sehr schlecht.

now I have found the problem. With this code, only the supporter usergroup can see the image. But this ist not this what I whant. The supporter usergroup knows that they are supporters. I whant, that the Image only schon in a supporters Postbit but every usergroup can see the Image.

GreeTz
Snatch

ragtek
05-27-2007, 07:22 AM
lol

bbuserinfo are the data of the USER WHO IS VIEWING the site

the data of the postuser are saved in the $post-array!
$post[username], $post[statustitle], $post[userid]...
so you have to chack if $post[userid] is in the correct usergroup

pds
05-30-2007, 04:58 PM
Having a little trouble getting this working as well. I have the code in the postbit_legacy, and have changed the user group, but can not see the image.

I'll keep playing around and report back.

pds
05-30-2007, 05:33 PM
Verified I am having the same issue.

Only members of the specified usergroup can see the image. I was looking to have all users be able to see the image in a users postbit. The thought was that if you saw it in another users postbit, and you did not have it in yours, it may encourage paid subscriptions.

ragtek
05-30-2007, 05:51 PM
<a href="https://vborg.vbsupport.ru/showpost.php?p=1255395&postcount=8" target="_blank">https://vborg.vbsupport.ru/showp...95&postcount=8</a>

as i said
$bbuserinfo is the array of the user who is viewing the site
$post is the array with the postdata

DieselMinded
05-31-2007, 01:01 AM
Does This work ?

pds
05-31-2007, 01:12 AM
No yet, the variables seem to be messed up. I am not skilled enough to fix it.

DieselMinded
05-31-2007, 06:04 PM
Is there a similar mod that will work on 3.6.7

713JunctionP
06-01-2007, 04:01 AM
I RE-CREATED A WORKING VERSION OF THIS MOD.

Go here:
https://vborg.vbsupport.ru/showthread.php?t=148629

ragtek
06-01-2007, 08:41 AM
thats just that what i said
use $post instead of bbuserinfo...

but fine thats there now a hack :D