[ABD] Users Reputation System Mod

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
RMcGirr83
Former Team Member
Posts: 21698
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Post by RMcGirr83 »

I believe he is making a reply to a post.

I have seen the page header errors that he has stated above and this is with a 2.0.17 board with Categories Hierarchy. FWIW.
rockboyteek
Registered User
Posts: 591
Joined: Tue Mar 29, 2005 2:50 pm
Contact:

Post by rockboyteek »

yes as sed above, but the error remains after don't know what the mod has done!!
http://www.adminfuel.com/ - Forum for Forum Administrators
antongranik
Registered User
Posts: 153
Joined: Tue Oct 07, 2003 5:41 pm
Location: russia/moscow
Contact:

Post by antongranik »

rockboyteek wrote: new errors.. didn't fix it..

Code: Select all

 
Error in posting

DEBUG MODE

UPDATE phpbb_forums SET , forum_last_post_id = 5718 WHERE forum_id = 1

Line : 487
File : functions_post.php 
also the header stuff hasnt gone..

Check, that you didn't delete these lines from includes/function_post.php:

Code: Select all

	$sign = ($mode == 'delete') ? '- 1' : '+ 1';
and

Code: Select all

	$forum_update_sql = "forum_posts = forum_posts $sign";
anton granik. graphic designer.
rockboyteek
Registered User
Posts: 591
Joined: Tue Mar 29, 2005 2:50 pm
Contact:

Post by rockboyteek »

got over that error.. got a new one now.. thanks for that help mate..

Code: Select all

General Error 
  
Error in posting

DEBUG MODE

UPDATE phpbb_users SET user_posts = user_posts + 1, user_reputation = user_reputation + , user_rep_last_time = 1140259130 WHERE user_id = 2

Line : 512
File : functions_post.php 
 
in the same place when trying to post....
http://www.adminfuel.com/ - Forum for Forum Administrators
antongranik
Registered User
Posts: 153
Joined: Tue Oct 07, 2003 5:41 pm
Location: russia/moscow
Contact:

Post by antongranik »

rockboyteek wrote: got over that error..

How? What did you do?
anton granik. graphic designer.
antongranik
Registered User
Posts: 153
Joined: Tue Oct 07, 2003 5:41 pm
Location: russia/moscow
Contact:

Post by antongranik »

rockboyteek wrote: got a new one now..

Code: Select all

General Error 
  
Error in posting

DEBUG MODE

UPDATE phpbb_users SET user_posts = user_posts + 1, user_reputation = user_reputation + , user_rep_last_time = 1140259130 WHERE user_id = 2

Line : 512
File : functions_post.php 
 
in the same place when trying to post....

For this problem I don't understand what's going on... Everything should work fine... :( It works smooth on my localhost.
anton granik. graphic designer.
antongranik
Registered User
Posts: 153
Joined: Tue Oct 07, 2003 5:41 pm
Location: russia/moscow
Contact:

Post by antongranik »

Check that you have this line correct in functions_post.php:

Code: Select all

	global $db, $rep_config, $userdata;
right after this line:

Code: Select all

function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_id, &$user_id)
{
anton granik. graphic designer.
lithman
Registered User
Posts: 51
Joined: Tue Nov 29, 2005 3:41 am

Post by lithman »

I got this when trying to install. I went to run the file in my browser and everything except the following was a success

Code: Select all

CREATE TABLE `phpbb_reputation` ( `user_id` mediumint(8) NOT NULL default '0', `user_id_2` mediumint(8) NOT NULL default '0', `post_id` mediumint(8) NOT NULL default '0', `rep_sum` smallint(5) NOT NULL default '0', `rep_neg` tinyint(1) NOT NULL default '0', `rep_comment` varchar(200) NOT NULL default '', `rep_time` int(11) NOT NULL default '0', KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+++ Error: 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 'DEFAULT CHARSET=latin1' at line 10

what do i do?
rockboyteek
Registered User
Posts: 591
Joined: Tue Mar 29, 2005 2:50 pm
Contact:

Post by rockboyteek »

antongranik wrote: Check that you have this line correct in functions_post.php:

Code: Select all

	global $db, $rep_config, $userdata;
right after this line:

Code: Select all

function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_id, &$user_id)
{


Its still there, so what the problem?
http://www.adminfuel.com/ - Forum for Forum Administrators
rockboyteek
Registered User
Posts: 591
Joined: Tue Mar 29, 2005 2:50 pm
Contact:

Post by rockboyteek »

lithman wrote: I got this when trying to install. I went to run the file in my browser and everything except the following was a success

Code: Select all

CREATE TABLE `phpbb_reputation` ( `user_id` mediumint(8) NOT NULL default '0', `user_id_2` mediumint(8) NOT NULL default '0', `post_id` mediumint(8) NOT NULL default '0', `rep_sum` smallint(5) NOT NULL default '0', `rep_neg` tinyint(1) NOT NULL default '0', `rep_comment` varchar(200) NOT NULL default '', `rep_time` int(11) NOT NULL default '0', KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+++ Error: 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 'DEFAULT CHARSET=latin1' at line 10


what do i do?


i think you got an extra ; at end .. not sure though..
http://www.adminfuel.com/ - Forum for Forum Administrators
rockboyteek
Registered User
Posts: 591
Joined: Tue Mar 29, 2005 2:50 pm
Contact:

Post by rockboyteek »

Right if you could answer about my errors, so on please i also have another questions...

if i wanted to have a limit to how much reputation you can give would this work?

Find in reputation.php

Code: Select all

if ($repsum == 0)
		{
			message_die(GENERAL_ERROR, $lang['Cant_give_zero']);
		}
After Add

Code: Select all

if ($repsum > 5)
               {
               message_die(GENERAL_ERROR, $lang['Can't_give_more_than_5_reputation']);
               }
Sorry if that is totally wrong as i am new to PHP and used what i knew for that.. but most important is that error that i still get that i said about a few posts ago^^^^
http://www.adminfuel.com/ - Forum for Forum Administrators
antongranik
Registered User
Posts: 153
Joined: Tue Oct 07, 2003 5:41 pm
Location: russia/moscow
Contact:

Post by antongranik »

rockboyteek wrote: if i wanted to have a limit to how much reputation you can give would this work?

After Add

Code: Select all

if ($repsum > 5)
               {
               message_die(GENERAL_ERROR, $lang['Can't_give_more_than_5_reputation']);
               }

Yes, that's right. You could do it this way.
Still thinking about your errors. Don't know what the problems are. Everything works fine on my localhost and on my hoster... Can you tell me the version of your MySql database and php?
anton granik. graphic designer.
rockboyteek
Registered User
Posts: 591
Joined: Tue Mar 29, 2005 2:50 pm
Contact:

Post by rockboyteek »

WOW i did some PHP !!! :lol: ...

and my host supports php 4 and 5 and not sure about MySQL.. host is dreamhost...
http://www.adminfuel.com/ - Forum for Forum Administrators
rockboyteek
Registered User
Posts: 591
Joined: Tue Mar 29, 2005 2:50 pm
Contact:

Post by rockboyteek »

i tried putting the code in again and trying.. same error

Code: Select all

 
Error in posting

DEBUG MODE

UPDATE phpbb_users SET user_posts = user_posts + 1, user_reputation = user_reputation + , user_rep_last_time = 1140259130 WHERE user_id = 2

Line : 512
File : functions_post.php 
and in header

Code: Select all

Warning: Division by zero in /home/.endora/etcworld/etcworld.co.uk/etcforum/includes/functions_post.php on line 394

Warning: Cannot modify header information - headers already sent by (output started at /home/.endora/etcworld/etcworld.co.uk/etcforum/includes/functions_post.php:394) in /home/.endora/etcworld/etcworld.co.uk/etcforum/includes/page_header.php on line 644

Warning: Cannot modify header information - headers already sent by (output started at /home/.endora/etcworld/etcworld.co.uk/etcforum/includes/functions_post.php:394) in /home/.endora/etcworld/etcworld.co.uk/etcforum/includes/page_header.php on line 646

Warning: Cannot modify header information - headers already sent by (output started at /home/.endora/etcworld/etcworld.co.uk/etcforum/includes/functions_post.php:394) in /home/.endora/etcworld/etcworld.co.uk/etcforum/includes/page_header.php on line 647

http://www.adminfuel.com/ - Forum for Forum Administrators
antongranik
Registered User
Posts: 153
Joined: Tue Oct 07, 2003 5:41 pm
Location: russia/moscow
Contact:

Post by antongranik »

Insert please the code below into function_post.php right before the line:

Code: Select all

	if ($mode != 'poll_delete')
	{

Code: Select all

	echo "<br>sign = ".	$sign."<br>";
	echo "<br>sign_rep = ".	$sign_rep."<br>";
	echo "<br>last_time = ".	$last_time."<br>";
	echo "<br>forum_update_sql = ".	$forum_update_sql."<br>";
	echo "<br>topic_update_sql = ".	$topic_update_sql."<br>";
	print_r ($userdata);
	echo "<br>";
	print_r ($rep_config);
	echo "<br>";
Then try to post something and copy all the information the browser will give you in the header and give it to me here.
anton granik. graphic designer.
Locked

Return to “[2.0.x] MODs in Development”