Friday Madness

40%

Grab Discount
Mon. - Fri. 9 am - 5 pm Ask a Question
Remember me

All Video Share Shortcode | Zero App Field Embed Video

1 week 3 days ago #1

  • BiLe's Avatar
  • BiLe
  • Posts: 205
Hello,

I would like to embed a video using just a shortcode: {avsplayer videoid=1}

The third party extension I would like to use is called All Video Share.

With Zero App Field, I have tried Text and Textarea, but the shortcode is not being processed. Output is just plain text. Is there any way to support such shortcodes (prepare content => YES), just as if I would place the shortcode in a regular Joomla 4 article?

Thank you.

1 week 3 days ago #2

  • BiLe's Avatar
  • BiLe
  • Posts: 205
For example, regularlabs sourcerer shortcode does work with field text or textarea, which is nice:
{source}<?php echo 'Hello World'; ?>{/source}

1 week 3 days ago #3

  • BiLe's Avatar
  • BiLe
  • Posts: 205

1 week 3 days ago #4

  • BiLe's Avatar
  • BiLe
  • Posts: 205
Using regularlabs sourcerer I have tried the following with zero app => textarea field => code editor:
{source}
<?php
$videotext = '{avsplayer videoid=1}';
$videotext = JHtml::_('content.prepare', $videotext);
echo $videotext;
?>
{/source}

This will crash the single post layout site.

Any way I can make this work for now?
Otherwise, my projekt is doomed :)

Maybe add new field type "content"?

Or would it work if I add code at the file: packages/site/helpers/fields.php

Line 646
$value= JHtml::_('content.prepare', $value);
$html .= $this->renderTextarea($field, $options, $value);

Thank you.

1 week 2 days ago #5

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 20435
Hello,
Thank you for contacting us

You need in the file gridbox.php(/components/com_gridbox/helpers/gridbox.php)
Line 7084
find the code
$str = $value->value;
replace with this code
$str = JHtml::_('content.prepare', $value->value);

Regards,
Vyacheslav, Balbooa.com

1 week 2 days ago #6

  • BiLe's Avatar
  • BiLe
  • Posts: 205
Craaaazy...it's working.

Now we can actually use third party shortcodes and e.g. use a zero app text field to display third party extension with single zero app items. This is what I call flexibility :)

You might want to consider making this an option (prepare content) with text/textarea or add additional zero app field (content).

Happy. Thank you.
                } else if ($value->field_type == 'text') {
                    //$str = htmlspecialchars($value->value);
                    $str = JHtml::_('content.prepare', $value->value);
                }

1 week 2 days ago #7

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 20435
We will add this in the future.

Best Regards,
Vyacheslav, Balbooa Support Team

1 week 11 hours ago #8

  • BiLe's Avatar
  • BiLe
  • Posts: 205
Please allow me to add the following suggestions:

Additional Zero App fields...

1. load gallery (specific id as number)
2. load forms (specific id as number)
3. load module (specific id as number)

This way we could use Balbooa Forms and PHP (frontend) to place user specific e.g. gallery or form (poll) with Zero App field for a single record.

4 days 21 hours ago #9

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 20435
Hello,
Thank you for contacting us

We will consider your offer

Regards,
Vyacheslav, Balbooa.com
Powered by Kunena Forum