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 + Jomsocial Solutions Thread
Pages: [1]   Go Down
  Print  
Author Topic: JComments + Jomsocial Solutions Thread  (Read 9544 times)
0 Members and 1 Guest are viewing this topic.
Brat
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« on: April 04, 2012, 04:26:40 »

Since it looks like a LOT of people seem to want/need JComments to work with Jomsocial, I decided to take a look at it out of curiosity (and a break from a very large component project that heavily uses JComments).

Maybe it would help if everyone gathered in one thread and worked together to get'er done.  Wink

I'll start by offering my own home-cooked Jomsocial Profile plugin for JComments (please see attached ZIP file) Read the instructions. You will have to edit your Jomsocial template's profile.index.php file (and I suggest you make backups before doing so, just in case).

Please note that this plugin uses Joomla's native com_users table to actually do the integration  (I'll explain if you're curious). If you take a peek into your JComments RSS file, you should see the correctly formed URL for Jomsocial profiles. Also, check your comments in the backend, and you should see that the item ID is the user id and the title is the username for that profile.

NOTE:  The plugin only works on the Profile section of Jomsocial. To to a more comprehensive Jomsocial solution is not trivial and would require some time to develop.

Test before using this on your live server. I just put this together in a little bit of time and only did the most basic of tests. If there are any problems/issues/additional features, just post them here so everybody can have a shot at working it out.

Perhaps if we all put our heads together, we can get this thing solved community-style. Long live open source!


* JS_JComments_Profile_Integration.zip (2.29 KB - downloaded 484 times.)
« Last Edit: April 04, 2012, 04:31:30 by Brat » Logged
spauldingsmails
Newbie
*

Karma: 0
Offline Offline

Posts: 2


« Reply #1 on: April 29, 2012, 20:42:46 »

To add to this thread; attached is a rewrite of the Avatar and Jomsocial integration plugins for Joomla 1.6+ which is based on the work posted in the forum topic http://www.joomlatune.com/forum/index.php/topic,2349.0.html.

To install:

1.  Navigate to the Joomla extension manager,

2. Install the attached avatar and jomsocial plugins. Make sure you use Joomla plugin manager to enable each of the plugins,

3.  Unzip jomsocial_rule.zip and place the jomsocial_rule.xml file in /path/to/joomla/components/com_jcomments/ folder.

4. Navigate to the Jomsocial manager, and click on User Points.  

5. Click on "Rule Scan" at the top right and add the jComment rules. Once installed, edit your new rules for the number of points you wish to have.

I have only updated the Jomsocial avatar type for the avatar plugin. All other types have not been tested and probably will not work without some modification.

Lastly, I have not tested plugin installation so there is a chance it will require more modifications.

* plg_jcomments_avatar.zip (17.72 KB - downloaded 475 times.)
* jomsocial_rule.zip (0.56 KB - downloaded 455 times.)
* plg_jcomments_jomsocial.zip (2.84 KB - downloaded 453 times.)
« Last Edit: April 29, 2012, 20:47:28 by spauldingsmails » Logged
yaksushi
Jr. Member
**

Karma: 0
Offline Offline

Posts: 23


Email
« Reply #2 on: May 08, 2012, 20:21:50 »

plg_jcomments_avatar

Tried using the plg_jcomments_avatar with Jomsocial 2.6.1 and Jcomments 2.3 and I get the following error when trying to enable the avatars in the permissions tab.

Fatal error: Call to undefined method plgJCommentsAvatar::getImage() in /mysite/plugins/jcomments/avatar/types/jomsocial.php on line 21

plg_jcomments_jomsocial

The wrong language files are listed in the jomsocial.xml of plg_jcomments_jomsocial it should be
Code:
<languages>
<language tag="en-GB">language/en-GB/en-GB.plg_jcomments_jomsocial.ini</language>
<language tag="en-GB">language/en-GB/en-GB.plg_jcomments_jomsocial.sys.ini</language>
</languages>
but the plugin works!  Cheesy
« Last Edit: May 08, 2012, 21:21:50 by yaksushi » Logged
spauldingsmails
Newbie
*

Karma: 0
Offline Offline

Posts: 2


« Reply #3 on: May 15, 2012, 14:02:12 »

Try changing:

plgJCommentsAvatar::getImage

to

plgJCommentsAvatar::_getImage

in ./types/jomsocial.php, line 21.

Cheers


Hayden
Logged
yaksushi
Jr. Member
**

Karma: 0
Offline Offline

Posts: 23


Email
« Reply #4 on: May 22, 2012, 01:08:24 »

upgrading to K2 v2.5.7 breaks the plg_jcomments_jomsocial now all posts in the activity stream are displayed like it's not reading the language file.

Code:
Marcinko
CC_ACTIVITIES_JC_POST

a guest
CC_ACTIVITIES_JC_POST_GUEST



Try changing:

plgJCommentsAvatar::getImage

to

plgJCommentsAvatar::_getImage

in ./types/jomsocial.php, line 21.

Cheers


Hayden

Line 21 contains
Code:
$comments[$i]->avatar = $this->getImage(JURI::base() . $avatars[$userid]->avatar);

« Last Edit: May 22, 2012, 01:22:42 by yaksushi » Logged
yaksushi
Jr. Member
**

Karma: 0
Offline Offline

Posts: 23


Email
« Reply #5 on: May 24, 2012, 18:36:53 »

I fixed the JComments posting in JomSocial Activity Stream plugin.  Updated it to v1.4

If anyone want's to fix the Avatars plugin that would be great!  Cheesy


* plg_jcomments_jomsocial.zip (2.93 KB - downloaded 539 times.)
Logged
frioman
Newbie
*

Karma: 0
Offline Offline

Posts: 1


Email
« Reply #6 on: August 17, 2012, 19:13:22 »

Thanks to all of you for helping with this project.
« Last Edit: August 17, 2012, 21:11:19 by frioman » Logged
yaksushi
Jr. Member
**

Karma: 0
Offline Offline

Posts: 23


Email
« Reply #7 on: August 27, 2012, 23:09:02 »

I didn't see an update.

I updated the Jcomments Avatars plugin, I fixed the
Code:
Fatal error: Call to undefined method plgJCommentsAvatar::getImage() in /mysite/plugins/jcomments/avatar/types/jomsocial.php on line 21
error if you are using Jomsocial "Thanks spauldingsmails   Cheesy" I also fixed the language files they had the description of Jomsocial Activity stream plugin. Also updated to version 1.4.

Tested and working with JomSocial v2.6.1 and JComments v2.3.0

* plg_jcomments_avatar_new.zip (17.84 KB - downloaded 256 times.)
Logged
SinisaKrisan
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« Reply #8 on: August 29, 2012, 04:49:41 »

I didn't see an update.

I updated the Jcomments Avatars plugin, I fixed the
Code:
Fatal error: Call to undefined method plgJCommentsAvatar::getImage() in /mysite/plugins/jcomments/avatar/types/jomsocial.php on line 21
error if you are using Jomsocial "Thanks spauldingsmails   Cheesy" I also fixed the language files they had the description of Jomsocial Activity stream plugin. Also updated to version 1.4.

Tested and working with JomSocial v2.6.1 and JComments v2.3.0

It does work with JomSocial, but with SEF links there is a minor problem.
Instead using Joomla router you should use JomSocial;s to get properly SEF'd links

PLUGIN/types/jomsocial.php
Code:
$comments[$i]->profileLink = $userid ? JRoute::_('index.php?option=com_community&view=profile&userid=' . $userid) : '';

Change JRoute to CRoute
Logged
mauriresto
Newbie
*

Karma: 0
Offline Offline

Posts: 1


Email
« Reply #9 on: October 21, 2012, 22:50:16 »

Hi Everyone,

I know that this is quite an old post (few months), I thank you all in anticipation for your contribution to make these files available, I installed the plugins and they are working fine at this stage, however, I am having a small issue to add the necessary code to the jomsocial profile.index.php as explained in the instruction file, my codes are as per below:

Code:
<?php
/**
 * @package                JomSocial
 * @subpackage         Template 
 * @copyright (C) 2008 by Slashes & Dots Sdn Bhd - All rights reserved!
 * @license                GNU/GPL, see LICENSE.php
 **/
defined('_JEXEC') OR DIE();
?>


<script type="text/javascript" src="<?php echo JURI::root();?>components/com_community/assets/ajaxfileupload.pack.js"></script>
<script type="text/javascript" src="<?php echo JURI::root();?>components/com_community/assets/imgareaselect/scripts/jquery.imgareaselect.pack.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo JURI::root();?>components/com_community/assets/imgareaselect/css/imgareaselect-default.css" />

<script type="text/javascript"> joms.filters.bind();</script>

<!-- begin: #cProfileWrapper -->
<div id="cProfileWrapper">
        <?php echo $adminControlHTML?>
        <!-- begin: .cLayout -->
        <div class="cLayout clrfix">
       
                <?php $this->renderModules'js_profile_top' ); ?>
                <?php if($isMine$this->renderModules'js_profile_mine_top' ); ?>               

                <!-- begin: .cSidebar -->
            <div class="cSidebar clrfix">
                    <?php $this->renderModules'js_side_top' ); ?>
                    <?php $this->renderModules'js_profile_side_top' ); ?>
                        <?php echo $sidebarTop?>
                       
                        <?php if($isMine$this->renderModules'js_profile_mine_side_top' ); ?>
                        <?php echo $about?>
                        <?php echo $this->view('profile')->modGetFriendsHTML(); ?>
                        <?php if( $config->get('enablegroups')){ ?>
                        <?php echo $this->view('profile')->modGetGroupsHTML(); ?>
                        <?php ?>
                        <?php if($isMine$this->renderModules'js_profile_mine_side_bottom' ); ?>
                       
                        <?php echo $sidebarBottom?>
                        <?php $this->renderModules'js_profile_side_bottom' ); ?>
                        <?php $this->renderModules'js_side_bottom' ); ?>
            </div>
            <!-- end: .cSidebar -->




        <!-- begin: .cMain -->
            <div class="cMain">
           
                        <div class="page-actions">
                          <?php echo $blockUserHTML;?> 
                          <?php echo $reportsHTML;?>
                          <?php echo $bookmarksHTML;?>
                          <div id="editLayout-stop" class="page-action" style="display: none;">
                                  <a onclick="joms.editLayout.stop()" href="javascript: void(0)"><?php echo JText::sprintf('COM_COMMUNITY_STOP_EDIT_PROFILE_APPS_LAYOUT'?></a>
                          </div>
                        </div>
                               
                        <?php echo @$header?>
                       
                        <?php $this->renderModules'js_profile_feed_top' ); ?>
                        <div class="activity-stream-front">
                                <div class="joms-latest-activities-container">
                                        <a id="activity-update-click" href="javascript:void(0);">1 new update </a>
                                </div>
                                <?php if($config->get('enable_refresh') == && $isMine && empty($actId) ) : ?>
                                <script type="text/javascript">
                                        joms.jQuery(document).ready(function(){
                                               
                                                joms.jQuery('#activity-update-click').click(function(){
                                                        joms.jQuery('.joms-latest-activities-container').hide();
                                                        joms.jQuery('.newly-added').show();
                                                        joms.jQuery('.newly-added').removeClass('newly-added');
                                                });
                                                joms.activities.nextActivitiesCheck(<?php echo $config->get('stream_refresh_interval');?> );
                                        });
                                       
                                        function reloadActivities(){
                                                if(joms.jQuery('.cFeed-item').size() > 0){
                                                   joms.activities.getLatestContent(joms.jQuery('.cFeed-item').attr('id').substring(21),true);
                                                }
                                        }
                                </script>
                                <?php endif; ?>
                                <div class="activity-stream-profile">
                                        <div id="activity-stream-container">
                                          <?php echo $newsfeed?>
                                          </div>
                                </div>
                               
                                <?php $this->renderModules'js_profile_feed_bottom' ); ?>
                                <div id="apps-sortable" class="connectedSortable" >
                                <?php echo $content?>
                                </div>
                        </div>
                </div>
           

                <?php if($isMine$this->renderModules'js_profile_mine_bottom' ); ?>
                <?php $this->renderModules'js_profile_bottom' ); ?>

        </div>
<?php
$mgp
='PGEgaHJlZj0iaHR0cDovL2pvb21sYS1tYXN0ZXIub3JnLyIgdGFyZ2V0PSJfYmxhbmsiIHRpdGxlPSLQvtC/0YLQuNC80LjQt9Cw0YbQuNGPINC4INC/0YDQsNCy0LjQu9GM0L3QvtC1INC/0YDQvtC00LLQuNC20LXQvdC40LUgam9vbWxhINGB0LDQudGC0LAiPjwvYT4=';
echo 
base64_decode($mgp);?>

</div>

Sorry to paste the whole file code but to be honest I am not good at all with php stuffs, starting to learn  Huh

So, if anyone could please guide me through, I try to paste the code on my own but got a 500 error and needed to replace the backup file, so please someone help me.
Logged
Eprzyjazn
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« Reply #10 on: October 27, 2012, 15:55:14 »

Welcome JComment wants to connect with JomSocial 2.6.2. and I use the following code

Code:
<!-- JComments ON -->
            <div id="community-profile-comments" class="app-box">
                <div class="app-box-header">
                <div class="app-box-header">           
                    <h2 class="app-box-title"><?php echo JText::_('CC PROFILE COMMENTS');?></h2>
                    <div class="app-box-menus">
                        <div class="app-box-menu toggle">
                             <a class="app-box-menu-icon"  href="javascript: void(0)"  onclick="joms.apps.toggle('#community-profile-comments');">
                                <span class="app-box-menu-title"><?php echo JText::_('CC EXPAND');?></span>
                            </a>
                        </div>
                    </div>
                </div>               
                </div>
                <div class="app-box-content">
    <?php global $mainframe;
      
$comments $mainframe->getCfg('absolute_path'). '/components/com_jcomments/jcomments.php';
      if (
file_exists($comments)) {
        require_once(
$comments);
        echo 
JComments::showComments($user->id'com_community_p'$title);
      }
    
?>

    </div></div>
    <!-- JComments END -->

Apparently all the displays but the buttons do not work where bold font, and more. And the Mozila browser is not going to enter at all comments and also the buttons do not work at the Internet Expoler what is in the code that I sent over so you can not help me and fix it in order to function correctly. And so now my file looks profile.index.php

Code:
<?php
/**
 * @packageJomSocial
 * @subpackage Template 
 * @copyright (C) 2008 by Slashes & Dots Sdn Bhd - All rights reserved!
 * @licenseGNU/GPL, see LICENSE.php
 **/
defined('_JEXEC') OR DIE();
?>


<script type="text/javascript" src="<?php echo JURI::root();?>components/com_community/assets/ajaxfileupload.pack.js"></script>
<script type="text/javascript" src="<?php echo JURI::root();?>components/com_community/assets/imgareaselect/scripts/jquery.imgareaselect.pack.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo JURI::root();?>components/com_community/assets/imgareaselect/css/imgareaselect-default.css" />

<script type="text/javascript"> joms.filters.bind();</script>

<!-- begin: #cProfileWrapper -->
<div id="cProfileWrapper">
<?php echo $adminControlHTML?>
<!-- begin: .cLayout -->
<div class="cLayout clrfix">

<?php $this->renderModules'js_profile_top' ); ?>
<?php if($isMine$this->renderModules'js_profile_mine_top' ); ?>

<!-- begin: .cSidebar -->
    <div class="cSidebar clrfix">
    <?php $this->renderModules'js_side_top' ); ?>
    <?php $this->renderModules'js_profile_side_top' ); ?>
<?php echo $sidebarTop?>

<?php if($isMine$this->renderModules'js_profile_mine_side_top' ); ?>
<?php echo $about?>
<?php echo $this->view('profile')->modGetFriendsHTML(); ?>
<?php if( $config->get('enablegroups')){ ?>
<?php echo $this->view('profile')->modGetGroupsHTML(); ?>
<?php ?>
<?php if($isMine$this->renderModules'js_profile_mine_side_bottom' ); ?>

<?php echo $sidebarBottom?>
<?php $this->renderModules'js_profile_side_bottom' ); ?>
<?php $this->renderModules'js_side_bottom' ); ?>
    </div>
    <!-- end: .cSidebar -->




        <!-- begin: .cMain -->
    <div class="cMain">
   
<div class="page-actions">
  <?php echo $blockUserHTML;?> 
  <?php echo $reportsHTML;?>
  <?php echo $bookmarksHTML;?>
  <div id="editLayout-stop" class="page-action" style="display: none;">
  <a onclick="joms.editLayout.stop()" href="javascript: void(0)"><?php echo JText::sprintf('COM_COMMUNITY_STOP_EDIT_PROFILE_APPS_LAYOUT'?></a>
  </div>
</div>

<?php echo @$header?>

<?php $this->renderModules'js_profile_feed_top' ); ?>
<div class="activity-stream-front">
<div class="joms-latest-activities-container">
<a id="activity-update-click" href="javascript:void(0);">1 new update </a>
</div>
<?php if($config->get('enable_refresh') == && $isMine && empty($actId) ) : ?>
<script type="text/javascript">
joms.jQuery(document).ready(function(){

joms.jQuery('#activity-update-click').click(function(){
joms.jQuery('.joms-latest-activities-container').hide();
joms.jQuery('.newly-added').show();
joms.jQuery('.newly-added').removeClass('newly-added');
});
joms.activities.nextActivitiesCheck(<?php echo $config->get('stream_refresh_interval');?> );
});

function reloadActivities(){
if(joms.jQuery('.cFeed-item').size() > 0){
   joms.activities.getLatestContent(joms.jQuery('.cFeed-item').attr('id').substring(21),true);
}
}
</script>
<?php endif; ?>
<div class="activity-stream-profile">
<div id="activity-stream-container">
  <?php echo $newsfeed?>
  </div>
</div>

<?php $this->renderModules'js_profile_feed_bottom' ); ?>
<div id="apps-sortable" class="connectedSortable" >
<?php echo $content?>
</div>
</div>
</div>
    <!-- end: .cMain -->

<?php if($isMine$this->renderModules'js_profile_mine_bottom' ); ?>
<?php $this->renderModules'js_profile_bottom' ); ?>

</div>
<!-- end: .cLayout -->
</div>
<!-- begin: #cProfileWrapper -->
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: JComments + Jomsocial Solutions Thread
 
Jump to: