3rd party comment script interferes with CMS Builder

11 posts by 2 authors in: Forums > CMS Builder
Last Post: April 16, 2010   (RSS)

By Hansaardappel - April 15, 2010 - edited: April 15, 2010

Hi,

I'm not sure if you can help me with this one, but it doesn't hurt to ask. I've implemented a comment script in my site, but as soon as a comment is made, it interferes with CMS Builder. I'm pretty sure the reason this happens is the fact that the comment script adds something to the URL. For example: after someone places a comment, the URL changes from http://www.tennistube.tv/videos/federer-davydenko4.php to http://www.tennistube.tv/videos/federer-davydenko4.php#c5t_form. As soon as the URL changes, none of the CMS Builder content is displayed. Any suggestions?

EDIT:

My cms builder code:

<?php
require_once "/home/tennjon5/public_html/cmsAdmin/lib/viewer_functions.php";

list($spotlightRecords, $spotlightMetaData) = getRecords(array(
'tableName' => 'spotlight',
'limit' => '1',
));
?>

<?php
list($fpvideoRecords, $fpvideoMetaData) = getRecords(array(
'tableName' => 'fpvideo',
'limit' => '5',
));
?>

Re: [Hansaardappel] 3rd party comment script interferes with CMS Builder

So i played around a bit, and got the third party script to not add additional stuff to the URL. It doesn't make a difference though. Now I was wondering, is it possible that it has anything to do with the fact that a form is sent?

The comment script uses this code: $c5t_form = new HTML_QuickForm('form', 'POST', $c5t_form_action . '');

Re: [Hansaardappel] 3rd party comment script interferes with CMS Builder

bump...

Sorry I don't mean to be pushy, but this a rather urgent issue. If anyone could help, it would really be appreciated!

Re: [Hansaardappel] 3rd party comment script interferes with CMS Builder

By Jason - April 16, 2010

Hi,

I've went to the address you posted and posted a test comment. However, I didn't see any issues with content being displayed.

Exactly what CSMB content is not appearing.

Let me know and we'll see what we can do.

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/

Re: [Jason] 3rd party comment script interferes with CMS Builder

Sorry, should have posted that in this thread :)

The CMS Builder content that doesn't show is the "In the spotlight" content in the upper right corner and the "related videos" on the right side of the comments. It shows at first, but as soon as a comment is posted, the content "disappears".

Re: [Hansaardappel] 3rd party comment script interferes with CMS Builder

By Jason - April 16, 2010

Okay, I see.

Could you attach the page "federer-davydenko4.php" and I'll take a look at it.

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/

Re: [Jason] 3rd party comment script interferes with CMS Builder

Thanks... attached!
Attachments:

federer-davydenko4.php 13K

Re: [Hansaardappel] 3rd party comment script interferes with CMS Builder

By Jason - April 16, 2010

Hi,

I think what's happening is that a variable used by the comment script is the same as a field name in your tables (probably something like comment).

Try changing your code to this:
<?php
require_once "/home/tennjon5/public_html/cmsAdmin/lib/viewer_functions.php";

list($spotlightRecords, $spotlightMetaData) = getRecords(array(
'tableName' => 'spotlight',
'limit' => '1',
'allowSearch'=>0,
));
?>

<?php
list($fpvideoRecords, $fpvideoMetaData) = getRecords(array(
'tableName' => 'fpvideo',
'limit' => '5',
'allowSearch'=>0,
));
?>


'allowSearch'=>0 will turn off CMSB's automatic searching for that query. This should get us around a variable conflict. Give it a try and let me know if it works.

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/

Re: [Jason] 3rd party comment script interferes with CMS Builder

Works like a charm, thanks you SO much. Lol I've been working on this for over 8 hours and a couple of minutes is enough for you... I feel like an idiot [;)]

Thanks again!