Announcement

Collapse
No announcement yet.

[tip] Top 10 custom vB codes !

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

  • [tip] Top 10 custom vB codes !

    Hi !
    This thread is designed for the Hints 'n' Tips forum, but I was not able to post new threads there.
    It is just a compilation of the best custom vB codes I know.

    Top 10 (unordered)
    • [s]
      <s>{param}</s>
      to strike text
    • &#91;sub&#93;
      <sub>{param}</sub>
      to subscript text
    • &#91;sup&#93;
      <sup>{param}</sup>
      to superscript text
    • &#91;justify&#93;
      <div align="justify">{param}</div>
      to justify text alignment
    • &#91;pre&#93;
      <span style="white-spacere;">{param}</span>
      so all spaces are non breaking
    • &#91;floatleft]
      <span style="float:left;">{param}</span>
      to have a floating object on the left (usefull for images)
    • &#91;floatright]
      <span style="float:right;">{param}</span>
      to have a floating object on the right (usefull for images)
    • &#91;title=]
      <a title="{option}">{param}</a>
      for a description (usefull for images)
    • &#91;background=]
      <span style="background-color:{option};">{param}</span>
      for the background color
    • &#91;li]
      <li>{param}</li>
      to avoid the vB3 bug with linebreaks being removed before each &#91;*&#93;
    Others
    • &#91;table], &#91;th], &#91;tr], &#91;td]
      <table>{param}</table>, <th>{param}</th>, etc.
      for tables
    • [h1], [h2], [h3], [h4], [h5], [h6]
      <h1>{param}</h1>, <h2>{param}</h2>, etc.
      for headers
    • [glow=]
      <span style="width:100%;filter:glow(color={option}, strength=8)">{param}</span>
      to make text glow with any color
    • [blink]
      <blink>{param}</blink>
      to make text blink (only Netscape)
    Hard ones
    They might need a hack.
    • &#91;hr]
      <hr />
      for an horizontal row
      (trouble : tags without closing tags, like &#91;*&#93;, cannot be customized with vB3, and tags without parameter, like &#91;hr]&#91;/hr&#93; are ignored and removed with vB3)
    • &#91;euro]
      &euro;
      for the euro sign
      (trouble : tags without closing tags, like &#91;*&#93;, cannot be customized with vB3, and tags without parameter, like &#91;euro]&#91;/euro&#93; are ignored and removed with vB3)
    • [spoiler]
      to give some text the same color as the background
      (trouble : alternance between alt1 and alt2)
      example : http://forums.jeuxonline.info/showth...36#post4218936
      (note: with Mozilla you can just hover the text with the mouse)
    • [random]
      for a random number between 1 and {param}, usefull for roleplaying games
      (trouble : need a checksum and Javascript to avoid falsification when editing)
      example : http://www.alchemicdream.com/portail...opic.php?t=183
      (note: the nice use of &#91;dice&#93
    Voilà !
    If you have other nice ideas, solutions, troubles or other suggestions, do not hesitate to share them !
    Last edited by Lumina; Thu 31st Jul '03, 8:42am.
    Lumina, aventurière des mondes fantastiques et petite rédactrice au grand cœur
    Cœur Lumière - vBulletin-fr
    Join the vBulletin French community social group!

  • #2
    code for flash? vb3

    Comment


    • #3
      With Flash you can do 100% what is possible with HTML, Javascript, ...
      So if you have Flash, it is just like if you had enabled HTML on your forum.


      But if you really want a tag for it :
      • [swf]
        <embed src="{param}" width="200" height="30" type="application/x-shockwave-flash"></embed>
      Also, I would like to know if someones know a way to have a tag that disables tags and smileys within it ? I know [php] disables smileys, but it bugs a lot with vB tags, and it is not a <span>.

      I would like something like :
      [tag]&#91;[email protected]]&#91;/email][/tag]
      Displaying as :
      &#91;[email protected]]&#91;/email]
      Without even disabling smileys.
      Last edited by Lumina; Wed 13th Feb '08, 7:48am.
      Lumina, aventurière des mondes fantastiques et petite rédactrice au grand cœur
      Cœur Lumière - vBulletin-fr
      Join the vBulletin French community social group!

      Comment


      • #4
        I use this for [hr]: <hr width="{param}">
        Sig? What sig?

        Comment


        • #5
          Originally posted by Lumina



          • <hr />
            for an horizontal row
            (trouble : tags without closing tags, like
          • , cannot be customized with vB3, and tags without parameter, like are ignored and removed with vB3)




          I actually did:

          [hr={option}]{param}

          Returns:
          <hr style="color:{option};width:{param}" />

          Play with it to customize to your needs.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API - Full / Mobile
          Vote for your favorite feature requests and the bugs you want to see fixed.

          Comment


          • #6
            Originally posted by Wayne Luke
            I actually did:

            [hr={option}]{param}[/hr]

            Returns:
            <hr style="color:{option};width:{param}" />

            Play with it to customize to your needs.
            I had <hr width="{param}" color="{option}"> in vB2 but that no longer works.
            Is this an XHTML thing?
            Sig? What sig?

            Comment


            • #7
              Originally posted by Lumina
              You can much more easily have a spoiler tag with a color option:

              [spoiler={option}]{param}[/spoiler]

              Create a table or div with the font color and background color being {option}. You'll not have to worry about alternance between alt1 and alt2 (cos it'll always be the chosen color, regardless of background), and you don't have to have messy CSS that allows for a HOVER to display the text - you need to SELECT the text in order to read it. Works better (that way, people can't accidentally see it because they move their mouse over it).

              I have it as:
              Code:
              <span style="color: {option}; background-color: {option};">{param}</span>
              That way, you can use spoilers inline without it breaking up your sentences. Works very nicely. Imagine this:

              Luke goes to Yoda and after his death, he talks to Ben and then discovers something, or realizes it. ([spoiler=black]Leia is his sister!![/spoiler]) This knowledge puts a whole new perspective on the situation for him.

              If you prefer not to have a big black block (or any other color) in user's posts, just hardcode the color to be slightly off on your alt colors, so that people see that there is something there. Then you just have the tag [spoiler]{param}[/spoiler].




              BTW, if you want to have your lists in vB to be XHTML 1.0 Strict Compliant, check this thread:
              http://www.vbulletin.com/forum/showthread.php?t=79608

              Comment


              • #8
                Do you have buttons for those BB codes?

                Comment


                • #9
                  I don't have any buttons for custom codes, mostly because I never bothered looking into making more buttons.

                  Comment


                  • #10
                    <s> and <strike> are no longer valid I think?

                    Comment


                    • #11
                      It should be valid, I just installed it on my forums.

                      tag s

                      replacement <s>strike me!</s>

                      example Strike me!
                      Gio Takahashi
                      Owner of www.unitedempire.net
                      The Website and The Forums

                      Comment


                      • #12
                        the glow bbcode does not seem to work for me.
                        Gio Takahashi
                        Owner of www.unitedempire.net
                        The Website and The Forums

                        Comment


                        • #13
                          Originally posted by Gio Takahashi
                          the glow bbcode does not seem to work for me.
                          It only works in IE because of the non standard coding needed to use it.

                          Comment


                          • #14
                            Here's a good spoiler tag code

                            [spoiler]{param}[/spoiler]

                            <B><I>(SPOILER)</I></B> <span style="color: black; background-color: black;">{param}</span>

                            That renders text invisible (unless you highlight it, of course) regardless of what background it's over. You can then proceed to change black to whatever colour you want; I make it replacement-dependent and place it halfway between the two alt colours in each styleset, to make it as unintrusive as possible.

                            IMO, Jelsoft should hack a spoiler tag into the code that actually appears the same colour as a post's background colour, but eh.
                            Last edited by Aaron Freed; Fri 21st Nov '03, 12:36pm.
                            Fool's Gold: Discussion of rock 'n' roll, movies, A Song of Ice and Fire, Discworld, The Wheel of Time, The Lord of the Rings, Dragonlance, Forgotten Realms, literature, games, and more. It's ace.

                            Last.FM * LiveJournal

                            Comment


                            • #15
                              I like how you can do the whole (SPOILER) bit of your suggestion in CSS and simply remove that part from the code entirely ^_^

                              This is what my new spoiler tag is going to look like:

                              <span class="spoiler">{param}</span>

                              with this css:

                              Code:
                              .spoiler {
                                  color: #000;
                                  background: #000;
                               }
                               .spoiler:before, .spoiler:after {
                                  content: '[Spoiler: ';
                                  font-size: 10px;
                                  color: red;
                                  font-weight: bold;
                                  font-style: oblique;
                               }
                               .spoiler:after {
                                  content: ' ]';
                               }
                              people are free to use this if they want, btw

                              Comment

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