krisis Posted December 10, 2007 Share Posted December 10, 2007 Hi! I need php function. I have a number " {$settings.info_box_withdraw_funds_generated} " but due to some mistakes I need to - 7 it. {$settings.info_box_withdraw_funds_generated} - 7 function. Can everyone please help me out with this? Quote Link to comment Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 You just answered your own question. Quote Link to comment Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 Heh, no, it's not working! I know it all should be in function lines or so... I'm new to this Quote Link to comment Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 Post your actual code. Quote Link to comment Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 It's <tr> <td class=menutxt><b>Payments sent</b></td> <td class=menutxt align=right> $ {$settings.info_box_withdraw_funds_generated} </td> </tr> And I need to have minus 7 this number {$settings.info_box_withdraw_funds_generated} Quote Link to comment Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 Sorry, I'm not sure what that is exactly, but its not php. Maybe it some sort of templating engine? Quote Link to comment Share on other sites More sharing options...
Crew-Portal Posted December 10, 2007 Share Posted December 10, 2007 $subnum = 7; (($subnum) - {$settings.info_box_withdraw_funds_generated} - $) Quote Link to comment Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 I tried this code <td class=menutxt align=right> $subnum = 7; (($subnum) - {$settings.info_box_withdraw_funds_generated} - $) </td> but in real web site view it doesn't show the result. it's: Payments sent $subnum = 7; (($subnum) - 2.00 - $) btw, I'm editing .tpl page but it's integrated in .php pages Quote Link to comment Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 You'll need to read the docs for your template engine. .tpl files are not part of php. Quote Link to comment Share on other sites More sharing options...
Crew-Portal Posted December 10, 2007 Share Posted December 10, 2007 .tpl files are template files. There will be a main PHP script they link to. You gotta edit the data in thier! Youll know if its the right file if its got {$settings.info_box_withdraw_funds_generated} somewhere in it. But the code will all be in PHP! Quote Link to comment Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 Ok, I get it now. Many thanks! Quote Link to comment Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 Now I found this, I hope this can be modified if ($settings['show_info_box_total_withdraw'] == 1) { if ($settings[crontab_stats] == 1) { $settings['info_box_withdraw_funds_generated'] = number_format (abs ($stats[total_withdraw]), 2); } } Quote Link to comment Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 Try... $settings['info_box_withdraw_funds_generated'] = number_format (abs ($row['sum']), 2)-7; Quote Link to comment Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 Yes, it works! Thanks, that's all finally Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.