MODX is an XML format for describing simple and complex text and SQL changes in web applications. The phpBB.com Modifications Team uses MODX for phpBB3.0 MODs.
This consists of several parts, firstly MODX itself is the XML file format and is described by the modx1.0 XSD (XML Schema) The schema is what defines what you can and cannot put into a MODX file, and allows standard XML validators to validate MODX documents.
mEAL uses the .Net Framework (or mono) XML Reader to do schema validation, but any validator will report the same.
The last part if the stylesheet. Because no version of EasyMOD currently exists to install MODX, this is what everyone who installs a MOD will see.
The stylesheet (XSLT) is a standard set by W3C, and allows us to transform MODX into (x)HTML.
Currently the MOD Team has two standard stylesheets for use with MODX. Firstly a subSilver stylesheet for use with phpBB2.0 MODs, and secondly a prosilver stylesheet for use with phPBB3.0 MODs.
The prosilver stylesheet is cool because of the i18n opportunity it introduces through AJAX.
Unfortunately due to browser security, it does not work in Opera.
- What is i18n?
- Internationalisation. i 18 characters n.
- What does MODX stand for?
- MODification Xml
- Is it only used in phpBB?
- It was developed for phpBB, but anyone can use it.
- What languages are avaliable in MODX?
- A list of languages currently avaliable here. If your language is missing, prod the language pack maintainer for phpBB3 for your language.
- What exactly prevents it from functioning in Opera?
- Browser Security. It is Opera's opinnion that Cross Domain AJAX should not be allowed period. Going from Localhost to the internet is considered cross domain. It has to cross a security zone to do this. Currently Firefox and IE make you accept the security concequences before continuing. This effectively weakens the prospect of using the web browser as an application programming model. It may be possible to steal cookies or something due to the change in security zones, I am not exacty sure.
- Is it not working in Opera a big problem? Don't most use Internet Explorer or FireFox?
- MODX is about bringing modding to as many people as possible. It isn't just about IE and Firefox, there is also camino, Konqurer, Safari, Opera, on platforms such as Linux, Windows, and Mac OSX. Just how most people speak English but we try to make it so it can be avaliable in other languages.
- If you try to use MODX with Opera, it simply won't work?
- MODX in opera will work. With the prosilver xslt, as soon as you try to change the language, it will stop processing javascript.
- Why exactly does MODX require cross-domain AJAX?
- Only one feature of the prosilver MODX stylesheet requires AJAX. That is the i18n feature. To reduce the amount of data distributed with MODs and to allow MODs to be translated into more and more languages over time, we use AJAX to dynamically load a list of languages, and then to load each language. Put simply, it gets the language strings for FIND, AFTER, ADD, etc.
- Why MODX and not continue to use the text template?
- The Text template is basically limited to the powers of ASCII art. The Text Template is easier to write, but also easier to get very very wrong. The specification isn't as tight as MODX, so you can do little naughty things that cause parsers to go insane. You can also do big naughty things. Also the specification has been prone to feature creep, so a Text Template written 4 years ago isn't compatible with Today's specification. There are also features specific to MODX that wouldn't be appropriate for the Text Template.
- Using CDATA on all lines doesn't do any harm, correct?
- CDATA stands for character data. That's all it means, it's unescaped character data. It makes it easier to write by hand, when it comes to display with the stylesheet it doesn't matter if you have them on all lines. If your code contains any special characters, such as <, >, &, ', and " you need to use CDATA.
- When packing MODX, we may include changes for any number of templates and languages, as long as en and prosilver are included?
- That is correct.
- Do all MODs on phpbb.com have to be in MODX form?
- For phpBB 3.0, yes. For phpBB 2.0, it is optional. The text template is required for phpBB 2.0 MODs.
- Do we put different translations in different MODX files, or in the same MODX file with different lang="en-gb"?
- Translations for the target application go in other language files (edits to the language files within phpBB). Translations for stuff like description, title etc... go in the MODX file. The 3.0 sample file is a good example of this. If you view the source you will notice that there is English and a translation for Netherlands within the same file.
- Are you guys still working on a MODX-compat EasyMOD for phpBB2?
- Yes. If you checkout what is in EasyMOD's SourceForge CVS then you can have a version of EasyMOD That supports MODX. We are still working on getting this ready for a release.
- From experience, which is the easiest/fastest way to create MODx files? Creating text first, then using a convertor, doing directly, or can you convert to MODx from a diff file?
- MOD Studio, but converting from text is also easy.
geoffreak has created a web based tool, you can find it here: http://www.phpbb.com/community/viewtopic.php?f=71&t=543817
- Are there manuals for modx?
- There is a full PDF guide avaliable here: http://www.phpbb.com/mods/modx
- Is the language select in MODX clever enough to change the instructions to the specific language?
- No. Those edits are in a separate MODX file. The user has to open up the language specific MODX files for those changes.