Jump to content

Cookie Popup


MadMikeyB

Recommended Posts

Posted

Another question, does this hook still allow google and other search engines to crawl a website?
Google etc... are in their own membership group in IP.Board, could you allow us to choose which groups see the popup?

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

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.

Posted

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 ;)

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

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 goes kaboom.

Thanks 

Posted

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?

Posted

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 ;)

Posted

Does nothing other than close the dialog box, which is displayed as a result of clicking a "Learn More" button in the red box. The red box will continue to display until such a time as the "ok got it" button is clicked.

Posted

Ah okay.

A setting that would make it work so that the dialog box appears automatically and cannot be closed unless you click the "Okay, got it."  button would be neat. :)

That would ensure that the user must give explicit permission first.

Posted

It would be nice, but not enabled by default. ;)

As I said, this is the first rough version for 4.x which needs polishing. More settings, templates etc will come later. :)

  • 1 month later...
Posted

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. 

  • 1 month later...
Posted

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 :)

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...