Убрать флешник
Открыть user_upload.tpl
и удалить
Code:
{lang_javascript ids=1190,1194,1229,1230,1231,1232}
{literal}
<!--
{/literal}{if $show_uploader}{literal}
window.addEvent('domready', function()
{
{/literal}
{if empty($user_upload_allowed_extensions)}
var allowed_extensions = false;
var allowed_extensions_array = false;
{else}
var allowed_extensions = '{$user_upload_allowed_extensions}';
var allowed_extensions_array = allowed_extensions.split(',');
{/if}
{literal}
var customValidationHandler = function(file, errors)
{
// No extensions are set, allow all
if( !allowed_extensions || !allowed_extensions_array )
return true;
var fileParts = file.name.split('.');
var fileExtension = ( fileParts ? fileParts[fileParts.length-1] : false );
// Could not get extension, should we return true or false?
if( !fileExtension || $type(fileExtension)!="string" )
return true;
fileExtension = fileExtension.toLowerCase();
// File extension not in the list of allowed extensions
if( !allowed_extensions_array.contains(fileExtension) )
return false;
return true;
}
var invalidFileHandler = function(file, errors)
{
var msg;
if( errors.contains('size') )
{
msg = SocialEngine.Language.TranslateFormatted(1229, [swiffy.options.limitSize, file.name]);
}
else if( errors.contains('length') )
{
msg = SocialEngine.Language.TranslateFormatted(1230, [swiffy.options.limitFiles]);
}
else if( errors.contains('custom') )
{
msg = SocialEngine.Language.TranslateFormatted(1232, [allowed_extensions_array.join(', '), file.name]);
}
else
{
msg = SocialEngine.Language.Translate(1231);
}
alert(msg);
}
var postData = {'isAjax':1, 'upload_token':'{/literal}{$upload_token}{literal}'};
$('uploadForm').getElements('input[type=hidden]').each(function(el) { postData[el.get('name')] = el.get('value');});
var swiffy = new FancyUpload2($('uploader'), $('fileList'),
{
'url': '{/literal}{$url->url_base}{literal}user_upload.php?session_id={/literal}{$session_id}{literal}',
'fieldName': '{/literal}{$user_upload_field_name}{literal}',
'data': postData,
'limitSize': {/literal}{$user_upload_max_size}{literal},
'limitFiles': {/literal}{$user_upload_max_files}{literal},
'path': './include/uploader/Swiff.Uploader.swf',
'onload': function()
{
$('uploader').style.display = 'block';
$('fallback_link').style.display = 'block';
$('fallback').style.display = 'none';
},
'target': 'uploader_browse',
'fileInvalid' : invalidFileHandler,
'validateFile' : customValidationHandler
});
$('uploader_browse').addEvent('click', function()
{
swiffy.browse();
return false;
});
$('uploader_upload').addEvent('click', function()
{
if(swiffy.files.length == 0) {
alert(SocialEngine.Language.Translate(1194));
} else {
swiffy.upload();
}
return false;
});
$('fallback_link').addEvent('click', function()
{
$('fallback').style.display='block';
$('fallback_link').style.display='none';
$('uploader').style.display='none';
return false;
});
});
{/literal}{/if}{literal}
function startStatus()
{
$('fallback_submit').disabled = true;
$('fallback_status').value = SocialEngine.Language.Translate(1190);
window.setTimeout("goStatus()", 400);
}
function goStatus()
{
$('fallback_status').value = $('fallback_status').value + '.';
if($('fallback_status').value == SocialEngine.Language.Translate(1190)+'....') { $('fallback_status').value = SocialEngine.Language.Translate(1190); }
window.setTimeout("goStatus()", 400);
}
// -->
{/literal}
<div id="uploader" style="'display:">
*потерял пару строк*, всё удаляем
</div>
<div id="fallback_link" class="fallback_link" style="'display:"><a>{lang_print id=1183}</a></div>
Че то как то так...