Skip to Content Skip to Menu

Add Connection Request Button to CB List

  • SupaMic
  • SupaMic
  • OFFLINE
  • Posts: 7
  • Thanks: 0
  • Karma: 0
12 years 8 months ago - 12 years 8 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
Code:
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!?
Last edit: 12 years 8 months ago by SupaMic.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
12 years 8 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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum