I need only a limited number of users can upload images: is there the possibility of granting the upload to users belonging to a particular group only?
I need only a limited number of users can upload images: is there the possibility of granting the upload to users belonging to a particular group only?
After installing the plugin, you should have two new permissions per user group: Allow/Deny "Attachments Download" and "Attachments Upload"
I fixed a bug for IE. it has to deal with the dynamic creation of the form tag which resulted in IE not sending the file. Just replace Gdn_MultiFileUpload.prototype.NewUploader in fileupload.js with this: http://gist.github.com/583098
spent three hours digging in Vanilla and FileUploader and finally got a solution for attachments not attaching.
So we have Media table, and have DateInserted field with data type "datetime", also we got pretty cool core Validation, and there's a lot of default validation rules which apply on data type. According to default datetime rule "Dates should be in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format", and DateInserted is unix timestamp. So validation fails and nothing is put in DB.
The fix is really quick and easy: /plugins/FileUpload/class.fileupload.plugin.php
if anyone wants to actually display the uploaded images along with the comments, instead of just presenting download links, you can replace plugins/FileUpload/views/link_files.php with this:<div class="Attachments"> <div class="AttachmentHeader">Attachments</div> <table class="AttachFileContainer"> <?php foreach ($this->CommentMediaList as $Media) { if (strpos($Media->Type, 'image/') !== FALSE) { ?> <tr> <td colspan="3"><img src="<?php echo Url('/uploads').'/'.$Media->Path; ?>"/></p> </tr> <?php } else { ?> <tr> <td><img src="<?php echo $this->GetWebResource('images/gear.png'); ?>"/></td> <td><a href="<?php echo Url("/discussion/download/{$Media->MediaID}/{$Media->Name}"); ?>"><?php echo $Media->Name; ?></a></td> <td>(<?php echo Gdn_Format::Bytes($Media->Size, 0); ?>)</td> </tr> <?php } } ?> </table> </div> Just tweak the HTML and your theme to your liking. I got rid of the whole "Attachments" heading in mine.
Also bear in mind that when someone develops a plugin for Version X, and you upgrade to Version Y, it is still the plugin developer's responsibility to maintain that functionality... not ours.
I've seen a few comments that seem to imply that the community expects core support for plugin features when upgrading. While this would be nice, its not entirely feasible.
Also bear in mind that when someone develops a plugin for Version X, and you upgrade to Version Y, it is still the plugin developer's responsibility to maintain that functionality... not ours.
I've seen a few comments that seem to imply that the community expects core support for plugin features when upgrading. While this would be nice, its not entirely feasible.
there should be a way for users to express rather CoolOldPlugin works with 2.0.9, and this should be displayed on the plugin information page.
This plugin is compatible with vanilla version 2.0.6 .. etc etc.
Comments
They just appear as download links : /
- Spam
- Abuse
- Troll
1 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •on vanilla 2.0.6, I don't see attachments in all comments, only in first comment of discussion
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •when I disabled Signatures, the attachment appeared in comments, too
hope that this helps in figuring out the problem
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •$Configuration['Garden']['Upload']['AllowedFileExtensions'] = array('txt', 'jpg', 'gif', 'png', 'bmp', 'zip', 'gz', 'tar.gz', 'tgz', 'psd', 'ai', 'fla', 'swf', 'pdf', 'doc', 'xls', 'ppt', 'docx', 'xlsx', 'log', 'jpeg');- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
- Spam
- Abuse
- Troll
1 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •{"MediaResponse":{"Status":"success","MediaID":false,"Filename":"27511_540.jpg","Filesize":28005,"FormatFilesize":"27.3K","ProgressKey":""},"FormSaved":true,"DeliveryType":"VIEW","Data":"","StatusMessage":"","RedirectUrl":""}
why MediaID false? obviously it fails to save to db
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •http://gist.github.com/583098
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •spent three hours digging in Vanilla and FileUploader and finally got a solution for attachments not attaching.
So we have Media table, and have DateInserted field with data type "datetime", also we got pretty cool core Validation, and there's a lot of default validation rules which apply on data type. According to default datetime rule "Dates should be in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format", and DateInserted is unix timestamp. So validation fails and nothing is put in DB.
The fix is really quick and easy:
/plugins/FileUpload/class.fileupload.plugin.php
find the line:
'DateInserted' => time(),and replace it with
'DateInserted' => strftime('%Y-%m-%d %H:%M:%S', time()),and that should do the trick.
Vanilla2 is great stuff but documentation sucks hard. Reverse engineering someone's code is fun but it's HUGE time killer as well.
Cheers!
- Spam
- Abuse
- Troll
1 • Off Topic Insightful Awesome LOL •'DateInserted' => 'NOW()',scratch that, not working
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •<div class="Attachments"><div class="AttachmentHeader">Attachments</div>
<table class="AttachFileContainer">
<?php
foreach ($this->CommentMediaList as $Media) {
if (strpos($Media->Type, 'image/') !== FALSE) {
?>
<tr>
<td colspan="3"><img src="<?php echo Url('/uploads').'/'.$Media->Path; ?>"/></p>
</tr>
<?php
} else {
?>
<tr>
<td><img src="<?php echo $this->GetWebResource('images/gear.png'); ?>"/></td>
<td><a href="<?php echo Url("/discussion/download/{$Media->MediaID}/{$Media->Name}"); ?>"><?php echo $Media->Name; ?></a></td>
<td>(<?php echo Gdn_Format::Bytes($Media->Size, 0); ?>)</td>
</tr>
<?php
}
}
?>
</table>
</div>
Just tweak the HTML and your theme to your liking. I got rid of the whole "Attachments" heading in mine.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •if ($Comments)
while ($Comment = $Comments->NextRow())
$CommentIDList[] = $Comment->CommentID;
to
if ($Comments)
foreach ($Comments->Result() as $Comment)
$CommentIDList[] = $Comment->CommentID;
Please fix this in the release.
- Spam
- Abuse
- Troll
1 • Off Topic Insightful Awesome LOL •Thank You
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •http://lista.bolsafinanceira.com/FileUpload-1.1patched.tar.gz
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •This plugin is compatible with vanilla version 2.0.6 .. etc etc.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •