=== Content Warning === Contributors: Phyrax Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=U5M6JBDKGF3EJ Tags: warning, message, lading page, front page, enter page, adult content, consent, age verification, validation Requires at least: 3.3.1 Tested up to: 3.3.1 Stable tag: 2.4.13 A plugin that provides a warning box with a ton more options, now compatible with YOOthemes and Genesis. == Description == Using Ajax & Thickbox, the content warning box shows a message to users with the option to enter or leave the site. This plugin, as with v1, is useful for users that host mature or offensive content inside their sites. Additionally Administrators may now designate either a url or page, for BOTH the enter and exit links within the dialog. v1 of this plugin (originially provided by [rajeevan]) prompted the user, no matter which page was visited, and provided a 'site-wide' cookie and session. v2 expands on this idea and also provides the administrator with a slew of new options, outlined below. = v2.4 Features = * Complete UI rewrite. * YOOtheme and Genesis Compatibility * UI now uses tabs instead of old crappy accoridon style. * Finally caved and added a donate button. * New denial options to show a dialog to previously denied users. = v2 Features = * Administrators can now select per-post / per-page access or utilize the previous site-wide function. * Better cookie expiration calculations (for the simple minded) * Allow Administrators to provide Authors `AND` Editors with the ability to disable the prompt on their posts/pages. * If the previous is set to allow, then Administrators can set the default for the post should the Editor or Aurhor neglect to disable the prompt. * Let's Administrators designate an enter and exit page via dropdown menu. * Administrators can select rather to use a URL or Page as the enterance/exit links. *NOTE:* > **For the enter link** if the Administrator does not fill in the URL and leaves the Page to NONE, the default will be to just close the dialog. > **For the exit link** the default will direct the user to a default URL. = Based on wp-door Plugin and v1.0 by Rajeevan = * This plugin is driven from `wp-door` Plugin, wp-door plugin used to Redirect used to landing age If no session or Cookie found. This caused problem with search engine bots. Content warning uses Ajax & Thickbox to show message without redirecting user to different page. * "No additional Library" Plugin use jQuery and Thickbox Library comes with Wordpress. * This plugin tested in 3.3.1 and working! == Installation == = Easy Method = 1. Download the zip file. 1. Login to your `Dashboard` 1. Open your plugins bar and click `Add New` 1. Click the `upload tab` 1. Choose `content-warning-v2` from your downloads folder 1. Click `Install Now` 1. All done, now just activate the plugin = Old Method = 1. Upload `content-warning-v2` to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress Settings can now be altered using the CW v2 menu on your Administrator Menu bar. == Frequently Asked Questions == This plugin is tested and proven to work with WordPress 3.3.1 = How do I resize the pop-up? = This has been covered in this post: [resize-post] = The plugin isn't working. = This is a very common question, and here is a list of possible solutions. Firstly you should note that I have tested this plugin with both a vanilla install of Wordpress 3.3 and an upgraded version, but if for some reason it's still not working for you, here's a list of possible troubleshooting procedures you should follow. 1. Make sure you're logged out, if you're an admin or editor, the plugin is designed to be disabled if you are logged in. = I'm logged out, but it's still not working. = At this point you can just follow the common troubleshooting procedures. 1. Disable all plugins except Content Warning. 2. Verify, via the theme editor, that your header file (**header.php**) uses the wp_header() function directly before the closing head tag. 3. Verify, yet again via the theme editor, that your footer file (**footer.php**) uses the wp_footer() function directly before the closing body tag. = I've done everything but I still can't get this to work = At this point I've covered all I know, but there is still one more thing you can do to see what's not happening and why. One issue I've found is that some plugins use their own jQuery library, and this seems to cause an issue. Now why plugin creators utilize their own jQuery library is beyond me considering the fact that WordPress provides a link to the built in jQuery library. Unfortunately I cannot fix this, nor will I ever. I use my own namespaces for my functions to prevent compatability issues such as this, but this does happen once in a million. = A note to fellow geeks = If you happen to follow these steps and find out a plugin that is incompatible to mine, please inform me via a message or email. You can view my website and send me the email at plugish.com or you can simply start a thread. I would like to get a catalog of incompatabilities for the general public if I can, so if you guys can help me I would be grateful. = Flash Conflict With Thickbox = This has attempted to be fixed. If you find a bug please let me know. = How to edit Colours,Styles & sizes? = You will have to open the CSS file and Edit to change Colours, Sizes and Styles. Open `content-warning-v2/assets/wpcw.css` to Make changes. I may make a small change in the future to allow colors/styles to be selected from the Administrator menu. = What's up with the .dev.js files? = These are un-obfusicated and decrypted files, these should no be left on your server and are only for your editing benifit. They are not included or used in any way, and once edited you should paste the contents into their respective non-dev files. = Why do the js files look so jumbled? = This is a theft/hacker deterrent, while not 100% effective, it will still run most off. [resize-post]: http://wordpress.org/support/topic/plugin-content-warning-how-to-change-width-and-height "How-to: Resize the Dialog" == Screenshots == 1. Preview of Thick box showing Message to End-user. 2. Admin Settings (Main Options) 3. Admin Settings (Dialog Options) 4. Admin Settings (Denial Options) == Changelog == = TBA = * Category Options = 2.4.13 = * Removed the annoying debug code. * This does not fix the bug where some users can't see the dialog. That seems to only affect a few users. = 2.4.12 = * **FIX** Bug ignoring site-wide function. * **ADD** Notes and tips in admin panel. = 2.4.9 = * **FIX** Bug showing dialog ignoring cookie and session data. * **ADD** Added element ID's across admin panel to allow for easier jQuery work coming up. = 2.4.7 = * Major AJAX security fix. (Requires 3.3) * Re-arranged dialog panel * Added Enter/Exit text options again. * Complete rewrite of HELP for 3.3 = 2.4.5 = * Added YooThemes compatability. * Added wp_head dpendancy again, it's necessary as YOOthemes overrides the previous get_header function for some reason. = 2.4.4 = * Added site-wide function back originally caused by improper tabulated elements with short-hand if statements. * Added themeing tab (code not implimented yet) = 2.4 = * Shortened ajax timing to zero, though it's still not instant. * Added denial function. The denial option will show the dialog (with your customizations/message) to users that have previously been denied. * Compressed admin and front-end css and javascript for a 40% increase in performance. = 2.3.2 = * Fixed a bug created by my ignorance. * Removed dependancy on wp_head function. Plugin should function appropriately on all themes. = 2.3.1 = * Fixed dialog error: Was showing when it was disabled.... odd! But fixed :) = 2.3.0 = * A very nice UI rewrite for collapsable tabs. * New directory structure for developers, optimized main.php file I had to move a lot of code to separate files due to the fact I was getting tired of scrolling up and down. Just a personal preference and doesn't break the code. I may move the code to a more structured class but for now the code works and that's all I'm concerned about. = 2.2.0 = * Rewrote JS function to localize javascript variables. This allows me to remove the javascript from the header and pass data variables more covertly. * Rewrote script registers to have dependancies. * Rewrote main and dev js file to reflect new data values * Small security update = 2.1.0 = * Major bugfix to allow per-page/post overrides to work correctly. * Label fixes to help with override calculations * Added default settings for enter/exit usewhich variables = 2.0.2 = Removed third party contributor though Rajeevan is still referenced. = 2.0.1 = Added WPMode fix for flash users. = 2.0.0 = * Administrators can now select per-post / per-page access or utilize the previous site-wide function. * Better cookie expiration calculations (for the simple minded) * Allow Administrators to provide Authors `AND` Editors with the ability to disable the prompt on their posts/pages. * If the previous is set to allow, then Administrators can set the default for the post should the Editor or Aurhor neglect to disable the prompt. * Let's Administrators designate an enter and exit page via dropdown menu. * Administrators can select rather to use a URL or Page as the enterance/exit links. = 1.0 = * First version created by rajeevan == Upgrade Notice == = 2.0 = Adds a ton more features from v1 by rajeevan. Along with a few security fixes.