primo commit
This commit is contained in:
101
plugins/editors-xtd/tabulizer/tabulizer.php
Normal file
101
plugins/editors-xtd/tabulizer/tabulizer.php
Normal file
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 6.2.6 tabulizer $
|
||||
* @package tabulizer
|
||||
* @copyright Copyright © 2011 - All rights reserved.
|
||||
* @license GNU/GPL
|
||||
* @author Dimitrios Mourloukos
|
||||
* @author mail info@alterora.gr
|
||||
* @website www.tabulizer.com
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
jimport( 'joomla.plugin.plugin' );
|
||||
|
||||
if(!defined('DS')){define('DS',DIRECTORY_SEPARATOR);}
|
||||
|
||||
|
||||
class plgButtonTabulizer extends JPlugin
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct(& $subject, $config)
|
||||
{
|
||||
parent::__construct($subject, $config);
|
||||
$this->loadLanguage();
|
||||
}
|
||||
|
||||
public function onDisplay($name, $asset = null, $author = null)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
|
||||
$doc = JFactory::getDocument();
|
||||
$template = $app->getTemplate();
|
||||
|
||||
$tabulizer_directive_add_comments = 0;
|
||||
|
||||
require_once(JPATH_ADMINISTRATOR.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_tabulizer'.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'common'.DIRECTORY_SEPARATOR.'helper.php');
|
||||
$no_use_permissions = (TabulizerPermissions::isAllowed('ruleset-use'))?0:1;
|
||||
$no_use_permissions_warning_msg = TabulizerString::makeHTMLSafe(JText::_('PLG_TABULIZER_RULESET_USE_PERMISSION_INVALID'));
|
||||
|
||||
$popup_url = JURI::base() . 'index.php?option=com_tabulizer&task=dialog&tmpl=component&use_comments='.$tabulizer_directive_add_comments;
|
||||
|
||||
$tinymce_warning_msg = JText::_('PLG_TABULIZER_INVALID_EDITOR');
|
||||
|
||||
$js = "
|
||||
function tabulizerClickCallback( editor, result )
|
||||
{
|
||||
if( result ) {
|
||||
jInsertEditorText( result, editor );
|
||||
}
|
||||
}
|
||||
|
||||
function tabulizerOpenDialog( editor )
|
||||
{
|
||||
if ($no_use_permissions) {
|
||||
alert('{$no_use_permissions_warning_msg}');
|
||||
return;
|
||||
}
|
||||
var durl = '{$popup_url}&clb_name=' + editor;
|
||||
var wnd = window.open( durl, '_blank', 'status=no,resizable=yes,scrollbars=1,width=720,height=710,left=50,top=20' );
|
||||
wnd.focus();
|
||||
return wnd;
|
||||
}
|
||||
";
|
||||
|
||||
$doc->addScriptDeclaration($js);
|
||||
|
||||
if(version_compare(JVERSION,'1.6.0','ge')) {
|
||||
// Joomla! 1.6 code here
|
||||
$plugin_dir = 'plugins/editors-xtd/tabulizer/tabulizer';
|
||||
} else {
|
||||
// Joomla! 1.5 code here
|
||||
$plugin_dir = 'plugins/editors-xtd/tabulizer';
|
||||
}
|
||||
|
||||
$css = " .button2-left .Tabulizer { background: url(../{$plugin_dir}/images/tabulizer_button.png) 100% 0 no-repeat; } \n";
|
||||
$css .= " .icon-Tabulizer { background: url(../{$plugin_dir}/images/tabulizer_button_j3.png) 100% 0 no-repeat; } \n";
|
||||
|
||||
$doc->addStyleDeclaration($css);
|
||||
|
||||
$button = new JObject();
|
||||
$button->set('modal', false);
|
||||
$button->set('onclick', 'tabulizerOpenDialog(\''.$name.'\'); return false;');
|
||||
$button->set('text', JText::_('PLG_TABULIZER_BUTTON_LABEL'));
|
||||
$button->set('name', 'Tabulizer');
|
||||
$button->set('link', '#');
|
||||
if(version_compare(JVERSION,'3.1.0','ge')) {
|
||||
$button->set('class','btn');
|
||||
}
|
||||
|
||||
return $button;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
35
plugins/editors-xtd/tabulizer/tabulizer.xml
Normal file
35
plugins/editors-xtd/tabulizer/tabulizer.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="plugin" version="1.5" group="editors-xtd" method="upgrade">
|
||||
<name>Button - Tabulizer</name>
|
||||
<creationDate>2019-01-17</creationDate>
|
||||
<copyright>Copyright (C) 2011. All rights reserved.</copyright>
|
||||
<license>GNU General Public License</license>
|
||||
<author>Dimitrios Mourloukos</author>
|
||||
<authorEmail>info@alterora.gr</authorEmail>
|
||||
<authorUrl>www.tabulizer.gr</authorUrl>
|
||||
<version>6.2.6</version>
|
||||
|
||||
<description>PLG_TABULIZER_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename plugin="tabulizer">tabulizer.php</filename>
|
||||
<folder>tabulizer</folder>
|
||||
</files>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/en-GB.plg_editors-xtd_tabulizer.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_editors-xtd_tabulizer.sys.ini</language>
|
||||
</languages>
|
||||
|
||||
<params>
|
||||
<param name="tabulizer-ruleset-use" type="usergroup" default="25" label="PLG_TABULIZER_RULESET_USE_PERMISSION_LABEL" description="PLG_TABULIZER_RULESET_USE_PERMISSION_DESCRIPTION" multiple="yes" />
|
||||
<param name="tabulizer-ruleset-view" type="usergroup" default="25" label="PLG_TABULIZER_RULESET_VIEW_PERMISSION_LABEL" description="PLG_TABULIZER_RULESET_VIEW_PERMISSION_DESCRIPTION" multiple="yes" />
|
||||
<param name="tabulizer-ruleset-edit" type="usergroup" default="25" label="PLG_TABULIZER_RULESET_EDIT_PERMISSION_LABEL" description="PLG_TABULIZER_RULESET_EDIT_PERMISSION_DESCRIPTION" multiple="yes" />
|
||||
<param name="tabulizer-ruleset-import" type="usergroup" default="25" label="PLG_TABULIZER_RULESET_IMPORT_PERMISSION_LABEL" description="PLG_TABULIZER_RULESET_IMPORT_PERMISSION_DESCRIPTION" multiple="yes" />
|
||||
<param name="tabulizer-ruleset-export" type="usergroup" default="25" label="PLG_TABULIZER_RULESET_EXPORT_PERMISSION_LABEL" description="PLG_TABULIZER_RULESET_EXPORT_PERMISSION_DESCRIPTION" multiple="yes" />
|
||||
<param name="tabulizer-datasource-view" type="usergroup" default="25" label="PLG_TABULIZER_DATASOURCE_VIEW_PERMISSION_LABEL" description="PLG_TABULIZER_DATASOURCE_VIEW_PERMISSION_DESCRIPTION" multiple="yes" />
|
||||
<param name="tabulizer-datasource-edit" type="usergroup" default="25" label="PLG_TABULIZER_DATASOURCE_EDIT_PERMISSION_LABEL" description="PLG_TABULIZER_DATASOURCE_EDIT_PERMISSION_DESCRIPTION" multiple="yes" />
|
||||
<param name="tabulizer-datasource-import" type="usergroup" default="25" label="PLG_TABULIZER_DATASOURCE_IMPORT_PERMISSION_LABEL" description="PLG_TABULIZER_DATASOURCE_IMPORT_PERMISSION_DESCRIPTION" multiple="yes" />
|
||||
<param name="tabulizer-datasource-export" type="usergroup" default="25" label="PLG_TABULIZER_DATASOURCE_EXPORT_PERMISSION_LABEL" description="PLG_TABULIZER_DATASOURCE_EXPORT_PERMISSION_DESCRIPTION" multiple="yes" />
|
||||
<param name="tabulizer-data-import" type="usergroup" default="25" label="PLG_TABULIZER_DATA_IMPORT_PERMISSION_LABEL" description="PLG_TABULIZER_DATA_IMPORT_PERMISSION_DESCRIPTION" multiple="yes" />
|
||||
</params>
|
||||
|
||||
</extension>
|
||||
1572
plugins/editors-xtd/tabulizer/tabulizer/assets/class.php
Normal file
1572
plugins/editors-xtd/tabulizer/tabulizer/assets/class.php
Normal file
File diff suppressed because it is too large
Load Diff
89
plugins/editors-xtd/tabulizer/tabulizer/assets/helper.php
Normal file
89
plugins/editors-xtd/tabulizer/tabulizer/assets/helper.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 6.2.6 tabulizer $
|
||||
* @package tabulizer
|
||||
* @copyright Copyright © 2011 - All rights reserved.
|
||||
* @license GNU/GPL
|
||||
* @author Dimitrios Mourloukos
|
||||
* @author mail info@alterora.gr
|
||||
* @website www.tabulizer.com
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class TabulizerMath {
|
||||
function parseInt($ptString) {
|
||||
if (strlen($ptString) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$regex = '/^[-+]?[0-9]+$/';
|
||||
if (preg_match($regex,$ptString,$matches)) {
|
||||
return intval($ptString);
|
||||
} else return false;
|
||||
}
|
||||
|
||||
function parseFloat($ptString) {
|
||||
$pString = trim($ptString);
|
||||
if (strlen($ptString) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (substr_count($pString, ",") > 1)
|
||||
$pString = str_replace(",", "", $pString);
|
||||
|
||||
if (substr_count($pString, ".") > 1)
|
||||
$pString = str_replace(".", "", $pString);
|
||||
|
||||
$pregResult = array();
|
||||
|
||||
$commaset = strpos($pString,',');
|
||||
if ($commaset === false) {$commaset = -1;}
|
||||
|
||||
$pointset = strpos($pString,'.');
|
||||
if ($pointset === false) {$pointset = -1;}
|
||||
|
||||
$pregResultA = array();
|
||||
$pregResultB = array();
|
||||
|
||||
if ($pointset < $commaset) {
|
||||
preg_match('#^(([-]?[0-9]+(\.[0-9])?)+(,[0-9]+)?)$#', $pString, $pregResultA);
|
||||
}
|
||||
preg_match('#^(([-]?[0-9]+(,[0-9])?)+(\.[0-9]+)?)$#', $pString, $pregResultB);
|
||||
if ((isset($pregResultA[0]) && (!isset($pregResultB[0])
|
||||
|| strstr($preResultA[0],$pregResultB[0]) == 0
|
||||
|| !$pointset))) {
|
||||
$numberString = $pregResultA[0];
|
||||
$numberString = str_replace('.','',$numberString);
|
||||
$numberString = str_replace(',','.',$numberString);
|
||||
}
|
||||
elseif (isset($pregResultB[0]) && (!isset($pregResultA[0])
|
||||
|| strstr($pregResultB[0],$preResultA[0]) == 0
|
||||
|| !$commaset)) {
|
||||
$numberString = $pregResultB[0];
|
||||
$numberString = str_replace(',','',$numberString);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
$result = (float)$numberString;
|
||||
return $result;
|
||||
}
|
||||
|
||||
function getNumericValue($str) {
|
||||
//$value = str_replace(array('<27>','$','€'), array(' ',' ',' '), $value);
|
||||
|
||||
$value = self::parseInt($str);
|
||||
if ($value !== false) return $value;
|
||||
|
||||
$value = self::parseFloat($str);
|
||||
if ($value !== false) return $value;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 974 B |
Binary file not shown.
|
After Width: | Height: | Size: 777 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 739 B |
242
plugins/editors-xtd/tabulizer/tabulizer/defines.php
Normal file
242
plugins/editors-xtd/tabulizer/tabulizer/defines.php
Normal file
@ -0,0 +1,242 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 6.2.6 tabulizer $
|
||||
* @package tabulizer
|
||||
* @copyright Copyright © 2011 - All rights reserved.
|
||||
* @license GNU/GPL
|
||||
* @author Dimitrios Mourloukos
|
||||
* @author mail info@alterora.gr
|
||||
* @website www.tabulizer.com
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// ENCODING
|
||||
if (!function_exists('mb_internal_encoding')) {
|
||||
$mbstring_error_msg = 'MBString library is missing! Tabulizer requires the MBString PHP extension in order to run properly. Please ask your system administrator to install it for you. Alternatively, if you are using the standard latin alphabet and you do not need multibyte character support you can use the Tabulizer\'s MBString proxy implementation. You can enable this feature by setting to YES the related parameter of the "Button - Tabulizer" editors-xtd plugin.';
|
||||
$mbstring_proxy_enabled = 1;
|
||||
if ($mbstring_proxy_enabled) {
|
||||
if (!defined('MBSTRING_PROXY')) {
|
||||
// MBString is not installed/enabled by default
|
||||
function mb_internal_encoding($encoding = "UTF-8") {
|
||||
// do nothing
|
||||
}
|
||||
function mb_regex_encoding($encoding = "UTF-8") {
|
||||
// do nothing
|
||||
}
|
||||
function mb_strtoupper ($str, $encoding = "UTF-8") {
|
||||
return strtoupper($str);
|
||||
}
|
||||
function mb_strpos ($haystack , $needle, $offset = 0, $encoding = "UTF-8") {
|
||||
return strpos ($haystack, $needle, $offset);
|
||||
}
|
||||
function mb_stripos ($haystack , $needle, $offset = 0, $encoding = "UTF-8") {
|
||||
return stripos ($haystack, $needle, $offset);
|
||||
}
|
||||
function mb_strlen($str, $encoding = "UTF-8") {
|
||||
return strlen($str);
|
||||
}
|
||||
function mb_substr($str, $start, $length = NULL, $encoding = "UTF-8") {
|
||||
if (empty($length)) return substr($str, $start);
|
||||
else return substr($str, $start, $length);
|
||||
}
|
||||
function mb_ereg($pattern, $string, &$regs = NULL) {
|
||||
if (!empty($regs)) {
|
||||
return ereg($pattern,$string,$regs);
|
||||
} else {
|
||||
return ereg($pattern,$string);
|
||||
}
|
||||
}
|
||||
function mb_eregi($pattern, $string, &$regs = NULL) {
|
||||
if (!empty($regs)) {
|
||||
return eregi($pattern,$string,$regs);
|
||||
} else {
|
||||
return eregi($pattern,$string);
|
||||
}
|
||||
}
|
||||
function mb_ereg_replace($pattern, $replacement, $string) {
|
||||
return ereg_replace($pattern, $replacement, $string);
|
||||
}
|
||||
function mb_eregi_replace($pattern, $replacement, $string) {
|
||||
return eregi_replace($pattern, $replacement, $string);
|
||||
}
|
||||
function mb_convert_encoding ($str,$to_encoding = NULL,$from_encoding=NULL) {
|
||||
global $mbstring_error_msg;
|
||||
exit($mbstring_error_msg);
|
||||
}
|
||||
define('MBSTRING_PROXY',1);
|
||||
}
|
||||
} else {
|
||||
exit($mbstring_error_msg);
|
||||
}
|
||||
} else {
|
||||
mb_internal_encoding("UTF-8");
|
||||
mb_regex_encoding("UTF-8");
|
||||
}
|
||||
|
||||
// DIRECTORIES
|
||||
if (!defined('DS')) define( 'DS', DIRECTORY_SEPARATOR );
|
||||
|
||||
define('TABULIZER_APP_VERSION','4.0.0');
|
||||
|
||||
define('RULES_DIR','templates/tabulizer/');
|
||||
define('RULES_XML_DIR', RULES_DIR .'rules/');
|
||||
define('RULES_CSS_DIR', RULES_DIR .'css/');
|
||||
define('RULES_CALC_DIR', RULES_DIR .'calc/');
|
||||
define('RULES_IMAGE_DIR', RULES_DIR .'images/');
|
||||
define('RULES_UPLOAD_DIR','tmp/');
|
||||
define('SHEET_UPLOAD_DIR','tmp/');
|
||||
|
||||
if (!defined('XML_FILE_EXT')) define('XML_FILE_EXT','.xml');
|
||||
|
||||
// STYLE INCLUDE PREFIX
|
||||
define('TABULIZER_INCLUDE_STYLE_PREFIX','{tabulizer:style[%s]}');
|
||||
define('TABULIZER_INCLUDE_STYLE_REGEX','/{tabulizer:style\[(.+)\]}/i');
|
||||
|
||||
// COLUMNS SEPARATORS
|
||||
define('SEPARATOR_COMMA','cm');
|
||||
define('SEPARATOR_SEMICOLON','sc');
|
||||
define('SEPARATOR_SPACE','sp');
|
||||
define('SEPARATOR_TAB','tb');
|
||||
define('SEPARATOR_ASTERISK','as');
|
||||
define('SEPARATOR_CARET','cr');
|
||||
|
||||
// COLUMN ENCLOSURES
|
||||
define('ENCLOSURE_DOUBLE_QUOTES','dq');
|
||||
define('ENCLOSURE_SINGLE_QUOTES','sq');
|
||||
define('ENCLOSURE_NONE','none');
|
||||
|
||||
// ROWS SEPARATOS
|
||||
define('SEPARATOR_NEWLLINE','[NEWLINEROW]');
|
||||
|
||||
// DATA TYPES
|
||||
define('DATA_TYPE_SEPARATOR','^');
|
||||
define('DATA_TYPE_UNDEFINED',0);
|
||||
define('DATA_TYPE_TEXT',100);
|
||||
define('DATA_TYPE_NUMERIC',300);
|
||||
define('DATA_TYPE_CURRENCY',400);
|
||||
define('DATA_TYPE_DATE',500);
|
||||
|
||||
// FORMAT
|
||||
define('FORMAT_TEXT_UPPERCASE',110); // HELLO WORLD
|
||||
define('FORMAT_TEXT_LOWERCASE',112); // hello world
|
||||
define('FORMAT_TEXT_UCFIRST',113); // Hello world
|
||||
define('FORMAT_TEXT_UCWORDS',114); // Hello World
|
||||
|
||||
define('FORMAT_DATE_DDMMYY_1',510); // 21-10-09
|
||||
define('FORMAT_DATE_DDMMYY_2',511); // 21/10/09
|
||||
define('FORMAT_DATE_MMDDYY_1',520); // 10-21-09
|
||||
define('FORMAT_DATE_MMDDYY_2',521); // 10/21/09
|
||||
define('FORMAT_DATE_DDMMYYYY_1',530); // 21-10-2009
|
||||
define('FORMAT_DATE_DDMMYYYY_2',531); // 21/10/2009
|
||||
define('FORMAT_DATE_DDMMYYYY_3',531); // 21/Oct/2009
|
||||
define('FORMAT_DATE_MMDDYYYY_1',540); // 10-21-2009
|
||||
define('FORMAT_DATE_MMDDYYYY_2',541); // 10/21/2009
|
||||
define('FORMAT_DATE_MMDDYYYY_3',542); // Jan 1, 2009
|
||||
define('FORMAT_DATE_dDDMMYYYY_1',550); // Monday, 21-Oct-2009
|
||||
define('FORMAT_DATE_dDDMMYYYY_2',551); // Monday, 21/Oct/2009
|
||||
define('FORMAT_DATE_dMMDDYYYY_1',560); // Monday, Oct 1, 2009
|
||||
define('FORMAT_DATE_dMMDDYYYY_2',561); // Monday, 21-Oct-2009
|
||||
define('FORMAT_DATE_dDDm_1',570); // Monday, 21 October
|
||||
define('FORMAT_DATE_dmDD_1',575); // Monday, October 21
|
||||
|
||||
define('FORMAT_NUMERIC_SEPARATOR','*');
|
||||
define('FORMAT_NUMERIC_DEC_POINT_COMMA',1);
|
||||
define('FORMAT_NUMERIC_DEC_POINT_PERIOD',2);
|
||||
|
||||
define('FORMAT_CURRENCY_SEPARATOR','*');
|
||||
define('FORMAT_CURRENCY_SYMBOL_ORDER_NONE',0);
|
||||
define('FORMAT_CURRENCY_SYMBOL_ORDER_BEFORE',1);
|
||||
define('FORMAT_CURRENCY_SYMBOL_ORDER_AFTER',2);
|
||||
|
||||
// REPLACEMENT
|
||||
define('REPLACEMENT_SEPARATOR','^RWS^');
|
||||
|
||||
// CALCULATION
|
||||
define('CALCULATION_NONE',0);
|
||||
define('CALCULATION_ADD_ABOVE',110);
|
||||
define('CALCULATION_ADD_BELOW',120);
|
||||
define('CALCULATION_ADD_LEFT',130);
|
||||
define('CALCULATION_ADD_RIGHT',140);
|
||||
define('CALCULATION_MUL_ABOVE',210);
|
||||
define('CALCULATION_MUL_BELOW',220);
|
||||
define('CALCULATION_MUL_LEFT',230);
|
||||
define('CALCULATION_MUL_RIGHT',240);
|
||||
define('CALCULATION_AVG_ABOVE',310);
|
||||
define('CALCULATION_AVG_BELOW',320);
|
||||
define('CALCULATION_AVG_LEFT',330);
|
||||
define('CALCULATION_AVG_RIGHT',340);
|
||||
define('CALCULATION_MED_ABOVE',410);
|
||||
define('CALCULATION_MED_BELOW',420);
|
||||
define('CALCULATION_MED_LEFT',430);
|
||||
define('CALCULATION_MED_RIGHT',440);
|
||||
define('CALCULATION_MIN_ABOVE',510);
|
||||
define('CALCULATION_MIN_BELOW',520);
|
||||
define('CALCULATION_MIN_LEFT',530);
|
||||
define('CALCULATION_MIN_RIGHT',540);
|
||||
define('CALCULATION_MAX_ABOVE',610);
|
||||
define('CALCULATION_MAX_BELOW',620);
|
||||
define('CALCULATION_MAX_LEFT',630);
|
||||
define('CALCULATION_MAX_RIGHT',640);
|
||||
|
||||
define('CALCULATION_SEP','$');
|
||||
|
||||
// RANGE SEPARATORS
|
||||
define('RANGE_FILTER_SEP','#');
|
||||
define('RANGE_EXCLUDE_SEP','^');
|
||||
|
||||
// FILE SIZES AND OTHER LIMITS
|
||||
define('MAX_UPLOAD_SHEET_FILE_SIZE',2097152); // in bytes
|
||||
|
||||
// ERROR CODES
|
||||
define('ERROR_CODE_PREFIX','ERROR');
|
||||
define('ERROR_CODE_NO_ROWS','<7>');
|
||||
define('ERROR_CODE_NUM_OF_COLUMN_DISCREPANCY','<13>');
|
||||
|
||||
define('DEBUG_FILENAME','tmp/debug.txt');
|
||||
|
||||
// FUNCTIONS
|
||||
function getNumericPoint($point) {
|
||||
switch ($point) {
|
||||
case FORMAT_NUMERIC_DEC_POINT_COMMA: return ',';
|
||||
case FORMAT_NUMERIC_DEC_POINT_PERIOD: return '.';
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
function increaseProcessingLimits($memory_size = 64, $execution_time = 120) {
|
||||
$size = intval(str_replace('M','',ini_get('memory_limit')));
|
||||
while ($size < $memory_size) {
|
||||
$success = ini_set('memory_limit',$memory_size . 'M'); // in MB
|
||||
if (!$success) $memory_size = $memory_size / 2;
|
||||
else break;
|
||||
}
|
||||
$time = intval(ini_get('max_execution_time'));
|
||||
if ($time <= $execution_time) {
|
||||
ini_set('max_execution_time', $execution_time); // in seconds
|
||||
}
|
||||
}
|
||||
|
||||
function memoryUsage($output = 'display') {
|
||||
$peak_usage = (memory_get_peak_usage(true) / 1024 / 1024);
|
||||
$msg = "Peak memory usage: {$peak_usage} MB";
|
||||
debugMsg($msg, $output);
|
||||
}
|
||||
|
||||
function debugMsg($msg, $output = 'display', $filename = null) {
|
||||
if (($output == 'display')||($output == 'both')) {
|
||||
echo "{$msg}<br>\n";
|
||||
}
|
||||
if (($output == 'file')||($output == 'both')) {
|
||||
if (empty($filename)) $filename = JPATH_SITE .DIRECTORY_SEPARATOR. DEBUG_FILENAME;
|
||||
$timestamp = date('Y-m-d H:i:s');
|
||||
file_put_contents($filename, "{$timestamp} {$msg}\n", FILE_APPEND);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
4
plugins/editors-xtd/tabulizer/tabulizer/helper.js
Normal file
4
plugins/editors-xtd/tabulizer/tabulizer/helper.js
Normal file
@ -0,0 +1,4 @@
|
||||
/* helper.js */
|
||||
|
||||
|
||||
|
||||
4
plugins/editors-xtd/tabulizer/tabulizer/index.html
Normal file
4
plugins/editors-xtd/tabulizer/tabulizer/index.html
Normal file
@ -0,0 +1,4 @@
|
||||
<html>
|
||||
<body bgcolor="#FFFFFF">
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,29 @@
|
||||
TABULIZER_TXTBUTTON=Tabulize!
|
||||
|
||||
TABULIZER INSTRUCTIONS=Please follow the steps bellow:<ol><li>Type or paste the table data in plain text format in the <em>%s</em> box</li><li>Select the proper <em>column separator</em> and the appropriate <em>ruleset</em> (or leave the default choices)</li><li>Click on the <strong>%s</strong> button to produce the HTML formatted table</li><li>Click on the <strong>%s</strong> button to insert the produced HTML code into the editor content</li></ol>
|
||||
|
||||
TABULIZER TITLE=Tabulizer
|
||||
COLUMN SEPARATOR=Column Seperator
|
||||
COMMA SEPARATOR=Comma (,)
|
||||
SEMICOLON SEPARATOR=Semicolon (;)
|
||||
ASTERISK SEPARATOR=Asterisk (*)
|
||||
CARET SEPARATOR=Caret (^)
|
||||
SPACE SEPARATOR=Space
|
||||
TAB SEPARATOR=Tab
|
||||
|
||||
RULESET NAME=Ruleset
|
||||
HEADER PRESENT=First row is header
|
||||
TABLE SUFFIX=Table suffix
|
||||
TABLE TEXT=Input Text
|
||||
TABLE HTML=Output HTML Code
|
||||
NONE=None
|
||||
|
||||
CONVERT TABLE=Convert
|
||||
INSERT TABLE=Insert
|
||||
CANCEL CONVERSION=Close
|
||||
|
||||
NO CONVERSION UTILITY=Unable to access conversion form. Make sure the Tabulizer plugin is installed correctly.
|
||||
CONVERSION ERRORS FOUND=Please correct the following errors before you try to convert the input text again:
|
||||
NO INPUT TEXT=No input text to convert!
|
||||
COLUMNS COUNT DISCREPANCY=The number of columns must be the same on each row. Please make sure the column seperator in not used in the field value of any column.
|
||||
INVALID SEPARATOR=invalid separator code!
|
||||
Reference in New Issue
Block a user