tolearn Posted February 26, 2008 Share Posted February 26, 2008 Hi Im working with a gaming website. We got the code from outside. It seems like they have used oops concept. Im new to this concept. Also they are using some thing like {welcome} etc. within curly braces. Can any one tell what this means? Thank you. Link to comment https://forums.phpfreaks.com/topic/93051-php-help/ Share on other sites More sharing options...
trq Posted February 26, 2008 Share Posted February 26, 2008 Can we see an example? Your question is pretty vague. Link to comment https://forums.phpfreaks.com/topic/93051-php-help/#findComment-476726 Share on other sites More sharing options...
tolearn Posted February 26, 2008 Author Share Posted February 26, 2008 Hi, Here is an example: <td width="346" class="logo">{sitelink}<a href="#"><img src="{url_tmpl_main}images/button-hover.gif" width="100%" height="80" border="0" /></a></a> </td> The text i have marked in red. I don have any idea about why they are using like this. Is tht any function call. or any goloba variable? Thank u Link to comment https://forums.phpfreaks.com/topic/93051-php-help/#findComment-476731 Share on other sites More sharing options...
Jessica Posted February 26, 2008 Share Posted February 26, 2008 That's a smarty template {$sitelink}. Link to comment https://forums.phpfreaks.com/topic/93051-php-help/#findComment-476733 Share on other sites More sharing options...
tolearn Posted February 26, 2008 Author Share Posted February 26, 2008 But they havent used the $ sign before the text. Its just {sitelink}. Link to comment https://forums.phpfreaks.com/topic/93051-php-help/#findComment-476737 Share on other sites More sharing options...
DarkerAngel Posted February 26, 2008 Share Posted February 26, 2008 Hi, Here is an example: <td width="346" class="logo">{sitelink}<a href="#"><img src="{url_tmpl_main}images/button-hover.gif" width="100%" height="80" border="0" /></a></a> </td> The text i have marked in red. I don have any idea about why they are using like this. Is tht any function call. or any goloba variable? Thank u It's normally used for template replacements I did something like this in a dynamic application where I didn't feel like writing a bounch of <?=$string?> sniplitts you create an array $replace = Array ( 'sitelink' => $sitelinkdata, 'url_tmpl_main' => $template_dir ); Get the contents of the template file: $html = file_get_contents("template_file"); Run something that will replace the test in {} foreach($replace as $k => $v) { $html = str_replace("{".$k."}", $v, $html); } Link to comment https://forums.phpfreaks.com/topic/93051-php-help/#findComment-476739 Share on other sites More sharing options...
Jessica Posted February 26, 2008 Share Posted February 26, 2008 Maybe they have their own custom templating engine. If you're using a third party program, ask on their support forum, or read the docs. Link to comment https://forums.phpfreaks.com/topic/93051-php-help/#findComment-476741 Share on other sites More sharing options...
tolearn Posted February 26, 2008 Author Share Posted February 26, 2008 Ok. thank you. They have used Ioncube loader. Can any 1 teel about that. Why its used? Is that got anything to do with this {sitelink}?? Link to comment https://forums.phpfreaks.com/topic/93051-php-help/#findComment-476746 Share on other sites More sharing options...
trq Posted February 26, 2008 Share Posted February 26, 2008 Ioncube is a php encoder, nothing to do with the {foo} thing, which as has been stated is some type of temmplate engine. I would say the core of your application has been encoded so you are unable to make changes to it. Link to comment https://forums.phpfreaks.com/topic/93051-php-help/#findComment-476748 Share on other sites More sharing options...
tolearn Posted February 26, 2008 Author Share Posted February 26, 2008 ok Thank you. So what i have to do for making changes as i wish.They said they have given the whole code to us? But im facing difficulties in changing? Link to comment https://forums.phpfreaks.com/topic/93051-php-help/#findComment-476752 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.