PDA

View Full Version : Usergroup Conditional PayPal Donate button


MyDroidWorld
09-10-2011, 10:59 PM
Im looking for a paypal donate button mod that can be used for certain usergroups and displayed in user postbit. I have searched a lot of places and have yet to find one. I tried converting one from 3.8.1 but could not get it to function properly. That could be in part do to my amateur coding abilities. I have posted the code below as an example if anyone thinks it could work.

This was originally taken from this mod - https://vborg.vbsupport.ru/showthread.php?t=205166&highlight=beer

<vb:if condition="is_member_of($vbulletin->userinfo, 6,12,21)">
<vb:if condition="$post['field8']"> <div class=?info?>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=<dd>{vb:raw post.field8}</dd>&item_name=Donate&amount=3%2e00&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Donate"><img alt="Please Donate" border="0" src="http://www.mydroidworld.com/forumimages/donate.png" border="0"/>
</div></vb:if>
</vb:if>

HMBeaty
09-11-2011, 12:59 AM
Try this: <vb:if condition="is_member_of($bbuserinfo, 6,12,21) AND $post['field8']">
<div class=”info”>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=<dd>{vb:raw post.field8}</dd>&item_name=Donate&amount=3%2e00&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Donate"><img alt="Please Donate" border="0" src="http://www.mydroidworld.com/forumimages/donate.png" border="0"/>
</div>
</vb:if>

MyDroidWorld
09-11-2011, 01:19 AM
Thanks! I really appreciate you taking the time to fix the code.

It kinda worked, its not visable to anyone but the selected usergroups and only takes me to the main paypal page. I have set a new userprofile that I thought I had coded correctly to pull from that profile but for some reason it is not. Maybe I need to start over from scratch... As dumb as it sounds Ive been working on this all day...lol

Edit: the more I think about it I may be going about this incorrectly. Can you let me know if Im on the right path or should I start over from scratch?