123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767 |
- <?php
- function user_details_admin_settings() {
- // Add the css that is needed for the admin form
- drupal_add_css(drupal_get_path('module', 'user_details') . '/css/user_details_admin.css');
- $overview = t('The User Details module is a simple module to help the end-user find thier way around a website by adding a central location for important link, stats, and thier content.');
- $overview .= '<br/>';
- $overview .= t('The User Details module is broken up into two blocks: logged-in and authored by. For a more detailed overview please visit the ') . '<a href="/admin/help/user_details">' . t('User Details help page') . '</a>';
- $loggedin_header = '<hr>';
- $loggedin_header .= '<h3>' . t('User Details: logged-in user settings') . '</h3>';
- $authored_header = '<hr>';
- $authored_header .= '<h3>' . t('User Details: authored user settings') . '</h3>';
- $hr = '<hr>';
- $form['overview'] = array(
- '#markup' => $overview,
- );
- $form['loggedin_header'] = array(
- '#markup' => $loggedin_header,
- );
- $form['loggedin_stats'] = array(
- '#type' => 'fieldset',
- '#title' => 'User Stats.',
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_stats']['user_details_loggedin_avatar_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the "User Avatar".'),
- '#default_value' => variable_get('user_details_loggedin_avatar_display', FALSE),
- '#description' => t('Displays the Avatar of the user, if any is available.')
- );
- $form['loggedin_stats']['user_details_loggedin_joined_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the "Joined Date".'),
- '#default_value' => variable_get('user_details_loggedin_joined_display', FALSE),
- '#description' => t('Displays the account creation date of the user.')
- );
- $form['loggedin_stats']['user_details_loggedin_postcount_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the "Post count"'),
- '#default_value' => variable_get('user_details_loggedin_postcount_display', FALSE),
- '#description' => t('Displays the user\'s current number of posts.'),
- );
- if (module_exists('userpoints')) {
- $form['loggedin_stats']['user_details_loggedin_points_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the "User Points".'),
- '#default_value' => variable_get('user_details_loggedin_points_display', FALSE),
- '#description' => t('Displays the user\'s "User Points" amount.'),
- '#disabled' => FALSE,
- );
- }
- else {
- $form['loggedin_stats']['user_details_loggedin_points_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the "User Points".'),
- '#default_value' => variable_get('user_details_loggedin_points_display', FALSE),
- '#description' => t('Please install <a href="http://drupal.org/project/userpoints">User Points</a>'),
- '#disabled' => TRUE,
- );
- }
- $form['loggedin_stats']['user_details_loggedin_rank_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the role.'),
- '#default_value' => variable_get('user_details_loggedin_rank_display', FALSE),
- '#description' => t('Displays the user\'s role name.'),
- );
- if (module_exists('privatemsg')) {
- $form['loggedin_stats']['user_details_loggedin_privatemsg_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the unread message amount.'),
- '#default_value' => variable_get('user_details_loggedin_privatemsg_display', FALSE),
- '#description' => t('Displays the unread message amount from the "Private Messages" module.'),
- '#disabled' => FALSE,
- );
- }
- else {
- $form['loggedin_stats']['user_details_loggedin_privatemsg_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the unread message amount.'),
- '#default_value' => variable_get('user_details_loggedin_privatemsg_display', FALSE),
- '#description' => t('Please install <a href="http://drupal.org/project/privatemsg">Private Messages</a>'),
- '#disabled' => TRUE,
- );
- }
-
- $form['loggedin_stats_hr'] = array(
- '#type' => 'fieldset',
- '#title' => 'Horizontal Ruler.',
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_stats_hr']['user_details_loggedin_stats_hr_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display "HR"'),
- '#default_value' => variable_get('user_details_loggedin_stats_hr_display', FALSE),
- '#description' => t('Displays a hortizontal ruler html enity seprating the stats and links sections.'),
- );
- //Links Options
- $form['loggedin_links'] = array(
- '#type' => 'fieldset',
- '#title' => 'Links.',
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['front_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Front Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['front_link']['user_details_loggedin_frontlink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_frontlink_display', FALSE),
- '#description' => t('Displays an icon link leading to the site\'s front page.'),
- );
- $form['loggedin_links']['front_link']['user_details_loggedin_frontlink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_loggedin_frontlink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/front-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/front-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['profile_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Profile Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['profile_link']['user_details_loggedin_profilelink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_profilelink_display', FALSE),
- '#description' => t('Displays an icon link leading to the user\'s profile page.'),
- );
- $form['loggedin_links']['profile_link']['user_details_loggedin_profilelink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_loggedin_profilelink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/profile-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/profile-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['profile_edit_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Profile Edit Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['profile_edit_link']['user_details_loggedin_profileeditlink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_profileeditlink_display', FALSE),
- '#description' => t('Displays an icon link leading to the user\'s edit profile page.')
- );
- $form['loggedin_links']['profile_edit_link']['user_details_loggedin_profileeditlink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_loggedin_profileeditlink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/profileedit-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/profileedit-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['privatemsg_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Private Message Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- if (module_exists('privatemsg')) {
- $form['loggedin_links']['privatemsg_link']['user_details_loggedin_privatemsglink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_privatemsglink_display', FALSE),
- '#description' => t('Displays an icon link leading to the user\'s private message profile page.'),
- '#disabled' => FALSE,
- );
- }
- else {
- $form['loggedin_links']['privatemsg_link']['user_details_loggedin_privatemsglink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_privatemsglink_display', FALSE),
- '#description' => t('please install <a href="http://drupal.org/project/privatemsg">Private Message</a>.'),
- '#disabled' => TRUE,
- );
- }
- if (module_exists('privatemsg')) {
- $form['loggedin_links']['privatemsg_link']['user_details_loggedin_privatemsglink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_loggedin_privatemsg_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/privatemsg-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/privatemsg-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- }
- $form['loggedin_links']['create_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Create Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['create_link']['user_details_loggedin_createlink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_createlink_display', FALSE),
- '#description' => t('Displays an icon link to the /node/add page'),
- );
- $form['loggedin_links']['create_link']['user_details_loggedin_createlink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_loggedin_createlink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/create-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/create-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['admin_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Admin Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['admin_link']['user_details_loggedin_adminlink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_adminlink_display', FALSE),
- '#description' => t('Displays an icon link to the admin page.')
- );
- $form['loggedin_links']['admin_link']['user_details_loggedin_adminlink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_loggedin_adminlink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/admin-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/admin-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['panels_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Panels Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- if (module_exists('panels')) {
- $form['loggedin_links']['panels_link']['user_details_loggedin_panelslink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_panelslink_display', FALSE),
- '#description' => t('Displays an icon link to the admin section of the "Panels" module.')
- );
- }
- else {
- $form['loggedin_links']['panels_link']['user_details_loggedin_panelslink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_panelslink_display', FALSE),
- '#description' => t('Please install <a href="http://drupal.org/project/panels">Panels</a>'),
- '#disabled' => TRUE,
- );
- }
- if (module_exists('panels')) {
- $form['loggedin_links']['panels_link']['user_details_loggedin_panelslink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_loggedin_panelslink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/panels-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/panels-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- }
- $form['loggedin_links']['views_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Views Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- if (module_exists('views')) {
- $form['loggedin_links']['views_link']['user_details_loggedin_viewslink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_viewslink_display', FALSE),
- '#description' => t('Displays an icon link to the admin section of the "Views" module.')
- );
- }
- else {
- $form['loggedin_links']['views_link']['user_details_loggedin_viewslink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_viewslink_display', FALSE),
- '#description' => t('Please install <a href="http://drupal.org/project/views">Panels</a>'),
- '#disabled' => TRUE,
- );
- }
- if (module_exists('views')) {
- $form['loggedin_links']['views_link']['user_details_loggedin_viewslink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_loggedin_viewslink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/views-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/views-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- }
- $form['loggedin_links']['performance_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Performance Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['performance_link']['user_details_loggedin_performancelink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_performancelink_display', FALSE),
- '#description' => t('Displays an icon link to the admin section of the "Views" module.')
- );
- $form['loggedin_links']['performance_link']['user_details_loggedin_performancelink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_loggedin_performancelink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/performance-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/performance-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['logout_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Logout Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['logout_link']['user_details_loggedin_logoutlink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_loggedin_logoutlink_display', FALSE),
- '#description' => t('Displays an icon link to allow the user to logout.')
- );
- $form['loggedin_links']['logout_link']['user_details_loggedin_logoutlink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_loggedin_logoutlink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/logout-icon.png"),
- '#description' => t('It is the URL relative to your drupal install. Do not include your domain name.(http://www.example.com)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- //Custom Link One Options
- $form['loggedin_links']['custom_link_one'] = array(
- '#type' => 'fieldset',
- '#title' => t('Custom Link One'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['custom_link_one']['user_details_loggedin_customlinkone_type'] = array(
- '#type' => 'select',
- '#title' => t('Link Type'),
- '#options' => array(
- 0 => t('Disabled'),
- 2 => t('User Link'),
- 3 => t('Admin Link'),
- ),
- '#default_value' => variable_get('user_details_loggedin_customlinkone_type', '0'),
- '#description' => t('Choose which type of link this link is.'),
- );
- $form['loggedin_links']['custom_link_one']['user_details_loggedin_customlinkone_url'] = array(
- '#type' => 'textfield',
- '#title' => t('URL path.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkone_url', ''),
- '#description' => t('the url of the page you want this link to refer to. (example: /admin/structure/pages)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['custom_link_one']['user_details_loggedin_customlinkone_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image path.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkone_imgsrc', ''),
- '#description' => t('the path to your image. (example: /sites/all/themes/my-theme/custom-link-one.png)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['custom_link_one']['user_details_loggedin_customlinkone_imgtitle'] = array(
- '#type' => 'textfield',
- '#title' => t('Image title.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkone_imgtitle', ''),
- '#description' => t('The image title, or mouse-over tooltip, of the image.'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- //Custom Link Two Options
- $form['loggedin_links']['custom_link_two'] = array(
- '#type' => 'fieldset',
- '#title' => t('Custom Link Two'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['custom_link_two']['user_details_loggedin_customlinktwo_type'] = array(
- '#type' => 'select',
- '#title' => t('Link Type'),
- '#options' => array(
- 0 => t('Disabled'),
- 2 => t('User Link'),
- 3 => t('Admin Link'),
- ),
- '#default_value' => variable_get('user_details_loggedin_customlinktwo_type', '0'),
- '#description' => t('Choose which type of link this link is.'),
- );
- $form['loggedin_links']['custom_link_two']['user_details_loggedin_customlinktwo_url'] = array(
- '#type' => 'textfield',
- '#title' => t('URL path.'),
- '#default_value' => variable_get('user_details_loggedin_customlinktwo_url', ''),
- '#description' => t('the url of the page you want this link to refer to. (example: /admin/structure/pages)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['custom_link_two']['user_details_loggedin_customlinktwo_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image path.'),
- '#default_value' => variable_get('user_details_loggedin_customlinktwo_imgsrc', ''),
- '#description' => t('the path to your image. (example: /sites/all/themes/my-theme/custom-link-two.png)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['custom_link_two']['user_details_loggedin_customlinktwo_imgtitle'] = array(
- '#type' => 'textfield',
- '#title' => t('Image title.'),
- '#default_value' => variable_get('user_details_loggedin_customlinktwo_imgtitle', ''),
- '#description' => t('The image title, or mouse-over tooltip, of the image.'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- //Custom Link Three Options
- $form['loggedin_links']['custom_link_three'] = array(
- '#type' => 'fieldset',
- '#title' => t('Custom Link Three'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['custom_link_three']['user_details_loggedin_customlinkthree_type'] = array(
- '#type' => 'select',
- '#title' => t('Link Type'),
- '#options' => array(
- 0 => t('Disabled'),
- 2 => t('User Link'),
- 3 => t('Admin Link'),
- ),
- '#default_value' => variable_get('user_details_loggedin_customlinkthree_type', '0'),
- '#description' => t('Choose which type of link this link is.'),
- );
- $form['loggedin_links']['custom_link_three']['user_details_loggedin_customlinkthree_url'] = array(
- '#type' => 'textfield',
- '#title' => t('URL path.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkthree_url', ''),
- '#description' => t('the url of the page you want this link to refer to. (example: /admin/structure/pages)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['custom_link_three']['user_details_loggedin_customlinkthree_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image path.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkthree_imgsrc', ''),
- '#description' => t('the path to your image. (example: /sites/all/themes/my-theme/custom-link-three.png)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['custom_link_three']['user_details_loggedin_customlinkthree_imgtitle'] = array(
- '#type' => 'textfield',
- '#title' => t('Image title.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkthree_imgtitle', ''),
- '#description' => t('The image title, or mouse-over tooltip, of the image.'),
- '#size' => 75,
- '#maxlength' => 500,
- );
-
- //Custom Link Four Options
- $form['loggedin_links']['custom_link_four'] = array(
- '#type' => 'fieldset',
- '#title' => t('Custom Link Four'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['custom_link_four']['user_details_loggedin_customlinkfour_type'] = array(
- '#type' => 'select',
- '#title' => t('Link Type'),
- '#options' => array(
- 0 => t('Disabled'),
- 2 => t('User Link'),
- 3 => t('Admin Link'),
- ),
- '#default_value' => variable_get('user_details_loggedin_customlinkfour_type', '0'),
- '#description' => t('Choose which type of link this link is.'),
- );
- $form['loggedin_links']['custom_link_four']['user_details_loggedin_customlinkfour_url'] = array(
- '#type' => 'textfield',
- '#title' => t('URL path.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkfour_url', ''),
- '#description' => t('the url of the page you want this link to refer to. (example: /admin/structure/pages)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['custom_link_four']['user_details_loggedin_customlinkfour_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image path.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkfour_imgsrc', ''),
- '#description' => t('the path to your image. (example: /sites/all/themes/my-theme/custom-link-four.png)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['custom_link_four']['user_details_loggedin_customlinkfour_imgtitle'] = array(
- '#type' => 'textfield',
- '#title' => t('Image title.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkfour_imgtitle', ''),
- '#description' => t('The image title, or mouse-over tooltip, of the image.'),
- '#size' => 75,
- '#maxlength' => 500,
- );
-
- //Custom Link Five Options
- $form['loggedin_links']['custom_link_five'] = array(
- '#type' => 'fieldset',
- '#title' => t('Custom Link Five'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links']['custom_link_five']['user_details_loggedin_customlinkfive_type'] = array(
- '#type' => 'select',
- '#title' => t('Link Type'),
- '#options' => array(
- 0 => t('Disabled'),
- 2 => t('User Link'),
- 3 => t('Admin Link'),
- ),
- '#default_value' => variable_get('user_details_loggedin_customlinkfive_type', '0'),
- '#description' => t('Choose which type of link this link is.'),
- );
- $form['loggedin_links']['custom_link_five']['user_details_loggedin_customlinkfive_url'] = array(
- '#type' => 'textfield',
- '#title' => t('URL path.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkfive_url', ''),
- '#description' => t('the url of the page you want this link to refer to. (example: /admin/structure/pages)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['custom_link_five']['user_details_loggedin_customlinkfive_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image path.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkfive_imgsrc', ''),
- '#description' => t('the path to your image. (example: /sites/all/themes/my-theme/custom-link-five.png)'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['loggedin_links']['custom_link_five']['user_details_loggedin_customlinkfive_imgtitle'] = array(
- '#type' => 'textfield',
- '#title' => t('Image title.'),
- '#default_value' => variable_get('user_details_loggedin_customlinkfive_imgtitle', ''),
- '#description' => t('The image title, or mouse-over tooltip, of the image.'),
- '#size' => 75,
- '#maxlength' => 500,
- );
-
- $form['loggedin_links_hr'] = array(
- '#type' => 'fieldset',
- '#title' => 'Horizontal Ruler.',
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_links_hr']['user_details_loggedin_links_hr_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display "HR"'),
- '#default_value' => variable_get('user_details_loggedin_links_hr_display', FALSE),
- '#description' => t('Displays a hortizontal ruler html enity seprating the links and content sections.'),
- );
- //Content Options
- $form['loggedin_content'] = array(
- '#type' => 'fieldset',
- '#title' => 'Content.',
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['loggedin_content']['user_details_loggedin_content_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display "Content"'),
- '#default_value' => variable_get('user_details_loggedin_content_display', FALSE),
- '#description' => t('Lists the last X updated nodes authored by the user.')
- );
- $form['loggedin_content']['user_details_loggedin_content_amount'] = array(
- '#type' => 'textfield',
- '#title' => t('User content amount'),
- '#default_value' => variable_get('user_details_loggedin_content_amount', 3),
- '#size' => 2,
- '#maxlength' => 2,
- '#description' => t('Changes the number of recent items listed for the "Content" list. (<b>if set to 0 it renders this list null.</b>)')
- );
- /**
- * Authored options
- *
- * the authored by block settings.
- */
- $form['authored_header'] = array(
- '#markup' => $authored_header,
- );
- $form['authored_stats'] = array(
- '#type' => 'fieldset',
- '#title' => 'User Stats.',
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['authored_stats']['user_details_authored_avatar_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the "User Avatar".'),
- '#default_value' => variable_get('user_details_authored_avatar_display', FALSE),
- '#description' => t('Displays the Avatar of the user, if any is available.')
- );
- $form['authored_stats']['user_details_authored_joined_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the "Joined Date".'),
- '#default_value' => variable_get('user_details_authored_joined_display', FALSE),
- '#description' => t('Displays the account creation date of the user.')
- );
- $form['authored_stats']['user_details_authored_postcount_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the "Post count"'),
- '#default_value' => variable_get('user_details_authored_postcount_display', FALSE),
- '#description' => t('Displays the user\'s current number of posts.'),
- );
- if (module_exists('userpoints')) {
- $form['authored_stats']['user_details_authored_points_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the "User Points".'),
- '#default_value' => variable_get('user_details_authored_points_display', FALSE),
- '#description' => t('Displays the user\'s "User Points" amount.'),
- '#disabled' => FALSE,
- );
- }
- else {
- $form['authored_stats']['user_details_authored_points_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the "User Points".'),
- '#default_value' => variable_get('user_details_authored_points_display', FALSE),
- '#description' => t('Please install <a href="http://drupal.org/project/userpoints">User Points</a>'),
- '#disabled' => TRUE,
- );
- }
- $form['authored_stats']['user_details_authored_rank_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display the role.'),
- '#default_value' => variable_get('user_details_authored_rank_display', FALSE),
- '#description' => t('Displays the user\'s role name.'),
- );
-
- $form['authored_stats_hr'] = array(
- '#type' => 'fieldset',
- '#title' => 'Horizontal Ruler.',
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['authored_stats_hr']['user_details_authored_stats_hr_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display "HR"'),
- '#default_value' => variable_get('user_details_authored_stats_hr_display', FALSE),
- '#description' => t('Displays a hortizontal ruler html enity seprating the stats and links sections.'),
- );
- $form['authored_links'] = array(
- '#type' => 'fieldset',
- '#title' => 'Links.',
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['authored_links']['profile_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Profile Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['authored_links']['profile_link']['user_details_authored_profilelink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_authored_profilelink_display', FALSE),
- '#description' => t('Displays an icon link leading to the user\'s profile page.'),
- );
- $form['authored_links']['profile_link']['user_details_authored_profilelink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_authored_profilelink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/profile-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/profile-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- $form['authored_links']['privatemsg_link'] = array(
- '#type' => 'fieldset',
- '#title' => t('Private Message Link'),
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- if (module_exists('privatemsg')) {
- $form['authored_links']['privatemsg_link']['user_details_authored_privatemsglink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_authored_privatemsglink_display', FALSE),
- '#description' => t('Displays an icon link leading to the user\'s private message profile page.'),
- '#disabled' => FALSE,
- );
- }
- else {
- $form['authored_links']['privatemsg_link']['user_details_authored_privatemsglink_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display'),
- '#default_value' => variable_get('user_details_authored_privatemsglink_display', FALSE),
- '#description' => t('please install <a href="http://drupal.org/project/privatemsg">Private Message</a>.'),
- '#disabled' => TRUE,
- );
- }
- if (module_exists('privatemsg')) {
- $form['authored_links']['privatemsg_link']['user_details_authored_privatemsglink_imgsrc'] = array(
- '#type' => 'textfield',
- '#title' => t('Image source.'),
- '#default_value' => variable_get('user_details_authored_privatemsg_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/privatemsg-icon.png"),
- '#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/privatemsg-icon.png</i>'),
- '#size' => 75,
- '#maxlength' => 500,
- );
- }
-
- $form['authored_links_hr'] = array(
- '#type' => 'fieldset',
- '#title' => 'Horizontal Ruler.',
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['authored_links_hr']['user_details_authored_links_hr_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display "HR"'),
- '#default_value' => variable_get('user_details_authored_links_hr_display', FALSE),
- '#description' => t('Displays a hortizontal ruler html enity seprating the links and content sections.'),
- );
- //Content Options
- $form['authored_content'] = array(
- '#type' => 'fieldset',
- '#title' => 'Content.',
- '#collapsible' => 'true',
- '#collapsed' => 'true',
- );
- $form['authored_content']['user_details_authored_content_display'] = array(
- '#type' => 'checkbox',
- '#title' => t('Display "Content"'),
- '#default_value' => variable_get('user_details_authored_content_display', FALSE),
- '#description' => t('Lists the last X updated nodes authored by the user.')
- );
- $form['authored_content']['user_details_authored_content_amount'] = array(
- '#type' => 'textfield',
- '#title' => t('User content amount'),
- '#default_value' => variable_get('user_details_authored_content_amount', 3),
- '#size' => 2,
- '#maxlength' => 2,
- '#description' => t('Changes the number of recent items listed for the "Content" list. (<b>if set to 0 it renders this list null.</b>)')
- );
- return system_settings_form($form);
- }
- ?>
|