| Index
» Projekty
» phpMyEdit
» Fórum
» operation cgi value in new ver 5.5 |
 |
defiant
Založený: 06.04.2006
Príspevky: 3
Zaslal: 2006-04-06 14:38
Návrat hore
Odpovedať s citátom
|
I'm having trouble accessing the cgi variable operation. I can't for some reason get this value. My code:
| Kód: |
echo 'hello world'
echo $opts['cgi']['PME_cust_op_operation'];
echo $opts['cgi']['PME_cust_op_']['operation'];
echo $opts['cgi']['PME_op_']['operation'];
echo $opts['cgi']['PME_op_operation'];
echo $opts['cgi']['operation'];
|
None of these seem to provide the current / previous operation, ie add, view, list etc.
The line:
| Kód: |
$opts['cgi']['prefix']['operation']='PME_cust_op';
|
I have this at the top of the php code block, only hello world is output.
Any suggestions?[/code]
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2006-04-07 08:22
Návrat hore
Odpovedať s citátom
|
where are you trying to access the variable ? in trigger, in external page ? afaik, it is hard to know which page (L or V) you are on.
|
defiant
Založený: 06.04.2006
Príspevky: 3
Zaslal: 2006-04-07 12:31
Návrat hore
Odpovedať s citátom
|
Thanks for your response,
I have tried it in list-view,
from change to list-view,
from view to list-view.
I have the code on top, before the include phpmyedit class, and after it, right before and after the start and end delimeters for php code. I have looked through the html source of most of the pages and havn't found any hidden text fields for operation, just *sys* hidden fields. Is there another way of determining which operation was carried out? I am trying to adjust the column views based on the operation that was just carried out, ie display some columns in view mode and not display them in list-view etc.
| michal Napísal: |
| where are you trying to access the variable ? in trigger, in external page ? afaik, it is hard to know which page (L or V) you are on. |
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2006-04-07 13:06
Návrat hore
Odpovedať s citátom
|
you can use | parameter for that purpose, see http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.options-variability.html
getting the page mode is very hard, eg, you can have a trigger to jump to view mode after add, etc.
|
defiant
Založený: 06.04.2006
Príspevky: 3
Zaslal: 2006-04-07 17:03
Návrat hore
Odpovedať s citátom
|
I'm willing to give it a try.
Were you able to get it working? Is the documentation correct or am I messing up somewhere?
Your suggestion is very good, but I want to run different blocks of php code depending on operation state.
Let me know how you got it to work if you were able to do so.
Thanks
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2006-04-13 17:33
Návrat hore
Odpovedať s citátom
|
i can say it is impossible to _reliably_ know the operation before running pme class. you can know it in the middle or after running the class (and displaying everything).
use | feature (as i said above), buttons for different modes, ...
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|