Diferencia entre revisiones de «Ver más funciones personalizadas»
De ActionApps Documentacion
Línea 1: | Línea 1: | ||
− | + | ==Limpiar acentos== | |
<code> | <code> | ||
<pre> | <pre> | ||
Línea 21: | Línea 21: | ||
− | + | ==Popup para imágenes== | |
<code> | <code> | ||
<pre> | <pre> |
Revisión del 15:42 21 nov 2007
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_}