Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Cookiebar module installation problem


Reply


7 Posts   534 Views

Avatar
beren

Community Member, 9 Posts

20 April 2013 at 3:25am

Edited: 20/04/2013 3:26am

I've got Cookiebar module from https://github.com/arambalakjian/Cookie-Bar and it looks really nice and handy :)
It might not be the problem with this module (as it's 1st one i try to install) only to be honest but help will be very appreciated.

I've done all steps as per the installation guide and the cookie bar do not appear on my site (plus flushing the site, browser cleaning).

I run SS 3.0.2 on win7 x64 with XAMP.
I named the folder "Cookie-Bar" but as per instruction folder can have any name.
Path is: C:\xampp\htdocs\Cookie-Bar\

So maybe i did something wrong or i did not do something?
But when checking page <mysite>/?showtemplate=1 i can see in place where i put "<% include CookieBar %>" into page.ss this line:
$val .= SSViewer::execute_template('CookieBar', $scope->getItem(), array());

And there is also code from cookiebar module template :

Template: C:\Windows\TEMP/silverstripe-cacheC--xampp-htdocs/.cache.Cookie-Bar.templates.Includes.CookieBar.ss
1 <?php
2 if ($scope->hasValue('ShowCookieBar', null, true)) {
3 $val .= '
4    ';
5
6 $scope->obj('SiteConfig', null, true); $scope->pushScope();
7 $val .= '
8       <div id="cookieBar">
9          <div class="container">
10             <div class="description typography">
11                ';
12
13 if ($scope->hasValue('CookieImage', null, true)) {
14 $val .= '
15                   ';
16
17 $val .= $scope->obj('CookieImage', null, true)->XML_val('SetHeight', array('80'), true);
18 $val .= '
19                ';
20
21
22 }
23 $val .= '
24
25 <p class="intro"><strong>';
26
27 $val .= $scope->XML_val('CookieBarTitle', null, true);
28 $val .= '</strong> <a href="' . (SSViewer::$options['rewriteHashlinks'] ? strip_tags( $_SERVER['REQUEST_URI'] ) : "") . '#" class="more">Show more</a></p>
29
30                <div class="content">
31                 ';
32
33 $val .= $scope->XML_val('CookieBarContent', null, true);
34 $val .= '
35                </div>
36             </div>
37             <div class="links">
38                <a id="acceptCookies" href="';
39
40 $val .= $scope->obj('Top', null, true)->XML_val('AcceptCookiesLink', null, true);
41 $val .= '">';
42
43 $val .= $scope->XML_val('CookieCloseText', null, true);
44 $val .= '</a>
45                ';
46
47 if ($scope->hasValue('CookiePage', null, true)) {
48 $val .= '
49                   <a href="';
50
51 $val .= $scope->obj('CookiePage', null, true)->XML_val('Link', null, true);
52 $val .= '" class="infoLink">';
53
54 $val .= $scope->XML_val('CookieMoreText', null, true);
55 $val .= '</a>
56                ';
57
58
59 }
60 $val .= '
61             </div>
62             <div class="clear"><!-- --></div>
63          </div>
64       </div>
65    ';
66
67
68 ; $scope->popScope();
69 $val .= '
70 ';
71
72
73 }
74 $val .= '
75
76 ';

Thanks in advance.

Avatar
Carbon Crayon

Community Member, 598 Posts

23 April 2013 at 12:25am

Did you set it up in the Site Config? You need to check the 'Show Cookie bar' box for it to show up :)

Aram

Avatar
beren

Community Member, 9 Posts

23 April 2013 at 12:40am

Holy duck!

I got it now, I am blind as I've checked the CMS admin site twice at least and I did not see cookie-bar tab.
Now i will try to configure it.

Thank you very, very much!

Avatar
Carbon Crayon

Community Member, 598 Posts

23 April 2013 at 12:41am

No problem, glad it's useful :)

Avatar
Spiggley

Community Member, 12 Posts

30 April 2013 at 1:13am

Hi Aram, Cookie bar looks great, but I would like to put onto a 2.4 site. I can't find your 2.4 branch. Is it lost forever? Any help gratefully recieved.

Avatar
Carbon Crayon

Community Member, 598 Posts

30 April 2013 at 1:14am

Hi Spiggley,

You should be able to find it here: https://github.com/arambalakjian/Cookie-Bar/tree/2.4

Cheers,

Aram

Avatar
Spiggley

Community Member, 12 Posts

30 April 2013 at 3:44am

Edited: 30/04/2013 3:45am

Thanks very much Aram.