/************************************************************************/
/* pnCPG       (/pndocs/readme.txt)                                */
/************************************************************************/

The pnCPG hack for Postnuke 0.72x is very simple and requires no tables in the DB.

Basically what this hack does is that it tries to log on the current Postnuke user within Coppermine.
If the user is known, automatically this user will be logged on.
There is no database integration, this hack only offers seamingless logon pass-through.

Tested with :
Postnuke 0.72x
Coppermine 1.3
Linux/Windows

Location of the Coppermine installation is not important.

INSTALLATION
======================
1.  Unzip the contents to your /modules directory.
2.  Copy pnCPG\Coppermine/index_pn.php to your Coppermine root directory. (mandatory)
3.  Initialise & activate the module
4.  Go to the AdminPanel and set the directory of Coppermine
5.  Link the module into a menu block as : {pnCPG}
	or as :
	{pnCPG:main&task=users} to have a direkt link into a users gallery
6.  Make this link only available to Registered Users through Permissions (unless you allow guest access).
7.  Add a new block and set your preferences for that


If you have installed Coppermine itself in the modules directory of PostNuke, you will need to remove a check within index.php of Coppermine.
Please remove the following code :
// Check if standalone is installed in a portal like phpNuke (added by DJMaze)
$DIR=preg_split("/[\/\\\]/",dirname($_SERVER["SCRIPT_NAME"] ? $_SERVER["SCRIPT_NAME"] : $HTTP_SERVER_VARS["SCRIPT_NAME"]));
if ($DIR[count($DIR)-2] == "modules") {
    echo "<html><body><h1>ERROR</h1>You installed the standalone Coppermine into your Nuke portal.<br>".
         "Please download and install a CPG Port: <a href=\"http://sourceforge.net/project/showfiles.php?group_id=89658\">CPG for PostNuke OR CPG for PHPnuke</a></body></html>";
    die();
} // end check

How to remove the Logout option within Coppermine (Thanks to Larry Elchuk)
=================================================
Open up profile.php
Delete/Comment line 242 (ability to change the Coppermine password).
<input type="submit" name="change_pass" value="{$lang_register_php['change_pass']}" class="button">

In each theme.php, you have to delete/comment the Logout section.
As a sample ,theme is mac_os_x :
In coppermine/themes/mac_os_x/theme.php delete/comment lines 51-53 :

What's new in version 2.3
=========================
Ability to link to category (only from the menu)
Just call the module as :
	{pnCPG:main&category=2}
or	{pnCPG:main&category=3&lang=italian}

What's new in version 2.2
=========================
Option to set default language in administration
Option to override default language when calling the module (not valid for side-blocks)
Just call the module as :
	{pnCPG:main&lang=italian}
or	{pnCPG:main&task=users&lang=italian}


Corrections for the random sideblock.

What's new in version 2.1
=========================
Support for the final release of Coppermine 1.3
Additional feature for sideblock

What's new in version 2.0
=========================
Support for the latest version of Coppermine 1.3
Support for external database.
Blocks now adhere to authorization settings from Coppermine ( I hope).
German language files (thanks to Bernard Zaunseder)


What's new in version 1.6
=========================
Support for the latest version of Coppermine 1.2.1
Have added a scrolling side block for Postnuke.

What's new in version 1.5
=========================
Re-introduced the Guest account, now as option.
Have added a multi-purpose side block for Postnuke.
Random photo; Last Changed Album; last changed photo
Option to set menu-item directly into usermenu.

What's new in version 1.4
=========================
The integration hack has been fully revised. No longer using cookies, no  longer using standard Coppermine code.
The whole access is taken care of in a separate script.

BLOCK SETTINGS
==============
When you setup the block, there are some settings that need explaining.
You can choose to use a Java menu  for options.
If you choose "yes" :
you can choose to load the java-component, it defaults to Yes but there might be another app that already loaded it, in that case change the setting to "n".
You can choose where the menu pop ups, Left or Right from the mosue. Choose the opposite direction of the side you are placing the block.

Applications using same Java library :
PostCalandar
pnChangeLog

TIPS
=====
In order to have the application opened in a separate New Window (full screen) do the following :
Create a Core/HTML block with the following contents :
<a href="index.php?module=pnCPG&func=main" target=_blank">Coppermine</a>
Make sure that in Admin Panel you have checked the Full Screen option



In addition one needs to change a few files in Coppermine to have people always routed through pnCPG.
Insert the following code :
if (!USER_ID) cpg_die(ERROR, '<a href=../index.php?module=pnCPG&func=main target=_top>Click here to access the Gallery</a>', __FILE__, __LINE__);
into the following files :
index.php, thumbnails.php, search.php, dispaly(image/card).php and showthumb.php
Insert this code just after :
require('include/init.inc.php');




FINALLY
========================
In the admin panel, there is a checkbox in order to sync the PN users with Coppermine.
