The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image resizing within the CMS?
#14
Cerulean Wrote:If there is the ability to upload within the editor, then I'm not sure whether it is best to resize the files as they are uploaded, or to apply a resizing script to the editor output. By that I mean, instead of having the editor output the code
Code:
<img src="path/to/image.jpg" style="width: 216px; height: 144px;" />
it would output
Code:
<img src="/slir/w216-h144/path/to/image.jpg" />
and use a resizing script such as SLIR: http://code.google.com/p/smart-lencioni-...wiki/Usage

This second option would be more difficult to implement because you would have to parse the output of the editor when the "Save Updates" button is clicked, but it would be a powerful feature.

The I18N Gallery plugin already uses an approach like this: it resizes the image on first access and caches it in the thumbs directory, e.g.
Code:
<img src="http://my.site/plugins/i18n_gallery/browser/pic.php?p=myimage.jpg&w=200&h=150" alt=""/>
You can specify one or both of width/height and the image (relative path from /uploads) is always resized proportionally, while not exceeding the given width/height.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
Image resizing within the CMS? - by Cerulean - 2011-05-11, 18:48:23
Image resizing within the CMS? - by Connie - 2011-05-11, 19:40:51
Image resizing within the CMS? - by mvlcek - 2011-05-11, 19:45:11
Image resizing within the CMS? - by Cerulean - 2011-05-11, 20:49:50
Image resizing within the CMS? - by Connie - 2011-05-11, 21:34:04
Image resizing within the CMS? - by yojoe - 2011-05-12, 01:45:01
Image resizing within the CMS? - by Cerulean - 2011-05-12, 07:22:12
Image resizing within the CMS? - by datiswous - 2011-05-12, 09:05:44
Image resizing within the CMS? - by Cerulean - 2011-05-12, 09:21:11
Image resizing within the CMS? - by yojoe - 2011-05-12, 21:08:21
Image resizing within the CMS? - by Cerulean - 2011-05-12, 22:08:21
Image resizing within the CMS? - by Connie - 2011-05-12, 22:48:33
Image resizing within the CMS? - by Cerulean - 2011-05-13, 08:58:20
Image resizing within the CMS? - by mvlcek - 2011-05-13, 15:54:05
Image resizing within the CMS? - by datiswous - 2011-05-20, 05:23:54



Users browsing this thread: 6 Guest(s)