[HELP] Template System

Status
Not open for further replies.

brsy

nah mang
May 12, 2011
1,530
272
Dayron1234 and I am creating a template system that is suppose to work a little bit like the one Kryptos created for RevCMS. In ReCMS,
PHP:
{server_ip} = $_CONFIG['hotel']['server_ip']
How the fawk does that work? I want mine to say be like
PHP:
[hotelName] = $CONFIG['website']['name']
.

Is that even possible? If so, how does it work?
 

Heaplink

Developer & Designer
Nov 9, 2011
510
173
I found the solution. Inside class.template.php of RevCMS this function does the magic:

PHP:
final public function filterParams($str)
    {
        foreach($this->params as $key => $value)
        {
            $str = str_ireplace('{' . $key . '}', $value, $str);
        }
 
        return $str;
    }
 

brsy

nah mang
May 12, 2011
1,530
272
I found the solution. Inside class.template.php of RevCMS this function does the magic:

PHP:
final public function filterParams($str)
    {
        foreach($this->params as $key => $value)
        {
            $str = str_ireplace('{' . $key . '}', $value, $str);
        }
 
        return $str;
    }
Motha-fucking life saver.
 
Status
Not open for further replies.

Users who are viewing this thread

Top