[MOD] Image Upload (v.1)

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #91 (permalink)  
Old 05-08-2007, 12:43 AM
New Pligger
 
Join Date: Mar 2007
Posts: 7
Thanks Cent!

I've made some basic changes to the upload code so that you can specify what format you want to convert to from the settings file. I've attached the files changed. Doing a diff on them should make it pretty apparent what I changed. The main thing was taking out the switch statement in image_upload_main.php and replacing it with a more efficient if...else.
Attached Files
File Type: rar image_upload_changes.rar (3.5 KB, 24 views)
Reply With Quote
  #92 (permalink)  
Old 05-08-2007, 06:27 PM
New Pligger
 
Join Date: Mar 2007
Posts: 6
Quote:
Originally Posted by bannthis View Post
If you have enabled this mod and can't see anything at step 3 of a story submission, then you might need to set GD version to 1 instead of the default version 2. Worked for me.
I had the same problem but changing GD version number didn't work.

I did find, however, that in the "# Check to see if the image needs to be rescaled." section the "newimage" variable is missing part of its string.

I changed:
PHP Code:
$newimage = new thumbnail($destPath.$destFile); 
to

PHP Code:
$newimage = new thumbnail($destPath.$destFile.$tempExt); 
and it works fine now.
Reply With Quote
  #93 (permalink)  
Old 05-08-2007, 08:01 PM
New Pligger
 
Join Date: Apr 2007
Posts: 5
Quote:
Originally Posted by cent View Post
Hi Karl,

Currently working on version .5 of the image_upload. The main item to fix is editing stories to maintain the image. Things have been a little delayed as I'm wrapped up in relaunching my movie's web site. However, it should be available in the next few days.

Best,
Cent
Awesome news, thanks.

K
Reply With Quote
  #94 (permalink)  
Old 05-09-2007, 01:09 AM
New Pligger
 
Join Date: Oct 2006
Posts: 19
I wanted to post a resolution to my problem that was solved with Cent's help.

the problem occurred due to my site being hosted on a shared host, and not in the root directory..as a result the code was looking for images in the wrong locations. I had the thumbnail showing up as a black square and the full image would not load because it was calling the root of my host, not my pligg.

The solution is as

in the setting file, I changed the original code to:

PHP Code:
    define('module_imageupload_basedir'$_SERVER['DOCUMENT_ROOT']."/pliggroot/"); 
and in the thumbs.php file i changed the original code to
PHP Code:
if ($mypliggbase != "")
{
    
$mypliggbase "/home/content/u/s/e/username/html/pliggroot/";
} else {
    
$mypliggbase "/home/content/u/s/e/username/html/pliggroot/";

Hope this helps the community, and thanks to Cent for a great module and his help for helping me debug this
Reply With Quote
  #95 (permalink)  
Old 05-10-2007, 12:14 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 168
Cent, love your module. You are the man!

If I can make a suggestion for the evolution of this module; perhaps this module could evolve into a video/picture upload module, i.e. U either upload a video or a picture, perhaps even both, truly making it a 'media' upload module.

I realize that we can link externally to videos on other sites using tags, but I feel that if all media upload features are combined into one module, I would enjoy it because my site members would really benefit from it. I'm sure there are others like me....

Thx again for your stellar module....
Reply With Quote
  #96 (permalink)  
Old 05-11-2007, 12:37 AM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 180
Hi Aaronpais,

I was thinking at some point to write a video upload module that would convert videos from quicktime, wmv, real, etc. into a common Flash format. Its actually a lot more complicated for most users as it would require an installation of ffmpeg and the ffmpeg-php extension (for thumbnails). You would need to have root access to your site/server via ssh or telnet and I'm not quite sure how possible it might be. I know there are other alternatives to actually uploading video, transcoding them and showing them out there -- but even those require root access.

It wouldn't be too hard to modify the image upload module into a video one (or a combination of the 2). But videos would be in their native format and a file limit imposed (not hard) for uploaded videos. I've already turned the image upload module into an mp3 module using a embeded flash player (similar to word press) and it works reasonably. Though it suffers from the same problems as image upload. So while I update one, I'll update the other. Once I have it working better, I'll release the mp3 module to the community.

Best,
Cent


Quote:
Originally Posted by aaronpais View Post
Cent, love your module. You are the man!

If I can make a suggestion for the evolution of this module; perhaps this module could evolve into a video/picture upload module, i.e. U either upload a video or a picture, perhaps even both, truly making it a 'media' upload module.

I realize that we can link externally to videos on other sites using tags, but I feel that if all media upload features are combined into one module, I would enjoy it because my site members would really benefit from it. I'm sure there are others like me....

Thx again for your stellar module....
Reply With Quote
  #97 (permalink)  
Old 05-12-2007, 03:18 AM
New Pligger
 
Join Date: Apr 2007
Posts: 25
Processing image upload
Link ID........: 76
Image Name.....: bigbazaar.jpeg
Temp Filename..: /tmp/phpL3bnY3
Dest File......: img_76.jpg
Dest Path......: /home2/wans11/public_html/home/images/
Image Width....: 231
Image Height...: 123
Image Mime Type: image/jpeg

Warning: move_uploaded_file(/home2/wans11/public_html/home/images/img_76.jpg): failed to open stream: Permission denied in /home2/wans11/public_html/home/modules/image_upload/image_upload_main.php on line 95

Warning: move_uploaded_file(): Unable to move '/tmp/phpL3bnY3' to '/home2/wans11/public_html/home/images/img_76.jpg' in /home2/wans11/public_html/home/modules/image_upload/image_upload_main.php on line 95

The "images" is set to 755, still I get the error. Any ideas?
Reply With Quote
  #98 (permalink)  
Old 05-12-2007, 03:23 AM
New Pligger
 
Join Date: Apr 2007
Posts: 25
I chmod to 777 and it worked!
Reply With Quote
  #99 (permalink)  
Old 05-13-2007, 10:50 PM
Casual Pligger
 
Join Date: Oct 2006
Posts: 89
like a lot of people, for some reason i cant get this mod to work. my pligg site isnt saved in the root of my site its saved inside of a folder named videos/

ive done everysingle step and my images just dont seem to upload, ive created an image folder in both the root of my site, and in my pligg directory, chmod them to 644, 755 and 777, but nothing works. i dont even care about thumbs, and have thumbnail creation as false, so it cant be my gd version which i have even changed to 1

im completely stuck

heres what im getting

Link ID........: 341
Image Name.....:
Temp Filename..:
Dest File......: img_341
Dest Path......: /home/content/b/o/a/boarsource/html/videos/images/
Image Width....:
Image Height...:
Image Mime Type:
Preview process...
Image Path = /home/content/b/o/a/boarsource/html/videos/images/testimage.jpg

Last edited by boardsource; 05-13-2007 at 10:56 PM.
Reply With Quote
  #100 (permalink)  
Old 05-13-2007, 11:00 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
If you guys can't get it to work try and download the latest thickbox and imge upload modules from the 9.5 release and use them on your site. I installed it in less than 10 mins for someone using 9.5 and it worked just fine.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload Module (File and Image Attachment) Yankidank Free Modules 158 03-19-2010 04:49 PM
[MOD] Image Upload Module (v1.0) -- Now Available cent Questions and Comments 184 06-27-2009 01:50 AM
[MOD] Image Upload Module (v0.93) -- Please test cent Questions and Comments 54 05-01-2009 10:12 PM
Image Upload Module -- Call for feature requests cent Questions and Comments 12 11-15-2008 12:13 PM
Image Upload / Image display with stories mod - Will pay for dev and share adampoots Questions and Comments 8 04-10-2007 07:22 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development