Custom BBCodes [Deprecated]

Get help developing custom BBCodes or request one.
nasada
Registered User
Posts: 2
Joined: Wed Jan 26, 2011 8:41 pm

Re: Custom BBCodes

Post by nasada » Thu Jan 27, 2011 3:10 am

Which "one that's posted"? There seem to be several in this topic.

I can't tell if it's Firefox-compatible here (I only have IE for the moment), but my MARQUEE code scrolls images just fine. (You can get text color by using the COLOR tag inside the MARQUEE tag as my linked examples show.)

I still say that most users will find it very annoying (unless they still use MySpace :twisted:).

Steve
The one I had was found was:

Code: Select all

[marquee={COLOR}]{TEXT}[/marquee] 

Code: Select all

<marquee style="color:{COLOR}"  onmouseout="this.start()" onmouseover="this.stop()" loop="-1" scrollamount="4" width="100%">{TEXT}</marquee> 

Code: Select all

[marquee=COLOR HERE]TEXT HERE[/marquee]

Your Marquee seems to be the one I'm looking for, actually <.<

User avatar
munnibhai
Translator
Posts: 40
Joined: Wed Oct 07, 2009 2:47 am
Location: London,
Contact:

Re: Custom BBCodes

Post by munnibhai » Thu Jan 27, 2011 5:10 am

Pony99CA wrote: Why not just do the following:

Code: Select all

[url=PAGE-URL][img]IMAGE-URL[/img][/url]
That allows pointing to a different image and linked page each time. Your code only seems to allow changing the URL linked to, using the same image over and over. That may be useful in some limited instances (like linking to other pages on your site or using a consistent icon for things like downloading), but probably won't be that useful in general.

Steve
well yeah, we can definitely increase the scope of usage this way, as i was just using the code for a static linking/image display, say download or play etc etc

well here what i have writen, i am stuck on some options, may be somebody more experience3d around may help with this,

Option1

Code: Select all

[displayMe={URL}]{URL1}[/displayMe]

<a href="{URL}"><img src="{URL1}"></a>
For this, user always have to type "http://" before starting the image url. It might be useful to link images from external servers but If image is on localhost (local server) then writing http:// will lead to writing the whole path i-e http://www.thisthatdomain.com/images/blah-blah.jpg. A user or we wouldnt want that.

Option2

Code: Select all

[displayMe={URL}]{TEXT}[/displayMe]

<a href="{URL}"><img src="{TEXT}"></a>
This "TEXT" field might come in handy but will open serious security holes. We wouldnt want it either....

so.. i am stuck... which token to use.... anybody??????
the crazy panda player... tekken heha

Cosmopolitan
Registered User
Posts: 236
Joined: Sat Nov 20, 2010 5:42 am

Re: Custom BBCodes

Post by Cosmopolitan » Thu Jan 27, 2011 5:19 am

Mate, this is awesome.
Would you be so kind as to write the BB and HTML codes?

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

Re: Custom BBCodes

Post by Pony99CA » Thu Jan 27, 2011 8:15 am

nasada wrote:
Which "one that's posted"? There seem to be several in this topic.

I can't tell if it's Firefox-compatible here (I only have IE for the moment), but my MARQUEE code scrolls images just fine. (You can get text color by using the COLOR tag inside the MARQUEE tag as my linked examples show.)

I still say that most users will find it very annoying (unless they still use MySpace :twisted:).
The one I had was found was:

Code: Select all

[marquee={COLOR}]{TEXT}[/marquee] 

Code: Select all

<marquee style="color:{COLOR}"  onmouseout="this.start()" onmouseover="this.stop()" loop="-1" scrollamount="4" width="100%">{TEXT}</marquee> 

Code: Select all

[marquee=COLOR HERE]TEXT HERE[/marquee]
Your Marquee seems to be the one I'm looking for, actually <.<
It's not that much different than yours. Have you tried just putting the IMG BBCode inside of your MARQUEE tags? That's all that I did.

If you want to see mine, here they are:

BBCode uage

Code: Select all

[marquee={NUMBER}]{TEXT}[/marquee]
HTML replacement

Code: Select all

<marquee width="{NUMBER}px" onmouseout="this.start()" onmouseover="this.stop()">{TEXT}</marquee>
Help line

Code: Select all

Scrolling text: [marquee=width (pixels)]text[/marquee] Tip: Don't overuse; it can be very annoying.  You can also nest other BBCode tags in this.
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.

bracketracingnw
Registered User
Posts: 3
Joined: Wed Jan 26, 2011 11:16 pm

Re: Custom BBCodes

Post by bracketracingnw » Thu Jan 27, 2011 9:54 pm

bracketracingnw wrote:how would I get this video to play on my forum?????

Code: Select all

<object width="480" height="390"><param name="movie" value="http://www.xtranormal.com/site_media/players/jwplayer.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="flashvars"value="height=390&width=480&file=http://newvideos.xtranormal.com/web_final_lo/3e512092-28db-11e0-9dd3-003048d6740d_81.mp4&image=http://newvideos.xtranormal.com/web_final_lo/3e512092-28db-11e0-9dd3-003048d6740d_81.jpg&link=http://www.xtranormal.com/watch/8291037&searchbar=false&autostart=false"/><embed src="http://www.xtranormal.com/site_media/players/jwplayer.swf" width="480" height="390" allowscriptaccess="always" allowfullscreen="true" flashvars="height=390&width=480&file=http://newvideos.xtranormal.com/web_final_lo/3e512092-28db-11e0-9dd3-003048d6740d_81.mp4&image=http://newvideos.xtranormal.com/web_final_lo/3e512092-28db-11e0-9dd3-003048d6740d_81.jpg&link=http://www.xtranormal.com/watch/8291037&searchbar=false&autostart=false"></embed></object><object width="480" height="390"><param name="movie" value="http://www.xtranormal.com/site_media/players/embedded-xnl-stats.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.xtranormal.com/site_media/players/embedded-xnl-stats.swf" width="1" height="1" allowscriptaccess="always"></embed></object>

can anyone help?????

maxwell2
Registered User
Posts: 150
Joined: Fri Apr 10, 2009 1:43 pm

Re: Custom BBCodes

Post by maxwell2 » Fri Jan 28, 2011 1:39 pm

Space does not work in posts and I want to do such a two tables:

Image

Please help :)

User avatar
AmigoJack
Registered User
Posts: 5615
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Custom BBCodes

Post by AmigoJack » Fri Jan 28, 2011 4:31 pm

maxwell2 wrote:Space does not work in posts
This is a general restriction of HTML. Either use code-tags to have spaces interpreted, or use a custom BBCode for padding as workaround:

BBCode usage:

Code: Select all

[pad]{NUMBER}[/pad]
HTML replacement:

Code: Select all

<span style="padding-left: {NUMBER}px"></span>
How to use (example):

Code: Select all

1. one [pad]60[/pad] 2. two
3. three [pad]90[/pad] 4. four
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

maxwell2
Registered User
Posts: 150
Joined: Fri Apr 10, 2009 1:43 pm

Re: Custom BBCodes

Post by maxwell2 » Fri Jan 28, 2011 8:03 pm

My God :o I have almost 100 of these lines, and as I have every time to set the distance to be equal to the distance. There is no other, faster options? :?

User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: Custom BBCodes

Post by Jessica » Fri Jan 28, 2011 9:05 pm

maxwell2 wrote:My God :o I have almost 100 of these lines, and as I have every time to set the distance to be equal to the distance. There is no other, faster options? :?
For 2 columns only

BBCode:

Code: Select all

[col]{TEXT1}|{TEXT2}[/col]
HTML:

Code: Select all

<table width="100%"><tr><td style="vertical-align: top; width:50%; padding-right:10px;">{TEXT1}</td><td style="vertical-align: top; width:50%; padding-left:10px;">{TEXT2}</td></tr></table>
Example:

Code: Select all

[col]Column 1
Test 1
Testing|Column 2
Test 2
Testing 2[/col]

(I didn't create this, I just happened to have it on my forum.)
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein

greasontim
Registered User
Posts: 10
Joined: Wed Mar 25, 2009 12:50 am

Re: Custom BBCodes

Post by greasontim » Sat Jan 29, 2011 3:16 am

Wondering if someone can make two BBcodes for me
Best I can show of these codes are
http://www.hiveworkshop.com/forums/misc ... de#trigger
http://www.hiveworkshop.com/forums/misc ... bcode#jass

I'm making a forum for Warcraft 3 and maybe Starcraft 2 if I can get a copy of it at some point

User avatar
munnibhai
Translator
Posts: 40
Joined: Wed Oct 07, 2009 2:47 am
Location: London,
Contact:

Re: Custom BBCodes

Post by munnibhai » Sat Jan 29, 2011 2:33 pm

greasontim wrote:Wondering if someone can make two BBcodes for me
Best I can show of these codes are
http://www.hiveworkshop.com/forums/misc ... de#trigger
http://www.hiveworkshop.com/forums/misc ... bcode#jass

I'm making a forum for Warcraft 3 and maybe Starcraft 2 if I can get a copy of it at some point
{JASS}.. well u r talking about a bbcode in vBulletin. That bbcode makes a collapsible/ expandable box with text in it... we would need to change some php files i think... most likely new code in bbcode.php to interpret the tags.
the crazy panda player... tekken heha

User avatar
Jaymie1989
Registered User
Posts: 1991
Joined: Thu Aug 02, 2007 5:21 pm
Name: Jaymie

Re: Custom BBCodes

Post by Jaymie1989 » Sat Jan 29, 2011 7:12 pm

Hi,

I'm using this Spoiler BBCode and it shows how it should on previewing my post but not when its submitted.


BBCode usage

Code: Select all

[spoiler]{TEXT}[/spoiler]
HTML replacement

Code: Select all

    <div style="margin:20px; margin-top:5px"><div class="quotetitle"><strong>Spoiler:</strong> <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';        this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div> 
Help line

Code: Select all

[spoiler]TEXT[/spoiler]
The code BBCode works and far as I know all the other original BBCodes work.

So can anyone explain this one for me?
Dear creators of Sesame Street,
Kids are still fat. Can I come back now?
Sincerely, Cookie Monster.

View my MODs - Need phpBB help with MODs and Styles? Take a look at my phpBB3 services

MandoaOrg
Registered User
Posts: 8
Joined: Sat Jan 29, 2011 10:22 pm

Re: Custom BBCodes

Post by MandoaOrg » Sat Jan 29, 2011 10:40 pm

Another baby bird begging for bits...

I would like to add a declaration someplace in the phpBB code on my server to include a specific .css file that builds the necessary references to support use of the @font-face property, and in connection with that, I would like to create a custom BBCode to go with it, so my users can simply press a button, enter some text, and get their text to show up in the font referenced by the @font-face CSS property. I know how I would implement it, mostly, I just don't know where to link the .css file that contains the @font-face declarations so I can reference them from within phpBB.

The BBCode definition would look like so:

[specialfont]{TEXT}[/specialfont]

And the HTML replacement would look like so:

<span class='specialfont'>{TEXT}</span>

The reason I'm so interested in doing this is to prevent users (and casual viewers) from needing to have the specific font installed on their computers. This font could be classified as a dingbats-style font, since it's completely arbitrary (it's a fantasy/sci-fi font).

Am I trying too hard? My users and I can certainly live without this, but it would just be nice to include it.

Thanks.

Best Regards,

MandoaOrg

<update>

I would like to mention that I have added an @include to the stylesheet.css for the active theme to include my custom fonts.css file (defining the new font's name as 'MyFont'), which I dropped in the same folder, along with the folder containing the web-compatible font files.

The include looks like:

@include("fonts.css");

And the contents of fonts.css look like:

Code: Select all

@font-face
{
	font-family: 'MyFont';
	src: url('./fonts/myfont-webfont.eot');
	src: local('‚ò∫'),
		url('./fonts/myfont-webfont.woff') format('woff'),
		url('./fonts/myfont-webfont.ttf') format('truetype'),
		url('./fonts/myfont-webfont.svg#webfont8i1dx0zA') format('svg');
	font-weight: normal;
	font-style: normal;
}
And yes, all the font files are, indeed, in a folder named 'fonts' within the same directory as the fonts.css file.

I changed the BBCode definition's HTML section to look like:

<span style="font-family: 'MyFont', Arial, sans-serif;padding: 0px;margin: 0px;font-size: 1em;display: inline;">{TEXT}</span>

When I view source on the thread's page, I find (amongst all the other code):

<span style="font-family: 'MyFont', Arial, sans-serif;padding: 0px;margin: 0px;font-size: 1em;display: inline;">hellotest</span>

So according to what I'm seeing there, it should be working, but it appears not to be.

</update>

<update2>

So apparently I need to spend more time trying to make it work before begging for help. I made it work. It magically started working after I did a bunch of things in the ACP, including clicking on some button that recompiled something to do with the styles. I was unaware that had to happen, but now that it did, it's all working nicely. Now I just have to make sure I remember it's there if I ever change themes.

I hope this is helpful to somebody else. :D

</update2>

greasontim
Registered User
Posts: 10
Joined: Wed Mar 25, 2009 12:50 am

Re: Custom BBCodes

Post by greasontim » Mon Jan 31, 2011 12:23 pm

{JASS}.. well u r talking about a bbcode in vBulletin. That bbcode makes a collapsible/ expandable box with text in it... we would need to change some php files i think... most likely new code in bbcode.php to interpret the tags.
Okay well is the Trigger one possible?

User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: Custom BBCodes

Post by Jessica » Thu Feb 03, 2011 3:59 am

Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein

Locked

Return to “Custom BBCode Development and Requests”