Frug / AJAX-Chat

A fully customizable web chat implemented in JavaScript, PHP and MySQL which integrates nicely with common forum systems like phpBB, MyBB, FluxBB, SMF and vBulletin. A Flash and Ruby based socket connection can be used to boost performance.
http://frug.github.io/AJAX-Chat/
546 stars 300 forks source link

can't write PHP code inside template #238

Closed jodenz closed 8 years ago

jodenz commented 8 years ago

I can't write PHP code inside template even though i change the file extension to .php instead of .html, thanks in advance.. thanks

Frug commented 8 years ago

templates are not meant to support raw php inside them. Write your php inside another file and add it to the template as a variable here https://github.com/Frug/AJAX-Chat/blob/master/chat/lib/class/AJAXChatTemplate.php#L62

jodenz commented 8 years ago

@Frug HI thank you for your quick reply, i am not really that expert in php. can you give me example on this scenario, i want to make the log.in userName view in some place of my template and i want also add location per user to the online list.

Thanks in advance..