|
[Tip] ON/OFF status image with CSS Text Replacement
|
|
04-10-2008, 04:19 PM
(This post was last modified: 04-14-2008 08:47 AM by aglioeolio.)
Post: #1
|
|||
|
|||
|
[Tip] ON/OFF status image with CSS Text Replacement
I was searching google for some tips to lower my CPU usage with mybb and found this.
http://wellstyled.com/css-replace-text-by-image.html http://wellstyled.com/files/css-replace-...ple03.html Ho to Do it: 1st Step create 3 new styles in your CSS theme: Code: /* trocando txt por imagem */2nd Step Go to your Admin template manager and edit forumbit_depth2_forum: Find: Code: <img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" />Replace with: Code: <h2 id="{$lightbulb['folder']}"><a href="forumdisplay.php?fid={$forum['fid']}" rel="nofollow"><span>status</span></a></h2>Notes: 1) replace backg.image folder "/pesbrasil/" with your theme name 2) create file off2.gif if you want rollover effect 3) change "width:100px; height:100px;" to your image dimensions 4) rel="nofollow" is optional, I added because there are 3 links in my template to the same place Now there are no more <img> requests with this Code if our Forum Index have a lot of Forums listed
|
|||
|
« Next Oldest | Next Newest »
|

Search
Member List
Calendar
Help



