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: Attachments
<?php foreach ($this->CommentMediaList as $Media) { if (strpos($Media->Type, 'image/') !== FALSE) { ?>
Path; ?>"/>
<?php } else { ?>
GetWebResource('images/gear.png'); ?>"/> MediaID}/{$Media->Name}"); ?>"><?php echo $Media->Name; ?>
(<?php echo Gdn_Format::Bytes($Media->Size, 0); ?>)
<?php
}
}
?>
Just tweak the HTML and your theme to your liking. I got rid of the whole "Attachments" heading in mine.
Beautiful solution, thanks very much! Any idea on how to make sure that this is constrained to the max size of the column for larger images?
You can use the Image Resizer addon, but I think it will need some tweaking to match the DOM structure of attached images. I'll take a look at it.
The other alternative is to wait for the next release of FileUpload. Tim's said he's building this functionality into the addon and I'm sure it will be a lot nicer than my hack.
Another solution to the image viewing problem is to display the url of the image uploaded and use the magic plugin. will have to make this plugin be processed prior to magic but it might work.
The README file says "INSTALL PECL APC (Alternative PHP Cache)" Well, in order to install this, you must have your website hosted on a dedicated server because you have to use Secure Shell (SSH) access
However TiGR's second issue is valid and happens in Firefox as well. The issue appears to be that, when editing a post, you have multiple DIVs on the page with the same ID ('CurrentUploader'), and each of those divs is matched by the selector in fileupload.js line 12, so they each receive the html append on line 121.
these guys just need unique IDs.
This is the exact same problem I'm having. How can I give them unique IDs?
@Tim I can't yet use my locale.php with this plugin but have to customize it in the plugin's files themselves. Maybe that's something else to improve for the next version?
Ive issue with version 1.1. I'm using vanilla forum version 2.0.9. this is the scenario
1. type in my comments then attach a file, attach file successful. 2. When i want to post my comment, after posted the comment the attached file does not upload. It did not store into the database. even those old uploaded files doesn't work either. I cant download old files. When i go to /discussion/download/'mediaid'/filename, it seems to be blank page....no download popup windows at all.
I'm using rc3, which is the only version of Vanilla I was able to get working on my server. I receive the following error when trying to install the latest version of FileUpload:
I attempted to change the version number to 2.0.9 in the index.php file, but this didn't seem to have any effect whatsoever. Am I using an incompatible version of vanilla? I never really understood what the rc versions were anyway.
I'm using rc3, which is the only version of Vanilla I was able to get working on my server. I receive the following error when trying to install the latest version of FileUpload:
I attempted to change the version number to 2.0.9 in the index.php file, but this didn't seem to have any effect whatsoever. Am I using an incompatible version of vanilla? I never really understood what the rc versions were anyway.
Thanks, Chris
RC3 is definitely incompatible with FileUpload. You'll need to upgrade.
RC means "Release Candidate" ... its a version before we even release vanilla 2.0, and we're already at 2.0.14. Please upgrade
Ive issue with version 1.1. I'm using vanilla forum version 2.0.9. this is the scenario
1. type in my comments then attach a file, attach file successful. 2. When i want to post my comment, after posted the comment the attached file does not upload. It did not store into the database. even those old uploaded files doesn't work either. I cant download old files. When i go to /discussion/download/'mediaid'/filename, it seems to be blank page....no download popup windows at all.
Help....in trouble now
Not sure what could cause this. Try turning on real errors by going to your config file /conf/config.php
Change this setting: $Configuration['Garden']['Errors']['MasterView']
To this value: 'deverror.master.php'
Try doing those actions again and see if you get errors. Another thing you could try is UPDATING to the latest FileUpload and Vanilla. I fix errors daily
Comments
Vanilla Forums COO [GitHub, Twitter, About.me]
The other alternative is to wait for the next release of FileUpload. Tim's said he's building this functionality into the addon and I'm sure it will be a lot nicer than my hack.
Well, in order to install this, you must have your website hosted on a dedicated server because you have to use Secure Shell (SSH) access
Vanilla Forums COO [GitHub, Twitter, About.me]
It doesn't work with MaxImageSize-plugin for me.
@ruifelipe thanks, your changes work well for me!
@Tim I can't yet use my locale.php with this plugin but have to customize it in the plugin's files themselves. Maybe that's something else to improve for the next version?
Vanilla Forums COO [GitHub, Twitter, About.me]
1. type in my comments then attach a file, attach file successful.
2. When i want to post my comment, after posted the comment the attached file does not upload. It did not store into the database. even those old uploaded files doesn't work either. I cant download old files. When i go to /discussion/download/'mediaid'/filename, it seems to be blank page....no download popup windows at all.
Help....in trouble now
FATAL ERROR IN: PHP.Gdn_ErrorHandler();
"FileUpload requires the Vanilla application version 2.0.9"
LOCATION:
> 364: );
> 365: }
> 366: }
> 367: } else if ($RequiredVersion != '*' && $RequiredVersion != '') {
>>> 368: throw new Exception(
> 369: sprintf(
> 370: T('%1$s requires the %2$s %3$s version %4$s'),
> 371: $ItemName,
> 372: $RequiredItemName,
BACKTRACE:
[D:\Inetpub\sarahsinn\tap\library\core\class.pluginmanager.php 413] PHP::CheckRequirements();
[D:\Inetpub\sarahsinn\tap\applications\dashboard\controllers\class.settingscontroller.php 499] Gdn_PluginManager->TestPlugin();
[D:\Inetpub\sarahsinn\tap\library\core\class.dispatcher.php 270] SettingsController->TestAddon();
[D:\Inetpub\sarahsinn\tap\index.php 39] Gdn_Dispatcher->Dispatch();
I attempted to change the version number to 2.0.9 in the index.php file, but this didn't seem to have any effect whatsoever. Am I using an incompatible version of vanilla? I never really understood what the rc versions were anyway.
Thanks,
Chris
Vanilla Forums COO [GitHub, Twitter, About.me]
RC means "Release Candidate" ... its a version before we even release vanilla 2.0, and we're already at 2.0.14. Please upgrade
Vanilla Forums COO [GitHub, Twitter, About.me]
/conf/config.php
Change this setting:
$Configuration['Garden']['Errors']['MasterView']
To this value:
'deverror.master.php'
Try doing those actions again and see if you get errors. Another thing you could try is UPDATING to the latest FileUpload and Vanilla. I fix errors daily
Vanilla Forums COO [GitHub, Twitter, About.me]
http://www.haughin.com/2007/10/23/php-upload-progress-with-php-52-apc/
The important parts that you might not have done are:
Vanilla Forums COO [GitHub, Twitter, About.me]