Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, May 1, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  operation cgi value in new ver 5.5

phpMyEdit General     operation cgi value in new ver 5.5
Post new topic   Reply to topic    
 
defiant     Joined: 06 Apr 2006   Posts: 3  
Post Posted: 2006-04-06 14:38
Back to top  Reply with quote     

I'm having trouble accessing the cgi variable operation. I can't for some reason get this value. My code:
Code:

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:
Code:

$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     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2006-04-07 08:22
Back to top  Reply with quote     

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     Joined: 06 Apr 2006   Posts: 3  
Post Posted: 2006-04-07 12:31
Back to top  Reply with quote     

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 wrote:
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     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2006-04-07 13:06
Back to top  Reply with quote     

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     Joined: 06 Apr 2006   Posts: 3  
Post Posted: 2006-04-07 17:03
Back to top  Reply with quote     

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     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2006-04-13 17:33
Back to top  Reply with quote     

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

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy