Tooltips

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
kpimichael
Posts: 44
Joined: Mon 29. Dec 2003, 03:29

Tooltips

Post by kpimichael »

I want to use the javascript library by Walter Zorn called TOOLTIPS
http://www.walterzorn.com/tooltip/tooltip_e.htm#docu
to create some rollover tooltips in my articles. Soooo. I created a php program to generate the <a> tags as necessary from a database. It works beautifully across browsers (standalone)...until i include the code into an article with the php tag. The data is listed...but no mouseover tooltips are showing.

I assume it has something to do with css or the way javascript must be included in phpwcms. Since i am a php programmer and no little about html :oops: I am at a loss to see where the conflict is. Have any of you included tooltips or other javascript successfully in an article?

Thanks in advance for taking the time to read my problem
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

plz post the rendered source/ a link to your page...
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
kpimichael
Posts: 44
Joined: Mon 29. Dec 2003, 03:29

Post by kpimichael »

Jan212 wrote:plz post the rendered source/ a link to your page...
Thanks for some feedback. Here is the code when run standalone outside of phpwcms. http://www.wheredotheystand.com/cms/s2/ ... 25,0,0,1,0

When i put it as an php program in an article page... this is what i get:
http://www.wheredotheystand.com/cms/ind ... 25,0,0,1,0

All the tooltips are gone. Here is what the <a> tag looks like that is being generated...by the php program

Code: Select all

<a onmouseover="this.T_SHADOWWIDTH=3;this.T_STICKY=true;this.T_OFFSETX=10;return escape('<? if ($source) echo "Source: ".$source."<br>";?><?if ($quote_date)echo "Date: ".$quote_date."<br>";?>  <?if($attributed_to) echo "Attributed To:".$attributed_to."<br>";?> <?If ($entries_key) echo "Key: ".$entries_key."<br>";?> <?if($link) echo "Link: ".$link."<br>";?>')">
<b><?echo $title;?></b> <br> <?echo $quote;?></a><br>
with some php echo's thrown in :)

I have looked at the DEFAULT.css that is used in the frontend...and dont see any conflicts...but then again I am not a css person and am not sure i know which css files are being pulled together. This is driving me crazy. Something in phpwcms is overriding or stoping my onmouseover.

Thanks for taking a look. I appreciate all i see you do on the boards... I hope to get familiar enough with PHPWCMS so that i can help others too. :) But seems the more i dig, the less i know about it :?
User avatar
Oliver Georgi
Site Admin
Posts: 9914
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

the tag has to be placed inside the head section of your template (I think).

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Have you tried a "fully-qualified" path in this tag??

Code: Select all

<script language="JavaScript" type="text/javascript" src="wz_tooltip.js"></script>
like: "/path/to/cms/s2/wz_tooltip.js"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
How about as an experiment, placing a "copy" with similar phpWCMS files in "/include/inc_js/" and modifying the tag like this:

Code: Select all

<script language="JavaScript" type="text/javascript" src="/include/inc_js/wz_tooltip.js"></script>
kpimichael
Posts: 44
Joined: Mon 29. Dec 2003, 03:29

Gonna Take me Some time i think

Post by kpimichael »

I tried all your ideas....with no success. I think i am going to have to do some traces as a page is built and see what is happening. I will let you know if i figure it out. :shock: I suspect that it would be useful to someone else over time. Thanks
User avatar
Oliver Georgi
Site Admin
Posts: 9914
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

try to fill it into the footer section or at the end of the main block of your template like

Code: Select all

{CONTENT}
<script language="JavaScript" type="text/javascript" src="phpwcms_template/inc_js/wz_tooltip.js"></script>
Maybe the script only works if it is placed between <body></body>.

You should not try absolute path like /mypath. ;-)

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
kpimichael
Posts: 44
Joined: Mon 29. Dec 2003, 03:29

I hate my solution but it works!!!

Post by kpimichael »

The javascript code was very sensitive as to where it occurs. I could not get it in a layout or template or article...right where i needed the code to be. So i changed the index.php code to put the javascript right in before the closing body tag. I don't like the solution because i will have to keep track of Olivers changes... but here is the temporary solution for those interested in trying it. This is about line 100 in current release.

Code: Select all

// MIKE Inserted the one line below to all tooltips to function
echo '<script language="JavaScript" type="text/javascript" src="phpwcms_template/inc_js/wz_tooltip.js"></script>';
echo "</body>\n</html>";

ob_end_flush();
Thanks to all for the suggestions made on the board.
GO Oliver!!!!!
User avatar
Oliver Georgi
Site Admin
Posts: 9914
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

No problem - index.php will not be changed very often ;-) - but you can fill it into the footer section - has the same effect (I think).

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply