Hey,
I thought I might be able to help a little. Inside Display.template.php file, I found this:
//I couldn't find where all these $message['member'][whatever] variables
//are set, so I just send an extra database query to get the member's
//money. Can someone tell me where (file and line) the $message variables
//are set?
global $ID_MEMBER, $db_prefix;
$result_money = db_query("SELECT money
FROM {$db_prefix}members
WHERE ID_MEMBER = {$message['member']['id']}
LIMIT 1", __FILE__, __LINE__);
$row_money = mysql_fetch_array($result_money, MYSQL_ASSOC);Well, here is some tips.
Since we do not welcome database calls inside a template file, I suggest the following change:
Remove the bit I quoted above, and replace
$row_money['money'] with
$message['member']['credit'].
Next:
Open $sourcedir/Load.php
Find:
mem.ID_POST_GROUP, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline,Replace with:
mem.ID_POST_GROUP, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline, mem.money,Find:
mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin,Replace with:
mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.money,Find:
'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600, false),Add After:
'credit' => $profile['money'],Obviously not many would care, I know, but for the sake of clean coding, hope this will give you some directions to where extra member variables can be set.
Good luck.
Alex
Joomla! Cyber Community