The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Change code for YouTube

View previous topic View next topic Go down

Solved Change code for YouTube

Post by smurfavr on June 11th 2017, 12:36 pm

This code automatically adds YouTube videos by adding a link to a theme.

How do I make the code do the same for this site? https://www.vbox7.com/

Code:
$(function () {
    // Auto youtube transform
    // Hancki - FdF
    $('.post-entry a, .postbody .content a, .postbody a').html(function (i, html) {
        return html.replace(/(?:https:\/\/)?(?:http:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=)?(.+)/g, '<iframe width="420" height="345" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>');
    });
});


Last edited by smurfavr on June 16th 2017, 11:00 am; edited 1 time in total
avatar
smurfavr
Active Poster

Male Posts : 1513
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Change code for YouTube

Post by Draxion on June 11th 2017, 1:40 pm

Hi there and good morning!

Where did you get that code? If you didn't get it from here, you may have to contact the person who wrote it for that question.


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 1188
Reputation : 174
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

Solved Re: Change code for YouTube

Post by smurfavr on June 11th 2017, 1:58 pm

avatar
smurfavr
Active Poster

Male Posts : 1513
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Change code for YouTube

Post by skouliki on June 11th 2017, 2:16 pm

you are using many codes from that forum and most of them seems to be having issues with your forum
http://help.forumotion.com/t153077-vbox7-by-hotrofm
http://help.forumotion.com/t153089-the-code-hides-the-login-button-in-the-admin-panel
http://help.forumotion.com/t153091-change-code-for-youtube

are you sure all codes are for your forum version? as i suggested before the best solution is to ask the author of that code in the forum you mentioned
avatar
skouliki
Graphic Designer
Graphic Designer

Female Posts : 2512
Reputation : 396
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Change code for YouTube

Post by SarkZKalie on June 11th 2017, 2:20 pm

Use YouTube bbcode, man! Stop being a lazy guy :v
avatar
SarkZKalie
Forumember

Male Posts : 555
Reputation : 87
Language : English

http://rotavn.nstars.org/

Back to top Go down

Solved Re: Change code for YouTube

Post by smurfavr on June 11th 2017, 2:25 pm

skouliki
The codes work for my forum just want to make minor changes to them.

SarkZKalie
I want to use another site other than Jetubbe, please if you can not help not write in a topic.
avatar
smurfavr
Active Poster

Male Posts : 1513
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Change code for YouTube

Post by SLGray on June 11th 2017, 8:28 pm

The topic was posted in the wrong section, so I have moved it to the correct section.
Please read our forum rules: ESF General Rules
Can you not use the flash button for that site?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 38763
Reputation : 2606
Language : English
Location : United States

http://classifiedads.forumotion.com/

Back to top Go down

Solved Re: Change code for YouTube

Post by smurfavr on June 11th 2017, 11:02 pm

@SLGray wrote:
Can you not use the flash button for that site?

No.
avatar
smurfavr
Active Poster

Male Posts : 1513
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Change code for YouTube

Post by vietkanpy on June 16th 2017, 7:44 am

Code:
$(function () {
    $('.post-entry a, .postbody .content a, .postbody a').html(function (i, html) {
        return html.replace(/(?:https:\/\/)?(?:http:\/\/)?(?:www\.)?(?:vbox7\.com)\/(?:play\:)?(.+)/g, '<iframe width="420" height="345" src="https://www.vbox7.com/emb/external.php?vid=$1" frameborder="0" allowfullscreen></iframe>');
    });
});
avatar
vietkanpy
Forumember

Male Posts : 56
Reputation : 24
Language : vietnam

http://www.hotrofm.net/

Back to top Go down

Solved Re: Change code for YouTube

Post by smurfavr on June 16th 2017, 11:00 am

Thank you vietkanpy.
avatar
smurfavr
Active Poster

Male Posts : 1513
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: Change code for YouTube

Post by Draxion on June 16th 2017, 11:17 am

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 1188
Reputation : 174
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum