| Index
» Projects
» phpMyEdit
» Forum
» page mode and language |
 |
hbernard
Joined: 23 Mar 2003
Posts: 159
Location: FRANCE
Posted: 2004-04-13 11:48
Back to top
Reply with quote
|
| Doug Hockinson wrote: |
Will the following code work as expected if the user's HTTP_ACCEPT_LANGUAGE is _NOT_ English? Or is there a better method to determine if the current page mode is List mode?
| Code: |
$opts['language'] =
$HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];
$operation = $HTTP_GET_VARS['operation'];
if(!isset($operation)) {
$operation = $HTTP_POST_VARS['operation'];
}
if(
$operation == ''
&& $moreadd != 'More'
&& $morechange != 'Apply'
)
{
// Current page operation is List mode
}
|
|
Well, page_type should be an hidden variable of every forms in PME., but this is not the case.
Sorry, this will not work in other languages.
But if you use some cut and paste from the main class, you may directly replace 'More' and 'Apply' with good translated labels.
Then, this will work.
But, as said, page_type should be an available cgi value, but this this is not the case currently
_________________ hbernard - phpMyEdit updater.
|
michal
Joined: 17 Jun 2003
Posts: 537
Location: Slovakia
Posted: 2004-04-13 12:21
Back to top
Reply with quote
|
this will not work even for english users. i have pme configured (on same pages) to jump directly to view mode after insert.
|
|
Post new topic
Reply to topic
|
|
|
|