Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 20th, 2003, 11:25 AM
gologo gologo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 7 gologo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
could you help me to find the way to show term definitions over tooltips?

Dear PHP friends!

I was looking for a little tooltip PHP based script for giving some good definitions on my website and finally I couldn't manage to get anything really nice. Then, I saw the tooltips shown on the articles offered by this site (see an example here: http://www.devshed.com/Server_Side/...ing2/page1.html) and it's really cute. You know, some kind of mouseover code to get a popup and there the term definition in a PHP page.

Could any of you point me to a similar solution (or this one implemented by site webmaster) to get this kind of tooltips working? I have been looking the overLIB doc for example but it's not under the way I am. It's managing link by link, getting in the code the definition and I would like to use something based on a external database, or in a configuration file, or plain text file or something where I could change for all the site at the same time. I don't know how is workin at devshed but it seems the script parse all the html output on the page to put the links and tooltips code at the end of the process. Maybe that's the way to proceed with some kind of parse script that search and replace?

Could you help me to find something similar? Thank you very very much! :-)

PS. I browsed old topics and posts for a couple of hours and I didn't find this information. I found some complaints about the script putting toltips in user names at this forum but no way to setup or get this great feature. Thank you again!

Reply With Quote
  #2  
Old September 20th, 2003, 01:50 PM
marron79's Avatar
marron79 marron79 is offline
Rut row Raggy!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: Tornado Alley
Posts: 558 marron79 User rank is Private First Class (20 - 50 Reputation Level)marron79 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 9 h 41 sec
Reputation Power: 8
Does it have to be written in PHP? I found a very nice small JavaScript program that made some nice tips for my site!
__________________
Matt

Reply With Quote
  #3  
Old September 21st, 2003, 04:30 AM
gologo gologo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 7 gologo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No man, any script coold be great :-) Let me know what are you thinking about, please!

Thank you very much for your help!

Reply With Quote
  #4  
Old September 21st, 2003, 05:48 AM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
this any good?

--IN HEADER--

<script language="javascript1.2">

function showtip(current,e,text)
{
if (document.all)
{
thetitle=text.split('<br>')
if (thetitle.length > 1)
{
thetitles=""
for (i=0; i<thetitle.length; i++)
thetitles += thetitle[i] + "\r\n"
current.title = thetitles
}
else current.title = text
}

else if (document.layers)
{
document.tooltip.document.write(
'<layer bgColor="#FFFFE7" style="border:1px ' +
'solid black; font-size:12px;color:#000000;">' + text + '</layer>')
document.tooltip.document.close()
document.tooltip.left=e.pageX+5
document.tooltip.top=e.pageY+5
document.tooltip.visibility="show"
}
}

function hidetip()
{
if (document.layers)
document.tooltip.visibility="hidden"
}
</script>

--LINKS IN THE PAGE--

<a onmouseover="showtip(this,event,'MY TIP HERE')" onmouseout="hidetip()" href="#">link</a>

Reply With Quote
  #5  
Old September 21st, 2003, 01:41 PM
gologo gologo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 7 gologo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you ralphuk100 for your hint, but if I'm not wrong I would add the tips in every term I want to define. Iwas looking for some kind of automated function, so I can define before all the terms and then the script will detect the terms into the text and add the tooltips (parsing the code or something similar).

I saw this function in a CMS but I don't want to use it. Only some hints to parse the code and put there the tooltips. Maybe put all the definitions in the header and make some kind of replacement to put the term, its definition and the tooltip code when it's needed? No idea at all :-)

Thank you for any input here!

Reply With Quote
  #6  
Old September 21st, 2003, 01:59 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
well this is effectively what the script I gave you does. Except that instead of defining all the tips at the top of the page you are defining them within the onMouseOver. Whats the difference? Its the same thing except your way you would have the tips at the top, and then each bit you wanted a tip on would have to have the onmouseover calling that tip anyway. Im not sure what you mean.

Reply With Quote
  #7  
Old September 21st, 2003, 03:41 PM
gologo gologo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 7 gologo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry, maybe I didn't explain it well :-) I was meaning that this method makes me to insert every defintion every time, and if I want to change it I have to go thru the code and edit. That's the way overLIB also works if I understand what you kindly proposed me.

What I would like to see is something to separate definitions from mouseover code, so I can add more terms to the script or change them and I always see the update version. I was considering a way that uses the header because I could use a include or something similar under PHP and get into all the pages all the code and proper definitions on the fly. I was only sugesting in case any of you know how to get it running.

Thank you for your time and let's see if I explained it better :-)

Reply With Quote
  #8  
Old September 21st, 2003, 04:55 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
just make an array in the header of all your definitions and then instead of putting the definition in the onMouseOver just put a call to the right array item?

Reply With Quote
  #9  
Old September 22nd, 2003, 06:03 AM
gologo gologo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 7 gologo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
well, it seems you got it, but could you please point me to an example to have a look? The essential idea would be to allow the script to detect terms into the text and add the code to show the defintions. I'm not a deep PHP developer and it's a bit difficult for me to get an idea about how go for that

Also, I don't know what was marron79 thinkinbg about. Are you near to ralphuk100 idea?

Thank you very much!

Reply With Quote
  #10  
Old September 22nd, 2003, 06:05 AM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
aah... you mean like if a page contains the phrase "php" or "help" then it becomes highlighted and when the mouse goes over it shows a tip?

Reply With Quote
  #11  
Old September 22nd, 2003, 12:11 PM
gologo gologo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 7 gologo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
yeah, that's the key! I understand the example I gave at the begining is doing something similar :-)

See here for example:
http://www.devshed.com/Server_Side/...ing2/page1.html

Any thoughts?

Thank you again!!!

Reply With Quote
  #12  
Old September 22nd, 2003, 12:48 PM
drgroove's Avatar
drgroove drgroove is offline
pushing envelopes, not pencils
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Feb 2002
Posts: 6,224 drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 4 h 34 m 57 sec
Reputation Power: 174
Moved to Scripts forum from PHP board.
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever.
Analyze twice; hack once.
The world's first existential ITIL question: If a change is released into production without a ticket to track it,
was it actually released?


About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect -
Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire


Reply With Quote
  #13  
Old September 22nd, 2003, 01:58 PM
gologo gologo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 7 gologo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thank you drgroove, and excuse me for posting in the wring forum but i thought the idea would come over php development. And, excuse me, do you know anything about the script used on the docs i'm linking as examples here at devshed?

Ayway, any one here have any hint for what I'm trying to do? Thank you again in advance!

Reply With Quote
  #14  
Old January 4th, 2004, 02:37 PM
vcantave vcantave is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 vcantave User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi there!

Newbie over here with the same exact inquiry. I've looked into the DHTML Tooltips and Javascript tips but they all require manual coding of each and every term.

I was wondering if there is any way at all to have the script reference an include script or a db of some type that has all the terms to look for and upon finding them, apply the tool tip (i'm doing this for definitions on a medical site, so to go through and do every definition would be BEYOND time consuming).

Any help you can offer would be GREATLY appreciated!

Thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > could you help me to find the way to show term definitions over tooltips?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump