Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How do i keep images but remove the thumbnail/box?

I'm a vanilla newby and i just finally finished getting members to not be able to delete, and now i'm hoping to learn how to have the images appear, but not the box with the thumbnail underneath it? Thank you to anyone who could help.

Answers

  • link_files.php

                $this->FireEvent('BeforeFile');
    
                      $haystack=strtolower($this->EventArguments['Object']->Body);
                      $needle=strtolower(Url(MediaModel::Url($Media)));
                      if (!strlen(strstr($haystack,$needle))>0) {    
    

    FileUpload is a bit buggy, but nonetheless is a greatwork done. Thanx to authors.

  • edited May 2012

    One more bug curing - correct thumbs display when editing and posting

    in fileupload.js

    /*                                   
               $('.Comment a.EditComment').click(function() {   
                  $('.Comment > .Attachments', $(this).closest('.Item')).remove();
               });
    */
    

    in \forum\applications\vanilla\js\discussion.js

      +++    function FileUpload_DisplayCorrect(this_)
      +++    {
      +++    x=$('.Comment > .Attachments', $(this_).closest('.Item'));
      +++    if (x.css('display')=='none'){x.show();}else{x.hide();}
      +++    }
    
    
       // Reveal the textarea and hide previews.
       $('a.WriteButton, a.Cancel').livequery('click', function() {
    
         +++ FileUpload_DisplayCorrect(this);
    
    
       // Edit comment
       $('a.EditComment').livequery('click', function() {
    
        +++  FileUpload_DisplayCorrect(this);
    
  • dont use /* and */ to comment out JS or php

    There was an error rendering this rich post.

  • ?

    hmm, I always use this commenting way.

    P.S. You can look into the discussion.js -
    i've just found there the string '/* Options */'

    Is it an error ? :)

  • You are correct. /* is perfectly acceptable.

    But, most coders would use ( at least all the ones I know ) //

    In js you can use all three commenting systems.

    //
    /* and
    <!--

    But for my usage I always use //

    There was an error rendering this rich post.

  • /* has some utility, but can also trip you up. I usually use it only within a line to comment out a section of a line. I dont use it to comment a full line or a block of lines.

    // is better for full line comments generally. As it is clearer and helps to make each line remain consistant on indent.

  • edited May 2012

    When you debug Your code you may use

    //*

    a large block of code

    //*/

    This form gives you a quick way to comment\uncomment a block
    by the only starting slash.

  • edited May 2012

    in \forum\applications\vanilla\js\discussion.js

    Modifying core files means that your changes will get overwritten during version upgrades. Not a wise idea.

    I can't figure out from your code what changes you are suggesting be made to link_files.php.

    This plugin has been giving me so many headaches for months on end; it is literally shocking how such an important piece of functionality can be handled so cavalierly, and by a core dev, too.

    But I just found a key piece of the puzzle of what's been broken -- part of Vanilla core (uploads) just doesn't work on XAMPP etc on Windows. So there's that, anyway.

  • From that same thread:

    jetman said:
    Seems a function Gdn_Upload::Parse is broken on Windows.

    Try to comment the line $Name = str_replace('\\', '/', $Name); in library/core/class.upload.php

    There was an error rendering this rich post.

  • Yep, that works for me on localhost.

  • edited May 2012

    stavthewonderchicken said:

    in \forum\applications\vanilla\js\discussion.js

    Modifying core files means that your changes will get overwritten during version upgrades. Not a wise idea.

    Then you may wait until the same changes are made in public core. And It would be a very wise idea - to have bugs and wait for years.

    stavthewonderchicken said:
    I can't figure out from your code what changes you are suggesting be made to link_files.php.

    For understanding You need to open this little file in the editor to see changes.
    It wouldn't be a problem for some lines of code if you of course have no bad eyesight .

  • edited May 2012

    @johansonlocker Holy hell, man, back off. I realize that other people are snarky and unhelpful around here, but I've never said an unkind thing to you. I just wanted some clarification on the code you posted, was all.

    This sort of attitude is why I stay away from here these days.

  • @stavthewonderchicken

    I think if you re read what he put, he wasnt having a go. I read it differently to you .. I think.

    There was an error rendering this rich post.

  • I don't understand, then, I guess.

  • Lol join the club.

    There was an error rendering this rich post.

Sign In or Register to comment.