<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* manifest file
*
* @copyright Copyright (C) KANekT @ http://blog.kanekt.ru
* @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
* Donate Web Money Z104136428007 R346491122688
*/
-->
<extension engine="1.0">
<id>nya_smiles</id>
<title>Smiles</title>
<version>0.4.0</version>
<description>KOLOBOK Smiles</description>
<author>KANekT</author>
<minversion>1.4.2</minversion>
<maxtestedon>1.4.2</maxtestedon>
<dependencies>
<dependency>nya_smiles_dev</dependency>
</dependencies>
<hooks>
<hook id="pun_bbcode_pre_buttons_output"><![CDATA[
$this->add_button(array('name' => 'smiles', 'onclick' => 'showhide(\'pun_bbcode_smilies\');', 'image' => true));
]]></hook>
<hook id="po_pre_post_contents, vt_quickpost_pre_message_box, ed_pre_message_box, pun_pm_fn_send_form_pre_textarea_output" priority="10"><![CDATA[
global $ext_Smiles;
$smilies = $ext_Smiles->Smiles;
$text = '<div id="pun_bbcode_smilies">';
foreach ($smilies as $smile => $prop)
{
if (!isset($prop['view'])){
$text .= '<a onclick="PUNBB.pun_bbcode.insert_text(\' '.$prop['title'].' \', \'\')"><img src="'.$prop['src'].'"'.((isset($prop['width'])) ? ' width="'.$prop['width'].'"' : '').((isset($prop['height'])) ? ' height="'.$prop['height'].'"' : '').' alt="'.$prop['title'].'" /></a>'."\n";
}
}
$text .= '</div>';
echo $text;
]]></hook>
<hook id="pun_bbcode_styles_loaded"><![CDATA[
if ($forum_user['pun_bbcode_enabled'] == '1')
{
if (!isset($smiles_styles_loaded )) {
$smiles_styles_loaded = TRUE;
if ($forum_user['style'] != 'Oxygen' && file_exists($ext_info['path'].'/css/'.$forum_user['style'].'/pun_bbcode_smiles.min.css')) {
$forum_loader->add_css($ext_info['url'].'/css/'.$forum_user['style'].'/pun_bbcode_smiles.min.css', array('type' => 'url', 'media' => 'screen'));
} else {
// Optimize: inline for Oxygen
$forum_loader->add_css('#pun_bbcode_bar #pun_bbcode_button_smiles.image{background:url("'.$ext_info['url'].'/css/Oxygen/img/smiles.png") 50% 50% no-repeat;}div#pun_bbcode_smilies{display:none;margin:0.5em 0 0 1em;padding: 0 0 0 17em;}', array('type' => 'inline'));
}
}
$forum_loader->add_js($ext_info['url'].'/js/pun_bbcode_smiles.min.js', array('type' => 'url'));
}
]]></hook>
<hook id="nya_add_smilies"><![CDATA[
$ext_Smiles->add_Smile(array(
':)' => array('title' => ':)', 'src' => $ext_info['url'].'/img/smile.png'),
'=)' => array('title' => '=)', 'src' => $ext_info['url'].'/img/smile.png', 'view' => 0),
':|' => array('title' => ':|', 'src' => $ext_info['url'].'/img/neutral.png'),
'=|' => array('title' => '=|', 'src' => $ext_info['url'].'/img/neutral.png', 'view' => 0),
':(' => array('title' => ':(', 'src' => $ext_info['url'].'/img/sad.png'),
'=(' => array('title' => '=(', 'src' => $ext_info['url'].'/img/sad.png', 'view' => 0),
':D' => array('title' => ':D', 'src' => $ext_info['url'].'/img/big_smile.png'),
'=D' => array('title' => '=D', 'src' => $ext_info['url'].'/img/big_smile.png', 'view' => 0),
':o' => array('title' => ':o', 'src' => $ext_info['url'].'/img/ow.png'),
':O' => array('title' => ':O', 'src' => $ext_info['url'].'/img/ow.png', 'view' => 0),
';)' => array('title' => ';)', 'src' => $ext_info['url'].'/img/wink.png'),
':/' => array('title' => ':/', 'src' => $ext_info['url'].'/img/hmm.png'),
':p' => array('title' => ':p', 'src' => $ext_info['url'].'/img/tongue.png'),
':P' => array('title' => ':P', 'src' => $ext_info['url'].'/img/tongue.png', 'view' => 0),
':lol:' => array('title' => ':lol:', 'src' => $ext_info['url'].'/img/lol.png'),
':mad:' => array('title' => ':mad:', 'src' => $ext_info['url'].'/img/mad.png'),
':rolleyes:' => array('title' => ':rolleyes:', 'src' => $ext_info['url'].'/img/roll.png'),
':cool:' => array('title' => ':cool:', 'src' => $ext_info['url'].'/img/cool.png'),
':beer:' => array('title' => ':beer:', 'src' => $ext_info['url'].'/img/beer.gif'),
':blink:' => array('title' => ':blink:', 'src' => $ext_info['url'].'/img/blink.gif'),
':fuck:' => array('title' => ':fuck:', 'src' => $ext_info['url'].'/img/fuckyou.gif'),
':siffle:' => array('title' => ':siffle:', 'src' => $ext_info['url'].'/img/siffle.gif'),
':grrr:' => array('title' => ':grrr:', 'src' => $ext_info['url'].'/img/grrr.gif'),
':pouce:' => array('title' => ':pouce:', 'src' => $ext_info['url'].'/img/pouce.gif'),
':bienvenue:' => array('title' => ':bienvenue:', 'src' => $ext_info['url'].'/img/welcome.gif'),
));
]]></hook>
</hooks>
</extension>