HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

pn.js

I am trying to set up a privacy notice so I downloaded Privacy Notice and installed it. Now I can find the np.js file. I thought I knew what I was doing? Any help would be nice.

«1

Comments

  • I’m sorry it’s not working for you. Unfortunately I am traveling and away from my computer to see what is happening . Maybe someone else who might know why this is happening and help you solve it. I can’t do it from my cell phone.

  • Thank you for respondlng

  • RiverRiver MVP
    edited February 2018

    @onefifty said:
    I am trying to set up a privacy notice so I downloaded Privacy Notice and installed it. Now I can find the np.js file. I thought I knew what I was doing? Any help would be nice.

    fwiw - there is a pn.js here in version 1.5 https://open.vanillaforums.com/get/privacynotice-plugin-1.5

    maybe you can take it from 1.5 and make it work with 1.6 if you can't find one in 1.6.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • thank you, nothing yet. I'll stay at it.

  • Vanilla has a feature called "Messages" which you can find in the dashboard under "Moderation". That allows you showing visitors a dismissable message. I would simply use that feature.

  • thanks R_J will look into that.

  • RiverRiver MVP
    edited February 2018

    @onefifty said:
    thank you, nothing yet. I'll stay at it.

    perhaps the pn.js from 1.5 is no longer needed because it was modified in 1.6
    haven't tested the plugin.

    the downside with a dismissable message is that one it is dismissed it may troublesome for users to find the notice again if it is dismissed.

    Instead of plugin or message, another option is you can clone and edit your new theme or perhaps use

    https://open.vanillaforums.com/addon/htmledit-plugin

    to add a menu link to a privacy notice and create simple web page with your privacy notice or put the text of privacy notice in a category announcement or a discussion.

    concise instruction to creating a theme in vanilla 2.5

    https://open.vanillaforums.com/discussion/comment/251467/#Comment_251467

    you can add an html link here
    https://github.com/vanilla/vanilla/blob/master/themes/bittersweet/views/default.master.tpl#L41

    or here

    https://github.com/vanilla/vanilla/blob/master/themes/bittersweet/views/default.master.tpl#L61

    or wherever you want.

    (and point it to a discussions or a web page with the privacy notice.

    you can make a privacy notice an announcement or a regular discussion, and you can sink the discussion and make it read only so comments can't be added.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • I'm trying to place this plugin into the theme "Glass". I've tried every Url path I can think of. I've tried bones, cards, I even tried throwing salt over my shoulder, turned my hat around backwards; I not sure what to do with this think. I know this, I'll stay at it until I fugure it out.

  • @River said:
    the downside with a dismissable message is that one it is dismissed it may troublesome for users to find the notice again if it is dismissed.

    Who reads things like that anyway? :wink:

    But I confused it with that strange cookie notice. A dismissable privacy notice surely is the wrong approach.

    What about the Basic Pages plugin instead?

  • Yes the last version does
    Not use the js file because I added it to the default. As far as I can remember. This plugin is based on the extra page plugin. All it does is ad a page called Privacy. It can be accessed via a link in the menu to open a pop up or by going to the page. Yousite.com/privacy. If the pop up does not work, you might have some other plugin that is causing that .

  • You've given me a lot to work with may take me a little time to go through it all. Again thank you!

  • When I click the "privacy" button I get "page not found" popup. My guess is link i.e. "path" is not complete.

  • The Page Not Found error is a symptom from using Vanilla 2.5 and the plugin isn't compatible.

    You have to create a file "addon.json" in the directory plugins/PrivacyNotice, with these contents:

    {
    
    "type":"addon",
    "key":"PrivacyNotice",
       "name":"PrivacyNotice",
       "description":"Adds a Privacy Notice popup and Page. Puts a Privacy Link on the menu which opens in a popup but can also be accessed via opening a new window. Based on peregrine's ExtraPage",
       "version":"1.6",
       "license":"GNU GPL2",
        "authors": [{"name":"VrijVlinder"}]
    }
    

    You also have to rename "default.php" to "class.PrivacyNotice.php" (I think capitalization matters)

    That does the trick for me.

  • RiverRiver MVP
    edited February 2018

    @onefifty said:
    When I click the "privacy" button I get "page not found" popup. My guess is link i.e. "path" is not complete.

    not enough information provided by you to give you a meaningful answer.... don't know what code you are using or what links you have tried, so impossible to help you.
    the code I posted works for me with core Bittersweet theme without any other changes beyond what I provided.

    the js is incorrect for core tpl themes. (but that doesn't help you). and is not needed for tpl themes.

    should be .SiteMenu - but there is no need for js with tpl theme since addlink works to popup.

    when I first looked at your question had no idea you were using 3rd party theme. so those questions probably better answered by theme developer.

    from the docs....

    While PluginInfo and ThemeInfo declarations are deprecated, they will still be supported for some time. Aside from the syntax differences between JSON and PHP, the structure and key names are very simple.

    although the other tips are helpful for the future and may fix things for it to work for you.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • @River said:
    from the docs....

    While PluginInfo and ThemeInfo declarations are deprecated, they will still be supported for some time. Aside from the syntax differences between JSON and PHP, the structure and key names are very simple.

    although the other tips are helpful for the future and may fix things for it to work for third party themes.

    The docs may say that it's still supported, but that's not my experience up until now. With addon.json plugins work, without them plugins that worked fine in 2.3 fail in 2.5 (at least in my specific setup).

    Was fun figuring that out, I can tell you that /sarcasm.

    The "page not found error" when onefifty tries to access http://forum/plugin/privacynotice is due to the plugin not being recognized, and therefore plugincontroller_privacynotice_create doesn't fire.

    Somehow the plugin seems enabled but does jack shit.

    I'm pretty sure that if onefifty updates the plugin as I mentioned in my previous post it will work for them.

  • RiverRiver MVP
    edited February 2018

    @Caylus said:

    @River said:
    from the docs....

    While PluginInfo and ThemeInfo declarations are deprecated, they will still be supported for some time. Aside from the syntax differences between JSON and PHP, the structure and key names are very simple.

    although the other tips are helpful for the future and may fix things for it to work for third party themes.

    The docs may say that it's still supported, but that's not my experience up until now. With addon.json plugins work, without them plugins that worked fine in 2.3 fail in 2.5 (at least in my specific setup).

    won't argue with you there.

    the code I posted worked in my environment for Bittersweet and 2.5.1 without the changes you proposed.

    but if your changes make things work with Bittersweet and Glass themes in more environments, than that is the best of both worlds and helps the user solve their problem.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • RiverRiver MVP
    edited February 2018

    @Caylus said:

    @River said:
    from the docs....

    While PluginInfo and ThemeInfo declarations are deprecated, they will still be supported for some time. Aside from the syntax differences between JSON and PHP, the structure and key names are very simple.

    although the other tips are helpful for the future and may fix things for it to work for third party themes.

    The docs may say that it's still supported, but that's not my experience up until now. With addon.json plugins work, without them plugins that worked fine in 2.3 fail in 2.5 (at least in my specific setup).

    Was fun figuring that out, I can tell you that /sarcasm.

    The "page not found error" when onefifty tries to access http://forum/plugin/privacynotice is due to the plugin not being recognized, and therefore plugincontroller_privacynotice_create doesn't fire.

    Somehow the plugin seems enabled but does jack shit.

    I'm pretty sure that if onefifty updates the plugin as I mentioned in my previous post it will work for them.

    You were correct about needing the addon.json in the privacynotice plugin for it to work with the glass theme.

    FWIW I tested what you said for the glass theme, it looks like the dealbreaker was the adddon.json needs to be added as you said. The minimum two keys in the addon.json were

    "key":"PrivacyNotice",
    "name":"PrivacyNotice",

    otherwise the jquery didn't load.

    for the core .tpl themes and the glass theme to work with one plugin

    you need to change

    $(\'#Menu\').

    should be

    $(\'#Menu, .SiteMenu\').

    not sure if the setup and routing is needed as it stands.

    debugging plugin requires constant deletion of addons.php in cache after most every change.

    FWIW default.php name seems to work currently as long as Class in the plugin has Plugin in the class name withing the plugin.

    The other thing I found in the plgins for 2.5 is that with some plugins the Settings don't show completely if there are many settings on a separate setting page in views.

    probably best to change to this procedure (without a specific settings page view). than the entire settings can be seen in the settings popup with scrolling.

    https://open.vanillaforums.com/discussion/25253/simple-setting-screens-with-configurationmodule

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • Thank you , I will try to get around fixing this but I am not able atm . So if anyone can fix it and pass it to me I will upload new version when I am able ...

Sign In or Register to comment.