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 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
Wanted/idea: responsive images plugin
#7
blazejs & shawn_a,
My lunch date canceled today, so I put those two hours to good use.
it turned out to go faster than I thought, there was no need to involve GS in the process at all, other than what I have described below.

Download the adaptive-images.php file from:
http://adaptive-images.com

Place that file in the main directory that holds your GS;
Create a writable folder called 'ai-cache';
In your htaccess file paste the following code below your existing code.

Code:
# START Adaptive-Images
# Add any directories you wish to omit from the Adaptive-Images process on a new line, as follows:
RewriteCond %{REQUEST_URI} !/admin/
RewriteCond %{REQUEST_URI} !/theme/
RewriteCond %{REQUEST_URI} !/plugins/
RewriteCond %{REQUEST_URI} !ai-cache

# Send any GIF, JPG, or PNG request that IS NOT stored inside one of the above directories
# to adaptive-images.php so we can select appropriately sized versions
RewriteRule \.(?:jpe?g|gif|png)$ adaptive-images.php
# END Adaptive-Images

In the header file of all your theme templates paste the following script at the very top. Make sure that its path is equal to your site.

Code:
<script>document.cookie='resolution='+Math.max(screen.width,screen.height)+'; path=/eatonsnetwork/';</script>

Add the correct path to the cache folder in the config portion of the 'adaptive-images.php' file, ... in my case: "eatonsnetwork/ai-cache".

You should read over the instruction file for complete information, but basically the default settings in the config may be all you need.

I tried it on my desktop 27 inch monitor, and both the iOS iPad and iPhone simulators and it works quite well.
Hope it goes well for you!
Reply


Messages In This Thread
RE: Wanted/idea: responsive images plugin - by eatons - 2013-01-30, 07:47:53



Users browsing this thread: 3 Guest(s)