Active
Project:
Disqus
Version:
7.x-1.9
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2012 at 16:49 UTC
Updated:
5 Apr 2012 at 03:19 UTC
hey,
I'd like to have Disqus comments on an own page, similar to the option provided by the normal comment module.
First solution I came up with, is to define a new a path with a custom modul "node/%node/disqus - but I wonder if there are better ways?
Here's my current solution:
/**
* Implements hook_menu().
*/
function ef_menu(){
$items['node/%node/disqus'] = array(
'title' => 'comments',
'page callback' => '_ef_disqus',
'page arguments' => array(1),
'access arguments' => array('view disqus comments'),
'weight' => 1,
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
);
return $items;
}
/*
* page callback for node/%node/disqus
* only display the disqus comments
*/
function _ef_disqus($node){
$render_array = node_view($node, 'full');
return render($ra['disqus']);
}