Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-15-2013, 12:11 PM
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 10-15-2013, 01:09 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 10-15-2013, 01:18 PM
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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 [DATE]1381847197[/DATE] at [TIME]1381847197[/TIME] ---------------

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 10-15-2013, 01:36 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
2 благодарности(ей) от:
Disco_Dave, FBRN_Andrew
  #5  
Old 10-15-2013, 04:12 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 10-15-2013, 05:04 PM
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 10-15-2013, 05:07 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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 10-15-2013, 05:12 PM
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 10-22-2013, 03:00 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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):
Code:
$attachments = $vbulletin->db->query_read_slave("
	SELECT a.settings, a.attachmentid, a.filename, a.dateline
	FROM " . TABLE_PREFIX . "attachment AS a
	WHERE
		a.attachmentid IN (" . implode(',', $matches[1]) . ")			
	LIMIT 50
");

Then around line 260 find this code and change part in red:
Code:
$attribs = array(
	'src'          => $vbulletin->options['bburl'] . '/attachment.php?attachmentid=' . $attachmentid . '&stc=1&d='.$ids[$attachmentid]['dateline'],
	'attachmentid' => $attachmentid,
	'alt'          => '',
	'id'           => 'vbattach_' . $attachmentid,
);
(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]
Reply With Quote
  #10  
Old 10-22-2013, 04:10 PM
FBRN_Andrew FBRN_Andrew is offline
 
Join Date: Sep 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply


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

Forum Jump


All times are GMT. The time now is 05:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08765 seconds
  • Memory Usage 2,282KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete