Jump to content
Announcing Achievements! ×

Community

Cookie Popup


MadMikeyB
 Share

Recommended Posts

  • 4 months later...
  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Can I request that this be made the official background of the pop up?

Updated for 4.x. This is the first plugin I've updated to 4.x. It was painless but I cannot stress enough, TRY THIS ON A TEST BOARD FIRST. I don't want to be nor am I responsible if your community go

There are also admins that expect the hook to start working immediately after you install it and seeing it doesn't work (without looking at the settings) they might think it's broken, that's a never-e

  • 3 months later...

Open xml file from this hook.

Find:

return $this->registry->output->getTemplate('global')->cookieMonster($this->settings);

Add above:

/* Load parser */
  $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' );
  $parser = new $classToLoad();
 
  $parser->set( array( 'memberData'    => $this->memberData,
        'parseBBCode'    => 1,
        'parseHtml'    => 0,
        'parseArea'   => '',
        'parseEmoticons' => 1 ) );
 
  $this->settings['cookiemonster_info'] = $parser->display( $this->settings['cookiemonster_info'] );

Save and reimport it in hooks management in ACP. Will be fine.

Link to comment
Share on other sites

Hi

I had this code

if ($showCookieJar == 1) { // I got my hands in the cookie jar... 		
	return $this->registry->output->getTemplate('global')->cookieMonster($this->settings);
	} else {
		return "";
	}

changed to this

if ($showCookieJar == 1) { // I got my hands in the cookie jar... 
/* Load parser */
  $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' );
  $parser = new $classToLoad();
 
  $parser->set( array( 'memberData'    => $this->memberData,
        'parseBBCode'    => 1,
        'parseHtml'    => 0,
        'parseArea'   => '',
        'parseEmoticons' => 1 ) );
 
  $this->settings['cookiemonster_info'] = $parser->display( $this->settings['cookiemonster_info'] );		
	return $this->registry->output->getTemplate('global')->cookieMonster($this->settings);
	} else {
		return "";
	}

and after that changes when i load my page i have just blank/white page... nothing shows up. I have to reload page to see right content (when cookiemonster.cookie is already saved).

Ps. If this help PM me in polish ;)

Link to comment
Share on other sites

  • 1 month later...
  • 8 months later...
  • 1 year later...

I install the plugin. but i don't know where i can change the layout as i see on the images.

Also when i change the text and access the website for the first time, i don't get a popup.

do i missing something? where are the settings of this plugin?

Link to comment
Share on other sites

I install the plugin. but i don't know where i can change the layout as i see on the images.

Also when i change the text and access the website for the first time, i don't get a popup.

do i missing something? where are the settings of this plugin?

Plugins-and-Steam.png

 

The actual layout is still set in stone - I couldn't get a template to export for the plugin which I need to figure out whether it's a bug or not. As I said, it's my first IPS4 update so it's going to be rough around the edges but I'll polish it til it's a diamond ;)

Link to comment
Share on other sites

  • 1 month later...

To update the link for learning what Cookies are (for IPS4); open up the XML plugin and replace:

  <div class="ipsGrid_span6">
	<a class="ipsButton ipsButton_positive ipsButton_fullWidth" href="http://www.ico.gov.uk/for_the_public/topic_specific_guides/online/cookies.aspx">What are cookies?</a>
  </div>

with:

  <div class="ipsGrid_span6">
	<a class="ipsButton ipsButton_positive ipsButton_fullWidth" href="https://ico.org.uk/for-the-public/online/cookies.aspx">What are cookies?</a>
  </div>

That should fix the out of date link for anyone having problems. 

Link to comment
Share on other sites

  • 1 month later...

Do you have any plans to adapt this for multilingual use, Mikey? The text is hardcoded in the XML file rather than reading from a translatable language string, which is the norm in 4.0. There's little point in asking my users to agree to something if it loads in a language that they can't read if they happen to use another language on my site :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy