mooDBToolTip
Introduction
mooDBToolTip is an AJAX & PHP driven solution to populate a toolTip for a specific link or tag in your website automatically. Assume you want to explain your users certain abbreviations - normally you'd do this with an html tag, which contains the explanation. This can get very time consuming, if you run a blog, a board or any DB driven website. Here mooDBToolTip enters the game. It simply gets the tag in question, queries it to a database, and if an explanation to this word is found, it creates and injects a tooltip into the page containing the found interpretation. But stop! That's far from being all that this tool is capable of.
Additional features
if nothing is found in the database relating the abbreviation, it then displays a list of links of similar topics / words that have been found. You can define how many of those links are shown and where they link to. ( i.e. Wikipedia etc ).
Now, if you trust the users on your page, you can even specify that, if nothing has been found, they can add the explanation to your DB. ( field shown in demo but inserting into DB is disabled ).
At the moment, this tool works on every link in your page. You can redefine this by opening the included js file and change this line:
$$('a').each(function(el){
to, for example:
$$('accronym').each(function(el){
Requirements
- mySQL Database ( ver. 4 / 5 )
- PHP ( 4 / 5 )
- Javascript support
- mootools framework
- this script which comes with a sample database ( more than 300.000 words )
Adjustments
Please adjust the settings to your needs ( DB name, DB user, DB password, $max results in getWords.php and other... )
How to integrate
Put this into your HEAD section of your website:
<script type="text/ecmascript" language="javascript" src="js/mootools.js"></script>
Right before your closing body tag ( </body> ) put in this part:<script type="text/ecmascript" language="javascript" src="js/mooDBToolTip.js"></script>
Copy all files from the archive to your root folder of your website. Import the sample database from the sample_db.rar file. Done :) Hope you enjoy this piece of software.
If you have problems setting up that thing, drop me a line at admin{[-at-]}artviper.net
Demo
hover over the following links to see what the script does:
Surftipps
Latest blog entries
Latest news & widgets
Script shop
In unserem Script Shop finden Sie ausgewählte Scripts auf Basis von AJAX, mySQL und PHP zum sofortigen Gebrauch für Ihre Website. Shop besuchen
Wir designen
- XT-Commerce Shops
- Wordpress Templates
- Statische, stylishe Websites
Wir programmieren
- PHP Lösungen für kleine und mittelständische Unternehmen
- AJAX basierte Tools für Websites
- Login-Systeme
- Sichere Kontaktformulare
- Widgets und Plugins für XT-Commerce und Wordpress
artViper ist Fachautor für das weltgrößte PHP Magazin "PHP Solutions".
Nachricht senden
