I created a new field called test, type Text Area.
In paramaters layout entered
<a href="index.php?option=com_comprofiler&view=addconnection&connectionid=[user_id]" class="btn btn-success">Request Connection</a>
as per a previous forum post.
With config Mutual consent set NO
Problem is, yes it creates connection button however still shows request connection after connection. I would like after connected to say Connected.
What should the code above say?
Last edit: 5 years 1 day ago by krileon. Reason: Added [#7778] tag to subject
There's no IF substitution to determine if someone is connected to the displayed profile. You'd have to check for that in a Code field using PHP and APIs or in a Query field by querying the _comprofiler_members database table. You'd then condition against that code or query field with an IF substitution to determine if that button should be displayed or not.
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.
Thanks for the reply but appears way beyond mine and probably most average website owners capabilities. A good feature sadly wont be available on my site. Thanks
I'm looking into implementing a new condition in CB Conditional to check if the viewing user is connected to the displayed user. With this you'd just add the condition to your existing field which should give you the behavior you're wanting.
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.