i already implemented your file_size.php Addons and set path in kfunction.php in Addons folder, but it shows error
here is code
Here Downloads.html File
When i try to upload file from admin panel its saying 1error their
here is code
- Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Downloads' name='downloads' clonable='1' commentable='0' dynamic_folders='1'>
<cms:editable name='file_name' label='File Name' type='text' />
<cms:editable name='download_description' label='Download Description' type='text' />
<cms:editable
name='my_filesize'
type='hidden'
validator='FileSize::get'
assoc_field='file_download'
>0</cms:editable>
<cms:editable
name='file_download'
label='Downloadable File'
desc='Upload the file here'
type='file'
/>
</cms:template>
<cms:if k_is_page >
<cms:else />
<cms:embed 'downloads.html' />
</cms:if>
<?php COUCH::invoke(); ?>
Here Downloads.html File
- Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><cms:get_custom_field 'downloads' masterpage='globals.php' /> | <cms:get_custom_field 'site_name' masterpage='globals.php' /></title>
<meta name="keywords" content="<cms:get_custom_field 'meta_tag' masterpage='globals.php' />" />
<meta name="description" content="<cms:get_custom_field 'meta_desc' masterpage='globals.php' />" />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
function clearText(field)
{
if (field.defaultValue == field.value) field.value = '';
else if (field.value == '') field.value = field.defaultValue;
}
</script>
</head>
<body>
<cms:embed 'header.html' />
<div id="slider_wrapper_n">
<h2><cms:get_custom_field 'downloads' masterpage='globals.php' /></h2>
<p><cms:get_custom_field 'downloads' masterpage='assets.php' /></p>
</div>
<div id="templatemo_main">
<div class="col_w900 col_w900_last">
<h3>Downloads List</h3>
<center><table class="imagetable">
<tr>
<th><font color="white">Sr No</font></th><th><font color="white">File Name</font></th><th><font color="white">Description</font></th><th><font color="white">Size</font></th><th><font color="white">Download</font></th></tr>
<cms:pages masterpage='downloads.php'>
<tr>
<td><center><cms:show k_count/></center></td><td><cms:show file_name/></td><td><cms:show download_description/></td><td><center><cms:show my_filesize /></center></td><td><div class="download_link"><a href="<cms:show file_download/>" ><b>Download</b></a></div><br></td>
</tr>
</cms:pages>
</table></center>
<div class="cleaner"></div>
</div>
<div class="cleaner"></div>
<span class="bottom"></span> </div>
<cms:embed 'footer.html' />
</body>
</html>
<?php COUCH::invoke(); ?>
When i try to upload file from admin panel its saying 1error their