Add Connection Request Button to CB List

12 years 3 months ago - 12 years 3 months ago #189315 by SupaMic
I would like to have a small button allowing for users to send a Connection Request directly from members listing as opposed to requiring users to go to the users profile and then select Request Connection from the Connections Menu dropdown.

I have successfully created a webaddress field with the URL to request connection using the command and added it to my list
http://site.ca/index.php/profile/addconnection?act=connections&connectionid=43

The problem is users have to populate this field themselves and they would need to know their joomla userid number!

My Question is do we have any way to populate fields with a default value when a user registers and add their userid into this string upon creation?

I know I can add a default in the sql table _comprofiler_fields but appending the userid in string is the tricky part!?

Please Log in to join the conversation.

12 years 3 months ago #189360 by krileon
Replied by krileon on topic Re: Add Connection Request Button to CB List
The user_id needs to be dynamic and change based on the user displayed. To do that place your URL in a delimiter field and replace "&connectionid=43" with "&connectionid=[user_id]". Example delimiter field as follows.

<a href="index.php?option=com_comprofiler&Itemid=2&act=connections&task=addConnection&connectionid=[user_id]">Add Connection</a>


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: fader8, ptemper, SupaMic, bk6366, helen999

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.240 seconds

Facebook Twitter LinkedIn