Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Download File Checker (for downloads)


Maynard

Recommended Posts

The Download File Checker contribution

 

This provides a button to press that will tell you whether the Filename you've just typed in for a download is for a file that actually exists.

 

What the button looks like: dfc_button.jpg

 

When the file exists: dfc_exists.jpg

 

When the file doesn't exist: dfc_notexist.jpg

 

Simple, but useful.

 

Support is offered here... Enjoy.

favicon.gif I'm Maynard, and I'm happily running, maintaining, tweaking osC on Maynard's Groovy Bible Tunes (google it!)
Link to comment
Share on other sites

  • 6 months later...

I tried installing this but no success all I get when I click the Products Attributes is a blank page is there a tut on installing this I did read the readme.txt

 

I copied the "downloadfile_check.php" into the catalog/admin/includes/

 

this is where I think I went wrong

 

after each occurrence (there are two) of:

<td class="smallText"><?php echo,

tep_draw_input_field('products_attributes_filename', $products_attributes_filename,

'size="15"); ?> </td>

not for sure what that means I added it to the bottom but don't think that is where it goes can anyone tell me where to put this:

 

<!-- Download File Checker -->

<script type="text/javascript">

<!--

function downloadCheckFile() {

// checks to see if the download file exists

// get the value from the form input field

var fileName = document.attributes.products_attributes_filename.value;

// get the iFrame

var iFr = document.getElementById('downloadCheckFileFrame');

// load the file check into the iFrame

iFr.src = "includes/downloadfile_check.php?f=" + encodeURIComponent(fileName);

}

// -->

</script>

<td class="smallText"><input type="button" value="??" onClick='downloadCheckFile()'><iframe height="1" width="1" id='downloadCheckFileFrame' style='border:0'></iframe></td>

<!-- eof Download File Checker -->

 

 

Thanks

Edited by thomasjones2002
Link to comment
Share on other sites

  • 5 months later...
I tried installing this but no success all I get when I click the Products Attributes is a blank page is there a tut on installing this I did read the readme.txt

 

I copied the "downloadfile_check.php" into the catalog/admin/includes/

 

this is where I think I went wrong

 

after each occurrence (there are two) of:

<td class="smallText"><?php echo,

tep_draw_input_field('products_attributes_filename', $products_attributes_filename,

'size="15"); ?> </td>

not for sure what that means I added it to the bottom but don't think that is where it goes can anyone tell me where to put this:

 

<!-- Download File Checker -->

<script type="text/javascript">

<!--

function downloadCheckFile() {

// checks to see if the download file exists

// get the value from the form input field

var fileName = document.attributes.products_attributes_filename.value;

// get the iFrame

var iFr = document.getElementById('downloadCheckFileFrame');

// load the file check into the iFrame

iFr.src = "includes/downloadfile_check.php?f=" + encodeURIComponent(fileName);

}

// -->

</script>

<td class="smallText"><input type="button" value="??" onClick='downloadCheckFile()'><iframe height="1" width="1" id='downloadCheckFileFrame' style='border:0'></iframe></td>

<!-- eof Download File Checker -->

Thanks

 

1st - I'm very sorry for this late reply!

 

2nd - You need a little experience with editing php files to use this mod.

The idea is that you look in the file catalog/admin/products_attributes.php with an editor, and where you see the code that's described, after that you add in the code I've provided.

I use Aptana Studio, that's a good editor. Or HTML-kit. Google them and see what you get.

 

Hope that's some help.

 

BTW - always back up files and your database before making changes!!!

favicon.gif I'm Maynard, and I'm happily running, maintaining, tweaking osC on Maynard's Groovy Bible Tunes (google it!)
Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...