I need a help to customize the mod hide.
I had in icy 1.3 it like this:
A year ago, using this code.
Spoiler: [ Show ]
Spoiler: [ Hide ]
Code: [Show]
if($tag === 'hide')
{
if($this->is_sig)
{
return $error;
}
if($item['iteration'] > 1)
{
return $error;
}
global $DB, $topic_id, $userdata, $mode;
$show = false;
if ($userdata['session_logged_in'])
{
$show = true;
}
}
if(!$show && $tag === 'hide')
{
$html = '<blockquote class="spoiler"><div class="quote-nouser"> ';
return array(
'valid' => true,
'html' => $html . '<img src="images/bbcb_mg/images/gif/hide_can_cerr.png" width="64" align="middle" border="0"/><font color="#FF0000"><u><b>Mensaje Restringido</b></u></font></div><div class="post-text"><font color="#FF0000"><b>Este tipo de mensajes solo están disponibles para usuarios registrados</b></font></div></blockquote>',
'allow_nested' => false,
);
}
elseif ($show && $tag === 'hide')
{
$vista= substr(md5($content . mt_rand()), 0, 8);
//$html = '<blockquote class="quote"><div class="quote-nouser"> ';
$html = '<blockquote class="quote"> ';
$html .= '<div class="quote-nouser" id="vistahdr_' . $vista. '" style="background-color:#E3EBE5; border-width: 1px; border-style: solid; border-color: #819D6E; border-bottom-width: medium; border-right-width: medium; border-style: ridge; position: relative"><img src="images/bbcb_mg/images/gif/hide_can_cerr.png" width="64" align="absmiddle" border="0"/><br />Click <a href="javascript:void(0)" onclick="ShowHide(\'vista_' . $vista. '\', \'vista2_' . $vista. '\', \'\'); ShowHide(\'vistahdr_' . $vista. '\', \'vistahdr2_' . $vista. '\', \'\')"><b><font color = #008000><big>Aqui</big></font></b></a> para mostrar</div>';
$html .= '<div class="quote-nouser" id="vistahdr2_' . $vista. '"style="background-color:#E3EBE5; border-width: 1px; border-style: solid; border-color: #819D6E; border-bottom-width: medium; border-right-width: medium; border-style: ridge; position: relative; display: none"><img src="images/bbcb_mg/images/gif/hide_can_abie.png" width="64" align="absmiddle" border="0"/><br />Click <a href="javascript:void(0)" onclick="ShowHide(\'vista_' . $vista. '\', \'vista2_' . $vista. '\', \'\'); ShowHide(\'vistahdr_' . $vista. '\', \'vistahdr2_' . $vista. '\', \'\')"> <b><font color = #FF0000><big>Aqui</big></font></b></a> para ocultar</div>';
$html .= '<div class="vista-content" id="vista2_' . $vista. '" style="background-color:#E3EBE5; border-width: 1px; border-style: solid; border-color: #819D6E; border-bottom-width: medium; border-right-width: medium; border-style: ridge; position: relative; display: none">' ;
return array(
'valid' => true,
'start' => $html,
'end' => '</div></blockquote>'
);
}
{
if($this->is_sig)
{
return $error;
}
if($item['iteration'] > 1)
{
return $error;
}
global $DB, $topic_id, $userdata, $mode;
$show = false;
if ($userdata['session_logged_in'])
{
$show = true;
}
}
if(!$show && $tag === 'hide')
{
$html = '<blockquote class="spoiler"><div class="quote-nouser"> ';
return array(
'valid' => true,
'html' => $html . '<img src="images/bbcb_mg/images/gif/hide_can_cerr.png" width="64" align="middle" border="0"/><font color="#FF0000"><u><b>Mensaje Restringido</b></u></font></div><div class="post-text"><font color="#FF0000"><b>Este tipo de mensajes solo están disponibles para usuarios registrados</b></font></div></blockquote>',
'allow_nested' => false,
);
}
elseif ($show && $tag === 'hide')
{
$vista= substr(md5($content . mt_rand()), 0, 8);
//$html = '<blockquote class="quote"><div class="quote-nouser"> ';
$html = '<blockquote class="quote"> ';
$html .= '<div class="quote-nouser" id="vistahdr_' . $vista. '" style="background-color:#E3EBE5; border-width: 1px; border-style: solid; border-color: #819D6E; border-bottom-width: medium; border-right-width: medium; border-style: ridge; position: relative"><img src="images/bbcb_mg/images/gif/hide_can_cerr.png" width="64" align="absmiddle" border="0"/><br />Click <a href="javascript:void(0)" onclick="ShowHide(\'vista_' . $vista. '\', \'vista2_' . $vista. '\', \'\'); ShowHide(\'vistahdr_' . $vista. '\', \'vistahdr2_' . $vista. '\', \'\')"><b><font color = #008000><big>Aqui</big></font></b></a> para mostrar</div>';
$html .= '<div class="quote-nouser" id="vistahdr2_' . $vista. '"style="background-color:#E3EBE5; border-width: 1px; border-style: solid; border-color: #819D6E; border-bottom-width: medium; border-right-width: medium; border-style: ridge; position: relative; display: none"><img src="images/bbcb_mg/images/gif/hide_can_abie.png" width="64" align="absmiddle" border="0"/><br />Click <a href="javascript:void(0)" onclick="ShowHide(\'vista_' . $vista. '\', \'vista2_' . $vista. '\', \'\'); ShowHide(\'vistahdr_' . $vista. '\', \'vistahdr2_' . $vista. '\', \'\')"> <b><font color = #FF0000><big>Aqui</big></font></b></a> para ocultar</div>';
$html .= '<div class="vista-content" id="vista2_' . $vista. '" style="background-color:#E3EBE5; border-width: 1px; border-style: solid; border-color: #819D6E; border-bottom-width: medium; border-right-width: medium; border-style: ridge; position: relative; display: none">' ;
return array(
'valid' => true,
'start' => $html,
'end' => '</div></blockquote>'
);
}
but now it does not work, but when I connected dont see links: