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
alexi02
Site Admin


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

PostPosted: Thu Apr 03, 2008 1:19 am    Post subject: Reply with quote

So when thanks is disabled, you want no one to be able to thank posts, but still be able to see the people who have thanked posts?

Can you post the error message you receive when you press Yes or No in the Admin Control Panel? Did you alter your phpbb_forum SQL table to add the thanks_enabled column?
_________________

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 Apr 03, 2008 2:06 am    Post subject: Reply with quote

Whom mod out is are those user to have thanked you are also noticeable, the information is now indicated.

Wen das mod aus ist sollen die user die sich bedankt haben auch angezeigt werden, die infos werden jetzt angezeigt.

--------

Yes/no functioned, I do not get no error only info.. (nothing was selected) and no entry in msql.

Das yes/no Funktioniert garnicht, ich bekomme keine error nur eine info. (Wurde nichts gew�hlt) und keine eintrag in msql.
Back to top
View user's profile Send private message
alexi02
Site Admin


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

PostPosted: Thu Apr 03, 2008 12:55 pm    Post subject: Reply with quote

I just tested it out again and looks like I forgot something.

In admin/admin_forums.php

Find
Code:
                case 'forum_sync':
                        sync('forum', intval($HTTP_GET_VARS[POST_FORUM_URL]));
                        $show_index = TRUE;

                        break;


After Add
Code:
                case 'thanks_yes':
                        $forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);
                        $sql = "UPDATE " . FORUMS_TABLE . "
                                SET thanks_enabled = '1'
                                WHERE forum_id = $forum_id";
                        if( !$result = $db->sql_query($sql) )
                        {
                                message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
                        }

                        $show_index = TRUE;

                        break;

                case 'thanks_no':
                        $forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);
                        $sql = "UPDATE " . FORUMS_TABLE . "
                                SET thanks_enabled = '0'
                                WHERE forum_id = $forum_id";
                        if( !$result = $db->sql_query($sql) )
                        {
                                message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
                        }

                        $show_index = TRUE;

                        break;

_________________

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: Thu Apr 03, 2008 6:32 pm    Post subject: Reply with quote

2008-04-3 - Version 0.3
- New thanks table created
- Thanked x times in y posts now only shows y posts as the posts which users have thanked and not the total posts the user has
- Ability to enable / disable this mod on each forum via the ACP

Thank Post by User v0.3 (10.5KB)


Update from v0.2.6 to v0.3
Thank Post by User update from v0.2.6 to v0.3 (6.5KB)
_________________

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 Apr 03, 2008 9:17 pm    Post subject: Reply with quote

Unfortunately functioned that also, now does not pass nothing.

You think please of user thanked you with viewtopic. the whom the Mod out are also been noticeable to be supposed the people to have thanked you.
Back to top
View user's profile Send private message
alexi02
Site Admin


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

PostPosted: Thu Apr 03, 2008 9:31 pm    Post subject: Reply with quote

Rambo wrote:
Unfortunately functioned that also, now does not pass nothing.

You think please of user thanked you with viewtopic. the whom the Mod out are also been noticeable to be supposed the people to have thanked you.


To allow the thanked list to appear on forums that have thanks disabled.

Find
Code:
if ($postrow[$i]['user_id'] != ANONYMOUS && $thanks_forum_enabled == 1) {


Replace with
Code:
if ($postrow[$i]['user_id'] != ANONYMOUS) {

_________________

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 Apr 03, 2008 11:44 pm    Post subject: Reply with quote

I installed the Mod again for new, run everything well. Very Happy

---
Whom someone does not thank says is forwarding to lead, it is only one refresch to give.
-------

And one type, my tables are not called not phpbb therefore gives problems with mod. phpbb_thanksmod Here one can make an automatic recognition I manuel entered.

-----------

Whom a text with Hide Mod is hidden and user thanked you is that possible that the contribution opens.

I Have Instaled This Hide Mod http://www.philiweb.com/download/hide/hackhide.php

-----

Can you give me Top 5 Thanked Users For EzPortal
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 04, 2008 2:48 am    Post subject: Reply with quote

For the top 5 thanked users you can try viewing the changes here - http://www.phpbb.com/community/viewtopic.php?p=2581074#p2581074

You will need to make these changes to the files that EzPortal uses (for example, portal.php and portal_index.tpl).
_________________

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 04, 2008 3:12 am    Post subject: Reply with quote

Thanks,And can you helpme Hide Mode?
Back to top
View user's profile Send private message
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Fri Apr 04, 2008 4:59 am    Post subject: Reply with quote

I inserted O God, after which I had made the on my test forum finished, on my correct forum, but here I did not have Simble Subcategorie Mod.Und functioned with that. Ask assistance

Pls Help ME Crying or Very sad Crying or Very sad Crying or Very sad
http://img168.imageshack.us/my.php?image=simblesubmm4.jpg

Here is Simple Subforums MOD

Code:
##############################################################
## MOD Title: Simple Subforums MOD
## MOD Author: pentapenguin < n/a > (Jeremy Conley) http://www.pentapenguin.com
## MOD Author: CyberAlien <n/a> (Vjacheslav Trushkin) http://www.phpbbstyles.com
## MOD Description: This MOD is a simple subforums MOD that doesn't include any extras and makes only
## one small database change. It supports only one level deep subforums that should be enough for most forums.
Back to top
View user's profile Send private message
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Fri Apr 04, 2008 7:44 am    Post subject: Reply with quote

Sorry I has so many problems. Crying or Very sad

01. I have the Addon for EZPORTAL instaliert, unfortunately show that possibly which user and, all have 0 thanked you.

Here Demo
User1 (0)
User2 (0)
User3 (0)
User4 (0)
User5 (0)

Here Code Portal.php
Code:
      
//
       // Start Top 5 Thanked Users
        //
        $sql = "SELECT user_id, username, user_thanks_received
                FROM " . USERS_TABLE . "
                WHERE user_id <> " . ANONYMOUS . "
                ORDER BY user_thanks_received DESC";

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

        $row = $db->sql_fetchrowset($result);
        $db->sql_freeresult($result);
        $row_count = count($row);

        for ($x = 0; $x < 5; $x++) {

           if ($row[$x]['user_id']) {
           if ($x >= 1) { $top_5_thanked_users .= "<br /> "; }

           // Add user to thanked list
           $temp_url = "profile.$phpEx?mode=viewprofile&u=" . $row[$x]['user_id'];
           $top_5_thanked_users .= '<a href="' . $temp_url . '">' . $row[$x]['username'] . '</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (' . $row[$x]['user_thanks_received'] . ')';
           }
        }

        //
        // End Top 5 Thanked Users
        //


#############

02. Someone thanks whom says, the hidden contributions are to open automatically.

I Have Instaled This Hide Mod http://www.philiweb.com/download/hide/hackhide.php

#########

03. I instaliert the simple Subforums MOD, therefore under categories not over admin the panel laest itself and out to switch.

Here Demo
http://img168.imageshack.us/my.php?image=simblesubmm4.jpg

###############

04. Then I inserted the Addon for profile whether probably I said see with me on profil.php and portal.php 0 info. to thanks. But on viewtopic.php I see how much I thanked you.

#################

Here My Tabelle

Code:
CREATE TABLE `forum_thanksmod` (
  `post_id` mediumint(8) unsigned NOT NULL default '0',
  `thanked_user` mediumint(8) NOT NULL default '0',
  `thanks_by` mediumint(8) NOT NULL default '0',
  `thanked_time` int(10) NOT NULL default '0'
);

ALTER TABLE `forum_forums` ADD `thanks_enabled` SMALLINT( 1 ) NOT NULL ;
ALTER TABLE `forum_posts` ADD `thanks_count` MEDIUMINT( 8 ) NOT NULL DEFAULT '0';
ALTER TABLE `forum_posts` ADD `thanks_from_user_id` TEXT NULL;
ALTER TABLE `forum_users` ADD `user_thanks_received` MEDIUMINT( 8 ) NOT NULL DEFAULT '0';
ALTER TABLE `forum_users` ADD `user_thanks_given` MEDIUMINT( 8 ) NOT NULL DEFAULT '0';



Ask for assistance 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: Fri Apr 04, 2008 8:15 pm    Post subject: Reply with quote

For top 5 poster use this code as you have v0.3.

Code:
        //
        // Start Top 5 Thanked Users
        //

        $sql = "SELECT t.thanked_user, u.username
                FROM phpbb_thanksmod t LEFT JOIN " . USERS_TABLE . " u
                ON t.thanked_user = u.user_id
                WHERE thanked_user <> " . ANONYMOUS . "
                ORDER BY thanked_user DESC";

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

        $thanked_count = 1;
        $old_user_id = 0;
        $x = 0;
        while ($row = mysql_fetch_array($result)) {
           $user_id = $row['thanked_user'];
           $username = $row['username'];

           if ($row['thanked_user'] != $old_user_id) {
              $thanked_count = 0;
              $x++;
           }

           $old_user_id = $row['thanked_user'];
           $thanked_count++;

           $thankslist[$x]['count'] = $thanked_count;
           $thankslist[$x]['user_id'] = $user_id;
           $thankslist[$x]['username'] = $username;
        }

        rsort($thankslist);


        for ($x = 0; $x < 5; $x++) {

           if ($thankslist[$x]['user_id']) {
              if ($x >= 1) { $top_5_thanked_users .= "<br /> "; }

              // Add user to thanked list
              $temp_url = "profile.$phpEx?mode=viewprofile&u=" . $thankslist[$x]['user_id'];
              $top_5_thanked_users .= '<a href="' . $temp_url . '">' . $thankslist[$x]['username'] . '</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (' . $thankslist[$x]['count'] . ')';
           }
        }


        //
        // End Top 5 Thanked Users
        //



For thanks in user profile I assume you have http://www.phpbb.com/community/viewtopic.php?p=2938797#p2938797 installed.

Find
Code:
//
// Start Thank Post by User Mod
//

// If the user isn't anonymous
if ($profiledata['user_id'] != ANONYMOUS) {

// From Users SQL
$sql = "SELECT user_posts, user_thanks_given, user_thanks_received
        FROM " . USERS_TABLE . "
        WHERE user_id = " . $profiledata['user_id'];

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

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

// Thanked Posts SQL
$sql = "SELECT COUNT(thanks_count) AS thanks_count
        FROM " . POSTS_TABLE . "
        WHERE poster_id = " . $profiledata['user_id'] . "
        AND thanks_count <> 0";

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

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

$thanks_given = $user_row['user_thanks_given'];
$thanks_received = $user_row['user_thanks_received'] . ' ' . $lang['Thanks_thanked_2'] . ' ' . $thanked_post_count['thanks_count'] . ' ' . $lang['Thanks_thanked_3'];

}
else {
   $thanks_given = "";
   $thanks_received = "";
}

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



Replace with
Code:
//
// Start Thank Post by User Mod
//

// If the user isn't anonymous
if ($profiledata['user_id'] != ANONYMOUS) {

// Thanks by
$sql = "SELECT COUNT(thanks_by) AS thanks_by
     FROM phpbb_thanksmod
     WHERE thanks_by = " . $profiledata['user_id'];

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

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

// Thanked user
$sql = "SELECT post_id, thanked_user
     FROM phpbb_thanksmod
     WHERE thanked_user = '" . $profiledata['user_id'] . "'
     ORDER BY post_id";

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

// Calculate the thanked post the user has
$thanked_count = 0;
$thanked_posts = 0;
$old_post_id = 0;
while ($row = mysql_fetch_array($result)) {
if ($row['post_id'] != $old_post_id) {
   $thanked_posts++;
}
$old_post_id = $row['post_id'];
$thanked_count++;
}

$thanks_given = $lang['Thanks_thanks'] . ': ' . $thanks_by_row['thanks_by'];
$thanks_received = $lang['Thanks_thanked_1'] . ' ' . $thanked_count . ' ' . $lang['Thanks_thanked_2'] . ' ' . $thanked_posts . ' ' . $lang['Thanks_thanked_3'];

}
else {
$thanks_given = "";
$thanks_received = "";
}

//
// 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
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Fri Apr 04, 2008 9:58 pm    Post subject: Reply with quote

Point 1 and 4 is ok. Please the others scores also helps.
Back to top
View user's profile Send private message
Rambo



Joined: 21 Mar 2008
Posts: 20

PostPosted: Sat Apr 05, 2008 9:53 pm    Post subject: Reply with quote

Alex help me please because of hide mod and simble subforum
Back to top
View user's profile Send private message
GruCho



Joined: 10 Apr 2008
Posts: 1
Location: Serbia

PostPosted: Thu Apr 10, 2008 8:40 am    Post subject: Reply with quote

Hi
Nice mod but not showing in mu sub forums Sad Help Please !!!
Back to top
View user's profile Send private message Visit poster's website
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 4 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