Jump to content

Cookie Popup


MadMikeyB

Recommended Posts

  • 4 months later...
  • Replies 51
  • Created
  • Last Reply
  • 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

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
  • 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

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
  • 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
  • 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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...