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

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $65.00
Net Balance: $61.80
Left to go: $38.20

Donations
studioC  ($25)May-17
Anonymous ($15)May-16
Anonymous ($25)May-4

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

2 2.5 2.6 3.0 87 2013 Abuse Amazon AntiHarvesting AntiMalUser AntiSpam API Beats billige black Blocks blue Bootstrap Captcha cell Christmas chronolabs content Conversion database demo docek download Dresses editor evden eve facebook floor free herre Honeypot Human IP IPInfoDB jQuery kantor lamps Language log logger Lucire mobile module modules Monster MyAlbum-p Networks newbb news online PageRank Password pdf Permissions pink Plugin portal preloader Prevention profile project propose Protector publisher Rights rmcommon Room sale security Server site SmartClone Smarty SOAP Songlist Spam statistics stem Studio tag tags tdmcreate template Theme themes TinyMCE userlog website Whitepaper XIPS XooLaT xoops Xortify ZendFramework

New Users

Registering user

# 136024

ngochuyen

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  Register To Post



#1 Posted on: 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: 523
(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]