Announcement

Collapse
No announcement yet.

Modifying hardcoded vBcodes?

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

  • Modifying hardcoded vBcodes?

    The control panel lets admins modify some vB codes, but not others.

    Some codes that I can't seem to modify:

    [code ]
    [php ]
    [img ]

    There are others, but my question is how to modify them?

    I've tried added a custom [code ] replacement into the "Custom BB Codes" section of the control panel, but it doesn't seem to work.

    Thanks for the help.

  • #2
    functions.php, bbcodeparse2() function. Beware, it's not really for the faint of heart

    Comment


    • #3
      Thanks for the quick response.

      I'd guess the ones that are were added in via a hack integration are the ones that we can't change.

      Is there any chance this will be "modify-able" via the CP in a future release? It seems inconsistent the way it is now: you can change some code replacements, but not others.

      Comment


      • #4
        No, because all the ones in there require some out side manipulation (stripbrsfromcode(), phphighlite(), on/off flag).

        Comment


        • #5
          Well, I've figured out a workaround - I'll explain it as it may help someone else.

          I wanted to replace the [ code] code. So while I can't directly modify it, I modified the functionality of the vB Code '#' button.

          In vbcode_buttons:

          replaced
          Code:
          <input type="button" class="bginput" value="#" title="#" onclick="vbcode(this.form,'CODE','')" onmouseover="stat('code')">
          with
          Code:
          <input type="button" class="bginput" value="#" title="MONO" onclick="vbcode(this.form,'MONO','')" onmouseover="stat('code')">
          Then create a [MONO] custom code in the control panel, and voila, a transparent replacement for the '#' button functionality.

          It won't change your current messages containing [ code] blocks, but all future ones will be just the way you want them.

          Hope this helps!
          Last edited by jookido; Thu 17th May '01, 4:12pm.

          Comment


          • #6
            Thanks for this hint. Do you know how to remove the space after the inserted vB Code?
            Streicher

            Comment


            • #7
              Only way I see this being done is editing "vbcode.js"

              The spaces seem to be added purposely (they probably figure you'd press spacebar anyway).

              Comment


              • #8
                Ok I found it.
                Last edited by Streicher; Sat 19th May '01, 5:00am.
                Streicher

                Comment

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