Author Topic: Small correction in thumbnailer.php  (Read 3796 times)

0 Members and 1 Guest are viewing this topic.

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Small correction in thumbnailer.php
« on: January 22, 2003, 09:50:40 AM »
Replace:
Code: [Select]
   show_form_header("thumbnailer.php", "createthumbnails", "form");
    echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td class=\"tableborder\">\n<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n";
    echo "<tr class=\"tableseparator\">\n<td class=\"tableseparator\"><input name=allbox type=checkbox onClick=\"CheckAll();\" checked=\"checked\"></td>\n<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_image_file']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n</tr>\n";
    echo $imgs;
    show_table_separator($lang['convert_options'], 4);
    echo "<tr class=\"".get_row_bg()."\">\n<td colspan=\"2\"><p class=\"rowtitle\">".$lang['convert_thumbnail_dimension']."</p></td>\n";
    echo "<td colspan=\"2\"><p><input type=\"text\" size=\"$textinput_size\" name=\"dimension\" value=\"100\"></p></td>\n</tr>\n";
    echo "<tr class=\"".get_row_bg()."\">\n<td colspan=\"2\" valign=\"top\"><p class=\"rowtitle\">".$lang['resize_proportions_desc']."</p></td>\n";
    echo "<td colspan=\"2\"><p>";
    echo "<input type=\"radio\" name=\"resize_type\" value=\"1\" checked=\"checked\"> ".$lang['resize_proportionally']."<br />";
    echo "<input type=\"radio\" name=\"resize_type\" value=\"2\"> ".$lang['resize_fixed_width']."<br />";
    echo "<input type=\"radio\" name=\"resize_type\" value=\"3\"> ".$lang['resize_fixed_height']."<br />";
    echo "</p></td>\n</tr>\n";
    echo "<tr class=\"".get_row_bg()."\">\n<td colspan=\"2\"><p class=\"rowtitle\">".$lang['convert_thumbnail_quality']."</p></td>\n";
    echo "<td colspan=\"2\"><p><input type=\"text\" size=\"$textinput_size\" name=\"quality\" value=\"75\"></p></td>\n</tr>\n";
    show_form_footer($lang['create_thumbnails'], "", 4);

with:
Code: [Select]
   show_form_header("thumbnailer.php", "createthumbnails", "form");
    echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td class=\"tableborder\">\n<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n";
    echo "<tr class=\"tableseparator\">\n<td class=\"tableseparator\"><input name=allbox type=checkbox onClick=\"CheckAll();\" checked=\"checked\"></td>\n<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_image_file']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n</tr>\n";
    echo $imgs;
    show_table_separator($lang['convert_options'], 4);
    echo "<tr class=\"".get_row_bg()."\">\n<td colspan=\"2\"><p class=\"rowtitle\">".$lang['convert_thumbnail_dimension']."</p></td>\n";
    echo "<td colspan=\"2\"><p><input type=\"text\" size=\"$textinput_size\" name=\"dimension\" value=\"".$config['auto_thumbnail_dimension']."\"></p></td>\n</tr>\n";
    echo "<tr class=\"".get_row_bg()."\">\n<td colspan=\"2\" valign=\"top\"><p class=\"rowtitle\">".$lang['resize_proportions_desc']."</p></td>\n";
    echo "<td colspan=\"2\"><p>";
    $resize_type_1_checked = ($config['auto_thumbnail_resize_type'] == 1) ? " checked=\"checked\"" : "";
    $resize_type_2_checked = ($config['auto_thumbnail_resize_type'] == 2) ? " checked=\"checked\"" : "";
    $resize_type_3_checked = ($config['auto_thumbnail_resize_type'] == 3) ? " checked=\"checked\"" : "";
    echo "<input type=\"radio\" name=\"resize_type\" value=\"1\"".$resize_type_1_checked."> ".$lang['resize_proportionally']."<br />";
    echo "<input type=\"radio\" name=\"resize_type\" value=\"2\"".$resize_type_2_checked."> ".$lang['resize_fixed_width']."<br />";
    echo "<input type=\"radio\" name=\"resize_type\" value=\"3\"".$resize_type_3_checked."> ".$lang['resize_fixed_height']."<br />";
    echo "</p></td>\n</tr>\n";
    echo "<tr class=\"".get_row_bg()."\">\n<td colspan=\"2\"><p class=\"rowtitle\">".$lang['convert_thumbnail_quality']."</p></td>\n";
    echo "<td colspan=\"2\"><p><input type=\"text\" size=\"$textinput_size\" name=\"quality\" value=\"".$config['auto_thumbnail_quality']."\"></p></td>\n</tr>\n";
    show_form_footer($lang['create_thumbnails'], "", 4);

... and you have values from gallery config, not some fixed figures, as it is now.

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
Small correction in thumbnailer.php
« Reply #1 on: January 22, 2003, 01:29:48 PM »
Can u explain what it actualy do/fix?
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 SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Small correction in thumbnailer.php
« Reply #2 on: January 22, 2003, 03:24:38 PM »
sure.. with the original file every time you need to make thumbs, you offered default values: 100 for size and 75 for quality. so, if you are using different values (which i do), you have to change the values every time.

with this modification values are taken from the gallery config.

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
Small correction in thumbnailer.php
« Reply #3 on: January 22, 2003, 06:12:33 PM »
o my....where have u been a month ago? hehe, nice, very nice! thx alot!
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)