-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_mod_2.xml
122 lines (121 loc) · 5.48 KB
/
install_mod_2.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="./modx.prosilver.en.xsl"?>
<!--
NOTICE: Please open this file in your web browser. If presented with a security warning, you may safely tell it to allow the blocked content.
-->
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.2.xsd">
<header>
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
<title lang="en-gb">PM Search</title>
<description lang="en-gb">Adds a search-box in your pm-folders.
Can search in subjects and / or messages.
For senders and / or recepients.
Case sensitive or insensitive.
Can search for whole or partial words / sentenses.
Can search for exact query, all words or any word.</description>
<author-group>
<author>
<realname>Jari Kanerva</realname>
<email>tumba25@gmail.com</email>
<username>tumba25</username>
<homepage>http://skripter.se</homepage>
</author>
</author-group>
<mod-version>1.0.0</mod-version>
<installation>
<level>easy</level>
<time>300</time>
<target-version>3.0.4</target-version>
</installation>
<link-group>
<link type="template" lang="en-gb" href="./contrib/subsilver2.xml">Instructions for subsilver2 style</link>
</link-group>
<history>
<entry>
<date>2009-03-12</date>
<rev-version>1.0.0</rev-version>
<changelog lang="en-gb">
<change>Time for validation. Validators are nice people.</change>
</changelog>
</entry>
</history>
</header>
<action-group>
<copy>
<file from="root/includes/pm_search/*.*" to="includes/pm_search/*.*" />
<file from="root/language/en/mods/pm_search.php" to="language/en/mods/pm_search.php" />
<file from="root/language/en/mods/permissions_pm_search.php" to="language/en/mods/permissions_pm_search.php" />
<file from="root/styles/prosilver/template/ucp_pm_search.html" to="styles/prosilver/template/ucp_pm_search.html" />
<file from="root/styles/prosilver/template/ucp_pm_search_results.html" to="styles/prosilver/template/ucp_pm_search_results.html" />
</copy>
<open src="includes/ucp/ucp_pm.php">
<edit>
<find><![CDATA[ switch ($mode)
{]]></find>
<action type="after-add"><![CDATA[ case 'search':
// PM Search
include($phpbb_root_path . 'includes/pm_search/pm_search.' . $phpEx);
break;]]></action>
</edit>
</open>
<open src="includes/ucp/ucp_pm_viewfolder.php">
<edit>
<find><![CDATA[ else
{
$pm_count = (!empty($folder[$folder_id]['num_messages'])) ? $folder[$folder_id]['num_messages'] : 0;
$sql_limit_time = '';
}]]></find>
<action type="after-add"><![CDATA[ // PM Search
include($phpbb_root_path . 'includes/pm_search/functions_pm_search.' . $phpEx);
$template->assign_vars(pm_search_viewfolder_setup($folder_id, $start));]]></action>
</edit>
</open>
<open src="includes/ucp/ucp_pm_viewmessage.php">
<edit>
<find><![CDATA[ $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');]]></find>
<action type="after-add"><![CDATA[ // PM Search
if(isset($_GET['hilit']))
{
include($phpbb_root_path . 'includes/pm_search/functions_pm_search.' . $phpEx);
$message = pm_search_hilit($message);
}]]></action>
</edit>
</open>
<open src="includes/ucp/info/ucp_pm.php">
<edit>
<find><![CDATA[ 'view' => array('title' => 'UCP_PM_VIEW', 'auth' => 'cfg_allow_privmsg', 'display' => false, 'cat' => array('UCP_PM')),]]></find>
<action type="after-add"><![CDATA[ // PM Search
'search' => array('title' => 'UCP_PM_SEARCH', 'auth' => 'cfg_allow_privmsg', 'display' => false, 'cat' => array('UCP_PM')),]]></action>
</edit>
</open>
<open src="language/en/acp/common.php">
<edit>
<find><![CDATA[ 'UCP' => 'User Control Panel',]]></find>
<action type="after-add"><![CDATA[ 'UCP_PM_SEARCH' => 'PM Search',]]></action>
</edit>
</open>
<open src="styles/prosilver/template/ucp_pm_message_header.html">
<edit>
<comment lang="en"><![CDATA[Just delete the line, it will be added in the next edit.]]></comment>
<find><![CDATA[<form id="viewfolder" method="post" action="{S_PM_ACTION}">]]></find>
<action type="replace-with"></action>
</edit>
<edit>
<find><![CDATA[ <!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_FORWARD_PM}</a></div><!-- ENDIF -->
</div>
<!-- ENDIF -->]]></find>
<action type="after-add"><![CDATA[ <!-- IF S_DISPLAY_SEARCHBOX -->
<!-- INCLUDE pm_search.html -->
<!-- ENDIF -->
<form id="viewfolder" method="post" action="{S_PM_ACTION}">]]></action>
</edit>
</open>
<diy-instructions lang="en-gb">Copy the install directory to your forum's root path and run install/install.php.
Go to ACP > System. Under Module management in the left field select User Control Panel.
In the right field select Private messages.
In the drop down menu next to the "Add module" button select PM Search and hit "Add module".
Then enable that module and purge your forum cache.
Go to ACP > Users and groups > Groups permissions, add the 'Can use PM search' permission to the right groups.</diy-instructions>
</action-group>
</mod>