Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 15 Oct 2013, 14:11
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
Rotate Photos

I've looked through and search, for a mod that would allow users and/or moderators to be able to rotate pictures. a VERY high percentage of our pictures are from cell phones now and end up rotating to the wrong orientation. is there a mod/hack add-in that would add simple rotate left/right to pictures?

Sorry if I'm just not finding it. but I'd love this ability.
Reply With Quote
  #2  
Old 15 Oct 2013, 15:09
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Were you thinking of having the option to do it as they're uploaded? Maybe I can look at doing something.
Reply With Quote
  #3  
Old 15 Oct 2013, 15:18
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
Originally Posted by kh99 View Post
Were you thinking of having the option to do it as they're uploaded? Maybe I can look at doing something.
That would be awesome, it's so annoying, to have all the sideways pictures, and I can't seem to find a way to rotate them.

makes me nutz, the forum I admin (haha or maybe I should say am learning to admin) is very picture centric, and now the percentage of sideways pictures keeps going up as more and more phones get taller.

if you're looking for a wish list, being able to let user orient the picture would be huge, allowing moderators to go in and orient would be super helpful, a lot of our users can barely navigate the forum, much less options.

--super awesome bonus would be if I'd also love to see a image quality control, one of my other pet-peaves with current photo's is the amazing number of 10 megapixel blurry pics, it'd be super nice to scale them down to like 40kb, (about what most of them are actually quality wise)
-- just wishing now though

--------------- Added 15 Oct 2013 at 15:26 ---------------

just to be clear -- anything would help so if it's just during the upload process it'd still be huge.

it's been an issue since we started the forum especially with Iphones, I'm surprised I couldn't find tons of threads and mods for it. maybe we just post a lot more pictures than most forums.
Reply With Quote
  #4  
Old 15 Oct 2013, 15:36
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
OK, well, I can't promise anything but it sounds like something that would be useful to a lot of people so I'll look in to it.
Reply With Quote
  #5  
Old 15 Oct 2013, 18:12
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
OK, I have a question: right now if you're editing a post and you double click an attachment it pops up a dialog that has some options. I think I can add to that or add a similar control. But sometimes I feel like the only person in the world who isn't using forums on a phone, so I have no idea if the editor even works on people's phones. Does it? And if not, do you feel like you need some way for people to do this from their phones? If so, maybe it doesn't make sense for me to try to do this.
Reply With Quote
  #6  
Old 15 Oct 2013, 19:04
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
for me personally, I think it'd be great, especially if it can be done after the post is up.

as for the phone editing, most of our users are on tapatalk or forum runner, so my knee jerk reactions is let them code their own apps.

but if it would only be possible to add on the intital post, I'd say don't waste your time, if I can go in and fix existing pictures, I'd think it'd be awesome... like the sort of thing I'd pay for actually.
Reply With Quote
  #7  
Old 15 Oct 2013, 19:07
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by FBRN_Andrew View Post
but if it would only be possible to add on the intital post, I'd say don't waste your time, if I can go in and fix existing pictures, I'd think it'd be awesome... like the sort of thing I'd pay for actually.

OK, what I was thinking is adding to or making something similar to the existing dialog that pops up when you double click an image in the editor (when editing a post). So if I understand you, that's the kind of thing you're looking for, so I'll go ahead and see what I can come up with.
Reply With Quote
  #8  
Old 15 Oct 2013, 19:12
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
yes that would be great, most especially if moderators could do it also. but if just each user could fix there own, still huge.

I have noticed "most of the time" when I put pictures from my phone into the forum, they "look" right untill a post and refresh. so again, if it's only on initial upload it'd have to have a "this side up" check box or something or it'd be a big time soak and might make it worse :-)
Reply With Quote
  #9  
Old 22 Oct 2013, 17:00
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
OK, here's a first version, attached, if anyone wants to test it out. Might be a good idea to limit testing to one image or a test thread at least until you make sure it works.

To use this, install the product then edit a post with an attachment and double click the attachment. You should get the existing "attachment config" editor popup (Edit: actually it's called "Image Settings"), and it should have an added row of radio buttons for "Rotation". Select a rotation angle, press "Save" in the popup, press "Save" to save the edit, then refresh the browser (Ctrl-F5 in FF).

There are a couple of issues: because of the way attachments are inserted in posts, you won't see the rotated image until you force a reload of the page and bypass the browser cache. You can fix that issue by editing the file includes/class_bbcode_alt.php and making these changes (sorry, couldn't do it with a plugin):

Around line 245, find this code and add the part in red (including the comma):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Then around line 260 find this code and change part in red:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

(note that the above change is really two additions, &d= before the existing single quote, and the rest after the quote and before the existing comma).

You don't have to make those changes, but again if you don't you won't see the rotated image until you force a refresh (Ctrl-F5).

Also, when you're in the editor you won't see the image rotated in the editor until you hit save (I'm still working on that one).

One other thing: this only works if you have the GD library configured in your php. If someone's using Imagmagick instead I might be persuaded to add support for that.

I'll be releasing this as a mod soon, but was hoping to get at least one person to test it first.

[Edit: removed attachment, not working]

Last edited by kh99; 22 Oct 2013 at 20:54.
Reply With Quote
  #10  
Old 22 Oct 2013, 18:10
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
Awesome. thanks. pretty straight forward and self explanatory dialog. but it's not working on my forum, I'm sure I'm doing something wrong. but I've even open the page I edidted on another machine. and pretty sure it's not browser cache. should the rotation dialogue go back to "none" or is it supposed to hold the rotation setting?
Reply With Quote
  #11  
Old 22 Oct 2013, 18:16
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
It should hold the setting, so apparently it's bailing out at some point.

If you want you could try going to the admincp, and at or near the bottom of the list there should be a "kh99 Rotate Attachment" setting page. There you can turn on debugging and specify a file to write the messages to. It has to be a writable directory. If your server is set up so that the web server process can write to the forum directories then you can just put a file name, otherwise you'll need a path to somewhere with write permission.

Do you know if you have GD configured? You can go to Maintenance > View PHP Info and see if it's listed in the configuration (there'll be a section with GD at the top, for me it's between ftp and gettext).
Reply With Quote
  #12  
Old 22 Oct 2013, 18:19
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
...also, do you know which version of vbulletin and php you're running?
Reply With Quote
  #13  
Old 22 Oct 2013, 18:46
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
PHP 5.3.26
VBulletin 4.2.2
I made a directory set it to 755 and a file also 755 and nothing's going in the file.
I'm _not_ much of a coder, or web guy, so I'm not sure I did it correctly.
I'm more than willing to work on testing but it might be easier to PM me instructions and we can post what's needed without me fumbling around or possibly confusing things on the forum.

--------------- Added 22 Oct 2013 at 18:49 ---------------

GD Support enabled
GD Version bundled (2.1.0 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.4.2
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 6b
PNG Support enabled
libPNG Version 1.2.44
WBMP Support enabled
XBM Support enabled
Reply With Quote
  #14  
Old 06 Dec 2013, 18:52
jjohns12 jjohns12 is offline
 
Join Date: Aug 2013
I have been looking for a mod like you are making and i am using imagemagic please add support for that.

Thanks
__________________
East Coast Surfcasters A Surf Fishing and Striped Bass Forum
http://www.eastcoastsurfcasters.com/forums/
Reply With Quote
  #15  
Old 06 Dec 2013, 23:30
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
I'll try to do that. I actually have a version of this mod that works for me (using GD), but FBRN_Andrew who volunteered to test it for me couldn't get it to work at all on his server, so it's been on hold.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 15:56.

Layout Options | Width: Wide Color: