Jump to content

  •  

  • iBotModz CBox


    Photo

    [VB HELP]How Would I Make a BB Code Generater


    • Please log in to reply
    3 replies to this topic

    #1 BTKC124

    BTKC124

      Rob

    • Donors

    • 618 posts
    • Joined: 26-April 08
    • Gender:Male
    • Location:A Boat with WIFI

    Posted 23 March 2009 - 01:49 PM

    How would i make a BBCode Generater in VB
    i dont know ANYTHING about making programs but i have common sence.

    i wanna make a app that does Rainbow color text in BBcode Like this website http://humdi.net/bbcoderb.php
    but i cannot figue it out...

    So Some1 plz help me

    #2 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 23 March 2009 - 04:52 PM

    Count the characters they inputted, loop through starting with the beginning of phrase and parse it out surrounded in tags

    & [color= & colorhex & "]" & etc



    #3 NOPxK9

    NOPxK9

      Private

    • Members+

    • 42 posts
    • Joined: 22-April 09

    Posted 22 April 2009 - 04:26 PM

    Count the characters they inputted, loop through starting with the beginning of phrase and parse it out surrounded in tags


    If you have it in a form then just when you hit a button take the string then add a [W.E]string[/W.E]

    #4 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08
    • Gender:Male
    • Location:Canada, ON

    Posted 25 April 2009 - 09:11 PM

    Only thing you need to do is find a way to fill an array full of colors, then just do this:

    Dim myColors() As String = {"green", "pink", "blue", "red", "yellow"} 'etc.
    Dim strToEdit As String = "Dark Slipstream is a Sub-Admin!" 'String to transform
    Dim newStr As String = Nothing 'Make a New String
    Randomize 'Randomizes Randomly Generated Numbers
    Dim x As Integer
    
    For Each c As Char In strToEdit
    	x = Int(Rnd() * myColors.Length) 'Gets Random Color from Color Array
    	newStr &= "[color=" & myColors(x) & "]" & c & "[/color]" 'Adds to New String
    Next