Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Help Icons and popups  (Read 3531 times)

0 Members and 1 Guest are viewing this topic.

OmegaGOD

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • I approve.
Help Icons and popups
« on: April 10, 2005, 05:28:42 pm »

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
« Last Edit: April 11, 2005, 07:22:26 am by GauGau »
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Help Icons and popups
« Reply #1 on: April 10, 2005, 05:33:11 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Help Icons and popups
« Reply #2 on: April 10, 2005, 10:03:12 pm »

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
Logged

OmegaGOD

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • I approve.
Re: Help Icons and popups
« Reply #3 on: April 11, 2005, 03:48:41 am »

@GauGau

Made a few changes to functions.inc.php.

From File Rev. 1.183

Lines 2618-2628
Code: [Select]
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:

Code: [Select]
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
« Last Edit: April 11, 2005, 04:04:09 am by OmegaGOD »
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Help Icons and popups
« Reply #4 on: April 11, 2005, 07:22:06 am »

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

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 21 queries.