|
Wiki -
Kunena JoniJnm Edition
|
|
Escrito por Jónatan Núñez
|
ArchivoDescripción De esta manera, cuando insertes una imagen, si es muy grande se moverá con scroll y no descolocará toda la página. La anchura y altura de las imágenes son las mismas con las del área de texto (por si lo quieres modificar, en la configuración de Kunena) ModificaciónCambia Mostrar/Ocultar código php case 'img':
if($between) {
$task->autolink_disable--; # continue autolink conversion
// Make sure we add image size if specified and while we are
// at it also set maximum image width from text width config.
//
// NOTICE: image max variables from config are not intended
// for formating but to limit the size of uploads, which can
// be larger than the available post area to support super-
// sized popups.
$imgmaxsize = (int)(($GLOBALS["fbConfig"]->rtewidth * 9) / 10); // 90% of text width
$imgtagsize = isset($tag->options["size"]) ? (int)htmlspecialchars($tag->options["size"]) : 0;
if($imgtagsize>0 && $imgtagsize<$imgmaxsize)
{
$imgmaxsize = $imgtagsize;
}
$tag_new = "";
$tag_new .= "<img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' />";
return TAGPARSER_RET_REPLACED;
}Por Mostrar/Ocultar código php case 'img':
if($between) {
//JoniJnm: imagenes
$task->autolink_disable--;
$width = (int)(($GLOBALS["fbConfig"]->rtewidth * 9) / 10);
$height = (int)$GLOBALS["fbConfig"]->rteheight;
$imgtagsize = isset($tag->options["size"]) ? (int)htmlspecialchars($tag->options["size"]) : 0;
$tag_new = '<div style="width: '.$width.'px; border: 0px inset; margin: 0px; padding: 6px; overflow: auto; max-height: '.$height.'px; text-align: center;">';
$tag_new .= "<img src='".$between."'".(($imgtagsize) ? " width='".$imgtagsize."'" : "")." border='0'/></div>";
//Fin JoniJnm
return TAGPARSER_RET_REPLACED;
}
return TAGPARSER_RET_NOTHING;
break;
|