| Author |
Message |
st247 New Member


Joined: Apr 19, 2006 Posts: 19
|
Posted:
Fri Apr 13, 2007 9:54 am |
|
I would like to have an overview of the downloaded files.
I adjusted the NSNGD_Advanced to contain the latest 10 downloads together with username and that works fine. I created a table which contains userid, downloadid and date.
I wanted to adjust the admin page to have an overview of all downloaded files together with username and date.
I adjusted includes/nsngd.func and modules/Downloads/admin/index.php.
To make sure I didn't make any mistakes I just copied lines that were present.
In nsngd.fun I replaced
| Code: | echo "<td align='center' width='25%'> </td>\n";
echo "<td align='center' width='25%'> </td>\n";
echo "<td align='center' width='25%'> </td>\n";
echo "<td align='center' width='25%'><a href='".$admin_file.".php?op=DownloadNew'>"._WAITINGDOWNLOADS."</a> ($newdownloads)</td>\n"; |
with
| Code: | echo "<td align='center' width='25%'><a href='".$admin_file.".php?op=DownloadOverview'>"._DOWNLOADED."</a></td>\n";
echo "<td align='center' width='25%'> </td>\n";
echo "<td align='center' width='25%'> </td>\n";
echo "<td align='center' width='25%'><a href='".$admin_file.".php?op=DownloadNew'>"._WAITINGDOWNLOADS."</a> ($newdownloads)</td>\n";
|
And in index.php I added the line
| Code: | | case "DownloadOverview":@include("modules/$module_name/admin/Downloads.php");break; |
So it refers to an existing page that works fine. I did it this way to make sure this part was working and there wouldn't be any errors in a newly created page.
When I go to my Downloads Administration I see the 'Overview downloaded files' link. When I click on it I just get a blank page.
In config.php I set $display_errors to true, but I don't see an error.
Anyone has any idea what might be the problem ? |
|
|
|
 |
kguske Site Admin

Joined: Jun 04, 2004 Posts: 5710
|
Posted:
Fri Apr 13, 2007 4:09 pm |
|
Sounds like a parsing problem - or, the code in admin/Downloads.php doesn't know what to do with the DownloadOverview op value... |
|
|
|
 |
st247 New Member


Joined: Apr 19, 2006 Posts: 19
|
Posted:
Sat Apr 14, 2007 1:18 pm |
|
Is there anything else I should change so that I can get an error ?
Does it need changing in downloads.php too ? I thought that one only listed all the available downloads ? |
|
|
|
 |
kguske Site Admin

Joined: Jun 04, 2004 Posts: 5710
|
Posted:
Sat Apr 14, 2007 3:11 pm |
|
I'd guess it's not a parsing problem. You probably should add code in admin/Downloads.php so it knows what to do when you click the overview link. |
|
|
|
 |
st247 New Member


Joined: Apr 19, 2006 Posts: 19
|
Posted:
Sun Apr 15, 2007 12:43 pm |
|
I found the problem. What I changed was correct, but there was also a reference in case.php. So I just added 1 line there and it works fine now.
I now have an overview of downloaded files, with username and date.
Only 'problem' I still have right now is, that I don't know which language file it uses.
I added _DOWNLOADED and _USER to both Downloads/language/lang-english.php as Downloads/admin/language/lang-english.php. I thought it would be the one under the admin directory, as this is an adminpage. It doesn't work, while it does work in the menu on top (called from includes/nsngd.php).
Any idea where I should put it or what I have to change in my DownloadsOverview.php ? |
|
|
|
 |
pureliving Worker


Joined: Dec 01, 2008 Posts: 161
|
Posted:
Sat Feb 14, 2009 6:02 pm |
|
Is there any chance you can post a more detailed guide, as the ability to have a overview of downloads sounds brilliant.
I'm using nsn gr downloads.
xx Bless xx |
|
|
|
 |
|
|
|
|