Diferencia entre revisiones de «Ver más funciones personalizadas»
De ActionApps Documentacion
Línea 60: | Línea 60: | ||
<pre> | <pre> | ||
{alias:img_upload......:f_u:usr_popup:h:100:h:500:'_#TITULAR_':thumbnail_left:_#LEYENDA_} | {alias:img_upload......:f_u:usr_popup:h:100:h:500:'_#TITULAR_':thumbnail_left:_#LEYENDA_} | ||
+ | </pre> | ||
+ | </code> | ||
+ | |||
+ | <code> | ||
+ | <pre> | ||
+ | .thumbnail_left { | ||
+ | float:left; | ||
+ | margin-right:10px; | ||
+ | margin-bottom:5px; | ||
+ | border:0px; | ||
+ | } | ||
</pre> | </pre> | ||
</code> | </code> |
Revisión del 15:45 21 nov 2007
Contenido
Limpiar acentos
function usr_limpiar_acentos ($columns, $col, $param) { $tofind = "ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ"; $replac = "AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn"; return(strtr($columns[$col][0][value],$tofind,$replac)); }
{alias:headline........:f_u:usr_limpiar_acentos:}
Popup para imágenes
function usr_popup ($columns, $col, $param) { $parameters = split(":",$param); list($func,$thumb_type_atr1, $thumb_val1, $popup_type_atr2, $popup_val2,$alt,$class,$leyenda) = $parameters; $filepath = $columns[$col][0][value]; $string2array = explode("/",$filepath); $serverpath=IMG_UPLOAD_PATH.$string2array [count($string2array)-2]."/".$string2array [count($string2array)-1]; $urlpath =$string2array [count($string2array)-3]."/".$string2array [count($string2array)-2]."/".$string2array [count($string2array)-1]; $phpthumb = "http://".$_SERVER['SERVER_NAME']."/".AA_BASE_DIR."img.php?src=/".$urlpath."&".$popup_type_atr2."=".$popup_val2; $a = getimagesize($phpthumb); $ancho=$a[0]; $alto=$a[1]; $popup="<a href=\"javascript:popup('".$phpthumb."',".$ancho.",".$alto.",'".$leyenda."')\"><img src=\"/".AA_BASE_DIR."img.php?src=/".$urlpath."&".$thumb_type_atr1."=".$thumb_val1."\" alt=".$alt." class=\"".$class."\" border=\"0\"></a>"; return $popup; }
{alias:img_upload......:f_u:usr_popup:h:100:h:500:'_#TITULAR_':thumbnail_left:_#LEYENDA_}
.thumbnail_left { float:left; margin-right:10px; margin-bottom:5px; border:0px; }