News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Thank-O-Matic

Started by enik, June 12, 2007, 12:18:59 PM

Previous topic - Next topic

shazoo!

Quote from: shazoo! on July 12, 2012, 06:26:01 AM
Quote from: enik on July 10, 2012, 07:52:06 PM
You have to give permissions to each group.

Regards enik...

I gave permissions to the group I wanted to have the permissions, The "Own Member" option is not working.
I realized my error.

I thought that option allowed you to remove your thanks from posts that you thanked.  What it actually does is remove thanks from your posts.  2 different things

Pyrhel

My problem is solved. It's due to PHP version and how it passes parameters in version 5.3 and 5.4. With an & before the variable name, the php passes it as reference to the variable, e.g.:

//Admin Areas
function ThanYou_add_admin_areas(&$adminAreas)

fulltimecasual

Hey guys, I really dig this mod, but was wondering if anyone could give me a hand modifying it. Basically I want to change the thank you button, and the thank you message, to just the HTML star - and is there anyway of showing the list of people who thank you (or fabourited as it would be on my forum) in that little section under the post, instead having a link to click through?

Tomy Tran

A pic for demo to imagize is better ;)

Chalky

#2044
My Thank-o-matic is malfunctioning.  Please can you point me in the right direction to fix it?

In a member's profile, when I click to view their "Thank you posts", I see four categories.  "Mesages (become)", "Topics (become)", "Messages (given)" and "Topics (given)".  Now I can click on Messages (become) and go through pages 1, 2,..., etc quite happily, but when I click on Messages (given) I see page 1, but clicking on page 2, or indeed any other page number under Messages (given) takes me instead to the corresponding page number of Messages (become).

Except with the admins.  I don't know whether it's because we're admins or because we're with only ones with over a thousand thanks, but clicking on Messages (given) in an administrator's profile displays the error

QuoteColumn 'id_msg' in where clause is ambiguous
File: /home/chalkcat/public_html/Sources/Profile-ThankYouPost.php
Line: 199

where line 199 is the last line of the following - yes the );

// Find this user's posts.  The left join on categories somehow makes this faster, weird as it looks.
$looped = false;
while (true)
{
$request = $smcFunc['db_query']('', '
SELECT
b.id_board, b.name AS bname, c.id_cat, c.name AS cname, m.id_topic, m.id_msg,
t.id_member_started, t.id_first_msg, t.id_last_msg, m.body, m.smileys_enabled,
m.subject, m.poster_time
, m.thank_you_post_counter, m.thank_you_post
FROM ' . (!$context['is_given'] ? '{db_prefix}messages AS m' : '{db_prefix}thank_you_post AS tp
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = tp.id_msg)') . '
INNER JOIN {db_prefix}topics AS t ON (' . ($context['is_topics'] || $context['is_topics_given'] ? 't.id_first_msg = m.id_msg' : 't.id_topic = m.id_topic') . ')
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
WHERE ' . ($context['is_given'] ? 'tp' : 'm') . '.id_member = {int:current_member}
AND m.thank_you_post = 1
' . (!empty($board) ? 'AND m.id_board=' . $board : '') . '
' . (empty($range_limit) ? '' : '
AND ' . $range_limit) . '
AND {query_see_board}
' . ($context['user']['is_owner'] ? '' : 'AND m.approved = {int:is_approved} AND t.approved = {int:is_approved}') . '
ORDER BY m.id_msg ' . ($reverse ? 'ASC' : 'DESC') . '
LIMIT ' . $start . ', ' . $maxIndex,
array(
'current_member' => $memID,
'is_approved' => 1,
)
);


Please help, this is the only issue now preventing my forum from being 100% perfect  :'(

It has just been brought to my attention that also clicking on the topics (given) then on page 2 shows messages (become) page 2.

The other problem I'm having more and more frequently is that the Received Thank You stats on the memberlist and profiles keeps resetting itself and I have to keep running the recount to bring them back again  :-\

androgyn3

Hi  Pyrhel,

If you have upgrade your PHP to 5.4 branch, see what I says here : http://www.simplemachines.org/community/index.php?topic=176565.msg3342558#msg3342558

Some mod doesn't show some link in admin panel, i have the same problem, it's fixed with i do (follow the link).

Chalky

I just realised I'm running Thank-o-matic version 3.0!  Yet according to the mod site the latest version is 2.0 - What's going on?  Also I can't find the bit that told me I had to have Karma switched on to make it work  :-\

Anyway, further to my post above, I'm really worried about my problem of the stats resetting themselves as this is now a daily occurrence.  The thanks given are fine, it's the thanks received that keep losing numbers, and I can see this in the database also.  The thank_you_post_became field of the smf_members table is displaying the wrong data.  When I do a stats recount it corrects itself, but I am having to do a recount every day because the numbers keep going wrong!  For example, a member who has received 406 thanks is currently showing 3.

Strangely, the karma_good field of the same table is showing the correct numbers of thanks received!!!  As I said, I read somewhere that Karma had to be enabled when I was setting this up, but now I can't find it.  Has my version and its data been removed from the mod site???

What I am tempted to do is find and replace every instance where the code reads the thank_you_post_became field to point it at the karma_good field instead, but I know nothing about PHP or databases so this may be a stupid idea.

Please advise... thank you ;)

PersianDeveloper

I have translated the xml file which had the phrases showing in the thread etc
installed in but it gave error
I think that was in index.template line 724 maybe!

cieplutki

Please help me with added code

step 1,2,4,6,7,are ok but i don't known how and where put 3 and 5




.

Chalky

Please can anybody help me with this?  The stats are resetting at least once a day, not for all members at once, or even the same members consistently, but between one and a few members each time.

It really is driving me mad, if only somebody could point me towards the solution, please....


Quote from: Sabrinova on August 07, 2012, 02:54:25 PM
Anyway, further to my post above, I'm really worried about my problem of the stats resetting themselves as this is now a daily occurrence.  The thanks given are fine, it's the thanks received that keep losing numbers, and I can see this in the database also.  The thank_you_post_became field of the smf_members table is displaying the wrong data.  When I do a stats recount it corrects itself, but I am having to do a recount every day because the numbers keep going wrong!  For example, a member who has received 406 thanks is currently showing 3.

Strangely, the karma_good field of the same table is showing the correct numbers of thanks received!!!  As I said, I read somewhere that Karma had to be enabled when I was setting this up, but now I can't find it. 

What I am tempted to do is find and replace every instance where the code reads the thank_you_post_became field to point it at the karma_good field instead, but I know nothing about PHP or databases so this may be a stupid idea.

Please advise... thank you ;)

Chalky

Ok, I'm going for a different angle.  In order to identify whether the problem is within this mod or to do with my own setup, please can other users confirm that you either do or don't have the same problem as me for my two issues:

1) Thank you received stats resetting themselves to 0.

2) From the "Thank you posts" within a member's profile, clicking on page 2 of Messages (became) redirects to Messages (received), except within an Administrator's profile where it throws up an error.

Thank you  ;)

supersasho

#2051
1) yup it did for me too, i'm very sad about it :( i just wanted to reinstall it for another theme, but ended by 0 all over my forum :( and broken theme

Is there a way to reverse the problem with the counting? I have backed up my database, just to be sure, but didnt expect this kind of problems.

As for the other than default themes, this is the error users get if they pick another theme:
Fatal error: Cannot redeclare template_thank_you_post() in /data/web/virtuals/3360/virtual/www/forum/Themes/new_dark/index.template.php on line 527

EDIT: i searched for solution, but found only this unanswered problems
http://www.simplemachines.org/community/index.php?topic=176565.msg3323844#msg3323844
http://www.simplemachines.org/community/index.php?topic=176565.msg3325099#msg3325099

EDIT2: I dont know if the reseting of the stats was just a one time incident or is repetitive. But I have "For this post, 0 members gave a thank you!" on all the thanked posts.
Any help would be appreciated.

Kindred

The cannot redeclare message means that you have nstalled the code twice. You will have to manually remove the code that got duplicated...and look brought the rest of your files for other duplicate code which may not be throwing an error, but which was also duplicated.

To install a mod on a new theme, added after you already had the mod installed, you have to manually apply the code changes. Reinstalling the mod will cause the duplicate problem that you already encountered...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

supersasho

#2053
Ok thanks, i'll look to it.

As for the other problem "For this post, 0 members gave a thank you!", do you have any idea how to resolve this?

EDIT: So I managed to fix it. I took from the sql backup the "thank_you_post" table and put it in the actual sql. The 20+ items that were allready in the new one, I just changed their id_number to get along with the old one. I'm glad that i allways backup before installing some updates/mods. It saved my a**. :) Still wonder why in earth would someone put drop table when you upgrade this mod??

loplo

Hey guys,
I have some errors wile installing. I've tried installing the script manually and the only thing I can't solve is that I can't find
<hr class="post_separator" />';
in: ./Themes/core/Display.template.php

Any help is appreciated.

smashmash

I have a simple request for Thank-o-matic - how can I change the text to just "Like" rather than "Thank You"? No offence to coders - great mod but for my needs "like" makes a whole lot more sense.

I'm sure it's a simple alteration to a template but I can't seem to find where the text displayed is defined. grateful for any help!

Thouhgt it might be something to do with alternativ txt in the mods layout settings to start with but apparently not.

This is installed on SMF 2.0.2

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

smashmash

Excellent - thanks! That's only part though as it holds the error messages only - I've now edited them.

What I can't find is where the text for "Thank You" is defined to be displayed in the header of each post. E.g. you have the normal Quote, Modify, Remove, Split Topic and then "Thank You" - this is what I'm trying to change. Looks like it may be coming from $modsettings but I can't find that.

Sorry I'm being a bit rubbish here but really appreciate your help!  :)

smashmash

Ah think I just found the deifintions of text in index.english.php!

Kindred

it should not be putting anything into index.english.php - it should be putting everything into modifications.english.php.... if it's putting it into index, then the mod needs to be fixed by the authors...

Actually, I have noticed a certain, shall we say, laxity with coding guidelines with this and other ADK mods which disturbs me...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: