Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
+3
-3
@@ -6,7 +6,7 @@ has been used throughout Invision Community to add style, flair and functionalit
|
||||
to our product.
|
||||
|
||||
NULLING
|
||||
Last Updated: 18 April 2018
|
||||
Last Updated: 18 September 2018
|
||||
Author: IPBMafia.ru
|
||||
|
||||
AES implementation in PHP
|
||||
@@ -24,8 +24,8 @@ BMDoHyeon font package
|
||||
|
||||
CKEditor
|
||||
Description: Provides the editor functionality for submitting content.
|
||||
Location: In development: applications/core/dev/ckeditor (custom build with additional plugins and some code changes)
|
||||
Included version: 4.9
|
||||
Location: In development: applications/core/dev/ckeditor (custom build with additional plugins)
|
||||
Included version: 4.10
|
||||
Website: http://ckeditor.com
|
||||
License: http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ else
|
||||
print "<body style='text-align:center'>\n";
|
||||
print "This script is meant to be run via command line<br />\n";
|
||||
print "More information:<br />\n";
|
||||
print "<a href=\"http://www.google.com/search?hl=en&q=php+cli+windows\" target=\"_blank\">http://www.google.com/search?hl=en&q=php+cli+windows</a><br />\n";
|
||||
print "<a href=\"http://www.google.com/search?hl=en&q=php+cli+windows\" target=\"_blank\" rel=\"noopener\">http://www.google.com/search?hl=en&q=php+cli+windows</a><br />\n";
|
||||
print "This script will not run through a webserver.<br />\n";
|
||||
print "</body></html>\n";
|
||||
exit();
|
||||
|
||||
+12
-10
@@ -70,16 +70,18 @@ class IPSUtf8
|
||||
public static function defaultConstants()
|
||||
{
|
||||
return array(
|
||||
'IPB_FIREWALL' => 1, /* This is a workaround for an old exploit to prevent upgrade issues */
|
||||
'IPB_LOCK' => TRUE, /* Lock conversion to only IP.Board Databases */
|
||||
'BYPASS_SAFETY_LOCK' => FALSE,
|
||||
'FORCE_CONVERT' => FALSE, /* Enforce conversion */
|
||||
'FORCE_CONVERT_CHARSET' => NULL,
|
||||
'FORCE_CONVERT_METHOD' => NULL,
|
||||
'SOURCE_DB_CHARSET' => NULL, /* If set, will force the source database connection to use this charset */
|
||||
'UTF8_INSERT_ONLY' => FALSE, /* If true, and sql_charset is present and set to utf8 in conf_global.php, then the "fast" method will simply insert without converting. Useful for mixed collation databases where the utf8 tables are real utf8 */
|
||||
'FORCE_MULTI_CONVERT' => FALSE, /* Forces the converter to use CONVERT(CONVERT(CONVERT(x AS <SOURCE_DB_CHARSET>) AS BINARY) AS UTF8) which is needed in some random old data sets */
|
||||
'LOG' => FALSE, /* Log Conversion Data */
|
||||
'IPB_FIREWALL' => 1, /* This is a workaround for an old exploit to prevent upgrade issues */
|
||||
'IPB_LOCK' => TRUE, /* Lock conversion to only IP.Board Databases */
|
||||
'BYPASS_SAFETY_LOCK' => FALSE,
|
||||
'FORCE_CONVERT' => FALSE, /* Enforce conversion */
|
||||
'FORCE_CONVERT_CHARSET' => NULL,
|
||||
'FORCE_CONVERT_METHOD' => NULL,
|
||||
'SOURCE_DB_CHARSET' => NULL, /* If set, will force the source database connection to use this charset */
|
||||
'UTF8_INSERT_ONLY' => FALSE, /* If true, and sql_charset is present and set to utf8 in conf_global.php, then the "fast" method will simply insert without converting. Useful for mixed collation databases where the utf8 tables are real utf8 */
|
||||
'FORCE_MULTI_CONVERT' => FALSE, /* Forces the converter to use CONVERT(CONVERT(CONVERT(x AS <SOURCE_DB_CHARSET>) AS BINARY) AS UTF8) which is needed in some random old data sets */
|
||||
'LOG' => FALSE, /* Log Conversion Data */
|
||||
'SOURCE_CHARSET_OVERRIDE' => NULL, /* Force the converter to consider this value the value of IPB3's gb_char_set. Note that these are DOCUMENT Character Sets, not MySQL (so ISO-8859-1 for latin1, etc.) */
|
||||
'MULTI_NO_CMP' => FALSE, /* When using the multi convert option, set this to true to not check the result of the conversion against the same data collated to utf8, which can cause an error in some situations. */
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -341,7 +341,14 @@ class Convert
|
||||
$source_charset = SOURCE_DB_CHARSET;
|
||||
}
|
||||
|
||||
$select[] = 'CASE WHEN STRCMP(CONVERT(CONVERT(CONVERT(`' . $col . '` USING ' . $source_charset . ') USING BINARY) USING ' . $using . '), `' . $col . '` COLLATE ' . $collation . ') = 0 THEN CONVERT(`' . $col . '` USING BINARY) ELSE CONVERT(CONVERT(CONVERT(`' . $col . '` USING ' . $source_charset . ') USING BINARY) USING ' . $using . ') END';
|
||||
if ( defined( 'MULTI_NO_CMP' ) AND MULTI_NO_CMP === TRUE )
|
||||
{
|
||||
$select[] = "CONVERT(CONVERT(CONVERT(`{$col}` USING {$source_charset}) USING BINARY) USING {$using})";
|
||||
}
|
||||
else
|
||||
{
|
||||
$select[] = 'CASE WHEN STRCMP(CONVERT(CONVERT(CONVERT(`' . $col . '` USING ' . $source_charset . ') USING BINARY) USING ' . $using . '), `' . $col . '` COLLATE ' . $collation . ') = 0 THEN CONVERT(`' . $col . '` USING BINARY) ELSE CONVERT(CONVERT(CONVERT(`' . $col . '` USING ' . $source_charset . ') USING BINARY) USING ' . $using . ') END';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -247,27 +247,34 @@ class Session
|
||||
catch( \UnderflowException $ex ) { }
|
||||
}
|
||||
|
||||
if ( $ipbVersion >= 40000 )
|
||||
if ( !SOURCE_CHARSET_OVERRIDE )
|
||||
{
|
||||
/* >= 4.0 is UTF-8 */
|
||||
$charSet = 'utf-8';
|
||||
}
|
||||
else if ( $ipbVersion !== null )
|
||||
{
|
||||
/* Attempt to grab current CHARSET if this is an IPB 3 */
|
||||
if ( \IPSUtf8\Db::i()->checkForTable('core_sys_conf_settings' ) )
|
||||
if ( $ipbVersion >= 40000 )
|
||||
{
|
||||
try
|
||||
{
|
||||
$row = \IPSUtf8\Db::i()->select( '*', 'core_sys_conf_settings', array( 'conf_key=?', 'gb_char_set' ) )->first();
|
||||
|
||||
if ( ! empty( $row['conf_key'] ) )
|
||||
{
|
||||
$charSet = ( $row['conf_value'] ) ? $row['conf_value'] : $row['conf_default'];
|
||||
}
|
||||
}
|
||||
catch( \UnderflowException $ex ) { }
|
||||
/* >= 4.0 is UTF-8 */
|
||||
$charSet = 'utf-8';
|
||||
}
|
||||
else if ( $ipbVersion !== null )
|
||||
{
|
||||
/* Attempt to grab current CHARSET if this is an IPB 3 */
|
||||
if ( \IPSUtf8\Db::i()->checkForTable('core_sys_conf_settings' ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$row = \IPSUtf8\Db::i()->select( '*', 'core_sys_conf_settings', array( 'conf_key=?', 'gb_char_set' ) )->first();
|
||||
|
||||
if ( ! empty( $row['conf_key'] ) )
|
||||
{
|
||||
$charSet = ( $row['conf_value'] ) ? $row['conf_value'] : $row['conf_default'];
|
||||
}
|
||||
}
|
||||
catch( \UnderflowException $ex ) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$charSet = strtolower( SOURCE_CHARSET_OVERRIDE );
|
||||
}
|
||||
|
||||
$tableData = $this->_getTables();
|
||||
|
||||
@@ -63,6 +63,10 @@ abstract class Charset
|
||||
{
|
||||
self::$method = 'recode';
|
||||
}
|
||||
else if ( class_exists( 'UConverter' ) )
|
||||
{
|
||||
self::$method = 'uconverter';
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$method = 'internal';
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Conversion module
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Tools
|
||||
* @since 4 Sept 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPSUtf8\Text\Module;
|
||||
|
||||
/**
|
||||
* Native MB Conversion class
|
||||
*/
|
||||
class Uconverter extends \IPSUtf8\Text\Charset
|
||||
{
|
||||
/**
|
||||
* @brief The class
|
||||
*/
|
||||
protected $_class = NULL;
|
||||
|
||||
/**
|
||||
* Converts a text string from its current charset to a destination charset using iconv
|
||||
*
|
||||
* @param string Text string
|
||||
* @param string Text string char set (original)
|
||||
* @param string Desired character set (destination)
|
||||
* @return @e string
|
||||
*/
|
||||
public function convert( $string, $from, $to='UTF-8' )
|
||||
{
|
||||
if ( static::needsConverting( $string, $from, $to ) === false )
|
||||
{
|
||||
return $string;
|
||||
}
|
||||
|
||||
$text = NULL;
|
||||
|
||||
if ( class_exists( 'UConverter' ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( $this->_class === NULL )
|
||||
{
|
||||
$this->_class = new \UConverter( $to, $from );
|
||||
}
|
||||
$text = $this->_class->convert( $string );
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
static::$errors[] = $e->getMessage();
|
||||
}
|
||||
catch( \Throwable $e )
|
||||
{
|
||||
static::$errors[] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
static::$errors[] = "NO_UCONVERTER_CLASS";
|
||||
}
|
||||
|
||||
return $text ? $text : $string;
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
=============================[NOTE]=============================
This software is Nulled!
Nulled by IPBMafia.ru
Buy license at https://www.invisionpower.com/buy/self-hosted
================================================================
IPS 4.3.0 Release (103005)
=============================[NOTE]=============================
Invision Community End User License Agreement
1. Acceptance
This software license agreement (the “Agreement”) is between you (either an individual or entity, hereinafter referred to as “You” or “Your”) and Invision Power Services, Inc. (“IPS”, “We”, “Our” or “Us”) and pertains to the Invision Community software, its components, features, enhancements, updates and modifications (collectively the “Software” or “Suite”) and any related services (“Services”) provided by IPS under this Agreement.
By purchasing, downloading, accessing, installing, facilitating the installation or using the Software or Services (or allowing or authorizing any other person to do so) you are warranting that you have the authority provided by your state, country or jurisdiction to enter into a legally binding contract and that you have read and agree to be bound by the terms of this Agreement. You understand and acknowledge that this Agreement comprises the entire agreement between You and IPS. This Agreement supersedes any prior agreements, promises, representations or descriptions. If you do not agree with the terms and conditions set forth hereinafter, you may not purchase, download, access, install or use the Software or Services. This Agreement may only be modified in writing, signed by an officer of IPS and You.
2. License Scope and Grant
In consideration for payment of all applicable license fees and subject to the terms and conditions of this Agreement, IPS grants you a revocable, limited and non-exclusive license to install and use the Software and Services on a single installation, accessible via one URL. Access to services, components, software updates and technical support require an active license. All rights in and to the Software and Services are reserved to the use and benefit of IPS and/or its licensors, successors and assigners.
(a) Test Installation. You may install and test one additional instance of the Software for the purpose of development and testing. This installation must be and remain isolated and inaccessible to the general public at all times.
3. Restrictions
Your license to use the Software and Services is subject to the following terms, conditions and restrictions on use:
(a) You may alter and modify the Software’s source code for Your use, subject to this Agreement, however, you may not distribute, publish, resell, or otherwise share the Software or derivative works based on the Software without prior express written consent from IPS.
(b) You may not utilize the Software or Services to engage in, facilitate, or otherwise allow others to engage in any activity that violates any law or regulation or the terms and conditions within this Agreement.
(c) You are solely responsible for complying with all governmental regulations and policies. You agree to indemnify Us from any loss, action or damage arising from Your failure to use the Software in a manner inconsistent with applicable legislation.
(d) You may not remove any copyright or proprietary notices on or within the software’s source code at any time. A copyright removal license may be purchased to remove the public display of the Software’s publicly displayed copyright notice.
4. Intellectual Property
We have the sole and exclusive right to the Software which is being licensed, not sold, to you by IPS under the terms and conditions of this agreement. The Software is protected by copyright, trademark and other intellectual property laws. IPS reserves any rights not expressly granted herein.
5. Assignment
You may not rent, lease, sell, share or authorize or temporarily assign your rights to the license or this Agreement to another individual or entity except as expressly permitted herein.
(a) You may, after six months from the original purchase date, permanently transfer your licensing rights and interest in this Agreement to a third party, provided the license is active and in good standing. Any transfer and reassignment must occur via the mechanisms provided within the invisioncommunity.com client area and all applicable fees must be paid for the reassignment to be considered valid.
(b) You agree to provide this Agreement in its entirety to the assignee prior to reassignment and the assignee must agree to be bound to the terms of this Agreement.
(c) You acknowledge that account and non license specific materials and purchases, including, but not limited to: account credits and third party (“marketplace”) add-ons and purchases are non-transferrable under any circumstances.
(d) We reserve the right to refuse or reject reassignment at our soleLine truncated
|
||||
=============================[NOTE]=============================
This software is Nulled!
Nulled by IPBMafia.ru
Buy license at https://www.invisionpower.com/buy/self-hosted
================================================================
IPS 4.3.6 Release (103038)
=============================[NOTE]=============================
Invision Community End User License Agreement
1. Acceptance
This software license agreement (the “Agreement”) is between you (either an individual or entity, hereinafter referred to as “You” or “Your”) and Invision Power Services, Inc. (“IPS”, “We”, “Our” or “Us”) and pertains to the Invision Community software, its components, features, enhancements, updates and modifications (collectively the “Software” or “Suite”) and any related services (“Services”) provided by IPS under this Agreement.
By purchasing, downloading, accessing, installing, facilitating the installation or using the Software or Services (or allowing or authorizing any other person to do so) you are warranting that you have the authority provided by your state, country or jurisdiction to enter into a legally binding contract and that you have read and agree to be bound by the terms of this Agreement. You understand and acknowledge that this Agreement comprises the entire agreement between You and IPS. This Agreement supersedes any prior agreements, promises, representations or descriptions. If you do not agree with the terms and conditions set forth hereinafter, you may not purchase, download, access, install or use the Software or Services. This Agreement may only be modified in writing, signed by an officer of IPS and You.
2. License Scope and Grant
In consideration for payment of all applicable license fees and subject to the terms and conditions of this Agreement, IPS grants you a revocable, limited and non-exclusive license to install and use the Software and Services on a single installation, accessible via one URL. Access to services, components, software updates and technical support require an active license. All rights in and to the Software and Services are reserved to the use and benefit of IPS and/or its licensors, successors and assigners.
(a) Test Installation. You may install and test one additional instance of the Software for the purpose of development and testing. This installation must be and remain isolated and inaccessible to the general public at all times.
3. Restrictions
Your license to use the Software and Services is subject to the following terms, conditions and restrictions on use:
(a) You may alter and modify the Software’s source code for Your use, subject to this Agreement, however, you may not distribute, publish, resell, or otherwise share the Software or derivative works based on the Software without prior express written consent from IPS.
(b) You may not utilize the Software or Services to engage in, facilitate, or otherwise allow others to engage in any activity that violates any law or regulation or the terms and conditions within this Agreement.
(c) You are solely responsible for complying with all governmental regulations and policies. You agree to indemnify Us from any loss, action or damage arising from Your failure to use the Software in a manner inconsistent with applicable legislation.
(d) You may not remove any copyright or proprietary notices on or within the software’s source code at any time. A copyright removal license may be purchased to remove the public display of the Software’s publicly displayed copyright notice.
4. Intellectual Property
We have the sole and exclusive right to the Software which is being licensed, not sold, to you by IPS under the terms and conditions of this agreement. The Software is protected by copyright, trademark and other intellectual property laws. IPS reserves any rights not expressly granted herein.
5. Assignment
You may not rent, lease, sell, share or authorize or temporarily assign your rights to the license or this Agreement to another individual or entity except as expressly permitted herein.
(a) You may, after six months from the original purchase date, permanently transfer your licensing rights and interest in this Agreement to a third party, provided the license is active and in good standing. Any transfer and reassignment must occur via the mechanisms provided within the invisioncommunity.com client area and all applicable fees must be paid for the reassignment to be considered valid.
(b) You agree to provide this Agreement in its entirety to the assignee prior to reassignment and the assignee must agree to be bound to the terms of this Agreement.
(c) You acknowledge that account and non license specific materials and purchases, including, but not limited to: account credits and third party (“marketplace”) add-ons and purchases are non-transferrable under any circumstances.
(d) We reserve the right to refuse or reject reassignment at our soleLine truncated
|
||||
@@ -30,11 +30,6 @@
|
||||
<div id='ipsLayout_header' class='ipsClearfix' role='banner'>
|
||||
<header>
|
||||
<a href='/' id='elSiteTitle'><span id='elLogo'><img src='img/logo.png' alt=''></span> {lang="banner"}</a>
|
||||
<!--<div class='logged_in right'>
|
||||
<ul id='user_links' class='ipsList_inline'>
|
||||
<li><a href="{expression="\IPS\Http\Url::ips('docs/install_guide')"}" target="_blank">{lang="install_guide"}</a></li>
|
||||
</ul>
|
||||
</div>-->
|
||||
</header>
|
||||
</div>
|
||||
<main id='elInstaller_body'>
|
||||
@@ -72,7 +67,7 @@
|
||||
<br><br>
|
||||
<a href='https://ipbmafia.ru/files/file/1848-russkiy-yazyk-dlya-invision-community/' target="_blank" class='ipsButton ipsButton_large ipsButton_normal' style="background: red;">Russian lang pack</a>
|
||||
<br><br>
|
||||
<a href="{expression="\IPS\Http\Url::ips('docs/docs')"}" target="_blank">{lang="docs_link"}</a>
|
||||
<a href="{expression="\IPS\Http\Url::ips('docs/docs')"}" target="_blank" rel="noopener">{lang="docs_link"}</a>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='ipsPad_double ipsType_center'>
|
||||
@@ -89,7 +84,7 @@
|
||||
<a href='{url="start=1"}' class='ipsButton ipsButton_large ipsButton_primary'>{lang="start_installation"}</a>
|
||||
{{endif}}
|
||||
<br><br>
|
||||
<a href="{expression="\IPS\Http\Url::ips('docs/install_guide')"}" target="_blank">{lang="install_guide"}</a>
|
||||
<a href="{expression="\IPS\Http\Url::ips('docs/install_guide')"}" target="_blank" rel="noopener">{lang="install_guide"}</a>
|
||||
</div>
|
||||
{{endif}}
|
||||
<p style="text-align: right; margin:10px">Nulled by IPBMafia.ru</p>
|
||||
|
||||
@@ -33,6 +33,20 @@ $lang = array(
|
||||
'continue' => "Continue",
|
||||
'install_guide' => "Need help? Consult the Installation Guide →",
|
||||
'err_password_length' => "Passwords must be at least 3 characters",
|
||||
|
||||
/* !Step Titles */
|
||||
'install_step_1_app' => "Setting up database (%s - done so far %s)...",
|
||||
'install_step_2_app' => "Installing applications and modules (%s)...",
|
||||
'install_step_3_app' => "Installing settings (%s)...",
|
||||
// step 4 intentionally skipped - not app loop
|
||||
'install_step_5_app' => "Installing tasks (%s)...",
|
||||
// step 6 intentionally skipped - not app loop
|
||||
'install_step_7_app' => "Installing languages (%s - done so far %s)...",
|
||||
'install_step_8_app' => "Installing email templates (%s)...",
|
||||
'install_step_9_app' => "Installing themes (%s - done so far %s)...",
|
||||
'install_step_10_app' => "Installing JavaScript (%s - done so far %s)...",
|
||||
'install_step_11_app' => "Installing search keywords (%s)...",
|
||||
'install_step_12_app' => "Installing hooks and widgets (%s)...",
|
||||
|
||||
'requirements_php_version_success' => "PHP version %s.",
|
||||
'requirements_php_version_fail' => "You are running PHP version %s. You need PHP %s or above (%s or above recommended). You should contact your hosting provider or system administrator to ask for an upgrade.",
|
||||
|
||||
@@ -377,7 +377,7 @@ HTML;
|
||||
'ftp' => $_GET['ftp'],
|
||||
'i' => $newI,
|
||||
);
|
||||
$url = "extract.php?" . http_build_query( $properties );
|
||||
$url = "extract.php?" . http_build_query( $properties, '', '&' );
|
||||
echo <<<HTML
|
||||
<div class="ipsProgressBar ipsProgressBar_animated">
|
||||
<div class="ipsProgressBar_progress" style="width: {$percentComplete}%;"></div>
|
||||
@@ -389,9 +389,9 @@ HTML;
|
||||
}
|
||||
catch ( Exception $e )
|
||||
{
|
||||
echo "<script type='text/javascript'>parent.location = parent.location + '&fail=1';</script><noscript>An error occurred. Please visit the <a href='https://remoteservices.invisionpower.com/docs/client_area' target='_blank'>client area</a> to manually download the latest version. After uploading the files, <a href='index.php' target='_parent'>continue to the upgrader</a>.</noscript>";
|
||||
echo "<script type='text/javascript'>parent.location = parent.location + '&fail=1';</script><noscript>An error occurred. Please visit the <a href='https://remoteservices.invisionpower.com/docs/client_area' target='_blank' rel='noopener'>client area</a> to manually download the latest version. After uploading the files, <a href='index.php' target='_parent'>continue to the upgrader</a>.</noscript>";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -15,7 +15,7 @@
|
||||
<span class="ipsFieldRow_required">{lang="required"}</span>
|
||||
</label>
|
||||
<div class="ipsFieldRow_content">
|
||||
<input type="text" placeholder="{lang="email_address"}" name="auth" id="auth" {{if isset( \IPS\Request::i()->auth )}}value="{request="auth"}"{{endif}}>
|
||||
<input type="text" placeholder="{lang="auth"}" name="auth" id="auth" {{if isset( \IPS\Request::i()->auth )}}value="{request="auth"}"{{endif}}>
|
||||
</div>
|
||||
</li>
|
||||
<li class="ipsFieldRow ipsClearfix">
|
||||
@@ -30,7 +30,7 @@
|
||||
<li class=''>
|
||||
<button type='submit' class='ipsButton ipsButton_primary ipsButton_medium'>{lang="login"}</button>
|
||||
|
||||
<a href="{url="upgrader_login_help" ips="true"}" target="_blank" class="ipsType_blendLinks">{lang="help"}</a>
|
||||
<a href="{url="upgrader_login_help" ips="true"}" target="_blank" rel="noopener" class="ipsType_blendLinks">{lang="help"}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
@@ -79,7 +79,7 @@
|
||||
<br><br>
|
||||
<a href='https://ipbmafia.ru/files/file/1848-russkiy-yazyk-dlya-invision-community/' target="_blank" class='ipsButton ipsButton_large ipsButton_normal' style="background: red;">Russian lang pack</a>
|
||||
<br><br>
|
||||
<a href="{expression="\IPS\Http\Url::ips('docs/docs')"}" target="_blank">{lang="suite_docs"}</a>
|
||||
<a href="{expression="\IPS\Http\Url::ips('docs/docs')"}" target="_blank" rel="noopener">{lang="suite_docs"}</a>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='ipsPad_double ipsType_center'>
|
||||
@@ -96,7 +96,7 @@
|
||||
<a href='{url="&start=1"}' class='ipsButton ipsButton_large ipsButton_primary'>{lang="start_upgrade"}</a>
|
||||
{{endif}}
|
||||
<br><br>
|
||||
<a href="{expression="\IPS\Http\Url::ips('docs/install_guide')"}" target="_blank">{lang="install_docs"}</a>
|
||||
<a href="{expression="\IPS\Http\Url::ips('docs/install_guide')"}" target="_blank" rel="noopener">{lang="install_docs"}</a>
|
||||
</div>
|
||||
{{endif}}
|
||||
<p style="text-align: right; margin:10px">Nulled by IPBMafia.ru</p>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<br><br>
|
||||
<p class="ipsType_normal">{lang="hc_files_fail"}</p>
|
||||
<br>
|
||||
<a class="ipsButton ipsButton_primary" href="{url="client_area" ips="true"}" target="_blank">{lang="hc_files_fail2"}</a>
|
||||
<a class="ipsButton ipsButton_primary" href="{url="client_area" ips="true"}" target="_blank" rel="noopener">{lang="hc_files_fail2"}</a>
|
||||
<br><br>
|
||||
<p class="ipsType_normal">{lang="hc_files_fail3"}</p>
|
||||
<ul class="ipsPad ipsType_large ipsList_checks">
|
||||
|
||||
+14
-3
@@ -39,6 +39,17 @@ $lang = array(
|
||||
'upgrade_group_not_exist' => "You do not have permission to run the upgrader because your group does not exist.",
|
||||
'help' => "Help",
|
||||
|
||||
/* !Step Titles */
|
||||
'upgrade_step_2_app' => "Checking database (%s)...",
|
||||
'upgrade_step_3_app' => "Upgrading applications (%s)...",
|
||||
'upgrade_step_4_app' => "Upgrading settings, tasks, widgets, and search keywords (%s)...",
|
||||
'upgrade_step_5_app' => "Upgrading languages (%s - done so far %s)...",
|
||||
'upgrade_step_6_app' => "Upgrading email templates (%s)...",
|
||||
'upgrade_step_7_app' => "Upgrading theme settings (%s)...",
|
||||
'upgrade_step_8_app' => "Removing old theme templates, CSS, and images (%s)...",
|
||||
'upgrade_step_9_app' => "Upgrading theme templates, CSS and images (%s - done so far %s)...",
|
||||
'upgrade_step_10_app' => "Upgrading JavaScript (%s - done so far %s)...",
|
||||
|
||||
'sign_in_short' => "Sign In",
|
||||
'auth' => "Display Name or Email Address",
|
||||
'password' => "Password",
|
||||
@@ -53,7 +64,7 @@ $lang = array(
|
||||
'login_err_locked_nounlock' => "Your account has been locked. Try again later.",
|
||||
'login_err_no_cookies' => "Your browser does not accept cookies which are required in order to log in.",
|
||||
'sign_in_with_these' => "Or sign in with one of these services",
|
||||
'login_err_remote_validate' => "You must validate your account at another site before you can log in successfully. Please <a href='%s' target='_blank'>click here</a> to validate your account.",
|
||||
'login_err_remote_validate' => "You must validate your account at another site before you can log in successfully. Please <a href='%s' target='_blank' rel='noopener'>click here</a> to validate your account.",
|
||||
'login_connect_generic_error' => "There was an error processing your login request at one of the sites in our network.",
|
||||
'login_upgrader_no_permission' => "You do not have permission to run the upgrader.",
|
||||
'invalid_login_as_user_key' => "Secure login key mismatch",
|
||||
@@ -173,7 +184,7 @@ $lang = array(
|
||||
'install_guide' => "Need help? Consult the Installation Guide →",
|
||||
|
||||
'license' => "License",
|
||||
'license_inactive' => 'Your license is currently inactive. You will need to <a href="{external.renew_my_license}" target="_blank">renew</a> before you can upgrade.',
|
||||
'license_inactive' => 'Your license is currently inactive. You will need to <a href="{external.renew_my_license}" target="_blank" rel="noopener">renew</a> before you can upgrade.',
|
||||
'lkey' => "License Key",
|
||||
'lkey_help' => "Help",
|
||||
'lkey_err' => "The license key could not be activated. Please contact technical support for further assistance.",
|
||||
@@ -477,7 +488,7 @@ $lang = array(
|
||||
'40000_nexus_staff' => "Support Staff",
|
||||
'40000_nexus_staff_desc' => "Support staff cannot be converted during the upgrade. Please log in and set up support staff as administrators in the admin control panel after the upgrade and then review support department staff settings.",
|
||||
'40000_nexus_modules' => "Custom Modules",
|
||||
'40000_nexus_modules_desc' => "Custom code to run when packages are purchased, etc. cannot be converted during the upgrade. <a href='{external.devdocs-commerce-actions}' target='_blank'>More information</a>",
|
||||
'40000_nexus_modules_desc' => "Custom code to run when packages are purchased, etc. cannot be converted during the upgrade. <a href='{external.devdocs-commerce-actions}' target='_blank' rel='noopener'>More information</a>",
|
||||
|
||||
/* ! 40000 Forum Upgrade options */
|
||||
'40000_qa_forum' => "Question and Answer Forums",
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>An update is available</title>
|
||||
<style type='text/css'>
|
||||
body {
|
||||
background: #f9f9f9;
|
||||
margin: 0;
|
||||
padding: 30px 20px;
|
||||
font-family: "Helvetica Neue", helvetica, arial, sans-serif;
|
||||
}
|
||||
|
||||
#error {
|
||||
max-width: 800px;
|
||||
background: #fff;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1 {
|
||||
background: #151515;
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
font-weight: 500;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
h1 span {
|
||||
color: #7a7a7a;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#content {
|
||||
padding: 20px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.buttonsRow {
|
||||
text-align: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.button {
|
||||
background: #151515;
|
||||
color: #fff;
|
||||
border: 0;
|
||||
line-height: 34px;
|
||||
padding: 0 15px;
|
||||
font-family: "Helvetica Neue", helvetica, arial, sans-serif;
|
||||
font-size: 14px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nodontdoit {
|
||||
background: #e0e0e0;
|
||||
color: #222;
|
||||
margin-left: 50px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='error'>
|
||||
<h1>Your site is ready to upgrade</h1>
|
||||
<div id='content'>
|
||||
A new version is available to install and it is strongly recommended that you complete the upgrade process for this new version before continuing to the AdminCP. Sometimes changes in new versions will result in errors until the upgrade process has been completed.
|
||||
|
||||
<div class='buttonsRow'>
|
||||
<button onclick="window.location='upgrade/'" class='button'>Complete Upgrade</button>
|
||||
<button onclick="window.location=window.location + '&noWarning=1'" class='button nodontdoit'>Continue to AdminCP</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="blog">
|
||||
<file javascript_app="blog" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.grid.js" javascript_type="controller" javascript_version="103005" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="blog" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.grid.js" javascript_type="controller" javascript_version="103038" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="blog" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.list.js" javascript_type="controller" javascript_version="103005" javascript_position="1000050">/**
|
||||
<file javascript_app="blog" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.list.js" javascript_type="controller" javascript_version="103038" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="blog" version="103005">
|
||||
<app key="blog" version="103038">
|
||||
<word key="__app_blog" js="0">Blogs</word>
|
||||
<word key="frontnavigation_blogs" js="0">Blogs</word>
|
||||
<word key="__indefart_blog_entry_comment" js="0">a comment on a blog entry</word>
|
||||
|
||||
@@ -491,9 +491,9 @@
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"length": 20,
|
||||
"name": "entry_author_id",
|
||||
"type": "INT",
|
||||
"type": "BIGINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
@@ -603,9 +603,9 @@
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 10,
|
||||
"length": 20,
|
||||
"name": "entry_last_comment_mid",
|
||||
"type": "INT",
|
||||
"type": "BIGINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<div class='ipsBox'>
|
||||
{$table|raw}
|
||||
</div>]]></template>
|
||||
<template template_group="browse" template_name="indexButtons" template_data="$blogs=array(), $viewMode" template_location="front" template_app="blog"><![CDATA[{{if count( $blogs ) || \IPS\blog\Blog::canCreate()}}
|
||||
<template template_group="browse" template_name="indexButtons" template_data="$blogs=array(), $viewMode" template_location="front" template_app="blog"><![CDATA[{{if count( $blogs ) || \IPS\blog\Blog::canCreate() || \IPS\Settings::i()->blog_allow_grid}}
|
||||
<ul class="ipsToolList ipsToolList_horizontal ipsClearfix ipsSpacer_bottom">
|
||||
{{if count( $blogs )}}
|
||||
<li class='ipsToolList_primaryAction'>
|
||||
@@ -85,7 +85,8 @@
|
||||
{{endforeach}}
|
||||
{{endif}}
|
||||
</li>
|
||||
{{if \IPS\Settings::i()->blog_allow_grid}}
|
||||
{{endif}}
|
||||
{{if \IPS\Settings::i()->blog_allow_grid}}
|
||||
<li class='ipsType_center'>
|
||||
<ul class='ipsButton_split'>
|
||||
<li class='ipsType_center'>
|
||||
@@ -96,7 +97,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if count( $blogs )}}
|
||||
{{if count( $blogs ) > 1}}
|
||||
<li class='ipsType_center'>
|
||||
<a href='{url="app=blog&module=blogs&controller=browse&page=1&filter=my_blogs&sortby=blog_last_edate" seoTemplate="blogs"}' data-ipsMenu id='elMyBlogs' class='ipsButton ipsButton_medium ipsButton_fullWidth ipsButton_link'>{lang="my_blogs"} <i class='fa fa-caret-down'></i></a>
|
||||
@@ -171,7 +173,7 @@
|
||||
{template="pagination" app="core" location="global" group="global" params="$pagination['url'], $pagination['pages'], $pagination['page'], $pagination['perpage'], TRUE, 'page'"}
|
||||
{{endif}}]]></template>
|
||||
<template template_group="browse" template_name="indexGridEntry" template_data="$entry, $primary=false, $table=false" template_location="front" template_app="blog"><![CDATA[<article class='cBlog_grid_item ipsClear ipsClearfix ipsBox ipsSpacer_bottom {{if $entry->hidden() OR $entry->status === 'draft'}}ipsModerated{{endif}}'>
|
||||
<div class='cBlog_grid_catBadge'><a href="{$entry->container()->url()}">{$entry->container()->_title}</a></div>
|
||||
{{if !\IPS\Request::i()->id}}<div class='cBlog_grid_catBadge'><a href="{$entry->container()->url()}">{$entry->container()->_title}</a></div>{{endif}}
|
||||
{{if $table and $table->canModerate()}}
|
||||
{{$idField = $entry::$databaseColumnId;}}
|
||||
<input type='checkbox' data-role='moderation' name="moderate[{$entry->$idField}]" data-actions="{expression="implode( ' ', $table->multimodActions( $entry ) )"}" data-state='{{if $entry->tableStates()}}{$entry->tableStates()}{{endif}}'>
|
||||
@@ -384,7 +386,7 @@
|
||||
<p class='ipsType_normal ipsType_light ipsType_blendLinks ipsType_reset'>
|
||||
{{if $entry->container()->owner() instanceof \IPS\Member}}
|
||||
{lang="blog_by" htmlsprintf="$entry->container()->owner()->link()"}
|
||||
{{elseif $club = $blog->club()}}
|
||||
{{elseif $club = $entry->container()->club()}}
|
||||
<i class='fa fa-users'></i> {lang="club_blog_for" sprintf="$club->name"}
|
||||
{{else}}
|
||||
<i class='fa fa-users'></i> {lang="group_blog_by" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'blogs_groupblog_name_' . $entry->container()->id )"}
|
||||
@@ -450,7 +452,7 @@
|
||||
{{if $blog->latestEntry()}}
|
||||
<hr class='ipsHr'>
|
||||
<p class='ipsType_medium ipsType_reset ipsSpacer_top ipsSpacer_half ipsType_blendLinks'>
|
||||
<span class='ipsType_light'>{lang="latest_entry"}:</span> <a href='{$blog->latestEntry()->url}' title="{$blog->latestEntry()->mapped('title')}">{$blog->latestEntry()->mapped('title')}</a>
|
||||
<span class='ipsType_light'>{lang="latest_entry"}:</span> <a href='{$blog->latestEntry()->url()}' title="{$blog->latestEntry()->mapped('title')}">{$blog->latestEntry()->mapped('title')}</a>
|
||||
</p>
|
||||
{{endif}}
|
||||
</div>
|
||||
@@ -1410,11 +1412,11 @@
|
||||
<li class='ipsMenu_item'>
|
||||
<a href='{$blog->url()->setQueryString( array( 'do' => 'editBlog', 'csrfKey' => \IPS\Session::i()->csrfKey ) )}' title="{lang="edit_blog"}" data-ipsDialog data-ipsDialog-title="{lang="edit_blog"}">{lang="edit_blog"}</a>
|
||||
</li>
|
||||
{{if \IPS\Settings::i()->blog_allow_rssimport }}
|
||||
<li class='ipsMenu_item'>
|
||||
<a href='{$blog->url()->setQueryString( array( 'do' => 'rssImport', 'csrfKey' => \IPS\Session::i()->csrfKey ) )}' title="{lang="blog_rss_import"}" data-ipsDialog data-ipsDialog-title="{lang="blog_rss_import"}">{lang="blog_rss_import"}</a>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if $blog->canEdit() AND \IPS\Settings::i()->blog_allow_rssimport }}
|
||||
<li class='ipsMenu_item'>
|
||||
<a href='{$blog->url()->setQueryString( array( 'do' => 'rssImport', 'csrfKey' => \IPS\Session::i()->csrfKey ) )}' title="{lang="blog_rss_import"}" data-ipsDialog data-ipsDialog-title="{lang="blog_rss_import"}">{lang="blog_rss_import"}</a>
|
||||
</li>
|
||||
{{endif}}
|
||||
|
||||
{{if $blog->pinned and \IPS\Member::loggedIn()->modPermission('can_unpin_content')}}
|
||||
@@ -1841,7 +1843,7 @@ html[dir="rtl"] .cBlogInfo {
|
||||
}
|
||||
|
||||
.cBlockView_stats {
|
||||
max-width: 300px;
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
.cBlockView_stats > li {
|
||||
@@ -2076,6 +2078,8 @@ html[dir="rtl"] .cBlogEmbed .ipsRichEmbed_moreInfo .ipsNotificationCou
|
||||
flex-direction: column;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
-webkit-flex-basis: calc(50% - 2px);
|
||||
flex-basis: calc(50% - 2px);
|
||||
}
|
||||
|
||||
.cBlog_grid .cBlog_grid_item [data-role='moderation'] {
|
||||
|
||||
@@ -245,9 +245,43 @@
|
||||
"102046": "4.2.7",
|
||||
"102047": "4.2.8",
|
||||
"102048": "4.2.8",
|
||||
"102049": "4.2.9",
|
||||
"103000": "4.3.0 Beta 1",
|
||||
"103002": "4.3.0 Beta 2",
|
||||
"103003": "4.3.0 Beta 3",
|
||||
"103004": "4.3.0 Beta 4",
|
||||
"103005": "4.3.0"
|
||||
"103005": "4.3.0",
|
||||
"103006": "4.3.1",
|
||||
"103007": "4.3.1",
|
||||
"103008": "4.3.1",
|
||||
"103009": "4.3.2",
|
||||
"103010": "4.3.2",
|
||||
"103011": "4.3.3",
|
||||
"103012": "4.3.3",
|
||||
"103013": "4.3.3",
|
||||
"103014": "4.3.3",
|
||||
"103015": "4.3.3",
|
||||
"103016": "4.3.3",
|
||||
"103017": "4.3.3",
|
||||
"103018": "4.3.3",
|
||||
"103019": "4.3.3",
|
||||
"103020": "4.3.3",
|
||||
"103021": "4.3.4",
|
||||
"103022": "4.3.4",
|
||||
"103023": "4.3.4",
|
||||
"103024": "4.3.4",
|
||||
"103025": "4.3.4",
|
||||
"103026": "4.3.5 Beta 1",
|
||||
"103027": "4.3.5 Beta 2",
|
||||
"103028": "4.3.5",
|
||||
"103029": "4.3.5",
|
||||
"103030": "4.3.5",
|
||||
"103031": "4.3.5",
|
||||
"103032": "4.3.5",
|
||||
"103033": "4.3.6 Beta 1",
|
||||
"103034": "4.3.6 Beta 2",
|
||||
"103035": "4.3.6",
|
||||
"103036": "4.3.6",
|
||||
"103037": "4.3.6",
|
||||
"103038": "4.3.6"
|
||||
}
|
||||
@@ -49,14 +49,15 @@ class _Blogs
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly=FALSE )
|
||||
{
|
||||
/* The attachment is attached to a comment */
|
||||
if ( $id2 )
|
||||
|
||||
@@ -49,14 +49,15 @@ class _Entries
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly=FALSE )
|
||||
{
|
||||
return \IPS\blog\Entry::load( $id1 )->canView( $member );
|
||||
}
|
||||
|
||||
@@ -70,13 +70,13 @@ class _Blog
|
||||
* Get where clause to add to the member retrieval database query
|
||||
*
|
||||
* @param mixed $data The array returned from the save() method
|
||||
* @return string|array|NULL Where clause
|
||||
* @return array|NULL Where clause - must be a single array( "clause", ...binds )
|
||||
*/
|
||||
public function getQueryWhereClause( $data )
|
||||
{
|
||||
if( isset( $data['has_blog'] ) )
|
||||
{
|
||||
return ( $data['has_blog'] == 'yes' ) ? array( array( "blog_blogs.blog_id IS NOT NULL" ) ) : array( array( "blog_blogs.blog_id IS NULL" ) );
|
||||
return ( $data['has_blog'] == 'yes' ) ? array( "blog_blogs.blog_id IS NOT NULL" ) : array( "blog_blogs.blog_id IS NULL" );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
@@ -94,40 +94,53 @@ class _blogs extends \IPS\Node\Controller
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
/* Row buttons */
|
||||
$table->rowButtons = function( $row )
|
||||
{
|
||||
$blog = \IPS\blog\Blog::constructFromData( $row );
|
||||
|
||||
return array(
|
||||
'edit' => array(
|
||||
$return = array();
|
||||
|
||||
if ( $blog->canEdit() )
|
||||
{
|
||||
$return['edit'] = array(
|
||||
'icon' => 'pencil',
|
||||
'title' => 'edit',
|
||||
'link' => \IPS\Http\Url::internal( 'app=blog&module=blogs&controller=blogs&do=form&id=' ) . $row['blog_id'],
|
||||
'data' => array(),
|
||||
'hotkey'=> 'e return'
|
||||
),
|
||||
'copy' => array(
|
||||
);
|
||||
}
|
||||
|
||||
$return['copy'] = array(
|
||||
'icon' => 'files-o',
|
||||
'title' => 'copy',
|
||||
'link' => \IPS\Http\Url::internal( 'app=blog&module=blogs&controller=blogs&do=copy&id=' ) . $row['blog_id'],
|
||||
'data' => array()
|
||||
),
|
||||
'content' => array(
|
||||
);
|
||||
|
||||
$return['content'] =
|
||||
array(
|
||||
'icon' => 'arrow-right',
|
||||
'title' => 'mass_manage_content',
|
||||
'link' => \IPS\Http\Url::internal( 'app=blog&module=blogs&controller=blogs&do=massManageContent&id=' ) . $row['blog_id'],
|
||||
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('empty') ),
|
||||
'hotkey'=> 'm'
|
||||
),
|
||||
'delete' => array(
|
||||
);
|
||||
|
||||
if ( $blog->canDelete() )
|
||||
{
|
||||
$return['delete'] = array(
|
||||
'icon' => 'times-circle',
|
||||
'title' => 'delete',
|
||||
'link' => \IPS\Http\Url::internal( 'app=blog&module=blogs&controller=blogs&do=delete&id=' ) . $row['blog_id'],
|
||||
'data' => ( $blog->getContentItemCount() ) ? array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('delete') ) : array( 'delete' => '' ),
|
||||
'hotkey'=> 'd'
|
||||
)
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
return $return;
|
||||
};
|
||||
|
||||
/* Root buttons */
|
||||
|
||||
@@ -64,8 +64,8 @@ class _browse extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
|
||||
/* @note We cannot check individual member permissions here, so entries in draft status are excluded. */
|
||||
$count = \IPS\blog\Entry::getItemsWithPermission( array( "entry_status!=?", 'draft' ), 'entry_date desc', NULL, 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC, 0, NULL, FALSE, FALSE, FALSE, TRUE );
|
||||
$entries = \IPS\blog\Entry::getItemsWithPermission( array( "entry_status!=?", 'draft' ), 'entry_date desc', array( ( $perpage * ( $page - 1 ) ), $perpage ) );
|
||||
$count = \IPS\blog\Entry::getItemsWithPermission( array( array( "entry_status!=?", 'draft' ) ), 'entry_date desc', NULL, 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC, 0, NULL, FALSE, FALSE, FALSE, TRUE );
|
||||
$entries = \IPS\blog\Entry::getItemsWithPermission( array( array( "entry_status!=?", 'draft' ) ), 'entry_date desc', array( ( $perpage * ( $page - 1 ) ), $perpage ) );
|
||||
$pagination = array(
|
||||
'page' => $page,
|
||||
'pages' => ceil( $count / $perpage ),
|
||||
|
||||
@@ -44,7 +44,11 @@ class _entry extends \IPS\Content\Controller
|
||||
\IPS\Output::i()->error( 'node_error', '2B202/1', 403, '' );
|
||||
}
|
||||
|
||||
if ( $this->entry->container()->cover_photo )
|
||||
if( $this->entry->cover_photo )
|
||||
{
|
||||
\IPS\Output::i()->metaTags['og:image'] = \IPS\File::get( 'blog_Entries', $this->entry->cover_photo )->url;
|
||||
}
|
||||
elseif ( $this->entry->container()->cover_photo )
|
||||
{
|
||||
\IPS\Output::i()->metaTags['og:image'] = \IPS\File::get( 'blog_Blogs', $this->entry->container()->cover_photo )->url;
|
||||
}
|
||||
|
||||
@@ -171,11 +171,6 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
|
||||
if ( $club = $this->club() )
|
||||
{
|
||||
if ( !$member->member_id )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch ( $permission )
|
||||
{
|
||||
case 'add':
|
||||
@@ -249,7 +244,7 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
|
||||
if ( $club = $this->club() )
|
||||
{
|
||||
if ( $club->type == $club::TYPE_PUBLIC or $club->type == $club::TYPE_READONLY )
|
||||
if ( $club->type == $club::TYPE_PUBLIC or $club->type == $club::TYPE_READONLY or $club->type == $club::TYPE_OPEN)
|
||||
{
|
||||
return 'ca';
|
||||
}
|
||||
@@ -1221,14 +1216,14 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
{
|
||||
$member = $member ?: \IPS\Member::loggedIn();
|
||||
|
||||
$where[] = array( 'blog_club_id IS NOT NULL' );
|
||||
|
||||
if ( $member->modPermission('can_access_all_clubs') )
|
||||
{
|
||||
return static::nodesWithPermission( NULL, $member, $where );
|
||||
}
|
||||
else
|
||||
{
|
||||
$where[] = array( 'blog_club_id IS NOT NULL' );
|
||||
|
||||
if ( $permissionCheck === 'add' )
|
||||
{
|
||||
$statuses = array( \IPS\Member\Club::STATUS_LEADER, \IPS\Member\Club::STATUS_MODERATOR );
|
||||
@@ -1239,7 +1234,7 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
}
|
||||
$where[] = array( \IPS\Db::i()->in( 'status', $statuses ) );
|
||||
|
||||
return new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'blog_blogs', $where )->join( 'core_clubs_memberships', array( 'club_id=blog_club_id AND member_id=?', \IPS\Member::loggedIn()->member_id ) ), get_called_class() );
|
||||
return new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'blog_blogs', $where )->join( 'core_clubs_memberships', array( 'club_id=blog_club_id AND member_id=?', $member->member_id ) ), get_called_class() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,6 @@ class _Feed extends \IPS\Patterns\ActiveRecord
|
||||
|
||||
$entry = \IPS\blog\Entry::createItem( \IPS\Member::load( $this->member ), NULL, $article['date'], $container );
|
||||
$entry->name = $article['title'];
|
||||
$entry->content = \IPS\Text\Parser::parseStatic( $article['content'], TRUE );
|
||||
|
||||
if ( $article['link'] )
|
||||
{
|
||||
@@ -107,8 +106,10 @@ class _Feed extends \IPS\Patterns\ActiveRecord
|
||||
}
|
||||
|
||||
$link = htmlspecialchars( $this->import_show_link, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );
|
||||
$entry->content .= "<br><p><a href='{$article['link']}' {$linkRelPart}>{$link}</a></p>";
|
||||
$article['content'] .= "<br><p><a href='{$article['link']}' {$linkRelPart}>{$link}</a></p>";
|
||||
}
|
||||
|
||||
$entry->content = \IPS\Text\Parser::parseStatic( $article['content'], TRUE, NULL, \IPS\Member::load( $this->member ) );
|
||||
|
||||
$entry->status = 'published';
|
||||
$entry->save();
|
||||
|
||||
@@ -323,11 +323,11 @@ class _Entry extends \IPS\Content\Item implements
|
||||
$joins[] = array( 'from' => 'core_clubs', 'where' => 'core_clubs.id=blog_blogs.blog_club_id' );
|
||||
if ( $member->member_id )
|
||||
{
|
||||
$where[] = array( '( blog_blogs.blog_club_id IS NULL OR ' . \IPS\Db::i()->in( 'blog_blogs.blog_club_id', $member->clubs() ) . ' OR core_clubs.type=? OR core_clubs.type=? )', \IPS\Member\Club::TYPE_PUBLIC, \IPS\Member\Club::TYPE_READONLY );
|
||||
$where[] = array( '( blog_blogs.blog_club_id IS NULL OR ' . \IPS\Db::i()->in( 'blog_blogs.blog_club_id', $member->clubs() ) . ' OR core_clubs.type=? OR core_clubs.type=? OR core_clubs.type=?)', \IPS\Member\Club::TYPE_PUBLIC, \IPS\Member\Club::TYPE_READONLY, \IPS\Member\Club::TYPE_OPEN, );
|
||||
}
|
||||
else
|
||||
{
|
||||
$where[] = array( '( blog_blogs.blog_club_id IS NULL OR core_clubs.type=? OR core_clubs.type=? )', \IPS\Member\Club::TYPE_PUBLIC, \IPS\Member\Club::TYPE_READONLY );
|
||||
$where[] = array( '( blog_blogs.blog_club_id IS NULL OR core_clubs.type=? OR core_clubs.type=? OR core_clubs.type=? )', \IPS\Member\Club::TYPE_PUBLIC, \IPS\Member\Club::TYPE_READONLY, \IPS\Member\Club::TYPE_OPEN, );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -427,14 +427,16 @@ class _Entry extends \IPS\Content\Item implements
|
||||
*/
|
||||
public function processForm( $values )
|
||||
{
|
||||
$new = $this->_new;
|
||||
|
||||
parent::processForm( $values );
|
||||
|
||||
if ( !$this->_new )
|
||||
if ( !$new )
|
||||
{
|
||||
$oldContent = $this->content;
|
||||
}
|
||||
$this->content = $values['blog_entry_content'];
|
||||
if ( !$this->_new )
|
||||
if ( !$new )
|
||||
{
|
||||
$this->sendAfterEditNotifications( $oldContent );
|
||||
}
|
||||
|
||||
@@ -145,7 +145,8 @@ class _Application extends \IPS\Application
|
||||
|
||||
foreach ( \IPS\calendar\Event::retrieveEvents( $_today, $endDate, NULL, NULL, FALSE, $member ) as $event )
|
||||
{
|
||||
$document->addItem( $event->title, $event->url(), $event->content, \IPS\DateTime::ts( $event->saved ), $event->id );
|
||||
$next = ( (int) \IPS\Settings::i()->calendar_rss_feed_order === 0 ) ? $event->nextOccurrence( $_today, 'startDate' ) : \IPS\DateTime::ts( $event->saved );
|
||||
$document->addItem( $event->title, $event->url(), $event->content, $next, $event->id );
|
||||
}
|
||||
|
||||
/* @note application/rss+xml is not a registered IANA mime-type so we need to stick with text/xml for RSS */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="calendar">
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="103005" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="103038" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -112,7 +112,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="103005" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="103038" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -254,7 +254,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="103005" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="103038" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -699,7 +699,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="103005" javascript_position="1000200"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="103038" javascript_position="1000200"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -811,7 +811,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="103005" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="103038" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -894,7 +894,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="103005" javascript_position="1000150">/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="103038" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1004,7 +1004,7 @@
|
||||
});
|
||||
}(jQuery, _));
|
||||
</file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="103005" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="103038" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="calendar" version="103005">
|
||||
<app key="calendar" version="103038">
|
||||
<word key="__app_calendar" js="0">Calendar</word>
|
||||
<word key="frontnavigation_calendar" js="0">Calendar</word>
|
||||
<word key="__indefart_calendar_event_comment" js="0">a comment on a calendar event</word>
|
||||
@@ -48,6 +48,9 @@
|
||||
<word key="calendar_rss_feed" js="0">Enable upcoming events RSS feed</word>
|
||||
<word key="calendar_rss_feed_desc" js="0"><![CDATA[Only content that is available to guests will be shown. For more options, create a <a href='{internal.app=core&module=discovery&controller=rss}'>Custom RSS Feed</a>]]></word>
|
||||
<word key="calendar_rss_feed_days" js="0">Number of forthcoming days to include in the feed</word>
|
||||
<word key="calendar_rss_feed_order" js="0">Order feed by</word>
|
||||
<word key="calendar_rss_feed_order_date" js="0">Event Date</word>
|
||||
<word key="calendar_rss_feed_order_publish" js="0">Publish Date</word>
|
||||
<word key="acplogs__calendar_settings" js="0">Updated calendar settings</word>
|
||||
<word key="calendar_default_view" js="0">Default layout</word>
|
||||
<word key="calendar_default_view_desc" js="0">This setting allows you to control the default layout of the calendar homepage. Users can override the default view if they wish.</word>
|
||||
@@ -64,7 +67,7 @@
|
||||
<word key="calendar_custom_df" js="0">Or specify a custom date format</word>
|
||||
<word key="calendar_date_format" js="0">Date format for events</word>
|
||||
<word key="calendar_date_format_custom" js="0">Custom date format</word>
|
||||
<word key="calendar_date_format_custom_desc" js="0"><![CDATA[You can use any <a href='{external.php-strftime}' target='_blank'>PHP strftime</a> options to specify a custom format for dates in calendar]]></word>
|
||||
<word key="calendar_date_format_custom_desc" js="0"><![CDATA[You can use any <a href='{external.php-strftime}' target='_blank' rel='noopener'>PHP strftime</a> options to specify a custom format for dates in calendar]]></word>
|
||||
<word key="calendar_no_date_format" js="0">You must either choose a predefined date format or specify a custom date format</word>
|
||||
<word key="calendars" js="0">Calendars</word>
|
||||
<word key="calendars_sg" js="0">Calendar</word>
|
||||
@@ -258,6 +261,7 @@
|
||||
<word key="end_date_before_start" js="0">Please select an end date after the event start date</word>
|
||||
<word key="invalid_start_date" js="0">The provided start date is not valid</word>
|
||||
<word key="invalid_end_date" js="0">The provided end date is not valid</word>
|
||||
<word key="invalid_recurrence" js="0">The event cannot repeat that frequently. Each occurrence must end before the next starts.</word>
|
||||
<word key="event__save" js="0">Save</word>
|
||||
<word key="calendar_delete_title" js="0">Delete this event</word>
|
||||
<word key="blurb_date_with_time" js="0">%s %s</word>
|
||||
|
||||
@@ -1471,7 +1471,7 @@
|
||||
"comment": "The member ID of the review author",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 8,
|
||||
"length": 20,
|
||||
"name": "review_mid",
|
||||
"type": "BIGINT",
|
||||
"unsigned": true,
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
"default": "30",
|
||||
"report": "full"
|
||||
},
|
||||
{
|
||||
"key": "calendar_rss_feed_order",
|
||||
"default": "0",
|
||||
"report": "full"
|
||||
},
|
||||
{
|
||||
"key": "calendar_venues_enabled",
|
||||
"default": "0",
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
<li class='cEvents_ranged'>
|
||||
<ul class='cEvents'>
|
||||
{{foreach $events[ $date->year . '-' . $date->mon . '-' . $k ]['ranged'] as $event }}
|
||||
<li class='cEvents_event cEvents_style{$event->calendar_id}{{if $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ), 'startDate' ) AND $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ), 'startDate' )->mysqlDatetime( FALSE, TRUE ) == $date->year . '-' . $date->mon . '-' . $k }}{{$startDates[ $event->id ] = $date->year . '-' . $date->mon . '-' . $k;}} cEvents_first{{endif}}{{if $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ) ?: $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ), 'startDate' ), 'endDate' ) AND $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ) ?: $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ), 'startDate' ), 'endDate' )->mysqlDatetime( FALSE, TRUE ) == $date->year . '-' . $date->mon . '-' . $k }} cEvents_last{{endif}}' data-eventID='{$event->id}'>
|
||||
<li class='cEvents_event cEvents_style{$event->calendar_id}{{if $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ), 'startDate' ) AND $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ), 'startDate' )->mysqlDatetime( FALSE ) == $date->year . '-' . $date->mon . '-' . $k }}{{$startDates[ $event->id ] = $date->year . '-' . $date->mon . '-' . $k;}} cEvents_first{{endif}}{{if $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ) ?: $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ), 'startDate' ), 'endDate' ) AND $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ) ?: $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, $k ), 'startDate' ), 'endDate' )->mysqlDatetime( FALSE ) == $date->year . '-' . $date->mon . '-' . $k }} cEvents_last{{endif}}' data-eventID='{$event->id}'>
|
||||
<a href='{$event->url()}' data-ipsHover data-ipsHover-target='{$event->url('hovercard')->setQuerystring( 'sd', isset( $startDates[ $event->id ] ) ? $startDates[ $event->id ] : $date->year . '-' . $date->mon . '-' . $k )}' title='{$event->title}'>{{if !$event->all_day}}<span class='cEvents_time'>{$event->_start_date->localeTime( FALSE )}</span> {{endif}}{truncate="$event->title" length="15"}{{if $event->hidden() === 1}} <i class='fa fa-warning'></i>{{endif}}</a>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
@@ -431,7 +431,7 @@
|
||||
<li class='cEvents_ranged'>
|
||||
<ul class='cEvents'>
|
||||
{{foreach $events[ $day->year . '-' . $day->mon . '-' . $day->mday ]['ranged'] as $event }}
|
||||
<li class='cEvents_event cEvents_style{$event->calendar_id}{{if $event->nextOccurrence( $day, 'startDate' ) AND $event->nextOccurrence( $day, 'startDate' )->mysqlDatetime( FALSE, TRUE ) == $day->mysqlDatetime( FALSE ) }}{{$startDates[ $event->id ] = $day->mysqlDatetime( FALSE );}} cEvents_first{{endif}}{{if $event->nextOccurrence( $day ?: $event->nextOccurrence( $day, 'startDate' ), 'endDate' ) AND $event->nextOccurrence( $day ?: $event->nextOccurrence( $day, 'startDate' ), 'endDate' )->mysqlDatetime( FALSE, TRUE ) == $day->mysqlDatetime( FALSE ) }} cEvents_last{{endif}}'>
|
||||
<li class='cEvents_event cEvents_style{$event->calendar_id}{{if $event->nextOccurrence( $day, 'startDate' ) AND $event->nextOccurrence( $day, 'startDate' )->mysqlDatetime( FALSE ) == $day->mysqlDatetime( FALSE ) }}{{$startDates[ $event->id ] = $day->mysqlDatetime( FALSE );}} cEvents_first{{endif}}{{if $event->nextOccurrence( $day ?: $event->nextOccurrence( $day, 'startDate' ), 'endDate' ) AND $event->nextOccurrence( $day ?: $event->nextOccurrence( $day, 'startDate' ), 'endDate' )->mysqlDatetime( FALSE ) == $day->mysqlDatetime( FALSE ) }} cEvents_last{{endif}}'>
|
||||
<a href='{$event->url()}' data-ipsHover data-ipsHover-target='{$event->url('hovercard')->setQuerystring( 'sd', isset( $startDates[ $event->id ] ) ? $startDates[ $event->id ] : $day->mysqlDatetime( FALSE ) )}'>{$event->title}{{if $event->hidden() === 1}} <i class='fa fa-warning'></i>{{endif}}</a>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
@@ -1158,13 +1158,13 @@
|
||||
</div>
|
||||
<div class='cCalendarSubmit_field' id='end_time_wrap'>
|
||||
<i class='fa fa-clock-o'></i>
|
||||
<input name="event_dates[end_time]" id="end_time" type="time" size='12' class="ipsField_short" placeholder="{lang="_time_format_hhmm"}" step='60' min='00:00' value="{$value['end_time']}">
|
||||
<input name="event_dates[end_time]" id="end_time" type="time" size='12' class="ipsField_short" placeholder="{lang="_time_format_hhmm"}" step='60' min='00:00' value="{{if isset( $value['end_time'] )}}{$value['end_time']}{{endif}}">
|
||||
</div>
|
||||
<br><br>
|
||||
<ul class='ipsList_inline' id='end_date_controls'>
|
||||
<li>
|
||||
<span class='ipsCustomInput'>
|
||||
<input type="checkbox" role="checkbox" name="event_dates[no_end_time]" {{if !$value['end_time']}}checked aria-checked='true'{{endif}} value="1" id="check_no_end_time">
|
||||
<input type="checkbox" role="checkbox" name="event_dates[no_end_time]" {{if !isset( $value['end_time'] ) OR !$value['end_time']}}checked aria-checked='true'{{endif}} value="1" id="check_no_end_time">
|
||||
<span></span>
|
||||
</span> <label for='check_no_end_time'>{lang="no_end_time"}</label>
|
||||
</li>
|
||||
@@ -1557,7 +1557,13 @@
|
||||
<time content='{expression="$event->_end_date->format( 'Y-m-d' )"}'>
|
||||
{{$sameDay = !( ($event->_start_date->mday != $event->_end_date->mday) or ($event->_start_date->mon != $event->_end_date->mon) or ($event->_start_date->year != $event->_end_date->year) );}}
|
||||
{{if $event->nextOccurrence( $event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' ) ?: \IPS\calendar\Date::getDate(), 'endDate' )}}
|
||||
{{if !$sameDay}}{$event->nextOccurrence( $event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' ) ?: \IPS\calendar\Date::getDate(), 'endDate' )->calendarDate()}{{endif}}{{if !$event->all_day}}{{if !$sameDay}}, {{endif}}{$event->nextOccurrence( $event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' ) ?: \IPS\calendar\Date::getDate(), 'endDate' )->localeTime( FALSE )}{{endif}}
|
||||
{{if !$sameDay}}
|
||||
{$event->nextOccurrence( $event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' ) ?: \IPS\calendar\Date::getDate(), 'endDate' )->calendarDate()}
|
||||
{{endif}}
|
||||
{{if !$event->all_day}}
|
||||
{{if !$sameDay}}, {{endif}}
|
||||
{$event->nextOccurrence( $event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' ) ?: \IPS\calendar\Date::getDate(), 'endDate' )->localeTime( FALSE )}
|
||||
{{endif}}
|
||||
{{else}}
|
||||
{$event->lastOccurrence( 'endDate' )->calendarDate()}{{if !$event->all_day}} {$event->lastOccurrence( 'endDate' )->localeTime( FALSE )}{{endif}}
|
||||
{{endif}}
|
||||
@@ -1590,10 +1596,18 @@
|
||||
{{$startDate = $event->nextOccurrence( \IPS\calendar\Date::getDate( $date->year, $date->mon, 1 ), 'startDate' );}}
|
||||
{{endif}}
|
||||
{{if $startDate}}
|
||||
{{$sameDay = ( $event->nextOccurrence( $startDate ?: $date, 'endDate' ) ) AND ( $startDate->calendarDate() == $event->nextOccurrence( $startDate ?: $date, 'endDate' )->calendarDate() );}}
|
||||
{{$nextEndDate = $event->nextOccurrence( $startDate ?: $date, 'endDate' );}}
|
||||
{{$sameDay = ( $nextEndDate AND $startDate->calendarDate() == $nextEndDate->calendarDate() );}}
|
||||
{$startDate->calendarDate()}{{if !$event->all_day}} {$startDate->localeTime( FALSE )} {{endif}}
|
||||
{{if $event->_end_date AND $event->nextOccurrence( $startDate ?: $date, 'endDate' ) }}
|
||||
<i class='fa fa-arrow-circle-right ipsType_large ipsType_light'></i> {{if !$sameDay}}{$event->nextOccurrence( $startDate ?: $date, 'endDate' )->calendarDate()}{{endif}}{{if !$event->all_day}}{{if !$sameDay}} {{endif}}{$event->nextOccurrence( $startDate ?: $date, 'endDate' )->localeTime( FALSE )}{{endif}}
|
||||
<i class='fa fa-arrow-circle-right ipsType_large ipsType_light'></i>
|
||||
{{if !$sameDay}}
|
||||
{$event->nextOccurrence( $startDate ?: $date, 'endDate' )->calendarDate()}
|
||||
{{endif}}
|
||||
{{if !$event->all_day}}
|
||||
{{if !$sameDay}} {{endif}}
|
||||
{$event->nextOccurrence( $startDate ?: $date, 'endDate' )->localeTime( FALSE )}
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{else}}
|
||||
{$event->lastOccurrence( 'startDate' )->calendarDate()}{{if !$event->all_day}} {$event->lastOccurrence( 'startDate' )->localeTime( FALSE )} {{endif}}
|
||||
@@ -2602,6 +2616,11 @@
|
||||
#elEventHeader_details time p .fa-arrow-circle-right:before{
|
||||
content:"\f0ab";
|
||||
}
|
||||
|
||||
.cCalendarBlock .cCalendarBlock_map {
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
}]]></css>
|
||||
<css css_location="front" css_app="calendar" css_attributes="" css_path="." css_name="calendar.css"><![CDATA[.cCalendar {
|
||||
width: 100%;
|
||||
|
||||
@@ -217,9 +217,43 @@
|
||||
"102046": "4.2.7",
|
||||
"102047": "4.2.8",
|
||||
"102048": "4.2.8",
|
||||
"102049": "4.2.9",
|
||||
"103000": "4.3.0 Beta 1",
|
||||
"103002": "4.3.0 Beta 2",
|
||||
"103003": "4.3.0 Beta 3",
|
||||
"103004": "4.3.0 Beta 4",
|
||||
"103005": "4.3.0"
|
||||
"103005": "4.3.0",
|
||||
"103006": "4.3.1",
|
||||
"103007": "4.3.1",
|
||||
"103008": "4.3.1",
|
||||
"103009": "4.3.2",
|
||||
"103010": "4.3.2",
|
||||
"103011": "4.3.3",
|
||||
"103012": "4.3.3",
|
||||
"103013": "4.3.3",
|
||||
"103014": "4.3.3",
|
||||
"103015": "4.3.3",
|
||||
"103016": "4.3.3",
|
||||
"103017": "4.3.3",
|
||||
"103018": "4.3.3",
|
||||
"103019": "4.3.3",
|
||||
"103020": "4.3.3",
|
||||
"103021": "4.3.4",
|
||||
"103022": "4.3.4",
|
||||
"103023": "4.3.4",
|
||||
"103024": "4.3.4",
|
||||
"103025": "4.3.4",
|
||||
"103026": "4.3.5 Beta 1",
|
||||
"103027": "4.3.5 Beta 2",
|
||||
"103028": "4.3.5",
|
||||
"103029": "4.3.5",
|
||||
"103030": "4.3.5",
|
||||
"103031": "4.3.5",
|
||||
"103032": "4.3.5",
|
||||
"103033": "4.3.6 Beta 1",
|
||||
"103034": "4.3.6 Beta 2",
|
||||
"103035": "4.3.6",
|
||||
"103036": "4.3.6",
|
||||
"103037": "4.3.6",
|
||||
"103038": "4.3.6"
|
||||
}
|
||||
@@ -23,9 +23,15 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class _Calendars
|
||||
{
|
||||
/**
|
||||
* @brief ID Field
|
||||
*/
|
||||
public static $idField = "id";
|
||||
|
||||
public static $controllers = array();
|
||||
/**
|
||||
* @brief Controller classes
|
||||
*/
|
||||
public static $controllers = array( "IPS\\calendar\\modules\\front\\calendar\\view" );
|
||||
|
||||
/**
|
||||
* Get Setting Field
|
||||
|
||||
@@ -48,14 +48,15 @@ class _Calendar
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly=FALSE )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -54,9 +54,10 @@ class _Venue
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly=FALSE )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -47,10 +47,14 @@ class _StreamItems
|
||||
}
|
||||
foreach ( \IPS\Db::i()->select( '*', 'calendar_event_rsvp', $where, 'rsvp_date DESC', 10 ) as $rsvp )
|
||||
{
|
||||
$member = \IPS\Member::load( $rsvp['rsvp_member_id'] );
|
||||
$event = \IPS\calendar\Event::load( $rsvp[ 'rsvp_event_id' ] );
|
||||
$title = htmlspecialchars( $event->title, ENT_DISALLOWED, 'UTF-8', FALSE );
|
||||
$rsvps[] = new \IPS\Content\Search\Result\Custom( \IPS\DateTime::ts( $rsvp[ 'rsvp_date' ] ), \IPS\Member::loggedIn()->language()->addToStack( 'calendar_activity_stream_rsvp', FALSE, array( 'htmlsprintf' => array( \IPS\Theme::i()->getTemplate( 'global', 'core', 'front' )->userLink( $member ), $event->url(), $title ) ) ) );
|
||||
|
||||
if( $event->canView() )
|
||||
{
|
||||
$member = \IPS\Member::load( $rsvp['rsvp_member_id'] );
|
||||
$title = htmlspecialchars( $event->title, ENT_DISALLOWED, 'UTF-8', FALSE );
|
||||
$rsvps[] = new \IPS\Content\Search\Result\Custom( \IPS\DateTime::ts( $rsvp[ 'rsvp_date' ] ), \IPS\Member::loggedIn()->language()->addToStack( 'calendar_activity_stream_rsvp', FALSE, array( 'htmlsprintf' => array( \IPS\Theme::i()->getTemplate( 'global', 'core', 'front' )->userLink( $member ), $event->url(), $title ) ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* Return */
|
||||
|
||||
@@ -255,7 +255,7 @@ class _ical extends \IPS\Dispatcher\Controller
|
||||
try
|
||||
{
|
||||
$icsParser = new \IPS\calendar\Icalendar\ICSParser;
|
||||
$count = $icsParser->parse( \file_get_contents( $values['feed_file'] ), $values['feed_calendar_id'], $values['feed_member_id'], $values['feed_venue_id'] );
|
||||
$count = $icsParser->parse( \file_get_contents( $values['feed_file'] ), $values['feed_calendar_id'], $values['feed_member_id'], ( isset( $values['feed_venue_id'] ) ) ? $values['feed_venue_id']->_id : NULL );
|
||||
}
|
||||
catch( \UnexpectedValueException $e )
|
||||
{
|
||||
|
||||
@@ -53,8 +53,15 @@ class _settings extends \IPS\Dispatcher\Controller
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'show_bday_calendar', \IPS\Settings::i()->show_bday_calendar ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'ipb_calendar_mon', \IPS\Settings::i()->ipb_calendar_mon ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'calendar_rss_feed', \IPS\Settings::i()->calendar_rss_feed, FALSE, array( 'togglesOn' => array( 'calendar_rss_feed_days' ) ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'calendar_rss_feed', \IPS\Settings::i()->calendar_rss_feed, FALSE, array( 'togglesOn' => array( 'calendar_rss_feed_days', 'calendar_rss_feed_order' ) ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'calendar_rss_feed_days', \IPS\Settings::i()->calendar_rss_feed_days, FALSE, array( 'unlimited' => -1 ), NULL, NULL, NULL, 'calendar_rss_feed_days' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'calendar_rss_feed_order', \IPS\Settings::i()->calendar_rss_feed_order, FALSE, array( 'options' => array(
|
||||
0 => 'calendar_rss_feed_order_date',
|
||||
1 => 'calendar_rss_feed_order_publish'
|
||||
) ), NULL, NULL, NULL, 'calendar_rss_feed_order' ) );
|
||||
|
||||
|
||||
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'calendar_venues_enabled', \IPS\Settings::i()->calendar_venues_enabled ) );
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ class _event extends \IPS\Content\Controller
|
||||
$this->event->lastOccurrence( 'endDate' )->format( \IPS\DateTime::ISO8601 );
|
||||
}
|
||||
|
||||
if( $this->event->container()->allow_reviews AND $this->event->reviews )
|
||||
if( $this->event->container()->allow_reviews AND $this->event->reviews AND $this->event->averageReviewRating() )
|
||||
{
|
||||
\IPS\Output::i()->jsonLd['event']['aggregateRating'] = array(
|
||||
'@type' => 'AggregateRating',
|
||||
|
||||
@@ -178,6 +178,13 @@ class _submit extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$obj = \IPS\calendar\Event::createFromForm( $values );
|
||||
|
||||
/* Set cover photo offset from original if we're using the same photo */
|
||||
if( $existing->cover_photo == $obj->cover_photo )
|
||||
{
|
||||
$obj->cover_offset = $existing->cover_offset;
|
||||
$obj->save();
|
||||
}
|
||||
|
||||
if ( !\IPS\Member::loggedIn()->member_id and $obj->hidden() )
|
||||
{
|
||||
\IPS\Output::i()->redirect( $obj->container()->url(), 'mod_queue_message' );
|
||||
|
||||
@@ -547,7 +547,7 @@ class _view extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
/* Build the form */
|
||||
$form = new \IPS\Helpers\Form;
|
||||
$form->add( new \IPS\Helpers\Form\Date( 'jump_to', $this->_today, TRUE, array(), NULL, NULL, NULL, 'jump_to' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Date( 'jump_to', \IPS\DateTime::create(), TRUE, array(), NULL, NULL, NULL, 'jump_to' ) );
|
||||
|
||||
if( $values = $form->values() )
|
||||
{
|
||||
|
||||
@@ -75,5 +75,18 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_sys_lang_words",
|
||||
{
|
||||
"word_app": "calendar"
|
||||
},
|
||||
[
|
||||
"word_app=? AND word_key LIKE '%calendar_venue_%'",
|
||||
"venues"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -28,19 +28,19 @@
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"cal_events",
|
||||
"approved"
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "renameTable",
|
||||
"params": [
|
||||
"cal_events",
|
||||
"calendar_events"
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"calendar_events",
|
||||
"approved"
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
|
||||
@@ -95,9 +95,14 @@ class _Date extends \IPS\DateTime
|
||||
public static function getDate( $year=NULL, $month=NULL, $day=NULL, $hour=0, $minute=0, $second=0, $offset=NULL )
|
||||
{
|
||||
/* Get our time zone offset */
|
||||
$timezone = NULL;
|
||||
|
||||
if ( $offset === NULL and \IPS\Member::loggedIn()->timezone )
|
||||
{
|
||||
$offset = \IPS\DateTime::create()->setTimezone( new \DateTimeZone( \IPS\Member::loggedIn()->timezone ) )->getOffset();
|
||||
$timezone = \IPS\DateTime::create();
|
||||
$timezone->setTimezone( new \DateTimeZone( \IPS\Member::loggedIn()->timezone ) );
|
||||
|
||||
$offset = $timezone->getOffset();
|
||||
}
|
||||
|
||||
/* Set appropriate defaults for values not supplied, which is normal */
|
||||
@@ -125,6 +130,14 @@ class _Date extends \IPS\DateTime
|
||||
/* Create the timestamp */
|
||||
$timeStamp = gmmktime( $hour, $minute, $second, $month, $day, $year );
|
||||
|
||||
/* Recalculate offset in case we go over DST boundary */
|
||||
if( $timezone )
|
||||
{
|
||||
$timeZoneCheck = $timezone->setTimestamp( $timeStamp );
|
||||
|
||||
$offset = $timeZoneCheck->getOffset();
|
||||
}
|
||||
|
||||
/* Store the information and return the object */
|
||||
$obj = static::ts( $timeStamp - $offset );
|
||||
$obj->getDateInformation( $timeStamp );
|
||||
@@ -180,7 +193,7 @@ class _Date extends \IPS\DateTime
|
||||
*
|
||||
* @note This is basically a timezone aware wrapper for getdate
|
||||
* @param int $time Timestamp
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function getDateInformation( $time )
|
||||
{
|
||||
@@ -197,6 +210,7 @@ class _Date extends \IPS\DateTime
|
||||
'month' => $this->strFormat( '%B' ),
|
||||
0 => $time
|
||||
);
|
||||
return $this->dateInformation;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -519,25 +533,18 @@ class _Date extends \IPS\DateTime
|
||||
/**
|
||||
* Return the MySQL-style datetime value
|
||||
*
|
||||
* @param bool $includeTime Whether to include time or not
|
||||
* @param bool $timezoned Whether to adjust for timezone or not. This will usually be FALSE for database purposes, but set to TRUE if you're using this to compare if two dates are on the same day
|
||||
* @param bool $includeTime Whether to include time or not
|
||||
* @return string
|
||||
*/
|
||||
public function mysqlDatetime( $includeTime=TRUE, $timezoned = FALSE )
|
||||
public function mysqlDatetime( $includeTime=TRUE )
|
||||
{
|
||||
$timeStamp = isset( $this->dateInformation[0] ) ? $this->dateInformation[0] : $this->getTimestamp();
|
||||
if ( $timezoned )
|
||||
{
|
||||
$timeStamp += $this->getTimezone()->getOffset( $this );
|
||||
}
|
||||
|
||||
if( $includeTime )
|
||||
{
|
||||
return date( 'Y-m-d H:i:s', $timeStamp );
|
||||
return date( 'Y-m-d H:i:s', isset( $this->dateInformation[0] ) ? $this->dateInformation[0] : $this->getTimestamp() );
|
||||
}
|
||||
else
|
||||
{
|
||||
return date( 'Y-m-d', $timeStamp );
|
||||
return date( 'Y-m-d', isset( $this->dateInformation[0] ) ? $this->dateInformation[0] : $this->getTimestamp() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -564,7 +564,8 @@ class _Event extends \IPS\Content\Item implements
|
||||
( $eDate !== NULL AND $date->mysqlDatetime( FALSE ) <= $startDate->mysqlDatetime( FALSE ) AND $eDate->mysqlDatetime( FALSE ) >= $endDate->mysqlDatetime( FALSE ) )
|
||||
)
|
||||
{
|
||||
$results[] = array( 'startDate' => new \IPS\calendar\Date( $dateOccurrence->mysqlDatetime( FALSE, TRUE ) ), 'endDate' => $eDate );
|
||||
$thisOccurrence = $dateOccurrence->getDateInformation( $dateOccurrence->getTimestamp() );
|
||||
$results[] = array( 'startDate' => \IPS\calendar\Date::getDate( $thisOccurrence['year'], $thisOccurrence['mon'], $thisOccurrence['mday'], $thisOccurrence['hours'], $thisOccurrence['minutes'], $thisOccurrence['seconds'] ), 'endDate' => $eDate );
|
||||
}
|
||||
|
||||
$eDate = ( $eDate !== NULL ) ? $eDate->adjust( "+{$recurringData['event_repeat_freq']} {$keyword}" ) : NULL;
|
||||
@@ -584,7 +585,8 @@ class _Event extends \IPS\Content\Item implements
|
||||
( $eDate !== NULL AND $date->mysqlDatetime( FALSE ) <= $startDate->mysqlDatetime( FALSE ) AND $eDate->mysqlDatetime( FALSE ) >= $endDate->mysqlDatetime( FALSE ) )
|
||||
)
|
||||
{
|
||||
$results[] = array( 'startDate' => new \IPS\calendar\Date( $dateOccurrence->mysqlDatetime( FALSE, TRUE ) ), 'endDate' => $eDate );
|
||||
$thisOccurrence = $dateOccurrence->getDateInformation( $dateOccurrence->getTimestamp() );
|
||||
$results[] = array( 'startDate' => \IPS\calendar\Date::getDate( $thisOccurrence['year'], $thisOccurrence['mon'], $thisOccurrence['mday'], $thisOccurrence['hours'], $thisOccurrence['minutes'], $thisOccurrence['seconds'] ), 'endDate' => $eDate );
|
||||
}
|
||||
|
||||
$eDate = ( $eDate !== NULL ) ? $eDate->adjust( "+{$recurringData['event_repeat_freq']} {$keyword}" ) : NULL;
|
||||
@@ -602,7 +604,8 @@ class _Event extends \IPS\Content\Item implements
|
||||
( $eDate !== NULL AND $date->mysqlDatetime( FALSE ) <= $startDate->mysqlDatetime( FALSE ) AND $eDate->mysqlDatetime( FALSE ) >= $endDate->mysqlDatetime( FALSE ) )
|
||||
)
|
||||
{
|
||||
$results[] = array( 'startDate' => new \IPS\calendar\Date( $dateOccurrence->mysqlDatetime( FALSE, TRUE ) ), 'endDate' => $eDate );
|
||||
$thisOccurrence = $dateOccurrence->getDateInformation( $dateOccurrence->getTimestamp() );
|
||||
$results[] = array( 'startDate' => \IPS\calendar\Date::getDate( $thisOccurrence['year'], $thisOccurrence['mon'], $thisOccurrence['mday'], $thisOccurrence['hours'], $thisOccurrence['minutes'], $thisOccurrence['seconds'] ), 'endDate' => $eDate );
|
||||
}
|
||||
|
||||
$eDate = ( $eDate !== NULL ) ? $eDate->adjust( "+{$recurringData['event_repeat_freq']} {$keyword}" ) : NULL;
|
||||
@@ -1132,9 +1135,9 @@ class _Event extends \IPS\Content\Item implements
|
||||
$val['start_time'] = str_replace( '.', ':', $val['start_time'] );
|
||||
}
|
||||
|
||||
if( isset( $val['no_end_time'] ) AND $val['no_end_time'] AND isset( $val['end_time'] ) )
|
||||
if ( isset( $val['no_end_time'] ) AND $val['no_end_time'] AND ( isset( $val['end_time'] ) OR isset( $val['end_date'] ) ) )
|
||||
{
|
||||
unset( $val['end_time'] );
|
||||
unset( $val['end_time'], $val['end_date'] );
|
||||
}
|
||||
|
||||
if( isset( $val['end_time'] ) )
|
||||
@@ -1152,7 +1155,7 @@ class _Event extends \IPS\Content\Item implements
|
||||
}
|
||||
|
||||
$end = null;
|
||||
|
||||
|
||||
if( isset( $val['end_date'] ) AND $val['end_date'] )
|
||||
{
|
||||
if( !isset( $val['single_day'] ) OR !$val['single_day'] )
|
||||
@@ -1169,7 +1172,7 @@ class _Event extends \IPS\Content\Item implements
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
elseif( isset( $val['end_time'] ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1214,6 +1217,38 @@ class _Event extends \IPS\Content\Item implements
|
||||
}
|
||||
}
|
||||
|
||||
/* Check we are not trying to recur in such a way that a new occurance starts before
|
||||
the last ends, which could cause timeouts if someone does something like sets an
|
||||
event to recur every day and span many days */
|
||||
if ( isset( $val['event_repeat'] ) and $val['event_repeat'] and $end )
|
||||
{
|
||||
$diff = intval( strtotime( $end ) ) - intval( strtotime( $start ) );
|
||||
|
||||
switch ( $val['event_repeats'] )
|
||||
{
|
||||
case 'daily':
|
||||
$maxDiff = intval( $val['event_repeat_freq'] ) * 86400;
|
||||
break;
|
||||
|
||||
case 'weekly':
|
||||
$maxDiff = intval( $val['event_repeat_freq'] ) * 86400 * 7;
|
||||
break;
|
||||
|
||||
case 'monthly':
|
||||
$maxDiff = intval( $val['event_repeat_freq'] ) * 86400 * 31;
|
||||
break;
|
||||
|
||||
case 'yearly':
|
||||
$maxDiff = intval( $val['event_repeat_freq'] ) * 86400 * 365;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( $diff > $maxDiff )
|
||||
{
|
||||
throw new \DomainException( "invalid_recurrence" );
|
||||
}
|
||||
}
|
||||
|
||||
}, NULL, NULL, 'event_dates' );
|
||||
|
||||
/* Init */
|
||||
@@ -1230,16 +1265,18 @@ class _Event extends \IPS\Content\Item implements
|
||||
|
||||
/* Get default elements */
|
||||
$return = array_merge( $return, parent::formElements( $item, $container ) );
|
||||
|
||||
|
||||
/* Event description */
|
||||
$return['description'] = new \IPS\Helpers\Form\Editor( 'event_content', $item ? $item->content : NULL, TRUE, array( 'app' => 'calendar', 'key' => 'Calendar', 'autoSaveKey' => 'calendar-event', 'attachIds' => ( $item === NULL ? NULL : array( $item->id, NULL, 'description' ) ) ) );
|
||||
$return['description'] = new \IPS\Helpers\Form\Editor( 'event_content', $item ? $item->content : NULL, TRUE, array( 'app' => 'calendar', 'key' => 'Calendar', 'autoSaveKey' => ( $item === NULL ) ? 'calendar-event' : "calendar-event-{$item->id}", 'attachIds' => ( $item === NULL ? NULL : array( $item->id, NULL, 'description' ) ) ) );
|
||||
|
||||
/* Cover photo and location */
|
||||
$return['header'] = new \IPS\Helpers\Form\Upload( 'event_cover_photo', ( $item AND $item->cover_photo ) ? \IPS\File::get( 'calendar_Events', $item->cover_photo ) : NULL, FALSE, array( 'image' => TRUE, 'storageExtension' => 'calendar_Events' ) );
|
||||
|
||||
if( \IPS\Settings::i()->calendar_venues_enabled )
|
||||
{
|
||||
$return['venue'] = new \IPS\Helpers\Form\Node( static::$formLangPrefix . 'venue', ( $item ) ? $item->venue ?: 0 : ( isset( \IPS\Request::i()->venue ) ? \IPS\Request::i()->venue : NULL ), FALSE, array(
|
||||
$roots = \IPS\calendar\Venue::roots();
|
||||
|
||||
$return['venue'] = new \IPS\Helpers\Form\Node( static::$formLangPrefix . 'venue', ( $item ) ? $item->venue ?: 0 : ( isset( \IPS\Request::i()->venue ) ? \IPS\Request::i()->venue : ( count( $roots ) ? NULL : 0 ) ), FALSE, array(
|
||||
'url' => \IPS\Http\Url::internal( 'app=calendar&module=calendar&controller=submit', 'front', 'calendar_submit' ),
|
||||
'class' => 'IPS\calendar\Venue',
|
||||
'zeroVal' => 'venues_not_listed',
|
||||
@@ -1355,7 +1392,7 @@ class _Event extends \IPS\Content\Item implements
|
||||
$this->end_date = \IPS\calendar\Date::createFromForm( $values['event_dates']['end_date'], ( ( !isset( $values['event_dates']['all_day'] ) OR !$values['event_dates']['all_day'] ) ? $values['event_dates']['end_time'] : NULL ), ( isset( $values['event_dates']['all_day'] ) AND $values['event_dates']['all_day'] ) ? 'UTC' : $values['event_dates']['event_timezone'] )->format( 'Y-m-d H:i' );
|
||||
}
|
||||
}
|
||||
else if( ( !isset( $values['event_dates']['all_day'] ) OR !$values['event_dates']['all_day'] ) AND $values['event_dates']['end_time'] != $values['event_dates']['start_time'] )
|
||||
else if( ( !isset( $values['event_dates']['all_day'] ) OR !$values['event_dates']['all_day'] ) AND isset( $values['event_dates']['end_time'] ) AND $values['event_dates']['end_time'] != $values['event_dates']['start_time'] )
|
||||
{
|
||||
$this->end_date = \IPS\calendar\Date::createFromForm( $values['event_dates']['start_date'], $values['event_dates']['end_time'], ( isset( $values['event_dates']['all_day'] ) AND $values['event_dates']['all_day'] ) ? 'UTC' : $values['event_dates']['event_timezone'] )->format( 'Y-m-d H:i' );
|
||||
}
|
||||
@@ -1679,20 +1716,20 @@ class _Event extends \IPS\Content\Item implements
|
||||
foreach( $events as $event )
|
||||
{
|
||||
/* Is this a ranged event? */
|
||||
if( $event->_end_date !== NULL AND $event->_start_date->mysqlDatetime( FALSE ) < $event->_end_date->mysqlDatetime( FALSE ) )
|
||||
if( $event->_end_date !== NULL AND $event->_start_date->mysqlDatetime( FALSE, TRUE ) < $event->_end_date->mysqlDatetime( FALSE, TRUE ) )
|
||||
{
|
||||
$date = $event->_start_date;
|
||||
while( $date->mysqlDatetime( FALSE ) < $event->_end_date->mysqlDatetime( FALSE ) )
|
||||
while( $date->mysqlDatetime( FALSE, TRUE ) < $event->_end_date->mysqlDatetime( FALSE, TRUE ) )
|
||||
{
|
||||
$formattedEvents[ $date->mysqlDatetime( FALSE ) ]['ranged'][ $event->id ] = $event;
|
||||
$date = $date->adjust( '+1 day' );
|
||||
}
|
||||
|
||||
$formattedEvents[ $event->_end_date->mysqlDatetime( FALSE ) ]['ranged'][ $event->id ] = $event;
|
||||
$formattedEvents[ $event->_end_date->mysqlDatetime( FALSE, TRUE ) ]['ranged'][ $event->id ] = $event;
|
||||
}
|
||||
else
|
||||
{
|
||||
$formattedEvents[ $event->_start_date->mysqlDatetime( FALSE ) ]['single'][ $event->id ] = $event;
|
||||
$formattedEvents[ $event->_start_date->mysqlDatetime( FALSE, TRUE ) ]['single'][ $event->id ] = $event;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1723,18 +1760,26 @@ class _Event extends \IPS\Content\Item implements
|
||||
if( $occurrence['endDate'] !== NULL )
|
||||
{
|
||||
$date = $occurrence['startDate'];
|
||||
$eDate = ( $thisEndDate->mysqlDatetime( FALSE ) < $occurrence['endDate']->mysqlDatetime( FALSE ) ) ? $thisEndDate : $occurrence['endDate'];
|
||||
while( $date->mysqlDatetime( FALSE ) < $eDate->mysqlDatetime( FALSE ) )
|
||||
{
|
||||
$formattedEvents[ $date->mysqlDatetime( FALSE ) ]['ranged'][ $event->id ] = $event;
|
||||
$date = $date->adjust( '+1 day' );
|
||||
}
|
||||
$eDate = ( $thisEndDate->mysqlDatetime( FALSE, TRUE ) < $occurrence['endDate']->mysqlDatetime( FALSE, TRUE ) ) ? $thisEndDate : $occurrence['endDate'];
|
||||
|
||||
$formattedEvents[ $occurrence['endDate']->mysqlDatetime( FALSE ) ]['ranged'][ $event->id ] = $event;
|
||||
if( $date->mysqlDatetime( FALSE, TRUE ) < $eDate->mysqlDatetime( FALSE, TRUE ) )
|
||||
{
|
||||
while( $date->mysqlDatetime( FALSE, TRUE ) < $eDate->mysqlDatetime( FALSE, TRUE ) )
|
||||
{
|
||||
$formattedEvents[ $date->mysqlDatetime( FALSE ) ]['ranged'][ $event->id ] = $event;
|
||||
$date = $date->adjust( '+1 day' );
|
||||
}
|
||||
|
||||
$formattedEvents[ $occurrence['endDate']->mysqlDatetime( FALSE, TRUE ) ]['ranged'][ $event->id ] = $event;
|
||||
}
|
||||
else
|
||||
{
|
||||
$formattedEvents[ $date->mysqlDatetime( FALSE, TRUE ) ]['single'][ $event->id ] = $event;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$formattedEvents[ $occurrence['startDate']->mysqlDatetime( FALSE ) ]['single'][ $event->id ] = $event;
|
||||
$formattedEvents[ $occurrence['startDate']->mysqlDatetime( FALSE, TRUE ) ]['single'][ $event->id ] = $event;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,11 +449,20 @@ class _ICSParser
|
||||
|
||||
/* Basics */
|
||||
$newEvent->title = ( isset( $event['summary'] ) AND $event['summary'] ) ? $event['summary'] : mb_substr( strip_tags( $event['description'] ), 0, 100 );
|
||||
$newEvent->content = ( isset( $event['description'] ) AND $event['description'] ) ? nl2br( $event['description'] ) : $event['summary'] . ( isset( $event['location'] ) ? '<br>' . $event['location'] : '' );
|
||||
$content = ( isset( $event['description'] ) AND $event['description'] ) ? nl2br( $event['description'] ) : $event['summary'] . ( isset( $event['location'] ) ? '<br>' . $event['location'] : '' );
|
||||
$newEvent->content = \IPS\Text\Parser::parseStatic( $content, TRUE, NULL, $this->member );
|
||||
$newEvent->sequence = ( isset( $event['sequence'] ) ? intval( $event['sequence'] ) : 0 );
|
||||
|
||||
/* Times and dates */
|
||||
$newEvent->lastupdated = ( isset( $event['last_modified'] ) AND $event['last_modified'] AND $event['last_modified'] < time() ) ? $event['last_modified'] : ( ( isset( $event['created'] ) AND $event['created'] AND $event['created'] < time() ) ? $event['created'] : time() );
|
||||
if( isset( $event['last_modified'] ) AND $event['last_modified'] AND $event['last_modified'] < time() )
|
||||
{
|
||||
$newEvent->lastupdated = $event['last_modified'];
|
||||
}
|
||||
elseif( !$eventId )
|
||||
{
|
||||
$newEvent->lastupdated = ( isset( $event['created'] ) AND $event['created'] AND $event['created'] < time() ) ? $event['created'] : time();
|
||||
}
|
||||
|
||||
$newEvent->all_day = $event_all_day;
|
||||
$newEvent->recurring = ( isset( $event['recurr'] ) ) ? $event['recurr'] : NULL;
|
||||
$newEvent->start_date = $event_unix_from->setTimezone( new \DateTimeZone( 'UTC' ) )->format( 'Y-m-d H:i:s' );
|
||||
@@ -462,11 +471,27 @@ class _ICSParser
|
||||
/* Geolocation? */
|
||||
if( isset( $event['geo'] ) AND is_array( $event['geo'] ) AND count( $event['geo'] ) )
|
||||
{
|
||||
try
|
||||
/* If we are updating an event, don't pull geo data if we already have it and it hasn't changed */
|
||||
$update = TRUE;
|
||||
|
||||
if( $newEvent->location )
|
||||
{
|
||||
$newEvent->location = json_encode( \IPS\GeoLocation::getByLatLong( $event['geo']['lat'], $event['geo']['long'] ) );
|
||||
$existingLocation = json_decode( $newEvent->location, true );
|
||||
|
||||
if( isset( $existingLocation['lat'] ) AND $existingLocation['lat'] == $event['geo']['lat'] AND isset( $existingLocation['long'] ) AND $existingLocation['long'] == $event['geo']['long'] )
|
||||
{
|
||||
$update = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if( $update === TRUE )
|
||||
{
|
||||
try
|
||||
{
|
||||
$newEvent->location = json_encode( \IPS\GeoLocation::getByLatLong( $event['geo']['lat'], $event['geo']['long'] ) );
|
||||
}
|
||||
catch( \BadFunctionCallException $e ){}
|
||||
}
|
||||
catch( \BadFunctionCallException $e ){}
|
||||
}
|
||||
elseif( isset( $event['location'] ) )
|
||||
{
|
||||
@@ -474,10 +499,9 @@ class _ICSParser
|
||||
{
|
||||
$location = new \IPS\GeoLocation;
|
||||
$location->addressLines = array( $event['location'] );
|
||||
$location->getLatLong();
|
||||
$location->getLatLong( TRUE );
|
||||
|
||||
/* We get by LatLong because getLatLong() does not populate the other address data. */
|
||||
$newEvent->location = json_encode( \IPS\GeoLocation::getByLatLong( $location->lat, $location->long ) );
|
||||
$newEvent->location = json_encode( $location );
|
||||
}
|
||||
catch( \BadFunctionCallException $e ){}
|
||||
}
|
||||
|
||||
@@ -190,6 +190,7 @@ class _Venue extends \IPS\Node\Model
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
\IPS\Lang::deleteCustom( 'calendar', 'calendar_venue_' . $this->id );
|
||||
\IPS\Lang::deleteCustom( 'calendar', 'calendar_venue_' . $this->id . '_desc' );
|
||||
|
||||
return parent::delete();
|
||||
|
||||
@@ -49,11 +49,11 @@ class _icalendar extends \IPS\Task
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
throw new \IPS\Task\Exception( $this, \IPS\Member::loggedIn()->language()->addToStack( 'task_' . $e->getMessage(), FALSE, array( 'sprintf' => array( $next['feed_title'] ) ) ) );
|
||||
throw new \IPS\Task\Exception( $this, array( 'task_' . $e->getMessage(), $next['feed_title'] ) );
|
||||
}
|
||||
|
||||
/* Task log */
|
||||
return \IPS\Member::loggedIn()->language()->addToStack( 'acplog__icalfeed_refreshed', FALSE, array( 'sprintf' => array( $count['imported'], $count['skipped'] ) ) );
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
|
||||
@@ -38,6 +38,25 @@ class _todaysBirthdays extends \IPS\Widget
|
||||
*/
|
||||
public $plugin = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param String $uniqueKey Unique key for this specific instance
|
||||
* @param array $configuration Widget custom configuration
|
||||
* @param null|string|array $access Array/JSON string of executable apps (core=sidebar only, content=IP.Content only, etc)
|
||||
* @param null|string $orientation Orientation (top, bottom, right, left)
|
||||
* @param boolean $allowReuse If true, when the block is used, it will remain in the sidebar so it can be used again.
|
||||
* @param string $menuStyle Menu is a drop down menu, modal is a bigger modal panel.
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( $uniqueKey, array $configuration, $access=null, $orientation=null )
|
||||
{
|
||||
parent::__construct( $uniqueKey, $configuration, $access, $orientation );
|
||||
|
||||
/* We need to adjust for timezone too */
|
||||
$this->cacheKey = "widget_{$this->key}_" . $this->uniqueKey . '_' . md5( json_encode( $configuration ) . "_" . \IPS\Member::loggedIn()->language()->id . "_" . \IPS\Member::loggedIn()->skin . "_" . json_encode( \IPS\Member::loggedIn()->groups ) . "_" . $orientation . \IPS\Member::loggedIn()->timezone );
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify widget configuration
|
||||
*
|
||||
|
||||
@@ -135,11 +135,11 @@ class _reviews extends \IPS\Content\Api\CommentController
|
||||
$class = 'IPS\cms\Records\Review' . $database->id;
|
||||
if ( $this->member )
|
||||
{
|
||||
$object = $class::loadAndCheckPerms( $id, $this->member );
|
||||
$object = $class::loadAndCheckPerms( $review, $this->member );
|
||||
}
|
||||
else
|
||||
{
|
||||
$object = $class::load( $id );
|
||||
$object = $class::load( $review );
|
||||
}
|
||||
|
||||
return new \IPS\Api\Response( 200, $object->apiOutput( $this->member ) );
|
||||
|
||||
@@ -588,7 +588,7 @@
|
||||
<li><a href='{$comment->url('report')}' data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report"}" data-action='reportComment' title='{lang="report_content"}'><span class='ipsResponsive_showPhone ipsResponsive_inline'><i class='fa fa-flag'></i></span><span class='ipsResponsive_hidePhone ipsResponsive_inline'>{lang="report_reply"}</span></a></li>
|
||||
{{endif}}
|
||||
|
||||
{{if \IPS\Member::loggedIn()->modPermission('can_use_ip_tools') and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'modcp' ) )}}
|
||||
{{if $comment->ip_address and \IPS\Member::loggedIn()->modPermission('can_use_ip_tools') and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'modcp' ) )}}
|
||||
<li><span class='ipsResponsive_hidePhone ipsType_blendLinks'>(<a href="{url="app=core&module=modcp&controller=modcp&tab=ip_tools&ip=$comment->ip_address" seoTemplate="modcp_ip_tools"}">{lang="ip_prefix" sprintf="$comment->ip_address"}</a>) </span></li>
|
||||
{{endif}}
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 11,
|
||||
"length": 20,
|
||||
"name": "member_id",
|
||||
"type": "INT",
|
||||
"type": "BIGINT",
|
||||
"unsigned": false,
|
||||
"values": [
|
||||
|
||||
@@ -697,9 +697,9 @@
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"length": 20,
|
||||
"name": "record_edit_member_id",
|
||||
"type": "INT",
|
||||
"type": "BIGINT",
|
||||
"unsigned": true,
|
||||
"values": [
|
||||
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
{
|
||||
"Database": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Data\\Store\\Database"
|
||||
},
|
||||
"Topic": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\forums\\Topic"
|
||||
},
|
||||
"Widget": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Widget"
|
||||
},
|
||||
"Post": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\forums\\Topic\\Post"
|
||||
},
|
||||
"Url": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Http\\Url"
|
||||
},
|
||||
"InternalUrl": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Http\\Url\\Internal"
|
||||
},
|
||||
"FriendlyUrl": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Http\\Url\\Friendly"
|
||||
},
|
||||
"Lang": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Lang"
|
||||
},
|
||||
"Output": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Output"
|
||||
},
|
||||
"Database": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Data\\Store\\Database"
|
||||
},
|
||||
"Widget": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Widget"
|
||||
},
|
||||
"Lang": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Lang"
|
||||
},
|
||||
"topics": {
|
||||
"type": "S",
|
||||
"class": "\\IPS\\Theme\\class_forums_front_topics"
|
||||
},
|
||||
"Post": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\forums\\Topic\\Post"
|
||||
},
|
||||
"Parser": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Text\\Parser"
|
||||
},
|
||||
"Url": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Http\\Url"
|
||||
},
|
||||
"forums": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\forums\\modules\\admin\\forums\\forums"
|
||||
},
|
||||
"InternalUrl": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Http\\Url\\Internal"
|
||||
},
|
||||
"Forum": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\forums\\Forum"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="cms">
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="103005" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="103038" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -142,7 +142,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="103005" javascript_position="1000150">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="103038" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -187,7 +187,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="103005" javascript_position="1000150">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="103038" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -250,7 +250,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="103005" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="103038" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -385,7 +385,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="103005" javascript_position="1000200">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="103038" javascript_position="1000200">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -422,7 +422,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="103005" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="103038" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -730,11 +730,12 @@
|
||||
}
|
||||
|
||||
var itemId = this._getSelected().closest('[data-role="mediaItem"]').attr('data-fileid');
|
||||
|
||||
|
||||
$( e.currentTarget ).ipsDialog( {
|
||||
remoteSubmit: true,
|
||||
forceReload: true,
|
||||
url: $( e.currentTarget ).attr('data-baseUrl') + itemId,
|
||||
destructOnClose : true,
|
||||
title: ips.getString('replaceMediaFile')
|
||||
});
|
||||
},
|
||||
@@ -1060,7 +1061,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="103005" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="103038" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1106,7 +1107,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="103005" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="103038" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1199,7 +1200,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="103005" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="103038" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1311,7 +1312,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="103005" javascript_position="1000100">/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="103038" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1366,7 +1367,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="103005" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="103038" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1416,7 +1417,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="103005" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="103038" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1488,7 +1489,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="103005" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="103038" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2354,7 +2355,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="103005" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="103038" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2696,7 +2697,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="103005" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="103038" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2737,7 +2738,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="103005" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="103038" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2775,7 +2776,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="mixins" javascript_name="ips.cms.builder.area.js" javascript_type="mixins" javascript_version="103005" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="mixins" javascript_name="ips.cms.builder.area.js" javascript_type="mixins" javascript_version="103038" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2844,7 +2845,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="mixins" javascript_name="ips.cms.builder.block.js" javascript_type="mixins" javascript_version="103005" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="mixins" javascript_name="ips.cms.builder.block.js" javascript_type="mixins" javascript_version="103038" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2952,7 +2953,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="103005" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="103038" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
|
||||
<ul class='ipsGrid' data-ipsGrid data-ipsGrid-minItemSize='100' data-ipsGrid-maxItemSize='200'>\
|
||||
{{{contents}}}\
|
||||
</ul>\
|
||||
@@ -2969,7 +2970,7 @@ ips.templates.set( 'templates.media.noSearchResults', "\
|
||||
{{#lang}}mediaNoResults{{/lang}}\
|
||||
</div>\
|
||||
");]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="103005" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="103038" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
|
||||
/* TEMPLATECEPTION */
|
||||
ips.templates.set('templates.editor.newTab', " \
|
||||
<li data-fileid='{{fileid}}' data-location='{{location}}'>\
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="cms" version="103005">
|
||||
<app key="cms" version="103038">
|
||||
<word key="__app_cms" js="0">Pages</word>
|
||||
<word key="menutab__cms" js="0">Pages</word>
|
||||
<word key="menutab__cms_icon" js="0">files-o</word>
|
||||
@@ -174,7 +174,7 @@
|
||||
<word key="cms_db_relational_with_name_disabled" js="0">Cannot use database '%s' as this database is not assigned to a page</word>
|
||||
<word key="cms_block_form_display" js="0">Templates</word>
|
||||
<word key="block_key" js="0">Template Key</word>
|
||||
<word key="block_key_desc" js="0"><![CDATA[<p class='ipsMessage ipsMessage_info'>The block key ('my_block_key') can be used in HTML templates and manual pages to fetch a specific block, for instance: <span class='ipsType_monospace'>{block="my_block_key"}</span></p><br>The key must be unique for this database. If omitted, a key will be automatically generated.]]></word>
|
||||
<word key="block_key_desc" js="0"><![CDATA[<p class='ipsMessage ipsMessage_info'>The block key ('my_block_key') can be used in HTML templates and manual pages to fetch a specific block, for instance: <span class='ipsType_monospace'>{block="my_block_key"}</span></p><br>The key must be unique for this block. If omitted, a key will be automatically generated.]]></word>
|
||||
<word key="cms_block_key_not_unique" js="0">The block key is not unique</word>
|
||||
<word key="block_cache" js="0">Cache this block</word>
|
||||
<word key="block_cache_desc" js="0">If your block contains dynamic elements, such as member data, database counts, etc, you will need to prevent this block from being cached.</word>
|
||||
@@ -229,9 +229,11 @@
|
||||
<word key="template_group_new_desc" js="0">Please use only a-z and 0-9 without any special characters or spaces. The group name must start with a letter or underscore.</word>
|
||||
<word key="template_title_desc" js="0">Please use only a-z and 0-9 without any special characters or spaces. The title must start with a letter or underscore.</word>
|
||||
<word key="template_reserved_word" js="0">The template name may not be any of the following: %s</word>
|
||||
<word key="cms_theme_designer_mode_warning" js="0"><![CDATA[Theme editing is currently unavailabe in the ACP as you have designers' mode enabled.<br /><a href='%s'>Switch off designers' mode.</a>]]></word>
|
||||
<word key="cms_theme_designer_mode_warning" js="0"><![CDATA[Theme editing is currently unavailable in the ACP as you have designers' mode enabled.<br /><a href='%s'>Switch off designers' mode.</a>]]></word>
|
||||
<word key="cms_media_designer_mode_warning" js="0"><![CDATA[Media editing is currently unavailable in the ACP as you have designers' mode enabled.<br /><a href='%s'>Switch off designers' mode.</a>]]></word>
|
||||
<word key="cms_templates_export_title" js="0">Download Templates</word>
|
||||
<word key="cms_templates_export_description" js="0">Select the templates to export from the list below. These templates will be added to a single XML file that can be imported to other Invision Community communities.</word>
|
||||
<word key="cms_templates_export_return" js="0">Return to the template editor</word>
|
||||
<word key="templates_block" js="0">Blocks</word>
|
||||
<word key="templates_database" js="0">Database</word>
|
||||
<word key="templates_page" js="0">Pages</word>
|
||||
@@ -288,7 +290,7 @@
|
||||
<word key="cms_err_db_does_not_exist" js="0">That database does not exist.</word>
|
||||
<word key="cms_err_db_in_use_other_page" js="0">The database added is being used by another page.</word>
|
||||
<word key="content_acp_page_builder_msg_new" js="0">You can edit this page's content by visiting the page once it has been created.</word>
|
||||
<word key="content_acp_page_builder_msg_edit" js="0"><![CDATA[You can edit this page's content by visiting the <a href='%s' target='_blank'>page.</a>]]></word>
|
||||
<word key="content_acp_page_builder_msg_edit" js="0"><![CDATA[You can edit this page's content by visiting the <a href='%s' target='_blank' rel='noopener'>page.</a>]]></word>
|
||||
<word key="content_launch_page_builder" js="0">Open page builder</word>
|
||||
<word key="content_launch_page_view" js="0">View page</word>
|
||||
<word key="page_theme" js="0">Theme</word>
|
||||
@@ -312,12 +314,12 @@
|
||||
<word key="cms_page_error_bad_syntax" js="0">The syntax of tags or HTML logic is badly formatted.</word>
|
||||
<word key="cms_pages_settings" js="0">Advanced Settings</word>
|
||||
<word key="cms_use_different_gateway" js="0">Use a gateway under your suite root?</word>
|
||||
<word key="cms_use_different_gateway_desc" js="0"><![CDATA[You can enable this if you have your suite installed in a sub directory but want Pages to appear as your website root. <a href='{external.devdocs-pages_different_root}' target='_blank'>More information</a>]]></word>
|
||||
<word key="cms_use_different_gateway_desc" js="0"><![CDATA[You can enable this if you have your suite installed in a sub directory but want Pages to appear as your website root. <a href='{external.devdocs-pages_different_root}' target='_blank' rel='noopener'>More information</a>]]></word>
|
||||
<word key="cms_root_page_url" js="0">URL to gateway file</word>
|
||||
<word key="pages_gateway_url_not_exist" js="0">The URL could not be found.</word>
|
||||
<word key="cms_pages_different_gateway_impossible" js="0">Your Invision Community suite is already installed at the root of your domain.</word>
|
||||
<word key="pages_different_gateway_load_error" js="0">Could not load Pages in this location. Have you uploaded the 'index.php' file?</word>
|
||||
<word key="pages_different_gateway_load_error_rewrite" js="0"><![CDATA[Could not load Pages in this location. Have you uploaded the 'index.php' file and installed the .htaccess file? <a href='{external.devdocs-pages_different_root}' target='_blank'>More information</a>]]></word>
|
||||
<word key="pages_different_gateway_load_error_rewrite" js="0"><![CDATA[Could not load Pages in this location. Have you uploaded the 'index.php' file and installed the .htaccess file? <a href='{external.devdocs-pages_different_root}' target='_blank' rel='noopener'>More information</a>]]></word>
|
||||
<word key="cms_root_page_url_rewrite_desc" js="0"><![CDATA[In order to support this you must <a href='{internal.app=cms&module=pages&controller=pages&do=htaccess}'><strong><u>download this file</u></strong></a>, rename it to '.htaccess' (with no file extension) and upload it to the same location as the special 'index.php' for Pages. If there is already a .htaccess file, add the contents of this one to the existing.<br>If you are not sure how to do this, contact technical support for assistance.]]></word>
|
||||
<word key="cms_tag_blocks" js="0">Blocks</word>
|
||||
<word key="cms_tag_databases" js="0">Databases</word>
|
||||
@@ -640,6 +642,7 @@
|
||||
<word key="database_field__approved" js="0">Approved</word>
|
||||
<word key="database_field__comments" js="0">Comments</word>
|
||||
<word key="database_field__locked" js="0">Locked</word>
|
||||
<word key="database_field__last_comment" js="0">Last Comment Date</word>
|
||||
<word key="database_sort_asc" js="0">Ascending (0-9)</word>
|
||||
<word key="database_sort_desc" js="0">Descending (9-0)</word>
|
||||
<word key="content_database_form_options_forums" js="0">Forums</word>
|
||||
@@ -800,6 +803,7 @@
|
||||
<word key="content_locked_records" js="0">Locked</word>
|
||||
<word key="content_locked_record" js="0">This record is locked</word>
|
||||
<word key="content_record_last_comment" js="0">Last comment date</word>
|
||||
<word key="sort_record_updated" js="0">Last Updated</word>
|
||||
<word key="content_record_comments" js="0">Number of comments</word>
|
||||
<word key="content_record_views" js="0">Number of views</word>
|
||||
<word key="content_record_title" js="0">Title</word>
|
||||
|
||||
@@ -1706,9 +1706,9 @@
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 11,
|
||||
"length": 20,
|
||||
"name": "comment_user",
|
||||
"type": "INT",
|
||||
"type": "BIGINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
@@ -3313,9 +3313,9 @@
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"length": 20,
|
||||
"name": "review_author",
|
||||
"type": "INT",
|
||||
"type": "BIGINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
</div>]]></template>
|
||||
<template template_group="databases" template_name="manageDatabaseName" template_data="$database, $row, $page" template_location="admin" template_app="cms"><![CDATA[<strong>{$database->_title}</strong>
|
||||
{{if $page}}
|
||||
<a class="ipsPos_right ipsBadge ipsBadge_style1" href="{$page->url()}" target="_blank">{lang="cms_db_used_on_page" sprintf="$page->_title"}</a>
|
||||
<a class="ipsPos_right ipsBadge ipsBadge_style1" href="{$page->url()}" target="_blank" rel="noopener">{lang="cms_db_used_on_page" sprintf="$page->_title"}</a>
|
||||
{{endif}}
|
||||
<p class='ipsType_light'>{$database->_description}</p>]]></template>
|
||||
<template template_group="databases" template_name="rebuildCommentCounts" template_data="$id" template_location="admin" template_app="cms"><![CDATA[
|
||||
@@ -991,7 +991,7 @@
|
||||
{{$categories = $catClass::roots();}}
|
||||
{{if !empty( $categories )}}
|
||||
<h3 class='ipsWidget_title ipsType_reset'>{lang="categories"}</h3>
|
||||
<div class='ipsSideMenu ipsAreaBackground_reset ipsPad_half'>
|
||||
<div class='ipsSideMenu ipsCategoriesMenu ipsAreaBackground_reset ipsPad_half'>
|
||||
<ul class='ipsSideMenu_list'>
|
||||
{{foreach $categories as $category}}
|
||||
<li>
|
||||
|
||||
@@ -253,9 +253,43 @@
|
||||
"102046": "4.2.7",
|
||||
"102047": "4.2.8",
|
||||
"102048": "4.2.8",
|
||||
"102049": "4.2.9",
|
||||
"103000": "4.3.0 Beta 1",
|
||||
"103002": "4.3.0 Beta 2",
|
||||
"103003": "4.3.0 Beta 3",
|
||||
"103004": "4.3.0 Beta 4",
|
||||
"103005": "4.3.0"
|
||||
"103005": "4.3.0",
|
||||
"103006": "4.3.1",
|
||||
"103007": "4.3.1",
|
||||
"103008": "4.3.1",
|
||||
"103009": "4.3.2",
|
||||
"103010": "4.3.2",
|
||||
"103011": "4.3.3",
|
||||
"103012": "4.3.3",
|
||||
"103013": "4.3.3",
|
||||
"103014": "4.3.3",
|
||||
"103015": "4.3.3",
|
||||
"103016": "4.3.3",
|
||||
"103017": "4.3.3",
|
||||
"103018": "4.3.3",
|
||||
"103019": "4.3.3",
|
||||
"103020": "4.3.3",
|
||||
"103021": "4.3.4",
|
||||
"103022": "4.3.4",
|
||||
"103023": "4.3.4",
|
||||
"103024": "4.3.4",
|
||||
"103025": "4.3.4",
|
||||
"103026": "4.3.5 Beta 1",
|
||||
"103027": "4.3.5 Beta 2",
|
||||
"103028": "4.3.5",
|
||||
"103029": "4.3.5",
|
||||
"103030": "4.3.5",
|
||||
"103031": "4.3.5",
|
||||
"103032": "4.3.5",
|
||||
"103033": "4.3.6 Beta 1",
|
||||
"103034": "4.3.6 Beta 2",
|
||||
"103035": "4.3.6",
|
||||
"103036": "4.3.6",
|
||||
"103037": "4.3.6",
|
||||
"103038": "4.3.6"
|
||||
}
|
||||
@@ -11,10 +11,7 @@
|
||||
},
|
||||
"Wysiwyg": {
|
||||
"class": "\\IPS\\Widget\\StaticCache",
|
||||
"restrict": [
|
||||
"sidebar",
|
||||
"cms"
|
||||
],
|
||||
"restrict": [],
|
||||
"default_area": "",
|
||||
"allow_reuse": true,
|
||||
"menu_style": "modal",
|
||||
|
||||
@@ -35,7 +35,7 @@ class _Records
|
||||
foreach( \IPS\cms\Databases::databases() as $database )
|
||||
{
|
||||
$theOnlyCategory = NULL;
|
||||
if ( $database->page_id > 0 and $database->can('add') )
|
||||
if ( $database->page_id > 0 and $database->can('view') and $database->can('add') )
|
||||
{
|
||||
$catClass = '\IPS\cms\Categories' . $database->id;
|
||||
if ( $catClass::canOnAny('add') )
|
||||
@@ -47,13 +47,13 @@ class _Records
|
||||
if( $database->use_categories AND $theOnlyCategory = $catClass::theOnlyNode() )
|
||||
{
|
||||
$items[ 'cms_create_menu_records_' . $database->id ] = array(
|
||||
'link' => $theOnlyCategory->url()->setQueryString('do', 'form')
|
||||
'link' => $theOnlyCategory->url()->setQueryString( array( 'do' => 'form', 'd' => $database->id ) )
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
$items[ 'cms_create_menu_records_' . $database->id ] = array(
|
||||
'link' => $page->url()->setQueryString('do', 'form'),
|
||||
'link' => $page->url()->setQueryString( array( 'do' => 'form', 'd' => $database->id ) ),
|
||||
'extraData' => ( $database->use_categories ) ? array( 'data-ipsDialog' => true, 'data-ipsDialog-size' => "narrow" ) : array(),
|
||||
'title' => 'cms_select_category'
|
||||
);
|
||||
|
||||
@@ -48,14 +48,15 @@ class _BlockContent
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly=FALSE )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -59,14 +59,15 @@ class _Records
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly=FALSE )
|
||||
{
|
||||
if ( ! $id3 )
|
||||
{
|
||||
|
||||
@@ -48,14 +48,15 @@ class _Widgets
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly=FALSE )
|
||||
{
|
||||
if ( ! $id3 )
|
||||
{
|
||||
|
||||
@@ -12,24 +12,15 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
/**
|
||||
* Front Navigation Extension: Pages
|
||||
*/
|
||||
class _Cms extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
class _Cms
|
||||
{
|
||||
/**
|
||||
* Get Title
|
||||
* @deprecated
|
||||
*
|
||||
* @return string
|
||||
* @return bool
|
||||
*/
|
||||
public function title()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Link
|
||||
*
|
||||
* @return \IPS\Http\Url
|
||||
*/
|
||||
public function link()
|
||||
final public function deprecated()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,7 @@ class _RebuildCategories
|
||||
{
|
||||
$cat = $class::constructFromData( $row );
|
||||
$cat->setLastComment();
|
||||
$cat->setLastReview();
|
||||
$cat->save();
|
||||
|
||||
$parsed++;
|
||||
|
||||
@@ -84,7 +84,15 @@ class _ResyncTopicContent
|
||||
$class = '\IPS\cms\Records' . $data['databaseId'];
|
||||
$where = NULL;
|
||||
$parsed = 0;
|
||||
$database = \IPS\cms\Databases::load( $data['databaseId'] );
|
||||
try
|
||||
{
|
||||
$database = \IPS\cms\Databases::load( $data['databaseId'] );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Task\Queue\OutOfRangeException;
|
||||
}
|
||||
|
||||
if ( ! $database->forum_record )
|
||||
{
|
||||
$cats = iterator_to_array( \IPS\Db::i()->select( 'category_id', 'cms_database_categories', array( 'category_forum_record=1 AND category_database_id=?', $data['databaseId'] ) ) );
|
||||
|
||||
@@ -43,6 +43,24 @@ class _Databases
|
||||
'sitemap_databases_priority' => new \IPS\Helpers\Form\Select( 'sitemap_databases_priority', \IPS\Settings::i()->sitemap_databases_priority, FALSE, array( 'options' => \IPS\Sitemap::$priorities, 'unlimited' => '-1', 'unlimitedLang' => 'sitemap_dont_include' ), NULL, NULL, NULL, 'sitemap_databases_priority' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save settings for ACP configuration
|
||||
*
|
||||
* @param array $values Values
|
||||
* @return void
|
||||
*/
|
||||
public function saveSettings( $values )
|
||||
{
|
||||
if ( $values['sitemap_configuration_info'] )
|
||||
{
|
||||
\IPS\Settings::i()->changeValues( array( 'sitemap_databases_count' => $this->recommendedSettings['sitemap_databases_count'], 'sitemap_databases_priority' => $this->recommendedSettings['sitemap_databases_priority'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Settings::i()->changeValues( array( 'sitemap_databases_count' => $values['sitemap_databases_count'], 'sitemap_databases_priority' => $values['sitemap_databases_priority'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the sitemap filename(s)
|
||||
@@ -115,6 +133,12 @@ class _Databases
|
||||
*/
|
||||
public function generateSitemap( $filename, $sitemap )
|
||||
{
|
||||
/* We have elected to not add databases to the sitemap */
|
||||
if ( ! \IPS\Settings::i()->sitemap_databases_count )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
$tmp = explode( '_', $filename );
|
||||
$databaseId = intval( array_shift( $tmp ) );
|
||||
$database = \IPS\cms\Databases::load( $databaseId );
|
||||
@@ -165,7 +189,14 @@ class _Databases
|
||||
$totalLimit = \IPS\Settings::i()->sitemap_databases_count;
|
||||
if ( $totalLimit > -1 and ( $offset + $limit ) > $totalLimit )
|
||||
{
|
||||
$limit = $totalLimit - $offset;
|
||||
if ( $totalLimit < $limit )
|
||||
{
|
||||
$limit = $totalLimit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$limit = $totalLimit - $offset;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $class::getItemsWithPermission( $class::sitemapWhere(), NULL, array( $offset, $limit ), 'read', \IPS\Content\Hideable::FILTER_PUBLIC_ONLY, 0, new \IPS\Member, TRUE ) as $item )
|
||||
|
||||
@@ -43,6 +43,24 @@ class _Pages
|
||||
'sitemap_pages_priority' => new \IPS\Helpers\Form\Select( 'sitemap_pages_priority', \IPS\Settings::i()->sitemap_pages_priority, FALSE, array( 'options' => \IPS\Sitemap::$priorities, 'unlimited' => '-1', 'unlimitedLang' => 'sitemap_dont_include' ), NULL, NULL, NULL, 'sitemap_pages_priority' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save settings for ACP configuration
|
||||
*
|
||||
* @param array $values Values
|
||||
* @return void
|
||||
*/
|
||||
public function saveSettings( $values )
|
||||
{
|
||||
if ( $values['sitemap_configuration_info'] )
|
||||
{
|
||||
\IPS\Settings::i()->changeValues( array( 'sitemap_pages_count' => $this->recommendedSettings['sitemap_pages_count'], 'sitemap_pages_priority' => $this->recommendedSettings['sitemap_pages_priority'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Settings::i()->changeValues( array( 'sitemap_pages_count' => $values['sitemap_pages_count'], 'sitemap_pages_priority' => $values['sitemap_pages_priority'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the sitemap filename(s)
|
||||
@@ -82,6 +100,12 @@ class _Pages
|
||||
*/
|
||||
public function generateSitemap( $filename, $sitemap )
|
||||
{
|
||||
/* We have elected to not add databases to the sitemap */
|
||||
if ( ! \IPS\Settings::i()->sitemap_pages_count )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
$class = '\IPS\cms\Pages\Page';
|
||||
$count = 0;
|
||||
$member = new \IPS\Member;
|
||||
@@ -97,7 +121,14 @@ class _Pages
|
||||
$totalLimit = \IPS\Settings::i()->sitemap_pages_count;
|
||||
if ( $totalLimit > -1 and ( $offset + $limit ) > $totalLimit )
|
||||
{
|
||||
$limit = $totalLimit - $offset;
|
||||
if ( $totalLimit < $limit )
|
||||
{
|
||||
$limit = $totalLimit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$limit = $totalLimit - $offset;
|
||||
}
|
||||
}
|
||||
|
||||
$where = array( array( '(' . \IPS\Db::i()->findInSet( 'perm_' . $class::$permissionMap[ $permissionCheck ], $member->groups ) . ' OR ' . 'perm_' . $class::$permissionMap[ $permissionCheck ] . '=? )', '*' ) );
|
||||
|
||||
@@ -8,6 +8,32 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
class cms_hook_Topic extends _HOOK_CLASS_
|
||||
{
|
||||
/**
|
||||
* Can view?
|
||||
*
|
||||
* @param \IPS\Member|NULL $member The member to check for or NULL for the currently logged in member
|
||||
* @return bool
|
||||
*/
|
||||
public function canView( $member=NULL )
|
||||
{
|
||||
$canView = parent::canView( $member );
|
||||
$member = $member ? $member : \IPS\Member::loggedIn();
|
||||
|
||||
/* Whitelist which types of do we allow */
|
||||
$do = array( 'editComment' );
|
||||
|
||||
if ( ! $canView )
|
||||
{
|
||||
/* Check to see if it's attached to a database record and we are not a guest */
|
||||
if ( isset( \IPS\Request::i()->do ) and in_array( \IPS\Request::i()->do, $do ) and $record = \IPS\cms\Records::getLinkedRecord( $this ) and $member->member_id )
|
||||
{
|
||||
return $record->canView();
|
||||
}
|
||||
}
|
||||
|
||||
return $canView;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do Moderator Action
|
||||
*
|
||||
|
||||
@@ -22,6 +22,16 @@ public static function hookData() {
|
||||
<li class=\'ipsMenu_item\'>
|
||||
<a href=\'{url="app=cms&module=database&controller=topic&id=$topic->tid&_new=1" base="front" seoTemplate="topic_copy" seoTitle="$topic->title_seo"}\' data-ipsDialog data-ipsDialog-size=\'narrow\' data-ipsDialog-remoteVerify=\'false\' data-ipsDialog-title=\'{lang="copy_select_database"}\'>{lang="copy_topic_to_database"}</a>
|
||||
</li>
|
||||
{{endif}}',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'selector' => '#elTopicActionsBottom_menu',
|
||||
'type' => 'add_inside_start',
|
||||
'content' => '{{if $topic->hidden() != -2 and \IPS\Member::loggedIn()->modPermission( \'can_copy_topic_database\' )}}
|
||||
<li class=\'ipsMenu_item\'>
|
||||
<a href=\'{url="app=cms&module=database&controller=topic&id=$topic->tid&_new=1" base="front" seoTemplate="topic_copy" seoTitle="$topic->title_seo"}\' data-ipsDialog data-ipsDialog-size=\'narrow\' data-ipsDialog-remoteVerify=\'false\' data-ipsDialog-title=\'{lang="copy_select_database"}\'>{lang="copy_topic_to_database"}</a>
|
||||
</li>
|
||||
{{endif}}',
|
||||
),
|
||||
),
|
||||
|
||||
@@ -27,7 +27,16 @@ if ( \IPS\Theme::designersModeEnabled() )
|
||||
|
||||
if ( isset( \IPS\Request::i()->file ) )
|
||||
{
|
||||
$file = file_get_contents( \IPS\ROOT_PATH . '/' . \IPS\Request::i()->file );
|
||||
$realPath = realpath( \IPS\ROOT_PATH . '/themes/' . \IPS\Request::i()->file );
|
||||
$pathContainer = realpath(\IPS\ROOT_PATH . '/themes/' );
|
||||
|
||||
if( $realPath === FALSE OR mb_substr( $realPath, 0, mb_strlen( $pathContainer ) ) !== $pathContainer )
|
||||
{
|
||||
\IPS\Output::i()->error( 'node_error', '3C171/8', 403, '' );
|
||||
exit;
|
||||
}
|
||||
|
||||
$file = file_get_contents( \IPS\ROOT_PATH . '/themes/' . \IPS\Request::i()->file );
|
||||
|
||||
\IPS\Output::i()->sendOutput( preg_replace( '#<ips:template.+?\n#', '', $file ), 200, ( mb_substr( \IPS\Request::i()->file, -4 ) === '.css' ) ? 'text/css' : 'text/javascript' );
|
||||
}
|
||||
@@ -35,6 +35,12 @@ class _categories extends \IPS\Node\Controller
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
/* This controller can not be accessed without a database ID */
|
||||
if( !\IPS\Request::i()->database_id )
|
||||
{
|
||||
\IPS\Output::i()->error( 'node_error', '2S390/1', 404, '' );
|
||||
}
|
||||
|
||||
$this->url = $this->url->setQueryString( array( 'database_id' => \IPS\Request::i()->database_id ) );
|
||||
|
||||
/* Assign the correct nodeClass so contentItem is specified */
|
||||
|
||||
@@ -1593,11 +1593,12 @@ class _databases extends \IPS\Node\Controller
|
||||
), NULL, NULL, NULL, 'database_cat_index_type' ) );
|
||||
|
||||
$fields = array(
|
||||
'primary_id_field' => 'database_field__id',
|
||||
'member_id' => 'database_field__member',
|
||||
'record_publish_date' => 'database_field__saved',
|
||||
'record_last_comment' => ( $current and $current->_comment_bump === \IPS\cms\Databases::BUMP_ON_EDIT ) ? 'database_field__edited' : 'database_field__updated',
|
||||
'record_rating' => 'database_field__rating'
|
||||
'primary_id_field' => 'database_field__id',
|
||||
'member_id' => 'database_field__member',
|
||||
'record_publish_date' => 'database_field__saved',
|
||||
'record_updated' => ( $current and $current->_comment_bump === \IPS\cms\Databases::BUMP_ON_EDIT ) ? 'database_field__edited' : 'database_field__updated',
|
||||
'record_last_comment' => "database_field__last_comment",
|
||||
'record_rating' => 'database_field__rating'
|
||||
);
|
||||
|
||||
if ( $current )
|
||||
|
||||
@@ -351,14 +351,14 @@ class _records extends \IPS\Dispatcher\Controller
|
||||
$fieldsClass = 'IPS\cms\Fields' . \IPS\Request::i()->database_id;
|
||||
$catClass = 'IPS\cms\Categories' . \IPS\Request::i()->database_id;
|
||||
$container = ( $current ) ? $catClass::load( $current->category_id ) : ( isset( \IPS\Request::i()->category_id ) ? $catClass::load( \IPS\Request::i()->category_id ) : NULL );
|
||||
$customFields = $fieldsClass::fields( $customValues, 'view', $container, 0, $current );
|
||||
$manuallyHandledFields = array( 'record_publish_date', 'record_expiry_date', 'record_allow_comments', 'record_comment_cutoff', 'record_meta_keywords', 'record_meta_description' );
|
||||
|
||||
$form = new \IPS\Helpers\Form();
|
||||
|
||||
$form->addTab( 'content_database_record_tab_content' );
|
||||
|
||||
$formElements = $class::formElements( $current, $container );
|
||||
$formElements = $class::formElements( $current, $container );
|
||||
$customFields = $class::$customFields;
|
||||
|
||||
foreach( $formElements as $name => $field )
|
||||
{
|
||||
@@ -457,13 +457,15 @@ class _records extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
|
||||
$current = $recordClass::createFromForm( $values, $category );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Claim attachments */
|
||||
foreach( $fieldClass::data() as $key => $field )
|
||||
{
|
||||
if ( mb_ucfirst( $field->type ) === 'Editor' )
|
||||
{
|
||||
\IPS\File::claimAttachments( 'RecordField_'. $field->id , $current->id, NULL, 'RecordField_'. $field->id, FALSE );
|
||||
\IPS\File::claimAttachments( 'RecordField_' . ( $new ? 'new' : $current->primary_id_field ) . '_' . $field->id , $current->primary_id_field, $field->id, \IPS\Request::i()->database_id );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,92 +107,100 @@ class _media extends \IPS\Node\Controller
|
||||
*/
|
||||
protected function manage()
|
||||
{
|
||||
$url = \IPS\Http\Url::internal( "app=cms&module=pages&controller=media" );
|
||||
|
||||
/* Display the table */
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__cms_pages_media');
|
||||
$output = new \IPS\Helpers\Tree\Tree( $url, 'menu__cms_pages_media',
|
||||
/* Get Roots */
|
||||
function () use ( $url )
|
||||
{
|
||||
$data = \IPS\cms\modules\admin\pages\media::getRowsForTree( 0 );
|
||||
$rows = array();
|
||||
|
||||
foreach ( $data as $id => $row )
|
||||
{
|
||||
if( ( \IPS\Request::i()->isAjax() && $row instanceof \IPS\cms\Media ) || !\IPS\Request::i()->isAjax() )
|
||||
{
|
||||
$rows[ $id ] = ( $row instanceof \IPS\cms\Media) ? \IPS\cms\modules\admin\pages\media::getItemRow( $row, $url ) : \IPS\cms\modules\admin\pages\media::getFolderRow( $row, $url );
|
||||
}
|
||||
}
|
||||
|
||||
if( \IPS\Request::i()->isAjax() ){
|
||||
\IPS\Output::i()->sendOutput( json_encode( $rows ), 200, 'application/json', \IPS\Output::i()->httpHeaders );
|
||||
}
|
||||
|
||||
return $data;
|
||||
},
|
||||
/* Get Row */
|
||||
function ( $id, $root ) use ( $url )
|
||||
{
|
||||
if ( $root )
|
||||
{
|
||||
return \IPS\cms\modules\admin\pages\media::getFolderRow( \IPS\cms\Media\Folder::load( $id ), $url );
|
||||
}
|
||||
else
|
||||
{
|
||||
return \IPS\cms\modules\admin\pages\media::getItemRow( \IPS\cms\Media::load( $id ), $url );
|
||||
}
|
||||
},
|
||||
/* Get Row Parent ID*/
|
||||
function ()
|
||||
{
|
||||
return NULL;
|
||||
},
|
||||
/* Get Children */
|
||||
function ( $id ) use ( $url )
|
||||
{
|
||||
$rows = array();
|
||||
$data = \IPS\cms\modules\admin\pages\media::getRowsForTree( $id );
|
||||
|
||||
if ( ! isset( \IPS\Request::i()->subnode ) )
|
||||
{
|
||||
foreach ( $data as $id => $row )
|
||||
{
|
||||
if( \IPS\Request::i()->get == 'folders' && !( $row instanceof \IPS\cms\Media ) )
|
||||
{
|
||||
$rows[ $id ] = \IPS\cms\modules\admin\pages\media::getFolderRow( $row, $url );
|
||||
}
|
||||
elseif ( \IPS\Request::i()->get == 'files' && $row instanceof \IPS\cms\Media )
|
||||
{
|
||||
$rows[ $id ] = \IPS\cms\modules\admin\pages\media::getItemRow( $row, $url );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if( \IPS\Request::i()->isAjax() ){
|
||||
\IPS\Output::i()->sendOutput( json_encode( $rows ), 200, 'application/json', \IPS\Output::i()->httpHeaders );
|
||||
}
|
||||
|
||||
return $rows;
|
||||
},
|
||||
array( $this, '_getRootButtons' ),
|
||||
TRUE,
|
||||
FALSE,
|
||||
FALSE
|
||||
);
|
||||
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'admin_media.js', 'cms' ) );
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'media/media.css', 'cms', 'admin' ) );
|
||||
|
||||
if( \IPS\Request::i()->isAjax() )
|
||||
if ( \IPS\Theme::designersModeEnabled() )
|
||||
{
|
||||
\IPS\Output::i()->sendOutput( $output, 200, 'text/html', \IPS\Output::i()->httpHeaders );
|
||||
$link = \IPS\Http\Url::internal( 'app=core&module=customization&controller=themes&do=designersmode' );
|
||||
\IPS\Output::i()->output .= \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->message( \IPS\Member::loggedIn()->language()->addToStack('cms_media_designer_mode_warning', NULL, array( 'sprintf' => array( $link ) ) ), 'information', NULL, FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'media', 'cms', 'admin' )->media( $output );
|
||||
$url = \IPS\Http\Url::internal( "app=cms&module=pages&controller=media" );
|
||||
|
||||
/* Display the table */
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__cms_pages_media');
|
||||
$output = new \IPS\Helpers\Tree\Tree( $url, 'menu__cms_pages_media',
|
||||
/* Get Roots */
|
||||
function () use ( $url )
|
||||
{
|
||||
$data = \IPS\cms\modules\admin\pages\media::getRowsForTree( 0 );
|
||||
$rows = array();
|
||||
|
||||
foreach ( $data as $id => $row )
|
||||
{
|
||||
if( ( \IPS\Request::i()->isAjax() && $row instanceof \IPS\cms\Media ) || !\IPS\Request::i()->isAjax() )
|
||||
{
|
||||
$rows[ $id ] = ( $row instanceof \IPS\cms\Media) ? \IPS\cms\modules\admin\pages\media::getItemRow( $row, $url ) : \IPS\cms\modules\admin\pages\media::getFolderRow( $row, $url );
|
||||
}
|
||||
}
|
||||
|
||||
if( \IPS\Request::i()->isAjax() ){
|
||||
\IPS\Output::i()->sendOutput( json_encode( $rows ), 200, 'application/json', \IPS\Output::i()->httpHeaders );
|
||||
}
|
||||
|
||||
return $data;
|
||||
},
|
||||
/* Get Row */
|
||||
function ( $id, $root ) use ( $url )
|
||||
{
|
||||
if ( $root )
|
||||
{
|
||||
return \IPS\cms\modules\admin\pages\media::getFolderRow( \IPS\cms\Media\Folder::load( $id ), $url );
|
||||
}
|
||||
else
|
||||
{
|
||||
return \IPS\cms\modules\admin\pages\media::getItemRow( \IPS\cms\Media::load( $id ), $url );
|
||||
}
|
||||
},
|
||||
/* Get Row Parent ID*/
|
||||
function ()
|
||||
{
|
||||
return NULL;
|
||||
},
|
||||
/* Get Children */
|
||||
function ( $id ) use ( $url )
|
||||
{
|
||||
$rows = array();
|
||||
$data = \IPS\cms\modules\admin\pages\media::getRowsForTree( $id );
|
||||
|
||||
if ( ! isset( \IPS\Request::i()->subnode ) )
|
||||
{
|
||||
foreach ( $data as $id => $row )
|
||||
{
|
||||
if( \IPS\Request::i()->get == 'folders' && !( $row instanceof \IPS\cms\Media ) )
|
||||
{
|
||||
$rows[ $id ] = \IPS\cms\modules\admin\pages\media::getFolderRow( $row, $url );
|
||||
}
|
||||
elseif ( \IPS\Request::i()->get == 'files' && $row instanceof \IPS\cms\Media )
|
||||
{
|
||||
$rows[ $id ] = \IPS\cms\modules\admin\pages\media::getItemRow( $row, $url );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if( \IPS\Request::i()->isAjax() ){
|
||||
\IPS\Output::i()->sendOutput( json_encode( $rows ), 200, 'application/json', \IPS\Output::i()->httpHeaders );
|
||||
}
|
||||
|
||||
return $rows;
|
||||
},
|
||||
array( $this, '_getRootButtons' ),
|
||||
TRUE,
|
||||
FALSE,
|
||||
FALSE
|
||||
);
|
||||
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'admin_media.js', 'cms' ) );
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'media/media.css', 'cms', 'admin' ) );
|
||||
|
||||
if( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
\IPS\Output::i()->sendOutput( $output, 200, 'text/html', \IPS\Output::i()->httpHeaders );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'media', 'cms', 'admin' )->media( $output );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +228,7 @@ class _media extends \IPS\Node\Controller
|
||||
$form = new \IPS\Helpers\Form( 'form', 'upload' );
|
||||
$form->class = 'ipsForm_vertical ipsForm_noLabels';
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Upload( 'media_filename', NULL, FALSE, array( 'allowedFileTypes' => array_merge( \IPS\File::$safeFileExtensions, array( 'pdf' ) ), 'obscure' => FALSE, 'maxFileSize' => 5, 'storageExtension' => 'core_Theme', 'storageContainer' => 'pages_media', 'multiple' => FALSE, 'minimize' => FALSE ), NULL, NULL, NULL, 'media_filename' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Upload( 'media_filename', NULL, FALSE, array( 'allowedFileTypes' => array_merge( \IPS\File::$safeFileExtensions, array( 'pdf' ) ), 'obscure' => FALSE, 'maxFileSize' => 5, 'storageExtension' => 'cms_Media', 'storageContainer' => 'pages_media', 'multiple' => FALSE, 'minimize' => FALSE ), NULL, NULL, NULL, 'media_filename' ) );
|
||||
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
@@ -250,7 +258,11 @@ class _media extends \IPS\Node\Controller
|
||||
$values['media_filename']->delete();
|
||||
}
|
||||
catch( \Exception $ex ) { }
|
||||
|
||||
|
||||
/* Wipe out included JS just in case we're using this media thing */
|
||||
\IPS\cms\Templates::deleteCompiledFiles();
|
||||
\IPS\cms\Pages\Page::deleteCachedIncludes();
|
||||
|
||||
if ( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
$url = \IPS\Http\Url::internal( "app=cms&module=pages&controller=media" );
|
||||
@@ -286,7 +298,7 @@ class _media extends \IPS\Node\Controller
|
||||
$form = new \IPS\Helpers\Form( 'form', 'upload' );
|
||||
$form->class = 'ipsForm_vertical ipsForm_noLabels';
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Upload( 'media_filename', NULL, FALSE, array( 'allowedFileTypes' => array_merge( \IPS\File::$safeFileExtensions, array( 'pdf', 'svg' ) ), 'obscure' => FALSE, 'maxFileSize' => 5, 'storageExtension' => 'core_Theme', 'storageContainer' => 'pages_media', 'multiple' => true, 'minimize' => FALSE ), NULL, NULL, NULL, 'media_filename' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Upload( 'media_filename', NULL, FALSE, array( 'allowedFileTypes' => array_merge( \IPS\File::$safeFileExtensions, array( 'pdf', 'svg' ) ), 'obscure' => FALSE, 'maxFileSize' => 5, 'storageExtension' => 'cms_Media', 'storageContainer' => 'pages_media', 'multiple' => true, 'minimize' => FALSE ), NULL, NULL, NULL, 'media_filename' ) );
|
||||
|
||||
if ( ! isset( \IPS\Request::i()->media_parent ) and ! \IPS\Request::i()->media_parent )
|
||||
{
|
||||
@@ -350,6 +362,10 @@ class _media extends \IPS\Node\Controller
|
||||
$count++;
|
||||
}
|
||||
|
||||
/* Wipe out included JS just in case we're using this media thing */
|
||||
\IPS\cms\Templates::deleteCompiledFiles();
|
||||
\IPS\cms\Pages\Page::deleteCachedIncludes();
|
||||
|
||||
if ( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
$url = \IPS\Http\Url::internal( "app=cms&module=pages&controller=media" );
|
||||
|
||||
@@ -214,6 +214,7 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'templates_' . $location, FALSE, FALSE, array( 'options' => $data ) ) );
|
||||
}
|
||||
$form->addButton( 'cms_templates_export_return', 'link', \IPS\Http\Url::internal( "app=cms&module=pages&controller=templates" ) );
|
||||
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
@@ -331,7 +332,10 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
\IPS\Output::i()->error( 'cms_no_templates_selected', '1T285/1', 403, '' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
\IPS\Output::i()->breadcrumb[] = array( \IPS\Http\Url::internal( "app=cms&module=pages&controller=templates" ), \IPS\Member::loggedIn()->language()->addToStack( 'menu__cms_pages_templates' ) );
|
||||
\IPS\Output::i()->breadcrumb[] = array( NULL, \IPS\Member::loggedIn()->language()->addToStack('cms_templates_export_title') );
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('cms_templates_export_title');
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core', 'admin' )->block( 'cms_templates_export_title', $form, FALSE );
|
||||
}
|
||||
|
||||
@@ -435,7 +439,6 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
'icon' => 'download',
|
||||
'title' => 'cms_templates_export_title',
|
||||
'link' => \IPS\Http\Url::internal( "app=cms&module=pages&controller=templates&do=export" ),
|
||||
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('cms_templates_export_title') )
|
||||
);
|
||||
|
||||
\IPS\Output::i()->sidebar['actions']['upload'] = array(
|
||||
@@ -956,16 +959,64 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
|
||||
foreach( \IPS\cms\Templates::$databaseDefaults as $field => $template )
|
||||
{
|
||||
\IPS\Db::i()->update( 'cms_databases', array( 'database_template_' . $field => $new ), array( 'database_template_' . $field . ' =?', \IPS\Request::i()->group ) );
|
||||
\IPS\Db::i()->update( 'cms_databases', array( 'database_template_' . $field => mb_strtolower( $new ) ), array( 'database_template_' . $field . ' =?', \IPS\Request::i()->group ) );
|
||||
}
|
||||
|
||||
unset( \IPS\Data\Store::i()->cms_databases );
|
||||
|
||||
$this->findAndUpdateTemplates( $new, \IPS\Request::i()->group );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=cms&module=pages&controller=templates' . ( isset( \IPS\Request::i()->t_location ) ? '&t_location=' . \IPS\Request::i()->t_location : '' ) ), 'deleted' );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=cms&module=pages&controller=templates' . ( isset( \IPS\Request::i()->t_location ) ? '&t_location=' . \IPS\Request::i()->t_location : '' ) ), 'saved' );
|
||||
}
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core' )->block( \IPS\Member::loggedIn()->language()->addToStack('cms_template_database_options'), $form, FALSE, '', NULL, TRUE );
|
||||
}
|
||||
|
||||
/**
|
||||
* Find templates referencing a template and update them
|
||||
*
|
||||
* @param string $new New template group name
|
||||
* @param string $old Old template group name
|
||||
* @return void
|
||||
*/
|
||||
protected function findAndUpdateTemplates( $new, $old )
|
||||
{
|
||||
foreach( \IPS\Db::i()->select( '*', 'cms_templates', array( 'template_content LIKE ?', '%' . $old . '%' ) ) as $template )
|
||||
{
|
||||
/* Make sure template tags call the correct group */
|
||||
if ( mb_stristr( $template['template_content'], '{template' ) )
|
||||
{
|
||||
preg_match_all( '/\{([a-z]+?=([\'"]).+?\\2 ?+)}/', $template['template_content'], $matches, PREG_SET_ORDER );
|
||||
|
||||
/* Work out the plugin and the values to pass */
|
||||
foreach( $matches as $index => $array )
|
||||
{
|
||||
preg_match_all( '/(.+?)=' . $array[ 2 ] . '(.+?)' . $array[ 2 ] . '\s?/', $array[ 1 ], $submatches );
|
||||
|
||||
$plugin = array_shift( $submatches[ 1 ] );
|
||||
if ( $plugin == 'template' )
|
||||
{
|
||||
$value = array_shift( $submatches[ 2 ] );
|
||||
$options = array();
|
||||
|
||||
foreach ( $submatches[ 1 ] as $k => $v )
|
||||
{
|
||||
$options[ $v ] = $submatches[ 2 ][ $k ];
|
||||
}
|
||||
|
||||
if ( isset( $options['app'] ) and $options['app'] == 'cms' and isset( $options['location'] ) and $options['location'] == 'database' and isset( $options['group'] ) and $options['group'] == mb_strtolower( $old ) )
|
||||
{
|
||||
$replace = '{template="' . $value . '" app="' . $options['app'] . '" location="' . $options['location'] . '" group="' . mb_strtolower( $new ) . '" params="' . ( isset( $options['params'] ) ? $options['params'] : NULL ) . '"}';
|
||||
|
||||
\IPS\Db::i()->update( 'cms_templates', array( 'template_content' => str_replace( $matches[$index][0], $replace, $template['template_content'] ) ), array( 'template_id=?', $template['template_id'] ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the template group! OH NOES
|
||||
|
||||
@@ -184,16 +184,16 @@ class _category extends \IPS\cms\Databases\Controller
|
||||
$sortFields[ $database->field_title ] = $fieldClass::load( $database->field_title );
|
||||
foreach( $sortFields as $id => $obj )
|
||||
{
|
||||
if ( $table->sortBy == 'field_' . $id )
|
||||
if ( $table->sortBy == $RecordsClass::$databaseTable . '.' . 'field_' . $id OR $table->sortBy == 'field_' . $id )
|
||||
{
|
||||
if ( $obj->type == 'Number' )
|
||||
{
|
||||
$table->sortBy = 'LENGTH(`field_' . $id . '`) ' . $table->sortDirection . ',`field_' . $id . '`';
|
||||
$table->sortOptions[ $table->sortBy ] = 'LENGTH(`field_' . $id . '`) ' . $table->sortDirection . ',`field_' . $id . '`';
|
||||
break;
|
||||
}
|
||||
elseif( $obj->type == 'Date' )
|
||||
{
|
||||
$table->sortBy = 'CAST(`field_' . $id . '` AS UNSIGNED)';
|
||||
$table->sortOptions[ $table->sortBy ] = 'CAST(`field_' . $id . '` AS UNSIGNED)';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -231,7 +231,7 @@ class _category extends \IPS\cms\Databases\Controller
|
||||
}
|
||||
|
||||
$sortBy = array(
|
||||
'record_last_comment' => 'content_record_last_comment',
|
||||
'record_updated' => 'content_record_last_updated',
|
||||
'record_comments' => 'content_record_comments',
|
||||
'record_views' => 'content_record_views',
|
||||
'field_' . $database->field_title => 'content_record_title',
|
||||
@@ -241,6 +241,9 @@ class _category extends \IPS\cms\Databases\Controller
|
||||
/* Ensure we have all sort options available */
|
||||
$table->sortOptions = array_unique( array_merge( $table->sortOptions, array_combine( array_keys( $sortBy ), array_keys( $sortBy ) ) ) );
|
||||
|
||||
/* To avoid confusion, label 'updated' as 'Recently Updated' as last comment */
|
||||
\IPS\Member::loggedIn()->language()->words[ $table->langPrefix . 'sort_updated' ] = \IPS\Member::loggedIn()->language()->addToStack('content_record_last_comment');
|
||||
|
||||
if ( !isset( $sortBy[ $database->field_sort ] ) )
|
||||
{
|
||||
switch ( $database->field_sort )
|
||||
@@ -325,7 +328,18 @@ class _category extends \IPS\cms\Databases\Controller
|
||||
$table->advancedSearch['sort_by'][1]['options']['field_' . $obj->id ] = 'content_field_' . $obj->id;
|
||||
}
|
||||
|
||||
$table->sortOptions[ 'field_' . $obj->id ] = isset( $table->sortOptions[ 'field_' . $obj->id ] ) ? $table->sortOptions[ 'field_' . $obj->id ] : 'field_' . $obj->id;
|
||||
if ( in_array( $obj->type, array( 'Date', 'DateRange' ) ) )
|
||||
{
|
||||
$table->sortOptions[ 'field_' . $obj->id ] = 'CAST(`field_' . $obj->id . '` AS UNSIGNED)';
|
||||
}
|
||||
else if ( $obj->type == 'Number' )
|
||||
{
|
||||
$table->sortOptions[ 'field_' . $obj->id ] = 'LENGTH(`field_' . $obj->id . '`) ' . $table->sortDirection . ',`field_' . $obj->id . '`';
|
||||
}
|
||||
else
|
||||
{
|
||||
$table->sortOptions[ 'field_' . $obj->id ] = isset( $table->sortOptions[ 'field_' . $obj->id ] ) ? $table->sortOptions[ 'field_' . $obj->id ] : 'field_' . $obj->id;
|
||||
}
|
||||
}
|
||||
|
||||
$table->advancedSearchCallback = function( $table, $values ) use ( $database, $sortBy, $customFields )
|
||||
@@ -414,17 +428,18 @@ class _category extends \IPS\cms\Databases\Controller
|
||||
{
|
||||
if ( isset( $customFields[ mb_substr( $values['sort_by'], 6 ) ] ) and $customFields[ mb_substr( $values['sort_by'], 6 ) ]->type == 'Number' )
|
||||
{
|
||||
$table->sortBy = 'LENGTH(`' . $values['sort_by'] . '`) ' . $table->sortDirection . ',`' . $values['sort_by'] . '`';
|
||||
$table->sortOptions[ $values['sort_by'] ] = 'LENGTH(`' . $values['sort_by'] . '`) ' . $table->sortDirection . ',`' . $values['sort_by'] . '`';
|
||||
}
|
||||
elseif( isset( $customFields[ mb_substr( $values['sort_by'], 6 ) ] ) and $customFields[ mb_substr( $values['sort_by'], 6 ) ]->type == 'Date' )
|
||||
{
|
||||
$table->sortBy = 'CAST(`' . $values['sort_by'] . '` AS UNSIGNED)';
|
||||
$table->sortOptions[ $values['sort_by'] ] = 'CAST(`' . $values['sort_by'] . '` AS UNSIGNED)';
|
||||
}
|
||||
else
|
||||
{
|
||||
$table->sortBy = $values['sort_by'];
|
||||
$table->sortOptions[ $values['sort_by'] ] = $values['sort_by'];
|
||||
}
|
||||
|
||||
|
||||
$table->sortBy = $values['sort_by'];
|
||||
$table->sortDirection = $values['sort_direction'];
|
||||
}
|
||||
|
||||
|
||||
@@ -163,10 +163,29 @@ class _index extends \IPS\cms\Databases\Controller
|
||||
*/
|
||||
protected function form()
|
||||
{
|
||||
/* If the page is the default page and Pages is the default app, the node selector cannot find the page as it bypasses the Database dispatcher */
|
||||
if ( \IPS\cms\Pages\Page::$currentPage === NULL and \IPS\cms\Databases\Dispatcher::i()->databaseId === NULL and isset( \IPS\Request::i()->page_id ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\cms\Pages\Page::$currentPage = \IPS\cms\Pages\Page::load( \IPS\Request::i()->page_id );
|
||||
$database = \IPS\cms\Pages\Page::$currentPage->getDatabase();
|
||||
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'content_err_page_404', '2T389/1', 404, '' );
|
||||
}
|
||||
}
|
||||
else if ( \IPS\cms\Pages\Page::$currentPage === NULL and \IPS\cms\Databases\Dispatcher::i()->databaseId === NULL and isset( \IPS\Request::i()->d ) )
|
||||
{
|
||||
\IPS\cms\Pages\Page::$currentPage = \IPS\cms\Pages\Page::loadByDatabaseId( \IPS\Request::i()->d );
|
||||
}
|
||||
|
||||
$form = new \IPS\Helpers\Form( 'select_category', 'continue' );
|
||||
$form->class = 'ipsForm_vertical ipsForm_noLabels';
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'category', NULL, TRUE, array(
|
||||
'url' => \IPS\cms\Pages\Page::$currentPage->url()->setQueryString('do', 'form'),
|
||||
'url' => \IPS\cms\Pages\Page::$currentPage->url()->setQueryString( array( 'do' => 'form', 'page_id' => \IPS\cms\Pages\Page::$currentPage->id ) ),
|
||||
'class' => 'IPS\cms\Categories' . \IPS\cms\Databases\Dispatcher::i()->databaseId,
|
||||
'permissionCheck' => function( $node )
|
||||
{
|
||||
|
||||
@@ -262,17 +262,17 @@ class _record extends \IPS\Content\Controller
|
||||
\IPS\Output::i()->jsonLd['article']['aggregateRating'] = array(
|
||||
'@type' => 'AggregateRating',
|
||||
'ratingValue' => $record->averageReviewRating(),
|
||||
'ratingCount' => $record->rating_hits,
|
||||
'reviewCount' => $record->record_reviews,
|
||||
'bestRating' => \IPS\Settings::i()->reviews_rating_out_of
|
||||
);
|
||||
}
|
||||
elseif( $record->container()->allow_rating )
|
||||
elseif( $record->container()->allow_rating AND $record->averageRating() AND $record->numberOfRatings() )
|
||||
{
|
||||
\IPS\Output::i()->jsonLd['article']['aggregateRating'] = array(
|
||||
'@type' => 'AggregateRating',
|
||||
'ratingValue' => $record->averageRating(),
|
||||
'ratingCount' => $record->numberOfRatings(),
|
||||
'bestRating' => \IPS\Settings::i()->reviews_rating_out_of
|
||||
);
|
||||
}
|
||||
|
||||
@@ -605,10 +605,21 @@ class _record extends \IPS\Content\Controller
|
||||
|
||||
$title = \IPS\Member::loggedIn()->language()->addToStack( 'content_record_form_edit_record', FALSE, array( 'sprintf' => array( $record->_title ) ) );
|
||||
$formElements = $recordClass::formElements( $record, $category );
|
||||
|
||||
if ( \IPS\Request::i()->id AND ! $record->canEdit() )
|
||||
|
||||
// We check if the form has been submitted to prevent the user loosing their content
|
||||
if ( isset( \IPS\Request::i()->form_submitted ) )
|
||||
{
|
||||
\IPS\Output::i()->error( 'module_no_permission', '2T252/D', 403, '' );
|
||||
if ( ! $record->couldEdit() )
|
||||
{
|
||||
\IPS\Output::i()->error( 'module_no_permission', '2T252/G', 403, '' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! $record->canEdit() )
|
||||
{
|
||||
\IPS\Output::i()->error( 'module_no_permission', '2T252/D', 403, '' );
|
||||
}
|
||||
}
|
||||
|
||||
$form = new \IPS\Helpers\Form( 'form', isset( \IPS\Member::loggedIn()->language()->words[ $recordClass::$formLangPrefix . '_save' ] ) ? $recordClass::$formLangPrefix . '_save' : 'save' );
|
||||
|
||||
@@ -356,7 +356,7 @@ class _builder extends \IPS\core\modules\front\system\widgets
|
||||
*
|
||||
* @param string $uniqueId The unique key of the widget (eg: wzsj1233)
|
||||
* @param array $widgets Current widgets (eg from core_widget_areas.widgets (json decoded))
|
||||
* @return boolen True if something removed, false if not
|
||||
* @return bool True if something removed, false if not
|
||||
*/
|
||||
protected function _checkAndDeleteFromCoreWidgets( $uniqueId, $widgets )
|
||||
{
|
||||
|
||||
@@ -397,7 +397,7 @@ class _Upgrade
|
||||
|
||||
if ( $field['field_type'] == 'checkbox' and count( $json ) )
|
||||
{
|
||||
$field['field_type'] = 'CheckboxSet';
|
||||
$save['field_type'] = 'CheckboxSet';
|
||||
}
|
||||
}
|
||||
else if ( $field['field_type'] == 'upload' )
|
||||
|
||||
@@ -818,7 +818,7 @@ EOF;
|
||||
}
|
||||
else
|
||||
{
|
||||
$theValue[] = $eachValue;
|
||||
$theValue[ $eachKey ] = $eachValue;
|
||||
}
|
||||
}
|
||||
$v = $theValue;
|
||||
|
||||
@@ -159,9 +159,9 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
protected static $loadedCatsFromPath = array();
|
||||
|
||||
/**
|
||||
* @brief [Records] Database object
|
||||
* @brief [Records] Database objects
|
||||
*/
|
||||
protected static $database = NULL;
|
||||
protected static $database = array();
|
||||
|
||||
/**
|
||||
* @brief Latest posted record
|
||||
@@ -223,12 +223,12 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
*/
|
||||
public static function database()
|
||||
{
|
||||
if ( static::$database === NULL )
|
||||
if ( !isset( static::$database[ static::$customDatabaseId ] ) )
|
||||
{
|
||||
static::$database = \IPS\cms\Databases::load( static::$customDatabaseId );
|
||||
static::$database[ static::$customDatabaseId ] = \IPS\cms\Databases::load( static::$customDatabaseId );
|
||||
}
|
||||
|
||||
return static::$database;
|
||||
return static::$database[ static::$customDatabaseId ];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -793,6 +793,20 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
return parent::canDelete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Changed Columns
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
if ( !$this->_new AND isset( $this->changed['can_view_others'] ) )
|
||||
{
|
||||
$this->updateSearchIndexPermissions();
|
||||
}
|
||||
parent::save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete
|
||||
*
|
||||
@@ -1002,13 +1016,13 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
/**
|
||||
* Get URL
|
||||
*
|
||||
* @return \IPS\Http\Url
|
||||
* @return \IPS\Http\Url|NULL
|
||||
*/
|
||||
public function url()
|
||||
{
|
||||
if( $this->_url === NULL )
|
||||
{
|
||||
if ( \IPS\cms\Pages\Page::$currentPage and static::database()->page_id == \IPS\cms\Pages\Page::$currentPage->id )
|
||||
if ( \IPS\cms\Pages\Page::$currentPage and \IPS\cms\Databases::load( $this->database_id )->page_id == \IPS\cms\Pages\Page::$currentPage->id )
|
||||
{
|
||||
$pagePath = \IPS\cms\Pages\Page::$currentPage->full_path;
|
||||
}
|
||||
|
||||
@@ -812,10 +812,7 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
parent::save();
|
||||
|
||||
/* Clear cache */
|
||||
if ( isset( \IPS\Data\Store::i()->cms_databases ) )
|
||||
{
|
||||
unset( \IPS\Data\Store::i()->cms_databases );
|
||||
}
|
||||
unset( \IPS\Data\Store::i()->cms_databases );
|
||||
|
||||
/* If this database isn't searchable, make sure its content is not in the search index */
|
||||
if( $removeSearchIndex )
|
||||
@@ -860,11 +857,6 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
{
|
||||
$field->delete( TRUE );
|
||||
}
|
||||
|
||||
if ( isset( \IPS\Data\Store::i()->cms_databases ) )
|
||||
{
|
||||
unset( \IPS\Data\Store::i()->cms_databases );
|
||||
}
|
||||
|
||||
/* Delete comments */
|
||||
\IPS\Db::i()->delete( 'cms_database_comments', array( 'comment_database_id=?', $this->id ) );
|
||||
@@ -926,17 +918,18 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
\IPS\Lang::deleteCustom( 'cms', "cms_records" . $this->id . '_pl' );
|
||||
\IPS\Lang::deleteCustom( 'cms', "module__cms_records" . $this->id );
|
||||
|
||||
/* Unclaim attachments */
|
||||
/* Unclaim attachments */
|
||||
\IPS\File::unclaimAttachments( 'cms_Records', NULL, NULL, $this->id );
|
||||
\IPS\File::unclaimAttachments( 'cms_Records' . $this->id );
|
||||
|
||||
/* Remove widgets */
|
||||
$this->removeWidgets();
|
||||
|
||||
/* Best remove the stored data */
|
||||
unset( \IPS\Data\Store::i()->database_reciprocal_links );
|
||||
|
||||
|
||||
/* Delete the database record */
|
||||
parent::delete();
|
||||
|
||||
/* Best remove the stored data */
|
||||
unset( \IPS\Data\Store::i()->database_reciprocal_links, \IPS\Data\Store::i()->cms_databases );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -983,10 +976,7 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
parent::setPermissions( $insert, $matrix );
|
||||
|
||||
/* Clear cache */
|
||||
if ( isset( \IPS\Data\Store::i()->cms_databases ) )
|
||||
{
|
||||
unset( \IPS\Data\Store::i()->cms_databases );
|
||||
}
|
||||
unset( \IPS\Data\Store::i()->cms_databases );
|
||||
|
||||
/* Clone these permissions to all categories that do not have permissions */
|
||||
$class = '\IPS\cms\Categories' . $this->id;
|
||||
|
||||
@@ -400,17 +400,7 @@ class _Fields extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
{
|
||||
$customValidationCode = function( $val ) use ( $database, $row, $record )
|
||||
{
|
||||
$where = array( array( 'field_' . $row->id . '=?', $val ) );
|
||||
|
||||
if ( $record !== NULL )
|
||||
{
|
||||
$where[] = array( 'primary_id_field != ?', $record->_id );
|
||||
}
|
||||
|
||||
if ( \IPS\Db::i()->select( 'COUNT(*)', 'cms_custom_database_' . $database->id, $where )->first() )
|
||||
{
|
||||
throw new \LogicException( \IPS\Member::loggedIn()->language()->addToStack( "field_unique_entry_not_unique", FALSE, array( 'sprintf' => array( $database->recordWord( 1 ) ) ) ) );
|
||||
}
|
||||
call_user_func_array( 'IPS\cms\Fields' . static::$customDatabaseId . '::validateUnique', array( $val, $row, $record ) );
|
||||
};
|
||||
}
|
||||
|
||||
@@ -996,6 +986,32 @@ class _Fields extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if this value is unique
|
||||
* Used in custom validation for fomr helpers
|
||||
*
|
||||
* @param string $val The value to check
|
||||
* @param \IPS\cms\Fields $field The field
|
||||
* @param \IPS\cms\Records $record The record (if any)
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public static function validateUnique( $val, $field, $record )
|
||||
{
|
||||
$database = \IPS\cms\Databases::load( static::$customDatabaseId );
|
||||
|
||||
$where = array( array( 'field_' . $field->id . '=?', $val ) );
|
||||
|
||||
if ( $record !== NULL )
|
||||
{
|
||||
$where[] = array( 'primary_id_field != ?', $record->_id );
|
||||
}
|
||||
|
||||
if ( \IPS\Db::i()->select( 'COUNT(*)', 'cms_custom_database_' . $database->id, $where )->first() )
|
||||
{
|
||||
throw new \LogicException( \IPS\Member::loggedIn()->language()->addToStack( "field_unique_entry_not_unique", FALSE, array( 'sprintf' => array( $database->recordWord( 1 ) ) ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [ActiveRecord] Duplicate
|
||||
*
|
||||
@@ -2737,7 +2753,10 @@ class _Fields extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
{
|
||||
unset( \IPS\Data\Store::i()->$key );
|
||||
}
|
||||
|
||||
|
||||
/* Remove reciprocal map data */
|
||||
\IPS\Db::i()->delete( 'cms_database_fields_reciprocal_map', array( 'map_origin_database_id=? AND map_field_id=? ', static::$customDatabaseId, $this->id ) );
|
||||
|
||||
/* Best remove the stored data */
|
||||
unset( \IPS\Data\Store::i()->database_reciprocal_links );
|
||||
|
||||
@@ -2996,7 +3015,20 @@ class _Fields extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
{
|
||||
case 'Text':
|
||||
case 'TextArea':
|
||||
$customValidationCode = 'IPS\cms\Fields' . static::$customDatabaseId . '::validateInput_' . $this->id;
|
||||
if ( $this->unique )
|
||||
{
|
||||
$field = $this;
|
||||
$customValidationCode = function( $val ) use ( $field, $record )
|
||||
{
|
||||
call_user_func_array( 'IPS\cms\Fields' . static::$customDatabaseId . '::validateUnique', array( $val, $field, $record ) );
|
||||
|
||||
return call_user_func( 'IPS\cms\Fields' . static::$customDatabaseId . '::validateInput_' . $field->id, $val );
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
$customValidationCode = 'IPS\cms\Fields' . static::$customDatabaseId . '::validateInput_' . $this->id;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ class _Media extends \IPS\Node\Model
|
||||
public function form( &$form )
|
||||
{
|
||||
/* Build form */
|
||||
$form->add( new \IPS\Helpers\Form\Upload( 'media_filename', ( ( $this->filename ) ? \IPS\File::get( 'cms_Media', $this->file_object ) : NULL ), FALSE, array( 'obscure' => FALSE, 'maxFileSize' => 5, 'storageExtension' => 'core_Theme', 'storageContainer' => 'pages_media' ), NULL, NULL, NULL, 'media_filename' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Upload( 'media_filename', ( ( $this->filename ) ? \IPS\File::get( 'cms_Media', $this->file_object ) : NULL ), FALSE, array( 'obscure' => FALSE, 'maxFileSize' => 5, 'storageExtension' => 'cms_Media', 'storageContainer' => 'pages_media' ), NULL, NULL, NULL, 'media_filename' ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'media_parent', $this->parent ? $this->parent : 0, FALSE, array(
|
||||
'class' => '\IPS\cms\Media\Folder',
|
||||
@@ -379,6 +379,13 @@ class _Media extends \IPS\Node\Model
|
||||
*/
|
||||
public static function exportDesignersModeMedia()
|
||||
{
|
||||
/* Make sure our media folder exists */
|
||||
if ( !is_dir( \IPS\ROOT_PATH . '/themes/cms/media' ) )
|
||||
{
|
||||
mkdir( \IPS\ROOT_PATH . '/themes/cms/media', \IPS\IPS_FOLDER_PERMISSION );
|
||||
chmod( \IPS\ROOT_PATH . '/themes/cms/media', \IPS\IPS_FOLDER_PERMISSION );
|
||||
}
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'cms_media' ) as $media )
|
||||
{
|
||||
/* We could use recursive mode but it wouldn't correctly chmod the intermediate dirs */
|
||||
|
||||
@@ -1045,7 +1045,7 @@ class _Page extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$template = \IPS\cms\Templates::load( $key );
|
||||
|
||||
$return[ $thing ][ $key ] = \IPS\Http\Url::createFromString( \IPS\Http\Url::baseUrl() . "/applications/cms/interface/developer/developer.php" )
|
||||
->setQueryString( 'file', '/themes/cms/' . $template->location . '/' . $template->group . '/' . $template->title );
|
||||
->setQueryString( 'file', 'cms/' . $template->location . '/' . $template->group . '/' . $template->title );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
@@ -1933,6 +1933,11 @@ class _Page extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
*/
|
||||
public function mapToDatabase( $databaseId )
|
||||
{
|
||||
/* Ensure this page has an ID (as in, $page->save() has not been called yet on a new page) */
|
||||
if ( ! $this->id )
|
||||
{
|
||||
throw new \LogicException('cms_err_page_id_is_empty');
|
||||
}
|
||||
try
|
||||
{
|
||||
/* is this page already in use */
|
||||
@@ -2021,6 +2026,9 @@ class _Page extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
|
||||
unset( \IPS\Data\Store::i()->frontNavigation );
|
||||
|
||||
/* Remove any widgets for this page */
|
||||
\IPS\Db::i()->delete( 'cms_page_widget_areas', array( 'area_page_id=?', $this->id ) );
|
||||
|
||||
parent::delete();
|
||||
|
||||
if ( $this->full_path and \IPS\Theme::designersModeEnabled() )
|
||||
|
||||
@@ -1812,6 +1812,7 @@ class _Records extends \IPS\Content\Item implements
|
||||
$class = '\IPS\cms\Categories' . static::$customDatabaseId;
|
||||
$category = $class::load( $this->category_id );
|
||||
$category->setLastComment();
|
||||
$category->setLastReview();
|
||||
$category->save();
|
||||
}
|
||||
}
|
||||
@@ -2256,7 +2257,11 @@ class _Records extends \IPS\Content\Item implements
|
||||
|
||||
if ( $topic === NULL )
|
||||
{
|
||||
$this->syncTopic();
|
||||
try
|
||||
{
|
||||
$this->syncTopic();
|
||||
}
|
||||
catch( \Exception $ex ) { }
|
||||
|
||||
/* Try again */
|
||||
$topic = $this->topic( FALSE );
|
||||
@@ -2323,7 +2328,11 @@ class _Records extends \IPS\Content\Item implements
|
||||
}
|
||||
else if ( $this->_forum_forum )
|
||||
{
|
||||
$this->syncTopic();
|
||||
try
|
||||
{
|
||||
$this->syncTopic();
|
||||
}
|
||||
catch( \Exception $ex ) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2368,7 +2377,11 @@ class _Records extends \IPS\Content\Item implements
|
||||
}
|
||||
elseif ( $this->_forum_forum and ! $this->isFutureDate() )
|
||||
{
|
||||
$this->syncTopic();
|
||||
try
|
||||
{
|
||||
$this->syncTopic();
|
||||
}
|
||||
catch( \Exception $ex ) { };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2443,6 +2456,35 @@ class _Records extends \IPS\Content\Item implements
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this topic linked to a record?
|
||||
*
|
||||
* @param \IPS\forums\Topic $topic Forums topic
|
||||
* @return \IPS\cms\Records|NULL
|
||||
*/
|
||||
public static function getLinkedRecord( $topic )
|
||||
{
|
||||
foreach( \IPS\cms\Databases::databases() as $database )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( $database->forum_record and $database->forum_forum == $topic->container()->_id )
|
||||
{
|
||||
$class = '\IPS\cms\Records' . $database->id;
|
||||
$record = $class::load( $topic->tid, 'record_topicid' );
|
||||
|
||||
if ( $record->_forum_record )
|
||||
{
|
||||
return $record;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( \Exception $e ) { }
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Topic (checks member's permissions)
|
||||
*
|
||||
@@ -2465,10 +2507,10 @@ class _Records extends \IPS\Content\Item implements
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Post this record as a forum topic
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function syncTopic()
|
||||
@@ -2488,6 +2530,19 @@ class _Records extends \IPS\Content\Item implements
|
||||
throw new \UnexpectedValueException('content_record_bad_forum_for_topic');
|
||||
}
|
||||
|
||||
/* Run a test for the record url, this call will throw an LogicException if the database isn't associated to a page */
|
||||
try
|
||||
{
|
||||
$this->url();
|
||||
}
|
||||
catch ( \LogicException $e )
|
||||
{
|
||||
$idColumn = static::$databaseColumnId;
|
||||
|
||||
\IPS\Log::log( sprintf( "Record %s in database %s tried to sync the topic, but failed because it has no valid url", $this->$idColumn , static::$customDatabaseId), 'cms_topicsync' );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Existing topic */
|
||||
if ( $this->record_topicid )
|
||||
{
|
||||
|
||||
@@ -680,7 +680,7 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
$content = $this->content;
|
||||
|
||||
/* Build on demand */
|
||||
if ( $this->type != 'js' and ( mb_stristr( $this->content, "{block=" ) or mb_stristr( $this->content, "{{if" ) ) )
|
||||
if ( $this->type != 'js' and ( mb_stristr( $this->content, "{block=" ) or mb_stristr( $this->content, "{{if" ) or mb_stristr( $this->content, "{media=" ) ) )
|
||||
{
|
||||
$functionName = 'css_' . mt_rand();
|
||||
\IPS\Theme::makeProcessFunction( str_replace( '\\', '\\\\', $content ), $functionName );
|
||||
|
||||
@@ -120,6 +120,13 @@ class _Database extends \IPS\Widget
|
||||
try
|
||||
{
|
||||
$database = \IPS\cms\Databases::load( intval( $this->configuration['database'] ) );
|
||||
|
||||
if ( ! $database->page_id and \IPS\cms\Pages\Page::$currentPage )
|
||||
{
|
||||
$database->page_id = \IPS\cms\Pages\Page::$currentPage->id;
|
||||
$database->save();
|
||||
}
|
||||
|
||||
static::$html = \IPS\cms\Databases\Dispatcher::i()->setDatabase( $database->id )->run();
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
|
||||
@@ -88,14 +88,15 @@ class _RecordFeed extends \IPS\Content\Widget
|
||||
$form = parent::configuration( $form );
|
||||
|
||||
/* Tags */
|
||||
if ( $database and $database->tags_enabled )
|
||||
if ( $database )
|
||||
{
|
||||
/* Sort */
|
||||
$sortOptions = array(
|
||||
'primary_id_field' => 'database_field__id',
|
||||
'member_id' => 'database_field__member',
|
||||
'record_publish_date' => 'database_field__saved',
|
||||
'record_last_comment' => ( $database and $database->_comment_bump === \IPS\cms\Databases::BUMP_ON_EDIT ) ? 'database_field__edited' : 'database_field__updated',
|
||||
'record_updated' => ( $database and $database->_comment_bump === \IPS\cms\Databases::BUMP_ON_EDIT ) ? 'database_field__edited' : 'database_field__updated',
|
||||
'record_last_comment' => 'sort_record_last_comment',
|
||||
'record_rating' => 'database_field__rating'
|
||||
);
|
||||
|
||||
@@ -124,22 +125,25 @@ class _RecordFeed extends \IPS\Content\Widget
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Select( 'widget_feed_sort_on', isset( $this->configuration['widget_feed_sort_on'] ) ? $this->configuration['widget_feed_sort_on'] : $class::$databaseColumnMap['updated'], FALSE, array( 'options' => $sortOptions ) ), NULL, NULL, NULL, 'widget_feed_sort_on' );
|
||||
|
||||
$options = array( 'autocomplete' => array( 'unique' => TRUE, 'source' => NULL, 'freeChoice' => TRUE ) );
|
||||
|
||||
if ( \IPS\Settings::i()->tags_force_lower )
|
||||
|
||||
if ( $database->tags_enabled )
|
||||
{
|
||||
$options['autocomplete']['forceLower'] = TRUE;
|
||||
$options = array( 'autocomplete' => array( 'unique' => TRUE, 'source' => NULL, 'freeChoice' => TRUE ) );
|
||||
|
||||
if ( \IPS\Settings::i()->tags_force_lower )
|
||||
{
|
||||
$options['autocomplete']['forceLower'] = TRUE;
|
||||
}
|
||||
|
||||
if ( \IPS\Settings::i()->tags_clean )
|
||||
{
|
||||
$options['autocomplete']['filterProfanity'] = TRUE;
|
||||
}
|
||||
|
||||
$options['autocomplete']['prefix'] = FALSE;
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'widget_feed_tags', ( isset( $this->configuration['widget_feed_tags'] ) ? $this->configuration['widget_feed_tags'] : array( 'tags' => NULL ) ), FALSE, $options ) );
|
||||
}
|
||||
|
||||
if ( \IPS\Settings::i()->tags_clean )
|
||||
{
|
||||
$options['autocomplete']['filterProfanity'] = TRUE;
|
||||
}
|
||||
|
||||
$options['autocomplete']['prefix'] = FALSE;
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'widget_feed_tags', ( isset( $this->configuration['widget_feed_tags'] ) ? $this->configuration['widget_feed_tags'] : array( 'tags' => NULL ) ), FALSE, $options ) );
|
||||
}
|
||||
|
||||
/* Any filterable fields */
|
||||
|
||||
@@ -111,7 +111,7 @@ class _Rss extends \IPS\Widget\StaticCache
|
||||
{
|
||||
$items[ $guid ] = array(
|
||||
'title' => $article['title'],
|
||||
'content' => \IPS\Text\Parser::parseStatic( $article['content'] ),
|
||||
'content' => \IPS\Text\Parser::parseStatic( $article['content'], TRUE, NULL, new \IPS\Member ),
|
||||
'link' => (string) $article['link'],
|
||||
'date' => ( $article['date'] instanceof \IPS\DateTime ) ? $article['date']->getTimestamp() : $article['date']
|
||||
);
|
||||
|
||||
@@ -107,6 +107,7 @@ class _Wysiwyg extends \IPS\Widget\StaticCache
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_core.js', 'core' ) );
|
||||
return $this->output( isset( $this->configuration['content'] ) ? $this->configuration['content'] : '' );
|
||||
}
|
||||
}
|
||||
@@ -28,9 +28,10 @@ class _<#CLASS#> extends \IPS\convert\Library
|
||||
/**
|
||||
* Returns an array of items that we can convert, including the amount of rows stored in the Community Suite as well as the recommend value of rows to convert per cycle
|
||||
*
|
||||
* @param bool $rowCounts enable row counts
|
||||
* @return array
|
||||
*/
|
||||
public function menuRows()
|
||||
public function menuRows( $rowCounts=FALSE )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
@@ -10,5 +10,9 @@
|
||||
"LoginHandler": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Login\\Handler"
|
||||
},
|
||||
"LegacyParser": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Text\\LegacyParser"
|
||||
}
|
||||
}
|
||||
Loaded 100 of 609 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user