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

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

0 Members and 1 Guest are viewing this topic.

Offline Dipi

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #555 on: November 21, 2008, 02:57:30 PM »
... eine Löschfunktion für die Thumbs im ACP gibt es nur über die Bild-bearbeiten-Seite ...
... sollte dir das zu mühselig sein, dann via FTP ... /data/media/thumbnails/ ... in den einzelnen Nr.-Ordnern die Thumbnails löschen ...
... und dann via ACP -> Auto-Thumbnailer die neuen, größeren Thumbnails erzeugen ...

... soweit zur Theorie ... und jetzt bist du dran ... ;)

Auch das habe ich geschafft. Jetzt sieht das auf jeden Fall viel besser aus. Danke für deine Hilfe!

Gruss

Dipi

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #556 on: November 21, 2008, 03:13:25 PM »
... tatsächlich ... die Thumbs sind alle größer ... ;)
... nun solltest du aber noch dein Galerie-Template anpassen ...
... so dass die großen Thumbs dir nicht das Layout sprengen ...
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 honda2000

  • 4images Guru
  • *******
  • Posts: 3.263
    • View Profile
    • Wir machen Internet!
Re: [Mod] Random image / Zufallsbild
« Reply #557 on: December 04, 2008, 06:23:20 PM »
hi, ich hab auch ne Frage zum Random:

random.php
Zeile 66

Code: [Select]
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img
src=\"".$thumb_src."\" border=\"1\" alt=\"$image_name\"></a><br>\n";

jetzt liegt aber die Galerie in einem Frame mit .htaccess,
siehe:
http://www.4homepages.de/forum/index.php?topic=19882.0
letzte Antwort

wie aber, bekomm eich es hin, das bei www.suppenlaender.de

rechts beim Random-Image, die Galerie innerhalb des Frames öffnet, oben in der reinen Navi, Fotogalerie, klappts ja auch
 


Offline Daniel

  • Full Member
  • ***
  • Posts: 183
  • php rockt
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #558 on: December 04, 2008, 06:48:56 PM »
denke mal das nur der header fehlt...
4images in Benutzung/use seit/since 2002 / Version 1.7.6

Offline honda2000

  • 4images Guru
  • *******
  • Posts: 3.263
    • View Profile
    • Wir machen Internet!
Re: [Mod] Random image / Zufallsbild
« Reply #559 on: December 04, 2008, 07:28:03 PM »
???
dann würde ja: http://www.suppenlaender.de/fotogalerie/index.php
nicht funktionieren, klar ist der header da!
guckste: http://www.suppenlaender.de/galerie/index.php

der Inhalt wird per .htaccess geladen, somit siehtst du im Quelltext keinen Frame oder iFrame

Offline Oldie

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #560 on: December 22, 2008, 05:35:02 PM »
Hi everybody


I use Version 1.7.6! I need help with the indication of  rondom pictures on an external site! I don´t understand a lot php! I read almost all about the rondom picture in this forum in ahead! But..... :roll:

I want 3 rondom pictures underneath on www.oldtimers-im-fokus.ch

I saved the script mentioned on   http://www.nicky.net/4images/random.txt under rondom.php
During the instructions, they talk about a file called rondom_mod.php ......................I cannot find any file like this??

And in what root to I have to save rondom.php ?? In the 4image gallery level, or in the root level of the page where I want the rondom image to show up?

Thanks a lot


Oldie


Offline *handsome*

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #561 on: December 25, 2008, 09:13:21 AM »
well when i show more than 1 image like 5 it show from up to down is it possible that it show images from left to right or right to left?

Offline Blesi

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #562 on: December 25, 2008, 03:11:40 PM »
Ist es möglich ein Zufallsbild von nur EINER Kategorie zu erzeugen? So, dass ich auf einer externen Seite 5 Zufallsbilder habe von 5 bestimmten Kategorien?

Is it possible a random-image from ONE categorie to create? So that i have at an external page five random-pictures from five defined categories?


Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #563 on: December 25, 2008, 03:29:40 PM »
Hi everybody


I use Version 1.7.6! I need help with the indication of  rondom pictures on an external site! I don´t understand a lot php! I read almost all about the rondom picture in this forum in ahead! But..... :roll:

I want 3 rondom pictures underneath on www.oldtimers-im-fokus.ch

I saved the script mentioned on   http://www.nicky.net/4images/random.txt under rondom.php
During the instructions, they talk about a file called rondom_mod.php ......................I cannot find any file like this??

And in what root to I have to save rondom.php ?? In the 4image gallery level, or in the root level of the page where I want the rondom image to show up?

Thanks a lot


Oldie



hi,

create a blank file with the name, as example for the test, random_mod.php (normaly you can add the below to your php script)
Code: [Select]
<?php
 
include("./random.php");
?>

place random.php into the root of 4images..

BUT you have to define PATH of random.php in random_mod.php or in your php file
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 Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #564 on: December 25, 2008, 03:31:49 PM »
well when i show more than 1 image like 5 it show from up to down is it possible that it show images from left to right or right to left?

change
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";
echo "<b>$image_name</b><br>\n";
echo "Comments: $image_comments<br>\n";
to
Code: [Select]
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a>\n";but you will not have image name and number of comments.
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 Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #565 on: December 25, 2008, 03:33:38 PM »
Ist es möglich ein Zufallsbild von nur EINER Kategorie zu erzeugen? So, dass ich auf einer externen Seite 5 Zufallsbilder habe von 5 bestimmten Kategorien?

Is it possible a random-image from ONE categorie to create? So that i have at an external page five random-pictures from five defined categories?

hmm.... zuerst schreibst du von "EINER" und dann von "5 bestimmten Kategorien".
wie möchtest du es genau?
jeweils ein bild aus einer bestimmten kategorie und das ganze 5 mal so?
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 Blesi

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #566 on: December 25, 2008, 10:48:38 PM »
Quasi ein Zufallsbild wo mir nur Bilder einer bestimmten Kategorie anzeigt. Ich meinte dann dass ich 5 Zufallsbilder auf ne andere Seite machen kann. Aber nur von EINER bestimmten Ketegorie die ich frei wählen kann. Es sollte aber variable sein, d.h. ich mache zwei Zufallsbilder nebeneinander und das linke zeigt dann nur Fußballbilder und das rechte nur Handballbilder.
Verstanden?

Gruß Christian

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #567 on: December 26, 2008, 10:52:58 AM »
Hi Christian,

nachdem ich ein lebender ausländer in österreich bin ist deutsch nicht meine muttersprache  :mrgreen:
und habs überhaupt nicht geschnallt was du vor hast..  :oops:
vielleicht versuchst du es mit bildern  8)

nichts für ungut

LG
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 Blesi

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #568 on: December 26, 2008, 07:45:22 PM »
-------------------------------           -------------------------------          -------------------------------           -------------------------------
-                             -           -                             -          -                             -           -                             -
-   Zufallsbild  1          -          -   Zufallsbild 2           -          -   Zufallsbild  1          -          -   Zufallsbild 2           -
-   nur                      -           -  nur                      -          -   nur                      -           -  nur                      -
-   Kategorie Fussball  -           -  Kategorie Tennis    -          -   Kategorie Tiere      -           -  Kategorie Konzert  -
-                             -           -                             -          -                             -           -                             -
-                             -           -                             -          -                             -           -                             -
-                             -           -                             -          -                             -           -                             -
-                             -           -                             -          -                             -           -                             -
-------------------------------           -------------------------------          -------------------------------           -------------------------------

So jetzt verstanden? In jedem Zufallsbild sollen nur die Bilder der bestimmten Kategorie erscheinen.

Gruß Christian

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #569 on: December 28, 2008, 03:47:11 PM »
-------------------------------           -------------------------------          -------------------------------           -------------------------------
-                             -           -                             -          -                             -           -                             -
-   Zufallsbild  1          -          -   Zufallsbild 2           -          -   Zufallsbild  1          -          -   Zufallsbild 2           -
-   nur                      -           -  nur                      -          -   nur                      -           -  nur                      -
-   Kategorie Fussball  -           -  Kategorie Tennis    -          -   Kategorie Tiere      -           -  Kategorie Konzert  -
-                             -           -                             -          -                             -           -                             -
-                             -           -                             -          -                             -           -                             -
-                             -           -                             -          -                             -           -                             -
-                             -           -                             -          -                             -           -                             -
-------------------------------           -------------------------------          -------------------------------           -------------------------------

So jetzt verstanden? In jedem Zufallsbild sollen nur die Bilder der bestimmten Kategorie erscheinen.

Gruß Christian

ich hoffe ich hab es jetzt verstanden:

http://wallp.ape.rs/random.php
zufalls bilder aus 5 verschiedenen kategorien
code dafür

<?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 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 = 1 /* KATEGORIE ID */
        ORDER BY RAND()
        LIMIT 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'];


$sql2 "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 = 478 /* KATEGORIE ID */
        ORDER BY RAND()
        LIMIT 1"
;
$row2 $site_db->query_firstrow($sql2);
$image_id2 $row2['image_id'];
$cat_id2 $row2['cat_id'];
$image_name2 $row2['image_name'];
$image_comments2 $row2['image_comments'];
$thumb_src2 = (is_remote($row2['image_thumb_file'])) ? $row2['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id2."/".$row2['image_thumb_file'];

$sql3 "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 = 557 /* KATEGORIE ID */
        ORDER BY RAND()
        LIMIT 1"
;
$row3 $site_db->query_firstrow($sql3);
$image_id3 $row3['image_id'];
$cat_id3 $row3['cat_id'];
$image_name3 $row3['image_name'];
$image_comments3 $row3['image_comments'];
$thumb_src3 = (is_remote($row3['image_thumb_file'])) ? $row3['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id3."/".$row3['image_thumb_file'];


$sql4 "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 = 248 /* KATEGORIE ID */
        ORDER BY RAND()
        LIMIT 1"
;
$row4 $site_db->query_firstrow($sql4);
$image_id4 $row4['image_id'];
$cat_id4 $row4['cat_id'];
$image_name4 $row4['image_name'];
$image_comments4 $row4['image_comments'];
$thumb_src4 = (is_remote($row4['image_thumb_file'])) ? $row4['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id4."/".$row4['image_thumb_file'];

$sql5 "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 = 477 /* KATEGORIE ID */
        ORDER BY RAND()
        LIMIT 1"
;
$row5 $site_db->query_firstrow($sql5);
$image_id5 $row5['image_id'];
$cat_id5 $row5['cat_id'];
$image_name5 $row5['image_name'];
$image_comments5 $row5['image_comments'];
$thumb_src5 = (is_remote($row5['image_thumb_file'])) ? $row5['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id5."/".$row5['image_thumb_file'];


echo 
"<table border=\"1\"><tr><td><a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a></td><td><a href=\"".ROOT_PATH."details.php?image_id=$image_id2\"><img src=\"".$thumb_src2."\" border=\"0\" alt=\"$image_name2\"></a></td><td><a href=\"".ROOT_PATH."details.php?image_id=$image_id3\"><img src=\"".$thumb_src3."\" border=\"0\" alt=\"$image_name3\"></a></td><td><a href=\"".ROOT_PATH."details.php?image_id=$image_id4\"><img src=\"".$thumb_src4."\" border=\"0\" alt=\"$image_name4\"></a></td><td><a href=\"".ROOT_PATH."details.php?image_id=$image_id5\"><img src=\"".$thumb_src5."\" border=\"0\" alt=\"$image_name5\"></a></td></tr>\n";
echo 
"<tr><td><b>$image_name</b><br>Kommentare: $image_comments</td><td><b>$image_name2</b><br>Kommentare: $image_comments2</td><td><b>$image_name3</b><br>Kommentare: $image_comments3</td><td><b>$image_name4</b><br>Kommentare: $image_comments4</td><td><b>$image_name5</b><br>Kommentare: $image_comments5</td></tr></table>\n";
?>


suche nach
Code: [Select]
/* KATEGORIE ID */die zahlen deinen cat_id's anpassen
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