Colormag Wordpress Theme Discourse Widget

סיכום מבוסס בינה מלאכותית

frold has developed a plugin for the Colormag WordPress theme that integrates Discourse forum posts with WordPress content, enabling mixed display of articles and forum topics. The plugin includes two widget styles, allowing users to display the latest posts from specific Discourse categories or the entire site, with customization options in the WordPress admin panel. frold acknowledges the code is not optimized and invites community contributions, listing to-dos such as code review, caching, and styling improvements. The plugin supports grayscale and blur effects for random images, and a live demo is available at colormag.liljefred.dk. frold also shares a new demo site, studmed.dk, and provides a GitHub repository for the beta version. Canapin mentions a similar but simpler widget they created for Colormag, using a daily WP CRON update to display recent forum topics, though they haven’t shared their code due to its complexity.

I have been able to make my first plugin for Wordpress and Discourse.

It let you change the wordpress theme not only to get content from articles - but now you can mix articles and forum posts. I have been able to recode the widgets for the colormag theme.

Im not a coder I have to say, just a sparetime coder who find it funny - so the code might be a little buggy and not the most beautyful :slight_smile:

I did add 2 new widgets and by them you can either get the latest posts from a specific forum category (choosen from a dropdown) or the latest posts from your site.

Widget Style 1

With a output like

Widget Style 2

With a output like

It is controlled in wordpress with these settings:

You can see a live demo here:
http://colormag.liljefred.dk

The original theme you find here:

10 לייקים

To do’s

  • find someone who can review the code
  • some kind of cache for random images
  • eg add a greyscale or blur option for random images or both
    – ?grayscale
    – ?blur
    – ?grayscale&blur
  • style optimation
    – are all div tags closed?
  • add more option in the admin page
2 לייקים

Download:

You find the beta files here.

https://github.com/frold/Colormag-Wordpress-Theme-Discourse-Widget

But to reduce loading time it seems like it need some more skilled coder to go through the code… :frowning:

I hope someone in the community want to help. As said in the first post, Im not a coder by profession.

לייק 1

If anyone sees the idea of the plugin and want to contribute - please join by adding your code… :smiley:

לייק 1

What is the fatest?

To do at the moment : read date from the json file located at the distance server

Or let my script download the json file and then read data from the json file on the server where I run wordpress?

Im not that skilled coder and I need to speed up the script, so it is usefull :slight_smile:

Preview (where I use my disourse forum):

Test: http://colormag.liljefred.dk/

לייק 1

Is the colormag theme free?

yes that’s the reason I use it as the template. You can buy a pro edition as well. This plugin should work with that edition too.

Now it support grayscale, or blur effect if random images is choosen

A new demo site - and live site (Im not able to edit the first post)

לייק 1

I also use Colormag theme and I too made a small widget to add the last forum topics in the sidebar:

I won’t share the code since it’s very, very messy, I dont’ even made any Wordpress setting.
But basically, it display the last created topics and I excluded some less interesting categories.
I use a WP CRON task to update the content of the widget once a day.

לייק 1