|
Wiki -
Kunena JoniJnm Edition
|
|
Escrito por Jónatan Núñez
|
Archivos
- {lib}/kunena.parser.php
- {language}/kunena.{language}.php
Descripción
Con esta modificación podrás ocultar texto a invitados, en kunena. Si no estás logeado, saldrá un mensaje diciendo que hay contenido oculto para invitados, que si quieres verlo debes logearte o registrate
Modificación
Cambia Mostrar/Ocultar código php case 'hide':
if($between) {
if ($my->id==0)
{
// Hide between content from non registered users
$tag_new = '';
}
else
{
// Display but highlight the fact that it is hidden from guests
$tag_new = '<b>' . _KUNENA_BBCODE_HIDE . '</b>' . '<span class="fb_quote">'.$between.'</span>';
}
return TAGPARSER_RET_REPLACED;
}
return TAGPARSER_RET_NOTHING;
break;Por Mostrar/Ocultar código php case 'hide':
$user =& JFactory::getUser();
if($between) {
if ($user->id==0)
{
// Hide between content from non registered users
if ($fbConfig->fb_profile == 'cb') {
$l = CKunenaCBProfile::getLoginURL();
$r = CKunenaCBProfile::getRegisterURL();
}
else {
$l = JRoute::_('index.php?option=com_user&view=login');
$r = JRoute::_('index.php?option=com_user&task=register');
}
$tag_new = '<b>' . str_replace("%l", $l, str_replace("%r", $r, JText::_("KUNENA_JONI_BBCODE_HIDE_ID0"))) . '</b>';
}
else
{
// Display but highlight the fact that it is hidden from guests
$tag_new = '<b>' . _KUNENA_BBCODE_HIDE . '</b>' . '<span class="fb_quote">'.$between.'</span>';
}
return TAGPARSER_RET_REPLACED;
}
return TAGPARSER_RET_NOTHING;
break;
Añade el texto de tu idioma Mostrar/Ocultar código php//Español
DEFINE('_KUNENA_JONI_BBCODE_HIDE_ID0', 'Para ver el contenido oculto <a href="%r">registrate</a> o <a href="%l">logeate</a>');
//English
DEFINE('_KUNENA_JONI_BBCODE_HIDE_ID0', 'To view the hidden content <a href="%r">register</a> or <a href="%l">login</a>');
|