|
-
Jul 14th, 2006, 05:10 PM
#1
Thread Starter
Addicted Member
[RESOLVED] How to write tag code
I am writing a help-desk sort of software in PHP strictly for the internal use of the company I work for. It is along the lines of a forum except that it's not conversation based. It had to have very specific fields, forms, and functions so unfortunately I have had to write this from the ground up.
Anyway, in this project of mine, people can post information very much like the vBulletin form I'm writing this post in now. And in my project, I'd like to make it easy for people to format their post with bolds, italics, underlines, colors, and post things such as URLs and email addresses easily without having to know HTML code. But I have no idea how.
Now I'm not asking for someone to post vBulletin's source code, I'd rather write my own. However, I'd be grateful if someone could help me get started by telling me how to get this done. I'm pretty sure that I have to use another scripting language like VBScript.
Any ideas? Thanks
Changes are not permanent, but change is. {Neil Peart}
-
Jul 14th, 2006, 06:09 PM
#2
Re: How to write tag code
-
Jul 15th, 2006, 09:43 PM
#3
Thread Starter
Addicted Member
Re: How to write tag code
Changes are not permanent, but change is. {Neil Peart}
-
Jul 16th, 2006, 12:14 AM
#4
Re: How to write tag code
Hmm, it shouldn't be, looks like my subdomains got stuffed up again.
It's now here:
http://dev.penagate.com/php/bbparser/bbcode.phps
-
Jul 17th, 2006, 04:43 PM
#5
Member
Re: How to write tag code
kasracer, thanks, that's a great post!
-
Jul 17th, 2006, 06:24 PM
#6
Thread Starter
Addicted Member
Re: How to write tag code
This code looks great and I plan on using it; however, I'm not so sure it answers my original question for this post. Your code looks like it takes a post from --let's say, an SQL datbase or something-- and formats it to XHTML for presentation to the user.
What I want to do is go the other direction. I'd like to have Bold, Italic, and Underline buttons next to my <textarea> so that when the user clicks the one of the buttons, it somehow inserts the [ bold ] into the <textarea>.
For example, the source code on the "Reply To Thread" page has this vbcode reference
HTML Code:
<a href="#" onclick="return vbcode('B', '')" accesskey="b">
What might an example of that code look like?
Changes are not permanent, but change is. {Neil Peart}
-
Jul 17th, 2006, 09:31 PM
#7
Re: How to write tag code
Then you're looking for JavaScript and not PHP. I'd suggest posting in the correct forum.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|