CB Activity share link for individual post.

1 year 10 months ago #329740 by activha
Replied by activha on topic CB Activity share link for individual post.
That's a good idea, however it doesn't take the proper Itemid if we have several plugin links with different pages/modules.
For instance we have two different links taking to the activity itself with different modules.
So I tried :
$variables['var7'][] = '<a href="' . $_CB_framework->pluginClassUrl( 'cbactivity', true, [ 'action' => 'activity', 'id' => $variables['var1']->id , 'Itemid' => '7766', 'atid' => '2'] ) . '" class="dropdown-item"><span class="fal fa-share"></span>Partager cette activité</a>';

but the Itemid 7766 is not inserted.

Should I revert to a standard link ?
Also can I make this menu item the first one ? does the array support an order ?

Please Log in to join the conversation.

1 year 10 months ago #329742 by krileon
Replied by krileon on topic CB Activity share link for individual post.

Should I revert to a standard link ?

Entirely up to you. You can hardcode in Itemid if you want it to use a specific menu item.

Also can I make this menu item the first one ? does the array support an order ?

No, it has a specific location that integration menu items can be inserted into.


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.

1 year 10 months ago #329745 by activha
Replied by activha on topic CB Activity share link for individual post.

You can hardcode in Itemid


I thought that I did it in my code.
'Itemid' => '7766' is not taken by $_CB_framework->pluginClassUrl ?
That would be a nice addition to be able to have different links

Please Log in to join the conversation.

1 year 10 months ago #329747 by krileon
Replied by krileon on topic CB Activity share link for individual post.
The purpose of pluginClassUrl is to build the URL, find its Itemid, and pass the result through routing. If you don't need that then just call Joomla URI API with the URL beginning with index.php.


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.

1 year 8 months ago #330222 by activha
Replied by activha on topic CB Activity share link for individual post.
Following on this post, I have the share link in the menu with the trigger activity_onDisplayStreamActivity
Now I'd like to display a button in a single activity but I cannot find a trigger to act on a single activity.
Does one exist ?
Should I use conditions and if yes how can I limit to a single activity ?
Thanks
 

Please Log in to join the conversation.

1 year 8 months ago #330224 by activha
Replied by activha on topic CB Activity share link for individual post.
I have thought at a second condition 
echo $input->getString( 'id' );

Is there something better ? a specific trigger ?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.228 seconds

Facebook Twitter LinkedIn