<script type="text/javascript">
document.observe( 'dom:loaded', function()
{
$( 'toggleVisibility' ).observe( 'click', toggleVisibility );
});
function toggleVisibility(e)
{
Event.stop(e);
new Ajax.Request( ipb.vars['base_url'] + '&app=core&module=ajax§ion=toggleVisibility',
{
parameters:
{
'md5check': ipb.vars['secure_hash']
},
evalJSON: 'force',
onSuccess: function(t)
{
if( Object.isUndefined( t.responseJSON ) )
{
alert( "Bad Request" );
}
else if ( t.responseJSON['error'] )
{
alert( "Something unexpected happened" );
}
else
{
alert( t.responseJSON['msg'] );
$( 'toggleVisibility' ).writeAttribute( "title", t.responseJSON['link_title'] );
$( 'currentStatus' ).update( t.responseJSON['link_title'] );
}
}
});
}
</script>
<li>
<strong>
<a id="toggleVisibility" href="{parse url="app=core&module=global&section=toggleVisibility" base="public"}" title='{$this->lang->words['current_status']}: {$status}'>{$this->lang->words['toggle_visibility']} (<span id="currentStatus">{$this->lang->words['current_status']}: {$status}</span>)</a>
</strong>
</li>
Not tested it, but should change the link to "Toggle Visibility (Current Status: Visible)".





Contributor












