[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
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:
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:
Comment