Giter Club home page Giter Club logo

content-warning-v3's People

Contributors

95civicsi avatar jaywood avatar queenvictoria avatar slawekniewiadomski avatar vincentducorps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

content-warning-v3's Issues

V3 Plugin works and then stops

Hi, I have a online Dating site. Would like to warn visitors before enter. But your plugin works fine. But after a few tries you cannot enter the site as the enter and exit buttons stop working. Can you please help?

This is the only plugin out there that offer's this kind of service.

Adding Custom Post Types

Hi. Our current theme uses a custom post type called "projects". Your plugin works great on standard posts and pages but doesn't see the project post type to protect those posts. I noticed that in your dev documentation area you gave a hook for adding this support. I am new to adding hooks/filters to wordpress. Could you please give me an idea to where i should add this code to get this custom post type protected. Thanks for all for help

background img and css styling not supported

When i upload a background image (from setting panel) the path is present in the field but nothing happens. Default background color still here.
Same thing when i try to customize background button in the appropriate field :

cwv3_exit { background-color: #red; }

cwv3_enter { background-color: #FFFFFF; }.

so i tried to directly edit the css, and nothing happens too.
i maybe doing something wrong ?

(my skills : good understanding of css and html, but bad in php, javascript)

Warning message active all pages since update.

Good Day Sir,

I have been using your plugin now for some time on two separate websites with much success. The plugin has been wonderful. Recently I have been experiencing an issue with some but not all of my members. When they select "enter' the warning will disappear but reappear every page change. The users discussing this with me this evening are 2 Safari users and 1 Chrome user. The Chrome user selected F5 and said that it did resolve his issue. I am experiencing this issue on both websites.

www.littlekaninchen.com
www.husdom.com

I have deactivated the plugin twice with no positive results.

I currently have the plugin deactivated for both of these sites but would be happy to activate them if you need to see the issue. I like this plugin very much and would like to know when it is working properly.

I should also mention that I have recently changed servers and have been experiencing other issues site wide so I am not 100% positive that this is an issue with the plugin as it may be with my server or settings.

Best wishes,

Mr Fox

background image not working

I tried to add a background image in Content-Warning admin, but it still showed the color and opacity. So I added to the custom css section to overwrite the .cwv3.dialog-overlay tag.

The image now shows up now, however it gets repeated and I want the background image to go full screen, centered and no repeat but it's still getting the tiling of the background image. Not sure what to do.

Website is http://www.kikoriwhiskey.com

This is the custom css I added to try to change the background image in the Custom CSS admin section:

.cwv3.dialog-overlay{
background-image: url("http://www.kikoriwhiskey.com/wp-content/uploads/2015/08/MG_9118Kikori.jpg");

/* Set rules to fill background */
min-height: 100%;
min-width: 1024px;

/* Set up proportionate scaling */
width: 100%;
height: auto;

/* Set up positioning */
position: fixed;
top: 0;
left: 0;
}

Am I doing something wrong?

Notices and Warning on Enter after clean install

I'm getting some Notices + Warning after a fresh install of your plugin. I'm trying to write a child theme so I'm paying more attention to the debug.log than normal. That being said, I had to do some patching on your lib/jw_simeple_options/simple_options sub module before I could even render your CWv3 Options page.

simple_options.php was fixed by commenting out the function JW_SIMPLE_OPTIONS, using ob_start/$output = ob_get_contents in function buildCheckFields. isset($this->menu_pos) ? $this->menu_pos : 0 in function load_admin_menu [default], and isset($data['def'])? $data['def'] : '' in function render_option_field [case 'check']...

After all that, the CWv3 Options page seems to render correctly.

But now I'm seeing some stuff in the debug.log which I think could be cleared with some isset() checks in your main.class.php. It seems in your function set_cookie, you json_decode $_COOKIE[{index}] before you're setting it.

This clears the index errors in line 170-172:

$cData = array(
    'pages'      => !isset($_COOKIE['cwv3_pages']) ? '' : json_decode( stripslashes( $_COOKIE['cwv3_pages'] ) ),
    'posts'      => !isset($_COOKIE['cwv3_posts']) ? '' : json_decode( stripslashes( $_COOKIE['cwv3_posts'] ) ),
    'categories' => !isset($_COOKIE['cwv3_cats']) ? '' : json_decode( stripslashes( $_COOKIE['cwv3_cats'] ) )
);

Then I get a new error:

[03-Sep-2014 05:31:16 UTC] PHP Warning:  Creating default object from empty value in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 177

Which can be resolved with:

foreach ($cData as $key => $value) {
    if(is_scalar($value)){
        $cData[$key] = new stdClass;
    }
}

The same isset check should be done for the $cData in check_data() as well.

Hope this helps a future release. I haven't fully tested your plug-in yet so I'm not sure the impact these changes have made. Below are just logs before messing with main.class.php.

OSX: 10.9.4
MAMP: 3.0.4 / PHP 5.5.10
Chrome: 37.0.2062.94
Firefox 31.0
Safari 7.0.6
WordPress: 3.9.2
Content Warning v2: 3.5.3

Output in Debug Bar: Notices / Warning
Logged in as Admin, Chrome 37, Cache Cleared, Immediate on Enter

NOTICE: wp-content/plugins/content-warning-v2/class/main.class.php:220 - Undefined index: cwv3_posts
require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/stargazer-child/content/page_events_with_intro.php'), get_footer, locate_template, load_template, require_once('/themes/stargazer-child/footer.php'), wp_footer, do_action('wp_footer'), call_user_func_array, CWV3->renderDialog, CWV3->check_data
NOTICE: wp-content/plugins/content-warning-v2/class/main.class.php:221 - Undefined index: cwv3_cats
require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/stargazer-child/content/page_events_with_intro.php'), get_footer, locate_template, load_template, require_once('/themes/stargazer-child/footer.php'), wp_footer, do_action('wp_footer'), call_user_func_array, CWV3->renderDialog, CWV3->check_data

Output in debug.log
Logged out, Chrome 37, Cache Cleared, Immediate on Enter

[03-Sep-2014 04:20:31 UTC] PHP Notice:  Undefined index: cwv3_pages in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 170
[03-Sep-2014 04:20:31 UTC] PHP Notice:  Undefined index: cwv3_posts in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 171
[03-Sep-2014 04:20:31 UTC] PHP Notice:  Undefined index: cwv3_cats in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 172
[03-Sep-2014 04:20:31 UTC] PHP Warning:  Creating default object from empty value in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 176

Firefox 31.0

[03-Sep-2014 04:29:25 UTC] PHP Notice:  Undefined index: cwv3_pages in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 170
[03-Sep-2014 04:29:25 UTC] PHP Notice:  Undefined index: cwv3_posts in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 171
[03-Sep-2014 04:29:25 UTC] PHP Notice:  Undefined index: cwv3_cats in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 172
[03-Sep-2014 04:29:25 UTC] PHP Warning:  Creating default object from empty value in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 176

Safari 7.0.6

[03-Sep-2014 04:33:18 UTC] PHP Notice:  Undefined index: cwv3_pages in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 170
[03-Sep-2014 04:33:18 UTC] PHP Notice:  Undefined index: cwv3_posts in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 171
[03-Sep-2014 04:33:18 UTC] PHP Notice:  Undefined index: cwv3_cats in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 172
[03-Sep-2014 04:33:18 UTC] PHP Warning:  Creating default object from empty value in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 176
[03-Sep-2014 03:58:29 UTC] PHP Notice:  Undefined index: cwv3_pages in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 170
[03-Sep-2014 03:58:29 UTC] PHP Notice:  Undefined index: cwv3_posts in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 171
[03-Sep-2014 03:58:29 UTC] PHP Notice:  Undefined index: cwv3_cats in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 172
[03-Sep-2014 03:58:29 UTC] PHP Warning:  Creating default object from empty value in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 176
[03-Sep-2014 03:59:38 UTC] PHP Notice:  Uninitialized string offset: 0 in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 114
[03-Sep-2014 03:59:45 UTC] PHP Notice:  Uninitialized string offset: 0 in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 114
[03-Sep-2014 03:59:50 UTC] PHP Notice:  Uninitialized string offset: 0 in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 114
[03-Sep-2014 04:00:15 UTC] PHP Notice:  Uninitialized string offset: 0 in /Applications/MAMP/htdocs/qb/wordpress/wp-content/plugins/content-warning-v2/class/main.class.php on line 114

Content Warning v3

i mark page to display the warning but when i uncheck in the page the checkbox and update the page is still reaming check

Re-Confirm after navigation.

Plugin Version 3.6.7
WordPress Version 4.4.2
Using WooCommerce Version 2.5.2
MyStile Theme Version 1.3.11

Current Settings:

Sitewide: Enabled

Home Page: Enabled

Misc Pages: Enabled

Cookie Life: 3

Dialog Title: You Must Be Age 18 or Older to Continue

Dialog Message:

The content of this website is about the use and sale of "Vape" style products.  By continuing to use the site, you agree that you are of legal age in your area, to own such products.

Exit Text: Exit

Exit Link: http://google.com

Enter Text: Enter

Enter Link: #

Toggle Denial Option: Not Checked

Denial Handling Method: Redirect the user.

Dialog Title: Access Denied

Denial Message: You have been denied access to this content. If you feel this is in error, please contact a site administrator.

Background Image is defined.

Background Opacity: 0.85

Background Color: Black

Custom CSS: in use

Category Restrictions: None selected.

When a visitor accesses the site and is not logged in, they are presented with the correct prompts and redirects work correctly. After the visitor clicks enter, they are able to view the site until they navigate to another page on the site. When they navigate to a new page on the site, they are re-prompted. This happens on all pages, even if the visitor has already clicked the enter text previously on the same page.

Check WooCommerce integration

I'm un-sure if this will work with the WooCommerce product and product cat's post type, but it DEFINITELY should.

Popup on all pages

The content warning popup correctly on restricted category, but once i agree on the popup and navigate inside the post category, I have the popup on each page.
I have that on each browser

I have wordpress 4.0
Content Warning v2 Version 3.6.2

Cookies are not being saved

Hello!
The plugin was working great while I had it on my testing server, but then once I moved the Wordpress site to my client's server, the plugin is not working as it was before. I deactivated/activated it, as well as uninstalled and re-installed without any luck.

Settings:
Sitewide: Unchecked
Home Page: Checked
Misc. Pages: Unchecked
Cookie Life: Currently 10 days, but the warning shows up every time no matter what the number here says.

The site is not set to a home page, but the latest posts page.

When you first go to the site you will see the warning as intended. Then if you refresh or click the home button it shows again. If you click NO I am not 18 yrs old, it will take you to Google as intended, but then if you revisit the site it will show the warning again. I would like for the warning to show on all pages but I have disabled that for now so that the site is somewhat usable while I try and solve this issue.

This is happening in Chrome, Firefox, IE, and Android native browser (maybe more but these are the ones I've tested).

Website:
http://www.optimalvapor.com

Thank you for any help you can provide. I really like this plugin and it is the best that I've found for the purpose it serves.

Let me know if I can provide more information.

Custom css wont work

Hey!
Ive tried to customize the box, with the code:
.cwv3_dialog .cwv3_title { background: #F3BB53; }
.cwv3_btns { background: rgba(0,0,0, .0)}
.cwv3_dialog .cwv3_btns .cwv3_enter a {background-color: #738E7A; border-radius: 6px;}
.cwv3_dialog .cwv3_btns .cwv3_exit a {background-color: #738E7A; border-radius: 6px;}
But nothing happens. I am using the newest version of wordpress.
How do i do this?

shortcode to use in php file

Is there any shortcode I can use in my php file to show created popup? I wish to show age restriction only for some pages (custom taxonomy file),

Contents of "Custom CSS" field aren't applied

Installed the latest plugin from wordpress.org, and changed the custom css as follows:

#cwv3_exit { background-color: #777777; }
#cwv3_enter { background-color: #007777; }

The dialog still shows the normal red and green colours for the buttons, and on viewing the source it doesn't look like the custom CSS gets output anywhere. Running WP 3.9.2.

Category restrictions trows error notices (jop_checked)

JW_SIMPLE_OPTIONS function jop_checked throws error on unchecked categories. Error notice:
Notice: Array to string conversion in ../wp-includes/general-template.php on line 3550

You need to stringify $haystack, if match is not met. My quick solution

function jop_checked( $haystack, $cur, $show = FALSE ) {
        if ( is_array( $haystack ) && in_array( $cur, $haystack ) ) {
            $cur = $haystack = 1;
        }
        if(is_array($haystack)) { //if $haystack is still an array, take first value
            $haystack = array_shift($haystack);
        }
        return checked( $haystack, $cur, $show );
    }

The popup is disappeared after 1 approval

Hi,

First of all thank you for the plugin, it's great. I have one issue with it though. It works fine in my site, I use it only for the home page, however, after pressing enter once the popup won't show up again unless i clear my cookies. I thought if I'd enter 0 in the cookie life field it would create a cookie just for the browsing session, however in that case it doesn't create a cookie at all and the pop up just pops after each click. I saw in your video that it's possible that the pop up will show in every time you enter a page, that's what I'd like.
I'm using the latest version: 3.6.4.

Thank you very much!

No cookie for Exit button

Hi, is it possible to save no cookie for the Exit button so that people will get asked again next time they visit the site?

Pluging is not displaying on Portfolios.

Hi. I’ve installed the plugin on my website (WP theme with customised settings). Although It works on pages and posts it doesn't on portfolios. There is any workaround for that?

URL re-writing causes re-verification on navigation.

Cookies are not checked or stored in a way that works with URL re-writing. An example where this is problematic would be if the entire website is set to use WordPress but WordPress is installed in a separate directory. This would be setup under "General Settings" and can usually be identified when the "WordPress Address (URL)" setting is different from the "Site Address (URL)" setting.

For example:

WordPress Address (URL) = http://www.somewebsite.com/wordpress/
Site Address (URL) = http://www.somewebsite.com

In this case, the cookie would be set to the site address but only with a path of "/wordpress/". When the user visits the main website, the URL is rewritten before the plugin is loaded, After the URL is re-written, the site loads and the plugin then checks for a cookie that has a path of "/" that it will not find.

I will make recommendations for corrections in future comments.

Dialog not displayed

Hi. I setup your plugin on http://alphamaleflex.com/
It is enabled and the entire site button clicked but no dialog is displayed.

Not really sure where to go next to look for what could be causing that?

Thanks for your help.

Warning when revisiting page or hitting home button

I've got the plugin set for 5 days on the cookies, but it still brings up the warning every time you visit the site as well as whenever you hit the "home" button while on the site (www.striplandia.com). I have verified cookies are beings saved while using in FF 32.0.2.

Let me know if there is any further information I can provide. Thanks!

JS file missing in HTML header?

Hi Jerry,

I am having trouble to get your plugin working.
I have set it to show up on the home page. And when I check the source code, I can see the custom CSS and also everything in . So I believe it is not loading the JS file.

I have also checked my theme, which is using wp_head() and wp_footer().

Maybe you can think of what's going wrong?

Exit Sets Enter Cookie

This is an absolutely brilliant plug-in, but I have found one issue: if the user hits exit, the cookie is set as if the user had pressed enter. So if they come back to the site later, there is no warning dialog.

Opacity can't be modified.

Hello, and thanks for your awesome plugin.
Default opacity (0.85) seemed so dark, felt like 1. So I went and tried to type 0.60 and save.
But a dialog prompted and said that what I wrote is not valid, and that the closest values to 0.60 are 0.85 and -0.15. Even though the tooltip says a float value from 0 to 1.
Anyway I chose -0.15 and the opacity was exactly the same as 0.85.
So there's the problem. Thanks for your time!

Content warning plugin

Hi Jay, I installed your plug in and I see potential here but I have a couple pretty serious issues. The Dialog title shows up but not the dialog message. Also, I have uploaded a picture to be used as a background and it is not displaying my image. I checkered the image URL and it is working but not working with your plugin. It just shows my site with barely visible opacity, which is no good for me, as this is an adult based site I need to make sure users do not make it past the content warning page at all or in any form until they agree that they are old enough to enter. Will be looking forward to your reply and thanks in advance.

HIdden text when using dark themes and white text.

When using a theme that has the color attribute set to a white color for the page body, site visitors are unable to see the Dialog Message.

While this problem can be resolved by adding custom CSS in the provided space, the plugin would benefit from having a set color for the dialog message so that all users will be able to see the text when first testing the plugin.

In general, it would be a good idea to make sure that the plugin does not use any theme based CSS and instead, overwrites that code with its own to ensure good presentation under all conditions.

Background image

Hi! First of all, this plugin is great, my only problem is, that it does not matter what kind of picture I tried to upload, none of them was shown by the plugin via entering the site. All other parts are ok, just the background image is not working for me. Please help to solve this issue.

Thanks in advance!

Br,

cs

Allow use of form elements in dialog message

I'm trying to create conditions that the user must accept before being able to get past the content warning dialog box. For this, I'm using form elements (checkboxes). However, after I insert the html in the dialog message text field in Wordpress admin, the checkbox elements are stripped out on the front end. For example:

<form name="form1" method="post" action="">
    <p>
        <label>
            <input type="checkbox" name="disclaimer" value="facts-circumstances" id="disclaimer_0">
            The facts and circumstances of your case may differ from the matters in which results and testimonials have been provided.</label>
        <br>
        <label>
            <input type="checkbox" name="disclaimer" value="results-testimonials" id="disclaimer_1">
            All results of cases handled by the firm are not provided and not all clients have given testimonials.</label>
        <br>
        <label>
            <input type="checkbox" name="disclaimer" value="experience-difference" id="disclaimer_2">
            The results and testimonials provided are not necessarily representative of results obtained by the firm or of the experience of all clients or others with the firm. Every case is different, and each client's case must be evaluated and handled on its own merits.</label>
    </p>
</form>

The front-end output looks like this:

<form name="form1" method="post" action="">
<p>
        <label></p>
<p>         The facts and circumstances of your case may differ from the matters in which results and testimonials have been provided.</label><br />
        <br><br />
        <label></p>
<p>         All results of cases handled by the firm are not provided and not all clients have given testimonials.</label><br />
        <br><br />
        <label></p>
<p>         The results and testimonials provided are not necessarily representative of results obtained by the firm or of the experience of all clients or others with the firm. Every case is different, and each client's case must be evaluated and handled on its own merits.</label>
    </p>
</form>

Category restrictions not showing up

Hi

I have installed and activated the plug in. Went to set it up for certain categories only, but alas there are no categories to choose from.

I have made sure i have categories in pages and products to see if that could be the issue, but i'm now at a loss and don't understand what else I could try.

Novice trying hard in this computer age!

Any assistance would be greatly appreciated. Thank you

content warning v3 - issue

Dialog box is opening on the wrong page

I need the content box on one page of my site and it is popping up on the main page when it is loaded. I set the only page to be the specific page. Am I missing some super simple action?

Feature Request: Give Admins WYSIWYG options to modify the appearance of the plugin.

To help make the plugin easily adaptable to all styles, Admins would benefit from having a WYSIWYG editor with clickable / selectable styling options. These options could be setup on a separate tab and would work similar to how the current background color options work. This tab should have a preview so that admins can see the changes "on the fly". Options that would be helpful could include:

Text colors
Text Size
Element background colors
Element text colors
Dialog box background colors
Dialog box size
Adjustable border radius for the dialog box and contained elements

These features could be used to generate a premium plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.