first commit

This commit is contained in:
Your Name
2021-04-20 11:13:47 +05:30
parent b76859a3f1
commit 0a18b88eba
408 changed files with 47723 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
Plugins are additional software applications that may be used with OpenConf. Unlike modules, which are specifically developed for OpenConf, plugins are typically generally available applications.
For more information, browse:
https://www.openconf.com/documentation/plugins.php
+57
View File
@@ -0,0 +1,57 @@
<?php
// +----------------------------------------------------------------------+
// | OpenConf |
// +----------------------------------------------------------------------+
// | Copyright (c) 2002-2020 Zakon Group LLC. All Rights Reserved. |
// +----------------------------------------------------------------------+
// | This source file is subject to the OpenConf License, available on |
// | the OpenConf web site: www.OpenConf.com |
// +----------------------------------------------------------------------+
// replace CKEditor fields
function oc_replaceCKEditor($fieldAR, $cssFix=true, $width=600, $height=0) {
if (isset($GLOBALS['OC_ckConfig']) && !empty($GLOBALS['OC_ckConfig'])) {
print '
<script type="text/javascript" language="javascript">
<!--
window.addEventListener("load", function(event) {
';
foreach ($fieldAR as $fld) {
print 'CKEDITOR.replace("' . $fld . '", { width: "' . $width . '", ' . (($height > 0) ? ('height: "' . $height . '", ') : '') . 'customConfig: "' . safeHTMLstr($GLOBALS['OC_ckConfig']) . '" } );' . "\n";
}
print '
}, false);
// -->
</script>
';
if ($cssFix) {
print '
<style>
<!-- /* Fix for CKEditor display within fieldset */
.cke_skin_kama { /* CKE 3 */
border: 0;
padding: 0 !important;
float: left;
margin-bottom: 1em;
}
.cke_chrome { /* CKE 4 */
float: left;
margin-bottom: 1em;
}
-->
</style>
';
}
}
}
// Setup CK
if (is_file(OCC_PLUGINS_DIR . 'ckeditor/ckeditor.js')) {
oc_addHeader('<script type="text/javascript" src="' . OCC_PLUGINS_DIR . 'ckeditor/ckeditor.js"></script>');
$OC_ckConfig = '../ckeditor_local_openconf.js';
} else {
oc_addHeader('<script type="text/javascript" src="//cdn.ckeditor.com/4.14.0/full/ckeditor.js"></script>');
$OC_ckConfig = OCC_BASE_URL . 'plugins/ckeditor_cdn_openconf.js';
}
+32
View File
@@ -0,0 +1,32 @@
// CKEditor default config for OpenConf
CKEDITOR.editorConfig = function( config ) {
config.toolbar = [
{ name: 'document', items: [ 'Source' ] },
{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
{ name: 'editing', items: [ 'Find', 'Replace' ] },
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight' ] },
{ name: 'links', items: [ 'Link', 'Unlink' ] },
{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] },
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'tools', items: [ 'Maximize' ] },
{ name: 'about', items: [ 'About' ] }
];
};
CKEDITOR.on( 'instanceReady', function( ev )
{
var tags = ['p', 'ol', 'ul', 'li', 'h1', 'h2', 'h3', 'h4', 'h5'];
for (var key in tags) {
ev.editor.dataProcessor.writer.setRules(tags[key],
{
indent : false,
breakBeforeOpen : true,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : true
});
}
});
+32
View File
@@ -0,0 +1,32 @@
// CKEditor default config for OpenConf
CKEDITOR.editorConfig = function( config ) {
config.toolbar = "OPENCONF";
config.removePlugins = 'elementspath';
config.toolbar_OPENCONF = [
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Subscript','Superscript' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote' ] },
{ name: 'styles', items : [ 'Styles','Format','Font','FontSize'] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'clipboard', items : [ 'Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','SelectAll','SpellChecker' ] },
{ name: 'insert', items : [ 'Image','Table','HorizontalRule','SpecialChar' ] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'document', items : [ 'Source' ] }
];
};
CKEDITOR.on( 'instanceReady', function( ev )
{
var tags = ['p', 'ol', 'ul', 'li', 'h1', 'h2', 'h3', 'h4', 'h5'];
for (var key in tags) {
ev.editor.dataProcessor.writer.setRules(tags[key],
{
indent : false,
breakBeforeOpen : true,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : true
});
}
});
View File
View File
+93
View File
@@ -0,0 +1,93 @@
<?php
// +----------------------------------------------------------------------+
// | OpenConf |
// +----------------------------------------------------------------------+
// | Copyright (c) 2002-2020 Zakon Group LLC. All Rights Reserved. |
// +----------------------------------------------------------------------+
// | This source file is subject to the OpenConf License, available on |
// | the OpenConf web site: www.OpenConf.com |
// +----------------------------------------------------------------------+
// Display banner
if ($oc_bannerAR = json_decode($GLOBALS['OC_configAR']['OC_privacy_banner_options'], true)) {
$oc_banner_popupBG = '#252e39'; // Banner background color
$oc_banner_buttonBG = '#99ccff'; // Button background color
$oc_cookieConsentJS = OCC_PLUGINS_DIR . 'cookieconsent/build/cookieconsent.min.js'; // CookieConsent .js - if not present, CDN used instead
$oc_cookieConsentCSS = OCC_PLUGINS_DIR . 'cookieconsent/build/cookieconsent.min.css'; // CookieConsent .css
$oc_cookieConsentBaseURL = '//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.1/'; // Base URL for CDN
if ($GLOBALS['OC_configAR']['OC_privacy_display'] > 0) {
if (!isset($oc_bannerAR['link']) || empty($oc_bannerAR['link'])) {
$oc_bannerAR['link'] = oc_('Privacy Policy');
}
if (!isset($oc_bannerAR['href']) || empty($oc_bannerAR['href'])) {
$oc_bannerAR['href'] = OCC_BASE_URL . 'privacy_policy.php';
}
}
$oc_useBannerAR = array(
'palette' => array(
'popup' => array(
'background' => $oc_banner_popupBG,
'text' => '#ffffff'
),
'button' => array(
'background' => $oc_banner_buttonBG,
'text' => '#000000'
),
'highlight' => array(
'background' => '#cccccc'
)
),
'content' => array(
'message' => safeHTMLstr(oc_($oc_bannerAR['message'])),
'dismiss' => safeHTMLstr(oc_($oc_bannerAR['dismiss']))
),
'cookie' => array(
'name' => OCC_SESSION_VAR_NAME . '_cookieconsent',
'path' => $GLOBALS['OC_basepath'],
//'domain' => '',
'expiryDays' => 365
)
);
if (!empty($oc_bannerAR['link'])) {
$oc_useBannerAR['content']['link'] = oc_($oc_bannerAR['link']);
} else {
$oc_useBannerAR['showLink'] = false;
}
if (!empty($oc_bannerAR['href'])) {
$oc_useBannerAR['content']['href'] = $oc_bannerAR['href'];
}
// Select where to serve banner code from -- local plugins dir or CDN
if (is_file($oc_cookieConsentJS)) {
print '
<script src="' . $oc_cookieConsentJS . '"></script>
<link rel="stylesheet" type="text/css" href="' . $oc_cookieConsentCSS . '" />
';
} else { // use CDN
print '
<link rel="stylesheet" type="text/css" href="' . $oc_cookieConsentBaseURL . 'cookieconsent.min.css" />
<script src="' . $oc_cookieConsentBaseURL . 'cookieconsent.min.js"></script>
';
}
// Banner options
print '
<style>#powered { margin-bottom: 90px; }</style>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise(' . json_encode($oc_useBannerAR) . ')});
</script>
';
// Ignored, for translation purposes only
if (false) {
//T: Leave as X - it indicates closing the privacy banner box
$ocIgnore = oc_('X');
$ocIgnore = oc_('This website uses cookies to provide essential services only.');
}
}