onlyME Posted June 11, 2015 Author Posted June 11, 2015 (edited) Just been looking at the settings screens, ref the image resizing options, are these all using external services, or can any of them work on site. If on site can be used once an image has been sized is it then used for every page refresh or is it resized each time the page is loaded?Still worrying about server load here as we're on the cusp of our host forcing us to go for a higher CPU package which will likely bust our budget and shut us down.Look at my demo site http://ipsviet.com/page/featuredcontent4 It never resizes images each page load (cimage has cache) This option is used for image resize/crop & filter, if you don't like you can ignore it. Or you don't like to use it on external service, you can download cimage, timthumb,... or any php resize script and use it on your hosting. Edited June 11, 2015 by onlyME
tekguru Posted June 11, 2015 Posted June 11, 2015 Okay thanks this continue to look promising for us then
Tripp★ Posted June 12, 2015 Posted June 12, 2015 Got a bit of a problem with it. I've set it up to pull records (Announcements, Community Articles and the like), and I put them on my homepage. Except, now whenever I try to add an article I get this error:Cannot find the page you requestedError code: 2T257/3
onlyME Posted June 12, 2015 Author Posted June 12, 2015 Got a bit of a problem with it. I've set it up to pull records (Announcements, Community Articles and the like), and I put them on my homepage. Except, now whenever I try to add an article I get this error:Are you using the newest version? Can you give me ACP access so I can take a look?
Tripp★ Posted June 12, 2015 Posted June 12, 2015 (edited) ... Again it seems to have resolved itself. :/Next time I'm going to wait an hour before contacting you. xD Thanks for the very prompt reply though! Edited June 12, 2015 by Tripp_UK
onlyME Posted June 12, 2015 Author Posted June 12, 2015 ... Again it seems to have resolved itself. :/Next time I'm going to wait an hour before contacting you. xD Thanks for the very prompt reply though!When it occurs again, send me 2 files /uploads/logs/latest.cgi anf latest_sql.cgi
Tripp★ Posted June 12, 2015 Posted June 12, 2015 (edited) Sure but I checked that it didn't show anything.I am having another issue though. Apparently instead of serving the thumbnails it's actually serving the full images and scaling them down. Is this supposed to happen?Nevermind - I found the image settings thing your application. Question though; does it process the image on the fly - with each page load or does it do it, save the thumbnail and load from that thumbnail each time? (The latter is preferable). Edited June 12, 2015 by Tripp_UK
onlyME Posted June 12, 2015 Author Posted June 12, 2015 Sure but I checked that it didn't show anything. I am having another issue though. Apparently instead of serving the thumbnails it's actually serving the full images and scaling them down. Is this supposed to happen? About the thumbnail This app doesn't use any hooks to posting article action, so I think there are diffrence problems on your site. You can disable this app and try to test the problem will occur or not.
onlyME Posted June 12, 2015 Author Posted June 12, 2015 Sure but I checked that it didn't show anything.I am having another issue though. Apparently instead of serving the thumbnails it's actually serving the full images and scaling them down. Is this supposed to happen?Nevermind - I found the image settings thing your application. Question though; does it process the image on the fly - with each page load or does it do it, save the thumbnail and load from that thumbnail each time? (The latter is preferable). For the first time it will create the cache, so it doesn't resize each page load. You can test on the my demo site.
Tripp★ Posted June 12, 2015 Posted June 12, 2015 (edited) Yeah... I can't get this working... Keeps coming up with Error 500 - and when I go to the URL (https://www.domain.tld/ips4/uploads/imagethumb/webroot/img.php?src=https://www.domain.tld/ips4/uploads/uploads/monthly_2015_06/imagename.jpg.(somerandomhash).jpg&w=160&h=160&cf&q=90) directly I get this error:[img.php] Source image is not a valid file, check the filename and that a matching file exists on the filesystem.When I goto: https://www.domain.tld/ips4/uploads/uploads/monthly_2015_06/imagename.jpg.(somerandomhash).jpg it does exist, so I have no idea what's going on and there is no error log.Shall I send you a PM to take a look? Edited June 12, 2015 by Tripp_UK
onlyME Posted June 12, 2015 Author Posted June 12, 2015 Yeah... I can't get this working... Keeps coming up with Error 500 - and when I go to the URL (https://www.domain.tld/ips4/uploads/imagethumb/webroot/img.php?src=https://www.domain.tld/ips4/uploads/uploads/monthly_2015_06/imagename.jpg.(somerandomhash).jpg&w=160&h=160&cf&q=90) directly I get this error:[img.php] Source image is not a valid file, check the filename and that a matching file exists on the filesystem.Shall I send you a PM to take a look?Yes, please show me the URL.
socceronly Posted June 12, 2015 Posted June 12, 2015 Would it be possible to add a small bit of text from the first xx characters of an article for pages?[image with title]In 1983 we had a monkey trained that would eat.....[Image with title]Mr. Koko did not like the coconut milk.... Where this would be really helpful, and perhaps is simply a separate product is this.When you add a page to a database it only displays the article on that page. So if you want your list of articles in three columns, the article will display in that column. The database filter blocks don't show thumbnails.
onlyME Posted June 13, 2015 Author Posted June 13, 2015 Would it be possible to add a small bit of text from the first xx characters of an article for pages? [image with title] In 1983 we had a monkey trained that would eat..... [Image with title] Mr. Koko did not like the coconut milk.... Where this would be really helpful, and perhaps is simply a separate product is this. When you add a page to a database it only displays the article on that page. So if you want your list of articles in three columns, the article will display in that column. The database filter blocks don't show thumbnails. It can not
socceronly Posted June 13, 2015 Posted June 13, 2015 I didn't think so, it was more of a poorly and quickly written suggestion for a different version. The ability to have block that does decent article previews with thumbnails I think would be well received. Either way, I'll be getting several of this one once my sites are all running the same thing. Thanks!JM
GrooveOnBeat Posted June 29, 2015 Posted June 29, 2015 (edited) There is an option to use image rerize scripts to aspect ratio but I haven't updated my demo site yet. (go to acp featured content -> settings -> On-the-fly Image Resizing URL ) About emoticons, I have a solution to ignore emoticons, I will update in the next version. Edit: Updated demo site, no stretching images I'll try CImage too...And see how it goes. Edit: I don't suppose I can use image sites like imgur with CImage? Edited June 29, 2015 by GrooveOnBeat
GrooveOnBeat Posted June 29, 2015 Posted June 29, 2015 (edited) I know this isn't part of Featured Content support but...I seem to be using CImage wrong. 1. Downloaded the zip at https://github.com/mosbth/cimage (zip file located in the right column)2. Uploaded the contents in the directory "cimage".3. Ran "check_system.php" and was fine.4. Set "cache" to 777.5. Using "img.php" and the default "img_config.php".6. Changed the image and cache paths in "img_config.php". /home/mysite/public_html/cimage/img/ /home/mysite/public_html/cimage/cache/ 7. Set the script URL which points to "http://mysite.com/cimage/webroot/img.php".8. Image URL: http://mysite.com/cimage/webroot/img.php?src=http://mysite.com/cimage/img/test.jpg&w=100&h=100&cf&q=90 No image output. Any ideas? [img.php] Source image is not a valid file, check the filename and that a matching file exists on the filesystem. Edited June 29, 2015 by GrooveOnBeat
onlyME Posted June 29, 2015 Author Posted June 29, 2015 Hi,This is an issue of cimage. Try to use this file \cimage\webroot\ img.phpOr search comment out 2 lines (in \cimage\webroot\img.php) preg_match($validFilename, $srcImage) or errorPage('Filename contains invalid characters.');
GrooveOnBeat Posted June 29, 2015 Posted June 29, 2015 Hi, This is an issue of cimage. Try to use this file \cimage\webroot\ img.php Or search comment out 2 lines (in \cimage\webroot\img.php) preg_match($validFilename, $srcImage) or errorPage('Filename contains invalid characters.'); Hi! I commented out the 2 lines and now I get this HTTP/1.0 500 Internal Server Error I must be doing something wrong haha.
onlyME Posted June 29, 2015 Author Posted June 29, 2015 (edited) Hi! I commented out the 2 lines and now I get this HTTP/1.0 500 Internal Server Error I must be doing something wrong haha. So try to use the file I sent on previous post. Edited June 29, 2015 by onlyME
GrooveOnBeat Posted June 29, 2015 Posted June 29, 2015 (edited) So try to use the file I sent on previous post. Yes, I did that too. I checked over the requirements and I have GD + PHP 5.5x. I also reuploaded all of the files. I wonder if I didn't configure it correctly in "img_config.php"? All I have to do is edit the image and cache paths, right? I set mode to "production". I got to be missing something. Edit: I wonder if I downloaded the right files lol? Edited June 29, 2015 by GrooveOnBeat
onlyME Posted June 29, 2015 Author Posted June 29, 2015 (edited) Yes, I did that too. I checked over the requirements and I have GD + PHP 5.5x. I also reuploaded all of the files. I wonder if I didn't configure it correctly in "img_config.php"? All I have to do is edit the image and cache paths, right? I set mode to "production". I got to be missing something. Edit: I wonder if I downloaded the right files lol? I've seen bugs like you, and I forgot what I edited the file img.php So try to use cimage.zip that I use on my site. If it still doesn't work, please give me the FTP access. Edited June 29, 2015 by onlyME
GrooveOnBeat Posted June 30, 2015 Posted June 30, 2015 I've seen bugs like you, and I forgot what I edited the file img.php So try to use cimage.zip that I use on my site. If it still doesn't work, please give me the FTP access. We're getting closer, I can feel it! img.phpimg_config.php Ok, so I got the resizer to work but it's a little different. I kept the image and cache path and autoloader as in the original file. I didn't edit it. Code is below. /** * Where are the sources for the classfiles. * * Default values: * autoloader: null // used from v0.6.2 * cimage_class: null // used until v0.6.1 */ 'autoloader' => __DIR__ . '/../autoload.php', //'cimage_class' => __DIR__ . '/../CImage.php', /** * Paths, where are the images stored and where is the cache. * End all paths with a slash. * * Default values: * image_path: __DIR__ . '/img/' * cache_path: __DIR__ . '/../cache/' * alias_path: null */ 'image_path' => __DIR__ . '/img/', 'cache_path' => __DIR__ . '/../cache/', //'alias_path' => __DIR__ . '/img/alias/', When I add the image URL into the browser it resizes exactly how I want it to. Below works. http://mysite.com/cimage/webroot/img.php?src=car.jpg&w=200&h=200 When I add the full URL as src no picture is shown. Below does not work. I don't use this code below. http://mysite.com/cimage/webroot/img.php?src=http://mysite.com/cimage/img/car.jpg&w=200&h=200 I added the URL to the script in the settings below. No picture in the slider is shown. http://mysite.com/cimage/webroot/img.php When I remove the URL to the script and leave it blank, the pictures in the slider is shown. The problem is that it resizes the pictures to the slider settings and does not use the resize script, which is an expected result.
onlyME Posted June 30, 2015 Author Posted June 30, 2015 When you leave the URL to the script blank, it will not use cimage. The URL to the script in setting should be:http://mysite.com/cimage/webroot/img.php?src={url}&w={width}&h={height}&cf&q=90nothttp://mysite.com/cimage/webroot/img.php?src=http://mysite.com/cimage/img/car.jpg&w=200&h=200Please give me the ACP so I can take a look if you can not make it works. GrooveOnBeat 1
GrooveOnBeat Posted June 30, 2015 Posted June 30, 2015 The URL to the script in setting should be:http://mysite.com/cimage/webroot/img.php?src={url}&w={width}&h={height}&cf&q=90 That works! I now realize why the pictures weren't coming out the way I wanted to. The "cf" is crop-to-fit. I changed it to "ff", which is fill-to-fit. It keeps the original aspect ratio and resizes to the set dimensions. I also set the "q" (or quality) to 70. While I'm playing around the settings here is what I have now. Notice I'm using "imgp.php". http://mysite.com/cimage/webroot/imgp.php?src={url}&w={width}&h={height}&ff=000000&q=70 Thanks for your help and patience, onlyME.
Recommended Posts