Announcement

Collapse
No announcement yet.

Another beginners question :P

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #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


    • #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


      • #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


        • #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


          • #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


            • #7
              THANKS!

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

              Comment


              • #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...
                X