Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - joomla.cc

Pages: [1]
1
Coding / Re: Small note for Daniel
« on: December 08, 2006, 12:30:26 pm »
In your development plans for SMFShop I mean :)

2
Coding / Re: Small note for Daniel
« on: December 08, 2006, 12:29:42 pm »
Good to hear that, Daniel. And glad I could help :) Is there anything to mention using PayPal to supply credit amount?

3
Coding / Small note for Daniel
« on: November 10, 2006, 04:55:06 pm »
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_moneyMYSQL_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_GROUPmem.lngfilemem.ID_GROUPmem.timeOffsetmem.showOnline,

Replace with:
	
	
 
mem.ID_POST_GROUPmem.lngfilemem.ID_GROUPmem.timeOffsetmem.showOnlinemem.money,


Find:
	
	
	
mem.birthdatemem.ICQmem.AIMmem.YIMmem.MSNmem.postsmem.lastLogin,

Replace with:
	
	
  
mem.birthdatemem.ICQmem.AIMmem.YIMmem.MSNmem.postsmem.lastLoginmem.money,


Find:
	
	
'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600false),

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.  O0

Alex
Joomla! Cyber Community

Pages: [1]