Thank-O-Matic

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

Previous topic - Next topic

zoki


simzman

Yes. I have it working on 2 different SMF forums (2.0.2)

Worked on theme 'Classic Yabb 2.0' and 'Default'. Every theme reacts differently though.

Worth installing on a test site first.

Simple Site Designs

#2082
Working on a very custom layout and am using this mod to upvote posts.

Just wondering if there is a way to get the "most thanked" post ID from within "Display.template.php". I need to show a link to it in the header (regardless of the page it's on).

Cheers,
Josh

UPDATE: I can do it like this, but don't really like doing loops when there might be a heap of messages


  // Count up the thanks and work out if we have a winning post
  $bigthx = 0;
  foreach($context['thank_you_post'] as $thxmsgid => $thxpost) {
    if(is_numeric($thxmsgid)) {
      $thisthx = count($thxpost['fulllist']);
      if($thisthx > $bigthx) {
        $bigthx   = $thisthx;
        $bigthxid = $thxmsgid;
      }
    }
  }
  // $scripturl.'?topic='.$context['current_topic'].'msg'.$bigthxid.'#msg'.$bigthxid

Yiorgos

#2083
Hi Josh
That SQL query will retrieve the record that has the maximum number of "ThankYous"
I tested that with my phpmyadmin and works fine.
Then you may use the values for displaying Poster Title and construct a link to the thread
`thank_you_post_counter` contains the number of "ThankYous"

Please note that some columns may differ from your `smf_messages` table, due to the various modifications installed. Clear out from SELECT, the columns you do not need.



SELECT `id_msg` , `id_topic` , `id_board` , `poster_time` , `id_member` , `id_msg_modified` , `subject` , `poster_name` , `poster_email` , `poster_ip` , `smileys_enabled` , `modified_time` , `modified_name` , `body` , `icon` , `hiddenOption` , `hiddenValue` , `hiddenInfo` , `thank_you_post` , `thank_you_post_counter` , `approved`
FROM `smf_messages`
ORDER BY thank_you_post_counter DESC
LIMIT 1





Also remember that you may easily display top 5 users Thankyou statistics.
That will increase competition among users to up-vote threads



<?php ssi_thankYouPostTopResived(); ?>
<?php ssi_thankYouPostTopGiven(); ?>


www.sdtv.gr


Abandoned modifications that I corrected to apply on SMF 2.0 Gold
Simple Awards System  To award good members
Limit Posts Per Day  for over-posting members

Simple Site Designs

#2084
That worked a treat Yiorgos, thanks!

I actually made a mistake in my original method in so much as the url will not work if the message is not on the first page. Do you have any idea how to construct a url to a message without the page section, or a way to get the page number?

- Josh

[EDIT] - ignore that last question - it was just a typo in my code :)

rizkirprod

I'm using smf 2.0.2 and I follow instructure to install manual, but how to execute db/install.php on my forum ?

Kindred

upload the file to your forum root directory and run it.
Сл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."

MrNicotine

Using this for quite some time now on 2.02 and works great!

But I have a question from some of my mods. Is it possible to get an "auto reply" when someone hits the ThankYou button?
Because then we can see on the homepage that there is a new message in that topic.

Sounds trivial but on my forum this could be useful. Is this possible, or is there another way to "trigger" the new message in a topic icon...

Thanks in advance ;)

MrNicotine

Quote from: rizkirprod on October 27, 2012, 01:29:58 AM
I'm using smf 2.0.2 and I follow instructure to install manual, but how to execute db/install.php on my forum ?

Quoteupload the file to your forum root directory and run it.

Out of curiosity. How do you "run it"?

Yiorgos

Try to move it in your forums root directory and use your web Browser to open:
http://www.yoursite.com/yourforum/install.php

Then delete that file.

www.sdtv.gr


Abandoned modifications that I corrected to apply on SMF 2.0 Gold
Simple Awards System  To award good members
Limit Posts Per Day  for over-posting members

Chalky

freakydeaky, have you copied the image files into your custom theme?

Dave J

Hi all,

I have successfully installed this on my SMF 2.0.2. It works in all my themes once i had installed the images etc.

Now my question is:

How can I move the 'Thank You' button from the right hand side of the 'Remove' button to the left hand side of the 'Quote' button.

I'm guessing it's in the Display.template.php file but as there are quite a few edits in there I though I'd ask.

As always thanks for any help.

Regards

Dave
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Rust

#2092
Hello all.  I've recently installed this mod and the functionality appears to be working fine.  However, some, though not all users are telling me the star icon doesn't show up.  I've seen it missing, like, once, but every other machine I've tried it on it works finel.

Honestly, I don't have any idea what to check.  Any ideas?  Thanks. :)

EDIT:  One of the two members who are not seeing it only not see it in Chrome, but it works fine in IE.  I've tried it on four different boxes and haven't had trouble.

Dave J

Quote from: Rivet on November 30, 2012, 03:22:03 PM
Hello all.  I've recently installed this mod and the functionality appears to be working fine.  However, some, though not all users are telling me the star icon doesn't show up.  I've seen it missing, like, once, but every other machine I've tried it on it works finel.

Honestly, I don't have any idea what to check.  Any ideas?  Thanks. :)

EDIT:  One of the two members who are not seeing it only not see it in Chrome, but it works fine in IE.  I've tried it on four different boxes and haven't had trouble.

Hi

Are they using a different theme to you? If so then you need to ensure that the image has been copied to each themes image folder
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Venera

I use different theme, but its theme use all from default theme, only index.themplate.php, images and css are diferent. Default theme has this problem too.  ;)

Rust

Quote from: davejo on December 01, 2012, 03:21:55 AM
Quote from: Rivet on November 30, 2012, 03:22:03 PM
Hello all.  I've recently installed this mod and the functionality appears to be working fine.  However, some, though not all users are telling me the star icon doesn't show up.  I've seen it missing, like, once, but every other machine I've tried it on it works finel.

Honestly, I don't have any idea what to check.  Any ideas?  Thanks. :)

EDIT:  One of the two members who are not seeing it only not see it in Chrome, but it works fine in IE.  I've tried it on four different boxes and haven't had trouble.

Hi

Are they using a different theme to you? If so then you need to ensure that the image has been copied to each themes image folder

Thanks for the note.  I know for a fact that one of the two is definitely using the same theme.  The other I'm not positive, but 99% sure he is.

androgyn3

Same issue than Mr Nicotine here : when I use "Repair and optimize Thank-O-Matic tables" I get an error about my database.

Erreur de syntaxe pr�s de ':id_msgs)
LIMIT 1' � la ligne 3
Fichier: /public_html/forum/Sources/ThankYouPost-Maintaince.php
Ligne: 792


I test on fresh smf 2.0.2 install with no mod and original thank-o-tomatic mod, impossible to run Repair and optimize Thank-O-Matic tables

Howard43Willard

 Also maybe a Top Ranking of users with the most received Thank You.




johnpaul2k2

i having kinda hard time with this mod

i installed everything and follow the rules to place some codes manually but after doing everything. i only see the "Thank You" ( received and given) on my profile side. i am yet to SEE THE THANK YOU BUTTON???

did i made any mistake(s)

Shambles

Did you install it into your theme? Did you set the permissions for folks to use it? Are you using default board profiles?

Advertisement: