Blog with 3rd party Comments

3 posts by 2 authors in: Forums > CMS Builder
Last Post: January 12, 2009   (RSS)

By blaine - January 9, 2009

Hello! I am producing my first site with cms builder and it has been great so far. One bump in the road, I am building a blog and using a comment script (3rd party). Creating new blog records(cmsb) and adding new comments(3rd party) seem to work on the on the same page.

---But I receive an error message on one output area of the comments----

Notice: Undefined index: comm_page in /homepublic_html/newbreed/comments/comments_show.php on line 24

----
This is comments_show.php on line 24
24 $comm_page = is_numeric($_GET['comm_page']) ? $_GET['comm_page'] : 1;
25 if ($comm_page<1) {
26 $comm_page = 1;
27 }

When I remove the top code block
<?php
require_once "/homepublic_html/cmsAdmin/lib/viewer_functions.php";

list($blog_postsRecords, $blog_postsMetaData) = getRecords(array(
'tableName' => 'blog_posts',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$blog_postsRecord = @$blog_postsRecords[0]; // get first record
list($prevRecord, $nextRecord) = getPrevAndNextRecords(array(
'tableName' => 'blog_posts',
'recordNum' => getNumberFromEndOfUrl(),
));

?>

Comments have no error message on the one output area but I have no blog.

Question if this $comm_page is the undefined index how can I define it with cmsb?

Re: [blaine] Blog with 3rd party Comments

By ross - January 9, 2009

Hi there.

Thanks for posting!

This is probably going to start going outside of our support area as I think it might have to do with the 3rd party script. I'll see what I can do though :).

On line 24 you have this:

$_GET['comm_page']

That's trying to grab something out of the URL of the page your on. It isn't something that you would define in the CMS Builder code. What you'll want to do is make sure the URL to the page your on ends with something like:

page.php?comm_page=something

Of course, you could also just try putting a "@" infront of that code like this:

@$_GET['comm_page']

That doesn't really make the problem go away, but it will stop the warning message from showing up :).

Keep me up to date with how you are making out.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Blog with 3rd party Comments

By blaine - January 12, 2009

Thanks, [;)]
That worked great!