• [Mod] Random image / Zufallsbild 5 0 5 1
Currently:  

Author Topic: [Mod] Random image / Zufallsbild  (Read 866999 times)

0 Members and 1 Guest are viewing this topic.

Offline waynenort

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #600 on: August 13, 2009, 03:20:57 PM »
cheers

Offline MoXxinator

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #601 on: August 14, 2009, 09:51:26 AM »
Ich verstehe hier nur noch Bahnhof, nachdem ich hier ungefähr 20 seiten durchgelesen habe. Ich habe den code hier

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: random_full.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.                                                        *
 *                                                                        *
 *************************************************************************/

[color=red]// http://meine_homepage/unterordner/4images[/color]
define('ROOT_PATH''./4images/');    

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) : 0;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_media_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'];
$full_src = (is_remote($row['image_media_file'])) ? $row['image_media_file'] : ROOT_PATH.MEDIA_DIR."/".$cat_id."/".$row['image_media_file'];

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

genommen und als random_php auf meinen Server geladen, so jetzt setzt es bei mir aus, habe den pfad zur 4images galerie eingegeben , aber es funktioniert nicht (rot gekennzeichnet)? Was mache ich falsch?Habe den pfad auch schon woanders eingefügt aber es klappt einfach nicht.

Danke für die hilfe

Offline Horvath

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #602 on: September 06, 2009, 05:05:34 AM »
Is there anyway that when using this mod. . . . .  When the thumbnail is clicked the page opens up in a New/blank window?  Setting the Target for the link to blank ?

I am guessing setting the target to blank in this line somewhere. . .  Just not sure where. .  Any thoughts?

document. write('<a href=\"". SCRIPT_URL. "details. php?image_id=$image_id\"><img src=\"". $full_src. "\" border=\"1\" alt=\"$image_name\"></a>');

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #603 on: September 06, 2009, 11:33:22 PM »
Is there anyway that when using this mod. . . . .  When the thumbnail is clicked the page opens up in a New/blank window?  Setting the Target for the link to blank ?

I am guessing setting the target to blank in this line somewhere. . .  Just not sure where. .  Any thoughts?

document. write('<a href=\"". SCRIPT_URL. "details. php?image_id=$image_id\"><img src=\"". $full_src. "\" border=\"1\" alt=\"$image_name\"></a>');

hi Horvath,

Code: [Select]
document. write('<a href=\"". SCRIPT_URL. "details. php?image_id=$image_id\" target=\"_blank\"><img src=\"". $full_src. "\" border=\"1\" alt=\"$image_name\"></a>');
@MoXxinator
ich verstehe auch leider nur bahnhof ;)
bitte link zu deiner gallery und zu der random.php
und denn link wo du es einfügen willst.

dann könnten wir abfahren ;)
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline ahsancharming

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #604 on: September 29, 2009, 07:16:18 PM »
Quote from: V@no link=topic=1020. msg12102#msg12102 date=1038641102
I think I fixed the script when it chose non picture file and shows red X.
I modified it so now it wont return full <img code, but will return full path with filename.  Plus now u can show thumbnail and/or full picture.
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''./4images/');  // change this to your 4images dir.
include(ROOT_PATH.'config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');
define('ICON_PATH'ROOT_PATH.TEMPLATE_DIR."/default/icons/"); // path to your template icons.
$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;
}
function 
get_file_extension($file_name) {
  
ereg("(.+)\.(.+)"basename($file_name), $regs);
  return 
strtolower($regs[2]);
}
function 
check_thumb_type($file_name) {
  return (
preg_match('#(gif|jpg|jpeg|png)$#is'$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) : 0;
$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_media_file, 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_extention get_file_extension($row['image_media_file']);
$image_id $row['image_id'];
$cat_id $row['cat_id'];
$image_name $row['image_name'];
$image_comments $row['image_comments'];

if (empty(
$row['image_thumb_file'])) { 
  
$thumb_src ICON_PATH."/".$image_extention.".gif"

else {
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
}
if (!
check_thumb_type($image_extention)) {
$full_src ICON_PATH."/".$image_extention.".gif";
}
else {
$full_src = (is_remote($row['image_media_file'])) ? $row['image_media_file'] : ROOT_PATH.MEDIA_DIR."/".$cat_id."/".$row['image_media_file'];
}
$full_src_link ROOT_PATH."details.php?image_id=$image_id";
?>
Now u'll need call random. php file just ones
Code: [Select]
<?php include("random.php"); ?>
after that u can show thumbnail:
Code: [Select]
<img src="<?php echo $thumb_src?>" border="1">or show full picture:
Code: [Select]
<img src="<?php echo $full_src?>" border="1">if u need add link to the image, use like this:
Code: [Select]
<a href="<?php echo $full_src_link?>">
<img src="<?php echo $thumb_src?>" border="1">
</a>



well iam getting this error . . plz help me out :idea:

Code: [Select]
Warning: include(./wallzz/config.php) [function.include]: failed to open stream: No such file or directory in /home/wallpapr/public_html/wallzz/random.php on line 29

Warning: include(./wallzz/config.php) [function.include]: failed to open stream: No such file or directory in /home/wallpapr/public_html/wallzz/random.php on line 29

Warning: include() [function.include]: Failed opening './wallzz/config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/wallpapr/public_html/wallzz/random.php on line 29

Warning: include(./wallzz/includes/db_mysql.php) [function.include]: failed to open stream: No such file or directory in /home/wallpapr/public_html/wallzz/random.php on line 30

Warning: include(./wallzz/includes/db_mysql.php) [function.include]: failed to open stream: No such file or directory in /home/wallpapr/public_html/wallzz/random.php on line 30

Warning: include() [function.include]: Failed opening './wallzz/includes/db_mysql.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/wallpapr/public_html/wallzz/random.php on line 30

Warning: include(./wallzz/includes/constants.php) [function.include]: failed to open stream: No such file or directory in /home/wallpapr/public_html/wallzz/random.php on line 31

Warning: include(./wallzz/includes/constants.php) [function.include]: failed to open stream: No such file or directory in /home/wallpapr/public_html/wallzz/random.php on line 31

Warning: include() [function.include]: Failed opening './wallzz/includes/constants.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/wallpapr/public_html/wallzz/random.php on line 31

Fatal error: Class 'Db' not found in /home/wallpapr/public_html/wallzz/random.php on line 33

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #605 on: September 29, 2009, 07:32:07 PM »
@ ahsancharming

... "No such file or directory ... random.php" ...
... where is your random.php ... ?
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline ahsancharming

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #606 on: September 29, 2009, 11:23:23 PM »
i uploaded in my 4images gallery root

thats what inside my random. php
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: random_more_pics.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''./wallzz/');

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

define('SCRIPT_URL''http://www.wallpaperspecial.com/wallzz');

$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;
}

// NUMBER OF THUMBNAILS TO DISPLAY / NUMMER DER GEWÜNSCHTEN THUMBNAILS
$num_images 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.
        ORDER BY RAND() 
        LIMIT 
$num_images";
$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)){
  
$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 
"<table border='0' width='133' bgcolor='#FFFFFF' Align=left>\n";
  echo 
"<TR>\n";
  echo 
"<TD><a href=\"".SCRIPT_URL."details.php?image_id=$image_id\" target=\"_blank\"> <img src=\"".SCRIPT_URL.$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
  echo 
"</TR>\n";
  echo 
"<TR>\n";
  echo 
"<TD bgcolor='#FFFFFF'> <a href=\"".SCRIPT_URL."details.php?image_id=$image_id\" target=\"_blank\"> <b>$image_name</b></a><br>\n";
  echo 
"</TR>\n";
  echo 
"<TR>\n";
  echo 
"<TD bgcolor='#FFFFFF'>Kommentare: $image_comments</TD>\n";
  echo 
"</TR>\n";
  echo 
"</table>\n";
}
?>



is it correct?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #607 on: September 29, 2009, 11:44:37 PM »
if random.php is in your 4images ROOT

then

Code: [Select]
define('ROOT_PATH', './wallzz/');should be
Code: [Select]
define('ROOT_PATH', './');
and change
Code: [Select]
define('SCRIPT_URL', 'http://www.wallpaperspecial.com/wallzz');to
Code: [Select]
define('SCRIPT_URL', 'http://www.wallpaperspecial.com/wallzz/');
after changes call

http://www.wallpaperspecial.com/wallzz/random.php


and ADD ASAP 4images copyright back.
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline ahsancharming

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #608 on: September 30, 2009, 02:33:22 AM »
thx but i want few changes

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: random_more_pics.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');

define('SCRIPT_URL''http://www.wallpaperspecial.com/wallzz/');

$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;
}

// NUMBER OF THUMBNAILS TO DISPLAY / NUMMER DER GEWÜNSCHTEN THUMBNAILS
$num_images 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.
        ORDER BY RAND() 
        LIMIT 
$num_images";
$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)){
  
$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 
"<table border='0' width='133' bgcolor='#FFFFFF' Align=left>\n";
  echo 
"<TR>\n";
  echo 
"<TD><a href=\"".SCRIPT_URL."details.php?image_id=$image_id\" target=\"_blank\"> <img src=\"".SCRIPT_URL.$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
  echo 
"</TR>\n";
  echo 
"<TR>\n";
  echo 
"<TD bgcolor='#FFFFFF'> <a href=\"".SCRIPT_URL."details.php?image_id=$image_id\" target=\"_blank\"> <b>$image_name</b></a><br>\n";
  echo 
"</TR>\n";
  echo 
"<TR>\n";
  echo 
"<TD bgcolor='#FFFFFF'>Views: $image_hits</TD>\n";
  echo 
"</TR>\n";
  echo 
"</table>\n";
}
?>



i've added ($image_hits) but its not working and i want USER FRIENDLY URLS.  solve theze 2 lil probs. . rest all f9.

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #609 on: September 30, 2009, 09:19:05 AM »
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: random_more_pics.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');

define('SCRIPT_URL''http://www.wallpaperspecial.com/wallzz/');

$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;
}

// NUMBER OF THUMBNAILS TO DISPLAY / NUMMER DER GEWÜNSCHTEN THUMBNAILS
$num_images 4;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_hits 
        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.
        ORDER BY RAND() 
        LIMIT 
$num_images";
$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)){
  
$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'];
  
$image_hits $row['image_hits'];


  echo 
"<table border='0' width='133' bgcolor='#FFFFFF' Align=left>\n";
  echo 
"<TR>\n";
  echo 
"<TD><a href=\"".SCRIPT_URL."details.php?image_id=$image_id\" target=\"_blank\"> <img src=\"".SCRIPT_URL.$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
  echo 
"</TR>\n";
  echo 
"<TR>\n";
  echo 
"<TD bgcolor='#FFFFFF'> <a href=\"".SCRIPT_URL."details.php?image_id=$image_id\" target=\"_blank\"> <b>$image_name</b></a><br>\n";
  echo 
"</TR>\n";
  echo 
"<TR>\n";
  echo 
"<TD bgcolor='#FFFFFF'>Views: $image_hits</TD>\n";
  echo 
"</TR>\n";
  echo 
"</table>\n";
}
?>

about: USER FRIENDLY URLS
rightnow this is not possible from my side.
« Last Edit: October 01, 2009, 01:39:59 PM by Nicky »
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline ahsancharming

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #610 on: September 30, 2009, 03:05:47 PM »
ok Copyright Tag Added on all pages of http://www.wallpaperspecial.com/wallzz/

now please solve the issue?
..

[EDIT]
i edited my previous post.
« Last Edit: October 01, 2009, 01:40:38 PM by Nicky »

Offline ahsancharming

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #611 on: October 01, 2009, 06:21:30 PM »
HELP NEEDED BADLY..!

http://www.wallpaperspecial.com/wallzz/random.php

i have changed the background colour but "image name" and "VIEWS" bg colour is still showing WHITE.. how can i edit the font n bg colour by my needs and also can i change the thumbnail size?

please help me out regarding this..

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #612 on: October 01, 2009, 08:49:27 PM »
hi,

change you colors here
Code: [Select]
echo "<TD bgcolor='#FFFFFF'> <a href=\"".SCRIPT_URL."details.php?image_id=$image_id\" target=\"_blank\"> <b>$image_name</b></a><br>\n";
Code: [Select]
echo "<TD bgcolor='#FFFFFF'>Views: $image_hits</TD>\n";
thumnails are in original size, but you can add width and height to your html code at
Code: [Select]
<img src=\"".SCRIPT_URL.$thumb_src."\" border=\"0\" alt=\"$image_name\">
and thank you for added 4images copyright back
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline ahsancharming

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #613 on: October 02, 2009, 08:51:02 AM »
well thanx alot but i still want it to be perfect

1) i want a hyperlink of category on category name.
2) i wont the font in "CENTER" , "VERDENA" and "Size.2".
3) is it possile to use friendly urls ?

Offline shadowhunter

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • Fotogalerie & Fotocommunity scluzern.com
Re: [Mod] Random image / Zufallsbild
« Reply #614 on: October 02, 2009, 06:02:17 PM »
Hallo!

Ich habe noch eine kurze Frage bezüglich Sicherheit:

Sollte bei "$image_name = $row['image_name'];" nicht eine Sicherheits-Funktion, wie "format_text(..." oder "safe_htmlspecialchars(..." oder so änlich eingebaut/berücksichtigt werden?

Danke & Gruss