first commit
This commit is contained in:
1
plugins/pagebuilderck/text/assets/images/index.html
Normal file
1
plugins/pagebuilderck/text/assets/images/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
1
plugins/pagebuilderck/text/assets/images/text.svg
Normal file
1
plugins/pagebuilderck/text/assets/images/text.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="512px" height="512px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"><g transform="matrix(2.08267,0,0,2.08267,-425.202,2.84748)"><g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)"><rect x="0" y="0" width="44" height="44" style="fill:none;fill-rule:nonzero;"/></g><g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)"><path d="M5.5,9.167C5.5,7.155 7.155,5.5 9.167,5.5L34.833,5.5C36.845,5.5 38.5,7.155 38.5,9.167L38.5,34.833C38.5,36.845 36.845,38.5 34.833,38.5L9.167,38.5C7.155,38.5 5.5,36.845 5.5,34.833L5.5,9.167Z" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/></g><g transform="matrix(13.1824,0,0,5.58723,106.691,-1.36723)"><path d="M16.5,27.5L12.833,27.5" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:0.95px;"/></g><g transform="matrix(9.63216,0,0,5.58723,152.252,-1.36723)"><path d="M23.833,22L12.833,22" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.22px;"/></g><g transform="matrix(12.484,0,0,5.58723,115.654,-1.36723)"><path d="M20.167,16.5L12.833,16.5" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:0.99px;"/></g><g transform="matrix(3.62297,0,0,3.62297,311.716,41.8465)"><rect x="0" y="0" width="44" height="44" style="fill:none;fill-rule:nonzero;"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
1
plugins/pagebuilderck/text/assets/index.html
Normal file
1
plugins/pagebuilderck/text/assets/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
@@ -0,0 +1,10 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_TEXT_XML_NAME="Page Builder CK - Text"
|
||||
PLG_PAGEBUILDERCK_TEXT_MENUITEM_TITLE="Text"
|
||||
PLG_PAGEBUILDERCK_TEXT_MENUITEM_DESC="Text with a visual editor"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_TEXT_XML_NAME="Page Builder CK - Text"
|
||||
1
plugins/pagebuilderck/text/language/en-GB/index.html
Normal file
1
plugins/pagebuilderck/text/language/en-GB/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@@ -0,0 +1,9 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_TEXT_XML_NAME="Page Builder CK - Texte"
|
||||
PLG_PAGEBUILDERCK_TEXT_MENUITEM_TITLE="Texte"
|
||||
PLG_PAGEBUILDERCK_TEXT_MENUITEM_DESC="Edition de texte avec éditeur"
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_TEXT_XML_NAME="Page Builder CK - Texte"
|
||||
1
plugins/pagebuilderck/text/language/fr-FR/index.html
Normal file
1
plugins/pagebuilderck/text/language/fr-FR/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/pagebuilderck/text/language/index.html
Normal file
1
plugins/pagebuilderck/text/language/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
70
plugins/pagebuilderck/text/layouts/edit_text.php
Normal file
70
plugins/pagebuilderck/text/layouts/edit_text.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<div id="elementscontainer">
|
||||
<div class="menulink" tab="tab_edition"><?php echo JText::_('CK_TEXT_EDITION'); ?></div>
|
||||
<div class="tab menustyles ckproperty tab_fullscreen" id="tab_edition">
|
||||
<?php // echo PagebuilderckHelper::renderEditionButtons(); ?>
|
||||
<textarea id="<?php echo $id; ?>_text" data-id="<?php echo $id; ?>_text" class="joomla-editor-tinymce"></textarea>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_STYLES'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_blocstyles">
|
||||
<?php echo $this->menustyles->createBlocStyles('bloc') ?>
|
||||
</div>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function ckLoadEditionPopup() {
|
||||
var focus = $ck('.editfocus');
|
||||
var textID = '<?php echo $id; ?>_text';
|
||||
|
||||
content = focus.find('.cktext').html();
|
||||
// var search = /<img(.*?)src="<?php echo str_replace('/', '\/', JUri::root(true)); ?>\/(.*?)"/g;
|
||||
// content = content.replace(search, '<img src="$2"');
|
||||
content = ckContentToEditor(content);
|
||||
$ck('#' + textID).val(content);
|
||||
|
||||
// $ck('#previewarea .ckstyle').html(focus.find('.ckstyle').html());
|
||||
// $ck('#previewarea .cktype').html(focus.find('.cktext').html());
|
||||
|
||||
ckLoadEditorOnTheFly(textID);
|
||||
|
||||
ckFillEditionPopup(focus.attr('id'));
|
||||
}
|
||||
|
||||
function ckBeforeSaveEditionPopup() {
|
||||
var textID = '<?php echo $id; ?>_text';
|
||||
ckSaveEditorOnTheFly(textID);
|
||||
var content = $ck('[data-id="' + textID + '"]').val();
|
||||
content = ckEditorToContent(content);
|
||||
|
||||
var focus = $ck('.editfocus');
|
||||
focus.find('.cktext').html(content);
|
||||
// ckSaveEditionPopup(focus.attr('id'));
|
||||
// ckCloseEditionPopup();
|
||||
}
|
||||
|
||||
/*
|
||||
* Method automatically called in ckCloseEditionPopup() if exists
|
||||
*/
|
||||
function ckBeforeCloseEditionPopup() {
|
||||
var textID = '<?php echo $id; ?>_text';
|
||||
ckRemoveEditorOnTheFly(textID);
|
||||
}
|
||||
|
||||
function ckSaveInlineEditionPopup() {
|
||||
ckBeforeSaveEditionPopup();
|
||||
}
|
||||
|
||||
function ckUpdatePreviewArea() {
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
1
plugins/pagebuilderck/text/layouts/index.html
Normal file
1
plugins/pagebuilderck/text/layouts/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
83
plugins/pagebuilderck/text/text.php
Normal file
83
plugins/pagebuilderck/text/text.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2015 Cédric KEIFLIN alias ced1870
|
||||
* https://www.template-creator.com
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.event.plugin');
|
||||
|
||||
class plgPagebuilderckText extends JPlugin {
|
||||
|
||||
private $context = 'PLG_PAGEBUILDERCK_TEXT';
|
||||
|
||||
private $type = 'text';
|
||||
|
||||
function __construct(&$subject, $params) {
|
||||
|
||||
parent::__construct($subject, $params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Construct the Menu Item to drag into the interface
|
||||
*
|
||||
* Return Object with item data
|
||||
*/
|
||||
public function onPagebuilderckAddItemToMenu() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// create the menu item
|
||||
$menuitem = new stdClass();
|
||||
$menuitem->type = $this->type;
|
||||
$menuitem->group = 'text';
|
||||
$menuitem->title = JText::_($this->context . '_MENUITEM_TITLE');
|
||||
$menuitem->description = JText::_($this->context . '_MENUITEM_DESC');
|
||||
$menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/text/assets/images/text.svg';
|
||||
|
||||
return $menuitem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the interface
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemContentText() {
|
||||
$input = JFactory::getApplication()->input;
|
||||
$id = $input->get('ckid', '', 'string');
|
||||
// ckstyle and inner classes are needed to get the styles from the interface
|
||||
?>
|
||||
<div id="<?php echo $id; ?>" class="cktype" data-type="text">
|
||||
<div class="ckstyle"></div>
|
||||
<div class="cktext inner">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed molestie scelerisque ultrices. Nullam venenatis, felis ut accumsan vestibulum, diam leo congue nisl, eget luctus sapien libero eget urna. Duis ac pellentesque nisi.</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the interface for the item edition
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemOptionsText() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// load the interface for the options
|
||||
$tpl = JPATH_SITE . '/plugins/pagebuilderck/text/layouts/edit_text.php';
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the frontend page
|
||||
* @param string the item object from simple_html_dom
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckRenderItemText($item) {
|
||||
return $item->innertext;
|
||||
}
|
||||
}
|
||||
24
plugins/pagebuilderck/text/text.xml
Normal file
24
plugins/pagebuilderck/text/text.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3" type="plugin" group="pagebuilderck" method="upgrade">
|
||||
<name>plg_pagebuilderck_text_xml_name</name>
|
||||
<creationDate>December 2015</creationDate>
|
||||
<copyright>Copyright (C) 2015. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later</license>
|
||||
<author>Cedric Keiflin</author>
|
||||
<authorEmail>ced1870@gmail.com</authorEmail>
|
||||
<authorUrl>https://www.joomlack.fr</authorUrl>
|
||||
<version>3.0.0</version>
|
||||
<description>Text item for Page Builder CK</description>
|
||||
<files>
|
||||
<filename plugin="text">text.php</filename>
|
||||
<folder>language</folder>
|
||||
<folder>layouts</folder>
|
||||
<folder>assets</folder>
|
||||
</files>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_text.sys.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_text.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_text.sys.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_text.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
Reference in New Issue
Block a user