Fix gh-249 that caused the admin views to break in PHP 7.2 We also added VDM package import to the import of JCB packages
This commit is contained in:
parent
1c8129eec7
commit
baba793def
@ -126,11 +126,11 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 20th March, 2018
|
||||
+ *Last Build*: 21st March, 2018
|
||||
+ *Version*: 2.6.18
|
||||
+ *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*: **186184**
|
||||
+ *Line count*: **186498**
|
||||
+ *Field count*: **994**
|
||||
+ *File count*: **1171**
|
||||
+ *Folder count*: **189**
|
||||
|
@ -126,11 +126,11 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 20th March, 2018
|
||||
+ *Last Build*: 21st March, 2018
|
||||
+ *Version*: 2.6.18
|
||||
+ *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*: **186184**
|
||||
+ *Line count*: **186498**
|
||||
+ *Field count*: **994**
|
||||
+ *File count*: **1171**
|
||||
+ *Folder count*: **189**
|
||||
|
@ -986,6 +986,100 @@ abstract class ComponentbuilderHelper
|
||||
**/
|
||||
public static $snippetPath = 'https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Snippets/master/';
|
||||
public static $snippetsPath = 'https://api.github.com/repos/vdm-io/Joomla-Component-Builder-Snippets/git/trees/master';
|
||||
|
||||
/**
|
||||
* The packages paths
|
||||
**/
|
||||
public static $jcbGithubPackagesUrl = "https://api.github.com/repos/vdm-io/JCB-Packages/git/trees/master";
|
||||
public static $jcbGithubPackageUrl = "https://github.com/vdm-io/JCB-Packages/raw/master/";
|
||||
|
||||
// not needed at this time (maybe latter)
|
||||
public static $accessToken = "";
|
||||
|
||||
/**
|
||||
* get the github repo file list
|
||||
*
|
||||
* @return array on success
|
||||
*
|
||||
*/
|
||||
public static function getGithubRepoFileList($type, $target)
|
||||
{
|
||||
// get the current Packages (public)
|
||||
if (!$repoData = self::get($type))
|
||||
{
|
||||
if (self::urlExists($target))
|
||||
{
|
||||
$repoData = self::getFileContents($target);
|
||||
if (self::checkJson($repoData))
|
||||
{
|
||||
$test = json_decode($repoData);
|
||||
if (self::checkObject($test) && isset($test->tree) && self::checkArray($test->tree) )
|
||||
{
|
||||
// remember to set it
|
||||
self::set($type, $repoData);
|
||||
}
|
||||
// check if we have error message from github
|
||||
elseif ($errorMessage = self::githubErrorHandeler(array('error' => null), $test))
|
||||
{
|
||||
if (self::checkString($errorMessage['error']))
|
||||
{
|
||||
JFactory::getApplication()->enqueueMessage($errorMessage['error'], 'Error');
|
||||
}
|
||||
$repoData = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$repoData = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST', $target), 'Error');
|
||||
}
|
||||
}
|
||||
// check if we could find packages
|
||||
if (isset($repoData) && self::checkJson($repoData))
|
||||
{
|
||||
$repoData = json_decode($repoData);
|
||||
if (self::checkObject($repoData) && isset($repoData->tree) && self::checkArray($repoData->tree) )
|
||||
{
|
||||
return $repoData->tree;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the github error messages
|
||||
*
|
||||
* @return array of errors on success
|
||||
*
|
||||
*/
|
||||
protected static function githubErrorHandeler($message, &$github)
|
||||
{
|
||||
if (self::checkObject($github) && isset($github->message) && self::checkString($github->message))
|
||||
{
|
||||
// set the message
|
||||
$errorMessage = $github->message;
|
||||
// add the documentation URL
|
||||
if (isset($github->documentation_url) && self::checkString($github->documentation_url))
|
||||
{
|
||||
$errorMessage = $errorMessage.'<br />'.$github->documentation_url;
|
||||
}
|
||||
// check the message
|
||||
if (strpos($errorMessage, 'Authenticated') !== false)
|
||||
{
|
||||
// add little more help if it is an access token issue
|
||||
$errorMessage = JText::sprintf('COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO', $errorMessage);
|
||||
}
|
||||
// set error notice
|
||||
$message['error'] = $errorMessage;
|
||||
// we have error message
|
||||
return $message;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The array of constant paths
|
||||
|
@ -875,6 +875,7 @@ COM_COMPONENTBUILDER_ALIGNMENT="Alignment"
|
||||
COM_COMPONENTBUILDER_ALL="All"
|
||||
COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter."
|
||||
COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME="All is good, there is no notice at this time."
|
||||
COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECT_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_PLEASE_LET_US_KNOW="All of these packages are a fully developed/mapped components for JCB. They can be seen as demo content, or base images from which to start your project. Always make sure you are on the latest version of JCB before importing any of these packages, should any of them fail to import please let us know."
|
||||
COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?"
|
||||
COM_COMPONENTBUILDER_ALWAYS_ADD="Always Add"
|
||||
COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB="Always insure that you have your local components backed up, by making an export of all your local components before importing any new components. <small>(Make <b>SURE</b> to move this zipped backup package out of the tmp folder before doing an import)</small><br />If you are importing a package of a 3rd party JCB package developer, <b>make sure it is a reputable JCB package developers!</b>"
|
||||
@ -894,6 +895,7 @@ COM_COMPONENTBUILDER_AUTO_CHECKIN="Auto Check-in"
|
||||
COM_COMPONENTBUILDER_AVAILABLE_LIBRARIES="Available Libraries"
|
||||
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"
|
||||
COM_COMPONENTBUILDER_A_S_SPAN_CLASSICONFLAG_SPANREPORT_BROKEN_PACKAGEA="<a %s ><span class="icon-flag"> </span>Report Broken Package</a>"
|
||||
COM_COMPONENTBUILDER_BACK="Back"
|
||||
COM_COMPONENTBUILDER_BACKUP="Backup"
|
||||
COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="Backup failed, please try again. If the error continue, please contact your system administrator."
|
||||
@ -917,6 +919,7 @@ COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="<b>%s</b> could not be imported
|
||||
COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="<b>%s</b> <em>component details</em>"
|
||||
COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="<b>%s</b> has been imported!"
|
||||
COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="<b>%s</b> has been updated!"
|
||||
COM_COMPONENTBUILDER_BSB_WAS_FOUND="<b>%s</b> was found!"
|
||||
COM_COMPONENTBUILDER_BUILDIN="Build-in"
|
||||
COM_COMPONENTBUILDER_BULK="Bulk"
|
||||
COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_SNIPPETS="Bulk Get All New Snippets"
|
||||
@ -3886,6 +3889,7 @@ COM_COMPONENTBUILDER_GENERAL_OVERVIEW_OF_HOW_THINGS_WORK_BSB="General overview o
|
||||
COM_COMPONENTBUILDER_GETTING_AVAILABLE_LIBRARIES="Getting available libraries"
|
||||
COM_COMPONENTBUILDER_GET_ALL_NEW_SNIPPETS="Get All New Snippets"
|
||||
COM_COMPONENTBUILDER_GET_AN_ACCOUNT_WITH_GITHUB_BSB="Get an Account with gitHub: <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_GET_PACKAGE="Get Package"
|
||||
COM_COMPONENTBUILDER_GET_SNIPPET="Get snippet"
|
||||
COM_COMPONENTBUILDER_GET_SNIPPETS="Get Snippets"
|
||||
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access"
|
||||
@ -5243,6 +5247,7 @@ COM_COMPONENTBUILDER_NO_SNIPPETS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_A
|
||||
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."
|
||||
COM_COMPONENTBUILDER_NO_TYPE="No Type"
|
||||
COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES="Official VDM Packages"
|
||||
COM_COMPONENTBUILDER_ON_GITHUB="on Github"
|
||||
COM_COMPONENTBUILDER_OPEN="Open"
|
||||
COM_COMPONENTBUILDER_OPENED="opened"
|
||||
@ -5256,6 +5261,7 @@ COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views"
|
||||
COM_COMPONENTBUILDER_OUT_OF_DATE="Out of Date"
|
||||
COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set"
|
||||
COM_COMPONENTBUILDER_OWNER_S="Owner: %s"
|
||||
COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD="Packages from Vast Development Method"
|
||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details"
|
||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not found!"
|
||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
|
||||
@ -5272,6 +5278,7 @@ COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading"
|
||||
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
|
||||
COM_COMPONENTBUILDER_PUBLISHED="Published"
|
||||
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
|
||||
COM_COMPONENTBUILDER_QUITE="Quite"
|
||||
COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
|
||||
COM_COMPONENTBUILDER_RELEASED_THIS="released this"
|
||||
COM_COMPONENTBUILDER_RENAME="Rename"
|
||||
@ -5283,10 +5290,14 @@ COM_COMPONENTBUILDER_RIGHT_IN_TAB="Right in Tab"
|
||||
COM_COMPONENTBUILDER_RIGHT_OF_TABS="Right of Tabs"
|
||||
COM_COMPONENTBUILDER_SAVE_SUCCESS="Great! Item successfully saved."
|
||||
COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select another."
|
||||
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do."
|
||||
COM_COMPONENTBUILDER_SEARCHABLE="Searchable"
|
||||
COM_COMPONENTBUILDER_SELECT_AN_OPTION="Select an option"
|
||||
COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet"
|
||||
COM_COMPONENTBUILDER_SELECT_IF_THE_IMPORT_SHOULD_BE_SHOWING_MORE_OR_LESS_INFORMATION_DURING_IMPORT="Select if the import should be showing more or less information during import."
|
||||
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile"
|
||||
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT="Select the component your would like to import."
|
||||
COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT="Select the package to import"
|
||||
COM_COMPONENTBUILDER_SERVER="Server"
|
||||
COM_COMPONENTBUILDER_SERVERS="Servers"
|
||||
COM_COMPONENTBUILDER_SERVERS_ACCESS="Servers Access"
|
||||
@ -6253,6 +6264,7 @@ COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_SNIPPETS_AT_THIS_TIME="There are n
|
||||
COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME="There are no snippets to update at this time"
|
||||
COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!"
|
||||
COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, <b>no view or id found in session or view not allowed to access area</b>, we could not load any linked to values. Please inform your system administrator!"
|
||||
COM_COMPONENTBUILDER_THEY_ARE_BEING_HOSTED_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTON="They are being hosted on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the [Get Package] button."
|
||||
COM_COMPONENTBUILDER_THE_BPHPSECLIBNETSFTPB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The <b>phpseclib\NET\SFTP</b> library\class is not available! This library\class should have been added to your <b>libraries/vdm_io/vendor</b> folder. Please contact your system administrator for more info"
|
||||
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_PATH_ON_BSB_SERVER="The <b>%s</b> file could not be moved to <b>%s</b> path on <b>%s</b> server."
|
||||
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_SERVER="The <b>%s</b> file could not be moved to <b>%s</b> server."
|
||||
@ -6284,6 +6296,7 @@ COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_SNIPPETS_ARE_CASE_SENSITIVE_SO_IF_YOU_CH
|
||||
COM_COMPONENTBUILDER_THE_SERVER_DETAILS_FOR_BID_SB_COULD_NOT_BE_RETRIEVED="The server details for <b>(ID: %s)</b> could not be retrieved!"
|
||||
COM_COMPONENTBUILDER_THE_SNIPPETS_WERE_SUCCESSFULLY_EXPORTED="The Snippets Were Successfully Exported!"
|
||||
COM_COMPONENTBUILDER_THE_SNIPPET_WAS_SUCCESSFULLY_EXPORTED="The Snippet Was Successfully Exported!"
|
||||
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!"
|
||||
COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading"
|
||||
COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME="This <b>%s</b> is not linked to any other areas of JCB at this time!"
|
||||
COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key."
|
||||
@ -6312,6 +6325,7 @@ COM_COMPONENTBUILDER_USE_BATCH="Use Batch"
|
||||
COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."
|
||||
COM_COMPONENTBUILDER_USE_KEY="Use Key"
|
||||
COM_COMPONENTBUILDER_VDM_NOTICE_BOARD="VDM Notice Board"
|
||||
COM_COMPONENTBUILDER_VDM_PACKAGES="VDM Packages"
|
||||
COM_COMPONENTBUILDER_VERSION="Version"
|
||||
COM_COMPONENTBUILDER_VIEW="View"
|
||||
COM_COMPONENTBUILDER_VIEWS="Views"
|
||||
@ -6344,5 +6358,6 @@ COM_COMPONENTBUILDER_YOU_SHOULD_ONLY_CONTINUE_THIS_IMPORT_IF_YOU_HAVE_BACKUP_YOU
|
||||
COM_COMPONENTBUILDER_YOU_WILL_NEED_TO_KNOW_HOW_S_WORKS_BASIC_YOU_WILL_ALSO_NEED_A_S_ACCOUNT_AND_KNOW_HOW_TO_MAKE_A_PULL_REQUEST_ON_GITHUB="you will need to know how %s works (basic). You will also need a %s account and know how to make a pull request on github."
|
||||
COM_COMPONENTBUILDER_ZIPPED_FILE_LOCATION="Zipped File Location"
|
||||
COM_COMPONENTBUILDER__SELECT_COMPONENT_="- Select Component -"
|
||||
COM_COMPONENTBUILDER__SELECT_PACKAGE_="- Select Package -"
|
||||
COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_CREATE_S=", since you don't have permission to create %s!"
|
||||
COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_EDIT_S=", since you don't have permission to edit %s!"
|
||||
|
@ -1226,10 +1226,10 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
}
|
||||
// if string (fields)
|
||||
if (!$found && 'xml' === $key && ComponentbuilderHelper::checkString($item->{$key})
|
||||
&& strpos($item->{$key}, 'fields="') !== false)
|
||||
&& strpos($item->{$key}, $target.'="') !== false)
|
||||
{
|
||||
// now get the fields between
|
||||
$_fields = ComponentbuilderHelper::getBetween($item->{$key}, 'fields="', '"');
|
||||
$_fields = ComponentbuilderHelper::getBetween($item->{$key}, $target.'="', '"');
|
||||
// check the result
|
||||
if (ComponentbuilderHelper::checkString($_fields))
|
||||
{
|
||||
|
@ -110,6 +110,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
// get import type
|
||||
$this->getType = $this->app->input->getString('gettype', NULL);
|
||||
// get import type
|
||||
$this->getType = $this->app->input->getString('gettype', NULL);
|
||||
// get import type
|
||||
$this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL);
|
||||
|
||||
if ($package === null)
|
||||
@ -189,6 +191,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
$headerList = null;
|
||||
// force update
|
||||
$this->forceUpdate = $this->app->input->getInt('force_update', 0);
|
||||
// show more information
|
||||
$this->moreInfo = $this->app->input->getInt('more_info', 0);
|
||||
// has a key
|
||||
$this->hasKey = $this->app->input->getInt('haskey', 0);
|
||||
// die sleutle
|
||||
@ -700,6 +704,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
// first check if exist
|
||||
if ($local = $this->getLocalItem($item, $table, 1))
|
||||
{
|
||||
// display more import info
|
||||
if ($this->moreInfo)
|
||||
{
|
||||
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_WAS_FOUND', $table.' id:'.$oldID . '->' . $local->id), 'success');
|
||||
}
|
||||
$dbDate = strtotime($item->modified);
|
||||
$localDate = strtotime($local->modified);
|
||||
// okay we have it local (check if the version is newer)
|
||||
@ -718,8 +727,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
{
|
||||
// we had success in
|
||||
$this->newID[$table][$oldID] = (int) $id;
|
||||
// to debug if your mismatching is to much (TODO) we can add a debugging switch later
|
||||
// $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED', $table.' id:'.$oldID . '->' . $id), 'success');
|
||||
// display more import info
|
||||
if ($this->moreInfo)
|
||||
{
|
||||
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED', $table.' id:'.$oldID . '->' . $id), 'success');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -741,8 +753,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
{
|
||||
// not found in local db so add
|
||||
$this->newID[$table][$oldID] = (int) $id;
|
||||
// to debug if your mismatching is to much
|
||||
// $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED', $table.' id:'.$oldID . '->' . $id), 'success');
|
||||
// display more import info
|
||||
if ($this->moreInfo)
|
||||
{
|
||||
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED', $table.' id:'.$oldID . '->' . $id), 'success');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1317,7 +1317,7 @@ INSERT INTO `#__componentbuilder_snippet` (`id`, `contributor_company`, `contrib
|
||||
(15, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/', '', 'Easlily create a nicely looking pagination to navigate through pages.', 4, 'Pagination', 'PHVsIGNsYXNzPSJ1ay1wYWdpbmF0aW9uIj4NCiAgICA8bGk+PGEgaHJlZj0iIyI+MTwvYT48L2xpPg0KICAgIDxsaT48c3Bhbj4uLi48L3NwYW4+PC9saT4NCiAgICA8bGk+PGEgaHJlZj0iIyI+ODwvYT48L2xpPg0KICAgIDxsaT48YSBocmVmPSIjIj45PC9hPjwvbGk+DQogICAgPGxpIGNsYXNzPSJ1ay1hY3RpdmUiPjxzcGFuPjEwPC9zcGFuPjwvbGk+DQogICAgPGxpPjxhIGhyZWY9IiMiPjExPC9hPjwvbGk+DQogICAgPGxpPjxhIGhyZWY9IiMiPjEyPC9hPjwvbGk+DQogICAgPGxpPjxzcGFuPi4uLjwvc3Bhbj48L2xpPg0KICAgIDxsaT48YSBocmVmPSIjIj4yMDwvYT48L2xpPg0KPC91bD4=', 2, 'http://getuikit.com/docs/pagination.html', 'The Pagination component consists of button-like styled links, that are aligned side by side.', '', 1, '2015-05-19 20:45:49', '2017-11-11 22:09:27', 53, '', 6),
|
||||
(16, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/', '', 'Create a tabbed navigation with different styles.', 4, 'Tab', 'PHVsIGNsYXNzPSJ1ay10YWIiIGRhdGEtdWstdGFiPg0KICAgIDxsaSBjbGFzcz0idWstYWN0aXZlIj48YSBocmVmPSIiPkFjdGl2ZTwvYT48L2xpPg0KICAgIDxsaT48YSBocmVmPSIiPkl0ZW08L2E+PC9saT4NCiAgICA8bGk+PGEgaHJlZj0iIj5JdGVtPC9hPjwvbGk+DQogICAgPGxpIGNsYXNzPSJ1ay1kaXNhYmxlZCI+PGEgaHJlZj0iIj5EaXNhYmxlZDwvYT48L2xpPg0KPC91bD4=', 2, 'http://getuikit.com/docs/tab.html', 'The Tab component consists of clickable tabs, that are aligned side by side.\r\n\r\nThe data-uk-tab attribute is required for two purposes. Firstly, it enables the responsive behaviour. If the parent container is too small to accomodate all tabs, they will be combined into a dropdown, toggled by a single tab, which represents the active tab item. This also requires the Dropdown component in order to work.\r\n\r\nAnd secondly, its functionality is coupled to the Switcher component, which is necessary to dynamically transition through different contents using tabbed navigation.', '', 1, '2015-05-19 20:47:34', '2017-11-11 22:09:27', 55, '', 6),
|
||||
(17, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/', '', 'Create a tabbed navigation with different styles.', 4, 'Thumbnav', 'PHVsIGNsYXNzPSJ1ay10aHVtYm5hdiI+DQogICAgPGxpIGNsYXNzPSJ1ay1hY3RpdmUiPjxhIGhyZWY9IiI+PGltZyBzcmM9IiIgYWx0PSIiPjwvYT48L2xpPg0KICAgIDxsaT48YSBocmVmPSIiPjxpbWcgc3JjPSIiIGFsdD0iIj48L2E+PC9saT4NCjwvdWw+', 2, 'http://getuikit.com/docs/thumbnav.html', 'To apply this component, add the .uk-thumbnav class to an element and nest your thumbnail images inside elements within the list items. The thumbnav will wrap into several rows, if it is wider than its container and automatically applies a gutter. Add the .uk-active class to create an active state.\r\n\r\nTo align a subnav, for example to horizontally center it, you can use the Flex component.', '', 1, '2015-05-19 20:48:42', '2017-11-11 22:09:27', 54, '', 6),
|
||||
(18, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/', 'Modifiers\r\n\r\nTo display the list in a different style, just add a modifier class to the the .uk-list class. The modifiers of the List component are not combinable with each other.', 'Easily create nicely looking lists, which come in different styles.', 4, 'List', 'PHVsIGNsYXNzPSJ1ay1saXN0IHVrLWxpc3Qtc3RyaXBlZCI+DQogICAgPGxpPi4uLjwvbGk+DQogICAgPGxpPi4uLjwvbGk+DQogICAgPGxpPi4uLjwvbGk+DQo8L3VsPg==', 3, 'http://getuikit.com/docs/list.html', 'To apply this component, add the .uk-list class to an unordered or ordered list. The list will now display without any spacing or list-style. [uk-list-line] [uk-list-space]', '', 1, '2015-06-01 16:09:04', '2017-11-11 22:09:27', 54, '', 6),
|
||||
(18, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/', 'Modifiers\r\n\r\nTo display the list in a different style, just add a modifier class to the the .uk-list class. The modifiers of the List component are not combinable with each other.', 'Easily create nicely looking lists, which come in different styles.', 4, 'List', 'PHVsIGNsYXNzPSJ1ay1saXN0IHVrLWxpc3Qtc3RyaXBlZCI+DQogICAgPGxpPi4uLjwvbGk+DQogICAgPGxpPi4uLjwvbGk+DQogICAgPGxpPi4uLjwvbGk+DQo8L3VsPg==', 3, 'http://getuikit.com/docs/list.html', 'To apply this component, add the .uk-list class to an unordered or ordered list. The list will now display without any spacing or list-style. [uk-list-line] [uk-list-space]', '', 1, '0000-00-00 00:00:00', '2018-03-21 02:26:43', 2, '', 6),
|
||||
(19, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/', 'Add the .uk-description-list-horizontal class to display terms and descriptions side by side.', 'Easily create nicely looking description lists, which come in different styles.', 4, 'Description list', 'PGRsIGNsYXNzPSJ1ay1kZXNjcmlwdGlvbi1saXN0LWhvcml6b250YWwiPg0KICAgIDxkdD4uLi48L2R0Pg0KICAgIDxkZD4uLi48L2RkPg0KPC9kbD4=', 3, 'http://getuikit.com/docs/description-list.html', 'There is no component class necessary to create a description list, but UIkit provides a couple of modifier classes to display the list in a different style. The modifiers of the Description list component are not combinable with each other. [uk-description-list-line]', '', 1, '2015-06-01 16:10:54', '2017-11-11 22:09:27', 54, '', 6),
|
||||
(20, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/', '', 'Easily create nicely looking tables, which come in different styles.', 4, 'Table', 'PHRhYmxlIGNsYXNzPSJ1ay10YWJsZSB1ay10YWJsZS1ob3ZlciI+DQogICAgPGNhcHRpb24+Li4uPC9jYXB0aW9uPg0KICAgIDx0aGVhZD4NCiAgICAgICAgPHRyPg0KICAgICAgICAgICAgPHRoPi4uLjwvdGg+DQogICAgICAgIDwvdHI+DQogICAgPC90aGVhZD4NCiAgICA8dGZvb3Q+DQogICAgICAgIDx0cj4NCiAgICAgICAgICAgIDx0ZD4uLi48L3RkPg0KICAgICAgICA8L3RyPg0KICAgIDwvdGZvb3Q+DQogICAgPHRib2R5Pg0KICAgICAgICA8dHI+DQogICAgICAgICAgICA8dGQ+Li4uPC90ZD4NCiAgICAgICAgPC90cj4NCiAgICA8L3Rib2R5Pg0KPC90YWJsZT4=', 3, 'http://getuikit.com/docs/table.html', 'To apply this component, add the .uk-table class to a element.', '', 1, '2015-06-01 16:12:46', '2017-11-11 22:09:27', 53, '', 6),
|
||||
(21, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/', '', 'Easily create nicely looking buttons, which come in different styles.', 4, 'Button href', 'PGEgY2xhc3M9InVrLWJ1dHRvbiB1ay1idXR0b24tcHJpbWFyeSIgaHJlZj0iIj4uLi48L2E+', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, '2015-06-01 16:17:24', '2017-11-11 22:09:27', 11, '', 7),
|
||||
@ -1486,7 +1486,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
|
||||
(21, '', 'Using this generic form field type forces you to write SQL in an XML file and is rather limited. For more flexibility, consider using Custom FieldType.\r\n\r\nThe sql form field type provides a drop down list of entries obtained by running a query on the Joom', 'SQL', '{\"properties0\":{\"name\":\"type\",\"example\":\"sql\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be sql.\"},\"properties1\":{\"name\":\"name\",\"example\":\"title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an article\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"query\",\"example\":\"SELECT id, concat( title, \' (\', created, \')\') AS title FROM #__content\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the SQL query which will provide the data for the drop-down list. The query must return two columns; one called \'value\' (unless overridden by the key_field attribute) which will hold the values of the list items; the other called the same as the value of the name attribute (unless overridden by the value_field attribute) containing the text to be shown in the drop-down list.\"},\"properties4\":{\"name\":\"default\",\"example\":\"10\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default value. This is the value of the \'value\' field, unless overridden by the key_field attribute.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties7\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties8\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties9\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the name of the column that will contain values for the parameter. If omitted then the column called \'value\' will be used, if it exists.\"},\"properties10\":{\"name\":\"value_field\",\"example\":\"title\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the name of the column that will contain values to be shown to the user in the drop-down list. If omitted then the column with the same name as the name attribute will be used, if it exists.\"},\"properties11\":{\"name\":\"translate\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) will translate the output of the value_field if set to true. It defaults to false.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a drop down list of entries obtained by running a query on the Joomla Database. The first results column returned by the query provides the values for the drop down box.', '', 1, 2, '', ''),
|
||||
(22, '', 'The Tag field type provides a point where you can enter tags - this is either AJAX or nested.', 'Tag', '{\"properties0\":{\"name\":\"type\",\"example\":\"tag\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be tag.\"},\"properties1\":{\"name\":\"name\",\"example\":\"tags\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"mode\",\"example\":\"ajax\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the way the tags will be loaded, the options are ( ajax or nested )\"},\"properties3\":{\"name\":\"label\",\"example\":\"Tags\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties4\":{\"name\":\"description\",\"example\":\"Assign tags to ###VIEW### items. Tag names must be unique.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is the description of the field.\"},\"properties5\":{\"name\":\"id\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the id to add to the field. Note if none is set this will be the name of the field.\"},\"properties6\":{\"name\":\"class\",\"example\":\"inputbox small\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the class to add to the field.\"},\"properties7\":{\"name\":\"published\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) determines if non published tags should be allowed.\"},\"properties8\":{\"name\":\"language\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is language to filter the existing tags by.\"},\"properties9\":{\"name\":\"multiple\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the ability to add more than 1 tag to the form field.\"},\"properties10\":{\"name\":\"custom\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) if the ajax mode is chosen setting this to [deny] will prevent users from adding in new tags.\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides an entry point for tags (either AJAX or Nested).', '', 1, 2, '', ''),
|
||||
(23, '', 'The tel field type is an alias for a text field. Telephone numbers can be validated using the tel rule and filtered using the tel input filter.', 'Tel', '{\"properties0\":{\"name\":\"type\",\"example\":\"text\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be text.\"},\"properties1\":{\"name\":\"name\",\"example\":\"phone\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Phone\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"maxlength\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) limits the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Enter phone number\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"tel\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"validated\",\"example\":\"tel\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to validated the input data.\"},\"properties13\":{\"name\":\"message\",\"example\":\"Error! Please add phone number here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties14\":{\"name\":\"hint\",\"example\":\"Your Phone Number\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties15\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties16\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides an input field for a telephone number.', '', 1, 5, '', ''),
|
||||
(24, '', 'The text form field type provides a text box for data entry. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Text', '{\"properties0\":{\"name\":\"type\",\"example\":\"text\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be text.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextvalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter some text\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"maxlength\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) limits the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"Some text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties13\":{\"name\":\"field\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) used in validation of \\\"equals\\\" to link the field to match.\"},\"properties14\":{\"name\":\"message\",\"example\":\"Error! Please add some text here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties15\":{\"name\":\"hint\",\"example\":\"Your Name Here\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties16\":{\"name\":\"autocomplete\",\"example\":\"on\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties17\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties18\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for data entry.', '', 1, 7, '', ''),
|
||||
(24, '', 'The text form field type provides a text box for data entry. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Text', '{\"properties0\":{\"name\":\"type\",\"example\":\"text\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be text.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextvalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter some text\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"maxlength\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) limits the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"Some text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties13\":{\"name\":\"field\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) used in validation of \\\"equals\\\" to link the field to match.\"},\"properties14\":{\"name\":\"message\",\"example\":\"Error! Please add some text here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties15\":{\"name\":\"hint\",\"example\":\"Your Name Here\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties16\":{\"name\":\"autocomplete\",\"example\":\"on\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties17\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties18\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for data entry.', '', 1, 8, '', ''),
|
||||
(25, '', 'The textarea form field type provides a text area for entry of multi-line text. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Textarea', '{\"properties0\":{\"name\":\"type\",\"example\":\"textarea\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be textarea.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextarea\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter some text\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"rows\",\"example\":\"10\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the height of the visible text area in lines. If omitted the width is determined by the browser. The value of rows does not limit the number of lines that may be entered.\"},\"properties4\":{\"name\":\"cols\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the width of the visible text area in characters. If omitted the width is determined by the browser. The value of cols does not limit the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"default text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Text Area\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties16\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"filter\",\"example\":\"raw\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties9\":{\"name\":\"hint\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the textarea.\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties17\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties11\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties12\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text area for entry of multi-line text.', '', 1, 6, '', ''),
|
||||
(26, '', 'The timezones form field type provides a drop down list of time zones. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Timezone', '{\"properties0\":{\"name\":\"type\",\"example\":\"timezone\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be timezone.\"},\"properties1\":{\"name\":\"name\",\"example\":\"timezone\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Timezone\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default time zone. For example, use \'-10\' for \'(UTC -10:00) Hawaii\'.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a drop down list of time zones.', '', 1, 2, '', ''),
|
||||
(27, '', 'This field essentially is a text field with the type of url. If a fully qualified url (that is one with a scheme and domain such as http://example.com) is entered and it uses idn (that is uses characters that are non ascii such as ê or Ψ) it will translat', 'URL', '{\"properties0\":{\"name\":\"type\",\"example\":\"url\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be url.\"},\"properties1\":{\"name\":\"name\",\"example\":\"website\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Website\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"maxlength\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) limits the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Enter website address\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"url\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"validated\",\"example\":\"url\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties13\":{\"name\":\"message\",\"example\":\"Error! Please add website here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties14\":{\"name\":\"hint\",\"example\":\"Your Website Here\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties15\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties16\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a URL text input field.', '', 1, 5, '', ''),
|
||||
|
@ -704,7 +704,7 @@ jQuery('input.form-field-repeatable').on('row-add', function (e) {
|
||||
});
|
||||
});
|
||||
<?php endforeach; ?>
|
||||
<?php $numberAddtables = range(0, count($this->item->addtables) + 3, 1);?>
|
||||
<?php $numberAddtables = range(0, count( (array) $this->item->addtables) + 3, 1);?>
|
||||
|
||||
// for the values already set
|
||||
jQuery(document).ready(function(){
|
||||
|
@ -120,6 +120,23 @@ JHtml::_('behavior.keepalive');
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
Joomla.submitbuttonVDM = function()
|
||||
{
|
||||
var form = document.getElementById('adminForm');
|
||||
// do field validation
|
||||
if (form.vdm_package.value == "" || form.vdm_package.value == "http://")
|
||||
{
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the url
|
||||
form.import_url.value = form.vdm_package.value;
|
||||
jQuery('#loading').css('display', 'block');
|
||||
form.gettype.value = 'url';
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
@ -157,9 +174,9 @@ jQuery(document).ready(function($) {
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<?php if ($this->hasPackage && ComponentbuilderHelper::checkArray($this->headerList) && ComponentbuilderHelper::checkArray($this->headers)) : ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => $this->activeTab)); ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'jcbImportTab', array('active' => $this->activeTab)); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'basic', JText::_('COM_COMPONENTBUILDER_BASIC_METHOD', true)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'basic', JText::_('COM_COMPONENTBUILDER_BASIC_METHOD', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
|
||||
<div class="control-group">
|
||||
@ -205,9 +222,9 @@ jQuery(document).ready(function($) {
|
||||
?>
|
||||
<h3 style="color: #1F73BA;"><?php echo JText::_('COM_COMPONENTBUILDER_CONFIRMATION_STEP_BEFORE_IMPORTING'); ?></h3>
|
||||
<p style="color: #1F73BA;"><?php echo JText::_('COM_COMPONENTBUILDER_YOU_SHOULD_ONLY_CONTINUE_THIS_IMPORT_IF_YOU_HAVE_BACKUP_YOUR_COMPONENTS_AND_INSURED_THAT_THE_PACKAGE_OWNER_IS_REPUTABLE'); ?></p>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'advanced')); ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'jcbImportTab', array('active' => 'advanced')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'advanced', JText::sprintf('COM_COMPONENTBUILDER_IMPORT_S', $comP)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'advanced', JText::sprintf('COM_COMPONENTBUILDER_IMPORT_S', $comP)); ?>
|
||||
<div class="<?php echo $class1; ?>">
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_SMART_PACKAGE_OPTIONS'); ?></legend>
|
||||
@ -299,7 +316,7 @@ jQuery(document).ready(function($) {
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if (isset($this->packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name'])) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'info', JText::sprintf('COM_COMPONENTBUILDER_S_BEING_IMPORTED', $comP)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'info', JText::sprintf('COM_COMPONENTBUILDER_S_BEING_IMPORTED', $comP)); ?>
|
||||
<?php $class2 = ($cAmount == 1) ? 'span12' : 'span6'; ?>
|
||||
<?php $counter = 1; foreach ($this->packageInfo['name'] as $key => $value): ?>
|
||||
<?php if ($cAmount > 1 && $counter == 3) { echo '</div>'; $counter = 1;} ?>
|
||||
@ -330,9 +347,9 @@ jQuery(document).ready(function($) {
|
||||
<h1 style="color: #922924;"><?php echo JText::_('COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST'); ?></h1>
|
||||
<p style="color: #922924;"><?php echo JText::_('COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB'); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'upload')); ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'jcbImportTab', array('active' => 'upload')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'upload', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_UPLOAD', true)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'upload', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_UPLOAD', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
@ -347,7 +364,7 @@ jQuery(document).ready(function($) {
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'directory', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_DIRECTORY', true)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'directory', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_DIRECTORY', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
@ -362,7 +379,7 @@ jQuery(document).ready(function($) {
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'url', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_URL', true)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'url', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_URL', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
@ -376,6 +393,27 @@ jQuery(document).ready(function($) {
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if ($this->vdmPackages): ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'url_vdm', JText::_('COM_COMPONENTBUILDER_VDM_PACKAGES', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_("COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD"); ?></legend>
|
||||
<p><?php echo JText::_('COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECT_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_PLEASE_LET_US_KNOW'); ?></p>
|
||||
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_THEY_ARE_BEING_HOSTED_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTON', 'href="https://github.com/vdm-io/JCB-Packages" target="_blank" title="gitHub Reposetory"'); ?></p>
|
||||
<?php foreach ($this->vdmPackages as $field): ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label;?></div>
|
||||
<div class="controls"><?php echo $field->input;?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_GET_PACKAGE'); ?>" onclick="Joomla.submitbuttonVDM()" /> <small><span class="icon-shield"> </span><?php echo JText::_('COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES'); ?></small>
|
||||
</div>
|
||||
<div class="control-group"><small><?php echo JText::sprintf('COM_COMPONENTBUILDER_A_S_SPAN_CLASSICONFLAG_SPANREPORT_BROKEN_PACKAGEA', 'href="https://www.vdm.io/support" target="_blank" title="Should any of these packages fail to import please let us know"'); ?></small></div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
<input type="hidden" name="gettype" value="upload" />
|
||||
<?php endif; ?>
|
||||
|
@ -41,6 +41,7 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
protected $dataType;
|
||||
protected $packageInfo;
|
||||
protected $formPackage;
|
||||
protected $vdmPackages = false;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
@ -87,7 +88,11 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
if ($this->dataType === 'smart_package')
|
||||
{
|
||||
$this->packageInfo = json_decode($session->get('smart_package_info', false), true);
|
||||
$this->formPackage = $this->getForm();
|
||||
// add the form class
|
||||
jimport('joomla.form.form');
|
||||
// load the forms
|
||||
$this->formPackage = $this->_getForm($this->dataType);
|
||||
$this->vdmPackages = $this->_getForm('vdm_package');
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -100,56 +105,107 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
public function getForm()
|
||||
{
|
||||
jimport('joomla.form.form');
|
||||
public function _getForm($type)
|
||||
{
|
||||
$form = array();
|
||||
$radio1 = JFormHelper::loadFieldType('radio',true);
|
||||
// Switch to force local update
|
||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_FORCE_LOCAL_UPDATE').'" description="'.JText::_('COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED').'" name="force_update" type="radio" class="btn-group btn-group-yesno" default="0" filter="INT">';
|
||||
$xml .= '<option value="1">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="0">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
||||
$xml .= "</field>";
|
||||
// prepare the xml
|
||||
$force = new SimpleXMLElement($xml);
|
||||
// set components to form
|
||||
$radio1->setup($force,0);
|
||||
// add to form
|
||||
$form[] = $radio1;
|
||||
|
||||
if (!$this->packageInfo || (isset($this->packageInfo['getKeyFrom']) && ComponentbuilderHelper::checkArray($this->packageInfo['getKeyFrom'])))
|
||||
if ('smart_package' === $type)
|
||||
{
|
||||
// set required field
|
||||
$required = 'required="true"';
|
||||
if (!$this->packageInfo)
|
||||
{
|
||||
$radio2 = JFormHelper::loadFieldType('radio',true);
|
||||
// has key
|
||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_USE_KEY').'" description="'.JText::_('COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL').'" name="haskey" type="radio" class="btn-group btn-group-yesno" default="1" filter="INT">';
|
||||
$xml .= '<option value="1">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="0">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
||||
$xml .= "</field>";
|
||||
// prepare the xml
|
||||
$license = new SimpleXMLElement($xml);
|
||||
// set components to form
|
||||
$radio2->setup($license,1);
|
||||
$required = ''; // change required field
|
||||
// add to form
|
||||
$form[] = $radio2;
|
||||
}
|
||||
|
||||
$text1 = JFormHelper::loadFieldType('text',true);
|
||||
// add the key
|
||||
$xml = '<field type="password" label="'.JText::_('COM_COMPONENTBUILDER_KEY').'" description="'.JText::_('COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE').'" name="sleutle" autocomplete="false" class="text_area" filter="STRING" hint="add key here" '.$required.' />';
|
||||
$radio1 = JFormHelper::loadFieldType('radio',true);
|
||||
// Switch to force local update
|
||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_FORCE_LOCAL_UPDATE').'" description="'.JText::_('COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED').'" name="force_update" type="radio" class="btn-group btn-group-yesno" default="0" filter="INT">';
|
||||
$xml .= '<option value="1">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="0">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
||||
$xml .= "</field>";
|
||||
// prepare the xml
|
||||
$sleutle = new SimpleXMLElement($xml);
|
||||
$force = new SimpleXMLElement($xml);
|
||||
// set components to form
|
||||
$text1->setup($sleutle,'');
|
||||
$radio1->setup($force,0);
|
||||
// add to form
|
||||
$form[] = $text1;
|
||||
$form[] = $radio1;
|
||||
|
||||
$radio2 = JFormHelper::loadFieldType('radio',true);
|
||||
// Switch to show more information about the import
|
||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_QUITE').'" description="'.JText::_('COM_COMPONENTBUILDER_SELECT_IF_THE_IMPORT_SHOULD_BE_SHOWING_MORE_OR_LESS_INFORMATION_DURING_IMPORT').'" name="more_info" type="radio" class="btn-group btn-group-yesno" default="0" filter="INT">';
|
||||
$xml .= '<option value="0">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="1">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
||||
$xml .= "</field>";
|
||||
// prepare the xml
|
||||
$information = new SimpleXMLElement($xml);
|
||||
// set information to form
|
||||
$radio2->setup($information,0);
|
||||
// add to form
|
||||
$form[] = $radio2;
|
||||
|
||||
if (!$this->packageInfo || (isset($this->packageInfo['getKeyFrom']) && ComponentbuilderHelper::checkArray($this->packageInfo['getKeyFrom'])))
|
||||
{
|
||||
// set required field
|
||||
$required = 'required="true"';
|
||||
if (!$this->packageInfo)
|
||||
{
|
||||
$radio2 = JFormHelper::loadFieldType('radio',true);
|
||||
// has key
|
||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_USE_KEY').'" description="'.JText::_('COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL').'" name="haskey" type="radio" class="btn-group btn-group-yesno" default="1" filter="INT">';
|
||||
$xml .= '<option value="1">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="0">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
||||
$xml .= "</field>";
|
||||
// prepare the xml
|
||||
$license = new SimpleXMLElement($xml);
|
||||
// set components to form
|
||||
$radio2->setup($license,1);
|
||||
$required = ''; // change required field
|
||||
// add to form
|
||||
$form[] = $radio2;
|
||||
}
|
||||
|
||||
$text1 = JFormHelper::loadFieldType('text',true);
|
||||
// add the key
|
||||
$xml = '<field type="password" label="'.JText::_('COM_COMPONENTBUILDER_KEY').'" description="'.JText::_('COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE').'" name="sleutle" autocomplete="false" class="text_area" filter="STRING" hint="add key here" '.$required.' />';
|
||||
// prepare the xml
|
||||
$sleutle = new SimpleXMLElement($xml);
|
||||
// set components to form
|
||||
$text1->setup($sleutle,'');
|
||||
// add to form
|
||||
$form[] = $text1;
|
||||
}
|
||||
}
|
||||
elseif ('vdm_package' === $type && $listObjects = ComponentbuilderHelper::getGithubRepoFileList('jcbGithubPackages', ComponentbuilderHelper::$jcbGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
|
||||
{
|
||||
if (ComponentbuilderHelper::checkArray($listObjects))
|
||||
{
|
||||
// load the vdm packages if available
|
||||
$list = JFormHelper::loadFieldType('list',true);
|
||||
// load the list
|
||||
$load = false;
|
||||
// start building componet xml field
|
||||
$xml = '<field label="Package" description="'.JText::_('COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT').'" name="vdm_package" type="list" class="list_class">';
|
||||
$xml .= '<option value="">'.JText::_('COM_COMPONENTBUILDER__SELECT_PACKAGE_').'</option>';
|
||||
foreach($listObjects as $listObject)
|
||||
{
|
||||
if (strpos($listObject->path, '.zip') !== false)
|
||||
{
|
||||
$xml .= '<option value="'.ComponentbuilderHelper::$jcbGithubPackageUrl.$listObject->path.'">'.$this->setPackageName($listObject->path).'</option>';
|
||||
$load = true;
|
||||
}
|
||||
}
|
||||
$xml .= "</field>";
|
||||
// only load if at least one item was found
|
||||
if ($load)
|
||||
{
|
||||
// prepare the xml
|
||||
$packages = new SimpleXMLElement($xml);
|
||||
// set components to form
|
||||
$list->setup($packages, '');
|
||||
|
||||
// set to form
|
||||
$form[] = $list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
public function setPackageName($name)
|
||||
{
|
||||
return ComponentbuilderHelper::safeString( preg_replace('/(?<!^)([A-Z])/', '-\ \1', str_replace(array('.zip', 'JCB_'), '', $name)), 'W');
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the toolbar
|
||||
*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>20th March, 2018</creationDate>
|
||||
<creationDate>21st March, 2018</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://joomlacomponentbuilder.com</authorUrl>
|
||||
|
@ -52,6 +52,100 @@ abstract class ComponentbuilderHelper
|
||||
**/
|
||||
public static $snippetPath = 'https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Snippets/master/';
|
||||
public static $snippetsPath = 'https://api.github.com/repos/vdm-io/Joomla-Component-Builder-Snippets/git/trees/master';
|
||||
|
||||
/**
|
||||
* The packages paths
|
||||
**/
|
||||
public static $jcbGithubPackagesUrl = "https://api.github.com/repos/vdm-io/JCB-Packages/git/trees/master";
|
||||
public static $jcbGithubPackageUrl = "https://github.com/vdm-io/JCB-Packages/raw/master/";
|
||||
|
||||
// not needed at this time (maybe latter)
|
||||
public static $accessToken = "";
|
||||
|
||||
/**
|
||||
* get the github repo file list
|
||||
*
|
||||
* @return array on success
|
||||
*
|
||||
*/
|
||||
public static function getGithubRepoFileList($type, $target)
|
||||
{
|
||||
// get the current Packages (public)
|
||||
if (!$repoData = self::get($type))
|
||||
{
|
||||
if (self::urlExists($target))
|
||||
{
|
||||
$repoData = self::getFileContents($target);
|
||||
if (self::checkJson($repoData))
|
||||
{
|
||||
$test = json_decode($repoData);
|
||||
if (self::checkObject($test) && isset($test->tree) && self::checkArray($test->tree) )
|
||||
{
|
||||
// remember to set it
|
||||
self::set($type, $repoData);
|
||||
}
|
||||
// check if we have error message from github
|
||||
elseif ($errorMessage = self::githubErrorHandeler(array('error' => null), $test))
|
||||
{
|
||||
if (self::checkString($errorMessage['error']))
|
||||
{
|
||||
JFactory::getApplication()->enqueueMessage($errorMessage['error'], 'Error');
|
||||
}
|
||||
$repoData = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$repoData = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST', $target), 'Error');
|
||||
}
|
||||
}
|
||||
// check if we could find packages
|
||||
if (isset($repoData) && self::checkJson($repoData))
|
||||
{
|
||||
$repoData = json_decode($repoData);
|
||||
if (self::checkObject($repoData) && isset($repoData->tree) && self::checkArray($repoData->tree) )
|
||||
{
|
||||
return $repoData->tree;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the github error messages
|
||||
*
|
||||
* @return array of errors on success
|
||||
*
|
||||
*/
|
||||
protected static function githubErrorHandeler($message, &$github)
|
||||
{
|
||||
if (self::checkObject($github) && isset($github->message) && self::checkString($github->message))
|
||||
{
|
||||
// set the message
|
||||
$errorMessage = $github->message;
|
||||
// add the documentation URL
|
||||
if (isset($github->documentation_url) && self::checkString($github->documentation_url))
|
||||
{
|
||||
$errorMessage = $errorMessage.'<br />'.$github->documentation_url;
|
||||
}
|
||||
// check the message
|
||||
if (strpos($errorMessage, 'Authenticated') !== false)
|
||||
{
|
||||
// add little more help if it is an access token issue
|
||||
$errorMessage = JText::sprintf('COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO', $errorMessage);
|
||||
}
|
||||
// set error notice
|
||||
$message['error'] = $errorMessage;
|
||||
// we have error message
|
||||
return $message;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The array of constant paths
|
||||
|
@ -34,6 +34,7 @@ COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set"
|
||||
COM_COMPONENTBUILDER_OWNER_S="Owner: %s"
|
||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details"
|
||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
|
||||
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do."
|
||||
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>."
|
||||
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it."
|
||||
COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called <b>settings</b>, bottom right there is a field called <b>Export Key</b>."
|
||||
@ -50,6 +51,7 @@ COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S="The package key is: %s"
|
||||
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="The private key field could not be loaded for <b>%s</b> server!"
|
||||
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for <b>%s</b> server!"
|
||||
COM_COMPONENTBUILDER_THE_SERVER_DETAILS_FOR_BID_SB_COULD_NOT_BE_RETRIEVED="The server details for <b>(ID: %s)</b> could not be retrieved!"
|
||||
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!"
|
||||
COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key."
|
||||
COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the <b>JCB Global Options</b>, go to the <b>Company</b> tab and add the correct company details there."
|
||||
COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there."
|
||||
|
Loading…
Reference in New Issue
Block a user