(2012-03-01, 04:40 PM)sunjava1 Wrote: [ -> ]Why it's impossible ? mybb codes is an example of it,
You can write
[sunjava]test[/sunjava]
result might be:
test
(2012-03-01, 05:00 PM)Alex Smith Wrote: [ -> ]bbcode isn't html though. It's converted into standard html when you submit the post.
For example, that blue text is actually sent as this:
<span xmlns="http://www.w3.org/1999/xhtml" style="color: blue;">test</span>
to your browser
You guys are not getting it, I know it is sent to broswer as html / cnverted into html etc etc.
What I want is to make a simple thing with <sunjava> or [sunjava] in my own small webpage, a personal tag for my own use so that in posts, or making dynamic pages, I can only use my own tag, and they'll be replaced with the style.
How to do that ? using xml ? or php ?
php regex replacing
Or str_replace if you really must
You can't really just "make" your own HTML tags
you might be able to using a custom DTD, but it'll probably end up confusing the major browsers that don't actually use the DTD and just treat it like a hint. I don't know which ones do that, though so good luck. I've never done anything like it so I have no idea where to point you to start.
In IE you can also add tags using JS, which is one way even IE6 can display simple HTML5 pages.
(2012-03-01, 06:13 PM)sunjava1 Wrote: [ -> ]You guys are not getting it, I know it is sent to broswer as html / cnverted into html etc etc.
What I want is to make a simple thing with <sunjava> or [sunjava] in my own small webpage, a personal tag for my own use so that in posts, or making dynamic pages, I can only use my own tag, and they'll be replaced with the style.
How to do that ? using xml ? or php ?
Tom's answer will suite your needs.
Just use <sunjava>Some Text</sunjava> while posting (storing the data to database). When you want to display the data (from database to browser), string replace <sunjava> with the opening tag you wish to display and </sunjava> with its respective closing tag, and then echo the data to browser.
Note:
Haven't seen above reply.