[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.
theleetbeagle
Registered User
Posts: 104
Joined: Mon May 17, 2004 5:47 pm
Location: Ohio
Contact:

Re: [RC3] Users Reputation System Mod

Post by theleetbeagle »

You may not be using prefixes in your DB. like phpbb_tablename where phpbb_ is the prefix... I don't have them either, so certain mods I need to edit out all the prefixes to make it work properly...
jabilator
Registered User
Posts: 12
Joined: Tue Oct 23, 2007 9:27 am

Users Reputation System Mod

Post by jabilator »

It doesn't works for me. I have the same error.

Thanks for your answer

regards
User avatar
Elitzur
I've Been Banned!
Posts: 323
Joined: Sat Sep 15, 2007 7:49 am
Location: Europe, UK.
Contact:

Re: [RC3] Users Reputation System Mod

Post by Elitzur »

HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Here is the problem: -

I need to run 2 files to setup the database, but they don't run
so is there any help please!?

Thanks,
Dan
User avatar
Elitzur
I've Been Banned!
Posts: 323
Joined: Sat Sep 15, 2007 7:49 am
Location: Europe, UK.
Contact:

Re: [RC3] Users Reputation System Mod

Post by Elitzur »

Code: Select all

# 
# STEP 3/3:  updating the database
# 
run:
	reputation_mod_install_db_v100.php
	reputation_mod_install_users_v100.php
the bottom 2 files have to be executed for it to work...
Mr.Victor
Registered User
Posts: 91
Joined: Tue Oct 23, 2007 8:17 pm

Re: [RC3] Users Reputation System Mod

Post by Mr.Victor »

Hi everyone,

I was looking for a reputation system and I stumbled upon this thread. It seemed like a great mod so I installed it on my board. The instructions were very straight forward, and everything went smoothly. I ran the last two files with no errors. So I thought I was golden, but I wasn't. When I logged into the admin panel, the long vertical pane to the left was all white with an error code at the top saying:

Parse error: syntax error, unexpected '"' in /home/u3/mwpl/html/phpbb/admin/admin_users.php on line 908

Anyone else have this problem? I know a tiny bit about code so I tried to find the error in the code but couldn't see it. Can anyone either send me a working admin_users.php file or help me fix the code in the one I have. I have a phpbb 2.0.22 board. Thanks in advance.

PS-what do the modifications to this file do? just curious because I replaced the modified one with the original one that I backed up and the menu pane on the left was displaying fine.
User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy
Contact:

Re: [RC3] Users Reputation System Mod

Post by dellsystem »

Mr.Victor wrote:Parse error: syntax error, unexpected '"' in /home/u3/mwpl/html/phpbb/admin/admin_users.php on line 908
You've already replaced the file with a backup, so just redo the edits to that file as instructed by the instructions. Make sure you read carefully :) If the same error appears after re-editing, you can post lines 900-915 here, between tags please :)
Former moderator and website team member | My MODs, and more (GitHub)
Mr.Victor
Registered User
Posts: 91
Joined: Tue Oct 23, 2007 8:17 pm

Re: [RC3] Users Reputation System Mod

Post by Mr.Victor »

I tried re-editing the original file a few more times with the same error everytime. Here is line 903-915:

Code: Select all

			$coppa = ( ( !$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa'] ) || $mode == "register") ? 0 : TRUE;

			$s_hidden_fields = '<input type="hidden" name="mode" value="edit" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
			$s_hidden_fields .= '<input type="hidden" name="id" value="' . $user_id . '" />';

			$s_hidden_fields .= '<input type="hidden" name="username" value="' . str_replace("\"", """, $username) . '" />';
			$s_hidden_fields .= '<input type="hidden" name="email" value="' . str_replace("\"", """, $email) . '" />';
			$s_hidden_fields .= '<input type="hidden" name="reputation" value="' . str_replace("\"", """, $reputation) . '" />';
			$s_hidden_fields .= '<input type="hidden" name="icq" value="' . str_replace("\"", """, $icq) . '" />';
			$s_hidden_fields .= '<input type="hidden" name="aim" value="' . str_replace("\"", """, $aim) . '" />';
			$s_hidden_fields .= '<input type="hidden" name="msn" value="' . str_replace("\"", """, $msn) . '" />';
			$s_hidden_fields .= '<input type="hidden" name="yim" value="' . str_replace("\"", """, $yim) . '" />';
			$s_hidden_fields .= '<input type="hidden" name="website" value="' . str_replace("\"", """, $website) . '" />';
Thanks for the quick reply and help in this matter! :D
User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy
Contact:

Re: [RC3] Users Reputation System Mod

Post by dellsystem »

ElitZuR wrote:HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Here is the problem: -

I need to run 2 files to setup the database, but they don't run
so is there any help please!?

Thanks,
Dan
What exactly do you mean when you say they don't run? You first have to upload them to your forum's root folder, ex phpbb/ or forum/, and then browse to that file using your web browser. Then follow the instructions on the screen.
Mr.Victor wrote:I tried re-editing the original file a few more times with the same error everytime. Here is line 903-915:
What happens if you replace

Code: Select all

         $s_hidden_fields .= '<input type="hidden" name="reputation" value="' . str_replace("\"", """, $reputation) . '" />';
with

Code: Select all

$s_hidden_fields .= '<input type="hidden" name="reputation" value="' . str_replace("\"", """, $reputation) . '" />';
?
Perhaps it already says that, but I couldn't find any real errors in your file, so just try replacing it with a backup and redoing the edits. Good luck :)
Former moderator and website team member | My MODs, and more (GitHub)
Mr.Victor
Registered User
Posts: 91
Joined: Tue Oct 23, 2007 8:17 pm

Re: [RC3] Users Reputation System Mod

Post by Mr.Victor »

I replace the line with your new code and it gave me the same error but on line 907. What exactly do the edits to this file do? Because when I use the original file it seems like it is working but I may be missing a few features...I have graphics version off, I see reputation, +-, but no votes line. Can you (or anyone) send me a copy of a working modified version of this admin_users.php file?

Thanks.
Mr.Victor
Registered User
Posts: 91
Joined: Tue Oct 23, 2007 8:17 pm

Re: [RC3] Users Reputation System Mod

Post by Mr.Victor »

Thank you very much dellsystem!!!!!!!!! The admin_users.php file you directed me to download worked perfectly! Everything is great now! Once again, thanks for you time and efforts! +rep :D
Mr.Victor
Registered User
Posts: 91
Joined: Tue Oct 23, 2007 8:17 pm

Re: [RC3] Users Reputation System Mod

Post by Mr.Victor »

Also, would there be a way to show the stars AND the Reputation at the same time? (graphic and non-graphic version together) I know if you mouse-over the stars it shows the Reputation number but it would be nice if it was always showing.
shannonnc
Registered User
Posts: 7
Joined: Fri Nov 09, 2007 2:40 am

Re: [RC3] Users Reputation System Mod

Post by shannonnc »

I have run the easymod version of the rep system and it puts two things in my easymod to run..

MOD Author Description EMC
Users Reputation System Mod Add On - Most Reputated User
0.0.1
Most Reputated User on Index.txt
Armando Lopez (Infamy)
< truth@hhmatic.com >
This mod will add the most reputated user to index. No
Preview:
Users Reputations System v.0.0.2
0.0.2
install_reputation_system_v002.txt
antongranik
http://granik.com
Allows users to give reputation points to each others, earn it by posts and by "living" on forum, see the history of givings. Admin can edit users' reputations in admin cp. The whole system can be a text or a graphic version (5 different medals) and simple or advanced version (with choosing of how much reputation to give). No
Preview:

But when I run them I get errors...

Error with the first one...

Critical Error

Function Trace: open_files[5]->modio_open[1]

Could not open [language/lang_*/lang_main.php] for reading.
MOD script line #67 :: FAQ :: Report


Error with the 2nd one...

Critical Error

FIND FAILED: In file [viewtopic.php] could not find:

//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid

MOD script line #185 :: FAQ :: Report

Did I miss something? I am pretty clueless with coding but I thought I was just suppose to upload them then let easymod run? Advice please
User avatar
Xclavo
Registered User
Posts: 185
Joined: Thu Sep 20, 2007 1:54 am

Re: [RC3] Users Reputation System Mod

Post by Xclavo »

The edits are very easy. thats the thing with easy mod.

lang_main.php is the easiest ;)

use something like note pad ++ it helps you find the lines row by row and help you search the 'key words' which is very helpful
http://notepad-plus.sourceforge.net/uk/site.htm
shannonnc
Registered User
Posts: 7
Joined: Fri Nov 09, 2007 2:40 am

Re: [RC3] Users Reputation System Mod

Post by shannonnc »

Xclavo wrote:The edits are very easy. thats the thing with easy mod.

lang_main.php is the easiest ;)

use something like note pad ++ it helps you find the lines row by row and help you search the 'key words' which is very helpful
http://notepad-plus.sourceforge.net/uk/site.htm
Thanks for responding except you didn't tell me how to fix it. Can you point me to specific threads or posts that will tell me what to do??
User avatar
Xclavo
Registered User
Posts: 185
Joined: Thu Sep 20, 2007 1:54 am

Re: [RC3] Users Reputation System Mod

Post by Xclavo »

Well it's not broken... its just saying that it can not find that spesific part of the file... so it will not continue with the edits... so you may have to do it manually... which I recommended to you in the first place, because that way you become familiar with this stuff. MODs in the BETA threads are usually never easyMOD compatible anyway.

language/english/lang_main.php is where you have to insert the language stuff



see watch

#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Reputation mod v.1.0.0
$lang['Reputation'] = 'Reputation';
$lang['No_votes'] = 'No votes';
$lang['Votes'] = 'votes';
#




easy :P



#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]--------------------------------------
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'reputation_common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_reputation.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
else
{
$l_edited_by = '';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
// START ADD Reputation Mod v.1.0.0
$reputation = '';
if ($postrow[$i]['user_id'] != ANONYMOUS)
{
if ($rep_config['rep_disable'] == 0)
{
if ($postrow[$i]['user_reputation'] == 0)
{
$reputation = $lang['Zero_reputation'];
} else
{
if ($rep_config['graphic_version'] == 0)
{
// Text version
$reputation = $lang['Reputation'] . ": ";
if ($postrow[$i]['user_reputation'] > 0)
{
$reputation .= "<strong><font color=\"green\">" . round($postrow[$i]['user_reputation'],1) . "</font></strong>";
} else {
$reputation .= "<strong><font color=\"red\">" . round($postrow[$i]['user_reputation'],1) . "</font></strong>";
}
$reputation_add = '';
} else {
// Graphic version
get_reputation_medals($postrow[$i]['user_reputation']);
}
}
$reputation .= " <a href=\"" . append_sid("reputation.$phpEx?a=add&" . POST_USERS_URL . "=" . $postrow[$i]['user_id']) . "&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&c=" . substr(md5($bbcode_uid),0,8) . "\" target=\"_blank\" onClick=\"popupWin = window.open(this.href, '" . $lang['Reputation'] . "', 'location,width=700,height=400,top=0,scrollbars=yes'); popupWin.focus(); return false;\"><img src=\"images/reputation_add_plus.gif\" alt=\"\" border=\"0\"><img src=\"images/reputation_add_minus.gif\" alt=\"\" border=\"0\"></a>";
$sql = "SELECT COUNT(user_id) AS count_reps
FROM " . REPUTATION_TABLE . " AS r
WHERE r.user_id = " . $postrow[$i]['user_id'] . "
GROUP BY user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain reputation stats for this user", '', __LINE__, __FILE__, $sql);
}
$row_rep = $db->sql_fetchrow($result);
if ($row_rep)
{
$reputation .= "<br /><a href=\"" . append_sid("reputation.$phpEx?a=stats&" . POST_USERS_URL . "=" . $postrow[$i]['user_id']) . "\" target=\"_blank\" onClick=\"popupWin = window.open(this.href, '" . $lang['Reputation'] . "', 'location,width=700,height=400,top=0,scrollbars=yes'); popupWin.focus(); return false;\">" . $lang['Votes'] . "</a>: " . $row_rep['count_reps'];
}
}
}
// END ADD Reputation Mod v.1.0.0
#
#-----[ FIND ]------------------------------------------
#
//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
#
#-----[ INLINE, ADD AFTER]------------------------------------------
#
, u.user_reputation
#
#-----[ FIND ]------------------------------------------
#
'POSTER_FROM' => $poster_from,
#
#-----[ AFTER, ADD ]------------------------------------------
#
// START ADD Reputation Mod v.1.0.0
'REPUTATION_ADD' => $reputation_add,
'REPUTATION' => $reputation,
// END ADD Reputation Mod v.1.0.0



What easy mod can't find! I recommnded a text editor because it helps you find spesific parts of a file.. making life a lot more easier on us.

By the way, this MOD is abandond... hopefully you get it fixed before a moderator decides to lock it.
Locked

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