Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/NodeBB-Community/nodebb-plugin-recent-cards

Recent Cards plugin for NodeBB's Persona Theme
https://github.com/NodeBB-Community/nodebb-plugin-recent-cards

Last synced: 3 months ago
JSON representation

Recent Cards plugin for NodeBB's Persona Theme

Awesome Lists containing this project

README

        

# Recent Cards plugin for NodeBB's Persona Theme

This is a plugin that creates a new widget that can be placed on various widget areas. It's inspired by the previous default theme, Lavender, which used Modern UI styling for the category layout.

## Installation

Install via one-click activation in the Admin Control Panel or run the following command:

npm i nodebb-plugin-recent-cards

Then head over to Admin -> Extend -> Widgets and place the widget. Additional settings can be found at Admin -> Plugins -> Recent Cards and under the individual widget settings.

## Screenshot

![](https://i.imgur.com/r3NKmY1.jpg)

# Standalone installation for external websites (Advanced)

Use this plugin on any external non-nodebb site (ex. Wordpress, etc) to show recent topics from your NodeBB install.

### Header Scripts + Styles

Place these in the `header` section of your external site, and replace all instances of `{forumURL}` to your forum's URL:

```

window.path_to_nodebb = '{forumURL}';

```

If your external site doesn't have jQuery included, you will have include it above the previous lines. Get the latest jQuery at https://code.jquery.com/

You should also (optionally) require the jQuery Timeago library in order to display human-readable timestamps:

```

```

If your external site doesn't have Bootstrap included, you will have to include this line as well in your `header`, which is the bare minimum (grid + responsive utilities) required for this plugin:

```

```

Similarly, if your external site does not use FontAwesome, then you will have to include this line as well in order to display category icons:

```

```

Finally, if you need to include the default Persona font to match your external site's recent cards with your forum's, then include this:

```

```

### Body Content

Place the following code wherever you'd like recent cards to be displayed:

```


```

### Configure ACAO in NodeBB

Under Settings -> Advanced in the NodeBB control panel, add the external site's URL to `Access-Control-Allow-Origin`

### Stuck?

No problem! Visit https://yourforum.com/admin/plugins/nodebb-plugin-recent-cards/tests/external, which will render the standalone version of the plugin tailored for your website. Keep in mind that this includes all extra scripts and styling that you may not necessarily need if you already have Bootstrap, jQuery, etc. on your external site.