Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Jcomments into Projectfork
Pages: [1]   Go Down
  Print  
Author Topic: Jcomments into Projectfork  (Read 1589 times)
0 Members and 1 Guest are viewing this topic.
ledirlo
Newbie
*

Karma: 0
Offline Offline

Posts: 10


« on: September 07, 2011, 17:57:11 »

Has anyone managed to include Jcomments into Projectfork please?

I have tried for nights and couldn't manage to neither by following the Jcomments instructions nor by imitating the other plugins-
well I manage to DISPLAY the comments but it doesn't take the user and the pages / entries on consideration...the comments box is the same on every Projectfork page.

Therefore I guess I wasn't able to fetch the Projectfork DB elements correctly and I must admit I'm no coder so it's very tough.

couldn't write the com_projectfork_plugin.php correctly... and Jcomments would be great as a replacement for the default Projectork commenting system
thank you for your input.
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: October 07, 2011, 19:21:47 »

Provide me more information... Where Projectfork could be downloaded?
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
ledirlo
Newbie
*

Karma: 0
Offline Offline

Posts: 10


« Reply #2 on: October 10, 2011, 15:58:54 »

http://projectfork.net/

Projectfork contains a small message system that is not as good as Jcomments.

Two files define that original message box : admin/components/projectfork/processes/comments/comments.php
and admin/components/projectfork/panels/task_comments.php

I rewrote the task_comments.php file like this:
Code:
<?php  defined'_JEXEC' ) or die( 'Restricted access' ); $comments JPATH_SITE DS .'components' DS 'com_jcomments' DS 'jcomments.php';
  if (
file_exists($comments)) {
    require_once(
$comments);
    echo 
JComments::showComments($id'com_projectfork'$topics);
  }
 
?>


and I wrote a projectfork plugin for your component :
Code:
<?php
class jc_com_projectfork extends JCommentsPlugin {
 
  function 
getObjectTitle$id ) {

   
$db PFdatabase::GetInstance(); $db->setQuery"SELECT title,  id FROM #__pf_Itemid WHERE id='$Itemid'");
    return 
$db->loadResult();
  }
 
  function 
getObjectLink$id ) {

    
$_Itemid JCommentsPlugin::getItemid'com_projectfork' );
 

  
$link JRoute::_'index.php?option=com_projectfork&Itemid=&id=&workspace='$id .'&Itemid='$_Itemid );
    return 
$link;
  }
    function 
getTopics$id ) {
    
$db PFdatabase::GetInstance();
    
$db->setQuery'SELECT title, id, itemid FROM #__pf_Topics WHERE id = ' $topics );
    return 
$db->loadResult();
  }
}
?>




The Whole Thing returned the Jcomments Box in Projectfork and this is a pretty great combination, but it displays on every page and doesn't properly load the $id, $userid etc values...you know what I mean :same comments on every page.

It means I do not query and return the correct database elements.

Now ... you got Jcomments working with Projectfork and it's a whole new world.

Thank you very much for your reply

link to the same question on the project fork website :http://forum.pixelpraise.com/viewtopic.php?f=101&t=8073
« Last Edit: October 10, 2011, 16:01:01 by ledirlo » Logged
ledirlo
Newbie
*

Karma: 0
Offline Offline

Posts: 10


« Reply #3 on: October 30, 2011, 00:04:02 »

yo smart

nevermind I found out

jcomments + projectfork is awesome

code is here edit task_comment.php in projectfork
Code:
<?php  defined'_JEXEC' ) or die( 'Restricted access' ); $id     = (int) JRequest::getVar('id');
 
$comments JPATH_SITE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php'; if (is_file($comments)) { require_once($comments); echo JComments::showComments$id,'com_projectfork',''); }  
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Jcomments into Projectfork
 
Jump to: