Skip to Content Skip to Menu

Custom html url/link, userlist url/link display, userlist value layout code, link to tab

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 4 months ago #265948 by jpdenny1
Hello. Right, really tired of this so have to ask.

I have two public Userlists and all profiles from these are public.

I want to simply display 3 links at the far right hand side of the Userlist but for the display to be what I require, not the user (i.e.hypertext is automatic) done in Userlist Value Layout.

Link 1 (Map): User inputs value in Profile Edit, it is a Web Address field e.g. google maps url. In Paramaters -> Userlist Value Layout, what would I put in?Is the Web Address Field the correct field to use for link 1 and 2?I want to display a link given by user as 'Website', not the actual url address given - to be clear.

Link 2 (Website): Same as above except input their homepage address url

Link 3 (Courses): The user cannot edit this one. It is a Custom HTML field. All I want is to display a link of the hypertext that I desire, (a) ideally to a specific tab corresponding to the specific user in the Userlist. or (b) just get them to the profile of the user they clicked on in the userlist.

To get to a specific tab from the url I have used variants of all of these;
Self: index.php?option=com_comprofiler&task=userprofile
User: index.php?option=com_comprofiler&task=userprofile&user=USER_ID
index.php?option=com_comprofiler&task=userProfile&tab=TAB&Itemid=YOUR_CB_ITEMID

None work, and the public user gets this message when clicking on the link: 'Please log in or sign up to view or modify your profile'.

This should be really easy I reckon but it has me at breaking point almost. Also, Link 3 only shows up on one Userlist. Sometimes the linkswork but go to the User Profile when logged in as a User.

Please help :unsure:

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
9 years 4 months ago #265993 by krileon

None work

What do you mean none work? They don't work how? Clicking them does nothing? Clicking them just goes to profile like normal? Please be more specific as to exactly how they're not working.

public user gets this message when clicking on the link: 'Please log in or sign up to view or modify your profile'.

You've profile access restricted. So a public user can't view any of those profile URLs. Change "Profile View Access Level" to "Public" within CB > Configuration > User Profile and they should work fine for public users. Otherwise you need to login first then try clicking them.


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.

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 4 months ago - 9 years 4 months ago #266003 by jpdenny1
'To get to a specific tab from the url (as below that I insert into the hyperlink) I have used variants of all of these;'.....

i.e. I'm trying to direct the User to a specific tab. All the variants of:
Self: index.php?option=com_comprofiler&task=userprofile
User: index.php?option=com_comprofiler&task=userprofile&user=USER_ID
index.php?option=com_comprofiler&task=userProfile&tab=TAB&Itemid=YOUR_CB_ITEMID

that I have used do not work i.e. none work in getting the User to the desired tab. With all the things I tried there are different results, none getting the User to the desired tab, best result was User got to the desired profile (not tab). But, I am using a custom html field for this - do I put all the code in this custom html field. What is it - as it must also display as a hyperlink on the Userlist.

OR Should I use a Web Address field and auto populate the [value] and then use the Userlist Value Layout to display it as Hyperlink. Any ideas on that code? (I have tried several).

I thought you might have a solution, instead of me going into all the things I tried, from searching the forums and googling which would be a long post and take alot of time to compile. Essentially all I want is 3 hyperlinks on Userlist as per attachment. Of types specific in first post. Have hit a wall with it. I will try again tonight but some guidance or ideas would be awesome and help alot.




Change "Profile View Access Level" to "Public" within CB > Configuration > User Profile and they should work fine for public users: This was already set to 'Public'

Otherwise you need to login first then try clicking them: let's leave this as there are more pressing issues.

Kind regards

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9
Last edit: 9 years 4 months ago by jpdenny1.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
9 years 4 months ago #266006 by krileon
For profile URLs you'd use the below in a Custom HTML field. Your other 2 usages are just Web Address fields which already handle making the links clickable so I don't understand the issue with those.

Code:
<a href="index.php?option=com_comprofiler&view=userprofile&user=[user_id]&tab=Articles">Articles</a>

Replace the tab with the tab title or tab id to link to a different tab.


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.

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 4 months ago #266008 by jpdenny1
Thanks, it still won't go to the tab. Have tried ID and Name. + can I take out showing the username in the url, when that is followed? (just that username is private in my setup)

Yes the links would be clickable with Web address field. But use case =

Enter map location: www.google.ie/maps/place/national+taiwan+university/@25.017341,121.539752,14z/data=!4m2!3m1!1s0x0:0x21750404ee1d7f66?sa=X&ved=0CIoBEPwSMAxqFQoTCPmf0bHrlMYCFUQOLAodHUoFaA

Which I would like displayed as hyperlink 'Map' automatically. Any ideas or code for User List display I imagine?

Much appreciated

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
9 years 4 months ago #266010 by krileon

it still won't go to the tab. Have tried ID and Name.

The below usage works perfectly fine in my tests.

index.php?option=com_comprofiler&view=userprofile&user=[user_id]&tab=TAB_TITLE

It's better to use the ID instead of the title though as the title could change based off HTML being added to it, translations, etc.. Please note the ID you need to use is under the ID column to the far right in CB > Tab Management. The number under # is not its ID. Below is examples of core tabs using their IDs.

Articles:
index.php?option=com_comprofiler&view=userprofile&user=[user_id]&tab=10

Blogs:
index.php?option=com_comprofiler&view=userprofile&user=[user_id]&tab=8

Forums:
index.php?option=com_comprofiler&view=userprofile&user=[user_id]&tab=9

can I take out showing the username in the url, when that is followed? (just that username is private in my setup)

No, that's what a SEF link to users profile looks like.

Which I would like displayed as hyperlink 'Map' automatically. Any ideas or code for User List display I imagine?

Use a web address field and have them supply that URL. There's not a lot of options in this regard as using a text field to provide the address won't urlencode it and it needs to be urlencoded to be used in a URL so it won't work well as a Custom HTML field, but you can try it anyway using the below usage.

Code:
<a href="[value]">Map</a>

Please see the below if you need any further HTML usage information.

developer.mozilla.org/en-US/docs/Web/Guide/HTML/Introduction
www.w3schools.com/html/default.asp


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