Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.5
Author Message
magnagrafx
New Member
New Member



Joined: Feb 07, 2005
Posts: 5

PostPosted: Mon Feb 07, 2005 9:17 pm Reply with quote

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?
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Feb 07, 2005 10:19 pm Reply with quote

Could you explain a little more, maybe by providing an example? I think I'm tracking but I'm not sure.
 
View user's profile Send private message
magnagrafx







PostPosted: Wed Feb 09, 2005 8:12 pm Reply with quote

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

PostPosted: Wed Feb 09, 2005 10:34 pm Reply with quote

hopefully this might save you enough headache for a donation for the Raven master...?? Wink

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
 
View user's profile Send private message
magnagrafx







PostPosted: Thu Feb 10, 2005 2:42 am Reply with quote

That seems to be working. Thanks a lot for the help!
 
PHrEEkie







PostPosted: Thu Feb 10, 2005 1:20 pm Reply with quote

You're quite welcome... donation noted, and appreciated! Let us know if we can be of help in the future... Smile

PHrEEk
 
TheosEleos
Life Cycles Becoming CPU Cycles



Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Mon Feb 14, 2005 8:47 am Reply with quote

Go PHrEEKie!

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.5

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©