This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

KaloSex

  • ****
  • 139 posts
I noticed that wherever on the site a user's profile is linked, its linked without the language code in the url.

Like, lets say i see everywhere this public profile:
https://www.kalosex.com/user/profile/John250

But the best would be to include the language code (en for english or gr for greek):
https://www.kalosex.com/en/user/profile/John250

No matter if you change language, the profile url remains the same and doesn't include lang code. So, considering that based on the lang used, the content of page changes but the url remains the same, it's a problem for SEO. Especially while everywhere on the site the lang code is on the url.

So i wonder, how can i edit the links to profiles on the theme so it includes the url code that the users is using currently?

Is there a way to do this so i don't get indexed urls without lang code?

I see that the link is produced with this code "<?php echo eps_user_public_profile_url(osc_item_user_id()); ?>" so i guess it's more of osclass thing and not theme's, so maybe topic needs to be moved to correct spot of forum. Sorry for this
« Last Edit: October 13, 2023, 10:46:21 PM by KaloSex »

*

MB Themes

Can you try with osclass function instead?
Code: [Select]
osc_user_public_profile_url(osc_item_user_id());
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

KaloSex

  • ****
  • 139 posts
Just tried, it produces same link

*

MB Themes

Hmm not sure why just this one woukd not work.
Will try to test tomorrow...
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by frosticek on October 18, 2023, 03:27:17 PM
*

MB Themes

OK there is bug, in helpers/hUsers.php
find:
Code: [Select]
        $path = osc_base_url().osc_get_preference('rewrite_user_profile')."/".$user['s_username'];

Replace with:
Code: [Select]
$path = osc_base_url(false, true) . osc_get_preference('rewrite_user_profile') . '/' . $user['s_username'];
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

KaloSex

  • ****
  • 139 posts
the change on helpers/hUsers.php and the osc_user_public_profile_url(osc_item_user_id());
did the trick. Thank you
« Last Edit: October 18, 2023, 08:36:28 PM by KaloSex »