hi everyone, Well i have made some changes towards implementing the AJAX UI in form of a plug-in with slight change to the native code.
1. Created the folder ajaxUI in the root directory which will house all the files related to the AJAX UI. This folder will be helpful as this will house all the code for the ajax UI.
2. Added 2 new variables in the $cfg array in config.default.php. here is a snippet of the added code
/**************************************************************************************** * Ajax UI config variables * */
/** * Advanced Ajax UI feature can be disable by the Admin * * @global boolean cfg['advancedAjaxInterface'] */
$cfg['advancedAjaxInterface'] = TRUE;
/** * Advanced Ajax UI feature can be disable by the Admin * * @global string cfg['pma_current_UI'] * @possible values 'advanced' 'standard' * @default "standard" */
$cfg['pma_current_UI'] = 'standard';
The Administrator can choose to enable or disable the ajax interface using the config variable and in that case the option (mentioned in the next point) will not be displayed.
3. Added the user option to select his current interface according to his need. (check the attached image).
4, Modified files like sql.php to get the desired html output suitable for the Ajax interface if selected by the user (BY checking the value of $cfg['pma_current_UI'] ).
but I am struck in the *./libraries/common.inc.php *becoz this file converts the all the POST and GET variables in to $_REQUEST variables and loads the $cfg variables into $GLOBALS.
The thing is that I want to modify the value of one of $GLOBALS['cfg'] ['pma_current_UI'] variable but could not do that as my $_POST variable is disappearing mysteriously ;)
Any idea where I am going wrong.
Hi
Dne Mon, 29 Mar 2010 02:11:47 +0530 Rohit Kalhans rohit.kalhans@gmail.com napsal(a):
Well i have made some changes towards implementing the AJAX UI in form of a plug-in with slight change to the native code.
- Created the folder ajaxUI in the root directory which will house all the
files related to the AJAX UI. This folder will be helpful as this will house all the code for the ajax UI.
- Added 2 new variables in the $cfg array in config.default.php. here is a
snippet of the added code
/****************************************************************************************
- Ajax UI config variables
*/
/**
- Advanced Ajax UI feature can be disable by the Admin
- @global boolean cfg['advancedAjaxInterface']
*/
$cfg['advancedAjaxInterface'] = TRUE;
/**
- Advanced Ajax UI feature can be disable by the Admin
- @global string cfg['pma_current_UI']
- @possible values 'advanced' 'standard'
- @default "standard"
*/
$cfg['pma_current_UI'] = 'standard';
The Administrator can choose to enable or disable the ajax interface using the config variable and in that case the option (mentioned in the next point) will not be displayed.
What would be reason for enabling/disabling AJAX? AJAX should not be intrusive and when user does not have enabled javascript, all should work as it works right now. I also don't get the difference between these two configuration options.
- Added the user option to select his current interface according to his
need. (check the attached image).
Same applies as above.
4, Modified files like sql.php to get the desired html output suitable for the Ajax interface if selected by the user (BY checking the value of $cfg['pma_current_UI'] ).
but I am struck in the *./libraries/common.inc.php *becoz this file converts the all the POST and GET variables in to $_REQUEST variables and loads the $cfg variables into $GLOBALS.
The thing is that I want to modify the value of one of $GLOBALS['cfg'] ['pma_current_UI'] variable but could not do that as my $_POST variable is disappearing mysteriously ;)
Probably you are missing token for XSS protection and request variables are filtered.
On Mon, Mar 29, 2010 at 5:18 PM, Michal Čihař michal@cihar.com wrote:
Hi
Dne Mon, 29 Mar 2010 02:11:47 +0530 Rohit Kalhans rohit.kalhans@gmail.com napsal(a):
Well i have made some changes towards implementing the AJAX UI in form of
a
plug-in with slight change to the native code.
- Created the folder ajaxUI in the root directory which will house all
the
files related to the AJAX UI. This folder will be helpful as this will
house
all the code for the ajax UI.
- Added 2 new variables in the $cfg array in config.default.php. here is
a
snippet of the added code
/****************************************************************************************
- Ajax UI config variables
*/
/**
- Advanced Ajax UI feature can be disable by the Admin
- @global boolean cfg['advancedAjaxInterface']
*/
$cfg['advancedAjaxInterface'] = TRUE;
/**
- Advanced Ajax UI feature can be disable by the Admin
- @global string cfg['pma_current_UI']
- @possible values 'advanced' 'standard'
- @default "standard"
*/
$cfg['pma_current_UI'] = 'standard';
The Administrator can choose to enable or disable the ajax interface
using
the config variable and in that case the option (mentioned in the next point) will not be displayed.
What would be reason for enabling/disabling AJAX? AJAX should not be intrusive and when user does not have enabled javascript, all should work as it works right now. I also don't get the difference between these two configuration options.
The Idea behind enabling and disabling AJAX is that I am trying to develop it as a plug-in to the existing code, and the user can choose not to use this feature. Since PMA is also being used by many hosting sites apart from personal users, this may be up to the discretion of the service provider to use this plug-in. he may uninstall this plug-in by changing the cfg['advancedAjaxInterface'] to FALSE and the plug-in even it is installed will be inactive and if the user(service provider) feels like people should use this plug-in he just have to change the value of the above mentioned variable.
I have past experiences with Ajax and a few of them are not pretty gud. At times when using ajax, on a slow connection (or for a busy server), this becomes a problem more than a feature. this does not make AJAX intrusive but on the contrary provides a flexibility to either use or do not use this functionality (for the person who has installed PMA ) .
- Added the user option to select his current interface according to his
need. (check the attached image).
Same applies as above.
This is for the user to make a choice whether or not he wants to use this feature or not. Say, he has to log in remotely, of from a different browser which does not support JAVASCRIPT. Even though this can be detected but what about old browsers (IE-6 etc which support javascript but are pretty slow with JavaScript and may bore the user to death :) ) and slow net-connections(say the user is using in prime-time). The user may need to just load a basic html view and this drop-down box provides him an option to do that. However the default view takes care of the the graceful degradation even if JavaScript is not enabled, (or present). Also if the user chooses to use the Advanced UI and if javascript is not present or enabled PMA will switch back to the normal view as it isnow with an alert to the user.
The same technique is being used by ZIMBRA http://www.zimbra.com/ and GMAIL.
4, Modified files like sql.php to get the desired html output suitable
for
the Ajax interface if selected by the user (BY checking the value of $cfg['pma_current_UI'] ).
but I am struck in the *./libraries/common.inc.php *becoz this file
converts
the all the POST and GET variables in to $_REQUEST variables and loads
the
$cfg variables into $GLOBALS.
The thing is that I want to modify the value of one of $GLOBALS['cfg'] ['pma_current_UI'] variable but could not do that as my $_POST variable
is
disappearing mysteriously ;)
Probably you are missing token for XSS protection and request variables.
are filtered.
Well i got that and now the code is working fine. Thanx newaz. for now i have a different concern. Can a git repository be accessed through a http proxy like squid?
-- Michal Čihař | http://cihar.com | http://blog.cihar.com
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Hi
Dne Mon, 29 Mar 2010 17:55:13 +0530 Rohit Kalhans rohit.kalhans@gmail.com napsal(a):
The Idea behind enabling and disabling AJAX is that I am trying to develop it as a plug-in to the existing code, and the user can choose not to use this feature. Since PMA is also being used by many hosting sites apart from personal users, this may be up to the discretion of the service provider to use this plug-in. he may uninstall this plug-in by changing the cfg['advancedAjaxInterface'] to FALSE and the plug-in even it is installed will be inactive and if the user(service provider) feels like people should use this plug-in he just have to change the value of the above mentioned variable.
Let's forget about making plugin, you will really have to touch lot of code (or duplicate it), so it really can not be separated.
I have past experiences with Ajax and a few of them are not pretty gud. At times when using ajax, on a slow connection (or for a busy server), this becomes a problem more than a feature. this does not make AJAX intrusive but on the contrary provides a flexibility to either use or do not use this functionality (for the person who has installed PMA ) .
And that only answered part of the question, why do you need two configuration options?
Yes, it probably makes sense to have single option to disable AJAX.
This is for the user to make a choice whether or not he wants to use this feature or not. Say, he has to log in remotely, of from a different browser which does not support JAVASCRIPT. Even though this can be detected but what about old browsers (IE-6 etc which support javascript but are pretty slow with JavaScript and may bore the user to death :) ) and slow net-connections(say the user is using in prime-time). The user may need to just load a basic html view and this drop-down box provides him an option to do that. However the default view takes care of the the graceful degradation even if JavaScript is not enabled, (or present). Also if the user chooses to use the Advanced UI and if javascript is not present or enabled PMA will switch back to the normal view as it isnow with an alert to the user.
The same technique is being used by ZIMBRA http://www.zimbra.com/ and GMAIL.
Well I don't think this should be handled so specially. For now, use just setting in config file and user will be able to change it once per user preferences will be implemented (hopefully someone will finish it this GSoC).
Can a git repository be accessed through a http proxy like squid?
See http://wiki.phpmyadmin.net/pma/Devel:Git#Accessing_Git_repository_from_behin...
hi,
On Mon, Mar 29, 2010 at 6:28 PM, Michal Čihař michal@cihar.com wrote:
Hi
Dne Mon, 29 Mar 2010 17:55:13 +0530 Rohit Kalhans rohit.kalhans@gmail.com napsal(a):
The Idea behind enabling and disabling AJAX is that I am trying to
develop
it as a plug-in to the existing code, and the user can choose not to use this feature. Since PMA is also being used by many hosting sites apart
from
personal users, this may be up to the discretion of the service provider
to
use this plug-in. he may uninstall this plug-in by changing the cfg['advancedAjaxInterface'] to FALSE and the plug-in even it is
installed
will be inactive and if the user(service provider) feels like people
should
use this plug-in he just have to change the value of the above mentioned variable.
Let's forget about making plugin, you will really have to touch lot of code (or duplicate it), so it really can not be separated.
Thats what i was trying to do all these days, figuring out the ways to implement what i suggested with minimal changes to the native code and i was successful. I was, however unable to create the patch (using git) but i'll attach the modified code files as an attachment in 2 to 3 days,( if I am still unable to use git, i am still trying to figure out the problem) and you can have a look at it and then make the decision :).
I have past experiences with Ajax and a few of them are not pretty gud.
At
times when using ajax, on a slow connection (or for a busy server), this becomes a problem more than a feature. this does not make AJAX intrusive
but
on the contrary provides a flexibility to either use or do not use this functionality (for the person who has installed PMA ) .
And that only answered part of the question, why do you need two configuration options?
Yes, it probably makes sense to have single option to disable AJAX.
The first option [from config file] will disable AJAX permanently and the second one will disable it for just a given session. I will suggest that you take a look at the modified code because that will make the functionality clearer. I think i am not able to explain properly.
This is for the user to make a choice whether or not he wants to use
this
feature or not. Say, he has to log in remotely, of from a different
browser
which does not support JAVASCRIPT. Even though this can be detected but
what
about old browsers (IE-6 etc which support javascript but are pretty slow with JavaScript and may bore the user to death :) ) and slow net-connections(say the user is using in prime-time). The user may need
to
just load a basic html view and this drop-down box provides him an
option
to do that. However the default view takes care of the the graceful degradation even if JavaScript is not enabled, (or present). Also if the user chooses to use the Advanced UI and if javascript is not present or enabled PMA will switch back to the normal view as it isnow with an alert
to
the user.
The same technique is being used by ZIMBRA http://www.zimbra.com/ and GMAIL.
Well I don't think this should be handled so specially. For now, use just setting in config file and user will be able to change it once per user preferences will be implemented (hopefully someone will finish it this GSoC).
Can a git repository be accessed through a http proxy like squid?
See
http://wiki.phpmyadmin.net/pma/Devel:Git#Accessing_Git_repository_from_behin...
-- Michal Čihař | http://cihar.com | http://blog.cihar.com
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Hi
Dne Tue, 30 Mar 2010 04:22:34 +0530 Rohit Kalhans rohit.kalhans@gmail.com napsal(a):
Thats what i was trying to do all these days, figuring out the ways to implement what i suggested with minimal changes to the native code and i was successful. I was, however unable to create the patch (using git) but i'll attach the modified code files as an attachment in 2 to 3 days,( if I am still unable to use git, i am still trying to figure out the problem) and you can have a look at it and then make the decision :).
I added some hints about exporting patches to our wiki:
http://wiki.phpmyadmin.net/pma/Devel:Git#Exporting_patches
The first option [from config file] will disable AJAX permanently and the second one will disable it for just a given session.
Well then it does not make sense to have it in config file, the session can update the option from config file.
hi ,
On Tue, Mar 30, 2010 at 2:00 PM, Michal Čihař michal@cihar.com wrote:
Hi
Dne Tue, 30 Mar 2010 04:22:34 +0530 Rohit Kalhans rohit.kalhans@gmail.com napsal(a):
Thats what i was trying to do all these days, figuring out the ways to implement what i suggested with minimal changes to the native code and i
was
successful. I was, however unable to create the patch (using git) but
i'll
attach the modified code files as an attachment in 2 to 3 days,( if I am still unable to use git, i am still trying to figure out the problem) and you can have a look at it and then make the decision :).
I added some hints about exporting patches to our wiki:
http://wiki.phpmyadmin.net/pma/Devel:Git#Exporting_patches
I tried using the git over http on the link
http://repo.or.cz/r/phpmyadmin.git
but the server returned a 403 header. Do i need to supply some username or password to be able to use the repo?
The first option [from config file] will disable AJAX permanently and the
second one will disable it for just a given session.
Well then it does not make sense to have it in config file, the session can update the option from config file.
-- Michal Čihař | http://cihar.com | http://blog.cihar.com
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Hi
Dne Wed, 31 Mar 2010 18:36:13 +0530 Rohit Kalhans rohit.kalhans@gmail.com napsal(a):
I tried using the git over http on the link
http://repo.or.cz/r/phpmyadmin.git
but the server returned a 403 header. Do i need to supply some username or password to be able to use the repo?
Both accessing it from browser or using 'git clone http://repo.or.cz/r/phpmyadmin.git/' works fine for me. Maybe your proxy prevents access there?