You are here

function fckeditor_user_get_setting in FCKeditor - WYSIWYG HTML editor 6.2

Same name and namespace in other branches
  1. 5.2 fckeditor.module \fckeditor_user_get_setting()
  2. 6 fckeditor.module \fckeditor_user_get_setting()
1 call to fckeditor_user_get_setting()
fckeditor_process_textarea in ./fckeditor.module
This function create the HTML objects required for the FCKeditor

File

./fckeditor.module, line 1112
FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben

Code

function fckeditor_user_get_setting($user, $profile, $setting) {
  $default = array(
    'default' => 't',
    'show_toggle' => 't',
    'popup' => 'f',
    'skin' => 'default',
    'toolbar' => 'default',
    'expand' => 't',
    'width' => '100%',
    'lang' => 'en',
    'auto_lang' => 't',
  );
  if ($profile->settings['allow_user_conf']) {
    $status = isset($user->{'fckeditor_' . $setting}) ? $user->{'fckeditor_' . $setting} : (isset($profile->settings[$setting]) ? $profile->settings[$setting] : $default[$setting]);
  }
  else {
    $status = isset($profile->settings[$setting]) ? $profile->settings[$setting] : $default[$setting];
  }
  return $status;
}