UzziSoft Forum Index UzziSoft
Provider of free downloads and services - www.uzzisoft.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[RC1] Thank Post by User v0.3.2
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    UzziSoft Forum Index -> phpBB Mods
View previous topic :: View next topic  
Author Message
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Thu Apr 10, 2008 12:04 pm    Post subject: Reply with quote

GruCho wrote:
Hi
Nice mod but not showing in mu sub forums Sad Help Please !!!




You can switch on temporarily with the instruction over myadmin

Code:
UPDATE phpbb_forums SET thanks_enabled = 1;


1 Enable
0 Disable

I have first times over myadmin settled however me am very important hide mod. Unfortunately alex no answer gives.
Back to top
View user's profile Send private message
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Sat Apr 12, 2008 11:01 pm    Post subject: Reply with quote

Alex help it me nevertheless please with that hide mod. I point which I are importunate, but I need that absolutely.
Back to top
View user's profile Send private message
alexi02
Site Admin


Joined: 17 Aug 2004
Posts: 230
Location: Brisbane, Australia

PostPosted: Fri Apr 18, 2008 11:24 am    Post subject: Reply with quote

Hi,

Sorry about the delay. The code below should work. Note that if a user thanks any post in the topic, all hidden text from all posts will be revealed.

Find
Code:
        //
        // Parse message and/or sig for BBCode if reqd
        //
        if ($user_sig != '' && $user_sig_bbcode_uid != '')
        {
                $user_sig = ($board_config['allow_bbcode']) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:$user_sig_bbcode_uid/si", '', $user_sig);
                $user_sig = bbencode_third_pass($user_sig, $user_sig_bbcode_uid, $valid);
        }

        if ($bbcode_uid != '')
        {
                $message = ($board_config['allow_bbcode']) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace("/\:$bbcode_uid/si", '', $message);
                $message = bbencode_third_pass($message, $bbcode_uid, $valid);
        }


Before Add
Code:
        // Start Thank Post by User Mod for Hide Mod
        $sql = "SELECT post_id
                FROM phpbb_thanksmod
                WHERE post_id = '" . $postrow[$i]['post_id'] . "'
                AND thanks_by = '" . $userdata['user_id'] . "'";

        if ( !($result = $db->sql_query($sql)) ) {
          message_die(GENERAL_ERROR, "Could not obtain thanks information", '', __LINE__, __FILE__, $sql);
        }

        $check_user_thanked = $db->sql_fetchrow($result);
        $db->sql_freeresult($result);

        if ($check_user_thanked) { $valid = TRUE; }
        // End Thank Post by User Mod for Hide Mod

_________________

UzziSoft Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Fri Apr 18, 2008 12:15 pm    Post subject: Reply with quote

Besten dank Alex. Funktioniert bestens. Very Happy
Das ist echt super Mod. wehre das auch machbar das jeder Versteckte Beitrag nicht angezeigt wird?

Best one owing to Alex. Functioned in the best way. That is genuinly super Mod. resists also feasiblly each hidden contribution is not indicated?

Thansk Thanks Laughing
Back to top
View user's profile Send private message
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Mon May 12, 2008 4:06 am    Post subject: Reply with quote

Sometimes those give to user wrong thank off and it are very useful which one thank take back could. You can please for it which make. Thank saying as admin take back.

Thanks
Back to top
View user's profile Send private message
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Tue May 13, 2008 4:18 am    Post subject: Reply with quote

There is large problem. If user is deleted, its thanks not with one deletes. Crying or Very sad
Back to top
View user's profile Send private message
alexi02
Site Admin


Joined: 17 Aug 2004
Posts: 230
Location: Brisbane, Australia

PostPosted: Thu May 15, 2008 3:29 pm    Post subject: Reply with quote

If you want to delete the thanks when deleting a user follow the steps below.

In admin/admin_users.php

Find

Code:
                        $sql = "SELECT privmsgs_id
                                FROM " . PRIVMSGS_TABLE . "
                                WHERE privmsgs_from_userid = $user_id
                                        OR privmsgs_to_userid = $user_id";
                        if ( !($result = $db->sql_query($sql)) )
                        {
                                message_die(GENERAL_ERROR, 'Could not select all users private messages', '', __LINE__, __FILE__, $sql);
                        }


After add
Code:
                        // Delete from thanksmod
                        $sql = "SELECT post_id
                                FROM phpbb_thanksmod
                                WHERE thanked_user = '" . $user_id . "'
                                        OR thanks_by = '" . $user_id . "'";
                        if ( !($result = $db->sql_query($sql)) )
                        {
                                message_die(GENERAL_ERROR, 'Could not delete thanks for this user', '', __LINE__, __FILE__, $sql);
                        }

_________________

UzziSoft Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Thu May 15, 2008 9:12 pm    Post subject: Reply with quote

Thanks.
Can You make manually delete of thanks . Embarassed
Back to top
View user's profile Send private message
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Fri May 16, 2008 9:28 pm    Post subject: Reply with quote

It gives however still problem, to user by that the user deleted thanks will have gotten however not with deleted. Whom user should also its is deleted thanks to be everywhere deleted.
Back to top
View user's profile Send private message
alexi02
Site Admin


Joined: 17 Aug 2004
Posts: 230
Location: Brisbane, Australia

PostPosted: Mon May 19, 2008 12:42 am    Post subject: Reply with quote

Sorry about that, I didn't actually test my code. Remove the code and find:

Code:
$message = $lang['User_deleted'] . '<br /><br />' . sprintf($lang['Click_return_useradmin'], '<a href="' . append_sid("admin_users.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');



And before that put in the new code:

Code:
                        // Delete from thanksmod
                        $sql = "DELETE FROM phpbb_thanksmod
                                WHERE thanked_user = '" . $user_id . "'
                                        OR thanks_by = '" . $user_id . "'";
                        if ( !($result = $db->sql_query($sql)) )
                        {
                                message_die(GENERAL_ERROR, 'Could not delete thanks for this user', '', __LINE__, __FILE__, $sql);
                        }

_________________

UzziSoft Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
alexi02
Site Admin


Joined: 17 Aug 2004
Posts: 230
Location: Brisbane, Australia

PostPosted: Sun Jun 01, 2008 3:59 pm    Post subject: Reply with quote

Thank Post by User v0.3.1 RC1 (10.9KB)

MOD History:
2008-06-01 - Version 0.3.1 (RC1)
- Fixed a slight bug which was added in v0.3 that allowed users to thank anonymous posts
- Added in thanks in user profile
- Improved sql query in thanks.php
_________________

UzziSoft Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MadimaC



Joined: 06 Jun 2008
Posts: 8

PostPosted: Fri Jun 06, 2008 9:24 am    Post subject: Reply with quote

Hello

1 Gives updates of v0.3.1 - on v0.3.1 RC1.
2 Would have if one ask to the thanking saying, possible with a SQL is instruction under forum all thanking saying to delete.

Thanks
Back to top
View user's profile Send private message
MadimaC



Joined: 06 Jun 2008
Posts: 8

PostPosted: Mon Jun 09, 2008 11:55 am    Post subject: Reply with quote

When Delete Posts is not delete Thanks??
Whom the contributions are deleted, thank-beautifully unfortunately not with deleted.
Back to top
View user's profile Send private message
alexi02
Site Admin


Joined: 17 Aug 2004
Posts: 230
Location: Brisbane, Australia

PostPosted: Mon Jun 09, 2008 3:38 pm    Post subject: Reply with quote

When a post is deleted, all the thanks given to that post are deleted.

Can you check to make sure you have the following code in your includes/functions_post.php

#
#-----[ FIND ]---------------------------------
#

Code:
function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id)
{
        global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
        global $userdata, $user_ip;


#
#-----[ AFTER, ADD ]---------------------------------
#
Code:
        //
        // Start Thank Post by User Mod
        //

        // Delete all thanks which match the post id
        $sql = "DELETE FROM
                phpbb_thanksmod
                WHERE post_id = '$post_id'";

        if ( !($result = $db->sql_query($sql)) ) {
           message_die(GENERAL_ERROR, "Could not remove thanks from thanks table", '', __LINE__, __FILE__, $sql);
        }

        //
        // End Thank Post by User Mod
        //

_________________

UzziSoft Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MadimaC



Joined: 06 Jun 2008
Posts: 8

PostPosted: Mon Jun 09, 2008 8:30 pm    Post subject: Reply with quote

This was inserted, unfortunately thanks was however not deleted already.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    UzziSoft Forum Index -> phpBB Mods All times are GMT + 10 Hours
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 5 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group