Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tripiyon

Pages: [1] 2 3
1
Español / Castellano / Re: mas de una imagen aleatoria?
« on: May 09, 2008, 11:13:43 AM »
Este es el código que tengo en la plantilla aleatoria.php

Code: [Select]
<?php
/**************************************************************************
*                                                                        *
*    4images - A Web Based Image Gallery Management System               *
*    ----------------------------------------------------------------    *
*                                                                        *
*             File: random.php                                           *
*        Copyright: (C) 2002 Jan Sorgalla                                *
*            Email: jan@4homepages.de                                    *
*              Web: http://www.4homepages.de                             *
*    Scriptversion: 1.0 for 4images 1.6.1                                *
*                                                                        *
*    Never released without support from: Nicky (http://www.nicky.net)   *
*                                                                        *
**************************************************************************
*                                                                        *
*    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
*    bedingungen (http://www.4homepages.de/4images/lizenz.php) für       *
*    weitere Informationen.                                              *
*    ---------------------------------------------------------------     *
*    This script is NOT freeware! Please read the Copyright Notice       *
*    (http://www.4homepages.de/4images/lizenz_e.php) for further         *
*    information.                                                        *
*                                                                        *
*************************************************************************/

// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH','./');

include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');

$site_db = new Db($db_host$db_user$db_password$db_name);
function 
is_remote($file_name) {
  return (
preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

$sql "SELECT COUNT(*) as total_images
        FROM ("
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b)
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat="
.AUTH_ALL."
        AND b.auth_viewimage="
.AUTH_ALL."
        "
;
$row $site_db->query_firstrow($sql);
$total_images $row['total_images'];

mt_srand((double)microtime() * 1000000);
$number = ($total_images 1) ? mt_rand(0$total_images 1) : 4;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
        FROM ("
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b)
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat="
.AUTH_ALL."
        AND b.auth_viewimage="
.AUTH_ALL."
        LIMIT 
$number, 1";
$row $site_db->query_firstrow($sql);
$image_id $row['image_id'];
$cat_id $row['cat_id'];
$image_name $row['image_name'];
$image_comments $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

echo 
"<a href=\"".ROOT_PATH."details.php?image_id=$image_id\" target=\"_blank\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
?>

Y este es el código que tengo en el foro donde quiero que se muestren las miniaturas.

Code: [Select]
<iframe src="http://www.foro-creativo.com/galeria/aleatoria.php" width="100" height="100" scrolling="no" frameborder="0"></iframe>

2
Español / Castellano / Re: mas de una imagen aleatoria?
« on: May 08, 2008, 08:51:46 PM »
La modificación la he hecho las dos veces.
Tengo PHP 4.4.7 en el servidor y Mysql 5.0.22.

Lo que no he entendido es lo que dices de tenerlo en el mismo directorio del foro. Yo la plantilla con el script la he tenido siempre en el directorio raiz de la galería, no la del foro. La galería está en un subdirectorio dentro del raiz del foro.

Gracias por tu respuesta Excitex2  :D

3
Español / Castellano / Re: mas de una imagen aleatoria?
« on: May 08, 2008, 08:34:27 AM »
He probado a hacer lo que me dices y siguen sin salir las miniaturas. No entiendo que puede ser.
Gracias por la ayuda Manurom  :)

4
Español / Castellano / Re: mas de una imagen aleatoria?
« on: May 07, 2008, 10:48:48 AM »
Nadie sabe nada?

5
Gracias,

Funcionando en la versión 1.7.6 perfectamente  :D

7
Hi,

I have Mysql 5.0.45 and me the script does not work.
What change do I need in the code in order that it works well?

Thanks


Just replace in index.php
Code: [Select]
ORDER BY i.image_date DESC with
Code: [Select]
AND i.image_date >= ".(time() - 60 * 60 * 24 * $config['new_cutoff'])."
ORDER BY RAND()
This requires MySQL version >= 3.23.23

Greets Jan

8
Español / Castellano / Re: mas de una imagen aleatoria?
« on: May 01, 2008, 01:15:03 PM »
Hola a todos,

He instalado la última versión de la galería y ahora no me muestra las miniaturas en el iframe, tengo que hacer algún cambio en el código de la plantilla aleatoria.php?
Podéis ver el iframe en ESTA PÁGINA donde dice "VISITA NUESTRA GALERÍA"

El código que tengo en la plantilla es el siguiente:

Code: [Select]
<?php
/**************************************************************************
*                                                                        *
*    4images - A Web Based Image Gallery Management System               *
*    ----------------------------------------------------------------    *
*                                                                        *
*             File: random.php                                           *
*        Copyright: (C) 2002 Jan Sorgalla                                *
*            Email: jan@4homepages.de                                    *
*              Web: http://www.4homepages.de                             *
*    Scriptversion: 1.0 for 4images 1.6.1                                *
*                                                                        *
*    Never released without support from: Nicky (http://www.nicky.net)   *
*                                                                        *
**************************************************************************
*                                                                        *
*    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
*    bedingungen (http://www.4homepages.de/4images/lizenz.php) für       *
*    weitere Informationen.                                              *
*    ---------------------------------------------------------------     *
*    This script is NOT freeware! Please read the Copyright Notice       *
*    (http://www.4homepages.de/4images/lizenz_e.php) for further         *
*    information.                                                        *
*                                                                        *
*************************************************************************/

// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH','./');

include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');

$site_db = new Db($db_host$db_user$db_password$db_name);
function 
is_remote($file_name) {
  return (
preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

$sql "SELECT COUNT(*) as total_images
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat="
.AUTH_ALL."
        AND b.auth_viewimage="
.AUTH_ALL."
        "
;
$row $site_db->query_firstrow($sql);
$total_images $row['total_images'];

mt_srand((double)microtime() * 1000000);
$number = ($total_images 1) ? mt_rand(0$total_images 1) : 4;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat="
.AUTH_ALL."
        AND b.auth_viewimage="
.AUTH_ALL."
        LIMIT 
$number, 1";
$row $site_db->query_firstrow($sql);
$image_id $row['image_id'];
$cat_id $row['cat_id'];
$image_name $row['image_name'];
$image_comments $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

echo 
"<a href=\"".ROOT_PATH."details.php?image_id=$image_id\" target=\"_blank\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
?>

9
Discussion & Troubleshooting / Re: query problems with MySQL 5.0.x
« on: April 29, 2008, 10:13:10 AM »
Hi Nicky,

I ask for excuses you for the lateness.
I leave a link with the files of the gallery, in order that you could see them.

HERE

Thank you very much

10
Discussion & Troubleshooting / Re: query problems with MySQL 5.0.x
« on: April 27, 2008, 11:31:56 AM »
Hi Nicky,

The problem is that the gallery does not work.
No link works and I cannot enter as user.

It does not work at all.

P.D.: Forgive my Englishman(English), I am Spanish and do not dominate the language.

Kind Regards

11
Discussion & Troubleshooting / Re: query problems with MySQL 5.0.x
« on: April 24, 2008, 11:47:50 AM »
Hello to all.

I have done all the changes that he says V@no, but me the links do not work
The page returns to remain equal.

My version is the 1.7 and I have Mysql 5.0.45

Here you can see my gallery.
http://www.galeriatripiyon.com/galeria

12
Español / Castellano / Re: No se visualizan imágenes JPG
« on: April 09, 2008, 02:59:41 PM »
Hola de nuevo,

Se me olvidó decir que esta misma galería está funcionando correctamente en el siguiente enlace

http://www.galeriade.com/artedigital/

13
Español / Castellano / Re: No se visualizan imágenes JPG
« on: April 08, 2008, 07:12:32 PM »
Alguna pista?

Un saludo

14
Español / Castellano / No se visualizan imágenes JPG
« on: April 07, 2008, 01:43:22 PM »
Hola a todos,

El problema que tengo es que he cambiado la galería de servidor y cuando entro en una imagen jpg la página queda en blanco y no aparece nada.
Si miráis en la página de inicio, al pinchar sobre cualquiera de las imágenes, ocurre lo que digo,

http://www.escuelaphotoshop.com/digital/

Sin embargo, si la imagen que intentamos ver es png, gif o swf no hay problema ninguno y se visualiza perfectamente. En esta página tenéis imágenes con esos formatos.

http://www.escuelaphotoshop.com/digital/categories.php?cat_id=9

Es algo realmente raro, ya que en el cambio he copiado el sitio tal cual estaba, la base de datos es la misma, he comprobado que safe_mode esté en OFF y tengo todos los permisos en 777 a excepción del fichero de configuración que está protegido.

He estado buscando por el foro y no soy capaz de encontrar ningún problema similar al que me ocurre.
Espero que podáis ayudarme.

Un saludo

15
Hola,
Me ha ocurrido algo curioso, he instalado la versión 1.7.3. desde cero, y al cargar la base de datos que tengo en la otra versión, todo son errores. Significa esto que pierdo la antigua base de datos?  :roll:

Pages: [1] 2 3