Customization of discourse

unsupported-install

(Joshua Rosenfeld) #3

Speaking from personal experience (unfortunately), I want to emphasize what Jay said. Please, please, PLEASE don’t fork Discourse. I was tasked with getting a live Discourse instance up to date that was forked from the main repo 2+ years ago, and it was painful. I spent way too many hours trying to merge thousands of commits, resolve conflicts, do testing, and then fix deployment issues. Sadly, since it is still a fork someone will need to do that all over again every time it gets updated.


(Sadda Qayyum) #4

ok thanks for the replies guys i understand what you saying but i need to know how can i implement my changes.


(Eli the Bearded) #5

There’s a series of posts on how to make plugins:


(Sadda Qayyum) #6

What if i dont want the new changes from discourse an i want to deploy my clone to server? I know how to do it for RAILS, but with dockers it keep pulling code from open source repo of discourse is there a way i can force it to use my repo??


(Jay Pfaffman) #7

Then you will probably need to get another community to help you.


(Sadda Qayyum) #8

ok thanks. Can i comment few lines with a plugin?


(Jay Pfaffman) #9

Plugins can do most anything.

See these topics.


(Sadda Qayyum) #10

ok i am following this Beginner’s Guide to Creating Discourse Plugins - Part 1 guide i don’t see any instructions to deploy changes on server. Can you please guide me how to deploy new created plugin on server?


(Jay Pfaffman) #11

Look at any example in the #plugin category. Pretty much every plugin explains how to install plugins. Also, if you look in app.yml you can copy the git clone line for the docker plugin.


(Sadda Qayyum) #12

i have added my changes in in new folder in plugins folder plugin.rb

# name: ui-customization-plugin
# about: UI customization
# version: 0.0.1
# authors: sadda

and then there is assets folder which contain a stylesheet with following content

#create-topic{
    border: 1px solid red !important;
    color: yellow !important;
}

But changes are not appearing on my local machine when i restart server

Thanks,


(Sadda Qayyum) #13

its loading but i cant see the changes


(Sadda Qayyum) #14

Its working now i had to clear cache thanks a lot man.


(Jay Pfaffman) #15

All you wanted to do was customize CSS?

Maybe have a look at this.


(Sadda Qayyum) #16

Actually i wanted to comment out some text in views i don’t know how to comment out existing view code with plugin so i figured to hide them using css.


(Jay Pfaffman) #17

It turns out that you’re not the first person who’s wanted to do that. It’s quite easy to customize all of the CSS without forking Discourse and without a plugin.


(Sadda Qayyum) #18

and how can i do that?


(Jay Pfaffman) #19

Did you look at the link I provided?

See also: /admin/customize/themes and click on “new”.


(Sadda Qayyum) #20

yes got it tested and it works thanks.


(Sadda Qayyum) #21

title shows Page-title – Category – Site-name i want to change it to Page-title – Site-name i have added custom script in theme for that but its overwriting it i guess its being dynamically loading title after theme files are loaded is there a way to do that ?


(Jay Pfaffman) #22

You should search here for people asking a similar question. I suspect that there is one. If that fails, you should start a new topic with a title something like "removing category from page title.