You are here

function fckeditor_user_get_setting in FCKeditor - WYSIWYG HTML editor 5.2

Same name and namespace in other branches
  1. 6.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 2193
FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 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',
  );
  $settings = $profile->settings;
  if ($settings['allow_user_conf']) {
    $status = isset($user->{"fckeditor_" . $setting}) ? $user->{"fckeditor_" . $setting} : (isset($settings[$setting]) ? $settings[$setting] : $default[$setting]);
  }
  else {
    $status = isset($settings[$setting]) ? $settings[$setting] : $default[$setting];
  }
  return $status;
}