10 November 2010

Using parameter %s in Joomla language files

Sometimes you want to write in your ini files something like
MESSAGE = Thank you for registration, %s! Now you can <_a href="%s">login<_a>.
and then while displaying this message substitute necessary strings instead of %s.
I'm using tag _a here because blogger parser thinks it's a link in spite of pre.
So. Joomla does allow this but only for language files. To parse this message you should write
JText::sprintf('MESSAGE', $username, $url)

The first parameter is property name. The second parameter $username goes for first %s, $url goes for second %s and so on.

21 September 2010

Problem with uploading files to ccBoard

ccBoard is a forum extension for Joomla CMS. One of the best actually.
The only problem I've encountered with is the problem with file upload. I couldn't upload some files even if ccBoard settings and Joomla global settings are ok.
The solution is that file name shouldn't contain certain symbols. After some testing I've found out that correct symbols (that file name should consist of) are latin letters, dot and space.