forked from mkalkbrenner/themekey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
themekey_ui_help.inc
71 lines (61 loc) · 4.08 KB
/
themekey_ui_help.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* @file
* Provides content for help pages.
*
* @author Markus Kalkbrenner | Cocomore AG
* @see http://drupal.org/user/124705
*/
/**
* Adds exmples to themekey_help_form().
*
* @see themekey_help()
* @see themekey_help_form()
* @see themekey_ui_form_alter()
*
* @param $form
* reference to a drupal form
*/
function themekey_ui_help_tutorials(&$form) {
$form['themekey_help_tutorials']['Allowing users to select a theme for all content they create'] = array(
'#type' => 'fieldset',
'#title' => t('Allowing users to select a theme for all content they create'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['themekey_help_tutorials']['Allowing users to select a theme for all content they create']['author'] = array(
'#type' => 'item',
'#title' => t('Author'),
'#value' => l(t('!path', array('!path' => 'Sansui')), 'http://drupal.org/user/297165'),
);
$img_path = base_path() . drupal_get_path('module', 'themekey_ui') . '/img/tutorials/';
$form['themekey_help_tutorials']['Allowing users to select a theme for all content they create']['item'] = array(
'#type' => 'item',
'#value' =>
'<p>' . t('In this tutorial you will learn how to enable users to select a theme for content they create. For example, if you would like each of your bloggers to display their own theme on each of their blog entries, this tutorial will allow you to grant this option.</p>') .
'<p>' . t('First, you must enable any themes you would like available from under !link (Administer -> Site Building -> Themes)</p>', array('!link' => l(t('!path', array('!path' => 'admin/build/themes')), 'admin/build/themes'))) .
'<p>' . t('Once you have enabled your themes, navigate to !link (Administer -> Site Configuration -> Themekey -> Settings -> User Interface). You will see a checkbox for "Show theme option in user profile". Click on the checkbox and save your settings.</p>', array('!link' => l(t('!path', array('!path' => 'admin/settings/themekey/settings/ui')), 'admin/settings/themekey/settings/ui'))) .
'<p>' . '<img src="' . $img_path . 'themekey_user_profiles_2.png" alt="' . t('Enabling theme selection in user profiles') . '" style="border:solid #d4e7f3 2px;" /></p>' .
'<p>' . t('Next, you must grant permission to the roles that you would like to be able to change themes for their own content. Navigate to !link (Administer -> User Management -> Permissions) and check the boxes for "Assign theme to own nodes" to all roles you want to enable this option.</p>', array('!link' => l(t('!path', array('!path' => 'admin/user/permissions')), 'admin/user/permissions'))) . '<br />' .
'<p>' . '<img src="' . $img_path . 'themekey_user_profiles_3.png" alt="' . t('Enable correct permissions to use themekey for your users') . '" style="border:solid #d4e7f3 2px;" /></p>' .
'<p>' . t('Once you have done this, your users can log in, navigate to My Account -> Edit and a new option will appear under their account settings. A full select list of your enabled themes will appear for them to select from. Once they have chosen a new theme, any node that is authored by this user will display the theme they have selected.</p>') .
'<p>' . '<img src="' . $img_path . 'themekey_user_profiles_4.png" alt="' . t('ThemeKey rule chain that switches to different themes on content creation forms for different user roles') . '" style="border:solid #d4e7f3 2px;" /></p>' .
'<p>' . t('Have Fun!') . '</p>',
);
$form['themekey_help_tutorials']['Allowing users to select a theme for all content they create']['versions'] = array(
'#type' => 'fieldset',
'#title' => t('Versions used to create this tutorial'),
'#collapsible' => FALSE,
);
$form['themekey_help_tutorials']['Allowing users to select a theme for all content they create']['versions']['themekey'] = array(
'#type' => 'item',
'#title' => t('ThemeKey'),
'#value' => '6.x-2.2',
);
$form['themekey_help_tutorials']['Allowing users to select a theme for all content they create']['versions']['themekey_ui'] = array(
'#type' => 'item',
'#title' => t('ThemeKey UI'),
'#value' => '6.x-2.2',
);
return $form;
}