Please Log in to join the conversation.
That's entirely up to you. If that's what stream those posts belong to then yes.Should I only affect all these to a menu itemid ? for instance if I have a stream Menu 1926 with Ressource %activation.[user_id]% , does it mean that I should affect all my orphaned activities to this one ?
The updated triggers are all listed below with their variables.Also regarding the triggers :
Could you explain the correspondance between old ones and new ones ?
Please Log in to join the conversation.
Please Log in to join the conversation.
$variables['var1']['left']
$variables['var3']['buttons']
Please Log in to join the conversation.
ACTION PHP
$url = 'index.php?option=com_comprofiler&view=pluginclass&plugin=cbactivity&action=activity&id=[var2_id]&Itemid=8125';
$com = !empty('[var2_params_event_title]')? \CBLib\Language\CBTxt::T( 'with_act', ' with ' ) . '[var2_params_event_title]':'';
$title ="[var2_params_activ]";
$reve_url = ('[var2_params_revechoice]'==62)?JRoute::_('index.php?option=com_comprofiler&view=pluginclass&plugin=cbgroupjive&action=groups&Itemid=8706&id=[var2_params_revechoice]', false):'pages/[var2_params_revechoice]';
$reve = !empty('[var2_params_revetitle]')? \CBLib\Language\CBTxt::T( 'for_the_association', ' for the association ' ) . '<a href="'.$reve_url.'" target="blank">[var2_params_revetitle]</a>':'';
$variables['var3']=\CBLib\Language\CBTxt::T( 'activating', 'has activated ' ) . '<a class="btn btn-outline-primary fw-bolder font-weight-bolder" href="'.JRoute::_($url , false).'">'. $title .'</a>'.$com.$reve;
LAYOUT RETURN PHP
$variables['var3'] = $content . $variables['var3'];
$loc = $variables['var2']->params()->get( 'location' );
if (isset($loc['address']) && $loc['address'] == '') echo '<div class="text-danger small">Ajoutez le lieu de cette activation !</div>';
ACTION PHP
// CODE TO CONFIGURE NEW FEATURE BUTTON
$buttonName = 'streamInputActiv';
$buttonTarget = 'streamInputActivContainer';
$buttonDescription = 'Faire une nouvelle activation';
$buttonIcon = 'fa-sharp fa-solid fa-plus fa-lg px-2';
$inputName = 'activ';
$inputLabel = 'QUI ?';
$inputPlaceholder = 'une société ? un nom ?';
$locationPlaceholder = 'quelle est l\'adresse de ton activation ?';
$variables['var3']['buttons'] = '<button type="button" class="btn btn-light btn-sm p-0 streamToggle ' . htmlspecialchars( $buttonName ) . '" data-cbactivity-toggle-target=".streamInputUploadContainer,.' . htmlspecialchars( $buttonTarget ) . '" data-cbactivity-toggle-active-classes="bg-info" data-cbactivity-toggle-inactive-classes="btn-light" data-cbtooltip-tooltip="' . htmlspecialchars( $buttonDescription ) . '" data-hascbtooltip="true" data-cbtooltip-position-my="bottom center" data-cbtooltip-position-at="top center" data-cbtooltip-classes="qtip-simple"><span class="' . htmlspecialchars( $buttonIcon ) . '"></span></button>';
$substitutions = $action->substitutions();
$substitutions['input_name'] = htmlspecialchars( $inputName );
$substitutions['input_label'] = $inputLabel;
$substitutions['input_placeholder'] = htmlspecialchars( $inputPlaceholder );
$substitutions['input_class'] = htmlspecialchars( $buttonTarget );
$substitutions['input_location_placeholder'] = htmlspecialchars( $locationPlaceholder );
$action->substitutions( $substitutions );
ACTION HTML
<div class="border-top d-flex cb_form_line streamItemInputGroup [input_class] hidden">
<div class="d-block col-form-label flex-shrink-1 p-2 font-weight-bold text-primary streamItemInputGroupLabel">
[input_label]
</div>
<div class="flex-grow-1 streamItemInputGroupInput">
<div class="typeahead__company">
<input id="company" name="activ" type="search" autocomplete="off" class="form-control shadow-none border-0 w-100 streamInput" placeholder="[input_placeholder]" data-curpage="1" />
<div id="company_res" class="company_res" hidden><div class="close_res">X</div>
<ul hidden>
</ul>
<div class="ac_arrow_box">
<div class="ac_arrow_button ac_arrow_button_left">
<div class="ac_arrow_left">
<i class="fa-sharp fa-solid fa-arrow-left fa-lg"></i>
</div>
</div>
<div class="ac_arrow_button ac_arrow_button_right">
<div class="ac_arrow_right">
<i class="fa-sharp fa-solid fa-arrow-right fa-lg"></i>
</div>
</div>
</div>
<div id="pager_box" class="pl-5 ps-5">
<div class="pager-left">
Page
</div>
<div class="pager-leftcenter">
</div>
<div class="pager-rightcenter">
de
</div>
<div class="pager-right">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="d-flex cb_form_line streamItemInputGroup [input_class] hidden">
<div class="d-block col-form-label flex-shrink-1 p-2 font-weight-bold text-primary streamItemInputGroupLabel">
OU ?
</div>
<div class="flex-grow-1 streamItemInputGroupInput">
<div class="typeahead__location">
<input id="location" name="si_place" type="search" class="form-control shadow-none border-0 w-100 streamInput" placeholder="[input_location_placeholder]" autocomplete="off" />
<ul hidden>
</ul>
</div>
</div>
</div>
<div class="d-flex cb_form_line bg-light streamItemInputGroup [input_class] hidden">
<div class="flex-grow-1 streamItemInputGroupInput text-center text-muted ps-2 pl-2" id="previewloc">
</div>
</div>
<div class="d-flex cb_form_line bg-appli streamItemInputGroup small [input_class]">
<div class="flex-grow-1 px-1 py-0 small text-muted text-end text-right">
[cb:userfield field="cb_activ_cats" /]
</div>
</div>
<div class="d-flex flex-column cb_form_line bg-appli streamItemInputGroup [input_class]">
<div class="d-block col-form-label flex-shrink-1 pt-2 px-2 pb-0 font-weight-bold text-primary text-center streamItemInputGroupLabel">
EVENEMENT
</div>
<div class="flex-grow-1 pt-2 px-2 pb-0 text-center">
[cb:userfield field="cb_marketevents" /]
</div>
</div>
ACTION ONLINE CSS
.cb_template .activityContainerFooterRowLeft {
display: flex;
gap: 0.25rem;
flex-direction: row-reverse;
}
.cb_template .activityContainerContent {
display: flex;
/*gap: 0.25rem;*/
flex-direction: column-reverse;
background-color:#fafafa;
}
.cb_template .streamInputMessageContainer {
border-top: 1px solid #eee;
}
.cb_template .streamInputLocationContainer .streamItemInputGroupAddon {font-size:2rem;}
.cb_template .streamInputLocationContainerPlace > input,
.cb_template .streamInputLocationContainerAddress > input {
text-align:center; }
.cb_template .activityContainerNew .streamInputMessageContainer > textarea {
font-size: 1.5rem;
margin-top: 5px;
margin-bottom:5px;
text-align: center;
}
Please Log in to join the conversation.
I've listed all the triggers and their variables in my blog post. I exploded the $form array as well so you can see what it contains. Beyond that I don't know what you're asking.2) Then, where can I find the new codes for the new buttons in this second autoaction ?
$variables['var3']['buttons'][] = 'BUTTON_HERE';
Please Log in to join the conversation.