PDA

View Full Version : &action=INVALID


Davey
02-23-2003, 05:30 PM
I'm trying to come up with a hack where if the action is invalid, it reports an error (template: error_invalidaction).
It works fine, except I've only done it for member.php.
So if you go to:
member.php?s=&action=getinfo&userid=1
This will work. However:
member.php?s=&action=blahblah
This will give a blank page. I'm trying to make it report the error_invalidaction template. And I have got it working fine, too.
Trouble is, look at the amount of files there are to hack!
I don't fancy making instructions to add that bit of code to the necessarry place of each and every file, and I'm positive people wouldn't want to edit each and every file just to install this hack.
There must be an easier way to place it in each file, no?

Dave.

Xenon
02-23-2003, 06:36 PM
you can add a large block to global.php or the nicer way is to create a new file and just include it to global.php.

but then you must be sure to add every action which can appear on whichever file :)

Davey
02-23-2003, 06:38 PM
Huh?

Dave.

Xenon
02-23-2003, 06:51 PM
*rereads own post*
hmm, should be clear....

global.php is called from every single file on the board, so if you put the invalid action handling into this file (or a file required from global.php) it would work as you want.

Davey
02-23-2003, 06:58 PM
Actually it's this bit I didn't understand.
Originally posted by Xenon

but then you must be sure to add every action which can appear on whichever file :)
Dave.

Xenon
02-23-2003, 08:04 PM
well, if you forgot any action which could appear, you'd get a invalid action error everytime.

for example you've added all actions just forgot the combination:
editpost.php action=doeditpost.
then it seems that you can edit a post, but when submitting it the error will occur..

Davey
02-23-2003, 08:57 PM
Oh this seems too complicated for me at this time then.
Cheers anyway.

Dave.