Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Attachment Extension 1.4

189111314

Comments

  • Options
    edited June 2006
    Obvious- You would be adding those in the .htaccess file under the rewrite rules. But it doesn't seem to work for me.
  • Options
    edited June 2006
    If you have frienly urls on, you try to reach some file (loading.gif and closelabel.gif for this extension, change_lang.gif and spellc.gif for Spell Checker) from myforum.com/discussiom/###/#/title/ and not from myforum.com/comments.php?DiscussionID=###&page=# and fail. You should see something like that in your access_log:
    myforum.com 192.168.1.2 - - [24/Jun/2006:11:11:36 +0100] "GET /discussion/###/#/title/extensions/Attachments/lightbox/images/closelabel.gif HTTP/1.1" 404 1181 "http://myforum.com/discussion/###/#/title/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4"
    discussion/###/#/title/extensions/Attachments/lightbox/images/closelabel.gif need to be change in extensions/Attachments/lightbox/images/closelabel.gif. I added these rules at the end of Friendly Urls rules:
    #Prevent some little bad effects of Friendly Urls # on relative links in some extensions RewriteRule ^(discussions|categories|search|post|settings|people|[0-9]+)/(extensions|themes|images|ajax)/(.*) $2/$3 [QSA,L] RewriteRule ^(discussions|categories|search|post|settings|people|[0-9]+)/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php) $2 [QSA,L] RewriteRule ^discussion/([0-9]+/){1,2}[^/]*/(extensions|themes|images|ajax)/(.*) $2/$3 [QSA,L] RewriteRule ^discussion/([0-9]+/){1,2}[^/]*/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php) $2 [QSA,L] RewriteRule ^(discussions|account|search|post|[0-9]+)/.+/(extensions|themes|images|ajax)/(.*) $2/$3 [QSA,L] RewriteRule ^(discussions|account|search|post|[0-9]+)/.+/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php) $2 [QSA,L]
    And it seems to work, but they are the first rewrite rules I write, so I can't be sure it is good enought.
  • Options
    Great extension, this! For me, everything works except Thickbox. With thickbox, I can upload files and thumbnails are created. But nothing happens when I click the images. Same in IE and Firefox 1.5. I don't have friendly urls installed.
  • Options
    Hey.. getting this: -I have no .htaccess file that I know of.. ---------------------------- Warning: move_uploaded_file(/home/.jacobina/cartoonm/gonk.net/Vanilla.1/uploads/7.badge2.jpg): failed to open stream: No such file or directory in /home/.jacobina/cartoonm/gonk.net/Vanilla.1/library/Framework/Framework.Class.Uploader.php on line 90 Warning: move_uploaded_file(): Unable to move '/tmp/php48YcKv' to '/home/.jacobina/cartoonm/gonk.net/Vanilla.1/uploads/7.badge2.jpg' in /home/.jacobina/cartoonm/gonk.net/Vanilla.1/library/Framework/Framework.Class.Uploader.php on line 90 Notice: Undefined index: ATTACHMENT_CHMOD in /home/.jacobina/cartoonm/gonk.net/Vanilla.1/extensions/Attachments/default.php on line 166
  • Options
    Oh yes, and the possibility to have a checkbox to allow / disallow std extensions such as .zip .rar .jpg .jpeg .gif .SWF (Flash would be a BIGGIE, since I'm going to run an animation-centric board) Anyone? Anyone? Bueller???
  • Options
    Hi Bugme! That's a nice feature, which I will implement in the new release (1.5). I'm working on the bugs first, but I will add the checkbox-setting-thingy :)
  • Options
    i cant delete attachments from users as admin.
  • Options
    Awesome Jazzman. Sounds excellent. Totally possible to embed .swf using thickbox too. For me, this feature, and those checkboxes.. (e-zee) -as I'm no programmer myself.. I stumbled across thickbox, and was very pleased to see it in use in a Vanilla extension. I had a phpbb for many years that a malicious user exploited and deleted. Hoping Vanilla proves to be both easy and secure in the long run.. When do you plan you next release? As it stands, your 1.4 didn't work at all.. I don't think it's on my end... should I be using something other than the 1.0 that was announced on the main page? -B
  • Options
    edited July 2006
    There a is problem with the thickbox option, except that it works.

    Have you created uploads/ with write permission for the apache user?
  • Options
    hi guys - just added this awesome extension but I get the following error message: "Notice: Undefined index: ATTACHMENT_CHMOD in /usr/local/psa/home/vhosts/zeptonn.nl/httpdocs/vanilla/extensions/Attachments/default.php on line 166" am I doing something wrong??
  • Options
    I got the same thing. When I went back a couple of hours later to troubleshoot the error had gone. I don't know why. I suggest trying that :)
  • Options
    edited July 2006
    check /conf/setting.php for this line:
    $Configuration['ATTACHMENT_CHMOD'] = '0644';
    Add it if you can't find it
  • Options
    edited July 2006
    That is strange, but I needed to upload a first file before being able to edit the option.
  • Options
    I'm having a similar problem as stinger: Undefined index: ATTACHMENT_DISPLAY_IMAGE_PROCESSING (in Attachments/default.php). The error shows up on the Attachment Settings page. All the defaults are blank, and any changes won't save. I'm using 1.4 with Vanilla 1 (official release)
  • Options
    problem: I can't change the conf/settings.php as it is set to chmod 600 by the server (not my own server but just from the webhosting company). So I can't fix that file...
  • Options
    Can't you change the permission with ftp? You could download conf/setting.php, edit it and upload it...

    Have you tried to upload a picture (get an error message) and try again to change the setting. Like I said, after a first upload, the attachment setting wasn't not blank.
  • Options
    edited July 2006
    that is how conf/setting.php should look like:
    ... $Configuration['ATTACHMENT_UPLOAD_PATH'] = '/home/web/htdocs/vanilla/uploads/'; $Configuration['ATTACHMENT_MAXIMUM_FILESIZE'] = '512000'; $Configuration['ATTACHMENT_DISPLAY_IMAGES'] = '1'; $Configuration['ATTACHMENT_DISPLAY_IMAGE_THUMBNAILS'] = '1'; $Configuration['ATTACHMENT_THUMBNAIL_PATH'] = '/home/web/htdocs/vanilla/uploads/thumbs/'; $Configuration['ATTACHMENT_THUMBNAIL_X'] = '100'; $Configuration['ATTACHMENT_THUMBNAIL_Y'] = '100'; $Configuration['ATTACHMENT_DISPLAY_IMAGE_PROCESSING'] = 'Thickbox'; $Configuration['ATTACHMENT_SETUP'] = '1'; ...
  • Options
    yeah.. I can't download, copy or edit the file - it's 600 by "apache" and that's not me - looks like I need to get that sorted out with the provider.. yikes! thanks for you help though, i will see what I can do.
  • Options
    edited July 2006
    600 should be enought, even if you can't edit setting.php directly.

    I just installed Vanilla 1. Created uploads and uploads/thumbs/. Checked the owner (apache user or cgiwrapper user) and the mode (2750). Enable the extension. Create a message with an attachment. Finally I changed the "image processing" setting to lightbox (Thickbox is buggy in the 1.4version of this extension).

    I tried to change the File Permissions setting and couldn't. I had to add it directly in setting.php (sorry stinger). However the default mode is 600 and should be enought in most of the case. If it need to be changed add "$Configuration['ATTACHMENT_CHMOD'] = '0666';" in conf/setting.
  • Options
    ok I will try this - the only thing not making sense to me is mode 2750 - the extension worked before and I got a different error message indeed when I tried uploading something. When I then changed it all it still didn't work but with these tips it might. I'll just see and post back on what's happening. Thanks for your reply!
This discussion has been closed.