Diferencia entre revisiones de «Soluciones practicas»

De ActionApps Documentacion
Saltar a: navegación, buscar
(→‎Slideshow de imagenes interactivas con descripcion de texto)
(→‎Slideshow de imagenes interactivas con descripcion de texto)
Línea 51: Línea 51:
  
  
−
<p align="center"><input type="button" id="btnPrev" value="<<
+
<nowiki><p align="center"><input type="button" id="btnPrev" value="<<
 
Previous" onclick="Prev();"> <input type="button" id="bntPlay"
 
Previous" onclick="Prev();"> <input type="button" id="bntPlay"
 
value="Play - Stop" onclick="Play()"> <input type="button"
 
value="Play - Stop" onclick="Play()"> <input type="button"
−
id="btnNext" value="  Next >>  " onclick="Next();"></p>
+
id="btnNext" value="  Next >>  " onclick="Next();"></p></nowiki>
  
 
<p align="center"><img id="_Ath_Slide" onload="OnImgLoad()"> </p>
 
<p align="center"><img id="_Ath_Slide" onload="OnImgLoad()"> </p>

Revisión del 06:12 21 sep 2006

Como editar un item en un website publico

Traducido de How to edit items in public website?

Adam 23:35 2 jun, 2006 (CEST)
Tu tienes preparado un formulario de envio anonimo publico y deseas usarlo para editar items. Como hacerlo?

Hay un script fillform.php3 asociado con las utilidades javascript en include/fillformutils.php3. Este script toma el id de item largo de la variable my_item_id y llama a las funciones javascript para buscar los campos y llenarlos apropiadamente.

Tu debes usarlo de esta manera: Dentro del archivo file anonymous.shtml

Colocar los siguientes includes

<!--#include virtual="/anonym.html"--> <!--#include virtual="/aaa/fillform.php3"--> <!--#include virtual="/bottom.html"-->

Para editar un item con los viejos valores cargados en el formulario puedes llamarlo asi

anonymous.shtml?my_item_id=...

Hay dos parametros adicionales que muchos usuarios no necesitarán: usar "form=formname" cuando tu cambies el nombre del formulario que contiene los campos (usualmente es llamado "f"). Puede usar "notrun = 1" si tu deseas llenar los controles e.g. solamente despues de clickar en algun lugar.

Solamente los items posteados de un website público y no actualizado en el administrador de las AA puede ser editado de esta manera - un flag ITEM_FLAG_ANONYMOUS_EDITABLE se encarga de esto. Este es reseteado cada vez que tu envias un item con itemedit.php3

El mismo script puede ser usado para rellenar condiciones en una pagina de busqueda. Ver en How to refill conditions on searchform?

Slideshow de imagenes interactivas con descripcion de texto

Hola a todos

Un dato que muestra el poder de las AA cuando se combinan con Javascript. En el proyecto donde trabajo necesitaban un Slideshow de imagenes interactivas con descripcion de texto y asi que decidi implementarlo con AA. El asunto es sencillo. Pueden verlo en http://ertic.inictel.net en la seccion Fotonoticia

1. Bajar el script de [http:// http://www.dynamicdrive.com/dynamicindex14/interslide.htm Dynamic Drive]

2. Crean una vista texto completo (tambien puede ser una vista lista de items de un solo item) y colocan el codigo de la siguiente manera. (En cada item lo configure para que albergara 10 fotos)


<p align="center"><input type="button" id="btnPrev" value="<< Previous" onclick="Prev();"> <input type="button" id="bntPlay" value="Play - Stop" onclick="Play()"> <input type="button" id="btnNext" value=" Next >> " onclick="Next();"></p>

<img id="_Ath_Slide" onload="OnImgLoad()">

Description:
Number of Pictures: of

<script language="JavaScript1.2"> /* Interactive Image slideshow with text description By Christian Carlessi Salvad? (cocolinks@c.net.gt). Keep this notice intact. Visit http://www.dynamicdrive.com for script

  • /
g_fPlayMode = 0; g_iimg = -1; g_imax = 0; g_ImageTable = new Array(); function ChangeImage(fFwd) { if (fFwd) { if (++g_iimg==g_imax) g_iimg=0; } else { if (g_iimg==0) g_iimg=g_imax; g_iimg--; } Update(); } function getobject(obj){ if (document.getElementById) return document.getElementById(obj) else if (document.all) return document.all[obj] } function Update(){ getobject("_Ath_Slide").src = g_ImageTable[g_iimg][0]; getobject("_Ath_FileName").innerHTML = g_ImageTable[g_iimg][1]; getobject("_Ath_Img_X").innerHTML = g_iimg + 1; getobject("_Ath_Img_N").innerHTML = g_imax; } function Play() { g_fPlayMode = !g_fPlayMode; if (g_fPlayMode) { getobject("btnPrev").disabled = getobject("btnNext").disabled = true; Next(); } else { getobject("btnPrev").disabled = getobject("btnNext").disabled = false; } } function OnImgLoad() { if (g_fPlayMode) window.setTimeout("Tick()", g_dwTimeOutSec*1000); } function Tick() { if (g_fPlayMode) Next(); } function Prev() { ChangeImage(false); } function Next() { ChangeImage(true); } SECCION FILAS IMPARES ////configure below variables///////////////////////////// //configure the below images and description to your own. {switch({_#FOTO1___}).+:g_ImageTable[g_imax++] = new Array ("_#FOTO1___", "_#LEYEND1_");:} {switch({_#FOTO2___}).+:g_ImageTable[g_imax++] = new Array ("_#FOTO2___", "_#LEYEND2_");:} {switch({_#FOTO3___}).+:g_ImageTable[g_imax++] = new Array ("_#FOTO3___", "_#LEYEND3_");:} {switch({_#FOTO4___}).+:g_ImageTable[g_imax++] = new Array ("_#FOTO4___", "_#LEYEND4_");:} {switch({_#FOTO5___}).+:g_ImageTable[g_imax++] = new Array ("_#FOTO5___", "_#LEYEND5_");:} {switch({_#FOTO6___}).+:g_ImageTable[g_imax++] = new Array ("_#FOTO6___", "_#LEYEND6_");:} {switch({_#FOTO7___}).+:g_ImageTable[g_imax++] = new Array ("_#FOTO7___", "_#LEYEND7_");:} {switch({_#FOTO8___}).+:g_ImageTable[g_imax++] = new Array ("_#FOTO8___", "_#LEYEND8_");:} {switch({_#FOTO9___}).+:g_ImageTable[g_imax++] = new Array ("_#FOTO9___", "_#LEYEND9_");:} {switch({_#FOTO10__}).+:g_ImageTable[g_imax++] = new Array ("_#FOTO10__", "_#LEYEND10");:} //extend the above list as desired g_dwTimeOutSec=2 ////End configuration///////////////////////////// SECCION PIE HTML if (document.getElementById||document.all) window.onload=Play </script>

Free DHTML scripts provided by
<a href="http://dynamicdrive.com">Dynamic Drive</a>


3. Lo incluyen en su modulo de sitio o en su defecto en la pagina SHTML que usen.

Basicamente, eso es todo

Saludos

Adam