Adding PayPal.me Link to User postbit
This is my first modification I have decided to publish - I am not really great at the programatic functionality of vB. But this was something request and thought it would be a good add for my site.
Adding a PayPal.me Link and the ability to indicate if a member has a verified PayPal Account. The steps are fairly straight forward, but does require some template and profile hacks as well as image uploads. 1) Download the images and upload them to your forums images/misc directory EDIT - I can't get the zip to upload, here are the images I used - upload these to your images/misc directory 1 - Paypal.me - 2 - PayPal Verified - 2) Need to add 2 Profile Fields (Admincp->User Profile Fields->Add New User Profile Field) Note - I added a Profile Group Called PayPal Field 1 - Single Line Text Name - PayPal.me username (Note: The user will need to go to paypal.me and create a personalized link ie: paypal.me/username ) Description - If you want to build a PayPal.me Link, go to paypal.me and create your personal link. Only enter the username you select. Field Required - No Editable - Yes Private, Searchable, Show on Memberlist - No Rest leave as default (unless you wish to set this) Field 2 - Single Selection Menu Name - PayPal Verified? Description - Code:
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_show-limits&req_from=view_limits" target="_blank">Go to PayPal to check your Validation Status</a> Editable - Yes Private, Searchable, Show on Memberlist - No Rest leave as default (unless you wish to set this) Make sure that you jot down the field ID numbers! 3) Now go to Styles & templates->Style Manager->Edit Template of the Style you wish to change Find the postbit or postbit_legacy template (depends which one you are using for your forum) - Doubleclick to Edit Note - I used postbit_legacy but this should be the same for postbit Find the following Code:
<dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd> Code:
<!-- Paypal --> <br /> <div align="Left"> <vb:if condition="$post['fieldXX']"><a href="https://paypal.me/{vb:raw post.fieldXX}" target="_blank"><img src="images/misc/paypalme.jpg" alt="Send PayPal to {vb:raw post.fieldXX}" border="" /></a></vb:if> <vb:if condition="$post['fieldXX']"><img src="images/misc/paypalv.png" alt="Member is PayPal Verified" border="" /></vb:if> </div> <br /> <!--Paypal--> Note - Make sure you replace the XX's in the fieldXX with your fieldid from the Profile Field setup 4) Test! Profile Fields Added Postbit once Profile Information is added 5) Alert your members Notes - 1st release on 17 Feb 2018 Correction (18 Feb 2018) - Fixing missing Anchor close Updated Images - If you want a vector png file, please see post 5 - Spoiler (click to open)
Great addition!
Had to make a new paypal.me for a site, its a png for transparency as it that site has multiple styles, if anyone uses it, fix the path in the profile field. Close
Download No files for download. Supporters / CoAuthors
|