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: Integration with MMS Blog
Pages: [1]   Go Down
  Print  
Author Topic: Integration with MMS Blog  (Read 15875 times)
0 Members and 2 Guests are viewing this topic.
majus
Newbie
*

Karma: 0
Offline Offline

Posts: 2


Email
« on: July 15, 2009, 19:48:28 »

Hello together,

did anyone yet manage to integrate JComment with MMS Blog?
http://mms.pipp.no/doku.php It is a wonderfull extension which allows sending Pictures and Text to your page via eMail and MMS.

I appreciate any help.

Majus
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: July 16, 2009, 01:35:39 »

Ok, I'll look at this extension and try to make integration. But not on this week...
Logged

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

Karma: 0
Offline Offline

Posts: 2


Email
« Reply #2 on: July 16, 2009, 14:24:41 »

Hey Smart,

I manged the integration by myself.

Added This code into /component/com_mmsblog/views/item/tmpl/default.php Line 55:

Code:
<?php
  
global $mainframe;

  
$comments $mainframe->getCfg('absolute_path') . '/components/com_jcomments/jcomments.php';
  if (
file_exists($comments)) {
    require_once(
$comments);
    echo 
JComments::showComments($this->row->id'com_mmsblog'$this->row->subject);
  }
?>

and also wrote this plugin:

Code:
<?php
/**
 * JComments plugin for mmsBlog support

 **/
(defined('_VALID_MOS') OR defined('_JEXEC')) or die('Direct Access to this location is not allowed.');

class 
jc_com_mmsblog extends JCommentsPlugin
{
function getObjectTitle($id)
{
$db = & JCommentsFactory::getDBO();
$db->setQuery'SELECT subject FROM #__mmsblog_item WHERE id = ' $id );
return $db->loadResult();
}

function getObjectLink($id)
{
$_Itemid JCommentsPlugin::getItemid'com_jevents' );
$link = ( 'index.php?option=com_mmsblog&view=item&id='$id.'&Itemid='$Itemid );
return $link;
}
}
?>
   

THis was my first time in php. So I have no idea whether I did it right -> But it is working! Smiley

Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #3 on: July 16, 2009, 23:08:40 »

Change lines:

Code: (php)
$_Itemid = JCommentsPlugin::getItemid( 'com_jevents' );
$link = ( 'index.php?option=com_mmsblog&view=item&id='. $id.'&Itemid='. $Itemid );
with:
Code: (php)
$_Itemid = JCommentsPlugin::getItemid( 'com_mmsblog' );
$link = JRoute::_( 'index.php?option=com_mmsblog&amp;view=item&amp;id='. $id.'&amp;Itemid='. $_Itemid );

All other seems to be ok...
« Last Edit: July 16, 2009, 23:12:46 by smart » Logged

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

Karma: 0
Offline Offline

Posts: 12


« Reply #4 on: July 23, 2009, 20:54:26 »

Thank you, this works fine for me, but now i have another question:

Is it possible to get count of comments shown in blogview like shown at bottom of common joomla content articles?
Logged
MacJoomla
Newbie
*

Karma: 0
Offline Offline

Posts: 12


« Reply #5 on: July 24, 2009, 16:24:28 »

Meantime i found http://www.joomlatune.com/jcomments-developers-manual.html and tried over and over again putting following code to display the comments quantity in components/com_mmsblog/views/mmsblog/tmpl/default.php

Code:
  $comments = $mosConfig_absolute_path . '/components/com_jcomments/jcomments.php';
  if (file_exists($comments)) {
    require_once($comments);
    $count = JComments::getCommentsCount($id, 'com_mmsblog');
    echo $count ? ('Comments('. $count . ')') : 'Add comment';
  }

It seems to be the right file to change, but i cant get count of comments to display. Does anybody has an idea?

---
Joomla 1.5.12, sql 5.0.77, php 5.2.8, mmsblog 2.3.0, JComments 2.0.0.16
« Last Edit: July 24, 2009, 16:50:21 by MacJoomla » Logged
valeman
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« Reply #6 on: March 21, 2010, 09:00:37 »

This is brilliant. I was digging for ages to allow comments on locations in RSevents. I remembered that i had one from the old eventlist forums but couldn't dig it out.  You can put comments with this on pretty much any other extension if you know the right php file to insert it in.

For RSevents just put on the bottom of:   Joomla\components\com_rsevents\views\locations\tmpl\show.php

and you get to comment on locations too Smiley
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Integration with MMS Blog
 
Jump to: