Advanced search  

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]

Pages: [1]   Go Down

Author Topic: accessing files through the plugin config.  (Read 4467 times)

0 Members and 1 Guest are viewing this topic.

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
accessing files through the plugin config.
« on: November 10, 2007, 11:16:18 am »

Hello,

I am very confused about how to access a second page from the plugin config (the page that is the result of clicking on the plugin admin menu button).

I know that pages can be accessed through the forms of.

index.php?file=plugin/config
plugins/plugin/config.php

But when you have a url like "plugin.php?id=20" i have problems.

index.php?file=plugin/plugin.php?id=20 - will just go to the index page.
index.php?file=plugin/plugin?id=20 - will just go to the index page.
plugins/plugin/plugin.php?id=20 - either produces a "Not in Coppermine..." or  a failed to open stream include/init.inc.php

Now i understand that if the plugin has a second page and is accessed through the form of ?file= then it is not neccessary include init again. Whereas if init is not included and the page is accessed in the style of "plugins/plugin/plugin.php?id=20" then it works but not with $pageheader and $pagefooter as these vars are defined in init.

How is it possible to access a url of ?id= ?

thanks,
« Last Edit: November 12, 2007, 08:21:00 am by GauGau »
Logged
Tambien, Hablo Espaņol      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: accessing files through the plugin config.
« Reply #1 on: November 10, 2007, 02:15:48 pm »

I think i know what the problem might be.

Instead of $_GET['id'];

Would i need to do something with switches?
Logged
Tambien, Hablo Espaņol      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: accessing files through the plugin config.
« Reply #2 on: November 10, 2007, 02:25:16 pm »

index.php?file=plugin/plugin.php?id=20
index.php?file=plugin/plugin?id=20

these are just wrong

index.php?file=plugin/plugin.php&id=20
index.php?file=plugin/plugin&id=2

is much better

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: accessing files through the plugin config.
« Reply #3 on: November 10, 2007, 02:34:34 pm »

I knew it was wrong. That seems to work.

Thanks Stramm.
Logged
Tambien, Hablo Espaņol      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.