Current time: 04-25-2014, 08:58 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make own tag like <sunjava>
03-01-2012, 05:32 PM
Post: #11
RE: How to make own tag like <sunjava>
(03-01-2012 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

(03-01-2012 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:

Code:
<span xmlns="http://www.w3.org/1999/xhtml" style="color: blue;">test</span>
to your browser Smile

Quote:Golf and alcohol don't mix, that's why I don't drink and drive!
Video Tutorials: Installing MyBB | Upgrading MyBB
Visit this user's website Find all posts by this user
Quote this message in a reply
03-01-2012, 06:13 PM
Post: #12
RE: How to make own tag like <sunjava>
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 ?

http://www.vubscs.com ( A new way of Mybb)
Find all posts by this user
Quote this message in a reply
03-01-2012, 06:18 PM
Post: #13
RE: How to make own tag like <sunjava>
php regex replacing Smile Or str_replace if you really must Smile You can't really just "make" your own HTML tags Smile

Quote:Golf and alcohol don't mix, that's why I don't drink and drive!
Video Tutorials: Installing MyBB | Upgrading MyBB
Visit this user's website Find all posts by this user
Quote this message in a reply
03-01-2012, 06:25 PM (This post was last modified: 03-01-2012 06:25 PM by Firestryke31.)
Post: #14
RE: How to make own tag like <sunjava>
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.

[Image: rslm.php]
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2012, 10:59 AM
Post: #15
RE: How to make own tag like <sunjava>
(03-01-2012 06:18 PM)Tom K. Wrote:  php regex replacing Smile Or str_replace if you really must Smile You can't really just "make" your own HTML tags Smile

Thanks Solved Smile

http://www.vubscs.com ( A new way of Mybb)
Find all posts by this user
Quote this message in a reply
03-02-2012, 10:59 AM (This post was last modified: 03-02-2012 11:01 AM by kavin.)
Post: #16
RE: How to make own tag like <sunjava>
(03-01-2012 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. Sad
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication