forked from backdrop-ops/slides
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upgrade.html
executable file
·460 lines (407 loc) · 14.6 KB
/
upgrade.html
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Upgrading from Drupal 7 to Backdrop CMS</title>
<meta name="description" content="Upgrading from Drupal 7 to Backdrop CMS.">
<meta name="author" content="Jen Lampton">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700" media="all" />
<link rel="stylesheet" href="reveal.js/css/reveal.css">
<link rel="stylesheet" href="reveal.js/plugin/prism/prism.css">
<link rel="stylesheet" href="reveal.js/plugin/fontawesome/css/font-awesome.min.css">
<link rel="stylesheet" href="reveal.js/css/theme/backdrop.css" id="theme">
<style>
#watermark {
position: absolute;
bottom: 4%;
left: 1%;
width: 25%;
height: 15%;
/*background: url(assets/companies/srijan-ww.png) no-repeat; */
background-size: 100% auto;
z-index: 1000;
}
</style>
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'reveal.js/css/print/pdf.css' : 'reveal.js/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="reveal.js/lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<div id="watermark"></div>
<section>
<h1>Upgrade from Drupal 7</h1>
<h2>to Backdrop CMS</h2>
<img src="assets/layouts/images/Drop_lounging_final_black.png" alt="Drop the dragon lounging" style="width: 50%; padding: 10% 5% 2%;" />
</section>
<section>
<h1>Why Backdrop CMS?</h1>
<ul>
<li>You Love Drupal</li>
<li>Want a more <em>affordable</em> alternative</li>
<li>Want (almost) all the same features</li>
</ul>
</section>
<section>
<h1>Upgrade from Drupal</h1>
<h2>in 4 easy steps</h2>
<ol>
<li>Research what will be necessary to upgrade</li>
<li>Prepare your Drupal site for upgrade</li>
<li>Upgrade your Drupal site to Backdrop CMS</li>
<li>Restore your site & go online!</li>
</ol>
</section>
<section>
<h1>Step 1:</h1>
<h2>Research what will be necessary to upgrade to Backdrop CMS</h2>
</section>
<section>
<h2>i) Review your theme.</h2>
<p>Are you able and willing to port your existing theme from Drupal to Backdrop CMS?</p>
</section>
<section>
<h2>Differences in themes</h2>
<p>a) The page template (page.tpl.php) and it's variants becomes layouts</p>
<div class='left' style='float:left;width:38%'>
<h4>Drupal 7</h4>
code
</div>
<div class='right' style='float:right;width:58%'>
<h4>Backdrop CMS</h4>
configuration
</div>
</section>
<section>
<h2>Differences in themes</h2>
<p>b) There are minor markup changes. CSS will likely need to be updated.</p>
<div class='left' style='float:left;width:38%'>
<h4>Drupal 7</h4>
<pre><code>
div
id="page-title"
</code></pre>
</div>
<div class='right' style='float:right;width:58%'>
<h4>Backdrop CMS</h4>
<pre><code>
article, nav, section, asside
class="page-title"
</code></pre>
</div>
</section>
<section>
<h2>Differences in themes</h2>
<p>c) classes and attributes printed differently in templates.</p>
<h4>Drupal 7</h4>
<pre><code>
class="< ?php print $classes; ?>" < ?php print $attributes; ?>
</code></pre>
<h4>Backdrop CMS</h4>
<pre><code>
class="< ?php print implode(' ', $classes); ?>" < ?php print backdrop_attributes($attributes); ?>
</code></pre>
</section>
<section>
<h2>Differences in themes</h2>
<p>d) functions are called from within templates</p>
<div class='left' style='float:left;width:38%'>
<h4>Drupal 7</h4>
<pre><code>
print $styles;
print $scripts;
</code></pre>
</div>
<div class='right' style='float:right;width:58%'>
<h4>Backdrop CMS</h4>
<pre><code>
print backdrop_get_css();
print backdrop_get_js();
</code></pre>
</div>
</section>
<section>
<h2>ii) Review your layouts.</h2>
<img src="assets/upgrade/images/layouts.png" alt="Core Layouts" />
<ul>
<li>Can you make do with the layouts in Backdrop core?</li>
<li>If not, are you able and willing to create your own? (info file, .tpl.php file, .css file)</li>
</ul>
</section>
<section>
<h2>iii) Review your modules.</h2>
<ul>
<li>Custom modules</li>
<li>Core modules</li>
<li>Contributed modules</li>
</ul>
</section>
<section>
<h2>Review custom modules.</h2>
<ul>
<li>How many do you have?</li>
<li>How complicated are they?</li>
<li>Are you able and willing to port your custom modules to Backdrop CMS?</li>
</ul>
</section>
<section>
<h2>Differences in modules</h2>
<p>a) the info file needs to be updated</p>
<div class='left' style='float:left;width:48%'>
<h4>Drupal 7</h4>
<pre><code>
core = 7.x
</code></pre>
</div>
<div class='right' style='float:right;width:48%'>
<h4>Backdrop CMS</h4>
<pre><code>
backdrop = 1.x
type = module
</code></pre>
</div>
</section>
<section>
<h1>Sometimes...</h2>
<h2>Your module will work after this one change!</h2>
<p>(Backdrop CMS contains backwards-compatability with Drupal 7)<p>
</section>
<section>
<h1>However...</h2>
<h2>There's more, of course.</h2>
<p>(You'll likely also want Configuration Management, so...)<p>
</section>
<section>
<h2>Differences in modules</h2>
<p>b) configuration management</p>
<div class='left' style='float:left;width:48%'>
<h4>Drupal 7</h4>
<pre><code>
variable_set()
variable_get()
</code></pre>
</div>
<div class='right' style='float:right;width:48%'>
<h4>Backdrop CMS</h4>
<pre><code>
config_set() or $config->set()
config_get() or $config->get()
</code></pre>
</div>
</section>
<section>
<h2>Differences in modules</h2>
<p>c) all instances of drupal_ become backdrop_</p>
<div class='left' style='float:left;width:48%'>
<h4>Drupal 7</h4>
<pre><code>
drupal_add_css();
Drupal.behaviors.example = {};
</code></pre>
</div>
<div class='right' style='float:right;width:48%'>
<h4>Backdrop CMS</h4>
<pre><code>
backdrop_add_css();
Backdrop.behaviors.example = {};
</code></pre>
</div>
</section>
<section>
<h2>Differences in modules</h2>
<p>d) system_settings_form() has been removed</p>
</section>
<section>
<h4>Drupal 7 settings form</h4>
<pre><code>
function modulename_settings_form($form, $form_state) {
$form['modulename_my_setting'] = array(
'#type' => 'textfield',
'#title' => t('My setting'),
'#default_value' => variable_get('modulename_my_setting', ''),
);
return system_settings_form($form);
}
</code></pre>
</section>
<section
<h4>Backdrop CMS settings form</h4>
<pre><code>
function modulename_settings_form($form, $form_state) {
$config = config('modulename.settings');
$form['my_setting'] = array(
'#type' => 'textfield',
'#title' => t('My setting'),
'#default_value' => $config->get('my_setting'),
);
// Add a submit button
$form['actions']['#type'] = 'actions';
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
return $form;
}
/**
* Submit handler for module_settings_form().
*/
function modulename_settings_form_submit($form, &$form_state) {
$config = config('modulename.settings');
$config->set('my_setting', $form_state['values']['my_setting']);
$config->save();
backdrop_set_message(t('The configuration options have been saved.'));
}
</code></pre>
</section>
<section>
<h2>Differences in modules</h2>
<p>e) no more class registry</p>
<div class='left' style='float:left;width:38%'>
<h4>Drupal 7</h4>
files[] = path/to/file
</div>
<div class='right' style='float:right;width:58%'>
<h4>Backdrop CMS</h4>
function hook_autoload_info() {
return array(
'ClassName' => 'path/to/file.inc',
);
}
</div>
</section>
<section>
<h1>It's not so different!</h2>
<p>It should be quick & easy to port modules.<p>
</section>
<section>
<h2>Review core modules.</h2>
<img src="assets/upgrade/images/core-modules.png" alt="Contrib Modules" />
<ul>
<li>Have any been removed from Backdrop CMS?</li>
<li>If so, did you really need them?</li>
<li>If so, do they exist in contrib?</li>
<li>If not, are you able and willing to port it yourself?</li>
</ul>
</section>
<section>
<h2>Review contributed modules.</h2>
<ul>
<li>Have any been moved into core in Backdrop CMS?</li>
<li>If some have not, do they exist in contrib?</li>
<li>If some do not, are you able and willing to port them?</li>
</ul>
<img src="assets/upgrade/images/modules.png" alt="Contrib Modules" />
</section>
<section>
<h1>Step 2:</h1>
<h2>Prepare your Drupal 7 site!</h2>
</section>
<section>
<h2>Before you begin:</h2>
<ul>
<li>Assure you are on the latest release of Drupal 7.</li>
<li>Assure you are on the latest stable versions of all your contrib modules and themes.</li>
</ul>
</section>
<section>
<h1>Back Up <u>Everything</u>:</h1>
<ul>
<li>Backup the database</li>
<li>backup files directory</li>
<li>backup the codebase</li>
</ul>
<p>Put a copy of each in a safe place!</p>
</section>
<section>
<h2>Prepare your Drupal site</h2>
<ul>
<li>Disable core modules that have been removed from Backdrop CMS (careful!)</li>
<li>Change your active themes back to core themes.</li>
<li>Put your site into maintenance mode.</li>
</ul>
</section>
<section>
<h2>Dump the prepared database</h2>
<h3>(from Drupal site)</h3>
<h2>Import the prepared database</h2>
<h3>(into Backdrop site)</h3>
</section>
<section>
<h1>Step 3</h1>
<h2>Upgrade!!!</h2>
<h3>(visit update.php)</h3>
</section>
<section>
<h1>Step 4:</h1>
<h2>Restore your site & go online!</h2>
<ul>
<li>Enable your theme of choice</li>
<li>Set up & adjust your layouts as necessary.</li>
<li>Triple check that everything is working.</li>
<li>Disable maintenance mode.</li>
</ul>
</section>
<section>
<h1>Let's do it!</h1>
<ul class="no-bullets">
<li>
<i class="fa fa-globe" aria-hidden="true"></i>
<a href="https://backdropcms.org/upgrade-from-drupal">https://backdropcms.org/upgrade-from-drupal</a></li>
</ul>
</section>
<section>
<h1>Questions?</h1>
<ul class="no-bullets">
<li>
<i class="fa fa-globe" aria-hidden="true"></i>
<a href="http://backdropcms.org">http://backdropcms.org</a></li>
<li>
<i class="fa fa-twitter-square" aria-hidden="true"></i>
<a href="http://twitter.com/backdropcms">@backdropcms</a></li>
<li>
<i class="fa fa-github-square" aria-hidden="true"></i>
<a href="http://github.com/backdrop">github.com/backdrop</a></li>
<li>
<i class="fa fa-comments-o" aria-hidden="true"></i>
<a href="https://gitter.im/backdrop/backdrop-issues">gitter.im/backdrop/backdrop-issues</a></li>
</ul>
</section>
</div>
</div>
<script src="reveal.js/lib/js/head.min.js"></script>
<script src="reveal.js/js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: false,
transition: 'none', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal.js/plugin/prism/prism.js', async: true },
{ src: 'reveal.js/plugin/zoom-js/zoom.js', async: true },
{ src: 'reveal.js/plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>