[ticket/16413] Add an option to define CPF FontAwesome contact icon#5921
[ticket/16413] Add an option to define CPF FontAwesome contact icon#5921rxu wants to merge 13 commits intophpbb:masterfrom
Conversation
|
We are transitioning how we work with icons in 4.0. So this may need to be implemented different. I’m not exactly sure what this is yet. Give me sometime and I’ll get back to you after I have time to fully look things over. Have a look at this pr #5753 |
|
ok so yeah not going to make it into 3.3, this will have to go into 4.0. It does require some changes to utilize the new icon system though. Not sure how yet. essentially we would have to expand this to default fields as well. With the ability to edit the icons for them in the ACP. so that we can simply just run a loop through them in the template to call the icon function. As for the acp changes. the js you are using will need to be redone as we are no longer using font-awsome alone. We are now supporting these format svg/png/iconify/font for icons. This means you would have to serve back the icon in one of these formats based on another field. It would still work very similar in that the name of the icon would be the name provided in the icon field. For reference the loading of an icon looks like this respectively. SVG: load based on input.svg you can reference the icon function here: https://github.com/phpbb/phpbb/pull/5545/files |
|
So am I getting it right that this PR is ok for 3.3 but for 4.0 there should be another one with the use of new icon system? @hanakin |
|
No there. It will not work for 3.3 |
|
I see, so 2 different PRs for 3.3 and 4.0? 😃 |
|
No it will no5 make it into 3.3 just work on one for 4.0 |
|
Oh. Regret, so postponed for several years ahead :) |
|
If you don't mind me asking, but why is it not possible for 3.3? |
|
Ok let me put it another way. This branch is for 3.3.x released which are security and bug fixes only. All new features need to go against master branch. Regardless of what version we are calling it be it 3.4 or 4.0. Which means that he can take advantage of the icon function. Which means no need to do a version without. |
|
Since there's no way to automatically detect icon type in 4.0, there's no way to implement this feature. |
|
What do You mean by detect icon type? Why do you need to do that? |
|
Because only icon name input is not enough to render the icon now. |
|
So? Add a field for type |
|
2 new DB fields for a single icon? :) Nice. |
|
Well you do not need two, you can repurpose the name field as the icon field |
|
Perhaps it's possible to store the icon name the same way as Iconify determines it: |
|
Well you have to do that anyway if your using iconify. But you mean for svg and png? Not sure how that would work for fonts. font-fa |
I don't think phpBB is going to use it like that, is it? |
|
Not sure who you are responding to. We will do whatever makes the most sense to work. The default icons will be served via iconify where possible. We will have some custom icons. If we can not get them into iconify then they would be served via svg |
|
I don't think I understand what are you talking about. Looking at #5545 I see almost nothing from described at https://iconify.design. |
|
There are various types that the |
|
That created the icon function. Iconify works by adding a js file to the footer of the new theme. It it looks for an html element with the class iconify and a data attribute with the icon library:name. We have not added any js yet if that is what you are asking. The or for switching over the prosIlver is one will do that, but it’s not merged yet. |
|
so to clarify fonts is only supported for font-awesome at the moment for BC
with prosilver. I would just not support it here as we will eventually not
support it anymore down the road. You can use iconify to access most if not
all font-awsome anyway. You will also not be able to have a picker and that
is not something I think that we need here. It would be way to resource
costly to implement and a nightmare to maintain.
…On Fri, Mar 27, 2020 at 6:17 AM Mr. Goldy ***@***.***> wrote:
There are various types that the {{ Icon() }} function takes: font,
iconify, png, svg.
You want to provide an interface in the ACP for selecting an icon for a
custom profile field.
If you want to use FontAwesome icons for the contact icons, you can add
the FontAwesome picker as you're doing here. Then in the styles you'll be
able to call {{ Icon('font', '<the icon>') }}.
If you want to allow more than just FA icons, you can add a 'select icon
type' dropdown before the input. So users can select from font | iconify
| png | svg. And then still insert their desired icon. You can store this
in a single column in the db, concatenating them with colon :, eg:
font:user. Then when displaying the icon for the profile field, you'll be
able to grab the part before the first colon and use that as your icon
type: {{ Icon('font', 'user') }}. Only thing then would be that iconify
icons will have a 2nd colon that will need to be handled, eg:
iconify:mdi:user.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5921 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAR26ND3DP64MSHSIAJ6ALRJTGQ7ANCNFSM4LSZOR7Q>
.
|
01f0a06 to
599cb06
Compare
PHPBB3-16413
PHPBB3-16413
PHPBB3-16413
PHPBB3-16413
Also, save empty color if custom icon name is empty. PHPBB3-16413
PHPBB3-16413
PHPBB3-16413
Checklist:
PHPBB3-16413.
Clipchamp.mp4