[geeklog-cvs] geeklog: Com_Tooltip now includes the ability to make the hovero...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon Jan 10 11:12:33 EST 2011
changeset 8048:bf9cc8cb6488
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/bf9cc8cb6488
user: Tom <websitemaster at cogeco.net>
date: Mon Jan 10 11:11:54 2011 -0500
description:
Com_Tooltip now includes the ability to make the hoverover text a link.
diffstat:
public_html/layout/professional/style.css | 2 +-
public_html/layout/professional/tooltips/classic.thtml | 2 +-
public_html/layout/professional/tooltips/critical.thtml | 2 +-
public_html/layout/professional/tooltips/help.thtml | 2 +-
public_html/layout/professional/tooltips/information.thtml | 2 +-
public_html/layout/professional/tooltips/warning.thtml | 2 +-
public_html/lib-common.php | 19 ++++++++++---
7 files changed, 20 insertions(+), 11 deletions(-)
diffs (119 lines):
diff -r 9330e3581422 -r bf9cc8cb6488 public_html/layout/professional/style.css
--- a/public_html/layout/professional/style.css Sun Jan 09 19:34:38 2011 +0100
+++ b/public_html/layout/professional/style.css Mon Jan 10 11:11:54 2011 -0500
@@ -1013,7 +1013,7 @@
/* Common CSS for on-hover tooltip feature */
a.tooltip {
border-bottom: 1px dotted #000000; color: #000000; outline: none;
- cursor: help; text-decoration: none;
+ text-decoration: none;
position: relative;
}
a.tooltip span {
diff -r 9330e3581422 -r bf9cc8cb6488 public_html/layout/professional/tooltips/classic.thtml
--- a/public_html/layout/professional/tooltips/classic.thtml Sun Jan 09 19:34:38 2011 +0100
+++ b/public_html/layout/professional/tooltips/classic.thtml Mon Jan 10 11:11:54 2011 -0500
@@ -1,1 +1,1 @@
-<a class="{class}" href="#">{hoverover}<span class="classic">{text}</span></a>
\ No newline at end of file
+<a class="{class}" style="cursor: {cursor}; " href="{link}">{hoverover}<span class="classic">{text}</span></a>
\ No newline at end of file
diff -r 9330e3581422 -r bf9cc8cb6488 public_html/layout/professional/tooltips/critical.thtml
--- a/public_html/layout/professional/tooltips/critical.thtml Sun Jan 09 19:34:38 2011 +0100
+++ b/public_html/layout/professional/tooltips/critical.thtml Mon Jan 10 11:11:54 2011 -0500
@@ -1,1 +1,1 @@
-<a class="{class}" href="#">{hoverover}<span class="custom critical"><img class="icon" src="{layout_url}/tooltips/images/critical.png" alt="{title}" height="48" width="48"{xhtml}><em>{title}</em>{text}</span></a>
\ No newline at end of file
+<a class="{class}" style="cursor: {cursor}; " href="{link}">{hoverover}<span class="custom critical"><img class="icon" src="{layout_url}/tooltips/images/critical.png" alt="{title}" height="48" width="48"{xhtml}><em>{title}</em>{text}</span></a>
\ No newline at end of file
diff -r 9330e3581422 -r bf9cc8cb6488 public_html/layout/professional/tooltips/help.thtml
--- a/public_html/layout/professional/tooltips/help.thtml Sun Jan 09 19:34:38 2011 +0100
+++ b/public_html/layout/professional/tooltips/help.thtml Mon Jan 10 11:11:54 2011 -0500
@@ -1,1 +1,1 @@
-<a class="{class}" href="#">{hoverover}<span class="custom help"><img class="icon" src="{layout_url}/tooltips/images/help.png" alt="{title}" height="48" width="48"{xhtml}><em>{title}</em>{text}</span></a>
\ No newline at end of file
+<a class="{class}" style="cursor: {cursor}; " href="{link}">{hoverover}<span class="custom help"><img class="icon" src="{layout_url}/tooltips/images/help.png" alt="{title}" height="48" width="48"{xhtml}><em>{title}</em>{text}</span></a>
\ No newline at end of file
diff -r 9330e3581422 -r bf9cc8cb6488 public_html/layout/professional/tooltips/information.thtml
--- a/public_html/layout/professional/tooltips/information.thtml Sun Jan 09 19:34:38 2011 +0100
+++ b/public_html/layout/professional/tooltips/information.thtml Mon Jan 10 11:11:54 2011 -0500
@@ -1,1 +1,1 @@
-<a class="{class}" href="#">{hoverover}<span class="custom info"><img class="icon" src="{layout_url}/tooltips/images/info.png" alt="{title}" height="48" width="48"{xhtml}><em>{title}</em>{text}</span></a>
\ No newline at end of file
+<a class="{class}" style="cursor: {cursor}; " href="{link}">{hoverover}<span class="custom info"><img class="icon" src="{layout_url}/tooltips/images/info.png" alt="{title}" height="48" width="48"{xhtml}><em>{title}</em>{text}</span></a>
\ No newline at end of file
diff -r 9330e3581422 -r bf9cc8cb6488 public_html/layout/professional/tooltips/warning.thtml
--- a/public_html/layout/professional/tooltips/warning.thtml Sun Jan 09 19:34:38 2011 +0100
+++ b/public_html/layout/professional/tooltips/warning.thtml Mon Jan 10 11:11:54 2011 -0500
@@ -1,1 +1,1 @@
-<a class="{class}" href="#">{hoverover}<span class="custom warning"><img class="icon" src="{layout_url}/tooltips/images/warning.png" alt="{title}" height="48" width="48"{xhtml}><em>{title}</em>{text}</span></a>
\ No newline at end of file
+<a class="{class}" style="cursor: {cursor}; " href="{link}">{hoverover}<span class="custom warning"><img class="icon" src="{layout_url}/tooltips/images/warning.png" alt="{title}" height="48" width="48"{xhtml}><em>{title}</em>{text}</span></a>
\ No newline at end of file
diff -r 9330e3581422 -r bf9cc8cb6488 public_html/lib-common.php
--- a/public_html/lib-common.php Sun Jan 09 19:34:38 2011 +0100
+++ b/public_html/lib-common.php Mon Jan 10 11:11:54 2011 -0500
@@ -3975,7 +3975,7 @@
$comma = ', ';
}
if ($description[$tag] != '') {
- $retval .= $comma . COM_Tooltip('[' . $tag . ':]', $description[$tag], $LANG01[132],'information');
+ $retval .= $comma . COM_Tooltip('[' . $tag . ':]', $description[$tag], '', $LANG01[132],'information');
} else {
$retval .= $comma . '[' . $tag . ':]';
}
@@ -5545,7 +5545,7 @@
return true;
} else {
if ($uid > 1) {
- if (($owner_id == $uid) && ($perm_owner >= $access)) {
+ if (($owner_id == $uid) && ($perm_owner >= $access)) {
return true;
}
@@ -5557,12 +5557,12 @@
return true;
}
} else {
- if ($perm_anon >= $access) {
+ if ($perm_anon >= $access) {
return true;
}
}
}
-
+
return $retval;
}
@@ -6746,13 +6746,14 @@
*
* @param string $hoverover Text or image to display for the user to hover their mouse cursor over.
* @param string $text Text for the actual tooltip. Can include HTML.
+* @param string $link Link for the tooltip. If passed, then the hoverover text becomes a link.
* @param string $title Text for the tooltip title (if there is one). Can include HTML.
* @param string $template Specify a different template to use (classic, critical, help, information, warning).
* @param string $class Specify a different tooltip class to use.
* @return string HTML tooltip
*
*/
-function COM_Tooltip($hoverover = '', $text = '', $title = '', $template = 'classic', $class = 'tooltip')
+function COM_Tooltip($hoverover = '', $text = '', $link = '', $title = '', $template = 'classic', $class = 'tooltip')
{
global $_CONF, $_IMAGE_TYPE;
@@ -6771,6 +6772,14 @@
$tooltip->set_var('hoverover', $hoverover);
$tooltip->set_var('text', $text);
$tooltip->set_var('title', $title);
+ if ($link == '') {
+ $link = '#';
+ $cursor = 'help';
+ } else {
+ $cursor = 'pointer';
+ }
+ $tooltip->set_var('link', $link);
+ $tooltip->set_var('cursor', $cursor);
$retval = $tooltip->finish($tooltip->parse('output', 'tooltip'));
return $retval;
More information about the geeklog-cvs
mailing list