MyBB Community Forums
How to use fontawesome icons? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: How to use fontawesome icons? (/thread-183078.html)

Pages: 1 2


How to use fontawesome icons? - Darkrad - 10-05-2015

[Image: WEr5yY.jpg]

1. I want to put fontawesome icon next to "Beğen" button, how can I do that?
2. I want to put last button "Uyar" next to "Rapor Et" I don't want to have 2nd row, what should I do ?

I read the tutorial, it teaches how to activate fontawesome icons, but I already have them in every button except this one. Its from ThankyouLike plugin.


RE: How to use fontawesome icons? - mmadhankumar - 10-06-2015

check this reply: http://community.mybb.com/thread-180261-post-1185363.html#pid1185363

and may i have your forum url to check the second issue...


RE: How to use fontawesome icons? - Darkrad - 10-06-2015

I think 2nd problem also was related to Beğen (Like) button. After I made some changes without knowing what I did, I managed to fix 2nd issue, but not first one.

<div id="tyl_btn_{$post['pid']}" class="postbit_buttons"></div><a class="add_tyl_button" href="thankyoulike.php?action=add&amp;pid={$post['pid']}&amp;my_post_key={$mybb->post_code}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><span id="tyl_i{$post['pid']}">{$lang->add_tyl}</span></a>

This is code.

1. Is this code correct this way?
2. Where should I add that code you give? I tried almost everywhere.

Hmm It looks like I broke it, now when I like a post, I get both Unlike and Like options, when I Unlike it I get 2 Like buttons. I will revert my changes.


RE: How to use fontawesome icons? - SvePu - 10-06-2015

Try this:

Content thankyoulike_button_add template:
<div id="tyl_btn_{$post['pid']}" class="postbit_buttons"><a class="add_tyl_button" href="thankyoulike.php?action=add&amp;pid={$post['pid']}&amp;my_post_key={$mybb->post_code}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><span id="tyl_i{$post['pid']}"><i class="fa fa-thumbs-o-up"></i> {$lang->add_tyl}</span></a></div>

Content thankyoulike_button_del template:
<div id="tyl_btn_{$post['pid']}" class="postbit_buttons"><a class="del_tyl_button" href="thankyoulike.php?action=del&amp;pid={$post['pid']}&amp;my_post_key={$mybb->post_code}" onclick="return thankyoulike.del({$post['pid']}, {$post['tid']});" title="{$lang->del_tyl}" id="tyl_a{$post['pid']}"><span id="tyl_i{$post['pid']}"><i class="fa fa-thumbs-o-up fa-flip-vertical"></i> {$lang->del_tyl}</span></a></div>



RE: How to use fontawesome icons? - Darkrad - 10-06-2015

Yes it worked! Thank you.

Now I got 2 buttons in 2nd row, do you know how to fix this one?

[Image: MWlNO2.jpg]


RE: How to use fontawesome icons? - SvePu - 10-06-2015

Could you post an url and a test account login please.

Please rewrite TYL button templates again.

Content thankyoulike_button_add template:
<div id="tyl_btn_{$post['pid']}" class="postbit_buttons post_management_buttons float_right"><a class="add_tyl_button" href="thankyoulike.php?action=add&amp;pid={$post['pid']}&amp;my_post_key={$mybb->post_code}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><span id="tyl_i{$post['pid']}"><i class="fa fa-thumbs-o-up"></i> {$lang->add_tyl}</span></a></div>

Content thankyoulike_button_del template:
<div id="tyl_btn_{$post['pid']}" class="postbit_buttons post_management_buttons float_right"><a class="del_tyl_button" href="thankyoulike.php?action=del&amp;pid={$post['pid']}&amp;my_post_key={$mybb->post_code}" onclick="return thankyoulike.del({$post['pid']}, {$post['tid']});" title="{$lang->del_tyl}" id="tyl_a{$post['pid']}"><span id="tyl_i{$post['pid']}"><i class="fa fa-thumbs-o-up fa-flip-vertical"></i> {$lang->del_tyl}</span></a></div>

~~~~~~~~~~~~~~~~~~~~

Then open theme postbit_classic template and search for:
<div class="post_controls">
	<div class="postbit_buttons author_buttons float_left">
{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}{$post['iplogged']}
	</div>
	<div class="postbit_buttons post_management_buttons float_right">
{$post['button_tyl']}{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quickrestore']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_purgespammer']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
	</div>
</div>

Replace that whole part with:
<div class="post_controls">
	<div class="postbit_buttons author_buttons float_left">
		{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}{$post['iplogged']}
	</div>
	<div class="postbit_buttons post_management_buttons float_right">
		{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quickrestore']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_purgespammer']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
	</div>
	{$post['button_tyl']}
</div>



RE: How to use fontawesome icons? - Darkrad - 10-06-2015

Hello, thank you I did what you said.

I got everything in one row now, but with one problem.

[Image: 7PV8oW.jpg]

I deleted iplogged part and now its fixed! I already have Show IP at the end of signature so that button was kinda unnecessary, although I don't know if I should delete that one and keep the button? Which one would you prefer?

I changed thread to "Solved"


RE: How to use fontawesome icons? - Eldenroot - 10-06-2015

(10-06-2015, 10:33 AM)SvePu Wrote:
changes in templates

@SvePu - should we add this/change old template in Thankoyulike plugin as a default template?


RE: How to use fontawesome icons? - SvePu - 10-06-2015

@Eldenroot:
No, these are only changes for some custom themes. Default MyBB theme works with actual setup.


RE: How to use fontawesome icons? - Eldenroot - 10-06-2015

I know, but this one is not the only one - I fixed over 5+ instals of TYL system on MyBB default theme - almost same problem, 2 rows instead of one... I cannot reproduce it on my own forum