Contributions
Edit Languages
This is edit_textdata.php and supporting files.
This works in MS1 and MS2.
This will allow you or your client who has an OSCommerce store to modify the
various language files without having to know PHP. In the present way
you do it, you use the Define Languages under Tools, which is fine, but you
have to know too much PHP to be comfortable with it. My client wants to be
able to modify that text without having to bother me.
I had found another program in the contributions that is similar to this
but it was not robust enough to handle the parsing and reassembly of the
files after an edit.
The heart of this module is a robust parser. I wish I had a YACC for
PHP, maybe someone knows of one. Short of YACC and some BNF parser this
will do well.
The parser can handle structures like:
define ('TITLE_TEXT', 'Howdy, not dont be a stranger');
as well as
define ('DATE_FORMAT_A', DATE_FORMAT . 'more stuff');
It ignores whitespace and other things.
This includes a set of help html files an picture tutorials to show
you how to operate it.
The only thing that I forgot to mention in the Help is that the user
must escape apostrophes such as don't, and of course linefeeds n.
To use it gunzip and untar in the admin directory. Then modify the
Tools box to add this to the end of it.
The main entry point is edit_textdata.php.
Please Feel free to incorporate this into OSCommerce, I give free license
to do so.
Julian Brown
julian@jlbprof.com
Expand All / Collapse All
This is a Japanese translation.
- i added more german translation for the pages
- textareas are bigger if there is a lot of tex t in them
- i started a hacking prevention: eval() and system() is forbidden, but thats far from enough ;)
todo:
- search for the capital lettered Constants would be nice
the last version was possible to handle the quotes, but it did addslash them all.
this update only adds a slash to quotes which are not behind a dot or followed by a dot and not at the beginning and end of the strings.
two more features:
- search is not case sensitive anymore
- a german translation for the page-Names is added
here are the To Do's i found out have to be done:
- a backslash at the end of a box distorts the textarea somehow
- a protection against hacking should be implemented,
at the moment it is possible to put PHP code into the language-php-files through this tool (like DB_PASSWORD ...)
the former version was bugy, a file was missing, so dont upload that one!!!
!!! this one is the correct one !!!
and i also added two more fixes:
- changed the form to method="POST"
- links were treated as comments, cause they have // in it
to put it all together, i included all modified files in this package
and i fixed some bugs:
- added htmlspecialchars to the textarea content
- fixed the bug with sigle-quotes '...'
- altered the border style of the tables (they looked ugly with: border=1 cellspacing=2 )
(but without turkish language)
for a new installation of osCommerce you can simply copy all files in admin over the admin folder in your shop.
all files that have to be modified are included in my package.
credits goes to the author Julian Brown.
It is necessary to make really small changes to your osCommerce installation.
changes & bug-fixes:
- separated english into the language directory; added german and turkish; adding new languages is easy now
- now you can switch between the languages while translation and editing (don't forget to safe before :) )
- the search after switching to another language is functioning now
- enabled switching 'on/off' the left admin navigation
- partial support of english, german and turkish in the admin area
NOTE: I am working with MS2.2. Therefore I cannot garant for MS1. Someone should publish changes if problems occure.
To Do:
- all buttons should be implemented as in other modules of MS2 (uniform look and feel)
- maybe the help files could be translated into german and turkish
- it should be able to switch after search to another language while keeping all results
- there is a little bug after search, which appears sometimes. The button safe vanish from display.
- combination of multi admin level (= 'editing restriction' to avoid misconfiguration of important files)
Do the following 5 steps and enjoy it!
Nejat Philp Eyigit
04-08-10
This is edit_textdata.php and supporting files.
This works in MS1 and MS2.
This will allow you or your client who has an OSCommerce store to modify the
various language files without having to know PHP. In the present way
you do it, you use the Define Languages under Tools, which is fine, but you
have to know too much PHP to be comfortable with it. My client wants to be
able to modify that text without having to bother me.
I had found another program in the contributions that is similar to this
but it was not robust enough to handle the parsing and reassembly of the
files after an edit.
The heart of this module is a robust parser. I wish I had a YACC for
PHP, maybe someone knows of one. Short of YACC and some BNF parser this
will do well.
The parser can handle structures like:
define ('TITLE_TEXT', 'Howdy, not dont be a stranger');
as well as
define ('DATE_FORMAT_A', DATE_FORMAT . 'more stuff');
It ignores whitespace and other things.
This includes a set of help html files an picture tutorials to show
you how to operate it.
The only thing that I forgot to mention in the Help is that the user
must escape apostrophes such as don't, and of course linefeeds n.
To use it gunzip and untar in the admin directory. Then modify the
Tools box to add this to the end of it.
The main entry point is edit_textdata.php.
Please Feel free to incorporate this into OSCommerce, I give free license
to do so.
Julian Brown
julian@jlbprof.com
Note: Contributions are used at own risk.