Well, that’s a pity because your whole system and auto actions typically would bring low tech users like me to develop small things easily with some kind of bricks brought together.
As I said I don’t have developers to do this at a reasonable price, that’s why I try myself.
For now it seems like all could be handled by CB and that would be great if I can achieve it without relying to external peoples
We’ll see if we grow and raise capital but for now I just cannot afford it
I’ll try to go the query way to add the multimedia files but in the meantime I may have another idea :
1 - Users add new activities with a button named 'campaign' allowing them to link multimedia video from external website. (I have already the button thanks to your guide)
2 - Then I have a query autoaction creating an event and adding the activity asset in the event params.
3 - Next step is to display the activity with gj_onDisplayEvent as a stream without creation abilities and the asset from point 3. The linked video is correctly shown in the footer of the event.
4 - Now, interested users subscribe to this event and I'd like to be able to display the linked video somewhere.
For now I have a CB query drop down field with :
Code:
SELECT e.* FROM `#__groupjive_plugin_events` AS e JOIN `#__groupjive_plugin_events_attendance` AS a on a.`user_id` = '[user_id]' AND a.`event` = e.`id` JOIN `#__groupjive_groups` AS b ON b.`id` = e.`group` AND ( b.`category` = '13' OR b.`id` = '56' ) ORDER BY e.`params`ASC
and when an activity with the activation button is done with a selected drop down, it is now registered in params event and displayed by :
Code:
$marketevents = $action->string( $user,'[var1_params_event]');
if ($marketevents > 0) {
$db = JFactory::getDbo();
$query = $db->getQuery();
$query="SELECT id FROM `yq0g1_groupjive_plugin_events_attendance` WHERE `user_id` = ".$user_id." AND `event` = ".$marketevents;
$db->setQuery($query);
$eventat = $db->loadResult();
if ($eventat) {
$query = "SELECT * FROM `yq0g1_groupjive_plugin_events` WHERE `id` =". $marketevents;
$db->setQuery($query);
$event=$db->loadObject();
print_r($event);
$displayevent = $event->event;
//Choose the right category if it's for individuals or pros.
$cat = null;
$cats = json_decode($event->params);
$cat = $cats->drophscat;
// print_r($cat);
if ($cat == '10') $value = "Professionnels";
if ($cat == '20') $value = "Particuliers";
if ($cat == '30') $value = "Tout public";
if ($cat == '50') $value = "Campagnes souhaitées";
//set multiplier to default or check fo display
$groups = JAccess::getGroupsByUser($event->user_id);
if (in_array(18, $groups) && $event->group != 56){
$mfl = $cbUser->replaceUserVars ('[cb:userdata field="cb_marketing_multiplier" user="' . $event->user_id . '" /]');
} else $mfl = 2;
}
}
<div class="row">
<div class="col col-sm-11 col-md-10 col-lg-8 mx-auto mt-0 mb-5">
<div class="mx-1">
<?php
//run the content through the onContentPrepare Joomla event,
$params = new JRegistry();
$params->loadString("");
$content = new StdClass;
$content->text = $event->event;
JFactory::getApplication()->triggerEvent('onContentPrepare', array("", &$content, &$params, 0));
echo $content->text;
//echo $event->text;
?>
</div>
</div>
</div>
Starting from this point, how can I retrieve the first linked multimedia file added in the related activity to the event chosen instead of using the event content ?
If I can do this, that would simplify all and allow me to only use CB Activity combined with GroupJive for our entire process.
This whole step allows users to select an event with a linked video
The second step
www.joomlapolis.com/forum/255-developer-members-support/244490-cb-activity-new-use-for-spots-display
allows them to "activate" something with this chosen video.
This second step seems ok with all the information and help that you provided.
So I am only left with this first step to implement and some validations done with CB 6