Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 06-14-2007, 08:21 PM
Casual Pligger
 
Join Date: Jan 2007
Posts: 60
Thanks: 22
Thanked 7 Times in 6 Posts
I think I'm having the "no extension" problem. The image uploads to the image directory, but in the database, there is no .jpg extension, and the image does not appear in the post. The original image uploaded was also .jpg. Images I uploaded using the version .4 did include the .jpg extension and do appear in the post.

http://pandorastations.com/story.php..._Electronica-1

vs.

http://pandorastations.com/story.php..._AMBIENT_RADIO

Last edited by timofsuburbia; 06-14-2007 at 08:24 PM.. Reason: clarity
Reply With Quote
  #12 (permalink)  
Old 06-14-2007, 09:41 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
Hi adampoots,

What's not working?

Best,
Cent

Quote:
Originally Posted by adampoots View Post
Hmm. i seem to be having a lot of issues getting this one to work. I've even uninstalled pligg and started from scratch following the directions in the readme packed with the 0.93 download.

Could someone perhaps send me the edited, .tpl files?
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
  #13 (permalink)  
Old 06-14-2007, 09:51 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
There was mistakenly omitted from the readme...

In your /templates/(your template)/editlink_edit_center.tpl file...

Look for the <form action> line...

Add to it:
enctype="multipart/form-data"

That last part allows for binary files to be attached. That must be added in order to upload photos from the edit entry section.

Best,
Cent
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
  #14 (permalink)  
Old 06-14-2007, 11:36 PM
Casual Pligger
 
Join Date: Jan 2007
Posts: 60
Thanks: 22
Thanked 7 Times in 6 Posts
OK, thanks Cent. Now I am able to get some images to upload and display properly, but there seems to be a minimum size limit. So far .jpg files that are about 10kb are not loading properly but those over 100kb work fine.
Reply With Quote
  #15 (permalink)  
Old 06-14-2007, 11:45 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
Hi timofsurbia,

Thanks odd. Unless a file is NOT a JPG or over the maxium width/height for displaying on the site, its not even processed by anything and just uploaded, moved (renamed) and stored in the DB.

Can you send me a JPG that is causing the problem (10kb) so I can test on my end? I want to use the same image that you are as opposed to creating one on my end. As there may be certain issues with a particular image that I may not be able to reproduce in the same way.

Thanks

Best,
Cent


Quote:
Originally Posted by timofsuburbia View Post
OK, thanks Cent. Now I am able to get some images to upload and display properly, but there seems to be a minimum size limit. So far .jpg files that are about 10kb are not loading properly but those over 100kb work fine.
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
  #16 (permalink)  
Old 06-14-2007, 11:46 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
Hi timorsurbia,

This link http://pandorastations.com/story.php..._Electronica-1 came up as a blank page.

Best,
Cent

Quote:
Originally Posted by timofsuburbia View Post
I think I'm having the "no extension" problem. The image uploads to the image directory, but in the database, there is no .jpg extension, and the image does not appear in the post. The original image uploaded was also .jpg. Images I uploaded using the version .4 did include the .jpg extension and do appear in the post.

http://pandorastations.com/story.php..._Electronica-1

vs.

http://pandorastations.com/story.php..._AMBIENT_RADIO
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
  #17 (permalink)  
Old 06-14-2007, 11:53 PM
Casual Pligger
 
Join Date: Jan 2007
Posts: 60
Thanks: 22
Thanked 7 Times in 6 Posts
Sorry about that. I've been fooling a bit with my database trying to solve this.

I am going to try various sizes of this....

http://www.flickr.com/photo_zoom.gne...4708944&size=o

to test my hypothesis that there is some sort of lower limit. I would be happy to be wrong so we'll see.

EDIT: Update, only the largest version of that image seemed to upload properly. 800 x 600.

EDIT2: I seems that I have to drop the maximum height and width down below the size of the images being uploaded for them images to upload properly. For instance if I expect images to be 100 x 100 or higher, then I need to lower those values found in the image_upload_settings.php to under 100 each.

Last edited by timofsuburbia; 06-15-2007 at 12:37 AM.. Reason: extra details.
Reply With Quote
  #18 (permalink)  
Old 06-15-2007, 10:35 AM
Constant Pligger
 
Join Date: Oct 2006
Posts: 227
Thanks: 56
Thanked 22 Times in 18 Posts
I installed the new version on a 9.5 install of Pligg and I'm still having problems when editing the image as an admin. I can delete an image but can't seem to upload a new one. This is what i get when trying to upload a replacement image in debug mode:

START: image_upload_preview_handler
Story ID = 17
Image Path = test/00photos/img_17
Image Caption = askjdas dkjhasd
Image File = img_17
No image found to display.
END: image_upload_preview_handler



I had the the previous version of image upload on this site and simply uninstalled it and deleted it and then uploaded and installed the new version. I don't know whether there's something i forgot to delete from the old version that could be causing problems ... but the new version seems pretty self contained.

Sorry I can't give an url right now ... it's on a protected dev server.

Last edited by revolver; 06-15-2007 at 11:17 AM..
Reply With Quote
  #19 (permalink)  
Old 06-15-2007, 11:16 AM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
revolver,

If you can upload an image with a new entry, delete a photo when editing but cannot upload a new one, then try:

Open /templates/(your template)/editlink_edit_center.tpl

and look around line 25 for the <form action> line... change it to:
<form action="" method="post" id="thisform" enctype="multipart/form-data">

the enctype addition is necessary for file uploads.

let me know how that works for you.

best,
cent


Quote:
Originally Posted by revolver View Post
I installed the new version on a 9.5 install of Pligg and I'm still having problems when editing the image as an admin. I can delete an image but when i upload a new one it doesn't show up.

I had the the previous version of image upload on this site and simply uninstalled it and deleted it and then uploaded and installed the new version. I don't know whether there's something i forgot to delete from the old version that could be causing problems ... but the new version seems pretty self contained.

Sorry I can't give an url right now ... it's on a protected dev server.
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
  #20 (permalink)  
Old 06-15-2007, 11:38 AM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
Timofsurbia,

I believe I just fixed this problem. The filename wasn't being appended with ".jpg" for images that were smaller (width/height) than the settings and a JPG file. If you can try the attached file... its a direct replacement for the one you have installed and let me know if that works for you.

Best,
Cent


Quote:
Originally Posted by timofsuburbia View Post
Sorry about that. I've been fooling a bit with my database trying to solve this.

I am going to try various sizes of this....

http://www.flickr.com/photo_zoom.gne...4708944&size=o

to test my hypothesis that there is some sort of lower limit. I would be happy to be wrong so we'll see.

EDIT: Update, only the largest version of that image seemed to upload properly. 800 x 600.

EDIT2: I seems that I have to drop the maximum height and width down below the size of the images being uploaded for them images to upload properly. For instance if I expect images to be 100 x 100 or higher, then I need to lower those values found in the image_upload_settings.php to under 100 each.
Attached Files
File Type: zip image_upload_main.zip (4.2 KB, 29 views)
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Upload Module -- Call for feature requests cent Modification Tutorials 12 11-15-2008 12:13 PM
[MOD] Image Upload Module (v1.0) -- Now Available cent Modification Tutorials 181 09-24-2008 10:43 PM
About the image upload module rockxie Module Support 3 08-05-2008 05:41 PM
Image Upload 0.4 Module ziadchatila Module Support 3 08-05-2008 04:40 PM
[MOD] MP3 Upload Module cent Modification Tutorials 32 03-02-2008 03:07 AM


Search Engine Friendly URLs by vBSEO 3.2.0