Skip to content
This repository was archived by the owner on Jan 25, 2021. It is now read-only.
Merged
24 changes: 10 additions & 14 deletions administrator/language/en-GB/plg_sampledata_blog.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,26 @@ PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_3_TITLE="About your home page"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_4_FULLTEXT=""
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_4_INTROTEXT="<p>Your site has some commonly used modules already preconfigured. </p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_4_TITLE="Your Modules"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_5_FULLTEXT="<p>These include:</p><ul><li>Image Module which holds the image beneath the menu. This is a Custom module that you can edit to change the image.</li><li>Most Read Posts which lists articles based on the number of times they have been read.</li><li>Older Articles which lists out articles by month.</li><li>Syndicate which allows your readers to read your posts in a news reader.</li><li>Popular Tags, which will appear if you use tagging on your articles. Enter a tag in the Tags field when editing.</li></ul><p>Each of these modules has many options which you can experiment with in the Module Manager in your site Administrator. Moving your mouse over a module and selecting the edit icon will take you to an edit screen for that module. Always be sure to save and close any module you edit.</p><p>Joomla! also includes many other modules you can incorporate in your site. As you develop your site you may want to add more module that you can find at the <a href='https://extensions.joomla.org/'>Joomla Extensions Directory.</a></p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_5_INTROTEXT="<p>Templates control the look and feel of your website. This blog is installed with the Cassiopeia template.</p><p>You can edit the options by selecting the Working on Your Site, Template Settings link in the top menu (visible when you login).</p><p>For example you can change the site background color, highlights color, site title, site description and title font used.<br>More options are available in the site administrator. You may also install a new template using the extension manager.</p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_5_FULLTEXT="<p>This blog is installed with the Cassiopeia template.</p><p>You can edit the options by selecting the Working on Your Site, Template Settings link in the top menu (visible when you login).</p><p>For example you can change the site background color, highlights color, site title, site description and title font used.</p><p>More options are available in the site administrator. You may also install a new template using the extension manager.</p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_5_INTROTEXT="<p>Templates control the look and feel of your website.</p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_5_TITLE="Your Template"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_6_FULLTEXT=" This will be a nice documentation on multi column Layouts in J4. <br><br>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est "
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_6_INTROTEXT="<p>Millions of Websites are built on Joomla!</p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_6_TITLE="Multilingual"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_7_FULLTEXT="Uurnip greens yarrow ricebean rutabaga endive cauliflower sea lettuce kohlrabi amaranth water spinach avocado daikon napa cabbage asparagus winter purslane kale. Celery potato scallion desert raisin horseradish spinach carrot soko. Lotus root water spinach fennel kombu maize bamboo shoot green bean swiss chard seakale pumpkin onion chickpea gram corn pea. Brussels sprout coriander water chestnut gourd swiss chard wakame kohlrabi beetroot carrot watercress. Corn amaranth salsify bunya nuts nori azuki bean chickweed potato bell pepper artichoke. "
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_7_INTROTEXT="<p>We love Joomla to the moon and back! Thank you to all voluteers who have contributed!</p> "
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_7_TITLE="Flexible System"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_6_TITLE="Millions"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_7_FULLTEXT="<p>Uurnip greens yarrow ricebean rutabaga endive cauliflower sea lettuce kohlrabi amaranth water spinach avocado daikon napa cabbage asparagus winter purslane kale. Celery potato scallion desert raisin horseradish spinach carrot soko. Lotus root water spinach fennel kombu maize bamboo shoot green bean swiss chard seakale pumpkin onion chickpea gram corn pea. Brussels sprout coriander water chestnut gourd swiss chard wakame kohlrabi beetroot carrot watercress. Corn amaranth salsify bunya nuts nori azuki bean chickweed potato bell pepper artichoke.</p> "
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_7_INTROTEXT="<p>We love Joomla to the moon and back! Thank you to all volunteers who have contributed!</p> "
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_7_TITLE="Love"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_8_FULLTEXT="<p>Cupcake ipsum dolor. Sit amet cotton candy ice cream sesame snaps cake marshmallow powder. Ice cream chocolate cake marshmallow halvah bonbon. Dragée carrot cake danish candy muffin brownie. Candy sugar plum ice cream chupa chups macaroon tiramisu soufflé oat cake. Topping cheesecake lollipop gummi bears icing sweet roll donut liquorice. Pie jelly-o candy donut oat cake cotton candy. </p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_8_INTROTEXT="<p>We proudly present Joomla Version 4!</p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_8_TITLE="Security First!"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_8_TITLE="Joomla"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_CATEGORY_0_TITLE="Blog"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_CATEGORY_1_TITLE="Help"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_CATEGORY_2_TITLE="Template"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_CATEGORY_2_TITLE="Joomla"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_0_TITLE="Blog"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_10_TITLE="Template Settings"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_11_TITLE="Template"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_11_TITLE="Sample Layouts"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_12_TITLE="Category List"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_14_TITLE="Article"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_15_TITLE="Archive"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_16_TITLE="Articles"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_17_TITLE="Lorem"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_18_TITLE="Ipsum"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_13_TITLE="Articles"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_1_TITLE="About"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_2_TITLE="Author Login"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_3_TITLE="Create a Post"
Expand Down
145 changes: 79 additions & 66 deletions plugins/sampledata/blog/blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,9 @@ public function onAjaxSampledataApplyStep2()
'num_leading_articles' => 4,
'num_intro_articles' => 0,
'num_links' => 2,
'orderby_sec' => 'front',
'orderby_sec' => 'rdate',
'order_date' => 'published',
'blog_class_leading' => 'boxed masonry-2',
'blog_class_leading' => 'boxed columns-1',
'show_pagination' => 2,
'show_pagination_results' => 1,
'show_category' => 0,
Expand Down Expand Up @@ -582,29 +582,15 @@ public function onAjaxSampledataApplyStep2()
'secure' => 0,
),
),
// Blog with 3 columns
array(
// Sample metismenu (heading)
'menutype' => $menuTypes[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_11_TITLE'),
'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $catids[2],
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'type' => 'heading',
'link' => '',
'component_id' => 0,
'params' => array(
'layout_type' => 'blog',
'blog_class_leading' => '',
'blog_class' => 'boxed columns-2',
'show_category_title' => 0,
'num_leading_articles' => 1,
'num_intro_articles' => 2,
'num_links' => 0,
'orderby_sec' => 'rdate',
'order_date' => 'published',
'show_pagination' => 2,
'show_pagination_results' => 1,
'show_category' => 0,
'info_bloc_position' => 0,
'show_publish_date' => 0,
'show_hits' => 0,
'show_feed_link' => 1,
'layout_type' => 'heading',
'menu_text' => 1,
'show_page_heading' => 0,
'secure' => 0,
Expand Down Expand Up @@ -725,7 +711,7 @@ public function onAjaxSampledataApplyStep2()
'menutype' => $menuTypes[1],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_9_TITLE'),
'link' => 'index.php?option=com_config&view=config',
'parent_id' => $menuIdsLevel1[4],
'parent_id' => $menuIdsLevel1[5],
'component_id' => ExtensionHelper::getExtensionRecord('com_config', 'component')->extension_id,
'access' => 6,
'params' => array(
Expand All @@ -738,7 +724,7 @@ public function onAjaxSampledataApplyStep2()
'menutype' => $menuTypes[1],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_10_TITLE'),
'link' => 'index.php?option=com_config&view=templates',
'parent_id' => $menuIdsLevel1[4],
'parent_id' => $menuIdsLevel1[5],
'component_id' => ExtensionHelper::getExtensionRecord('com_config', 'component')->extension_id,
'params' => array(
'menu_text' => 1,
Expand All @@ -747,59 +733,77 @@ public function onAjaxSampledataApplyStep2()
),
),
array(
// Category List
'menutype' => $menuTypes[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_12_TITLE'),
'link' => 'index.php?option=com_content&view=category&layout=list&id=8',
'parent_id' => $menuIdsLevel1[0],
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'page_subheading' => 'Subheading of List',
'menu_text' => 1,
'show_page_heading' => 1,
'secure' => 0,
),
),
array(
// Single article
// Blog
'menutype' => $menuTypes[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_14_TITLE'),
'link' => 'index.php?option=com_content&view=article&id=3',
'parent_id' => $menuIdsLevel1[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_0_TITLE'),
'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $catids[0],
'parent_id' => $menuIdsLevel1[3],
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'menu_text' => 1,
'show_page_heading' => 1,
'secure' => 0,
'layout_type' => 'blog',
'show_category_title' => 0,
'num_leading_articles' => 1,
'num_intro_articles' => 2,
'num_links' => 2,
'orderby_sec' => 'front',
'order_date' => 'published',
'blog_class_leading' => 'boxed columns-1',
'blog_class' => 'columns-2',
'show_pagination' => 2,
'show_pagination_results' => 1,
'show_category' => 0,
'info_bloc_position' => 0,
'show_publish_date' => 0,
'show_hits' => 0,
'show_feed_link' => 0,
'menu_text' => 1,
'show_page_heading' => 0,
'secure' => 0,
),
),
array(
// Category List
'menutype' => $menuTypes[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_15_TITLE'),
'link' => 'index.php?option=com_content&view=featured',
'parent_id' => $menuIdsLevel1[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_12_TITLE'),
'link' => 'index.php?option=com_content&view=category&layout=list&id=' . $catids[0],
'parent_id' => $menuIdsLevel1[3],
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'page_subheading' => 'Subheading of List',
'menu_text' => 1,
'show_page_heading' => 1,
'secure' => 0,
),
),
array(
// Articles (menun header)
// Articles (menu header)
'menutype' => $menuTypes[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_16_TITLE'),
'type' => 'heading',
'link' => '',
'parent_id' => $menuIdsLevel1[0],
'component_id' => '',
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_13_TITLE'),
'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $catids[2],
'parent_id' => $menuIdsLevel1[3],
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'menu_text' => 1,
'show_page_heading' => 1,
'secure' => 0,
'layout_type' => 'blog',
'show_category_title' => 0,
'num_leading_articles' => 3,
'num_intro_articles' => 0,
'num_links' => 2,
'orderby_sec' => 'front',
'order_date' => 'published',
'blog_class_leading' => 'boxed columns-3',
'blog_class' => '',
'show_pagination' => 2,
'show_pagination_results' => 1,
'show_category' => 0,
'info_bloc_position' => 0,
'show_publish_date' => 0,
'show_hits' => 0,
'show_feed_link' => 0,
'menu_text' => 1,
'show_page_heading' => 0,
'secure' => 0,
),
),
)
);

try
Expand All @@ -815,26 +819,35 @@ public function onAjaxSampledataApplyStep2()
return $response;
}

// Add a third level of menuItems
// Add a third level of menuItems - use article title also for menuItem title
$menuItems = array(
array(
// Article1
'menutype' => $menuTypes[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_17_TITLE'),
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_6_TITLE'),
'link' => 'index.php?option=com_content&view=article&id=&id=' . (int) $articleIds[6],
'parent_id' => $menuIdsLevel2[5],
'parent_id' => $menuIdsLevel2[4],
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'menu_show' => 1,
'secure' => 0,
),
),
array(
'menutype' => $menuTypes[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_7_TITLE'),
'link' => 'index.php?option=com_content&view=article&id=&id=' . (int) $articleIds[7],
'parent_id' => $menuIdsLevel2[4],
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'menu_show' => 1,
'secure' => 0,
),
),
array(
// Article2
'menutype' => $menuTypes[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_18_TITLE'),
'link' => 'index.php?option=com_content&view=article&id=' . (int) $articleIds[7],
'parent_id' => $menuIdsLevel2[5],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_8_TITLE'),
'link' => 'index.php?option=com_content&view=article&id=' . (int) $articleIds[8],
'parent_id' => $menuIdsLevel2[4],
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'menu_show' => 1,
Expand Down Expand Up @@ -1007,7 +1020,7 @@ public function onAjaxSampledataApplyStep3()
'cache' => 1,
'cache_time' => 900,
'cachemode' => 'itemid',
'style' => 'Cassiopeia-default',
'style' => 'Cassiopeia-noCard',
'module_tag' => 'div',
'bootstrap_size' => '0',
'header_tag' => 'h3',
Expand Down