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

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

0 Members and 1 Guest are viewing this topic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #450 on: September 11, 2007, 11:53:16 AM »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #451 on: September 11, 2007, 12:17:54 PM »
@thunderstrike
... the post is also in englisch ...
Quote
... (E: try this) ...
... (E: in random.php) ...
... (E: after) ...
... (E: add this(ofcourse your own url)) ...
... (E: change) ...
... (E: to) ...
... Nicky say ... E: -> in english ... ;)
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 thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #452 on: September 11, 2007, 12:24:04 PM »
Ohh ! ok - thank.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #453 on: September 12, 2007, 04:52:09 AM »
okay


probier mal das(E: try this)

in der random.php (E: in random.php)
nach (E: after)
Code: [Select]
include(ROOT_PATH.'includes/constants.php');

füge dies ein (E: add this(ofcourse your own url))
Code: [Select]
define('SCRIPT_URL', 'http://www.brinkmann-online.de/umleitung/4images/');

dann ändere (E: change):
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";

auf (E: to):
Code: [Select]
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

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

Thanks bro this code works but it only works if we wanna show 1 thumb and it didnt work to show 4random thumbs code file "random_more_pics.txt " which i downloaded from nicky.net
How to implement code to show 4 random thumbs on other site ?

Offline janaage01

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #454 on: September 23, 2007, 12:09:54 AM »
Ich habe mal eine allgemeine Frage zu dem Script:

Werden die Originalbilder oder die Thumbnails als "Random Images" agezeigt?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #455 on: September 23, 2007, 01:01:03 AM »
Quote
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

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

Change for:

Code: [Select]
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : format_url($script_url . "/data/" . THUMB_DIR."/".$cat_id."/".$row['image_thumb_file']);

echo "<a href=\"". format_url($script_url ."/details.php?image_id=" . $image_id) . "\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"" . $image_name . "\"></a><br>\n";
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline janaage01

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #456 on: September 23, 2007, 10:45:01 AM »
Quote
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

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

Change for:

Code: [Select]
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : format_url($script_url . "/data/" . THUMB_DIR."/".$cat_id."/".$row['image_thumb_file']);

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


Ist das die Antwort auf die Frage ob und wie die Thumbnails statt den Originalbildern angezeigt werden?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #457 on: September 23, 2007, 12:30:46 PM »
Dieses antwort ist für dieses ein:

okay


probier mal das(E: try this)

in der random.php (E: in random.php)
nach (E: after)
Code: [Select]
include(ROOT_PATH.'includes/constants.php');

füge dies ein (E: add this(ofcourse your own url))
Code: [Select]
define('SCRIPT_URL', 'http://www.brinkmann-online.de/umleitung/4images/');

dann ändere (E: change):
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";

auf (E: to):
Code: [Select]
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

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

Thanks bro this code works but it only works if we wanna show 1 thumb and it didnt work to show 4random thumbs code file "random_more_pics.txt " which i downloaded from nicky.net
How to implement code to show 4 random thumbs on other site ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline beach-baer

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #458 on: September 30, 2007, 01:06:03 PM »
Moin Moin!

Ich habe schon länger so ein Mod gesucht, habe diesen hier aber nicht gleich auf Anhieb gefunden. Nun ist er aber auf meiner HP eingebunden und ich bin begeistert.

Kleines Ding mit großer Wirkung - Supersache!

Und ich wollte einfach nur einmal > Vielen Dank < sagen!

und viele Grüße aus Hamburg

Kay

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #459 on: September 30, 2007, 08:47:25 PM »
gerne :)
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 FunnyUser

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #460 on: November 21, 2007, 07:30:32 AM »
Hey guys,
nice MOD!

My "thumbnails_bit.html" looks like that:

Code: [Select]
<a href="{image_url}" onmouseover="popup1('<img src=http://myDOMAIN.de/data/thumbnails/{cat_id}/{thumbnail_file_name}>','0')"; onmouseout="kill()" target="_blank">{image_name}</a>
I show up my thumbnails when user "mouseover" the imagename.

Is there any possibility to include my "thumbnails_bit.html - code" in this part of script:
Code: [Select]
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\" target=\"_new\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";   


Thanks a lot for your help!


Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #461 on: November 22, 2007, 11:05:47 AM »
hi FunnyUser
Hey guys,
nice MOD!

My "thumbnails_bit.html" looks like that:

Code: [Select]
<a href="{image_url}" onmouseover="popup1('<img src=http://myDOMAIN.de/data/thumbnails/{cat_id}/{thumbnail_file_name}>','0')"; onmouseout="kill()" target="_blank">{image_name}</a>
I show up my thumbnails when user "mouseover" the imagename.

Is there any possibility to include my "thumbnails_bit.html - code" in this part of script:
Code: [Select]
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\" target=\"_new\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";   
Thanks a lot for your help!


try this

Code: [Select]
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\" onmouseover=\"popup1('<img src=".$thumb_src.">','0')\"; onmouseout=\"kill()\" target=\"_blank\">".$image_name."</a>\n";
« Last Edit: November 22, 2007, 11:37:18 AM 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 thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #462 on: November 22, 2007, 06:31:48 PM »
$image_name = $row['image_name']

so

try this:

Code: [Select]
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\" onmouseover=\"popup1('<img src=".$thumb_src.">','0')\"; onmouseout=\"kill()\" target=\"_blank\">".format_text(trim($image_name), 2)."</a>\n";
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #463 on: November 22, 2007, 06:39:34 PM »
thunderstrike,

FYI
$image_name = $row['image_name'];
is on the 1st page from this MOD in random.txt file

no matter if you use now format_text or not.
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 thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Random image / Zufallsbild
« Reply #464 on: November 22, 2007, 06:49:54 PM »
Quote
FYI
$image_name = $row['image_name'];
is on the 1st page from this MOD in random.txt file

Ok so use:

Code: [Select]
$image_name = format_text(trim($row['image_name']), 2);

Please see includes/functions.php (show_image function of Jan)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?