RubenB,
Try
Nickolay's solution and see whether it works for you or not.
The best and right solution will be building a plugin responsible for your custom pages.
It is important to understand that comments ( wall widget) can't exist all by themselves. They are always attached to certain content ($post): blogs, photos and etc. This content in turn should have an action described within the source code: comment blog, comment photo and etc.
Custom pages are very simple static documents. They don't have any .php functionality behind. They don't have any actions assigned to them. As a result you can't add comments component to them. System simply won't understand where those comments should go, where they should be stored, how to displayed them.
So the ideal solution will be to develop a plugin that will:
1. create new custom page for you.
2. content of this page should be programatically designed. So let's say the text " About us...what we do" should be added not as text but as certain post ( like event, blog, photo, link).
3. have authorization methods .
4. have attached wall component.
The main complex task is creating a fully functional plugin that can handle posts.
Attaching the component step itself is quite simple. To add the component you must modify controllers/controller_name.php file of your plugin:
$allow_comments = true;
$cmpParams = new BASE_CommentsParams('lpluginkeyhere', 'post-namehere);
$cmpParams->setDisplayType(BASE_CommentsParams::DISPLAY_TYPE_BOTTOM_FORM_WITH_FULL_LIST);
$this->addComponent('comments', new BASE_CMP_Comments($cmpParams));
You must also include {$comments} into views/controllers/controllername_functionname.html file.
You can take "Blogs" plugin you mentioned as an example.
Here is the piece of code from controllers/view.php of this plugin:
$allow_comments = true;
if ( $post->authorId != OW::getUser()->getId() && !OW::getUser()->isAuthorized('postname') )
{
$eventParams = array(
'action' => 'blogs_comment_blog_posts',
'ownerId' => $post->authorId,
'viewerId' => OW::getUser()->getId()
);
try
{
OW::getEventManager()->getInstance()->call('privacy_check_permission', $eventParams);
}
catch ( RedirectException $ex )
{
$allow_comments = false;
}
}
/* */
// additional components
$cmpParams = new BASE_CommentsParams('blogs', 'blog-post');
$cmpParams->setEntityId($post->getId())
->setOwnerId($post->getAuthorId())
->setDisplayType(BASE_CommentsParams::DISPLAY_TYPE_BOTTOM_FORM_WITH_FULL_LIST)
->setAddComment($allow_comments);
$this->addComponent('comments', new BASE_CMP_Comments($cmpParams));