Another beginners question :P

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MeltX
    New Member
    • Aug 2000
    • 20

    Another beginners question :P

    Erm.. how to create a sort of shortcuts to <b>text</b> with b[text]b for example, i already tried it with ereg_replace("b[","<b>",$string) but it didn't work so i'm wondering what i'm doing wrong.

    Really appreciate some help, thx!
  • George L
    Former vBulletin Support
    • May 2000
    • 32996
    • 3.8.x

    #2
    in the admin control panel go to add custom vbcodes ..
    :: Always Back Up Forum Database + Attachments BEFORE upgrading !
    :: Nginx SPDY SSL - World Flags Demo [video results]
    :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

    Comment

    • MeltX
      New Member
      • Aug 2000
      • 20

      #3
      nono you don&#039;t get it

      The site i need it for is a hosted one, i'v got no admin access at all, isn't tehre an other way to create your own custom vbcodes?

      Comment

      • Mike Sullivan
        Former vBulletin Developer
        • Apr 2000
        • 13327
        • 3.6.x

        #4
        Code:
        $string = 'b[this will be bold]b';
        
        $string = str_replace('b[', '<b>', $string);
        $string = str_replace(']b', '</b>', $string);
        Will return <b>this will be bold</b>

        Comment

        • George L
          Former vBulletin Support
          • May 2000
          • 32996
          • 3.8.x

          #5
          Re: nono you don&#039;t get it

          Originally posted by MeltX
          The site i need it for is a hosted one, i'v got no admin access at all, isn't tehre an other way to create your own custom vbcodes?
          i meant your vbulletin control panel you know http://youraddress.com/forums/admin/index.php page ? it is your vbulletin right ?
          :: Always Back Up Forum Database + Attachments BEFORE upgrading !
          :: Nginx SPDY SSL - World Flags Demo [video results]
          :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

          Comment

          • MeltX
            New Member
            • Aug 2000
            • 20

            #6
            eva2000 i don't use the vbullitin forum but thx any way, you thx too Sullivan, i thought i already tried that and it didn't work, well i will try it again

            Comment

            • MeltX
              New Member
              • Aug 2000
              • 20

              #7
              THANKS!

              it works man i used ereg_replace() instead of str_replace(), really thansk dude!

              Comment

              • Mike Sullivan
                Former vBulletin Developer
                • Apr 2000
                • 13327
                • 3.6.x

                #8
                You could also use eregi_replace, as that's a case insensitive replace feature (and allows regex's, unlike str_replace). However, that code might not work as is - you may have to escape the [ and ], ie \[ and \]

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...