Fork me on GitHub

Search

Donat-O-Meter

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

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 2013 Abuse Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield Blocks Bootstrap Captcha cell chronolabs content CĂN demo docek download Dresses evden eve facebook Fat Food for free Gateway Google Guide herre Home Honeypot HP html5 Human HỘ IP iPhone jQuery Law Legal List Loss mobile module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher Rapid RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Solution Spam Studio support tag tags tdmcreate The Theme themes User userlog web weight Wishcraft xoops Xortify

New Users

Registering user

# 137849

hometheater

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  |  Register To Post



#1 Posted on: 2013/2/25 16:35 xdonations name
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";


Top

preachur
Joined:
2006/2/3 22:37
From Colorado, U.S.A.
Group:
Registered Users
Posts: 525
(Show More) (Show Less)







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You can post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]