Fork me on GitHub
Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
New Posts New Topics All Posts All Forums Index General Modules Themes Development International XOOPS.org

Search

Nominate XOOPS!

Learn XOOPS Core

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $25.00
Net Balance: $23.97
Left to go: $76.03

Donations
Anonymous ($25)Aug-11

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 4 6 Abuse adslight Android AntiHarvesting AntiSpam API Apple Battlefield billige Blocks Bootstrap Captcha cell cent chronolabs CHUNG Clicks content CĂN demo docek download Dresses evden facebook Fat floor for free Gateway Google Guide herre Honeypot HP html5 Human HỘ iPhone jQuery Language List log Loss module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Smoking Spam stem Studio support tag tags tdmcreate template The Theme themes User userlog web weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137689

idream

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
Just can't stay away
Just can't stay away
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.

[Advanced Search]