PHP Classes

Thesaurus tooltip: Lookup text and show popup with the text meaning

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum (27)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 70%Total: 5,118 All time: 521 This week: 673Down
Version License PHP version Categories
thesaurus 1.1GNU General Publi...4.1.0Text processing, AJAX


This class can be used in conjunction with a mouse pointer. The user hovers the cursor over an item, without clicking it, and a small box appears with supplementary information regarding the item being hovered over.

It must be used in conjunction with a few Javascript libraries that submit the page body HTML content to the server via AJAX.

On the server, the class parses the HTML content to lookup for known text expressions stored in a dictionary file in CSV format.

The text expressions found in the dictionary are replaced by links that make a popup window appear with the expressions meaning when the user drags the mouse over the links.

The processed HTML content is returned to the browser as part of the AJAX request response.

Innovation Award
PHP Programming Innovation award nominee
November 2006
Number 6

Prize: One subscription to the PHP Magazine
The Web site advertising business became much more profitable to Web site owners, and more effective for advertisers, when Web advertising agencies invested in contextual advertising techniques, like those used by AdSense and IntelliTXT.

Instead of display almost randomly chosen ads, context advertising techniques show ads that are picked automatically by the ad servers to match the topics of the content displayed in each page.

This package implements a solution that can be used to display contextual advertising using PHP.

It can scan the text in the current page and submit it to the server via AJAX. In response to the AJAX request, contextual advertising may be displayed in a pop-up window.

Manuel Lemos
Picture of Dmitry Sheiko
Name: Dmitry Sheiko <contact>
Classes: 9 packages by
Country: Belarus Belarus
Age: 49
All time rank: 701 in Belarus Belarus
Week rank: 286 Down2 in Belarus Belarus Down
Innovation award
Innovation award
Nominee: 5x

Winner: 1x


Thesaurus =================== Version 2.0 - July 2007 --------------------------- Copyright (C) 2006-2007 Dmitry Sheiko Requirements: PHP version 4.1.x+ ( Works with UNIX and Windows both This toolkit is the simplest way to create own in-text advertising system using IntelliTXT (IntelliImages/IntelliMedia) technology approach. You need only to include on your site pages these java scripts and fill sample.csv with you terms and their descriptions (ads). Now when a user of your site hovers mouse cursor on a term from your list (sample.csv), he or she will get popup window (tooltip) with related description. Notice this the script asks server for term description only when user hovers mouse on the term. You can use this library to create portal news popup description, interactive reference book and son on as well. Thesaurus 2.0 includes ad visiting/clicking statistics and memory cache License Type: Freeware. Price: Free License Type: Commercial License. Price: 39.95$ (ask me about by email Files: index.html - sample controller.php - controller (sample 1) db_controller.php - controller (sample 2). In this case you have ad visiting/clicking statistics thesaurus.sql - DB SQL dump sample.csv - Sample of thesaurus dictionary (VDB) thesaurus.js - thesaurus library thesaurus_default.css - design theme thesaurus_fancy.css - design theme thesaurus_bubble.css - design theme bubble.gif - element of bubble design theme yahoo.js, connection-min.js - YUI Ajax Connector Library ( ) How to install Place all files into a folder (for instance, "/thesaurus/") You need to put <script src = "/thesaurus/yahoo.js" ></script> <script src = "/thesaurus/connection-min.js" ></script> <link rel="STYLESHEET" type="text/css" href="thesaurus_fancy.css" /> <script src = "/thesaurus/thesaurus.js" ></script> in the HTML. Insert in the HTML right before </body>: <script> THConfig.Charset = 'UTF-8'; THConfig.CaseSensitive = 'off'; THConfig.CtrlURL = "/thesaurus/controller.php"; parseContent(); </script> Where THConfig.Charset points at what the charset your pages use THConfig.CaseSensitive says if your terms should be case sensitive THConfig.CtrlURL contains URL to the controller script If you want get term's data from MySQL DB, use db_controller.php THConfig.CtrlURL = "/thesaurus/db_controller.php"; You can turn off memory cache of term descriptions with declaration: THConfig.MemoryCache = 'off'; But in that case you will not have ad/description viewing/cliking statistics You can limit area of parsing with HTML-blocks. For example you can make script to parse only 2 blocks: <div id="Block1">text text</div> text text <div id="Block2">text text</div> Now you should point them within configuration: <script> THConfig.parseElements = ['Block1', 'Block2']; THConfig.CtrlURL = "/thesaurus/controller.php"; parseContent(); </script> Yours sincerely, Dmitry Sheiko,, senior web developer at Red Graphic Systems (

  • thesaurus.gif
  Files folder image Files  
File Role Description
Image file bubble.gif Icon background image
Plain text file connection-min.js Data YUI Ajax Connector Library ( )
Plain text file controller.php Class thesaurus controller
Plain text file db_controller.php Class Cotroller to get data from DB
HTML file index.html Data Sample
Plain text file readme.txt Doc. readme
Plain text file sample.csv Data Sample of thesaurus dictionary (VDB)
Plain text file thesaurus.js Data thesaurus library
Plain text file thesaurus.sql Output Sample dump of DB
Plain text file thesaurus_bubble.css Example Design theme
Plain text file thesaurus_default.css Example Design theme
Plain text file thesaurus_fancy.css Example Design theme
Plain text file yahoo.js Data YUI Ajax Connector Library ( )

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:521
This week:673Down
User Ratings User Comments (1)
 All time
bad support
13 years ago (Alexey Belov)