Custom BBCodes [Deprecated]

Get help developing custom BBCodes or request one.
User avatar
Dr DBW
Registered User
Posts: 194
Joined: Thu Oct 06, 2005 10:37 pm
Location: Ballarat, Victoria
Contact:

Re: Custom BBCodes

Post by Dr DBW » Tue Oct 05, 2010 11:57 pm

rexx wrote:Under the ACP's Posting tab, I created:

Code: Select all

[peoplewidget]{SIMPLETEXT}[/peoplewidget]
So, the BBCode usage box contains:

Code: Select all

[peoplewidget]{SIMPLETEXT}[/peoplewidget]
The HTML replacement box contains:

Code: Select all

    <script src="http://gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/people_topheadlines.xml&up_celebrityVideoPromo=active&synd=open&w=320&h=202&title=People.com%3A+Top+Headlines&border=%23ffffff%7C0px%2C1px+solid+%23998899%7C0px%2C1px+solid+%23aa99aa%7C0px%2C2px+solid+%23bbaabb%7C0px%2C2px+solid+%23ccbbcc&output=js"></script>
But, on the board index, all that was displayed was:
[peoplewidget]{SIMPLETEXT}[/peoplewidget]
As already pointed out, in your example {SIMPLETEXT} does NOT appear in your HTML code, which is why someone previously stated it was malformed.

From what I can tell, the issue is you are telling the BBCode that you will input some text/number, then not using it in the HTML code. Not surprizingly, it does not like that.

Never tried it, but can you simply leave the text/number out of the BBCode you are generating? As from what I can tell, you don't actually need to pass anything to the substituting HTML code you want to insert.

rexx
Registered User
Posts: 662
Joined: Fri Feb 25, 2005 9:20 pm

Re: Custom BBCodes

Post by rexx » Wed Oct 06, 2010 6:41 pm

Dr DBW wrote: Never tried it, but can you simply leave the text/number out of the BBCode you are generating? As from what I can tell, you don't actually need to pass anything to the substituting HTML code you want to insert.
Finally!

Some one who understands me! :)

That's exactly my question, too!

As far as I can tell, all the 'close' examples provided at the beginning of this post involve passing a value (user input), from one variable to another. But my widget does not require nor allow for that - it is, essentially, a self-contained package; 'plug' in the code and it is designed to run without user inputs.

Now, if some one would kindly show me an instance of bbcode which would allow for a feed (similar to embedded video), but does not require the passing of info, between bbcode and html, then I would be much appreciative.

- r ;)

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Custom BBCodes

Post by ric323 » Wed Oct 06, 2010 9:38 pm

You don't have to use any token if there is no input required.
Just make your bbcode usage

Code: Select all

[peoplewidget][/peoplewidget]
and your "HTML replacement" exactly what HTML you want to be output.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

rexx
Registered User
Posts: 662
Joined: Fri Feb 25, 2005 9:20 pm

Re: Custom BBCodes

Post by rexx » Wed Oct 06, 2010 11:18 pm

Excellent! :D

Thank you! :D

- r :lol:

Scotty501
Registered User
Posts: 89
Joined: Wed Mar 28, 2007 9:40 am
Location: London, UK
Contact:

Re: Custom BBCodes

Post by Scotty501 » Thu Oct 07, 2010 9:17 pm

OK what am I doing wrong,

I trying to use the following You Tube code:-

Code: Select all

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

Code: Select all

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{SIMPLETEXT}"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{SIMPLETEXT}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
but its not working Im getting

Code: Select all

[youtube]http://www.youtube.com/watch?v=MrXJ5km5u9s&NR=1[/youtube]
Im have it working on my older 3.06 version with no problem - so what am I doing wrong with my latest version?
Web Design http://www.ukushosting.com Web Hosting

Scotty501
Registered User
Posts: 89
Joined: Wed Mar 28, 2007 9:40 am
Location: London, UK
Contact:

Re: Custom BBCodes

Post by Scotty501 » Thu Oct 07, 2010 9:30 pm

Ignore my previous post - it was the URL which was wrong - my bad :roll:
Web Design http://www.ukushosting.com Web Hosting

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Custom BBCodes

Post by ric323 » Thu Oct 07, 2010 9:36 pm

Scotty501 wrote:Ignore my previous post - it was the URL which was wrong - my bad :roll:
Yes. As you've discovered, the "&NR=1" should not be on the end.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Youtube code doesn't validate?

Post by libralion » Thu Oct 14, 2010 8:10 pm

Hi everybody,
I use this Youtube code:

BBcode usage:
[youtube]http://{TEXT1}youtube.com/watch?v={TEXT2}[/youtube]

HTML Replacement:
<object width="425" height="355"><param name="movie" value="http://{TEXT1}youtube.com/v/{TEXT2}"></param><param name="wmode" value="transparent"></param><embed src="http://{TEXT1}youtube.com/v/{TEXT2}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

It works fine. But when I try to validate it it gives a lot of errors, like:
-there is no attribute "src"
-there is no attribute "type"
-there is no attribute "wmode"
-there is no attribute "width"
-there is no attribute "height"
-element "embed" undefined

I have the latest phpBB 3 version. And the strict doctype.
Can somebody tell me what could be the reason of this and what I can do about it?

Johanna :?:

Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: Youtube code doesn't validate?

Post by Pony99CA » Fri Oct 15, 2010 2:22 am

libralion wrote:I use this Youtube code:

[...] code removed [...]

It works fine. But when I try to validate it it gives a lot of errors, like:
-there is no attribute "src"
-there is no attribute "type"
-there is no attribute "wmode"
-there is no attribute "width"
-there is no attribute "height"
-element "embed" undefined

I have the latest phpBB 3 version. And the strict doctype.
Can somebody tell me what could be the reason of this and what I can do about it?
Assuming that you're using XHTML Strict, I don't believe that EMBED is supported (which is why you got the element "embed" undefined error).

You might try XHTML Transitional instead or, if you insist on Strict, try the Embed Validifier.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Youtube code doesn't validate?

Post by libralion » Fri Oct 15, 2010 5:22 am

Pony99CA wrote:
libralion wrote:I use this Youtube code:

[...] code removed [...]

It works fine. But when I try to validate it it gives a lot of errors, like:
-there is no attribute "src"
-there is no attribute "type"
-there is no attribute "wmode"
-there is no attribute "width"
-there is no attribute "height"
-element "embed" undefined

I have the latest phpBB 3 version. And the strict doctype.
Can somebody tell me what could be the reason of this and what I can do about it?
Assuming that you're using XHTML Strict, I don't believe that EMBED is supported (which is why you got the element "embed" undefined error).

You might try XHTML Transitional instead or, if you insist on Strict, try the Embed Validifier.

Steve
Hi Steve,
But phpBB 3 is XHTML Strict if I am correct.
I tried the validifier, pasted in the complete code I had and the result works!
Fantastic! Thanks!

Johanna :D
Last edited by libralion on Sat Oct 16, 2010 6:38 am, edited 1 time in total.

woadu
Registered User
Posts: 1
Joined: Sat Oct 16, 2010 1:59 am

Re: Custom BBCodes

Post by woadu » Sat Oct 16, 2010 2:22 am

Hi

Need BBCode for ustream and boxlive.

The embed code (Ustream)

Code: Select all

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="251" id="utv30298"><param name="flashvars" value="autoplay=false&brand=embed&cid=4148289&locale=en_US"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://www.ustream.tv/flash/live/1/4148289?v3=1"/><embed flashvars="autoplay=false&brand=embed&cid=4148289&locale=en_US" width="400" height="251" allowfullscreen="true" allowscriptaccess="always" id="utv30298" name="utv_n_30699" src="http://www.ustream.tv/flash/live/1/4148289?v3=1" type="application/x-shockwave-flash" /></object>

Embed code (Boxlive)

Code: Select all

<script type="text/javascript" src="http://embed.boxlive.tv/channel.php?file=fsp107&width=480&height=440&autoplay=true"></script>


Sorry for my english! Thank you!

User avatar
EduCatOR
Registered User
Posts: 18
Joined: Mon Oct 15, 2007 11:13 pm

Re: Custom BBCodes

Post by EduCatOR » Sun Oct 17, 2010 9:44 pm

Hi there, I have a video sharing website and I would like to be able to embed videos within my phpbb3 forum. Basically, I would like to have the user enter in the full URL to the video which would automatically embed the video within the forum.

I've read alot of discussion here and do have it embedding via video ID, although I would rather the user enter in the full URL rather then the video ID. (how I have it setup now.) The full URL does not have the video ID within it.

[Removed]
Thankyou...
Last edited by KeithR on Sun Oct 17, 2010 10:13 pm, edited 1 time in total.
Reason: http://www.phpbb.com/rules/#rule1k

hallowshax
Registered User
Posts: 1
Joined: Mon Oct 18, 2010 2:45 am

target="_blank" BBcode

Post by hallowshax » Mon Oct 18, 2010 2:51 am

i was resently looking around for a BBcode that makes your links open in a new window and was having trouble and i found out how so i thought i would share it with all of you

put this as the BBcode usage

Code: Select all

[urln={URL}]{SIMPLETEXT}[/urln]
put this as the html replacement

Code: Select all

<a target="_blank" href="{URL}">{SIMPLETEXT}</a>
and put this as the help line text

Code: Select all

[urln=http://example.com/forum/]Forum[/urln]
check off Display on posting page

and click submit

hope someone found this useful bye.
Last edited by Brf on Mon Oct 18, 2010 11:01 am, edited 1 time in total.
Reason: Removed spam link

Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: target="_blank" BBcode

Post by Pony99CA » Mon Oct 18, 2010 9:17 am

While that's obviously useful, there is a Custom BBCodes topic for people to put custom BBCodes in (and I'd wager that code is already there without the spam link in the help line).

Steve
Last edited by camm15h on Mon Oct 18, 2010 10:12 am, edited 1 time in total.
Reason: Merged into custom bbcodes topic.
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51727
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Custom BBCodes

Post by Brf » Mon Oct 18, 2010 11:02 am

Yes. That is the way the [url] bbcode already works, other than opening the URL in a new page.

Locked

Return to “Custom BBCode Development and Requests”