Permalink
Browse files

Importing SVN r981

  • Loading branch information...
daris committed Oct 1, 2011
0 parents commit ece571416bc7f1e63eff153bd0af22d90acbd37c
Showing with 8,546 additions and 0 deletions.
  1. +169 −0 ConnectixBoards/_config.php
  2. +7 −0 ConnectixBoards/_info.php
  3. +15 −0 ConnectixBoards/bans.php
  4. +34 −0 ConnectixBoards/categories.php
  5. +24 −0 ConnectixBoards/end.php
  6. +63 −0 ConnectixBoards/forums.php
  7. +21 −0 ConnectixBoards/groups.php
  8. +65 −0 ConnectixBoards/messages.php
  9. +61 −0 ConnectixBoards/polls.php
  10. +38 −0 ConnectixBoards/posts.php
  11. +59 −0 ConnectixBoards/topics.php
  12. +84 −0 ConnectixBoards/users.php
  13. +139 −0 IPBoard/_config.php
  14. +7 −0 IPBoard/_info.php
  15. +8 −0 IPBoard/_settings.php
  16. +22 −0 IPBoard/bans.php
  17. +22 −0 IPBoard/categories.php
  18. +25 −0 IPBoard/censoring.php.removed
  19. +4 −0 IPBoard/end.php
  20. +62 −0 IPBoard/forums.php
  21. +58 −0 IPBoard/polls.php.removed
  22. +25 −0 IPBoard/posts.php
  23. +66 −0 IPBoard/start.php.removed
  24. +40 −0 IPBoard/topics.php
  25. +87 −0 IPBoard/users.php
  26. +130 −0 InvPB/_config.php
  27. +7 −0 InvPB/_info.php
  28. +8 −0 InvPB/_settings.php
  29. +22 −0 InvPB/bans.php
  30. +22 −0 InvPB/categories.php
  31. +25 −0 InvPB/censoring.php.removed
  32. +4 −0 InvPB/end.php
  33. +62 −0 InvPB/forums.php
  34. +58 −0 InvPB/polls.php.removed
  35. +31 −0 InvPB/posts.php
  36. +66 −0 InvPB/start.php.removed
  37. +40 −0 InvPB/topics.php
  38. +69 −0 InvPB/users.php
  39. +60 −0 MyBB/_config.php
  40. +7 −0 MyBB/_info.php
  41. +32 −0 MyBB/bans.php
  42. +33 −0 MyBB/categories.php
  43. +24 −0 MyBB/end.php
  44. +49 −0 MyBB/forums.php
  45. +21 −0 MyBB/groups.php
  46. +125 −0 MyBB/messages.php
  47. +50 −0 MyBB/polls.php
  48. +33 −0 MyBB/posts.php
  49. +5 −0 MyBB/start.php.removed
  50. +51 −0 MyBB/topics.php
  51. +101 −0 MyBB/users.php
  52. +102 −0 PHP-Fusion/_config.php
  53. +7 −0 PHP-Fusion/_info.php
  54. +4 −0 PHP-Fusion/end.php
  55. +69 −0 PHP-Fusion/forums.php
  56. +29 −0 PHP-Fusion/posts.php
  57. +45 −0 PHP-Fusion/topics.php
  58. +59 −0 PHP-Fusion/users.php
  59. +132 −0 Phorum/_config.php
  60. +8 −0 Phorum/_info.php
  61. +11 −0 Phorum/categories.php
  62. +20 −0 Phorum/end.php
  63. +37 −0 Phorum/forums.php
  64. +64 −0 Phorum/posts.php
  65. +52 −0 Phorum/start.php.removed
  66. +68 −0 Phorum/users.php
  67. +116 −0 SMF/_config.php
  68. +7 −0 SMF/_info.php
  69. +18 −0 SMF/categories.php
  70. +4 −0 SMF/end.php
  71. +39 −0 SMF/forums.php
  72. +30 −0 SMF/posts.php
  73. +38 −0 SMF/topics.php
  74. +67 −0 SMF/users.php
  75. +116 −0 SMF2/_config.php
  76. +7 −0 SMF2/_info.php
  77. +18 −0 SMF2/categories.php
  78. +4 −0 SMF2/end.php
  79. +39 −0 SMF2/forums.php
  80. +30 −0 SMF2/posts.php
  81. +38 −0 SMF2/topics.php
  82. +72 −0 SMF2/users.php
  83. +76 −0 SimpleBoard/_config.php
  84. +7 −0 SimpleBoard/_info.php
  85. +4 −0 SimpleBoard/end.php
  86. +64 −0 SimpleBoard/forums.php
  87. +58 −0 SimpleBoard/posts.php
  88. +47 −0 SimpleBoard/start.php.removed
  89. +57 −0 SimpleBoard/users.php
  90. +111 −0 Sulfur.css
  91. +137 −0 YabbSE/_config.php
  92. +7 −0 YabbSE/_info.php
  93. +14 −0 YabbSE/bans.php
  94. +18 −0 YabbSE/categories.php
  95. +4 −0 YabbSE/end.php
  96. +29 −0 YabbSE/forums.php
  97. +41 −0 YabbSE/messages.php.removed
  98. +54 −0 YabbSE/polls.php.removed
  99. +35 −0 YabbSE/posts.php
  100. +45 −0 YabbSE/topics.php
  101. +49 −0 YabbSE/users.php
  102. +230 −0 changelog.txt
  103. +216 −0 done.php
  104. +48 −0 end.php
  105. +21 −0 footer.php
  106. +575 −0 functions.php
  107. +46 −0 header.php
  108. +271 −0 index.php
  109. +21 −0 init.php
  110. +25 −0 install.txt
  111. +79 −0 miniBB/_config.php
  112. +7 −0 miniBB/_info.php
  113. +4 −0 miniBB/end.php
  114. +47 −0 miniBB/forums.php
  115. +32 −0 miniBB/posts.php
  116. +6 −0 miniBB/start.php
  117. +51 −0 miniBB/topics.php
  118. +49 −0 miniBB/users.php
  119. +128 −0 password_converter_mod.txt
  120. +126 −0 phpBB2/_config.php
  121. +7 −0 phpBB2/_info.php
  122. +13 −0 phpBB2/_settings.php
  123. +32 −0 phpBB2/bans.php
  124. +33 −0 phpBB2/categories.php
  125. +40 −0 phpBB2/end.php
  126. +66 −0 phpBB2/forums.php
  127. +21 −0 phpBB2/groups.php
  128. +126 −0 phpBB2/messages.php
  129. +45 −0 phpBB2/polls.php
  130. +40 −0 phpBB2/posts.php
  131. +5 −0 phpBB2/start.php.removed
  132. +63 −0 phpBB2/topics.php
  133. +106 −0 phpBB2/users.php
  134. +98 −0 phpBB2/users_bb.php
  135. +142 −0 phpBB3/_config.php
  136. +9 −0 phpBB3/_info.php
  137. +33 −0 phpBB3/bans.php
  138. +23 −0 phpBB3/categories.php
  139. +30 −0 phpBB3/end.php
  140. +71 −0 phpBB3/forums.php
  141. +18 −0 phpBB3/groups.php
  142. +58 −0 phpBB3/messages.php
  143. +34 −0 phpBB3/posts.php
  144. +58 −0 phpBB3/topics.php
  145. +91 −0 phpBB3/users.php
  146. +20 −0 readme.txt
  147. +47 −0 search_idx.php
  148. +145 −0 settings.php
  149. +23 −0 start.php
  150. +123 −0 vbulletin/_config.php
  151. +7 −0 vbulletin/_info.php
  152. +23 −0 vbulletin/bans.php
  153. +24 −0 vbulletin/end.php
  154. +59 −0 vbulletin/forums.php
  155. +43 −0 vbulletin/messages.php.removed
  156. +49 −0 vbulletin/polls.php.removed
  157. +35 −0 vbulletin/posts.php
  158. +50 −0 vbulletin/start.php.removed
  159. +39 −0 vbulletin/topics.php
  160. +68 −0 vbulletin/users.php
@@ -0,0 +1,169 @@
<?php
// Settings, such as page title...
$settings = array(
'Title' => 'ConnectixBoards to FluxBB converter',
'Forum' => 'ConnectixBoards',
'Page' => '<b>ConnectixBoards to FluxBB</b> converter at page: ',
'db_def' => 'connectixboards',
'pre_def' => 'cb_'
);
// List of pages to go through
$parts = array(
'groups',
'users',
'categories',
'forums',
'topics',
'posts',
'bans',
'messages',
'polls',
'end'
);
$tables = array(
'Groups' => 'groups',
'Users' => 'users',
'Categories' => 'forums',
'Forums' => 'topicgroups',
'Topics' => 'topics',
'Posts' => 'messages',
'Polls' => 'polls',
'Messages' => 'mp',
);
$tablerem = array('Users' => 1);
include_once PUN_ROOT.'include/parser.php';
// Convert posts BB-code
function convert_posts($message)
{
$message = convert_to_utf8($message);
$message = str_replace("\n", '', $message);
$pattern = array(
// b, i, u, s and center
'#<!--b--><span class="b">#i',
'#</span><!--/b-->#i',
'#<!--i--><span class="i">#i',
'#</span><!--/i-->#i',
'#<!--u--><span class="u">#i',
'#</span><!--/u-->#i',
'#<!--s--><span class="s">#i',
'#</span><!--/u-->#i',
'#<!--center--><span class="center">#i',
'#</span><!--/center-->#i',
// Lists
'#<!--list(num)?--><(ul|ol)>#i',
'#</(ul|ol)><!--/list(num)?-->#i',
'#<li><span class="nodisplay">\[\*\]</span>#i',
'#</li>#i',
// Colors
'#<!--color=--><span style="color:\s*(.*?);?">#i',
'#</span><!--/color=-->#i',
// Images
'#<!--img--><img src="#i',
'#" alt="Posted Image" />(<!--/img-->)?#i',
// Smileys ans stuff
'#<img src="smileys\/.*?" alt="(.*?)" class="smiley" />#i',
//Links and emails
'#<!--url=--><a href="(.*?)">#i',
'#(<!--url-->)?<a href="(.*?)">#i',
'#<!--email--><a href="mailto:(.*?)">#i',
'#</a>(<!--/url=?-->)?#i',
'#</a><!--/email-->#i',
//Videos (ex: Youtube, Dailymotion)
'#<!--flash--><object type="application/x-shockwave-flash" data="(.*?)" width="560" height="436"><param name="quality" value="high" /><param name="movie" value="(.*?)" /></object><span class="nodisplay">\[flash\]\[/flash\]</span><!--/flash-->#i',
'#<!--youtube--><object width="425" height="350"><param name="movie" value="(.*?)"></param><param name="wmode" value="transparent"></param><embed src="(.*?)" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object><!--/youtube-->#i',
// Sizes
'#<!--size=--><span style="font-size:[0-9]{1,2}px;?">#i',
'#</span><!--/(size|font)=-->#i',
'#<!--font=--><span style="font-family:(.*?)">#i',
// Quotes och Code
'#<!--quote=?--><blockquote class="citationb?">(<p><span class="u">(.*?)</span></p>)?<p>#i',
'#</p></blockquote><!--/quote=?-->#i',
'#<!--(code|php)--><span class="code">(<p>)?<code>#i',
'#</code>(</p>)?</span><!--/(code|php)-->#i',
//Spoilers
'#<!--spoil--><span class="spoil"><span class="spoil_info" onclick="hideAndShow\(\'spoil[0-9a-f]{32}\'\);">Spoiler</span><span class="spoil_spoiler" id="spoil[0-9a-f]{32}">#i',
'#</span></span><script type="text/javascript">hideAndShow\(\'spoil[0-9a-f]{32}\'\);</script><!--/spoil-->#i',
'#<br />#i'
);
$replace = array(
// b, i, u, s and center
'[b]',
'[/b]',
'[i]',
'[/i]',
'[u]',
'[/u]',
'[s]',
'[/s]',
'',
'',
// Lists
'[list]',
'[/list]',
'[*]',
'[/*]',
// Colors
'[color=$1]',
'[/color]',
// Images
'[img]',
'[/img]',
// Smileys and stuff
'$1',
//Links and emails
'[url=$1]',
'[url]',
'[email=$1]',
'[/url]',
'[/email]',
//Videos (ex: youtube and dailymotion)
'[url]$1[/url]',
'[url]$1[/url]',
// Sizes and font family
'',
'',
'',
// Quotes och Code
'[quote]',
'[/quote]',
'[code]',
'[/code]',
//Spoilers
'[quote]',
'[/quote]',
"\n"
);
$errors = array();
return preparse_bbcode(preg_replace($pattern, $replace, $message), $errors);
}
function decode_ip($int_ip){
$hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);
}
@@ -0,0 +1,7 @@
<?php
$info = array(
'version' => 'ConnectixBoards 0.8',
'note' => '',
'update' => '2011-05-09',
);
@@ -0,0 +1,15 @@
<?php
$result = $fdb->query('SELECT * FROM '.$fdb->prefix.'banned') or myerror("Unable to get ban data");
while($ob = $fdb->fetch_assoc($result))
{
// Dataarray
$todb = array(
'ip' => ($ob['ban_ip'] == '') ? 'null' : long2ip($ob['ban_ip']),
'expire' => ($ob['ban_expires'] == '') ? 'null' : $ob['ban_expires']
);
// Save data
insertdata('bans', $todb, __FILE__, __LINE__);
}
@@ -0,0 +1,34 @@
<?php
/* */
$cat_count = 0;
// Fetch forum info
$result = $fdb->query('SELECT * FROM '.$fdb->prefix.'forums') or myerror('Unable to fetch categories', __FILE__, __LINE__, $fdb->error());
while($ob = $fdb->fetch_assoc($result))
{
echo htmlspecialchars($ob['forum_name']).' ('.$ob['forum_id'].")<br>\n"; flush();
// Dataarray
$todb = array(
'id' => $ob['forum_id'],
'cat_name' => html_entity_decode(htmlspecialchars_decode($ob['forum_name']), ENT_QUOTES, 'UTF-8'),
'disp_position' => $ob['forum_order'],
);
// Save data
insertdata('categories', $todb, __FILE__, __LINE__);
$cat_count++;
}
// If there are not categories, add default
if ($cat_count == 0)
{
$todb = array(
'id' => 1,
'cat_name' => 'Default category',
'disp_position' => 1,
);
// Save data
insertdata('categories', $todb, __FILE__, __LINE__);
}
@@ -0,0 +1,24 @@
<?php
// Get CB config
echo "\n<br>Updating FluxBB settings<br/>"; flush();
$phpconfig = array();
$result = $fdb->query('SELECT cf_field, cf_value FROM '.$fdb->prefix.'config') or myerror('Unable to get forum info', __FILE__, __LINE__, $fdb->error());
while(list($name, $var) = $fdb->fetch_row($result))
$phpconfig[$name] = $var;
// Save fluxbb config
$config = array(
'o_board_title' => $phpconfig['forumname'],
'o_board_desc' => 'Sample board description',
'o_webmaster_email' => $phpconfig['supportmail'],
);
if (isset($phpconfig['defaulttimezone']))
$config['o_server_timezone'] = $phpconfig['defaulttimezone'];
while (list($conf_name, $conf_value) = @each($config))
$db->query('UPDATE '.$db->prefix.'config SET conf_value=\''.$db->escape($conf_value).'\' WHERE conf_name=\''.$conf_name.'\'') or myerror('Unable to save config: '.$conf_name.'='.$conf_value, __FILE__, __LINE__, $db->error());
// Load global 'end' file
require './end.php';
@@ -0,0 +1,63 @@
<?php
// Fetch forum info
$cat_result = $db->query('SELECT c.id FROM '.$db->prefix.'categories AS c ORDER BY c.id') or myerror('FluxBB: Unable to get table: categories', __FILE__, __LINE__, $db->error());
$categories = array();
while($cur_cat = $db->fetch_assoc($cat_result))
$categories[] = $cur_cat['id'];
if (!$db->field_exists('forums', 'parent_forum_id'))
$db->add_field('forums', 'parent_forum_id', 'INT', true, 0);
// Fetch forum info
$result = $fdb->query('SELECT * FROM '.$fdb->prefix.'topicgroups WHERE tg_id>'.$start.' ORDER BY tg_id LIMIT '.$_SESSION['limit']) or myerror('Connectix Boards: Unable to get table: forums', __FILE__, __LINE__, $fdb->error());
$last_id = -1;
while($ob = $fdb->fetch_assoc($result))
{
$last_id = $ob['tg_id'];
echo htmlspecialchars($ob['tg_name']).' ('.$ob['tg_id'].")<br>\n"; flush();
// Check for anonymous poster id problem
// $ob['forum_last_post_id'] == -1 ? $ob['forum_last_post_id'] = 1 : null;
if ($ob['tg_lasttopic'] > 0)
{
$lastpostres = $fdb->query('SELECT t.topic_lastmessage, m.msg_id, m.msg_timestamp, m.msg_guest, m.msg_userid, u.usr_id, u.usr_name FROM '.$fdb->prefix.'topics AS t LEFT JOIN '.$fdb->prefix.'messages AS m ON t.topic_lastmessage=m.msg_id LEFT JOIN '.$fdb->prefix.'users AS u ON m.msg_userid=u.usr_id WHERE t.topic_id='.$ob['tg_lasttopic'].' ') or myerror("Unable to fetch forum last post infos for forum conversion.", __FILE__,__LINE__, $fdb->error());
$last_post = $fdb->fetch_assoc($lastpostres);
if ($last_post['msg_userid'] == 0)
$last_post['usr_name'] = $last_post['msg_guest'];
if ($last_post['usr_name'] == '')
$last_post['usr_name'] = $lang_common['Guest'];
// Change last_post = 0 to null to prevent the time-bug.
if (!isset($last_post['msg_timestamp']) || $last_post['msg_timestamp'] == 0)
$last_post['msg_timestamp'] = 'null';
if ($ob['tg_lasttopic'] == 0)
$ob['tg_lasttopic'] = 'null';
// Unset variables
if (!isset($last_post['usr_name']))
$last_post['usr_name'] = 'null';
}
// Dataarray
$todb = array(
'id' => $ob['tg_id'],
'forum_name' => html_entity_decode(htmlspecialchars_decode($ob['tg_name']), ENT_QUOTES, 'UTF-8'),
'forum_desc' => $ob['tg_comment'],
'num_topics' => $ob['tg_nbtopics'],
'num_posts' => $ob['tg_nbmess'],
'disp_position' => $ob['tg_order'],
'last_post_id' => isset($last_post['topic_lastmessage']) ? $last_post['topic_lastmessage'] : 0,
'last_poster' => isset($last_post['usr_name']) ? $last_post['usr_name'] : '',
'last_post' => isset($last_post['msg_timestamp']) ? $last_post['msg_timestamp'] : 0,
'cat_id' => $ob['tg_fromforum'],
'parent_forum_id'=> $ob['tg_fromtopicgroup'],
'redirect_url' => $ob['tg_link'],
);
// Save data
insertdata('forums', $todb, __FILE__, __LINE__);
}
convredirect('forum_id', 'forums', $last_id);
@@ -0,0 +1,21 @@
<?php
// Fetch forum info
$result = $fdb->query('SELECT * FROM '.$fdb->prefix.'groups WHERE gr_id > 4') or myerror('Unable to fetch groups', __FILE__, __LINE__, $fdb->error());
while($ob = $fdb->fetch_assoc($result))
{
echo htmlspecialchars($ob['gr_name']).' ('.$ob['gr_id'].")<br>\n"; flush();
if (trim($ob['gr_name']) == '')
$ob['gr_name'] = 'Group';
// Dataarray
$todb = array(
'g_id' => $ob['gr_id'],
'g_title' => $ob['gr_name'],
'g_user_title' => $ob['gr_name'],
);
// Save data
insertdata('groups', $todb, __FILE__, __LINE__);
}
Oops, something went wrong.

0 comments on commit ece5714

Please sign in to comment.