[#5600] use the Request Connection Javascript link for other uses

8 years 6 months ago - 8 years 5 months ago #272843 by pranaydhruv
Hello Team,

When i go to a user's profile and get the request connection option. i want to use this for other options but with a different text that i want prefilled , as this would be a button only available when i visit other user profiles and not visible on my profile.
So basically it will be a button that will send them a Private message with pre-filled text and or email , but this button will only be visible in other users profile and not in own profile.

How can i achieve this ?

Thanks
Pranay

Please Log in to join the conversation.

8 years 5 months ago #272863 by krileon
There's no feature for that. UddeIM doesn't seam to support pre-filled PM messages either so I'm not sure if you can even construct a URL for that. You'd probably need to develop a custom CB plugin to have what you're wanting or use CB Auto Actions and create a PM or Email action with triggers set to None then link directly to it using a Custom HTML field for example.


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 to join the conversation.

8 years 5 months ago - 8 years 5 months ago #272898 by pranaydhruv
Hello Kyle,

Auto Actions sounds good but how do i achieve it with Auto actions? i want the buttons to be visible only when a user views other users profile. What options do i choose under conditions, actions and parameters tab and how do i link it to a custom HTML. if i create a custom HTML will it be visible when user views his own profile too?

and this Private message will need to be sent only when a user who has hidden some part of his profile like a Tab or a field. This message will be a request from some other user to show that tab or Field.

Thanks
Pranay

Please Log in to join the conversation.

8 years 5 months ago #272910 by krileon
You need to create an auto action and leave triggers as "None". Configure it however you want and use whatever action you want (e.g. Private Message). Now save it and under the Global tab you'll see its direct URL. It should be something like the following.

index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID

In a Custom HTML field you can link to that URL and include &users=[user_id] so the target user is the profile owner. Example as follows.

index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID&users=[user_id]

Your Private Message action could then be for example as follows.

From: [cb:userdata field="user_id" user="#me" /]
To: [user_id]
Subject: Hello!
Message: Testing!


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 to join the conversation.

8 years 5 months ago - 8 years 5 months ago #272918 by pranaydhruv
Hello Kyle,

Auto actions for Private messages is not supporting substitutions please refer to the screenshot.

However when i save it saved and i have the url with which i tested, However the link should not be visible on the users own profile , because if they click it they send a Private message to themselves.How do i hide it so that it doesnt show on the users own profile.


Thanks
Pranay
Attachments:

Please Log in to join the conversation.

8 years 5 months ago - 8 years 5 months ago #272949 by krileon
Please ensure you're using latest nightly CB Auto Actions then retry.

To hide the link from a users self you can use CB Coniditionals to condition the user id of the profile against the viewing user id. Example as follows.

Field: Custom > Value
Value: [user_id]
Translate Value: No
Operator: Not Equal To
Value: [cb:userdata field="user_id" user="#me" /]
Translate Value: No
Mode: Hide


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.368 seconds

Facebook Twitter LinkedIn