Recent Topics

1 Mar 27, 2006 22:57    

I recently integrated cocomment ( with my b2evo install. It is pretty straight forward. This javascript block should be added to the /skins/_feedback.php page:

<script type="text/javascript">
   var blogTool = "b2evolution";
   var blogURL = "<?php $Blog->disp('blogurl', 'raw');?>";
   var blogTitle = "<?php $Blog->disp('name', 'htmlhead');?>";
   var postURL = "<?php $Item->permalink(); ?>";
   var postTitle = "<?php $Item->title(); ?>";
   var commentTextFieldName = "comment";
   var commentButtonName = "submit";
   var commentAuthorLoggedIn = <?php if(is_logged_in()) { echo "true"; } else { echo "false"; }?>;
   <?php if(is_logged_in()) { ?>
   var commentAuthor = "<?php $current_User->prefered_name(); ?>";
   <?php } else { ?>
   var commentAuthorFieldName = "author";
   <?php } ?>
   var commentFormName = "commentForm";

The only other thing to change is to add a name to the form element in the feedback page. the name should be 'commentForm'

Original details here:

2 Mar 28, 2006 01:25

Cool. And as it seems, it could easily get provided as a plugin for "Phoenix", when it's released.

Just a sidenote:
Instead of changing _feedback.php, I'd change/adjust the

var commentFormName = "commentForm"; 

part of your hack.

For current CVS (and "Phoenix"), it would be

var commentFormName = "bComment_form_id_<?php $Item->ID() ?>";

Form is loading...

Photo gallery software – This forum is powered by b2evolution CMS, a complete engine for your website.