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.

Attachment and Inline issues with Safari.



  • edited February 2007
    @ Wanderer: You joined this discussion to start your usual windows/mac beaching, but this time it is about Jazzman code (like he doesn't do enough for vanilla).
    bad luck, it doesn't seems to be a problem with safari. You might have to sneak around for an other discussion to hijack. If a JS script works in all modern browsers except Safari, it is most likely that Safari doesn't follow the standard. My guess is that you are just too dogmatic to understand it, or just jealous that people can put the effort the make their code compatible with IE (so far from the standard) but not with Safari...
    But please don't hijack this discussion anymore, or better don't hijack these forum discussions all together for your apple crusade.

    @ fery: 1. Must of us can just test on one or two configurations at home and one configuration on a remote server. I personally test on winxp/apache2.2.3/php4.4.4/mysql5.0.14, winxp/apache2.2.3/php5.1.16/mysql5.0.14 and CentOS4.3/apache2.0.59/php5.1.14/mysql4.1.
    2. We also must of us create extensions for fun, we start a simple project for fun, so simple that we don't have any plan to test it automatically, but after the project has grown, integrating need of other people, we can't/don't test everything when we make a like change. Who use something like jmeter when writing his extension?
    3. finally must us do it for free, we don't have unlimited time for it. What's wrong with uploading it and let other help you spotting the bug and fixing it?
    Jazzman had lot of great ideas and create lots of addon (some with bugs), as far as I can remember people are happy about his work and don't complaign about.

    @javoy43: sorry if that's quite off topic and doesn't help you.
  • Quote: Dinoboff
    pic@ Wanderer: You joined this discussion to start your usual windows/mac beaching, but this time it is about Jazzman code, like he doesn't do enough for vanilla. Bad luck, it doesn't seems to be a problem with safari. You might have to sneak around for an other discussion to hijack. pic
    Now that's just plain unfair, I was merely agreeing with fery, no hijacking, no off topic, no mention of Windows or Mac, no beaching, just agreeing and adding my two cents' worth.

    Neither did I mention Jazzman nor his code, it was an entirely other couple of coders I was thinking of in particular but the comment was a general one.

    Seems to me you're the one doing the hijacking. If you have an issue with me why not quit with the public performance and whisper to me? pic

    Posted: Wednesday, 14 February 2007 at 3:38PM (AEDT)

  • edited February 2007
    Fery came to say that uploaded extensions should be bug free, what I think it is unfair. Off topic

    You came to say that a script that doesn't work in Safari is not standard, what is just a joke. Off topic

    I came to say that Fery and you are unfair. Off topic - But I said sorry ;-)
  • edited February 2007
    so if im so unfair with my thoughts.. tell me your thoughts about the sense of "quality".

    bugfixing so much as you can _before_ a release or haha here and there a little bugfixing afterwards (it depense on my funny sparetime and my mood).

    other than that, what are your thoughts about alpha, beta , pre and stable public releases? because this is what im talking about.

    still unfair? :D

    how many forum-admins on the web are php geeks? most of them r young or unexpierienced or beginner
    most of them r _not_ familiar with php, coding or editing.
    and bugfixing is fun for them, believe me in this point.

    and just watch the threads here @ vanilla, every third one is a unanswered it would be cool "extension request", every 1 1/2 one is a "bugfixing thread".

    so what is the meaning of an extension? download them and get a 50% chance to see you in a bugfixing thread?

    i mean do whatever you like,
    never said that extensions are generally bad or basically infunctional, ive only said that most of them wont work with each other or they need to many bugfixes... and unfair or not, but this the hard and dry reality, just read the forums;)

    other than that : and you get the best tool for visual bugfixes and crossbrowser fixes... but there was allready a browsershots thread (a few weeks back) with only "one" reply... what a interest huh ? :D
  • @MySchizobuddy -> Latest version of extensions YES This is a test forum, I'll reinstall the vanilla completly and begin with this two extensions, what the others extensions requirements for both working (BBCode, HTML formaters, Better BBcode) ?
  • edited February 2007
    no there is no additional requirement. I'm testing it with just attachments and inline images. nothing else. I also tried it with jThickbox extension cause inline images can optionally use it. So i have fully tested it webkit and it all works fine.
    u can try disabling everything. clearing ur cache and try again. are u able to attach zip files. does anything work for you or nothing.

    just a crazy idea, do u have write access to the upload folder where the attachments are uploaded.

    @Dinoboff, this is an excellent situation where u can use the Digg style thumbs up/down and collapse the comments by Fery and Wanderer. If that extension existed.
  • @MySchizobuddy -> Attachments works perfectly in Safari, and I can (up 1st post) display pictures in the comment with link to uploads folder. So no problem of write access... will do a complete reset of my mysql base and reinstall, give you feedback, thx.
  • edited February 2007
    ur having problem with firefox and opera too
    there is something else wrong with it

    first get it working on firefox. if it does then worry about webkit. thats what I do anyway
  • dan39dan39 New
    edited February 2007
    A lot of the comments above don't really make much sense. Where exactly does anyone have evidence that the JavaScript in Safari and Webkit are different?? (Do you mean the differences between the nightlies and the stable Safari release?) Safari uses Webkit. So the latest stable release of webkit and safari should always be the same.

    To be clear: Webkit is comprised of WebCore and JavaScriptCore. JavaScriptCore is based on the combination of the KJS library (which is part of the KDE project, and developed for the KDE project's Konqueror web browser) with the PCRE (Perl Compatible Regular Expressions) regular expression library.

    While JavaScriptCore is not perfect by any means, it is based on standard ECMAScript and is constantly being worked on by the Open Source community. To say that Safari's javascript is "poor" and is a "fact" is to disregard the ECMA standards that are in place to provide for "safe" javascript in web browsers.

    It would be helpful if Vanilla extensions were written to support standard ECMAScript. That way, the extensions would not break in some of the less popular browsers standards based browsers that also support ECMAScript.

    "WebKit is also the name of the Mac OS X system framework version of the engine that's used by Safari."

    "Originally named LiveScript and now also known as ECMAScript, it's a safe, dynamic language that's arguably one of the most well-known programming languages in the world. There's a JavaScript standard, created by ECMA. WebKit's JavaScript engine, JavaScriptCore, based on KJS, is a framework separate from WebCore and WebKit, and is used on Mac OS X for applications other than web page JavaScript."

    So when you refer to the javascript in webkit, are you just referring to the webkit nightlies?
  • What I meant in this comment was exactly that. JavaScript written correctly should work in Safari with no issues and probably in Firefox and other compliant browsers. I find that the reason Safari balks in some instances is because the coder has relied on unique interpretations usually platform or browser specific, or both!

    To illustrate this point, if it breaks in Safari it usually also breaks in Firefox but will probably work in IE!

    Posted: Thursday, 15 February 2007 at 8:21AM (AEDT)

  • edited February 2007
    dan39So when you refer to the javascript in webkit, are you just referring to the webkit nightlies?yes. i thought that was understood. things that don't work in safari, do work in webkit nightly. the difference is pretty obvious.
  • dan39dan39 New
    edited February 2007
    ok, I see. Now it makes sense. Let's refer to them as the "nightlies" then (as everyone else in the world does). Safari = Webkit Nightlies = latest dev versions of Webkit
  • edited February 2007
    @ wanderer: Safari use standards but has some bugs.

    Looking at the inlineImage extension, I don't think it is js related: there is only one line of js code:if( $Attachment->UserID == $AttachmentManager->Context->Session->UserID || $AttachmentManager->Context->Session->User->Permission('PERMISSION_MANAGE_ATTACHMENTS') ) { $AttachmentList .= '<a href="./" onclick="DeleteAttachment(\''. $AttachmentManager->Context->Configuration['WEB_ROOT'] . "extensions/Attachments/ajax.php" .'\', \''. $Attachment->AttachmentID .'\'); return false;">'. $AttachmentManager->Context->GetDefinition('DeleteAttachment') .'</a>'; }And, what's wrong with it (except the use of inline javascript)?

    Maybe the problem is in some missing quote in the header, just a guess.

    Try to replace line 80-87 of InlineImages/image.php) with :
    header("Content-Type: ".$Attachment->MimeType); header('Content-Disposition: inline; filename="' . $Attachment->Name . '"' ); header("Expires: ".$ExpireDateGMT); header("Last-Modified: ".$Attachment->DateModified); header('Cache-Control: public, max-age="' . $Expires . '"'); header("Pragma: !invalid"); header("Content-Control: cache"); header("Content-Length: ".filesize($ImagePath));
  • Hello all ! Listen to this, it works like a charm now !!! There is problem with my provider with the path of the Attachment extensions. Alone Attachment worked but Inline was not able to find the upload. I reset the base and I type the new ABSOLUTE PATH in attachment, now great. Thanks everybody !
This discussion has been closed.