vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Usergroup Conditional PayPal Donate button (https://vborg.vbsupport.ru/showthread.php?t=270047)

MyDroidWorld 09-10-2011 10:59 PM

Usergroup Conditional PayPal Donate button
 
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/showthrea...highlight=beer

Code:

<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:
HTML Code:

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


All times are GMT. The time now is 09:13 AM.

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.01695 seconds
  • Memory Usage 1,720KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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