Skip to content

Feat/custom icon upload#146

Closed
BrutalBirdie wants to merge 4 commits into
NodeBB:mainfrom
BrutalBirdie:feat/custom-icon-upload
Closed

Feat/custom icon upload#146
BrutalBirdie wants to merge 4 commits into
NodeBB:mainfrom
BrutalBirdie:feat/custom-icon-upload

Conversation

@BrutalBirdie
Copy link
Copy Markdown

This adds the option to upload a custom icon and would fix #145.

Screenshot of the edit page:

image

Screenshot of the login page:
image

@julianlam
Copy link
Copy Markdown
Member

Hi @BrutalBirdie, a couple concerns:

  1. I'm not entirely sure whether a re-implementation of upload logic is necessary. Have you look into using the methods in src/controllers/upload.js? I realize that the logic there is rather specific to NodeBB and there are hard-coded bits, but using those (and modifying them for plugin use-cases) is better worth the time than writing your own upload logic.
  2. Injecting your own CSS via the new route (+ client.js) is not necessary. The base styles can be added to a new SCSS file, and instead of a custom class, just set icons.svg in the returned strategy object. It's expecting an SVG element, but you can probably just pass in your own <i> element and set an inline-style for the background-image.

That should simplify things a bit.

@BrutalBirdie
Copy link
Copy Markdown
Author

Hello @julianlam
Thanks for the much-needed feedback.
As you might have noticed, I just wrote code that I knew would work 😅
To be 100% transparent, I have no idea how to develop a nodebb plugin.
So this PR can be viewed more like a "proof of concept".

If you, or someone, could take this PR and rewrite it into the best version suitable for nodebb, that would be awesome, and I can use that difference to learn how it should be done. :)

@BrutalBirdie
Copy link
Copy Markdown
Author

Full transparency.
I threw an AI against your suggestions sooooo, don't expect too much😅

@BrutalBirdie BrutalBirdie force-pushed the feat/custom-icon-upload branch from f75675e to 71ba640 Compare April 15, 2026 11:01
@BrutalBirdie BrutalBirdie force-pushed the feat/custom-icon-upload branch from 71ba640 to 1af6ea4 Compare April 15, 2026 17:37
@BrutalBirdie
Copy link
Copy Markdown
Author

Closed PR in favour of PR #157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Custom Icon Upload in addition to FontAwesome Icon

2 participants