Contact form/navigation

6 posts by 3 authors in: Forums > CMS Builder
Last Post: October 13, 2009   (RSS)

hi,

I have added a contact form to a site, and it used to work and send emails, however, now when an email is sent i get the error:

Warning: mail(): Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /var/www/vhosts/janizm.co.uk/httpdocs/contact.php on line 114 Warning: mail(): Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /var/www/vhosts/janizm.co.uk/httpdocs/contact.php on line 115

Please find attached the contact form code.

I am also experience the problem of the navigation. for example i have two items at a depth = 1 and one item at a depth = 0, however the only one of the secondary items are displaying correctly.

the site is http://www.janizm.co.uk/gallery.php?Janizm-Gallery-1 and as you will see in firefox, there is a page called Gallery, and under gallery, artwork and photographs are meant to sit, but artwork doesnt.

Re: [dsternalski] Contact form/navigation

By Damon - October 10, 2009

Hi,

Thanks for the post.

On some of the pages I checked, there is a missing </head> tag and a missing </li> tag. These could be contributing to the navigation issues.

Do you have a example of the navigation working? If you could show me that, I could provide suggestions on how to re-create the navigation using CMS Builder.

The gallery looks like it is using Slide Show Pro? Here is a link to some documentation that might help:
http://www.interactivetools.com/docs/cmsbuilder/slideshowpro.html

The contact script isn't one that we have made so I can't really help debug it. But, from the error message, it looks like sendmail may not be setup correctly or possible the path to sendmail is incorrect. Check with your host for the sendmail path. Also most hosts have example contact forms which may help.
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [dsternalski] Contact form/navigation

By Chris - October 11, 2009

Hi dsternalski,

I think your IF...ELSEIF strategy in navigation.php is causing the problems. For example, if you have two records at depth==1, your code is going to generate an extra </li>, which will break your page layout.

There is a much simpler way. First, replace the getRecords() calls for your Category Menus with getCategories() calls:

list($allGalleryRecords,) = getCategories(array(
'tableName' => 'gallery',
));
list($allLinksRecords,) = getCategories(array(
'tableName' => 'links',
));


Next, replace your foreach's with these foreach's:

<?php foreach ($allGalleryRecords as $categoryRecord): ?>
<?php echo $categoryRecord['_listItemStart'] ?>
<a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['navigation_name'] ?></a>
<?php echo $categoryRecord['_listItemEnd'] ?>
<?php endforeach; ?>
<?php foreach ($allLinksRecords as $categoryRecord): ?>
<?php echo $categoryRecord['_listItemStart'] ?>
<a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['navigation_name'] ?></a>
<?php echo $categoryRecord['_listItemEnd'] ?>
<?php endforeach; ?>


The _listItemStart and _listItemEnd will take care of adding <ul> and </ul> tags where they're needed depending on the depth of the records displayed.

I hope this helps! Please let us know if you have any more questions.
All the best,
Chris

Re: [chris] Contact form/navigation

Hi

this worked, thank you.

Re: [dsternalski] Contact form/navigation

By Chris - October 13, 2009

Great! Glad to have helped! :)
All the best,
Chris