News:

Wondering if this will always be free?  See why free is better.

Main Menu

Thank-O-Matic

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

Previous topic - Next topic

mtxpert

I am using this theme:
http://www.moparscape.org/smf/index.php?topic=561671.0

I do use notepad## or texpad or editpad lite. I am not a coder per say but do a ton of Cisco configuration work so I do some VERY SIMPLE regular expression stuff.

dimspace

#2221
ok, in display template for core it should go just about where i have put it here

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
echo '
<div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';

echo '
</div>
</div>
</div>';

// * INSERT IT HERE

// Show the Thank You list or the link or.... nothing? XD
echo '
<div class="ThankOMatic ', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg', '" style="display: '.($message['thank_you_post']['isThankYouPost'] ? 'block' : 'none').';" id="ThankOMaticID' . $message['id'] . '">
<span class="error" id="ErrorThankOMaticID' . $message['id'] . '"></span>';
// Output the Template for Thank-O-Matic (Normal found in the index.template.php)
// It will fall back into a standard function, if this template_thank_you_post doesn't exists!
if ($message['thank_you_post']['isThankYouPost'])
{
// Mistake? Function not loaded oO.
if (empty($context['call_thank_you_post_func']))
loadThankYouTemplateFunctions();

// Call the correct function =D
$context['call_thank_you_post_func']($message['thank_you_post'], $message['id']);
}
echo '
</div>

';

// * INSERT IT HERE

}

echo '
</form>';



echo '
</div>
<a id="lastPost"></a>';


On stats.template, the edits just simply dont work with the core theme, but its not critical, as long as nobody is using the core theme.

Load.php needs to be spot on.

Before installing, back up all the affected files:

./SSI.php

./Sources/Display.php
./Sources/Load.php
./Sources/ManageBoards.php
./Sources/ManagePermissions.php
./Sources/ManageSettings.php
./Sources/Memberlist.php
./Sources/MoveTopic.php
./Sources/Profile-Modify.php
./Sources/RemoveTopic.php
./Sources/Security.php
./Sources/SplitTopics.php
./Sources/Stats.php
./Sources/Subs.php
./Sources/Subs-Boards.php

and in all themes including core
./Themes/default/Display.template.php
./Themes/default/ManageBoards.template.php
./Themes/default/Profile.template.php
./Themes/default/Memberlist.template.php
./Themes/default/Stats.template.php
./Themes/default/css/index.css

And language files, plus utf-8 plus any languages you use
./Themes/default/languages/Admin.english.php
./Themes/default/languages/index.english.php
./Themes/default/languages/ManageBoards.english.php
./Themes/default/languages/ManagePermissions.english.php
./Themes/default/languages/Errors.english.php
./Themes/default/languages/ManageSettings.english.php
./Themes/default/languages/Profile.english.php
./Themes/default/languages/Stats.english.php
./Themes/default/languages/Modifications.english.php

then in the slight chance that something goes wrong, you can restore them.

Once installed, manually check the modifications in load.php
and edit if needed

As long as nobody is using "core" theme, the only edits that are actually crucial are the ones in load.php

Majid1889

I have an important question about this mod !
how to put a pic except " Thank you " ?

Skaty

how the member can delete their own thank ??

ViewFromTheBoundary

Hi,

I would like to install the mod on my forum, I am using the Vertex theme on SMF 2.04, the only trouble is that there are a few error messages

*    1.    Execute Modification    ./SSI.php    Test successful
*    2.    Execute Modification    ./Sources/Display.php    Test successful
*    3.    Execute Modification    ./Sources/Load.php    Test failed
      1.    Replace    ./Sources/Load.php    Test successful
      2.    Replace    ./Sources/Load.php    Test successful
      3.    Replace    ./Sources/Load.php    Test successful
      4.    Replace    ./Sources/Load.php    Test failed
      5.    Replace    ./Sources/Load.php    Test successful
      6.    Replace    ./Sources/Load.php    Test successful
      7.    Replace    ./Sources/Load.php    Test successful
*    4.    Execute Modification    ./Sources/ManageBoards.php    Test successful
*    5.    Execute Modification    ./Sources/ManagePermissions.php    Test successful
*    6.    Execute Modification    ./Sources/ManageSettings.php    Test successful
*    7.    Execute Modification    ./Sources/Memberlist.php    Test successful
*    8.    Execute Modification    ./Sources/MoveTopic.php    Test successful
*    9.    Execute Modification    ./Sources/Profile-Modify.php    Test successful
*    10.    Execute Modification    ./Sources/RemoveTopic.php    Test successful
*    11.    Execute Modification    ./Sources/Security.php    Test successful
*    12.    Execute Modification    ./Sources/SplitTopics.php    Test successful
*    13.    Execute Modification    ./Sources/Stats.php    Test successful
*    14.    Execute Modification    ./Sources/Subs.php    Test successful
*    15.    Execute Modification    ./Sources/Subs-Boards.php    Test successful
*    16.    Execute Modification    ./Themes/default/Display.template.php    Test successful
*    17.    Execute Modification    ./Themes/default/ManageBoards.template.php    Test successful
*    18.    Execute Modification    ./Themes/default/Profile.template.php    Test successful
*    19.    Execute Modification    ./Themes/default/Memberlist.template.php    Test successful
*    20.    Execute Modification    ./Themes/default/Stats.template.php    Test successful
*    21.    Execute Modification    ./Themes/default/css/index.css    Test successful
*    22.    Execute Modification    ./Themes/default/languages/Admin.english.php    Test successful
*    23.    Execute Modification    ./Themes/default/languages/index.english.php    Test successful
*    24.    Execute Modification    ./Themes/default/languages/ManageBoards.english.php    Test successful
*    25.    Execute Modification    ./Themes/default/languages/ManagePermissions.english.php    Test successful
*    26.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
*    27.    Execute Modification    ./Themes/default/languages/ManageSettings.english.php    Test successful
*    28.    Execute Modification    ./Themes/default/languages/Profile.english.php    Test successful
*    29.    Execute Modification    ./Themes/default/languages/Stats.english.php    Test successful
*    30.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
   31.    Execute Modification    ./Themes/default/languages/Admin.spanish_es.php    Skipping file
   32.    Execute Modification    ./Themes/default/languages/index.spanish_es.php    Skipping file
   33.    Execute Modification    ./Themes/default/languages/ManageBoards.spanish_es.php    Skipping file
   34.    Execute Modification    ./Themes/default/languages/ManagePermissions.spanish_es.php    Skipping file
   35.    Execute Modification    ./Themes/default/languages/Errors.spanish_es.php    Skipping file
   36.    Execute Modification    ./Themes/default/languages/ManageSettings.spanish_es.php    Skipping file
   37.    Execute Modification    ./Themes/default/languages/Profile.spanish_es.php    Skipping file
   38.    Execute Modification    ./Themes/default/languages/Stats.spanish_es.php    Skipping file
   39.    Execute Modification    ./Themes/default/languages/Modifications.spanish_es.php    Skipping file
   40.    Execute Modification    ./Themes/default/languages/Admin.spanish_latin.php    Skipping file
   41.    Execute Modification    ./Themes/default/languages/index.spanish_latin.php    Skipping file
   42.    Execute Modification    ./Themes/default/languages/ManageBoards.spanish_latin.php    Skipping file
   43.    Execute Modification    ./Themes/default/languages/ManagePermissions.spanish_latin.php    Skipping file
   44.    Execute Modification    ./Themes/default/languages/Errors.spanish_latin.php    Skipping file
   45.    Execute Modification    ./Themes/default/languages/ManageSettings.spanish_latin.php    Skipping file
   46.    Execute Modification    ./Themes/default/languages/Profile.spanish_latin.php    Skipping file
   47.    Execute Modification    ./Themes/default/languages/Stats.spanish_latin.php    Skipping file
   48.    Execute Modification    ./Themes/default/languages/Modifications.spanish_latin.php    Skipping file
   49.    Extract Tree    ./Sources    
   50.    Extract Tree    ./Themes    
   51.    Execute Code    db/install.php    

Please could I have some help with resolving these issues, thanks!

Tomy Tran

With the file test fail, SMF has detail "why fail" so you can see where and why it fail. With current core SMF, you may get fail if you have installed some ofther mods before that it has change the same point with this mod.

Example: you have installed mod vnTyper that seek key "</body>" in your code and changed it to "</body id=\"bottom\">". Now you will not installed this mod because installer can not find "</body>" anymore. Just change this point to "</body id=\"bottom\">" then you can install it. It does not like in Joomla or WP :D

Kindred

There is also an explanation in the wiki/online manual, in the faqs section.
Сл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."

ViewFromTheBoundary

Right ok thanks, so do I edit the Load.php file after I install the mod or before?

Kindred

I tend to make the manual edit(s) before finishing the install
Сл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."

ViewFromTheBoundary

Ok, so then if I have done it correctly when you go ahead with the install the error message shouldnt show up?

Kindred

no... the error message will still show, you just ignore it and continue, because you have already made that specific edit.

http://wiki.simplemachines.org/smf/Error_in_mod_installation

Сл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."

Tomy Tran

It's better to change in mod package than other places on SMF core codes.

Kindred

what? Tomy, what are you talking about?

No, you are wrong...  it is better to apply the mod and make the manual changes than it is to try to "fit" the mod files to your particular installation.
Сл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."

ViewFromTheBoundary

I have installed the mod and made some edits to the wording but I haven't been able (not got the knowledge) to do some other edits that I think will improve the mod

Firstly I would like to add an image to the "say thanks" button like on this forum. How would I go about this?



Secondly I would only like the Thanks received on the profile page, like this. Again how would I go about it?




ViewFromTheBoundary


Shambles

Quote
Firstly I would like to add an image to the "say thanks" button like on this forum. How would I go about this?

You mean add that "thumbs up" image you've got there? Just change the default mod's image located at yourtheme/images/buttons/thank_you_b.png


Quote
Secondly I would only like the Thanks received on the profile page, like this. Again how would I go about it?

I think you may have to edit the Themes/default/Profile.template.php file to remove the "given" bits:

Code (Find) Select

          // Thank You Infomations :)

          echo '
                             <dl class="noborder">
                                      <dt>', $txt['thankyoutitle'], ':</dt>
                                      <dt>', $txt['thankyoupostmade'], ':</dt>
                                      <dd>', $context['member']['thank_you_post']['made'], '</dd>
                                      <dt>', $txt['thankyoupostbecame'], ':</dt>
                                      <dd>', $context['member']['thank_you_post']['became'], '</dd>
                             </dl>';



Code (Replace With) Select
          // Thank You Infomations :)

          echo '
                             <dl class="noborder">
                                      <dt>', $txt['thankyoutitle'], ':</dt>
                                      <dt>', $txt['thankyoupostbecame'], ':</dt>
                                      <dd>', $context['member']['thank_you_post']['became'], '</dd>
                             </dl>';


ViewFromTheBoundary

Ok thanks I will give it a try tonight

ViewFromTheBoundary

Quote from: Shambles on July 22, 2013, 07:21:27 AM
Quote
Firstly I would like to add an image to the "say thanks" button like on this forum. How would I go about this?

You mean add that "thumbs up" image you've got there? Just change the default mod's image located at yourtheme/images/buttons/thank_you_b.png



There is no picture under that title

ViewFromTheBoundary

Would I need to make it so it picks up that picture instead of the say thanks text?

ashish101

First of all, big thanks to developers for this Mod.

I have been using it for quite some time now, got a biggish and quite active forum. Whenever I run "Repair and optimize Thank-O-Matic tables" from Maintenance Thank-O-Matic section, the calculation is incorrect and users even lose their TYs.

Is anyone else seeing this? How to debug or fix it? Is it possible to run the re-calculation and optimization query directly on the database via phpmyadmin?

Thanks for your time in advance.

Advertisement: