Hack for jomcomment latest comment (1 viewing) (1) Guest
 | | |
|
TOPIC: Hack for jomcomment latest comment
|
|
Hack for jomcomment latest comment 4 Weeks, 1 Day ago
|
Karma: 0
|
Jomcomment hack about latest comment module is obsolete.
The file /path/to/joomla/modules/mod_jomlatest/helper.php have been changed
Do you have a way to make this module work with hwdvideoshare ?
|
|
|
|
Last Edit: 2010/02/08 15:48 By bedux.
|
|
|
Re:Hack for jomcomment latest comment 4 Weeks, 1 Day ago
|
Karma: 149
|
The file /path/to/joomla/modules/mod_jomlatest/helper.php have been changedCan you please give me the full version number of JomComment you are using? And the release date of the module?
I'll help you with a new hack if necessary.

|
|
Davros
Administrator
Posts: 10704
|
|
|
|
|
Re:Hack for jomcomment latest comment 4 Weeks, 1 Day ago
|
Karma: 0
|
|
This is the module version i am using mod_jomlatest_Joomla-1.5.x_v3.1
This is the component version I am using Jomcomment 3.0 Build 562
Basically both are the lastest versions available on azrul website.
When I try to apply your hack of jomcomment latest module i don't find anywhere part of code you are speaking about.
In an other hand the other hacks work fine.
Many Thanks.
BeduX
|
|
|
|
|
|
|
Re:Hack for jomcomment latest comment 4 Weeks ago
|
Karma: 149
|
Jomcomment 3.0On the Azrul website, it says the latest version is 3.0.1, which is newer than the version you are using:
www.azrul.com/products/jom-comment.html
Can you try to get an updated version of the module from Azrul? Because you will then be able to use the hack listed on our documentation website.
If they give you a reason why you can not upgrade let me know, and then I will develop an extra hack for your version.
|
|
Davros
Administrator
Posts: 10704
|
|
|
|
|
Re:Hack for jomcomment latest comment 4 Weeks ago
|
Karma: 0
|
Ok i admit, i don't have last version of jomcomment component
But i have the last update of module latest comment (iam sure about that)
Available here
And your hack is about module file ... not about the component ...
help meee please !!!
Code in helper.php file /path/to/joomla/modules/mod_jomlatest/helper.php
Warning: Spoiler!| Code: |
<?php
// no direct access
defined('_JEXEC') or die('Restricted access');
// cmslib is required for functions.jomcomment.php
if(!defined('CMSLIB_DEFINED')) {
include_once (JPATH_SITE.DS.'components'.DS.'libraries'.DS.'cmslib'.DS.'spframework.php');
}
require_once (JPATH_SITE.DS.'components'.DS.'com_jomcomment'.DS.'functions.jomcomment.php');
require_once (JPATH_SITE.DS.'components'.DS.'com_jomcomment'.DS.'helper'.DS.'comments.helper.php');
require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');
class modJomLatestHelper
{
function getList(&$params)
{
global $mainframe;
$db =& JFactory::getDBO();
$user =& JFactory::getUser();
$userId = (int) $user->get('id');
$count = (int) $params->get('count', 5);
$displayLen = (int) $params->get('displayLen', 50);
$titleLen = (int) $params->get('titleLen', 50);
$query = "SELECT a.id, a.contentid, a.comment, a.name, b.title, b.sectionid, b.title,
CASE WHEN CHAR_LENGTH(b.alias) THEN CONCAT_WS(':', b.id, b.alias) ELSE b.id END as slug,
CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(':', cc.id, cc.alias) ELSE cc.id END as catslug
FROM #__jomcomment as a , #__content as b
INNER JOIN #__categories AS cc ON cc.id = b.catid
INNER JOIN #__sections AS s ON s.id = b.sectionid
WHERE a.published=1 AND b.id=a.contentid
ORDER BY a.id DESC";
$db->setQuery($query, 0, $count);
$rows = $db->loadObjectList();
$list = array();
$i = 0;
foreach($rows as $row) {
$list[$i]->link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid));
$row->comment = jcStripBbCode($row->comment);
$comment = modJomLatestHelper::_wrapText($row->comment, $displayLen);
$comment = jcTransformDbText($comment);
$comment = jcDecodeSmilies($comment);
$list[$i]->comment = $comment;
$list[$i]->title = jcTransformDbText(jcTextWrap($row->title, $titleLen));
$i++;
}
return $list;
}
function _wrapText($text, $width = 20)
{
if(strlen($text) > $width)
return (substr($text , 0, $width) . '...');
else
return $text;
}
}
|
|
|
|
|
Last Edit: 2010/02/10 13:21 By Davros.
|
|
|
Re:Hack for jomcomment latest comment 3 Weeks, 6 Days ago
|
Karma: 149
|
|
OK, I'll do a hack for this version too. I have emailed you for server access details.
|
|
Davros
Administrator
Posts: 10704
|
|
|
|
|
 | | |
|