Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: top uploaders commenters  (Read 30438 times)

0 Members and 1 Guest are viewing this topic.

Justttt

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 170
    • Trippy-ILLusion.Co.Uk
top uploaders commenters
« on: June 22, 2006, 12:58:33 pm »

in the attached zip file is top files top50.php / anycontent.php

the top50.php has the top 50 uploaders, posters, viewers
the anycontent has the top 5 posters, uploaders < and dose not show admin's

the number of top users to be shown can easly be changed

/code from nibbler 1.3 :)
« Last Edit: June 22, 2006, 03:25:19 pm by Paver »
Logged
J U S T T T T

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: top uploaders commenters
« Reply #1 on: June 22, 2006, 05:58:04 pm »

I understand from your post that it doesn't show admin uploads but is there a way of showing theirs also. ;D
Logged

Justttt

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 170
    • Trippy-ILLusion.Co.Uk
Re: top uploaders commenters
« Reply #2 on: June 25, 2006, 02:30:14 pm »

edit the anycontent to
Code: [Select]
<?php


echo '<table width="100%"><tr><td width="50%">';
starttable("100%""Top posters",2);

$result cpg_db_query("SELECT user_name, user_id, group_name, COUNT(*) AS numcom FROM {$CONFIG['TABLE_COMMENTS']}{$CONFIG['TABLE_USERS']}{$CONFIG['TABLE_USERGROUPS']} WHERE user_id = author_id AND user_group = group_id GROUP BY author_id ORDER BY numcom DESC LIMIT 5");

$i 1;
while (
$row mysql_fetch_assoc($result)){
echo "<tr><td class=\"tableb\" >" $i++ . ") <a href=\"profile.php?uid={$row['user_id']}\">{$row['user_name']}</a> - {$row['group_name']}</td><td class=\"tableb\"><a href=\"thumbnails.php?album=lastcomby&uid={$row['user_id']}\">{$row['numcom']} comments</a></td></tr>";
}

endtable();
echo 
'</td><td width="50%">';

starttable("100%""Top uploaders",2);

$result cpg_db_query("SELECT user_name, user_id, group_name, COUNT(*) AS numpics FROM {$CONFIG['TABLE_PICTURES']}{$CONFIG['TABLE_USERS']}{$CONFIG['TABLE_USERGROUPS']} WHERE user_id = owner_id AND user_group = group_id GROUP BY owner_id ORDER BY numpics DESC LIMIT 5");

$i 1;
while (
$row mysql_fetch_assoc($result)){
echo "<tr><td class=\"tableb\" >" $i++ . ") <a href=\"profile.php?uid={$row['user_id']}\">{$row['user_name']} - {$row['group_name']}</a></td><td class=\"tableb\"><a href=\"thumbnails.php?album=lastupby&uid={$row['user_id']}\">{$row['numpics']} uploads</a></td></tr>";
}

endtable();
echo 
'</td></tr>';
endtable();
?>

:)
Logged
J U S T T T T

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: top uploaders commenters
« Reply #3 on: June 26, 2006, 04:06:08 pm »

Cheers bro ;D
Logged

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: top uploaders commenters
« Reply #4 on: August 11, 2006, 03:30:19 pm »

Is there anyway of making this into a seperate page so it can be viewed like Most Viewed for example.

Thanks  ;D
Logged

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: top uploaders commenters
« Reply #5 on: August 25, 2006, 12:17:08 am »

Anybody ???
Logged

Nibbler

  • Guest
Re: top uploaders commenters
« Reply #6 on: August 25, 2006, 12:25:38 am »

Yes, copy/paste it into a skeleton page.

Code: [Select]
<?php

define
('IN_COPPERMINE'true);
require(
'include/init.inc.php')
pageheader('Whatever');

/*mod code here */

pagefooter();
Logged

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: top uploaders commenters
« Reply #7 on: March 20, 2007, 08:24:58 pm »

1 more thing please, is there a way of taking out the usergroups by just showing the usernames ;D
Logged

MarkP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: top uploaders commenters
« Reply #8 on: April 23, 2007, 05:22:51 pm »

I know this is old and I have been trying to get it to work but it only shows one person "me!"  ;D
Logged

Nibbler

  • Guest
Re: top uploaders commenters
« Reply #9 on: April 23, 2007, 05:29:31 pm »

Not designed for a bridged gallery.
Logged

iorkara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
  • Be Nice.
    • High Resolution Wallpapers
Re: top uploaders commenters
« Reply #10 on: September 20, 2008, 06:46:44 pm »

How can I get this to show on my Index? Like just underneath my Menu Buttons?
Logged

Nibbler

  • Guest
Re: top uploaders commenters
« Reply #11 on: September 20, 2008, 08:54:04 pm »

Add the code provided to your content.php and then set anycontent to be at the top in config.
Logged

iorkara

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
  • Be Nice.
    • High Resolution Wallpapers
Re: top uploaders commenters
« Reply #12 on: September 21, 2008, 06:08:04 am »

Hi Nibbler.
Thanks for your quick reply.
However I'm abit of a noob when it comes to this, sorry. I'm still learning.

So the code that is provided, I copy paste it into content.php (but i dont have one called content.php)

Then set anycontent to be at the top in config. How would i go about that?

Thank you.
Logged

Nibbler

  • Guest
Re: top uploaders commenters
« Reply #13 on: September 21, 2008, 05:20:43 pm »

That's a typo, I meant anycontent.php. See config setting 'The content of the main page' and add 'anycontent' at the start of the list.
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.