MyBB Community Forums

Full Version: Engame Pro How to Add..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I add a "Like" button that goes with the Engame Pro theme, I've made a button that goes with the size of the button, but it doesn't work out, or fit in with the buttons. The buttons seem to be HTML coded, and I'm pretty lost on how to add that like button that fits.
1) Please URL forum. Smile
2) Enter the code template plugins LIKE. You should find it in the ACP → Styles & Templates → Templates → Global Templates.
(2014-01-09, 09:14 PM)Snake_ Wrote: [ -> ]1) Please URL forum. Smile
2) Enter the code template plugins LIKE. You should find it in the ACP → Styles & Templates → Templates → Global Templates.

It's http://mlw.site.nfoservers.com
Edit: All I see is
<span id="tyl_btn_{$post['pid']}"><a 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']}"><img src="{$imgdir}/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>
I don't know what to add..delete..modify I already have modified it, but the button didn't fit in, so I just reverted it back to the original.
Try:

<span id="tyl_btn_{$post['pid']}"><a 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']}" class="small buttons blue">Like</a></span>
Doesn't work. Just returns a "Like" button no blue button background. No link to it.
1. ACP > Templates and Styles > Templates > Global Templates > thankyoulike_button_add

Replace code with:

<span id="tyl_btn_{$post['pid']}"><a 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']}" class="small buttons blue">Like</a></span>

2. ACP > Templates and Styles > Templates > Global Templates > thankyoulike_button_del

Replace code with:

<span id="tyl_btn_{$post['pid']}"><a 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']}" class="small buttons red">Dislike</a></span>

That should show the Like button as a blue CSS button and show as a red Dislike button when clicked. Let me know if it works.

(2014-01-10, 01:49 AM)zomgasd Wrote: [ -> ]Doesn't work. Just returns a "Like" button no blue button background. No link to it.

That is because your code is adding

&nbsp;

to what you just copied and pasted. Go to ACP > Preferences > Turn Codepress off and then copy paste what I said into the specified templates.
(2014-01-10, 01:56 AM)J Greig Wrote: [ -> ]1. ACP > Templates and Styles > Templates > Global Templates > thankyoulike_button_add

Replace code with:

<span id="tyl_btn_{$post['pid']}"><a 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']}" class="small buttons blue">Like</a></span>

2. ACP > Templates and Styles > Templates > Global Templates > thankyoulike_button_del

Replace code with:

<span id="tyl_btn_{$post['pid']}"><a 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']}" class="small buttons red">Dislike</a></span>

That should show the Like button as a blue CSS button and show as a red Dislike button when clicked. Let me know if it works.

(2014-01-10, 01:49 AM)zomgasd Wrote: [ -> ]Doesn't work. Just returns a "Like" button no blue button background. No link to it.

That is because your code is adding

&nbsp;

to what you just copied and pasted. Go to ACP > Preferences > Turn Codepress off and then copy paste what I said into the specified templates.
I've done exactly what you told me to, but it's still not working.

(2014-01-10, 03:58 AM)zomgasd Wrote: [ -> ]
(2014-01-10, 01:56 AM)J Greig Wrote: [ -> ]1. ACP > Templates and Styles > Templates > Global Templates > thankyoulike_button_add

Replace code with:

<span id="tyl_btn_{$post['pid']}"><a 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']}" class="small buttons blue">Like</a></span>

2. ACP > Templates and Styles > Templates > Global Templates > thankyoulike_button_del

Replace code with:

<span id="tyl_btn_{$post['pid']}"><a 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']}" class="small buttons red">Dislike</a></span>

That should show the Like button as a blue CSS button and show as a red Dislike button when clicked. Let me know if it works.

(2014-01-10, 01:49 AM)zomgasd Wrote: [ -> ]Doesn't work. Just returns a "Like" button no blue button background. No link to it.

That is because your code is adding

&nbsp;

to what you just copied and pasted. Go to ACP > Preferences > Turn Codepress off and then copy paste what I said into the specified templates.
I've done exactly what you told me to, but it's still not working.
Never mind it works perfectly. Thank you.