MyBB Community Forums

Full Version: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
You can edit the images in global templates "thankyoulike_button_add" and "thankyoulike_button_del".

Change the inline stylesheet of both templates in post button <span> tag from:

<span style="background-position: 0 -440px;" ..........</span>

to

<span style="background-image: url(images/thx_add.png);"...........</span>

where the url contains the link to your image.

[attachment=33296]

For the other changes in postbit I need a look at the forum. Wink
Thx!

For the second problem - when I click on a thank you button -> it is bad styled - it needs <br><br> at least before the list of users who thanked this post.
OK...would you post the postbit_classic template here. I'd like to view how the thx template was implemented.
(2014-10-14, 06:37 PM)Eldenroot Wrote: [ -> ]- add "<br><br><hr>" before the list of users in classic postbin if the post is liked

Templates > Global Templates > Edit Template: thankyoulike_classic
Postbin:
<span class="icon middle"><img src="/images/postbin_icons/award.png"></span><span class="middle"> {$lang->tyl_rcvd}: {$post['tyl_unumrtyls']}</span><br><span class="icon middle"><img src="/images/postbin_icons/like.png"></span><span class="middle"> {$lang->tyl_given}: {$post['tyl_unumtyls']}</span>
<style type="text/css">
  .icon   { display: inline-block; margin: 1px
            /* size, color, etc. */ }

  .middle { vertical-align: middle; }
</style>

Classic:
	<div class="post_buttons {$unapproved_shade}">
		{$tyl_expcol} 
		<span id="tyl_title_{$post['pid']}" style="{$tyl_title_display}">{$lang->tyl_title}</span><span id="tyl_title_collapsed_{$post['pid']}" style="{$tyl_title_display_collapsed}">{$lang->tyl_title_collapsed}</span><br />
		<span id="tyl_data_{$post['pid']}" style="{$tyl_data_display}">{$post['thankyoulike']}</span>
	</div>

I need to style list of users when you click on "Like" - it needs <br><br> and it will be all fine

Now I see this (picture 1)... I would like to change it into 2 (it is styled with <hr><br><br>
OK...edit the global template thankyoulike_classic and replace all with:

<br /><br />
<hr style="background-color: #aaa;color: #aaa;" />
<div class="post_buttons {$unapproved_shade}">
{$tyl_expcol} 
<span id="tyl_title_{$post['pid']}" style="{$tyl_title_display}">{$lang->tyl_title}</span><span id="tyl_title_collapsed_{$post['pid']}" style="{$tyl_title_display_collapsed}">{$lang->tyl_title_collapsed}</span><br />
<span id="tyl_data_{$post['pid']}" style="{$tyl_data_display}">{$post['thankyoulike']}</span>
</div>
<hr style="background-color: #aaa;color: #aaa;" />
Yes, it works BUT I have to refresh the page (F5) to see it styled
...everytime ??

For a better look you could style the collapse icon a little bit. Relpace content of global template thankyoulike_expcollapse with:

<a href="#" onclick="thankyoulike.tgl({$post['pid']});return false;" title="{$tyl_showhide}" id="tyl_a_expcol_{$post['pid']}"><img src="{$theme['imgdir']}/{$tyl_expcolimg}" style="vertical-align: bottom;" alt="{$tyl_showhide}" id="tyl_i_expcol_{$post['pid']}" /></a>
Yes, everytime... I have to reload the page to see <br><br><hr> which you added... it is not styled until I reload the page manually
Maybe the server need some time to refresh cache. I've tested it on a local xampp installation and it works like it should.