We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Language or PHP Variables | Forum

hbyrd
hbyrd Mar 6 '13
I would like to use PHP or language variables in the custom text/html widget. First off, PHP doesn't work in it. I tried this and nothing happened:


<?php

echo "This is a test.";

?>


I'm guessing PHP isn't compatible with this widget? If its possible to make it please tell me. Also, I don't know how to use the language variables in the same widget. I could make a custom status page that referred just to that user. For example:


Welcome to the main page {$username}!


I want to do something like that. So how can I get PHP to work, and how do I use language variables? Help is appreciated very greatly! Oh, and please don't refer me to some other post, I have already looked all around the forums for a solution for PHP and help using language variables.

Purusothaman Ramanujam
You can not use hard-core php in the .html files. It does not work.

Oxwall like many other scripts, follow MVC design pattern.

You should have the php done in the controller/<componen-name.php> and refer that in .html file using smarty.
Alia Team
Alia Mar 11 '13
Topic was moved from General Questions.