Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
CMS Builder - Photo Gallery

 

 


bmatthews
Novice

Feb 21, 2008, 10:15 AM

Post #1 of 14 (2418 views)
Shortcut
CMS Builder - Photo Gallery Can't Post

Hello,

I recently started working with CMS Builder and I am trying to create a photogallery where I can have my client upload pictures. I really don't mind to much on how they display, but I would like them to display thumbnails then when you click on the image it would get larger. Please let me know if there is any documentation out there for this, I admit I am still weak with the CMS Builder.

Thanks,

Brett


Dave
Staff / Moderator


Feb 21, 2008, 1:52 PM

Post #2 of 14 (2410 views)
Shortcut
Re: [bmatthews] CMS Builder - Photo Gallery [In reply to] Can't Post

Hi Brett,

You can have CMS Builder display photos just about anyway you might need. You just need to move the tags around.

By default it will show thumbnails for uploads if they're available. To add a link to the full size image you'd just change this code:


Code
<?php if ($upload['hasThumbnail']): ?> 
<img src="<?php echo $upload['thumbUrlPath'] ?>"
width="<?php echo $upload['thumbWidth'] ?>"
height="<?php echo $upload['thumbHeight'] ?>"
alt="" /><br/>


To this:


Code
<?php if ($upload['hasThumbnail']): ?> 
<a href="<?php echo $upload['urlPath'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>"
width="<?php echo $upload['thumbWidth'] ?>"
height="<?php echo $upload['thumbHeight'] ?>"
alt="" /></a><br/>


Hope that makes sense, let me know if I can provide more details.

Dave Edis - Senior Developer
interactivetools.com


bmatthews
Novice

Mar 7, 2008, 10:44 AM

Post #3 of 14 (2275 views)
Shortcut
Re: [Dave] CMS Builder - Photo Gallery [In reply to] Can't Post

Hey Dave,

Been a few days since I talked to you. I got the photo page working and I am able to upload to it.

Now on the following URL all the pictures go directly down the page. Is there some type of code I can add that will take these pictures and put them into columns and/or rows.

Here is the URL that I am talking about.

http://www.shoreshot.net/photopage.php

Thanks,

Brett


Dave
Staff / Moderator


Mar 7, 2008, 11:45 AM

Post #4 of 14 (2272 views)
Shortcut
Re: [bmatthews] CMS Builder - Photo Gallery [In reply to] Can't Post

Hi Brett,

Yes, there's several ways to do that. The best way to proceed is usually to experiment with that on a html mockup page until you find the one the works best and then add it to the viewer page.

One method you could try is adding this to the image tag:


Code
<img ... style="float: left" ... >


Let me know if that works for you. If not we can figure out something else.

Dave Edis - Senior Developer
interactivetools.com


bmatthews
Novice

Mar 7, 2008, 3:10 PM

Post #5 of 14 (2264 views)
Shortcut
Re: [Dave] CMS Builder - Photo Gallery [In reply to] Can't Post

Hey Dave,

That worked great. Can you show me how I can put the image around a cell padding or spacing? I tried doing it to separate the images a bit but it started messing up my entire page.

Thanks man.

Brett


matrix
User

Mar 8, 2008, 7:52 AM

Post #6 of 14 (2257 views)
Shortcut
The markup? [In reply to] Can't Post

Removing this post. Please see Dave's wonderful, versatile solution as a code block below.
Happy Interactive Tools product user since 1999

(This post was edited by matrix on Mar 10, 2008, 9:03 AM)


Dave
Staff / Moderator


Mar 9, 2008, 8:58 AM

Post #7 of 14 (2232 views)
Shortcut
Re: [matrix] The markup? [In reply to] Can't Post

Do you have a link to the test page or can you attach the viewer so I can have a look at the code?

My first guess is that maybe you want </tr><tr> instead of </td></td>.

So you'd have something like this:


Code
<table><tr> 
<?php foreach (getUploads(...)): ?>

<td><img ... ></td>

<?php $maxCols=2; if (@++$count % $maxCols == 0): ?>
</tr><tr>
<?php endif ?>

<?php endforeach ?>
</tr></table>
}


If that's not it post a link to the page or attach the code and let me know the dimensions (2 columns right?) and I'll help you get it working quick.

Dave Edis - Senior Developer
interactivetools.com


matrix
User

Mar 9, 2008, 1:05 PM

Post #8 of 14 (2229 views)
Shortcut
Re: [Dave] The markup? [In reply to] Can't Post

Thank you so much for this nice, clean code block. It works perfectly and really clarifies for me the relationship of the php tags to the html.

You rock!

#################################

<!-- THUMBNAILS BEGIN -->
<table border="0" cellpadding="8" cellspacing="0" width="100%"><tr>

<?php if ($listDetails['noRecordsFound']): ?>
<td>No records were found!</td>
<?php endif ?>

<?php foreach ($listRows as $record): ?>
<?php foreach (getUploads($options['tableName'], 'uploads', $record['num']) as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>

<td valign="top">
<a href="<?php echo $record['_link'] ?>">
<?php echo $upload['info1'] ?><br/>
<img src="<?php echo $upload['thumbUrlPath'] ?>"
width="<?php echo $upload['thumbWidth'] ?>"
height="<?php echo $upload['thumbHeight'] ?>" /></a>
</td>

<?php $maxCols=2; if (@++$count % $maxCols == 0): ?>
</tr><tr>
<?php endif ?>

<?php endif ?>
<?php endforeach ?>
<?php endforeach ?>

</tr></table>
<!-- THUMBNAILS END -->

################################
Happy Interactive Tools product user since 1999

(This post was edited by matrix on Mar 10, 2008, 9:05 AM)


sagentic
User


Apr 23, 2008, 5:22 PM

Post #9 of 14 (1664 views)
Shortcut
Re: [matrix] The markup? [In reply to] Can't Post

Can't get this to work at all http://www.nele.us/photos on the photos page.

help?


Jake
Staff / Moderator


Apr 23, 2008, 8:34 PM

Post #10 of 14 (1658 views)
Shortcut
Re: [sagentic] The markup? [In reply to] Can't Post

Hi sagentic,

Thanks for posting. Smile

Everything seemed to be working correctly for me here:

http://nele.us/photos/photos.php/

Am I overlooking something, or did you get this resolved? Let us know if you still need our help!
-----------------------------------------------------------
Cheers,
Jake Swanson - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.



sagentic
User


Apr 24, 2008, 6:26 AM

Post #11 of 14 (1649 views)
Shortcut
Re: [Jake] The markup? [In reply to] Can't Post

Oh, it works normally how I have it set up, it's not working when I try to get the photos to show up in columns of 3 or 4.

I'm not sure what the exact code should be - I've tried the code above.

I get a variety of errors as I change things - the latest one being what it is.

http://www.nele.us/photos/photos1.php is my test page


Dave
Staff / Moderator


Apr 24, 2008, 9:50 AM

Post #12 of 14 (1602 views)
Shortcut
Re: [sagentic] The markup? [In reply to] Can't Post

Feel free to attach that file (photos1.php) to the post and we can have a look.

Based on the errors it sounds like $listRows isn't defined. You probably have a different variable name in yours. Look from some code like this (search for "getListRows"):


Code
list($listRows, $listDetails) = getListRows($options);


Check the variable name being used instead of $listRows and replace $listRows in the rest of your code with that one.

See if that helps, and/or post the file and we'll have a look!

Dave Edis - Senior Developer
interactivetools.com


sagentic
User


Apr 24, 2008, 10:50 AM

Post #13 of 14 (1595 views)
Shortcut
Re: [Dave] The markup? [In reply to] Can't Post

I don't know what I did - but it works now


Dave
Staff / Moderator


Apr 24, 2008, 10:56 AM

Post #14 of 14 (1594 views)
Shortcut
Re: [sagentic] The markup? [In reply to] Can't Post

Sounds good! :) Let us know if you need more help in future.

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4