New Pages Error Code

22 posts by 5 authors in: Forums > CMS Builder
Last Post: September 10, 2010   (RSS)

i'm am putting together my ROUGH layout and am trying to figure this all out.

I copy and pasted the code, stripped out a few of the things i didn't want and this is what i get.

"Parse error: syntax error, unexpected T_ENDFOREACH in /hermes/bosweb/web251/b2519/sl.evsmc/public_html/cmsAdmin/services.php on line 61"

It was working properly earlier but now it's not.
any suggestions?
thx
tim

Re: [dakrusha] New Pages Error Code

By zip222 - September 9, 2010

Can you post the code for your page?

Re: [zip222] New Pages Error Code

Re: [dakrusha] New Pages Error Code

By Jason - September 9, 2010

Hi,

It looks like the beginning of a foreachloop was removed, but not the end.

Remove this line:

<?php endforeach ?>

This should be around line 68.

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] New Pages Error Code

i removed all the same info before and got an ok result. this time it's acting weird.

i removed that line and now i'm getting....

Warning: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web251/b2519/sl.evsmc/public_html/cmsAdmin/services.php:6) in /hermes/bosweb/web251/b2519/sl.evsmc/public_html/cmsAdmin/services.php on line 38



strange

Re: [dakrusha] New Pages Error Code

By Jason - September 9, 2010

Hi,

You need to take this code:

<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php


// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/hermes/bosweb/web251/b2519/sl.evsmc/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load records
list($servicesRecords, $servicesMetaData) = getRecords(array(
'tableName' => 'services',
'loadUploads' => '0',
));

?>


and move it to the very top of your page. You'll want to make sure that there isn't even a blank line between the beginning of this code and the top of the page.

That should take care of that issue.

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] New Pages Error Code

ok that seemed to do the trick.

now that that's working...thank you very much.

how do a i get multiple record e.g. on a news page with several items...
to show themselves as a title and a portion of the article rather than the entire article.

thx
tim

Re: [dakrusha] New Pages Error Code

By Jason - September 9, 2010

Hi Tim,

Take a look at this thread:
http://www.interactivetools.com/forum/gforum.cgi?post=77525#77525

It has a function in it called maxWords. You could use this to limit the amount of output you display.

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] New Pages Error Code

cool.
how bout this?
i have a grey background in my content.
i don't want it grey, i want nothing there.

ideas?