WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MooTools Tree Creator
[resolved] Link to page URL (12 posts)

  1. josjee
    Member
    Posted 5 months ago #

    Hi,

    I want to use your plugin on my site. It's clean and simple to use but I have one request.

    I added people (branches) and I created a 'people hiearchy'.

    Now I want that, when people are somewhere scrolling in the tree/branches, that they can click on a name of a person and then the homepage (URL) of that person should open. Is this possible (without to much coding)?

    Thanks,
    JosJee

    https://wordpress.org/plugins/wp-moo-tree/

  2. dunar21
    Member
    Plugin Author

    Posted 5 months ago #

    It's in the documentation. When you set up a tree category, at the bottom of the edit screen is an input box where you can customize the javascript that is acting on the tree clicks. Try changing :

    milkbox.openWithFile({ href:node.data.url, title:node.linkcaption + " : " + node.linkdesc, size:"width:600,height:350"}, {overlayOpacity:1, resizeTransition:"bounce:out", centered:true});

    to

    window.location.href = '...';

  3. josjee
    Member
    Posted 5 months ago #

    Thanks for your quick reply. I will have a look.

    -JosJee

  4. tinshu
    Member
    Posted 4 months ago #

    I just installed the plugin but nothing is showing on the page where I placed the shortcode at http://www.bueachurch.org/discipleship-tree/

    Is the plugin not compatible with WP 3.9 or what am I not doing right?

    I see the Expand/Contract buttons but not the tree.

    Thanks for your help

  5. dunar21
    Member
    Plugin Author

    Posted 4 months ago #

    No, it's compatible with v3.9, just checked. I do not actively maintain this plugin and will provide an update to the information indicating this at some point, but I did just check and it works fine with v3.9. Have you create your first mootree category? Have you created any "branches" yet? You have to use the category id withing the shortcode, have you done that? Please go through the documentation first and make sure you have covered all your bases.

  6. tinshu
    Member
    Posted 4 months ago #

    Thanks dunar for getting back. Much appreciated.

    I took some time to read documentation before installing.

    After installing, I created a moo-tree directory through 'Tree Category' called 'BCC Discipleship Tree' then used its slug 'bcc-discipleship-tree' in the short code such that my short code became:

    [moo_tree category="bcc-discipleship-tree"]

    I then created 'Branches and published them under the category 'BCC Discipleship Tree'.

    I created a page and placed my short code there but can't see the tree.

    Many thanks for your help

    Tinshu

  7. dunar21
    Member
    Plugin Author

    Posted 4 months ago #

    You cannot put the category slug (although maybe I should have made it to accept that as well). You must use the id of the category, so either hover over the category or click it and the category id will be in the url. Replace the slug with the category id and your tree should appear.

  8. tinshu
    Member
    Posted 4 months ago #

    I followed the Installation instructions that said:

    "Use the shortcode [moo_tree category="{ASSIGNED_CATEGORY_SLUG}"] where {ASSIGNED_CATEGORY_SLUG} is replaced with a category slug name. This category slug can be found after you have created a category. It will be displayed in the "Tree Categories" page. That page will list 4 attributes of the category: Name, Description, Slug, Branches."

    However, I replaced the slug with the category ID so that my short code became:

    [moo_tree category="56"]

    But nothing is showing

  9. dunar21
    Member
    Plugin Author

    Posted 4 months ago #

    You are right. It is the slug and not the id. I have not touched this plugin since I uploaded it on the repository. It does work, and it does work with the latest wordpress update. Change it back to the slug. Also, email me at aryanduntley@gmail.com and send the url. I will quickly check to see if there is some sort of javascript issue or conflict on your site that is causing the malfunction (it is almost definitely a js issue).

  10. dunar21
    Member
    Plugin Author

    Posted 4 months ago #

    PS. I'm in SE Asia right now, so internet is on and off, depending on where I'm at, also I'm sort of on vacation so I'm not always on the computer. Responses may be delayed.

  11. dunar21
    Member
    Plugin Author

    Posted 4 months ago #

    You have an error in the "featured content gallery" plugin that also uses moo-tools (an older version - 1.11). It says "String contains an invalid character". Disable that plugin and try again. It should work. If it does, then you can either find another solution to your featured content gallery plugin, or either remove the enqueue script for that plugin's call to mootools (because you are already using it in my plugin this may cause conflict if certain calls to the older mootools library are depricated) or call a wp_dequeue_script in your functions file to remove it.

    Looking at the code you have, you are actually calling the mootools library three times. Once for the featured content gallery (v1.11), once for my plugin (I'm not sure what version is being used, I should have probably included a version number, but it's available in the file), and once generically by way of google api's (meaning it's being called externally also, likely to the latest version). So, you really should be calling the mootools library only once. If there is code there that calls the latest version from google api's then you should try dequeueing both mine and the one for the other plugin (I will not be updating this so no need to worry about updates, I don't know about the other plugin you are using though), and see if the latest library is compatible with all of the plugins.

    In reality, I should have made this plugin with jQuery or vanilla javascript instead, to better prevent against compatibility issues. My plugin is NOT the problem you are having now, I'm just stating this because it's better to stick with what's already included with wordpress instead of including all sorts of other external libraries if it can be helped (in my opinion). Anyway, disable the plugin aforementioned and see if that helps. I believe it will. The bug in that plugin's code is an issue that can could likely cause problems with any other javascript on the site where the problematic mootools library is being called (which will be anywhere that plugin is in use if it was made well, otherwise, it will be a site-wide problem). So, you really should dump that one, submit a bug report to the author and find another solution for it in the mean time.

  12. dunar21
    Member
    Plugin Author

    Posted 4 months ago #

    Looking further at your site, it seems as though the error is only occurring on the page where you are trying to use my plugin (which is the only page that my plugin calls the mootools library). So, it's not necessarily an issue with the mootools library version the featured content gallery is using, but rather, a conflict with the two different version on the same page. I am also now getting a corresponding error with the library version I'm using in my plugin. This simply indicates a conflict with the two versions. So, again, you have two solutions. 1. Remove one of the plugins. 2. Make sure that the mootools library from the featured content gallery is NOT being called on the page you are using my plugin. That can be accomplished with a call to wp_dequeue_script, but you would have to know the id of the script being used by the other plugin (which will take a quick look at their code). Then you can put a hook in your functions.php file that looks something like this:

    if(is_page('discipleship-tree')){wp_dequeue_script("SCRIPTID");}

    Take note that you have to replace "SCRIPTID" with the id of the script that is being called by the featured content gallery plugin.

Reply

You must log in to post.

About this Plugin

About this Topic