forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: just_some_guy on November 02, 2007, 09:32:32 pm

Title: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on November 02, 2007, 09:32:32 pm
CopperRank
CPG 1.4x
DEMO (http://www.mysimtractor.com)

This plugin will create fully customizable ranks for your gallery, all ranks are based on the number of uploads made by the user. The rank name, value (number uploads required to achieve the rank) and the rank images can all be changed through the plugin config page.

The default ranks are -


The default images are blue squares; 1 for 1st rank, 2 for 2nd rank, etc.

Everything is customizable and doesn't need to be changed if you would like to keep the default settings.

Installation -


Languages


CHANGELOG

See the attachments for a demo picture.

Thanks to Sami and Frantz for the help!

Hope this proves useful,

just_some_guy

Could a Dev Team Member please move this to the plugins section.

Thanks,
[/list]
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on November 03, 2007, 07:12:04 pm
Thanks GauGau.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Farnsi on November 04, 2007, 02:13:52 pm
Nice Plugin, thank you!
Enclosed you'll find the german translation.  :)
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on November 04, 2007, 03:00:43 pm
Thanks, but I think you forgot to attach the file.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Farnsi on November 04, 2007, 03:40:41 pm
ups..  ;D
here you are..
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on November 04, 2007, 04:43:01 pm
Thanks Farnsi, i added it to the first post.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Hein Traag on November 04, 2007, 05:03:01 pm
Nice work , dutch translation wil be posted asap, but do not forget to upgrade your site to 1.4.13  ;)
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on November 04, 2007, 05:13:04 pm
It is upgraded, i used the manual method. :-\ I know its not the best thing but my cpg is highly modded.

Thanks,
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Hein Traag on November 04, 2007, 05:15:20 pm
Dutch language as promised. Looks very nice for sites who's members can upload new art work for example.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on November 04, 2007, 05:38:20 pm
Thanks Hein, i added it to the first post. Yeah, my CPG is a big community where users can upload their files etc. so i thought a ranking system would be a nice feature.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Davide Renda on November 04, 2007, 08:16:33 pm
Interesting plugin. As a matter of curiosity, may this ranking system interfere with other systems for bridged galleries?

PS. attached to this post italian translation; shortly I will announce this plugin in the italian board too.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on November 04, 2007, 08:32:36 pm
Thanks Lontano, I will add that to the fist post.

About the bridged gallery. My gallery is bridged, but not using the coppermine bridging mode. So im not sure what the bridged coppermine enviroment is like. I would assume that the uploaded files would still be inputed into the pictures table, as this plugin counts the number of rows in the pictures table that belong to the user it is calculating the rank for. By other systems do you mean the forum ranks depending on the number of posts?

To be honest im not really sure. Maybe someone who is familiar with bridging system could clarify this.

Thanks,
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: ksawery on May 02, 2008, 11:07:56 am
I have translated the plug-in into Spanish, but I've noted that's necessary change another parts of the code for a complete translation (I'm sorry. My English is not very good).
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 18, 2008, 09:31:03 pm
I get an error message when I install this plugin.
Fatal error: Cannot redeclare todaysdate() (previously declared in /home/my_domain/public_html/anycontent3.php:45) in /home/my_domain/public_html/anycontent3.php on line 43.
I've removed the multiple anycontent and the error continued.
any ideas would be appreciated.
Regards,
Steff
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on May 19, 2008, 01:01:12 pm
I think this plugin is clashing with whatever you have in your anycontent3.php, not the anycontent plugin itself. Besides, there is no function created or used in this plugin called "todaysdate()".

@ksawery - Gracias por tu contribución, agregaré al me primero post. Hablo español y olvide este traducción. :D.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 19, 2008, 08:57:03 pm
I removed anycontent 2 and 3 from the config panel and commited the changes. I then removed both files from the server temporarily and then tried to install the plugin once more. I then had this error in Coppermine:
 
Critical error

There was an error while processing a database query.
Sorry to be a pain.
Regards,
Steff
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on May 19, 2008, 09:14:59 pm
Delete the news table from the database, then install. Then, add the anycontent plugin. What did you have in the anycontent?
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 19, 2008, 09:25:57 pm
In one was a shout box (anycontent3) and the other dynamic Html adverts>
Hope this helps.
Regards,
Steff
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on May 19, 2008, 09:30:59 pm
Ok, did you reinstall this plugin? if so, what was the result? Have a search in the anycontents for a function called "todaydate" as that is most likely where the error is coming from and make sure you are not include a file twice (example - include a file in custom footer and then again in anycontent).
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 19, 2008, 09:43:08 pm
Ok. looked for the table news in sql but it wasn't in the database. I uninstalled extra anycontent plugin through the pluin manager and removed the extra anycontent files from the server. Tried the plugin again and got There was an error while processing a database query.
I have only have two other plugins: CPG MiniCMS v1.6 and Contact Us Mail Form v1.1

Regards,
Steff
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on May 19, 2008, 09:45:02 pm
Switch debug mode on and post the proper error please.

Thanks,
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 19, 2008, 09:50:49 pm
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?
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on May 19, 2008, 09:54:18 pm
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...

Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 19, 2008, 10:26:50 pm
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
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on May 19, 2008, 10:33:24 pm
Glad to hear its fixed, sorry about that.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 19, 2008, 10:48:22 pm
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
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on May 19, 2008, 10:53:20 pm
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.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Nibbler on May 19, 2008, 10:57:07 pm
I'd like to suggest that you change the way you are counting files here:

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

to

Code: [Select]
$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.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 19, 2008, 11:02:07 pm
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
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Nibbler on May 19, 2008, 11:07:16 pm
@Halfhidden: Attach the complete file.

@just_some_guy: Also, you should probably fix this:

Code: [Select]
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";}
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 19, 2008, 11:14:10 pm
Here is the complete edited profile.php
Thanks for your help.

Regards,
Steff


Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: just_some_guy on May 19, 2008, 11:14:43 pm
@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.

Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 19, 2008, 11:21:01 pm
@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

Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Nibbler on May 19, 2008, 11:30:44 pm
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.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Halfhidden on May 19, 2008, 11:36:24 pm
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
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: MadMaxx on July 08, 2008, 03:00:19 am
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
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: banghatta on July 19, 2008, 10:51:35 am
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


Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: stardust on July 20, 2008, 06:49:33 am
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)
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Nibbler on July 20, 2008, 02:06:48 pm
Just change

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

Code: [Select]
$result = cpg_db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_COMMENTS']} WHERE author_id = $uid ");
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: .JRauck on August 28, 2008, 07:37:04 am
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?
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Farnsi on August 28, 2008, 08:46:13 am
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#plugin
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: .JRauck on August 28, 2008, 09:27:32 am
Oh well, I was trying to do it manually since my first plugin I have ever installed I had to do it manually. Nevermind my question.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: stardust on August 31, 2008, 06:37:38 pm
I have two questions:

1. How do we add a default "No Rank"? I've got the image but I don't know how to code it.

2. Is there a way we can add more than five ranks?

Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: cadillac807 on April 01, 2009, 05:20:07 pm
Thanks GauGau.


WOW sorry I am not sure if I am doing this right I am a noob but great plugin it rocks
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: jimi007 on September 09, 2009, 09:11:05 am
@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.



i am new user towards coppermine and recently install this useful plugin but its not working for me as i do all in instruction file and also replace this profile.php with mine but ranking not appear to profiles plz any one help to solve my probelm thnkx in advance.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: jimi007 on September 09, 2009, 09:17:16 am
i am new user towards coppermine and recently install this useful plugin but its not working for me as i do all in instruction file and also replace this profile.php with mine but ranking not appear to profiles plz any one help to solve my probelm thnkx in advance.

thnkx god its work but now pictures rank1.jpg rank2.jpg ......    are not shown next to rank plz help
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Joachim Müller on September 10, 2009, 10:37:52 am
Learn to respect board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616) first.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Vinicius Machado on January 06, 2010, 11:05:30 pm
Hi, my english is not so goog. So I will try to be as clear as possible.

I've instaled the plugin Copper Rank. Everything is fine, but the images fom Rank are not appearing, they are broken. Even setting the path in quotes and at the standard location they are still broken.
Please take a look at:

www.viniciusmachado.com/crisevini/album

Best regards,

Vinicius Machado
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Joachim Müller on January 07, 2010, 09:03:45 am
Post a deep link and a non-admin test user account if that is needed to access individual files on your gallery.
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Vinicius Machado on January 07, 2010, 11:39:07 am
Post a deep link and a non-admin test user account if that is needed to access individual files on your gallery.

Sorry, what is a deep link. The link that I've posted Isn't it enough? (;my english is not good)

User: tester
Password: tester123
Title: Re: CopperRank - The First Ranking System For Coppermine.
Post by: Joachim Müller on January 07, 2010, 05:02:36 pm
Sorry, what is a deep link.
http://en.wikipedia.org/wiki/Deep_link  ::) Turn debug mode off. Turn notices display off. Then post a deep link to a page where the images should show up on but don't.

As far as I can see, the rank should show on the profile page (e.g. http://www.viniciusmachado.com/crisevini/album/profile.php?uid=1) - that's at least where I have found a broken image - the page is looking for http://www.viniciusmachado.com/crisevini/album/%22plugins/CopperRank/images/rank5.jpg%22, where the %ss translates to double quotes, so I guess you have put something in double quotes on the config panel of that plugin that you shouldn't have put into those quotes. Attach a screenshot of the plugin's config panel if my reply doesn't solve your issue.
Title: Re: CopperRank - The First Ranking System For Coppermine. (Solved)
Post by: Vinicius Machado on January 07, 2010, 05:21:00 pm
so I guess you have put something in double quotes on the config panel of that plugin that you shouldn't have put into those quotes. Attach a screenshot of the plugin's config panel if my reply doesn't solve your issue.

Thanks GauGau, it solves my issue, you were right. It was the double quotes. And once again, sorry about being bother, but its difficult, cause Im newbie in PHP and in English as well, so I have to understando a lot of technical stufs on a language that is not my natural one...

Best Regards,

Vinicius Machado