diff --git a/includes/admin/converters/Example.php b/includes/admin/converters/Example.php
index 4aa6dcf..f8a6a9a 100644
a
|
b
|
|
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** |
4 | | * Implementation of Example converter. |
| 4 | * Example converter see http://codex.bbpress.org/import-forums/custom-import/ |
| 5 | * |
| 6 | * @since bbPress (r4689) |
5 | 7 | */ |
6 | | class Example_Converter extends BBP_Converter_Base |
7 | | { |
8 | | function __construct() |
9 | | { |
| 8 | class Example_Converter extends BBP_Converter_Base { |
| 9 | |
| 10 | /** |
| 11 | * Main Constructor |
| 12 | * |
| 13 | * @uses Example_Converter::setup_globals() |
| 14 | */ |
| 15 | function __construct() { |
10 | 16 | parent::__construct(); |
11 | 17 | $this->setup_globals(); |
12 | 18 | } |
13 | 19 | |
| 20 | /** |
| 21 | * Sets up the field mappings |
| 22 | */ |
| 23 | |
14 | 24 | public function setup_globals() |
15 | 25 | { |
16 | 26 | /** Forum Section ******************************************************/ |
17 | 27 | |
18 | | // Forum id. Stored in postmeta. |
| 28 | // Forum id (Stored in postmeta) |
19 | 29 | $this->field_map[] = array( |
20 | | 'from_tablename' => 'forum', 'from_fieldname' => 'forumid', |
21 | | 'to_type' => 'forum', 'to_fieldname' => '_bbp_forum_id' |
| 30 | 'from_tablename' => 'forum', |
| 31 | 'from_fieldname' => 'forumid', |
| 32 | 'to_type' => 'forum', |
| 33 | 'to_fieldname' => '_bbp_forum_id' |
22 | 34 | ); |
23 | | |
24 | | // Forum parent id. If no parent, than 0. Stored in postmeta. |
| 35 | |
| 36 | // Forum parent id (If no parent, 0. Stored in postmeta) |
25 | 37 | $this->field_map[] = array( |
26 | | 'from_tablename' => 'forum', 'from_fieldname' => 'parentid', |
27 | | 'to_type' => 'forum', 'to_fieldname' => '_bbp_parent_id' |
| 38 | 'from_tablename' => 'forum', |
| 39 | 'from_fieldname' => 'parentid', |
| 40 | 'to_type' => 'forum', |
| 41 | 'to_fieldname' => '_bbp_parent_id' |
28 | 42 | ); |
29 | | |
| 43 | |
30 | 44 | // Forum title. |
31 | 45 | $this->field_map[] = array( |
32 | | 'from_tablename' => 'forum', 'from_fieldname' => 'title', |
33 | | 'to_type' => 'forum', 'to_fieldname' => 'post_title' |
| 46 | 'from_tablename' => 'forum', |
| 47 | 'from_fieldname' => 'title', |
| 48 | 'to_type' => 'forum', |
| 49 | 'to_fieldname' => 'post_title' |
34 | 50 | ); |
35 | | |
36 | | // Forum slug. Clean name. |
| 51 | |
| 52 | // Forum slug (Clean name to avoid confilcts) |
37 | 53 | $this->field_map[] = array( |
38 | | 'from_tablename' => 'forum', 'from_fieldname' => 'title_clean', |
39 | | 'to_type' => 'forum', 'to_fieldname' => 'post_name', |
| 54 | 'from_tablename' => 'forum', |
| 55 | 'from_fieldname' => 'title_clean', |
| 56 | 'to_type' => 'forum', |
| 57 | 'to_fieldname' => 'post_name', |
40 | 58 | 'callback_method' => 'callback_slug' |
41 | 59 | ); |
42 | | |
| 60 | |
43 | 61 | // Forum description. |
44 | 62 | $this->field_map[] = array( |
45 | | 'from_tablename' => 'forum', 'from_fieldname' => 'description', |
46 | | 'to_type' => 'forum', 'to_fieldname' => 'post_content', |
| 63 | 'from_tablename' => 'forum', |
| 64 | 'from_fieldname' => 'description', |
| 65 | 'to_type' => 'forum', |
| 66 | 'to_fieldname' => 'post_content', |
47 | 67 | 'callback_method' => 'callback_null' |
48 | 68 | ); |
49 | | |
50 | | // Forum display order. Starts from 1. |
| 69 | |
| 70 | // Forum display order (Starts from 1) |
51 | 71 | $this->field_map[] = array( |
52 | | 'from_tablename' => 'forum', 'from_fieldname' => 'displayorder', |
53 | | 'to_type' => 'forum', 'to_fieldname' => 'menu_order' |
| 72 | 'from_tablename' => 'forum', |
| 73 | 'from_fieldname' => 'displayorder', |
| 74 | 'to_type' => 'forum', |
| 75 | 'to_fieldname' => 'menu_order' |
54 | 76 | ); |
55 | | |
56 | | // Forum date update. |
| 77 | |
| 78 | // Forum dates. |
57 | 79 | $this->field_map[] = array( |
58 | | 'to_type' => 'forum', 'to_fieldname' => 'post_date', |
| 80 | 'to_type' => 'forum', |
| 81 | 'to_fieldname' => 'post_date', |
59 | 82 | 'default' => date('Y-m-d H:i:s') |
60 | 83 | ); |
61 | 84 | $this->field_map[] = array( |
62 | | 'to_type' => 'forum', 'to_fieldname' => 'post_date_gmt', |
| 85 | 'to_type' => 'forum', |
| 86 | 'to_fieldname' => 'post_date_gmt', |
63 | 87 | 'default' => date('Y-m-d H:i:s') |
64 | 88 | ); |
65 | 89 | $this->field_map[] = array( |
66 | | 'to_type' => 'forum', 'to_fieldname' => 'post_modified', |
| 90 | 'to_type' => 'forum', |
| 91 | 'to_fieldname' => 'post_modified', |
67 | 92 | 'default' => date('Y-m-d H:i:s') |
68 | 93 | ); |
69 | 94 | $this->field_map[] = array( |
70 | | 'to_type' => 'forum', 'to_fieldname' => 'post_modified_gmt', |
| 95 | 'to_type' => 'forum', |
| 96 | 'to_fieldname' => 'post_modified_gmt', |
71 | 97 | 'default' => date('Y-m-d H:i:s') |
72 | 98 | ); |
73 | 99 | |
74 | 100 | /** Topic Section ******************************************************/ |
75 | 101 | |
76 | | // Topic id. Stored in postmeta. |
| 102 | // Topic id (Stored in postmeta) |
77 | 103 | $this->field_map[] = array( |
78 | | 'from_tablename' => 'thread', 'from_fieldname' => 'threadid', |
79 | | 'to_type' => 'topic', 'to_fieldname' => '_bbp_topic_id' |
| 104 | 'from_tablename' => 'thread', |
| 105 | 'from_fieldname' => 'threadid', |
| 106 | 'to_type' => 'topic', |
| 107 | 'to_fieldname' => '_bbp_topic_id' |
80 | 108 | ); |
81 | | |
82 | | // Forum id. Stored in postmeta. |
| 109 | |
| 110 | // Forum id (Stored in postmeta) |
83 | 111 | $this->field_map[] = array( |
84 | | 'from_tablename' => 'thread', 'from_fieldname' => 'forumid', |
85 | | 'to_type' => 'topic', 'to_fieldname' => '_bbp_forum_id', |
| 112 | 'from_tablename' => 'thread', |
| 113 | 'from_fieldname' => 'forumid', |
| 114 | 'to_type' => 'topic', |
| 115 | 'to_fieldname' => '_bbp_forum_id', |
86 | 116 | 'callback_method' => 'callback_forumid' |
87 | 117 | ); |
88 | | |
| 118 | |
89 | 119 | // Topic author. |
90 | 120 | $this->field_map[] = array( |
91 | | 'from_tablename' => 'thread', 'from_fieldname' => 'postuserid', |
92 | | 'to_type' => 'topic', 'to_fieldname' => 'post_author', |
| 121 | 'from_tablename' => 'thread', |
| 122 | 'from_fieldname' => 'postuserid', |
| 123 | 'to_type' => 'topic', |
| 124 | 'to_fieldname' => 'post_author', |
93 | 125 | 'callback_method' => 'callback_userid' |
94 | 126 | ); |
95 | | |
| 127 | |
96 | 128 | // Topic title. |
97 | 129 | $this->field_map[] = array( |
98 | | 'from_tablename' => 'thread', 'from_fieldname' => 'title', |
99 | | 'to_type' => 'topic', 'to_fieldname' => 'post_title' |
| 130 | 'from_tablename' => 'thread', |
| 131 | 'from_fieldname' => 'title', |
| 132 | 'to_type' => 'topic', |
| 133 | 'to_fieldname' => 'post_title' |
100 | 134 | ); |
101 | | |
102 | | // Topic slug. Clean name. |
| 135 | |
| 136 | // Topic slug (Clean name to avoid conflicts) |
103 | 137 | $this->field_map[] = array( |
104 | | 'from_tablename' => 'thread', 'from_fieldname' => 'title', |
105 | | 'to_type' => 'topic', 'to_fieldname' => 'post_name', |
| 138 | 'from_tablename' => 'thread', |
| 139 | 'from_fieldname' => 'title', |
| 140 | 'to_type' => 'topic', |
| 141 | 'to_fieldname' => 'post_name', |
106 | 142 | 'callback_method' => 'callback_slug' |
107 | 143 | ); |
108 | | |
109 | | // Forum id. If no parent, than 0. |
| 144 | |
| 145 | // Topic parent forum id (If no parent, 0) |
110 | 146 | $this->field_map[] = array( |
111 | | 'from_tablename' => 'thread', 'from_fieldname' => 'forumid', |
112 | | 'to_type' => 'topic', 'to_fieldname' => 'post_parent', |
| 147 | 'from_tablename' => 'thread', |
| 148 | 'from_fieldname' => 'forumid', |
| 149 | 'to_type' => 'topic', |
| 150 | 'to_fieldname' => 'post_parent', |
113 | 151 | 'callback_method' => 'callback_forumid' |
114 | 152 | ); |
115 | 153 | |
116 | | // Topic date update. |
| 154 | // Topic dates. |
117 | 155 | $this->field_map[] = array( |
118 | | 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', |
119 | | 'to_type' => 'topic', 'to_fieldname' => 'post_date', |
| 156 | 'from_tablename' => 'thread', |
| 157 | 'from_fieldname' => 'dateline', |
| 158 | 'to_type' => 'topic', |
| 159 | 'to_fieldname' => 'post_date', |
120 | 160 | 'callback_method' => 'callback_datetime' |
121 | 161 | ); |
122 | 162 | $this->field_map[] = array( |
123 | | 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', |
124 | | 'to_type' => 'topic', 'to_fieldname' => 'post_date_gmt', |
| 163 | 'from_tablename' => 'thread', |
| 164 | 'from_fieldname' => 'dateline', |
| 165 | 'to_type' => 'topic', |
| 166 | 'to_fieldname' => 'post_date_gmt', |
125 | 167 | 'callback_method' => 'callback_datetime' |
126 | 168 | ); |
127 | 169 | $this->field_map[] = array( |
128 | | 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', |
129 | | 'to_type' => 'topic', 'to_fieldname' => 'post_modified', |
| 170 | 'from_tablename' => 'thread', |
| 171 | 'from_fieldname' => 'dateline', |
| 172 | 'to_type' => 'topic', |
| 173 | 'to_fieldname' => 'post_modified', |
130 | 174 | 'callback_method' => 'callback_datetime' |
131 | 175 | ); |
132 | 176 | $this->field_map[] = array( |
133 | | 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', |
134 | | 'to_type' => 'topic', 'to_fieldname' => 'post_modified_gmt', |
| 177 | 'from_tablename' => 'thread', |
| 178 | 'from_fieldname' => 'dateline', |
| 179 | 'to_type' => 'topic', |
| 180 | 'to_fieldname' => 'post_modified_gmt', |
135 | 181 | 'callback_method' => 'callback_datetime' |
136 | 182 | ); |
137 | 183 | |
138 | 184 | /** Tags Section ******************************************************/ |
139 | | |
| 185 | |
140 | 186 | // Topic id. |
141 | 187 | $this->field_map[] = array( |
142 | | 'from_tablename' => 'tagcontent', 'from_fieldname' => 'contentid', |
143 | | 'to_type' => 'tags', 'to_fieldname' => 'objectid', |
| 188 | 'from_tablename' => 'tagcontent', |
| 189 | 'from_fieldname' => 'contentid', |
| 190 | 'to_type' => 'tags', |
| 191 | 'to_fieldname' => 'objectid', |
144 | 192 | 'callback_method' => 'callback_topicid' |
145 | 193 | ); |
146 | | |
| 194 | |
147 | 195 | // Tags text. |
148 | 196 | $this->field_map[] = array( |
149 | | 'from_tablename' => 'tag', 'from_fieldname' => 'tagtext', |
150 | | 'join_tablename' => 'tagcontent', 'join_type' => 'INNER', 'join_expression' => 'USING (tagid)', |
151 | | 'to_type' => 'tags', 'to_fieldname' => 'name' |
152 | | ); |
| 197 | 'from_tablename' => 'tag', |
| 198 | 'from_fieldname' => 'tagtext', |
| 199 | 'join_tablename' => 'tagcontent', |
| 200 | 'join_type' => 'INNER', |
| 201 | 'join_expression' => 'USING (tagid)', |
| 202 | 'to_type' => 'tags', |
| 203 | 'to_fieldname' => 'name' |
| 204 | ); |
153 | 205 | |
154 | | /** Post Section ******************************************************/ |
| 206 | /** Reply Section ******************************************************/ |
155 | 207 | |
156 | | // Post id. Stores in postmeta. |
| 208 | // Reply post id (Stored in postmeta) |
157 | 209 | $this->field_map[] = array( |
158 | | 'from_tablename' => 'post', 'from_fieldname' => 'postid', |
159 | | 'to_type' => 'reply', 'to_fieldname' => '_bbp_post_id' |
| 210 | 'from_tablename' => 'post', |
| 211 | 'from_fieldname' => 'postid', |
| 212 | 'to_type' => 'reply', |
| 213 | 'to_fieldname' => '_bbp_post_id' |
160 | 214 | ); |
161 | | |
162 | | // Forum id. Stores in postmeta. |
| 215 | |
| 216 | // Forum id (Stored in postmeta) |
163 | 217 | $this->field_map[] = array( |
164 | | 'from_tablename' => 'post', 'from_fieldname' => 'threadid', |
165 | | 'to_type' => 'reply', 'to_fieldname' => '_bbp_forum_id', |
| 218 | 'from_tablename' => 'post', |
| 219 | 'from_fieldname' => 'threadid', |
| 220 | 'to_type' => 'reply', |
| 221 | 'to_fieldname' => '_bbp_forum_id', |
166 | 222 | 'callback_method' => 'callback_topicid_to_forumid' |
167 | 223 | ); |
168 | | |
169 | | // Topic id. Stores in postmeta. |
| 224 | |
| 225 | // Topic id (Stored in postmeta) |
170 | 226 | $this->field_map[] = array( |
171 | | 'from_tablename' => 'post', 'from_fieldname' => 'threadid', |
172 | | 'to_type' => 'reply', 'to_fieldname' => '_bbp_topic_id', |
| 227 | 'from_tablename' => 'post', |
| 228 | 'from_fieldname' => 'threadid', |
| 229 | 'to_type' => 'reply', |
| 230 | 'to_fieldname' => '_bbp_topic_id', |
173 | 231 | 'callback_method' => 'callback_topicid' |
174 | 232 | ); |
175 | | |
176 | | // Author ip. |
| 233 | |
| 234 | // Author ip (Stored in postmeta) |
177 | 235 | $this->field_map[] = array( |
178 | | 'from_tablename' => 'post', 'from_fieldname' => 'ipaddress', |
179 | | 'to_type' => 'reply', 'to_fieldname' => '__bbp_author_ip' |
180 | | ); |
181 | | |
182 | | // Post author. |
| 236 | 'from_tablename' => 'post', |
| 237 | 'from_fieldname' => 'ipaddress', |
| 238 | 'to_type' => 'reply', |
| 239 | 'to_fieldname' => '__bbp_author_ip' |
| 240 | ); |
| 241 | |
| 242 | // Reply author. |
183 | 243 | $this->field_map[] = array( |
184 | | 'from_tablename' => 'post', 'from_fieldname' => 'userid', |
185 | | 'to_type' => 'reply', 'to_fieldname' => 'post_author', |
| 244 | 'from_tablename' => 'post', |
| 245 | 'from_fieldname' => 'userid', |
| 246 | 'to_type' => 'reply', |
| 247 | 'to_fieldname' => 'post_author', |
186 | 248 | 'callback_method' => 'callback_userid' |
187 | 249 | ); |
188 | | |
189 | | // Topic title. |
| 250 | |
| 251 | // Topic title (for reply title) |
190 | 252 | $this->field_map[] = array( |
191 | | 'from_tablename' => 'post', 'from_fieldname' => 'title', |
192 | | 'to_type' => 'reply', 'to_fieldname' => 'post_title' |
| 253 | 'from_tablename' => 'post', |
| 254 | 'from_fieldname' => 'title', |
| 255 | 'to_type' => 'reply', |
| 256 | 'to_fieldname' => 'post_title' |
193 | 257 | ); |
194 | | |
195 | | // Topic slug. Clean name. |
| 258 | |
| 259 | // Reply slug (Clean name to avoid conflicts) |
196 | 260 | $this->field_map[] = array( |
197 | | 'from_tablename' => 'post', 'from_fieldname' => 'title', |
198 | | 'to_type' => 'reply', 'to_fieldname' => 'post_name', |
| 261 | 'from_tablename' => 'post', |
| 262 | 'from_fieldname' => 'title', |
| 263 | 'to_type' => 'reply', |
| 264 | 'to_fieldname' => 'post_name', |
199 | 265 | 'callback_method' => 'callback_slug' |
200 | 266 | ); |
201 | | |
202 | | // Post content. |
| 267 | |
| 268 | // Reply content. |
203 | 269 | $this->field_map[] = array( |
204 | | 'from_tablename' => 'post', 'from_fieldname' => 'pagetext', |
205 | | 'to_type' => 'reply', 'to_fieldname' => 'post_content', |
| 270 | 'from_tablename' => 'post', |
| 271 | 'from_fieldname' => 'pagetext', |
| 272 | 'to_type' => 'reply', |
| 273 | 'to_fieldname' => 'post_content', |
206 | 274 | 'callback_method' => 'callback_html' |
207 | 275 | ); |
208 | | |
209 | | // Topic id. If no parent, than 0. |
| 276 | |
| 277 | // Reply parent topic id (If no parent, than 0) |
210 | 278 | $this->field_map[] = array( |
211 | | 'from_tablename' => 'post', 'from_fieldname' => 'threadid', |
212 | | 'to_type' => 'reply', 'to_fieldname' => 'post_parent', |
| 279 | 'from_tablename' => 'post', |
| 280 | 'from_fieldname' => 'threadid', |
| 281 | 'to_type' => 'reply', |
| 282 | 'to_fieldname' => 'post_parent', |
213 | 283 | 'callback_method' => 'callback_topicid' |
214 | 284 | ); |
215 | 285 | |
216 | | // Topic date update. |
| 286 | // Reply dates. |
217 | 287 | $this->field_map[] = array( |
218 | | 'from_tablename' => 'post', 'from_fieldname' => 'dateline', |
219 | | 'to_type' => 'reply', 'to_fieldname' => 'post_date', |
| 288 | 'from_tablename' => 'post', |
| 289 | 'from_fieldname' => 'dateline', |
| 290 | 'to_type' => 'reply', |
| 291 | 'to_fieldname' => 'post_date', |
220 | 292 | 'callback_method' => 'callback_datetime' |
221 | 293 | ); |
222 | 294 | $this->field_map[] = array( |
223 | | 'from_tablename' => 'post', 'from_fieldname' => 'dateline', |
224 | | 'to_type' => 'reply', 'to_fieldname' => 'post_date_gmt', |
| 295 | 'from_tablename' => 'post', |
| 296 | 'from_fieldname' => 'dateline', |
| 297 | 'to_type' => 'reply', |
| 298 | 'to_fieldname' => 'post_date_gmt', |
225 | 299 | 'callback_method' => 'callback_datetime' |
226 | 300 | ); |
227 | 301 | $this->field_map[] = array( |
228 | | 'from_tablename' => 'post', 'from_fieldname' => 'dateline', |
229 | | 'to_type' => 'reply', 'to_fieldname' => 'post_modified', |
| 302 | 'from_tablename' => 'post', |
| 303 | 'from_fieldname' => 'dateline', |
| 304 | 'to_type' => 'reply', |
| 305 | 'to_fieldname' => 'post_modified', |
230 | 306 | 'callback_method' => 'callback_datetime' |
231 | 307 | ); |
232 | 308 | $this->field_map[] = array( |
233 | | 'from_tablename' => 'post', 'from_fieldname' => 'dateline', |
234 | | 'to_type' => 'reply', 'to_fieldname' => 'post_modified_gmt', |
| 309 | 'from_tablename' => 'post', |
| 310 | 'from_fieldname' => 'dateline', |
| 311 | 'to_type' => 'reply', |
| 312 | 'to_fieldname' => 'post_modified_gmt', |
235 | 313 | 'callback_method' => 'callback_datetime' |
236 | 314 | ); |
237 | 315 | |
238 | 316 | /** User Section ******************************************************/ |
239 | 317 | |
240 | | // Store old User id. Stores in usermeta. |
| 318 | // Store old User id (Stored in usermeta) |
241 | 319 | $this->field_map[] = array( |
242 | | 'from_tablename' => 'user', 'from_fieldname' => 'userid', |
243 | | 'to_type' => 'user', 'to_fieldname' => '_bbp_user_id' |
| 320 | 'from_tablename' => 'user', |
| 321 | 'from_fieldname' => 'userid', |
| 322 | 'to_type' => 'user', |
| 323 | 'to_fieldname' => '_bbp_user_id' |
244 | 324 | ); |
245 | | |
246 | | // Store old User password. Stores in usermeta serialized with salt. |
| 325 | |
| 326 | // Store old User password (Stored in usermeta serialized with salt) |
247 | 327 | $this->field_map[] = array( |
248 | | 'from_tablename' => 'user', 'from_fieldname' => 'password', |
249 | | 'to_type' => 'user', 'to_fieldname' => '_bbp_password', |
| 328 | 'from_tablename' => 'user', |
| 329 | 'from_fieldname' => 'password', |
| 330 | 'to_type' => 'user', |
| 331 | 'to_fieldname' => '_bbp_password', |
250 | 332 | 'callback_method' => 'callback_savepass' |
251 | 333 | ); |
252 | 334 | |
253 | | // Store old User Salt. This is only used for the SELECT row info for the above password save |
| 335 | // Store old User Salt (This is only used for the SELECT row info for the above password save) |
254 | 336 | $this->field_map[] = array( |
255 | | 'from_tablename' => 'user', 'from_fieldname' => 'salt', |
256 | | 'to_type' => 'user', 'to_fieldname' => '' |
| 337 | 'from_tablename' => 'user', |
| 338 | 'from_fieldname' => 'salt', |
| 339 | 'to_type' => 'user', |
| 340 | 'to_fieldname' => '' |
257 | 341 | ); |
258 | | |
259 | | // User password verify class. Stores in usermeta for verifying password. |
| 342 | |
| 343 | // User password verify class (Stored in usermeta for verifying password) |
260 | 344 | $this->field_map[] = array( |
261 | | 'to_type' => 'user', 'to_fieldname' => '_bbp_class', |
262 | | 'default' => 'Vbulletin' |
| 345 | 'to_type' => 'user', |
| 346 | 'to_fieldname' => '_bbp_class', |
| 347 | 'default' => 'Example' |
263 | 348 | ); |
264 | | |
| 349 | |
265 | 350 | // User name. |
266 | 351 | $this->field_map[] = array( |
267 | | 'from_tablename' => 'user', 'from_fieldname' => 'username', |
268 | | 'to_type' => 'user', 'to_fieldname' => 'user_login' |
| 352 | 'from_tablename' => 'user', |
| 353 | 'from_fieldname' => 'username', |
| 354 | 'to_type' => 'user', |
| 355 | 'to_fieldname' => 'user_login' |
269 | 356 | ); |
270 | | |
| 357 | |
271 | 358 | // User email. |
272 | 359 | $this->field_map[] = array( |
273 | | 'from_tablename' => 'user', 'from_fieldname' => 'email', |
274 | | 'to_type' => 'user', 'to_fieldname' => 'user_email' |
| 360 | 'from_tablename' => 'user', |
| 361 | 'from_fieldname' => 'email', |
| 362 | 'to_type' => 'user', |
| 363 | 'to_fieldname' => 'user_email' |
275 | 364 | ); |
276 | | |
| 365 | |
277 | 366 | // User homepage. |
278 | 367 | $this->field_map[] = array( |
279 | | 'from_tablename' => 'user', 'from_fieldname' => 'homepage', |
280 | | 'to_type' => 'user', 'to_fieldname' => 'user_url' |
| 368 | 'from_tablename' => 'user', |
| 369 | 'from_fieldname' => 'homepage', |
| 370 | 'to_type' => 'user', |
| 371 | 'to_fieldname' => 'user_url' |
281 | 372 | ); |
282 | | |
| 373 | |
283 | 374 | // User registered. |
284 | 375 | $this->field_map[] = array( |
285 | | 'from_tablename' => 'user', 'from_fieldname' => 'joindate', |
286 | | 'to_type' => 'user', 'to_fieldname' => 'user_registered', |
| 376 | 'from_tablename' => 'user', |
| 377 | 'from_fieldname' => 'joindate', |
| 378 | 'to_type' => 'user', |
| 379 | 'to_fieldname' => 'user_registered', |
287 | 380 | 'callback_method' => 'callback_datetime' |
288 | 381 | ); |
289 | | |
290 | | // User aim. |
| 382 | |
| 383 | // User AIM (Stored in usermeta) |
291 | 384 | $this->field_map[] = array( |
292 | | 'from_tablename' => 'user', 'from_fieldname' => 'aim', |
293 | | 'to_type' => 'user', 'to_fieldname' => 'aim' |
| 385 | 'from_tablename' => 'user', |
| 386 | 'from_fieldname' => 'aim', |
| 387 | 'to_type' => 'user', |
| 388 | 'to_fieldname' => 'aim' |
294 | 389 | ); |
295 | | |
296 | | // User yahoo. |
| 390 | |
| 391 | // User Yahoo (Stored in usermeta) |
297 | 392 | $this->field_map[] = array( |
298 | | 'from_tablename' => 'user', 'from_fieldname' => 'yahoo', |
299 | | 'to_type' => 'user', 'to_fieldname' => 'yim' |
300 | | ); |
| 393 | 'from_tablename' => 'user', |
| 394 | 'from_fieldname' => 'yahoo', |
| 395 | 'to_type' => 'user', |
| 396 | 'to_fieldname' => 'yim' |
| 397 | ); |
301 | 398 | } |
302 | | |
| 399 | |
303 | 400 | /** |
304 | 401 | * This method allows us to indicates what is or is not converted for each |
305 | 402 | * converter. |