|
Wiki -
Kunena JoniJnm Edition
|
|
Escrito por Jónatan Núñez
|
Cambios
- {lib}/kunena.parser.php
- {lib}/kunena.parser.base.php
- {template}/smile.class.php
Descripción
Este hack permite insertar código html en un post.
Modificación
Busca
Mostrar/Ocultar código php case 'email':
$tempstr = kunena_htmlspecialchars($between, ENT_QUOTES);
if(substr($tempstr, 0, 7)=='mailto:') {
$between = substr($tempstr, 7);
}
else {
$tempstr = 'mailto:'.$tempstr;
}
$tag_new = "<a href='".$tempstr."'>".$between.'</a>';
return TAGPARSER_RET_REPLACED;
break;
Añade después
Mostrar/Ocultar código php case 'html':
$tempstr = htmlspecialchars_decode($between);
//$tempstr = strip_tags($tempstr, '<p><a><div><font><table><td><tr><tbody><th><br>'); //tags allowed
$tag_new = $tempstr;
return TAGPARSER_RET_REPLACED;
break;
Cambia
Mostrar/Ocultar código php $text = preg_replace('/(?<!S)((http(s?):\/\/)|(www\.[a-zA-Z0-9-_]+\.))+([a-zA-Z0-9\/*+-_?&;:%=.,#]+)/', '<a href="http$3://$4$5" target="_blank" rel="nofollow">$4$5</a>', $text);
// match name@address
$text = preg_replace('/(?<!S)([a-zA-Z0-9_.\-]+\@[a-zA-Z][a-zA-Z0-9_.\-]+[a-zA-Z]{2,6})/', '<a href="mailto:$1">$1</a>', $text);
Por
Mostrar/Ocultar código php $msg = JRequest::getVar('msgpreview', '', 'post') ? JRequest::getVar('msgpreview', '', 'post') : (isset($_GET['Joni_message']) ? $_GET['Joni_message'] : "");
$msg = urldecode($msg);
if (strpos($msg, "[html]") === false && strpos($msg, "[HTML]") === false) {
$text = preg_replace('/(?<!S)((http(s?):\/\/)|(www\.[a-zA-Z0-9-_]+\.))+([a-zA-Z0-9\/*+-_?&;:%=.,#]+)/', '<a href="http$3://$4$5" target="_blank" rel="nofollow">$4$5</a>', $text);
// match name@address
$text = preg_replace('/(?<!S)([a-zA-Z0-9_.\-]+\@[a-zA-Z][a-zA-Z0-9_.\-]+[a-zA-Z]{2,6})/', '<a href="mailto:$1">$1</a>', $text);
}
$_GET['Joni_message'] = "";
Busca (x2)
Mostrar/Ocultar código php
Añade arriba (x2)
Mostrar/Ocultar código php $_GET['Joni_message'] = $text;
Busca
Mostrar/Ocultar código php <?php if ($fbConfig->showebaytag) {?>
Añade arriba
Mostrar/Ocultar código html <img class = "fb-bbcode" src="<?php echo KUNENA_LIVEUPLOADEDPATH.'/editor/'; ?>html.png" alt="HTML" onclick = "bbfontstyle('[html]', '[/html]')" onmouseover = "javascript:kunenaShowHelp('<p align=\'center\' style=\'color: red; font-size:15px\'>Kunena JoniJnm Edition</p>')" />
Extra
Pon esta imagen en la carpeta /images/fbfiles/editor

|