phirschybar
Založený: 18.09.2003
Príspevky: 43
Zaslal: 2003-09-18 02:49
Návrat hore
Odpovedať s citátom
|
Hi Nepto and others... great script!!!
I have an image upload script/form that I use to simultaneously upload images to a folder and insert the corresponding URL into my database. I have integrated this script with phpMyEdit pages by placing it below the table into which the data is inserted.
However, my problem is that I only want to show the Upload script when I am viewing the main listing and not VIEW, ADD, CHANGE, etc.
Are there variables present via _POST which signify what view you are currently in so I can check to make sure I am in the LIST view? I'm sure there is a way.
Thanks.
Ben
|
nepto
Založený: 06.01.2003
Príspevky: 320
Bydlisko: Phoenix, Arizona (USA)
Zaslal: 2003-09-20 18:32
Návrat hore
Odpovedať s citátom
|
There are several ways. I cannot reliably say what is the best one, however you can check if
$_REQUEST['operation']
is set. If so you are not in list mode.
I do no know how this will affect table filtering. Try it. And let me know if this helps you.
|
phirschybar
Založený: 18.09.2003
Príspevky: 43
Zaslal: 2003-09-20 18:45
Návrat hore
Odpovedať s citátom
|
Thanks Nepto...
I will try checking for this variable. Can you tell me the variables that are set to indicate the mode you are in? Occaisonally, I like to add additional notes or images that will only be displayed specifically on the ADD, or EDIT pages for a ceratin table.
I looked through the documentation and throughout this forum and can't find anything relevant. I figured people would want this functionality and am surprised that it hasn't been brought up.
I will let you know how your suggestion worked out.
Ben
|
phirschybar
Založený: 18.09.2003
Príspevky: 43
Zaslal: 2003-09-21 17:01
Návrat hore
Odpovedať s citátom
|
IT WORKED! isset($_REQUEST['operation']) returned false when in LIST mode and true when not. Good solution. Not sure how this affects table filtering because I have set my own filter and dont use the built in one. I'm still curious about the variables that indicate WHICH mode you're in.
Thanks.
Ben
|
nepto
Založený: 06.01.2003
Príspevky: 320
Bydlisko: Phoenix, Arizona (USA)
Zaslal: 2003-09-22 13:44
Návrat hore
Odpovedať s citátom
|
Problem could be if someone will set
operation
to some dummy value, for example
foo
.
Isset()
will return true, however list mode will be used.
I can consider some reliable way how to detect used mode. Preferably via some method - for example
phpMyEdit::get_mode()
.
|
phirschybar
Založený: 18.09.2003
Príspevky: 43
Zaslal: 2003-09-22 17:58
Návrat hore
Odpovedať s citátom
|
Please let me know if you come up with anything. I would like to add an image to ONLY the ADD view to show people using the PhpMyEdit CMS what part of the Web site they are updating visually. Sometimes they get confused when they only see a table and texual description.
Do you know of a way to check to see if we are ONLY in the ADD mode similar to the way we checked to see if we were in LIST mode?
Thanks NEPTO!!!
Ben
|
nepto
Založený: 06.01.2003
Príspevky: 320
Bydlisko: Phoenix, Arizona (USA)
Zaslal: 2003-09-23 09:03
Návrat hore
Odpovedať s citátom
|
Try
operation = 'add'
or something like that. This may change according to selected phpMyEdit language.
|
|
Odoslať novú tému
Odpovedať na tému
|