Author |
Message |
magnagrafx
New Member


Joined: Feb 07, 2005
Posts: 5
|
Posted:
Mon Feb 07, 2005 9:17 pm |
|
I run a small website to help the guys at work. We have thousands of publications and rules that are ever changing. I have them on the website for them to download to their pda's. The problem is they are always changing so I have to update the downloads for every change. Is there anyway in phpnuke 7.5 that I can upload over the old one and the "new" image show up once it's updated instead of deleting it and then adding it again? |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Feb 07, 2005 10:19 pm |
|
Could you explain a little more, maybe by providing an example? I think I'm tracking but I'm not sure. |
|
|
|
 |
magnagrafx

|
Posted:
Wed Feb 09, 2005 8:12 pm |
|
Well we have a lot of rules in different publications at work that we are all required to keep with us. Problem is, they are always editing them and changing them. A friend and I maintain a website that allows them to download them in a .pdb file format for their pda's. The problem is, when we need to change a certain download, it doesn't show as "new" or "updated" when you look at the downloads section. What we have been doing is deleting the download itself, then reposting it so the "new" icon shows next to it. Then everyone knows there's an updated version of that particular file. Can this be simplified by just uploading over the old file with the updated version and some sort of "new" or "updated" icon pop up to let them know when they visit if there's anything changed? |
|
|
|
 |
PHrEEkie
Subject Matter Expert

Joined: Feb 23, 2004
Posts: 358
|
Posted:
Wed Feb 09, 2005 10:34 pm |
|
hopefully this might save you enough headache for a donation for the Raven master...??
For 7.5, the file to edit is:
/modules/Downloads/admin/index.php
For previous versions to 7.5:
/admin/modules/downloads.php
FIND (in function DownloadsModDownloadS)
Code:$db->sql_query("update " . $prefix . "_downloads_downloads set cid='$cat[0]', sid='$cat[1]', title='$title', url='$url', description='$description', name='$name', email='$email', hits='$hits', filesize='$filesize', version='$version', homepage='$homepage' where lid='$lid'");
|
REPLACE WITH
Code:$db->sql_query("update " . $prefix . "_downloads_downloads set cid='$cat[0]', sid='$cat[1]', title='$title', url='$url', description='$description', date=now(), name='$name', email='$email', hits='$hits', filesize='$filesize', version='$version', homepage='$homepage' where lid='$lid'");
|
All we're doing here is adding a new date insertion when a download is modified in any way by an Admin. What you would do is, upload the new file to the filesystem (it can have the same name as before). Get the ID of the file (hover over it as if you are going to download it and look for the ID#). Go into Downloads Administration, scroll down to Modify a Download, add the ID # and click Modify. On the next page, click Modify again (if the filename hasn't changed, that is... if anything about the file has changed, name, version, whatever, go ahead and fix it up). After modifying in this way (whether changes were made or not), it will be flagged with today's date/time and therefore be flagged as NEW by the system.
PHrEEk |
|
|
|
 |
magnagrafx

|
Posted:
Thu Feb 10, 2005 2:42 am |
|
That seems to be working. Thanks a lot for the help! |
|
|
|
 |
PHrEEkie

|
Posted:
Thu Feb 10, 2005 1:20 pm |
|
You're quite welcome... donation noted, and appreciated! Let us know if we can be of help in the future...
PHrEEk |
|
|
|
 |
TheosEleos
Life Cycles Becoming CPU Cycles

Joined: Sep 18, 2003
Posts: 960
Location: Missouri
|
Posted:
Mon Feb 14, 2005 8:47 am |
|
Go PHrEEKie! |
_________________ Only registered users can see links on this board! Get registered or login! |
|
 |
 |
|