function joomla_admin_settings in Joomla to Drupal 5
Same name and namespace in other branches
- 6 joomla.module \joomla_admin_settings()
- 7.2 joomla.module \joomla_admin_settings()
- 7 joomla.module \joomla_admin_settings()
1 string reference to 'joomla_admin_settings'
- joomla_menu in ./
joomla.module - Menu callback. Prints a listing of active nodes on the site.
File
- ./
joomla.module, line 60 - The joomla module used for migrate Joomla to Drupal.
Code
function joomla_admin_settings() {
// only administrators can access this function
// Generate the form - settings applying to all patterns first
$form['joomla_settings'] = array(
'#type' => 'fieldset',
'#weight' => -20,
'#title' => t('Joomla to Drupal'),
'#collapsible' => FALSE,
'#collapsed' => FALSE,
'#description' => "Click below link to Import Joomla Table to Drupal:" . "<ul>" . "<li/>" . l(t('Import Joomla Users'), "joomla/import/user") . "<li/>" . l(t('Import Joomla Sections & Categories'), "joomla/import/section") . "<li/>" . l(t('Import Joomla Contents and Static Contents'), "joomla/import/content") . "</ul>" . "<br/>" . "This module will not import any existing data into Drupal table! It's save to run the import procedure more than one." . "<br/><br/><b>IMPORTANT!</b>" . "<ol><li/>You must save below settings before click the Import links above!" . "<li/>You must enable Profiles module" . "</ol>",
);
$form['joomla_settings_database'] = array(
'#type' => 'fieldset',
'#weight' => -20,
'#title' => t('Joomla settings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['joomla_settings_database']['joomla_database'] = array(
'#type' => 'textfield',
'#title' => 'Database name of Joomla',
'#default_value' => variable_get('joomla_database', 'joomla'),
'#description' => 'Database name of Joomla',
);
$form['joomla_settings_database']['joomla_prefix'] = array(
'#type' => 'textfield',
'#title' => 'Table Prefix of Joomla',
'#default_value' => variable_get('joomla_prefix', 'jos_'),
'#description' => 'Table Prefix of Joomla',
);
$form['joomla_settings_database']['joomla_path'] = array(
'#type' => 'textfield',
'#title' => 'Path of your Joomla instalation',
'#default_value' => variable_get('joomla_path', 'public_html/joomla'),
'#description' => "The path name where you install Joomla. Example:<br/>" . "<ul><li/>Apache: <b>public_html/joomla</b>" . "<li/>Windows using WAMP: <b>c:/wamp/www/joomla</b>" . "<li/>Windows using IIS: <b>C:/Inetpub/wwwroot/joomla</b></ul>",
);
$form['joomla_settings_advanced'] = array(
'#type' => 'fieldset',
'#weight' => -20,
'#title' => t('Drupal settings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['joomla_settings_advanced']['joomla_input_format'] = array(
'#type' => 'radios',
'#title' => 'Input Format',
'#default_value' => variable_get('joomla_input_format', 1),
'#options' => array(
"Filtered HTML",
"Full HTML",
),
'#description' => 'Select Input Format to apply to all imported contents.',
);
$form['joomla_settings_advanced']['joomla_update_duplicate'] = array(
'#type' => 'radios',
'#title' => 'If found Duplicate items',
'#default_value' => variable_get('joomla_update_duplicate', 0),
'#options' => array(
"Do not import",
"Replace duplicate items",
),
'#description' => "Caution! If you select 'Replace duplicate items' then this module will replace existing items with new one. This options usefull if you do update in Joomla and want to do update in Drupal too.",
);
$form['joomla_settings_advanced']['joomla_img_folder'] = array(
'#type' => 'textfield',
'#title' => 'Image/Picture folder',
'#default_value' => variable_get('joomla_img_folder', 'images'),
'#description' => "A folder to save any images from Joomla contents. This folder related to Drupal 'files' folder, i.e: if you enter '<b>images</b>' then all imported images will be save to Drupal '<b>files/images</b>'.",
);
return system_settings_form($form);
}