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.
(2009-11-15, 10:39 PM)- G33K - Wrote: [ -> ]
(2009-11-15, 10:17 PM)Rafael Wrote: [ -> ]Thanked (the user) 81 Times in 52 Posts

Thats the example Wink

Is this like the number of thanks the user has received from all his posts?

I could change the postbit info to be something like this:

Thanks Given:
Thanks Received:

Does that look ok?


I'll include this in the next release.

Yeah its Ok, Thanks Smile
A very complete Thank You system. Well done.
I like two button:
-good post (and "remove good post")
-bad post (and "remove bad post")
If I click to "good", I see "remove good" or "bad post". If i click "bad post", the will changing to "bad post".
If I click to "bad", I see "remove bad" or "good post". If i click "good post", the will changing to "good post".
What have I doing?
(2009-11-17, 10:22 AM)atomjani Wrote: [ -> ]I like two button:
-good post (and "remove good post")
-bad post (and "remove bad post")
If I click to "good", I see "remove good" or "bad post". If i click "bad post", the will changing to "bad post".
If I click to "bad", I see "remove bad" or "good post". If i click "good post", the will changing to "good post".
What have I doing?

Change the "Like" images for "Good Post/Bad Post" and edit the language files too.
(2009-11-17, 01:33 PM)Rafael Wrote: [ -> ]
(2009-11-17, 10:22 AM)atomjani Wrote: [ -> ]I like two button:
-good post (and "remove good post")
-bad post (and "remove bad post")
If I click to "good", I see "remove good" or "bad post". If i click "bad post", the will changing to "bad post".
If I click to "bad", I see "remove bad" or "good post". If i click "good post", the will changing to "good post".
What have I doing?

Change the "Like" images for "Good Post/Bad Post" and edit the language files too.
This is not good idea, because the user not selected, that the post is good or no. There should be is alternative selection.
i installed everything, but when i click on the "thank you" button, i get the "loading please wait" window that never goes away, nothing happens Sad
nice mod working gr8 on my forum but i found one unexpected issue see the pic i think its them editing prob no one still give thanks this user may be thats why showing like this how i fix this
@above
Don't know why your template is not parshing that value...
Try switching to default theme and see if it works well.
(2009-11-17, 10:22 AM)atomjani Wrote: [ -> ]I like two button:
-good post (and "remove good post")
-bad post (and "remove bad post")
If I click to "good", I see "remove good" or "bad post". If i click "bad post", the will changing to "bad post".
If I click to "bad", I see "remove bad" or "good post". If i click "good post", the will changing to "good post".
What have I doing?

This will require a modification of this mod, not something I would do but you are free to make the modifications to suit your needs.

(2009-11-17, 09:49 PM)bold_handsome Wrote: [ -> ]nice mod working gr8 on my forum but i found one unexpected issue see the pic i think its them editing prob no one still give thanks this user may be thats why showing like this how i fix this

Could I get a URL of where this is happening? It should not show you that, even if there is no thanks, it should show a 0 or nothing at all, but not that.

(2009-11-17, 03:33 PM)MadamZuZu Wrote: [ -> ]i installed everything, but when i click on the "thank you" button, i get the "loading please wait" window that never goes away, nothing happens Sad

This is most probably caused by a missing edit in the template. The plugin uses a search and replace to add items to templates, if you have a non-default template it is possible that the plugin did not insert all the elements it needed in to the templates. Check that the following edits are there in the templates, if they're not, add them.

NOTE: You can change the layouts and placements of the edits to fit your style and needs but make sure you keep the element's id and style declarations the same since that is what the javascript looks for to update the data.


Show Thread Templates>showthread
(This adds the javascript and js variables to the header)
BEFORE
</head>
for v1.0 ADD
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/thankyoulike.js?ver=100"></script>
<script type="text/javascript">
<!--
	var tylEnabled = "{$mybb->settings['g33k_thankyoulike_enabled']}";
	var tylCollapsible = "{$mybb->settings['g33k_thankyoulike_collapsible']}";
-->
</script>
for v1.1/1.2 ADD
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/thankyoulike.js?ver=100"></script>
<script type="text/javascript">
<!--
	var tylEnabled = "{$mybb->settings['g33k_thankyoulike_enabled']}";
	var tylCollapsible = "{$mybb->settings['g33k_thankyoulike_collapsible']}";
	var tylUser = "{$mybb->user['uid']}";
-->
</script>


Post Bit Templates>postbit
(This adds the row with the actual Thanks title and list of the user's who thanked in the modern postbit)
BEFORE
</tbody>
ADD
<tr style="{$post['tyl_display']};" id="tyl_{$post['pid']}">
			{$post['thankyoulike_data']}
</tr>

Post Bit Template>postbit
(This adds the Thanks/Like Buttons in modern postbit)
AFTER
{$post['button_edit']}
ADD
{$post['button_tyl']}

Post Bit Templates>postbit_classic
(This adds the row with the actual Thanks title and list of the user's who thanked in the classic postbit)
REPLACE
</tr>
</table>
WITH
</tr>
<tr style="{$post['tyl_display']};" id="tyl_{$post['pid']}">
	{$post['thankyoulike_data']}
</tr>
</table>

Post Bit Templates>postbit_classic
(This adds the Thanks/Like buttons in classic postbit)
BEFORE
{$post['button_edit']}
ADD
{$post['button_tyl']}

Post Bit Templates>postbit_author_user
(This adds the Thanks/Like count in the postbit user area)
AFTER
{$lang->postbit_posts} {$post['postnum']}<br />
ADD
	%%TYL_NUMTHANKEDLIKED%%<br />

Member Templates>member_profile
(This adds the Thanks/Like stats in the user's profile)
AFTER
<td class="trow1">{$memprofile['postnum']} ({$lang->ppd_percent_total})<br /><span class="smalltext">(<a href="search.php?action=finduserthreads&amp;uid={$uid}">{$lang->find_threads}</a> &mdash; <a href="search.php?action=finduser&amp;uid={$uid}">{$lang->find_posts}</a>)</span></td>
</tr>
ADD
{$tyl_memprofile}

Images:
The Thank You/Like images should stored in /images/english/ for the default theme. For any other theme/language the location for the images should be /images/<theme>/<language>
If you have multiple themes, make sure you copy the images, or put your own Thank you/Like images in to the respective forlders as stated above.
(2009-11-17, 09:49 PM)bold_handsome Wrote: [ -> ]nice mod working gr8 on my forum but i found one unexpected issue see the pic i think its them editing prob no one still give thanks this user may be thats why showing like this how i fix this

Oh yeah, I got that problem when viewing PM. In forums, it show correctly.