Widget Discourse pour le thème Colormag WordPress

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 « J'aime »

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 « J'aime »

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 « J'aime »

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

1 « J'aime »

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 « J'aime »

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 « J'aime »

J’utilise aussi le thème Colormag et j’ai moi-même créé un petit widget pour afficher les derniers sujets du forum dans la barre latérale :

Je ne partagerai pas le code car il est très, très désordonné ; je n’ai même pas configuré d’option WordPress.
Mais fondamentalement, il affiche les derniers sujets créés et j’ai exclu certaines catégories moins intéressantes.
J’utilise une tâche WP CRON pour mettre à jour le contenu du widget une fois par jour.

1 « J'aime »