Announcement

Collapse
No announcement yet.

Attached files icons problem : gif is used by default in $attachment_js

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Attached files icons problem : gif is used by default in $attachment_js

    Purpose : use png files to display attached files icons (instead of gif)
    Problem : when i edit a post, icons of the attached file don't display (red cross under IE)



    What i've done (modifications)
    In templates :
    Look for these variables :
    $attach[extension]
    $attachment[attachmentextension]
    $extension[extension]

    And change gif to png.

    In editpost.php
    I've changed
    Code:
    $attach['imgpath'] = "$stylevar[imgdir_attach]/$attach[extension].gif";"
    to
    Code:
    $attach['imgpath'] = "$stylevar[imgdir_attach]/$attach[extension].png";"

    The problem

    >In template "newpost_attachment"
    script : $attachment_js
    >php file :
    Code:
    $attachment_js .= construct_attachment_add_js($attachmentid, $attach['filename'], $attach['filesize'], $attach['extension']);
    >Code in browser :
    Code:
    vB_Attachments.add(1334, 'CV CC 2006.rar', '1 012,3 Ko', '/forum/images/attach/rar.gif');
    Problem : The browser can't find picture because it's looking for gif file. Why .gif extension is defined by default and how can i change this ?
    Last edited by cclaerhout; Fri 13th Jan '06, 10:34pm.

  • #2
    There is no option to change the file extension of attachment icons. Because this involves modifying the files, I recommend you post on www.vbulletin.org about this.

    Why do you want to change the extension? Do you need a color palette larger than 8bit? All of the default attachment icons are 16x16 which should never need more than 256 colors.

    Comment


    • #3
      I was expecting that answer, and sorry to tell you this : that's too easy and that's enough !

      I just want to use png file instead of gif because it's far better to use them icons when you have several styles including "Light" and "Dark" ones. It shoudn't require a code modification. And for your information, IE 7 is going to support png transparency which, i think and i hope, is going to make png as default standard.

      I also think i give you all the elements to help me to solve the problem. It isn't normal that the script file adds the extension of the file :
      '/forum/images/attach/rar.gif'

      I've looked into the code and find nothing.

      Now you don't want to help you customers, tell it instead of redirect them to vb.org where most of questions stay without any answer. I repeat myself : i do not consider my resquest as a code modification. vB should have it in standard.

      Comment


      • #4
        Please feel free to post this as a suggestion in the 3.5 Suggestions forum. But for now, this does require code modifications.

        And Jake was trying to help you. I know that because he took the time to respond. Generally when we purposely don't want to help someone we don't go through the time and trouble of responding.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          Originally posted by Steve Machol
          Generally when we purposely don't want to help someone we don't go through the time and trouble of responding.
          How nice of you. Don't forget that this "someone" is your customer. Most of the time, i try to find the solution by myself, but this time it's a vB problem (or gap if you prefer). Your answers are unacceptable.

          Comment


          • #6
            I am sorry you feel our anwsers are unaccectable, but at this time you want a feature that is not found in our forum software. I am aware of no such plans, so if you want this now you will need to modify the code.

            Yes, you are our customer, and we've done everything we can for you short of modifying the code, since we do not provide support for this, we cannot help you with this either.

            Comment


            • #7
              Ok. I take note of this.

              Comment


              • #8
                Originally posted by cclaerhout
                How nice of you. Don't forget that this "someone" is your customer. Most of the time, i try to find the solution by myself, but this time it's a vB problem (or gap if you prefer). Your answers are unacceptable.
                That was tongue-in-cheek as per the smilie. Sorry this eluded and offended you. The bottom line was that we did try to help you and you criticized us for this effort.
                Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                Change CKEditor Colors to Match Style (for 4.1.4 and above)

                Steve Machol Photography


                Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                Comment


                • #9
                  Your way to help me was curious. "Go to vb.org and ask them"...

                  I just want to know why ".gif" is still there. May be i've forget something, so just tell me where to look ; or may be it's a bug so i will wait you correct it.

                  My request is just to change gif to png. It shouldn't be a huge thing to do !

                  Comment


                  • #10
                    .gif extension is also hardcoded in newreply.php and newthread.php.

                    But the solution of my problem was contained in functions_editor.php

                    Now i can understand how hard it was to tell me this information for vB coders.

                    A special thank to Agent Ransack software that helps me to find what i needed.

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X