Can someone help me to share a tutorial how to add manually website for this extention (https://discuss.flarum.org/d/647-s9e-mediaembed-embed-videos-and-third-party-content/315)?

i am already make composer.json and bootstrap.php (edit from https://github.com/s9e/flarum-ext-mediaembed) file but dont know the next step, its already finish and need to upload to flarum extention? but dont know how

i already upload it to https://github.com/akmaljp/drivemaru

    maruco If you only want to add it for your installation, you can use the new extend.php in the Flarum root (where the public and vendor folders are) and put the PHP code that adds the website to Mediaembed there.

    maruco There's an easier way to do that.
    The following code should work. I haven't tested it.
    Put it in the Flarum root extend.php (or create it if it doesn't exist).

    use Flarum\Extend;
    use Flarum\Formatter\Formatter;
    
    return [
      (new Extend\Formatter)
        ->configure(function (Configurator $config) {
          $config->MediaEmbed->add(
            'DriveMaru',
            [
              'host'    => 'drive.akumaru.com',
              'extract' => "!drive\\.akumaru\\.com/play/h(?'id'[-0-9A-Z_a-z]+)!",
              'iframe'  => ['src' => 'http://drive.akumaru.com/video/{@id}']
            ]
          );
        })
    ]

      datitisev can you explain this code a little bit more. I am interested in doing something similar so that I can add Caltopo embedded maps to my website.

        datitisev Put it in the Flarum root extend.php (or create it if it doesn't exist).

        doesnt work when i put that code in extend.php in Flarum root sir. please help.

        cc: @JoshyPHP yPHP

          4 years later

          bachmx see datitisev , it should still work with the latest Flarum version.

          Do you have an issue or get an error message? Can you share the code you tried so far?