Change jomsocial url

More
9 years 3 months ago #26786 by s4k
Change jomsocial url was created by s4k
Hi, I want change the url in the jomsocial community...
I addes a small piece of code in the route.php, and i want edit that url in community stream.
How can I do it?

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #26788 by nordmograph
Replied by nordmograph on topic Change jomsocial url
Hello

Sorry I don't understand. Is this related to vm2wishlists ?
Please precise.

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago - 9 years 3 months ago #26813 by s4k
Replied by s4k on topic Change jomsocial url
Ok, I apologize for my bad english :D

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 :D

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
Last edit: 9 years 3 months ago by s4k.

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #26814 by nordmograph
Replied by nordmograph on topic Change jomsocial url
I see
This url using Joomla jRoute and the component router.php so it should build the correct url as long as you set the proper value for
Profiles menu item id (Itemid)
in the vm2wishlists component options.

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago - 9 years 3 months ago #26816 by s4k
Replied by s4k on topic Change jomsocial url
The menu item id of wishlist is: 315
In component settings is setted: Profiles menu item id (Itemid) - 315... but doesn't works :(
Can this issue caused by JomSef?

Anyway, I found $act->title in plugin... I edit this for now...

Edit:

I can saw, that the $vm2wishlist_itemid variable in the plugin Content - VM2wishlists, is ever 147.
If I forced the variable $vm2wishlist_itemid to 315, the link works perfectly :D
I installed the component and the plugin several months ago... do you have made some bufixes?
Last edit: 9 years 3 months ago by s4k.

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #26821 by nordmograph
Replied by nordmograph on topic Change jomsocial url
There are 2 itemid, the one for wishlist, VM and another one for Profile.
What is your vm2wishlists version?

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

Time to create page: 0.333 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.