[PM] Your own on/off clickable icons (template) hack

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    [PM] Your own on/off clickable icons (template) hack

    [Private Message] Your own on/off clickable icons (template) hack

    What does this one do?
    On the index page of your forum, there is a box that says "Private Messages" with an default vBulletin on/off icon and the message if there are any messages and/or how many there are unread/total.
    This hack does two things to this box:
    1- Lets you use your own on/off image-icons
    2- Makes the icon clickable which feels more 'natrual'.

    Why did you make it?
    Because I wanted to do this for a week now, on my forum, and now that I have done it, I want to share it

    The Code
    Walkthrough
    • Goto the Admin Control Panel and login as an administrator
    • From the left menu, browse down to the "Template"-section and select 'Modify'
    • Click on 'Expand' and browse down to the "Forum Home Page Templates" and click 'Expand' again
    • Click on 'edit' from "forumhome_pmloggedin"
    • This is the 'whole'-original template.. replace this code:
      Code:
      <tr id="cat">
      <td bgcolor="{[i][/i]categorybackcolor}" colspan="6">
      <a href="private.php?s=$session[sessionhash]" title="Click Here to Open Your Private Messages $inboxname">
      <normalfont color="{[i][/i]categoryfontcolor}"><b>Private Messages</normalfont></b></a></td>
      </tr><tr>
      <td bgcolor="{[i][/i]secondaltcolor}" align="center" valign="top">
      <img src="{[i][/i]imagesfolder}/$lightbulb.gif" alt=""></td>
      <td bgcolor="{[i][/i]firstaltcolor}" colspan="5"><smallfont>
      <b>$bbuserinfo[username]</b> - You have $newpm[messages] new message(s) since your last visit.<br>
      (You have $unreadpm[messages] unread messages and $allpm[messages] total messages in all your folders.)
      </smallfont></td></tr>
    • And replace that with:
      Code:
      <tr id="cat">
      <td background="images/catbgtitle.gif" bgcolor="{[i][/i]categorybackcolor}" colspan="6">
      <a href="private.php?s=$session[sessionhash]" title="Click Here to Open Your Private Messages $inboxname">
      <normalfont color="{[i][/i]categoryfontcolor}"><b>Private Messages</b></normalfont></a></td>
      </tr><tr>
      <td bgcolor="{[i][/i]secondaltcolor}" align="center" valign="top">
      <a href="private.php?s=$session[sessionhash]" title="Click Here to Open Your Private Messages $inboxname">
      <img src="images/privmsg/$lightbulb.gif" alt="Private Messages System" border="0">
      </a></td>
      <td bgcolor="{[i][/i]firstaltcolor}" colspan="5"><smallfont>
      <b>$bbuserinfo[username]</b> - You have <b>$newpm[messages]</b> new message(s) since your last visit.<br>
      (You have <b>$unreadpm[messages]</b> unread messages and <b>$allpm[messages]</b> total messages in all your folders.)</smallfont>
      </td></tr>
    • Click on 'Save'


    Where do I put the my new on/off images?
    Goto your web server and browse to the "yourforum/images/" directory and make a new dir called: privmsg (yourforum/images/privmsg/).
    And upload the two on/off.gif images (from the next post) into the privmsg/ directory.

    Version?
    Tested with vBulletin 2.2.x and works like a charme.

    The Result
    This is how it looks on my web site:
    Last edited by Floris; Thu 4 Apr '02, 3:24pm.
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    #2
    promised gifs

    And here are the two on/off gifs that I use on my web site (untill I found better ones) -- you can replace them with any image that you want, as long as you name one: on.gif and the other: off.gif

    [update (17/04/2002)]
    I just installed Mozilla 1.0 rc1 and saw they had very cool images which I could use instead! I have modified them so they are blinking & transparant.

    off.gif is an closed envelope - no new msg
    on.gif is an open envelope (animates with a glow!) - you have new pm

    Enjoy
    (previous .zip was downloaded 235 times!)
    Last edited by Floris; Wed 17 Apr '02, 3:34am.

    Comment

    • Michael2
      Senior Member
      • Oct 2001
      • 1027
      • 3.8.x

      #3
      Thanks, this pretty cool, plus your icons look good on my board.
      HBO Forum - Discuss Game of Thrones, True Blood, Big Love, Boardwalk Empire, and more!
      Disney Forums - Disney theme parks, vacation, entertainment, and more!
      iLoveTalk - Our general discussion forum.
      VeggieBoards - The largest and most active vegetarian forum!

      Comment

      • Floris
        Senior Member
        • Dec 2001
        • 37767

        #4
        Great

        Originally posted by Michael2
        Thanks, this pretty cool, plus your icons look good on my board.
        Thank you, and no problem Where is your board URL ?

        Comment

        • X-Fan
          Senior Member
          • Jan 2002
          • 122
          • 3.0.7

          #5
          Works great on my board, thanks xiphoid!
          Eric J. Moreels
          ComiX-Fan Owner/Administrator
          e-mail: [email protected]
          Web: http://www.comixfan.com/xfan/

          Comment

          • Floris
            Senior Member
            • Dec 2001
            • 37767

            #6
            Originally posted by X-Fan
            Works great on my board, thanks xiphoid!

            I am happy to hear that, and you have a nice site!

            Comment

            • NYI Fan
              Senior Member
              • Jul 2001
              • 171
              • 3.0.3

              #7
              Quick question on this - it looks great & I want to go ahead and install; it BUT
              will it work with Firefly's Blink PM bar hack?
              I think it should since his is a script added to the bottom of the forumhome_pmloggedin template
              but iw as wondering if anyone else had it installed with Firefly's hack?

              I may just mess with it a bit later to see what happens, worst case, I just restore to what I had

              I'll let ya know

              Comment

              • Floris
                Senior Member
                • Dec 2001
                • 37767

                #8
                Originally posted by NYI Fan
                Quick question on this - it looks great & I want to go ahead and install; it BUT
                will it work with Firefly's Blink PM bar hack?
                I think it should since his is a script added to the bottom of the forumhome_pmloggedin template
                but iw as wondering if anyone else had it installed with Firefly's hack?

                I may just mess with it a bit later to see what happens, worst case, I just restore to what I had

                I'll let ya know
                Depends .. I do not know FF's hack, but I can gues this:

                If that hack uses its own images, then probably not. Because this also alters those images.
                But if it is only a javascript that makes that icon go blink, then its possible to easily alter it.
                I will have to look into it, but maybe firefly can reply and give insight, since FF wrote that hack

                Comment

                • NYI Fan
                  Senior Member
                  • Jul 2001
                  • 171
                  • 3.0.3

                  #9
                  Nope didn't work, reverted to original, so now FF's blink works again, but I would love to use custom images for the PMs...

                  I'm going to send Firefly a link to your template mod and see what he can suggest

                  Thanks though, and I will keep you posted

                  Comment

                  • NYI Fan
                    Senior Member
                    • Jul 2001
                    • 171
                    • 3.0.3

                    #10
                    No answer from FF yet
                    but i was thinking about this and since all i really want to do is use different images for pm then for reg on/off, can't i just point to the privimages dir you mentioned as opposed to the regular images dir?

                    Again, I'll play a bit and let ya know what i break, er, um, I mean what happens

                    Comment

                    • NYI Fan
                      Senior Member
                      • Jul 2001
                      • 171
                      • 3.0.3

                      #11
                      Got it working

                      I only altered my "forumhome_pmloggedin" a little bit
                      Code:
                      <a href="private.php?s=$session[sessionhash]">
                      <img src="images/privmsg/$lightbulb.gif" alt="Click here to View Your Private Messages" border="0">
                      and added the privmsg folder you suggested , and it works quite nicely with FF's hack

                      THANK YOU so much for your mod - wouldnt have figured this out without yours (you did all the real work )

                      BTW, I also got a little carried away and added "$ bbuserinfo[username ]'s" before "Private Message" in the title bar (without the spaces & quotes of course) for a more personalized feel
                      Last edited by NYI Fan; Mon 18 Feb '02, 9:51am.

                      Comment

                      • Floris
                        Senior Member
                        • Dec 2001
                        • 37767

                        #12
                        okidoki

                        I just checked your board out and registered, I understand now what you mean, and it looks just great! Enjoy

                        Comment

                        • NYI Fan
                          Senior Member
                          • Jul 2001
                          • 171
                          • 3.0.3

                          #13
                          Glad you like how I used your efforts

                          Feel free to stop by there any time - its mainly recipes but the games and chat section is good for wasting some time as well...

                          [/modesty] and the members there really are a nice group of people...[modesty]

                          I also checked your boards out - have some errands to go run but I will register when i get home

                          Comment

                          • Kohhal
                            Senior Member
                            • May 2001
                            • 138
                            • 3.6.x

                            #14
                            Sweet as a nut. Just added the gifs and the blink bar, thanks guys!

                            Comment

                            • Floris
                              Senior Member
                              • Dec 2001
                              • 37767

                              #15
                              I just updated the thread's second post with 2 new on/off gif files (and the on.gif is actually an animation). I think they look better on my forum. Now when someone has a new PM the on.gif will be displayed and it will blink with a glow. (very handy for those who do not want to install the blinking bar hack: or dont know how to merge it)

                              Comment

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