CopperRank - The First Ranking System For Coppermine. - Page 2 CopperRank - The First Ranking System For Coppermine. - Page 2
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

CopperRank - The First Ranking System For Coppermine.

Started by just_some_guy, November 02, 2007, 09:32:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

just_some_guy

Switch debug mode on and post the proper error please.

Thanks,
Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

Halfhidden

Here it is:
While executing query "INSERT INTO cpg14x_config (name, value) VALUES ("rank1", "Newbie"), ("rank2", "Member"), ("rank_image1", "<img src=""plugins/CopperRank/images/rank1.jpg"" />"), ("rank_image2", "<img src=""plugins/CopperRank/images/rank2.jpg"" />"),("rank_image3", "<img src=""plugins/CopperRank/images/rank3.jpg"" />"), ("rank_image4", "<img src=""plugins/CopperRank/images/rank4.jpg"" />"), ("rank_image5", "<img src=""plugins/CopperRank/images/rank5.jpg"" />");" on 0

mySQL error: Duplicate entry 'rank1' for key 1

Hope this helps?

just_some_guy

Delete all the News Bulletin rows from the cpg14x_config table: rank1, rank2 etc. and rank_image1, rank_image2 .... etc., rank_value1, rank_value2 etc...

Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

Halfhidden

Yep that did the trick...Thanks for your help and speedy reply :) I really appreciate it. I got the plugin installed and yet have to edit the profile.php file, that should be ok. Sorry for the delay in answering but my ftp client maxed out on connections and the server booted me off for a short while.
I'll have a go at re installing multi anycontent and try to track down the rough line. But I'm happy to accommodate the shout box elsewhere anyway.
Again, thanks
Regards,
Steff

just_some_guy

Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

Halfhidden

Ah! I'v got a new problem with the profile.php
I got this error: Parse error: syntax error, unexpected $end in /home/picturez/public_html/profile.php on line 620

here is the last couple of lines on the config.php file

} elseif ($rank > $over) {
    echo "{$CONFIG['rank5']}";
    echo "{$CONFIG['rank_image5']}";
   
} else {
    echo "No Rank?";
}
echo '</td>';
echo '</tr>';

endtable();
echo '<div align="center">CopperRank by <a href="http://www.mysimtractor.com"> just_some_guy </a></div>';
?>


Have I pasted this wrong?
I'm having a thick week I think... I really apologise for this, but it promises to be such a good plugin for the site. I don't normally have such problems.
Regards,
Steff

just_some_guy

If you followed the instructions correctly then this error should not occur, re upload the original profile.php and try again, i cant tell what the problem is because you only posted a small section of the code. If the error still occurs i will check it out in more detail as im not sure if there has been any changes to profile.php in recent versions.
Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

Nibbler

I'd like to suggest that you change the way you are counting files here:


$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = $uid ");
$rank = mysql_num_rows($result);


to


$result = cpg_db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = $uid ");
list($rank) = mysql_fetch_row($result);


That will give you better bridge compatibility and is much more efficient.

Halfhidden

Yes I uploaded the backup copy of the file and the gallery returned to normal (as expected). I have other mods, but none have edited profile.php that I remember. The error line 620 is the last line in the profile.php file ( ?> ) I have tried a couple of times since and get the same result.
Sorry to be a pain.

Regards,
Steff

Nibbler

@Halfhidden: Attach the complete file.

@just_some_guy: Also, you should probably fix this:


if (file_exists("plugins/meta_data/langs/{$CONFIG['lang']}.php")) {
  require "plugins/meta_data/langs/{$CONFIG['lang']}.php";
} else {require "plugins/CopperRank/langs/english.php";}

Halfhidden

Here is the complete edited profile.php
Thanks for your help.

Regards,
Steff



just_some_guy

@Nibbler - Thanks for the bug reports, i have uploaded a new version.

@Halfhidden - I just installed the plugin to my cpg1418 test bed and it works as expected.

Replace the contents of profile.php with the attahed file.

Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

Halfhidden

@just_some_guy: That worked, thanks Had I done something wrong? I do have my moments and have been known to be as thick as two short planks.

@Nibbler: thanks for your help once again.

Regards,
Steff


Nibbler

You'd cut off the end of the file. The new code replaces just the endtable() but you removed everything from the endtable() to the end of the file. You need to mod the file anyway since just_some_guy's copy doesn't have the modpack stuff in that you are using.

Halfhidden

Aah!
I'm not normally that messy! Sorry guys.... I certainly don't want to increase your workload on unnecessary posts. I'll do my best to check over what I've done a couple of times before I post next time.

I really do appriciate all your help.

Regards,
Steff

MadMaxx

thanks just_some_guy, works great  :)

may i suggest you had 2 special ranks not determined by uploads, like one for the site owner/admin and one for the moderators for example.

would make it even better  ;D

banghatta

I've installed copperrank V.2. Modify profile.php. but nothing happen.
The ranking not shown at member profile. How to enable copperank plugin?

I use CPG 1.4.18 bridge with Phpbb3.
here my website:  www.bniper.net



stardust

Great plugin. I'm wondering is there a way to rank users on # of comments they have posted instead of # of images uploaded? (for galleries who don't give access for all users to upload images)

Nibbler

Just change

$result = cpg_db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = $uid ");

to

$result = cpg_db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_COMMENTS']} WHERE author_id = $uid ");

.JRauck

I got a noobie question on installing it. What do I do if I already have the same name of a file such as the init.inc?