Jump to content

Featured Content for IPS4.x+


Recommended Posts

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 by onlyME
Link to comment

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 requested
Error code: 2T257/3

Link to comment

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?

Link to comment

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 by Tripp_UK
Link to comment

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.

Link to comment

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. 

Link to comment

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 by Tripp_UK
Link to comment

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.

 

Link to comment

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.  

Link to comment

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 :smile:

Link to comment

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

Link to comment
  • 3 weeks later...

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. :lol:

 

Edit: I don't suppose I can use image sites like imgur with CImage? :unsure:

Edited by GrooveOnBeat
Link to comment

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? :unsure:

[img.php] Source image is not a valid file, check the filename and that a matching file exists on the filesystem.

 

Edited by GrooveOnBeat
Link to comment

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! :lol:

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. :tongue:

Link to comment

So try to use the file I sent on previous post.

Yes, I did that too. :lol:

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. :rofl:

Edit: I wonder if I downloaded the right files lol?

Edited by GrooveOnBeat
Link to comment

Yes, I did that too. :lol:

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. :rofl:

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 :rofl: 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 by onlyME
Link to comment

I've seen bugs like you, and I forgot what I edited the file img.php :rofl: 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! :lol:

img.php
img_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. :smile:

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. :unsure: 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.

 

Link to comment

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=90

not

http://mysite.com/cimage/webroot/img.php?src=http://mysite.com/cimage/img/car.jpg&w=200&h=200

Please give me the ACP so I can take a look if you can not make it works.

Link to comment

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! :thumbsup:

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. :smile:

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...