close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

multiple images

Thread began 8/20/2012 12:22 pm by JamieEff | Last modified 8/28/2012 4:28 pm by JamieEff | 1562 views | 17 replies |

JamieEff

multiple images

Hi Jason

Havent used Resizer yet so had a quick question.

Do you have to specify each image and image location on a given page or can it accommodate somethng like this where any image in PCMS for that given page will be resized to specific dimensions?

php:
<?php

if(TRUE){ // Begin Cached Resized Image: ImageCacheInstance_1345479496141
ob_start();
?>
      <?php echo WA_getCMSContent($database_PowerCMSConnection$PowerCMSConnection'Terms and Conditions''Content'); ?>
      <?php
echo(getCachedResizedImageHTML(ob_get_clean(), "uploads/images/""fit""#FFFFFF"false));
// End Cached Resized Image: ImageCacheInstance_1345479496141
?>



Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

image re-sizer needs to be applied to the image tag, it cannot be used to resize the images of a CMS Content area.

Sign in to reply to this post

JamieEff

ok, so to use resizer, I need to preset the amount of images and their positioning before hand?

Sign in to reply to this post

Jason ByrnesWebAssist

It could also be used in a repeat region.

Sign in to reply to this post

JamieEff

Hey Jason

am struggling to see how/understand how it works with a repeat region..

surely a repeat region implies that the content is being drawn in from a pcms content area?

I have been playing around with it for a few days trying to get it to work....

cheers

Jamie

Sign in to reply to this post

Christopher WestCommunity Expert

@Jamie Im assumning Jason was implying that ImageResizer isnt restricted to "static" images on a page...Im guessing that in his reply if you were to have a database of images that are all displayed on a page using a repeat region (like a photo gallery page) then all you would need to do is create the repeat region and on the image tag just apply the ImageResizer behaviour.

I dont use PCMS at the moment, but I can understand why you wouldnt be able to use ImageResizer with images in that way since all the code for that would be stored in a database rather then coded into the page itself.

Im thinking in theory (and I wouldnt expect this to work) is that if you had all the page content stored in a database (such as using PCMS) then in order to use ImageResizer for any images stored in that way you would need to hard-code the ImageResizer behaviour into the data stored in the database where the image source code would be. Then hardcode the include files of the ImageResizer at the top of the page that uses those type of images....again that wouldnt really make sense though since the whole idea of a CMS is to create content from the website rather then having to hard-code into the database that stores the content :) But I only explained that theory to better demonstrate what would be happening :)

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

  surely a repeat region implies that the content is being drawn in from a pcms content area?  



no, a repeat region implies that a recordset is being used, not a pcms content area.

the scenario is this, you have a table that contains an image column, and this used to dynamically populate an image tag on your page in a repeat region. You could add image resizer to the image tag to dynamically create a new image file of the specified dimensions at run time.

Sign in to reply to this post

JamieEff

thanks to you both for the reply...

@Jason, this is what I am trying to achieve but cannot seem to get it to work....

php:
<?php do { ?>

      <table width="100%" border="0" cellspacing="3" cellpadding="0" style="margin-bottom:20px;">
        <tr>
          <td style="width:50px; height:50px; overflow:"><a href="clients-temp.php?zClients=<?php echo $row_clientsMenuRS['ContentPageSetOrder']; ?>""><?php
include('WA_CMS/addtosite.php');
echo 
str_replace(array("<p>","</p>","&nbsp;"),"",WA_getCMSContent($database_PowerCMSConnection$PowerCMSConnection'zClients''Logo'false$row_clientsMenuRS['ContentPageSetOrder']));
?></a></td>
          <td valign="top"><a href="clients-temp.php?zClients=<?php echo $row_clientsMenuRS['ContentPageSetOrder']; ?>""><?php echo WA_getCMSContent($database_PowerCMSConnection$PowerCMSConnection'zClients''Company Name'false$row_clientsMenuRS['ContentPageSetOrder']);?></a></td>
          </tr>
      </table>
      
      
      
      <?php } while ($row_clientsMenuRS mysql_fetch_assoc($clientsMenuRS)); ?>



Basically, the left hand column I am wanting to draw in a logo that is used elsewhere and make the image dimensions 50x50 but whatever I have done just doesnt work....

Thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

  but whatever I have done just doesnt work....  




because you cant apply image resizer to a power CMS Content area, it wont work that way.

With Power CMS, you need to resize the image before uploading it.

Sign in to reply to this post

JamieEff

Ok Jason, I get that... but clearly I dont understand HOW to use it.. perhaps you could explain how it works (clearly in idiots terms for me please) and what the benefit of using it is if it isnt 'editabnle' byt the client...

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...