NodeBB-Community / nodebb-plugin-shoutbox

NodeBB Shoutbox plugin
MIT License
31 stars 34 forks source link

Two shoutboxes #91

Closed melroy89 closed 9 years ago

melroy89 commented 9 years ago

Hi,

When I press on the title, a link will open to the shoutbox (let's call it fullscreen mode).

But on that moment I see 2 shout-boxes!? Where the bottom one can't be used: Example: https://forum.libreweb.org/shoutbox

This looks like a bug. I also have an attachment: 2_boxes

Ps. The shoutbox below doesn't work.

Kind regards, Melroy van den Berg

Benderwan commented 9 years ago

This has to do with #85

melroy89 commented 9 years ago

I see, still @Schamper closed your issue, but it's actually not a good solution. Most of the people will use the widget feature, this should be a setting or something...

Don't just close this issue.

Schamper commented 9 years ago

I closed it because it's not an issue with the shoutbox. The shoutbox is a widget, you decided to put that widget in a global widget area. You know what a global widget area is? It's a widget area on every page. I can't change that. The only way to change that is to use a theme with a non-global widget area and put the shoutbox in there. Alternatively you can use a custom theme that overrides the dedicated shoutbox page with an empty page and keep the widget in the global area.

melroy89 commented 9 years ago

Well, you can atleast check if the url is equal to 'shoutbox' and at that moment block hide 1 shoutbox. This could be a setting.

EDIT: How to add the shoutbox only to the homepage instead of global data? Do I need to change the theme? If so, what do I need to include in the theme. Can you give me an code example?

Schamper commented 9 years ago

I'm not a themer but you should be able to get enough information from here and here.

I've added your suggestion (https://github.com/Schamper/nodebb-plugin-shoutbox/commit/7e6034932541d4d291cbb011639d94f2f67b1e6a). Reason why I didn't want to do this in the first place is because I thought I wouldn't have access to that data in that method but it turns out I did. I won't publish a new version to npm yet until I fix some of the other issues though.