Home > Projects > wordpress > Plugin > wp-door > WP-DOOR : Wordpress plugin for Content Warning

WP-DOOR : Wordpress plugin for Content Warning

| 48 Comments »

WP-DOOR

New & updated version WP-DOOR coming soon.

WP-DOOR will get consents before allowing users to view contents, this make wordpress safer for mature contents and other contents where readers should be advised legally.

Current Beta version is available to those who can’t wait from wordpress.org

Current Version 0.2:
http://wordpress.org/extend/plugins/wp-door/ 

Installing Current Version 0.2

Okey, I know there we many people struggle to get this plug-in working. I hope this Step-by-step guide will help resolve this issue… If any of you need any help after following this instructions, Please do contact me via Email contact@rjeevan.com.

NOTE: Do not Activate the plugin until you finish this instructions and also Checked Check list listed at Bottom of this article.

Uploading

Files & Folders: Once downloaded, please extract the files and you should have Folders & Files as Follow:

Files & Folders

Upload this, wp-door [FOLDER] to your blog/wp-content/plugins/
* All wp-door contents should go under plugins/wp-door/*[door-options.php, door.php, Readme.txt, wp-door.php]

Now, You need to upload the door.php file to your blog/door.php.
* By default, This is where all users will be redirected. It’s important to have this door.php File in your blog ROOT folder with other wordpress files. otherwise, wordpress and this plug-in will keep redirect for 404 error pages and will end in infinite loops.

After uploading, Files structure should be look alike:

blog/
        -door.php
blog/wp-content/plugins/wp-door/
                                                -wp-door.php 
                                                -door-options.php
                                                -door.php (This is the file you need to copy to root folder as well)
                                                -Readme.txt

 Activating & Settings

Okey, If you are confident you did everything right and there is a file called door.php IN your ROOT folder with other wordpress files than go a head and activate the plugin.

Once activated, Go to Settings > Door Options to Get Door settings page.

It should looks alike:

WP DOOR settings / Options

Your settings should be as followed:

Redirect URL: this is where users will be Redirected when users try to access your Site! As you can see when plug-in activated, It will try and Pickup your Default blog URL and add /door.php to it! If you decide to change the name door.php; You should update the correct URL in this settings…

Cookie Expire in: it’s asking cookies lifetime in seconds. If you want t ask users everytime they visit your site (Once per session) you may enter -1 as value or if you want user to only agree once and don’t have to go through this again when they visit next time, you may enter 0 or if you want to set a timeframe like 1week or day month each. calculate appropriate value and enter so.

Bot List (One per line): Your site may be visited by many search engine bots like google, yahoo and each. they all have a unique agent ID, if you know of any new once, please add them here (one per line). All these bot agents will have exception so they don’t have to go through the redirect process… 

Well that pretty much all to the installing ad settings part of the Installation and Plug-in.

door.php settings

Editing door.php file, Of cause everyone want to Edit this page to change warning message and each. When developing this plug-in, I didn’t expect to change the Button Value; hence it’s programmed (PHP) to accept and create cookie when it finds a “enter” word in Submit button’s value. But if a user changes it to some other language or word without “enter” in value, System will keep on reloading on same page.

I’m unable to update this file in wordpress SVN so here i attached a link to PHP file. Please do copy all this files codes to your existing door.php and make necessary changes where needed.

New Door.php File:
Door.php

This new files PHP code is changed to check which button pressed instead of search through clicked button value(btnEnter :: This value is usually the Name of the Button).

Share and Enjoy:
  • Twitter
  • Google Bookmarks
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Sphinn
  • Print
  • Technorati
  • PDF
  • email

48 Responses to “WP-DOOR : Wordpress plugin for Content Warning”

  1. This is exactly what I need. But when I use it on WP 2.7 I get a redirect loop. Any ideas? Thanks! Don’t click on my link… it’s adult and haven’t found a good way for a disclaimer yet :)

  2. TweakBOB, It seems that may people are having problem with installing & using this plug-in. This is because of lack in instruction I given with the plug-in.

    I’m updating this original post on How to Install current version (0.2) this should clarify few problems you may come across while installing…

    If you still need help, drop me a mail at contact@rjeevan.com.

  3. Ah yes thank you the instructions are very useful and is now working! Great Plugin! Thanks for your effort!

  4. Hi rjeevan… I just wanted to come back and give you some feed back on your WP Door Plugin… It seems to be doing a great job and how I know this is that…

    the search engines are grabbing my inner sites content while the WP Door Plugin keeps under age a bay through message of course!

    I see it in my stats and indexing and just want to say if I can be of any help in testing… email me at admin@e4lmovietrailers.com RE: WP Door!

    Best!

  5. Hey Tweak,

    Sorry for the later reply.. been busy with my Exams and coursework for the First term… I will contact you soon as the next one ready… any help on testing and improving would be grateful…
    thanks.

  6. hi Rajeevan,

    I have tested your plugin and it works perfectly. On our own side we need a possibilty for an adult warning only for individual posts. Do you have an opportunity to extend your plugin? Or do you know some plugin for this work? You are interested to make some plugin like this? If so, send me an offer to my E-Mail.

    thanks!

  7. I am still tuck in the redirect loop. Help?

  8. I went back and followed step by step – it now works.

    Thanks.

  9. brunoe, I’ve started to develop one that works by Category rather than Whole site… I didn’t have much time to Test and Update… But i will update one soon.. hope that could help you on post related issues… Maybe we can extend in future… I will update soon as I got it ready!

  10. The plugin works GREAT…..How do I get it to go to one of my other websites rather than to Google when they choose to leave the site?

  11. RaiulBaztepo says: on 29 March, 2009 at 12:26 am

    Hello!
    Very Interesting post! Thank you for such interesting resource!
    PS: Sorry for my bad english, I’v just started to learn this language ;)
    See you!
    Your, Raiul Baztepo

  12. Hey guys…

    Any word on the wp-door by category? That would be so nice. I am willing to pay…

    thanks

    jose l morales

    • New one I’m working on is by category… or full site… I don’t have much time to complete it yet (Little busy with Uni Coursework & exams… I will update it asap…)

  13. Phoenix says: on 29 April, 2009 at 7:07 am

    Hello !
    Thanks for your plugin…
    But it seems block the update of my RSS Feed (FeedBurner)…
    Since i have install this plugin, my RSS feed is dead ?
    How I can resolve this issue and make my RSS feed works again ?

  14. Thank you, this guide was usefull!

  15. Thank you, this guide was realy usefull! Easy to setup.

  16. Fabio says: on 25 June, 2009 at 5:34 pm

    I have the same problem of Phoenix
    “Hello !
    Thanks for your plugin…
    But it seems block the update of my RSS Feed (FeedBurner)…
    Since i have install this plugin, my RSS feed is dead ?
    How I can resolve this issue and make my RSS feed works again ?”

  17. for feedburner feeds, Please Make an Exception… Simply add “feedburner” without quote in your BOT list!

  18. This plugin is good and works fine. Keep up the good work. :)

  19. Thank you for all your assistance. Works perfect now that you fix a USER CREATED problem!

    Hoping the next version has a few more options.

    Unique and VERY needed plog-in.

  20. alex says: on 18 July, 2009 at 5:43 am

    Can I make a suggestion?…

    My suggestion is to make an option where this plugin would work only for the home page… for example.. If I want to make users go to [domain.com/blog], then the door.php would not show up. I would only like it to show up on [domain.com]

    Is this possible to do?

    • It is possible. It require editing and adding some code to make exception for other pages.

      but, In Many countries It’s legal requirement to have a landing page for adult website and get a consent before allowing visitors to use the website. There is more chances that visitors may come from search engines or other sources directly to some contents in your site. This will make them skip the front page and if we do like you suggest, they will not be shows that this is an adult website. This alone can lead to some legal consequences…

      If you are interested, let me know and I will tell you how to make it Front page only.

      Rajeevan

      • hello Rajeevan,

        Thanks for your reply… I would like to know how to do this.
        can you email me the instructions?

        thank you very much :)

  21. Lika says: on 27 July, 2009 at 7:21 pm

    I’m confused about a couple of things… Why are people not using age verification checks on adult sites any more?

    Even the adult site owned by the plugin’s author seems to no longer use his own age verification plugin. Why? I know the plugin still works because I use it. But why do most sites not use this or something like it? Is because too many people leave the sites? Or does it affect SEO, etc.

    I really wanna know… Thanks.

    • Lika, this plugin from original site is got removed after moving servers and they forgot to add them again!

      There is no known problems with SEO as long as you add exception list… I’ve tested this plugin with added exception to google with google’s Crawler.

      In regards to Why adult sites are not using as such plugin, is because of their understanding in legal requirements (as you may know, now days anyone can start a website without spending anything!). It’s Legal requirement to have a Landing page (in many countries…).

      I will update this plugin with more features soon…

  22. Great plugin btw,

    Had a idea maybe you could work into the new version.

    When you go to the main page, the site is darken and the box is centered. In the box would be the text maybe admin area driven of what you want the info to say and the enter | exit buttons. I think you should be able to do this with a small ajax or javascript.

    I think this would be a prefect addition to a already perfect plugin.

    Just my thoughts

    • Thanks for the input
      I’m Working on a new one, soon I will release one… I’m thinking of automating the Text and other features as well…

      This was developed within a day to work, thats why it has very few options…

      • Oh don’t get me wrong it’s a awsome script. Another idea would be also to make make the Enter|Exit buttons as text with some nice css work on it to make it look like a button. Maybe also have the exit link in the admin options also.

  23. Was wondering if there is a way to bypass the enter page linking in from another domain, i dont want those users to get the enter page at all, just straight to the blog index page.

    • Can be done but require some PHP skills to do this. If you want to edit the PHP file your self, Please let me know and I will write some instructions here for you. Your referral website reference has to be HARD CODED IN PHP.

  24. hello,

    I wrote to you about giving me instructions on how to make only the home page blocked, but you never emailed me the instructions.

    I have a different question now as well… I have noticed that Google has not cached my site ever since I have used this plugin. Do you think there’s something in your plugin that needs a modification or what?

    Also, can you please email me instruction on how to make the home page blocked and the rest of the inside pages available?

    Thanks.

    • Sorry I was Not at home… I didn’t go through All my emails yet!

      Anyways, To block only the homepage You will need to Edit PHP file manually….

      To do this, Edit `wp-door.php`

      Add these following lines at Line Number: 52 (Right after @session_start() )

      —— line start
      if(!is_home())
      return;

      —— line end

      It will ignore any other pages but will work only in Homepage….

      ***
      If you have already made an exception for Google Bot in Settings, it should be just fine for Google Cache… Just in-case add another exception for “cache” and see how its going….

      Hope this helps….

  25. THis plugin is exactly what I needed, except for one problem. I am also using WP-Member plugin to manage paid memberships and it uses PayPal IPN. When WP-Door is active, the PayPal IPN will not work. Is there a PayPal exception I can make?

    • Quick Question, PayPal IPN should Use HTTPS protocol right? If it’s You may be able to make an Exception to HTTPS protocol All Together!

    • Open wp-door.php File in plugin folder and Add the following Line at Line Number 52 (Right after @session_start();)

      $is_HTTPS = strtolower(substr($_SERVER["SERVER_PROTOCOL"],0,5))=='https'? true : false;
      if($is_HTTPS)
      return;

      This will Skip any validation check in HTTPS access..

  26. Any chance of a new version of WP-Door with more options? I would also like to see plugin asking the age of visitors to verify the access plus excluding the registered members from getting to door.php.

  27. Sebastian says: on 10 November, 2009 at 9:53 pm

    Hi. I have one problem with this plugin.

    I am on a subdomain, lets say http://xxx.yyy.com. When someone hits the ENTER button he is redirected to yyy.com, not to xxx.yyy.xom. Is it possible to change the php script to let the user go to the correct subdomain? (or at least yyy.com/xxx would work too)

    Which line do I have to change? I tried a lot but it did not work

    Greetings, Sebastian

    • okay, I’m confused now!
      Page does the redirection is “door.php”. There is no code to detect it’s subdomain, folder or anything. What written is to Detect any redirect specified otherwise send user to the Current Folder or sort of!

      If you want to make sure that door.php send users to specific domain, you can edit the door.php and add your domain as specified bellow

      Edit Line : 16
      $redirect=isset($_GET['return'])?urldecode($_GET['return']):'./';

      change to
      $redirect=isset($_GET['return'])?urldecode($_GET['return']) : 'http://xxx.yyy.com';

      Remember, this works If there is no Redirect specified. If you are still having trouble getting this working, drop me mail plz or reply and I will look into it!

  28. Hi Rajeevan,

    Do you know if WP Door works with version 2.8.6? I installed but it seems to be not working for me….it redirected me to my 404 page… also, please email me if you can do some tweaking on theme…Thanks

    Marion

  29. I just wanted to thank you for this plugin!

    A client just approached me and informed me that he needed a “over 18s only” page for his nightclub page that I am building. I was worried until I find this.

    *bows*

  30. Hi rjeevan, great plugin. I setted a -1 option in the setting page. Do you think it’s normal that I don’t see the warning page anymore? Any cookies installed automatically?

    Thanks

    • Possible, try accessing your site in another browser… If it doesn’t work try clearing cookies for that domain.

      If still not show up than some settings went wrong! let me know…

  31. Hi!

    I like your plugin, because it’s very simple and just great! But I use All in One Seo Pack, and I have noticed that after activating your plugin, that there is no meta keywords, or if I add some manually, the Google bot and seo checker site are redirected too to door.php when it try to enter any post or the main page, and there is the same meta keywords everywhere. How can I fix this?

    Thanks!

    • hmm.. I have no idea why would that happen!
      I have a New Version of this Plugin! Which is Fully Ajax Based using Thickbox to Show Dialog box Message… BU I haven’t put it out to Test yet! If you are interested, let me know and I will send you the plugin… It’s much more easier and No need to worry about SEO & Bots because they ignore Javascript (I Hope!)!

      • Thanks for the quick help! Yes, I am interested in that plugin, I would be pleased if you could send it to my e-mail address. I hope that will solve our issue, and as soon as I can, I will tell you my experiences. Thanks a lot again!

  32. Does anoyone know the id for the bing bot?

Leave a Reply

© rajeevan is proudly powered by WordPress | Entries (RSS) and Comments (RSS).