CMS Builder vs. Listings Manager

12 posts by 3 authors in: Forums > CMS Builder
Last Post: May 26, 2008   (RSS)

By HDBC - February 29, 2008 - edited: February 29, 2008

Hi All,

I have a website that uses Listings Manager to publish a gallery of images, with alternate images as the thumbnails. (see http://www.larryjostillustration.com/listman/exec/search.cgi?search=1&perpage=1000&lfield3_match=Main )

Is there a way to accomplish something similar with CMS Builder?

I _think_ we could do it by:

1. use a multiple page "section" that has a record which allows us to upload two images, thumbnail and full size image (note the thumbnail is a cropped portion of the full-size image, not simply a reduced image).
2. use a list viewer that returns results without any "break" between the results, and then constrain the "list" in a table cell with a fixed width

Are there any other (more elegant) ways to do this?

Also, this client uses a Macintosh... I've noticed some inconsistencies in CMS Builder between Firefox on Mac and Windows (mostly with the WYSIWYG editor). We're running Firefox 2.09 on Mac, are there any known bugs in this area?

You can see the current pages (previously updated with Page Publisher) here:
http://www.larryjostillustration.com/index.html

CMSB pages here:
http://www.larryjostillustration.com/index.php
(note that all of the menu items on the Portfolio page currently point to the .html pages rather than .php pages as we aren't ready to make the switch to CMS Builder just yet...)

Thanks for your input!
Eric

Re: [Dave] CMS Builder vs. Listings Manager

By matrix - March 6, 2008

This looks like the solution to a template I'm building, but before spending more time on it would surely like to know what I'm trying to do is really possible.

I want to use thumbnail images as the link from a "productsList" type page in the following format.

The template body (between header & footer) is formatted as a 2-column table. The left column (at 60% width) is text content about the multi page "section." What I'm trying to do with the right column is provide a place where thumbnail images, 2 per row, each serves as the link to the related product page, which will display the large image and more text content about the product.

Is there any way to do this so that the client can upload one image per product that will automatically be configured with an additional thumbnail for use on the productList page as the link? Barring that, uploading the image twice is fine, as long as the thumbnail automatically configures for the list page when uploaded there.

If I understand correctly, the solution in the postings above requires the upload of a previously configured thumbnail plus the large image. I'm trying to prevent the accidental upload of a large image where a thumbnail should be displayed. Ease of updates for clients is a priority in the way we lay the sites out.

I'm still learning CMS Builder, and apologize if this answer is obvious. I'll appreciate any help you can give me with this, having gotten myself into a deadline situation.

And...

Exactly how would the counter script be laid on? Is it this script?
<script language="JavaScript" type="text/javascript">
<!--
var count = 0;
-->
</script>

If so, I understand that code goes between the head tags, but am not sure where this should happen:

<script>

if (count % 2 == 0) {
document.write("</tr><tr>");
}
count++;

</script>

Maybe here, in a nested table in column 2?

<table width="40%" align="center">
<!-- template insert : $list$ -->
</table>

Obviously, this example came from one of my ArtMan templates. What should be substituted for the "template insert" line?

I am sure CMS Builder can do this and it would surely produce a great-looking site. Can't wait to find out!

Thank you so much for your help.
Happy Interactive Tools product user since 1999

Re: [matrix] CMS Builder vs. Listings Manager

By Dave - March 6, 2008

Hi Matrix,

Thanks for your post. I just wanted to double check something first.

Are the thumbnails you want to use different from the images? Meaning, can we just have CMS Builder automatically create thumbnails for you or no?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] CMS Builder vs. Listings Manager

By matrix - March 6, 2008

Yes, automatic creation of thumbnails would be great. It's worth the sacrifice of quality (if any) to provide ease of use for the client.

Thank you.
Happy Interactive Tools product user since 1999

Re: [matrix] CMS Builder vs. Listings Manager

By Dave - March 6, 2008

Ok great. Basically you would just setup a regular upload field. You can specify automatic thumbnailing for it in the field editor and specify the thumbnail size, etc.

You can also specify the thumbnail quality under Admin > General (in v1.10). The default quality is quite good (80%) but you can set it up to 100% if needed.

Also, you can do the counter script to wrap the columns in in PHP. It might look like this:
<?php if ($count++ % 2): ?> </tr><tr> <?php endif ?>

So it's all possible and pretty straightforward. Give it a shot and post back here as soon as you hit any roadblocks and we'll help you out. :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] CMS Builder vs. Listings Manager

By HDBC - May 26, 2008

Ok, I finally got around to doing this work and it's working great. You can see the page in question at
www.larryjostillustration.com/portfolio.php

I used two upload fields because the "thumbnail" is not simply a re-sampled version of the entire image... it is usually a region of the larger artwork cropped so that it's a teaser for what the full image is...

The one thing I'm trying to figure out is how to display one of the images in the list of records in the CMSAdmin window for that section. I have the field name listed in the ListPage Fields... "dragSortOrder, title, preview_image" but the image is not showing up (though the column header "Preview Image" is...)

Thanks for your thoughts on this one.

Eric

Re: [HDBC] CMS Builder vs. Listings Manager

By Dave - May 26, 2008

Unfortunately, there's no automatic way to do that.

I'm trying to think of a workaround. Would it be possible to have the image in a wysiwyg field and show that field on the list page?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] CMS Builder vs. Listings Manager

By HDBC - May 26, 2008

No, the user can't be trusted with a WYSWIG field. :)

Can we created a system field that would be a querry to the DB and place the tag for the image in the necessary html tag?

Re: [HDBC] CMS Builder vs. Listings Manager

By Dave - May 26, 2008

Eric,

I've added that to the next version. Here's how to add it now if you don't mind hacking the PHP a little.

- Add your upload fieldname to the List Page Fields so it shows on the list.
- Open /lib/menus/default/list.php
- Make a backup copy
- Search for "echo $value"
- Add this code (in black) above it:


// display first thumbnail for upload fields
if ($schema[$fieldname]['type'] == 'upload') {
$query = "SELECT * FROM `{$TABLE_PREFIX}uploads`\n";
$query .= " WHERE tableName = '$tableName' AND fieldName = '$fieldname' AND recordNum = {$record['num']}\n";
$query .= " ORDER BY `order`, num";
$result = mysql_query($query) or die("MySQL Error: ". htmlspecialchars(mysql_error()) . "\n");
while ($upload = mysql_fetch_assoc($result)) {
if (!$upload['thumbUrlPath']) { continue; }
$value = "<img src='{$upload['thumbUrlPath']}' width='{$upload['thumbWidth']}'' height='{$upload['thumbHeight']}' alt='' /><br/>\n";
break;
}
if (is_resource($result)) { mysql_free_result($result); }
}


?>
<td <?php echo $tdAttributes ?>><?php echo $value ?></td>


That will display the thumbnail for the first uploaded file in the specified upload field.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com