Support » Plugin: File Manager » The plugin does not search .doc files – suggested parser below

  • Resolved rweil55

    (@rweil55)


    The plugin does not search .doc files (“application/msword”)
    The parser below does that.
    Create a file with this code.
    Add the include of that file in class_wp_file_search around line 133
    Insert the appropreate call in class_wp_file_search around line 354

    <?php
    include_once ‘parser.php’;

    class DocParser
    implements Parser {

    public static
    function parse( $filename ) {
    $striped_content = ”;
    $content = ”;
    $fileHandle = fopen( $filename, “r” );
    $line = @fread( $fileHandle, filesize( $filename ) );
    $lines = explode( chr( 0x0D ), $line );
    $outtext = “”;
    foreach ( $lines as $thisline ) {
    $pos = strpos( $thisline, chr( 0x00 ) );
    if ( ( $pos !== FALSE ) || ( strlen( $thisline ) == 0 ) ) {} else {
    $outtext .= $thisline . ” “;
    }
    }
    $outtext = preg_replace( “/[^a-zA-Z0-9\s\,\.\-\n\r\t@\/\_\(\)]/”, “”, $outtext );
    write_log ($outtext);
    return $outtext;
    }

    }

Viewing 1 replies (of 1 total)
  • Plugin Author mndpsingh287

    (@mndpsingh287)

    Hey rweil55,

    Thanks for contacting the support. We checked our code there’s no problem in our plugin like this. It might be conflicting with one of your plugins or can be server issue.

    Thanks,
    Mandeep Singh
    Support Team

Viewing 1 replies (of 1 total)
  • The topic ‘The plugin does not search .doc files – suggested parser below’ is closed to new replies.