/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Hello i’m new, can somebody please help me?

Hello guys,

I am developing a website on a platform called social script. I have an existing plugin which lets me upload pictures but i want to be able to also upload files if its possible?

I am not a developer and very much an amateur with this so please bare with me…

I have looked at my server and think i have found the correct file to change but unsure what exactly to change. ( I have added pdf,doc,docx,.msg,txt,wpd,wps,dat,xlr,xls,pif,,dwg,dxf,php’ to the file extensions but it hasnt worked. Is this a big task??

<? view::load(‘header’); ?>

<section class=”plugin-events plugin-pictures picture-upload”>

<?=view::load(‘system/elements/storage/upload’, array(
‘action’ => ‘events/pictures/upload/’.$eventID,
‘keyword’ => ‘event-picture’,
‘maxsize’ => config::item(‘picture_max_size’, ‘events’),
‘extensions’ => ‘jpg,jpeg,png,gif,pdf,doc,docx,.msg,txt,wpd,wps,dat,xlr,xls,pif,,dwg,dxf,php’,
‘limit’ => $limit,
‘review’ => true,
‘gallery’ => ‘assets/images/pictures/picture_none.jpg’,
‘onUpload’ => array(
‘function’ => ‘eventPictureFileUploaded’,
),
‘onComplete’ => array(
‘function’ => ‘eventPictureUploadCompleted’,
),
))?>

</section>

<script type=”text/javascript”>
function eventPictureFileUploaded(file, response)
{
$(‘#uploader-event-picture-files .file-‘ + file.id + ‘ img’).attr(‘src’, response.message.preview);
if ( typeof(response.message.delete) != ‘undefined’ )
{
$(‘#uploader-event-picture-files .file-‘ + file.id + ‘ .delete’).off(‘click’);
$(‘#uploader-event-picture-files .file-‘ + file.id + ‘ .delete’).click(function() {
runAjax(response.message.delete, {}, function(message){
$(‘#uploader-event-picture-files .file-‘ + file.id).remove();
}, null, ‘uploader-event-picture-files .file-‘ + file.id + ‘ .delete’, ‘icon-system-ajax’, null, null, function(){
$(‘#uploader-event-picture-files .file-‘ + file.id + ‘ .delete’).off(‘click’);
});
});
}
}
function eventPictureUploadCompleted(files, response)
{
$(‘#uploader-event-picture-continue’).prop(‘href’, ‘<?=config::siteURL(‘events/pictures/index/’ . $eventID)?>’);
$(‘#uploader-event-picture-continue’).show();
//window.location = ‘<?=config::siteURL(‘events/pictures/index/’ . $eventID)?>’;
}
</script>

<? view::load(‘footer’);

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@ginerjmMar 17.2015 — Sure - forums are all about helping people. But - some things you need to learn before using them

1 - follow the rules. In your case you failed to read how to properly post your code using the appropriate tags.

2 - use a title for your post that indicates the problem you are seeking help with. EVERYBODY here needs help so a title such as yours doesn't attract much attention from those who can most likely help you.

3 - forums are all about solving problems. You think you have found the correct place to solve your particulate problem, so go for it and when you have a problem with your code then point out EXACTLY where you made your changes and tell us EXACTLY what happens.

4 - When posting to a forum you should also be sure to post to the CORRECT forum. Now I may be wrong, but the code I'm looking at doesn't look like PHP, so why are you posting here?

PS - 'bear' not 'bare'.
Copy linkTweet thisAlerts:
@Chrisf4sauthorMar 17.2015 — Apologies
Copy linkTweet thisAlerts:
@ginerjmMar 17.2015 — And thus begins the learning process...

Resolved? Really? Or just moved elsewhere?
Copy linkTweet thisAlerts:
@Chrisf4sauthorMar 17.2015 — You bored or something?
Copy linkTweet thisAlerts:
@ginerjmMar 17.2015 — Apparently you don't require help any longer. Good bye
×

Success!

Help @Chrisf4s spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...