-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
realdigger
committed
Aug 24, 2016
0 parents
commit fc70238
Showing
9 changed files
with
207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
*.russian.php encoding=cp1251 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea/ | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SMF Location Search in memberlist mod | ||
* **Author:** digger http://mysmf.ru | ||
* **License:** The MIT License (MIT) | ||
* **Compatible with:** SMF 2.0 | ||
|
||
## Description | ||
Search members by location. | ||
|
||
## Описание | ||
Добавляет поик пользователей по расположению. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification"> | ||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
This is an example modification file for SMF packages. | ||
ATTENTION: If you are trying to install this manually, you should try | ||
the package manager. If it will not work for you, please take a look | ||
at the following for information on this format: | ||
http://mods.simplemachines.org/docs/manual-install.php | ||
================================================================================ | ||
Modification files can be used to modify files so that they do what | ||
your package needs them to do to work properly. | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> | ||
|
||
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/"> | ||
|
||
<id>digger:location_search</id> | ||
<version>1</version> | ||
|
||
<file name="$languagedir/Modifications.english.php"> | ||
<operation> | ||
<search position="end" /> | ||
<add><![CDATA[ | ||
$txt['mlist_search_location'] = 'Search by location'; | ||
]]></add> | ||
</operation> | ||
</file> | ||
|
||
</modification> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification"> | ||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
This is an example modification file for SMF packages. | ||
ATTENTION: If you are trying to install this manually, you should try | ||
the package manager. If it will not work for you, please take a look | ||
at the following for information on this format: | ||
http://mods.simplemachines.org/docs/manual-install.php | ||
================================================================================ | ||
Modification files can be used to modify files so that they do what | ||
your package needs them to do to work properly. | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> | ||
|
||
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/"> | ||
|
||
<id>digger:location_search</id> | ||
<version>1</version> | ||
|
||
<file name="$languagedir/Modifications.russian-utf8.php" error="skip"> | ||
<operation> | ||
<search position="end" /> | ||
<add><![CDATA[ | ||
$txt['mlist_search_location'] = 'Искать по расположению'; | ||
]]></add> | ||
</operation> | ||
</file> | ||
|
||
</modification> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification"> | ||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
This is an example modification file for SMF packages. | ||
ATTENTION: If you are trying to install this manually, you should try | ||
the package manager. If it will not work for you, please take a look | ||
at the following for information on this format: | ||
http://mods.simplemachines.org/docs/manual-install.php | ||
================================================================================ | ||
Modification files can be used to modify files so that they do what | ||
your package needs them to do to work properly. | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> | ||
|
||
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/"> | ||
|
||
<id>digger:location_search</id> | ||
<version>1</version> | ||
|
||
<file name="$languagedir/Modifications.russian.php" error="skip"> | ||
<operation> | ||
<search position="end" /> | ||
<add><![CDATA[ | ||
$txt['mlist_search_location'] = 'Èñêàòü ïî ðàñïîëîæåíèþ'; | ||
]]></add> | ||
</operation> | ||
</file> | ||
|
||
</modification> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
The MIT License (MIT) // Copyright (c) 2010-2016 digger http://mysmf.ru | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification"> | ||
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/"> | ||
<name>Location Search in memberlist</name> | ||
<id>digger:location_search</id> | ||
<version>1.0</version> | ||
<file name="$sourcedir/Memberlist.php"> | ||
<operation> | ||
<search position="before"><![CDATA[ | ||
'msn' => array( | ||
'label' => $txt['msn'], | ||
'width' => '25' | ||
),]]></search> | ||
<add><![CDATA[ | ||
//Location | ||
'location' => array( | ||
'label' => $txt['location'] | ||
),]]></add> | ||
</operation> | ||
<operation> | ||
<search position="before"><![CDATA[ | ||
'msn' => array( | ||
'down' => 'LENGTH(mem.msn) > 0 ASC, IFNULL(mem.msn, 1=1) DESC, mem.msn DESC', | ||
'up' => 'LENGTH(mem.msn) > 0 DESC, IFNULL(mem.msn, 1=1) ASC, mem.msn ASC' | ||
),]]></search> | ||
<add><![CDATA[ | ||
//location | ||
'location' => array( | ||
'down' => 'mem.location DESC', | ||
'up' => 'mem.location ASC' | ||
),]]></add> | ||
</operation> | ||
|
||
<operation> | ||
<search position="before"><![CDATA[ | ||
'group' => $txt['mlist_search_group'],]]></search> | ||
<add><![CDATA[ | ||
'location' => $txt['mlist_search_location'],]]></add> | ||
</operation> | ||
|
||
<operation> | ||
<search position="before"><![CDATA[ | ||
// Search for messengers... | ||
if (in_array('messenger', $_POST['fields']) && (!$user_info['is_guest'] || empty($modSettings['guest_hideContacts']))) | ||
$fields += array(3 => 'msn', 'aim', 'icq', 'yim');]]></search> | ||
<add><![CDATA[ | ||
// Search for location. | ||
if (in_array('location', $_POST['fields'])) | ||
$fields += array(11 => 'location');]]></add> | ||
</operation> | ||
</file> | ||
<file name="$themedir/Memberlist.template.php"> | ||
<operation> | ||
<search position="before"><![CDATA[ | ||
// MSN? | ||
if (!isset($context['disabled_fields']['msn'])) | ||
echo ' | ||
<td class="windowbg2">', $member['msn']['link'], '</td>';]]></search> | ||
<add><![CDATA[ | ||
if (!isset($context['disabled_fields']['location'])) | ||
echo ' | ||
<td class="windowbg2">', $member['location'], '</td>';]]></add> | ||
</operation> | ||
</file> | ||
</modification> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info"> | ||
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/"> | ||
|
||
<id>digger:location_search</id> | ||
<name>Location Search in memberlist</name> | ||
<version>1.0</version> | ||
<type>modification</type> | ||
|
||
<install for="2.0.0 - 2.0.99"> | ||
<modification>modification.xml</modification> | ||
<modification>languages/english.xml</modification> | ||
<modification>languages/russian.xml</modification> | ||
<modification>languages/russian-utf8.xml</modification> | ||
</install> | ||
|
||
<uninstall for="2.0.0 - 2.0.99"> | ||
<modification reverse="true">modification.xml</modification> | ||
<modification>languages/english.xml</modification> | ||
<modification>languages/russian.xml</modification> | ||
<modification>languages/russian-utf8.xml</modification> | ||
</uninstall> | ||
|
||
</package-info> |