Full redesign of my forum

(gor) #1

Hi, last month i started a full redesign of the forum, everything was going fine, changed lots of js code, until i installed the latest update which resulted in messed up forum. So, my question is: whats the correct way to redesign the forum without conflicting with the new updates? I saw that your system does not allow multiple templates like any other forum engine. Any chance you plan to integrate such feature in future?

Thank you.

(Rafael dos Santos Silva) #2

You should use plugins to modify the forum, instead of changing the source code.

(gor) #3

I m, i just copied the same js files in my plugin folder and then made changes to them

(Alan Tan) #4

New updates will always carry the risk of breaking your plugins. However, there are a couple of things you can do to prevent that.

  1. Deploy the stable version of Discourse so that your plugin won’t break suddenly because of the many new changes that we introduce to master on a daily basis.
  2. Write tests for your plugin if possible so that you can easily find out if your plugin is broken when upgrading Discourse.
  3. Test our your changes locally against the branch of Discourse that you have deployed to make sure that your plugin hasn’t stop working before upgrading to the new version.

(gor) #5

I understand that, but redesign requires lots of changes and fixing it every time i install new update is not very convenient. Any chance you plan to support multiple templates in future like other forum engines (vBulletin, Xenforo etc)?

(Vinoth Kannan) #6

check below

(gor) #7

I think i have read enough docs. First started with Colors and Site Customization and hit a dead-end e.g couldn’t achieve everything i want with those features. Then moved everything as plugin and now run across on the problem above. So i guess i m stuck with “never install an update”, which is not very good idea but dont see any other solution

(Rafael dos Santos Silva) #8

There are varying types of customizations:

  1. Colors (low customization, never break)
  2. CSS (medium to high customization, hard to break)
  3. Template Outlets (high customization, hard to break)
  4. JS plugin API (high customization, can break between major versions)
  5. Rewriting (Infinite Customization, will break often)

You can do amazing stuff with colors, CSS and template outlets. Maybe use a couple JS plugin APIs to help with the overall design here and there.

Now if you rewrite a lot of stuff, you should only update on major versions (every 6 months or so) and you will spend at least a week in a test environment testing your changes.

(gor) #9

yeah, i think i will go with this. Thanks anyway

(EW 👌) #10

Could you please tell me where to check for Template Outlets?

(gor) #11

Hi, got stuck with something. How do i extend functionality of a component? Basically what i need to do is to add some class names in jsapp/components/topic-list.js.es6

classNames: ['topic-list', 'new-class', 'another-class']

I have copied the whole file in my plugin folder under the same path, but seems does not get loaded. Any help?

Thank you