Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/07/2006, 03:55
Natea
 
Fecha de Ingreso: septiembre-2003
Ubicación: Barcelona
Mensajes: 7
Antigüedad: 20 años, 8 meses
Puntos: 0
[php-nuke] Ayuda mini modificacion bloque my egallery

Hola,
hago una petición porque necesito hacer una modificación con el bloque random pic de my_egallery para php-nuke. Creo q no es algo muy dificil.

Bueno, lo que necesito solo es poner un enlace debajo del bloque que lleve a la galería, es decir, sale el titulo del bloque, la foto y debajo de ésta el titulo de la foto, si le haces clic t lleva a la imagen grande, pues yo necesito que debajo del titulo aparezca un enlace tipo "Ver más" o "Ir a la galería" y q éste lleve al indice de la galería, o sea, con la url del modulo nada más.

Pongo aquí el código del modulo por si alguien no lo tiene:

Código:
<?php 



/************************************************************************/ 

/* PHP-NUKE: Web Portal System                                          */ 

/* ===========================                                          */ 

/*                                                                      */ 

/* Copyright (c) 2001 by Idefix                                         */  

/*                                                                      */ 

/* This program is free software. You can redistribute it and/or modify */ 

/* it under the terms of the GNU General Public License as published by */ 

/* the Free Software Foundation; either version 2 of the License.       */ 

/************************************************************************/ 

/************************************************************************/ 

/* Filename: Block randompic                                            */ 

/* Original  Author:Idefix                                              */ 

/* Tested With PHP NUKE 5.2 and MEG 2.7.4                               */ 

/************************************************************************/ 





if (eregi("block-randompic.php",$PHP_SELF)) { 

    Header("Location: index.php"); 

    die(); 

} 



$blocks_modules[randompic] = array( 

    'title' => "randompic", 

    'func_display' => 'randompic', 

    'func_add' => '', 

    'func_update' => '', 

    'text_type' => 'randompic', 

    'text_type_long' => '', 

    'text_content' => "randompic", 

    'support_nukecode' => false, 

    'allow_create' => false, 

    'allow_delete' => false, 

    'form_url' => false, 

    'form_content' => false, 

    'form_refresh' => false 

); 



   global $user, $prefix; 

    

   include 'admin/modules/gallery/config.php'; 

   mt_srand((double)microtime()*1000000); 

   if (is_user($user)) 

      $total = mysql_fetch_array(mysql_query("SELECT COUNT(p.pid) AS total FROM $prefix"._gallery_pictures." AS p LEFT JOIN $prefix"._gallery_categories." AS c ON c.gallid=p.gid WHERE c.visible>=1")); 

   else 

      $total = mysql_fetch_array(mysql_query("SELECT COUNT(p.pid) AS total FROM $prefix"._gallery_pictures." AS p LEFT JOIN $prefix"._gallery_categories." AS c ON c.gallid=p.gid WHERE c.visible>=2")); 

    

   $p = mt_rand(0,($total[total] - 1)); 



   $pic = mysql_fetch_array(mysql_query("SELECT p.pid, p.img, p.name, p.description, c.galloc FROM $prefix"._gallery_pictures." AS p LEFT JOIN $prefix"._gallery_categories." AS c ON c.gallid=p.gid LIMIT $p,1")); 

    

   $pic[description] = htmlentities($pic[description]); 

    

   if (file_exists("$gallerypath/$pic[galloc]/thumb/$pic[img]")) 

      $content = "<center><a href=\"$baseurl&amp;do=showpic&amp;pid=$pic[pid]\"><img src=\"$gallerypath/$pic[galloc]/thumb/$pic[img]\" width=\"120\" border=\"0\" alt=\"$pic[description]\"><br><font size=\"1\">$pic[name]</font></a></center>"; 

   else 

      $content = "<center><a href=\"$baseurl&amp;do=showpic&amp;pid=$pic[pid]\"><img src=\"$gallerypath/$pic[galloc]/$pic[img]\" width=\"120\" border=\"0\" alt=\"$pic[description]\"><br><font size=\"1\">$pic[name]</font></a></center>"; 

  

?>
Yo no tg muchos conocimientos de php, probe de hacer el enlace con html pero evidentemente no me funciona y no se exactamente donde colocar el codigo para el enlace.

Aqui la url de la web, para ver el bloque, está izq abajo:

w w w . paideiasports . com/marxa/