Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 1 Year, 6 Months, 2 Weeks ago Use Font Awesome Icons In OUGC Awards As Awards
#1
Solved: 1 Year, 6 Months, 2 Weeks ago
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.
Reply
#2
Solved: 1 Year, 6 Months, 2 Weeks ago
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.
Reply
#3
Solved: 1 Year, 6 Months, 2 Weeks ago
(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
Reply
#4
Solved: 1 Year, 6 Months, 2 Weeks ago Sad 
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
Reply
#5
Solved: 1 Year, 6 Months, 2 Weeks ago
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.
Reply
#6
Solved: 1 Year, 6 Months, 2 Weeks ago
Thanks for your time,it worked.

Rep+

But how can we solve this in the mod cp?

   
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)