Help
15 posts by 4 authors in: Forums > CMS Builder
Last Post: August 31, 2010 (RSS)
By KCMedia - August 25, 2010
I have this new website that i am building and i need some help guys.
I have this section called sponsors where you upload images and put in some wording about them along with a url for each sponsor.
then in another section called events we have details about the event and the client wants to drag the sponsors section into the events area but when they setup the sponsors area it will allow them to select which sponsors they want for that event.
it sound all over the place i know but when it is working it will be good for the client.
can someone help.
thanks
Craig
Craig
KC Media Solutions
www.kcmedia.biz
Re: [kcmedia] Help
By Jason - August 25, 2010
So in the events section, they want to be able to select sponsors the sponsors they want to associate with a particular event. Is that right?
If so, you can set up a multi value list field in the events section that pulls its information from the sponsors table.
If I don't have it right, please provide some more clarification on exactly what needs to happen and what fields exist in each section.
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Help
By KCMedia - August 25, 2010
I sent you a message did you get it.
Craig
KC Media Solutions
www.kcmedia.biz
Re: [kcmedia] Help
By KCMedia - August 26, 2010
here is the file you wanted.
Craig
KC Media Solutions
www.kcmedia.biz
Re: [kcmedia] Help
By Jason - August 27, 2010
Try adding this code to where you're selecting your records (I've highlighted the changes in red):
// load records
list($the_eventRecords, $the_eventMetaData) = getRecords(array(
'tableName' => 'the_event',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$the_eventRecord = @$the_eventRecords[0]; // get first record
$sponsorList = trim($the_eventRecord['sponosors'],"\t");
$sponsorList = "(".str_replace("\t",",",$sponsorList).")";
list($sponsorRecords,$sponsorMetaData)=getRecords(array(
'tableName' => 'sponsors',
'allowSearch' => false,
'where' => "title IN $sponsorList",
));
This code will put all of the sponsors associated with the event into $sponsorRecords. You can then output this information anywhere you want.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Help
By KCMedia - August 27, 2010
I tried that but still no images for the sponsors showing up.
Craig
KC Media Solutions
www.kcmedia.biz
Re: [kcmedia] Help
By KCMedia - August 30, 2010
any update?
Craig
KC Media Solutions
www.kcmedia.biz
Re: [kcmedia] Help
By Chris - August 30, 2010
Jason isn't in the office today, but maybe I can help.
This may be unrelated, but I noticed what seems like a typo in the code above. Should this read "sponsors"?
$sponsorList = trim($the_eventRecord['sponosors'],"\t");
I took a look at your the-event.php code and noticed that you aren't using $sponsorRecords anywhere. You'll need to add some code where you want your images in your page to loop over the sponsors you've selected and display their uploads:
<?php foreach ($sponsorRecords as $sponsor): ?>
<!-- STEP 2a: Display Uploads for field 'uploads' (Paste this anywhere inside STEP2 to display uploads) -->
<!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
<?php foreach ($sponsor['uploads'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php endforeach ?>
<!-- STEP2a: /Display Uploads -->
<?php endforeach ?>
I hope this helps. Please let me know if you have any questions.
Chris
Re: [chris] Help
By KCMedia - August 30, 2010
I have tried that also and no good check out the error code on the page
http://champagneforcharity.org/the-event.php
craig
Craig
KC Media Solutions
www.kcmedia.biz
Re: [kcmedia] Help
By Jason - August 31, 2010
I think we'll have to take a look on your server to see exactly what's happening. Please fill out a 2nd Level Support Request here:
https://www.interactivetools.com/support/email_support_form.php
and I'll take a closer look at this.
Thanks.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/