Integrating with advanced comments..?

Permalink Browser Info Environment
Hi,

First of all, great block!

I have looked at the documentation for help with this but i'm afraid it's like another language to me!

How can I integrate the comments block with concrete wall?
i.e. in to show in the recent activity - "[user] has commented on... [pagename]"
How could this be acheived?

Cheers,
Wayne

Type: Discussion
Status: New
mibookscom
View Replies:
jshannon replied on at Permalink Reply
jshannon
Hi..

Unfortunately, you'll need some understanding of PHP in order to do this.

Check out the developer instructions in my documentation and also the example "likes this" block.

Basically, you'll want to create a copy of the comments block and install that (this step is done because you'll be modifying the controller and you shouldn't modify the core).

I assume that in the controller.php (or maybe models/comment.php or something) there's some code that is used to save the relevant comment to the database. Not sure where... but it has to be done somewhere.

In that area, you would include the wall API and similar code like in my example. Something like

// these are the values that you would use to register the type. We set up this variable for the sake of clean code
$posting_type = array('comments_block', 'comment_add', 'Comments', 'commented on %1$p', 1, 2);
// we try to load the lerteco_wall package and then check if it's available
$wall = Loader::package('lerteco_wall');
if (is_object($wall)) {
    //it's installed. now we call the single method which creates the posting and, if necessary, the posting type
    $wall->postAndPossiblyRegister($u->getUserID(), $page->getCollectionID(), $posting_type);
}
mibookscom replied on at Permalink Reply 1 Attachment
mibookscom
Thanks for the advice. Been messing about with this for a while but can't seem to get past it.

Every time a comment is submitted I just get a blank screen with two brackets () (see attached)

Don't suppose you have any ideas of how to get past this?

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.