hide online status from guests

asma

Member
i'm trying to work this out.. if the user choose to hide his online status from guests

query from database for online users

foreach ( ) {

if ($visible ='0')
{
echo "<xen:if is='{$visitor.user_id}'> display content </xen:if>";
}
else
{
echo "display content";
}


}


i get this error
Parse error: syntax error, unexpected '.', expecting '}'
 
@asma did you get this implemented for your site? If not, the simplest method is to create a new user custom field (check box, or radio) for the members preferences, and then create an add-on to modify a couple of templates to check the new field value to see if they want their on-line status to show for guests or not.

Another way, although a little more complex, is to create an add-on with an installer that modifies the xf_user table to add a new field: guest_visible, and then add a checkbox under the privacy settings with the option. TM's will still be required to modify the appropriate templates so that you do not need to edit them at all.

Either way, a DB query is not required, :)
 
i'm trying to work this out.. if the user choose to hide his online status from guests

query from database for online users

foreach ( ) {

if ($visible ='0')
{
echo "<xen:if is='{$visitor.user_id}'> display content </xen:if>";
}
else
{
echo "display content";
}


}


i get this error
Parse error: syntax error, unexpected '.', expecting '}'

I do not think that you can use echo in xenforo templating system.
 
Top Bottom