Custom BBCodes [Deprecated]

Get help developing custom BBCodes or request one.
ZImboDood
Registered User
Posts: 2
Joined: Tue May 22, 2012 9:32 am

Re: Custom BBCodes

Post by ZImboDood »

I had originally posted in mods request section, but perhaps this is a better place, please help, need asap.

Hi there

I am really new to this so i hope you guys will go easy on the NooB. i have used the search but cant seem to find an answer, lol, maybe im just blind.

I want to be able to allow certain user groups on a forum to embed videos from the site http://www.hd-trailer.net an example of the embed code i get is :

Code: Select all

<iframe src="http://www.hd-trailers.net/embed/skyfall/3-trailer-no-1-720p/" width="1280px" height="740px"></iframe>
Hope someone can help!!
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Custom BBCodes

Post by Lumpy Burgertushie »

you can create a bbcode for that but it will probably ruin your board layout because you have the size so big.

why not just post the link instead of trying to use the iframe.

like this:
http://www.hd-trailers.net/embed/skyfal ... no-1-720p/

that way someone can post the link and if anyone wishes to view it they simly click on the link.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Thumper1337x
Registered User
Posts: 63
Joined: Tue Sep 27, 2011 6:46 pm

Re: Custom BBCodes

Post by Thumper1337x »

VEG wrote:phpBB [video]: universal video-bbcode (without code changes) supports veevr.com and yapfiles.ru now.
this is not working anymore for veevr.com :( any idea how to fix it?
Regards,
Thumper
Thumper1337x
Registered User
Posts: 63
Joined: Tue Sep 27, 2011 6:46 pm

Re: phpBB [video]: universal video-bbcode (without code chan

Post by Thumper1337x »

VEG wrote:We are glad to present you a new universal BBCode "phpBB [video]" which is compatible with both phpBB and phpBBex. To install you do not need to edit any files, it can be added through the admin panel.

Usage example

The user copies the URL of the page of the video and inserts it between the [video][/video]:

Code: Select all

[video]http://vimeo.com/40558553[/video]
or (with size specified):

Code: Select all

[video=640,360]http://vimeo.com/40558553[/video]
The message is displayed as follows (it's an image, live phpBB [video] demo on my forum):
Image

Supported video services

Currently the following video services are supported:
  • youtube.com (youtu.be) - playlists are also supported
  • vimeo.com
  • rutube.ru — it is recommended to use the URL from the embed code
  • vk.com (vkontakte.ru) — the URL from the embed code is required
  • facebook.com
  • metacafe.com
  • clipfish.de
  • veevr.com
  • video.mail.ru
  • smotri.com
  • video.qip.ru
  • video.google.com
  • video.yandex.ru — the URL from the embed code is required
  • video.bigmir.net
  • tvigle.ru — the URL from the embed code is required
  • video.online.ua
  • video.sibnet.ru
  • yapfiles.ru
URLs do not need to be cleaned from the garbage arguments as our [video] will work it out. You can use both the URL of the video page and the URL of the embed code (unless other instructions are given).

In the nearest future the following video services will be supported:
  • vision.rambler.ru
  • intv.ru
  • lovi.tv
  • webm, mp4 and flv video files
It is convenient that our bbcode is updated and new services are supported automatically. If our BBCode doesn't support the needed video service, we will be happy to add it. In this topic, please provide the URL of the page of the video with the video service you're interested in and the embed code. It will help us to add support of the service. If the new video service is demanded we will soon add the support to our video-bbcode.

Installation of [video] (with fixed size)

1. Admin panel, tab "Posting", page "BBCodes", add BBCode (if you already have a [video] then delete it).
2. In the field "BBCode usage" enter:

Code: Select all

[video]{URL}[/video]
3. In the field "HTML replacement" enter (you can only change the width and height of the layer!):

Code: Select all

<div class='bbvideo' data-url='{URL}' style='width: 640px; height: 390px; margin: 2px 0; display: inline-block; background: #000; color: #fff; overflow: hidden; vertical-align: bottom;'><div style='height: 100%;'><script>if (typeof bbmedia == 'undefined') { bbmedia = true; var e = document.createElement('script'); e.async = true; e.src = 'http://phpbbex.com/api/bbmedia.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s); }</script></div><div style='text-align: right; height: 14px; margin-top: -14px; padding-right: 2px; font: 10px/10px Verdana; color: #555;'><a style='color: #105289; text-decoration: none;' href='http://phpbbex.com/' target='_blank'>phpBB</a> &#91;video&#93;</div></div>
4. In the field "Help line" enter:

Code: Select all

Insert video: [video]http://youtube.com/url[/video]
5. Set the checkbox "Display on posting" and save the form. Done!

Installation of [video=width,height] (in addition to the previous)

1. Admin panel, tab "Posting", page "BBCodes", add BBCode (if you already have a [video=] then delete it).
2. In the field "BBCode usage" enter:

Code: Select all

[video={NUMBER1},{NUMBER2}]{URL}[/video]
3. In the field "HTML replacement" enter (no change!):

Code: Select all

<div class='bbvideo' data-url='{URL}' style='width: {NUMBER1}px; height: {NUMBER2}px; margin: 2px 0; display: inline-block; background: #000; color: #fff; overflow: hidden; vertical-align: bottom;'><div style='height: 100%;'><script>if (typeof bbmedia == 'undefined') { bbmedia = true; var e = document.createElement('script'); e.async = true; e.src = 'http://phpbbex.com/api/bbmedia.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s); }</script></div><div style='text-align: right; height: 14px; margin-top: -14px; padding-right: 2px; font: 10px/10px Verdana; color: #555;'><a style='color: #105289; text-decoration: none;' href='http://phpbbex.com/' target='_blank'>phpBB</a> &#91;video&#93;</div></div>
4. In the field "Help line" enter:

Code: Select all

Insert video: [video=width,height]http://youtube.com/url[/video]
5. Save the form. Done!

Links

English language demo of phpBB [video]
Russian language support of phpBB [video]
Its not working anymore [for veevr.com]... i see this : http://i.imgur.com/e8uch.png

any idea?
Regards,
Thumper
User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: Custom BBCodes

Post by muggins »

In reference to this post...
muggins wrote:Well, crud. :?

I really should do that, eh? I don't try to make many changes to my site any more, so my coding skills are soggy and hard to light. :mrgreen:
I tested the script and it works as advertised.

http://saposjoint.net/Lab/countdown.html

Any ideas how to make it into a simple bbcode?
Muggins
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Custom BBCodes

Post by Lumpy Burgertushie »

how is that script working? it says it is only one day until tuesday and yet, today is thursday.

robertt
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: Custom BBCodes

Post by muggins »

Because I can't read? :oops:

I'll edit it, all quick-like.
Muggins
User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: Custom BBCodes

Post by muggins »

Bump?
Muggins
#Darren
Registered User
Posts: 206
Joined: Mon Jun 05, 2006 5:18 pm

Re: Custom BBCodes

Post by #Darren »

Hi all,

I just added the youtube tags (for full url), but seem to have some problems.

The url often has a different code in it depending how you access it. For instance I accessed a vid from a US website and then I accessed same vid from the side panel (which shows multiple vids) on the youtube site. Both these gave me different youtube url codes, and only one (from the external website) of the two worked.

Any advice welcome :)
grimeyone
Registered User
Posts: 8
Joined: Fri Jan 06, 2012 7:05 pm

Re: Custom BBCodes

Post by grimeyone »

I've been trying fruitlessly to get this to work, so I think it's time I throw in the towel and ask for help. I'm trying to make an iframe bbcode to embed this:

Code: Select all

<div style="background:#000;width:350px; height:260px;font:0px sans-serif;text-align:left;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="cdtw" width="350" height="240" style="outline:none"><param name="movie" value="http://cdn.countingdownto.com/c/w.swf" /><param name="flashvars" value="eid=100879" /><param name="allowscriptaccess" value="always" /><param name="bgcolor" value="#000000" /><embed name="cdtw" src="http://cdn.countingdownto.com/c/w.swf" flashvars="eid=100879" type="application/x-shockwave-flash" width="350" height="240" allowscriptaccess="always" bgcolor="#000000" style="outline:none"></embed></object><br/> <a href="http://countingdownto.com" style="font:bold 8px Arial;padding-left:19px;color:#444;">HTTP://COUNTINGDOWNTO.COM</a></div>
Any help would be most appreciated.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Custom BBCodes

Post by Lumpy Burgertushie »

grimeyone wrote:I've been trying fruitlessly to get this to work, so I think it's time I throw in the towel and ask for help. I'm trying to make an iframe bbcode to embed this:

Code: Select all

<div style="background:#000;width:350px; height:260px;font:0px sans-serif;text-align:left;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="cdtw" width="350" height="240" style="outline:none"><param name="movie" value="http://cdn.countingdownto.com/c/w.swf" /><param name="flashvars" value="eid=100879" /><param name="allowscriptaccess" value="always" /><param name="bgcolor" value="#000000" /><embed name="cdtw" src="http://cdn.countingdownto.com/c/w.swf" flashvars="eid=100879" type="application/x-shockwave-flash" width="350" height="240" allowscriptaccess="always" bgcolor="#000000" style="outline:none"></embed></object><br/> <a href="http://countingdownto.com" style="font:bold 8px Arial;padding-left:19px;color:#444;">HTTP://COUNTINGDOWNTO.COM</a></div>
Any help would be most appreciated.
if this is not going to change then here is what to do:

in the first box put exctly this:
[count][/count]

in the html replacement box put this:

Code: Select all

<div style="background:#000;width:350px; height:260px;font:0px sans-serif;text-align:left;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="cdtw" width="350" height="240" style="outline:none"><param name="movie" value="http://cdn.countingdownto.com/c/w.swf" /><param name="flashvars" value="eid=100879" /><param name="allowscriptaccess" value="always" /><param name="bgcolor" value="#000000" /><embed name="cdtw" src="http://cdn.countingdownto.com/c/w.swf" flashvars="eid=100879" type="application/x-shockwave-flash" width="350" height="240" allowscriptaccess="always" bgcolor="#000000" style="outline:none"></embed></object><br/> <a href="http://countingdownto.com" style="font:bold 8px Arial;padding-left:19px;color:#444;">HTTP://COUNTINGDOWNTO.COM</a></div>
don't change anything.

now I assume that you do not want just anyone to be using this so you don't need to put anything in the help line and you really don't need to click the box to show it in the posting page.
If only you are going to be able to use it, then all you have to do is type in the bbcode like this:
[count][/count] and that is it.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
grimeyone
Registered User
Posts: 8
Joined: Fri Jan 06, 2012 7:05 pm

Re: Custom BBCodes

Post by grimeyone »

You are a frickin' wizard! Man, I am stunned by your awesomeness. :)

It worked perfectly, thank you.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Custom BBCodes

Post by Lumpy Burgertushie »

grimeyone wrote:You are a frickin' wizard! Man, I am stunned by your awesomeness. :)

It worked perfectly, thank you.
some are born with awsomeness and others have it thrust upon them.....
I think I just had some thrust my way.

just kidding...

thanks and glad it worked for you.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
noggin
Registered User
Posts: 38
Joined: Sat Jul 14, 2012 7:41 am

Re: Custom BBCodes

Post by noggin »

Hi
My board doesn't provide or allow a 'links' or 'url' BBCode.
Any way you can provide me with one (the code and html replacement) that I can add to my board ?
Thanks
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26502
Joined: Fri Aug 29, 2008 9:49 am

Re: Custom BBCodes

Post by Mick »

noggin wrote:My board doesn't provide or allow a 'links' or 'url' BBCode
What do you mean, they're part of a vanilla install? Please explain what you mean by 'allow'?
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Locked

Return to “Custom BBCode Development and Requests”