Viewing attachments in units

Home Forums Legacy Support Support queries Other issues Viewing attachments in units

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #263407
    Nibu2019
    Participant
    Hello, When you insert an attachment in a chapter, it sometimes appears in text, sometimes in image. How can we adjust this parameter? This example with 3 files : 1 docx and 2 pdf. PDF_link Thanks
    #263415
    Nibu2019
    Participant
    I tried to deactivate the plugins one by one but nothing changes!
    #263734
    Veronica
    Moderator
    hi, wired!! i have never faced this type of error are you using any cache plugin if yes then try to disable this and then check if the same persist  
    #264519
    Nibu2019
    Participant
    I'm sorry, but I'm not the only one. The teachers insist that I find a solution. What can I do ?. This topic I tried to add the code as explained in the topic, but it doesn't work. I disabled plugins one by one as recommended in the topic, but nothing changes Can you transfer my problem to Alex who has already worked on this problem?
    #264538
    Nibu2019
    Participant
    When I insert an April PDF from the media, I don't have this problem.
    #264542
    Nibu2019
    Participant
    The problem comes in my opinion from a plugin that I had installed: PDF Embedder Premium When you upload a pdf, it automatically creates image files in 4 copies of different formats. I uninstalled it but the files keep creating automatically. I just uploaded a jpeg file. When I go to the uploads directory, I find 10 copies of this file in different formats. Has my wplms been hacked? What can I do to stop this?
    #264809
    Nibu2019
    Participant
    I contacted the PDF Embedder plugin support, but the problem does not come from there. I hope we can find a solution to this problem ;-)
    #264816
    Anshuman Sahu
    Keymaster
    Please share your site url , admin credentials in private reply to check this .
    #264824
    Nibu2019
    Participant
    This reply has been marked as private.
    #265117
    Anshuman Sahu
    Keymaster
    Well we are using a wordpress function " wp_get_attachment_link "   in which the either the wordpress itself or some third party plugin is showing review  . Please try adding this custom css in your wp-admin -> appearance -> customize -> custom css in order to hide the thumbnail : ul#attachments i.fa.fa-file-pdf-o+a img {display:none;}  
    #265147
    Nibu2019
    Participant
    Hello, The code did not work. Sorry! I'm going to make a little video : Pdf_after_march_problem The problem only manifests itself for pdf uploaded from May. If we take a pdf from a previous month, the problem does not arise. If it was a plugin problem, it shouldn't do it every time. Finally, we can see that some pdf files from May appear with a black band in the media. I saw that this problem was part of the upcoming fixes for version 4.0 Have a nice day ;-)
    #265183
    Nibu2019
    Participant
    I just deleted the other codes from my CMS leaving only yours and this time, I no longer have the image but I also do not see the name of the pdf. Pdf_title_no_show Half the problem is solved ;-)
    #265506
    Anshuman Sahu
    Keymaster
      Please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :   add_action('wplms_before_every_unit',function(){ add_filter('wp_get_attachment_link',function($link,$id,$size,$permalink,$icon,$text,$attr){ $_post = get_post( $id ); if ( empty( $_post ) || ( 'attachment' !== $_post->post_type ) || ! wp_get_attachment_url( $_post->ID ) ) { return __( 'Missing Attachment' ); } $url = wp_get_attachment_url( $_post->ID ); if ( $permalink ) { $url = get_attachment_link( $_post->ID ); } $link_text = $_post->post_title; if ( '' === trim( $link_text ) ) { $link_text = esc_html( pathinfo( get_attached_file( $_post->ID ), PATHINFO_FILENAME ) ); } return "<a href='" . esc_url( $url ) . "'>$link_text</a>"; },999999,7); });
    #265541
    Nibu2019
    Participant
    It's perfect. Thank you very much. You can close this topic ;-) Good evening !
    #266054
    Veronica
    Moderator
    thanks to confirm topic closed #staysafe
Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Viewing attachments in units’ is closed to new replies.