Created
December 8, 2012 17:53
-
-
Save brunoais/4241169 to your computer and use it in GitHub Desktop.
phpBB BBcode Parser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<div> | |
<form action=""> | |
<p> | |
here: first printable character must be the "[" (with the begining of the tag) and the last character must be the "]" with the closing tag.<br> | |
I try to do the quote tag here, even though it is actually not fully possible. I did 3 possibilities for the input<br> | |
Pls don't mess with the details, this is just for test and to display an idea, ok ;)?<br> | |
<textarea cols="130" rows="5">[quote name="{TEXT1}" post="{NUMBER1}" source="{URL1}"]{TEXT2}[/quote]</textarea><br> | |
<textarea cols="130" rows="10"> | |
<br><blockquote class="uncited"><div>{TEXT2}</div></blockquote> | |
| | |
<br><blockquote><div><cite>{TEXT1} wrote:</cite>{TEXT2}</div></blockquote> | |
| | |
<br><blockquote><div><cite><a href="{URL1}">{TEXT1}</a> wrote:</cite>{TEXT2}</div></blockquote> | |
</textarea><br>Here lies the styles that are used for this BBCode.<br> | |
(These are appened to the rest of the CSS related to the posts. Then all infiled to the proper place)(insipred by Exrection's idea<br> | |
<textarea cols="130" rows="10"> | |
blockquote { | |
background: transparent none 6px 8px no-repeat; | |
border: 1px solid transparent; | |
font-size: 0.95em; | |
margin: 0.5em 1px 0 25px; | |
overflow: hidden; | |
padding: 5px; | |
} | |
blockquote blockquote { | |
/* Nested quotes */ | |
font-size: 1em; | |
margin: 0.5em 1px 0 15px; | |
} | |
blockquote cite { | |
/* Username/source of quoter */ | |
font-style: normal; | |
font-weight: bold; | |
margin-left: 20px; | |
display: block; | |
font-size: 0.9em; | |
} | |
blockquote cite cite { | |
font-size: 1em; | |
} | |
blockquote.uncited { | |
padding-top: 25px; | |
} | |
</textarea> | |
</p> | |
<p> | |
<button type="button">validate</button> | |
</p> | |
Attribute name isDefault | |
<div> | |
name: | |
<input type="radio" name="option" value=""/> | |
</div> | |
<div> | |
post: | |
<input type="radio" name="option" value=""/> | |
</div> | |
<div> | |
source: | |
<input type="radio" name="option" value=""/> | |
</div> | |
<hr> | |
<div> | |
None: | |
<input type="radio" name="option" value=""/> | |
</div> | |
</form> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment