1 | <?php
|
---|
2 | global $xoops_db,$XPressME;
|
---|
3 | $xoops_trust_path = get_xoops_trust_path();
|
---|
4 | $xoops_root_path = get_xoops_root_path();
|
---|
5 | $inc_path = $xoops_trust_path . '/modules/d3forum/include/comment_functions.php';
|
---|
6 | include_once( $inc_path);
|
---|
7 | $xpress_dir = get_xpress_dir_path();
|
---|
8 | $xpress_dirname = get_xpress_dir_name();
|
---|
9 |
|
---|
10 | include_once($xpress_dir . '/class/xpressD3commentContent.class.php');
|
---|
11 |
|
---|
12 | $dir_name = $XPressME->d3forum_module_dir;
|
---|
13 | $forum_id = $XPressME->d3forum_forum_id;
|
---|
14 | $external_link_format = $XPressME->d3forum_external_link_format;
|
---|
15 | $db =& Database::getInstance() ;
|
---|
16 |
|
---|
17 | // force UPDATE forums.forum_external_link_format "(dirname)::(classname)::(trustdirname)"
|
---|
18 | $xoops_db->query( "UPDATE ".get_xoops_prefix() . $dir_name."_forums SET forum_external_link_format='".$external_link_format."' WHERE forum_id= $forum_id" ) ;
|
---|
19 |
|
---|
20 | $d3comment =& new xpressD3commentContent( $dir_name , $xpress_dirname ) ;
|
---|
21 |
|
---|
22 | $post_title = get_the_title();
|
---|
23 | if (function_exists('get_the_ID')){ // upper wordpress 2.1
|
---|
24 | $post_id=get_the_ID();
|
---|
25 | } else { // lower wordpress 2.1
|
---|
26 | ob_start();
|
---|
27 | the_ID();
|
---|
28 | $post_id=ob_get_contents();
|
---|
29 | ob_end_clean();
|
---|
30 | }
|
---|
31 | if (empty($_GET['p'])){
|
---|
32 | $_GET['p']= $post_id;
|
---|
33 | }
|
---|
34 | // $params = array("dirname" => $dir_name, "forum_id" => $forum_id, "itemname" => "p", "id" => $post_id , "subject" => $post_title);
|
---|
35 | $params = array("forum_id" => $forum_id, "id" => $post_id , "subject" => $post_title);
|
---|
36 | if(file_exists($xoops_trust_path .'/modules/d3forum/')) {
|
---|
37 | if(file_exists($xoops_root_path .'/modules/' . $dir_name . '/')) {
|
---|
38 | $d3comment->displayCommentsInline($params ) ;
|
---|
39 | } else {
|
---|
40 | echo ('<h3>' . $dir_name . 'is not found </h3>') ;
|
---|
41 | }
|
---|
42 | } else {
|
---|
43 | echo '<h3> d3forum is not install </h3>';
|
---|
44 | }
|
---|
45 |
|
---|
46 | ?> |
---|