Skip to Content Skip to Menu

Connection button link

  • activha
  • activha
  • OFFLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
10 years 4 months ago #246291 by activha
Connection button link was created by activha
Hi

I would like to set up a button with Follow somebody and a link to the connection request if no connection is yet established
This button would be replaced by 'you already follow' if the connection is established

Can you tell me what link should be used in the button code to achieve this ?
Is there a field or a replacement that I could use for this ?

Thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 4 months ago #246300 by krileon
Replied by krileon on topic Connection button link
You can render CB Menu items using substitutions using the below.

Code:
[menu caption="Follow" img="" class="btn"] _UE_MENU_CONNECTIONS : _UE_ADDCONNECTION[/menu]

The add connection URL is as follows if you want to construct your own HTML link.

index.php?option=com_comprofiler&task=addconnection&connectionid=USER_ID_HERE

Replace USER_ID_HERE with the User ID you want the viewing user to connect to. In the case of substitutions this could be [user_id] so it'd be dynamic based off the profile displayed.


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.
The following user(s) said Thank You: asierraserna

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

10 years 4 months ago #246426 by asierraserna
Replied by asierraserna on topic Connection button link
Hello, is there a CB function to check if the [user_id] is already a connection of the logged user?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 4 months ago - 10 years 4 months ago #246472 by krileon
Replied by krileon on topic Connection button link
There's a PHP function for it, but there's nothing available to do that with a substitution. The best I can suggest is create a CB Query Field that queries the database to determine if there's a connection then condition the query field in the IF substitution. The menu substitution as shown above though should do this automatically I believe.


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.
Last edit: 10 years 4 months ago by krileon.

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

  • activha
  • activha
  • OFFLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
10 years 3 months ago #246778 by activha
Replied by activha on topic Connection button link
This substitution does not work in a CB 1.9 delimiter field :

[menu caption="Follow" img="" class="btn"] _UE_MENU_CONNECTIONS : _UE_ADDCONNECTION[/menu]

Is it only for the CB content module ?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 3 months ago #246833 by krileon
Replied by krileon on topic Connection button link
Menu substitutions should work in delimiter fields as well. They're on by default when calling cbReplaceVars, which delimiter fields don't shut off.


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