Post media?

thecrowlife 18 Nov, 2015
How do we post videos ( youTube ) ect on the forums?
Max_admin 20 Nov, 2015
Hi,

It's not possible to do this yet, but you can post a link.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jhebbel 20 Nov, 2015
1 Likes
Find /components/com_chronoforums/chronoforums/helpers/bbcode.php

after line 132 add:

            '/\[youtube\](.*?)\[\/youtube\]/msi',


after line 154 add:

            '<iframe width="560" height="315" src="https://www.youtube.com/embed/\1?showinfo=0" frameborder="0" allowfullscreen></iframe>',


This will interpret the BB code tage of [youtube]VIDEO ID[/youtube]

Give me a few more mins and ill post the changes needed to add corresponding button to the editor.
jhebbel 20 Nov, 2015
1 Likes
as promised the code to add the button to the editor:

Find /components/com_chronoforums/chronoforums/helpers/bbeditor.php

line 39 replace with:
[code]var bbtags = new Array('','','','','','','

','

','
','[ /code]','[list]','[/list]','[list=]','[/list]','Post media? image 1','','','[flash=]', '[/flash]','','','

This is private content

','[youtube]','[/youtube]');
- please remove the space in [ /code]

Insert after line 56:
<a title="<?php echo l_('CHRONOFORUMS_INSERT_YOUTUBE'); ?>: [youtube]youtube_video_id[/youtube]" onclick="bbstyle(24); return false;" name="addbbcode24" accesskey="v" class="btn btn-default btn-sm gcoreTooltip"><i class="fa fa-youtube-o fa-fw fa-lg"></i></a>


You are responsible for providing and setting your own button icon.
jhebbel 20 Nov, 2015
and based on the last post apparently these is a bug to report regarding escaping special chars in this forum....
jhebbel 20 Nov, 2015
line 39 that has the list of tags, just add '[youtube]','[/youtube]' to the end.
jhebbel 20 Nov, 2015
And the font they use to supply the button icons has a youtube icon already included so if you change the class from fa-youtube-o to read fa-youtube-play it will automatically add the buttons icon. If you add other video services icon class names can be found here: http://astronautweb.co/snippet/font-awesome/
Max_admin 09 Dec, 2015
Thanks for the changes, I have added this to the next update!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.