Tooltips

Permalink
Please can someone help me by explaining where to put the correct code to integrate tooltips on image links on one page. i dont want them all over the site.

iv tried for hours but couldnt get it to work. using these instructions.
http://flowplayer.org/tools/demos/tooltip/index.html...

please can someone help thanks... just need to know where to put which lines of code in my theme and how to call it into action with an html block..
Thanks

ecomatt
View Replies:
Remo replied on at Permalink Reply
Remo
this would be a nice addon but I guess it's a bit tricky because the size of the hint box is fixed..

You have to put all the code in the header. Not sure what kind of problems you can have with it..

Why don't you upload your theme with this tooltip stuff and I'll have a look at it.. It's much easier to code if it's possible to look at the code (:
ecomatt replied on at Permalink Reply
ecomatt
ok ill put it up on a test site and then post details in a bit... thanks
ecomatt replied on at Permalink Reply
ecomatt
Ok so after hours again playing with this heres what i know.

you need to place the tooltips library and tool tips tools in the header to get the thing to work. whe you place it after the css and before the <?php Loader::element('header_required'); ?> it does not work

so this is the only way so far iv got it to work.
>theme>hearder.php
<?php  defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<!-- Site Header Content //-->
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('typography.css')?>" />
<?php  Loader::element('header_required'); ?>
<script src="http://cdn.jquerytools.org/1.1.2/full/jquery.tools.min.js"></script>
</head>
<body>


this shows the tips but also doest load the site properly you loose the edit bar?

there is this bit of code which they say to place at the end of the page before </body>
<script>
// What is $(document).ready ? See:http://flowplayer.org/tools/using.html#document_ready...
$(document).ready(function() {
   $("#demo img[title]").tooltip('#demotip');
});
</script>


im not quite sure but its something about only loading the tolltips once the js library is fully loaded?

can anyone help thanks
ecomatt replied on at Permalink Reply
ecomatt
this is the location of the testing sitehttp://www.test.white-design.com
ecomatt replied on at Permalink Reply 1 Attachment
ecomatt
its only in edit mode that you cant see the top edit bar... see attachment
Ta2Ta2 replied on at Permalink Reply
Well, I've faced the same issue where the tooltip plug-in was working but not while 'edit mode'...

What I had to do is:
1- Make sure you delete the jquery.tools.min.js loader from your theme code.
2- copy concrete/elements/header_required.php to root/elements/ folder.
3- add the following at the end of the code:
$u = new User;
 if( ! $u->superUser ) {
// if not logged in as an admin, load the library
 echo('<script type="text/javascript" src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js?foo"></script>');
 }


Basically, by doing this it will check the site mode..if it is on edit mode, then the jquery.tools.js won't be loaded and by that you will have the edit mode bar is there..

I hope that helps.

Best,
lostsoul replied on at Permalink Reply
lostsoul
this worked for me. Thanks. Only one thing though. I had to do a Google search to find this.
TheRealSean replied on at Permalink Reply
TheRealSean
edit /*cache issue comments removed */
lostsoul replied on at Permalink Reply
lostsoul
I guess you solved your issue. I was going to ask you what it was.
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
Hi,
If you are using:
<script type="text/javascript" src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js?foo"></script>

You are loading jquery twice!
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
Give this a try
http://code.drewwilson.com/entry/tiptip-jquery-plugin

Its easier and small.
lostsoul replied on at Permalink Reply
lostsoul
On my site its not loading twice?
Ta2Ta2 replied on at Permalink Reply
For me I had to disable the tooltip js while the page is on edit mode...you can do this by customizing your header_required.php

------Original Message------
From: Concrete5 Community
To: [email protected]
Subject: Tooltips: Tooltips
Sent: Jun 7, 2011 8:06 PM
TheRealSean replied on at Permalink Reply 1 Attachment
TheRealSean
If you go to the Jquery Tools website and create a custom script that does not include Jquery you should have no problem,

As stated above if using the CDN version then Jquery is being loaded twice, removing it whilst logged in as super user will work but then you can not use the tooltips/tabs whilst logged in.

Visit,http://flowplayer.org/tools/download/index.html...

Untick the "Include Jquery" then tick everything else you want and download it

I have attached a pure tooltips.js version 3.3kb
(it needs renaming to js from txt)
lostsoul replied on at Permalink Reply
lostsoul
So you are saying that if I were to go with what you are saying. I should be able to use the tooltips/tabs while logged-in.

Is that what you are saying?
TheRealSean replied on at Permalink Reply
TheRealSean
@lostsoul

yep, it works for me