-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
218 lines (171 loc) · 5.92 KB
/
readme.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
##
##
## Mod title: MapBBCode
##
## Mod version: 1.0.0
## Works on FluxBB: 1.4.8, 1.5.5
## Release date: 2013-12-15
## Review date: YYYY-MM-DD (Leave unedited)
## Author: Ilya Zverev ([email protected])
##
## Description: This mod adds maps to a forum, using MapBBCode library.
## Supported toolbar mods: Easy BBCode, FluxToolbar,
## EZBBC Toolbar (last one is untested).
##
## Repository URL: http://fluxbb.org/resources/mods/xxx (Leave unedited)
##
## Affected files: header.php
## include/parser.php
## mod_easy_bbcode.php (for Easy BBCode mod)
## plugins/ezbbc/ezbbc_head.php (for EZBBC Toolbar mod)
## plugins/ezbbc/style/Default/ezbbc.css (for EZBBC Toolbar mod)
## include/toolbar_func.js (for FluxToolbar mod)
##
## Affects DB: No
##
## DISCLAIMER: Please note that "mods" are not officially supported by
## FluxBB. Installation of this modification is done at
## your own risk. Backup your forum database and any and
## all applicable files before proceeding.
##
##
#
#---------[ 1. UPLOAD ]-------------------------------------------------------
# copy ezbbc and fluxtoolbar files only if you have those modifications installed
#
files/include/mapbbcode/* to include/mapbbcode/
files/plugins/ezbbc/style/Default/images/map.png to plugins/ezbbc/style/Default/images/map.png
files/img/fluxtoolbar/smooth/bt_map.png to img/fluxtoolbar/smooth/bt_map.png
#
#---------[ 2. OPEN ]---------------------------------------------------------
#
header.php
#
#---------[ 3. FIND (line: 87) ]---------------------------------------------
#
<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />
#
#---------[ 4. AFTER, ADD ]-------------------------------------------------
#
<script type="text/javascript" src="include/mapbbcode/MapBBCodeLoader.min.js"></script>
<script type="text/javascript">mapBBCodeLoaderOptions.set({
path: "include/mapbbcode/",
language: "<?php echo $lang_common['lang_identifier'] ?>"
});</script>
#
#---------[ 5. OPEN ]---------------------------------------------------------
#
include/parser.php
#
#---------[ 6. FIND (line: 226) ]---------------------------------------------
#
$open_tags = array('fluxbb-bbcode');
#
#---------[ 7. BEFORE, ADD ]-------------------------------------------------
#
array_push($tags, 'map', 'mapid');
array_push($tags_opened, 'map', 'mapid');
array_push($tags_closed, 'map', 'mapid');
array_push($tags_block, 'map', 'mapid');
array_push($tags_trim, 'map', 'mapid');
$tags_quotes[] = 'map';
$tags_inline[] = 'mapid';
$tags_limit_bbcode['mapid'] = array();
#
#---------[ 8. FIND (line: 777) ]---------------------------------------------------------
#
$pattern[] = '%\[b\](.*?)\[/b\]%ms';
#
#---------[ 9. BEFORE, ADD ]---------------------------------------------
#
$pattern[] = '%\[map(=[0-9,.]+)?\](.+?)\[/map\]%ms';
$pattern[] = '%\[mapid\]([a-z]+)\[/mapid\]%';
$replace[] = '<div class="mapbbcode" map="$1">$2</div>';
$replace[] = '<div class="mapbbcode_shared">$1</div>';
#
# (for Easy BBCode modification)
#---------[ 10. OPEN ]---------------------------------------------------------
#
mod_easy_bbcode.php
#
#---------[ 11. FIND (line: 111) ]---------------------------------------------
#
<input type="button" value="IMG" name="IMG" onclick="insert_text('[img]','[/img]')" />
#
#---------[ 12. AFTER, ADD ]-------------------------------------------------
#
<input type="button" value="MAP" name="MAP" class="mapbbcode_edit" />
#
# (for EZBBC Toolbar modification)
#---------[ 13. OPEN ]---------------------------------------------------------
#
plugins/ezbbc/ezbbc_head.php
#
#---------[ 14. FIND (line: 332) ]---------------------------------------------
#
<?php if ($pun_config['p_message_img_tag'] == '1' && $ezbbc_config['img'] == 'img'): ?>
#
#---------[ 15. AFTER, ADD ]-------------------------------------------------
#
toolbar += '<a href="#" id="mapbb" title="Edit a map" class="mapbbcode_edit"><span>Map<\/span><\/a>';
#
#---------[ 16. OPEN ]---------------------------------------------------------
# repeat this for all styles used, and copy plugins/ezbbc/style/Default/images/map.png to all style directories
#
plugins/ezbbc/style/Default/ezbbc.css
#
#---------[ 17. FIND (line: 76) ]---------------------------------------------
#
#ezbbctoolbar a#image {
#
#---------[ 18. BEFORE, ADD ]-------------------------------------------------
#
#ezbbctoolbar a#mapbb {
background: url(images/map.png) no-repeat 0 0;
}
#
# (for FluxToolbar modification)
#---------[ 19. OPEN ]---------------------------------------------------------
#
include/toolbar_func.js
#
#---------[ 20. FIND (line: 202) ]---------------------------------------------
#
addButton(img, label, function() { singleTag(tag) });
}
#
#---------[ 21. REPLACE WITH ]-------------------------------------------------
#
if( tag === 'map' ) btMap(img, label); else
addButton(img, label, function() { singleTag(tag) });
}
function btMap(src, title)
{
var i = document.createElement('img');
i.id = 'but_' + numbut;
i.src = bt_img_path + src;
i.title = title.replace(/"/g, '"');
i.tabIndex = 400;
i.style.padding = '0 5px 0 0';
var li = document.createElement('a');
li.className = 'mapbbcode_edit';
li.appendChild(i);
toolbar.appendChild(li);
tabbut[numbut] = function() { singleTag('map') };
numbut++;
}
#
#---------[ 22. ACTION ]--------------------------------------------------
#
Open FluxToolbar panel in Administration page.
Click "Create new tag / Add or remove button image" at the bottom of the page.
Type:
- Name: map
- Button image: bt_map.png
- BBCode Tag: map
- Function: 0
- Position: 18
Click "Save".
#
#---------[ 23. SAVE/UPLOAD ]--------------------------------------------------
#