Results 1 to 7 of 7

Thread: [RESOLVED] How to write tag code

  1. #1

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    Resolved [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}

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    Re: How to write tag code

    Thanks, but the URL http://dev.penagate.spiralmindsinc.c...er/bbcode.phps is dead. Any ideas?
    Changes are not permanent, but change is. {Neil Peart}

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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

  5. #5

    Re: How to write tag code

    kasracer, thanks, that's a great post!

  6. #6

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    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}

  7. #7
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: How to write tag code

    Then you're looking for JavaScript and not PHP. I'd suggest posting in the correct forum.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width