1
hipoonios
Make a top submitters list for TDMDownloads
  • 2012/12/19 20:11

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


I think I will never get help with this, but posting it anyway

I'm using TDMDownloads for my new site and would like to have a simple top submitters page.

I can create the page myself. All I need help with is the sql syntax.

I would like to fetch the usernames and number of downloads they have submitted in a table.


Username 10
Username 8
Username 6

etc...

and limit the output to 10 users.

Shouldn't be that hard for someone who knows.

2
Mamba
Re: Make a top submitters list for TDMDownloads
  • 2012/12/19 21:07

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Since Mage is working heavily on Core 2.6.0, I don't think, he will have time to make these additions. But he might add it to the XOOPS 2.6.0 version of TDMDownloads.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
hipoonios
Re: Make a top submitters list for TDMDownloads
  • 2012/12/20 5:09

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


I see now that I should have been posting this in the module hacks section of the forum.

All i need is two-three lines of code

4
zyspec
Re: Make a top submitters list for TDMDownloads
  • 2012/12/20 18:03

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Are you trying to add this as a block or as a new page? If you'll post the code you have I can try and help you see if we can get it working together...

5
hipoonios
Re: Make a top submitters list for TDMDownloads
  • 2012/12/21 8:38

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Thanks for replying.

I want it on a page.

I'm using this code to include pages on my site:

<?php
if (file_exists("mainfile.php")) {
    include(
"mainfile.php");
}
elseif(
file_exists("../mainfile.php")) {
    include(
"../mainfile.php");
}
else {
    include(
"../../mainfile.php");
}
include(
XOOPS_ROOT_PATH "/header.php");
$xoopsTpl->assign('xoops_showrblock'1); // 1 display right blocks
$xoopsTpl->assign('xoops_showlblock'1); // 1 display right blocks 
$xoopsTpl->assign('xoops_pagetitle'"Contributors");
?>

MY CODE HERE

<?php
include(XOOPS_ROOT_PATH "/footer.php");
?>

I have figured that I need to get the userid's from the tdmdownloads_downloads table and submitter field. And count them somehow.

I'm trying to this FAQ. But no luck.

https://xoops.org/modules/smartfaq/faq.php?faqid=192

6
zyspec
Re: Make a top submitters list for TDMDownloads
  • 2012/12/21 18:59

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Can you tell me what version of XOOPS, PHP, MySQL and TDMDownloads you're using so I can make sure we use supported features?

7
hipoonios
Re: Make a top submitters list for TDMDownloads
  • 2012/12/21 20:21

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Sure

Xoops version 2.5.5
TDMDownloads 1.62
Php version 5.2.6
MySQL version 5.0.51

Login

Who's Online

190 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 190


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits