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: How to prevent CPG1.3.2 access UNLESS inside pnCPG / postnuke  (Read 5479 times)

0 Members and 1 Guest are viewing this topic.

Beyond_Doubt

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
How to prevent CPG1.3.2 access UNLESS inside pnCPG / postnuke
« on: December 23, 2004, 12:03:06 am »

Hi,
How can I prevent access either directly to the stand alone install of CPG1.3.2, or through the use of a Right-Click 'Open in new window' situation?

Thanks in advance.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to prevent CPG1.3.2 access UNLESS inside pnCPG / postnuke
« Reply #1 on: December 23, 2004, 06:54:15 am »

hm, not really. There are some JavaScript tricks you could do that checks the parent frame of the window: if the parent frame equals the current frame, you could make the page reload (redirecting to the nuked site). I wouldn't advice to do so, visitors usually have a reason for opening a frame in a new window.

Joachim
Logged

Beyond_Doubt

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: How to prevent CPG1.3.2 access UNLESS inside pnCPG / postnuke
« Reply #2 on: December 23, 2004, 09:23:45 pm »

Ah. Well as I intended to use a postnuke mod that required all users to be authorized before viewing the gallery at all, then this seems to make this combination useless to me. Wish I'd asked before spending a few days setting things up :(
As it stands even an un-reged person could open the link the gallery bypassing the postnuke 'security'; which is not good enough as I am intending to keep the gallery totally private unless granted admin access.

So it looks like I need a full module application.

Back to CPGNuke then, and trying to existing convert phpnuke to work.
Logged

casNuy

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 671
  • My other hobby
    • Nuy Community
Re: How to prevent CPG1.3.2 access UNLESS inside pnCPG / postnuke
« Reply #3 on: December 23, 2004, 10:08:40 pm »

No problem, there is a solution to this  (actually thought this was also available in the readme that comes with pncpg):

Only PostNuke access
====================
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');

enjoy,
Cas
Logged

Beyond_Doubt

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: How to prevent CPG1.3.2 access UNLESS inside pnCPG / postnuke
« Reply #4 on: December 24, 2004, 01:46:35 am »

That's excellent, I'll try that tomorrow :)
Grateful to you that the days of work aren't being lost.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 17 queries.