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

Restricted Content Plugin - does this work?

Development and Programming

Mark Jackson's avatar
Mark Jackson
60 posts
16 years ago
Mark Jackson's avatar Mark Jackson

This plugin seems ideal for a particular feature that I want to implement, but it’s not working and the documentation is “thin”.

I’ve installed it by adding the .php file to the Plugins directory, but I notice that it’s not listed in Plugin Manager of the Control panel.

Ploughing on, I included the tags as shown into a template uisng the example given, and EE reported back the following:

Error

The following tag has a syntax error:

{exp:restricted}

Please correct the syntax in your template.

EE 1.6.8

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Hi Mark,

Can you show us the exact code you are using in the template?

Best wishes,

Mark

P.S. Great name by the way 😉

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Actually scratch that. 😉

I think I remember what the problem was with this plugin. Make sure to check the file permissions are correct as I believe it downloads with funny permissions. Make sure they are something like 755 and then it should hopefully work for you.

Hope that helps a bit.

Best wishes,

Mark

       
Mark Jackson's avatar
Mark Jackson
60 posts
16 years ago
Mark Jackson's avatar Mark Jackson

Hello Mark

Here’s the (complete) template code. For testing I’ve used the example code given in the plugin file.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    {embed="includes/.head"}
</head>
<body id="support">
    <div class="page-wrap">
        {embed="includes/.header-pages"}
        <div class="grid"> </div>
        <div class="content clear" id="important-stuff">
        <!-- content-->
         <h2>Library</h2>
            <div class="section a4">
                <div class="column w3">
                    {embed="includes/library-main-nav"}
                </div>
                    <div class="column w9">
                        <h3>Access controlled area</h3>
                        <div class="column w9 nlg nrg a2 download">
                        {exp:restricted group_id="7"} 
                        {no_access}
                        <a href="http://{site_url}login">Please log in to download the secret list</a>. 
                        {/no_access}
                        <a href="http://secretlist.pdf">Download SecretList.pdf</a>
                        {/exp:restricted}
                        </div>
                    </div>
                </div>
        <!-- content -->
        </div>
        {embed="includes/.footer-home"}
        {embed="includes/.legal"}
    </div>
    {embed="includes/google-analytics"}
</body>
</html>
       
Mark Jackson's avatar
Mark Jackson
60 posts
16 years ago
Mark Jackson's avatar Mark Jackson

Permission settings were “odd”, so I’ve set them as suggested, but no joy.

       
Mark Jackson's avatar
Mark Jackson
60 posts
16 years ago
Mark Jackson's avatar Mark Jackson

Oh hold everything. I’ve uploaded the file to a completely different project on my FTP area. Sheesh. Too many things going on…

Apologies - thanks as ever for responding. I DO owe you a drink!

D’oh!

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
Oh hold everything. I’ve uploaded the file to a completely different project on my FTP area. Sheesh. Too many things going on… Apologies - thanks as ever for responding. I DO owe you a drink! D’oh!

Make that a nice cold Pepsi then 😉

Glad that got it sorted for you.

Best wishes,

Mark

       

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.