vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Smart Hints (https://vborg.vbsupport.ru/showthread.php?t=100448)

El_Muerte 11-08-2005 10:00 PM

Smart Hints
 
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:
HTML Code:

<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">&nbsp;</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:
Code:

#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?).

Pyrix 11-09-2005 12:02 PM

Safari really doesn't like your new tooltips by the looks of things... I just get black boxes on mouseover!

El_Muerte 11-09-2005 12:06 PM

hmm.. that sucks. Don't have safari or an other KHTML based browser. Maybe it doesn't understand the standard colors used. Try customizing the hint window colors (as described in the readme).

Also Opera sures might suffer from some stupid Opera feature that will obstruct the hint with a tooltip containing the url of the link. And for some stupid reason Opera doesn't want to display the BR tags properly.

nexialys 11-09-2005 12:31 PM

would be good from you to provide the origin of your javascript, so we can have some support from the originate coder...

TheProfessor 11-09-2005 01:04 PM

I don't wann be lame, but this extension for vB 3.5 does it much better:

https://vborg.vbsupport.ru/showthread.php?t=99520

El_Muerte 11-09-2005 02:20 PM

Quote:

Originally Posted by nexialys
would be good from you to provide the origin of your javascript, so we can have some support from the originate coder...

The origin is me, I wrote this from scratch this morning.

Quote:

Originally Posted by TheProfessor
I don't wann be lame, but this extension for vB 3.5 does it much better:

https://vborg.vbsupport.ru/showthread.php?t=99520

Well, maybe in some way. But my plugin does it for every "title" attribute on the page. On an other site we're using vbPortal that also uses title attributes for somethings (like an rss feed block), that will automatically profit from this plugin. Also no template changes are required.

yinyang 11-09-2005 02:54 PM

Quote:

Originally Posted by TheProfessor
I don't wann be lame, but this extension for vB 3.5 does it much better:

https://vborg.vbsupport.ru/showthread.php?t=99520

personally, i don't like the term "better" since it compares two equal things that perform differently. this hack is different and suits el muerte in what he needed accomplished. i think it is great that he would take the time to share his knowledge and work with us in his free time.

Snake 11-09-2005 06:37 PM

Thanks!

El_Muerte 11-10-2005 08:51 PM

A small update, I trashes the previous default style data for colors. It now uses a few predefined vBulletin style classes. I hope this also fixed the safari black box issue.

akanevsky 11-10-2005 08:56 PM

It should cut out the title tags if javascript is enabled.
Cause otherwise they overlap. :(


All times are GMT. The time now is 08:40 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01139 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete