MyBB Community Forums

Full Version: Use Font Awesome Icons In OUGC Awards As Awards
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

As of title, i would be looking to use the font awesome icons ss award icons in In OUGC Awards plugin.

I searched some png icons on the web but i don't like them and thought that there would be a method to use the font awesome icons as awards.

Can someone help me out?

I'm using the latest version of MyBB.

Thankyou in advance.
This is actually really simple to do. Instead of assigning a path in the Image field, type the CSS class you want to assign to that award.

Then, edit the following templates, using {$award['image']} as the award class output.
member_profile_ougc_awards_row
modcp_ougc_awards_list_award
ougcawards_modcp_list_award
ougcawards_page_list_award
ougcawards_page_request_form
ougcawards_postbit
ougcawards_profile_row
ougc_awards_page_list_award
ougc_awards_page_user_award
postbit_ougc_awards

If you are using my OUGC Featured Member plugin you will need to edit the ougcfeamem_awards_award template as well.

It might get easier on the future.
(2018-12-15, 09:57 PM)Omar G. Wrote: [ -> ]This is actually really simple to do. Instead of assigning a path in the Image field, type the CSS class you want to assign to that award.

Then, edit the following templates, using {$award['image']} as the award class output.
member_profile_ougc_awards_row
modcp_ougc_awards_list_award
ougcawards_modcp_list_award
ougcawards_page_list_award
ougcawards_page_request_form
ougcawards_postbit
ougcawards_profile_row
ougc_awards_page_list_award
ougc_awards_page_user_award
postbit_ougc_awards

If you are using my OUGC Featured Member plugin you will need to edit the ougcfeamem_awards_award template as well.

It might get easier on the future.

Omar, I think adding this in plugin as a possible default option will actually be very cool. Smile
Thanks for your reply @ Omar.

But if i had the intelligence to understand the simplicity of adding/making that css ,i wouldn't write here. Sad
I rarely give straightforward support for plugins so you will need to try harder. I will try to expand below but please be clear with the difficulties you find.

(2018-12-15, 09:57 PM)Omar G. Wrote: [ -> ]This is actually really simple to do. Instead of assigning a path in the Image field, type the CSS class you want to assign to that award.

Instead of i.e: "awardicon.png" just now place the Font Awesome icon class name i.e: "apple-alt"

(2018-12-15, 09:57 PM)Omar G. Wrote: [ -> ]Then, edit the following templates, using {$award['image']} as the award class output.

For example, for ougcawards_profile_row, find:
<img src="{$award['image']}" alt="{$award['name']}" />

And replace with:
<i class="fas fa-{$award['image']}" title="{$award['name']}"></i>

Follow similar modifications with the rest of templates and it should work.

A more friendly way to do this would be great, but as it is currently possible it is not a priority tbh.
Thanks for your time,it worked.

Rep+

But how can we solve this in the mod cp?

[attachment=41348]