Custom BBCodes [Deprecated]

Get help developing custom BBCodes or request one.
BarX
Registered User
Posts: 1
Joined: Fri Jan 13, 2012 2:36 am

Re: Custom BBCodes

Post by BarX »

Hello. My name is Dave and recently I have added some newly custom BBCodes which support "Spoiler" titles and three types of warning boxes. The first type of warning box I've added was the Standard red box described here;

Image

They all use the same HTML Replacement coding in order to execute these tags, as described below (the only things that aren't the same is the HEX colors)

BB Usage

Code: Select all

[warning]{TEXT}[/warning]
[question]{TEXT}[/question]
info[{TEXT}[/info]
HTML Replacement;

Code: Select all

<table style='margin:0;width:450px;min-height:100px;border:1px dashed #740000;'><tr><td align='middle' bgcolor='#ff6060' valign='center' width='1%'><br /><FONT color='#ffffff' size='+7'><b> ! </b></font><br /></td>
<td valign='top' cellpadding="5" style='background:#F2DDDD' >{TEXT}</td>
</tr></table>
We also recently added the [spoiler=] BBCodes as well using the following for it's execution;

BB Usage

Code: Select all

[spoiler={TEXT2}]{TEXT1}[/spoiler]
HTML Replacement

Code: Select all

<dl class="codebox"><dt>{TEXT2} | <a href="javascript: void(0);" onclick="var spoiler = this.parentNode.parentNode.getElementsByTagName('dd')[0]; if ( spoiler.style.display == 'none' ) { spoiler.style.display = 'block'; this.innerHTML = '-'; } else { spoiler.style.display = 'none'; this.innerHTML = '+'; };">+</a></dt><dd style="display: none;">{TEXT1}</dd></dl>
However, there was an issue about using the 3 colored boxes and the spoiler with title tags. Somehow, the signatures were spoiler tagged and the username information (aka poster) was actually inside the post. I wish I could provide an image but the topic was deleted. I was wondering, to evade this problem would I have to change {TEXT} to {SIMPLETEXT}? Or would it be more advanced than that?

Thanks.
Dave.

Rudeman72
Registered User
Posts: 64
Joined: Fri Nov 16, 2007 6:28 am
Contact:

Re: Custom BBCodes

Post by Rudeman72 »

Can you use ORs or have a {SIMPLETEST} = to a certain value?

Right now my youtube code is:

[youtube]http://www.youtube.com/watch?v={SIMPLETEXT}[/youtube]

Code: Select all

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v}/{SIMPLETEXT}"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/{SIMPLETEXT}" type="application/x-shockwave-flash" width="425" height="344"></embed></object>

That works fine until people use the link with the embed stuff in it example:

http://www.youtube.com/watch?feature=player_embedded&v=********

I know I could make a separate bbcode for that but it'd be nice to have one that will work with both.

User avatar
Lumpy Burgertushie
Registered User
Posts: 67236
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Custom BBCodes

Post by Lumpy Burgertushie »

don't believe you can do it like that. I also do not believe you can even create one that uses all those parameters for the player etc.

just explain to people how to use it and they will adapt like most people do on most boards.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

LoanChau
Registered User
Posts: 156
Joined: Sat Mar 05, 2005 2:50 pm
Contact:

Re: Custom BBCodes

Post by LoanChau »

Dear all, can you help me to create a bbcode for radom redirect page please? Regards, LC

Html:

Code: Select all

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var howMany = 3; // max number of items listed below
var page = new Array(howMany+1);

page[0]="http://www.example.com/page1.html";
page[1]="http://www.example.com/page2.html";
page[2]="http://www.example.com/page3.html";

function rndnumber(){
var randscript = -1;
while (randscript < 0 ¦¦ randscript > howMany ¦¦ isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1));
}
return randscript;
}
quo = rndnumber();
quox = page[quo];
window.location=(quox);
// End -->
</SCRIPT>

User avatar
Lumpy Burgertushie
Registered User
Posts: 67236
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Custom BBCodes

Post by Lumpy Burgertushie »

what is this supposed to do?

why would you need a bbcode to do something like this?


please explain exactly what you want the final outcome to be, not how you think it should be done.

thanks,
robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

LoanChau
Registered User
Posts: 156
Joined: Sat Mar 05, 2005 2:50 pm
Contact:

Re: Custom BBCodes

Post by LoanChau »

Lumpy Burgertushie wrote:what is this supposed to do?

why would you need a bbcode to do something like this?


please explain exactly what you want the final outcome to be, not how you think it should be done.

thanks,
robert
Dear Lumpy Burgertushie,

An example, i have an advertise and that's pointing to one of my topic but now i want it go direct to other topics. Is it possible?

Regard, LC

User avatar
Lumpy Burgertushie
Registered User
Posts: 67236
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Custom BBCodes

Post by Lumpy Burgertushie »

LoanChau wrote:
Lumpy Burgertushie wrote:what is this supposed to do?

why would you need a bbcode to do something like this?


please explain exactly what you want the final outcome to be, not how you think it should be done.

thanks,
robert
Dear Lumpy Burgertushie,

An example, i have an advertise and that's pointing to one of my topic but now i want it go direct to other topics. Is it possible?

Regard, LC
you have an advertisement in a bbcode?

if so, why ? if not then please explain what you are talking about.
maybe a link to your board that shows this so we can see what it is.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

LoanChau
Registered User
Posts: 156
Joined: Sat Mar 05, 2005 2:50 pm
Contact:

Re: Custom BBCodes

Post by LoanChau »

Lumpy Burgertushie wrote:
LoanChau wrote:
Lumpy Burgertushie wrote:what is this supposed to do?

why would you need a bbcode to do something like this?


please explain exactly what you want the final outcome to be, not how you think it should be done.

thanks,
robert
Dear Lumpy Burgertushie,

An example, i have an advertise and that's pointing to one of my topic but now i want it go direct to other topics. Is it possible?

Regard, LC
you have an advertisement in a bbcode?

if so, why ? if not then please explain what you are talking about.
maybe a link to your board that shows this so we can see what it is.

robert
Dear Robert,

This is the link: http://vietnamesepage.com/Forum/viewtop ... f=39&t=320
but i want it directs to other pages by random:
http://vietnamesepage.com/Forum/viewtop ... f=39&t=326
http://vietnamesepage.com/Forum/viewtop ... f=39&t=148
http://vietnamesepage.com/Forum/viewtop ... f=39&t=183
....

Regards,

LC

User avatar
Lumpy Burgertushie
Registered User
Posts: 67236
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Custom BBCodes

Post by Lumpy Burgertushie »

sorry, I have no idea what you are wanting to do.

on that page you have random ads showing before each post.

within the post you have images that are changing as well.

I see no sign of a bbcode anywhere in that.

if you have a random image javascript then you can set the url it links to within that javascript.

but I don't think that is what you are talking about.

sorry,
robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

ACRune
Registered User
Posts: 1
Joined: Mon Jan 16, 2012 10:27 pm

YouTube BBcode not working

Post by ACRune »

Hi everyone, I am new here.

I have a problem with youtube videos prompting on my forum, I have folloewd the steps and codes as per some of you on here.

Here is what happens, when you click on the posted link of any youtube video, it briefly shows up and within 2 seconds defaults to the Youtube home page registration page. can someone help me on this.

I also would like to upload a pak of smilies and do not know how to proceed, everything that I have read about this leads me to a dead end. Thanks in advance.

BTW this is my first PhPbb forum as a ADMIN, so please be easy on me :mrgreen:

User avatar
Lumpy Burgertushie
Registered User
Posts: 67236
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: YouTube BBcode not working

Post by Lumpy Burgertushie »

ACRune wrote:Hi everyone, I am new here.

I have a problem with youtube videos prompting on my forum, I have folloewd the steps and codes as per some of you on here.

Here is what happens, when you click on the posted link of any youtube video, it briefly shows up and within 2 seconds defaults to the Youtube home page registration page. can someone help me on this.

I also would like to upload a pak of smilies and do not know how to proceed, everything that I have read about this leads me to a dead end. Thanks in advance.

BTW this is my first PhPbb forum as a ADMIN, so please be easy on me :mrgreen:
are you using a youtube bbcode? that is what this topic is about.

if so then please show us the exact code you created.

also, a link to a topic on your board that is showing this behaviour will help a lot.

for the smilies:
Upload the smilie image to forum/images/smilies

Go to
Admin panel>posting>smilies
Bottom of the page click add multiple smilies
Smilies that have not yet been added appear at the top of the screen.
Enter a smilie code (ie the bit you type to get it to display)
Enter the Emotion (ie what it means)
Width and height if they are not already set
Choose whether it will be displayed on the posting page (ie to the right of the screen you write in)
Choose the smilie order (ie where it appears in the order of the smilies you have)
Tick the add box
Submit

If you cannot see the right side of the screen completely then you probably have a large smilie. You can fix this by clicking the triangle at the top left of the screen to close the admin menu and give you more width to play with.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

LoanChau
Registered User
Posts: 156
Joined: Sat Mar 05, 2005 2:50 pm
Contact:

Re: Custom BBCodes

Post by LoanChau »

Lumpy Burgertushie wrote:sorry, I have no idea what you are wanting to do.

on that page you have random ads showing before each post.

within the post you have images that are changing as well.

I see no sign of a bbcode anywhere in that.

if you have a random image javascript then you can set the url it links to within that javascript.

but I don't think that is what you are talking about.

sorry,
robert
Thank you Robert

User avatar
Mick
Support Team Member
Support Team Member
Posts: 22079
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket.

Re: YouTube BBcode not working

Post by Mick »

ACRune wrote:I also would like to upload a pak of smilies and do not know how to proceed, everything that I have read about this leads me to a dead end
For this would you please start your own topic in the support forum.

This topic is about BBCode,

Thanks.
"The more connected we get the more alone we become" - Kyle Broflovski

Please read: “Am I In The Right Place?” before posting.

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: Custom BBCodes

Post by keith10456 »

BarX wrote:Hello. My name is Dave and recently I have added some newly custom BBCodes which support "Spoiler" titles and three types of warning boxes. The first type of warning box I've added was the Standard red box described here;

Image

They all use the same HTML Replacement coding in order to execute these tags, as described below (the only things that aren't the same is the HEX colors)

BB Usage

Code: Select all

[warning]{TEXT}[/warning]
[question]{TEXT}[/question]
info[{TEXT}[/info]
HTML Replacement;

Code: Select all

<table style='margin:0;width:450px;min-height:100px;border:1px dashed #740000;'><tr><td align='middle' bgcolor='#ff6060' valign='center' width='1%'><br /><FONT color='#ffffff' size='+7'><b> ! </b></font><br /></td>
<td valign='top' cellpadding="5" style='background:#F2DDDD' >{TEXT}</td>
</tr></table>
We also recently added the [spoiler=] BBCodes as well using the following for it's execution;

BB Usage

Code: Select all

[spoiler={TEXT2}]{TEXT1}[/spoiler]
HTML Replacement

Code: Select all

<dl class="codebox"><dt>{TEXT2} | <a href="javascript: void(0);" onclick="var spoiler = this.parentNode.parentNode.getElementsByTagName('dd')[0]; if ( spoiler.style.display == 'none' ) { spoiler.style.display = 'block'; this.innerHTML = '-'; } else { spoiler.style.display = 'none'; this.innerHTML = '+'; };">+</a></dt><dd style="display: none;">{TEXT1}</dd></dl>
However, there was an issue about using the 3 colored boxes and the spoiler with title tags. Somehow, the signatures were spoiler tagged and the username information (aka poster) was actually inside the post. I wish I could provide an image but the topic was deleted. I was wondering, to evade this problem would I have to change {TEXT} to {SIMPLETEXT}? Or would it be more advanced than that?

Thanks.
Dave.
Is there a solution to the proposed question (at the very bottom of the post)?

nkolet
Registered User
Posts: 4
Joined: Sat Nov 19, 2011 7:00 pm

Re: Custom BBCodes

Post by nkolet »

Can someone help me to make a bbcode replacement for videos on the link below.

http://www.wgrz.com/video/1394995542001

This video offers an embed code I would like to be able to use.

Thanks so much!

Locked

Return to “Custom BBCode Development and Requests”