• Resolved wexfordit

    (@wexfordit)


    I’d like to simplify the front end Document Library View. I’ve eliminated all columns except the name. Now I want to change the link on the name to open the document with a direct link in a new tab. There are no restrictions, all documents are viewable by everyone. I’ve removed the htaccess file so that the file will now open with a direct link. I just need to find the code where the link on the filename is created and replace it with a direct link. Can you tell me where I would find it?

    Thanks!

    The page I need help with: [log in to see the link]

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

    (@bhaldie)

    Hi,

    The file you are looking for is mdocs-file-info-small.php starting at line 57:

    
    <td id="title" class="mdocs-tooltip" colspan="<?php echo $title_colspan; ?>">
    					<div class="mdocs-btn-group btn-group">
    						<?php
    						if(get_option('mdocs-hide-name')) $name_string = $new_or_updated.$file_status.$post_status.mdocs_get_file_type_icon($the_mdoc).' '.$the_mdoc['filename'].'<br>'.$scheduled;
    						elseif(get_option('mdocs-hide-filename')) $name_string = $new_or_updated.$file_status.$post_status.mdocs_get_file_type_icon($the_mdoc).' '.str_replace('\\','',$the_mdoc['name']).'<br>'.$scheduled;
    						else $name_string = $new_or_updated.$file_status.$post_status.mdocs_get_file_type_icon($the_mdoc).' '.str_replace('\\','',$the_mdoc['name']).' - <small class="text-muted">'.$the_mdoc['filename'].'</small><br>'.$scheduled;
    						
    						
    						?>
    						<a class="mdocs-title-href" data-mdocs-id="<?php echo $index; ?>" data-toggle="<?php echo $data_toogle; ?>" href="#" ><?php echo $name_string; ?></a>
    						
    						<ul class="<?php echo $dropdown_class; ?>" role="menu" aria-labelledby="dropdownMenu1">
    							<li role="presentation" class="dropdown-header"><i class="fa fa-medium"></i> » <?php echo $the_mdoc['filename']; ?></li>
    							<li role="presentation" class="divider"></li>
    							<li role="presentation" class="dropdown-header"><?php _e('File Options'); ?></li>
    							<?php
    								mdocs_download_rights($the_mdoc);
    								mdocs_desciption_rights($the_mdoc);
    								mdocs_preview_rights($the_mdoc);
    								mdocs_versions_rights($the_mdoc);
    								mdocs_rating_rights($the_mdoc);
    								mdocs_goto_post_rights($the_mdoc, $the_mdoc_permalink);
    								mdocs_share_rights($the_mdoc, $the_mdoc_permalink);
    								if(is_admin()) { ?>
    							<li role="presentation" class="divider"></li>
    							<li role="presentation" class="dropdown-header"><?php _e('Admin Options'); ?></li>
    							<?php
    								mdocs_add_update_rights($the_mdoc, $current_cat);
    								mdocs_manage_versions_rights($the_mdoc, $index, $current_cat);
    								mdocs_delete_file_rights($the_mdoc, $index, $current_cat);
    								if(get_option('mdocs-preview-type') == 'box' && get_option('mdocs-box-view-key') != '') {
    									mdocs_refresh_box_view($the_mdoc, $index);
    								}
    							?>
    							<li role="presentation" class="divider"></li>
    							<li role="presentation" class="dropdown-header"><i class="fa fa-laptop"></i> <?php _e('File Status', 'memphis-documents-libaray'); echo ':'.' '.ucfirst($the_mdoc['file_status']); ?></li>
    							<li role="presentation" class="dropdown-header"><i class="fa fa-bullhorn"></i> <?php _e('Post Status', 'memphis-documents-libaray'); echo ':'.' '.ucfirst($the_mdoc['post_status']); ?></li>
    							<?php } ?>
    						  </ul>
    					</div>
    			</td>
    

    This is where you can edit the dropdown and change it to a direct link.

Viewing 1 replies (of 1 total)

The topic ‘Simiplified Front End View’ is closed to new replies.