[2.0.6] Stop Post Count From Increasing

The cleanup is complete. This forum is now read only.
Post Reply

Rating:

Excellent!
25
50%
Very Good
9
18%
Good
3
6%
Fair
3
6%
Poor
10
20%
 
Total votes: 50

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 27738
Joined: Sat Aug 16, 2003 7:36 am

[2.0.6] Stop Post Count From Increasing

Post by Extensions Robot » Tue Sep 02, 2003 7:37 pm

MOD Name: Stop Post Count From Increasing
Author: The Pelican
MOD Description: Don't increase posts count when posting in a certain forum.

MOD Version: 1.1.0


Download File: stop_post_count_1_1_0a.zip
File Size: 5315 Bytes
Last edited by Extensions Robot on Mon Apr 30, 2007 12:30 am, edited 3 times in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

User avatar
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric » Sat Nov 08, 2003 10:40 pm

MOD Validated/Released
Eric

epolady
Registered User
Posts: 109
Joined: Mon Aug 12, 2002 1:33 am

Post by epolady » Sun Nov 09, 2003 2:31 am

How is this MOD different from this?
http://www.phpbb.com/phpBB/viewtopic.php?t=138032

User avatar
fateorfantasy
Registered User
Posts: 318
Joined: Tue Jul 01, 2003 6:54 pm
Location: Canada
Contact:

Post by fateorfantasy » Sun Nov 09, 2003 4:38 am

epolady wrote: How is this MOD different from this?
http://www.phpbb.com/phpBB/viewtopic.php?t=138032


This mod has:
  1. If someone posts in a specific forum, post count does not go up?
  2. If that previous post is deleted, his/her post count does not go down?
  3. If a topic in the no-post-count forum is moved to a post-count-forum, all people get the credit (ie: post count goes up for all people who have posted in that topic)?
  4. If a topic in a post-count forum is moved to the no-post-count-forum, all people lose the credit (ie: post count goes down for all people who have posted in that topic)?
and most of the differences are addressed on this page: http://www.phpbb.com/phpBB/viewtopic.ph ... c&start=20

epolady
Registered User
Posts: 109
Joined: Mon Aug 12, 2002 1:33 am

Post by epolady » Sun Nov 09, 2003 4:43 am

Ah, okay then, thank you for clearing that up for me.

User avatar
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore » Sun Nov 09, 2003 4:59 am

fateorfantasy wrote:
epolady wrote:How is this MOD different from this?
http://www.phpbb.com/phpBB/viewtopic.php?t=138032


This mod has:
  1. If someone posts in a specific forum, post count does not go up?
  2. If that previous post is deleted, his/her post count does not go down?
  3. If a topic in the no-post-count forum is moved to a post-count-forum, all people get the credit (ie: post count goes up for all people who have posted in that topic)?
  4. If a topic in a post-count forum is moved to the no-post-count-forum, all people lose the credit (ie: post count goes down for all people who have posted in that topic)?
and most of the differences are addressed on this page: http://www.phpbb.com/phpBB/viewtopic.ph ... c&start=20


It seems you missed my reply. 1 and 2 are covered in the other mod. 3 and 4 are not (At this time). IIRC, this one will recount your posts, so if topics you posted in get deleted, this will cause your post count to decrease for that also.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

User avatar
The Pelican
Registered User
Posts: 2176
Joined: Tue Jun 18, 2002 9:50 am
Location: Home is where the heart is (which happens to be in the Netherlands)
Contact:

my first mod

Post by The Pelican » Sun Nov 09, 2003 9:49 am

JeeeeJ :D I got my first official mod out :)
Thank you pieps :)

Note that I am the secondary author. I took over the mod when the previous author did not want to support it and upgrade it to a new version and I added coded suggestions.

About the 4 questions:
1: yes
2: indeed
3: yes
4: yes

So, as a reaction to this quote (which made it less clear again):
Xore wrote: IIRC, this one will recount your posts, so if topics you posted in get deleted, this will cause your post count to decrease for that also.

If your post are deleted in a no-post-count forum, your post-count does not go down.
The Pelican :)
Knowledge Base || No PM support and no MSN or E-mail support || Asking Questions The Smart Way (and use the template)

Allen_oc
Registered User
Posts: 4
Joined: Sat Sep 27, 2003 9:14 am
Location: [PL]
Contact:

Post by Allen_oc » Mon Nov 10, 2003 8:37 am

Hello There.
I've installed this mod on my webForum, but there is a problem, even 4 problems.

When i want to delete, move, split or lock the topic a got an error in modcp.php file, like this:

Code: Select all

Parse error: parse error in /var/home/my_site_name/forum/modcp.php on line 494
And The php code for this is:

Code: Select all

$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);topic_id_list']) ) ?  $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
If I delete the last part, that is: $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
The same error interupt me at line 496 and it is:

Code: Select all

$topic_list = '';
So finally i'm askin' for some help guys, i really want it start working properly.

Thx
Best regards
Allen

User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix » Mon Nov 10, 2003 8:51 am

have you check all your modifications in the file modcp.php ? maybe you should, or try to take a fresh file and re-done the modifications
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:

Allen_oc
Registered User
Posts: 4
Joined: Sat Sep 27, 2003 9:14 am
Location: [PL]
Contact:

Post by Allen_oc » Mon Nov 10, 2003 9:07 am

morpheus2matrix wrote: have you check all your modifications in the file modcp.php ? maybe you should, or try to take a fresh file and re-done the modifications

I've just checked the modification and what was wrong? There shouldn't be the:

Code: Select all

$HTTP_POST_VARS['topic_id_list'] : array($topic_id);topic_id_list']) ) ?
In Line 494 in modcp.php File.
I think that was the residue of last scipt for no inceasing post in forums, which i used before. Anyway, now all is working properly.
Thx 4 giving me a hand.
Best regards
Allen

User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix » Mon Nov 10, 2003 10:52 am

Allen_oc wrote:
morpheus2matrix wrote:have you check all your modifications in the file modcp.php ? maybe you should, or try to take a fresh file and re-done the modifications

I've just checked the modification and what was wrong? There shouldn't be the:

Code: Select all

$HTTP_POST_VARS['topic_id_list'] : array($topic_id);topic_id_list']) ) ?
In Line 494 in modcp.php File.
I think that was the residue of last scipt for no inceasing post in forums, which i used before. Anyway, now all is working properly.
Thx 4 giving me a hand.


here is the line that you need to search

Code: Select all

$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);

there is no

Code: Select all

topic_id_list']) ) ?
after the array($topic_id);


The final result is :

Code: Select all

include($phpbb_root_path . 'includes/functions_search.'.$phpEx);

			$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);

// Start code for Stop Post Count MOD
	// Code writen by KingRufus (09/23/2002)
            $board_config['no_post_count_forum_id'] = $GLOBALS['board_config']['no_post_count_forum_id'];
            if( strstr($board_config['no_post_count_forum_id'], ',') )
            {
                $fids = explode(',', $board_config['no_post_count_forum_id']);
            
                while( list($foo, $id) = each($fids) )
                {
                    $fid[] = intval( trim($id) );
                }
            }
            else
            {
                $fid[] = intval( trim($board_config['no_post_count_forum_id']) );
            }
            reset($fid);

            $topic_id_sql = '';
			$topic_id_sql_onlypostcount_forums = '';
			for($i = 0; $i < count($topics); $i++)
			{
				$topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . $topics[$i];

                $sql = "SELECT forum_id
                    FROM " . POSTS_TABLE . " 
                    WHERE topic_id = ". $topics[$i];
                if ( !($result = $db->sql_query($sql)) )
                {
                    message_die(GENERAL_ERROR, 'Could not get forum id information', '', __LINE__, __FILE__, $sql);
                }
                $row = $db->sql_fetchrow($result);
                if (in_array($row["forum_id"], $fid) == false)
                {
                    $topic_id_sql_onlypostcount_forums .= ( ( $topic_id_sql_onlypostcount_forums != '' ) ? ', ' : '' ) . $topics[$i];
                }
			}

            if ($topic_id_sql_onlypostcount_forums != '')
            {
                $sql = "SELECT poster_id, COUNT(post_id) AS posts 
                    FROM " . POSTS_TABLE . " 
                    WHERE topic_id IN ($topic_id_sql_onlypostcount_forums) 
                    GROUP BY poster_id";
                if ( !($result = $db->sql_query($sql)) )
                {
                    message_die(GENERAL_ERROR, 'Could not get poster id information', '', __LINE__, __FILE__, $sql);
                }

                $count_sql = array();
                while ( $row = $db->sql_fetchrow($result) )
                {
                    $count_sql[] = "UPDATE " . USERS_TABLE . " 
                        SET user_posts = user_posts - " . $row['posts'] . " 
                        WHERE user_id = " . $row['poster_id'];
                }
                $db->sql_freeresult($result);

                if ( sizeof($count_sql) )
                {
                    for($i = 0; $i < sizeof($count_sql); $i++)
                    {
                        if ( !$db->sql_query($count_sql[$i]) )
                        {
                            message_die(GENERAL_ERROR, 'Could not update user post count information', '', __LINE__, __FILE__, $sql);
                        }
                    }
                }
            }
	// End code for Stop Post Count MOD
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:

developer
Registered User
Posts: 31
Joined: Mon Sep 29, 2003 11:58 pm

Post by developer » Tue Nov 11, 2003 5:20 pm

Hello! :)

I have done the mod now on my forum, but I don't understand where I set which forum that should not count user posts.

Thanks in advance.

User avatar
The Pelican
Registered User
Posts: 2176
Joined: Tue Jun 18, 2002 9:50 am
Location: Home is where the heart is (which happens to be in the Netherlands)
Contact:

Post by The Pelican » Tue Nov 11, 2003 5:38 pm

Hi :)

Configuring this MOD:

Go to your admin panel -> configuration -> User and Forum Basic Settings -> No post count in forum

Just add in the numbers of the forums you don't want the post-count to increase.

To find the numbers of the forums, click the forum link on index.php and check your addressbar.

Example:

Code: Select all

http://thenest.dyndns.org/ppforum/viewforum.php?f=2
In this case you add number 2.

For more numbers, just add them like this:
the Pelican's configuration wrote: 2,37,44


Edit (on April 8th 2004):

MOD support:
The only thing I can do right now is give support out of my mind and general knowledge. Not much real support for this MOD (as with most MOD's) is needed, since it comes down to check which file-change someone did not do and if s/he did do the database update. All the information about configuring this MOD is on the first page of this topic.
I am not in the situation to check problems with this MOD when using with other MOD's. I'm sure 90% of the MOD's (at least) should be no problem.

I am know with the fact that a piece of functionality I was sure of did work on this MOD does seem to fail on 90% of the boards (which sort of means it will also fail on the remaining 10% but those most probably did not test it). I am very sorry about that, since that was the stringness of this MOD. I did work on 2.0.4 and the code changes for 2.0.6 can't almost certainly not ruin this, so where this went wrong is a mistery for me (and that's kind of painfull for an IT consultant on his own work), but I can kill the bug by lack of test and live environment and me moving away from phpBB due to multiple reasons.

Don't contact me using E-mail or MSN:
Last night I had again someone contacting me over MSN on a lot of different phpBB related things but which had nothing to do with this MOD. After me not wanting to give support (for obvious and fairly good reasons) he became pissed and very anoying. I did gave the person the support he needed for this MOD and I gave him even some support on phBB but he did not seem to understand that we have a support forum for these things.
Please use the support board; that's what it was meant for. :) If I choice not to give support outside of this board, than I have the good right for that (as long as you are not paying my hourly rate and you don't want that ;) ).
The last thing I want is people hounting me over the internet for something helpfull I did once, so please don't. I have a life you know ;)

Upgrading to newer versions of phpBB:
The bad news is: I will not be upgrading this MOD for newer versions of phpBB.
The good news is: This functionality will be default in phpBB 2.2 (if I remember correct).

Want to take over this MOD?
Please do so. :) Contact me over PM (for this and this only) and we will sort it out.
I will only request you to remove my website and E-mail-address from the MOD. The rest is up to you.

Alternative for the same functionality:
If you are looking for a MOD which seem to have the same functionality as this MOD, please take a look here. It's made by Xore and it souds like it has a better user interface. It does not have the functionality of reducing postcount when moving a topic into a no-post-count forum, but than again, that did not seem to work (anymore) with this MOD also.

Edit (on October 7th 2004):

2.0.8 Beta
For those of you who want a newer but Beta version of this MOD, try looking here:
http://www.phpbb.com/phpBB/viewtopic.php?t=189069

Kind regards,
the Pelican
Last edited by The Pelican on Thu Oct 07, 2004 8:02 am, edited 2 times in total.
The Pelican :)
Knowledge Base || No PM support and no MSN or E-mail support || Asking Questions The Smart Way (and use the template)

developer
Registered User
Posts: 31
Joined: Mon Sep 29, 2003 11:58 pm

Post by developer » Tue Nov 11, 2003 8:23 pm

Hello again! :)

I have changed and uploaded all the files according to the instructions and ran the /mod_install.php update page in the /forum/ dir. (It said it was completed)

For some of the files I had to change to chmod to write so I could upload them, but that shoulnd affect anything I guess...

On the General board setting I only have
"Enable account activation"

and no

"No post count in forum "

Any clues please.

This is my first mod implementation I do so it's probably me...

Thanks again in advance.

User avatar
The Pelican
Registered User
Posts: 2176
Joined: Tue Jun 18, 2002 9:50 am
Location: Home is where the heart is (which happens to be in the Netherlands)
Contact:

Post by The Pelican » Wed Nov 12, 2003 12:29 pm

Hi again :)

I think you are looking at the wrong place.

You are looking at "General Board Settings", but if you go down, you will find "User and Forum Basic Settings" (on the same screen). The first thing under that header should be "No post count in forum".
The Pelican :)
Knowledge Base || No PM support and no MSN or E-mail support || Asking Questions The Smart Way (and use the template)

Post Reply

Return to “[2.0.x] MOD Database Cleanup”

Who is online

Users browsing this forum: No registered users and 7 guests