Improved RSGallery2 extension for XMap
1 post
• Page 1 of 1
Improved RSGallery2 extension for XMap
I have just downloaded and installed XMap 1.2.10 which has an RSGallery2 extension in it (extension version 1.0.0). My Joomla 1.5.22 has a menuitem for RSGallery2 2.2.0 with galleries and images and a menuitem for one of the subgalleries. I haven't changed any of the default settings.
There is an error
In short: I corrected the order of parameters with which function getGalleries was called, changed catid into gid and removed catid where it shouldn't be.
File is attached. [Edit: When I try to attach a zip here there is an error in the zip when I download it, so I'll refer you to http://www.rsgallery2.nl/topicseen,/rsgallery2_bugs_problems/urls_xmap_are_different_sh404sef_than_rsg2_16683.msg43319.html#new to download the updated file.]
One question left: Why is there a bit
Long story:
This is what I changed, and the resulting file is attached:
1) Changed the lines 134-136
to
Parameters for the function getGalleries were mixed up.
2) URL to item is incorrect: it should not have a catid. Changed line 162
3) Catid should be gid (the gallery id in the URL), so changed line 130
4) Menuitems linked to a subgallery don't have catid in their URL, they have a gid. Changing line 25 from
Then in function getTree on line 47 catid is changed to gid.
5) function getGalleries also uses $catid, and has a line $gid=0; that is not used for anything, so it's removed. Then changed the 3 occurences in this function of catid to gid.
With kind regards,
Mirjam
p.s. RSGallery2 can be downloaded here http://joomlacode.org/gf/project/rsgallery2/frs/?action=FrsReleaseBrowse&frs_package_id=4863
There is an error
and the URLs that XMap generates are not the same as that RSGallery2 generates, this means that there will be two SEF link when e.g. sh404SEF is used.No valid database connection Unknown column 'Array' in 'where clause' SQL=SELECT id,name,unix_timestamp(`date`) as `date` FROM jos_rsgallery2_galleries WHERE published=1 AND parent=Array ORDER BY ordering ASC
In short: I corrected the order of parameters with which function getGalleries was called, changed catid into gid and removed catid where it shouldn't be.
File is attached. [Edit: When I try to attach a zip here there is an error in the zip when I download it, so I'll refer you to http://www.rsgallery2.nl/topicseen,/rsgallery2_bugs_problems/urls_xmap_are_different_sh404sef_than_rsg2_16683.msg43319.html#new to download the updated file.]
One question left: Why is there a bit
- Code: Select all
if ( $id )
return $tree;
Long story:
This is what I changed, and the resulting file is attached:
1) Changed the lines 134-136
- Code: Select all
if ($xmap->printNode($node) !== FALSE) {
xmap_com_rsgallery2::getGalleries($xmap,$parent,$row['id'],$params);
}
to
- Code: Select all
if ($xmap->printNode($node) !== FALSE) {
xmap_com_rsgallery2::getGalleries($xmap,$parent,$params,$row['id']);
}
Parameters for the function getGalleries were mixed up.
2) URL to item is incorrect: it should not have a catid. Changed line 162
- Code: Select all
$node->link = 'index.php?option=com_rsgallery2&page=inline&catid=' . $catid . '&id=' . $row['id']; // parent id
- Code: Select all
$node->link = 'index.php?option=com_rsgallery2&page=inline&id=' . $row['id']; // parent id
3) Catid should be gid (the gallery id in the URL), so changed line 130
- Code: Select all
$node->link = 'index.php?option=com_rsgallery2&catid='.$row['id'];
- Code: Select all
$node->link = 'index.php?option=com_rsgallery2&gid='.$row['id'];
4) Menuitems linked to a subgallery don't have catid in their URL, they have a gid. Changing line 25 from
- Code: Select all
$catid = JArrayHelper::getValue( $link_vars, 'catid', '', '' );
- Code: Select all
$gid = JArrayHelper::getValue( $link_vars, 'gid', '', '' );
- Code: Select all
} elseif ( $gid) {
$node->uid = 'rsgallery2c'.$gid;
$node->expandible = true;
}
Then in function getTree on line 47 catid is changed to gid.
5) function getGalleries also uses $catid, and has a line $gid=0; that is not used for anything, so it's removed. Then changed the 3 occurences in this function of catid to gid.
With kind regards,
Mirjam
p.s. RSGallery2 can be downloaded here http://joomlacode.org/gf/project/rsgallery2/frs/?action=FrsReleaseBrowse&frs_package_id=4863
- mirjam
- Fresh Boarder

- Posts: 5
- Joined: Sat May 17, 2008 3:23 pm
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests