Showing thumbnails in blog - problem after hosting move, maybe caching?
Permalink
Here's the code that should show thumbnails in a custom blog template, on a site running Concrete 5.5.1 on php 5.3.1:
$link and $title are displayed correctly, but image src, width and height are not. They worked on the old server, but not on the new one.
I tried adding and got, for example:
File Object ( [error] => [fID] => 6558 [fDateAdded] => 2014-07-24 20:00:32 [uID] => 5 [fslID] => 0 [ocID] => 0 [fOverrideSetPermissions] => 0 [fPassword] => [fvID] => 1 )
When I did:
the template died completely and showed nothing.
Here is the page I am working on, complete with output of print_r
http://datest.clareassoc.com/jills-blog/accommodation-reviews/...
I'm sure I'm missing something here, and would really appreciate any help!
for ($i = 0; $i < count($cArray); $i++ ) { $cobj = $cArray[$i]; $title = $cobj->getCollectionName(); $link = $nh->getLinkToCollection($cobj); $pt = $cobj->getCollectionAttributeValue('page_thumbnail'); if($pt){ echo("<a href=\"$link\">"); $imgHelper->outputThumbnail($pt, 190,190, $title); echo("</a>"); } }
$link and $title are displayed correctly, but image src, width and height are not. They worked on the old server, but not on the new one.
I tried adding
print_r($pt)
File Object ( [error] => [fID] => 6558 [fDateAdded] => 2014-07-24 20:00:32 [uID] => 5 [fslID] => 0 [ocID] => 0 [fOverrideSetPermissions] => 0 [fPassword] => [fvID] => 1 )
When I did:
if (is_object($pt[0])) { }
the template died completely and showed nothing.
Here is the page I am working on, complete with output of print_r
http://datest.clareassoc.com/jills-blog/accommodation-reviews/...
I'm sure I'm missing something here, and would really appreciate any help!
Do you have this at the top of your document
Thanks for looking! Yes, I have those lines in there.
The code I gave is also inside an if statement: if (count($cArray) > 0) {
That seems to be working correctly.
As I said, this exact code was showing images on a different server: unfortunately, that server was so overloaded that it was causing tons of other problems, so the site had to be moved. I assume that there must be some minor difference in the configuration on the new server that is stopping the code from working.
The code I gave is also inside an if statement: if (count($cArray) > 0) {
That seems to be working correctly.
As I said, this exact code was showing images on a different server: unfortunately, that server was so overloaded that it was causing tons of other problems, so the site had to be moved. I assume that there must be some minor difference in the configuration on the new server that is stopping the code from working.