The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
PayPal Donations For vBulletin 3.5.0 Details »» | ||||||||||||||||||||||||||
Sorry Guys...I have disappeared from vB coding completely for the time being...RL is paying me $35/hour to ignore it lol. Hope you understand why I haven't been around... Paypal Donations For vBulletin 3.5 Version 2.02b Hack Provided and coded by )O( Cloudrunner )O( of The Noble Pagan. Release version: 2.02b Release Date: 03 July 2005 Change Log Paypal Donations 2.02
Special Thanks Special Thanks goes to the following people, without their support, this would never have happened: dsboyce8624 guvner SLeeeper And all of the Alpha Testers that helped out with this Hack! I couldn't have done it without you all, Thank you! )O( Cloudrunner )O( What Paypal Donations Is: Paypal Donations is a complete system that controls donations and how they are received via backend interfacing between your vBulletin server and Paypal's payment gateway server. The beauty of this marriage of servers is quite simply automation of the donation process as well as security of the transactions for both you, the administrator, and your users. With the Paypal donations system installed on your forums, you will be able to bring in that much needed income to not only keep your forums alive, but also to help defer costs of doing so to the users of your site without having to bug everyone and beg for money.This seamless integration of Paypal as your backend payment processor not only provides your user with a well known and safe payment processor, but you are saved the hassle of opening a merchant account with your banking institution as well as saves you time in the process as it takes only a few short minutes to sign up with Paypal if you are not already an account holder there. System Requirements OS: vBulletin 3.5 (if you are running this already, then your server has the required installation, GD libraries are required, as well as CURL capabilities for this system to work) Things To Do Before Installation Direct File Edits To vB Resident Files: 1 (needed to group templates in AdminCP)File Uploads: 34 (Of which 18 will be deleted after installation, leaving a total of 16 Files on your server) Direct Database Queries: None, the installer does these for you Direct Plugin Installation: None, the installer does these for you Direct Template Modification: None, the installer installs all new templates, and modifies the resident templates as needed The uninstaller will remove all modifications (to include the templates) should you decide to remove the system from your server. How To Install / Upgrade Paypal Donations Installation and Upgrading are as easy as a human like me could make it. Simply upload all the files from the archive to your server keeping the folder hierarchy intact and then point your browser to the installation file. On most servers it will be one of the following:
If you ever decide to remove the system, just upload the install files and folder again and run the installer and choose uninstall. The uninstaller will remove any and all modifications that it did to your files, database, and templates automatically as well. Its as easy as you can get! Time to install: less than five minutes depending on your upload speed. Steps To Perform After Installation
License Quote:
Final words You will need to add a link somewhere in your navigation system for vBulletin pointing your users to the donations page (if you installed the vBadvanced Module then you have a link on the home page, but you might want to add one in the nav bar as well), as well as setting up your paypal account to give IPN responses to you, you can do this in your Paypal Profile under Instant Payment Notification. To play in PayPal's Sandbox you will need to be registered with their developer network and setup a few sandbox accounts to play with the sandbox properly. I have throughly tested the sandbox functionality, and it is working until they decide to change coding standards again. I sincerely hope that you enjoy this hack, Please feel free to send feedback to tnp@noblepagan.com ! Thank you!)O( Cloudrunner )O( P.s. Should you feel the need to donate to me in thanks, I will not stop you , in fact I will say thank you and that your support is greatly appreciated. If you do donate to me for this hack, I will give the recognition here as well as on The Noble Pagan. You can find my donations page here (also works as a demo site should you feel the need to check it out): The Noble Pagan Donation Page Supporters / CoAuthors Show Your Support
|
Comments |
#302
|
|||
|
|||
how configurable is the donations goals/history page when viewed..
ie..can you specify what information is given to users regarding donation totals..etc |
#303
|
|||
|
|||
Sorry I may have missed this along the way and it may be very easy to do. I was wanting to change the text in the Donations Goals, Your Donations are appreciated and A Special Thank You sections? Is there a way to do this. Also is it possible to have a donate butoon with a £ in instead of a $?
Cheers |
#304
|
|||
|
|||
Is this functional with 3.5 gold? I have 3.5 gold and installed, and everything looks okay in the admincp, but when I go to the forum index and main page, there are no paypal links and nothing in the navbar. Thanks. Sounds like a great hack. I hope it's just a mistake I made during installation.
|
#305
|
|||
|
|||
I don't get it. I installed this with no errors, but now what? Nothing appears in vbadvanced or anywhere else. Going to donate.php simply has a Your donations will be used... message, but no link or button for anyone to actually *make* a donation.
|
#306
|
||||
|
||||
Quote:
|
#307
|
||||
|
||||
Quote:
http://www.christianboards.org/donate.php The donations need to be created in admincp - under Paypal Donations - Add A New Goal Add A New Donation Button Add A New Donor |
#308
|
|||
|
|||
Would someone be able to make a small modification so that the "top donors" table starts at the top left and all the other tables are on the right?
Reason is, that if I have more than 2 "top donors" it displays below everything else. Here is the donate.php code: Code:
<? /*======================================================================*\ || #################################################################### || || # Paypal Donations for vBulletin 3.5 - Version 2.00 # || || # ---------------------------------------------------------------- # || || # Copyright ?2005 The Noble Pagan, Inc. All Rights Reserved. # || || # This file may not be redistributed in whole or significant part. # || || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || # ---------------------------------------------------------------- # || || #################################################################### || \*======================================================================*/ // ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'donations'); // ################### PRE-CACHE TEMPLATES AND DATA ###################### // get special phrase groups $phrasegroups = array( 'ppdonations' ); // get special data templates from the datastore $specialtemplates = array(); // pre-cache templates used by all actions $globaltemplates = array( 'DONATIONS', 'donations_bits', 'donations_top_donor_bits', 'donations_goal_bits', 'donations_inactive', 'donations_cancelled', 'donations_complete' ); // pre-cache templates used by specific actions $actiontemplates = array(); // ######################### REQUIRE BACK-END ############################ require_once('./global.php'); // ####################################################################### // ######################## START MAIN SCRIPT ############################ // ####################################################################### if (empty($_REQUEST['do'])){ $_REQUEST['do'] = 'start'; } // ###### Do tests and perform script ###### if ($_REQUEST['do'] == 'start'){ if($vbulletin->options['donationsactive'] == '1'){ // ###### Show Donation Options ###### $i = 1; $ip_address = $_SERVER['REMOTE_ADDR']; $query = $vbulletin->db->query_read("SELECT button.*, goal.title AS goal_title FROM ".TABLE_PREFIX."donation_buttons AS button LEFT JOIN ".TABLE_PREFIX."donation_goals AS goal ON(goal.id = button.goalid) WHERE button.active = '1'"); $num = $vbulletin->db->num_rows($query); while ($row = $vbulletin->db->fetch_array($query)){ // ###### Check Currency Costs ###### if ($vbulletin->options['showcurrencyselector'] == '1'){ $currency = $vbulletin->db->query_first("SELECT * FROM ".TABLE_PREFIX."donation_currency_exchange"); $amount = array(); foreach ($currency AS $key => $value){ $amount[$key] = number_format(round($row['amount'] * $value, 2), 2); $amount['JPY'] = round($row['amount'] * $value, 0); } } $description = stripslashes($row['description']); if ($i < $num){ $end = "</tr><tr align=\"center\">"; $i++; } else { $end = ''; unset($i, $num); } eval('$donationbits .= "' . fetch_template('donations_bits') . '";'); } if ($vbulletin->options['showdonors'] == '1'){ // ###### Show Top/Last Donors ###### if ($vbulletin->options['toporlast'] == '1'){ $query = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."donation_donors WHERE userid != '0' ORDER BY total DESC LIMIT 0,".$vbulletin->options['topdonornumber']); } else { $query = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."donation_donors WHERE userid != '0' ORDER BY id DESC LIMIT 0,".$vbulletin->options['topdonornumber']); } $num = $vbulletin->db->num_rows($query); $i = 1; while ($row = $vbulletin->db->fetch_array($query)){ $avatar_row = $vbulletin->db->query_first("SELECT user.showdonor, user.username, user.avatarid, user.avatarrevision, avatar.avatarpath, NOT ISNULL(customavatar.filedata) AS hascustomavatar, customavatar.dateline AS avatardateline FROM ".TABLE_PREFIX."user AS user LEFT JOIN ".TABLE_PREFIX."avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN ".TABLE_PREFIX."customavatar AS customavatar ON(customavatar.userid = user.userid) WHERE user.userid = '".$row['userid']."'"); if ($avatar_row['avatarid']){ $avatarurl = $avatar_row['avatarpath']; } else { if ($avatar_row['hascustomavatar']){ if ($vbulletin->options['usefileavatar']){ $avatarurl = $vbulletin->options['avatarurl']."/avatar".$row['userid']."_".$avatar_row['avatarrevision'].".gif"; } else { $avatarurl = "image.php?".$session['sessionurl']."u=".$row['userid']."&dateline=".$avatar_row['avatardateline']; } } else { $avatarurl = ''; } } $userid = $row['userid']; $avatar = '<img src="'.$avatarurl.'" border="0">'; $username = stripslashes($avatar_row['username']); $show_as_donor = $avatar_row['showdonor']; $total = number_format($row['total'], 2, '.', ','); if ($i < $num){ $end = "</tr><tr align=\"center\">"; $i++; } else { $end = ''; unset($i, $num); } eval('$topdonorbits .= "' . fetch_template('donations_top_donor_bits') . '";'); } } if($vbulletin->options['showgoals'] == '1'){ // ###### Show Goals ###### if ($vbulletin->options['showtotalcollected'] == '1'){ // ###### Show Total Contributed To Date ###### $query = $vbulletin->db->query_read("SELECT mc_gross, mc_fee FROM ".TABLE_PREFIX."donation_paypalipn WHERE valid = '1' AND test_ipn = '".$vbulletin->options['ipn_test']."' AND payment_status = 'Completed'"); while ($row = $vbulletin->db->fetch_array($query)){ $mc_net = $row['mc_gross'] - $row['mc_fee']; $mc_total = $mc_net + $mc_total; } } $query = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."donation_goals WHERE active = '1'"); $num = $vbulletin->db->num_rows($query); $i = 1; while ($row = $vbulletin->db->fetch_array($query)){ $title = stripslashes($row['title']); $description = stripslashes(nl2br($row['description'])); $amount = number_format($row['amount'], 2, '.', ','); $total_donated = number_format($row['total_donated'], 2, '.', ','); if ($row['amount'] > 0){ $percentage = round(($row['total_donated']/$row['amount'])*100, 2); } else { $percentage = '0'; } if ($i < $num){ $end = "</tr><tr align=\"center\">"; $i++; } else { $end = ''; unset($i, $num); } eval('$donationgoalbits .= "' . fetch_template('donations_goal_bits') . '";'); } } // ###### Draw navbar ###### $pagetitle = $vbulletin->options['bbtitle'].' Donations'; $navbits = array( "donate.php?$session[sessionurl]" => 'Donations', '' => $pagetitle ); $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); // ###### Output page ###### eval('print_output("' . fetch_template('DONATIONS') . '");'); } else { // ###### Draw navbar ###### $pagetitle = $vbulletin->options['bbtitle'].' Donations'; $navbits = array( "donate.php?$session[sessionurl]" => 'Donations', '' => $pagetitle ); $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); // ###### Output page ###### eval('print_output("' . fetch_template('donations_inactive') . '");'); } } elseif ($_REQUEST['do'] == 'thankyou'){ // ###### User completed donation, THANK THEM! ###### $vbulletin->input->clean_gpc('p', 'mc_gross', TYPE_NOCLEAN); $total = '$'.number_format($vbulletin->GPC['mc_gross'], 2, '.', ','); // ###### Draw navbar ###### $pagetitle = $vbulletin->options['bbtitle'].' Donation Complete, THANK YOU!'; $navbits = array( "donate.php?$session[sessionurl]" => ' Donation Complete, THANK YOU!', '' => $pagetitle ); $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); // ###### Output page ###### eval('print_output("' . fetch_template('donations_complete') . '");'); } elseif ($_REQUEST['do'] == 'canceled'){ if ($_REQUEST['feedback'] == '1'){ // ###### Do Feedback Send ###### $vbulletin->input->clean_array_gpc('p', array( 'subject' => TYPE_STR, 'message' => TYPE_STR) ); $subject = $vbulletin->GPC['subject']; $message = $vbulletin->GPC['message']; vbmail($vbulletin->options['webmasteremail'], $subject, $message); // ###### Draw navbar ###### $pagetitle = $vbulletin->options['bbtitle'].' Donation Cancelled, Feedback Sent'; $navbits = array( "donate.php?$session[sessionurl]" => 'Donation Cancelled, Feedback Sent', '' => $pagetitle ); $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); // ###### Output page ###### eval('print_output("' . fetch_template('donations_cancelled_feedback_sent') . '");'); } else { // ###### Do Donate Cancel ###### // ###### Draw navbar ###### $pagetitle = $vbulletin->options['bbtitle'].' Donation Cancelled'; $navbits = array( "donate.php?$session[sessionurl]" => 'Donation Cancelled', '' => $pagetitle ); $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); // ###### Output page ###### eval('print_output("' . fetch_template('donations_cancelled') . '");'); } } /*======================================================================*\ || #################################################################### || || # donate -- Fileversion 2.01 # || || # Date Version Finalized -- 03 July 2005 # || || #################################################################### || \*======================================================================*/ ?> |
#309
|
|||
|
|||
Everything seems to be working fine apart from the Donations section not show down the left in the ACP with all the other drop down menus. I can type the destination to the donate page which seems fine but need to edit it. I have tried and tried to install and uninstall then re install but to no avail. This may be something easy I have missed but can anyone help me get the Donations section to show in the ACP?
Cheers |
#310
|
|||
|
|||
Would anyone be able to make that modification to the page? Shouldnt take more than a few seconds.
|
#311
|
||||
|
||||
Hello,
If anyone needs it, here are instructions for adding links to your donations page. It includes how to add a link to your navbar, quicklinks in navbar, and the footer. See attachment for instructions. If you have more ideas or want to know how to add links to other areas of the site, let me know via PM. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|