{hotelName} ?

Newbie Spellweaver
Joined
Dec 25, 2015
Messages
51
Reaction score
1
Hey everyone.
I was just wondring how Cryptos made it so if i type {hotelname} in my code, it will then write the hotelname from the config file.
Is it possible to make my own? {custom}
 
If you go to the 'app' folder and then open class.template.php, you can see all the available options.

You will see at the top of the 'Initiate' function is $this->setParams('hotelName', $_CONFIG['hotel']['name']);

the first paramter is what will be in the {}. In this case, it is 'hotelName'. The second parameter is the value. With hotelName, it pulls the name from the config file.

You can easily create your own aswell. For exmaple, if you wanted to return the current Unix timestamp you could do:
$this->setParams('timestamp', time());

Then typing {timestamp} would return that timestamp
 
Upvote 0
If you go to the 'app' folder and then open class.template.php, you can see all the available options.

You will see at the top of the 'Initiate' function is $this->setParams('hotelName', $_CONFIG['hotel']['name']);

the first paramter is what will be in the {}. In this case, it is 'hotelName'. The second parameter is the value. With hotelName, it pulls the name from the config file.

You can easily create your own aswell. For exmaple, if you wanted to return the current Unix timestamp you could do:
$this->setParams('timestamp', time());

Then typing {timestamp} would return that timestamp

Thank you so much RetroPiggy!
 
Upvote 0
Back