how to make topic prefixes into buttons

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IggyP
    Senior Member
    • Mar 2012
    • 680

    how to make topic prefixes into buttons

    um take it away wayne?

    Click image for larger version

Name:	prefix.jpg
Views:	113
Size:	89.6 KB
ID:	4338902

    this i saw on your site is very nice, i wonder will anyone mind to share some code on how to create? i think many people would like this,
    thanks
    Iggy

  • IggyP
    Senior Member
    • Mar 2012
    • 680

    #2
    ok, so im just realizing 2 things....

    these use purely html code for 1, so many many many options....

    and 2, it accepts gifs! (that new arrow is an animated icon)
    Click image for larger version

Name:	prefixtest.jpg
Views:	86
Size:	11.3 KB
ID:	4338965


    let that be some awesomeness upon you, some good potential right there

    Comment

    • IggyP
      Senior Member
      • Mar 2012
      • 680

      #3
      i notice this code works too is sort of an interesting one fwiw

      Code:
      [B]<marquee [/B][COLOR=#000000][FONT=verdana][SIZE=12px]bgcolor="[/SIZE][/FONT][/COLOR][URL="http://www.web-source.net/216_color_chart.htm"]#cccccc[/URL][COLOR=#000000][FONT=verdana][SIZE=12px]" loop="-1" scrollamount="2" width="100%">Example Marquee[/SIZE][/FONT][/COLOR][B]</marquee>[/B]
      loop is set to infinate, it can be alter to indicate # of times to loop if you prefer

      Comment

      • Replicant
        Senior Member
        • Sep 2014
        • 527

        #4


        double post



        Comment

        • Replicant
          Senior Member
          • Sep 2014
          • 527

          #5
          CSS buttons are very easy ti implement. I use them on my site to indicate new posts. It's easier to touch he buttons in responsive mode. I also use buttons for sub-forum icons in responsive mode.

          Click image for larger version

Name:	Screenshot.png
Views:	89
Size:	21.0 KB
ID:	4339028
          Last edited by Replicant; Fri 26 Feb '16, 4:10am.


          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 74167

            #6
            Sorry for not seeing this sooner.

            For that example I simply used this code:
            Code:
            <button style="color:green">Testing</button>
            It is placed in the HTML option of the prefix. You can get fancier with CSS and use backgrounds, gradients, etc...
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            • glennrocksvb
              Former vBulletin Developer
              • Mar 2011
              • 4021
              • 5.7.X

              #7
              Originally posted by Wayne Luke
              Sorry for not seeing this sooner.

              For that example I simply used this code:
              Code:
              <button style="color:green">Testing</button>
              It is placed in the HTML option of the prefix. You can get fancier with CSS and use backgrounds, gradients, etc...
              This will result in invalid HTML as the prefix is wrapped in <a> tag.

              HTML Code:
              <a href="http://xxxxxxxxxxxxx/search?searchJSON=%7B%22prefix%22%3A%5B%22green%22%5D%7D">
                  <button style="color:green">Green</button>
              </a>
              It may or may not work on some browsers.

              I suggest just using <span> tag and style that to look like a button like this:

              HTML Code:
              <span style="color:green; border: 1px solid green; display:inline-block; padding: 1px 3px; background: silver;">Green</span>
              Or better, just use a class and style it in css_additional.

              HTML Code:
              <span class="prefix-button">Green</span>
              Code:
              .prefix-button {
                  color:green;
                  border: 1px solid green;
                  display:inline-block;
                  padding: 1px 3px;
                  background: silver;
              }

              Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

              Comment

              • Wayne Luke
                vBulletin Technical Support Lead
                • Aug 2000
                • 74167

                #8
                Originally posted by Glenn Vergara
                This will result in invalid HTML as the prefix is wrapped in <a> tag.
                Yep, not really personally worried about it. I use the site as a test bed and nothing serious. He asked how it was done on that site. If it were done for real, I would most likely use CSS and a specific class.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API

                Comment

                Related Topics

                Collapse

                Working...