picturehouse_uk 1.0.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -1
  3. data/CHANGELOG.md +18 -0
  4. data/README.md +7 -10
  5. data/Rakefile +20 -7
  6. data/lib/picturehouse_uk.rb +4 -1
  7. data/lib/picturehouse_uk/cinema.rb +51 -100
  8. data/lib/picturehouse_uk/film.rb +22 -8
  9. data/lib/picturehouse_uk/internal/address_parser.rb +72 -0
  10. data/lib/picturehouse_uk/internal/cinema_page.rb +35 -0
  11. data/lib/picturehouse_uk/internal/film_with_screenings_parser.rb +87 -37
  12. data/lib/picturehouse_uk/internal/title_sanitizer.rb +49 -0
  13. data/lib/picturehouse_uk/internal/website.rb +39 -0
  14. data/lib/picturehouse_uk/screening.rb +63 -19
  15. data/lib/picturehouse_uk/version.rb +2 -2
  16. data/picturehouse_uk.gemspec +11 -11
  17. data/test/fixture_updater.rb +43 -0
  18. data/test/fixtures/address-fragments/duke-of-yorks.html +39 -0
  19. data/test/fixtures/address-fragments/hackney-picturehouse.html +12 -0
  20. data/test/fixtures/cinema/Duke_Of_Yorks.html +4370 -0
  21. data/test/fixtures/cinema/Duke_Of_Yorks/film_last.html +45 -0
  22. data/test/fixtures/cinema/Duke_Of_Yorks/film_second.html +37 -0
  23. data/test/fixtures/{abbeygate-contact-us.html → contact_us/Duke_Of_Yorks.html} +635 -156
  24. data/test/fixtures/{dukes-at-komedia-contact-us.html → contact_us/Dukes_At_Komedia.html} +582 -98
  25. data/test/fixtures/{picturehouses-homepage.html → home.html} +642 -146
  26. data/test/lib/picturehouse_uk/cinema_test.rb +127 -307
  27. data/test/lib/picturehouse_uk/film_test.rb +65 -16
  28. data/test/lib/picturehouse_uk/internal/address_parser_test.rb +55 -0
  29. data/test/lib/picturehouse_uk/internal/cinema_page_test.rb +51 -0
  30. data/test/lib/picturehouse_uk/internal/film_with_screenings_parser_test.rb +44 -151
  31. data/test/lib/picturehouse_uk/internal/title_sanitizer_test.rb +131 -0
  32. data/test/lib/picturehouse_uk/internal/website_test.rb +64 -0
  33. data/test/lib/picturehouse_uk/screening_test.rb +149 -21
  34. data/test/live/integration_test.rb +68 -0
  35. data/test/test_helper.rb +3 -1
  36. metadata +40 -43
  37. data/test/fixtures/dukes-at-komedia-cinema.html +0 -7148
  38. data/test/fixtures/film_node/blue-jasmine-done.html +0 -53
  39. data/test/fixtures/film_node/blue-jasmine-future.html +0 -55
  40. data/test/fixtures/film_node/bolshoi-spartacus.html +0 -26
  41. data/test/fixtures/film_node/captain-phillips-with-silver-screen-and-subtitles.html +0 -103
  42. data/test/fixtures/film_node/fifth-estate-with-big-scream.html +0 -73
  43. data/test/fixtures/film_node/london-film-festival-with-toddler-time.html +0 -46
  44. data/test/fixtures/film_node/met-encore-rusalka-as-live.html +0 -26
  45. data/test/fixtures/film_node/nt-encore-hamlet.html +0 -26
  46. data/test/fixtures/film_node/planes-with-kids-club.html +0 -77
  47. data/test/fixtures/film_node/royal-opera-house-don-quixote.html +0 -26
  48. data/test/fixtures/film_node/rsc-encore-richard-ii.html +0 -28
  49. data/test/fixtures/film_node/rsc-live-richard-ii.html +0 -41
  50. data/test/fixtures/film_node/rsc-live-the-two-gentlemen-of-verona-zero-cert.html +0 -19
  51. data/test/fixtures/hackney-contact-us.html +0 -998
@@ -21,15 +21,15 @@ xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en">
21
21
 
22
22
 
23
23
 
24
- <link rel="stylesheet" href="/site-media/css/cityscreen/global.201308021435.css" />
24
+ <link rel="stylesheet" href="https://d2t98m0n7ql7on.cloudfront.net/site-media/css/cityscreen/global.201312092207.css" />
25
25
 
26
26
 
27
27
  <!--[if IE 6]>
28
- <link rel="stylesheet" href="/site-media/css/cityscreen/ie6.v3.min.css" type="text/css" />
28
+ <link rel="stylesheet" href="https://d2t98m0n7ql7on.cloudfront.net/site-media/css/cityscreen/ie6.v3.min.css" type="text/css" />
29
29
  <![endif]-->
30
30
 
31
31
  <!--[if IE 7]>
32
- <link rel="stylesheet" href="/site-media/css/cityscreen/ie7.v1.min.css" type="text/css" />
32
+ <link rel="stylesheet" href="https://d2t98m0n7ql7on.cloudfront.net/site-media/css/cityscreen/ie7.v1.min.css" type="text/css" />
33
33
  <![endif]-->
34
34
  <meta name="google-site-verification" content="tfGR4gRo-YG-57LfPFX3Pjv0VqsFRPKIs2ioVOH-3f8" />
35
35
 
@@ -47,25 +47,25 @@ xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en">
47
47
 
48
48
 
49
49
 
50
- <script type="text/javascript" charset="utf-8" src="/site-media/js/libs/jquery-1.9.1.js"></script>
51
- <script src="/site-media/js/libs/jquery-migrate-1.1.0.js"></script>
52
- <script type="text/javascript" charset="utf-8" src="/site-media/js/libs/typeahead.js"></script>
53
- <script src="/site-media/js/libs/hogan-2.0.0.js"></script>
54
- <script src="/site-media/js/libs/jquery.tools.min.js"></script>
50
+ <script type="text/javascript" charset="utf-8" src="https://d2t98m0n7ql7on.cloudfront.net/site-media/js/libs/jquery-1.9.1.js"></script>
51
+ <script src="https://d2t98m0n7ql7on.cloudfront.net/site-media/js/libs/jquery-migrate-1.1.0.js"></script>
52
+ <script type="text/javascript" charset="utf-8" src="https://d2t98m0n7ql7on.cloudfront.net/site-media/js/libs/typeahead.js"></script>
53
+ <script src="https://d2t98m0n7ql7on.cloudfront.net/site-media/js/libs/hogan-2.0.0.js"></script>
54
+ <script src="https://d2t98m0n7ql7on.cloudfront.net/site-media/js/libs/jquery.tools.min.js"></script>
55
55
 
56
56
  <link rel="stylesheet" type="text/css" href="http://partner.mymovies.net/html5/jqtools/1.css"/>
57
57
  <link href="http://partner.mymovies.net/html5/css/video-js.css" rel="stylesheet" type="text/css">
58
- <script src="http://partner.mymovies.net/html5/js/video_ovrly.js" type="text/javascript"></script>
58
+ <script src="http://partner.mymovies.net/html5/js/video_ovrly.js" type="text/javascript"></script>
59
59
  <script SRC="http://flvplayer.mymovies.net/includes/sdc_tag.js" type="text/javascript"></script>
60
60
 
61
- <script type="text/javascript" charset="utf-8" src="/site-media/js/cityscreen/site.201308042128.js"></script>
61
+ <script type="text/javascript" charset="utf-8" src="https://d2t98m0n7ql7on.cloudfront.net/site-media/js/cityscreen/site.20140714.js"></script>
62
62
 
63
- <link type="image/x-icon" href="/site-media/images/cityscreen/favicon.gif" rel="shortcut icon"/>
64
- <link type="image/x-icon" href="/site-media/images/cityscreen/favicon.gif" rel="icon"/>
63
+ <link type="image/x-icon" href="https://d2t98m0n7ql7on.cloudfront.net/site-media/images/cityscreen/favicon.gif" rel="shortcut icon"/>
64
+ <link type="image/x-icon" href="https://d2t98m0n7ql7on.cloudfront.net/site-media/images/cityscreen/favicon.gif" rel="icon"/>
65
65
 
66
66
  <script type="text/javascript">
67
- function twitterPop(str) {
68
- mywindow = window.open('http://twitter.com/share?url='+str,"Tweet_widow","channelmode=no,directories=no,location=no,menubar=no,scrollbars=no,toolbar=no,status=no,width=500,height=375,left=300,top=200");
67
+ function twitterPop(text, url) {
68
+ mywindow = window.open('http://twitter.com/share?text='+text+'&url='+url,"Tweet_widow","channelmode=no,directories=no,location=no,menubar=no,scrollbars=no,toolbar=no,status=no,width=500,height=375,left=300,top=200");
69
69
  mywindow.focus();
70
70
  }
71
71
  </script>
@@ -111,10 +111,10 @@ docCookies = {
111
111
  jQuery(document).ready(function(){
112
112
  if ((docCookies.getItem('accepted') === null)) {
113
113
  console.log('cookie');
114
- jQuery('body').append('<div id="cookie_message" style="background-color: rgb(255, 255, 225); color: rgb(51, 51, 51); position: fixed; top: 0px; left: 0px; right: 0px; padding: 7px 120px 7px 36px; vertical-align: middle; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(68, 68, 68); font-size: 12px; font-family: Arial, Helvetica, sans-serif; z-index: 9999; box-shadow: rgb(0, 0, 0) 0px 0px 5px; "><p class="wolfblock" style="text-align: left; font-size: 1.1em !important; width: 600px; float: left; margin: 0px; padding: 0px; line-height: 16px; ">This site uses cookies to help make it more useful and reliable. By using the site or by dismissing this banner you are consenting to their use.</p><a href="#" id="cookie_accepted">Do not show this message again</a></div></div>');
114
+ jQuery('body').append('<div id="cookie_message" style="background-color: rgb(255, 255, 225); color: rgb(51, 51, 51); position: fixed; bottom: 0px; left: 0px; right: 0px; padding: 7px 120px 7px 36px; vertical-align: middle; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(68, 68, 68); font-size: 12px; font-family: Arial, Helvetica, sans-serif; z-index: 9999; box-shadow: rgb(0, 0, 0) 0px 0px 5px; "><p class="wolfblock" style="text-align: left; font-size: 1.1em !important; width: 600px; float: left; margin: 0px; padding: 0px; line-height: 16px; ">This site uses cookies to help make it more useful and reliable. By using the site or by dismissing this banner you are consenting to their use.</p><a href="#" id="cookie_accepted">Do not show this message again</a></div></div>');
115
115
  jQuery('#cookie_accepted').click(function() {
116
116
  jQuery('#cookie_message').hide();
117
- docCookies.setItem('accepted', 'dismissed', new Date(2014, 1, 1), '/');
117
+ docCookies.setItem('accepted', 'dismissed', 86400*365*30, '/');
118
118
  });
119
119
  }
120
120
  });
@@ -127,19 +127,38 @@ if ((docCookies.getItem('accepted') === null)) {
127
127
  setup_api();
128
128
  </script>
129
129
 
130
+ <script type="text/javascript">
131
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
132
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
133
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
134
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
135
+ ga('create', 'UA-7911463-2', 'picturehouses.co.uk');
136
+ ga('require', 'displayfeatures');
137
+ ga('send', 'pageview');
138
+ </script>
139
+
140
+
130
141
  <script type="text/javascript">
131
142
  newman_prefix = 'newman';
132
- document.write(unescape("%3Cscript src='" + websales_url + "/jswebsales/static/customer.201308042153.js' type='text/javascript'%3E%3C/script%3E"));
143
+ document.write(unescape("%3Cscript src='" + websales_url + "/jswebsales/static/customer.201404272310.js' type='text/javascript'%3E%3C/script%3E"));
133
144
  </script>
134
145
 
146
+
147
+
148
+
149
+
135
150
  <script type="text/javascript">
136
151
  jQuery(document).ready(function(){
152
+
153
+
154
+
137
155
  jQuery('#searchForm').replaceWith('<div class="demo" style="float:right; margin-right:10px;"><form rel="nofollow" action="/cinema/Dukes_At_Komedia/Search/"><input class="typeahead" name="header_search" type="text" placeholder="Search..."></form></div>');
138
156
 
139
157
  var url = '/fs/';
140
158
  if ('DAK' !== 'global') {
141
- url = '/cinema/Dukes_At_Komedia' + url;
159
+ url = '/cinema/Dukes_At_Komedia/fs/';
142
160
  }
161
+ if (location.protocol !== 'https:') {
143
162
  jQuery('.typeahead').typeahead({
144
163
  name:'films',
145
164
  prefetch:{url:url,
@@ -151,12 +170,18 @@ if ((docCookies.getItem('accepted') === null)) {
151
170
  var $typeahead = jQuery(this);
152
171
  var v = $typeahead.val();
153
172
  if (v !== '') {
154
- _gaq.push(['_trackEvent', 'Search', 'Typing', v]);
173
+ ga('send', 'event', {
174
+ eventCategory:'Search',
175
+ eventAction:'Typing',
176
+ eventValue:v});
155
177
  }
156
178
  })
157
179
  .on('typeahead:selected', function(evt, item) {
158
180
  var $typeahead = jQuery(this);
159
- _gaq.push(['_trackEvent', 'Search', 'Selected', $typeahead.val()]);
181
+ ga('send', 'event', {
182
+ eventCategory:'Search',
183
+ eventAction:'Selected',
184
+ eventValue:$typeahead.val()});
160
185
  window.location.href = item.uri + '?utm_source=' + window.location.pathname + '&utm_medium=search&utm_campaign=selected';
161
186
  })
162
187
  .on('typeahead:closed', function(evt, item) {
@@ -165,7 +190,10 @@ if ((docCookies.getItem('accepted') === null)) {
165
190
  })
166
191
  .on('typeahead:autocompleted', function (evt, item) {
167
192
  var $typeahead = jQuery(this);
168
- _gaq.push(['_trackEvent', 'Search', 'Autocompleted', $typeahead.val()]);
193
+ ga('send', 'event', {
194
+ eventCategory:'Search',
195
+ eventAction:'Autocompleted',
196
+ eventValue:$typeahead.val()});
169
197
  window.location.href = item.uri + '?utm_source=' + window.location.pathname + '&utm_medium=search&utm_campaign=autocompleted';
170
198
  }) ;
171
199
  jQuery('div.demo form input.typeahead').bind('keypress', function(e) {
@@ -173,30 +201,61 @@ if ((docCookies.getItem('accepted') === null)) {
173
201
  jQuery('div.demo form').submit();
174
202
  }
175
203
  });
204
+ }
176
205
  initialize_api('Dukes_At_Komedia', '', 'DAK');
177
206
  });
178
207
  </script>
208
+ <!-- Start: GPT Sync -->
209
+
210
+ <script type='text/javascript'>
211
+
212
+ var gptadslots=[];
213
+
214
+ (function(){
215
+
216
+ var useSSL = 'https:' == document.location.protocol;
217
+
218
+ var src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
219
+
220
+ document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
221
+
222
+ })();
223
+
224
+ </script>
225
+ <script type="text/javascript">
226
+
227
+
228
+ //Adslot 1 declaration
229
+
230
+ gptadslots[1]= googletag.defineSlot('/116061662/UK_PictureHouses', [[300,250]],'div-gpt-ad-144738139352026482-1').addService(googletag.pubads());
231
+
232
+
233
+
234
+ //Adslot 2 declaration
235
+
236
+ gptadslots[2]= googletag.defineSlot('/116061662/UK_PictureHouses/Homepage', [[300,250]],'div-gpt-ad-144738139352026482-2').addService(googletag.pubads());
237
+
238
+
239
+
240
+ googletag.pubads().enableSyncRendering();
241
+
242
+ googletag.enableServices();
243
+
244
+ </script>
245
+
246
+ <!-- End: GPT -->
179
247
  </head>
180
248
 
181
249
  <body>
182
250
 
183
251
  <div id="wrapper">
184
252
 
253
+ <link rel="stylesheet" href="https://d2t98m0n7ql7on.cloudfront.net/site-media/css/cityscreen/venues.2014091904.css" />
254
+
255
+ <div id="con_header" class="header_DAK" sold="">
256
+
257
+
185
258
 
186
- <div id="con_header" class="clapham headerDAK"
187
-
188
-
189
-
190
-
191
-
192
-
193
- style="background: url('/site-media/images/cityscreen/headers/header_DAK.gif');">
194
-
195
-
196
-
197
-
198
-
199
-
200
259
  <h1>
201
260
 
202
261
  <a href="/cinema/Dukes_At_Komedia/" id="header_logo" class="DAK" alt="Duke&#39;s At Komedia"></a>
@@ -268,13 +327,361 @@ if ((docCookies.getItem('accepted') === null)) {
268
327
 
269
328
  </div>
270
329
 
330
+
331
+ <style>
332
+ #precomplete_form {
333
+ width:270px;
334
+ }
335
+ #precomplete_formfancybox-link {
336
+ visibility: none;
337
+ }
338
+ </style>
339
+
340
+ <a href="#precomplete_form" id="precomplete_formfancybox-link" class="fancybox-link"></a>
341
+ <div class="hide">
342
+ <div id="precomplete_form" class="popup-form g-clear">
343
+ <form method="post" action="" name="info_form">
344
+ <div class="form-left-part">
345
+ <h3>Additional Information</h3>
346
+
347
+ <p id="precomplete_msg">To complete your registration, please choose your favourite cinema:</p>
348
+
349
+ <div id="precomplete_email_holder">
350
+ <label for="">Email address</label>
351
+ <span class="text">
352
+ <i class="t-tl"></i><i class="t-tr"></i>
353
+ <input type="text" id="precomplete_email" name="loginemail"/>
354
+ </span>
355
+ </div>
356
+
357
+
358
+ <div class="clearall"></div>
359
+
360
+ <div id="precomplete_venue_holder">
361
+ <label for="">Favourite cinema</label>
362
+ <select id="precomplete_venue">
363
+
364
+
365
+ <option value="cph">Clapham Picturehouse</option>
366
+
367
+
368
+
369
+ <option value="EDP">East Dulwich Picturehouse</option>
370
+
371
+
372
+
373
+ <option value="gate">Gate Picturehouse</option>
374
+
375
+
376
+
377
+ <option value="gnw">Greenwich Picturehouse</option>
378
+
379
+
380
+
381
+ <option value="hck">Hackney Picturehouse</option>
382
+
383
+
384
+
385
+ <option value="PHC">Picturehouse Central</option>
386
+
387
+
388
+
389
+ <option value="ritz">Ritzy Picturehouse</option>
390
+
391
+
392
+
393
+ <option value="se">Stratford, London</option>
394
+
395
+
396
+
397
+ <option value="bath">The Little</option>
398
+
399
+
400
+
401
+ <option value="NMM">Picturehouse at the NMM</option>
402
+
403
+
404
+
405
+ <option selected="selected" value="DAK">Duke&#39;s At Komedia</option>
406
+
407
+
408
+
409
+ <option value="doyb">Duke of York&#39;s</option>
410
+
411
+
412
+
413
+ <option value="camb">Arts Picturehouse Cambridge</option>
414
+
415
+
416
+
417
+ <option value="edbg">Cameo Picturehouse</option>
418
+
419
+
420
+
421
+ <option value="xtr">Exeter Picturehouse</option>
422
+
423
+
424
+
425
+ <option value="rgl">Regal Picturehouse</option>
426
+
427
+
428
+
429
+ <option value="fact">Picturehouse at FACT</option>
430
+
431
+
432
+
433
+ <option value="nor">Cinema City</option>
434
+
435
+
436
+
437
+ <option value="oxfd">Phoenix Picturehouse</option>
438
+
439
+
440
+
441
+ <option value="hlsh">Harbour Lights</option>
442
+
443
+
444
+
445
+ <option value="soa">Stratford-upon-Avon</option>
446
+
447
+
448
+
449
+ <option value="york">York Picturehouse</option>
450
+
451
+
452
+ </select>
453
+ </div>
454
+
455
+ <span class="button">
456
+ <i class="b-tl"></i><i class="b-tr"></i>
457
+ <input type="button" value="Complete Registration" id="completebutton"/>
458
+ </span>
459
+ </div>
460
+ </form>
461
+ </div>
462
+ </div>
463
+
464
+ <script>
465
+ // START OF UTILS
466
+ function qs(key) {
467
+ key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars
468
+ var match = location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)"));
469
+ return match && decodeURIComponent(match[1].replace(/\+/g, " "));
470
+ }
471
+
472
+ if (typeof String.prototype.startsWith != 'function') {
473
+ // see below for better implementation!
474
+ String.prototype.startsWith = function (str){
475
+ return this.indexOf(str) == 0;
476
+ };
477
+ }
478
+ // END OF UTILS
479
+
480
+ function isPrecompleteForm() {
481
+ if (window.location.hash.indexOf("#precomplete_form") != -1) {
482
+ jQuery("a#precomplete_formfancybox-link")[0].click()
483
+ }
484
+ };
485
+
486
+ var precomplete_hookup = function() {
487
+ jQuery('a#precomplete_formfancybox-link').fancybox({
488
+ transitionIn: 'elastic',
489
+ transitionOut: 'elastic',
490
+ onComplete: function(){
491
+ jQuery('#precomplete_form span.button .b-tl').each(function(){
492
+ jQuery(this).width( jQuery(this).parent().width() )
493
+ });
494
+ }
495
+ });
496
+ jQuery('#completebutton').click(precomplete_finish);
497
+ };
498
+
499
+ var setup_precomplete_form = function() {
500
+ setup = window.location.hash
501
+
502
+ if (setup.indexOf("email") == -1) {
503
+ jQuery("#precomplete_email_holder").hide()
504
+ } else {
505
+ jQuery("#precomplete_email_holder").show()
506
+ }
507
+ if (setup.indexOf("venue_id") == -1) {
508
+ jQuery("#precomplete_venue_holder").hide()
509
+ } else {
510
+ jQuery("#precomplete_venue_holder").show()
511
+ }
512
+ };
513
+
514
+ var precomplete_finish = function() {
515
+ var url = qs('redirect');
516
+ if (setup.indexOf("email") != -1) {
517
+ url += "&email=" + jQuery("#precomplete_email").val()
518
+ }
519
+ if (setup.indexOf("venue_id") != -1) {
520
+ url += "&venue_id=" + jQuery("#precomplete_venue").val()
521
+ }
522
+
523
+ window.location.href = url
524
+ };
525
+
526
+ jQuery(document).ready(function () {
527
+ precomplete_hookup();
528
+ setup_precomplete_form()
529
+ isPrecompleteForm()
530
+ })
531
+
532
+ </script>
533
+
534
+
271
535
  <div class="hide">
272
536
  <div id="login_form" class="popup-form g-clear">
537
+ <style>
538
+ #socialauth_error_msg {
539
+ color:red;
540
+ margin:0;
541
+ line-height:12px;
542
+ margin-bottom:-7px;
543
+ }
544
+ </style>
545
+
546
+ <p id="socialauth_error_msg"></p>
547
+
548
+ <script>
549
+ console.log("START ALERT SETUP SCRIPT")
550
+
551
+ // START OF UTILS
552
+ function getHashParams() {
553
+
554
+ var hashParams = {};
555
+ var e,
556
+ a = /\+/g, // Regex for replacing addition symbol with a space
557
+ r = /([^&;=]+)=?([^&;]*)/g,
558
+ d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
559
+ q = window.location.hash.substring(1);
560
+
561
+ while (e = r.exec(q))
562
+ hashParams[d(e[1])] = d(e[2]);
563
+
564
+ return hashParams;
565
+ }
566
+ // END OF UTILS
567
+
568
+ function isErrorMsg() {
569
+ // Is there a socialauth error message?
570
+ if (window.location.hash.indexOf("#socialauth_error_msg") != -1) {
571
+
572
+ // Found a SocialAuth error signal, preparing to display msg.
573
+ var msg = getHashParams()["socialauth_error_msg"]
574
+ if (msg) {
575
+ jQuery("#socialauth_error_msg").html(msg);
576
+ jQuery("#socialauth_error_msg").show();
577
+ };
578
+
579
+ // Open login dialog.
580
+ var rt = jQuery("a#login_formfancybox-link").fancybox().trigger('click');
581
+ } else {
582
+ jQuery("#socialauth_error_msg").hide();
583
+ }
584
+ };
585
+
586
+ isErrorMsg()
587
+
588
+ </script>
589
+
273
590
  <form method="post" action="/loyalty/login_process" name="login_form">
274
591
  <div class="form-left-part">
592
+
593
+ <style>
594
+
595
+ .social_auth_widget {
596
+ margin-bottom: 10px;
597
+ }
598
+
599
+ .social_button {
600
+ width: 270px;
601
+ height: 30px;
602
+ margin-bottom: 8px;
603
+ }
604
+
605
+ .social_auth_widget a,
606
+ .social_auth_widget a:link,
607
+ .social_auth_widget a:visited,
608
+ .social_auth_widget a:hover,
609
+ .social_auth_widget a:active
610
+ {
611
+ color: inherit;
612
+ text-decoration: none;
613
+ }
614
+
615
+ .social_button h4 {
616
+ display: inline;
617
+ padding-left: 6px;
618
+ vertical-align: -webkit-baseline-middle;
619
+ color: #fff;
620
+ font-size: 129%;
621
+ letter-spacing: 0.2px;
622
+ }
623
+
624
+ .social_button.safari h4 {
625
+ vertical-align: middle !important;
626
+ }
627
+
628
+ .social_auth_widget #facebook_button {
629
+ background-color: #4a629d;
630
+ border-radius: 3px;
631
+ }
632
+
633
+ .social_auth_widget #google-plus_button {
634
+ background-color: #ca363a;
635
+ border-radius: 3px;
636
+ }
637
+
638
+ .social_button img {
639
+ margin-left: 10px;
640
+ margin-top: 2.5px;
641
+ }
642
+
643
+ .social_button.safari img {
644
+ margin-top: 3px;
645
+ }
646
+
647
+ </style>
648
+
649
+ <div class="social_auth_widget">
650
+ <a href="/socialauth/login/facebook/">
651
+ <div class="social_button" id="facebook_button">
652
+ <img src="/site-media/images/social/facebook_login.png" alt="Login with Facebook"></img>
653
+ <h4>Sign in with Facebook</h4>
654
+ </div>
655
+ </a>
656
+ <a href="/socialauth/login/google-plus/">
657
+ <div class="social_button" id="google-plus_button">
658
+ <img src="/site-media/images/social/google-plus_login.png" alt="Login with Google+"></img>
659
+ <h4>Sign in with Google+</h4>
660
+ </div>
661
+ </a>
662
+ </div>
663
+
664
+ <script>
665
+ (function () {
666
+
667
+ var source = encodeURI(document.URL)
668
+ jQuery(".social_auth_widget a").each(function (i,v) {
669
+ v.href = v.href + "?source_page=" + source
670
+ })
671
+
672
+ var safari = jQuery.browser.safari != undefined;
673
+ if (safari) {
674
+ jQuery(".social_button").addClass("safari");
675
+ }
676
+ })()
677
+ </script>
678
+
679
+
680
+
681
+
682
+
275
683
  <h3>Sign in</h3>
276
684
  <p class="error login_form" style="color:red; margin:0; line-height:1em; display:None;"></p>
277
-
278
685
  <label for="">Email address</label>
279
686
  <span class="text">
280
687
  <i class="t-tl"></i><i class="t-tr"></i>
@@ -309,15 +716,101 @@ if ((docCookies.getItem('accepted') === null)) {
309
716
  </form>
310
717
 
311
718
  <div class="form-right-part">
312
- <h3>Create an account</h3>
313
- <p>You must be an existing Picturehouse Member to register for an online account.</p>
719
+ <h3>Create a MyPicturehouse account</h3>
314
720
  <p class="error register_form" style="color:red; margin:0; line-height:1em; display:None;"></p>
315
721
 
316
- <label for="">Membership number (8 digits)</label>
317
- <span class="text">
318
- <i class="t-tl"></i><i class="t-tr"></i>
319
- <input type="text" id="membership_myphcustomer_num"/>
320
- </span>
722
+ <label for="">Favourite cinema</label>
723
+ <select id="membership_myphvenue_id">
724
+
725
+
726
+ <option value="cph">Clapham Picturehouse</option>
727
+
728
+
729
+
730
+ <option value="EDP">East Dulwich Picturehouse</option>
731
+
732
+
733
+
734
+ <option value="gate">Gate Picturehouse</option>
735
+
736
+
737
+
738
+ <option value="gnw">Greenwich Picturehouse</option>
739
+
740
+
741
+
742
+ <option value="hck">Hackney Picturehouse</option>
743
+
744
+
745
+
746
+ <option value="PHC">Picturehouse Central</option>
747
+
748
+
749
+
750
+ <option value="ritz">Ritzy Picturehouse</option>
751
+
752
+
753
+
754
+ <option value="se">Stratford, London</option>
755
+
756
+
757
+
758
+ <option value="bath">The Little</option>
759
+
760
+
761
+
762
+ <option value="NMM">Picturehouse at the NMM</option>
763
+
764
+
765
+
766
+ <option selected="selected" value="DAK">Duke&#39;s At Komedia</option>
767
+
768
+
769
+
770
+ <option value="doyb">Duke of York&#39;s</option>
771
+
772
+
773
+
774
+ <option value="camb">Arts Picturehouse Cambridge</option>
775
+
776
+
777
+
778
+ <option value="edbg">Cameo Picturehouse</option>
779
+
780
+
781
+
782
+ <option value="xtr">Exeter Picturehouse</option>
783
+
784
+
785
+
786
+ <option value="rgl">Regal Picturehouse</option>
787
+
788
+
789
+
790
+ <option value="fact">Picturehouse at FACT</option>
791
+
792
+
793
+
794
+ <option value="nor">Cinema City</option>
795
+
796
+
797
+
798
+ <option value="oxfd">Phoenix Picturehouse</option>
799
+
800
+
801
+
802
+ <option value="hlsh">Harbour Lights</option>
803
+
804
+
805
+
806
+ <option value="soa">Stratford-upon-Avon</option>
807
+
808
+
809
+
810
+ <option value="york">York Picturehouse</option>
811
+
812
+
813
+ </select>
321
814
 
322
815
  <div class="clearall"></div>
323
816
 
@@ -329,11 +822,6 @@ if ((docCookies.getItem('accepted') === null)) {
329
822
 
330
823
  <div class="clearall"></div>
331
824
 
332
- <a class="lightgreen" href="#" id="noemailbutton" title="">I don't have a registered email address.</a>
333
-
334
- <div class="clearall"></div>
335
- <br />
336
-
337
825
  <span class="button">
338
826
  <i class="b-tl"></i><i class="b-tr"></i>
339
827
  <input type="submit" id="createaccountbutton" value="Create account" />
@@ -343,10 +831,7 @@ if ((docCookies.getItem('accepted') === null)) {
343
831
  <br />
344
832
 
345
833
  <h4>The benefits</h4>
346
-
347
- Rate films, receive recommendations, view history. Speed up your online booking.
348
- <br />Manage account and subscriptions.
349
- <br />+ More coming soon.
834
+ Speed up online booking, rate films, receive recommendations, view your film history, manage your private account, signup for coming soon, manage subscriptions and preferences.
350
835
  </div>
351
836
 
352
837
  </div>
@@ -392,8 +877,8 @@ if ((docCookies.getItem('accepted') === null)) {
392
877
  <p>Please provide the following details to set up your account.</p>
393
878
 
394
879
  <p class="error" style="color:red; padding:0; margin:0; line-height:1em; display:None;"></p>
395
- <label for="">Membership number</label>
396
- <span class="text">
880
+ <label style="display:none;" for="">Membership number</label>
881
+ <span class="text" style="display:none;">
397
882
  <i class="t-tl"></i><i class="t-tr"></i>
398
883
  <input type="text" id="registercustomer_num" name="registercustomer_num"/>
399
884
  </span>
@@ -449,7 +934,11 @@ if ((docCookies.getItem('accepted') === null)) {
449
934
 
450
935
 
451
936
 
937
+
938
+
452
939
 
940
+
941
+
453
942
  <div id="con_menu">
454
943
  <!-- Main menu -->
455
944
  <div id="menumain" style="font-size:14px;">
@@ -656,6 +1145,8 @@ if ((docCookies.getItem('accepted') === null)) {
656
1145
 
657
1146
 
658
1147
  </div>
1148
+
1149
+
659
1150
 
660
1151
 
661
1152
  <div id="con_content">
@@ -758,8 +1249,12 @@ if ((docCookies.getItem('accepted') === null)) {
758
1249
  </div>
759
1250
 
760
1251
  </p>
761
- <p style="font-style: normal; font-family: Arial, Tahoma, Verdana, sans-serif;"><span style="font-family: Arial, Tahoma, Verdana, sans-serif;">Box Office: 0871 902 5728<span style="color: #333333;"><span style="line-height: 18px;">&nbsp;</span></span></span></p>
762
- <p style="font-style: normal; font-family: Arial, Tahoma, Verdana, sans-serif;">General Manager: Jon Barrenechea</p>
1252
+ <p style="font-style: normal; font-family: Arial, Tahoma, Verdana, sans-serif;"><span style="font-family: Arial, Tahoma, Verdana, sans-serif;">Box Office: 0871 902 5728<span style="color: #333333;"><span style="line-height: 18px;"> <br />Email: <a class="__cf_email__" href="/cdn-cgi/l/email-protection" data-cfemail="a4c0d1cfc1d7c5d0cfcbc9c1c0cdc5e4d4cdc7d0d1d6c1cccbd1d7c1d78ac7cb8ad1cf">[email&nbsp;protected]</a><script type="text/javascript">
1253
+ /* <![CDATA[ */
1254
+ (function(){try{var s,a,i,j,r,c,l,b=document.getElementsByTagName("script");l=b[b.length-1].previousSibling;a=l.getAttribute('data-cfemail');if(a){s='';r=parseInt(a.substr(0,2),16);for(j=2;a.length-j;j+=2){c=parseInt(a.substr(j,2),16)^r;s+=String.fromCharCode(c);}s=document.createTextNode(s);l.parentNode.replaceChild(s,l);}}catch(e){}})();
1255
+ /* ]]> */
1256
+ </script></span></span></span></p>
1257
+ <p style="font-style: normal; font-family: Arial, Tahoma, Verdana, sans-serif;">General Manager: Jess Harris</p>
763
1258
 
764
1259
 
765
1260
  </div>
@@ -776,31 +1271,20 @@ if ((docCookies.getItem('accepted') === null)) {
776
1271
 
777
1272
 
778
1273
  <div class="ad">
779
- <!-- List of tags for the site: Picturehouses, Format "Standard" -->
780
1274
 
781
- <!-- REMINDER: this function must be pasted inside the website pages. -->
782
1275
 
783
- <script type="text/javascript">
784
- sas_tmstp=Math.round(Math.random()*10000000000);sas_masterflag=1;
785
- function SmartAdServer(sas_pageid,sas_formatid,sas_target) {
786
- if (sas_masterflag==1) {sas_masterflag=0;sas_master='M';} else {sas_master='S';};
787
- document.write('<scr'+'ipt src="https://www4.smartadserver.com/call/pubj/' + sas_pageid + '/' + sas_formatid + '/' + sas_master + '/' + sas_tmstp + '/' + escape(sas_target) + '?"></scr'+'ipt>');
788
- }
789
- </script>
790
- <!-- Page : ros -->
1276
+ <!-- Beginning Sync AdSlot 2 for Ad unit UK_PictureHouses/Homepage ### size: [[300,250]] -->
1277
+ <div id='div-gpt-ad-144738139352026482-2'>
1278
+ <script type='text/javascript'>
1279
+ googletag.display('div-gpt-ad-144738139352026482-2');
1280
+ </script>
1281
+ </div>
1282
+ <!-- End AdSlot 2 -->
1283
+
791
1284
 
792
- <script type="text/javascript">
793
- sas_pageid='23668/160918'; // Page : Picturehouses/ros
794
- sas_formatid=10021; // Format : MPU 300x250
795
- sas_target=''; // Targeting
796
- SmartAdServer(sas_pageid,sas_formatid,sas_target);
797
- </script>
798
- <noscript>
799
- <a href="https://www4.smartadserver.com/call/pubjumpi/23668/160918/10021/M/[timestamp]/?" target="_blank">
800
- <img src="https://www4.smartadserver.com/call/pubi/23668/160918/10021/M/[timestamp]/?" border="0" alt="" /></a>
801
- </noscript>
802
1285
  </div>
803
1286
 
1287
+
804
1288
 
805
1289
 
806
1290
 
@@ -809,11 +1293,17 @@ function SmartAdServer(sas_pageid,sas_formatid,sas_target) {
809
1293
 
810
1294
 
811
1295
 
812
- <a onClick="_gaq.push(['_trackEvent','advert', 'internal', 'click'])" href="https://itunes.apple.com/gb/app/picturehouse-recommends/id579615856?mt=8" target="_blank">
813
- <img src="/site-media/images/cityscreen/iPad_MPU_PicRecs30.gif"/>
1296
+ <a href="/News/item/Guardian_Live_Russell_Brand_In_Conversation/">
1297
+ <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="300" height="250" id="Richard Curtiss" align="middle">
1298
+ <param name="allowScriptAccess" value="sameDomain" />
1299
+ <param name="allowFullScreen" value="false" />
1300
+ <param name="movie" value="https://d2t98m0n7ql7on.cloudfront.net/site-media/images/cityscreen/GuardianLive_MPUBrand.swf" />
1301
+ <param name="quality" value="high" />
1302
+ <param name="bgcolor" value="#333333" />
1303
+ <embed src="https://d2t98m0n7ql7on.cloudfront.net/site-media/images/cityscreen/GuardianLive_MPUBrand.swf" quality="high" bgcolor="#333333" width="300" height="250" name="kuma" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
1304
+ </object>
814
1305
  </a>
815
1306
 
816
-
817
1307
 
818
1308
 
819
1309
  </div>
@@ -835,7 +1325,7 @@ function SmartAdServer(sas_pageid,sas_formatid,sas_target) {
835
1325
  <div class="toplinks txt4">
836
1326
  <div class="right footer_select" style="width:314px;">
837
1327
 
838
- <img src="/site-media/images/cityscreen/logo_small.gif" id="logo_small" style="position:relative; left:80px; top:-7px;">
1328
+ <img src="https://d2t98m0n7ql7on.cloudfront.net/site-media/images/cityscreen/logo_small.gif" id="logo_small" style="position:relative; left:80px; top:-7px;">
839
1329
 
840
1330
  <form>
841
1331
  <select name="selectnav" class="selectnav">
@@ -922,21 +1412,6 @@ value=0&amp;label=ihOBCNmJwAMQ5-n62QM&amp;guid=ON&amp;script=0"/>
922
1412
  </div>
923
1413
 
924
1414
 
925
- <script type="text/javascript">
926
-
927
- var _gaq = _gaq || [];
928
- _gaq.push(['_setAccount', 'UA-7911463-2']);
929
- _gaq.push(['_trackPageview']);
930
-
931
- (function() {
932
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
933
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
934
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
935
- })();
936
-
937
- </script>
938
-
939
-
940
1415
 
941
1416
  <div id="fb-root"></div>
942
1417
  <script>(function(d, s, id) {
@@ -952,7 +1427,10 @@ value=0&amp;label=ihOBCNmJwAMQ5-n62QM&amp;guid=ON&amp;script=0"/>
952
1427
  <script type="text/javascript">
953
1428
  function load_trailers(filmid) {
954
1429
  var film = jQuery('#' + filmid).attr('title');
955
- _gaq.push(['_trackEvent', 'Trailers', 'Play', film]);
1430
+ ga('send', 'event', {
1431
+ eventCategory:'Trailers',
1432
+ eventAction:'Play',
1433
+ eventValue:film});
956
1434
  var h ='<div style="font-family:Arial, Helvetica, sans-serif;" id="trailer_header">';
957
1435
  if (jQuery('#' + filmid).find('span').length > 1) {
958
1436
  h = h + '<select id="trailerField">';
@@ -979,14 +1457,20 @@ value=0&amp;label=ihOBCNmJwAMQ5-n62QM&amp;guid=ON&amp;script=0"/>
979
1457
  var fti= f.attr('fti');
980
1458
  triggerEnd();
981
1459
  if (mtid === 'ftr') {
982
- _gaq.push(['_trackEvent', 'Features', 'Change', film]);
1460
+ ga('send', 'event', {
1461
+ eventCategory:'Features',
1462
+ eventAction:'Change',
1463
+ eventValue:film});
983
1464
  _V_("mm_video").src([
984
1465
  { type: "video/mp4", src: "http://ml5vid.mymovies.net/filmmedia/film/fid" + fid + "/features/avfid" + mid + "/html5/700.mp4" },
985
1466
  { type: "video/webm", src: "http://ml5vid.mymovies.net/filmmedia/film/fid" + fid + "/features/avfid" + mid + "/html5/700.webm" },
986
1467
  { type: "video/ogg", src: "http://ml5vid.mymovies.net/filmmedia/film/fid" + fid + "/features/avfid" + mid + "/html5/700.ogv" }
987
1468
  ]);
988
1469
  } else {
989
- _gaq.push(['_trackEvent', 'Trailers', 'Change', film]);
1470
+ ga('send', 'event', {
1471
+ eventCategory:'Trailers',
1472
+ eventAction:'Change',
1473
+ eventValue:film});
990
1474
  _V_("mm_video").src([
991
1475
  { type: "video/mp4", src: "http://ml5vid.mymovies.net/filmmedia/film/fid" + fid + "/trailers/trid" + mid + "/html5/700.mp4" },
992
1476
  { type: "video/webm", src: "http://ml5vid.mymovies.net/filmmedia/film/fid" + fid + "/trailers/trid" + mid + "/html5/700.webm" },