This repository has been archived by the owner on Jan 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall.xml
126 lines (115 loc) · 4.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
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
<?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.0</version>
<file name="$boarddir/index.php">
<operation>
<search position="after"><![CDATA[ // Is the forum in maintenance mode? (doesn't apply to administrators.)]]></search>
<add><![CDATA[ // TinyPortal
TPortal_init();
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[// No default action huh? then go to our good old BoardIndex.
else
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}]]></search>
<add><![CDATA[ $tpAction = whichTPAction();
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
$context['linktree'] = array(array('url' => $scripturl . '?action=forum', 'name' => '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
$newtheme = TP_loadTheme();
if($newtheme != $id_theme && $newtheme > 0)
$id_theme = $newtheme;
// end TinyPortal]]></add>
</operation>
</file>
<file name="$sourcedir/Subs.php">
<operation>
<search position="replace"><![CDATA[function redirectexit($setLocation = '', $refresh = false, $permanent = false)]]></search>
<add><![CDATA[function redirectexit($setLocation = '', $refresh = false, $permanent = false, $tp_not = false)]]></add>
</operation>
<operation>
<search position="after"><![CDATA[ // Put the session ID in.
if (defined('SID') && SID != '')]]></search>
<add><![CDATA[ // TinyPortal
if ($setLocation == $scripturl && !$tp_not && !empty($context['TPortal']['redirectforum']))
$setLocation .= '?action=forum';
// end
]]></add>
</operation>
</file>
<file name="$boarddir/SSI.php">
<operation>
<search position="before"><![CDATA[require_once($sourcedir . '/Security.php');]]></search>
<add><![CDATA[require_once($sourcedir . '/TPortal.php');]]></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>
<file name="$sourcedir/Subs-Editor.php">
<operation>
<search position="replace"><![CDATA[function theme_postbox($msg)
{
global $context;
return template_control_richedit($context['post_box_name']);
}]]></search>
<add><![CDATA[function theme_postbox($msg, $from_tp = false)
{
global $context;
return template_control_richedit($context['post_box_name'], $from_tp);
}]]></add>
</operation>
</file>
<file name="$themedir/index.template.php" error="skip">
<operation>
<search position="after"><![CDATA[<a href="', $scripturl, '?action=help">', $txt['help'], '</a>]]></search>
<add><![CDATA[<a href="', $scripturl, '?action=tpmod;sa=help">', $txt['tp-tphelp'], '</a> | ]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['tp-tphelp'] = 'TinyPortal';]]></add>
</operation>
</file>
</modification>