[SOLVED] CB Activity

6 months 4 weeks ago - 6 months 3 weeks ago #327898 by activha
[SOLVED] CB Activity was created by activha
On a single activity page, I cannot find the correct code in an autoaction to display the card header information under the first body container (ie activityContainerContent or activityContainerInsert)

I tried to add
$variables['var5']=\CBLib\Language\CBTxt::T( 'activating', 'has activated ' ) . '<a  class="strong" href="/component/comprofiler/pluginclass/cbactivity?action=activity&id=[var1_id]&Itemid=7333">[var1_params_activ]</a>';
and output it by
$variables['var5'] = $content . $variables['var5'];
but of course I only have the link and not the avatar/name of the header

Do I have to code everything to mimic the card header or is there a simple trick to display the header just under the message ? by css ?

I don't have an idea about this after trying a couple of hours

Can you help ?

Thanks

Please Log in to join the conversation.

6 months 4 weeks ago #327905 by krileon
Replied by krileon on topic CB Activity
Under Parameters ensure for References you've selected Variable 5. CB Auto Actions doesn't automatically know if something is a reference variable or not so you need to tell it which variables are. Eventually this will be automated.


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.

6 months 3 weeks ago #327912 by activha
Replied by activha on topic CB Activity
I think that the best solution is a template override for CB Activity with a single edition of container.php
So I just reversed the header and the display of message.
Then I added a new CB menu link for Activity display with the new template.
But it seems like the menu link always default to the general template set in main CB Activity settings.

I tried to set the new template in CB Activity general settings and all is fine, so I guess it has to do with the menu item which does not override the template when there are several menu items pointing to the CB Activity plugin ?

Can you check ?

Please Log in to join the conversation.

6 months 3 weeks ago #327924 by krileon
Replied by krileon on topic CB Activity
Depends on what stream you're rendering. If you're trying to render a profile stream then the Activity tab will override menu parameters. That would be intentional. I'm in the middle of CB Activity 6.0.0 and per-stream templates are removed so if this isn't working there isn't much chance of it being fixed. Per-anything templates is actually on the way out entirely as we'll be using Joomla template layouts and not our own template system in the near future.

You shouldn't have any issues doing this from CB Auto Actions. What is the asset of the activity entry you're trying to override the title of? It may already have title parsing behavior and there's a conflict with your title and the one a plugin maybe setting.


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.

6 months 3 weeks ago #327930 by activha
Replied by activha on topic CB Activity
In fact I don't have an issue with overriding the title with auto-actions and even displaying it under the message.
But what I'd like to achieve is completely reversing the display of the full header and the message in the container file like this activ-ha.com/component/comprofiler/pluginclass/cbactivity?action=activity&id=6007&Itemid=8125 and it seemed that a template override with a dedicated menu item would be simpler.

This is used only when a single activity is displayed on a standalone page

How could I achieve the same result with an auto action ?
I mean that I can change var4 but not the entire display with this :
$variables['var2']=\CBLib\Language\CBTxt::T( 'activating', 'has activated ' ) . '<a  class="strong" href="component/comprofiler/pluginclass/cbactivity?action=activity&id=[var1_id]&Itemid=8125">[var1_params_activ]</a>';

Please Log in to join the conversation.

6 months 3 weeks ago #327942 by krileon
Replied by krileon on topic CB Activity
Lets first get the trigger variables in this topic.

$_PLUGINS->trigger( 'activity_onDisplayStreamActivity', array( &$row, &$title, &$date, &$message, &$insert, &$footer, &$menu, $stream, $output ) ) );

So if I understand correctly you want to override the title, which is the string shown directly after their name. For that you'd just use var2 and be sure it's set as a Reference under the Parameters tab. You can then set it to whatever you like.


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.187 seconds

Facebook Twitter LinkedIn