We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Mint Cookie Tag

Development and Programming

Simon Job's avatar
Simon Job
123 posts
18 years ago
Simon Job's avatar Simon Job

The Mint pepper Nametags allows you to see what pages a member logged into your site has viewed. It does this by checking a cookie for the members username. ExpressionEngine sets various cookies by default, but they are not human readable.

The Mint Cookie Tag extension allows you to set a cookie when a member logs in, with their username as the value. Available for download.

Two questions though,

  1. Is there any security issue with storing the member’s username in plain english in a cookie?

  2. I had a problem using the built-in set_cookie function, and so have just used the PHP SetCookie. The code is below, what am I doing wrong with the built-in function (currently commented out)?:

function set_mint_cookie($row)
    {
        
    global $SESS, $FNS;
    
    $cookie_value = $SESS->userdata['username'];
    
    /*$FNS->set_cookie($this->settings['cookie_name'],$cookievalue,Time()+3600);*/
    // not sure why this doesn't work
    
    SetCookie($this->settings['cookie_name'],$cookie_value, Time()+3600);

    }

Simon.

       
Simon Job's avatar
Simon Job
123 posts
18 years ago
Simon Job's avatar Simon Job

I’ve updated the extension to use a different extension hook to ensure that all logged in members get the cookie, not just ones that log in from when the extension is activated.

Mint Cookie Tag v.1.0.1

Further to previous post, I fixed the problem I noted in question 2.

       
David Webb's avatar
David Webb
62 posts
18 years ago
David Webb's avatar David Webb

Hey Simon.

Cheers for this. I’ve just implemented it on my site. Looking forward to seeing how well it works for me.

Thanks again.

       
jaybarnes's avatar
jaybarnes
1 posts
18 years ago
jaybarnes's avatar jaybarnes

Hey Simon. I just loaded it up on my site energyrace.com and it worked right off the bat. I had been having trouble getting Mint to recognize a cookie set by EE using the set cookie function. I think I had the path wrong. But your extension takes the pain out of it.

Thanks,

-Jay Barnes

       
Pigtail Dencil's avatar
Pigtail Dencil
117 posts
17 years ago
Pigtail Dencil's avatar Pigtail Dencil

Fabulous, just what the doctor ordered.

       
katili's avatar
katili
31 posts
17 years ago
katili's avatar katili

Simon,

The download link on your site doesn’t seem to work. Is this still available for downloading?

       
Simon Job's avatar
Simon Job
123 posts
17 years ago
Simon Job's avatar Simon Job

Sorry, I’ve fixed that now.

That site uses Textpattern, and when you update Textpattern it wipes over where uploaded files are stored… and I always forget to upload them again.

       
katili's avatar
katili
31 posts
17 years ago
katili's avatar katili

Thank you very much!! 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.