forked from Tinyportal/TinyPortal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.xml
94 lines (89 loc) · 3.07 KB
/
install.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
<?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/">
<id>bloc:tinyportal</id>
<version>2.2.2</version>
<file name="$boarddir/index.php">
<operation>
<search position="replace"><![CDATA[writeLog();]]></search>
<add><![CDATA[
// Ignore Shouts
if(!isset($_GET['shout']))
writeLog();]]></add>
</operation>
<operation>
<search position="after"><![CDATA[ // Is the forum in maintenance mode? (doesn't apply to administrators.)]]></search>
<add><![CDATA[ // TinyPortal
if(function_exists('TPortalInit')) {
TPortalInit();
}
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[ // Action and board are both empty... BoardIndex!]]></search>
<add><![CDATA[
if(function_exists('TPortalHookDefaultAction')) {
$tpAction = TPortalHookDefaultAction();
if (!empty($tpAction)) {
return $tpAction;
}
}
]]></add>
</operation>
</file>
<file name="$sourcedir/Load.php">
<operation>
<search position="replace"><![CDATA[ // Start the linktree off empty..
$context['linktree'] = array();]]></search>
<add><![CDATA[ // Start the linktree off empty..not quite, have to insert forum
if(loadLanguage('TPortal') == false) {
loadLanguage('TPortal', 'english');
}
$context['linktree'] = array(array('url' => $scripturl . '?action=forum', 'name' => isset($txt['tp-forum']) ? $txt['tp-forum'] : 'Forum'));]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[ // Build up the linktree.
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '#c' . $board_info['cat']['id'],
'name' => $board_info['cat']['name']
)),]]></search>
<add><![CDATA[ // Build up the linktree (adding TPortal forum index)
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '?action=forum#c' . $board_info['cat']['id'],
'name' => $board_info['cat']['name']
)),]]></add>
</operation>
<operation>
<search position="before"><![CDATA[ // The theme is the forum's default.
else
$id_theme = $modSettings['theme_guests'];]]></search>
<add><![CDATA[
// TinyPortal
if(function_exists('TPortalHookLoadTheme')) {
TPortalHookLoadTheme($id_theme);
}
// end TinyPortal]]></add>
</operation>
</file>
<file name="$sourcedir/Subs.php">
<operation>
<search position="after"><![CDATA[ // Put the session ID in.
if (defined('SID') && SID != '')]]></search>
<add><![CDATA[ // TinyPortal
if ($setLocation == $scripturl && !empty($context['TPortal']['redirectforum']))
$setLocation .= '?action=forum';
// end
]]></add>
</operation>
</file>
<file name="$sourcedir/QueryString.php">
<operation>
<search position="replace"><![CDATA[?:board|topic)=]]></search>
<add><![CDATA[?:board|topic|page|cat)=]]></add>
</operation>
</file>
</modification>