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

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

0 Members and 1 Guest are viewing this topic.

Offline squalls_dreams

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #510 on: March 15, 2008, 08:16:14 PM »
alright I dont wanna read through all these posts so I'm gonna ask. I put this code on my site and all that shows up is a blank image. heres the url to my site, http://www.ffbte.net



Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [Mod] Random image / Zufallsbild
« Reply #511 on: March 16, 2008, 07:40:23 AM »
Hi,

put the random.php in the main folder from 4images.

 :!: And rebuild the copyright text on your page:
http://www.ffbte.net/ffgallery/
Your changes are not allowed :!:


KurtW
« Last Edit: March 16, 2008, 07:29:48 PM by KurtW »

Offline squalls_dreams

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #512 on: March 16, 2008, 06:40:56 PM »
alright, thanks 8)

alright it works..

I just copy and pasted a code that someone else posted up on the page before this one.
« Last Edit: March 16, 2008, 07:16:49 PM by squalls_dreams »

Offline spanky

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #513 on: April 13, 2008, 06:20:58 PM »
I have uploaded the random.php into my gallery directory. I get a blank page. Any ideas?

Offline Spanien-Portal

  • Pre-Newbie
  • Posts: 2
  • Lebe Dein Leben, jeden Tag
    • View Profile
    • User bewerten: Gesehenes, Besuchtes, Erlebtes
Re: [Mod] Random image / Zufallsbild
« Reply #514 on: April 17, 2008, 07:28:11 PM »
Hallo All,

ich habe die random.php eingebuat, mit der Erweiterung, dass angezeigte Bilder bei anklicken im neuen Fenster öffnen.
Soweit, so gut.

Nun habe ich noch ein paar Fragen:

1. Wie kann ich die Schriftgrösse verändern? (zum Beispiel: Bildname und Comments = in kleinerer Schrift anzeigen)

2. Wie kann ich das angezeigte Bild proportional verkleinert anzeigen lassen, da ich es in meiner Homepage anzeigen möchte, wo allerdings nur 90% des Bildes Platz hätten?

3. Gibt es eine Möglichkeit, dass ich verschiedene Kategorien NICHT anzeigen lasse?

Dank im Voraus an alle "Tüftler" und solche, die mir vielleicht helfen können.

Sonja
.

Offline honda2000

  • 4images Guru
  • *******
  • Posts: 3.263
    • View Profile
    • Wir machen Internet!
Re: [Mod] Random image / Zufallsbild
« Reply #515 on: April 17, 2008, 08:08:13 PM »
2. ControlPanel > Bilder verwalten > Auto-Image-Resizer Bilder proportional verkleinern
1. style.css in den jeweilgen zeilen, Tabellen font-size: xxxpx; einfügen
oder im jeweilgen Template <font-size="xxx"> </font> besser wäre style="font-size: xxxpx;"
3. ControlPanel Kategorien bearbeiten: wer darf was? z.B. sehen nur Administartoren oder ....

werd ich jetzt zum Clubbesuch eingeladen? :wink: :lol:

Offline Spanien-Portal

  • Pre-Newbie
  • Posts: 2
  • Lebe Dein Leben, jeden Tag
    • View Profile
    • User bewerten: Gesehenes, Besuchtes, Erlebtes
Re: [Mod] Random image / Zufallsbild
« Reply #516 on: April 17, 2008, 09:17:34 PM »
@ honda2000

Herzlichen Dank für die prompte Antwort.
Siehste, ich bin doch schusselig blond :-(

auf die Einstellungen per css hätte ich auch selbst kommen können...

Nur ... ich möchte ja die Thumbs proportional verkleinern und NICHT die Thumbs in der Original-Plattform verändern!

Das gleiche gilt bei den angezeigten Thumbs im externen Web. Dort sollen gewisse Kategorien NICHT angezeigt werden, aber den Usern in der Original-Plattform soll der Zugang zu allen Bereichen (nach Möglichkeit) ohne Registrierung möglich sein.

Puuuuh... das war hoffentlich verständlich geschrieben ???

*grins* zum Thema Clubbesuch... ist leider etwas weit von hier aus (Costa del Sol) ... hi hi, sonst, "Warum nicht?" *lach*

Sonnige Grüße an alle hier, Sonja
.

Offline nfdieter

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Unser kleiner Zoo
Re: [Mod] Random image / Zufallsbild
« Reply #517 on: June 05, 2008, 07:18:22 PM »
Moin Nicki,

hab jetzt die random.php integriert mit Iframe und als Beispiel 4 Thumbs...
Ist es möglich, die Thumbs horizontal statt vertikal anzuzeigen?

Weil das sieht echt ein wenig doof aus :roll:
http://emmelsbuell.net/cms/html/modules.php?name=Content&pid=2

Gruß Dieter

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #518 on: June 05, 2008, 10:02:33 PM »
wenn du name und comments ausgelassen hast ist es einfach

ändere
Code: [Select]
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
auf
Code: [Select]
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a>&nbsp;\n";
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 nfdieter

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Unser kleiner Zoo
Re: [Mod] Random image / Zufallsbild
« Reply #519 on: June 06, 2008, 07:17:42 PM »
Danke Nicky,

klappt  :D

Gruß Dieter

Offline *handsome*

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #520 on: September 22, 2008, 07:55:13 AM »
welll i want to show more than one images plz help

and how can i shopw images of specific catagory i had try this

        AND a.cat_id=4

but it is not working Sad

Offline Patrick81

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #521 on: September 30, 2008, 08:35:03 AM »
Hi,

thanks for this great mod!

I would like to ask you, if its possible to add an "slideshow" feature with fade-in - fade-out effect for new pictures everyl ~30 minute?

Thanks!
Pat

this is my script without slideshow and fade-in/fade-out:
Quote
<?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.                                                        *
 *                                                                        *
 *************************************************************************/

// PATH TO YOUR 4images Gallery
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)) ? 1 : 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'];

$bgcolor1 = "#e5e5e5";
$bgcolor2 = "#e5e5e5";
$bgcolor3 = "#e5e5e5";
$bgcolor4 = "#e5e5e5";
$textcolor1 = "#000000";
$textcolor2 = "#000000";

//echo "<body bgcolor=\"#e5e5e5\" text=\"#000000\"
//echo "<style="background-color:#e5e5e5">
echo "<body bgcolor=\"#e5e5e5\"><a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$full_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
?>
« Last Edit: September 30, 2008, 10:14:30 AM by Patrick81 »

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #522 on: September 30, 2008, 08:53:25 AM »
welll i want to show more than one images plz help

and how can i shopw images of specific catagory i had try this

        AND a.cat_id=4

but it is not working Sad

*handsome* use this:
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');

$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."
        AND a.cat_id = 4
        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 
"<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
  echo 
"<b>$image_name</b><br>\n";
  echo 
"Comments: $image_comments<hr>\n";
}
?>
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 *handsome*

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #523 on: October 08, 2008, 07:34:05 AM »
welll i want to show more than one images plz help

and how can i shopw images of specific catagory i had try this

        AND a.cat_id=4

but it is not working Sad

*handsome* use this:
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');

$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."
        AND a.cat_id = 4
        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 
"<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
  echo 
"<b>$image_name</b><br>\n";
  echo 
"Comments: $image_comments<hr>\n";
}
?>


thanks for help..

but is it possible to open image in new window... forexample when visitor click on random image its open in new window

i try to add blank tag but it is not working (givving some errors

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [Mod] Random image / Zufallsbild
« Reply #524 on: October 08, 2008, 07:14:40 PM »
Hi*handsome*,

use this:

Code: [Select]
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";or
Code: [Select]
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\" onclick=\"opendetailwindow()\" target=\"detailwindow\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br />\n";

Kurt