first commit
This commit is contained in:
1
plugins/pagebuilderck/separator/assets/images/index.html
Normal file
1
plugins/pagebuilderck/separator/assets/images/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
26
plugins/pagebuilderck/separator/assets/images/separator.svg
Normal file
26
plugins/pagebuilderck/separator/assets/images/separator.svg
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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="100%" height="100%" viewBox="0 0 512 512" 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;stroke-miterlimit:1.5;">
|
||||
<g transform="matrix(2.08267,0,0,2.08267,-425.202,2.84748)">
|
||||
<g transform="matrix(0.180057,0,0,0.180057,210.764,80.1387)">
|
||||
<path d="M70,230L430,230" style="fill:none;stroke:black;stroke-width:53.33px;"/>
|
||||
</g>
|
||||
<g transform="matrix(0.173389,0,0,0.173389,355.277,81.6725)">
|
||||
<path d="M70,230L430,230" style="fill:none;stroke:black;stroke-width:55.38px;"/>
|
||||
</g>
|
||||
<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(1.90909,0,0,1.90909,-344.096,-111.648)">
|
||||
<g transform="matrix(3.60115,0,0,3.60115,272.344,17.8389)">
|
||||
<path d="M20.167,33L23.833,33" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.4px;stroke-miterlimit:4;"/>
|
||||
</g>
|
||||
<g transform="matrix(3.60115,0,0,3.60115,272.344,17.8389)">
|
||||
<path d="M22,33L22,20.167" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.4px;stroke-miterlimit:4;"/>
|
||||
</g>
|
||||
<g transform="matrix(3.60115,0,0,3.60115,272.344,17.8389)">
|
||||
<path d="M16.5,22L16.5,20.167L27.5,20.167L27.5,22" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.4px;stroke-miterlimit:4;"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
1
plugins/pagebuilderck/separator/assets/index.html
Normal file
1
plugins/pagebuilderck/separator/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_SEPARATOR_XML_NAME="Page Builder CK - Separator"
|
||||
PLG_PAGEBUILDERCK_SEPARATOR_MENUITEM_TITLE="Separator"
|
||||
PLG_PAGEBUILDERCK_SEPARATOR_MENUITEM_DESC="Horizontal separator with text"
|
||||
|
||||
@@ -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_SEPARATOR_XML_NAME="Page Builder CK - Separator"
|
||||
@@ -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_SEPARATOR_XML_NAME="Page Builder CK - Séparateur"
|
||||
PLG_PAGEBUILDERCK_SEPARATOR_MENUITEM_TITLE="Séparateur"
|
||||
PLG_PAGEBUILDERCK_SEPARATOR_MENUITEM_DESC="Séparateur horizontal avec texte"
|
||||
@@ -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_SEPARATOR_XML_NAME="Page Builder CK - Séparateur"
|
||||
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/pagebuilderck/separator/language/index.html
Normal file
1
plugins/pagebuilderck/separator/language/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
87
plugins/pagebuilderck/separator/layouts/edit_separator.php
Normal file
87
plugins/pagebuilderck/separator/layouts/edit_separator.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?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'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_edition">
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>switch.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_USE_TEXT'); ?></span>
|
||||
<span class="ckoption-field">
|
||||
<select class="inputbox" type="list" value="" name="usetext" id="usetext" >
|
||||
<option value="0"><?php echo JText::_('JNO'); ?></option>
|
||||
<option value="1" selected><?php echo JText::_('JYES'); ?></option>
|
||||
</select>
|
||||
</span>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<textarea id="<?php echo $id; ?>_text" onchange="ckUpdatePreviewArea()" style="width: 275px;"></textarea>
|
||||
</div>
|
||||
<?php echo $this->menustyles->createTextStyles('separator', 'separatorck') ?>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_linestyles"><?php echo JText::_('CK_LINE'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_linestyles">
|
||||
<?php echo $this->menustyles->createBlocStyles('line', 'line', true, false, 'j3', false) ?>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_ICON'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_blocstyles">
|
||||
<?php echo $this->menustyles->createIcon('icon', '.editfocus .iconck .pbckicon', false, false, true, false, true, true) ?>
|
||||
<?php echo $this->menustyles->createBackground('icon') ?>
|
||||
<?php echo $this->menustyles->createDimensions('icon', true, true) ?>
|
||||
<?php echo $this->menustyles->createDecoration('icon') ?>
|
||||
<?php echo $this->menustyles->createShadow('icon') ?>
|
||||
<?php echo $this->menustyles->createCustom('icon') ?>
|
||||
<?php //echo $this->menustyles->createIconStyles('icon', 'icon', '.editfocus .buttonck .pbckicon', false, true, false, true, true, false) ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menustylescustom" data-prefix="line" data-rule=".separatorck_before|.separatorck_after"></div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
var focus = $ck('.editfocus');
|
||||
function ckLoadEditionPopup() {
|
||||
$ck('#<?php echo $id; ?>_text').val(focus.find('.separatorck_text').html());
|
||||
// ckUpdatePreviewArea();
|
||||
ckFillEditionPopup(focus.attr('id'));
|
||||
// ckGetIconPosition('.editfocus .separatorck i.fa', '#separatoricon-position button');
|
||||
// ckGetIconMargin('.editfocus .separatorck i.fa', '#separatoricon_margin');
|
||||
$ck('#iconicon-class').val(focus.find('.iconck > i').attr('data-iconclass'));
|
||||
}
|
||||
|
||||
function ckBeforeSaveEditionPopup() {
|
||||
focus.find('.separatorck').html($ck('#previewareabloc .separatorck').html());
|
||||
focus.find('.ckstyle').html($ck('#previewareabloc .ckstyle').html());
|
||||
|
||||
if ($ck('#usetext').val() === '0') {
|
||||
$ck('.editfocus .separatorck').attr('data-text', '0');
|
||||
} else {
|
||||
$ck('.editfocus .separatorck_text').html($ck('#<?php echo $id; ?>_text').val());
|
||||
$ck('.editfocus .separatorck').attr('data-text', '1');
|
||||
}
|
||||
}
|
||||
|
||||
function ckUpdatePreviewArea() {
|
||||
$ck('.editfocus .separatorck_text').html($ck('#<?php echo $id; ?>_text').val());
|
||||
|
||||
}
|
||||
|
||||
function ckSelectIcon(icon) {
|
||||
$ck('.editfocus .separatorck').find('i.fa, .pbckicon').remove();
|
||||
$ck('.editfocus .separatorck_text').before('<span class="iconck">' + icon + '</span>');
|
||||
$ck('.editfocus .separatorck i.fa').css('vertical-align', $ck('#separatoricon-position button.active').attr('data-position'))
|
||||
.addClass($ck('#separatoricon-size button.active').attr('data-width'));
|
||||
ckSetIconMargin('.editfocus .separatorck i.fa', '#separatoricon_margin');
|
||||
return $ck('.editfocus .pbckicon');
|
||||
}
|
||||
|
||||
ckInitIconPosition('.editfocus .separatorck .pbckicon', '#iconicon-position button');
|
||||
</script>
|
||||
1
plugins/pagebuilderck/separator/layouts/index.html
Normal file
1
plugins/pagebuilderck/separator/layouts/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
86
plugins/pagebuilderck/separator/separator.php
Normal file
86
plugins/pagebuilderck/separator/separator.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?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 plgPagebuilderckSeparator extends JPlugin {
|
||||
|
||||
private $context = 'PLG_PAGEBUILDERCK_SEPARATOR';
|
||||
|
||||
private $type = 'separator';
|
||||
|
||||
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/separator/assets/images/separator.svg';
|
||||
|
||||
return $menuitem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the interface
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemContentSeparator() {
|
||||
$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="separator" >
|
||||
<div class="ckstyle">
|
||||
</div>
|
||||
<div class="separatorck">
|
||||
<span class="separatorck_before"></span>
|
||||
<span class="separatorck_text">Text Here</span>
|
||||
<span class="separatorck_after"></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the interface for the item edition
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemOptionsSeparator() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// load the interface for the options
|
||||
$tpl = JPATH_SITE . '/plugins/pagebuilderck/separator/layouts/edit_separator.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 onPagebuilderckRenderItemSeparator($item) {
|
||||
return $item->innertext;
|
||||
}
|
||||
}
|
||||
24
plugins/pagebuilderck/separator/separator.xml
Normal file
24
plugins/pagebuilderck/separator/separator.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_separator_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>Separator item for Page Builder CK</description>
|
||||
<files>
|
||||
<filename plugin="separator">separator.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_separator.sys.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_separator.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_separator.sys.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_separator.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
Reference in New Issue
Block a user