El_Muerte
11-08-2005, 10:00 PM
Smart Hints is a javascript that will convert all HTML title attributes to javascript powered hints.
This grants you more power in the looks of the hint and also newline support for all browsers.
All most of you may be aware of is that vBulletin has a thread preview feature that adds some text of the thread to the title attribute. Only MSIE will properly show the newlines, this looks quite ugly and unreadable for other browsers.
This plugin will make it a bit more nicer. Without javascript nothing much happens, also no HTML is touched, it's all done via JavaScript. The plugin only adds two invisible lines to the end of the document.
This javascript file can easily be used in other websites. Hence I release this script under the terms of the GNU Lesser General Public License.
A live demo is available here: http://forum.magicball.net/forumdisplay.php?f=6
Installation\customization intrustions are in the README file in the zip archive.
Note: you can also install this mod for older vBulletin versions (pre 3.5), for that you will need to customize some templates to include the 2 HTML lines. The code to add would be:
<script type="text/javascript" src="http://el-muerte.student.utwente.nl/lba/forum/clientscript/smartHints.js"></script>
<div id="hintwindow" class="tborder" style="display: none; position: absolute;"><div id="hintwindowtext" class="alt1"> </div></div>
Changes in v1.1
Changed the HTML code, removed all unimportant style data (e.g. color and stuff) and now uses default style classes. Previous method actually didn't allow proper customization. It now uses the tborder and alt1 classes, this makes the hint blend in with the forum directly. However I do suggest to add the following lines to the Additional CSS Definitions just to make it even nicer:
#hintwindow { padding: 1px; font-size: 80%; }
#hintwindowtext { padding: 1px; }
Known bug: Opera (8.5) doesn't show newlines, the reason for this that the title attribute doesn't contain newlines when requested via javascript (bug in Opera?).
This grants you more power in the looks of the hint and also newline support for all browsers.
All most of you may be aware of is that vBulletin has a thread preview feature that adds some text of the thread to the title attribute. Only MSIE will properly show the newlines, this looks quite ugly and unreadable for other browsers.
This plugin will make it a bit more nicer. Without javascript nothing much happens, also no HTML is touched, it's all done via JavaScript. The plugin only adds two invisible lines to the end of the document.
This javascript file can easily be used in other websites. Hence I release this script under the terms of the GNU Lesser General Public License.
A live demo is available here: http://forum.magicball.net/forumdisplay.php?f=6
Installation\customization intrustions are in the README file in the zip archive.
Note: you can also install this mod for older vBulletin versions (pre 3.5), for that you will need to customize some templates to include the 2 HTML lines. The code to add would be:
<script type="text/javascript" src="http://el-muerte.student.utwente.nl/lba/forum/clientscript/smartHints.js"></script>
<div id="hintwindow" class="tborder" style="display: none; position: absolute;"><div id="hintwindowtext" class="alt1"> </div></div>
Changes in v1.1
Changed the HTML code, removed all unimportant style data (e.g. color and stuff) and now uses default style classes. Previous method actually didn't allow proper customization. It now uses the tborder and alt1 classes, this makes the hint blend in with the forum directly. However I do suggest to add the following lines to the Additional CSS Definitions just to make it even nicer:
#hintwindow { padding: 1px; font-size: 80%; }
#hintwindowtext { padding: 1px; }
Known bug: Opera (8.5) doesn't show newlines, the reason for this that the title attribute doesn't contain newlines when requested via javascript (bug in Opera?).