Forums

WP-dTree
[resolved] Little idea. Add filter to exclude a category tree. (12 posts)

  1. @wikicms
    Member
    Posted 10 months ago #

    Hello ulfben. I do site to WordPress 3.2.1 and I plan to use your plugin WP-dtree. But unfortunately there is no filter for the category - to exclude a category tree. I'm doing a site for translation of documentation and will have ~700 categories. The structure would look like - Uncategorized (level 1, they will not be displayed on site) - will not change it, it will remain so. Then under it will be from 7 to 10 subcategories (level 2, they will be displayed on site). And in each of the categories of Level 2 will be the other category (will be displayed on site). Please tell me how to add a filter in your plugin? After all, it will be easier to exclude six categories of level 2 (or level 3,4...), instead of many. Sorry if I did not understand your plugin. Thank you.

    http://wordpress.org/extend/plugins/wp-dtree-30/

  2. ulfben
    Member
    Posted 10 months ago #

    The exclusion list of any WP-dTree widget takes a comma separated list of post, category, page or link IDs. But there's currently a bug so category exclusion doesn't work in archive or category trees.

    If you're in a hurry, pay someone to look at that for you. Send me the patches and I'll happily include them in the main branch.

  3. @wikicms
    Member
    Posted 10 months ago #

    I'm yet not exactly in a hurry ... But I'll follow your advice.
    Thanks.

  4. @wikicms
    Member
    Posted 10 months ago #

    Hi ulfben, again :)
    I adapted your plugin. Now he has no errors to version 3.2.1, even wp_debug = true.
    wp-dtree.php
    38 load_plugin_textdomain('wpdt', WP_PLUGIN_DIR.'/wp-dtree-30/lang/'); changed to
    load_plugin_textdomain('wpdt',false, WP_PLUGIN_DIR.'/wp-dtree-30/lang/');
    40 $wpdt_tree_id = array('arc' => 0, 'cat' => 0, 'pge' => 0, 'lnk' => 0); changed to
    $wpdt_tree_ids = array('arc' => 0, 'cat' => 0, 'pge' => 0, 'lnk' => 0);
    90 add_options_page('WP-dTree Settings', 'WP-dTree', 8, WPDT_BASENAME, 'wpdt_option_page');
    changed to
    add_options_page('WP-dTree Settings', 'WP-dTree', 'manage_options', WPDT_BASENAME, 'wpdt_option_page');

    ..and attribute_escape changed to esc_attr on most files.

    Also, I'm trying to decide how to exclude categories. I just started learning PHP, so little versed yet, but here's an interesting example found

    $arr = array( "A", "B", "C" );
    unset( $arr[1] );
    // now $arr = array( "A", "C" );

    is it possible to use in your plugin?

  5. ulfben
    Member
    Posted 9 months ago #

    Hey! Those are good catches.

    They're in the development version now. I've got a bunch of fixes to do before releasing a new stable, but I'd appreciate it if you tried this and make sure your fixes we're applied correctly.

    Thanks a million!

  6. @wikicms
    Member
    Posted 9 months ago #

    You went back to work? :) Cool! I am very happy!
    =====
    Oh .. In the description you said: "Dynamic tree-widgets to replace the standard widgets," but in the Appearance-> Widgets are duplicated. Maybe add in the options such an item - "Turn off the standard widgets"

    function disable_dublicate_widgets() {
    unregister_widget('WP_Widget_Archives');
    unregister_widget('WP_Widget_Links');
    unregister_widget('WP_Widget_Pages');
    unregister_widget('WP_Widget_Categories');
    }
    add_action( 'widgets_init' , 'disable_dublicate_widgets' );

    Well? :))

  7. ulfben
    Member
    Posted 9 months ago #

    Nah. The built in and WP-dTree widgets are clearly named and shouldn't confuse anyone.

    The wording might be ill advised ("to replace" should perhaps be "to use instead of") but it doesn't make sense to remove functionality from a users blog.

  8. kchikkala
    Member
    Posted 9 months ago #

    http://www.cloud24by7.com

    i am dtree wordpress plugin.

    i would like to left align all the nodes (folders and files inside the tree)

    so, can you please give the css code or help me out how to do that

  9. ulfben
    Member
    Posted 9 months ago #

    No. I don't do style support.

    http://wordpress.org/extend/plugins/wp-dtree-30/faq/

    Also, you're off topic. Read this.

  10. kchikkala
    Member
    Posted 9 months ago #

    ok. thanks for the faster reply.

    But please tell me what are the css classes i need to override or define to get the left alignment for all the nodes (folders and files).

    please do this for me.

    Also, when can we expect the next version of dTree Plugin.

    Will you give me a commercial support for the plugin to have css styling

  11. ulfben
    Member
    Posted 9 months ago #

    I don't do style support because I'm not competent enough to do it well.

    You're still off-topic (this thread is about filtering the dtree contents) and need to find another forum to ask for CSS support.

  12. @wikicms
    Member
    Posted 9 months ago #

    Oops :)) I do not unsubscribe from this thread:)) Letters to the email arrived ... Change it to "resolved".
    Thank ulfben, plugin works fine.

Reply

You must log in to post.

About this Plugin

About this Topic