MyBB Community Forums
[1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Releases (https://community.mybb.com/forum-102.html)
+---- Thread: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) (/thread-59652.html)



RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Eldenroot - 2014-12-14

(2014-10-14, 06:37 PM)Eldenroot Wrote: I just need these two changes:
- add "<br><br><hr>" before the list of users in classic postbin if the post is liked
- change image in thnk you/ike button (now I see a heart, I would like to see thumb up or anything else, I just need to know where to change it)

Anyone can help?


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - SvePu - 2014-12-14

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


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Eldenroot - 2014-12-15

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.


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - SvePu - 2014-12-15

OK...would you post the postbit_classic template here. I'd like to view how the thx template was implemented.


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - OMID_HXC - 2014-12-15

(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


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Eldenroot - 2014-12-15

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>


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - SvePu - 2014-12-15

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;" />



RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Eldenroot - 2014-12-15

Yes, it works BUT I have to refresh the page (F5) to see it styled


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - SvePu - 2014-12-15

...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>



RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Eldenroot - 2014-12-15

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