1
preachur
xdonations name
  • 2013/2/25 22:35

  • preachur

  • Just can't stay away

  • Posts: 525

  • Since: 2006/2/4 4


When someone makes a donation, and chooses to show their name, if they aren't a registered user it shows "Admin" in the donat-o-meter. What I want to do is replace that "custom" muser_id with the first_name from the donations_transactions table in the database. (Or first_name and last_name.)

I am not sure how I would hack that in donors.php and make it display in the donations_donatometer.html template.

(No registered users will be donating.)

Please help.

$query_Recordset1 "SELECT custom AS muser_id, option_selection1 as showname, DATE_FORMAT(payment_date, '%b %e') AS date, CONCAT('".$curr_sign."',SUM(mc_gross)) AS amt FROM ".$xoopsDB->prefix("donations_transactions")." WHERE (payment_date >= DATE_FORMAT(NOW(),'%Y-%m-".$swingd."')) GROUP BY txn_id ORDER BY payment_date DESC";     }else{         $query_Recordset1 "SELECT custom AS muser_id, option_selection1 as showname, DATE_FORMAT(payment_date, '%b-%e') AS date, CONCAT('".$curr_sign."',SUM(mc_gross)) AS amt FROM ".$xoopsDB->prefix("donations_transactions")." WHERE (payment_date < DATE_FORMAT(NOW(), '%Y-%m-".$swingd."')) AND payment_date > DATE_FORMAT(SUBDATE(NOW(),INTERVAL ".$swingd." DAY), '%Y-%m-".$swingd."') GROUP BY txn_id ORDER BY payment_date DESC";     }      $Recordset1 $xoopsDB->query($query_Recordset1);     $totalRows_Recordset1 $xoopsDB->getRowsNum($Recordset1);      $ROWS_DONATORS "";     // Fill out the donators table tag     while ($row_Recordset1 = $xoopsDB->fetchArray($Recordset1)) {         if ( $row_Recordset1['amt'] > $curr_sign.'0' ) {             $ROWS_DONATORS .= "<tr>";             $ROWS_DONATORS .= "<td style="font-weight: bold;">&nbsp; ";              $muser_id = $row_Recordset1['muser_id'];             if ( strcmp($row_Recordset1['showname'],"Yes") == 0 && ($userfoin = mgetusrinfo($muser_id))) {                 $ROWS_DONATORS .= "<a href='".XOOPS_URL."/userinfo.php?uid=".  $userfoin->getVar('uid')."'>".xdshorten($userfoin->getVar('uname'))."</a>n";

Login

Who's Online

160 user(s) are online (78 user(s) are browsing Support Forums)


Members: 0


Guests: 160


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits