From 268b609cea741d13914c3aa7138207325d74f933 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 17 Nov 2017 18:18:47 +0200 Subject: [PATCH] Completed the get snippets area so JCB community snippets can with easy be added to the local snippets gh-92. --- README.md | 4 +- admin/README.txt | 4 +- admin/controllers/ajax.json.php | 40 +++ .../en-GB/en-GB.com_componentbuilder.ini | 31 +++ admin/models/ajax.php | 134 ++++++++++ admin/sql/install.mysql.utf8.sql | 4 +- admin/views/get_snippets/tmpl/default.php | 15 +- admin/views/get_snippets/view.html.php | 230 ++++++++++++++++-- componentbuilder.xml | 2 +- 9 files changed, 427 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index fc19512cc..14bc43dec 100644 --- a/README.md +++ b/README.md @@ -111,11 +111,11 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 16th November, 2017 ++ *Last Build*: 17th November, 2017 + *Version*: 2.6.4 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **167476** ++ *Line count*: **167866** + *File count*: **1070** + *Folder count*: **176** diff --git a/admin/README.txt b/admin/README.txt index fc19512cc..14bc43dec 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -111,11 +111,11 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 16th November, 2017 ++ *Last Build*: 17th November, 2017 + *Version*: 2.6.4 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **167476** ++ *Line count*: **167866** + *File count*: **1070** + *Folder count*: **176** diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 7bea0da3e..fccde7093 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -60,6 +60,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('checkFunctionName', 'ajax'); $this->registerTask('usedin', 'ajax'); $this->registerTask('snippetDetails', 'ajax'); + $this->registerTask('setSnippetGithub', 'ajax'); $this->registerTask('fieldOptions', 'ajax'); } @@ -768,6 +769,45 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; + case 'setSnippetGithub': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $pathValue = $jinput->get('path', NULL, 'STRING'); + $statusValue = $jinput->get('status', NULL, 'WORD'); + if($pathValue && $statusValue && $user->id != 0) + { + $result = $this->getModel('ajax')->setSnippetGithub($pathValue, $statusValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } + break; case 'fieldOptions': try { diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 9447297eb..60f989c3f 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -866,7 +866,15 @@ COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP COM_COMPONENTBUILDER_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="Any Selection (only 4 list/radio/checkboxes/dynamic_list)" COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED="An error has occurred" COM_COMPONENTBUILDER_ARCHIVED="Archived" +COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_ADD_THIS_NEW_JCB_COMMUNITY_SNIPPET_TO_YOUR_LOCAL_SNIPPETS="Are you sure you would like to add this new JCB community snippet to your local snippets?" +COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_CONTINUE="Are you sure you would like to continue?" +COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_REPLACE_YOUR_LOCAL_SNIPPET_WITH_THIS_JCB_COMMUNITY_SNIPPET="Are you sure you would like to replace your local snippet with this JCB community snippet?" +COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_UPDATE_YOUR_LOCAL_SNIPPET_WITH_THIS_NEWER_JCB_COMMUNITY_SNIPPET="Are you sure you would like to update your local snippet with this newer JCB community snippet?" +COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_UPDATE_YOUR_LOCAL_SNIPPET_WITH_THIS_OLDER_JCB_COMMUNITY_SNIPPET="Are you sure you would like to update your local snippet with this older JCB community snippet?" COM_COMPONENTBUILDER_AUTHOR="Author" +COM_COMPONENTBUILDER_AUTHOR_EMAIL="Author Email" +COM_COMPONENTBUILDER_AUTHOR_NAME="Author Name" +COM_COMPONENTBUILDER_AUTHOR_WEBSITE="Author Website" COM_COMPONENTBUILDER_AUTO_CHECKIN="Auto Check-in" COM_COMPONENTBUILDER_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading" COM_COMPONENTBUILDER_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading" @@ -893,6 +901,7 @@ COM_COMPONENTBUILDER_CHAIN="Chain" COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there." COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp" COM_COMPONENTBUILDER_COMPANY="Company" +COM_COMPONENTBUILDER_COMPANY_NAME="Company Name" COM_COMPONENTBUILDER_COMPANY_S="Company: %s" COM_COMPONENTBUILDER_COMPILER="Compiler" COM_COMPONENTBUILDER_COMPILER_ACCESS="Compiler Access" @@ -3033,6 +3042,7 @@ COM_COMPONENTBUILDER_DASHBOARD_TEMPLATE_ADD="Add Template

" COM_COMPONENTBUILDER_DATE="Date" COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS="Debug (line numbers)" COM_COMPONENTBUILDER_DEFAULT_VIEW="Default View" +COM_COMPONENTBUILDER_DESCRIPTION="Description" COM_COMPONENTBUILDER_DETAILS="Details" COM_COMPONENTBUILDER_DIVERGED="Diverged" COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install" @@ -3361,6 +3371,10 @@ COM_COMPONENTBUILDER_EMEMAILEM_BSB="Email: %s" COM_COMPONENTBUILDER_EMLICENSEEM_BSB="License: %s" COM_COMPONENTBUILDER_EMOWNEREM_BSB="Owner: %s" COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="Website: %s" +COM_COMPONENTBUILDER_ERROR_THE_PATH_HAS_A_MISMATCH_AND_COULD_THEREFORE_NOT_RETRIEVE_THE_SNIPPET_FROM_GITHUB="Error! The path has a mismatch and could therefore not retrieve the snippet from gitHub!" +COM_COMPONENTBUILDER_ERROR_THE_SNIPPET_IS_FAULTY_AND_COULD_NOT_BE_SAVED="Error! The snippet is faulty and could not be saved." +COM_COMPONENTBUILDER_ERROR_YOU_DO_NOT_HAVE_ACCESS_TO_THE_SNIPPETS="Error! You do not have access to the snippets." +COM_COMPONENTBUILDER_ERROR_YOU_DO_NOT_HAVE_PERMISSION_TO_CREATE_THE_SNIPPET="Error! You do not have permission to create the snippet." COM_COMPONENTBUILDER_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 text_field)" COM_COMPONENTBUILDER_EXPORTIMPORT_DATA="Export/Import Data" COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!" @@ -3761,6 +3775,7 @@ COM_COMPONENTBUILDER_FTP_STATUS="Status" COM_COMPONENTBUILDER_FTP_VERSION_DESC="A count of the number of times this FTP has been revised." COM_COMPONENTBUILDER_FTP_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab" +COM_COMPONENTBUILDER_GET_SNIPPET="Get snippet" COM_COMPONENTBUILDER_GET_SNIPPETS="Get Snippets" COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access" COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC=" Allows the users in this group to access get snippets." @@ -3768,6 +3783,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_DESC="The compiler" COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS="Get Snippets Snippets Button Access" COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the snippets button." COM_COMPONENTBUILDER_GET_THE_KEY_FROM_BSB_FOR_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA="Get the key from %s for %s" +COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_INSTALL_IT_LOCALLY="Get the snippet from gitHub and install it locally" +COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION="Get the snippet from gitHub and update the local version" COM_COMPONENTBUILDER_GLOBAL="Global" COM_COMPONENTBUILDER_GREAT_THIS_FUNCTION_NAME_WILL_WORK="Great, this function name will work!" COM_COMPONENTBUILDER_HAS_METADATA="Has Metadata" @@ -3945,6 +3962,7 @@ COM_COMPONENTBUILDER_ISOLATE="Isolate" COM_COMPONENTBUILDER_ISSUE="issue" COM_COMPONENTBUILDER_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES="Is Not (only 4 list/radio/checkboxes)" COM_COMPONENTBUILDER_IS_ONLY_FOUR_LISTRADIOCHECKBOXES="Is (only 4 list/radio/checkboxes)" +COM_COMPONENTBUILDER_JCB_COMMUNITY="JCB Community" COM_COMPONENTBUILDER_JOOMLA_COMPONENT="Joomla Component" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS="Joomla Components" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS="Joomla Components Access" @@ -4736,6 +4754,7 @@ COM_COMPONENTBUILDER_LIBRARY_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_LICENSE="License" COM_COMPONENTBUILDER_LICENSE_S="License: %s" COM_COMPONENTBUILDER_LINK="Link" +COM_COMPONENTBUILDER_LINK_TO_THE_CONTRIBUTOR="Link to the contributor" COM_COMPONENTBUILDER_MAIN_MENU="Main Menu" COM_COMPONENTBUILDER_MATCH_BEHAVIOR="Match Behavior" COM_COMPONENTBUILDER_MATCH_FIELD="Match Field" @@ -4757,6 +4776,7 @@ COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s) COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested." COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found" COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." +COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION="No need to get it since it is already in sync with your local version" COM_COMPONENTBUILDER_NO_SNIPPETS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No snippets were selected, please make a selection and try again!" COM_COMPONENTBUILDER_NO_S_FOUND="No %s Found" COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE="No %s have been linked to this view. Soon as this is done it will be displayed here." @@ -5297,6 +5317,7 @@ COM_COMPONENTBUILDER_SNIPPETS_N_ITEMS_UNPUBLISHED="%s Snippets unpublished." COM_COMPONENTBUILDER_SNIPPETS_N_ITEMS_UNPUBLISHED_1="%s Snippet unpublished." COM_COMPONENTBUILDER_SNIPPETS_SUBMENU="Snippets Submenu" COM_COMPONENTBUILDER_SNIPPETS_SUBMENU_DESC="Allows the users in this group to update the submenu of the snippet" +COM_COMPONENTBUILDER_SNIPPET_COULD_NOT_BE_UPDATEDSAVED="Snippet could not be updated/saved" COM_COMPONENTBUILDER_SNIPPET_CREATED_BY_DESC="The user that created this Snippet." COM_COMPONENTBUILDER_SNIPPET_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_SNIPPET_CREATED_DATE_DESC="The date this Snippet was created." @@ -5438,6 +5459,8 @@ COM_COMPONENTBUILDER_SUBMENU_LAYOUTS="Layouts" COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets" COM_COMPONENTBUILDER_SUBMENU_TEMPLATES="Templates" +COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED="Success! The snippet was saved." +COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED_BUT_THE_MODIFIED_DATE_COULD_NOT_BE_ADJUSTED_BR_BR_BTHIS_MEANS_THE_SNIPPETS_WILL_CONTINUE_TO_APPEAR_OUT_OF_DATEB="Success! The snippet was saved. But the modified date could not be adjusted.

This means the snippets will continue to appear out of date." COM_COMPONENTBUILDER_S_BEING_IMPORTED="%s Being Imported" COM_COMPONENTBUILDER_S_PLEASE_WAIT_THE_COMPONENT_IS_BEING_COMPILED="%s, please wait! The component is being compiled" COM_COMPONENTBUILDER_TAB="Tab" @@ -5581,6 +5604,7 @@ COM_COMPONENTBUILDER_TYPE_ERROR="Type Error" COM_COMPONENTBUILDER_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)" COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs" COM_COMPONENTBUILDER_UP_TO_DATE="Up to date" +COM_COMPONENTBUILDER_USAGE="Usage" COM_COMPONENTBUILDER_USED_IN="used in" COM_COMPONENTBUILDER_USE_BATCH="Use Batch" COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method." @@ -5589,8 +5613,15 @@ COM_COMPONENTBUILDER_VDM_NOTICE_BOARD="VDM Notice Board" COM_COMPONENTBUILDER_VERSION="Version" COM_COMPONENTBUILDER_VIEW="View" COM_COMPONENTBUILDER_VIEWS="Views" +COM_COMPONENTBUILDER_VIEW_BLAME="View Blame" +COM_COMPONENTBUILDER_VIEW_DESCRIPTION_OF_COMMUNITY_VERSION="View Description of community version" COM_COMPONENTBUILDER_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github" COM_COMPONENTBUILDER_VIEW_MORE_RELEASES_ON_GITHUB="View more releases on Github" +COM_COMPONENTBUILDER_VIEW_SNIPPET_OF_COMMUNITY_VERSION="View Snippet of community version" +COM_COMPONENTBUILDER_VIEW_SNIPPET_REFERENCE_URL="View Snippet Reference URL" +COM_COMPONENTBUILDER_VIEW_THE_CONTRIBUTOR_DETAILS="View the contributor details" +COM_COMPONENTBUILDER_VIEW_USAGE_OF_COMMUNITY_VERSION="View Usage of community version" +COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_SNIPPET="View who contributed to this snippet" COM_COMPONENTBUILDER_WEBSITE="Website" COM_COMPONENTBUILDER_WEBSITE_S="Website: %s" COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB="We failed to move %s!" diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 54e23575a..56e8f2e98 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -1731,6 +1731,140 @@ class ComponentbuilderModelAjax extends JModelList return $snippet; } return false; + } + + public function setSnippetGithub($path, $status) + { + // get user + $user = JFactory::getUser(); + $access = $user->authorise('snippet.access', 'com_componentbuilder'); + if ($access) + { + // secure path + $path = ComponentbuilderHelper::safeString(str_replace('.json','',$path), 'filename', '', false).'.json'; + // set url + $url = 'https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Snippets/master/'.rawurlencode(basename($path)); + // get the snippets + $snippet = ComponentbuilderHelper::getFileContents($url); + if (ComponentbuilderHelper::checkJson($snippet)) + { + return $this->saveSnippet(json_decode($snippet, true), $status, $user); + } + return array('message' => JText::_('COM_COMPONENTBUILDER_ERROR_THE_PATH_HAS_A_MISMATCH_AND_COULD_THEREFORE_NOT_RETRIEVE_THE_SNIPPET_FROM_GITHUB'), 'status' => 'danger'); + } + return array('message' => JText::_('COM_COMPONENTBUILDER_ERROR_YOU_DO_NOT_HAVE_ACCESS_TO_THE_SNIPPETS'), 'status' => 'danger'); + } + + protected function saveSnippet($item, $status, $user) + { + // set some defaults + $todayDate = JFactory::getDate()->toSql(); + // get the type id + $item['type'] = ($id = ComponentbuilderHelper::getVar('snippet_type', $item['type'], 'name', 'id')) ? $id : $this->createNew($item['type'], 'snippet_type', $user, $todayDate); + // get the library id + $item['library'] = ($id = ComponentbuilderHelper::getVar('library', $item['library'], 'name', 'id')) ? $id : $this->createNew($item['library'], 'library', $user, $todayDate); + // remove type if zero + if ($item['type'] == 0) + { + unset($item['type']); + } + // remove library if zero + if ($item['library'] == 0) + { + unset($item['library']); + } + // get the snippet ID + $item['id'] = $this->getSnippetId($item); + if ($item['id'] == 0) + { + $canCreate = $user->authorise('snippet.create', 'com_componentbuilder'); + if ('new' === $status && !$canCreate) + { + return array('message' => JText::_('COM_COMPONENTBUILDER_ERROR_YOU_DO_NOT_HAVE_PERMISSION_TO_CREATE_THE_SNIPPET'), 'status' => 'danger'); + } + } + // get the snippet model + $model = ComponentbuilderHelper::getModel('snippet', JPATH_COMPONENT_ADMINISTRATOR); + // save the snippet + if ($model->save($item)) + { + if ($item['id'] == 0) + { + // get the saved item + $updatedItem = $model->getItem(); + $item['id']= $updatedItem->get('id'); + } + // we have to force modified date since the model does not allow you + if ($this->forchDateFix($item)) + { + return array('message' => JText::_('COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED'), 'status' => 'success'); + } + // return error + return array('message' => JText::_('COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED_BUT_THE_MODIFIED_DATE_COULD_NOT_BE_ADJUSTED_BR_BR_BTHIS_MEANS_THE_SNIPPETS_WILL_CONTINUE_TO_APPEAR_OUT_OF_DATEB'), 'status' => 'warning'); + } + // return error + return array('message' => JText::_('COM_COMPONENTBUILDER_ERROR_THE_SNIPPET_IS_FAULTY_AND_COULD_NOT_BE_SAVED'), 'status' => 'danger'); + } + + protected function forchDateFix($item) + { + $object = new stdClass(); + $object->id = (int) $item['id']; + $object->created = $item['created']; + $object->modified = $item['modified']; + // force update + return JFactory::getDbo()->updateObject('#__componentbuilder_snippet', $object, 'id'); + } + + protected function getSnippetId($item) + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id'))); + $query->from($db->quoteName('#__componentbuilder_snippet', 'a')); + $query->where($db->quoteName('a.name') . ' = ' . (string) $db->quote($item['name'])); + if (is_numeric($item['type'])) + { + $query->where($db->quoteName('a.type') . ' = ' . (int) $item['type']); + } + if (is_numeric($item['library'])) + { + $query->where($db->quoteName('a.library') . ' = ' . (int) $item['library']); + } + // Reset the query using our newly populated query object. + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + return $db->loadResult(); + } + return 0; + } + + protected function createNew($name, $type, $user, $todayDate) + { + // verify that we can continue + if (ComponentbuilderHelper::getActions($type)->get('core.create')) + { + // get the snippet model + $model = ComponentbuilderHelper::getModel($type, JPATH_COMPONENT_ADMINISTRATOR); + // build array to save + $item['id'] = 0; + $item['name'] = $name; + $item['published'] = 1; + $item['version'] = 1; + $item['created'] = $todayDate; + $item['created_by'] = $user->id; + // save the new + $model->save($item); + // get the saved item + $item = $model->getItem(); + return $item->get('id'); + } + return 0; } // Used in field diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 1fe60c526..8bc511745 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1188,7 +1188,7 @@ INSERT INTO `#__componentbuilder_snippet` (`id`, `description`, `library`, `head (2, 'UIkit uses panels to outline certain sections of your content, which can be styled differently. Typically, panels are arranged in grid columns from the Grid component.', 4, 'Create layout boxes with different styles.', 'Panel', 'PGRpdiBkYXRhLXVrLWdyaWQtbWFyZ2luPSIiIGNsYXNzPSJ1ay1ncmlkIj4NCiAgICA8ZGl2IGNsYXNzPSJ1ay13aWR0aC1tZWRpdW0tMS0yIj4NCiAgICAgICAgPGRpdiBjbGFzcz0idWstcGFuZWwgdWstcGFuZWwtYm94Ij4NCiAgICAgICAgICAgIDxoMyBjbGFzcz0idWstcGFuZWwtdGl0bGUiPnt0aXRsZX08L2gzPg0KICAgICAgICAgICAge2NvbnRlbnR9DQogICAgICAgIDwvZGl2Pg0KICAgIDwvZGl2Pg0KICAgIDxkaXYgY2xhc3M9InVrLXdpZHRoLW1lZGl1bS0xLTIiPg0KICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1wYW5lbCB1ay1wYW5lbC1ib3giPg0KICAgICAgICAgICAgPGgzIGNsYXNzPSJ1ay1wYW5lbC10aXRsZSI+e3RpdGxlfTwvaDM+DQogICAgICAgICAgICB7Y29udGVudH0NCiAgICAgICAgPC9kaXY+DQogICAgPC9kaXY+DQo8L2Rpdj4=', 1, 'http://getuikit.com/docs/panel.html', 'The Panel component consists of the panel itself, the panel title and a panel badge. To prevent redundant white space, top and bottom margins are removed from the panel\'s content.', '', 1, 3, '', 1), (3, '', 4, 'Separate content sections by bundling them in blocks with different styles.', 'Block', 'PGRpdiBjbGFzcz0idWstYmxvY2sgdWstYmxvY2stcHJpbWFyeSI+e2NvbnRlbnR9PC9kaXY+', 1, 'http://getuikit.com/docs/block.html', 'To apply this component, just add the .uk-block class to a container element.', '', 1, 2, '', 2), (4, '', 4, 'Create articles within your page.', 'Article', 'PGFydGljbGUgY2xhc3M9InVrLWFydGljbGUiPg0KICAgIDxoMSBjbGFzcz0idWstYXJ0aWNsZS10aXRsZSI+e3RpdGxlfTwvaDE+DQogICAgPHAgY2xhc3M9InVrLWFydGljbGUtbWV0YSI+e21ldGF9PC9wPg0KICAgIDxwIGNsYXNzPSJ1ay1hcnRpY2xlLWxlYWQiPntjb250ZW50fTwvcD4NCiAgICB7Y29udGVudH0NCiAgICA8aHIgY2xhc3M9InVrLWFydGljbGUtZGl2aWRlciI+DQogICAge2NvbnRlbnR9DQo8L2FydGljbGU+', 1, 'http://getuikit.com/docs/article.html', 'The article component consists of the article itself, a title, meta data, an opening paragraph and dividers.', '', 1, 1, '', 3), -(5, '', 4, 'Create comments, for example about articles.', 'Comment', 'PGFydGljbGUgY2xhc3M9InVrLWNvbW1lbnQiPg0KICAgIDxoZWFkZXIgY2xhc3M9InVrLWNvbW1lbnQtaGVhZGVyIj4NCiAgICAgICAgPGltZyBjbGFzcz0idWstY29tbWVudC1hdmF0YXIiIHNyYz0ie2ltYWdldXJsfSIgYWx0PSIiPg0KICAgICAgICA8aDQgY2xhc3M9InVrLWNvbW1lbnQtdGl0bGUiPnt0aXRsZX08L2g0Pg0KICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1jb21tZW50LW1ldGEiPnttZXRhfTwvZGl2Pg0KICAgIDwvaGVhZGVyPg0KICAgIDxkaXYgY2xhc3M9InVrLWNvbW1lbnQtYm9keSI+e3RpdGxlfTwvZGl2Pg0KPC9hcnRpY2xlPg==', 1, 'http://getuikit.com/docs/comment.html', 'The Comment component consists of a comment header, including an avatar, a title and meta data, and a comment body.', '', 1, 1, '', 4), +(5, '', 4, 'Create comments, for example about articles.', 'Comment', 'PGFydGljbGUgY2xhc3M9InVrLWNvbW1lbnQiPg0KICAgIDxoZWFkZXIgY2xhc3M9InVrLWNvbW1lbnQtaGVhZGVyIj4NCiAgICAgICAgPGltZyBjbGFzcz0idWstY29tbWVudC1hdmF0YXIiIHNyYz0ie2ltYWdldXJsfSIgYWx0PSIiPg0KICAgICAgICA8aDQgY2xhc3M9InVrLWNvbW1lbnQtdGl0bGUiPnt0aXRsZX08L2g0Pg0KICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1jb21tZW50LW1ldGEiPnttZXRhfTwvZGl2Pg0KICAgIDwvaGVhZGVyPg0KICAgIDxkaXYgY2xhc3M9InVrLWNvbW1lbnQtYm9keSI+e3RpdGxlfTwvZGl2Pg0KPC9hcnRpY2xlPg==', 1, 'http://getuikit.com/docs/comment.html', 'The Comment component consists of a comment header, including an avatar, a title and meta data, and a comment body.', '', 1, 2, '', 4), (6, '', 4, 'A collection of useful utility classes to style your content.', 'Utility Container', 'PGRpdiBjbGFzcz0idWstd2lkdGgtbWVkaXVtLTEtMiB1ay1jb250YWluZXItY2VudGVyIj57Y29udGVudH08L2Rpdj4=', 1, 'http://getuikit.com/docs/utility.html', 'Add the .uk-container class to a block element to give it a max-width and wrap the main content of your website. For large screens it applies a different max-width.\r\n\r\nTo center the container, use the .uk-container-center class. For any other block element, you additionally need to apply a width.', '', 1, 2, '', 5), (7, '', 4, 'A collection of useful utility classes to style your content.', 'Utility Clearing and floating', 'PGRpdiBjbGFzcz0idWstY2xlYXJmaXgiPg0KICAgIDxkaXYgY2xhc3M9InVrLWZsb2F0LXJpZ2h0Ij57Y29udGVudH08L2Rpdj4NCiAgICA8ZGl2IGNsYXNzPSJ1ay1mbG9hdC1sZWZ0Ij57Y29udGVudH08L2Rpdj4NCjwvZGl2Pg==', 1, 'http://getuikit.com/docs/utility.html', 'Floating is fundamental for creating all kinds of layouts. But floats need to be cleared or in the worst case, you might end up with a scrambled site. The following classes will help you to setup basic layouts.', '', 1, 2, '', 5), (8, 'This component uses Flexbox, a concept that is still quite new but extremely powerful for creating layouts.', 4, 'Utilize the power of Flexbox to create a wide range of layouts.', 'Flex', 'PGRpdiBjbGFzcz0idWstZmxleCB1ay1mbGV4LXdyYXAgdWstZmxleC13cmFwLXJldmVyc2UgdWstZmxleC13cmFwLXNwYWNlLWFyb3VuZCI+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0zIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSI+e2NvbnRlbnR9PC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0yIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSB1ay1tYXJnaW4tbGVmdCI+e2NvbnRlbnR9PC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0zIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSI+e2NvbnRlbnR9PC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0zIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSB1ay1tYXJnaW4tbGVmdCI+e2NvbnRlbnR9PC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0yIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSI+e2NvbnRlbnR9PC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0zIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSB1ay1tYXJnaW4tbGVmdCI+e2NvbnRlbnR9PC9kaXY+DQo8L2Rpdj4=', 1, 'http://getuikit.com/docs/flex.html', 'To apply this component, just add the .uk-flex class to a element. This will create the flex container. By default, all flex items will be aligned to the left and equally matched in height and width.', '', 1, 3, '', 5), @@ -1272,7 +1272,7 @@ INSERT INTO `#__componentbuilder_snippet` (`id`, `description`, `library`, `head (86, 'You can link multiple images to the same lightbox and switch between them from within the lightbox, thus creating a gallery. Just add the {group:\'my-group\'} option to the data attribute of each item using the same name on all items that you want to group. Make sure to include the CSS from the Slidenav component, so you can navigate between the items.', 4, 'Create a fancy lightbox for images and videos utilizing the Modal component.', 'Lightbox groups-image', 'PGRpdiBkYXRhLXVrLWdyaWQtbWFyZ2luPSIiIGNsYXNzPSJ1ay1ncmlkIHVrLWdyaWQtd2lkdGgtbWVkaXVtLTEtNCI+DQogICAgPGRpdj4NCiAgICAgICAgPGEgdGl0bGU9IlRpdGxlIiBkYXRhLXVrLWxpZ2h0Ym94PSJ7Z3JvdXA6J2dyb3VwMSd9IiBocmVmPSJpbWFnZXMvcGxhY2Vob2xkZXJfODAweDYwMF8xLmpwZyI+DQogICAgICAgICAgICA8aW1nIHdpZHRoPSI4MDAiIGhlaWdodD0iNjAwIiBhbHQ9IiIgc3JjPSJpbWFnZXMvcGxhY2Vob2xkZXJfODAweDYwMF8xLmpwZyI+DQogICAgICAgIDwvYT4NCiAgICA8L2Rpdj4NCiAgICA8ZGl2Pg0KICAgICAgICA8YSB0aXRsZT0iVGl0bGUiIGRhdGEtdWstbGlnaHRib3g9Intncm91cDonZ3JvdXAxJ30iIGRhdGEtbGlnaHRib3gtdHlwZT0iaW1hZ2UiIGhyZWY9ImltYWdlcy9wbGFjZWhvbGRlcl84MDB4NjAwXzIuanBnIj4NCiAgICAgICAgICAgIDxpbWcgd2lkdGg9IjgwMCIgaGVpZ2h0PSI2MDAiIGFsdD0iIiBzcmM9ImltYWdlcy9wbGFjZWhvbGRlcl84MDB4NjAwXzIuanBnIj4NCiAgICAgICAgPC9hPg0KICAgIDwvZGl2Pg0KICAgIDxkaXY+DQogICAgICAgIDxhIHRpdGxlPSJUaXRsZSIgZGF0YS11ay1saWdodGJveD0ie2dyb3VwOidncm91cDEnfSIgZGF0YS1saWdodGJveC10eXBlPSJpbWFnZSIgaHJlZj0iaW1hZ2VzL3BsYWNlaG9sZGVyXzgwMHg2MDBfMy5qcGciPg0KICAgICAgICAgICAgPGltZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjYwMCIgYWx0PSIiIHNyYz0iaW1hZ2VzL3BsYWNlaG9sZGVyXzgwMHg2MDBfMy5qcGciPg0KICAgICAgICA8L2E+DQogICAgPC9kaXY+DQogICAgPGRpdj4NCiAgICAgICAgPGEgdGl0bGU9IlRpdGxlIiBkYXRhLXVrLWxpZ2h0Ym94PSJ7Z3JvdXA6J2dyb3VwMSd9IiBkYXRhLWxpZ2h0Ym94LXR5cGU9ImltYWdlIiBocmVmPSJpbWFnZXMvcGxhY2Vob2xkZXJfODAweDYwMF80LmpwZyI+DQogICAgICAgICAgICA8aW1nIHdpZHRoPSI4MDAiIGhlaWdodD0iNjAwIiBhbHQ9IiIgc3JjPSJpbWFnZXMvcGxhY2Vob2xkZXJfODAweDYwMF80LmpwZyI+DQogICAgICAgIDwvYT4NCiAgICA8L2Rpdj4NCjwvZGl2Pg==', 5, 'http://getuikit.com/docs/lightbox.html', 'To apply this component, add the data-uk-lightbox attribute to an anchor linking to the image you wish to display. If a title attribute exists it will be displayed as a caption for the lightbox.', '', 1, 2, '', 9), (87, 'A lightbox is not restricted to images. Other media, like videos, can be displayed inside a lightbox and it will automatically generate the correct output by evaluating your path.', 4, 'Create a fancy lightbox for images and videos utilizing the Modal component.', 'Lightbox content-sources', 'PHA+DQogICAgPGEgdGl0bGU9IlRpdGxlIiBkYXRhLXVrLWxpZ2h0Ym94PSJ7Z3JvdXA6J2dyb3VwMid9IiBocmVmPSJpbWFnZXMvcGxhY2Vob2xkZXJfODAweDYwMF8xLmpwZyIgY2xhc3M9InVrLWJ1dHRvbiI+SW1hZ2U8L2E+DQogICAgPGEgZGF0YS11ay1saWdodGJveD0ie2dyb3VwOidncm91cDInfSIgaHJlZj0iaHR0cDovL3d3dy5xdWlya3Ntb2RlLm9yZy9odG1sNS92aWRlb3MvYmlnX2J1Y2tfYnVubnkubXA0IiBjbGFzcz0idWstYnV0dG9uIj5NUDQ8L2E+DQogICAgPGEgZGF0YS11ay1saWdodGJveD0ie2dyb3VwOidncm91cDInfSIgaHJlZj0iaHR0cDovL3ZpbWVvLmNvbS8xMDg0NTM3IiBjbGFzcz0idWstYnV0dG9uIj5WaW1lbzwvYT4NCiAgICA8YSBkYXRhLXVrLWxpZ2h0Ym94PSJ7Z3JvdXA6J2dyb3VwMid9IiBocmVmPSJodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PVlFN1Z6bEx0cC00IiBjbGFzcz0idWstYnV0dG9uIj5Zb3VUdWJlPC9hPg0KPC9wPg==', 5, 'http://getuikit.com/docs/lightbox.html', 'To apply this component, add the data-uk-lightbox attribute to an anchor linking to the image you wish to display. If a title attribute exists it will be displayed as a caption for the lightbox.', '', 1, 1, '', 9), (88, 'To display multiple content sections at the same time without one collapsing when the other one is opened, add the {collapse: false} option to the date attribute.', 4, 'Create a list of items, allowing each item\'s content to be expanded and collapsed by clicking its header.', 'Accordion', 'PGRpdiBjbGFzcz0idWstYWNjb3JkaW9uIiBkYXRhLXVrLWFjY29yZGlvbj4NCg0KICAgIDxoMyBjbGFzcz0idWstYWNjb3JkaW9uLXRpdGxlIj4uLi48L2gzPg0KICAgIDxkaXYgY2xhc3M9InVrLWFjY29yZGlvbi1jb250ZW50Ij4uLi48L2Rpdj4NCg0KICAgIDxoMyBjbGFzcz0idWstYWNjb3JkaW9uLXRpdGxlIj4uLi48L2gzPg0KICAgIDxkaXYgY2xhc3M9InVrLWFjY29yZGlvbi1jb250ZW50Ij4uLi48L2Rpdj4NCg0KICAgIDxoMyBjbGFzcz0idWstYWNjb3JkaW9uLXRpdGxlIj4uLi48L2gzPg0KICAgIDxkaXYgY2xhc3M9InVrLWFjY29yZGlvbi1jb250ZW50Ij4uLi48L2Rpdj4NCg0KPC9kaXY+', 5, 'http://getuikit.com/docs/accordion.html', 'To apply the Accordion component, add the uk-accordion class and the data-uk-accordion attribute to a container element. Add the uk-accordion-content class to each of the content sections within the container. Finally, add the uk-accordion-title class to any element, like a heading, above the content section to create a toggle.', '', 1, 3, '', 10), -(89, 'FooTable is a jQuery plugin that aims to make HTML tables on smaller devices look awesome – No matter how many columns of data you may have in them.\r\n\r\nHave you ever wanted to show a lot of data in a table, but hate how badly it scales on smaller mobile devices? The FooTable jQuery plugin solves this problem by allowing you to hide certain columns on smaller devices, but still allowing the user to expand each row to see the columns that were hidden.', 5, 'FooTable', 'FooTable', 'PHRhYmxlIGNsYXNzPSJmb290YWJsZSBtZXRyby1ibHVlIiBkYXRhLWZpbHRlcj0iI2ZpbHRlciIgZGF0YS1wYWdlLXNpemU9IjUiPg0KICA8dGhlYWQ+DQogICAgPHRyPg0KICAgICAgPHRoIGRhdGEtdG9nZ2xlPSJ0cnVlIj5OYW1lPC90aD4NCiAgICAgIDx0aCBkYXRhLWhpZGU9InBob25lLHRhYmxldCI+UGhvbmU8L3RoPg0KICAgICAgPHRoIGRhdGEtaGlkZT0icGhvbmUsdGFibGV0Ij5FbWFpbDwvdGg+DQogICAgPC90cj4NCiAgPC90aGVhZD4NCiAgPHRib2R5Pg0KICAgIDx0cj4NCiAgICAgIDx0ZD5Cb2IgTWFuPC90ZD4NCiAgICAgIDx0ZD41NTUtMTIzNDU8L3RkPg0KICAgICAgPHRkPmJvYkBob21lLmNvbTwvdGQ+DQogICAgPC90cj4NCiAgICA8dHI+DQogICAgICA8dGQ+QnJpZGdldCBKb25lczwvdGQ+DQogICAgICA8dGQ+NTQ0LTc3NjY1NTwvdGQ+DQogICAgICA8dGQ+YmpvbmVzQG15c2l0ZS5jb208L3RkPg0KICAgIDwvdHI+DQogICAgPHRyPg0KICAgICAgPHRkPlRvbSBKb25lczwvdGQ+DQogICAgICA8dGQ+NTU1LTk5OTExPC90ZD4NCiAgICAgIDx0ZD5jcnVpc2UxQGNyYXp5LmNvbTwvdGQ+DQogICAgPC90cj4NCiAgPC90Ym9keT4NCjwvdGFibGU+', 1, 'http://fooplugins.com/footable-demos/', '', '', 1, 3, '', 11), +(93, 'FooTable is a jQuery plugin that aims to make HTML tables on smaller devices look awesome – No matter how many columns of data you may have in them.\r\n\r\nHave you ever wanted to show a lot of data in a table, but hate how badly it scales on smaller mobile devices? The FooTable jQuery plugin solves this problem by allowing you to hide certain columns on smaller devices, but still allowing the user to expand each row to see the columns that were hidden.', 5, 'FooTable', 'FooTable', 'PHRhYmxlIGNsYXNzPSJmb290YWJsZSBtZXRyby1ibHVlIiBkYXRhLWZpbHRlcj0iI2ZpbHRlciIgZGF0YS1wYWdlLXNpemU9IjUiPg0KICA8dGhlYWQ+DQogICAgPHRyPg0KICAgICAgPHRoIGRhdGEtdG9nZ2xlPSJ0cnVlIj5OYW1lPC90aD4NCiAgICAgIDx0aCBkYXRhLWhpZGU9InBob25lLHRhYmxldCI+UGhvbmU8L3RoPg0KICAgICAgPHRoIGRhdGEtaGlkZT0icGhvbmUsdGFibGV0Ij5FbWFpbDwvdGg+DQogICAgPC90cj4NCiAgPC90aGVhZD4NCiAgPHRib2R5Pg0KICAgIDx0cj4NCiAgICAgIDx0ZD5Cb2IgTWFuPC90ZD4NCiAgICAgIDx0ZD41NTUtMTIzNDU8L3RkPg0KICAgICAgPHRkPmJvYkBob21lLmNvbTwvdGQ+DQogICAgPC90cj4NCiAgICA8dHI+DQogICAgICA8dGQ+QnJpZGdldCBKb25lczwvdGQ+DQogICAgICA8dGQ+NTQ0LTc3NjY1NTwvdGQ+DQogICAgICA8dGQ+YmpvbmVzQG15c2l0ZS5jb208L3RkPg0KICAgIDwvdHI+DQogICAgPHRyPg0KICAgICAgPHRkPlRvbSBKb25lczwvdGQ+DQogICAgICA8dGQ+NTU1LTk5OTExPC90ZD4NCiAgICAgIDx0ZD5jcnVpc2UxQGNyYXp5LmNvbTwvdGQ+DQogICAgPC90cj4NCiAgPC90Ym9keT4NCjwvdGFibGU+', 1, 'http://fooplugins.com/footable-demos/', '', '', 1, 5, '', 13), (90, 'This is a input field for uikit form', 4, 'Add Input field - row', 'Input field', 'ICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1mb3JtLXJvdyI+DQoJCTxsYWJlbCBjbGFzcz0idWstZm9ybS1sYWJlbCIgPg0KCQkJPD9waHAgZWNobyBKVGV4dDo6XygnTGFiZWwnKTsgPz4NCgkJPC9sYWJlbD4NCgkJPGlucHV0IHR5cGU9InRleHQiIG5hbWU9ImtleSIgcGxhY2Vob2xkZXI9Ijw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2FkZCBzb21lIHRleHQgaGVyZSEnKTsgPz4iPiA8c3BhbiBjbGFzcz0idWstZm9ybS1oZWxwLWlubGluZSI+PD9waHAgZWNobyBKVGV4dDo6XygnaGVscCBuZWVkZWQnKTsgPz48L3NwYW4+DQoJPC9kaXY+', 3, 'http://getuikit.com/docs/form.html', '', '', 1, 2, '', 12), (91, 'This is a textarea field for uikit form', 4, 'Add textarea - row', 'Textarea', 'CTxkaXYgY2xhc3M9InVrLWZvcm0tcm93Ij4NCgkJPGxhYmVsIGNsYXNzPSJ1ay1mb3JtLWxhYmVsIiA+DQoJCQk8P3BocCBlY2hvIEpUZXh0OjpfKCdMYWJlbCcpOyA/Pg0KCQk8L2xhYmVsPg0KCQk8dGV4dGFyZWEgY29scz0iIiByb3dzPSIiICBzdHlsZT0id2lkdGg6IDEwMCU7IGhlaWdodDogMjE2cHg7IiBwbGFjZWhvbGRlcj0iPD9waHAgZWNobyBKVGV4dDo6XygnYWRkIHNvbWUgdGV4dCBoZXJlIScpOyA/PiI+PHx8fHxGSVh8fHx8fHx0ZXh0YXJlYT4NCgkJPHAgY2xhc3M9InVrLWZvcm0taGVscC1ibG9jayI+PD9waHAgZWNobyBKVGV4dDo6XygnaGVscCBuZWVkZWQnKTsgPz48L3A+DQoJPC9kaXY+', 3, 'http://getuikit.com/docs/form.html', '', '', 1, 4, '', 12), (92, 'This is a uikit form', 4, 'Add Form', 'Form', 'PGZvcm0gY2xhc3M9InVrLWZvcm0iPg0KICAgIDxmaWVsZHNldD4NCiAgICAgICAgPGxlZ2VuZD48P3BocCBlY2hvIEpUZXh0OjpfKCdMZWdlbmQnKTsgPz48L2xlZ2VuZD4NCiAgICAgICAgPGRpdiBjbGFzcz0idWstZm9ybS1yb3ciPg0KCQk8bGFiZWwgY2xhc3M9InVrLWZvcm0tbGFiZWwiID4NCgkJCTw/cGhwIGVjaG8gSlRleHQ6Ol8oJ0xhYmVsJyk7ID8+DQoJCTwvbGFiZWw+DQoJCTxpbnB1dCB0eXBlPSJ0ZXh0IiBuYW1lPSJrZXkiIHBsYWNlaG9sZGVyPSI8P3BocCBlY2hvIEpUZXh0OjpfKCdhZGQgc29tZSB0ZXh0IGhlcmUhJyk7ID8+Ij4gPHNwYW4gY2xhc3M9InVrLWZvcm0taGVscC1pbmxpbmUiPjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2hlbHAgbmVlZGVkJyk7ID8+PC9zcGFuPg0KCTwvZGl2Pg0KICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1mb3JtLXJvdyI+DQoJCTxsYWJlbCBjbGFzcz0idWstZm9ybS1sYWJlbCIgPg0KCQkJPD9waHAgZWNobyBKVGV4dDo6XygnTGFiZWwnKTsgPz4NCgkJPC9sYWJlbD4NCgkJPHRleHRhcmVhIGNvbHM9IiIgcm93cz0iIiAgc3R5bGU9IndpZHRoOiAxMDAlOyBoZWlnaHQ6IDIxNnB4OyIgcGxhY2Vob2xkZXI9Ijw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2FkZCBzb21lIHRleHQgaGVyZSEnKTsgPz4iPjx8fHx8fEZJWHx8fHx8dGV4dGFyZWE+DQoJCTxwIGNsYXNzPSJ1ay1mb3JtLWhlbHAtYmxvY2siPjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2hlbHAgbmVlZGVkJyk7ID8+PC9wPg0KCTwvZGl2Pg0KICAgIDwvZmllbGRzZXQ+DQo8L2Zvcm0+', 1, 'http://getuikit.com/docs/form.html', '', '', 1, 2, '', 12); diff --git a/admin/views/get_snippets/tmpl/default.php b/admin/views/get_snippets/tmpl/default.php index 19f5ddd98..77e8ffb65 100644 --- a/admin/views/get_snippets/tmpl/default.php +++ b/admin/views/get_snippets/tmpl/default.php @@ -55,7 +55,7 @@ JHtml::_('behavior.keepalive'); -
-
-
    -
  • -
  • -
  • -
  • -
  • -
  • -
-
-