Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Badges

Try Vanilla Forums Cloud product

River MVP

About

Username
River
Joined
Visits
1
Last Active
Roles
Member, Developer
Points
594
Badges
10
  • Re: pn.js

    @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

    vrijvlinder
  • Re: pn.js

    @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.

    vrijvlinderCaylus
  • Re: pn.js

    @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.

    vrijvlinder
  • Re: pn.js

    @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.

    vrijvlinder
  • Re: pn.js

    @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.

    vrijvlinder