Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bxmas13

Pages: [1]
1
Mods & Plugins (Requests & Discussions) / Re: Simplifying Image Upload
« on: December 12, 2005, 08:44:43 PM »
Quote
why it will not work ?? is there other way ?

Xmode:  I made the same mistake and couldn't figure out why the changes wouldn't work.  Until I looked closer.

When you search for this:
Code: [Select]
  if ($image_name == "")  {
    $error = 1;
    $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['image_name']), $lang['field_required']);
    $msg .= (($msg != "") ? "<br />" : "").$field_error;
  }

Make sure it is 39 lines below this code:

Code: [Select]
if ($action == "uploadimage") {

Make sure you DO NOT comment the code below this:
Code: [Select]
if ($action == "updateimage") {
Once you make those changes it will work!  :wink:

2
Discussion & Troubleshooting / poor thumbnail quality
« on: November 09, 2002, 12:20:28 AM »
Just found a way to keep the thumbnail quality high using GD_Bibliothek/GD_Library.

If you edit the /includes/image_utils.php with the following:

Scroll down to the lines

if (defined('CONVERT_IS_GD2') && CONVERT_IS_GD2 == 1) {
    $thumb = imagecreatetruecolor($width, $height);
  }
  else {
    $thumb = imagecreate($width, $height);
}
  $image_create_handle = "imagecreatefrom".$types[$image_info[2]];

Change it to this:   

if (defined('CONVERT_IS_GD2') && CONVERT_IS_GD2 == 1) {
    $thumb = imagecreatetruecolor($width, $height);
  }
  else {
    $thumb = imagecreatetruecolor($width, $height);
}
  $image_create_handle = "imagecreatefrom".$types[$image_info[2]];

Every thumbnail I create with this change has turned out perfect.  I hope this helps.

B.C.   :idea:

Pages: [1]