WordPress.org

Ready to get started?Download WordPress

Forums

Eazyest Gallery
[resolved] Captions and name in subfolders table shows extra characters (in admin) (9 posts)

  1. klihelp
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    In the plugin context, the Subfolders table are not consistent with the main Folders table.
    There are some extra characters before the subfolder caption and name. Even more extra characters for Sub-SubFolders ... and so on for sub-sub-..-subfolders.

    http://wordpress.org/extend/plugins/eazyest-gallery/

  2. klihelp
    Member
    Plugin Author

    Posted 1 year ago #

    This is how I fixed in the plugin:

    Display Caption without the extra - characters:

    in admin/class-eazyest-folder-list-table.php#Line521
    
    // $pad = str_repeat( '— ', $level );
    $pad = '';

    Display Name without the extra - characters:

    # in admin/class-eazyest-folder-editor.php
    # Line926
    // $edit_name  = str_repeat( '— ', substr_count( $gallery_path, '/' ) ) . $edit_name;
    $edit_name  = substr_count( $gallery_path, '/' ) . $edit_name;
    
    # in admin/class-eazyest-folder-editor.php
    # Line891 - add line before the foreach()
    $current_directory = ezg_get_gallery_path( $post_id ); 
    
    # Line894
    // $edit_name  = str_repeat( '— ', substr_count( $gallery_path, '/' ) ) . $edit_name;
    	$edit_name  = str_repeat( '— ', substr_count( $directory, '/' ) - substr_count( $current_directory, '/' ) ) . $edit_name;
  3. Marcel Brinkkemper
    Member
    Plugin Author

    Posted 1 year ago #

    The extra characters show the depth of your folder in hierarchy, just like sub-pages. So two dashes has a parent and granparent folder.

  4. klihelp
    Member
    Plugin Author

    Posted 1 year ago #

    Check the above code and you will see.

    In any level of subfolder page, much nicer to
    - shows no dash for it's immediate children
    - 1 dash for sub-subfolder, ...

    Otherwise if you are in the eg.5th level subfolder than the Subfolder names gets very long and people will get confused because of the dashes ...

  5. Marcel Brinkkemper
    Member
    Plugin Author

    Posted 1 year ago #

    I'll think about it for 0.2

  6. klihelp
    Member
    Plugin Author

    Posted 1 year ago #

    Looks like this is fixed, table looks nice.

  7. klihelp
    Member
    Plugin Author

    Posted 1 year ago #

    Not yet, dashes for Subfolder's children not relative to the Subfolder.

  8. Marcel Brinkkemper
    Member
    Plugin Author

    Posted 1 year ago #

    Please try trunk, it also fixes the error of invisible subfolders.

  9. klihelp
    Member
    Plugin Author

    Posted 1 year ago #

    Fixed, looks nice.
    What are the invisible subfolders?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic