Skip to Content Skip to Menu

[SOLVED] Make the profile image (avatar) clickable to enlarge it, like lightbox effect

  • Digigreg
  • Digigreg
  • OFFLINE
  • Posts: 38
  • Thanks: 8
  • Karma: 0
7 years 3 months ago - 7 years 3 months ago #291373 by Digigreg
Hello,
as in the title I'm trying to make the avatar clickable to have a king of lightbox effect.

I've took a look on the forum, and found your answer in this thread " www.joomlapolis.com/forum/87-presales/234514-images#285134 " to use CB Auto Actions. Well, can you please provide me the jQuery code needed for my scope, or even tell me how to set up CB Auto Actions to do this?

I don't like core hacks, in Joomla as in CB, so I'd like to do this in the clean way I can.

Thanks for the help.
Greg
Last edit: 7 years 3 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68625
  • Thanks: 9109
  • Karma: 1434
7 years 3 months ago #291381 by krileon
You need to write the jQuery your self. We do not provide custom coding assistance. CB Auto Actions can load your jQuery on the profile page using the below action usage.

Global
Triggers: onAfterUserProfileDisplay
Type: Code
User: Automatic
Access: Everybody
Action
Method: jQuery


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.

  • Digigreg
  • Digigreg
  • OFFLINE
  • Posts: 38
  • Thanks: 8
  • Karma: 0
7 years 3 months ago #291416 by Digigreg
Sure, no problem, just I wanter to understand well how to include from CB Auto Actions.

I paste my jQuery code here, is somebody will need in the future.
I have used and integrated in my custom template the Lightbox script, but all the scripts can be used to obtain the popup effect.

Note that "#cbfv_29" is the div contains the image, I don't know if the ID can be different, otherwise just put the right ID.

var profileImage = $('#cbfv_29').find('img').attr('src');
$('#cbfv_29').find('img').wrap( "<a data-lightbox='profile' href='" + profileImage + "'></a>" );

Thanks,
maybe in the next releases you can consider to include this feature as a selectable option of Community Builder.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn