url/profile

10 years 11 months ago #228024 by escalona
url/profile was created by escalona
Hello:

user profile url´s are:
www.mysite.com / userprofile / xxx

I can do things below without using a url's extension manager?
1. Do not show "userprofile" in url?
2.Sustituir "userprofile" with "mytext"

3.Three. The above questions also for "userlist" in url's

Regards

Please Log in to join the conversation.

10 years 11 months ago #228042 by krileon
Replied by krileon on topic url/profile
The SEF link should be as follows.

yoursite/menu_alias/component_task/username

So for example it'd be the following.

example.com/profiles/userprofile/bob

You can change this to an extend using 3rd party SEF extensions, but aside from that no it can't be cut down much further. It's specific like this is the URL knows where to go.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

10 years 11 months ago - 10 years 11 months ago #228176 by AlexSmirnov
Replied by AlexSmirnov on topic url/profile
Hi Kyle,

Is it possible to somehow replace the username in this user profile SEF-ed URL to his ID?

Cheers,

Alex

AkeebaBackup.RU - безопасность Вашего Community Builder
Не тратьте свое и мое время впустую, - личные сообщения, отправленные без моего приглашения, удаляются без чтения.

Please Log in to join the conversation.

10 years 11 months ago #228194 by krileon
Replied by krileon on topic url/profile
Yes, you'll need to edit CBs router.php below to remove the user id to username conversion.

IN: /components/com_comprofiler/router.php
ON: Lines 26-34
					if ( is_numeric( $query['user'] ) ) {
						$sql					=	'SELECT username FROM #__users WHERE id = '. (int) $query['user'];
						$database				=	JFactory::getDBO();
						$database->setQuery( $sql, 0, 1 );
						$username				=	$database->loadResult();
						if ( $username && ! ( preg_match( '+[@:/\n\r\t\a\e\f\v\x00_]+', $username ) || is_numeric( $username ) ) ) {
							$query['user']		=	str_replace( '.', '_', $username );		// a dot (.) in a username is mishandled by the dot htaccess of joomla 1.5
						}
					}

If you remove the above chunk of code it should stay as user id instead of converting to username.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

10 years 11 months ago #228199 by AlexSmirnov
Replied by AlexSmirnov on topic url/profile
Thanks, Kyle.

Is it viable to implement such an option somewhere in the CB's admin panel in a future?

Cheers,

Alex

AkeebaBackup.RU - безопасность Вашего Community Builder
Не тратьте свое и мое время впустую, - личные сообщения, отправленные без моего приглашения, удаляются без чтения.

Please Log in to join the conversation.

10 years 11 months ago #228204 by krileon
Replied by krileon on topic url/profile
No, that'd make the router too heavy. It's extremely minimal and doesn't load or use any CB API, because it's used during the URL rewriting process. Maybe one way would be to have configuration in admin and it dynamically create a new router.php file. Something to think about for late CB 2.0.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.232 seconds