[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Bigbluebutton recordings: Convert tracker field options to array in...

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6929cef7e11d2_2a67b97782322a@gitlab-sidekiq-low-urgency-cpu-bound-v2-5df5c99858-hmw7f.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
041b9725 by Espoir Baraka at 2025-11-28T16:25:20+00:00
[FIX] Bigbluebutton recordings: Convert tracker field options to array in...
---
* [FIX] Bigbluebutton recordings: Convert tracker field options to array in BigBlueButton template rendering

See merge request tikiwiki/tiki!9114

- - - - -


3 changed files:

- lib/core/Tracker/Field/BigBlueButton.php
- templates/trackerinput/bigbluebutton.tpl
- templates/trackeroutput/bigbluebutton.tpl


Changes:

=====================================
lib/core/Tracker/Field/BigBlueButton.php
=====================================
@@ -127,7 +127,11 @@ class Tracker_Field_BigBlueButton extends \Tracker\Field\AbstractItemField imple
         // Parse current value (could be URL or JSON with cached data)
         $currentData = $this->parseStoredValue($currentValue);
 
-        $smarty->assign('field', $this->getFieldDefinition());
+
+        $smarty->assign('allow_multiple', $this->getOption('allow_multiple', 'n'));
+        $smarty->assign('show_playback_formats', $this->getOption('show_playback_formats', 'y'));
+        $smarty->assign('show_metadata', $this->getOption('show_metadata', 'y'));
+        $smarty->assign('meeting_filter', $this->getOption('meeting_filter', ''));
         $smarty->assign('input_mode', $inputMode);
         $smarty->assign('recordings', $recordings);
         $smarty->assign('current_value', $currentValue);
@@ -149,7 +153,8 @@ class Tracker_Field_BigBlueButton extends \Tracker\Field\AbstractItemField imple
             $recordingData = $this->getRecordingData($value);
         }
 
-        $smarty->assign('field', $this->getFieldDefinition());
+        $smarty->assign('show_playback_formats', $this->getOption('show_playback_formats', 'y'));
+        $smarty->assign('show_metadata', $this->getOption('show_metadata', 'y'));
         $smarty->assign('recording_data', $recordingData);
         $smarty->assign('value', $value);
 


=====================================
templates/trackerinput/bigbluebutton.tpl
=====================================
@@ -3,18 +3,18 @@
 {* Local server selection mode *}
 {if $input_mode eq 'local' || $input_mode eq 'both'}
     {if $recordings && count($recordings) > 0}
-        {if $field.options.allow_multiple eq 'y'}
+        {if $allow_multiple eq 'y'}
             {* Multiple selection mode *}
             <div class="bbb-recordings-container">
                 <label class="form-label">{tr}Select from local BBB server:{/tr}</label>
                 {foreach from=$recordings item=recording}
                     <div class="bbb-recording-item mb-3 p-3 border rounded">
-                        {include file="bigbluebutton/recording_display.tpl" 
-                                 recording=$recording 
-                                 show_actions=true 
+                        {include file="bigbluebutton/recording_display.tpl"
+                                 recording=$recording
+                                 show_actions=true
                                  input_name=$ins_id
-                                 show_formats=$field.options.show_playback_formats
-                                 show_metadata=$field.options.show_metadata}
+                                 show_formats=$show_playback_formats
+                                 show_metadata=$show_metadata}
                     </div>
                 {/foreach}
             </div>
@@ -33,16 +33,16 @@
                                 {/if}
                             {/foreach}
                         {/if}
-                        <option value="{$recordUrl|escape}" 
+                        <option value="{$recordUrl|escape}"
                                 data-recording='{$recording|@json_encode}'
                                 {if $current_data.url eq $recordUrl}selected="selected"{/if}>
-                            {$recording.meetingName|escape|default:"Recording"} - 
+                            {$recording.meetingName|escape|default:"Recording"} -
                             {if $recording.startTime}{$recording.startTime|tiki_long_date} {$recording.startTime|tiki_short_time}{/if}
                         </option>
                     {/foreach}
                 </select>
             </div>
-            
+
             {* Simple preview for selected recording *}
             <div id="bbb-preview-{$ins_id}" class="mt-2 p-2 border rounded bg-light" style="display:none;">
                 <small class="text-muted d-block mb-1" id="bbb-preview-title-{$ins_id}"></small>
@@ -54,8 +54,8 @@
     {elseif $input_mode eq 'local'}
         <div class="alert alert-info">
             {tr}No BigBlueButton recordings found.{/tr}
-            {if $field.options.meeting_filter}
-                <br><small>{tr}Meeting filter:{/tr} {$field.options.meeting_filter|escape}</small>
+            {if $meeting_filter}
+                <br><small>{tr}Meeting filter:{/tr} {$meeting_filter|escape}</small>
             {/if}
         </div>
     {/if}
@@ -73,10 +73,10 @@
 {if $input_mode eq 'url' || $input_mode eq 'both'}
     <div class="mb-3">
         <label class="form-label">{tr}Enter BBB Recording URL:{/tr}</label>
-        <input type="text" 
-               name="{$ins_id}_url" 
-               class="form-control" 
-               placeholder="https://bbb.example.com/playback/presentation/2.3/abc123..." 
+        <input type="text"
+               name="{$ins_id}_url"
+               class="form-control"
+               placeholder="https://bbb.example.com/playback/presentation/2.3/abc123..."
                value="{if $current_data.url && $input_mode eq 'url'}{$current_data.url|escape}{/if}">
         <small class="form-text text-muted">
             {tr}Enter the full URL of a BigBlueButton recording from any BBB server{/tr}
@@ -92,18 +92,18 @@
             {* Use shared template with metadata *}
             {assign var="recording" value=$current_data.metadata}
             {assign var="recording.url" value=$current_data.url}
-            {include file="bigbluebutton/recording_display.tpl" 
-                     recording=$recording 
-                     show_actions=false 
-                     show_formats=$field.options.show_playback_formats
-                     show_metadata=$field.options.show_metadata}
+            {include file="bigbluebutton/recording_display.tpl"
+                     recording=$recording
+                     show_actions=false
+                     show_formats=$show_playback_formats
+                     show_metadata=$show_metadata}
         {else}
             {* Use shared template for URL without metadata *}
             {assign var="recording" value=[]}
             {assign var="recording.url" value=$current_data.url}
-            {include file="bigbluebutton/recording_display.tpl" 
-                     recording=$recording 
-                     show_actions=false 
+            {include file="bigbluebutton/recording_display.tpl"
+                     recording=$recording
+                     show_actions=false
                      url_only=true
                      show_url_info=true}
         {/if}
@@ -128,7 +128,7 @@ $('.bbb-recording-select').on('change', function() {
     var previewContainer = $('#bbb-preview-{$ins_id}');
     var previewTitle = $('#bbb-preview-title-{$ins_id}');
     var previewLink = $('#bbb-preview-link-{$ins_id}');
-    
+
     if (recordingData && selectedOption.val()) {
         var title = recordingData.meetingName || '{tr}Recording{/tr}';
         if (recordingData.startTime) {


=====================================
templates/trackeroutput/bigbluebutton.tpl
=====================================
@@ -6,23 +6,23 @@
             {* Use shared template with metadata *}
             {assign var="recording" value=$recording_data.metadata}
             {assign var="recording.url" value=$recording_data.url}
-            {include file="bigbluebutton/recording_display.tpl" 
-                     recording=$recording 
-                     show_actions=false 
-                     show_formats=$field.options.show_playback_formats
-                     show_metadata=$field.options.show_metadata}
+            {include file="bigbluebutton/recording_display.tpl"
+                     recording=$recording
+                     show_actions=false
+                     show_formats=$show_playback_formats
+                     show_metadata=$show_metadata}
         {else}
             {* Use shared template for URL without metadata *}
             {assign var="recording" value=[]}
             {assign var="recording.url" value=$recording_data.url}
-            {include file="bigbluebutton/recording_display.tpl" 
-                     recording=$recording 
-                     show_actions=false 
+            {include file="bigbluebutton/recording_display.tpl"
+                     recording=$recording
+                     show_actions=false
                      url_only=true
                      show_url_info=false}
         {/if}
     </div>
 {else}
-    {include file="bigbluebutton/recording_display.tpl" 
+    {include file="bigbluebutton/recording_display.tpl"
              show_empty_message=true}
 {/if}



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/041b972522067dec15849d832ead8c4e4e9bd729

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/041b972522067dec15849d832ead8c4e4e9bd729
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.