Help Icons and popups Help Icons and popups
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Help Icons and popups

Started by OmegaGOD, April 10, 2005, 05:28:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

OmegaGOD

Refering to CPG 1.4.x, can we change the implementation of the help icon pop-ups. Currently each help icon pops-up a new windows  Can we have it where it will reuse an open pop-up window if one has already been open. Then simply have the help window come to focus?

I am volunteering to code this if accepted.

--OmegaGOD
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

Tranz

should be straightforward, no? If they all have the same target name, like "help".

Joachim Müller

already changed the target name in the cvs (include/functions.inc.php). All that is left to do is set the focus properly (but only for windows triggered by the help icon).
@OmegaGOD: feel free to contribute some code that will accomplish what you're up to.

Joachim

OmegaGOD

#3
@GauGau

Made a few changes to functions.inc.php.

From File Rev. 1.183

Lines 2618-2628
function cpg_display_help($reference = 'f=index.htm', $width = '600', $height = '350') {
global $CONFIG, $USER;
if ($reference == '' || $CONFIG['enable_help'] == '0') {return; }
if ($CONFIG['enable_help'] == '2' && GALLERY_ADMIN_MODE == false) {return; }
$help_theme = $CONFIG['theme'];
if (isset($USER['theme'])) {
   $help_theme = $USER['theme'];
}
$help_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('docs/showdoc.php?css=" . $help_theme . "&amp;" . $reference . "','coppermine_help','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=" . $width . ",height=" . $height . "')\" style=\"cursor:help\"><img src=\"images/help.gif\" width=\"13\" height=\"11\" border=\"0\" alt=\"\" title=\"\" /></a>";
return $help_html;


Replace with:

function cpg_display_help($reference = 'f=index.htm', $width = '600', $height = '350') {
global $CONFIG, $USER;
if ($reference == '' || $CONFIG['enable_help'] == '0') {return; }
if ($CONFIG['enable_help'] == '2' && GALLERY_ADMIN_MODE == false) {return; }
$help_theme = $CONFIG['theme'];
if (isset($USER['theme'])) {
   $help_theme = $USER['theme'];
}
$help_html = "<a href=\"javascript:;\" onclick=\"coppermine_help_window=window.open('docs/showdoc.php?css=" . $help_theme . "&amp;" . $reference . "','coppermine_help','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=" . $width . ",height=" . $height . "'); coppermine_help_window.focus()\" style=\"cursor:help\"><img src=\"images/help.gif\" width=\"13\" height=\"11\" border=\"0\" alt=\"\" title=\"\" /></a>";
return $help_html;
}


When clicking a help icon, this will bring the help window to focus if there is a current help window open.

Just let me know if this gets commited.

--OmegaGOD
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

Joachim Müller

committed to devel branch, include/functions.inc.php v1.184

Joachim