Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

CB Auto Action: Pop-up Message

9 years 10 months ago #258468 by pasquale1980
Replied by pasquale1980 on topic CB Auto Action: Pop-up Message
I saw examples, I tried also following this (that showing clearly how it works):

www.w3schools.com/jquery/tryit.asp?filename=tryjquery_event_stoppropagation

I thought of using the example of the first link you sent me:
api.jquery.com/event.preventDefault/

but I do not understand how to intercept the link that triggers the opening of the profile.
Link clean is:
<a href=" www.tirocinando.it/index.php/it/cb-profile/userprofile/lucia ">Lucia Marro (lucia)

The link native to intercept in CB Profilebook how is it structured?

Ex. <a href="index.php?option=com_comprofiler&amp;task=userProfile&amp;user">[name] [username]</a>
Thanks.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 years 10 months ago #258524 by krileon
Replied by krileon on topic CB Auto Action: Pop-up Message
You need to bind to the click behavior of the <a element and that's where you shut off its default behavior. You didn't provide your jQuery so I have no idea what you're binding to or trying to do. There's no class to bind to though currently for CB ProfileBook; so you'd have to try and navigate to it with various selectors. Example as follows.

Code:
$( '.cbpbMainArea tr > td:first-child > b:first-child > a' ).on( 'click', function( event ) { event.preventDefault(); alert( 'I have been clicked!' ); });


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.

9 years 10 months ago #258722 by pasquale1980
Replied by pasquale1980 on topic CB Auto Action: Pop-up Message
I have two groups Student and Company. In Tab ProfileBook of the Company are the feedback received from Students and pressing on the avatar or on the name (see screenshot 1) you can see the profile of the Student that have left the feedback. I wish that the students can not see the profile of the other Students, so I have add a redirect on CB Auto Action:

If [user_id] Not Equal To [cb: userdata field = "user_id" user = "# me" /]
and
If [cb_usertype] Equal To Student
redirects on the link

and it works great.
I wish, however, that instead of redirect to remain on the profile page that I am visiting and when I press on the avatar a Pop-up message appears (see screenshot 2).
Thanks.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 years 10 months ago #258736 by krileon
Replied by krileon on topic CB Auto Action: Pop-up Message
There's no way for you to do this on a specific per entry basis; that information just is not available on a per entry basis as you'd need to condition and bind to each entry individually. The only way to have that is to modify CB ProfileBook and change how the entries are output by doing your condition test for each one. Normally I'd say you could act on the field row trigger to add jQuery output for a specific users avatar or formatname field, but in the case of CB ProfileBook it doesn't use getFields API yet so that's not possible right now.


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.

9 years 10 months ago #258772 by pasquale1980
Replied by pasquale1980 on topic CB Auto Action: Pop-up Message
There is a way with the redirect to enter a url that send me back on the profile page that I was visiting?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 years 10 months ago #258812 by krileon
Replied by krileon on topic CB Auto Action: Pop-up Message
No, the trigger has no idea what URL they just came from.


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