Geezup | |
 Póg mo thóin :)
 Grupo: MemberMensajes: 1074 Status:  | |
| no hay llamada nada.. es sólo identificar el link  <a rel="lightbox"... lo que pasa que todo el tema del aleatorio, nosotros tiramos de base de datos... lo cual, lo hace chupao, sino habría que hacer lo mismo, pero recorriendo lo que tengáis en el directorio. Os pego el código del plugin para mi CMS, por si os sirve de algo : CODE <?php
$conexion=bd_connect();
$nombrePlugin = "randomsnap_plugin";
$idioma_id = $_GET['lang'] != "" ? (int) $_GET['lang'] : 1;
$strSQL = "SELECT traduccion_plugins_traducciones FROM " . TABLA_TRADUCCION_PLUGINS . " WHERE traduccion_plugins_titulo='" . $nombrePlugin."'"; $recordset_traduccion = bd_createRecordset($strSQL,$conexion); $data_traduccion=bd_fetch_array($recordset_traduccion); $traducciones = split(",",$data_traduccion['traduccion_plugins_traducciones']);
$pintarComoMenu = false; $titulo=$traducciones[$idioma_id-1];
$strSQL = "SELECT games_romCRC, games_gameName, systems_name, systems_path2images FROM " . TABLA_JUEGOS . " INNER JOIN " . TABLA_SISTEMAS . " on systems_id = games_system_id WHERE games_ingamepic = 1 ORDER BY RAND() LIMIT 1"; $rs = bd_createRecordset($strSQL,$conexion); $data=bd_fetch_array($rs);
$cadena="<div align='center'><a href='/screenshots/{$data['systems_path2images']}/snaps/{$data['games_romCRC']}.png' rel='lightbox' border='0'><img width='120px' height='120px' src='/screenshots/{$data['systems_path2images']}/snaps/{$data['games_romCRC']}.png' alt='".$data['games_gameName']." / ". $data['systems_name']."' title='".$data['games_gameName']." / ". $data['systems_name']."' border='0'/></a></div>";
$texto=$cadena; ?> Esa sentencia SQL hace una selección aleatoria de un único registro. Las variables $titulo y $texto luego son pilladas por el parser y ya pinta el menú tal como se ve, con el borde naranja y demás. |