Frequently Asked Questions

Most the texts used in Mosets Tree's front-end can be overrided through Joomla's Language manager.

Alternatively, you can insert the following text:

COM_MTREE_ROOT="Directory"

to the the override file located at this location in your joomla path:

/language/overrides/en-GB.override.ini

Be sure to replace the word 'Directory' with the replacement you want, and replace the override file name's 'en-GB' prefix, if the language you are overriding is not English language.

Description field by default strips HTML tags. In order to use and allow HTML tags in Description, follow these steps:

  1. Login to the back-end
  2. Go to Mosets Tree
  3. Click Custom Fields
  4. Click 'Description'
  5. Scroll to the lower part of the page and you will see a list of parameters
  6. Set the following parameters:
    • Strip all HTML tags in Summary view - Yes
    • Strip all HTML tags in Details view - No
    • Parse URL as link in Details view - No
    • Strip all HTML tags before storing to database - No

This will allow you to use HTML tags in description field. Please note that HTML tags will be stripped in Summary view and only shown in Details view.

The steps outlined here applies to other component as well.

  1. Login to yout website's administrator back-end.

  2. Goto "Menus Main Menu"

  3. Look for a Mosets Tree menu item in the list of menus. Otherwise you need to create one:

    • Click the "New" icon.
    • Click "Select" and choose "Mosets Tree > Home" for the 'Menu Item Type'.
    • Enter a title to "Title"
    • Click the "Save" icon on top of the page to save this new menu item.
  4. To publish this menu item to your site's frontpage, look for the menu item in the list of menu items and click on the icon under "Home" column. This will mark the menu item as your site's frontpage.

Data in Mosets Tree are stored in 2 places. The main data are stored in the database and the uploaded images and attachments are stored in the file system.

Images and Attachments

/media/com_mtree/images/cats/
/media/com_mtree/images/listings/ /media/com_mtree/attachments/

The 3 directories above contains all uploaded images (both original and scaled version) for categories & listings and listings' attachments. If you have any uploaded images or attachments in your directory, make sure you back up these 2 directories, including all its sub-directories and files.

Database

Assuming your database is using 'jos_' as the database prefix, backup all tables that start with jos_mt_*. Most hosting provider provide an interface through phpMyAdmin for you to export the data in a SQL file. Be sure to export the data structures and the data.

Templates

/components/com_mtree/templates/

All Mosets Tree templates are stored in the above directory in its own sub-directory. Mosets Tree comes with a default template called 'Banyan' which is stored at /components/com_mtree/templates/banyan/. If you did not modify the default template, you can skip this directory, otherwise, backup all files and directories in this template directory.

Most of the load time issue in the back-end is cause by the time needed to load all categories in the Explorer menu. You can reduce the time needed for this by reducing the number of levels (of categories) the explorer load:

  1. Goto Mosets Tree Configuration
  2. Click on Admin tab
  3. Set Explorer's Tree Level: to 1

The above setting will load only 1 level of categories in your Explorer, reducing the time needed to load Mosets Tree's back-end pages.

You can reorder the images by clicking and dragging the image and release. It's like drag-and-drop on your desktop.

Mosets Tree allows you to use Joomla content plugins in your listings' description field. However this is disabled by default. To enable content plugin support, follow these steps:

  1. Login to your site's the back-end.
  2. Go to Mosets Tree Custom Fields
  3. Click 'Description' to edit the field.

Look for the parameter named "Parse Content Plugin" and set it to Yes. Click 'Save' to save the field.

MT Importer currently only allows you to mass import listings. You can't import or create categories using this tool. However, if you are comfortable with MySQL, you can import categories through MySQL or phpMyAdmin. Here's a sample SQL query you can use to import one category:

INSERT INTO `jos_mt_cats` (`cat_name`, `alias`, `cat_desc`, `cat_parent`, `cat_published`, `cat_approved`) VALUES ('Category Name', 'category-alias', 'Description', 0, 1, 1);

Here are the details of the query:

  • cat_name and cat_desc is the category name and category description respectively
  • alias is a shorthand for the category, used in SEF URL. Alias preferably should contain only alphanumerics and dashes.
  • cat_parent refers to the parent category of the category that is being added. If you're adding it to the root, set this to 0. Since you need to have the cat_id before you can assign a '_catparent', you'll need to create top level categories first and work your way down from there
  • cat_published and cat_approved control the status of the category. Both should be set to 1 if you want to publish the category to front-end

Once you have done the 'INSERT's, login to your site's back-end and run this URL:

https://www.example.com/administrator/index2.php?option=com_mtree&task=rebuild_tree

Replace 'www.example.com' with your site's domain and path. This URL will build the 'lft' and 'rgt' column's value which is needed for use in Mosets Tree.

The quickest way to clear all listings in your directory is by running these SQL queries queries to your database:

TRUNCATE TABLE `jos_mt_cl`;
TRUNCATE TABLE `jos_mt_links`;
TRUNCATE TABLE `jos_mt_cfvalues`;
TRUNCATE TABLE `jos_mt_cfvalues_att`;
TRUNCATE TABLE `jos_mt_favourites`;
TRUNCATE TABLE `jos_mt_images`;
TRUNCATE TABLE `jos_mt_links_associations`;
TRUNCATE TABLE `jos_mt_reviews`;

The query above assume you have 'jos_' as your database table prefix. Replace it with your site's database table prefix before running the queries.

If your listings contain images or attachments, go to these directories on your server and delete all files:

  • /media/com_mtree/images/listings/o/
  • /media/com_mtree/images/listings/m/
  • /media/com_mtree/images/listings/s/
  • /media/com_mtree/attachments/

Warning: Running the above SQL queries will remove all listings in your directory. Make sure you know what you're doing before running it.

You can use the following SQL queries to reset Unique Pageviews, Website Clicks, Votes and Reviews. This is useful when you gathered these data during development phase and wish to reset it before deploying your directory to a live site:

// Reset Unique Pageviews
UPDATE jos_mt_links SET link_hits = 0;

// Reset Website Clicks
UPDATE jos_mt_links SET link_visited = 0;

// Reset Votes
UPDATE jos_mt_links SET link_votes = 0, link_rating = 0;
DELETE FROM jos_mt_log WHERE log_type = 'vote';

// Reset Reviews
TRUNCATE TABLE jos_mt_reviews;
DELETE FROM jos_mt_log WHERE log_type IN ('review','replyreview','votereview');

Manage reviews in Mosets Tree

The screenshot above shows where you can click to manage reviews in Mosets Tree's back-end. The link to this page is available on the same row where you have your listings, under "Reviews" column. Clicking on this link will bring you to an interface where you can manage reviews for that particular listing.

Mosets Tree uses Joomla's Breadcrumbs (mod_breadcrumbs) module to show show its directory breadcrumbs.

To publish the Breadcrumbs module:

  1. Login to your site's back-end.
  2. Go to: System Manage Site Modules
  3. Click the "New" icon on top to create a new module instance.
  4. Search and select "Breadcrumbs" module.
  5. Fill in the module's "Title" and click "Save & Close".

Mosets Tree allows you to show a Google Map with a marker in each listings. When you create a new listing, this marker is placed on a default location in Africa.

Follow the steps below to change this default location:

  1. Login to your site's back-end.
  2. Go to /administrator/index.php?option=com_mtree&task=config&show=all
  3. Replace with your Joomla's site domain.
  4. Click on the "Features" tab.
  5. Look for the following 2 options in this tab: map_default_lat and map_default_lng. This is the default latitude and longitude value used to load the default marker position in Google Maps.
  6. Enter new longitude and latitude values corresponding to the new default coordinate you want Google Maps to load.
  7. Click the Save icon on top.

The size of Google Maps in a listing details view are defined in this template file:

/components/com_mtree/templates/banyan/sub_map.tpl.php in line 3 - 4:

    $width = '100%';
    $height = '300px';

Changing the value of the width and height will resize the Google Maps in listing details view.

The message "No records found" appears when you browse to a Mosets Tree category that contains no listings.

If you do not intend to have listings in a category and wish to remove that message, here are the steps you can disable the message:

  1. Login to your site's the back-end.
  2. Go to: Mosets Tree
  3. Browse to the category and edit it.
  4. The right side of "Edit Category" page, there is an option called "Show Listings". Set this to No.
  5. Click the "Save" button to save your changes.

This setting will hide listings from being shown in the category that you have edited. It will also hide the "No records found" message.

Categories image by default is shown only when you view the category page. You can configure your template to have the images to show in index page:

  1. Login to your site's back-end.
  2. Go to: Mosets Tree > Templates > Banyan
  3. Look for the parameter named "Show Categories' images" to Yes. This will display your category images in Index page.
  4. Click the Save icon on top right of the page to save the changes.

About CAPTCHA in Mosets Tree

Mosets Tree supports CAPTCHA by making use of Joomla's CAPTCHA plugin. Joomla comes with 2 CAPTCHA plugins pre-installed and Mosets Tree works with both of them. This article will use reCAPTCHA service as an example, but you can use any other CAPTCHA plugin with Mosets Tree.

Enable CAPTCHA in Joomla

To use CAPTCHA in Mosets Tree, you first need to enable reCAPTCHA in Joomla. You can refer to this tutorial in Joomla's documentation on the instructions to do this. Once you have completed the tutorial, you'll see reCAPTCHA appearing om your site's front-end Register and Contact Us form. This means that you've successfully enabled reCAPTCHA on your site.

Enable CAPTCHA in Mosets Tree

CAPTCHA is not enabled by default in Mosets Tree. You can enable it going to Mosets Tree's Configuration, under "Captcha" tab. This tab contains 5 configurations that let you control which form (Review, Contact Owner, Report Listing, Report Review and Recommend) to use CAPTCHA. Set all (or just the one you need) to Yes to enable CAPTCHA. Click Save to save your changes. Once you have done these, you will see CAPTCHA appearing in each of the Mosets Tree forms you've selected to use CAPTCHA.

Enable CAPTCHA in Mosets Tree Add Listing form

To use CAPTCHA in Mosets Tree's front-end Add Listing form, create a new custom field based on "Captcha" field type. A few things to note about Captcha field type in Mosets Tree:

  • It only appears in front-end when adding a new listing.
  • It does not appear when you editing existing listing.
  • It does not appear in back-end.

Once published, it requires a correct answer to the Captcha test-challenge in order for a listing to save.

The answer is not saved to Mosets Tree.

MT Importer is the primary tool that helps you to mass import large number of listings using CSV formatted data. Because it accepts CSV format, only text-based data are supported. Non-text data such as images are not imported.

The new 'Image Images' tool introduced in Mosets Tree 3, helps you to work around this issue by reading URLs from a custom field and convert it to a listing image. This tool together with MT Importer enable you to import text-based data and images. There are 2 typical workflows when using this tool.

Importing image URLs directly from CSV

This method is the easiest and most straightforward, but it requires that your script has the ability to export its images URL as part of their export routine. Once you've manage to prepare the CSV file, import them using the MT Importer tool and finally use the 'Import Images' tool to import the images to your listings.

Importing image URLs through SQL query

An alternative way would be to programatically insert the URL value to by running the following SQL query to your database:

INSERT INTO `jos_mt_cfvalues` (`cf_id`, `link_id`, `value`)
    VALUES (Custom Field ID,Listing ID,'http://example.com/path/image.jpg'); 

Note: Replace 'jos_' with your site's database table prefix, Custom Field ID with the ID of a weblink custom field and Listing ID with the ID of the listing that the image belongs to.

Once you've execute the queries, use the 'Import Images' tool to import the images to your listings.

Although you can change a custom field's field type from Tag to Checkbox, doing so directly from Mosets Tree's back-end UI may not be ideal due to the way data is stored in Tag and Checkbox field type. It may cause data loss when you or your users save their listings.

The following steps let you perform the conversion safely, without data loss:

  1. Create a new custom field based on Checkbox and note its custom field ID. In this example, let say the custom field ID is 100. Also note down the custom field ID of your existing Tag custom field. Again, as an example, we assume this is 90.

  2. Edit the new Checkbox field and populate its Elements input box with all possible values your users will enter. The tricky part here is knowing what your users has already entered and make sure that value is available as elements too. If a value that has been entered by your user but not in the list of elements, the value will be lost when users save their listing in the future.

    Each elements are separated by the bar character |.

    If you have access to MySQL or phpMyAdmin, you can perform the following query to return all values saved by your users, so that you know what to populate in the Elements box:

    SELECT * FROM jos_mt_cfvalues WHERE cf_id = '90';

    Note: replace jos_ with the database table prefix your site uses.

  3. Now that you have the new Checkbox field ready, it's time to copy the data from your existing Tag custom field to it. Run the following SQL query:

    INSERT INTO jos_mt_cfvalues (`cf_id`, `link_id`, `value`) SELECT '100', `link_id`, REPLACE(REPLACE(`value`,', ',','),',','|') FROM jos_mt_cfvalues WHERE `cf_id` = 90;

Once you've perform the steps above, test the new Checkbox field to make sure the values are properly converted from your Tag field. You can then unpublish and eventually remove the old Tag custom field.

Additional Notes

The steps above is applicable to converting your custom fields from Tag field type to Checkbox or Select Multiple.

Follow these steps to fully uninstall Mosets Tree from your Joomla website.

  1. Login to your Joomla site's back-end.
  2. Go to: System Manage Extensions
  3. Search for "Mosets Tree Package"
  4. Check the checkbox for "Mosets Tree Package" and click "Uninstall"

Warning: Uninstalling Mosets Tree will remove all Mosets Tree extensions, listings, categories and their associated fields, images and attachments. This action is not reversible.

'Related Categories' allows you to select one or more categories that are related to a current category. It allows you to expose additional categories to users browsing the current category.

'Related Categories' does not offer any relationship between categories, other than displaying links to it.

Mosets Tree allows you to create unlimited number of fields to be used with your listings. It is sometimes useful to add subheaders in between fields to visually group a set of related fields together. This article shows how you can do this by adding a few CSS rules.

The following 2 instructions show how to add a subheader called 'Useful Link(s)' on top of the 'Website' field. To target 'Website', we use its custom field ID, 12, in our CSS rules. If you're targetting another field (ie: adding subheader above a different field), you can find out its field ID through your browser's Inspector or Mosets Tree's back-end.

Adding subheader to listing details view

Add the following CSS rules to your site's CSS file:

#field_12 {
    display: block;
    width: 98%;
}
#field_12:before {
    content: "Useful Link(s)";
    display: block;
    font-weight: bold;
    margin-top: 2em;
}

Adding subheader to front-end Add Listing form

#cf12 {
display: block;
}

#input_12:before {
content: "Useful Link(s)";
}

Mosets Tree uses listing names as page titles. This article shows how you can make a simple core modification to Mosets Tree's source codes to use one or more custom fields data in your listing title.

Note: The steps below involve modifying a core Mosets Tree file. These modifications will be removed and overwritten when you upgrade Mosets Tree. This should only be performed if you're experienced with Joomla and PHP.

  1. Edit this file: /components/com_mtree/mtree.php

  2. Look for the following codes near line 2353:

    setTitle(JText::sprintf( 'COM_MTREE_PAGE_TITLE_VIEWLINK', $link->link_name ), null, $link_id);
  3. Replace the line above with the following codes:

    // $cf_ids_for_title holds an array of fields ID to used in listing
    // title. ID 1 refers to listing name.
    $cf_ids_for_title = array(1, 41, 54);
    
    // $title_parameters contains an array of parameters to be passed to
    // JText::sprintf. Edit the line below to control how and where to
    // output each custom fields.
    $title_parameters[] = 'Your custom title - %s - %s - %s';
    
    foreach($cf_ids_for_title AS $cf_id )
    {
        $tmp  = $fields->getFieldById($cf_id);
        if( !is_null($tmp) )
        {
            $title_parameters[] = $tmp->getValue();
        }
    }
    
    // Output the title
    setTitle( call_user_func_array(array('JText','sprintf'), $title_parameters ));
  4. $cf_ids_for_title holds an array of custom fields ID that you want to use in your title. In the example above, we have the listing name (ID: 1) and two custom fields, represented by ID 41 and 54. Remove and add additional field IDs as needed here.

  5. The first assignment for $title_parameters controls how to output/arrange your static text and custom field values. Each of the %s specifier represents your field value. You can refer to PHP's sprintf documentation for more information.

This instruction is based on Mosets Tree 3.5.6, but it should work on any recent versions of Mosets Tree from version 2.1 up.

'Add your listing here' is added to each category's page to allow users to submit listings to your directory.

To remove this link in a category, edit the category in Mosets Tree's back-end. To the right of the page, you'll find an option called 'Allow listing submission'. Set this to 'No'. This will disable listing submission in front-end for that particular category and remove the 'Add your listing here' link.

Last Modified: