Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2008-04-28 10:42:45

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

FYI, am using hak_article_image to display multiple images.

Cheers,
Husain

Offline

#86 2008-04-30 19:18:22

milkshake
Member
From: Linz, Austria
Registered: 2007-06-24
Posts: 80
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

husainhk wrote:

I am not sure what could be the reason, but when I upload one image after the other, it doesn’t append the image ID in the Article Image field, instead it replaces the old ID with the new one! I am using TXP v.4.0.6

Edit the plugin code at line 185 to read:

echo "insertid($img_result[1], 'append');</script>";

It’s a hack, but it works for now :)

Offline

#87 2008-05-06 09:42:23

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

That worked really well! Thanks so much for this :)

Cheers,
Husain

Offline

#88 2008-05-28 21:59:30

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

this is a great plugin how about one almost the same to allow file uploads in the write tab….anything like this exist I have been looking but not found anything…any ideas?

Offline

#89 2008-06-09 21:07:27

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

Steve
I installed this of late and find it a great relief for daily work, takes a lot of clicking off me. Thanks! Especially useful when combined with bas_img_selector.

Jirka
would you mind posting your changes?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#90 2008-06-30 11:20:09

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

To have this great plugin styling appropriately with aro_myadmin, I needed a little mods, as I mentioned here. Just changed the css that is loaded in the iframe to myadmin.css.

Original:

<link rel="stylesheet" href="textpattern.css" type="text/css" media="screen" title="no title" charset="utf-8">

mod:

<link rel="stylesheet" href="myadmin.css" type="text/css" media="screen" title="no title" charset="utf-8">

There’s also another mod I made to have the aro_myadmin replacement of toggleDisplay function work:

Original:

echo '<h3 class="plain" style="text-align:left"><a href="javascript:void(0);" id="lam_show_hide" onload>'.gTxt('upload_image').'</a></h3><div id="lam_image_uploader">';

Mod:

echo '<h3 class="plain"><a href="#lam_image_uploader" onclick="toggleDisplay(\'lam_image_uploader\'); return false;" id="lam_show_hide" onload>'.gTxt('upload_image').'</a></h3><div id="lam_image_uploader">';

Hope this may help someone. Bye

Z-

Last edited by Zanza (2008-06-30 12:50:09)

Offline

#91 2008-06-30 11:57:57

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

Thanks, Zanza :)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#92 2008-08-05 05:43:18

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

Hope somebody can help me out here.

I am uploading images from the Write tab, but I need to disable the creation of a thumbnail for each image I upload. I want to upload the thumbnails manually for each image. Even if I put blank values in the thumbnail creation area of the Images tab, Textpattern still creates a thumbnail!

Somebody please help!

Offline

#93 2008-08-05 07:27:21

aba
Plugin Author
Registered: 2004-04-14
Posts: 119

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

husainhk wrote:

Even if I put blank values in the thumbnail creation area of the Images tab, Textpattern still creates a thumbnail!

The plugin uses isset instead of empty – that means, it tests whether the variables exist not whether they are empty (I’m not an expert, but I think in txp these vars will always exist because they are in the prefs – they just happen to be empty). Furthermore it doesn’t rely on txp to create an thumbnail, but does it itself (and I love it for this).

One way would be to include another parameter to enable/disable thumbnailing, but that includes a rewrite of the plugin (not an awful complicated one tough). In the meantime the easiest way for you would be to edit the plugin and find the following code (it’s in about the middle of the plugin code) – delete it and voila, no more thumbnailing:

// Auto-generate a thumbnail using the last settings 
if (isset($prefs['thumb_w'], $prefs['thumb_h'], $prefs['thumb_crop'])) { 
  $t = new txp_thumb( $id ); 
  $t->crop = ($prefs['thumb_crop'] == '1'); 
  $t->hint = '0'; 
  if (is_numeric($prefs['thumb_w'])) $t->width = $prefs['thumb_w']; 
  if (is_numeric($prefs['thumb_h'])) $t->height = $prefs['thumb_h']; 
  $t->write(); 
}

Offline

#94 2008-08-05 08:03:42

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

Thanks a lot Aba!

Say, if sometime down the line I wish to have the plugin generate thumbnails (as usual), then I could just put the code back, right?

Cheers,
Husain

Offline

#95 2008-08-05 11:08:19

aba
Plugin Author
Registered: 2004-04-14
Posts: 119

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

yes

or you could ask Steve to implement a preference to switch thumbnailing on/off – he seems to be some very helpful person.

Offline

#96 2008-08-08 15:33:31

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

Hi All,

Is there a way to modify the plugin, so that one can also upload a thumbnail along with the image in the Articles tab? The auto cropping of thumbnails don’t suit the images I use, so I have to upload the thumbnail for each image each time. If I can upload the thumbnail and image together in the Articles tab, it would save a lot of time!

Any quick help appreciated, and thanks in advance … hope somebody has a solution, as I have a tight deadline, and I have around 800 images and their thumbnails to upload :(

Offline

Board footer

Powered by FluxBB