MASTER IMAGE LIBRARY. An editor with images that i can select later through a list that get options from a database.

9 posts by 2 authors in: Forums > CMS Builder
Last Post: May 1, 2013   (RSS)

By carlos.pinedo - April 30, 2013 - edited: April 30, 2013

HI, 

I've been trying to create a MASTER IMAGE LIBRARY. An editor with images that i can select later through a list that get options from a database.

I tried a solution posted in this link: http://www.interactivetools.com/forum/forum-posts.php?postNum=2211115#post2211115  . It worked. But i can´t increase the number of records. I changed the 'limit' number but, still, it just shows the first record:  http://www.fecofutsalon.com/logotestdetail.php

This is the code in the detail page. How can increase the record numbers?

list($programsRecords, $programsMetaData) = getRecords(array(
'tableName' => 'programs',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$programsRecord = @$programsRecords[0]; // get first record
?>

<?php //display logos selected from list in other table, note both tables have same field name of 'logos'
$numsTabbedList = $programsRecord['logos'];
$numsTabbedList = trim($numsTabbedList);
$numsCommaList = str_replace("\t", ",", $numsTabbedList);
if ($numsCommaList) {
list($logo_uploadsRecords,) = getRecords(array(
'tableName' => 'logo_uploads',
'where' => "num IN ($numsCommaList)",
'allowSearch' => '0',
));
}
else { $logo_uploadsRecords = array(); // empty array

Hi Carlos,

Did you download the zip file at http://www.thecmsbcookbook.com/downloads/logos.zip and use the files provided?

What results did you get?

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Hi Jerry, 

Yes I used that zip file. It works,  but i´m having some difficulties increasing the limit of records.  I changed the 'limit' number but, still, it just shows the first record:  http://www.fecofutsalon.com/logotestdetail.php

Carlos

By gkornbluth - May 1, 2013

Carlos,

Could you explain what you mean by "increase the limit of records"?

Do you mean that you want to show more than one logo on the detail page?

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Exactly, I want to display more than one logo on the detail page.

Carlos

By gkornbluth - May 1, 2013

Now I understand.

I'm not sure how to do that, but will look at it as soon as I can.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Thanks Jerry!

Carlos

By carlos.pinedo - May 1, 2013 - edited: May 1, 2013

Hi Jerry

When I read in your post :" multi-value" everything made sense. My mistake was using a simple pull-down list, instead of a pull-down (multi value) list.  Now, it  displays more than one logo.   http://www.fecofutsalon.com/logotestdetail.php    Thanks for that.

I have another question, is it possible to show several programs in the logotestdetail.php page?

Carlos Pinedo