Skip to Content Skip to Menu

Tailoring CB Gallery

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 1 month ago #335244 by krileon
Replied by krileon on topic Tailoring CB Gallery
There is no functionality for that. That's something you would have to completely implement yourself. You'd have to use CB Auto Actions to act on the following triggers.

PM Form:
pm_onAfterDisplayMessageEdit
pm_onAfterDisplayMessageReply

PM Display:
pm_onAfterDisplayMessage

PM Save:
pm_onAfterCreateMessage

This is not likely to be a simple task. The easiest thing for your users to do is like any other social media site. Simply copy and paste the URL. Even for photos they can right click, copy image url, and paste it. In a future release it maybe possible to insert media from their profile gallery, but I've no idea when I will get to that.


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.

1 year 1 month ago #335259 by huguesmarcil
Replied by huguesmarcil on topic Tailoring CB Gallery
Hi Kyle.
Here is how I customized the new message form without breaking anything at first glance:
  • Copy and rename this folder: components/com_comprofiler/plugin/user/plug_pms_mypmspro/templates/default/
  • Select the corresponding new folder in Admin > Community Builder > Private Messages > Configuration > Parameters > General > Template
  • Edit this file in the new folder: message_edit.php

By editing message_edit.php, I was able to add a "Select the album to send" checkbox field that uses javascript to add links to the selected albums at the end of the message when the submit button is clicked. I can share my message_edit.php if it might be of interest to you.
For now, this solution is fine because it works.
But I need to improve it for a more user-friendly experience: how can I force the PM file upload box to automatically add the uploaded file to the sender's latest album?
Thanks.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 1 month ago #335266 by krileon
Replied by krileon on topic Tailoring CB Gallery
You can't without re-implementing the CB Gallery integration using CB Auto Actions. CB Gallery integration to PMS is hardcoded into CB Gallery. You're effectively needing something wildly different than what is available so you've to implement your own solution. The CB Gallery implementation is as follows if you want to try and replicate it in CB Auto Actions and change it to fit your needs.

Triggers:
Code:
$_PLUGINS->registerFunction( 'pm_onAfterDisplayMessage', 'pmDisplay', '\CB\Plugin\Gallery\Trigger\PMSTrigger' ); $_PLUGINS->registerFunction( 'pm_onAfterDisplayMessageEdit', 'pmEdit', '\CB\Plugin\Gallery\Trigger\PMSTrigger' ); $_PLUGINS->registerFunction( 'pm_onAfterDisplayMessageReply', 'pmEditReply', '\CB\Plugin\Gallery\Trigger\PMSTrigger' ); $_PLUGINS->registerFunction( 'pm_onAfterCreateMessage', 'pmSave', '\CB\Plugin\Gallery\Trigger\PMSTrigger' );

Implementation:
/components/com_comprofiler/plugin/user/plug_cbgallery/library/Trigger/PMSTrigger.php

I do not recommend just making changes to the file above as you will lose those changes when you update CB Gallery.


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.

1 year 1 month ago #335272 by huguesmarcil
Replied by huguesmarcil on topic Tailoring CB Gallery
Ok thanks now that this is clear, could you give an approximate possible release date for this PMS Media Gallery integration?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 1 month ago #335273 by krileon
Replied by krileon on topic Tailoring CB Gallery
CB Gallery is already integrated with the PMS. I'm not sure what integration you're waiting for? You mean the WYSIWYG editor button for inserting profile gallery media?


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.

1 year 1 month ago #335284 by huguesmarcil
Replied by huguesmarcil on topic Tailoring CB Gallery
This integration:

In a future release it maybe possible to insert media from their profile gallery, but I've no idea when I will get to that.

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

Moderators: beatnantkrileon
Powered by Kunena Forum