Skip to content

correct the misspelled three and add file(link) support#6

Merged
justoverclockl merged 5 commits intojustoverclockl:mainfrom
WhXcjm:main
Jan 25, 2024
Merged

correct the misspelled three and add file(link) support#6
justoverclockl merged 5 commits intojustoverclockl:mainfrom
WhXcjm:main

Conversation

@WhXcjm
Copy link
Contributor

@WhXcjm WhXcjm commented Jan 24, 2024

Dear Maintainers,

In this Pull Request, I have addressed two key issues:

  1. Spelling Mistake Correction:
    I have identified and corrected multiple instances in the code where "three" was mistakenly spelled as "tree". This error was causing modifications related to Level Three to be ineffective in the Administration. I have checked and corrected all such occurrences to ensure the accuracy and integrity of the level system.

  2. Adding Support for Online Image Links:
    Additionally, I have implemented support for online image links, such as using 'file:/assets/custombadges/level_1.png'. This allows users to use custom icons beyond what is available in font awesome, enhancing personalization and flexibility. This change will make our project more user-friendly and offer more customization options.

I believe these changes will significantly improve the functionality and user experience of this project.

Looking forward to your feedback and hoping for the swift integration of these changes.

Best regards,
WhXcjm

@justoverclockl
Copy link
Owner

thx @WhXcjm can you please remove all comments?

and can you explain why we need file support? i think that unoptimized images can becomes too heavy?, anywai i will test this when comments are removed ;)

@WhXcjm
Copy link
Contributor Author

WhXcjm commented Jan 25, 2024

Ok, I've removed all non-English comments and changed the prefix from 'file:' to 'link:' to make the description more consistent.

Regarding your question about the need for file(link) support in the context of using a 26x26 image, even a 32-bit color image of that size wouldn't be excessively large. To calculate the total space needed, a 32-bit color means that each pixel uses 4 bytes (32 bits / 8). So for a 26x26 image, the total size would be 26 x 26 x 4 bytes, which is 2,704 bytes or about 2.7 KB. This is quite small and manageable even for web applications.

In addition, the presence of browser caching mechanisms means that once an image is downloaded, it doesn't need to be reloaded for subsequent visits, saving bandwidth over time. Also, it's unlikely that all users will access the image at the same time, so the overall bandwidth usage would be quite low.

Allowing off-site links for these images greatly increases extensibility. This flexibility means you're not limited to the icons available in Font Awesome's free set. You can use a variety of sources for your icons, greatly enhancing the aesthetic appeal of your application.

For examples of the visual enhancement that link support can provide, see the images below.

link:/bbs/assets/custombadges/level_1.png
image

link:https://cdnjs.cloudflare.com/ajax/libs/twemoji/15.0.3/72x72/1f970.png
image
The second image needs to have span.auto-badge img{ border:none;} added to the css or adjusted as needed.

Finally, please consider my suggestion. If implementing link support seems too advanced, you could consider restricting it to an 'extension-paid' feature. After all, my intention is simply to make a meaningful contribution to the project.

@justoverclockl
Copy link
Owner

justoverclockl commented Jan 25, 2024

@WhXcjm ok but image should be into the assets folder, not all users are are developer, so we should simplify this, maybe with an URL?, at moment, if i put an url i can't see any image

https://cdnjs.cloudflare.com/ajax/libs/twemoji/15.0.3/72x72/1f970.png

image

image

@justoverclockl justoverclockl added the enhancement New feature or request label Jan 25, 2024
@justoverclockl
Copy link
Owner

oh i see it now, i need to put link: before....ok

@justoverclockl justoverclockl self-requested a review January 25, 2024 08:22
@justoverclockl justoverclockl merged commit 8dd9a0e into justoverclockl:main Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments