Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https://github.com/emanuele45/Tabbed-Smileys

The number of tabs is defined by the number of rows of smileys in the popup: every row corresponds to a tab.

[![new row](http://img253.imageshack.us/img253/9926/newrow.th.png)](http://img253.imageshack.us/i/newrow.png/)
[![new row](https://img253.imageshack.us/img253/9926/newrow.th.png)](https://img253.imageshack.us/i/newrow.png/)

Doing like in the picture will create a third tab: the "basic" (with all the smileys in the post form), the first line of the popup (the :'( in the picture) and the newly added.<br />
It's possible to change the tab a smiley belongs to by changing the position both in "edit smileys" or in "set smiley order".<br />
Expand All @@ -22,4 +22,5 @@ It's also possible to define a custom name for each tab and change the css style
## Change log

* 0.1.0 - Complete rewrite for ElkArte and SCEditor - added only basic features
* 0.1.1 - Added support for ElkArte 1.0.1 (ElkArte 1.0 is no more supported)
* 0.1.1 - Added support for ElkArte 1.0.1 (ElkArte 1.0 is no more supported)
* 0.2.0 - Added support for ElkArte 1.1.x (ElkArte 1.0 is no more supported)
4 changes: 0 additions & 4 deletions TabbedSmiley.english.php

This file was deleted.

6 changes: 6 additions & 0 deletions languages/english/TabbedSmiley.english.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$txt['tabbedSmiley_base'] = 'Base';
// {%d} will be replaced by the tab number, such as Tab 1, Tab 2. To create custom
// names, leave the following blank and then see the examples in the tabbedSmiley.css file
$txt['tabbedSmiley_tabs'] = 'Tab {%d}';
6 changes: 6 additions & 0 deletions languages/german/TabbedSmiley.german.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$txt['tabbedSmiley_base'] = 'Smileys';
// {%d} will be replaced by the tab number, such as Tab 1, Tab 2. To create custom
// names, leave the following blank and then see the examples in the tabbedSmiley.css file
$txt['tabbedSmiley_tabs'] = 'Tab ${d}';
16 changes: 8 additions & 8 deletions package-info.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.elkarte.net/site/package-info">
<package-info xmlns="http://www.elkarte.net/site/package-info" xmlns:elk="http://www.elkarte.net/">
<!DOCTYPE package-info SYSTEM "https://www.elkarte.net/site/package-info">
<package-info xmlns="https://www.elkarte.net/site/package-info" xmlns:elk="https://www.elkarte.net/">
<id>emanuele:tabbed_smileys</id>
<license><!--
/**
Expand All @@ -10,25 +10,25 @@
* @author emanuele
* @license BSD http://opensource.org/licenses/BSD-3-Clause
*
* @version 0.1.1
* @version 0.2.0
*/
--></license>
<name>Tabbed smileys</name>
<version>0.1.1</version>
<version>0.2.0</version>
<type>modification</type>
<install for="1.0.1 - 1.0.99">
<install for="1.1 - 1.1.99">
<require-file name="tabbedSmiley.js" destination="THEMEDIR/scripts" />
<require-file name="tabbedSmiley.css" destination="THEMEDIR/css" />
<require-file name="tabbedSmiley.integration.php" destination="SOURCEDIR" />
<require-file name="TabbedSmiley.english.php" destination="LANGUAGEDIR/english" />
<require-dir name="languages" destination="THEMEDIR" />
<hook hook="integrate_editor_plugins" function="tabbedSmiley" file="SOURCEDIR/tabbedSmiley.integration.php" />
</install>
<uninstall for="1.0.1 - 1.0.99">
<uninstall for="1.1 - 1.1.99">
<remove-file name="THEMEDIR/scripts/tabbedSmiley.js" />
<remove-file name="THEMEDIR/css/tabbedSmiley.css" />
<remove-file name="SOURCEDIR/tabbedSmiley.integration.php" />
<remove-file name="LANGUAGEDIR/english/TabbedSmiley.english.php" />
<remove-file name="LANGUAGEDIR/german/TabbedSmiley.german.php" />
<hook reverse="true" hook="integrate_editor_plugins" function="tabbedSmiley" file="SOURCEDIR/tabbedSmiley.integration.php" />
</uninstall>
</package-info>

17 changes: 13 additions & 4 deletions tabbedSmiley.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
float: left;
width: 100%;
}

.sceditor-emot-head-tabs li {
float: left;
padding: 0 5px;
margin-right: 2px;
cursor: pointer;
border: 1px solid #000;
border: 1px solid #000000;
border-bottom: 0;
border-top-right-radius: 5px;
border-top-left-radius: 5px;
Expand All @@ -24,7 +25,15 @@
}

.sceditor-tabs-active {
background: #5ba048;
background-image: linear-gradient(0deg, #4b863c, #5ba048);
background: #5BA048 linear-gradient(0deg, #4B863C, #5BA048);
color: #fff;
}
}

/* Categorize your smileys by row in the admin panel (drag and drop)
then name your tabs using the following css, one for each row */

/*
.sceditor-emot-head-tabs > li:nth-child(2)::before {content: "Some Tab Name";}
.sceditor-emot-head-tabs > li:nth-child(3)::before {content: "Another Tab Name";}
...
*/
4 changes: 3 additions & 1 deletion tabbedSmiley.integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
* @author emanuele
* @license BSD http://opensource.org/licenses/BSD-3-Clause
*
* @version 0.1.2
* @version 0.2.0
*/

function tabbedSmiley($editorId)
{
global $context, $txt;

$context['controls']['richedit'][$editorId]['plugin_addons'][] = 'tabbedemotes';

loadJavascriptFile('tabbedSmiley.js');
loadCSSFile('tabbedSmiley.css');
loadLanguage('TabbedSmiley');

addJavascriptVar(array(
'TabbedSmileyLang' => '{
base: ' . JavaScriptEscape($txt['tabbedSmiley_base']) . ',
Expand Down
Loading