Saturday, July 31, 2010

Disable HTML entities in CKEditor

Find ckeditor/ckeditor.config.js or ckeditor/config.js and add: config.entities = false;

Tuesday, July 27, 2010

Install AVR Media AUDIO and VIDEO Player for Joomla 1.5

  1. Install com_avreloaded-x.x.x.zip
  2. Check PHP upload_max_filesize setting, sometimes it has a very low value
  3. Go to Media Manager and create 'audio' and 'videos' folder in 'stories'
  4. Go to Global Settings and add the extensions (for uploading) you need (mp3, avi, mpg, etc)
  5. When you write an article, you will find an AVR Media button at the bottom, use that to include an audio or video player...

Thursday, July 15, 2010

Get User ID with Jumi in Joomla

If you include a php file to an article with Jumi, you can get the user id with this:
defined('_JEXEC') OR defined('_VALID_MOS') OR die( "Direct Access Is Not Allowed" );

$jAp= & JFactory::getApplication();
$user =& JFactory::getUser();
echo $user->get('id');

Tuesday, July 6, 2010

Select Items by the First Letter in MySQL

If you try to select items by the first letter and you want MySQL to deal with case sensitivity and accents, you have to collate the utf8_unicode_ci table to utf8_bin in this way...
SELECT * FROM thetable WHERE firstname COLLATE utf8_bin LIKE 'É%'