Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
A PHP Snippet
I need a PHP snippet to create a welcome message on a PageManager page.
Can anyone fill in the green bits and correct syntax for me...
if someone is logged in
echo 'Hello whoever'
else
echo 'Please log in';
Can anyone fill in the green bits and correct syntax for me...
if someone is logged in
echo 'Hello whoever'
else
echo 'Please log in';
0
This discussion has been closed.
Comments
if ( ($Context->UserID > 0) && in_array($Context->SelfUrl, array("account.php", "categories.php", "comments.php", "index.php", "search.php") ) { echo "Hello " . $Context->User->Name; // I think this is right.... } else { echo "Please log in"; }
::mumbles something about mac users not knowing how to program:: (Kidding!)
Thanks WallPhone and SirNot, I'll give that a go.
And no I don't know PHP, I hack at it and make it do what I want usually, all I need is an example to get me going.
Also for the record, I'm not a "great" designer either, I'm a teacher by trade, this web stuff is a hobby which I have become good at, so they tell me.