[nodebb-plugin-custom-pages] Custom Static pages for NodeBB
-
i want to remove custom-pages links from main menu
-
@vivek-tailor Try adding this to the custom class...
" style="display:none;
Copy it as is, including the first " etc.
-
Nice trick
Once this issue is resolved you'll be able to remove / rearrange menu items without having to use the above
-
@psychobunny Is it still not possible to add an image to the link?
-
Even adding a FontAwesome icon would suffice for the time being if that's not possible.
-
@psychobunny is it at all possible to add a "hide to anonymous users" or "make page private" option to the static pages? I realize that you can do this with each individual widget but it would be much more expedient if it were implemented in the ACP section of this plugin.
-
@psychobunny you might not be managing this plugin anymore, but I'm running into an issue where the widgets don't load on the custom pages, even after clearing cache and stuff. Anything you'd be able to do to help me out?
-
@Scuzz said:
Is there any way to use an icon instead of just text?
Better late than never:
$('document').ready(function() { $( "li.policy-page>a>span" ).replaceWith( '<i class="fa fa-fw fa-gavel"></i>' ); });
Just replace
policy-page
with the class of your new page, andfa-gavel
with the icon you want it replaced with. -
Hmm... The plugin didn't run on NodeBB 0.5.4
Produces this error:
2014-12-08T21:40:29.074Z - error: TypeError: Cannot read property 'admin' of undefined at Object.plugin.init (/home/nodebb/foorum/node_modules/nodebb-plugin-custom-pages/library.js:101:43) at /home/nodebb/foorum/src/plugins.js:489:23 at /home/nodebb/foorum/node_modules/async/lib/async.js:125:13 at Array.forEach (native) at _each (/home/nodebb/foorum/node_modules/async/lib/async.js:46:24) at Object.async.each (/home/nodebb/foorum/node_modules/async/lib/async.js:124:9) at Object.Plugins.fireHook (/home/nodebb/foorum/src/plugins.js:487:12) at Plugins.reloadRoutes (/home/nodebb/foorum/src/plugins.js:135:11) at /home/nodebb/foorum/node_modules/async/lib/async.js:656:23 at fn (/home/nodebb/foorum/node_modules/async/lib/async.js:641:34) TypeError: Cannot read property 'admin' of undefined at Object.plugin.init (/home/nodebb/foorum/node_modules/nodebb-plugin-custom-pages/library.js:101:43) at /home/nodebb/foorum/src/plugins.js:489:23 at /home/nodebb/foorum/node_modules/async/lib/async.js:125:13 at Array.forEach (native) at _each (/home/nodebb/foorum/node_modules/async/lib/async.js:46:24) at Object.async.each (/home/nodebb/foorum/node_modules/async/lib/async.js:124:9) at Object.Plugins.fireHook (/home/nodebb/foorum/src/plugins.js:487:12) at Plugins.reloadRoutes (/home/nodebb/foorum/src/plugins.js:135:11) at /home/nodebb/foorum/node_modules/async/lib/async.js:656:23 at fn (/home/nodebb/foorum/node_modules/async/lib/async.js:641:34) 2014-12-08T21:40:29.077Z - info: [app] Shutdown (SIGTERM/SIGINT) Initialised. 2014-12-08T21:40:29.078Z - info: [app] Database connection closed.
-
@markkus, you're running the 0.6.0 supported version of the plugin. Run the following one line at a time from your NodeBB folder.
npm rm nodebb-plugin-custom-pages
npm i [email protected]
Then go into your Plugins in the ACP, disable the custom-pages plugin, then re-enable it. Then restart/reload your forum.
-
Anyone else having CSRF issues with this plugin on 0.6.0?
-
It looks like the CSRF issue was in core, not within the plugin itself.
-
This post is deleted!
-
@Ted Worth noting that it usually only uses text, the icons are done using a Javascript tweak that you can find further up posted by me.
-
@Ted Thanks! That is pretty neat you can add it there like that. You could then use that as a sign up area for premium membership, or blogs, or really anything I guess