Author Topic: I need to load the thumbnail instead of image when I go to valadateimages page.  (Read 8868 times)

0 Members and 2 Guests are viewing this topic.

Offline jamstave

  • Newbie
  • *
  • Posts: 49
    • View Profile
Hi..I need a modification in the valadateimages. The modification is when I validate the image it's load the image file from "data/tmp_media" it's taking lots of time to load the images so I need to load the thumbnail from "tmp_thumbnails" is that possible, please someone help me to do this modification.

TheOracle

  • Guest
Re: I need to load the thumbnail instead of image when I valadate images.
« Reply #1 on: September 04, 2005, 02:00:34 AM »
In your admin/validateimages.php file,

you'd need to rename all :

Quote

MEDIA_TEMP_PATH


into :

Code: [Select]

THUMB_TEMP_PATH


Offline jamstave

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: I need to load the thumbnail instead of image when I valadate images.
« Reply #2 on: September 04, 2005, 05:12:40 AM »
Hi...TheOracle thanks for you answer but that's not I'm looking for, finally I did that modification myself.

Open admin/validateimages.php
1.1 Find:
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_date, i.image_media_file".get_user_table_field(", u.", "user_name")."
Replace with
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_date, i.image_media_file, i.image_thumb_file".get_user_table_field(", u.", "user_name")."
1.2 Find:
Code: [Select]
$file_src = get_file_path($image_row['image_media_file'], "media", 0, 1);

Replace with
Code: [Select]
$file_src = get_file_path($image_row['image_thumb_file'], "thumb", 0, 1);
Now save and upload the file.

Done.

Jemestave.

Offline m.a

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Naja, es ist schon lange her! aber für die nachlesende (nächste generationen)  :)  wahrscheinlich nützlich!

In admin/validateimages.php,
finde:
Code: [Select]
      echo "<td><a href=\"".$image_path."\" target=\"_blank\"><img src=\"".$file_src."\" border=\"1\" height=\"50\"></a></td>";
      echo "<td><b><a href=\"".$image_path."\" target=\"_blank\">".format_text($image_row['image_name'], 2)."</a></b> (".$image_row['image_media_file'];

und replace mit:
Code: [Select]
            echo "<td><a href=\"".$image_path."\" target=\"_blank\">";
      echo "<img src=\"";
      echo "../data/tmp_thumbnails/".basename($file_src);
      echo "\" border=\"1\" height=\"50\"></a><br></td>";
      echo "<td><b><a href=\"".$image_path."\" target=\"_blank\">".htmlspecialchars($image_row['image_name'])."</a></b> (".$image_row['image_media_file'];

Das war's.
m.a
« Last Edit: November 20, 2007, 02:31:08 AM by m.a »

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Code: [Select]
echo "<td><a href=\"".$image_path."\" target=\"_blank\">";
      echo "<img src=\"";
      echo "../data/tmp_thumbnails/".basename($file_src);
      echo "\" border=\"1\" height=\"50\"></a><br></td>";
      echo "<td><b><a href=\"".$image_path."\" target=\"_blank\">".htmlspecialchars($image_row['image_name'])."</a></b> (".$image_row['image_media_file'];

for:

Code: [Select]
echo "<td><a href=\"".$image_path."\" target=\"_blank\">";
      echo "<img src=\"";
      echo "../data/tmp_thumbnails/".get_basename(stripslashes(trim($file_src)));
      echo "\" border=\"1\" height=\"50\"></a><br></td>";
      echo "<td><b><a href=\"".$image_path."\" target=\"_blank\">".format_text(trim($image_row['image_name']), 2)."</a></b> (".get_basefile(stripslashes(trim($image_row['image_media_file'])));
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 m.a

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
for:

Code: [Select]
echo "<td><a href=\"".$image_path."\" target=\"_blank\">";
      echo "<img src=\"";
      echo "../data/tmp_thumbnails/".get_basename(stripslashes(trim($file_src)));
      echo "\" border=\"1\" height=\"50\"></a><br></td>";
      echo "<td><b><a href=\"".$image_path."\" target=\"_blank\">".format_text(trim($image_row['image_name']), 2)."</a></b> (".get_basefile(stripslashes(trim($image_row['image_media_file'])));

Hi,
yes, still better and more correctly!
Or?
by the way!
Can one still extend it?

m.a

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
This code is request ? Is possible for post request english ... ?
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 m.a

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
This code is request ? Is possible for post request english ... ?

yes.
Is there still extension possible?
For example:
as checkimages.php (of v@no).
http://www.4homepages.de/forum/index.php?topic=4754.180
I wanted to store original picture in the Big file.
backup original images somewhere else on the server (and resized image)!
support for watermark!

Can that be done?
can you program it?

Thanks
m.a

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
... um die Original-Bilder im Ordner "big" zu speichern kannst du folgenden Code von V@no verwenden ...
... http://www.4homepages.de/forum/index.php?topic=7700.msg22313#msg22313 ...
... der Codeschnipsel funktioniert in der member.php für den direkten Upload, als auch in der checkimages.php für den ACP-Bereich ...
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 m.a

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Hi mawenzi,

  --  vielen Dank
m.a
« Last Edit: November 21, 2007, 07:44:47 PM by m.a »

Offline m.a

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Hi mawenzi,

es hat aber nicht geholfen.
Keinen Erfolg!
Meine mysql-version ist : 4.0.24 und php: 4.3.10-16 !
Ich nutze 4images Version: 1.7.4
Ich habe den Mode installiert.
Es wird kein Original-Bild im Ordner Big gespeichert.
Daten-Bank (mit install_autoimage.php) upgedated, und alles schritt-Weise weiter gemacht!
Aber leider keine Ergebnis!

Gruß
m.a
« Last Edit: November 22, 2007, 06:40:17 PM by m.a »