Skip to content

Commit 2397ab8

Browse files
committed
Adding maintenance pages and notes in README regarding proper setup of maintenance pages.
1 parent a69f3c6 commit 2397ab8

File tree

3 files changed

+362
-0
lines changed

3 files changed

+362
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# DDBasic theme for Ding2
2+
3+
## Maintenance pages
4+
5+
The theme provides maintenance page templates:
6+
- *maintenance-page-tpl.php*: This page template is used when the site has been set offline by the administrator.
7+
- *maintenance-page--offline.tpl.php*: This page template is used when the site cannot get in contact with the database.
8+
9+
It is common for ding2 sites to have the DDBasic theme reside in the folder /profiles/ding2/themes/ddbasic.
10+
In this case, you will need to add the following lines to your settings.php file in order for both template
11+
files to be displayed properly:
12+
13+
$conf['install_profile'] = 'ding2';
14+
$conf['maintenance_theme'] = 'ddbasic';
15+
16+
+184
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
<?php
2+
3+
/**
4+
* @file
5+
* DDBasic theme implementation to display a single Drupal page while offline.
6+
*
7+
* All the available variables are mirrored in html.tpl.php and page.tpl.php.
8+
* Some may be blank but they are provided for consistency.
9+
*
10+
* @see template_preprocess()
11+
* @see template_preprocess_maintenance_page()
12+
*/
13+
14+
// If your theme is set to display the site name, uncomment this line and replace the value:
15+
$site_name = 'DDBasic bibliotek';
16+
17+
// If your theme is set to *not* display the site name, uncomment this line:
18+
// unset($site_name);
19+
20+
// If your theme is set to display the site slogan, uncomment this line and replace the value:
21+
// $site_slogan = 'My Site Slogan';
22+
23+
// If your theme is set to *not* display the site slogan, uncomment this line:
24+
unset($site_slogan);
25+
26+
$head_title = 'Hjemmesiden er nede :: ' . $site_name;
27+
28+
// If your theme is set to display the site logo, uncomment this line and replace the value:
29+
//$logo = 'sites/all/files/customLogo.png';
30+
31+
// If your theme is set to *not* display the site logo, uncomment this line:
32+
unset($logo);
33+
34+
// Title of this page
35+
$title = "Tekniske problemer ..";
36+
37+
// Main message. Note HTML markup.
38+
$content = '<p>Hjemmesiden har tekniske problemer og er ikke tilgængelig i øjeblikket. Prøv venligst igen senere. Tak for din forståelse.</p><hr /><p>Er du hjemmesidens administrator, så tjek venligst database-indstillingerne.</p>';
39+
?>
40+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
41+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
42+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
43+
44+
<head>
45+
<title><?php print $head_title; ?></title>
46+
<?php print $head; ?>
47+
<?php print $styles; ?>
48+
<?php print $scripts; ?>
49+
</head>
50+
51+
<body class="<?php print $classes; ?>">
52+
<div id="page" class="ding2-site-template">
53+
54+
<section class="topbar">
55+
56+
<div class="topbar-inner">
57+
58+
<div class="panel-pane pane-pane-header">
59+
<div class="pane-content">
60+
<div class="topbar-inner">
61+
<div class="site-name-wrapper">
62+
63+
<?php if (!empty($logo)): ?>
64+
<a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
65+
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
66+
</a>
67+
<?php endif; ?>
68+
69+
<?php if (!empty($site_name)): ?>
70+
<h1 class="site-name">
71+
<a href="<?php print $base_path ?>" title="<?php print t('Home'); ?>" rel="home">
72+
<?php print $site_name; ?>
73+
</a>
74+
</h1>
75+
<?php endif; ?>
76+
</div>
77+
</div>
78+
</div>
79+
</div>
80+
81+
<!--
82+
<section class="search panel-pane pane-block pane-search-form">
83+
<div class="search-field-wrapper">
84+
<form action="" method="post" id="search-block-form" accept-charset="UTF-8">
85+
<div>
86+
<h2 class="element-invisible">Søgefelt</h2>
87+
<div class="form-item form-type-textfield form-item-search-block-form">
88+
<label class="element-invisible" for="edit-search-block-form--2">Søg </label>
89+
<span class="field-prefix"><i class="icon-search"></i></span>
90+
<input aria-haspopup="true" aria-autocomplete="list" role="textbox" autocomplete="off" title="Indtast de ord du ønsker at søge efter." placeholder="Søg på biblioteket" id="edit-search-block-form--2" name="search_block_form" size="15" maxlength="128" class="form-text ui-autocomplete-input" type="text">
91+
</div>
92+
<div class="form-actions form-wrapper" id="edit-actions">
93+
<input id="edit-submit--2" name="op" value="Søg" class="form-submit" type="submit">
94+
</div>
95+
<input name="form_build_id" value="form-yAZr9geg4R5mOHjhi6DIf76mPZ6bQPERlUfBGoe68AQ" type="hidden">
96+
<input name="form_id" value="search_block_form" type="hidden">
97+
<input id="controls_search_sort" name="sort" value="" type="hidden">
98+
<input id="controls_search_size" name="size" value="" type="hidden">
99+
</div>
100+
</form>
101+
</div>
102+
</section>
103+
104+
<div class="panel-pane pane-block pane-ding-user-frontend-ding-user-ajax-login user">
105+
<div class="pane-content">
106+
<form id="ding-user-ajax-login-form" action="/cookies" method="post" accept-charset="UTF-8">
107+
<div>
108+
<input id="edit-submit--3" name="op" value="Log ind" class="form-submit ajax-processed" type="submit"><input name="form_build_id" value="form-_MLBaYHZ3GUWcto31dfDZQKillh1gJKB9G4tCKDwxe8" type="hidden">
109+
<input name="form_id" value="ding_user_comment_forbidden_form" type="hidden">
110+
</div>
111+
</form>
112+
</div>
113+
</div>
114+
-->
115+
116+
</div>
117+
118+
</section>
119+
120+
<section style="top: 0px;" class="navigation-wrapper fixed">
121+
<div class="navigation-inner">
122+
<div class="main-menu-wrapper panel-pane pane-block pane-menu-block-1">
123+
<ul class="main-menu">
124+
<li class="first leaf">&nbsp;</li>
125+
</ul>
126+
</div>
127+
<div class="secondary-menu-wrapper panel-pane pane-block pane-menu-block-2">
128+
<ul class="secondary-menu">
129+
<li class="first leaf">&nbsp;</li>
130+
</ul>
131+
</div>
132+
</div>
133+
</section>
134+
135+
<div class="content-wrapper">
136+
<div class="grid-inner">
137+
<div class="panel-pane pane-page-content">
138+
<div class="pane-content">
139+
<div class="empty-sidebars panel-content-wrapper">
140+
<div class="primary-content">
141+
<div class="grid-inner">
142+
143+
<article>
144+
145+
<header class="page-header">
146+
<h1 class="page-title"><?php print $title; ?></h1>
147+
<div class="page-image"></div>
148+
<div class="page-lead"></div>
149+
</header>
150+
151+
<section class="page-content">
152+
<?php print $content; ?>
153+
</section>
154+
155+
</article>
156+
157+
</div>
158+
</div>
159+
</div>
160+
</div>
161+
</div>
162+
</div>
163+
</div>
164+
165+
<footer class="footer">
166+
<div class="grid-inner">
167+
168+
<div class="panel-pane pane-block pane-menu-menu-footer-menu-1 attachment-first">
169+
<h2 class="pane-title"></h2>
170+
<div class="pane-content">
171+
<ul class="menu">
172+
<!-- <li class="first leaf"></li> -->
173+
</ul>
174+
</div>
175+
</div>
176+
177+
</div>
178+
</footer>
179+
180+
</div> <!-- /page -->
181+
182+
</body>
183+
</html>
184+

templates/maintenance-page.tpl.php

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
<?php
2+
3+
/**
4+
* @file
5+
* DDBasic theme implementation to display a single Drupal page while offline.
6+
*
7+
* All the available variables are mirrored in html.tpl.php and page.tpl.php.
8+
* Some may be blank but they are provided for consistency.
9+
*
10+
* @see template_preprocess()
11+
* @see template_preprocess_maintenance_page()
12+
*/
13+
//Site under opdatering
14+
//Vi er ved at opdatere DDBasic bibliotek. Vi er snart tilbage. Tak for din tålmodighed.
15+
?>
16+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
17+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
18+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
19+
20+
<head>
21+
<title><?php print $head_title; ?></title>
22+
<?php print $head; ?>
23+
<?php print $styles; ?>
24+
<?php print $scripts; ?>
25+
</head>
26+
27+
<body class="<?php print $classes; ?>">
28+
<div id="page" class="ding2-site-template">
29+
30+
<section class="topbar">
31+
32+
<div class="topbar-inner">
33+
34+
<div class="panel-pane pane-pane-header">
35+
<div class="pane-content">
36+
<div class="topbar-inner">
37+
<div class="site-name-wrapper">
38+
39+
<?php if (!empty($logo)): ?>
40+
<a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
41+
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
42+
</a>
43+
<?php endif; ?>
44+
45+
<?php if (!empty($site_name)): ?>
46+
<h1 class="site-name">
47+
<a href="<?php print $base_path ?>" title="<?php print t('Home'); ?>" rel="home">
48+
<?php print $site_name; ?>
49+
</a>
50+
</h1>
51+
<?php endif; ?>
52+
</div>
53+
</div>
54+
</div>
55+
</div>
56+
57+
<!--
58+
<section class="search panel-pane pane-block pane-search-form">
59+
<div class="search-field-wrapper">
60+
<form action="" method="post" id="search-block-form" accept-charset="UTF-8">
61+
<div>
62+
<h2 class="element-invisible">Søgefelt</h2>
63+
<div class="form-item form-type-textfield form-item-search-block-form">
64+
<label class="element-invisible" for="edit-search-block-form--2">Søg </label>
65+
<span class="field-prefix"><i class="icon-search"></i></span>
66+
<input aria-haspopup="true" aria-autocomplete="list" role="textbox" autocomplete="off" title="Indtast de ord du ønsker at søge efter." placeholder="Søg på biblioteket" id="edit-search-block-form--2" name="search_block_form" size="15" maxlength="128" class="form-text ui-autocomplete-input" type="text">
67+
</div>
68+
<div class="form-actions form-wrapper" id="edit-actions">
69+
<input id="edit-submit--2" name="op" value="Søg" class="form-submit" type="submit">
70+
</div>
71+
<input name="form_build_id" value="form-yAZr9geg4R5mOHjhi6DIf76mPZ6bQPERlUfBGoe68AQ" type="hidden">
72+
<input name="form_id" value="search_block_form" type="hidden">
73+
<input id="controls_search_sort" name="sort" value="" type="hidden">
74+
<input id="controls_search_size" name="size" value="" type="hidden">
75+
</div>
76+
</form>
77+
</div>
78+
</section>
79+
80+
<div class="panel-pane pane-block pane-ding-user-frontend-ding-user-ajax-login user">
81+
<div class="pane-content">
82+
<form id="ding-user-ajax-login-form" action="/cookies" method="post" accept-charset="UTF-8">
83+
<div>
84+
<input id="edit-submit--3" name="op" value="Log ind" class="form-submit ajax-processed" type="submit"><input name="form_build_id" value="form-_MLBaYHZ3GUWcto31dfDZQKillh1gJKB9G4tCKDwxe8" type="hidden">
85+
<input name="form_id" value="ding_user_comment_forbidden_form" type="hidden">
86+
</div>
87+
</form>
88+
</div>
89+
</div>
90+
-->
91+
92+
</div>
93+
94+
</section>
95+
96+
<section style="top: 0px;" class="navigation-wrapper fixed">
97+
<div class="navigation-inner">
98+
<div class="main-menu-wrapper panel-pane pane-block pane-menu-block-1">
99+
<ul class="main-menu">
100+
<li class="first leaf">&nbsp;</li>
101+
</ul>
102+
</div>
103+
<div class="secondary-menu-wrapper panel-pane pane-block pane-menu-block-2">
104+
<ul class="secondary-menu">
105+
<li class="first leaf">&nbsp;</li>
106+
</ul>
107+
</div>
108+
</div>
109+
</section>
110+
111+
<div class="content-wrapper">
112+
<div class="grid-inner">
113+
<div class="panel-pane pane-page-content">
114+
<div class="pane-content">
115+
<div class="empty-sidebars panel-content-wrapper">
116+
<div class="primary-content">
117+
<div class="grid-inner">
118+
119+
<?php if (!empty($messages)): print $messages; endif; ?>
120+
121+
<article>
122+
123+
<header class="page-header">
124+
<h1 class="page-title"><?php print $title; ?></h1>
125+
<div class="page-image"></div>
126+
<div class="page-lead"></div>
127+
</header>
128+
129+
<section class="page-content">
130+
<?php print $content; ?>
131+
</section>
132+
133+
</article>
134+
135+
</div>
136+
</div>
137+
</div>
138+
</div>
139+
</div>
140+
</div>
141+
</div>
142+
143+
<footer class="footer">
144+
<div class="grid-inner">
145+
146+
<div class="panel-pane pane-block pane-menu-menu-footer-menu-1 attachment-first">
147+
<h2 class="pane-title"></h2>
148+
<div class="pane-content">
149+
<ul class="menu">
150+
<!-- <li class="first leaf"></li> -->
151+
</ul>
152+
</div>
153+
</div>
154+
155+
</div>
156+
</footer>
157+
158+
</div> <!-- /page -->
159+
160+
</body>
161+
</html>
162+

0 commit comments

Comments
 (0)