vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   PayPal Donations For vBulletin 3.5.0 (https://vborg.vbsupport.ru/showthread.php?t=91567)

Trana 11-26-2006 06:57 PM

I recently moved my site to a new server (in the process there was a PHP version change to some new release in 5.x). Everything on my site seems to be working except donate.php. When I call it the browser shows parts of the source code on the screen, like it isn't completing the php script. There is no error code.

Does anyone have any suggestions on what can be done to fix this?

Thanks!

sinisterpain 11-26-2006 08:22 PM

try re-uploading the PHP file and see if that solves your problem

Trana 11-26-2006 09:35 PM

Quote:

Originally Posted by sinisterpain (Post 1125847)
try re-uploading the PHP file and see if that solves your problem

I reuploaded the original donate.php file I had and the problem still exists.

Trana 11-26-2006 09:39 PM

This is what is shown on the page when I call it:

Code:

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 = ""; $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 = ''; $username = stripslashes($avatar_row['username']); $show_as_donor = $avatar_row['showdonor']; $total = number_format($row['total'], 2, '.', ','); if ($i < $num){ $end = ""; $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 = ""; $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 # || || #################################################################### || \*======================================================================*/ ?>

Trana 11-26-2006 10:29 PM

A copy of my donate.php file is attached. Can someone help me out by doing a diff to see if there is an corruption in the file. I really doubt it but need to start eliminating possible problems.

Thanks.

Cloudrunner 11-26-2006 11:08 PM

Quote:

Originally Posted by Brandon J. Briggs aka. Cloudrunner
As the original author of the Paypal Hacks for vBulletin 3.0.x and 3.5.x I give full authorization to modify, recode, compile and/or reverse engineer the paypal donation hacks to any and all fully licensed members of vBulletin.org. I also give permission to fully distribute any derivative works that are created due to this authorization without need of providing credit or other means of recompense.

I am releasing this authorization in the hopes that someone will be able to carry on the work that was begun.

da420 11-26-2006 11:47 PM

Nice, I hope someone picks this up. Thanks Cloudrunner. :)

sinisterpain 11-28-2006 12:35 AM

Quote:

Originally Posted by Trana (Post 1125941)
A copy of my donate.php file is attached. Can someone help me out by doing a diff to see if there is an corruption in the file. I really doubt it but need to start eliminating possible problems.

Thanks.

I didnt immediately see any proplems with the file. Uninstall the hack and use this zip it contains a XML file to install the templates and tables. Andreas put this together. Follow the install instructions. Make sure you go into your admin CP panel and edit the donations settings adding your paypal email and links to ppverify and make sure you are not in the paypal sandbox.
Unfortunately the html instructions are for the original hack install. You need to upload all files in the upload folder to your webserver using the folder structure in the zip, import the xml file through admin CP, make the template edits from the install text file. If you still have problems let me know I will try to help you get it going.

Trana 11-28-2006 03:33 AM

I figured it out. Something is different about my PHP build (strict mode? not sure), but the files needed the full <?PHP in the beginning. Once I changed them everything is working fine.

When someone updates this hack please make this change permanent in the code.

Thanks for your help.

Billspaintball 12-01-2006 04:27 AM

Quote:

Originally Posted by Cloudrunner (Post 1125973)
I am releasing this authorization in the hopes that someone will be able to carry on the work that was begun.

Ohhhh thanks..
This will probably allow me to cut a few corners on mine :)


All times are GMT. The time now is 10:06 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.02563 seconds
  • Memory Usage 1,781KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete