Projet

Général

Profil

Paste
Télécharger (3,4 ko) Statistiques
| Branche: | Révision:

root / htmltest / sites / all / modules / themekey / themekey_user_profile_help.inc @ 5fc58a68

1
<?php
2

    
3
/**
4
 * @file
5
 * Provides content for help pages.
6
 *
7
 * @author Markus Kalkbrenner | bio.logis GmbH
8
 *   @see http://drupal.org/user/124705
9
 */
10

    
11

    
12
/**
13
 * Adds tutorials to themekey_help_form().
14
 *
15
 * @see themekey_help()
16
 * @see themekey_help_form()
17
 * @see themekey_ui_form_alter()
18
 *
19
 * @param $form
20
 *   reference to a Drupal form
21
 */
22
function themekey_user_profile_help_tutorials(&$form) {
23
  $form['themekey_help_tutorials']['Allowing users to select a personal theme for this site'] = array(
24
    '#type' => 'fieldset',
25
    '#title' => t('Allowing users to select a personal theme for this site (Drupal 7 replacement of a Drupal 6 Core feature)'),
26
    '#collapsible' => TRUE,
27
    '#collapsed' => TRUE,
28
  );
29

    
30
  $form['themekey_help_tutorials']['Allowing users to select a personal theme for this site']['author'] = array(
31
    '#type' => 'item',
32
    '#title' => t('Author'),
33
    '#markup' => l(t('!path', array('!path' => 'mkalkbrenner')), 'http://drupal.org/user/124705'),
34
  );
35

    
36
  $img_path = base_path() . drupal_get_path('module', 'themekey_user_profile') . '/img/tutorials/';
37

    
38
  $form['themekey_help_tutorials']['Allowing users to select a personal theme for this site']['item'] = array(
39
    '#type' => 'item',
40
    '#markup' => '<p>' . t('In this tutorial, you will learn how to enable users to select a personal theme for your site. This feature was part of Drupal 6 Core but has been removed in Drupal 7 Core. The ThemeKey User Profile module replaces this functionality for Drupal 7 now.') . '</p>' .
41
'<p>' . t('Quick and dirty (screenshots will follow):<ol>
42
<li>Install ThemeKey User Profile which is part of the ThemeKey module package</li>
43
<li>Assign the permission "Select different theme" to the roles at !link1</li>
44
<li>Activate "Add theme option to user profile" at !link2</li>
45
<li>Configure "Selectable Thems" at !link3</li>
46
<li>Optional: Prioritize the static ThemeKey property "user:profile_triggers_theme" at !link4</li>
47
</ol>', array(
48
      '!link1' => l(t('!path', array('!path' => '/admin/people/permissions')), 'admin/people/permissions'),
49
      '!link2' => l(t('!path', array('!path' => '/admin/config/user-interface/themekey/settings/ui')), 'admin/config/user-interface/themekey/settings/ui'),
50
      '!link3' => l(t('!path', array('!path' => '/admin/config/user-interface/themekey/settings/ui')), 'admin/config/user-interface/themekey/settings/ui'),
51
      '!link4' => l(t('!path', array('!path' => '/admin/config/user-interface/themekey')), 'admin/config/user-interface/themekey'),
52
    )) . '</p>',
53
  );
54

    
55
  $form['themekey_help_tutorials']['Allowing users to select a personal theme for this site']['versions'] = array(
56
    '#type' => 'fieldset',
57
    '#title' => t('Versions used to create this tutorial'),
58
    '#collapsible' => FALSE,
59
  );
60

    
61
  $form['themekey_help_tutorials']['Allowing users to select a personal theme for this site']['versions']['themekey'] = array(
62
    '#type' => 'item',
63
    '#title' => t('ThemeKey'),
64
    '#markup' => '7.x-1.0-beta2',
65
  );
66

    
67
  $form['themekey_help_tutorials']['Allowing users to select a personal theme for this site']['versions']['themekey_ui'] = array(
68
    '#type' => 'item',
69
    '#title' => t('ThemeKey UI'),
70
    '#markup' => '7.x-1.0-beta2',
71
  );
72

    
73
  $form['themekey_help_tutorials']['Allowing users to select a personal theme for this site']['versions']['themekey_user_profile'] = array(
74
    '#type' => 'item',
75
    '#title' => t('ThemeKey User Profile'),
76
    '#markup' => '7.x-1.0-beta2',
77
  );
78

    
79
  return $form;
80
}