Skip to Content Skip to Menu

Direct acces with URL to a tab of an user who is viewed

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
6 years 10 months ago - 6 years 10 months ago #299803 by chanteur94
Hi

I know that I can use an URL to access directly to a Tab (and a field)..I put this in a Menu.

For the connected user : index.php?option=com_comprofiler&task=userprofile&tab=TABID works fine.

But for the user viewed , how can I recover the USER_ID in the URL : index.php?option=com_comprofiler&task=userprofile&user=USER_ID&tab=TABID

It's like equal to replace USER_ID by #displayedOrMe

Is it possible to do something like that ?

Thank you.
Last edit: 6 years 10 months ago by chanteur94.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 10 months ago #299816 by krileon
You should be able to use [cb:userdata field="user_id" user="#displayedOrMe" /] to output the user id of either the displayed user or the viewing user.


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 or Create an account to join the conversation.

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
6 years 10 months ago #299830 by chanteur94
I tried this :

index.php?option=com_comprofiler&task=userprofile&user=[cb:userdata field="user_id" user="#displayedOrMe" /]&tab=40

or the same with simple quote ou double quote to [cb:userdata field="user_id" user="#displayedOrMe" /]
but i have an error message when i want to save the URL :

the error message in french : 'enregistrement non permis' (save not allowed)

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

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
6 years 10 months ago #299845 by chanteur94
New information : in a CB Content module, it works like this :

<a href="/index.php?option=com_comprofiler&task=userprofile&user=[cb:userdata field="user_id" user="#displayedOrMe" /]&tab=40">Tab_ID40</a>

But doesn't works in a Menu with URL.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 10 months ago #299868 by krileon

But doesn't works in a Menu with URL.

Joomla does not pass menu URLs through content prepare so it's not possible to use substitutions there.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum