Ok, I apologize for my bad english
I'm using your vm2wishlist.
The site is
Synthonia
.
I created a menu item, linked to your component, with alias: wishlist.
well, now My_wishlist can be reached with
www.synthonia.com/wishlist
.
But, if i wanted view the wishlist of the other users, I should write:
www.synthonia.com/wishlist/list?userid=1082
But this configuration is SEF-lessy.
So, I edited the route.php, of your component, adding a small piece of code in parse route:
Code:
function Vm2wishlistsParseRoute($segments){
$vars = array();
$db = & JFactory::getDBO();
// view is always the first element of the array
$count = count($segments);
if ($count < 3){
if($segments[0] == 'list') {
$vars['view'] = 'list';
}elseif($segments[0] == 'recommend') {
$vars['view'] = 'recommend';
}
}else if ($count == 3){
if($segments[0] == 'list') {
$vars['view'] = 'list';
}elseif($segments[0] == 'recommend') {
$vars['view'] = 'recommend';
}
if (isset($segments[2])){
$sqlQuery = "SELECT `id` FROM `#__users` WHERE `username` ='" . $segments[2] . "' ";
$db->setQuery($sqlQuery);
$id = urlencode( $db->loadResult() );
if(isset($id) && $id > 0){
$vars['userid'] = $id;
}
}
}
return $vars;
}
With this little piece of code, I can now view the wishlist of others user with this url:
www.synthonia.com/wishlist/list/my-wishlist/synthonia
With username to identify the correct wishlist
Is more SEF
But, when I add a product to wishlist, the stream on jomsocial, shows:
Synthonia
has added
Nord Lead 2X
to own list My Wishlist
The url of the wishlist is:
www.synthonia.com/component/vm2wishlists...onia#list_item_id_50
But I want this url:
www.synthonia.com/wishlist/list/my-wishl...onia#list_item_id_50
How can change this?
I hope that is more clearly