kjb085 / MMM-Reddit

Magic Mirror Module for displaying top level content from reddit
34 stars 7 forks source link

Multiple Instances of Module #1

Open jacobHclarkson opened 6 years ago

jacobHclarkson commented 6 years ago

Is there a way to have multiple instances of the module with different parameters?

For example, image mode display of top content of a single subreddit, and then in a different position, top headlines from r/all?

kjb085 commented 6 years ago

This was something that I was thinking about prior to release. I plan on looking into this, but my inclination is that Magic Mirror may not support two of the same module.

Alternatively to a native MM solution, as a hack, what you can do is to duplicate the the MMM-Reddit directory and name the new directory MMM-Reddit2. Then inside of that directory rename MMM-Reddit.js to MMM-Reddit2.js and then inside of the file you just renamed on line 1 change MMM-Reddit to MMM-Reddit2. If it's not obvious by this point, this should give you another module that functions the exact same, but is named MMM-Reddit2.

jacobHclarkson commented 6 years ago

@kjb085 Thanks for the suggestion!

WolfShadowheart commented 4 years ago

Hey @kjb085, I managed to get both MMM-Reddit and MMM-Reddit2 to display both (I needed a restart before the images showed!), however I cannot get MMM-Reddit2 to rotate posts.

I'm working with displayType: 'image', however the code is basically just copy pasted, so I'm wondering if you know if there's technical reason why?