Recent Topics

1 Mar 27, 2006 22:57    

I recently integrated cocomment (http://www.cocomment.com) 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";
</script>

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:

http://www.rosscode.com/blog/index.php?title=cocomment_comment_montoring_and_b2evolut&more=1&c=1&tb=1&pb=1

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...