Author Topic: Refresh Files  (Read 2849 times)

wagb278

  • Newbie
  • *
  • Posts: 7
  • Karma: 1
    • View Profile
Refresh Files
« on: September 13, 2008, 10:46:13 AM »
I posted to the Source Forge site a similar wish.  Not sure if this is redundant.

Unless I am missing something, SOSWP does not provide a file refresh capability.  I post a few PDF files on my SOSWP site. When I change those files I have to delete the old files from my site and load the new version. My PDF files appear as links on my "Downloadable Forms" page. This requires me to re-establish links et al.  I, for one, would prefer to have a "Refresh File" button along with the Delete and Edit buttons.  The "Update Document" button title on the Edit page is a little miss-leading, all it does is save the change in the file title.

Thanks, and I really like SOSWP. I use it as a home site for my residential LAN providing easy access to Web-enabled applications hosted on two Linux nodes.
« Last Edit: September 13, 2008, 11:39:17 AM by HandsomeWeb »

HandsomeWeb

  • SOS Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 85
  • Karma: 2
    • View Profile
    • SOS Webpages
Re: Refresh Files
« Reply #1 on: September 13, 2008, 11:40:28 AM »
No, this is not possible.  But that is a great suggestion.  I will include it in future releases.
Chris
http://www.soswebpages.com
http://www.handsomeweb.com
http://www.handsomewebservices.com

HandsomeWeb

  • SOS Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 85
  • Karma: 2
    • View Profile
    • SOS Webpages
Re: Refresh Files
« Reply #2 on: December 17, 2008, 09:08:38 PM »
This feature has been added in the latest release (Version 1.1.5).
Chris
http://www.soswebpages.com
http://www.handsomeweb.com
http://www.handsomewebservices.com

wagb278

  • Newbie
  • *
  • Posts: 7
  • Karma: 1
    • View Profile
Re: Refresh Files
« Reply #3 on: December 18, 2008, 05:12:43 PM »
I updated to version 1.1.5 and tested the new feature.

I had to clear the browser cache to see the replacement file.  That had me confused for a while; is there a flush cache capability that can be initiated through PHP or javascript?  Or - when a file is replaced change the filename in the database. Also, the file date did not change when I uploaded a replacement; I think the date should change. However, I opened the database using phpmyadmin and noticed the NOW function on the date field.  Using the phpmyadmin change action on the appropriate record (but not making any changes) activated the NOW function and updated the date field.  Is there a "touch" or "update" action that can be used to get the date to change?

Thanks for the feature addition - definitely better!

Another suggestion to consider - provide a means to specify the order for these files to appear on the Web page.  This would probably need another field in the forms table to hold the display order which could be used in an ORDER BY phrase when fetching the forms from the database.  The existing forms_id field would not be appropriate because it relates to the sequence the files were added, not a presentation order.  Consider this when you run out of things to do.

Thanks,
Jim

HandsomeWeb

  • SOS Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 85
  • Karma: 2
    • View Profile
    • SOS Webpages
Re: Refresh Files
« Reply #4 on: December 19, 2008, 04:27:55 PM »
I had to clear the browser cache to see the replacement file.  That had me confused for a while; is there a flush cache capability that can be initiated through PHP or javascript? 

Actually, it just rewrites the file without hitting the database.  I'll update later to update the date in the database.  I don't think forcing a download of a chached file is possible without always forcing it.  That would slow down the site for visitors.  I am guessing you would not have had to clear your browser cache if you had closed your browser.  So site visitors would typically get the new file.

Another suggestion to consider - provide a means to specify the order for these files to appear on the Web page.  This would probably need another field in the forms table to hold the display order which could be used in an ORDER BY phrase when fetching the forms from the database.  The existing forms_id field would not be appropriate because it relates to the sequence the files were added, not a presentation order.  Consider this when you run out of things to do.

I will consider.  I hate database changes, so I might put it off until 1.2.  Thanks for your good ideas.
Chris
http://www.soswebpages.com
http://www.handsomeweb.com
http://www.handsomewebservices.com

HandsomeWeb

  • SOS Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 85
  • Karma: 2
    • View Profile
    • SOS Webpages
Re: Refresh Files
« Reply #5 on: December 19, 2008, 06:14:10 PM »
An updated admin_forms.php file is in the SVN at SourceForge.
Chris
http://www.soswebpages.com
http://www.handsomeweb.com
http://www.handsomewebservices.com