News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Thank You Mod (V1.2.3)

Started by ディン1031, January 11, 2006, 12:29:00 PM

Previous topic - Next topic

Turk Navy

Firstly, thank you for this mod.

I am getting error when I enter topics.

Unknown column 'b.thank_you_automatic' in 'field list'


How can i solve this error.
Thank you.

ディン1031

Did you install via package manager?
?_? did you not made the SQL changes?


ALTER TABLE {$db_prefix}topics ADD thank_you TINYINT(4) DEFAULT '0' NOT NULL

ALTER TABLE {$db_prefix}boards thank_you_automatic TINYINT(4) DEFAULT '0' NOT NULL

ALTER TABLE {$db_prefix}boards thank_you_topics_enable TINYINT(4) DEFAULT '0' NOT NULL

CREATE TABLE IF NOT EXISTS {$db_prefix}thank_you (
ID_THX INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
ID_TOPIC MEDIUMINT(8) UNSIGNED NOT NULL ,
ID_MEMBER MEDIUMINT(8) UNSIGNED NOT NULL ,
memberName VARCHAR(80) NOT NULL ,
PRIMARY KEY (ID_THX) ,
INDEX (ID_TOPIC, ID_MEMBER)
) TYPE = MYISAM


This are the SQL Changes my mod make.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Geit

Hello,

First i want to say that i really hope someone can help me out. I'm searching now for almost three days to find the right answers to my questions. I'm sure here is someone who can help me 8)

I installed the Thank Mod with succes. But there are some very irritating problems.

1. I can''t see the Thank Button on my forum. Not at the Default theme and also at Musiconia...
2. I' have made some changes in the themes.. A couple pages ago i read it. So now i can see it in the admin panel the Thank you mod with the Musiconica theme. One problem solved so far.
3. Another problem, the mod works only when i put the language in to English. Because my forum is for Dutch people i want to be able to use the Dutch Language and your fantastic mod.

I' have installed the hide mod also...

This is a screen i made this morning afther some changes:


Help me out!
:'(

ディン1031

1st: Did you enable the Mod in the Boards!
2nd: Did you set you Premissions for the Mod
3rd: Make the English Language Changes in the Dutch Version so that you will see in the Dutch version (Look into the ThankYouEnglish.xml for the english changes).
4th: Make a copy of the ThankYou.english.php to ThankYou.yourLangauge.php.

The Hide Mod is a nice and good working mod ;P (has nothing to do with the Thank You Mod, at the moment).

Bye
DIN1031





Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Geit

Alright. Now i see the buttons of the Thank mod. And it works damn fine:) But when i change to Musiconica theme then the buttons are gone..

When uppest problem is solved im going to work on the language files.. but first i want this to be good...

ディン1031

You need to make the Theme Changes :)


<edit file>
$themedir/Display.template.php
</edit file>

<search for>
else
unset($normal_buttons['custom']);
</search for>

<add after>

//Thank You Button is now where it belongs <<
if (isset($context['thank_you']['premission'])) {
if ($context['thank_you']['premission']['post'])
$normal_buttons['thankyou'] = array('text' => 'd_thank_you', 'image' => 'thank_you.gif', 'lang' => true, 'url' => $scripturl . '?action=thankyoupost;topic=' . $context['current_topic'] . '.0');
elseif ($context['thank_you']['premission']['add'])
$normal_buttons['thankyou'] = array('text' => 'd_thank_you_add', 'image' => 'thank_you_add.gif', 'lang' => true, 'url' => $scripturl . '?action=thankyouadd;topic=' . $context['current_topic'] . '.0');
}
</add after>

<search for>
if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
$mod_buttons[] = array('text' => 'quickmod_delete_selected', 'image' => 'delete_selected.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" id="quickmodSubmit"', 'url' => 'javascript:document.quickModForm.submit();');
</search for>

<add before>
if (isset($context['thank_you']['premission']))
$mod_buttons += array(
'lock_thank_you' => array('test' => 'thank_you_lock', 'text' => 'd_thank_you_lock'.$context['ThankYouLockStatus'], 'image' => 'thank_you_lock'.$context['ThankYouLockStatus'].'.gif', 'lang' => true, 'custom' => '', 'url' => $scripturl . '?action=thankyoulock;topic=' . $context['current_topic'] . '.0'),
'remove_thank_you' => array('test' => 'thank_you_delete', 'text' => 'd_thank_you_remove', 'image' => 'thank_you_delete.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['d_thank_you_remove_warn'] . '\');"', 'url' => $scripturl . '?action=thankyouremove;topic=' . $context['current_topic'] . '.0'),
);
</add before>


<edit file>
$themedir/ManageBoards.template.php
</edit file>

<search for>
<td valign="top" align="right">
<input type="checkbox" name="count" ', $context['board']['count_posts'] ? ' checked="checked"' : '', ' class="check" />
</td>
</tr>';
</search for>

<replace>
<td valign="top" align="right">
<input type="checkbox" name="count" ', $context['board']['count_posts'] ? ' checked="checked"' : '', ' class="check" />
</td>
</tr>';

// Here is the Thank You Option for the enable of the Thank you in this board!
echo '
<tr>
<td>
<b>', $txt['mboards_thank_you_topics_enable'], '</b><br />
', $txt['mboards_thank_you_topics_enable_desc'], '<br /><br />
</td>
<td valign="top" align="right">
<input type="checkbox" name="thank_you_topics_enable" ', $context['board']['thank_you_topics_enable'] ? ' checked="checked"' : '', ' class="check" />
</td>
</tr>';
// Here is the New Thank You Option for the Board Premissions
echo '
<tr>
<td>
<b>', $txt['mboards_thank_you_automatic'], '</b><br />
', $txt['mboards_thank_you_automatic_desc'], '<br /><br />
</td>
<td valign="top" align="right">
<input type="checkbox" name="thank_you" ', $context['board']['thank_you_automatic'] ? ' checked="checked"' : '', ' class="check" />
</td>
</tr>';
</replace>

<edit file>
$themedir/Post.template.php
</edit file>

<search for>
<tr>
<td class="smalltext"><label for="check_smileys"><input type="checkbox" name="ns" id="check_smileys"', $context['use_smileys'] ? '' : ' checked="checked"', ' value="NS" class="check" /> ', $txt[277], '</label></td>', '
<td class="smalltext">', $context['can_move'] ? '<input type="hidden" name="move" value="0" /><label for="check_move"><input type="checkbox" name="move" id="check_move" value="1" class="check" /> ' . $txt['move_after2'] . '</label>' : '', '</td>
</tr>', $context['can_announce'] && $context['is_first_post'] ? '
<tr>
<td class="smalltext"><label for="check_announce"><input type="checkbox" name="announce_topic" id="check_announce" value="1" class="check" /> ' . $txt['announce_topic'] . '</label></td>
<td class="smalltext"></td>
</tr>' : '', '
</search for>

<add after>
', $context['can_Thank_you'] && empty($context['isThank_You']) ? '
<tr>
<td class="smalltext"><label for="check_thank_you"><input type="checkbox" name="add_thank_you" id="add_thank_you"' . ($context['add_thank_you'] || $context['thank_you_automatic'] ? ' checked="checked"' : '') . ' value="1" class="check" /> '.$txt['thank_you_after2'].'</label></td>
<td class="smalltext"></td>
</tr>' : '', '
</add after>

This are all the theme changes made by this mod, you must look in you theme and make the this changes.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Geit

I already made this changes to my board. I checked them again but it stil not work :'(

@ディン1031 :

Maybe if you want.. can you check my forum.. login on my username + Password and look if i forgot something. I can't sleep of it :-\

lonrot

Hi, I have SMF 1.2 with Tiny Portal 0.97 and SoftMC_Blue as theme.

I had a really hard time trying to figure out how to install this mod, I wonder if anyone can help me.

darkblack323

how can ı add to 1.1.2 this mod?

ı use orange ball themea


ディン1031

@darkblack323, @lonrot

Install the Mod via Package Manager and make the Themechanges the change to your theme postet in this post: http://www.simplemachines.org/community/index.php?topic=65339.msg1132771#msg1132771

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

darkblack323

There are one problem.I cant install Package Manager.

in Phpmayadmin


Error

SQL query:

ALTER TABLE {$db_prefix}topics ADD thank_you TINYINT( 4 ) DEFAULT '0' NOT NULL ALTER TABLE {$db_prefix}boards thank_you_automatic TINYINT( 4 ) DEFAULT '0' NOT NULL ALTER TABLE {$db_prefix}boards thank_you_topics_enable TINYINT( 4 ) DEFAULT '0' NOT NULL CREATE TABLE IF NOT EXISTS {$db_prefix}thank_you(
ID_THX INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
ID_TOPIC MEDIUMINT( 8 ) UNSIGNED NOT NULL ,
ID_MEMBER MEDIUMINT( 8 ) UNSIGNED NOT NULL ,
memberName VARCHAR( 80 ) NOT NULL ,
PRIMARY KEY ( ID_THX ) ,
INDEX ( ID_TOPIC, ID_MEMBER )
) TYPE = MYISAM

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{$db_prefix}topics ADD thank_you TINYINT(4) DEFAULT '0' NOT NULL

ALTER TABLE ' at line 1

?


ディン1031

lol this will not work XD.

You must replace the {$db_prefix} with you prefix for tables ;).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

lonrot

Man this is really not working, I'm using Tiny Portal, and my custom theme doesn't have all those files that are supposed to be edited. I uninstalled Thank You Mod and installed Thankyou Omatic, and doesn't work either.

Please somebody help, I desperately need it.

ディン1031

It is working ;). But i don't know if it work with TP :x, but normal it should.

Installed without error?
First did you change you current theme, did you look if it work on default theme?
Did you enable it in the Board Options?
Set the Premissions so that user can give and see thank you's?
Language changes made?

(It's in both mods the same ;P, but post for the one you need in the right thread...).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Turk Navy

Quote from: ディン1031 on June 20, 2007, 01:27:50 AM
Did you install via package manager?
?_? did you not made the SQL changes?


ALTER TABLE {$db_prefix}topics ADD thank_you TINYINT(4) DEFAULT '0' NOT NULL

ALTER TABLE {$db_prefix}boards thank_you_automatic TINYINT(4) DEFAULT '0' NOT NULL

ALTER TABLE {$db_prefix}boards thank_you_topics_enable TINYINT(4) DEFAULT '0' NOT NULL

CREATE TABLE IF NOT EXISTS {$db_prefix}thank_you (
ID_THX INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
ID_TOPIC MEDIUMINT(8) UNSIGNED NOT NULL ,
ID_MEMBER MEDIUMINT(8) UNSIGNED NOT NULL ,
memberName VARCHAR(80) NOT NULL ,
PRIMARY KEY (ID_THX) ,
INDEX (ID_TOPIC, ID_MEMBER)
) TYPE = MYISAM


This are the SQL Changes my mod make.

Bye
DIN1031


I installed via package manager. There was no problem.

I am using: SMF 1.1.2 with TinyPortal and Azure Theme.

Thank You.

definitive

Thanks for the mod
But how can we enable thank you for all boards? One by one?

ディン1031

Only one by one :x

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Turk Navy

I tried this sql:

ALTER TABLE smf_topics ADD thank_you TINYINT(4) DEFAULT '0' NOT NULL

ALTER TABLE smf_boards thank_you_automatic TINYINT(4) DEFAULT '0' NOT NULL

ALTER TABLE smf_boards thank_you_topics_enable TINYINT(4) DEFAULT '0' NOT NULL


It didn't work.

I got this error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE smf_boards thank_you_automatic TINYINT(4) DEFAULT '0' NOT NULL

AL' at line 3


My PHP version: 5.2.0
My MySql version: 5.0.27-community-nt

phedo

Hello,

I just tried to uninstall this mod - it worked without any errors but there are still the buttons in the forums options and permissions.

Same problem with Thank-You-Matic

Please help!

Phedo

Asterix[M]

i have error in ManagePermissions.php

./Sources/ManagePermissions.php   Test failed

please help

Advertisement: