Merge remote-tracking branch 'refs/remotes/friendica/develop' into develop
This commit is contained in:
commit
be7041c3e0
|
@ -0,0 +1,10 @@
|
||||||
|
# editorconfig tool configuration
|
||||||
|
# see http://editorconfig.org for docs
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
trim_trailing_whitespaces = true
|
||||||
|
indent_style = tab
|
|
@ -64,5 +64,34 @@ If you only want to translate friendica into another language you wont need any
|
||||||
|
|
||||||
For further information see the utils/README file.
|
For further information see the utils/README file.
|
||||||
|
|
||||||
[1]: https://www.transifex.com/projects/p/friendica/
|
Transifex-Client
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Transifex has a client program which let you interact with the translation files in a similar way to git.
|
||||||
|
Help for the client can be found at the [Transifex Help Center] [2].
|
||||||
|
Here we will only cover basic usage.
|
||||||
|
|
||||||
|
After installation of the client, you should have a `tx` command available on your system.
|
||||||
|
To use it, first create a configuration file with your credentials.
|
||||||
|
On Linux this file should be placed into your home directory `~/.transifexrc`.
|
||||||
|
The content of the file should be something like the following:
|
||||||
|
|
||||||
|
[https://www.transifex.com]
|
||||||
|
username = user
|
||||||
|
token =
|
||||||
|
password = p@ssw0rd
|
||||||
|
hostname = https://www.transifex.com
|
||||||
|
|
||||||
|
Since Friendica version 3.5.1 we ship configuration files for the Transifex client in the core repository and the addon repository.
|
||||||
|
To update the translation files after you have translated strings of e.g. Esperanto in the web-UI of transifex you can use `tx` to download the file.
|
||||||
|
|
||||||
|
$> tx pull -l eo
|
||||||
|
|
||||||
|
And then use the `po2php` utility described above to convert the `messages.po` file to the `strings.php` file Friendica is loading.
|
||||||
|
|
||||||
|
$> php util/po2php.php view/lang/eo/messages.po
|
||||||
|
|
||||||
|
Afterwards, just commit the two changed files to a feature branch of your Friendica repository, push the changes to github and open a pull request for your changes.
|
||||||
|
|
||||||
|
[1]: https://www.transifex.com/projects/p/friendica/
|
||||||
|
[2]: https://docs.transifex.com/client/introduction
|
||||||
|
|
63
boot.php
63
boot.php
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
require_once('include/autoloader.php');
|
require_once('include/autoloader.php');
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once('include/config.php');
|
require_once('include/config.php');
|
||||||
require_once('include/network.php');
|
require_once('include/network.php');
|
||||||
require_once('include/plugin.php');
|
require_once('include/plugin.php');
|
||||||
|
@ -38,7 +40,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDICA_CODENAME', 'Asparagus');
|
define ( 'FRIENDICA_CODENAME', 'Asparagus');
|
||||||
define ( 'FRIENDICA_VERSION', '3.5.1-dev' );
|
define ( 'FRIENDICA_VERSION', '3.5.1-dev' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1212 );
|
define ( 'DB_UPDATE_VERSION', 1214 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constant with a HTML line break.
|
* @brief Constant with a HTML line break.
|
||||||
|
@ -243,6 +245,7 @@ define ( 'NETWORK_STATUSNET', 'stac'); // Statusnet connector
|
||||||
define ( 'NETWORK_APPNET', 'apdn'); // app.net
|
define ( 'NETWORK_APPNET', 'apdn'); // app.net
|
||||||
define ( 'NETWORK_NEWS', 'nntp'); // Network News Transfer Protocol
|
define ( 'NETWORK_NEWS', 'nntp'); // Network News Transfer Protocol
|
||||||
define ( 'NETWORK_ICALENDAR', 'ical'); // iCalendar
|
define ( 'NETWORK_ICALENDAR', 'ical'); // iCalendar
|
||||||
|
define ( 'NETWORK_PNUT', 'pnut'); // pnut.io
|
||||||
define ( 'NETWORK_PHANTOM', 'unkn'); // Place holder
|
define ( 'NETWORK_PHANTOM', 'unkn'); // Place holder
|
||||||
/** @}*/
|
/** @}*/
|
||||||
|
|
||||||
|
@ -272,6 +275,7 @@ $netgroup_ids = array(
|
||||||
NETWORK_APPNET => (-17),
|
NETWORK_APPNET => (-17),
|
||||||
NETWORK_NEWS => (-18),
|
NETWORK_NEWS => (-18),
|
||||||
NETWORK_ICALENDAR => (-19),
|
NETWORK_ICALENDAR => (-19),
|
||||||
|
NETWORK_PNUT => (-20),
|
||||||
|
|
||||||
NETWORK_PHANTOM => (-127),
|
NETWORK_PHANTOM => (-127),
|
||||||
);
|
);
|
||||||
|
@ -530,7 +534,6 @@ class App {
|
||||||
public $videoheight = 350;
|
public $videoheight = 350;
|
||||||
public $force_max_items = 0;
|
public $force_max_items = 0;
|
||||||
public $theme_thread_allow = true;
|
public $theme_thread_allow = true;
|
||||||
public $theme_richtext_editor = true;
|
|
||||||
public $theme_events_in_profile = true;
|
public $theme_events_in_profile = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -571,7 +574,6 @@ class App {
|
||||||
|
|
||||||
private $scheme;
|
private $scheme;
|
||||||
private $hostname;
|
private $hostname;
|
||||||
private $baseurl;
|
|
||||||
private $db;
|
private $db;
|
||||||
|
|
||||||
private $curl_code;
|
private $curl_code;
|
||||||
|
@ -799,8 +801,6 @@ class App {
|
||||||
* - Host name is determined either by system.hostname or inferred from request
|
* - Host name is determined either by system.hostname or inferred from request
|
||||||
* - Path is inferred from SCRIPT_NAME
|
* - Path is inferred from SCRIPT_NAME
|
||||||
*
|
*
|
||||||
* Caches the result (depending on $ssl value) for performance.
|
|
||||||
*
|
|
||||||
* Note: $ssl parameter value doesn't directly correlate with the resulting protocol
|
* Note: $ssl parameter value doesn't directly correlate with the resulting protocol
|
||||||
*
|
*
|
||||||
* @param bool $ssl Whether to append http or https under SSL_POLICY_SELFSIGN
|
* @param bool $ssl Whether to append http or https under SSL_POLICY_SELFSIGN
|
||||||
|
@ -813,40 +813,28 @@ class App {
|
||||||
return self::$a->get_baseurl($ssl);
|
return self::$a->get_baseurl($ssl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Arbitrary values, the resulting url protocol can be different
|
|
||||||
$cache_index = $ssl ? 'https' : 'http';
|
|
||||||
|
|
||||||
// Cached value found, nothing to process
|
|
||||||
if (isset($this->baseurl[$cache_index])) {
|
|
||||||
return $this->baseurl[$cache_index];
|
|
||||||
}
|
|
||||||
|
|
||||||
$scheme = $this->scheme;
|
$scheme = $this->scheme;
|
||||||
|
|
||||||
if ((x($this->config, 'system')) && (x($this->config['system'], 'ssl_policy'))) {
|
if (Config::get('system', 'ssl_policy') == SSL_POLICY_FULL) {
|
||||||
if (intval($this->config['system']['ssl_policy']) === SSL_POLICY_FULL) {
|
|
||||||
$scheme = 'https';
|
$scheme = 'https';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Basically, we have $ssl = true on any links which can only be seen by a logged in user
|
// Basically, we have $ssl = true on any links which can only be seen by a logged in user
|
||||||
// (and also the login link). Anything seen by an outsider will have it turned off.
|
// (and also the login link). Anything seen by an outsider will have it turned off.
|
||||||
|
|
||||||
if ($this->config['system']['ssl_policy'] == SSL_POLICY_SELFSIGN) {
|
if (Config::get('system', 'ssl_policy') == SSL_POLICY_SELFSIGN) {
|
||||||
if ($ssl) {
|
if ($ssl) {
|
||||||
$scheme = 'https';
|
$scheme = 'https';
|
||||||
} else {
|
} else {
|
||||||
$scheme = 'http';
|
$scheme = 'http';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config::get('config', 'hostname') != '') {
|
||||||
|
$this->hostname = Config::get('config', 'hostname');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_config('config', 'hostname') != '') {
|
return $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
|
||||||
$this->hostname = get_config('config', 'hostname');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->baseurl[$cache_index] = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
|
|
||||||
|
|
||||||
return $this->baseurl[$cache_index];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -859,8 +847,6 @@ class App {
|
||||||
function set_baseurl($url) {
|
function set_baseurl($url) {
|
||||||
$parsed = @parse_url($url);
|
$parsed = @parse_url($url);
|
||||||
|
|
||||||
$this->baseurl = [];
|
|
||||||
|
|
||||||
if($parsed) {
|
if($parsed) {
|
||||||
$this->scheme = $parsed['scheme'];
|
$this->scheme = $parsed['scheme'];
|
||||||
|
|
||||||
|
@ -971,7 +957,6 @@ class App {
|
||||||
'$local_user' => local_user(),
|
'$local_user' => local_user(),
|
||||||
'$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION,
|
'$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION,
|
||||||
'$delitem' => t('Delete this item?'),
|
'$delitem' => t('Delete this item?'),
|
||||||
'$comment' => t('Comment'),
|
|
||||||
'$showmore' => t('show more'),
|
'$showmore' => t('show more'),
|
||||||
'$showfewer' => t('show fewer'),
|
'$showfewer' => t('show fewer'),
|
||||||
'$update_interval' => $interval,
|
'$update_interval' => $interval,
|
||||||
|
@ -1391,11 +1376,15 @@ class App {
|
||||||
// If the last worker fork was less than 10 seconds before then don't fork another one.
|
// If the last worker fork was less than 10 seconds before then don't fork another one.
|
||||||
// This should prevent the forking of masses of workers.
|
// This should prevent the forking of masses of workers.
|
||||||
if (get_config("system", "worker")) {
|
if (get_config("system", "worker")) {
|
||||||
if ((time() - get_config("system", "proc_run_started")) < 10)
|
$cachekey = "app:proc_run:started";
|
||||||
|
$result = Cache::get($cachekey);
|
||||||
|
if (!is_null($result)) {
|
||||||
|
if ((time() - $result) < 10) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Set the timestamp of the last proc_run
|
// Set the timestamp of the last proc_run
|
||||||
set_config("system", "proc_run_started", time());
|
Cache::set($cachekey, time(), CACHE_MINUTE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$args[0] = ((x($this->config,'php_path')) && (strlen($this->config['php_path'])) ? $this->config['php_path'] : 'php');
|
$args[0] = ((x($this->config,'php_path')) && (strlen($this->config['php_path'])) ? $this->config['php_path'] : 'php');
|
||||||
|
@ -1475,9 +1464,7 @@ function system_unavailable() {
|
||||||
|
|
||||||
function clean_urls() {
|
function clean_urls() {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
// if($a->config['system']['clean_urls'])
|
|
||||||
return true;
|
return true;
|
||||||
// return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function z_path() {
|
function z_path() {
|
||||||
|
@ -1571,7 +1558,7 @@ function update_db(App $a) {
|
||||||
$stored = intval($build);
|
$stored = intval($build);
|
||||||
$current = intval(DB_UPDATE_VERSION);
|
$current = intval(DB_UPDATE_VERSION);
|
||||||
if($stored < $current) {
|
if($stored < $current) {
|
||||||
load_config('database');
|
Config::load('database');
|
||||||
|
|
||||||
// We're reporting a different version than what is currently installed.
|
// We're reporting a different version than what is currently installed.
|
||||||
// Run any existing update scripts to bring the database up to current.
|
// Run any existing update scripts to bring the database up to current.
|
||||||
|
@ -2041,16 +2028,18 @@ function current_theme(){
|
||||||
// $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
|
// $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
|
||||||
$is_mobile = $a->is_mobile || $a->is_tablet;
|
$is_mobile = $a->is_mobile || $a->is_tablet;
|
||||||
|
|
||||||
$standard_system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
|
$standard_system_theme = Config::get('system', 'theme', '');
|
||||||
$standard_theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $standard_system_theme);
|
$standard_theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $standard_system_theme);
|
||||||
|
|
||||||
if($is_mobile) {
|
if ($is_mobile) {
|
||||||
if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {
|
if (isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {
|
||||||
$system_theme = $standard_system_theme;
|
$system_theme = $standard_system_theme;
|
||||||
$theme_name = $standard_theme_name;
|
$theme_name = $standard_theme_name;
|
||||||
|
} else {
|
||||||
|
$system_theme = Config::get('system', 'mobile-theme', '');
|
||||||
|
if ($system_theme == '') {
|
||||||
|
$system_theme = $standard_system_theme;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$system_theme = ((isset($a->config['system']['mobile-theme'])) ? $a->config['system']['mobile-theme'] : $standard_system_theme);
|
|
||||||
$theme_name = ((isset($_SESSION) && x($_SESSION,'mobile-theme')) ? $_SESSION['mobile-theme'] : $system_theme);
|
$theme_name = ((isset($_SESSION) && x($_SESSION,'mobile-theme')) ? $_SESSION['mobile-theme'] : $system_theme);
|
||||||
|
|
||||||
if($theme_name === '---') {
|
if($theme_name === '---') {
|
||||||
|
|
103
database.sql
103
database.sql
|
@ -1,6 +1,6 @@
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
-- Friendica 3.5.1-dev (Asparagus)
|
-- Friendica 3.5.1-dev (Asparagus)
|
||||||
-- DB_UPDATE_VERSION 1212
|
-- DB_UPDATE_VERSION 1213
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,13 +9,14 @@
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS `addon` (
|
CREATE TABLE IF NOT EXISTS `addon` (
|
||||||
`id` int(11) NOT NULL auto_increment,
|
`id` int(11) NOT NULL auto_increment,
|
||||||
`name` varchar(255) NOT NULL DEFAULT '',
|
`name` varchar(190) NOT NULL DEFAULT '',
|
||||||
`version` varchar(255) NOT NULL DEFAULT '',
|
`version` varchar(255) NOT NULL DEFAULT '',
|
||||||
`installed` tinyint(1) NOT NULL DEFAULT 0,
|
`installed` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`hidden` tinyint(1) NOT NULL DEFAULT 0,
|
`hidden` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`timestamp` bigint(20) NOT NULL DEFAULT 0,
|
`timestamp` bigint(20) NOT NULL DEFAULT 0,
|
||||||
`plugin_admin` tinyint(1) NOT NULL DEFAULT 0,
|
`plugin_admin` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`),
|
||||||
|
UNIQUE INDEX `name` (`name`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -55,11 +56,10 @@ CREATE TABLE IF NOT EXISTS `auth_codes` (
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS `cache` (
|
CREATE TABLE IF NOT EXISTS `cache` (
|
||||||
`k` varbinary(255) NOT NULL,
|
`k` varbinary(255) NOT NULL,
|
||||||
`v` text,
|
`v` mediumtext,
|
||||||
`expire_mode` int(11) NOT NULL DEFAULT 0,
|
`expire_mode` int(11) NOT NULL DEFAULT 0,
|
||||||
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
PRIMARY KEY(`k`),
|
PRIMARY KEY(`k`),
|
||||||
INDEX `updated` (`updated`),
|
|
||||||
INDEX `expire_mode_updated` (`expire_mode`,`updated`)
|
INDEX `expire_mode_updated` (`expire_mode`,`updated`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ CREATE TABLE IF NOT EXISTS `config` (
|
||||||
`id` int(10) unsigned NOT NULL auto_increment,
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
`cat` varbinary(255) NOT NULL DEFAULT '',
|
`cat` varbinary(255) NOT NULL DEFAULT '',
|
||||||
`k` varbinary(255) NOT NULL DEFAULT '',
|
`k` varbinary(255) NOT NULL DEFAULT '',
|
||||||
`v` text,
|
`v` mediumtext,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
UNIQUE INDEX `cat_k` (`cat`,`k`)
|
UNIQUE INDEX `cat_k` (`cat`,`k`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
@ -172,18 +172,20 @@ CREATE TABLE IF NOT EXISTS `contact` (
|
||||||
`bd` date NOT NULL DEFAULT '0000-00-00',
|
`bd` date NOT NULL DEFAULT '0000-00-00',
|
||||||
`notify_new_posts` tinyint(1) NOT NULL DEFAULT 0,
|
`notify_new_posts` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`fetch_further_information` tinyint(1) NOT NULL DEFAULT 0,
|
`fetch_further_information` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`ffi_keyword_blacklist` mediumtext,
|
`ffi_keyword_blacklist` text,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid_name` (`uid`,`name`),
|
INDEX `uid_name` (`uid`,`name`),
|
||||||
INDEX `uid_self` (`uid`,`self`),
|
INDEX `self_uid` (`self`,`uid`),
|
||||||
INDEX `alias_uid` (`alias`(32),`uid`),
|
INDEX `alias_uid` (`alias`(32),`uid`),
|
||||||
INDEX `uid_pending` (`uid`,`pending`),
|
INDEX `pending_uid` (`pending`,`uid`),
|
||||||
INDEX `uid_blocked` (`uid`,`blocked`),
|
INDEX `blocked_uid` (`blocked`,`uid`),
|
||||||
INDEX `uid_rel_network_poll` (`uid`,`rel`,`network`,`poll`(64),`archive`),
|
INDEX `uid_rel_network_poll` (`uid`,`rel`,`network`,`poll`(64),`archive`),
|
||||||
INDEX `uid_network_batch` (`uid`,`network`,`batch`(64)),
|
INDEX `uid_network_batch` (`uid`,`network`,`batch`(64)),
|
||||||
INDEX `addr_uid` (`addr`(32),`uid`),
|
INDEX `addr_uid` (`addr`(32),`uid`),
|
||||||
INDEX `nurl_uid` (`nurl`(32),`uid`),
|
INDEX `nurl_uid` (`nurl`(32),`uid`),
|
||||||
INDEX `nick_uid` (`nick`(32),`uid`)
|
INDEX `nick_uid` (`nick`(32),`uid`),
|
||||||
|
INDEX `dfrn-id` (`dfrn-id`),
|
||||||
|
INDEX `issued-id` (`issued-id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -192,12 +194,12 @@ CREATE TABLE IF NOT EXISTS `contact` (
|
||||||
CREATE TABLE IF NOT EXISTS `conv` (
|
CREATE TABLE IF NOT EXISTS `conv` (
|
||||||
`id` int(10) unsigned NOT NULL auto_increment,
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
`guid` varchar(64) NOT NULL DEFAULT '',
|
`guid` varchar(64) NOT NULL DEFAULT '',
|
||||||
`recips` mediumtext,
|
`recips` text,
|
||||||
`uid` int(11) NOT NULL DEFAULT 0,
|
`uid` int(11) NOT NULL DEFAULT 0,
|
||||||
`creator` varchar(255) NOT NULL DEFAULT '',
|
`creator` varchar(255) NOT NULL DEFAULT '',
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`subject` mediumtext,
|
`subject` text,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid` (`uid`)
|
INDEX `uid` (`uid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
@ -264,7 +266,8 @@ CREATE TABLE IF NOT EXISTS `fcontact` (
|
||||||
`pubkey` text,
|
`pubkey` text,
|
||||||
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `addr` (`addr`(32))
|
INDEX `addr` (`addr`(32)),
|
||||||
|
INDEX `url` (`url`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -349,10 +352,11 @@ CREATE TABLE IF NOT EXISTS `gcontact` (
|
||||||
`generation` tinyint(3) NOT NULL DEFAULT 0,
|
`generation` tinyint(3) NOT NULL DEFAULT 0,
|
||||||
`server_url` varchar(255) NOT NULL DEFAULT '',
|
`server_url` varchar(255) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `nurl` (`nurl`(32)),
|
INDEX `nurl` (`nurl`(64)),
|
||||||
INDEX `name` (`name`(32)),
|
INDEX `name` (`name`(64)),
|
||||||
INDEX `nick` (`nick`(32)),
|
INDEX `nick` (`nick`(32)),
|
||||||
INDEX `addr` (`addr`(32)),
|
INDEX `addr` (`addr`(64)),
|
||||||
|
INDEX `hide_network_updated` (`hide`,`network`,`updated`),
|
||||||
INDEX `updated` (`updated`)
|
INDEX `updated` (`updated`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
@ -368,8 +372,7 @@ CREATE TABLE IF NOT EXISTS `glink` (
|
||||||
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
UNIQUE INDEX `cid_uid_gcid_zcid` (`cid`,`uid`,`gcid`,`zcid`),
|
UNIQUE INDEX `cid_uid_gcid_zcid` (`cid`,`uid`,`gcid`,`zcid`),
|
||||||
INDEX `gcid` (`gcid`),
|
INDEX `gcid` (`gcid`)
|
||||||
INDEX `zcid` (`zcid`)
|
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -394,8 +397,8 @@ CREATE TABLE IF NOT EXISTS `group_member` (
|
||||||
`gid` int(10) unsigned NOT NULL DEFAULT 0,
|
`gid` int(10) unsigned NOT NULL DEFAULT 0,
|
||||||
`contact-id` int(10) unsigned NOT NULL DEFAULT 0,
|
`contact-id` int(10) unsigned NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `cid_contactid` (`cid`,`contact-id`),
|
INDEX `contactid` (`contact-id`),
|
||||||
INDEX `uid_contactid` (`uid`,`contact-id`),
|
INDEX `gid_contactid` (`gid`,`contact-id`),
|
||||||
UNIQUE INDEX `uid_gid_contactid` (`uid`,`gid`,`contact-id`)
|
UNIQUE INDEX `uid_gid_contactid` (`uid`,`gid`,`contact-id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
@ -432,7 +435,7 @@ CREATE TABLE IF NOT EXISTS `hook` (
|
||||||
`function` varchar(255) NOT NULL DEFAULT '',
|
`function` varchar(255) NOT NULL DEFAULT '',
|
||||||
`priority` int(11) unsigned NOT NULL DEFAULT 0,
|
`priority` int(11) unsigned NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `hook_file_function` (`hook`(30),`file`(60),`function`(30))
|
UNIQUE INDEX `hook_file_function` (`hook`(50),`file`(80),`function`(60))
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -532,18 +535,13 @@ CREATE TABLE IF NOT EXISTS `item` (
|
||||||
INDEX `uid_created` (`uid`,`created`),
|
INDEX `uid_created` (`uid`,`created`),
|
||||||
INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`),
|
INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`),
|
||||||
INDEX `uid_network_received` (`uid`,`network`,`received`),
|
INDEX `uid_network_received` (`uid`,`network`,`received`),
|
||||||
INDEX `uid_received` (`uid`,`received`),
|
|
||||||
INDEX `uid_network_commented` (`uid`,`network`,`commented`),
|
INDEX `uid_network_commented` (`uid`,`network`,`commented`),
|
||||||
INDEX `uid_title` (`uid`,`title`),
|
|
||||||
INDEX `uid_thrparent` (`uid`,`thr-parent`),
|
INDEX `uid_thrparent` (`uid`,`thr-parent`),
|
||||||
INDEX `uid_parenturi` (`uid`,`parent-uri`),
|
INDEX `uid_parenturi` (`uid`,`parent-uri`),
|
||||||
INDEX `uid_contactid_id` (`uid`,`contact-id`,`id`),
|
|
||||||
INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
|
INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
|
||||||
INDEX `authorid_created` (`author-id`,`created`),
|
INDEX `authorid_created` (`author-id`,`created`),
|
||||||
INDEX `uid_uri` (`uid`,`uri`),
|
INDEX `uid_uri` (`uid`,`uri`),
|
||||||
INDEX `uid_wall_created` (`uid`,`wall`,`created`),
|
|
||||||
INDEX `resource-id` (`resource-id`),
|
INDEX `resource-id` (`resource-id`),
|
||||||
INDEX `uid_type` (`uid`,`type`),
|
|
||||||
INDEX `contactid_allowcid_allowpid_denycid_denygid` (`contact-id`,`allow_cid`(10),`allow_gid`(10),`deny_cid`(10),`deny_gid`(10)),
|
INDEX `contactid_allowcid_allowpid_denycid_denygid` (`contact-id`,`allow_cid`(10),`allow_gid`(10),`deny_cid`(10),`deny_gid`(10)),
|
||||||
INDEX `uid_type_changed` (`uid`,`type`,`changed`),
|
INDEX `uid_type_changed` (`uid`,`type`,`changed`),
|
||||||
INDEX `contactid_verb` (`contact-id`,`verb`),
|
INDEX `contactid_verb` (`contact-id`,`verb`),
|
||||||
|
@ -603,7 +601,6 @@ CREATE TABLE IF NOT EXISTS `mail` (
|
||||||
`parent-uri` varchar(255) NOT NULL DEFAULT '',
|
`parent-uri` varchar(255) NOT NULL DEFAULT '',
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid` (`uid`),
|
|
||||||
INDEX `uid_seen` (`uid`,`seen`),
|
INDEX `uid_seen` (`uid`,`seen`),
|
||||||
INDEX `convid` (`convid`),
|
INDEX `convid` (`convid`),
|
||||||
INDEX `uri` (`uri`(64)),
|
INDEX `uri` (`uri`(64)),
|
||||||
|
@ -638,7 +635,7 @@ CREATE TABLE IF NOT EXISTS `manage` (
|
||||||
`uid` int(11) NOT NULL DEFAULT 0,
|
`uid` int(11) NOT NULL DEFAULT 0,
|
||||||
`mid` int(11) NOT NULL DEFAULT 0,
|
`mid` int(11) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid_mid` (`uid`,`mid`)
|
UNIQUE INDEX `uid_mid` (`uid`,`mid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -663,11 +660,10 @@ CREATE TABLE IF NOT EXISTS `notify` (
|
||||||
`name_cache` tinytext,
|
`name_cache` tinytext,
|
||||||
`msg_cache` mediumtext,
|
`msg_cache` mediumtext,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid_hash` (`uid`,`hash`),
|
INDEX `hash_uid` (`hash`,`uid`),
|
||||||
INDEX `uid_seen_date` (`uid`,`seen`,`date`),
|
INDEX `seen_uid_date` (`seen`,`uid`,`date`),
|
||||||
INDEX `uid_type_link` (`uid`,`type`,`link`),
|
INDEX `uid_date` (`uid`,`date`),
|
||||||
INDEX `uid_link` (`uid`,`link`),
|
INDEX `uid_type_link` (`uid`,`type`,`link`)
|
||||||
INDEX `uid_date` (`uid`,`date`)
|
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -679,8 +675,7 @@ CREATE TABLE IF NOT EXISTS `notify-threads` (
|
||||||
`master-parent-item` int(10) unsigned NOT NULL DEFAULT 0,
|
`master-parent-item` int(10) unsigned NOT NULL DEFAULT 0,
|
||||||
`parent-item` int(10) unsigned NOT NULL DEFAULT 0,
|
`parent-item` int(10) unsigned NOT NULL DEFAULT 0,
|
||||||
`receiver-uid` int(11) NOT NULL DEFAULT 0,
|
`receiver-uid` int(11) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`)
|
||||||
INDEX `master-parent-item` (`master-parent-item`)
|
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -688,7 +683,7 @@ CREATE TABLE IF NOT EXISTS `notify-threads` (
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS `oembed` (
|
CREATE TABLE IF NOT EXISTS `oembed` (
|
||||||
`url` varbinary(255) NOT NULL,
|
`url` varbinary(255) NOT NULL,
|
||||||
`content` text,
|
`content` mediumtext,
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
PRIMARY KEY(`url`),
|
PRIMARY KEY(`url`),
|
||||||
INDEX `created` (`created`)
|
INDEX `created` (`created`)
|
||||||
|
@ -701,7 +696,7 @@ CREATE TABLE IF NOT EXISTS `parsed_url` (
|
||||||
`url` varbinary(255) NOT NULL,
|
`url` varbinary(255) NOT NULL,
|
||||||
`guessing` tinyint(1) NOT NULL DEFAULT 0,
|
`guessing` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`oembed` tinyint(1) NOT NULL DEFAULT 0,
|
`oembed` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`content` text,
|
`content` mediumtext,
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
PRIMARY KEY(`url`,`guessing`,`oembed`),
|
PRIMARY KEY(`url`,`guessing`,`oembed`),
|
||||||
INDEX `created` (`created`)
|
INDEX `created` (`created`)
|
||||||
|
@ -749,7 +744,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid_contactid` (`uid`,`contact-id`),
|
INDEX `uid_contactid` (`uid`,`contact-id`),
|
||||||
INDEX `uid_profile` (`uid`,`profile`),
|
INDEX `uid_profile` (`uid`,`profile`),
|
||||||
INDEX `uid_album_created` (`uid`,`album`(32),`created`),
|
INDEX `uid_album_scale_created` (`uid`,`album`(32),`scale`,`created`),
|
||||||
INDEX `uid_album_resource-id_created` (`uid`,`album`(32),`resource-id`(64),`created`),
|
INDEX `uid_album_resource-id_created` (`uid`,`album`(32),`resource-id`(64),`created`),
|
||||||
INDEX `resource-id` (`resource-id`(64))
|
INDEX `resource-id` (`resource-id`(64))
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
@ -760,16 +755,16 @@ CREATE TABLE IF NOT EXISTS `photo` (
|
||||||
CREATE TABLE IF NOT EXISTS `poll` (
|
CREATE TABLE IF NOT EXISTS `poll` (
|
||||||
`id` int(11) NOT NULL auto_increment,
|
`id` int(11) NOT NULL auto_increment,
|
||||||
`uid` int(11) NOT NULL DEFAULT 0,
|
`uid` int(11) NOT NULL DEFAULT 0,
|
||||||
`q0` mediumtext,
|
`q0` text,
|
||||||
`q1` mediumtext,
|
`q1` text,
|
||||||
`q2` mediumtext,
|
`q2` text,
|
||||||
`q3` mediumtext,
|
`q3` text,
|
||||||
`q4` mediumtext,
|
`q4` text,
|
||||||
`q5` mediumtext,
|
`q5` text,
|
||||||
`q6` mediumtext,
|
`q6` text,
|
||||||
`q7` mediumtext,
|
`q7` text,
|
||||||
`q8` mediumtext,
|
`q8` text,
|
||||||
`q9` mediumtext,
|
`q9` text,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid` (`uid`)
|
INDEX `uid` (`uid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
@ -843,7 +838,8 @@ CREATE TABLE IF NOT EXISTS `profile` (
|
||||||
`thumb` varchar(255) NOT NULL DEFAULT '',
|
`thumb` varchar(255) NOT NULL DEFAULT '',
|
||||||
`publish` tinyint(1) NOT NULL DEFAULT 0,
|
`publish` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`net-publish` tinyint(1) NOT NULL DEFAULT 0,
|
`net-publish` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`),
|
||||||
|
INDEX `uid_is-default` (`uid`,`is-default`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -979,8 +975,6 @@ CREATE TABLE IF NOT EXISTS `term` (
|
||||||
`uid` int(10) unsigned NOT NULL DEFAULT 0,
|
`uid` int(10) unsigned NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`tid`),
|
PRIMARY KEY(`tid`),
|
||||||
INDEX `oid_otype_type_term` (`oid`,`otype`,`type`,`term`),
|
INDEX `oid_otype_type_term` (`oid`,`otype`,`type`,`term`),
|
||||||
INDEX `uid_term_tid` (`uid`,`term`(32),`tid`),
|
|
||||||
INDEX `type_term` (`type`,`term`(32)),
|
|
||||||
INDEX `uid_otype_type_term_global_created` (`uid`,`otype`,`type`,`term`(32),`global`,`created`),
|
INDEX `uid_otype_type_term_global_created` (`uid`,`otype`,`type`,`term`(32),`global`,`created`),
|
||||||
INDEX `uid_otype_type_url` (`uid`,`otype`,`type`,`url`(64)),
|
INDEX `uid_otype_type_url` (`uid`,`otype`,`type`,`url`(64)),
|
||||||
INDEX `guid` (`guid`(64))
|
INDEX `guid` (`guid`(64))
|
||||||
|
@ -1017,8 +1011,6 @@ CREATE TABLE IF NOT EXISTS `thread` (
|
||||||
`mention` tinyint(1) NOT NULL DEFAULT 0,
|
`mention` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`network` varchar(32) NOT NULL DEFAULT '',
|
`network` varchar(32) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY(`iid`),
|
PRIMARY KEY(`iid`),
|
||||||
INDEX `created` (`created`),
|
|
||||||
INDEX `commented` (`commented`),
|
|
||||||
INDEX `uid_network_commented` (`uid`,`network`,`commented`),
|
INDEX `uid_network_commented` (`uid`,`network`,`commented`),
|
||||||
INDEX `uid_network_created` (`uid`,`network`,`created`),
|
INDEX `uid_network_created` (`uid`,`network`,`created`),
|
||||||
INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`),
|
INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`),
|
||||||
|
@ -1111,7 +1103,6 @@ CREATE TABLE IF NOT EXISTS `workerqueue` (
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`pid` int(11) NOT NULL DEFAULT 0,
|
`pid` int(11) NOT NULL DEFAULT 0,
|
||||||
`executed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`executed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`)
|
||||||
INDEX `created` (`created`)
|
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
|
|
@ -213,8 +213,7 @@ To select a default theme for the Friendica node, see the *Site* section of the
|
||||||
|
|
||||||
## Additional Features
|
## Additional Features
|
||||||
|
|
||||||
There are several optional features in Friendica.
|
There are several optional features in Friendica like the *dislike* button.
|
||||||
Like the *dislike* button or the usage of a *richtext editor* for composing new postings.
|
|
||||||
In this section of the admin panel you can select a default setting for your node and eventually fix it, so users cannot change the setting anymore.
|
In this section of the admin panel you can select a default setting for your node and eventually fix it, so users cannot change the setting anymore.
|
||||||
|
|
||||||
## DB Updates
|
## DB Updates
|
||||||
|
|
|
@ -96,18 +96,3 @@ Click again on "show" or "don't show" to switch it off.
|
||||||
You can search for contacts or groups with the search box.
|
You can search for contacts or groups with the search box.
|
||||||
|
|
||||||
See also [Group and Privacy](help/Groups-and-Privacy)
|
See also [Group and Privacy](help/Groups-and-Privacy)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WYSIAWYG (What You See Is About What You Get)
|
|
||||||
--------------------------------------------------
|
|
||||||
|
|
||||||
Friendica can use TinyMCE as rich text editor. This way you can write beatifull post without the need to know [BBCode](help/BBCode).
|
|
||||||
|
|
||||||
By default, rich editor is disabled. You can enable it from Settings -> [Aditional features](settings/features) page, turn on Richtext Editor and click "Submit".
|
|
||||||
|
|
||||||
<figure>
|
|
||||||
<img src="doc/img/friendica_rich_editor.png" alt="default editor">
|
|
||||||
<figcaption>Rich editor, with default Friendica theme (duepuntozero)</figcaption>
|
|
||||||
</figure>
|
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,13 @@ Example: To set the directory value please add this line to your .htconfig.php:
|
||||||
* **birthday_input_format** - Default value is "ymd".
|
* **birthday_input_format** - Default value is "ymd".
|
||||||
* **block_local_dir** (Boolean) - Blocks the access to the directory of the local users.
|
* **block_local_dir** (Boolean) - Blocks the access to the directory of the local users.
|
||||||
* **curl_range_bytes** - Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
|
* **curl_range_bytes** - Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
|
||||||
|
* **db_log** - Name of a logfile to log slow database queries
|
||||||
|
* **db_loglimit** - If a database call lasts longer than this value it is logged
|
||||||
|
* **db_log_index** - Name of a logfile to log queries with bad indexes
|
||||||
|
* **db_log_index_watch** - Watchlist of indexes to watch
|
||||||
|
* **db_loglimit_index** - Number of index rows needed to be logged for indexes on the watchlist
|
||||||
|
* **db_loglimit_index_high** - Number of index rows to be logged anyway (for any index)
|
||||||
|
* **db_log_index_blacklist** - Blacklist of indexes that shouldn't be watched
|
||||||
* **dbclean** (Boolean) - Enable the automatic database cleanup process
|
* **dbclean** (Boolean) - Enable the automatic database cleanup process
|
||||||
* **default_service_class** -
|
* **default_service_class** -
|
||||||
* **delivery_batch_count** - Number of deliveries per process. Default value is 1. (Disabled when using the worker)
|
* **delivery_batch_count** - Number of deliveries per process. Default value is 1. (Disabled when using the worker)
|
||||||
|
|
|
@ -66,5 +66,35 @@ If you only want to translate friendica into another language you wont need any
|
||||||
|
|
||||||
For further information see the utils/README file.
|
For further information see the utils/README file.
|
||||||
|
|
||||||
[1]: https://www.transifex.com/projects/p/friendica/
|
Transifex-Client
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Transifex has a client program which let you interact with the translation files in a similar way to git.
|
||||||
|
Help for the client can be found at the [Transifex Help Center] [2].
|
||||||
|
Here we will only cover basic usage.
|
||||||
|
|
||||||
|
After installation of the client, you should have a `tx` command available on your system.
|
||||||
|
To use it, first create a configuration file with your credentials.
|
||||||
|
On Linux this file should be placed into your home directory `~/.transifexrc`.
|
||||||
|
The content of the file should be something like the following:
|
||||||
|
|
||||||
|
[https://www.transifex.com]
|
||||||
|
username = user
|
||||||
|
token =
|
||||||
|
password = p@ssw0rd
|
||||||
|
hostname = https://www.transifex.com
|
||||||
|
|
||||||
|
Since Friendica version 3.5.1 we ship configuration files for the Transifex client in the core repository and the addon repository.
|
||||||
|
To update the translation files after you have translated strings of e.g. Esperanto in the web-UI of transifex you can use `tx` to download the file.
|
||||||
|
|
||||||
|
$> tx pull -l eo
|
||||||
|
|
||||||
|
And then use the `po2php` utility described above to convert the `messages.po` file to the `strings.php` file Friendica is loading.
|
||||||
|
|
||||||
|
$> php util/po2php.php view/lang/eo/messages.po
|
||||||
|
|
||||||
|
Afterwards, just commit the two changed files to a feature branch of your Friendica repository, push the changes to github and open a pull request for your changes.
|
||||||
|
|
||||||
|
[1]: https://www.transifex.com/projects/p/friendica/
|
||||||
|
[2]: https://docs.transifex.com/client/introduction
|
||||||
|
|
||||||
|
|
13
htconfig.php
13
htconfig.php
|
@ -26,6 +26,10 @@ $a->config['system']['db_charset'] = "utf8mb4";
|
||||||
|
|
||||||
$default_timezone = 'America/Los_Angeles';
|
$default_timezone = 'America/Los_Angeles';
|
||||||
|
|
||||||
|
// Default system language
|
||||||
|
|
||||||
|
$a->config['system']['language'] = 'en';
|
||||||
|
|
||||||
// What is your site name?
|
// What is your site name?
|
||||||
|
|
||||||
$a->config['sitename'] = "Friendica Social Network";
|
$a->config['sitename'] = "Friendica Social Network";
|
||||||
|
@ -60,9 +64,16 @@ $a->config['php_path'] = 'php';
|
||||||
|
|
||||||
$a->config['system']['huburl'] = '[internal]';
|
$a->config['system']['huburl'] = '[internal]';
|
||||||
|
|
||||||
|
// Server-to-server private message encryption (RINO) is allowed by default.
|
||||||
|
// Encryption will only be provided if this setting is set to a non zero
|
||||||
|
// value and the PHP mcrypt extension is installed on both systems
|
||||||
|
// set to 0 to disable, 2 to enable, 1 is deprecated but wont need mcrypt
|
||||||
|
|
||||||
|
$a->config['system']['rino_encrypt'] = 2;
|
||||||
|
|
||||||
// allowed themes (change this from admin panel after installation)
|
// allowed themes (change this from admin panel after installation)
|
||||||
|
|
||||||
$a->config['system']['allowed_themes'] = 'quattro,vier,duepuntozero';
|
$a->config['system']['allowed_themes'] = 'quattro,vier,duepuntozero,smoothly';
|
||||||
|
|
||||||
// default system theme
|
// default system theme
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require_once('include/Probe.php');
|
||||||
|
|
||||||
// Included here for completeness, but this is a very dangerous operation.
|
// Included here for completeness, but this is a very dangerous operation.
|
||||||
// It is the caller's responsibility to confirm the requestor's intent and
|
// It is the caller's responsibility to confirm the requestor's intent and
|
||||||
|
@ -60,14 +61,16 @@ function user_remove($uid) {
|
||||||
|
|
||||||
function contact_remove($id) {
|
function contact_remove($id) {
|
||||||
|
|
||||||
$r = q("select uid from contact where id = %d limit 1",
|
// We want just to make sure that we don't delete our "self" contact
|
||||||
|
$r = q("SELECT `uid` FROM `contact` WHERE `id` = %d AND NOT `self` LIMIT 1",
|
||||||
intval($id)
|
intval($id)
|
||||||
);
|
);
|
||||||
if((! dbm::is_result($r)) || (! intval($r[0]['uid'])))
|
if (!dbm::is_result($r) || !intval($r[0]['uid'])) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$archive = get_pconfig($r[0]['uid'], 'system','archive_removed_contacts');
|
$archive = get_pconfig($r[0]['uid'], 'system','archive_removed_contacts');
|
||||||
if($archive) {
|
if ($archive) {
|
||||||
q("update contact set `archive` = 1, `network` = 'none', `writable` = 0 where id = %d",
|
q("update contact set `archive` = 1, `network` = 'none', `writable` = 0 where id = %d",
|
||||||
intval($id)
|
intval($id)
|
||||||
);
|
);
|
||||||
|
@ -314,6 +317,54 @@ function get_contact_details_by_url($url, $uid = -1, $default = array()) {
|
||||||
return $profile;
|
return $profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get contact data for a given address
|
||||||
|
*
|
||||||
|
* The function looks at several places (contact table and gcontact table) for the contact
|
||||||
|
*
|
||||||
|
* @param string $addr The profile link
|
||||||
|
* @param int $uid User id
|
||||||
|
*
|
||||||
|
* @return array Contact data
|
||||||
|
*/
|
||||||
|
function get_contact_details_by_addr($addr, $uid = -1) {
|
||||||
|
static $cache = array();
|
||||||
|
|
||||||
|
if ($uid == -1) {
|
||||||
|
$uid = local_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fetch contact data from the contact table for the given user
|
||||||
|
$r = q("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||||
|
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`
|
||||||
|
FROM `contact` WHERE `addr` = '%s' AND `uid` = %d",
|
||||||
|
dbesc($addr), intval($uid));
|
||||||
|
|
||||||
|
// Fetch the data from the contact table with "uid=0" (which is filled automatically)
|
||||||
|
if (!dbm::is_result($r))
|
||||||
|
$r = q("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||||
|
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`
|
||||||
|
FROM `contact` WHERE `addr` = '%s' AND `uid` = 0",
|
||||||
|
dbesc($addr));
|
||||||
|
|
||||||
|
// Fetch the data from the gcontact table
|
||||||
|
if (!dbm::is_result($r))
|
||||||
|
$r = q("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, '' AS `xmpp`,
|
||||||
|
`keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self`
|
||||||
|
FROM `gcontact` WHERE `addr` = '%s'",
|
||||||
|
dbesc($addr));
|
||||||
|
|
||||||
|
if (!dbm::is_result($r)) {
|
||||||
|
$data = Probe::uri($addr);
|
||||||
|
|
||||||
|
$profile = get_contact_details_by_url($data['url'], $uid);
|
||||||
|
} else {
|
||||||
|
$profile = $r[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $profile;
|
||||||
|
}
|
||||||
|
|
||||||
if (! function_exists('contact_photo_menu')) {
|
if (! function_exists('contact_photo_menu')) {
|
||||||
function contact_photo_menu($contact, $uid = 0)
|
function contact_photo_menu($contact, $uid = 0)
|
||||||
{
|
{
|
||||||
|
@ -571,7 +622,7 @@ function get_contact($url, $uid = 0, $no_update = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((count($contact) > 1) AND ($uid == 0) AND ($contactid != 0) AND ($url != ""))
|
if ((count($contact) > 1) AND ($uid == 0) AND ($contactid != 0) AND ($url != ""))
|
||||||
q("DELETE FROM `contact` WHERE `nurl` = '%s' AND `id` != %d",
|
q("DELETE FROM `contact` WHERE `nurl` = '%s' AND `id` != %d AND NOT `self`",
|
||||||
dbesc(normalise_link($url)),
|
dbesc(normalise_link($url)),
|
||||||
intval($contactid));
|
intval($contactid));
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,9 @@ use dbm;
|
||||||
*/
|
*/
|
||||||
class Config {
|
class Config {
|
||||||
|
|
||||||
|
private static $cache;
|
||||||
|
private static $in_db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Loads all configuration values of family into a cached storage.
|
* @brief Loads all configuration values of family into a cached storage.
|
||||||
*
|
*
|
||||||
|
@ -32,10 +35,17 @@ class Config {
|
||||||
* The category of the configuration value
|
* The category of the configuration value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function load($family) {
|
public static function load($family = "config") {
|
||||||
|
|
||||||
|
// We don't preload "system" anymore.
|
||||||
|
// This reduces the number of database reads a lot.
|
||||||
|
if ($family === 'system') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
$r = q("SELECT `v`, `k` FROM `config` WHERE `cat` = '%s' ORDER BY `cat`, `k`, `id`", dbesc($family));
|
$r = q("SELECT `v`, `k` FROM `config` WHERE `cat` = '%s'", dbesc($family));
|
||||||
if (dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach ($r as $rr) {
|
foreach ($r as $rr) {
|
||||||
$k = $rr['k'];
|
$k = $rr['k'];
|
||||||
|
@ -43,11 +53,10 @@ class Config {
|
||||||
$a->config[$k] = $rr['v'];
|
$a->config[$k] = $rr['v'];
|
||||||
} else {
|
} else {
|
||||||
$a->config[$family][$k] = $rr['v'];
|
$a->config[$family][$k] = $rr['v'];
|
||||||
|
self::$cache[$family][$k] = $rr['v'];
|
||||||
|
self::$in_db[$family][$k] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ($family != 'config') {
|
|
||||||
// Negative caching
|
|
||||||
$a->config[$family] = "!<unset>!";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,34 +87,41 @@ class Config {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
if (!$refresh) {
|
if (!$refresh) {
|
||||||
// Looking if the whole family isn't set
|
|
||||||
if (isset($a->config[$family])) {
|
// Do we have the cached value? Then return it
|
||||||
if ($a->config[$family] === '!<unset>!') {
|
if (isset(self::$cache[$family][$key])) {
|
||||||
|
if (self::$cache[$family][$key] === '!<unset>!') {
|
||||||
return $default_value;
|
return $default_value;
|
||||||
|
} else {
|
||||||
|
return self::$cache[$family][$key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($a->config[$family][$key])) {
|
$ret = q("SELECT `v` FROM `config` WHERE `cat` = '%s' AND `k` = '%s'",
|
||||||
if ($a->config[$family][$key] === '!<unset>!') {
|
|
||||||
return $default_value;
|
|
||||||
}
|
|
||||||
return $a->config[$family][$key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$ret = q("SELECT `v` FROM `config` WHERE `cat` = '%s' AND `k` = '%s' ORDER BY `id` DESC LIMIT 1",
|
|
||||||
dbesc($family),
|
dbesc($family),
|
||||||
dbesc($key)
|
dbesc($key)
|
||||||
);
|
);
|
||||||
if (count($ret)) {
|
if (dbm::is_result($ret)) {
|
||||||
// manage array value
|
// manage array value
|
||||||
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
|
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v']) ? unserialize($ret[0]['v']) : $ret[0]['v']);
|
||||||
$a->config[$family][$key] = $val;
|
|
||||||
|
|
||||||
|
// Assign the value from the database to the cache
|
||||||
|
self::$cache[$family][$key] = $val;
|
||||||
|
self::$in_db[$family][$key] = true;
|
||||||
return $val;
|
return $val;
|
||||||
} else {
|
} elseif (isset($a->config[$family][$key])) {
|
||||||
$a->config[$family][$key] = '!<unset>!';
|
|
||||||
|
// Assign the value (mostly) from the .htconfig.php to the cache
|
||||||
|
self::$cache[$family][$key] = $a->config[$family][$key];
|
||||||
|
self::$in_db[$family][$key] = false;
|
||||||
|
|
||||||
|
return $a->config[$family][$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self::$cache[$family][$key] = '!<unset>!';
|
||||||
|
self::$in_db[$family][$key] = false;
|
||||||
|
|
||||||
return $default_value;
|
return $default_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,19 +144,30 @@ class Config {
|
||||||
public static function set($family, $key, $value) {
|
public static function set($family, $key, $value) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
$stored = self::get($family, $key);
|
// We store our setting values in a string variable.
|
||||||
|
// So we have to do the conversion here so that the compare below works.
|
||||||
|
// The exception are array values.
|
||||||
|
$dbvalue = (!is_array($value) ? (string)$value : $value);
|
||||||
|
|
||||||
if ($stored == $value) {
|
$stored = self::get($family, $key, null, true);
|
||||||
|
|
||||||
|
if (($stored === $dbvalue) AND self::$in_db[$family][$key]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$a->config[$family][$key] = $value;
|
if ($family === 'config') {
|
||||||
|
$a->config[$key] = $dbvalue;
|
||||||
|
} elseif ($family != 'system') {
|
||||||
|
$a->config[$family][$key] = $dbvalue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Assign the just added value to the cache
|
||||||
|
self::$cache[$family][$key] = $dbvalue;
|
||||||
|
|
||||||
// manage array value
|
// manage array value
|
||||||
$dbvalue = (is_array($value) ? serialize($value) : $value);
|
$dbvalue = (is_array($value) ? serialize($value) : $dbvalue);
|
||||||
$dbvalue = (is_bool($dbvalue) ? intval($dbvalue) : $dbvalue);
|
|
||||||
|
|
||||||
if (is_null($stored)) {
|
if (is_null($stored) OR !self::$in_db[$family][$key]) {
|
||||||
$ret = q("INSERT INTO `config` (`cat`, `k`, `v`) VALUES ('%s', '%s', '%s') ON DUPLICATE KEY UPDATE `v` = '%s'",
|
$ret = q("INSERT INTO `config` (`cat`, `k`, `v`) VALUES ('%s', '%s', '%s') ON DUPLICATE KEY UPDATE `v` = '%s'",
|
||||||
dbesc($family),
|
dbesc($family),
|
||||||
dbesc($key),
|
dbesc($key),
|
||||||
|
@ -155,6 +182,7 @@ class Config {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($ret) {
|
if ($ret) {
|
||||||
|
self::$in_db[$family][$key] = true;
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
|
@ -174,9 +202,9 @@ class Config {
|
||||||
*/
|
*/
|
||||||
public static function delete($family, $key) {
|
public static function delete($family, $key) {
|
||||||
|
|
||||||
$a = get_app();
|
if (isset(self::$cache[$family][$key])) {
|
||||||
if (x($a->config[$family],$key)) {
|
unset(self::$cache[$family][$key]);
|
||||||
unset($a->config[$family][$key]);
|
unset(self::$in_db[$family][$key]);
|
||||||
}
|
}
|
||||||
$ret = q("DELETE FROM `config` WHERE `cat` = '%s' AND `k` = '%s'",
|
$ret = q("DELETE FROM `config` WHERE `cat` = '%s' AND `k` = '%s'",
|
||||||
dbesc($family),
|
dbesc($family),
|
||||||
|
@ -185,5 +213,4 @@ class Config {
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@ use dbm;
|
||||||
*/
|
*/
|
||||||
class PConfig {
|
class PConfig {
|
||||||
|
|
||||||
|
private static $in_db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Loads all configuration values of a user's config family into a cached storage.
|
* @brief Loads all configuration values of a user's config family into a cached storage.
|
||||||
*
|
*
|
||||||
|
@ -40,6 +42,7 @@ class PConfig {
|
||||||
foreach ($r as $rr) {
|
foreach ($r as $rr) {
|
||||||
$k = $rr['k'];
|
$k = $rr['k'];
|
||||||
$a->config[$uid][$family][$k] = $rr['v'];
|
$a->config[$uid][$family][$k] = $rr['v'];
|
||||||
|
self::$in_db[$uid][$family][$k] = true;
|
||||||
}
|
}
|
||||||
} else if ($family != 'config') {
|
} else if ($family != 'config') {
|
||||||
// Negative caching
|
// Negative caching
|
||||||
|
@ -95,13 +98,16 @@ class PConfig {
|
||||||
if (count($ret)) {
|
if (count($ret)) {
|
||||||
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
|
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
|
||||||
$a->config[$uid][$family][$key] = $val;
|
$a->config[$uid][$family][$key] = $val;
|
||||||
|
self::$in_db[$uid][$family][$key] = true;
|
||||||
|
|
||||||
return $val;
|
return $val;
|
||||||
} else {
|
} else {
|
||||||
$a->config[$uid][$family][$key] = '!<unset>!';
|
$a->config[$uid][$family][$key] = '!<unset>!';
|
||||||
}
|
self::$in_db[$uid][$family][$key] = false;
|
||||||
|
|
||||||
return $default_value;
|
return $default_value;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets a configuration value for a user
|
* @brief Sets a configuration value for a user
|
||||||
|
@ -125,18 +131,23 @@ class PConfig {
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
$stored = self::get($uid, $family, $key);
|
// We store our setting values in a string variable.
|
||||||
|
// So we have to do the conversion here so that the compare below works.
|
||||||
|
// The exception are array values.
|
||||||
|
$dbvalue = (!is_array($value) ? (string)$value : $value);
|
||||||
|
|
||||||
if ($stored == $value) {
|
$stored = self::get($uid, $family, $key, null, true);
|
||||||
|
|
||||||
|
if (($stored === $dbvalue) AND self::$in_db[$uid][$family][$key]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$a->config[$uid][$family][$key] = $dbvalue;
|
||||||
|
|
||||||
// manage array value
|
// manage array value
|
||||||
$dbvalue = (is_array($value) ? serialize($value):$value);
|
$dbvalue = (is_array($value) ? serialize($value) : $dbvalue);
|
||||||
|
|
||||||
$a->config[$uid][$family][$key] = $value;
|
if (is_null($stored) OR !self::$in_db[$uid][$family][$key]) {
|
||||||
|
|
||||||
if (is_null($stored)) {
|
|
||||||
$ret = q("INSERT INTO `pconfig` (`uid`, `cat`, `k`, `v`) VALUES (%d, '%s', '%s', '%s') ON DUPLICATE KEY UPDATE `v` = '%s'",
|
$ret = q("INSERT INTO `pconfig` (`uid`, `cat`, `k`, `v`) VALUES (%d, '%s', '%s', '%s') ON DUPLICATE KEY UPDATE `v` = '%s'",
|
||||||
intval($uid),
|
intval($uid),
|
||||||
dbesc($family),
|
dbesc($family),
|
||||||
|
@ -154,6 +165,7 @@ class PConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ret) {
|
if ($ret) {
|
||||||
|
self::$in_db[$uid][$family][$key] = true;
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
|
@ -178,6 +190,7 @@ class PConfig {
|
||||||
|
|
||||||
if (x($a->config[$uid][$family], $key)) {
|
if (x($a->config[$uid][$family], $key)) {
|
||||||
unset($a->config[$uid][$family][$key]);
|
unset($a->config[$uid][$family][$key]);
|
||||||
|
unset(self::$in_db[$uid][$family][$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = q("DELETE FROM `pconfig` WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s'",
|
$ret = q("DELETE FROM `pconfig` WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s'",
|
||||||
|
|
|
@ -495,6 +495,8 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||||
|
|
||||||
if ($type=='' || $type=='g'){
|
if ($type=='' || $type=='g'){
|
||||||
|
|
||||||
|
/// @todo We should cache this query.
|
||||||
|
// This can be done when we can delete cache entries via wildcard
|
||||||
$r = q("SELECT `group`.`id`, `group`.`name`, GROUP_CONCAT(DISTINCT `group_member`.`contact-id` SEPARATOR ',') AS uids
|
$r = q("SELECT `group`.`id`, `group`.`name`, GROUP_CONCAT(DISTINCT `group_member`.`contact-id` SEPARATOR ',') AS uids
|
||||||
FROM `group`
|
FROM `group`
|
||||||
INNER JOIN `group_member` ON `group_member`.`gid`=`group`.`id` AND `group_member`.`uid` = `group`.`uid`
|
INNER JOIN `group_member` ON `group_member`.`gid`=`group`.`id` AND `group_member`.`uid` = `group`.`uid`
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
*
|
*
|
||||||
* @todo Automatically detect if incoming data is HTML or BBCode
|
* @todo Automatically detect if incoming data is HTML or BBCode
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once('include/HTTPExceptions.php');
|
require_once('include/HTTPExceptions.php');
|
||||||
|
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
@ -2696,11 +2699,11 @@
|
||||||
$logo = App::get_baseurl() . '/images/friendica-64.png';
|
$logo = App::get_baseurl() . '/images/friendica-64.png';
|
||||||
$email = $a->config['admin_email'];
|
$email = $a->config['admin_email'];
|
||||||
$closed = (($a->config['register_policy'] == REGISTER_CLOSED) ? 'true' : 'false');
|
$closed = (($a->config['register_policy'] == REGISTER_CLOSED) ? 'true' : 'false');
|
||||||
$private = (($a->config['system']['block_public']) ? 'true' : 'false');
|
$private = ((Config::get('system', 'block_public')) ? 'true' : 'false');
|
||||||
$textlimit = (string) (($a->config['max_import_size']) ? $a->config['max_import_size'] : 200000);
|
$textlimit = (string) (($a->config['max_import_size']) ? $a->config['max_import_size'] : 200000);
|
||||||
if($a->config['api_import_size'])
|
if($a->config['api_import_size'])
|
||||||
$texlimit = string($a->config['api_import_size']);
|
$texlimit = string($a->config['api_import_size']);
|
||||||
$ssl = (($a->config['system']['have_ssl']) ? 'true' : 'false');
|
$ssl = ((Config::get('system', 'have_ssl')) ? 'true' : 'false');
|
||||||
$sslserver = (($ssl === 'true') ? str_replace('http:','https:',App::get_baseurl()) : '');
|
$sslserver = (($ssl === 'true') ? str_replace('http:','https:',App::get_baseurl()) : '');
|
||||||
|
|
||||||
$config = array(
|
$config = array(
|
||||||
|
|
|
@ -7,6 +7,27 @@ require_once("include/html2bbcode.php");
|
||||||
require_once("include/bbcode.php");
|
require_once("include/bbcode.php");
|
||||||
require_once("library/html-to-markdown/HTML_To_Markdown.php");
|
require_once("library/html-to-markdown/HTML_To_Markdown.php");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Callback function to replace a Diaspora style mention in a mention for Friendica
|
||||||
|
*
|
||||||
|
* @param array $match Matching values for the callback
|
||||||
|
* @return string Replaced mention
|
||||||
|
*/
|
||||||
|
function diaspora_mention2bb($match) {
|
||||||
|
if ($match[2] == '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = get_contact_details_by_addr($match[2]);
|
||||||
|
|
||||||
|
$name = $match[1];
|
||||||
|
|
||||||
|
if ($name == '') {
|
||||||
|
$name = $data['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return '@[url='.$data['url'].']'.$name.'[/url]';
|
||||||
|
}
|
||||||
|
|
||||||
// we don't want to support a bbcode specific markdown interpreter
|
// we don't want to support a bbcode specific markdown interpreter
|
||||||
// and the markdown library we have is pretty good, but provides HTML output.
|
// and the markdown library we have is pretty good, but provides HTML output.
|
||||||
|
@ -33,7 +54,8 @@ function diaspora2bb($s) {
|
||||||
|
|
||||||
$s = Markdown($s);
|
$s = Markdown($s);
|
||||||
|
|
||||||
$s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/', '@[url=https://$3/u/$2]$1[/url]', $s);
|
$regexp = "/@\{(?:([^\}]+?); )?([^\} ]+)\}/";
|
||||||
|
$s = preg_replace_callback($regexp, 'diaspora_mention2bb', $s);
|
||||||
|
|
||||||
$s = str_replace('#', '#', $s);
|
$s = str_replace('#', '#', $s);
|
||||||
|
|
||||||
|
@ -73,7 +95,7 @@ function diaspora2bb($s) {
|
||||||
* @brief Callback function to replace a Friendica style mention in a mention for Diaspora
|
* @brief Callback function to replace a Friendica style mention in a mention for Diaspora
|
||||||
*
|
*
|
||||||
* @param array $match Matching values for the callback
|
* @param array $match Matching values for the callback
|
||||||
* @return text Replaced mention
|
* @return string Replaced mention
|
||||||
*/
|
*/
|
||||||
function diaspora_mentions($match) {
|
function diaspora_mentions($match) {
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ class Cache {
|
||||||
set_config("system", "cache_cleared_half_hour", time());
|
set_config("system", "cache_cleared_half_hour", time());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($max_level <= CACHE_QUARTER_HOUR) AND (get_config("system", "cache_cleared_hour")) < time() - self::duration(CACHE_QUARTER_HOUR)) {
|
if (($max_level <= CACHE_QUARTER_HOUR) AND (get_config("system", "cache_cleared_quarter_hour")) < time() - self::duration(CACHE_QUARTER_HOUR)) {
|
||||||
q("DELETE FROM `cache` WHERE `updated` < '%s' AND `expire_mode` = %d",
|
q("DELETE FROM `cache` WHERE `updated` < '%s' AND `expire_mode` = %d",
|
||||||
dbesc(datetime_convert('UTC','UTC',"now - 15 minutes")), intval(CACHE_QUARTER_HOUR));
|
dbesc(datetime_convert('UTC','UTC',"now - 15 minutes")), intval(CACHE_QUARTER_HOUR));
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php /** @file */
|
<?php /** @file */
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once('boot.php');
|
require_once('boot.php');
|
||||||
|
|
||||||
// Everything we need to boot standalone 'background' processes
|
// Everything we need to boot standalone 'background' processes
|
||||||
|
@ -8,11 +10,11 @@ function cli_startup() {
|
||||||
|
|
||||||
global $a, $db;
|
global $a, $db;
|
||||||
|
|
||||||
if(is_null($a)) {
|
if (is_null($a)) {
|
||||||
$a = new App;
|
$a = new App;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_null($db)) {
|
if (is_null($db)) {
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
require_once("dba.php");
|
require_once("dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||||
|
@ -21,8 +23,7 @@ function cli_startup() {
|
||||||
|
|
||||||
require_once('include/session.php');
|
require_once('include/session.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@ function network_to_name($s, $profile = "") {
|
||||||
NETWORK_TWITTER => t('Twitter'),
|
NETWORK_TWITTER => t('Twitter'),
|
||||||
NETWORK_DIASPORA2 => t('Diaspora Connector'),
|
NETWORK_DIASPORA2 => t('Diaspora Connector'),
|
||||||
NETWORK_STATUSNET => t('GNU Social'),
|
NETWORK_STATUSNET => t('GNU Social'),
|
||||||
|
NETWORK_PNUT => t('pnut'),
|
||||||
NETWORK_APPNET => t('App.net')
|
NETWORK_APPNET => t('App.net')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,9 @@ function unavailable_networks() {
|
||||||
if (!get_config("system","diaspora_enabled"))
|
if (!get_config("system","diaspora_enabled"))
|
||||||
$networks[] = NETWORK_DIASPORA;
|
$networks[] = NETWORK_DIASPORA;
|
||||||
|
|
||||||
|
if (!plugin_enabled("pnut"))
|
||||||
|
$networks[] = NETWORK_PNUT;
|
||||||
|
|
||||||
if (!sizeof($networks))
|
if (!sizeof($networks))
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
|
@ -90,7 +93,7 @@ function networks_widget($baseurl,$selected = '') {
|
||||||
|
|
||||||
$extra_sql = unavailable_networks();
|
$extra_sql = unavailable_networks();
|
||||||
|
|
||||||
$r = q("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = %d AND NOT `self` $extra_sql ORDER BY `network`",
|
$r = q("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = %d AND `network` != '' $extra_sql ORDER BY `network`",
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1170,23 +1170,14 @@ function format_like($cnt,$arr,$type,$id) {
|
||||||
|
|
||||||
|
|
||||||
function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : '');
|
$geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : '');
|
||||||
|
|
||||||
/* $plaintext = false;
|
|
||||||
if( local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext')) )
|
|
||||||
$plaintext = true;*/
|
|
||||||
$plaintext = true;
|
|
||||||
if( local_user() && feature_enabled(local_user(),'richtext') )
|
|
||||||
$plaintext = false;
|
|
||||||
|
|
||||||
$tpl = get_markup_template('jot-header.tpl');
|
$tpl = get_markup_template('jot-header.tpl');
|
||||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||||
'$newpost' => 'true',
|
'$newpost' => 'true',
|
||||||
'$baseurl' => App::get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $x['nickname'],
|
'$nickname' => $x['nickname'],
|
||||||
'$ispublic' => t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => t('Visible to <strong>everybody</strong>'),
|
||||||
|
@ -1199,12 +1190,10 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||||
'$delitems' => t('Delete item(s)?')
|
'$delitems' => t('Delete item(s)?')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
$tpl = get_markup_template('jot-end.tpl');
|
$tpl = get_markup_template('jot-end.tpl');
|
||||||
$a->page['end'] .= replace_macros($tpl, array(
|
$a->page['end'] .= replace_macros($tpl, array(
|
||||||
'$newpost' => 'true',
|
'$newpost' => 'true',
|
||||||
'$baseurl' => App::get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $x['nickname'],
|
'$nickname' => $x['nickname'],
|
||||||
'$ispublic' => t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => t('Visible to <strong>everybody</strong>'),
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
*
|
*
|
||||||
* This script is started from mod/item.php to save some time when doing a post.
|
* This script is started from mod/item.php to save some time when doing a post.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once("include/threads.php");
|
require_once("include/threads.php");
|
||||||
|
|
||||||
|
@ -21,8 +24,7 @@ function create_shadowentry_run($argv, $argc) {
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
if ($argc != 2) {
|
if ($argc != 2) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -10,6 +10,8 @@ if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) {
|
||||||
chdir($directory);
|
chdir($directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once("include/photos.php");
|
require_once("include/photos.php");
|
||||||
require_once("include/user.php");
|
require_once("include/user.php");
|
||||||
|
@ -38,8 +40,7 @@ function cron_run(&$argv, &$argc){
|
||||||
require_once('mod/nodeinfo.php');
|
require_once('mod/nodeinfo.php');
|
||||||
require_once('include/post_update.php');
|
require_once('include/post_update.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
// Don't check this stuff if the function is called by the poller
|
// Don't check this stuff if the function is called by the poller
|
||||||
if (App::callstack() != "poller_run") {
|
if (App::callstack() != "poller_run") {
|
||||||
|
@ -239,11 +240,13 @@ function cron_poll_contacts($argc, $argv) {
|
||||||
: ''
|
: ''
|
||||||
);
|
);
|
||||||
|
|
||||||
$contacts = q("SELECT `contact`.`id` FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
|
$contacts = q("SELECT `contact`.`id` FROM `user`
|
||||||
WHERE `rel` IN (%d, %d) AND `poll` != '' AND `network` IN ('%s', '%s', '%s', '%s', '%s', '%s')
|
STRAIGHT_JOIN `contact`
|
||||||
$sql_extra
|
ON `contact`.`uid` = `user`.`uid` AND `contact`.`rel` IN (%d, %d) AND `contact`.`poll` != ''
|
||||||
AND NOT `self` AND NOT `contact`.`blocked` AND NOT `contact`.`readonly` AND NOT `contact`.`archive`
|
AND `contact`.`network` IN ('%s', '%s', '%s', '%s', '%s', '%s') $sql_extra
|
||||||
AND NOT `user`.`account_expired` AND NOT `user`.`account_removed` $abandon_sql ORDER BY RAND()",
|
AND NOT `contact`.`self` AND NOT `contact`.`blocked` AND NOT `contact`.`readonly`
|
||||||
|
AND NOT `contact`.`archive`
|
||||||
|
WHERE NOT `user`.`account_expired` AND NOT `user`.`account_removed` $abandon_sql ORDER BY RAND()",
|
||||||
intval(CONTACT_IS_SHARING),
|
intval(CONTACT_IS_SHARING),
|
||||||
intval(CONTACT_IS_FRIEND),
|
intval(CONTACT_IS_FRIEND),
|
||||||
dbesc(NETWORK_DFRN),
|
dbesc(NETWORK_DFRN),
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once("boot.php");
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
|
require_once("boot.php");
|
||||||
|
|
||||||
function cronhooks_run(&$argv, &$argc){
|
function cronhooks_run(&$argv, &$argc){
|
||||||
global $a, $db;
|
global $a, $db;
|
||||||
|
@ -20,8 +21,7 @@ function cronhooks_run(&$argv, &$argc){
|
||||||
require_once('include/session.php');
|
require_once('include/session.php');
|
||||||
require_once('include/datetime.php');
|
require_once('include/datetime.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
// Don't check this stuff if the function is called by the poller
|
// Don't check this stuff if the function is called by the poller
|
||||||
if (App::callstack() != "poller_run") {
|
if (App::callstack() != "poller_run") {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) {
|
if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) {
|
||||||
$directory = dirname($_SERVER["argv"][0]);
|
$directory = dirname($_SERVER["argv"][0]);
|
||||||
|
|
||||||
|
@ -33,8 +35,7 @@ function cronjobs_run(&$argv, &$argc){
|
||||||
require_once('include/post_update.php');
|
require_once('include/post_update.php');
|
||||||
require_once('mod/nodeinfo.php');
|
require_once('mod/nodeinfo.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
* @brief Some functions for date and time related tasks.
|
* @brief Some functions for date and time related tasks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Two-level sort for timezones.
|
* @brief Two-level sort for timezones.
|
||||||
|
@ -271,8 +272,9 @@ function datetimesel($format, $min, $max, $default, $label, $id = 'datetimepicke
|
||||||
$lang = substr(get_browser_language(), 0, 2);
|
$lang = substr(get_browser_language(), 0, 2);
|
||||||
|
|
||||||
// Check if the detected language is supported by the picker
|
// Check if the detected language is supported by the picker
|
||||||
if (!in_array($lang, array("ar", "ro", "id", "bg", "fa", "ru", "uk", "en", "el", "de", "nl", "tr", "fr", "es", "th", "pl", "pt", "ch", "se", "kr", "it", "da", "no", "ja", "vi", "sl", "cs", "hu")))
|
if (!in_array($lang, array("ar", "ro", "id", "bg", "fa", "ru", "uk", "en", "el", "de", "nl", "tr", "fr", "es", "th", "pl", "pt", "ch", "se", "kr", "it", "da", "no", "ja", "vi", "sl", "cs", "hu"))) {
|
||||||
$lang = ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en');
|
$lang = Config::get('system', 'language', 'en');
|
||||||
|
}
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
$dateformat = '';
|
$dateformat = '';
|
||||||
|
@ -569,6 +571,17 @@ function update_contact_birthdays() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Check for duplicates
|
||||||
|
$s = q("SELECT `id` FROM `event` WHERE `uid` = %d AND `cid` = %d AND `start` = '%s' AND `type` = '%s' LIMIT 1",
|
||||||
|
intval($rr['uid']),
|
||||||
|
intval($rr['id']),
|
||||||
|
dbesc(datetime_convert('UTC','UTC', $nextbd)),
|
||||||
|
dbesc('birthday'));
|
||||||
|
|
||||||
|
if (dbm::is_result($s)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$bdtext = sprintf( t('%s\'s birthday'), $rr['name']);
|
$bdtext = sprintf( t('%s\'s birthday'), $rr['name']);
|
||||||
$bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]') ;
|
$bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]') ;
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,62 @@ class dba {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Analyze a database query and log this if some conditions are met.
|
||||||
|
*
|
||||||
|
* @param string $query The database query that will be analyzed
|
||||||
|
*/
|
||||||
|
public function log_index($query) {
|
||||||
|
$a = get_app();
|
||||||
|
|
||||||
|
if ($a->config["system"]["db_log_index"] == "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't explain an explain statement
|
||||||
|
if (strtolower(substr($query, 0, 7)) == "explain") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only do the explain on "select", "update" and "delete"
|
||||||
|
if (!in_array(strtolower(substr($query, 0, 6)), array("select", "update", "delete"))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$r = $this->q("EXPLAIN ".$query);
|
||||||
|
if (!dbm::is_result($r)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$watchlist = explode(',', $a->config["system"]["db_log_index_watch"]);
|
||||||
|
$blacklist = explode(',', $a->config["system"]["db_log_index_blacklist"]);
|
||||||
|
|
||||||
|
foreach ($r AS $row) {
|
||||||
|
if ((intval($a->config["system"]["db_loglimit_index"]) > 0)) {
|
||||||
|
$log = (in_array($row['key'], $watchlist) AND
|
||||||
|
($row['rows'] >= intval($a->config["system"]["db_loglimit_index"])));
|
||||||
|
} else
|
||||||
|
$log = false;
|
||||||
|
|
||||||
|
if ((intval($a->config["system"]["db_loglimit_index_high"]) > 0) AND ($row['rows'] >= intval($a->config["system"]["db_loglimit_index_high"]))) {
|
||||||
|
$log = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array($row['key'], $blacklist) OR ($row['key'] == "")) {
|
||||||
|
$log = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($log) {
|
||||||
|
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||||
|
@file_put_contents($a->config["system"]["db_log_index"], datetime_convert()."\t".
|
||||||
|
$row['key']."\t".$row['rows']."\t".$row['Extra']."\t".
|
||||||
|
basename($backtrace[1]["file"])."\t".
|
||||||
|
$backtrace[1]["line"]."\t".$backtrace[2]["function"]."\t".
|
||||||
|
substr($query, 0, 2000)."\n", FILE_APPEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function q($sql, $onlyquery = false) {
|
public function q($sql, $onlyquery = false) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
|
@ -375,6 +431,9 @@ function q($sql) {
|
||||||
//logger("dba: q: $stmt", LOGGER_ALL);
|
//logger("dba: q: $stmt", LOGGER_ALL);
|
||||||
if ($stmt === false)
|
if ($stmt === false)
|
||||||
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true), LOGGER_DEBUG);
|
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true), LOGGER_DEBUG);
|
||||||
|
|
||||||
|
$db->log_index($stmt);
|
||||||
|
|
||||||
return $db->q($stmt);
|
return $db->q($stmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,6 +467,9 @@ function qu($sql) {
|
||||||
$stmt = @vsprintf($sql,$args); // Disabled warnings
|
$stmt = @vsprintf($sql,$args); // Disabled warnings
|
||||||
if ($stmt === false)
|
if ($stmt === false)
|
||||||
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true), LOGGER_DEBUG);
|
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true), LOGGER_DEBUG);
|
||||||
|
|
||||||
|
$db->log_index($stmt);
|
||||||
|
|
||||||
$db->q("SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;");
|
$db->q("SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;");
|
||||||
$retval = $db->q($stmt);
|
$retval = $db->q($stmt);
|
||||||
$db->q("SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;");
|
$db->q("SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;");
|
||||||
|
|
|
@ -23,8 +23,7 @@ function dbclean_run(&$argv, &$argc) {
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
Config::load('config');
|
Config::load();
|
||||||
Config::load('system');
|
|
||||||
|
|
||||||
if (!Config::get('system', 'dbclean', false)) {
|
if (!Config::get('system', 'dbclean', false)) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -49,5 +49,42 @@ class dbm {
|
||||||
}
|
}
|
||||||
return (is_array($array) && count($array) > 0);
|
return (is_array($array) && count($array) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Callback function for "esc_array"
|
||||||
|
*
|
||||||
|
* @param mixed $value Array value
|
||||||
|
* @param string $key Array key
|
||||||
|
* @param boolean $add_quotation add quotation marks for string values
|
||||||
|
*/
|
||||||
|
private static function esc_array_callback(&$value, $key, $add_quotation) {
|
||||||
|
|
||||||
|
if (!$add_quotation) {
|
||||||
|
if (is_bool($value)) {
|
||||||
|
$value = ($value ? '1' : '0');
|
||||||
|
} else {
|
||||||
|
$value = dbesc($value);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_bool($value)) {
|
||||||
|
$value = ($value ? 'true' : 'false');
|
||||||
|
} elseif (is_float($value) OR is_integer($value)) {
|
||||||
|
$value = (string)$value;
|
||||||
|
} else {
|
||||||
|
$value = "'".dbesc($value)."'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Escapes a whole array
|
||||||
|
*
|
||||||
|
* @param mixed $arr Array with values to be escaped
|
||||||
|
* @param boolean $add_quotation add quotation marks for string values
|
||||||
|
*/
|
||||||
|
public static function esc_array(&$arr, $add_quotation = false) {
|
||||||
|
array_walk($arr, 'self::esc_array_callback', $add_quotation);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -176,15 +176,6 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
$definition = db_definition($charset);
|
$definition = db_definition($charset);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure index conversion to unique removes duplicates
|
|
||||||
$sql_config = "SET session old_alter_table=1;";
|
|
||||||
if ($verbose) {
|
|
||||||
echo $sql_config."\n";
|
|
||||||
}
|
|
||||||
if ($action) {
|
|
||||||
$db->q($sql_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
// MySQL >= 5.7.4 doesn't support the IGNORE keyword in ALTER TABLE statements
|
// MySQL >= 5.7.4 doesn't support the IGNORE keyword in ALTER TABLE statements
|
||||||
if ((version_compare($db->server_info(), '5.7.4') >= 0) AND
|
if ((version_compare($db->server_info(), '5.7.4') >= 0) AND
|
||||||
!(strpos($db->server_info(), 'MariaDB') !== false)) {
|
!(strpos($db->server_info(), 'MariaDB') !== false)) {
|
||||||
|
@ -196,7 +187,8 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
// Compare it
|
// Compare it
|
||||||
foreach ($definition AS $name => $structure) {
|
foreach ($definition AS $name => $structure) {
|
||||||
$is_new_table = False;
|
$is_new_table = False;
|
||||||
$sql3="";
|
$group_by = "";
|
||||||
|
$sql3 = "";
|
||||||
if (!isset($database[$name])) {
|
if (!isset($database[$name])) {
|
||||||
$r = db_create_table($name, $structure["fields"], $charset, $verbose, $action, $structure['indexes']);
|
$r = db_create_table($name, $structure["fields"], $charset, $verbose, $action, $structure['indexes']);
|
||||||
if (!dbm::is_result($r)) {
|
if (!dbm::is_result($r)) {
|
||||||
|
@ -204,6 +196,26 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
}
|
}
|
||||||
$is_new_table = True;
|
$is_new_table = True;
|
||||||
} else {
|
} else {
|
||||||
|
$is_unique = false;
|
||||||
|
$temp_name = $name;
|
||||||
|
|
||||||
|
foreach ($structure["indexes"] AS $indexname => $fieldnames) {
|
||||||
|
if (isset($database[$name]["indexes"][$indexname])) {
|
||||||
|
$current_index_definition = implode(",",$database[$name]["indexes"][$indexname]);
|
||||||
|
} else {
|
||||||
|
$current_index_definition = "__NOT_SET__";
|
||||||
|
}
|
||||||
|
$new_index_definition = implode(",",$fieldnames);
|
||||||
|
if ($current_index_definition != $new_index_definition) {
|
||||||
|
if ($fieldnames[0] == "UNIQUE") {
|
||||||
|
$is_unique = true;
|
||||||
|
if ($ignore == "") {
|
||||||
|
$temp_name = "temp-".$name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Drop the index if it isn't present in the definition
|
* Drop the index if it isn't present in the definition
|
||||||
* or the definition differ from current status
|
* or the definition differ from current status
|
||||||
|
@ -219,7 +231,7 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
if ($current_index_definition != $new_index_definition && substr($indexname, 0, 6) != 'local_') {
|
if ($current_index_definition != $new_index_definition && substr($indexname, 0, 6) != 'local_') {
|
||||||
$sql2=db_drop_index($indexname);
|
$sql2=db_drop_index($indexname);
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER".$ignore." TABLE `".$name."` ".$sql2;
|
$sql3 = "ALTER".$ignore." TABLE `".$temp_name."` ".$sql2;
|
||||||
} else {
|
} else {
|
||||||
$sql3 .= ", ".$sql2;
|
$sql3 .= ", ".$sql2;
|
||||||
}
|
}
|
||||||
|
@ -230,7 +242,7 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
if (!isset($database[$name]["fields"][$fieldname])) {
|
if (!isset($database[$name]["fields"][$fieldname])) {
|
||||||
$sql2=db_add_table_field($fieldname, $parameters);
|
$sql2=db_add_table_field($fieldname, $parameters);
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER TABLE `".$name."` ".$sql2;
|
$sql3 = "ALTER TABLE `".$temp_name."` ".$sql2;
|
||||||
} else {
|
} else {
|
||||||
$sql3 .= ", ".$sql2;
|
$sql3 .= ", ".$sql2;
|
||||||
}
|
}
|
||||||
|
@ -241,7 +253,7 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
if ($current_field_definition != $new_field_definition) {
|
if ($current_field_definition != $new_field_definition) {
|
||||||
$sql2=db_modify_table_field($fieldname, $parameters);
|
$sql2=db_modify_table_field($fieldname, $parameters);
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER TABLE `".$name."` ".$sql2;
|
$sql3 = "ALTER TABLE `".$temp_name."` ".$sql2;
|
||||||
} else {
|
} else {
|
||||||
$sql3 .= ", ".$sql2;
|
$sql3 .= ", ".$sql2;
|
||||||
}
|
}
|
||||||
|
@ -265,10 +277,15 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
}
|
}
|
||||||
$new_index_definition = implode(",",$fieldnames);
|
$new_index_definition = implode(",",$fieldnames);
|
||||||
if ($current_index_definition != $new_index_definition) {
|
if ($current_index_definition != $new_index_definition) {
|
||||||
$sql2=db_create_index($indexname, $fieldnames);
|
$sql2 = db_create_index($indexname, $fieldnames);
|
||||||
|
|
||||||
|
// Fetch the "group by" fields for unique indexes
|
||||||
|
if ($fieldnames[0] == "UNIQUE") {
|
||||||
|
$group_by = db_group_by($indexname, $fieldnames);
|
||||||
|
}
|
||||||
if ($sql2 != "") {
|
if ($sql2 != "") {
|
||||||
if ($sql3 == "")
|
if ($sql3 == "")
|
||||||
$sql3 = "ALTER" . $ignore . " TABLE `".$name."` ".$sql2;
|
$sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;
|
||||||
else
|
else
|
||||||
$sql3 .= ", ".$sql2;
|
$sql3 .= ", ".$sql2;
|
||||||
}
|
}
|
||||||
|
@ -278,13 +295,68 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
if ($sql3 != "") {
|
if ($sql3 != "") {
|
||||||
$sql3 .= ";";
|
$sql3 .= ";";
|
||||||
|
|
||||||
if ($verbose)
|
if ($verbose) {
|
||||||
|
// Ensure index conversion to unique removes duplicates
|
||||||
|
if ($is_unique) {
|
||||||
|
if ($ignore != "") {
|
||||||
|
echo "SET session old_alter_table=1;\n";
|
||||||
|
} else {
|
||||||
|
echo "CREATE TABLE `".$temp_name."` LIKE `".$name."`;\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo $sql3."\n";
|
echo $sql3."\n";
|
||||||
|
|
||||||
|
if ($is_unique) {
|
||||||
|
if ($ignore != "") {
|
||||||
|
echo "SET session old_alter_table=0;\n";
|
||||||
|
} else {
|
||||||
|
echo "INSERT INTO `".$temp_name."` SELECT * FROM `".$name."`".$group_by.";\n";
|
||||||
|
echo "DROP TABLE `".$name."`;\n";
|
||||||
|
echo "RENAME TABLE `".$temp_name."` TO `".$name."`;\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($action) {
|
if ($action) {
|
||||||
$r = @$db->q($sql3);
|
// Ensure index conversion to unique removes duplicates
|
||||||
if (dbm::is_result($r))
|
if ($is_unique) {
|
||||||
|
if ($ignore != "") {
|
||||||
|
$db->q("SET session old_alter_table=1;");
|
||||||
|
} else {
|
||||||
|
$r = $db->q("CREATE TABLE `".$temp_name."` LIKE `".$name."`;");
|
||||||
|
if (!dbm::is_result($r)) {
|
||||||
$errors .= t('Errors encountered performing database changes.').$sql3.EOL;
|
$errors .= t('Errors encountered performing database changes.').$sql3.EOL;
|
||||||
|
return $errors;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$r = @$db->q($sql3);
|
||||||
|
if (!dbm::is_result($r))
|
||||||
|
$errors .= t('Errors encountered performing database changes.').$sql3.EOL;
|
||||||
|
|
||||||
|
if ($is_unique) {
|
||||||
|
if ($ignore != "") {
|
||||||
|
$db->q("SET session old_alter_table=0;");
|
||||||
|
} else {
|
||||||
|
$r = $db->q("INSERT INTO `".$temp_name."` SELECT * FROM `".$name."`".$group_by.";");
|
||||||
|
if (!dbm::is_result($r)) {
|
||||||
|
$errors .= t('Errors encountered performing database changes.').$sql3.EOL;
|
||||||
|
return $errors;
|
||||||
|
}
|
||||||
|
$r = $db->q("DROP TABLE `".$name."`;");
|
||||||
|
if (!dbm::is_result($r)) {
|
||||||
|
$errors .= t('Errors encountered performing database changes.').$sql3.EOL;
|
||||||
|
return $errors;
|
||||||
|
}
|
||||||
|
$r = $db->q("RENAME TABLE `".$temp_name."` TO `".$name."`;");
|
||||||
|
if (!dbm::is_result($r)) {
|
||||||
|
$errors .= t('Errors encountered performing database changes.').$sql3.EOL;
|
||||||
|
return $errors;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -401,6 +473,30 @@ function db_create_index($indexname, $fieldnames, $method="ADD") {
|
||||||
return($sql);
|
return($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function db_group_by($indexname, $fieldnames) {
|
||||||
|
|
||||||
|
if ($fieldnames[0] != "UNIQUE") {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
array_shift($fieldnames);
|
||||||
|
|
||||||
|
$names = "";
|
||||||
|
foreach ($fieldnames AS $fieldname) {
|
||||||
|
if ($names != "")
|
||||||
|
$names .= ",";
|
||||||
|
|
||||||
|
if (preg_match('|(.+)\((\d+)\)|', $fieldname, $matches)) {
|
||||||
|
$names .= "`".dbesc($matches[1])."`";
|
||||||
|
} else {
|
||||||
|
$names .= "`".dbesc($fieldname)."`";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = sprintf(" GROUP BY %s", $names);
|
||||||
|
return $sql;
|
||||||
|
}
|
||||||
|
|
||||||
function db_index_suffix($charset, $reduce = 0) {
|
function db_index_suffix($charset, $reduce = 0) {
|
||||||
if ($charset != "utf8mb4") {
|
if ($charset != "utf8mb4") {
|
||||||
return "";
|
return "";
|
||||||
|
@ -419,7 +515,7 @@ function db_definition($charset) {
|
||||||
$database["addon"] = array(
|
$database["addon"] = array(
|
||||||
"fields" => array(
|
"fields" => array(
|
||||||
"id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
|
"id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
|
||||||
"name" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
"name" => array("type" => "varchar(190)", "not null" => "1", "default" => ""),
|
||||||
"version" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
"version" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
||||||
"installed" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
"installed" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||||
"hidden" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
"hidden" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||||
|
@ -428,6 +524,7 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
|
"name" => array("UNIQUE", "name"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$database["attach"] = array(
|
$database["attach"] = array(
|
||||||
|
@ -465,13 +562,12 @@ function db_definition($charset) {
|
||||||
$database["cache"] = array(
|
$database["cache"] = array(
|
||||||
"fields" => array(
|
"fields" => array(
|
||||||
"k" => array("type" => "varbinary(255)", "not null" => "1", "primary" => "1"),
|
"k" => array("type" => "varbinary(255)", "not null" => "1", "primary" => "1"),
|
||||||
"v" => array("type" => "text"),
|
"v" => array("type" => "mediumtext"),
|
||||||
"expire_mode" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
"expire_mode" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
||||||
"updated" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
|
"updated" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("k"),
|
"PRIMARY" => array("k"),
|
||||||
"updated" => array("updated"),
|
|
||||||
"expire_mode_updated" => array("expire_mode", "updated"),
|
"expire_mode_updated" => array("expire_mode", "updated"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -506,7 +602,7 @@ function db_definition($charset) {
|
||||||
"id" => array("type" => "int(10) unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
|
"id" => array("type" => "int(10) unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
|
||||||
"cat" => array("type" => "varbinary(255)", "not null" => "1", "default" => ""),
|
"cat" => array("type" => "varbinary(255)", "not null" => "1", "default" => ""),
|
||||||
"k" => array("type" => "varbinary(255)", "not null" => "1", "default" => ""),
|
"k" => array("type" => "varbinary(255)", "not null" => "1", "default" => ""),
|
||||||
"v" => array("type" => "text"),
|
"v" => array("type" => "mediumtext"),
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
|
@ -582,32 +678,34 @@ function db_definition($charset) {
|
||||||
"bd" => array("type" => "date", "not null" => "1", "default" => "0000-00-00"),
|
"bd" => array("type" => "date", "not null" => "1", "default" => "0000-00-00"),
|
||||||
"notify_new_posts" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
"notify_new_posts" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||||
"fetch_further_information" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
"fetch_further_information" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||||
"ffi_keyword_blacklist" => array("type" => "mediumtext"),
|
"ffi_keyword_blacklist" => array("type" => "text"),
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"uid_name" => array("uid", "name"),
|
"uid_name" => array("uid", "name"),
|
||||||
"uid_self" => array("uid", "self"),
|
"self_uid" => array("self", "uid"),
|
||||||
"alias_uid" => array("alias(32)", "uid"),
|
"alias_uid" => array("alias(32)", "uid"),
|
||||||
"uid_pending" => array("uid", "pending"),
|
"pending_uid" => array("pending", "uid"),
|
||||||
"uid_blocked" => array("uid", "blocked"),
|
"blocked_uid" => array("blocked", "uid"),
|
||||||
"uid_rel_network_poll" => array("uid", "rel", "network", "poll(64)", "archive"),
|
"uid_rel_network_poll" => array("uid", "rel", "network", "poll(64)", "archive"),
|
||||||
"uid_network_batch" => array("uid", "network", "batch(64)"),
|
"uid_network_batch" => array("uid", "network", "batch(64)"),
|
||||||
"addr_uid" => array("addr(32)", "uid"),
|
"addr_uid" => array("addr(32)", "uid"),
|
||||||
"nurl_uid" => array("nurl(32)", "uid"),
|
"nurl_uid" => array("nurl(32)", "uid"),
|
||||||
"nick_uid" => array("nick(32)", "uid"),
|
"nick_uid" => array("nick(32)", "uid"),
|
||||||
|
"dfrn-id" => array("dfrn-id"),
|
||||||
|
"issued-id" => array("issued-id"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$database["conv"] = array(
|
$database["conv"] = array(
|
||||||
"fields" => array(
|
"fields" => array(
|
||||||
"id" => array("type" => "int(10) unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
|
"id" => array("type" => "int(10) unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
|
||||||
"guid" => array("type" => "varchar(64)", "not null" => "1", "default" => ""),
|
"guid" => array("type" => "varchar(64)", "not null" => "1", "default" => ""),
|
||||||
"recips" => array("type" => "mediumtext"),
|
"recips" => array("type" => "text"),
|
||||||
"uid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
"uid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
||||||
"creator" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
"creator" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
||||||
"created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
|
"created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
|
||||||
"updated" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
|
"updated" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
|
||||||
"subject" => array("type" => "mediumtext"),
|
"subject" => array("type" => "text"),
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
|
@ -677,6 +775,7 @@ function db_definition($charset) {
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"addr" => array("addr(32)"),
|
"addr" => array("addr(32)"),
|
||||||
|
"url" => array("url"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$database["ffinder"] = array(
|
$database["ffinder"] = array(
|
||||||
|
@ -761,10 +860,11 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"nurl" => array("nurl(32)"),
|
"nurl" => array("nurl(64)"),
|
||||||
"name" => array("name(32)"),
|
"name" => array("name(64)"),
|
||||||
"nick" => array("nick(32)"),
|
"nick" => array("nick(32)"),
|
||||||
"addr" => array("addr(32)"),
|
"addr" => array("addr(64)"),
|
||||||
|
"hide_network_updated" => array("hide", "network", "updated"),
|
||||||
"updated" => array("updated"),
|
"updated" => array("updated"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -781,7 +881,6 @@ function db_definition($charset) {
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"cid_uid_gcid_zcid" => array("UNIQUE", "cid","uid","gcid","zcid"),
|
"cid_uid_gcid_zcid" => array("UNIQUE", "cid","uid","gcid","zcid"),
|
||||||
"gcid" => array("gcid"),
|
"gcid" => array("gcid"),
|
||||||
"zcid" => array("zcid"),
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$database["group"] = array(
|
$database["group"] = array(
|
||||||
|
@ -806,8 +905,8 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
|
"contactid" => array("contact-id"),
|
||||||
"gid_contactid" => array("gid", "contact-id"),
|
"gid_contactid" => array("gid", "contact-id"),
|
||||||
"uid_contactid" => array("uid", "contact-id"),
|
|
||||||
"uid_gid_contactid" => array("UNIQUE", "uid", "gid", "contact-id"),
|
"uid_gid_contactid" => array("UNIQUE", "uid", "gid", "contact-id"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -844,7 +943,7 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"hook_file_function" => array("hook(30)","file(60)","function(30)"),
|
"hook_file_function" => array("UNIQUE", "hook(50)","file(80)","function(60)"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$database["intro"] = array(
|
$database["intro"] = array(
|
||||||
|
@ -941,22 +1040,18 @@ function db_definition($charset) {
|
||||||
"parent-uri" => array("parent-uri"),
|
"parent-uri" => array("parent-uri"),
|
||||||
"extid" => array("extid"),
|
"extid" => array("extid"),
|
||||||
"uid_id" => array("uid","id"),
|
"uid_id" => array("uid","id"),
|
||||||
|
"uid_contactid_id" => array("uid","contact-id","id"),
|
||||||
"uid_created" => array("uid","created"),
|
"uid_created" => array("uid","created"),
|
||||||
"uid_unseen_contactid" => array("uid","unseen","contact-id"),
|
"uid_unseen_contactid" => array("uid","unseen","contact-id"),
|
||||||
"uid_network_received" => array("uid","network","received"),
|
"uid_network_received" => array("uid","network","received"),
|
||||||
"uid_received" => array("uid","received"),
|
|
||||||
"uid_network_commented" => array("uid","network","commented"),
|
"uid_network_commented" => array("uid","network","commented"),
|
||||||
"uid_title" => array("uid","title"),
|
|
||||||
"uid_thrparent" => array("uid","thr-parent"),
|
"uid_thrparent" => array("uid","thr-parent"),
|
||||||
"uid_parenturi" => array("uid","parent-uri"),
|
"uid_parenturi" => array("uid","parent-uri"),
|
||||||
"uid_contactid_id" => array("uid","contact-id","id"),
|
|
||||||
"uid_contactid_created" => array("uid","contact-id","created"),
|
"uid_contactid_created" => array("uid","contact-id","created"),
|
||||||
"authorid_created" => array("author-id","created"),
|
"authorid_created" => array("author-id","created"),
|
||||||
"uid_uri" => array("uid", "uri"),
|
"uid_uri" => array("uid", "uri"),
|
||||||
"uid_wall_created" => array("uid","wall","created"),
|
|
||||||
"resource-id" => array("resource-id"),
|
"resource-id" => array("resource-id"),
|
||||||
"uid_type" => array("uid","type"),
|
"contactid_allowcid_allowpid_denycid_denygid" => array("contact-id","allow_cid(10)","allow_gid(10)","deny_cid(10)","deny_gid(10)"), //
|
||||||
"contactid_allowcid_allowpid_denycid_denygid" => array("contact-id","allow_cid(10)","allow_gid(10)","deny_cid(10)","deny_gid(10)"),
|
|
||||||
"uid_type_changed" => array("uid","type","changed"),
|
"uid_type_changed" => array("uid","type","changed"),
|
||||||
"contactid_verb" => array("contact-id","verb"),
|
"contactid_verb" => array("contact-id","verb"),
|
||||||
"deleted_changed" => array("deleted","changed"),
|
"deleted_changed" => array("deleted","changed"),
|
||||||
|
@ -1015,7 +1110,6 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"uid" => array("uid"),
|
|
||||||
"uid_seen" => array("uid", "seen"),
|
"uid_seen" => array("uid", "seen"),
|
||||||
"convid" => array("convid"),
|
"convid" => array("convid"),
|
||||||
"uri" => array("uri(64)"),
|
"uri" => array("uri(64)"),
|
||||||
|
@ -1050,7 +1144,7 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"uid_mid" => array("uid","mid"),
|
"uid_mid" => array("UNIQUE", "uid","mid"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$database["notify"] = array(
|
$database["notify"] = array(
|
||||||
|
@ -1075,11 +1169,10 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"uid_hash" => array("uid", "hash"),
|
"hash_uid" => array("hash", "uid"),
|
||||||
"uid_seen_date" => array("uid", "seen", "date"),
|
"seen_uid_date" => array("seen", "uid", "date"),
|
||||||
"uid_type_link" => array("uid", "type", "link"),
|
|
||||||
"uid_link" => array("uid", "link"),
|
|
||||||
"uid_date" => array("uid", "date"),
|
"uid_date" => array("uid", "date"),
|
||||||
|
"uid_type_link" => array("uid", "type", "link"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$database["notify-threads"] = array(
|
$database["notify-threads"] = array(
|
||||||
|
@ -1092,13 +1185,12 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"master-parent-item" => array("master-parent-item"),
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$database["oembed"] = array(
|
$database["oembed"] = array(
|
||||||
"fields" => array(
|
"fields" => array(
|
||||||
"url" => array("type" => "varbinary(255)", "not null" => "1", "primary" => "1"),
|
"url" => array("type" => "varbinary(255)", "not null" => "1", "primary" => "1"),
|
||||||
"content" => array("type" => "text"),
|
"content" => array("type" => "mediumtext"),
|
||||||
"created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
|
"created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
|
@ -1111,7 +1203,7 @@ function db_definition($charset) {
|
||||||
"url" => array("type" => "varbinary(255)", "not null" => "1", "primary" => "1"),
|
"url" => array("type" => "varbinary(255)", "not null" => "1", "primary" => "1"),
|
||||||
"guessing" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"),
|
"guessing" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"),
|
||||||
"oembed" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"),
|
"oembed" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"),
|
||||||
"content" => array("type" => "text"),
|
"content" => array("type" => "mediumtext"),
|
||||||
"created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
|
"created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
|
@ -1161,7 +1253,7 @@ function db_definition($charset) {
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"uid_contactid" => array("uid", "contact-id"),
|
"uid_contactid" => array("uid", "contact-id"),
|
||||||
"uid_profile" => array("uid", "profile"),
|
"uid_profile" => array("uid", "profile"),
|
||||||
"uid_album_created" => array("uid", "album(32)", "created"),
|
"uid_album_scale_created" => array("uid", "album(32)", "scale", "created"),
|
||||||
"uid_album_resource-id_created" => array("uid", "album(32)", "resource-id(64)", "created"),
|
"uid_album_resource-id_created" => array("uid", "album(32)", "resource-id(64)", "created"),
|
||||||
"resource-id" => array("resource-id(64)"),
|
"resource-id" => array("resource-id(64)"),
|
||||||
)
|
)
|
||||||
|
@ -1170,16 +1262,16 @@ function db_definition($charset) {
|
||||||
"fields" => array(
|
"fields" => array(
|
||||||
"id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
|
"id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
|
||||||
"uid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
"uid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
||||||
"q0" => array("type" => "mediumtext"),
|
"q0" => array("type" => "text"),
|
||||||
"q1" => array("type" => "mediumtext"),
|
"q1" => array("type" => "text"),
|
||||||
"q2" => array("type" => "mediumtext"),
|
"q2" => array("type" => "text"),
|
||||||
"q3" => array("type" => "mediumtext"),
|
"q3" => array("type" => "text"),
|
||||||
"q4" => array("type" => "mediumtext"),
|
"q4" => array("type" => "text"),
|
||||||
"q5" => array("type" => "mediumtext"),
|
"q5" => array("type" => "text"),
|
||||||
"q6" => array("type" => "mediumtext"),
|
"q6" => array("type" => "text"),
|
||||||
"q7" => array("type" => "mediumtext"),
|
"q7" => array("type" => "text"),
|
||||||
"q8" => array("type" => "mediumtext"),
|
"q8" => array("type" => "text"),
|
||||||
"q9" => array("type" => "mediumtext"),
|
"q9" => array("type" => "text"),
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
|
@ -1256,6 +1348,7 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
|
"uid_is-default" => array("uid", "is-default"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$database["profile_check"] = array(
|
$database["profile_check"] = array(
|
||||||
|
@ -1391,8 +1484,6 @@ function db_definition($charset) {
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("tid"),
|
"PRIMARY" => array("tid"),
|
||||||
"oid_otype_type_term" => array("oid","otype","type","term"),
|
"oid_otype_type_term" => array("oid","otype","type","term"),
|
||||||
"uid_term_tid" => array("uid","term(32)","tid"),
|
|
||||||
"type_term" => array("type","term(32)"),
|
|
||||||
"uid_otype_type_term_global_created" => array("uid","otype","type","term(32)","global","created"),
|
"uid_otype_type_term_global_created" => array("uid","otype","type","term(32)","global","created"),
|
||||||
"uid_otype_type_url" => array("uid","otype","type","url(64)"),
|
"uid_otype_type_url" => array("uid","otype","type","url(64)"),
|
||||||
"guid" => array("guid(64)"),
|
"guid" => array("guid(64)"),
|
||||||
|
@ -1429,8 +1520,6 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("iid"),
|
"PRIMARY" => array("iid"),
|
||||||
"created" => array("created"),
|
|
||||||
"commented" => array("commented"),
|
|
||||||
"uid_network_commented" => array("uid","network","commented"),
|
"uid_network_commented" => array("uid","network","commented"),
|
||||||
"uid_network_created" => array("uid","network","created"),
|
"uid_network_created" => array("uid","network","created"),
|
||||||
"uid_contactid_commented" => array("uid","contact-id","commented"),
|
"uid_contactid_commented" => array("uid","contact-id","commented"),
|
||||||
|
@ -1524,7 +1613,6 @@ function db_definition($charset) {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
"created" => array("created"),
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
|
|
||||||
function dbupdate_run(&$argv, &$argc) {
|
function dbupdate_run(&$argv, &$argc) {
|
||||||
|
@ -16,8 +18,11 @@ function dbupdate_run(&$argv, &$argc) {
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
// We are deleting the latest dbupdate entry.
|
||||||
|
// This is done to avoid endless loops because the update was interupted.
|
||||||
|
Config::delete('database','dbupdate_'.DB_UPDATE_VERSION);
|
||||||
|
|
||||||
update_db($a);
|
update_db($a);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once('include/queue_fn.php');
|
require_once('include/queue_fn.php');
|
||||||
require_once('include/html2plain.php');
|
require_once('include/html2plain.php');
|
||||||
|
@ -27,8 +30,7 @@ function delivery_run(&$argv, &$argc){
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
require_once('include/email.php');
|
require_once('include/email.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
load_hooks();
|
load_hooks();
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ class dfrn {
|
||||||
`contact`.`name-date`, `contact`.`uri-date`, `contact`.`avatar-date`,
|
`contact`.`name-date`, `contact`.`uri-date`, `contact`.`avatar-date`,
|
||||||
`contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
|
`contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
|
||||||
`sign`.`signed_text`, `sign`.`signature`, `sign`.`signer`
|
`sign`.`signed_text`, `sign`.`signature`, `sign`.`signer`
|
||||||
FROM `item` USE INDEX (`uid_wall_changed`, `uid_type_changed`) $sql_post_table
|
FROM `item` USE INDEX (`uid_wall_changed`) $sql_post_table
|
||||||
STRAIGHT_JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
|
STRAIGHT_JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
|
||||||
AND (NOT `contact`.`blocked` OR `contact`.`pending`)
|
AND (NOT `contact`.`blocked` OR `contact`.`pending`)
|
||||||
LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id`
|
LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id`
|
||||||
|
@ -1105,12 +1105,22 @@ class dfrn {
|
||||||
*/
|
*/
|
||||||
private function birthday_event($contact, $birthday) {
|
private function birthday_event($contact, $birthday) {
|
||||||
|
|
||||||
|
// Check for duplicates
|
||||||
|
$r = q("SELECT `id` FROM `event` WHERE `uid` = %d AND `cid` = %d AND `start` = '%s' AND `type` = '%s' LIMIT 1",
|
||||||
|
intval($contact["uid"]),
|
||||||
|
intval($contact["id"]),
|
||||||
|
dbesc(datetime_convert("UTC","UTC", $birthday)),
|
||||||
|
dbesc("birthday"));
|
||||||
|
|
||||||
|
if (dbm::is_result($r)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
logger("updating birthday: ".$birthday." for contact ".$contact["id"]);
|
logger("updating birthday: ".$birthday." for contact ".$contact["id"]);
|
||||||
|
|
||||||
$bdtext = sprintf(t("%s\'s birthday"), $contact["name"]);
|
$bdtext = sprintf(t("%s\'s birthday"), $contact["name"]);
|
||||||
$bdtext2 = sprintf(t("Happy Birthday %s"), " [url=".$contact["url"]."]".$contact["name"]."[/url]") ;
|
$bdtext2 = sprintf(t("Happy Birthday %s"), " [url=".$contact["url"]."]".$contact["name"]."[/url]") ;
|
||||||
|
|
||||||
|
|
||||||
$r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`)
|
$r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`)
|
||||||
VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s') ",
|
VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s') ",
|
||||||
intval($contact["uid"]),
|
intval($contact["uid"]),
|
||||||
|
@ -1411,9 +1421,9 @@ class dfrn {
|
||||||
$msg["seen"] = 0;
|
$msg["seen"] = 0;
|
||||||
$msg["replied"] = 0;
|
$msg["replied"] = 0;
|
||||||
|
|
||||||
dbesc_array($msg);
|
dbm::esc_array($msg, true);
|
||||||
|
|
||||||
$r = dbq("INSERT INTO `mail` (`".implode("`, `", array_keys($msg))."`) VALUES ('".implode("', '", array_values($msg))."')");
|
$r = dbq("INSERT INTO `mail` (`".implode("`, `", array_keys($msg))."`) VALUES (".implode(", ", array_values($msg)).")");
|
||||||
|
|
||||||
// send notifications.
|
// send notifications.
|
||||||
|
|
||||||
|
|
|
@ -45,13 +45,13 @@ class Diaspora {
|
||||||
|
|
||||||
foreach($servers AS $server) {
|
foreach($servers AS $server) {
|
||||||
$server = trim($server);
|
$server = trim($server);
|
||||||
|
$addr = "relay@".str_replace("http://", "", normalise_link($server));
|
||||||
$batch = $server."/receive/public";
|
$batch = $server."/receive/public";
|
||||||
|
|
||||||
$relais = q("SELECT `batch`, `id`, `name`,`network` FROM `contact` WHERE `uid` = 0 AND `batch` = '%s' LIMIT 1", dbesc($batch));
|
$relais = q("SELECT `batch`, `id`, `name`,`network` FROM `contact` WHERE `uid` = 0 AND `batch` = '%s' AND `addr` = '%s' AND `nurl` = '%s' LIMIT 1",
|
||||||
|
dbesc($batch), dbesc($addr), dbesc(normalise_link($server)));
|
||||||
|
|
||||||
if (!$relais) {
|
if (!$relais) {
|
||||||
$addr = "relay@".str_replace("http://", "", normalise_link($server));
|
|
||||||
|
|
||||||
$r = q("INSERT INTO `contact` (`uid`, `created`, `name`, `nick`, `addr`, `url`, `nurl`, `batch`, `network`, `rel`, `blocked`, `pending`, `writable`, `name-date`, `uri-date`, `avatar-date`)
|
$r = q("INSERT INTO `contact` (`uid`, `created`, `name`, `nick`, `addr`, `url`, `nurl`, `batch`, `network`, `rel`, `blocked`, `pending`, `writable`, `name-date`, `uri-date`, `avatar-date`)
|
||||||
VALUES (0, '%s', '%s', 'relay', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 1, '%s', '%s', '%s')",
|
VALUES (0, '%s', '%s', 'relay', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 1, '%s', '%s', '%s')",
|
||||||
datetime_convert(),
|
datetime_convert(),
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
function directory_run(&$argv, &$argc){
|
function directory_run(&$argv, &$argc){
|
||||||
global $a, $db;
|
global $a, $db;
|
||||||
|
|
||||||
|
@ -15,15 +17,11 @@ function directory_run(&$argv, &$argc){
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
};
|
};
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
|
|
||||||
if($argc != 2)
|
if($argc != 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
load_hooks();
|
load_hooks();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once("include/socgraph.php");
|
require_once("include/socgraph.php");
|
||||||
|
|
||||||
|
|
||||||
function discover_poco_run(&$argv, &$argc){
|
function discover_poco_run(&$argv, &$argc){
|
||||||
global $a, $db;
|
global $a, $db;
|
||||||
|
|
||||||
|
@ -21,8 +22,7 @@ function discover_poco_run(&$argv, &$argc){
|
||||||
require_once('include/session.php');
|
require_once('include/session.php');
|
||||||
require_once('include/datetime.php');
|
require_once('include/datetime.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
// Don't check this stuff if the function is called by the poller
|
// Don't check this stuff if the function is called by the poller
|
||||||
if (App::callstack() != "poller_run")
|
if (App::callstack() != "poller_run")
|
||||||
|
|
|
@ -493,6 +493,26 @@ function get_event_strings() {
|
||||||
return $i18n;
|
return $i18n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @todo We should replace this with a separate update function if there is some time left
|
||||||
|
/**
|
||||||
|
* @brief Removes duplicated birthday events
|
||||||
|
*
|
||||||
|
* @param array $dates Array of possibly duplicated events
|
||||||
|
* @return array Cleaned events
|
||||||
|
*/
|
||||||
|
function event_remove_duplicates($dates) {
|
||||||
|
$dates2 = array();
|
||||||
|
|
||||||
|
foreach ($dates AS $date) {
|
||||||
|
if ($date['type'] == 'birthday') {
|
||||||
|
$dates2[$date['uid']."-".$date['cid']."-".$date['start']] = $date;
|
||||||
|
} else {
|
||||||
|
$dates2[] = $date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $dates2;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get an event by its event ID
|
* @brief Get an event by its event ID
|
||||||
*
|
*
|
||||||
|
@ -516,9 +536,9 @@ function event_by_id($owner_uid = 0, $event_params, $sql_extra = '') {
|
||||||
intval($event_params["event_id"])
|
intval($event_params["event_id"])
|
||||||
);
|
);
|
||||||
|
|
||||||
if (dbm::is_result($r))
|
if (dbm::is_result($r)) {
|
||||||
return $r;
|
return event_remove_duplicates($r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -558,8 +578,9 @@ function events_by_date($owner_uid = 0, $event_params, $sql_extra = '') {
|
||||||
dbesc($event_params["adjust_finish"])
|
dbesc($event_params["adjust_finish"])
|
||||||
);
|
);
|
||||||
|
|
||||||
if (dbm::is_result($r))
|
if (dbm::is_result($r)) {
|
||||||
return $r;
|
return event_remove_duplicates($r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -568,7 +589,7 @@ function events_by_date($owner_uid = 0, $event_params, $sql_extra = '') {
|
||||||
* @param array $arr Event query array
|
* @param array $arr Event query array
|
||||||
* @return array Event array for the template
|
* @return array Event array for the template
|
||||||
*/
|
*/
|
||||||
function process_events ($arr) {
|
function process_events($arr) {
|
||||||
$events=array();
|
$events=array();
|
||||||
|
|
||||||
$last_date = '';
|
$last_date = '';
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
|
|
||||||
function expire_run(&$argv, &$argc){
|
function expire_run(&$argv, &$argc){
|
||||||
|
@ -21,8 +23,7 @@ function expire_run(&$argv, &$argc){
|
||||||
require_once('include/items.php');
|
require_once('include/items.php');
|
||||||
require_once('include/Contact.php');
|
require_once('include/Contact.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,6 @@
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function feature_enabled($uid, $feature) {
|
function feature_enabled($uid, $feature) {
|
||||||
|
|
||||||
if (($feature == 'richtext') AND !get_app()->theme_richtext_editor) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$x = get_config('feature_lock', $feature);
|
$x = get_config('feature_lock', $feature);
|
||||||
|
|
||||||
if ($x === false) {
|
if ($x === false) {
|
||||||
|
@ -77,7 +72,6 @@ function get_features($filtered = true) {
|
||||||
// Post composition
|
// Post composition
|
||||||
'composition' => array(
|
'composition' => array(
|
||||||
t('Post Composition Features'),
|
t('Post Composition Features'),
|
||||||
array('richtext', t('Richtext Editor'), t('Enable richtext editor'), false, get_config('feature_lock','richtext')),
|
|
||||||
array('preview', t('Post Preview'), t('Allow previewing posts and comments before publishing them'), false, get_config('feature_lock','preview')),
|
array('preview', t('Post Preview'), t('Allow previewing posts and comments before publishing them'), false, get_config('feature_lock','preview')),
|
||||||
array('aclautomention', t('Auto-mention Forums'), t('Add/remove mention when a forum page is selected/deselected in ACL window.'), false, get_config('feature_lock','aclautomention')),
|
array('aclautomention', t('Auto-mention Forums'), t('Add/remove mention when a forum page is selected/deselected in ACL window.'), false, get_config('feature_lock','aclautomention')),
|
||||||
),
|
),
|
||||||
|
@ -142,11 +136,6 @@ function get_features($filtered = true) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the richtext editor setting if the theme doesn't support it
|
|
||||||
if (!get_app()->theme_richtext_editor) {
|
|
||||||
unset($arr['composition'][1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
call_hooks('get_features',$arr);
|
call_hooks('get_features',$arr);
|
||||||
return $arr;
|
return $arr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once('include/Scrape.php');
|
require_once('include/Scrape.php');
|
||||||
require_once('include/socgraph.php');
|
require_once('include/socgraph.php');
|
||||||
|
@ -21,8 +23,7 @@ function gprobe_run(&$argv, &$argc){
|
||||||
require_once('include/session.php');
|
require_once('include/session.php');
|
||||||
require_once('include/datetime.php');
|
require_once('include/datetime.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
require_once('include/ForumManager.php');
|
require_once('include/ForumManager.php');
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
require_once("mod/proxy.php");
|
require_once("mod/proxy.php");
|
||||||
|
require_once('include/cache.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -453,6 +454,9 @@ function get_birthdays() {
|
||||||
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
|
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
|
||||||
$bd_short = t('F d');
|
$bd_short = t('F d');
|
||||||
|
|
||||||
|
$cachekey = "get_birthdays:".local_user();
|
||||||
|
$r = Cache::get($cachekey);
|
||||||
|
if (is_null($r)) {
|
||||||
$r = q("SELECT `event`.*, `event`.`id` AS `eid`, `contact`.* FROM `event`
|
$r = q("SELECT `event`.*, `event`.`id` AS `eid`, `contact`.* FROM `event`
|
||||||
INNER JOIN `contact` ON `contact`.`id` = `event`.`cid`
|
INNER JOIN `contact` ON `contact`.`id` = `event`.`cid`
|
||||||
WHERE `event`.`uid` = %d AND `type` = 'birthday' AND `start` < '%s' AND `finish` > '%s'
|
WHERE `event`.`uid` = %d AND `type` = 'birthday' AND `start` < '%s' AND `finish` > '%s'
|
||||||
|
@ -461,7 +465,10 @@ function get_birthdays() {
|
||||||
dbesc(datetime_convert('UTC','UTC','now + 6 days')),
|
dbesc(datetime_convert('UTC','UTC','now + 6 days')),
|
||||||
dbesc(datetime_convert('UTC','UTC','now'))
|
dbesc(datetime_convert('UTC','UTC','now'))
|
||||||
);
|
);
|
||||||
|
if (dbm::is_result($r)) {
|
||||||
|
Cache::set($cachekey, $r, CACHE_HOUR);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$now = strtotime('now');
|
$now = strtotime('now');
|
||||||
|
|
|
@ -820,7 +820,7 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
|
||||||
// Store the unescaped version
|
// Store the unescaped version
|
||||||
$unescaped = $arr;
|
$unescaped = $arr;
|
||||||
|
|
||||||
dbesc_array($arr);
|
dbm::esc_array($arr, true);
|
||||||
|
|
||||||
logger('item_store: ' . print_r($arr,true), LOGGER_DATA);
|
logger('item_store: ' . print_r($arr,true), LOGGER_DATA);
|
||||||
|
|
||||||
|
@ -829,9 +829,9 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
|
||||||
|
|
||||||
$r = dbq("INSERT INTO `item` (`"
|
$r = dbq("INSERT INTO `item` (`"
|
||||||
. implode("`, `", array_keys($arr))
|
. implode("`, `", array_keys($arr))
|
||||||
. "`) VALUES ('"
|
. "`) VALUES ("
|
||||||
. implode("', '", array_values($arr))
|
. implode(", ", array_values($arr))
|
||||||
. "')");
|
. ")");
|
||||||
|
|
||||||
// And restore it
|
// And restore it
|
||||||
$arr = $unescaped;
|
$arr = $unescaped;
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once('include/queue_fn.php');
|
require_once('include/queue_fn.php');
|
||||||
require_once('include/html2plain.php');
|
require_once('include/html2plain.php');
|
||||||
|
@ -59,8 +62,8 @@ function notifier_run(&$argv, &$argc){
|
||||||
require_once('include/items.php');
|
require_once('include/items.php');
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
require_once('include/email.php');
|
require_once('include/email.php');
|
||||||
load_config('config');
|
|
||||||
load_config('system');
|
Config::load();
|
||||||
|
|
||||||
load_hooks();
|
load_hooks();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once("include/follow.php");
|
require_once("include/follow.php");
|
||||||
|
|
||||||
|
@ -32,8 +34,7 @@ function onepoll_run(&$argv, &$argc){
|
||||||
require_once('include/socgraph.php');
|
require_once('include/socgraph.php');
|
||||||
require_once('include/queue_fn.php');
|
require_once('include/queue_fn.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("include/dba.php");
|
require_once("include/dba.php");
|
||||||
|
|
||||||
if(! function_exists('get_browser_language')) {
|
if(! function_exists('get_browser_language')) {
|
||||||
|
@ -47,12 +49,12 @@ function get_browser_language() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(isset($preferred))
|
if (isset($preferred)) {
|
||||||
return $preferred;
|
return $preferred;
|
||||||
|
}
|
||||||
|
|
||||||
// in case none matches, get the system wide configured language, or fall back to English
|
// in case none matches, get the system wide configured language, or fall back to English
|
||||||
$a = get_app();
|
return Config::get('system', 'language', 'en');
|
||||||
return ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en');
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ function photo_albums($uid, $update = false) {
|
||||||
/// @todo This query needs to be renewed. It is really slow
|
/// @todo This query needs to be renewed. It is really slow
|
||||||
// At this time we just store the data in the cache
|
// At this time we just store the data in the cache
|
||||||
$albums = qu("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`
|
$albums = qu("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`
|
||||||
FROM `photo` USE INDEX (`uid_album_created`)
|
FROM `photo`
|
||||||
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra
|
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra
|
||||||
GROUP BY `album` ORDER BY `created` DESC",
|
GROUP BY `album` ORDER BY `created` DESC",
|
||||||
intval($uid),
|
intval($uid),
|
||||||
|
@ -59,7 +59,7 @@ function photo_albums($uid, $update = false) {
|
||||||
} else {
|
} else {
|
||||||
// This query doesn't do the count and is much faster
|
// This query doesn't do the count and is much faster
|
||||||
$albums = qu("SELECT DISTINCT(`album`), '' AS `total`
|
$albums = qu("SELECT DISTINCT(`album`), '' AS `total`
|
||||||
FROM `photo` USE INDEX (`uid_album_created`)
|
FROM `photo`
|
||||||
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra
|
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra
|
||||||
GROUP BY `album` ORDER BY `created` DESC",
|
GROUP BY `album` ORDER BY `created` DESC",
|
||||||
intval($uid),
|
intval($uid),
|
||||||
|
|
|
@ -272,12 +272,13 @@ function shortenmsg($msg, $limit, $twitter = false) {
|
||||||
$lines = explode("\n", $msg);
|
$lines = explode("\n", $msg);
|
||||||
$msg = "";
|
$msg = "";
|
||||||
$recycle = html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8');
|
$recycle = html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8');
|
||||||
|
$ellipsis = html_entity_decode("…", ENT_QUOTES, 'UTF-8');
|
||||||
foreach ($lines AS $row=>$line) {
|
foreach ($lines AS $row=>$line) {
|
||||||
if (iconv_strlen(trim($msg."\n".$line), "UTF-8") <= $limit)
|
if (iconv_strlen(trim($msg."\n".$line), "UTF-8") <= $limit)
|
||||||
$msg = trim($msg."\n".$line);
|
$msg = trim($msg."\n".$line);
|
||||||
// Is the new message empty by now or is it a reshared message?
|
// Is the new message empty by now or is it a reshared message?
|
||||||
elseif (($msg == "") OR (($row == 1) AND (substr($msg, 0, 4) == $recycle)))
|
elseif (($msg == "") OR (($row == 1) AND (substr($msg, 0, 4) == $recycle)))
|
||||||
$msg = iconv_substr(iconv_substr(trim($msg."\n".$line), 0, $limit, "UTF-8"), 0, -3, "UTF-8")."...";
|
$msg = iconv_substr(iconv_substr(trim($msg."\n".$line), 0, $limit, "UTF-8"), 0, -3, "UTF-8").$ellipsis;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,9 @@ function poller_run($argv, $argc){
|
||||||
};
|
};
|
||||||
|
|
||||||
// Quit when in maintenance
|
// Quit when in maintenance
|
||||||
if (get_config('system', 'maintenance', true))
|
if (Config::get('system', 'maintenance', true)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$a->start_process();
|
$a->start_process();
|
||||||
|
|
||||||
|
@ -90,10 +91,8 @@ function poller_execute($queue) {
|
||||||
|
|
||||||
$mypid = getmypid();
|
$mypid = getmypid();
|
||||||
|
|
||||||
$cooldown = Config::get("system", "worker_cooldown", 0);
|
|
||||||
|
|
||||||
// Quit when in maintenance
|
// Quit when in maintenance
|
||||||
if (get_config('system', 'maintenance', true)) {
|
if (Config::get('system', 'maintenance', true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,8 +136,6 @@ function poller_execute($queue) {
|
||||||
|
|
||||||
$argv = json_decode($queue["parameter"]);
|
$argv = json_decode($queue["parameter"]);
|
||||||
|
|
||||||
$argc = count($argv);
|
|
||||||
|
|
||||||
// Check for existance and validity of the include file
|
// Check for existance and validity of the include file
|
||||||
$include = $argv[0];
|
$include = $argv[0];
|
||||||
|
|
||||||
|
@ -153,23 +150,8 @@ function poller_execute($queue) {
|
||||||
$funcname = str_replace(".php", "", basename($argv[0]))."_run";
|
$funcname = str_replace(".php", "", basename($argv[0]))."_run";
|
||||||
|
|
||||||
if (function_exists($funcname)) {
|
if (function_exists($funcname)) {
|
||||||
logger("Process ".$mypid." - Prio ".$queue["priority"]." - ID ".$queue["id"].": ".$funcname." ".$queue["parameter"]);
|
|
||||||
|
|
||||||
// For better logging create a new process id for every worker call
|
poller_exec_function($queue, $funcname, $argv);
|
||||||
// But preserve the old one for the worker
|
|
||||||
$old_process_id = $a->process_id;
|
|
||||||
$a->process_id = uniqid("wrk", true);
|
|
||||||
|
|
||||||
$funcname($argv, $argc);
|
|
||||||
|
|
||||||
$a->process_id = $old_process_id;
|
|
||||||
|
|
||||||
if ($cooldown > 0) {
|
|
||||||
logger("Process ".$mypid." - Prio ".$queue["priority"]." - ID ".$queue["id"].": ".$funcname." - in cooldown for ".$cooldown." seconds");
|
|
||||||
sleep($cooldown);
|
|
||||||
}
|
|
||||||
|
|
||||||
logger("Process ".$mypid." - Prio ".$queue["priority"]." - ID ".$queue["id"].": ".$funcname." - done");
|
|
||||||
|
|
||||||
q("DELETE FROM `workerqueue` WHERE `id` = %d", intval($queue["id"]));
|
q("DELETE FROM `workerqueue` WHERE `id` = %d", intval($queue["id"]));
|
||||||
} else {
|
} else {
|
||||||
|
@ -179,6 +161,104 @@ function poller_execute($queue) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Execute a function from the queue
|
||||||
|
*
|
||||||
|
* @param array $queue Workerqueue entry
|
||||||
|
* @param string $funcname name of the function
|
||||||
|
* @param array $argv Array of values to be passed to the function
|
||||||
|
*/
|
||||||
|
function poller_exec_function($queue, $funcname, $argv) {
|
||||||
|
|
||||||
|
$a = get_app();
|
||||||
|
|
||||||
|
$mypid = getmypid();
|
||||||
|
|
||||||
|
$argc = count($argv);
|
||||||
|
|
||||||
|
logger("Process ".$mypid." - Prio ".$queue["priority"]." - ID ".$queue["id"].": ".$funcname." ".$queue["parameter"]);
|
||||||
|
|
||||||
|
$stamp = (float)microtime(true);
|
||||||
|
|
||||||
|
// We use the callstack here to analyze the performance of executed worker entries.
|
||||||
|
// For this reason the variables have to be initialized.
|
||||||
|
if (Config::get("system", "profiler")) {
|
||||||
|
$a->performance["start"] = microtime(true);
|
||||||
|
$a->performance["database"] = 0;
|
||||||
|
$a->performance["database_write"] = 0;
|
||||||
|
$a->performance["network"] = 0;
|
||||||
|
$a->performance["file"] = 0;
|
||||||
|
$a->performance["rendering"] = 0;
|
||||||
|
$a->performance["parser"] = 0;
|
||||||
|
$a->performance["marktime"] = 0;
|
||||||
|
$a->performance["markstart"] = microtime(true);
|
||||||
|
$a->callstack = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
// For better logging create a new process id for every worker call
|
||||||
|
// But preserve the old one for the worker
|
||||||
|
$old_process_id = $a->process_id;
|
||||||
|
$a->process_id = uniqid("wrk", true);
|
||||||
|
|
||||||
|
$funcname($argv, $argc);
|
||||||
|
|
||||||
|
$a->process_id = $old_process_id;
|
||||||
|
|
||||||
|
$duration = number_format(microtime(true) - $stamp, 3);
|
||||||
|
|
||||||
|
logger("Process ".$mypid." - Prio ".$queue["priority"]." - ID ".$queue["id"].": ".$funcname." - done in ".$duration." seconds.");
|
||||||
|
|
||||||
|
// Write down the performance values into the log
|
||||||
|
if (Config::get("system", "profiler")) {
|
||||||
|
$duration = microtime(true)-$a->performance["start"];
|
||||||
|
|
||||||
|
if (Config::get("rendertime", "callstack")) {
|
||||||
|
if (isset($a->callstack["database"])) {
|
||||||
|
$o = "\nDatabase Read:\n";
|
||||||
|
foreach ($a->callstack["database"] AS $func => $time) {
|
||||||
|
$time = round($time, 3);
|
||||||
|
if ($time > 0)
|
||||||
|
$o .= $func.": ".$time."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isset($a->callstack["database_write"])) {
|
||||||
|
$o .= "\nDatabase Write:\n";
|
||||||
|
foreach ($a->callstack["database_write"] AS $func => $time) {
|
||||||
|
$time = round($time, 3);
|
||||||
|
if ($time > 0)
|
||||||
|
$o .= $func.": ".$time."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isset($a->callstack["network"])) {
|
||||||
|
$o .= "\nNetwork:\n";
|
||||||
|
foreach ($a->callstack["network"] AS $func => $time) {
|
||||||
|
$time = round($time, 3);
|
||||||
|
if ($time > 0)
|
||||||
|
$o .= $func.": ".$time."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$o = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
logger("ID ".$queue["id"].": ".$funcname.": ".sprintf("DB: %s/%s, Net: %s, I/O: %s, Other: %s, Total: %s".$o,
|
||||||
|
number_format($a->performance["database"] - $a->performance["database_write"], 2),
|
||||||
|
number_format($a->performance["database_write"], 2),
|
||||||
|
number_format($a->performance["network"], 2),
|
||||||
|
number_format($a->performance["file"], 2),
|
||||||
|
number_format($duration - ($a->performance["database"] + $a->performance["network"] + $a->performance["file"]), 2),
|
||||||
|
number_format($duration, 2)),
|
||||||
|
LOGGER_DEBUG);
|
||||||
|
}
|
||||||
|
|
||||||
|
$cooldown = Config::get("system", "worker_cooldown", 0);
|
||||||
|
|
||||||
|
if ($cooldown > 0) {
|
||||||
|
logger("Process ".$mypid." - Prio ".$queue["priority"]." - ID ".$queue["id"].": ".$funcname." - in cooldown for ".$cooldown." seconds");
|
||||||
|
sleep($cooldown);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Checks if the number of database connections has reached a critical limit.
|
* @brief Checks if the number of database connections has reached a critical limit.
|
||||||
*
|
*
|
||||||
|
@ -187,7 +267,7 @@ function poller_execute($queue) {
|
||||||
function poller_max_connections_reached() {
|
function poller_max_connections_reached() {
|
||||||
|
|
||||||
// Fetch the max value from the config. This is needed when the system cannot detect the correct value by itself.
|
// Fetch the max value from the config. This is needed when the system cannot detect the correct value by itself.
|
||||||
$max = get_config("system", "max_connections");
|
$max = Config::get("system", "max_connections");
|
||||||
|
|
||||||
// Fetch the percentage level where the poller will get active
|
// Fetch the percentage level where the poller will get active
|
||||||
$maxlevel = Config::get("system", "max_connections_level", 75);
|
$maxlevel = Config::get("system", "max_connections_level", 75);
|
||||||
|
@ -371,7 +451,7 @@ function poller_too_much_workers() {
|
||||||
logger("Load: ".$load."/".$maxsysload." - processes: ".$active."/".$entries." (".$processlist.") - maximum: ".$queues."/".$maxqueues, LOGGER_DEBUG);
|
logger("Load: ".$load."/".$maxsysload." - processes: ".$active."/".$entries." (".$processlist.") - maximum: ".$queues."/".$maxqueues, LOGGER_DEBUG);
|
||||||
|
|
||||||
// Are there fewer workers running as possible? Then fork a new one.
|
// Are there fewer workers running as possible? Then fork a new one.
|
||||||
if (!get_config("system", "worker_dont_fork") AND ($queues > ($active + 1)) AND ($entries > 1)) {
|
if (!Config::get("system", "worker_dont_fork") AND ($queues > ($active + 1)) AND ($entries > 1)) {
|
||||||
logger("Active workers: ".$active."/".$queues." Fork a new worker.", LOGGER_DEBUG);
|
logger("Active workers: ".$active."/".$queues." Fork a new worker.", LOGGER_DEBUG);
|
||||||
$args = array("php", "include/poller.php", "no_cron");
|
$args = array("php", "include/poller.php", "no_cron");
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
@ -500,7 +580,7 @@ function call_worker_if_idle() {
|
||||||
if (function_exists("proc_open")) {
|
if (function_exists("proc_open")) {
|
||||||
// When was the last time that we called the worker?
|
// When was the last time that we called the worker?
|
||||||
// Less than one minute? Then we quit
|
// Less than one minute? Then we quit
|
||||||
if ((time() - get_config("system", "worker_started")) < 60) {
|
if ((time() - Config::get("system", "worker_started")) < 60) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,7 @@ function post_update_1206() {
|
||||||
|
|
||||||
logger("Start", LOGGER_DEBUG);
|
logger("Start", LOGGER_DEBUG);
|
||||||
$r = q("SELECT `contact`.`id`, `contact`.`last-item`,
|
$r = q("SELECT `contact`.`id`, `contact`.`last-item`,
|
||||||
(SELECT MAX(`changed`) FROM `item` FORCE INDEX (`uid_wall_changed`) WHERE `wall` AND `uid` = `user`.`uid`) AS `lastitem_date`
|
(SELECT MAX(`changed`) FROM `item` USE INDEX (`uid_wall_changed`) WHERE `wall` AND `uid` = `user`.`uid`) AS `lastitem_date`
|
||||||
FROM `user`
|
FROM `user`
|
||||||
INNER JOIN `contact` ON `contact`.`uid` = `user`.`uid` AND `contact`.`self`");
|
INNER JOIN `contact` ON `contact`.`uid` = `user`.`uid` AND `contact`.`self`");
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,7 @@ function pubsubpublish_run(&$argv, &$argc){
|
||||||
|
|
||||||
require_once('include/items.php');
|
require_once('include/items.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
// Don't check this stuff if the function is called by the poller
|
// Don't check this stuff if the function is called by the poller
|
||||||
if (App::callstack() != "poller_run") {
|
if (App::callstack() != "poller_run") {
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once('include/queue_fn.php');
|
require_once('include/queue_fn.php');
|
||||||
require_once('include/dfrn.php');
|
require_once('include/dfrn.php');
|
||||||
|
@ -23,8 +26,7 @@ function queue_run(&$argv, &$argc){
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
require_once('include/socgraph.php');
|
require_once('include/socgraph.php');
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
// Don't check this stuff if the function is called by the poller
|
// Don't check this stuff if the function is called by the poller
|
||||||
if (App::callstack() != "poller_run")
|
if (App::callstack() != "poller_run")
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
* @file include/remove_contact.php
|
* @file include/remove_contact.php
|
||||||
* @brief Removes orphaned data from deleted contacts
|
* @brief Removes orphaned data from deleted contacts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
|
|
||||||
function remove_contact_run($argv, $argc) {
|
function remove_contact_run($argv, $argc) {
|
||||||
|
@ -19,8 +22,7 @@ function remove_contact_run($argv, $argc) {
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
if ($argc != 2) {
|
if ($argc != 2) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -64,8 +64,9 @@ function ref_session_write($id, $data) {
|
||||||
$default_expire = time() + 300;
|
$default_expire = time() + 300;
|
||||||
|
|
||||||
$memcache = cache::memcache();
|
$memcache = cache::memcache();
|
||||||
if (is_object($memcache)) {
|
$a = get_app();
|
||||||
$memcache->set(get_app()->get_hostname().":session:".$id, $data, MEMCACHE_COMPRESSED, $expire);
|
if (is_object($memcache) AND is_object($a)) {
|
||||||
|
$memcache->set($a->get_hostname().":session:".$id, $data, MEMCACHE_COMPRESSED, $expire);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once("include/threads.php");
|
require_once("include/threads.php");
|
||||||
|
|
||||||
|
@ -14,8 +17,7 @@ if(is_null($db)) {
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
update_shadow_copy();
|
update_shadow_copy();
|
||||||
killme();
|
killme();
|
||||||
|
|
|
@ -1529,7 +1529,7 @@ function get_gcontact_id($contact) {
|
||||||
if (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)))
|
if (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)))
|
||||||
$contact["url"] = clean_contact_url($contact["url"]);
|
$contact["url"] = clean_contact_url($contact["url"]);
|
||||||
|
|
||||||
$r = q("SELECT `id`, `last_contact`, `last_failure`, `network` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 2",
|
$r = q("SELECT `id`, `last_contact`, `last_failure`, `network` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 2",
|
||||||
dbesc(normalise_link($contact["url"])));
|
dbesc(normalise_link($contact["url"])));
|
||||||
|
|
||||||
if ($r) {
|
if ($r) {
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
* @file include/spool_post.php
|
* @file include/spool_post.php
|
||||||
* @brief Posts items that wer spooled because they couldn't be posted.
|
* @brief Posts items that wer spooled because they couldn't be posted.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once("include/items.php");
|
require_once("include/items.php");
|
||||||
|
|
||||||
|
@ -20,8 +23,7 @@ function spool_post_run($argv, $argc) {
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
$path = get_spoolpath();
|
$path = get_spoolpath();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once("include/tags.php");
|
require_once("include/tags.php");
|
||||||
|
|
||||||
|
@ -14,8 +17,7 @@ if(is_null($db)) {
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
update_items();
|
update_items();
|
||||||
killme();
|
killme();
|
||||||
|
|
|
@ -2045,13 +2045,6 @@ function undo_post_tagging($s) {
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
function fix_mce_lf($s) {
|
|
||||||
$s = str_replace("\r\n","\n",$s);
|
|
||||||
// $s = str_replace("\n\n","\n",$s);
|
|
||||||
return $s;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function protect_sprintf($s) {
|
function protect_sprintf($s) {
|
||||||
return(str_replace('%','%%',$s));
|
return(str_replace('%','%%',$s));
|
||||||
}
|
}
|
||||||
|
@ -2073,17 +2066,19 @@ function is_a_date_arg($s) {
|
||||||
/**
|
/**
|
||||||
* remove intentation from a text
|
* remove intentation from a text
|
||||||
*/
|
*/
|
||||||
function deindent($text, $chr="[\t ]", $count=NULL) {
|
function deindent($text, $chr = "[\t ]", $count = NULL) {
|
||||||
$text = fix_mce_lf($text);
|
|
||||||
$lines = explode("\n", $text);
|
$lines = explode("\n", $text);
|
||||||
if (is_null($count)) {
|
if (is_null($count)) {
|
||||||
$m = array();
|
$m = array();
|
||||||
$k=0; while($k<count($lines) && strlen($lines[$k])==0) $k++;
|
$k = 0;
|
||||||
preg_match("|^".$chr."*|", $lines[$k], $m);
|
while ($k < count($lines) && strlen($lines[$k]) == 0) {
|
||||||
|
$k++;
|
||||||
|
}
|
||||||
|
preg_match("|^" . $chr . "*|", $lines[$k], $m);
|
||||||
$count = strlen($m[0]);
|
$count = strlen($m[0]);
|
||||||
}
|
}
|
||||||
for ($k=0; $k<count($lines); $k++){
|
for ($k=0; $k < count($lines); $k++) {
|
||||||
$lines[$k] = preg_replace("|^".$chr."{".$count."}|", "", $lines[$k]);
|
$lines[$k] = preg_replace("|^" . $chr . "{" . $count . "}|", "", $lines[$k]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode("\n", $lines);
|
return implode("\n", $lines);
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
require_once("include/threads.php");
|
require_once("include/threads.php");
|
||||||
|
|
||||||
|
@ -14,8 +17,7 @@ if(is_null($db)) {
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
update_threads();
|
update_threads();
|
||||||
update_threads_mention();
|
update_threads_mention();
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
|
|
||||||
function update_gcontact_run(&$argv, &$argc){
|
function update_gcontact_run(&$argv, &$argc){
|
||||||
|
@ -19,8 +21,7 @@ function update_gcontact_run(&$argv, &$argc){
|
||||||
require_once('include/Scrape.php');
|
require_once('include/Scrape.php');
|
||||||
require_once("include/socgraph.php");
|
require_once("include/socgraph.php");
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once('boot.php');
|
require_once('boot.php');
|
||||||
require_once('object/BaseObject.php');
|
require_once('object/BaseObject.php');
|
||||||
|
|
||||||
|
@ -54,8 +56,7 @@ if(!$install) {
|
||||||
* Load configs from db. Overwrite configs from .htconfig.php
|
* Load configs from db. Overwrite configs from .htconfig.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
load_config('config');
|
Config::load();
|
||||||
load_config('system');
|
|
||||||
|
|
||||||
if ($a->max_processes_reached() OR $a->maxload_reached()) {
|
if ($a->max_processes_reached() OR $a->maxload_reached()) {
|
||||||
header($_SERVER["SERVER_PROTOCOL"].' 503 Service Temporarily Unavailable');
|
header($_SERVER["SERVER_PROTOCOL"].' 503 Service Temporarily Unavailable');
|
||||||
|
|
51
js/acl.js
51
js/acl.js
|
@ -43,49 +43,44 @@ function ACL(backend_url, preset, automention, is_mobile){
|
||||||
}
|
}
|
||||||
|
|
||||||
ACL.prototype.remove_mention = function(id) {
|
ACL.prototype.remove_mention = function(id) {
|
||||||
if (!this.automention) return;
|
if (!this.automention) {
|
||||||
var nick = this.data[id].nick;
|
return;
|
||||||
var searchText = "@"+nick+"+"+id+" ";
|
|
||||||
if (tinyMCE.activeEditor===null) {
|
|
||||||
start = this.element.val().indexOf(searchText);
|
|
||||||
if ( start<0) return;
|
|
||||||
end = start+searchText.length;
|
|
||||||
this.element.setSelection(start,end).replaceSelectedText('').collapseSelection(false);
|
|
||||||
} else {
|
|
||||||
start = tinyMCE.activeEditor.getContent({format : 'raw'}).search( searchText );
|
|
||||||
if ( start<0 ) return;
|
|
||||||
txt = tinyMCE.activeEditor.getContent();
|
|
||||||
newtxt = txt.replace(searchText, '');
|
|
||||||
tinyMCE.activeEditor.setContent(newtxt);
|
|
||||||
}
|
}
|
||||||
|
var nick = this.data[id].nick;
|
||||||
|
var searchText = "@" + nick + "+" + id + " ";
|
||||||
|
var start = this.element.val().indexOf(searchText);
|
||||||
|
if (start < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var end = start + searchText.length;
|
||||||
|
this.element.setSelection(start, end).replaceSelectedText('').collapseSelection(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ACL.prototype.add_mention = function(id) {
|
ACL.prototype.add_mention = function(id) {
|
||||||
if (!this.automention) return;
|
if (!this.automention) {
|
||||||
var nick = this.data[id].nick;
|
return;
|
||||||
var searchText = "@"+nick+"+"+id+" ";
|
|
||||||
if (tinyMCE.activeEditor===null) {
|
|
||||||
if ( this.element.val().indexOf( searchText) >= 0 ) return;
|
|
||||||
this.element.val( searchText + this.element.val() );
|
|
||||||
} else {
|
|
||||||
if ( tinyMCE.activeEditor.getContent({format : 'raw'}).search(searchText) >= 0 ) return;
|
|
||||||
tinyMCE.activeEditor.dom.add(tinyMCE.activeEditor.getBody(), 'dummy', {}, searchText);
|
|
||||||
}
|
}
|
||||||
|
var nick = this.data[id].nick;
|
||||||
|
var searchText = "@" + nick + "+" + id + " ";
|
||||||
|
if (this.element.val().indexOf( searchText) >= 0 ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.element.val(searchText + this.element.val());
|
||||||
}
|
}
|
||||||
|
|
||||||
ACL.prototype.on_submit = function(){
|
ACL.prototype.on_submit = function(){
|
||||||
aclfileds = $("#acl-fields").html("");
|
var aclfields = $("#acl-fields").html("");
|
||||||
$(this.allow_gid).each(function(i,v){
|
$(this.allow_gid).each(function(i,v){
|
||||||
aclfileds.append("<input type='hidden' name='group_allow[]' value='"+v+"'>");
|
aclfields.append("<input type='hidden' name='group_allow[]' value='"+v+"'>");
|
||||||
});
|
});
|
||||||
$(this.allow_cid).each(function(i,v){
|
$(this.allow_cid).each(function(i,v){
|
||||||
aclfileds.append("<input type='hidden' name='contact_allow[]' value='"+v+"'>");
|
aclfields.append("<input type='hidden' name='contact_allow[]' value='"+v+"'>");
|
||||||
});
|
});
|
||||||
$(this.deny_gid).each(function(i,v){
|
$(this.deny_gid).each(function(i,v){
|
||||||
aclfileds.append("<input type='hidden' name='group_deny[]' value='"+v+"'>");
|
aclfields.append("<input type='hidden' name='group_deny[]' value='"+v+"'>");
|
||||||
});
|
});
|
||||||
$(this.deny_cid).each(function(i,v){
|
$(this.deny_cid).each(function(i,v){
|
||||||
aclfileds.append("<input type='hidden' name='contact_deny[]' value='"+v+"'>");
|
aclfields.append("<input type='hidden' name='contact_deny[]' value='"+v+"'>");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -347,61 +347,38 @@ function string2bb(element) {
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Friendica people autocomplete legacy
|
* Friendica people autocomplete legacy code
|
||||||
* code which is needed for tinymce
|
|
||||||
*
|
*
|
||||||
* require jQuery, jquery.textareas
|
* require jQuery, jquery.textareas
|
||||||
*/
|
*/
|
||||||
|
function ACPopup(elm, backend_url){
|
||||||
function ACPopup(elm,backend_url){
|
this.idsel = -1;
|
||||||
this.idsel=-1;
|
|
||||||
this.element = elm;
|
this.element = elm;
|
||||||
this.searchText="";
|
this.searchText = '';
|
||||||
this.ready=true;
|
this.ready = true;
|
||||||
this.kp_timer = false;
|
this.kp_timer = false;
|
||||||
this.url = backend_url;
|
this.url = backend_url;
|
||||||
|
|
||||||
this.conversation_id = null;
|
this.conversation_id = null;
|
||||||
var conv_id = this.element.id.match(/\d+$/);
|
var conv_id = this.element.id.match(/\d+$/);
|
||||||
if (conv_id) this.conversation_id = conv_id[0];
|
if (conv_id) {
|
||||||
console.log("ACPopup elm id",this.element.id,"conversation",this.conversation_id);
|
this.conversation_id = conv_id[0];
|
||||||
|
|
||||||
var w = 530;
|
|
||||||
var h = 130;
|
|
||||||
|
|
||||||
|
|
||||||
if(tinyMCE.activeEditor == null) {
|
|
||||||
style = $(elm).offset();
|
|
||||||
w = $(elm).width();
|
|
||||||
h = $(elm).height();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// I can't find an "official" way to get the element who get all
|
|
||||||
// this fraking thing that is tinyMCE.
|
|
||||||
// This code will broke again at some point...
|
|
||||||
var container = $(tinyMCE.activeEditor.getContainer()).find("table");
|
|
||||||
style = $(container).offset();
|
|
||||||
w = $(container).width();
|
|
||||||
h = $(container).height();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
style.top=style.top+h;
|
var w = $(elm).width();
|
||||||
|
var h = $(elm).height();
|
||||||
|
|
||||||
|
var style = $(elm).offset();
|
||||||
|
style.top = style.top + h;
|
||||||
style.width = w;
|
style.width = w;
|
||||||
style.position = 'absolute';
|
style.position = 'absolute';
|
||||||
/* style['max-height'] = '150px';
|
|
||||||
style.border = '1px solid red';
|
|
||||||
style.background = '#cccccc';
|
|
||||||
|
|
||||||
style.overflow = 'auto';
|
|
||||||
style['z-index'] = '100000';
|
|
||||||
*/
|
|
||||||
style.display = 'none';
|
style.display = 'none';
|
||||||
|
|
||||||
this.cont = $("<div class='acpopup-mce'></div>");
|
this.cont = $('<div class="acpopup-mce"></div>');
|
||||||
this.cont.css(style);
|
this.cont.css(style);
|
||||||
|
|
||||||
$("body").append(this.cont);
|
$('body').append(this.cont);
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPopup.prototype.close = function(){
|
ACPopup.prototype.close = function(){
|
||||||
$(this.cont).remove();
|
$(this.cont).remove();
|
||||||
|
@ -449,48 +426,42 @@ ACPopup.prototype._search = function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPopup.prototype.add = function(label, value){
|
ACPopup.prototype.add = function(label, value){
|
||||||
var that=this;
|
var that = this;
|
||||||
var elm = $("<div class='acpopupitem' title='"+value+"'>"+label+"</div>");
|
var elm = $('<div class="acpopupitem" title="' + value + '">' + label + '</div>');
|
||||||
elm.click(function(e){
|
elm.click(function(e){
|
||||||
t = $(this).attr('title').replace(new RegExp(' \- .*'),'');
|
t = $(this).attr('title').replace(new RegExp(' \- .*'), '');
|
||||||
if(typeof(that.element.container) === "undefined") {
|
el = $(that.element);
|
||||||
el=$(that.element);
|
|
||||||
sel = el.getSelection();
|
sel = el.getSelection();
|
||||||
sel.start = sel.start- that.searchText.length;
|
sel.start = sel.start - that.searchText.length;
|
||||||
el.setSelection(sel.start,sel.end).replaceSelectedText(t+' ').collapseSelection(false);
|
el.setSelection(sel.start, sel.end).replaceSelectedText(t + ' ').collapseSelection(false);
|
||||||
that.close();
|
that.close();
|
||||||
}
|
|
||||||
else {
|
|
||||||
txt = tinyMCE.activeEditor.getContent();
|
|
||||||
// alert(that.searchText + ':' + t);
|
|
||||||
newtxt = txt.replace('@' + that.searchText,'@' + t +' ');
|
|
||||||
tinyMCE.activeEditor.setContent(newtxt);
|
|
||||||
tinyMCE.activeEditor.focus();
|
|
||||||
that.close();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
$(this.cont).append(elm);
|
$(this.cont).append(elm);
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPopup.prototype.onkey = function(event){
|
ACPopup.prototype.onkey = function(event){
|
||||||
if (event.keyCode == '13') {
|
if (event.keyCode == '13') {
|
||||||
if(this.idsel>-1) {
|
if(this.idsel > -1) {
|
||||||
this.cont.children()[this.idsel].click();
|
this.cont.children()[this.idsel].click();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (event.keyCode == '38') { //cursor up
|
if (event.keyCode == '38') { //cursor up
|
||||||
cmax = this.cont.children().size()-1;
|
var cmax = this.cont.children().size() - 1;
|
||||||
this.idsel--;
|
this.idsel--;
|
||||||
if (this.idsel<0) this.idsel=cmax;
|
if (this.idsel < 0) {
|
||||||
|
this.idsel = cmax;
|
||||||
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
if (event.keyCode == '40' || event.keyCode == '9') { //cursor down
|
if (event.keyCode == '40' || event.keyCode == '9') { //cursor down
|
||||||
cmax = this.cont.children().size()-1;
|
var cmax = this.cont.children().size() - 1;
|
||||||
this.idsel++;
|
this.idsel++;
|
||||||
if (this.idsel>cmax) this.idsel=0;
|
if (this.idsel > cmax) {
|
||||||
|
this.idsel = 0;
|
||||||
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
71
js/main.js
71
js/main.js
|
@ -25,11 +25,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function openMenu(theID) {
|
function openMenu(theID) {
|
||||||
document.getElementById(theID).style.display = "block"
|
var el = document.getElementById(theID)
|
||||||
|
if (el) {
|
||||||
|
el.style.display = "block";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeMenu(theID) {
|
function closeMenu(theID) {
|
||||||
document.getElementById(theID).style.display = "none"
|
var el = document.getElementById(theID)
|
||||||
|
if (el) {
|
||||||
|
el.style.display = "none";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function decodeHtml(html) {
|
function decodeHtml(html) {
|
||||||
|
@ -72,21 +78,19 @@
|
||||||
/* setup comment textarea buttons */
|
/* setup comment textarea buttons */
|
||||||
/* comment textarea buttons needs some "data-*" attributes to work:
|
/* comment textarea buttons needs some "data-*" attributes to work:
|
||||||
* data-role="insert-formatting" : to mark the element as a formatting button
|
* data-role="insert-formatting" : to mark the element as a formatting button
|
||||||
* data-comment="<string>" : string for "Comment", used by insertFormatting() function
|
|
||||||
* data-bbcode="<string>" : name of the bbcode element to insert. insertFormatting() will insert it as "[name][/name]"
|
* data-bbcode="<string>" : name of the bbcode element to insert. insertFormatting() will insert it as "[name][/name]"
|
||||||
* data-id="<string>" : id of the comment, used to find other comment-related element, like the textarea
|
* data-id="<string>" : id of the comment, used to find other comment-related element, like the textarea
|
||||||
* */
|
* */
|
||||||
$('body').on('click','[data-role="insert-formatting"]', function(e) {
|
$('body').on('click','[data-role="insert-formatting"]', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var o = $(this);
|
var o = $(this);
|
||||||
var comment = o.data('comment');
|
|
||||||
var bbcode = o.data('bbcode');
|
var bbcode = o.data('bbcode');
|
||||||
var id = o.data('id');
|
var id = o.data('id');
|
||||||
if (bbcode=="img") {
|
if (bbcode=="img") {
|
||||||
Dialog.doImageBrowser("comment", id);
|
Dialog.doImageBrowser("comment", id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
insertFormatting(comment, bbcode, id);
|
insertFormatting(bbcode, id);
|
||||||
});
|
});
|
||||||
|
|
||||||
/* event from comment textarea button popups */
|
/* event from comment textarea button popups */
|
||||||
|
@ -118,9 +122,6 @@
|
||||||
input.val(val);
|
input.val(val);
|
||||||
});
|
});
|
||||||
|
|
||||||
/* setup field_richtext */
|
|
||||||
setupFieldRichtext();
|
|
||||||
|
|
||||||
/* popup menus */
|
/* popup menus */
|
||||||
function close_last_popup_menu() {
|
function close_last_popup_menu() {
|
||||||
if(last_popup_menu) {
|
if(last_popup_menu) {
|
||||||
|
@ -655,7 +656,6 @@
|
||||||
function preview_post() {
|
function preview_post() {
|
||||||
$("#jot-preview").val("1");
|
$("#jot-preview").val("1");
|
||||||
$("#jot-preview-content").show();
|
$("#jot-preview-content").show();
|
||||||
tinyMCE.triggerSave();
|
|
||||||
$.post(
|
$.post(
|
||||||
"item",
|
"item",
|
||||||
$("#profile-jot-form").serialize(),
|
$("#profile-jot-form").serialize(),
|
||||||
|
@ -767,59 +767,6 @@ function notifyMarkAll() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// code from http://www.tinymce.com/wiki.php/How-to_implement_a_custom_file_browser
|
|
||||||
function fcFileBrowser (field_name, url, type, win) {
|
|
||||||
/* TODO: If you work with sessions in PHP and your client doesn't accept cookies you might need to carry
|
|
||||||
the session name and session ID in the request string (can look like this: "?PHPSESSID=88p0n70s9dsknra96qhuk6etm5").
|
|
||||||
These lines of code extract the necessary parameters and add them back to the filebrowser URL again. */
|
|
||||||
|
|
||||||
|
|
||||||
var cmsURL = baseurl+"/fbrowser/"+type+"/";
|
|
||||||
|
|
||||||
tinyMCE.activeEditor.windowManager.open({
|
|
||||||
file : cmsURL,
|
|
||||||
title : 'File Browser',
|
|
||||||
width : 420, // Your dimensions may differ - toy around with them!
|
|
||||||
height : 400,
|
|
||||||
resizable : "yes",
|
|
||||||
inline : "yes", // This parameter only has an effect if you use the inlinepopups plugin!
|
|
||||||
close_previous : "no"
|
|
||||||
}, {
|
|
||||||
window : win,
|
|
||||||
input : field_name
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setupFieldRichtext(){
|
|
||||||
tinyMCE.init({
|
|
||||||
theme : "advanced",
|
|
||||||
mode : "specific_textareas",
|
|
||||||
editor_selector: "fieldRichtext",
|
|
||||||
plugins : "bbcode,paste, inlinepopups",
|
|
||||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
|
|
||||||
theme_advanced_buttons2 : "",
|
|
||||||
theme_advanced_buttons3 : "",
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "center",
|
|
||||||
theme_advanced_blockformats : "blockquote,code",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
paste_text_sticky : true,
|
|
||||||
entity_encoding : "raw",
|
|
||||||
add_unload_trigger : false,
|
|
||||||
remove_linebreaks : false,
|
|
||||||
//force_p_newlines : false,
|
|
||||||
//force_br_newlines : true,
|
|
||||||
forced_root_block : 'div',
|
|
||||||
convert_urls: false,
|
|
||||||
content_css: baseurl+"/view/custom_tinymce.css",
|
|
||||||
theme_advanced_path : false,
|
|
||||||
file_browser_callback : "fcFileBrowser",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sprintf in javascript
|
* sprintf in javascript
|
||||||
* "{0} and {1}".format('zero','uno');
|
* "{0} and {1}".format('zero','uno');
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
In order to make TinyMCE work smoothly with Friendica, the files in this directory are those few files we've changed in TinyMCE. We will attempt to keep them current, but if you decide to upgrade tinymce, it is best to save current copies of the files in question from the active tinymce tree and replace them or merge them after upgrade.
|
|
||||||
|
|
||||||
Except for some simple theming, the primary changes are the advanced theme icon set, which we changed the "html" icon to "[]" to represent BBcode, and major changes have been made to the bbcode plugin.
|
|
||||||
|
|
||||||
|
|
||||||
in TinyMCE 3.5b2 it appears that we are getting double linefeeds. Code has been put in place in mod/item.php and mod/message.php to reduce the duplicates.
|
|
||||||
|
|
||||||
|
|
|
@ -1,268 +0,0 @@
|
||||||
/**
|
|
||||||
* editor_plugin_src.js
|
|
||||||
*
|
|
||||||
* Copyright 2009, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
|
||||||
*
|
|
||||||
* License: http://tinymce.moxiecode.com/license
|
|
||||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Macgirvin Aug-2010 changed from punbb to dfrn dialect */
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
tinymce.create('tinymce.plugins.BBCodePlugin', {
|
|
||||||
init : function(ed, url) {
|
|
||||||
var t = this, dialect = ed.getParam('bbcode_dialect', 'dfrn').toLowerCase();
|
|
||||||
|
|
||||||
ed.onBeforeSetContent.add(function(ed, o) {
|
|
||||||
o.content = t['_' + dialect + '_bbcode2html'](o.content);
|
|
||||||
});
|
|
||||||
|
|
||||||
ed.onPostProcess.add(function(ed, o) {
|
|
||||||
if (o.set)
|
|
||||||
o.content = t['_' + dialect + '_bbcode2html'](o.content);
|
|
||||||
|
|
||||||
if (o.get)
|
|
||||||
o.content = t['_' + dialect + '_html2bbcode'](o.content);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
getInfo : function() {
|
|
||||||
return {
|
|
||||||
longname : 'BBCode Plugin',
|
|
||||||
author : 'Moxiecode Systems AB',
|
|
||||||
authorurl : 'http://tinymce.moxiecode.com',
|
|
||||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',
|
|
||||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
// Private methods
|
|
||||||
|
|
||||||
// HTML -> BBCode in DFRN dialect
|
|
||||||
_dfrn_html2bbcode : function(s) {
|
|
||||||
s = tinymce.trim(s);
|
|
||||||
|
|
||||||
function rep(re, str) {
|
|
||||||
|
|
||||||
|
|
||||||
s = s.replace(re,str);
|
|
||||||
|
|
||||||
//modify code to keep stuff intact within [code][/code] blocks
|
|
||||||
//Waitman Gobble NO WARRANTY
|
|
||||||
|
|
||||||
/* This doesn't seem to work well with
|
|
||||||
[code]line1
|
|
||||||
line2[/code]
|
|
||||||
commenting out for now
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
var o = new Array();
|
|
||||||
var x = s.split("[code]");
|
|
||||||
var i = 0;
|
|
||||||
|
|
||||||
var si = "";
|
|
||||||
si = x.shift();
|
|
||||||
si = si.replace(re,str);
|
|
||||||
o.push(si);
|
|
||||||
|
|
||||||
for (i = 0; i < x.length; i++) {
|
|
||||||
var no = new Array();
|
|
||||||
var j = x.shift();
|
|
||||||
var g = j.split("[/code]");
|
|
||||||
no.push(g.shift());
|
|
||||||
si = g.shift();
|
|
||||||
si = si.replace(re,str);
|
|
||||||
no.push(si);
|
|
||||||
o.push(no.join("[/code]"));
|
|
||||||
}
|
|
||||||
|
|
||||||
s = o.join("[code]");
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* oembed */
|
|
||||||
function _h2b_cb(match) {
|
|
||||||
/*
|
|
||||||
function s_h2b(data) {
|
|
||||||
match = data;
|
|
||||||
}
|
|
||||||
$.ajax({
|
|
||||||
type:"POST",
|
|
||||||
url: 'oembed/h2b',
|
|
||||||
data: {text: match},
|
|
||||||
async: false,
|
|
||||||
success: s_h2b,
|
|
||||||
dataType: 'html'
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
var f, g, tof = [], tor = [];
|
|
||||||
var find_spanc = /<span [^>]*class *= *[\"'](?:[^\"']* )*oembed(?: [^\"']*)*[\"'][^>]*>(.*?(?:<span[^>]*>(.*?)<\/span *>)*.*?)<\/span *>/ig;
|
|
||||||
while (f = find_spanc.exec(match)) {
|
|
||||||
var find_a = /<a([^>]* rel=[\"']oembed[\"'][^>]*)>.*?<\/a *>/ig;
|
|
||||||
if (g = find_a.exec(f[1])) {
|
|
||||||
var find_href = /href=[\"']([^\"']*)[\"']/ig;
|
|
||||||
var m2 = find_href.exec(g[1]);
|
|
||||||
if (m2[1]) {
|
|
||||||
tof.push(f[0]);
|
|
||||||
tor.push("[EMBED]" + m2[1] + "[/EMBED]");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (var i = 0; i < tof.length; i++) match = match.replace(tof[i], tor[i]);
|
|
||||||
|
|
||||||
return match;
|
|
||||||
}
|
|
||||||
if (s.indexOf('class="oembed')>=0){
|
|
||||||
//alert("request oembed html2bbcode");
|
|
||||||
s = _h2b_cb(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* /oembed */
|
|
||||||
|
|
||||||
|
|
||||||
// example: <strong> to [b]
|
|
||||||
rep(/<a class=\"bookmark\" href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[bookmark=$1]$2[/bookmark]");
|
|
||||||
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");
|
|
||||||
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
|
|
||||||
rep(/<span style=\"color:(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
|
|
||||||
rep(/<font>(.*?)<\/font>/gi,"$1");
|
|
||||||
rep(/<img.*?width=\"(.*?)\".*?height=\"(.*?)\".*?src=\"(.*?)\".*?\/>/gi,"[img=$1x$2]$3[/img]");
|
|
||||||
rep(/<img.*?height=\"(.*?)\".*?width=\"(.*?)\".*?src=\"(.*?)\".*?\/>/gi,"[img=$2x$1]$3[/img]");
|
|
||||||
rep(/<img.*?src=\"(.*?)\".*?height=\"(.*?)\".*?width=\"(.*?)\".*?\/>/gi,"[img=$3x$2]$1[/img]");
|
|
||||||
rep(/<img.*?src=\"(.*?)\".*?width=\"(.*?)\".*?height=\"(.*?)\".*?\/>/gi,"[img=$2x$3]$1[/img]");
|
|
||||||
rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
|
|
||||||
|
|
||||||
rep(/<ul class=\"listbullet\" style=\"list-style-type\: circle\;\">(.*?)<\/ul>/gi,"[list]$1[/list]");
|
|
||||||
rep(/<ul class=\"listnone\" style=\"list-style-type\: none\;\">(.*?)<\/ul>/gi,"[list=]$1[/list]");
|
|
||||||
rep(/<ul class=\"listdecimal\" style=\"list-style-type\: decimal\;\">(.*?)<\/ul>/gi,"[list=1]$1[/list]");
|
|
||||||
rep(/<ul class=\"listlowerroman\" style=\"list-style-type\: lower-roman\;\">(.*?)<\/ul>/gi,"[list=i]$1[/list]");
|
|
||||||
rep(/<ul class=\"listupperroman\" style=\"list-style-type\: upper-roman\;\">(.*?)<\/ul>/gi,"[list=I]$1[/list]");
|
|
||||||
rep(/<ul class=\"listloweralpha\" style=\"list-style-type\: lower-alpha\;\">(.*?)<\/ul>/gi,"[list=a]$1[/list]");
|
|
||||||
rep(/<ul class=\"listupperalpha\" style=\"list-style-type\: upper-alpha\;\">(.*?)<\/ul>/gi,"[list=A]$1[/list]");
|
|
||||||
rep(/<li>(.*?)<\/li>/gi,'[li]$1[/li]');
|
|
||||||
|
|
||||||
rep(/<code>(.*?)<\/code>/gi,"[code]$1[/code]");
|
|
||||||
rep(/<\/(strong|b)>/gi,"[/b]");
|
|
||||||
rep(/<(strong|b)>/gi,"[b]");
|
|
||||||
rep(/<\/(em|i)>/gi,"[/i]");
|
|
||||||
rep(/<(em|i)>/gi,"[i]");
|
|
||||||
rep(/<\/u>/gi,"[/u]");
|
|
||||||
rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");
|
|
||||||
rep(/<u>/gi,"[u]");
|
|
||||||
rep(/<blockquote[^>]*>/gi,"[quote]");
|
|
||||||
rep(/<\/blockquote>/gi,"[/quote]");
|
|
||||||
rep(/<hr \/>/gi,"[hr]");
|
|
||||||
rep(/<br (.*?)\/>/gi,"\n");
|
|
||||||
rep(/<br\/>/gi,"\n");
|
|
||||||
rep(/<br>/gi,"\n");
|
|
||||||
rep(/<p>/gi,"");
|
|
||||||
rep(/<\/p>/gi,"\n");
|
|
||||||
rep(/ /gi," ");
|
|
||||||
rep(/"/gi,"\"");
|
|
||||||
rep(/</gi,"<");
|
|
||||||
rep(/>/gi,">");
|
|
||||||
rep(/&/gi,"&");
|
|
||||||
|
|
||||||
return s;
|
|
||||||
},
|
|
||||||
|
|
||||||
// BBCode -> HTML from DFRN dialect
|
|
||||||
_dfrn_bbcode2html : function(s) {
|
|
||||||
s = tinymce.trim(s);
|
|
||||||
|
|
||||||
|
|
||||||
function rep(re, str) {
|
|
||||||
|
|
||||||
|
|
||||||
//modify code to keep stuff intact within [code][/code] blocks
|
|
||||||
//Waitman Gobble NO WARRANTY
|
|
||||||
|
|
||||||
|
|
||||||
var o = new Array();
|
|
||||||
var x = s.split("[code]");
|
|
||||||
var i = 0;
|
|
||||||
|
|
||||||
var si = "";
|
|
||||||
si = x.shift();
|
|
||||||
si = si.replace(re,str);
|
|
||||||
o.push(si);
|
|
||||||
|
|
||||||
for (i = 0; i < x.length; i++) {
|
|
||||||
var no = new Array();
|
|
||||||
var j = x.shift();
|
|
||||||
var g = j.split("[/code]");
|
|
||||||
no.push(g.shift());
|
|
||||||
si = g.shift();
|
|
||||||
si = si.replace(re,str);
|
|
||||||
no.push(si);
|
|
||||||
o.push(no.join("[/code]"));
|
|
||||||
}
|
|
||||||
|
|
||||||
s = o.join("[code]");
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// example: [b] to <strong>
|
|
||||||
rep(/\n/gi,"<br />");
|
|
||||||
rep(/\[b\]/gi,"<strong>");
|
|
||||||
rep(/\[\/b\]/gi,"</strong>");
|
|
||||||
rep(/\[i\]/gi,"<em>");
|
|
||||||
rep(/\[\/i\]/gi,"</em>");
|
|
||||||
rep(/\[u\]/gi,"<u>");
|
|
||||||
rep(/\[\/u\]/gi,"</u>");
|
|
||||||
rep(/\[hr\]/gi,"<hr />");
|
|
||||||
rep(/\[bookmark=([^\]]+)\](.*?)\[\/bookmark\]/gi,"<a class=\"bookmark\" href=\"$1\">$2</a>");
|
|
||||||
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
|
|
||||||
rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
|
|
||||||
rep(/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/gi,"<img width=\"$1\" height=\"$2\" src=\"$3\" />");
|
|
||||||
rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
|
|
||||||
|
|
||||||
rep(/\[list\](.*?)\[\/list\]/gi, '<ul class="listbullet" style="list-style-type: circle;">$1</ul>');
|
|
||||||
rep(/\[list=\](.*?)\[\/list\]/gi, '<ul class="listnone" style="list-style-type: none;">$1</ul>');
|
|
||||||
rep(/\[list=1\](.*?)\[\/list\]/gi, '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>');
|
|
||||||
rep(/\[list=i\](.*?)\[\/list\]/gi,'<ul class="listlowerroman" style="list-style-type: lower-roman;">$1</ul>');
|
|
||||||
rep(/\[list=I\](.*?)\[\/list\]/gi, '<ul class="listupperroman" style="list-style-type: upper-roman;">$1</ul>');
|
|
||||||
rep(/\[list=a\](.*?)\[\/list\]/gi, '<ul class="listloweralpha" style="list-style-type: lower-alpha;">$1</ul>');
|
|
||||||
rep(/\[list=A\](.*?)\[\/list\]/gi, '<ul class="listupperalpha" style="list-style-type: upper-alpha;">$1</ul>');
|
|
||||||
rep(/\[li\](.*?)\[\/li\]/gi, '<li>$1</li>');
|
|
||||||
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<span style=\"color: $1;\">$2</span>");
|
|
||||||
rep(/\[size=(.*?)\](.*?)\[\/size\]/gi,"<span style=\"font-size: $1;\">$2</span>");
|
|
||||||
rep(/\[code\](.*?)\[\/code\]/gi,"<code>$1</code>");
|
|
||||||
rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<blockquote>$1</blockquote>");
|
|
||||||
|
|
||||||
/* oembed */
|
|
||||||
function _b2h_cb(match, url) {
|
|
||||||
url = bin2hex(url);
|
|
||||||
function s_b2h(data) {
|
|
||||||
match = data;
|
|
||||||
}
|
|
||||||
$.ajax({
|
|
||||||
url: 'oembed/b2h?url=' + url,
|
|
||||||
async: false,
|
|
||||||
success: s_b2h,
|
|
||||||
dataType: 'html'
|
|
||||||
});
|
|
||||||
return match;
|
|
||||||
}
|
|
||||||
s = s.replace(/\[embed\](.*?)\[\/embed\]/gi, _b2h_cb);
|
|
||||||
|
|
||||||
/* /oembed */
|
|
||||||
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Register plugin
|
|
||||||
tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin);
|
|
||||||
})();
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
|
@ -1,117 +0,0 @@
|
||||||
/* Generic */
|
|
||||||
body {
|
|
||||||
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
|
||||||
scrollbar-3dlight-color:#F0F0EE;
|
|
||||||
scrollbar-arrow-color:#676662;
|
|
||||||
scrollbar-base-color:#F0F0EE;
|
|
||||||
scrollbar-darkshadow-color:#DDDDDD;
|
|
||||||
scrollbar-face-color:#E0E0DD;
|
|
||||||
scrollbar-highlight-color:#F0F0EE;
|
|
||||||
scrollbar-shadow-color:#F0F0EE;
|
|
||||||
scrollbar-track-color:#F5F5F5;
|
|
||||||
background:#F0F0EE;
|
|
||||||
padding:0;
|
|
||||||
margin:8px 8px 0 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {background:#F0F0EE;}
|
|
||||||
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
|
||||||
textarea {resize:none;outline:none;}
|
|
||||||
a:link, a:visited {color:black;}
|
|
||||||
a:hover {color:#2B6FB6;}
|
|
||||||
.nowrap {white-space: nowrap}
|
|
||||||
|
|
||||||
/* Forms */
|
|
||||||
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
|
||||||
legend {color:#2B6FB6; font-weight:bold;}
|
|
||||||
label.msg {display:none;}
|
|
||||||
label.invalid {color:#EE0000; display:inline;}
|
|
||||||
input.invalid {border:1px solid #EE0000;}
|
|
||||||
input {background:#FFF; border:1px solid #CCC;}
|
|
||||||
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
|
||||||
input, select, textarea {border:1px solid #808080;}
|
|
||||||
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
|
||||||
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
|
||||||
.input_noborder {border:0;}
|
|
||||||
|
|
||||||
/* Buttons */
|
|
||||||
#insert, #cancel, input.button, .updateButton {
|
|
||||||
border:0; margin:0; padding:0;
|
|
||||||
font-weight:bold;
|
|
||||||
width:94px; height:26px;
|
|
||||||
background:url(img/buttons.png) 0 -26px;
|
|
||||||
cursor:pointer;
|
|
||||||
padding-bottom:2px;
|
|
||||||
float:left;
|
|
||||||
}
|
|
||||||
|
|
||||||
#insert {background:url(img/buttons.png) 0 -52px}
|
|
||||||
#cancel {background:url(img/buttons.png) 0 0; float:right}
|
|
||||||
|
|
||||||
/* Browse */
|
|
||||||
a.pickcolor, a.browse {text-decoration:none}
|
|
||||||
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
|
||||||
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
|
||||||
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
|
||||||
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
|
||||||
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
|
||||||
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
|
||||||
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
|
||||||
a.pickcolor:hover span {background-color:#B2BBD0;}
|
|
||||||
a.pickcolor:hover span.disabled {}
|
|
||||||
|
|
||||||
/* Charmap */
|
|
||||||
table.charmap {border:1px solid #AAA; text-align:center}
|
|
||||||
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
|
||||||
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
|
||||||
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
|
||||||
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
|
||||||
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
|
||||||
|
|
||||||
/* Source */
|
|
||||||
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
|
||||||
.mceActionPanel {margin-top:5px;}
|
|
||||||
|
|
||||||
/* Tabs classes */
|
|
||||||
.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
|
|
||||||
.tabs ul {margin:0; padding:0; list-style:none;}
|
|
||||||
.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
|
|
||||||
.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
|
|
||||||
.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
|
|
||||||
.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
|
|
||||||
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
|
||||||
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
|
||||||
|
|
||||||
/* Panels */
|
|
||||||
.panel_wrapper div.panel {display:none;}
|
|
||||||
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
|
||||||
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
|
||||||
|
|
||||||
/* Columns */
|
|
||||||
.column {float:left;}
|
|
||||||
.properties {width:100%;}
|
|
||||||
.properties .column1 {}
|
|
||||||
.properties .column2 {text-align:left;}
|
|
||||||
|
|
||||||
/* Titles */
|
|
||||||
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
|
||||||
h3 {font-size:14px;}
|
|
||||||
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
|
||||||
|
|
||||||
/* Dialog specific */
|
|
||||||
#link .panel_wrapper, #link div.current {height:125px;}
|
|
||||||
#image .panel_wrapper, #image div.current {height:200px;}
|
|
||||||
#plugintable thead {font-weight:bold; background:#DDD;}
|
|
||||||
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
|
||||||
#plugintable {width:96%; margin-top:10px;}
|
|
||||||
#pluginscontainer {height:290px; overflow:auto;}
|
|
||||||
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
|
|
||||||
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
|
||||||
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
|
||||||
#colorpicker #light div {overflow:hidden;}
|
|
||||||
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
|
|
||||||
#colorpicker .panel_wrapper div.current {height:175px;}
|
|
||||||
#colorpicker #namedcolors {width:150px;}
|
|
||||||
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
|
||||||
#colorpicker #colornamecontainer {margin-top:5px;}
|
|
||||||
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
|
|
|
@ -1,213 +0,0 @@
|
||||||
/* Reset */
|
|
||||||
.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
|
|
||||||
.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
|
|
||||||
.defaultSkin table td {vertical-align:middle}
|
|
||||||
|
|
||||||
/* Containers */
|
|
||||||
.defaultSkin table {direction:ltr; background:#FFF}
|
|
||||||
.defaultSkin iframe {display:block; background:#FFF}
|
|
||||||
.defaultSkin .mceToolbar {height:26px}
|
|
||||||
.defaultSkin .mceLeft {text-align:left}
|
|
||||||
.defaultSkin .mceRight {text-align:right}
|
|
||||||
|
|
||||||
/* External */
|
|
||||||
.defaultSkin .mceExternalToolbar {position:absolute; border:2px solid #CCC; border-bottom:0; display:none;}
|
|
||||||
.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
|
||||||
.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
|
||||||
|
|
||||||
/* Layout */
|
|
||||||
.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
|
|
||||||
.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
|
|
||||||
.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
|
|
||||||
.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
|
|
||||||
.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top}
|
|
||||||
.defaultSkin .mceIframeContainer { /*border-top:1px solid #CCC; border-bottom:1px solid #CCC */ border: none;}
|
|
||||||
.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
|
|
||||||
.defaultSkin .mceStatusbar div {float:left; margin:2px}
|
|
||||||
.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
|
|
||||||
.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
|
|
||||||
.defaultSkin table.mceToolbar {margin-left:3px}
|
|
||||||
.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
|
|
||||||
.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
|
||||||
.defaultSkin td.mceCenter {text-align:center;}
|
|
||||||
.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
|
|
||||||
.defaultSkin td.mceRight table {margin:0 0 0 auto;}
|
|
||||||
|
|
||||||
/* Button */
|
|
||||||
.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:10px}
|
|
||||||
.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
|
|
||||||
.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
|
|
||||||
.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
|
||||||
.defaultSkin .mceButtonLabeled {width:auto}
|
|
||||||
.defaultSkin .mceButtonLabeled span.mceIcon {float:left}
|
|
||||||
.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
|
|
||||||
.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
|
|
||||||
|
|
||||||
/* Separator */
|
|
||||||
.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
|
|
||||||
|
|
||||||
/* ListBox */
|
|
||||||
.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
|
|
||||||
.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
|
||||||
.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
|
|
||||||
.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
|
|
||||||
.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
|
|
||||||
.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
|
|
||||||
.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
|
||||||
.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
|
|
||||||
.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
|
|
||||||
.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
|
|
||||||
|
|
||||||
/* SplitButton */
|
|
||||||
.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
|
|
||||||
.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
|
|
||||||
.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
|
|
||||||
.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
|
|
||||||
.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
|
|
||||||
.defaultSkin .mceSplitButton span.mceOpen {display:none}
|
|
||||||
.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
|
|
||||||
.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
|
|
||||||
.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
|
||||||
.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
|
|
||||||
.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
|
|
||||||
|
|
||||||
/* ColorSplitButton */
|
|
||||||
.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
|
||||||
.defaultSkin .mceColorSplitMenu td {padding:2px}
|
|
||||||
.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
|
||||||
.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
|
||||||
.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
|
||||||
.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
|
||||||
.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
|
|
||||||
.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
|
|
||||||
.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
|
|
||||||
|
|
||||||
/* Menu */
|
|
||||||
.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8}
|
|
||||||
.defaultSkin .mceNoIcons span.mceIcon {width:0;}
|
|
||||||
.defaultSkin .mceNoIcons a .mceText {padding-left:10px}
|
|
||||||
.defaultSkin .mceMenu table {background:#FFF}
|
|
||||||
.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
|
|
||||||
.defaultSkin .mceMenu td {height:20px}
|
|
||||||
.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
|
||||||
.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
|
|
||||||
.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
|
|
||||||
.defaultSkin .mceMenu pre.mceText {font-family:Monospace}
|
|
||||||
.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
|
||||||
.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
|
||||||
.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
|
||||||
.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
|
|
||||||
.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
|
|
||||||
.defaultSkin .mceMenuItemDisabled .mceText {color:#888}
|
|
||||||
.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
|
|
||||||
.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
|
|
||||||
.defaultSkin .mceMenu span.mceMenuLine {display:none}
|
|
||||||
.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
|
|
||||||
|
|
||||||
/* Progress,Resize */
|
|
||||||
.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
|
|
||||||
.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
|
||||||
|
|
||||||
/* Formats */
|
|
||||||
.defaultSkin .mce_formatPreview a {font-size:10px}
|
|
||||||
.defaultSkin .mce_p span.mceText {}
|
|
||||||
.defaultSkin .mce_address span.mceText {font-style:italic}
|
|
||||||
.defaultSkin .mce_pre span.mceText {font-family:monospace}
|
|
||||||
.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
|
||||||
.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
|
||||||
.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
|
||||||
.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
|
||||||
.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
|
||||||
.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
|
||||||
|
|
||||||
/* Theme */
|
|
||||||
.defaultSkin span.mce_bold {background-position:0 0}
|
|
||||||
.defaultSkin span.mce_italic {background-position:-60px 0}
|
|
||||||
.defaultSkin span.mce_underline {background-position:-140px 0}
|
|
||||||
.defaultSkin span.mce_strikethrough {background-position:-120px 0}
|
|
||||||
.defaultSkin span.mce_undo {background-position:-160px 0}
|
|
||||||
.defaultSkin span.mce_redo {background-position:-100px 0}
|
|
||||||
.defaultSkin span.mce_cleanup {background-position:-40px 0}
|
|
||||||
.defaultSkin span.mce_bullist {background-position:-20px 0}
|
|
||||||
.defaultSkin span.mce_numlist {background-position:-80px 0}
|
|
||||||
.defaultSkin span.mce_justifyleft {background-position:-460px 0}
|
|
||||||
.defaultSkin span.mce_justifyright {background-position:-480px 0}
|
|
||||||
.defaultSkin span.mce_justifycenter {background-position:-420px 0}
|
|
||||||
.defaultSkin span.mce_justifyfull {background-position:-440px 0}
|
|
||||||
.defaultSkin span.mce_anchor {background-position:-200px 0}
|
|
||||||
.defaultSkin span.mce_indent {background-position:-400px 0}
|
|
||||||
.defaultSkin span.mce_outdent {background-position:-540px 0}
|
|
||||||
.defaultSkin span.mce_link {background-position:-500px 0}
|
|
||||||
.defaultSkin span.mce_unlink {background-position:-640px 0}
|
|
||||||
.defaultSkin span.mce_sub {background-position:-600px 0}
|
|
||||||
.defaultSkin span.mce_sup {background-position:-620px 0}
|
|
||||||
.defaultSkin span.mce_removeformat {background-position:-580px 0}
|
|
||||||
.defaultSkin span.mce_newdocument {background-position:-520px 0}
|
|
||||||
.defaultSkin span.mce_image {background-position:-380px 0}
|
|
||||||
.defaultSkin span.mce_help {background-position:-340px 0}
|
|
||||||
.defaultSkin span.mce_code {background-position:-260px 0}
|
|
||||||
.defaultSkin span.mce_hr {background-position:-360px 0}
|
|
||||||
.defaultSkin span.mce_visualaid {background-position:-660px 0}
|
|
||||||
.defaultSkin span.mce_charmap {background-position:-240px 0}
|
|
||||||
.defaultSkin span.mce_paste {background-position:-560px 0}
|
|
||||||
.defaultSkin span.mce_copy {background-position:-700px 0}
|
|
||||||
.defaultSkin span.mce_cut {background-position:-680px 0}
|
|
||||||
.defaultSkin span.mce_blockquote {background-position:-220px 0}
|
|
||||||
.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
|
|
||||||
.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
|
|
||||||
.defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
|
|
||||||
.defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
|
|
||||||
|
|
||||||
/* Plugins */
|
|
||||||
.defaultSkin span.mce_advhr {background-position:-0px -20px}
|
|
||||||
.defaultSkin span.mce_ltr {background-position:-20px -20px}
|
|
||||||
.defaultSkin span.mce_rtl {background-position:-40px -20px}
|
|
||||||
.defaultSkin span.mce_emotions {background-position:-60px -20px}
|
|
||||||
.defaultSkin span.mce_fullpage {background-position:-80px -20px}
|
|
||||||
.defaultSkin span.mce_fullscreen {background-position:-100px -20px}
|
|
||||||
.defaultSkin span.mce_iespell {background-position:-120px -20px}
|
|
||||||
.defaultSkin span.mce_insertdate {background-position:-140px -20px}
|
|
||||||
.defaultSkin span.mce_inserttime {background-position:-160px -20px}
|
|
||||||
.defaultSkin span.mce_absolute {background-position:-180px -20px}
|
|
||||||
.defaultSkin span.mce_backward {background-position:-200px -20px}
|
|
||||||
.defaultSkin span.mce_forward {background-position:-220px -20px}
|
|
||||||
.defaultSkin span.mce_insert_layer {background-position:-240px -20px}
|
|
||||||
.defaultSkin span.mce_insertlayer {background-position:-260px -20px}
|
|
||||||
.defaultSkin span.mce_movebackward {background-position:-280px -20px}
|
|
||||||
.defaultSkin span.mce_moveforward {background-position:-300px -20px}
|
|
||||||
.defaultSkin span.mce_media {background-position:-320px -20px}
|
|
||||||
.defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
|
|
||||||
.defaultSkin span.mce_pastetext {background-position:-360px -20px}
|
|
||||||
.defaultSkin span.mce_pasteword {background-position:-380px -20px}
|
|
||||||
.defaultSkin span.mce_selectall {background-position:-400px -20px}
|
|
||||||
.defaultSkin span.mce_preview {background-position:-420px -20px}
|
|
||||||
.defaultSkin span.mce_print {background-position:-440px -20px}
|
|
||||||
.defaultSkin span.mce_cancel {background-position:-460px -20px}
|
|
||||||
.defaultSkin span.mce_save {background-position:-480px -20px}
|
|
||||||
.defaultSkin span.mce_replace {background-position:-500px -20px}
|
|
||||||
.defaultSkin span.mce_search {background-position:-520px -20px}
|
|
||||||
.defaultSkin span.mce_styleprops {background-position:-560px -20px}
|
|
||||||
.defaultSkin span.mce_table {background-position:-580px -20px}
|
|
||||||
.defaultSkin span.mce_cell_props {background-position:-600px -20px}
|
|
||||||
.defaultSkin span.mce_delete_table {background-position:-620px -20px}
|
|
||||||
.defaultSkin span.mce_delete_col {background-position:-640px -20px}
|
|
||||||
.defaultSkin span.mce_delete_row {background-position:-660px -20px}
|
|
||||||
.defaultSkin span.mce_col_after {background-position:-680px -20px}
|
|
||||||
.defaultSkin span.mce_col_before {background-position:-700px -20px}
|
|
||||||
.defaultSkin span.mce_row_after {background-position:-720px -20px}
|
|
||||||
.defaultSkin span.mce_row_before {background-position:-740px -20px}
|
|
||||||
.defaultSkin span.mce_merge_cells {background-position:-760px -20px}
|
|
||||||
.defaultSkin span.mce_table_props {background-position:-980px -20px}
|
|
||||||
.defaultSkin span.mce_row_props {background-position:-780px -20px}
|
|
||||||
.defaultSkin span.mce_split_cells {background-position:-800px -20px}
|
|
||||||
.defaultSkin span.mce_template {background-position:-820px -20px}
|
|
||||||
.defaultSkin span.mce_visualchars {background-position:-840px -20px}
|
|
||||||
.defaultSkin span.mce_abbr {background-position:-860px -20px}
|
|
||||||
.defaultSkin span.mce_acronym {background-position:-880px -20px}
|
|
||||||
.defaultSkin span.mce_attribs {background-position:-900px -20px}
|
|
||||||
.defaultSkin span.mce_cite {background-position:-920px -20px}
|
|
||||||
.defaultSkin span.mce_del {background-position:-940px -20px}
|
|
||||||
.defaultSkin span.mce_ins {background-position:-960px -20px}
|
|
||||||
.defaultSkin span.mce_pagebreak {background-position:0 -40px}
|
|
||||||
.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
|
|
||||||
.defaultSkin span.mce_spellchecker {background-position:-540px -20px}
|
|
|
@ -1,504 +0,0 @@
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 2.1, February 1999
|
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
[This is the first released version of the Lesser GPL. It also counts
|
|
||||||
as the successor of the GNU Library Public License, version 2, hence
|
|
||||||
the version number 2.1.]
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
Licenses are intended to guarantee your freedom to share and change
|
|
||||||
free software--to make sure the software is free for all its users.
|
|
||||||
|
|
||||||
This license, the Lesser General Public License, applies to some
|
|
||||||
specially designated software packages--typically libraries--of the
|
|
||||||
Free Software Foundation and other authors who decide to use it. You
|
|
||||||
can use it too, but we suggest you first think carefully about whether
|
|
||||||
this license or the ordinary General Public License is the better
|
|
||||||
strategy to use in any particular case, based on the explanations below.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom of use,
|
|
||||||
not price. Our General Public Licenses are designed to make sure that
|
|
||||||
you have the freedom to distribute copies of free software (and charge
|
|
||||||
for this service if you wish); that you receive source code or can get
|
|
||||||
it if you want it; that you can change the software and use pieces of
|
|
||||||
it in new free programs; and that you are informed that you can do
|
|
||||||
these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
distributors to deny you these rights or to ask you to surrender these
|
|
||||||
rights. These restrictions translate to certain responsibilities for
|
|
||||||
you if you distribute copies of the library or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
|
||||||
you. You must make sure that they, too, receive or can get the source
|
|
||||||
code. If you link other code with the library, you must provide
|
|
||||||
complete object files to the recipients, so that they can relink them
|
|
||||||
with the library after making changes to the library and recompiling
|
|
||||||
it. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
We protect your rights with a two-step method: (1) we copyright the
|
|
||||||
library, and (2) we offer you this license, which gives you legal
|
|
||||||
permission to copy, distribute and/or modify the library.
|
|
||||||
|
|
||||||
To protect each distributor, we want to make it very clear that
|
|
||||||
there is no warranty for the free library. Also, if the library is
|
|
||||||
modified by someone else and passed on, the recipients should know
|
|
||||||
that what they have is not the original version, so that the original
|
|
||||||
author's reputation will not be affected by problems that might be
|
|
||||||
introduced by others.
|
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
|
||||||
any free program. We wish to make sure that a company cannot
|
|
||||||
effectively restrict the users of a free program by obtaining a
|
|
||||||
restrictive license from a patent holder. Therefore, we insist that
|
|
||||||
any patent license obtained for a version of the library must be
|
|
||||||
consistent with the full freedom of use specified in this license.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the
|
|
||||||
ordinary GNU General Public License. This license, the GNU Lesser
|
|
||||||
General Public License, applies to certain designated libraries, and
|
|
||||||
is quite different from the ordinary General Public License. We use
|
|
||||||
this license for certain libraries in order to permit linking those
|
|
||||||
libraries into non-free programs.
|
|
||||||
|
|
||||||
When a program is linked with a library, whether statically or using
|
|
||||||
a shared library, the combination of the two is legally speaking a
|
|
||||||
combined work, a derivative of the original library. The ordinary
|
|
||||||
General Public License therefore permits such linking only if the
|
|
||||||
entire combination fits its criteria of freedom. The Lesser General
|
|
||||||
Public License permits more lax criteria for linking other code with
|
|
||||||
the library.
|
|
||||||
|
|
||||||
We call this license the "Lesser" General Public License because it
|
|
||||||
does Less to protect the user's freedom than the ordinary General
|
|
||||||
Public License. It also provides other free software developers Less
|
|
||||||
of an advantage over competing non-free programs. These disadvantages
|
|
||||||
are the reason we use the ordinary General Public License for many
|
|
||||||
libraries. However, the Lesser license provides advantages in certain
|
|
||||||
special circumstances.
|
|
||||||
|
|
||||||
For example, on rare occasions, there may be a special need to
|
|
||||||
encourage the widest possible use of a certain library, so that it becomes
|
|
||||||
a de-facto standard. To achieve this, non-free programs must be
|
|
||||||
allowed to use the library. A more frequent case is that a free
|
|
||||||
library does the same job as widely used non-free libraries. In this
|
|
||||||
case, there is little to gain by limiting the free library to free
|
|
||||||
software only, so we use the Lesser General Public License.
|
|
||||||
|
|
||||||
In other cases, permission to use a particular library in non-free
|
|
||||||
programs enables a greater number of people to use a large body of
|
|
||||||
free software. For example, permission to use the GNU C Library in
|
|
||||||
non-free programs enables many more people to use the whole GNU
|
|
||||||
operating system, as well as its variant, the GNU/Linux operating
|
|
||||||
system.
|
|
||||||
|
|
||||||
Although the Lesser General Public License is Less protective of the
|
|
||||||
users' freedom, it does ensure that the user of a program that is
|
|
||||||
linked with the Library has the freedom and the wherewithal to run
|
|
||||||
that program using a modified version of the Library.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow. Pay close attention to the difference between a
|
|
||||||
"work based on the library" and a "work that uses the library". The
|
|
||||||
former contains code derived from the library, whereas the latter must
|
|
||||||
be combined with the library in order to run.
|
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
|
||||||
program which contains a notice placed by the copyright holder or
|
|
||||||
other authorized party saying it may be distributed under the terms of
|
|
||||||
this Lesser General Public License (also called "this License").
|
|
||||||
Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
|
||||||
prepared so as to be conveniently linked with application programs
|
|
||||||
(which use some of those functions and data) to form executables.
|
|
||||||
|
|
||||||
The "Library", below, refers to any such software library or work
|
|
||||||
which has been distributed under these terms. A "work based on the
|
|
||||||
Library" means either the Library or any derivative work under
|
|
||||||
copyright law: that is to say, a work containing the Library or a
|
|
||||||
portion of it, either verbatim or with modifications and/or translated
|
|
||||||
straightforwardly into another language. (Hereinafter, translation is
|
|
||||||
included without limitation in the term "modification".)
|
|
||||||
|
|
||||||
"Source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For a library, complete source code means
|
|
||||||
all the source code for all modules it contains, plus any associated
|
|
||||||
interface definition files, plus the scripts used to control compilation
|
|
||||||
and installation of the library.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running a program using the Library is not restricted, and output from
|
|
||||||
such a program is covered only if its contents constitute a work based
|
|
||||||
on the Library (independent of the use of the Library in a tool for
|
|
||||||
writing it). Whether that is true depends on what the Library does
|
|
||||||
and what the program that uses the Library does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete source code as you receive it, in any medium, provided that
|
|
||||||
you conspicuously and appropriately publish on each copy an
|
|
||||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
|
||||||
all the notices that refer to this License and to the absence of any
|
|
||||||
warranty; and distribute a copy of this License along with the
|
|
||||||
Library.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy,
|
|
||||||
and you may at your option offer warranty protection in exchange for a
|
|
||||||
fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
|
||||||
of it, thus forming a work based on the Library, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The modified work must itself be a software library.
|
|
||||||
|
|
||||||
b) You must cause the files modified to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
c) You must cause the whole of the work to be licensed at no
|
|
||||||
charge to all third parties under the terms of this License.
|
|
||||||
|
|
||||||
d) If a facility in the modified Library refers to a function or a
|
|
||||||
table of data to be supplied by an application program that uses
|
|
||||||
the facility, other than as an argument passed when the facility
|
|
||||||
is invoked, then you must make a good faith effort to ensure that,
|
|
||||||
in the event an application does not supply such function or
|
|
||||||
table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
|
|
||||||
(For example, a function in a library to compute square roots has
|
|
||||||
a purpose that is entirely well-defined independent of the
|
|
||||||
application. Therefore, Subsection 2d requires that any
|
|
||||||
application-supplied function or table used by this function must
|
|
||||||
be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Library,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Library, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote
|
|
||||||
it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Library.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Library
|
|
||||||
with the Library (or with a work based on the Library) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
|
||||||
License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so
|
|
||||||
that they refer to the ordinary GNU General Public License, version 2,
|
|
||||||
instead of to this License. (If a newer version than version 2 of the
|
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
|
||||||
that version instead if you wish.) Do not make any other change in
|
|
||||||
these notices.
|
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
|
||||||
subsequent copies and derivative works made from that copy.
|
|
||||||
|
|
||||||
This option is useful when you wish to copy part of the code of
|
|
||||||
the Library into a program that is not a library.
|
|
||||||
|
|
||||||
4. You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form
|
|
||||||
under the terms of Sections 1 and 2 above provided that you accompany
|
|
||||||
it with the complete corresponding machine-readable source code, which
|
|
||||||
must be distributed under the terms of Sections 1 and 2 above on a
|
|
||||||
medium customarily used for software interchange.
|
|
||||||
|
|
||||||
If distribution of object code is made by offering access to copy
|
|
||||||
from a designated place, then offering equivalent access to copy the
|
|
||||||
source code from the same place satisfies the requirement to
|
|
||||||
distribute the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
5. A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or
|
|
||||||
linked with it, is called a "work that uses the Library". Such a
|
|
||||||
work, in isolation, is not a derivative work of the Library, and
|
|
||||||
therefore falls outside the scope of this License.
|
|
||||||
|
|
||||||
However, linking a "work that uses the Library" with the Library
|
|
||||||
creates an executable that is a derivative of the Library (because it
|
|
||||||
contains portions of the Library), rather than a "work that uses the
|
|
||||||
library". The executable is therefore covered by this License.
|
|
||||||
Section 6 states terms for distribution of such executables.
|
|
||||||
|
|
||||||
When a "work that uses the Library" uses material from a header file
|
|
||||||
that is part of the Library, the object code for the work may be a
|
|
||||||
derivative work of the Library even though the source code is not.
|
|
||||||
Whether this is true is especially significant if the work can be
|
|
||||||
linked without the Library, or if the work is itself a library. The
|
|
||||||
threshold for this to be true is not precisely defined by law.
|
|
||||||
|
|
||||||
If such an object file uses only numerical parameters, data
|
|
||||||
structure layouts and accessors, and small macros and small inline
|
|
||||||
functions (ten lines or less in length), then the use of the object
|
|
||||||
file is unrestricted, regardless of whether it is legally a derivative
|
|
||||||
work. (Executables containing this object code plus portions of the
|
|
||||||
Library will still fall under Section 6.)
|
|
||||||
|
|
||||||
Otherwise, if the work is a derivative of the Library, you may
|
|
||||||
distribute the object code for the work under the terms of Section 6.
|
|
||||||
Any executables containing that work also fall under Section 6,
|
|
||||||
whether or not they are linked directly with the Library itself.
|
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
|
||||||
link a "work that uses the Library" with the Library to produce a
|
|
||||||
work containing portions of the Library, and distribute that work
|
|
||||||
under terms of your choice, provided that the terms permit
|
|
||||||
modification of the work for the customer's own use and reverse
|
|
||||||
engineering for debugging such modifications.
|
|
||||||
|
|
||||||
You must give prominent notice with each copy of the work that the
|
|
||||||
Library is used in it and that the Library and its use are covered by
|
|
||||||
this License. You must supply a copy of this License. If the work
|
|
||||||
during execution displays copyright notices, you must include the
|
|
||||||
copyright notice for the Library among them, as well as a reference
|
|
||||||
directing the user to the copy of this License. Also, you must do one
|
|
||||||
of these things:
|
|
||||||
|
|
||||||
a) Accompany the work with the complete corresponding
|
|
||||||
machine-readable source code for the Library including whatever
|
|
||||||
changes were used in the work (which must be distributed under
|
|
||||||
Sections 1 and 2 above); and, if the work is an executable linked
|
|
||||||
with the Library, with the complete machine-readable "work that
|
|
||||||
uses the Library", as object code and/or source code, so that the
|
|
||||||
user can modify the Library and then relink to produce a modified
|
|
||||||
executable containing the modified Library. (It is understood
|
|
||||||
that the user who changes the contents of definitions files in the
|
|
||||||
Library will not necessarily be able to recompile the application
|
|
||||||
to use the modified definitions.)
|
|
||||||
|
|
||||||
b) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (1) uses at run time a
|
|
||||||
copy of the library already present on the user's computer system,
|
|
||||||
rather than copying library functions into the executable, and (2)
|
|
||||||
will operate properly with a modified version of the library, if
|
|
||||||
the user installs one, as long as the modified version is
|
|
||||||
interface-compatible with the version that the work was made with.
|
|
||||||
|
|
||||||
c) Accompany the work with a written offer, valid for at
|
|
||||||
least three years, to give the same user the materials
|
|
||||||
specified in Subsection 6a, above, for a charge no more
|
|
||||||
than the cost of performing this distribution.
|
|
||||||
|
|
||||||
d) If distribution of the work is made by offering access to copy
|
|
||||||
from a designated place, offer equivalent access to copy the above
|
|
||||||
specified materials from the same place.
|
|
||||||
|
|
||||||
e) Verify that the user has already received a copy of these
|
|
||||||
materials or that you have already sent this user a copy.
|
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
|
||||||
Library" must include any data and utility programs needed for
|
|
||||||
reproducing the executable from it. However, as a special exception,
|
|
||||||
the materials to be distributed need not include anything that is
|
|
||||||
normally distributed (in either source or binary form) with the major
|
|
||||||
components (compiler, kernel, and so on) of the operating system on
|
|
||||||
which the executable runs, unless that component itself accompanies
|
|
||||||
the executable.
|
|
||||||
|
|
||||||
It may happen that this requirement contradicts the license
|
|
||||||
restrictions of other proprietary libraries that do not normally
|
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
|
||||||
use both them and the Library together in an executable that you
|
|
||||||
distribute.
|
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
|
||||||
Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined
|
|
||||||
library, provided that the separate distribution of the work based on
|
|
||||||
the Library and of the other library facilities is otherwise
|
|
||||||
permitted, and provided that you do these two things:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work
|
|
||||||
based on the Library, uncombined with any other library
|
|
||||||
facilities. This must be distributed under the terms of the
|
|
||||||
Sections above.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library of the fact
|
|
||||||
that part of it is a work based on the Library, and explaining
|
|
||||||
where to find the accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
8. You may not copy, modify, sublicense, link with, or distribute
|
|
||||||
the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library is void, and will automatically terminate your
|
|
||||||
rights under this License. However, parties who have received copies,
|
|
||||||
or rights, from you under this License will not have their licenses
|
|
||||||
terminated so long as such parties remain in full compliance.
|
|
||||||
|
|
||||||
9. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Library or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Library (or any work based on the
|
|
||||||
Library), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Library or works based on it.
|
|
||||||
|
|
||||||
10. Each time you redistribute the Library (or any work based on the
|
|
||||||
Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library
|
|
||||||
subject to these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties with
|
|
||||||
this License.
|
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Library at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Library by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Library.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under any
|
|
||||||
particular circumstance, the balance of the section is intended to apply,
|
|
||||||
and the section as a whole is intended to apply in other circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library under this License may add
|
|
||||||
an explicit geographical distribution limitation excluding those countries,
|
|
||||||
so that distribution is permitted only in or among countries not thus
|
|
||||||
excluded. In such case, this License incorporates the limitation as if
|
|
||||||
written in the body of this License.
|
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Lesser General Public License from time to time.
|
|
||||||
Such new versions will be similar in spirit to the present version,
|
|
||||||
but may differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Library
|
|
||||||
specifies a version number of this License which applies to it and
|
|
||||||
"any later version", you have the option of following the terms and
|
|
||||||
conditions either of that version or of any later version published by
|
|
||||||
the Free Software Foundation. If the Library does not specify a
|
|
||||||
license version number, you may choose any version ever published by
|
|
||||||
the Free Software Foundation.
|
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
|
||||||
programs whose distribution conditions are incompatible with these,
|
|
||||||
write to the author to ask for permission. For software which is
|
|
||||||
copyrighted by the Free Software Foundation, write to the Free
|
|
||||||
Software Foundation; we sometimes make exceptions for this. Our
|
|
||||||
decision will be guided by the two goals of preserving the free status
|
|
||||||
of all derivatives of our free software and of promoting the sharing
|
|
||||||
and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
||||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
||||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
|
||||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
|
||||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
||||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
|
||||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
|
||||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
|
||||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
|
||||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
|
||||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
|
||||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
|
||||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
|
||||||
possible use to the public, we recommend making it free software that
|
|
||||||
everyone can redistribute and change. You can do so by permitting
|
|
||||||
redistribution under these terms (or, alternatively, under the terms of the
|
|
||||||
ordinary General Public License).
|
|
||||||
|
|
||||||
To apply these terms, attach the following notices to the library. It is
|
|
||||||
safest to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least the
|
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the library's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
||||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1990
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
||||||
|
|
||||||
|
|
|
@ -1,477 +0,0 @@
|
||||||
Version 3.5.8 (2012-11-20)
|
|
||||||
Fixed bug where html5 data attributes where stripped from contents.
|
|
||||||
Fixed bug where toolbar was annouced multiple times with JAWS on Firefox.
|
|
||||||
Fixed bug where the editor view whouldn't scroll to BR elements when using shift+enter or br enter mode.
|
|
||||||
Fixed bug where a JS error would be thrown when trying to paste table rows then the rows clipboard was empty.
|
|
||||||
Fixed bug with auto detection logic for youtube urls in the media plugin.
|
|
||||||
Fixed bug where the formatter would throw errors if you used the jQuery version of TinyMCE and the latest jQuery.
|
|
||||||
Fixed bug where the latest WebKit versions would produce span elements when deleting text between blocks.
|
|
||||||
Fixed bug where the autolink plugin would produce DOM exceptions when pressing shift+enter inside a block element.
|
|
||||||
Fixed bug where toggling of blockquotes when using br enter mode would produce an exception.
|
|
||||||
Fixed bug where focusing out of the body of the editor wouldn't properly add an undo level.
|
|
||||||
Fixed issue with warning message being displayed on IE 9+ about the meta header fix for IE 8.
|
|
||||||
Version 3.5.7 (2012-09-20)
|
|
||||||
Changed table row properties dialog to not update multiple rows when row type is header or footer.
|
|
||||||
Fixed bug in hyperlink dialog for IE9 where links with no target attr set had target value of --
|
|
||||||
Changing toolbars to have a toolbar role for FF keyboard navigation works correctly.
|
|
||||||
Fixed bug where applying formatting to an empty block element would produce redundant spans.
|
|
||||||
Fixed bug where caret formatting on IE wouldn't properly apply if you pressed enter/return.
|
|
||||||
Fixed bug where loading TinyMCE using an async script wouldn't properly initialize editors.
|
|
||||||
Fixed bug where some white space would be removed after inline elements before block elements.
|
|
||||||
Fixed bug where it wouldn't properly parse attributes with a single backslash as it's contents.
|
|
||||||
Fixed bug where noscript elements would loose it's contents on older IE versions.
|
|
||||||
Fixed bug where backspace inside empty blockquote wouldn't delete it properly.
|
|
||||||
Fixed bug where custom elements with . in their names wouldn't work properly.
|
|
||||||
Fixed bug where the custom_elements option didn't properly setup the block elements schema structure.
|
|
||||||
Fixed bug where the custom_elements option didn't auto populate the extended_valid_elements.
|
|
||||||
Fixed bug where the whole TD element would get blcok formatted when there where BR elements in it.
|
|
||||||
Fixed bug where IE 9 might crash if the editor was hidden and specific styles where applied to surrounding contents.
|
|
||||||
Fixed bug where shift+enter inside a table cell on Gecko would produce an zero width non breaking space between tr:s.
|
|
||||||
Fixed bug where the advlink dialog wouldn't properly populate the anchors dropdown if the HTML5 schema was used.
|
|
||||||
Fixed issue with missing autofocus attribute on input element when using the HTML5 schema.
|
|
||||||
Fixed issue where enter inside a block contained within an LI element wouldn't produce a new LI.
|
|
||||||
Version 3.5.6 (2012-07-26)
|
|
||||||
Added "text" as a valid option to the editor.getContent format option. Makes it easier to get a text representation of the editor contents.
|
|
||||||
Fixed bug where resizing an image to less that 0x0 pixels would display the ghost image at an incorrect position.
|
|
||||||
Fixed bug where the remove format button would produce extra paragraphs on WebKit if all of the contents was selected.
|
|
||||||
Fixed issue where edge resize handles on images of wouldn't scale it with the same aspect ratio.
|
|
||||||
Fixed so force_p_newlines option works again since some users want mixed mode paragraphs.
|
|
||||||
Fixed so directionality plugin modifies the dir attribute of all selected blocks in the editor.
|
|
||||||
Fixed bug where backspace/delete of a custom element would move it's attributes to the parent block on Gecko.
|
|
||||||
Version 3.5.5 (2012-07-19)
|
|
||||||
Added full resize support for images and tables on WebKit/Opera. It now behaves just like Gecko.
|
|
||||||
Added automatic embed support for Vimeo, Stream.cz and Google Maps in media plugin. Patch contributed by Jakub Matas.
|
|
||||||
Fixed bug where the lists plugin wouldn't properly remove all li elements when toggling selected items of. Patched by Taku AMANO.
|
|
||||||
Fixed bug where the lists plugin would remove the entire list if you pressed deleted at the beginning of the first element. Patched by Taku AMANO.
|
|
||||||
Fixed bug where the ordered/unordered list buttons could both be enabled if you nested lists. Patch contributed by Craig Petchell.
|
|
||||||
Fixed bug where shift+enter wouldn't produce a BR in a LI when having forced_root_blocks set to false.
|
|
||||||
Fixed bug where scrollbars aren't visible in fullscreen when window is resized.
|
|
||||||
Fixed bug with updating the border size using the advimage dialog on IE 9.
|
|
||||||
Fixed bug where the selection of inner elements on IE 8 in contentEditable mode would select the whole parent element.
|
|
||||||
Fixed bug where the enter key would produce an empty anchor if you pressed it at the space after a link on IE.
|
|
||||||
Fixed bug where autolink plugin would produce an exception for specific html see bug #5365
|
|
||||||
Fixed so the formatChanged function takes an optional "similar" parameter to use while matching the format.
|
|
||||||
Version 3.5.4.1 (2012-06-24)
|
|
||||||
Fixed issue with Shift+A selecting all contents on Chrome.
|
|
||||||
Version 3.5.4 (2012-06-21)
|
|
||||||
Added missing mouse events to HTML5 schema. Some events needs to be manually defined though since the spec is huge.
|
|
||||||
Added image resizing for WebKit browsers by faking the whole resize behavior.
|
|
||||||
Fixed bug in context menu plugin where listener to hide menu wasn't removed correctly.
|
|
||||||
Fixed bug where media plugin wouldn't use placeholder size for the object/video elements.
|
|
||||||
Fixed bug where jQuery plugin would break attr function in jQuery 1.7.2.
|
|
||||||
Fixed bug where jQuery plugin would throw an error if you used the tinymce pseudo selector when TinyMCE wasn't loaded.
|
|
||||||
Fixed so encoding option gets applied when using jQuery val() or attr() to extract the contents.
|
|
||||||
Fixed so any non valid width/height passed to media plugin would get parsed to proper integer or percent values.
|
|
||||||
Version 3.5.3 (2012-06-19)
|
|
||||||
Added missing wbr element to HTML5 schema.
|
|
||||||
Added new mceToggleFormat command. Enabled you to toggle a specific format on/off.
|
|
||||||
Fixed bug where undo/redo state didn't update correctly after executing an execCommand call.
|
|
||||||
Fixed bug where the editor would get auto focused on IE running in quirks mode.
|
|
||||||
Fixed bug where pressing enter before an IMG or INPUT element wouldn't properly split the block.
|
|
||||||
Fixed bug where backspace would navigate back when selecting control types on IE.
|
|
||||||
Fixed bug where the editor remove method would unbind events for controls outside the editor instance UI.
|
|
||||||
Fixed bug where the autosave plugin would try to store a draft copy of editors that where removed.
|
|
||||||
Fixed bug where floated elements wouldn't expand the block created when pressing enter on non IE browsers.
|
|
||||||
Fixed bug where the caret would be placed in the wrong location when pressing enter at the beginning of a block.
|
|
||||||
Fixed bug where it wasn't possible to block events using the handle_event_callback option.
|
|
||||||
Fixed bug where keyboard navigation of the ColorSplitButton.js didn't work correctly.
|
|
||||||
Fixed bug where keyboard navigation didn't work correctly on split buttons.
|
|
||||||
Fixed bug where the legacy Event.add function didn't properly handle multiple id:s passed in.
|
|
||||||
Fixed bug where the caret would disappear on IE when selecting all contents and pressing backspace/delete.
|
|
||||||
Fixed bug where the getStart/getEnd methods would sometimes return elements from the wrong document on IE.
|
|
||||||
Fixed so paragraphs gets created if you press enter inside a form element.
|
|
||||||
Version 3.5.2 (2012-05-31)
|
|
||||||
Added new formatChanged method to tinymce.Formatter class. Enables easier state change handling of formats.
|
|
||||||
Added new selectorChanged method to tinymce.dom.Selection class. Enables easier state change handling of matching CSS selectors.
|
|
||||||
Changed the default theme to be advanced instead of simple since most users uses the advanced theme.
|
|
||||||
Changed so the theme_advanced_buttons doesn't have a default set if one button row is specified.
|
|
||||||
Changed the theme_advanced_toolbar_align default value to "left".
|
|
||||||
Changed the theme_advanced_toolbar_location default value to "top".
|
|
||||||
Changed the theme_advanced_statusbar_location default value to "bottom".
|
|
||||||
Fixed bug where the simple link dialog would remove class and target attributes from links when updating them if the drop downs wasn't visible.
|
|
||||||
Fixed bug where the link/unlink buttons wouldn't get disabled once a link was created by the autolink plugin logic.
|
|
||||||
Fixed bug where the border attribute was missing in the HTML5 schema.
|
|
||||||
Fixed bug where the legacyoutput plugin would use inline styles for font color.
|
|
||||||
Fixed bug where editing of anchor names wouldn't produce an undo level.
|
|
||||||
Fixed bug where the table plugin would delete the last empty block element in the editor.
|
|
||||||
Fixed bug where pasting table rows when they where selected would make it impossible to editor that table row.
|
|
||||||
Fixed bug with pressing enter in IE while having a select list focused would produce a JS error.
|
|
||||||
Fixed bug where it wasn't possible to merge table cells by selecting them and using merge from context menu.
|
|
||||||
Removed summary from HTML5 table attributes and fixed so this and other deprecated table fields gets hidden in the table dialog.
|
|
||||||
Version 3.5.1.1 (2012-05-25)
|
|
||||||
Fixed bug with control creation where plugin specific controls didn't work as expected.
|
|
||||||
Version 3.5.1 (2012-05-25)
|
|
||||||
Added new onBeforeAdd event to UndoManager patch contributed by Dan Rumney.
|
|
||||||
Added support for overriding the theme rendering logic by using a custom function.
|
|
||||||
Fixed bug where links wasn't automatically created by the autolink plugin on old IE versions when pressing enter in BR mode.
|
|
||||||
Fixed bug where enter on older IE versions wouldn't produce a new paragraph if the previous sibling paragraph was empty.
|
|
||||||
Fixed bug where toString on a faked DOM range on older IE versions wouldn't return a proper string.
|
|
||||||
Fixed bug where named anchors wouldn't work properly when schema was set to HTML5.
|
|
||||||
Fixed bug where HTML5 datalist options wasn't correctly parsed or indented.
|
|
||||||
Fixed bug where linking would add anchors around block elements when the HTML5 schema was used.
|
|
||||||
Fixed issue where the autolink plugin wouldn't properly handle mailto:user@domain.com.
|
|
||||||
Optimized initialization and reduced rendering flicker by hiding the target element while initializing.
|
|
||||||
Version 3.5.0.1 (2012-05-10)
|
|
||||||
Fixed bug where selection normalization logic would break the selections of parent elements using the element path.
|
|
||||||
Fixed bug where the autolink plugin would include trailing dots in domain names in the link creation.
|
|
||||||
Fixed bug where the autolink plugin would produce an error on older IE versions when pressing enter.
|
|
||||||
Fixed bug where old IE versions would throw an error during initialization when the editor was placed in an size restricted div.
|
|
||||||
Version 3.5 (2012-05-03)
|
|
||||||
Fixed menu rendering issue if the document was in rtl mode.
|
|
||||||
Fixed bug where the hide function would throw an error about a missing variable.
|
|
||||||
Fixed bug where autolink wouldn't convert URLs when hitting enter on IE due to the new enter key logic.
|
|
||||||
Fixed bug where formatting using shortcuts like ctrl+b wouldn't work properly the first time.
|
|
||||||
Fixed bug where selection.setContent after a formatter call wouldn't generate formatted contents.
|
|
||||||
Fixed bug where whitespace would be removed before/after invalid_elements when they where removed.
|
|
||||||
Fixed bug where updating styles using the theme image dialog in non inline mode on IE9 would produce errors.
|
|
||||||
Fixed bug where IE 8 would produce an error when using the contextmenu plugin.
|
|
||||||
Fixed bug where delete/backspace could remove contents of noneditable elements.
|
|
||||||
Fixed so background color in style preview gets computed from body element if the current style element is transparent.
|
|
||||||
Version 3.5b3 (2012-03-29)
|
|
||||||
Added cancel button to colour picker dialog.
|
|
||||||
Added figure and figcaption to the html5 visualblocks plugin.
|
|
||||||
Added default alignment options for the figure element.
|
|
||||||
Fixed bug where empty inline elements within block elements would sometimes produce a br child element.
|
|
||||||
Fixed bug where urls pointing to the same domain as the current one would cause undefined errors. Patch contributed by Paul Giberson.
|
|
||||||
Fixed bug where enter inside an editable element inside an non editable element would split the element.
|
|
||||||
Fixed bug where cut/copy/paste of noneditable elements didn't work.
|
|
||||||
Fixed bug where backspace would sometimes produce font elements on WebKit.
|
|
||||||
Fixed bug where WebKit would produce spans out of various inline elements when using backspace.
|
|
||||||
Fixed bug where IE9 wouldn't properly update image styles when images where resized.
|
|
||||||
Fixed bug where drag/drop of noneditable elements didn't work correctly.
|
|
||||||
Fixed bug where applying formatting to all contents wouldn't work correctly when an end point was inside an empty bock. Patch contributed by Jose Luiz.
|
|
||||||
Fixed bug where IE10 removed the scopeName from the DOM element interface and there for it produced an undefined string in element path.
|
|
||||||
Fixed bug where the caret would be placed at an incorrect location if you applied block formatting while having the caret at the end of the block.
|
|
||||||
Fixed bug where applying column changes using the cell dialog would only update the first column. Patch contributed by krzyko.
|
|
||||||
Fixed bug where the visualblocks plugin would force editor focus if it was turned on by default.
|
|
||||||
Fixed bug where the tabfocus plugin would tab to iframes these are now ignored.
|
|
||||||
Fixed bug where format drop down list wouldn't show the currently active format for a parent element.
|
|
||||||
Fixed bug where paste of plain text in IE 9 would remove the new line characters from text.
|
|
||||||
Fixed bug where the menu buttons/split button menus wouldn't be opened at the right location on older IE versions.
|
|
||||||
Fixed bug where Gecko browsers wouldn't properly display the right format when having the selection as specific places.
|
|
||||||
Fixed bug where shift+enter inside the body when having forced_root_blocks set to false would throw an error.
|
|
||||||
Fixed bug where the jQuery plugin would break the attr method of jQuery 1.7.2. Patch contributed by Markus Kemmerling.
|
|
||||||
Fixed so options like content_css accepts and array as well as a comma separated string as input.
|
|
||||||
Restructured the internal logic to make it more separate from Editor.js.
|
|
||||||
Updated the Sizzle engine to the latest version.
|
|
||||||
Version 3.5b2 (2012-03-15)
|
|
||||||
Rewrote the enter key logic to normalize browser behavior.
|
|
||||||
Fixed so enter within PRE elements produces a BR and shift+enter breaks/end the PRE. Can be disabled using the br_in_pre option.
|
|
||||||
Fixed bug where the selection wouldn't be correct after applying formatting and having the caret at the end of the new format node.
|
|
||||||
Fixed bug where the noneditable plugin would process contents on raw input calls for example on undo/redo calls.
|
|
||||||
Fixed bug where WebKit could produce an exception when a bookmark was requested when there wasn't a proper selection.
|
|
||||||
Fixed bug where WebKit would fail to open the image dialog since it would be returning false for a class name instead of a string.
|
|
||||||
Fixed so alignment and indentation works properly when forced_root_blocks is set to false. It will produce a DIV by default.
|
|
||||||
Version 3.5b1 (2012-03-08)
|
|
||||||
Added new event class that is faster and enables support for faking events.
|
|
||||||
Added new self_closing_elements, short_ended_elements, boolean_attributes, non_empty_elements and block_elements options to control the HTML Schema.
|
|
||||||
Added new schema option and support for the HTML5 schema.
|
|
||||||
Added new visualblocks plugin that shows html5 blocks with visual borders.
|
|
||||||
Added new types and selector options to make it easier to create editor instances with different configs.
|
|
||||||
Added new preview of formatting options in various listboxes.
|
|
||||||
Added new preview_styles option that enables control over what gets previewed.
|
|
||||||
Fixed bug where content css would be loaded twice into iframe.
|
|
||||||
Fixed bug where start elements with only whitespace in the attribute part wouldn't be correctly parsed.
|
|
||||||
Fixed bug where the advlink dialog would produce an error about the addSelectAccessibility function not being defined.
|
|
||||||
Fixed bug where the caret would be placed at an incorrect position if span was removed by the invalid_elements setting.
|
|
||||||
Fixed bug where elements inside a white space preserve element like pre didn't inherit the behavior while parsing.
|
|
||||||
Version 3.4.9 (2012-02-23)
|
|
||||||
Added settings to wordcount plugin to configure update rate and checking wordcount on backspace and delete using wordcount_update_rate and wordcount_update_on_delete.
|
|
||||||
Fixed bug in Webkit and IE where deleting empty paragraphs would remove entire editor contents.
|
|
||||||
Fixed bug where pressing enter on end of list item with a heading would create a new item with heading.
|
|
||||||
Fixed edit css style dialog text-decoration none checkbox so it disables other text-decoration options when enabled.
|
|
||||||
Fixed bug in Gecko where undo wasn't added when focus was lost.
|
|
||||||
Fixed bug in Gecko where shift-enter in table cell ending with BR doesn't move caret to new line.
|
|
||||||
Fixed bug where right-click on formatted text in IE selected the entire line.
|
|
||||||
Fixed bug where text ending with space could not be unformatted in IE.
|
|
||||||
Fixed bug where caret formatting would be removed when moving the caret when a selector expression was used.
|
|
||||||
Fixed bug where formatting would be applied to the body element when all contents where selected and format had both inline and selector parts.
|
|
||||||
Fixed bug where the media plugin would throw errors if you had iframe set as an invalid element in config.
|
|
||||||
Fixed bug where the caret would be placed at the top of the document if you inserted a table and undo:ed that operation. Patch contributed by Wesley Walser.
|
|
||||||
Fixed bug where content css files where loaded twice into the iframe.
|
|
||||||
Fixed so elements with comments would be trated as non empty elements. Patch contributed by Arjan Scherpenisse.
|
|
||||||
Version 3.4.8 (2012-02-02)
|
|
||||||
Fixed bug in IE where selected text ending with space cannot be formatted then formatted again to get original text.
|
|
||||||
Fixed bug in IE where images larger than editor area were being deselected when toolbar buttons are clicked.
|
|
||||||
Fixed bug where wrong text align buttons are active when multiple block elements are selected.
|
|
||||||
Fixed bug where selected link not showing in target field of link dialog in some selection cases.
|
|
||||||
Use settings for remove_trailing_br so this can be turned off instead of hard coding the value.
|
|
||||||
Fixed bug in IE where the media plugin displayed null text when some values aren't filled in.
|
|
||||||
Added API method 'onSetAttrib' that fires when the attribute value on a node changes.
|
|
||||||
Fix font size dropdown value not being updated when text already has a font size in the advanced template.
|
|
||||||
Fixed bug in IE where IE doesn't use ARIA attributes properly on options - causing labels to be read out 2 times.
|
|
||||||
Fixed bug where caret cannot be placed after table if table is at end of document in IE.
|
|
||||||
Fixed bug where adding range isn't always successful so we need to check range count otherwise an exception can occur.
|
|
||||||
Added spacebar onclick handler to toolbar buttons to ensure that the accessibility behaviour works correctly.
|
|
||||||
Fixed bug where a stranded bullet point would get created in WebKit.
|
|
||||||
Fixed bug where selecting text in a blockquote and pressing backspace toggles the style.
|
|
||||||
Fixed bug where pressing enter from a heading in IE, the resulting P tag below it shares the style property.
|
|
||||||
Fix white space in between spans from being deleted.
|
|
||||||
Fixed bug where scrollbars where visible in the character map dialog on Gecko.
|
|
||||||
Fixed issue with missing translation for one of the emoticons.
|
|
||||||
Fixed bug where dots in id:s where causing problems. Patch provided by Abhishek Dev.
|
|
||||||
Fixed bug where urls with an at sign in the path wouldn't be parsed correctly. Patch contributed by Jason Grout.
|
|
||||||
Fixed bug where Opera would remove the first character of a inline formatted word if you pressed backspace.
|
|
||||||
Fixed bugs with the autoresize plugin on various browsers and removed the need for the throbber.
|
|
||||||
Fixed performance issue where the contextmenu plugin would try to remove the menu even if it was removed. Patch contributed by mhu.
|
|
||||||
Version 3.4.7 (2011-11-03)
|
|
||||||
Modified the caret formatting behavior to word similar to common desktop wordprocessors like Word or Libre Office.
|
|
||||||
Fixed bug in Webkit - Cursor positioning does not work vertically within a table cell with multiple lines of text.
|
|
||||||
Fixed bug in IE where Inserting a table in IE8 places cursor in the second cell of the first row.
|
|
||||||
Fixed bug in IE where editor in a frame doesn't give focus to the toolbar using ALT-F10.
|
|
||||||
Fix for webkit and gecko so that deleting bullet from start of list outdents inner list items and moves first item into paragraph.
|
|
||||||
Fix new list items in IE8 not displayed on a new line when list contains nested list items.
|
|
||||||
Clear formatting in table cell breaks the cell.
|
|
||||||
Made media type list localisable.
|
|
||||||
Fix out of memory error when using prototype in media dialog.
|
|
||||||
Fixed bug where could not add a space in the middle of a th cell.
|
|
||||||
Fixed bug where adding a bullet between two existing bullets adds an extra one
|
|
||||||
Fixed bug where trying to insert a new entry midway through a bulleted list fails dismally when the next entry is tabbed in.
|
|
||||||
Fixed bug where pressing enter on an empty list item does not outdent properly in FF
|
|
||||||
Fixed bug where adding a heading after a list item in a table cell changes all styles in that cell
|
|
||||||
Fixed bug where hitting enter to exit from a bullet list moves cursor to the top of the page in Firefox.
|
|
||||||
Fixed bug where pressing backspace would not delete HRs in Firefox and IE when next to an empty paragraph.
|
|
||||||
Fixed bug where deleting part of the link text can cause a link with no destination to be saved.
|
|
||||||
Fixed bug where css style border widths wasn't handled correctly in table dialog.
|
|
||||||
Fixed bug where parsing invalid html contents on IE or WebKit could produce an infinite loop.
|
|
||||||
Fixed bug where scripts with custom script types wasn't properly passed though the editor.
|
|
||||||
Fixed issue where some Japanese kanji characters wasn't properly entity encoded when numeric entity mode was enabled.
|
|
||||||
Made emoticons dialog use the keyboard naviation.
|
|
||||||
Added navigation instructions to the symbols dialog.
|
|
||||||
Added ability to set default values for the media plugin.
|
|
||||||
Added new font_size_legacy_values option for converting old font element sizes to span with font-size properties.
|
|
||||||
Fixed bug where the symbols dialog was not accessible.
|
|
||||||
Added quirk for IE ensuring that the body of the document containing tinyMCE has a role="application" for accessibility.
|
|
||||||
Fixed bug where the advanced color picker wasn't working properly on FF 7.
|
|
||||||
Fixed issue where the advanced color picker was producing uppercase hex codes.
|
|
||||||
Fixed bug where IE 8 could throw exceptions if the contents contained resizable content elements.
|
|
||||||
Fixed bug where caret formatting wouldn't be correctly applied to previous sibling on WebKit.
|
|
||||||
Fixed bug where the select boxes for font size/family would loose it's value on WebKit due to recent iOS fixes.
|
|
||||||
Version 3.4.6 (2011-09-29)
|
|
||||||
Fixed bug where list items were being created for empty divs.
|
|
||||||
Added support in Media plugin for audio media using the embed tag
|
|
||||||
Fixed accessibility bugs in WebKit and IE8 where toolbar items were not being read.
|
|
||||||
Added new use_accessible_selects option to ensure accessible list boxes are used in all browsers (custom widget in firefox native on other browsers)
|
|
||||||
Fixed bug where classid attribute was not being checked from embed objects.
|
|
||||||
Fixed bug in jsrobot tests with intermittently failing.
|
|
||||||
Fixed bug where anchors wasn't updated properly if you edited them using IE 8.
|
|
||||||
Fixed bug where input method on WebKit on Mac OS X would fail to initialize when sometimes focusing the editor.
|
|
||||||
Fixed bug where it wasn't possible to select HR elements on WebKit by simply clicking on them.
|
|
||||||
Fixed bug where the media plugin wouldn't work on IE9 when not using the inlinepopups plugin.
|
|
||||||
Fixed bug where hspace,vspace,align and bgcolor would be removed from object elements in the media plugin.
|
|
||||||
Fixed bug where the new youtube format wouldn't be properly parsed by the media plugin.
|
|
||||||
Fixed bug where the style attribute of layers wasn't properly updated on IE and Gecko.
|
|
||||||
Fixed bug where editing contents in a layer would fail on Gecko since contentEditable doesn't inherit properly.
|
|
||||||
Fixed bug where IE 6/7 would produce JS errors when serializing contents containing layers.
|
|
||||||
Version 3.4.5 (2011-09-06)
|
|
||||||
Fixed accessibility bug in WebKit where the right and left arrow keys would update native list boxes.
|
|
||||||
Added new whitespace_elements option to enable users to specify specific elements where the whitespace is preserved.
|
|
||||||
Added new merge_siblings option to formats. This option makes it possible to disable the auto merging of siblings when applying formats.
|
|
||||||
Fixed bug in IE where trailing comma in paste plugin would cause plugin to not run correctly.
|
|
||||||
Fixed bug in WebKit where console messages would be logged when deleting an empty document.
|
|
||||||
Fixed bug in IE8 where caret positioned is on list item instead of paragraph when outdent splits the list
|
|
||||||
Fixed bug with image dialogs not inserting an image if id was omitted from valid_elements.
|
|
||||||
Fixed bug where the selection normalization logic wouldn't properly handle image elements in specific config cases.
|
|
||||||
Fixed bug where the map elements coords attribute would be messed up by IE when serializing the DOM.
|
|
||||||
Fixed bug where IE wouldn't properly handle custom elements when the contents was serialized.
|
|
||||||
Fixed bug where you couldn't move the caret in Gecko if you focused the editor using the API or a UI control.
|
|
||||||
Fixed bug where adjacent links would get merged on IE due to bugs in their link command.
|
|
||||||
Fixed bug where the color split buttons would loose the selection on IE if the editor was placed in a frame/iframe.
|
|
||||||
Fixed bug where floated images in WebKit wouldn't get properly linked.
|
|
||||||
Fixed bug where the fullscreen mode in a separate window wasn't forced into IE9+ standards mode.
|
|
||||||
Fixed bug where pressing enter in an empty editor on WebKit could produce DIV elements instead of P.
|
|
||||||
Fixed bug where spans would get removed incorrectly when merging two blocks on backspace/delete on WebKit.
|
|
||||||
Fixed bug where the editor contents wouldn't be completely removed on backspace/delete on WebKit.
|
|
||||||
Fixed bug where the fullpage plugin wouldn't properly render style elements in the head on IE 6/7.
|
|
||||||
Fixed bug where the nonbreaking_force_tab option in the nonbreaking plugin wouldn't work on Gecko/WebKit.
|
|
||||||
Fixed bug where the isDirty state would become true on non IE browsers if there was an table at the end of the contents.
|
|
||||||
Fixed bug where entities wasn't properly encoded on WebKit when pasting text as plain text.
|
|
||||||
Fixed bug where empty editors would produce an exception of valid_elements didn't include body and forced_root_blocks where disabled.
|
|
||||||
Fixed bug where the fullscreen mode wouldn't retain the header/footer in the fullpage plugin.
|
|
||||||
Fixed issue where the plaintext_mode and plaintext_mode_sticky language keys where swapped.
|
|
||||||
Version 3.4.4 (2011-08-04)
|
|
||||||
Added new html5 audio support. Patch contributed by Ronald M. Clifford.
|
|
||||||
Added mute option for video elements and preload options for video/audio patch contributed by Dmitry Kalinkin.
|
|
||||||
Fixed selection to match visual selection before applying formatting changes.
|
|
||||||
Fixed browser specific bugs in lists for WebKit and IE.
|
|
||||||
Fixed bug where IE would scroll the window if you closed an inline dialog that was larger than the viewport. Patch by Laurence Keijmel.
|
|
||||||
Fixed bug where pasting contents near a span element could remove parts of that span. Patch contributed by Wesley Walser.
|
|
||||||
Fixed bug where formatting change would be lost after pressing enter.
|
|
||||||
Fixed bug in WebKit where deleting across blocks would add extra styles.
|
|
||||||
Fixed bug where moving cursor vertically in tables in WebKit wasn't working.
|
|
||||||
Fixed bug in IE where deleting would cause error in console.
|
|
||||||
Fixed bug where the formatter was not applying formats across list elements.
|
|
||||||
Fixed bug where the wordcount plugin would try and update the wordcount if tinymce had been destroyed.
|
|
||||||
Fixed bug where tabfocus plugin would attempt to focus elements not displayed when their parent element was hidden.
|
|
||||||
Fixed bug where the contentEditable state would sometimes be removed if you deleted contents in Gecko.
|
|
||||||
Fixed bug where inserting contents using mceInsertContent would fail if "span" was disabled in valid_elements.
|
|
||||||
Fixed bug where initialization might fail if some resource on gecko wouldn't load properly and fire the onload event.
|
|
||||||
Fixed bug where ctrl+7/8/9 keys wouldn't properly add the specific formats associated with them.
|
|
||||||
Fixed bug where the HTML tags wasn't properly closed in the style plugins properties dialog.
|
|
||||||
Fixed bug where the list plugin would produce an exception if the user tried to delete an element at the very first location.
|
|
||||||
Version 3.4.3.2 (2011-06-30)
|
|
||||||
Fixed bug where deleting all of a paragraph inside a table cell would behave badly in webkit.
|
|
||||||
Fixed bugs in tests in firefox5 and WebKit.
|
|
||||||
Fixed bug where selection of table cells would produce an exception on Gecko.
|
|
||||||
Fixed bug where the caret wasn't properly rendered on Gecko when the editor was hidden.
|
|
||||||
Fixed bug where pasting plain text into WebKit would produce a pre element it will now produce more semantic markup.
|
|
||||||
Fixed bug where selecting list type formats using the advlist plugin on IE8 would loose editor selection.
|
|
||||||
Fixed bug where forced root blocks logic wouldn't properly pad elements created if they contained data attributes.
|
|
||||||
Fixed bug where it would remove all contents of the editor if you inserted an image when not having a caret in the document.
|
|
||||||
Fixed bug where the YUI compressor wouldn't properly encode strings with only a quote in them.
|
|
||||||
Fixed bug where WebKit on iOS5 wouldn't call nodeChanged when the selection was changed.
|
|
||||||
Fixed bug where mceFocus command wouldn't work properly on Gecko since it didn't focus the body element.
|
|
||||||
Fixed performance issue with the noneditable plugin where it would enable/disable controls to often.
|
|
||||||
Version 3.4.3.1 (2011-06-16)
|
|
||||||
Fixed bug where listboxes were not being handled correctly by JAWS in firefox with the o2k7 skin.
|
|
||||||
Fixed bug where custom buttons were not being rendered correctly when in high contrast mode.
|
|
||||||
Added support for iOS 5 that now supporting contentEditable in it's latest beta.
|
|
||||||
Fixed bug where urls in style attributes with a _ character followed by a number would cause incorrect output.
|
|
||||||
Fixed bug where custom_elements option wasn't working properly on IE browsers.
|
|
||||||
Fixed bug where custom_elements marked as block elements wouldn't get correctly treated as block elements.
|
|
||||||
Fixed bug where attributes with </> wasn't properly encoded as XML entities.
|
|
||||||
Version 3.4.3 (2011-06-09)
|
|
||||||
Fixed bug where deleting backwards before an image into a list would put the cursor in the wrong location.
|
|
||||||
Fixed bug where styles plugin would not apply styles across multiple selected block elements correctly.
|
|
||||||
Fixed bug where cursor would jump to start of document when selection contained empty table cells in IE8.
|
|
||||||
Fixed bug where applied styles wouldn't be kept if you pressed enter twice to produce two paragraphs.
|
|
||||||
Fixed bug where a ghost like caret would appear on Gecko when pressing enter while having a text color applied.
|
|
||||||
Fixed bug where IE would produce absolute urls if you inserted a image/link and reloaded the page.
|
|
||||||
Fixed bug where applying a heading style to a list item would cascade style to children list items.
|
|
||||||
Fixed bug where Editor loses focus when backspacing and changing styles in WebKit.
|
|
||||||
Fixed bug where exception was thrown in tinymce.util.URI when parsing a relative URI and no base_uri setting was provided.
|
|
||||||
Fixed bug where alt-f10 was not always giving focus to the toolbar on Safari.
|
|
||||||
Added new 'allow_html_in_named_anchor' option to allow html to occur within a named anchor tag. Use at own risk.
|
|
||||||
Added plugin dependency support. Will autoload plugins specified as a dependency if they haven't been loaded.
|
|
||||||
Fixed bug where the autolink plugin didn't work with non-English keyboards when pressing ).
|
|
||||||
Added possibility to change properties of all table cells in a column.
|
|
||||||
Added external_image_list option to get images list from user-defined variable or function.
|
|
||||||
Fixed bug where the autoresize plugin wouldn't reduce the editors height on Chrome.
|
|
||||||
Fixed bug where table size inputs were to small for values with size units.
|
|
||||||
Fixed bug where table cell/row size input values were not validated.
|
|
||||||
Fixed bug where menu item line-height would be set to wrong value by external styles.
|
|
||||||
Fixed bug where hasUndo() would return wrong answer.
|
|
||||||
Fixed bug where page title would be set to undefined by fullpage plugin.
|
|
||||||
Fixed bug where HTML5 video properties were not updated in embedded media settings.
|
|
||||||
Fixed bug where HTML comment on the first line would cause an error.
|
|
||||||
Fixed bug where spellchecker menu was positioned incorrectly on IE.
|
|
||||||
Fixed bug where breaking out of list elements on WebKit would produce a DIV instead of P after the list.
|
|
||||||
Fixed bug where pasting from Word in IE9 would add extra BR elements when text was word wrapped.
|
|
||||||
Fixed bug where numeric entities with leading zeros would produce incorrect decoding.
|
|
||||||
Fixed bug where hexadecimal entities wasn't properly decoded.
|
|
||||||
Fixed bug where bookmarks wasn't properly stored/restored on undo/redo.
|
|
||||||
Fixed bug where the mceInsertCommand didn't retain the values of links if they contained non url contents.
|
|
||||||
Fixed bug where the valid_styles option wouldn't be properly used on styles for specific elements.
|
|
||||||
Fixed so contentEditable is used for the body of the editor if it's supported.
|
|
||||||
Fixed so trailing BR elements gets removed even when forced_root_blocks option was set to false/null.
|
|
||||||
Fixed performance issue with mceInsertCommand and inserting very simple contents.
|
|
||||||
Fixed performance issue with older IE version and huge documents by optimizing the forced root blocks logic.
|
|
||||||
Fixed performance issue with table plugin where it checked for selected cells to often.
|
|
||||||
Fixed bug where creating a link on centered/floated image would produce an error on WebKit browsers.
|
|
||||||
Fixed bug where Gecko would remove single paragraphs if there where contents before/after it.
|
|
||||||
Fixed bug where the scrollbar would move up/down when pasting contents using the paste plugin.
|
|
||||||
Version 3.4.2 (2011-04-07)
|
|
||||||
Added new 'paste_text_sticky_default' option to paste plugin, enables you to set the default state for paste as plain text.
|
|
||||||
Added new autoresize_bottom_margin option to autoresize plugin that enables you to add an extra margin at the bottom. Patch contributed by Andrew Ozz.
|
|
||||||
Rewritten the fullpage plugin to handle style contents better and have a more normalized behavior across browsers.
|
|
||||||
Fixed bug where contents inserted with mceInsertContent wasn't parsed using the default dom parser.
|
|
||||||
Fixed bug where blocks containing a single anchor element would be treated as empty.
|
|
||||||
Fixed bug where merging of table cells on IE 6, 7 wouldn't look correctly until the contents was refreshed.
|
|
||||||
Fixed bug where context menu wouldn't work properly on Safari since it was passing out the ctrl key as pressed.
|
|
||||||
Fixed bug where image border color/style values were overwritten by advimage plugin.
|
|
||||||
Fixed bug where setting border in advimage plugin would throw error in IE.
|
|
||||||
Fixed bug where empty anchors list in link settings wasn't hidden.
|
|
||||||
Fixed bug where xhtmlextras popups were missing localized popup-size parameters.
|
|
||||||
Fixed bug where the context menu wouldn't select images on WebKit browsers.
|
|
||||||
Fixed bug where paste plugin wouldn't properly extract the contents on WebKit due to recent changes in browser behavior.
|
|
||||||
Fixed bug where focus of the editor would get on control contents on IE lost due to a bug in the ColorSplitButton control.
|
|
||||||
Fixed bug where contextmenu wasn't disabled on noneditable elements.
|
|
||||||
Fixed bug where getStyle function would trigger error when called on element without style property.
|
|
||||||
Fixed bug where editor fail to load if Javascript Compressor was used.
|
|
||||||
Fixed bug where list-style-type=lower-greek would produce errors in IE<8.
|
|
||||||
Fixed bug where spellchecker plugin would produce errors on IE6-7.
|
|
||||||
Fixed bug where theme_advanced_containers configuration option causes error.
|
|
||||||
Fixed bug where the mceReplaceContent command would produce an error since it didn't correctly handle a return value.
|
|
||||||
Fixed bug where you couldn't enter float point values for em in dialog input fields since it wouldn't be considered a valid size.
|
|
||||||
Fixed bug in xhtmlxtras plugin where it wasn't possible to remove some attributes in the attributes dialog.
|
|
||||||
Version 3.4.1 (2011-03-24)
|
|
||||||
Added significantly improved list handling via the new 'lists' plugin.
|
|
||||||
Added 'autolink' plugin to enable automatically linking URLs. Similar to the behavior IE has by default.
|
|
||||||
Added 'theme_advanced_show_current_color' setting to enable the forecolor and backcolor buttons to continuously show the current text color.
|
|
||||||
Added 'contextmenu_never_use_native' setting to disable the ctrl-right-click showing the native browser context menu behaviour.
|
|
||||||
Added 'paste_enable_default_filters' setting to enable the default paste filters to be disabled.
|
|
||||||
Fixed bug where selection locations on undo/redo didn't work correctly on specific contents.
|
|
||||||
Fixed bug where an exception would be trown on IE when loading TinyMCE inside an iframe.
|
|
||||||
Fixed bug where some ascii numeric entities wasn't properly decoded.
|
|
||||||
Fixed bug where some non western language codes wasn't properly decoded/encoded.
|
|
||||||
Fixed bug where undo levels wasn't created when deleting contents on IE.
|
|
||||||
Fixed bug where the initial undo levels bookmark wasn't updated correctly.
|
|
||||||
Fixed bug where search/replace wouldn't be scoped to editor instances on IE8.
|
|
||||||
Fixed bug where IE9 would produce two br elements after block elements when pasting.
|
|
||||||
Fixed bug where IE would place the caret at an incorrect position after a paste operation.
|
|
||||||
Fixed bug where a paste operation using the keyboard would add an extra undo level.
|
|
||||||
Fixed bug where some attributes/elements wasn't correctly filtered when invalid contents was inserted.
|
|
||||||
Fixed bug where the table plugin couldn't correctly handle invalid table structures.
|
|
||||||
Fixed bug where charset and title of the page were handled incorrectly by the fullpage plugin.
|
|
||||||
Fixed bug where toggle states on some of the list boxes didn't update correctly.
|
|
||||||
Fixed bug where sub/sub wouldn't work correctly when done as a caret action in Chrome 10.
|
|
||||||
Fixed bug where the constrain proportions checkbox wouldn't work in the media plugin.
|
|
||||||
Fixed bug where block elements containing trailing br elements wouldn't treated properly if they where invalid.
|
|
||||||
Fixed bug where the color picker dialog wouldn't be rendered correctly when using the o2k7 theme.
|
|
||||||
Fixed bug where setting border=0 using advimage plugin invalid style attribute content was created in Chrome.
|
|
||||||
Fixed bug with references to non-existing images in css of fullpage plugin.
|
|
||||||
Fixed bug where item could be unselected in spellchecker's language selector.
|
|
||||||
Fixed bug where some mispelled words could be not highlighted using spellchecker plugin.
|
|
||||||
Fixed bug where spellchecking would merge some words on IE.
|
|
||||||
Fixed bug where spellchecker context menu was not always positioned correctly.
|
|
||||||
Fixed bug with empty anchors list in advlink popup when Invisible Elements feature was disabled.
|
|
||||||
Fixed bug where older IE versions wouldn't properly handle some elements if they where placed at the top of editor contents.
|
|
||||||
Fixed bug where selecting the whole table would enable table tools for cells and rows.
|
|
||||||
Fixed bug where it wasn't possible to replace selected contents on IE when pasting using the paste plugin.
|
|
||||||
Fixed bug where setting text color in fullpage plugin doesn't work.
|
|
||||||
Fixed bug where the state of checkboxes in media plugin wouldn't be set correctly.
|
|
||||||
Fixed bug where black spade suit character was not included in special character selector.
|
|
||||||
Fixed bug where setting invalid values for table cell size would throw an error in IE.
|
|
||||||
Fixed bug where spellchecking would remove whitespace characters from PRE block in IE.
|
|
||||||
Fixed bug where HR was inserted inside P elements instead of splitting them.
|
|
||||||
Fixed bug where extra, empty span tags were added when using a format with both selector and inline modes.
|
|
||||||
Fixed bug where bullet lists weren't always detected correctly.
|
|
||||||
Fixed bug where deleting some paragraphs on IE would cause an exception.
|
|
||||||
Fixed bug where the json encoder logic wouldn't properly encode \ characters.
|
|
||||||
Fixed bug where the onChange event would be fired when the editor was first initialized.
|
|
||||||
Fixed bug where mceSelected wouldn't be removed properly from output even if it's an internal class.
|
|
||||||
Fixed issue with table background colors not being transparent. This improves compliance with users browser color preferences.
|
|
||||||
Fixed issue where styles were not included when using the full page plugin.
|
|
||||||
Fixed issue where drag/drop operations wasn't properly added to the undo levels.
|
|
||||||
Fixed issue where colors wasn't correctly applied to elements with underline decoration.
|
|
||||||
Fixed issue where deleting some paragraphs on IE would cause an exception.
|
|
||||||
Version 3.4 (2011-03-10)
|
|
||||||
Added accessibility example with various accessibility options contributed by Ephox.
|
|
||||||
Fixed bug where attributes wasn't properly handled in the xhtmlxtras plugin.
|
|
||||||
Fixed bug where the image.htm had some strange td artifacts probably due to auto merging.
|
|
||||||
Fixed bug where the ToolbarGroup had an missing reference to this in it's destroy method.
|
|
||||||
Fixed bug with the resizeBy function in the advanced theme where it was scaled by the wrong parent.
|
|
||||||
Fixed bug where an exception would be thrown by the element if the page was served in xhtml mode.
|
|
||||||
Fixed bug where mceInsertContent would throw an exception when page was served in xhtml mode.
|
|
||||||
Fixed bug where you couldn't select a forground/background color when page was served in xhtml mode.
|
|
||||||
Fixed bug where the editor would scroll to the toolbar when clicked due to a call to focus in ListBox.
|
|
||||||
Fixed bug where pages with rtl dir wouldn't render split buttons correctly when using the o2k7 theme.
|
|
||||||
Fixed bug where anchor elements with names wasn't properly collapsed as they where in 3.3.x.
|
|
||||||
Fixed bug where WebKit wouldn't properly handle image selection if it was done left to right.
|
|
||||||
Fixed bug where the formatter would align images when the selection range was collapsed.
|
|
||||||
Fixed bug where the image button would be active when the selection range was collapsed.
|
|
||||||
Fixed bug where the element_format option wasn't used by the new (X)HTML serializer logic.
|
|
||||||
Fixed bug where the table cell/row dialogs would produce empty attributes.
|
|
||||||
Fixed bug where the tfoot wouldn't be added to the top of the table.
|
|
||||||
Fixed bug where the formatter would merge siblings with white space between them.
|
|
||||||
Fixed bug where pasting headers and paragraphs would produce an extra paragraph.
|
|
||||||
Fixed bug where the ColorSplitButton would throw an exception if you clicked out side a color.
|
|
||||||
Fixed bug where IE9 wouldn't properly produce new paragraphs on enter if the current paragraph had formatting.
|
|
||||||
Fixed bug where multiple BR elements at end of block elements where removed.
|
|
||||||
Fixed bug where fullscreen plugin wouldn't correctly display the edit area on IE6 for long pages.
|
|
||||||
Fixed bug where paste plugin wouldn't properly encode raw entities when pasting in plain text mode.
|
|
||||||
Fixed bug where the search/replace plugin wouldn't work correctly on IE 9.
|
|
||||||
Fixed so the drop menus doesn't get an outline border visible when focused, patch contributed by Ephox.
|
|
||||||
Fixed so the values entered in the color picker are forced to hex values.
|
|
||||||
Removed dialog workaround for IE 9 beta since the RC is now out and people should upgrade.
|
|
||||||
Removed obsolete calls in various plugins to the mceBeginUndoLevel command.
|
|
|
@ -1,101 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Full featured example</title>
|
|
||||||
|
|
||||||
<!-- TinyMCE -->
|
|
||||||
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
tinyMCE.init({
|
|
||||||
// General options
|
|
||||||
mode : "textareas",
|
|
||||||
theme : "advanced",
|
|
||||||
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
|
|
||||||
|
|
||||||
// Theme options
|
|
||||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
|
||||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
|
||||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
|
||||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "left",
|
|
||||||
theme_advanced_statusbar_location : "bottom",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
|
|
||||||
// Example content CSS (should be your site CSS)
|
|
||||||
// using false to ensure that the default browser settings are used for best Accessibility
|
|
||||||
// ACCESSIBILITY SETTINGS
|
|
||||||
content_css : false,
|
|
||||||
// Use browser preferred colors for dialogs.
|
|
||||||
browser_preferred_colors : true,
|
|
||||||
detect_highcontrast : true,
|
|
||||||
|
|
||||||
// Drop lists for link/image/media/template dialogs
|
|
||||||
template_external_list_url : "lists/template_list.js",
|
|
||||||
external_link_list_url : "lists/link_list.js",
|
|
||||||
external_image_list_url : "lists/image_list.js",
|
|
||||||
media_external_list_url : "lists/media_list.js",
|
|
||||||
|
|
||||||
// Style formats
|
|
||||||
style_formats : [
|
|
||||||
{title : 'Bold text', inline : 'b'},
|
|
||||||
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
|
|
||||||
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
|
|
||||||
{title : 'Example 1', inline : 'span', classes : 'example1'},
|
|
||||||
{title : 'Example 2', inline : 'span', classes : 'example2'},
|
|
||||||
{title : 'Table styles'},
|
|
||||||
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
|
|
||||||
],
|
|
||||||
|
|
||||||
// Replace values for the template plugin
|
|
||||||
template_replace_values : {
|
|
||||||
username : "Some User",
|
|
||||||
staffid : "991234"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<!-- /TinyMCE -->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
|
||||||
<div>
|
|
||||||
<h3>Full featured example, with Accessibility settings enabled</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This page has got the TinyMCE set up to work with configurations related to accessiblity enabled.
|
|
||||||
In particular
|
|
||||||
<ul>
|
|
||||||
<li>the <strong>content_css</strong> is set to false, to ensure that all default browser styles are used, </li>
|
|
||||||
<li>the <strong>browser_preferred_colors</strong> dialog option is used to ensure that default css is used for dialogs, </li>
|
|
||||||
<li>and the <strong>detect_highcontrast</strong> option has been set to ensure that highcontrast mode in Windows browsers
|
|
||||||
is detected and the toolbars are displayed in a high contrast mode.</li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
|
||||||
<div>
|
|
||||||
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
|
||||||
<p>
|
|
||||||
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
|
||||||
</p>
|
|
||||||
</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<input type="submit" name="save" value="Submit" />
|
|
||||||
<input type="reset" name="reset" value="Reset" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
if (document.location.protocol == 'file:') {
|
|
||||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,105 +0,0 @@
|
||||||
body {
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 10px;
|
|
||||||
scrollbar-3dlight-color: #F0F0EE;
|
|
||||||
scrollbar-arrow-color: #676662;
|
|
||||||
scrollbar-base-color: #F0F0EE;
|
|
||||||
scrollbar-darkshadow-color: #DDDDDD;
|
|
||||||
scrollbar-face-color: #E0E0DD;
|
|
||||||
scrollbar-highlight-color: #F0F0EE;
|
|
||||||
scrollbar-shadow-color: #F0F0EE;
|
|
||||||
scrollbar-track-color: #F5F5F5;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example1 {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 14px
|
|
||||||
}
|
|
||||||
|
|
||||||
.example2 {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #FF0000
|
|
||||||
}
|
|
||||||
|
|
||||||
.tablerow1 {
|
|
||||||
background-color: #BBBBBB;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead {
|
|
||||||
background-color: #FFBBBB;
|
|
||||||
}
|
|
||||||
|
|
||||||
tfoot {
|
|
||||||
background-color: #BBBBFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Basic formats */
|
|
||||||
|
|
||||||
.bold {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.italic {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.underline {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Global align classes */
|
|
||||||
|
|
||||||
.left {
|
|
||||||
text-align: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.center {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.full {
|
|
||||||
text-align: justify
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Image and table specific aligns */
|
|
||||||
|
|
||||||
img.left, table.left {
|
|
||||||
float: left;
|
|
||||||
text-align: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
img.center, table.center {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
text-align: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
img.center {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
img.right, table.right {
|
|
||||||
float: right;
|
|
||||||
text-align: inherit;
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
body {
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 10px;
|
|
||||||
scrollbar-3dlight-color: #F0F0EE;
|
|
||||||
scrollbar-arrow-color: #676662;
|
|
||||||
scrollbar-base-color: #F0F0EE;
|
|
||||||
scrollbar-darkshadow-color: #DDDDDD;
|
|
||||||
scrollbar-face-color: #E0E0DD;
|
|
||||||
scrollbar-highlight-color: #F0F0EE;
|
|
||||||
scrollbar-shadow-color: #F0F0EE;
|
|
||||||
scrollbar-track-color: #F5F5F5;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {margin:0; padding:0;}
|
|
||||||
|
|
||||||
td {
|
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example1 {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 14px
|
|
||||||
}
|
|
||||||
|
|
||||||
.example2 {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #FF0000
|
|
||||||
}
|
|
||||||
|
|
||||||
.tablerow1 {
|
|
||||||
background-color: #BBBBBB;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead {
|
|
||||||
background-color: #FFBBBB;
|
|
||||||
}
|
|
||||||
|
|
||||||
tfoot {
|
|
||||||
background-color: #BBBBFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
|
@ -1,111 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Custom formats example</title>
|
|
||||||
|
|
||||||
<!-- TinyMCE -->
|
|
||||||
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
tinyMCE.init({
|
|
||||||
// General options
|
|
||||||
mode : "textareas",
|
|
||||||
theme : "advanced",
|
|
||||||
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
|
|
||||||
|
|
||||||
// Theme options
|
|
||||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
|
||||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
|
||||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
|
||||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "left",
|
|
||||||
theme_advanced_statusbar_location : "bottom",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
|
|
||||||
// Example content CSS (should be your site CSS)
|
|
||||||
content_css : "css/content.css",
|
|
||||||
|
|
||||||
// Drop lists for link/image/media/template dialogs
|
|
||||||
template_external_list_url : "lists/template_list.js",
|
|
||||||
external_link_list_url : "lists/link_list.js",
|
|
||||||
external_image_list_url : "lists/image_list.js",
|
|
||||||
media_external_list_url : "lists/media_list.js",
|
|
||||||
|
|
||||||
// Style formats
|
|
||||||
style_formats : [
|
|
||||||
{title : 'Bold text', inline : 'b'},
|
|
||||||
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
|
|
||||||
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
|
|
||||||
{title : 'Example 1', inline : 'span', classes : 'example1'},
|
|
||||||
{title : 'Example 2', inline : 'span', classes : 'example2'},
|
|
||||||
{title : 'Table styles'},
|
|
||||||
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
|
|
||||||
],
|
|
||||||
|
|
||||||
formats : {
|
|
||||||
alignleft : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'left'},
|
|
||||||
aligncenter : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'center'},
|
|
||||||
alignright : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'right'},
|
|
||||||
alignfull : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'full'},
|
|
||||||
bold : {inline : 'span', 'classes' : 'bold'},
|
|
||||||
italic : {inline : 'span', 'classes' : 'italic'},
|
|
||||||
underline : {inline : 'span', 'classes' : 'underline', exact : true},
|
|
||||||
strikethrough : {inline : 'del'}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Replace values for the template plugin
|
|
||||||
template_replace_values : {
|
|
||||||
username : "Some User",
|
|
||||||
staffid : "991234"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<!-- /TinyMCE -->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
|
||||||
<div>
|
|
||||||
<h3>Custom formats example</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This example shows you how to override the default formats for bold, italic, underline, strikethough and alignment to use classes instead of inline styles.
|
|
||||||
There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
|
||||||
<div>
|
|
||||||
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
|
||||||
<p>
|
|
||||||
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
|
||||||
</p>
|
|
||||||
</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Some integration calls -->
|
|
||||||
<a href="javascript:;" onmousedown="tinyMCE.get('elm1').show();">[Show]</a>
|
|
||||||
<a href="javascript:;" onmousedown="tinyMCE.get('elm1').hide();">[Hide]</a>
|
|
||||||
<a href="javascript:;" onmousedown="tinyMCE.get('elm1').execCommand('Bold');">[Bold]</a>
|
|
||||||
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').getContent());">[Get contents]</a>
|
|
||||||
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getContent());">[Get selected HTML]</a>
|
|
||||||
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getContent({format : 'text'}));">[Get selected text]</a>
|
|
||||||
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getNode().nodeName);">[Get selected element]</a>
|
|
||||||
<a href="javascript:;" onmousedown="tinyMCE.execCommand('mceInsertContent',false,'<b>Hello world!!</b>');">[Insert HTML]</a>
|
|
||||||
<a href="javascript:;" onmousedown="tinyMCE.execCommand('mceReplaceContent',false,'<b>{$selection}</b>');">[Replace selection]</a>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<input type="submit" name="save" value="Submit" />
|
|
||||||
<input type="reset" name="reset" value="Reset" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<script type="text/javascript">
|
|
||||||
if (document.location.protocol == 'file:') {
|
|
||||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,101 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Full featured example</title>
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
||||||
<!-- TinyMCE -->
|
|
||||||
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
tinyMCE.init({
|
|
||||||
// General options
|
|
||||||
mode : "textareas",
|
|
||||||
theme : "advanced",
|
|
||||||
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",
|
|
||||||
|
|
||||||
// Theme options
|
|
||||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
|
||||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
|
||||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
|
||||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "left",
|
|
||||||
theme_advanced_statusbar_location : "bottom",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
|
|
||||||
// Example content CSS (should be your site CSS)
|
|
||||||
content_css : "css/content.css",
|
|
||||||
|
|
||||||
// Drop lists for link/image/media/template dialogs
|
|
||||||
template_external_list_url : "lists/template_list.js",
|
|
||||||
external_link_list_url : "lists/link_list.js",
|
|
||||||
external_image_list_url : "lists/image_list.js",
|
|
||||||
media_external_list_url : "lists/media_list.js",
|
|
||||||
|
|
||||||
// Style formats
|
|
||||||
style_formats : [
|
|
||||||
{title : 'Bold text', inline : 'b'},
|
|
||||||
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
|
|
||||||
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
|
|
||||||
{title : 'Example 1', inline : 'span', classes : 'example1'},
|
|
||||||
{title : 'Example 2', inline : 'span', classes : 'example2'},
|
|
||||||
{title : 'Table styles'},
|
|
||||||
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
|
|
||||||
],
|
|
||||||
|
|
||||||
// Replace values for the template plugin
|
|
||||||
template_replace_values : {
|
|
||||||
username : "Some User",
|
|
||||||
staffid : "991234"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<!-- /TinyMCE -->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body role="application">
|
|
||||||
|
|
||||||
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
|
||||||
<div>
|
|
||||||
<h3>Full featured example</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This page shows all available buttons and plugins that are included in the TinyMCE core package.
|
|
||||||
There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
|
||||||
<div>
|
|
||||||
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
|
||||||
<p>
|
|
||||||
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
|
||||||
</p>
|
|
||||||
</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Some integration calls -->
|
|
||||||
<a href="javascript:;" onclick="tinyMCE.get('elm1').show();return false;">[Show]</a>
|
|
||||||
<a href="javascript:;" onclick="tinyMCE.get('elm1').hide();return false;">[Hide]</a>
|
|
||||||
<a href="javascript:;" onclick="tinyMCE.get('elm1').execCommand('Bold');return false;">[Bold]</a>
|
|
||||||
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').getContent());return false;">[Get contents]</a>
|
|
||||||
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').selection.getContent());return false;">[Get selected HTML]</a>
|
|
||||||
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').selection.getContent({format : 'text'}));return false;">[Get selected text]</a>
|
|
||||||
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').selection.getNode().nodeName);return false;">[Get selected element]</a>
|
|
||||||
<a href="javascript:;" onclick="tinyMCE.execCommand('mceInsertContent',false,'<b>Hello world!!</b>');return false;">[Insert HTML]</a>
|
|
||||||
<a href="javascript:;" onclick="tinyMCE.execCommand('mceReplaceContent',false,'<b>{$selection}</b>');return false;">[Replace selection]</a>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<input type="submit" name="save" value="Submit" />
|
|
||||||
<input type="reset" name="reset" value="Reset" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
if (document.location.protocol == 'file:') {
|
|
||||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>TinyMCE examples</title>
|
|
||||||
</head>
|
|
||||||
<frameset cols="180,80%">
|
|
||||||
<frame src="menu.html" name="menu" />
|
|
||||||
<frame src="full.html" name="main" />
|
|
||||||
</frameset>
|
|
||||||
</html>
|
|
|
@ -1,9 +0,0 @@
|
||||||
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system.
|
|
||||||
// There images will be displayed as a dropdown in all image dialogs if the "external_link_image_url"
|
|
||||||
// option is defined in TinyMCE init.
|
|
||||||
|
|
||||||
var tinyMCEImageList = new Array(
|
|
||||||
// Name, URL
|
|
||||||
["Logo 1", "media/logo.jpg"],
|
|
||||||
["Logo 2 Over", "media/logo_over.jpg"]
|
|
||||||
);
|
|
|
@ -1,10 +0,0 @@
|
||||||
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system.
|
|
||||||
// There links will be displayed as a dropdown in all link dialogs if the "external_link_list_url"
|
|
||||||
// option is defined in TinyMCE init.
|
|
||||||
|
|
||||||
var tinyMCELinkList = new Array(
|
|
||||||
// Name, URL
|
|
||||||
["Moxiecode", "http://www.moxiecode.com"],
|
|
||||||
["Freshmeat", "http://www.freshmeat.com"],
|
|
||||||
["Sourceforge", "http://www.sourceforge.com"]
|
|
||||||
);
|
|
|
@ -1,14 +0,0 @@
|
||||||
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system.
|
|
||||||
// There flash movies will be displayed as a dropdown in all media dialog if the "media_external_list_url"
|
|
||||||
// option is defined in TinyMCE init.
|
|
||||||
|
|
||||||
var tinyMCEMediaList = [
|
|
||||||
// Name, URL
|
|
||||||
["Some Flash", "media/sample.swf"],
|
|
||||||
["Some Quicktime", "media/sample.mov"],
|
|
||||||
["Some AVI", "media/sample.avi"],
|
|
||||||
["Some RealMedia", "media/sample.rm"],
|
|
||||||
["Some Shockwave", "media/sample.dcr"],
|
|
||||||
["Some Video", "media/sample.mp4"],
|
|
||||||
["Some FLV", "media/sample.flv"]
|
|
||||||
];
|
|
|
@ -1,9 +0,0 @@
|
||||||
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system.
|
|
||||||
// There templates will be displayed as a dropdown in all media dialog if the "template_external_list_url"
|
|
||||||
// option is defined in TinyMCE init.
|
|
||||||
|
|
||||||
var tinyMCETemplateList = [
|
|
||||||
// Name, URL, Description
|
|
||||||
["Simple snippet", "templates/snippet1.htm", "Simple HTML snippet."],
|
|
||||||
["Layout", "templates/layout1.htm", "HTML Layout."]
|
|
||||||
];
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
http://streaming.uga.edu/samples/ayp_lan.rm
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,18 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Menu</title>
|
|
||||||
<style>
|
|
||||||
a {display:block;}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h3>Examples</h3>
|
|
||||||
<a href="full.html" target="main">Full featured</a>
|
|
||||||
<a href="simple.html" target="main">Simple theme</a>
|
|
||||||
<a href="skins.html" target="main">Skin support</a>
|
|
||||||
<a href="word.html" target="main">Word processor</a>
|
|
||||||
<a href="custom_formats.html" target="main">Custom formats</a>
|
|
||||||
<a href="accessibility.html" target="main">Accessibility Options</a>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,47 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Simple theme example</title>
|
|
||||||
|
|
||||||
<!-- TinyMCE -->
|
|
||||||
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
tinyMCE.init({
|
|
||||||
mode : "textareas",
|
|
||||||
theme : "simple"
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<!-- /TinyMCE -->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
|
||||||
<h3>Simple theme example</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This page shows you the simple theme and it's core functionality you can extend it by changing the code use the advanced theme if you need to configure/add more buttons etc.
|
|
||||||
There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
|
||||||
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
|
||||||
<p>
|
|
||||||
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
|
||||||
</p>
|
|
||||||
</textarea>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<input type="submit" name="save" value="Submit" />
|
|
||||||
<input type="reset" name="reset" value="Reset" />
|
|
||||||
</form>
|
|
||||||
<script type="text/javascript">
|
|
||||||
if (document.location.protocol == 'file:') {
|
|
||||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,216 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Skin support example</title>
|
|
||||||
|
|
||||||
<!-- TinyMCE -->
|
|
||||||
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
// Default skin
|
|
||||||
tinyMCE.init({
|
|
||||||
// General options
|
|
||||||
mode : "exact",
|
|
||||||
elements : "elm1",
|
|
||||||
theme : "advanced",
|
|
||||||
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
|
|
||||||
|
|
||||||
// Theme options
|
|
||||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
|
||||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
|
||||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
|
||||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "left",
|
|
||||||
theme_advanced_statusbar_location : "bottom",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
|
|
||||||
// Example content CSS (should be your site CSS)
|
|
||||||
content_css : "css/content.css",
|
|
||||||
|
|
||||||
// Drop lists for link/image/media/template dialogs
|
|
||||||
template_external_list_url : "lists/template_list.js",
|
|
||||||
external_link_list_url : "lists/link_list.js",
|
|
||||||
external_image_list_url : "lists/image_list.js",
|
|
||||||
media_external_list_url : "lists/media_list.js",
|
|
||||||
|
|
||||||
// Replace values for the template plugin
|
|
||||||
template_replace_values : {
|
|
||||||
username : "Some User",
|
|
||||||
staffid : "991234"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// O2k7 skin
|
|
||||||
tinyMCE.init({
|
|
||||||
// General options
|
|
||||||
mode : "exact",
|
|
||||||
elements : "elm2",
|
|
||||||
theme : "advanced",
|
|
||||||
skin : "o2k7",
|
|
||||||
plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
|
|
||||||
|
|
||||||
// Theme options
|
|
||||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
|
||||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
|
||||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
|
||||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "left",
|
|
||||||
theme_advanced_statusbar_location : "bottom",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
|
|
||||||
// Example content CSS (should be your site CSS)
|
|
||||||
content_css : "css/content.css",
|
|
||||||
|
|
||||||
// Drop lists for link/image/media/template dialogs
|
|
||||||
template_external_list_url : "lists/template_list.js",
|
|
||||||
external_link_list_url : "lists/link_list.js",
|
|
||||||
external_image_list_url : "lists/image_list.js",
|
|
||||||
media_external_list_url : "lists/media_list.js",
|
|
||||||
|
|
||||||
// Replace values for the template plugin
|
|
||||||
template_replace_values : {
|
|
||||||
username : "Some User",
|
|
||||||
staffid : "991234"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// O2k7 skin (silver)
|
|
||||||
tinyMCE.init({
|
|
||||||
// General options
|
|
||||||
mode : "exact",
|
|
||||||
elements : "elm3",
|
|
||||||
theme : "advanced",
|
|
||||||
skin : "o2k7",
|
|
||||||
skin_variant : "silver",
|
|
||||||
plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
|
|
||||||
|
|
||||||
// Theme options
|
|
||||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
|
||||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
|
||||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
|
||||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "left",
|
|
||||||
theme_advanced_statusbar_location : "bottom",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
|
|
||||||
// Example content CSS (should be your site CSS)
|
|
||||||
content_css : "css/content.css",
|
|
||||||
|
|
||||||
// Drop lists for link/image/media/template dialogs
|
|
||||||
template_external_list_url : "lists/template_list.js",
|
|
||||||
external_link_list_url : "lists/link_list.js",
|
|
||||||
external_image_list_url : "lists/image_list.js",
|
|
||||||
media_external_list_url : "lists/media_list.js",
|
|
||||||
|
|
||||||
// Replace values for the template plugin
|
|
||||||
template_replace_values : {
|
|
||||||
username : "Some User",
|
|
||||||
staffid : "991234"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// O2k7 skin (silver)
|
|
||||||
tinyMCE.init({
|
|
||||||
// General options
|
|
||||||
mode : "exact",
|
|
||||||
elements : "elm4",
|
|
||||||
theme : "advanced",
|
|
||||||
skin : "o2k7",
|
|
||||||
skin_variant : "black",
|
|
||||||
plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
|
|
||||||
|
|
||||||
// Theme options
|
|
||||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
|
||||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
|
||||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
|
||||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "left",
|
|
||||||
theme_advanced_statusbar_location : "bottom",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
|
|
||||||
// Example content CSS (should be your site CSS)
|
|
||||||
content_css : "css/content.css",
|
|
||||||
|
|
||||||
// Drop lists for link/image/media/template dialogs
|
|
||||||
template_external_list_url : "lists/template_list.js",
|
|
||||||
external_link_list_url : "lists/link_list.js",
|
|
||||||
external_image_list_url : "lists/image_list.js",
|
|
||||||
media_external_list_url : "lists/media_list.js",
|
|
||||||
|
|
||||||
// Replace values for the template plugin
|
|
||||||
template_replace_values : {
|
|
||||||
username : "Some User",
|
|
||||||
staffid : "991234"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<!-- /TinyMCE -->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
|
||||||
<h3>Skin support example</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This page displays the two skins that TinyMCE comes with. You can make your own by creating a CSS file in themes/advanced/skins/<yout skin>/ui.css
|
|
||||||
There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
|
||||||
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
|
||||||
<p>
|
|
||||||
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
|
||||||
</p>
|
|
||||||
</textarea>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<textarea id="elm2" name="elm2" rows="15" cols="80" style="width: 80%">
|
|
||||||
<p>
|
|
||||||
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
|
||||||
</p>
|
|
||||||
</textarea>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<textarea id="elm3" name="elm3" rows="15" cols="80" style="width: 80%">
|
|
||||||
<p>
|
|
||||||
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
|
||||||
</p>
|
|
||||||
</textarea>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<textarea id="elm4" name="elm4" rows="15" cols="80" style="width: 80%">
|
|
||||||
<p>
|
|
||||||
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
|
||||||
</p>
|
|
||||||
</textarea>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<input type="submit" name="save" value="Submit" />
|
|
||||||
<input type="reset" name="reset" value="Reset" />
|
|
||||||
</form>
|
|
||||||
<script type="text/javascript">
|
|
||||||
if (document.location.protocol == 'file:') {
|
|
||||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,15 +0,0 @@
|
||||||
<table border="1">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td>Column 1</td>
|
|
||||||
<td>Column 2</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>Username: {$username}</td>
|
|
||||||
<td>Staffid: {$staffid}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
|
@ -1 +0,0 @@
|
||||||
This is just some <strong>code</strong>.
|
|
|
@ -1,72 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Word processor example</title>
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
||||||
<!-- TinyMCE -->
|
|
||||||
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
tinyMCE.init({
|
|
||||||
// General options
|
|
||||||
mode : "textareas",
|
|
||||||
theme : "advanced",
|
|
||||||
skin : "o2k7",
|
|
||||||
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
|
|
||||||
|
|
||||||
// Theme options
|
|
||||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
|
|
||||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
|
||||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
|
||||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "left",
|
|
||||||
theme_advanced_statusbar_location : "bottom",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
|
|
||||||
// Example word content CSS (should be your site CSS) this one removes paragraph margins
|
|
||||||
content_css : "css/word.css",
|
|
||||||
|
|
||||||
// Drop lists for link/image/media/template dialogs
|
|
||||||
template_external_list_url : "lists/template_list.js",
|
|
||||||
external_link_list_url : "lists/link_list.js",
|
|
||||||
external_image_list_url : "lists/image_list.js",
|
|
||||||
media_external_list_url : "lists/media_list.js",
|
|
||||||
|
|
||||||
// Replace values for the template plugin
|
|
||||||
template_replace_values : {
|
|
||||||
username : "Some User",
|
|
||||||
staffid : "991234"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<!-- /TinyMCE -->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
|
||||||
<h3>Word processor example</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This page shows you how to configure TinyMCE to work more like common word processors.
|
|
||||||
There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
|
||||||
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
|
||||||
<p>This is the first paragraph.</p>
|
|
||||||
<p>This is the second paragraph.</p>
|
|
||||||
<p>This is the third paragraph.</p>
|
|
||||||
</textarea>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<input type="submit" name="save" value="Submit" />
|
|
||||||
<input type="reset" name="reset" value="Reset" />
|
|
||||||
</form>
|
|
||||||
<script type="text/javascript">
|
|
||||||
if (document.location.protocol == 'file:') {
|
|
||||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because one or more lines are too long
|
@ -1,504 +0,0 @@
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 2.1, February 1999
|
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
[This is the first released version of the Lesser GPL. It also counts
|
|
||||||
as the successor of the GNU Library Public License, version 2, hence
|
|
||||||
the version number 2.1.]
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
Licenses are intended to guarantee your freedom to share and change
|
|
||||||
free software--to make sure the software is free for all its users.
|
|
||||||
|
|
||||||
This license, the Lesser General Public License, applies to some
|
|
||||||
specially designated software packages--typically libraries--of the
|
|
||||||
Free Software Foundation and other authors who decide to use it. You
|
|
||||||
can use it too, but we suggest you first think carefully about whether
|
|
||||||
this license or the ordinary General Public License is the better
|
|
||||||
strategy to use in any particular case, based on the explanations below.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom of use,
|
|
||||||
not price. Our General Public Licenses are designed to make sure that
|
|
||||||
you have the freedom to distribute copies of free software (and charge
|
|
||||||
for this service if you wish); that you receive source code or can get
|
|
||||||
it if you want it; that you can change the software and use pieces of
|
|
||||||
it in new free programs; and that you are informed that you can do
|
|
||||||
these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
distributors to deny you these rights or to ask you to surrender these
|
|
||||||
rights. These restrictions translate to certain responsibilities for
|
|
||||||
you if you distribute copies of the library or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
|
||||||
you. You must make sure that they, too, receive or can get the source
|
|
||||||
code. If you link other code with the library, you must provide
|
|
||||||
complete object files to the recipients, so that they can relink them
|
|
||||||
with the library after making changes to the library and recompiling
|
|
||||||
it. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
We protect your rights with a two-step method: (1) we copyright the
|
|
||||||
library, and (2) we offer you this license, which gives you legal
|
|
||||||
permission to copy, distribute and/or modify the library.
|
|
||||||
|
|
||||||
To protect each distributor, we want to make it very clear that
|
|
||||||
there is no warranty for the free library. Also, if the library is
|
|
||||||
modified by someone else and passed on, the recipients should know
|
|
||||||
that what they have is not the original version, so that the original
|
|
||||||
author's reputation will not be affected by problems that might be
|
|
||||||
introduced by others.
|
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
|
||||||
any free program. We wish to make sure that a company cannot
|
|
||||||
effectively restrict the users of a free program by obtaining a
|
|
||||||
restrictive license from a patent holder. Therefore, we insist that
|
|
||||||
any patent license obtained for a version of the library must be
|
|
||||||
consistent with the full freedom of use specified in this license.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the
|
|
||||||
ordinary GNU General Public License. This license, the GNU Lesser
|
|
||||||
General Public License, applies to certain designated libraries, and
|
|
||||||
is quite different from the ordinary General Public License. We use
|
|
||||||
this license for certain libraries in order to permit linking those
|
|
||||||
libraries into non-free programs.
|
|
||||||
|
|
||||||
When a program is linked with a library, whether statically or using
|
|
||||||
a shared library, the combination of the two is legally speaking a
|
|
||||||
combined work, a derivative of the original library. The ordinary
|
|
||||||
General Public License therefore permits such linking only if the
|
|
||||||
entire combination fits its criteria of freedom. The Lesser General
|
|
||||||
Public License permits more lax criteria for linking other code with
|
|
||||||
the library.
|
|
||||||
|
|
||||||
We call this license the "Lesser" General Public License because it
|
|
||||||
does Less to protect the user's freedom than the ordinary General
|
|
||||||
Public License. It also provides other free software developers Less
|
|
||||||
of an advantage over competing non-free programs. These disadvantages
|
|
||||||
are the reason we use the ordinary General Public License for many
|
|
||||||
libraries. However, the Lesser license provides advantages in certain
|
|
||||||
special circumstances.
|
|
||||||
|
|
||||||
For example, on rare occasions, there may be a special need to
|
|
||||||
encourage the widest possible use of a certain library, so that it becomes
|
|
||||||
a de-facto standard. To achieve this, non-free programs must be
|
|
||||||
allowed to use the library. A more frequent case is that a free
|
|
||||||
library does the same job as widely used non-free libraries. In this
|
|
||||||
case, there is little to gain by limiting the free library to free
|
|
||||||
software only, so we use the Lesser General Public License.
|
|
||||||
|
|
||||||
In other cases, permission to use a particular library in non-free
|
|
||||||
programs enables a greater number of people to use a large body of
|
|
||||||
free software. For example, permission to use the GNU C Library in
|
|
||||||
non-free programs enables many more people to use the whole GNU
|
|
||||||
operating system, as well as its variant, the GNU/Linux operating
|
|
||||||
system.
|
|
||||||
|
|
||||||
Although the Lesser General Public License is Less protective of the
|
|
||||||
users' freedom, it does ensure that the user of a program that is
|
|
||||||
linked with the Library has the freedom and the wherewithal to run
|
|
||||||
that program using a modified version of the Library.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow. Pay close attention to the difference between a
|
|
||||||
"work based on the library" and a "work that uses the library". The
|
|
||||||
former contains code derived from the library, whereas the latter must
|
|
||||||
be combined with the library in order to run.
|
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
|
||||||
program which contains a notice placed by the copyright holder or
|
|
||||||
other authorized party saying it may be distributed under the terms of
|
|
||||||
this Lesser General Public License (also called "this License").
|
|
||||||
Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
|
||||||
prepared so as to be conveniently linked with application programs
|
|
||||||
(which use some of those functions and data) to form executables.
|
|
||||||
|
|
||||||
The "Library", below, refers to any such software library or work
|
|
||||||
which has been distributed under these terms. A "work based on the
|
|
||||||
Library" means either the Library or any derivative work under
|
|
||||||
copyright law: that is to say, a work containing the Library or a
|
|
||||||
portion of it, either verbatim or with modifications and/or translated
|
|
||||||
straightforwardly into another language. (Hereinafter, translation is
|
|
||||||
included without limitation in the term "modification".)
|
|
||||||
|
|
||||||
"Source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For a library, complete source code means
|
|
||||||
all the source code for all modules it contains, plus any associated
|
|
||||||
interface definition files, plus the scripts used to control compilation
|
|
||||||
and installation of the library.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running a program using the Library is not restricted, and output from
|
|
||||||
such a program is covered only if its contents constitute a work based
|
|
||||||
on the Library (independent of the use of the Library in a tool for
|
|
||||||
writing it). Whether that is true depends on what the Library does
|
|
||||||
and what the program that uses the Library does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete source code as you receive it, in any medium, provided that
|
|
||||||
you conspicuously and appropriately publish on each copy an
|
|
||||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
|
||||||
all the notices that refer to this License and to the absence of any
|
|
||||||
warranty; and distribute a copy of this License along with the
|
|
||||||
Library.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy,
|
|
||||||
and you may at your option offer warranty protection in exchange for a
|
|
||||||
fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
|
||||||
of it, thus forming a work based on the Library, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The modified work must itself be a software library.
|
|
||||||
|
|
||||||
b) You must cause the files modified to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
c) You must cause the whole of the work to be licensed at no
|
|
||||||
charge to all third parties under the terms of this License.
|
|
||||||
|
|
||||||
d) If a facility in the modified Library refers to a function or a
|
|
||||||
table of data to be supplied by an application program that uses
|
|
||||||
the facility, other than as an argument passed when the facility
|
|
||||||
is invoked, then you must make a good faith effort to ensure that,
|
|
||||||
in the event an application does not supply such function or
|
|
||||||
table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
|
|
||||||
(For example, a function in a library to compute square roots has
|
|
||||||
a purpose that is entirely well-defined independent of the
|
|
||||||
application. Therefore, Subsection 2d requires that any
|
|
||||||
application-supplied function or table used by this function must
|
|
||||||
be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Library,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Library, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote
|
|
||||||
it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Library.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Library
|
|
||||||
with the Library (or with a work based on the Library) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
|
||||||
License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so
|
|
||||||
that they refer to the ordinary GNU General Public License, version 2,
|
|
||||||
instead of to this License. (If a newer version than version 2 of the
|
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
|
||||||
that version instead if you wish.) Do not make any other change in
|
|
||||||
these notices.
|
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
|
||||||
subsequent copies and derivative works made from that copy.
|
|
||||||
|
|
||||||
This option is useful when you wish to copy part of the code of
|
|
||||||
the Library into a program that is not a library.
|
|
||||||
|
|
||||||
4. You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form
|
|
||||||
under the terms of Sections 1 and 2 above provided that you accompany
|
|
||||||
it with the complete corresponding machine-readable source code, which
|
|
||||||
must be distributed under the terms of Sections 1 and 2 above on a
|
|
||||||
medium customarily used for software interchange.
|
|
||||||
|
|
||||||
If distribution of object code is made by offering access to copy
|
|
||||||
from a designated place, then offering equivalent access to copy the
|
|
||||||
source code from the same place satisfies the requirement to
|
|
||||||
distribute the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
5. A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or
|
|
||||||
linked with it, is called a "work that uses the Library". Such a
|
|
||||||
work, in isolation, is not a derivative work of the Library, and
|
|
||||||
therefore falls outside the scope of this License.
|
|
||||||
|
|
||||||
However, linking a "work that uses the Library" with the Library
|
|
||||||
creates an executable that is a derivative of the Library (because it
|
|
||||||
contains portions of the Library), rather than a "work that uses the
|
|
||||||
library". The executable is therefore covered by this License.
|
|
||||||
Section 6 states terms for distribution of such executables.
|
|
||||||
|
|
||||||
When a "work that uses the Library" uses material from a header file
|
|
||||||
that is part of the Library, the object code for the work may be a
|
|
||||||
derivative work of the Library even though the source code is not.
|
|
||||||
Whether this is true is especially significant if the work can be
|
|
||||||
linked without the Library, or if the work is itself a library. The
|
|
||||||
threshold for this to be true is not precisely defined by law.
|
|
||||||
|
|
||||||
If such an object file uses only numerical parameters, data
|
|
||||||
structure layouts and accessors, and small macros and small inline
|
|
||||||
functions (ten lines or less in length), then the use of the object
|
|
||||||
file is unrestricted, regardless of whether it is legally a derivative
|
|
||||||
work. (Executables containing this object code plus portions of the
|
|
||||||
Library will still fall under Section 6.)
|
|
||||||
|
|
||||||
Otherwise, if the work is a derivative of the Library, you may
|
|
||||||
distribute the object code for the work under the terms of Section 6.
|
|
||||||
Any executables containing that work also fall under Section 6,
|
|
||||||
whether or not they are linked directly with the Library itself.
|
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
|
||||||
link a "work that uses the Library" with the Library to produce a
|
|
||||||
work containing portions of the Library, and distribute that work
|
|
||||||
under terms of your choice, provided that the terms permit
|
|
||||||
modification of the work for the customer's own use and reverse
|
|
||||||
engineering for debugging such modifications.
|
|
||||||
|
|
||||||
You must give prominent notice with each copy of the work that the
|
|
||||||
Library is used in it and that the Library and its use are covered by
|
|
||||||
this License. You must supply a copy of this License. If the work
|
|
||||||
during execution displays copyright notices, you must include the
|
|
||||||
copyright notice for the Library among them, as well as a reference
|
|
||||||
directing the user to the copy of this License. Also, you must do one
|
|
||||||
of these things:
|
|
||||||
|
|
||||||
a) Accompany the work with the complete corresponding
|
|
||||||
machine-readable source code for the Library including whatever
|
|
||||||
changes were used in the work (which must be distributed under
|
|
||||||
Sections 1 and 2 above); and, if the work is an executable linked
|
|
||||||
with the Library, with the complete machine-readable "work that
|
|
||||||
uses the Library", as object code and/or source code, so that the
|
|
||||||
user can modify the Library and then relink to produce a modified
|
|
||||||
executable containing the modified Library. (It is understood
|
|
||||||
that the user who changes the contents of definitions files in the
|
|
||||||
Library will not necessarily be able to recompile the application
|
|
||||||
to use the modified definitions.)
|
|
||||||
|
|
||||||
b) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (1) uses at run time a
|
|
||||||
copy of the library already present on the user's computer system,
|
|
||||||
rather than copying library functions into the executable, and (2)
|
|
||||||
will operate properly with a modified version of the library, if
|
|
||||||
the user installs one, as long as the modified version is
|
|
||||||
interface-compatible with the version that the work was made with.
|
|
||||||
|
|
||||||
c) Accompany the work with a written offer, valid for at
|
|
||||||
least three years, to give the same user the materials
|
|
||||||
specified in Subsection 6a, above, for a charge no more
|
|
||||||
than the cost of performing this distribution.
|
|
||||||
|
|
||||||
d) If distribution of the work is made by offering access to copy
|
|
||||||
from a designated place, offer equivalent access to copy the above
|
|
||||||
specified materials from the same place.
|
|
||||||
|
|
||||||
e) Verify that the user has already received a copy of these
|
|
||||||
materials or that you have already sent this user a copy.
|
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
|
||||||
Library" must include any data and utility programs needed for
|
|
||||||
reproducing the executable from it. However, as a special exception,
|
|
||||||
the materials to be distributed need not include anything that is
|
|
||||||
normally distributed (in either source or binary form) with the major
|
|
||||||
components (compiler, kernel, and so on) of the operating system on
|
|
||||||
which the executable runs, unless that component itself accompanies
|
|
||||||
the executable.
|
|
||||||
|
|
||||||
It may happen that this requirement contradicts the license
|
|
||||||
restrictions of other proprietary libraries that do not normally
|
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
|
||||||
use both them and the Library together in an executable that you
|
|
||||||
distribute.
|
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
|
||||||
Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined
|
|
||||||
library, provided that the separate distribution of the work based on
|
|
||||||
the Library and of the other library facilities is otherwise
|
|
||||||
permitted, and provided that you do these two things:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work
|
|
||||||
based on the Library, uncombined with any other library
|
|
||||||
facilities. This must be distributed under the terms of the
|
|
||||||
Sections above.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library of the fact
|
|
||||||
that part of it is a work based on the Library, and explaining
|
|
||||||
where to find the accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
8. You may not copy, modify, sublicense, link with, or distribute
|
|
||||||
the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library is void, and will automatically terminate your
|
|
||||||
rights under this License. However, parties who have received copies,
|
|
||||||
or rights, from you under this License will not have their licenses
|
|
||||||
terminated so long as such parties remain in full compliance.
|
|
||||||
|
|
||||||
9. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Library or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Library (or any work based on the
|
|
||||||
Library), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Library or works based on it.
|
|
||||||
|
|
||||||
10. Each time you redistribute the Library (or any work based on the
|
|
||||||
Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library
|
|
||||||
subject to these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties with
|
|
||||||
this License.
|
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Library at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Library by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Library.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under any
|
|
||||||
particular circumstance, the balance of the section is intended to apply,
|
|
||||||
and the section as a whole is intended to apply in other circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library under this License may add
|
|
||||||
an explicit geographical distribution limitation excluding those countries,
|
|
||||||
so that distribution is permitted only in or among countries not thus
|
|
||||||
excluded. In such case, this License incorporates the limitation as if
|
|
||||||
written in the body of this License.
|
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Lesser General Public License from time to time.
|
|
||||||
Such new versions will be similar in spirit to the present version,
|
|
||||||
but may differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Library
|
|
||||||
specifies a version number of this License which applies to it and
|
|
||||||
"any later version", you have the option of following the terms and
|
|
||||||
conditions either of that version or of any later version published by
|
|
||||||
the Free Software Foundation. If the Library does not specify a
|
|
||||||
license version number, you may choose any version ever published by
|
|
||||||
the Free Software Foundation.
|
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
|
||||||
programs whose distribution conditions are incompatible with these,
|
|
||||||
write to the author to ask for permission. For software which is
|
|
||||||
copyrighted by the Free Software Foundation, write to the Free
|
|
||||||
Software Foundation; we sometimes make exceptions for this. Our
|
|
||||||
decision will be guided by the two goals of preserving the free status
|
|
||||||
of all derivatives of our free software and of promoting the sharing
|
|
||||||
and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
||||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
||||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
|
||||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
|
||||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
||||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
|
||||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
|
||||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
|
||||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
|
||||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
|
||||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
|
||||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
|
||||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
|
||||||
possible use to the public, we recommend making it free software that
|
|
||||||
everyone can redistribute and change. You can do so by permitting
|
|
||||||
redistribution under these terms (or, alternatively, under the terms of the
|
|
||||||
ordinary General Public License).
|
|
||||||
|
|
||||||
To apply these terms, attach the following notices to the library. It is
|
|
||||||
safest to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least the
|
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the library's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
||||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1990
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
|
|
||||||
.panel_wrapper div.current {height:80px;}
|
|
||||||
#width {width:50px; vertical-align:middle;}
|
|
||||||
#width2 {width:50px; vertical-align:middle;}
|
|
||||||
#size {width:100px;}
|
|
|
@ -1 +0,0 @@
|
||||||
(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})();
|
|
|
@ -1,57 +0,0 @@
|
||||||
/**
|
|
||||||
* editor_plugin_src.js
|
|
||||||
*
|
|
||||||
* Copyright 2009, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
|
||||||
*
|
|
||||||
* License: http://tinymce.moxiecode.com/license
|
|
||||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
|
||||||
*/
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
tinymce.create('tinymce.plugins.AdvancedHRPlugin', {
|
|
||||||
init : function(ed, url) {
|
|
||||||
// Register commands
|
|
||||||
ed.addCommand('mceAdvancedHr', function() {
|
|
||||||
ed.windowManager.open({
|
|
||||||
file : url + '/rule.htm',
|
|
||||||
width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)),
|
|
||||||
height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)),
|
|
||||||
inline : 1
|
|
||||||
}, {
|
|
||||||
plugin_url : url
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Register buttons
|
|
||||||
ed.addButton('advhr', {
|
|
||||||
title : 'advhr.advhr_desc',
|
|
||||||
cmd : 'mceAdvancedHr'
|
|
||||||
});
|
|
||||||
|
|
||||||
ed.onNodeChange.add(function(ed, cm, n) {
|
|
||||||
cm.setActive('advhr', n.nodeName == 'HR');
|
|
||||||
});
|
|
||||||
|
|
||||||
ed.onClick.add(function(ed, e) {
|
|
||||||
e = e.target;
|
|
||||||
|
|
||||||
if (e.nodeName === 'HR')
|
|
||||||
ed.selection.select(e);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
getInfo : function() {
|
|
||||||
return {
|
|
||||||
longname : 'Advanced HR',
|
|
||||||
author : 'Moxiecode Systems AB',
|
|
||||||
authorurl : 'http://tinymce.moxiecode.com',
|
|
||||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
|
|
||||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Register plugin
|
|
||||||
tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin);
|
|
||||||
})();
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user