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

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

0 Members and 2 Guests are viewing this topic.

Offline dj-help

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #300 on: February 27, 2006, 02:36:16 PM »
Servus,
vielleicht habe ich etwas übersehen. Vielleicht aber auch nicht..
Folgendes: Besteht die Möglichkeit, Zufallsbilder auf dem Main und einem externem Server anzeigen zu lassen.?
Zufallsbilder werden normal angezeigt. Der Pfad ist standart. MainServer/gallerie/

Nun greife ich auch auf externe Bilder durch ein plugin zu. Leider kann mir Random Picture diese nicht anzeigen. Gibt es vielleicht ein wenn/oder Funktion?
Gruß, Phil

Offline ktwenrick

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #301 on: March 12, 2006, 12:34:22 AM »
i love this mod and it works great..i was wondering if theres one to show the 5 most recent photos on your blog?

Offline galadrium

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #302 on: March 24, 2006, 08:31:43 AM »
hallo zusammen

also ich habs gestern fast 3 stunden verucht, aber leider ohne erfolg.

wp muss ich die random.php datei rein kopieren? in die 4images root oder in mein portal root?

und was steht im random_mod.php

vielen dank

gala

Offline bayerns-elite

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #303 on: March 28, 2006, 12:21:25 AM »
bei mir zeigt es leider nur die photos an zu denen auch jeder gast zutritt hat
all die photos in den kategorein wo nur angemeldete user zutritt haben werden nicht angezeigt

wie kann man das ändern ?!


aber da sind ziemlich komische fetzen in dem code

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

// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie'
define&#40;'ROOT_PATH', './4images/'&#41;; // change this to your 4images dir.
include&#40;ROOT_PATH.'global.php'&#41;;
$new_cutoff time&#40;&#41; - 60 * 60 * 24 * $config&#91;'new_cutoff'&#93;;
$sql "SELECT IF&#40;a.image_date >= $new_cutoff,RAND&#40;&#41;+1,1&#41; as random_no, a.image_id, a.cat_id, a.image_name, a.image_active, a.image_media_file, a.image_thumb_file, a.image_comments, a.user_id
        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 random_no DESC, RAND&#40;&#41;
        LIMIT 1"
;
$row $site_db->query_firstrow&#40;$sql&#41;;
$image_extention get_file_extension&#40;$row&#91;'image_media_file'&#93;&#41;;
$image_id $row&#91;'image_id'&#93;;
$cat_id $row&#91;'cat_id'&#93;;
$image_name $row&#91;'image_name'&#93;;
$image_comments $row&#91;'image_comments'&#93;;

if &#40;empty&#40;$row&#91;'image_thumb_file'&#93;&#41;&#41; &#123;
$thumb_src ICON_PATH."/".$image_extention.".gif";
&
#125;
else &#123;
$thumb_src = &#40;is_remote&#40;$row&#91;'image_thumb_file'&#93;&#41;&#41; ? $row&#91;'image_thumb_file'&#93; &#58; ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row&#91;'image_thumb_file'&#93;;
&#125;
if &#40;!check_thumb_type&#40;$image_extention&#41;&#41; &#123;
  
$full_src ICON_PATH."/".$image_extention.".gif";
&
#125;
else &#123;
  
$full_src = &#40;is_remote&#40;$row&#91;'image_media_file'&#93;&#41;&#41; ? $row&#91;'image_media_file'&#93; &#58; ROOT_PATH.MEDIA_DIR."/".$cat_id."/".$row&#91;'image_media_file'&#93;;
&#125;
$full_src_link ROOT_PATH."details.php?image_id=$image_id";
?>

« Last Edit: March 28, 2006, 02:32:54 PM by bayerns-elite »

Dom01

  • Guest
Re: [Mod] Random image / Zufallsbild
« Reply #304 on: March 28, 2006, 01:01:09 AM »
Hi Leute,
ich habe es schon Lange mit dem Random-image aufgeben.Weil es nur Bilder zeig, die für alle User sichtbar sind.
Ich habe dafür ein kleines Bannerrottationsprogramm eingesetzt.
Gut, man muß alles Bilder per URL einschreiben, und wenn einer auf ein Bild klick, kommt er zur Galerie-Indes-Datei. Wo sich jeder Besucher Regestrieren kann bzw. Einlogen kann.
mfg Dom  :D

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Random image / Zufallsbild
« Reply #305 on: March 28, 2006, 04:02:18 AM »
@bayerns-elite:
A link to the post where you got that code from would be more helpfull ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline bayerns-elite

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #306 on: March 28, 2006, 02:32:28 PM »
@bayerns-elite:
A link to the post where you got that code from would be more helpfull ;)

i have already notified that post to the mods/admins

but here is it
http://www.4homepages.de/forum/index.php?topic=1020.msg17715#msg17715

on page 12
its your post

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Random image / Zufallsbild
« Reply #307 on: March 28, 2006, 03:43:50 PM »
DOH! :oops:

anyways, the code is fixed now.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline bayerns-elite

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #308 on: March 28, 2006, 04:45:54 PM »
thanks,
but when i open the random.php , the page is only white
no pics..... :?:
« Last Edit: March 29, 2006, 10:38:52 PM by bayerns-elite »

Offline bayerns-elite

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #309 on: April 01, 2006, 03:05:07 AM »
can anybody test the code ?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline teedoubleyou

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #311 on: April 18, 2006, 09:39:33 PM »
Ich habe den Mod eingebaut und er funktioniert einwandfrei. Ich benutze das Random Image als Banner für andere User und habe es folgendermassen eingebunden.

Originaldateihttp://www.nicky.net/4images/random.txt

Suche in der Random.php

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";
?>

-------------------------------------------------------------------------------------------------------------------
Ersetze durch

Code: [Select]
echo "<img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"><br>\n";
?>
--------------------------------------------------------------------------------------------------------------------
Code zum einbinden in eine externe HP.

Code: [Select]
<a href="http://www.your-domain.com" target="_blank"><font face="tahoma" size="2" color="#000000"><u>Your Text</u></font></a><br>
<iframe src="http://www.your-domain.com/random.php" frameborder="0" marginheight="0" marginwidth="0" height="150px" scrolling="no" width="150px"></iframe>

-------------------------------------------------------------------------------------------------------------------------

Demo hier

http://www.fotogalerie-helgoland.de/linkliste/banner.html

--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------



I have installed this mod without problems. I use it for other Homepages banner linking to my page.

Originalfilehttp://www.nicky.net/4images/random.txt


Search in random.php

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";
?>

-------------------------------------------------------------------------------------------------------------------
Replace with

Code: [Select]
echo "<img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"><br>\n";
?>
--------------------------------------------------------------------------------------------------------------------
Code for external homepage

Code: [Select]
<a href="http://www.your-domain.com" target="_blank"><font face="tahoma" size="2" color="#000000"><u>Your Text</u></font></a><br>
<iframe src="http://www.your-domain.com/random.php" frameborder="0" marginheight="0" marginwidth="0" height="150px" scrolling="no" width="150px"></iframe>

-------------------------------------------------------------------------------------------------------------------------

Demo here

http://www.fotogalerie-helgoland.de/linkliste/banner.html


Done!

Offline ashleyXcore

  • Pre-Newbie
  • Posts: 7
    • View Profile
    • Pink-Pistol.Net
Re: [Mod] Random image / Zufallsbild
« Reply #312 on: May 06, 2006, 10:52:28 PM »
On top of the file insert:
Code: [Select]
define("URL", "http://yourdomain.com/4images/"); //full internet path to your 4images with trailing slash!And then replace
Code: [Select]
$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";
With:
Code: [Select]
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

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

Just wanted to say thanks for the help. I finally checked back here and everything works great now  :)

xoxo

Offline Roaddog

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #313 on: May 07, 2006, 08:29:45 PM »
so....ich versuche es nochmal....
habe nun erneuet versucht den mod zu integrieren in das portal meines wbblite.
mittlerweile finde ich den thread sehr unübersichtlich.
wäre es vielleicht möglich, dass jemand,der den mod schon erfolgreich eingebaut hat, mir seine lösung hier mal postet?! so richtig step by step mit allem was dazu gehört...
ich glaube das würde nicht nur mir sehr helfen....
sollte sich einer dazu aufraffen, dann danke ich im namen aller schonmal im voraus!!

Offline teedoubleyou

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #314 on: May 09, 2006, 03:09:46 PM »
Version 1.71! Der Mod läuft perfekt. Wo hakt es denn? :roll: