It looks like you're new here. If you want to get involved, click one of these buttons!
<!--========================================= UPLODIFY =========================================//-->
<link rel=\"stylesheet\" href=\"<?php echo $this->baseUrl() ?>/library/uploadify/uploadify/uploadify.css\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"<?php echo $this->baseUrl() ?>/library/uploadify/css/uploadify.jGrowl.css\" type=\"text/css\" />
<script type=\"text/javascript\" src=\"<?php echo $this->baseUrl() ?>/library/uploadify/js/jquery.uploadify.js\"></script>
<script type=\"text/javascript\" src=\"<?php echo $this->baseUrl() ?>/library/uploadify/js/jquery.jgrowl_minimized.js\"></script>
<script type=\"text/javascript\">
var hasAttach = false;
$(document).ready(function() {
$(\"#fileUploadgrowl\").fileUpload({
'uploader': '<?php echo $this->baseUrl() ?>/library/uploadify/uploadify/uploader.swf',
'cancelImg': '<?php echo $this->baseUrl() ?>/library/uploadify/uploadify/cancel.png',
'script': '<?php echo $this->url(Constants::getSiteUrl('community|topicAttachCtrlAct'), null, true) ?>',
'folder': '<?php echo $this->baseUrl() ?>/library/uploadify/files',
'sizeLimit': 5242880,
onError: function (event, queueID ,fileObj, errorObj) {
var msg;
if (errorObj.status == 404) {
alert('Could not find upload script. Use a path relative to: '+'<?= getcwd() ?>');
msg = 'Could not find upload script.';
} else if (errorObj.type === \"HTTP\")
msg = errorObj.type+\": \"+errorObj.status;
else if (errorObj.type ===\"File Size\")
msg = fileObj.name+'<br>'+errorObj.type+' Limit: '+Math.round(errorObj.sizeLimit/1048576)+'MB';
else
msg = errorObj.type+\": \"+errorObj.text;
$.jGrowl('<p></p>'+msg, {
theme: 'error',
header: 'ERROR',
sticky: true
});
$(\"#fileUploadgrowl\" + queueID).fadeOut(250, function() { $(\"#fileUploadgrowl\" + queueID).remove()});
hasAttach = false;
return false;
},
onCancel: function (a, b, c, d) {
var msg = \"Cancelled uploading: \"+c.name;
$.jGrowl('<p></p>'+msg, {
theme: 'warning',
header: 'Cancelled Upload',
life: 4000,
sticky: false
});
hasAttach = false;
},
onClearQueue: function (a, b) {
var msg = \"Cleared \"+b.fileCount+\" files from queue\";
$.jGrowl('<p></p>'+msg, {
theme: 'warning',
header: 'Cleared Queue',
life: 4000,
sticky: false
});
hasAttach = false;
},
onComplete: function (a, b ,c, d, e) {
var size = Math.round(c.size/1024);
$.jGrowl('<p></p>'+c.name+' - '+size+'KB<br>You are redirecting...', {
theme: 'success',
header: 'Upload Complete',
life: 2000,
sticky: false
});
setTimeout(\"changeLocation('<?php echo $this->baseUrl()?>/community/forums/viewforum/forum/' + document.getElementById('forums').value)\", 3000);
},
onSelect : function (event, queueID ,fileObj) {
hasAttach = true;
}
});
$('#subject').bind('change', function(){
$('#fileUploadgrowl').fileUploadSettings('scriptData','&forum_code='+ $(\"#forums\").val() +'&topic_title='+$(this).val() + '&post_text=' + $(\"#message\").val() + '&user_role=<?php echo $this->userRole ?>&user_id=<?php echo $this->userID ?>');
});
$('#forums').bind('change', function(){
$('#fileUploadgrowl').fileUploadSettings('scriptData','&forum_code='+ $(this).val() +'&topic_title='+$(\"#subject\").val() + '&post_text=' + $(\"#message\").val() + '&user_role=<?php echo $this->userRole ?>&user_id=<?php echo $this->userID ?>');
});
$('#message').bind('change', function(){
$('#fileUploadgrowl').fileUploadSettings('scriptData','&forum_code='+ $(\"#forums\").val() +'&topic_title='+$(\"#subject\").val() + '&post_text=' + $(this).val() + '&user_role=<?php echo $this->userRole ?>&user_id=<?php echo $this->userID ?>');
});
$('#submit_btn').click(function(){
if (hasAttach) {
$('#fileUploadgrowl').fileUploadStart()
} else {
document.getElementById('postForumTopicForm').submit();
}
});
});
</script>
<!--========================================= END OF UPLODIFY =========================================//-->