Skip to content

Commit

Permalink
Merge pull request #2 from realdigger/master
Browse files Browse the repository at this point in the history
Add support for modern php versions. Add Russian language.
  • Loading branch information
jdarwood007 committed Oct 9, 2017
2 parents 4bda02a + d277705 commit 5839e8f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 6 deletions.
4 changes: 2 additions & 2 deletions UnreadPMs.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

// This adds a hook to our action=.
function uPMs_hook_actionArray($actionArray)
function uPMs_hook_actionArray(&$actionArray)
{
global $modSettings;

Expand Down Expand Up @@ -45,7 +45,7 @@ function uPMs_hook_load_theme()


// Adds a hook to the general mod settings so we can manage the setting.
function uPMs_hook_general_mod_settings($config_vars)
function uPMs_hook_general_mod_settings(&$config_vars)
{
global $txt;

Expand Down
16 changes: 16 additions & 0 deletions language.russian-utf8.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<!-- This package was generated by SleePys Modification Maker at http://sleepycode.com -->
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>sleepy:unreadpmfav</id>
<version>1.0</version>

<file name="$languagedir/Modifications.russian-utf8.php" error="skip">
<operation>
<search position="end"/>
<add><![CDATA[// Unread PMs strings.
$txt['unreadPMstimeout'] = 'Счетчик непрочитанных ЛС для фавикон';
$txt['unreadPMstimeout_post'] = 'секунд между обновлениями (маленькое значение может повлиять на производительность форума)';]]></add>
</operation>
</file>
</modification>
16 changes: 16 additions & 0 deletions language.russian.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<!-- This package was generated by SleePys Modification Maker at http://sleepycode.com -->
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>sleepy:unreadpmfav</id>
<version>1.0</version>

<file name="$languagedir/Modifications.russian.php" error="skip">
<operation>
<search position="end"/>
<add><![CDATA[// Unread PMs strings.
$txt['unreadPMstimeout'] = 'Ñ÷åò÷èê íåïðî÷èòàííûõ ËÑ äëÿ ôàâèêîí';
$txt['unreadPMstimeout_post'] = 'ñåêóíä ìåæäó îáíîâëåíèÿìè (ìàëåíüêîå çíà÷åíèå ìîæåò ïîâëèÿòü íà ïðîèçâîäèòåëüíîñòü ôîðóìà)';]]></add>
</operation>
</file>
</modification>
13 changes: 9 additions & 4 deletions package-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,26 @@
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>sleepy:unreadpmfav</id>
<name>Unread PMs Favicon</name>
<version>1.0</version>
<version>1.0.2</version>
<type>modification</type>

<install for="SMF 2.0-2.0.99">
<code>hooks_add.php</code>
<move-file name="UnreadPMs.php" destination="$sourcedir/" />
<move-file name="tinycon.min.js" destination="$themedir/scripts/" />
<modification>language.xml</modification>
</install>
<modification>language.russian.xml</modification>
<modification>language.russian-utf8.xml</modification>
<redirect url="?action=admin;area=modsettings;" timeout="1000" />
</install>

<uninstall for="SMF 2.0-2.0.99">
<code>hooks_remove.php</code>
<remove-file name="$themedir/scripts/tinycon.min.js" />
<remove-file name="$sourcedir/UnreadPMs.php" />
<modification reverse="true">language.xml</modification>
</uninstall>
<modification reverse="true">language.russian.xml</modification>
<modification reverse="true">language.russian-utf8.xml</modification>
</uninstall>

</package-info>
</package-info>

0 comments on commit 5839e8f

Please sign in to comment.