Total Members: 3824
Latest: Raghu
Total Posts: 12115
Total Topics: 2212
Online Today: 129
Online Ever: 399(March 21, 2008, 10:16:14 pm) Users: 0 Guests: 132 Total: 132 |
'Buy Me A Beer' Mod
Author: Karl Benson Submitted by: karlbenson Author Website:http://www.youposted.com Date Submitted: 2007-08-08 Last Updated: 2007-08-08 Supported Version: 1.1.3, 1.1.2, 1.1.1 Short Description Allows users to reward other users for their posts by buying them a beer (via paypal) Downloads:
Detailed Description: BUY ME A BEER v1.1 By Karl Benson Link to Mod | Comment On This Mod Introduction Allows users to reward other users for their posts by buying them a beer (or at least donating enough money via Paypal to buy one). Warning! This mod is an initial release. Please report any bugs you find, no matter how trivial. Remember to backup your database AND files before installing any modifications, especially initial releases and betas Installation Simply install the package to install this modification on the Default theme. Manual edits will be required for themes which have a custom profile (1x edit) and/or custom display template (1x edit) AND you will need to place a copy of the image buymeabeer.gif in the image folder of each of your themes (Themes/{themename}/images/) Open Themes/{themename}/Profile.template.php, and FIND: Code: // All the messenger type contact info. ADD BEFORE: Code: // Paypal Address For 'Buy Me A Beer Mod echo ' <tr> <td width="40%"><b>', $txt['buymeabeer'], ': </b><div class="smalltext">', $txt['buymeabeer_desc'], '</div></td> <td><input type="text" name="buymeabeer" size="24" value="', $context['member']['buymeabeer']['name'], '" /></td> </tr><tr> <td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td> </tr> '; Open Themes/{themename}/Display.template.php, and FIND: Code: // Show online and offline buttons? if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) ADD BEFORE: Code: // SHOW BUY ME A BEER if (!$message['member']['is_guest'] && $context['user']['is_logged'] && !empty($message['member']['buymeabeer'])) { $priceofbeer = 5 ; // In US Dollars no cents echo'<br/> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=' , htmlentities ($message['member']['buymeabeer'], ENT_NOQUOTES, "UTF-8") , '&item_name=' , htmlentities ($txt['pleasebuymeabeer'], ENT_NOQUOTES, "UTF-8") , '&amount=', $priceofbeer ,'%2e00&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" rel="nofollow" title="', $txt['buymeabeeralt'] ,'"><img alt="', $txt['buymeabeeralt'] ,'" border="0" src="', $settings['images_url'] , '/buymeabeer.gif" border="0"/></a><br/>'; } If you are still having trouble, I recommend the Modification Parser/ by Daniel 15 How Do I Use This Mod? An additional option is added to the users profile to enter their paypal address. Where the user has entered their paypal address, a 'beer glass' icon appear in the poster information area of users posts. The alt text when hovering over the icon states 'Buy Me A Beer Through Paypal' [must be logged in to see] and when clicked takes the user to the paypal page. Screenshots On the profile area ![]() In the poster information area of posts ![]() Customisation $5 for a beer? Seems reasonable, but if you want to change it you can do so easily by editing the Display.template.php and FIND the line below and REPLACE the 5 with another digit (must be a whole number, no decimals). Code: $priceofbeer = 5 ; // In US Dollars no cents Support Please use the modification thread for support with this modification. (Please don't ask me to do the edits for you) Changelog 1.0 BETA o Initial release made per SMF user request. 1.1 o Ensured it removes the buymeabeer.gif image on uninstall (as per SMF Modification Guidelines) o Wrote out the manual edits o Improved the readme/documentation for this mod Bookmarks: BlinkList del.icio.us Digg it Furl ma.gnolia Netvouz RawSugar Shadows Simpy Spurl Yahoo MyWeb Latest Ratings: [Add Rating] | |||||||