From 4df45c2d60577cba640dd72cb3437a8cd21bcc18 Mon Sep 17 00:00:00 2001 From: Thomas Hunziker Date: Mon, 14 Aug 2017 20:26:30 +0200 Subject: [PATCH] Initial Commit --- .../en-GB/en-GB.plg_sampledata_testing.ini | 536 ++ .../en-GB.plg_sampledata_testing.sys.ini | 7 + testing.php | 4748 +++++++++++++++++ testing.xml | 20 + 4 files changed, 5311 insertions(+) create mode 100644 language/en-GB/en-GB.plg_sampledata_testing.ini create mode 100644 language/en-GB/en-GB.plg_sampledata_testing.sys.ini create mode 100644 testing.php create mode 100644 testing.xml diff --git a/language/en-GB/en-GB.plg_sampledata_testing.ini b/language/en-GB/en-GB.plg_sampledata_testing.ini new file mode 100644 index 0000000..37a0ab9 --- /dev/null +++ b/language/en-GB/en-GB.plg_sampledata_testing.ini @@ -0,0 +1,536 @@ +; Joomla! Project +; Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved. +; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php +; Note : All ini files need to be saved as UTF-8 + +PLG_SAMPLEDATA_TESTING="Sample Data - Testing" +PLG_SAMPLEDATA_TESTING_OVERVIEW_DESC="Sample data which will help with testing the CMS." +PLG_SAMPLEDATA_TESTING_OVERVIEW_TITLE="Testing Sample Data" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_1_DESC="Get books about Joomla! at the Joomla! Book Shop." +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_1_NAME="Shop 1" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_2_DESC="T-shirts, caps and more from the Joomla! Shop." +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_2_NAME="Shop 2" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_3_DESC="Your contributions of time, talent and money make Joomla possible." +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_3_NAME="Support Joomla!" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CATEGORY_0_TITLE="Sample Data-Banners" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_1_CONTACT="Administrator" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_1_NAME="Joomla" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_2_CONTACT="Example" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_2_NAME="Shop" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_3_CONTACT="Bookstore Example" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_3_NAME="Bookstore" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_TITLE="Sample Data-Contact" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_0_TITLE="Park Site" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_1_TITLE="Shop Site" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_1_0_DESC="

Please feel free to contact our staff at any time should you need assistance.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_1_0_TITLE="Staff" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_1_1_DESC="

Our directory of information about different kinds of fruit.

We love fruit and want the world to know more about all of its many varieties.

Although it is small now, we work on it whenever we have a chance.

All of the images can be found in Wikimedia Commons.

\"Apples\"

This encyclopedia is implemented using the contact component, each fruit a separate contact and a category for each letter. A CSS style is used to create the horizontal layout of the alphabet headings.

If you wanted to, you could allow some users (such as your growers) to have access to just this category in the contact component and let them help you to create new content for the encyclopedia.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_1_1_TITLE="Fruit Encyclopedia" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_ADDRESS="Address" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_COUNTRY="Country" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_FAX="Fax" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_MISC="

Information about or by the contact.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_NAME="Contact Name Here" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_POSITION="Position" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_POSTCODE="Zip Code" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_SORTNAME1="last" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_SORTNAME2="first" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_SORTNAME3="middle" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_STATE="State" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_SUBURB="Suburb" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_TELEPHONE="Telephone" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_1_NAME="Webmaster" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_2_MISC="

I'm the owner of this store.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_2_NAME="Owner" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_3_MISC="

I am in charge of buying fruit. If you sell good fruit, contact me.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_3_NAME="Buyer" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_ADDRESS="Image Credit: EnzikRights: Creative Commons Share Alike Unported 3.0 Source: http://commons.wikimedia.org/wiki/File:Bananas_-_Morocco.jpg" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_COUNTRY="Large Producers: India, China, Brasil" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_MISC="

Bananas are a great source of potassium.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_NAME="Bananas" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_POSITION="Scientific Name: Musa" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_STATE="Type: Herbaceous" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_ADDRESS="Image Credit: FievetRights: Public DomainSource: http://commons.wikimedia.org/wiki/File:Pommes_vertes.JPG" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_COUNTRY="Large: Producers: China, United States" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_MISC="

Apples are a versatile fruit, used for eating, cooking, and preserving.

There are more that 7500 different kinds of apples grown around the world.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_NAME="Apples" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_POSITION="Scientific Name: Malus domestica" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_STATE="Family: Rosaceae" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_ADDRESS="Image Credit: Franz Eugen Köhler, Köhler's Medizinal-Pflanzen Rights: Public DomainSource: http://commons.wikimedia.org/wiki/File:Koeh-134.jpg" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_COUNTRY="Large Producers: India, United States" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_MISC="

Tamarinds are a versatile fruit used around the world. In its young form it is used in hot sauces; ripened it is the basis for many refreshing drinks.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_NAME="Tamarind" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_POSITION="Scientific Name: Tamarindus indica" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_STATE="Family: Fabaceae" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_ADDRESS="Our City" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_COUNTRY="Our Country" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_MISC="

Here are directions for how to get to our shop.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_NAME="Shop Address" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_SUBURB="Our Province" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_TELEPHONE="555-555-5555" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_00_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_00_INTROTEXT="

All components are also used in the administrator area of your website. In addition to the ones listed here, there are components in the administrator that do not have direct front end displays, but do help shape your site. The most important ones for most users are


Media Manager

The media manager component lets you upload and insert images into content throughout your site. Optionally, you can enable the flash uploader which will allow you to to upload multiple images. Help


Extensions Manager

The extensions manager lets you install, update, uninstall and manage all of your extensions. The extensions manager has been extensively redesigned, although the core install and uninstall functionality remains the same as in Joomla! 1.5. Help


Menu Manager

The menu manager lets you create the menus you see displayed on your site. It also allows you to assign modules and template styles to specific menu links. Help


Global Configuration

The global configuration is where the site administrator configures things such as whether search engine friendly urls are enabled, the site meta data (descriptive text used by search engines and indexers) and other functions. For many beginning users simply leaving the settings on default is a good way to begin, although when your site is ready for the public you will want to change the meta data to match its content. Help


Banners

The banners component provides a simple way to display a rotating image in a module and, if you wish to have advertising, a way to track the number of times an image is viewed and clicked. Help



Redirect

The redirect component is used to manage broken links that produce Page Not Found (404) errors. If enabled it will allow you to redirect broken links to specific pages. It can also be used to manage migration related URL changes. Help

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_00_TITLE="Administrator Components" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_01_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_01_INTROTEXT="

This module shows a list of the calendar months containing archived articles. After you have changed the status of an article to archived, this list will be automatically generated. Help

{loadmodule articles_archive,Archived Articles}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_01_TITLE="Archive Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_02_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_02_INTROTEXT="

This module displays a list of categories from one parent category. Help

{loadmodule articles_categories,Articles Categories}

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_02_TITLE="Article Categories Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_03_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_03_INTROTEXT="

This module allows you to display the articles in a specific category. Help

{loadmodule articles_category,Articles Category}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_03_TITLE="Articles Category Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_04_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_04_INTROTEXT="

The authentication plugins operate when users login to your site or administrator. The Joomla! authentication plugin is in operation by default but you can enable Gmail or LDAP or install a plugin for a different system. An example is included that may be used to create a new authentication plugin.

Default on:

Default off:

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_04_TITLE="Authentication" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_05_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_05_INTROTEXT="

Cradle Park Banner

Welcome!

This is a basic site about the beautiful and fascinating parks of Australia.

On this site you can read all about my travels to different parks, see photos, and find links to park websites.

This sample site is an example of using the core of Joomla! to create a basic website, whether a brochure site, a personal blog, or as a way to present information on a topic you are interested in.

Read more about the site in the About Parks module.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_05_TITLE="Australian Parks " +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_06_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_06_INTROTEXT="

The banner module is used to display the banners that are managed by the banners component in the site administrator. Help.

{loadmodule banners,Banners}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_06_TITLE="Banner Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_07_FULLTEXT="

Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you're done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners' Areas of the Joomla documentation and support forums.

You'll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can't find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can't find one near you? Start one yourself.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_07_INTROTEXT="

If this is your first Joomla! site or your first web site, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

Start off using your site by logging in using the administrator account you created when you installed Joomla.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_07_TITLE="Beginners" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_08_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_08_INTROTEXT="

The contact component provides a way to provide contact forms and information for your site or to create a complex directory that can be used for many different purposes. Help

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_08_TITLE="Contacts" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_09_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_09_INTROTEXT="

The content component (com_content) is what you use to write articles. It is extremely flexible and has the largest number of built in views. Articles can be created and edited from the front end, making content the easiest component to use to create your site content. Help

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_09_TITLE="Content" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_10_FULLTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_10_INTROTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_10_TITLE="Cradle Mountain" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_11_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_11_INTROTEXT="

This module allows you to create your own HTML Module using a WYSIWYG editor. Help

{loadmodule custom,Custom HTML}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_11_TITLE="Custom HTML Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_12_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_12_INTROTEXT="

Here's how to find our shop.

By car

Drive along Main Street to the intersection with First Avenue. Look for our sign.

By foot

From the center of town, walk north on Main Street until you see our sign.

By bus

Take the #73 Bus to the last stop. We are on the north east corner.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_12_TITLE="Directions" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_13_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_13_INTROTEXT="

Editors are used thoughout Joomla! where content is created. TinyMCE is the default choice in most locations although CodeMirror is used in the template manager. No Editor provides a text box for html content.

Default on:

Default off:

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_13_TITLE="Editors" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_14_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_14_INTROTEXT="

These plugins are the buttons found beneath your editor. They only run when an editor plugin runs.

Default on:

Default off:

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_14_TITLE="Editors-xtd" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_15_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_15_INTROTEXT="

This module allows the displaying of a syndicated feed. Help

{loadmodule feed,Feed Display}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_15_TITLE="Feed Display" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_16_FULLTEXT="

Quisque a massa sed libero tristique suscipit. Morbi tristique molestie metus, vel vehicula nisl ultrices pretium. Sed sit amet est et sapien condimentum viverra. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus viverra tortor porta orci convallis ac cursus erat sagittis. Vivamus aliquam, purus non luctus adipiscing, orci urna imperdiet eros, sed tincidunt neque sapien et leo. Cras fermentum, dolor id tempor vestibulum, neque lectus luctus mauris, nec congue tellus arcu nec augue. Nulla quis mi arcu, in bibendum quam. Sed placerat laoreet fermentum. In varius lobortis consequat. Proin vulputate felis ac arcu lacinia adipiscing. Morbi molestie, massa id sagittis luctus, sem sapien sollicitudin quam, in vehicula quam lectus quis augue. Integer orci lectus, bibendum in fringilla sit amet, rutrum eget enim. Curabitur at libero vitae lectus gravida luctus. Nam mattis, ligula sit amet vestibulum feugiat, eros sem sodales mi, nec dignissim ante elit quis nisi. Nulla nec magna ut leo convallis sagittis ac non erat. Etiam in augue nulla, sed tristique orci. Vestibulum quis eleifend sapien.

Nam ut orci vel felis feugiat posuere ut eu lorem. In risus tellus, sodales eu eleifend sed, imperdiet id nulla. Nunc at enim lacus. Etiam dignissim, arcu quis accumsan varius, dui dui faucibus erat, in molestie mauris diam ac lacus. Sed sit amet egestas nunc. Nam sollicitudin lacinia sapien, non gravida eros convallis vitae. Integer vehicula dui a elit placerat venenatis. Nullam tincidunt ligula aliquet dui interdum feugiat. Maecenas ultricies, lacus quis facilisis vehicula, lectus diam consequat nunc, euismod eleifend metus felis eu mauris. Aliquam dapibus, ipsum a dapibus commodo, dolor arcu accumsan neque, et tempor metus arcu ut massa. Curabitur non risus vitae nisl ornare pellentesque. Pellentesque nec ipsum eu dolor sodales aliquet. Vestibulum egestas scelerisque tincidunt. Integer adipiscing ultrices erat vel rhoncus.

Integer ac lectus ligula. Nam ornare nisl id magna tincidunt ultrices. Phasellus est nisi, condimentum at sollicitudin vel, consequat eu ipsum. In venenatis ipsum in ligula tincidunt bibendum id et leo. Vivamus quis purus massa. Ut enim magna, pharetra ut condimentum malesuada, auctor ut ligula. Proin mollis, urna a aliquam rutrum, risus erat cursus odio, a convallis enim lectus ut lorem. Nullam semper egestas quam non mattis. Vestibulum venenatis aliquet arcu, consectetur pretium erat pulvinar vel. Vestibulum in aliquet arcu. Ut dolor sem, pellentesque sit amet vestibulum nec, tristique in orci. Sed lacinia metus vel purus pretium sit amet commodo neque condimentum.

Aenean laoreet aliquet ullamcorper. Nunc tincidunt luctus tellus, eu lobortis sapien tincidunt sed. Donec luctus accumsan sem, at porttitor arcu vestibulum in. Sed suscipit malesuada arcu, ac porttitor orci volutpat in. Vestibulum consectetur vulputate eros ut porttitor. Aenean dictum urna quis erat rutrum nec malesuada tellus elementum. Quisque faucibus, turpis nec consectetur vulputate, mi enim semper mi, nec porttitor libero magna ut lacus. Quisque sodales, leo ut fermentum ullamcorper, tellus augue gravida magna, eget ultricies felis dolor vitae justo. Vestibulum blandit placerat neque, imperdiet ornare ipsum malesuada sed. Quisque bibendum quam porta diam molestie luctus. Sed metus lectus, ornare eu vulputate vel, eleifend facilisis augue. Maecenas eget urna velit, ac volutpat velit. Nam id bibendum ligula. Donec pellentesque, velit eu convallis sodales, nisi dui egestas nunc, et scelerisque lectus quam ut ipsum.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_16_INTROTEXT="

Lorem Ipsum is filler text that is commonly used by designers before the content for a new site is ready.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus purus vitae diam posuere nec eleifend elit dictum. Aenean sit amet erat purus, id fermentum lorem. Integer elementum tristique lectus, non posuere quam pretium sed. Quisque scelerisque erat at urna condimentum euismod. Fusce vestibulum facilisis est, a accumsan massa aliquam in. In auctor interdum mauris a luctus. Morbi euismod tempor dapibus. Duis dapibus posuere quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In eu est nec erat sollicitudin hendrerit. Pellentesque sed turpis nunc, sit amet laoreet velit. Praesent vulputate semper nulla nec varius. Aenean aliquam, justo at blandit sodales, mauris leo viverra orci, sed sodales mauris orci vitae magna.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_16_TITLE="First Blog Post" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_17_FULLTEXT="

Nam eget venenatis lorem. Vestibulum a interdum sapien. Suspendisse potenti. Quisque auctor purus nec sapien venenatis vehicula malesuada velit vehicula. Fusce vel diam dolor, quis facilisis tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque libero nisi, pellentesque quis cursus sit amet, vehicula vitae nisl. Curabitur nec nunc ac sem tincidunt auctor. Phasellus in mattis magna. Donec consequat orci eget tortor ultricies rutrum. Mauris luctus vulputate molestie. Proin tincidunt vehicula euismod. Nam congue leo non erat cursus a adipiscing ipsum congue. Nulla iaculis purus sit amet turpis aliquam sit amet dapibus odio tincidunt. Ut augue diam, congue ut commodo pellentesque, fermentum mattis leo. Sed iaculis urna id enim dignissim sodales at a ipsum. Quisque varius lobortis mollis. Nunc purus magna, pellentesque pellentesque convallis sed, varius id ipsum. Etiam commodo mi mollis erat scelerisque fringilla. Nullam bibendum massa sagittis diam ornare rutrum.

Praesent convallis metus ut elit faucibus tempus in quis dui. Donec fringilla imperdiet nibh, sit amet fringilla velit congue et. Quisque commodo luctus ligula, vitae porttitor eros venenatis in. Praesent aliquet commodo orci id varius. Nulla nulla nibh, varius id volutpat nec, sagittis nec eros. Cras et dui justo. Curabitur malesuada facilisis neque, sed tempus massa tincidunt ut. Sed suscipit odio in lacus auctor vehicula non ut lacus. In hac habitasse platea dictumst. Sed nulla nisi, lacinia in viverra at, blandit vel tellus. Nulla metus erat, ultrices non pretium vel, varius nec sem. Morbi sollicitudin mattis lacus quis pharetra. Donec tincidunt mollis pretium. Proin non libero justo, vitae mattis diam. Integer vel elit in enim varius posuere sed vitae magna. Duis blandit tempor elementum. Vestibulum molestie dui nisi.

Curabitur volutpat interdum lorem sed tempus. Sed placerat quam non ligula lacinia sodales. Cras ultrices justo at nisi luctus hendrerit. Quisque sit amet placerat justo. In id sapien eu neque varius pharetra sed in sapien. Etiam nisl nunc, suscipit sed gravida sed, scelerisque ut nisl. Mauris quis massa nisl, aliquet posuere ligula. Etiam eget tortor mauris. Sed pellentesque vestibulum commodo. Mauris vitae est a libero dapibus dictum fringilla vitae magna.

Nulla facilisi. Praesent eget elit et mauris gravida lobortis ac nec risus. Ut vulputate ullamcorper est, volutpat feugiat lacus convallis non. Maecenas quis sem odio, et aliquam libero. Integer vel tortor eget orci tincidunt pulvinar interdum at erat. Integer ullamcorper consequat eros a pellentesque. Cras sagittis interdum enim in malesuada. Etiam non nunc neque. Fusce non ligula at tellus porta venenatis. Praesent tortor orci, fermentum sed tincidunt vel, varius vel dui. Duis pulvinar luctus odio, eget porta justo vulputate ac. Nulla varius feugiat lorem sed tempor. Phasellus pulvinar dapibus magna eget egestas. In malesuada lectus at justo pellentesque vitae rhoncus nulla ultrices. Proin ut sem sem. Donec eu suscipit ipsum. Cras eu arcu porttitor massa feugiat aliquet at quis nisl.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_17_INTROTEXT="

Lorem Ipsum is text that is traditionally used by designers when working on a site before the content is ready.

Pellentesque bibendum metus ut dolor fermentum ut pulvinar tortor hendrerit. Nam vel odio vel diam tempus iaculis in non urna. Curabitur scelerisque, nunc id interdum vestibulum, felis elit luctus dui, ac dapibus tellus mauris tempus augue. Duis congue facilisis lobortis. Phasellus neque erat, tincidunt non lacinia sit amet, rutrum vitae nunc. Sed placerat lacinia fermentum. Integer justo sem, cursus id tristique eget, accumsan vel sapien. Curabitur ipsum neque, elementum vel vestibulum ut, lobortis a nisl. Fusce malesuada mollis purus consectetur auctor. Morbi tellus nunc, dapibus sit amet rutrum vel, laoreet quis mauris. Aenean nec sem nec purus bibendum venenatis. Mauris auctor commodo libero, in adipiscing dui adipiscing eu. Praesent eget orci ac nunc sodales varius.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_17_TITLE="Second Blog Post" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_18_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_18_INTROTEXT="

This module shows the Joomla! copyright information. Help

{loadmodule footer,Footer}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_18_TITLE="Footer Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_19_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_19_INTROTEXT="

Welcome to the Fruit Shop

We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_19_TITLE="Fruit Shop" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_20_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_20_INTROTEXT="

There are lots of places you can get help with Joomla!. In many places in your site administrator you will see the help icon. Click on this for more information about the options and functions of items on your screen. Other places to get help are:

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_20_TITLE="Getting Help" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_21_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_21_INTROTEXT="

It's easy to get started creating your website. Knowing some of the basics will help.

What is a Content Management System?

A content management system is software that allows you to create and manage webpages easily by separating the creation of your content from the mechanics required to present it on the web.

In this site, the content is stored in a database. The look and feel are created by a template. The Joomla! software brings together the template and the content to create web pages.

Site and Administrator

Your site actually has two separate sites. The site (also called the front end) is what visitors to your site will see. The administrator (also called the back end) is only used by people managing your site. You can access the administrator by clicking the \"Site Administrator\" link on the \"This Site\" menu or by adding /administrator to the end of you domain name.

Log in to the administrator using the username and password created during the installation of Joomla.

Logging in

To login to the front end of your site use the login form or the login menu link on the \"This Site\" menu. Use the user name and password that were created as part of the installation process. Once logged-in you will be able to create and edit articles.

In managing your site, you will be able to create content that only logged-in users are able to see.

Creating an article

Once you are logged-in, a new menu will be visible. To create a new article, click on the \"submit article\" link on that menu.

The new article interface gives you a lot of options, but all you need to do is add a title and put something in the content area. To make it easy to find, set the state to published and put it in the Joomla category.

You can edit an existing article by clicking on the edit icon (this only displays to users who have the right to edit).

Learn more

There is much more to learn about how to use Joomla! to create the web site you envision. You can learn much more at the Joomla! documentation site and on the Joomla! forums.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_21_TITLE="Getting Started" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_22_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_22_INTROTEXT="

At our orchard we grow the world's best oranges as well as other citrus fruit such as lemons and grapefruit. Our family has been tending this orchard for generations.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_22_TITLE="Happy Orange Orchard" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_23_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_23_INTROTEXT="

Thanks for helping us to test Joomla!

We're getting ready for the release of Joomla and we appreciate you helping us find and fix problems as we work.

If you haven't done testing before here are some tips.

How to test

What to look for

Report problems

If you find a problem please report it to the CMS Issue Tracker. You will need to register for a github.com account if you don't have one.

More Testing Ideas

Testing changes

You can also help Joomla by testing bug fixes and new features. A useful tool is the patchtester component which helps to simplify and automate the process. Report your feedback on the CMS Issue Tracker. If you enjoy helping Joomla this way, you may want to join the Joomla Bug Squad.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_23_TITLE="Joomla! Testing" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_24_FULLTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_24_INTROTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_24_TITLE="Koala" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_25_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_25_INTROTEXT="

The language switcher module allows you to take advantage of the language tags that are available when content, modules and menu links are created.

This module displays a list of available Content Languages for switching between them.

When switching languages, it redirects to the Home page, or associated menu item, defined for the chosen language. Thereafter, the navigation will be the one defined for that language.

The language filter plugin must be enabled for this module to work properly.

Help

To view an example of the language switch moduler module, go to the site administrator and enable the language filter plugin and the language switcher module labelled \"language switcher\" and visit the fruit shop or park sample sites. Then follow the instructions in this tutorial.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_25_TITLE="Language Switcher" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_26_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_26_INTROTEXT="

This module shows a list of the most recently published and current Articles. Some that are shown may have expired even though they are the most recent. Help

{loadmodule articles_latest,Latest News}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_26_TITLE="Latest Articles Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_27_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_27_INTROTEXT="

This module displays a username and password login form. It also displays a link to retrieve a forgotten password. If user registration is enabled (in the Global Configuration settings), another link will be shown to enable self-registration for users. Help

{loadmodule login,login}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_27_TITLE="Login Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_28_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_28_INTROTEXT="

This module displays a menu on the site (frontend). Menus can be displayed in a wide variety of ways by using the menu options and css menu styles. Help

{loadmodule mod_menu,Menu Example}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_28_TITLE="Menu Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_29_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_29_INTROTEXT="

This module shows a list of the currently published Articles which have the highest number of page views. Help

{loadmodule articles_popular,Articles Most Read}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_29_TITLE="Most Read Content" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_30_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_30_INTROTEXT="

Displays a set number of articles from a category based on date or random selection. Help

{loadmodule articles_news,News Flash}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_30_TITLE="News Flash" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_31_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_31_INTROTEXT="

As you make your Joomla! site you will control the details of the display using options also referred to as parameters. Options control everything from whether the author's name is displayed to who can view what to the number of items shown on a list.

Default options for each component are changed using the Options button on the component toolbar.

Options can also be set on an individual item, such as an article or contact and in menu links.

If you are happy with how your site looks, it is fine to leave all of the options set to the defaults that were created when your site was installed. As you become more experienced with Joomla you will use options more.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_31_TITLE="Options" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_32_FULLTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_32_INTROTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_32_TITLE="Phyllopteryx" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_33_FULLTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_33_INTROTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_33_TITLE="Pinnacles" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_34_FULLTEXT="

Working with multiple template styles and overrides for the same views, creating the design you want is easier than it has ever been. Limiting support to PHP 5.2.4 and above makes Joomla lighter and faster than ever. Languages files can now be overridden without having your changes lost during an upgrade. With the proper xml your users update extensions with a single click.

Access control lists are now incorporated using a new system developed for Joomla. The ACL system is designed with developers in mind, so it is easy to incorporate into your extensions. The new nested sets libraries allow you to incorporate infinitely deep categories but also to use nested sets in a variety of other ways.

A new forms library makes creating all kinds of user interaction simple. MooTools 1.3 provides a highly flexible javascript framework that is a major advance over MooTools 1.0.

New events throughout the core make integration of your plugins where you want them a snap.

The separation of the Joomla! Platform project from the Joomla! CMS project makes continuous development of new, powerful APIs and continuous improvement of existing APIs possible while maintaining the stability of the CMS that millions of webmasters and professionals rely upon.

Learn about:

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_34_INTROTEXT="

Joomla! 2.5 continues development of the Joomla Framework and CMS as a powerful and flexible way to bring your vision of the web to reality. With the administrator now fully MVC, the ability to control its look and the management of extensions is now complete.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_34_TITLE="Professionals" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_35_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_35_INTROTEXT="

This module displays a random image from your chosen image directory. Help

{loadmodule random_image,Random Image}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_35_TITLE="Random Image Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_36_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_36_INTROTEXT="

This module displays other Articles that are related to the one currently being viewed. These relations are established by the Meta Keywords. All the keywords of the current Article are searched against all the keywords of all other published articles. Help

{loadmodule related_items,Articles Related Items}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_36_TITLE="Related Items Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_37_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_37_INTROTEXT="

Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample \"sites within a site\" designed to help you get started with building your own site.

The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, weblinks, and a very simple image gallery.

The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site's focus.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_37_TITLE="Sample Sites" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_38_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_38_INTROTEXT="

Joomla! 2.5 offers two search options.

The Basic Search component provides basic search functionality for the information contained in your core components. Many extensions can also be searched by the search component. Help

The Smart Search component offers searching similar to that found in major search engines. Smart Search is disabled by default. If you choose to enable it you will need to take several steps. First, enable the Smart Search Plugin in the plugin manager. Then, if you are using the Basic Search Module replace it with the Smart Search Module. Finally, if you have already created content, go to the Smart Search component in your site administrator and click the Index icon. Once indexing of your content is complete, Smart Search will be ready to use. Help.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_38_TITLE="Search" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_39_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_39_INTROTEXT="

This module will display a search box. Help

{loadmodule search,Search}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_39_TITLE="Search Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_40_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_40_INTROTEXT="

The search component uses plugins to control which parts of your Joomla! site are searched. You may choose to turn off some areas to improve performance or for other reasons. Many third party Joomla! extensions have search plugins that extend where search takes place.

Default On:

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_40_TITLE="Search " +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_41_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_41_INTROTEXT="

{loadposition sitemapload}

By putting all of your content into nested categories you can give users and search engines access to everything using a menu.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_41_TITLE="Site Map" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_42_FULLTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_42_INTROTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_42_TITLE="Spotted Quoll" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_43_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_43_INTROTEXT="

This module shows information about your server installation together with statistics on the Web site users and the number of Articles in your database.

{loadmodule mod_stats,Statistics}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_43_TITLE="Statistics Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_44_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_44_INTROTEXT="

The syndicate module will display a link that allows users to take a feed from your site. It will only display on pages for which feeds are possible. That means it will not display on single article, contact or weblinks pages, such as this one. Help

{loadposition syndicate,Syndicate}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_44_TITLE="Syndicate Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_45_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_45_INTROTEXT="

System plugins operate every time a page on your site loads. They control such things as your URLS, whether users can check a \"remember me\" box on the login module, and whether caching is enabled. New is the redirect plugin that together with the redirect component will assist you in managing changes in URLs.

Default on:

Default off:

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_45_TITLE="System" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_46_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_46_INTROTEXT="

Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_46_TITLE="The Joomla! Community" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_47_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_47_INTROTEXT="

The Joomla Project consists of all of the people who make and support the Joomla Web Platform and Content Management System.

Our mission is to provide a flexible platform for digital publishing and collaboration.

The core values are:

In our vision, we see:

There are millions of users around the world and thousands of people who contribute to the Joomla Project. They work in three main groups: the Production Working Group, responsible for everything that goes into software and documentation; the Community Working Group, responsible for creating a nurturing the community; and Open Source Matters, the non profit organization responsible for managing legal, financial and organizational issues.

Joomla is a free and open source project, which uses the GNU General Public License version 2 or later.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_47_TITLE="The Joomla! Project" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_48_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_48_INTROTEXT="

H1 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H2 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H3 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H4 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H5 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz
H6 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

P The quick brown fox ran over the lazy dog. THE QUICK BROWN FOX RAN OVER THE LAZY DOG.

  1. tem
  2. Item
  3. Item
    1. Item
    2. Item
    3. Item
      1. Item
      2. Item
      3. Item
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_48_TITLE="Typography" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_49_FULLTEXT="

The new user manager will let you manage who has access to what in your site. You can leave access groups exactly the way you had them in Joomla 1.5 or make them as complicated as you want. You can learn more about how access control works in on the Joomla! Documentation site

In Joomla 1.5 and 1.0 content was organized into sections and categories. From 1.6 forward sections are gone, and you can create categories within categories, going as deep as you want. The sample data provides many examples of the use of nested categories.

All layouts have been redesigned to improve accessibility and flexibility.

Updating your site and extensions when needed is easier than ever thanks to installer improvements.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_49_INTROTEXT="

If you are an experienced Joomla! 1.5 user, this Joomla site will seem very familiar. There are new templates and improved user interfaces, but most functionality is the same. The biggest changes are improved access control (ACL) and nested categories. This release of Joomla has strong continuity with Joomla! 1.7 while adding enhancements.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_49_TITLE="Upgraders" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_50_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_50_INTROTEXT="

Default on:

Default off:

Two new plugins are available but are disabled by default.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_50_TITLE="User" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_51_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_51_INTROTEXT="

The users extension lets your site visitors register, login and logout, change their passwords and other information, and recover lost passwords. In the administrator it allows you to create, block and manage users and create user groups and access levels. Help

Please note that some of the user views will not display if you are not logged-in to the site.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_51_TITLE="Users" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_52_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_52_INTROTEXT="

With Joomla you can create anything from a simple personal website to a complex ecommerce or social site with millions of visitors.

This section of the sample data provides you with a brief introduction to Joomla concepts and reference material to help you understand how Joomla works.

When you no longer need the sample data, you can can simply unpublish the sample data category found within each extension in the site administrator or you may completely delete each item and all of the categories.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_52_TITLE="Using Joomla!" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_53_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_53_INTROTEXT="

The Who's Online Module displays the number of Anonymous Users (e.g. Guests) and Registered Users (ones logged-in) that are currently accessing the Web site. Help

{loadmodule whosonline,Who's Online}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_53_TITLE="Who's Online" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_54_FULLTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_54_INTROTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_54_TITLE="Wobbegone" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_55_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_55_INTROTEXT="

Watermelon is a wonderful and healthy treat. We grow the world's sweetest watermelon. We have the largest watermelon patch in our country.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_55_TITLE="Wonderful Watermelon" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_56_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_56_INTROTEXT="

This module shows an iFrame window to specified location. Help

{loadmodule wrapper,Wrapper}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_56_TITLE="Wrapper Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_57_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_57_INTROTEXT="

News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_57_TITLE="News Feeds" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_58_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_58_INTROTEXT="

Breadcrumbs provide a pathway for users to navigate through the site. Help

{loadmodule breadcrumbs,breadcrumbs}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_58_TITLE="Breadcrumbs Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_59_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_59_INTROTEXT="

Content plugins run when specific kinds of pages are loaded. They do things ranging from protecting email addresses from harvesters to creating page breaks.

Default on:

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_59_TITLE="Content" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_60_FULLTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_60_INTROTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_60_TITLE="Blue Mountain Rain Forest" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_61_FULLTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_61_INTROTEXT="

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_61_TITLE="Ormiston Pound" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_62_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_62_INTROTEXT="

This module displays the latest registered users. Help

{loadmodule users_latest,Users Latest}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_62_TITLE="Latest Users Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_63_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_63_INTROTEXT="

This article deliberately archived as an example.

As with previous releases, Joomla! provides a unified and easy-to-use framework for delivering content for Web sites of all kinds. To support the changing nature of the Internet and emerging Web technologies, Joomla! required substantial restructuring of its core functionality and we also used this effort to simplify many challenges within the current user interface. Joomla! 1.5 has many new features.

In Joomla! 1.5, you''ll notice:

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_63_TITLE="What's New in 1.5?" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_64_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_64_INTROTEXT="

The Captcha plugins are used to prevent spam submissions on your forms such as registration, contact and login. You basic installation of Joomla includes one Captcha plugin which leverages the ReCaptcha® service but you may install other plugins connecting to different Captcha systems.

Default on:

Note: ReCaptcha is a the trademark of Google Inc. and is an independent product not associated with or endorsed by the Joomla Project. You will need to register and agree to the Terms of Service at Recaptcha.net to use this plugin. Complete instructions are available if you edit the ReCaptcha plugin in the Plugin Manager.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_64_TITLE="Captcha" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_65_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_65_INTROTEXT="

The Quick Icon plugin group is used to provide notification that updates to Joomla! or installed extensions are available and should be applied. These notifications display on your administrator control panel, which is the page you see when you first log in to your site administrator.

Default on:

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_65_TITLE="Quick Icons" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_66_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_66_INTROTEXT="

This module provides search using the Smart Search component. You should only use it if you have indexed your content and either have enabled the Smart Search content plugin or are keeping the index of your site updated manually. Help.

{loadmodule finder,Smart Search}
" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_66_TITLE="Smart Search" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_67_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_67_INTROTEXT="

The similar tags modules shows a list of items which have the same or a similar set of tags.

{loadmodule tags_similar,Similar Tags}

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_67_TITLE="Similar Tags" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_68_FULLTEXT="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_68_INTROTEXT="

The Popular Tags displays a list of the most commonly uses tags. It offers both a list and a tag cloud layout.

{loadmodule tags_popular,Popular Tags}

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_68_TITLE="Popular Tags" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_TITLE="Sample Data-Articles" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_TITLE="Joomla!" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_DESC="

The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_TITLE="Extensions" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_0_DESC="

Component ImageComponents are larger extensions that produce the major content for your site. Each component has one or more 'views' that control how content is displayed. In the Joomla administrator there are additional extensions such as Menus, Redirection, and the extension managers.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_0_TITLE="Components" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_DESC="

Media ImageModules are small blocks of content that can be displayed in positions on a web page. The menus on this site are displayed in modules. The core of Joomla! includes 24 separate modules ranging from login to search to random images. Each module has a name that starts mod_ but when it displays it has a title. In the descriptions in this section, the titles are the same as the names.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_TITLE="Modules" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_0_DESC="

Content modules display article and other information from the content component.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_0_TITLE="Content Modules" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_1_DESC="

User modules interact with the user system, allowing users to login, show who is logged-in, and showing the most recently registered users.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_1_TITLE="User Modules" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_2_DESC="

These modules display information from components other than content and user. These include weblinks, news feeds and the media manager.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_2_TITLE="Display Modules" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_3_DESC="

Utility modules provide useful functionality such as search, syndication and statistics.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_3_TITLE="Utility Modules" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_4_DESC="

Navigation modules help your visitors move through your site and find what they need.

Menus provide your site with structure and help your visitors navigate your site. Although they are all based on the same menu module, the variety of ways menus are used in the sample data show how flexible this module is.

A menu can range from extremely simple (for example the top menu or the menu for the Australian Parks sample site) to extremely complex (for example the About Joomla! menu with its many levels). They can also be used for other types of presentation such as the site map linked from the \"This Site\" menu.

Breadcrumbs provide users with information about where they are in a site.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_4_TITLE="Navigation Modules" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_DESC="

Media ImageTemplates give your site its look and feel. They determine layout, colours, typefaces, graphics and other aspects of design that make your site unique. Your installation of Joomla comes prepackaged with three front end templates and two backend templates. Help

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_TITLE="Templates" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_5_DESC="

The Atomic Template

Atomic is a minimal template designed to be a skeleton for making your own template and to learn about Joomla! templating.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_5_TITLE="Atomic" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_6_DESC="

Beez_20 thumbnail

Beez 2.0 is a versatile, easy to customise template that works for a variety of sites. It meets major accessibility standards and demonstrates a range of css and javascript techniques. It is the default template that installs with Joomla!

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_6_TITLE="Beez 20" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_7_DESC="

Beez5 Thumbnail

Beez 5 is an html5 implementation of a Joomla! template. It uses a number of html5 techniques to enhance the presentation of a site. It is used as the template for the Fruit Shop sample site.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_7_TITLE="Beez 5" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_3_DESC="

Languages ImageJoomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

Translation information

If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_3_TITLE="Languages" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_4_DESC="

Plugin ImagePlugins are small task oriented extensions that enhance the Joomla! framework. Some are associated with particular extensions and others, such as editors, are used across all of Joomla. Most beginning users do not need to change any of the plugins that install with Joomla. Help

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_4_TITLE="Plugins" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_TITLE="Park Site" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_1_DESC="

Here is where I will blog all about the parks of Australia.

You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_1_TITLE="Park Blog" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_2_DESC="

These are my photos from parks I have visited (I didn't take them, they are all from Wikimedia Commons).

This shows you how to make a simple image gallery using articles in com_content.

In each article put a thumbnail image before a 'readmore' and the full size image after it. Set the article to Show Intro Text: Hide.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_2_TITLE="Photo Gallery" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_2_5_TITLE="Animals" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_2_6_TITLE="Scenery" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_2_TITLE="Fruit Shop Site" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_2_3_DESC="

We search the whole countryside for the best fruit growers.

You can let each supplier have a page that he or she can edit. To see this in action you will need to create a user who is in the suppliers group.

Create one page in the growers category for that user and make that supplier the author of the page. That user will be able to edit his or her page.

This illustrates the use of the Edit Own permission.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_2_3_TITLE="Growers" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_2_4_DESC="

Customers and suppliers can post their favorite recipes for fruit here.

A good idea is to promote the use of metadata keywords to make finding other recipes for the same fruit easier.

To see this in action, create a user assigned to the customer group and a user assigned to the suppliers group. These users will be able to create their own recipe pages and edit those pages. They will not be able to edit other users pages.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_2_4_TITLE="Recipes" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_0_TITLE="Your Profile" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_1_TITLE="Joomla.org" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_2_TITLE="Single Contact" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_3_TITLE="Login" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_4_TITLE="Park Blog" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_5_TITLE="Sample Sites" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_6_TITLE="Write a Blog Post" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_7_TITLE="Parks Home" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_8_TITLE="Image Gallery" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_8_1_TITLE="Animals" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_8_2_TITLE="Scenery" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_9_TITLE="Contact Categories" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_10_PARAM_CATEGORIES_DESCRIPTION="Because this links to the root category the \"uncategorised\" category is displayed." +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_10_TITLE="News Feed Categories" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_11_TITLE="News Feed Category" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_12_TITLE="Single News Feed" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_13_TITLE="Search" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_14_TITLE="Archived Articles" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_15_TITLE="Single Article" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_16_TITLE="Article Category Blog" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_17_TITLE="Article Category List" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_18_TITLE="Featured Articles" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_19_TITLE="Submit Article" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_20_TITLE="Content Component" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_21_PARAM_PAGE_TITLE="Newsfeeds Categories View" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_21_TITLE="News Feeds Component" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_22_TITLE="Contact Component" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_23_TITLE="Users Component" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_24_TITLE="Article Categories" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_25_TITLE="Contact Single Category" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_26_TITLE="Search Components" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_TITLE="Using Joomla!" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_TITLE="Using Extensions" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_TITLE="Templates" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_7_TITLE="Beez 2" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_7_2_TITLE="Typography Beez 2" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_7_3_TITLE="Home Page Beez 2" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_8_TITLE="Atomic" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_8_0_TITLE="Typography Atomic" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_8_1_TITLE="Home Page Atomic" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_9_TITLE="Beez5" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_9_4_TITLE="Typography Beez5" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_9_5_TITLE="Home Page Beez5" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_1_TITLE="Languages" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_TITLE="Plugins" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_0_TITLE="System" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_1_TITLE="Authentication" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_2_TITLE="Content" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_3_TITLE="Editors" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_4_TITLE="Editors Extended" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_5_TITLE="Search" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_6_TITLE="User" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_28_TITLE="Latest Users" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_29_TITLE="Who's Online" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_30_TITLE="Most Read" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_31_TITLE="Menu" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_32_TITLE="Statistics" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_33_TITLE="Banner" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_34_TITLE="Search Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_35_TITLE="Random Image" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_36_TITLE="News Flash" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_37_TITLE="Latest Articles" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_38_TITLE="Syndicate" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_39_TITLE="Login" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_40_TITLE="Wrapper" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_41_TITLE="Footer" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_42_TITLE="Archive" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_43_TITLE="Related Items" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_44_TITLE="Login Form" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_45_TITLE="User Profile" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_46_TITLE="Edit User Profile" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_47_TITLE="Registration Form" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_48_TITLE="Username Reminder Request" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_49_TITLE="Password Reset" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_50_TITLE="Feed Display" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_51_TITLE="Content Modules" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_52_TITLE="User Modules" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_53_TITLE="Breadcrumbs" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_54_TITLE="Custom HTML" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_55_TITLE="Fruit Encyclopedia" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_56_TITLE="Welcome" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_57_TITLE="Contact Us" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_58_TITLE="Growers" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_59_TITLE="Login Form" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_60_TITLE="Directions" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_61_TITLE="Testing Home" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_62_TITLE="Getting Started" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_63_TITLE="Article Categories" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_64_TITLE="Language Switcher" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_65_TITLE="Site Administrator" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_66_TITLE="Submit an Article" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_67_TITLE="Featured Contacts" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_68_TITLE="Article Category" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_69_TITLE="Add a recipe" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_70_TITLE="Recipes" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_71_TITLE="Smart Search" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_72_TITLE="Smart Search" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_73_TITLE="Similar Tags" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_74_TITLE="Popular Tags" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_75_TITLE="Compact Tagged" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_76_TITLE="Tagged Items" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_77_TITLE="All Tags" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_78_TITLE="Site Settings" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_79_TITLE="Template Settings" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_X_TITLE="Foo" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_100_TITLE="Sample Sites" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_101_TITLE="Testing Home" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_102_TITLE="Parks" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_103_TITLE="Fruit Shop" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_104_TITLE="Shop" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_0_DESCRIPTION="A Menu for logged-in Users" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_0_TITLE="User Menu" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_1_DESCRIPTION="Links for major types of users" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_1_TITLE="Top" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_2_DESCRIPTION="All about Joomla!" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_2_TITLE="About Joomla" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_3_DESCRIPTION="Main menu for a site about Australian park" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_3_TITLE="Australian Parks" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_4_DESCRIPTION="Simple Home Menu" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_4_TITLE="Main Menu Testing" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_5_DESCRIPTION="Menu for the sample shop site." +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_5_TITLE="Fruit Shop" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_6_DESCRIPTION="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_6_TITLE="All Front End Views" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_7_DESCRIPTION="" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_7_TITLE="All Modules" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_0_TITLE="Main Menu Testing" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_1_TITLE="Book Store" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_1_FOOTEER_TEXT="Books!" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_2_TITLE="User Menu" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_3_TITLE="Top" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_4_TITLE="Australian Parks" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_5_TITLE="A Deep Menu" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_6_TITLE="Site Map" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_7_TITLE="This Site" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_8_TITLE="Archived Articles" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_9_TITLE="Latest News" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_10_TITLE="Articles Most Read" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_11_TITLE="Feed Display" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_12_TITLE="News Flash" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_13_TITLE="Random Image" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_14_TITLE="Articles Related Items" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_15_TITLE="Search" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_16_TITLE="Statistics" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_17_TITLE="Syndicate Feeds" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_18_TITLE="Users Latest" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_19_TITLE="Who's Online" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_20_TITLE="Wrapper" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_21_TITLE="Footer" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_22_TITLE="Login" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_23_TITLE="Menu Example" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_24_TITLE="Latest Park Blogs" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_25_TITLE="Custom HTML" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_25_CONTENT="

This is a custom html module. That means you can enter whatever content you want.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_26_TITLE="Breadcrumbs" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_26_HOMETEXT="Home" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_27_TITLE="Banners" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_28_TITLE="Fruit Shop" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_29_TITLE="Special!" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_29_CONTENT="

This week we have a special, half price on delicious oranges!

Only for our special customers!
Use the code: Joomla! when ordering

This module can only be seen by people in the customers group or higher.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_30_TITLE="Articles Categories" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_31_TITLE="Language Switcher" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_32_TITLE="Search" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_33_TITLE="Language Switcher" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_34_TITLE="About Fruit Shop" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_34_CONTENT="

The Fruit Shop site shows a number of Joomla! features.

The template uses classes in cascading style sheets to change the layout of items, such as creating the horizontal alphabetical list in the Fruit Encyclopedia.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_35_TITLE="Extensions" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_36_TITLE="About Parks" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_36_CONTENT="

The Parks sample site is designed as a simple site that can be routinely updated from the front end of Joomla!.

As a site, it is largely focused on a blog which can be updated using the front end article submission.

New weblinks can also be added through the front end.

A simple image gallery uses com_content with thumbnails displayed in a blog layout and full size images shown in article layout.

The Parks site features the language switch module. All of the content and modules are tagged as English (en-GB). If a second language pack is added with sample data this can be filtered using the language switch.

Parks uses HTML5 which is a major web standard (along with XHTML which is used in other areas of sample data).

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_37_TITLE="Articles Category" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_38_TITLE="Search (Atomic Template)" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_39_TITLE="Top Menu (Atomic Template)" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_40_TITLE="Top Quote (Atomic Template)" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_40_CONTENT="

Powerful Content Management and a Simple Extensible Framework.


" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_41_TITLE="Bottom Left Column (Atomic Template)" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_41_CONTENT="
This is a nested column

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_42_TITLE="Bottom Middle Column (Atomic Template)" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_42_CONTENT="
This is another nested column

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_43_TITLE="Sidebar (Atomic Template)" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_43_CONTENT="

A Simple Sidebar

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue.

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue.

Incremental leading

Vestibulum ante ipsum primis in faucibus orci luctus vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue. sed aliquet vehicula, lectus tellus.

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue. sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue. ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue. sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue.

4" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_44_TITLE="Login (Atomic Template)" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_45_TITLE="Shop" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_45_FOOTER_TEXT="Shop!" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_46_TITLE="Contribute" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_46_FOOTER_TEXT="Contribute!" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_47_TITLE="Smart Search Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_48_TITLE="All Front End Views" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_49_TITLE="All Modules" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_50_TITLE="Fruit Shop" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_51_TITLE="Popular Tags" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_52_TITLE="Similar Tags" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_53_TITLE="Syndicate Feeds" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_53_TEXT="Feed Entries" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_54_TITLE="Similar Tags 2" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_55_TITLE="Custom Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_55_CONTENT="

Example custom module for the testing data.

" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_56_TITLE="Admin Feed Module" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_57_TITLE="Statistics" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_NEWSFEEDS_CATEGORY_0_TITLE="Sample Data-Newsfeeds" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_NEWSFEEDS_NEWSFEED_0_NAME="Joomla! Announcements" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_NEWSFEEDS_NEWSFEED_1_NAME="New Joomla! Extensions" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_NEWSFEEDS_NEWSFEED_2_NAME="Joomla! Security News" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_NEWSFEEDS_NEWSFEED_3_NAME="Joomla! Connect" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_TAG_0_TITLE="Red" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_TAG_1_TITLE="Yellow" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_TAG_2_TITLE="Green" +PLG_SAMPLEDATA_TESTING_SAMPLEDATA_TAG_3_TITLE="Lime" +PLG_SAMPLEDATA_TESTING_STEP_FAILED="Step %1$u Failed: %2$s" +PLG_SAMPLEDATA_TESTING_STEP_SKIPPED="Step %1$u Skipped: '%2$s' is either not installed or disabled." +PLG_SAMPLEDATA_TESTING_STEP1_SUCCESS="Step 1: Tags done!" +PLG_SAMPLEDATA_TESTING_STEP2_SUCCESS="Step 2: Banners done!" +PLG_SAMPLEDATA_TESTING_STEP3_SUCCESS="Step 3: Articles done!" +PLG_SAMPLEDATA_TESTING_STEP4_SUCCESS="Step 4: Contacts done!" +PLG_SAMPLEDATA_TESTING_STEP5_SUCCESS="Step 5: Newsfeeds done!" +PLG_SAMPLEDATA_TESTING_STEP6_SUCCESS="Step 6: Menus done!" +PLG_SAMPLEDATA_TESTING_STEP7_SUCCESS="Step 7: Modules done!" +PLG_SAMPLEDATA_TESTING_XML_DESCRIPTION="Provides the testing sample data. Can be installed using the sample data module." diff --git a/language/en-GB/en-GB.plg_sampledata_testing.sys.ini b/language/en-GB/en-GB.plg_sampledata_testing.sys.ini new file mode 100644 index 0000000..6f37a3a --- /dev/null +++ b/language/en-GB/en-GB.plg_sampledata_testing.sys.ini @@ -0,0 +1,7 @@ +; Joomla! Project +; Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved. +; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php +; Note : All ini files need to be saved as UTF-8 + +PLG_SAMPLEDATA_TESTING="Sample Data - Testing" +PLG_SAMPLEDATA_TESTING_XML_DESCRIPTION="Provides the testing sample data. Can be installed using the sample data module." \ No newline at end of file diff --git a/testing.php b/testing.php new file mode 100644 index 0000000..c47ee0f --- /dev/null +++ b/testing.php @@ -0,0 +1,4748 @@ +name = $this->_name; + $data->title = JText::_('PLG_SAMPLEDATA_TESTING_OVERVIEW_TITLE'); + $data->description = JText::_('PLG_SAMPLEDATA_TESTING_OVERVIEW_DESC'); + $data->icon = 'flash'; + $data->steps = 7; + + return $data; + } + + /** + * First step to enter the sampledata. Tags + * + * @return array or void Will be converted into the JSON response to the module. + * + * @since 3.8.0 + */ + public function onAjaxSampledataApplyStep1() + { + if ($this->app->input->get('type') != $this->_name) + { + return; + } + + if (!JComponentHelper::isEnabled('com_tags')) + { + $response = array(); + $response['success'] = true; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_SKIPPED', 1, 'com_tags'); + + return $response; + } + + // Add Include Paths. + JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tags/models/', 'TagsModel'); + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tags/tables/'); + $model = JModelLegacy::getInstance('Tag', 'TagsModel'); + $access = (int) $this->app->get('access', 1); + $user = JFactory::getUser(); + $tagIds = array(); + + // Create first three tags. + for ($i = 0; $i <= 2; $i++) + { + $title = JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_TAG_' . $i . '_TITLE'); + $tag = array( + 'id' => 0, + 'title' => $title, + 'alias' => JApplicationHelper::stringURLSafe($title), + 'parent_id' => 1, + 'published' => 1, + 'access' => $access, + 'created_user_id' => $user->id, + 'language' => '*', + 'description' => '', + ); + + try + { + if (!$model->save($tag)) + { + JFactory::getLanguage()->load('com_tags'); + throw new Exception(JText::_($model->getError())); + } + } + catch (Exception $e) + { + + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 1, $e->getMessage()); + + return $response; + } + + $tagIds[] = $model->getItem()->id; + } + + // Create fourth tag as child of the third. + $title = JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_TAG_3_TITLE'); + $tag = array( + 'id' => 0, + 'title' => $title, + 'alias' => JApplicationHelper::stringURLSafe($title), + 'parent_id' => $tagIds[2], + 'published' => 1, + 'access' => $access, + 'created_user_id' => $user->id, + 'language' => '*', + 'description' => '', + ); + + try + { + if (!$model->save($tag)) + { + JFactory::getLanguage()->load('com_tags'); + throw new Exception(JText::_($model->getError())); + } + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 1, $e->getMessage()); + + return $response; + } + + $tagIds[] = $model->getItem()->id; + + // Storing IDs in UserState for later useage. + $this->app->setUserState('sampledata.testing.tags', $tagIds); + + $response = array(); + $response['success'] = true; + $response['message'] = JText::_('PLG_SAMPLEDATA_TESTING_STEP1_SUCCESS'); + + return $response; + } + + /** + * Second step to enter the sampledata. Banners + * + * @return array or void Will be converted into the JSON response to the module. + * + * @since 3.8.0 + */ + public function onAjaxSampledataApplyStep2() + { + if ($this->app->input->get('type') != $this->_name) + { + return; + } + + if (!JComponentHelper::isEnabled('com_banners')) + { + $response = array(); + $response['success'] = true; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_SKIPPED', 2, 'com_banners'); + + return $response; + } + + // Add Include Paths. + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_banners/tables/'); + + $user = JFactory::getUser(); + + // Add categories. + $categories = array(); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CATEGORY_0_TITLE'), + 'parent_id' => 1, + ); + + try + { + $catIds = $this->addCategories($categories, 'com_banners', 1); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 2, $e->getMessage()); + + return $response; + } + + $this->app->setUserState('sampledata.testing.banners.catids', $catIds); + + // Add Clients. + $clients = array(); + $clients[] = array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_1_NAME'), + 'contact' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_1_CONTACT'), + 'purchase_type' => -1, + 'track_clicks' => -1, + 'track_impressions' => -1, + ); + $clients[] = array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_2_NAME'), + 'contact' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_2_CONTACT'), + 'email' => 'banner@example.com', + 'purchase_type' => -1, + 'track_clicks' => 0, + 'track_impressions' => 0, + ); + $clients[] = array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_3_NAME'), + 'contact' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_CLIENT_3_CONTACT'), + 'purchase_type' => -1, + 'track_clicks' => 0, + 'track_impressions' => 0, + ); + $clientTable = JTable::getInstance('Client', 'BannersTable'); + $clientIds = array(); + + foreach ($clients as $client) + { + // Set values which are always the same. + $client['id'] = 0; + $client['email'] = 'banner@example.com'; + $client['state'] = 1; + $client['metakey'] = ''; + $client['extrainfo'] = ''; + + $clientTable->load(); + $clientTable->bind($client); + + try + { + if (!$clientTable->store()) + { + JFactory::getLanguage()->load('com_banners'); + throw new Exception(JText::_($clientTable->getError())); + } + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 2, $e->getMessage()); + + return $response; + } + + $clientIds[] = $clientTable->id; + } + + // Add Banners. + $banners = array(); + $banners[] = array( + 'cid' => $clientIds[2], + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_1_NAME'), + 'clickurl' => 'http://shop.joomla.org/amazoncom-bookstores.html', + 'catid' => $catIds[0], + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_1_DESC'), + 'ordering' => 1, + 'params' => '{"imageurl":"images/banners/white.png","width":"","height":"","alt":"Joomla! Books"}', + ); + $banners[] = array( + 'cid' => $clientIds[1], + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_2_NAME'), + 'clickurl' => 'http://shop.joomla.org', + 'catid' => $catIds[0], + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_2_DESC'), + 'ordering' => 2, + 'params' => '{"imageurl":"images/banners/white.png","width":"","height":"","alt":"Joomla! Shop"}', + ); + $banners[] = array( + 'cid' => $clientIds[0], + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_3_NAME'), + 'clickurl' => 'http://contribute.joomla.org', + 'catid' => $catIds[0], + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_BANNERS_BANNER_3_DESC'), + 'ordering' => 3, + 'params' => '{"imageurl":"images/banners/white.png","width":"","height":"","alt":""}', + ); + + $bannerTable = JTable::getInstance('Banner', 'BannersTable'); + + foreach ($banners as $banner) + { + // Set values which are always the same. + $banner['id'] = 0; + $banner['type'] = 0; + $banner['state'] = 1; + $banner['alias'] = JApplicationHelper::stringURLSafe($banner['name']); + $banner['custombannercode'] = ''; + $banner['metakey'] = ''; + $banner['purchase_type'] = -1; + $banner['created_by'] = $user->id; + $banner['created_by_alias'] = 'Joomla'; + $banner['language'] = 'en-GB'; + + $bannerTable->load(); + $bannerTable->bind($banner); + + try + { + if (!$bannerTable->store()) + { + JFactory::getLanguage()->load('com_banners'); + throw new Exception(JText::_($bannerTable->getError())); + } + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 2, $e->getMessage()); + + return $response; + } + } + + $response = array(); + $response['success'] = true; + $response['message'] = JText::_('PLG_SAMPLEDATA_TESTING_STEP2_SUCCESS'); + + return $response; + } + + /** + * Third step to enter the sampledata. Content + * + * @return array or void Will be converted into the JSON response to the module. + * + * @since 3.8.0 + */ + public function onAjaxSampledataApplyStep3() + { + if ($this->app->input->get('type') != $this->_name) + { + return; + } + + if (!JComponentHelper::isEnabled('com_content')) + { + $response = array(); + $response['success'] = true; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_SKIPPED', 3, 'com_content'); + + return $response; + } + + // Add Include Paths. + JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_content/models/', 'ContentModel'); + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_content/tables/'); + + // Insert first level of categories. + $categories = array(); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_TITLE'), + 'parent_id' => 1, + ); + + try + { + $catIdsLevel1 = $this->addCategories($categories, 'com_content', 1); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 3, $e->getMessage()); + + return $response; + } + + // Insert second level of categories. + $categories = array(); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_TITLE'), + 'parent_id' => $catIdsLevel1[0], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_TITLE'), + 'parent_id' => $catIdsLevel1[0], + 'language' => 'en-GB', + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_2_TITLE'), + 'parent_id' => $catIdsLevel1[0], + ); + + try + { + $catIdsLevel2 = $this->addCategories($categories, 'com_content', 2); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 3, $e->getMessage()); + + return $response; + } + + // Insert third level of categories. + $categories = array(); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_DESC'), + 'parent_id' => $catIdsLevel2[0], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_1_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_1_DESC'), + 'parent_id' => $catIdsLevel2[1], + 'params' => '{"category_layout":"","image":"images/sampledata/parks/banner_cradle.jpg"}', + 'language' => 'en-GB', + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_2_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_2_DESC'), + 'parent_id' => $catIdsLevel2[1], + 'language' => 'en-GB', + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_2_3_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_2_3_DESC'), + 'parent_id' => $catIdsLevel2[2], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_2_4_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_2_4_DESC'), + 'parent_id' => $catIdsLevel2[2], + ); + + try + { + $catIdsLevel3 = $this->addCategories($categories, 'com_content', 3); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 3, $e->getMessage()); + + return $response; + } + + // Insert fourth level of categories. + $categories = array(); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_0_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_0_DESC'), + 'parent_id' => $catIdsLevel3[0], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_DESC'), + 'parent_id' => $catIdsLevel3[0], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_DESC'), + 'parent_id' => $catIdsLevel3[0], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_3_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_3_DESC'), + 'parent_id' => $catIdsLevel3[0], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_4_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_4_DESC'), + 'parent_id' => $catIdsLevel3[0], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_2_5_TITLE'), + 'parent_id' => $catIdsLevel3[2], + 'language' => 'en-GB', + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_1_2_6_TITLE'), + 'parent_id' => $catIdsLevel3[2], + 'language' => 'en-GB', + ); + + try + { + $catIdsLevel4 = $this->addCategories($categories, 'com_content', 4); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 3, $e->getMessage()); + + return $response; + } + + // Insert fifth level of categories. + $categories = array(); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_0_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_0_DESC'), + 'parent_id' => $catIdsLevel4[1], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_1_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_1_DESC'), + 'parent_id' => $catIdsLevel4[1], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_2_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_2_DESC'), + 'parent_id' => $catIdsLevel4[1], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_3_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_3_DESC'), + 'parent_id' => $catIdsLevel4[1], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_4_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_1_4_DESC'), + 'parent_id' => $catIdsLevel4[1], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_5_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_5_DESC'), + 'parent_id' => $catIdsLevel4[2], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_6_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_6_DESC'), + 'parent_id' => $catIdsLevel4[2], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_7_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_CATEGORY_0_0_0_2_7_DESC'), + 'parent_id' => $catIdsLevel4[2], + ); + + try + { + $catIdsLevel5 = $this->addCategories($categories, 'com_content', 5); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 3, $e->getMessage()); + + return $response; + } + + $tagIds = $this->app->getUserState('sampledata.testing.tags', array()); + + $articles = array( + // Articles 0 - 9 + array( + 'catid' => $catIdsLevel4[0], + 'ordering' => 7, + ), + array( + 'catid' => $catIdsLevel5[0], + 'ordering' => 5, + ), + array( + 'catid' => $catIdsLevel5[0], + 'ordering' => 6, + ), + array( + 'catid' => $catIdsLevel5[0], + 'ordering' => 7, + ), + array( + 'catid' => $catIdsLevel4[4], + 'ordering' => 3, + ), + array( + 'catid' => $catIdsLevel2[1], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel5[2], + 'ordering' => 6, + ), + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 4, + 'featured' => 1 + ), + array( + 'catid' => $catIdsLevel4[0], + 'ordering' => 2, + ), + array( + 'catid' => $catIdsLevel4[0], + 'ordering' => 1, + ), + // Articles 10 - 19 + array( + 'catid' => $catIdsLevel4[6], + 'images' => array( + 'image_intro' => 'images/sampledata/parks/landscape/250px_cradle_mountain_seen_from_barn_bluff.jpg', + 'image_intro_alt' => 'Cradle Mountain', + 'image_fulltext' => 'images/sampledata/parks/landscape/250px_cradle_mountain_seen_from_barn_bluff.jpg', + 'image_fulltext_alt' => 'Cradle Mountain', + 'image_fulltext_caption' => 'Source: http://commons.wikimedia.org/wiki/File:Rainforest,bluemountainsNSW.jpg' + . ' Author: Alan J.W.C. License: GNU Free Documentation License v. 1.2 or later' + ), + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel5[2], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel2[2], + 'ordering' => 2, + ), + array( + 'catid' => $catIdsLevel4[4], + 'ordering' => 5, + ), + array( + 'catid' => $catIdsLevel4[4], + 'ordering' => 6, + ), + array( + 'catid' => $catIdsLevel5[2], + 'ordering' => 2, + ), + array( + 'catid' => $catIdsLevel3[1], + 'ordering' => 2, + ), + array( + 'catid' => $catIdsLevel3[1], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel5[2], + 'ordering' => 3, + ), + array( + 'catid' => $catIdsLevel2[2], + 'ordering' => 1, + ), + // Articles 20 - 29 + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 8, + ), + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 9, + ), + array( + 'catid' => $catIdsLevel3[3], + 'ordering' => 2, + ), + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 2, + 'tags' => $tagIds, + 'featured' => 1 + ), + array( + 'catid' => $catIdsLevel5[4], + 'images' => array( + 'image_intro' => 'images/sampledata/parks/animals/180px_koala_ag1.jpg', + 'image_intro_alt' => 'Koala Thumbnail', + 'image_fulltext' => 'images/sampledata/parks/animals/800px_koala_ag1.jpg', + 'image_fulltext_alt' => 'Koala Climbing Tree', + 'image_fulltext_caption' => 'Source: http://en.wikipedia.org/wiki/File:Koala-ag1.jpg' + . ' Author: Arnaud Gaillard License: Creative Commons Share Alike Attribution Generic 1.0' + ), + 'ordering' => 2, + ), + array( + 'catid' => $catIdsLevel5[3], + 'ordering' => 3, + ), + array( + 'catid' => $catIdsLevel5[0], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel5[1], + 'ordering' => 2, + ), + array( + 'catid' => $catIdsLevel5[4], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel5[0], + 'ordering' => 2, + ), + // Articles 30 - 39 + array( + 'catid' => $catIdsLevel5[0], + 'ordering' => 3, + ), + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 10, + ), + array( + 'catid' => $catIdsLevel5[4], + 'images' => array( + 'image_intro' => 'images/sampledata/parks/animals/200px_phyllopteryx_taeniolatus1.jpg', + 'image_intro_alt' => 'Phyllopteryx', + 'image_fulltext' => 'images/sampledata/parks/animals/800px_phyllopteryx_taeniolatus1.jpg', + 'image_fulltext_alt' => 'Phyllopteryx', + 'image_fulltext_caption' => 'Source: http://en.wikipedia.org/wiki/File:Phyllopteryx_taeniolatus1.jpg' + . ' Author: Richard Ling License: GNU Free Documentation License v 1.2 or later' + ), + 'ordering' => 3, + ), + array( + 'catid' => $catIdsLevel4[6], + 'images' => array( + 'image_intro' => 'images/sampledata/parks/landscape/120px_pinnacles_western_australia.jpg', + 'image_intro_alt' => 'Kings Canyon', + 'image_fulltext' => 'images/sampledata/parks/landscape/800px_pinnacles_western_australia.jpg', + 'image_fulltext_alt' => 'Kings Canyon', + 'image_fulltext_caption' => 'Source: http://commons.wikimedia.org/wiki/File:Pinnacles_Western_Australia.jpg' + . ' Author: Martin Gloss License: GNU Free Documentation license v 1.2 or later.' + ), + 'ordering' => 4, + ), + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 5, + 'featured' => 1 + ), + array( + 'catid' => $catIdsLevel5[2], + 'ordering' => 4, + ), + array( + 'catid' => $catIdsLevel5[0], + 'ordering' => 4, + ), + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 11, + ), + array( + 'catid' => $catIdsLevel4[0], + 'ordering' => 3, + ), + array( + 'catid' => $catIdsLevel5[3], + 'ordering' => 4, + ), + // Articles 40 - 49 + array( + 'catid' => $catIdsLevel4[4], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel1[0], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel5[4], + 'images' => array( + 'image_intro' => 'images/sampledata/parks/animals/220px_spottedquoll_2005_seanmcclean.jpg', + 'image_intro_alt' => 'Spotted Quoll', + 'image_fulltext' => 'images/sampledata/parks/animals/789px_spottedquoll_2005_seanmcclean.jpg', + 'image_fulltext_alt' => 'Spotted Quoll', + 'image_fulltext_caption' => 'Source: http://en.wikipedia.org/wiki/File:SpottedQuoll_2005_SeanMcClean.jpg' + . ' Author: Sean McClean License: GNU Free Documentation License v 1.2 or later' + ), + 'ordering' => 4, + ), + array( + 'catid' => $catIdsLevel5[3], + 'ordering' => 5, + ), + array( + 'catid' => $catIdsLevel5[3], + 'ordering' => 6, + ), + array( + 'catid' => $catIdsLevel4[4], + 'ordering' => 2, + ), + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 3, + ), + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel4[2], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 6, + 'featured' => 1 + ), + // Articles 50 - 59 + array( + 'catid' => $catIdsLevel4[4], + 'ordering' => 4, + ), + array( + 'catid' => $catIdsLevel4[0], + 'ordering' => 5, + ), + array( + 'catid' => $catIdsLevel2[0], + 'ordering' => 7, + ), + array( + 'catid' => $catIdsLevel5[1], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel5[4], + 'images' => array( + 'image_intro' => 'images/sampledata/parks/animals/180px_wobbegong.jpg', + 'image_intro_alt' => 'Wobbegon', + 'image_fulltext' => 'images/sampledata/parks/animals/800px_wobbegong.jpg', + 'image_fulltext_alt' => 'Wobbegon', + 'image_fulltext_caption' => 'Source: http://en.wikipedia.org/wiki/File:Wobbegong.jpg' + . ' Author: Richard Ling License: GNU Free Documentation License v 1.2 or later' + ), + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel3[3], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel5[3], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel4[0], + 'ordering' => 4, + ), + array( + 'catid' => $catIdsLevel5[4], + 'ordering' => 2, + ), + array( + 'catid' => $catIdsLevel4[4], + 'ordering' => 7, + ), + // Articles 60 - 68 + array( + 'catid' => $catIdsLevel4[6], + 'images' => array( + 'image_intro' => 'images/sampledata/parks/landscape/120px_rainforest_bluemountainsnsw.jpg', + 'float_intro' => 'none', + 'image_intro_alt' => 'Rain Forest Blue Mountains', + 'image_fulltext' => 'images/sampledata/parks/landscape/727px_rainforest_bluemountainsnsw.jpg', + 'image_fulltext_alt' => 'Rain Forest Blue Mountains', + 'image_fulltext_caption' => 'Source: http://commons.wikimedia.org/wiki/File:Rainforest,bluemountainsNSW.jpg' + . ' Author: Adam J.W.C. License: GNU Free Public Documentation License' + ), + 'ordering' => 2, + ), + array( + 'catid' => $catIdsLevel4[6], + 'images' => array( + 'image_intro' => 'images/sampledata/parks/landscape/180px_ormiston_pound.jpg', + 'float_intro' => 'none', + 'image_intro_alt' => 'Ormiston Pound', + 'image_fulltext' => 'images/sampledata/parks/landscape/800px_ormiston_pound.jpg', + 'image_fulltext_alt' => 'Ormiston Pound', + 'image_fulltext_caption' => 'Source: http://commons.wikimedia.org/wiki/File:Ormiston_Pound.JPG' + . ' Author: License: GNU Free Public Documentation License' + ), + 'ordering' => 3, + ), + array( + 'catid' => $catIdsLevel5[1], + 'ordering' => 3, + ), + array( + 'catid' => $catIdsLevel2[0], + 'state' => 2, + 'ordering' => 0, + ), + array( + 'catid' => $catIdsLevel4[4], + 'ordering' => 1, + ), + array( + 'catid' => $catIdsLevel4[4], + 'ordering' => 0, + ), + array( + 'catid' => $catIdsLevel5[3], + 'ordering' => 0, + ), + array( + 'catid' => $catIdsLevel5[0], + 'tags' => array($tagIds[0], $tagIds[1], $tagIds[2]), + 'ordering' => 0, + ), + array( + 'catid' => $catIdsLevel5[0], + 'ordering' => 0, + ) + ); + + try + { + $ids = $this->addArticles($articles); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 3, $e->getMessage()); + + return $response; + } + + $this->app->setUserState('sampledata.testing.articles', $ids); + $this->app->setUserState('sampledata.testing.articles.catids1', $catIdsLevel1); + $this->app->setUserState('sampledata.testing.articles.catids2', $catIdsLevel2); + $this->app->setUserState('sampledata.testing.articles.catids3', $catIdsLevel3); + $this->app->setUserState('sampledata.testing.articles.catids4', $catIdsLevel4); + $this->app->setUserState('sampledata.testing.articles.catids5', $catIdsLevel5); + + $response = array(); + $response['success'] = true; + $response['message'] = JText::_('PLG_SAMPLEDATA_TESTING_STEP3_SUCCESS'); + + return $response; + } + + /** + * Fourth step to enter the sampledata. Contacts + * + * @return array or void Will be converted into the JSON response to the module. + * + * @since 3.8.0 + */ + public function onAjaxSampledataApplyStep4() + { + if ($this->app->input->get('type') != $this->_name) + { + return; + } + + if (!JComponentHelper::isEnabled('com_contact')) + { + $response = array(); + $response['success'] = true; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_SKIPPED', 4, 'com_contact'); + + return $response; + } + + // Add Include Paths. + JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_contact/models/', 'ContactModel'); + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_contact/tables/'); + $model = JModelLegacy::getInstance('Contact', 'ContactModel'); + $access = (int) $this->app->get('access', 1); + $user = JFactory::getUser(); + + // Insert first level of categories. + $categories = array(); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_TITLE'), + 'parent_id' => 1, + ); + + try + { + $catIdsLevel1 = $this->addCategories($categories, 'com_contact', 1); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 4, $e->getMessage()); + + return $response; + } + + // Insert second level of categories. + $categories = array(); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_0_TITLE'), + 'parent_id' => $catIdsLevel1[0], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_1_TITLE'), + 'parent_id' => $catIdsLevel1[0], + ); + + try + { + $catIdsLevel2 = $this->addCategories($categories, 'com_contact', 2); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 4, $e->getMessage()); + + return $response; + } + + // Insert third level of categories. + $categories = array(); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_1_0_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_1_0_DESC'), + 'parent_id' => $catIdsLevel2[1], + ); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_1_1_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CATEGORY_0_1_1_DESC'), + 'parent_id' => $catIdsLevel2[1], + ); + + try + { + $catIdsLevel3 = $this->addCategories($categories, 'com_contact', 3); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 4, $e->getMessage()); + + return $response; + } + + // Insert fourth level of categories. + $categories = array(); + + // Categories A-Z. + for ($i = 65; $i <= 90; $i++) + { + $categories[] = array( + 'title' => chr($i), + 'parent_id' => $catIdsLevel3[1], + ); + } + + try + { + $catIdsLevel4 = $this->addCategories($categories, 'com_contact', 4); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 4, $e->getMessage()); + + return $response; + } + + $contacts = array( + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_NAME'), + 'con_position' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_POSITION'), + 'address' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_ADDRESS'), + 'suburb' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_SUBURB'), + 'state' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_STATE'), + 'country' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_COUNTRY'), + 'postcode' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_POSTCODE'), + 'telephone' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_TELEPHONE'), + 'fax' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_FAX'), + 'misc' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_MISC'), + 'sortname1' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_SORTNAME1'), + 'sortname2' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_SORTNAME2'), + 'sortname3' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_0_SORTNAME3'), + 'image' => 'images/powered_by.png', + 'email_to' => 'email@example.com', + 'default_con' => 1, + 'featured' => 1, + 'catid' => $catIdsLevel1[0], + 'params' => array( + 'show_links' => 1, + 'linka_name' => 'Twitter', + 'linka' => 'http://twitter.com/joomla', + 'linkb_name' => 'YouTube', + 'linkb' => 'http://www.youtube.com/user/joomla', + 'linkc_name' => 'Facebook', + 'linkc' => 'http://www.facebook.com/joomla', + 'linkd_name' => 'FriendFeed', + 'linkd' => 'http://friendfeed.com/joomla', + 'linke_name' => 'Scribed', + 'linke' => 'http://www.scribd.com/people/view/504592-joomla', + ), + ), + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_1_NAME'), + 'email_to' => 'webmaster@example.com', + 'featured' => 1, + 'catid' => $catIdsLevel2[0], + ), + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_2_NAME'), + 'misc' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_2_MISC'), + 'catid' => $catIdsLevel3[0], + ), + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_3_NAME'), + 'misc' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_3_MISC'), + 'catid' => $catIdsLevel3[0], + ), + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_NAME'), + 'con_position' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_POSITION'), + 'address' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_ADDRESS'), + 'state' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_STATE'), + 'misc' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_4_MISC'), + 'image' => 'images/sampledata/fruitshop/bananas_2.jpg', + 'catid' => $catIdsLevel4[1], + 'params' => array( + 'show_contact_category' => 'show_with_link', + 'presentation_style' => 'plain', + 'show_position' => 1, + 'show_state' => 1, + 'show_country' => 1, + 'show_links' => 1, + 'linka_name' => 'Wikipedia: Banana English', + 'linka' => 'https://en.wikipedia.org/wiki/Banana', + 'linkb_name' => 'Wikipedia: हिन्दी केला', + 'linkb' => 'https://hi.wikipedia.org/wiki/%E0%A4%95%E0%A5%87%E0%A4%B2%E0%A4%BE', + 'linkc_name' => 'Wikipedia:Banana Português', + 'linkc' => 'https://pt.wikipedia.org/wiki/Banana', + 'linkd_name' => 'Wikipedia: Банан Русский', + 'linkd' => 'https://ru.wikipedia.org/wiki/%D0%91%D0%B0%D0%BD%D0%B0%D0%BD', + 'linke_name' => '', + 'linke' => '', + 'contact_layout' => 'beez5:encyclopedia', + ), + ), + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_NAME'), + 'con_position' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_POSITION'), + 'address' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_ADDRESS'), + 'state' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_STATE'), + 'misc' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_5_MISC'), + 'image' => 'images/sampledata/fruitshop/apple.jpg', + 'catid' => $catIdsLevel4[0], + 'params' => array( + 'presentation_style' => 'plain', + 'show_links' => 1, + 'linka_name' => 'Wikipedia: Apples English', + 'linka' => 'https://en.wikipedia.org/wiki/Apple', + 'linkb_name' => 'Wikipedia: Manzana Español', + 'linkb' => 'https://es.wikipedia.org/wiki/Manzana', + 'linkc_name' => 'Wikipedia: 苹果 中文', + 'linkc' => 'http://zh.wikipedia.org/zh/苹果', + 'linkd_name' => 'Wikipedia: Tofaa Kiswahili', + 'linkd' => 'http://sw.wikipedia.org/wiki/Tofaa', + 'linke_name' => '', + 'linke' => '', + 'contact_layout' => 'beez5:encyclopedia', + ), + ), + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_NAME'), + 'con_position' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_POSITION'), + 'address' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_ADDRESS'), + 'state' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_STATE'), + 'misc' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_6_MISC'), + 'image' => 'images/sampledata/fruitshop/tamarind.jpg', + 'catid' => $catIdsLevel4[19], + 'params' => array( + 'presentation_style' => 'plain', + 'show_links' => 1, + 'linka_name' => 'Wikipedia: Tamarind English', + 'linka' => 'https://en.wikipedia.org/wiki/Tamarind', + 'linkb_name' => 'Wikipedia: তেঁতুল বাংলা', + 'linkb' => 'http://bn.wikipedia.org/wiki/তেঁতুল', + 'linkc_name' => 'Wikipedia: Tamarinier Français', + 'linkc' => 'https://fr.wikipedia.org/wiki/Tamarinier', + 'linkd_name' => 'Wikipedia:Tamaline lea faka-Tonga', + 'linkd' => 'http://to.wikipedia.org/wiki/Tamaline', + 'linke_name' => '', + 'linke' => '', + 'contact_layout' => 'beez5:encyclopedia', + ), + ), + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_NAME'), + 'suburb' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_SUBURB'), + 'country' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_COUNTRY'), + 'address' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_ADDRESS'), + 'telephone' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_TELEPHONE'), + 'misc' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTACT_CONTACT_7_MISC'), + 'catid' => $catIdsLevel2[1], + ), + ); + $contactIds = array(); + + foreach ($contacts as $contact) + { + // Set values which are always the same. + $contact['id'] = 0; + $contact['access'] = $access; + $contact['created_user_id'] = $user->id; + $contact['alias'] = JApplicationHelper::stringURLSafe($contact['name']); + $contact['published'] = 1; + $contact['language'] = '*'; + $contact['associations'] = array(); + + // Reset some fields if not specified. + $fields = array('con_position', 'address', 'suburb', 'state', 'country', 'postcode', 'telephone', 'fax', + 'misc', 'sortname1', 'sortname2', 'sortname3', 'email_to', 'image'); + + // Temporary, they are waiting for PR #14112 + $fields[] = 'metakey'; + $fields[] = 'metadesc'; + $contact['metadata'] = '{}'; + + foreach ($fields as $field) + { + if (!isset($contact[$field])) + { + $contact[$field] = ''; + } + } + + // Set featured state to published if not set. + if (!isset($contact['featured'])) + { + $contact['featured'] = 0; + } + + // Set state to published if not set. + if (!isset($contact['default_con'])) + { + $contact['default_con'] = 0; + } + + // Set params to empty if not set. + if (!isset($contact['params'])) + { + $contact['params'] = array( + 'linka_name' => '', + 'linka' => '', + 'linkb_name' => '', + 'linkb' => '', + 'linkc_name' => '', + 'linkc' => '', + 'linkd_name' => '', + 'linkd' => '', + 'linke_name' => '', + 'linke' => '', + ); + } + + try + { + if (!$model->save($contact)) + { + JFactory::getLanguage()->load('com_contact'); + throw new Exception(JText::_($model->getError())); + } + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 4, $e->getMessage()); + + return $response; + } + + // Get ID from category we just added + $contactIds[] = $model->getItem()->id; + + } + + // Storing IDs in UserState for later useage. + $this->app->setUserState('sampledata.testing.contacts', $contactIds); + $this->app->setUserState('sampledata.testing.contacts.catids1', $catIdsLevel1); + $this->app->setUserState('sampledata.testing.contacts.catids2', $catIdsLevel2); + $this->app->setUserState('sampledata.testing.contacts.catids3', $catIdsLevel3); + $this->app->setUserState('sampledata.testing.contacts.catids4', $catIdsLevel4); + + $response = array(); + $response['success'] = true; + $response['message'] = JText::_('PLG_SAMPLEDATA_TESTING_STEP4_SUCCESS'); + + return $response; + } + + /** + * Fifth step to enter the sampledata. Newsfeed. + * + * @return array or void Will be converted into the JSON response to the module. + * + * @since 3.8.0 + */ + public function onAjaxSampledataApplyStep5() + { + if ($this->app->input->get('type') != $this->_name) + { + return; + } + + if (!JComponentHelper::isEnabled('com_newsfeeds')) + { + $response = array(); + $response['success'] = true; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_SKIPPED', 5, 'com_newsfeed'); + + return $response; + } + + // Add Include Paths. + JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_newsfeeds/models/', 'NewsfeedsModel'); + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_newsfeeds/tables/'); + $model = JModelLegacy::getInstance('Newsfeed', 'NewsfeedsModel'); + $access = (int) $this->app->get('access', 1); + $user = JFactory::getUser(); + + // Insert first level of categories. + $categories = array(); + $categories[] = array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_NEWSFEEDS_CATEGORY_0_TITLE'), + 'parent_id' => 1, + ); + + try + { + $catIdsLevel1 = $this->addCategories($categories, 'com_newsfeeds', 1); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 5, $e->getMessage()); + + return $response; + } + + $newsfeeds = array( + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_NEWSFEEDS_NEWSFEED_0_NAME'), + 'link' => 'http://feeds.joomla.org/JoomlaAnnouncements', + 'ordering' => 1, + ), + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_NEWSFEEDS_NEWSFEED_1_NAME'), + 'link' => 'http://feeds.joomla.org/JoomlaExtensions', + 'ordering' => 4, + ), + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_NEWSFEEDS_NEWSFEED_2_NAME'), + 'link' => 'http://feeds.joomla.org/JoomlaSecurityNews', + 'ordering' => 2, + ), + array( + 'name' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_NEWSFEEDS_NEWSFEED_3_NAME'), + 'link' => 'http://feeds.joomla.org/JoomlaConnect', + 'ordering' => 3, + ), + ); + $newsfeedsIds = array(); + + foreach ($newsfeeds as $newsfeed) + { + // Set values which are always the same. + $newsfeed['id'] = 0; + $newsfeed['access'] = $access; + $newsfeed['created_user_id'] = $user->id; + $newsfeed['alias'] = JApplicationHelper::stringURLSafe($newsfeed['name']); + $newsfeed['published'] = 1; + $newsfeed['language'] = '*'; + $newsfeed['associations'] = array(); + $newsfeed['numarticles'] = 5; + $newsfeed['cache_time'] = 3600; + $newsfeed['rtl'] = 1; + $newsfeed['description'] = ''; + $newsfeed['images'] = ''; + $newsfeed['catid'] = $catIdsLevel1[0]; + + // Temporary, it should be fixed in other place + $newsfeed['metakey'] = ''; + $newsfeed['metadesc'] = ''; + $newsfeed['xreference'] = ''; + $newsfeed['metadata'] = '{}'; + $newsfeed['params'] = '{}'; + + try + { + if (!$model->save($newsfeed)) + { + JFactory::getLanguage()->load('com_newsfeeds'); + throw new Exception(JText::_($model->getError())); + } + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 5, $e->getMessage()); + + return $response; + } + + // Get ID from category we just added + $newsfeedsIds[] = $model->getItem()->id; + + } + + // Storing IDs in UserState for later useage. + $this->app->setUserState('sampledata.testing.newsfeeds', $newsfeedsIds); + $this->app->setUserState('sampledata.testing.newsfeeds.catids', $catIdsLevel1); + + $response = array(); + $response['success'] = true; + $response['message'] = JText::_('PLG_SAMPLEDATA_TESTING_STEP5_SUCCESS'); + + return $response; + } + + /** + * Sixth step to enter the sampledata. Menus. + * + * @return array or void Will be converted into the JSON response to the module. + * + * @since 3.8.0 + */ + public function onAjaxSampledataApplyStep6() + { + if ($this->app->input->get('type') != $this->_name) + { + return; + } + + if (!JComponentHelper::isEnabled('com_menus')) + { + $response = array(); + $response['success'] = true; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_SKIPPED', 6, 'com_menus'); + + return $response; + } + + // Create the menu types. + $menuTable = JTable::getInstance('Type', 'JTableMenu'); + $menuTypes = array(); + + for ($i = 0; $i <= 7; $i++) + { + $menu = array( + 'id' => 0, + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_' . $i . '_TITLE'), + 'description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_' . $i . '_DESCRIPTION'), + ); + + // Calculate menutype. + $menu['menutype'] = JApplicationHelper::stringURLSafe($menu['title']); + + $menuTable->load(); + $menuTable->bind($menu); + + try + { + $menuTable->store(); + } + catch (Exception $e) + { + JFactory::getLanguage()->load('com_menus'); + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 6, $e->getMessage()); + + return $response; + } + + $menuTypes[] = $menuTable->menutype; + } + + // Storing IDs in UserState for later useage. + $this->app->setUserState('sampledata.testing.menutypes', $menuTypes); + + // Get previously entered Data from UserStates + $contactIds = $this->app->getUserState('sampledata.testing.contacts'); + $contactCatids1 = $this->app->getUserState('sampledata.testing.contacts.catids1'); + $contactCatids3 = $this->app->getUserState('sampledata.testing.contacts.catids3'); + $articleIds = $this->app->getUserState('sampledata.testing.articles'); + $articleCatids1 = $this->app->getUserState('sampledata.testing.articles.catids1'); + $articleCatids2 = $this->app->getUserState('sampledata.testing.articles.catids2'); + $articleCatids3 = $this->app->getUserState('sampledata.testing.articles.catids3'); + $articleCatids4 = $this->app->getUserState('sampledata.testing.articles.catids4'); + $articleCatids5 = $this->app->getUserState('sampledata.testing.articles.catids5'); + $tagIds = $this->app->getUserState('sampledata.testing.tags'); + $newsfeedsIds = $this->app->getUserState('sampledata.testing.newsfeeds'); + $newsfeedsCatids = $this->app->getUserState('sampledata.testing.newsfeeds.catids'); + + // TODO: In future, lookup component IDs for decoupled extensions and template_styles. For now they can remain hardcoded. + + // Get MenuItemModel. + JLoader::register('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php'); + JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_menus/models/', 'MenusModel'); + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_menus/tables/'); + $this->menuItemModel = JModelLegacy::getInstance('Item', 'MenusModel'); + + // Unset current "Home" menuitem since we set a new one. + $menuItemTable = JTable::getInstance('Menu', 'MenusTable'); + $menuItemTable->load( + array( + 'home' => 1, + 'language' => '*', + ) + ); + $menuItemTable->home = 0; + $menuItemTable->store(); + + // Insert first level of menuitems. + $menuItems = array( + array( + 'menutype' => $menuTypes[0], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_0_TITLE'), + 'link' => 'index.php?option=com_users&view=profile', + 'component_id' => 25, + 'access' => 2, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[1], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_1_TITLE'), + 'link' => 'http://joomla.org', + 'type' => 'url', + 'component_id' => 0, + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_2_TITLE'), + 'link' => 'index.php?option=com_contact&view=contact&id=' . $contactIds[0], + 'component_id' => 8, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[4], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_3_TITLE'), + 'link' => 'index.php?option=com_users&view=login', + 'component_id' => 25, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[3], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_4_TITLE'), + 'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $articleCatids3[1], + 'component_id' => 22, + 'template_style_id' => 114, + 'params' => array( + 'show_description' => 1, + 'show_description_image' => 1, + 'num_leading_articles' => 1, + 'num_intro_articles' => 4, + 'num_columns' => 1, + 'num_links' => 4, + 'show_pagination' => 2, + 'show_feed_link' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[4], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_5_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[37], + 'component_id' => 22, + 'params' => array( + 'show_category' => 0, + 'show_parent_category' => 0, + 'show_author' => 0, + 'show_create_date' => 0, + 'show_modify_date' => 0, + 'show_publish_date' => 0, + 'show_item_navigation' => 0, + 'show_hits' => 0, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[3], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_6_TITLE'), + 'link' => 'index.php?option=com_content&view=form&layout=edit', + 'component_id' => 22, + 'access' => 3, + 'template_style_id' => 114, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[3], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_7_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[5], + 'component_id' => 22, + 'template_style_id' => 114, + 'params' => array( + 'show_title' => 0, + 'show_category' => 0, + 'link_category' => 0, + 'show_author' => 0, + 'show_create_date' => 0, + 'show_modify_date' => 0, + 'show_publish_date' => 0, + 'show_item_navigation' => 0, + 'show_print_icon' => 0, + 'show_email_icon' => 0, + 'show_hits' => 0, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[3], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_8_TITLE'), + 'link' => 'index.php?option=com_content&view=categories&id=' . $articleCatids3[2], + 'component_id' => 22, + 'template_style_id' => 114, + 'params' => array( + 'show_base_description' => 1, + 'drill_down_layout' => 1, + 'show_description' => 1, + 'show_description_image' => 1, + 'maxLevel' => -1, + 'num_leading_articles' => 1, + 'num_intro_articles' => 4, + 'num_columns' => 2, + 'num_links' => 4, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_9_TITLE'), + 'link' => 'index.php?option=com_contact&view=categories&id=' . $contactCatids1[0], + 'component_id' => 8, + 'params' => array( + 'maxLevel' => -1, + 'presentation_style' => 'sliders', + 'show_links' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_10_TITLE'), + 'link' => 'index.php?option=com_newsfeeds&view=categories&id=0', + 'component_id' => 17, + 'params' => array( + 'show_base_description' => 1, + 'categories_description' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_10_PARAM_CATEGORIES_DESCRIPTION'), + 'maxLevel' => -1, + 'show_empty_categories' => 1, + 'show_description' => 1, + 'show_description_image' => 1, + 'show_cat_num_articles' => 1, + 'feed_character_count' => 0, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_11_TITLE'), + 'link' => 'index.php?option=com_newsfeeds&view=category&id=' . $newsfeedsCatids[0], + 'component_id' => 17, + 'params' => array( + 'maxLevel' => -1, + 'feed_character_count' => 0, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_12_TITLE'), + 'link' => 'index.php?option=com_newsfeeds&view=newsfeed&id=' . $newsfeedsIds[0], + 'component_id' => 17, + 'params' => array( + 'feed_character_count' => 0, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_13_TITLE'), + 'link' => 'index.php?option=com_search&view=search', + 'component_id' => 19, + 'params' => array( + 'search_areas' => 1, + 'show_date' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_14_TITLE'), + 'link' => 'index.php?option=com_content&view=archive', + 'component_id' => 22, + 'params' => array( + 'show_category' => 1, + 'link_category' => 1, + 'show_title' => 1, + 'link_titles' => 1, + 'show_intro' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_15_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[5], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_16_TITLE'), + 'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $articleCatids3[1], + 'component_id' => 22, + 'params' => array( + 'show_description' => 0, + 'show_description_image' => 0, + 'num_leading_articles' => 1, + 'num_intro_articles' => 4, + 'num_columns' => 2, + 'num_links' => 4, + 'show_pagination' => 2, + 'show_feed_link' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_17_TITLE'), + 'link' => 'index.php?option=com_content&view=category&id=' . $articleCatids2[0], + 'component_id' => 22, + 'params' => array( + 'orderby_sec' => 'alpha', + 'display_num' => 10, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_18_TITLE'), + 'link' => 'index.php?option=com_content&view=featured', + 'component_id' => 22, + 'params' => array( + 'num_leading_articles' => 1, + 'num_intro_articles' => 4, + 'num_columns' => 2, + 'num_links' => 4, + 'multi_column_order' => 1, + 'orderby_sec' => 'front', + 'show_pagination' => 2, + 'show_feed_link' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_19_TITLE'), + 'link' => 'index.php?option=com_content&view=form&layout=edit', + 'component_id' => 22, + 'access' => 3, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_20_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[9], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_21_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[57], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 1, + 'page_title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_21_PARAM_PAGE_TITLE'), + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_22_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[8], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_23_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[51], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_24_TITLE'), + 'link' => 'index.php?option=com_content&view=categories&id=' . $articleCatids1[0], + 'component_id' => 22, + 'params' => array( + 'maxLevel' => -1, + 'num_leading_articles' => 1, + 'num_intro_articles' => 4, + 'num_columns' => 2, + 'num_links' => 4, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_25_TITLE'), + 'link' => 'index.php?option=com_contact&view=category&id=' . $contactCatids3[0], + 'component_id' => 8, + 'params' => array( + 'maxLevel' => -1, + 'display_num' => 20, + 'presentation_style' => 'sliders', + 'show_links' => 1, + 'show_feed_link' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_26_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[38], + 'component_id' => 22, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[52], + 'component_id' => 22, + 'params' => array( + 'show_title' => 1, + 'link_titles' => 0, + 'show_intro' => 1, + 'show_category' => 0, + 'show_parent_category' => 0, + 'show_author' => 0, + 'show_create_date' => 0, + 'show_modify_date' => 0, + 'show_publish_date' => 0, + 'show_item_navigation' => 0, + 'show_hits' => 0, + 'show_noauth' => 0, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_28_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[62], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_29_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[55], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_30_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[29], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_31_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[28], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_32_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[43], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_33_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[6], + 'component_id' => 22, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_34_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[39], + 'component_id' => 22, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_35_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[35], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_36_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[30], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_37_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[26], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_38_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[44], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_39_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[27], + 'component_id' => 22, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_40_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[56], + 'component_id' => 22, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_41_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[18], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_42_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[1], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_43_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[36], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_44_TITLE'), + 'link' => 'index.php?option=com_users&view=login', + 'component_id' => 25, + 'params' => array( + 'logindescription_show' => 1, + 'logoutdescription_show' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_45_TITLE'), + 'link' => 'index.php?option=com_users&view=profile', + 'component_id' => 25, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_46_TITLE'), + 'link' => 'index.php?option=com_users&view=profile&layout=edit', + 'component_id' => 25, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_47_TITLE'), + 'link' => 'index.php?option=com_users&view=registration', + 'component_id' => 25, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_48_TITLE'), + 'link' => 'index.php?option=com_users&view=remind', + 'component_id' => 25, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_49_TITLE'), + 'link' => 'index.php?option=com_users&view=reset', + 'component_id' => 25, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_50_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[15], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_51_TITLE'), + 'link' => 'index.php?option=com_content&view=category&id=' . $articleCatids5[0], + 'component_id' => 22, + 'params' => array( + 'maxLevel' => 0, + 'show_category_title' => 1, + 'show_empty_categories' => 1, + 'show_description' => 1, + 'display_num' => 0, + 'show_headings' => 0, + 'list_show_title' => 1, + 'list_show_date' => 0, + 'list_show_hits' => 0, + 'list_show_author' => 0, + 'orderby_sec' => 'order', + 'show_category' => 1, + 'link_category' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_52_TITLE'), + 'link' => 'index.php?option=com_content&view=category&id=' . $articleCatids5[1], + 'component_id' => 22, + 'params' => array( + 'maxLevel' => 0, + 'show_category_title' => 1, + 'show_description' => 1, + 'display_num' => 0, + 'show_headings' => 0, + 'list_show_title' => 1, + 'list_show_hits' => 0, + 'list_show_author' => 0, + 'orderby_sec' => 'order', + 'show_category' => 1, + 'link_category' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_53_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[58], + 'component_id' => 22, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_54_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[11], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[5], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_55_TITLE'), + 'link' => 'index.php?option=com_contact&view=categories&id=' . $contactCatids3[1], + 'component_id' => 8, + 'template_style_id' => 7, + 'params' => array( + 'show_base_description' => 1, + 'show_description' => 1, + 'show_description_image' => 1, + 'maxLevel' => -1, + 'show_empty_categories' => 1, + 'show_headings' => 0, + 'show_email_headings' => 0, + 'show_telephone_headings' => 0, + 'show_mobile_headings' => 0, + 'show_fax_headings' => 0, + 'show_suburb_headings' => 0, + 'show_links' => 1, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'pageclass_sfx' => ' categories-listalphabet', + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[5], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_56_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[19], + 'component_id' => 22, + 'template_style_id' => 7, + 'params' => array( + 'show_title' => 0, + 'link_titles' => 0, + 'show_intro' => 1, + 'show_category' => 0, + 'link_category' => 0, + 'show_author' => 0, + 'show_create_date' => 0, + 'show_modify_date' => 0, + 'show_publish_date' => 0, + 'show_item_navigation' => 0, + 'show_icons' => 0, + 'show_print_icon' => 0, + 'show_email_icon' => 0, + 'show_hits' => 0, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[5], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_57_TITLE'), + 'link' => 'index.php?option=com_contact&view=category&id=' . $contactCatids3[0], + 'component_id' => 8, + 'template_style_id' => 7, + 'params' => array( + 'maxLevel' => -1, + 'show_headings' => 0, + 'show_links' => 1, + 'show_feed_link' => 1, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[5], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_58_TITLE'), + 'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $articleCatids3[3], + 'component_id' => 22, + 'template_style_id' => 7, + 'params' => array( + 'layout_type' => 'blog', + 'show_category_title' => 1, + 'show_description' => 1, + 'maxLevel' => 0, + 'num_leading_articles' => 5, + 'num_intro_articles' => 0, + 'num_columns' => 1, + 'num_links' => 4, + 'orderby_sec' => 'alpha', + 'show_title' => 1, + 'link_titles' => 1, + 'show_intro' => 1, + 'show_category' => 0, + 'show_parent_category' => 0, + 'link_parent_category' => 0, + 'show_author' => 0, + 'show_publish_date' => 0, + 'show_hits' => 0, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[5], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_59_TITLE'), + 'link' => 'index.php?option=com_users&view=login', + 'component_id' => 25, + 'template_style_id' => 7, + 'params' => array( + 'logindescription_show' => 1, + 'logoutdescription_show' => 1, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[5], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_60_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[12], + 'component_id' => 22, + 'template_style_id' => 7, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[4], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_61_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[23], + 'component_id' => 22, + 'params' => array( + 'show_title' => 1, + 'show_category' => 0, + 'link_category' => 0, + 'show_parent_category' => 0, + 'link_parent_category' => 0, + 'show_author' => 0, + 'link_author' => 0, + 'show_create_date' => 0, + 'show_modify_date' => 0, + 'show_publish_date' => 0, + 'show_item_navigation' => 0, + 'show_icons' => 0, + 'show_print_icon' => 0, + 'show_email_icon' => 0, + 'show_hits' => 0, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + 'home' => 1 + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_62_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[21], + 'component_id' => 22, + 'params' => array( + 'show_title' => 1, + 'link_titles' => 0, + 'show_category' => 0, + 'show_parent_category' => 0, + 'show_author' => 0, + 'show_create_date' => 0, + 'show_modify_date' => 0, + 'show_publish_date' => 0, + 'show_item_navigation' => 0, + 'show_hits' => 0, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_63_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[2], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_64_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[25], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[4], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_65_TITLE'), + 'link' => 'administrator', + 'type' => 'url', + 'component_id' => 0, + 'params' => array(), + ), + array( + 'menutype' => $menuTypes[0], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_66_TITLE'), + 'link' => 'index.php?option=com_content&view=form&layout=edit', + 'component_id' => 22, + 'access' => 3, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_67_TITLE'), + 'link' => 'index.php?option=com_contact&view=featured', + 'component_id' => 8, + 'params' => array( + 'maxLevel' => -1, + 'presentation_style' => 'sliders', + 'show_links' => 1, + 'show_page_heading' => 1, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_68_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[3], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 1, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[5], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_69_TITLE'), + 'link' => 'index.php?option=com_content&view=form&layout=edit', + 'component_id' => 22, + 'access' => 4, + 'template_style_id' => 7, + 'params' => array( + 'enable_category' => 0, + 'catid' => 14, + 'menu_text' => 1, + 'show_page_heading' => 1, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[5], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_70_TITLE'), + 'link' => 'index.php?option=com_content&view=category&id=' . $articleCatids3[4], + 'component_id' => 22, + 'template_style_id' => 7, + 'params' => array( + 'show_category_title' => 1, + 'show_description' => 1, + 'maxLevel' => 0, + 'show_empty_categories' => 0, + 'display_num' => 10, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_71_TITLE'), + 'link' => 'index.php?option=com_finder&view=search&q=&f=', + 'component_id' => 27, + 'params' => array( + 'description_length' => 255, + 'allow_empty_query' => 0, + 'show_feed' => 0, + 'show_feed_text' => 0, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_72_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[66], + 'component_id' => 22, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_73_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[67], + 'component_id' => 22, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[7], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_74_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[68], + 'component_id' => 22, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_75_TITLE'), + 'link' => 'index.php?option=com_tags&view=tag&layout=list&id[0]=' . $tagIds[2], + 'component_id' => 29, + 'params' => array( + 'tag_list_item_maximum_characters' => 0, + 'maximum' => 200, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_76_TITLE'), + 'link' => 'index.php?option=com_tags&view=tag&id[0]=' . $tagIds[1], + 'component_id' => 29, + 'params' => array( + 'tag_list_item_maximum_characters' => 0, + 'maximum' => 200, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_77_TITLE'), + 'link' => 'index.php?option=com_tags&view=tags', + 'component_id' => 29, + 'params' => array( + 'tag_columns' => 4, + 'all_tags_tag_maximum_characters' => 0, + 'maximum' => 200, + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_78_TITLE'), + 'link' => 'index.php?option=com_config&view=config&controller=config.display.config', + 'component_id' => 23, + 'access' => 6, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[6], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_79_TITLE'), + 'link' => 'index.php?option=com_config&view=templates&controller=config.display.templates', + 'component_id' => 23, + 'access' => 6, + 'params' => array( + 'menu_text' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + ); + + try + { + $menuIdsLevel1 = $this->addMenuItems($menuItems, 1); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 6, $e->getMessage()); + + return $response; + } + + // Insert alias menu items for level 1. + $menuItems = array( + array( + 'menutype' => $menuTypes[1], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_100_TITLE'), + 'link' => 'index.php?Itemid=', + 'type' => 'alias', + 'component_id' => 0, + 'params' => array( + 'aliasoptions' => $menuIdsLevel1[5], + ), + ), + array( + 'menutype' => $menuTypes[1], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_101_TITLE'), + 'link' => 'index.php?Itemid=', + 'type' => 'alias', + 'component_id' => 0, + 'params' => array( + 'aliasoptions' => $menuIdsLevel1[61], + ), + ), + array( + 'menutype' => $menuTypes[1], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_102_TITLE'), + 'link' => 'index.php?Itemid=', + 'type' => 'alias', + 'component_id' => 22, + 'params' => array( + 'aliasoptions' => $menuIdsLevel1[7], + 'menu_text' => 1 + ), + ), + array( + 'menutype' => $menuTypes[1], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_103_TITLE'), + 'link' => 'index.php?Itemid=', + 'type' => 'alias', + 'component_id' => 0, + 'params' => array( + 'aliasoptions' => $menuIdsLevel1[56], + 'menu_text' => 1 + ), + ), + ); + + try + { + $menuIdsLevel1Alias = $this->addMenuItems($menuItems, 1); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 6, $e->getMessage()); + + return $response; + } + + // Insert second level of menuitems. + $menuItems = array( + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_TITLE'), + 'link' => 'index.php?option=com_content&view=categories&id=' . $articleCatids3[0], + 'parent_id' => $menuIdsLevel1[27], + 'component_id' => 22, + 'params' => array( + 'show_base_description' => 1, + 'maxLevelcat' => 1, + 'show_empty_categories_cat' => 1, + 'show_subcat_desc_cat' => 1, + 'show_cat_num_articles_cat' => 0, + 'show_description' => 1, + 'show_description_image' => 1, + 'maxLevel' => 1, + 'show_empty_categories' => 1, + 'num_leading_articles' => 1, + 'num_intro_articles' => 4, + 'num_columns' => 2, + 'num_links' => 4, + 'secure' => 0 + ), + ), + array( + 'menutype' => $menuTypes[3], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_8_1_TITLE'), + 'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $articleCatids4[5], + 'parent_id' => $menuIdsLevel1[8], + 'component_id' => 22, + 'template_style_id' => 114, + 'params' => array( + 'show_description' => 1, + 'show_description_image' => 0, + 'num_leading_articles' => 0, + 'num_intro_articles' => 6, + 'num_columns' => 2, + 'num_links' => 4, + 'multi_column_order' => 1, + 'show_pagination' => 2, + 'show_intro' => 0, + 'show_category' => 1, + 'link_category' => 1, + 'show_author' => 0, + 'show_create_date' => 0, + 'show_modify_date' => 0, + 'show_publish_date' => 0, + 'show_item_navigation' => 1, + 'show_feed_link' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[3], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_8_2_TITLE'), + 'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $articleCatids4[5], + 'parent_id' => $menuIdsLevel1[8], + 'component_id' => 22, + 'template_style_id' => 114, + 'params' => array( + 'show_description' => 0, + 'show_description_image' => 0, + 'num_leading_articles' => 0, + 'num_intro_articles' => 4, + 'num_columns' => 2, + 'num_links' => 4, + 'multi_column_order' => 1, + 'show_pagination' => 2, + 'show_intro' => 0, + 'show_category' => 1, + 'show_parent_category' => 0, + 'link_parent_category' => 0, + 'show_author' => 0, + 'link_author' => 0, + 'show_create_date' => 0, + 'show_modify_date' => 0, + 'show_publish_date' => 0, + 'show_item_navigation' => 1, + 'show_readmore' => 1, + 'show_icons' => 0, + 'show_print_icon' => 0, + 'show_email_icon' => 0, + 'show_hits' => 0, + 'show_feed_link' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + ); + + try + { + $menuIdsLevel2 = $this->addMenuItems($menuItems, 2); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 6, $e->getMessage()); + + return $response; + } + + // Insert alias menu items for level 2. + $menuItems = array( + array( + 'menutype' => $menuTypes[4], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_103_TITLE'), + 'link' => 'index.php?Itemid=', + 'type' => 'alias', + 'parent_id' => $menuIdsLevel1[5], + 'component_id' => 0, + 'params' => array( + 'aliasoptions' => $menuIdsLevel1[7], + ), + ), + array( + 'menutype' => $menuTypes[4], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_104_TITLE'), + 'link' => 'index.php?Itemid=', + 'type' => 'alias', + 'parent_id' => $menuIdsLevel1[5], + 'component_id' => 0, + 'params' => array( + 'aliasoptions' => $menuIdsLevel1[56], + ), + ), + ); + + try + { + $menuIdsLevel2Alias = $this->addMenuItems($menuItems, 2); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 6, $e->getMessage()); + + return $response; + } + + // Insert third level of menuitems. + $menuItems = array( + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_TITLE'), + 'link' => 'index.php?option=com_content&view=category&id=' . $articleCatids4[2], + 'parent_id' => $menuIdsLevel2[0], + 'component_id' => '22', + 'params' => array( + 'show_description' => 1, + 'maxLevel' => 2, + 'show_empty_categories' => 1, + 'show_no_articles' => '0', + 'show_subcat_desc' => 1, + 'show_pagination_limit' => '0', + 'filter_field' => 'hide', + 'show_headings' => '0', + 'list_show_date' => '0', + 'list_show_hits' => '0', + 'list_show_author' => '0', + 'show_pagination' => '0', + 'show_title' => 1, + 'link_titles' => 1, + 'menu_text' => 1, + 'page_title' => 'Templates', + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_1_TITLE'), + 'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $articleCatids4[3], + 'parent_id' => $menuIdsLevel2[0], + 'component_id' => '22', + 'params' => array( + 'show_description' => 1, + 'show_description_image' => 1, + 'show_category_title' => 1, + 'num_leading_articles' => 1, + 'num_intro_articles' => 4, + 'num_columns' => 2, + 'num_links' => 4, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_TITLE'), + 'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $articleCatids4[4], + 'parent_id' => $menuIdsLevel2[0], + 'component_id' => '22', + 'params' => array( + 'show_description' => 1, + 'show_category_title' => 1, + 'num_leading_articles' => 0, + 'num_intro_articles' => 7, + 'num_columns' => 1, + 'num_links' => 0, + 'orderby_sec' => 'order', + 'show_category' => 0, + 'link_category' => 0, + 'show_parent_category' => 0, + 'link_parent_category' => 0, + 'show_author' => 0, + 'show_create_date' => 0, + 'show_modify_date' => 0, + 'show_publish_date' => 0, + 'show_icons' => 0, + 'show_print_icon' => 0, + 'show_email_icon' => 0, + 'show_hits' => 0, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ) + ); + + try + { + $menuIdsLevel3 = $this->addMenuItems($menuItems, 3); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 6, $e->getMessage()); + + return $response; + } + + // Insert fourth level of menuitems. + $menuItems = array( + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_0_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[45], + 'parent_id' => $menuIdsLevel3[2], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_1_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[4], + 'parent_id' => $menuIdsLevel3[2], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_2_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[59], + 'parent_id' => $menuIdsLevel3[2], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_3_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[13], + 'parent_id' => $menuIdsLevel3[2], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0 + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_4_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[14], + 'parent_id' => $menuIdsLevel3[2], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_5_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[40], + 'parent_id' => $menuIdsLevel3[2], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_2_6_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[50], + 'parent_id' => $menuIdsLevel3[2], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_7_TITLE'), + 'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $articleCatids5[6], + 'parent_id' => $menuIdsLevel3[0], + 'component_id' => 22, + 'params' => array( + 'show_description' => 1, + 'num_leading_articles' => 1, + 'num_intro_articles' => 4, + 'num_columns' => 2, + 'num_links' => 4, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_8_TITLE'), + 'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $articleCatids5[5], + 'parent_id' => $menuIdsLevel3[0], + 'component_id' => 22, + 'params' => array( + 'show_description' => 1, + 'num_leading_articles' => 2, + 'num_intro_articles' => 4, + 'num_columns' => 2, + 'num_links' => 4, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_9_TITLE'), + 'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $articleCatids5[7], + 'parent_id' => $menuIdsLevel3[0], + 'component_id' => 22, + 'params' => array( + 'show_description' => 1, + 'num_leading_articles' => 1, + 'num_intro_articles' => 4, + 'num_columns' => 2, + 'num_links' => 4, + 'show_page_heading' => 1, + 'secure' => 0, + ), + ), + ); + + try + { + $menuIdsLevel4 = $this->addMenuItems($menuItems, 4); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 6, $e->getMessage()); + + return $response; + } + + // Insert fifth level of menuitems. + $menuItems = array( + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_8_0_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[48], + 'parent_id' => $menuIdsLevel4[8], + 'component_id' => 22, + 'template_style_id' => 3, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_8_1_TITLE'), + 'link' => 'index.php?option=com_content&view=featured', + 'parent_id' => $menuIdsLevel4[8], + 'component_id' => 22, + 'template_style_id' => 3, + 'params' => array( + 'num_leading_articles' => 1, + 'num_intro_articles' => 3, + 'num_columns' => 3, + 'num_links' => 0, + 'multi_column_order' => 1, + 'orderby_sec' => 'front', + 'show_pagination' => 2, + 'show_feed_link' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_7_2_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[48], + 'parent_id' => $menuIdsLevel4[7], + 'component_id' => 22, + 'template_style_id' => 4, + 'params' => array( + 'show_page_heading' => 0, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_7_3_TITLE'), + 'link' => 'index.php?option=com_content&view=featured', + 'parent_id' => $menuIdsLevel4[7], + 'component_id' => 22, + 'template_style_id' => 4, + 'params' => array( + 'num_leading_articles' => 1, + 'num_intro_articles' => 3, + 'num_columns' => 3, + 'num_links' => 0, + 'multi_column_order' => 1, + 'orderby_sec' => 'front', + 'show_pagination' => 2, + 'show_feed_link' => 1, + 'show_page_heading' => 0, + 'secure' => 0, + ), + + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_9_4_TITLE'), + 'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[48], + 'parent_id' => $menuIdsLevel4[9], + 'component_id' => 22, + 'params' => array( + 'show_page_heading' => 1, + 'secure' => 0, + ), + ), + array( + 'menutype' => $menuTypes[2], + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_ITEM_27_0_0_9_5_TITLE'), + 'link' => 'index.php?option=com_content&view=featured', + 'parent_id' => $menuIdsLevel4[9], + 'component_id' => 22, + 'params' => array( + 'num_leading_articles' => 1, + 'num_intro_articles' => 3, + 'num_columns' => 3, + 'num_links' => 0, + 'orderby_sec' => 'front', + 'show_page_heading' => 1, + 'secure' => 0, + ), + ), + ); + + try + { + $menuIdsLevel5 = $this->addMenuItems($menuItems, 5); + } + catch (Exception $e) + { + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 6, $e->getMessage()); + + return $response; + } + + $this->app->setUserState('sampledata.testing.menus.menuids1', $menuIdsLevel1); + $this->app->setUserState('sampledata.testing.menus.menuids2', $menuIdsLevel2); + $this->app->setUserState('sampledata.testing.menus.menuids3', $menuIdsLevel3); + $this->app->setUserState('sampledata.testing.menus.menuids4', $menuIdsLevel4); + $this->app->setUserState('sampledata.testing.menus.menuids5', $menuIdsLevel5); + + $response = array(); + $response['success'] = true; + $response['message'] = JText::_('PLG_SAMPLEDATA_TESTING_STEP6_SUCCESS'); + + return $response; + } + + /** + * Seventh step to enter the sampledata. Modules. + * + * @return array or void Will be converted into the JSON response to the module. + * + * @since 3.8.0 + */ + public function onAjaxSampledataApplyStep7() + { + if ($this->app->input->get('type') != $this->_name) + { + return; + } + + if (!JComponentHelper::isEnabled('com_modules')) + { + $response = array(); + $response['success'] = true; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_SKIPPED', 7, 'com_modules'); + + return $response; + } + + // Add Include Paths. + JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_modules/models/', 'ModulesModelModule'); + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_modules/tables/'); + $model = JModelLegacy::getInstance('Module', 'ModulesModel'); + $access = (int) $this->app->get('access', 1); + + // Get previously entered Data from UserStates + $menuTypes = $this->app->getUserState('sampledata.testing.menutypes'); + $articleCatids1 = $this->app->getUserState('sampledata.testing.articles.catids1'); + $articleCatids2 = $this->app->getUserState('sampledata.testing.articles.catids2'); + $articleCatids3 = $this->app->getUserState('sampledata.testing.articles.catids3'); + $articleCatids4 = $this->app->getUserState('sampledata.testing.articles.catids4'); + $articleCatids5 = $this->app->getUserState('sampledata.testing.articles.catids5'); + $bannerCatids = $this->app->getUserState('sampledata.testing.banners.catids'); + $menuIdsLevel1 = $this->app->getUserState('sampledata.testing.menus.menuids1'); + $menuIdsLevel2 = $this->app->getUserState('sampledata.testing.menus.menuids2'); + $menuIdsLevel5 = $this->app->getUserState('sampledata.testing.menus.menuids5'); + + $modules = array( + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_0_TITLE'), + 'ordering' => 1, + 'position' => 'position-7', + 'module' => 'mod_menu', + 'access' => $access, + 'params' => array( + 'menutype' => $menuTypes[4], + 'startLevel' => 0, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'moduleclass_sfx' => '_menu', + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_1_TITLE'), + 'ordering' => 1, + 'position' => 'position-10', + 'module' => 'mod_banners', + 'access' => $access, + 'showtitle' => 0, + 'params' => array( + 'target' => 1, + 'count' => 1, + 'cid' => 3, + 'catid' => array(), + 'tag_search' => 0, + 'ordering' => 0, + 'footer_text' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_1_FOOTEER_TEXT'), + 'cache' => 1, + 'cache_time' => 900 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_2_TITLE'), + 'ordering' => 3, + 'position' => 'position-7', + 'module' => 'mod_menu', + 'access' => 2, + 'assignment' => -1, + 'assigned' => array( + $menuIdsLevel1[4], + $menuIdsLevel1[6], + $menuIdsLevel1[7], + $menuIdsLevel1[8], + $menuIdsLevel1[55], + $menuIdsLevel1[56], + $menuIdsLevel1[57], + $menuIdsLevel1[58], + $menuIdsLevel1[59], + $menuIdsLevel1[60], + $menuIdsLevel1[69], + $menuIdsLevel1[70], + $menuIdsLevel2[1], + $menuIdsLevel2[2], + ), + 'params' => array( + 'menutype' => $menuTypes[0], + 'startLevel' => 1, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'moduleclass_sfx' => '_menu', + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_3_TITLE'), + 'ordering' => 1, + 'position' => 'position-1', + 'module' => 'mod_menu', + 'access' => $access, + 'params' => array( + 'menutype' => $menuTypes[1], + 'startLevel' => 1, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'class_sfx' => ' nav-pills', + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'itemid', + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_4_TITLE'), + 'ordering' => 2, + 'position' => 'position-5', + 'module' => 'mod_menu', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[4], + $menuIdsLevel1[5], + $menuIdsLevel1[6], + $menuIdsLevel1[7], + $menuIdsLevel1[8], + $menuIdsLevel2[1], + $menuIdsLevel2[2], + ), + 'params' => array( + 'menutype' => $menuTypes[3], + 'startLevel' => 1, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_5_TITLE'), + 'ordering' => 4, + 'position' => 'position-7', + 'module' => 'mod_menu', + 'access' => $access, + 'assignment' => -1, + 'assigned' => array( + $menuIdsLevel1[4], + $menuIdsLevel1[5], + $menuIdsLevel1[6], + $menuIdsLevel1[7], + $menuIdsLevel1[8], + $menuIdsLevel1[55], + $menuIdsLevel1[56], + $menuIdsLevel1[57], + $menuIdsLevel1[58], + $menuIdsLevel1[59], + $menuIdsLevel1[60], + $menuIdsLevel1[69], + $menuIdsLevel1[70], + $menuIdsLevel2[1], + $menuIdsLevel2[2], + ), + 'params' => array( + 'menutype' => $menuTypes[2], + 'startLevel' => 1, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'moduleclass_sfx' => '_menu', + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_6_TITLE'), + 'ordering' => 1, + 'position' => 'sitemapload', + 'module' => 'mod_menu', + 'access' => $access, + 'showtitle' => 0, + 'assignment' => '-', + 'params' => array( + 'menutype' => $menuTypes[4], + 'startLevel' => 2, + 'endLevel' => 3, + 'showAllChildren' => 1, + 'class_sfx' => 'sitemap', + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_7_TITLE'), + 'ordering' => 5, + 'position' => 'position-7', + 'module' => 'mod_menu', + 'access' => $access, + 'assignment' => -1, + 'assigned' => array( + $menuIdsLevel1[4], + $menuIdsLevel1[5], + $menuIdsLevel1[6], + $menuIdsLevel1[7], + $menuIdsLevel1[8], + $menuIdsLevel1[55], + $menuIdsLevel1[56], + $menuIdsLevel1[57], + $menuIdsLevel1[58], + $menuIdsLevel1[59], + $menuIdsLevel1[60], + $menuIdsLevel1[69], + $menuIdsLevel1[70], + $menuIdsLevel2[1], + $menuIdsLevel2[2], + ), + 'params' => array( + 'menutype' => $menuTypes[4], + 'startLevel' => 1, + 'endLevel' => 1, + 'showAllChildren' => 0, + 'moduleclass_sfx' => '_menu', + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_8_TITLE'), + 'ordering' => 1, + 'module' => 'mod_articles_archive', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[42], + ), + 'params' => array( + 'count' => '10', + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_9_TITLE'), + 'ordering' => 1, + 'module' => 'mod_articles_latest', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[37], + ), + 'params' => array( + 'catid' => array($articleCatids2[0]), + 'count' => 5, + 'ordering' => 'c_dsc', + 'user_id' => 0, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_10_TITLE'), + 'ordering' => 1, + 'module' => 'mod_articles_popular', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[30], + ), + 'params' => array( + 'catid' => array($articleCatids2[1], $articleCatids2[2]), + 'count' => 5, + 'show_front' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_11_TITLE'), + 'ordering' => 1, + 'module' => 'mod_feed', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[50], + ), + 'params' => array( + 'rssurl' => 'http://community.joomla.org/blogs/community.feed?type=rss', + 'rssrtl' => 0, + 'rsstitle' => 1, + 'rssdesc' => 1, + 'rssimage' => 1, + 'rssitems' => 3, + 'rssitemdesc' => 1, + 'word_count' => 0, + 'cache' => 1, + 'cache_time' => 900 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_12_TITLE'), + 'ordering' => 1, + 'module' => 'mod_articles_news', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[36], + ), + 'params' => array( + 'catid' => array($articleCatids2[0]), + 'image' => 0, + 'item_title' => 0, + 'item_heading' => 'h4', + 'showLastSeparator' => 1, + 'readmore' => 1, + 'count' => 1, + 'ordering' => 'a.publish_up', + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_13_TITLE'), + 'ordering' => 1, + 'module' => 'mod_random_image', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[35], + ), + 'params' => array( + 'type' => 'jpg', + 'folder' => 'images/sampledata/parks/animals', + 'width' => 180, + 'cache' => 0 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_14_TITLE'), + 'ordering' => 1, + 'module' => 'mod_related_items', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[43], + ), + 'params' => array( + 'showDate' => 0, + 'owncache' => 1 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_15_TITLE'), + 'ordering' => 1, + 'module' => 'mod_search', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[34], + ), + 'params' => array( + 'width' => '20', + 'button_pos' => 'right', + 'opensearch' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_16_TITLE'), + 'ordering' => 1, + 'module' => 'mod_stats', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[32], + ), + 'params' => array( + 'serverinfo' => 1, + 'siteinfo' => 1, + 'counter' => 1, + 'increase' => 0, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_17_TITLE'), + 'ordering' => 1, + 'position' => 'syndicateload', + 'module' => 'mod_syndicate', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[38], + ), + 'params' => array( + 'text' => 'Feed Entries', + 'format' => 'rss', + 'cache' => 0 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_18_TITLE'), + 'ordering' => 1, + 'module' => 'mod_users_latest', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[28], + ), + 'params' => array( + 'shownumber' => 5, + 'linknames' => 0, + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_19_TITLE'), + 'ordering' => 1, + 'module' => 'mod_whosonline', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[29], + ), + 'params' => array( + 'showmode' => 2, + 'linknames' => 0, + 'cache' => 0 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_20_TITLE'), + 'ordering' => 1, + 'module' => 'mod_wrapper', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[40], + ), + 'params' => array( + 'url' => 'http://www.youtube.com/embed/vb2eObvmvdI', + 'add' => 1, + 'scrolling' => 'auto', + 'width' => 640, + 'height' => 390, + 'height_auto' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_21_TITLE'), + 'ordering' => 1, + 'module' => 'mod_footer', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[41], + ), + 'params' => array( + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_22_TITLE'), + 'ordering' => 1, + 'module' => 'mod_login', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[39], + ), + 'params' => array( + 'login' => 280, + 'logout' => 280, + 'greeting' => 1, + 'name' => 0, + 'usesecure' => 0, + 'cache' => 0 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_23_TITLE'), + 'ordering' => 1, + 'module' => 'mod_menu', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[31], + ), + 'params' => array( + 'menutype' => $menuTypes[4], + 'startLevel' => 1, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_24_TITLE'), + 'ordering' => 6, + 'position' => 'position-7', + 'module' => 'mod_articles_latest', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[4], + $menuIdsLevel1[6], + $menuIdsLevel1[7], + $menuIdsLevel1[8], + $menuIdsLevel2[1], + $menuIdsLevel2[2], + ), + 'params' => array( + 'catid' => array($articleCatids3[1]), + 'count' => 5, + 'ordering' => 'c_dsc', + 'user_id' => 0, + 'show_front' => 1, + 'cache' => 1, + 'cache_time' => 900 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_25_TITLE'), + 'content' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_25_CONTENT'), + 'ordering' => 1, + 'module' => 'mod_custom', + 'access' => $access, + 'assigned' => array( + $menuIdsLevel1[54], + ), + 'params' => array( + 'prepare_content' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_26_TITLE'), + 'ordering' => 1, + 'module' => 'mod_breadcrumbs', + 'access' => $access, + 'assigned' => array( + $menuIdsLevel1[53], + ), + 'params' => array( + 'showHere' => 1, + 'showHome' => 1, + 'homeText' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_26_HOMETEXT'), + 'showLast' => 1, + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_27_TITLE'), + 'ordering' => 1, + 'module' => 'mod_banners', + 'access' => $access, + 'assigned' => array( + $menuIdsLevel1[33], + ), + 'params' => array( + 'target' => 1, + 'count' => 1, + 'cid' => 1, + 'catid' => array($bannerCatids[0]), + 'tag_search' => 0, + 'ordering' => 'random', + 'cache' => 1, + 'cache_time' => 900 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_28_TITLE'), + 'ordering' => 3, + 'position' => 'position-5', + 'module' => 'mod_menu', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[5], + $menuIdsLevel1[55], + $menuIdsLevel1[56], + $menuIdsLevel1[57], + $menuIdsLevel1[58], + $menuIdsLevel1[59], + $menuIdsLevel1[60], + $menuIdsLevel1[69], + $menuIdsLevel1[70], + ), + 'params' => array( + 'menutype' => $menuTypes[5], + 'startLevel' => 1, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_29_TITLE'), + 'content' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_29_CONTENT'), + 'ordering' => 1, + 'position' => 'position-12', + 'module' => 'mod_custom', + 'access' => 4, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[55], + $menuIdsLevel1[56], + $menuIdsLevel1[57], + $menuIdsLevel1[58], + $menuIdsLevel1[59], + $menuIdsLevel1[60], + $menuIdsLevel1[69], + $menuIdsLevel1[70], + ), + 'params' => array( + 'prepare_content' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_30_TITLE'), + 'ordering' => 1, + 'module' => 'mod_articles_categories', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[63], + ), + 'params' => array( + 'parent' => 29, + 'show_description' => 0, + 'show_children' => 0, + 'count' => 0, + 'maxlevel' => 0, + 'item_heading' => 4, + 'owncache' => 1, + 'cache_time' => 900 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_31_TITLE'), + 'ordering' => 3, + 'position' => 'position-4', + 'published' => 0, + 'module' => 'mod_languages', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[4], + $menuIdsLevel1[6], + $menuIdsLevel1[7], + $menuIdsLevel1[8], + $menuIdsLevel2[1], + $menuIdsLevel2[2], + ), + 'params' => array( + 'image' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_32_TITLE'), + 'ordering' => 1, + 'position' => 'position-0', + 'module' => 'mod_search', + 'access' => $access, + 'params' => array( + 'width' => '20', + 'button_pos' => 'right', + 'imagebutton' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_33_TITLE'), + 'ordering' => 1, + 'position' => 'languageswitcherload', + 'published' => 0, + 'module' => 'mod_languages', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[64], + ), + 'params' => array( + 'image' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_34_TITLE'), + 'content' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_34_CONTENT'), + 'ordering' => 1, + 'position' => 'position-4', + 'module' => 'mod_custom', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[55], + $menuIdsLevel1[56], + $menuIdsLevel1[57], + $menuIdsLevel1[58], + $menuIdsLevel1[60], + $menuIdsLevel1[69], + $menuIdsLevel1[70], + ), + 'params' => array( + 'prepare_content' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_35_TITLE'), + 'ordering' => 2, + 'position' => 'position-7', + 'published' => 0, + 'module' => 'mod_menu', + 'access' => $access, + 'assignment' => '-', + 'params' => array( + 'menutype' => $menuTypes[2], + 'startLevel' => 1, + 'endLevel' => 6, + 'showAllChildren' => 0, + 'class_sfx' => '-menu', + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_36_TITLE'), + 'content' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_36_CONTENT'), + 'ordering' => 2, + 'position' => 'position-4', + 'module' => 'mod_custom', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[7], + ), + 'params' => array( + 'prepare_content' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_37_TITLE'), + 'ordering' => 1, + 'module' => 'mod_articles_category', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[69], + ), + 'params' => array( + 'mode' => 'normal', + 'show_on_article_page' => 1, + 'show_front' => 'show', + 'count' => 0, + 'category_filtering_type' => 1, + 'catid' => array($articleCatids4[5]), + 'show_child_category_articles' => 0, + 'levels' => 1, + 'author_filtering_type' => 1, + 'created_by' => array(), + 'author_alias_filtering_type' => 1, + 'created_by_alias' => array(), + 'date_filtering' => 'off', + 'date_field' => 'a.created', + 'relative_date' => 30, + 'article_ordering' => 'a.title', + 'article_ordering_direction' => 'ASC', + 'article_grouping' => 'none', + 'article_grouping_direction' => 'ksort', + 'month_year_format' => 'F Y', + 'item_heading' => 4, + 'link_titles' => 1, + 'show_date' => 0, + 'show_date_field' => 'created', + 'show_date_format' => 'Y-m-d H:i:s', + 'show_category' => 0, + 'show_hits' => 0, + 'show_author' => 0, + 'show_introtext' => 0, + 'introtext_limit' => 100, + 'show_readmore' => 0, + 'show_readmore_title' => 1, + 'readmore_limit' => 15, + 'owncache' => 1, + 'cache_time' => 900 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_38_TITLE'), + 'ordering' => 1, + 'position' => 'atomic-search', + 'module' => 'mod_search', + 'access' => $access, + 'showtitle' => 0, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel5[0], + $menuIdsLevel5[1], + ), + 'params' => array( + 'width' => 20, + 'button_pos' => 'right', + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_39_TITLE'), + 'ordering' => 1, + 'position' => 'atomic-topmenu', + 'module' => 'mod_menu', + 'access' => $access, + 'showtitle' => 0, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel5[0], + $menuIdsLevel5[1], + ), + 'params' => array( + 'menutype' => $menuTypes[2], + 'startLevel' => 1, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'itemid' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_40_TITLE'), + 'content' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_40_CONTENT'), + 'ordering' => 1, + 'position' => 'atomic-topquote', + 'module' => 'mod_custom', + 'access' => $access, + 'showtitle' => 0, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel5[0], + $menuIdsLevel5[1], + ), + 'params' => array( + 'prepare_content' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_41_TITLE'), + 'content' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_41_CONTENT'), + 'ordering' => 1, + 'position' => 'atomic-bottomleft', + 'module' => 'mod_custom', + 'access' => $access, + 'showtitle' => 0, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel5[0], + $menuIdsLevel5[1], + ), + 'params' => array( + 'prepare_content' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_42_TITLE'), + 'content' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_42_CONTENT'), + 'ordering' => 1, + 'position' => 'atomic-bottommiddle', + 'module' => 'mod_custom', + 'access' => $access, + 'showtitle' => 0, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel5[0], + $menuIdsLevel5[1], + ), + 'params' => array( + 'prepare_content' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_43_TITLE'), + 'content' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_43_CONTENT'), + 'ordering' => 1, + 'position' => 'atomic-sidebar', + 'module' => 'mod_custom', + 'access' => $access, + 'showtitle' => 0, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel5[0], + $menuIdsLevel5[1], + ), + 'params' => array( + 'prepare_content' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static' + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_44_TITLE'), + 'ordering' => 2, + 'position' => 'atomic-sidebar', + 'module' => 'mod_login', + 'access' => $access, + 'showtitle' => 0, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel5[0], + $menuIdsLevel5[1], + ), + 'params' => array( + 'greeting' => 1, + 'name' => 0, + 'usesecure' => 0, + 'cache' => 0 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_45_TITLE'), + 'ordering' => 1, + 'position' => 'position-11', + 'module' => 'mod_banners', + 'access' => $access, + 'showtitle' => 0, + 'params' => array( + 'target' => 1, + 'count' => 1, + 'cid' => 2, + 'catid' => array($bannerCatids[0]), + 'tag_search' => 0, + 'ordering' => 0, + 'footer_text' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_45_FOOTER_TEXT'), + 'cache' => 1, + 'cache_time' => 900 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_46_TITLE'), + 'ordering' => 1, + 'position' => 'position-9', + 'module' => 'mod_banners', + 'access' => $access, + 'showtitle' => 0, + 'params' => array( + 'target' => 1, + 'count' => 1, + 'cid' => 1, + 'catid' => array($bannerCatids[0]), + 'tag_search' => 0, + 'ordering' => 0, + 'footer_text' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_46_FOOTER_TEXT'), + 'cache' => 1, + 'cache_time' => 900 + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_47_TITLE'), + 'ordering' => 2, + 'module' => 'mod_finder', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[72], + ), + 'params' => array( + 'show_autosuggest' => 1, + 'show_advanced' => 0, + 'field_size' => array(20), + 'show_label' => 0, + 'label_pos' => 'top', + 'show_button' => 0, + 'button_pos' => 'right', + 'opensearch' => 1, + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_48_TITLE'), + 'ordering' => '2', + 'position' => 'position-7', + 'module' => 'mod_menu', + 'access' => $access, + 'params' => array( + 'menutype' => $menuTypes[6], + 'startLevel' => 1, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'itemid', + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_49_TITLE'), + 'ordering' => 1, + 'position' => 'position-8', + 'module' => 'mod_menu', + 'access' => $access, + 'params' => array( + 'menutype' => $menuTypes[7], + 'startLevel' => 1, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'itemid', + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_50_TITLE'), + 'ordering' => 1, + 'position' => 'position-7', + 'module' => 'mod_menu', + 'access' => $access, + 'assignment' => 1, + 'assigned' => array( + $menuIdsLevel1[5], + $menuIdsLevel1[55], + $menuIdsLevel1[56], + $menuIdsLevel1[57], + $menuIdsLevel1[58], + $menuIdsLevel1[59], + $menuIdsLevel1[60], + $menuIdsLevel1[69], + $menuIdsLevel1[70], + ), + 'params' => array( + 'menutype' => $menuTypes[5], + 'startLevel' => 1, + 'endLevel' => 0, + 'showAllChildren' => 0, + 'cache' => 0, + 'cache_time' => 900, + 'cachemode' => 'itemid', + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_51_TITLE'), + 'ordering' => 1, + 'module' => 'mod_tags_popular', + 'access' => $access, + 'params' => array( + 'maximum' => 5, + 'timeframe' => 'alltime', + 'order_value' => 'count', + 'order_direction' => 1, + 'display_count' => 0, + 'no_results_text' => 0, + 'minsize' => 1, + 'maxsize' => 2, + 'owncache' => 1, + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_52_TITLE'), + 'ordering' => 1, + 'module' => 'mod_tags_similar', + 'access' => $access, + 'params' => array( + 'maximum' => 5, + 'matchtype' => 'any', + 'owncache' => 1, + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_53_TITLE'), + 'ordering' => 1, + 'position' => 'position-8', + 'module' => 'mod_syndicate', + 'access' => $access, + 'params' => array( + 'display_text' => 1, + 'text' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_53_TEXT'), + 'format' => 'rss', + 'cache' => 0, + ), + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_54_TITLE'), + 'ordering' => 1, + 'position' => 'position-8', + 'module' => 'mod_tags_similar', + 'access' => $access, + 'params' => array( + 'maximum' => 5, + 'matchtype' => 'any', + 'owncache' => 1, + ), + ), + // Admin modules + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_55_TITLE'), + 'content' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_55_CONTENT'), + 'ordering' => 5, + 'position' => 'cpanel', + 'module' => 'mod_custom', + 'access' => $access, + 'params' => array( + 'prepare_content' => 1, + 'cache' => 1, + 'cache_time' => 900, + 'bootstrap_size' => 6, + ), + 'client_id' => 1, + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_56_TITLE'), + 'ordering' => 6, + 'position' => 'cpanel', + 'published' => 0, + 'module' => 'mod_feed', + 'access' => $access, + 'params' => array( + 'rssurl' => 'http://feeds.joomla.org/JoomlaAnnouncements', + 'rssrtl' => 0, + 'rsstitle' => 1, + 'rssdesc' => 1, + 'rssimage' => 1, + 'rssitems' => 3, + 'rssitemdesc' => 1, + 'word_count' => 0, + 'cache' => 1, + 'cache_time' => 900, + 'bootstrap_size' => 6, + ), + 'client_id' => 1, + ), + array( + 'title' => JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MODULES_MODULE_57_TITLE'), + 'ordering' => 3, + 'position' => 'cpanel', + 'module' => 'mod_stats_admin', + 'access' => $access, + 'params' => array( + 'serverinfo' => 1, + 'siteinfo' => 1, + 'counter' => 1, + 'increase' => 0, + 'cache' => 1, + 'cache_time' => 900, + 'cachemode' => 'static', + 'bootstrap_size' => 6, + ), + 'client_id' => 1, + ), + /* TODO: Altering existing admin modules (Bootstrap Size). + array( + 'title' => 'Popular Articles', + 'position' => 'cpanel', + 'module' => 'mod_popular', + 'params' => array( + 'bootstrap_size' => 6, + ), + ), + array( + 'title' => 'Logged-in Users', + 'position' => 'cpanel', + 'module' => 'mod_logged', + 'params' => array( + 'bootstrap_size' => 6, + ), + ), + array( + 'title' => 'Recently Added Articles', + 'position' => 'cpanel', + 'module' => 'mod_latest', + 'params' => array( + 'bootstrap_size' => 6, + ), + ), */ + ); + + $modulesIds = array(); + + foreach ($modules as $module) + { + // Set values which are always the same. + $module['id'] = 0; + $module['asset_id'] = 0; + $module['language'] = '*'; + $module['description'] = ''; + + if (!isset($module['published'])) + { + $module['published'] = 1; + } + + if (!isset($module['note'])) + { + $module['note'] = ''; + } + + if (!isset($module['content'])) + { + $module['content'] = ''; + } + + if (!isset($module['showtitle'])) + { + $module['showtitle'] = 1; + } + + if (!isset($module['position'])) + { + $module['position'] = ''; + } + + if (!isset($module['params'])) + { + $module['params'] = array(); + } + + if (!isset($module['client_id'])) + { + $module['client_id'] = 0; + } + + if (!isset($module['assignment'])) + { + $module['assignment'] = 0; + } + + if (!$model->save($module)) + { + JFactory::getLanguage()->load('com_modules'); + $response = array(); + $response['success'] = false; + $response['message'] = JText::sprintf('PLG_SAMPLEDATA_TESTING_STEP_FAILED', 7, JText::_($model->getError())); + + return $response; + } + + // Get ID from category we just added + $modulesIds[] = $model->getItem()->id; + + } + + $response = array(); + $response['success'] = true; + $response['message'] = JText::_('PLG_SAMPLEDATA_TESTING_STEP7_SUCCESS'); + + return $response; + } + + /** + * Adds categories. + * + * @param array $categories Array holding the category arrays. + * @param string $extension Name of the extension. + * @param integer $level Level in the category tree. + * + * @return array IDs of the inserted categories. + * + * @throws Exception + * + * @since 3.8.0 + */ + private function addCategories(array $categories, $extension, $level) + { + if (!$this->categoryModel) + { + JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/models/', 'CategoriesModel'); + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/tables/'); + $this->categoryModel = JModelLegacy::getInstance('Category', 'CategoriesModel'); + } + + $catIds = array(); + $access = (int) $this->app->get('access', 1); + $user = JFactory::getUser(); + + foreach ($categories as $category) + { + // Set values which are always the same. + $category['id'] = 0; + $category['published'] = 1; + $category['access'] = $access; + $category['created_user_id'] = $user->id; + $category['extension'] = $extension; + $category['level'] = $level; + $category['alias'] = JApplicationHelper::stringURLSafe($category['title']); + $category['associations'] = array(); + + // Set description to empty if not set + if (!isset($category['description'])) + { + $category['description'] = ''; + } + + // Language defaults to "All" (*) when not set + if (!isset($category['language'])) + { + $category['language'] = '*'; + } + + if (!$this->categoryModel->save($category)) + { + throw new Exception($this->categoryModel->getError()); + } + + // Get ID from category we just added + $catIds[] = $this->categoryModel->getItem()->id; + } + + return $catIds; + } + + /** + * Adds articles. + * + * @param array $articles Array holding the category arrays. + * + * @return array IDs of the inserted categories. + * + * @throws Exception + * + * @since 3.8.0 + */ + private function addArticles(array $articles) + { + $ids = array(); + + $access = (int) $this->app->get('access', 1); + $user = JFactory::getUser(); + $model = JModelLegacy::getInstance('Article', 'ContentModel'); + + foreach ($articles as $i => $article) + { + // Set values from language strings. + $article['title'] = JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_' . str_pad($i, 2, '0', STR_PAD_LEFT) . '_TITLE'); + $article['introtext'] = JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_' . str_pad($i, 2, '0', STR_PAD_LEFT) . '_INTROTEXT'); + $article['fulltext'] = JText::_('PLG_SAMPLEDATA_TESTING_SAMPLEDATA_CONTENT_ARTICLE_' . str_pad($i, 2, '0', STR_PAD_LEFT) . '_FULLTEXT'); + + // Set values which are always the same. + $article['id'] = 0; + $article['access'] = $access; + $article['created_user_id'] = $user->id; + $article['alias'] = JApplicationHelper::stringURLSafe($article['title']); + $article['language'] = '*'; + $article['associations'] = array(); + $article['metakey'] = ''; + $article['metadesc'] = ''; + $article['xreference'] = ''; + + // Set state to published if not set. + if (!isset($article['state'])) + { + $article['state'] = 1; + } + + // Set state to published if not set. + if (!isset($article['featured'])) + { + $article['featured'] = 0; + } + + // Set images to empty if not set. + if (!isset($article['images'])) + { + $article['images'] = ''; + } + // JSON Encode it when set. + else + { + $article['images'] = json_encode($article['images']); + } + + if (!$model->save($article)) + { + JFactory::getLanguage()->load('com_content'); + throw new Exception(JText::_($model->getError())); + } + + // Get ID from category we just added + $ids[] = $model->getItem()->id; + + } + + return $ids; + } + + /** + * Adds menuitems. + * + * @param array $menuItems Array holding the menuitems arrays. + * @param integer $level Level in the category tree. + * + * @return array IDs of the inserted menuitems. + * + * @throws Exception + * + * @since 3.8.0 + */ + private function addMenuItems(array $menuItems, $level) + { + $itemIds = array(); + $access = (int) $this->app->get('access', 1); + $user = JFactory::getUser(); + + foreach ($menuItems as $menuItem) + { + // Reset item.id in model state. + $this->menuItemModel->setState('item.id', 0); + + // Set values which are always the same. + $menuItem['id'] = 0; + $menuItem['created_user_id'] = $user->id; + $menuItem['alias'] = JApplicationHelper::stringURLSafe($menuItem['title']); + $menuItem['published'] = 1; + $menuItem['language'] = '*'; + $menuItem['note'] = ''; + $menuItem['img'] = ''; + $menuItem['browserNav'] = 0; + $menuItem['associations'] = array(); + $menuItem['client_id'] = 0; + $menuItem['level'] = $level; + + // Set access to default if not set + if (!isset($menuItem['access'])) + { + $menuItem['access'] = $access; + } + + // Set type to 'component' if not set + if (!isset($menuItem['type'])) + { + $menuItem['type'] = 'component'; + } + + // Set template_style_id to global if not set + if (!isset($menuItem['template_style_id'])) + { + $menuItem['template_style_id'] = 0; + } + + // Set home if not set + if (!isset($menuItem['home'])) + { + $menuItem['home'] = 0; + } + + // Set parent_id to root (1) if not set + if (!isset($menuItem['parent_id'])) + { + $menuItem['parent_id'] = 1; + } + + if (!$this->menuItemModel->save($menuItem)) + { + // Try two times with another alias (-1 and -2). + $menuItem['alias'] .= '-1'; + + if (!$this->menuItemModel->save($menuItem)) + { + $menuItem['alias'] = substr_replace($menuItem['alias'], '2', -1); + + if (!$this->menuItemModel->save($menuItem)) + { + throw new Exception($menuItem['title'] . ' => ' . $menuItem['alias'] . ' : ' . $this->menuItemModel->getError()); + } + } + } + + // Get ID from menuitem we just added + $itemIds[] = $this->menuItemModel->getstate('item.id'); + } + + return $itemIds; + } +} diff --git a/testing.xml b/testing.xml new file mode 100644 index 0000000..0a1d722 --- /dev/null +++ b/testing.xml @@ -0,0 +1,20 @@ + + + plg_sampledata_testing + Joomla! Project + July 2017 + Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved. + GNU General Public License version 2 or later; see LICENSE.txt + admin@joomla.org + www.joomla.org + 3.8.0 + PLG_SAMPLEDATA_TESTING_XML_DESCRIPTION + + language + testing.php + + + + + +