accessing files through the plugin config. accessing files through the plugin config.
 

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

accessing files through the plugin config.

Started by just_some_guy, November 10, 2007, 11:16:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

just_some_guy

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,
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

I think i know what the problem might be.

Instead of $_GET['id'];

Would i need to do something with switches?
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

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

I knew it was wrong. That seems to work.

Thanks Stramm.
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