-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.txt
356 lines (345 loc) · 13.6 KB
/
INSTALL.txt
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
/**
* @package: Split Topic Type Mod (phpBB2 for RavenNuke(tm))
* @version: 1.1
* @file: admin_splittopictype.php
* @Version 1.0.3:
* copyright (c) by Ptirhiik (Pierre) http://www.rpgnet-fr.com/
* @RavenNuke(tm) Support: 2012 neralex
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
* Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD!
*
*/
#
#-----[ COPY ]------------------------------------------
#
modules/Forums/admin/admin_splittopictype.php > modules/Forums/admin/
modules/Forums/templates/subSilver/admin/splittopictype_config.tpl > modules/Forums/templates/subSilver/admin/
#
#-----[ OPEN ]------------------------------------------
#
modules/Forums/viewforum.php
#
#-----[ FIND ]------------------------------------------
#
if( $total_topics )
{
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : split topic type
$prec_topic_real_type = -1;
//-- fin mod : split topic type
#
#-----[ FIND ]------------------------------------------
#
'U_VIEW_TOPIC' => $view_topic_url)
);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : split topic type
$topic_real_type = $topic_rowset[$i]['topic_type'];
if (!$switch_split_announce) $topic_real_type = POST_NORMAL;
if ((!$switch_split_global_announce) && ($topic_real_type == POST_GLOBAL_ANNOUNCE)) $topic_real_type = POST_ANNOUNCE;
if ((!$switch_split_sticky) && ($topic_real_type == POST_STICKY) ) $topic_real_type = POST_NORMAL;
$is_rupt = false;
if ($prec_topic_real_type != $topic_real_type) {
if ($prec_topic_real_type == -1) $is_rupt = ($topic_real_type != POST_NORMAL);
if ($prec_topic_real_type != -1) $is_rupt = true;
}
if ($is_rupt) {
$title = '';
switch ($topic_real_type) {
case POST_GLOBAL_ANNOUNCE:
$title = $lang['Post_global_announcement'].'s';
break;
case POST_ANNOUNCE:
$title = $lang['Post_Announcement'].'s';
break;
case POST_STICKY:
$title = $lang['Post_Sticky'];
break;
case POST_NORMAL:
$title = $lang['Topics'];
break;
default:
$title = '???';
break;
}
$template->assign_block_vars('topicrow.topictype', array(
'TITLE' => $title,
)
);
}
$prec_topic_real_type = $topic_real_type;
//-- fin mod : split topic type
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
$template->pparse('overall_header');
#
#-----[ BEFORE, ADD ]-----------------------------------
#
//-- mod : split topic type
if (isset( $board_config['split_announce'])) {
$switch_split_announce = $board_config['split_announce'];
}
if (isset($lang['Post_global_announcement']) && isset( $board_config['split_global_announce'])) {
$switch_split_global_announce = $board_config['split_global_announce'];
}
if (isset( $board_config['split_sticky'])) {
$switch_split_sticky = $board_config['split_sticky'];
}
//-- fin mod : split topic type
#
#-----[ OPEN ]------------------------------------------
#
# note : no change between v 1.0.2 and v 1.0.3
#
themes/YOUR_THEME/forums/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN topicrow -->
#
#-----[ AFTER, ADD ]------------------------------------------
# Note : take care to increment the colspan at your needs, ie if you've installed the Msg Icon mod
#
<!-- mod : split topic type -->
<!-- BEGIN topictype -->
<tr>
<td colspan="6" class="catLeft text-left"><span class="split_cattitle">{topicrow.topictype.TITLE}</span></td>
</tr>
<!-- END topictype -->
<!-- fin mod : split topic type -->
#
#-----[ OPEN ]------------------------------------------
#
modules/Forums/language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//-- mod : split topic type
$lang['Split_Topic_Type_Settings'] = 'Split Topic Type Settings';
$lang['Split_Announce'] = 'Split announcement from other topic types';
$lang['Split_Sticky'] = 'Split sticky topics';
$lang['Split_GOBACKCONF'] = 'Click %sHere%s to return to the Split Topic Type Configuration';
$lang['Split_DBINSTALLDONE'] = 'Database fields for Split Topic Type Mod was installed!';
$lang['Split_Global_Announce'] = 'Split global announcement';
//-- fin mod : split topic type
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
#########################################################################
# UPDATE from early MOD Version 1.0.3
#########################################################################
#
#-----[ COPY ]------------------------------------------
#
modules/Forums/admin/admin_splittopictype.php > modules/Forums/admin/
modules/Forums/templates/subSilver/admin/splittopictype_config.tpl > modules/Forums/templates/subSilver/admin/
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
//-- add v 1.0.2
// split ?
$switch_split_announce = true;
if ( !isset( $board_config['split_announce'] ) )
{
$sqlw = "insert into ".CONFIG_TABLE." (config_name,config_value) VALUES('split_announce','" . $switch_split_announce . "')";
if ( !($resultw = $db->sql_query($sqlw)) ) message_die(GENERAL_ERROR, 'Could not add key split_annonce in config table', '', __LINE__, __FILE__, $sql);
$board_config['split_announce'] = $switch_split_announce;
}
if ( isset( $board_config['split_announce'] ) )
{
$switch_split_announce = $board_config['split_announce'];
}
//-- add v 1.0.3
// split global announce
$switch_split_global_announce = isset($lang['Post_global_announcement']);
if ( isset($lang['Post_global_announcement']) && !isset( $board_config['split_global_announce'] ) )
{
$sqlw = "insert into ".CONFIG_TABLE." (config_name,config_value) VALUES('split_global_announce','" . $switch_split_global_announce . "')";
if ( !($resultw = $db->sql_query($sqlw)) ) message_die(GENERAL_ERROR, 'Could not add key split_annonce in config table', '', __LINE__, __FILE__, $sql);
$board_config['split_global_announce'] = $switch_split_global_announce;
}
if ( isset($lang['Post_global_announcement']) && isset( $board_config['split_global_announce'] ) )
{
$switch_split_global_announce = $board_config['split_global_announce'];
}
//--
// split sticky
$switch_split_sticky = true;
if ( !isset( $board_config['split_sticky'] ) )
{
$sqlw = "insert into ".CONFIG_TABLE." (config_name,config_value) VALUES('split_sticky','" . $switch_split_sticky . "')";
if ( !($resultw = $db->sql_query($sqlw)) ) message_die(GENERAL_ERROR, 'Could not add key split_sticky in config table', '', __LINE__, __FILE__, $sql);
$board_config['split_sticky'] = $switch_split_sticky;
}
if ( isset( $board_config['split_sticky'] ) )
{
$switch_split_sticky = $board_config['split_sticky'];
}
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ REPLACE IT WITH ]------------------------------------------
#
//-- mod : split topic type
if (isset( $board_config['split_announce'])) {
$switch_split_announce = $board_config['split_announce'];
}
if (isset($lang['Post_global_announcement']) && isset( $board_config['split_global_announce'])) {
$switch_split_global_announce = $board_config['split_global_announce'];
}
if (isset( $board_config['split_sticky'])) {
$switch_split_sticky = $board_config['split_sticky'];
}
//-- fin mod : split topic type
#
#-----[ OPEN ]------------------------------------------
#
modules/Forums/admin/admin_board.php
#
#-----[ FIND & REMOVE ]------------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
//-- add
$split_announce_yes = ( $new['split_announce'] ) ? "checked=\"checked\"" : "";
$split_announce_no = (!$new['split_announce'] ) ? "checked=\"checked\"" : "";
$split_sticky_yes = ( $new['split_sticky'] ) ? "checked=\"checked\"" : "";
$split_sticky_no = (!$new['split_sticky'] ) ? "checked=\"checked\"" : "";
//-- add v 1.0.3
if ( isset($lang['Post_global_announcement']) )
{
$split_global_announce_yes = ( $new['split_global_announce'] ) ? "checked=\"checked\"" : "";
$split_global_announce_no = (!$new['split_global_announce'] ) ? "checked=\"checked\"" : "";
}
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ FIND & REMOVE ]------------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
//-- add
"L_ANNOUNCEMENT_SETTINGS" => $lang['Announce_settings'],
"L_SPLIT_ANNOUNCE" => $lang['split_announce'],
"SPLIT_ANNOUNCE_YES" => $split_announce_yes,
"SPLIT_ANNOUNCE_NO" => $split_announce_no,
"L_SPLIT_STICKY" => $lang['split_sticky'],
"SPLIT_STICKY_YES" => $split_sticky_yes,
"SPLIT_STICKY_NO" => $split_sticky_no,
//-- add v 1.0.3
"L_SPLIT_GLOBAL_ANNOUNCE" => $lang['split_global_announce'],
"SPLIT_GLOBAL_ANNOUNCE_YES" => $split_global_announce_yes,
"SPLIT_GLOBAL_ANNOUNCE_NO" => $split_global_announce_no,
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ FIND & REMOVE ]------------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
//-- add v 1.0.3
if ( isset($lang['Post_global_announcement']) ) $template->assign_block_vars('switch_global_announce', array());
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------
#
modules/Forums/templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND & REMOVE ]------------------------------------------
#
<!-- mod : split topic type -->
<tr>
<th class="thHead" colspan="2">{L_ANNOUNCEMENT_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_SPLIT_ANNOUNCE}</td>
<td class="row2"><input type="radio" name="split_announce" value="1" {SPLIT_ANNOUNCE_YES} /> {L_YES} <input type="radio" name="split_announce" value="0" {SPLIT_ANNOUNCE_NO} /> {L_NO}</td>
</tr>
<!-- add v 1.0.3 -->
<!-- BEGIN switch_global_announce -->
<tr>
<td class="row1">{L_SPLIT_GLOBAL_ANNOUNCE}</td>
<td class="row2"><input type="radio" name="split_global_announce" value="1" {SPLIT_GLOBAL_ANNOUNCE_YES} /> {L_YES} <input type="radio" name="split_global_announce" value="0" {SPLIT_GLOBAL_ANNOUNCE_NO} /> {L_NO}</td>
</tr>
<!-- END switch_global_announce -->
<!-- -->
<tr>
<td class="row1">{L_SPLIT_STICKY}</td>
<td class="row2"><input type="radio" name="split_sticky" value="1" {SPLIT_STICKY_YES} /> {L_YES} <input type="radio" name="split_sticky" value="0" {SPLIT_STICKY_NO} /> {L_NO}</td>
</tr>
<!-- fin mod : split topic type -->
#
#-----[ OPEN ]------------------------------------------
#
modules/Forums/language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
//-- add
$lang['Announce_settings'] = 'Announcements Settings';
$lang['split_announce'] = 'Split announcement from other topic types';
$lang['split_sticky'] = 'Split sticky topics too';
//-- add v 1.0.3
$lang['split_global_announce'] = 'Split also global announcement';
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ REPLACE IT WITH ]------------------------------------------
#
//-- mod : split topic type
$lang['Split_Topic_Type_Settings'] = 'Split Topic Type Settings';
$lang['Split_Announce'] = 'Split announcement from other topic types';
$lang['Split_Sticky'] = 'Split sticky topics';
$lang['Split_GOBACKCONF'] = 'Click %sHere%s to return to the Split Topic Type Configuration';
$lang['Split_DBINSTALLDONE'] = 'Database fields for Split Topic Type Mod was installed!';
$lang['Split_Global_Announce'] = 'Split global announcement';
//-- fin mod : split topic type
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
##############################################################
## MOD Title: [2.0.4] split topic type
## MOD Author: Ptirhiik < [email protected] > (Pierre) http://www.rpgnet-fr.com/
## MOD Description: Split your forum into Stickie, Announcements, Global Announcements (when installed) and regular posts.
## MOD Version: 1.0.3
##
## Installation Level: easy
## Installation Time: 5 Minutes
## Files To Edit:
## viewforum.php,
## includes/page_header.php,
## templates/subSilver/viewforum_body.tpl,
## language/lang_english/lang_admin.php
## Included Files: n/a
##############################################################
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
##############################################################
## Author Note:
## you can activate or deactivate the splits from the ACP
##
## Changelog :
## v 1.0.3 : add the global announcement managing when mod global announcement is installed
## v 1.0.2 : fix a specific problem with a cache mod
##############################################################