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: SEF EXT FOR JCOMMENTS READY
Pages: [1]   Go Down
  Print  
Author Topic: SEF EXT FOR JCOMMENTS READY  (Read 11181 times)
0 Members and 1 Guest are viewing this topic.
korb
Jr. Member
**

Karma: 3
Offline Offline

Posts: 14



WWW
« on: January 29, 2009, 03:21:57 »

Hello all,
I have finished it, 'cause smart fixed a small bug so I managed to code the plugin

You can find it here, with the bug fix you need
http://extensions.siliana.com/forums/index.php?topic=11250.msg17969#msg17969


There is one more thing to fix, maybe in the future
Danny
« Last Edit: January 29, 2009, 03:43:36 by korb » Logged

Visit my JComments powered website
PC Adviser - IT Info & Shop in one place.
smart
Administrator
Hero Member
*****

Karma: 188
Offline Offline

Gender: Male
Posts: 1883



WWW
« Reply #1 on: January 29, 2009, 18:23:18 »

We can make some optimization for this plugin, so this code:

Code: (php)
if (!empty($object_id) && !empty($object_group) && $object_group == 'com_virtuemart')
$q = "SELECT product_id, product_sku, product_name FROM #__vm_product";  // then try to add its name as well
    $q .= "\n WHERE product_id = ".$object_id;
    $database->setQuery( $q);
    if (!shTranslateUrl($option, $shLangName))
    $row = $database->loadObject( false);
    else $row = $database->loadObject( );
    $title[] = $row->product_name;[/quote]
shRemoveFromGETVarsList('object_id');
shRemoveFromGETVarsList('object_group');

and

Code:
if (!empty($object_id) && !empty($object_group) && $object_group == 'com_content')
$q = "SELECT id, title FROM #__content";  // then try to add its name as well
    $q .= "\n WHERE id = ".$object_id;
    $database->setQuery( $q);
    if (!shTranslateUrl($option, $shLangName))
    $row = $database->loadObject( false);
    else $row = $database->loadObject( );
    $title[] = $row->title;
shRemoveFromGETVarsList('object_id');
shRemoveFromGETVarsList('object_group');

may be replaced with:

Code: (php)
if (!empty($object_id) && !empty($object_group)) {
    include_once(JPATH_ROOT . DS . 'components' . DS . 'com_jcomments' . DS . 'jcomments.php');
    $title[] = JCommentsObjectHelper::getTitle($object_id, $object_group);
    shRemoveFromGETVarsList('object_id');
    shRemoveFromGETVarsList('object_group');
}

The function JCommentsObjectHelper::getTitle returns title for given object id and component.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: SEF EXT FOR JCOMMENTS READY
 
Jump to: