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.
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.
@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.
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.
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
(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?
But I confused it with that strange cookie notice. A dismissable privacy notice surely is the wrong approach.
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 .
@onefifty said:
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.
If you stated your problem clearer it might be easier. Do you see a menu item for privacy?
what error if any do you get. also what links are you trying? where is your forum folder?
are you using rewrite urls? Is your .htaccess correct?
in the meantime....
if you want the plugin to work with the standard mobile theme and bittersweet theme.
I suggest you test the following code with BitterSweet and see if it works and pops up a message.
I looked at the PrivacyNotice plugin and gave it a haircut and a shave (got rid of code that seemed superfluous )
Look at the PrivacyNotice/default.php
and look for class PrivacyNoticePlugin extends Gdn_Plugin {
delete the lines IMMEDIATELYAFTER class PrivacyNoticePlugin extends Gdn_Plugin { to the END of the plugin and replace with
public function PluginController_PrivacyNotice_Create($Sender) {
$Sender->Render('PrivacyNotice', '', 'plugins/PrivacyNotice');
}
public function Base_Render_Before($Sender) {
if ($Sender->Menu) {
$Sender->Menu->AddLink("",T('Privacy-Info'),'plugin/PrivacyNotice', "", array('class'=>'Popup') );
}
}
}
after getting plugin working the Bittersweet, test with Glass theme.
you may just be able to add or change for the glass Theme.
DISABLE the PrivacyNotice Plugin
RE ENABLE the PrivacyNotice Plugin
(optionally goto routes and remove the unnecessary route).
if you still have problems post an image with error with BitterSweet and then with Glass.
The assumption is the the privacynotice.php resides in PrivacyNotice/views folder and you editing that file
also upgrade forum to vanilla 2.5.1
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)
@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.
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.
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.
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.
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 ...
@River said:
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.
You can add "usePopupSettings":false in addon.json (and I expect "UsePopupSettings" => false in PluginInfo) in order to avoid that the setting page will be opened as a popup
@Caylus said:
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.
@River said:
FWIW default.php name seems to work currently as long as Class in the plugin has Plugin in the class name withing the plugin.
Naming conventions seems to be evolving, just take a look at the vanillaconnect plugin and you will find the file 'VanillaConnectPlugin.php`. So we end up with the following options:
default.php
class.somename.plugin.php
SomeNamePlugin.php
And maybe you can even name it any way you want as long as the class name is "correct"?
The correct class name for a plugin which resides in the folder /plugins/someExample would be SomeExamplePlugin
The addon.json would allow differing class names, though: "className":"SomeExamplePug" would allow you to give your plugin a ridiculous name.
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
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.
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.
Who reads things like that anyway?
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 .
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
If you stated your problem clearer it might be easier. Do you see a menu item for privacy?
what error if any do you get. also what links are you trying? where is your forum folder?
are you using rewrite urls? Is your .htaccess correct?
in the meantime....
if you want the plugin to work with the standard mobile theme and bittersweet theme.
I looked at the PrivacyNotice plugin and gave it a haircut and a shave (got rid of code that seemed superfluous )
Look at the PrivacyNotice/default.php
and look for class PrivacyNoticePlugin extends Gdn_Plugin {
delete the lines IMMEDIATELYAFTER class PrivacyNoticePlugin extends Gdn_Plugin { to the END of the plugin and replace with
after getting plugin working the Bittersweet, test with Glass theme.
you may just be able to add or change for the glass Theme.
$Sender->Menu->AddLink("Menu",T('Privacy-Info'),'plugin/PrivacyNotice', "", array('class'=>'Popup') );
DISABLE the PrivacyNotice Plugin
RE ENABLE the PrivacyNotice Plugin
(optionally goto routes and remove the unnecessary route).
if you still have problems post an image with error with BitterSweet and then with Glass.
The assumption is the the privacynotice.php resides in PrivacyNotice/views folder and you editing that file
also upgrade forum to vanilla 2.5.1
alternatively you can use https://open.vanillaforums.com/addon/basicpages-application as mentioned above, or https://open.vanillaforums.com/addon/extrapage-plugin or https://open.vanillaforums.com/addon/simplepages-plugin
there are hundreds of easy ways to accomplish adding a popup privacy notice or a static privacy page.
Always best to test with core themes to determine issue.
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
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:
You also have to rename "default.php" to "class.PrivacyNotice.php" (I think capitalization matters)
That does the trick for me.
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.
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.
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.
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 ...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
You can add
"usePopupSettings":false
in addon.json (and I expect"UsePopupSettings" => false
in PluginInfo) in order to avoid that the setting page will be opened as a popupNaming conventions seems to be evolving, just take a look at the vanillaconnect plugin and you will find the file 'VanillaConnectPlugin.php`. So we end up with the following options:
And maybe you can even name it any way you want as long as the class name is "correct"?
The correct class name for a plugin which resides in the folder
/plugins/someExample
would beSomeExamplePlugin
The addon.json would allow differing class names, though:
"className":"SomeExamplePug"
would allow you to give your plugin a ridiculous name.