Welcome to the 42 Amsterdam multiserver.
Results 1 to 1 of 1
  1. #1

    vBulletin - how to add support for mp4 videos

    Hi everyone

    Here is a short tutorial for those who hosts VBulletin forum


    ===============
    Step 1:
    ===============


    Open database of your forum
    Locate table "bbcode_video" and add new record
    manually or use this query:

    Code:
    INSERT INTO `bbcode_video` (`tagoption`, `provider`, `url`, `regex_url`, `regex_scrape`, `embed`, `priority`) VALUES ('extern_video_mp4', 'External Video Link', 'http://trump.president.gov', 'https?:\\/\\/(.*\\.mp4.*)', '', '<video src="//{vb:raw code}"></video>', 0);
    it should look like this (last record)
    parameter "url" seems to do absolutely nothing - but it should be set nonetheless ...

    Name:  20210317d3LxJ8NF.jpg
Views: 0
Size:  127.1 KB



    ===============
    Step 2:
    ===============


    Open your admin control panel
    Locate "Styles & Templates"

    Name:  20210317L7S27Rhw.png
Views: 0
Size:  5.4 KB

    Click "Style Manager" and find correct style used by your forum (or do it for all ....if you allow style change for users)
    Select "Edit Templates"

    Name:  202103176Whf78la.png
Views: 0
Size:  44.1 KB

    Locate "BB Code Layout Templates"

    Name:  20210317nB22R56W.png
Views: 0
Size:  26.3 KB

    Double click on "bbcode_video" section to edit it

    Name:  20210317Bjhe8kDz.png
Views: 0
Size:  18.7 KB

    You'll get a page that looks like this:

    Name:  20210317LeKaQju2.jpg
Views: 0
Size:  149.5 KB

    add rendering section for new provider type:

    Code:
    <vb:elseif condition="$provider == 'extern_video_mp4'" />	
    	<video controls style="max-width:900px;max-height:600px">
    	    <source src="{vb:raw url}">
    	    Sorry, your browser doesn't support embedded videos.
    	</video>
    so that it looks like this:

    Name:  202103170eRy1EL3.jpg
Views: 0
Size:  159.0 KB

    Done ! ....save and try it out !!!


    Last edited by Ostap; 17-03-2021 at 18:56.
    ....... Always Look On The Bright Side of Life

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Back to top