datitisev Just FYI about this suggestion to JoshyPHP. You may want to make a decision on adding configuration options or not, and put that in the OP.
FriendsOfFlarum Formatting
jordanjay29 I feel like I'm being dumb, but your message is not registering in ma brain . Could you clarify, please?
datitisev There's a lot of user requests for specific sites in that thread. If JoshyPHP marks his mediaembed extension abandoned in favor of yours, those requests are likely to come here (see the example above).
If you're not going to support them, it'd be best to decide now before you have a flood of them.
jordanjay29 Ah, I see. The issue is that I haven't decided what to do yet. I wanted to keep this extension simple, but if I start adding configuration options, then I can also add other plugins that require configuration.
For YouTube embed videos extension:
I think would be cool and more clean if you can remove the related videos with the ?rel=0 or &rel=0 parameter.
neogeo That would require, as mentioned earlier, configuration options. The embed templates are all provided by the TextFormatter MediaEmbed plugin by default, with no configuration required.
As mentioned in https://discuss.flarum.org/d/18535-add-mannualy-website-for-s9e-mediaembed/4, you would probably want to change the template yourself following the instructions at https://s9etextformatter.readthedocs.io/Plugins/MediaEmbed/Change_template/ to change the YouTube template.
If I add the possibility to configure MediaEmbed extensively, then I'd probably have to add it for the rest of the plugins. I think the best way to configure the plugins for now is just to use the Flarum root extend.php
feature that was introduced in beta 8.
you would probably want to change the template yourself following the instructions at https://s9etextformatter.readthedocs.io/Plugins/MediaEmbed/Change_template/ to change the YouTube template.
datitisev Thanks for reply. Do you know which/where is this file/path to modify it? I can't found it...
neogeo In beta 8, a feature was added that lets you have an extend.php file on the Flarum root folder, similar to extensions. This extend.php file always loads, and unlike an extension, doesn't have to be enabled. It works the same as an extension's extend.php
.
You may have to create the file if you didn't create it when migrating from beta 7 to beta 8.
datitisev for me is difficult use the extend.php file for that (I'm not programmer)
I just prefer add the ?rel=0
parameter after the youtube url video. So I imagine there is a template created for that inside the extension... but I can't find the exact file to modify on .../vendor/s9e/text-formatter/src
- Edited
neogeo You should not be editing vendor files... and besides, you'd have to edit (i think) src/Bundles/MediaPack/Renderer.php
which just opening would probably crash your editor... see what i mean at https://github.com/s9e/TextFormatter/blob/master/src/Bundles/MediaPack/Renderer.php
datitisev Holy crap, that code could use some major re-working. I work for a software engineering company and I've seen some pretty poorly designed code in the company but that right there is way worse.
datitisev tankerkiller125 I would like a simple and flexible Youtube/Vimeo embed extension with the option of activate or not some of these paramenters:
https://developers.google.com/youtube/player_parameters?hl=es-419#Parameters
Developers each have different goals. Some try to achieve readable and beautiful code, others want code to be performant. The s9e lib is created with performance in mind and does so well.
neogeo my comment was intended for tankerkiller125
tankerkiller125 I work for a software engineering company
Then you should see that this file is obviously generated
For reference : https://github.com/s9e/TextFormatter/blob/master/scripts/generateBundles.php
(I think we're off-topic)
matteocontrini Hm, yeah, but that probably generates it only for the dev before publishing.
But you are correct, I personally don't think this is in the scope of the extension. And if I ever do add the functionality, it will probably be limited, as allowing all options will most likely confuse regular Flarum users with no coding and/or RegExp knowledge.
Please continue the discussion on adding sites to MediaEmbed at https://discuss.flarum.org/d/18535-add-mannualy-website-for-s9e-mediaembed, thank you
rob006 I never said I was a software engineer, I do work in PHP in my spare time, however, I am no software engineer, I maintain all the servers and infrastructure for the company, not the code base.