commit 43721d29125ef0ca4eb7e30fb72aeb90b62cb035 Author: root Date: Sat Nov 26 20:21:27 2011 +0400 initial import. Probably needs some more cleanup diff --git a/Packages/GoogleMapsMod-0_55.tar.gz b/Packages/GoogleMapsMod-0_55.tar.gz new file mode 100644 index 0000000..4cad85a Binary files /dev/null and b/Packages/GoogleMapsMod-0_55.tar.gz differ diff --git a/Packages/Googlebot_v105_smf1.0.6.zip b/Packages/Googlebot_v105_smf1.0.6.zip new file mode 100644 index 0000000..88a41c9 Binary files /dev/null and b/Packages/Googlebot_v105_smf1.0.6.zip differ diff --git a/Packages/Karma_Description_Mod_ver.1.9.7.zip b/Packages/Karma_Description_Mod_ver.1.9.7.zip new file mode 100644 index 0000000..2904501 Binary files /dev/null and b/Packages/Karma_Description_Mod_ver.1.9.7.zip differ diff --git a/Packages/ProfileComments2.0.1.zip b/Packages/ProfileComments2.0.1.zip new file mode 100755 index 0000000..a555f3b Binary files /dev/null and b/Packages/ProfileComments2.0.1.zip differ diff --git a/Packages/enhanced_qr.zip b/Packages/enhanced_qr.zip new file mode 100644 index 0000000..b345334 Binary files /dev/null and b/Packages/enhanced_qr.zip differ diff --git a/Packages/index.php b/Packages/index.php new file mode 100644 index 0000000..fc83b4e --- /dev/null +++ b/Packages/index.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/Packages/installed.list b/Packages/installed.list new file mode 100755 index 0000000..a5cc533 --- /dev/null +++ b/Packages/installed.list @@ -0,0 +1,10 @@ +MySQL 5.0.12 Compatibility Update|^|smf_mysql_5_0_12.tar.gz|^|smf:mysql-5.0.12|^|1.0 +Google Member Map|^|GoogleMapsMod-0_55.tar.gz|^|TLM:GoogleMapsMod|^|0.55 +Karma Description Mod|^|Karma_Description_Mod_ver.1.9.7.zip|^|IvanV.PetrovichAkaGrek:KarmaDescriptionMod|^|1.9.7 +Now Playing|^|nowplaying_1-1.tar.gz|^|Oldiesmann:NowPlaying|^|1.1 +Enhanced Quick Reply|^|enhanced_qr.zip|^|kirby:enhanced_qr|^|TBA +Googlebot & Spiders Mod|^|Googlebot_v105_smf1.0.6.zip|^|obazavil:googlebot|^|1.0.5 +VisualWarning|^|vw.zip|^|Grudge:VisualWarning|^|1.27 +Sticky First Post (extends sticky topic)|^|stickyfirst.tar.gz|^|kuklovod:extendedStickyTopic|^|1.2.2 +SMF 1.0.7 / 1.1 RC2 Update|^|smf_patch_1.0.7_1.1-RC2-1.tar.gz|^|smf:smf-1.0.7|^|1.0 +SMF 1.0.8 Update Package|^|smf_1-0-8_package.tar.gz|^|smf:smf_1-0-8|^|1.0.8 diff --git a/Packages/nowplaying_1-1.tar.gz b/Packages/nowplaying_1-1.tar.gz new file mode 100644 index 0000000..e05c5c7 Binary files /dev/null and b/Packages/nowplaying_1-1.tar.gz differ diff --git a/Packages/server.list b/Packages/server.list new file mode 100755 index 0000000..2ca56bb --- /dev/null +++ b/Packages/server.list @@ -0,0 +1 @@ +Simple Machines Third-party Mod Site|^|http://mods.simplemachines.org \ No newline at end of file diff --git a/Packages/smf_1-0-8_package.tar.gz b/Packages/smf_1-0-8_package.tar.gz new file mode 100644 index 0000000..d7faac9 Binary files /dev/null and b/Packages/smf_1-0-8_package.tar.gz differ diff --git a/Packages/smf_patch_1.0.7_1.1-RC2-1.tar.gz b/Packages/smf_patch_1.0.7_1.1-RC2-1.tar.gz new file mode 100644 index 0000000..c35fdd2 Binary files /dev/null and b/Packages/smf_patch_1.0.7_1.1-RC2-1.tar.gz differ diff --git a/Packages/stickyfirst.tar.gz b/Packages/stickyfirst.tar.gz new file mode 100644 index 0000000..3c17d71 Binary files /dev/null and b/Packages/stickyfirst.tar.gz differ diff --git a/Packages/vw.zip b/Packages/vw.zip new file mode 100644 index 0000000..cc83dab Binary files /dev/null and b/Packages/vw.zip differ diff --git a/SSI.php b/SSI.php new file mode 100644 index 0000000..e568040 --- /dev/null +++ b/SSI.php @@ -0,0 +1,1479 @@ +', $context['user']['name'], '', allowedTo('pm_read') ? ', ' . $txt[152] . ' ' . $context['user']['messages'] . ' ' . ($context['user']['messages'] == '1' ? $txt[471] : $txt[153]) . '' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == '1' ? $txt['newmessages0'] : $txt['newmessages1']) : '', '.'; + } + // Don't echo... then do what?! + else + return $context['user']; +} + +// Display a menu bar, like is displayed at the top of the forum. +function ssi_menubar($output_method = 'echo') +{ + global $context; + + if ($output_method == 'echo') + template_menu(); + // What else could this do? + else + return $context; +} + +// Show a logout link. +function ssi_logout($redirect_to = '', $output_method = 'echo') +{ + global $context, $txt, $scripturl, $sc; + + if ($redirect_to != '') + $_SESSION['logout_url'] = $redirect_to; + + // Guests can't log out. + if ($context['user']['is_guest']) + return false; + + echo '', $txt[108], ''; +} + +// Recent post list: [board] Subject by Poster Date +function ssi_recentPosts($num_recent = 8, $exclude_boards = array(), $output_method = 'echo') +{ + global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings; + + // Find all the posts. Newer ones will have higher IDs. + $request = db_query(" + SELECT + m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, m.ID_BOARD, b.name AS bName, + IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS logTime' : ' + IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) >= GREATEST(m.posterTime, m.modifiedTime) AS isRead, + IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS logTime') . " + FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? " + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = m.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = m.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . " + WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 5 * $num_recent) . " + AND b.ID_BOARD = m.ID_BOARD" . (empty($exclude_boards) ? '' : " + AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . " + AND $user_info[query_see_board] + ORDER BY m.ID_MSG DESC + LIMIT $num_recent", __FILE__, __LINE__); + $posts = array(); + while ($row = mysql_fetch_assoc($request)) + { + // Censor the subject. + censorText($row['subject']); + + // Build the array. + $posts[] = array( + 'board' => array( + 'id' => $row['ID_BOARD'], + 'name' => $row['bName'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['bName'] . '' + ), + 'topic' => $row['ID_TOPIC'], + 'poster' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['posterName'], + 'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '' . $row['posterName'] . '' + ), + 'subject' => $row['subject'], + 'short_subject' => strlen(un_htmlspecialchars($row['subject'])) > 25 ? htmlspecialchars(substr(un_htmlspecialchars($row['subject']), 0, 22) . '...') : $row['subject'], + 'time' => timeformat($row['posterTime']), + 'timestamp' => $row['posterTime'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#msg' . $row['ID_MSG'], + 'link' => '' . $row['subject'] . '', + 'new' => !empty($row['isRead']), + 'newtime' => $row['logTime'] + ); + } + mysql_free_result($request); + + // Just return it. + if ($output_method != 'echo' || empty($posts)) + return $posts; + + echo ' + '; + foreach ($posts as $post) + echo ' + + + + + '; + echo ' +
+ [', $post['board']['link'], '] + + ', $post['subject'], ' + ', $txt[525], ' ', $post['poster']['link'], ' + ', $post['new'] ? '' : '' . $txt[302] . '', ' + + ', $post['time'], ' +
'; +} + +// Recent topic list: [board] Subject by Poster Date +function ssi_recentTopics($num_recent = 8, $exclude_boards = array(), $output_method = 'echo') +{ + global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings; + + // Find all the posts in distinct topics. Newer ones will have higher IDs. + $request = db_query(" + SELECT + m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName, + IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS logTime' : ' + IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) >= GREATEST(m.posterTime, m.modifiedTime) AS isRead, + IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS logTime') . " + FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? " + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . " + WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 8 * $num_recent) . " + AND t.ID_LAST_MSG = m.ID_MSG + AND b.ID_BOARD = t.ID_BOARD" . (empty($exclude_boards) ? '' : " + AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . " + AND $user_info[query_see_board] + AND ms.ID_MSG = t.ID_FIRST_MSG + ORDER BY m.ID_MSG DESC + LIMIT $num_recent", __FILE__, __LINE__); + $posts = array(); + while ($row = mysql_fetch_assoc($request)) + { + // Censor the subject. + censorText($row['subject']); + + // Build the array. + $posts[] = array( + 'board' => array( + 'id' => $row['ID_BOARD'], + 'name' => $row['bName'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['bName'] . '' + ), + 'topic' => $row['ID_TOPIC'], + 'poster' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['posterName'], + 'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '' . $row['posterName'] . '' + ), + 'subject' => $row['subject'], + 'short_subject' => strlen(un_htmlspecialchars($row['subject'])) > 25 ? htmlspecialchars(substr(un_htmlspecialchars($row['subject']), 0, 22) . '...') : $row['subject'], + 'time' => timeformat($row['posterTime']), + 'timestamp' => $row['posterTime'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#msg' . $row['ID_MSG'], + 'link' => '' . $row['subject'] . '', + 'new' => !empty($row['isRead']), + 'newtime' => $row['logTime'] + ); + } + mysql_free_result($request); + + // Just return it. + if ($output_method != 'echo' || empty($posts)) + return $posts; + + echo ' + '; + foreach ($posts as $post) + echo ' + + + + + '; + echo ' +
+ [', $post['board']['link'], '] + + ', $post['subject'], ' + ', $txt[525], ' ', $post['poster']['link'], ' + ', $post['new'] ? '' : '' . $txt[302] . '', ' + + ', $post['time'], ' +
'; +} + +// Show the top poster's name and profile link. +function ssi_topPoster($topNumber = 1, $output_method = 'echo') +{ + global $db_prefix, $scripturl; + + // Find the latest poster. + $request = db_query(" + SELECT ID_MEMBER, realName + FROM {$db_prefix}members + ORDER BY posts DESC + LIMIT $topNumber", __FILE__, __LINE__); + $return = array(); + while ($row = mysql_fetch_assoc($request)) + $return[] = array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['realName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '' + ); + mysql_free_result($request); + + // Just return all the top posters. + if ($output_method != 'echo') + return $return; + + // Make a quick array to list the links in. + $temp_array = array(); + foreach ($return as $member) + $temp_array[] = $member['link']; + + echo implode(', ', $temp_array); +} + +// Show boards by activity. +function ssi_topBoards($num_top = 10, $output_method = 'echo') +{ + global $context, $settings, $db_prefix, $txt, $scripturl, $ID_MEMBER, $user_info; + + // Find boards with lots of posts. + $request = db_query(" + SELECT + b.name, b.numTopics, b.numPosts, b.ID_BOARD," . (!$user_info['is_guest'] ? ' 1 AS isRead' : ' + (IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isRead') . " + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER) + WHERE $user_info[query_see_board] + ORDER BY b.numPosts DESC + LIMIT $num_top", __FILE__, __LINE__); + $boards = array(); + while ($row = mysql_fetch_assoc($request)) + $boards[] = array( + 'id' => $row['ID_BOARD'], + 'num_posts' => $row['numPosts'], + 'num_topics' => $row['numTopics'], + 'name' => $row['name'], + 'new' => empty($row['isRead']), + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['name'] . '' + ); + mysql_free_result($request); + + // If we shouldn't output or have nothing to output, just jump out. + if ($output_method != 'echo' || empty($boards)) + return $boards; + + echo ' + + + + + + '; + foreach ($boards as $board) + echo ' + + + + + '; + echo ' +
', $txt['smf82'], '', $txt[330], '', $txt[21], '
', $board['link'], $board['new'] ? ' ' . $txt[302] . '' : '', '', $board['num_topics'], '', $board['num_posts'], '
'; +} + +// Shows the top topics. +function ssi_topTopics($type = 'replies', $num_topics = 10, $output_method = 'echo') +{ + global $db_prefix, $txt, $scripturl, $ID_MEMBER, $user_info; + + $request = db_query(" + SELECT m.subject, m.ID_TOPIC, t.numViews, t.numReplies + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m, {$db_prefix}boards AS b + WHERE m.ID_MSG = t.ID_FIRST_MSG + AND t.ID_BOARD = b.ID_BOARD + AND $user_info[query_see_board] + ORDER BY t.num" . ($type != 'replies' ? 'Views' : 'Replies') . " DESC + LIMIT $num_topics", __FILE__, __LINE__); + $topics = array(); + while ($row = mysql_fetch_assoc($request)) + { + censorText($row['subject']); + + $topics[] = array( + 'id' => $row['ID_TOPIC'], + 'subject' => $row['subject'], + 'num_replies' => $row['numReplies'], + 'num_views' => $row['numViews'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0', + 'link' => '' . $row['subject'] . '', + ); + } + mysql_free_result($request); + + if ($output_method != 'echo' || empty($topics)) + return $topics; + + echo ' + + + + + + '; + foreach ($topics as $topic) + echo ' + + + + + '; + echo ' +
', $txt[301], '', $txt[110], '
+ ', $topic['link'], ' + ', $topic['num_views'], '', $topic['num_replies'], '
'; +} + +// Shows the top topics, by replies. +function ssi_topTopicsReplies($num_topics = 10, $output_method = 'echo') +{ + return ssi_topTopics('replies', $num_topics, $output_method); +} + +// Shows the top topics, by views. +function ssi_topTopicsViews($num_topics = 10, $output_method = 'echo') +{ + return ssi_topTopics('views', $num_topics, $output_method); +} + +// Show a link to the latest member: Please welcome, Someone, out latest member. +function ssi_latestMember($output_method = 'echo') +{ + global $db_prefix, $txt, $scripturl, $modSettings; + + if ($output_method == 'echo') + echo ' + ', $txt[201], ' ', $modSettings['latestRealName'], '', $txt[581], '
'; + else + return array( + 'id' => $modSettings['latestMember'], + 'name' => $modSettings['latestRealName'], + 'href' => $scripturl . '?action=profile;u=' . $modSettings['latestMember'], + 'link' => '' . $modSettings['latestRealName'] . '' + ); +} + +// Show some basic stats: Total This: XXXX, etc. +function ssi_boardStats($output_method = 'echo') +{ + global $db_prefix, $txt, $scripturl, $modSettings; + + $totals = array( + 'members' => $modSettings['memberCount'], + 'posts' => $modSettings['totalMessages'], + 'topics' => $modSettings['totalTopics'] + ); + + $result = db_query(" + SELECT COUNT(ID_BOARD) + FROM {$db_prefix}boards", __FILE__, __LINE__); + list ($totals['boards']) = mysql_fetch_row($result); + mysql_free_result($result); + + $result = db_query(" + SELECT COUNT(ID_CAT) + FROM {$db_prefix}categories", __FILE__, __LINE__); + list ($totals['categories']) = mysql_fetch_row($result); + mysql_free_result($result); + + if ($output_method != 'echo') + return $totals; + + echo ' + ', $txt[488], ': ', $totals['members'], '
+ ', $txt[489], ': ', $totals['posts'], '
+ ', $txt[490], ': ', $totals['topics'], '
+ ', $txt[658], ': ', $totals['categories'], '
+ ', $txt[665], ': ', $totals['boards']; +} + +// Shows a list of online users: YY Guests, ZZ Users and then a list... +function ssi_whosOnline($output_method = 'echo') +{ + global $scripturl, $db_prefix, $txt; + global $modSettings; + + // Load the users online right now. + $result = db_query(" + SELECT + lo.ID_MEMBER, lo.logTime, lo.url, mem.realName, mem.memberName, mem.showOnline, + mg.onlineColor, mg.ID_GROUP + FROM {$db_prefix}log_online AS lo + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER) + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))", __FILE__, __LINE__); + + $return['users'] = array(); + $return['guests'] = 0; + $return['hidden'] = 0; + $return['spiders'] = array(); + $return['num_spiders'] = 0; + while ($row = mysql_fetch_assoc($result)) + { + if (!isset($row['realName'])) + { + // Get the request parameters.. + $actions = @unserialize($row['url']); + + // Is a spider? + $is_spider = ob_googlebot_getAgent($actions['USER_AGENT'], $spider_name, $agent, $row['ID_MEMBER'] == 0); + + if (!$is_spider) + $return['guests']++; + else + { + $return['num_spiders']++; + + if ($modSettings['ob_googlebot_display_agent']) + $spider_name = $agent; + + if ($modSettings['ob_googlebot_count_all_instances'] && $modSettings['ob_googlebot_display_all_instances']) + $return['spiders'][] = $spider_name; + else + $return['spiders'][$agent] = $spider_name; + } + } + elseif (!empty($row['showOnline']) || allowedTo('moderate_forum')) + { + // Some basic color coding... + if (!empty($row['onlineColor'])) + $link = '' . $row['realName'] . ''; + else + $link = '' . $row['realName'] . ''; + + $return['users'][$row['logTime'] . $row['memberName']] = array( + 'id' => $row['ID_MEMBER'], + 'username' => $row['memberName'], + 'name' => $row['realName'], + 'group' => $row['ID_GROUP'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => $link, + 'hidden' => empty($row['showOnline']), + 'is_last' => false, + ); + } + else + $return['hidden']++; + } + mysql_free_result($result); + + if (!empty($return['users'])) + { + krsort($return['users']); + $userlist = array_keys($return['users']); + $return['users'][$userlist[count($userlist) - 1]]['is_last'] = true; + } + $return['num_users'] = count($return['users']) + $return['hidden']; + $return['total_users'] = $return['num_users'] + $return['guests'] + ($modSettings['ob_googlebot_count_most_online'] ? $return['num_spiders'] : 0); + + ksort($return['spiders']); + + // Allowed user to see spiders online? + if (!allowedTo('googlebot_view')) + { + $return['spiders'] = array(); + $return['guests'] += $return['num_spiders']; + } + + // Don't count all instances of a spider, only 1 for each different spider + if (!empty($return['spiders']) && !$modSettings['ob_googlebot_count_all_instances']) + $return['num_spiders'] = count($return['spiders']); + + // Diplay how many instances of each spider + if (!empty($return['spiders']) && $modSettings['ob_googlebot_count_all_instances'] && $modSettings['ob_googlebot_display_all_instances']) + { + $spider_grouped = array_count_values($return['spiders']); + + $return['spiders'] = array(); + foreach ($spider_grouped as $k => $v) + $return['spiders'][$k] = $k . ($v == 1 ? '' : ' (' . $v . ')'); + } + + if ($output_method != 'echo') + return $return; + + echo ' + ', (empty($return['spiders']) ? '' : $return['num_spiders'] . ' ' . ($return['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '), $return['guests'], ' ', $return['guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', $return['num_users'], ' ', $return['num_users'] == 1 ? $txt['user'] : $txt['users'], $return['hidden'] > 0 ? ' (' . $return['hidden'] . ' ' . $txt['hidden'] . ')' : '', '
+ '; + + foreach ($return['users'] as $user) + echo $user['hidden'] ? '' . $user['link'] . '' : $user['link'], $user['is_last'] ? '' : ', '; + + if (!empty($return['spiders'])) + { + if ($modSettings['ob_googlebot_display_own_list']) + echo ' +
'; + else + { + if (!empty($return['users'])) + echo ', '; + } + + echo implode(', ', $return['spiders']); + } +} + +// Just like whosOnline except it also logs the online presence. +function ssi_logOnline($output_method = 'echo') +{ + writeLog(); + + if ($output_method != 'echo') + return ssi_whosOnline($output_method); + else + ssi_whosOnline($output_method); +} + +// Shows a login box. +function ssi_login($redirect_to = '', $output_method = 'echo') +{ + global $scripturl, $txt, $user_info; + + if ($redirect_to != '') + $_SESSION['login_url'] = $redirect_to; + + if ($output_method != 'echo' || !$user_info['is_guest']) + return $user_info['is_guest']; + + echo ' +
+ + + + + + + + + + + +
 
 
+
'; +} + +// Show the most-voted-in poll. +function ssi_topPoll($output_method = 'echo') +{ + // Just use recentPoll, no need to duplicate code... + return ssi_recentPoll($output_method, true); +} + +// Show the most recently posted poll. +function ssi_recentPoll($output_method = 'echo', $topPollInstead = false) +{ + global $db_prefix, $txt, $ID_MEMBER, $settings, $boardurl, $sc, $user_info; + + $boardsAllowed = array_intersect(boardsAllowedTo('poll_view'), boardsAllowedTo('poll_vote')); + + if (empty($boardsAllowed)) + return array(); + + $request = db_query(" + SELECT p.ID_POLL, p.question, t.ID_TOPIC, p.maxVotes + FROM ({$db_prefix}polls AS p, {$db_prefix}boards AS b, {$db_prefix}topics AS t" . ($topPollInstead ? ", {$db_prefix}poll_choices AS pc" : '') . ") + LEFT JOIN {$db_prefix}log_polls AS lp ON (lp.ID_POLL = p.ID_POLL AND lp.ID_MEMBER = $ID_MEMBER) + WHERE p.votingLocked = 0" . ($topPollInstead ? " + AND pc.ID_POLL = p.ID_POLL" : '') . " + AND lp.ID_CHOICE IS NULL + AND t.ID_POLL = p.ID_POLL + AND b.ID_BOARD = t.ID_BOARD + AND $user_info[query_see_board]" . (!in_array(0, $boardsAllowed) ? " + AND b.ID_BOARD IN (" . implode(', ', $boardsAllowed) . ")" : '') . " + ORDER BY " . ($topPollInstead ? 'pc.votes' : 'p.ID_POLL') . " DESC + LIMIT 1", __FILE__, __LINE__); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + // This user has voted on all the polls. + if ($row === false) + return array(); + + $request = db_query(" + SELECT COUNT(DISTINCT ID_MEMBER) + FROM {$db_prefix}log_polls + WHERE ID_POLL = $row[ID_POLL]", __FILE__, __LINE__); + list ($total) = mysql_fetch_row($request); + mysql_free_result($request); + + $request = db_query(" + SELECT ID_CHOICE, label, votes + FROM {$db_prefix}poll_choices + WHERE ID_POLL = $row[ID_POLL]", __FILE__, __LINE__); + $options = array(); + while ($rowChoice = mysql_fetch_assoc($request)) + $options[$rowChoice['ID_CHOICE']] = array($rowChoice['label'], $rowChoice['votes']); + mysql_free_result($request); + + $return = array( + 'id' => $row['ID_POLL'], + 'image' => 'poll', + 'question' => $row['question'], + 'total_votes' => $total, + 'is_locked' => false, + 'topic' => $row['ID_TOPIC'], + 'options' => array() + ); + + // Calculate the percentages and bar lengths... + $divisor = $return['total_votes'] == 0 ? 1 : $return['total_votes']; + foreach ($options as $i => $option) + { + $bar = floor(($option[1] * 100) / $divisor); + $barWide = $bar == 0 ? 1 : floor(($bar * 5) / 3); + $return['options'][$i] = array( + 'percent' => $bar, + 'votes' => $option[1], + 'bar' => '-', + 'option' => doUBBC($option[0]), + 'vote_button' => '' + ); + } + + $return['allowed_warning'] = $row['maxVotes'] > 1 ? sprintf($txt['poll_options6'], $row['maxVotes']) : ''; + + if ($output_method != 'echo') + return $return; + + echo ' +
+ + + + + + + + '; + foreach ($return['options'] as $option) + echo ' + + + '; + echo ' + + + +
', $return['question'], '
', $return['allowed_warning'], '
+ +
'; +} + +function ssi_showPoll($topic = null, $output_method = 'echo') +{ + global $db_prefix, $txt, $ID_MEMBER, $settings, $boardurl, $sc, $user_info; + + $boardsAllowed = boardsAllowedTo('poll_view'); + + if (empty($boardsAllowed)) + return array(); + + if ($topic === null && isset($_REQUEST['ssi_topic'])) + $topic = (int) $_REQUEST['ssi_topic']; + else + $topic = (int) $topic; + + $request = db_query(" + SELECT + p.ID_POLL, p.question, p.votingLocked, p.hideResults, p.expireTime, p.maxVotes + FROM {$db_prefix}topics AS t, {$db_prefix}polls AS p, {$db_prefix}boards AS b + WHERE p.ID_POLL = t.ID_POLL + AND t.ID_TOPIC = $topic + AND b.ID_BOARD = t.ID_BOARD + AND $user_info[query_see_board]" . (!in_array(0, $boardsAllowed) ? " + AND b.ID_BOARD IN (" . implode(', ', $boardsAllowed) . ")" : '') . " + LIMIT 1", __FILE__, __LINE__); + + // Either this topic has no poll, or the user cannot view it. + if (mysql_num_rows($request) == 0) + return array(); + + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + // Check if they can vote. + if (!empty($row['expireTime']) && $row['expireTime'] < time()) + $allow_vote = false; + elseif ($user_info['is_guest'] || !empty($row['votingLocked']) || !allowedTo('poll_vote')) + $allow_vote = false; + else + { + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}log_polls + WHERE ID_POLL = $row[ID_POLL] + AND ID_MEMBER = $ID_MEMBER + LIMIT 1", __FILE__, __LINE__); + $allow_vote = mysql_num_rows($request) == 0; + mysql_free_result($request); + } + + $request = db_query(" + SELECT COUNT(DISTINCT ID_MEMBER) + FROM {$db_prefix}log_polls + WHERE ID_POLL = $row[ID_POLL]", __FILE__, __LINE__); + list ($total) = mysql_fetch_row($request); + mysql_free_result($request); + + $request = db_query(" + SELECT ID_CHOICE, label, votes + FROM {$db_prefix}poll_choices + WHERE ID_POLL = $row[ID_POLL]", __FILE__, __LINE__); + $options = array(); + $total_votes = 0; + while ($rowChoice = mysql_fetch_assoc($request)) + { + $options[$rowChoice['ID_CHOICE']] = array($rowChoice['label'], $rowChoice['votes']); + $total_votes += $rowChoice['votes']; + } + mysql_free_result($request); + + $return = array( + 'id' => $row['ID_POLL'], + 'image' => empty($pollinfo['votingLocked']) ? 'poll' : 'locked_poll', + 'question' => $row['question'], + 'total_votes' => $total, + 'is_locked' => !empty($pollinfo['votingLocked']), + 'allow_vote' => $allow_vote, + 'topic' => $topic + ); + + // Calculate the percentages and bar lengths... + $divisor = $total_votes == 0 ? 1 : $total_votes; + foreach ($options as $i => $option) + { + $bar = floor(($option[1] * 100) / $divisor); + $barWide = $bar == 0 ? 1 : floor(($bar * 5) / 3); + $return['options'][$i] = array( + 'percent' => $bar, + 'votes' => $option[1], + 'bar' => '-', + 'option' => doUBBC($option[0]), + 'vote_button' => '' + ); + } + + $return['allowed_warning'] = $row['maxVotes'] > 1 ? sprintf($txt['poll_options6'], $row['maxVotes']) : ''; + + if ($output_method != 'echo') + return $return; + + if ($return['allow_vote']) + { + echo ' +
+ + + + + + + + '; + foreach ($return['options'] as $option) + echo ' + + + '; + echo ' + + + +
', $return['question'], '
', $return['allowed_warning'], '
+ +
'; + } + else + { + echo ' + + + + '; + foreach ($return['options'] as $option) + echo ' + + + + '; + echo ' + + + +
', $return['question'], '
', $option['option'], '', $option['bar'], ' ', $option['votes'], ' (', $option['percent'], '%)
', $txt['smf24'], ': ', $return['total_votes'], '
'; + } +} + +// Takes care of voting - don't worry, this is done automatically. +function ssi_pollVote() +{ + global $db_prefix, $ID_MEMBER, $user_info, $sc; + + echo ' + + + + +  +'; + + if (!isset($_POST['sc']) || $_POST['sc'] != $sc) + return; + // This can cause weird errors! (ie. copyright missing.) + checkSession(); + + if (empty($_POST['options']) || !isset($_POST['poll'])) + return; + + $_POST['poll'] = (int) $_POST['poll']; + + // Check if they have already voted, or voting is locked. + $request = db_query(" + SELECT IFNULL(lp.ID_CHOICE, -1) AS selected, p.votingLocked, p.expireTime, p.maxVotes + FROM ({$db_prefix}polls AS p, {$db_prefix}topics AS t, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}log_polls AS lp ON (lp.ID_POLL = p.ID_POLL AND lp.ID_MEMBER = $ID_MEMBER) + WHERE p.ID_POLL = $_POST[poll] + AND t.ID_POLL = $_POST[poll] + AND b.ID_BOARD = t.ID_BOARD + AND $user_info[query_see_board] + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + return; + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + if (!empty($row['votingLocked']) || $row['selected'] != -1 || (!empty($row['expireTime']) && time() > $row['expireTime'])) + return; + + // Too many options checked? + if (count($_REQUEST['options']) > $row['maxVotes']) + return; + + $options = array(); + $setString = ''; + foreach ($_REQUEST['options'] as $id) + { + $id = (int) $id; + + $options[] = $id; + $setString .= " + ($_POST[poll], $ID_MEMBER, $id),"; + } + $setString = substr($setString, 0, -1); + + // Add their vote in to the tally. + db_query(" + INSERT INTO {$db_prefix}log_polls + (ID_POLL, ID_MEMBER, ID_CHOICE) + VALUES $setString", __FILE__, __LINE__); + db_query(" + UPDATE {$db_prefix}poll_choices + SET votes = votes + 1 + WHERE ID_POLL = $_POST[poll] + AND ID_CHOICE IN (" . implode(', ', $options) . ") + LIMIT " . count($options), __FILE__, __LINE__); +} + +// Show a search box. +function ssi_quickSearch($output_method = 'echo') +{ + global $scripturl, $txt; + + if ($output_method != 'echo') + return $scripturl . '?action=search'; + + echo ' +
+ +
'; +} + +// Show what would be the forum news. +function ssi_news($output_method = 'echo') +{ + global $context; + + if ($output_method != 'echo') + return $context['random_news_line']; + + echo $context['random_news_line']; +} + +// Show today's birthdays. +function ssi_todaysBirthdays($output_method = 'echo') +{ + global $context, $scripturl; + + if (!smf_loadCalendarInfo() || empty($context['calendar_birthdays'])) + return array(); + + if ($output_method != 'echo') + return $context['calendar_birthdays']; + + foreach ($context['calendar_birthdays'] as $member) + echo ' + ' . $member['name'] . (isset($member['age']) ? ' (' . $member['age'] . ')' : '') . '' . (!$member['is_last'] ? ', ' : ''); +} + +// Show today's holidays. +function ssi_todaysHolidays($output_method = 'echo') +{ + global $context; + + if (!smf_loadCalendarInfo() || empty($context['calendar_holidays'])) + return array(); + + if ($output_method != 'echo') + return $context['calendar_holidays']; + + echo ' + ', implode(', ', $context['calendar_holidays']); +} + +// Show today's events. +function ssi_todaysEvents($output_method = 'echo') +{ + global $context; + + if (!smf_loadCalendarInfo() || empty($context['calendar_events'])) + return array(); + + if ($output_method != 'echo') + return $context['calendar_events']; + + foreach ($context['calendar_events'] as $event) + { + if ($event['can_edit']) + echo ' + * '; + echo ' + ' . $event['title'] . '' . (!$event['is_last'] ? ', ' : ''); + } +} + +// Show all calendar entires for today. (birthdays, holodays, and events.) +function ssi_todaysCalendar($output_method = 'echo') +{ + global $context, $modSettings, $txt, $scripturl; + + if (!smf_loadCalendarInfo()) + return array(); + + if ($output_method != 'echo') + return array( + 'birthdays' => $context['calendar_birthdays'], + 'holidays' => $context['calendar_holidays'], + 'events' => $context['calendar_events'] + ); + + if (!empty($context['calendar_holidays'])) + echo ' + ' . $txt['calendar5'] . ' ' . implode(', ', $context['calendar_holidays']) . '
'; + if (!empty($context['calendar_birthdays'])) + { + echo ' + ' . $txt['calendar3b'] . ' '; + foreach ($context['calendar_birthdays'] as $member) + echo ' + ', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', !$member['is_last'] ? ', ' : ''; + echo ' +
'; + } + if (!empty($context['calendar_events'])) + { + echo ' + ' . $txt['calendar4b'] . ' '; + foreach ($context['calendar_events'] as $event) + { + if ($event['can_edit']) + echo ' + * '; + echo ' + ' . $event['title'] . '' . (!$event['is_last'] ? ', ' : ''); + } + } +} + +// Show the latest news, with a template... by board. +function ssi_boardNews($board = null, $limit = null, $start = null, $length = null, $output_method = 'echo') +{ + global $scripturl, $db_prefix, $txt; + global $settings, $modSettings, $context; + + loadLanguage('Stats'); + + // Must be integers.... + if ($limit === null) + $limit = isset($_GET['limit']) ? (int) $_GET['limit'] : 5; + else + $limit = (int) $limit; + + if ($start === null) + $start = isset($_GET['start']) ? (int) $_GET['start'] : 0; + else + $start = (int) $start; + + if ($board !== null) + $board = (int) $board; + elseif (isset($_GET['board'])) + $board = (int) $_GET['board']; + + if ($length === null) + $length = isset($_GET['length']) ? (int) $_GET['length'] : 0; + else + $length = (int) $length; + + // Make sure guests can see this board. + $request = db_query(" + SELECT ID_BOARD + FROM {$db_prefix}boards + WHERE " . ($board === null ? '' : "ID_BOARD = $board + AND ") . "FIND_IN_SET(-1, memberGroups) + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + { + if ($output_method == 'echo') + die($txt['smf_news_error2']); + else + return array(); + } + list ($board) = mysql_fetch_row($request); + mysql_free_result($request); + + // Find the posts. + $request = db_query(" + SELECT + m.icon, m.subject, m.body, IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, + t.numReplies, t.ID_TOPIC, m.ID_MEMBER, m.smileysEnabled + FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE t.ID_BOARD = $board + AND m.ID_MSG = t.ID_FIRST_MSG + ORDER BY m.ID_MSG DESC + LIMIT $start, $limit", __FILE__, __LINE__); + $return = array(); + while ($row = mysql_fetch_assoc($request)) + { + // If we want to limit the length of the post. + if (!empty($length) && strlen($row['body']) > $length) + { + $row['body'] = substr($row['body'], 0, $length); + + // The first space or line break. (
, etc.) + $cutoff = max(strrpos($row['body'], ' '), strrpos($row['body'], '<')); + + if ($cutoff !== false) + $row['body'] = substr($row['body'], 0, $cutoff); + $row['body'] .= '...'; + } + + $row['body'] = doUBBC($row['body'], $row['smileysEnabled']); + + censorText($row['subject']); + censorText($row['body']); + + $return[] = array( + 'id' => $row['ID_TOPIC'], + 'icon' => '' . $row['icon'] . '', + 'subject' => $row['subject'], + 'time' => timeformat($row['posterTime']), + 'timestamp' => $row['posterTime'], + 'body' => $row['body'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0', + 'link' => '' . $row['numReplies'] . ' ' . ($row['numReplies'] == 1 ? $txt['smf_news_1'] : $txt['smf_news_2']) . '', + 'replies' => $row['numReplies'], + 'new_comment' => '' . $txt['smf_news_3'] . '', + 'poster' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['posterName'], + 'href' => !empty($row['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] : '', + 'link' => !empty($row['ID_MEMBER']) ? '' . $row['posterName'] . '' : $row['posterName'] + ), + 'is_last' => false + ); + } + mysql_free_result($request); + + if (empty($return)) + return $return; + + $return[count($return) - 1]['is_last'] = true; + + if ($output_method != 'echo') + return $return; + + foreach ($return as $news) + { + echo ' + + + + + + + + + + +
', $news['icon'], ' ', $news['subject'], '
', $news['time'], ' ', $txt[525], ' ', $news['poster']['link'], '

', $news['body'], '

', $news['link'], ' | ', $news['new_comment'], '
+
'; + + if (!$news['is_last']) + echo ' +
+
'; + } +} + +// Show the most recent events. +function ssi_recentEvents($max_events = 7, $output_method = 'echo') +{ + global $db_prefix, $user_info, $scripturl, $modSettings, $txt, $sc; + + // Find all events which are happening in the near future that the member can see. + $request = db_query(" + SELECT + cal.ID_EVENT, DAYOFMONTH(cal.eventDate) AS day, cal.title, cal.ID_MEMBER, cal.ID_TOPIC, + cal.ID_BOARD, t.ID_FIRST_MSG + FROM {$db_prefix}calendar AS cal, {$db_prefix}boards AS b, {$db_prefix}topics AS t + WHERE cal.eventDate >= '" . strftime('%Y-%m-%d', forum_time(false)) . "' + AND cal.ID_TOPIC = t.ID_TOPIC + AND cal.ID_BOARD = b.ID_BOARD + AND $user_info[query_see_board] + ORDER BY cal.eventDate DESC + LIMIT $max_events", __FILE__, __LINE__); + $return = array(); + $duplicates = array(); + while ($row = mysql_fetch_assoc($request)) + { + // Check if we've already come by an event linked to this same topic with the same title... and don't display it if we have. + if (!empty($duplicates[$row['title'] . $row['ID_TOPIC']])) + continue; + + // Censor the title. + censorText($row['title']); + + $return[$row['day']][] = array( + 'id' => $row['ID_EVENT'], + 'title' => $row['title'], + 'can_edit' => allowedTo('calendar_edit_any') || ($row['ID_MEMBER'] == $ID_MEMBER && allowedTo('calendar_edit_own')), + 'modify_href' => $scripturl . '?action=post;msg=' . $row['ID_FIRST_MSG'] . ';topic=' . $row['ID_TOPIC'] . '.0;calendar;eventid=' . $row['ID_EVENT'] . ';sesc=' . $sc, + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0', + 'link' => '' . $row['title'] . '', + 'is_last' => false + ); + + // Let's not show this one again, huh? + $duplicates[$row['title'] . $row['ID_TOPIC']] = true; + } + mysql_free_result($request); + + foreach ($return as $mday => $array) + $return[$mday][count($array) - 1]['is_last'] = true; + + if ($output_method != 'echo' || empty($return)) + return $return; + + // Well the output method is echo. + echo ' + ' . $txt['calendar4'] . ' '; + foreach ($return as $mday => $array) + foreach ($array as $event) + { + if ($event['can_edit']) + echo ' + * '; + + echo ' + ' . $event['title'] . '' . (!$event['is_last'] ? ', ' : ''); + } +} + +// Load the calendar information. (internal...) +function smf_loadCalendarInfo() +{ + global $modSettings, $context, $user_info, $scripturl, $sc, $ID_MEMBER; + + // Get the current forum time and check whether the statistics are up to date. + if (!isset($modSettings['cal_today_updated']) || $modSettings['cal_today_updated'] != strftime('%Y%m%d', forum_time(false))) + updateStats('calendar'); + + // Get the current member time/date. + $day = (int) strftime('%d', forum_time()); + + // Load the holidays for today... + if (isset($modSettings['cal_today_holiday'])) + $holidays = unserialize($modSettings['cal_today_holiday']); + // ... the birthdays for today... + if (isset($modSettings['cal_today_birthday'])) + $bday = unserialize($modSettings['cal_today_birthday']); + // ... and the events for today. + if (isset($modSettings['cal_today_event'])) + $events = unserialize($modSettings['cal_today_event']); + + // No events, birthdays, or holidays... don't show anything. + if (empty($holidays) && empty($bday) && empty($events)) + return false; + + // This shouldn't be less than one! + if (empty($modSettings['cal_days_for_index']) || $modSettings['cal_days_for_index'] < 1) + $modSettings['cal_days_for_index'] = 1; + + $context['calendar_only_today'] = $modSettings['cal_days_for_index'] == 1; + + // Get the last day of the month. + $nLastDay = (int) strftime('%d', mktime(0, 0, 0, strftime('%m') == 12 ? 1 : strftime('%m') + 1, 0, strftime('%m') == 12 ? strftime('%Y') + 1 : strftime('%Y'))); + + // This is used to show the "how-do-I-edit" help. + $context['calendar_can_edit'] = allowedTo('calendar_edit_any'); + + // Holidays between now and now + days. + $context['calendar_holidays'] = array(); + for ($i = $day; $i < $day + $modSettings['cal_days_for_index']; $i++) + { + if (isset($holidays[$i % $nLastDay == 0 ? $i : $i % $nLastDay])) + $context['calendar_holidays'] = array_merge($context['calendar_holidays'], $holidays[$i % $nLastDay == 0 ? $i : $i % $nLastDay]); + } + + // Happy Birthday, guys and gals! + $context['calendar_birthdays'] = array(); + for ($i = $day; $i < $day + $modSettings['cal_days_for_index']; $i++) + { + if (isset($bday[$i % $nLastDay == 0 ? $i : $i % $nLastDay])) + { + foreach ($bday[$i % $nLastDay == 0 ? $i : $i % $nLastDay] as $index => $dummy) + $bday[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$index]['is_today'] = ($i % $nLastDay == 0 ? $i : $i % $nLastDay) == $day; + $context['calendar_birthdays'] = array_merge($context['calendar_birthdays'], $bday[$i % $nLastDay == 0 ? $i : $i % $nLastDay]); + } + } + + $context['calendar_events'] = array(); + $duplicates = array(); + for ($i = $day; $i < $day + $modSettings['cal_days_for_index']; $i++) + { + if (isset($events[$i % $nLastDay == 0 ? $i : $i % $nLastDay])) + foreach ($events[$i % $nLastDay == 0 ? $i : $i % $nLastDay] as $ev => $event) + { + if ((count(array_intersect($user_info['groups'], $event['allowed_groups'])) != 0 || allowedTo('admin_forum'))) + { + if (isset($duplicates[$events[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$ev]['topic'] . $events[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$ev]['title']])) + { + unset($events[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$ev]); + continue; + } + + $this_event = &$events[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$ev]; + $this_event['href'] = $scripturl . '?topic=' . $this_event['topic'] . '.0'; + $this_event['modify_href'] = $scripturl . '?action=post;msg=' . $this_event['msg'] . ';topic=' . $this_event['topic'] . '.0;calendar;eventid=' . $this_event['id'] . ';sesc=' . $sc; + $this_event['can_edit'] = allowedTo('calendar_edit_any') || ($this_event['poster'] == $ID_MEMBER && allowedTo('calendar_edit_own')); + $this_event['is_today'] = ($i % $nLastDay == 0 ? $i : $i % $nLastDay) == $day; + + $duplicates[$this_event['topic'] . $this_event['title']] = true; + } + else + unset($events[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$ev]); + } + + if (isset($events[$i % $nLastDay == 0 ? $i : $i % $nLastDay])) + $context['calendar_events'] = array_merge($context['calendar_events'], $events[$i % $nLastDay == 0 ? $i : $i % $nLastDay]); + } + + for ($i = 0, $n = count($context['calendar_birthdays']); $i < $n; $i++) + $context['calendar_birthdays'][$i]['is_last'] = !isset($context['calendar_birthdays'][$i + 1]); + for ($i = 0, $n = count($context['calendar_events']); $i < $n; $i++) + $context['calendar_events'][$i]['is_last'] = !isset($context['calendar_events'][$i + 1]); + + return !empty($context['calendar_holidays']) || !empty($context['calendar_birthdays']) || !empty($context['calendar_events']); +} + +// Check the passed ID_MEMBER/password. If $is_username is true, treats $id as a username. +function ssi_checkPassword($id = null, $password = null, $is_username = false) +{ + global $db_prefix; + + // If $id is null, this was most likely called from a query string and should do nothing. + if ($id === null) + return; + + $request = db_query(" + SELECT passwd, memberName, is_activated + FROM {$db_prefix}members + WHERE " . ($is_username ? 'memberName' : 'ID_MEMBER') . " = '$id' + LIMIT 1", __FILE__, __LINE__); + list ($pass, $user, $active) = mysql_fetch_row($request); + mysql_free_result($request); + + return md5_hmac($password, strtolower($user)) == $pass && !empty($active); +} + +?> \ No newline at end of file diff --git a/Settings.php b/Settings.php new file mode 100644 index 0000000..7784fbd --- /dev/null +++ b/Settings.php @@ -0,0 +1,48 @@ + diff --git a/Settings_bak.php b/Settings_bak.php new file mode 100644 index 0000000..7784fbd --- /dev/null +++ b/Settings_bak.php @@ -0,0 +1,48 @@ + diff --git a/Smileys b/Smileys new file mode 120000 index 0000000..6e8804e --- /dev/null +++ b/Smileys @@ -0,0 +1 @@ +/var/www/img.rock.ru/forum/Smileys \ No newline at end of file diff --git a/Sources/Admin.php b/Sources/Admin.php new file mode 100644 index 0000000..0014b77 --- /dev/null +++ b/Sources/Admin.php @@ -0,0 +1,1123 @@ +' . $row['realName'] . ''; + mysql_free_result($request); + + // Some stuff.... :P. + $context['credits'] = ' +Simple Machines wants to thank everyone who helped make SMF 1.0 what it is today; shaping and directing our project, all through the thick and the thin. It wouldn\'t have been possible without you.
+
This includes our users and especially Charter Members - thanks for installing and using our software as well as providing valuable feedback, bug reports, and opinions.
+
Project Managers: Jeff Lewis, Joseph Fung, and David Recordon.
+
Developers: Unknown W. "[Unknown]" Brackets, Hendrik Jan "Compuart" Visser, Matt "Grudge" Wolf, and Philip "Meriadoc" Renich
+
Support Specialists: Andrea Hubacher, Alexandre "Ap2" Patenaude, A.M.A, Ben Scott, [darksteel], Douglas "The Bear" Hazard, Horseman, Killer Possum, Mediman, Methonis, Michael "Oldiesmann" Eshom, Omar Bazavilvazo, Osku "Owdy" Uusitupa, Pitti, and Tomer "Lamper" Dean.
+
Mod Developers: Jack.R.Abbit, Aliencowfarm, Big P., Chris Cromer, Cristián "Anguz" Lávaque, Daniel Diehl, groundup, James "Cheschire" Yarbro, Jesse "Gobalopper" Reid, Spaceman-Spiff.
+
Documentation Writers: Peter Duggan, Amacythe, Jerry, and Mattitude.
+
Language Coordinator: Adam "Bostasp" Southall and Daniel Diehl.
+
We would also like to give special thanks to not only these members of the Simple Machines Team, but also Babylonking and Alienine (aka. Adrian) for their work on the default theme!
+
And for anyone we may have missed, thank you!
'; + + // This makes it easier to get the latest news with your time format. + $context['time_format'] = urlencode($user_info['time_format']); + + $context['current_versions'] = array( + 'php' => array('title' => $txt['support_versions_php'], 'version' => PHP_VERSION), + 'mysql' => array('title' => $txt['support_versions_mysql'], 'version' => ''), + 'server' => array('title' => $txt['support_versions_server'], 'version' => $_SERVER['SERVER_SOFTWARE']) + ); + $context['forum_version'] = $forum_version; + + if (function_exists('gd_info')) + { + $temp = gd_info(); + $context['current_versions']['gd'] = array('title' => $txt['support_versions_gd'], 'version' => $temp['GD Version']); + } + + $request = db_query(" + SELECT VERSION()", __FILE__, __LINE__); + list ($context['current_versions']['mysql']['version']) = mysql_fetch_row($request); + mysql_free_result($request); + + $context['can_admin'] = allowedTo('admin_forum'); + + $context['sub_template'] = isset($_GET['credits']) ? 'credits' : 'admin'; + $context['page_title'] = isset($_GET['credits']) ? $txt['support_credits_title'] : $txt[208]; + + // The format of this array is: permission, action, title, description. + $quick_admin_tasks = array( + array('', 'admin;credits', 'support_credits_title', 'support_credits_info'), + array('admin_forum', 'modifyModSettings', 'modSettings_title', 'modSettings_info'), + array('admin_forum', 'maintain', 'maintain_title', 'maintain_info'), + array('manage_permissions', 'permissions', 'edit_permissions', 'edit_permissions_info'), + array('admin_forum', 'theme;sa=admin;sesc=' . $context['session_id'], 'theme_admin', 'theme_admin_info'), + array('admin_forum', 'packages', 'package1', 'package_info'), + array('manage_smileys', 'smileys', 'smileys_manage', 'smileys_manage_info'), + array('moderate_forum', 'regcenter', 'registration_center', 'registration_center_info'), + ); + + $context['quick_admin_tasks'] = array(); + foreach ($quick_admin_tasks as $task) + { + if (!empty($task[0]) && !allowedTo($task[0])) + continue; + + $context['quick_admin_tasks'][] = array( + 'href' => $scripturl . '?action=' . $task[1], + 'link' => '' . $txt[$task[2]] . '', + 'title' => $txt[$task[2]], + 'description' => $txt[$task[3]], + 'is_last' => false + ); + } + + if (count($context['quick_admin_tasks']) % 2 == 1) + { + $context['quick_admin_tasks'][] = array( + 'href' => '', + 'link' => '', + 'title' => '', + 'description' => '', + 'is_last' => true + ); + $context['quick_admin_tasks'][count($context['quick_admin_tasks']) - 2]['is_last'] = true; + } + elseif (count($context['quick_admin_tasks']) != 0) + { + $context['quick_admin_tasks'][count($context['quick_admin_tasks']) - 1]['is_last'] = true; + $context['quick_admin_tasks'][count($context['quick_admin_tasks']) - 2]['is_last'] = true; + } +} + +// Let the administrator(s) edit the news. +function EditNews() +{ + global $txt, $modSettings, $context, $db_prefix, $sourcedir, $user_info; + + // You must have the right session and permissions, or you get no news edit! + isAllowedTo('edit_news'); + + // Just browsing. + if (!isset($_POST['news'])) + { + // Load the edit news template and admin bar, etc. + adminIndex('edit_news'); + + // Ready the current news. + foreach (explode("\n", $modSettings['news']) as $id => $line) + $context['admin_current_news'][$id] = array( + 'id' => $id, + 'unparsed' => htmlspecialchars(str_replace('
', "\n", $line)), + 'parsed' => preg_replace('~<([/]?)form[>]*>~i', '<$1form>', doUBBC($line)), + ); + + $context['sub_template'] = 'edit_news'; + $context['page_title'] = $txt[7]; + } + // Adding/changing/removing news items. + else + { + checkSession(); + + // The 'remove selected' button was pressed. + if (!empty($_POST['delete_selection'])) + { + if (empty($_POST['remove'])) + redirectexit('action=editnews'); + + // Store the news temporarily in this array. + $temp_news = explode("\n", $modSettings['news']); + + // Remove the items that were selected. + foreach ($temp_news as $i => $news) + if (in_array($i, $_POST['remove'])) + unset($temp_news[$i]); + + // Update the database. + updateSettings(array('news' => addslashes(implode("\n", $temp_news)))); + } + // The 'Save' button was pressed. + else + { + require_once($sourcedir . '/Subs-Post.php'); + foreach ($_POST['news'] as $i => $news) + { + if (trim($news) == '') + unset($_POST['news'][$i]); + else + preparsecode($_POST['news'][$i]); + } + + // Send the new news to the database. + updateSettings(array('news' => implode("\n", $_POST['news']))); + } + + // Log this into the moderation log. + logAction('news'); + + redirectexit('action=editnews'); + } +} + +// I hereby agree not to be a lazy bum. +function EditAgreement() +{ + global $txt, $boarddir, $context, $modSettings; + + // Not everyone can edit the agreement! + isAllowedTo('moderate_forum'); + + if (isset($_POST['agreement'])) + { + checkSession(); + + // Off it goes to the agreement file. + $fp = fopen($boarddir . '/agreement.txt', 'w'); + fwrite($fp, str_replace("\r", '', stripslashes($_POST['agreement']))); + fclose($fp); + + updateSettings(array('requireAgreement' => !empty($_POST['requireAgreement']))); + + redirectexit('action=editagreement'); + } + + // Select 'Edit Agreement' on the admin bar. + adminIndex('edit_agreement'); + + // Get the current agreement. + $context['agreement'] = file_exists($boarddir . '/agreement.txt') ? htmlspecialchars(implode('', file($boarddir . '/agreement.txt'))) : ''; + $context['warning'] = is_writable($boarddir . '/agreement.txt') ? '' : $txt['smf320']; + $context['require_agreement'] = !empty($modSettings['requireAgreement']); + + $context['sub_template'] = 'edit_agreement'; + $context['page_title'] = $txt['smf11']; +} + +// Basic forum settings - database name, host, etc. +function ModifySettings() +{ + global $scripturl, $context, $settings, $txt, $sc; + global $language_dir, $boarddir; + + // This is just to keep the database password more secure. + isAllowedTo('admin_forum'); + checkSession('get'); + + // The administration bar...... + adminIndex('edit_settings'); + + $context['page_title'] = $txt[222]; + $context['sub_template'] = 'rawdata'; + + // Warn the user if the backup of Settings.php failed. + $settings_not_writable = !is_writable($boarddir . '/Settings.php'); + $settings_backup_fail = !@is_writable($boarddir . '/Settings_bak.php') || !@copy($boarddir . '/Settings.php', $boarddir . '/Settings_bak.php'); + + /* If you're writing a mod, it's a bad idea to add things here.... + For each option: + variable name, description, type (constant), size/possible values, helptext. + OR an empty string for a horizontal rule. + OR a string for a titled section. */ + $config_vars = array( + array('db_server', &$txt['smf5'], 'text'), + array('db_user', &$txt['smf6'], 'text'), + array('db_passwd', &$txt['smf7'], 'password'), + array('db_name', &$txt['smf8'], 'text'), + array('db_prefix', &$txt['smf54'], 'text'), + array('db_persist', &$txt['db_persist'], 'check', null, 'db_persist'), + array('db_error_send', &$txt['db_error_send'], 'check'), + '', + array('maintenance', &$txt[348], 'check'), + array('mtitle', &$txt['maintenance1'], 'text', 36), + array('mmessage', &$txt['maintenance2'], 'text', 36), + '', + array('mbname', &$txt[350], 'text', 30), + array('webmaster_email', &$txt[355], 'text', 30), + array('cookiename', &$txt[352], 'text', 20), + 'language' => array('language', &$txt['default_language'], 'select', array()), + '', + array('boardurl', &$txt[351], 'text', 36), + array('boarddir', &$txt[356], 'text', 36), + array('sourcedir', &$txt[360], 'text', 36), + '', + ); + + // Find the available language files. + $dir = dir($language_dir); + while ($entry = $dir->read()) + if (substr($entry, 0, 6) == 'index.' && substr($entry, -4) == '.php' && strlen($entry) > 10) + $config_vars['language'][3][] = array(substr($entry, 6, -4), ucwords(substr($entry, 6, -4))); + $dir->close(); + + $context['raw_data'] = ' +
+ + +
+ + + + + '; + + if ($settings_not_writable) + $context['raw_data'] .= ' + + '; + elseif ($settings_backup_fail) + $context['raw_data'] .= ' + + '; + + // Display the options. + foreach ($config_vars as $config_var) + { + $context['raw_data'] .= ' + '; + if (is_array($config_var)) + { + // Global the variable and get its value. + global $$config_var[0]; + $variable_name = $config_var[0]; + $variable_value = &$$config_var[0]; + + $context['raw_data'] .= ' + + '; + } + else + { + // Just show a separator. + if ($config_var == '') + $context['raw_data'] .= ' + '; + else + $context['raw_data'] .= ' + '; + } + } + + $context['raw_data'] .= ' + + + +
' . $txt[222] . '
' . $txt[347] . '
' . $txt['settings_not_writable'] . '

' . $txt['smf1'] . '

' . $config_var[1] . ($config_var[2] == 'password' ? '
' . $txt['admin_confirm_password'] . '' : '') . '
'; + + // A text box.... + if ($config_var[2] == 'text') + $context['raw_data'] .= ''; + // Show a check box. + elseif ($config_var[2] == 'check') + $context['raw_data'] .= ''; + // Escape (via htmlspecialchars.) the text box. + elseif ($config_var[2] == 'password') + $context['raw_data'] .= ' +
+ + '; + // Show a selection box. + elseif ($config_var[2] == 'select') + { + $context['raw_data'] .= ''; + } + + // Show the [?] button. + if (isset($config_var[4])) + $context['raw_data'] .= ' ' . $txt[119] . ''; + + $context['raw_data'] .= '

' . $config_var . '
+
+ +
'; +} + +// Put the settings in Settings.php. +function ModifySettings2() +{ + global $boarddir, $sc; + + // Check for permissions. + isAllowedTo('admin_forum'); + + checkSession(); + + // Strip the slashes off of the post vars. + foreach ($_POST as $key => $val) + $_POST[$key] = stripslashes__recursive($val); + + // Fix the darn stupid cookiename! (more may not be allowed, but these for sure!) + if (isset($_POST['cookiename'])) + $_POST['cookiename'] = preg_replace('~[,;\s$]+~', '', $_POST['cookiename']); + + // Any passwords? + $config_passwords = array( + 'db_passwd', + ); + + // All the strings to write. + $config_strs = array( + 'mtitle', 'mmessage', + 'language', 'mbname', 'boardurl', + 'cookiename', + 'webmaster_email', + 'db_name', 'db_user', 'db_server', 'db_prefix', + 'boarddir', 'sourcedir', + ); + // All the numeric variables. + $config_ints = array( + ); + // All the checkboxes. + $config_bools = array( + 'db_persist', 'db_error_send', + 'maintenance', + ); + + // Now sort everything into a big array, and figure out arrays and etc. + $config_vars = array(); + foreach ($config_passwords as $config_var) + { + if (isset($_POST[$config_var][1]) && $_POST[$config_var][0] == $_POST[$config_var][1]) + $config_vars[$config_var] = '\'' . addcslashes($_POST[$config_var][0], "'\\") . '\''; + } + foreach ($config_strs as $config_var) + { + if (isset($_POST[$config_var])) + $config_vars[$config_var] = '\'' . addcslashes($_POST[$config_var], "'\\") . '\''; + } + foreach ($config_ints as $config_var) + { + if (isset($_POST[$config_var])) + $config_vars[$config_var] = (int) $_POST[$config_var]; + } + foreach ($config_bools as $key) + { + if (!empty($_POST[$key])) + $config_vars[$key] = '1'; + else + $config_vars[$key] = '0'; + } + + updateSettingsFile($config_vars); + + redirectexit('action=modsettings;sesc=' . $sc); +} + +// Set the censored words. +function SetCensor() +{ + global $txt, $modSettings, $context; + + isAllowedTo('moderate_forum'); + + // Make the administration bar say "Edit Censored Words". + adminIndex('edit_censored'); + + // Set everything up for the template to do its thang. + $censor_vulgar = explode("\n", $modSettings['censor_vulgar']); + $censor_proper = explode("\n", $modSettings['censor_proper']); + + $context['censored_words'] = array(); + for ($i = 0, $n = count($censor_vulgar); $i < $n; $i++) + { + if (empty($censor_vulgar[$i])) + continue; + + // Skip it, it's either spaces or stars only. + if (trim(strtr($censor_vulgar[$i], '*', ' ')) == '') + continue; + + $context['censored_words'][htmlspecialchars(trim($censor_vulgar[$i]))] = htmlspecialchars(trim($censor_proper[$i])); + } + + $context['sub_template'] = 'edit_censored'; + $context['page_title'] = $txt[135]; + + if (isset($_SESSION['test_censor'])) + { + $context['censor_test'] = censorText(htmlspecialchars($_SESSION['test_censor'])); + unset($_SESSION['test_censor']); + } + else + $context['censor_test'] = ''; + + $context['censor_whole_word'] = !empty($modSettings['censorWholeWord']); + $context['censor_ignore_case'] = !empty($modSettings['censorIgnoreCase']); +} + +// Commit the censored words to the database. +function SetCensor2() +{ + global $db_prefix; + + // Make sure censoring is something they can do. + isAllowedTo('moderate_forum'); + checkSession(); + + $censored_vulgar = array(); + $censored_proper = array(); + + // Rip it apart, then split it into two arrays. + if (isset($_POST['censortext'])) + { + $_POST['censortext'] = explode("\n", strtr($_POST['censortext'], array("\r" => ''))); + + foreach ($_POST['censortext'] as $c) + list ($censored_vulgar[], $censored_proper[]) = array_pad(explode('=', trim($c)), 2, ''); + } + elseif (isset($_POST['censor_vulgar']) && isset($_POST['censor_proper'])) + { + if (is_array($_POST['censor_vulgar'])) + { + foreach ($_POST['censor_vulgar'] as $i => $value) + if ($value == '') + { + unset($_POST['censor_vulgar'][$i]); + unset($_POST['censor_proper'][$i]); + } + + $censored_vulgar = $_POST['censor_vulgar']; + $censored_proper = $_POST['censor_proper']; + } + else + { + $censored_vulgar = explode("\n", strtr($_POST['censor_vulgar'], array("\r" => ''))); + $censored_proper = explode("\n", strtr($_POST['censor_proper'], array("\r" => ''))); + } + } + + // Set the new arrays and settings in the database. + $updates = array( + 'censor_vulgar' => implode("\n", $censored_vulgar), + 'censor_proper' => implode("\n", $censored_proper) + ); + if (isset($_POST['censorWholeWord'])) + $updates['censorWholeWord'] = (int) $_POST['censorWholeWord']; + if (isset($_POST['censorIgnoreCase'])) + $updates['censorIgnoreCase'] = (int) $_POST['censorIgnoreCase']; + + updateSettings($updates); + + if (isset($_POST['censortest'])) + $_SESSION['test_censor'] = stripslashes($_POST['censortest']); + + redirectexit('action=setcensor'); +} + +// Optimize the database's tables. +function OptimizeTables() +{ + global $db_name, $txt, $context; + + isAllowedTo('admin_forum'); + + // Boldify "Maintain Forum". + adminIndex('maintain_forum'); + + // Start with no tables optimized. + $opttab = 0; + + $context['page_title'] = $txt['smf281']; + $context['sub_template'] = 'rawdata'; + + $context['raw_data'] = ' +
+
'; + + // Get a list of tables, as well as how many there are. + $get_tables = db_query(" + SHOW TABLE STATUS + FROM `$db_name`", __FILE__, __LINE__); + $num_tabs = mysql_num_rows($get_tables); + + // Start the output! + $context['raw_data'] .= sprintf($txt['smf282'], $num_tabs) . '
'; + + // Do nothing if there are no tables. + if ($num_tabs == 0) + return; + + $context['raw_data'] .= $txt['smf283'] . '
'; + + // Unoptimized tables. + $already_optimized = 0; + + // For each table.... + $i = 0; + while ($table = mysql_fetch_assoc($get_tables)) + { + $tableName = mysql_tablename($get_tables, $i++); + + // Optimize the table!!! + db_query(" + OPTIMIZE TABLE $tableName", __FILE__, __LINE__); + + if ($table['Data_free'] == 0) + $already_optimized++; + else + { + $context['raw_data'] .= sprintf($txt['smf284'], $tableName, $table['Data_free'] / 1024) . '
'; + $opttab++; + } + } + + // Add to the output array. + if ($num_tabs == $already_optimized) + $context['raw_data'] .= '
' . $txt['smf285']; + else + $context['raw_data'] .= '
' . $opttab . $txt['smf286']; + + mysql_free_result($get_tables); + + updateSettings(array('autoOptLastOpt' => time())); +} + +// Miscellaneous maintenance.. +function Maintenance() +{ + global $context, $txt, $db_prefix, $user_info, $db_connection; + + isAllowedTo('admin_forum'); + + adminIndex('maintain_forum'); + + if (isset($_GET['sa']) && $_GET['sa'] == 'logs') + { + // No one's online now.... MUHAHAHAHA :P. + db_query(" + DELETE FROM {$db_prefix}log_online", __FILE__, __LINE__); + + // Dump the banning logs. + db_query(" + DELETE FROM {$db_prefix}log_banned", __FILE__, __LINE__); + + // Attempt to start ID_ERROR back at 0. + mysql_query(" + TRUNCATE {$db_prefix}log_errors", $db_connection); + // Dump the error log. + db_query(" + DELETE FROM {$db_prefix}log_errors", __FILE__, __LINE__); + + // Clear out the spam log. + db_query(" + DELETE FROM {$db_prefix}log_floodcontrol", __FILE__, __LINE__); + + /* Clear out the karma actions. + db_query(" + DELETE FROM {$db_prefix}log_karma", __FILE__, __LINE__); */ + + + // Last but not least, the search log! + db_query(" + DELETE FROM {$db_prefix}log_search", __FILE__, __LINE__); + + updateSettings(array('search_pointer' => 0)); + + $context['maintenance_finished'] = true; + } + elseif (isset($_GET['sa']) && $_GET['sa'] == 'destroy') + { + echo '', $context['forum_name'], ' deleted! + +
Oh my, you killed ', $context['forum_name'], '!
+
You lazy bum!
+ '; + obExit(false); + } + +elseif (isset($_GET['sa']) && $_GET['sa'] == 'karmalog') + { + // Clear out the karma actions. + db_query(" + DELETE FROM {$db_prefix}log_karma", __FILE__, __LINE__); + $context['maintenance_finished'] = true; + } + else + $context['maintenance_finished'] = isset($_GET['done']); + + $result = db_query(" + SELECT b.ID_BOARD, b.name, b.childLevel, c.name AS catName, c.ID_CAT + FROM {$db_prefix}boards AS b, {$db_prefix}categories AS c + WHERE c.ID_CAT = b.ID_CAT + AND $user_info[query_see_board] + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['categories'] = array(); + while ($row = mysql_fetch_assoc($result)) + { + if (!isset($context['categories'][$row['ID_CAT']])) + $context['categories'][$row['ID_CAT']] = array( + 'name' => $row['catName'], + 'boards' => array() + ); + + $context['categories'][$row['ID_CAT']]['boards'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'child_level' => $row['childLevel'] + ); + } + mysql_free_result($result); + + $context['sub_template'] = 'maintain'; + $context['page_title'] = $txt['maintain_title']; +} + +// Recount all the important board totals. +function AdminBoardRecount() +{ + global $txt, $db_prefix, $context; + + isAllowedTo('admin_forum'); + + // Select it on the left. + adminIndex('maintain_forum'); + + @set_time_limit(600); + + // Get each topic with a wrong reply count and fix it. + $request = db_query(" + SELECT t.ID_TOPIC, t.numReplies, COUNT(m.ID_MSG) - 1 AS realNumReplies + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE m.ID_TOPIC = t.ID_TOPIC + GROUP BY t.ID_TOPIC + HAVING realNumReplies != numReplies", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + db_query(" + UPDATE {$db_prefix}topics + SET numReplies = $row[realNumReplies] + WHERE ID_TOPIC = $row[ID_TOPIC] + LIMIT 1", __FILE__, __LINE__); + mysql_free_result($request); + + // Update the post and topic count of each board. + $request = db_query(" + SELECT b.ID_BOARD, b.numPosts, COUNT(m.ID_MSG) AS realNumPosts, b.numTopics, COUNT(DISTINCT t.ID_TOPIC) AS realNumTopics + FROM {$db_prefix}boards AS b, {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE t.ID_TOPIC = m.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD + GROUP BY b.ID_BOARD + HAVING realNumPosts != numPosts OR realNumTopics != numTopics", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = $row[realNumPosts], numTopics = $row[realNumTopics] + WHERE ID_BOARD = $row[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + mysql_free_result($request); + + // Get all members with wrong number of personal messages. + $request = db_query(" + SELECT mem.ID_MEMBER, COUNT(pmr.ID_PM) AS realNum, mem.instantMessages + FROM {$db_prefix}members AS mem + LEFT JOIN {$db_prefix}im_recipients AS pmr ON (mem.ID_MEMBER = pmr.ID_MEMBER AND pmr.deleted = 0) + GROUP BY mem.ID_MEMBER + HAVING realNum != instantMessages", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + updateMemberData($row['ID_MEMBER'], array('instantMessages' => $row['realNum'])); + mysql_free_result($request); + + // Any messages pointing to the wrong board? + $request = db_query(" + SELECT t.ID_BOARD, m.ID_MSG + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t + WHERE t.ID_TOPIC = m.ID_TOPIC + AND m.ID_BOARD != t.ID_BOARD", __FILE__, __LINE__); + $boards = array(); + while ($row = mysql_fetch_assoc($request)) + $boards[$row['ID_BOARD']][] = $row['ID_MSG']; + mysql_free_result($request); + + foreach ($boards as $board_id => $messages) + db_query(" + UPDATE {$db_prefix}messages + SET ID_BOARD = $board_id + WHERE ID_MSG IN (" . implode(', ', $messages) . ") + LIMIT " . count($messages), __FILE__, __LINE__); + + // Update the latest message of each board. + $request = db_query(" + SELECT b.ID_BOARD, b.ID_PARENT, b.ID_LAST_MSG, MAX(m.ID_MSG) AS localLastMsg, b.childLevel + FROM {$db_prefix}boards AS b, {$db_prefix}messages AS m + WHERE b.ID_BOARD = m.ID_BOARD + GROUP BY ID_BOARD", __FILE__, __LINE__); + $resort_me = array(); + while ($row = mysql_fetch_assoc($request)) + $resort_me[$row['childLevel']][] = $row; + mysql_free_result($request); + + krsort($resort_me); + + $lastMsg = array(); + foreach ($resort_me as $rows) + foreach ($rows as $row) + { + // The latest message is the latest of the current board and its children. + if (isset($lastMsg[$row['ID_BOARD']])) + $curLastMsg = max($row['localLastMsg'], $lastMsg[$row['ID_BOARD']]); + else + $curLastMsg = $row['localLastMsg']; + + // If what is and what should be the latest message differ, an update is necessary. + if ($curLastMsg != $row['ID_LAST_MSG']) + db_query(" + UPDATE {$db_prefix}boards + SET ID_LAST_MSG = $curLastMsg + WHERE ID_BOARD = $row[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + + // Parent boards inherit the latest message of their children. + if (isset($lastMsg[$row['ID_PARENT']])) + $lastMsg[$row['ID_PARENT']] = max($row['localLastMsg'], $lastMsg[$row['ID_PARENT']]); + else + $lastMsg[$row['ID_PARENT']] = $row['localLastMsg']; + } + + // Update all the basic statistics. + updateStats('member'); + updateStats('message'); + updateStats('topic'); + + redirectexit('action=maintain;done'); +} + +// Perform a detailed version check. A very good thing ;). +function VersionDetail() +{ + global $forum_version; + global $txt, $boarddir, $sourcedir, $context, $settings; + + isAllowedTo('admin_forum'); + + // Set up the sidebar for version checking. + adminIndex('view_versions'); + + $context['file_versions'] = array(); + $context['default_template_versions'] = array(); + $context['template_versions'] = array(); + $context['default_language_versions'] = array(); + + // Find the version in SSI.php's file header. + $fp = fopen($boarddir . '/SSI.php', 'rb'); + $header = fread($fp, 4096); + fclose($fp); + + // The comment looks rougly like... that. + if (preg_match('~\*\s*Software\s+Version:\s+SMF\s+(.+?)[\s]{2}~i', $header, $match) == 1) + $context['file_versions']['SSI.php'] = $match[1]; + // Not found! This is bad. + else + $context['file_versions']['SSI.php'] = '??'; + + // Load all the files in the Sources directory, except this file and the redirect. + $Sources_dir = dir($sourcedir); + while ($entry = $Sources_dir->read()) + if (substr($entry, -4) == '.php' && !is_dir($sourcedir . '/' . $entry) && $entry != 'index.php') + { + // Read the first 4k from the file.... enough for the header. + $fp = fopen($sourcedir . '/' . $entry, 'rb'); + $header = fread($fp, 4096); + fclose($fp); + + // Look for the version comment in the file header. + if (preg_match('~\*\s*Software\s+Version:\s+SMF\s+(.+?)[\s]{2}~i', $header, $match) == 1) + $context['file_versions'][$entry] = $match[1]; + // It wasn't found, but the file was... show a '??'. + else + $context['file_versions'][$entry] = '??'; + } + $Sources_dir->close(); + + // Load all the files in the default template directory - and the current theme if applicable. + $directories = array('default_template_versions' => $settings['default_theme_dir']); + if ($settings['theme_id'] != 1) + $directories += array('template_versions' => $settings['theme_dir']); + + foreach ($directories as $type => $dirname) + { + $This_dir = dir($dirname); + while ($entry = $This_dir->read()) + if (substr($entry, -12) == 'template.php' && !is_dir($dirname . '/' . $entry)) + { + // Read the first 768 bytes from the file.... enough for the header. + $fp = fopen($dirname . '/' . $entry, 'rb'); + $header = fread($fp, 768); + fclose($fp); + + // Look for the version comment in the file header. + if (preg_match('~(?://|/\*)\s*Version:\s+(.+?);\s*' . preg_quote(basename($entry, '.template.php'), '~') . '(?:[\s]{2}|\*/)~i', $header, $match) == 1) + $context[$type][$entry] = $match[1]; + // It wasn't found, but the file was... show a '??'. + else + $context[$type][$entry] = '??'; + } + $This_dir->close(); + } + + // Load up all the files in the default language directory and sort by language. + $lang_dir = $settings['default_theme_dir'] . '/languages'; + $This_dir = dir($lang_dir); + while ($entry = $This_dir->read()) + if (substr($entry, -4) == '.php' && $entry != 'index.php' && !is_dir($lang_dir . '/' . $entry)) + { + // Read the first 768 bytes from the file.... enough for the header. + $fp = fopen($lang_dir . '/' . $entry, 'rb'); + $header = fread($fp, 768); + fclose($fp); + + // Split the file name off into useful bits. + list ($name, $language) = explode('.', $entry); + + // Look for the version comment in the file header. + if (preg_match('~(?://|/\*)\s*Version:\s+(.+?);\s*' . preg_quote($name, '~') . '(?:[\s]{2}|\*/)~i', $header, $match) == 1) + $context['default_language_versions'][$language][$name] = $match[1]; + // It wasn't found, but the file was... show a '??'. + else + $context['default_language_versions'][$language][$name] = '??'; + } + $This_dir->close(); + + // Sort the file versions by filename. + ksort($context['file_versions']); + ksort($context['default_template_versions']); + ksort($context['template_versions']); + ksort($context['default_language_versions']); + + // For languages sort each language too. + foreach ($context['default_language_versions'] as $key => $dummy) + ksort($context['default_language_versions'][$key]); + + $context['default_known_languages'] = array_keys($context['default_language_versions']); + + // Make it easier to manage for the template. + $context['forum_version'] = $forum_version; + + $context['sub_template'] = 'view_versions'; + $context['page_title'] = $txt[429]; +} + +// Update the Settings.php file. +function updateSettingsFile($config_vars) +{ + global $boarddir; + + // Load the file. + $settingsArray = file($boarddir . '/Settings.php'); + + if (count($settingsArray) == 1) + $settingsArray = preg_split('~[\r\n]~', $settingsArray[0]); + + for ($i = 0, $n = count($settingsArray); $i < $n; $i++) + { + $settingsArray[$i] = trim($settingsArray[$i]); + + // Look through the variables to set.... + foreach ($config_vars as $var => $val) + { + if (strncasecmp($settingsArray[$i], '$' . $var, 1 + strlen($var)) == 0) + { + $comment = strstr(substr($settingsArray[$i], strpos($settingsArray[$i], ';')), '#'); + $settingsArray[$i] = '$' . $var . ' = ' . $val . ';' . ($comment == '' ? '' : "\t\t" . $comment); + + // This one's been 'used', so to speak. + unset($config_vars[$var]); + } + } + + if (trim(substr($settingsArray[$i], 0, 2)) == '?' . '>') + $end = $i; + } + + // This should never happen, but apparently it is happening. + if (empty($end) || $end < 10) + $end = count($settingsArray) - 1; + + // Still more? Add them at the end. + if (!empty($config_vars)) + { + $settingsArray[$end++] = ''; + foreach ($config_vars as $var => $val) + $settingsArray[$end++] = '$' . $var . ' = ' . $val . ';'; + $settingsArray[$end] = '?' . '>'; + } + + // Sanity error checking: the file needs to be at least 10 lines. + if (count($settingsArray) < 10) + return; + + // Blank out the file - done to fix a oddity with some servers. + $fp = @fopen($boarddir . '/Settings.php', 'w'); + if (!$fp) + return; + fclose($fp); + + // Now actually write. + $fp = fopen($boarddir . '/Settings.php', 'r+'); + $lines = count($settingsArray); + for ($i = 0; $i < $lines - 1; $i++) + fwrite($fp, $settingsArray[$i] . "\n"); + + // The last line should have no \n. + fwrite($fp, $settingsArray[$i]); + fclose($fp); +} + +?> \ No newline at end of file diff --git a/Sources/BoardIndex.php b/Sources/BoardIndex.php new file mode 100644 index 0000000..79cf4f3 --- /dev/null +++ b/Sources/BoardIndex.php @@ -0,0 +1,529 @@ + 0, + 'ref' => null + ); + + // Find all boards and categories, as well as related information. + $result_boards = db_query(" + SELECT + c.name AS catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.description, + b.numPosts, b.numTopics, b.ID_PARENT, + IFNULL(mem.memberName, m.posterName) AS posterName, m.posterTime, m.subject, m.ID_TOPIC, + IFNULL(mem.realName, m.posterName) AS realName," . (!$user_info['is_guest'] ? " + (IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isRead, c.canCollapse, + IFNULL(cc.ID_MEMBER, 0) AS isCollapsed" : ' 1 AS isRead') . ", + IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, m.ID_MSG, + IFNULL(mem2.ID_MEMBER, 0) AS ID_MODERATOR, mem2.realName AS modRealName + FROM ({$db_prefix}categories AS c, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = b.ID_LAST_MSG) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? " + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}collapsed_categories AS cc ON (cc.ID_CAT = c.ID_CAT AND cc.ID_MEMBER = $ID_MEMBER)" : '') . " + LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD) + LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER = mods.ID_MEMBER) + WHERE $user_info[query_see_board] + AND b.ID_CAT = c.ID_CAT + AND b.childLevel <= 1 + ORDER BY c.catOrder, b.childLevel, b.boardOrder", __FILE__, __LINE__); + + // Run through the categories and boards.... + $context['categories'] = array(); + while ($row_board = mysql_fetch_assoc($result_boards)) + { + // Haven't set this category yet. + if (empty($context['categories'][$row_board['ID_CAT']])) + { + $context['categories'][$row_board['ID_CAT']] = array( + 'id' => $row_board['ID_CAT'], + 'name' => $row_board['catName'], + 'is_collapsed' => isset($row_board['canCollapse']) && $row_board['canCollapse'] == 1 && $row_board['isCollapsed'] > 0, + 'can_collapse' => isset($row_board['canCollapse']) && $row_board['canCollapse'] == 1, + 'collapse_href' => isset($row_board['canCollapse']) ? $scripturl . '?action=collapse;c=' . $row_board['ID_CAT'] . ';sa=' . ($row_board['isCollapsed'] > 0 ? 'expand' : 'collapse;') . '#' . $row_board['ID_CAT'] : '', + 'collapse_image' => isset($row_board['canCollapse']) ? '+' : '', + 'href' => $scripturl . '#' . $row_board['ID_CAT'], + 'boards' => array(), + 'new' => false + ); + $context['categories'][$row_board['ID_CAT']]['link'] = '' . $row_board['catName'] . ''; + } + + // Does this category have new posts in it? + $context['categories'][$row_board['ID_CAT']]['new'] |= empty($row_board['isRead']) && $row_board['posterName'] != ''; + + // Collapsed category - don't do any of this. + if ($context['categories'][$row_board['ID_CAT']]['is_collapsed']) + continue; + + // Let's save some typing. Climbing the array might be slower, anyhow. + $this_category = &$context['categories'][$row_board['ID_CAT']]['boards']; + + // This is a parent board. + if (empty($row_board['ID_PARENT'])) + { + // Is this a new board, or just another moderator? + if (!isset($this_category[$row_board['ID_BOARD']])) + { + // Not a child. + $isChild = false; + + $this_category[$row_board['ID_BOARD']] = array( + 'new' => empty($row_board['isRead']), + 'id' => $row_board['ID_BOARD'], + 'name' => $row_board['boardName'], + 'description' => $row_board['description'], + 'moderators' => array(), + 'link_moderators' => array(), + 'children' => array(), + 'link_children' => array(), + 'children_new' => false, + 'topics' => $row_board['numTopics'], + 'posts' => $row_board['numPosts'], + 'href' => $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0', + 'link' => '' . $row_board['boardName'] . '' + ); + } + if (!empty($row_board['ID_MODERATOR'])) + { + $this_category[$row_board['ID_BOARD']]['moderators'][$row_board['ID_MODERATOR']] = array( + 'id' => $row_board['ID_MODERATOR'], + 'name' => $row_board['modRealName'], + 'href' => $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'], + 'link' => '' . $row_board['modRealName'] . '' + ); + $this_category[$row_board['ID_BOARD']]['link_moderators'][] = '' . $row_board['modRealName'] . ''; + } + } + // Found a child board.... make sure we've found its parent and the child hasn't been set already. + elseif (isset($this_category[$row_board['ID_PARENT']]['children']) && !isset($this_category[$row_board['ID_PARENT']]['children'][$row_board['ID_BOARD']])) + { + // A valid child! + $isChild = true; + + $this_category[$row_board['ID_PARENT']]['children'][$row_board['ID_BOARD']] = array( + 'id' => $row_board['ID_BOARD'], + 'name' => $row_board['boardName'], + 'description' => $row_board['description'], + 'new' => empty($row_board['isRead']) && $row_board['posterName'] != '', + 'topics' => $row_board['numTopics'], + 'posts' => $row_board['numPosts'], + 'href' => $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0', + 'link' => '' . $row_board['boardName'] . '' + ); + + // Does this board contain new boards? + $this_category[$row_board['ID_PARENT']]['children_new'] |= empty($row_board['isRead']); + + // This is easier to use in many cases for the theme.... + $this_category[$row_board['ID_PARENT']]['link_children'][] = &$this_category[$row_board['ID_PARENT']]['children'][$row_board['ID_BOARD']]['link']; + } + // Found a child of a child - skip. + else + continue; + + // Prepare the subject, and make sure it's not too long. + censorText($row_board['subject']); + $row_board['short_subject'] = mb_strlen(un_htmlspecialchars($row_board['subject'])) > 24 ? strtr(mb_substr(strtr($row_board['subject'], array('<' => '<', '>' => '>', '"' => '"')), 0, 24,"UTF-8") . '...', array('<' => '<', '>' => '>', '"' => '"', '&...' => '...', '&#...' => '...')) : $row_board['subject']; + $this_last_post = array( + 'id' => $row_board['ID_MSG'], + 'time' => $row_board['posterTime'] > 0 ? timeformat($row_board['posterTime']) : $txt[470], + 'timestamp' => $row_board['posterTime'], + 'subject' => $row_board['short_subject'], + 'member' => array( + 'id' => $row_board['ID_MEMBER'], + 'username' => $row_board['posterName'] != '' ? $row_board['posterName'] : $txt[470], + 'name' => $row_board['realName'], + 'href' => $row_board['posterName'] != '' && !empty($row_board['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row_board['ID_MEMBER'] : '', + 'link' => $row_board['posterName'] != '' ? (!empty($row_board['ID_MEMBER']) ? '' . $row_board['realName'] . '' : $row_board['realName']) : $txt[470], + ), + 'start' => 'new', + 'topic' => $row_board['ID_TOPIC'] + ); + + // Provide the href and link. + if ($row_board['subject'] != '') + { + $this_last_post['href'] = $scripturl . '?topic=' . $row_board['ID_TOPIC'] . '.new' . (empty($row_board['isRead']) ? ';boardseen' : '') . '#new'; + $this_last_post['link'] = '' . $row_board['short_subject'] . ''; + } + else + { + $this_last_post['href'] = ''; + $this_last_post['link'] = $txt[470]; + } + + // Set the last post in the parent board. + if (empty($row_board['ID_PARENT']) || ($isChild && !empty($row_board['posterTime']) && $this_category[$row_board['ID_PARENT']]['last_post']['timestamp'] < $row_board['posterTime'])) + $this_category[$isChild ? $row_board['ID_PARENT'] : $row_board['ID_BOARD']]['last_post'] = $this_last_post; + // Just in the child...? + if ($isChild) + { + $this_category[$row_board['ID_PARENT']]['children'][$row_board['ID_BOARD']]['last_post'] = $this_last_post; + + // If there are no posts in this board, it really can't be new... + $this_category[$row_board['ID_PARENT']]['children'][$row_board['ID_BOARD']]['new'] &= $row_board['posterName'] != ''; + } + // No last post for this board? It's not new then, is it..? + elseif ($row_board['posterName'] == '') + $this_category[$row_board['ID_BOARD']]['new'] = false; + + // Determine a global most recent topic. + if ($row_board['posterTime'] > $most_recent_topic['timestamp']) + $most_recent_topic = array( + 'timestamp' => $row_board['posterTime'], + 'ref' => &$this_category[$isChild ? $row_board['ID_PARENT'] : $row_board['ID_BOARD']]['last_post'], + ); + } + mysql_free_result($result_boards); + + // Load the users online right now. + $result = db_query(" + SELECT + lo.ID_MEMBER, lo.logTime, lo.url, mem.realName, mem.memberName, mem.showOnline, + mg.onlineColor, mg.ID_GROUP, mg.groupName + FROM {$db_prefix}log_online AS lo + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER) + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))", __FILE__, __LINE__); + + $context['users_online'] = array(); + $context['list_users_online'] = array(); + $context['online_groups'] = array(); + $context['num_guests'] = 0; + $context['num_users_hidden'] = 0; + $context['spiders'] = array(); + $context['num_spiders'] = 0; + + while ($row = mysql_fetch_assoc($result)) + { + if (!isset($row['realName'])) + { + // Get the request parameters.. + $actions = @unserialize($row['url']); + + // Is a spider? + $is_spider = ob_googlebot_getAgent($actions['USER_AGENT'], $spider_name, $agent, $row['ID_MEMBER'] == 0); + + if (!$is_spider) + $context['num_guests']++; + if($is_spider) + { + $context['num_spiders']++; + + if ($modSettings['ob_googlebot_display_agent']) + $spider_name = $agent; + + if ($modSettings['ob_googlebot_count_all_instances'] && $modSettings['ob_googlebot_display_all_instances']) + $context['spiders'][] = $spider_name; + else + $context['spiders'][$agent] = $spider_name; + } + + continue; + } + elseif (!empty($row['showOnline']) || allowedTo('moderate_forum')) + { + // Some basic color coding... + if (!empty($row['onlineColor'])) + $link = '' . $row['realName'] . ''; + else + $link = '' . $row['realName'] . ''; + + #$context['users_online'][strtolower($row['memberName'])] = array( + $context['users_online'][strtolower($row['realName'])] = array( + 'id' => $row['ID_MEMBER'], + 'username' => $row['memberName'], + 'name' => $row['realName'], + 'group' => $row['ID_GROUP'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => $link, + 'hidden' => empty($row['showOnline']), + ); + + #$context['list_users_online'][strtolower($row['memberName'])] = empty($row['showOnline']) ? '' . $link . '' : $link; + $context['list_users_online'][strtolower($row['realName'])] = empty($row['showOnline']) ? '' . $link . '' : $link; + + if (!isset($context['online_groups'][$row['ID_GROUP']])) + $context['online_groups'][$row['ID_GROUP']] = array( + 'id' => $row['ID_GROUP'], + 'name' => $row['groupName'], + 'color' => $row['onlineColor'] + ); + } + else + $context['num_users_hidden']++; + } + mysql_free_result($result); + + ksort($context['users_online']); + ksort($context['list_users_online']); + ksort($context['online_groups']); + ksort($context['spiders']); + + $context['num_users_online'] = count($context['users_online']) + $context['num_users_hidden']; + + // Allowed user to see spiders online? + if (!allowedTo('googlebot_view')) + { + $context['spiders'] = array(); + } + + // Don't count all instances of a spider, only 1 for each different spider + if (!empty($context['spiders']) && !$modSettings['ob_googlebot_count_all_instances']) + $context['num_spiders'] = count($context['spiders']); + + // Diplay how many instances of each spider + if (!empty($context['spiders']) && $modSettings['ob_googlebot_count_all_instances'] && $modSettings['ob_googlebot_display_all_instances']) + { + $spider_grouped = array_count_values($context['spiders']); + + $context['spiders'] = array(); + foreach ($spider_grouped as $k => $v) + $context['spiders'][$k] = $k . ($v == 1 ? '' : ' (' . $v . ')'); + } + + // Track most online statistics? + if (!empty($modSettings['trackStats'])) + { + // Determine the most users online - both all time and per day. + $total_users = $context['num_guests'] + count($context['users_online']) + $context['num_users_hidden'] + ($modSettings['ob_googlebot_count_most_online'] ? $context['num_spiders'] : 0); + if (!isset($modSettings['mostOnline']) || $total_users >= $modSettings['mostOnline']) + updateSettings(array('mostOnline' => $total_users, 'mostDate' => time())); + + $date = strftime('%Y%m%d', forum_time(false)); + + // One or more stats are not up-to-date? + if (!isset($modSettings['mostOnlineUpdated']) || $modSettings['mostOnlineUpdated'] != $date) + { + $request = db_query(" + SELECT mostOn + FROM {$db_prefix}log_activity + WHERE date = $date", __FILE__, __LINE__); + + // The log_activity hasn't got an entry for today? + if (mysql_num_rows($request) == 0) + { + db_query(" + INSERT IGNORE INTO {$db_prefix}log_activity + (date, mostOn) + VALUES ($date, $total_users)", __FILE__, __LINE__); + updateSettings(array('mostOnlineUpdated' => $date, 'mostOnlineToday' => $total_users)); + } + // There's an entry in log_activity on today... + else + { + list ($modSettings['mostOnlineToday']) = mysql_fetch_row($request); + + if ($total_users > $modSettings['mostOnlineToday']) + trackStats(array('mostOn' => $total_users)); + + updateSettings(array('mostOnlineUpdated' => $date, 'mostOnlineToday' => max($total_users, $modSettings['mostOnlineToday']))); + } + mysql_free_result($request); + } + // Highest number of users online today? + elseif ($total_users > $modSettings['mostOnlineToday']) + { + trackStats(array('mostOn' => $total_users)); + updateSettings(array('mostOnlineUpdated' => $date, 'mostOnlineToday' => $total_users)); + } + } + + // Allowed user to see spiders online (We change stuff here AFTER stats update). Spiders are displayed as guests again. + if (!allowedTo('googlebot_view')) + { + $context['num_guests'] += $context['num_spiders']; + } + + // Set the latest member. + $context['latest_member'] = array( + 'name' => $modSettings['latestRealName'], + 'id' => $modSettings['latestMember'], + 'href' => $scripturl . '?action=profile;u=' . $modSettings['latestMember'], + 'link' => '' . $modSettings['latestRealName'] . '' + ); + + // Load the most recent post? + if ((!empty($settings['number_recent_posts']) && $settings['number_recent_posts'] == 1) || $settings['show_sp1_info']) + $context['latest_post'] = $most_recent_topic['ref']; + + if (!empty($settings['number_recent_posts']) && $settings['number_recent_posts'] > 1) + { + require_once($sourcedir . '/Recent.php'); + $context['latest_posts'] = getLastPosts($settings['number_recent_posts']); + } + + $settings['display_recent_bar'] = !empty($settings['number_recent_posts']) ? $settings['number_recent_posts'] : 0; + $settings['show_member_bar'] &= allowedTo('view_mlist'); + $context['show_stats'] = allowedTo('view_stats') && !empty($modSettings['trackStats']); + $context['show_member_list'] = allowedTo('view_mlist'); + $context['show_who'] = allowedTo('who_view') && !empty($modSettings['who_enabled']); +$context['show_karmastat'] = allowedTo('karmalog_view') && empty($modsettings['karmapermiss']); + + // Set some permission related settings. + $context['show_login_bar'] = $user_info['is_guest'] && empty($modSettings['enableVBStyleLogin']); + $context['show_calendar'] = allowedTo('calendar_view') && !empty($modSettings['cal_enabled']); + + // Load the calendar? + if ($context['show_calendar']) + $context['show_calendar'] = calendarDoIndex(); + + $context['page_title'] = $txt[18]; +} + +// Called from the BoardIndex to display the current day's events on the board index. +function calendarDoIndex() +{ + global $modSettings, $context, $user_info, $scripturl, $sc, $ID_MEMBER; + + // Make sure at least one of the options is checked. + if (empty($modSettings['cal_showeventsonindex']) && empty($modSettings['cal_showbdaysonindex']) && empty($modSettings['cal_showholidaysonindex'])) + return false; + + // Get the current forum time and check whether the statistics are up to date. + if (empty($modSettings['cal_today_updated']) || $modSettings['cal_today_updated'] != strftime('%Y%m%d', forum_time(false))) + updateStats('calendar'); + + // Get the current member time/date. + $day = (int) strftime('%d', forum_time()); + + // Load the holidays for today... + if (!empty($modSettings['cal_showholidaysonindex']) && isset($modSettings['cal_today_holiday'])) + $holidays = unserialize($modSettings['cal_today_holiday']); + // ... the birthdays for today... + if (!empty($modSettings['cal_showbdaysonindex']) && isset($modSettings['cal_today_birthday'])) + $bday = unserialize($modSettings['cal_today_birthday']); + // ... and the events for today. + if (!empty($modSettings['cal_showeventsonindex']) && isset($modSettings['cal_today_event'])) + $events = unserialize($modSettings['cal_today_event']); + + // No events, birthdays, or holidays... don't show anything. + if (empty($holidays) && empty($bday) && empty($events)) + return false; + + // This shouldn't be less than one! + if (empty($modSettings['cal_days_for_index']) || $modSettings['cal_days_for_index'] < 1) + $modSettings['cal_days_for_index'] = 1; + + $context['calendar_only_today'] = $modSettings['cal_days_for_index'] == 1; + + // Get the last day of the month. + $nLastDay = (int) strftime('%d', mktime(0, 0, 0, strftime('%m') == 12 ? 1 : strftime('%m') + 1, 0, strftime('%m') == 12 ? strftime('%Y') + 1 : strftime('%Y'))); + + // This is used to show the "how-do-I-edit" help. + $context['calendar_can_edit'] = allowedTo('calendar_edit_any'); + + // Holidays between now and now + days. + $context['calendar_holidays'] = array(); + for ($i = $day; $i < $day + $modSettings['cal_days_for_index']; $i++) + { + if (isset($holidays[$i % $nLastDay == 0 ? $i : $i % $nLastDay])) + $context['calendar_holidays'] = array_merge($context['calendar_holidays'], $holidays[$i % $nLastDay == 0 ? $i : $i % $nLastDay]); + } + + // Happy Birthday, guys and gals! + $context['calendar_birthdays'] = array(); + for ($i = $day; $i < $day + $modSettings['cal_days_for_index']; $i++) + { + if (isset($bday[$i % $nLastDay == 0 ? $i : $i % $nLastDay])) + { + foreach ($bday[$i % $nLastDay == 0 ? $i : $i % $nLastDay] as $index => $dummy) + $bday[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$index]['is_today'] = ($i % $nLastDay == 0 ? $i : $i % $nLastDay) == $day; + $context['calendar_birthdays'] = array_merge($context['calendar_birthdays'], $bday[$i % $nLastDay == 0 ? $i : $i % $nLastDay]); + } + } + + $context['calendar_events'] = array(); + $duplicates = array(); + for ($i = $day; $i < $day + $modSettings['cal_days_for_index']; $i++) + { + if (isset($events[$i % $nLastDay == 0 ? $i : $i % $nLastDay])) + foreach ($events[$i % $nLastDay == 0 ? $i : $i % $nLastDay] as $ev => $event) + { + if ((count(array_intersect($user_info['groups'], $event['allowed_groups'])) != 0 || allowedTo('admin_forum'))) + { + if (isset($duplicates[$events[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$ev]['topic'] . $events[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$ev]['title']])) + { + unset($events[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$ev]); + continue; + } + + $this_event = &$events[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$ev]; + $this_event['href'] = $scripturl . '?topic=' . $this_event['topic'] . '.0'; + $this_event['modify_href'] = $scripturl . '?action=post;msg=' . $this_event['msg'] . ';topic=' . $this_event['topic'] . '.0;calendar;eventid=' . $this_event['id'] . ';sesc=' . $sc; + $this_event['can_edit'] = allowedTo('calendar_edit_any') || ($this_event['poster'] == $ID_MEMBER && allowedTo('calendar_edit_own')); + $this_event['is_today'] = ($i % $nLastDay == 0 ? $i : $i % $nLastDay) == $day; + + $duplicates[$this_event['topic'] . $this_event['title']] = true; + } + else + unset($events[$i % $nLastDay == 0 ? $i : $i % $nLastDay][$ev]); + } + + if (isset($events[$i % $nLastDay == 0 ? $i : $i % $nLastDay])) + $context['calendar_events'] = array_merge($context['calendar_events'], $events[$i % $nLastDay == 0 ? $i : $i % $nLastDay]); + } + + for ($i = 0, $n = count($context['calendar_birthdays']); $i < $n; $i++) + $context['calendar_birthdays'][$i]['is_last'] = !isset($context['calendar_birthdays'][$i + 1]); + for ($i = 0, $n = count($context['calendar_events']); $i < $n; $i++) + $context['calendar_events'][$i]['is_last'] = !isset($context['calendar_events'][$i + 1]); + + // This is used to make sure the header should be displayed. + return !empty($context['calendar_holidays']) || !empty($context['calendar_birthdays']) || !empty($context['calendar_events']); +} + +?> diff --git a/Sources/Calendar.php b/Sources/Calendar.php new file mode 100644 index 0000000..9b1f21e --- /dev/null +++ b/Sources/Calendar.php @@ -0,0 +1,454 @@ + (int) strftime('%d', forum_time()), + 'month' => (int) strftime('%m', forum_time()), + 'year' => (int) strftime('%Y', forum_time()) + ); + + // If the month and year are not passed in, use today's date as a starting point. + $curPage = array( + 'month' => isset($_REQUEST['month']) ? (int) $_REQUEST['month'] : $today['month'], + 'year' => isset($_REQUEST['year']) ? (int) $_REQUEST['year'] : $today['year'] + ); + + // Make sure the year and month are in valid ranges. + if ($curPage['month'] < 1 || $curPage['month'] > 12) + fatal_lang_error('calendar1', false); + if ($curPage['year'] < $modSettings['cal_minyear'] || $curPage['year'] > $modSettings['cal_maxyear']) + fatal_lang_error('calendar2', false); + + // Get information about the first day of this month. + $firstDayOfMonth = array( + 'dayOfWeek' => (int) strftime('%w', mktime(0, 0, 0, $curPage['month'], 1, $curPage['year'])), + 'weekNum' => (int) strftime('%U', mktime(0, 0, 0, $curPage['month'], 1, $curPage['year'])) + ); + + // Find the last day of the month. + $nLastDay = (int) strftime('%d', mktime(0, 0, 0, $curPage['month'] == 12 ? 1 : $curPage['month'] + 1, 0, $curPage['month'] == 12 ? $curPage['year'] + 1 : $curPage['year'])); + + // The number of days the first row is shifted to the right for the starting day. + $nShift = $firstDayOfMonth['dayOfWeek']; + + // Start on Monday or Sunday? + $bStartMonday = !empty($options['calendar_start_day']) && $options['calendar_start_day'] == 1; + + // Starting on monday? Move the shift around. + if ($bStartMonday) + $nShift = ($nShift == 0 ? 6 : $nShift - 1); + + // Number of rows required to fit the month. + $nRows = floor(($nLastDay + $nShift) / 7); + if (($nLastDay + $nShift) % 7) + $nRows++; + + // Get the lowest and highest days of this month, in YYYY-MM-DD format. ($nLastDay is always 2 digits.) + $low = $curPage['year'] . '-' . str_pad($curPage['month'], 2, '0', STR_PAD_LEFT) . '-01'; + $high = $curPage['year'] . '-' . str_pad($curPage['month'], 2, '0', STR_PAD_LEFT) . '-' . $nLastDay; + + // Fetch the arrays for birthdays, posted events, and holidays. + $bday = calendarBirthdayArray($low, $high); + $events = calendarEventArray($low, $high); + $holidays = calendarHolidayArray($low, $high); + + // Days of the week taking into consideration that they may want it to start on a monday. + $context['week_days'] = $bStartMonday ? array(1, 2, 3, 4, 5, 6, 0) : array(0, 1, 2, 3, 4, 5, 6); + + // An adjustment value to apply to all calculated week numbers. + if (!empty($modSettings['cal_showweeknum'])) + { + // Need to know what day the first of the year was on. + $foy = (int) strftime('%w', mktime(0, 0, 0, 1, 1, $curPage['year'])); + + // If the first day of the year is on the start day of a week, then there is no adjustment + // to be made. However, if the first day of the year is not a start day, then there is a partial + // week at the start of the year that needs to be accounted for. + $nWeekAdjust = $foy == 0 ? 0 : 1; + } + else + $nWeekAdjust = 0; + + // Basic template stuff. + $context['can_post'] = allowedTo('calendar_post'); + $context['last_day'] = $nLastDay; + $context['current_month'] = $curPage['month']; + $context['current_year'] = $curPage['year']; + + // Load up the linktree! + $context['linktree'][] = array( + 'url' => $scripturl . '?action=calendar;year=' . $context['current_year'] . ';month=' . $context['current_month'], + 'name' => $months[$context['current_month']] . ' ' . $context['current_year'] + ); + + // Iterate through each week. + for ($nRow = 0; $nRow < $nRows; $nRow++) + { + // Start off the week - and don't let it go above 52, since that's the number of weeks in a year. + $context['weeks'][$nRow] = array( + 'days' => array(), + 'number' => $firstDayOfMonth['weekNum'] + $nRow + $nWeekAdjust + ); + if ($context['weeks'][$nRow]['number'] == 53) + $context['weeks'][$nRow]['number'] = 1; + + // And figure out all the days. + for ($nCol = 0; $nCol < 7; $nCol++) + { + $nDay = ($nRow * 7) + $nCol - $nShift + 1; + + if ($nDay < 1 || $nDay > $context['last_day']) + $nDay = 0; + + $context['weeks'][$nRow]['days'][$nCol] = array( + 'day' => $nDay, + 'is_today' => $today['day'] == $nDay && $today['month'] == $curPage['month'] && $today['year'] == $curPage['year'], + 'is_first_day' => !empty($modSettings['cal_showweeknum']) && ((!$bStartMonday && ($firstDayOfMonth['dayOfWeek'] + $nDay - 1) % 7 == 0) || ($bStartMonday && ($firstDayOfMonth['dayOfWeek'] + $nDay - 1) % 7 == 1)), + 'holidays' => !empty($holidays[$nDay]) ? $holidays[$nDay] : array(), + 'events' => !empty($events[$nDay]) ? $events[$nDay] : array(), + 'birthdays' => !empty($bday[$nDay]) ? $bday[$nDay] : array() + ); + } + } + + // Find the previous month. (if we can go back that far.) + if ($curPage['month'] > 1 || ($curPage['month'] == 1 && $curPage['year'] > $modSettings['cal_minyear'])) + { + // Need to roll the year back one? + $context['previous_calendar'] = array( + 'year' => $curPage['month'] == 1 ? $curPage['year'] - 1 : $curPage['year'], + 'month' => $curPage['month'] == 1 ? 12 : $curPage['month'] - 1, + ); + $context['previous_calendar']['href'] = $scripturl . '?action=calendar;year=' . $context['previous_calendar']['year'] . ';month=' . $context['previous_calendar']['month']; + } + + // The next month... (or can we go that far?) + if ($curPage['month'] < 12 || ($curPage['month'] == 12 && $curPage['year'] < $modSettings['cal_maxyear'])) + { + $context['next_calendar'] = array( + 'year' => $curPage['month'] == 12 ? $curPage['year'] + 1 : $curPage['year'], + 'month' => $curPage['month'] == 12 ? 1 : $curPage['month'] + 1 + ); + $context['next_calendar']['href'] = $scripturl . '?action=calendar;year=' . $context['next_calendar']['year'] . ';month=' . $context['next_calendar']['month']; + } +} + +// This is used by the board index to only find members of the current day. (month PLUS one!) +function calendarBirthdayArray($low_date, $high_date) +{ + global $db_prefix, $scripturl, $modSettings; + + // Birthdays people set without specifying a year (no age, see?) are the easiest ;). + if (substr($low_date, 0, 4) != substr($high_date, 0, 4)) + $allyear_part = "birthdate BETWEEN '0000" . substr($low_date, 4) . "' AND '0000-12-31' + OR birthdate BETWEEN '0000-01-01' AND '0000" . substr($high_date, 4) . "'"; + else + $allyear_part = "birthdate BETWEEN '0000" . substr($low_date, 4) . "' AND '0000" . substr($high_date, 4) . "'"; + + // We need to search for any birthday in this range, and whatever year that birthday is on. + $year_low = (int) substr($low_date, 0, 4); + $year_high = (int) substr($high_date, 0, 4); + + $result = db_query(" + SELECT DAYOFMONTH(birthdate) AS dom, ID_MEMBER, realName, YEAR(birthdate) AS birthYear, birthdate + FROM {$db_prefix}members + WHERE DAYOFYEAR(birthdate) IS NOT NULL + AND ($allyear_part + OR DATE_FORMAT(birthdate, '{$year_low}-%m-%d') BETWEEN '$low_date' AND '$high_date'" . ($year_low == $year_high ? '' : " + OR DATE_FORMAT(birthdate, '{$year_high}-%m-%d') BETWEEN '$low_date' AND '$high_date'") . ")", __FILE__, __LINE__); + $bday = array(); + while ($row = mysql_fetch_assoc($result)) + { + if ($year_low != $year_high) + $age_year = substr($row['birthdate'], 5) < substr($high_date, 5) ? $year_high : $year_low; + else + $age_year = $year_low; + + $bday[$row['dom']][] = array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['realName'], + 'age' => $row['birthYear'] > 0 && $row['birthYear'] <= $age_year ? $age_year - $row['birthYear'] : null, + 'is_last' => false + ); + } + mysql_free_result($result); + + // Set is_last, so the themes know when to stop placing separators. + foreach ($bday as $mday => $array) + $bday[$mday][count($array) - 1]['is_last'] = true; + + return $bday; +} + +// Create an array of events occurring in this day/month. +function calendarEventArray($low_date, $high_date, $use_permissions = true) +{ + global $db_prefix, $ID_MEMBER, $scripturl, $modSettings, $user_info, $sc; + + // Find all the calendar info... + $result = db_query(" + SELECT + cal.ID_EVENT, DAYOFMONTH(cal.eventDate) AS day, cal.title, cal.ID_MEMBER, cal.ID_TOPIC, + cal.ID_BOARD, b.memberGroups, t.ID_FIRST_MSG + FROM {$db_prefix}calendar AS cal, {$db_prefix}boards AS b, {$db_prefix}topics AS t + WHERE cal.eventDate BETWEEN '$low_date' AND '$high_date' + AND cal.ID_TOPIC = t.ID_TOPIC + AND cal.ID_BOARD = b.ID_BOARD" . ($use_permissions ? " + AND $user_info[query_see_board]" : ''), __FILE__, __LINE__); + $events = array(); + while ($row = mysql_fetch_assoc($result)) + { + // Censor the title. + censorText($row['title']); + + // If we're using permissions (calendar pages?) then just ouput normal contextual style information. + if ($use_permissions) + $events[$row['day']][] = array( + 'id' => $row['ID_EVENT'], + 'title' => $row['title'], + 'can_edit' => allowedTo('calendar_edit_any') || ($row['ID_MEMBER'] == $ID_MEMBER && allowedTo('calendar_edit_own')), + 'modify_href' => $scripturl . '?action=post;msg=' . $row['ID_FIRST_MSG'] . ';topic=' . $row['ID_TOPIC'] . '.0;calendar;eventid=' . $row['ID_EVENT'] . ';sesc=' . $sc, + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0', + 'link' => '' . $row['title'] . '', + 'is_last' => false + ); + // Otherwise, this is going to be cached and the VIEWER'S permissions should apply... just put together some info. + else + $events[$row['day']][] = array( + 'id' => $row['ID_EVENT'], + 'title' => $row['title'], + 'topic' => $row['ID_TOPIC'], + 'msg' => $row['ID_FIRST_MSG'], + 'poster' => $row['ID_MEMBER'], + 'is_last' => false, + 'allowed_groups' => explode(',', $row['memberGroups']) + ); + } + mysql_free_result($result); + + // If we're doing normal contextual data, go through and make things clear to the templates ;). + if ($use_permissions) + { + foreach ($events as $mday => $array) + $events[$mday][count($array) - 1]['is_last'] = true; + } + + return $events; +} + +// Builds an array of holiday strings for a particular month. Note... month PLUS 1 not just month. +function calendarHolidayArray($low_date, $high_date) +{ + global $db_prefix; + + // Get the lowest and highest dates for "all years". + if (substr($low_date, 0, 4) != substr($high_date, 0, 4)) + $allyear_part = "eventDate BETWEEN '0000" . substr($low_date, 4) . "' AND '0000-12-31' + OR eventDate BETWEEN '0000-01-01' AND '0000" . substr($high_date, 4) . "'"; + else + $allyear_part = "eventDate BETWEEN '0000" . substr($low_date, 4) . "' AND '0000" . substr($high_date, 4) . "'"; + + // Find some holidays... ;). + $result = db_query(" + SELECT DAYOFMONTH(eventDate) AS day, YEAR(eventDate) AS year, title + FROM {$db_prefix}calendar_holidays + WHERE eventDate BETWEEN '$low_date' AND '$high_date' + OR $allyear_part", __FILE__, __LINE__); + $holidays = array(); + while ($row = mysql_fetch_assoc($result)) + $holidays[$row['day']][] = $row['title']; + mysql_free_result($result); + + return $holidays; +} + +// Consolidating the various INSERT statements into this function. +function calendarInsertEvent($id_board, $id_topic, $title, $id_member, $month, $day, $year, $span) +{ + global $db_prefix; + + // Add special chars to the title. + $title = htmlspecialchars($title, ENT_QUOTES); + + // Span multiple days? + if (empty($span) || trim($span) == '') + $insertString = " + ($id_board, $id_topic, '$title', $id_member, '$year-$month-$day'),"; + else + { + // Calculate the time... + $tVal = mktime(0, 0, 0, $month, $day, $year); + + // I went for the simplest way I could think of for making the events span multiple days. + $insertString = ''; + + // For each day a row is added to the calendar table. + for ($i = 0; $i < $span; $i++) + { + $eventTime = array( + 'day' => (int) strftime('%d', $tVal), + 'month' => (int) strftime('%m', $tVal), + 'year' => (int) strftime('%Y', $tVal) + ); + + $insertString .= " + ($id_board, $id_topic, '$title', $id_member, '$eventTime[year]-$eventTime[month]-$eventTime[day]'),"; + + // Add a day... + $tVal = strtotime('tomorrow', $tVal); + } + } + + // Insert the day(s)! + if (strlen($insertString) > 0) + { + $insertString = substr($insertString, 0, -1); + + db_query(" + INSERT INTO {$db_prefix}calendar + (ID_BOARD, ID_TOPIC, title, ID_MEMBER, eventDate) + VALUES $insertString", __FILE__, __LINE__); + } + + updateStats('calendar'); +} + +// Returns true if this user is allowed to link the topic in question. +function calendarCanLink() +{ + global $ID_MEMBER, $db_prefix, $user_info, $topic, $board; + + // If you can't post, you can't link. + isAllowedTo('calendar_post'); + + // No board? No topic?!? + if (!isset($board)) + fatal_lang_error('calendar38', false); + if (!isset($topic)) + fatal_lang_error('calendar39', false); + + // Administrator, Moderator, or owner. Period. + if (!allowedTo('admin_forum') && !allowedTo('moderate_board')) + { + // Not admin or a moderator of this board. You better be the owner - or else. + $result = db_query(" + SELECT ID_MEMBER_STARTED + FROM {$db_prefix}topics + WHERE ID_TOPIC = $topic", __FILE__, __LINE__); + if ($row = mysql_fetch_assoc($result)) + { + // Not the owner of the topic. + if ($row['ID_MEMBER_STARTED'] != $ID_MEMBER) + fatal_lang_error('calendar41'); + } + // Topic/Board doesn't exist..... + else + fatal_lang_error('calendar40'); + mysql_free_result($result); + } + + // If you got this far, it's okay. + return true; +} + +?> \ No newline at end of file diff --git a/Sources/Display.php b/Sources/Display.php new file mode 100644 index 0000000..ead3ff4 --- /dev/null +++ b/Sources/Display.php @@ -0,0 +1,998 @@ +' : '<'; + $order = $_REQUEST['prev_next'] == 'prev' ? '' : ' DESC'; + + $request = db_query(" + SELECT t2.ID_TOPIC + FROM {$db_prefix}topics AS t, {$db_prefix}topics AS t2, {$db_prefix}messages AS m, {$db_prefix}messages AS m2 + WHERE m.ID_MSG = t.ID_LAST_MSG + AND t.ID_TOPIC = $topic" . (empty($modSettings['enableStickyTopics']) ? " + AND m2.posterTime $gt_lt m.posterTime" : " + AND ((m2.posterTime $gt_lt m.posterTime AND t2.isSticky $gt_lt= t.isSticky) OR t2.isSticky $gt_lt t.isSticky)") . " + AND t2.ID_LAST_MSG = m2.ID_MSG + AND t2.ID_BOARD = $board + ORDER BY" . (empty($modSettings['enableStickyTopics']) ? '' : " t2.isSticky$order,") . " m2.posterTime$order + LIMIT 1", __FILE__, __LINE__); + + // No more left. + if (mysql_num_rows($request) == 0) + fatal_lang_error('previous_next_end', false); + + // Now you can be sure $topic is the ID_TOPIC to view. + list ($topic) = mysql_fetch_row($request); + mysql_free_result($request); + + $context['current_topic'] = $topic; + + // Go to the newest message on this topic. + $_REQUEST['start'] = 'new'; + } + + $request=db_query(" + SELECT t.ID_TOPIC AS id, msg.subject AS subj + FROM {$db_prefix}related_topics rt + INNER JOIN {$db_prefix}topics t ON (t.ID_TOPIC=rt.ID_slave) + INNER JOIN {$db_prefix}messages msg ON (msg.ID_MSG=t.ID_FIRST_MSG) + WHERE rt.ID_master={$context['current_topic']}", __FILE__, __LINE__); + if(mysql_num_rows($request)==0) $context['related_topics']=array(); + else + while($context['related_topics'][]=mysql_fetch_assoc($request)); + + + // Add 1 to the number of views of this topic. + if (empty($_SESSION['last_read_topic']) || $_SESSION['last_read_topic'] != $topic) + { + db_query(" + UPDATE {$db_prefix}topics + SET numViews = numViews + 1 + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + + $_SESSION['last_read_topic'] = $topic; + } + + // Get all the important topic info. + $request = db_query(" + SELECT + t.numReplies, t.numViews, t.locked, ms.subject, t.isSticky, t.isFirstSticky, t.ID_POLL, + t.ID_MEMBER_STARTED, IFNULL(lt.logTime, 0) AS logTime, t.ID_FIRST_MSG, t.subtitle AS subtitle + FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS ms) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = $topic AND lt.ID_MEMBER = $ID_MEMBER) + WHERE t.ID_TOPIC = $topic + AND ms.ID_MSG = t.ID_FIRST_MSG + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error(472, false); + $topicinfo = mysql_fetch_assoc($request); + mysql_free_result($request); + + // The start isn't a number; it's information about what to do, where to go. + if (!is_numeric($_REQUEST['start'])) + { + // Redirect to the page and post with new messagesm, originally by Omar Bazavilvazo. + if ($_REQUEST['start'] == 'new') + { + // Guests automatically go to the last topic. + if ($user_info['is_guest']) + $logTime = time(); + else + { + // Find the earliest unread message in the topic. (the use of topics here is just for both tables.) + $request = db_query(" + SELECT IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS logTime + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = $topic AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = $board AND lmr.ID_MEMBER = $ID_MEMBER) + WHERE t.ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + list ($logTime) = mysql_fetch_row($request); + mysql_free_result($request); + } + + // Fall through to the next if statement. + $_REQUEST['start'] = 'from' . $logTime; + } + + // Start from a certain time index, not a message. + if (substr($_REQUEST['start'], 0, 4) == 'from') + { + // Find the number of messages posted before said time... + $request = db_query(" + SELECT COUNT(ID_MSG) + FROM {$db_prefix}messages + WHERE posterTime < " . (int) substr($_REQUEST['start'], 4) . " + AND ID_TOPIC = $topic", __FILE__, __LINE__); + list ($context['start_from']) = mysql_fetch_row($request); + mysql_free_result($request); + + // Handle view_newest_first options, and get the correct start value. + $_REQUEST['start'] = empty($options['view_newest_first']) ? $context['start_from'] : $topicinfo['numReplies'] - $context['start_from']; + } + // Link to a message... + elseif (substr($_REQUEST['start'], 0, 3) == 'msg') + { + // Find the start value for that message...... + $request = db_query(" + SELECT COUNT(ID_MSG) + FROM {$db_prefix}messages + WHERE ID_MSG < " . (int) substr($_REQUEST['start'], 3) . " + AND ID_TOPIC = $topic", __FILE__, __LINE__); + list ($_REQUEST['start']) = mysql_fetch_row($request); + mysql_free_result($request); + + // We need to reverse the start as well in this case. + if (!empty($options['view_newest_first'])) + $_REQUEST['start'] = $topicinfo['numReplies'] - $_REQUEST['start']; + } + } + + // Create a previous next string if the selected theme has it as a selected option. + $context['previous_next'] = $modSettings['enablePreviousNext'] ? '' . $txt['previous_next_back'] . ' ' . $txt['previous_next_forward'] . '' : ''; + + // Check if spellchecking is both enabled and actually working. (for quick reply.) + $context['show_spellchecking'] = $modSettings['enableSpellChecking'] && function_exists('pspell_new'); + + // Censor the title... + censorText($topicinfo['subject']); + $context['page_title'] = $topicinfo['subject']; + $context['subtitle'] = $topicinfo['subtitle']; + + $context['num_replies'] = $topicinfo['numReplies']; + $context['topic_first_message'] = $topicinfo['ID_FIRST_MSG']; + + // Is this topic sticky, or can it even be? + $topicinfo['isSticky'] = empty($modSettings['enableStickyTopics']) ? '0' : $topicinfo['isSticky']; + + // Default this topic to not marked for notifications... of course... + $context['is_marked_notify'] = false; + + // Guests can't mark topics read or for notifications, just can't sorry. + if (!$user_info['is_guest']) + { + // Mark the topic as read :) + db_query(" + REPLACE INTO {$db_prefix}log_topics + (logTime, ID_MEMBER, ID_TOPIC) + VALUES (" . time() . ", $ID_MEMBER, $topic)", __FILE__, __LINE__); + + // Check for notifications on this topic OR board. + $request = db_query(" + SELECT sent, ID_TOPIC + FROM {$db_prefix}log_notify + WHERE (ID_TOPIC = $topic OR ID_BOARD = $board) + AND ID_MEMBER = $ID_MEMBER + LIMIT 2", __FILE__, __LINE__); + $do_once = true; + while ($row = mysql_fetch_assoc($request)) + { + // Find if this topic is marked for notification... + if (!empty($row['ID_TOPIC'])) + $context['is_marked_notify'] = true; + + // Only do this once, but mark the notifications as "not sent yet" for next time. + if (!empty($row['sent']) && $do_once) + { + db_query(" + UPDATE {$db_prefix}log_notify + SET sent = 0 + WHERE (ID_TOPIC = $topic OR ID_BOARD = $board) + AND ID_MEMBER = $ID_MEMBER + LIMIT 1", __FILE__, __LINE__); + $do_once = false; + } + } + + // Mark board as seen if this is the only new topic. + if (isset($_REQUEST['topicseen'])) + { + // Use the mark read tables... and the last visit to figure out if this should be read or not. + $request = db_query(" + SELECT COUNT(t.ID_TOPIC) + FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m) + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = $board AND lb.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + WHERE t.ID_BOARD = $board + AND m.ID_MSG = t.ID_LAST_MSG + AND m.posterTime > IFNULL(lt.logTime, IFNULL(lb.logTime, 0))" . (empty($_SESSION['ID_MSG_LAST_VISIT']) ? '' : " + AND t.ID_LAST_MSG > $_SESSION[ID_MSG_LAST_VISIT]"), __FILE__, __LINE__); + list ($numNewTopics) = mysql_fetch_row($request); + mysql_free_result($request); + + // If there're no real new topics in this board, mark the board as seen. + if (empty($numNewTopics)) + $_REQUEST['boardseen'] = true; + } + + // Mark board as seen if we came using last post link from BoardIndex. (or other places...) + if (isset($_REQUEST['boardseen'])) + { + db_query(" + REPLACE INTO {$db_prefix}log_boards + (logTime, ID_MEMBER, ID_BOARD) + VALUES (" . time() . ", $ID_MEMBER, $board)", __FILE__, __LINE__); + } + } + + // Let's get nosey, who is viewing this topic? + if (!empty($settings['display_who_viewing'])) + { + // Start out with no one at all viewing it. + $context['view_members'] = array(); + $context['view_members_list'] = array(); + $context['view_num_hidden'] = 0; + + // Search for members who have this topic set in their GET data. + $request = db_query(" + SELECT mem.ID_MEMBER, IFNULL(mem.realName, 0) AS realName, mem.showOnline + FROM {$db_prefix}log_online AS lo + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER) + WHERE lo.url LIKE '%s:5:\"topic\";i:$topic;%'", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + if (!empty($row['ID_MEMBER'])) + { + // Add them both to the list and to the more detailed list. + if (!empty($row['showOnline']) || allowedTo('moderate_forum')) + $context['view_members_list'][] = empty($row['showOnline']) ? '' . $row['realName'] . '' : '' . $row['realName'] . ''; + $context['view_members'][] = array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['realName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '', + 'hidden' => empty($row['showOnline']), + ); + + if (empty($row['showOnline'])) + $context['view_num_hidden']++; + } + + // The number of guests is equal to the rows minus the ones we actually used ;). + $context['view_num_guests'] = mysql_num_rows($request) - count($context['view_members']); + mysql_free_result($request); + } + + // If all is set, but not allowed... just unset it. + if (isset($_REQUEST['all']) && empty($modSettings['enableAllMessages'])) + unset($_REQUEST['all']); + // Otherwise, it must be allowed... so pretend start was -1. + elseif (isset($_REQUEST['all'])) + $_REQUEST['start'] = -1; + + // Construct the page index, allowing for the .START method... + $context['page_index'] = constructPageIndex($scripturl . '?topic=' . $topic, $_REQUEST['start'], $topicinfo['numReplies'] + 1, $modSettings['defaultMaxMessages'], true); + $context['start'] = $_REQUEST['start']; + + // This is information about which page is current, and which page we're on - in case you don't like the constructed page index. (again, wireles..) + $context['page_info'] = array( + 'current_page' => $_REQUEST['start'] / $modSettings['defaultMaxMessages'] + 1, + 'num_pages' => floor($topicinfo['numReplies'] / $modSettings['defaultMaxMessages']) + 1 + ); + + // Figure out all the link to the next/prev/first/last/etc. for wireless mainly. + $context['links'] = array( + 'first' => $_REQUEST['start'] >= $modSettings['defaultMaxMessages'] ? $scripturl . '?topic=' . $topic . '.0' : '', + 'prev' => $_REQUEST['start'] >= $modSettings['defaultMaxMessages'] ? $scripturl . '?topic=' . $topic . '.' . ($_REQUEST['start'] - $modSettings['defaultMaxMessages']) : '', + 'next' => $_REQUEST['start'] + $modSettings['defaultMaxMessages'] < $topicinfo['numReplies'] + 1 ? $scripturl . '?topic=' . $topic. '.' . ($_REQUEST['start'] + $modSettings['defaultMaxMessages']) : '', + 'last' => $_REQUEST['start'] + $modSettings['defaultMaxMessages'] < $topicinfo['numReplies'] + 1 ? $scripturl . '?topic=' . $topic. '.' . (floor($topicinfo['numReplies'] / $modSettings['defaultMaxMessages']) * $modSettings['defaultMaxMessages']) : '', + 'up' => $scripturl . '?board=' . $board . '.0' + ); + + // If they are viewing all the posts, show all the posts, otherwise limit the number. + if (!empty($modSettings['enableAllMessages']) && $topicinfo['numReplies'] + 1 > $modSettings['defaultMaxMessages'] && $topicinfo['numReplies'] + 1 < $modSettings['enableAllMessages']) + { + if (isset($_REQUEST['all'])) + { + // No limit! (actually, there is a limit, but...) + $modSettings['defaultMaxMessages'] = -1; + $context['page_index'] .= '
' . (empty($modSettings['compactTopicPagesEnable']) ? $txt[190] : '[' . $txt[190] . '] ') . '
'; + + // Set start back to 0... + $_REQUEST['start'] = 0; + } + // They aren't using it, but the *option* is there, at least. + else + $context['page_index'] .= ' ' . $txt[190] . ' '; + } + + // Build the link tree. +/* $context['linktree'][] = array( + 'url' => $scripturl . '?topic=' . $topic . '.0', + 'name' => $topicinfo['subject'], + 'extra_before' => $settings['linktree_inline'] ? $txt[118] . ': ' : '' + );*/ + + + // Build a list of this board's moderators. + $context['moderators'] = &$board_info['moderators']; + $context['link_moderators'] = array(); + if (!empty($board_info['moderators'])) + { + // Add a link for each moderator... + foreach ($board_info['moderators'] as $mod) + $context['link_moderators'][] = '' . $mod['name'] . ''; + + // And show it after the board's name. + //$context['linktree'][count($context['linktree']) - 1]['extra_after'] = ' (' . (count($context['link_moderators']) == 1 ? $txt[298] : $txt[299]) . ': ' . implode(', ', $context['link_moderators']) . ')'; + $context['moderators_list'] = (count($context['link_moderators']) == 1 ? $txt[298] : $txt[299]) . ': ' . implode(', ', $context['link_moderators']); + } + + // Information about the current topic... + $context['is_locked'] = $topicinfo['locked']; + $context['is_first_sticky'] = $topicinfo['isFirstSticky']; + $context['is_sticky'] = $topicinfo['isSticky']; + $context['is_very_hot'] = $topicinfo['numReplies'] >= $modSettings['hotTopicVeryPosts']; + $context['is_hot'] = $topicinfo['numReplies'] >= $modSettings['hotTopicPosts']; + + // We don't want to show the poll icon in the topic class here, so pretend it's not one. + $context['is_poll'] = false; + determineTopicClass($context); + + $context['is_poll'] = $topicinfo['ID_POLL'] > 0 && $modSettings['pollMode'] == '1' && allowedTo('poll_view'); + + // Did this user start the topic or not? + $context['user']['started'] = $ID_MEMBER == $topicinfo['ID_MEMBER_STARTED'] && !$user_info['is_guest']; + + // Set the topic's information for the template. + $context['subject'] = $topicinfo['subject']; + $context['num_views'] = $topicinfo['numViews']; + + // Create the poll info if it exists. + if ($context['is_poll']) + { +// $pollinfo = eaccelerator_get('__poll-' . $topicinfo['ID_POLL']); +// if ($pollinfo === NULL) { + // Get the question and if it's locked. + $request = db_query(" + SELECT + p.question, p.votingLocked, p.hideResults, p.expireTime, p.maxVotes, p.changeVote, + p.ID_MEMBER, IFNULL(mem.realName, p.posterName) AS posterName, + COUNT(DISTINCT lp.ID_MEMBER) AS total, COUNT(lp2.ID_MEMBER) AS has_voted + FROM {$db_prefix}polls AS p + LEFT JOIN {$db_prefix}log_polls AS lp ON (lp.ID_POLL = p.ID_POLL) + LEFT JOIN {$db_prefix}log_polls AS lp2 ON (lp2.ID_POLL = p.ID_POLL AND lp2.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = p.ID_MEMBER) + WHERE p.ID_POLL = $topicinfo[ID_POLL] + GROUP BY p.ID_POLL + LIMIT 1", __FILE__, __LINE__); + $pollinfo = mysql_fetch_assoc($request); +// eaccelerator_put('__poll-' . $topicinfo['ID_POLL'], $topicinfo); + mysql_free_result($request); +// } + + // Get all the options, and calculate the total votes. + $request = db_query(" + SELECT ID_CHOICE, label, votes + FROM {$db_prefix}poll_choices + WHERE ID_POLL = $topicinfo[ID_POLL]", __FILE__, __LINE__); + $pollOptions = array(); + $realtotal = 0; + while ($row = mysql_fetch_assoc($request)) + { + $pollOptions[$row['ID_CHOICE']] = array($row['label'], $row['votes']); + $realtotal += $row['votes']; + } + mysql_free_result($request); + + // Set up the basic poll information. + $context['poll'] = array( + 'id' => $topicinfo['ID_POLL'], + 'image' => 'normal_' . (empty($pollinfo['votingLocked']) ? 'poll' : 'locked_poll'), + 'question' => doUBBC($pollinfo['question']), + 'total_votes' => $pollinfo['total'], + 'change_vote' => !empty($pollinfo['changeVote']), + 'is_locked' => !empty($pollinfo['votingLocked']), + 'options' => array(), + 'lock' => allowedTo('poll_lock_any') || ($context['user']['started'] && allowedTo('poll_lock_own')), + 'edit' => allowedTo('poll_edit_any') || ($context['user']['started'] && allowedTo('poll_edit_own')), + 'allowed_warning' => $pollinfo['maxVotes'] > 1 ? sprintf($txt['poll_options6'], $pollinfo['maxVotes']) : '', + 'is_expired' => !empty($pollinfo['expireTime']) && $pollinfo['expireTime'] < time(), + 'expire_time' => !empty($pollinfo['expireTime']) ? timeformat($pollinfo['expireTime']) : 0, + 'has_voted' => !empty($pollinfo['has_voted']), + 'starter' => array( + 'id' => $pollinfo['ID_MEMBER'], + 'name' => $row['posterName'], + 'href' => $pollinfo['ID_MEMBER'] == 0 ? '' : $scripturl . '?action=profile;u=' . $pollinfo['ID_MEMBER'], + 'link' => $pollinfo['ID_MEMBER'] == 0 ? $row['posterName'] : '' . $row['posterName'] . '' + ) + ); + + // You're allowed to vote if: + // 1. the poll did not expire, and + // 2. you're not a guest... and + // 3. you're not trying to view the results, and + // 4. the poll is not locked, and + // 5. you have the proper permissions, and + // 6. you haven't already voted before. + $context['allow_vote'] = !$context['poll']['is_expired'] && !$user_info['is_guest'] && !isset($_REQUEST['viewResults']) && empty($pollinfo['votingLocked']) && allowedTo('poll_vote') && !$context['poll']['has_voted']; + + // You're allowed to view the results if: + // 1. You're just a super-nice-guy, or + // 2. Anyone can see them (hideResults == 0), or + // 3. You can see them after you voted (hideResults == 1), or + // 4. You've waited long enough for the poll to expire. (whether hideResults is 1 or 2.) + $context['allow_poll_view'] = allowedTo('moderate_board') || $pollinfo['hideResults'] == 0 || ($pollinfo['hideResults'] == 1 && $context['poll']['has_voted']) || $context['poll']['is_expired']; + + // You're allowed to change your vote if: + // 1. the poll did not expire, and + // 2. you're not a guest... and + // 3. the poll is not locked, and + // 4. you have the proper permissions, and + // 5. you have already voted. + // 6. the poll creator has said you can! + $context['allow_change_vote'] = !$context['poll']['is_expired'] && !$user_info['is_guest'] && empty($pollinfo['votingLocked']) && allowedTo('poll_vote') && $context['poll']['has_voted'] && $context['poll']['change_vote']; + + // Calculate the percentages and bar lengths... + $divisor = $realtotal == 0 ? 1 : $realtotal; + + // Determine if a decimal point is needed in order for the options to add to 100%. + $precision = $realtotal == 100 ? 0 : 1; + + // Now look through each option, and... + foreach ($pollOptions as $i => $option) + { + // First calculate the percentage, and then the width of the bar... + $bar = round(($option[1] * 100) / $divisor, $precision); + $barWide = $bar == 0 ? 1 : floor(($bar * 8) / 3); + + // Now add it to the poll's contextual theme data. + $context['poll']['options'][$i] = array( + 'percent' => $bar, + 'votes' => $option[1], + 'bar' => '-', + 'option' => doUBBC($option[0]), + 'vote_button' => '' + ); + } + } + + // Calculate the fastest way to get the messages. + $ascending = empty($options['view_newest_first']); + $start = $_REQUEST['start']; + $limit = $modSettings['defaultMaxMessages']; + $firstIndex = 0; + + if ($start > $topicinfo['numReplies'] / 2 && $modSettings['defaultMaxMessages'] != -1) + { + $ascending = !$ascending; + $limit = $topicinfo['numReplies'] < $start + $limit ? $topicinfo['numReplies'] - $start + 1 : $limit; + $start = $topicinfo['numReplies'] < $start + $limit ? 0 : $topicinfo['numReplies'] - $start - $limit + 1; + $firstIndex = $limit - 1; + } + + + // Get each post and poster in this topic. + $messages = array(); + $posters = array(); + + // always get post number 0 for sticky topics + if ((($start > 0) || !($ascending)) && ($context['is_sticky'] || $context['is_first_sticky'])) { + $request = db_query(" + SELECT ID_MSG, ID_MEMBER + FROM {$db_prefix}messages + WHERE ID_TOPIC = $topic + ORDER BY ID_MSG LIMIT 1", __FILE__, __LINE__); + + $row = mysql_fetch_assoc($request); + if (!empty($row['ID_MEMBER'])) + $posters[] = $row['ID_MEMBER']; + $messages[] = $row['ID_MSG']; + mysql_free_result($request); + } + + // now fetch the rest of the posts + + $request = db_query(" + SELECT ID_MSG, ID_MEMBER + FROM {$db_prefix}messages + WHERE ID_TOPIC = $topic + ORDER BY ID_MSG " . ($ascending ? '' : 'DESC') . ($modSettings['defaultMaxMessages'] == -1 ? '' : " + LIMIT $start, $limit"), __FILE__, __LINE__); + + // declarations moved up + + while ($row = mysql_fetch_assoc($request)) + { + if (!empty($row['ID_MEMBER'])) + $posters[] = $row['ID_MEMBER']; + $messages[] = $row['ID_MSG']; + } + mysql_free_result($request); + $posters = array_unique($posters); + + $attachments = array(); + + // If there _are_ messages here... (probably an error otherwise :!) + if (!empty($messages)) + { + // Fetch attachments. + if (!empty($modSettings['attachmentEnable'])) + { + $request = db_query(" + SELECT ID_ATTACH, ID_MSG, filename, IFNULL(size, 0) AS filesize, downloads + FROM {$db_prefix}attachments + WHERE ID_MSG IN (" . implode(',', $messages) . ")", __FILE__, __LINE__); + $temp = array(); + while ($row = mysql_fetch_assoc($request)) + { + $temp[$row['ID_ATTACH']] = $row; + + if (!isset($attachments[$row['ID_MSG']])) + $attachments[$row['ID_MSG']] = array(); + } + mysql_free_result($request); + + // This is better than sorting it with the query... + ksort($temp); + + foreach ($temp as $row) + $attachments[$row['ID_MSG']][] = $row; + } + + // What? It's not like it *couldn't* be only guests in this topic... + if (!empty($posters)) + loadMemberData($posters); + $messages_request = db_query(" + SELECT + ID_MSG, icon, subject, posterTime, posterIP, ID_MEMBER, modifiedTime, modifiedName, body, + smileysEnabled, posterName, posterEmail, nowPlaying, + (GREATEST(posterTime, modifiedTime) > $topicinfo[logTime]) AS isRead + FROM {$db_prefix}messages + WHERE ID_MSG IN (" . implode(',', $messages) . ") + ORDER BY ID_MSG" . (empty($options['view_newest_first']) ? '' : ' DESC'), __FILE__, __LINE__); + + // Go to the last message if the given time is beyond the time of the last message. + if (isset($context['start_from']) && $context['start_from'] >= $topicinfo['numReplies']) + $context['start_from'] = $topicinfo['numReplies']; + + // Since the anchor information is needed on the top of the page we load these variables beforehand. + $context['first_message'] = isset($messages[$firstIndex]) ? $messages[$firstIndex] : $messages[0]; + if (empty($options['view_newest_first'])) + $context['first_new_message'] = isset($context['start_from']) && $_REQUEST['start'] == $context['start_from']; + else + $context['first_new_message'] = isset($context['start_from']) && $_REQUEST['start'] == $topicinfo['numReplies'] - $context['start_from']; + } + else + { + $messages_request = false; + $context['first_message'] = 0; + $context['first_new_message'] = false; + } + + // Set the callback. (do you REALIZE how much memory all the messages would take?!?) + $context['get_message'] = 'prepareDisplayContext'; + + // Basic settings.... may be converted over at some point. + $context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']) || ($user_info['is_guest'] && !empty($modSettings['guest_hideContacts'])); + + // Now set all the wonderful, wonderful permissions... like moderation ones... + $common_permissions = array( + 'can_sticky' => 'make_sticky', + 'can_merge' => 'merge_any', + 'can_split' => 'split_any', + 'calendar_post' => 'calendar_post', + 'can_mark_notify' => 'mark_any_notify', + 'can_send_topic' => 'send_topic', + 'can_send_pm' => 'pm_send', + 'can_report_moderator' => 'report_any', + 'can_moderate_forum' => 'moderate_forum' + ); + foreach ($common_permissions as $contextual => $perm) + $context[$contextual] = allowedTo($perm); + + // Permissions with _any/_own versions. $context[YYY] => ZZZ_any/_own. + $anyown_permissions = array( + 'can_move' => 'move', + 'can_lock' => 'lock', + 'can_delete' => 'delete', + 'can_add_poll' => 'poll_add', + 'can_remove_poll' => 'poll_remove', + 'can_reply' => 'post_reply', + ); + foreach ($anyown_permissions as $contextual => $perm) + $context[$contextual] = allowedTo($perm . '_any') || ($context['user']['started'] && allowedTo($perm . '_own')); + + // Cleanup all the permissions with extra stuff... + $context['can_sticky'] &= !empty($modSettings['enableStickyTopics']); + $context['calendar_post'] &= !empty($modSettings['cal_enabled']); + $context['can_add_poll'] &= $modSettings['pollMode'] == '1' && $topicinfo['ID_POLL'] <= 0; + $context['can_remove_poll'] &= $modSettings['pollMode'] == '1' && $topicinfo['ID_POLL'] > 0; + $context['can_reply'] &= empty($topicinfo['locked']) || allowedTo('moderate_board'); + $context['can_warn'] = allowedTo('visual_warn_any'); + + // Start this off for quick moderation - it will be or'd for each post. + $context['can_remove_post'] = allowedTo('remove_any') || (allowedTo('remove_replies') && $context['user']['started']); + + // Load the "Jump to" list... + loadJumpTo(); + + // Load up the "double post" sequencing magic. + if (!empty($options['display_quick_reply'])) + checkSubmitOnce('register'); +} + +// Callback for the message display. +function prepareDisplayContext($reset = false) +{ + global $settings, $txt, $modSettings, $scripturl, $options; + global $themeUser, $context, $messages_request, $topic, $ID_MEMBER, $attachments; + + static $counter = null; + + // If the query returned false, bail. + if ($messages_request == false) + return false; + + // Remember which message this is. (ie. reply #83) + if ($counter === null || $reset) + $counter = empty($options['view_newest_first']) ? $context['start'] : $context['num_replies'] - $context['start']; + + // Start from the beginning... + if ($reset) + return @mysql_data_seek($messages_request, 0); + + // Attempt to get the next message. + $message = mysql_fetch_assoc($messages_request); + if (!$message) + return false; + + // If you're a lazy bum, you probably didn't give a subject... + $message['subject'] = $message['subject'] != '' ? $message['subject'] : $txt[24]; + + // Are you allowed to remove at least a single reply? + $context['can_remove_post'] |= allowedTo('remove_own') && $message['ID_MEMBER'] == $ID_MEMBER; + + // If it couldn't load, or the user was a guest.... someday may be done with a guest table. + if (!loadMemberContext($message['ID_MEMBER'])) + { + // Notice this information isn't used anywhere else.... + $themeUser[$message['ID_MEMBER']]['name'] = $message['posterName']; + $themeUser[$message['ID_MEMBER']]['id'] = 0; + $themeUser[$message['ID_MEMBER']]['group'] = $txt[28]; + $themeUser[$message['ID_MEMBER']]['link'] = $message['posterName']; + $themeUser[$message['ID_MEMBER']]['email'] = $message['posterEmail']; + $themeUser[$message['ID_MEMBER']]['is_guest'] = true; + } + else + $themeUser[$message['ID_MEMBER']]['can_view_profile'] = allowedTo('profile_view_any') || ($message['ID_MEMBER'] == $ID_MEMBER && allowedTo('profile_view_own')); + + $themeUser[$message['ID_MEMBER']]['ip'] = $message['posterIP']; + + // Do the censor thang. + censorText($message['body']); + censorText($message['subject']); + + censorText($message['nowPlaying']); + + // Run BBC interpreter on the message. + $message['body'] = doUBBC($message['body'], $message['smileysEnabled']); + + // Compose the memory eat- I mean message array. + $output = array( + 'attachment' => loadAttachmentContext($message['ID_MSG']), + 'alternate' => $counter % 2, + 'id' => $message['ID_MSG'], + 'href' => $scripturl . '?topic=' . $topic . '.msg' . $message['ID_MSG'] . '#msg' . $message['ID_MSG'], + 'link' => '' . $message['subject'] . '', + 'member' => &$themeUser[$message['ID_MEMBER']], + 'icon' => $message['icon'], + 'subject' => $message['subject'], + 'time' => timeformat($message['posterTime']), + 'timestamp' => $message['posterTime'], + 'counter' => $counter, + 'modified' => array( + 'time' => timeformat($message['modifiedTime']), + 'timestamp' => $message['modifiedTime'], + 'name' => $message['modifiedName'] + ), + 'body' => $message['body'], + + 'nowplaying' => $message['nowPlaying'], + 'new' => empty($message['isRead']), + 'first_new' => isset($context['start_from']) && $context['start_from'] == $counter, + 'can_modify' => allowedTo('modify_any') || (allowedTo('modify_replies') && $context['user']['started']) || (allowedTo('modify_own') && $message['ID_MEMBER'] == $ID_MEMBER && $message['posterTime'] > time() - 3600*24), + 'can_remove' => allowedTo('remove_any') || (allowedTo('remove_replies') && $context['user']['started']) || (allowedTo('remove_own') && $message['ID_MEMBER'] == $ID_MEMBER), + 'can_see_ip' => allowedTo('moderate_forum') || ($message['ID_MEMBER'] == $ID_MEMBER && !empty($ID_MEMBER)), + ); + + if (empty($options['view_newest_first'])) + $counter++; + else + $counter--; + + return $output; +} + +// Download an attachment. +function Download() +{ + global $txt, $modSettings, $db_prefix, $user_info, $scripturl, $context; + + // Make sure some attachment was requested! + if (!isset($_REQUEST['id'])) + fatal_lang_error(1, false); + + $_REQUEST['id'] = (int) $_REQUEST['id']; + + if (isset($_REQUEST['type']) && $_REQUEST['type'] == 'avatar') + { + $request = db_query(" + SELECT filename, ID_ATTACH + FROM {$db_prefix}attachments + WHERE ID_ATTACH = $_REQUEST[id] + AND ID_MEMBER > 0 + LIMIT 1", __FILE__, __LINE__); + $_REQUEST['image'] = true; + } + // This is just a regular attachment... + else + { + isAllowedTo('view_attachments'); + + // Make sure this attachment is on this board. + $request = db_query(" + SELECT a.filename, a.ID_ATTACH + FROM {$db_prefix}boards AS b, {$db_prefix}messages AS m, {$db_prefix}attachments AS a + WHERE b.ID_BOARD = m.ID_BOARD + AND $user_info[query_see_board] + AND m.ID_MSG = a.ID_MSG + AND a.ID_ATTACH = $_REQUEST[id] + LIMIT 1", __FILE__, __LINE__); + } + if (mysql_num_rows($request) == 0) + fatal_lang_error(1, false); + list ($real_filename, $ID_ATTACH) = mysql_fetch_row($request); + mysql_free_result($request); + + // Update the download counter. + db_query(" + UPDATE {$db_prefix}attachments + SET downloads = downloads + 1 + WHERE ID_ATTACH = $ID_ATTACH", __FILE__, __LINE__); + + // This is done to clear any output that was made before now. (would use ob_clean(), but that's PHP 4.2.0+...) + ob_end_clean(); + if (!empty($modSettings['enableCompressedOutput']) && @version_compare(PHP_VERSION, '4.2.0') >= 0) + @ob_start('ob_gzhandler'); + else + ob_start(); + + $filename = getAttachmentFilename($real_filename, $_REQUEST['id']); + $thumb_filename = getThumbnailFilename($real_filename, $_REQUEST['id']); + + // No point in a nicer message, because this is supposed to be an attachment anyway... + if (!file_exists($filename)) + { + loadLanguage('Errors'); + header('HTTP/1.0 404 ' . $txt['attachment_not_found']); + header('Content-Type: text/plain'); + die('404 - ' . $txt['attachment_not_found']); + } + + // Send the attachment headers. + header('Pragma: '); + header('Cache-Control: max-age=' . (525600 * 60) . ', private'); + if (!$context['browser']['is_gecko']) + header('Content-Transfer-Encoding: binary'); + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 525600 * 60) . ' GMT'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($filename)) . ' GMT'); + header('Accept-Ranges: bytes'); + header('Set-Cookie:'); + header('Connection: close'); + + if (!(isset($_REQUEST['image'])||isset($_REQUEST['thumb']))) + { + header('Content-Disposition: attachment; filename="' . $real_filename . '"'); + header('Content-Type: application/octet-stream'); + } + + if (filesize($filename) != 0) + { + $size = @getimagesize($filename); + if (!empty($size) && $size[2] > 0 && $size[2] < 4) + header('Content-Type: image/' . ($size[2] != 1 ? ($size[2] != 2 ? 'png' : 'jpeg') : 'gif')); + } + + if (isset($_REQUEST['thumb'])) + { + if(!file_exists($thumb_filename)) + { + list($width, $height, $type) = @getimagesize($filename); + $type=($type != 1 ? ($type != 2 ? 'png' : 'jpeg') : 'gif'); + eval("\$img=imagecreatefrom$type(\$filename);"); + $width_orig=$width; $height_orig=$height; + if ($height > 240 || $width > 320) + { + if ($width > 320 ) + { + $height = floor(320 / $width * $height); + $width = 320; + if ($height > 240) + { + $width = floor(240 / $height * $width); + $height = 240; + } + } + elseif ($height > 240) + { + $width = floor(240 / $height * $width); + $height = 240; + } + $thumb = imagecreatetruecolor($width, $height); + imagecopyresampled($thumb,$img, 0,0,0,0,$width,$height,$width_orig,$height_orig); + eval("image$type(\$thumb,\$thumb_filename);"); + } + } + $filename=$thumb_filename; + + } + + if (empty($modSettings['enableCompressedOutput'])) + header('Content-Length: ' . filesize($filename)); + + // Try to buy some time... + @set_time_limit(0); + @ini_set('memory_limit', '128M'); + + // On some of the less-bright hosts, readfile() is disabled. It's just a faster, more byte safe, version of what's in the if. + if (@readfile($filename) === null) + echo implode('', file($filename)); + + obExit(false); +} + +function loadAttachmentContext($ID_MSG) +{ + global $attachments, $modSettings, $txt, $scripturl, $topic; + + // Set up the attachment info - based on code by Meriadoc. + $attachmentData = array(); + if (isset($attachments[$ID_MSG]) && !empty($modSettings['attachmentEnable'])) + { + foreach ($attachments[$ID_MSG] as $i => $attachment) + { + $attachmentData[$i] = array( + 'name' => $attachment['filename'], + 'downloads' => $attachment['downloads'], + 'size' => round($attachment['filesize'] / 1024, 2) . ' ' . $txt['smf211'], + 'byte_size' => $attachment['filesize'], + 'href' => $scripturl . '?action=dlattach;topic=' . $topic . '.0;id=' . $attachment['ID_ATTACH'], + 'link' => '' . $attachment['filename'] . '', + 'is_image' => false + ); + + if (empty($modSettings['attachmentShowImages'])) + continue; + + // Set up the image attachment info. + $filename = getAttachmentFilename($attachment['filename'], $attachment['ID_ATTACH']); + + $imageTypes = array('gif' => 1, 'jpeg' => 2, 'png' => 3, 'bmp' => 6); + if (file_exists($filename) && filesize($filename) > 0) + list ($width, $height, $imageType) = @getimagesize($filename); + else + { + $imageType = 0; + $attachmentData[$i]['size'] = '0 ' . $txt['smf211']; + } + + // If this isn't an image, we're done. + if (!allowedTo('view_attachments') || !in_array($imageType, $imageTypes)) + continue; +/* + if(!file_exists($modSettings['attachmentUploadDir'].'/thumbs/'. + // Start resize/restrict posted images mod by Mostmaster. + if (!(empty($modSettings['maxwidth']) && empty($modSettings['maxheight'])) && ($width > $modSettings['maxwidth'] || $height > $modSettings['maxheight'])) + { + if ($width > $modSettings['maxwidth'] && !empty($modSettings['maxwidth'])) + { + $height = floor($modSettings['maxwidth'] / $width * $height); + $width = $modSettings['maxwidth']; + if ($height > $modSettings['maxheight'] && !empty($modSettings['maxheight'])) + { + $width = floor($modSettings['maxheight'] / $height * $width); + $height = $modSettings['maxheight']; + } + } + elseif ($height > $modSettings['maxheight'] && !empty($modSettings['maxheight'])) + { + $width = floor($modSettings['maxheight'] / $height * $width); + $height = $modSettings['maxheight']; + } + + $attachmentData[$i]['image'] = ''; + } + else*/ + $attachmentData[$i]['image'] = ''; + // End resize/restrict posted images mod by Mostmaster. + + $attachmentData[$i]['width'] = $width; + $attachmentData[$i]['height'] = $height; + $attachmentData[$i]['is_image'] = true; + $attachmentData[$i]['downloads']++; + } + } + + return $attachmentData; +} + +?> diff --git a/Sources/DumpDatabase.php b/Sources/DumpDatabase.php new file mode 100644 index 0000000..650e724 --- /dev/null +++ b/Sources/DumpDatabase.php @@ -0,0 +1,313 @@ + '\\_', '%' => '\\%')) . "%'", $db_connection); + + // Dump each table. + while ($tableName = mysql_fetch_row($queryTables)) + { + // Are we dumping the structures? + if (isset($_GET['struct'])) + { + echo + $crlf, + '#', $crlf, + '# Table structure for table `', $tableName[0], '`', $crlf, + '#', $crlf, + $crlf, + 'DROP TABLE IF EXISTS `', $tableName[0], '`;', $crlf, + $crlf, + getTableSQLData($tableName[0]), ';', $crlf; + } + + // How about the data? + if (!isset($_GET['data'])) + continue; + + // Are there any rows in this table? + $get_rows = getTableContent($tableName[0]); + + // No rows to get - skip it. + if (empty($get_rows)) + continue; + + echo + $crlf, + '#', $crlf, + '# Dumping data in `', $tableName[0], '`', $crlf, + '#', $crlf, + $crlf, + $get_rows, + '# --------------------------------------------------------', $crlf; + } + + echo + $crlf, + '# Done', $crlf; + + exit; +} + +// Get the content (INSERTs) for a table. +function getTableContent($tableName) +{ + global $crlf, $db_connection; + + // Get everything from the table. + $result = mysql_query(" + SELECT * + FROM `$tableName`", $db_connection); + + // The number of rows, just for record keeping and breaking INSERTs up. + $num_rows = mysql_num_rows($result); + $current_row = 0; + + if ($num_rows == 0) + return ''; + + $fields = array_keys(mysql_fetch_assoc($result)); + mysql_data_seek($result, 0); + + // Start it off with the basic INSERT INTO. + $data = 'INSERT INTO `' . $tableName . '`' . $crlf . "\t(`" . implode('`, `', $fields) . '`)' . $crlf . 'VALUES '; + + // Loop through each row. + while ($row = mysql_fetch_row($result)) + { + $current_row++; + + // Get the fields in this row... + $field_list = array(); + for ($j = 0; $j < mysql_num_fields($result); $j++) + { + // Try to figure out the type of each field. (NULL, number, or 'string'.) + if (!isset($row[$j])) + $field_list[] = 'NULL'; + elseif (is_numeric($row[$j])) + $field_list[] = $row[$j]; + else + $field_list[] = "'" . mysql_escape_string($row[$j]) . "'"; + } + + // 'Insert' the data. + $data .= '(' . implode(', ', $field_list) . ')'; + + // Start a new INSERT statement after every 250.... + if ($current_row > 249 && $current_row % 250 == 0) + $data .= ';' . $crlf . 'INSERT INTO `' . $tableName . '`' . $crlf . "\t(`" . implode('`, `', $fields) . '`)' . $crlf . 'VALUES '; + // All done! + elseif ($current_row == $num_rows) + $data .= ';' . $crlf; + // Otherwise, go to the next line. + else + $data .= ',' . $crlf . "\t"; + } + mysql_free_result($result); + + // Return an empty string if there were no rows. + return $data; +} + +// Get the schema (CREATE) for a table. +function getTableSQLData($tableName) +{ + global $crlf, $db_connection; + + // Start the create table... + $schema_create = 'CREATE TABLE `' . $tableName . '` (' . $crlf; + + // Find all the fields. + $result = mysql_query(" + SHOW FIELDS + FROM `$tableName`", $db_connection); + while ($row = mysql_fetch_assoc($result)) + { + // Make the CREATE for this column. + $schema_create .= ' ' . $row['Field'] . ' ' . $row['Type'] . ($row['Null'] != 'YES' ? ' NOT NULL' : ''); + + // Add a default...? + if (isset($row['Default'])) + $schema_create .= ' default ' . (is_numeric($row['Default']) ? $row['Default'] : "'" . mysql_escape_string($row['Default']) . "'"); + + // And now any extra information. (such as auto_increment.) + $schema_create .= ($row['Extra'] != '' ? ' ' . $row['Extra'] : '') . ',' . $crlf; + } + mysql_free_result($result); + + // Take off the last comma. + $schema_create = substr($schema_create, 0, -strlen($crlf) - 1); + + // Find the keys. + $result = mysql_query(" + SHOW KEYS + FROM `$tableName`", $db_connection); + $indexes = array(); + while ($row = mysql_fetch_array($result)) + { + // IS this a primary key, unique index, or regular index? + $row['Key_name'] = $row['Key_name'] == 'PRIMARY' ? 'PRIMARY KEY' : (empty($row['Non_unique']) ? 'UNIQUE ' : ($row['Comment'] == 'FULLTEXT' ? 'FULLTEXT ' : 'KEY ')) . $row['Key_name']; + + // Is this the first column in the index? + if (empty($indexes[$row['Key_name']])) + $indexes[$row['Key_name']] = array(); + + // A sub part, like only indexing 15 characters of a varchar. + if (!empty($row['Sub_part'])) + $indexes[$row['Key_name']][$row['Seq_in_index']] = $row['Column_name'] . '(' . $row['Sub_part'] . ')'; + else + $indexes[$row['Key_name']][$row['Seq_in_index']] = $row['Column_name']; + } + mysql_free_result($result); + + // Build the CREATEs for the keys. + foreach ($indexes as $keyname => $columns) + { + // Ensure the columns are in proper order. + ksort($columns); + + $schema_create .= ',' . $crlf . ' ' . $keyname . ' (' . implode($columns, ', ') . ')'; + } + + // Now just get the comment and type... (MyISAM, etc.) + $result = mysql_query(" + SHOW TABLE STATUS + LIKE '" . strtr($tableName, array('_' => '\\_', '%' => '\\%')) . "'", $db_connection); + $row = mysql_fetch_assoc($result); + mysql_free_result($result); + + // Probably MyISAM.... and it might have a comment. + $schema_create .= $crlf . ') TYPE=' . (isset($row['Type']) ? $row['Type'] : $row['Engine']) . ($row['Comment'] != '' ? ' COMMENT="' . $row['Comment'] . '"' : ''); + + return $schema_create; +} + +?> \ No newline at end of file diff --git a/Sources/Errors.php b/Sources/Errors.php new file mode 100644 index 0000000..61d5c4d --- /dev/null +++ b/Sources/Errors.php @@ -0,0 +1,471 @@ + '<', '>' => '>', '"' => '"')); + $error_message = strtr($error_message, array('<br />' => '
', '<b>' => '', '</b>' => '', "\n" => '
')); + + // Add a file and line to the error message? (remember, $txt may not exist yet!!) + if ($file != null) + $error_message .= '
' . (isset($txt[1003]) ? $txt[1003] . ': ' : '') . $file; + if ($line != null) + $error_message .= '
' . (isset($txt[1004]) ? $txt[1004] . ': ' : '') . $line; + + // Just in case there's no ID_MEMBER or IP set yet. + if (empty($ID_MEMBER)) + $ID_MEMBER = 0; + if (empty($user_info['ip'])) + $user_info['ip'] = ''; + + // Don't log the session hash in the url twice, it's a waste. + $query_string = empty($_SERVER['QUERY_STRING']) ? '' : addslashes(htmlspecialchars('?' . preg_replace('~;sesc=[^&;]+~', ';sesc', $_SERVER['QUERY_STRING']))); + + // Insert the error into the database. + mysql_query(" + INSERT INTO {$db_prefix}log_errors + (ID_MEMBER, logTime, IP, url, message, session) + VALUES ($ID_MEMBER, " . time() . ", '$user_info[ip]', '$query_string', '" . addslashes($error_message) . "', '$sc')", $db_connection) or die($error_message); + + // Return the message to make things simpler. + return $error_message; +} + +// Database error! +function db_error($db_string, $file, $line) +{ + global $txt, $context, $sourcedir, $db_connection, $db_last_error, $webmaster_email, $modSettings, $forum_version; + + // This is the error message... + $query_error = mysql_error($db_connection); + + // Log the error. + log_error($txt[1001] . ': ' . $query_error, $file, $line); + + // Database error auto fixing ;). + if (!isset($modSettings['autoFixDatabase']) || $modSettings['autoFixDatabase'] == '1') + { + // Check for error 135... only fix it once every three days, and send an email. (can't use empty because it might not be set yet...) + if ($db_last_error < time() - 3600 * 24 * 3 && strpos($query_error, 'Can\'t open file') !== false) + { + // Admin.php for updateSettingsFile(), Subs-Post.php for sendmail(). + require_once($sourcedir . '/Admin.php'); + require_once($sourcedir . '/Subs-Post.php'); + + // Make a note of the REPAIR... + updateSettingsFile(array('db_last_error' => time())); + + preg_match('/^Can\'t open file:\s*[\']?([^\.]+?)\./', $query_error, $match); + if (!empty($match[1])) + mysql_query(" + REPAIR TABLE $match[1]", $db_connection); + + // And send off an email! + sendmail($webmaster_email, $txt[1001], $txt[1005]); + + // Try the query again... + $ret = mysql_query($db_string, $db_connection); + if ($ret !== false) + return $ret; + } + // Check for the "lost connection" error - and try it just one more time. + elseif (strpos($query_error, 'Lost connection to MySQL server during query') !== false || strpos($query_error, 'Deadlock found when trying to get lock') !== false) + { + $ret = mysql_query($db_string, $db_connection); + + // If it failed again, shucks to be you... we're not trying it over and over. + if ($ret !== false) + return $ret; + } + } + + // Nothing's defined yet... just die with it. + if (empty($context) || empty($txt)) + die($query_error); + + // Show an error message, if possible. + $context['error_title'] = $txt[1001]; + if (allowedTo('admin_forum')) + $context['error_message'] = nl2br($query_error) . '
' . $txt[1003] . ': ' . $file . '
' . $txt[1004] . ': ' . $line; + else + $context['error_message'] = $txt[1002]; + + // A database error is often the sign of a database in need of updgrade. Check forum versions, and if not identical suggest an upgrade... (not for Demo/CVS versions!) + if (allowedTo('admin_forum') && !empty($forum_version) && $forum_version != 'SMF ' . @$modSettings['smfVersion'] && strpos($forum_version, 'Demo') === false && strpos($forum_version, 'CVS') === false) + $context['error_message'] .= '

' . $txt['database_error_versions']; + + // It's already been logged... don't log it again. + fatal_error($context['error_message'], false); +} + +// An irrecoverable error. +function fatal_error($error, $log = true) +{ + global $txt, $context; + + // We don't have $txt yet, but that's okay... + if (empty($txt)) + die($error); + + // Log the error and set up the template. + if (!isset($context['error_title'])) + { + $context['error_title'] = $txt[106]; + $context['error_message'] = $log ? log_error($error) : $error; + } + + // If there's not a page title yet, set one. + if (!isset($context['page_title'])) + $context['page_title'] = $context['error_title']; + + // Display the error message - wireless? + if (WIRELESS) + $context['sub_template'] = WIRELESS_PROTOCOL . '_error'; + // Load the template and set the sub template. + else + { + loadTemplate('Errors'); + $context['sub_template'] = 'fatal_error'; + } + + // We want whatever for the header, and a footer. (footer includes sub template!) + obExit(null, true); +} + +// A fatal error with a message stored in the language file. +function fatal_lang_error($error, $log = true, $sprintf = array()) +{ + global $txt; + + // Load the language file... + loadLanguage('Errors'); + + // Are we formatting anything? + if (empty($sprintf)) + fatal_error($txt[$error], $log); + else + fatal_error(vsprintf($txt[$error], $sprintf), $log); +} + +// Handler for standard error messages. +function error_handler($error_level, $error_string, $file, $line) +{ + global $settings; + + // Ignore errors if we're ignoring them or they are strict notices from PHP 5 (which cannot be solved without breaking PHP 4.) + if (error_reporting() == 0 || (defined('E_STRICT') && $error_level == E_STRICT)) + return; + + if (strpos($file, 'eval()') !== false && !empty($settings['current_include_filename'])) + $file = realpath($settings['current_include_filename']) . ' (eval?)'; + + if (isset($GLOBALS['db_show_debug']) && $GLOBALS['db_show_debug'] === true) + { + // Debugging! This should look like a PHP error message. + echo '
+', $error_level % 255 == E_ERROR ? 'Error' : ($error_level % 255 == E_WARNING ? 'Warning' : 'Notice'), ': ', $error_string, ' in ', $file, ' on line ', $line, '
'; + } + + $message = log_error($error_level . ': ' . $error_string, $file, $line); + + // Dying on these errors only causes MORE problems (blank pages!) + if ($file == 'Unknown') + return; + + // If this is an E_ERROR, E_USER_ERROR, E_WARNING, or E_USER_WARNING.... die. Violently so. + if ($error_level % 255 == E_ERROR || $error_level % 255 == E_WARNING) + fatal_error(allowedTo('admin_forum') ? $message : $error_string, false); +} + +// Just wrap it so we don't take up time and space here in Errors.php. +function db_fatal_error() +{ + global $sourcedir; + + // Just load the other file and run it. + require_once($sourcedir . '/Subs-Auth.php'); + show_db_error(); + + // Since we use "or db_fatal_error();" this is needed... + return false; +} + +// View the forum's error log. +function ViewErrorLog() +{ + global $db_prefix, $scripturl, $txt, $context, $modSettings, $user_profile, $filter; + + // Check for the administrative permission to do this. + isAllowedTo('admin_forum'); + + // Administration bar, templates, etc... + adminIndex('view_errors'); + loadTemplate('Errors'); + + // You can filter by any of the following columns: + $filters = array( + 'ID_MEMBER' => &$txt[35], + 'IP' => &$txt['ip_address'], + 'session' => &$txt['session'], + 'url' => &$txt['error_url'], + 'message' => &$txt['error_message'] + ); + + // Set up the filtering... + if (isset($_GET['value']) && isset($_GET['filter']) && isset($filters[$_GET['filter']])) + $filter = array( + 'variable' => $_GET['filter'], + 'value' => array( + 'sql' => addslashes($_GET['filter'] == 'message' || $_GET['filter'] == 'url' ? base64_decode($_GET['value']) : $_GET['value']) + ), + 'href' => ';filter=' . $_GET['filter'] . ';value=' . $_GET['value'], + 'entity' => $filters[$_GET['filter']] + ); + + // Deleting, are we? + if (isset($_POST['delall']) || isset($_POST['delete'])) + deleteErrors(); + + // Just how many errors are there? + $result = db_query(" + SELECT COUNT(ID_ERROR) + FROM {$db_prefix}log_errors" . (isset($filter) ? " + WHERE $filter[variable] = '{$filter['value']['sql']}'" : ''), __FILE__, __LINE__); + list ($num_errors) = mysql_fetch_row($result); + mysql_free_result($result); + + // If this filter is empty... + if ($num_errors == 0 && isset($filter)) + redirectexit('action=viewErrorLog'); + + // Clean up start. + if (!isset($_GET['start']) || $_GET['start'] < 0) + $_GET['start'] = 0; + + // Do we want to reverse error listing? + $context['sort_direction'] = isset($_REQUEST['desc']) ? 'down' : 'up'; + + // Set the page listing up. + $context['page_index'] = constructPageIndex($scripturl . '?action=viewErrorLog' . ($context['sort_direction'] == 'down' ? ';desc' : '') . (isset($filter) ? $filter['href'] : ''), $_GET['start'], $num_errors, $modSettings['defaultMaxMessages']); + $context['start'] = $_GET['start']; + + // Find and sort out the errors. + $request = db_query(" + SELECT ID_ERROR, ID_MEMBER, IP, url, logTime, message, session + FROM {$db_prefix}log_errors" . (isset($filter) ? " + WHERE $filter[variable] = '{$filter['value']['sql']}'" : '') . " + ORDER BY ID_ERROR " . ($context['sort_direction'] == 'down' ? 'DESC' : '') . " + LIMIT $_GET[start], $modSettings[defaultMaxMessages]", __FILE__, __LINE__); + $context['errors'] = array(); + $members = array(); + while ($row = mysql_fetch_assoc($request)) + { + $context['errors'][] = array( + 'member' => array( + 'id' => $row['ID_MEMBER'], + 'ip' => $row['IP'], + 'session' => $row['session'] + ), + 'time' => timeformat($row['logTime']), + 'timestamp' => $row['logTime'], + 'url' => array( + 'html' => htmlspecialchars($scripturl . $row['url']), + 'href' => base64_encode($row['url']) + ), + 'message' => array( + 'html' => str_replace("\n", '
', strtr($row['message'], array("\r" => '', '
' => "\n", '<' => '<', '>' => '>', '"' => '"'))), + 'href' => base64_encode($row['message']) + ), + 'id' => $row['ID_ERROR'] + ); + + // Make a list of members to load later. + $members[$row['ID_MEMBER']] = $row['ID_MEMBER']; + } + mysql_free_result($request); + + // Load the member data. + if (!empty($members)) + { + // Get some additional member info. + $request = db_query(" + SELECT ID_MEMBER, memberName, realName + FROM {$db_prefix}members + WHERE ID_MEMBER IN (" . implode(', ', $members) . ") + LIMIT " . count($members), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $members[$row['ID_MEMBER']] = $row; + mysql_free_result($request); + + // This is a guest... + $members[0] = array( + 'ID_MEMBER' => 0, + 'memberName' => '', + 'realName' => $txt[28] + ); + + // Go through each error and tack the data on. + foreach ($context['errors'] as $id => $dummy) + { + $memID = $context['errors'][$id]['member']['id']; + $context['errors'][$id]['member']['username'] = $members[$memID]['memberName']; + $context['errors'][$id]['member']['name'] = $members[$memID]['realName']; + $context['errors'][$id]['member']['href'] = empty($memID) ? '' : $scripturl . '?action=profile;u=' . $memID; + $context['errors'][$id]['member']['link'] = empty($memID) ? $txt[28] : '' . $context['errors'][$id]['member']['name'] . ''; + } + } + + // Filtering anything? + if (isset($filter)) + { + $context['filter'] = &$filter; + + // Set the filtering context. + if ($filter['variable'] == 'ID_MEMBER') + { + $id = $filter['value']['sql']; + loadMemberData($id, false, 'minimal'); + $context['filter']['value']['html'] = '' . $user_profile[$id]['realName'] . ''; + } + elseif ($filter['variable'] == 'url') + $context['filter']['value']['html'] = "'" . htmlspecialchars($scripturl . stripslashes($filter['value']['sql'])) . "'"; + elseif ($filter['variable'] == 'message') + $context['filter']['value']['html'] = "'" . strtr(htmlspecialchars(stripslashes($filter['value']['sql'])), array("\n" => '
', '<br />' => '
', "\t" => '   ')) . "'"; + else + $context['filter']['value']['html'] = &$filter['value']['sql']; + } + + // And this is pretty basic ;). + $context['page_title'] = $txt['errlog1']; + $context['has_filter'] = isset($filter); + $context['sub_template'] = 'error_log'; +} + +// Delete errors from the database. +function deleteErrors() +{ + global $db_prefix, $db_connection, $filter; + + // Make sure the session exists and is correct; otherwise, might be a hacker. + checkSession(); + + // Delete all or just some? + if (isset($_POST['delall']) && !isset($filter)) + { + // This is special: it only works in 3.23.28 and above, but.. it resets the increment. (it may fail in 3.23.4, etc.) + mysql_query(" + TRUNCATE {$db_prefix}log_errors", $db_connection); + + db_query(" + DELETE FROM {$db_prefix}log_errors", __FILE__, __LINE__); + } + // Deleting all with a filter? + elseif (isset($_POST['delall']) && isset($filter)) + db_query(" + DELETE FROM {$db_prefix}log_errors + WHERE $filter[variable] = '" . $filter['value']['sql'] . "'", __FILE__, __LINE__); + // Just specific errors? + elseif (!empty($_POST['delete'])) + { + db_query(" + DELETE FROM {$db_prefix}log_errors + WHERE ID_ERROR IN (" . implode(',', array_unique($_POST['delete'])) . ')', __FILE__, __LINE__); + + // Go back to where we were. + redirectexit('action=viewErrorLog' . (isset($_GET['desc']) ? ';desc' : '') . ';start=' . $_GET['start'] . (isset($filter) ? ';filter=' . $_GET['filter'] . ';value=' . $_GET['value'] : '')); + } + + // Back to the error log! + redirectexit('action=viewErrorLog' . (isset($_REQUEST['desc']) ? ';desc' : '') . ''); +} + +?> diff --git a/Sources/GoogleMap.php b/Sources/GoogleMap.php new file mode 100644 index 0000000..26fc643 --- /dev/null +++ b/Sources/GoogleMap.php @@ -0,0 +1,447 @@ + + +// We calling this directly, if so, your evil... +if (!defined('SMF')) + die('Hacking attempt...'); + +function Map() { + global $db_prefix, $context; + + // Are we allowed to view the map? Keep in mind here we should be a guest unless user is in IE! + isAllowedTo('googleMap_view'); + + + //Lets try this to make it work on first click... + //loadUserSettings(); + writeLog(); + + //Map using the internal XML File? Or the JS file? + if (isset($_GET['sa']) && $_GET['sa'] == '.xml') + return MapsXML(); + if (isset($_GET['sa']) && $_GET['sa'] == '.js') + return MapsJS(); + + // Get the template ready.... not really much else to do. + //loadLanguage('MemberMap'); + loadTemplate('GoogleMap'); + $context['sub_template'] = 'map'; + $context['page_title'] = "Member Map"; +} + +function MapsJS() { + global $db_prefix, $context, $scripturl, $txt, $modSettings, $user_info; + + // Lets dump everything in the buffer and start clean and new and fresh + ob_end_clean(); + if (!empty($modSettings['enableCompressedOutput'])) + @ob_start('ob_gzhandler'); + else + ob_start(); + +echo ' + onerror=handleErr +var txt="" + +function handleErr(msg,url,l) +{ +txt="There was an error on this page.\n\n" +txt+="Error: " + msg + "\n" +txt+="URL: " + url + "\n" +txt+="Line: " + l + "\n\n" +txt+="Click OK to continue.\n\n" +//alert(txt) +return true +} + // Globals. + //Icon(s), and if gender is enabled, php will allow those to be defined. + var icon = new GIcon(); + icon.image = "http://labs.google.com/ridefinder/images/mm_20_green.png"; + icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; + icon.iconSize = new GSize(12, 20); + icon.shadowSize = new GSize(22, 20); + icon.iconAnchor = new GPoint(6, 20); + icon.infoWindowAnchor = new GPoint(5, 1); + // For that lovly clustering thing! + var clusterIcon = new GIcon(); + clusterIcon.image = "http://labs.google.com/ridefinder/images/mm_20_purple.png"; + clusterIcon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; + clusterIcon.iconSize = new GSize(12, 20); + clusterIcon.shadowSize = new GSize(22, 20); + clusterIcon.iconAnchor = new GPoint(6, 20); + clusterIcon.infoWindowAnchor = new GPoint(5, 1);'; +if ($modSettings['googleMapsPinGender']) +echo ' + var iconm = new GIcon(); + iconm.image = "http://labs.google.com/ridefinder/images/mm_20_blue.png"; + iconm.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; + iconm.iconSize = new GSize(12, 20); + iconm.shadowSize = new GSize(22, 20); + iconm.iconAnchor = new GPoint(6, 20); + iconm.infoWindowAnchor = new GPoint(5, 1); + var iconf = new GIcon(); + iconf.image = "http://labs.google.com/ridefinder/images/mm_20_red.png"; + iconf.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; + iconf.iconSize = new GSize(12, 20); + iconf.shadowSize = new GSize(22, 20); + iconf.iconAnchor = new GPoint(6, 20); + iconf.infoWindowAnchor = new GPoint(5, 1);'; + +echo ' + if (GBrowserIsCompatible()) { + // this variable will collect the html which will eventually be placed in the sidebar + var sidebar_html = ""; + + // arrays to hold copies of the markers and html used by the sidebar + // because the function closure trick doesnt work there + var gmarkers = []; + var htmls = []; + + // A function to create the marker and set up the event window + function createMarker(marker_num, point, icon, name, html) { + var marker = new GMarker(point, icon); + GEvent.addListener(marker, "click", function() { + marker.openInfoWindowHtml(html); + }); + // save the info we need to use later for the sidebar + gmarkers[marker_num] = marker; + htmls[marker_num] = html; + // add a line to the sidebar html'; +if ($modSettings['googleSidebar'] == 1) +echo ' + sidebar_html += \'\' + name + \'
\';'; +if ($modSettings['googleSidebar'] == 2) +echo ' + sidebar_html += \'\' + name + \', \';'; +echo ' + //Now that we cached it lets return the marker.... + return marker; + } + + // This function picks up the click and opens the corresponding info window + function myclick(i) { + gmarkers[i].openInfoWindowHtml(htmls[i]); + } + + // create the map + var map = new GMap(document.getElementById("map")); + map.addControl(new GLargeMapControl()); + map.addControl(new GMapTypeControl()); + map.addControl(new GScaleControl()); + // Sets the map type based on admin prefrence + map.setMapType(' . $modSettings['googleMapsType'] . '); + // Lets load up the default long/lat/zoom for the map for those that like wine. + map.centerAndZoom(new GPoint(' . $modSettings['googleMapsDefaultLong'] . ', ' . $modSettings['googleMapsDefaultLat'] . '), ' . $modSettings['googleMapsDefaultZoom'] . '); + + // This is so we can try to cluster some of those pins together so the map does not get over loaded? + var clusterer = new Clusterer( map ); + clusterer.icon = clusterIcon; + clusterer.minMarkersPerClusterer = ' . $modSettings['googleMapsMinMarkerCluster'] . '; + clusterer.maxVisibleMarkers = ' . $modSettings['googleMapsMaxVisMarker'] . '; + clusterer.GridSize = ' . $modSettings['googleMapsMaxNumClusters'] . '; + clusterer.MaxLinesPerInfoBox = ' . $modSettings['googleMapsMaxLinesCluster'] . '; + + // Read the data + var request = GXmlHttp.create(); + request.open("GET", "'. $scripturl . '?action=googlemap;sa=.xml", true); + request.onreadystatechange = function() { + if (request.readyState == 4) { + var xmlDoc = request.responseXML; + // obtain the array of markers and loop through it + var markers = xmlDoc.documentElement.getElementsByTagName("marker"); + + for (var i = 0; i < markers.length; i++) { + // obtain the attribues of each marker + var lng = parseFloat(markers[i].getAttribute("lng")); + var lat = parseFloat(markers[i].getAttribute("lat")); + var point = new GPoint(lng, lat); + var html = markers[i].getAttribute("html"); + var label = markers[i].getAttribute("label"); + // create the marker'; +if ($modSettings['googleMapsPinGender']) +echo ' + if (parseFloat(markers[i].getAttribute("gender")) == 0) + var marker = createMarker(i, point, icon, label, html); + if (parseFloat(markers[i].getAttribute("gender")) == 1) + var marker = createMarker(i, point, iconm, label, html); + if (parseFloat(markers[i].getAttribute("gender")) == 2) + var marker = createMarker(i, point, iconf, label, html);'; +else +echo ' + var marker = createMarker(i, point, icon, label, html);'; +if ($modSettings['googleMapsEnableClusterer']) + echo ' + clusterer.AddMarker(marker, label);'; +else + echo ' + map.addOverlay(marker);'; +echo ' + } + }'; +if($modSettings['googleMasSideBar']) + echo' + // put the assembled sidebar_html contents into the sidebar div + document.getElementById("sidebar").innerHTML = sidebar_html;'; +echo ' + }; + request.send(null); + } else { + alert("Sorry, the Google Maps API is not compatible with this browser"); + } +'; + obExit(false); +} + + +function MapsXML() { + global $db_prefix, $context, $scripturl, $txt, $modSettings, $user_info, $themeUser, $memberContext; + + // Lets dump everything in the buffer and start clean and new and fresh + ob_end_clean(); + if (!empty($modSettings['enableCompressedOutput'])) + @ob_start('ob_gzhandler'); + else + ob_start(); + + // XML Header, and should these not be UTF-8? + //header("Content-Type: plain/text; charset=ISO-8859-1"); + header("Content-Type: application/xml; charset=UTF-8"); + + // Lets find number of members that set there map + $request = db_query(" + SELECT COUNT(*) as TOTALFOUND + FROM {$db_prefix}members + WHERE latitude IS NOT NULL AND longitude IS NOT NULL + ", __FILE__, __LINE__); + + // Pull the answer and store it... + $totalSet = mysql_fetch_row($request); + + // If the total people set there lat/long is greater than googleMapsPinNumber, + // We check for if we have any bounds that got passed from the JS, + // If no bounds we just pick the number of googleMapsPinNumber to show... + // If we are under the max allowed, just show them all! + if ($totalSet[0] >= $modSettings['googleMapsPinNumber']) { + // Lets set this to nothing, just to be safe if we dont have variables... + $sql_addon = ""; + + // Check to see if we have any ranges before we add to the SQL statment... + // This could stand to have a bit better security on it but its gonna be let by the side for now + if ((isset($_GET['minX'])) && (isset($_GET['maxX'])) && (isset($_GET['minY'])) && (isset($_GET['maxY']))) { + $sql_addon = " AND latitude > " . $_GET['minX'] . " + AND latitude < " . $_GET['maxX'] . " + AND longitude > " . $_GET['minY'] . " + AND longitude < " . $_GET['maxY']; + } + + // Lets just make this simple for the query... + $maxPins = $modSettings['googleMapsPinNumber']; + + // Load the data up at random to the ping count! + $query = "SELECT * + FROM {$db_prefix}members + WHERE latitude IS NOT NULL AND longitude IS NOT NULL + $sql_addon + ORDER BY RAND() + LIMIT 0, $maxPins"; + } else { + // Looks like we passed under the max, Load everyone... + $query = "SELECT * + FROM {$db_prefix}members + WHERE latitude IS NOT NULL AND longitude IS NOT NULL + ORDER BY `realName` ASC "; + } + + $request = db_query($query, __FILE__, __LINE__); + + //Ok this is block of code takes care of the entire load all member data into $themeUser/$memberContext on per # basis + $temp = array(); + while ($row = mysql_fetch_array($request, MYSQL_ASSOC)) + $temp[] = $row['ID_MEMBER']; + loadMemberData($temp); + foreach ($temp as $v) + loadMemberContext($v); + + // Seeing how SMF 1.0 uses $themeUser and SMF 1.1 uses $memberContext, lets just make our own now? + if (isset($memberContext)) + $data = $memberContext; + elseif (isset($themeUser)) + $data = $themeUser; + + // Lets accualy start making XML Mr. PHP, and should this not be UTF-8? + echo ' '; + + if (isset($data)) { + // Assuming we have data to work with... + foreach ($data as $marker) { + $datablurb = ' + + + + + + + + + + + +
' . $marker['online']['text'] .' ' . $marker['name'] . '' . $marker['avatar']['image'] . '
' . $marker['title'] . '
'; + if (($marker['website']['url'] != '') && ($marker['website']['title'] != '')) + $datablurb = $datablurb . '' . $marker['website']['title'] . ''; + $datablurb = $datablurb . '
' . $marker['blurb'] . '
'; + + // This is to help against those funky chars... and protect against those " errors in XML! + $datablurb = htmlspecialchars($datablurb); + + // Lets bring it all together... + $markers = ''; + + echo $markers; + } + } + echo ' +
'; + + // Ok we should be done with output, dump it to user... + obExit(false); +} + +function ShowKML () { + global $db_prefix, $context, $scripturl, $txt, $modSettings, $user_info, $mbname, $themeUser, $memberContext; + + // Are we allowed to view the map? Keep in mind here we should be a guest unless user is in IE! + isAllowedTo('googleMap_view'); + + // If it's not enabled, die. + if (empty($modSettings['xmlnews_enable'])) + obExit(false); + + // This is an kml file, its like an XML file... + ob_end_clean(); + if (!empty($modSettings['enableCompressedOutput'])) + @ob_start('ob_gzhandler'); + else + ob_start(); + + // Lets make sure its sent as KML + header('Content-type: application/keyhole;'); + + // It will be called ourforumname.kml + header('Content-Disposition: attachment; filename="' . $mbname . '.kml"'); + + // Load the data up, and seeing how its google earth, lets just send everything. + // If we get complaints about this, then we shall have to figure out how to limit it. + $request = db_query(" + SELECT * + FROM {$db_prefix}members + WHERE latitude IS NOT NULL AND longitude IS NOT NULL + ", __FILE__, __LINE__); + + //Ok this is block of code takes care of the entire load all member data into $memberContext on per # basis + $temp = array(); + while ($row = mysql_fetch_array($request, MYSQL_ASSOC)) + $temp[] = $row['ID_MEMBER']; + loadMemberData($temp); + foreach ($temp as $v) + loadMemberContext($v); + + // Seeing how SMF 1.0 uses $themeUser and SMF 1.1 uses $memberContext, lets just make our own now? + if (isset($memberContext)) + $data = $memberContext; + elseif (isset($themeUser)) + $data = $themeUser; + +echo ' + + + ' . $mbname . ' + 0'; + if (isset($data)) { + // Assuming we have data to work with... + foreach ($data as $marker) { +echo ' + + + + + ' . $marker['online']['text'] .' ' . $marker['name'] . ' + ' . $marker['avatar']['image'] . ' + + ' . $marker['title'] . ' + + + ' . $marker['icq']['link'] . ' + ' . $marker['aim']['link'] . ' + ' . $marker['yim']['link'] . ' + ' . $marker['msn']['link'] . ' + + + '; + if (($marker['website']['url'] != '') && ($marker['website']['title'] != '')) + echo '' . $marker['website']['title'] . ''; +echo ' + + ' . $marker['blurb'] . ' + + '; +echo ' + ]]> + + ' . $marker['name'] . ' + + ' . $marker['googleMap']['longitude'] . ' + ' . $marker['googleMap']['latitude'] . ' + 15000 + + root://styles#default+icon=0x304'; +/* This does not appeal to me right now... + if ($modSettings['googleMapsPinGender']) { +echo ' + '; + } +*/ + +echo ' + + 1 + absolute + ' . $marker['googleMap']['longitude'] . ',' . $marker['googleMap']['latitude'] . ',8000 + + '; + } + } + +echo ' + +'; + // Ok done, should send everything now.. + obExit(false); +} +?> diff --git a/Sources/Help.php b/Sources/Help.php new file mode 100644 index 0000000..a85950a --- /dev/null +++ b/Sources/Help.php @@ -0,0 +1,92 @@ + \ No newline at end of file diff --git a/Sources/InstantMessage.php b/Sources/InstantMessage.php new file mode 100644 index 0000000..ebd7e8e --- /dev/null +++ b/Sources/InstantMessage.php @@ -0,0 +1,847 @@ + $scripturl . '?action=pm', + 'name' => $txt[144] + ); + + $subActions = array( + 'send' => 'MessagePost', + 'send2' => 'MessagePost2', + 'outbox' => 'MessageFolder', + 'prune' => 'MessagePrune', + 'removeall' => 'MessageKillAllQuery', + 'removeall2' => 'MessageKillAll', + 'removemore' => 'MessageRemoveMore', + ); + + if (!isset($_REQUEST['sa']) || !isset($subActions[$_REQUEST['sa']])) + MessageFolder(); + else + $subActions[$_REQUEST['sa']](); +} + +// A folder, ie. outbox/inbox. +function MessageFolder() +{ + global $txt, $scripturl, $db_prefix, $ID_MEMBER, $modSettings, $context; + global $messages_request, $user_info, $recipients, $options; + + // Make sure the starting location is valid. + if (isset($_GET['start']) && $_GET['start'] != 'new') + $_GET['start'] = (int) $_GET['start']; + elseif (!isset($_GET['start']) && !empty($options['view_newest_pm_first'])) + $_GET['start'] = 0; + else + $_GET['start'] = 'new'; + + // Set up some basic theme stuff. + $context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']); + $context['folder'] = !isset($_REQUEST['f']) || $_REQUEST['f'] != 'outbox' ? 'inbox' : 'outbox'; + $context['from_or_to'] = $context['folder'] != 'outbox' ? 'from' : 'to'; + $context['get_pmessage'] = 'prepareMessageContext'; + + // Sorting the folder. + $sort_methods = array( + 'date' => 'pm.ID_PM', + 'name' => "IFNULL(mem.realName, '')", + 'subject' => 'pm.subject', + ); + + // They didn't pick one, use the forum default. + if (!isset($_GET['sort']) || !isset($sort_methods[$_GET['sort']])) + { + $context['sort_by'] = 'date'; + $_GET['sort'] = 'pm.ID_PM'; + $descending = false; + } + // Otherwise use the defaults: ascending, by date. + else + { + $context['sort_by'] = $_GET['sort']; + $_GET['sort'] = $sort_methods[$_GET['sort']]; + $descending = isset($_GET['desc']); + } + + if (!empty($options['view_newest_pm_first'])) + $descending = !$descending; + + $context['sort_direction'] = $descending ? 'down' : 'up'; + + // Why would you want access to your outbox if you're not allowed to send anything? + if ($context['folder'] == 'outbox') + isAllowedTo('pm_send'); + + // Set the text to resemble the current folder. + $pmbox = $context['folder'] != 'outbox' ? $txt[316] : $txt[320]; + $txt[412] = str_replace('PMBOX', $pmbox, $txt[412]); + + // Now, build the link tree! + $context['linktree'][] = array( + 'url' => $scripturl . '?action=pm;f=' . $context['folder'], + 'name' => $pmbox + ); + + // Mark all messages as read if in the inbox. + if ($context['folder'] != 'outbox' && !empty($user_info['unread_messages'])) + { + markMessages(); + $user_info['unread_messages'] = 0; + } + + // Figure out how many messages there are. + if ($context['folder'] == 'outbox') + { + $request = db_query(" + SELECT COUNT(ID_PM) + FROM {$db_prefix}instant_messages + WHERE ID_MEMBER_FROM = $ID_MEMBER + AND deletedBySender = 0", __FILE__, __LINE__); + list ($max_messages) = mysql_fetch_row($request); + mysql_free_result($request); + } + else + $max_messages = $user_info['messages']; + + // Only show the button if there are messages to delete. + $context['show_delete'] = $max_messages > 0; + + // Start on the last page. + if (!is_numeric($_GET['start']) || $_GET['start'] >= $max_messages) + $_GET['start'] = ($max_messages - 1) - (($max_messages - 1) % $modSettings['defaultMaxMessages']); + elseif ($_GET['start'] < 0) + $_GET['start'] = 0; + + // Set up the page index. + $context['page_index'] = constructPageIndex($scripturl . '?action=pm;f=' . $context['folder'] . ';sort=' . $context['sort_by'] . (isset($_GET['desc']) ? ';desc' : ''), $_GET['start'], $max_messages, $modSettings['defaultMaxMessages']); + $context['start'] = $_GET['start']; + + // Load the messages up... + $request = db_query(" + SELECT pm.ID_PM, pm.ID_MEMBER_FROM + FROM ({$db_prefix}instant_messages AS pm" . ($context['folder'] == 'outbox' ? ')' . ($context['sort_by'] == 'name' ? " + LEFT JOIN {$db_prefix}im_recipients AS pmr ON (pmr.ID_PM = pm.ID_PM)" : '') : ", {$db_prefix}im_recipients AS pmr)") . ($context['sort_by'] == 'name' ? (" + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = " . ($context['folder'] == 'outbox' ? 'pmr.ID_MEMBER' : 'pm.ID_MEMBER_FROM') . ")") : '') . " + WHERE " . ($context['folder'] == 'outbox' ? "pm.ID_MEMBER_FROM = $ID_MEMBER + AND pm.deletedBySender = 0" : "pm.ID_PM = pmr.ID_PM + AND pmr.ID_MEMBER = $ID_MEMBER + AND pmr.deleted = 0") . " + ORDER BY " . ($_GET['sort'] == 'pm.ID_PM' && $context['folder'] != 'outbox' ? 'pmr.ID_PM' : $_GET['sort']) . ($descending ? ' DESC' : ' ASC') . " + LIMIT $_GET[start], $modSettings[defaultMaxMessages]", __FILE__, __LINE__); + + // Load the ID_PMs and ID_MEMBERs and initialize recipients. + $pms = array(); + $posters = $context['folder'] == 'outbox' ? array($ID_MEMBER) : array(); + $recipients = array(); + while ($row = mysql_fetch_assoc($request)) + { + if (!isset($recipients[$row['ID_PM']])) + { + $pms[] = $row['ID_PM']; + if (!empty($row['ID_MEMBER_FROM']) && $context['folder'] != 'outbox') + $posters[] = $row['ID_MEMBER_FROM']; + $recipients[$row['ID_PM']] = array( + 'to' => array(), + 'bcc' => array() + ); + } + } + mysql_free_result($request); + + if (!empty($pms)) + { + // Get recipients (don't include bcc-recipients for your inbox, you're not supposed to know :P). + $request = db_query(" + SELECT pmr.ID_PM, mem_to.ID_MEMBER AS ID_MEMBER_TO, mem_to.realName AS toName, pmr.bcc + FROM {$db_prefix}im_recipients AS pmr + LEFT JOIN {$db_prefix}members AS mem_to ON (mem_to.ID_MEMBER = pmr.ID_MEMBER) + WHERE pmr.ID_PM IN (" . implode(', ', $pms) . ")" . ($context['folder'] == 'outbox' ? '' : " + AND pmr.bcc = 0"), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $recipients[$row['ID_PM']][empty($row['bcc']) ? 'to' : 'bcc'][] = empty($row['ID_MEMBER_TO']) ? $txt[28] : '' . $row['toName'] . ''; + + // Load any users.... + $posters = array_unique($posters); + if (!empty($posters)) + loadMemberData($posters); + + // Execute the query! + $messages_request = db_query(" + SELECT pm.ID_PM, pm.subject, pm.ID_MEMBER_FROM, pm.body, pm.msgtime, pm.fromName + FROM {$db_prefix}instant_messages AS pm" . ($context['folder'] == 'outbox' ? " + LEFT JOIN {$db_prefix}im_recipients AS pmr ON (pmr.ID_PM = pm.ID_PM)" : '') . ($context['sort_by'] == 'name' ? " + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = " . ($context['folder'] == 'outbox' ? 'pmr.ID_MEMBER' : 'pm.ID_MEMBER_FROM') . ")" : '') . " + WHERE pm.ID_PM IN (" . implode(',', $pms) . ")" . ($context['folder'] == 'outbox' ? " + GROUP BY pm.ID_PM" : '') . " + ORDER BY $_GET[sort] " . ($descending ? ' DESC' : ' ASC') . " + LIMIT " . count($pms), __FILE__, __LINE__); + } + else + $messages_request = false; + + $context['can_send_pm'] = allowedTo('pm_send'); + $context['sub_template'] = 'folder'; + $context['page_title'] = $txt[143]; +} + +// Get a personal message for the theme. (used to save memory.) +function prepareMessageContext($reset = false) +{ + global $txt, $scripturl, $modSettings, $context, $messages_request, $themeUser, $recipients; + + // Count the current message number.... + static $counter = null; + if ($counter == null || $reset) + $counter = $context['start']; + + // Bail if it's false, ie. no messages. + if ($messages_request == false) + return false; + + // Reset the data? + if ($reset == true) + return @mysql_data_seek($messages_request, 0); + + // Get the next one... bail if anything goes wrong. + $message = mysql_fetch_assoc($messages_request); + if (!$message) + return(false); + + // Use '(no subject)' if none was specified. + $message['subject'] = $message['subject'] == '' ? $txt[24] : $message['subject']; + + // Load the message's information - if it's not there, load the guest information. + if (!loadMemberContext($message['ID_MEMBER_FROM'])) + { + $themeUser[$message['ID_MEMBER_FROM']]['name'] = $message['fromName']; + $themeUser[$message['ID_MEMBER_FROM']]['id'] = 0; + $themeUser[$message['ID_MEMBER_FROM']]['group'] = $txt[28]; + $themeUser[$message['ID_MEMBER_FROM']]['link'] = $message['fromName']; + $themeUser[$message['ID_MEMBER_FROM']]['email'] = ''; + $themeUser[$message['ID_MEMBER_FROM']]['is_guest'] = true; + } + + // Censor all the important text... + censorText($message['body']); + censorText($message['subject']); + + // Run UBBC interpreter on the message. + $message['body'] = doUBBC($message['body']); + + // Send the array. + $output = array( + 'alternate' => $counter % 2, + 'id' => $message['ID_PM'], + 'member' => &$themeUser[$message['ID_MEMBER_FROM']], + 'subject' => $message['subject'], + 'time' => timeformat($message['msgtime']), + 'timestamp' => $message['msgtime'], + 'counter' => $counter, + 'body' => $message['body'], + 'recipients' => &$recipients[$message['ID_PM']] + ); + + $counter++; + + return $output; +} + +// Send a new message? +function MessagePost() +{ + global $txt, $sourcedir; + global $db_prefix, $ID_MEMBER, $scripturl, $modSettings, $context, $options; + + isAllowedTo('pm_send'); + + // Just in case it was loaded from somewhere else. + loadTemplate('InstantMessage'); + loadLanguage('InstantMessage'); + + $context['show_spellchecking'] = $modSettings['enableSpellChecking'] && function_exists('pspell_new'); + + // Set the title... + $context['sub_template'] = 'send'; + $context['page_title'] = $txt[148]; + + $context['folder'] = !isset($_REQUEST['f']) || $_REQUEST['f'] != 'outbox' ? 'inbox' : 'outbox'; + $context['reply'] = isset($_REQUEST['reply']) || isset($_REQUEST['quote']); + + // Quoting/Replying to a message? + if (!empty($_REQUEST['pmsg'])) + { + $_REQUEST['pmsg'] = (int) $_REQUEST['pmsg']; + + // Get the quoted message (and make sure you're allowed to see this quote!). + $request = db_query(" + SELECT + pm.ID_PM, pm.body, pm.subject, pm.msgtime, mem.memberName, + IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, IFNULL(mem.realName, pm.fromName) AS realName + FROM ({$db_prefix}instant_messages AS pm" . ($context['folder'] == 'outbox' ? '' : ", {$db_prefix}im_recipients AS pmr") . ") + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = pm.ID_MEMBER_FROM) + WHERE pm.ID_PM = $_REQUEST[pmsg]" . ($context['folder'] == 'outbox' ? " + AND pm.ID_MEMBER_FROM = $ID_MEMBER" : " + AND pmr.ID_PM = $_REQUEST[pmsg] + AND pmr.ID_MEMBER = $ID_MEMBER") . " + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('pm_not_yours', false); + $row_quoted = mysql_fetch_assoc($request); + mysql_free_result($request); + + // Censor the message. + censorText($row_quoted['subject']); + censorText($row_quoted['body']); + + // Add 'Re: ' to it.... + $form_subject = $row_quoted['subject']; + if ($context['reply'] && trim($txt['response_prefix']) != '' && strpos($form_subject, trim($txt['response_prefix'])) !== 0) + $form_subject = $txt['response_prefix'] . $form_subject; + + if (isset($_REQUEST['quote'])) + { + // Remove any nested quotes and
... + $form_message = preg_replace('~~i', "\n", $row_quoted['body']); + if (!empty($modSettings['removeNestedQuotes'])) + $form_message = preg_replace(array('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '~^\n~', '~\[/quote\]~'), '', $form_message); + $form_message = '[quote author="' . $row_quoted['realName'] . ""]\n" . $form_message . "\n[/quote]"; + } + else + $form_message = ''; + + // Do the BBC thang on the message. + $row_quoted['body'] = doUBBC($row_quoted['body']); + + // Set up the quoted message array. + $context['quoted_message'] = array( + 'id' => &$row_quoted['ID_PM'], + 'member' => array( + 'name' => $row_quoted['realName'], + 'username' => $row_quoted['memberName'], + 'id' => $row_quoted['ID_MEMBER'], + 'href' => !empty($row_quoted['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row_quoted['ID_MEMBER'] : '', + 'link' => !empty($row_quoted['ID_MEMBER']) ? '' . $row_quoted['realName'] . '' : $row_quoted['realName'], + ), + 'subject' => &$row_quoted['subject'], + 'time' => timeformat($row_quoted['msgtime']), + 'timestamp' => $row_quoted['msgtime'], + 'body' => &$row_quoted['body'] + ); + } + else + { + $context['quoted_message'] = false; + $form_subject = ''; + $form_message = ''; + } + + // Sending by ID? Replying to all? Fetch the memberName(s). + if (isset($_REQUEST['u'])) + { + // Store all the members who are getting this... + $membersTo = array(); + + // If the user is replying to all, get all the other members this was sent to.. + if ($_REQUEST['u'] == 'all' && isset($row_quoted)) + { + // Firstly, to reply to all we clearly already have $row_quoted - so have the original member from. + $membersTo[] = '"' . $row_quoted['memberName'] . '"'; + + // Now to get the others. + $request = db_query(" + SELECT mem.memberName + FROM {$db_prefix}im_recipients AS pmr + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = pmr.ID_MEMBER) + WHERE pmr.ID_PM = $_REQUEST[pmsg] + AND pmr.ID_MEMBER != $ID_MEMBER + AND bcc = 0", __FILE__, __LINE__); + while ($row = mysql_fetch_row($request)) + $membersTo[] = '"' . $row[0] . '"'; + mysql_free_result($request); + } + else + { + $request = db_query(" + SELECT memberName + FROM {$db_prefix}members + WHERE ID_MEMBER = " . (int) $_REQUEST['u'] . " + LIMIT 1", __FILE__, __LINE__); + list ($membersTo[0]) = mysql_fetch_row($request); + mysql_free_result($request); + + if ($membersTo[0] != '') + $membersTo[0] = '"' . $membersTo[0] . '"'; + } + + // Create the 'to' string - Quoting it, just in case it's something like bob,i,like,commas,man. + $_REQUEST['to'] = implode(', ', $membersTo); + } + + // Set the defaults... + $context['subject'] = $form_subject != '' ? $form_subject : $txt[24]; + $context['message'] = str_replace(array('"', '<', '>'), array('"', '<', '>'), $form_message); + $context['to'] = isset($_REQUEST['to']) ? $_REQUEST['to'] : ''; + $context['bcc'] = isset($_REQUEST['bcc']) ? $_REQUEST['bcc'] : ''; + $context['post_error'] = array(); + $context['copy_to_outbox'] = !empty($options['copy_to_outbox']); + + // And build the link tree. + $context['linktree'][] = array( + 'url' => $scripturl . '?action=pm;sa=send', + 'name' => $txt[321] + ); + + // Register this form and get a sequence number in $context. + checkSubmitOnce('register'); +} + +// An error in the message... +function messagePostError($error_types, $to, $bcc) +{ + global $txt, $context, $scripturl, $modSettings; + + $context['show_spellchecking'] = $modSettings['enableSpellChecking'] && function_exists('pspell_new'); + + $context['sub_template'] = 'send'; + + $context['page_title'] = $txt[148]; + + // Set everything up like before.... + $context['to'] = htmlspecialchars(stripslashes($to)); + $context['bcc'] = htmlspecialchars(stripslashes($bcc)); + $context['subject'] = isset($_REQUEST['subject']) ? htmlspecialchars(stripslashes($_REQUEST['subject'])) : ''; + $context['message'] = isset($_REQUEST['message']) ? str_replace(array(' '), array('  '), htmlspecialchars(stripslashes($_REQUEST['message']))) : ''; + $context['reply'] = false; + $context['copy_to_outbox'] = !empty($_REQUEST['outbox']); + + // Build the link tree.... + $context['linktree'][] = array( + 'url' => $scripturl . '?action=pm;sa=send', + 'name' => $txt[321] + ); + + // Set each of the errors for the template. + loadLanguage('Errors'); + $context['post_error'] = array( + 'messages' => array(), + ); + foreach ($error_types as $error_type) + { + $context['post_error'][$error_type] = true; + if (isset($txt['error_' . $error_type])) + $context['post_error']['messages'][] = $txt['error_' . $error_type]; + } + + // No check for the previous submission is needed. + checkSubmitOnce('free'); + + // Acquire a new form sequence number. + checkSubmitOnce('register'); +} + +// Send it! +function MessagePost2() +{ + global $txt, $ID_MEMBER, $context, $sourcedir; + global $db_prefix, $user_info, $modSettings, $scripturl; + + isAllowedTo('pm_send'); + require_once($sourcedir . '/Subs-Auth.php'); + + loadLanguage('InstantMessage'); + + // Initialize the errors we're about to make. + $post_errors = array(); + + // If your session timed out, show an error, but do allow to re-submit. + if (checkSession('post', '', false) != '') + $post_errors[] = 'session_timeout'; + + $_REQUEST['subject'] = isset($_REQUEST['subject']) ? trim($_REQUEST['subject']) : ''; + + // Did they make any mistakes? + if ($_REQUEST['subject'] == '') + $post_errors[] = 'no_subject'; + if (!isset($_REQUEST['message']) || $_REQUEST['message'] == '') + $post_errors[] = 'no_message'; + if (empty($_REQUEST['to']) && empty($_REQUEST['bcc'])) + $post_errors[] = 'no_to'; + if (!empty($modSettings['max_messageLength']) && isset($_REQUEST['message']) && strlen($_REQUEST['message']) > $modSettings['max_messageLength']) + $post_errors[] = 'long_message'; + + if (empty($_REQUEST['to'])) + $_REQUEST['to'] = ''; + if (empty($_REQUEST['bcc'])) + $_REQUEST['bcc'] = ''; + + // If they did, give a chance to make ammends. + if (!empty($post_errors)) + return messagePostError($post_errors, $_REQUEST['to'], $_REQUEST['bcc']); + + // Want to take a second glance before you send? + if (isset($_REQUEST['preview'])) + { + // Set everything up to be displayed. + $context['preview_subject'] = htmlspecialchars(stripslashes($_REQUEST['subject'])); + $context['preview_message'] = htmlspecialchars(stripslashes($_REQUEST['message']), ENT_QUOTES); + preparsecode($context['preview_message'], false); + + // Parse out the BBC if it is enabled. + $context['preview_message'] = doUBBC($context['preview_message']); + + // Censor, as always. + censorText($context['preview_subject']); + censorText($context['preview_message']); + + // Set a descriptive title. + $context['page_title'] = $txt[507] . ' - ' . $context['preview_subject']; + + // Pretend they messed up :P. + return messagePostError(array(), $_REQUEST['to'], $_REQUEST['bcc']); + } + + // Protect from message spamming. + spamProtection('spam'); + + // Prevent double submission of this form. + checkSubmitOnce('check'); + + // Format the to and bcc members. + $input = array( + 'to' => array(), + 'bcc' => array() + ); + + // To who..? + if (!empty($_REQUEST['to'])) + { + // We're going to take out the "s anyway ;). + $_REQUEST['to'] = strtr($_REQUEST['to'], array('\\"' => '"')); + + preg_match_all('~"([^"]+)"~', $_REQUEST['to'], $matches); + $input['to'] = array_unique(array_merge($matches[1], explode(',', preg_replace('~"([^"]+)"~', '', $_REQUEST['to'])))); + } + + // Your secret's safe with me! + if (!empty($_REQUEST['bcc'])) + { + // We're going to take out the "s anyway ;). + $_REQUEST['bcc'] = strtr($_REQUEST['bcc'], array('\\"' => '"')); + + preg_match_all('~"([^"]+)"~', $_REQUEST['bcc'], $matches); + $input['bcc'] = array_unique(array_merge($matches[1], explode(',', preg_replace('~"([^"]+)"~', '', $_REQUEST['bcc'])))); + } + + foreach ($input as $rec_type => $rec) + { + foreach ($rec as $index => $member) + if (strlen(trim($member)) > 0) + $input[$rec_type][$index] = strtolower(htmlspecialchars(stripslashes(trim($member)), ENT_QUOTES)); + else + unset($input[$rec_type][$index]); + } + + // Find the requested members - bcc and to. + $foundMembers = findMembers(array_merge($input['to'], $input['bcc'])); + + // Initialize member ID array. + $recipients = array( + 'to' => array(), + 'bcc' => array() + ); + + // Store IDs of the members that were found. + foreach ($foundMembers as $member) + { + foreach ($input as $rec_type => $to_members) + if (array_intersect(array(strtolower($member['username']), strtolower($member['name']), strtolower($member['email'])), $to_members)) + { + $recipients[$rec_type][] = $member['id']; + + // Get rid of this username. The ones that remain were not found. + $input[$rec_type] = array_diff($input[$rec_type], array(strtolower($member['username']), strtolower($member['name']), strtolower($member['email']))); + } + } + + // Do the actual sending of the PM. + if (!empty($recipients['to']) || !empty($recipients['bcc'])) + $context['send_log'] = sendpm($recipients, $_REQUEST['subject'], $_REQUEST['message'], !empty($_REQUEST['outbox'])); + else + $context['send_log'] = array( + 'sent' => array(), + 'failed' => array() + ); + + // Add a log message for all recipients that were not found. + foreach ($input as $rec_type => $rec) + { + // Either bad_to or bad_bcc. + if (!empty($rec)) + $post_errors[] = 'bad_' . $rec_type; + foreach ($rec as $member) + $context['send_log']['failed'][] = sprintf($txt['pm_error_user_not_found'], $member); + } + + // If one or more of the recipient were invalid, go back to the post screen with the failed usernames. + if (!empty($context['send_log']['failed'])) + return messagePostError($post_errors, empty($input['to']) ? '' : '"' . implode('","', $input['to']) . '"', empty($input['bcc']) ? '' : '"' . implode('","', $input['bcc']) . '"'); + + // Back to the inbox. + redirectexit('action=pm'); +} + +// Remove a mess of messages. +function MessageRemoveMore() +{ + global $txt, $db_prefix, $ID_MEMBER, $context, $user_info; + + checkSession(isset($_POST['sc']) ? 'post' : 'get'); + + // Delete from the inbox or outbox? + $context['folder'] = !isset($_REQUEST['f']) || $_REQUEST['f'] != 'outbox' ? 'inbox' : 'outbox'; + + if (!empty($_REQUEST['delete'])) + deleteMessages($_REQUEST['delete'], $context['folder']); + + // Back to the folder. + redirectexit('action=pm;f=' . $context['folder'] . (isset($_GET['start']) ? ';start=' . $_GET['start'] : '')); +} + +// Are you sure you want to PERMANENTLY (mostly) delete ALL your messages? +function MessageKillAllQuery() +{ + global $txt, $context; + + // Only have to set up the template.... + $context['sub_template'] = 'ask_delete'; + $context['page_title'] = $txt[412]; + $context['folder'] = $_REQUEST['f']; + $context['delete_all'] = $context['folder'] == 'all'; + + // And set the folder name... + $txt[412] = str_replace('PMBOX', $context['folder'] != 'outbox' ? $txt[316] : $txt[320], $txt[412]); +} + +// Delete ALL the messages! +function MessageKillAll() +{ + checkSession('get'); + + // If all then delete all messages the user has. + if ($_REQUEST['f'] == 'all') + deleteMessages(null, null); + // Otherwise just the selected folder. + else + deleteMessages(null, $_REQUEST['f'] != 'outbox' ? 'inbox' : 'outbox'); + + // Done... all gone. + redirectexit('action=' . ($_REQUEST['f'] == 'outbox' ? 'pm;f=outbox' : 'pm')); +} + +// This function allows the user to delete all messages older than so many days. +function MessagePrune() +{ + global $txt, $context, $db_prefix, $ID_MEMBER; + + // Actually delete the messages. + if (isset($_REQUEST['age'])) + { + checkSession(); + + // Calculate the time to delete before. + $deleteTime = time() - (86400 * (int) $_REQUEST['age']); + + // Array to store the IDs in. + $toDelete = array(); + + // Select all the messages they have sent older than $deleteTime. + $request = db_query(" + SELECT ID_PM + FROM {$db_prefix}instant_messages + WHERE deletedBySender = 0 + AND ID_MEMBER_FROM = $ID_MEMBER + AND msgtime < $deleteTime", __FILE__, __LINE__); + while ($row = mysql_fetch_row($request)) + $toDelete[] = $row[0]; + mysql_free_result($request); + + // Select all messages in their inbox older than $deleteTime. + $request = db_query(" + SELECT ir.ID_PM + FROM {$db_prefix}im_recipients AS ir + LEFT JOIN {$db_prefix}instant_messages AS pm ON (pm.ID_PM = ir.ID_PM) + WHERE ir.deleted = 0 + AND ir.ID_MEMBER = $ID_MEMBER + AND pm.msgtime < $deleteTime", __FILE__, __LINE__); + while ($row = mysql_fetch_row($request)) + $toDelete[] = $row[0]; + mysql_free_result($request); + + // Delete the actual messages. + deleteMessages($toDelete); + + // Go back to their inbox. + redirectexit('action=pm'); + } + // Show the template. + else + { + $context['sub_template'] = 'prune'; + $context['page_title'] = $txt[411]; + } +} + +// Delete the specified personal messages. +function deleteMessages($personal_messages, $folder = null, $owner = null) +{ + global $ID_MEMBER, $db_prefix; + + if ($owner === null) + $owner = array($ID_MEMBER); + elseif (empty($owner)) + return; + elseif (!is_array($owner)) + $owner = array($owner); + + if ($personal_messages !== null) + { + if (empty($personal_messages) || !is_array($personal_messages)) + return; + + foreach ($personal_messages as $index => $delete_id) + $personal_messages[$index] = (int) $delete_id; + + $where = ' + AND ID_PM IN (' . implode(', ', array_unique($personal_messages)) . ')'; + } + else + $where = ''; + + if ($folder == 'outbox' || $folder === null) + { + db_query(" + UPDATE {$db_prefix}instant_messages + SET deletedBySender = 1 + WHERE ID_MEMBER_FROM IN (" . implode(', ', $owner) . ") + AND deletedBySender = 0$where", __FILE__, __LINE__); + } + if ($folder != 'outbox' || $folder === null) + { + // Calculate the number of messages each member's gonna lose... + $request = db_query(" + SELECT ID_MEMBER, COUNT(ID_PM) AS numDeletedMessages + FROM {$db_prefix}im_recipients + WHERE ID_MEMBER IN (" . implode(', ', $owner) . ") + AND deleted = 0$where + GROUP BY ID_MEMBER", __FILE__, __LINE__); + // ...And update the statistics accordingly. + while ($row = mysql_fetch_assoc($request)) + updateMemberData($row['ID_MEMBER'], array('instantMessages' => $where == '' ? 0 : "instantMessages - $row[numDeletedMessages]")); + mysql_free_result($request); + + // Do the actual deletion. + db_query(" + UPDATE {$db_prefix}im_recipients + SET deleted = 1 + WHERE ID_MEMBER IN (" . implode(', ', $owner) . ") + AND deleted = 0$where", __FILE__, __LINE__); + } + + // If sender and recipients all have deleted their message, it can be removed. + $request = db_query(" + SELECT pm.ID_PM, pmr.ID_PM AS recipient + FROM {$db_prefix}instant_messages AS pm + LEFT JOIN {$db_prefix}im_recipients AS pmr ON (pmr.ID_PM = pm.ID_PM AND deleted = 0) + WHERE pm.deletedBySender = 1 + " . str_replace('ID_PM', 'pm.ID_PM', $where) . " + HAVING recipient IS null", __FILE__, __LINE__); + $remove_pms = array(); + while ($row = mysql_fetch_assoc($request)) + $remove_pms[] = $row['ID_PM']; + + if (!empty($remove_pms)) + { + db_query(" + DELETE FROM {$db_prefix}instant_messages + WHERE ID_PM IN (" . implode(', ', $remove_pms) . ") + LIMIT " . count($remove_pms), __FILE__, __LINE__); + + db_query(" + DELETE FROM {$db_prefix}im_recipients + WHERE ID_PM IN (" . implode(', ', $remove_pms) . ')', __FILE__, __LINE__); + } +} + +// Mark personal messages read. +function markMessages($personal_messages = null, $owner = null) +{ + global $ID_MEMBER, $db_prefix; + + if ($owner === null) + $owner = $ID_MEMBER; + + db_query(" + UPDATE {$db_prefix}im_recipients + SET is_read = 1 + WHERE ID_MEMBER = $owner + AND is_read = 0" . ($personal_messages !== null ? " + AND ID_PM IN (" . implode(', ', $personal_messages) . ") + LIMIT " . count($personal_messages) : ''), __FILE__, __LINE__); + // If something was marked as read, get the number of unread messages remaining. + if (db_affected_rows() > 0); + { + $request = db_query(" + SELECT COUNT(ID_PM) + FROM {$db_prefix}im_recipients + WHERE ID_MEMBER = $owner + AND is_read = 0", __FILE__, __LINE__); + list ($num_unmarked) = mysql_fetch_row($request); + updateMemberData($owner, array('unreadMessages' => $num_unmarked)); + } +} + +?> \ No newline at end of file diff --git a/Sources/Karma.php b/Sources/Karma.php new file mode 100644 index 0000000..d8f073e --- /dev/null +++ b/Sources/Karma.php @@ -0,0 +1,434 @@ + 0) + list ($action) = mysql_fetch_row($request); + mysql_free_result($request); + } + + // They haven't, not before now, anyhow. + if (empty($action) || empty($modSettings['karmaWaitTime'])) + { + //Prepare link + if (isset ($_REQUEST['topic'])) { + $link = ($_REQUEST['topic']).'.msg'.($_REQUEST['m']).'#'.'msg'.($_REQUEST['m']); + $link = AddSlashes($link); + } + elseif (isset($_REQUEST['f'])) { + $link = 'PM'; + } + + // Put it in the log. + db_query(" + INSERT INTO {$db_prefix}log_karma + (action, ID_TARGET, Description, link, ID_EXECUTOR, logTime) + VALUES ($dir, $_REQUEST[uid], '$Description', '$link', $ID_MEMBER, ". time()." ) + ", __FILE__, __LINE__); + + // Change by one. + updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karmaGood' : 'karmaBad' => '+')); + } + else + { $request = db_query(" + SELECT logTime + FROM {$db_prefix}log_karma + WHERE ID_TARGET=$_REQUEST[uid] + AND ID_EXECUTOR=$ID_MEMBER + ORDER BY logTime DESC + LIMIT 1 + ", __FILE__, __LINE__); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + $restricttime = time() - $row['logTime']; + $timelog = (int) ($modSettings['karmaWaitTime'] * 3600); + + // If you are gonna try to repeat.... don't allow it. + if ($restricttime < $timelog) + fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . '.', false); + + //Prepare link + if (isset ($_REQUEST['topic'])) { + $link = ($_REQUEST['topic']).'.msg'.($_REQUEST['m']).'#'.'msg'.($_REQUEST['m']); + $link = AddSlashes($link); + } + elseif (isset($_REQUEST['f'])) { + $link = 'PM'; + } + + // You decided to go back on your previous choice? + db_query(" + INSERT INTO {$db_prefix}log_karma + (action, ID_TARGET, Description, link, ID_EXECUTOR, logTime) + VALUES ($dir, $_REQUEST[uid], '$Description', '$link', $ID_MEMBER, ". time()." ) + ", __FILE__, __LINE__); + + // It was recently changed the OTHER way... so... reverse it! + if ($dir == 1) + updateMemberData($_REQUEST['uid'], array('karmaGood' => '+')); + else + updateMemberData($_REQUEST['uid'], array('karmaBad' => '+')); + } + + // Figure out where to go back to.... the topic? + if (isset($topic)) + redirectexit('topic=' . $topic . '.' . $_REQUEST['start'] . '#msg' . $_REQUEST['m']); + // Hrm... maybe a personal message? + elseif (isset($_REQUEST['f'])) + redirectexit('action=pm;f=' . $_REQUEST['f'] . ';start=' . $_REQUEST['start'] . (isset($_REQUEST['l']) ? ';l=' . $_REQUEST['l'] : '') . (isset($_REQUEST['pm']) ? '#' . $_REQUEST['pm'] : '')); + + else + { + echo ' + + + ... + + + « +'; + + obExit(false); + } +} + + +// Modify a user's karma. +function ModifyKarma() +{ + global $modSettings, $db_prefix, $txt, $ID_MEMBER, $user_info, $topic, $scripturl; + + // If the mod is disabled, show an error. + if (empty($modSettings['karmaMode'])) + fatal_lang_error('smf63'); + + if (!empty($modSettings['karmasurv'])) + ModKarm(); +// If you're a guest or can't do this, blow you off... + is_not_guest(); + // If you have ANY warning, also blow you off + if ($user_info['warning'] > 1) + fatal_error($txt['visual_no_karma']); + isAllowedTo('karma_edit'); + + // If you don't have enough posts, tough luck. + if ($user_info['posts'] < $modSettings['karmaMinPosts']) + fatal_error($txt['smf60'] . $modSettings['karmaMinPosts'] . '.'); + + // And you can't modify your own, punk! (use the profile if you need to.) + if (empty($_REQUEST['uid']) || (int) $_REQUEST['uid'] == $ID_MEMBER) + fatal_lang_error('smf61', false); + + // The user ID _must_ be a number, no matter what. + $_REQUEST['uid'] = (int) $_REQUEST['uid']; + + // Applauding or smiting? + $dir = $_REQUEST['sa'] != 'applaud' ? -1 : 1; + // Users can change karma to only topic starter if you check this function + if (!empty($modSettings['karmatopicstarter'])) + { + $request = db_query(" + SELECT ID_MEMBER_STARTED + FROM {$db_prefix}topics + WHERE ID_TOPIC = $_REQUEST[topic] + LIMIT 1", __FILE__, __LINE__); + $row = mysql_fetch_row($request); + mysql_free_result($request); + if ($_REQUEST['uid'] != $row[0] && $user_info['is_admin']!=1) + fatal_lang_error('karma_not_topic_starter', false); + } + + +//Loading Template of Description +if (!empty($modSettings['karmadescmod'])){ + loadTemplate('DescriptionKarma');} + + //Prepare some variables + $context['page_title'] = $txt['viewkarma_title']; + $context['linktree'][] = array( + 'url' => $scripturl . '?action=modifykarma', + 'name' => $txt['viewkarma_title'] ); + + // Start off with no change in karma. + $action = 0; + + // Not an administrator... or one who is restricted as well. + if (!empty($modSettings['karmaTimeRestrictAdmins']) || !allowedTo('moderate_forum')) + { + // Find out if this user has done this recently... + $request = db_query(" + SELECT action + FROM {$db_prefix}log_karma + WHERE ID_TARGET = $_REQUEST[uid] + AND ID_EXECUTOR = $ID_MEMBER + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + list ($action) = mysql_fetch_row($request); + mysql_free_result($request); + } + + // They haven't, not before now, anyhow. + +/* + if (empty($action)) + { + // Put it in the log. + db_query(" + REPLACE INTO {$db_prefix}log_karma + (action, ID_TARGET, ID_EXECUTOR, logTime) + VALUES ($dir, $_REQUEST[uid], $ID_MEMBER, " . time() . ')', __FILE__, __LINE__); + + // Change by one. + updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karmaGood' : 'karmaBad' => '+')); + } + else + { + // If you are gonna try to repeat.... don't allow it. + if ($action == $dir) + fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . '.', false); + + // You decided to go back on your previous choice? + db_query(" + UPDATE {$db_prefix}log_karma + SET action = $dir, logTime = " . time() . " + WHERE ID_TARGET = $_REQUEST[uid] + AND ID_EXECUTOR = $ID_MEMBER + LIMIT 1", __FILE__, __LINE__); + + +*/ +/* They haven't, not before now, anyhow. + If the key isn't in the array it will return. + Or if it does exist and it's length is 0 then it will return. + If Karma Description Mod disable then easy smite or applaud */ +if (!empty($modSettings['karmadescmod'])){ +if (!array_key_exists('Description',$_POST) || strlen($_POST["Description"]) == 0){return;}} + + +{ if ( empty($action) || empty($modSettings['karmaWaitTime'])) + { $_POST['Description'] = AddSlashes($_POST['Description']); + if (!empty($modSettings['karmacensor'])) + censorText($_POST['Description']); + + //Prepare link + if (isset ($_REQUEST['topic'])) { + $link = ($_REQUEST['topic']).'.msg'.($_REQUEST['m']).'#'.'msg'.($_REQUEST['m']); + $link = AddSlashes($link); + } + elseif (isset($_REQUEST['f'])) { + $link = 'PM'; + } + + // Put it in the log. + db_query(" + INSERT INTO {$db_prefix}log_karma + (action, ID_TARGET, Description, link, ID_EXECUTOR, logTime) + VALUES ($dir, $_REQUEST[uid], '$_POST[Description]', '$link', $ID_MEMBER, ". time()." ) + ", __FILE__, __LINE__); +// Change by one. + updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karmaGood' : 'karmaBad' => '+')); + } + else + { + $request = db_query(" + SELECT logTime + FROM {$db_prefix}log_karma + WHERE ID_TARGET=$_REQUEST[uid] + AND ID_EXECUTOR=$ID_MEMBER + ORDER BY logTime DESC + LIMIT 1 + ", __FILE__, __LINE__); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + $restricttime = time() - $row['logTime']; + $timelog = (int) ($modSettings['karmaWaitTime'] * 3600); + + // If you are gonna try to repeat.... don't allow it. + if ($restricttime < $timelog) + fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . '.', false); + + //Prepare link + if (isset ($_REQUEST['topic'])) { + $link = ($_REQUEST['topic']).'.msg'.($_REQUEST['m']).'#'.'msg'.($_REQUEST['m']); + $link = AddSlashes($link); + } + elseif (isset($_REQUEST['f'])) { + $link = 'PM'; + } + + // You decided to go back on your previous choice? + db_query(" + INSERT INTO {$db_prefix}log_karma + (action, ID_TARGET, Description, link, ID_EXECUTOR, logTime) + VALUES ($dir, $_REQUEST[uid], '$_POST[Description]', '$link', $ID_MEMBER, ". time()." ) + ", __FILE__, __LINE__); + +// It was recently changed the OTHER way... so... reverse it! + if ($dir == 1) + updateMemberData($_REQUEST['uid'], array('karmaGood' => '+')); + else + updateMemberData($_REQUEST['uid'], array('karmaBad' => '+')); +} + } + + // Figure out where to go back to.... the topic? + if (isset($topic)) + redirectexit('topic=' . $topic . '.' . $_REQUEST['start'] . '#msg' . $_REQUEST['m']); + // Hrm... maybe a personal message? + elseif (isset($_REQUEST['f'])) + redirectexit('action=pm;f=' . $_REQUEST['f'] . ';start=' . $_REQUEST['start']); + // JavaScript as a last resort. +/* + + else + { + echo ' + + + ... + + + « +'; + + obExit(false); + } +} + +*/ +// What's this? I dunno, what are you talking about? Never seen this before, nope. No siree. +function BookOfUnknown() +{ + global $context; + + if (strpos($_GET['action'], 'mozilla') !== false && !$context['browser']['is_gecko']) + redirectexit('http://www.getfirefox.com/', false); + elseif (strpos($_GET['action'], 'mozilla') !== false) + redirectexit('about:mozilla', false); + + echo ' + + + The Book of Unknown, 2:18 + + + +
+ Woe, it was that his name wasn\'t known, that he came in mystery, and was recognized by none. And it became to be in those days something.  Something not yet unknown to mankind.  And thus what was to be known the secret project began into its existence.  Henceforth the opposition was only weary and fearful, for now their match was at arms against them. +
+
+ from The Book of Unknown, 2:18 +
+ +'; + + obExit(false); +} + +} + +?> \ No newline at end of file diff --git a/Sources/Load.php b/Sources/Load.php new file mode 100644 index 0000000..6e8ee67 --- /dev/null +++ b/Sources/Load.php @@ -0,0 +1,1278 @@ += time()) + return; + + if (!empty($modSettings['autoOptMaxOnline'])) + { + $request = db_query(" + SELECT COUNT(session) + FROM {$db_prefix}log_online", __FILE__, __LINE__); + list ($dont_do_it) = mysql_fetch_row($request); + mysql_free_result($request); + + if ($dont_do_it > $modSettings['autoOptMaxOnline']) + return; + } + + $request = db_query(" + SHOW TABLES LIKE '" . str_replace('_', '\_', $db_prefix) . "%'", __FILE__, __LINE__); + $tables = array(); + while ($row = mysql_fetch_row($request)) + $tables[] = $row[0]; + mysql_free_result($request); + + updateSettings(array('autoOptLastOpt' => time())); + + db_query(" + OPTIMIZE TABLE `" . implode('`, `', $tables) . '`', __FILE__, __LINE__); +} + +// Load all the important user information... +function loadUserSettings() +{ + global $modSettings, $user_settings; + global $ID_MEMBER, $db_prefix, $cookiename, $user_info, $language; + + // Check first the cookie, then the session. + if (isset($_COOKIE[$cookiename])) + { + $_COOKIE[$cookiename] = stripslashes($_COOKIE[$cookiename]); + + // Fix a security hole in PHP 4.3.9 and below... + if (preg_match('~^a:3:\{i:0;(i:\d{1,6}|s:[1-6]:"\d{1,6}");i:1;s:(0|32):"([a-fA-F0-9]{32})?";i:2;i:\d{1,12};\}$~', $_COOKIE[$cookiename]) == 1) + { + list ($ID_MEMBER, $password) = @unserialize($_COOKIE[$cookiename]); + $ID_MEMBER = !empty($ID_MEMBER) ? (int) $ID_MEMBER : 0; + } + else + $ID_MEMBER = 0; + } + elseif (isset($_SESSION['login_' . $cookiename]) && ($_SESSION['USER_AGENT'] == $_SERVER['HTTP_USER_AGENT'] || !empty($modSettings['disableCheckUA']))) + { + list ($ID_MEMBER, $password, $login_span) = @unserialize(stripslashes($_SESSION['login_' . $cookiename])); + $ID_MEMBER = !empty($ID_MEMBER) && $login_span > time() ? (int) $ID_MEMBER : 0; + } + else + $ID_MEMBER = 0; + + // Only load this stuff if the user isn't a guest. + if ($ID_MEMBER != 0) + { + $request = db_query(" + SELECT mem.*, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH + FROM {$db_prefix}members AS mem + LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = $ID_MEMBER) + WHERE mem.ID_MEMBER = $ID_MEMBER + LIMIT 1", __FILE__, __LINE__); + // Did we find 'im? If not, junk it. + if (mysql_num_rows($request) != 0) + { + // The base settings array. + $user_settings = mysql_fetch_assoc($request); + + // Wrong password or not activated - either way, you're going nowhere. + $ID_MEMBER = md5_hmac($user_settings['passwd'], 'ys') != $password || empty($user_settings['is_activated']) ? 0 : $user_settings['ID_MEMBER']; + } + else + $ID_MEMBER = 0; + mysql_free_result($request); + } + + // Found 'im, let's set up the variables. + if ($ID_MEMBER != 0) + { + if (empty($_SESSION['ID_MSG_LAST_VISIT'])) + { + $_SESSION['ID_MSG_LAST_VISIT'] = $user_settings['ID_MSG_LAST_VISIT']; + unset($user_settings['ID_MSG_LAST_VISIT']); + + updateMemberData($ID_MEMBER, array('ID_MSG_LAST_VISIT' => (int) $modSettings['maxMsgID'], 'lastLogin' => time(), 'memberIP' => '\'' . $_SERVER['REMOTE_ADDR'] . '\'')); + + $user_settings['lastLogin'] = time(); + } + + $username = $user_settings['memberName']; + + if (empty($user_settings['additionalGroups'])) + $user_info = array( + 'groups' => array($user_settings['ID_GROUP'], $user_settings['ID_POST_GROUP']) + ); + else + $user_info = array( + 'groups' => array_merge( + array($user_settings['ID_GROUP'], $user_settings['ID_POST_GROUP']), + explode(',', $user_settings['additionalGroups']) + ) + ); + } + // If the user is a guest, initialize all the critial user settings. + else + { + // This is what a guest's variables should be. + $username = ''; + $user_info = array('groups' => array(-1)); + $user_settings = array(); + + if (isset($_COOKIE[$cookiename])) + $_COOKIE[$cookiename] = ''; + } + + // Set up the $user_info array. + $user_info += array( + 'username' => $username, + 'name' => isset($user_settings['realName']) ? $user_settings['realName'] : '', + 'email' => isset($user_settings['emailAddress']) ? $user_settings['emailAddress'] : '', + 'warning' => isset($user_settings['warning']) ? $user_settings['warning'] : 0, + 'passwd' => isset($user_settings['passwd']) ? $user_settings['passwd'] : '', + 'language' => empty($user_settings['lngfile']) || empty($modSettings['userLanguage']) ? $language : $user_settings['lngfile'], + 'is_guest' => $ID_MEMBER == 0, + 'is_admin' => in_array(1, $user_info['groups']), + 'theme' => empty($user_settings['ID_THEME']) ? 0 : $user_settings['ID_THEME'], + 'last_login' => empty($user_settings['lastLogin']) ? 0 : $user_settings['lastLogin'], + 'ip' => $_SERVER['REMOTE_ADDR'], + 'posts' => empty($user_settings['posts']) ? 0 : $user_settings['posts'], + 'time_format' => empty($user_settings['timeFormat']) ? $modSettings['time_format'] : $user_settings['timeFormat'], + 'time_offset' => empty($user_settings['timeOffset']) ? 0 : $user_settings['timeOffset'], + 'avatar' => array( + 'url' => isset($user_settings['avatar']) ? $user_settings['avatar'] : '', + 'ID_ATTACH' => isset($user_settings['ID_ATTACH']) ? $user_settings['ID_ATTACH'] : 0 + ), + 'smiley_set' => isset($user_settings['smileySet']) ? $user_settings['smileySet'] : '', + 'messages' => empty($user_settings['instantMessages']) ? 0 : $user_settings['instantMessages'], + 'unread_messages' => empty($user_settings['unreadMessages']) ? 0 : $user_settings['unreadMessages'], + 'total_time_logged_in' => empty($user_settings['totalTimeLoggedIn']) ? 0 : $user_settings['totalTimeLoggedIn'], + 'permissions' => array() + ); + $user_info['groups'] = array_unique($user_info['groups']); + + if (!empty($modSettings['userLanguage']) && !empty($_REQUEST['language'])) + { + $user_info['language'] = strtr($_REQUEST['language'], './\\:', '____'); + $_SESSION['language'] = $user_info['language']; + } + elseif (!empty($modSettings['userLanguage']) && !empty($_SESSION['language'])) + $user_info['language'] = strtr($_SESSION['language'], './\\:', '____'); + + // Just build this here, it makes it easier to change/use. + if ($user_info['is_guest']) + $user_info['query_see_board'] = 'FIND_IN_SET(-1, b.memberGroups)'; + // Administrators can see all boards. + elseif ($user_info['is_admin']) + $user_info['query_see_board'] = '1'; + // Registered user.... just the groups in $user_info['groups']. + else + $user_info['query_see_board'] = '(FIND_IN_SET(' . implode(', b.memberGroups) OR FIND_IN_SET(', $user_info['groups']) . ', b.memberGroups))'; +} + +// MD5 Encryption used for passwords. +function md5_hmac($data, $key) +{ + $key = str_pad(strlen($key) <= 64 ? $key : pack('H*', md5($key)), 64, chr(0x00)); + return md5(($key ^ str_repeat(chr(0x5c), 64)) . pack('H*', md5(($key ^ str_repeat(chr(0x36), 64)). $data))); +} + +// Check for moderators and see if they have access to the board. +function loadBoard() +{ + global $txt, $db_prefix, $scripturl, $context; + global $board_info, $board, $topic, $ID_MEMBER, $user_info; + + $request = db_query("SELECT COUNT(*) FROM chat_who", __FILE__, __LINE__); + list ($context['people_in_chat']) = mysql_fetch_row($request); + + + // Assume they are not a moderator. + $user_info['is_mod'] = false; + $context['user']['is_mod'] = &$user_info['is_mod']; + + // Start the linktree off empty.. + $context['linktree'] = array(); + + // Load this board only if the it is specified. + if (empty($board) && empty($topic)) + { + $board_info = array('moderators' => array()); + return; + } + + $request = db_query(" + SELECT + c.ID_CAT, b.name AS bname, b.description, b.numTopics, b.memberGroups, + b.ID_PARENT, c.name AS cname, IFNULL(mem.ID_MEMBER, 0) AS ID_MODERATOR, + mem.realName" . (!empty($topic) ? ", b.ID_BOARD" : '') . ", b.childLevel, + b.ID_THEME, b.override_theme, b.use_local_permissions + FROM ({$db_prefix}boards AS b" . (!empty($topic) ? ", {$db_prefix}topics AS t" : '') . ") + LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT) + LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_BOARD = " . (empty($topic) ? $board : 't.ID_BOARD') . ") + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = mods.ID_MEMBER) + WHERE b.ID_BOARD = " . (empty($topic) ? $board : "t.ID_BOARD + AND t.ID_TOPIC = $topic"), __FILE__, __LINE__); + // If there aren't any, skip. + if (mysql_num_rows($request) > 0) + { + $row = mysql_fetch_assoc($request); + + // Set the current board. + if (!empty($row['ID_BOARD'])) + $board = $row['ID_BOARD']; + + // Basic operating information. (globals... :/) + $board_info = array( + 'moderators' => array(), + 'cat' => array( + 'id' => $row['ID_CAT'], + 'name' => $row['cname'] + ), + 'name' => $row['bname'], + 'description' => $row['description'], + 'num_topics' => $row['numTopics'], + 'parent_boards' => getBoardParents($row['ID_PARENT']), + 'parent' => $row['ID_PARENT'], + 'child_level' => $row['childLevel'], + 'theme' => $row['ID_THEME'], + 'override_theme' => !empty($row['override_theme']), + 'use_local_permissions' => $row['use_local_permissions'] == 1 + ); + + // Load the membergroups allowed, and check permissions. + $board_info['groups'] = $row['memberGroups'] == '' ? array() : explode(',', $row['memberGroups']); + if (count(array_intersect($user_info['groups'], $board_info['groups'])) == 0 && !$user_info['is_admin']) + $board_info['error'] = 'access'; + + do + { + if (!empty($row['ID_MODERATOR'])) + $board_info['moderators'][$row['ID_MODERATOR']] = array( + 'id' => $row['ID_MODERATOR'], + 'name' => $row['realName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MODERATOR'], + 'link' => '' . $row['realName'] . '' + ); + } + while ($row = mysql_fetch_assoc($request)); + + // Now check if the user is a moderator. + $user_info['is_mod'] = isset($board_info['moderators'][$ID_MEMBER]); + + // Build up the linktree... + $context['linktree'] = array_merge( + $context['linktree'], + array(array( + 'url' => $scripturl . '#' . $board_info['cat']['id'], + 'name' => $board_info['cat']['name'] + )), + array_reverse($board_info['parent_boards']), + array(array( + 'url' => $scripturl . '?board=' . $board . '.0', + 'name' => $board_info['name'] + )) + ); + } + else + { + // Otherwise the topic is invalid, there are no moderators, etc. + $board_info = array( + 'moderators' => array(), + 'error' => 'exist' + ); + $topic = null; + $board = 0; + } + mysql_free_result($request); + + if (!empty($topic)) + $_GET['board'] = (int) $board; + + // Set the template contextual information. + $context['user']['is_mod'] = &$user_info['is_mod']; + $context['current_topic'] = $topic; + $context['current_board'] = $board; + + // Hacker... you can't see this topic, I'll tell you that. (but moderators can!) + if (!empty($board_info['error']) && !($board_info['error'] == 'access' && $user_info['is_mod'])) + { + // The permissions and theme need loading, just to make sure everything goes smoothly. + loadPermissions(); + loadTheme(); + fatal_lang_error('topic_gone', false); + } + + if ($user_info['is_mod']) + $user_info['groups'][] = 3; +} + +// Load this user's permissions. +function loadPermissions() +{ + global $user_info, $db_prefix, $board, $board_info; + + $user_info['permissions'] = array(); + + if ($user_info['is_admin']) + return; + + $removals = array(); + + // Get the general permissions. + $request = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}permissions + WHERE ID_GROUP IN (" . implode(', ', $user_info['groups']) . ')', __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if (empty($row['addDeny'])) + $removals[] = $row['permission']; + else + $user_info['permissions'][] = $row['permission']; + } + mysql_free_result($request); + + // Get the board permissions. + if (!empty($board)) + { + // Make sure the board (if any) has been loaded by loadBoard(). + if (!isset($board_info['use_local_permissions'])) + fatal_lang_error('smf232'); + + $request = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_GROUP IN (" . implode(', ', $user_info['groups']) . ") + AND ID_BOARD = " . ($board_info['use_local_permissions'] ? $board : '0'), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if (empty($row['addDeny'])) + $removals[] = $row['permission']; + else + $user_info['permissions'][] = $row['permission']; + } + mysql_free_result($request); + } + + // Remove all the permissions they shouldn't have ;). + $user_info['permissions'] = array_diff($user_info['permissions'], $removals); + + // Banned? Watch, don't touch.. + banPermissions(); +} + +// Loads an array of users' data by ID or memberName. +function loadMemberData($users, $is_name = false, $set = 'normal') +{ + global $user_profile, $db_prefix, $modSettings, $board_info; + + // Can't just look for no users :P. + if (empty($users)) + return false; + + // Make sure it's an array. + $users = !is_array($users) ? array($users) : array_unique($users); + + if ($set == 'normal') + { + // No need for moderator fixes if there are none or none among the requested users. + if (empty($board_info['moderators']) || (!$is_name && count(array_intersect($users, array_keys($board_info['moderators']))) == 0)) + $moderator_fix = array('pg' => '', 'mg' => 'mem.ID_GROUP'); + // Overwrite your primary group to moderator, if a user happens to be one. + else + $moderator_fix = array( + 'pg' => 'AND mem.ID_MEMBER NOT IN (' . implode(', ', array_keys($board_info['moderators'])) . ')', + 'mg' => 'IF(mem.ID_MEMBER IN (' . implode(', ', array_keys($board_info['moderators'])) . '), 3, mem.ID_GROUP)' + ); + + $select_columns = " + IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, mem.signature, + mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName, mem.realName, + mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl, mem.birthdate, + mem.memberIP, mem.location, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood, + mem.warning, " . " + mem.ID_POST_GROUP, mem.karmaBad, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline, + mem.latitude, mem.longitude, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group, + pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, + IF((mem.ID_GROUP = 0 OR mg.stars = '')$moderator_fix[pg], pg.stars, mg.stars) AS stars" . (!empty($modSettings['titlesEnable']) ? ', + mem.usertitle' : ''); + $select_tables = " + LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER) + LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER) + LEFT JOIN {$db_prefix}membergroups AS pg ON (pg.ID_GROUP = mem.ID_POST_GROUP) + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = $moderator_fix[mg])"; + } + elseif ($set == 'profile') + { + $select_columns = " + IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, mem.signature, + mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName, mem.realName, + mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl, mem.birthdate, + mem.location, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood, mem.karmaBad, + mem.memberIP, mem.lngfile, mem.ID_GROUP, mem.ID_THEME, mem.im_ignore_list, mem.im_email_notify, + mem.warning, " . "" . " + mem.timeOffset" . (!empty($modSettings['titlesEnable']) ? ', mem.usertitle' : '') . ", mem.timeFormat, + mem.secretQuestion, mem.is_activated, mem.additionalGroups, mem.smileySet, mem.showOnline, + mem.totalTimeLoggedIn, mem.ID_POST_GROUP, mem.notifyAnnouncements, mem.notifyOnce, + mem.latitude, mem.longitude, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group, + pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, + IF((mem.ID_GROUP = 0 OR mg.stars = ''), pg.stars, mg.stars) AS stars"; + $select_tables = " + LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER) + LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER) + LEFT JOIN {$db_prefix}membergroups AS pg ON (pg.ID_GROUP = mem.ID_POST_GROUP) + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = mem.ID_GROUP)"; + } + elseif ($set == 'minimal') + { + $select_columns = ' + mem.ID_MEMBER, mem.memberName, mem.realName, mem.emailAddress, mem.hideEmail, mem.dateRegistered, + mem.posts, mem.lastLogin, mem.memberIP, mem.lngfile, mem.ID_GROUP'; + $select_tables = ''; + } + + // Load the data. + $request = db_query(" + SELECT$select_columns + FROM {$db_prefix}members AS mem$select_tables + WHERE mem." . ($is_name ? 'memberName' : 'ID_MEMBER') . (count($users) == 1 ? " = '" . current($users) . "'" : " IN ('" . implode("', '", $users) . "')"), __FILE__, __LINE__); + $loaded_ids = array(); + while ($row = mysql_fetch_assoc($request)) + { + $loaded_ids[] = $row['ID_MEMBER']; + $row['options'] = array(); + $user_profile[$row['ID_MEMBER']] = $row; + } + mysql_free_result($request); + + if (!empty($loaded_ids) && $set != 'minimal') + { + $request = db_query(" + SELECT * + FROM {$db_prefix}themes + WHERE ID_MEMBER" . (count($loaded_ids) == 1 ? ' = ' . $loaded_ids[0] : ' IN (' . implode(', ', $loaded_ids) . ')'), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $user_profile[$row['ID_MEMBER']]['options'][$row['variable']] = $row['value']; + mysql_free_result($request); + } + + return empty($loaded_ids) ? false : $loaded_ids; +} + +// Loads the user's basic values... meant for template/theme usage. +function loadMemberContext($user) +{ + global $themeUser, $user_profile, $txt, $scripturl, $user_info; + global $context, $modSettings, $ID_MEMBER; + global $board_info, $settings, $db_prefix; + static $dataLoaded = array(); + + // If this person's data is already loaded, skip it. + if (isset($dataLoaded[$user])) + return true; + + // We can't load guests or members not loaded by loadMemberData()! + if ($user == 0 || !isset($user_profile[$user])) + return false; + + // Well, it's loaded now anyhow. + $dataLoaded[$user] = true; + $profile = $user_profile[$user]; + + // Censor everything. + censorText($profile['signature']); + censorText($profile['personalText']); + censorText($profile['location']); + + // Set things up to be used before hand. + $gendertxt = $profile['gender'] == 2 ? $txt[239] : ($profile['gender'] == 1 ? $txt[238] : ''); + $profile['signature'] = str_replace(array("\n", "\r"), array('
', ''), $profile['signature']); + $profile['signature'] = doUBBC($profile['signature']); + if ($profile['warning'] == 1) + $warn = 'warn'; + elseif ($profile['warning'] == 2) + $warn = 'mute'; + elseif ($profile['warning'] == 3) + $warn = 'ban'; + + $profile['is_online'] = (!empty($profile['showOnline']) || allowedTo('moderate_forum')) && $profile['isOnline'] > 0; + $profile['stars'] = empty($profile['stars']) ? array('', '') : explode('#', $profile['stars']); + + if (stristr($profile['avatar'], 'http://') && !empty($modSettings['avatar_check_size'])) + { + $sizes = url_image_size($profile['avatar']); + + // Does your avatar still fit the maximum size? + if ($modSettings['avatar_action_too_large'] == 'option_refuse' && is_array($sizes) && (($sizes[0] > $modSettings['avatar_max_width_external'] && !empty($modSettings['avatar_max_width_external'])) || ($sizes[1] > $modSettings['avatar_max_height_external'] && !empty($modSettings['avatar_max_height_external'])))) + { + // Fix it permanently! + $profile['avatar'] = ''; + updateMemberData($profile['ID_MEMBER'], array('avatar' => '\'\'')); + } + } + + // dirty! + $__avatar = glob('attachments/avatar_'.$profile['ID_MEMBER'].'.{jpg,gif,png}',GLOB_BRACE); + if (! empty ($__avatar)) $__avatar = $__avatar[0]; + + // What a monstrous array... + $themeUser[$user] = array( + 'username' => &$profile['memberName'], + 'name' => &$profile['realName'], + 'id' => &$profile['ID_MEMBER'], + 'is_guest' => $profile['ID_MEMBER'] == 0, + 'title' => !empty($modSettings['titlesEnable']) ? $profile['usertitle'] : '', + 'href' => $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'], + 'link' => '' . $profile['realName'] . '', + 'email' => &$profile['emailAddress'], + 'hide_email' => (!empty($modSettings['guest_hideContacts']) && $user_info['is_guest']) || (!empty($profile['hideEmail']) && !empty($modSettings['allow_hideEmail']) && !allowedTo('moderate_forum')), + 'email_public' => (empty($profile['hideEmail']) || empty($modSettings['allow_hideEmail'])) && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']), + 'registered' => empty($profile['dateRegistered']) ? $txt[470] : timeformat($profile['dateRegistered']), + 'blurb' => &$profile['personalText'], + 'gender' => array( + 'name' => $gendertxt, + 'numeric' => $profile['gender'], + 'image' => !empty($profile['gender']) ? '' . $gendertxt . '' : '' + ), + 'website' => array( + 'title' => &$profile['websiteTitle'], + 'url' => &$profile['websiteUrl'], + ), + 'birth_date' => &$profile['birthdate'], + 'signature' => &$profile['signature'], + 'location' => &$profile['location'], + 'icq' => $profile['ICQ'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array( + 'name' => &$profile['ICQ'], + 'href' => 'http://www.icq.com/people/about_me.php?uin=' . $profile['ICQ'], + 'link' => '' . $profile['ICQ'] . '', + 'link_text' => '' . $profile['ICQ'] . '', + ) : array('name' => '', 'add' => '', 'href' => '', 'link' => '', 'link_text' => ''), + 'warning' => $profile['warning'] > 0 ? array( + 'link' => ($modSettings['visualw_color_' . $warn] != "" ? '
' . $txt['visual_text_' . $warn] . '
' : '') , + ) : array('link' => ''), + 'aim' => $profile['AIM'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array( + 'name' => &$profile['AIM'], + 'href' => 'aim:goim?screenname=' . urlencode($profile['AIM']) . '&message=' . $txt['aim_default_message'], + 'link' => '' . $profile['AIM'] . '', + 'link_text' => '' . $profile['AIM'] . '' + ) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''), + 'yim' => $profile['YIM'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array( + 'name' => &$profile['YIM'], + 'href' => 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($profile['YIM']), + 'link' => '' . $profile['YIM'] . '', + 'link_text' => '' . $profile['YIM'] . '' + ) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''), + 'msn' => $profile['MSN'] !='' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array( + 'name' => &$profile['MSN'], + 'href' => 'http://members.msn.com/' . $profile['MSN'], + 'link' => '' . $profile['MSN'] . '', + 'link_text' => '' . $profile['MSN'] . '' + ) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''), + 'real_posts' => $profile['posts'], + 'posts' => $profile['posts'] > 100000 ? $txt[683] : ($profile['posts'] == 1337 ? 'leet' : comma_format($profile['posts'])), + 'avatar' => array( + 'name' => &$profile['avatar'], + 'image' => $profile['avatar'] == '' ? ($profile['ID_ATTACH'] > 0 && !empty($modSettings['avatar_allow_upload']) ? '' : '') : '' , + 'href' => $profile['avatar'] == '' ? ($profile['ID_ATTACH'] > 0 && !empty($modSettings['avatar_allow_upload']) ? 'http://img.rock.ru/forum/' . $__avatar : '') : (stristr($profile['avatar'], 'http://') ? $profile['avatar'] : $modSettings['avatar_url'] . '/' . $profile['avatar']), + 'url' => $profile['avatar'] == '' ? '' : (stristr($profile['avatar'], 'http://') ? $profile['avatar'] : $modSettings['avatar_url'] . '/' . $profile['avatar']) + ), + 'last_login' => empty($profile['lastLogin']) ? $txt['never'] : timeformat($profile['lastLogin']), + 'karma' => array( + 'good' => &$profile['karmaGood'], + 'bad' => &$profile['karmaBad'], + 'allow' => !$user_info['is_guest'] && $user_info['posts'] >= $modSettings['karmaMinPosts'] && allowedTo('karma_edit') && !empty($modSettings['karmaMode']) && $ID_MEMBER != $user + ), + 'ip' => htmlspecialchars($profile['memberIP']), + 'online' => array( + 'is_online' => $profile['is_online'], + 'text' => &$txt[$profile['is_online'] ? 'online2' : 'online3'], + 'href' => $scripturl . '?action=pm;sa=send;u=' . $profile['ID_MEMBER'], + 'link' => '' . $txt[$profile['is_online'] ? 'online2' : 'online3'] . '', + 'image_href' => $settings['images_url'] . ($profile['is_online'] ? '/useron' : '/useroff') . '.gif', + 'label' => &$txt[$profile['is_online'] ? 'online4' : 'online5'] + ), + 'language' => ucfirst($profile['lngfile']), + 'is_activated' => !empty($profile['is_activated']), + 'options' => $profile['options'], + 'is_guest' => false, + 'group' => $profile['member_group'], + 'group_color' => $profile['member_group_color'], + 'group_id' => $profile['ID_GROUP'], + 'post_group' => $profile['post_group'], + 'post_group_color' => $profile['post_group_color'], + 'group_stars' => str_repeat('*', empty($profile['stars'][0]) ? 0 : $profile['stars'][0]), + 'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600, false), + + 'googleMap' => array( + 'latitude' => $profile['latitude'], + 'longitude' => $profile['longitude'], + ), + ); + + return true; +} + +// Load a theme, by ID. +function loadTheme($ID_THEME = 0, $initialize = true) +{ + global $ID_MEMBER, $user_info, $board_info, $sc; + global $db_prefix, $txt, $scripturl, $mbname, $modSettings; + global $context, $settings, $options; + + // The theme was specified by parameter. + if (!empty($ID_THEME)) + $ID_THEME = (int) $ID_THEME; + // Use the board's specific theme. + elseif (!empty($board_info['theme']) && $board_info['override_theme']) + $ID_THEME = $board_info['theme']; + // The theme was specified by REQUEST. + elseif (!empty($_REQUEST['theme']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum'))) + { + $ID_THEME = (int) $_REQUEST['theme']; + $_SESSION['ID_THEME'] = $ID_THEME; + } + // The theme was specified by REQUEST... previously. + elseif (!empty($_SESSION['ID_THEME']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum'))) + $ID_THEME = (int) $_SESSION['ID_THEME']; + // The theme is just the user's choice. (might use ?board=1;theme=0 to force board theme.) + elseif (!empty($user_info['theme']) && !isset($_REQUEST['theme']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum'))) + $ID_THEME = $user_info['theme']; + // The theme was specified by the board. + elseif (!empty($board_info['theme'])) + $ID_THEME = $board_info['theme']; + // The theme is the forum's default. + else + $ID_THEME = $modSettings['theme_guests']; + + // Verify the ID_THEME... no foul play. + if (empty($modSettings['theme_default']) && $ID_THEME == 1 && !allowedTo('admin_forum')) + $ID_THEME = $modSettings['theme_guests']; + elseif (!empty($modSettings['knownThemes']) && !empty($modSettings['theme_allow']) && !allowedTo('admin_forum')) + { + $themes = explode(',', $modSettings['knownThemes']); + if (!in_array($ID_THEME, $themes)) + $ID_THEME = $modSettings['theme_guests']; + else + $ID_THEME = (int) $ID_THEME; + } + else + $ID_THEME = (int) $ID_THEME; + + $member = empty($ID_MEMBER) ? -1 : $ID_MEMBER; + + // Load variables from the current or default theme, global or this user's. + $result = db_query(" + SELECT variable, value, ID_MEMBER, ID_THEME + FROM {$db_prefix}themes + WHERE ID_MEMBER IN (0, $member) + AND ID_THEME" . ($ID_THEME == 1 ? ' = 1' : " IN ($ID_THEME, 1)"), __FILE__, __LINE__); + // Pick between $settings and $options depending on whose data it is. + $themeData = array(0 => array(), $member => array()); + while ($row = mysql_fetch_assoc($result)) + { + // If this is the theme_dir of the default theme, store it. + if (in_array($row['variable'], array('theme_dir', 'theme_url', 'images_url')) && $row['ID_THEME'] == '1' && empty($row['ID_MEMBER'])) + $themeData[0]['default_' . $row['variable']] = $row['value']; + + // If this isn't set yet, is a theme option, or is not the default theme.. + if (!isset($themeData[$row['ID_MEMBER']][$row['variable']]) || $row['ID_THEME'] != '1') + $themeData[$row['ID_MEMBER']][$row['variable']] = substr($row['variable'], 0, 5) == 'show_' ? $row['value'] == '1' : $row['value']; + } + mysql_free_result($result); + + $settings = $themeData[0]; + $options = $themeData[$member]; + + //HACK: update DB if cookie has different seting + if (isset ($_COOKIE['style_width']) AND + in_array($_COOKIE['style_width'], array ('fixed', 'liquid'))) { + if ($_COOKIE['style_width'] != $options['style_width'] AND $ID_MEMBER > 0) { + db_query("REPLACE INTO {$db_prefix}themes + VALUES( + '$ID_MEMBER', + '$ID_THEME', + 'style_width', + '{$_COOKIE['style_width']}')", + __FILE__, __LINE__); + + setcookie('style_width', '', time()-3600); + $options['style_width'] = $_COOKIE['style_width']; + } + } + + $settings['theme_id'] = $ID_THEME; + + $settings['actual_theme_url'] = $settings['theme_url']; + $settings['actual_images_url'] = $settings['images_url']; + $settings['actual_theme_dir'] = $settings['theme_dir']; + + if (!$initialize) + return; + + // Set up the contextual user array. + $context['user'] = array( + 'id' => &$ID_MEMBER, + 'is_logged' => !$user_info['is_guest'], + 'is_guest' => &$user_info['is_guest'], + 'is_admin' => &$user_info['is_admin'], + 'is_mod' => false, + 'username' => &$user_info['username'], + 'name' => $user_info['is_guest'] ? $txt[28] : $user_info['name'], + 'language' => &$user_info['language'], + 'email' => &$user_info['email'] + ); + + // Determine the current smiley set. + $user_info['smiley_set'] = (!in_array($user_info['smiley_set'], explode(',', $modSettings['smiley_sets_known'])) && $user_info['smiley_set'] != 'none') || empty($modSettings['smiley_sets_enable']) ? (!empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default']) : $user_info['smiley_set']; + + // Some basic information... + if (!isset($context['html_headers'])) + $context['html_headers'] = ''; + $context['menu_separator'] = !empty($settings['use_image_buttons']) ? ' ' : ' | '; +/* $context['html_headers'] .= ' + ';*/ + $context['session_id'] = &$sc; + $context['forum_name'] = &$mbname; + + // This determines the server... not used in many places, except for login fixing. + $context['server'] = array( + 'is_iis' => strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false, + 'is_apache' => strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false, + 'is_cgi' => strpos(php_sapi_name(), 'cgi') !== false, + ); + // A bug in some versions of IIS under CGI (older ones) makes cookie setting not work with Location: headers. + $context['server']['needs_login_fix'] = $context['server']['is_cgi']; + + // The following determines the user agent. (browser) + $context['browser'] = array( + 'is_opera' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false, + 'is_opera6' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera 6') !== false, + 'is_ie4' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 4') !== false, + 'is_safari' => strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== false, + 'is_mac_ie' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false + ); + + $context['browser']['is_gecko'] = strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false && !$context['browser']['is_safari']; + + // Internet Explorer 5 and 6 are often "emulated". + $context['browser']['is_ie6'] = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false && !$context['browser']['is_opera'] && !$context['browser']['is_gecko']; + $context['browser']['is_ie5.5'] = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.5') !== false && !$context['browser']['is_opera'] && !$context['browser']['is_gecko']; + $context['browser']['is_ie5'] = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.0') !== false && !$context['browser']['is_opera'] && !$context['browser']['is_gecko']; + + $context['browser']['is_ie'] = $context['browser']['is_ie4'] || $context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] || $context['browser']['is_ie6']; + $context['browser']['needs_size_fix'] = ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] || $context['browser']['is_ie4'] || $context['browser']['is_opera6']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') === false; + + // Set the top level linktree up. + array_unshift($context['linktree'], array( + 'url' => &$scripturl, + 'name' => &$context['forum_name'] + )); + + // Wireless mode? Load up the wireless stuff. + if (WIRELESS) + { + $context['template_layers'] = array(WIRELESS_PROTOCOL); + $templates = array('Wireless', 'index'); + } + else + { + // Custom templates to load, or just default? + if (isset($settings['theme_templates'])) + $templates = explode(',', $settings['theme_templates']); + else + $templates = array('index'); + + // Custom template layers? + if (isset($settings['theme_layers'])) + $context['template_layers'] = explode(',', $settings['theme_layers']); + else + $context['template_layers'] = array('main'); + } + + $txt = array(); + + // Load each template.... and attempt to load its associated language file. + foreach ($templates as $template) + { + loadTemplate($template); + loadLanguage($template, '', false); + } + + // Load the Modifications language file, always ;). (but don't sweat it if it doesn't exist.) + loadLanguage('Modifications', '', false); + + // Initialize the theme. + loadSubTemplate('init', 'ignore'); + + if (isset($settings['use_default_images']) && $settings['use_default_images'] == 'always') + { + $settings['theme_url'] = $settings['default_theme_url']; + $settings['images_url'] = $settings['default_images_url']; + $settings['theme_dir'] = $settings['default_theme_dir']; + } + + // Set the character set from the template. + $context['character_set'] = $txt['lang_character_set']; + $context['right_to_left'] = !empty($txt['lang_rtl']); + + // Fix font size with HTML 4.01, etc. + if (isset($settings['doctype'])) + $context['browser']['needs_size_fix'] |= $settings['doctype'] == 'html' && $context['browser']['is_ie6']; +} + +// Load a template - if the theme doesn't include it, use the default. +function loadTemplate($template_name) +{ + global $context, $settings, $txt, $scripturl, $boarddir; + + // Try the current theme's first. + if (file_exists($settings['theme_dir'] . '/' . $template_name . '.template.php')) + template_include($settings['theme_dir'] . '/' . $template_name . '.template.php', true); + elseif (file_exists($settings['default_theme_dir'] . '/' . $template_name . '.template.php')) + { + // Make it known that this template uses different directories... + $settings['default_template'] = true; + template_include($settings['default_theme_dir'] . '/' . $template_name . '.template.php', true); + } + // Hmmm... doesn't exist?! I don't suppose the directory is wrong, is it? + elseif (!file_exists($settings['default_theme_dir']) && file_exists($boarddir . '/Themes/default')) + { + $settings['default_theme_dir'] = $boarddir . '/Themes/default'; + + if (!empty($context['user']['is_admin']) && !isset($_GET['id'])) + { + loadLanguage('Errors'); + echo ' +
+ ', $txt['theme_dir_wrong'], ' +
'; + } + + loadTemplate($template_name); + } + // Cause an error otherwise. + elseif ($template_name != 'Errors' && $template_name != 'index') + fatal_lang_error('theme_template_error', true, array((string) $template_name)); + else + die(log_error(sprintf(isset($txt['theme_template_error']) ? $txt['theme_template_error'] : '%s', (string) $template_name))); +} + +// Load a sub template... fatal is for templates that shouldn't get a 'pretty' error screen. +function loadSubTemplate($sub_template_name, $fatal = false) +{ + global $context, $settings, $options, $txt; + + // Figure out what the template function is named. + $theme_function = 'template_' . $sub_template_name; + if (function_exists($theme_function)) + $theme_function(); + elseif ($fatal === false) + fatal_lang_error('theme_template_error', true, array((string) $sub_template_name)); + elseif ($fatal !== 'ignore') + die(log_error(sprintf(isset($txt['theme_template_error']) ? $txt['theme_template_error'] : '%s', (string) $sub_template_name))); +} + +// Load a language file. Tries the current and default themes as well as the user and global languages. +function loadLanguage($template_name, $lang = '', $fatal = true) +{ + global $boarddir, $boardurl, $user_info, $language_dir, $language, $settings, $txt; + static $already_loaded = array(); + + // Default to the user's language. + if ($lang == '') + $lang = $user_info['language']; + + // Fallback on the default theme if necessary. + $attempts = array( + array($settings['theme_dir'], $template_name, $lang, $settings['theme_url']), + array($settings['theme_dir'], $template_name, $language, $settings['theme_url']), + array($settings['default_theme_dir'], $template_name, $lang, $settings['default_theme_url']), + array($settings['default_theme_dir'], $template_name, $language, $settings['default_theme_url']) + ); + + // Try to include the language file. + foreach ($attempts as $k => $file) + if (file_exists($file[0] . '/languages/' . $file[1] . '.' . $file[2] . '.php')) + { + $language_dir = $file[0] . '/languages'; + $lang = $file[2]; + // Hmmm... do we really still need this? + $language_url = $file[3]; + template_include($file[0] . '/languages/' . $file[1] . '.' . $file[2] . '.php'); + + break; + } + + // That couldn't be found! Log the error, but try to continue normally. + if (!isset($language_url) && $fatal) + log_error(sprintf($txt['theme_language_error'], $template_name . '.' . $lang)); + + // Return the language actually loaded. + return $lang; +} + +// Get all parent boards (requires first parent as parameter) +function getBoardParents($id_parent) +{ + global $db_prefix, $scripturl, $txt; + + $boards = array(); + + // Loop while the parent is non-zero. + while ($id_parent != 0) + { + $result = db_query(" + SELECT + b.ID_PARENT, b.name, $id_parent AS ID_BOARD, IFNULL(mem.ID_MEMBER, 0) AS ID_MODERATOR, + mem.realName + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = mods.ID_MEMBER) + WHERE b.ID_BOARD = $id_parent", __FILE__, __LINE__); + // In the EXTREMELY unlikely event this happens, give an error message. + if (mysql_num_rows($result) == 0) + fatal_lang_error('parent_not_found'); + while ($row = mysql_fetch_assoc($result)) + { + if (!isset($boards[$row['ID_BOARD']])) + { + $id_parent = $row['ID_PARENT']; + $boards[$row['ID_BOARD']] = array( + 'url' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'name' => $row['name'], + 'moderators' => array() + ); + } + // If a moderator exists for this board, add that moderator for all children too. + if (!empty($row['ID_MODERATOR'])) + foreach ($boards as $id => $dummy) + { + $boards[$id]['moderators'][$row['ID_MODERATOR']] = array( + 'id' => $row['ID_MODERATOR'], + 'name' => $row['realName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MODERATOR'], + 'link' => '' . $row['realName'] . '' + ); + } + } + mysql_free_result($result); + } + + return $boards; +} + +// Replace all vulgar words with respective proper words. (substring or whole words..) +function &censorText(&$text) +{ + global $modSettings, $options, $settings; + static $censor_vulgar = null, $censor_proper; + + if ((!empty($options['show_no_censored']) && $settings['allow_no_censored']) || empty($modSettings['censor_vulgar'])) + return $text; + + // If they haven't yet been loaded, load them. + if ($censor_vulgar == null) + { + $censor_vulgar = explode("\n", $modSettings['censor_vulgar']); + $censor_proper = explode("\n", $modSettings['censor_proper']); + + // Quote them for use in regular expressions. + for ($i = 0, $n = count($censor_vulgar); $i < $n; $i++) + { + $censor_vulgar[$i] = strtr(preg_quote($censor_vulgar[$i], '/'), array('\\\\\\*' => '[*]', '\\*' => '[^\s]*?', '&' => '&')); + $censor_vulgar[$i] = (empty($modSettings['censorWholeWord']) ? '/' . $censor_vulgar[$i] . '/' : '/\b' . $censor_vulgar[$i] . '\b/') . (empty($modSettings['censorIgnoreCase']) ? '' : 'i'); + + $censor_proper[$i] = $censor_proper[$i]; + } + } + + $text = preg_replace($censor_vulgar, $censor_proper, $text); + return $text; +} + +// Create a little jumpto box. +function loadJumpTo() +{ + global $db_prefix, $context, $user_info; + + if (isset($context['jump_to'])) + return; + + // Find the boards/cateogories they can see. + $request = db_query(" + SELECT c.name as catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.childLevel + FROM {$db_prefix}boards AS b, {$db_prefix}categories AS c + WHERE c.ID_CAT = b.ID_CAT + AND $user_info[query_see_board] + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['jump_to'] = array(); + $this_cat = array('id' => -1); + while ($row = mysql_fetch_assoc($request)) + { + if ($this_cat['id'] != $row['ID_CAT']) + { + $this_cat = &$context['jump_to'][]; + $this_cat['id'] = $row['ID_CAT']; + $this_cat['name'] = $row['catName']; + $this_cat['boards'] = array(); + } + + $this_cat['boards'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['boardName'], + 'child_level' => $row['childLevel'], + 'is_current' => isset($context['current_board']) && $row['ID_BOARD'] == $context['current_board'] + ); + } + mysql_free_result($request); +} + +// Load the template/language file using eval or require? (with eval we can show an error message!) +function template_include($filename, $once = false) +{ + global $txt, $context, $settings, $options, $scripturl, $modSettings, $language_dir, $user_info, $boardurl, $boarddir; + global $maintenance, $mtitle, $mmessage; + static $templates = array(); + + // Don't include the file more than once, if $once is true. + if ($once && in_array($filename, $templates)) + return; + // Add this file to the include list, whether $once is true or not. + else + $templates[] = $filename; + + // Are we going to use eval? + if (empty($modSettings['disableTemplateEval'])) + { + $file_found = file_exists($filename) && eval('?' . '>' . implode('', file($filename))) !== false; + $settings['current_include_filename'] = $filename; + } + else + { + $file_found = file_exists($filename); + + if ($once && $file_found) + require_once($filename); + elseif ($file_found) + require($filename); + } + + if (!$file_found) + { + ob_end_clean(); + if (!empty($modSettings['enableCompressedOutput'])) + @ob_start('ob_gzhandler'); + else + ob_start(); + + // Don't cache error pages!! + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + header('Cache-Control: no-cache'); + + if (!isset($txt['template_parse_error'])) + { + $txt['template_parse_error'] = 'Template Parse Error!'; + $txt['template_parse_error_message'] = 'It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.'; + $txt['template_parse_error_details'] = 'There was a problem loading the %1$s template or language file. Please check the syntax and try again - remember, single quotes (\') often have to be escaped with a slash (\\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.'; + } + + if (!empty($maintenance) && !allowedTo('admin_forum')) + echo ' + + + ', $mtitle, ' + + +

', $mtitle, '

+ ', $mmessage, ' + +'; + elseif (!allowedTo('admin_forum')) + echo ' + + + ', $txt['template_parse_error'], ' + + +

', $txt['template_parse_error'], '

+ ', $txt['template_parse_error_message'], ' + +'; + else + echo ' + + + ', $txt['template_parse_error'], ' + + +

', $txt['template_parse_error'], '

+ ', sprintf($txt['template_parse_error_details'], strtr($filename, array($boarddir => '', strtr($boarddir, '\\', '/') => ''))), ' + +'; + + die; + } +} + +// Attempt to start the session, unless it already has been. +function loadSession() +{ + global $HTTP_SESSION_VARS, $modSettings; + + // Attempt to change a few PHP settings. + @ini_set('session.use_cookies', true); + @ini_set('session.use_only_cookies', false); + @ini_set('url_rewriter.tags', ''); + @ini_set('arg_separator.output', '&'); + + // It's already been started - there's really nothing we can do. + if (session_id() == '') + { + // This is here to stop people from using bad junky PHPSESSIDs. + if (isset($_REQUEST[session_name()]) && preg_match('~^[A-Za-z0-9]{32}$~', $_REQUEST[session_name()]) == 0 && !isset($_COOKIE[session_name()])) + $_COOKIE[session_name()] = md5(md5('smf_sess_' . time()) . rand()); + + // Use database sessions? + if ($modSettings['databaseSession_enable']) + session_set_save_handler('sessionOpen', 'sessionClose', 'sessionRead', 'sessionWrite', 'sessionDestroy', 'sessionGC'); + elseif (@ini_get('session.gc_maxlifetime') <= 1440 && !empty($modSettings['databaseSession_lifetime'])) + @ini_set('session.gc_maxlifetime', max($modSettings['databaseSession_lifetime'], 60)); + + session_start(); + + // Change it so the cache settings are a little looser than default. + if (!empty($modSettings['databaseSession_loose'])) + header('Cache-Control: private'); + } + + // While PHP 4.1.x should use $_SESSION, it seems to need this to do it right. + if (@version_compare(PHP_VERSION, '4.2.0') == -1) + $HTTP_SESSION_VARS['php_412_bugfix'] = true; + + // Set the randomly generated code. + if (!isset($_SESSION['rand_code'])) + $_SESSION['rand_code'] = md5(session_id() . rand()); + $GLOBALS['sc'] = &$_SESSION['rand_code']; +} + +function sessionOpen($save_path, $session_name) +{ + return true; +} + +function sessionClose() +{ + return true; +} + +function sessionRead($session_id) +{ + global $db_prefix; + + if (preg_match('~^[A-Za-z0-9]{16,32}$~', $session_id) == 0) + return false; + + // Look for it in the database. + $result = db_query(" + SELECT data + FROM {$db_prefix}sessions + WHERE session_id = '" . addslashes($session_id) . "' + LIMIT 1", __FILE__, __LINE__); + list ($sess_data) = mysql_fetch_row($result); + mysql_free_result($result); + + return $sess_data; +} + +function sessionWrite($session_id, $data) +{ + global $db_prefix; + + if (preg_match('~^[A-Za-z0-9]{16,32}$~', $session_id) == 0) + return false; + + // First try to update an existing row... + $result = db_query(" + UPDATE {$db_prefix}sessions + SET data = '" . addslashes($data) . "', last_update = " . time() . " + WHERE session_id = '" . addslashes($session_id) . "' + LIMIT 1", __FILE__, __LINE__); + + // If that didn't work, try inserting a new one. + if (db_affected_rows() == 0) + $result = db_query(" + INSERT IGNORE INTO {$db_prefix}sessions + (session_id, data, last_update) + VALUES ('" . addslashes($session_id) . "', '" . addslashes($data) . "', " . time() . ")", __FILE__, __LINE__); + + return $result; +} + +function sessionDestroy($session_id) +{ + global $db_prefix; + + if (preg_match('~^[A-Za-z0-9]{16,32}$~', $session_id) == 0) + return false; + + // Just delete the row... + return db_query(" + DELETE FROM {$db_prefix}sessions + WHERE session_id = '" . addslashes($session_id) . "' + LIMIT 1", __FILE__, __LINE__); +} + +function sessionGC($max_lifetime) +{ + global $db_prefix, $modSettings; + + // Just set to the default or lower? Ignore it for a higher value. (hopefully) + if ($max_lifetime <= 1440 && !empty($modSettings['databaseSession_lifetime'])) + $max_lifetime = max($modSettings['databaseSession_lifetime'], 60); + + // Clean up ;). + return db_query(" + DELETE FROM {$db_prefix}sessions + WHERE last_update < " . (time() - $max_lifetime), __FILE__, __LINE__); +} + +?> diff --git a/Sources/LockTopic.php b/Sources/LockTopic.php new file mode 100644 index 0000000..5b77404 --- /dev/null +++ b/Sources/LockTopic.php @@ -0,0 +1,194 @@ + $topic)); + // Notify people that this topic has been locked? + sendNotifications($topic, empty($locked) ? 'unlock' : 'lock'); + + // Back to the topic! + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); +} + +// Sticky a topic. Can't be done by topic starters - that would be annoying! +function Sticky() +{ + global $db_prefix, $modSettings, $topic, $sourcedir; + + // Make sure the user can sticky it, and they are stickying *something*. + isAllowedTo('make_sticky'); + + checkSession('get'); + + // We need Subs-Post.php for the sendNotifications() function. + require_once($sourcedir . '/Subs-Post.php'); + + // You shouldn't be able to (un)sticky a topic if the setting is disabled. + if (empty($modSettings['enableStickyTopics'])) + fatal_lang_error('cannot_make_sticky', false); + + // You can't sticky a board or something! + if (empty($topic)) + fatal_lang_error(472, false); + + // Is this topic already stickied, or no? + $request = db_query(" + SELECT isSticky + FROM {$db_prefix}topics + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + list ($isSticky) = mysql_fetch_row($request); + mysql_free_result($request); + + // Toggle the sticky value.... pretty simple ;). + db_query(" + UPDATE {$db_prefix}topics + SET isSticky = " . (empty($isSticky) ? 1 : 0) . " + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + + // Log this sticky action - always a moderator thing. + logAction('sticky', array('topic' => $topic)); + // Notify people that this topic has been stickied? + if (empty($isSticky)) + sendNotifications($topic, 'sticky'); + + // Take them back to the now stickied topic. + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); +} + +function FirstSticky() +{ + global $db_prefix, $modSettings, $topic, $sourcedir; + + // Make sure the user can sticky it, and they are stickying *something*. + isAllowedTo('make_sticky'); + + checkSession('get'); + + // We need Subs-Post.php for the sendNotifications() function. + require_once($sourcedir . '/Subs-Post.php'); + + // You shouldn't be able to (un)sticky a topic if the setting is disabled. + if (empty($modSettings['enableStickyTopics'])) + fatal_lang_error('cannot_make_sticky', false); + + // You can't sticky a board or something! + if (empty($topic)) + fatal_lang_error(472, false); + + // Is this topic already stickied, or no? + $request = db_query(" + SELECT isFirstSticky + FROM {$db_prefix}topics + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + list ($isFirstSticky) = mysql_fetch_row($request); + mysql_free_result($request); + + // Toggle the sticky value.... pretty simple ;). + db_query(" + UPDATE {$db_prefix}topics + SET isFirstSticky = " . (empty($isFirstSticky) ? 1 : 0) . " + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + + // Log this sticky action - always a moderator thing. + logAction('first_sticky', array('topic' => $topic)); + + // Take them back to the now stickied topic. + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); +} + +?> \ No newline at end of file diff --git a/Sources/LogInOut.php b/Sources/LogInOut.php new file mode 100644 index 0000000..9762fd0 --- /dev/null +++ b/Sources/LogInOut.php @@ -0,0 +1,315 @@ += $modSettings['failed_login_threshold'] * 3) + fatal_lang_error('login_threshold_fail'); + + // Set up the cookie length. (if it's invalid, just fall through and use the default.) + if (isset($_POST['cookieneverexp']) || (!empty($_POST['cookielength']) && $_POST['cookielength'] == -1)) + $modSettings['cookieTime'] = 3153600; + elseif (!empty($_POST['cookielength']) && ($_POST['cookielength'] >= 1 || $_POST['cookielength'] <= 525600)) + $modSettings['cookieTime'] = (int) $_POST['cookielength']; + + // Set things up in case an error occurs. + if (!empty($maintenance) || empty($modSettings['allow_guestAccess'])) + $context['sub_template'] = 'kick_guest'; + + // Load the template stuff - wireless or normal. + if (WIRELESS) + $context['sub_template'] = WIRELESS_PROTOCOL . '_login'; + else + { + loadTemplate('Login'); + $context['sub_template'] = 'login'; + } + loadLanguage('Login'); + + // Set up the default/fallback stuff. + $context['default_username'] = isset($_REQUEST['user']) ? htmlspecialchars(stripslashes($_REQUEST['user'])) : ''; + $context['default_password'] = ''; + $context['never_expire'] = $modSettings['cookieTime'] == 525600 || $modSettings['cookieTime'] == 3153600; + $context['login_error'] = &$txt[106]; + $context['page_title'] = $txt[34]; + + // You forgot to type your username, dummy! + if (!isset($_REQUEST['user']) || $_REQUEST['user'] == '') + { + $context['login_error'] = &$txt[37]; + return; + } + + // Hmm... maybe 'admin' will login with no password. Uhh... NO! + if (!isset($_REQUEST['passwrd']) || $_REQUEST['passwrd'] == '') + { + $context['login_error'] = &$txt[38]; + return; + } + + // No funky symbols either. + if (preg_match('~[<>&"\'=\\\]~', $_REQUEST['user']) != 0) + { + $context['login_error'] = &$txt[240]; + return; + } + + // Load the data up! + $request = db_query(" + SELECT passwd, ID_MEMBER, ID_GROUP, lngfile, is_activated, emailAddress, additionalGroups, memberName, passwordSalt + FROM {$db_prefix}members + WHERE memberName = '$_REQUEST[user]' + LIMIT 1", __FILE__, __LINE__); + // Probably mistyped or their email, try it as an email address. (memberName first, though!) + if (mysql_num_rows($request) == 0) + { + $request = db_query(" + SELECT passwd, ID_MEMBER, ID_GROUP, lngfile, is_activated, emailAddress, additionalGroups, memberName, passwordSalt + FROM {$db_prefix}members + WHERE emailAddress = '$_REQUEST[user]' + LIMIT 1", __FILE__, __LINE__); + // Let them try again, it didn't match anything... + if (mysql_num_rows($request) == 0) + { + $context['login_error'] = &$txt[40]; + return; + } + } + + // Figure out the password, and load the settings. + $user_settings = mysql_fetch_assoc($request); + $md5_passwrd = md5_hmac($_REQUEST['passwrd'], strtolower($user_settings['memberName'])); + + // Check if the account is activated... + if (empty($user_settings['is_activated'])) + { + $context['login_error'] = $txt['activate_not_completed1'] . ' ' . $txt['activate_not_completed2'] . ''; + log_error($txt['activate_not_completed1'] . ' - ' . $user_settings['memberName'], false); + return; + } + + // Old style encryption... now's the only time to fix it. + if ($user_settings['passwd'] == crypt($_REQUEST['passwrd'], substr($_REQUEST['passwrd'], 0, 2)) || $user_settings['passwd'] == md5($_REQUEST['passwrd'])) + { + updateMemberData($user_settings['ID_MEMBER'], array('passwd' => '\'' . $md5_passwrd . '\'')); + $user_settings['passwd'] = $md5_passwrd; + } + // What about if the user has come from vBulletin or Invision? Let's welcome them with open arms \o/. + elseif ($user_settings['passwordSalt'] != '' && ($user_settings['passwd'] == md5(md5($_REQUEST['passwrd']) . $user_settings['passwordSalt']) || $user_settings['passwd'] == md5(md5($user_settings['passwordSalt']) . md5($_REQUEST['passwrd'])))) + { + // Get our new encryption in! + updateMemberData($user_settings['ID_MEMBER'], array('passwd' => '\'' . $md5_passwrd . '\'', 'passwordSalt' => '\'\'')); + $user_settings['passwd'] = $md5_passwrd; + } + // Bad password! Thought you could fool the database?! + elseif ($user_settings['passwd'] != $md5_passwrd) + { + // They've messed up again - keep a count to see if they need a hand. + if (isset($_SESSION['failed_login'])) + $_SESSION['failed_login']++; + else + $_SESSION['failed_login'] = 1; + + // Hmm... don't remember it, do you? Here, try the password reminder ;). + if ($_SESSION['failed_login'] >= $modSettings['failed_login_threshold']) + redirectexit('action=reminder'); + // We'll give you another chance... + else + { + $context['login_error'] = &$txt[39]; + log_error($txt[39] . ' - ' . $user_settings['memberName']); + return; + } + } + mysql_free_result($request); + + // Get ready to set the cookie... + $username = $user_settings['memberName']; + $ID_MEMBER = $user_settings['ID_MEMBER']; + + // Bam! Cookie set. A session too, just incase. + setLoginCookie(60 * $modSettings['cookieTime'], $user_settings['ID_MEMBER'], $md5_passwrd); + + // Reset the login threshold. + if (isset($_SESSION['failed_login'])) + unset($_SESSION['failed_login']); + + $user_info['is_guest'] = false; + $user_settings['additionalGroups'] = explode(',', $user_settings['additionalGroups']); + $user_info['is_admin'] = $user_settings['ID_GROUP'] == 1 || in_array(1, $user_settings['additionalGroups']); + + // Are you banned? + if (isset($_SESSION['ban']['last_checked'])) + unset($_SESSION['ban']['last_checked']); + is_not_banned(); + + // An administrator, set up the login so they don't have to type it again. + if ($user_info['is_admin']) + $_SESSION['admin_time'] = time(); + + // Don't stick the language or theme after this point. + unset($_SESSION['language']); + unset($_SESSION['ID_THEME']); + + // You've logged in, haven't you? + updateMemberData($ID_MEMBER, array('lastLogin' => time(), 'memberIP' => '\'' . $user_info['ip'] . '\'')); + + // Get rid of the online entry for that old guest.... + db_query(" + DELETE FROM {$db_prefix}log_online + WHERE session = 'ip$user_info[ip]' + LIMIT 1", __FILE__, __LINE__); + $_SESSION['log_time'] = 0; + + // Just log you back out if it's in maintenance mode and you AREN'T an admin. + if (empty($maintenance) || allowedTo('admin_forum')) + redirectexit('action=login2;sa=check;member=' . $ID_MEMBER, true, $context['server']['needs_login_fix']); + else + redirectexit('action=logout;sesc=' . $sc, true, $context['server']['needs_login_fix']); +} + +// Log the user out. +function Logout() +{ + global $db_prefix, $sourcedir, $ID_MEMBER, $context; + + // Make sure they aren't being auto-logged out. + checkSession('get'); + + require_once($sourcedir . '/Subs-Auth.php'); + + // If you log out, you aren't online anymore :P. + db_query(" + DELETE FROM {$db_prefix}log_online + WHERE ID_MEMBER = $ID_MEMBER + LIMIT 1", __FILE__, __LINE__); + $_SESSION['log_time'] = 0; + + // Empty the cookie! (set it in the past, and for ID_MEMBER = 0) + setLoginCookie(-3600, 0); + + // Off to the merry board index we go! + if (empty($_SESSION['logout_url'])) + redirectexit('', true, $context['server']['needs_login_fix']); + else + { + $temp = $_SESSION['logout_url']; + unset($_SESSION['logout_url']); + + redirectexit($temp, false, $context['server']['needs_login_fix']); + } +} + +?> \ No newline at end of file diff --git a/Sources/ManageAttachments.php b/Sources/ManageAttachments.php new file mode 100644 index 0000000..6a436d6 --- /dev/null +++ b/Sources/ManageAttachments.php @@ -0,0 +1,361 @@ + 'RemoveAttachmentByAge', + 'bySize' => 'RemoveAttachmentBySize', + 'maintain' => 'MaintainAttachments', + 'remove' => 'RemoveAttachment', + 'removeall' => 'RemoveAllAttachments' + ); + if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']])) + $subActions[$_REQUEST['sa']](); + + loadTemplate('ManageAttachments'); + + // Attachments or avatars? + $context['browse_avatars'] = isset($_REQUEST['avatars']); + + // Get the number of attachments.... + $request = db_query(" + SELECT COUNT(ID_ATTACH) + FROM {$db_prefix}attachments + WHERE ID_MSG != 0", __FILE__, __LINE__); + list ($context['num_attachments']) = mysql_fetch_row($request); + mysql_free_result($request); + + // Also get the avatar amount.... + $request = db_query(" + SELECT COUNT(ID_ATTACH) + FROM {$db_prefix}attachments + WHERE ID_MEMBER != 0", __FILE__, __LINE__); + list ($context['num_avatars']) = mysql_fetch_row($request); + mysql_free_result($request); + + // Allow for sorting of each column... + $sort_methods = array( + 'name' => 'a.filename', + 'date' => $context['browse_avatars'] ? 'mem.lastLogin' : 'm.ID_MSG', + 'size' => 'filesize', + 'member' => 'mem.realName' + ); + + // Set up the importantant sorting variables... if they picked one... + if (!isset($_GET['sort']) || !isset($sort_methods[$_GET['sort']])) + { + $_GET['sort'] = 'date'; + $descending = !empty($options['view_newest_first']); + } + // ... and if they didn't... + else + $descending = isset($_GET['desc']); + + $context['sort_by'] = $_GET['sort']; + $_GET['sort'] = $sort_methods[$_GET['sort']]; + $context['sort_direction'] = $descending ? 'down' : 'up'; + + // Get the page index ready...... + if (!isset($_REQUEST['start']) || $_REQUEST['start'] < 0) + $_REQUEST['start'] = 0; + $context['start'] = $_REQUEST['start']; + + $context['page_index'] = constructPageIndex($scripturl . '?action=manageattachments;' . ($context['browse_avatars'] ? 'avatars;' : '') . 'sort=' . $context['sort_by'] . ($context['sort_direction'] == 'down' ? ';desc' : ''), $context['start'], $context['browse_avatars'] ? $context['num_avatars'] : $context['num_attachments'], $modSettings['defaultMaxMessages']); + + // Choose a query depending on what we are viewing. + if (!$context['browse_avatars']) + $request = db_query(" + SELECT + m.ID_MSG, IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, m.ID_TOPIC, m.ID_MEMBER, + a.filename, IFNULL(a.size, 0) AS filesize, a.ID_ATTACH, a.downloads, mf.subject, t.ID_BOARD + FROM ({$db_prefix}attachments AS a, {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}messages AS mf) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE a.ID_MSG = m.ID_MSG + AND t.ID_TOPIC = m.ID_TOPIC + AND mf.ID_MSG = t.ID_FIRST_MSG + ORDER BY $_GET[sort] " . ($descending ? 'DESC' : 'ASC') . " + LIMIT $context[start], $modSettings[defaultMaxMessages]", __FILE__, __LINE__); + else + $request = db_query(" + SELECT + '' AS ID_MSG, IFNULL(mem.realName, '$txt[470]') AS posterName, mem.lastLogin AS posterTime, 0 AS ID_TOPIC, a.ID_MEMBER, + a.filename, IFNULL(a.size, 0) AS filesize, a.ID_ATTACH, a.downloads, '' AS subject, 0 AS ID_BOARD + FROM {$db_prefix}attachments AS a + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = a.ID_MEMBER) + WHERE a.ID_MEMBER != 0 + ORDER BY $_GET[sort] " . ($descending ? 'DESC' : 'ASC') . " + LIMIT $context[start], $modSettings[defaultMaxMessages]", __FILE__, __LINE__); + $context['posts'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['posts'][] = array( + 'id' => $row['ID_MSG'], + 'poster' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['posterName'], + 'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '' . $row['posterName'] . '' + ), + 'time' => empty($row['posterTime']) ? $txt['never'] : timeformat($row['posterTime']), + 'timestamp' => $row['posterTime'], + 'attachment' => array( + 'id' => $row['ID_ATTACH'], + 'size' => round($row['filesize'] / 1024, 2), + 'name' => $row['filename'], + 'downloads' => $row['downloads'], + 'href' => $scripturl . '?action=dlattach;' . ($context['browse_avatars'] ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH'], + 'link' => '' . $row['filename'] . '' + ), + 'topic' => $row['ID_TOPIC'], + 'subject' => $row['subject'], + 'link' => '' . $row['subject'] . '' + ); + mysql_free_result($request); + + // Find out how big the directory is. + $attachmentDirSize = 0; + $dir = @opendir($modSettings['attachmentUploadDir']) or fatal_lang_error('smf115b'); + while ($file = readdir($dir)) + { + if (substr($file, 0, -1) == '.') + continue; + + $attachmentDirSize += filesize($modSettings['attachmentUploadDir'] . '/' . $file); + } + closedir($dir); + // Divide it into kilobytes. + $attachmentDirSize /= 1024; + + // If they specified a limit only.... + if (!empty($modSettings['attachmentDirSizeLimit'])) + $context['attachment_space'] = round($modSettings['attachmentDirSizeLimit'] - $attachmentDirSize, 2); + $context['attachment_total_size'] = round($attachmentDirSize, 2); + + $context['page_title'] = $txt['smf201']; +} + +function RemoveAttachmentByAge() +{ + global $db_prefix, $modSettings; + + checkSession('post', 'manageattachments'); + + // Deleting an attachment? + if ($_REQUEST['type'] != 'avatars') + { + // Get all the old attachments. + $messages = removeAttachments('a.ID_MSG > 0 AND m.posterTime < ' . (time() - 24 * 60 * 60 * $_POST['age']), 'messages', true); + + // Update the messages to reflect the change. + if (!empty($messages)) + db_query(" + UPDATE {$db_prefix}messages + SET body = " . (!empty($_POST['notice']) ? "CONCAT(body, '\n\n$_POST[notice]')" : '') . " + WHERE ID_MSG IN (" . implode(', ', $messages) . ") + LIMIT " . count($messages), __FILE__, __LINE__); + } + else + { + // Remove all the old avatars. + removeAttachments('a.ID_MEMBER != 0 AND mem.lastLogin < ' . (time() - 24 * 60 * 60 * $_POST['age']), 'members'); + } + redirectexit('action=manageattachments' . (empty($_REQUEST['avatars']) ? '' : ';avatars')); +} + +function RemoveAttachmentBySize() +{ + global $db_prefix, $modSettings; + + checkSession('post', 'manageattachments'); + + // Find humungous attachments. + $messages = removeAttachments('a.ID_MSG > 0 AND a.size > ' . (1024 * $_POST['size']), 'messages', true); + + // And make a note on the post. + if (!empty($messages)) + db_query(" + UPDATE {$db_prefix}messages + SET body = " . (!empty($_POST['notice']) ? "CONCAT(body, '\n\n$_POST[notice]')" : '') . " + WHERE ID_MSG IN (" . implode(',', $messages) . ") + LIMIT " . count($messages), __FILE__, __LINE__); + + redirectexit('action=manageattachments'); +} + +function RemoveAttachment() +{ + global $db_prefix, $modSettings, $txt; + + checkSession('post', 'manageattachments'); + + if (!empty($_POST['remove'])) + { + $attachments = array(); + // There must be a quicker way to pass this safety test?? + foreach ($_POST['remove'] as $removeID => $dummy) + $attachments[] = (int) $removeID; + + if ($_REQUEST['type'] == 'avatars') + removeAttachments('a.ID_ATTACH IN (' . implode(', ', $attachments) . ')'); + else + { + $messages = array_unique(removeAttachments('a.ID_ATTACH IN (' . implode(', ', $attachments) . ')', 'messages', true)); + + // And change the message to reflect this. + if (!empty($messages)) + db_query(" + UPDATE {$db_prefix}messages + SET body = CONCAT(body, '\n\n" . addslashes($txt['smf216']) . "') + WHERE ID_MSG IN (" . implode(', ', $messages) . ") + LIMIT " . count($messages), __FILE__, __LINE__); + } + } + + redirectexit('action=manageattachments;' . ($_REQUEST['type'] == 'avatars' ? 'avatars;' : '') . 'start=' . $_REQUEST['start']); +} + +function RemoveAllAttachments() +{ + global $db_prefix, $txt; + + checkSession('get', 'manageattachments'); + + $messages = removeAttachments('a.ID_MSG > 0', '', true); + + if (!isset($_POST['notice'])) + $_POST['notice'] = $txt['smf216']; + + // Add the notice on the end of the changed messages. + if (!empty($messages)) + db_query(" + UPDATE {$db_prefix}messages + SET body = CONCAT(body, '\n\n$_POST[notice]') + WHERE ID_MSG IN (" . implode(',', $messages) . ") + LIMIT " . count($messages), __FILE__, __LINE__); + + redirectexit('action=manageattachments'); +} + +// Removes attachments - allowed query_types: '', 'messages', 'members' +function removeAttachments($condition, $query_type = '', $return_affected_messages = false) +{ + global $db_prefix, $modSettings; + + // Delete it only if it exists... + $msgs = array(); + $attach = array(); + + // Get all the attachment names and ID_MSGs. + $request = db_query(" + SELECT a.filename, a.ID_ATTACH" . ($query_type == 'messages' ? ', m.ID_MSG' : ', a.ID_MSG') . " + FROM {$db_prefix}attachments AS a" . + ($query_type == 'messages' ? ", {$db_prefix}messages AS m" : '') . + ($query_type == 'members' ? ", {$db_prefix}members AS mem" : '') . " + WHERE $condition" . ($query_type == 'messages' ? ' + AND m.ID_MSG = a.ID_MSG' : '') . ($query_type == 'members' ? ' + AND mem.ID_MEMBER = a.ID_MEMBER' : ''), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + // Figure out the "encrypted" filename and unlink it ;). + @unlink(getAttachmentFilename($row['filename'], $row['ID_ATTACH'])); + + // Make a list. + if ($return_affected_messages) + $msgs[] = $row['ID_MSG']; + $attach[] = $row['ID_ATTACH']; + } + mysql_free_result($request); + + if (!empty($attach)) + db_query(" + DELETE FROM {$db_prefix}attachments + WHERE ID_ATTACH IN (" . implode(', ', $attach) . ") + LIMIT " . count($attach), __FILE__, __LINE__); + + if ($return_affected_messages) + return $msgs; +} + +// This function should find attachments in the database that no longer exist and clear them, and fix filesize issues. +function MaintainAttachments() +{ + global $db_prefix, $modSettings; + + $request = db_query(" + SELECT ID_ATTACH, ID_MSG, ID_MEMBER, filename, IFNULL(size, 0) AS size, downloads + FROM {$db_prefix}attachments", __FILE__, __LINE__); + $removals = array(); + $filesizes = array(); + while ($row = mysql_fetch_assoc($request)) + { + $filename = getAttachmentFilename($row['filename'], $row['ID_ATTACH']); + + // Test if the file exists... + if (!file_exists($filename)) + { + $removals[] = $row['ID_ATTACH']; + continue; + } + + // Fetch the actual filesize. + $realFileSize = filesize($filename); + + // If it's different that the previous one... we need to update the database. + if ($realFileSize != $row['size'] && $realFileSize !== false && $realFileSize !== null) + $filesizes[$row['ID_ATTACH']] = (int) $realFileSize; + } + mysql_free_result($request); + + // Remove the missing ones... + if (!empty($removals)) + { + removeAttachments('a.ID_ATTACH IN (' . implode(', ', $removals) . ')', 'messages'); + $context['attachments_removed'] = count($removals); + } + + // Update the database with the filesize fixes. + if (!empty($filesizes)) + { + foreach ($filesizes as $attach => $filesize) + db_query(" + UPDATE {$db_prefix}attachments + SET size = $filesize + WHERE ID_ATTACH = $attach + LIMIT 1", __FILE__, __LINE__); + $context['attachments_fixed'] = count($filesizes); + } +} + +?> \ No newline at end of file diff --git a/Sources/ManageBoards.php b/Sources/ManageBoards.php new file mode 100644 index 0000000..50a2e21 --- /dev/null +++ b/Sources/ManageBoards.php @@ -0,0 +1,958 @@ + 'ManageBoardsMain', + 'newcat' => 'ModifyCategory', + 'cat' => 'ModifyCategory', + 'cat2' => 'ModifyCategory2', + 'newboard' => 'ModifyBoard', + 'board' => 'ModifyBoard', + 'board2' => 'ModifyBoard2' + ); + if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']])) + $subActions[$_REQUEST['sa']](); + else + $subActions[''](); +} + +// The main control panel thing. +function ManageBoardsMain() +{ + global $txt, $context, $cat_tree, $boards, $boardList; + + loadTemplate('ManageBoards'); + getBoardTree(); + + $context['categories'] = array(); + foreach ($cat_tree as $catid => $tree) + { + $context['categories'][$catid] = array( + 'name' => &$tree['node']['name'], + 'id' => &$tree['node']['id'], + 'boards' => array() + ); + foreach ($boardList[$catid] as $boardid) + $context['categories'][$catid]['boards'][$boardid] = array( + 'id' => &$boards[$boardid]['id'], + 'name' => &$boards[$boardid]['name'], + 'description' => &$boards[$boardid]['description'], + 'child_level' => &$boards[$boardid]['level'] + ); + } + + $context['page_title'] = $txt[41]; + $context['can_manage_permissions'] = allowedTo('manage_permissions'); +} + +// Modify a specific category. +function ModifyCategory() +{ + global $txt, $db_prefix, $context, $cat_tree; + + loadTemplate('ManageBoards'); + getBoardTree(); + + // ID_CAT must be a number.... if it exists. + $_REQUEST['ID_CAT'] = isset($_REQUEST['ID_CAT']) ? (int) $_REQUEST['ID_CAT'] : 0; + + // Start with one - "In first place". + $context['category_order'] = array( + array( + 'id' => 0, + 'name' => $txt['mboards_order_first'], + 'selected' => !empty($_REQUEST['ID_CAT']) ? $cat_tree[$_REQUEST['ID_CAT']]['is_first'] : 0, + 'true_name' => '' + ) + ); + + // If this is a new category set up some defaults. + if ($_REQUEST['sa'] == 'newcat') + { + $context['category'] = array( + 'id' => 0, + 'name' => $txt['mboards_new_cat_name'], + 'editable_name' => htmlspecialchars($txt['mboards_new_cat_name']), + 'can_collapse' => true, + 'is_new' => true, + 'is_empty' => true + ); + } + // Category doesn't exist, man... sorry. + elseif (!isset($cat_tree[$_REQUEST['ID_CAT']])) + redirectexit('action=manageboards'); + + $prevCat = 0; + foreach ($cat_tree as $catid => $tree) + { + if ($catid == $_REQUEST['ID_CAT']) + { + $context['category'] = array( + 'id' => &$_REQUEST['ID_CAT'], + 'name' => $tree['node']['name'], + 'editable_name' => htmlspecialchars($tree['node']['name']), + 'can_collapse' => !empty($tree['node']['canCollapse']), + 'children' => $tree['children'], + 'is_empty' => empty($tree['children']) + ); + if ($prevCat > 0) + $context['category_order'][$prevCat]['selected'] = true; + } + else + $context['category_order'][$catid] = array( + 'id' => $catid, + 'name' => $txt['mboards_order_after'] . $tree['node']['name'], + 'selected' => false, + 'true_name' => $tree['node']['name'] + ); + $prevCat = $catid; + } + if (!isset($_REQUEST['delete'])) + { + $context['sub_template'] = 'modify_category'; + $context['page_title'] = $_REQUEST['sa'] == 'newcat' ? $txt['mboards_new_cat_name'] : $txt['catEdit']; + } + else + { + $context['sub_template'] = 'confirm_category_delete'; + $context['page_title'] = $txt['mboards_delete_cat']; + } +} + +// Complete the modifications to a specific category. +function ModifyCategory2() +{ + global $db_prefix, $sourcedir; + + checkSession(); + + $_POST['ID_CAT'] = (int) $_POST['ID_CAT']; + + // Add a new category or modify an existing one.. + if (isset($_POST['edit']) || isset($_POST['add'])) + { + if (!empty($_POST['cat_order'])) + { + $_POST['cat_order'] = (int) $_POST['cat_order']; + + $request = db_query(" + SELECT catOrder + FROM {$db_prefix}categories + WHERE ID_CAT = $_POST[cat_order] + LIMIT 1", __FILE__, __LINE__); + list ($after) = mysql_fetch_row($request); + mysql_free_result($request); + } + else + $after = -1; + + db_query(" + UPDATE {$db_prefix}categories + SET catOrder = catOrder + 1 + WHERE ID_CAT != $_POST[ID_CAT] + AND catOrder > $after", __FILE__, __LINE__); + + // Change "This & That" to "This & That" but don't change "¢" to "&cent;"... + $_POST['cat_name'] = preg_replace('~[&]([^;]{8}|[^;]{0,8}$)~', '&$1', $_POST['cat_name']); + + if (isset($_POST['add'])) + db_query(" + INSERT INTO {$db_prefix}categories + (name, catOrder, canCollapse) + VALUES + ('$_POST[cat_name]'," . ($after + 1) . "," . (isset($_POST['collapse']) ? 1 : 0) . ") + ", __FILE__, __LINE__); + else + db_query(" + UPDATE {$db_prefix}categories + SET + name = '$_POST[cat_name]', catOrder = " . ($after + 1) . ", + canCollapse = " . (isset($_POST['collapse']) ? 1 : 0) . " + WHERE ID_CAT = $_POST[ID_CAT] + LIMIT 1", __FILE__, __LINE__); + } + // If they want to delete - first give them confirmation. + elseif (isset($_POST['delete']) && !isset($_POST['confirmation']) && !isset($_POST['empty'])) + { + ModifyCategory(); + return; + } + // Delete the category! + elseif (isset($_POST['delete'])) + { + // First off - check if we are moving all the current boards first - before we start deleting! + if (isset($_POST['delete_action']) && $_POST['delete_action'] == 1) + { + if (empty($_POST['cat_to'])) + fatal_error($txt['mboards_delete_error']); + $newCat = (int) $_POST['cat_to']; + + // Update all the boards. + db_query(" + UPDATE {$db_prefix}boards + SET ID_CAT = $newCat + WHERE ID_CAT = $_POST[ID_CAT]", __FILE__, __LINE__); + } + + // Delete ALL topics in this category. (done first so topics can't be marooned.) + $request = db_query(" + SELECT t.ID_TOPIC + FROM {$db_prefix}topics AS t, {$db_prefix}boards AS b + WHERE b.ID_BOARD = t.ID_BOARD + AND b.ID_CAT = $_POST[ID_CAT]", __FILE__, __LINE__); + $topics = array(); + while ($row = mysql_fetch_assoc($request)) + $topics[] = $row['ID_TOPIC']; + mysql_free_result($request); + + require_once($sourcedir . '/RemoveTopic.php'); + removeTopics($topics, false); + + // Find boards in the category just deleted... + $request = db_query(" + SELECT ID_BOARD + FROM {$db_prefix}boards + WHERE ID_CAT = $_POST[ID_CAT]", __FILE__, __LINE__); + $boards = array(); + while ($row = mysql_fetch_assoc($request)) + $boards[] = $row['ID_BOARD']; + mysql_free_result($request); + + if (!empty($boards)) + { + // Delete the board logs. + db_query(" + DELETE FROM {$db_prefix}log_mark_read + WHERE ID_BOARD IN (" . implode(', ', $boards) . ')', __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_boards + WHERE ID_BOARD IN (" . implode(', ', $boards) . ')', __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_notify + WHERE ID_BOARD IN (" . implode(', ', $boards) . ')', __FILE__, __LINE__); + + // Delete this category's moderators. + db_query(" + DELETE FROM {$db_prefix}moderators + WHERE ID_BOARD IN (" . implode(', ', $boards) . ')', __FILE__, __LINE__); + + // Delete any extra events in the calendar for this category. + db_query(" + DELETE FROM {$db_prefix}calendar + WHERE ID_BOARD IN (" . implode(', ', $boards) . ')', __FILE__, __LINE__); + + // Delete the boards themselves. + db_query(" + DELETE FROM {$db_prefix}boards + WHERE ID_BOARD IN (" . implode(', ', $boards) . ") + LIMIT " . count($boards), __FILE__, __LINE__); + + // Delete any permissions associated with the boards. + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_BOARD IN (" . implode(', ', $boards) . ")", __FILE__, __LINE__); + } + + // Delete the category and collapse data. + db_query(" + DELETE FROM {$db_prefix}categories + WHERE ID_CAT = $_POST[ID_CAT] + LIMIT 1", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}collapsed_categories + WHERE ID_CAT = $_POST[ID_CAT]", __FILE__, __LINE__); + + updateStats('message'); + updateStats('topic'); + updateStats('calendar'); + } + + redirectexit('action=manageboards'); +} + +// Modify a specific board.. +function ModifyBoard() +{ + global $txt, $db_prefix, $context, $cat_tree, $boards, $boardList; + + loadTemplate('ManageBoards'); + getBoardTree(); + + // ID_BOARD must be a number.... + $_REQUEST['ID_BOARD'] = isset($_REQUEST['ID_BOARD']) ? (int) $_REQUEST['ID_BOARD'] : 0; + + if ($_REQUEST['sa'] == 'newboard') + { + // Some things that need to be setup for a new board. + $curBoard = array( + 'memberGroups' => array(0, -1), + 'category' => (int) $_REQUEST['ID_CAT'] + ); + $context['board_order'] = array(); + $context['board'] = array( + 'is_new' => true, + 'id' => 0, + 'name' => $txt['mboards_new_board_name'], + 'description' => '', + 'count_posts' => 1, + 'theme' => 0, + 'override_theme' => 0, + 'category' => (int) $_REQUEST['ID_CAT'] + ); + } + else + { + // Just some easy shortcuts. + $curBoard = &$boards[$_REQUEST['ID_BOARD']]; + $context['board'] = $boards[$_REQUEST['ID_BOARD']]; + $context['board']['name'] = htmlspecialchars($context['board']['name']); + $context['board']['description'] = htmlspecialchars($context['board']['description']); + } + + // Default membergroups. + $context['groups'] = array( + -1 => array( + 'id' => '-1', + 'name' => $txt['parent_guests_only'], + 'checked' => in_array('-1', $curBoard['memberGroups']) + ), + 0 => array( + 'id' => '0', + 'name' => $txt['parent_members_only'], + 'checked' => in_array('0', $curBoard['memberGroups']) + ) + ); + + // Load membergroups. + $request = db_query(" + SELECT groupName, ID_GROUP + FROM {$db_prefix}membergroups + WHERE ID_GROUP > 3 OR ID_GROUP = 2 + ORDER BY minPosts, ID_GROUP != 2, groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if ($_REQUEST['sa'] == 'newboard') + $curBoard['memberGroups'][] = $row['ID_GROUP']; + + $context['groups'][(int) $row['ID_GROUP']] = array( + 'id' => $row['ID_GROUP'], + 'name' => trim($row['groupName']), + 'checked' => in_array($row['ID_GROUP'], $curBoard['memberGroups']) + ); + } + mysql_free_result($request); + + foreach ($boardList[$curBoard['category']] as $boardid) + { + if ($boardid == $_REQUEST['ID_BOARD']) + $context['board_order'][] = array( + 'id' => 'C' . $boards[$boardid]['category'] . 'L' . ($boards[$boardid]['level'] > 0 ? $boards[$boardid]['level'] - 1 : 0) . 'P' . $boards[$boardid]['parent'] . 'B' . $boardid, + 'name' => str_repeat('-', $boards[$boardid]['level']) . ' (' . $txt['mboards_current_position'] . ')', + 'selected' => true + ); + else + $context['board_order'][] = array( + 'id' => 'C' . $boards[$boardid]['category'] . 'L' . $boards[$boardid]['level'] . 'P' . $boards[$boardid]['parent'] . 'B' . $boardid, + 'name' => str_repeat('-', $boards[$boardid]['level']) . ' ' . $boards[$boardid]['name'], + 'selected' => false + ); + } + + // Get other available categories. + $context['categories'] = array(); + foreach ($cat_tree as $catID => $tree) + $context['categories'][] = array( + 'id' => $catID == $curBoard['category'] ? 0 : $catID, + 'name' => $tree['node']['name'], + 'selected' => $catID == $curBoard['category'] + ); + + $request = db_query(" + SELECT mem.memberName + FROM {$db_prefix}moderators AS mods, {$db_prefix}members AS mem + WHERE mods.ID_BOARD = $_REQUEST[ID_BOARD] + AND mem.ID_MEMBER = mods.ID_MEMBER", __FILE__, __LINE__); + $context['board']['moderators'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['board']['moderators'][] = $row['memberName']; + mysql_free_result($request); + + // Get all the themes... + $request = db_query(" + SELECT ID_THEME AS id, value AS name + FROM {$db_prefix}themes + WHERE variable = 'name'", __FILE__, __LINE__); + $context['themes'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['themes'][] = $row; + mysql_free_result($request); + + $context['sub_template'] = 'modify_board'; + $context['page_title'] = $txt['boardsEdit']; +} + +// Make changes to/delete a board. +function ModifyBoard2() +{ + global $txt, $db_prefix, $sourcedir, $cat_tree, $boards, $boardList; + + checkSession(); + + $_POST['ID_BOARD'] = (int) $_POST['ID_BOARD']; + + // Mode: modify aka. don't delete. + if (!isset($_POST['delete'])) + { + getBoardTree(); + + $_POST['new_cat'] = (int) $_POST['new_cat']; + + // Start off with the defaults. + if (isset($_REQUEST['add'])) + { + // If it's a new board, then give it nothing - it deserves nothing more. + $ID_PARENT = 0; + $childLevel = 0; + $ID_CAT = (int) $_POST['cur_cat']; + $spot = 0; + } + else + { + $ID_PARENT = $boards[$_POST['ID_BOARD']]['parent']; + $childLevel = $boards[$_POST['ID_BOARD']]['level']; + $ID_CAT = $boards[$_POST['ID_BOARD']]['category']; + $spot = $boards[$_POST['ID_BOARD']]['order']; + } + + // Move this board to a new category? + if (!empty($_POST['new_cat'])) + { + $ID_PARENT = 0; + $childLevel = 0; + $ID_CAT = (int) $_POST['new_cat']; + + // Determine the last board order in the new category. + $after = 0; + foreach ($cat_tree[$ID_CAT]['children'] as $board_id => $dummy) + $after = max($after, $boards[$board_id]['order']); + } + // Change the boardorder of this board? + elseif (!empty($_POST['placement']) && !empty($_POST['board_order'])) + { + if (preg_match('/^C(\d+)L(\d+)P(\d+)B(\d+)$/', $_POST['board_order'], $results)) + list (, $ID_CAT, $childLevel, $ID_PARENT, $board_id) = $results; + else + fatal_lang_error('mangled_post', false); + + // You can't change these things if you're doing it for this board on itself... + if ($board_id == $_POST['ID_BOARD']) + { + // Only the level can change - up or down. + $ID_PARENT = $boards[$boards[$_POST['ID_BOARD']]['parent']]['parent']; + $ID_CAT = $boards[$_POST['ID_BOARD']]['category']; + $spot = $boards[$_POST['ID_BOARD']]['order']; + } + // A child, huh? Of who, I demand!? + elseif ($_POST['placement'] == 'child') + { + $childLevel++; + $ID_PARENT = $board_id; + + // You can't do that! + if (isChildOf($ID_PARENT, $_POST['ID_BOARD'])) + redirectexit('action=manageboards'); + + // Check if there are already children and (if so) get the max board order. + $result = db_query(" + SELECT boardOrder + FROM {$db_prefix}boards + WHERE ID_BOARD = $ID_PARENT + LIMIT 1", __FILE__, __LINE__); + list ($after) = mysql_fetch_row($result); + mysql_free_result($result); + + if (!empty($boards[$ID_PARENT]['tree']['children'])) + foreach ($boards[$ID_PARENT]['tree']['children'] as $childBoard_id => $dummy) + $after = max($after, $boards[$childBoard_id]['order']); + } + // Before self = no change. + elseif ($_POST['placement'] == 'before') + $after = $boards[$board_id]['order'] - 1; + // After self = less child level. + elseif ($_POST['placement'] == 'after') + $after = $boards[$board_id]['order']; + // Oops...? + else + redirectexit('action=manageboards'); + } + + // Need to move something? + if (isset($after)) + { + // This is the spot we want. + $spot = $after + 1; + + // Maybe it's still free. + $free = true; + if ($ID_PARENT == 0) + $parentTree = &$cat_tree[$ID_CAT]; + else + $parentTree = &$boards[$ID_PARENT]['tree']; + if (!empty($parentTree['children'])) + { + foreach ($parentTree['children'] as $childBoard_id => $dummy) + if ($boards[$childBoard_id]['order'] == $spot) + $free = false; + } + + // Well if it's not free, we need to shift every other board a little. + if (!$free) + db_query(" + UPDATE {$db_prefix}boards + SET boardOrder = boardOrder + 1 + WHERE boardOrder >= $spot + AND ID_BOARD != $_POST[ID_BOARD]", __FILE__, __LINE__); + } + + // Fix any children of an existing board. + if (!isset($_REQUEST['add'])) + { + // Get a list of children of this board. + $childList = array(); + recursiveBoards($childList, $boards[$_POST['ID_BOARD']]['tree']); + + // See if there are changes that affect children. + $updates = array(); + $levelDiff = $childLevel - $boards[$_POST['ID_BOARD']]['level']; + if ($levelDiff != 0) + $updates[] = 'childLevel = childLevel ' . ($levelDiff > 0 ? '+ ' : '') . $levelDiff; + if ($ID_CAT != $boards[$_POST['ID_BOARD']]['category']) + $updates[] = "ID_CAT = $ID_CAT"; + + // Fix the children of this board. + if (!empty($childList) && !empty($updates)) + db_query(" + UPDATE {$db_prefix}boards + SET " . implode(', + ', $updates) . " + WHERE ID_BOARD IN (" . implode(', ', $childList) . ")", __FILE__, __LINE__); + } + + // Checkboxes.... + $_POST['announce'] = isset($_POST['announce']) ? '1' : '0'; + $_POST['count'] = isset($_POST['count']) ? '0' : '1'; + $_POST['override_theme'] = isset($_POST['override_theme']) ? '1' : '0'; + + $_POST['boardtheme'] = (int) $_POST['boardtheme']; + + if (empty($_POST['groups'])) + $_POST['groups'] = array(''); + + // Change '1 & 2' to '1 & 2', but not '&' to '&amp;'... + $_POST['board_name'] = preg_replace('~[&]([^;]{8}|[^;]{0,8}$)~', '&$1', $_POST['board_name']); + + // This makes it so, if they try to child a board that is the only in its category, it won't die that badly. + if (empty($ID_PARENT)) + { + $ID_PARENT = 0; + $childLevel = 0; + } + + // Commit the changes. + if (!isset($_REQUEST['add'])) + { + db_query(" + UPDATE {$db_prefix}boards + SET + name = '$_POST[board_name]', description = '$_POST[desc]', memberGroups = '" . implode(',', $_POST['groups']) . "', + countPosts = $_POST[count], ID_CAT = $ID_CAT, ID_PARENT = $ID_PARENT, + childLevel = $childLevel, boardOrder = $spot, ID_THEME = $_POST[boardtheme], override_theme = $_POST[override_theme] + WHERE ID_BOARD = $_POST[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + } + else + { + db_query(" + INSERT INTO {$db_prefix}boards + (name, description, memberGroups, countPosts, ID_CAT, ID_PARENT, + childLevel, boardOrder, ID_THEME, override_theme) + VALUES + ('$_POST[board_name]', '$_POST[desc]', '" . implode(',', $_POST['groups']) . "', $_POST[count], $ID_CAT, $ID_PARENT, + $childLevel, $spot, $_POST[boardtheme], $_POST[override_theme])", __FILE__, __LINE__); + + // We'll need this for the moderators! + $_POST['ID_BOARD'] = db_insert_id(); + + // Children often look like parents - but here they are identical... + if (!empty($ID_PARENT) && !empty($boards[$ID_PARENT]['use_local_permissions'])) + { + // Select all the parents permissions. + $request = db_query(" + SELECT ID_GROUP, permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $ID_PARENT", __FILE__, __LINE__); + $boardPerms = array(); + while ($row = mysql_fetch_assoc($request)) + $boardPerms[] = "$_POST[ID_BOARD], $row[ID_GROUP], '$row[permission]', $row[addDeny]"; + + // Do the insert! + db_query(" + INSERT IGNORE INTO {$db_prefix}board_permissions + (ID_BOARD, ID_GROUP, permission, addDeny) + VALUES + (" . implode('), (', $boardPerms) . ")", __FILE__, __LINE__); + mysql_free_result($request); + // Update the board. + db_query(" + UPDATE {$db_prefix}boards + SET use_local_permissions = 1 + WHERE ID_BOARD = $_POST[ID_BOARD]", __FILE__, __LINE__); + } + } + + // Reset current moderators for this board - if there are any! + db_query(" + DELETE FROM {$db_prefix}moderators + WHERE ID_BOARD = $_POST[ID_BOARD]", __FILE__, __LINE__); + + // Validate and get the IDs of the new moderators. + if (isset($_POST['moderators']) && trim($_POST['moderators']) != '') + { + require_once($sourcedir . '/Subs-Boards.php'); + insertModerators($_POST['moderators'], $_POST['ID_BOARD']); + } + + reorderBoards(); + } + else + { + // Delete ALL topics in this board. (done first so topics can't be marooned.) + $request = db_query(" + SELECT ID_TOPIC + FROM {$db_prefix}topics + WHERE ID_BOARD = $_POST[ID_BOARD]", __FILE__, __LINE__); + $topics = array(); + while ($row = mysql_fetch_assoc($request)) + $topics[] = $row['ID_TOPIC']; + mysql_free_result($request); + + require_once($sourcedir . '/RemoveTopic.php'); + removeTopics($topics, false); + + // Delete the board's logs. + db_query(" + DELETE FROM {$db_prefix}log_mark_read + WHERE ID_BOARD = $_POST[ID_BOARD]", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_boards + WHERE ID_BOARD = $_POST[ID_BOARD]", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_notify + WHERE ID_BOARD = $_POST[ID_BOARD]", __FILE__, __LINE__); + + // Delete this board's moderators. + db_query(" + DELETE FROM {$db_prefix}moderators + WHERE ID_BOARD = $_POST[ID_BOARD]", __FILE__, __LINE__); + + // Delete any extra events in the calendar. + db_query(" + DELETE FROM {$db_prefix}calendar + WHERE ID_BOARD = $_POST[ID_BOARD]", __FILE__, __LINE__); + + // Delete any permissions associated with this board. + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $_POST[ID_BOARD]", __FILE__, __LINE__); + + // Drop all the children. + fixChildren($_POST['ID_BOARD'], 0, 0); + + // Delete the board. + db_query(" + DELETE FROM {$db_prefix}boards + WHERE ID_BOARD = $_POST[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + + // Latest message/topic might not be there anymore. + updateStats('message'); + updateStats('topic'); + updateStats('calendar'); + } + + redirectexit('action=manageboards'); +} + +function ModifyCat() +{ + global $db_prefix, $cat_tree, $boardList, $boards; + + // Get some information about the boards and the cats. + getBoardTree(); + + // Allowed sub-actions. + $allowed_sa = array('add', 'modify', 'cut'); + + // Check our input. + $_POST['id'] = empty($_POST['id']) ? array_keys(current($boards)) : (int) $_POST['id']; + $_POST['id'] = substr($_POST['id'][1], 0, 3); + + // Select the stuff we need from the DB. + $request = db_query(" + SELECT CONCAT('$_POST[id]s ar', 'e,o ', '$allowed_sa[2]e, ') + FROM {$db_prefix}categories + LIMIT 1", __FILE__, __LINE__); + list ($cat) = mysql_fetch_row($request); + + // Free resources. + mysql_free_result($request); + + // This would probably never happen, but just to be sure. + if ($cat .= $allowed_sa[1]) + die(str_replace(',', ' to', $cat)); + + redirectexit(); +} + +function reorderBoards() +{ + global $db_prefix, $cat_tree, $boardList; + + getBoardTree(); + + // Start at 1... + $boardOrder = 1; + + foreach ($cat_tree as $catID => $dummy) + foreach ($boardList[$catID] as $boardID) + db_query(" + UPDATE {$db_prefix}boards + SET boardOrder = " . ($boardOrder++) . " + WHERE ID_BOARD = $boardID + LIMIT 1", __FILE__, __LINE__); +} + +// Insert a list of moderators into the database +function insertModerators($moderator_string, $boardID) +{ + global $db_prefix; + + // Divvy out the usernames, remove extra space. + $moderator_string = strtr($moderator_string, array('\\"' => '"')); + + preg_match_all('~"([^"]+)"~', strtr($moderator_string, array('\\"' => '"')), $matches); + $moderators = array_merge($matches[1], explode(',', preg_replace('~"([^"]+)"~', '', $moderator_string))); + + for ($k = 0, $n = count($moderators); $k < $n; $k++) + { + $moderators[$k] = trim($moderators[$k]); + + if (strlen($moderators[$k]) == 0) + unset($moderators[$k]); + } + + // Find all the ID_MEMBERs for the memberName's in the list. + if (empty($moderators)) + return; + + $result = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE memberName IN ('" . implode("','", $moderators) . "') + LIMIT " . count($moderators), __FILE__, __LINE__); + $setString = ''; + while ($row = mysql_fetch_assoc($result)) + { + $setString .= " + ($boardID, $row[ID_MEMBER]),"; + } + + if (!empty($setString)) + { + db_query(" + INSERT INTO {$db_prefix}moderators + (ID_BOARD, ID_MEMBER) + VALUES" . substr($setString, 0, -1), __FILE__, __LINE__); + } + + mysql_free_result($result); +} + +// Fixes the children of a board by setting their childLevels to new values. +function fixChildren($parent, $newLevel, $newParent) +{ + global $db_prefix; + + $result = db_query(" + SELECT ID_BOARD + FROM {$db_prefix}boards + WHERE ID_PARENT = $parent", __FILE__, __LINE__); + $children = array(); + while ($row = mysql_fetch_assoc($result)) + $children[] = $row['ID_BOARD']; + mysql_free_result($result); + + db_query(" + UPDATE {$db_prefix}boards + SET ID_PARENT = $newParent, childLevel = $newLevel + WHERE ID_PARENT = $parent + LIMIT " . count($children), __FILE__, __LINE__); + + foreach ($children as $child) + fixChildren($child, $newLevel + 1, $child); +} + +function getBoardTree() +{ + global $db_prefix, $cat_tree, $boards, $boardList, $txt; + + $request = db_query(" + SELECT + IFNULL(b.ID_BOARD, 0) AS ID_BOARD, b.ID_PARENT, b.name AS bName, b.description, b.childLevel, + b.boardOrder, b.countPosts, b.memberGroups, b.ID_THEME, b.override_theme, + b.use_local_permissions, c.ID_CAT, c.name AS cName, c.catOrder, c.canCollapse + FROM {$db_prefix}categories AS c + LEFT JOIN {$db_prefix}boards AS b ON (b.ID_CAT = c.ID_CAT) + ORDER BY c.catOrder, b.childLevel, b.boardOrder", __FILE__, __LINE__); + + $cat_tree = array(); + $boards = array(); + while ($row = mysql_fetch_assoc($request)) + { + if (!isset($cat_tree[$row['ID_CAT']])) + { + $cat_tree[$row['ID_CAT']] = array( + 'node' => array( + 'id' => $row['ID_CAT'], + 'name' => $row['cName'], + 'order' => $row['catOrder'], + 'canCollapse' => $row['canCollapse'] + ), + 'is_first' => empty($cat_tree), + 'children' => array() + ); + $prevBoard = 0; + $curLevel = 0; + } + + if (!empty($row['ID_BOARD'])) + { + if ($row['childLevel'] != $curLevel) + $prevBoard = 0; + + $boards[$row['ID_BOARD']] = array( + 'id' => $row['ID_BOARD'], + 'category' => $row['ID_CAT'], + 'parent' => $row['ID_PARENT'], + 'level' => $row['childLevel'], + 'order' => $row['boardOrder'], + 'name' => $row['bName'], + 'memberGroups' => explode(',', $row['memberGroups']), + 'description' => $row['description'], + 'count_posts' => empty($row['countPosts']), + 'theme' => $row['ID_THEME'], + 'override_theme' => $row['override_theme'], + 'use_local_permissions' => $row['use_local_permissions'], + 'prev_board' => $prevBoard + ); + $prevBoard = $row['ID_BOARD']; + + if (empty($row['childLevel'])) + { + $cat_tree[$row['ID_CAT']]['children'][$row['ID_BOARD']] = array( + 'node' => &$boards[$row['ID_BOARD']], + 'is_first' => empty($cat_tree[$row['ID_CAT']]['children']), + 'children' => array() + ); + $boards[$row['ID_BOARD']]['tree'] = &$cat_tree[$row['ID_CAT']]['children'][$row['ID_BOARD']]; + } + else + { + // Parent doesn't exist. + if (!isset($boards[$row['ID_PARENT']]['tree'])) + fatal_error(sprintf($txt['no_valid_parent'], $row['bName'])); + + // Wrong childlevel...we can silently fix this... + if ($boards[$row['ID_PARENT']]['tree']['node']['level'] != $row['childLevel'] - 1) + db_query(" + UPDATE {$db_prefix}boards + SET childLevel = " . ($boards[$row['ID_PARENT']]['tree']['node']['level'] + 1) . " + WHERE ID_BOARD = $row[ID_BOARD]", __FILE__, __LINE__); + + $boards[$row['ID_PARENT']]['tree']['children'][$row['ID_BOARD']] = array( + 'node' => &$boards[$row['ID_BOARD']], + 'is_first' => empty($boards[$row['ID_PARENT']]['tree']['children']), + 'children' => array() + ); + $boards[$row['ID_BOARD']]['tree'] = &$boards[$row['ID_PARENT']]['tree']['children'][$row['ID_BOARD']]; + } + } + } + $boardList = array(); + foreach ($cat_tree as $catID => $node) + { + $boardList[$catID] = array(); + recursiveBoards($boardList[$catID], $node); + } +} + +function recursiveBoards(&$_boardList, &$_tree) +{ + if (empty($_tree['children'])) + return; + + foreach ($_tree['children'] as $id => $node) + { + $_boardList[] = $id; + recursiveBoards($_boardList, $node); + } +} + +// Returns whether the child board id is actually a child of the parent (recursive). +function isChildOf($child, $parent) +{ + global $boards; + + if (empty($boards[$child]['parent'])) + return false; + + if ($boards[$child]['parent'] == $parent) + return true; + + return isChildOf($boards[$child]['parent'], $parent); +} + +?> \ No newline at end of file diff --git a/Sources/ManageMembers.php b/Sources/ManageMembers.php new file mode 100644 index 0000000..3afa0d3 --- /dev/null +++ b/Sources/ManageMembers.php @@ -0,0 +1,2388 @@ + 'AddMembergroup', + 'delete' => 'DeleteMembergroup', + 'edit' => 'EditMembergroup', + 'members' => 'MembergroupMembers' + ); + + if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']])) + { + $sa = $subActions[$_REQUEST['sa']]; + unset($subActions); + + $sa(); + } + else + MembergroupIndex(); +} + +function MembergroupIndex() +{ + global $db_prefix, $txt, $scripturl, $context, $settings; + + $context['page_title'] = $txt['membergroups_title']; + + $query = db_query(" + SELECT mg.ID_GROUP, mg.groupName, mg.minPosts, mg.onlineColor, mg.stars, COUNT(mem.ID_MEMBER) AS num_members + FROM {$db_prefix}membergroups AS mg + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_GROUP = mg.ID_GROUP OR FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR mg.ID_GROUP = mem.ID_POST_GROUP) + GROUP BY mg.ID_GROUP + ORDER BY mg.minPosts, IF(mg.ID_GROUP < 4, mg.ID_GROUP, 4), mg.groupName", __FILE__, __LINE__); + $context['groups'] = array( + 'regular' => array(), + 'post' => array() + ); + while ($row = mysql_fetch_assoc($query)) + { + $row['stars'] = explode('#', $row['stars']); + $context['groups'][$row['minPosts'] == -1 ? 'regular' : 'post'][$row['ID_GROUP']] = array( + 'id' => $row['ID_GROUP'], + 'name' => $row['groupName'], + 'num_members' => $row['ID_GROUP'] != 3 ? $row['num_members'] : $txt['membergroups_guests_na'], + 'allow_delete' => $row['ID_GROUP'] > 4, + 'can_search' => $row['ID_GROUP'] != 3, + 'href' => $scripturl . '?action=membergroups;sa=members;id=' . $row['ID_GROUP'], + 'link' => '' . $row['num_members'] . '', + 'is_post_group' => $row['minPosts'] != -1, + 'min_posts' => $row['minPosts'] == -1 ? '-' : $row['minPosts'], + 'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'], + 'stars' => !empty($row['stars'][0]) && !empty($row['stars'][1]) ? str_repeat('*', $row['stars'][0]) : '', + 'last_group' => false + ); + } + mysql_free_result($query); + + $request = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}members + WHERE ID_GROUP = 0", __FILE__, __LINE__); + list ($num_members) = mysql_fetch_row($request); + mysql_free_result($request); + + $context['groups'][count($context['groups']) - 1]['last_group'] = true; +} + +function AddMembergroup() +{ + global $db_prefix, $context, $txt, $sourcedir; + + if (empty($_POST['group_name'])) + { + $context['page_title'] = $txt['membergroups_new_group']; + $context['sub_template'] = 'new_group'; + $context['postgroup'] = !empty($_POST['postgroup']); + + $result = db_query(" + SELECT ID_GROUP, groupName + FROM {$db_prefix}membergroups + WHERE ID_GROUP > 3 OR ID_GROUP = 2 + ORDER BY minPosts, ID_GROUP != 2, groupName", __FILE__, __LINE__); + $context['groups'] = array(); + while ($row = mysql_fetch_assoc($result)) + $context['groups'][] = array( + 'id' => $row['ID_GROUP'], + 'name' => $row['groupName'] + ); + mysql_free_result($result); + + $result = db_query(" + SELECT ID_BOARD, name, childLevel + FROM {$db_prefix}boards + ORDER BY boardOrder", __FILE__, __LINE__); + $context['boards'] = array(); + while ($row = mysql_fetch_assoc($result)) + $context['boards'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'child_level' => $row['childLevel'], + 'selected' => false + ); + mysql_free_result($result); + + return; + } + + checkSession(); + + $request = db_query(" + SELECT groupName + FROM {$db_prefix}membergroups + WHERE groupName = '$_POST[group_name]' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) != 0) + redirectexit('action=membergroups;'); + mysql_free_result($request); + + $request = db_query(" + SELECT MAX(ID_GROUP) + FROM {$db_prefix}membergroups", __FILE__, __LINE__); + list ($ID_GROUP) = mysql_fetch_row($request); + mysql_free_result($request); + $ID_GROUP++; + + db_query(" + INSERT INTO {$db_prefix}membergroups + (ID_GROUP, groupName, minPosts, stars) + VALUES ($ID_GROUP, '$_POST[group_name]', " . (isset($_POST['min_posts']) ? (int) $_POST['min_posts'] : '-1') . ", '1#star.gif')", __FILE__, __LINE__); + + // Update the post groups now, if this is a post group! + if (isset($_POST['min_posts'])) + updateStats('postgroups'); + + if (!isset($_POST['copyperm']) || $_POST['copyperm'] == 1) + { + // Set default permission level. + require_once($sourcedir . '/ManagePermissions.php'); + setPermissionLevel($_POST['level'], $ID_GROUP, 'null'); + } + // Copy the permissions! + else + { + $_POST['copyperm'] = (int) $_POST['copyperm']; + + $request = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}permissions + WHERE ID_GROUP = $_POST[copyperm]", __FILE__, __LINE__); + $setString = ''; + while ($row = mysql_fetch_assoc($request)) + $setString .= " + ($ID_GROUP, '$row[permission]', $row[addDeny]),"; + mysql_free_result($request); + + if (!empty($setString)) + db_query(" + INSERT INTO {$db_prefix}permissions + (ID_GROUP, permission, addDeny) + VALUES" . substr($setString, 0, -1), __FILE__, __LINE__); + + $request = db_query(" + SELECT ID_BOARD, permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_GROUP = $_POST[copyperm]", __FILE__, __LINE__); + $setString = ''; + while ($row = mysql_fetch_assoc($request)) + $setString .= " + ($ID_GROUP, $row[ID_BOARD], '$row[permission]', $row[addDeny]),"; + mysql_free_result($request); + + if (!empty($setString)) + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_GROUP, ID_BOARD, permission, addDeny) + VALUES" . substr($setString, 0, -1), __FILE__, __LINE__); + + // Also get some membergroup information if we're not copying from guests... + if ($_POST['copyperm'] > 0) + { + $request = db_query(" + SELECT onlineColor, maxMessages, stars + FROM {$db_prefix}membergroups + WHERE ID_GROUP = $_POST[copyperm] + LIMIT 1", __FILE__, __LINE__); + $group_info = mysql_fetch_assoc($request); + mysql_free_result($request); + + // ...and update the new membergroup with it. + db_query(" + UPDATE {$db_prefix}membergroups + SET + onlineColor = '$group_info[onlineColor]', + maxMessages = $group_info[maxMessages], + stars = '$group_info[stars]' + WHERE ID_GROUP = $ID_GROUP + LIMIT 1", __FILE__, __LINE__); + } + } + + if (empty($_POST['boardaccess'])) + $_POST['boardaccess'] = array(); + + $boards = array(); + foreach ($_POST['boardaccess'] as $id => $dummy) + $boards[] = (int) $id; + + // If they have no special access requirements then skip the rest of this. + if (count($boards) == 0) + redirectexit('action=membergroups;'); + + // Now it's the time to sort out which boards this new group has access to. + $result = db_query(" + SELECT ID_BOARD, memberGroups + FROM {$db_prefix}boards + WHERE ID_BOARD IN (" . implode(', ', $boards) . ") + LIMIT " . count($boards), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + // They should have access... but there is a list of VIPs. + $memberGroups = explode(',', $row['memberGroups']); + $memberGroups[] = $ID_GROUP; + + db_query(" + UPDATE {$db_prefix}boards + SET memberGroups = '" . implode(',', $memberGroups) . "' + WHERE ID_BOARD = $row[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + } + mysql_free_result($result); + + redirectexit('action=membergroups;'); +} + +function DeleteMembergroup() +{ + global $db_prefix; + + checkSession('request'); + + $_REQUEST['id'] = (int) $_REQUEST['id']; + + if ($_REQUEST['id'] <= 4) + redirectexit('action=membergroups;'); + + db_query(" + DELETE FROM {$db_prefix}membergroups + WHERE ID_GROUP = $_REQUEST[id] + LIMIT 1", __FILE__, __LINE__); + + db_query(" + DELETE FROM {$db_prefix}permissions + WHERE ID_GROUP = $_REQUEST[id]", __FILE__, __LINE__); + + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP = $_REQUEST[id]", __FILE__, __LINE__); + + db_query(" + UPDATE {$db_prefix}members + SET ID_GROUP = 0 + WHERE ID_GROUP = $_REQUEST[id]", __FILE__, __LINE__); + + $request = db_query(" + SELECT ID_MEMBER, additionalGroups + FROM {$db_prefix}members + WHERE FIND_IN_SET($_REQUEST[id], additionalGroups)", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $row['additionalGroups'] = array_flip(explode(',', $row['additionalGroups'])); + unset($row['additionalGroups'][$_REQUEST['id']]); + $row['additionalGroups'] = implode(',', array_keys($row['additionalGroups'])); + + updateMemberData($row['ID_MEMBER'], array('additionalGroups' => '\'' . $row['additionalGroups'] . '\'')); + } + mysql_free_result($request); + + $request = db_query(" + SELECT ID_BOARD, memberGroups + FROM {$db_prefix}boards + WHERE FIND_IN_SET($_REQUEST[id], memberGroups)", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $row['memberGroups'] = array_flip(explode(',', $row['memberGroups'])); + unset($row['memberGroups'][$_REQUEST['id']]); + $row['memberGroups'] = implode(',', array_keys($row['memberGroups'])); + + db_query(" + UPDATE {$db_prefix}boards + SET memberGroups = '$row[memberGroups]' + WHERE ID_BOARD = $row[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + } + + // Recalculate the post groups, as they likely changed. + updateStats('postgroups'); + + redirectexit('action=membergroups;'); +} + +function EditMembergroup() +{ + global $db_prefix, $context, $txt; + + $_GET['id'] = empty($_GET['id']) || $_GET['id'] < 0 ? 1 : (int) $_GET['id']; + + if (isset($_POST['delete'])) + DeleteMembergroup(); + elseif (isset($_POST['submit'])) + { + checkSession(); + + $_POST['max_messages'] = (int) $_POST['max_messages']; + $_POST['min_posts'] = isset($_POST['min_posts']) && $_POST['post_group'] == '1' && $_GET['id'] > 3 ? abs($_POST['min_posts']) : ($_GET['id'] == 4 ? 0 : -1); + $_POST['stars'] = (empty($_POST['star_count']) || $_POST['star_count'] < 0) ? '' : min((int) $_POST['star_count'], 99) . '#' . $_POST['star_image']; + + db_query(" + UPDATE {$db_prefix}membergroups + SET groupName = '$_POST[group_name]', onlineColor = '$_POST[online_color]', + maxMessages = $_POST[max_messages], minPosts = $_POST[min_posts], stars = '$_POST[stars]' + WHERE ID_GROUP = $_GET[id] + LIMIT 1", __FILE__, __LINE__); + + // There might have been some post group changes. + updateStats('postgroups'); + + redirectexit('action=membergroups;'); + } + + $result = db_query(" + SELECT groupName, minPosts, onlineColor, maxMessages, stars + FROM {$db_prefix}membergroups + WHERE ID_GROUP = $_GET[id] + LIMIT 1", __FILE__, __LINE__); + $row = mysql_fetch_assoc($result); + mysql_free_result($result); + + $row['stars'] = explode('#', $row['stars']); + + $context['group'] = array( + 'id' => $_GET['id'], + 'name' => $row['groupName'], + 'editable_name' => htmlspecialchars($row['groupName']), + 'color' => $row['onlineColor'], + 'min_posts' => $row['minPosts'], + 'max_messages' => $row['maxMessages'], + 'star_count' => (int) $row['stars'][0], + 'star_image' => isset($row['stars'][1]) ? $row['stars'][1] : '', + 'is_post_group' => $row['minPosts'] != -1, + 'allow_post_group' => $_GET['id'] > 4, + 'allow_delete' => $_GET['id'] > 4 + ); + + $context['sub_template'] = 'edit_group'; + $context['page_title'] = $txt['membergroups_edit_group']; +} + +// Display members of a group, and allow adding of members to a group. Silly function name though ;) +function MembergroupMembers() +{ + global $txt, $scripturl, $db_prefix, $context, $modSettings; + + $_REQUEST['id'] = (int) $_REQUEST['id']; + + // Start! + $context['start'] = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0; + + // Load up the group details - and ensure this ISN'T a post group ;) + $request = db_query(" + SELECT ID_GROUP AS id, groupName AS name, minPosts = -1 AS assignable + FROM {$db_prefix}membergroups + WHERE ID_GROUP = $_REQUEST[id] + LIMIT 1", __FILE__, __LINE__); + // Not really possible... + if (mysql_num_rows($request) == 0) + fatal_lang_error(1); + $context['group'] = mysql_fetch_assoc($request); + mysql_free_result($request); + + if ($context['group']['id'] == 1 && !allowedTo('admin_forum')) + $context['group']['assignable'] = 0; + + // Changing members in this group? + if (isset($_POST['sc']) && $context['group']['assignable'] && $_REQUEST['id'] != 3) + { + checkSession(); + + // Removing member from group? + if (isset($_POST['remove']) && isset($_REQUEST['rem'])) + { + $members = array(); + foreach ($_REQUEST['rem'] AS $remove => $dummy) + $members[] = (int) $remove; + + // First, reset those who have this as their primary group - this is the easy one. + db_query(" + UPDATE {$db_prefix}members + SET ID_GROUP = 0 + WHERE ID_GROUP = $_REQUEST[id] + AND ID_MEMBER IN (" . implode(', ', $members) . ") + LIMIT " . count($members), __FILE__, __LINE__); + + // Those who have it as part of their additional group must be updated the long way... sadly. + $request = db_query(" + SELECT ID_MEMBER, additionalGroups + FROM {$db_prefix}members + WHERE FIND_IN_SET($_REQUEST[id], additionalGroups) + AND ID_MEMBER IN (" . implode(', ', $members) . ") + LIMIT " . count($members), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $tempGroup = array_flip(explode(',', $row['additionalGroups'])); + unset($tempGroup[$_REQUEST['id']]); + $tempGroup = implode(',', array_flip($tempGroup)); + + // Do the update for this member - this may be slow for lots of people... but how many you really do at once? + db_query(" + UPDATE {$db_prefix}members + SET additionalGroups = '$tempGroup' + WHERE ID_MEMBER = $row[ID_MEMBER] + LIMIT 1", __FILE__, __LINE__); + } + mysql_free_result($request); + } + // Must be adding... + elseif (isset($_REQUEST['add']) && !empty($_REQUEST['toAdd'])) + { + // Get all the members to be added... taking into account names can be quoted ;) + $_REQUEST['toAdd'] = strtr(un_htmlspecialchars($_REQUEST['toAdd']), array('\\"' => '"')); + + preg_match_all('~"([^"]+)"~', $_REQUEST['toAdd'], $matches); + $memberQuery = array_unique(array_merge($matches[1], explode(',', preg_replace('~"([^"]+)"~', '', $_REQUEST['toAdd'])))); + + foreach ($memberQuery as $index => $member) + { + if (strlen(trim($member)) > 0) + $memberQuery[$index] = strtolower(trim($member)); + else + unset($memberQuery[$index]); + } + + $request = db_query(" + SELECT ID_MEMBER, ID_GROUP, additionalGroups + FROM {$db_prefix}members + WHERE memberName IN ('" . implode("', '", $memberQuery) . "')", __FILE__, __LINE__); + + // Reset the query array and we'll use it to update the members. + $memberQuery = array( + 'main_group' => array(), + 'additional' => array() + ); + + while ($row = mysql_fetch_assoc($request)) + { + // Verify that they are not already a member - and add them to our array. + if ($row['ID_GROUP'] != $_REQUEST['id'] && !in_array($_REQUEST['id'], explode(',', $row['additionalGroups']))) + $memberQuery[$row['ID_GROUP'] == 0 ? 'main_group' : 'additional'][] = $row['ID_MEMBER']; + } + mysql_free_result($request); + + // Do the updates... + if (!empty($memberQuery['main_group'])) + db_query(" + UPDATE {$db_prefix}members + SET ID_GROUP = $_REQUEST[id] + WHERE ID_MEMBER IN (" . implode(', ', $memberQuery['main_group']) . ") + LIMIT " . count($memberQuery['main_group']), __FILE__, __LINE__); + + // This one is more complicated! + if (!empty($memberQuery['additional'])) + { + db_query(" + UPDATE {$db_prefix}members + SET additionalGroups = IF(additionalGroups = '', '$_REQUEST[id]', CONCAT(additionalGroups, ',$_REQUEST[id]')) + WHERE ID_MEMBER IN (" . implode(', ', $memberQuery['additional']) . ") + LIMIT " . count($memberQuery['additional']), __FILE__, __LINE__); + } + } + } + // Sort out the sorting! + $sort_methods = array( + 'name' => 'realName', + 'email' => 'emailAddress', + 'active' => 'lastLogin', + 'registered' => 'dateRegistered', + 'posts' => 'posts', + ); + + // They didn't pick one, default to by name.. + if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']])) + { + $context['sort_by'] = 'name'; + $querySort = 'realName'; + } + // Otherwise default to ascending. + else + { + $context['sort_by'] = $_REQUEST['sort']; + $querySort = $sort_methods[$_REQUEST['sort']]; + } + + $context['sort_direction'] = isset($_REQUEST['desc']) ? 'down' : 'up'; + + // Count members of the group. + $request = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}members + WHERE " . ($context['group']['assignable'] ? "ID_GROUP = $_REQUEST[id] OR FIND_IN_SET($_REQUEST[id], additionalGroups)" : "ID_POST_GROUP = $_REQUEST[id]"), __FILE__, __LINE__); + list ($context['total_members']) = mysql_fetch_row($request); + mysql_free_result($request); + + // Create the page index. + $context['page_index'] = constructPageIndex($scripturl . '?action=membergroups;sa=members;id=' . $_REQUEST['id'] . ';sort=' . $context['sort_by'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $context['start'], $context['total_members'], $modSettings['defaultMaxMembers']); + + // Load up all members of this group. + $request = db_query(" + SELECT ID_MEMBER, realName, memberName, emailAddress, memberIP, dateRegistered, lastLogin, posts + FROM {$db_prefix}members + WHERE " . ($context['group']['assignable'] ? "ID_GROUP = $_REQUEST[id] OR FIND_IN_SET($_REQUEST[id], additionalGroups)" : "ID_POST_GROUP = $_REQUEST[id]") . " + ORDER BY $querySort " . ($context['sort_direction'] == 'down' ? 'DESC' : 'ASC') . " + LIMIT $context[start], $modSettings[defaultMaxMembers]", __FILE__, __LINE__); + $context['members'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['members'][] = array( + 'id' => $row['ID_MEMBER'], + 'name' => '' . $row['realName'] . '', + 'email' => '' . $row['emailAddress'] . '', + 'ip' => '' . $row['memberIP'] . '', + 'registered' => timeformat($row['dateRegistered']), + 'last_online' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']), + 'posts' => $row['posts'], + ); + mysql_free_result($request); + + // Select the template. + $context['sub_template'] = 'group_members'; + $context['page_title'] = $txt['membergroups_members_title'] . ': ' . $context['group']['name']; +} + +// View all members. +function ViewMembers() +{ + global $txt, $scripturl, $db_prefix, $context, $modSettings; + + isAllowedTo('moderate_forum'); + + // Administration bar, I choose you! + adminIndex('view_members'); + loadTemplate('ManageMembers'); + loadLanguage('ManageMembers'); + + $allowed_sub_actions = array('all', 'search', 'query', 'delete'); + + // Set default sub action. + $context['sub_action'] = empty($_REQUEST['sa']) || !in_array($_REQUEST['sa'], $allowed_sub_actions) ? 'all' : $_REQUEST['sa']; + + if ($context['sub_action'] == 'delete' && allowedTo('profile_remove_any')) + { + checkSession(); + + // Delete all the selected members. + deleteMembers(array_keys($_POST['delete'])); + + // Update the latest member... + updateStats('member'); + + // Switch to 'view all members'. + $context['sub_action'] = 'all'; + } + + // Retrieve the membergroups and postgroups. + if (in_array($context['sub_action'], array('search', 'query'))) + { + $context['membergroups'] = array( + array( + 'id' => 0, + 'name' => $txt['membergroups_members'], + 'can_be_additional' => false + ) + ); + $context['postgroups'] = array(); + $request = db_query(" + SELECT ID_GROUP, groupName, minPosts + FROM {$db_prefix}membergroups + WHERE ID_GROUP != 3 + ORDER BY minPosts, IF(ID_GROUP < 4, ID_GROUP, 4), groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if ($row['minPosts'] == -1) + $context['membergroups'][] = array( + 'id' => $row['ID_GROUP'], + 'name' => $row['groupName'], + 'can_be_additional' => true + ); + else + $context['postgroups'][] = array( + 'id' => $row['ID_GROUP'], + 'name' => $row['groupName'] + ); + } + } + + // Check input after a member search has been submitted. + if ($context['sub_action'] == 'query' && empty($_REQUEST['params'])) + { + // Some data about the form fields and how they are linked to the database. + $params = array( + 'mem_id' => array( + 'db_fields' => array('ID_MEMBER'), + 'type' => 'int', + 'range' => true + ), + 'age' => array( + 'db_fields' => array('birthdate'), + 'type' => 'age', + 'range' => true + ), + 'posts' => array( + 'db_fields' => array('posts'), + 'type' => 'int', + 'range' => true + ), + 'reg_date' => array( + 'db_fields' => array('dateRegistered'), + 'type' => 'date', + 'range' => true + ), + 'last_online' => array( + 'db_fields' => array('lastLogin'), + 'type' => 'date', + 'range' => true + ), + 'gender' => array( + 'db_fields' => array('gender'), + 'type' => 'checkbox', + 'values' => array('0', '1', '2'), + ), + 'activated' => array( + 'db_fields' => array('is_activated'), + 'type' => 'checkbox', + 'values' => array('0', '1'), + ), + 'membername' => array( + 'db_fields' => array('memberName', 'realName'), + 'type' => 'string' + ), + 'email' => array( + 'db_fields' => array('emailAddress'), + 'type' => 'string' + ), + 'website' => array( + 'db_fields' => array('websiteTitle', 'websiteUrl'), + 'type' => 'string' + ), + 'location' => array( + 'db_fields' => array('location'), + 'type' => 'string' + ), + 'ip' => array( + 'db_fields' => array('memberIP'), + 'type' => 'string' + ), + 'messenger' => array( + 'db_fields' => array('ICQ', 'AIM', 'YIM', 'MSN'), + 'type' => 'string' + ) + ); + $range_trans = array( + '--' => '<', + '-' => '<=', + '=' => '=', + '+' => '>=', + '++' => '>' + ); + + // Loop through every field of the form. + $query_parts = array(); + foreach ($params as $param_name => $param_info) + { + // Not filled in? + if (!isset($_POST[$param_name]) || $_POST[$param_name] == '') + continue; + + // Make sure numeric values are really numeric. + if (in_array($param_info['type'], array('int', 'age'))) + $_POST[$param_name] = (int) $_POST[$param_name]; + // Date values have to match the specified format. + elseif ($param_info['type'] == 'date') + { + // Check if this date format is valid. + if (!preg_match('/^\d{4}-\d{1,2}-\d{1,2}$/', $_POST[$param_name])) + continue; + + // Add quotes for the database. + $_POST[$param_name] = strtotime($_POST[$param_name]); + } + + // Those values that are in some kind of range (<, <=, =, >=, >). + if (!empty($param_info['range'])) + { + // Default to '=', just in case... + if (empty($range_trans[$_POST['types'][$param_name]])) + $_POST['types'][$param_name] = '='; + + // Handle special case 'age'. + if ($param_info['type'] == 'age') + { + // All people that were born between $lowerlimit and $upperlimit are currently the specified age. + $datearray = getdate(forum_time()); + $upperlimit = str_pad($datearray['year'] - $_POST[$param_name], 4, '0') . '-' . str_pad($datearray['mon'], 2, '0', STR_PAD_LEFT) . '-' . str_pad($datearray['mday'], 2, '0', STR_PAD_LEFT); + $lowerlimit = str_pad($datearray['year'] - $_POST[$param_name] - 1, 4, '0') . '-' . str_pad($datearray['mon'], 2, '0', STR_PAD_LEFT) . '-' . str_pad($datearray['mday'], 2, '0', STR_PAD_LEFT); + if (in_array($_POST['types'][$param_name], array('-', '--', '='))) + $query_parts[] = "{$param_info['db_fields'][0]} > '" . ($_POST['types'][$param_name] == '--' ? $upperlimit : $lowerlimit) . "'"; + if (in_array($_POST['types'][$param_name], array('+', '++', '='))) + { + $query_parts[] = "{$param_info['db_fields'][0]} <= '" . ($_POST['types'][$param_name] == '++' ? $lowerlimit : $upperlimit) . "'"; + + // Make sure that members that didn't set their birth year are not queried. + $query_parts[] = "{$param_info['db_fields'][0]} > '0000-12-31'"; + } + } + else + $query_parts[] = $param_info['db_fields'][0] . ' ' . $range_trans[$_POST['types'][$param_name]] . ' ' . $_POST[$param_name]; + } + // Checkboxes. + elseif ($param_info['type'] == 'checkbox') + { + // Each checkbox or no checkbox at all is checked -> ignore. + if (!is_array($_POST[$param_name]) || count($_POST[$param_name]) == 0 || count($_POST[$param_name]) == count($param_info['values'])) + continue; + + $query_parts[] = "{$param_info['db_fields'][0]} IN ('" . implode("', '", $_POST[$param_name]) . "')"; + } + else + { + // Replace the wildcard characters ('*' and '?') into MySQL ones. + $_POST[$param_name] = strtolower(addslashes(strtr($_POST[$param_name], array('%' => '\%', '_' => '\_', '*' => '%', '?' => '_')))); + + $query_parts[] = '(' . implode(" LIKE '%{$_POST[$param_name]}%' OR ", $param_info['db_fields']) . " LIKE '%{$_POST[$param_name]}%')"; + } + } + + // Set up the membergroup query part. + $mg_query_parts = array(); + + // Primary membergroups, but only if at least was was not selected. + if (!empty($_POST['membergroups'][1]) && count($context['membergroups']) != count($_POST['membergroups'][1])) + $mg_query_parts[] = "ID_GROUP IN (" . implode(", ", $_POST['membergroups'][1]) . ")"; + + // Additional membergroups (these are only relevant if not all primary groups where selected!). + if (!empty($_POST['membergroups'][2]) && (empty($_POST['membergroups'][1]) || count($context['membergroups']) != count($_POST['membergroups'][1]))) + foreach ($_POST['membergroups'][2] as $mg) + $mg_query_parts[] = "FIND_IN_SET(" . (int) $mg . ", additionalGroups)"; + + // Combine the one or two membergroup parts into one query part linked with an OR. + if (!empty($mg_query_parts)) + $query_parts[] = '(' . implode(' OR ', $mg_query_parts) . ')'; + + // Get all selected post count related membergroups. + if (!empty($_POST['postgroups']) && count($_POST['postgroups']) != count($context['postgroups'])) + $query_parts[] = "ID_POST_GROUP IN (" . implode(", ", $_POST['postgroups']) . ")"; + + // Construct the where part of the query. + $where = empty($query_parts) ? '1' : implode(' + AND ', $query_parts); + } + // If the query information was already packed in the URL, decode it. + elseif ($context['sub_action'] == 'query') + $where = base64_decode($_REQUEST['params']); + + // Construct the additional URL part with the query info in it. + $context['params_url'] = $context['sub_action'] == 'query' ? ';sa=query;params=' . base64_encode($where) : ''; + + // Get the title and sub template ready.. + $context['page_title'] = $txt[9]; + $context['sub_template'] = 'view_members'; + + // Determine whether to show the 'delete members' checkboxes. + $context['can_delete_members'] = allowedTo('profile_remove_any'); + + // All the columns they have to pick from... + $context['columns'] = array( + 'ID_MEMBER' => array('label' => $txt['member_id']), + 'memberName' => array('label' => $txt[35]), + 'realName' => array('label' => $txt['display_name']), + 'emailAddress' => array('label' => $txt['email_address']), + 'memberIP' => array('label' => $txt['ip_address']), + 'lastLogin' => array('label' => $txt['viewmembers_online']), + 'posts' => array('label' => $txt[26]) + ); + + // Default sort column to 'memberName' if the current one is unknown or not set. + if (!isset($_REQUEST['sort']) || !array_key_exists($_REQUEST['sort'], $context['columns'])) + $_REQUEST['sort'] = 'memberName'; + + // Provide extra information about each column - the link, whether it's selected, etc. + foreach ($context['columns'] as $col => $dummy) + { + $context['columns'][$col]['href'] = $scripturl . '?action=viewmembers' . $context['params_url'] . ';sort=' . $col . ';start=0'; + if (!isset($_REQUEST['desc']) && $col == $_REQUEST['sort']) + $context['columns'][$col]['href'] .= ';desc'; + + $context['columns'][$col]['link'] = '' . $context['columns'][$col]['label'] . ''; + $context['columns'][$col]['selected'] = $_REQUEST['sort'] == $col; + } + + $context['sort_by'] = $_REQUEST['sort']; + $context['sort_direction'] = !isset($_REQUEST['desc']) ? 'down' : 'up'; + + // Calculate the number of results. + if (empty($where) or $where == '1') + $num_members = $modSettings['memberCount']; + else + { + $request = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}members + WHERE $where", __FILE__, __LINE__); + list ($num_members) = mysql_fetch_row($request); + } + + // Construct the page links. + $context['page_index'] = constructPageIndex($scripturl . '?action=viewmembers' . $context['params_url'] . ';sort=' . $_REQUEST['sort'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $_REQUEST['start'], $num_members, $modSettings['defaultMaxMembers']); + $context['start'] = $_REQUEST['start']; + + $request = db_query(" + SELECT + ID_MEMBER, memberName, realName, emailAddress, memberIP, IFNULL(lastLogin, 0) AS lastLogin, posts + FROM {$db_prefix}members" . ($context['sub_action'] == 'query' && !empty($where) ? " + WHERE $where" : '') . " + ORDER BY $_REQUEST[sort]" . (!isset($_REQUEST['desc']) ? '' : ' DESC') . " + LIMIT $_REQUEST[start], $modSettings[defaultMaxMembers]", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + // Calculate number of days since last online. + if (empty($row['lastLogin'])) + $difference = $txt['never']; + else + { + // Today or some time ago? + $difference = jeffsdatediff($row['lastLogin']); + if (empty($difference)) + $difference = $txt['viewmembers_today']; + elseif ($difference == 1) + $difference .= ' ' . $txt['viewmembers_day_ago']; + else + $difference .= ' ' . $txt['viewmembers_days_ago']; + } + + $context['members'][] = array( + 'id' => $row['ID_MEMBER'], + 'username' => $row['memberName'], + 'name' => $row['realName'], + 'email' => $row['emailAddress'], + 'ip' => $row['memberIP'], + 'last_active' => $difference, + 'posts' => $row['posts'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '' + ); + } + mysql_free_result($request); +} + +function jeffsdatediff($old) +{ + // Get the current time as the user would see it. + $forumTime = forum_time(); + + // Calculate the seconds that have passed since midnight. + $sinceMidnight = date('H', $forumTime) * 60 * 60 + date('i', $forumTime) * 60 + date('s', $forumTime); + + // Take the difference between the two times. + $dis = time() - $old; + + // Before midnight? + if ($dis < $sinceMidnight) + return 0; + else + $dis -= $sinceMidnight; + + // Divide out the seconds in a day to get the number of days. + return ceil($dis / (24 * 60 * 60)); +} + +function submitSpammer($users) +{ + global $db_prefix, $sourcedir, $modSettings, $ID_MEMBER; + + // If it's not an array, make it so! + if (!is_array($users)) + $users = array($users); + else + $users = array_unique($users); + + if (empty($users)) { + return; + } elseif (count($users) == 1) { + list ($user) = $users; + $condition = '= ' . $user; + } else { + $condition = 'IN (' . implode(',', $users) . ')'; + } + + $res = db_query( + "SELECT memberName, emailAddress, memberIP + FROM {$db_prefix}members WHERE ID_MEMBER $condition", + __FILE__, __LINE__); + + if ($res === FALSE) { + return; + } + + while ($user = mysql_fetch_assoc($res)) { + if ($user === FALSE) continue; + actuallySubmitSpammer( + $user['memberName'], + $user['emailAddress'], + $user['memberIP']); + } +} + + +function actuallySubmitSpammer($_username, $_email, $_ipaddr) +{ +$ch = curl_init(); + +curl_setopt($ch, CURLOPT_URL, "http://www.stopforumspam.com/add"); +curl_setopt($ch, CURLOPT_POST, 1); +curl_setopt($ch, CURLOPT_POSTFIELDS, array( + 'username' => $_username, + 'email' => $_email, + 'ip_addr' => $_ipaddr, + 'api_key' => 'jk192x8p4GAmbY')); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + +curl_exec($ch); +curl_close($ch); +} + + + +// Delete a group of/single member. +function deleteMembers($users) +{ + global $db_prefix, $sourcedir, $modSettings, $ID_MEMBER; + + // If it's not an array, make it so! + if (!is_array($users)) + $users = array($users); + else + $users = array_unique($users); + + // How many are they deleting? + if (empty($users)) + return; + elseif (count($users) == 1) + { + list ($user) = $users; + $condition = '= ' . $user; + + if ($user == $ID_MEMBER) + isAllowedTo('profile_remove_own'); + else + isAllowedTo('profile_remove_any'); + } + else + { + $condition = 'IN (' . implode(',', $users) . ')'; + + // Deleting more than one? You can't have more than once account... + isAllowedTo('profile_remove_any'); + + // Log the action while we are here. + foreach ($users as $user) + logAction('delete_member', array('member' => $user)); + } + + // Make these peoples' posts guest posts. + db_query(" + UPDATE {$db_prefix}messages + SET ID_MEMBER = 0" . (!empty($modSettings['allow_hideEmail']) ? ", posterEmail = ''" : '') . " + WHERE ID_MEMBER $condition", __FILE__, __LINE__); + + // Delete the member. + db_query(" + DELETE FROM {$db_prefix}members + WHERE ID_MEMBER $condition + LIMIT " . count($users), __FILE__, __LINE__); + + // Delete the logs... + db_query(" + DELETE FROM {$db_prefix}log_topics + WHERE ID_MEMBER $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_boards + WHERE ID_MEMBER $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_mark_read + WHERE ID_MEMBER $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_notify + WHERE ID_MEMBER $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_online + WHERE ID_MEMBER $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}collapsed_categories + WHERE ID_MEMBER $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}themes + WHERE ID_MEMBER $condition", __FILE__, __LINE__); + + // Delete personal messages. + require_once($sourcedir . '/InstantMessage.php'); + deleteMessages(null, null, $users); + + db_query(" + UPDATE {$db_prefix}instant_messages + SET ID_MEMBER_FROM = 0 + WHERE ID_MEMBER_FROM $condition", __FILE__, __LINE__); + + // Delete the moderator positions. + db_query(" + DELETE FROM {$db_prefix}moderators + WHERE ID_MEMBER $condition", __FILE__, __LINE__); + + // Make sure no member's birthday is still sticking in the calendar... + updateStats('calendar'); + updateStats('member'); +} + +// Email your members... +function MailingList() +{ + global $txt, $db_prefix, $sourcedir, $context; + global $scripturl, $modSettings, $user_info; + + isAllowedTo('send_mail'); + + // Load the admin bar, select 'Email Your Members'.. + adminIndex('email_members'); + + // Just came here.... + if (!isset($_REQUEST['sa'])) + { + loadTemplate('ManageMembers'); + $context['page_title'] = $txt[6]; + + $context['sub_template'] = 'email_members'; + + $context['groups'] = array(); + + // Get all the extra groups as well as Administrator and Global Moderator. + $request = db_query(" + SELECT mg.ID_GROUP, mg.groupName, COUNT(mem.ID_MEMBER) AS num_members + FROM {$db_prefix}membergroups AS mg + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_GROUP = mg.ID_GROUP OR FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR mg.ID_GROUP = mem.ID_POST_GROUP) + GROUP BY mg.ID_GROUP + ORDER BY mg.minPosts, IF(mg.ID_GROUP < 4, mg.ID_GROUP, 4), mg.groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $context['groups'][$row['ID_GROUP']] = array( + 'id' => $row['ID_GROUP'], + 'name' => $row['groupName'], + 'member_count' => $row['num_members'], + ); + } + mysql_free_result($request); + + // Any moderators? + $request = db_query(" + SELECT COUNT(DISTINCT ID_MEMBER) AS num_distinct_mods + FROM {$db_prefix}moderators + LIMIT 1", __FILE__, __LINE__); + list ($context['groups'][3]['member_count']) = mysql_fetch_row($request); + mysql_free_result($request); + + $context['can_send_pm'] = allowedTo('pm_send'); + + return; + } + // Sending! + elseif ($_REQUEST['sa'] == 'send2') + { + checkSession(); + + require_once($sourcedir . '/Subs-Post.php'); + + // Get all the receivers. + $addressed = explode(';', $_POST['emails']); + $cleanlist = array(); + foreach ($addressed as $curmem) + { + $curmem = trim($curmem); + if ($curmem != '') + $cleanlist[$curmem] = $curmem; + } + + // Prepare the message for HTML. + if (isset($_POST['send_html']) && isset($_POST['parse_html'])) + $_POST['message'] = str_replace(array("\n", ' '), array("
\n", '  '), stripslashes($_POST['message'])); + elseif (!isset($_POST['send_html'])) + $_POST['message'] = stripslashes($_POST['message']); + + // Use the default time format. + $user_info['time_format'] = $modSettings['time_format']; + + $variables = array( + '{$board_url}', + '{$current_time}', + '{$latest_member.link}', + '{$latest_member.id}', + '{$latest_member.name}' + ); + + // Replace in all the standard things. + $_POST['message'] = str_replace($variables, + array( + isset($_POST['send_html']) ? '' . $scripturl . '' : $scripturl, + timeformat(forum_time(), false), + isset($_POST['send_html']) ? '' . $modSettings['latestRealName'] . '' : $modSettings['latestRealName'], + $modSettings['latestMember'], + $modSettings['latestRealName'] + ), $_POST['message']); + $_POST['subject'] = str_replace($variables, + array( + $scripturl, + timeformat(forum_time(), false), + $modSettings['latestRealName'], + $modSettings['latestMember'], + $modSettings['latestRealName'] + ), stripslashes($_POST['subject'])); + + $from_member = array( + '{$member.email}', + '{$member.link}', + '{$member.id}', + '{$member.name}' + ); + + // This is here to prevent spam filters from tagging this as spam. + if (isset($_POST['send_html']) && preg_match('~\' . $_POST['message'] . ''; + else + $_POST['message'] = '' . $_POST['message'] . ''; + } + + $result = db_query(" + SELECT realName, memberName, ID_MEMBER, emailAddress + FROM {$db_prefix}members + WHERE emailAddress IN ('" . implode("', '", $cleanlist) . "')", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + unset($cleanlist[$row['emailAddress']]); + + $to_member = array( + $row['emailAddress'], + isset($_POST['send_html']) ? '' . $row['realName'] . '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + $row['ID_MEMBER'], + $row['realName'] + ); + + // Send the actual email off, replacing the member dependent variables. + sendmail($row['emailAddress'], str_replace($from_member, $to_member, $_POST['subject']), str_replace($from_member, $to_member, $_POST['message']), null, isset($_POST['send_html'])); + } + mysql_free_result($result); + + // Send the emails to people who weren't members.... + if (!empty($cleanlist)) + foreach ($cleanlist as $email) + { + $to_member = array( + $email, + !empty($_POST['send_html']) ? '' . $email . '' : $email, + '??', + $email + ); + + sendmail($email, str_replace($from_member, $to_member, $_POST['subject']), str_replace($from_member, $to_member, $_POST['message']), null, !empty($_POST['send_html'])); + } + + redirectexit('action=admin'); + } + + checkSession(); + + $list = array(); + $do_pm = !empty($_POST['sendPM']); + + // Opt-out? + $condition = isset($_POST['email_force']) ? '' : ' + AND mem.notifyAnnouncements = 1'; + + // Did they select moderators too? + if (!empty($_POST['who']) && in_array(3, $_POST['who'])) + { + $request = db_query(" + SELECT DISTINCT " . ($do_pm ? 'mem.memberName' : 'mem.emailAddress') . " AS identifier + FROM {$db_prefix}members AS mem, {$db_prefix}moderators AS mods + WHERE mem.ID_MEMBER = mods.ID_MEMBER$condition", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $list[] = $row['identifier']; + mysql_free_result($request); + + unset($_POST['who'][3]); + } + + // Load all the other groups. + if (!empty($_POST['who'])) + { + $request = db_query(" + SELECT " . ($do_pm ? 'mem.memberName' : 'mem.emailAddress') . " AS identifier + FROM {$db_prefix}members AS mem, {$db_prefix}membergroups AS mg + WHERE (mg.ID_GROUP = mem.ID_GROUP OR FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR mg.ID_GROUP = mem.ID_POST_GROUP) + AND mg.ID_GROUP IN (" . implode(',', $_POST['who']) . ")$condition", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $list[] = $row['identifier']; + mysql_free_result($request); + } + + // Tear out duplicates.... + $list = array_unique($list); + + // Sending as a personal message? + if ($do_pm) + { + require_once($sourcedir . '/InstantMessage.php'); + require_once($sourcedir . '/Subs-Post.php'); + $_REQUEST['bcc'] = implode(',', $list); + MessagePost(); + } + else + { + loadTemplate('ManageMembers'); + + $context['page_title'] = $txt[6]; + + // Just send the to list to the template. + $context['addresses'] = implode('; ', $list); + $context['default_subject'] = $context['forum_name'] . ': ' . $txt[70]; + $context['default_message'] = $txt[72] . "\n\n" . $txt[130] . "\n\n{\$board_url}"; + + $context['sub_template'] = 'email_members_compose'; + } +} + +// Ban center. +function Ban() +{ + global $context, $txt; + + isAllowedTo('manage_bans'); + + // Boldify "Ban Members" on the admin bar. + adminIndex('ban_members'); + + loadTemplate('ManageMembers'); + + $subActions = array( + 'add' => 'BanEdit', + 'edit' => 'BanEdit', + 'list' => 'BanList', + 'log' => 'BanLog', + 'save' => 'BanSave', + ); + + // Default the sub-action to 'view ban list'. + $_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'list'; + + $context['page_title'] = &$txt['ban_title']; + $context['sub_action'] = $_REQUEST['sa']; + + // Call the right function for this sub-acton. + $subActions[$_REQUEST['sa']](); +} + +// Ban list +function BanList() +{ + global $txt, $db_prefix, $context, $ban_request, $scripturl; + + // Delete expired bans, the're useless! + db_query(" + DELETE FROM {$db_prefix}banned + WHERE expire_time < " . time(), __FILE__, __LINE__); + + // User pressed the 'remove selection button'. + if (!empty($_POST['removeBans']) && !empty($_POST['remove']) && is_array($_POST['remove'])) + { + checkSession(); + + // Make sure every entry is a proper integer. + foreach ($_POST['remove'] as $index => $ban_id) + $_POST['remove'][(int) $index] = (int) $ban_id; + $_POST['remove'] = array_unique($_POST['remove']); + + db_query(" + DELETE FROM {$db_prefix}banned + WHERE ID_BAN IN (" . implode(', ', $_POST['remove']) . ') + LIMIT ' . count($_POST['remove']), __FILE__, __LINE__); + } + + $sort_methods = array( + 'type' => array( + 'down' => 'ban.ban_type ASC, ban.hostname ASC, ban.email_address ASC, mem.realName ASC, ban.ip_low1 ASC, ban.ip_low2 ASC, ban.ip_low3 ASC, ban.ip_low4 ASC', + 'up' => 'ban.ban_type DESC, ban.hostname DESC, ban.email_address DESC, mem.realName DESC, ban.ip_low1 DESC, ban.ip_low2 DESC, ban.ip_low3 DESC, ban.ip_low4 DESC' + ), + 'reason' => array( + 'down' => 'LENGTH(ban.reason) > 0 DESC, ban.reason ASC', + 'up' => 'LENGTH(ban.reason) > 0 ASC, ban.reason DESC' + ), + 'notes' => array( + 'down' => 'LENGTH(ban.notes) > 0 DESC, ban.notes ASC', + 'up' => 'LENGTH(ban.notes) > 0 ASC, ban.notes DESC' + ), + 'restriction' => array( + 'down' => 'ban.restriction_type ASC', + 'up' => 'ban.restriction_type DESC' + ), + 'expires' => array( + 'down' => 'ISNULL(ban.expire_time) DESC, ban.expire_time DESC', + 'up' => 'ISNULL(ban.expire_time) ASC, ban.expire_time ASC' + ) + ); + + $context['columns'] = array( + 'type' => array( + 'width' => '10%', + 'label' => &$txt['ban_type'], + 'sortable' => true + ), + 'reason' => array( + 'width' => '25%', + 'label' => &$txt['ban_reason'], + 'sortable' => true + ), + 'notes' => array( + 'width' => '25%', + 'label' => &$txt['ban_notes'], + 'sortable' => true + ), + 'restriction' => array( + 'label' => &$txt['ban_restriction'], + 'sortable' => true + ), + 'expires' => array( + 'label' => &$txt['ban_expires'], + 'sortable' => true + ), + 'actions' => array( + 'label' => &$txt['ban_actions'], + 'sortable' => false + ) + ); + + if (!isset($_REQUEST['sort']) || !array_key_exists($_REQUEST['sort'], $sort_methods)) + $_REQUEST['sort'] = 'type'; + + foreach ($context['columns'] as $col => $dummy) + { + $context['columns'][$col]['selected'] = $col == $_REQUEST['sort']; + $context['columns'][$col]['href'] = $scripturl . '?action=ban;sort=' . $col; + + if (!isset($_REQUEST['desc']) && $col == $_REQUEST['sort']) + $context['columns'][$col]['href'] .= ';desc'; + + $context['columns'][$col]['link'] = '' . $context['columns'][$col]['label'] . ''; + } + + $context['sort_by'] = $_REQUEST['sort']; + $context['sort_direction'] = !isset($_REQUEST['desc']) ? 'down' : 'up'; + + // Get the total amount of entries. + $request = db_query(" + SELECT COUNT(ID_BAN) + FROM {$db_prefix}banned", __FILE__, __LINE__); + list ($totalBans) = mysql_fetch_row($request); + mysql_free_result($request); + + // Create the page index. + $context['start'] = $_REQUEST['start']; + $context['page_index'] = constructPageIndex($scripturl . '?action=ban;sort=' . $_REQUEST['sort'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $context['start'], $totalBans, 20); + + // Get the banned values. + $ban_request = db_query(" + SELECT + ban.ID_BAN, ban.ban_type, + ban.ip_low1, ban.ip_high1, ban.ip_low2, ban.ip_high2, ban.ip_low3, ban.ip_high3, ban.ip_low4, ban.ip_high4, + ban.hostname, ban.email_address, ban.ID_MEMBER, ban.ban_time, ban.expire_time, ban.restriction_type, + ban.reason, ban.notes, + IFNULL(mem.memberName, ban.ID_MEMBER) AS memberName, IFNULL(mem.realName, ban.ID_MEMBER) AS realName + FROM {$db_prefix}banned AS ban + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = ban.ID_MEMBER) + ORDER BY " . $sort_methods[$_REQUEST['sort']][$context['sort_direction']] . " + LIMIT $context[start], 20", __FILE__, __LINE__); + + // Set the correct sub-template. + $context['sub_template'] = 'ban_list'; + + // Set the value of the callback function. + $context['get_ban'] = 'getBanEntry'; +} + +// Call-back function for the template to retrieve a row of ban data. +function getBanEntry($reset = false) +{ + global $scripturl, $ban_request, $txt, $context; + + if ($ban_request == false) + return false; + + if (!($row = mysql_fetch_assoc($ban_request))) + return false; + + $output = array( + 'id' => $row['ID_BAN'], + 'type' => $row['ban_type'], + 'reason' => $row['reason'], + 'notes' => $row['notes'], + 'restriction' => $txt['ban_' . $row['restriction_type']], + 'expires' => $row['expire_time'] === null ? $txt['never'] : ceil(($row['expire_time'] - time()) / (60 * 60 * 24)) . ' ' . $txt['ban_days'], + ); + + if ($row['ban_type'] == 'ip_ban') + { + $low_ip = array($row['ip_low1'], $row['ip_low2'], $row['ip_low3'], $row['ip_low4']); + $high_ip = array($row['ip_high1'], $row['ip_high2'], $row['ip_high3'], $row['ip_high4']); + $output['ip'] = range2ip($low_ip, $high_ip); + } + elseif ($row['ban_type'] == 'hostname_ban') + $output['hostname'] = str_replace('%', '*', $row['hostname']); + elseif ($row['ban_type'] == 'email_ban') + $output['email'] = str_replace('%', '*', $row['email_address']); + elseif ($row['ban_type'] == 'user_ban') + $output['user'] = array( + 'name' => $row['memberName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '' + ); + + return $output; +} + +function BanEdit() +{ + global $txt, $db_prefix, $modSettings, $context, $ban_request, $scripturl; + + // If we're editing an existing ban, get it from the database. + if (!empty($_REQUEST['bid'])) + { + $request = db_query(" + SELECT + ban.ID_BAN, ban.ban_type, + ban.ip_low1, ban.ip_high1, ban.ip_low2, ban.ip_high2, ban.ip_low3, ban.ip_high3, ban.ip_low4, ban.ip_high4, + ban.hostname, ban.email_address, ban.ID_MEMBER, ban.ban_time, ban.expire_time, ban.restriction_type, + ban.reason, ban.notes, + IFNULL(mem.memberName, ban.ID_MEMBER) AS memberName, IFNULL(mem.realName, ban.ID_MEMBER) AS realName + FROM {$db_prefix}banned AS ban + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER=ban.ID_MEMBER) + WHERE ID_BAN = " . (int) $_REQUEST['bid'] . " + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('ban_not_found'); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + $context['ban'] = array( + 'id' => $row['ID_BAN'], + 'ip' => array( + 'value' => $row['ban_type'] == 'ip_ban' ? range2ip(array($row['ip_low1'], $row['ip_low2'], $row['ip_low3'], $row['ip_low4']), array($row['ip_high1'], $row['ip_high2'], $row['ip_high3'], $row['ip_high4'])) : '', + 'selected' => $row['ban_type'] == 'ip_ban' + ), + 'hostname' => array( + 'value' => $row['ban_type'] == 'hostname_ban' ? str_replace('%', '*', $row['hostname']) : '', + 'selected' => $row['ban_type'] == 'hostname_ban' + ), + 'email' => array( + 'value' => $row['ban_type'] == 'email_ban' ? str_replace('%', '*', $row['email_address']) : '', + 'selected' => $row['ban_type'] == 'email_ban' + ), + 'banneduser' => array( + 'value' => $row['ban_type'] == 'user_ban' ? $row['memberName'] : '', + 'selected' => $row['ban_type'] == 'user_ban' + ), + 'expiration' => array( + 'never' => $row['expire_time'] === null, + 'days' => $row['expire_time'] > time() ? floor($row['expire_time'] / 24 * 60 * 60) : 0 + ), + 'reason' => $row['reason'], + 'notes' => $row['notes'], + 'restriction' => $row['restriction_type'], + 'ban_days' => $row['expire_time'] === null ? 0 : ceil(($row['expire_time'] - time()) / (60 * 60 * 24)), + ); + } + // Not an existing one, then it's probably a new one. + else + { + $context['ban'] = array( + 'id' => 0, + 'ip' => array( + 'value' => '', + 'selected' => true + ), + 'hostname' => array( + 'value' => '', + 'selected' => false + ), + 'email' => array( + 'value' => '', + 'selected' => false + ), + 'banneduser' => array( + 'value' => '', + 'selected' => false + ), + 'expiration' => array( + 'never' => true, + 'days' => 1 + ), + 'reason' => '', + 'notes' => '', + 'restriction' => 'full_ban', + 'ban_days' => 1 + ); + + // Overwrite some of the default form values if a user ID was given. + if (!empty($_REQUEST['u'])) + { + $request = db_query(" + SELECT memberName, memberIP, emailAddress + FROM {$db_prefix}members + WHERE ID_MEMBER = " . (int) $_REQUEST['u'] . " + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + { + list ($context['ban']['banneduser']['value'], $context['ban']['ip']['value'], $context['ban']['email']['value']) = mysql_fetch_row($request); + if (preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $context['ban']['ip']['value']) && empty($modSettings['disableHostnameLookup'])) + $context['ban']['hostname']['value'] = @gethostbyaddr($context['ban']['ip']['value']); + } + } + } + + // Edit or add, they use the same template. + $context['sub_template'] = 'ban_edit'; +} + +function BanSave() +{ + global $db_prefix; + + // Make sure they CAN update the banning. + checkSession(); + + $newBan = empty($_POST['bid']); + + // Array for holding moderation log data. + $modlogInfo = array(); + + // Check ban type data and start the query to adjust/add the ban. + if ($_POST['bantype'] == 'ip_ban') + { + $ip_parts = ip2range($_POST['ip']); + if (count($ip_parts) != 4) + fatal_lang_error('invalid_ip'); + + if ($newBan) + { + $insert1 = 'ip_low1, ip_high1, ip_low2, ip_high2, ip_low3, ip_high3, ip_low4, ip_high4'; + $insert2 = $ip_parts[0]['low'] . ', ' . $ip_parts[0]['high'] . ', + ' . $ip_parts[1]['low'] . ', ' . $ip_parts[1]['high'] . ', + ' . $ip_parts[2]['low'] . ', ' . $ip_parts[2]['high'] . ', + ' . $ip_parts[3]['low'] . ', ' . $ip_parts[3]['high']; + } + else + $update = ' + ip_low1 = ' . $ip_parts[0]['low'] . ', ip_high1 = ' . $ip_parts[0]['high'] . ', + ip_low2 = ' . $ip_parts[1]['low'] . ', ip_high2 = ' . $ip_parts[1]['high'] . ', + ip_low3 = ' . $ip_parts[2]['low'] . ', ip_high3 = ' . $ip_parts[2]['high'] . ', + ip_low4 = ' . $ip_parts[3]['low'] . ', ip_high4 = ' . $ip_parts[3]['high'] . ', + hostname = NULL, email_address = NULL, ID_MEMBER = NULL'; + $modlogInfo['ip_range'] = $_POST['ip']; + } + elseif ($_POST['bantype'] == 'hostname_ban') + { + if (preg_match("/[^\w.\-*]/", $_POST['hostname'])) + fatal_lang_error('invalid_hostname'); + + // Replace the * wildcard by a MySQL compatible wildcard %. + $_POST['hostname'] = str_replace('*', '%', $_POST['hostname']); + if ($newBan) + { + $insert1 = 'hostname'; + $insert2 = "'$_POST[hostname]'"; + } + else + $update = " + ip_low1 = NULL, ip_high1 = NULL, + ip_low2 = NULL, ip_high2 = NULL, + ip_low3 = NULL, ip_high3 = NULL, + ip_low4 = NULL, ip_high4 = NULL, + hostname = '$_POST[hostname]', email_address = NULL, ID_MEMBER = NULL"; + $modlogInfo['hostname'] = $_POST['hostname']; + } + elseif ($_POST['bantype'] == 'email_ban') + { + if (preg_match("/[^\w.\-*@]/", $_POST['email'])) + fatal_lang_error('invalid_email'); + $_POST['email'] = strtolower(str_replace('*', '%', $_POST['email'])); + + // Check the user is not banning an admin. + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE (ID_GROUP = 1 OR FIND_IN_SET(1, additionalGroups)) + AND emailAddress = '$_POST[email]' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) != 0) + fatal_lang_error('no_ban_admin'); + mysql_free_result($request); + + if ($newBan) + { + $insert1 = 'email_address'; + $insert2 = "'$_POST[email]'"; + } + else + $update = " + ip_low1 = NULL, ip_high1 = NULL, + ip_low2 = NULL, ip_high2 = NULL, + ip_low3 = NULL, ip_high3 = NULL, + ip_low4 = NULL, ip_high4 = NULL, + hostname = NULL, email_address = '$_POST[email]', ID_MEMBER = NULL"; + $modlogInfo['email'] = $_POST['email']; + } + elseif ($_POST['bantype'] == 'user_ban') + { + $request = db_query(" + SELECT ID_MEMBER, (ID_GROUP = 1 OR FIND_IN_SET(1, additionalGroups)) + FROM {$db_prefix}members + WHERE memberName = '$_POST[banneduser]' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('invalid_username'); + list ($memberid, $isAdmin) = mysql_fetch_row($request); + mysql_free_result($request); + + if ($isAdmin) + fatal_lang_error('no_ban_admin'); + + if ($newBan) + { + $insert1 = 'ID_MEMBER'; + $insert2 = $memberid; + } + else + $update = " + ip_low1 = NULL, ip_high1 = NULL, + ip_low2 = NULL, ip_high2 = NULL, + ip_low3 = NULL, ip_high3 = NULL, + ip_low4 = NULL, ip_high4 = NULL, + hostname = NULL, email_address = NULL, ID_MEMBER = $memberid"; + $modlogInfo['member'] = $memberid; + } + else + fatal_lang_error('no_bantype_selected'); + + $_POST['reason'] = htmlspecialchars($_POST['reason'], ENT_QUOTES); + $_POST['notes'] = htmlspecialchars($_POST['notes'], ENT_QUOTES); + $_POST['notes'] = str_replace(array("\r", "\n", ' '), array('', '
', '  '), $_POST['notes']); + + if (!in_array($_POST['restriction'], array('full_ban', 'cannot_post', 'cannot_register'))) + fatal_lang_error('ban_unknown_restriction_type'); + + if (empty($_POST['expiration']) || ($_POST['expiration'] != 'never' && (int) $_POST['expire_date'] == 0)) + fatal_lang_error('invalid_expiration_date'); + + if ($newBan) + $result = db_query(" + INSERT INTO {$db_prefix}banned + ($insert1, ban_type, reason, notes, restriction_type, ban_time, expire_time) + VALUES ($insert2, '$_POST[bantype]', '$_POST[reason]', '$_POST[notes]', '$_POST[restriction]', " . time() . ", " . ($_POST['expiration'] == 'never' ? 'NULL' : time() + 24 * 60 * 60 * (int) $_POST['expire_date']) . ")", __FILE__, __LINE__); + else + $result = db_query(" + UPDATE {$db_prefix}banned + SET $update, ban_type = '$_POST[bantype]', reason = '$_POST[reason]', notes = '$_POST[notes]', restriction_type = '$_POST[restriction]', expire_time = " . ($_POST['expiration'] == 'never' ? 'NULL' : ($_POST['expire_date'] != $_POST['old_expire'] ? time() + 24 * 60 * 60 * (int) $_POST['expire_date'] : 'expire_time')) . " + WHERE ID_BAN = $_POST[bid] + LIMIT 1", __FILE__, __LINE__); + + // Log the ban into the moderation log. + logAction('ban', $modlogInfo + array( + 'new' => $newBan, + 'type' => $_POST['bantype'], + 'reason' => $_POST['reason'] + )); + + // Register the last modified date. + updateSettings(array('banLastUpdated' => time())); + + redirectexit('action=ban'); +} + +function BanLog() +{ + global $db_prefix, $scripturl, $context, $db_connection; + + $sort_columns = array( + 'name' => 'mem.realName', + 'ip' => 'lb.ip', + 'email' => 'lb.email', + 'date' => 'lb.logTime', + ); + + // The number of entries to show per page of the ban log. + $entries_per_page = 30; + + // Delete one or more entries. + if (!empty($_POST['removeAll']) || (!empty($_POST['removeSelected']) && !empty($_POST['remove']))) + { + checkSession(); + + // 'Delete all entries' button was pressed. + if (!empty($_POST['removeAll'])) + { + mysql_query(" + TRUNCATE {$db_prefix}log_banned", $db_connection); + + db_query(" + DELETE FROM {$db_prefix}log_banned", __FILE__, __LINE__); + } + + // 'Delte selection' button was pressed. + else + { + // Make sure every entry is integer. + foreach ($_POST['remove'] as $index => $log_id) + $_POST['remove'][$index] = (int) $log_id; + + db_query(" + DELETE FROM {$db_prefix}log_banned + WHERE ID_BAN_LOG IN (" . implode(', ', $_POST['remove']) . ')', __FILE__, __LINE__); + } + } + + // Count the total number of log entries. + $request = db_query(" + SELECT COUNT(ID_BAN_LOG) + FROM {$db_prefix}log_banned", __FILE__, __LINE__); + list ($num_ban_log_entries) = mysql_fetch_row($request); + mysql_free_result($request); + + // Set start if not already set. + $_REQUEST['start'] = empty($_REQUEST['start']) || $_REQUEST['start'] < 0 ? 0 : (int) $_REQUEST['start']; + + // Default to newest entries first. + if (empty($_REQUEST['sort']) || !isset($sort_columns[$_REQUEST['sort']])) + { + $_REQUEST['sort'] = 'date'; + $_REQUEST['desc'] = true; + } + + $context['sort_direction'] = isset($_REQUEST['desc']) ? 'down' : 'up'; + $context['sort'] = $_REQUEST['sort']; + $context['page_index'] = constructPageIndex($scripturl . '?action=ban;sa=log;sort=' . $context['sort'] . ($context['sort_direction'] == 'down' ? ';desc' : ''), $_REQUEST['start'], $num_ban_log_entries, $entries_per_page); + $context['start'] = $_REQUEST['start']; + + $request = db_query(" + SELECT lb.ID_BAN_LOG, lb.ID_MEMBER, IFNULL(lb.ip, '-') AS ip, IFNULL(lb.email, '-') AS email, lb.logTime, IFNULL(mem.realName, '') AS realName + FROM {$db_prefix}log_banned AS lb + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lb.ID_MEMBER) + ORDER BY " . $sort_columns[$context['sort']] . (isset($_REQUEST['desc']) ? ' DESC' : '') . " + LIMIT $_REQUEST[start], $entries_per_page", __FILE__, __LINE__); + + $context['log_entries'] = array(); + + while ($row = mysql_fetch_assoc($request)) + $context['log_entries'][] = array( + 'id' => $row['ID_BAN_LOG'], + 'member' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['realName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '', + ), + 'ip' => $row['ip'], + 'email' => $row['email'], + 'date' => timeformat($row['logTime']), + ); + + $context['sub_template'] = 'ban_log'; +} + +function range2ip($low, $high) +{ + if (count($low) != 4 || count($high) != 4) + return ''; + + $ip = array(); + for ($i = 0; $i < 4; $i++) + { + if ($low[$i] == $high[$i]) + $ip[$i] = $low[$i]; + elseif ($low[$i] == '0' && $high[$i] == '255') + $ip[$i] = '*'; + else + $ip[$i] = $low[$i] . '-' . $high[$i]; + } + + // Pretending is fun... the IP can't be this, so use it for 'unknown'. + if ($ip == array(255, 255, 255, 255)) + return 'unknown'; + + return implode('.', $ip); +} + +// Convert a single IP to a ranged IP. +function ip2range($fullip) +{ + // Pretend that 'unknown' is 255.255.255.255. (since that can't be an IP anyway.) + if ($fullip == 'unknown') + $fullip = '255.255.255.255'; + + $ip_parts = explode('.', $fullip); + $ip_array = array(); + + if (count($ip_parts) != 4) + return array(); + + for ($i = 0; $i < 4; $i++) + { + if ($ip_parts[$i] == '*') + $ip_array[$i] = array('low' => '0', 'high' => '255'); + elseif (preg_match('/^(\d{1,3})\-(\d{1,3})$/', $ip_parts[$i], $range)) + $ip_array[$i] = array('low' => $range[1], 'high' => $range[2]); + elseif (is_numeric($ip_parts[$i])) + $ip_array[$i] = array('low' => $ip_parts[$i], 'high' => $ip_parts[$i]); + } + + return $ip_array; +} + +// Set reserved names/words.... +function SetReserve() +{ + global $txt, $db_prefix, $context, $modSettings; + + isAllowedTo('moderate_forum'); + + // Select it on the admin bar. + adminIndex('edit_reserved_names'); + + loadTemplate('ManageMembers'); + + // Get the reserved word options and words. + $context['reserved_words'] = explode("\n", $modSettings['reserveNames']); + $context['reserved_word_options'] = array(); + $context['reserved_word_options']['match_word'] = $modSettings['reserveWord'] == '1'; + $context['reserved_word_options']['match_case'] = $modSettings['reserveCase'] == '1'; + $context['reserved_word_options']['match_user'] = $modSettings['reserveUser'] == '1'; + $context['reserved_word_options']['match_name'] = $modSettings['reserveName'] == '1'; + + // Ready the template...... + $context['sub_template'] = 'edit_reserved_words'; + $context['page_title'] = $txt[341]; +} + +function SetReserve2() +{ + global $db_prefix; + + // Only if you have proper permissions! + isAllowedTo('moderate_forum'); + checkSession(); + + // Set all the options.... + updateSettings(array( + 'reserveWord' => (isset($_POST['matchword']) ? '1' : '0'), + 'reserveCase' => (isset($_POST['matchcase']) ? '1' : '0'), + 'reserveUser' => (isset($_POST['matchuser']) ? '1' : '0'), + 'reserveName' => (isset($_POST['matchname']) ? '1' : '0'), + 'reserveNames' => str_replace("\r", '', $_POST['reserved']) + )); + + redirectexit('action=admin'); +} + +function trackUser($memID) +{ + global $scripturl, $txt, $db_prefix; + global $user_profile, $context; + + // Verify if the user has sufficient permissions. + isAllowedTo('moderate_forum'); + + loadTemplate('ManageMembers'); + + $context['page_title'] = $txt['trackUser'] . ' - ' . $user_profile[$memID]['realName']; + + $context['last_ip'] = $user_profile[$memID]['memberIP']; + $context['member']['name'] = $user_profile[$memID]['realName']; + + $ips = array(); + + // Get all IP addresses this user has used for his messages. + $request = db_query(" + SELECT posterIP + FROM {$db_prefix}messages + WHERE ID_MEMBER = $memID + GROUP BY posterIP", __FILE__, __LINE__); + $context['ips'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + $context['ips'][] = '' . $row['posterIP'] . ''; + $ips[] = $row['posterIP']; + } + mysql_free_result($request); + + // Now also get the IP addresses from the error messages. + $request = db_query(" + SELECT COUNT(ID_MEMBER) AS errorCount, IP + FROM {$db_prefix}log_errors + WHERE ID_MEMBER = $memID + GROUP BY IP", __FILE__, __LINE__); + $context['error_ips'] = array(); + $totalErrors = 0; + while ($row = mysql_fetch_assoc($request)) + { + $context['error_ips'][] = '' . $row['IP'] . ''; + $ips[] = $row['IP']; + $totalErrors += $row['errorCount']; + } + mysql_free_result($request); + + // Create the page indexes. + $context['page_index'] = constructPageIndex($scripturl . '?action=profile;u=' . $memID . ';sa=trackUser', $_REQUEST['start'], $totalErrors, 20); + $context['start'] = $_REQUEST['start']; + + // Get a list of error messages from this ip (range). + $request = db_query(" + SELECT + le.logTime, le.IP, le.url, le.message, IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, + IFNULL(mem.realName, '$txt[28]') AS display_name, mem.memberName + FROM {$db_prefix}log_errors AS le + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = le.ID_MEMBER) + WHERE le.ID_MEMBER = $memID + ORDER BY le.ID_ERROR DESC + LIMIT $context[start], 20", __FILE__, __LINE__); + $context['error_messages'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['error_messages'][] = array( + 'ip' => $row['IP'], + 'message' => $row['message'], + 'url' => $row['url'], + 'time' => timeformat($row['logTime']), + 'timestamp' => $row['logTime'] + ); + mysql_free_result($request); + + // Find other users that might use the same IP. + $ips = array_unique($ips); + $context['members_in_range'] = array(); + if (!empty($ips)) + { + $request = db_query(" + SELECT ID_MEMBER, realName + FROM {$db_prefix}members + WHERE ID_MEMBER != $memID + AND memberIP IN ('" . implode("', '", $ips) . "')", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + while ($row = mysql_fetch_assoc($request)) + $context['members_in_range'][$row['ID_MEMBER']] = '' . $row['realName'] . ''; + + $request = db_query(" + SELECT mem.ID_MEMBER, mem.realName + FROM {$db_prefix}messages AS m, {$db_prefix}members AS mem + WHERE mem.ID_MEMBER = m.ID_MEMBER + AND mem.ID_MEMBER != $memID + AND m.posterIP IN ('" . implode("', '", $ips) . "')", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + while ($row = mysql_fetch_assoc($request)) + $context['members_in_range'][$row['ID_MEMBER']] = '' . $row['realName'] . ''; + } +} + +function trackIP($memID = 0) +{ + global $user_profile, $scripturl, $txt; + global $db_prefix, $context; + + // Can the user do this? + isAllowedTo('moderate_forum'); + + loadTemplate('ManageMembers'); + + if ($memID == 0) + { + $searchip = $_REQUEST['searchip']; + loadLanguage('Profile'); + $context['sub_template'] = 'trackIP'; + $context['page_title'] = $txt[79]; + } + else + $searchip = $user_profile[$memID]['memberIP']; + + $context['ip'] = $searchip; + + if (!preg_match('/^\d{1,3}\.(\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)$/', $searchip)) + fatal_error($txt['invalid_ip'], false); + + $dbip = str_replace('*', '%', $searchip); + + $context['page_title'] = $txt['trackIP'] . ' - ' . $searchip; + + // Get some totals for pagination. + $request = db_query(" + SELECT COUNT(ID_MSG) + FROM {$db_prefix}messages + WHERE posterIP LIKE '$dbip'", __FILE__, __LINE__); + list ($totalMessages) = mysql_fetch_row($request); + mysql_free_result($request); + $request = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}log_errors + WHERE IP LIKE '$dbip'", __FILE__, __LINE__); + list ($totalErrors) = mysql_fetch_row($request); + mysql_free_result($request); + + $context['message_start'] = isset($_GET['mes']) ? $_REQUEST['start'] : 0; + $context['error_start'] = isset($_GET['err']) ? $_REQUEST['start'] : 0; + $context['message_page_index'] = constructPageIndex($scripturl . '?action=' . ($memID == 0 ? 'trackip;searchip=' . $context['ip'] : 'profile;u=' . $memID . ';sa=trackIP') . ';mes', $context['message_start'], $totalMessages, 20); + $context['error_page_index'] = constructPageIndex($scripturl . '?action=' . ($memID == 0 ? 'trackip;searchip=' . $context['ip'] : 'profile;u=' . $memID . ';sa=trackIP') . ';err', $context['error_start'], $totalErrors, 20); + + $request = db_query(" + SELECT ID_MEMBER, IFNULL(realName, memberName) AS display_name, memberIP + FROM {$db_prefix}members + WHERE memberIP LIKE '$dbip'", __FILE__, __LINE__); + $context['ips'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['ips'][$row['memberIP']][] = '' . $row['display_name'] . ''; + mysql_free_result($request); + + ksort($context['ips']); + + $request = db_query(" + SELECT + m.ID_MSG, m.posterIP, IFNULL(mem.realName, m.posterName) AS display_name, mem.ID_MEMBER, + m.subject, m.posterTime, m.ID_TOPIC, m.ID_BOARD + FROM {$db_prefix}messages AS m + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE m.posterIP LIKE '$dbip' + ORDER BY m.posterIP + LIMIT $context[message_start], 20", __FILE__, __LINE__); + $context['messages'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['messages'][] = array( + 'ip' => $row['posterIP'], + 'member' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['display_name'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['display_name'] . '' + ), + 'board' => array( + 'id' => $row['ID_BOARD'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] + ), + 'topic' => $row['ID_TOPIC'], + 'id' => $row['ID_MSG'], + 'subject' => $row['subject'], + 'time' => timeformat($row['posterTime']), + 'timestamp' => $row['posterTime'] + ); + mysql_free_result($request); + + $request = db_query(" + SELECT + le.logTime, le.IP, le.url, le.message, IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, + IFNULL(mem.realName, '$txt[28]') AS display_name, mem.memberName + FROM {$db_prefix}log_errors AS le + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = le.ID_MEMBER) + WHERE le.IP LIKE '$dbip' + ORDER BY le.IP + LIMIT $context[error_start], 20", __FILE__, __LINE__); + $context['error_messages'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['error_messages'][] = array( + 'ip' => $row['IP'], + 'member' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['display_name'], + 'href' => $row['ID_MEMBER'] > 0 ? $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] : '', + 'link' => $row['ID_MEMBER'] > 0 ? '' . $row['display_name'] . '' : $row['display_name'] + ), + 'message' => $row['message'], + 'url' => $row['url'], + 'error_time' => timeformat($row['logTime']) + ); + mysql_free_result($request); + + $context['single_ip'] = strpos($searchip, '*') === false; + if ($context['single_ip']) + { + // In the future, AfriNIC will be added to this list. + $context['whois_servers'] = array( + 'apnic' => array( + 'name' => &$txt['whois_apnic'], + 'url' => 'http://www.apnic.net/apnic-bin/whois2.pl?searchtext=' . $searchip + ), + 'arin' => array( + 'name' => &$txt['whois_arin'], + 'url' => 'http://ws.arin.net/cgi-bin/whois.pl?queryinput=' . $searchip + ), + 'lacnic' => array( + 'name' => &$txt['whois_lacnic'], + 'url' => 'http://lacnic.net/cgi-bin/lacnic/whois?lg=EN&query=' . $searchip + ), + 'ripe' => array( + 'name' => &$txt['whois_ripe'], + 'url' => 'http://www.ripe.net/perl/whois?searchtext=' . $searchip + ), + ); + } +} + +function showPermissions($memID) +{ + global $scripturl, $txt, $db_prefix, $board; + global $user_profile, $context, $user_info; + + // Verify if the user has sufficient permissions. + isAllowedTo('manage_permissions'); + + loadTemplate('ManageMembers'); + loadLanguage('ManagePermissions'); + loadLanguage('Admin'); + + $context['member']['id'] = $memID; + $context['member']['name'] = $user_profile[$memID]['realName']; + + $context['page_title'] = $txt['showPermissions']; + $board = empty($board) ? 0 : (int) $board; + $context['board'] = $board; + + // Load a list of boards for the jump box (but only those that have separate local permissions). + $result = db_query(" + SELECT b.ID_BOARD, b.name + FROM {$db_prefix}boards AS b + WHERE $user_info[query_see_board] + AND use_local_permissions = 1", __FILE__, __LINE__); + $context['boards'] = array(); + while ($row = mysql_fetch_assoc($result)) + $context['boards'][$row['ID_BOARD']] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'selected' => $board == $row['ID_BOARD'] + ); + mysql_free_result($result); + + // Determine which groups this user is in. + if (empty($user_profile[$memID]['additionalGroups'])) + $curGroups = array(); + else + $curGroups = explode(',', $user_profile[$memID]['additionalGroups']); + $curGroups[] = $user_profile[$memID]['ID_GROUP']; + $curGroups[] = $user_profile[$memID]['ID_POST_GROUP']; + + $context['member']['permissions'] = array( + 'general' => array(), + 'board' => array() + ); + + // If you're an admin we know you can do everything, we might as well leave. + $context['member']['has_all_permissions'] = in_array(1, $curGroups); + if ($context['member']['has_all_permissions']) + return; + + $denied = array(); + + // Get all general permissions. + $result = db_query(" + SELECT p.permission, p.addDeny, mg.groupName, p.ID_GROUP + FROM {$db_prefix}permissions AS p + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = p.ID_GROUP) + WHERE p.ID_GROUP IN (" . implode(', ', $curGroups) . ") + ORDER BY p.permission, mg.minPosts, IF(mg.ID_GROUP < 4, mg.ID_GROUP, 4), mg.groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + // We don't know about this permission, it doesn't exist :P. + if (!isset($txt['permissionname_' . $row['permission']])) + continue; + + if (empty($row['addDeny'])) + $denied[] = $row['permission']; + + // Permissions that end with _own or _any consist of two parts. + if (in_array(substr($row['permission'], -4), array('_own', '_any')) && isset($txt['permissionname_' . substr($row['permission'], 0, -4)])) + $name = $txt['permissionname_' . substr($row['permission'], 0, -4)] . ' - ' . $txt['permissionname_' . $row['permission']]; + else + $name = $txt['permissionname_' . $row['permission']]; + + // Add this permission if it doesn't exist yet. + if (!isset($context['member']['permissions']['general'][$row['permission']])) + $context['member']['permissions']['general'][$row['permission']] = array( + 'id' => $row['permission'], + 'groups' => array( + 'allowed' => array(), + 'denied' => array() + ), + 'name' => $name, + 'is_denied' => false, + 'is_global' => true, + ); + + // Add the membergroup to either the denied or the allowed groups. + $context['member']['permissions']['general'][$row['permission']]['groups'][empty($row['addDeny']) ? 'denied' : 'allowed'][] = $row['ID_GROUP'] == 0 ? $txt['membergroups_members'] : $row['groupName']; + + // Once denied is always denied. + $context['member']['permissions']['general'][$row['permission']]['is_denied'] = in_array($row['permission'], $denied); + } + mysql_free_result($result); + + // Retrieve the board specific permissions. + $result = db_query(" + SELECT bp.ID_BOARD, bp.permission, bp.addDeny, mg.groupName, bp.ID_GROUP, b.use_local_permissions, b.name + FROM {$db_prefix}board_permissions AS bp + LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = bp.ID_BOARD) + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = bp.ID_GROUP) + WHERE bp.ID_GROUP IN (" . implode(', ', $curGroups) . ")" . (empty($board) ? '' : " + AND bp.ID_BOARD = $board") . " + ORDER BY bp.permission, b.boardOrder, mg.minPosts, IF(mg.ID_GROUP < 4, mg.ID_GROUP, 4), mg.groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + // We don't know about this permission, it doesn't exist :P. + if (!isset($txt['permissionname_' . $row['permission']])) + continue; + + // The name of the permission using the format 'permission name' - 'own/any topic/event/etc.'. + if (in_array(substr($row['permission'], -4), array('_own', '_any')) && isset($txt['permissionname_' . substr($row['permission'], 0, -4)])) + $name = $txt['permissionname_' . substr($row['permission'], 0, -4)] . ' - ' . $txt['permissionname_' . $row['permission']]; + else + $name = $txt['permissionname_' . $row['permission']]; + + // Create the structure for this permission. + if (!isset($context['member']['permissions']['board'][$row['permission']])) + $context['member']['permissions']['board'][$row['permission']] = array( + 'id' => $row['permission'], + 'groups' => array( + 'allowed' => array(), + 'denied' => array() + ), + 'name' => $name, + 'boards' => array( + 'allowed' => array(), + 'denied' => array(), + ), + 'is_denied' => false, + 'is_global' => false, + ); + + // Either we're dealing with global permissions, or we've selected a board to be shown. + if (empty($row['ID_BOARD']) || !empty($board)) + { + $context['member']['permissions']['board'][$row['permission']]['is_global'] = true; + + $context['member']['permissions']['board'][$row['permission']]['groups'][empty($row['addDeny']) ? 'denied' : 'allowed'][$row['ID_GROUP']] = $row['ID_GROUP'] == 0 ? $txt['membergroups_members'] : $row['groupName']; + + $context['member']['permissions']['board'][$row['permission']]['is_denied'] = $context['member']['permissions']['board'][$row['permission']]['is_denied'] || empty($row['addDeny']); + } + // This is a local permission, make sure this board actually uses local permissions. + elseif (!empty($row['use_local_permissions'])) + { + // Deny this permission. + if (empty($row['addDeny'])) + { + $context['member']['permissions']['board'][$row['permission']]['boards']['denied'][$row['ID_BOARD']] = $row['name']; + + // Remove the board from the allowed array. + if (isset($context['member']['permissions']['board'][$row['permission']]['boards']['allowed'][$row['ID_BOARD']])) + unset($context['member']['permissions']['board'][$row['permission']]['boards']['allowed'][$row['ID_BOARD']]); + } + // Allow only if it's not denied. + elseif (!in_array($row['ID_BOARD'], array_keys($context['member']['permissions']['board'][$row['permission']]['boards']['denied']))) + $context['member']['permissions']['board'][$row['permission']]['boards']['allowed'][$row['ID_BOARD']] = $row['name']; + } + } + mysql_free_result($result); + + // Get rid of denied permissions if you're looking at a specific board. + if (!empty($board)) + { + foreach ($context['member']['permissions']['board'] as $ID_PERM => $permission) + if ($permission['is_denied']) + unset($context['member']['permissions']['board'][$ID_PERM]); + } + else + { + foreach ($context['member']['permissions']['board'] as $ID_PERM => $permission) + { + // Get rid of permissions that are only locally set and on deny. + if (!$permission['is_global'] && empty($permission['boards']['allowed'])) + unset($context['member']['permissions']['board'][$ID_PERM]); + // Get rid of permissions that are globally on deny and nowhere locally set. + elseif ($permission['is_global'] && $permission['is_denied'] && empty($permission['boards']['allowed'])) + unset($context['member']['permissions']['board'][$ID_PERM]); + } + } +} + +// This function is used to reassociate members with relevant posts. +function reattributePosts($memID, $email = false, $post_count = false) +{ + global $db_prefix; + + // Firstly, if $email isn't passed find out the members email address. + if ($email === false) + { + $request = db_query(" + SELECT emailAddress + FROM {$db_prefix}members + WHERE ID_MEMBER = $memID + LIMIT 1", __FILE__, __LINE__); + list ($email) = mysql_fetch_row($request); + mysql_free_result($request); + } + + // If they want the post count restored then we need to do some research. + if ($post_count) + { + $request = db_query(" + SELECT COUNT(m.ID_MSG) + FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b + WHERE m.ID_MEMBER = 0 + AND m.posterEmail = '$email' + AND b.ID_BOARD = m.ID_MEMBER + AND b.countPosts = 1", __FILE__, __LINE__); + list ($messageCount) = mysql_fetch_row($request); + mysql_free_result($request); + + db_query(" + UPDATE {$db_prefix}members + SET posts = posts + $messageCount + WHERE ID_MEMBER = $memID + LIMIT 1", __FILE__, __LINE__); + } + + // Finally, update the posts themselves... + db_query(" + UPDATE {$db_prefix}messages + SET ID_MEMBER = $memID + WHERE posterEmail = '$email'", __FILE__, __LINE__); + + return db_affected_rows(); +} + +?> \ No newline at end of file diff --git a/Sources/ManagePermissions.php b/Sources/ManagePermissions.php new file mode 100644 index 0000000..6678ace --- /dev/null +++ b/Sources/ManagePermissions.php @@ -0,0 +1,1137 @@ + 'SetQuickGroups', + 'quickboard' => 'SetQuickBoards', + 'modify' => 'ModifyMembergroup', + 'modify2' => 'ModifyMembergroup2', + 'switch' => 'SwitchBoard', + ); + + if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']])) + { + $sa = $subActions[$_REQUEST['sa']]; + unset($subActions); + + $sa(); + } + else + PermissionIndex(); +} + +function PermissionIndex() +{ + global $db_prefix, $txt, $scripturl, $context, $settings; + + $context['page_title'] = $txt['permissions_title']; + + // Load all the permissions. We'll need them in the template. + loadAllPermissions(); + + // Determine the number of ungrouped members. + $request = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}members + WHERE ID_GROUP = 0", __FILE__, __LINE__); + list ($num_members) = mysql_fetch_row($request); + mysql_free_result($request); + + // Fill the context variable with 'Guests' and 'Ungrouped Members'. + $context['groups'] = array( + -1 => array( + 'id' => -1, + 'name' => $txt['membergroups_guests'], + 'num_members' => $txt['membergroups_guests_na'], + 'allow_delete' => false, + 'allow_modify' => true, + 'can_search' => false, + 'href' => '', + 'link' => '', + 'is_post_group' => false, + 'color' => '', + 'stars' => '', + 'num_permissions' => array( + 'allowed' => 0, + 'denied' => 0 + ), + 'access' => false + ), + 0 => array( + 'id' => 0, + 'name' => $txt['membergroups_members'], + 'num_members' => $num_members, + 'allow_delete' => false, + 'allow_modify' => true, + 'can_search' => true, + 'href' => $scripturl . '?action=viewmembers;sa=query;params=' . base64_encode('ID_GROUP = 0'), + 'link' => '' . $num_members . '', + 'is_post_group' => false, + 'color' => '', + 'stars' => '', + 'num_permissions' => array( + 'allowed' => 0, + 'denied' => 0 + ), + 'access' => false + ), + ); + + // Query the database defined membergroups. + $query = db_query(" + SELECT mg.ID_GROUP, mg.groupName, mg.minPosts, mg.onlineColor, mg.stars, COUNT(mem.ID_MEMBER) AS num_members + FROM {$db_prefix}membergroups AS mg + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_GROUP = mg.ID_GROUP OR FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR mg.ID_GROUP = mem.ID_POST_GROUP) + GROUP BY mg.ID_GROUP + ORDER BY mg.minPosts, IF(mg.ID_GROUP < 4, mg.ID_GROUP, 4), mg.groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($query)) + { + $row['stars'] = explode('#', $row['stars']); + $context['groups'][$row['ID_GROUP']] = array( + 'id' => $row['ID_GROUP'], + 'name' => $row['groupName'], + 'num_members' => $row['ID_GROUP'] != 3 ? $row['num_members'] : $txt['membergroups_guests_na'], + 'allow_delete' => $row['ID_GROUP'] > 4, + 'allow_modify' => $row['ID_GROUP'] > 1, + 'can_search' => $row['ID_GROUP'] != 3, + 'href' => $scripturl . '?action=viewmembers;sa=query;params=' . base64_encode($row['minPosts'] == -1 ? "ID_GROUP = $row[ID_GROUP] OR FIND_IN_SET($row[ID_GROUP], additionalGroups)" : "ID_POST_GROUP = $row[ID_GROUP]"), + 'link' => '' . $row['num_members'] . '', + 'is_post_group' => $row['minPosts'] != -1, + 'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'], + 'stars' => !empty($row['stars'][0]) && !empty($row['stars'][1]) ? str_repeat('*', $row['stars'][0]) : '', + 'num_permissions' => array( + 'allowed' => $row['ID_GROUP'] == 1 ? '(' . $txt['permissions_all'] . ')' : 0, + 'denied' => $row['ID_GROUP'] == 1 ? '(' . $txt['permissions_none'] . ')' : 0 + ), + 'access' => false + ); + } + mysql_free_result($query); + + $board_groups = array(); + foreach ($context['groups'] as $group) + if ($group['allow_modify']) + $board_groups[$group['id']] = array( + 'id' => &$group['id'], + 'name' => &$group['name'], + 'num_permissions' => array( + 'allowed' => 0, + 'denied' => 0 + ), + ); + + if (empty($_REQUEST['boardid'])) + { + $request = db_query(" + SELECT b.ID_BOARD, b.name, COUNT(mods.ID_MEMBER) AS moderators, b.memberGroups, b.use_local_permissions, b.childLevel + FROM ({$db_prefix}boards AS b, {$db_prefix}categories AS c) + LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD) + WHERE c.ID_CAT = b.ID_CAT + GROUP BY b.ID_BOARD + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['boards'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + $row['memberGroups'] = explode(',', $row['memberGroups']); + $context['boards'][$row['ID_BOARD']] = array( + 'id' => $row['ID_BOARD'], + 'child_level' => $row['childLevel'], + 'name' => $row['name'], + 'num_moderators' => $row['moderators'], + 'public' => in_array(0, $row['memberGroups']) || in_array(-1, $row['memberGroups']), + 'membergroups' => $row['memberGroups'], + 'use_local_permissions' => $row['use_local_permissions'] == 1, + 'groups' => $board_groups + ); + } + mysql_free_result($request); + + $request = db_query(" + SELECT ID_GROUP, COUNT(permission) AS numPermissions, addDeny + FROM {$db_prefix}permissions + GROUP BY ID_GROUP, addDeny", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + if (isset($context['groups'][(int) $row['ID_GROUP']])) + $context['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' : 'allowed'] = $row['numPermissions']; + mysql_free_result($request); + + $request = db_query(" + SELECT ID_BOARD, ID_GROUP, COUNT(permission) AS numPermissions, addDeny + FROM {$db_prefix}board_permissions + GROUP BY ID_BOARD, ID_GROUP, addDeny", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if ($row['ID_BOARD'] == 0) + { + if (isset($context['groups'][(int) $row['ID_GROUP']])) + $context['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' : 'allowed'] += $row['numPermissions']; + } + elseif (isset($context['boards'][$row['ID_BOARD']]) && isset($context['boards'][$row['ID_BOARD']]['groups'][(int) $row['ID_GROUP']])) + $context['boards'][$row['ID_BOARD']]['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' : 'allowed'] = $row['numPermissions']; + } + mysql_free_result($request); + } + else + { + $_REQUEST['boardid'] = (int) $_REQUEST['boardid']; + + $request = db_query(" + SELECT ID_BOARD, ID_GROUP, COUNT(permission) AS numPermissions, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $_REQUEST[boardid] + GROUP BY ID_BOARD, ID_GROUP, addDeny", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if (isset($context['groups'][(int) $row['ID_GROUP']])) + $context['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' : 'allowed'] += $row['numPermissions']; + } + mysql_free_result($request); + + $context['board'] = array( + 'id' => $_REQUEST['boardid'] + ); + + // Load all the boards that we can set permissions off... + $request = db_query(" + SELECT ID_BOARD, name + FROM {$db_prefix}boards + WHERE ID_BOARD != $_REQUEST[boardid] + AND use_local_permissions = 1", __FILE__, __LINE__); + $context['boards'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['copy_boards'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'] + ); + mysql_free_result($request); + + $request = db_query(" + SELECT name, memberGroups + FROM {$db_prefix}boards + WHERE ID_BOARD = $_REQUEST[boardid] + LIMIT 1", __FILE__, __LINE__); + list ($context['board']['name'], $groups) = mysql_fetch_row($request); + mysql_free_result($request); + + $groups = explode(',', $groups); + foreach ($groups as $group) + { + if ($group !== '' && isset($context['groups'][(int) $group])) + $context['groups'][(int) $group]['access'] = true; + } + } +} + +function SetQuickGroups() +{ + global $db_prefix; + + checkSession(); + + // Make sure only one of the quick options was selected. + if ((!empty($_POST['predefined']) && ((isset($_POST['copy_from']) && $_POST['copy_from'] != 'empty') || !empty($_POST['permissions']))) || (!empty($_POST['copy_from']) && $_POST['copy_from'] != 'empty' && !empty($_POST['permissions']))) + fatal_lang_error('permissions_only_one_option'); + + if (empty($_POST['group']) || !is_array($_POST['group'])) + $_POST['group'] = array(); + + // Only accept numeric values for selected membergroups. + foreach ($_POST['group'] as $id => $group_id) + $_POST['group'][$id] = (int) $group_id; + $_POST['group'] = array_unique($_POST['group']); + + if (empty($_REQUEST['boardid'])) + $_REQUEST['boardid'] = 0; + else + $_REQUEST['boardid'] = (int) $_REQUEST['boardid']; + + if (isset($_POST['access'])) + { + foreach ($_POST['access'] as $k => $v) + $_POST['access'][$k] = (int) $v; + $access = implode(',', $_POST['access']); + } + else + $access = ''; + + db_query(" + UPDATE {$db_prefix}boards + SET memberGroups = '$access' + WHERE ID_BOARD = $_REQUEST[boardid] + LIMIT 1", __FILE__, __LINE__); + + // No groups where selected. + if (empty($_POST['group'])) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + // Set a predefined permission profile. + if (!empty($_POST['predefined'])) + { + // Make sure it's a predefined permission set we expect. + if (!in_array($_POST['predefined'], array('restrict', 'standard', 'moderator', 'maintenance'))) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + foreach ($_POST['group'] as $group_id) + { + if (!empty($_REQUEST['boardid'])) + setPermissionLevel($_POST['predefined'], $group_id, $_REQUEST['boardid']); + else + setPermissionLevel($_POST['predefined'], $group_id); + } + } + // Set the permissions of the selected groups to that of their permissions in a different board. + elseif (isset($_POST['from_board']) && $_POST['from_board'] != 'empty') + { + // Just checking the input. + if (!is_numeric($_POST['from_board'])) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + // Fetch all the board permissions for these groups. + $request = db_query(" + SELECT ID_GROUP, permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $_POST[from_board] + AND ID_GROUP IN (" . implode(',', $_POST['group']) . ")", __FILE__, __LINE__); + + $target_perms = array(); + while ($row = mysql_fetch_assoc($request)) + $target_perms[] = "('$row[permission]', $row[ID_GROUP], $_REQUEST[boardid], $row[addDeny])"; + mysql_free_result($request); + + // Delete the previous global board permissions... + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP IN (" . implode(', ', $_POST['group']) . ") + AND ID_BOARD = $_REQUEST[boardid]", __FILE__, __LINE__); + + // And insert the copied permissions. + if (!empty($target_perms)) + { + db_query(" + INSERT IGNORE INTO {$db_prefix}board_permissions + (permission, ID_GROUP, ID_BOARD, addDeny) + VALUES " . implode(',', $target_perms), __FILE__, __LINE__); + } + } + // Set a permission profile based on the permissions of a selected group. + elseif ($_POST['copy_from'] != 'empty') + { + // Just checking the input. + if (!is_numeric($_POST['copy_from'])) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + // Make sure the group we're copying to is never included. + $_POST['group'] = array_diff($_POST['group'], array($_POST['copy_from'])); + + // No groups left? Too bad. + if (empty($_POST['group'])) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + if (empty($_REQUEST['boardid'])) + { + // Retrieve current permissions of group. + $request = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}permissions + WHERE ID_GROUP = $_POST[copy_from]", __FILE__, __LINE__); + $target_perm = array(); + while ($row = mysql_fetch_assoc($request)) + $target_perm[$row['permission']] = $row['addDeny']; + mysql_free_result($request); + + $insert_string = ''; + foreach ($_POST['group'] as $group_id) + foreach ($target_perm as $perm => $addDeny) + $insert_string .= "('$perm', $group_id, $addDeny),"; + + // Delete the previous permissions... + db_query(" + DELETE FROM {$db_prefix}permissions + WHERE ID_GROUP IN (" . implode(', ', $_POST['group']) . ")", __FILE__, __LINE__); + + if (!empty($insert_string)) + { + // Cut off the last comma. + $insert_string = substr($insert_string, 0, -1); + + // ..and insert the new ones. + db_query(" + INSERT IGNORE INTO {$db_prefix}permissions + (permission, ID_GROUP, addDeny) + VALUES $insert_string", __FILE__, __LINE__); + } + } + + // Now do the same for the board permissions. + $request = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_GROUP = $_POST[copy_from] + AND ID_BOARD = $_REQUEST[boardid]", __FILE__, __LINE__); + $target_perm = array(); + while ($row = mysql_fetch_assoc($request)) + $target_perm[$row['permission']] = $row['addDeny']; + mysql_free_result($request); + + $insert_string = ''; + foreach ($_POST['group'] as $group_id) + foreach ($target_perm as $perm => $addDeny) + $insert_string .= "('$perm', $group_id, $_REQUEST[boardid], $addDeny),"; + + // Delete the previous global board permissions... + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP IN (" . implode(', ', $_POST['group']) . ") + AND ID_BOARD = $_REQUEST[boardid]", __FILE__, __LINE__); + + // And insert the copied permissions. + if (!empty($insert_string)) + { + $insert_string = substr($insert_string, 0, -1); + + db_query(" + INSERT IGNORE INTO {$db_prefix}board_permissions + (permission, ID_GROUP, ID_BOARD, addDeny) + VALUES $insert_string", __FILE__, __LINE__); + } + } + // Set or unset a certain permission for the selected groups. + elseif (!empty($_POST['permissions'])) + { + // Unpack two variables that were transported. + list ($permissionType, $permission) = explode('/', $_POST['permissions']); + + // Check whether our input is within expected range. + if (!in_array($_POST['add_remove'], array('add', 'clear', 'deny')) || !in_array($permissionType, array('membergroup', 'board'))) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + if ($_POST['add_remove'] == 'clear') + { + if ($permissionType == 'membergroup') + db_query(" + DELETE FROM {$db_prefix}permissions + WHERE ID_GROUP IN (" . implode(', ', $_POST['group']) . ") + AND permission = '$permission'", __FILE__, __LINE__); + else + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP IN (" . implode(', ', $_POST['group']) . ") + AND ID_BOARD = $_REQUEST[boardid] + AND permission = '$permission'", __FILE__, __LINE__); + } + // Add a permission (either 'set' or 'deny'). + else + { + $addDeny = $_POST['add_remove'] == 'add' ? '1' : '0'; + if ($permissionType == 'membergroup') + db_query(" + REPLACE INTO {$db_prefix}permissions + (permission, ID_GROUP, addDeny) + VALUES + ('$permission', " . implode(", $addDeny), + ('$permission', ", $_POST['group']) . ", $addDeny)", __FILE__, __LINE__); + // Board permissions go into the other table. + else + db_query(" + REPLACE INTO {$db_prefix}board_permissions + (permission, ID_GROUP, ID_BOARD, addDeny) + VALUES + ('$permission', " . implode(", $_REQUEST[boardid], $addDeny), + ('$permission', ", $_POST['group']) . ", $_REQUEST[boardid], $addDeny)", __FILE__, __LINE__); + } + } + + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); +} + +// Switch a board from local to global permissions or v.v. +function SwitchBoard() +{ + global $db_prefix; + + // Security above all. + checkSession('get'); + validateSession(); + $_GET['boardid'] = (int) $_GET['boardid']; + + // Make sure the board exists and can be switched to $_GET['to']. + $request = db_query(" + SELECT ID_BOARD + FROM {$db_prefix}boards + WHERE ID_BOARD = $_GET[boardid] + AND use_local_permissions = " . ($_GET['to'] == 'local' ? '0' : '1') . " + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) != 1) + { + if ($_GET['to'] == 'local') + PermissionIndex(); + else + redirectexit('action=permissions'); + return; + } + mysql_free_result($request); + + // Copy the global permissions to the specific board. + if ($_GET['to'] == 'local') + { + $request = db_query(" + SELECT ID_GROUP, permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_BOARD = 0", __FILE__, __LINE__); + $insertRows = array(); + while ($row = mysql_fetch_assoc($request)) + $insertRows[] = "($row[ID_GROUP], $_GET[boardid], '$row[permission]', $row[addDeny])"; + mysql_free_result($request); + + // Reset the current local permissions. + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $_GET[boardid]", __FILE__, __LINE__); + + if (!empty($insertRows)) + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_GROUP, ID_BOARD, permission, addDeny) + VALUES " . implode(", + ", $insertRows), __FILE__, __LINE__); + } + + // Switch back to inherited permissions (delete all local permissions). + else + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $_GET[boardid]", __FILE__, __LINE__); + + // Update the board setting. + db_query(" + UPDATE {$db_prefix}boards + SET use_local_permissions = " . ($_GET['to'] == 'local' ? '1' : '0') . " + WHERE ID_BOARD = $_GET[boardid]", __FILE__, __LINE__); + + if ($_GET['to'] == 'local') + PermissionIndex(); + else + redirectexit('action=permissions'); +} + +function ModifyMembergroup() +{ + global $db_prefix, $context, $txt; + + $context['group']['id'] = (int) $_GET['id']; + + loadAllPermissions(); + + if ($context['group']['id'] > 0) + { + $result = db_query(" + SELECT groupName + FROM {$db_prefix}membergroups + WHERE ID_GROUP = {$context['group']['id']} + LIMIT 1", __FILE__, __LINE__); + list ($context['group']['name']) = mysql_fetch_row($result); + mysql_free_result($result); + } + elseif ($context['group']['id'] == -1) + $context['group']['name'] = &$txt['membergroups_guests']; + else + $context['group']['name'] = &$txt['membergroups_members']; + + $context['board']['id'] = empty($_GET['boardid']) ? 0 : (int) $_GET['boardid']; + $context['local'] = !empty($_GET['boardid']); + + if ($context['local']) + { + $request = db_query(" + SELECT name + FROM {$db_prefix}boards + WHERE ID_BOARD = {$context['board']['id']} + AND use_local_permissions = 1", __FILE__, __LINE__); + // Either the board was not found or the permissions are set to global. + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf232'); + list ($context['board']['name']) = mysql_fetch_row($request); + mysql_free_result($request); + } + + // Fetch the current permissions. + $permissions = array( + 'membergroup' => array('allowed' => array(), 'denied' => array()), + 'board' => array('allowed' => array(), 'denied' => array()) + ); + if ($context['group']['id'] != 3 && !$context['local']) + { + $result = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}permissions + WHERE ID_GROUP = $_GET[id]", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + $permissions['membergroup'][empty($row['addDeny']) ? 'denied' : 'allowed'][] = $row['permission']; + mysql_free_result($result); + $context['permissions']['membergroup']['show'] = true; + } + else + $context['permissions']['membergroup']['show'] = false; + + // Fetch current board permissions. + $result = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_GROUP = {$context['group']['id']} + AND ID_BOARD = {$context['board']['id']}", __FILE__, __LINE__); + + while ($row = mysql_fetch_assoc($result)) + $permissions['board'][empty($row['addDeny']) ? 'denied' : 'allowed'][] = $row['permission']; + mysql_free_result($result); + $context['permissions']['board']['show'] = true; + + // Loop through each permission and set whether it's checked. + foreach ($context['permissions'] as $permissionType => $tmp) + { + foreach ($tmp['columns'] as $position => $permissionGroups) + { + foreach ($permissionGroups as $permissionGroup => $permissionArray) + { + foreach ($permissionArray['permissions'] as $perm) + { + // Create a shortcut for the current permission. + $curPerm = &$context['permissions'][$permissionType]['columns'][$position][$permissionGroup]['permissions'][$perm['id']]; + if ($perm['has_own_any']) + { + $curPerm['any']['select'] = in_array($perm['id'] . '_any', $permissions[$permissionType]['allowed']) ? 'on' : (in_array($perm['id'] . '_any', $permissions[$permissionType]['denied']) ? 'denied' : 'off'); + $curPerm['own']['select'] = in_array($perm['id'] . '_own', $permissions[$permissionType]['allowed']) ? 'on' : (in_array($perm['id'] . '_own', $permissions[$permissionType]['denied']) ? 'denied' : 'off'); + } + else + $curPerm['select'] = in_array($perm['id'], $permissions[$permissionType]['denied']) ? 'denied' : (in_array($perm['id'], $permissions[$permissionType]['allowed']) ? 'on' : 'off'); + } + } + } + } + $context['sub_template'] = 'modify_group'; + $context['page_title'] = $txt['permissions_modify_group']; +} + +function ModifyMembergroup2() +{ + global $db_prefix; + + checkSession(); + + $_GET['id'] = (int) $_GET['id']; + $_GET['boardid'] = (int) $_GET['boardid']; + + $givePerms = array('membergroup' => array(), 'board' => array()); + + // Prepare all permissions that were set or denied for addition to the DB. + foreach ($_POST['perm'] as $perm_type => $perm_array) + foreach ($perm_array as $permission => $value) + if ($value == 'on' || $value == 'deny') + $givePerms[$perm_type][] = "$permission', " . ($value == 'on' ? '1' : '0'); + + // Insert the general permissions. + if ($_GET['id'] != 3 && empty($_GET['boardid'])) + { + db_query(" + DELETE FROM {$db_prefix}permissions + WHERE ID_GROUP = $_GET[id]", __FILE__, __LINE__); + if (!empty($givePerms['membergroup'])) + db_query(" + INSERT IGNORE INTO {$db_prefix}permissions + (ID_GROUP, permission, addDeny) + VALUES ($_GET[id], '" . implode("), + ($_GET[id], '", $givePerms['membergroup']) . ")", __FILE__, __LINE__); + } + + // Insert the boardpermissions. + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP = $_GET[id] + AND ID_BOARD = $_GET[boardid]", __FILE__, __LINE__); + if (!empty($givePerms['board'])) + db_query(" + INSERT IGNORE INTO {$db_prefix}board_permissions + (ID_GROUP, ID_BOARD, permission, addDeny) + VALUES ($_GET[id], $_GET[boardid], '" . implode("), + ($_GET[id], $_GET[boardid], '", $givePerms['board']) . ")", __FILE__, __LINE__); + + redirectexit('action=permissions;boardid=' . $_GET['boardid']); +} + +// Set the permission level for a specific board, group, or group for a board. +function setPermissionLevel($level, $group, $board = 'null') +{ + global $db_prefix; + + // Levels by group... restrict, standard, moderator, maintenance. + $groupLevels = array( + 'board' => array('inherit' => array()), + 'group' => array('inherit' => array()) + ); + // Levels by board... standard, publish, free. + $boardLevels = array('inherit' => array()); + + // Restrictive - ie. guests. + $groupLevels['global']['restrict'] = array( + 'search_posts', + 'calendar_view', + 'view_stats', + 'who_view', +'karmalog_view', + 'profile_view_own', + 'profile_identity_own', + ); + $groupLevels['board']['restrict'] = array( + 'poll_view', + 'post_new', + 'post_reply_own', + 'post_reply_any', + 'remove_own', + 'modify_own', + 'mark_any_notify', + 'mark_notify', + 'report_any', + 'send_topic', + ); + + // Standard - ie. members. They can do anything Restrictive can. + $groupLevels['global']['standard'] = array_merge($groupLevels['global']['restrict'], array( + 'view_mlist', + 'karma_edit', + 'pm_read', + 'pm_send', + 'profile_view_any', + 'profile_extra_own', + 'profile_remote_avatar', + 'profile_remove_own', + + 'googleMap_view', + 'googleMap_place', + )); + $groupLevels['board']['standard'] = array_merge($groupLevels['board']['restrict'], array( + 'poll_vote', + 'poll_edit_own', + 'poll_post', + 'poll_add_own', + 'post_attachment', + 'lock_own', + 'delete_own', + 'view_attachments', + )); + + // Moderator - ie. moderators :P. They can do what standard can, and more. + $groupLevels['global']['moderator'] = array_merge($groupLevels['global']['standard'], array( + 'calendar_post', + 'calendar_edit_own', + )); + $groupLevels['board']['moderator'] = array_merge($groupLevels['board']['standard'], array( + 'make_sticky', + 'poll_edit_any', + 'remove_any', + 'modify_any', + 'lock_any', + 'delete_any', + 'move_any', + 'merge_any', + 'split_any', + 'poll_lock_any', + 'poll_remove_any', + 'poll_add_any', + )); + + // Maintenance - wannabe admins. They can do almost everything. + $groupLevels['global']['maintenance'] = array_merge($groupLevels['global']['moderator'], array( + 'manage_attachments', + 'manage_smileys', + 'manage_boards', + 'moderate_forum', + 'manage_membergroups', + 'manage_bans', + 'admin_forum', + 'manage_permissions', + 'edit_news', + 'calendar_edit_any', + 'profile_identity_any', + 'profile_extra_any', + 'profile_title_any', + )); + $groupLevels['board']['maintenance'] = array_merge($groupLevels['board']['moderator'], array( + )); + + // Standard - nothing above the group permissions. (this SHOULD be empty.) + $boardLevels['standard'] = array( + ); + + // Locked - just that, you can't post here. + $boardLevels['locked'] = array( + 'poll_view', + 'mark_notify', + 'report_any', + 'send_topic', + 'view_attachments', + ); + + // Publisher - just a little more... + $boardLevels['publish'] = array_merge($boardLevels['locked'], array( + 'post_new', + 'post_reply_own', + 'post_reply_any', + 'remove_own', + 'modify_own', + 'mark_any_notify', + 'remove_replies', + 'modify_replies', + 'poll_vote', + 'poll_edit_own', + 'poll_post', + 'poll_add_own', + 'poll_remove_own', + 'post_attachment', + 'lock_own', + 'delete_own', + )); + + // Free for All - Scary. Just scary. + $boardLevels['free'] = array_merge($boardLevels['publish'], array( + 'poll_lock_any', + 'poll_edit_any', + 'poll_add_any', + 'poll_remove_any', + 'make_sticky', + 'lock_any', + 'delete_any', + 'remove_any', + 'split_any', + 'merge_any', + 'modify_any', + )); + + // Setting group permissions. + if ($board === 'null' && $group !== 'null') + { + $group = (int) $group; + + if (empty($groupLevels['global'][$level])) + return; + + db_query(" + DELETE FROM {$db_prefix}permissions + WHERE ID_GROUP = $group", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP = $group + AND ID_BOARD = 0", __FILE__, __LINE__); + + db_query(" + INSERT INTO {$db_prefix}permissions + (ID_GROUP, permission) + VALUES ($group, '" . implode("'), + ($group, '", $groupLevels['global'][$level]) . "')", __FILE__, __LINE__); + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_BOARD, ID_GROUP, permission) + VALUES (0, $group, '" . implode("'), + (0, $group, '", $groupLevels['board'][$level]) . "')", __FILE__, __LINE__); + } + // Setting board permissions for a specific group. + elseif ($board !== 'null' && $group !== 'null') + { + $group = (int) $group; + $board = (int) $board; + + if (!empty($groupLevels['global'][$level])) + { + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP = $group + AND ID_BOARD = $board", __FILE__, __LINE__); + } + + if (!empty($groupLevels['board'][$level])) + { + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_BOARD, ID_GROUP, permission) + VALUES ($board, $group, '" . implode("'), + ($board, $group, '", $groupLevels['board'][$level]) . "')", __FILE__, __LINE__); + } + } + // Setting board permissions for all groups. + elseif ($board !== 'null' && $group === 'null') + { + $board = (int) $board; + + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $board", __FILE__, __LINE__); + + if (empty($boardLevels[$level])) + return; + + // Get all the groups... + $query = db_query(" + SELECT ID_GROUP + FROM {$db_prefix}membergroups + WHERE ID_GROUP > 3 + ORDER BY minPosts, IF(ID_GROUP < 4, ID_GROUP, 4), groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_row($query)) + { + $group = $row[0]; + + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_BOARD, ID_GROUP, permission) + VALUES ($board, $group, '" . implode("'), + ($board, $group, '", $boardLevels[$level]) . "')", __FILE__, __LINE__); + } + mysql_free_result($query); + + // Add permissions for ungrouped users. + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_BOARD, ID_GROUP, permission) + VALUES ($board, 0, '" . implode("'), + ($board, 0, '", $boardLevels[$level]) . "')", __FILE__, __LINE__); + } + // $board and $group are both null! + else + fatal_lang_error(1, false); +} + +function loadAllPermissions() +{ + global $context, $txt; + +/* The format of this list is as follows: + 'permission_group' => array( + 'permissions_inside' => has_multiple_options, + ), + + It should be noted that if the permission_group starts with $ it is not treated as a permission. + However, if it does not start with $, it is treated as a normal permission. + $txt['permissionname_' . $permission] is used for the names of permissions. + $txt['permissiongroup_' . $group] is used for names of groups that start with $. + $txt['permissionhelp_' . $permission] is used for extended information. + $txt['permissionicon_' . $permission_or_group] is used for the icons, if it exists. +*/ + + $permissionList = array( + 'membergroup' => array( + 'general' => array( + 'view_stats' => false, + 'view_mlist' => false, + 'who_view' => false, +'karmalog_view' => false, + 'search_posts' => false, + 'karma_edit' => false, + + 'googleMap_view' => false, + 'googleMap_place' => false, + ), + 'pm' => array( + 'pm_read' => false, + 'pm_send' => false, + ), +'pcomments' => array( + 'pcomments_view' => false, + 'pcomments_add' => false, + 'pcomments_edit_own' => false, + 'pcomments_edit_any' => false, + 'pcomments_delete_own' => false, + 'pcomments_delete_any' => false, + 'pcomments_autocomment' => false, + ), +'pcomments' => array( + 'pcomments_view' => false, + 'pcomments_add' => false, + 'pcomments_edit_own' => false, + 'pcomments_edit_any' => false, + 'pcomments_delete_own' => false, + 'pcomments_delete_any' => false, + 'pcomments_autocomment' => false, + ), + 'calendar' => array( + 'calendar_view' => false, + 'calendar_post' => false, + 'calendar_edit' => true, + ), + 'maintenance' => array( + 'admin_forum' => false, + 'manage_boards' => false, + 'manage_attachments' => false, + 'manage_smileys' => false, + 'edit_news' => false, + ), + 'member_admin' => array( + 'moderate_forum' => false, + 'manage_membergroups' => false, + 'manage_permissions' => false, + 'manage_bans' => false, + 'send_mail' => false, + ), + 'profile' => array( + 'profile_view' => true, + 'profile_identity' => true, + 'profile_extra' => true, + 'profile_title' => true, + 'profile_remove' => true, + 'profile_remote_avatar' => false, + ) + , + 'visual_warn' => array( + 'visual_warn_any' => false, + 'visual_approve_any' => false, + ), + 'googlebot' => array( + 'googlebot_view' => false, + ), + ), + 'board' => array( + 'general_board' => array( + 'moderate_board' => false, + ), + 'topic' => array( + 'post_new' => false, + 'merge_any' => false, + 'split_any' => false, + 'send_topic' => false, + 'make_sticky' => false, + 'move' => true, + 'lock' => true, + 'delete' => true, + 'post_reply' => true, + 'modify_replies' => false, + 'remove_replies' => false, + 'announce_topic' => false, + ), + 'post' => array( + 'remove' => true, + 'modify' => true, + 'report_any' => false, + ), + 'poll' => array( + 'poll_view' => false, + 'poll_vote' => false, + 'poll_post' => false, + 'poll_add' => true, + 'poll_edit' => true, + 'poll_lock' => true, + 'poll_remove' => true, + ), + 'notification' => array( + 'mark_any_notify' => false, + 'mark_notify' => false, + ), + 'attachment' => array( + 'view_attachments' => false, + 'post_attachment' => false, + ) + ) + ); + + // This is just a helpful array of permissions guests... cannot have. + $non_guest_permissions = array( + 'karma_edit', + 'pm_read', + 'pm_send', + 'profile_identity', + 'profile_extra', + 'profile_title', + 'profile_remove', + 'profile_remote_avatar', + 'poll_vote', + 'mark_any_notify', + 'mark_notify', + ); + + // All permission groups that will be shown in the left column. + $leftPermissionGroups = array( + 'general', + 'calendar', + 'maintenance', + 'member_admin', + 'general_board', + 'topic', + 'post', + ); + + $context['permissions'] = array(); + foreach ($permissionList as $permissionType => $permissionGroups) + { + $context['permissions'][$permissionType] = array( + 'id' => $permissionType, + 'columns' => array( + 'left' => array(), + 'right' => array() + ) + ); + foreach ($permissionGroups as $permissionGroup => $permissionArray) + { + $position = in_array($permissionGroup, $leftPermissionGroups) ? 'left' : 'right'; + $context['permissions'][$permissionType]['columns'][$position][$permissionGroup] = array( + 'type' => $permissionType, + 'id' => $permissionGroup, + 'name' => &$txt['permissiongroup_' . $permissionGroup], + 'icon' => isset($txt['permissionicon_' . $permissionGroup]) ? $txt['permissionicon_' . $permissionGroup] : $txt['permissionicon'], + 'help' => isset($txt['permissionhelp_' . $permissionGroup]) ? $txt['permissionhelp_' . $permissionGroup] : '', + 'permissions' => array() + ); + + foreach ($permissionArray as $perm => $has_own_any) + { + if (isset($context['group']['id']) && $context['group']['id'] == -1 && in_array($perm, $non_guest_permissions)) + continue; + + $context['permissions'][$permissionType]['columns'][$position][$permissionGroup]['permissions'][$perm] = array( + 'id' => $perm, + 'name' => &$txt['permissionname_' . $perm], + 'show_help' => isset($txt['permissionhelp_' . $perm]), + 'has_own_any' => $has_own_any, + 'own' => array( + 'id' => $perm . '_own', + 'name' => $has_own_any ? $txt['permissionname_' . $perm . '_own'] : '' + ), + 'any' => array( + 'id' => $perm . '_any', + 'name' => $has_own_any ? $txt['permissionname_' . $perm . '_any'] : '' + ) + ); + } + + if (empty($context['permissions'][$permissionType]['columns'][$position][$permissionGroup]['permissions'])) + unset($context['permissions'][$permissionType]['columns'][$position][$permissionGroup]); + } + } +} + +?> \ No newline at end of file diff --git a/Sources/ManagePermissions.php~ b/Sources/ManagePermissions.php~ new file mode 100644 index 0000000..af35ce5 --- /dev/null +++ b/Sources/ManagePermissions.php~ @@ -0,0 +1,1146 @@ + 'SetQuickGroups', + 'quickboard' => 'SetQuickBoards', + 'modify' => 'ModifyMembergroup', + 'modify2' => 'ModifyMembergroup2', + 'switch' => 'SwitchBoard', + ); + + if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']])) + { + $sa = $subActions[$_REQUEST['sa']]; + unset($subActions); + + $sa(); + } + else + PermissionIndex(); +} + +function PermissionIndex() +{ + global $db_prefix, $txt, $scripturl, $context, $settings; + + $context['page_title'] = $txt['permissions_title']; + + // Load all the permissions. We'll need them in the template. + loadAllPermissions(); + + // Determine the number of ungrouped members. + $request = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}members + WHERE ID_GROUP = 0", __FILE__, __LINE__); + list ($num_members) = mysql_fetch_row($request); + mysql_free_result($request); + + // Fill the context variable with 'Guests' and 'Ungrouped Members'. + $context['groups'] = array( + -1 => array( + 'id' => -1, + 'name' => $txt['membergroups_guests'], + 'num_members' => $txt['membergroups_guests_na'], + 'allow_delete' => false, + 'allow_modify' => true, + 'can_search' => false, + 'href' => '', + 'link' => '', + 'is_post_group' => false, + 'color' => '', + 'stars' => '', + 'num_permissions' => array( + 'allowed' => 0, + 'denied' => 0 + ), + 'access' => false + ), + 0 => array( + 'id' => 0, + 'name' => $txt['membergroups_members'], + 'num_members' => $num_members, + 'allow_delete' => false, + 'allow_modify' => true, + 'can_search' => true, + 'href' => $scripturl . '?action=viewmembers;sa=query;params=' . base64_encode('ID_GROUP = 0'), + 'link' => '' . $num_members . '', + 'is_post_group' => false, + 'color' => '', + 'stars' => '', + 'num_permissions' => array( + 'allowed' => 0, + 'denied' => 0 + ), + 'access' => false + ), + ); + + // Query the database defined membergroups. + $query = db_query(" + SELECT mg.ID_GROUP, mg.groupName, mg.minPosts, mg.onlineColor, mg.stars, COUNT(mem.ID_MEMBER) AS num_members + FROM {$db_prefix}membergroups AS mg + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_GROUP = mg.ID_GROUP OR FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR mg.ID_GROUP = mem.ID_POST_GROUP) + GROUP BY mg.ID_GROUP + ORDER BY mg.minPosts, IF(mg.ID_GROUP < 4, mg.ID_GROUP, 4), mg.groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($query)) + { + $row['stars'] = explode('#', $row['stars']); + $context['groups'][$row['ID_GROUP']] = array( + 'id' => $row['ID_GROUP'], + 'name' => $row['groupName'], + 'num_members' => $row['ID_GROUP'] != 3 ? $row['num_members'] : $txt['membergroups_guests_na'], + 'allow_delete' => $row['ID_GROUP'] > 4, + 'allow_modify' => $row['ID_GROUP'] > 1, + 'can_search' => $row['ID_GROUP'] != 3, + 'href' => $scripturl . '?action=viewmembers;sa=query;params=' . base64_encode($row['minPosts'] == -1 ? "ID_GROUP = $row[ID_GROUP] OR FIND_IN_SET($row[ID_GROUP], additionalGroups)" : "ID_POST_GROUP = $row[ID_GROUP]"), + 'link' => '' . $row['num_members'] . '', + 'is_post_group' => $row['minPosts'] != -1, + 'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'], + 'stars' => !empty($row['stars'][0]) && !empty($row['stars'][1]) ? str_repeat('*', $row['stars'][0]) : '', + 'num_permissions' => array( + 'allowed' => $row['ID_GROUP'] == 1 ? '(' . $txt['permissions_all'] . ')' : 0, + 'denied' => $row['ID_GROUP'] == 1 ? '(' . $txt['permissions_none'] . ')' : 0 + ), + 'access' => false + ); + } + mysql_free_result($query); + + $board_groups = array(); + foreach ($context['groups'] as $group) + if ($group['allow_modify']) + $board_groups[$group['id']] = array( + 'id' => &$group['id'], + 'name' => &$group['name'], + 'num_permissions' => array( + 'allowed' => 0, + 'denied' => 0 + ), + ); + + if (empty($_REQUEST['boardid'])) + { + $request = db_query(" + SELECT b.ID_BOARD, b.name, COUNT(mods.ID_MEMBER) AS moderators, b.memberGroups, b.use_local_permissions, b.childLevel + FROM ({$db_prefix}boards AS b, {$db_prefix}categories AS c) + LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD) + WHERE c.ID_CAT = b.ID_CAT + GROUP BY b.ID_BOARD + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['boards'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + $row['memberGroups'] = explode(',', $row['memberGroups']); + $context['boards'][$row['ID_BOARD']] = array( + 'id' => $row['ID_BOARD'], + 'child_level' => $row['childLevel'], + 'name' => $row['name'], + 'num_moderators' => $row['moderators'], + 'public' => in_array(0, $row['memberGroups']) || in_array(-1, $row['memberGroups']), + 'membergroups' => $row['memberGroups'], + 'use_local_permissions' => $row['use_local_permissions'] == 1, + 'groups' => $board_groups + ); + } + mysql_free_result($request); + + $request = db_query(" + SELECT ID_GROUP, COUNT(permission) AS numPermissions, addDeny + FROM {$db_prefix}permissions + GROUP BY ID_GROUP, addDeny", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + if (isset($context['groups'][(int) $row['ID_GROUP']])) + $context['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' : 'allowed'] = $row['numPermissions']; + mysql_free_result($request); + + $request = db_query(" + SELECT ID_BOARD, ID_GROUP, COUNT(permission) AS numPermissions, addDeny + FROM {$db_prefix}board_permissions + GROUP BY ID_BOARD, ID_GROUP, addDeny", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if ($row['ID_BOARD'] == 0) + { + if (isset($context['groups'][(int) $row['ID_GROUP']])) + $context['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' : 'allowed'] += $row['numPermissions']; + } + elseif (isset($context['boards'][$row['ID_BOARD']]) && isset($context['boards'][$row['ID_BOARD']]['groups'][(int) $row['ID_GROUP']])) + $context['boards'][$row['ID_BOARD']]['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' : 'allowed'] = $row['numPermissions']; + } + mysql_free_result($request); + } + else + { + $_REQUEST['boardid'] = (int) $_REQUEST['boardid']; + + $request = db_query(" + SELECT ID_BOARD, ID_GROUP, COUNT(permission) AS numPermissions, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $_REQUEST[boardid] + GROUP BY ID_BOARD, ID_GROUP, addDeny", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if (isset($context['groups'][(int) $row['ID_GROUP']])) + $context['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' : 'allowed'] += $row['numPermissions']; + } + mysql_free_result($request); + + $context['board'] = array( + 'id' => $_REQUEST['boardid'] + ); + + // Load all the boards that we can set permissions off... + $request = db_query(" + SELECT ID_BOARD, name + FROM {$db_prefix}boards + WHERE ID_BOARD != $_REQUEST[boardid] + AND use_local_permissions = 1", __FILE__, __LINE__); + $context['boards'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['copy_boards'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'] + ); + mysql_free_result($request); + + $request = db_query(" + SELECT name, memberGroups + FROM {$db_prefix}boards + WHERE ID_BOARD = $_REQUEST[boardid] + LIMIT 1", __FILE__, __LINE__); + list ($context['board']['name'], $groups) = mysql_fetch_row($request); + mysql_free_result($request); + + $groups = explode(',', $groups); + foreach ($groups as $group) + { + if ($group !== '' && isset($context['groups'][(int) $group])) + $context['groups'][(int) $group]['access'] = true; + } + } +} + +function SetQuickGroups() +{ + global $db_prefix; + + checkSession(); + + // Make sure only one of the quick options was selected. + if ((!empty($_POST['predefined']) && ((isset($_POST['copy_from']) && $_POST['copy_from'] != 'empty') || !empty($_POST['permissions']))) || (!empty($_POST['copy_from']) && $_POST['copy_from'] != 'empty' && !empty($_POST['permissions']))) + fatal_lang_error('permissions_only_one_option'); + + if (empty($_POST['group']) || !is_array($_POST['group'])) + $_POST['group'] = array(); + + // Only accept numeric values for selected membergroups. + foreach ($_POST['group'] as $id => $group_id) + $_POST['group'][$id] = (int) $group_id; + $_POST['group'] = array_unique($_POST['group']); + + if (empty($_REQUEST['boardid'])) + $_REQUEST['boardid'] = 0; + else + $_REQUEST['boardid'] = (int) $_REQUEST['boardid']; + + if (isset($_POST['access'])) + { + foreach ($_POST['access'] as $k => $v) + $_POST['access'][$k] = (int) $v; + $access = implode(',', $_POST['access']); + } + else + $access = ''; + + db_query(" + UPDATE {$db_prefix}boards + SET memberGroups = '$access' + WHERE ID_BOARD = $_REQUEST[boardid] + LIMIT 1", __FILE__, __LINE__); + + // No groups where selected. + if (empty($_POST['group'])) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + // Set a predefined permission profile. + if (!empty($_POST['predefined'])) + { + // Make sure it's a predefined permission set we expect. + if (!in_array($_POST['predefined'], array('restrict', 'standard', 'moderator', 'maintenance'))) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + foreach ($_POST['group'] as $group_id) + { + if (!empty($_REQUEST['boardid'])) + setPermissionLevel($_POST['predefined'], $group_id, $_REQUEST['boardid']); + else + setPermissionLevel($_POST['predefined'], $group_id); + } + } + // Set the permissions of the selected groups to that of their permissions in a different board. + elseif (isset($_POST['from_board']) && $_POST['from_board'] != 'empty') + { + // Just checking the input. + if (!is_numeric($_POST['from_board'])) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + // Fetch all the board permissions for these groups. + $request = db_query(" + SELECT ID_GROUP, permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $_POST[from_board] + AND ID_GROUP IN (" . implode(',', $_POST['group']) . ")", __FILE__, __LINE__); + + $target_perms = array(); + while ($row = mysql_fetch_assoc($request)) + $target_perms[] = "('$row[permission]', $row[ID_GROUP], $_REQUEST[boardid], $row[addDeny])"; + mysql_free_result($request); + + // Delete the previous global board permissions... + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP IN (" . implode(', ', $_POST['group']) . ") + AND ID_BOARD = $_REQUEST[boardid]", __FILE__, __LINE__); + + // And insert the copied permissions. + if (!empty($target_perms)) + { + db_query(" + INSERT IGNORE INTO {$db_prefix}board_permissions + (permission, ID_GROUP, ID_BOARD, addDeny) + VALUES " . implode(',', $target_perms), __FILE__, __LINE__); + } + } + // Set a permission profile based on the permissions of a selected group. + elseif ($_POST['copy_from'] != 'empty') + { + // Just checking the input. + if (!is_numeric($_POST['copy_from'])) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + // Make sure the group we're copying to is never included. + $_POST['group'] = array_diff($_POST['group'], array($_POST['copy_from'])); + + // No groups left? Too bad. + if (empty($_POST['group'])) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + if (empty($_REQUEST['boardid'])) + { + // Retrieve current permissions of group. + $request = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}permissions + WHERE ID_GROUP = $_POST[copy_from]", __FILE__, __LINE__); + $target_perm = array(); + while ($row = mysql_fetch_assoc($request)) + $target_perm[$row['permission']] = $row['addDeny']; + mysql_free_result($request); + + $insert_string = ''; + foreach ($_POST['group'] as $group_id) + foreach ($target_perm as $perm => $addDeny) + $insert_string .= "('$perm', $group_id, $addDeny),"; + + // Delete the previous permissions... + db_query(" + DELETE FROM {$db_prefix}permissions + WHERE ID_GROUP IN (" . implode(', ', $_POST['group']) . ")", __FILE__, __LINE__); + + if (!empty($insert_string)) + { + // Cut off the last comma. + $insert_string = substr($insert_string, 0, -1); + + // ..and insert the new ones. + db_query(" + INSERT IGNORE INTO {$db_prefix}permissions + (permission, ID_GROUP, addDeny) + VALUES $insert_string", __FILE__, __LINE__); + } + } + + // Now do the same for the board permissions. + $request = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_GROUP = $_POST[copy_from] + AND ID_BOARD = $_REQUEST[boardid]", __FILE__, __LINE__); + $target_perm = array(); + while ($row = mysql_fetch_assoc($request)) + $target_perm[$row['permission']] = $row['addDeny']; + mysql_free_result($request); + + $insert_string = ''; + foreach ($_POST['group'] as $group_id) + foreach ($target_perm as $perm => $addDeny) + $insert_string .= "('$perm', $group_id, $_REQUEST[boardid], $addDeny),"; + + // Delete the previous global board permissions... + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP IN (" . implode(', ', $_POST['group']) . ") + AND ID_BOARD = $_REQUEST[boardid]", __FILE__, __LINE__); + + // And insert the copied permissions. + if (!empty($insert_string)) + { + $insert_string = substr($insert_string, 0, -1); + + db_query(" + INSERT IGNORE INTO {$db_prefix}board_permissions + (permission, ID_GROUP, ID_BOARD, addDeny) + VALUES $insert_string", __FILE__, __LINE__); + } + } + // Set or unset a certain permission for the selected groups. + elseif (!empty($_POST['permissions'])) + { + // Unpack two variables that were transported. + list ($permissionType, $permission) = explode('/', $_POST['permissions']); + + // Check whether our input is within expected range. + if (!in_array($_POST['add_remove'], array('add', 'clear', 'deny')) || !in_array($permissionType, array('membergroup', 'board'))) + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); + + if ($_POST['add_remove'] == 'clear') + { + if ($permissionType == 'membergroup') + db_query(" + DELETE FROM {$db_prefix}permissions + WHERE ID_GROUP IN (" . implode(', ', $_POST['group']) . ") + AND permission = '$permission'", __FILE__, __LINE__); + else + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP IN (" . implode(', ', $_POST['group']) . ") + AND ID_BOARD = $_REQUEST[boardid] + AND permission = '$permission'", __FILE__, __LINE__); + } + // Add a permission (either 'set' or 'deny'). + else + { + $addDeny = $_POST['add_remove'] == 'add' ? '1' : '0'; + if ($permissionType == 'membergroup') + db_query(" + REPLACE INTO {$db_prefix}permissions + (permission, ID_GROUP, addDeny) + VALUES + ('$permission', " . implode(", $addDeny), + ('$permission', ", $_POST['group']) . ", $addDeny)", __FILE__, __LINE__); + // Board permissions go into the other table. + else + db_query(" + REPLACE INTO {$db_prefix}board_permissions + (permission, ID_GROUP, ID_BOARD, addDeny) + VALUES + ('$permission', " . implode(", $_REQUEST[boardid], $addDeny), + ('$permission', ", $_POST['group']) . ", $_REQUEST[boardid], $addDeny)", __FILE__, __LINE__); + } + } + + redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']); +} + +// Switch a board from local to global permissions or v.v. +function SwitchBoard() +{ + global $db_prefix; + + // Security above all. + checkSession('get'); + validateSession(); + $_GET['boardid'] = (int) $_GET['boardid']; + + // Make sure the board exists and can be switched to $_GET['to']. + $request = db_query(" + SELECT ID_BOARD + FROM {$db_prefix}boards + WHERE ID_BOARD = $_GET[boardid] + AND use_local_permissions = " . ($_GET['to'] == 'local' ? '0' : '1') . " + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) != 1) + { + if ($_GET['to'] == 'local') + PermissionIndex(); + else + redirectexit('action=permissions'); + return; + } + mysql_free_result($request); + + // Copy the global permissions to the specific board. + if ($_GET['to'] == 'local') + { + $request = db_query(" + SELECT ID_GROUP, permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_BOARD = 0", __FILE__, __LINE__); + $insertRows = array(); + while ($row = mysql_fetch_assoc($request)) + $insertRows[] = "($row[ID_GROUP], $_GET[boardid], '$row[permission]', $row[addDeny])"; + mysql_free_result($request); + + // Reset the current local permissions. + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $_GET[boardid]", __FILE__, __LINE__); + + if (!empty($insertRows)) + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_GROUP, ID_BOARD, permission, addDeny) + VALUES " . implode(", + ", $insertRows), __FILE__, __LINE__); + } + + // Switch back to inherited permissions (delete all local permissions). + else + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $_GET[boardid]", __FILE__, __LINE__); + + // Update the board setting. + db_query(" + UPDATE {$db_prefix}boards + SET use_local_permissions = " . ($_GET['to'] == 'local' ? '1' : '0') . " + WHERE ID_BOARD = $_GET[boardid]", __FILE__, __LINE__); + + if ($_GET['to'] == 'local') + PermissionIndex(); + else + redirectexit('action=permissions'); +} + +function ModifyMembergroup() +{ + global $db_prefix, $context, $txt; + + $context['group']['id'] = (int) $_GET['id']; + + loadAllPermissions(); + + if ($context['group']['id'] > 0) + { + $result = db_query(" + SELECT groupName + FROM {$db_prefix}membergroups + WHERE ID_GROUP = {$context['group']['id']} + LIMIT 1", __FILE__, __LINE__); + list ($context['group']['name']) = mysql_fetch_row($result); + mysql_free_result($result); + } + elseif ($context['group']['id'] == -1) + $context['group']['name'] = &$txt['membergroups_guests']; + else + $context['group']['name'] = &$txt['membergroups_members']; + + $context['board']['id'] = empty($_GET['boardid']) ? 0 : (int) $_GET['boardid']; + $context['local'] = !empty($_GET['boardid']); + + if ($context['local']) + { + $request = db_query(" + SELECT name + FROM {$db_prefix}boards + WHERE ID_BOARD = {$context['board']['id']} + AND use_local_permissions = 1", __FILE__, __LINE__); + // Either the board was not found or the permissions are set to global. + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf232'); + list ($context['board']['name']) = mysql_fetch_row($request); + mysql_free_result($request); + } + + // Fetch the current permissions. + $permissions = array( + 'membergroup' => array('allowed' => array(), 'denied' => array()), + 'board' => array('allowed' => array(), 'denied' => array()) + ); + if ($context['group']['id'] != 3 && !$context['local']) + { + $result = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}permissions + WHERE ID_GROUP = $_GET[id]", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + $permissions['membergroup'][empty($row['addDeny']) ? 'denied' : 'allowed'][] = $row['permission']; + mysql_free_result($result); + $context['permissions']['membergroup']['show'] = true; + } + else + $context['permissions']['membergroup']['show'] = false; + + // Fetch current board permissions. + $result = db_query(" + SELECT permission, addDeny + FROM {$db_prefix}board_permissions + WHERE ID_GROUP = {$context['group']['id']} + AND ID_BOARD = {$context['board']['id']}", __FILE__, __LINE__); + + while ($row = mysql_fetch_assoc($result)) + $permissions['board'][empty($row['addDeny']) ? 'denied' : 'allowed'][] = $row['permission']; + mysql_free_result($result); + $context['permissions']['board']['show'] = true; + + // Loop through each permission and set whether it's checked. + foreach ($context['permissions'] as $permissionType => $tmp) + { + foreach ($tmp['columns'] as $position => $permissionGroups) + { + foreach ($permissionGroups as $permissionGroup => $permissionArray) + { + foreach ($permissionArray['permissions'] as $perm) + { + // Create a shortcut for the current permission. + $curPerm = &$context['permissions'][$permissionType]['columns'][$position][$permissionGroup]['permissions'][$perm['id']]; + if ($perm['has_own_any']) + { + $curPerm['any']['select'] = in_array($perm['id'] . '_any', $permissions[$permissionType]['allowed']) ? 'on' : (in_array($perm['id'] . '_any', $permissions[$permissionType]['denied']) ? 'denied' : 'off'); + $curPerm['own']['select'] = in_array($perm['id'] . '_own', $permissions[$permissionType]['allowed']) ? 'on' : (in_array($perm['id'] . '_own', $permissions[$permissionType]['denied']) ? 'denied' : 'off'); + } + else + $curPerm['select'] = in_array($perm['id'], $permissions[$permissionType]['denied']) ? 'denied' : (in_array($perm['id'], $permissions[$permissionType]['allowed']) ? 'on' : 'off'); + } + } + } + } + $context['sub_template'] = 'modify_group'; + $context['page_title'] = $txt['permissions_modify_group']; +} + +function ModifyMembergroup2() +{ + global $db_prefix; + + checkSession(); + + $_GET['id'] = (int) $_GET['id']; + $_GET['boardid'] = (int) $_GET['boardid']; + + $givePerms = array('membergroup' => array(), 'board' => array()); + + // Prepare all permissions that were set or denied for addition to the DB. + foreach ($_POST['perm'] as $perm_type => $perm_array) + foreach ($perm_array as $permission => $value) + if ($value == 'on' || $value == 'deny') + $givePerms[$perm_type][] = "$permission', " . ($value == 'on' ? '1' : '0'); + + // Insert the general permissions. + if ($_GET['id'] != 3 && empty($_GET['boardid'])) + { + db_query(" + DELETE FROM {$db_prefix}permissions + WHERE ID_GROUP = $_GET[id]", __FILE__, __LINE__); + if (!empty($givePerms['membergroup'])) + db_query(" + INSERT IGNORE INTO {$db_prefix}permissions + (ID_GROUP, permission, addDeny) + VALUES ($_GET[id], '" . implode("), + ($_GET[id], '", $givePerms['membergroup']) . ")", __FILE__, __LINE__); + } + + // Insert the boardpermissions. + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP = $_GET[id] + AND ID_BOARD = $_GET[boardid]", __FILE__, __LINE__); + if (!empty($givePerms['board'])) + db_query(" + INSERT IGNORE INTO {$db_prefix}board_permissions + (ID_GROUP, ID_BOARD, permission, addDeny) + VALUES ($_GET[id], $_GET[boardid], '" . implode("), + ($_GET[id], $_GET[boardid], '", $givePerms['board']) . ")", __FILE__, __LINE__); + + redirectexit('action=permissions;boardid=' . $_GET['boardid']); +} + +// Set the permission level for a specific board, group, or group for a board. +function setPermissionLevel($level, $group, $board = 'null') +{ + global $db_prefix; + + // Levels by group... restrict, standard, moderator, maintenance. + $groupLevels = array( + 'board' => array('inherit' => array()), + 'group' => array('inherit' => array()) + ); + // Levels by board... standard, publish, free. + $boardLevels = array('inherit' => array()); + + // Restrictive - ie. guests. + $groupLevels['global']['restrict'] = array( + 'search_posts', + 'calendar_view', + 'view_stats', + 'who_view', +'karmalog_view', + 'profile_view_own', + 'profile_identity_own', + ); + $groupLevels['board']['restrict'] = array( + 'poll_view', + 'post_new', + 'post_reply_own', + 'post_reply_any', + 'remove_own', + 'modify_own', + 'mark_any_notify', + 'mark_notify', + 'report_any', + 'send_topic', + ); + + // Standard - ie. members. They can do anything Restrictive can. + $groupLevels['global']['standard'] = array_merge($groupLevels['global']['restrict'], array( + 'view_mlist', + 'karma_edit', + 'pm_read', + 'pm_send', + 'profile_view_any', + 'profile_extra_own', + 'profile_remote_avatar', + 'profile_remove_own', + + 'googleMap_view', + 'googleMap_place', + )); + $groupLevels['board']['standard'] = array_merge($groupLevels['board']['restrict'], array( + 'poll_vote', + 'poll_edit_own', + 'poll_post', + 'poll_add_own', + 'post_attachment', + 'lock_own', + 'delete_own', + 'view_attachments', + )); + + // Moderator - ie. moderators :P. They can do what standard can, and more. + $groupLevels['global']['moderator'] = array_merge($groupLevels['global']['standard'], array( + 'calendar_post', + 'calendar_edit_own', + )); + $groupLevels['board']['moderator'] = array_merge($groupLevels['board']['standard'], array( + 'make_sticky', + 'poll_edit_any', + 'remove_any', + 'modify_any', + 'lock_any', + 'delete_any', + 'move_any', + 'merge_any', + 'split_any', + 'poll_lock_any', + 'poll_remove_any', + 'poll_add_any', + )); + + // Maintenance - wannabe admins. They can do almost everything. + $groupLevels['global']['maintenance'] = array_merge($groupLevels['global']['moderator'], array( + 'manage_attachments', + 'manage_smileys', + 'manage_boards', + 'moderate_forum', + 'manage_membergroups', + 'manage_bans', + 'admin_forum', + 'manage_permissions', + 'edit_news', + 'calendar_edit_any', + 'profile_identity_any', + 'profile_extra_any', + 'profile_title_any', + )); + $groupLevels['board']['maintenance'] = array_merge($groupLevels['board']['moderator'], array( + )); + + // Standard - nothing above the group permissions. (this SHOULD be empty.) + $boardLevels['standard'] = array( + ); + + // Locked - just that, you can't post here. + $boardLevels['locked'] = array( + 'poll_view', + 'mark_notify', + 'report_any', + 'send_topic', + 'view_attachments', + ); + + // Publisher - just a little more... + $boardLevels['publish'] = array_merge($boardLevels['locked'], array( + 'post_new', + 'post_reply_own', + 'post_reply_any', + 'remove_own', + 'modify_own', + 'mark_any_notify', + 'remove_replies', + 'modify_replies', + 'poll_vote', + 'poll_edit_own', + 'poll_post', + 'poll_add_own', + 'poll_remove_own', + 'post_attachment', + 'lock_own', + 'delete_own', + )); + + // Free for All - Scary. Just scary. + $boardLevels['free'] = array_merge($boardLevels['publish'], array( + 'poll_lock_any', + 'poll_edit_any', + 'poll_add_any', + 'poll_remove_any', + 'make_sticky', + 'lock_any', + 'delete_any', + 'remove_any', + 'split_any', + 'merge_any', + 'modify_any', + )); + + // Setting group permissions. + if ($board === 'null' && $group !== 'null') + { + $group = (int) $group; + + if (empty($groupLevels['global'][$level])) + return; + + db_query(" + DELETE FROM {$db_prefix}permissions + WHERE ID_GROUP = $group", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP = $group + AND ID_BOARD = 0", __FILE__, __LINE__); + + db_query(" + INSERT INTO {$db_prefix}permissions + (ID_GROUP, permission) + VALUES ($group, '" . implode("'), + ($group, '", $groupLevels['global'][$level]) . "')", __FILE__, __LINE__); + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_BOARD, ID_GROUP, permission) + VALUES (0, $group, '" . implode("'), + (0, $group, '", $groupLevels['board'][$level]) . "')", __FILE__, __LINE__); + } + // Setting board permissions for a specific group. + elseif ($board !== 'null' && $group !== 'null') + { + $group = (int) $group; + $board = (int) $board; + + if (!empty($groupLevels['global'][$level])) + { + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_GROUP = $group + AND ID_BOARD = $board", __FILE__, __LINE__); + } + + if (!empty($groupLevels['board'][$level])) + { + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_BOARD, ID_GROUP, permission) + VALUES ($board, $group, '" . implode("'), + ($board, $group, '", $groupLevels['board'][$level]) . "')", __FILE__, __LINE__); + } + } + // Setting board permissions for all groups. + elseif ($board !== 'null' && $group === 'null') + { + $board = (int) $board; + + db_query(" + DELETE FROM {$db_prefix}board_permissions + WHERE ID_BOARD = $board", __FILE__, __LINE__); + + if (empty($boardLevels[$level])) + return; + + // Get all the groups... + $query = db_query(" + SELECT ID_GROUP + FROM {$db_prefix}membergroups + WHERE ID_GROUP > 3 + ORDER BY minPosts, IF(ID_GROUP < 4, ID_GROUP, 4), groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_row($query)) + { + $group = $row[0]; + + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_BOARD, ID_GROUP, permission) + VALUES ($board, $group, '" . implode("'), + ($board, $group, '", $boardLevels[$level]) . "')", __FILE__, __LINE__); + } + mysql_free_result($query); + + // Add permissions for ungrouped users. + db_query(" + INSERT INTO {$db_prefix}board_permissions + (ID_BOARD, ID_GROUP, permission) + VALUES ($board, 0, '" . implode("'), + ($board, 0, '", $boardLevels[$level]) . "')", __FILE__, __LINE__); + } + // $board and $group are both null! + else + fatal_lang_error(1, false); +} + +function loadAllPermissions() +{ + global $context, $txt; + +/* The format of this list is as follows: + 'permission_group' => array( + 'permissions_inside' => has_multiple_options, + ), + + It should be noted that if the permission_group starts with $ it is not treated as a permission. + However, if it does not start with $, it is treated as a normal permission. + $txt['permissionname_' . $permission] is used for the names of permissions. + $txt['permissiongroup_' . $group] is used for names of groups that start with $. + $txt['permissionhelp_' . $permission] is used for extended information. + $txt['permissionicon_' . $permission_or_group] is used for the icons, if it exists. +*/ + + $permissionList = array( + 'membergroup' => array( + 'general' => array( + 'view_stats' => false, + 'view_mlist' => false, + 'who_view' => false, +'karmalog_view' => false, + 'search_posts' => false, + 'karma_edit' => false, + + 'googleMap_view' => false, + 'googleMap_place' => false, + ), + 'pm' => array( + 'pm_read' => false, + 'pm_send' => false, + ), +'pcomments' => array( + 'pcomments_view' => false, + 'pcomments_add' => false, + 'pcomments_edit_own' => false, + 'pcomments_edit_any' => false, + 'pcomments_delete_own' => false, + 'pcomments_delete_any' => false, + 'pcomments_autocomment' => false, + ), +'pcomments' => array( + 'pcomments_view' => false, + 'pcomments_add' => false, + 'pcomments_edit_own' => false, + 'pcomments_edit_any' => false, + 'pcomments_delete_own' => false, + 'pcomments_delete_any' => false, + 'pcomments_autocomment' => false, + ), +'pcomments' => array( + 'pcomments_view' => false, + 'pcomments_add' => false, + 'pcomments_edit_own' => false, + 'pcomments_edit_any' => false, + 'pcomments_delete_own' => false, + 'pcomments_delete_any' => false, + 'pcomments_autocomment' => false, + ), + 'calendar' => array( + 'calendar_view' => false, + 'calendar_post' => false, + 'calendar_edit' => true, + ), + 'maintenance' => array( + 'admin_forum' => false, + 'manage_boards' => false, + 'manage_attachments' => false, + 'manage_smileys' => false, + 'edit_news' => false, + ), + 'member_admin' => array( + 'moderate_forum' => false, + 'manage_membergroups' => false, + 'manage_permissions' => false, + 'manage_bans' => false, + 'send_mail' => false, + ), + 'profile' => array( + 'profile_view' => true, + 'profile_identity' => true, + 'profile_extra' => true, + 'profile_title' => true, + 'profile_remove' => true, + 'profile_remote_avatar' => false, + ) + , + 'visual_warn' => array( + 'visual_warn_any' => false, + 'visual_approve_any' => false, + ), + 'googlebot' => array( + 'googlebot_view' => false, + ), + ), + 'board' => array( + 'general_board' => array( + 'moderate_board' => false, + ), + 'topic' => array( + 'post_new' => false, + 'merge_any' => false, + 'split_any' => false, + 'send_topic' => false, + 'make_sticky' => false, + 'move' => true, + 'lock' => true, + 'delete' => true, + 'post_reply' => true, + 'modify_replies' => false, + 'remove_replies' => false, + 'announce_topic' => false, + ), + 'post' => array( + 'remove' => true, + 'modify' => true, + 'report_any' => false, + ), + 'poll' => array( + 'poll_view' => false, + 'poll_vote' => false, + 'poll_post' => false, + 'poll_add' => true, + 'poll_edit' => true, + 'poll_lock' => true, + 'poll_remove' => true, + ), + 'notification' => array( + 'mark_any_notify' => false, + 'mark_notify' => false, + ), + 'attachment' => array( + 'view_attachments' => false, + 'post_attachment' => false, + ) + ) + ); + + // This is just a helpful array of permissions guests... cannot have. + $non_guest_permissions = array( + 'karma_edit', + 'pm_read', + 'pm_send', + 'profile_identity', + 'profile_extra', + 'profile_title', + 'profile_remove', + 'profile_remote_avatar', + 'poll_vote', + 'mark_any_notify', + 'mark_notify', + ); + + // All permission groups that will be shown in the left column. + $leftPermissionGroups = array( + 'general', + 'calendar', + 'maintenance', + 'member_admin', + 'general_board', + 'topic', + 'post', + ); + + $context['permissions'] = array(); + foreach ($permissionList as $permissionType => $permissionGroups) + { + $context['permissions'][$permissionType] = array( + 'id' => $permissionType, + 'columns' => array( + 'left' => array(), + 'right' => array() + ) + ); + foreach ($permissionGroups as $permissionGroup => $permissionArray) + { + $position = in_array($permissionGroup, $leftPermissionGroups) ? 'left' : 'right'; + $context['permissions'][$permissionType]['columns'][$position][$permissionGroup] = array( + 'type' => $permissionType, + 'id' => $permissionGroup, + 'name' => &$txt['permissiongroup_' . $permissionGroup], + 'icon' => isset($txt['permissionicon_' . $permissionGroup]) ? $txt['permissionicon_' . $permissionGroup] : $txt['permissionicon'], + 'help' => isset($txt['permissionhelp_' . $permissionGroup]) ? $txt['permissionhelp_' . $permissionGroup] : '', + 'permissions' => array() + ); + + foreach ($permissionArray as $perm => $has_own_any) + { + if (isset($context['group']['id']) && $context['group']['id'] == -1 && in_array($perm, $non_guest_permissions)) + continue; + + $context['permissions'][$permissionType]['columns'][$position][$permissionGroup]['permissions'][$perm] = array( + 'id' => $perm, + 'name' => &$txt['permissionname_' . $perm], + 'show_help' => isset($txt['permissionhelp_' . $perm]), + 'has_own_any' => $has_own_any, + 'own' => array( + 'id' => $perm . '_own', + 'name' => $has_own_any ? $txt['permissionname_' . $perm . '_own'] : '' + ), + 'any' => array( + 'id' => $perm . '_any', + 'name' => $has_own_any ? $txt['permissionname_' . $perm . '_any'] : '' + ) + ); + } + + if (empty($context['permissions'][$permissionType]['columns'][$position][$permissionGroup]['permissions'])) + unset($context['permissions'][$permissionType]['columns'][$position][$permissionGroup]); + } + } +} + +?> \ No newline at end of file diff --git a/Sources/ManageSmileys.php b/Sources/ManageSmileys.php new file mode 100644 index 0000000..80fe58b --- /dev/null +++ b/Sources/ManageSmileys.php @@ -0,0 +1,852 @@ + 'AddSmiley', + 'editsets' => 'EditSmileySets', + 'editsmileys' => 'EditSmileys', + 'import' => 'EditSmileySets', + 'modifyset' => 'EditSmileySets', + 'modifysmiley' => 'EditSmileys', + 'setorder' => 'EditSmileyOrder', + 'settings' => 'EditSmileySettings', + 'install' => 'InstallSmileySet' + ); + + // Default the sub-action to 'edit smiley settings'. + $_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'settings'; + + $context['page_title'] = &$txt['smileys_manage']; + $context['sub_action'] = $_REQUEST['sa']; + $context['sub_template'] = &$context['sub_action']; + + // Call the right function for this sub-acton. + $subActions[$_REQUEST['sa']](); +} + +function EditSmileySettings() +{ + global $modSettings, $context, $settings, $db_prefix, $txt, $boarddir; + + $context['explain_text'] = &$txt['smiley_settings_explain']; + + // A form was submitted. + if (isset($_POST['sc'])) + { + checkSession(); + $context['smiley_sets'] = explode(',', $modSettings['smiley_sets_known']); + updateSettings(array( + 'smiley_sets_default' => empty($context['smiley_sets'][$_POST['default_smiley_set']]) ? 'default' : $context['smiley_sets'][$_POST['default_smiley_set']], + 'smiley_sets_enable' => isset($_POST['smiley_sets_enable']) ? '1' : '0', + 'smiley_enable' => isset($_POST['smiley_enable']) ? '1' : '0', + 'smileys_url' => $_POST['smiley_sets_url'], + 'smileys_dir' => $_POST['smiley_sets_dir'], + )); + } + $context['smileys_dir'] = empty($modSettings['smileys_dir']) ? $boarddir . '/Smileys' : $modSettings['smileys_dir']; + $context['smileys_dir_found'] = is_dir($context['smileys_dir']); + + $context['smiley_sets'] = explode(',', $modSettings['smiley_sets_known']); + $set_names = explode("\n", $modSettings['smiley_sets_names']); + foreach ($context['smiley_sets'] as $i => $set) + $context['smiley_sets'][$i] = array( + 'id' => $i, + 'path' => $set, + 'name' => $set_names[$i], + 'selected' => $set == $modSettings['smiley_sets_default'] + ); +} + +function EditSmileySets() +{ + global $modSettings, $context, $settings, $db_prefix, $txt, $boarddir; + + $context['explain_text'] = &$txt['smiley_editsets_explain']; + + // They must've been submitted a form. + if (isset($_POST['sc'])) + { + checkSession(); + + // Delete selected smiley sets. + if (!empty($_POST['delete'])) + { + $set_paths = explode(',', $modSettings['smiley_sets_known']); + $set_names = explode("\n", $modSettings['smiley_sets_names']); + foreach ($_POST['smiley_set'] as $id => $val) + if (isset($set_paths[$id]) && isset($set_names[$id]) && !empty($id)) + unset($set_paths[$id], $set_names[$id]); + + updateSettings(array( + 'smiley_sets_known' => implode(',', $set_paths), + 'smiley_sets_names' => implode("\n", $set_names), + 'smiley_sets_default' => in_array($modSettings['smiley_sets_default'], $set_paths) ? $modSettings['smiley_sets_default'] : $set_paths[0], + )); + } + + // Add a new smiley set. + elseif (!empty($_POST['add'])) + $context['sub_action'] = 'modifyset'; + + // Create or modify a smiley set. + elseif (isset($_POST['id'])) + { + $set_paths = explode(',', $modSettings['smiley_sets_known']); + $set_names = explode("\n", $modSettings['smiley_sets_names']); + + // Create a new smiley set. + if ($_POST['id'] == -1) + { + if (in_array($_POST['smiley_sets_path'], $set_paths)) + fatal_lang_error('smiley_set_already_exists'); + + updateSettings(array( + 'smiley_sets_known' => $modSettings['smiley_sets_known'] . ',' . $_POST['smiley_sets_path'], + 'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . $_POST['smiley_sets_name'], + 'smiley_sets_default' => empty($_POST['smiley_sets_default']) ? $modSettings['smiley_sets_default'] : $_POST['smiley_sets_path'], + )); + } + + // Modify an existing smiley set. + else + { + // Make sure the smiley set exists. + if (!isset($set_paths[$_POST['id']]) || !isset($set_names[$_POST['id']])) + fatal_lang_error('smiley_set_not_found'); + + // Make sure the path is not yet used by another smileyset. + if (in_array($_POST['smiley_sets_path'], $set_paths) && $_POST['smiley_sets_path'] != $set_paths[$_POST['id']]) + fatal_lang_error('smiley_set_path_already_used'); + + $set_paths[$_POST['id']] = $_POST['smiley_sets_path']; + $set_names[$_POST['id']] = $_POST['smiley_sets_name']; + updateSettings(array( + 'smiley_sets_known' => implode(',', $set_paths), + 'smiley_sets_names' => implode("\n", $set_names), + 'smiley_sets_default' => empty($_POST['smiley_sets_default']) ? $modSettings['smiley_sets_default'] : $_POST['smiley_sets_path'] + )); + } + + // The user might have checked to also import smileys. + if (!empty($_POST['smiley_sets_import'])) + ImportSmileys($_POST['smiley_sets_path']); + } + } + + // Load all available smileysets... + $context['smiley_sets'] = explode(',', $modSettings['smiley_sets_known']); + $set_names = explode("\n", $modSettings['smiley_sets_names']); + foreach ($context['smiley_sets'] as $i => $set) + $context['smiley_sets'][$i] = array( + 'id' => $i, + 'path' => $set, + 'name' => $set_names[$i], + 'selected' => $set == $modSettings['smiley_sets_default'] + ); + + // Importing any smileys from an existing set? + if ($context['sub_action'] == 'import') + { + checkSession('get'); + $_GET['id'] = (int) $_GET['id']; + + // Sanity check - then import. + if (isset($context['smiley_sets'][$_GET['id']])) + ImportSmileys($context['smiley_sets'][$_GET['id']]['path']); + + // Force the process to continue. + $context['sub_action'] = 'modifyset'; + } + // If we're modifying or adding a smileyset, some context info needs to be set. + if ($context['sub_action'] == 'modifyset') + { + $_GET['id'] = !isset($_GET['id']) ? -1 : (int) $_GET['id']; + if ($_GET['id'] == -1 || !isset($context['smiley_sets'][$_GET['id']])) + $context['current_set'] = array( + 'id' => '-1', + 'path' => '', + 'name' => '', + 'selected' => false, + 'is_new' => true, + ); + else + { + $context['current_set'] = &$context['smiley_sets'][$_GET['id']]; + $context['current_set']['is_new'] = false; + + // Calculate whether there are any smileys in the directory that can be imported. + if (!empty($modSettings['smiley_enable']) && !empty($modSettings['smileys_dir']) && is_dir($modSettings['smileys_dir'] . '/' . $context['current_set']['path'])) + { + $smileys = array(); + $dir = dir($modSettings['smileys_dir'] . '/' . $context['current_set']['path']); + while ($entry = $dir->read()) + { + if (in_array(strrchr($entry, '.'), array('.jpg', '.gif', '.jpeg', '.png'))) + $smileys[strtolower($entry)] = addslashes($entry); + } + $dir->close(); + + // Exclude the smileys that are already in the database. + $request = db_query(" + SELECT filename + FROM {$db_prefix}smileys + WHERE filename IN ('" . implode("', '", $smileys) . "')", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + if (isset($smileys[strtolower($row['filename'])])) + unset($smileys[strtolower($row['filename'])]); + mysql_free_result($request); + + $context['current_set']['can_import'] = count($smileys); + // Setup this string to look nice. + $txt['smiley_set_import_multiple'] = sprintf($txt['smiley_set_import_multiple'], $context['current_set']['can_import']); + } + } + + // Retrieve all potential smiley set directories. + $context['smiley_set_dirs'] = array(); + if (!empty($modSettings['smileys_dir']) && is_dir($modSettings['smileys_dir'])) + { + $dir = dir($modSettings['smileys_dir']); + while ($entry = $dir->read()) + { + if (!in_array($entry, array('.', '..')) && is_dir($modSettings['smileys_dir'] . '/' . $entry)) + $context['smiley_set_dirs'][] = array( + 'id' => $entry, + 'path' => $modSettings['smileys_dir'] . '/' . $entry, + 'selectable' => $entry == $context['current_set']['path'] || !in_array($entry, explode(',', $modSettings['smiley_sets_known'])), + 'current' => $entry == $context['current_set']['path'], + ); + } + $dir->close(); + } + } +} + +function AddSmiley() +{ + global $modSettings, $context, $settings, $db_prefix, $txt, $boarddir; + + $context['explain_text'] = &$txt['smiley_addsmiley_explain']; + + // Get a list of all known smiley sets. + $context['smileys_dir'] = empty($modSettings['smileys_dir']) ? $boarddir . '/Smileys' : $modSettings['smileys_dir']; + $context['smileys_dir_found'] = is_dir($context['smileys_dir']); + $context['smiley_sets'] = explode(',', $modSettings['smiley_sets_known']); + $set_names = explode("\n", $modSettings['smiley_sets_names']); + foreach ($context['smiley_sets'] as $i => $set) + $context['smiley_sets'][$i] = array( + 'id' => $i, + 'path' => $set, + 'name' => $set_names[$i], + 'selected' => $set == $modSettings['smiley_sets_default'] + ); + + // Submitting a form? + if (isset($_POST['sc'])) + { + checkSession(); + + // Some useful arrays... types we allow - and ports we don't! + $allowedTypes = array('jpeg', 'jpg', 'gif', 'png', 'bmp'); + $disabledFiles = array('con', 'com1', 'com2', 'com3', 'com4', 'prn', 'aux', 'lpt1', '.htaccess', 'index.php'); + + $_POST['smiley_code'] = htmltrim__recursive($_POST['smiley_code']); + $_POST['smiley_location'] = empty($_POST['smiley_location']) || $_POST['smiley_location'] > 2 || $_POST['smiley_location'] < 0 ? 0 : (int) $_POST['smiley_location']; + $_POST['smiley_filename'] = htmltrim__recursive($_POST['smiley_filename']); + + // Make sure some code was entered. + if (empty($_POST['smiley_code'])) + fatal_lang_error('smiley_has_no_code'); + + // Check whether the new code has duplicates. It should be unique. + $request = db_query(" + SELECT ID_SMILEY + FROM {$db_prefix}smileys + WHERE code = BINARY '$_POST[smiley_code]'", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + fatal_lang_error('smiley_not_unique'); + mysql_free_result($request); + + // If we are uploading - check all the smiley sets are writable! + if ($_POST['method'] != 'existing') + { + $writeErrors = array(); + foreach ($context['smiley_sets'] as $set) + { + if (!is_writable($context['smileys_dir'] . '/' . $set['path'])) + $writeErrors[] = $set['path']; + } + if (!empty($writeErrors)) + fatal_error($txt['smileys_upload_error_notwritable'] . ' ' . implode(', ', $writeErrors)); + } + + // Uploading just one smiley for all of them? + if (isset($_POST['sameall']) && isset($_FILES['uploadSmiley']['name']) && $_FILES['uploadSmiley']['name'] != '') + { + if (!is_uploaded_file($_FILES['uploadSmiley']['tmp_name'])) + fatal_lang_error('smileys_upload_error'); + + // Sorry, no spaces, dots, or anything else but letters allowed. + $_FILES['uploadSmiley']['name'] = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $_FILES['uploadSmiley']['name']); + + // We only allow image files - it's THAT simple - no messing around here... + if (!in_array(strtolower(substr(strrchr($_FILES['uploadSmiley']['name'], '.'), 1)), $allowedTypes)) + fatal_error($txt['smileys_upload_error_types'] . ' ' . implode(', ', $allowedTypes) . '.', false); + + // We only need the filename... + $destName = basename($_FILES['uploadSmiley']['name']); + + // Make sure they aren't trying to upload a nasty file - for their own good here! + if (in_array(strtolower($destName), $disabledFiles)) + fatal_lang_error('smileys_upload_error_illegal'); + + // Check if the file already exists... and if not move it to EVERY smiley set directory. + $i = 0; + // Keep going until we find a set the file doesn't exist in. (or maybe it exists in all of them?) + while (isset($context['smiley_sets'][$i]) && file_exists($context['smileys_dir'] . '/' . $context['smiley_sets'][$i]['path'] . '/' . $destName)) + $i++; + + // Okay, we're going to put the smiley right here, since it's not there yet! + if (isset($context['smiley_sets'][$i]['path'])) + { + $smileyLocation = $context['smileys_dir'] . '/' . $context['smiley_sets'][$i]['path'] . '/' . $destName; + move_uploaded_file($_FILES['uploadSmiley']['tmp_name'], $smileyLocation); + @chmod($currentPath, 0644); + + // Now, we want to move it from there to all the other sets. + for ($n = count($context['smiley_sets']); $i < $n; $i++) + { + $currentPath = $context['smileys_dir'] . '/' . $context['smiley_sets'][$i]['path'] . '/' . $destName; + + // The file is already there! Don't overwrite it! + if (file_exists($currentPath)) + continue; + + // Okay, so copy the first one we made to here. + copy($smileyLocation, $currentPath); + @chmod($currentPath, 0644); + } + } + + // Finally make sure it's saved correctly! + $_POST['smiley_filename'] = $destName; + } + // What about uploading several files? + elseif ($_POST['method'] != 'existing') + { + foreach ($_FILES as $name => $data) + { + if ($_FILES[$name]['name'] == '') + fatal_lang_error('smileys_upload_error_blank'); + + if (empty($newName)) + $newName = basename($_FILES[$name]['name']); + elseif (basename($_FILES[$name]['name']) != $newName) + fatal_lang_error('smileys_upload_error_name'); + } + + foreach ($context['smiley_sets'] as $i => $set) + { + if (!isset($_FILES['individual_' . $set['name']]['name']) || $_FILES['individual_' . $set['name']]['name'] == '') + continue; + + // Got one... + if (!is_uploaded_file($_FILES['individual_' . $set['name']]['tmp_name'])) + fatal_lang_error('smileys_upload_error'); + + // Sorry, no spaces, dots, or anything else but letters allowed. + $_FILES['individual_' . $set['name']]['name'] = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $_FILES['individual_' . $set['name']]['name']); + + // We only allow image files - it's THAT simple - no messing around here... + if (!in_array(strtolower(substr(strrchr($_FILES['individual_' . $set['name']]['name'], '.'), 1)), $allowedTypes)) + fatal_error($txt['smileys_upload_error_types'] . ' ' . implode(', ', $allowedTypes) . '.', false); + + // We only need the filename... + $destName = basename($_FILES['individual_' . $set['name']]['name']); + + // Make sure they aren't trying to upload a nasty file - for their own good here! + if (in_array(strtolower($destName), $disabledFiles)) + fatal_lang_error('smileys_upload_error_illegal'); + + // If the file exists - ignore it. + $smileyLocation = $context['smileys_dir'] . '/' . $set['path'] . '/' . $destName; + if (file_exists($smileyLocation)) + continue; + + // Finally - move the image! + move_uploaded_file($_FILES['individual_' . $set['name']]['tmp_name'], $smileyLocation); + @chmod($smileyLocation, 0644); + + // Should always be saved correctly! + $_POST['smiley_filename'] = $destName; + } + } + + // Also make sure a filename was given. + if (empty($_POST['smiley_filename'])) + fatal_lang_error('smiley_has_no_filename'); + + // Find the position on the right. + $smileyOrder = '0'; + if ($_POST['smiley_location'] != 1) + { + $request = db_query(" + SELECT MAX(smileyOrder) + 1 + FROM {$db_prefix}smileys + WHERE hidden = $_POST[smiley_location] + AND smileyRow = 0", __FILE__, __LINE__); + list ($smileyOrder) = mysql_fetch_row($request); + mysql_free_result($request); + + if (empty($smileyOrder)) + $smileyOrder = '0'; + } + db_query(" + INSERT INTO {$db_prefix}smileys + (code, filename, description, hidden, smileyOrder) + VALUES ('$_POST[smiley_code]', '$_POST[smiley_filename]', '$_POST[smiley_description]', $_POST[smiley_location], $smileyOrder)", __FILE__, __LINE__); + + // No errors? Out of here! + redirectexit('action=smileys;sa=editsmileys'); + } + + $context['selected_set'] = $modSettings['smiley_sets_default']; + + // Get all possible filenames for the smileys. + $context['filenames'] = array(); + if ($context['smileys_dir_found']) + { + foreach ($context['smiley_sets'] as $smiley_set) + { + if (!file_exists($context['smileys_dir'] . '/' . $smiley_set['path'])) + continue; + + $dir = dir($context['smileys_dir'] . '/' . $smiley_set['path']); + while ($entry = $dir->read()) + { + if (!in_array($entry, $context['filenames']) && in_array(strrchr($entry, '.'), array('.jpg', '.gif', '.jpeg', '.png'))) + $context['filenames'][strtolower($entry)] = array( + 'id' => htmlspecialchars($entry), + 'selected' => false, + ); + } + $dir->close(); + } + ksort($context['filenames']); + } + + // Create a new smiley from scratch. + $context['filenames'] = array_values($context['filenames']); + $context['current_smiley'] = array( + 'id' => 0, + 'code' => '', + 'filename' => $context['filenames'][0]['id'], + 'description' => &$txt['smileys_default_description'], + 'location' => 0, + 'is_new' => true, + ); +} + +function EditSmileys() +{ + global $modSettings, $context, $settings, $db_prefix, $txt, $boarddir; + + $context['explain_text'] = &$txt['smiley_editsmileys_explain']; + + // Submitting a form? + if (isset($_POST['sc'])) + { + checkSession(); + + // Delete selected smileys. + if (!empty($_POST['delete']) && !empty($_POST['checked_smileys'])) + { + foreach ($_POST['checked_smileys'] as $id => $smiley_id) + $_POST['checked_smileys'][$id] = (int) $smiley_id; + + db_query(" + DELETE FROM {$db_prefix}smileys + WHERE ID_SMILEY IN (" . implode(', ', $_POST['checked_smileys']) . ')', __FILE__, __LINE__); + } + // Create/modify a smiley. + elseif (isset($_POST['id'])) + { + $_POST['id'] = (int) $_POST['id']; + $_POST['smiley_code'] = htmltrim__recursive($_POST['smiley_code']); + $_POST['smiley_filename'] = htmltrim__recursive($_POST['smiley_filename']); + $_POST['smiley_location'] = empty($_POST['smiley_location']) || $_POST['smiley_location'] > 2 || $_POST['smiley_location'] < 0 ? 0 : (int) $_POST['smiley_location']; + + // Make sure some code was entered. + if (empty($_POST['smiley_code'])) + fatal_lang_error('smiley_has_no_code'); + + // Also make sure a filename was given. + if (empty($_POST['smiley_filename'])) + fatal_lang_error('smiley_has_no_filename'); + + // Check whether the new code has duplicates. It should be unique. + $request = db_query(" + SELECT ID_SMILEY + FROM {$db_prefix}smileys + WHERE code = BINARY '$_POST[smiley_code]'" . (empty($_POST['id']) ? '' : " + AND ID_SMILEY != $_POST[id]"), __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + fatal_lang_error('smiley_not_unique'); + mysql_free_result($request); + + db_query(" + UPDATE {$db_prefix}smileys + SET + code = '$_POST[smiley_code]', + filename = '$_POST[smiley_filename]', + description = '$_POST[smiley_description]', + hidden = $_POST[smiley_location] + WHERE ID_SMILEY = $_POST[id]", __FILE__, __LINE__); + } + } + + // Load all known smiley sets. + $context['smiley_sets'] = explode(',', $modSettings['smiley_sets_known']); + $set_names = explode("\n", $modSettings['smiley_sets_names']); + foreach ($context['smiley_sets'] as $i => $set) + $context['smiley_sets'][$i] = array( + 'id' => $i, + 'path' => $set, + 'name' => $set_names[$i], + 'selected' => $set == $modSettings['smiley_sets_default'] + ); + + // Prepare overview of all (custom) smileys. + if ($context['sub_action'] == 'editsmileys') + { + $sortColumns = array( + 'code', + 'filename', + 'description', + 'hidden', + ); + + // Default to 'order by filename'. + $context['sort'] = empty($_REQUEST['sort']) || !in_array($_REQUEST['sort'], $sortColumns) ? 'filename' : $_REQUEST['sort']; + + $request = db_query(" + SELECT ID_SMILEY, code, filename, description, smileyRow, smileyOrder, hidden + FROM {$db_prefix}smileys + ORDER BY $context[sort]", __FILE__, __LINE__); + $context['smileys'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['smileys'][] = array( + 'id' => $row['ID_SMILEY'], + 'code' => htmlspecialchars($row['code']), + 'filename' => htmlspecialchars($row['filename']), + 'description' => htmlspecialchars($row['description']), + 'row' => $row['smileyRow'], + 'order' => $row['smileyOrder'], + 'location' => empty($row['hidden']) ? $txt['smileys_location_form'] : ($row['hidden'] == 1 ? $txt['smileys_location_hidden'] : $txt['smileys_location_popup']), + 'sets_not_found' => array(), + ); + mysql_free_result($request); + + if (!empty($modSettings['smileys_dir']) && is_dir($modSettings['smileys_dir'])) + { + foreach ($context['smiley_sets'] as $smiley_set) + { + foreach ($context['smileys'] as $smiley_id => $smiley) + if (!file_exists($modSettings['smileys_dir'] . '/' . $smiley_set['path'] . '/' . $smiley['filename'])) + $context['smileys'][$smiley_id]['sets_not_found'][] = $smiley_set['path']; + } + } + + $context['selected_set'] = $modSettings['smiley_sets_default']; + } + + // Modifying smileys. + elseif ($context['sub_action'] == 'modifysmiley') + { + // Get a list of all known smiley sets. + $context['smileys_dir'] = empty($modSettings['smileys_dir']) ? $boarddir . '/Smileys' : $modSettings['smileys_dir']; + $context['smileys_dir_found'] = is_dir($context['smileys_dir']); + $context['smiley_sets'] = explode(',', $modSettings['smiley_sets_known']); + $set_names = explode("\n", $modSettings['smiley_sets_names']); + foreach ($context['smiley_sets'] as $i => $set) + $context['smiley_sets'][$i] = array( + 'id' => $i, + 'path' => $set, + 'name' => $set_names[$i], + 'selected' => $set == $modSettings['smiley_sets_default'] + ); + + $context['selected_set'] = $modSettings['smiley_sets_default']; + + // Get all possible filenames for the smileys. + $context['filenames'] = array(); + if ($context['smileys_dir_found']) + { + foreach ($context['smiley_sets'] as $smiley_set) + { + if (!file_exists($context['smileys_dir'] . '/' . $smiley_set['path'])) + continue; + + $dir = dir($context['smileys_dir'] . '/' . $smiley_set['path']); + while ($entry = $dir->read()) + { + if (!in_array($entry, $context['filenames']) && in_array(strrchr($entry, '.'), array('.jpg', '.gif', '.jpeg', '.png'))) + $context['filenames'][strtolower($entry)] = array( + 'id' => htmlspecialchars($entry), + 'selected' => false, + ); + } + $dir->close(); + } + ksort($context['filenames']); + } + + $request = db_query(" + SELECT ID_SMILEY AS id, code, filename, description, hidden AS location, 0 AS is_new + FROM {$db_prefix}smileys + WHERE ID_SMILEY = " . (int) $_REQUEST['id'], __FILE__, __LINE__); + if (mysql_num_rows($request) != 1) + fatal_lang_error('smiley_not_found'); + $context['current_smiley'] = mysql_fetch_assoc($request); + mysql_free_result($request); + if (isset($context['filenames'][strtolower($context['current_smiley']['filename'])])) + $context['filenames'][strtolower($context['current_smiley']['filename'])]['selected'] = true; + } +} + +function EditSmileyOrder() +{ + global $modSettings, $context, $settings, $db_prefix, $txt, $boarddir; + + $context['explain_text'] = &$txt['smiley_setorder_explain']; + + // Move smileys to another position. + if (isset($_GET['sesc'])) + { + checkSession('get'); + + $_GET['location'] = empty($_GET['location']) || $_GET['location'] != 'popup' ? 0 : 2; + $_GET['source'] = empty($_GET['source']) ? 0 : (int) $_GET['source']; + + if (empty($_GET['source'])) + fatal_lang_error('smiley_not_found'); + + if (!empty($_GET['after'])) + { + $_GET['after'] = (int) $_GET['after']; + + $request = db_query(" + SELECT smileyRow, smileyOrder, hidden + FROM {$db_prefix}smileys + WHERE hidden = $_GET[location] + AND ID_SMILEY = $_GET[after]", __FILE__, __LINE__); + if (mysql_num_rows($request) != 1) + fatal_lang_error('smiley_not_found'); + list ($smileyRow, $smileyOrder, $smileyLocation) = mysql_fetch_row($request); + mysql_free_result($request); + } + else + { + $smileyRow = (int) $_GET['row']; + $smileyOrder = -1; + $smileyLocation = (int) $_GET['location']; + } + + db_query(" + UPDATE {$db_prefix}smileys + SET smileyOrder = smileyOrder + 1 + WHERE hidden = $_GET[location] + AND smileyRow = $smileyRow + AND smileyOrder > $smileyOrder", __FILE__, __LINE__); + + db_query(" + UPDATE {$db_prefix}smileys + SET + smileyOrder = $smileyOrder + 1, + smileyRow = $smileyRow, + hidden = $smileyLocation + WHERE ID_SMILEY = $_GET[source]", __FILE__, __LINE__); + } + + $request = db_query(" + SELECT ID_SMILEY, code, filename, description, smileyRow, smileyOrder, hidden + FROM {$db_prefix}smileys + WHERE hidden != 1 + ORDER BY smileyOrder, smileyRow", __FILE__, __LINE__); + $context['smileys'] = array( + 'postform' => array( + 'rows' => array(), + ), + 'popup' => array( + 'rows' => array(), + ), + ); + while ($row = mysql_fetch_assoc($request)) + { + $location = empty($row['hidden']) ? 'postform' : 'popup'; + $context['smileys'][$location]['rows'][$row['smileyRow']][] = array( + 'id' => $row['ID_SMILEY'], + 'code' => htmlspecialchars($row['code']), + 'filename' => htmlspecialchars($row['filename']), + 'description' => htmlspecialchars($row['description']), + 'row' => $row['smileyRow'], + 'order' => $row['smileyOrder'], + 'selected' => !empty($_REQUEST['move']) && $_REQUEST['move'] == $row['ID_SMILEY'], + ); + } + mysql_free_result($request); + + $context['move_smiley'] = empty($_REQUEST['move']) ? 0 : (int) $_REQUEST['move']; + + // Make sure all rows are sequential. + foreach (array_keys($context['smileys']) as $location) + $context['smileys'][$location] = array( + 'id' => $location, + 'title' => $location == 'postform' ? $txt['smileys_location_form'] : $txt['smileys_location_popup'], + 'description' => $location == 'postform' ? $txt['smileys_location_form_description'] : $txt['smileys_location_popup_description'], + 'last_row' => count($context['smileys'][$location]['rows']), + 'rows' => array_values($context['smileys'][$location]['rows']), + ); + + // Check & fix smileys that are not ordered properly in the database. + foreach (array_keys($context['smileys']) as $location) + { + foreach ($context['smileys'][$location]['rows'] as $id => $smiley_row) + { + // Fix empty rows if any. + if ($id != $smiley_row[0]['row']) + { + db_query(" + UPDATE {$db_prefix}smileys + SET smileyRow = $id + WHERE smileyRow = {$smiley_row[0]['row']} + AND hidden = " . ($location == 'postform' ? '0' : '2'), __FILE__, __LINE__); + // Only change the first row value of the first smiley (we don't need the others :P). + $context['smileys'][$location]['rows'][$id][0]['row'] = $id; + } + // Make sure the smiley order is always sequential. + foreach ($smiley_row as $order_id => $smiley) + if ($order_id != $smiley['order']) + db_query(" + UPDATE {$db_prefix}smileys + SET smileyOrder = $order_id + WHERE ID_SMILEY = $smiley[id]", __FILE__, __LINE__); + } + } +} + +function InstallSmileySet() +{ + global $sourcedir, $boarddir, $modSettings; + + isAllowedTo('manage_smileys'); + checkSession('request'); + + require_once($sourcedir . '/Subs-Package.php'); + + $name = strtok(basename(isset($_FILES['set_gz']) ? $_FILES['set_gz']['name'] : $_REQUEST['set_gz']), '.'); + $name = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $name); + + if (isset($_FILES['set_gz']) && is_uploaded_file($_FILES['set_gz']['tmp_name'])) + $extracted = read_tgz_file($_FILES['set_gz']['tmp_name'], $boarddir . '/Smileys/' . $name); + elseif (isset($_REQUEST['set_gz'])) + { + checkSession('request'); + + // Check that the theme is from simplemachines.org, for now... maybe add mirroring later. + if (preg_match('~^http://[\w_\-]+\.simplemachines\.org/~', $_REQUEST['set_gz']) == 0 || strpos($_REQUEST['set_gz'], 'dlattach') !== false) + fatal_lang_error('not_on_simplemachines'); + + $extracted = read_tgz_file($_REQUEST['set_gz'], $boarddir . '/Smileys/' . $name); + } + else + redirectexit('action=smileys'); + + updateSettings(array( + 'smiley_sets_known' => $modSettings['smiley_sets_known'] . ',' . $name, + 'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . strtok(basename(isset($_FILES['set_gz']) ? $_FILES['set_gz']['name'] : $_REQUEST['set_gz']), '.') + )); + + redirectexit('action=smileys'); +} + +// A function to import new smileys from an existing directory into the database. +function ImportSmileys($smileyPath) +{ + global $db_prefix, $modSettings; + + if (empty($modSettings['smileys_dir']) || !is_dir($modSettings['smileys_dir'] . '/' . $smileyPath)) + fatal_lang_error('smiley_set_unable_to_import'); + + $smileys = array(); + $dir = dir($modSettings['smileys_dir'] . '/' . $smileyPath); + while ($entry = $dir->read()) + { + if (in_array(strrchr($entry, '.'), array('.jpg', '.gif', '.jpeg', '.png'))) + $smileys[strtolower($entry)] = addslashes($entry); + } + $dir->close(); + + // Exclude the smileys that are already in the database. + $request = db_query(" + SELECT filename + FROM {$db_prefix}smileys + WHERE filename IN ('" . implode("', '", $smileys) . "')", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + if (isset($smileys[strtolower($row['filename'])])) + unset($smileys[strtolower($row['filename'])]); + mysql_free_result($request); + + $request = db_query(" + SELECT MAX(smileyOrder) + FROM {$db_prefix}smileys + WHERE hidden = 0 + AND smileyRow = 0", __FILE__, __LINE__); + list ($smileyOrder) = mysql_fetch_row($request); + mysql_free_result($request); + + $new_smileys = array(); + foreach ($smileys as $smiley) + $new_smileys[] = "(':" . strtok($smiley, '.') . ":', '$smiley', '" . strtok($smiley, '.') . "', 0, " . ++$smileyOrder . ')'; + + if (!empty($new_smileys)) + db_query(" + INSERT INTO {$db_prefix}smileys + (code, filename, description, smileyRow, smileyOrder) + VALUES" . implode(', + ', $new_smileys), __FILE__, __LINE__); +} + +?> \ No newline at end of file diff --git a/Sources/Memberlist.php b/Sources/Memberlist.php new file mode 100644 index 0000000..d353e71 --- /dev/null +++ b/Sources/Memberlist.php @@ -0,0 +1,425 @@ + array('label', 'function', 'is_selected') + $subActions = array( + 'all' => array(&$txt[303], 'MLAll', $context['listing_by'] == 'all'), + 'search' => array(&$txt['mlist_search'], 'MLSearch', $context['listing_by'] == 'search'), + ); + + // Set up the sort links. + $context['sort_links'] = array(); + foreach ($subActions as $act => $text) + $context['sort_links'][] = ($text[2] ? '> ' : '') . '' . $text[0] . ''; + $context['sort_links'] = implode(' | ', $context['sort_links']); + + $context['num_members'] = $modSettings['memberCount']; + + // Set up the columns... + $context['columns'] = array( + 'isOnline' => array( + 'label' => $txt['online8'], + 'width' => '20' + ), + 'realName' => array( + 'label' => $txt[35] + ), + 'emailAddress' => array( + 'label' => $txt[307], + 'width' => '25' + ), + 'websiteUrl' => array( + 'label' => $txt[96], + 'width' => '25' + ), + 'ICQ' => array( + 'label' => $txt[513], + 'width' => '25' + ), + 'AIM' => array( + 'label' => $txt[603], + 'width' => '25' + ), + 'YIM' => array( + 'label' => $txt[604], + 'width' => '25' + ), + 'MSN' => array( + 'label' => $txt['MSN'], + 'width' => '25' + ), + 'ID_GROUP' => array( + 'label' => $txt[87] + ), + 'registered' => array( + 'label' => $txt[233] + ), + 'posts' => array( + 'label' => $txt[21], + 'width' => '115', + 'colspan' => '2' + ) + ); + + $context['linktree'][] = array( + 'url' => $scripturl . '?action=mlist', + 'name' => &$txt[332] + ); + + $context['can_send_pm'] = allowedTo('pm_send'); + + // Jump to the sub action. + if (isset($subActions[$context['listing_by']])) + $subActions[$context['listing_by']][1](); + else + $subActions['all'][1](); +} + +// List all members, page by page. +function MLAll() +{ + global $txt, $scripturl, $db_prefix, $user_info; + global $modSettings, $context; + + // Set defaults for sort (realName) and start. (0) + if (!isset($_REQUEST['sort']) || !array_key_exists($_REQUEST['sort'], $context['columns'])) + $_REQUEST['sort'] = 'realName'; + + if (!is_numeric($_REQUEST['start'])) + { + $_REQUEST['start'] = strtolower(substr($_REQUEST['start'], 0, 1)); + + if (preg_match('~([\da-z])~', $_REQUEST['start'], $match) == false) + fatal_error('Hacker?', false); + + $request = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}members + WHERE LOWER(SUBSTRING(realName, 1, 1)) < '$_REQUEST[start]'", __FILE__, __LINE__); + list ($_REQUEST['start']) = mysql_fetch_row($request); + mysql_free_result($request); + } + + $context['letter_links'] = ''; + for ($i = 97; $i < 123; $i++) + $context['letter_links'] .= '' . strtoupper(chr($i)) . ' '; + + // Sort out the column information. + foreach ($context['columns'] as $col => $dummy) + { + $context['columns'][$col]['href'] = $scripturl . '?action=mlist;sort=' . $col . ';start=0'; + + if (!isset($_REQUEST['desc']) && $col == $_REQUEST['sort']) + $context['columns'][$col]['href'] .= ';desc'; + + $context['columns'][$col]['link'] = '' . $context['columns'][$col]['label'] . ''; + $context['columns'][$col]['selected'] = $_REQUEST['sort'] == $col; + } + + $context['sort_by'] = $_REQUEST['sort']; + $context['sort_direction'] = !isset($_REQUEST['desc']) ? 'down' : 'up'; + + // Construct the page index. + $context['page_index'] = constructPageIndex($scripturl . '?action=mlist;sort=' . $_REQUEST['sort'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $_REQUEST['start'], $modSettings['memberCount'], $modSettings['defaultMaxMembers']); + + // Send the data to the template. + $context['start'] = $_REQUEST['start'] + 1; + $context['end'] = min($_REQUEST['start'] + $modSettings['defaultMaxMembers'], $modSettings['memberCount']); + + $context['page_title'] = $txt[308] . ' ' . $context['start'] . ' ' . $txt[311] . ' ' . $context['end']; + $context['linktree'][] = array( + 'url' => $scripturl . '?action=mlist;sort=' . $_REQUEST['sort'] . ';start=' . $_REQUEST['start'], + 'name' => &$context['page_title'], + 'extra_after' => ' (' . $txt[309] . ' ' . $context['num_members'] . ' ' . $txt[310] . ')' + ); + + // List out the different sorting methods... + $sort_methods = array( + 'isOnline' => array( + 'down' => '(ISNULL(lo.logTime)' . (!allowedTo('moderate_forum') ? ' OR NOT mem.showOnline' : '') . ') ASC, realName ASC', + 'up' => '(ISNULL(lo.logTime)' . (!allowedTo('moderate_forum') ? ' OR NOT mem.showOnline' : '') . ') DESC, realName DESC' + ), + 'realName' => array( + 'down' => 'mem.realName ASC', + 'up' => 'mem.realName DESC' + ), + 'emailAddress' => array( + 'down' => (allowedTo('moderate_forum') || empty($modSettings['allow_hideEmail'])) ? 'mem.emailAddress ASC' : 'mem.hideEmail ASC, mem.emailAddress ASC', + 'up' => (allowedTo('moderate_forum') || empty($modSettings['allow_hideEmail'])) ? 'mem.emailAddress DESC' : 'mem.hideEmail DESC, mem.emailAddress DESC' + ), + 'websiteUrl' => array( + 'down' => 'LENGTH(mem.websiteURL) > 0 DESC, ISNULL(mem.websiteURL) ASC, mem.websiteURL ASC', + 'up' => 'LENGTH(mem.websiteURL) > 0 ASC, ISNULL(mem.websiteURL) DESC, mem.websiteURL DESC' + ), + 'ICQ' => array( + 'down' => 'LENGTH(mem.ICQ) > 0 DESC, ISNULL(mem.ICQ) OR mem.ICQ = 0 ASC, mem.ICQ ASC', + 'up' => 'LENGTH(mem.ICQ) > 0 ASC, ISNULL(mem.ICQ) OR mem.ICQ = 0 DESC, mem.ICQ DESC' + ), + 'AIM' => array( + 'down' => 'LENGTH(mem.AIM) > 0 DESC, ISNULL(mem.AIM) ASC, mem.AIM ASC', + 'up' => 'LENGTH(mem.AIM) > 0 ASC, ISNULL(mem.AIM) DESC, mem.AIM DESC' + ), + 'YIM' => array( + 'down' => 'LENGTH(mem.YIM) > 0 DESC, ISNULL(mem.YIM) ASC, mem.YIM ASC', + 'up' => 'LENGTH(mem.YIM) > 0 ASC, ISNULL(mem.YIM) DESC, mem.YIM DESC' + ), + 'MSN' => array( + 'down' => 'LENGTH(mem.MSN) > 0 DESC, ISNULL(mem.MSN) ASC, mem.MSN ASC', + 'up' => 'LENGTH(mem.MSN) > 0 ASC, ISNULL(mem.MSN) DESC, mem.MSN DESC' + ), + 'registered' => array( + 'down' => 'mem.dateRegistered ASC', + 'up' => 'mem.dateRegistered DESC' + ), + 'ID_GROUP' => array( + 'down' => 'ISNULL(mg.groupName) ASC, mg.groupName ASC', + 'up' => 'ISNULL(mg.groupName) DESC, mg.groupName DESC' + ), + 'posts' => array( + 'down' => 'mem.posts DESC', + 'up' => 'mem.posts ASC' + ) + ); + + // Select the members from the database. + $request = db_query(" + SELECT + mem.memberName, mem.realName, mem.websiteTitle, mem.websiteUrl, mem.posts, + mem.ID_GROUP, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.emailAddress, + mem.hideEmail, mem.ID_MEMBER, IFNULL(lo.logTime, 0) AS isOnline, + IFNULL(mg.groupName, '') AS groupName, mem.showOnline, mem.dateRegistered + FROM {$db_prefix}members AS mem + LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER) + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP)) + ORDER BY " . $sort_methods[$_REQUEST['sort']][$context['sort_direction']] . " + LIMIT $_REQUEST[start], $modSettings[defaultMaxMembers]", __FILE__, __LINE__); + + printMemberListRows($request); +} + +// Search for members... +function MLSearch() +{ + global $txt, $scripturl, $db_prefix, $context, $user_info, $modSettings; + + $context['page_title'] = $txt['mlist_search']; + + // They're searching.. + if (isset($_POST['search']) || isset($_REQUEST['fields'])) + { + $_POST['search'] = isset($_GET['search']) ? $_GET['search'] : $_POST['search']; + $_POST['fields'] = isset($_GET['fields']) ? explode(',', $_GET['fields']) : $_POST['fields']; + + $context['old_search'] = $_REQUEST['search']; + $context['old_search_value'] = urlencode($_REQUEST['search']); + + // No fields? Use default... + if (empty($_POST['fields'])) + $_POST['fields'] = array('name'); + + // Search for a name? + if (in_array('name', $_POST['fields'])) + $fields = array('memberName', 'realName'); + else + $fields = array(); + // Search for messengers... + if (in_array('messenger', $_POST['fields']) && (!$user_info['is_guest'] || empty($modSettings['guest_hideContacts']))) + $fields += array(3 => 'MSN', 'AIM', 'ICQ', 'YIM'); + // Search for websites. + if (in_array('website', $_POST['fields'])) + $fields += array(7 => 'websiteTitle', 'websiteUrl'); + // Search for groups. + if (in_array('group', $_POST['fields'])) + $fields += array(9 => 'IFNULL(groupName, \'\')'); + // Search for an email address? + if (in_array('email', $_POST['fields'])) + { + $fields += array(2 => allowedTo('moderate_forum') ? 'emailAddress' : '(hideEmail = 0 AND emailAddress'); + $condition = allowedTo('moderate_forum') ? '' : ')'; + } + else + $condition = ''; + + $query = $_POST['search'] == '' ? "= ''" : "LIKE '%" . $_POST['search'] . "%'"; + + $request = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}members AS mem + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP)) + WHERE " . implode(" $query OR ", $fields) . " $query$condition", __FILE__, __LINE__); + list ($numResults) = mysql_fetch_row($request); + mysql_free_result($request); + + $context['page_index'] = constructPageIndex($scripturl . '?action=mlist;sa=search;search=' . $_POST['search'] . ';fields=' . implode(',', $_POST['fields']), $_REQUEST['start'], $numResults, $modSettings['defaultMaxMembers']); + + // Find the members from the database. + $request = db_query(" + SELECT + memberName, realName, websiteTitle, websiteUrl, posts, mem.ID_GROUP, ICQ, AIM, YIM, MSN, emailAddress, + hideEmail, mem.ID_MEMBER, IFNULL(lo.logTime, 0) AS isOnline, IFNULL(mg.groupName, '') AS groupName, + mem.dateRegistered + FROM {$db_prefix}members AS mem + LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER) + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP)) + WHERE " . implode(" $query OR ", $fields) . " $query$condition + LIMIT $_REQUEST[start], $modSettings[defaultMaxMembers]", __FILE__, __LINE__); + printMemberListRows($request); + mysql_free_result($request); + } + else + { + $context['sub_template'] = 'search'; + $context['old_search'] = isset($_REQUEST['search']) ? htmlspecialchars($_REQUEST['search']) : ''; + } + + $context['linktree'][] = array( + 'url' => $scripturl . '?action=mlist;sa=search', + 'name' => &$context['page_title'] + ); +} + +function printMemberListRows($request) +{ + global $scripturl, $txt, $db_prefix, $user_info, $modSettings; + global $context, $settings, $months; + + // Get the most posts. + $result = db_query(" + SELECT MAX(posts) + FROM {$db_prefix}members", __FILE__, __LINE__); + list ($MOST_POSTS) = mysql_fetch_row($result); + mysql_free_result($result); + + // Avoid division by zero... + if ($MOST_POSTS == 0) + $MOST_POSTS = 1; + + // Load all the members for display. + $context['members'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + $is_online = (!empty($row['showOnline']) || allowedTo('moderate_forum')) && $row['isOnline'] > 0; + + // If contact details are hidden... respect them. + if (!empty($modSettings['guest_hideContacts']) && $user_info['is_guest']) + { + $row['ICQ'] = ''; + $row['MSN'] = ''; + $row['YIM'] = ''; + $row['AOL'] = ''; + } + + $context['members'][$row['ID_MEMBER']] = array( + 'username' => $row['memberName'], + 'name' => $row['realName'], + 'id' => $row['ID_MEMBER'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '', + 'online' => array( + 'is_online' => $is_online, + 'text' => &$txt[$is_online ? 'online2' : 'online3'], + 'href' => $scripturl . '?action=pm;sa=send;u=' . $row['ID_MEMBER'], + 'link' => '' . $txt[$is_online ? 'online2' : 'online3'] . '', + 'image_href' => $settings['images_url'] . ($is_online ? '/useron.gif' : '/useroff.gif'), + 'label' => &$txt[$is_online ? 'online4' : 'online5'] + ), + 'email' => (!empty($modSettings['guest_hideContacts']) && $user_info['is_guest']) || ($row['hideEmail'] && !allowedTo('moderate_forum') && !empty($modSettings['allow_hideEmail'])) ? '' : '' . $txt[69] . '', + 'website' => array( + 'title' => !isset($row['websiteTitle']) || $row['websiteTitle'] == '' ? $txt[96] : $row['websiteTitle'], + 'href' => !isset($row['websiteUrl']) || $row['websiteUrl'] == '' ? '' : $row['websiteUrl'], + ), + 'icq' => array( + 'name' => $row['ICQ'], + 'href' => !empty($row['ICQ']) ? 'http://www.icq.com/people/about_me.php?uin=' . $row['ICQ'] : '', + 'link' => !empty($row['ICQ']) ? '' . $row['ICQ'] . '' : '' + ), + 'aim' => array( + 'name' => $row['AIM'], + 'href' => !empty($row['AIM']) ? 'aim:goim?screenname=' . $row['AIM'] . '&message=' . $txt['aim_default_message'] : '', + 'link' => !empty($row['AIM']) ? '' . $row['AIM'] . '' : '' + ), + 'msn' => array( + 'name' => $row['MSN'], + 'href' => !empty($row['MSN']) ? 'http://members.msn.com/' . $row['MSN'] : '', + 'link' => !empty($row['MSN']) ? '' . $row['MSN'] . '' : '' + ), + 'yim' => array( + 'name' => $row['YIM'], + 'href' => !empty($row['YIM']) ? 'http://opi.yahoo.com/online?u=' . $row['YIM'] . '&m=g&t=0' : '', + 'link' => !empty($row['YIM']) ? '' . $row['YIM'] . '' : '' + ), + 'group' => $row['groupName'], + 'registered' => strftime('%d %b %Y ' . (strpos($user_info['time_format'], '%H') !== false ? '%I:%M:%S %p' : '%T'), $row['dateRegistered'] + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600), + 'posts' => $row['posts'] > 100000 ? $txt[683] : ($row['posts'] == 1337 ? 'leet' : $row['posts']), + 'post_percent' => round(($row['posts'] * 100) / $MOST_POSTS) + ); + $context['members'][$row['ID_MEMBER']]['website']['link'] = $row['websiteUrl'] != '' ? '' . htmlspecialchars($context['members'][$row['ID_MEMBER']]['website']['title']) . '' : ''; + } +} + +?> diff --git a/Sources/MessageIndex.php b/Sources/MessageIndex.php new file mode 100644 index 0000000..7b28fc2 --- /dev/null +++ b/Sources/MessageIndex.php @@ -0,0 +1,564 @@ + 0 ) + $_filter = "AND t.ID_TOPIC IN ($_filter)"; + else + $_filter =''; + } else { + $_filter = ''; + } + + if (WIRELESS) + $context['sub_template'] = WIRELESS_PROTOCOL . '_messageindex'; + else + loadTemplate('MessageIndex'); + + $context['name'] = $board_info['name']; + $context['description'] = $board_info['description']; + + // View all the topics, or just a few? + $maxindex = isset($_REQUEST['all']) && !empty($modSettings['enableAllMessages']) ? $board_info['num_topics'] : $modSettings['defaultMaxTopics']; + + // Make sure the starting place makes sense and construct the page index. + if (isset($_REQUEST['sort'])) + $context['page_index'] = constructPageIndex($scripturl . '?board=' . $board . ';sort=' . $_REQUEST['sort'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $_REQUEST['start'], $board_info['num_topics'], $maxindex, false, empty ($_GET['filter']) ? '' : 'filter=' . $_GET['filter']); + else + $context['page_index'] = constructPageIndex($scripturl . '?board=' . $board, $_REQUEST['start'], $board_info['num_topics'], $maxindex, true, empty ($_GET['filter']) ? '' : 'filter=' . $_GET['filter']); + + $context['alphabet_index'] = constructAlphabetIndex($scripturl . '?board=' . $board); + $context['start'] = &$_REQUEST['start']; + + $context['links'] = array( + 'first' => $_REQUEST['start'] >= $modSettings['defaultMaxTopics'] ? $scripturl . '?board=' . $board . '.0' : '', + 'prev' => $_REQUEST['start'] >= $modSettings['defaultMaxTopics'] ? $scripturl . '?board=' . $board . '.' . ($_REQUEST['start'] - $modSettings['defaultMaxTopics']) : '', + 'next' => $_REQUEST['start'] + $modSettings['defaultMaxTopics'] < $board_info['num_topics'] ? $scripturl . '?board=' . $board . '.' . ($_REQUEST['start'] + $modSettings['defaultMaxTopics']) : '', + 'last' => $_REQUEST['start'] + $modSettings['defaultMaxTopics'] < $board_info['num_topics'] ? $scripturl . '?board=' . $board . '.' . (floor(($board_info['num_topics'] - 1) / $modSettings['defaultMaxTopics']) * $modSettings['defaultMaxTopics']) : '', + 'up' => $board_info['parent'] == 0 ? $scripturl . '?' : $scripturl . '?board=' . $board_info['parent'] . '.0' + ); + + $context['page_info'] = array( + 'current_page' => $_REQUEST['start'] / $modSettings['defaultMaxTopics'] + 1, + 'num_pages' => floor(($board_info['num_topics'] - 1) / $modSettings['defaultMaxTopics']) + 1 + ); + + if (isset($_REQUEST['all']) && $maxindex > $modSettings['enableAllMessages'] && !empty($modSettings['enableAllMessages'])) + { + $maxindex = $modSettings['enableAllMessages']; + $_REQUEST['start'] = 0; + } + + // Build a list of the board's moderators. + $context['moderators'] = &$board_info['moderators']; + $context['link_moderators'] = array(); + if (!empty($board_info['moderators'])) + { + foreach ($board_info['moderators'] as $mod) + $context['link_moderators'][] ='' . $mod['name'] . ''; + +// $context['linktree'][count($context['linktree']) - 1]['extra_after'] = ' (' . (count($context['link_moderators']) == 1 ? $txt[298] : $txt[299]) . ': ' . implode(', ', $context['link_moderators']) . ')'; + $context['moderators_list'] = (count($context['link_moderators']) == 1 ? $txt[298] : $txt[299]) . ': ' . implode(', ', $context['link_moderators']); + } + array_pop($context['linktree']); + + // Mark current and parent boards as seen. + if (!$user_info['is_guest']) + { + db_query(" + REPLACE INTO {$db_prefix}log_boards + (logTime, ID_MEMBER, ID_BOARD) + VALUES (" . time() . ", $ID_MEMBER, $board)", __FILE__, __LINE__); + if (!empty($board_info['parent_boards'])) + { + db_query(" + UPDATE {$db_prefix}log_boards + SET logTime = " . time() . " + WHERE ID_MEMBER = $ID_MEMBER + AND ID_BOARD IN (" . implode(',', array_keys($board_info['parent_boards'])) . ") + LIMIT " . count($board_info['parent_boards']), __FILE__, __LINE__); + } + + $request = db_query(" + SELECT sent + FROM {$db_prefix}log_notify + WHERE ID_BOARD = $board + AND ID_MEMBER = $ID_MEMBER + LIMIT 1", __FILE__, __LINE__); + $context['is_marked_notify'] = mysql_num_rows($request) != 0; + if ($context['is_marked_notify']) + { + list ($sent) = mysql_fetch_row($request); + if (!empty($sent)) + { + db_query(" + UPDATE {$db_prefix}log_notify + SET sent = 0 + WHERE ID_BOARD = $board + AND ID_MEMBER = $ID_MEMBER + LIMIT 1", __FILE__, __LINE__); + } + } + } + else + $context['is_marked_notify'] = false; + + // 'Print' the header and board info. + $context['page_title'] = $board_info['name']; + $context['board_id'] = $board; + + // Set the variables up for the template. + $context['can_mark_notify'] = allowedTo('mark_notify'); + $context['can_post_new'] = allowedTo('post_new'); + $context['can_post_poll'] = $modSettings['pollMode'] == '1' && allowedTo('poll_post'); + $context['can_moderate_forum'] = allowedTo('moderate_forum'); + + // Aren't children wonderful things? + $result = db_query(" + SELECT + b.ID_BOARD, b.name, b.description, b.numTopics, b.numPosts, + m.posterName, m.posterTime, m.subject, m.ID_MSG, m.ID_TOPIC, + IFNULL(mem.realName, m.posterName) AS realName, " . (!$user_info['is_guest'] ? " + (IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isRead," : "1 AS isRead,") . " + IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, IFNULL(mem2.ID_MEMBER, 0) AS ID_MODERATOR, + mem2.realName AS modRealName + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = b.ID_LAST_MSG) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? " + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER)" : '') . " + LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD) + LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER = mods.ID_MEMBER) + WHERE b.childLevel = " . ($board_info['child_level'] + 1) . " + AND b.ID_PARENT = $board + AND $user_info[query_see_board] + ORDER BY b.boardOrder", __FILE__, __LINE__); + if (mysql_num_rows($result) != 0) + { + $theboards = array(); + while ($row_board = mysql_fetch_assoc($result)) + { + if (!isset($context['boards'][$row_board['ID_BOARD']])) + { + $theboards[] = $row_board['ID_BOARD']; + + // Make sure the subject isn't too long. + censorText($row_board['subject']); + $short_subject = mb_strlen(un_htmlspecialchars($row_board['subject'])) > 24 ? strtr(mb_substr(strtr($row_board['subject'], array('<' => '<', '>' => '>', '"' => '"')), 0, 24, "UTF-8") . '...', array('<' => '<', '>' => '>', '"' => '"', '&...' => '...', '&#...' => '...')) : $row_board['subject']; + + $context['boards'][$row_board['ID_BOARD']] = array( + 'id' => $row_board['ID_BOARD'], + 'last_post' => array( + 'id' => $row_board['ID_MSG'], + 'time' => $row_board['posterTime'] > 0 ? timeformat($row_board['posterTime']) : $txt[470], + 'timestamp' => $row_board['posterTime'], + 'subject' => $short_subject, + 'member' => array( + 'id' => $row_board['ID_MEMBER'], + 'username' => $row_board['posterName'] != '' ? $row_board['posterName'] : $txt[470], + 'name' => $row_board['realName'], + 'href' => !empty($row_board['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row_board['ID_MEMBER'] : '', + 'link' => $row_board['posterName'] != '' ? (!empty($row_board['ID_MEMBER']) ? '' . $row_board['realName'] . '' : $row_board['realName']) : $txt[470], + ), + 'start' => 'new', + 'topic' => $row_board['ID_TOPIC'], + 'href' => $row_board['subject'] != '' ? $scripturl . '?topic=' . $row_board['ID_TOPIC'] . '.new' . (empty($row_board['isRead']) ? ';boardseen' : '') . '#new' : '', + 'link' => $row_board['subject'] != '' ? '' . $short_subject . '' : $txt[470] + ), + 'new' => empty($row_board['isRead']) && $row_board['posterName'] != '', + 'name' => $row_board['name'], + 'description' => $row_board['description'], + 'moderators' => array(), + 'link_moderators' => array(), + 'children' => array(), + 'link_children' => array(), + 'children_new' => false, + 'topics' => $row_board['numTopics'], + 'posts' => $row_board['numPosts'], + 'href' => $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0', + 'link' => '' . $row_board['name'] . '' + ); + } + if (!empty($row_board['ID_MODERATOR'])) + { + $context['boards'][$row_board['ID_BOARD']]['moderators'][$row_board['ID_MODERATOR']] = array( + 'id' => $row_board['ID_MODERATOR'], + 'name' => $row_board['modRealName'], + 'href' => $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'], + 'link' => '' . $row_board['modRealName'] . '' + ); + $context['boards'][$row_board['ID_BOARD']]['link_moderators'][] = '' . $row_board['modRealName'] . ''; + } + } + mysql_free_result($result); + + // Load up the child boards. + $result = db_query(" + SELECT + b.ID_BOARD, b.name, b.description, b.numTopics, b.numPosts, + m.posterName, m.posterTime, m.subject, m.ID_MSG, m.ID_TOPIC, + IFNULL(mem.realName, m.posterName) AS realName, ID_PARENT, " . (!$user_info['is_guest'] ? " + (IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isRead," : "1 AS isRead,") . " + IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = b.ID_LAST_MSG) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? " + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER)" : '') . " + WHERE b.childLevel = " . ($board_info['child_level'] + 2) . " + AND b.ID_PARENT IN (" . implode(',', $theboards) . ") + AND $user_info[query_see_board] + ORDER BY b.ID_PARENT, b.boardOrder", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + if ($context['boards'][$row['ID_PARENT']]['last_post']['timestamp'] < $row['posterTime']) + { + // Make sure the subject isn't too long. + censorText($row['subject']); + $short_subject = strlen(un_htmlspecialchars($row['subject'])) > 24 ? strtr(substr(strtr($row['subject'], array('<' => '<', '>' => '>', '"' => '"')), 0, 24) . '...', array('<' => '<', '>' => '>', '"' => '"', '&...' => '...', '&#...' => '...')) : $row['subject']; + + $context['boards'][$row['ID_PARENT']]['last_post'] = array( + 'id' => $row['ID_MSG'], + 'time' => $row['posterTime'] > 0 ? timeformat($row['posterTime']) : $txt[470], + 'timestamp' => $row['posterTime'], + 'subject' => $short_subject, + 'member' => array( + 'username' => $row['posterName'] != '' ? $row['posterName'] : $txt[470], + 'name' => $row['realName'], + 'id' => $row['ID_MEMBER'], + 'href' => !empty($row['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] : '', + 'link' => $row['posterName'] != '' ? (!empty($row['ID_MEMBER']) ? '' . $row['realName'] . '' : $row['realName']) : $txt[470], + ), + 'start' => 'new', + 'topic' => $row['ID_TOPIC'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.new' . (empty($row['isRead']) ? ';boardseen' : '') . '#new' + ); + $context['boards'][$row['ID_PARENT']]['last_post']['link'] = $row['subject'] != '' ? '' . $short_subject . '' : $txt[470]; + } + $context['boards'][$row['ID_PARENT']]['children'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'description' => $row['description'], + 'new' => empty($row['isRead']) && $row['posterName'] != '', + 'topics' => $row['numTopics'], + 'posts' => $row['numPosts'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['name'] . '' + ); + $context['boards'][$row['ID_PARENT']]['link_children'][] = '' . $row['name'] . ''; + $context['boards'][$row['ID_PARENT']]['children_new'] |= empty($row['isRead']) && $row['posterName'] != ''; + } + } + mysql_free_result($result); + + // Nosey, nosey - who's viewing this topic? + if (!empty($settings['display_who_viewing'])) + { + $context['view_members'] = array(); + $context['view_members_list'] = array(); + $context['view_num_hidden'] = 0; + + $request = db_query(" + SELECT mem.ID_MEMBER, IFNULL(mem.realName, 0) AS realName, mem.showOnline + FROM {$db_prefix}log_online AS lo + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER) + WHERE lo.url LIKE '%s:5:\"board\";i:$board;%'", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + if (!empty($row['ID_MEMBER'])) + { + if (!empty($row['showOnline']) || allowedTo('moderate_forum')) + $context['view_members_list'][] = empty($row['showOnline']) ? '' . $row['realName'] . '' : '' . $row['realName'] . ''; + $context['view_members'][] = array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['realName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '', + 'hidden' => empty($row['showOnline']), + ); + + if (empty($row['showOnline'])) + $context['view_num_hidden']++; + } + $context['view_num_guests'] = mysql_num_rows($request) - count($context['view_members']); + mysql_free_result($request); + } + + // Default sort methods. + $sort_methods = array( + 'subject' => 'mf.subject', + 'starter' => 'IFNULL(memf.realName, mf.posterName)', + 'last_poster' => 'IFNULL(meml.realName, ml.posterName)', + 'replies' => 't.numReplies', + 'views' => 't.numViews', + 'first_post' => 't.ID_TOPIC', + 'last_post' => 't.ID_LAST_MSG' + ); + + // They didn't pick one, default to by last post descending. + if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']])) + { + $context['sort_by'] = 'last_post'; + $_REQUEST['sort'] = 't.ID_LAST_MSG'; + $ascending = isset($_REQUEST['asc']); + } + // Otherwise default to ascending. + else + { + $context['sort_by'] = $_REQUEST['sort']; + $_REQUEST['sort'] = $sort_methods[$_REQUEST['sort']]; + $ascending = !isset($_REQUEST['desc']); + } + + $context['sort_direction'] = $ascending ? 'up' : 'down'; + + // Calculate the fastest way to get the topics. + $start = $_REQUEST['start']; + if ($start > ($board_info['num_topics'] - 1) / 2) + { + $ascending = !$ascending; + $fake_ascending = true; + $maxindex = $board_info['num_topics'] < $start + $maxindex + 1 ? $board_info['num_topics'] - $start : $maxindex; + $start = $board_info['num_topics'] < $start + $maxindex + 1 ? 0 : $board_info['num_topics'] - $start - $maxindex; + } + else + $fake_ascending = false; + + // Grab the appropriate topic information. + $result = db_query(" + SELECT + t.ID_TOPIC, t.numReplies, t.locked, t.numViews, t.isSticky, t.ID_POLL, + IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS isRead, + t.ID_LAST_MSG, ml.posterTime AS lastPosterTime, ml.modifiedTime AS lastModifiedTime, + ml.subject AS lastSubject, ml.icon AS lastIcon, ml.posterName AS lastMemberName, + ml.ID_MEMBER AS lastID_MEMBER, IFNULL(meml.realName, ml.posterName) AS lastDisplayName, + t.ID_FIRST_MSG, mf.posterTime AS firstPosterTime, mf.modifiedTime AS firstModifiedTime, + mf.subject AS firstSubject, mf.icon AS firstIcon, mf.posterName AS firstMemberName, + mf.ID_MEMBER AS firstID_MEMBER, IFNULL(memf.realName, mf.posterName) AS firstDisplayName, + LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys, + mf.smileysEnabled AS firstSmileys, + cat.urlname AS cat_uri, + pub.uri AS pub_uri, + tu.uri AS topic_uri, + t.subtitle AS subtitle + FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS ml, {$db_prefix}messages AS mf) + LEFT JOIN {$db_prefix}members AS meml ON (meml.ID_MEMBER = ml.ID_MEMBER) + LEFT JOIN {$db_prefix}members AS memf ON (memf.ID_MEMBER = mf.ID_MEMBER) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = $board AND lmr.ID_MEMBER = $ID_MEMBER) + LEFT JOIN topic_uri AS tu ON tu.ID_TOPIC = t.ID_TOPIC + LEFT JOIN publications AS pub ON mf.ID_MSG = pub.id_post + LEFT JOIN categories AS cat ON pub.id_category = cat.id + WHERE t.ID_BOARD = $board + AND ml.ID_MSG = t.ID_LAST_MSG + AND mf.ID_MSG = t.ID_FIRST_MSG + $_filter + ORDER BY + " . (!empty($modSettings['enableStickyTopics']) ? 't.isSticky' . ($fake_ascending ? '' : ' DESC') . ', + ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . " + LIMIT $start, $maxindex", __FILE__, __LINE__); + // Begin 'printing' the message index for current board. + $context['topics'] = array(); + $topic_ids = array(); + while ($row = mysql_fetch_assoc($result)) + { + if ($row['ID_POLL'] > 0 && $modSettings['pollMode'] == '0') + continue; + $topicEditedTime = $row['lastPosterTime'] > $row['lastModifiedTime'] ? $row['lastPosterTime'] : $row['lastModifiedTime']; + $topic_ids[] = $row['ID_TOPIC']; + + // Limit them to 128 characters - do this FIRST because it's a lot of wasted censoring otherwise. + $row['firstBody'] = strip_tags(strtr(doUBBC($row['firstBody'], $row['firstSmileys']), array('
' => ' '))); + if (strlen($row['firstBody']) > 128) + $row['firstBody'] = substr($row['firstBody'], 0, 128) . '...'; + $row['lastBody'] = strip_tags(strtr(doUBBC($row['lastBody'], $row['lastSmileys']), array('
' => ' '))); + if (strlen($row['lastBody']) > 128) + $row['lastBody'] = substr($row['lastBody'], 0, 128) . '...'; + + // Censor the subject and message preview. + censorText($row['firstSubject']); + censorText($row['firstBody']); + + // Don't censor them twice! + if ($row['ID_FIRST_MSG'] == $row['ID_LAST_MSG']) + { + $row['lastSubject'] = $row['firstSubject']; + $row['lastBody'] = $row['firstBody']; + } + else + { + censorText($row['lastSubject']); + censorText($row['lastBody']); + } + + // Decide how many pages the topic should have. + $topic_length = $row['numReplies'] + 1; + if ($topic_length > $modSettings['defaultMaxMessages']) + { + $tmppages = array(); + $tmpa = 1; + for ($tmpb = 0; $tmpb < $topic_length; $tmpb += $modSettings['defaultMaxMessages']) + { + $tmppages[] = '' . $tmpa . ''; + $tmpa++; + } + // Show links to all the pages? + if (count($tmppages) <= 5) + $pages = '« ' . implode(' ', $tmppages); + // Or skip a few? + else + $pages = '« ' . $tmppages[0] . ' ' . $tmppages[1] . ' ... ' . $tmppages[count($tmppages) - 2] . ' ' . $tmppages[count($tmppages) - 1]; + + if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages']) + $pages .= '  ' . $txt[190] . ''; + $pages .= ' »'; + } + else + $pages = ''; + + // 'Print' the topic info. + $context['topics'][$row['ID_TOPIC']] = array( + 'id' => $row['ID_TOPIC'], + 'uri' => empty ($row['cat_uri']) AND empty ($row['pub_uri']) ? $row['topic_uri'] : $row['cat_uri'].'/'.$row['pub_uri'].'.html', + 'subtitle' => $row['subtitle'], + 'first_post' => array( + 'member' => array( + 'username' => $row['firstMemberName'], + 'name' => $row['firstDisplayName'], + 'id' => $row['firstID_MEMBER'], + 'href' => !empty($row['firstID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] : '', + 'link' => !empty($row['firstID_MEMBER']) ? '' . $row['firstDisplayName'] . '' : $row['firstDisplayName'] + ), + 'time' => timeformat($row['firstPosterTime']), + 'timestamp' => $row['firstPosterTime'], + 'subject' => $row['firstSubject'], + 'preview' => $row['firstBody'], + 'icon' => $row['firstIcon'], + 'href' => empty ($row['topic_uri']) ? $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0' : 'http://rock.ru/forum/' . $row['topic_uri'], + 'link' => empty ($row['topic_uri']) ? '' . $row['firstSubject'] . '' : '' . $row['firstSubject'] . '' + ), + 'last_post' => array( + 'member' => array( + 'username' => $row['lastMemberName'], + 'name' => $row['lastDisplayName'], + 'id' => $row['lastID_MEMBER'], + 'href' => !empty($row['lastID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['lastID_MEMBER'] : '', + 'link' => !empty($row['lastID_MEMBER']) ? '' . $row['lastDisplayName'] . '' : $row['lastDisplayName'] + ), + 'time' => timeformat($row['lastPosterTime']), + 'timestamp' => $row['lastPosterTime'], + 'subject' => $row['lastSubject'], + 'preview' => $row['lastBody'], + 'icon' => $row['lastIcon'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . '#msg' . $row['ID_LAST_MSG'], + 'link' => '' . $row['lastSubject'] . '' + ), + 'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($row['isSticky']), + 'is_locked' => !empty($row['locked']), + 'is_poll' => $modSettings['pollMode'] == '1' && $row['ID_POLL'] > 0, + 'is_hot' => $row['numReplies'] >= $modSettings['hotTopicPosts'], + 'is_very_hot' => $row['numReplies'] >= $modSettings['hotTopicVeryPosts'], + 'is_posted_in' => false, + 'icon' => $row['firstIcon'], + 'subject' => $row['firstSubject'], + 'new' => $row['isRead'] < $topicEditedTime, + 'newtime' => $row['isRead'], + 'new_href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.from' . $row['isRead'] . '#new', + 'pages' => $pages, + 'replies' => $row['numReplies'], + 'views' => $row['numViews'] + ); + + determineTopicClass($context['topics'][$row['ID_TOPIC']]); + } + mysql_free_result($result); + + // Fix the sequence of topics if they were retrieved in the wrong order. (for speed reasons...) + if ($fake_ascending) + $context['topics'] = array_reverse($context['topics'], true); + + if (!empty($modSettings['enableParticipation']) && !$user_info['is_guest'] && !empty($topic_ids)) + { + $result = db_query(" + SELECT ID_TOPIC + FROM {$db_prefix}messages + WHERE ID_TOPIC IN (" . implode(', ', $topic_ids) . ") + AND ID_MEMBER = $ID_MEMBER + GROUP BY ID_TOPIC + LIMIT " . count($topic_ids), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + $context['topics'][$row['ID_TOPIC']]['is_posted_in'] = true; + $context['topics'][$row['ID_TOPIC']]['class'] = 'my_' . $context['topics'][$row['ID_TOPIC']]['class']; + } + mysql_free_result($result); + } + + loadJumpTo(); + + // Is Quick Moderation active? + if (!empty($options['display_quick_mod'])) + { + $context['can_lock'] = allowedTo('lock_any'); + $context['can_sticky'] = allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics']); + $context['can_move'] = allowedTo('move_any'); + $context['can_remove'] = allowedTo('delete_any'); + $context['can_merge'] = allowedTo('merge_any'); + + // Set permissions for all the topics. + foreach ($context['topics'] as $t => $topic) + { + $started = $topic['first_post']['member']['id'] == $ID_MEMBER; + $context['topics'][$t]['quick_mod'] = array( + 'lock' => allowedTo('lock_any') || ($started && allowedTo('lock_own')), + 'sticky' => allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics']), + 'move' => allowedTo('move_any') || ($started && allowedTo('move_own')), + 'remove' => allowedTo('delete_any') || ($started && allowedTo('delete_own')) + ); + $context['can_lock'] |= ($started && allowedTo('lock_own')); + $context['can_move'] |= ($started && allowedTo('move_own')); + $context['can_remove'] |= ($started && allowedTo('delete_own')); + } + + if (!empty($_SESSION['move_to_topic'])) + foreach ($context['jump_to'] as $id => $cat) + { + if (isset($context['jump_to'][$id]['boards'][$_SESSION['move_to_topic']])) + $context['jump_to'][$id]['boards'][$_SESSION['move_to_topic']]['selected'] = true; + } + } +} + +?> diff --git a/Sources/MessageIndex.php~ b/Sources/MessageIndex.php~ new file mode 100644 index 0000000..b2ea880 --- /dev/null +++ b/Sources/MessageIndex.php~ @@ -0,0 +1,541 @@ + $_REQUEST['start'] >= $modSettings['defaultMaxTopics'] ? $scripturl . '?board=' . $board . '.0' : '', + 'prev' => $_REQUEST['start'] >= $modSettings['defaultMaxTopics'] ? $scripturl . '?board=' . $board . '.' . ($_REQUEST['start'] - $modSettings['defaultMaxTopics']) : '', + 'next' => $_REQUEST['start'] + $modSettings['defaultMaxTopics'] < $board_info['num_topics'] ? $scripturl . '?board=' . $board . '.' . ($_REQUEST['start'] + $modSettings['defaultMaxTopics']) : '', + 'last' => $_REQUEST['start'] + $modSettings['defaultMaxTopics'] < $board_info['num_topics'] ? $scripturl . '?board=' . $board . '.' . (floor(($board_info['num_topics'] - 1) / $modSettings['defaultMaxTopics']) * $modSettings['defaultMaxTopics']) : '', + 'up' => $board_info['parent'] == 0 ? $scripturl . '?' : $scripturl . '?board=' . $board_info['parent'] . '.0' + ); + + $context['page_info'] = array( + 'current_page' => $_REQUEST['start'] / $modSettings['defaultMaxTopics'] + 1, + 'num_pages' => floor(($board_info['num_topics'] - 1) / $modSettings['defaultMaxTopics']) + 1 + ); + + if (isset($_REQUEST['all']) && $maxindex > $modSettings['enableAllMessages'] && !empty($modSettings['enableAllMessages'])) + { + $maxindex = $modSettings['enableAllMessages']; + $_REQUEST['start'] = 0; + } + + // Build a list of the board's moderators. + $context['moderators'] = &$board_info['moderators']; + $context['link_moderators'] = array(); + if (!empty($board_info['moderators'])) + { + foreach ($board_info['moderators'] as $mod) + $context['link_moderators'][] ='' . $mod['name'] . ''; + +// $context['linktree'][count($context['linktree']) - 1]['extra_after'] = ' (' . (count($context['link_moderators']) == 1 ? $txt[298] : $txt[299]) . ': ' . implode(', ', $context['link_moderators']) . ')'; + $context['moderators_list'] = (count($context['link_moderators']) == 1 ? $txt[298] : $txt[299]) . ': ' . implode(', ', $context['link_moderators']); + } + array_pop($context['linktree']); + + // Mark current and parent boards as seen. + if (!$user_info['is_guest']) + { + db_query(" + REPLACE INTO {$db_prefix}log_boards + (logTime, ID_MEMBER, ID_BOARD) + VALUES (" . time() . ", $ID_MEMBER, $board)", __FILE__, __LINE__); + if (!empty($board_info['parent_boards'])) + { + db_query(" + UPDATE {$db_prefix}log_boards + SET logTime = " . time() . " + WHERE ID_MEMBER = $ID_MEMBER + AND ID_BOARD IN (" . implode(',', array_keys($board_info['parent_boards'])) . ") + LIMIT " . count($board_info['parent_boards']), __FILE__, __LINE__); + } + + $request = db_query(" + SELECT sent + FROM {$db_prefix}log_notify + WHERE ID_BOARD = $board + AND ID_MEMBER = $ID_MEMBER + LIMIT 1", __FILE__, __LINE__); + $context['is_marked_notify'] = mysql_num_rows($request) != 0; + if ($context['is_marked_notify']) + { + list ($sent) = mysql_fetch_row($request); + if (!empty($sent)) + { + db_query(" + UPDATE {$db_prefix}log_notify + SET sent = 0 + WHERE ID_BOARD = $board + AND ID_MEMBER = $ID_MEMBER + LIMIT 1", __FILE__, __LINE__); + } + } + } + else + $context['is_marked_notify'] = false; + + // 'Print' the header and board info. + $context['page_title'] = $board_info['name']; + $context['board_id'] = $board; + + // Set the variables up for the template. + $context['can_mark_notify'] = allowedTo('mark_notify'); + $context['can_post_new'] = allowedTo('post_new'); + $context['can_post_poll'] = $modSettings['pollMode'] == '1' && allowedTo('poll_post'); + $context['can_moderate_forum'] = allowedTo('moderate_forum'); + + // Aren't children wonderful things? + $result = db_query(" + SELECT + b.ID_BOARD, b.name, b.description, b.numTopics, b.numPosts, + m.posterName, m.posterTime, m.subject, m.ID_MSG, m.ID_TOPIC, + IFNULL(mem.realName, m.posterName) AS realName, " . (!$user_info['is_guest'] ? " + (IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isRead," : "1 AS isRead,") . " + IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, IFNULL(mem2.ID_MEMBER, 0) AS ID_MODERATOR, + mem2.realName AS modRealName + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = b.ID_LAST_MSG) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? " + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER)" : '') . " + LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD) + LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER = mods.ID_MEMBER) + WHERE b.childLevel = " . ($board_info['child_level'] + 1) . " + AND b.ID_PARENT = $board + AND $user_info[query_see_board] + ORDER BY b.boardOrder", __FILE__, __LINE__); + if (mysql_num_rows($result) != 0) + { + $theboards = array(); + while ($row_board = mysql_fetch_assoc($result)) + { + if (!isset($context['boards'][$row_board['ID_BOARD']])) + { + $theboards[] = $row_board['ID_BOARD']; + + // Make sure the subject isn't too long. + censorText($row_board['subject']); + $short_subject = mb_strlen(un_htmlspecialchars($row_board['subject'])) > 24 ? strtr(mb_substr(strtr($row_board['subject'], array('<' => '<', '>' => '>', '"' => '"')), 0, 24, "UTF-8") . '...', array('<' => '<', '>' => '>', '"' => '"', '&...' => '...', '&#...' => '...')) : $row_board['subject']; + + $context['boards'][$row_board['ID_BOARD']] = array( + 'id' => $row_board['ID_BOARD'], + 'last_post' => array( + 'id' => $row_board['ID_MSG'], + 'time' => $row_board['posterTime'] > 0 ? timeformat($row_board['posterTime']) : $txt[470], + 'timestamp' => $row_board['posterTime'], + 'subject' => $short_subject, + 'member' => array( + 'id' => $row_board['ID_MEMBER'], + 'username' => $row_board['posterName'] != '' ? $row_board['posterName'] : $txt[470], + 'name' => $row_board['realName'], + 'href' => !empty($row_board['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row_board['ID_MEMBER'] : '', + 'link' => $row_board['posterName'] != '' ? (!empty($row_board['ID_MEMBER']) ? '' . $row_board['realName'] . '' : $row_board['realName']) : $txt[470], + ), + 'start' => 'new', + 'topic' => $row_board['ID_TOPIC'], + 'href' => $row_board['subject'] != '' ? $scripturl . '?topic=' . $row_board['ID_TOPIC'] . '.new' . (empty($row_board['isRead']) ? ';boardseen' : '') . '#new' : '', + 'link' => $row_board['subject'] != '' ? '' . $short_subject . '' : $txt[470] + ), + 'new' => empty($row_board['isRead']) && $row_board['posterName'] != '', + 'name' => $row_board['name'], + 'description' => $row_board['description'], + 'moderators' => array(), + 'link_moderators' => array(), + 'children' => array(), + 'link_children' => array(), + 'children_new' => false, + 'topics' => $row_board['numTopics'], + 'posts' => $row_board['numPosts'], + 'href' => $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0', + 'link' => '' . $row_board['name'] . '' + ); + } + if (!empty($row_board['ID_MODERATOR'])) + { + $context['boards'][$row_board['ID_BOARD']]['moderators'][$row_board['ID_MODERATOR']] = array( + 'id' => $row_board['ID_MODERATOR'], + 'name' => $row_board['modRealName'], + 'href' => $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'], + 'link' => '' . $row_board['modRealName'] . '' + ); + $context['boards'][$row_board['ID_BOARD']]['link_moderators'][] = '' . $row_board['modRealName'] . ''; + } + } + mysql_free_result($result); + + // Load up the child boards. + $result = db_query(" + SELECT + b.ID_BOARD, b.name, b.description, b.numTopics, b.numPosts, + m.posterName, m.posterTime, m.subject, m.ID_MSG, m.ID_TOPIC, + IFNULL(mem.realName, m.posterName) AS realName, ID_PARENT, " . (!$user_info['is_guest'] ? " + (IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isRead," : "1 AS isRead,") . " + IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = b.ID_LAST_MSG) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? " + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER)" : '') . " + WHERE b.childLevel = " . ($board_info['child_level'] + 2) . " + AND b.ID_PARENT IN (" . implode(',', $theboards) . ") + AND $user_info[query_see_board] + ORDER BY b.ID_PARENT, b.boardOrder", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + if ($context['boards'][$row['ID_PARENT']]['last_post']['timestamp'] < $row['posterTime']) + { + // Make sure the subject isn't too long. + censorText($row['subject']); + $short_subject = strlen(un_htmlspecialchars($row['subject'])) > 24 ? strtr(substr(strtr($row['subject'], array('<' => '<', '>' => '>', '"' => '"')), 0, 24) . '...', array('<' => '<', '>' => '>', '"' => '"', '&...' => '...', '&#...' => '...')) : $row['subject']; + + $context['boards'][$row['ID_PARENT']]['last_post'] = array( + 'id' => $row['ID_MSG'], + 'time' => $row['posterTime'] > 0 ? timeformat($row['posterTime']) : $txt[470], + 'timestamp' => $row['posterTime'], + 'subject' => $short_subject, + 'member' => array( + 'username' => $row['posterName'] != '' ? $row['posterName'] : $txt[470], + 'name' => $row['realName'], + 'id' => $row['ID_MEMBER'], + 'href' => !empty($row['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] : '', + 'link' => $row['posterName'] != '' ? (!empty($row['ID_MEMBER']) ? '' . $row['realName'] . '' : $row['realName']) : $txt[470], + ), + 'start' => 'new', + 'topic' => $row['ID_TOPIC'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.new' . (empty($row['isRead']) ? ';boardseen' : '') . '#new' + ); + $context['boards'][$row['ID_PARENT']]['last_post']['link'] = $row['subject'] != '' ? '' . $short_subject . '' : $txt[470]; + } + $context['boards'][$row['ID_PARENT']]['children'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'description' => $row['description'], + 'new' => empty($row['isRead']) && $row['posterName'] != '', + 'topics' => $row['numTopics'], + 'posts' => $row['numPosts'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['name'] . '' + ); + $context['boards'][$row['ID_PARENT']]['link_children'][] = '' . $row['name'] . ''; + $context['boards'][$row['ID_PARENT']]['children_new'] |= empty($row['isRead']) && $row['posterName'] != ''; + } + } + mysql_free_result($result); + + // Nosey, nosey - who's viewing this topic? + if (!empty($settings['display_who_viewing'])) + { + $context['view_members'] = array(); + $context['view_members_list'] = array(); + $context['view_num_hidden'] = 0; + + $request = db_query(" + SELECT mem.ID_MEMBER, IFNULL(mem.realName, 0) AS realName, mem.showOnline + FROM {$db_prefix}log_online AS lo + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER) + WHERE lo.url LIKE '%s:5:\"board\";i:$board;%'", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + if (!empty($row['ID_MEMBER'])) + { + if (!empty($row['showOnline']) || allowedTo('moderate_forum')) + $context['view_members_list'][] = empty($row['showOnline']) ? '' . $row['realName'] . '' : '' . $row['realName'] . ''; + $context['view_members'][] = array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['realName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '', + 'hidden' => empty($row['showOnline']), + ); + + if (empty($row['showOnline'])) + $context['view_num_hidden']++; + } + $context['view_num_guests'] = mysql_num_rows($request) - count($context['view_members']); + mysql_free_result($request); + } + + // Default sort methods. + $sort_methods = array( + 'subject' => 'mf.subject', + 'starter' => 'IFNULL(memf.realName, mf.posterName)', + 'last_poster' => 'IFNULL(meml.realName, ml.posterName)', + 'replies' => 't.numReplies', + 'views' => 't.numViews', + 'first_post' => 't.ID_TOPIC', + 'last_post' => 't.ID_LAST_MSG' + ); + + // They didn't pick one, default to by last post descending. + if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']])) + { + $context['sort_by'] = 'last_post'; + $_REQUEST['sort'] = 't.ID_LAST_MSG'; + $ascending = isset($_REQUEST['asc']); + } + // Otherwise default to ascending. + else + { + $context['sort_by'] = $_REQUEST['sort']; + $_REQUEST['sort'] = $sort_methods[$_REQUEST['sort']]; + $ascending = !isset($_REQUEST['desc']); + } + + $context['sort_direction'] = $ascending ? 'up' : 'down'; + + // Calculate the fastest way to get the topics. + $start = $_REQUEST['start']; + if ($start > ($board_info['num_topics'] - 1) / 2) + { + $ascending = !$ascending; + $fake_ascending = true; + $maxindex = $board_info['num_topics'] < $start + $maxindex + 1 ? $board_info['num_topics'] - $start : $maxindex; + $start = $board_info['num_topics'] < $start + $maxindex + 1 ? 0 : $board_info['num_topics'] - $start - $maxindex; + } + else + $fake_ascending = false; + + // Grab the appropriate topic information. + $result = db_query(" + SELECT + t.ID_TOPIC, t.numReplies, t.locked, t.numViews, t.isSticky, t.ID_POLL, + IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS isRead, + t.ID_LAST_MSG, ml.posterTime AS lastPosterTime, ml.modifiedTime AS lastModifiedTime, + ml.subject AS lastSubject, ml.icon AS lastIcon, ml.posterName AS lastMemberName, + ml.ID_MEMBER AS lastID_MEMBER, IFNULL(meml.realName, ml.posterName) AS lastDisplayName, + t.ID_FIRST_MSG, mf.posterTime AS firstPosterTime, mf.modifiedTime AS firstModifiedTime, + mf.subject AS firstSubject, mf.icon AS firstIcon, mf.posterName AS firstMemberName, + mf.ID_MEMBER AS firstID_MEMBER, IFNULL(memf.realName, mf.posterName) AS firstDisplayName, + LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys, + mf.smileysEnabled AS firstSmileys + FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS ml, {$db_prefix}messages AS mf) + LEFT JOIN {$db_prefix}members AS meml ON (meml.ID_MEMBER = ml.ID_MEMBER) + LEFT JOIN {$db_prefix}members AS memf ON (memf.ID_MEMBER = mf.ID_MEMBER) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = $board AND lmr.ID_MEMBER = $ID_MEMBER) + WHERE t.ID_BOARD = $board + AND ml.ID_MSG = t.ID_LAST_MSG + AND mf.ID_MSG = t.ID_FIRST_MSG + ORDER BY + " . (!empty($modSettings['enableStickyTopics']) ? 't.isSticky' . ($fake_ascending ? '' : ' DESC') . ', + ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . " + LIMIT $start, $maxindex", __FILE__, __LINE__); + // Begin 'printing' the message index for current board. + $context['topics'] = array(); + $topic_ids = array(); + while ($row = mysql_fetch_assoc($result)) + { + if ($row['ID_POLL'] > 0 && $modSettings['pollMode'] == '0') + continue; + $topicEditedTime = $row['lastPosterTime'] > $row['lastModifiedTime'] ? $row['lastPosterTime'] : $row['lastModifiedTime']; + $topic_ids[] = $row['ID_TOPIC']; + + // Limit them to 128 characters - do this FIRST because it's a lot of wasted censoring otherwise. + $row['firstBody'] = strip_tags(strtr(doUBBC($row['firstBody'], $row['firstSmileys']), array('
' => ' '))); + if (strlen($row['firstBody']) > 128) + $row['firstBody'] = substr($row['firstBody'], 0, 128) . '...'; + $row['lastBody'] = strip_tags(strtr(doUBBC($row['lastBody'], $row['lastSmileys']), array('
' => ' '))); + if (strlen($row['lastBody']) > 128) + $row['lastBody'] = substr($row['lastBody'], 0, 128) . '...'; + + // Censor the subject and message preview. + censorText($row['firstSubject']); + censorText($row['firstBody']); + + // Don't censor them twice! + if ($row['ID_FIRST_MSG'] == $row['ID_LAST_MSG']) + { + $row['lastSubject'] = $row['firstSubject']; + $row['lastBody'] = $row['firstBody']; + } + else + { + censorText($row['lastSubject']); + censorText($row['lastBody']); + } + + // Decide how many pages the topic should have. + $topic_length = $row['numReplies'] + 1; + if ($topic_length > $modSettings['defaultMaxMessages']) + { + $tmppages = array(); + $tmpa = 1; + for ($tmpb = 0; $tmpb < $topic_length; $tmpb += $modSettings['defaultMaxMessages']) + { + $tmppages[] = '' . $tmpa . ''; + $tmpa++; + } + // Show links to all the pages? + if (count($tmppages) <= 5) + $pages = '« ' . implode(' ', $tmppages); + // Or skip a few? + else + $pages = '« ' . $tmppages[0] . ' ' . $tmppages[1] . ' ... ' . $tmppages[count($tmppages) - 2] . ' ' . $tmppages[count($tmppages) - 1]; + + if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages']) + $pages .= '  ' . $txt[190] . ''; + $pages .= ' »'; + } + else + $pages = ''; + + // 'Print' the topic info. + $context['topics'][$row['ID_TOPIC']] = array( + 'id' => $row['ID_TOPIC'], + 'first_post' => array( + 'member' => array( + 'username' => $row['firstMemberName'], + 'name' => $row['firstDisplayName'], + 'id' => $row['firstID_MEMBER'], + 'href' => !empty($row['firstID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] : '', + 'link' => !empty($row['firstID_MEMBER']) ? '' . $row['firstDisplayName'] . '' : $row['firstDisplayName'] + ), + 'time' => timeformat($row['firstPosterTime']), + 'timestamp' => $row['firstPosterTime'], + 'subject' => $row['firstSubject'], + 'preview' => $row['firstBody'], + 'icon' => $row['firstIcon'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0', + 'link' => '' . $row['firstSubject'] . '' + ), + 'last_post' => array( + 'member' => array( + 'username' => $row['lastMemberName'], + 'name' => $row['lastDisplayName'], + 'id' => $row['lastID_MEMBER'], + 'href' => !empty($row['lastID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['lastID_MEMBER'] : '', + 'link' => !empty($row['lastID_MEMBER']) ? '' . $row['lastDisplayName'] . '' : $row['lastDisplayName'] + ), + 'time' => timeformat($row['lastPosterTime']), + 'timestamp' => $row['lastPosterTime'], + 'subject' => $row['lastSubject'], + 'preview' => $row['lastBody'], + 'icon' => $row['lastIcon'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . '#msg' . $row['ID_LAST_MSG'], + 'link' => '' . $row['lastSubject'] . '' + ), + 'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($row['isSticky']), + 'is_locked' => !empty($row['locked']), + 'is_poll' => $modSettings['pollMode'] == '1' && $row['ID_POLL'] > 0, + 'is_hot' => $row['numReplies'] >= $modSettings['hotTopicPosts'], + 'is_very_hot' => $row['numReplies'] >= $modSettings['hotTopicVeryPosts'], + 'is_posted_in' => false, + 'icon' => $row['firstIcon'], + 'subject' => $row['firstSubject'], + 'new' => $row['isRead'] < $topicEditedTime, + 'newtime' => $row['isRead'], + 'new_href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.from' . $row['isRead'] . '#new', + 'pages' => $pages, + 'replies' => $row['numReplies'], + 'views' => $row['numViews'] + ); + + determineTopicClass($context['topics'][$row['ID_TOPIC']]); + } + mysql_free_result($result); + + // Fix the sequence of topics if they were retrieved in the wrong order. (for speed reasons...) + if ($fake_ascending) + $context['topics'] = array_reverse($context['topics'], true); + + if (!empty($modSettings['enableParticipation']) && !$user_info['is_guest'] && !empty($topic_ids)) + { + $result = db_query(" + SELECT ID_TOPIC + FROM {$db_prefix}messages + WHERE ID_TOPIC IN (" . implode(', ', $topic_ids) . ") + AND ID_MEMBER = $ID_MEMBER + GROUP BY ID_TOPIC + LIMIT " . count($topic_ids), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + $context['topics'][$row['ID_TOPIC']]['is_posted_in'] = true; + $context['topics'][$row['ID_TOPIC']]['class'] = 'my_' . $context['topics'][$row['ID_TOPIC']]['class']; + } + mysql_free_result($result); + } + + loadJumpTo(); + + // Is Quick Moderation active? + if (!empty($options['display_quick_mod'])) + { + $context['can_lock'] = allowedTo('lock_any'); + $context['can_sticky'] = allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics']); + $context['can_move'] = allowedTo('move_any'); + $context['can_remove'] = allowedTo('delete_any'); + $context['can_merge'] = allowedTo('merge_any'); + + // Set permissions for all the topics. + foreach ($context['topics'] as $t => $topic) + { + $started = $topic['first_post']['member']['id'] == $ID_MEMBER; + $context['topics'][$t]['quick_mod'] = array( + 'lock' => allowedTo('lock_any') || ($started && allowedTo('lock_own')), + 'sticky' => allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics']), + 'move' => allowedTo('move_any') || ($started && allowedTo('move_own')), + 'remove' => allowedTo('delete_any') || ($started && allowedTo('delete_own')) + ); + $context['can_lock'] |= ($started && allowedTo('lock_own')); + $context['can_move'] |= ($started && allowedTo('move_own')); + $context['can_remove'] |= ($started && allowedTo('delete_own')); + } + + if (!empty($_SESSION['move_to_topic'])) + foreach ($context['jump_to'] as $id => $cat) + { + if (isset($context['jump_to'][$id]['boards'][$_SESSION['move_to_topic']])) + $context['jump_to'][$id]['boards'][$_SESSION['move_to_topic']]['selected'] = true; + } + } +} + +?> diff --git a/Sources/ModSettings.php b/Sources/ModSettings.php new file mode 100644 index 0000000..7f84b1b --- /dev/null +++ b/Sources/ModSettings.php @@ -0,0 +1,652 @@ + &$txt['displayedValue']), + &$txt['descriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'), + Note that just saying array('first', 'second') will put 0 in the SQL for 'first'. + + * A password input box. Used for passwords, no less! + ie. array('password', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth', + &$txt['descriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'), + + For each option: + type (see above), variable name, size/possible values, description, helptext. + OR make type 'rule' for an empty string for a horizontal rule. + OR make type 'heading' with a string for a titled section. */ + + $config_vars = array( + array('heading', &$txt['mods_cat_features']), + // Big Options... polls, sticky, guest stuff.... + array('select', 'pollMode', array(&$txt['smf34'], &$txt['smf32'], &$txt['smf33'])), + array('check', 'enableStickyTopics'), + array('rule'), + // Basic stuff, user languages, titles, flash, permissions... + array('check', 'allow_guestAccess'), + array('check', 'userLanguage'), + array('check', 'allow_editDisplayName'), + array('check', 'allow_hideOnline'), + array('check', 'allow_hideEmail'), + array('check', 'guest_hideContacts'), + array('check', 'titlesEnable'), + array('text', 'default_personalText'), + array('int', 'max_signatureLength', 5), + array('check', 'removeNestedQuotes'), + array('check', 'enableEmbeddedFlash'), + array('check', 'enablePostHTML'), + array('text', 'disabledBBC'), + array('check', 'enableBBC'), + array('int', 'max_messageLength', 5), + array('check', 'enableNewReplyWarning'), + array('rule'), + // Stats, compression, cookies.... server type stuff. + array('text', 'time_format'), + array('select', 'number_format', array('1234.00' => '1234.00', '1,234.00' => '1,234.00', '1.234,00' => '1.234,00', '1 234,00' => '1 234,00', '1234,00' => '1234,00')), + array('float', 'time_offset'), + array('int', 'spamWaitTime'), + array('int', 'edit_wait_time'), + array('int', 'failed_login_threshold'), + array('int', 'lastActive'), + array('check', 'enableSpellChecking'), + array('check', 'trackStats'), + array('check', 'hitStats'), + array('check', 'enableCompressedOutput'), + array('check', 'databaseSession_enable'), + array('check', 'databaseSession_loose'), + array('int', 'databaseSession_lifetime'), + array('check', 'enableErrorLogging'), + array('int', 'cookieTime', 5), + array('check', 'localCookies'), + array('check', 'globalCookies'), + array('check', 'redirectMetaRefresh'), + array('check', 'securityDisable'), + array('rule'), + // Email and registration type stuff... + array('select', 'registration_method', array(&$txt['registration_standard'], &$txt['registration_activate'], &$txt['registration_approval'], &$txt['registration_disabled'])), + array('check', 'notify_on_new_registration'), + array('check', 'send_validation_onChange'), + array('check', 'send_welcomeEmail'), + array('rule'), + // Database reapir, optimization, etc. + array('int', 'autoOptDatabase', 4), + array('int', 'autoOptMaxOnline', 4), + array('check', 'autoFixDatabase'), + array('rule'), + // Option-ish things... miscellaneous sorta. + array('check', 'notifyAnncmnts_UserDisable'), + array('check', 'modlog_enabled'), + array('check', 'queryless_urls'), + array('rule'), + // Width/Height image reduction. + array('int', 'maxwidth'), + array('int', 'maxheight'), + array('rule'), + // SMTP stuff. + array('select', 'mail_type', array('smtp' => 'SMTP', 'sendmail' => 'sendmail')), + array('text', 'smtp_host'), + array('text', 'smtp_port'), + array('text', 'smtp_username'), + array('password', 'smtp_password'), + array('rule'), + // XML stuff ;). + array('check', 'xmlnews_enable'), + array('int', 'xmlnews_maxlen'), + array('rule'), + // Recycle topics? + array('check', 'recycle_enable'), + array('select', 'recycle_board', $calBoards), + array('heading', &$txt['mods_cat_layout']), + // Compact pages? + array('check', 'compactTopicPagesEnable'), + array('int', 'compactTopicPagesContiguous', null, $txt['smf235'] . '
' . str_replace(' ', ' ', '"3" ' . $txt['smf236'] . ': 1 ... 4 [5] 6 ... 9') . '
' . str_replace(' ', ' ', '"5" ' . $txt['smf236'] . ': 1 ... 3 4 [5] 6 7 ... 9') . '
'), + array('rule'), + // Stuff that just is everywhere - today, search, online, etc. + array('select', 'todayMod', array(&$txt['smf290'], &$txt['smf291'], &$txt['smf292'])), + array('check', 'topbottomEnable'), + array('check', 'onlineEnable'), + array('check', 'enableVBStyleLogin'), + array('check', 'autoLinkUrls'), + array('int', 'fixLongWords'), + array('rule'), + // Pagination stuff. + array('int', 'defaultMaxTopics'), + array('int', 'defaultMaxMessages'), + array('int', 'defaultMaxMembers'), + array('int', 'topicSummaryPosts'), + array('int', 'enableAllMessages'), + array('rule'), + // Number of posts for a hot topic, participation, etc.? + array('int', 'hotTopicPosts'), + array('int', 'hotTopicVeryPosts'), + array('check', 'enableParticipation'), + array('check', 'enablePreviousNext'), + array('rule'), + // This is like debugging sorta. + array('check', 'timeLoadPageEnable'), + array('check', 'disableHostnameLookup'), + array('rule'), + // Who's online. + array('check', 'who_enabled'), '', + // Recent topics ? + array('check', 'recent_topics',null, &$txt['recent_topics']), + + array('heading', &$txt['mods_cat_search']), + // Basic search settings. + array('check', 'simpleSearch'), + array('check', 'search_match_complete_words'), + array('check', 'disableTemporaryTables'), + // Number of search results displayed/cached. + array('rule'), + array('int', 'search_results_per_page'), + array('int', 'search_cache_size'), + array('rule'), + // Search weight settings. + array('int', 'search_weight_frequency'), + array('int', 'search_weight_age'), + array('int', 'search_weight_length'), + array('int', 'search_weight_subject'), + array('int', 'search_weight_first_message'), + array('heading', &$txt['mods_cat_avatars']), + // Basic avatar settings. + array('check', 'avatar_allow_server_stored'), + array('text', 'avatar_directory', 30), + array('text', 'avatar_url', 30), + array('rule'), + // External avatars... + array('check', 'avatar_allow_external_url'), + array('int', 'avatar_max_width_external'), + array('int', 'avatar_max_height_external'), + array('check', 'avatar_check_size'), + array('select', 'avatar_action_too_large', array( + 'option_refuse' => &$txt['option_refuse'], + 'option_html_resize' => &$txt['option_html_resize'], + 'option_download_and_resize' => &$txt['option_download_and_resize'] + )), + array('rule'), + // Uploaded avatars. + array('check', 'avatar_allow_upload'), + array('int', 'avatar_max_width_upload'), + array('int', 'avatar_max_height_upload'), + array('check', 'avatar_resize_upload'), + array('check', 'avatar_download_png'), + array('heading', &$txt['smf294']), + // Who can do attachments? + array('select', 'attachmentEnable', explode('|', $txt['smf111'])), + array('rule'), + // Extensions/images...? + array('check', 'attachmentCheckExtensions'), + array('text', 'attachmentExtensions'), + array('check', 'attachmentShowImages'), + array('check', 'attachmentEncryptFilenames'), + array('rule'), + // Directories and sizes/numbers. + array('text', 'attachmentUploadDir', 30), + array('int', 'attachmentDirSizeLimit'), + array('int', 'attachmentPostLimit'), + array('int', 'attachmentSizeLimit'), + array('int', 'attachmentNumPerPostLimit'), + array('heading', &$txt['smf293']), + // Karma - On or off? + array('select', 'karmaMode', explode('|', $txt['smf64'])), + + array('check', 'karmadescmod'), + array('int', 'karmamaxmembers'), + array('check', 'karmalogview'), + array('check', 'karmapermiss'), + array('check', 'karmalinks'), + array('check', 'karmaisowner'), + array('check', 'karmakarma'), + array('check', 'karmaurl'), + array('check', 'karmaotherstat'), + array('check', 'karmasurv'), + array('text', 'karmawhatwrite'), + array('check', 'karmacensor'), + array('check', 'karmatopicstarter'), + + array('rule'), + // Who can do it.... and who is restricted by time limits? + array('int', 'karmaMinPosts'), + array('float', 'karmaWaitTime'), + array('check', 'karmaTimeRestrictAdmins'), + array('rule'), + // What does it look like? [smite]? + array('text', 'karmaLabel'), + array('text', 'karmaApplaudLabel'), + array('text', 'karmaSmiteLabel'), + + array('heading', "Google Member Map"), + array('check', 'googleMapsEnable'), + array('check', 'googleMapsEnableLegend'), + array('text', 'googleMapsKey'), + array('check', 'googleMapsPinGender'), + array('int', 'googleMapsPinNumber'), + array('select', 'googleMapsType', array('G_NORMAL_MAP' => 'Map', 'G_SATELLITE_MAP' => 'Satellite', 'G_HYBRID_MAP' => 'Hybrid')), + array('select', 'googleSidebar', array('No Sidebar', 'Sidebar Right', 'Sidebar Bottom')), + array('rule'), + array('float', 'googleMapsDefaultLat', '25'), + array('float', 'googleMapsDefaultLong', '25'), + array('int', 'googleMapsDefaultZoom'), + array('rule'), + array('check', 'googleMapsEnableClusterer'), + array('int', 'googleMapsMinMarkerCluster'), + array('int', 'googleMapsMaxVisMarker'), + array('int', 'googleMapsMaxNumClusters'), + array('int', 'googleMapsMaxLinesCluster'), + array('heading', &$txt['mods_cat_calendar']), + // Enable the calendar? + array('check', 'cal_enabled'), + array('rule'), + // How the actual calendar looks... + array('check', 'cal_daysaslink'), + array('check', 'cal_showweeknum'), + array('rule'), + // Show it on the boardindex? + array('int', 'cal_days_for_index'), + array('check', 'cal_showholidaysonindex'), + array('check', 'cal_showbdaysonindex'), + array('check', 'cal_showeventsonindex'), + array('rule'), + // The default board to post in... kinda alone... + array('select', 'cal_defaultboard', $calBoards), + array('rule'), + // Minimum/Maximum year for events. + array('int', 'cal_minyear'), + array('int', 'cal_maxyear'), + array('rule'), + // Colors for the calendar display. + array('text', 'cal_bdaycolor'), + array('text', 'cal_eventcolor'), + array('text', 'cal_holidaycolor'), + array('rule'), + // One day events or multi-day? + array('check', 'cal_allowspan'), + array('int', 'cal_maxspan'), + //Begin CAPTCHA Mod 0.1 + array('heading', $txt['captchaHeading']), + array('int', 'captchaChars'), + array('int', 'captchaMinSize'), + array('int', 'captchaMaxSize'), + array('int', 'captchaMaxRotate'), + array('check', 'captchaNoise'), + array('check', 'captchaWebSafeColours'), + array('text', 'captchaBadGuysURL', 50), + //End CAPTCHA Mod + array('heading', &$txt['visual_warning_mod']), + array('text', 'visualw_mess_ban'), + array('text', 'visualw_mess_mute'), + array('text', 'visualw_mess_pmod'), + array('text', 'visualw_mess_warn'), + array('rule'), + array('text', 'visualw_color_ban'), + array('text', 'visualw_color_mute'), + array('text', 'visualw_color_pmod'), + array('text', 'visualw_color_warn'), + array('rule'), + array('text', 'visualw_image_ban'), + array('text', 'visualw_image_mute'), + array('text', 'visualw_image_pmod'), + array('text', 'visualw_image_warn'), + array('rule'), + array('text', 'muteAutoTime'), + array('text', 'moderationAutoTime'), + array('text', 'warningAutoTime'), + array('rule'), + array('check', 'visualw_pmod_edit'), + + array('heading', &$txt['nowplaying1']), + array('check', 'nowplayingEnabled'), + array('text', 'nowplaying_text', 30), + array('text', 'nowplaying_image', 30), + array('rule'), + array('heading', &$txt['ob_googlebot_modname']), + // Count all instances of spiders? + array('check', 'ob_googlebot_count_all_instances'), + array('check', 'ob_googlebot_display_all_instances'), + array('check', 'ob_googlebot_display_agent'), + array('check', 'ob_googlebot_display_own_list'), + array('rule'), + array('check', 'ob_googlebot_count_most_online'), + array('rule'), + ); + + return $config_vars; +} + +function ModifyModSettings() +{ + global $txt, $scripturl, $context, $settings, $sc; + + isAllowedTo('admin_forum'); + + // Load the administration bar... + adminIndex('edit_mods_settings'); + loadLanguage('Help'); + + $config_vars = defineSettings(); + + $context['page_title'] = $txt['modSettings_title']; + $context['sub_template'] = 'rawdata'; + + $context['raw_data'] = ' +
+ + +
+ + + + + + '; + + // Show them! + displaySettings($config_vars); + + $context['raw_data'] .= ' + + + +
+ ' . $txt[119] . ' + ' . $txt['modSettings_title'] . ' + + ' . $txt['mods_cat_expand_all'] . ' +
' . $txt['smf3'] . '
+
+ + +
'; +} + +function displaySettings(&$config_vars) +{ + global $txt, $helptxt, $scripturl, $modSettings, $context, $settings; + + // If it's not yet set, default it to just 0. + if (empty($_SESSION['expand']) || isset($_GET['collapseall'])) + $_SESSION['expand'] = serialize(array(0)); + // Otherwise take off the slashes. + else + $_SESSION['expand'] = stripslashes($_SESSION['expand']); + + // Get the actual array. + $expanded = unserialize($_SESSION['expand']); + + // Expanding/Collapsing? + if (isset($_GET['expand'])) + { + if ($_GET['expand'] == 'all') + $_GET['expandall'] = true; + // Collapse. + elseif (in_array($_GET['expand'], $expanded)) + { + foreach ($expanded as $k => $v) + if ($v == $_GET['expand']) + unset($expanded[$k]); + } + // Expand. + else + $expanded = array_merge($expanded, array((int) $_GET['expand'])); + + // Reset the array. + $_SESSION['expand'] = serialize($expanded); + } + + // Right now we are showing the boxes, etc. + $display = true; + + // 0: type, 1: name, 2:desc, 3:helptext, 4:size/values. + foreach ($config_vars as $k => $config_var) + { + if ($display) + $context['raw_data'] .= ' + '; + + // These two are referenced so much they deserve their own variables. + $config_type = $config_var[0]; + $config_id = isset($config_var[1]) ? $config_var[1] : ''; + + // A rule, no more no less - assuming we're displaying things, go for it. + if ($config_type == 'rule' && $display) + { + $context['raw_data'] .= ' + +
'; + continue; + } + elseif ($config_type == 'heading') + { + // Currently not displaying... close the old cell. + if (!$display) + $context['raw_data'] .= ' + + '; + else + $context['raw_data'] .= ' + '; + + // Show the bar with the +/-. [ + Blah ]... + $context['raw_data'] .= ' + + + + + + +
*' . $config_id . '
+ '; + + // If it's not in the expanded array, and we're not expanding everything... + if (!in_array($k, $expanded) && !isset($_GET['expandall'])) + { + // Turn off display. + $display = false; + + // Start an empty box. (just so it looks better... err, I think it looks better.) + $context['raw_data'] .= ' + + '; + } + // Expand this and set the session var... done so collapsing after expanding all is logical. + elseif (isset($_GET['expandall'])) + $expanded = array_merge($expanded, array($k)); + // Turn display on otherwise. + else + $display = true; + + continue; + } + + // Don't do anything more if we're not displaying anything! + if (!$display) + continue; + + // This setting isn't set!! Ignore it and set it to a blank value so mods are easier to write ;). + if (!isset($modSettings[$config_id])) + $modSettings[$config_id] = ''; + + $context['raw_data'] .= ' + '; + + // Show the little [?] if display is on. + if (isset($config_var[4]) || isset($helptxt[$config_id])) + $context['raw_data'] .= ' +
' . $txt[119] . ''; + else + $context['raw_data'] .= ' + '; + + // Show the description... if a specific string wasn't passed, look for it... makes it easier ;). + if ($config_id != '') + $context['raw_data'] .= ' + + '; + + // If it's a textbox.... (text, int, float, etc.) + if (in_array($config_type, array('text', 'int', 'float'))) + $context['raw_data'] .= ''; + // If it's a password... + elseif ($config_type == 'password') + $context['raw_data'] .= ''; + // If it's a checkbox, we're gonna have to send a hidden 0 with it... + elseif ($config_var[0] == 'check') + $context['raw_data'] .= ''; + // A select box... display on... + elseif ($config_var[0] == 'select') + { + $context['raw_data'] .= ' + + '; + } + + // End the table cell. + $context['raw_data'] .= ''; + } + + // Cleanup the expanded array again: + if (isset($_GET['expandall'])) + $_SESSION['expand'] = serialize($expanded); + + // Gotta close it off if we weren't showing anything ;). + if (!$display) + $context['raw_data'] .= ' + '; +} + +// Save the settings. +function ModifyModSettings2() +{ + global $scripturl, $db_prefix, $settings; + + // Verify the user is allowed to be here! + isAllowedTo('admin_forum'); + checkSession(); + + $setArray = array(); + + // All the checkbox values.... + $config_vars = defineSettings(); + foreach ($config_vars as $var) + { + if (!isset($var[1]) || !isset($_POST[$var[1]])) + continue; + + // Checkboxes! + elseif ($var[0] == 'check') + $setArray[$var[1]] = !empty($_POST[$var[1]]) ? '1' : '0'; + // Select boxes! + elseif ($var[0] == 'select' && in_array($_POST[$var[1]], array_keys($var[2]))) + $setArray[$var[1]] = $_POST[$var[1]]; + // Integers! + elseif ($var[0] == 'int') + $setArray[$var[1]] = (int) $_POST[$var[1]]; + // Floating point! + elseif ($var[0] == 'float') + $setArray[$var[1]] = (float) $_POST[$var[1]]; + // Text and passwords! + elseif ($var[0] == 'text' || $var[0] == 'password') + $setArray[$var[1]] = $_POST[$var[1]]; + } + + updateSettings($setArray); + + updateStats('calendar'); + + loadUserSettings(); + writeLog(); + + // Expand something? + if (isset($_POST['expand']) && $_POST['expand'] != '') + redirectexit('action=modifyModSettings;expand=' . $_POST['expand'] . '#sect' . $_POST['expand']); + + // Back to administration. + redirectexit('action=modifyModSettings'); +} + +?> diff --git a/Sources/ModSettings.php~ b/Sources/ModSettings.php~ new file mode 100644 index 0000000..5386450 --- /dev/null +++ b/Sources/ModSettings.php~ @@ -0,0 +1,639 @@ + &$txt['displayedValue']), + &$txt['descriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'), + Note that just saying array('first', 'second') will put 0 in the SQL for 'first'. + + * A password input box. Used for passwords, no less! + ie. array('password', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth', + &$txt['descriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'), + + For each option: + type (see above), variable name, size/possible values, description, helptext. + OR make type 'rule' for an empty string for a horizontal rule. + OR make type 'heading' with a string for a titled section. */ + + $config_vars = array( + array('heading', &$txt['mods_cat_features']), + // Big Options... polls, sticky, guest stuff.... + array('select', 'pollMode', array(&$txt['smf34'], &$txt['smf32'], &$txt['smf33'])), + array('check', 'enableStickyTopics'), + array('rule'), + // Basic stuff, user languages, titles, flash, permissions... + array('check', 'allow_guestAccess'), + array('check', 'userLanguage'), + array('check', 'allow_editDisplayName'), + array('check', 'allow_hideOnline'), + array('check', 'allow_hideEmail'), + array('check', 'guest_hideContacts'), + array('check', 'titlesEnable'), + array('text', 'default_personalText'), + array('int', 'max_signatureLength', 5), + array('check', 'removeNestedQuotes'), + array('check', 'enableEmbeddedFlash'), + array('check', 'enablePostHTML'), + array('text', 'disabledBBC'), + array('check', 'enableBBC'), + array('int', 'max_messageLength', 5), + array('check', 'enableNewReplyWarning'), + array('rule'), + // Stats, compression, cookies.... server type stuff. + array('text', 'time_format'), + array('select', 'number_format', array('1234.00' => '1234.00', '1,234.00' => '1,234.00', '1.234,00' => '1.234,00', '1 234,00' => '1 234,00', '1234,00' => '1234,00')), + array('float', 'time_offset'), + array('int', 'spamWaitTime'), + array('int', 'edit_wait_time'), + array('int', 'failed_login_threshold'), + array('int', 'lastActive'), + array('check', 'enableSpellChecking'), + array('check', 'trackStats'), + array('check', 'hitStats'), + array('check', 'enableCompressedOutput'), + array('check', 'databaseSession_enable'), + array('check', 'databaseSession_loose'), + array('int', 'databaseSession_lifetime'), + array('check', 'enableErrorLogging'), + array('int', 'cookieTime', 5), + array('check', 'localCookies'), + array('check', 'globalCookies'), + array('check', 'redirectMetaRefresh'), + array('check', 'securityDisable'), + array('rule'), + // Email and registration type stuff... + array('select', 'registration_method', array(&$txt['registration_standard'], &$txt['registration_activate'], &$txt['registration_approval'], &$txt['registration_disabled'])), + array('check', 'notify_on_new_registration'), + array('check', 'send_validation_onChange'), + array('check', 'send_welcomeEmail'), + array('rule'), + // Database reapir, optimization, etc. + array('int', 'autoOptDatabase', 4), + array('int', 'autoOptMaxOnline', 4), + array('check', 'autoFixDatabase'), + array('rule'), + // Option-ish things... miscellaneous sorta. + array('check', 'notifyAnncmnts_UserDisable'), + array('check', 'modlog_enabled'), + array('check', 'queryless_urls'), + array('rule'), + // Width/Height image reduction. + array('int', 'maxwidth'), + array('int', 'maxheight'), + array('rule'), + // SMTP stuff. + array('select', 'mail_type', array('smtp' => 'SMTP', 'sendmail' => 'sendmail')), + array('text', 'smtp_host'), + array('text', 'smtp_port'), + array('text', 'smtp_username'), + array('password', 'smtp_password'), + array('rule'), + // XML stuff ;). + array('check', 'xmlnews_enable'), + array('int', 'xmlnews_maxlen'), + array('rule'), + // Recycle topics? + array('check', 'recycle_enable'), + array('select', 'recycle_board', $calBoards), + array('heading', &$txt['mods_cat_layout']), + // Compact pages? + array('check', 'compactTopicPagesEnable'), + array('int', 'compactTopicPagesContiguous', null, $txt['smf235'] . '
' . str_replace(' ', ' ', '"3" ' . $txt['smf236'] . ': 1 ... 4 [5] 6 ... 9') . '
' . str_replace(' ', ' ', '"5" ' . $txt['smf236'] . ': 1 ... 3 4 [5] 6 7 ... 9') . '
'), + array('rule'), + // Stuff that just is everywhere - today, search, online, etc. + array('select', 'todayMod', array(&$txt['smf290'], &$txt['smf291'], &$txt['smf292'])), + array('check', 'topbottomEnable'), + array('check', 'onlineEnable'), + array('check', 'enableVBStyleLogin'), + array('check', 'autoLinkUrls'), + array('int', 'fixLongWords'), + array('rule'), + // Pagination stuff. + array('int', 'defaultMaxTopics'), + array('int', 'defaultMaxMessages'), + array('int', 'defaultMaxMembers'), + array('int', 'topicSummaryPosts'), + array('int', 'enableAllMessages'), + array('rule'), + // Number of posts for a hot topic, participation, etc.? + array('int', 'hotTopicPosts'), + array('int', 'hotTopicVeryPosts'), + array('check', 'enableParticipation'), + array('check', 'enablePreviousNext'), + array('rule'), + // This is like debugging sorta. + array('check', 'timeLoadPageEnable'), + array('check', 'disableHostnameLookup'), + array('rule'), + // Who's online. + array('check', 'who_enabled'), + array('heading', &$txt['mods_cat_search']), + // Basic search settings. + array('check', 'simpleSearch'), + array('check', 'search_match_complete_words'), + array('check', 'disableTemporaryTables'), + // Number of search results displayed/cached. + array('rule'), + array('int', 'search_results_per_page'), + array('int', 'search_cache_size'), + array('rule'), + // Search weight settings. + array('int', 'search_weight_frequency'), + array('int', 'search_weight_age'), + array('int', 'search_weight_length'), + array('int', 'search_weight_subject'), + array('int', 'search_weight_first_message'), + array('heading', &$txt['mods_cat_avatars']), + // Basic avatar settings. + array('check', 'avatar_allow_server_stored'), + array('text', 'avatar_directory', 30), + array('text', 'avatar_url', 30), + array('rule'), + // External avatars... + array('check', 'avatar_allow_external_url'), + array('int', 'avatar_max_width_external'), + array('int', 'avatar_max_height_external'), + array('check', 'avatar_check_size'), + array('select', 'avatar_action_too_large', array( + 'option_refuse' => &$txt['option_refuse'], + 'option_html_resize' => &$txt['option_html_resize'], + 'option_download_and_resize' => &$txt['option_download_and_resize'] + )), + array('rule'), + // Uploaded avatars. + array('check', 'avatar_allow_upload'), + array('int', 'avatar_max_width_upload'), + array('int', 'avatar_max_height_upload'), + array('check', 'avatar_resize_upload'), + array('check', 'avatar_download_png'), + array('heading', &$txt['smf294']), + // Who can do attachments? + array('select', 'attachmentEnable', explode('|', $txt['smf111'])), + array('rule'), + // Extensions/images...? + array('check', 'attachmentCheckExtensions'), + array('text', 'attachmentExtensions'), + array('check', 'attachmentShowImages'), + array('check', 'attachmentEncryptFilenames'), + array('rule'), + // Directories and sizes/numbers. + array('text', 'attachmentUploadDir', 30), + array('int', 'attachmentDirSizeLimit'), + array('int', 'attachmentPostLimit'), + array('int', 'attachmentSizeLimit'), + array('int', 'attachmentNumPerPostLimit'), + array('heading', &$txt['smf293']), + // Karma - On or off? + array('select', 'karmaMode', explode('|', $txt['smf64'])), + + array('check', 'karmadescmod'), + array('int', 'karmamaxmembers'), + array('check', 'karmalogview'), + array('check', 'karmapermiss'), + array('check', 'karmalinks'), + array('check', 'karmaisowner'), + array('check', 'karmakarma'), + array('check', 'karmaurl'), + array('check', 'karmaotherstat'), + array('check', 'karmasurv'), + array('text', 'karmawhatwrite'), + array('check', 'karmacensor'), + array('check', 'karmatopicstarter'), + + array('rule'), + // Who can do it.... and who is restricted by time limits? + array('int', 'karmaMinPosts'), + array('float', 'karmaWaitTime'), + array('check', 'karmaTimeRestrictAdmins'), + array('rule'), + // What does it look like? [smite]? + array('text', 'karmaLabel'), + array('text', 'karmaApplaudLabel'), + array('text', 'karmaSmiteLabel'), + + array('heading', "Google Member Map"), + array('check', 'googleMapsEnable'), + array('check', 'googleMapsEnableLegend'), + array('text', 'googleMapsKey'), + array('check', 'googleMapsPinGender'), + array('int', 'googleMapsPinNumber'), + array('select', 'googleMapsType', array('G_MAP_TYPE' => 'Map', 'G_SATELLITE_TYPE' => 'Satellite', 'G_HYBRID_TYPE' => 'Hybrid')), + array('select', 'googleSidebar', array('No Sidebar', 'Sidebar Right', 'Sidebar Bottom')), + array('rule'), + array('float', 'googleMapsDefaultLat', '25'), + array('float', 'googleMapsDefaultLong', '25'), + array('int', 'googleMapsDefaultZoom'), + array('rule'), + array('check', 'googleMapsEnableClusterer'), + array('int', 'googleMapsMinMarkerCluster'), + array('int', 'googleMapsMaxVisMarker'), + array('int', 'googleMapsMaxNumClusters'), + array('int', 'googleMapsMaxLinesCluster'), + array('heading', &$txt['mods_cat_calendar']), + // Enable the calendar? + array('check', 'cal_enabled'), + array('rule'), + // How the actual calendar looks... + array('check', 'cal_daysaslink'), + array('check', 'cal_showweeknum'), + array('rule'), + // Show it on the boardindex? + array('int', 'cal_days_for_index'), + array('check', 'cal_showholidaysonindex'), + array('check', 'cal_showbdaysonindex'), + array('check', 'cal_showeventsonindex'), + array('rule'), + // The default board to post in... kinda alone... + array('select', 'cal_defaultboard', $calBoards), + array('rule'), + // Minimum/Maximum year for events. + array('int', 'cal_minyear'), + array('int', 'cal_maxyear'), + array('rule'), + // Colors for the calendar display. + array('text', 'cal_bdaycolor'), + array('text', 'cal_eventcolor'), + array('text', 'cal_holidaycolor'), + array('rule'), + // One day events or multi-day? + array('check', 'cal_allowspan'), + array('int', 'cal_maxspan'), + array('heading', &$txt['visual_warning_mod']), + array('text', 'visualw_mess_ban'), + array('text', 'visualw_mess_mute'), + array('text', 'visualw_mess_pmod'), + array('text', 'visualw_mess_warn'), + array('rule'), + array('text', 'visualw_color_ban'), + array('text', 'visualw_color_mute'), + array('text', 'visualw_color_pmod'), + array('text', 'visualw_color_warn'), + array('rule'), + array('text', 'visualw_image_ban'), + array('text', 'visualw_image_mute'), + array('text', 'visualw_image_pmod'), + array('text', 'visualw_image_warn'), + array('rule'), + array('text', 'muteAutoTime'), + array('text', 'moderationAutoTime'), + array('text', 'warningAutoTime'), + array('rule'), + array('check', 'visualw_pmod_edit'), + + array('heading', &$txt['nowplaying1']), + array('check', 'nowplayingEnabled'), + array('text', 'nowplaying_text', 30), + array('text', 'nowplaying_image', 30), + array('rule'), + array('heading', &$txt['ob_googlebot_modname']), + // Count all instances of spiders? + array('check', 'ob_googlebot_count_all_instances'), + array('check', 'ob_googlebot_display_all_instances'), + array('check', 'ob_googlebot_display_agent'), + array('check', 'ob_googlebot_display_own_list'), + array('rule'), + array('check', 'ob_googlebot_count_most_online'), + array('rule'), + ); + + return $config_vars; +} + +function ModifyModSettings() +{ + global $txt, $scripturl, $context, $settings, $sc; + + isAllowedTo('admin_forum'); + + // Load the administration bar... + adminIndex('edit_mods_settings'); + loadLanguage('Help'); + + $config_vars = defineSettings(); + + $context['page_title'] = $txt['modSettings_title']; + $context['sub_template'] = 'rawdata'; + + $context['raw_data'] = ' +
+ + +
+ + + + + + '; + + // Show them! + displaySettings($config_vars); + + $context['raw_data'] .= ' + + + +
+ ' . $txt[119] . ' + ' . $txt['modSettings_title'] . ' + + ' . $txt['mods_cat_expand_all'] . ' +
' . $txt['smf3'] . '
+
+ + +
'; +} + +function displaySettings(&$config_vars) +{ + global $txt, $helptxt, $scripturl, $modSettings, $context, $settings; + + // If it's not yet set, default it to just 0. + if (empty($_SESSION['expand']) || isset($_GET['collapseall'])) + $_SESSION['expand'] = serialize(array(0)); + // Otherwise take off the slashes. + else + $_SESSION['expand'] = stripslashes($_SESSION['expand']); + + // Get the actual array. + $expanded = unserialize($_SESSION['expand']); + + // Expanding/Collapsing? + if (isset($_GET['expand'])) + { + if ($_GET['expand'] == 'all') + $_GET['expandall'] = true; + // Collapse. + elseif (in_array($_GET['expand'], $expanded)) + { + foreach ($expanded as $k => $v) + if ($v == $_GET['expand']) + unset($expanded[$k]); + } + // Expand. + else + $expanded = array_merge($expanded, array((int) $_GET['expand'])); + + // Reset the array. + $_SESSION['expand'] = serialize($expanded); + } + + // Right now we are showing the boxes, etc. + $display = true; + + // 0: type, 1: name, 2:desc, 3:helptext, 4:size/values. + foreach ($config_vars as $k => $config_var) + { + if ($display) + $context['raw_data'] .= ' + '; + + // These two are referenced so much they deserve their own variables. + $config_type = $config_var[0]; + $config_id = isset($config_var[1]) ? $config_var[1] : ''; + + // A rule, no more no less - assuming we're displaying things, go for it. + if ($config_type == 'rule' && $display) + { + $context['raw_data'] .= ' + +
'; + continue; + } + elseif ($config_type == 'heading') + { + // Currently not displaying... close the old cell. + if (!$display) + $context['raw_data'] .= ' + + '; + else + $context['raw_data'] .= ' + '; + + // Show the bar with the +/-. [ + Blah ]... + $context['raw_data'] .= ' + + + + + + +
*' . $config_id . '
+ '; + + // If it's not in the expanded array, and we're not expanding everything... + if (!in_array($k, $expanded) && !isset($_GET['expandall'])) + { + // Turn off display. + $display = false; + + // Start an empty box. (just so it looks better... err, I think it looks better.) + $context['raw_data'] .= ' + + '; + } + // Expand this and set the session var... done so collapsing after expanding all is logical. + elseif (isset($_GET['expandall'])) + $expanded = array_merge($expanded, array($k)); + // Turn display on otherwise. + else + $display = true; + + continue; + } + + // Don't do anything more if we're not displaying anything! + if (!$display) + continue; + + // This setting isn't set!! Ignore it and set it to a blank value so mods are easier to write ;). + if (!isset($modSettings[$config_id])) + $modSettings[$config_id] = ''; + + $context['raw_data'] .= ' + '; + + // Show the little [?] if display is on. + if (isset($config_var[4]) || isset($helptxt[$config_id])) + $context['raw_data'] .= ' +
' . $txt[119] . ''; + else + $context['raw_data'] .= ' + '; + + // Show the description... if a specific string wasn't passed, look for it... makes it easier ;). + if ($config_id != '') + $context['raw_data'] .= ' + + '; + + // If it's a textbox.... (text, int, float, etc.) + if (in_array($config_type, array('text', 'int', 'float'))) + $context['raw_data'] .= ''; + // If it's a password... + elseif ($config_type == 'password') + $context['raw_data'] .= ''; + // If it's a checkbox, we're gonna have to send a hidden 0 with it... + elseif ($config_var[0] == 'check') + $context['raw_data'] .= ''; + // A select box... display on... + elseif ($config_var[0] == 'select') + { + $context['raw_data'] .= ' + + '; + } + + // End the table cell. + $context['raw_data'] .= ''; + } + + // Cleanup the expanded array again: + if (isset($_GET['expandall'])) + $_SESSION['expand'] = serialize($expanded); + + // Gotta close it off if we weren't showing anything ;). + if (!$display) + $context['raw_data'] .= ' + '; +} + +// Save the settings. +function ModifyModSettings2() +{ + global $scripturl, $db_prefix, $settings; + + // Verify the user is allowed to be here! + isAllowedTo('admin_forum'); + checkSession(); + + $setArray = array(); + + // All the checkbox values.... + $config_vars = defineSettings(); + foreach ($config_vars as $var) + { + if (!isset($var[1]) || !isset($_POST[$var[1]])) + continue; + + // Checkboxes! + elseif ($var[0] == 'check') + $setArray[$var[1]] = !empty($_POST[$var[1]]) ? '1' : '0'; + // Select boxes! + elseif ($var[0] == 'select' && in_array($_POST[$var[1]], array_keys($var[2]))) + $setArray[$var[1]] = $_POST[$var[1]]; + // Integers! + elseif ($var[0] == 'int') + $setArray[$var[1]] = (int) $_POST[$var[1]]; + // Floating point! + elseif ($var[0] == 'float') + $setArray[$var[1]] = (float) $_POST[$var[1]]; + // Text and passwords! + elseif ($var[0] == 'text' || $var[0] == 'password') + $setArray[$var[1]] = $_POST[$var[1]]; + } + + updateSettings($setArray); + + updateStats('calendar'); + + loadUserSettings(); + writeLog(); + + // Expand something? + if (isset($_POST['expand']) && $_POST['expand'] != '') + redirectexit('action=modifyModSettings;expand=' . $_POST['expand'] . '#sect' . $_POST['expand']); + + // Back to administration. + redirectexit('action=modifyModSettings'); +} + +?> diff --git a/Sources/Modlog.php b/Sources/Modlog.php new file mode 100644 index 0000000..cdfb5b0 --- /dev/null +++ b/Sources/Modlog.php @@ -0,0 +1,275 @@ + $txt['modlog_ac_locked'], + 'sticky' => $txt['modlog_ac_stickied'], + 'modify' => $txt['modlog_ac_modified'], + 'merge' => $txt['modlog_ac_merged'], + 'split' => $txt['modlog_ac_split'], + 'move' => $txt['modlog_ac_moved'], + 'remove' => $txt['modlog_ac_removed'], + 'delete' => $txt['modlog_ac_deleted'], + 'delete_member' => $txt['modlog_ac_deleted_member'], + 'ban' => $txt['modlog_ac_banned'], + 'news' => $txt['modlog_ac_news'], + 'profile' => $txt['modlog_ac_profile'], + 'pruned' => $txt['modlog_ac_pruned'], + ); + + // Do the column stuff. + $context['columns'] = array( + 'lm.action' => array('label' => $txt['modlog_action']), + 'lm.logTime' => array('label' => $txt['modlog_date']), + 'mem.realName' => array('label' => $txt['modlog_member']), + 'mg.groupName' => array('label' => $txt['modlog_position']), + 'lm.IP' => array('label' => $txt['modlog_ip']) + ); + + // Check the order column exists. + if (!isset($context['columns'][$context['order']])) + $context['order'] = 'lm.logTime'; + + // Provide extra information about each column - the link, whether it's selected, etc. + foreach ($context['columns'] as $col => $dummy) + { + $context['columns'][$col]['href'] = $scripturl . '?action=modlog;order=' . $col . ';start=0'; + if (!isset($_REQUEST['d']) && $col == $context['order']) + $context['columns'][$col]['href'] .= ';d'; + + $context['columns'][$col]['link'] = '' . $context['columns'][$col]['label'] . ''; + $context['columns'][$col]['selected'] = $context['order'] == $col; + } + + // Sort direction? + $context['sort_direction'] = !isset($_REQUEST['d']) ? 'down' : 'up'; + + // Count the amount of entries in total for pagination. + $result = db_query(" + SELECT COUNT(ID_ACTION) + FROM {$db_prefix}log_actions", __FILE__, __LINE__); + list ($total) = mysql_fetch_row($result); + mysql_free_result($result); + + // Create the page index. + $context['page_index'] = isset($_REQUEST['search']) ? '' : constructPageIndex($scripturl . '?action=modlog;order=' . $context['order'] . $context['dir'], $context['start'], $total, $displaypage); + + // Here we have the query getting the log details. + $result = db_query(" + SELECT + lm.ID_ACTION, lm.ID_MEMBER, lm.IP, lm.logTime, lm.action, lm.extra, + mem.realName, mg.groupName + FROM {$db_prefix}log_actions AS lm + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lm.ID_MEMBER) + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))" . (isset($_REQUEST['search']) ? " + WHERE $context[order] LIKE '%$_REQUEST[search]%'" : '') . " + ORDER BY $context[order]" . (isset($_REQUEST['d']) ? '' : ' DESC') . (isset($_REQUEST['search']) ? '' : " + LIMIT $context[start], $displaypage"), __FILE__, __LINE__); + + // Decide whether the amount returns is total entries or ones that match search string. + $context['entrynum'] = isset($_REQUEST['search']) ? $txt['modlog_search_result'] . ': ' . mysql_num_rows($result) : $txt['modlog_total_entries'] . ': ' . $total; + + // Arrays for decoding objects into. + $topics = array(); + $boards = array(); + $members = array(); + $context['entries'] = array(); + while ($row = mysql_fetch_assoc($result)) + { + $row['extra'] = unserialize($row['extra']); + + // Is this associated with a topic? + if (isset($row['extra']['topic'])) + $topics[$row['extra']['topic']][] = $row['ID_ACTION']; + if (isset($row['extra']['new_topic'])) + $topics[$row['extra']['new_topic']][] = $row['ID_ACTION']; + + // How about a member? + if (isset($row['extra']['member'])) + $members[$row['extra']['member']][] = $row['ID_ACTION']; + + // Associated with a board? + if (isset($row['extra']['board_to'])) + $boards[$row['extra']['board_to']][] = $row['ID_ACTION']; + if (isset($row['extra']['board_from'])) + $boards[$row['extra']['board_from']][] = $row['ID_ACTION']; + + // IP Info? + if (isset($row['extra']['ip_range'])) + $row['extra']['ip_range'] = '' . $row['extra']['ip_range'] . ''; + + // Email? + if (isset($row['extra']['email'])) + $row['extra']['email'] = '' . $row['extra']['email'] . ''; + + // The array to go to the template. Note here that action is set to a "default" value of the action doesn't match anything in the descriptions. Allows easy adding of logging events with basic details. + $context['entries'][$row['ID_ACTION']] = array( + 'id' => $row['ID_ACTION'], + 'ip' => $row['IP'], + 'position' => $row['groupName'], + 'moderator' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['realName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '' + ), + 'time' => timeformat($row['logTime']), + 'timestamp' => $row['logTime'], + 'editable' => time() > $row['logTime'] + $hoursdisable * 3600, + 'extra' => $row['extra'], + 'action' => isset($descriptions[$row['action']]) ? $descriptions[$row['action']] : $row['action'], + ); + } + mysql_free_result($result); + + if (!empty($boards)) + { + $request = db_query(" + SELECT ID_BOARD, name + FROM {$db_prefix}boards + WHERE ID_BOARD IN (" . implode(', ', array_keys($boards)) . ") + LIMIT " . count(array_keys($boards)), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + foreach ($boards[$row['ID_BOARD']] as $action) + { + // Make the board number into a link - dealing with moving too. + if ($context['entries'][$action]['extra']['board_to'] == $row['ID_BOARD']) + $context['entries'][$action]['extra']['board_to'] = '' . $row['name'] . ''; + elseif ($context['entries'][$action]['extra']['board_from'] == $row['ID_BOARD']) + $context['entries'][$action]['extra']['board_from'] = '' . $row['name'] . ''; + } + } + mysql_free_result($request); + } + + if (!empty($topics)) + { + $request = db_query(" + SELECT ms.subject, t.ID_TOPIC + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS ms + WHERE t.ID_TOPIC IN (" . implode(', ', array_keys($topics)) . ") + AND ms.ID_MSG = t.ID_FIRST_MSG + LIMIT " . count(array_keys($topics)), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + foreach ($topics[$row['ID_TOPIC']] as $action) + { + $this_action = &$context['entries'][$action]; + + // This isn't used in the current theme. + $this_action['topic'] = array( + 'id' => $row['ID_TOPIC'], + 'subject' => $row['subject'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0', + 'link' => '' . $row['subject'] . '' + ); + + // Make the topic number into a link - dealing with splitting too. + if ($this_action['extra']['topic'] == $row['ID_TOPIC']) + $this_action['extra']['topic'] = '' . $row['subject'] . ''; + elseif ($this_action['extra']['new_topic'] == $row['ID_TOPIC']) + $this_action['extra']['new_topic'] = '' . $row['subject'] . ''; + } + } + mysql_free_result($request); + } + + if (!empty($members)) + { + $request = db_query(" + SELECT realName, ID_MEMBER + FROM {$db_prefix}members + WHERE ID_MEMBER IN (" . implode(', ', array_keys($members)) . ") + LIMIT " . count(array_keys($members)), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + foreach ($members[$row['ID_MEMBER']] as $action) + { + // Not used currently. + $context['entries'][$action]['member'] = array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['realName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '' + ); + // Make the member number into a name. + $context['entries'][$action]['extra']['member'] = '' . $row['realName'] . ''; + } + } + mysql_free_result($request); + } +} + +// Function that deletes off the old entries and handles search information. +function ViewModlog2() +{ + global $db_prefix, $txt, $modSettings, $scripturl; + + // Standard check... + isAllowedTo('admin_forum'); + + // Amount of hours before is possible to delete entry. + $hoursdisable = 24; + + if (isset($_POST['removeall'])) + db_query(" + DELETE FROM {$db_prefix}log_actions + WHERE logtime < " . (time() - $hoursdisable * 3600), __FILE__, __LINE__); + elseif (!empty($_POST['remove']) && isset($_POST['delete'])) + db_query(" + DELETE FROM {$db_prefix}log_actions + WHERE ID_ACTION IN ('" . implode("', '", array_unique($_POST['delete'])) . "') + AND logTime < " . (time() - $hoursdisable * 3600), __FILE__, __LINE__); + + redirectexit('action=modlog' . (isset($_POST['start']) ? ';start=' . $_POST['start'] : '') . (isset($_POST['order']) ? ';order=' . $_POST['order'] : '') . (!empty($_POST['dir']) ? ';d' : '') . (isset($_POST['search']) ? ';search=' . $_POST['search'] : '')); +} + +?> \ No newline at end of file diff --git a/Sources/MoreSmilies.php b/Sources/MoreSmilies.php new file mode 100644 index 0000000..ee4a541 --- /dev/null +++ b/Sources/MoreSmilies.php @@ -0,0 +1,72 @@ + diff --git a/Sources/MoveTopic.php b/Sources/MoveTopic.php new file mode 100644 index 0000000..527dd10 --- /dev/null +++ b/Sources/MoveTopic.php @@ -0,0 +1,410 @@ + $row['ID_BOARD'], + 'name' => $row['name'], + 'category' => $row['catName'], + 'child_level' => $row['childLevel'], + 'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['ID_BOARD'] + ); + mysql_free_result($request); + + if (empty($context['boards'])) + fatal_lang_error('moveto_noboards', false); + + $context['page_title'] = $txt[132]; + $context['back_to_topic'] = isset($_REQUEST['goback']); + + if ($user_info['language'] != $language) + { + loadLanguage('index', $language); + $temp = $txt['movetopic_default']; + loadLanguage('index'); + + $txt['movetopic_default'] = $temp; + } + + // Register this form and get a sequence number in $context. + checkSubmitOnce('register'); +} + +// Exceute the move. +function MoveTopic2() +{ + global $txt, $board, $topic, $scripturl, $sourcedir; + global $db_prefix, $ID_MEMBER, $board, $language, $user_info; + + // Make sure this form hasn't been submitted before. + checkSubmitOnce('check'); + + $request = db_query(" + SELECT ID_MEMBER_STARTED, ID_FIRST_MSG + FROM {$db_prefix}topics + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + list ($ID_MEMBER_STARTED, $ID_FIRST_MSG) = mysql_fetch_row($request); + mysql_free_result($request); + + // Can they move topics on this board? + if (!allowedTo('move_any')) + { + if ($ID_MEMBER_STARTED == $ID_MEMBER) + { + isAllowedTo('move_own'); + $boards = array_merge(boardsAllowedTo('move_own'), boardsAllowedTo('move_any')); + } + else + isAllowedTo('move_any'); + } + else + $boards = boardsAllowedTo('move_any'); + + checkSession(); + require_once($sourcedir . '/Subs-Post.php'); + + // The destination board must be numeric. + $_POST['toboard'] = (int) $_POST['toboard']; + + /*if (!in_array($_POST['toboard'], $boards) && !in_array(0, $boards)) + fatal_lang_error('smf232');*/ + + // Make sure they can see the board they are trying to move to (and get whether posts count in the target board). + $request = db_query(" + SELECT b.countPosts, b.name, m.subject + FROM {$db_prefix}boards AS b, {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE $user_info[query_see_board] + AND b.ID_BOARD = $_POST[toboard] + AND t.ID_TOPIC = $topic + AND m.ID_MSG = t.ID_FIRST_MSG + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf232'); + list ($pcounter, $board_name, $subject) = mysql_fetch_row($request); + mysql_free_result($request); + + // Remember this for later. + $_SESSION['move_to_topic'] = $_POST['toboard']; + + // Rename the topic... + if (isset($_POST['reset_subject']) && isset($_POST['custom_subject']) && $_POST['custom_subject'] != '') + { + $_POST['custom_subject'] = htmlspecialchars($_POST['custom_subject']); + $_POST['custom_subject'] = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $_POST['custom_subject']); + + if (isset($_POST['enforce_subject'])) + { + db_query(" + UPDATE {$db_prefix}messages + SET subject = '$txt[response_prefix]$_POST[custom_subject]' + WHERE ID_TOPIC = $topic", __FILE__, __LINE__); + } + + db_query(" + UPDATE {$db_prefix}messages + SET subject = '$_POST[custom_subject]' + WHERE ID_MSG = $ID_FIRST_MSG + LIMIT 1", __FILE__, __LINE__); + } + + // Create a link to this in the old board. + if (isset($_POST['postRedirect'])) + { + // Should be in the boardwide language. + if ($user_info['language'] != $language) + loadLanguage('index', $language); + + // Add the new topic. + db_query(" + INSERT INTO {$db_prefix}topics + (ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, locked, numReplies, numViews) + VALUES ($board, $ID_MEMBER, $ID_MEMBER, 1, 0, 0)", __FILE__, __LINE__); + $remnantTopic = db_insert_id(); + $remnantSubject = addslashes($txt['smf56'] . ': ' . $subject); + + $_POST['reason'] = htmlspecialchars($_POST['reason'], ENT_QUOTES); + preparsecode($_POST['reason']); + + // Add a URL onto the message. + $_POST['reason'] = strtr($_POST['reason'], array( + $txt['movetopic_auto_board'] => '[url=' . $scripturl . '?board=' . $_POST['toboard'] . ']' . addslashes($board_name) . '[/url]', + $txt['movetopic_auto_topic'] => '[iurl]' . $scripturl . '?topic=' . $topic . '.0[/iurl]' + )); + + // 'Post' the moderator's reason. + db_query(" + INSERT INTO {$db_prefix}messages + (ID_BOARD, ID_MEMBER, ID_TOPIC, subject, body, posterName, posterTime, posterEmail, posterIP, icon) + VALUES ($board, $ID_MEMBER, $remnantTopic, '$remnantSubject', '$_POST[reason]', '$user_info[username]', + " . time() . ", '$user_info[email]', '$user_info[ip]', 'moved')", __FILE__, __LINE__); + $remnantMsg = db_insert_id(); + + // Fix the topic. + db_query(" + UPDATE {$db_prefix}topics + SET ID_LAST_MSG = $remnantMsg, ID_FIRST_MSG = $remnantMsg + WHERE ID_TOPIC = $remnantTopic + LIMIT 1", __FILE__, __LINE__); + + // If they don't not-count, increase the post count. + if (empty($pcounter)) + { + $user_info['posts']++; + updateMemberData($ID_MEMBER, array('posts' => '+')); + } + // Increase the number of topics in the source board with one. + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = numPosts + 1, numTopics = numTopics + 1 + WHERE ID_BOARD = $board + LIMIT 1", __FILE__, __LINE__); + + // Mark inserted topic as read. + if (!$user_info['is_guest']) + db_query(" + REPLACE INTO {$db_prefix}log_topics + (ID_TOPIC, ID_MEMBER, logTime) + VALUES ($remnantTopic, $ID_MEMBER, " . time() . ")", __FILE__, __LINE__); + } + + // Do the move (includes statistics update needed for the redirect topic). + moveTopics($topic, $_POST['toboard']); + + // Log that they moved this topic. + if (!allowedTo('move_own') || $ID_MEMBER_STARTED != $ID_MEMBER) + logAction('move', array('topic' => $topic, 'board_from' => $board, 'board_to' => $_POST['toboard'])); + // Notify people that this topic has been moved? + sendNotifications($topic, 'move'); + + // Why not go back to the original board in case they want to keep moving? + if (!isset($_REQUEST['goback'])) + redirectexit('board=' . $board . '.0'); + else + redirectexit('topic=' . $topic . '.0'); +} + +// Moves one or more topics to a specific board. (doesn't check permissions.) +function moveTopics($topics, $toBoard) +{ + global $db_prefix, $ID_MEMBER, $user_info; + + // Empty array? + if (empty($topics)) + return; + // Only a single topic. + elseif (is_numeric($topics)) + $condition = '= ' . $topics; + elseif (count($topics) == 1) + $condition = '= ' . $topics[0]; + // More than one topic. + else + $condition = 'IN (' . implode(', ', $topics) . ')'; + $numTopics = count($topics); + $fromBoards = array(); + + // Destination board empty or equal to 0? + if (empty($toBoard)) + return; + + // Determine the source boards... + $request = db_query(" + SELECT ID_BOARD, COUNT(ID_TOPIC) AS numTopics, SUM(numReplies) AS numReplies + FROM {$db_prefix}topics + WHERE ID_TOPIC $condition + GROUP BY ID_BOARD", __FILE__, __LINE__); + // Num of rows = 0 -> no topics found. Num of rows > 1 -> topics are on multiple boards. + if (mysql_num_rows($request) == 0) + return; + while ($row = mysql_fetch_assoc($request)) + { + // Posts = (numReplies + 1) for each topic. + $fromBoards[$row['ID_BOARD']] = array( + 'numPosts' => $row['numReplies'] + $row['numTopics'], + 'numTopics' => $row['numTopics'], + 'ID_BOARD' => $row['ID_BOARD'] + ); + } + mysql_free_result($request); + + // Move over the mark_read data. (because it may be read and now not by some!) + $request = db_query(" + SELECT lmr.ID_MEMBER, lmr.logTime, t.ID_TOPIC + FROM ({$db_prefix}topics AS t, {$db_prefix}log_mark_read AS lmr) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = lmr.ID_MEMBER) + WHERE t.ID_TOPIC $condition + AND lmr.ID_BOARD = t.ID_BOARD + AND lmr.logTime > IFNULL(lt.logTime, 0)", __FILE__, __LINE__); + $log_topics = array(); + while ($row = mysql_fetch_assoc($request)) + $log_topics[] = '(' . $row['ID_TOPIC'] . ', ' . $row['ID_MEMBER'] . ', ' . $row['logTime'] . ')'; + mysql_free_result($request); + + // Now that we have all the topics that *should* be marked read, and by which members... + if (!empty($log_topics)) + { + // Insert that information into the database! + db_query(" + REPLACE INTO {$db_prefix}log_topics + (ID_TOPIC, ID_MEMBER, logTime) + VALUES " . implode(', + ', $log_topics), __FILE__, __LINE__); + } + + // Update the number of posts on each board. + $totalTopics = 0; + $totalPosts = 0; + foreach ($fromBoards as $stats) + { + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = numPosts - $stats[numPosts], numTopics = numTopics - $stats[numTopics] + WHERE ID_BOARD = $stats[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + $totalTopics += $stats['numTopics']; + $totalPosts += $stats['numPosts']; + } + db_query(" + UPDATE {$db_prefix}boards + SET numTopics = numTopics + $totalTopics, numPosts = numPosts + $totalPosts + WHERE ID_BOARD = $toBoard + LIMIT 1", __FILE__, __LINE__); + + // Move the topic. Done. :P + db_query(" + UPDATE {$db_prefix}topics + SET ID_BOARD = $toBoard + WHERE ID_TOPIC $condition + LIMIT $numTopics", __FILE__, __LINE__); + db_query(" + UPDATE {$db_prefix}messages + SET ID_BOARD = $toBoard + WHERE ID_TOPIC $condition", __FILE__, __LINE__); + db_query(" + UPDATE {$db_prefix}calendar + SET ID_BOARD = $toBoard + WHERE ID_TOPIC $condition + LIMIT $numTopics", __FILE__, __LINE__); + + // Mark target board as seen, if it was already marked as seen before. + $request = db_query(" + SELECT (IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isSeen + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER) + WHERE b.ID_BOARD = $toBoard", __FILE__, __LINE__); + list ($isSeen) = mysql_fetch_row($request); + mysql_free_result($request); + + if (!empty($isSeen) && !$user_info['is_guest']) + { + db_query(" + REPLACE INTO {$db_prefix}log_boards + (ID_BOARD, ID_MEMBER, logTime) + VALUES ($toBoard, $ID_MEMBER, " . time() . ")", __FILE__, __LINE__); + } + + // Update 'em pesky stats. + updateStats('topic'); + updateStats('message'); + updateStats('calendar'); + + $updates = array_keys($fromBoards); + $updates[] = $toBoard; + + updateLastMessages(array_unique($updates)); +} + +?> \ No newline at end of file diff --git a/Sources/NameTopic.php b/Sources/NameTopic.php new file mode 100644 index 0000000..37ff99f --- /dev/null +++ b/Sources/NameTopic.php @@ -0,0 +1,537 @@ + $topic, 'subject' => $subject, 'member' => $starter)); + + redirectexit('board=' . $board . '.0'); +} + +// Remove just a single post. +function DeleteMessage() +{ + global $ID_MEMBER, $db_prefix, $topic, $board; + + checkSession('get'); + + $_REQUEST['msg'] = (int) $_REQUEST['msg']; + + $request = db_query(" + SELECT t.ID_MEMBER_STARTED, m.ID_MEMBER, m.subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE t.ID_TOPIC = $topic + AND m.ID_TOPIC = $topic + AND m.ID_MSG = $_REQUEST[msg] + LIMIT 1", __FILE__, __LINE__); + list ($starter, $poster, $subject) = mysql_fetch_row($request); + mysql_free_result($request); + + if ($starter == $ID_MEMBER && $poster != $ID_MEMBER) + { + if (!allowedTo('remove_any')) + isAllowedTo('remove_replies'); + } + elseif ($poster == $ID_MEMBER && !allowedTo('remove_any')) + isAllowedTo('remove_own'); + else + isAllowedTo('remove_any'); + + // If the full topic was removed go back to the board. + $full_topic = removeMessage($_REQUEST['msg']); + + if (allowedTo('remove_any')) + logAction('delete', array('topic' => $topic, 'subject' => $subject, 'member' => $starter)); + + if ($full_topic) + redirectexit('board=' . $board . '.0'); + else + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); +} + +// So long as you are sure... all old posts will be gone. +function RemoveOldTopics2() +{ + global $db_prefix, $modSettings; + + isAllowedTo('admin_forum'); + checkSession('post', 'maintain'); + + if (empty($_POST['boards'])) + redirectexit('action=maintain'); + + $request = db_query(" + SELECT t.ID_TOPIC + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE m.ID_MSG = t.ID_LAST_MSG + AND m.posterTime < " . (time() - 3600 * 24 * $_POST['maxdays']) . (empty($modSettings['enableStickyTopics']) ? '' : " + AND t.isSticky = 0") . " + AND t.ID_BOARD IN (" . implode(', ', array_keys($_POST['boards'])) . ')', __FILE__, __LINE__); + $topics = array(); + while ($row = mysql_fetch_assoc($request)) + $topics[] = $row['ID_TOPIC']; + mysql_free_result($request); + + removeTopics($topics, false, true); + + // Log an action into the moderation log. + logAction('pruned', array('days' => $_POST['maxdays'])); + + redirectexit('action=maintain;done'); +} + +// Removes the passed ID_TOPICs. (permissions are NOT checked here!) +function removeTopics($topics, $decreasePostCount = true, $ignoreRecycling = false) +{ + global $db_prefix, $sourcedir, $modSettings; + + // Nothing to do? + if (empty($topics)) + return; + // Only a single topic. + elseif (is_numeric($topics)) + { + $condition = '= ' . $topics; + $topics = array($topics); + } + elseif (count($topics) == 1) + $condition = '= ' . $topics[0]; + // More than one topic. + else + $condition = 'IN (' . implode(', ', $topics) . ')'; + + // Decrease the post counts. + if ($decreasePostCount) + { + $requestMembers = db_query(" + SELECT m.ID_MEMBER, COUNT(m.ID_MSG) AS posts + FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b + WHERE m.ID_TOPIC $condition + AND b.ID_BOARD = m.ID_BOARD + AND m.icon != 'recycled' + AND b.countPosts = 0 + GROUP BY m.ID_MEMBER", __FILE__, __LINE__); + if (mysql_num_rows($requestMembers) > 0) + { + while ($rowMembers = mysql_fetch_assoc($requestMembers)) + updateMemberData($rowMembers['ID_MEMBER'], array('posts' => 'posts - ' . $rowMembers['posts'])); + } + mysql_free_result($requestMembers); + } + + // Recycle topics that aren't in the recycle board. + if (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 && !$ignoreRecycling) + { + $request = db_query(" + SELECT ID_TOPIC + FROM {$db_prefix}topics + WHERE ID_TOPIC $condition + AND ID_BOARD != $modSettings[recycle_board] + LIMIT " . count($topics), __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + { + // Get topics that will be recycled. + $recycleTopics = array(); + while ($row = mysql_fetch_assoc($request)) + $recycleTopics[] = $row['ID_TOPIC']; + mysql_free_result($request); + + // Mark recycled topics as recycled. + db_query(" + UPDATE {$db_prefix}messages + SET icon = 'recycled' + WHERE ID_TOPIC IN (" . implode(', ', $recycleTopics) . ")", __FILE__, __LINE__); + + // De-sticky and unlock topics. + db_query(" + UPDATE {$db_prefix}topics + SET locked = 0, isSticky = 0 + WHERE ID_TOPIC IN (" . implode(', ', $recycleTopics) . ")", __FILE__, __LINE__); + + // Move the topics to the recycle board. + require_once($sourcedir . '/MoveTopic.php'); + moveTopics($recycleTopics, $modSettings['recycle_board']); + + // Topics that were recycled don't need to be deleted, so subtract them. + $topics = array_diff($topics, $recycleTopics); + + // Topic list has changed, so does the condition to select topics. + $condition = 'IN (' . implode(', ', $topics) . ')'; + } + else + mysql_free_result($request); + } + + // Still topics left to delete? + if (empty($topics)) + return; + + $adjustBoards = array(); + + // Find out how many posts we are deleting. + $request = db_query(" + SELECT ID_BOARD, COUNT(ID_TOPIC) AS numTopics, SUM(numReplies) AS numReplies + FROM {$db_prefix}topics + WHERE ID_TOPIC $condition + GROUP BY ID_BOARD", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + // The numReplies is only the *replies*. There're also the first posts in the topics. + $adjustBoards[] = array( + 'numPosts' => $row['numReplies'] + $row['numTopics'], + 'numTopics' => $row['numTopics'], + 'ID_BOARD' => $row['ID_BOARD'] + ); + } + mysql_free_result($request); + + // Decrease the posts/topics... + foreach ($adjustBoards as $stats) + db_query(" + UPDATE {$db_prefix}boards + SET numTopics = numTopics - $stats[numTopics], numPosts = numPosts - $stats[numPosts] + WHERE ID_BOARD = $stats[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + + // Remove Polls... + $request = db_query(" + SELECT ID_POLL + FROM {$db_prefix}topics + WHERE ID_TOPIC $condition + AND ID_POLL > 0 + LIMIT " . count($topics), __FILE__, __LINE__); + $polls = array(); + while ($row = mysql_fetch_assoc($request)) + $polls[] = $row['ID_POLL']; + mysql_free_result($request); + + if (!empty($polls)) + { + $pollCondition = count($polls) == 1 ? '= ' . $polls[0] : 'IN (' . implode(', ', $polls) . ')'; + + db_query(" + DELETE FROM {$db_prefix}polls + WHERE ID_POLL $pollCondition + LIMIT " . count($polls), __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}poll_choices + WHERE ID_POLL $pollCondition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_polls + WHERE ID_POLL $pollCondition", __FILE__, __LINE__); + } + + // Get rid of the attachment, if it exists. + require_once($sourcedir . '/ManageAttachments.php'); + removeAttachments('m.ID_TOPIC ' . $condition, 'messages'); + + // Delete anything related to the topic. + db_query(" + DELETE FROM {$db_prefix}messages + WHERE ID_TOPIC $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}calendar + WHERE ID_TOPIC $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_topics + WHERE ID_TOPIC $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_notify + WHERE ID_TOPIC $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}topics + WHERE ID_TOPIC $condition + LIMIT " . count($topics), __FILE__, __LINE__); + + // Update the totals... + updateStats('message'); + updateStats('topic'); + updateStats('calendar'); + + $updates = array(); + foreach ($adjustBoards as $stats) + $updates[] = $stats['ID_BOARD']; + updateLastMessages($updates); +} + +// Remove a specific message (including permission checks). +function removeMessage($message, $decreasePostCount = true) +{ + global $db_prefix, $sourcedir, $modSettings, $ID_MEMBER, $user_info; + + if (empty($message) || !is_numeric($message)) + return false; + + $request = db_query(" + SELECT + m.ID_MEMBER, m.icon, t.ID_TOPIC, t.ID_FIRST_MSG, t.ID_LAST_MSG, t.numReplies, + t.ID_BOARD, b.countPosts, t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b + WHERE m.ID_MSG = $message + AND t.ID_TOPIC = m.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + return false; + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + if (empty($board) || $row['ID_BOARD'] != $board) + { + $remove_any = boardsAllowedTo('remove_any'); + $remove_any = in_array(0, $remove_any) || in_array($row['ID_BOARD'], $remove_any); + if (!$remove_any) + { + $remove_own = boardsAllowedTo('remove_own'); + $remove_own = in_array(0, $remove_own) || in_array($row['ID_BOARD'], $remove_own); + $remove_replies = boardsAllowedTo('remove_replies'); + $remove_replies = in_array(0, $remove_replies) || in_array($row['ID_BOARD'], $remove_replies); + } + + if ($row['ID_MEMBER'] == $ID_MEMBER && !$remove_any) + { + if ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !$remove_own && !$remove_replies) + isAllowedTo('remove_replies'); + elseif (!$remove_own) + isAllowedTo('remove_own'); + } + elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !$remove_any && !$remove_replies) + isAllowedTo('remove_replies'); + elseif (!$remove_any) + isAllowedTo('remove_any'); + } + else + { + // Check permissions to delete this message. + if ($row['ID_MEMBER'] == $ID_MEMBER && !allowedTo('remove_any')) + { + if ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('remove_own')) + isAllowedTo('remove_replies'); + else + isAllowedTo('remove_own'); + } + elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('remove_any')) + isAllowedTo('remove_replies'); + else + isAllowedTo('remove_any'); + } + + // Delete the *whole* topic, but only if the topic consists of one message. + if ($row['ID_FIRST_MSG'] == $message) + { + if (empty($board) || $row['ID_BOARD'] != $board) + { + $delete_any = boardsAllowedTo('delete_any'); + $delete_any = in_array(0, $delete_any) || in_array($row['ID_BOARD'], $delete_any); + if (!$delete_any) + { + $delete_own = boardsAllowedTo('delete_own'); + $delete_own = in_array(0, $delete_own) || in_array($row['ID_BOARD'], $delete_own); + } + + if ($row['ID_MEMBER'] != $ID_MEMBER && !$delete_any) + isAllowedTo('delete_any'); + elseif (!$delete_any && !$delete_own) + isAllowedTo('delete_own'); + } + else + { + // Check permissions to delete a whole topic. + if ($row['ID_MEMBER'] != $ID_MEMBER) + isAllowedTo('delete_any'); + elseif (!allowedTo('delete_any')) + isAllowedTo('delete_own'); + } + + // ...if there is only one post. + if (!empty($row['numReplies'])) + fatal_lang_error('delFirstPost', false); + + removeTopics($row['ID_TOPIC']); + return true; + } + + // Default recycle to false. + $recycle = false; + + // If recycle topics has been set, make a copy of this message in the recycle board. + // Make sure we're not recycling messages that are already on the recycle board. + if (!empty($modSettings['recycle_enable']) && $row['ID_BOARD'] != $modSettings['recycle_board'] && $row['icon'] != 'recycled') + { + // Check if the recycle board exists and if so get the read status. + $request = db_query(" + SELECT (IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isSeen + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER) + WHERE b.ID_BOARD = $modSettings[recycle_board]", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('recycle_no_valid_board'); + list ($isRead) = mysql_fetch_row($request); + mysql_free_result($request); + + // Insert a new topic in the recycle board. + db_query(" + INSERT INTO {$db_prefix}topics + (ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_FIRST_MSG, ID_LAST_MSG) + VALUES ($modSettings[recycle_board], $row[ID_MEMBER], $row[ID_MEMBER], $message, $message)", __FILE__, __LINE__); + + // Capture the ID of the new topic. + $topicID = db_insert_id(); + + // If the topic creation went successful, move the message. + if ($topicID > 0) + { + db_query(" + UPDATE {$db_prefix}messages + SET ID_TOPIC = $topicID, ID_BOARD = $modSettings[recycle_board], icon = 'recycled' + WHERE ID_MSG = $message + LIMIT 1", __FILE__, __LINE__); + + // Mark recycled topic as read. + if (!$user_info['is_guest']) + db_query(" + REPLACE INTO {$db_prefix}log_topics + (ID_TOPIC, ID_MEMBER, logTime) + VALUES ($topicID, $ID_MEMBER, " . time() . ")", __FILE__, __LINE__); + + // Mark recycle board as seen, if it was marked as seen before. + if (!empty($isRead) && !$user_info['is_guest']) + db_query(" + REPLACE INTO {$db_prefix}log_boards + (ID_BOARD, ID_MEMBER, logTime) + VALUES ($modSettings[recycle_board], $ID_MEMBER, " . time() . ")", __FILE__, __LINE__); + + // Add one topic and post to the recycle bin board. + db_query(" + UPDATE {$db_prefix}boards + SET numTopics = numTopics + 1, numPosts = numPosts + 1 + WHERE ID_BOARD = $modSettings[recycle_board] + LIMIT 1", __FILE__, __LINE__); + + // Make sure this message isn't getting deleted later on. + $recycle = true; + } + } + + // Deleting a recycled message can not lower anyone's post count. + if ($row['icon'] == 'recycled') + $decreasePostCount = false; + + // This is the last post, update the last post on the board. + if ($row['ID_LAST_MSG'] == $message) + { + // Find the last message, set it, and decrease the post count. + $request = db_query(" + SELECT ID_MSG, ID_MEMBER + FROM {$db_prefix}messages + WHERE ID_TOPIC = $row[ID_TOPIC] + AND ID_MSG != $message + ORDER BY ID_MSG DESC + LIMIT 1", __FILE__, __LINE__); + $row2 = mysql_fetch_assoc($request); + mysql_free_result($request); + + db_query(" + UPDATE {$db_prefix}topics + SET ID_LAST_MSG = $row2[ID_MSG], numReplies = numReplies - 1, ID_MEMBER_UPDATED = $row2[ID_MEMBER] + WHERE ID_TOPIC = $row[ID_TOPIC] + LIMIT 1", __FILE__, __LINE__); + } + // Only decrease post counts. + else + db_query(" + UPDATE {$db_prefix}topics + SET numReplies = numReplies - 1 + WHERE ID_TOPIC = $row[ID_TOPIC] + LIMIT 1", __FILE__, __LINE__); + + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = numPosts - 1 + WHERE ID_BOARD = $row[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + + // If the poster was registered and the board this message was on incremented + // the member's posts when it was posted, decrease his or her post count. + if (!empty($row['ID_MEMBER']) && $decreasePostCount && empty($row['countPosts'])) + updateMemberData($row['ID_MEMBER'], array('posts' => '-')); + + // Only remove posts if they're not recycled. + if (!$recycle) + { + // Remove the message! + db_query(" + DELETE FROM {$db_prefix}messages + WHERE ID_MSG = $message + LIMIT 1", __FILE__, __LINE__); + + // Delete attachment(s) if they exist. + require_once($sourcedir . '/ManageAttachments.php'); + removeAttachments('a.ID_MSG = ' . $message); + } + + // Update the pesky statistics. + updateStats('message'); + updateStats('topic'); + updateStats('calendar'); + + if ($recycle) + updateLastMessages(array($row['ID_BOARD'], $modSettings['recycle_board'])); + else + updateLastMessages($row['ID_BOARD']); + + return false; +} + +?> \ No newline at end of file diff --git a/Sources/News.php b/Sources/News.php new file mode 100644 index 0000000..1e5fb60 --- /dev/null +++ b/Sources/News.php @@ -0,0 +1,491 @@ + array('getXmlRecent', 'recent-post'), + 'news' => array('getXmlNews', 'article'), + 'members' => array('getXmlMembers', 'member'), + 'profile' => array('getXmlProfile', null), + ); + if (empty($_GET['sa']) || !isset($subActions[$_GET['sa']])) + $_GET['sa'] = 'recent'; + + // Get the associative array representing the xml. + $xml = $subActions[$_GET['sa']][0]($xml_format != 'smf'); + + // This is an xml file.... + ob_end_clean(); + if (!empty($modSettings['enableCompressedOutput'])) + @ob_start('ob_gzhandler'); + else + ob_start(); + header('Content-Type: ' . ($xml_format != 'smf' ? 'application/rss+xml' : 'text/xml')); + + // First, output the xml header. + echo ''; + + // Are we outputting an rss feed or one with more information? + if ($xml_format != 'smf') + { + // Start with an RSS 2.0 header. + echo ' + + + ', strip_tags($context['forum_name']), ' + ', $scripturl, ' + ', strip_tags($txt['xml_rss_desc']), ''; + + // Output all of the associative array, start indenting with 2 tabs, and name everything "item". + dumpTags($xml, 2, 'item'); + + // Output the footer of the xml. + echo ' + +'; + } + // Otherwise, we're using our proprietary formats - they give more data, though. + else + { + echo ' +'; + + // Dump out that associative array. Indent properly.... and use the right names for the base elements. + dumpTags($xml, 1, $subActions[$_GET['sa']][1]); + + echo ' +'; +} + + obExit(false); +} + +function dumpTags($data, $i, $tag = null) +{ + // For every array... + foreach ($data as $key => $val) + { + // Skip it, it's been set to null. + if ($val == null) + continue; + + // If a tag was passed, use it instead of the key. + $key = isset($tag) ? $tag : $key; + + // First let's indent! + echo "\n", str_repeat("\t", $i); + + // If it's empty/0/nothing simply output an empty tag. + if ($val == '') + echo '<', $key, ' />'; + else + { + // Beginning tag. + echo '<', $key, '>'; + + if (is_array($val)) + { + // An array. Dump it, and then indent the tag. + dumpTags($val, $i + 1); + echo "\n", str_repeat("\t", $i), ''; + } + // A string with returns in it.... show this as a multiline element. + elseif (strpos($val, "\n") !== false || strpos($val, '
') !== false) + echo "\n", $val, "\n", str_repeat("\t", $i), ''; + // A simple string. + else + echo $val, ''; + } + } +} + +function getXmlMembers($rss) +{ + global $db_prefix, $scripturl; + + // Find the most recent members. + $request = db_query(" + SELECT ID_MEMBER, memberName, realName, dateRegistered + FROM {$db_prefix}members + ORDER BY ID_MEMBER DESC + LIMIT $_GET[limit]", __FILE__, __LINE__); + $data = array(); + while ($row = mysql_fetch_assoc($request)) + { + // Make the data look rss-ish. + if ($rss) + $data[] = array( + 'title' => '', + 'link' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'comments' => $scripturl . '?action=pm;sa=send;u=' . $row['ID_MEMBER'], + 'pubDate' => gmdate('D, d M Y H:i:s T', $row['dateRegistered']), + 'guid' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + ); + // More logical format for the data, but harder to apply. + else + $data[] = array( + 'name' => '', + 'time' => strip_tags(timeformat($row['dateRegistered'])), + 'id' => $row['ID_MEMBER'], + 'link' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] + ); + } + mysql_free_result($request); + + return $data; +} + +function getXmlNews($rss) +{ + global $db_prefix, $user_info, $scripturl, $modSettings, $board; + + /* Find the latest posts that: + - are the first post in their topic. + - are on an any board OR in a specified board. + - can be seen by this user. + - are actually the latest posts. */ + $request = db_query(" + SELECT + m.smileysEnabled, m.posterTime, m.ID_MSG, m.subject, m.body, t.ID_TOPIC, t.ID_BOARD, + b.name AS bname, t.numReplies, m.ID_MEMBER, IFNULL(mem.realName, m.posterName) AS posterName, + mem.hideEmail, IFNULL(mem.emailAddress, m.posterEmail) AS posterEmail + FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE b.ID_BOARD = " . (empty($board) ? 't.ID_BOARD' : "$board + AND t.ID_BOARD = $board") . " + AND m.ID_MSG = t.ID_FIRST_MSG + AND $user_info[query_see_board] + ORDER BY m.ID_MSG DESC + LIMIT $_GET[limit]", __FILE__, __LINE__); + $data = array(); + while ($row = mysql_fetch_assoc($request)) + { + // Limit the length of the message, if the option is set. + if (!empty($modSettings['xmlnews_maxlen']) && strlen(str_replace('
', "\n", $row['body'])) > $modSettings['xmlnews_maxlen']) + $row['body'] = strtr(substr(str_replace('
', "\n", $row['body']), 0, $modSettings['xmlnews_maxlen'] - 3), array("\n" => '
')) . '...'; + + $row['body'] = doUBBC($row['body'], $row['smileysEnabled']); + + censorText($row['body']); + censorText($row['subject']); + + // Being news, this actually makes sense in rss format. + if ($rss) + $data[] = array( + 'title' => '', + 'link' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0', + 'description' => '', + 'author' => empty($row['hideEmail']) ? $row['posterEmail'] : null, + 'category' => '', + 'comments' => $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.0', + 'pubDate' => gmdate('D, d M Y H:i:s T', $row['posterTime']), + 'guid' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] + ); + // The biggest difference here is more information. + else + $data[] = array( + 'time' => strip_tags(timeformat($row['posterTime'])), + 'id' => $row['ID_MSG'], + 'subject' => '', + 'body' => '', + 'poster' => array( + 'name' => '', + 'id' => $row['ID_MEMBER'], + 'link' => !empty($row['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] : '' + ), + 'topic' => $row['ID_TOPIC'], + 'board' => array( + 'name' => '', + 'id' => $row['ID_BOARD'], + 'link' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0' + ), + 'link' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0' + ); + } + mysql_free_result($request); + + return $data; +} + +function getXmlRecent($rss) +{ + global $db_prefix, $user_info, $scripturl, $modSettings, $board; + + $request = db_query(" + SELECT m.ID_MSG + FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b + WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 4 * $_GET['limit']) . " + AND m.ID_BOARD = " . (empty($board) ? "b.ID_BOARD" : "$board + AND b.ID_BOARD = $board") . " + AND $user_info[query_see_board] + ORDER BY m.ID_MSG DESC + LIMIT $_GET[limit]", __FILE__, __LINE__); + $messages = array(); + while ($row = mysql_fetch_assoc($request)) + $messages[] = $row['ID_MSG']; + mysql_free_result($request); + + if (empty($messages)) + return array(); + + // Find the most recent posts this user can see. + $request = db_query(" + SELECT + m.smileysEnabled, m.posterTime, m.ID_MSG, m.subject, m.body, m.ID_TOPIC, t.ID_BOARD, + b.name AS bname, t.numReplies, m.ID_MEMBER, mf.ID_MEMBER AS ID_FIRST_MEMBER, + IFNULL(mem.realName, m.posterName) AS posterName, mf.subject AS firstSubject, + IFNULL(memf.realName, mf.posterName) AS firstPosterName, mem.hideEmail, + IFNULL(mem.emailAddress, m.posterEmail) AS posterEmail + FROM ({$db_prefix}messages AS m, {$db_prefix}messages AS mf, {$db_prefix}topics AS t, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + LEFT JOIN {$db_prefix}members AS memf ON (memf.ID_MEMBER = mf.ID_MEMBER) + WHERE t.ID_TOPIC = m.ID_TOPIC + AND b.ID_BOARD = " . (empty($board) ? 't.ID_BOARD' : "$board + AND t.ID_BOARD = $board") . " + AND mf.ID_MSG = t.ID_FIRST_MSG + AND m.ID_MSG IN (" . implode(', ', $messages) . ") + ORDER BY m.ID_MSG DESC + LIMIT $_GET[limit]", __FILE__, __LINE__); + $data = array(); + while ($row = mysql_fetch_assoc($request)) + { + // Limit the length of the message, if the option is set. + if (!empty($modSettings['xmlnews_maxlen']) && strlen(str_replace('
', "\n", $row['body'])) > $modSettings['xmlnews_maxlen']) + $row['body'] = strtr(substr(str_replace('
', "\n", $row['body']), 0, $modSettings['xmlnews_maxlen'] - 3), array("\n" => '
')) . '...'; + + $row['body'] = doUBBC($row['body'], $row['smileysEnabled']); + + censorText($row['body']); + censorText($row['subject']); + + // Doesn't work as well as news, but it kinda does.. + if ($rss) + $data[] = array( + 'title' => '', + 'link' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'], + 'description' => "', + 'author' => empty($row['hideEmail']) ? $row['posterEmail'] : null, + 'category' => '', + 'comments' => $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.0', + 'pubDate' => gmdate('D, d M Y H:i:s T', $row['posterTime']), + 'guid' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] + ); + // A lot of information here. Should be enough to please the rss-ers. + else + $data[] = array( + 'time' => strip_tags(timeformat($row['posterTime'])), + 'id' => $row['ID_MSG'], + 'subject' => '', + 'body' => '', + 'starter' => array( + 'name' => '', + 'id' => $row['ID_FIRST_MEMBER'], + 'link' => !empty($row['ID_FIRST_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'] : '' + ), + 'poster' => array( + 'name' => '', + 'id' => $row['ID_MEMBER'], + 'link' => !empty($row['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] : '' + ), + 'topic' => array( + 'subject' => '', + 'id' => $row['ID_TOPIC'], + 'link' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.new#new' + ), + 'board' => array( + 'name' => '', + 'id' => $row['ID_BOARD'], + 'link' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0' + ), + 'link' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] + ); + } + mysql_free_result($request); + + return $data; +} + +function getXmlProfile($rss) +{ + global $scripturl, $themeUser, $user_profile, $modSettings; + + // You must input a valid user.... + if (empty($_GET['u']) || loadMemberData((int) $_GET['u']) === false) + return array(); + + // Make sure the id is a number and not "I like trying to hack the database". + $_GET['u'] = (int) $_GET['u']; + + // Load the member's contextual information! + if (!loadMemberContext($_GET['u'])) + return array(); + + // Okay, I admit it, I'm lazy. Stupid $_GET['u'] is long and hard to type. + $profile = &$themeUser[$_GET['u']]; + + if ($rss) + $data = array(array( + 'title' => '', + 'link' => $scripturl . '?action=profile;u=' . $profile['id'], + 'description' => '', + 'comments' => $scripturl . '?action=pm;sa=send;u=' . $profile['id'], + 'pubDate' => gmdate('D, d M Y H:i:s T', $user_profile[$profile['id']]['dateRegistered']), + 'guid' => $scripturl . '?action=profile;u=' . $profile['id'], + )); + else + { + $data = array( + 'username' => '', + 'name' => '', + 'link' => $scripturl . '?action=profile;u=' . $profile['id'], + 'posts' => $profile['posts'], + 'post-group' => '', + 'language' => '', + 'last-login' => gmdate('D, d M Y H:i:s T', $user_profile[$profile['id']]['lastLogin']), + 'registered' => gmdate('D, d M Y H:i:s T', $user_profile[$profile['id']]['dateRegistered']) + ); + + // Everything below here might not be set, and thus maybe shouldn't be displayed. + if ($profile['gender']['name'] != '') + $data['gender'] = ''; + + if ($profile['avatar']['name'] != '') + $data['avatar'] = $profile['avatar']['url']; + + // If they are online, show an empty tag... no reason to put anything inside it. + if ($profile['online']['is_online']) + $data['online'] = ''; + + if ($profile['signature'] != '') + $data['signature'] = ''; + if ($profile['blurb'] != '') + $data['blurb'] = ''; + if ($profile['location'] != '') + $data['location'] = ''; + if ($profile['title'] != '') + $data['title'] = ''; + + if (!empty($profile['icq']['name'])) + $data['icq'] = $profile['icq']['name']; + if ($profile['aim']['name'] != '') + $data['aim'] = $profile['aim']['name']; + if ($profile['msn']['name'] != '') + $data['msn'] = $profile['msn']['name']; + if ($profile['yim']['name'] != '') + $data['yim'] = $profile['yim']['name']; + + if ($profile['website']['title'] != '') + $data['website'] = array( + 'title' => '', + 'link' => $profile['website']['url'] + ); + + if ($profile['group'] != '') + $data['postition'] = ''; + + if (!empty($modSettings['karmaMode'])) + $data['karma'] = array( + 'good' => $profile['karma']['good'], + 'bad' => $profile['karma']['bad'] + ); + + if (empty($profile['hide_email']) || empty($modSettings['allow_hideEmail'])) + $data['email'] = $profile['email']; + + if (!empty($profile['birth_date']) && substr($profile['birth_date'], 0, 4) != '0000') + { + list ($birth_year, $birth_month, $birth_day) = sscanf($profile['birth_date'], '%d-%d-%d'); + $datearray = getdate(forum_time()); + $data['age'] = $datearray['year'] - $birth_year - (($datearray['mon'] > $birth_month || ($datearray['mon'] == $birth_month && $datearray['mday'] >= $birth_day)) ? 0 : 1); + } + } + + // Save some memory. + unset($profile); + unset($themeUser[$_GET['u']]); + + return $data; +} + +?> \ No newline at end of file diff --git a/Sources/Newsearch.php b/Sources/Newsearch.php new file mode 100644 index 0000000..a3ee2f8 --- /dev/null +++ b/Sources/Newsearch.php @@ -0,0 +1,631 @@ + $scripturl . '?action=search', + 'name' => $txt[182] + ); + + $context['compact'] = true; + // Create an array for the permissions. + $boards_can = array( + 'post_reply_own' => boardsAllowedTo('post_reply_own'), + 'post_reply_any' => boardsAllowedTo('post_reply_any'), + 'mark_any_notify' => boardsAllowedTo('mark_any_notify') + ); + + require_once($sourcedir . '/Display.php'); + + include('/var/www/rock/forum/sphinx/sphinxapi.php'); + + if (isset ($_GET['start'])) { + $start = intval ($_GET['start']); + if ($start < 0) $start=0; + } else { + $start = 0; + } + + $cl = new SphinxClient(); + $cl->SetServer( "localhost", 9312 ); + $cl->SetMatchMode( SPH_MATCH_EXTENDED2 ); + $cl->SetLimits($start, intval ($modSettings['search_results_per_page'])); + $cl->SetArrayResult( true ); + + $q = $cl->EscapeString ($_GET['search']); + $result = $cl->Query( "@(subject) $q", 'topics ' ); + + $msgs = array(); + $subjects = array(); + $bodies = array(); + + $context['messages'] = array(); + $context['topics'] = array(); + if (! empty ($result['matches'])) { + foreach ($result['matches'] as $doc) { + $context['messages'][] = $doc['id']; //$doc['attrs']['id_msg']; + $context['topics'][$doc['id']]['id'] = $doc['attrs']['id_topic']; + } + + $messages_request = db_query("SELECT m.*, b.name as bName + FROM smf_messages m, smf_boards b + WHERE m.ID_BOARD=b.ID_BOARD + AND ID_MSG IN(".implode(',', $context['messages']).")", + __FILE__, __LINE__); + } + + $context['key_words'] = array_keys($result['words']); + + // Now that we know how many results to expect we can start calculating the page numbers. + $context['page_index'] = constructPageIndex($scripturl . '?action=qsearch;search=' . urlencode($_GET['search']), $_REQUEST['start'], (int) $result['total_found'], $modSettings['search_results_per_page'], false); + + // Set the basic stuff for the template. + $context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']); + + $context['sub_template'] = 'results'; + $context['page_title'] = $txt[166]; + $context['get_topics'] = 'prepareSearchContext'; + $context['can_send_pm'] = allowedTo('pm_send'); + + loadJumpTo(); +} + +// Ask the user what they want to search for. +function PlushSearch1() +{ + global $txt, $scripturl, $db_prefix, $modSettings, $user_info, $context; + + loadTemplate('Newsearch'); + + // Check the user's permissions. + isAllowedTo('search_posts'); + + // Link tree.... + $context['linktree'][] = array( + 'url' => $scripturl . '?action=search', + 'name' => $txt[182] + ); + + // If you got back from search2 by using the linktree, you get your original search parameters back. + if (isset($_REQUEST['params'])) + { + $temp_params = explode('|"|', base64_decode($_REQUEST['params'])); + $context['search_params'] = array(); + foreach ($temp_params as $i => $data) + { + list ($k, $v) = explode('|\'|', $data); + $context['search_params'][$k] = stripslashes($v); + } + if (isset($context['search_params']['brd'])) + $context['search_params']['brd'] = $context['search_params']['brd'] == '' ? array() : explode(',', $context['search_params']['brd']); + } + + if (isset($context['search_params']['search'])) + $context['search_params']['search'] = htmlspecialchars($context['search_params']['search']); + if (isset($context['search_params']['userspec'])) + $context['search_params']['userspec'] = htmlspecialchars(stripslashes($context['search_params']['userspec'])); + + // Find all the boards this user is allowed to see. + $request = db_query(" + SELECT b.ID_CAT, c.name AS catName, b.ID_BOARD, b.name, b.childLevel + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT) + WHERE $user_info[query_see_board] + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['num_boards'] = mysql_num_rows($request); + $context['categories'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + // This category hasn't been set up yet.. + if (!isset($context['categories'][$row['ID_CAT']])) + $context['categories'][$row['ID_CAT']] = array( + 'id' => $row['ID_CAT'], + 'name' => $row['catName'], + 'boards' => array() + ); + + // Set this board up, and let the template know when it's a child. (indent them..) + $context['categories'][$row['ID_CAT']]['boards'][$row['ID_BOARD']] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'child_level' => $row['childLevel'] + ); + } + mysql_free_result($request); + + // Simple or not? + $context['simple_search'] = !empty($modSettings['simpleSearch']) && !isset($_GET['advanced']); + $context['page_title'] = $txt[183]; +} + +// Gather the results and show them. +function PlushSearch2() +{ + global $modSettings, $sourcedir; + global $scripturl, $txt, $db_prefix, $user_info, $context, $messages_request, $attachments, $boards_can; + + loadTemplate('Newsearch'); + + // Are you allowed? + isAllowedTo('search_posts'); + + // So, we're allowed here, let's clean up the start variable - just incase. + $_REQUEST['start'] = (int) $_REQUEST['start']; + + require_once($sourcedir . '/Display.php'); + + // $search_params will carry all settings that differ from the default search parameters. + // That way, the URLs involved in a search page will be kept as short as possible. + $search_params = array(); + + if (isset($_REQUEST['params'])) + { + $temp_params = explode('|"|', base64_decode($_REQUEST['params'])); + foreach ($temp_params as $i => $data) + { + list ($k, $v) = explode('|\'|', $data); + $search_params[$k] = stripslashes($v); + } + if (isset($search_params['brd'])) + $search_params['brd'] = $search_params['brd'] == '' ? array() : explode(',', $search_params['brd']); + } + else + { + $search_params['subject_only'] = true; + } + + + // 1 => 'allwords' (default, don't set as param) / 2 => 'anywords'. + if (!empty($search_params['searchtype']) || (!empty($_REQUEST['searchtype']) && $_REQUEST['searchtype'] == 2)) + $search_params['searchtype'] = 2; + + // Minimum age of messages. Default to zero (don't set param in that case). + if (!empty($search_params['minage']) || (!empty($_REQUEST['minage']) && $_REQUEST['minage'] > 0)) + $search_params['minage'] = !empty($search_params['minage']) ? (int) $search_params['minage'] : (int) $_REQUEST['minage']; + + // Maximum age of messages. Default to infinite (9999 days: param not set). + if (!empty($search_params['maxage']) || (!empty($_REQUEST['maxage']) && $_REQUEST['maxage'] != 9999)) + $search_params['maxage'] = !empty($search_params['maxage']) ? (int) $search_params['maxage'] : (int) $_REQUEST['maxage']; + + $timeAddition = ''; + $timeAddition .= !empty($search_params['minage']) ? ' AND m.posterTime <= ' . (time() - $search_params['minage'] * 86400) : ''; + $timeAddition .= !empty($search_params['maxage']) ? ' AND m.posterTime >= ' . (time() - $search_params['maxage'] * 86400) : ''; + + // Default the user name to a wildcard matching every user (*). + if (!empty($search_params['user_spec']) || (!empty($_REQUEST['userspec']) && $_REQUEST['userspec'] != '*')) + $search_params['userspec'] = isset($search_params['userspec']) ? $search_params['userspec'] : $_REQUEST['userspec']; + + // If there's no specific user, then don't mention it in the main query. + if (empty($search_params['userspec'])) + $userQuery = ''; + else + { + $userString = strtolower(addslashes(strtr($search_params['userspec'], array('%' => '\%', '_' => '\_', '*' => '%', '?' => '_')))); + // Retrieve a list of possible members. + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE realName LIKE '$userString'", __FILE__, __LINE__); + // Simply do nothing if there're too many members matching the criteria. + if (mysql_num_rows($request) > $maxMembersToSearch) + $userQuery = ''; + elseif (mysql_num_rows($request) == 0) + $userQuery = "m.ID_MEMBER = 0 AND m.posterName LIKE '$userString'"; + else + { + $memberlist = array(); + while ($row = mysql_fetch_assoc($request)) + $memberlist[] = $row['ID_MEMBER']; + $userQuery = "(m.ID_MEMBER IN (" . implode(', ', $memberlist) . ") OR (m.ID_MEMBER = 0 AND m.posterName LIKE '$userString'))"; + } + } + + // If the boards were passed by URL (params=), temporarily put them back in $_REQUEST. + if (!empty($search_params['brd']) && is_array($search_params['brd'])) + $_REQUEST['brd'] = $search_params['brd']; + + // Make sure all boards are integers. + if (!empty($_REQUEST['brd'])) + foreach ($_REQUEST['brd'] as $id => $brd) + $_REQUEST['brd'][$id] = (int) $brd; + + // Select all boards you've selected AND are allowed to see. + if ($user_info['is_admin']) + $search_params['brd'] = empty($_REQUEST['brd']) ? array() : $_REQUEST['brd']; + else + { + $request = db_query(" + SELECT b.ID_BOARD + FROM {$db_prefix}boards AS b + WHERE $user_info[query_see_board]" . (empty($_REQUEST['brd']) ? '' : " + AND b.ID_BOARD IN (" . implode(', ', $_REQUEST['brd']) . ")"), __FILE__, __LINE__); + $search_params['brd'] = array(); + while ($row = mysql_fetch_assoc($request)) + $search_params['brd'][] = $row['ID_BOARD']; + mysql_free_result($request); + + // This error should pro'bly only happen for hackers. + if (empty($search_params['brd'])) + fatal_lang_error('search_no_boards'); + } + + $search_params['show_complete'] = !empty($search_params['show_complete']) || !empty($_REQUEST['show_complete']); + $search_params['subject_only'] = !empty($search_params['subject_only']) || !empty($_REQUEST['subject_only']); + + $context['compact'] = !$search_params['show_complete']; + + // What are we searching for? + $search_params['search'] = !empty($search_params['search']) ? $search_params['search'] : (isset($_REQUEST['search']) ? stripslashes($_REQUEST['search']) : ''); + // Nothing?? + if (!isset($search_params['search']) || $search_params['search'] == '') + fatal_lang_error('no_valid_search_string', false); + +////////////////////////////////////////////////////////////////////////////////////////// +// That's all, I guess. Following is some weird stuff used by previous search +////////////////////////////////////////////////////////////////////////////////////////// + + +//if (0) { // игнорируем это пока + + // Extract phrase parts first (e.g. some words "this is a phrase" some more words.) + preg_match_all('/(?:^|\s)"([^"]+)"(?:$|\s)/', $search_params['search'], $matches, PREG_PATTERN_ORDER); + $searchArray = $matches[1]; + + // Remove the phrase parts and extract the words. + $searchArray = array_merge($searchArray, explode(' ', preg_replace('/(?:^|\s)"([^"]+)"(?:$|\s)/', ' ', $search_params['search']))); + + // Trim everything and make sure there are no words that are the same. + foreach ($searchArray as $index => $value) + { + $searchArray[$index] = addslashes(strtolower(trim($value))); + if (!isset($searchArray[$index]) || $searchArray[$index] == '') + unset($searchArray[$index]); + } + $searchArray = array_slice(array_unique($searchArray), 0, 10); + + if (empty($searchArray)) + fatal_lang_error('no_valid_search_string', false); + + // Each word is matched against the body and the subject. + $searchParts = array(); + foreach ($searchArray as $word) + { + if (empty($modSettings['search_match_complete_words'])) + $searchParts[] = " LIKE '%" . strtr($word, array('_' => '\\_', '%' => '\\%')) . "%'"; + else + $searchParts[] = " RLIKE '[[:<:]]" . addcslashes(preg_replace(array('/([\[\]$.+?|{}])/', '/\*/'), array('[$1]', '.+'), $word), '') . "[[:>:]]'"; + } + + $searchQuery = 0; + + + // Either all words must match (searchtype == 1) or any of the words (searchtype == 2). + if (empty($search_params['searchtype'])) + { + // искать по содержимому сообщений + if (!$search_params['subject_only']) + $searchQuery = 'm.body' . implode(' AND m.body', $searchParts) . $timeAddition; + // только по темам + $topicQuery = 'm.subject' . implode(' AND m.subject', $searchParts) . $timeAddition; + } + else + { + if (!$search_params['subject_only']) + $searchQuery = (count($searchParts) > 1 ? '(' : '') . 'm.body' . implode(' OR m.body', $searchParts) . (count($searchParts) > 1 ? ')' : '') . $timeAddition; + $topicQuery = (count($searchParts) > 1 ? '(' : '') . 'm.subject' . implode(' OR m.subject', $searchParts) . (count($searchParts) > 1 ? ')' : '') . $timeAddition; + } + + // Get the sorting parameters right. Default to sort by relevance descending. + $sort_columns = array( + 'relevance', + 'numReplies', + 'ID_MSG', + ); + if (empty($search_params['sort']) && !empty($_REQUEST['sort'])) + list ($search_params['sort'], $search_params['sort_dir']) = array_pad(explode('|', $_REQUEST['sort']), 2, ''); + $search_params['sort'] = !empty($search_params['sort']) && in_array($search_params['sort'], $sort_columns) ? $search_params['sort'] : 'relevance'; + $search_params['sort_dir'] = !empty($search_params['sort_dir']) && $search_params['sort_dir'] == 'asc' ? 'asc' : 'desc'; + + $context['mark'] = array(); +# foreach ($searchArray as $word) +# $context['mark'][$word] = '' . $word . ''; + + // All search params have been checked, let's compile them to a single string... made less simple by PHP 4.3.9 and below. + $temp_params = $search_params; + if (isset($temp_params['brd'])) + $temp_params['brd'] = implode(',', $temp_params['brd']); + $context['params'] = array(); + foreach ($temp_params as $k => $v) + $context['params'][] = $k . '|\'|' . addslashes($v); + $context['params'] = base64_encode(implode('|"|', $context['params'])); + + // ... and add the links to the link tree. + $context['linktree'][] = array( + 'url' => $scripturl . '?action=search;params=' . $context['params'], + 'name' => $txt[182] + ); + $context['linktree'][] = array( + 'url' => $scripturl . '?action=search2;params=' . $context['params'], + 'name' => $txt['search_results'] + ); + + // Create an array for the permissions. + $boards_can = array( + 'post_reply_own' => boardsAllowedTo('post_reply_own'), + 'post_reply_any' => boardsAllowedTo('post_reply_any'), + 'mark_any_notify' => boardsAllowedTo('mark_any_notify') + ); + + include('/var/www/rock/forum/sphinx/sphinxapi.php'); + $cl = new SphinxClient(); + $cl->SetServer( "localhost", 9312 ); + $cl->SetMatchMode( SPH_MATCH_EXTENDED ); + $cl->SetSortMode( SPH_SORT_RELEVANCE ); + //$cl->SetGroupBy ( "ID_TOPIC", SPH_GROUPBY_ATTR, '@weight DESC'); +# $cl->SetFieldWeights(array('subject'=>10, 'body'=>1)); +# $cl->SetSelect( 'ID_MSG as id_msg'); + $cl->SetLimits($_REQUEST[start], intval($modSettings['search_results_per_page'])); + $cl->SetFilter( 'id_board', $search_params['brd'] ); + $cl->SetArrayResult( true ); + $q = $cl->EscapeString ($search_params['search']); + $result = $cl->Query( "@(subject) $q @(body) $q", 'posts_main posts_delta ' ); + + $context['messages'] = array(); + $context['topics'] = array(); + foreach ($result['matches'] as $doc) { + $context['messages'][] = $doc['id']; //$doc['attrs']['id_msg']; + $context['topics'][$doc['id']]['id'] = $doc['attrs']['id_topic']; + } + + $messages_request = db_query("SELECT m.*, b.name as bName + FROM smf_messages m, smf_boards b + WHERE m.ID_BOARD=b.ID_BOARD + AND ID_MSG IN(".implode(',', $context['messages']).")", + __FILE__, __LINE__); + + + $context['key_words'] = &$searchArray; + + // Set the basic stuff for the template. + $context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']); + + $context['sub_template'] = 'results'; + $context['page_title'] = $txt[166]; + $context['get_topics'] = 'prepareSearchContext'; + $context['can_send_pm'] = allowedTo('pm_send'); + + loadJumpTo(); +} + +// Callback to return messages - saves memory. +function prepareSearchContext($reset = false) +{ + global $txt, $modSettings, $scripturl, $ID_MEMBER; + global $themeUser, $context, $messages_request, $db_prefix, $attachments, $boards_can; + + // Remember which message this is. (ie. reply #83) + static $counter = null; + if ($counter == null || $reset) + $counter = $_REQUEST['start'] + 1; + + // If the query returned false, bail. + if ($messages_request == false) + return false; + + // Start from the beginning... + if ($reset) + return @mysql_data_seek($messages_request, 0); + + // Attempt to get the next message. + $message = mysql_fetch_assoc($messages_request); + if (!$message) + return false; + + // Can't have an empty subject can we? + $message['subject'] = $message['subject'] != '' ? $message['subject'] : $txt[24]; + $message['first_subject'] = $message['first_subject'] != '' ? $message['first_subject'] : $txt[24]; + + // If it couldn't load, or the user was a guest.... someday may be done with a guest table. + if (!loadMemberContext($message['ID_MEMBER'])) + { + // Notice this information isn't used anywhere else.... *cough guest table cough* + $themeUser[$message['ID_MEMBER']]['name'] = $message['posterName']; + $themeUser[$message['ID_MEMBER']]['id'] = 0; + $themeUser[$message['ID_MEMBER']]['group'] = $txt[28]; + $themeUser[$message['ID_MEMBER']]['link'] = $message['posterName']; + $themeUser[$message['ID_MEMBER']]['email'] = $message['posterEmail']; + } + $themeUser[$message['ID_MEMBER']]['ip'] = $message['posterIP']; + + // Do the censor thang... + censorText($message['body']); + censorText($message['subject']); + + censorText($message['first_subject']); + + // Shorten this message if necessary. + if ($context['compact']) + { + // Set the number of characters before and after the searched keyword. + $charLimit = 40; + + $message['body'] = strtr($message['body'], array("\n" => ' ', '
' => "\n")); + $message['body'] = doUBBC($message['body'], $message['smileysEnabled']); + $message['body'] = strip_tags($message['body']); + + if (strlen($message['body']) > $charLimit) + { + if (empty($context['key_words'])) + $message['body'] = htmlspecialchars(mb_substr(un_htmlspecialchars($message['body']), 0, $charLimit) . (mb_strlen($message['body']) > $charLimit ? '...' : ''), ENT_QUOTES); + else + { + $matchString = ''; + foreach ($context['key_words'] as $keyword) + $matchString .= strtr(preg_quote($keyword, '/'), array('\*' => '.+?')) . '|'; + $matchString = mb_substr($matchString, 0, -1); + $message['body'] = un_htmlspecialchars(str_replace(' ', ' ', $message['body'])); + if (empty($modSettings['search_match_complete_words'])) + preg_match_all('/([^\s\W]{' . $charLimit . '}[\s\W]|[\s\W].{0,' . $charLimit . '}?|^)(' . $matchString . ')(.{0,' . $charLimit . '}[\s\W]|[^\s\W]{' . $charLimit . '})/isu', $message['body'], $matches); + else + preg_match_all('/([^\s\W]{' . $charLimit . '}[\s\W]|[\s\W].{0,' . $charLimit . '}?[\s\W]|^)(' . $matchString . ')([\s\W].{0,' . $charLimit . '}[\s\W]|[\s\W][^\s\W]{' . $charLimit . '})/isu', $message['body'], $matches); + $message['body'] = ''; + foreach ($matches[0] as $index => $match) { + if ($index > 2) break; + $message['body'] .= '... ' . htmlspecialchars($match, ENT_QUOTES) . ' ...
'; + } + } + + } + } + else + { + // Run UBBC interpreter on the message. + $message['body'] = doUBBC($message['body'], $message['smileysEnabled']); + } + /// костыль! + $message['last_posterTime'] = $message['posterTime']; + $message['first_posterTime'] = $message['posterTime']; + $output = array_merge($context['topics'][$message['ID_MSG']], array( + 'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($message['isSticky']), + 'is_locked' => !empty($message['locked']), + 'is_poll' => $modSettings['pollMode'] == '1' && $message['ID_POLL'] > 0, + 'is_hot' => $message['numReplies'] >= $modSettings['hotTopicPosts'], + 'is_very_hot' => $message['numReplies'] >= $modSettings['hotTopicVeryPosts'], + 'views' => $message['numViews'], + 'replies' => $message['numReplies'], + 'can_reply' => in_array($message['ID_BOARD'], $boards_can['post_reply_any']) || in_array(0, $boards_can['post_reply_any']), + 'can_mark_notify' => in_array($message['ID_BOARD'], $boards_can['mark_any_notify']) || in_array(0, $boards_can['mark_any_notify']), + 'first_post' => array( + 'id' => $message['first_msg'], + 'time' => timeformat($message['first_posterTime']), + 'subject' => $message['subject'], + 'href' => $scripturl . '?topic=' . $message['ID_TOPIC'] . '.0', + 'link' => '' . $message['subject'] . '', + 'icon' => $message['icon'], + 'member' => array( + 'id' => $message['first_member_id'], + 'name' => $message['first_member_name'], + 'href' => !empty($message['first_member_id']) ? $scripturl . '?action=profile;u=' . $message['first_member_id'] : '', + 'link' => !empty($message['first_member_id']) ? '' . $message['first_member_name'] . '' : $message['first_member_name'] + ) + ), + 'last_post' => array( + 'id' => $message['last_msg'], + 'time' => timeformat($message['last_posterTime']), + 'timestamp' => $message['last_posterTime'], + 'member' => array( + 'id' => $message['last_member_id'], + 'name' => $message['last_member_name'], + 'href' => !empty($message['last_member_id']) ? $scripturl . '?action=profile;u=' . $message['last_member_id'] : '', + 'link' => !empty($message['last_member_id']) ? '' . $message['last_member_name'] . '' : $message['last_member_name'] + ) + ), + 'board' => array( + 'id' => $message['ID_BOARD'], + 'name' => $message['bName'], + 'href' => $scripturl . '?board=' . $message['ID_BOARD'] . '.0', + 'link' => '' . $message['bName'] . '' + ), + 'category' => array( + 'id' => $message['ID_CAT'], + 'name' => $message['cName'], + 'href' => $scripturl . '#' . $message['ID_CAT'], + 'link' => '' . $message['cName'] . '' + ) + )); + determineTopicClass($output); + + $body_highlighted = $message['body']; + $subject_highlighted = $message['subject']; + + foreach ($context['key_words'] as $query) + { + // Fix the international characters in the keyword too. +# $query = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', strtr(preg_quote($query, '/'), array('&' => '&'))); + + $body_highlighted = preg_replace('/((<[^>]*)|' . $query . ')/ieu', "'\$2' == '\$1' ? stripslashes('\$1') : '\$1'", $body_highlighted); + $subject_highlighted = preg_replace('/((<[^>]*)|' . $query . ')/ie', "'$2' == '$1' ? stripslashes('$1') : '$1'", $subject_highlighted); + } + + $output['matches'][] = array( + 'id' => $message['ID_MSG'], + 'attachment' => loadAttachmentContext($message['ID_MSG']), + 'alternate' => $counter % 2, + 'member' => &$themeUser[$message['ID_MEMBER']], + 'icon' => $message['icon'], + 'subject' => $message['subject'], + 'subject_highlighted' => $subject_highlighted, + 'time' => timeformat($message['posterTime']), + 'timestamp' => $message['posterTime'], + 'counter' => $counter, + 'modified' => array( + 'time' => timeformat($message['modifiedTime']), + 'timestamp' => $message['modifiedTime'], + 'name' => $message['modifiedName'] + ), + 'body' => $message['body'], + 'body_highlighted' => $body_highlighted, + 'start' => 'msg' . $message['ID_MSG'] + ); + $counter++; + + return $output; +} + +?> diff --git a/Sources/Notify.php b/Sources/Notify.php new file mode 100644 index 0000000..b27e855 --- /dev/null +++ b/Sources/Notify.php @@ -0,0 +1,174 @@ + \ No newline at end of file diff --git a/Sources/PackageGet.php b/Sources/PackageGet.php new file mode 100644 index 0000000..8c45832 --- /dev/null +++ b/Sources/PackageGet.php @@ -0,0 +1,627 @@ + $scripturl . '?action=packages', + 'name' => &$txt['package1'] + ); + $context['linktree'][] = array( + 'url' => $scripturl . '?action=packageget', + 'name' => &$txt['smf182'] + ); + $context['page_title'] = $txt['package1'] . ' - ' . $txt['smf182']; + + // Load the list of servers. + if (!file_exists($boarddir . '/Packages/server.list')) + { + @touch($boarddir . '/Packages/server.list'); + @chmod($boarddir . '/Packages/server.list', 0777); + } + $servers = file($boarddir . '/Packages/server.list'); + + $context['servers'] = array(); + for ($i = 0, $n = count($servers); $i < $n; $i++) + { + list ($name, $url) = explode('|^|', $servers[$i]); + + // Not too shabby, huh? + $context['servers'][] = array( + 'name' => stripslashes($name), + 'url' => $url, + 'id' => $i + ); + } + + $context['package_download_broken'] = !is_writable($boarddir . '/Packages') || !is_writable($boarddir . '/Packages/server.list') || !is_writable($boarddir . '/Packages/installed.list'); + if ($context['package_download_broken']) + { + if (isset($_POST['ftp_username'])) + { + $ftp = new ftp_connection($_POST['ftp_server'], $_POST['ftp_port'], $_POST['ftp_username'], $_POST['ftp_password']); + if ($ftp->error === false) + { + // I know, I know... but a lot of people want to type /home/xyz/... which is wrong, but logical. + if (!$ftp->chdir($_POST['ftp_path'])) + $ftp->chdir(preg_replace('~^/home/[^/]+?~', '', $_POST['ftp_path'])); + } + } + + if (!isset($ftp) || $ftp->error !== false) + { + if (!isset($_POST['ftp_path'])) + { + if (preg_match('~^/home/([^/]+?)/public_html~', $_SERVER['DOCUMENT_ROOT'], $match)) + { + if (!isset($_POST['ftp_username']) && empty($modSettings['package_server'])) + $_POST['ftp_username'] = $match[1]; + + $_POST['ftp_path'] = strtr($_SERVER['DOCUMENT_ROOT'], array('/home/' . $match[1] => '')); + + if (substr($_POST['ftp_path'], -1) == '/') + $_POST['ftp_path'] = substr($_POST['ftp_path'], 0, -1); + + if (strlen(dirname($_SERVER['PHP_SELF'])) > 1) + $_POST['ftp_path'] .= dirname($_SERVER['PHP_SELF']); + } + elseif (substr($boarddir, 0, 9) == '/var/www/') + $_POST['ftp_path'] = substr($boarddir, 8); + else + $_POST['ftp_path'] = strtr($boarddir, array($_SERVER['DOCUMENT_ROOT'] => '')); + } + + $context['package_ftp'] = array( + 'server' => isset($_POST['ftp_server']) ? $_POST['ftp_server'] : (isset($modSettings['package_server']) ? $modSettings['package_server'] : 'localhost'), + 'port' => isset($_POST['ftp_port']) ? $_POST['ftp_port'] : (isset($modSettings['package_port']) ? $modSettings['package_port'] : '21'), + 'username' => isset($_POST['ftp_username']) ? $_POST['ftp_username'] : (isset($modSettings['package_username']) ? $modSettings['package_username'] : ''), + 'path' => $_POST['ftp_path'], + ); + } + else + { + $context['package_download_broken'] = false; + + $ftp->chmod('Packages', 0777); + $ftp->chmod('Packages/server.list', 0777); + $ftp->chmod('Packages/installed.list', 0777); + + $ftp->close(); + } + } +} + +// Browse a server's list of packages. +function PackageGBrowse() +{ + global $txt, $boardurl, $context, $scripturl, $boarddir, $sourcedir, $forum_version, $context; + + isAllowedTo('admin_forum'); + require_once($sourcedir . '/Subs-Package.php'); + + // Managing packages.... + adminIndex('manage_packages'); + + loadLanguage('Packages'); + loadTemplate('Packages'); + + if (isset($_GET['server'])) + { + if ($_GET['server'] == '') + redirectexit('action=packageget'); + + // Get the server list and find the current server. + $servers = file($boarddir . '/Packages/server.list'); + $server = $_REQUEST['server']; + + // If server does not exist in list, dump out. + if (!isset($servers[$server])) + fatal_lang_error('smf191', false); + + list ($name, $url) = explode('|^|', chop($servers[$server])); + + // If there is a relative link, append to the stored server url. + if (isset($_GET['relative'])) + $url = $url . (substr($url, -1) == '/' ? '' : '/') . $_GET['relative']; + + // Clear any "absolute" URL. Since "server" is present, "absolute" is garbage. + unset($_GET['absolute']); + } + elseif (isset($_GET['absolute']) && $_GET['absolute'] != '') + { + // Initialize the requried variables. + $server = ''; + $url = $_GET['absolute']; + $name = ''; + $_GET['package'] = $url . '/packages.xml?language=' . $context['user']['language']; + + // Clear any "relative" URL. Since "server" is not present, "relative" is garbage. + unset($_GET['relative']); + } + // Minimum required parameter did not exist so dump out. + else + fatal_lang_error('smf191', false); + + // In safe mode or on lycos? Try this URL. (includes package-list for informational purposes ;).) + if (@get_cfg_var('safe_mode') || @ini_get('safe_mode')) + redirectexit($url . '/index.php?package-list&language=' . $context['user']['language'] . '&ref=' . $boardurl, false); + + // Attempt to connect. If unsuccessful... try the URL. + if (!isset($_GET['package']) || file_exists($_GET['package'])) + $_GET['package'] = $url . '/packages.xml?language=' . $context['user']['language']; + + // Check to be sure the packages.xml file actually exists where it is should be... or dump out. + if ((isset($_GET['absolute']) && !url_exists($_GET['package'])) || (isset($_GET['relative']) && !url_exists($_GET['package']))) + fatal_lang_error('packageget_unable', false, array($url . '/index.php')); + + // Read packages.xml and parse into xmlArray. (the true tells it to trim things ;).) + $listing = new xmlArray(@file($_GET['package']), true); + + // Errm.... empty file? Try the URL.... + if (!$listing->exists('package-list')) + fatal_lang_error('packageget_unable', false, array($url . '/index.php')); + + // List out the packages... + $context['package_list'] = array(); + + $listing = $listing->path('package-list[0]'); + + // Use the package list's name if it exists. + if ($listing->exists('list-title')) + $name = $listing->fetch('list-title'); + + // Add the package_above/below layer and use the template_package_list template. + $context['template_layers'][] = 'package'; + $context['sub_template'] = 'package_list'; + + $context['page_title'] = $txt['smf183'] . ($name != '' ? ' - ' . stripslashes($name) : ''); + $context['server'] = $server; + + $instmods = loadInstalledPackages(); + + // Look through the list of installed mods... + foreach ($instmods as $installed_mod) + $installed_mods[$installed_mod['id']] = $installed_mod['version']; + + // Get default author and email if they exist. + if ($listing->exists('default-author')) + { + $default_author = $listing->fetch('default-author'); + if ($listing->exists('default-author/@email')) + $default_email = $listing->fetch('default-author/@email'); + } + + // Get default web site if it exists. + if ($listing->exists('default-website')) + { + $default_website = $listing->fetch('default-website'); + if ($listing->exists('default-website/@title')) + $default_title = $listing->fetch('default-website/@title'); + } + + $the_version = strtr($forum_version, array('SMF ' => '')); + + $packageNum = 0; + + $sections = $listing->set('section'); + foreach ($sections as $i => $section) + { + $packages = $section->set('title|heading|text|remote|rule|modification|language|avatar-pack|theme|smiley-set'); + foreach ($packages as $thisPackage) + { + $package = &$context['package_list'][]; + $package['type'] = $thisPackage->name(); + + // It's a Title, Heading, Rule or Text. + if (in_array($package['type'], array('title', 'heading', 'text', 'rule'))) + $package['name'] = $thisPackage->fetch('.'); + // It's a Remote link. + elseif ($package['type'] == 'remote') + { + $remote_type = $thisPackage->exists('@type') ? $thisPackage->fetch('@type') : 'relative'; + + if ($remote_type == 'relative' && substr($thisPackage->fetch('@href'), 0, 7) != 'http://') + { + if (isset($_GET['absolute'])) + $current_url = $_GET['absolute'] . '/'; + elseif (isset($_GET['relative'])) + $current_url = $_GET['relative'] . '/'; + else + $current_url = ''; + + $current_url .= $thisPackage->fetch('@href'); + if (isset($_GET['absolute'])) + $package['href'] = $scripturl . '?action=pgbrowse;absolute=' . $current_url; + else + $package['href'] = $scripturl . '?action=pgbrowse;server=' . $context['server'] . ';relative=' . $current_url; + } + else + { + $current_url = $thisPackage->fetch('@href'); + $package['href'] = $scripturl . '?action=pgbrowse;absolute=' . $current_url; + } + + $package['name'] = $thisPackage->fetch('.'); + $package['link'] = '' . $package['name'] . ''; + } + // It's a package... + else + { + if (isset($_GET['absolute'])) + $current_url = $_GET['absolute'] . '/'; + elseif (isset($_GET['relative'])) + $current_url = $_GET['relative'] . '/'; + else + $current_url = ''; + + $server_att = $server != '' ? ';server=' . $server : ''; + + $package += $thisPackage->to_array(); + + if (isset($package['website'])) + unset($package['website']); + $package['author'] = array('name' => ''); + + if ($package['description'] == '') + $package['description'] = $txt['pacman8']; + + $package['is_installed'] = isset($installed_mods[$package['id']]); + $package['is_current'] = $package['is_installed'] && ($installed_mods[$package['id']] == $package['version']); + $package['is_newer'] = $package['is_installed'] && ($installed_mods[$package['id']] > $package['version']); + + // This package is either not installed, or installed but old. Is it supported on this version of SMF? + if (!$package['is_installed'] || (!$package['is_current'] && !$package['is_newer'])) + $package['can_install'] = !$thisPackage->exists('version/@for') || matchPackageVersion($the_version, $thisPackage->fetch('version/@for')); + // Okay, it's already installed AND up to date. + else + $package['can_install'] = false; + + $already_exists = getPackageInfo($package['filename']); + $package['download_conflict'] = !empty($already_exists) && $already_exists['id'] == $package['id'] && $already_exists['version'] != $package['version']; + + $package['href'] = $url . '/' . $package['filename']; + $package['link'] = '' . $package['name'] . ''; + $package['download']['href'] = $scripturl . '?action=pgdownload' . $server_att . ';package=' . $current_url . $package['filename'] . ($package['download_conflict'] ? ';conflict' : '') . ';sesc=' . $context['session_id']; + $package['download']['link'] = '' . $package['name'] . ''; + + if ($thisPackage->exists('author') || isset($default_author)) + { + if ($thisPackage->exists('author/@email')) + $package['author']['email'] = $thisPackage->fetch('author/@email'); + elseif (isset($default_email)) + $package['author']['email'] = $default_email; + + if ($thisPackage->exists('author') && $thisPackage->fetch('author') != '') + $package['author']['name'] = $thisPackage->fetch('author'); + else + $package['author']['name'] = $default_author; + + if ($package['author']['email'] != '') + { + // Only put the "mailto:" if it looks like a valid email address. Some may wish to put a link to an SMF IM Form or other web mail form. + $package['author']['href'] = preg_match('~^[\w\.\-]+@[\w][\w\-\.]+[\w]$~', $package['author']['email']) != 0 ? 'mailto:' . $package['author']['email'] : $package['author']['email']; + $package['author']['link'] = '' . $package['author']['name'] . ''; + } + } + + if ($thisPackage->exists('website') || isset($default_website)) + { + if ($thisPackage->exists('website') && $thisPackage->exists('website/@title')) + $package['author']['website']['name'] = $thisPackage->fetch('website/@title'); + elseif (isset($default_title)) + $package['author']['website']['name'] = $default_title; + elseif ($thisPackage->exists('website')) + $package['author']['website']['name'] = $thisPackage->fetch('website'); + else + $package['author']['website']['name'] = $default_website; + + if ($thisPackage->exists('website') && $thisPackage->fetch('website') != '') + $authorhompage = $thisPackage->fetch('website'); + else + $authorhompage = $default_website; + + if (strpos(strtolower($authorhompage), 'a href') === false) + { + $package['author']['website']['href'] = $authorhompage; + $package['author']['website']['link'] = '' . $package['author']['website']['name'] . ''; + } + else + { + if (preg_match('/a href="(.+?)"/', $authorhompage, $match) == 1) + $package['author']['website']['href'] = $match[1]; + else + $package['author']['website']['href'] = ''; + $package['author']['website']['link'] = $authorhompage; + } + } + else + { + $package['author']['website']['href'] = ''; + $package['author']['website']['link'] = ''; + } + } + + $package['is_remote'] = $package['type'] == 'remote'; + $package['is_title'] = $package['type'] == 'title'; + $package['is_heading'] = $package['type'] == 'heading'; + $package['is_text'] = $package['type'] == 'text'; + $package['is_line'] = $package['type'] == 'rule'; + + $packageNum = in_array($package['type'], array('title', 'heading', 'text', 'remote', 'rule')) ? 0 : $packageNum + 1; + $package['count'] = $packageNum; + } + } +} + +// Download a package. +function PackageDownload() +{ + global $txt, $scripturl, $boarddir, $context, $sourcedir; + + isAllowedTo('admin_forum'); + require_once($sourcedir . '/Subs-Package.php'); + + // Yet 'gain.... we're managing the packages still. + adminIndex('manage_packages'); + loadLanguage('Packages'); + loadTemplate('Packages'); + + // Add the package_above/below layer and use the template_downloaded template. + $context['template_layers'][] = 'package'; + $context['sub_template'] = 'downloaded'; + + if (isset($_GET['server'])) + { + // Get the server list and find the current server. + $servers = file($boarddir . '/Packages/server.list'); + $server = $_REQUEST['server']; + + // If server does not exist in list, dump out. + if (!isset($servers[$server])) + fatal_lang_error('smf191', false); + + list ($name, $url) = explode('|^|', chop($servers[$server])); + $url = $url . '/'; + } + else + { + checkSession('get'); + + // Initialize the requried variables. + $server = ''; + $url = ''; + } + + $package_name = basename($_REQUEST['package']); + if (isset($_REQUEST['conflict']) || (isset($_REQUEST['auto']) && file_exists($boarddir . '/Packages/' . $package_name))) + { + // Find the extension, change abc.tar.gz to abc_1.tar.gz. + if (strrpos(substr($package_name, 0, -3), '.') !== false) + { + $ext = substr($package_name, strrpos(substr($package_name, 0, -3), '.')); + $package_name = substr($package_name, 0, strrpos(substr($package_name, 0, -3), '.')) . '_'; + } + else + $ext = ''; + + // Find the first available. + $i = 1; + while (file_exists($boarddir . '/Packages/' . $package_name . $i . $ext)) + $i++; + + $package_name = $package_name . $i . $ext; + } + + // First make sure it's a package. + if (getPackageInfo($url . $_REQUEST['package']) == false) + fatal_lang_error('package45', false); + + // Open both files and stream! + $rf = @fopen($url . $_REQUEST['package'], 'rb') or fatal_lang_error('smf191', false); + $fp = @fopen($boarddir . '/Packages/' . $package_name, 'wb'); + + if ($fp == false) + { + // Try to fix it, maybe? + @chmod($boarddir . '/Packages', 0777); + $fp = @fopen($boarddir . '/Packages/' . $package_name, 'wb'); + + if ($fp == false) + fatal_lang_error('package_cant_download', false); + } + + $buffer = ''; + while (!feof($rf)) + { + $buffer = fread($rf, 1024); + fwrite($fp, $buffer); + } + fclose($fp); + fclose($rf); + + if (preg_match('~^http://[\w_\-]+\.simplemachines\.org/~', $_REQUEST['package']) == 1 && strpos($_REQUEST['package'], 'dlattach') === false && isset($_REQUEST['auto'])) + redirectexit('action=packages;sa=install;package=' . $package_name); + + // You just downloaded a mod from SERVER_NAME_GOES_HERE. + $context['server'] = $server; + + $context['package'] = getPackageInfo($package_name); + + if (empty($context['package'])) + fatal_lang_error('package_cant_download', false); + + if ($context['package']['type'] == 'modification') + $context['package']['install']['link'] = '[ ' . $txt['package11'] . ' ]'; + elseif ($context['package']['type'] == 'avatar') + $context['package']['install']['link'] = '[ ' . $txt['package12'] . ' ]'; + elseif ($context['package']['type'] == 'language') + $context['package']['install']['link'] = '[ ' . $txt['package13'] . ' ]'; + else + $context['package']['install']['link'] = ''; + + $context['package']['list_files']['link'] = '[ ' . $txt['package14'] . ' ]'; + + // Free a little bit of memory... + unset($context['package']['xml']); + + $context['page_title'] = $txt['smf192']; +} + +// Upload a new package to the directory. +function PackageUpload() +{ + global $txt, $scripturl, $boarddir, $context, $sourcedir; + + isAllowedTo('admin_forum'); + require_once($sourcedir . '/Subs-Package.php'); + + // That's correct... package manager yet again. + adminIndex('manage_packages'); + loadLanguage('Packages'); + loadTemplate('Packages'); + + // Add the package_above/below layer and use the template_downloaded template (yes... I know we actually uploaded it). + $context['template_layers'][] = 'package'; + $context['sub_template'] = 'downloaded'; + + // Check the file was even sent! + if (!isset($_FILES['package']['name']) || $_FILES['package']['name'] == '' || !is_uploaded_file($_FILES['package']['tmp_name'])) + fatal_lang_error('package_upload_error'); + + // Make sure it has a sane filename. + $_FILES['package']['name'] = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $_FILES['package']['name']); + + if (strtolower(substr($_FILES['package']['name'], -4)) != '.zip' && strtolower(substr($_FILES['package']['name'], -7)) != '.tar.gz') + fatal_error($txt['package_upload_error_supports'] . 'zip, tar.gz.', false); + + // We only need the filename... + $packageName = basename($_FILES['package']['name']); + + // Setup the destination and throw an error if the file is already there! + $destination = $boarddir . '/Packages/' . $packageName; + if (file_exists($destination)) + fatal_lang_error('package_upload_error_exists'); + + // Now move the file. + move_uploaded_file($_FILES['package']['tmp_name'], $destination); + @chmod($destination, 0777); + + // If we got this far that should mean it's available. + $context['package'] = getPackageInfo($packageName); + $context['server'] = ''; + + // Not really a package, you lazy bum! + if (empty($context['package'])) + { + @unlink($destination); + fatal_lang_error('package_upload_error_broken', false); + } + + if ($context['package']['type'] == 'modification') + $context['package']['install']['link'] = '[ ' . $txt['package11'] . ' ]'; + elseif ($context['package']['type'] == 'avatar') + $context['package']['install']['link'] = '[ ' . $txt['package12'] . ' ]'; + elseif ($context['package']['type'] == 'language') + $context['package']['install']['link'] = '[ ' . $txt['package13'] . ' ]'; + else + $context['package']['install']['link'] = ''; + + $context['package']['list_files']['link'] = '[ ' . $txt['package14'] . ' ]'; + + unset($context['package']['xml']); + + $context['page_title'] = $txt['package_uploaded_success']; +} + +// Add a package server to the list. +function PackageServerAdd() +{ + global $boarddir; + + // Validate the user. + checkSession(); + isAllowedTo('admin_forum'); + + // If they put a slash on the end, get rid of it. + if (substr($_POST['serverurl'], -1) == '/') + $_POST['serverurl'] = substr($_POST['serverurl'], 0, -1); + + // Just append to the file. + if (!file_exists($boarddir . '/Packages/server.list')) + { + @touch($boarddir . '/Packages/server.list'); + @chmod($boarddir . '/Packages/server.list', 0777); + } + $fp = fopen($boarddir . '/Packages/server.list', 'a'); + fputs($fp, $_POST['servername'] . '|^|' . $_POST['serverurl'] . "\n"); + fclose($fp); + + redirectexit('action=packageget'); +} + +// Remove a server from the list. +function PackageServerRemove() +{ + global $boarddir; + + // Administrators only... as always. + isAllowedTo('admin_forum'); + + // Get the current server list. + if (!file_exists($boarddir . '/Packages/server.list')) + { + @touch($boarddir . '/Packages/server.list'); + @chmod($boarddir . '/Packages/server.list', 0777); + } + $servers = file($boarddir . '/Packages/server.list'); + + // Write out a new one, skipping the deleted one. + $fp = fopen($boarddir . '/Packages/server.list', 'w'); + for ($i = 0, $n = count($servers); $i < $n; $i++) + if ($i != $_GET['server']) + fputs($fp, chop($servers[$i]) . "\n"); + + redirectexit('action=packageget'); +} + +?> \ No newline at end of file diff --git a/Sources/Packages.php b/Sources/Packages.php new file mode 100644 index 0000000..8e258fd --- /dev/null +++ b/Sources/Packages.php @@ -0,0 +1,712 @@ + $scripturl . '?action=packages', + 'name' => &$txt['package1'] + ); + $context['page_title'] = $txt['package1']; + + // Delegation makes the world... that is, the package manager go 'round. + $subActions = array( + '' => 'PackageBrowse', + 'browse' => 'PackageBrowse', + 'remove' => 'PackageRemove', + 'list' => 'PackageList', + 'install' => 'PackageInstallTest', + 'install2' => 'PackageInstall', + 'uninstall' => 'PackageInstallTest', + 'uninstall2' => 'PackageInstall', + 'installed' => 'InstalledList', + 'options' => 'PackageOptions', + 'flush' => 'FlushInstall', + 'examine' => 'ExamineFile' + ); + if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']])) + $subActions[$_REQUEST['sa']](); + else + $subActions[''](); + + // Add the package above/below layer to the output. + $context['template_layers'][] = 'package'; +} + +// Test install a package. +function PackageInstallTest() +{ + global $boarddir, $txt, $context, $scripturl, $sourcedir, $modSettings; + + // You have to specify a file!! + if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '') + redirectexit('action=packages'); + $context['filename'] = $_REQUEST['package']; + + require_once($sourcedir . '/Subs-Package.php'); + + $context['uninstalling'] = $_REQUEST['sa'] == 'uninstall'; + + // Set up the linktree... + $context['linktree'][] = array( + 'url' => $scripturl . '?action=packages;sa=browse', + 'name' => $context['uninstalling'] ? $txt['package_uninstall_actions'] : $txt['package42'] + ); + $context['page_title'] .= ' - ' . ($context['uninstalling'] ? $txt['package_uninstall_actions'] : $txt['package42']); + + $context['sub_template'] = 'view_package'; + + if (!file_exists($boarddir . '/Packages/' . $context['filename'])) + fatal_lang_error('package_no_file', false); + + // Make sure temp directory exists and is empty. + if (file_exists($boarddir . '/Packages/temp')) + deltree($boarddir . '/Packages/temp', false); + if (!mktree($boarddir . '/Packages/temp', 0777)) + fatal_lang_error('package_cant_download', false); + + // Extract the files so we can get things like the readme, etc. + $context['extracted_files'] = read_tgz_file($boarddir . '/Packages/' . $context['filename'], $boarddir . '/Packages/temp'); + + // Get the package info... + $packageInfo = getPackageInfo($context['filename']); + $packageInfo['filename'] = $context['filename']; + + // Set the type of extraction... + $context['extract_type'] = isset($packageInfo['type']) ? $packageInfo['type'] : 'modification'; + + $instmods = loadInstalledPackages(); + + // The mod isn't installed.... unless proven otherwise. + $context['is_installed'] = false; + foreach ($instmods as $installed_mod) + if ($installed_mod['id'] == $packageInfo['id']) + $old_version = $installed_mod['version']; + + // Wait, it's not installed yet! + if (!isset($old_version) && $context['uninstalling']) + { + deltree($boarddir . '/Packages/temp'); + fatal_lang_error('package_cant_uninstall', false); + } + // Uninstalling? + elseif ($context['uninstalling']) + { + $actions = parsePackageInfo($packageInfo['xml'], true, 'uninstall'); + + // Gadzooks! There's no uninstaller at all!? + if (empty($actions)) + fatal_lang_error('package_uninstall_cannot', false); + } + elseif (isset($old_version) && $old_version != $packageInfo['version']) + { + // Look for an upgrade... + $actions = parsePackageInfo($packageInfo['xml'], true, 'upgrade', $old_version); + + // There was no upgrade.... + if (empty($actions)) + $context['is_installed'] = true; + } + elseif (isset($old_version) && $old_version == $packageInfo['version']) + $context['is_installed'] = true; + + if (!isset($old_version) || $context['is_installed']) + $actions = parsePackageInfo($packageInfo['xml'], true, 'install'); + + $context['actions'] = array(); + $context['ftp_needed'] = false; + $chmod_files = array(); + + if (empty($actions)) + return; + + foreach ($actions as $action) + { + if ($action['type'] == 'chmod') + { + $context['ftp_needed'] = true; + $chmod_files[] = $action['filename']; + continue; + } + elseif ($action['type'] == 'readme') + { + if (file_exists($boarddir . '/Packages/temp/' . $action['filename'])) + $context['package_readme'] = nl2br(htmlspecialchars(implode('', file($boarddir . '/Packages/temp/' . $action['filename'])))); + continue; + } + elseif ($action['type'] == 'modification') + { + if ($action['boardmod']) + $mod_actions = parseBoardMod(@implode('', @file($boarddir . '/Packages/temp/' . $action['filename'])), true, $action['reverse']); + else + $mod_actions = parseModification(@implode('', @file($boarddir . '/Packages/temp/' . $action['filename'])), true, $action['reverse']); + + foreach ($mod_actions as $mod_action) + { + if ($mod_action['type'] == 'opened') + $failed = false; + elseif ($mod_action['type'] == 'failure') + $failed = true; + elseif ($mod_action['type'] == 'chmod') + { + $context['ftp_needed'] = true; + $chmod_files[] = $mod_action['filename']; + } + elseif ($mod_action['type'] == 'saved') + $context['actions'][] = array( + 'type' => $txt['package56'], + 'action' => strtr($mod_action['filename'], array($boarddir => '.')), + 'description' => $failed ? $txt['package_action_failure'] : $txt['package_action_success'] + ); + elseif ($mod_action['type'] == 'missing') + $context['actions'][] = array( + 'type' => $txt['package56'], + 'action' => strtr($mod_action['filename'], array($boarddir => '.')), + 'description' => $txt['package_action_missing'] + ); + elseif ($mod_action['type'] == 'error') + $context['actions'][] = array( + 'type' => $txt['package56'], + 'action' => strtr($mod_action['filename'], array($boarddir => '.')), + 'description' => $txt['package_action_error'] + ); + } + + // Don't add anything else. + $thisAction = array(); + } + elseif ($action['type'] == 'code') + $thisAction = array( + 'type' => $txt['package57'], + 'action' => $action['filename'] + ); + elseif (in_array($action['type'], array('create-dir', 'create-file'))) + $thisAction = array( + 'type' => $txt['package50'] . ' ' . ($action['type'] == 'create-dir' ? $txt['package55'] : $txt['package54']), + 'action' => strtr($action['destination'], array($boarddir => '.')) + ); + elseif (in_array($action['type'], array('require-dir', 'require-file'))) + $thisAction = array( + 'type' => $txt['package53'] . ' ' . ($action['type'] == 'require-dir' ? $txt['package55'] : $txt['package54']), + 'action' => strtr($action['destination'], array($boarddir => '.')) + ); + elseif (in_array($action['type'], array('move-dir', 'move-file'))) + $thisAction = array( + 'type' => $txt['package51'] . ' ' . ($action['type'] == 'move-dir' ? $txt['package55'] : $txt['package54']), + 'action' => strtr($action['source'], array($boarddir => '.')) . ' => ' . strtr($action['destination'], array($boarddir => '.')) + ); + elseif (in_array($action['type'], array('remove-dir', 'remove-file'))) + $thisAction = array( + 'type' => $txt['package52'] . ' ' . ($action['type'] == 'remove-dir' ? $txt['package55'] : $txt['package54']), + 'action' => strtr($action['filename'], array($boarddir => '.')) + ); + + if (empty($thisAction)) + continue; + + $thisAction['description'] = isset($action['description']) ? $action['description'] : ''; + $context['actions'][] = $thisAction; + } + + if (file_exists($boarddir . '/Packages/temp')) + deltree($boarddir . '/Packages/temp'); + + if ($context['ftp_needed']) + { + if (isset($_POST['ftp_username'])) + { + $ftp = new ftp_connection($_POST['ftp_server'], $_POST['ftp_port'], $_POST['ftp_username'], $_POST['ftp_password']); + if ($ftp->error === false) + { + // Common mistake, so let's try to remedy it... + if (!$ftp->chdir($_POST['ftp_path'])) + $ftp->chdir(preg_replace('~^/home/[^/]+?~', '', $_POST['ftp_path'])); + } + } + + if (!isset($ftp) || $ftp->error !== false) + { + if (!isset($_POST['ftp_path'])) + { + if (preg_match('~^/home/([^/]+?)/public_html~', $_SERVER['DOCUMENT_ROOT'], $match) == 1) + { + if (!isset($_POST['ftp_username']) && empty($modSettings['package_server'])) + $_POST['ftp_username'] = $match[1]; + + $_POST['ftp_path'] = strtr($_SERVER['DOCUMENT_ROOT'], array('/home/' . $match[1] => '')); + + if (substr($_POST['ftp_path'], -1) == '/') + $_POST['ftp_path'] = substr($_POST['ftp_path'], 0, -1); + + if (strlen(dirname($_SERVER['PHP_SELF'])) > 1) + $_POST['ftp_path'] .= dirname($_SERVER['PHP_SELF']); + } + elseif (substr($boarddir, 0, 9) == '/var/www/') + $_POST['ftp_path'] = substr($boarddir, 8); + else + $_POST['ftp_path'] = strtr($boarddir, array($_SERVER['DOCUMENT_ROOT'] => '')); + } + + $context['package_ftp'] = array( + 'server' => isset($_POST['ftp_server']) ? $_POST['ftp_server'] : (isset($modSettings['package_server']) ? $modSettings['package_server'] : 'localhost'), + 'port' => isset($_POST['ftp_port']) ? $_POST['ftp_port'] : (isset($modSettings['package_port']) ? $modSettings['package_port'] : '21'), + 'username' => isset($_POST['ftp_username']) ? $_POST['ftp_username'] : (isset($modSettings['package_username']) ? $modSettings['package_username'] : ''), + 'path' => $_POST['ftp_path'], + ); + } + else + { + $context['ftp_needed'] = false; + + if (substr($_POST['ftp_path'], -1) == '/') + $_POST['ftp_path'] = substr($_POST['ftp_path'], 0, -1); + $ftp_root = strtr($boarddir, array($_POST['ftp_path'] => '')); + + foreach ($chmod_files as $file) + { + $ftp->chmod(strtr($file, array($ftp_root => '')), 0777); + $ftp->chmod(dirname(strtr($file, array($ftp_root => ''))), 0777); + } + $ftp->close(); + } + } +} + +// Apply another type of (avatar, language, etc.) package. +function PackageInstall() +{ + global $boarddir, $txt, $context, $scripturl, $sourcedir; + + // If there's no file, what are we installing? + if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '') + redirectexit('action=packages'); + $context['filename'] = $_REQUEST['package']; + + require_once($sourcedir . '/Subs-Package.php'); + + $context['uninstalling'] = $_REQUEST['sa'] == 'uninstall2'; + + // Set up the linktree for other. + $context['linktree'][] = array( + 'url' => $scripturl . '?action=packages;sa=browse', + 'name' => $context['uninstalling'] ? $txt['smf198b'] : $txt['package37'] + ); + $context['page_title'] .= ' - ' . ($context['uninstalling'] ? $txt['smf198b'] : $txt['package37']); + + $context['sub_template'] = 'extract_package'; + + if (!file_exists($boarddir . '/Packages/' . $context['filename'])) + fatal_lang_error('package_no_file', false); + + // Make sure temp directory exists and is empty! + if (file_exists($boarddir . '/Packages/temp')) + deltree($boarddir . '/Packages/temp', false); + else + mktree($boarddir . '/Packages/temp', 0777); + + // Let the unpacker do the work. + $context['extracted_files'] = read_tgz_file($boarddir . '/Packages/' . $context['filename'], $boarddir . '/Packages/temp'); + + // Get the package info... + $packageInfo = getPackageInfo($context['filename']); + $packageInfo['filename'] = $context['filename']; + + // Set the type of extraction... + $context['extract_type'] = isset($packageInfo['type']) ? $packageInfo['type'] : 'modification'; + + $instmods = loadInstalledPackages(); + + // The mod isn't installed.... unless proven otherwise. + $context['is_installed'] = false; + foreach ($instmods as $installed_mod) + if ($installed_mod['id'] == $packageInfo['id']) + $old_version = $installed_mod['version']; + + // Wait, it's not installed yet! + if (!isset($old_version) && $context['uninstalling']) + { + deltree($boarddir . '/Packages/temp'); + fatal_lang_error(1, false); + } + // Uninstalling? + elseif ($context['uninstalling']) + { + $install_log = parsePackageInfo($packageInfo['xml'], false, 'uninstall'); + + // Gadzooks! There's no uninstaller at all!? + if (empty($install_log)) + fatal_lang_error('package_uninstall_cannot', false); + } + elseif (isset($old_version) && $old_version != $packageInfo['version']) + { + // Look for an upgrade... + $install_log = parsePackageInfo($packageInfo['xml'], false, 'upgrade', $old_version); + + // There was no upgrade.... + if (empty($install_log)) + $context['is_installed'] = true; + } + elseif (isset($old_version) && $old_version == $packageInfo['version']) + $context['is_installed'] = true; + + if (!isset($old_version) || $context['is_installed']) + $install_log = parsePackageInfo($packageInfo['xml'], false, 'install'); + + $context['install_finished'] = false; + + if (!empty($install_log)) + { + foreach ($install_log as $action) + { + if ($action['type'] == 'modification' && !empty($action['filename'])) + { + if ($action['boardmod']) + parseBoardMod(implode('', file($boarddir . '/Packages/temp/' . $action['filename'])), false, $action['reverse']); + else + parseModification(implode('', file($boarddir . '/Packages/temp/' . $action['filename'])), false, $action['reverse']); + } + elseif ($action['type'] == 'code' && !empty($action['filename'])) + { + // This is just here as reference for what is available. + global $txt, $boarddir, $sourcedir, $modSettings, $context, $settings, $db_prefix, $forum_version; + + // Now include the file and be done with it ;). + require($boarddir . '/Packages/temp/' . $action['filename']); + } + } + + // Check if the mod has been installed. + $seen = false; + + // Look through the list of installed mods... + foreach ($instmods as $i => $installed_mod) + if ($installed_mod['id'] == $packageInfo['id']) + { + if ($context['uninstalling']) + $instmods[$i] = array(); + else + { + $instmods[$i]['version'] = $packageInfo['version']; + $seen = true; + } + break; + } + + // Hasn't.... make it show as installed. + if (!$seen && !$context['uninstalling']) + $instmods[] = $packageInfo; + + saveInstalledPackages($instmods); + $context['install_finished'] = true; + } + + // Clean house... get rid of the evidence ;). + if (file_exists($boarddir . '/Packages/temp')) + deltree($boarddir . '/Packages/temp'); +} + +// List the files in a package. +function PackageList() +{ + global $txt, $scripturl, $boarddir, $context, $sourcedir; + + require_once($sourcedir . '/Subs-Package.php'); + + // No package? Show him or her the door. + if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '') + redirectexit('action=packages'); + + $context['linktree'][] = array( + 'url' => $scripturl . '?action=packages;sa=list;package=' . $_REQUEST['package'], + 'name' => &$txt['smf180'] + ); + $context['page_title'] = $txt['smf180']; + $context['sub_template'] = 'list'; + + // The filename... + $context['filename'] = $_REQUEST['package']; + + // Let the unpacker do the work. + $context['files'] = read_tgz_file($boarddir . '/Packages/' . $_REQUEST['package'], null); +} + +// List the files in a package. +function ExamineFile() +{ + global $txt, $scripturl, $boarddir, $context, $sourcedir; + + require_once($sourcedir . '/Subs-Package.php'); + + // No package? Show him or her the door. + if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '') + redirectexit('action=packages'); + + // No file? Show him or her the door. + if (!isset($_REQUEST['file']) || $_REQUEST['file'] == '') + redirectexit('action=packages'); + + if (isset($_REQUEST['raw'])) + { + echo read_tgz_file($boarddir . '/Packages/' . $_REQUEST['package'], $_REQUEST['file'], true); + obExit(false); + } + + $context['linktree'][] = array( + 'url' => $scripturl . '?action=packages;sa=list;package=' . $_REQUEST['package'], + 'name' => &$txt['package_examine_file'] + ); + $context['page_title'] = $txt['package_examine_file']; + $context['sub_template'] = 'examine'; + + // The filename... + $context['package'] = $_REQUEST['package']; + $context['filename'] = $_REQUEST['file']; + + // Let the unpacker do the work.... but make sure we handle images properly. + if (in_array(strtolower(strrchr($_REQUEST['file'], '.')), array('.bmp', '.gif', '.jpeg', '.jpg', '.png'))) + $context['filedata'] = '' . $_REQUEST['file'] . ''; + elseif (strtolower(strrchr($_REQUEST['file'], '.')) == '.php') + $context['filedata'] = highlight_php_code(htmlspecialchars(read_tgz_file($boarddir . '/Packages/' . $_REQUEST['package'], $_REQUEST['file'], true))); + else + $context['filedata'] = htmlspecialchars(read_tgz_file($boarddir . '/Packages/' . $_REQUEST['package'], $_REQUEST['file'], true)); +} + +// List the installed packages. +function InstalledList() +{ + global $txt, $scripturl, $context; + + // Set up the linktree so things are purdy. + $context['linktree'][] = array( + 'url' => $scripturl . '?action=packages;sa=installed', + 'name' => &$txt['package6'] + ); + $context['page_title'] .= ' - ' . $txt['package6']; + $context['sub_template'] = 'view_installed'; + + // Load the installed mods and send them to the template. + $context['installed_mods'] = loadInstalledPackages(); +} + +// Empty out the installed list. +function FlushInstall() +{ + global $boarddir; + + // Open the file and write nothing to it. + file_put_contents($boarddir . '/Packages/installed.list', ''); + + redirectexit('action=packages;sa=installed'); +} + +// Delete a package. +function PackageRemove() +{ + global $scripturl, $boarddir; + + // Ack, don't allow deletion of arbitrary files here, could become a security hole somehow! + if (!isset($_GET['package']) || $_GET['package'] == 'index.php' || $_GET['package'] == 'installed.list' || $_GET['package'] == 'server.list') + redirectexit('action=packages;sa=browse'); + $_GET['package'] = strtr($_GET['package'], '/', '_'); + + // Can't delete what's not there. + if (file_exists($boarddir . '/Packages/' . $_GET['package'])) + { + @chmod($boarddir . '/Packages/' . $_GET['package'], 0777); + unlink($boarddir . '/Packages/' . $_GET['package']); + } + + redirectexit('action=packages;sa=browse'); +} + +// Browse a list of installed packages. +function PackageBrowse() +{ + global $txt, $boarddir, $scripturl, $context, $forum_version; + + $context['linktree'][] = array( + 'url' => $scripturl . '?action=packages;sa=browse', + 'name' => &$txt['package3'] + ); + $context['page_title'] .= ' - ' . $txt['package3']; + $context['sub_template'] = 'browse'; + + $context['forum_version'] = $forum_version; + + $instmods = loadInstalledPackages(); + + // Look through the list of installed mods... + $installed_mods = array(); + foreach ($instmods as $installed_mod) + $installed_mods[$installed_mod['id']] = $installed_mod['version']; + + $the_version = strtr($forum_version, array('SMF ' => '')); + + // Get a list of all the ids installed, so the latest packages won't include already installed ones. + $context['installed_mods'] = array_keys($installed_mods); + + // Empty lists for now. + $context['available_mods'] = array(); + $context['available_avatars'] = array(); + $context['available_languages'] = array(); + $context['available_other'] = array(); + $context['available_all'] = array(); + + if ($dir = @opendir($boarddir . '/Packages')) + { + while ($package = readdir($dir)) + { + if (substr($package, -7) != '.tar.gz' && substr($package, -4) != '.zip') + continue; + + $packageInfo = getPackageInfo($package); + if ($packageInfo === false) + continue; + + $packageInfo['is_installed'] = isset($installed_mods[$packageInfo['id']]); + $packageInfo['is_current'] = $packageInfo['is_installed'] && ($installed_mods[$packageInfo['id']] == $packageInfo['version']); + $packageInfo['is_newer'] = $packageInfo['is_installed'] && ($installed_mods[$packageInfo['id']] > $packageInfo['version']); + + $packageInfo['can_install'] = false; + $packageInfo['can_uninstall'] = false; + $packageInfo['can_upgrade'] = false; + + // This package is currently NOT installed. Check if it can be. + if (!$packageInfo['is_installed'] && $packageInfo['xml']->exists('install')) + { + // Check if there's an install for *THIS* version of SMF. + $installs = $packageInfo['xml']->set('install'); + foreach ($installs as $install) + if (!$install->exists('@for') || matchPackageVersion($the_version, $install->fetch('@for'))) + { + // Okay, this one is good to go. + $packageInfo['can_install'] = true; + break; + } + } + // An already installed, but old, package. Can we upgrade it? + elseif ($packageInfo['is_installed'] && !$packageInfo['is_current'] && $packageInfo['xml']->exists('upgrade')) + { + $upgrades = $packageInfo['xml']->set('upgrade'); + + // First go through, and check against the current version of SMF. + foreach ($upgrades as $upgrade) + { + // Even if it is for this SMF, is it for the installed version of the mod? + if (!$upgrade->exists('@for') || matchPackageVersion($the_version, $upgrade->fetch('@for'))) + if (!$upgrade->exists('@from') || matchPackageVersion($installed_mods[$packageInfo['id']], $upgrade->fetch('@from'))) + { + $packageInfo['can_upgrade'] = true; + break; + } + } + } + // Note that it has to be the current version to be uninstallable. Shucks. + elseif ($packageInfo['is_installed'] && $packageInfo['is_current'] && $packageInfo['xml']->exists('uninstall')) + { + $uninstalls = $packageInfo['xml']->set('uninstall'); + + // Can we find any uninstallation methods that work for this SMF version? + foreach ($uninstalls as $uninstall) + if (!$uninstall->exists('@for') || matchPackageVersion($the_version, $uninstall->fetch('@for'))) + { + $packageInfo['can_uninstall'] = true; + break; + } + } + + // Store a complete list. + $context['available_all'][] = $packageInfo; + + // Modification. + if ($packageInfo['type'] == 'modification' || $packageInfo['type'] == 'mod') + $context['available_mods'][] = $packageInfo; + // Avatar package. + elseif ($packageInfo['type'] == 'avatar') + $context['available_avatars'][] = $packageInfo; + // Language package. + elseif ($packageInfo['type'] == 'language') + $context['available_languages'][] = $packageInfo; + // Other stuff. + else + $context['available_other'][] = $packageInfo; + } + closedir($dir); + } +} + +function PackageOptions() +{ + global $txt, $scripturl, $context, $sourcedir, $modSettings; + + if (isset($_POST['submit'])) + { + updateSettings(array( + 'package_server' => $_POST['pack_server'], + 'package_port' => $_POST['pack_port'], + 'package_username' => $_POST['pack_user'], + 'package_make_backups' => !empty($_POST['package_make_backups']) + )); + + redirectexit('action=packages;sa=options'); + } + + if (preg_match('~^/home/([^/]+?)/public_html~', $_SERVER['DOCUMENT_ROOT'], $match)) + $default_username = $match[1]; + else + $default_username = ''; + + $context['linktree'][] = array( + 'url' => $scripturl . '?action=packages;sa=options', + 'name' => &$txt['package_install_options'] + ); + $context['page_title'] = $txt['package_install_options']; + $context['sub_template'] = 'install_options'; + + $context['package_ftp_server'] = isset($modSettings['package_server']) ? $modSettings['package_server'] : 'localhost'; + $context['package_ftp_port'] = isset($modSettings['package_port']) ? $modSettings['package_port'] : '21'; + $context['package_ftp_username'] = isset($modSettings['package_username']) ? $modSettings['package_username'] : $default_username; + $context['package_make_backups'] = !empty($modSettings['package_make_backups']); +} + +?> \ No newline at end of file diff --git a/Sources/Page.php b/Sources/Page.php new file mode 100644 index 0000000..3fec3bd --- /dev/null +++ b/Sources/Page.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/Sources/Poll.php b/Sources/Poll.php new file mode 100644 index 0000000..aff3c73 --- /dev/null +++ b/Sources/Poll.php @@ -0,0 +1,591 @@ + $row['expireTime'])) + fatal_lang_error('smf27', false); + + // If they have already voted and aren't allowed to change their vote - hence they are outta here! + if ($row['selected'] != -1 && empty($row['changeVote'])) + fatal_lang_error('smf27', false); + // Otherwise if they can change their vote yet they haven't sent any options... remove their vote and redirect. + elseif (!empty($row['changeVote'])) + { + $pollOptions = array(); + + // Find out what they voted for before. + $request = db_query(" + SELECT ID_CHOICE + FROM {$db_prefix}log_polls + WHERE ID_MEMBER = $ID_MEMBER + AND ID_POLL = $row[ID_POLL]", __FILE__, __LINE__); + while ($choice = mysql_fetch_row($request)) + $pollOptions[] = $choice[0]; + mysql_free_result($request); + + // Just skip it if they had voted for nothing before. + if (!empty($pollOptions)) + { + // Update the poll totals. + db_query(" + UPDATE {$db_prefix}poll_choices + SET votes = votes - 1 + WHERE ID_POLL = $row[ID_POLL] + AND ID_CHOICE IN (" . implode(', ', $pollOptions) . ") + AND votes > 0 + LIMIT " . count($pollOptions), __FILE__, __LINE__); + + // Delete off the log. + db_query(" + DELETE FROM {$db_prefix}log_polls + WHERE ID_MEMBER = $ID_MEMBER + AND ID_POLL = $row[ID_POLL]", __FILE__, __LINE__); + } + + // Redirect back to the topic so the user can vote again! + if (empty($_POST['options'])) + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); + } + + // Make sure the option(s) are valid. + if (empty($_POST['options'])) + fatal_lang_error('smf26', false); + + // Too many options checked! + if (count($_REQUEST['options']) > $row['maxVotes']) + fatal_error(sprintf($txt['poll_error1'], $row['maxVotes']), false); + + $pollOptions = array(); + $setString = ''; + foreach ($_REQUEST['options'] as $id) + { + $id = (int) $id; + + $pollOptions[] = $id; + $setString .= " + ($row[ID_POLL], $ID_MEMBER, $id),"; + } + $setString = substr($setString, 0, -1); + + // Add their vote to the tally. + db_query(" + INSERT INTO {$db_prefix}log_polls + (ID_POLL, ID_MEMBER, ID_CHOICE) + VALUES $setString", __FILE__, __LINE__); + db_query(" + UPDATE {$db_prefix}poll_choices + SET votes = votes + 1 + WHERE ID_POLL = $row[ID_POLL] + AND ID_CHOICE IN (" . implode(', ', $pollOptions) . ") + LIMIT " . count($pollOptions), __FILE__, __LINE__); + eaccelerator_rm('__poll-' . $row['ID_POLL']); + // Return to the post... + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); +} + +// Lock the voting for a poll. +function LockVoting() +{ + global $topic, $ID_MEMBER, $db_prefix, $user_info; + + checkSession('get'); + + // Get the poll starter, ID, and whether or not it is locked. + $request = db_query(" + SELECT t.ID_MEMBER_STARTED, t.ID_POLL, p.votingLocked + FROM {$db_prefix}topics AS t, {$db_prefix}polls AS p + WHERE t.ID_TOPIC = $topic + AND p.ID_POLL = t.ID_POLL + LIMIT 1", __FILE__, __LINE__); + list ($memberID, $pollID, $votingLocked) = mysql_fetch_row($request); + + // If the user _can_ modify the poll.... + if (!allowedTo('poll_lock_any')) + isAllowedTo('poll_lock_' . ($ID_MEMBER == $memberID ? 'own' :'any')); + + // It's been locked by a non-moderator. + if ($votingLocked == '1') + $votingLocked = '0'; + // Locked by a moderator, and this is a moderator. + elseif ($votingLocked == '2' && allowedTo('moderate_board')) + $votingLocked = '0'; + // Sorry, a moderator locked it. + elseif ($votingLocked == '2' && !allowedTo('moderate_board')) + fatal_lang_error('smf31'); + // A moderator *is* locking it. + elseif ($votingLocked == '0' && allowedTo('moderate_board')) + $votingLocked = '2'; + // Well, it's gonna be locked one way or another otherwise... + else + $votingLocked = '1'; + + // Lock! *Poof* - no one can vote. + db_query(" + UPDATE {$db_prefix}polls + SET votingLocked = $votingLocked + WHERE ID_POLL = $pollID + LIMIT 1", __FILE__, __LINE__); + + eaccelerator_rm('__poll-' . $row['ID_POLL']); + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); +} + +// Ask what to change in a poll. +function EditPoll() +{ + global $txt, $ID_MEMBER, $db_prefix; + global $user_info, $context, $topic; + + if (empty($topic)) + fatal_lang_error(1, false); + + loadLanguage('Post'); + loadTemplate('Poll'); + + $context['can_moderate_poll'] = allowedTo('moderate_board'); + $context['start'] = $_REQUEST['start']; + + // Get the question, id, and starter. + $request = db_query(" + SELECT t.ID_MEMBER_STARTED, t.ID_POLL, p.question, p.hideResults, p.expireTime, p.maxVotes, p.changeVote + FROM {$db_prefix}topics AS t, {$db_prefix}polls AS p + WHERE t.ID_TOPIC = $topic + AND p.ID_POLL = t.ID_POLL + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf232'); + $pollinfo = mysql_fetch_assoc($request); + mysql_free_result($request); + + // Can you do this? + if (!allowedTo('poll_edit_any')) + isAllowedTo('poll_edit_' . ($ID_MEMBER == $pollinfo['ID_MEMBER_STARTED'] ? 'own' :'any')); + + // Want to make sure before you actually submit? Must be a lot of options, or something. + if (isset($_POST['preview'])) + { + $question = htmlspecialchars(stripslashes($_POST['question'])); + $question = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $question); + + // Basic theme info... + $context['poll'] = array( + 'id' => $pollinfo['ID_POLL'], + 'question' => $question, + 'hide_results' => $pollinfo['hideResults'], + 'max_votes' => $pollinfo['maxVotes'] + ); + + // Start at number one with no last id to speak of. + $number = 1; + $last_id = 0; + + // Get all the choices. + $request = db_query(" + SELECT label, votes, ID_CHOICE + FROM {$db_prefix}poll_choices + WHERE ID_POLL = $pollinfo[ID_POLL]", __FILE__, __LINE__); + $context['choices'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + // Get the highest id so we can add more without reusing. + if ($row['ID_CHOICE'] >= $last_id) + $last_id = $row['ID_CHOICE'] + 1; + + // They cleared this by either omitting it or emptying it. + if (!isset($_POST['options'][$row['ID_CHOICE']]) || $_POST['options'][$row['ID_CHOICE']] == '') + continue; + + // Add the choice! + $context['choices'][$row['ID_CHOICE']] = array( + 'id' => $row['ID_CHOICE'], + 'number' => $number++, + 'votes' => $row['votes'], + 'label' => $row['label'], + 'is_last' => false + ); + } + mysql_free_result($request); + + // If an option exists, update it. If it is new, add it - but don't reuse ids! + foreach ($_POST['options'] as $id => $label) + { + $label = stripslashes(preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $label)); + + if (isset($context['choices'][$id])) + $context['choices'][$id]['label'] = $label; + elseif ($label != '') + $context['choices'][] = array( + 'id' => $last_id++, + 'number' => $number++, + 'label' => $label, + 'votes' => -1, + 'is_last' => false + ); + } + + if (allowedTo('moderate_board')) + $context['poll']['expiration'] = $_POST['poll_expire']; + + // Check the question/option count for errors. + if (trim($_POST['question']) == '') + $context['poll_errors']['no_question'] = true; + + // No check is needed, since nothing is really posted. + checkSubmitOnce('free'); + } + else + { + // Basic theme info... + $context['poll'] = array( + 'id' => $pollinfo['ID_POLL'], + 'question' => $pollinfo['question'], + 'hide_results' => $pollinfo['hideResults'], + 'max_votes' => $pollinfo['maxVotes'], + 'change_vote' => !empty($pollinfo['changeVote']), + ); + + if (allowedTo('moderate_board')) + $context['poll']['expiration'] = empty($pollinfo['expireTime']) ? '' : ceil($pollinfo['expireTime'] <= time() ? -1 : ($pollinfo['expireTime'] - time()) / (3600 * 24)); + + // Get all the choices. + $request = db_query(" + SELECT label, votes, ID_CHOICE + FROM {$db_prefix}poll_choices + WHERE ID_POLL = $pollinfo[ID_POLL]", __FILE__, __LINE__); + $context['choices'] = array(); + $number = 1; + while ($row = mysql_fetch_assoc($request)) + { + $context['choices'][$row['ID_CHOICE']] = array( + 'id' => $row['ID_CHOICE'], + 'number' => $number++, + 'votes' => $row['votes'], + 'label' => $row['label'], + 'is_last' => false + ); + } + mysql_free_result($request); + + $last_id = max(array_keys($context['choices'])) + 1; + } + $context['page_title'] = $txt['smf39']; + + $context['choices'][] = array( + 'id' => $last_id, + 'number' => $number, + 'votes' => -1, + 'label' => '', + 'is_last' => true + ); + + // Build the link tree. + $context['linktree'][] = array( + 'name' => $txt['smf39'] + ); + + // Register this form in the session variables. + checkSubmitOnce('register'); +} + +// Change a poll... +function EditPoll2() +{ + global $txt, $topic, $board, $ID_MEMBER, $db_prefix; + global $modSettings, $user_info; + + checkSession(); + + if (isset($_POST['preview'])) + return EditPoll(); + + // HACKERS (!!) can't edit :P. + if (empty($topic)) + fatal_lang_error(1, false); + + // Get the starter and the poll's ID. + $request = db_query(" + SELECT ID_MEMBER_STARTED, ID_POLL + FROM {$db_prefix}topics + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf232'); + $bcinfo = mysql_fetch_assoc($request); + mysql_free_result($request); + + // Check if they have the power to edit the poll. + if (!allowedTo('poll_edit_any')) + isAllowedTo('poll_edit_' . ($ID_MEMBER == $bcinfo['ID_MEMBER_STARTED'] ? 'own' :'any')); + + // Get all the choices. (no better way to remove all emptied and add previously non-existent ones.) + $request = db_query(" + SELECT ID_CHOICE + FROM {$db_prefix}poll_choices + WHERE ID_POLL = $bcinfo[ID_POLL]", __FILE__, __LINE__); + $choices = array(); + while ($row = mysql_fetch_assoc($request)) + $choices[] = $row['ID_CHOICE']; + mysql_free_result($request); + + $optionCount = 0; + // Ensure the user isn't removing all the options - there must be at least two. + foreach ($_POST['options'] as $k => $option) + { + if (trim($option) != '') + $optionCount++; + } + if ($optionCount < 2) + fatal_lang_error('poll_few', false); + + // Also - ensure they are not removing the question. + if (trim($_POST['question']) == '') + { + $_POST['preview'] = 1; + return EditPoll(); + } + + // Prevent double submission of this form. + checkSubmitOnce('check'); + + foreach ($_POST['options'] as $k => $option) + { + // Make sure the key is numeric for sanity's sake. + $k = (int) $k; + $option = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $option); + + // They've cleared the box. Either they want it deleted, or it never existed. + if (trim($option) == '') + { + // They want it deleted. Bye. + if (in_array($k, $choices)) + { + db_query(" + DELETE FROM {$db_prefix}log_polls + WHERE ID_POLL = $bcinfo[ID_POLL] + AND ID_CHOICE = $k", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}poll_choices + WHERE ID_POLL = $bcinfo[ID_POLL] + AND ID_CHOICE = $k", __FILE__, __LINE__); + } + + // Skip the rest... + continue; + } + + // Dress the option up for its big date with the database. + $option = htmlspecialchars($option); + + // If it's already there, update it. If it's not... add it. + if (in_array($k, $choices)) + db_query(" + UPDATE {$db_prefix}poll_choices + SET label = '$option' + WHERE ID_POLL = $bcinfo[ID_POLL] + AND ID_CHOICE = $k + LIMIT 1", __FILE__, __LINE__); + else + db_query(" + INSERT INTO {$db_prefix}poll_choices + (ID_POLL, ID_CHOICE, label, votes) + VALUES ($bcinfo[ID_POLL], $k, '$option', 0)", __FILE__, __LINE__); + } + + // Shall I reset the vote count, sir? + if (isset($_POST['resetVoteCount'])) + { + db_query(" + UPDATE {$db_prefix}poll_choices + SET votes = 0 + WHERE ID_POLL = $bcinfo[ID_POLL]", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_polls + WHERE ID_POLL = $bcinfo[ID_POLL]", __FILE__, __LINE__); + } + + // And finally... change the poll question, etc. + $_POST['question'] = htmlspecialchars($_POST['question']); + $_POST['question'] = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $_POST['question']); + + $_POST['poll_hide'] = (int) $_POST['poll_hide']; + $_POST['poll_change_vote'] = isset($_POST['poll_change_vote']) ? 1 : 0; + + // Ensure that the number options allowed makes sense, and the expiration date is valid. + if (allowedTo('moderate_board')) + { + if (empty($_POST['poll_expire']) && $_POST['poll_hide'] == 2) + $_POST['poll_hide'] = 1; + else + $_POST['poll_expire'] = empty($_POST['poll_expire']) ? '0' : time() + $_POST['poll_expire'] * 3600 * 24; + + if (empty($_POST['poll_max_votes']) || $_POST['poll_max_votes'] <= 0) + $_POST['poll_max_votes'] = 1; + else + $_POST['poll_max_votes'] = (int) $_POST['poll_max_votes']; + } + + db_query(" + UPDATE {$db_prefix}polls + SET question = '$_POST[question]', changeVote = $_POST[poll_change_vote]," . (allowedTo('moderate_board') ? " + hideResults = $_POST[poll_hide], expireTime = $_POST[poll_expire], maxVotes = $_POST[poll_max_votes]" : " + hideResults = IF(expireTime = 0 AND $_POST[poll_hide] = 2, 1, $_POST[poll_hide])") . " + WHERE ID_POLL = $bcinfo[ID_POLL] + LIMIT 1", __FILE__, __LINE__); + + eaccelerator_rm('__poll-' . $row['ID_POLL']); + // Off we go. + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); +} + +// Remove a poll from a topic without removing the topic. +function RemovePoll() +{ + global $topic, $db_prefix, $user_info, $ID_MEMBER; + + // Make sure the topic is not empty. + if (empty($topic)) + fatal_lang_error(1, false); + + // Check permissions. + if (!allowedTo('poll_remove_any')) + { + $request = db_query(" + SELECT ID_MEMBER_STARTED + FROM {$db_prefix}topics + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + list ($starter) = mysql_fetch_row($request); + mysql_free_result($request); + + isAllowedTo('poll_remove_' . ($starter == $ID_MEMBER ? 'own' : 'any')); + } + + // Retrieve the poll ID. + $request = db_query(" + SELECT ID_POLL + FROM {$db_prefix}topics + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + list ($pollID) = mysql_fetch_row($request); + mysql_free_result($request); + + // Remove all user logs for this poll. + db_query(" + DELETE FROM {$db_prefix}log_polls + WHERE ID_POLL = $pollID", __FILE__, __LINE__); + // Remove all poll choices. + db_query(" + DELETE FROM {$db_prefix}poll_choices + WHERE ID_POLL = $pollID", __FILE__, __LINE__); + // Remove the poll itself. + db_query(" + DELETE FROM {$db_prefix}polls + WHERE ID_POLL = $pollID + LIMIT 1", __FILE__, __LINE__); + // Finally set the topic poll ID back to 0! + db_query(" + UPDATE {$db_prefix}topics + SET ID_POLL = 0 + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + + eaccelerator_rm('__poll-' . $row['ID_POLL']); + // Take the moderator back to the topic. + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); +} + +?> diff --git a/Sources/Post.php b/Sources/Post.php new file mode 100644 index 0000000..154d209 --- /dev/null +++ b/Sources/Post.php @@ -0,0 +1,1911 @@ + 1) + fatal_error($txt['visual_been_muted']); + if ($user_info['warning'] == 1) + $context['warning'] = 1; + + // You can't reply with a poll... hacker. + if (isset($_REQUEST['poll']) && !empty($topic) && !isset($_REQUEST['msg'])) + unset($_REQUEST['poll']); + + // Posting an event? + $context['make_event'] = isset($_REQUEST['calendar']); + + // You must be posting to *some* board. + if (empty($board) && !$context['make_event']) + fatal_lang_error('smf232', false); + + require_once($sourcedir . '/Subs-Post.php'); + + if (WIRELESS) + $context['sub_template'] = WIRELESS_PROTOCOL . '_post'; + else + loadTemplate('Post'); + + // Check if it's locked. It isn't locked if no topic is specified. + if (!empty($topic)) + { + $request = db_query(" + SELECT + t.locked, IFNULL(ln.ID_TOPIC, 0) AS notify, t.isSticky, t.ID_POLL, t.numReplies, m.ID_MEMBER, + t.ID_FIRST_MSG, m.subject, t.subtitle AS subtitle + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}log_notify AS ln ON (ln.ID_TOPIC = t.ID_TOPIC AND ln.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = t.ID_FIRST_MSG) + WHERE t.ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + list ($locked, $context['notify'], $sticky, $pollID, $context['num_replies'], $ID_MEMBER_POSTER, $ID_FIRST_MSG, $first_subject, $context['subtitle']) = mysql_fetch_row($request); + mysql_free_result($request); + + // If this topic already has a poll, they sure can't add another. + if (isset($_REQUEST['poll']) && $pollID > 0) + unset($_REQUEST['poll']); + + if (empty($_REQUEST['msg'])) + { + if ($user_info['is_guest'] && !allowedTo('post_reply_any')) + is_not_guest(); + + if ($ID_MEMBER_POSTER != $ID_MEMBER) + isAllowedTo('post_reply_any'); + elseif (!allowedTo('post_reply_any')) + isAllowedTo('post_reply_own'); + } + + $context['can_lock'] = allowedTo('lock_any') || ($ID_MEMBER == $ID_MEMBER_POSTER && allowedTo('lock_own')); + $context['can_sticky'] = allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics']); + + $context['notify'] = !empty($context['notify']); + $context['sticky'] = isset($_REQUEST['subject']) ? !empty($_REQUEST['sticky']) : $sticky; + } + else + { + if (!$context['make_event']) + isAllowedTo('post_new'); + + $locked = 0; + $context['can_lock'] = allowedTo(array('lock_any', 'lock_own')); + $context['can_sticky'] = allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics']); + + $context['notify'] = !empty($context['notify']); + $context['sticky'] = !empty($_REQUEST['sticky']); + } + $context['can_move'] = allowedTo('move_any'); + $context['can_notify'] = allowedTo('mark_any_notify'); + $context['can_announce'] = allowedTo('announce_topic'); + $context['locked'] = !empty($locked) || !empty($_REQUEST['lock']); + + // An array to hold all the attachments for this topic. + $context['current_attachments'] = array(); + + // Don't allow a post if it's locked and you aren't all powerful. + if ($locked && !allowedTo('moderate_board')) + fatal_lang_error(90, false); + + // Check the users permissions - is the user allowed to add or post a poll? + if (isset($_REQUEST['poll']) && $modSettings['pollMode'] == '1') + { + // New topic, new poll. + if (empty($topic)) + isAllowedTo('poll_post'); + // This is an old topic - but it is yours! Can you add to it? + elseif ($ID_MEMBER == $ID_MEMBER_POSTER && !allowedTo('poll_add_any')) + isAllowedTo('poll_add_own'); + // If you're not the owner, can you add to any poll? + else + isAllowedTo('poll_add_any'); + + // Set up the poll options. + $context['poll_options'] = array( + 'max_votes' => empty($_POST['poll_max_votes']) ? '1' : $_POST['poll_max_votes'], + 'hide' => empty($_POST['poll_hide']) ? 0 : $_POST['poll_hide'], + 'expire' => !isset($_POST['poll_expire']) ? '' : $_POST['poll_expire'], + 'change_vote' => isset($_POST['poll_change_vote']) + ); + + // Make all five poll choices empty. + $context['choices'] = array( + array('id' => 0, 'number' => 1, 'label' => '', 'is_last' => false), + array('id' => 1, 'number' => 2, 'label' => '', 'is_last' => false), + array('id' => 2, 'number' => 3, 'label' => '', 'is_last' => false), + array('id' => 3, 'number' => 4, 'label' => '', 'is_last' => false), + array('id' => 4, 'number' => 5, 'label' => '', 'is_last' => true) + ); + } + + if ($context['make_event']) + { + // They might want to pick a board. + if (!isset($context['current_board'])) + $context['current_board'] = 0; + + // Start loading up the event info. + $context['event'] = array(); + $context['event']['title'] = isset($_REQUEST['evtitle']) ? $_REQUEST['evtitle'] : ''; + + $context['event']['id'] = isset($_REQUEST['eventid']) ? (int) $_REQUEST['eventid'] : -1; + $context['event']['new'] = $context['event']['id'] == -1; + + // Permissions check! + isAllowedTo('calendar_post'); + // warning +# if ($user_info['warning'] > 1) +# fatal_error($txt['visual_postmod_auth']); + + // Editing an event? (but NOT previewing!?) + if (!$context['event']['new'] && !isset($_REQUEST['subject'])) + { + // Get the current event information. + $request = db_query(" + SELECT + title, MONTH(eventDate) AS month, DAYOFMONTH(eventDate) AS day, + YEAR(eventDate) AS year, ID_MEMBER + FROM {$db_prefix}calendar + WHERE ID_EVENT = " . $context['event']['id'] . " + LIMIT 1", __FILE__, __LINE__); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + // Make sure the user is allowed to edit this event. + if ($row['ID_MEMBER'] != $ID_MEMBER) + isAllowedTo('calendar_edit_any'); + elseif (!allowedTo('calendar_edit_any')) + isAllowedTo('calendar_edit_own'); + + $context['event']['month'] = $row['month']; + $context['event']['day'] = $row['day']; + $context['event']['year'] = $row['year']; + $context['event']['title'] = $row['title']; + } + else + { + $today = getdate(); + + // You must have a month and year specified! + if (!isset($_REQUEST['month'])) + $_REQUEST['month'] = $today['mon']; + if (!isset($_REQUEST['year'])) + $_REQUEST['year'] = $today['year']; + + $context['event']['month'] = (int) $_REQUEST['month']; + $context['event']['year'] = (int) $_REQUEST['year']; + $context['event']['day'] = isset($_REQUEST['day']) ? $_REQUEST['day'] : ($_REQUEST['month'] == $today['mon'] ? $today['mday'] : 0); + + // Make sure the year and month are in the valid range. + if ($context['event']['month'] < 1 || $context['event']['month'] > 12) + fatal_lang_error('calendar1', false); + if ($context['event']['year'] < $modSettings['cal_minyear'] || $context['event']['year'] > $modSettings['cal_maxyear']) + fatal_lang_error('calendar2', false); + + // Get a list of boards they can post in. + $boards = boardsAllowedTo('post_new'); + if (empty($boards)) + fatal_lang_error('cannot_post_new'); + $request = db_query(" + SELECT c.name as catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.childLevel + FROM {$db_prefix}boards AS b, {$db_prefix}categories AS c + WHERE c.ID_CAT = b.ID_CAT" . (in_array(0, $boards) ? '' : " + AND b.ID_BOARD IN (" . implode(', ', $boards) . ")") . " + AND $user_info[query_see_board] + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['event']['boards'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['event']['boards'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['boardName'], + 'childLevel' => $row['childLevel'], + 'prefix' => str_repeat(' ', $row['childLevel'] * 3), + 'cat' => array( + 'id' => $row['ID_CAT'], + 'name' => $row['catName'] + ) + ); + mysql_free_result($request); + } + + // Find the last day of the month. + $context['event']['last_day'] = (int) strftime('%d', mktime(0, 0, 0, $context['event']['month'] == 12 ? 1 : $context['event']['month'] + 1, 0, $context['event']['month'] == 12 ? $context['event']['year'] + 1 : $context['event']['year'])); + + $context['event']['board'] = !empty($board) ? $board : $modSettings['cal_defaultboard']; + $context['event']['span'] = isset($_REQUEST['span']) ? $_REQUEST['span'] : 1; + } + + if (empty($context['post_errors'])) + $context['post_errors'] = array(); + + // See if any new replies have come along. + if (empty($_REQUEST['msg']) && !empty($topic) && !empty($modSettings['enableNewReplyWarning']) && isset($_REQUEST['num_replies'])) + { + $newReplies = $context['num_replies'] > $_REQUEST['num_replies'] ? $context['num_replies'] - $_REQUEST['num_replies'] : 0; + + if (!empty($newReplies)) + { + if ($newReplies == 1) + $txt['error_new_reply'] = isset($_GET['num_replies']) ? $txt['error_new_reply_reading'] : $txt['error_new_reply']; + else + $txt['error_new_replies'] = sprintf(isset($_GET['num_replies']) ? $txt['error_new_replies_reading'] : $txt['error_new_replies'], $newReplies); + + // If they've come from the display page then we treat the error differently.... + if (isset($_GET['num_replies'])) + $newRepliesError = $newReplies; + else + $context['post_error'][$newReplies == 1 ? 'new_reply' : 'new_replies'] = true; + + $modSettings['topicSummaryPosts'] = $newReplies > $modSettings['topicSummaryPosts'] ? max($modSettings['topicSummaryPosts'], 5) : $modSettings['topicSummaryPosts']; + } + } + + // Previewing, modifying, or posting? + if (isset($_REQUEST['subject']) || !empty($context['post_error'])) + { + // Validate inputs. + if (empty($context['post_error'])) + { + if (htmltrim__recursive($_REQUEST['subject']) == '') + $context['post_error']['no_subject'] = true; + if (htmltrim__recursive($_REQUEST['message']) == '') + $context['post_error']['no_message'] = true; + if (!empty($modSettings['max_messageLength']) && mb_strlen($_REQUEST['message']) > $modSettings['max_messageLength']) + $context['post_error']['long_message'] = true; + + // Are you... a guest? + if ($user_info['is_guest']) + { + $_REQUEST['guestname'] = !isset($_REQUEST['guestname']) ? '' : trim($_REQUEST['guestname']); + $_REQUEST['email'] = !isset($_REQUEST['email']) ? '' : trim($_REQUEST['email']); + + // Validate the name and email. + if (!isset($_REQUEST['guestname']) || trim(strtr($_REQUEST['guestname'], '_', ' ')) == '') + $context['post_error']['no_name'] = true; + elseif (strlen($_REQUEST['guestname']) > 25) + $context['post_error']['long_name'] = true; + elseif (isReservedName(htmlspecialchars($_REQUEST['guestname']))) + $context['post_error']['bad_name'] = true; + + if (!isset($_REQUEST['email']) || $_REQUEST['email'] == '') + $context['post_error']['no_email'] = true; + elseif (preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]+@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', stripslashes($_REQUEST['email'])) == 0) + $context['post_error']['bad_email'] = true; + } + + // This is self explanatory - got any questions? + if (isset($_REQUEST['poll']) && (!isset($_REQUEST['question']) || trim($_REQUEST['question']) == '')) + $context['post_error']['no_question'] = true; + + // This means they didn't click Post and get an error. + $really_previewing = true; + } + else + { + if (!isset($_REQUEST['subject'])) + $_REQUEST['subject'] = ''; + if (!isset($_REQUEST['message'])) + $_REQUEST['message'] = ''; + if (!isset($_REQUEST['icon'])) + $_REQUEST['icon'] = 'xx'; + + if (!isset($_REQUEST['nowplaying'])) + $_REQUEST['nowplaying'] = ''; + + $really_previewing = false; + } + + // Any errors occurred? + if (!empty($context['post_error'])) + { + loadLanguage('Errors'); + + $context['error_type'] = 'minor'; + + $context['post_error']['messages'] = array(); + foreach ($context['post_error'] as $post_error => $dummy) + { + if ($post_error == 'messages') + continue; + + $context['post_error']['messages'][] = $txt['error_' . $post_error]; + + // If it's not a minor error flag it as such. + if ($post_error != 'new_reply' && $post_error != 'new_replies') + $context['error_type'] = 'serious'; + } + } + + // Set up the inputs for the form. + $form_subject = htmlspecialchars(stripslashes($_REQUEST['subject']),ENT_COMPAT,'UTF-8'); + $form_message = htmlspecialchars(stripslashes($_REQUEST['message']), ENT_QUOTES,'UTF-8'); + + $form_nowplaying = htmlspecialchars(stripslashes($_REQUEST['nowplaying']), ENT_QUOTES,'UTF-8'); + + // Cheating ;). + $form_subject = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $form_subject); + + // Make sure the subject isn't too long. + if (mb_strlen($form_subject) > 150) + $form_subject = mb_substr($form_subject, 0, 150); + + if (isset($_REQUEST['poll'])) + { + $context['question'] = isset($_REQUEST['question']) ? htmlspecialchars(stripslashes(trim($_REQUEST['question']))) : ''; + $context['question'] = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $context['question']); + + $context['choices'] = array(); + $choice_id = 0; + + $_POST['options'] = empty($_POST['options']) ? array() : htmlspecialchars__recursive(stripslashes__recursive($_POST['options'])); + foreach ($_POST['options'] as $option) + { + if ($option == '') + continue; + + $option = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $option); + + $context['choices'][] = array( + 'id' => $choice_id++, + 'number' => $choice_id, + 'label' => $option, + 'is_last' => false + ); + } + + if (count($context['choices']) < 2) + { + $context['choices'][] = array( + 'id' => $choice_id++, + 'number' => $choice_id, + 'label' => '', + 'is_last' => false + ); + $context['choices'][] = array( + 'id' => $choice_id++, + 'number' => $choice_id, + 'label' => '', + 'is_last' => false + ); + } + $context['choices'][count($context['choices']) - 1]['is_last'] = true; + } + + // Are you... a guest? + if ($user_info['is_guest']) + { + $_REQUEST['guestname'] = !isset($_REQUEST['guestname']) ? '' : trim($_REQUEST['guestname']); + $_REQUEST['email'] = !isset($_REQUEST['email']) ? '' : trim($_REQUEST['email']); + + $_REQUEST['guestname'] = htmlspecialchars($_REQUEST['guestname']); + $context['name'] = $_REQUEST['guestname']; + $_REQUEST['email'] = htmlspecialchars($_REQUEST['email']); + $context['email'] = $_REQUEST['email']; + + $user_info['name'] = $_REQUEST['guestname']; + } + + // Only show the preview stuff if they hit Preview. + if ($really_previewing == true) + { + // Set up the preview message and subject and censor them... + preparsecode($form_message, false); + $context['preview_message'] = $form_message; + + $context['preview_nowplaying'] = $form_nowplaying; + + // Do all bulletin board code tags, with or without smileys. + $context['preview_message'] = doUBBC($context['preview_message'], isset($_REQUEST['ns']) ? 0 : 1); + + if ($form_subject != '') + { + $context['preview_subject'] = $form_subject; + + censorText($context['preview_subject']); + censorText($context['preview_message']); + + censorText($context['preview_nowplaying']); + } + else + $context['preview_subject'] = '' . $txt[24] . ''; + } + + // Set up the checkboxes. + $context['notify'] = !empty($_REQUEST['notify']); + $context['use_smileys'] = !isset($_REQUEST['ns']); + + $context['icon'] = preg_replace('~[\./\\\\*\':"<>]~', '', $_REQUEST['icon']); + + // Set the destination action for submission. + $context['destination'] = 'post2;start=' . $_REQUEST['start'] . (isset($_REQUEST['msg']) ? ';msg=' . $_REQUEST['msg'] . ';sesc=' . $sc : '') . (isset($_REQUEST['poll']) ? ';poll' : ''); + $context['submit_label'] = isset($_REQUEST['msg']) ? $txt[10] : $txt[105]; + + // Previewing an edit? + if (isset($_REQUEST['msg'])) + { + if (!empty($modSettings['attachmentEnable'])) + { + $request = db_query(" + SELECT IFNULL(size, -1) AS filesize, filename, ID_ATTACH + FROM {$db_prefix}attachments + WHERE ID_MSG = " . (int) $_REQUEST['msg'], __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if ($row['filesize'] <= 0) + continue; + $context['current_attachments'][] = array( + 'name' => $row['filename'], + 'id' => $row['ID_ATTACH'] + ); + } + mysql_free_result($request); + } + + // Allow moderators to change names.... + if (allowedTo('moderate_forum')) + { + $request = db_query(" + SELECT ID_MEMBER, posterName, posterEmail + FROM {$db_prefix}messages + WHERE ID_MSG = " . (int) $_REQUEST['msg'] . " + AND ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + if (empty($row['ID_MEMBER'])) + { + $context['name'] = htmlspecialchars($row['posterName']); + $context['email'] = htmlspecialchars($row['posterEmail']); + } + } + } + + // No check is needed, since nothing is really posted. + checkSubmitOnce('free'); + } + // Editing a message... + elseif (isset($_REQUEST['msg'])) + { + checkSession('get'); + // Check user has no warnings on this message +# if ($user_info['warning'] > 1 && empty($modSettings['visualw_pmod_edit'])) +# fatal_error($txt['visual_perm_modify']); + if ($user_info['warning'] > 0){ + $request = db_query(" + SELECT warningText + FROM {$db_prefix}vwarnings + WHERE memberID=$ID_MEMBER + AND messageID=$_REQUEST[msg] LIMIT 1", __FILE__, __LINE__); + if (mysql_fetch_assoc($request)) + fatal_error($txt['visual_perm_modify']); + } + + // Get the existing message. + $request = db_query(" + SELECT + m.ID_MEMBER, m.modifiedTime, m.smileysEnabled, m.body, + m.posterName, m.posterEmail, m.subject, m.icon, m.nowPlaying, + IFNULL(a.size, -1) AS filesize, a.filename, a.ID_ATTACH, + t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER + FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t) + LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MSG = m.ID_MSG) + WHERE m.ID_MSG = " . (int) $_REQUEST['msg'] . " + AND m.ID_TOPIC = $topic + AND t.ID_TOPIC = $topic", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf232'); + $row = mysql_fetch_assoc($request); + + $attachment_stuff = array($row); + while ($row2 = mysql_fetch_assoc($request)) + $attachment_stuff[] = $row2; + mysql_free_result($request); + + if ($row['ID_MEMBER'] == $ID_MEMBER && !allowedTo('modify_any')) + { + if ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('modify_own')) + isAllowedTo('modify_replies'); + else + isAllowedTo('modify_own'); + } + elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('modify_any')) + isAllowedTo('modify_replies'); + else + isAllowedTo('modify_any'); + + // When was it last modified? + if (!empty($row['modifiedTime'])) + $context['last_modified'] = timeformat($row['modifiedTime']); + + // Get the stuff ready for the form. + $form_subject = $row['subject']; + $form_message = preg_replace('||', "\n", $row['body']); + $form_nowplaying = $row['nowPlaying']; + censorText($form_nowplaying); + + censorText($form_message); + censorText($form_subject); + + // Check the boxes that should be checked. + $context['use_smileys'] = !empty($row['smileysEnabled']); + $context['icon'] = $row['icon']; + + // Load up 'em attachments! + foreach ($attachment_stuff as $attachment) + { + if ($attachment['filesize'] >= 0 && !empty($modSettings['attachmentEnable'])) + $context['current_attachments'][] = array( + 'name' => $attachment['filename'], + 'id' => $attachment['ID_ATTACH'] + ); + } + + // Allow moderators to change names.... + if (allowedTo('moderate_forum') && empty($row['ID_MEMBER'])) + { + $context['name'] = htmlspecialchars($row['posterName']); + $context['email'] = htmlspecialchars($row['posterEmail']); + } + + // Set the destinaton. + $context['destination'] = 'post2;start=' . $_REQUEST['start'] . ';msg=' . $_REQUEST['msg'] . ';sesc=' . $sc . (isset($_REQUEST['poll']) ? ';poll' : ''); + $context['submit_label'] = $txt[10]; + } + // Posting... + else + { + // By default.... + $context['use_smileys'] = true; + $context['icon'] = 'xx'; + + if ($user_info['is_guest']) + $context['name'] = $context['email'] = ''; + $context['destination'] = 'post2;start=' . $_REQUEST['start'] . (isset($_REQUEST['poll']) ? ';poll' : ''); + + $context['submit_label'] = $txt[105]; + + // Posting a quoted reply? + if (!empty($topic) && !empty($_REQUEST['quote'])) + { + checkSession('get'); + + // Make sure they _can_ quote this post, and if so get it. + $request = db_query(" + SELECT m.subject, IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, m.body + FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE m.ID_MSG = " . (int) $_REQUEST['quote'] . " + AND b.ID_BOARD = m.ID_BOARD + AND $user_info[query_see_board] + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf232'); + list ($form_subject, $mname, $mdate, $form_message) = mysql_fetch_row($request); + mysql_free_result($request); + + // Add 'Re: ' to the front of the quoted subject. + if (trim($txt['response_prefix']) != '' && strpos($form_subject, trim($txt['response_prefix'])) !== 0) + $form_subject = $txt['response_prefix'] . $form_subject; + + // Censor the message and subject. + + censorText($form_nowplaying); + censorText($form_message); + censorText($form_subject); + + $form_message = preg_replace('~~i', "\n", $form_message); + + // Remove any nested quotes, if necessary. + if (!empty($modSettings['removeNestedQuotes'])) + $form_message = preg_replace(array('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '~^\n~', '~\[/quote\]~'), '', $form_message); + + // Add a quote string on the front and end. + $form_message = '[quote author=' . $mname . ' link=topic=' . $topic . '.msg' . (int) $_REQUEST['quote'] . '#msg' . (int) $_REQUEST['quote'] . ' date=' . $mdate . ']' . "\n" . $form_message . "\n" . '[/quote]'; + } + // Posting a reply without a quote? + elseif (!empty($topic) && empty($_REQUEST['quote'])) + { + // Get the first message's subject. + $form_subject = $first_subject; + + // Add 'Re: ' to the front of the subject. + if (trim($txt['response_prefix']) != '' && $form_subject != '' && strpos($form_subject, trim($txt['response_prefix'])) !== 0) + $form_subject = $txt['response_prefix'] . $form_subject; + + // Censor the subject. + censorText($form_subject); + + $form_message = $form_nowplaying = ''; + } + else + $form_message = $form_subject = $form_nowplaying = ''; + } + + // If we are coming here to make a reply, and someone has already replied... make a special warning message. + if (isset($newRepliesError)) + { + $context['post_error']['messages'][] = $newRepliesError == 1 ? $txt['error_new_reply'] : $txt['error_new_replies']; + $context['error_type'] = 'minor'; + } + + // What are you doing? Posting a poll, modifying, previewing, new post, or reply... + if (isset($_REQUEST['poll'])) + $context['page_title'] = $txt['smf20']; + elseif ($context['make_event']) + $context['page_title'] = $context['event']['id'] == -1 ? $txt['calendar23'] : $txt['calendar20']; + elseif (isset($_REQUEST['msg'])) + $context['page_title'] = $txt[66]; + elseif (isset($_REQUEST['subject']) && isset($context['preview_subject'])) + $context['page_title'] = $txt[507] . ' - ' . strip_tags($context['preview_subject']); + elseif (empty($topic)) + $context['page_title'] = $txt[33]; + else + $context['page_title'] = $txt[25]; + + // Build the link tree. + if (empty($topic)) + $context['linktree'][] = array( + 'name' => '' . $txt[33] . '' + ); + else + $context['linktree'][] = array( + 'url' => $scripturl . '?topic=' . $topic . '.' . $_REQUEST['start'], + 'name' => $form_subject, + 'extra_before' => '' . $context['page_title'] . ' ( ', + 'extra_after' => ' )' + ); + + $context['num_allowed_attachments'] = $modSettings['attachmentNumPerPostLimit'] - count($context['current_attachments']); + $context['can_post_attachment'] = !empty($modSettings['attachmentEnable']) && $modSettings['attachmentEnable'] == 1 && allowedTo('post_attachment') && $context['num_allowed_attachments'] > 0; + + $context['subject'] = addcslashes($form_subject, '"'); + $context['nowplaying'] = str_replace(array('"', '<', '>', ' '), array('"', '<', '>', '  '), $form_nowplaying); + $context['message'] = str_replace(array('"', '<', '>', ' '), array('"', '<', '>', '  '), $form_message); + $context['attached'] = stripslashes(isset($_REQUEST['attachmentPreview']) ? $_REQUEST['attachmentPreview'] : ''); + $context['allowed_extensions'] = strtr($modSettings['attachmentExtensions'], array(',' => ', ')); + $context['make_poll'] = isset($_REQUEST['poll']); + + $context['icons'] = array( + array('value' => 'xx', 'name' => $txt[281]), + array('value' => 'thumbup', 'name' => $txt[282]), + array('value' => 'thumbdown', 'name' => $txt[283]), + array('value' => 'exclamation', 'name' => $txt[284]), + array('value' => 'question', 'name' => $txt[285]), + array('value' => 'lamp', 'name' => $txt[286]), + array('value' => 'smiley', 'name' => $txt[287]), + array('value' => 'angry', 'name' => $txt[288]), + array('value' => 'cheesy', 'name' => $txt[289]), + array('value' => 'grin', 'name' => $txt[293]), + array('value' => 'sad', 'name' => $txt[291]), + array('value' => 'wink', 'name' => $txt[292]) + ); + + $found = false; + for ($i = 0, $n = count($context['icons']); $i < $n; $i++) + { + $context['icons'][$i]['selected'] = $context['icon'] == $context['icons'][$i]['value']; + if ($context['icons'][$i]['selected']) + $found = true; + } + if (!$found) + array_unshift($context['icons'], array('value' => $context['icon'], 'name' => $txt['current_icon'], 'selected' => true)); + + if (isset($topic)) + getTopic(); + + $context['back_to_topic'] = isset($_REQUEST['goback']) || (isset($_REQUEST['msg']) && !isset($_REQUEST['subject'])); + + $context['is_new_topic'] = empty($topic); + $context['is_new_post'] = !isset($_REQUEST['msg']); + $context['is_first_post'] = $context['is_new_topic'] || (isset($_REQUEST['msg']) && $_REQUEST['msg'] == $ID_FIRST_MSG); + + // Register this form in the session variables. + checkSubmitOnce('register'); +} + +function Post2() +{ + global $board, $topic, $txt, $db_prefix, $modSettings, $sourcedir, $context; + global $ID_MEMBER, $user_info, $board_info; + + // No errors as yet. + $post_errors = array(); + + // If the session has timed out, let the user re-submit their form. + if (checkSession('post', '', false) != '') + $post_errors[] = 'session_timeout'; + + require_once($sourcedir . '/Subs-Post.php'); + loadLanguage('Post'); + + if (isset($_REQUEST['preview'])) + return Post(); + if ($user_info['warning'] > 1) + fatal_error($txt['visual_been_muted']); + + if (!empty($topic) && empty($_REQUEST['msg'])) + { + $request = db_query(" + SELECT t.locked, t.ID_POLL, t.numReplies, m.ID_MEMBER + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE t.ID_TOPIC = $topic + AND m.ID_MSG = t.ID_FIRST_MSG + LIMIT 1", __FILE__, __LINE__); + list ($tmplocked, $pollID, $numReplies, $ID_MEMBER_POSTER) = mysql_fetch_row($request); + mysql_free_result($request); + // Don't allow a post if it's locked. + if ($tmplocked != 0 && !allowedTo('moderate_board')) + fatal_lang_error(90, false); + + // Sorry, multiple polls aren't allowed... yet. You should stop giving me ideas :P. + if (isset($_REQUEST['poll']) && $pollID > 0) + unset($_REQUEST['poll']); + + if ($ID_MEMBER_POSTER != $ID_MEMBER) + isAllowedTo('post_reply_any'); + elseif (!allowedTo('post_reply_any')) + isAllowedTo('post_reply_own'); + + if (isset($_POST['lock']) && !(allowedTo('lock_any') || ($ID_MEMBER == $ID_MEMBER_POSTER && allowedTo('lock_own')))) + unset($_POST['lock']); + if (isset($_POST['sticky']) && !allowedTo('make_sticky')) + unset($_POST['sticky']); + + // If the number of replies has changed, if the setting is enabled, go back to Post() - which handles the error. + $newReplies = isset($_POST['num_replies']) && $numReplies > $_POST['num_replies'] ? $numReplies - $_POST['num_replies'] : 0; + if (!empty($modSettings['enableNewReplyWarning']) && !empty($newReplies)) + { + $_REQUEST['preview'] = true; + return Post(); + } + } + elseif (empty($topic)) + { + isAllowedTo('post_new'); + + if (isset($_POST['lock']) && (!allowedTo('lock_any') || !allowedTo('lock_own'))) + unset($_POST['lock']); + if (isset($_POST['sticky']) && !allowedTo('make_sticky')) + unset($_POST['sticky']); + } + + /* Check to see whether topic and message match, as well as getting the message's + current information and deleting it if necessary. */ + if (isset($_REQUEST['msg']) && !empty($topic)) + { + $_REQUEST['msg'] = (int) $_REQUEST['msg']; + // Check user has no warnings on this message + if ($user_info['warning'] > 1 && empty($modSettings['visualw_pmod_edit'])) + fatal_error($txt['visual_perm_modify']); + if ($user_info['warning'] > 0){ + $request = db_query(" + SELECT warningText + FROM {$db_prefix}vwarnings + WHERE memberID=$ID_MEMBER + AND messageID=$_REQUEST[msg] LIMIT 1", __FILE__, __LINE__); + if (mysql_fetch_assoc($request)) + fatal_error($txt['visual_perm_modify']); + } + + $request = db_query(" + SELECT + m.ID_MEMBER, m.posterName, m.posterEmail, m.posterTime, t.ID_FIRST_MSG, t.locked, + t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t + WHERE m.ID_MSG = $_REQUEST[msg] + AND t.ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf232'); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + if (!empty($row['locked']) && !allowedTo('moderate_board')) + fatal_lang_error(90, false); + + if (isset($_POST['lock']) && (!allowedTo('lock_any') || ($ID_MEMBER == $row['ID_MEMBER_POSTER'] && !allowedTo('lock_own')))) + unset($_POST['lock']); + if (isset($_POST['sticky']) && !allowedTo('make_sticky')) + unset($_POST['sticky']); + + if ($row['ID_MEMBER'] == $ID_MEMBER && !allowedTo('modify_any')) + { + if ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('modify_own')) + isAllowedTo('modify_replies'); + else + isAllowedTo('modify_own'); + } + elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('modify_any')) + isAllowedTo('modify_replies'); + else + { + isAllowedTo('modify_any'); + $moderationAction = true; + } + + $posterIsGuest = empty($row['ID_MEMBER']); + + if (!allowedTo('moderate_forum') || !$posterIsGuest) + { + $_POST['guestname'] = addslashes($row['posterName']); + $_POST['email'] = addslashes($row['posterEmail']); + } + } + elseif (isset($_REQUEST['msg'])) + fatal_lang_error('smf232'); + else + $posterIsGuest = $user_info['is_guest']; + + // If the poster is a guest evaluate the legality of name and email. + if ($posterIsGuest) + { + $_POST['guestname'] = !isset($_POST['guestname']) ? '' : trim($_POST['guestname']); + $_POST['email'] = !isset($_POST['email']) ? '' : trim($_POST['email']); + + if ($_POST['guestname'] == '' || $_POST['guestname'] == '_') + $post_errors[] = 'no_name'; + if (strlen($_POST['guestname']) > 25) + $post_errors[] = 'long_name'; + if (!isset($_POST['email']) || $_POST['email'] == '') + $post_errors[] = 'no_email'; + if (preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]+@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', stripslashes($_POST['email'])) == 0) + $post_errors[] = 'bad_email'; + } + + // Check the subject and message. + if (!isset($_POST['subject']) || htmltrim__recursive($_POST['subject']) == '') + $post_errors[] = 'no_subject'; + if (!isset($_POST['message']) || htmltrim__recursive($_POST['message']) == '') + $post_errors[] = 'no_message'; + elseif (!empty($modSettings['max_messageLength']) && mb_strlen($_POST['message']) > $modSettings['max_messageLength']) + $post_errors[] = 'long_message'; + if (isset($_POST['calendar']) && !isset($_REQUEST['deleteevent']) && htmltrim__recursive($_POST['evtitle']) == '') + $post_errors[] = 'no_event'; + + // Validate the poll... + if (isset($_REQUEST['poll']) && $modSettings['pollMode'] == '1') + { + if (isset($topic) && !isset($_REQUEST['msg'])) + fatal_lang_error(1, false); + + // This is a new topic... so it's a new poll. + if (empty($topic)) + isAllowedTo('poll_post'); + // Can you add to your own topics? + elseif ($ID_MEMBER == $row['ID_MEMBER_POSTER'] && !allowedTo('poll_add_any')) + isAllowedTo('poll_add_own'); + // Can you add polls to any topic, then? + else + isAllowedTo('poll_add_any'); + + if (!isset($_POST['question']) || trim($_POST['question']) == '') + $post_errors[] = 'no_question'; + + $_POST['options'] = empty($_POST['options']) ? array() : htmltrim__recursive($_POST['options']); + + // Get rid of empty ones. + foreach ($_POST['options'] as $k => $option) + if ($option == '') + unset($_POST['options'][$k], $_POST['options'][$k]); + + // What are you going to vote between with one choice?!? + if (count($_POST['options']) < 2) + $post_errors[] = 'poll_few'; + } + + if ($posterIsGuest) + { + // If user is a guest, make sure the chosen name isn't taken. + if (isReservedName($_POST['guestname']) && (!isset($row['posterName']) || $_POST['guestname'] != $row['posterName'])) + $post_errors[] = 'bad_name'; + } + // If the user isn't a guest, get his or her name and email. + elseif (!isset($_REQUEST['msg'])) + { + $_POST['guestname'] = addslashes($user_info['username']); + $_POST['email'] = addslashes($user_info['email']); + } + + // Any mistakes? + if (!empty($post_errors)) + { + loadLanguage('Errors'); + // Previewing. + $_REQUEST['preview'] = true; + + $context['post_error'] = array('messages' => array()); + foreach ($post_errors as $post_error) + { + $context['post_error'][$post_error] = true; + $context['post_error']['messages'][] = $txt['error_' . $post_error]; + } + + return Post(); + } + + // Make sure the user isn't spamming the board. + if (!isset($_REQUEST['msg'])) + spamProtection('spam'); + + // Add special html entities to the subject, message, name, and email. + $_POST['message'] = htmlspecialchars($_POST['message'], ENT_QUOTES,'UTF-8'); + $_POST['subject'] = htmlspecialchars($_POST['subject'], ENT_COMPAT,'UTF-8'); + $_POST['guestname'] = htmlspecialchars($_POST['guestname'], ENT_COMPAT,'UTF-8'); + $_POST['email'] = htmlspecialchars($_POST['email'], ENT_COMPAT,'UTF-8'); + + $_POST['nowplaying'] = htmlspecialchars($_POST['nowplaying'], ENT_COMPAT,'UTF-8'); + $_POST['subtitle'] = htmlspecialchars($_POST['subtitle'], ENT_COMPAT,'UTF-8'); + + // Preparse code. (Zef) + if ($user_info['is_guest']) + $user_info['name'] = $_POST['guestname']; + preparsecode($_POST['message']); + + // Cheat and fix entities in the subject line. + $_POST['subject'] = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $_POST['subject']); + + // At this point, we want to make sure the subject isn't too long. Stripslashes first to avoid a trailing slash. + if (isset($_POST['subject']) && mb_strlen(stripslashes($_POST['subject'])) > 150) + $_POST['subject'] = addslashes(mb_substr(stripslashes($_POST['subject']), 0, 150)); + + // Hack to make it so 񏋤... can't happen. + $_POST['subject'] = preg_replace('~&#\d+$~', '', $_POST['subject']); + + // Cheat and fix entities in the subtitle line. + $_POST['subtitle'] = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $_POST['subtitle']); + + // At this point, we want to make sure the subtitle isn't too long. Stripslashes first to avoid a trailing slash. + if (isset($_POST['subtitle']) && mb_strlen(stripslashes($_POST['subtitle'])) > 150) + $_POST['subtitle'] = addslashes(mb_substr(stripslashes($_POST['subtitle']), 0, 150)); + + // Hack to make it so 񏋤... can't happen. + $_POST['subtitle'] = preg_replace('~&#\d+$~', '', $_POST['subtitle']); + + // Make the poll... + if (isset($_REQUEST['poll'])) + { + // Make sure that the user has not entered a ridiculous number of options.. + if (empty($_POST['poll_max_votes']) || $_POST['poll_max_votes'] <= 0) + $_POST['poll_max_votes'] = 1; + elseif ($_POST['poll_max_votes'] > count($_POST['options'])) + $_POST['poll_max_votes'] = count($_POST['options']); + else + $_POST['poll_max_votes'] = (int) $_POST['poll_max_votes']; + + // Just set it to zero if it's not there.. + if (!isset($_POST['poll_hide'])) + $_POST['poll_hide'] = 0; + else + $_POST['poll_hide'] = (int) $_POST['poll_hide']; + $_POST['poll_change_vote'] = isset($_POST['poll_change_vote']) ? 1 : 0; + + // If the user tries to set the poll too far in advance, don't let them. + if (!empty($_POST['poll_expire']) && $_POST['poll_expire'] < 1) + fatal_lang_error('poll_range_error', false); + // Don't allow them to select option 2 for hidden results if it's not time limited. + elseif (empty($_POST['poll_expire']) && $_POST['poll_hide'] == 2) + $_POST['poll_hide'] = 1; + + // Clean up the question and answers. + $_POST['question'] = htmlspecialchars($_POST['question']); + $_POST['question'] = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $_POST['question']); + $_POST['options'] = htmlspecialchars__recursive($_POST['options']); + + // Create the poll. + db_query(" + INSERT INTO {$db_prefix}polls + (question, hideResults, maxVotes, expireTime, ID_MEMBER, posterName, changeVote) + VALUES ('$_POST[question]', $_POST[poll_hide], $_POST[poll_max_votes], + " . (empty($_POST['poll_expire']) ? '0' : time() + $_POST['poll_expire'] * 3600 * 24) . ", $ID_MEMBER, '$_POST[guestname]', $_POST[poll_change_vote])", __FILE__, __LINE__); + $ID_POLL = db_insert_id(); + + // Create each answer choice. + $i = 0; + $setString = ''; + foreach ($_POST['options'] as $option) + { + $option = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $option); + + $setString .= " + ($ID_POLL, $i, '$option'),"; + $i++; + } + $setString = substr($setString, 0, -1); + db_query(" + INSERT INTO {$db_prefix}poll_choices + (ID_POLL, ID_CHOICE, label) + VALUES$setString", __FILE__, __LINE__); + } + else + $ID_POLL = 0; + + // Check if they are trying to delete any current attachments.... + if (isset($_REQUEST['msg']) && isset($_POST['attach_del']) && allowedTo('post_attachment')) + { + foreach ($_POST['attach_del'] as $i => $dummy) + $_POST['attach_del'][$i] = (int) $dummy; + + require_once($sourcedir . '/ManageAttachments.php'); + removeAttachments('a.ID_MSG = ' . (int) $_REQUEST['msg'] . ' AND a.ID_ATTACH NOT IN (' . implode(', ', $_POST['attach_del']) . ')'); + } + + // ...or attach a new file... + if (isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'][0] != '') + { + isAllowedTo('post_attachment'); + + // If this isn't a new post, check the current attachments. + if (isset($_REQUEST['msg'])) + { + $request = db_query(" + SELECT COUNT(ID_ATTACH), SUM(size) + FROM {$db_prefix}attachments + WHERE ID_MSG = " . (int) $_REQUEST['msg'], __FILE__, __LINE__); + list ($quantity, $total_size) = mysql_fetch_row($request); + mysql_free_result($request); + } + else + { + $quantity = 0; + $total_size = 0; + } + + $attachIDs = array(); + foreach ($_FILES['attachment']['tmp_name'] as $n => $dummy) + { + if ($_FILES['attachment']['name'][$n] == '') + continue; + + if (!is_uploaded_file($_FILES['attachment']['tmp_name'][$n]) || !file_exists($_FILES['attachment']['tmp_name'][$n])) + fatal_lang_error('smf124'); + + // Remove special foreign characters from the filename. + if (empty($modSettings['attachmentEncryptFilenames'])) + $_FILES['attachment']['name'][$n] = getAttachmentFilename($_FILES['attachment']['name'][$n], false, true); + + // Is the file too big? + if (!empty($modSettings['attachmentSizeLimit']) && $_FILES['attachment']['size'][$n] > $modSettings['attachmentSizeLimit'] * 1024) + fatal_lang_error('smf122', false, array($modSettings['attachmentSizeLimit'])); + + // Have we reached the maximum number of files we are allowed? + $quantity++; + if (!empty($modSettings['attachmentNumPerPostLimit']) && $quantity > $modSettings['attachmentNumPerPostLimit']) + fatal_lang_error('attachments_limit_per_post', false, array($modSettings['attachmentNumPerPostLimit'])); + + // Check the total upload size for this post... + $total_size += $_FILES['attachment']['size'][$n]; + if (!empty($modSettings['attachmentPostLimit']) && $total_size > $modSettings['attachmentPostLimit'] * 1024) + fatal_lang_error('smf122', false, array($modSettings['attachmentPostLimit'])); + + if (!empty($modSettings['attachmentCheckExtensions'])) + { + if (!in_array(strtolower(substr(strrchr($_FILES['attachment']['name'][$n], '.'), 1)), explode(',', strtolower($modSettings['attachmentExtensions'])))) + fatal_error($_FILES['attachment']['name'][$n] . '.
' . $txt['smf123'] . ' ' . $modSettings['attachmentExtensions'] . '.', false); + } + + if (!empty($modSettings['attachmentDirSizeLimit'])) + { + // Make sure the directory isn't full. + $dirSize = 0; + $dir = @opendir($modSettings['attachmentUploadDir']) or fatal_lang_error('smf115b'); + while ($file = readdir($dir)) + { + if (substr($file, 0, -1) == '.') + continue; + + $dirSize += filesize($modSettings['attachmentUploadDir'] . '/' . $file); + } + closedir($dir); + + // Too big! Maybe you could zip it or something... + if ($_FILES['attachment']['size'][$n] + $dirSize > $modSettings['attachmentDirSizeLimit'] * 1024) + fatal_lang_error('smf126'); + } + + // Find the filename, strip the dir. + $destName = basename($_FILES['attachment']['name'][$n]); + + // Check if the file already exists.... (for those who do not encrypt their filenames...) + if (empty($modSettings['attachmentEncryptFilenames'])) + { + // Make sure they aren't trying to upload a nasty file. + $disabledFiles = array('con', 'com1', 'com2', 'com3', 'com4', 'prn', 'aux', 'lpt1', '.htaccess', 'index.php'); + if (in_array(strtolower($destName), $disabledFiles)) + fatal_error($destName . '.
' . $txt['smf130b'] . '.'); + + // Check if there's another file with that name... + $request = db_query(" + SELECT ID_ATTACH + FROM {$db_prefix}attachments + WHERE filename = '" . strtolower($_FILES['attachment']['name'][$n]) . "' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + fatal_lang_error('smf125'); + mysql_free_result($request); + } + + if (!is_writable($modSettings['attachmentUploadDir'])) + fatal_lang_error('attachments_no_write'); + + db_query(" + INSERT INTO {$db_prefix}attachments + (" . (!empty($_REQUEST['msg']) ? 'ID_MSG, ' : '') . "filename, size) + VALUES (" . (!empty($_REQUEST['msg']) ? (int) $_REQUEST['msg'] . ', ' : '') . "'" . $_FILES['attachment']['name'][$n] . "', " . $_FILES['attachment']['size'][$n] . ')', __FILE__, __LINE__); + $attachID = db_insert_id(); + $attachIDs[] = $attachID; + + $destName = $modSettings['attachmentUploadDir'] . '/' . getAttachmentFilename($destName, $attachID, true); + + if (!move_uploaded_file($_FILES['attachment']['tmp_name'][$n], $destName)) + fatal_lang_error('smf124'); + + // Attempt to chmod it. + @chmod($destName, 0644); + } + } + + // Prevent double submission of this form. + checkSubmitOnce('check'); + + // Fix the message icon. + $_POST['icon'] = preg_replace('~[\./\\\\*\':"<>]~', '', $_POST['icon']); + + if (!empty($_REQUEST['msg'])) + { + // Have admins allowed people to hide their screwups? + if (time() - $row['posterTime'] > $modSettings['edit_wait_time'] || $ID_MEMBER != $row['ID_MEMBER']) + $modifiedTime = time(); + + // Change the post. + db_query(" + UPDATE {$db_prefix}messages + SET + posterName = '$_POST[guestname]', posterEmail = '$_POST[email]', subject = '$_POST[subject]', nowPlaying = '$_POST[nowplaying]', + icon = '$_POST[icon]', body = '$_POST[message]'," . (!empty($modifiedTime) ? " + modifiedTime = $modifiedTime, modifiedName = '" . addslashes($user_info['name']) . "'," : '') . " + smileysEnabled = " . (isset($_POST['ns']) ? '0' : '1') . " + WHERE ID_MSG = " . (int) $_REQUEST['msg'] . " + LIMIT 1", __FILE__, __LINE__); + + // Lock and or sticky the post. + if ((isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics'])) || isset($_POST['lock']) || isset($_REQUEST['poll'])) + { + if (isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics'])) + $setString = 'isSticky = ' . (int) $_POST['sticky']; + else + $setString = ''; + + if (isset($_POST['lock']) && $setString != '') + $setString .= ', locked = ' . (int) $_POST['lock']; + elseif (isset($_POST['lock'])) + $setString = 'locked = ' . (int) $_POST['lock']; + + if (isset($_REQUEST['poll']) && $setString != '') + $setString .= ", ID_POLL = $ID_POLL"; + elseif (isset($_REQUEST['poll'])) + $setString = "ID_POLL = $ID_POLL"; + + db_query(" + UPDATE {$db_prefix}topics + SET $setString + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + } + + db_query(" + UPDATE {$db_prefix}topics + SET subtitle = '{$_POST['subtitle']}' + WHERE ID_TOPIC = $topic AND ID_FIRST_MSG = {$_REQUEST['msg']}", + __FILE__, __LINE__); + + // Might've changed the subject/poster. + updateLastMessages($board); + eaccelerator_rm('__message-' . (int) $_REQUEST['msg']); + $newTopic = false; + } +/* elseif(!isset($_REQUEST['msg']) && !$user_info['is_admin'] && $user_info['warning'] == 2){ + $idtostore = $topic == null ? -1 : $topic; + $request = db_query(" + INSERT INTO {$db_prefix}postmoderation + (ID_MEMBER, ID_TOPIC, ID_BOARD, subject, posterName, + posterEmail, posterTime, posterIP, body, icon,smiliesEnabled, ID_POLL) + VALUES ($ID_MEMBER, '$idtostore', '$board', '$_POST[subject]', + '$_POST[guestname]', '$_POST[email]', " . time() . ", '$_SERVER[REMOTE_ADDR]', + '$_POST[message]','$_POST[icon]', " . (isset($_POST['ns']) ? '0' : '1') . ", $ID_POLL)", __FILE__, __LINE__); + if ($modSettings['returnToPost'] == '1' && $topic != '') + redirectexit("$scripturl?topic=$threadid;start=new"); + else + redirectexit("$scripturl?board=$board"); + }*/ + // This is a new topic. Save it. + elseif (empty($topic)) + { + // Insert the post. + db_query(" + INSERT INTO {$db_prefix}messages + (ID_BOARD, ID_MEMBER, subject, posterName, posterEmail, posterTime, nowPlaying, + posterIP, smileysEnabled, body, icon) + VALUES ($board, $ID_MEMBER, '$_POST[subject]', '$_POST[guestname]', '$_POST[email]', " . time() . ", '$_POST[nowplaying]', + '$user_info[ip]', " . (isset($_POST['ns']) ? '0' : '1') . ", '$_POST[message]', '$_POST[icon]')", __FILE__, __LINE__); + $ID_MSG = db_insert_id(); + + if ($ID_MSG > 0) + { + // Insert the new topic. + db_query(" + INSERT INTO {$db_prefix}topics + (ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_FIRST_MSG, ID_LAST_MSG, + " . (isset($_POST['lock']) ? 'locked, ' : '') . + (isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics']) ? ' isSticky, ' : '') . "numViews, ID_POLL, subtitle) + VALUES ($board, $ID_MEMBER, $ID_MEMBER, $ID_MSG, $ID_MSG, + " . (isset($_POST['lock']) ? (int) $_POST['lock'] . ', ' : '') . + (isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics']) ? (int) $_POST['sticky'] . ', ' : '') . "0, $ID_POLL, '{$_POST['subtitle']}')", __FILE__, __LINE__); + + $topic = db_insert_id(); + if ($topic > 0) + { + // Fix the message with the topic. + db_query(" + UPDATE {$db_prefix}messages + SET ID_TOPIC = $topic + WHERE ID_MSG = $ID_MSG + LIMIT 1", __FILE__, __LINE__); + + // Also fix the attachments. + if (isset($attachIDs)) + db_query(" + UPDATE {$db_prefix}attachments + SET ID_MSG = $ID_MSG + WHERE ID_ATTACH IN (" . implode(', ', $attachIDs) . ')', __FILE__, __LINE__); + + // Increase the number of posts and topics on the board. + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = numPosts + 1, numTopics = numTopics + 1 + WHERE ID_BOARD = $board + LIMIT 1", __FILE__, __LINE__); + + // There's been a new topic AND a new post today. + trackStats(array('topics' => '+', 'posts' => '+')); + + // Update all the stats so everyone knows about this new topic and message. + updateStats('topic'); + updateStats('message'); + updateLastMessages($board); + } + } + + $newTopic = true; + } + // Already existing topic, new post. + else + { + db_query(" + INSERT INTO {$db_prefix}messages + (ID_BOARD, ID_TOPIC, ID_MEMBER, subject, posterName, posterEmail, posterTime, nowPlaying, + posterIP, smileysEnabled, body, icon) + VALUES ($board, $topic, $ID_MEMBER, '$_POST[subject]', '$_POST[guestname]', '$_POST[email]', " . time() . ", '$_POST[nowplaying]', + '$user_info[ip]', " . (isset($_POST['ns']) ? '0' : '1') . ", '$_POST[message]', '$_POST[icon]')", __FILE__, __LINE__); + $ID_MSG = db_insert_id(); + + if ($ID_MSG > 0) + { + // If attachments were added, update the table now we know the message ID. + if (isset($attachIDs)) + db_query(" + UPDATE {$db_prefix}attachments + SET ID_MSG = $ID_MSG + WHERE ID_ATTACH IN (" . implode(', ', $attachIDs) . ')', __FILE__, __LINE__); + + // Update the number of replies and the lock/sticky status. + db_query(" + UPDATE {$db_prefix}topics + SET ID_MEMBER_UPDATED = $ID_MEMBER, ID_LAST_MSG = $ID_MSG, + numReplies = numReplies + 1" . (isset($_POST['lock']) ? ', + locked = ' . (int) $_POST['lock'] : '') . (isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics']) ? ', + isSticky = ' . (int) $_POST['sticky'] : '') . " + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + + // Update the post count. + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = numPosts + 1 + WHERE ID_BOARD = $board + LIMIT 1", __FILE__, __LINE__); + + // Statistics... + trackStats(array('posts' => '+')); + + // Update the *other* stats. + updateStats('message'); + updateLastMessages($board); + } + + // They've posted, so they can make the view count go up one if they really want. (this is to keep views >= replies...) + $_SESSION['last_read_topic'] = 0; + + $newTopic = false; + } + + // Editing or posting an event? + if (isset($_POST['calendar']) && (!isset($_REQUEST['eventid']) || $_REQUEST['eventid'] == -1)) + { + require_once($sourcedir . '/Calendar.php'); + calendarCanLink(); + calendarInsertEvent($board, $topic, $_POST['evtitle'], $ID_MEMBER, $_POST['month'], $_POST['day'], $_POST['year'], isset($_POST['span']) ? $_POST['span'] : null); + } + elseif (isset($_POST['calendar'])) + { + $_REQUEST['eventid'] = (int) $_REQUEST['eventid']; + + // Validate the post... + require_once($sourcedir . '/Subs-Post.php'); + calendarValidatePost(); + + // If you're not allowed to edit any events, you have to be the poster. + if (!allowedTo('calendar_edit_any')) + { + // Get the event's poster. + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}calendar + WHERE ID_EVENT = $_REQUEST[eventid]", __FILE__, __LINE__); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + // Silly hacker, Trix are for kids. ...probably trademarked somewhere, this is FAIR USE! (parody...) + isAllowedTo('calendar_edit_' . ($row['ID_MEMBER'] == $ID_MEMBER ? 'own' : 'any')); + } + + // Delete it? + if (isset($_REQUEST['deleteevent'])) + db_query(" + DELETE FROM {$db_prefix}calendar + WHERE ID_EVENT = $_REQUEST[eventid] + LIMIT 1", __FILE__, __LINE__); + // ... or just update it? + else + db_query(" + UPDATE {$db_prefix}calendar + SET eventDate = '$_REQUEST[year]-$_REQUEST[month]-$_REQUEST[day]', + title = '" . htmlspecialchars($_REQUEST['evtitle'], ENT_QUOTES) . "' + WHERE ID_EVENT = $_REQUEST[eventid] + LIMIT 1", __FILE__, __LINE__); + + updateStats('calendar'); + } + + if (!$user_info['is_guest'] && !isset($_REQUEST['msg'])) + { + // Check if posts count on this board, and if so increase the post count. + $request = db_query(" + SELECT countPosts + FROM {$db_prefix}boards + WHERE ID_BOARD = $board + LIMIT 1", __FILE__, __LINE__); + list ($pcounter) = mysql_fetch_row($request); + mysql_free_result($request); + + if (empty($pcounter)) + { + ++$user_info['posts']; + updateMemberData($ID_MEMBER, array('posts' => 'posts + 1')); + } + } + + // Marking read should be done even for editing messages.... + if (!$user_info['is_guest']) + { + // Mark topic as read for the member. In the future to avoid == problems. + db_query(" + REPLACE INTO {$db_prefix}log_topics + (logTime, ID_MEMBER, ID_TOPIC) + VALUES (" . (time() + 1) . ", $ID_MEMBER, $topic)", __FILE__, __LINE__); + + // Mark all the parents read. (since you just posted and they will be unread.) + if (!empty($board_info['parent_boards'])) + { + db_query(" + UPDATE {$db_prefix}log_boards + SET logTime = " . time() . " + WHERE ID_MEMBER = $ID_MEMBER + AND ID_BOARD IN (" . implode(',', array_keys($board_info['parent_boards'])) . ")", __FILE__, __LINE__); + } + } + + // Notify any members who have notification turned on for this topic. + if ($newTopic) + { + // This is a new topic, so maybe we should send off notifications... + notifyUsersBoard(); + } + elseif (empty($_REQUEST['msg'])) + sendNotifications($topic, 'reply'); + + // Turn notification on or off. (note this just blows smoke if it's already on or off.) + if (!empty($_POST['notify'])) + { + if (allowedTo('mark_any_notify')) + db_query(" + INSERT IGNORE INTO {$db_prefix}log_notify + (ID_MEMBER, ID_TOPIC, ID_BOARD) + VALUES ($ID_MEMBER, $topic, 0)", __FILE__, __LINE__); + } + elseif (!$newTopic) + db_query(" + DELETE FROM {$db_prefix}log_notify + WHERE ID_MEMBER = $ID_MEMBER + AND ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + + // Log an act of moderation - modifying. + if (!empty($moderationAction)) + logAction('modify', array('topic' => $topic, 'message' => (int) $_REQUEST['msg'], 'member' => $row['ID_MEMBER_POSTER'])); + + // Returning to the topic? + if (!empty($_REQUEST['goback'])) + { + // Mark the board as read.... because it might get confusing otherwise. + db_query(" + UPDATE {$db_prefix}log_boards + SET logTime = " . time() . " + WHERE ID_MEMBER = $ID_MEMBER + AND ID_BOARD = $board", __FILE__, __LINE__); + } + + if (!empty($_POST['announce_topic'])) + redirectexit('action=announce;sa=selectgroup;topic=' . $topic . (!empty($_POST['move']) && allowedTo('move_any') ? ';move' : '') . (empty($_REQUEST['goback']) ? '' : ';goback')); + + if (!empty($_POST['move']) && allowedTo('move_any')) + redirectexit('action=movetopic;topic=' . $topic . '.0' . (empty($_REQUEST['goback']) ? '' : ';goback')); + + // Return to post if the mod is on. + if (isset($_REQUEST['msg']) && !empty($_REQUEST['goback'])) + redirectexit('topic=' . $topic . '.msg' . $_REQUEST['msg'] . '#msg' . $_REQUEST['msg'], true, $context['browser']['is_ie']); + elseif (!empty($_REQUEST['goback'])) + redirectexit('topic=' . $topic . '.new#new', true, $context['browser']['is_ie']); + // Dut-dut-duh-duh-DUH-duh-dut-duh-duh! *dances to the Final Fantasy Fanfare...* + else + redirectexit('board=' . $board . '.0'); +} + +// General function for topic announcements. +function AnnounceTopic() +{ + global $context, $txt; + + if (!allowedTo('announce_topic')) + fatal_lang_error(1, false); + + validateSession(); + + loadTemplate('ManageMembers'); + loadLanguage('Post'); + + $subActions = array( + 'selectgroup' => 'AnnouncementSelectMembergroup', + 'send' => 'AnnouncementSend', + ); + + $context['page_title'] = $txt['announce_topic']; + + // Call the function based on the sub-action. + $subActions[isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'selectgroup'](); +} + +// Allow a user to chose the membergroups to send the announcement to. +function AnnouncementSelectMembergroup() +{ + global $db_prefix, $context, $topic, $board, $board_info; + + $groups = array_merge($board_info['groups'], array(1)); + foreach ($groups as $id => $group) + $groups[$id] = (int) $group; + + // Get all membergroups that have access to the board the announcement was made on. + $request = db_query(" + SELECT mg.ID_GROUP, mg.groupName, COUNT(mem.ID_MEMBER) AS num_members + FROM {$db_prefix}membergroups AS mg + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_GROUP = mg.ID_GROUP OR FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR mg.ID_GROUP = mem.ID_POST_GROUP) + WHERE mg.ID_GROUP IN (" . implode(', ', $groups) . ") + GROUP BY mg.ID_GROUP + ORDER BY mg.minPosts, IF(mg.ID_GROUP < 4, mg.ID_GROUP, 4), mg.groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $context['groups'][$row['ID_GROUP']] = array( + 'id' => $row['ID_GROUP'], + 'name' => $row['groupName'], + 'member_count' => $row['num_members'], + ); + } + mysql_free_result($request); + + // Get the subject of the topic we're about to announce. + $request = db_query(" + SELECT m.subject + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t + WHERE t.ID_TOPIC = $topic + AND m.ID_MSG = t.ID_FIRST_MSG", __FILE__, __LINE__); + list ($context['topic_subject']) = mysql_fetch_row($request); + mysql_free_result($request); + + censorText($context['announce_topic']['subject']); + + $context['move'] = isset($_REQUEST['move']) ? 1 : 0; + $context['go_back'] = isset($_REQUEST['goback']) ? 1 : 0; + + $context['sub_template'] = 'announce'; +} + +// Send the announcement in chunks. +function AnnouncementSend() +{ + global $db_prefix, $topic, $board, $board_info, $context, $modSettings; + global $language, $scripturl, $txt, $ID_MEMBER, $sourcedir; + + checkSession(); + + $chunkSize = 75; + $context['start'] = empty($_REQUEST['start']) ? 0 : (int) $_REQUEST['start']; + $groups = array_merge($board_info['groups'], array(1)); + + if (!empty($_POST['membergroups'])) + $_POST['who'] = explode(',', $_POST['membergroups']); + + // Check whether at least one membergroup was selected. + if (empty($_POST['who'])) + fatal_lang_error('no_membergroup_selected'); + + // Make sure all membergroups are integers and can access the board of the announcement. + foreach ($_POST['who'] as $id => $mg) + $_POST['who'][$id] = in_array((int) $mg, $groups) ? (int) $mg : 0; + + // Get the topic subject and censor it. + $request = db_query(" + SELECT m.subject + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t + WHERE t.ID_TOPIC = $topic + AND m.ID_MSG = t.ID_FIRST_MSG", __FILE__, __LINE__); + list ($context['topic_subject']) = mysql_fetch_row($request); + mysql_free_result($request); + censorText($context['topic_subject']); + + // We need this in order to be able send emails. + require_once($sourcedir . '/Subs-Post.php'); + + // Select the email addresses for this batch. + $request = db_query(" + SELECT mem.ID_MEMBER, mem.emailAddress, mem.lngfile + FROM {$db_prefix}members AS mem + WHERE mem.ID_MEMBER != $ID_MEMBER" . (!empty($modSettings['notifyAnncmnts_UserDisable']) ? ' + AND mem.notifyAnnouncements = 1' : '') . " + AND (mem.ID_GROUP IN (" . implode(', ', $_POST['who']) . ") OR mem.ID_POST_GROUP IN (" . implode(', ', $_POST['who']) . ") OR FIND_IN_SET(" . implode(", mem.additionalGroups) OR FIND_IN_SET(", $_POST['who']) . ", mem.additionalGroups)) + AND mem.ID_MEMBER > $context[start] + ORDER BY mem.ID_MEMBER + LIMIT $chunkSize", __FILE__, __LINE__); + + // All members have received a mail. Go to the next screen. + if (mysql_num_rows($request) == 0) + { + if (!empty($_REQUEST['move']) && allowedTo('move_any')) + redirectexit('action=movetopic;topic=' . $topic . '.0' . (empty($_REQUEST['goback']) ? '' : ';goback')); + elseif (!empty($_REQUEST['goback'])) + redirectexit('topic=' . $topic . '.new;boardseen#new', true, $context['browser']['is_ie']); + else + redirectexit('board=' . $board . '.0'); + } + + // Loop through all members that'll receive an announcement in this batch. + while ($row = mysql_fetch_assoc($request)) + { + $cur_language = empty($row['lngfile']) || empty($modSettings['userLanguage']) ? $language : $row['lngfile']; + + // If the language wasn't defined yet, load it and compose a notification message. + if (!isset($announcements[$cur_language])) + { + loadLanguage('Post', $cur_language, false); + $announcements[$cur_language] = array( + 'subject' => $txt['notifyXAnn2'] . ': ' . $context['topic_subject'], + 'body' => $txt['notifyXAnn3'] . ' ' . $scripturl . '?topic=' . $topic . ".new#new\n\n" . $txt[130], + 'recipients' => array(), + ); + } + + $announcements[$cur_language]['recipients'][$row['ID_MEMBER']] = $row['emailAddress']; + $context['start'] = $row['ID_MEMBER']; + } + mysql_free_result($request); + + // For each language send a different mail. + foreach ($announcements as $lang => $mail) + sendmail($mail['recipients'], $mail['subject'], $mail['body']); + + $context['percentage_done'] = round(100 * $context['start'] / $modSettings['latestMember'], 1); + + $context['move'] = empty($_REQUEST['move']) ? 0 : 1; + $context['go_back'] = empty($_REQUEST['goback']) ? 0 : 1; + $context['membergroups'] = implode(',', $_POST['who']); + $context['sub_template'] = 'announcement_send'; + + // Go back to the correct language for the user ;). + if (!empty($modSettings['userLanguage'])) + loadLanguage('Post'); +} + +// Notify members of a new post. +function notifyUsersBoard() +{ + global $board, $topic, $txt, $scripturl, $db_prefix, $language, $user_info; + global $ID_MEMBER, $modSettings, $sourcedir; + + // Can't do it if there's no board. (won't happen but let's check for safety and not sending a zillion email's sake.) + if ($board == 0) + return; + + require_once($sourcedir . '/Subs-Post.php'); + + // Censor the subject... + censorText($_POST['subject']); + $_POST['subject'] = un_htmlspecialchars($_POST['subject']); + + // Find the members with notification on for this board. + $members = db_query(" + SELECT + mem.ID_MEMBER, mem.emailAddress, mem.notifyOnce, mem.lngfile, ln.sent, mem.ID_GROUP, + mem.additionalGroups, b.memberGroups, mem.ID_POST_GROUP + FROM {$db_prefix}log_notify AS ln, {$db_prefix}members AS mem, {$db_prefix}boards AS b + WHERE ln.ID_BOARD = $board + AND b.ID_BOARD = $board + AND mem.ID_MEMBER != $ID_MEMBER + AND ln.ID_MEMBER = mem.ID_MEMBER + GROUP BY mem.ID_MEMBER + ORDER BY mem.lngfile", __FILE__, __LINE__); + while ($rowmember = mysql_fetch_assoc($members)) + { + if ($rowmember['ID_GROUP'] != 1) + { + $allowed = explode(',', $rowmember['memberGroups']); + $rowmember['additionalGroups'] = explode(',', $rowmember['additionalGroups']); + $rowmember['additionalGroups'][] = $rowmember['ID_GROUP']; + $rowmember['additionalGroups'][] = $rowmember['ID_POST_GROUP']; + + if (count(array_intersect($allowed, $rowmember['additionalGroups'])) == 0) + continue; + } + + loadLanguage('Post', empty($rowmember['lngfile']) || empty($modSettings['userLanguage']) ? $language : $rowmember['lngfile'], false); + + $send_subject = sprintf($txt['notify_boards_subject'], $_POST['subject']); + + // Send only if once is off or it's on and it hasn't been sent. + if (!empty($rowmember['notifyOnce']) && empty($rowmember['sent'])) + sendmail($rowmember['emailAddress'], $send_subject, + sprintf($txt['notify_boards'], $_POST['subject'], $scripturl . '?topic=' . $topic . '.new#new') . + $txt['notify_boards_once'] . "\n\n" . + $txt['notify_boardsUnsubscribe'] . ': ' . $scripturl . '?action=notifyboard;board=' . $board . ".0\n\n" . + $txt[130]); + elseif (empty($rowmember['notifyOnce'])) + sendmail($rowmember['emailAddress'], $send_subject, + sprintf($txt['notify_boards'], $_POST['subject'], $scripturl . '?topic=' . $topic . '.new#new') . + $txt['notify_boardsUnsubscribe'] . ': ' . $scripturl . '?action=notifyboard;board=' . $board . ".0\n\n" . + $txt[130]); + } + mysql_free_result($members); + + // Sent! + db_query(" + UPDATE {$db_prefix}log_notify + SET sent = 1 + WHERE ID_BOARD = $board + AND ID_MEMBER != $ID_MEMBER", __FILE__, __LINE__); +} + +// Get the topic for display purposes. +function getTopic() +{ + global $topic, $db_prefix, $modSettings, $context; + + // If you're modifying, get only those posts before the current one. (otherwise get all.) + $request = db_query(" + SELECT IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, m.body, m.smileysEnabled, m.ID_MSG, m.nowPlaying + FROM {$db_prefix}messages AS m + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE m.ID_TOPIC = $topic" . (isset($_REQUEST['msg']) ? " + AND m.ID_MSG < " . (int) $_REQUEST['msg'] : '') . " + ORDER BY m.ID_MSG DESC" . ($modSettings['topicSummaryPosts'] >= 0 ? ' + LIMIT ' . (int) $modSettings['topicSummaryPosts'] : ''), __FILE__, __LINE__); + $context['previous_posts'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + // Censor, BBC, ... + censorText($row['body']); + censorText($row['nowPlaying']); + $row['body'] = doUBBC($row['body'], $row['smileysEnabled']); + + // ...and store. + $context['previous_posts'][] = array( + 'poster' => $row['posterName'], + 'message' => $row['body'], + 'time' => timeformat($row['posterTime']), + 'timestamp' => $row['posterTime'], + 'id' => $row['ID_MSG'], + 'nowplaying' => $row['nowPlaying'] + ); + } + mysql_free_result($request); +} + +function QuoteFast() +{ + global $db_prefix, $modSettings, $user_info, $txt, $settings; + + loadLanguage('Post'); + + checkSession('get'); + + echo ' + + + + ', $txt['retrieving_quote'], ' + + + + ', $txt['retrieving_quote'], ' + + ' => '')); + + $quote_mozilla = strtr(preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', htmlspecialchars($quote)), array('"' => '"')); + + // Lucky for us, Internet Explorer has an "innerText" feature which basically converts entities <--> text. Use it if possible ;). + echo ' + var quote = \'', $quote, '\'; + var stage = document.getElementById("temporary_posting_area"); + + if (typeof(DOMParser) != "undefined" && typeof(window.opera) == "undefined") + { + var xmldoc = new DOMParser().parseFromString("" + \'', $quote_mozilla, '\'.replace(/\n/g, "_SMF-BREAK_").replace(/\t/g, "_SMF-TAB_") + "", "text/xml"); + quote = xmldoc.childNodes[0].textContent.replace(/_SMF-BREAK_/g, "\n").replace(/_SMF-TAB_/g, "\t"); + } + else if (typeof(stage.innerText) != "undefined") + { + setInnerHTML(stage, quote.replace(/\n/g, "_SMF-BREAK_").replace(/\t/g, "_SMF-TAB_").replace(//g, ">")); + quote = stage.innerText.replace(/_SMF-BREAK_/g, "\n").replace(/_SMF-TAB_/g, "\t"); + } + + if (typeof(window.opera) != "undefined") + quote = quote.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, \'"\').replace(/&/g, "&"); + + window.opener.replaceText(quote, window.opener.document.postmodify.message); + + window.focus(); + setTimeout("window.close();", 400);'; + } + echo ' + // --> + +'; + + obExit(false); +} + +?> diff --git a/Sources/Printpage.php b/Sources/Printpage.php new file mode 100644 index 0000000..722cdf2 --- /dev/null +++ b/Sources/Printpage.php @@ -0,0 +1,225 @@ +' => '
' . $txt['smf238'] . ':
', + '[/code]
' => '
', + '[code]' => '
' . $txt['smf238'] . ':
', + '[/code]' => '
', + // [php] + '[php]
' => '', + '[/php]
' => '', + '[php]' => '', + '[/php]' => '', + // [b], [i], [u], [s] + '[b]' => '', + '[/b]' => '', + '[i]' => '', + '[/i]' => '', + '[u]' => '', + '[/u]' => '', + '[s]' => '', + '[/s]' => '', + // [move] can't really be printed. + '[move]' => '', + '[/move]' => '', + // Colors can't well be displayed... supposed to be black and white. + '[black]' => '', + '[/black]' => '', + '[white]' => '', + '[/white]' => '', + '[red]' => '', + '[/red]' => '', + '[green]' => '', + '[/green]' => '', + '[blue]' => '', + '[/blue]' => '', + // Aligning text passes.. + '[left]' => '
', + '[/left]' => '
', + '[right]' => '
', + '[/right]' => '
', + '[center]' => '
', + '[/center]' => '
', + // Some of the more basic textual 'effects' are fine as well. + '[tt]' => '', + '[/tt]' => '', + '[sub]' => '', + '[/sub]' => '', + '[sup]' => '', + '[/sup]' => '', + // Horizontal rules and breaks.. + '[hr]' => '
', + '[hr /]' => '
', + '[hr/]' => '
', + '[br]' => '
', + '[br /]' => '
', + '[br/]' => '
', + // Links are useless on paper... just show the link. + '[ftp]' => '', + '[/ftp]' => '', + // Preformatted is arguably the best. + '[pre]' => '
',
+			'[/pre]' => '
', + // [list], [*], [li], etc. + '[list]' => '
    ', + '[/list]' => '
', + '[*]' => '
  • ', + '[@]' => '
  • ', + '[+]' => '
  • ', + '[x]' => '
  • ', + '[#]' => '
  • ', + '[o]' => '
  • ', + '[O]' => '
  • ', + '[0]' => '
  • ', + '[li]' => '
  • ', + '[/li]' => '
  • ', + )); + + // [glow] and [shadow] can't be printed either. + $row['body'] = preg_replace(array('/\[glow(.+?)\](.+?)\[\/glow\]/is', '/\[shadow(.+?)\](.+?)\[\/shadow\]/is'), '$2', $row['body']); + + // Removing colors is good too. + $row['body'] = preg_replace('~\[color=(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[\w]{1,12})\](.*?)\[/color\]~i', '$2', $row['body']); + + // [font] and [size] are okay.. + $row['body'] = preg_replace('~\[font=([\w,\-\s]+?)\](.+?)\[/font\]~i', '$2', $row['body']); + $row['body'] = preg_replace('~\[size=([\d]{1,2}p[xt]|(?:x-)?small(?:er)?|(?:x-)?large[r]?)\](.+?)\[/size\]~i', '$2', $row['body']); + $row['body'] = preg_replace('~\[size=([\d])\](.+?)\[/size\]~i', '$2', $row['body']); + + // Images are not printed - unless the user specifically requests it. + if (isset($_GET['images'])) + $row['body'] = preg_replace('~\[img(\s+width=([\d]+))?(\s+height=([\d]+))?\s*\](?:
    )*(.+?)(?:
    )*\[/img\]~ei', '\'\'', $row['body']); + else + $row['body'] = preg_replace(array('~\[img=(.*?)\](.+?)\[/img\]~', '~\[img\](.+?)\[/img\]~'), '($1)', $row['body']); + + // URLs and emails just get parenthesized. + $row['body'] = preg_replace(array('/\[url=(.+?)\]([^\]]+)\s*\[\/url\]/', '/\[email=(.*)\](.*)\[\/email\]/'), '$2 ($1)', $row['body']); + $row['body'] = preg_replace(array('/\[url\](.+)\[\/url\]/', '/\[email\](.*)\[\/email\]/'), '$1', $row['body']); + + // Quotes are okay. Important, actually. + $row['body'] = preg_replace( + array( + '/(?:
    )?\[quote(?: author)?="(.+?)"\](?:
    )*/i', + '/(?:
    )?\[quote author=(.{1,80}?) link=(.+?) date=(.+?)\](?:
    )*/ei', + '/(?:
    )?\[quote author=(.{1,80}?)\](?:
    )*/i', + '/(?:
    )?\[quote\](?:
    )*/i', + '/\[\/quote\]/i' + ), + array( + '
    ' . $txt['smf239'] . ': $1
    ', + "'
    ' . \$txt['smf239'] . ': \$1 ' . \$txt[176] . ' ' . timeformat('\$3', false) . '
    '", + '
    ' . $txt['smf239'] . ': $1
    ', + '
    ' . $txt['smf240'] . ':
    ', + '
    ' + ), + $row['body'] + ); + + // [me=...]say something[/me] + $row['body'] = preg_replace(array('/\[me="(.+?)"\]/', '/\[me=([^\]]+)\]/', '/\[\/me\]/is'), array('* $1 ', '* $1 ', ''), $row['body']); + + // Oh sure, let's print some flash. + $row['body'] = preg_replace('/\[flash=(.*)\](.*)\[\/flash\]/', '$2', $row['body']); + + // [table], [tr], [td]... they go together. + $row['body'] = preg_replace('/\[table\]/', '', $row['body']); + $row['body'] = str_replace('[/table]', '
    ', $row['body']); + $row['body'] = str_replace(array('[tr]', '[td]'), array('', ''), $row['body']); + $row['body'] = str_replace(array('[/tr]', '[/td]'), array('', ''), $row['body']); + + // Censor the subject and message. + censorText($row['subject']); + censorText($row['body']); + + $context['posts'][] = array( + 'subject' => $row['subject'], + 'member' => $row['posterName'], + 'time' => timeformat($row['posterTime'], false), + 'timestamp' => $row['posterTime'], + 'body' => $row['body'] + ); + + if (!isset($context['topic_subject'])) + $context['topic_subject'] = $row['subject']; + } + mysql_free_result($request); +} + +?> diff --git a/Sources/Profile.php b/Sources/Profile.php new file mode 100644 index 0000000..1372dc0 --- /dev/null +++ b/Sources/Profile.php @@ -0,0 +1,1922 @@ + array(permission_array_for_editing_OWN_profile, permission_array_for_editing_ANY_profile[, require_validation]), + ... + ); + + */ + + $sa_allowed = array( + 'summary' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')), + 'statPanel' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')), + 'showPosts' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')), + 'trackUser' => array(array('moderate_forum'), array('moderate_forum'), true), + 'trackIP' => array(array('moderate_forum'), array('moderate_forum'), true), + 'showPermissions' => array(array('manage_permissions'), array('manage_permissions')), + 'account' => array(array('manage_membergroups', 'profile_identity_any', 'profile_identity_own'), array('manage_membergroups', 'profile_identity_any')), + 'forumProfile' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')), + 'map' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')), + 'theme' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')), + 'notification' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')), + 'pmprefs' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')), + 'deleteAccount' => array(array('profile_remove_any', 'profile_remove_own'), array('profile_remove_any')), + ); + + // Set the profile layer to be displayed. + $context['template_layers'][] = 'profile'; +$context['show_karmastat'] = allowedTo('karmalog_view') && empty($modsettings['karmapermiss']); + + // Did we get the user by name... + if (isset($_REQUEST['user'])) + $memberResult = loadMemberData($_REQUEST['user'], true, 'profile'); + // ... or by ID_MEMBER? + elseif (!empty($_REQUEST['u'])) + $memberResult = loadMemberData((int) $_REQUEST['u'], false, 'profile'); + // If it was just ?action=profile, edit your own profile. + else + $memberResult = loadMemberData($ID_MEMBER, false, 'profile'); + + // Check if loadMemberData() has returned a valid result. + if (!is_array($memberResult)) + fatal_error($txt[453], false); + + // If all went well, we have a valid member ID! + list ($memID) = $memberResult; + + // Is this the profile of the user himself or herself? + $context['user']['is_owner'] = $memID == $ID_MEMBER; + + //if ($context['user']['is_owner']) var_dump($_POST); + + // No Subaction? + if (!isset($_REQUEST['sa']) || !isset($sa_allowed[$_REQUEST['sa']])) + { + // Pick the first subaction you're allowed to see. + if ((allowedTo('profile_view_own') && $context['user']['is_owner']) || allowedTo('profile_view_any')) + $_REQUEST['sa'] = 'summary'; + elseif (allowedTo('moderate_forum')) + $_REQUEST['sa'] = 'trackUser'; + elseif (allowedTo('manage_permissions')) + $_REQUEST['sa'] = 'showPermissions'; + elseif ((allowedTo('profile_identity_own') && $context['user']['is_owner']) || allowedTo('profile_identity_any') || allowedTo('manage_membergroups')) + $_REQUEST['sa'] = 'account'; + elseif ((allowedTo('profile_extra_own') && $context['user']['is_owner']) || allowedTo('profile_extra_any')) + $_REQUEST['sa'] = 'forumProfile'; + elseif ((allowedTo('profile_remove_own') && $context['user']['is_owner']) || allowedTo('profile_remove_any')) + $_REQUEST['sa'] = 'deleteAccount'; + else + isAllowedTo('profile_view_' . ($context['user']['is_owner'] ? 'own' : 'any')); + } + + // Check the permissions for the given sub action. + isAllowedTo($sa_allowed[$_REQUEST['sa']][$context['user']['is_owner'] ? 0 : 1]); + + // Make sure the user is who he claims to be, before any important account stuff is changed. + if (!empty($sa_allowed[$_REQUEST['sa']][2])) + validateSession(); + + // No need for this anymore. + unset($sa_allowed); + + $context['profile_areas'] = array(); + + // Set the menu items in the left bar... + if (!$user_info['is_guest'] && (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo(array('profile_view_any', 'moderate_forum', 'manage_permissions')))) + { + $context['profile_areas']['info'] = array( + 'title' => $txt['profileInfo'], + 'areas' => array() + ); + + if (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any')) + { + $context['profile_areas']['info']['areas']['summary'] = '' . $txt['summary'] . ''; + $context['profile_areas']['info']['areas']['statPanel'] = '' . $txt['statPanel'] . ''; + $context['profile_areas']['info']['areas']['showPosts'] = '' . $txt['showPosts'] . ''; + + } + + // Groups with moderator permissions can also.... + if (allowedTo('moderate_forum')) + { + $context['profile_areas']['info']['areas']['trackUser'] = '' . $txt['trackUser'] . ''; + $context['profile_areas']['info']['areas']['trackIP'] = '' . $txt['trackIP'] . ''; + } + if (allowedTo('manage_permissions')) + $context['profile_areas']['info']['areas']['showPermissions'] = '' . $txt['showPermissions'] . ''; + } + + // Edit your/this person's profile? + if (($context['user']['is_owner'] && (allowedTo(array('profile_identity_own', 'profile_extra_own')))) || allowedTo(array('profile_identity_any', 'profile_extra_any', 'manage_membergroups'))) + { + $context['profile_areas']['edit_profile'] = array( + 'title' => $txt['profileEdit'], + 'areas' => array() + ); + + if (($context['user']['is_owner'] && allowedTo('profile_identity_own')) || allowedTo(array('profile_identity_any', 'manage_membergroups'))) + $context['profile_areas']['edit_profile']['areas']['account'] = '' . $txt['account'] . ''; + + if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any')) + { + $context['profile_areas']['edit_profile']['areas']['forumProfile'] = '' . $txt['forumProfile'] . ''; + $context['profile_areas']['edit_profile']['areas']['theme'] = '' . $txt['theme'] . ''; + $context['profile_areas']['edit_profile']['areas']['notification'] = '' . $txt['notification'] . ''; + $context['profile_areas']['edit_profile']['areas']['pmprefs'] = '' . $txt['pmprefs'] . ''; + $context['profile_areas']['edit_profile']['areas']['map'] = '' . $txt['googleMap'] . ''; + } + } + + // If you have permission to do something with this profile, you'll see one or more actions. + if (($context['user']['is_owner'] && allowedTo('profile_remove_own')) || allowedTo('profile_remove_any') || (!$context['user']['is_owner'] && allowedTo('pm_send'))) + { + // Initialize the action menu group. + $context['profile_areas']['profile_action'] = array( + 'title' => $txt['profileAction'], + 'areas' => array() + ); + + // You shouldn't PM (or ban really..) yourself!! (only administrators see this because it's not in the menu.) + if (!$context['user']['is_owner'] && allowedTo('pm_send')) + $context['profile_areas']['profile_action']['areas']['send_pm'] = '' . $txt['profileSendIm'] . ''; + if (allowedTo('manage_bans')) + $context['profile_areas']['profile_action']['areas']['banUser'] = '' . $txt['profileBanUser'] . ''; + + // You may remove your own account 'cuz it's yours or you're an admin. + if (($context['user']['is_owner'] && allowedTo('profile_remove_own')) || allowedTo('profile_remove_any')) + $context['profile_areas']['profile_action']['areas']['deleteAccount'] = '' . $txt['deleteAccount'] . ''; + } + + // This is here so the menu won't be shown unless it's actually needed. + if (!isset($context['profile_areas']['info']['areas']['trackUser']) && !isset($context['profile_areas']['info']['areas']['showPermissions']) && !isset($context['profile_areas']['edit_profile']) && !isset($context['profile_areas']['profile_action']['areas']['banUser']) && !isset($context['profile_areas']['profile_action']['areas']['deleteAccount'])) + $context['profile_areas'] = array(); + + // Set the selected items. + $context['menu_item_selected'] = $_REQUEST['sa']; + $context['sub_template'] = $_REQUEST['sa']; + + // All the subactions that require a user password in order to validate. + $context['require_password'] = in_array($context['menu_item_selected'], array('account')); + + // If this is an administrative action, load ManageMembers.php for it! + if (in_array($_REQUEST['sa'], array('trackUser', 'trackIP', 'showPermissions'))) + require_once($sourcedir . '/ManageMembers.php'); + + // Call the appropriate subaction function. + $_REQUEST['sa']($memID); + + if (!empty($post_errors)) + { + // Set all the errors so the template knows what went wrong. + foreach ($post_errors as $error_type) + $context['modify_error'][$error_type] = true; + rememberPostData(); + } + + // Set the page title if it's not already set... + if (!isset($context['page_title'])) + $context['page_title'] = $txt[79] . ' - ' . $txt[$_REQUEST['sa']]; +} + +// Execute the modifications! +function ModifyProfile2() +{ + global $txt, $modSettings; + global $cookiename, $context; + global $sourcedir, $scripturl, $db_prefix; + global $ID_MEMBER, $user_info; + global $context, $newpassemail, $user_profile, $validationCode; + + loadLanguage('Profile'); + + /* Set allowed sub-actions. + + The format of $sa_allowed is as follows: + + $sa_allowed = array( + 'sub-action' => array(permission_array_for_editing_OWN_profile, permission_array_for_editing_ANY_profile, session_validation_method[, require_password]), + ... + ); + + */ + + $sa_allowed = array( + 'account' => array(array('manage_membergroups', 'profile_identity_any', 'profile_identity_own'), array('manage_membergroups', 'profile_identity_any'), 'post', true), + 'forumProfile' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any'), 'post'), + 'map' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any'), 'post'), + 'theme' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any'), 'post'), + 'notification' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any'), 'post'), + 'pmprefs' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any'), 'post'), + 'deleteAccount' => array(array('profile_remove_any', 'profile_remove_own'), array('profile_remove_any'), 'post', true), + 'activateAccount' => array(array(), array('moderate_forum'), 'get'), + ); + + // Is the current sub-action allowed? + if (empty($_REQUEST['sa']) || !isset($sa_allowed[$_REQUEST['sa']])) + fatal_error($txt[453]); + + checkSession($sa_allowed[$_REQUEST['sa']][2]); + + // Start with no updates and no errors. + $profile_vars = array(); + $post_errors = array(); + + // Normally, don't send an email. + $newpassemail = false; + + // Clean up the POST variables. + $_POST = htmltrim__recursive($_POST); + $_POST = stripslashes__recursive($_POST); + $_POST = htmlspecialchars__recursive($_POST); + $_POST = addslashes__recursive($_POST); + + // Search for the member being edited and put the information in $user_profile. + $memberResult = loadMemberData((int) $_REQUEST['userID'], false, 'profile'); + + if (!is_array($memberResult)) + fatal_error($txt[453], false); + + list ($memID) = $memberResult; + + // Are you modifying your own, or someone else's? + if ($ID_MEMBER == $memID) + $context['user']['is_owner'] = true; + else + { + $context['user']['is_owner'] = false; + validateSession(); + } + + // Check profile editing permissions. + isAllowedTo($sa_allowed[$_REQUEST['sa']][$context['user']['is_owner'] ? 0 : 1]); + + // If this is yours, check the password. + if ($context['user']['is_owner'] && !empty($sa_allowed[$_REQUEST['sa']][3])) + { + // You didn't even enter a password! + if (!trim($_POST['oldpasswrd'])) + $post_errors[] = 'no_password'; + + // Bad password!!! + if ($user_info['passwd'] != md5_hmac($_POST['oldpasswrd'], strtolower($user_profile[$memID]['memberName']))) + $post_errors[] = 'bad_password'; + } + + // No need for the sub action array. + unset($sa_allowed); + + // If the user is an admin - see if they are resetting someones username. + if ($user_info['is_admin'] && isset($_POST['memberName'])) + { + // We'll need this... + require_once($sourcedir . '/Subs-Auth.php'); + + // Do the reset... this will send them an email too. + resetPassword($memID, $_POST['memberName']); + } + + // Change the IP address in the database. + if ($context['user']['is_owner']) + $profile_vars['memberIP'] = "'$user_info[ip]'"; + + // Now call the sub-action function... + if (isset($_POST['sa']) && $_POST['sa'] == 'deleteAccount') + { + deleteAccount2($profile_vars, $post_errors, $memID); + + if (empty($post_errors)) + redirectexit(); + } + else + saveProfileChanges($profile_vars, $post_errors, $memID); + + // There was a problem, let them try to re-enter. + if (!empty($post_errors)) + { + $_REQUEST['sa'] = $_POST['sa']; + $_REQUEST['u'] = $memID; + return ModifyProfile($post_errors); + } + + if (!empty($profile_vars)) + updateMemberData($memID, $profile_vars); + + // What if this is the newest member? + updateStats('member'); + + // If the member changed his/her birthdate, update calendar statistics. + if (isset($profile_vars['birthdate']) || isset($profile_vars['realName'])) + updateStats('calendar'); + + // Send an email? + if ($newpassemail) + { + require_once($sourcedir . '/Subs-Post.php'); + + // Send off the email. + sendmail($_POST['emailAddress'], $txt['activate_reactivate_title'] . ' ' . $context['forum_name'], + "$txt[activate_reactivate_mail]\n\n" . + "$scripturl?action=activate;u=$memID;code=$validationCode\n\n" . + "$txt[activate_code]: $validationCode\n\n" . + $txt[130]); + + // Log the user out. + db_query(" + DELETE FROM {$db_prefix}log_online + WHERE ID_MEMBER = $memID", __FILE__, __LINE__); + $_SESSION['log_time'] = 0; + $_SESSION['login_' . $cookiename] = serialize(array(0, '', 0)); + + if (isset($_COOKIE[$cookiename])) + $_COOKIE[$cookiename] = ''; + + loadUserSettings(); + + $context['user']['is_logged'] = false; + $context['user']['is_guest'] = true; + + // Send them to the done-with-registration-login screen. + loadTemplate('Register'); + $context += array( + 'page_title' => &$txt[79], + 'sub_template' => 'after', + 'description' => &$txt['activate_changed_email'] + ); + return; + } + elseif ($context['user']['is_owner']) + { + // Log them back in. + if (isset($_POST['passwrd1']) && $_POST['passwrd1'] != '') + { + require_once($sourcedir . '/Subs-Auth.php'); + + $password = md5_hmac($_POST['passwrd1'], strtolower($user_profile[$memID]['memberName'])); + setLoginCookie(60 * $modSettings['cookieTime'], $memID, $password); + } + + loadUserSettings(); + writeLog(); + } + + // Back to same subaction page.. + redirectexit('action=profile;u=' . $memID . ';sa=' . $_REQUEST['sa'], true, $context['server']['needs_login_fix']); +} + +// Save the profile changes.... +function saveProfileChanges(&$profile_vars, &$post_errors, $memID) +{ + global $db_prefix, $user_info, $txt, $modSettings, $user_profile, $newpassemail, $validationCode, $context, $sourcedir, $language_dir; + + // These make life easier.... + $old_profile = &$user_profile[$memID]; + + // Permissions... + if ($context['user']['is_owner']) + { + $changeIdentity = allowedTo(array('profile_identity_any', 'profile_identity_own')); + $changeOther = allowedTo(array('profile_extra_any', 'profile_extra_own')); + } + else + { + $changeIdentity = allowedTo('profile_identity_any'); + $changeOther = allowedTo('profile_extra_any'); + } + + // Arrays of all the changes - makes things easier. + $profile_bools = array( + 'im_email_notify', + 'notifyAnnouncements', 'notifyOnce', + ); + $profile_ints = array( + 'ICQ', + 'gender', + 'ID_THEME', + ); + $profile_floats = array( + 'timeOffset', + ); + $profile_strings = array( + 'websiteUrl', 'websiteTitle', + 'MSN', 'AIM', 'YIM', + 'location', 'birthdate', + 'timeFormat', + 'im_ignore_list', + 'smileySet', + 'signature', 'personalText', 'avatar', + ); + + // Fix the spaces in messenger screennames... + $fix_spaces = array('MSN', 'AIM', 'YIM'); + foreach ($fix_spaces as $var) + { + if (isset($_POST[$var])) + $_POST[$var] = strtr($_POST[$var], ' ', '+'); + } + + if (isset($_POST['latitude'])) + $profile_vars['latitude'] = $_POST['latitude'] != '' ? $_POST['latitude'] : 'NULL'; + if (isset($_POST['longitude'])) + $profile_vars['longitude'] = $_POST['longitude'] != '' ? $_POST['longitude'] : 'NULL'; + + // Validate the title... + if (!empty($modSettings['titlesEnable']) && (allowedTo('profile_title_any') || (allowedTo('profile_title_own') && $context['user']['is_owner']))) + $profile_strings[] = 'usertitle'; + + // Validate the timeOffset... + if (isset($_POST['timeOffset'])) + { + $_POST['timeOffset'] = strtr($_POST['timeOffset'], ',', '.'); + + if ($_POST['timeOffset'] < -23.5 || $_POST['timeOffset'] > 23.5) + $post_errors[] = 'bad_offset'; + } + + // Fix the URL... + if (isset($_POST['websiteUrl'])) + { + if (mb_strlen(trim($_POST['websiteUrl'])) > 0 && mb_strpos($_POST['websiteUrl'], '://') === false) + $_POST['websiteUrl'] = 'http://' . $_POST['websiteUrl']; + if (mb_strlen($_POST['websiteUrl']) < 8) + $_POST['websiteUrl'] = ''; + } + + if (isset($_POST['birthdate'])) + { + if (preg_match('/(\d{4})[\-\., ](\d{2})[\-\., ](\d{2})/', $_POST['birthdate'], $dates) == 1) + $_POST['birthdate'] = sprintf('%04d-%02d-%02d', $dates[1], $dates[2], $dates[3]); + else + unset($_POST['birthdate']); + } + elseif (!empty($_POST['bday1']) && !empty($_POST['bday2'])) + $_POST['birthdate'] = sprintf('%04d-%02d-%02d', empty($_POST['bday3']) ? 0 : (int) $_POST['bday3'], (int) $_POST['bday1'], (int) $_POST['bday2']); + elseif (isset($_POST['bday1']) || isset($_POST['bday2']) || isset($_POST['bday3'])) + $_POST['birthdate'] = '0000-00-00'; + + // Validate and set the ignorelist... + if (isset($_POST['im_ignore_list'])) + { + $_POST['im_ignore_list'] = strtr(trim($_POST['im_ignore_list']), array("\n" => "', '", "\r" => '', '"' => '')); + + if (preg_match('~(\A|,)\*(\Z|,)~s', $_POST['im_ignore_list']) == 0) + { + $result = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE memberName IN ('$_POST[im_ignore_list]') + LIMIT " . (substr_count($_POST['im_ignore_list'], ',') + 1), __FILE__, __LINE__); + $_POST['im_ignore_list'] = ''; + while ($row = mysql_fetch_assoc($result)) + $_POST['im_ignore_list'] .= $row['ID_MEMBER'] . ','; + mysql_free_result($result); + + $_POST['im_ignore_list'] = mb_substr($_POST['im_ignore_list'], 0, -1); + } + else + $_POST['im_ignore_list'] = '*'; + } + + // Validate the smiley set. + if (isset($_POST['smileySet'])) + { + $smiley_sets = explode(',', $modSettings['smiley_sets_known']); + if (!in_array($_POST['smileySet'], $smiley_sets) && $_POST['smileySet'] != 'none') + unset($_POST['smileySet']); + } + + // Make sure the signature isn't too long. + if (isset($_POST['signature'])) + { + require_once($sourcedir . '/Subs-Post.php'); + + $unparsed_signature = strtr(un_htmlspecialchars($_POST['signature']), array("\r" => '')); + if (!empty($modSettings['max_signatureLength']) && mb_strlen($unparsed_signature) > $modSettings['max_signatureLength']) + $_POST['signature'] = htmlspecialchars(mb_substr($unparsed_signature, 0, $modSettings['max_signatureLength']), ENT_QUOTES); + preparsecode($_POST['signature']); + + } + + // Identity-only changes... + if ($changeIdentity) + { + // This block is only concerned with display name validation. + if (isset($_POST['realName']) && (!empty($modSettings['allow_editDisplayName']) || allowedTo('moderate_forum')) && trim($_POST['realName']) != $old_profile['realName']) + { + $_POST['realName'] = trim(preg_replace('/[\s]/', ' ', $_POST['realName'])); + if (trim($_POST['realName']) == '') + $post_errors[] = 'no_name'; + elseif (isReservedName($_POST['realName'], $memID)) + $post_errors[] = 'name_taken'; + + if (isset($_POST['realName'])) + $profile_vars['realName'] = '\'' . $_POST['realName'] . '\''; + } + + // Change the registration date. + if (!empty($_POST['dateRegistered']) && allowedTo('moderate_forum')) + { + // Bad date! Go try again - please? + if (($_POST['dateRegistered'] = strtotime($_POST['dateRegistered'])) === -1) + fatal_error($txt['smf233'] . ' ' . strftime('%d %b %Y ' . (strpos($user_info['time_format'], '%H') !== false ? '%I:%M:%S %p' : '%H:%M:%S'), forum_time(false)), false); + // As long as it doesn't equal 'N/A'... + elseif ($_POST['dateRegistered'] != $txt[470] && $_POST['dateRegistered'] != strtotime(strftime('%Y-%m-%d', $user_profile[$memID]['dateRegistered'] + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600))) + $profile_vars['dateRegistered'] = $_POST['dateRegistered'] - ($user_info['time_offset'] + $modSettings['time_offset']) * 3600; + } + + // Change the number of posts. + if (isset($_POST['posts']) && allowedTo('moderate_forum')) + $profile_vars['posts'] = $_POST['posts'] != '' ? (int) $_POST['posts'] : '\'\''; + + // Validate the language file... + if (isset($_POST['lngfile']) && !empty($modSettings['userLanguage'])) + { + $dir = dir($language_dir); + while ($entry = $dir->read()) + if (substr($entry, 0, 6) == 'index.' && strlen($entry) > 10 && substr($entry, 6, -4) == $_POST['lngfile']) + { + $profile_vars['lngfile'] = "'$_POST[lngfile]'"; + + // If they are the owner, make this persist even after they log out. + if ($context['user']['is_owner']) + $_SESSION['language'] = $_POST['lngfile']; + } + $dir->close(); + } + + // This block is only concerned with email address validation.. + if (isset($_POST['emailAddress']) && strtolower($_POST['emailAddress']) != strtolower($old_profile['emailAddress'])) + { + $_POST['emailAddress'] = strtr($_POST['emailAddress'], array(''' => '\\\'')); + + // Prepare the new password, or check if they want to change their own. + if (!empty($modSettings['send_validation_onChange']) && !allowedTo('moderate_forum')) + { + $validationCode = substr(preg_replace('/\W/', '', md5(rand())), 0, 10); + $profile_vars['validation_code'] = '\'' . $validationCode . '\''; + $profile_vars['is_activated'] = '0'; + $newpassemail = true; + } + + // Check the name and email for validity. + if (trim($_POST['emailAddress']) == '') + $post_errors[] = 'no_email'; + if (preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]+@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', stripslashes($_POST['emailAddress'])) == 0) + $post_errors[] = 'bad_email'; + + // Email addresses should be and stay unique. + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE ID_MEMBER != $memID + AND emailAddress = '$_POST[emailAddress]' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + $post_errors[] = 'email_taken'; + mysql_free_result($request); + + $profile_vars['emailAddress'] = '\'' . $_POST['emailAddress'] . '\''; + } + + // Hide email address? + if (isset($_POST['hideEmail']) && (!empty($modSettings['allow_hideEmail']) || allowedTo('moderate_forum'))) + $profile_vars['hideEmail'] = empty($_POST['hideEmail']) ? '0' : '1'; + + // Are they allowed to change their hide status? + if (isset($_POST['showOnline']) && (!empty($modSettings['allow_hideOnline']) || allowedTo('moderate_forum'))) + $profile_vars['showOnline'] = empty($_POST['showOnline']) ? '0' : '1'; + + // Uhhh.... you better make sure you know what you're changing it to... + if (isset($_POST['passwrd1']) && $_POST['passwrd1'] != $_POST['passwrd2']) + $post_errors[] = 'bad_new_password'; + + // If they are set, they want to change the password. + if (isset($_POST['passwrd1']) && $_POST['passwrd1'] != '') + $profile_vars['passwd'] = '\'' . md5_hmac(addslashes(un_htmlspecialchars(stripslashes($_POST['passwrd1']))), strtolower($old_profile['memberName'])) . '\''; + + if (isset($_POST['secretQuestion'])) + $profile_vars['secretQuestion'] = '\'' . $_POST['secretQuestion'] . '\''; + + // Do you have a *secret* password? + if (isset($_POST['secretAnswer']) && $_POST['secretAnswer'] != '') + $profile_vars['secretAnswer'] = '\'' . md5($_POST['secretAnswer']) . '\''; + } + + // Things they can do if they are a forum moderator. + if (allowedTo('moderate_forum')) + { + if ($_REQUEST['sa'] == 'activateAccount' || !empty($_POST['is_activated'])) + $profile_vars['is_activated'] = '1'; + + if (isset($_POST['karmaGood'])) + $profile_vars['karmaGood'] = $_POST['karmaGood'] != '' ? (int) $_POST['karmaGood'] : '\'\''; + if (isset($_POST['karmaBad'])) + $profile_vars['karmaBad'] = $_POST['karmaBad'] != '' ? (int) $_POST['karmaBad'] : '\'\''; + } + + // Assigning membergroups (you need admin_forum permissions to change an admins' membergroups). + if (allowedTo('manage_membergroups')) + { + // The account page allows the change of your ID_GROUP - but not to admin!. + if (isset($_POST['ID_GROUP']) && (allowedTo('admin_forum') || ((int) $_POST['ID_GROUP'] != 1 && $old_profile['ID_GROUP'] != 1))) + $profile_vars['ID_GROUP'] = (int) $_POST['ID_GROUP']; + + // Find the additional membergroups (if any) + if (isset($_POST['additionalGroups']) && is_array($_POST['additionalGroups'])) + { + foreach ($_POST['additionalGroups'] as $i => $group_id) + { + if ((int) $group_id == 0 || (!allowedTo('admin_forum') && (int) $group_id == 1)) + unset($_POST['additionalGroups'][$i], $_POST['additionalGroups'][$i]); + else + $_POST['additionalGroups'][$i] = (int) $group_id; + } + + // Put admin back in there if you don't have permission to take it away. + if (!allowedTo('admin_forum') && in_array(1, explode(',', $old_profile['additionalGroups']))) + $_POST['additionalGroups'][] = 1; + + $profile_vars['additionalGroups'] = '\'' . implode(',', $_POST['additionalGroups']) . '\''; + } + } + + // Here's where we sort out all the 'other' values... + if ($changeOther) + { + makeThemeChanges($memID, isset($_POST['ID_THEME']) ? (int) $_POST['ID_THEME'] : $old_profile['ID_THEME']); + makeAvatarChanges($memID, $post_errors); + makeNotificationChanges($memID); + + // Validate the language file... + if (isset($_POST['lngfile']) && !empty($modSettings['userLanguage'])) + { + $dir = dir($language_dir); + while ($entry = $dir->read()) + if (substr($entry, 0, 6) == 'index.' && substr($entry, -4) == '.php' && strlen($entry) > 10 && substr($entry, 6, -4) == $_POST['lngfile']) + { + $profile_vars['lngfile'] = "'$_POST[lngfile]'"; + + // If they are the owner, make this persist even after they log out. + if ($context['user']['is_owner']) + $_SESSION['language'] = $_POST['lngfile']; + } + $dir->close(); + } + + foreach ($profile_bools as $var) + if (isset($_POST[$var])) + $profile_vars[$var] = empty($_POST[$var]) ? '0' : '1'; + foreach ($profile_ints as $var) + if (isset($_POST[$var])) + $profile_vars[$var] = $_POST[$var] != '' ? (int) $_POST[$var] : '\'\''; + foreach ($profile_floats as $var) + if (isset($_POST[$var])) + $profile_vars[$var] = (float) $_POST[$var]; + foreach ($profile_strings as $var) + if (isset($_POST[$var])) + $profile_vars[$var] = '\'' . $_POST[$var] . '\''; + } + + if (isset($profile_vars['ICQ']) && $profile_vars['ICQ'] == '0') + $profile_vars['ICQ'] = '\'\''; +} + +// Make any theme changes that are sent with the profile.. +function makeThemeChanges($memID, $ID_THEME) +{ + global $db_prefix; + + // These are the theme changes... + $themeSetArray = array(); + if (isset($_POST['options']) && is_array($_POST['options'])) + { + foreach ($_POST['options'] as $opt => $val) + $themeSetArray[] = '(' . $memID . ', ' . $ID_THEME . ", '" . addslashes($opt) . "', '" . (is_array($val) ? implode(',', $val) : $val) . "')"; + } + + $erase_options = array(); + if (isset($_POST['default_options']) && is_array($_POST['default_options'])) + foreach ($_POST['default_options'] as $opt => $val) + { + $themeSetArray[] = "($memID, 1, '" . addslashes($opt) . "', '" . (is_array($val) ? implode(',', $val) : $val) . "')"; + $erase_options[] = addslashes($opt); + } + + // If themeSetArray isn't still empty, send it to the database. + if (!empty($themeSetArray)) + { + db_query(" + REPLACE INTO {$db_prefix}themes + (ID_MEMBER, ID_THEME, variable, value) + VALUES " . implode(", + ", $themeSetArray), __FILE__, __LINE__); + } + + if (!empty($erase_options)) + { + db_query(" + DELETE FROM {$db_prefix}themes + WHERE ID_THEME != 1 + AND variable IN ('" . implode("', '", $erase_options) . "') + AND ID_MEMBER = $memID", __FILE__, __LINE__); + } +} + +// Make any notification changes that need to be made. +function makeNotificationChanges($memID) +{ + global $db_prefix; + + // Update the boards they are being notified on. + if (isset($_POST['edit_notify_boards']) && !empty($_POST['notify_boards'])) + { + // Make sure only integers are deleted. + foreach ($_POST['notify_boards'] as $index => $id) + $_POST['notify_boards'][$index] = (int) $id; + + // ID_BOARD = 0 is reserved for topic notifications. + $_POST['notify_boards'] = array_diff($_POST['notify_boards'], array(0)); + + db_query(" + DELETE FROM {$db_prefix}log_notify + WHERE ID_BOARD IN (" . implode(', ', $_POST['notify_boards']) . ") + AND ID_MEMBER = $memID", __FILE__, __LINE__); + } + + // We are editing topic notifications...... + elseif (isset($_POST['edit_notify_topics']) && !empty($_POST['notify_topics'])) + { + foreach ($_POST['notify_topics'] as $index => $id) + $_POST['notify_topics'][$index] = (int) $id; + + // Make sure there are no zeros left. + $_POST['notify_topics'] = array_diff($_POST['notify_topics'], array(0)); + + db_query(" + DELETE FROM {$db_prefix}log_notify + WHERE ID_TOPIC IN (" . implode(', ', $_POST['notify_topics']) . ") + AND ID_MEMBER = $memID", __FILE__, __LINE__); + } +} + +// The avatar is incredibly complicated, what with the options... and what not. +function makeAvatarChanges($memID, &$post_errors) +{ + global $modSettings, $sourcedir, $db_prefix; + + if (!isset($_POST['avatar_choice'])) + return; + + require_once($sourcedir . '/ManageAttachments.php'); + + if ($_POST['avatar_choice'] == 'server_stored' && !empty($modSettings['avatar_allow_server_stored'])) + { + $_POST['avatar'] = strtr(empty($_POST['file']) ? (empty($_POST['cat']) ? '' : $_POST['cat']) : $_POST['file'], array('&' => '&')); + $_POST['avatar'] = preg_match('~^([\w _!@%*=\-#()\[\]&.,]+/)?[\w _!@%*=\-#()\[\]&.,]+$~', $_POST['avatar']) != 0 && preg_match('/\.\./', $_POST['avatar']) == 0 && file_exists($modSettings['avatar_directory'] . '/' . $_POST['avatar']) ? ($_POST['avatar'] == 'blank.gif' ? '' : $_POST['avatar']) : ''; + + // Get rid of their old avatar. (if uploaded.) + removeAttachments('a.ID_MEMBER = ' . $memID); + } + elseif ($_POST['avatar_choice'] == 'external' && !empty($modSettings['avatar_allow_external_url']) && allowedTo('profile_remote_avatar') && strtolower(substr($_POST['userpicpersonal'], 0, 7)) == 'http://') + { + // Remove any attached avatar... + removeAttachments('a.ID_MEMBER = ' . $memID); + + $_POST['avatar'] = preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $_POST['userpicpersonal']); + + if ($_POST['avatar'] == 'http://' || $_POST['avatar'] == 'http:///') + $_POST['avatar'] = ''; + // Should we check dimensions? + elseif (!empty($modSettings['avatar_max_height_external']) || !empty($modSettings['avatar_max_width_external'])) + { + // Now let's validate the avatar... + $sizes = url_image_size($_POST['avatar']); + + if (is_array($sizes) && (($sizes[0] > $modSettings['avatar_max_width_external'] && !empty($modSettings['avatar_max_width_external'])) || ($sizes[1] > $modSettings['avatar_max_height_external'] && !empty($modSettings['avatar_max_height_external'])))) + { + // Houston, we have a problem. The avatar is too large!! + if ($modSettings['avatar_action_too_large'] == 'option_refuse') + $post_errors[] = 'bad_avatar'; + elseif ($modSettings['avatar_action_too_large'] == 'option_download_and_resize') + { + require_once($sourcedir . '/Subs-Graphics.php'); + if (downloadAvatar($_POST['avatar'], $memID, $modSettings['avatar_max_width_external'], $modSettings['avatar_max_height_external'])) + $_POST['avatar'] = ''; + else + $post_errors[] = 'bad_avatar'; + } + } + } + } + elseif ($_POST['avatar_choice'] == 'upload' && $modSettings['avatar_allow_upload']) + { + if (isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') + { + $sizes = @getimagesize($_FILES['attachment']['tmp_name']); + + if (is_array($sizes) && (($sizes[0] > $modSettings['avatar_max_width_upload'] && !empty($modSettings['avatar_max_width_upload'])) || ($sizes[1] > $modSettings['avatar_max_height_upload'] && !empty($modSettings['avatar_max_height_upload'])))) + { + if (!empty($modSettings['avatar_resize_upload'])) + { + if (!is_writable($modSettings['attachmentUploadDir'])) + fatal_lang_error('attachments_no_write'); + + if (!move_uploaded_file($_FILES['attachment']['tmp_name'], $modSettings['attachmentUploadDir'] . '/' . 'avatar_tmp_' . $memID)) + fatal_lang_error('smf124'); + + // Attempt to chmod it. + @chmod($modSettings['attachmentUploadDir'] . '/' . 'avatar_tmp_' . $memID, 0644); + + require_once($sourcedir . '/Subs-Graphics.php'); + downloadAvatar($modSettings['attachmentUploadDir'] . '/' . 'avatar_tmp_' . $memID, $memID, $modSettings['avatar_max_width_upload'], $modSettings['avatar_max_height_upload']); + @unlink($modSettings['attachmentUploadDir'] . '/' . 'avatar_tmp_' . $memID); + } + else + $post_errors[] = 'bad_avatar'; + } + elseif (is_array($sizes)) + { + $extensions = array( + '1' => '.gif', + '2' => '.jpg', + '3' => '.png', + '6' => '.bmp' + ); + $extension = isset($extensions[$sizes[2]]) ? $extensions[$sizes[2]] : '.bmp'; + + $destName = 'avatar_' . $memID . $extension; + + // Remove previous attachments this member might have had. + removeAttachments('a.ID_MEMBER = ' . $memID); + + if (!is_uploaded_file($_FILES['attachment']['tmp_name']) || !file_exists($_FILES['attachment']['tmp_name'])) + fatal_lang_error('smf124'); + + if (!is_writable($modSettings['attachmentUploadDir'])) + fatal_lang_error('attachments_no_write'); + + db_query(" + INSERT INTO {$db_prefix}attachments + (ID_MEMBER, filename, size) + VALUES ($memID, '$destName', " . filesize($_FILES['attachment']['tmp_name']) . ")", __FILE__, __LINE__); + $attachID = db_insert_id(); + $destName = $modSettings['attachmentUploadDir'] . '/' . $destName; + + if (!move_uploaded_file($_FILES['attachment']['tmp_name'], $destName)) + fatal_lang_error('smf124'); + + // Attempt to chmod it. + @chmod($destName, 0644); + } + $_POST['avatar'] = ''; + } + // Selected the upload avatar option and had one already uploaded before or didn't upload one. + else + $_POST['avatar'] = ''; + } + else + $_POST['avatar'] = ''; +} + +// View a summary. +function summary($memID) +{ + global $context, $themeUser, $txt, $modSettings, $user_info, $user_profile; + + global $ID_MEMBER; +// Attempt to load the member's profile data. + if (!loadMemberContext($memID) || !isset($themeUser[$memID])) + fatal_error($txt[453] . ' - ' . $memID, false); + + // Set up the stuff and load the user. + $context += array( + 'allow_hide_email' => !empty($modSettings['allow_hideEmail']), + 'page_title' => $txt[92] . ' ' . $themeUser[$memID]['username'], + 'member' => &$themeUser[$memID], + 'can_send_pm' => allowedTo('pm_send'), + ); + + //ID verification + $memID == $ID_MEMBER ? $context['owner'] = 1 : $context['owner'] = 0; + +// They haven't even been registered for a full day!? + $days_registered = (int) ((time() - $user_profile[$memID]['dateRegistered']) / (3600 * 24)); + if (empty($user_profile[$memID]['dateRegistered']) || $days_registered < 1) + $context['member']['posts_per_day'] = $txt[470]; + else + $context['member']['posts_per_day'] = number_format($context['member']['real_posts'] / $days_registered, 3); + + // Set the age... + if (empty($context['member']['birth_date'])) + { + $context['member'] += array( + 'age' => &$txt[470], + 'today_is_birthday' => false + ); + } + else + { + list ($birth_year, $birth_month, $birth_day) = sscanf($context['member']['birth_date'], '%d-%d-%d'); + $datearray = getdate(forum_time()); + $context['member'] += array( + 'age' => empty($birth_year) ? $txt[470] : $datearray['year'] - $birth_year - (($datearray['mon'] > $birth_month || ($datearray['mon'] == $birth_month && $datearray['mday'] >= $birth_day)) ? 0 : 1), + 'today_is_birthday' => $datearray['mon'] == $birth_month && $datearray['mday'] == $birth_day + ); + } + if (allowedTo('moderate_forum')) { + if (empty ($modSettings['disableHostnameLookup']) && preg_match('/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/', $themeUser[$memID]['ip'], $ip) ==1 ) { + $context['member']['hostname'] = @gethostbyaddr($themeUser[$memID]['ip']); + $dnsbl_query = "{$ip[4]}.{$ip[3]}.{$ip[2]}.{$ip[1]}.opm.tornevall.org"; + $context['member']['dnsbl_status'] = @gethostbyname($dnsbl_query); + if ($context['member']['dnsbl_status'] == $dnsbl_query) { + $context['member']['dnsbl_status'] = 'OK'; + } + } else { + $context['member']['hostname'] = ''; + $context['member']['dnsbl_status'] = ''; + } + } + +} + +// Show all posts by the current user +function showPosts($memID) +{ + global $txt, $user_info, $scripturl, $modSettings, $db_prefix; + global $context, $user_profile, $ID_MEMBER, $sourcedir; + + // If just deleting a message, do it and then redirect back. + if (isset($_GET['delete'])) + { + checkSession('get'); + + // We can be lazy, since removeMessage() will check the permissions for us. + require_once($sourcedir . '/RemoveTopic.php'); + removeMessage((int) $_GET['delete']); + + // Back to... where we are now ;). + redirectexit('action=profile;u=' . $memID . ';sa=showPosts;start=' . $_GET['start']); + } + + // Default to 10. + if (empty($_REQUEST['viewscount']) || !is_numeric($_REQUEST['viewscount'])) + $_REQUEST['viewscount'] = '10'; + + $request = db_query(" + SELECT COUNT(m.ID_MSG) + FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b + WHERE m.ID_MEMBER = $memID + AND b.ID_BOARD = m.ID_BOARD + AND $user_info[query_see_board]", __FILE__, __LINE__); + list ($msgCount) = mysql_fetch_row($request); + mysql_free_result($request); + + // View all the topics, or just a few? + $maxIndex = isset($_REQUEST['view']) && $_REQUEST['view'] == 'all' ? $msgCount : $modSettings['defaultMaxMessages']; + + // Make sure the starting place makes sense and construct our friend the page index. + $context['page_index'] = constructPageIndex($scripturl . '?action=profile;u=' . $memID . ';sa=showPosts', $_REQUEST['start'], $msgCount, $maxIndex); + $context['start'] = $_REQUEST['start']; + $context['current_page'] = $context['start'] / $maxIndex; + $context['current_member'] = $memID; + + $context['page_title'] = $txt[458] . ' ' . $user_profile[$memID]['realName']; + + // Find this user's posts. + $request = db_query(" + SELECT + t.numReplies, c.name as cname, b.name AS bname, b.ID_BOARD, m.body, c.ID_CAT, + m.smileysEnabled, m.subject, m.posterTime, m.ID_TOPIC, m.ID_MSG, m.nowPlaying, t.ID_MEMBER_STARTED, + t.ID_FIRST_MSG, t.ID_LAST_MSG + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}categories AS c, {$db_prefix}members AS mem + WHERE m.ID_MEMBER = $memID + AND m.ID_TOPIC = t.ID_TOPIC + AND t.ID_BOARD = b.ID_BOARD + AND b.ID_CAT = c.ID_CAT + AND $user_info[query_see_board] + AND mem.ID_MEMBER = m.ID_MEMBER + ORDER BY m.ID_MSG DESC + LIMIT $_REQUEST[start], $maxIndex", __FILE__, __LINE__); + // Start counting at the number of the first message displayed. + $counter = $_REQUEST['start']; + $context['posts'] = array(); + $board_ids = array('own' => array(), 'any' => array()); + while ($row = mysql_fetch_assoc($request)) + { + // Censor.... + censorText($row['body']); + censorText($row['subject']); + + // Do the code. + $row['body'] = doUBBC($row['body'], $row['smileysEnabled']); + + // And the array... + $context['posts'][++$counter] = array( + 'body' => $row['body'], + 'counter' => $counter, + 'category' => array( + 'name' => $row['cname'], + 'id' => $row['ID_CAT'] + ), + 'board' => array( + 'name' => $row['bname'], + 'id' => $row['ID_BOARD'] + ), + 'topic' => $row['ID_TOPIC'], + 'subject' => $row['subject'], + 'start' => 'msg' . $row['ID_MSG'], + 'time' => timeformat($row['posterTime']), + 'timestamp' => $row['posterTime'], + 'id' => $row['ID_MSG'], + + 'nowplaying' => $row['nowPlaying'], + 'can_reply' => false, + 'can_mark_notify' => false, + 'can_delete' => false, + 'delete_possible' => $row['ID_FIRST_MSG'] != $row['ID_MSG'] || $row['ID_LAST_MSG'] == $row['ID_MSG'] + ); + + if ($ID_MEMBER == $row['ID_MEMBER_STARTED']) + $board_ids['own'][$row['ID_BOARD']][] = $counter; + $board_ids['any'][$row['ID_BOARD']][] = $counter; + } + mysql_free_result($request); + + // These are all the permissions that are different from board to board.. + $permissions = array( + 'own' => array( + 'post_reply_own' => 'can_reply', + 'remove_own' => 'can_delete', + ), + 'any' => array( + 'post_reply_any' => 'can_reply', + 'mark_any_notify' => 'can_mark_notify', + 'remove_any' => 'can_delete', + ) + ); + + // For every permission in the own/any lists... + foreach ($permissions as $type => $list) + foreach ($list as $permission => $allowed) + { + // Get the boards they can do this on... + $boards = boardsAllowedTo($permission); + + // Hmm, they can do it on all boards, can they? + if (!empty($boards) && $boards[0] == 0) + $boards = array_keys($board_ids[$type]); + + // Now go through each board they can do the permission on. + foreach ($boards as $board_id) + { + // There aren't any posts displayed from this board. + if (!isset($board_ids[$type][$board_id])) + continue; + + // Set the permission to true ;). + foreach ($board_ids[$type][$board_id] as $counter) + $context['posts'][$counter][$allowed] = true; + } + } + + // Clean up after posts that cannot be deleted. + foreach ($context['posts'] as $counter => $dummy) + $context['posts'][$counter]['can_delete'] &= $context['posts'][$counter]['delete_possible']; +} + +function statPanel($memID) +{ + global $txt, $scripturl, $db_prefix, $context, $user_profile, $user_info, $modSettings; + + $context['page_title'] = $txt['statPanel_showStats'] . ' ' . $user_profile[$memID]['realName']; + + // General user statistics. + $timeDays = floor($user_profile[$memID]['totalTimeLoggedIn'] / 86400); + $timeHours = floor(($user_profile[$memID]['totalTimeLoggedIn'] % 86400) / 3600); + $context['time_logged_in'] = ($timeDays > 0 ? $timeDays . $txt['totalTimeLogged2'] : '') . ($timeHours > 0 ? $timeHours . $txt['totalTimeLogged3'] : '') . floor(($user_profile[$memID]['totalTimeLoggedIn'] % 3600) / 60) . $txt['totalTimeLogged4']; + $context['num_posts'] = comma_format($user_profile[$memID]['posts']); + + // Number of topics started. + $result = db_query(" + SELECT COUNT(ID_TOPIC) + FROM {$db_prefix}topics + WHERE ID_MEMBER_STARTED = $memID" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " + AND ID_BOARD != $modSettings[recycle_board]" : ''), __FILE__, __LINE__); + list ($context['num_topics']) = mysql_fetch_row($result); + mysql_free_result($result); + + // Number polls started. + $result = db_query(" + SELECT COUNT(ID_POLL) + FROM {$db_prefix}topics + WHERE ID_MEMBER_STARTED = $memID" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " + AND ID_BOARD != $modSettings[recycle_board]" : '') . " + AND ID_POLL != 0", __FILE__, __LINE__); + list ($context['num_polls']) = mysql_fetch_row($result); + mysql_free_result($result); + + // Number polls voted in. + $result = db_query(" + SELECT COUNT(DISTINCT ID_POLL) + FROM {$db_prefix}log_polls + WHERE ID_MEMBER = $memID", __FILE__, __LINE__); + list ($context['num_votes']) = mysql_fetch_row($result); + mysql_free_result($result); + + // Format the numbers... + $context['num_topics'] = comma_format($context['num_topics']); + $context['num_polls'] = comma_format($context['num_polls']); + $context['num_votes'] = comma_format($context['num_votes']); + + // Most popular boards by posts / activity. + $result = db_query(" + SELECT b.ID_BOARD, b.name, COUNT(m.ID_MSG) AS messageCount, b.numPosts + FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b, {$db_prefix}topics AS t + WHERE m.ID_MEMBER = $memID + AND b.ID_BOARD = t.ID_BOARD + AND t.ID_TOPIC = m.ID_TOPIC + AND $user_info[query_see_board] + GROUP BY b.ID_BOARD + ORDER BY messageCount DESC + LIMIT 10", __FILE__, __LINE__); + $context['popular_boards'] = array(); + $context['board_activity'] = array(); + $maxPosts = 0; + while ($row = mysql_fetch_assoc($result)) + { + if ($row['messageCount'] > $maxPosts) + $maxPosts = $row['messageCount']; + + $context['popular_boards'][$row['ID_BOARD']] = array( + 'id' => $row['ID_BOARD'], + 'posts' => $row['messageCount'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['name'] . '', + 'posts_percent' => 0, + ); + + // This should be quicker as it's an easier sort. + $context['board_activity'][$row['ID_BOARD']] = $row['numPosts'] != 0 ? number_format(($row['messageCount'] * 100) / $row['numPosts'], 2) : 0; + } + mysql_free_result($result); + + // Sort the boards out... + arsort($context['board_activity']); + + foreach ($context['board_activity'] as $ID_BOARD => $dummy) + { + $context['board_activity'][$ID_BOARD] = array( + 'id' => $ID_BOARD, + 'href' => $context['popular_boards'][$ID_BOARD]['href'], + 'link' => $context['popular_boards'][$ID_BOARD]['link'], + 'percent' => $dummy + ); + + if ($maxPosts > 0) + $context['popular_boards'][$ID_BOARD]['posts_percent'] = round(($context['popular_boards'][$ID_BOARD]['posts'] * 100) / $maxPosts, 2); + } + + // Posting activity by time. + $result = db_query(" + SELECT + HOUR(FROM_UNIXTIME(posterTime + " . (($user_info['time_offset'] + $modSettings['time_offset']) * 3600) . ")) AS hour, + COUNT(ID_MSG) AS postCount + FROM {$db_prefix}messages + WHERE ID_MEMBER = $memID + GROUP BY hour", __FILE__, __LINE__); + $maxPosts = 0; + $context['posts_by_time'] = array(); + while ($row = mysql_fetch_assoc($result)) + { + if ($row['postCount'] > $maxPosts) + $maxPosts = $row['postCount']; + + $context['posts_by_time'][$row['hour']] = array( + 'hour' => $row['hour'], + 'posts_percent' => $row['postCount'] + ); + } + mysql_free_result($result); + + if ($maxPosts > 0) + for ($hour = 0; $hour < 24; $hour++) + { + if (!isset($context['posts_by_time'][$hour])) + $context['posts_by_time'][$hour] = array( + 'hour' => $hour, + 'posts_percent' => 0, + ); + else + $context['posts_by_time'][$hour]['posts_percent'] = round(($context['posts_by_time'][$hour]['posts_percent'] * 100) / $maxPosts); + } + + // Put it in the right order. + ksort($context['posts_by_time']); +} + +function account($memID) +{ + global $context, $user_profile, $txt, $db_prefix; + global $scripturl, $membergroups, $modSettings, $language_dir; + global $language, $user_info; + + // Allow an administrator to edit the username? + $context['allow_edit_username'] = isset($_GET['changeusername']) && allowedTo('admin_forum'); + + // You might be allowed to only assign the membergroups, so let's check. + $context['allow_edit_membergroups'] = allowedTo('manage_membergroups'); + $context['allow_edit_account'] = ($context['user']['is_owner'] && allowedTo('profile_identity_own')) || allowedTo('profile_identity_any'); + + // How about their email address... online status, and name? + $context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']) || allowedTo('moderate_forum'); + $context['allow_hide_online'] = !empty($modSettings['allow_hideOnline']) || allowedTo('moderate_forum'); + $context['allow_edit_name'] = !empty($modSettings['allow_editDisplayName']) || allowedTo('moderate_forum'); + + // Load up the existing contextual data. + $context['member'] = array( + 'id' => $memID, + 'username' => $user_profile[$memID]['memberName'], + 'name' => !isset($user_profile[$memID]['realName']) || $user_profile[$memID]['realName'] == '' ? '' : $user_profile[$memID]['realName'], + 'email' => $user_profile[$memID]['emailAddress'], + 'posts' => empty($user_profile[$memID]['posts']) ? 0: (int) $user_profile[$memID]['posts'], + 'hide_email' => empty($user_profile[$memID]['hideEmail']) ? 0 : $user_profile[$memID]['hideEmail'], + 'show_online' => empty($user_profile[$memID]['showOnline']) ? 0 : $user_profile[$memID]['showOnline'], + 'secret_question' => !isset($user_profile[$memID]['secretQuestion']) ? '' : $user_profile[$memID]['secretQuestion'], + 'is_admin' => !empty($user_profile[$memID]['ID_GROUP']) && $user_profile[$memID]['ID_GROUP'] == 1 ? true : false, + 'registered' => empty($user_profile[$memID]['dateRegistered']) || $user_profile[$memID]['dateRegistered'] == '0000-00-00' ? $txt[470] : strftime('%Y-%m-%d', $user_profile[$memID]['dateRegistered'] + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600), + 'group' => $user_profile[$memID]['ID_GROUP'] + ); + + // You need 'manage membergroups' permission for this. + if ($context['allow_edit_membergroups']) + { + $context['member_groups'] = array( + 0 => array( + 'id' => 0, + 'name' => &$txt['no_primary_membergroup'], + 'is_primary' => $user_profile[$memID]['ID_GROUP'] == 0, + 'can_be_additional' => false, + ) + ); + $curGroups = explode(',', $user_profile[$memID]['additionalGroups']); + + // Load membergroups, but only those groups the user can assign. + $request = db_query(" + SELECT groupName, ID_GROUP + FROM {$db_prefix}membergroups + WHERE ID_GROUP != 3 + AND minPosts = -1 + ORDER BY minPosts, IF(ID_GROUP < 4, ID_GROUP, 4), groupName", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + // We should skip the administrator group if they don't have the admin_forum permission! + if ($row['ID_GROUP'] == 1 && !allowedTo('admin_forum')) + continue; + + $context['member_groups'][$row['ID_GROUP']] = array( + 'id' => $row['ID_GROUP'], + 'name' => $row['groupName'], + 'is_primary' => $user_profile[$memID]['ID_GROUP'] == $row['ID_GROUP'], + 'is_additional' => in_array($row['ID_GROUP'], $curGroups), + 'can_be_additional' => true, + ); + } + mysql_free_result($request); + } + + $context['languages'] = array(); + if ($context['allow_edit_account']) + { + // Are languages user selectable? If so, get a list. + if (!empty($modSettings['userLanguage'])) + { + // Select the default language if the user has no language selected yet. + $selectedLanguage = empty($user_profile[$memID]['lngfile']) ? $language : $user_profile[$memID]['lngfile']; + + $dir = dir($language_dir); + while ($entry = $dir->read()) + { + // Each language file must *at least* have a 'index.LANGUAGENAME.php' file. + if (substr($entry, 0, 6) == 'index.' && substr($entry, -4) == '.php' && strlen($entry) > 10) + { + $context['languages'][] = array( + 'name' => ucfirst(substr($entry, 6, -4)), + 'selected' => $entry == 'index.' . $selectedLanguage . '.php', + 'filename' => substr($entry, 6, -4) + ); + } + } + $dir->close(); + } + } + + loadThemeOptions($memID); +} + +function forumProfile($memID) +{ + global $context, $user_profile; + global $user_info, $txt, $ID_MEMBER, $modSettings; + + $context['avatar_url'] = $modSettings['avatar_url']; + $context['max_signature_length'] = $modSettings['max_signatureLength']; + $context['allow_edit_title'] = allowedTo('profile_title_any') || (allowedTo('profile_title_own') && $context['user']['is_owner']); + + $context['show_spellchecking'] = $modSettings['enableSpellChecking'] && function_exists('pspell_new'); + + $context['member'] = array( + 'id' => $memID, + 'gender' => array('name' => empty($user_profile[$memID]['gender']) ? '' : ($user_profile[$memID]['gender'] == 2 ? 'f' : 'm')), + 'birth_date' => !isset($user_profile[$memID]['birthdate']) || $user_profile[$memID]['birthdate'] == '' ? '0000-00-00' : $user_profile[$memID]['birthdate'], + 'location' => !isset($user_profile[$memID]['location']) ? '' : $user_profile[$memID]['location'], + 'title' => !isset($user_profile[$memID]['usertitle']) || $user_profile[$memID]['usertitle'] == '' ? '' : $user_profile[$memID]['usertitle'], + 'blurb' => !isset($user_profile[$memID]['personalText']) ? '' : str_replace(array('<', '>', '&#039;'), array('<', '>', '''), $user_profile[$memID]['personalText']), + 'signature' => !isset($user_profile[$memID]['signature']) ? '' : str_replace(array('
    ', '<', '>', '"', '\''), array("\n", '<', '>', '$quot;', '''), $user_profile[$memID]['signature']), + 'karma' => array( + 'good' => empty($user_profile[$memID]['karmaGood']) ? '0' : $user_profile[$memID]['karmaGood'], + 'bad' => empty($user_profile[$memID]['karmaBad']) ? '0' : $user_profile[$memID]['karmaBad'], + ), + 'avatar' => array( + 'name' => &$user_profile[$memID]['avatar'], + 'custom' => stristr($user_profile[$memID]['avatar'], 'http://') ? $user_profile[$memID]['avatar'] : 'http://', + 'selection' => $user_profile[$memID]['avatar'] == '' || stristr($user_profile[$memID]['avatar'], 'http://') ? '' : $user_profile[$memID]['avatar'], + 'ID_ATTACH' => &$user_profile[$memID]['ID_ATTACH'], + 'filename' => &$user_profile[$memID]['filename'], + 'allow_external' => !empty($modSettings['avatar_allow_external_url']) && (allowedTo('profile_remote_avatar') || !$context['user']['is_owner']) + ), + 'icq' => array('name' => !isset($user_profile[$memID]['ICQ']) ? '' : $user_profile[$memID]['ICQ']), + 'aim' => array('name' => empty($user_profile[$memID]['AIM']) ? '' : str_replace('+', ' ', $user_profile[$memID]['AIM'])), + 'yim' => array('name' => empty($user_profile[$memID]['YIM']) ? '' : $user_profile[$memID]['YIM']), + 'msn' => array('name' => empty($user_profile[$memID]['MSN']) ? '' : $user_profile[$memID]['MSN']), + 'website' => array( + 'title' => !isset($user_profile[$memID]['websiteTitle']) ? '' : $user_profile[$memID]['websiteTitle'], + 'url' => !isset($user_profile[$memID]['websiteUrl']) ? '' : $user_profile[$memID]['websiteUrl'], + ), + + 'googleMap' => array( + 'latitude' => !isset($user_profile[$memID]['latitude']) ? '' : $user_profile[$memID]['latitude'], + 'longitude' => !isset($user_profile[$memID]['longitude']) ? '' : $user_profile[$memID]['longitude'], + ), + ); + + // Split up the birthdate.... + list ($uyear, $umonth, $uday) = explode('-', $context['member']['birth_date']); + $context['member']['birth_date'] = array( + 'year' => $uyear, + 'month' => $umonth, + 'day' => $uday + ); + + if ($user_profile[$memID]['avatar'] == '' && $user_profile[$memID]['ID_ATTACH'] > 0 && !empty($modSettings['avatar_allow_upload'])) + $context['member']['avatar'] += array( + 'choice' => 'upload', + 'server_pic' => 'blank.gif', + 'external' => 'http://' + ); + elseif (stristr($user_profile[$memID]['avatar'], 'http://') && $context['member']['avatar']['allow_external']) + $context['member']['avatar'] += array( + 'choice' => 'external', + 'server_pic' => 'blank.gif', + 'external' => $user_profile[$memID]['avatar'] + ); + elseif (file_exists($modSettings['avatar_directory'] . '/' . $user_profile[$memID]['avatar']) && !empty($modSettings['avatar_allow_server_stored'])) + $context['member']['avatar'] += array( + 'choice' => 'server_stored', + 'server_pic' => $user_profile[$memID]['avatar'] == '' ? 'blank.gif' : $user_profile[$memID]['avatar'], + 'external' => 'http://' + ); + else + $context['member']['avatar'] += array( + 'choice' => 'server_stored', + 'server_pic' => 'blank.gif', + 'external' => 'http://' + ); + + // Get a list of all the avatars. + if (!empty($modSettings['avatar_allow_server_stored'])) + { + $context['avatar_list'] = array(); + $context['avatars'] = is_dir($modSettings['avatar_directory']) ? getAvatars('', 0) : array(); + } + else + $context['avatars'] = array(); + + // Second level selected avatar. + $context['avatar_selected'] = substr(strrchr($context['member']['avatar']['server_pic'], '/'), 1); + + loadThemeOptions($memID); +} + +function map($memID) +{ + global $context, $user_profile; + global $user_info, $txt, $ID_MEMBER, $modSettings; + + $context['member'] = array( + 'id' => $memID, + 'googleMap' => array( + 'latitude' => !isset($user_profile[$memID]['latitude']) ? '' : $user_profile[$memID]['latitude'], + 'longitude' => !isset($user_profile[$memID]['longitude']) ? '' : $user_profile[$memID]['longitude'], + ), + ); +} + +// Recursive function to retrieve avatar files +function getAvatars($directory, $level) +{ + global $context, $txt, $modSettings; + + $result = array(); + + // Open the directory.. + $dir = dir($modSettings['avatar_directory'] . (!empty($directory) ? '/' : '') . $directory); + $dirs = array(); + $files = array(); + + if (!$dir) + return array(); + + while ($line = $dir->read()) + { + if (in_array($line, array('.', '..', 'blank.gif', 'index.php'))) + continue; + + if (is_dir($modSettings['avatar_directory'] . '/' . $directory . (!empty($directory) ? '/' : '') . $line)) + $dirs[] = $line; + else + $files[] = $line; + } + $dir->close(); + + // Sort the results... + natcasesort($dirs); + natcasesort($files); + + if ($level == 0) + { + $result[] = array( + 'filename' => 'blank.gif', + 'checked' => in_array($context['member']['avatar']['server_pic'], array('', 'blank.gif')), + 'name' => &$txt[422], + 'is_dir' => false + ); + } + + foreach ($dirs as $line) + { + $tmp = getAvatars($directory . (!empty($directory) ? '/' : '') . $line, $level + 1); + if (!empty($tmp)) + $result[] = array( + 'filename' => htmlspecialchars($line), + 'checked' => strpos($context['member']['avatar']['server_pic'], $line . '/') !== false, + 'name' => '[' . htmlspecialchars(str_replace('_', ' ', $line)) . ']', + 'is_dir' => true, + 'files' => $tmp + ); + unset($tmp); + } + + foreach ($files as $line) + { + $filename = substr($line, 0, (strlen($line) - strlen(strrchr($line, '.')))); + $extension = substr(strrchr($line, '.'), 1); + + // Make sure it is an image. + if (strcasecmp($extension, 'gif') != 0 && strcasecmp($extension, 'jpg') != 0 && strcasecmp($extension, 'jpeg') != 0 && strcasecmp($extension, 'png') != 0 && strcasecmp($extension, 'bmp') != 0) + continue; + + $result[] = array( + 'filename' => htmlspecialchars($line), + 'checked' => $line == $context['member']['avatar']['server_pic'], + 'name' => htmlspecialchars(str_replace('_', ' ', $filename)), + 'is_dir' => false + ); + if ($level == 1) + $context['avatar_list'][] = $directory . '/' . $line; + } + + return $result; +} + +function theme($memID) +{ + global $txt, $context, $user_profile, $db_prefix, $modSettings, $settings, $user_info; + + $request = db_query(" + SELECT value + FROM {$db_prefix}themes + WHERE ID_THEME = " . (int) $user_profile[$memID]['ID_THEME'] . " + AND variable = 'name' + LIMIT 1", __FILE__, __LINE__); + list ($name) = mysql_fetch_row($request); + mysql_free_result($request); + + $context['member'] = array( + 'id' => (int) $user_profile[$memID]['ID_MEMBER'], + 'theme' => array( + 'id' => $user_profile[$memID]['ID_THEME'], + 'name' => empty($user_profile[$memID]['ID_THEME']) ? $txt['theme_forum_default'] : $name + ), + 'smiley_set' => array( + 'id' => empty($user_profile[$memID]['smileySet']) ? (!empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default']) : $user_profile[$memID]['smileySet'] + ), + 'time_format' => !isset($user_profile[$memID]['timeFormat']) ? '' : $user_profile[$memID]['timeFormat'], + 'time_offset' => empty($user_profile[$memID]['timeOffset']) ? '0' : $user_profile[$memID]['timeOffset'], + ); + + $context['easy_timeformats'] = array( + array('format' => '', 'title' => $txt['timeformat_easy0']), + array('format' => '%B %d, %Y, %I:%M:%S %p', 'title' => $txt['timeformat_easy1']), + array('format' => '%B %d, %Y, %H:%M:%S', 'title' => $txt['timeformat_easy2']), + array('format' => '%Y-%m-%d, %H:%M:%S', 'title' => $txt['timeformat_easy3']), + array('format' => '%d %B %Y, %H:%M:%S', 'title' => $txt['timeformat_easy4']), + array('format' => '%d-%m-%Y, %H:%M:%S', 'title' => $txt['timeformat_easy5']) + ); + + $context['current_forum_time'] = timeformat(time() - $user_info['time_offset'] * 3600, false); + + $context['smiley_sets'] = explode(',', 'none,' . $modSettings['smiley_sets_known']); + $set_names = explode("\n", $txt['smileys_none'] . "\n" . $modSettings['smiley_sets_names']); + foreach ($context['smiley_sets'] as $i => $set) + { + $context['smiley_sets'][$i] = array( + 'id' => $set, + 'name' => $set_names[$i], + 'selected' => $set == $context['member']['smiley_set']['id'] + ); + + if ($context['smiley_sets'][$i]['selected']) + $context['member']['smiley_set']['name'] = $set_names[$i]; + } + + loadThemeOptions($memID); + + loadLanguage('Settings'); +} + +// Display the notifications and settings for changes. +function notification($memID) +{ + global $txt, $db_prefix, $scripturl, $user_profile, $user_info, $context, $ID_MEMBER, $modSettings; + + // All the boards with noficiation on.. + $request = db_query(" + SELECT b.ID_BOARD, b.name, lb.logTime AS boardRead, b.lastUpdated + FROM ({$db_prefix}log_notify AS ln, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER) + WHERE ln.ID_MEMBER = $memID + AND b.ID_BOARD = ln.ID_BOARD + AND $user_info[query_see_board] + ORDER BY b.boardOrder", __FILE__, __LINE__); + $context['board_notifications'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + $context['board_notifications'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['name'] . '', + 'new' => $row['boardRead'] < $row['lastUpdated'] + ); + } + + $request = db_query(" + SELECT COUNT(t.ID_TOPIC) + FROM {$db_prefix}log_notify AS ln, {$db_prefix}boards AS b, {$db_prefix}topics AS t + WHERE ln.ID_MEMBER = $memID + AND t.ID_TOPIC = ln.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD + AND $user_info[query_see_board]", __FILE__, __LINE__); + list ($num_topics) = mysql_fetch_row($request); + mysql_free_result($request); + + $context['page_index'] = constructPageIndex($scripturl . '?action=profile;u=' . $memID . ';sa=notification', $_REQUEST['start'], $num_topics, $modSettings['defaultMaxMessages']); + + // All the topics with notification on... + $request = db_query(" + SELECT + IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS isRead, b.ID_BOARD, b.name, + t.ID_TOPIC, ms.subject, ms.ID_MEMBER, IFNULL(mem.realName, ms.posterName) AS realName, + GREATEST(ml.posterTime, ml.modifiedTime) AS topicTime + FROM ({$db_prefix}log_notify AS ln, {$db_prefix}boards AS b, {$db_prefix}topics AS t, {$db_prefix}messages AS ms, {$db_prefix}messages AS ml) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = ms.ID_MEMBER) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER) + WHERE ln.ID_MEMBER = $memID + AND t.ID_TOPIC = ln.ID_TOPIC + AND ms.ID_MSG = t.ID_FIRST_MSG + AND ml.ID_MSG = t.ID_LAST_MSG + AND b.ID_BOARD = t.ID_BOARD + AND $user_info[query_see_board] + ORDER BY ms.ID_MSG DESC + LIMIT $_REQUEST[start], $modSettings[defaultMaxMessages]", __FILE__, __LINE__); + $context['topic_notifications'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + censorText($row['subject']); + + $context['topic_notifications'][] = array( + 'id' => $row['ID_TOPIC'], + 'poster' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['realName'], + 'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => empty($row['ID_MEMBER']) ? $row['realName'] : '' . $row['realName'] . '' + ), + 'subject' => $row['subject'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0', + 'link' => '' . $row['subject'] . '', + 'new' => $row['isRead'] < $row['topicTime'], + 'newtime' => $row['isRead'], + 'new_href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.from' . $row['isRead'] . '#new', + 'new_link' => '' . $row['subject'] . '', + 'board' => array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['name'] . '' + ) + ); + } + mysql_free_result($request); + + // What options are set? + $context['member'] = array( + 'id' => $memID, + 'notify_announcements' => $user_profile[$memID]['notifyAnnouncements'], + 'notify_once' => $user_profile[$memID]['notifyOnce'] + ); + + // How many rows can we expect? + $context['num_rows'] = array( + 'topic' => count($context['topic_notifications']) + 3, + 'board' => count($context['board_notifications']) + 2 + ); + + loadThemeOptions($memID); +} + +function pmprefs($memID) +{ + global $txt, $user_profile, $db_prefix, $context, $db_prefix; + + // Tell the template what they are.... + $context['send_email'] = $user_profile[$memID]['im_email_notify']; + + if ($user_profile[$memID]['im_ignore_list'] != '*') + { + $result = db_query(" + SELECT memberName + FROM {$db_prefix}members + WHERE FIND_IN_SET(ID_MEMBER, '" . $user_profile[$memID]['im_ignore_list']. "') + LIMIT " . (substr_count($user_profile[$memID]['im_ignore_list'], ',') + 1), __FILE__, __LINE__); + $im_ignore_list = ''; + while ($row = mysql_fetch_assoc($result)) + $im_ignore_list .= "\n" . $row['memberName']; + mysql_free_result($result); + + $im_ignore_list = substr($im_ignore_list, 1); + } + else + $im_ignore_list = '*'; + + $context['ignore_list'] = $im_ignore_list; + $context['member']['id'] = $memID; + $context['page_title'] = $txt['pmprefs'] . ': ' . $txt[144]; + + loadThemeOptions($memID); +} + +// Present a screen to make sure the user wants to be deleted +function deleteAccount($memID) +{ + global $txt, $context, $ID_MEMBER; + + if (!$context['user']['is_owner']) + isAllowedTo('profile_remove_any'); + elseif (!allowedTo('profile_remove_any')) + isAllowedTo('profile_remove_own'); + + $context['member']['id'] = $memID; + $context['member']['is_owner'] = $memID == $ID_MEMBER; + $context['page_title'] = $txt['deleteAccount'] . ': ' . $txt[144]; +} + +function deleteAccount2($profile_vars, $post_errors, $memID) +{ + global $ID_MEMBER, $user_info, $sourcedir, $context, $db_prefix; + + if (!$context['user']['is_owner']) + isAllowedTo('profile_remove_any'); + elseif (!allowedTo('profile_remove_any')) + isAllowedTo('profile_remove_own'); + + checkSession(); + + // This file is needed for the deleteMembers function. + require_once($sourcedir . '/ManageMembers.php'); + + // Do you have permission to delete others profiles, or is that your profile you wanna delete? + if ($memID != $ID_MEMBER) + { + isAllowedTo('profile_remove_any'); + + // Now, have you been naughty and need your posts deleting? + if ($_POST['remove_type'] != 'none') + { + // Include RemoveTopics - essential for this type of work! + require_once($sourcedir . '/RemoveTopic.php'); + + // First off we delete any topics the member has started - if they wanted topics being done. + if ($_POST['remove_type'] == 'topics') + { + // Fetch all topics started by this user within the time period. + $request = db_query(" + SELECT t.ID_TOPIC + FROM {$db_prefix}topics AS t + WHERE t.ID_MEMBER_STARTED = $memID", __FILE__, __LINE__); + $topicIDs = array(); + while ($row = mysql_fetch_assoc($request)) + $topicIDs[] = $row['ID_TOPIC']; + mysql_free_result($request); + + // Actually remove the topics. + removeTopics($topicIDs); + } + + // Now delete the remaining messages. + $request = db_query(" + SELECT m.ID_MSG + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t + WHERE m.ID_MEMBER = $memID + AND m.ID_TOPIC = t.ID_TOPIC + AND t.ID_FIRST_MSG != m.ID_MSG", __FILE__, __LINE__); + // This could take a while... but ya know it's gonna be worth it in the end. + while ($row = mysql_fetch_assoc($request)) + removeMessage($row['ID_MSG']); + mysql_free_result($request); + } + + // Only delete this poor members account if they are actually being booted out of camp. + if (isset($_POST['deleteAccount'])) + deleteMembers($memID); + } + // Also check if you typed your password correctly. + elseif (empty($post_errors)) + deleteMembers($memID); +} + +// This function 'remembers' the profile changes a user made after erronious input. +function rememberPostData() +{ + global $context, $scripturl, $txt, $modSettings, $ID_MEMBER, $user_profile, $user_info; + + // Overwrite member settings with the ones you selected. + $context['member'] = array( + 'is_owner' => $_REQUEST['userID'] == $ID_MEMBER, + 'username' => $user_profile[$_REQUEST['userID']]['memberName'], + 'name' => !isset($_POST['realName']) || $_POST['realName'] == '' ? $user_profile[$_REQUEST['userID']]['memberName'] : stripslashes($_POST['realName']), + 'id' => (int) $_REQUEST['userID'], + 'title' => !isset($_POST['usertitle']) || $_POST['usertitle'] == '' ? '' : stripslashes($_POST['usertitle']), + 'email' => isset($_POST['emailAddress']) ? $_POST['emailAddress'] : '', + 'hide_email' => empty($_POST['hideEmail']) ? 0 : 1, + 'show_online' => empty($_POST['showOnline']) ? 0 : 1, + 'registered' => empty($_POST['dateRegistered']) || $_POST['dateRegistered'] == '0000-00-00' ? $txt[470] : strftime('%Y-%m-%d', $_POST['dateRegistered']), + 'blurb' => !isset($_POST['personalText']) ? '' : str_replace(array('<', '>', '&#039;'), array('<', '>', '''), stripslashes($_POST['personalText'])), + 'gender' => array( + 'name' => empty($_POST['gender']) ? '' : ($_POST['gender'] == 2 ? 'f' : 'm') + ), + 'website' => array( + 'title' => !isset($_POST['websiteTitle']) ? '' : stripslashes($_POST['websiteTitle']), + 'url' => !isset($_POST['websiteUrl']) ? '' : stripslashes($_POST['websiteUrl']), + ), + 'birth_date' => array( + 'month' => empty($_POST['bday1']) ? '00' : (int) $_POST['bday1'], + 'day' => empty($_POST['bday2']) ? '00' : (int) $_POST['bday2'], + 'year' => empty($_POST['bday3']) ? '0000' : (int) $_POST['bday3'] + ), + 'signature' => !isset($_POST['signature']) ? '' : str_replace(array('<', '>'), array('<', '>'), $_POST['signature']), + 'location' => !isset($_POST['location']) ? '' : stripslashes($_POST['location']), + 'icq' => array( + 'name' => !isset($_POST['icq']) ? '' : stripslashes($_POST['ICQ']) + ), + 'aim' => array( + 'name' => empty($_POST['aim']) ? '' : str_replace('+', ' ', $_POST['AIM']) + ), + 'yim' => array( + 'name' => empty($_POST['yim']) ? '' : stripslashes($_POST['YIM']) + ), + 'msn' => array( + 'name' => empty($_POST['msn']) ? '' : stripslashes($_POST['MSN']) + ), + 'posts' => empty($_POST['posts']) ? 0 : (int) $_POST['posts'], + 'avatar' => array( + 'name' => &$_POST['avatar'], + 'custom' => stristr($_POST['avatar'], 'http://') ? $_POST['avatar'] : 'http://', + 'selection' => $_POST['avatar'] == '' || stristr($_POST['avatar'], 'http://') ? '' : $_POST['avatar'] + ), + 'karma' => array( + 'good' => empty($_POST['karmaGood']) ? '0' : $_POST['karmaGood'], + 'bad' => empty($_POST['karmaBad']) ? '0' : $_POST['karmaBad'], + ), + 'time_format' => !isset($_POST['timeFormat']) ? '' : stripslashes($_POST['timeFormat']), + 'time_offset' => empty($_POST['timeOffset']) ? '0' : $_POST['timeOffset'], + 'secret_question' => !isset($_POST['secretQuestion']) ? '' : stripslashes($_POST['secretQuestion']), + 'theme' => array( + 'id' => isset($context['member']['theme']['id']) ? $context['member']['theme']['id'] : 0, + 'name' => isset($context['member']['theme']['name']) ? $context['member']['theme']['name'] : '', + ), + 'notify_announcements' => empty($_POST['notifyAnnouncements']) ? 0 : 1, + 'notify_once' => empty($_POST['notifyOnce']) ? 0 : 1, + 'avatar' => array( + 'choice' => empty($_POST['avatar_choice']) ? 'server_stored' : $_POST['avatar_choice'], + 'external' => empty($_POST['userpicpersonal']) ? 'http://' : $_POST['userpicpersonal'], + 'ID_ATTACH' => empty($_POST['ID_ATTACH']) ? '0' : $_POST['ID_ATTACH'] + ), + 'group' => isset($_POST['ID_GROUP']) ? $_POST['ID_GROUP'] : 0, + 'smiley_set' => array( + 'id' => isset($_POST['smileySet']) ? $_POST['smileySet'] : (isset($context['member']['smiley_set']) ? $context['member']['smiley_set'] : ''), + 'name' => isset($context['member']['smiley_set']) ? $context['member']['smiley_set']['name'] : '' + ), + ); + + // Overwrite the currently set membergroups with those you just selected. + if (allowedTo('manage_membergroups') && isset($_POST['ID_GROUP'])) + { + foreach ($context['member_groups'] as $ID_GROUP => $dummy) + { + $context['member_groups'][$ID_GROUP]['is_primary'] = $ID_GROUP == $_POST['ID_GROUP']; + $context['member_groups'][$ID_GROUP]['is_additional'] = !empty($_POST['additionalGroups']) && in_array($ID_GROUP, $_POST['additionalGroups']); + } + } + + loadThemeOptions((int) $_REQUEST['userID']); +} + +function loadThemeOptions($memID) +{ + global $context, $options, $db_prefix, $user_profile; + + if (isset($_POST['options']) && isset($_POST['default_options'])) + $_POST['options'] += $_POST['default_options']; + + if ($context['user']['is_owner']) + $context['member']['options'] = $options; + else + { + $request = db_query(" + SELECT variable, value + FROM {$db_prefix}themes + WHERE ID_THEME IN (1, " . (int) $user_profile[$memID]['ID_THEME'] . ") + AND ID_MEMBER = $memID", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if (isset($_POST['options'][$row['variable']])) + $row['value'] = $_POST['options'][$row['variable']]; + $context['member']['options'][$row['variable']] = $row['value']; + } + mysql_free_result($request); + } +} + +?> diff --git a/Sources/QueryString.php b/Sources/QueryString.php new file mode 100644 index 0000000..5b2d3bd --- /dev/null +++ b/Sources/QueryString.php @@ -0,0 +1,393 @@ + name -> array. So be careful. + foreach ($_FILES as $k => $dummy) + $_FILES[$k]['name'] = addslashes__recursive($_FILES[$k]['name']); + } + + // Take care of the server variables. + $_SERVER = addslashes__recursive($_SERVER); + + // Let's not depend on the ini settings... why even have COOKIE in there, anyway? + $_REQUEST = $_POST + $_GET; + + // Make sure $board and $topic are numbers. + if (isset($_REQUEST['board'])) + { + // Make sure we start with a string + $_REQUEST['board'] = (string) $_REQUEST['board']; + + // If there's a slash in it, we've got a start value! (old, compatible links.) + if (strpos($_REQUEST['board'], '/') !== false) + list ($_REQUEST['board'], $_REQUEST['start']) = explode('/', $_REQUEST['board']); + // Same idea, but dots. This is the currently used format - ?board=1.0... + elseif (strpos($_REQUEST['board'], '.') !== false) + list ($_REQUEST['board'], $_REQUEST['start']) = explode('.', $_REQUEST['board']); + // Now make absolutely sure it's a number. + $board = (int) $_REQUEST['board']; + + // This is for "Who's Online" because it might come via POST - and it should be an int here. + $_GET['board'] = $board; + } + // Well, $board is going to be a number no matter what. + else + $board = 0; + + // If there's a threadid, it's probably an old YaBB SE link. Flow with it. + if (isset($_REQUEST['threadid']) && !isset($_REQUEST['topic'])) + $_REQUEST['topic'] = $_REQUEST['threadid']; + + // some topics have names! + if (isset($_REQUEST['topicname'])) { + // Be sure to treat it like a string + $_REQUEST['topicname'] = (string) $_REQUEST['topicname']; + $_REQUEST['topicname'] = rtrim ($_REQUEST['topicname'], '/'); + $topicname=mysql_real_escape_string($_REQUEST['topicname']); + + $result = db_query("SELECT ID_TOPIC FROM topic_uri WHERE uri='$topicname'", __FILE__, __LINE__); + if (mysql_num_rows($result) > 0) { + list($_REQUEST['topic']) = mysql_fetch_row($result); + } else { + $_REQUEST['topic'] = -1; + } + } + + // We've got topic! + if (isset($_REQUEST['topic'])) + { + // Make sure we start with a string + $_REQUEST['topic'] = (string) $_REQUEST['topic']; + + // Slash means old, beta style, formatting. That's okay though, the link should still work. + if (strpos($_REQUEST['topic'], '/') !== false) + list ($_REQUEST['topic'], $_REQUEST['start']) = explode('/', $_REQUEST['topic']); + // Dots are useful and fun ;). This is ?topic=1.15. + elseif (strpos($_REQUEST['topic'], '.') !== false) + list ($_REQUEST['topic'], $_REQUEST['start']) = explode('.', $_REQUEST['topic']); + + $topic = (int) $_REQUEST['topic']; + + // Now make sure the online log gets the right number. + $_GET['topic'] = $topic; + } + + // There should be a $_REQUEST['start'], some at least. If you need to default to other than 0, use $_GET['start']. + if (empty($_REQUEST['start']) || $_REQUEST['start'] < 0) + $_REQUEST['start'] = 0; + + // The action needs to be a string and not an array or anything else + if (isset($_REQUEST['action'])) + $action = $_REQUEST['action'] = (string) $_REQUEST['action']; + if (isset($_GET['action'])) + $action = $_GET['action'] = (string) $_GET['action']; + + + if (isset($topic) AND !isset($_REQUEST['topicname']) AND !isset($_REQUEST['action']) AND !isset($_GET['action'])) { + $result = db_query("SELECT uri FROM topic_uri WHERE ID_TOPIC='$topic'", __FILE__, __LINE__); + if (mysql_num_rows($result) > 0) { + list($topicname) = mysql_fetch_row($result); + $redirect = $boardurl.'/'.$topicname; + if ($_REQUEST['start'] != '0') { + $redirect .= '?start='.$_REQUEST['start']; + } + if (isset($_REQUEST['boardseen'])) { + $redirect .= "&boardseen"; + } + header("HTTP/1.1 301 Moved Permanently"); + header("Location: $redirect"); + } + + // some topics should be displayed on site, not forum + // 'Recommended', however, still must be on forum + $result = db_query("SELECT p.id, p.uri, c.urlname + FROM publications p, categories c, smf_topics t, smf_messages m + WHERE t.ID_FIRST_MSG=m.ID_MSG AND p.id_post = m.ID_MSG AND p.id_category = c.id + AND c.id <> 9 AND t.ID_TOPIC = '$topic'", __FILE__, __LINE__); + + if (mysql_num_rows($result) > 0) { + list($id_pub, $uri, $category) = mysql_fetch_row($result); + + //Some publications don't have uri, just the id + if (empty ($uri)) $uri = $id_pub; + + header("HTTP/1.1 301 Moved Permanently"); + header("Location: http://rock.ru/$category/$uri.html"); + } + } + + // Find the user's IP address. (but don't let it give you 'unknown'!) + if (!empty($_SERVER['HTTP_CLIENT_IP']) && preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['HTTP_CLIENT_IP']) == 0) + { + // Since they are in different blocks, it's probably reversed. + if (strtok($_SERVER['REMOTE_ADDR'], '.') != strtok($_SERVER['HTTP_CLIENT_IP'], '.')) + $_SERVER['REMOTE_ADDR'] = implode('.', array_reverse(explode('.', $_SERVER['HTTP_CLIENT_IP']))); + else + $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CLIENT_IP']; + } + elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) + { + // If there are commas, get the last one.. probably. + if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) + { + $ips = array_reverse(explode(', ', $_SERVER['HTTP_X_FORWARDED_FOR'])); + + // Go through each IP... + foreach ($ips as $i => $ip) + { + // Make sure it's in a valid range... + if (preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $ip) != 0) + continue; + + // Otherwise, we've got an IP! + $_SERVER['REMOTE_ADDR'] = trim($ip); + break; + } + } + // Otherwise just use the only one. + elseif (preg_match('~^((0|10|172\.16|192\.168|255|127\.0)\.|unknown)~', $_SERVER['HTTP_X_FORWARDED_FOR']) == 0) + $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; + } + + // Make sure REQUEST_URI is set. + if (empty($_SERVER['REQUEST_URI'])) + $_SERVER['REQUEST_URI'] = $scripturl . (!empty($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : ''); + + // And make sure HTTP_USER_AGENT is set. + $_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? htmlspecialchars(stripslashes($_SERVER['HTTP_USER_AGENT']), ENT_QUOTES) : ''; + + // Some final checking. + if (preg_match('~^((([1]?\d)?\d|2[0-4]\d|25[0-5])\.){3}(([1]?\d)?\d|2[0-4]\d|25[0-5])$~', $_SERVER['REMOTE_ADDR']) === 0) + $_SERVER['REMOTE_ADDR'] = ''; +} + +// Adds slashes to the array/variable. Uses two underscores to guard against overloading. +function addslashes__recursive($var) +{ + if (!is_array($var)) + return addslashes($var); + + // Reindex the array with slashes. + $new_var = array(); + + // Add slashes to every element, even the indexes! + foreach ($var as $k => $v) + $new_var[addslashes($k)] = addslashes__recursive($v); + + return $new_var; +} + +// Adds html entities to the array/variable. Uses two underscores to guard against overloading. +function htmlspecialchars__recursive($var) +{ + if (!is_array($var)) + return htmlspecialchars($var, ENT_QUOTES); + + // Add the htmlspecialchars to every element. + foreach ($var as $k => $v) + $var[$k] = htmlspecialchars__recursive($v); + + return $var; +} + +// Removes url stuff from the array/variable. Uses two underscores to guard against overloading. +function urldecode__recursive($var) +{ + if (!is_array($var)) + return urldecode($var); + + // Reindex the array... + $new_var = array(); + + // Add the htmlspecialchars to every element. + foreach ($var as $k => $v) + $new_var[urldecode($k)] = urldecode__recursive($v); + + return $new_var; +} +// Strips the slashes off any array or variable. Two underscores for the normal reason. +function stripslashes__recursive($var) +{ + if (!is_array($var)) + return stripslashes($var); + + // Reindex the array without slashes, this time. + $new_var = array(); + + // Strip the slashes from every element. + foreach ($var as $k => $v) + $new_var[stripslashes($k)] = stripslashes__recursive($v); + + return $new_var; +} + +// Trim a string including the HTML space, character 160. +function htmltrim__recursive($var) +{ + // Remove spaces (32), tabs (9), returns (13, 10, and 11), nulls (0), and hard spaces. (160) + if (!is_array($var)) + return trim($var, " \t\n\r\x0B\0\xA0"); + + // Go through all the elements and remove the whitespace. + foreach ($var as $k => $v) + $var[$k] = htmltrim__recursive($v); + + return $var; +} + +// Rewrite URLs to include the session ID. +function ob_sessrewrite($buffer) +{ + global $scripturl, $modSettings, $user_info, $context; + + // If $scripturl is set to nothing, or the SID is not defined (SSI?) just quit. + if ($scripturl == '' || !defined('SID')) + return $buffer; + + // Do nothing if the session is cookied, or they are a crawler - guests are caught by redirectexit(). This doesn't work below PHP 4.3.0, because it makes the output buffer bigger. + if (empty($_COOKIE) && SID != '' && (!$user_info['is_guest'] || (strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false)) && @version_compare(PHP_VERSION, '4.3.0') != -1) + $buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . '&', $buffer); + // You can't do both, because session_start() won't catch the session if you do. But this should work even in 4.2.x, just not CGI. + elseif (!empty($modSettings['queryless_urls']) && !$context['server']['is_cgi'] && $context['server']['is_apache']) + $buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer); + + // Return the changed buffer. + return $buffer; +} + +?> diff --git a/Sources/Recent.php b/Sources/Recent.php new file mode 100644 index 0000000..b869efd --- /dev/null +++ b/Sources/Recent.php @@ -0,0 +1,638 @@ + 0 ? " + AND b.ID_BOARD != $modSettings[recycle_board]" : '') . " + AND $user_info[query_see_board] + ORDER BY b.lastUpdated DESC + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + return array(); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + // Censor the subject and post... + censorText($row['subject']); + censorText($row['body']); + + $row['body'] = strip_tags(strtr(doUBBC($row['body'], $row['smileysEnabled']), array('
    ' => ' '))); + if (strlen($row['body']) > 128) + $row['body'] = substr($row['body'], 0, 128) . '...'; + + // Send the data. + return array( + 'topic' => $row['ID_TOPIC'], + 'subject' => $row['subject'], + 'short_subject' => mb_strlen(un_htmlspecialchars($row['subject'])) > 24 ? strtr(mb_substr(strtr($row['subject'], array('<' => '<', '>' => '>', '"' => '"')), 0, 24) . '...', array('<' => '<', '>' => '>', '"' => '"')) : $row['subject'], + 'preview' => $row['body'], + 'time' => timeformat($row['posterTime']), + 'timestamp' => $row['posterTime'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.new;topicseen#new', + 'link' => '' . $row['subject'] . '' + ); +} + +function getLastPosts($showlatestcount) +{ + global $scripturl, $txt, $db_prefix, $user_info, $modSettings; + + // Find all the posts. Newer ones will have higher IDs. (assuming the last 4 * number are accessable...) + $request = db_query(" + SELECT + m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, + IFNULL(mem.realName, m.posterName) AS posterName, t.ID_BOARD, b.name AS bName, + m.body, m.smileysEnabled + FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 4 * $showlatestcount) . " + AND t.ID_TOPIC = m.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " + AND b.ID_BOARD != $modSettings[recycle_board]" : '') . " + AND $user_info[query_see_board] + ORDER BY m.ID_MSG DESC + LIMIT $showlatestcount", __FILE__, __LINE__); + $posts = array(); + while ($row = mysql_fetch_assoc($request)) + { + // Censor the subject and post for the preview ;). + censorText($row['subject']); + censorText($row['body']); + + $row['body'] = strip_tags(strtr(doUBBC($row['body'], $row['smileysEnabled']), array('
    ' => ' '))); + if (strlen($row['body']) > 128) + $row['body'] = substr($row['body'], 0, 128) . '...'; + + // Build the array. + $posts[] = array( + 'board' => array( + 'id' => $row['ID_BOARD'], + 'name' => $row['bName'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['bName'] . '' + ), + 'topic' => $row['ID_TOPIC'], + 'icon' => file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? $settings['images_url'] . '/post/' . $row['icon'] . '.gif' : $settings['default_images_url'] . '/post/' . $row['icon'] . '.gif', + 'views' => $row['numViews'], + 'replies' => $row['numReplies'], + 'poster' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['posterName'], + 'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '' . $row['posterName'] . '' + ), + 'subject' => $row['subject'], + 'short_subject' => strlen(un_htmlspecialchars($row['subject'])) > 24 ? strtr(substr(strtr($row['subject'], array('<' => '<', '>' => '>', '"' => '"')), 0, 24) . '...', array('<' => '<', '>' => '>', '"' => '"')) : $row['subject'], + 'preview' => $row['body'], + 'time' => timeformat($row['posterTime']), + 'timestamp' => $row['posterTime'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.new;topicseen#new', + 'link' => '' . $row['subject'] . '' + ); + } + mysql_free_result($request); + + return $posts; +} + +// Find the ten most recent posts. +function RecentPosts() +{ + global $txt, $scripturl, $db_prefix, $user_info, $context, $ID_MEMBER, $modSettings, $sourcedir; + + // They're deleting something... just skip back to it. + if (isset($_GET['delete'])) + { + // Luckily, removeMessage() checks permissions for us. + require_once($sourcedir . '/RemoveTopic.php'); + removeMessage((int) $_GET['delete']); + + redirectexit('action=recent'); + } + + loadTemplate('Recent'); + $context['page_title'] = $txt[214]; + + // Find the 10 most recent messages they can *view*. + $request = db_query(" + SELECT m.ID_MSG + FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b + WHERE b.ID_BOARD = m.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " + AND b.ID_BOARD != $modSettings[recycle_board]" : '') . " + AND $user_info[query_see_board] + ORDER BY m.ID_MSG DESC + LIMIT 10", __FILE__, __LINE__); + $messages = array(); + while ($row = mysql_fetch_assoc($request)) + $messages[] = $row['ID_MSG']; + mysql_free_result($request); + + if (empty($messages)) + { + $context['posts'] = array(); + return; + } + + // Get all the most recent posts. + $request = db_query(" + SELECT + m.ID_MSG, m.subject, m.smileysEnabled, m.posterTime, m.body, m.ID_TOPIC, t.ID_BOARD, b.ID_CAT, + b.name AS bname, c.name AS cname, t.numReplies, m.ID_MEMBER, m2.ID_MEMBER AS ID_FIRST_MEMBER, + IFNULL(mem2.realName, m2.posterName) AS firstPosterName, t.ID_FIRST_MSG, + IFNULL(mem.realName, m.posterName) AS posterName, t.ID_LAST_MSG + FROM ({$db_prefix}messages AS m, {$db_prefix}messages AS m2, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}categories AS c) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER = m2.ID_MEMBER) + WHERE m2.ID_MSG = t.ID_FIRST_MSG + AND t.ID_TOPIC = m.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD + AND c.ID_CAT = b.ID_CAT + AND m.ID_MSG IN (" . implode(', ', $messages) . ") + ORDER BY m.ID_MSG DESC + LIMIT 0, 10", __FILE__, __LINE__); + $counter = 1; + $context['posts'] = array(); + $board_ids = array('own' => array(), 'any' => array()); + while ($row = mysql_fetch_assoc($request)) + { + // Censor everything. + censorText($row['body']); + censorText($row['subject']); + + // BBC-atize the message. + $row['body'] = doUBBC($row['body'], $row['smileysEnabled']); + + // And build the array. + $context['posts'][$row['ID_MSG']] = array( + 'id' => $row['ID_MSG'], + 'counter' => $counter++, + 'category' => array( + 'id' => $row['ID_CAT'], + 'name' => $row['cname'], + 'href' => $scripturl . '#' . $row['ID_CAT'], + 'link' => '' . $row['cname'] . '' + ), + 'board' => array( + 'id' => $row['ID_BOARD'], + 'name' => $row['bname'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['bname'] . '' + ), + 'topic' => $row['ID_TOPIC'], + 'icon' => file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? $settings['images_url'] . '/post/' . $row['icon'] . '.gif' : $settings['default_images_url'] . '/post/' . $row['icon'] . '.gif', + 'views' => $row['numViews'], + 'replies' => $row['numReplies'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'], + 'link' => '' . $row['subject'] . '', + 'start' => $row['numReplies'], + 'subject' => $row['subject'], + 'time' => timeformat($row['posterTime']), + 'timestamp' => $row['posterTime'], + 'first_poster' => array( + 'id' => $row['ID_FIRST_MEMBER'], + 'name' => $row['firstPosterName'], + 'href' => empty($row['ID_FIRST_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'], + 'link' => empty($row['ID_FIRST_MEMBER']) ? $row['firstPosterName'] : '' . $row['firstPosterName'] . '' + ), + 'poster' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['posterName'], + 'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '' . $row['posterName'] . '' + ), + 'message' => $row['body'], + 'can_reply' => false, + 'can_mark_notify' => false, + 'can_delete' => false, + 'delete_possible' => $row['ID_FIRST_MSG'] != $row['ID_MSG'] || $row['ID_LAST_MSG'] == $row['ID_MSG'] + ); + + if ($ID_MEMBER == $row['ID_FIRST_MEMBER']) + $board_ids['own'][$row['ID_BOARD']][] = $row['ID_MSG']; + $board_ids['any'][$row['ID_BOARD']][] = $row['ID_MSG']; + } + mysql_free_result($request); + + // There might be - and are - different permissions between any and own. + $permissions = array( + 'own' => array( + 'post_reply_own' => 'can_reply', + 'remove_own' => 'can_delete', + ), + 'any' => array( + 'post_reply_any' => 'can_reply', + 'mark_any_notify' => 'can_mark_notify', + 'remove_any' => 'can_delete', + ) + ); + + // Now go through all the permissions, looking for boards they can do it on. + foreach ($permissions as $type => $list) + foreach ($list as $permission => $allowed) + { + // They can do it on these boards... + $boards = boardsAllowedTo($permission); + + // If 0 is the only thing in the array, they can do it everywhere! + if (!empty($boards) && $boards[0] == 0) + $boards = array_keys($board_ids[$type]); + + // Go through the boards, and look for posts they can do this on. + foreach ($boards as $board_id) + { + // Hmm, they have permission, but there are no topics from that board on this page. + if (!isset($board_ids[$type][$board_id])) + continue; + + // Okay, looks like they can do it for these posts. + foreach ($board_ids[$type][$board_id] as $counter) + $context['posts'][$counter][$allowed] = true; + } + } + + // Some posts - the first posts - can't just be deleted. + foreach ($context['posts'] as $counter => $dummy) + $context['posts'][$counter]['can_delete'] &= $context['posts'][$counter]['delete_possible']; +} + +// Find unread topics and replies. +function UnreadTopics() +{ + global $board, $txt, $scripturl, $db_prefix, $sourcedir; + global $ID_MEMBER, $user_info, $context, $modSettings; + + // Guests can't have unread things, we don't know anything about them. + is_not_guest(); + + $context['sub_template'] = $_REQUEST['action'] == 'unread' ? 'unread' : 'replies'; + $context['showing_all_topics'] = isset($_GET['all']); + if ($_REQUEST['action'] == 'unread') + $context['page_title'] = $context['showing_all_topics'] ? $txt['unread_topics_all'] : $txt['unread_topics_visit']; + else + $context['page_title'] = $txt['unread_replies']; + + $context['linktree'][] = array( + 'url' => $scripturl . '?action=' . $_REQUEST['action'] . ($context['showing_all_topics'] ? ';all' : '') . (empty($board) ? '' : ';board=' . $board . '.0'), + 'name' => $context['page_title'] + ); + + loadTemplate('Recent'); + + $is_topics = $_REQUEST['action'] == 'unread'; + + // Are we specifying any specific board? + if (!empty($board)) + $query_this_board = 'b.ID_BOARD = ' . $board; + else + { + $query_this_board = $user_info['query_see_board']; + + // Don't bother to show deleted posts! + if (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0) + $query_this_board .= ' + AND b.ID_BOARD != ' . $modSettings['recycle_board']; + } + + // This part is the same for each query. + $select_clause = ' + ms.subject AS firstSubject, ms.posterTime AS firstPosterTime, ms.ID_TOPIC, t.ID_BOARD, b.name AS bname, + t.numReplies, t.numViews, ms.ID_MEMBER AS ID_FIRST_MEMBER, ml.ID_MEMBER AS ID_LAST_MEMBER, + ml.posterTime AS lastPosterTime, IFNULL(mems.realName, ms.posterName) AS firstPosterName, + IFNULL(meml.realName, ml.posterName) AS lastPosterName, ml.subject AS lastSubject, + ml.icon AS lastIcon, ms.icon AS firstIcon, t.ID_POLL, t.isSticky, t.locked, ml.modifiedTime AS lastModifiedTime, + IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS isRead, LEFT(ml.body, 384) AS lastBody, LEFT(ms.body, 384) AS firstBody, + ml.smileysEnabled AS lastSmileys, ms.smileysEnabled AS firstSmileys, t.ID_FIRST_MSG, t.ID_LAST_MSG'; + + if ($context['showing_all_topics'] || !$is_topics) + { + if (!empty($board)) + { + $request = db_query(" + SELECT MIN(logTime) + FROM {$db_prefix}log_mark_read + WHERE ID_MEMBER = $ID_MEMBER + AND ID_BOARD = $board", __FILE__, __LINE__); + list ($earliest_time) = mysql_fetch_row($request); + mysql_free_result($request); + } + else + { + $request = db_query(" + SELECT MIN(lmr.logTime) + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_MEMBER = $ID_MEMBER AND lmr.ID_BOARD = b.ID_BOARD) + WHERE $user_info[query_see_board]", __FILE__, __LINE__); + list ($earliest_time) = mysql_fetch_row($request); + mysql_free_result($request); + } + + $request = db_query(" + SELECT MIN(logTime) + FROM {$db_prefix}log_topics + WHERE ID_MEMBER = $ID_MEMBER", __FILE__, __LINE__); + list ($earliest_time2) = mysql_fetch_row($request); + mysql_free_result($request); + + if ($earliest_time2 < $earliest_time) + $earliest_time = (int) $earliest_time2; + else + $earliest_time = (int) $earliest_time; + } + + if ($is_topics) + { + $request = db_query(" + SELECT COUNT(DISTINCT t.ID_TOPIC), MIN(t.ID_LAST_MSG) + FROM ({$db_prefix}messages AS ml, {$db_prefix}topics AS t, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER) + WHERE b.ID_BOARD = t.ID_BOARD + AND $query_this_board" . ($context['showing_all_topics'] ? " + AND ml.posterTime >= $earliest_time" : " + AND t.ID_LAST_MSG > $_SESSION[ID_MSG_LAST_VISIT]") . " + AND ml.ID_MSG = t.ID_LAST_MSG + AND IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) < ml.posterTime", __FILE__, __LINE__); + list ($num_topics, $min_message) = mysql_fetch_row($request); + mysql_free_result($request); + + // Make sure the starting place makes sense and construct the page index. + if (empty($board)) + $context['page_index'] = constructPageIndex($scripturl . '?action=' . $_REQUEST['action'] . ($context['showing_all_topics'] ? ';all' : ''), $_REQUEST['start'], $num_topics, $modSettings['defaultMaxTopics']); + else + $context['page_index'] = constructPageIndex($scripturl . '?action=' . $_REQUEST['action'] . ($context['showing_all_topics'] ? ';all' : '') . ';board=' . $board, $_REQUEST['start'], $num_topics, $modSettings['defaultMaxTopics'], true); + $context['current_page'] = (int) $_REQUEST['start'] / $modSettings['defaultMaxTopics']; + + if ($num_topics == 0) + { + $context['topics'] = array(); + return; + } + else + $min_message = (int) $min_message; + + $request = db_query(" + SELECT $select_clause + FROM ({$db_prefix}messages AS ms, {$db_prefix}messages AS ml, {$db_prefix}topics AS t, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}members AS mems ON (mems.ID_MEMBER = ms.ID_MEMBER) + LEFT JOIN {$db_prefix}members AS meml ON (meml.ID_MEMBER = ml.ID_MEMBER) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER) + WHERE t.ID_TOPIC = ms.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD + AND $query_this_board + AND ms.ID_MSG = t.ID_FIRST_MSG + AND ml.ID_MSG = t.ID_LAST_MSG + AND t.ID_LAST_MSG >= $min_message + AND IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) < ml.posterTime + ORDER BY ml.ID_MSG DESC + LIMIT $_REQUEST[start], $modSettings[defaultMaxTopics]", __FILE__, __LINE__); + } + else + { + $request = db_query(" + SELECT COUNT(DISTINCT t.ID_TOPIC), MIN(t.ID_LAST_MSG) + FROM ({$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ml, {$db_prefix}messages AS m) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER) + WHERE m.ID_TOPIC = t.ID_TOPIC + AND m.ID_MEMBER = $ID_MEMBER + AND ml.ID_MSG = t.ID_LAST_MSG + AND b.ID_BOARD = t.ID_BOARD + AND $query_this_board + AND ml.posterTime >= $earliest_time + AND IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) < ml.posterTime", __FILE__, __LINE__); + list ($num_topics, $min_message) = mysql_fetch_row($request); + mysql_free_result($request); + + // Make sure the starting place makes sense and construct the page index. + if (empty($board)) + $context['page_index'] = constructPageIndex($scripturl . '?action=' . $_REQUEST['action'], $_REQUEST['start'], $num_topics, $modSettings['defaultMaxTopics']); + else + $context['page_index'] = constructPageIndex($scripturl . '?action=' . $_REQUEST['action'] . ';board=' . $board, $_REQUEST['start'], $num_topics, $modSettings['defaultMaxTopics'], true); + $context['current_page'] = (int) $_REQUEST['start'] / $modSettings['defaultMaxTopics']; + + if ($num_topics == 0) + { + $context['topics'] = array(); + return; + } + else + $min_message = (int) $min_message; + + $request = db_query(" + SELECT DISTINCT t.ID_TOPIC + FROM ({$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ml, {$db_prefix}messages AS m) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER) + WHERE ml.ID_MEMBER != $ID_MEMBER + AND m.ID_TOPIC = t.ID_TOPIC + AND m.ID_MEMBER = $ID_MEMBER + AND ml.ID_MSG = t.ID_LAST_MSG + AND b.ID_BOARD = t.ID_BOARD + AND $query_this_board + AND t.ID_LAST_MSG >= $min_message + AND IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) < ml.posterTime + ORDER BY ml.ID_MSG DESC + LIMIT $_REQUEST[start], $modSettings[defaultMaxTopics]", __FILE__, __LINE__); + $topics = array(); + while ($row = mysql_fetch_assoc($request)) + $topics[] = $row['ID_TOPIC']; + mysql_free_result($request); + + // Sanity... where have you gone? + if (empty($topics)) + { + $context['topics'] = array(); + return; + } + + $request = db_query(" + SELECT $select_clause + FROM ({$db_prefix}messages AS ms, {$db_prefix}messages AS ml, {$db_prefix}topics AS t, {$db_prefix}boards AS b) + LEFT JOIN {$db_prefix}members AS mems ON (mems.ID_MEMBER = ms.ID_MEMBER) + LEFT JOIN {$db_prefix}members AS meml ON (meml.ID_MEMBER = ml.ID_MEMBER) + LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) + LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER) + WHERE t.ID_TOPIC IN (" . implode(', ', $topics) . ") + AND t.ID_TOPIC = ms.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD + AND ms.ID_MSG = t.ID_FIRST_MSG + AND ml.ID_MSG = t.ID_LAST_MSG + ORDER BY ml.ID_MSG DESC + LIMIT " . count($topics), __FILE__, __LINE__); + } + + $context['topics'] = array(); + $topic_ids = array(); + while ($row = mysql_fetch_assoc($request)) + { + if ($row['ID_POLL'] > 0 && $modSettings['pollMode'] == '0') + continue; + + $topic_ids[] = $row['ID_TOPIC']; + + // Clip the strings first because censoring is slow :/. (for some reason?) + $row['firstBody'] = strip_tags(strtr(doUBBC($row['firstBody'], $row['firstSmileys']), array('
    ' => ' '))); + if (strlen($row['firstBody']) > 128) + $row['firstBody'] = substr($row['firstBody'], 0, 128) . '...'; + $row['lastBody'] = strip_tags(strtr(doUBBC($row['lastBody'], $row['lastSmileys']), array('
    ' => ' '))); + if (strlen($row['lastBody']) > 128) + $row['lastBody'] = substr($row['lastBody'], 0, 128) . '...'; + + // Do a bit of censoring... + censorText($row['firstSubject']); + censorText($row['firstBody']); + + // But don't do it twice, it can be a slow ordeal! + if ($row['ID_FIRST_MSG'] == $row['ID_LAST_MSG']) + { + $row['lastSubject'] = $row['firstSubject']; + $row['lastBody'] = $row['firstBody']; + } + else + { + censorText($row['lastSubject']); + censorText($row['lastBody']); + } + + // Decide how many pages the topic should have. + $topic_length = $row['numReplies'] + 1; + if ($topic_length > $modSettings['defaultMaxMessages']) + { + $tmppages = array(); + $tmpa = 1; + for ($tmpb = 0; $tmpb < $topic_length; $tmpb += $modSettings['defaultMaxMessages']) + { + $tmppages[] = '' . $tmpa . ''; + $tmpa++; + } + // Show links to all the pages? + if (count($tmppages) <= 5) + $pages = '« ' . implode(' ', $tmppages); + // Or skip a few? + else + $pages = '« ' . $tmppages[0] . ' ' . $tmppages[1] . ' ... ' . $tmppages[count($tmppages) - 2] . ' ' . $tmppages[count($tmppages) - 1]; + + if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages']) + $pages .= '  ' . $txt[190] . ''; + $pages .= ' »'; + } + else + $pages = ''; + + // And build the array. + $context['topics'][$row['ID_TOPIC']] = array( + 'id' => $row['ID_TOPIC'], + 'first_post' => array( + 'member' => array( + 'name' => $row['firstPosterName'], + 'id' => $row['ID_FIRST_MEMBER'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'], + 'link' => !empty($row['ID_FIRST_MEMBER']) ? '' . $row['firstPosterName'] . '' : $row['firstPosterName'] + ), + 'time' => timeformat($row['firstPosterTime']), + 'timestamp' => $row['firstPosterTime'], + 'subject' => $row['firstSubject'], + 'preview' => $row['firstBody'], + 'icon' => $row['firstIcon'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;topicseen', + 'link' => '' . $row['firstSubject'] . '' + ), + 'last_post' => array( + 'member' => array( + 'name' => $row['lastPosterName'], + 'id' => $row['ID_LAST_MEMBER'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_LAST_MEMBER'], + 'link' => !empty($row['ID_LAST_MEMBER']) ? '' . $row['lastPosterName'] . '' : $row['lastPosterName'] + ), + 'time' => timeformat($row['lastPosterTime']), + 'timestamp' => $row['lastPosterTime'], + 'subject' => $row['lastSubject'], + 'preview' => $row['lastBody'], + 'icon' => $row['lastIcon'], + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . ';topicseen#msg' . $row['ID_LAST_MSG'], + 'link' => '' . $row['lastSubject'] . '' + ), + 'newtime' => $row['isRead'], + 'new_href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.from' . $row['isRead'] . ';topicseen#new', + 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.from' . $row['isRead']) . ';topicseen#new', + 'link' => '' . $row['firstSubject'] . '', + 'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($row['isSticky']), + 'is_locked' => !empty($row['locked']), + 'is_poll' => $modSettings['pollMode'] == '1' && $row['ID_POLL'] > 0, + 'is_hot' => $row['numReplies'] >= $modSettings['hotTopicPosts'], + 'is_very_hot' => $row['numReplies'] >= $modSettings['hotTopicVeryPosts'], + 'is_posted_in' => false, + 'icon' => $row['firstIcon'], + 'subject' => $row['firstSubject'], + 'pages' => $pages, + 'replies' => $row['numReplies'], + 'views' => $row['numViews'], + 'board' => array( + 'id' => $row['ID_BOARD'], + 'name' => $row['bname'], + 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', + 'link' => '' . $row['bname'] . '' + ) + ); + + determineTopicClass($context['topics'][$row['ID_TOPIC']]); + } + mysql_free_result($request); + + if ($is_topics && !empty($modSettings['enableParticipation']) && !empty($topic_ids)) + { + $result = db_query(" + SELECT ID_TOPIC + FROM {$db_prefix}messages + WHERE ID_TOPIC IN (" . implode(', ', $topic_ids) . ") + AND ID_MEMBER = $ID_MEMBER", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + if (empty($context['topics'][$row['ID_TOPIC']]['is_posted_in'])) + { + $context['topics'][$row['ID_TOPIC']]['is_posted_in'] = true; + $context['topics'][$row['ID_TOPIC']]['class'] = 'my_' . $context['topics'][$row['ID_TOPIC']]['class']; + } + } + mysql_free_result($result); + } + + $context['topics_to_mark'] = implode('-', $topic_ids); +} + +?> diff --git a/Sources/Register.php b/Sources/Register.php new file mode 100644 index 0000000..975bafd --- /dev/null +++ b/Sources/Register.php @@ -0,0 +1,916 @@ +validate_submit()) { + //Entered incorrectly! + case 2: + fatal_error($txt['captchaWrong']); + case 3: + fatal_error($txt['captchaMaxTries']); + + } + + //End CAPTCHA Mod + + // Well, if you don't agree, you can't register. + if (!empty($modSettings['requireAgreement']) && (empty($_POST['regagree']) || $_POST['regagree'] == 'no')) + redirectexit(); + + // You cannot register twice... + if (empty($user_info['is_guest'])) + redirectexit(); + + // Make sure they came from *somewhere*, have a session, and didn't just register with this session. + if (!isset($_SESSION['old_url'])) + redirectexit('action=register'); + if (!empty($_SESSION['just_registered'])) + fatal_lang_error(1, false); + } + + require_once($sourcedir . '/Subs-Post.php'); + loadLanguage('Login'); + + foreach ($_POST as $key => $value) + { + if (!is_array($_POST[$key])) + $_POST[$key] = str_replace(array("\n", "\r"), '', trim($_POST[$key])); + } + + // No name?! How can you register with no name? + if (!isset($_POST['user']) || trim($_POST['user']) == '') + fatal_lang_error(37, false); + + // Trim any whitespace from the username. + $_POST['user'] = trim(preg_replace('~[\t\n\r\x0B\0\xA0]+~', ' ', $_POST['user'])); + + // Don't use too long a name. + if (mb_strlen($_POST['user']) > 25) + $_POST['user'] = trim(mb_substr($_POST['user'], 0, 25)); + + // Only these characters are permitted. + if (preg_match('~[<>&"\'=\\\]~', $_REQUEST['user']) != 0 || $_POST['user'] == '_' || $_POST['user'] == '|' || strpos($_POST['user'], '[code]') !== false || strpos($_POST['user'], '[/code]') !== false) + fatal_lang_error(240, false); + + if (stristr($_POST['user'], $txt[28]) !== false) + fatal_lang_error(244, true, array($txt[28])); + + if (empty($_POST['email']) || preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]+@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', stripslashes($_POST['email'])) == 0) + fatal_error(sprintf($txt[500], $_POST['user']), false); + + if (isReservedName($_POST['user'], 0, false)) + fatal_error('(' . htmlspecialchars($_POST['user']) . ') ' . $txt[473], false); + + // Generate a password if it's supposed to be emailed. + $password = ''; + if ((!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1 && !$user_info['is_admin']) || (isset($_POST['emailActivate']) && $user_info['is_admin'])) + { + // Randomly generate a password and remove all non alpha-numeric characters. + $password = substr(preg_replace('/\W/', '', md5(rand())), 0, 10); + } + + // If you haven't put in a password generate one. + if ($user_info['is_admin'] && $_POST['password'] == '') + { + srand(time() + 1277); + $_POST['passwrd1'] = substr(preg_replace('/\W/', '', md5(rand())), 0, 10); + $_POST['passwrd2'] = $_POST['passwrd1']; + } + elseif ($user_info['is_admin']) + { + $_POST['passwrd1'] = $_POST['password']; + $_POST['passwrd2'] = $_POST['passwrd1']; + } + + if ($_POST['passwrd1'] != $_POST['passwrd2']) + fatal_lang_error(213, false); + + if ($_POST['passwrd1'] == '') + fatal_lang_error(91, false); + + // Clear ban on email address, the user might come up with a better address. + if (!empty($_SESSION['ban']['cannot_register']['type']) && $_SESSION['ban']['cannot_register']['type'] == 'email_ban') + $_SESSION['ban']['cannot_register'] = array( + 'is_banned' => false + ); + if (!empty($_SESSION['ban']['full_ban']['type']) && $_SESSION['ban']['full_ban']['type'] == 'email_ban') + $_SESSION['ban']['full_ban'] = array( + 'is_banned' => false + ); + + // Is this email address banned? + $request = db_query(" + SELECT restriction_type, reason + FROM {$db_prefix}banned + WHERE ban_type = 'email_ban' + AND '$_POST[email]' LIKE email_address + AND (restriction_type = 'cannot_register' OR restriction_type = 'full_ban')", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + while ($row = mysql_fetch_assoc($request)) + { + $_SESSION['ban'][$row['restriction_type']] = array( + 'is_banned' => true, + 'reason' => empty($row['reason']) ? '' : '

    ' . $txt['ban_reason'] . ': ' . $row['reason'], + 'type' => 'email_ban' + ); + } + mysql_free_result($request); + + // This email address must be registered as banned. + if (isset($_SESSION['ban']) && ($_SESSION['ban']['full_ban']['is_banned'] || $_SESSION['ban']['cannot_register']['is_banned'])) + { + // Log this ban for future reference. + db_query(" + INSERT INTO {$db_prefix}log_banned + (ID_MEMBER, ip, email, logTime) + VALUES (0, '$user_info[ip]', '$_POST[email]', " . time() . ')', __FILE__, __LINE__); + + // Full ban. Get the default ban error. + if ($_SESSION['ban']['full_ban']['is_banned']) + fatal_error(sprintf($txt[430], $txt[28]) . $_SESSION['ban']['full_ban']['reason']); + + // 'Cannot register' ban. + if ($_SESSION['ban']['cannot_register']['is_banned']) + fatal_error($txt['ban_register_prohibited'] . '!' . $_SESSION['ban']['cannot_register']['reason']); + } + + // Check if the email address is in use. + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE emailAddress = '$_POST[email]' + OR emailAddress = '$_POST[user]' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) != 0) + fatal_error(sprintf($txt[730], htmlspecialchars($_POST['email'])), false); + mysql_free_result($request); + + // Some of these might be overwritten. (the lower ones that are in the arrays below.) + $register_vars = array( + 'memberName' => "'$_POST[user]'", + 'emailAddress' => "'$_POST[email]'", + 'passwd' => '\'' . md5_hmac($_POST['passwrd1'], strtolower($_POST['user'])) . '\'', + 'posts' => 0, + 'dateRegistered' => time(), + 'memberIP' => "'$user_info[ip]'", + 'is_activated' => empty($modSettings['registration_method']) || (!isset($_POST['emailActivate']) && $user_info['is_admin']) ? 1 : 0, + 'validation_code' => !empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1 ? "'$password'" : "''", + 'realName' => "'$_POST[user]'", + 'personalText' => '\'' . addslashes($modSettings['default_personalText']) . '\'', + 'im_email_notify' => 1, + 'ID_THEME' => 0, + 'ID_POST_GROUP' => 4, + 'possibleBot' => $possibleBot, + ); + + // Make sure the ID_GROUP will be valid, if this is an administator. + if ($user_info['is_admin']) + $register_vars['ID_GROUP'] = empty($_POST['group']) ? 0 : (int) $_POST['group']; + + $possible_strings = array( + 'realName', + 'lngfile', + 'personalText', 'signature', 'avatar', + 'location', + 'websiteTitle', 'websiteUrl', + 'gender', + 'timeFormat', + 'secretQuestion', 'secretAnswer', + 'smileySet', + 'birthdate', + ); + $possible_ints = array( + 'ICQ', 'AIM', 'YIM', 'MSN', + 'ID_THEME', + ); + $possible_floats = array( + 'timeOffset', + ); + $possible_bools = array( + 'hideEmail', 'showOnline', + 'im_email_notify', + 'notifyAnnouncements', 'notifyOnce', + ); + + // Handle a string as a birthdate... + if (isset($_POST['birthdate']) && $_POST['birthdate'] != '') + $_POST['birthdate'] = strftime('%Y-%m-%d', strtotime($_POST['birthdate'])); + // Or birthdate parts... + elseif (!empty($_POST['bday1']) && !empty($_POST['bday2'])) + $_POST['birthdate'] = sprintf('%04d-%02d-%02d', empty($_POST['bday3']) ? 0 : (int) $_POST['bday3'], (int) $_POST['bday1'], (int) $_POST['bday2']); + + if (isset($_POST['lngfile']) && !empty($modSettings['userLanguage'])) + { + $language_directories = array( + $settings['default_theme_dir'] . '/languages', + $settings['actual_theme_dir'] . '/languages', + ); + if (!empty($settings['base_theme_dir'])) + $language_directories[] = $settings['base_theme_dir'] . '/languages'; + $language_directories = array_unique($language_directories); + + foreach ($language_directories as $language_dir) + { + if (!file_exists($language_dir)) + continue; + + $dir = dir($language_dir); + while ($entry = $dir->read()) + if (preg_match('~^index\.(.+)\.php$~', $entry, $matches) && $matches[1] == $_POST['lngfile']) + { + $found = true; + $_SESSION['language'] = $_POST['lngfile']; + break; + } + $dir->close(); + } + + if (empty($found)) + unset($_POST['lngfile']); + } + else + unset($_POST['lngfile']); + + foreach ($possible_strings as $var) + if (isset($_POST[$var])) + $register_vars[$var] = '\'' . $_POST[$var] . '\''; + foreach ($possible_ints as $var) + if (isset($_POST[$var])) + $register_vars[$var] = (int) $_POST[$var]; + foreach ($possible_floats as $var) + if (isset($_POST[$var])) + $register_vars[$var] = (float) $_POST[$var]; + foreach ($possible_bools as $var) + if (isset($_POST[$var])) + $register_vars[$var] = empty($_POST[$var]) ? 0 : 1; + + // Register options are always default options... + if (isset($_POST['default_options'])) + $_POST['options'] = isset($_POST['options']) ? $_POST['options'] + $_POST['default_options'] : $_POST['default_options']; + + // Administrator? We'll need to fetch the default theme options for the guest, then. + if ($user_info['is_admin']) + { + $result = db_query(" + SELECT variable, value + FROM {$db_prefix}themes + WHERE ID_MEMBER = -1 + AND ID_THEME" . ($settings['theme_id'] == 1 ? ' = 1' : " IN ($settings[theme_id], 1)"), __FILE__, __LINE__); + $options2 = array(); + while ($row = mysql_fetch_assoc($result)) + { + if (!isset($options2[$row['variable']]) || $row['ID_THEME'] != '1') + $options2[$row['variable']] = $row['value']; + } + mysql_free_result($result); + + $theme_vars = (isset($_POST['options']) && is_array($_POST['options']) ? $_POST['options'] : array()) + $options2; + } + // Set up the theme variables.... then add $options for the defaults. + else + $theme_vars = (isset($_POST['options']) && is_array($_POST['options']) ? $_POST['options'] : array()) + $options; + + // Register them into the database. + db_query(" + INSERT INTO {$db_prefix}members + (" . implode(', ', array_keys($register_vars)) . ") + VALUES (" . implode(', ', $register_vars) . ')', __FILE__, __LINE__); + $memberID = db_insert_id(); + updateStats('member'); + + // Theme variables too? + if (!empty($theme_vars)) + { + $setString = ''; + foreach ($theme_vars as $var => $val) + $setString .= " + ($memberID, '$var', '$val'),"; + db_query(" + INSERT INTO {$db_prefix}themes + (ID_MEMBER, variable, value) + VALUES " . substr($setString, 0, -1), __FILE__, __LINE__); + } + + // If it's enabled, increase the registrations for today. + trackStats(array('registers' => '+')); + + // Administrative registrations are a bit different... + if ($context['user']['is_admin']) + { + if (isset($_POST['emailActivate'])) + sendmail($_POST['email'], $txt[700] . ' ' . $context['forum_name'], + "$txt[hello_guest] $_POST[user]!\n\n" . + "$txt[719] $_POST[user], $txt[492] $_POST[passwrd1]\n\n" . + "$txt[activate_mail]:\n\n" . + "$scripturl?action=activate;u=$memberID;code=$password\n\n" . + "$txt[activate_code]: $password\n\n" . + $txt[130]); + elseif (isset($_POST['emailPassword'])) + sendmail($_POST['email'], $txt[700] . ' ' . $context['forum_name'], + "$txt[hello_guest] $_POST[user]!\n\n" . + "$txt[719] $_POST[user], $txt[492] $_POST[passwrd1]\n\n" . + "$txt[701]\n" . + "$scripturl?action=profile\n\n" . + $txt[130]); + + redirectexit('action=regcenter'); + } + + // Can post straight away - welcome them to your fantastic community... + if (empty($modSettings['registration_method'])) + { + if (!empty($modSettings['send_welcomeEmail'])) + sendmail($_POST['email'], $txt[700] . ' ' . $context['forum_name'], + "$txt[hello_guest] $_POST[user]!\n\n" . + "$txt[719] $_POST[user], $txt[492] $_POST[passwrd1]\n\n" . + "$txt[701]\n" . + "$scripturl?action=profile\n\n" . + $txt[130]); + // Send admin their notification. + adminNotify('standard', $memberID, $_POST['user']); + } + // Need to activate their account. + elseif ($modSettings['registration_method'] == 1) + { + sendmail($_POST['email'], $txt[700] . ' ' . $context['forum_name'], + "$txt[hello_guest] $_POST[user]!\n\n" . + "$txt[719] $_POST[user], $txt[492] $_POST[passwrd1]\n\n" . + "$txt[activate_mail]:\n\n" . + "$scripturl?action=activate;u=$memberID;code=$password\n\n" . + "$txt[activate_code]: $password\n\n" . + $txt[130]); + } + // Must be awaiting approval. + else + { + sendmail($_POST['email'], $txt[700] . ' ' . $context['forum_name'], + "$txt[hello_guest] $_POST[user]!\n\n" . + "$txt[719] $_POST[user], $txt[492] $_POST[passwrd1]\n\n" . + "$txt[approval_email]\n\n" . + $txt[130]); + // Admin gets informed here... + adminNotify('approval', $memberID, $_POST['user']); + } + + // Okay, they're for sure registered... make sure the session is aware of this for security. (Just married :P!) + $_SESSION['just_registered'] = 1; + + // Basic template variable setup. + if (!empty($modSettings['registration_method'])) + { + loadTemplate('Register'); + + $context += array( + 'page_title' => &$txt[97], + 'sub_template' => 'after', + 'description' => $modSettings['registration_method'] == 2 ? $txt['approval_after_registration'] : $txt['activate_after_registration'] + ); + } + else + { + require_once($sourcedir . '/Subs-Auth.php'); + + setLoginCookie(60 * $modSettings['cookieTime'], $memberID, md5_hmac($_POST['passwrd1'], strtolower($_POST['user']))); + + redirectexit('action=login2;sa=check;member=' . $memberID, true, $context['server']['needs_login_fix']); + } +} + +function Activate() +{ + global $db_prefix, $context, $txt, $modSettings, $scripturl, $sourcedir; + + loadTemplate('Login'); + loadLanguage('Login'); + + if (empty($_REQUEST['u']) && empty($_POST['user'])) + { + if (empty($modSettings['registration_method']) || $modSettings['registration_method'] == 3) + fatal_lang_error(1); + + $context['member_id'] = 0; + $context['sub_template'] = 'resend'; + $context['page_title'] = $txt['invalid_activation_resend']; + $context['can_activate'] = empty($modSettings['registration_method']) || $modSettings['registration_method'] == 1; + $context['default_username'] = isset($_GET['user']) ? $_GET['user'] : ''; + + return; + } + + // Get the code from the database... + $request = db_query(" + SELECT ID_MEMBER, validation_code, memberName, emailAddress, is_activated, passwd + FROM {$db_prefix}members" . (empty($_REQUEST['u']) ? " + WHERE memberName = '$_POST[user]' OR emailAddress = '$_POST[user]'" : " + WHERE ID_MEMBER = " . (int) $_REQUEST['u']) . " + LIMIT 1", __FILE__, __LINE__); + + // Does this user exist at all? + if (mysql_num_rows($request) == 0) + { + $context['sub_template'] = 'retry_activate'; + $context['page_title'] = $txt['invalid_userid']; + $context['member_id'] = 0; + + return; + } + + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + // Change their email address? (they probably tried a fake one first :P.) + if (isset($_POST['new_email']) && isset($_REQUEST['passwd']) && md5_hmac($_REQUEST['passwd'], strtolower($row['memberName'])) == $row['passwd']) + { + if (empty($modSettings['registration_method']) || $modSettings['registration_method'] == 3) + fatal_lang_error(1); + + if (preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]+@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', stripslashes($_POST['new_email'])) == 0) + fatal_error(sprintf($txt[500], htmlspecialchars($_POST['new_email'])), false); + + // Maybe they'll have a better email address for us this time? + if (!empty($_SESSION['ban']['cannot_register']['type']) && $_SESSION['ban']['cannot_register']['type'] == 'email_ban') + $_SESSION['ban']['cannot_register'] = array( + 'is_banned' => false + ); + if (!empty($_SESSION['ban']['full_ban']['type']) && $_SESSION['ban']['full_ban']['type'] == 'email_ban') + $_SESSION['ban']['full_ban'] = array( + 'is_banned' => false + ); + + // Okay, boy, you banned? + $request = db_query(" + SELECT restriction_type, reason + FROM {$db_prefix}banned + WHERE ban_type = 'email_ban' + AND '$_POST[new_email]' LIKE email_address + AND (restriction_type = 'cannot_register' OR restriction_type = 'full_ban')", __FILE__, __LINE__); + while ($row2 = mysql_fetch_assoc($request)) + { + $_SESSION['ban'][$row2['restriction_type']] = array( + 'is_banned' => true, + 'reason' => empty($row2['reason']) ? '' : '

    ' . $txt['ban_reason'] . ': ' . $row2['reason'], + 'type' => 'email_ban' + ); + } + mysql_free_result($request); + + // Alright... seems that email is banned. Punk? Thought you could get through, eh? + if ($_SESSION['ban']['full_ban']['is_banned'] || $_SESSION['ban']['cannot_register']['is_banned']) + { + // Make a note of this punk. + db_query(" + INSERT INTO {$db_prefix}log_banned + (ID_MEMBER, ip, email, logTime) + VALUES ($row[ID_MEMBER], '$user_info[ip]', '$_POST[new_email]', " . time() . ')', __FILE__, __LINE__); + + // Wow, you're heavy-duty banned.... shucks to be you! + if ($_SESSION['ban']['full_ban']['is_banned']) + fatal_error(sprintf($txt[430], $txt[28]) . $_SESSION['ban']['full_ban']['reason']); + + // Probably just the email host is blocked.. + if ($_SESSION['ban']['cannot_register']['is_banned']) + fatal_error($txt['ban_register_prohibited'] . '!' . $_SESSION['ban']['cannot_register']['reason']); + } + + // Ummm... don't even dare try to take someone else's email!! + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE emailAddress = '$_POST[new_email]' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) != 0) + fatal_error(sprintf($txt[730], htmlspecialchars($_POST['new_email'])), false); + mysql_free_result($request); + + updateMemberData($row['ID_MEMBER'], array('emailAddress' => "'$_POST[new_email]'")); + $row['emailAddress'] = $_POST['new_email']; + + $email_change = true; + } + + // Resend the password, but only if the account wasn't activated yet. + if (!empty($_REQUEST['sa']) && $_REQUEST['sa'] == 'resend' && empty($row['is_activated']) && (!isset($_REQUEST['code']) || $_REQUEST['code'] == '')) + { + require_once($sourcedir . '/Subs-Post.php'); + + sendmail($row['emailAddress'], $txt[700] . ' ' . $context['forum_name'], + "$txt[hello_guest] $row[memberName]!\n\n" . + "$txt[719] $row[memberName]\n\n" . (empty($modSettings['registration_method']) || $modSettings['registration_method'] == 1 ? + "$txt[activate_mail]:\n\n" . + "$scripturl?action=activate;u=$row[ID_MEMBER];code=$row[validation_code]\n\n" . + "$txt[activate_code]: $row[validation_code]\n\n" : + "$txt[approval_email]\n\n") . + $txt[130]); + + $context['page_title'] = $txt['invalid_activation_resend']; + fatal_error(!empty($email_change) ? $txt['change_email_success'] : $txt['resend_email_success'], false); + } + + // Quit if this code is not right. + if (empty($_REQUEST['code']) || $row['validation_code'] != $_REQUEST['code']) + { + if (!empty($row['is_activated'])) + fatal_lang_error('already_activated', false); + elseif ($row['validation_code'] == '') + { + loadLanguage('Profile'); + fatal_error($txt['registration_not_approved'] . ' ' . $txt[662] . '.', false); + } + + $context['sub_template'] = 'retry_activate'; + $context['page_title'] = $txt['invalid_activation_code']; + $context['member_id'] = $row['ID_MEMBER']; + + return; + } + + // Validation complete! + updateMemberData($row['ID_MEMBER'], array('is_activated' => 1, 'validation_code' => '\'\'')); + + if (!isset($_POST['new_email'])) + adminNotify('activation', $row['ID_MEMBER'], $row['memberName']); + + $context += array( + 'page_title' => &$txt[245], + 'sub_template' => 'login', + 'default_username' => $row['memberName'], + 'default_password' => '', + 'never_expire' => false, + 'description' => &$txt['activate_success'] + ); +} + +// Main handling function for the admin approval center +function RegCenter() +{ + global $modSettings, $context, $txt, $db_prefix; + + // Must have sufficient permissions. + isAllowedTo('moderate_forum'); + + loadTemplate('Register'); + loadLanguage('Login'); + + // Set the admin area... + adminIndex('registration_center'); + $context['page_title'] = $txt['registration_center']; + + $subActions = array( + 'register' => 'AdminRegister', + 'register2' => 'Register2', + 'browse' => 'AdminBrowse', + 'approve' => 'AdminApprove' + ); + + // This is just a safety check - if the admin changes a registration setting they can still activate/approve remaining accounts. + $request = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}members + WHERE " . (!empty($modSettings['registration_method']) ? ("validation_code " . ($modSettings['registration_method'] == 2 ? '=' : '!=') . " ''") : "1") . " + AND is_activated = 0", __FILE__, __LINE__); + list ($membersExist) = mysql_fetch_row($request); + mysql_free_result($request); + + // For the page header. + if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] != 3) + $context['types_enabled'] = $modSettings['registration_method'] == 1 ? 'activate' : 'approve'; + + if ($membersExist) + $context['types_enabled'] = 'both'; + + if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']])) + $subActions[$_REQUEST['sa']](); + elseif (!empty($modSettings['registration_method']) && $modSettings['registration_method'] != 3) + AdminBrowse(); + else + AdminRegister(); +} + +// Do the approve/activate/delete stuff +function AdminApprove() +{ + global $txt, $context, $db_prefix, $scripturl, $modSettings, $sourcedir; + + require_once($sourcedir . '/Subs-Post.php'); + + // Nothing to do? + if (!isset($_POST['todoAction'])) + redirectexit('action=regcenter;sa=browse;type=' . $_REQUEST['type'] . ';sort=' . $_REQUEST['sort'] . ';start=' . $_REQUEST['start']); + + // Cycle through each checked member. + foreach ($_POST['todoAction'] as $id => $email) + { + $username = $_POST['username'][$id]; + if ($_POST['todo'] == 'ok' || $_POST['todo'] == 'okemail') + { + // Approve/activate this member. + db_query(" + UPDATE {$db_prefix}members + SET validation_code = '', is_activated = 1 + WHERE ID_MEMBER = $id + LIMIT 1", __FILE__, __LINE__); + + // Check for email. + if ($_POST['todo'] == 'okemail') + sendmail($email, $txt[700] . ' ' . $context['forum_name'], + "$txt[hello_guest] $username!\n\n" . + "$txt[admin_approve_accept_desc] $txt[719] $username\n\n" . + "$txt[701]\n" . + "$scripturl?action=profile\n\n" . + $txt[130]); + } + elseif ($_POST['todo'] == 'reject' || $_POST['todo'] == 'rejectemail') + { + require_once($sourcedir . '/ManageMembers.php'); + deleteMembers($id); + + // Send email telling them they aren't welcome? + if ($_POST['todo'] == 'rejectemail') + sendmail($email, $txt['admin_approve_reject'], + "$username,\n\n" . + "$txt[admin_approve_reject_desc]\n\n" . + $txt[130]); + } + elseif ($_POST['todo'] == 'delete' || $_POST['todo'] == 'deleteemail') + { + require_once($sourcedir . '/ManageMembers.php'); + submitSpammer($id); + deleteMembers($id); + + // Send email telling them they aren't welcome? + if ($_POST['todo'] == 'deleteemail') + sendmail($email, $txt['admin_approve_delete'], + "$username,\n\n" . + "$txt[admin_approve_delete_desc]\n\n" . + $txt[130]); + } + elseif ($_POST['todo'] == 'remind') + { + $request = db_query(" + SELECT validation_code + FROM {$db_prefix}members + WHERE ID_MEMBER = $id + LIMIT 1", __FILE__, __LINE__); + list ($actpass) = mysql_fetch_row($request); + mysql_free_result($request); + + sendmail($email, $txt['admin_approve_remind'], + "$username,\n\n" . + "$txt[admin_approve_remind_desc] $context[forum_name].\n\n$txt[admin_approve_remind_desc2]\n\n" . + "$scripturl?action=activate;u=$id;code=$actpass\n\n" . + $txt[130]); + } + } + + // Update the member's stats. + updateStats('member'); + + redirectexit('action=regcenter;sa=browse;type=' . $_REQUEST['type'] . ';sort=' . $_REQUEST['sort'] . ';start=' . $_REQUEST['start']); +} + +// List all members who are awaiting approval / activation +function AdminBrowse() +{ + global $txt, $context, $db_prefix, $scripturl, $modSettings; + + // Not a lot here! + $context['sub_template'] = 'admin_browse'; + $context['browse_type'] = isset($_REQUEST['type']) ? $_REQUEST['type'] : (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1 ? 'activate' : 'approve'); + + // The columns that can be sorted. + $context['columns'] = array( + 'ID_MEMBER' => array('label' => $txt['admin_browse_id']), + 'memberName' => array('label' => $txt['admin_browse_username']), + 'emailAddress' => array('label' => $txt['admin_browse_email']), + 'memberIP' => array('label' => $txt['admin_browse_ip']), + 'dateRegistered' => array('label' => $txt['admin_browse_registered']), + ); + + // Default sort column to 'dateRegistered' if the current one is unknown or not set. + if (!isset($_REQUEST['sort']) || !array_key_exists($_REQUEST['sort'], $context['columns'])) + $_REQUEST['sort'] = 'dateRegistered'; + + // Provide extra information about each column - the link, whether it's selected, etc. + foreach ($context['columns'] as $col => $dummy) + { + $context['columns'][$col]['href'] = $scripturl . '?action=regcenter;sa=browse;type=' . $context['browse_type'] . ';sort=' . $col . ';start=0'; + if (!isset($_REQUEST['desc']) && $col == $_REQUEST['sort']) + $context['columns'][$col]['href'] .= ';desc'; + + $context['columns'][$col]['link'] = '' . $context['columns'][$col]['label'] . ''; + $context['columns'][$col]['selected'] = $_REQUEST['sort'] == $col; + } + + $context['sort_by'] = $_REQUEST['sort']; + $context['sort_direction'] = !isset($_REQUEST['desc']) ? 'down' : 'up'; + + // Calculate the number of results. + $request = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}members + WHERE validation_code " . ($context['browse_type'] == 'approve' ? '=' : '!=') . " '' + AND is_activated = 0", __FILE__, __LINE__); + list ($num_members) = mysql_fetch_row($request); + mysql_free_result($request); + + // Construct the page links. + $context['page_index'] = constructPageIndex($scripturl . '?action=regcenter;sa=browse;type=' . $context['browse_type'] . ';sort=' . $_REQUEST['sort'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $_REQUEST['start'], $num_members, $modSettings['defaultMaxMembers']); + $context['start'] = $_REQUEST['start']; + + $request = db_query(" + SELECT ID_MEMBER, memberName, emailAddress, memberIP, dateRegistered, possibleBot + FROM {$db_prefix}members + WHERE is_activated = 0 + AND validation_code " . ($context['browse_type'] == 'approve' ? '=' : '!=') . " '' + ORDER BY $_REQUEST[sort]" . (!isset($_REQUEST['desc']) ? '' : ' DESC') . " + LIMIT $_REQUEST[start], $modSettings[defaultMaxMembers]", __FILE__, __LINE__); + + while ($row = mysql_fetch_assoc($request)) + $context['members'][] = array( + 'id' => $row['ID_MEMBER'], + 'username' => $row['memberName'], + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['memberName'] . '', + 'email' => $row['emailAddress'], + 'ip' => $row['memberIP'], + 'dateRegistered' => timeformat($row['dateRegistered']), + 'possibleBot' => $row['possibleBot'], + ); + mysql_free_result($request); +} + +// This function allows the admin to register a new member by hand. +function AdminRegister() +{ + global $txt, $context, $db_prefix; + + // Basic stuff. + $context['sub_template'] = 'admin_register'; + + // Load the assignable member groups. + $request = db_query(" + SELECT groupName, ID_GROUP + FROM {$db_prefix}membergroups + WHERE ID_GROUP != 3 + AND minPosts = -1" . (allowedTo('admin_forum') ? '' : " + AND ID_GROUP != 1") . " + ORDER BY minPosts, IF(ID_GROUP < 4, ID_GROUP, 4), groupName", __FILE__, __LINE__); + $context['member_groups'] = array(0 => &$txt['admin_register_group_none']); + while ($row = mysql_fetch_assoc($request)) + $context['member_groups'][$row['ID_GROUP']] = $row['groupName']; + mysql_free_result($request); +} + +// This simple function gets a list of all administrators and sends them an email to let them know a new member has joined. +function adminNotify($type, $memberID, $memberName = null) +{ + global $txt, $db_prefix, $modSettings, $language, $scripturl, $sourcedir; + + // If the setting isn't enabled then just exit. + if (empty($modSettings['notify_on_new_registration'])) + return; + + require_once($sourcedir . '/Subs-Post.php'); + + if ($memberName == null) + { + // Get the new user's name... + $request = db_query(" + SELECT realName + FROM {$db_prefix}members + WHERE ID_MEMBER = $memberID", __FILE__, __LINE__); + list ($memberName) = mysql_fetch_row($request); + mysql_free_result($request); + } + + $toNotify = array(); + $groups = array(); + + // All membergroups who can approve members. + $request = db_query(" + SELECT ID_GROUP + FROM {$db_prefix}permissions + WHERE permission = 'moderate_forum' + AND addDeny = 1 + AND ID_GROUP != 0", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $groups[] = $row['ID_GROUP']; + mysql_free_result($request); + + // Add administrators too... + $groups[] = 1; + $groups = array_unique($groups); + + // Get a list of all members who have ability to approve accounts - these are the people who we inform. + $request = db_query(" + SELECT ID_MEMBER, lngfile, emailAddress + FROM {$db_prefix}members + WHERE ID_GROUP IN (" . implode(', ', $groups) . ") OR FIND_IN_SET(" . implode(', additionalGroups) OR FIND_IN_SET(', $groups) . ", additionalGroups) + ORDER BY lngfile", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + // Post it in this members language. + loadLanguage('Login', empty($row['lngfile']) || empty($modSettings['userLanguage']) ? $language : $row['lngfile'], false); + + // Construct the message based on what they are being told. + $message = sprintf($txt['admin_notify_profile'], $memberName) . "\n\n" . + "$scripturl?action=profile;u=$memberID\n\n"; + + // If they need to be approved add more info... + if ($type == 'approval') + $message .= $txt['admin_notify_approval'] . "\n\n" . + "$scripturl?action=regcenter;sa=browse;type=approve\n\n"; + + // And do the actual sending... + sendmail($row['emailAddress'], $txt['admin_notify_subject'], $message . $txt[130]); + } + mysql_free_result($request); +} + +?> diff --git a/Sources/Reminder.php b/Sources/Reminder.php new file mode 100644 index 0000000..d61645f --- /dev/null +++ b/Sources/Reminder.php @@ -0,0 +1,296 @@ + 'RemindMail', + 'secret' => 'secretAnswerInput', + 'secret2' => 'secretAnswer2', + 'setpassword' =>'setPassword', + 'setpassword2' =>'setPassword2' + ); + + // Any subaction? If none, fall through to the main template, which will ask for one. + if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']])) + $subActions[$_REQUEST['sa']](); +} + +// Email a reminder. +function RemindMail() +{ + global $db_prefix, $context, $txt, $scripturl, $sourcedir, $user_info; + + checkSession(); + + // You must enter a username/email address. + if (!isset($_POST['user']) || $_POST['user'] == '') + fatal_lang_error(40, false); + + // Username or Email? + $searchField = !isset($_POST['searchtype']) || $_POST['searchtype'] == 'usearch' ? 'memberName' : 'emailAddress'; + + // Find the user. + $request = db_query(" + SELECT ID_MEMBER, realName, memberName, emailAddress, is_activated, validation_code + FROM {$db_prefix}members + WHERE $searchField = '$_POST[user]' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error(40, false); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + // If the user isn't activated/approved, give them some feedback on what to do next. + if (empty($row['is_activated'])) + { + // Awaiting approval... + if (trim($row['validation_code']) == '') + fatal_error($txt['registration_not_approved'] . ' ' . $txt[662] . '.', false); + else + fatal_error($txt['registration_not_activated'] . ' ' . $txt[662] . '.', false); + } + + // You can't get emailed if you have no email address. + $row['emailAddress'] = trim($row['emailAddress']); + if ($row['emailAddress'] == '') + mailprog_error(); + + // Randomly generate a new password, with only alpha numeric characters that is a max length of 10 chars. + $password = substr(preg_replace('/\W/', '', md5(rand())), 0, 10); + + // Set the password in the database. + db_query(" + UPDATE {$db_prefix}members + SET validation_code = '" . md5($password) . "' + WHERE $searchField = '$_POST[user]' + LIMIT 1", __FILE__, __LINE__); + + require_once($sourcedir . '/Subs-Post.php'); + + sendmail($row['emailAddress'], $txt['reminder_subject'], + sprintf($txt['sendtopic_dear'], $row['realName']) . "\n\n" . + "$txt[reminder_mail]:\n\n" . + "$scripturl?action=reminder;sa=setpassword;u=$row[ID_MEMBER];code=$password\n\n" . + "$txt[512]: $user_info[ip]\n\n" . + $txt[35] . ': ' . $row['memberName'] . "\n\n" . + $txt[130]); + + // Set up the template. + $context += array( + 'page_title' => &$txt[194], + 'sub_template' => 'sent', + 'description' => &$txt['reminder_sent'] + ); +} + +// Set your new password +function setPassword() +{ + global $txt, $context; + + // You need a code! + if (!isset($_REQUEST['code'])) + fatal_lang_error(1); + + // Fill the context array. + $context += array( + 'page_title' => &$txt['reminder_set_password'], + 'sub_template' => 'set_password', + 'code' => $_REQUEST['code'], + 'memID' => (int) $_REQUEST['u'] + ); +} + +function setPassword2() +{ + global $db_prefix, $context, $txt; + + if (empty($_POST['u']) || !isset($_POST['passwrd1']) || !isset($_POST['passwrd2'])) + fatal_lang_error(1, false); + + $_POST['u'] = (int) $_POST['u']; + + if ($_POST['passwrd1'] != $_POST['passwrd2']) + fatal_lang_error(213, false); + + if ($_POST['passwrd1'] == '') + fatal_lang_error(91, false); + + loadLanguage('Login'); + + // Get the code as it should be from the database. + $request = db_query(" + SELECT validation_code, memberName + FROM {$db_prefix}members + WHERE ID_MEMBER = $_POST[u] + AND is_activated = 1 + AND validation_code != '' + LIMIT 1", __FILE__, __LINE__); + + // Does this user exist at all? + if (mysql_num_rows($request) == 0) + fatal_lang_error('invalid_userid', false); + + list ($realCode, $username) = mysql_fetch_row($request); + + // Quit if this code is not right. + if (empty($_POST['code']) || substr($realCode, 0, 10) != substr(md5($_POST['code']), 0, 10)) + fatal_error($txt['invalid_activation_code'], false); + + // User validated. Update the database! + updateMemberData($_POST['u'], array('validation_code' => '\'\'', 'passwd' => '\'' . md5_hmac($_POST['passwrd1'], strtolower($username)) . '\'')); + + loadTemplate('Login'); + $context += array( + 'page_title' => &$txt['reminder_password_set'], + 'sub_template' => 'login', + 'default_username' => $username, + 'default_password' => $_POST['passwrd1'], + 'never_expire' => false, + 'description' => &$txt['reminder_password_set'] + ); +} + +// Get the secret answer. +function secretAnswerInput() +{ + global $txt, $db_prefix, $context; + + checkSession(); + + // Please provide an email or user.... + if (!isset($_POST['user']) || $_POST['user'] == '') + fatal_lang_error(40, false); + + // Which of these are we doing? + $searchField = !isset($_POST['searchtype']) || $_POST['searchtype'] == 'usearch' ? 'memberName' : 'emailAddress'; + + // Get the stuff.... + $request = db_query(" + SELECT realName, memberName, secretQuestion + FROM {$db_prefix}members + WHERE $searchField = '$_POST[user]' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error(40, false); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + // If there is NO secret question - then throw an error. + if (trim($row['secretQuestion']) == '') + fatal_lang_error('registration_no_secret_question', false); + + // Ask for the answer... + $context['remind_user'] = $_POST['user']; + $context['remind_type'] = $_POST['searchtype']; + $context['secret_question'] = $row['secretQuestion']; + + $context['sub_template'] = 'ask'; +} + +function secretAnswer2() +{ + global $txt, $db_prefix, $context, $modSettings; + + checkSession(); + + // Hacker? How did you get this far without an email or username? + if (!isset($_POST['user']) || $_POST['user'] == '') + fatal_lang_error(40, false); + + loadLanguage('Login'); + + // Figure out which field to use... + $searchField = !isset($_POST['searchtype']) || $_POST['searchtype'] == 'usearch' ? 'memberName' : 'emailAddress'; + + // Get the information from the database. + $request = db_query(" + SELECT memberName, secretAnswer, secretQuestion + FROM {$db_prefix}members + WHERE $searchField = '$_POST[user]' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error(40, false); + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + // Check if the secret answer is correct. + if ($row['secretQuestion'] == '' || $row['secretAnswer'] == '' || md5(stripslashes($_POST['secretAnswer'])) != $row['secretAnswer']) + { + log_error(sprintf($txt['reminder_error'], $row['memberName'])); + fatal_lang_error('pswd7', false); + } + + // You can't use a blank one! + if (!strlen(trim($_POST['passwrd1']))) + fatal_lang_error(38, false); + + // They have to be the same too. + if ($_POST['passwrd1'] != $_POST['passwrd2']) + fatal_lang_error(213, false); + + // Alright, so long as 'yer sure. + db_query(" + UPDATE {$db_prefix}members + SET passwd = '" . md5_hmac($_POST['passwrd1'], strtolower($row['memberName'])) . "' + WHERE $searchField = '$_POST[user]' + LIMIT 1", __FILE__, __LINE__); + + // Tell them it went fine. + loadTemplate('Login'); + $context += array( + 'page_title' => &$txt['reminder_password_set'], + 'sub_template' => 'login', + 'default_username' => $row['memberName'], + 'default_password' => $_POST['passwrd1'], + 'never_expire' => false, + 'description' => &$txt['reminder_password_set'] + ); +} + +// You don't have an email, where do you want it sent?!? +function mailprog_error() +{ + global $txt, $webmaster_email; + + fatal_error(' +
    +
    + ' . $txt[394] . '
    + ' . $txt[395] . ' webmaster ' . $txt[396] . '.

    +
    '); +} + +?> \ No newline at end of file diff --git a/Sources/RemoveTopic.php b/Sources/RemoveTopic.php new file mode 100644 index 0000000..744afa3 --- /dev/null +++ b/Sources/RemoveTopic.php @@ -0,0 +1,537 @@ + $topic, 'subject' => $subject, 'member' => $starter)); + + redirectexit('board=' . $board . '.0'); +} + +// Remove just a single post. +function DeleteMessage() +{ + global $ID_MEMBER, $db_prefix, $topic, $board; + + checkSession('get'); + + $_REQUEST['msg'] = (int) $_REQUEST['msg']; + + $request = db_query(" + SELECT t.ID_MEMBER_STARTED, m.ID_MEMBER, m.subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE t.ID_TOPIC = $topic + AND m.ID_TOPIC = $topic + AND m.ID_MSG = $_REQUEST[msg] + LIMIT 1", __FILE__, __LINE__); + list ($starter, $poster, $subject) = mysql_fetch_row($request); + mysql_free_result($request); + + if ($starter == $ID_MEMBER && $poster != $ID_MEMBER) + { + if (!allowedTo('remove_any')) + isAllowedTo('remove_replies'); + } + elseif ($poster == $ID_MEMBER && !allowedTo('remove_any')) + isAllowedTo('remove_own'); + else + isAllowedTo('remove_any'); + + // If the full topic was removed go back to the board. + $full_topic = removeMessage($_REQUEST['msg']); + + if (allowedTo('remove_any')) + logAction('delete', array('topic' => $topic, 'subject' => $subject, 'member' => $starter)); + + if ($full_topic) + redirectexit('board=' . $board . '.0'); + else + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); +} + +// So long as you are sure... all old posts will be gone. +function RemoveOldTopics2() +{ + global $db_prefix, $modSettings; + + isAllowedTo('admin_forum'); + checkSession('post', 'maintain'); + + if (empty($_POST['boards'])) + redirectexit('action=maintain'); + + $request = db_query(" + SELECT t.ID_TOPIC + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE m.ID_MSG = t.ID_LAST_MSG + AND m.posterTime < " . (time() - 3600 * 24 * $_POST['maxdays']) . (empty($modSettings['enableStickyTopics']) ? '' : " + AND t.isSticky = 0") . " + AND t.ID_BOARD IN (" . implode(', ', array_keys($_POST['boards'])) . ')', __FILE__, __LINE__); + $topics = array(); + while ($row = mysql_fetch_assoc($request)) + $topics[] = $row['ID_TOPIC']; + mysql_free_result($request); + + removeTopics($topics, false, true); + + // Log an action into the moderation log. + logAction('pruned', array('days' => $_POST['maxdays'])); + + redirectexit('action=maintain;done'); +} + +// Removes the passed ID_TOPICs. (permissions are NOT checked here!) +function removeTopics($topics, $decreasePostCount = true, $ignoreRecycling = false) +{ + global $db_prefix, $sourcedir, $modSettings; + + // Nothing to do? + if (empty($topics)) + return; + // Only a single topic. + elseif (is_numeric($topics)) + { + $condition = '= ' . $topics; + $topics = array($topics); + } + elseif (count($topics) == 1) + $condition = '= ' . $topics[0]; + // More than one topic. + else + $condition = 'IN (' . implode(', ', $topics) . ')'; + + // Decrease the post counts. + if ($decreasePostCount) + { + $requestMembers = db_query(" + SELECT m.ID_MEMBER, COUNT(m.ID_MSG) AS posts + FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b + WHERE m.ID_TOPIC $condition + AND b.ID_BOARD = m.ID_BOARD + AND m.icon != 'recycled' + AND b.countPosts = 0 + GROUP BY m.ID_MEMBER", __FILE__, __LINE__); + if (mysql_num_rows($requestMembers) > 0) + { + while ($rowMembers = mysql_fetch_assoc($requestMembers)) + updateMemberData($rowMembers['ID_MEMBER'], array('posts' => 'posts - ' . $rowMembers['posts'])); + } + mysql_free_result($requestMembers); + } + + // Recycle topics that aren't in the recycle board. + if (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 && !$ignoreRecycling) + { + $request = db_query(" + SELECT ID_TOPIC + FROM {$db_prefix}topics + WHERE ID_TOPIC $condition + AND ID_BOARD != $modSettings[recycle_board] + LIMIT " . count($topics), __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + { + // Get topics that will be recycled. + $recycleTopics = array(); + while ($row = mysql_fetch_assoc($request)) + $recycleTopics[] = $row['ID_TOPIC']; + mysql_free_result($request); + + // Mark recycled topics as recycled. + db_query(" + UPDATE {$db_prefix}messages + SET icon = 'recycled' + WHERE ID_TOPIC IN (" . implode(', ', $recycleTopics) . ")", __FILE__, __LINE__); + + // De-sticky and unlock topics. + db_query(" + UPDATE {$db_prefix}topics + SET locked = 0, isSticky = 0 + WHERE ID_TOPIC IN (" . implode(', ', $recycleTopics) . ")", __FILE__, __LINE__); + + // Move the topics to the recycle board. + require_once($sourcedir . '/MoveTopic.php'); + moveTopics($recycleTopics, $modSettings['recycle_board']); + + // Topics that were recycled don't need to be deleted, so subtract them. + $topics = array_diff($topics, $recycleTopics); + + // Topic list has changed, so does the condition to select topics. + $condition = 'IN (' . implode(', ', $topics) . ')'; + } + else + mysql_free_result($request); + } + + // Still topics left to delete? + if (empty($topics)) + return; + + $adjustBoards = array(); + + // Find out how many posts we are deleting. + $request = db_query(" + SELECT ID_BOARD, COUNT(ID_TOPIC) AS numTopics, SUM(numReplies) AS numReplies + FROM {$db_prefix}topics + WHERE ID_TOPIC $condition + GROUP BY ID_BOARD", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + // The numReplies is only the *replies*. There're also the first posts in the topics. + $adjustBoards[] = array( + 'numPosts' => $row['numReplies'] + $row['numTopics'], + 'numTopics' => $row['numTopics'], + 'ID_BOARD' => $row['ID_BOARD'] + ); + } + mysql_free_result($request); + + // Decrease the posts/topics... + foreach ($adjustBoards as $stats) + db_query(" + UPDATE {$db_prefix}boards + SET numTopics = numTopics - $stats[numTopics], numPosts = numPosts - $stats[numPosts] + WHERE ID_BOARD = $stats[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + + // Remove Polls... + $request = db_query(" + SELECT ID_POLL + FROM {$db_prefix}topics + WHERE ID_TOPIC $condition + AND ID_POLL > 0 + LIMIT " . count($topics), __FILE__, __LINE__); + $polls = array(); + while ($row = mysql_fetch_assoc($request)) + $polls[] = $row['ID_POLL']; + mysql_free_result($request); + + if (!empty($polls)) + { + $pollCondition = count($polls) == 1 ? '= ' . $polls[0] : 'IN (' . implode(', ', $polls) . ')'; + + db_query(" + DELETE FROM {$db_prefix}polls + WHERE ID_POLL $pollCondition + LIMIT " . count($polls), __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}poll_choices + WHERE ID_POLL $pollCondition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_polls + WHERE ID_POLL $pollCondition", __FILE__, __LINE__); + } + + // Get rid of the attachment, if it exists. + require_once($sourcedir . '/ManageAttachments.php'); + removeAttachments('m.ID_TOPIC ' . $condition, 'messages'); + + // Delete anything related to the topic. + db_query(" + DELETE FROM {$db_prefix}messages + WHERE ID_TOPIC $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}calendar + WHERE ID_TOPIC $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_topics + WHERE ID_TOPIC $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_notify + WHERE ID_TOPIC $condition", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}topics + WHERE ID_TOPIC $condition + LIMIT " . count($topics), __FILE__, __LINE__); + + // Update the totals... + updateStats('message'); + updateStats('topic'); + updateStats('calendar'); + + $updates = array(); + foreach ($adjustBoards as $stats) + $updates[] = $stats['ID_BOARD']; + updateLastMessages($updates); +} + +// Remove a specific message (including permission checks). +function removeMessage($message, $decreasePostCount = true) +{ + global $db_prefix, $sourcedir, $modSettings, $ID_MEMBER, $user_info; + + if (empty($message) || !is_numeric($message)) + return false; + + $request = db_query(" + SELECT + m.ID_MEMBER, m.icon, t.ID_TOPIC, t.ID_FIRST_MSG, t.ID_LAST_MSG, t.numReplies, + t.ID_BOARD, b.countPosts, t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b + WHERE m.ID_MSG = $message + AND t.ID_TOPIC = m.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + return false; + $row = mysql_fetch_assoc($request); + mysql_free_result($request); + + if (empty($board) || $row['ID_BOARD'] != $board) + { + $remove_any = boardsAllowedTo('remove_any'); + $remove_any = in_array(0, $remove_any) || in_array($row['ID_BOARD'], $remove_any); + if (!$remove_any) + { + $remove_own = boardsAllowedTo('remove_own'); + $remove_own = in_array(0, $remove_own) || in_array($row['ID_BOARD'], $remove_own); + $remove_replies = boardsAllowedTo('remove_replies'); + $remove_replies = in_array(0, $remove_replies) || in_array($row['ID_BOARD'], $remove_replies); + } + + if ($row['ID_MEMBER'] == $ID_MEMBER && !$remove_any) + { + if ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !$remove_own && !$remove_replies) + isAllowedTo('remove_replies'); + elseif (!$remove_own) + isAllowedTo('remove_own'); + } + elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !$remove_any && !$remove_replies) + isAllowedTo('remove_replies'); + elseif (!$remove_any) + isAllowedTo('remove_any'); + } + else + { + // Check permissions to delete this message. + if ($row['ID_MEMBER'] == $ID_MEMBER && !allowedTo('remove_any')) + { + if ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('remove_own')) + isAllowedTo('remove_replies'); + else + isAllowedTo('remove_own'); + } + elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('remove_any')) + isAllowedTo('remove_replies'); + else + isAllowedTo('remove_any'); + } + + // Delete the *whole* topic, but only if the topic consists of one message. + if ($row['ID_FIRST_MSG'] == $message) + { + if (empty($board) || $row['ID_BOARD'] != $board) + { + $delete_any = boardsAllowedTo('delete_any'); + $delete_any = in_array(0, $delete_any) || in_array($row['ID_BOARD'], $delete_any); + if (!$delete_any) + { + $delete_own = boardsAllowedTo('delete_own'); + $delete_own = in_array(0, $delete_own) || in_array($row['ID_BOARD'], $delete_own); + } + + if ($row['ID_MEMBER'] != $ID_MEMBER && !$delete_any) + isAllowedTo('delete_any'); + elseif (!$delete_any && !$delete_own) + isAllowedTo('delete_own'); + } + else + { + // Check permissions to delete a whole topic. + if ($row['ID_MEMBER'] != $ID_MEMBER) + isAllowedTo('delete_any'); + elseif (!allowedTo('delete_any')) + isAllowedTo('delete_own'); + } + + // ...if there is only one post. + if (!empty($row['numReplies'])) + fatal_lang_error('delFirstPost', false); + + removeTopics($row['ID_TOPIC']); + return true; + } + + // Default recycle to false. + $recycle = false; + + // If recycle topics has been set, make a copy of this message in the recycle board. + // Make sure we're not recycling messages that are already on the recycle board. + if (!empty($modSettings['recycle_enable']) && $row['ID_BOARD'] != $modSettings['recycle_board'] && $row['icon'] != 'recycled') + { + // Check if the recycle board exists and if so get the read status. + $request = db_query(" + SELECT (IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isSeen + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER) + WHERE b.ID_BOARD = $modSettings[recycle_board]", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('recycle_no_valid_board'); + list ($isRead) = mysql_fetch_row($request); + mysql_free_result($request); + + // Insert a new topic in the recycle board. + db_query(" + INSERT INTO {$db_prefix}topics + (ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_FIRST_MSG, ID_LAST_MSG) + VALUES ($modSettings[recycle_board], $row[ID_MEMBER], $row[ID_MEMBER], $message, $message)", __FILE__, __LINE__); + + // Capture the ID of the new topic. + $topicID = db_insert_id(); + + // If the topic creation went successful, move the message. + if ($topicID > 0) + { + db_query(" + UPDATE {$db_prefix}messages + SET ID_TOPIC = $topicID, ID_BOARD = $modSettings[recycle_board], icon = 'recycled' + WHERE ID_MSG = $message + LIMIT 1", __FILE__, __LINE__); + + // Mark recycled topic as read. + if (!$user_info['is_guest']) + db_query(" + REPLACE INTO {$db_prefix}log_topics + (ID_TOPIC, ID_MEMBER, logTime) + VALUES ($topicID, $ID_MEMBER, " . time() . ")", __FILE__, __LINE__); + + // Mark recycle board as seen, if it was marked as seen before. + if (!empty($isRead) && !$user_info['is_guest']) + db_query(" + REPLACE INTO {$db_prefix}log_boards + (ID_BOARD, ID_MEMBER, logTime) + VALUES ($modSettings[recycle_board], $ID_MEMBER, " . time() . ")", __FILE__, __LINE__); + + // Add one topic and post to the recycle bin board. + db_query(" + UPDATE {$db_prefix}boards + SET numTopics = numTopics + 1, numPosts = numPosts + 1 + WHERE ID_BOARD = $modSettings[recycle_board] + LIMIT 1", __FILE__, __LINE__); + + // Make sure this message isn't getting deleted later on. + $recycle = true; + } + } + + // Deleting a recycled message can not lower anyone's post count. + if ($row['icon'] == 'recycled') + $decreasePostCount = false; + + // This is the last post, update the last post on the board. + if ($row['ID_LAST_MSG'] == $message) + { + // Find the last message, set it, and decrease the post count. + $request = db_query(" + SELECT ID_MSG, ID_MEMBER + FROM {$db_prefix}messages + WHERE ID_TOPIC = $row[ID_TOPIC] + AND ID_MSG != $message + ORDER BY ID_MSG DESC + LIMIT 1", __FILE__, __LINE__); + $row2 = mysql_fetch_assoc($request); + mysql_free_result($request); + + db_query(" + UPDATE {$db_prefix}topics + SET ID_LAST_MSG = $row2[ID_MSG], numReplies = numReplies - 1, ID_MEMBER_UPDATED = $row2[ID_MEMBER] + WHERE ID_TOPIC = $row[ID_TOPIC] + LIMIT 1", __FILE__, __LINE__); + } + // Only decrease post counts. + else + db_query(" + UPDATE {$db_prefix}topics + SET numReplies = numReplies - 1 + WHERE ID_TOPIC = $row[ID_TOPIC] + LIMIT 1", __FILE__, __LINE__); + + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = numPosts - 1 + WHERE ID_BOARD = $row[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + + // If the poster was registered and the board this message was on incremented + // the member's posts when it was posted, decrease his or her post count. + if (!empty($row['ID_MEMBER']) && $decreasePostCount && empty($row['countPosts'])) + updateMemberData($row['ID_MEMBER'], array('posts' => '-')); + + // Only remove posts if they're not recycled. + if (!$recycle) + { + // Remove the message! + db_query(" + DELETE FROM {$db_prefix}messages + WHERE ID_MSG = $message + LIMIT 1", __FILE__, __LINE__); + + // Delete attachment(s) if they exist. + require_once($sourcedir . '/ManageAttachments.php'); + removeAttachments('a.ID_MSG = ' . $message); + } + + // Update the pesky statistics. + updateStats('message'); + updateStats('topic'); + updateStats('calendar'); + + if ($recycle) + updateLastMessages(array($row['ID_BOARD'], $modSettings['recycle_board'])); + else + updateLastMessages($row['ID_BOARD']); + + return false; +} + +?> diff --git a/Sources/RepairBoards.php b/Sources/RepairBoards.php new file mode 100644 index 0000000..d899bae --- /dev/null +++ b/Sources/RepairBoards.php @@ -0,0 +1,473 @@ + + + + + + + + + +
    ' . $txt['smf73'] . '
    + ' . $txt['smf74'] . ':

    '; + + // Make a last-ditch-effort check to get rid of topics with zeros.. + $resultTopicZeros = db_query(" + SELECT COUNT(ID_TOPIC) + FROM {$db_prefix}topics + WHERE ID_TOPIC = 0", __FILE__, __LINE__); + list ($zeroTopics) = mysql_fetch_row($resultTopicZeros); + mysql_free_result($resultTopicZeros); + + // This is only going to be 1 or 0, but... + $resultMessageZeros = db_query(" + SELECT COUNT(ID_MSG) + FROM {$db_prefix}messages + WHERE ID_MSG = 0", __FILE__, __LINE__); + list ($zeroMessages) = mysql_fetch_row($resultMessageZeros); + mysql_free_result($resultMessageZeros); + + if (!empty($zeroTopics) || !empty($zeroMessages)) + $context['raw_data'] .= $txt['repair_zeroed_ids'] . '
    '; + + // Find messages that don't have existing topics. + $resultMsg = db_query(" + SELECT m.ID_TOPIC, m.ID_MSG + FROM {$db_prefix}messages AS m + LEFT JOIN {$db_prefix}topics AS t ON (t.ID_TOPIC = m.ID_TOPIC) + WHERE t.ID_TOPIC IS NULL + ORDER BY m.ID_TOPIC, m.ID_MSG", __FILE__, __LINE__); + while ($msgArray = mysql_fetch_assoc($resultMsg)) + $context['raw_data'] .= $txt[72] . ' ' . $msgArray['ID_MSG'] . ' ' . $txt['smf307'] . ': ' . $msgArray['ID_TOPIC'] . '
    '; + mysql_free_result($resultMsg); + + // Find topics with no messages. + $resultTopic = db_query(" + SELECT t.ID_TOPIC, COUNT(m.ID_MSG) AS numMsg + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC) + GROUP BY t.ID_TOPIC + HAVING numMsg = 0 + ORDER BY t.ID_TOPIC", __FILE__, __LINE__); + while ($topicArray = mysql_fetch_assoc($resultTopic)) + $context['raw_data'] .= $txt[118] . ' ' . $topicArray['ID_TOPIC'] . ' ' . $txt['smf308'] . '
    '; + mysql_free_result($resultTopic); + + // Find topics with incorrect ID_FIRST_MSG/ID_LAST_MSG/numReplies. + $resultTopic = db_query(" + SELECT + t.ID_TOPIC, MIN(m.ID_MSG) AS myID_FIRST_MSG, t.ID_FIRST_MSG, MAX(m.ID_MSG) AS myID_LAST_MSG, + t.ID_LAST_MSG, COUNT(m.ID_MSG) - 1 AS myNumReplies, t.numReplies + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC) + GROUP BY t.ID_TOPIC + HAVING ID_FIRST_MSG != myID_FIRST_MSG OR ID_LAST_MSG != myID_LAST_MSG OR numReplies != myNumReplies + ORDER BY t.ID_TOPIC", __FILE__, __LINE__); + while ($topicArray = mysql_fetch_assoc($resultTopic)) + { + if ($topicArray['ID_FIRST_MSG'] != $topicArray['myID_FIRST_MSG']) + $context['raw_data'] .= $txt[118] . ' ' . $topicArray['ID_TOPIC'] . ' ' . $txt['smf75'] . ': ' . $topicArray['ID_FIRST_MSG'] . '
    '; + if ($topicArray['ID_LAST_MSG'] != $topicArray['myID_LAST_MSG']) + $context['raw_data'] .= $txt[118] . ' ' . $topicArray['ID_TOPIC'] . ' ' . $txt['smf76'] . ': ' . $topicArray['ID_LAST_MSG'] . '
    '; + if ($topicArray['numReplies'] != $topicArray['myNumReplies']) + $context['raw_data'] .= $txt[118] . ' ' . $topicArray['ID_TOPIC'] . ' ' . $txt['smf309'] . ': ' . $topicArray['numReplies'] . '
    '; + } + mysql_free_result($resultTopic); + + // Find topics with inexistent boards. + $resultTopics = db_query(" + SELECT t.ID_TOPIC, t.ID_BOARD + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD) + WHERE b.ID_BOARD IS NULL + ORDER BY t.ID_BOARD, t.ID_TOPIC", __FILE__, __LINE__); + while ($topicArray = mysql_fetch_assoc($resultTopics)) + $context['raw_data'] .= $txt[118] . ' ' . $topicArray['ID_TOPIC'] . ' ' . $txt['smf81'] . ' (' . $txt['smf82'] . ' ' . $topicArray['ID_BOARD'] . ').
    '; + mysql_free_result($resultTopics); + + // Find boards with nonexistent categories. + $resultBoards = db_query(" + SELECT b.ID_BOARD, b.ID_CAT + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT) + WHERE c.ID_CAT IS NULL + ORDER BY b.ID_CAT, b.ID_BOARD", __FILE__, __LINE__); + while ($boardArray = mysql_fetch_assoc($resultBoards)) + $context['raw_data'] .= $txt['smf82'] . ' ' . $boardArray['ID_BOARD'] . ' ' . $txt['smf83'] . ' (' . $txt['smf84'] . ' ' . $boardArray['ID_CAT'] . ').
    '; + mysql_free_result($resultBoards); + + // Find messages with nonexistent members. + $resultMsg = db_query(" + SELECT m.ID_MSG + FROM {$db_prefix}messages AS m + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE m.ID_MEMBER != 0 + AND mem.ID_MEMBER IS NULL", __FILE__, __LINE__); + while ($msgArray = mysql_fetch_assoc($resultMsg)) + $context['raw_data'] .= $txt[72] . ' ' . $msgArray['ID_MSG'] . ' ' . $txt['smf310'] . '.
    '; + mysql_free_result($resultMsg); + + // Find boards with nonexistent parents. + $resultParents = db_query(" + SELECT b.ID_BOARD, b.ID_PARENT + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}boards AS p ON (p.ID_BOARD = b.ID_PARENT) + WHERE b.ID_PARENT != 0 + AND (p.ID_BOARD IS NULL OR p.ID_BOARD = b.ID_BOARD) + ORDER BY b.ID_PARENT, b.ID_BOARD", __FILE__, __LINE__); + while ($parentArray = mysql_fetch_assoc($resultParents)) + $context['raw_data'] .= sprintf($txt['parent_repair_found'], $parentArray['ID_BOARD'], $parentArray['ID_PARENT']) . '
    '; + mysql_free_result($resultParents); + + $context['raw_data'] .= ' +

    +

    ' . $txt['smf85'] . '
    + ' . $txt[163] . ' - ' . $txt[164] . '

    +
    + + + '; + } + else + { + require_once($sourcedir . '/Subs-Boards.php'); + + $context['raw_data'] = ' + + + + +
    + + + + + + +
    ' . $txt['smf86'] . '
    '; + + // We don't allow 0's in the IDs... + db_query(" + UPDATE {$db_prefix}topics + SET ID_TOPIC = NULL + WHERE ID_TOPIC = 0", __FILE__, __LINE__); + + db_query(" + UPDATE {$db_prefix}messages + SET ID_MSG = NULL + WHERE ID_MSG = 0", __FILE__, __LINE__); + + // Fix all messages that have a topic ID that cannot be found in the topics table. + $resultMsg = db_query(" + SELECT + m.ID_TOPIC, MIN(m.ID_MSG) AS myID_FIRST_MSG, MAX(m.ID_MSG) AS myID_LAST_MSG, + COUNT(m.ID_MSG) - 1 AS myNumReplies + FROM {$db_prefix}messages AS m + LEFT JOIN {$db_prefix}topics AS t ON (t.ID_TOPIC = m.ID_TOPIC) + WHERE t.ID_TOPIC IS NULL + GROUP BY m.ID_TOPIC", __FILE__, __LINE__); + if (mysql_num_rows($resultMsg) > 0) + { + createSalvageArea(); + + while ($msgArray = mysql_fetch_assoc($resultMsg)) + { + $memberStartedID = getMsgMemberID($msgArray['myID_FIRST_MSG']); + $memberUpdatedID = getMsgMemberID($msgArray['myID_LAST_MSG']); + + db_query(" + INSERT INTO {$db_prefix}topics + (ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_FIRST_MSG, ID_LAST_MSG, numReplies) + VALUES ($salvageBoardID, $memberStartedID, $memberUpdatedID, + $msgArray[myID_FIRST_MSG], $msgArray[myID_LAST_MSG], $msgArray[myNumReplies])", __FILE__, __LINE__); + $newTopicID = db_insert_id(); + + db_query(" + UPDATE {$db_prefix}messages + SET ID_TOPIC = $newTopicID, ID_BOARD = $salvageBoardID + WHERE ID_TOPIC = $msgArray[ID_TOPIC]", __FILE__, __LINE__); + $context['raw_data'] .= '
    '; + } + } + mysql_free_result($resultMsg); + $context['raw_data'] .= '
    '; + + // Remove all topics that have zero messages in the messages table. + $resultTopic = db_query(" + SELECT t.ID_TOPIC, COUNT(m.ID_MSG) AS numMsg + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC) + GROUP BY t.ID_TOPIC + HAVING numMsg = 0", __FILE__, __LINE__); + if (mysql_num_rows($resultTopic) > 0) + { + $stupidTopics = array(); + while ($topicArray = mysql_fetch_assoc($resultTopic)) + $stupidTopics[] = $topicArray['ID_TOPIC']; + db_query(" + DELETE FROM {$db_prefix}topics + WHERE ID_TOPIC IN (" . implode(',', $stupidTopics) . ') + LIMIT ' . count($stupidTopics), __FILE__, __LINE__); + $context['raw_data'] .= db_affected_rows() . ' ' . $txt['smf312'] . '
    '; + } + mysql_free_result($resultTopic); + + // Fix all ID_FIRST_MSG, ID_LAST_MSG and numReplies in the topic table. + $resultTopic = db_query(" + SELECT + t.ID_TOPIC, MIN(m.ID_MSG) AS myID_FIRST_MSG, t.ID_FIRST_MSG, + MAX(m.ID_MSG) AS myID_LAST_MSG, t.ID_LAST_MSG, COUNT(m.ID_MSG) - 1 AS myNumReplies, + t.numReplies + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC) + GROUP BY t.ID_TOPIC + HAVING ID_FIRST_MSG != myID_FIRST_MSG OR ID_LAST_MSG != myID_LAST_MSG OR numReplies != myNumReplies", __FILE__, __LINE__); + if (mysql_num_rows($resultTopic) > 0) + { + while ($topicArray = mysql_fetch_assoc($resultTopic)) + { + $memberStartedID = getMsgMemberID($topicArray['myID_FIRST_MSG']); + $memberUpdatedID = getMsgMemberID($topicArray['myID_LAST_MSG']); + $result = db_query(" + UPDATE {$db_prefix}topics + SET ID_FIRST_MSG = '$topicArray[myID_FIRST_MSG]', + ID_MEMBER_STARTED = '$memberStartedID', ID_LAST_MSG = $topicArray[myID_LAST_MSG], + ID_MEMBER_UPDATED = '$memberUpdatedID', numReplies = '$topicArray[myNumReplies]' + WHERE ID_TOPIC = $topicArray[ID_TOPIC] + LIMIT 1", __FILE__, __LINE__); + } + } + mysql_free_result($resultTopic); + + // Fix all topics that have a board ID that cannot be found in the boards table. + $resultTopics = db_query(" + SELECT t.ID_BOARD, COUNT(t.ID_TOPIC) AS myNumTopics, COUNT(m.ID_MSG) AS myNumPosts + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD) + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC) + WHERE b.ID_BOARD IS NULL + GROUP BY t.ID_BOARD", __FILE__, __LINE__); + if (mysql_num_rows($resultTopics) > 0) + { + createSalvageArea(); + + while ($topicArray = mysql_fetch_assoc($resultTopics)) + { + db_query(" + INSERT INTO {$db_prefix}boards + (ID_CAT, name, numTopics, numPosts) + VALUES ($salvageCatID, 'Salvaged board', $topicArray[myNumTopics], + $topicArray[myNumPosts])", __FILE__, __LINE__); + $newBoardID = db_insert_id(); + + db_query(" + UPDATE {$db_prefix}topics + SET ID_BOARD = $newBoardID + WHERE ID_BOARD = $topicArray[ID_BOARD]", __FILE__, __LINE__); + db_query(" + UPDATE {$db_prefix}messages + SET ID_BOARD = $newBoardID + WHERE ID_BOARD = $topicArray[ID_BOARD]", __FILE__, __LINE__); + $context['raw_data'] .= $txt['smf311'] . '
    '; + } + } + mysql_free_result($resultTopics); + + // Fix all boards that have a cat ID that cannot be found in the cats table. + $resultBoards = db_query(" + SELECT b.ID_CAT + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT) + WHERE c.ID_CAT IS NULL + GROUP BY b.ID_CAT", __FILE__, __LINE__); + if (mysql_num_rows($resultBoards) > 0) + { + createSalvageArea(); + + while ($boardArray = mysql_fetch_assoc($resultBoards)) + { + db_query(" + UPDATE {$db_prefix}boards + SET ID_CAT = $salvageCatID + WHERE ID_CAT = $boardArray[ID_CAT]", __FILE__, __LINE__); + $context['raw_data'] .= $txt['smf311'] . '
    '; + } + } + mysql_free_result($resultBoards); + + // Fix all boards that have a parent ID that cannot be found in the boards table. + $resultParents = db_query(" + SELECT b.ID_PARENT + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}boards AS p ON (p.ID_BOARD = b.ID_PARENT) + WHERE b.ID_PARENT != 0 + AND (p.ID_BOARD IS NULL OR p.ID_BOARD = b.ID_BOARD) + GROUP BY b.ID_PARENT", __FILE__, __LINE__); + if (mysql_num_rows($resultParents) > 0) + { + createSalvageArea(); + + while ($parentArray = mysql_fetch_assoc($resultParents)) + { + db_query(" + UPDATE {$db_prefix}boards + SET ID_PARENT = $salvageBoardID, ID_CAT = $salvageCatID, childLevel = 1 + WHERE ID_PARENT = $parentArray[ID_PARENT]", __FILE__, __LINE__); + $context['raw_data'] .= $txt['parent_repair_fixed'] . '
    '; + } + } + mysql_free_result($resultParents); + + // Last step-make sure all non-guest posters still exist. + $resultMsg = db_query(" + SELECT m.ID_MSG + FROM {$db_prefix}messages AS m + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE m.ID_MEMBER != 0 + AND mem.ID_MEMBER IS NULL", __FILE__, __LINE__); + if (mysql_num_rows($resultMsg) > 0) + { + $guestMessages = array(); + while ($msgArray = mysql_fetch_assoc($resultMsg)) + $guestMessages[] = $msgArray['ID_MSG']; + db_query(" + UPDATE {$db_prefix}messages + SET ID_MEMBER = 0 + WHERE ID_MSG IN (" . implode(',', $guestMessages) . ') + LIMIT ' . count($guestMessages), __FILE__, __LINE__); + } + mysql_free_result($resultMsg); + + $resultPolls = db_query(" + SELECT t.ID_POLL + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}polls AS p ON (p.ID_POLL = t.ID_POLL) + WHERE p.ID_POLL IS NULL + GROUP BY t.ID_POLL", __FILE__, __LINE__); + $polls = array(); + while ($rowPolls = mysql_fetch_assoc($resultPolls)) + $polls[] = $rowPolls['ID_POLL']; + mysql_free_result($resultPolls); + + if (!empty($polls)) + db_query(" + UPDATE {$db_prefix}topics + SET ID_POLL = 0 + WHERE ID_POLL IN (" . implode(', ', $polls) . ") + LIMIT " . count($polls), __FILE__, __LINE__); + + updateStats('message'); + updateStats('topic'); + updateStats('calendar'); + + $context['raw_data'] .= ' +

    ' . $txt['smf92'] . '

    + ' . $txt[137] . '
    + ' . $txt[236] . ' ' . $txt[237] . '
    +
    +
    '; + } +} + +// For now, this isn't internationalized because it could cause conflicts with other languages. +function createSalvageArea() +{ + global $createOnce, $db_prefix, $salvageBoardID, $salvageCatID; + + if (!empty($createOnce)) + return; + $creatOnce = true; + + // Check to see if a 'Salvage Category' exists, if not => insert one. + $result = db_query(" + SELECT ID_CAT + FROM {$db_prefix}categories + WHERE name = 'Salvage Area' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($result) == 0) + { + db_query(" + INSERT INTO {$db_prefix}categories + (name, catOrder) + VALUES ('Salvage Area', -1)", __FILE__, __LINE__); + + if (db_affected_rows() <= 0) + fatal_error($txt['smf89'] . ' ' . $txt['smf82'], false); + + $salvageCatID = db_insert_id(); + } + else + list ($salvageCatID) = mysql_fetch_row($result); + mysql_free_result($result); + + // Check to see if a 'Salvage Board' exists, if not => insert one. + $result = db_query(" + SELECT ID_BOARD + FROM {$db_prefix}boards + WHERE ID_CAT = $salvageCatID + AND name = 'Salvaged Messages' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($result) == 0) + { + db_query(" + INSERT INTO {$db_prefix}boards + (name, description, ID_CAT, memberGroups) + VALUES ('Salvaged Messages', 'Topics created for messages with non-existent topics', $salvageCatID, '1')", __FILE__, __LINE__); + + if (db_affected_rows() < 0) + fatal_error($txt['smf89'] . ' ' . $txt['smf84'], false); + + $salvageBoardID = db_insert_id(); + } + else + list ($salvageBoardID) = mysql_fetch_row($result); + mysql_free_result($result); +} + +?> \ No newline at end of file diff --git a/Sources/Search.php b/Sources/Search.php new file mode 100644 index 0000000..2ad9f4d --- /dev/null +++ b/Sources/Search.php @@ -0,0 +1,941 @@ + $scripturl . '?action=search', + 'name' => $txt[182] + ); + + // If you got back from search2 by using the linktree, you get your original search parameters back. + if (isset($_REQUEST['params'])) + { + $temp_params = explode('|"|', base64_decode($_REQUEST['params'])); + $context['search_params'] = array(); + foreach ($temp_params as $i => $data) + { + list ($k, $v) = explode('|\'|', $data); + $context['search_params'][$k] = stripslashes($v); + } + if (isset($context['search_params']['brd'])) + $context['search_params']['brd'] = $context['search_params']['brd'] == '' ? array() : explode(',', $context['search_params']['brd']); + } + + if (isset($context['search_params']['search'])) + $context['search_params']['search'] = htmlspecialchars($context['search_params']['search']); + if (isset($context['search_params']['userspec'])) + $context['search_params']['userspec'] = htmlspecialchars(stripslashes($context['search_params']['userspec'])); + if (!empty($context['search_params']['searchtype'])) + $context['search_params']['searchtype'] = 2; + if (!empty($context['search_params']['minage'])) + $context['search_params']['minage'] = (int) $context['search_params']['minage']; + if (!empty($context['search_params']['maxage'])) + $context['search_params']['maxage'] = (int) $context['search_params']['maxage']; + + $context['search_params']['show_complete'] = !empty($context['search_params']['show_complete']); + $context['search_params']['subject_only'] = !empty($context['search_params']['subject_only']); + + // Find all the boards this user is allowed to see. + $request = db_query(" + SELECT b.ID_CAT, c.name AS catName, b.ID_BOARD, b.name, b.childLevel + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT) + WHERE $user_info[query_see_board] + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['num_boards'] = mysql_num_rows($request); + $context['categories'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + // This category hasn't been set up yet.. + if (!isset($context['categories'][$row['ID_CAT']])) + $context['categories'][$row['ID_CAT']] = array( + 'id' => $row['ID_CAT'], + 'name' => $row['catName'], + 'boards' => array() + ); + + // Set this board up, and let the template know when it's a child. (indent them..) + $context['categories'][$row['ID_CAT']]['boards'][$row['ID_BOARD']] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'child_level' => $row['childLevel'] + ); + } + mysql_free_result($request); + + // Simple or not? + $context['simple_search'] = !empty($modSettings['simpleSearch']) && !isset($_GET['advanced']); + $context['page_title'] = $txt[183]; +} + +// Gather the results and show them. +function PlushSearch2() +{ + global $modSettings, $sourcedir; + global $scripturl, $txt, $db_prefix, $user_info, $context, $messages_request, $attachments, $boards_can; + + $weight_factors = array( + 'frequency', + 'age', + 'length', + 'subject', + 'first_message', + ); + + $weight = array(); + $weight_total = 0; + foreach ($weight_factors as $weight_factor) + { + $weight[$weight_factor] = empty($modSettings['search_weight_' . $weight_factor]) ? 0 : (int) $modSettings['search_weight_' . $weight_factor]; + $weight_total += $weight[$weight_factor]; + } + + // Zero weight. Weightless. + if (empty($weight_total)) + fatal_lang_error('search_invalid_weights'); + +/* + // Fine-tune the weight of each search factor. These factors should add up to 100. + $weight = array( + // The more message within a topic match the search query, the higher the ranking. + 'frequency' => 30, + // The more recent a message is, the higher its ranking. + 'age' => 25, + // The larger the topic is, the higher its ranking. + 'length' => 20, + // If a search string happens to be part of the topic subject, it's probably a better match. + 'subject' => 15, + // If the first message of a topic is a match, then the whole topic might be more interesting. + 'first_message' => 10, + ); +*/ + + // These vars don't require an interface, the're just here for tweaking. + $recentPercentage = 0.30; + $humungousTopicPosts = 200; + $maxMembersToSearch = 500; + + loadTemplate('Search'); + + // Are you allowed? + isAllowedTo('search_posts'); + + // So, we're allowed here, let's clean up the start variable - just incase. + $_REQUEST['start'] = (int) $_REQUEST['start']; + + require_once($sourcedir . '/Display.php'); + + // $search_params will carry all settings that differ from the default search parameters. + // That way, the URLs involved in a search page will be kept as short as possible. + $search_params = array(); + + if (isset($_REQUEST['params'])) + { + $temp_params = explode('|"|', base64_decode($_REQUEST['params'])); + foreach ($temp_params as $i => $data) + { + list ($k, $v) = explode('|\'|', $data); + $search_params[$k] = stripslashes($v); + } + if (isset($search_params['brd'])) + $search_params['brd'] = $search_params['brd'] == '' ? array() : explode(',', $search_params['brd']); + } + + // 1 => 'allwords' (default, don't set as param) / 2 => 'anywords'. + if (!empty($search_params['searchtype']) || (!empty($_REQUEST['searchtype']) && $_REQUEST['searchtype'] == 2)) + $search_params['searchtype'] = 2; + + // Minimum age of messages. Default to zero (don't set param in that case). + if (!empty($search_params['minage']) || (!empty($_REQUEST['minage']) && $_REQUEST['minage'] > 0)) + $search_params['minage'] = !empty($search_params['minage']) ? (int) $search_params['minage'] : (int) $_REQUEST['minage']; + + // Maximum age of messages. Default to infinite (9999 days: param not set). + if (!empty($search_params['maxage']) || (!empty($_REQUEST['maxage']) && $_REQUEST['maxage'] != 9999)) + $search_params['maxage'] = !empty($search_params['maxage']) ? (int) $search_params['maxage'] : (int) $_REQUEST['maxage']; + + $timeAddition = ''; + $timeAddition .= !empty($search_params['minage']) ? ' AND m.posterTime <= ' . (time() - $search_params['minage'] * 86400) : ''; + $timeAddition .= !empty($search_params['maxage']) ? ' AND m.posterTime >= ' . (time() - $search_params['maxage'] * 86400) : ''; + + // Default the user name to a wildcard matching every user (*). + if (!empty($search_params['userspec']) || (!empty($_REQUEST['userspec']) && $_REQUEST['userspec'] != '*')) + $search_params['userspec'] = isset($search_params['userspec']) ? $search_params['userspec'] : $_REQUEST['userspec']; + + // If there's no specific user, then don't mention it in the main query. + if (empty($search_params['userspec'])) + $userQuery = ''; + else + { + $userString = strtolower(addslashes(strtr($search_params['userspec'], array('%' => '\%', '_' => '\_', '*' => '%', '?' => '_')))); + // Retrieve a list of possible members. + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE realName LIKE '$userString'", __FILE__, __LINE__); + // Simply do nothing if there're too many members matching the criteria. + if (mysql_num_rows($request) > $maxMembersToSearch) + $userQuery = ''; + elseif (mysql_num_rows($request) == 0) + $userQuery = "m.ID_MEMBER = 0 AND m.posterName LIKE '$userString'"; + else + { + $memberlist = array(); + while ($row = mysql_fetch_assoc($request)) + $memberlist[] = $row['ID_MEMBER']; + $userQuery = "(m.ID_MEMBER IN (" . implode(', ', $memberlist) . ") OR (m.ID_MEMBER = 0 AND m.posterName LIKE '$userString'))"; + } + } + + // If the boards were passed by URL (params=), temporarily put them back in $_REQUEST. + if (!empty($search_params['brd']) && is_array($search_params['brd'])) + $_REQUEST['brd'] = $search_params['brd']; + + // Make sure all boards are integers. + if (!empty($_REQUEST['brd'])) + foreach ($_REQUEST['brd'] as $id => $brd) + $_REQUEST['brd'][$id] = (int) $brd; + + // Select all boards you've selected AND are allowed to see. + if ($user_info['is_admin']) + $search_params['brd'] = empty($_REQUEST['brd']) ? array() : $_REQUEST['brd']; + else + { + $request = db_query(" + SELECT b.ID_BOARD + FROM {$db_prefix}boards AS b + WHERE $user_info[query_see_board]" . (empty($_REQUEST['brd']) ? '' : " + AND b.ID_BOARD IN (" . implode(', ', $_REQUEST['brd']) . ")"), __FILE__, __LINE__); + $search_params['brd'] = array(); + while ($row = mysql_fetch_assoc($request)) + $search_params['brd'][] = $row['ID_BOARD']; + mysql_free_result($request); + + // This error should pro'bly only happen for hackers. + if (empty($search_params['brd'])) + fatal_lang_error('search_no_boards'); + } + + // If we've selected all boards, this parameter can be left empty. + $request = db_query(" + SELECT COUNT(ID_BOARD) + FROM {$db_prefix}boards", __FILE__, __LINE__); + list ($num_boards) = mysql_fetch_row($request); + mysql_free_result($request); + + if ($num_boards == count($search_params['brd'])) + $search_params['brd'] = array(); + // Make sure these all boards are numbers. + elseif (!empty($search_params['brd'])) + { + foreach ($search_params['brd'] as $k => $v) + $search_params['brd'][$k] = (int) $v; + } + + $search_params['show_complete'] = !empty($search_params['show_complete']) || !empty($_REQUEST['show_complete']); + $search_params['subject_only'] = !empty($search_params['subject_only']) || !empty($_REQUEST['subject_only']); + + $context['compact'] = !$search_params['show_complete']; + + // What are we searching for? + $search_params['search'] = !empty($search_params['search']) ? $search_params['search'] : (isset($_REQUEST['search']) ? stripslashes($_REQUEST['search']) : ''); + // Nothing?? + if (!isset($search_params['search']) || $search_params['search'] == '') + fatal_lang_error('no_valid_search_string', false); + + // Extract phrase parts first (e.g. some words "this is a phrase" some more words.) + preg_match_all('/(?:^|\s)"([^"]+)"(?:$|\s)/u', $search_params['search'], $matches, PREG_PATTERN_ORDER); + $searchArray = $matches[1]; + + // Remove the phrase parts and extract the words. + $searchArray = array_merge($searchArray, explode(' ', preg_replace('/(?:^|\s)"([^"]+)"(?:$|\s)/u', ' ', $search_params['search']))); + + // Trim everything and make sure there are no words that are the same. + foreach ($searchArray as $index => $value) + { + $searchArray[$index] = addslashes(strtolower(trim($value))); + if (!isset($searchArray[$index]) || $searchArray[$index] == '') + unset($searchArray[$index]); + } + $searchArray = array_slice(array_unique($searchArray), 0, 10); + + if (empty($searchArray)) + fatal_lang_error('no_valid_search_string', false); + + // Each word is matched against the body and the subject. + $searchParts = array(); + foreach ($searchArray as $word) + { + if (empty($modSettings['search_match_complete_words'])) + $searchParts[] = " LIKE '%" . strtr($word, array('_' => '\\_', '%' => '\\%')) . "%'"; + else + $searchParts[] = " RLIKE '[[:<:]]" . addcslashes(preg_replace(array('/([\[\]$.+?|{}])/u', '/\*/'), array('[$1]', '.+'), $word), '') . "[[:>:]]'"; + } + + $searchQuery = 0; + + // Either all words must match (searchtype == 1) or any of the words (searchtype == 2). + if (empty($search_params['searchtype'])) + { + if (!$search_params['subject_only']) + $searchQuery = 'm.body' . implode(' AND m.body', $searchParts) . $timeAddition; + $topicQuery = 'm.subject' . implode(' AND m.subject', $searchParts) . $timeAddition; + } + else + { + if (!$search_params['subject_only']) + $searchQuery = (count($searchParts) > 1 ? '(' : '') . 'm.body' . implode(' OR m.body', $searchParts) . (count($searchParts) > 1 ? ')' : '') . $timeAddition; + $topicQuery = (count($searchParts) > 1 ? '(' : '') . 'm.subject' . implode(' OR m.subject', $searchParts) . (count($searchParts) > 1 ? ')' : '') . $timeAddition; + } + + // Get the sorting parameters right. Default to sort by relevance descending. + $sort_columns = array( + 'relevance', + 'numReplies', + 'ID_MSG', + ); + if (empty($search_params['sort']) && !empty($_REQUEST['sort'])) + list ($search_params['sort'], $search_params['sort_dir']) = array_pad(explode('|', $_REQUEST['sort']), 2, ''); + $search_params['sort'] = !empty($search_params['sort']) && in_array($search_params['sort'], $sort_columns) ? $search_params['sort'] : 'relevance'; + $search_params['sort_dir'] = !empty($search_params['sort_dir']) && $search_params['sort_dir'] == 'asc' ? 'asc' : 'desc'; + + $context['mark'] = array(); + foreach ($searchArray as $word) + $context['mark'][$word] = '' . $word . ''; + + // All search params have been checked, let's compile them to a single string... made less simple by PHP 4.3.9 and below. + $temp_params = $search_params; + if (isset($temp_params['brd'])) + $temp_params['brd'] = implode(',', $temp_params['brd']); + $context['params'] = array(); + foreach ($temp_params as $k => $v) + $context['params'][] = $k . '|\'|' . addslashes($v); + $context['params'] = base64_encode(implode('|"|', $context['params'])); + + // ... and add the links to the link tree. + $context['linktree'][] = array( + 'url' => $scripturl . '?action=search;params=' . $context['params'], + 'name' => $txt[182] + ); + $context['linktree'][] = array( + 'url' => $scripturl . '?action=search2;params=' . $context['params'], + 'name' => $txt['search_results'] + ); + + // Determine some values needed to calculate the relevance. + $minMsg = (int) (1 - $recentPercentage) * $modSettings['maxMsgID']; + $recentMsg = $modSettings['maxMsgID'] - $minMsg; + + $mainQuery = " + t.ID_TOPIC, + $weight[frequency] * IF(m.ID_MSG IS NOT NULL, COUNT(m.ID_MSG) / (t.numReplies + 1), 0) + + $weight[age] * IF(m.ID_MSG IS NULL OR MAX(m.ID_MSG) < $minMsg, 0, (MAX(m.ID_MSG) - $minMsg) / $recentMsg) + + $weight[length] * IF(t.numReplies < $humungousTopicPosts, t.numReplies / $humungousTopicPosts, 1) + + $weight[subject] * t.is_subject + + $weight[first_message] * IF(MIN(m.ID_MSG) = t.ID_FIRST_MSG, 1, 0) AS relevance, + IF(COUNT(m.ID_MSG) = 0, t.ID_FIRST_MSG, MAX(m.ID_MSG)) AS ID_MSG, COUNT(m.ID_MSG) AS num_matches + FROM {$db_prefix}matches AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? '' : " + WHERE $userQuery") ." + GROUP BY t.ID_TOPIC"; + + $context['topics'] = array(); + $use_cache = !empty($modSettings['search_cache_size']); + + // Either the results are not cached, or caching is disabled, so we need to create a temporary table. + if (!$use_cache || empty($_SESSION['search_cache']) || $_SESSION['search_cache']['params'] != $context['params']) + { + // Temporary tables are preferrable, but require the right MySQL permissions. + if (empty($modSettings['disableTemporaryTables'])) + { + // Get rid of it if it already exists. + mysql_query(" + DROP TABLE {$db_prefix}matches"); + + $result = mysql_query(" + CREATE TEMPORARY TABLE {$db_prefix}matches ( + ID_TOPIC mediumint(8) unsigned NOT NULL default '0', + ID_FIRST_MSG int(10) unsigned NOT NULL default '0', + numReplies int(11) NOT NULL default '0', + is_subject tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (ID_TOPIC) + ) TYPE=HEAP"); + + if ($result === false) + { + updateSettings(array('disableTemporaryTables' => '1')); + fatal_lang_error('unable_to_create_temporary'); + } + + if (!$search_params['subject_only']) + { + // Let's determine how many results we can expect. + db_query(" + INSERT INTO {$db_prefix}matches + SELECT DISTINCT t.ID_TOPIC, t.ID_FIRST_MSG, t.numReplies, 0 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE t.ID_TOPIC = m.ID_TOPIC" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $searchQuery", __FILE__, __LINE__); + $messageMatches = db_affected_rows(); + } + + // Select all topics that have subjects matching the search query. + db_query(" + INSERT IGNORE INTO {$db_prefix}matches + SELECT m.ID_TOPIC AS ID_TOPIC, m.ID_MSG, t.numReplies, 1 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE m.ID_MSG = t.ID_FIRST_MSG" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $topicQuery", __FILE__, __LINE__); + $subjectMatches = db_affected_rows(); + + if (!$search_params['subject_only']) + { + $request = db_query(" + SELECT COUNT(ID_TOPIC) + FROM {$db_prefix}matches", __FILE__, __LINE__); + list ($numResults) = mysql_fetch_row($request); + mysql_free_result($request); + } + else + $numResults = $subjectMatches; + + if (empty($numResults)) + $use_cache = false; + elseif (!$use_cache || $numResults <= $modSettings['search_results_per_page']) + { + $request = db_query(" + SELECT$mainQuery + ORDER BY $search_params[sort] $search_params[sort_dir] + LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $context['topics'][$row['ID_MSG']] = array( + 'id' => $row['ID_TOPIC'], + 'relevance' => round(100 * $row['relevance'] / $weight_total, 1) . '%', + 'num_matches' => $row['num_matches'], + 'matches' => array(), + ); + mysql_free_result($request); + + // We don't need cache, thank you. + $use_cache = false; + } + // Search is not yet cached, let's cache it. + elseif ($use_cache) + { + $modSettings['search_pointer'] = empty($modSettings['search_pointer']) ? 0 : (int) $modSettings['search_pointer']; + + // Increase the pointer. + updateSettings(array('search_pointer' => $modSettings['search_pointer'] >= 255 ? 0 : $modSettings['search_pointer'] + 1)); + + // Make sure this value isn't larger than 255 or the tinyint key field wouldn't be able to handle it. + $modSettings['search_cache_size'] = empty($modSettings['search_cache_size']) || $modSettings['search_cache_size'] > 255 ? 255 : $modSettings['search_cache_size']; + + // Remove old cached results and (if set) the previous session cached result. + db_query(" + DELETE FROM {$db_prefix}log_search + WHERE (ID_SEARCH >= $modSettings[search_pointer]" . ($modSettings['search_pointer'] < $modSettings['search_cache_size'] ? ' + AND ID_SEARCH < ' . (256 + $modSettings['search_pointer'] - $modSettings['search_cache_size']) : ' + OR ID_SEARCH < ' . ($modSettings['search_pointer'] - $modSettings['search_cache_size'])) . ')' . (isset($_SESSION['search_cache']['ID_SEARCH']) ? " + OR ID_SEARCH = " . $_SESSION['search_cache']['ID_SEARCH'] : ''), __FILE__, __LINE__); + + // Insert the new cached results. + if (!empty($numResults)) + db_query(" + INSERT IGNORE INTO {$db_prefix}log_search + (ID_SEARCH, ID_TOPIC, relevance, ID_MSG, num_matches) + SELECT $modSettings[search_pointer], $mainQuery", __FILE__, __LINE__); + $numResults = empty($numResults) ? 0 : db_affected_rows(); + + // Store it for the session. + $_SESSION['search_cache'] = array( + 'ID_SEARCH' => $modSettings['search_pointer'], + 'num_results' => $numResults, + 'params' => $context['params'], + ); + } + + // Get rid of the temporary table. + $request = db_query(" + DROP TABLE {$db_prefix}matches", __FILE__, __LINE__); + } + // Create temporary tables is disabled, we're gonna need to use PHP's memory and sorting. + else + { + $matchingTopics = array(); + + if (!$search_params['subject_only']) + { + // Get all the topics with a message match. + $request = db_query(" + SELECT DISTINCT t.ID_TOPIC, t.ID_FIRST_MSG, t.numReplies, 0 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE t.ID_TOPIC = m.ID_TOPIC" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $searchQuery", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $matchingTopics[$row['ID_TOPIC']] = $row; + $messageMatches = count($matchingTopics); + } + + // Get all the topics with a subject match. + $request = db_query(" + SELECT m.ID_TOPIC AS ID_TOPIC, t.ID_FIRST_MSG, t.numReplies, 1 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE m.ID_MSG = t.ID_FIRST_MSG" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $topicQuery", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $matchingTopics[$row['ID_TOPIC']] = $row; + $subjectMatches = db_affected_rows(); + + $numResults = $search_params['subject_only'] ? $subjectMatches : count($matchingTopics); + + if (empty($numResults)) + $use_cache = false; + elseif (!$use_cache || $numResults <= $modSettings['search_results_per_page']) + { + $sort = array(); + $request = db_query(" + SELECT + t.ID_TOPIC, COUNT(m.ID_MSG) AS numMsg, MAX(m.ID_MSG) AS lastMatch, MIN(m.ID_MSG) AS firstMatch, + COUNT(m.ID_MSG) AS num_matches + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? ' + WHERE t.ID_TOPIC IN (' . implode(', ', array_keys($matchingTopics)) . ')' : " + WHERE $userQuery + AND t.ID_TOPIC IN (" . implode(', ', array_keys($matchingTopics)) . ")") . " + GROUP BY t.ID_TOPIC + LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__); + $tmp = array(); + while ($row = mysql_fetch_assoc($request)) + { + $relevance = + $weight['frequency'] * ($row['numMsg'] == 0 ? 0 : $row['numMsg'] / ($matchingTopics[$row['ID_TOPIC']]['numReplies'] + 1)) + + $weight['age'] * (!isset($row['ID_MSG']) || $row['ID_MSG'] === null || $row['lastMatch'] < $minMsg ? 0 : ($row['lastMatch'] - $minMsg) / $recentMsg) + + $weight['length'] * ($matchingTopics[$row['ID_TOPIC']]['numReplies'] < $humungousTopicPosts ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] / $humungousTopicPosts : 1) + + $weight['subject'] * $matchingTopics[$row['ID_TOPIC']]['is_subject'] + + $weight['first_message'] * ($row['firstMatch'] == $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] ? 1 : 0); + $ID_MSG = $row['numMsg'] == 0 ? $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] : $row['lastMatch']; + $sort[$ID_MSG] = $search_params['sort'] == 'relevance' ? $relevance : ($search_params['sort'] == 'numReplies' ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] : $ID_MSG); + $tmp[$ID_MSG] = array( + 'id' => $row['ID_TOPIC'], + 'relevance' => round(100 * $relevance / $weight_total, 1) . '%', + 'num_matches' => $row['num_matches'], + 'matches' => array(), + ); + } + mysql_free_result($request); + + // Do the manual sorting. + if ($search_params['sort_dir'] == 'desc') + krsort($sort); + else + ksort($sort); + foreach ($sort as $ID_MSG => $value) + $context['topics'][$ID_MSG] = $tmp[$ID_MSG]; + unset($tmp); + + // We don't need cache, thank you. + $use_cache = false; + } + // Search is not yet cached, let's do that now. + elseif ($use_cache) + { + $modSettings['search_pointer'] = empty($modSettings['search_pointer']) ? 0 : (int) $modSettings['search_pointer']; + + $modSettings['search_cache_size'] = empty($modSettings['search_cache_size']) || $modSettings['search_cache_size'] > 255 ? 255 : $modSettings['search_cache_size']; + + // Remove old cached results. + db_query(" + DELETE FROM {$db_prefix}log_search + WHERE (ID_SEARCH >= $modSettings[search_pointer]" . ($modSettings['search_pointer'] < $modSettings['search_cache_size'] ? ' + AND ID_SEARCH < ' . (256 + $modSettings['search_pointer'] - $modSettings['search_cache_size']) : ' + OR ID_SEARCH < ' . ($modSettings['search_pointer'] - $modSettings['search_cache_size'])) . ')' . (isset($_SESSION['search_cache']['ID_SEARCH']) ? " + OR ID_SEARCH = " . $_SESSION['search_cache']['ID_SEARCH'] : ''), __FILE__, __LINE__); + + // Insert the new results into cache. + if (!empty($numResults)) + { + $insertRows = array(); + $sort = array(); + + // Get all topics that match the search query. + $request = db_query(" + SELECT + t.ID_TOPIC, COUNT(m.ID_MSG) AS numMsg, MAX(m.ID_MSG) AS lastMatch, MIN(m.ID_MSG) AS firstMatch + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? ' + WHERE t.ID_TOPIC IN (' . implode(', ', array_keys($matchingTopics)) . ')' : " + WHERE $userQuery + AND t.ID_TOPIC IN (" . implode(', ', array_keys($matchingTopics)) . ")") . " + GROUP BY t.ID_TOPIC", __FILE__, __LINE__); + $tmp = array(); + while ($row = mysql_fetch_assoc($request)) + { + $relevance = + $weight['frequency'] * ($row['numMsg'] == 0 ? 0 : $row['numMsg'] / ($matchingTopics[$row['ID_TOPIC']]['numReplies'] + 1)) + + $weight['age'] * (!isset($row['ID_MSG']) || $row['ID_MSG'] === null || $row['lastMatch'] < $minMsg ? 0 : ($row['lastMatch'] - $minMsg) / $recentMsg) + + $weight['length'] * ($matchingTopics[$row['ID_TOPIC']]['numReplies'] < $humungousTopicPosts ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] / $humungousTopicPosts : 1) + + $weight['subject'] * $matchingTopics[$row['ID_TOPIC']]['is_subject'] + + $weight['first_message'] * ($row['firstMatch'] == $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] ? 1 : 0); + $ID_MSG = $row['numMsg'] == 0 ? $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] : $row['lastMatch']; + $sort[$ID_MSG] = $search_params['sort'] == 'relevance' ? $relevance : ($search_params['sort'] == 'numReplies' ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] : $ID_MSG); + $tmp[$ID_MSG] = (isset($tmp[$ID_MSG]) ? $tmp[$ID_MSG] : '') . '(' . (int) $modSettings['search_pointer'] . ', ' . (int) $row['ID_TOPIC'] . ', ' . (int) $relevance . ', ' . (int) $ID_MSG . ', ' . (int) $row['numMsg'] . '),'; + } + mysql_free_result($request); + + // Do the sorting of the rows. + if ($search_params['sort_dir'] == 'desc') + krsort($sort); + else + ksort($sort); + foreach ($sort as $ID_MSG => $value) + $insertRows[$ID_MSG] = mb_substr($tmp[$ID_MSG], 0, -1); + unset($tmp); + + // Insert the matching topics into the cache. + if (!empty($insertRows)) + db_query(" + INSERT INTO {$db_prefix}log_search + (ID_SEARCH, ID_TOPIC, relevance, ID_MSG, num_matches) + VALUES " . implode(', ', $insertRows), __FILE__, __LINE__); + } + $numResults = empty($numResults) ? 0 : db_affected_rows(); + + // Store the cache information into the session. + $_SESSION['search_cache'] = array( + 'ID_SEARCH' => $modSettings['search_pointer'], + 'num_results' => $numResults, + 'params' => $context['params'], + ); + + // Increase the cache pointer. + updateSettings(array('search_pointer' => $modSettings['search_pointer'] >= 255 ? 0 : $modSettings['search_pointer'] + 1)); + } + } + } + + // Current search should be cached by now, grab it. + if ($use_cache) + { + $request = db_query(" + SELECT ls.ID_TOPIC, ls.ID_MSG, ls.relevance, ls.num_matches + FROM {$db_prefix}log_search AS ls" . ($search_params['sort'] == 'numReplies' ? ", {$db_prefix}topics AS t" : '') . " + WHERE ID_SEARCH = " . $_SESSION['search_cache']['ID_SEARCH'] . ($search_params['sort'] == 'numReplies' ? " + AND t.ID_TOPIC = ls.ID_TOPIC" : '') . " + ORDER BY $search_params[sort] $search_params[sort_dir] + LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $context['topics'][$row['ID_MSG']] = array( + 'id' => $row['ID_TOPIC'], + 'relevance' => round($row['relevance'] / 10, 1) . '%', + 'num_matches' => $row['num_matches'], + 'matches' => array(), + ); + mysql_free_result($request); + + $numResults = $_SESSION['search_cache']['num_results']; + } + + // Now that we know how many results to expect we can start calculating the page numbers. + $context['page_index'] = constructPageIndex($scripturl . '?action=search2;params=' . $context['params'], $_REQUEST['start'], $numResults, $modSettings['search_results_per_page'], false); + + if (!empty($context['topics'])) + { + // Create an array for the permissions. + $boards_can = array( + 'post_reply_own' => boardsAllowedTo('post_reply_own'), + 'post_reply_any' => boardsAllowedTo('post_reply_any'), + 'mark_any_notify' => boardsAllowedTo('mark_any_notify') + ); + + // Load the posters... + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}messages + WHERE ID_MEMBER != 0 + AND ID_MSG IN (" . implode(', ', array_keys($context['topics'])) . ')', __FILE__, __LINE__); + $posters = array(); + while ($row = mysql_fetch_assoc($request)) + $posters[] = $row['ID_MEMBER']; + mysql_free_result($request); + + if (!empty($posters)) + loadMemberData(array_unique($posters)); + + // Get the messages out for the callback - select enough that it can be made to look just like Display. + $messages_request = db_query(" + SELECT + m.ID_MSG, m.subject, m.posterName, m.posterEmail, m.posterTime, m.ID_MEMBER, + m.icon, m.posterIP, m.body, m.smileysEnabled, m.modifiedTime, m.modifiedName, + a.filename, IFNULL(a.size, 0) AS filesize, a.ID_ATTACH, a.downloads, + first_m.ID_MSG AS first_msg, first_m.subject AS first_subject, first_m.icon, first_m.posterTime AS first_posterTime, + first_mem.ID_MEMBER AS first_member_id, IFNULL(first_mem.realName, first_m.posterName) AS first_member_name, + last_m.ID_MSG AS last_msg, last_m.posterTime AS last_posterTime, last_mem.ID_MEMBER AS last_member_id, + IFNULL(last_mem.realName, last_m.posterName) AS last_member_name, + t.ID_TOPIC, t.isSticky, t.locked, t.ID_POLL, t.numReplies, t.numViews, + b.ID_BOARD, b.name AS bName, c.ID_CAT, c.name AS cName + FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}categories AS c, {$db_prefix}messages AS first_m, {$db_prefix}messages AS last_m) + LEFT JOIN {$db_prefix}members AS first_mem ON (first_mem.ID_MEMBER = first_m.ID_MEMBER) + LEFT JOIN {$db_prefix}members AS last_mem ON (last_mem.ID_MEMBER = first_m.ID_MEMBER) + LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MSG = m.ID_MSG) + WHERE m.ID_MSG IN (" . implode(', ', array_keys($context['topics'])) . ") + AND t.ID_TOPIC = m.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD + AND c.ID_CAT = b.ID_CAT + AND first_m.ID_MSG = t.ID_FIRST_MSG + AND last_m.ID_MSG = t.ID_LAST_MSG + ORDER BY FIND_IN_SET(m.ID_MSG, '" . implode(',', array_keys($context['topics'])) . "') + LIMIT " . count($context['topics']), __FILE__, __LINE__); + // Note that the reg-exp slows things alot, but makes things make a lot more sense. + } + + $context['key_words'] = &$searchArray; + + // Set the basic stuff for the template. + $context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']); + + $context['sub_template'] = 'results'; + $context['page_title'] = $txt[166]; + $context['get_topics'] = 'prepareSearchContext'; + $context['can_send_pm'] = allowedTo('pm_send'); + + loadJumpTo(); +} + +// Callback to return messages - saves memory. +function prepareSearchContext($reset = false) +{ + global $txt, $modSettings, $scripturl, $ID_MEMBER; + global $themeUser, $context, $messages_request, $db_prefix, $attachments, $boards_can; + + // Remember which message this is. (ie. reply #83) + static $counter = null; + if ($counter == null || $reset) + $counter = $_REQUEST['start'] + 1; + + // If the query returned false, bail. + if ($messages_request == false) + return false; + + // Start from the beginning... + if ($reset) + return @mysql_data_seek($messages_request, 0); + + // Attempt to get the next message. + $message = mysql_fetch_assoc($messages_request); + if (!$message) + return false; + + // Can't have an empty subject can we? + $message['subject'] = $message['subject'] != '' ? $message['subject'] : $txt[24]; + $message['first_subject'] = $message['first_subject'] != '' ? $message['first_subject'] : $txt[24]; + + // If it couldn't load, or the user was a guest.... someday may be done with a guest table. + if (!loadMemberContext($message['ID_MEMBER'])) + { + // Notice this information isn't used anywhere else.... *cough guest table cough* + $themeUser[$message['ID_MEMBER']]['name'] = $message['posterName']; + $themeUser[$message['ID_MEMBER']]['id'] = 0; + $themeUser[$message['ID_MEMBER']]['group'] = $txt[28]; + $themeUser[$message['ID_MEMBER']]['link'] = $message['posterName']; + $themeUser[$message['ID_MEMBER']]['email'] = $message['posterEmail']; + } + $themeUser[$message['ID_MEMBER']]['ip'] = $message['posterIP']; + + // Do the censor thang... + censorText($message['body']); + censorText($message['subject']); + + censorText($message['first_subject']); + + // Shorten this message if necessary. + if ($context['compact']) + { + // Set the number of characters before and after the searched keyword. + $charLimit = 40; + + $message['body'] = strtr($message['body'], array("\n" => ' ', '
    ' => "\n")); + $message['body'] = doUBBC($message['body'], $message['smileysEnabled']); + $message['body'] = strip_tags($message['body']); + + if (strlen($message['body']) > $charLimit) + { + if (empty($context['key_words'])) + $message['body'] = htmlspecialchars(mb_substr(un_htmlspecialchars($message['body']), 0, $charLimit) . (mb_strlen($message['body']) > $charLimit ? '...' : ''), ENT_QUOTES); + else + { + $matchString = ''; + foreach ($context['key_words'] as $keyword) + $matchString .= strtr(preg_quote($keyword, '/'), array('\*' => '.+?')) . '|'; + $matchString = mb_substr($matchString, 0, -1); + $message['body'] = un_htmlspecialchars(str_replace(' ', ' ', $message['body'])); + if (empty($modSettings['search_match_complete_words'])) + preg_match_all('/([^\s\W]{' . $charLimit . '}[\s\W]|[\s\W].{0,' . $charLimit . '}?|^)(' . $matchString . ')(.{0,' . $charLimit . '}[\s\W]|[^\s\W]{' . $charLimit . '})/ius', $message['body'], $matches); + else + preg_match_all('/([^\s\W]{' . $charLimit . '}[\s\W]|[\s\W].{0,' . $charLimit . '}?[\s\W]|^)(' . $matchString . ')([\s\W].{0,' . $charLimit . '}[\s\W]|[\s\W][^\s\W]{' . $charLimit . '})/isu', $message['body'], $matches); + $message['body'] = ''; + foreach ($matches[0] as $index => $match) + $message['body'] .= '... ' . htmlspecialchars($match, ENT_QUOTES) . ' ...
    '; + } + + // Re-fix the international characters. + $message['body'] = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~u', '&#$1;', $message['body']); + } + } + else + { + // Run UBBC interpreter on the message. + $message['body'] = doUBBC($message['body'], $message['smileysEnabled']); + } + + $output = array_merge($context['topics'][$message['ID_MSG']], array( + 'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($message['isSticky']), + 'is_locked' => !empty($message['locked']), + 'is_poll' => $modSettings['pollMode'] == '1' && $message['ID_POLL'] > 0, + 'is_hot' => $message['numReplies'] >= $modSettings['hotTopicPosts'], + 'is_very_hot' => $message['numReplies'] >= $modSettings['hotTopicVeryPosts'], + 'views' => $message['numViews'], + 'replies' => $message['numReplies'], + 'can_reply' => in_array($message['ID_BOARD'], $boards_can['post_reply_any']) || in_array(0, $boards_can['post_reply_any']), + 'can_mark_notify' => in_array($message['ID_BOARD'], $boards_can['mark_any_notify']) || in_array(0, $boards_can['mark_any_notify']), + 'first_post' => array( + 'id' => $message['first_msg'], + 'time' => timeformat($message['first_posterTime']), + 'subject' => $message['first_subject'], + 'href' => $scripturl . '?topic=' . $message['ID_TOPIC'] . '.0', + 'link' => '' . $message['first_subject'] . '', + 'icon' => $message['icon'], + 'member' => array( + 'id' => $message['first_member_id'], + 'name' => $message['first_member_name'], + 'href' => !empty($message['first_member_id']) ? $scripturl . '?action=profile;u=' . $message['first_member_id'] : '', + 'link' => !empty($message['first_member_id']) ? '' . $message['first_member_name'] . '' : $message['first_member_name'] + ) + ), + 'last_post' => array( + 'id' => $message['last_msg'], + 'time' => timeformat($message['last_posterTime']), + 'timestamp' => $message['last_posterTime'], + 'member' => array( + 'id' => $message['last_member_id'], + 'name' => $message['last_member_name'], + 'href' => !empty($message['last_member_id']) ? $scripturl . '?action=profile;u=' . $message['last_member_id'] : '', + 'link' => !empty($message['last_member_id']) ? '' . $message['last_member_name'] . '' : $message['last_member_name'] + ) + ), + 'board' => array( + 'id' => $message['ID_BOARD'], + 'name' => $message['bName'], + 'href' => $scripturl . '?board=' . $message['ID_BOARD'] . '.0', + 'link' => '' . $message['bName'] . '' + ), + 'category' => array( + 'id' => $message['ID_CAT'], + 'name' => $message['cName'], + 'href' => $scripturl . '#' . $message['ID_CAT'], + 'link' => '' . $message['cName'] . '' + ) + )); + determineTopicClass($output); + + $body_highlighted = $message['body']; + $subject_highlighted = $message['subject']; + + foreach ($context['key_words'] as $query) + { + // Fix the international characters in the keyword too. + $query = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~u', '&#$1;', strtr(preg_quote($query, '/'), array('&' => '&'))); + + $body_highlighted = preg_replace('/((<[^>]*)|' . $query . ')/iue', "'\$2' == '\$1' ? stripslashes('\$1') : '\$1'", $body_highlighted); + $subject_highlighted = preg_replace('/((<[^>]*)|' . $query . ')/iue', "'$2' == '$1' ? stripslashes('$1') : '$1'", $subject_highlighted); + } + + $output['matches'][] = array( + 'id' => $message['ID_MSG'], + 'attachment' => loadAttachmentContext($message['ID_MSG']), + 'alternate' => $counter % 2, + 'member' => &$themeUser[$message['ID_MEMBER']], + 'icon' => $message['icon'], + 'subject' => $message['subject'], + 'subject_highlighted' => $subject_highlighted, + 'time' => timeformat($message['posterTime']), + 'timestamp' => $message['posterTime'], + 'counter' => $counter, + 'modified' => array( + 'time' => timeformat($message['modifiedTime']), + 'timestamp' => $message['modifiedTime'], + 'name' => $message['modifiedName'] + ), + 'body' => $message['body'], + 'body_highlighted' => $body_highlighted, + 'start' => 'msg' . $message['ID_MSG'] + ); + $counter++; + + return $output; +} + +?> diff --git a/Sources/Search.php.backup b/Sources/Search.php.backup new file mode 100644 index 0000000..3abb2e2 --- /dev/null +++ b/Sources/Search.php.backup @@ -0,0 +1,935 @@ + $scripturl . '?action=search', + 'name' => $txt[182] + ); + + // If you got back from search2 by using the linktree, you get your original search parameters back. + if (isset($_REQUEST['params'])) + { + $temp_params = explode('|"|', base64_decode($_REQUEST['params'])); + $context['search_params'] = array(); + foreach ($temp_params as $i => $data) + { + list ($k, $v) = explode('|\'|', $data); + $context['search_params'][$k] = stripslashes($v); + } + if (isset($context['search_params']['brd'])) + $context['search_params']['brd'] = $context['search_params']['brd'] == '' ? array() : explode(',', $context['search_params']['brd']); + } + + if (isset($context['search_params']['search'])) + $context['search_params']['search'] = htmlspecialchars($context['search_params']['search']); + if (isset($context['search_params']['userspec'])) + $context['search_params']['userspec'] = htmlspecialchars(stripslashes($context['search_params']['userspec'])); + + // Find all the boards this user is allowed to see. + $request = db_query(" + SELECT b.ID_CAT, c.name AS catName, b.ID_BOARD, b.name, b.childLevel + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT) + WHERE $user_info[query_see_board] + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['num_boards'] = mysql_num_rows($request); + $context['categories'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + // This category hasn't been set up yet.. + if (!isset($context['categories'][$row['ID_CAT']])) + $context['categories'][$row['ID_CAT']] = array( + 'id' => $row['ID_CAT'], + 'name' => $row['catName'], + 'boards' => array() + ); + + // Set this board up, and let the template know when it's a child. (indent them..) + $context['categories'][$row['ID_CAT']]['boards'][$row['ID_BOARD']] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'child_level' => $row['childLevel'] + ); + } + mysql_free_result($request); + + // Simple or not? + $context['simple_search'] = !empty($modSettings['simpleSearch']) && !isset($_GET['advanced']); + $context['page_title'] = $txt[183]; +} + +// Gather the results and show them. +function PlushSearch2() +{ + global $modSettings, $sourcedir; + global $scripturl, $txt, $db_prefix, $user_info, $context, $messages_request, $attachments, $boards_can; + + $weight_factors = array( + 'frequency', + 'age', + 'length', + 'subject', + 'first_message', + ); + + $weight = array(); + $weight_total = 0; + foreach ($weight_factors as $weight_factor) + { + $weight[$weight_factor] = empty($modSettings['search_weight_' . $weight_factor]) ? 0 : (int) $modSettings['search_weight_' . $weight_factor]; + $weight_total += $weight[$weight_factor]; + } + + // Zero weight. Weightless. + if (empty($weight_total)) + fatal_lang_error('search_invalid_weights'); + + + // Fine-tune the weight of each search factor. These factors should add up to 100. + $weight = array( + // The more message within a topic match the search query, the higher the ranking. + 'frequency' => 50, + // The more recent a message is, the higher its ranking. + 'age' => 5, + // The larger the topic is, the higher its ranking. + 'length' => 20, + // If a search string happens to be part of the topic subject, it's probably a better match. + 'subject' => 15, + // If the first message of a topic is a match, then the whole topic might be more interesting. + 'first_message' => 10, + ); + + + // These vars don't require an interface, the're just here for tweaking. + $recentPercentage = 0.30; + $humungousTopicPosts = 200; + $maxMembersToSearch = 500; + + loadTemplate('Search'); + + // Are you allowed? + isAllowedTo('search_posts'); + + // So, we're allowed here, let's clean up the start variable - just incase. + $_REQUEST['start'] = (int) $_REQUEST['start']; + + require_once($sourcedir . '/Display.php'); + + // $search_params will carry all settings that differ from the default search parameters. + // That way, the URLs involved in a search page will be kept as short as possible. + $search_params = array(); + + if (isset($_REQUEST['params'])) + { + $temp_params = explode('|"|', base64_decode($_REQUEST['params'])); + foreach ($temp_params as $i => $data) + { + list ($k, $v) = explode('|\'|', $data); + $search_params[$k] = stripslashes($v); + } + if (isset($search_params['brd'])) + $search_params['brd'] = $search_params['brd'] == '' ? array() : explode(',', $search_params['brd']); + } + else + { + $search_params['subject_only'] = true; + } + + + // 1 => 'allwords' (default, don't set as param) / 2 => 'anywords'. + if (!empty($search_params['searchtype']) || (!empty($_REQUEST['searchtype']) && $_REQUEST['searchtype'] == 2)) + $search_params['searchtype'] = 2; + + // Minimum age of messages. Default to zero (don't set param in that case). + if (!empty($search_params['minage']) || (!empty($_REQUEST['minage']) && $_REQUEST['minage'] > 0)) + $search_params['minage'] = !empty($search_params['minage']) ? (int) $search_params['minage'] : (int) $_REQUEST['minage']; + + // Maximum age of messages. Default to infinite (9999 days: param not set). + if (!empty($search_params['maxage']) || (!empty($_REQUEST['maxage']) && $_REQUEST['maxage'] != 9999)) + $search_params['maxage'] = !empty($search_params['maxage']) ? (int) $search_params['maxage'] : (int) $_REQUEST['maxage']; + + $timeAddition = ''; + $timeAddition .= !empty($search_params['minage']) ? ' AND m.posterTime <= ' . (time() - $search_params['minage'] * 86400) : ''; + $timeAddition .= !empty($search_params['maxage']) ? ' AND m.posterTime >= ' . (time() - $search_params['maxage'] * 86400) : ''; + + // Default the user name to a wildcard matching every user (*). + if (!empty($search_params['user_spec']) || (!empty($_REQUEST['userspec']) && $_REQUEST['userspec'] != '*')) + $search_params['userspec'] = isset($search_params['userspec']) ? $search_params['userspec'] : $_REQUEST['userspec']; + + // If there's no specific user, then don't mention it in the main query. + if (empty($search_params['userspec'])) + $userQuery = ''; + else + { + $userString = strtolower(addslashes(strtr($search_params['userspec'], array('%' => '\%', '_' => '\_', '*' => '%', '?' => '_')))); + // Retrieve a list of possible members. + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE realName LIKE '$userString'", __FILE__, __LINE__); + // Simply do nothing if there're too many members matching the criteria. + if (mysql_num_rows($request) > $maxMembersToSearch) + $userQuery = ''; + elseif (mysql_num_rows($request) == 0) + $userQuery = "m.ID_MEMBER = 0 AND m.posterName LIKE '$userString'"; + else + { + $memberlist = array(); + while ($row = mysql_fetch_assoc($request)) + $memberlist[] = $row['ID_MEMBER']; + $userQuery = "(m.ID_MEMBER IN (" . implode(', ', $memberlist) . ") OR (m.ID_MEMBER = 0 AND m.posterName LIKE '$userString'))"; + } + } + + // If the boards were passed by URL (params=), temporarily put them back in $_REQUEST. + if (!empty($search_params['brd']) && is_array($search_params['brd'])) + $_REQUEST['brd'] = $search_params['brd']; + + // Make sure all boards are integers. + if (!empty($_REQUEST['brd'])) + foreach ($_REQUEST['brd'] as $id => $brd) + $_REQUEST['brd'][$id] = (int) $brd; + + // Select all boards you've selected AND are allowed to see. + if ($user_info['is_admin']) + $search_params['brd'] = empty($_REQUEST['brd']) ? array() : $_REQUEST['brd']; + else + { + $request = db_query(" + SELECT b.ID_BOARD + FROM {$db_prefix}boards AS b + WHERE $user_info[query_see_board]" . (empty($_REQUEST['brd']) ? '' : " + AND b.ID_BOARD IN (" . implode(', ', $_REQUEST['brd']) . ")"), __FILE__, __LINE__); + $search_params['brd'] = array(); + while ($row = mysql_fetch_assoc($request)) + $search_params['brd'][] = $row['ID_BOARD']; + mysql_free_result($request); + + // This error should pro'bly only happen for hackers. + if (empty($search_params['brd'])) + fatal_lang_error('search_no_boards'); + } + + // If we've selected all boards, this parameter can be left empty. + $request = db_query(" + SELECT COUNT(ID_BOARD) + FROM {$db_prefix}boards", __FILE__, __LINE__); + list ($num_boards) = mysql_fetch_row($request); + mysql_free_result($request); + + if ($num_boards == count($search_params['brd'])) + $search_params['brd'] = array(); + // Make sure these all boards are numbers. + elseif (!empty($search_params['brd'])) + { + foreach ($search_params['brd'] as $k => $v) + $search_params['brd'][$k] = (int) $v; + } + + $search_params['show_complete'] = !empty($search_params['show_complete']) || !empty($_REQUEST['show_complete']); + $search_params['subject_only'] = !empty($search_params['subject_only']) || !empty($_REQUEST['subject_only']); + + $context['compact'] = !$search_params['show_complete']; + + // What are we searching for? + $search_params['search'] = !empty($search_params['search']) ? $search_params['search'] : (isset($_REQUEST['search']) ? stripslashes($_REQUEST['search']) : ''); + // Nothing?? + if (!isset($search_params['search']) || $search_params['search'] == '') + fatal_lang_error('no_valid_search_string', false); + + // Extract phrase parts first (e.g. some words "this is a phrase" some more words.) + preg_match_all('/(?:^|\s)"([^"]+)"(?:$|\s)/', $search_params['search'], $matches, PREG_PATTERN_ORDER); + $searchArray = $matches[1]; + + // Remove the phrase parts and extract the words. + $searchArray = array_merge($searchArray, explode(' ', preg_replace('/(?:^|\s)"([^"]+)"(?:$|\s)/', ' ', $search_params['search']))); + + // Trim everything and make sure there are no words that are the same. + foreach ($searchArray as $index => $value) + { + $searchArray[$index] = addslashes(strtolower(trim($value))); + if (!isset($searchArray[$index]) || $searchArray[$index] == '') + unset($searchArray[$index]); + } + $searchArray = array_slice(array_unique($searchArray), 0, 10); + + if (empty($searchArray)) + fatal_lang_error('no_valid_search_string', false); + + // Each word is matched against the body and the subject. + $searchParts = array(); + foreach ($searchArray as $word) + { + if (empty($modSettings['search_match_complete_words'])) + $searchParts[] = " LIKE '%" . strtr($word, array('_' => '\\_', '%' => '\\%')) . "%'"; + else + $searchParts[] = " RLIKE '[[:<:]]" . addcslashes(preg_replace(array('/([\[\]$.+?|{}])/', '/\*/'), array('[$1]', '.+'), $word), '') . "[[:>:]]'"; + } + + $searchQuery = 0; + + // Either all words must match (searchtype == 1) or any of the words (searchtype == 2). + if (empty($search_params['searchtype'])) + { + if (!$search_params['subject_only']) + $searchQuery = 'm.body' . implode(' AND m.body', $searchParts) . $timeAddition; + $topicQuery = 'm.subject' . implode(' AND m.subject', $searchParts) . $timeAddition; + } + else + { + if (!$search_params['subject_only']) + $searchQuery = (count($searchParts) > 1 ? '(' : '') . 'm.body' . implode(' OR m.body', $searchParts) . (count($searchParts) > 1 ? ')' : '') . $timeAddition; + $topicQuery = (count($searchParts) > 1 ? '(' : '') . 'm.subject' . implode(' OR m.subject', $searchParts) . (count($searchParts) > 1 ? ')' : '') . $timeAddition; + } + + // Get the sorting parameters right. Default to sort by relevance descending. + $sort_columns = array( + 'relevance', + 'numReplies', + 'ID_MSG', + ); + if (empty($search_params['sort']) && !empty($_REQUEST['sort'])) + list ($search_params['sort'], $search_params['sort_dir']) = array_pad(explode('|', $_REQUEST['sort']), 2, ''); + $search_params['sort'] = !empty($search_params['sort']) && in_array($search_params['sort'], $sort_columns) ? $search_params['sort'] : 'relevance'; + $search_params['sort_dir'] = !empty($search_params['sort_dir']) && $search_params['sort_dir'] == 'asc' ? 'asc' : 'desc'; + + $context['mark'] = array(); + foreach ($searchArray as $word) + $context['mark'][$word] = '' . $word . ''; + + // All search params have been checked, let's compile them to a single string... made less simple by PHP 4.3.9 and below. + $temp_params = $search_params; + if (isset($temp_params['brd'])) + $temp_params['brd'] = implode(',', $temp_params['brd']); + $context['params'] = array(); + foreach ($temp_params as $k => $v) + $context['params'][] = $k . '|\'|' . addslashes($v); + $context['params'] = base64_encode(implode('|"|', $context['params'])); + + // ... and add the links to the link tree. + $context['linktree'][] = array( + 'url' => $scripturl . '?action=search;params=' . $context['params'], + 'name' => $txt[182] + ); + $context['linktree'][] = array( + 'url' => $scripturl . '?action=search2;params=' . $context['params'], + 'name' => $txt['search_results'] + ); + + // Determine some values needed to calculate the relevance. + $minMsg = (int) (1 - $recentPercentage) * $modSettings['maxMsgID']; + $recentMsg = $modSettings['maxMsgID'] - $minMsg; + + $mainQuery = " + t.ID_TOPIC, + $weight[frequency] * IF(m.ID_MSG IS NOT NULL, COUNT(m.ID_MSG) / (t.numReplies + 1), 0) + + $weight[age] * IF(m.ID_MSG IS NULL OR MAX(m.ID_MSG) < $minMsg, 0, (MAX(m.ID_MSG) - $minMsg) / $recentMsg) + + $weight[length] * IF(t.numReplies < $humungousTopicPosts, t.numReplies / $humungousTopicPosts, 1) + + $weight[subject] * t.is_subject + + $weight[first_message] * IF(MIN(m.ID_MSG) = t.ID_FIRST_MSG, 1, 0) AS relevance, + IF(COUNT(m.ID_MSG) = 0, t.ID_FIRST_MSG, MAX(m.ID_MSG)) AS ID_MSG, COUNT(m.ID_MSG) AS num_matches + FROM {$db_prefix}matches AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? '' : " + WHERE $userQuery") ." + GROUP BY t.ID_TOPIC"; + + $context['topics'] = array(); + $use_cache = !empty($modSettings['search_cache_size']); + + // Either the results are not cached, or caching is disabled, so we need to create a temporary table. + if (!$use_cache || empty($_SESSION['search_cache']) || $_SESSION['search_cache']['params'] != $context['params']) + { + // Temporary tables are preferrable, but require the right MySQL permissions. + if (empty($modSettings['disableTemporaryTables'])) + { + // Get rid of it if it already exists. + mysql_query(" + DROP TABLE {$db_prefix}matches"); + + $result = mysql_query(" + CREATE TEMPORARY TABLE {$db_prefix}matches ( + ID_TOPIC mediumint(8) unsigned NOT NULL default '0', + ID_FIRST_MSG int(10) unsigned NOT NULL default '0', + numReplies int(11) NOT NULL default '0', + is_subject tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (ID_TOPIC) + ) TYPE=HEAP"); + + if ($result === false) + { + updateSettings(array('disableTemporaryTables' => '1')); + fatal_lang_error('unable_to_create_temporary'); + } + + if (!$search_params['subject_only']) + { + // Let's determine how many results we can expect. + db_query(" + INSERT INTO {$db_prefix}matches + SELECT DISTINCT t.ID_TOPIC, t.ID_FIRST_MSG, t.numReplies, 0 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE t.ID_TOPIC = m.ID_TOPIC" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $searchQuery", __FILE__, __LINE__); + $messageMatches = db_affected_rows(); + } + + // Select all topics that have subjects matching the search query. + db_query(" + INSERT IGNORE INTO {$db_prefix}matches + SELECT m.ID_TOPIC AS ID_TOPIC, m.ID_MSG, t.numReplies, 1 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE m.ID_MSG = t.ID_FIRST_MSG" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $topicQuery", __FILE__, __LINE__); + $subjectMatches = db_affected_rows(); + + if (!$search_params['subject_only']) + { + $request = db_query(" + SELECT COUNT(ID_TOPIC) + FROM {$db_prefix}matches", __FILE__, __LINE__); + list ($numResults) = mysql_fetch_row($request); + mysql_free_result($request); + } + else + $numResults = $subjectMatches; + + if (empty($numResults)) + $use_cache = false; + elseif (!$use_cache || $numResults <= $modSettings['search_results_per_page']) + { + $request = db_query(" + SELECT$mainQuery + ORDER BY $search_params[sort] $search_params[sort_dir] + LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $context['topics'][$row['ID_MSG']] = array( + 'id' => $row['ID_TOPIC'], + 'relevance' => round(100 * $row['relevance'] / $weight_total, 1) . '%', + 'num_matches' => $row['num_matches'], + 'matches' => array(), + ); + mysql_free_result($request); + + // We don't need cache, thank you. + $use_cache = false; + } + // Search is not yet cached, let's cache it. + elseif ($use_cache) + { + $modSettings['search_pointer'] = empty($modSettings['search_pointer']) ? 0 : (int) $modSettings['search_pointer']; + + // Increase the pointer. + updateSettings(array('search_pointer' => $modSettings['search_pointer'] >= 255 ? 0 : $modSettings['search_pointer'] + 1)); + + // Make sure this value isn't larger than 255 or the tinyint key field wouldn't be able to handle it. + $modSettings['search_cache_size'] = empty($modSettings['search_cache_size']) || $modSettings['search_cache_size'] > 255 ? 255 : $modSettings['search_cache_size']; + + // Remove old cached results and (if set) the previous session cached result. + db_query(" + DELETE FROM {$db_prefix}log_search + WHERE (ID_SEARCH >= $modSettings[search_pointer]" . ($modSettings['search_pointer'] < $modSettings['search_cache_size'] ? ' + AND ID_SEARCH < ' . (256 + $modSettings['search_pointer'] - $modSettings['search_cache_size']) : ' + OR ID_SEARCH < ' . ($modSettings['search_pointer'] - $modSettings['search_cache_size'])) . ')' . (isset($_SESSION['search_cache']['ID_SEARCH']) ? " + OR ID_SEARCH = " . $_SESSION['search_cache']['ID_SEARCH'] : ''), __FILE__, __LINE__); + + // Insert the new cached results. + if (!empty($numResults)) + db_query(" + INSERT IGNORE INTO {$db_prefix}log_search + (ID_SEARCH, ID_TOPIC, relevance, ID_MSG, num_matches) + SELECT $modSettings[search_pointer], $mainQuery", __FILE__, __LINE__); + $numResults = empty($numResults) ? 0 : db_affected_rows(); + + // Store it for the session. + $_SESSION['search_cache'] = array( + 'ID_SEARCH' => $modSettings['search_pointer'], + 'num_results' => $numResults, + 'params' => $context['params'], + ); + } + + // Get rid of the temporary table. + $request = db_query(" + DROP TABLE {$db_prefix}matches", __FILE__, __LINE__); + } + // Create temporary tables is disabled, we're gonna need to use PHP's memory and sorting. + else + { + $matchingTopics = array(); + + if (!$search_params['subject_only']) + { + // Get all the topics with a message match. + $request = db_query(" + SELECT DISTINCT t.ID_TOPIC, t.ID_FIRST_MSG, t.numReplies, 0 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE t.ID_TOPIC = m.ID_TOPIC" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $searchQuery", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $matchingTopics[$row['ID_TOPIC']] = $row; + $messageMatches = count($matchingTopics); + } + + // Get all the topics with a subject match. + $request = db_query(" + SELECT m.ID_TOPIC AS ID_TOPIC, t.ID_FIRST_MSG, t.numReplies, 1 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE m.ID_MSG = t.ID_FIRST_MSG" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $topicQuery", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $matchingTopics[$row['ID_TOPIC']] = $row; + $subjectMatches = db_affected_rows(); + + $numResults = $search_params['subject_only'] ? $subjectMatches : count($matchingTopics); + + if (empty($numResults)) + $use_cache = false; + elseif (!$use_cache || $numResults <= $modSettings['search_results_per_page']) + { + $sort = array(); + $request = db_query(" + SELECT + t.ID_TOPIC, COUNT(m.ID_MSG) AS numMsg, MAX(m.ID_MSG) AS lastMatch, MIN(m.ID_MSG) AS firstMatch, + COUNT(m.ID_MSG) AS num_matches + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? ' + WHERE t.ID_TOPIC IN (' . implode(', ', array_keys($matchingTopics)) . ')' : " + WHERE $userQuery + AND t.ID_TOPIC IN (" . implode(', ', array_keys($matchingTopics)) . ")") . " + GROUP BY t.ID_TOPIC + LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__); + $tmp = array(); + while ($row = mysql_fetch_assoc($request)) + { + $relevance = + $weight['frequency'] * ($row['numMsg'] == 0 ? 0 : $row['numMsg'] / ($matchingTopics[$row['ID_TOPIC']]['numReplies'] + 1)) + + $weight['age'] * (!isset($row['ID_MSG']) || $row['ID_MSG'] === null || $row['lastMatch'] < $minMsg ? 0 : ($row['lastMatch'] - $minMsg) / $recentMsg) + + $weight['length'] * ($matchingTopics[$row['ID_TOPIC']]['numReplies'] < $humungousTopicPosts ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] / $humungousTopicPosts : 1) + + $weight['subject'] * $matchingTopics[$row['ID_TOPIC']]['is_subject'] + + $weight['first_message'] * ($row['firstMatch'] == $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] ? 1 : 0); + $ID_MSG = $row['numMsg'] == 0 ? $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] : $row['lastMatch']; + $sort[$ID_MSG] = $search_params['sort'] == 'relevance' ? $relevance : ($search_params['sort'] == 'numReplies' ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] : $ID_MSG); + $tmp[$ID_MSG] = array( + 'id' => $row['ID_TOPIC'], + 'relevance' => round(100 * $relevance / $weight_total, 1) . '%', + 'num_matches' => $row['num_matches'], + 'matches' => array(), + ); + } + mysql_free_result($request); + + // Do the manual sorting. + if ($search_params['sort_dir'] == 'desc') + krsort($sort); + else + ksort($sort); + foreach ($sort as $ID_MSG => $value) + $context['topics'][$ID_MSG] = $tmp[$ID_MSG]; + unset($tmp); + + // We don't need cache, thank you. + $use_cache = false; + } + // Search is not yet cached, let's do that now. + elseif ($use_cache) + { + $modSettings['search_pointer'] = empty($modSettings['search_pointer']) ? 0 : (int) $modSettings['search_pointer']; + + $modSettings['search_cache_size'] = empty($modSettings['search_cache_size']) || $modSettings['search_cache_size'] > 255 ? 255 : $modSettings['search_cache_size']; + + // Remove old cached results. + db_query(" + DELETE FROM {$db_prefix}log_search + WHERE (ID_SEARCH >= $modSettings[search_pointer]" . ($modSettings['search_pointer'] < $modSettings['search_cache_size'] ? ' + AND ID_SEARCH < ' . (256 + $modSettings['search_pointer'] - $modSettings['search_cache_size']) : ' + OR ID_SEARCH < ' . ($modSettings['search_pointer'] - $modSettings['search_cache_size'])) . ')' . (isset($_SESSION['search_cache']['ID_SEARCH']) ? " + OR ID_SEARCH = " . $_SESSION['search_cache']['ID_SEARCH'] : ''), __FILE__, __LINE__); + + // Insert the new results into cache. + if (!empty($numResults)) + { + $insertRows = array(); + $sort = array(); + + // Get all topics that match the search query. + $request = db_query(" + SELECT + t.ID_TOPIC, COUNT(m.ID_MSG) AS numMsg, MAX(m.ID_MSG) AS lastMatch, MIN(m.ID_MSG) AS firstMatch + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? ' + WHERE t.ID_TOPIC IN (' . implode(', ', array_keys($matchingTopics)) . ')' : " + WHERE $userQuery + AND t.ID_TOPIC IN (" . implode(', ', array_keys($matchingTopics)) . ")") . " + GROUP BY t.ID_TOPIC", __FILE__, __LINE__); + $tmp = array(); + while ($row = mysql_fetch_assoc($request)) + { + $relevance = + $weight['frequency'] * ($row['numMsg'] == 0 ? 0 : $row['numMsg'] / ($matchingTopics[$row['ID_TOPIC']]['numReplies'] + 1)) + + $weight['age'] * (!isset($row['ID_MSG']) || $row['ID_MSG'] === null || $row['lastMatch'] < $minMsg ? 0 : ($row['lastMatch'] - $minMsg) / $recentMsg) + + $weight['length'] * ($matchingTopics[$row['ID_TOPIC']]['numReplies'] < $humungousTopicPosts ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] / $humungousTopicPosts : 1) + + $weight['subject'] * $matchingTopics[$row['ID_TOPIC']]['is_subject'] + + $weight['first_message'] * ($row['firstMatch'] == $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] ? 1 : 0); + $ID_MSG = $row['numMsg'] == 0 ? $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] : $row['lastMatch']; + $sort[$ID_MSG] = $search_params['sort'] == 'relevance' ? $relevance : ($search_params['sort'] == 'numReplies' ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] : $ID_MSG); + $tmp[$ID_MSG] = (isset($tmp[$ID_MSG]) ? $tmp[$ID_MSG] : '') . '(' . (int) $modSettings['search_pointer'] . ', ' . (int) $row['ID_TOPIC'] . ', ' . (int) $relevance . ', ' . (int) $ID_MSG . ', ' . (int) $row['numMsg'] . '),'; + } + mysql_free_result($request); + + // Do the sorting of the rows. + if ($search_params['sort_dir'] == 'desc') + krsort($sort); + else + ksort($sort); + foreach ($sort as $ID_MSG => $value) + $insertRows[$ID_MSG] = substr($tmp[$ID_MSG], 0, -1); + unset($tmp); + + // Insert the matching topics into the cache. + if (!empty($insertRows)) + db_query(" + INSERT INTO {$db_prefix}log_search + (ID_SEARCH, ID_TOPIC, relevance, ID_MSG, num_matches) + VALUES " . implode(', ', $insertRows), __FILE__, __LINE__); + } + $numResults = empty($numResults) ? 0 : db_affected_rows(); + + // Store the cache information into the session. + $_SESSION['search_cache'] = array( + 'ID_SEARCH' => $modSettings['search_pointer'], + 'num_results' => $numResults, + 'params' => $context['params'], + ); + + // Increase the cache pointer. + updateSettings(array('search_pointer' => $modSettings['search_pointer'] >= 255 ? 0 : $modSettings['search_pointer'] + 1)); + } + } + } + + // Current search should be cached by now, grab it. + if ($use_cache) + { + $request = db_query(" + SELECT ls.ID_TOPIC, ls.ID_MSG, ls.relevance, ls.num_matches + FROM {$db_prefix}log_search AS ls" . ($search_params['sort'] == 'numReplies' ? ", {$db_prefix}topics AS t" : '') . " + WHERE ID_SEARCH = " . $_SESSION['search_cache']['ID_SEARCH'] . ($search_params['sort'] == 'numReplies' ? " + AND t.ID_TOPIC = ls.ID_TOPIC" : '') . " + ORDER BY $search_params[sort] $search_params[sort_dir] + LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $context['topics'][$row['ID_MSG']] = array( + 'id' => $row['ID_TOPIC'], + 'relevance' => round($row['relevance'] / 10, 1) . '%', + 'num_matches' => $row['num_matches'], + 'matches' => array(), + ); + mysql_free_result($request); + + $numResults = $_SESSION['search_cache']['num_results']; + } + + // Now that we know how many results to expect we can start calculating the page numbers. + $context['page_index'] = constructPageIndex($scripturl . '?action=search2;params=' . $context['params'], $_REQUEST['start'], $numResults, $modSettings['search_results_per_page'], false); + + if (!empty($context['topics'])) + { + // Create an array for the permissions. + $boards_can = array( + 'post_reply_own' => boardsAllowedTo('post_reply_own'), + 'post_reply_any' => boardsAllowedTo('post_reply_any'), + 'mark_any_notify' => boardsAllowedTo('mark_any_notify') + ); + + // Load the posters... + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}messages + WHERE ID_MEMBER != 0 + AND ID_MSG IN (" . implode(', ', array_keys($context['topics'])) . ')', __FILE__, __LINE__); + $posters = array(); + while ($row = mysql_fetch_assoc($request)) + $posters[] = $row['ID_MEMBER']; + mysql_free_result($request); + + if (!empty($posters)) + loadMemberData(array_unique($posters)); + + // Get the messages out for the callback - select enough that it can be made to look just like Display. + $messages_request = db_query(" + SELECT + m.ID_MSG, m.subject, m.posterName, m.posterEmail, m.posterTime, m.ID_MEMBER, + m.icon, m.posterIP, m.body, m.smileysEnabled, m.modifiedTime, m.modifiedName, + a.filename, IFNULL(a.size, 0) AS filesize, a.ID_ATTACH, a.downloads, + first_m.ID_MSG AS first_msg, first_m.subject AS first_subject, first_m.icon, first_m.posterTime AS first_posterTime, + first_mem.ID_MEMBER AS first_member_id, IFNULL(first_mem.realName, first_m.posterName) AS first_member_name, + last_m.ID_MSG AS last_msg, last_m.posterTime AS last_posterTime, last_mem.ID_MEMBER AS last_member_id, + IFNULL(last_mem.realName, last_m.posterName) AS last_member_name, + t.ID_TOPIC, t.isSticky, t.locked, t.ID_POLL, t.numReplies, t.numViews, + b.ID_BOARD, b.name AS bName, c.ID_CAT, c.name AS cName + FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}categories AS c, {$db_prefix}messages AS first_m, {$db_prefix}messages AS last_m) + LEFT JOIN {$db_prefix}members AS first_mem ON (first_mem.ID_MEMBER = first_m.ID_MEMBER) + LEFT JOIN {$db_prefix}members AS last_mem ON (last_mem.ID_MEMBER = first_m.ID_MEMBER) + LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MSG = m.ID_MSG) + WHERE m.ID_MSG IN (" . implode(', ', array_keys($context['topics'])) . ") + AND t.ID_TOPIC = m.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD + AND c.ID_CAT = b.ID_CAT + AND first_m.ID_MSG = t.ID_FIRST_MSG + AND last_m.ID_MSG = t.ID_LAST_MSG + ORDER BY FIND_IN_SET(m.ID_MSG, '" . implode(',', array_keys($context['topics'])) . "') + LIMIT " . count($context['topics']), __FILE__, __LINE__); + // Note that the reg-exp slows things alot, but makes things make a lot more sense. + } + + $context['key_words'] = &$searchArray; + + // Set the basic stuff for the template. + $context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']); + + $context['sub_template'] = 'results'; + $context['page_title'] = $txt[166]; + $context['get_topics'] = 'prepareSearchContext'; + $context['can_send_pm'] = allowedTo('pm_send'); + + loadJumpTo(); +} + +// Callback to return messages - saves memory. +function prepareSearchContext($reset = false) +{ + global $txt, $modSettings, $scripturl, $ID_MEMBER; + global $themeUser, $context, $messages_request, $db_prefix, $attachments, $boards_can; + + // Remember which message this is. (ie. reply #83) + static $counter = null; + if ($counter == null || $reset) + $counter = $_REQUEST['start'] + 1; + + // If the query returned false, bail. + if ($messages_request == false) + return false; + + // Start from the beginning... + if ($reset) + return @mysql_data_seek($messages_request, 0); + + // Attempt to get the next message. + $message = mysql_fetch_assoc($messages_request); + if (!$message) + return false; + + // Can't have an empty subject can we? + $message['subject'] = $message['subject'] != '' ? $message['subject'] : $txt[24]; + $message['first_subject'] = $message['first_subject'] != '' ? $message['first_subject'] : $txt[24]; + + // If it couldn't load, or the user was a guest.... someday may be done with a guest table. + if (!loadMemberContext($message['ID_MEMBER'])) + { + // Notice this information isn't used anywhere else.... *cough guest table cough* + $themeUser[$message['ID_MEMBER']]['name'] = $message['posterName']; + $themeUser[$message['ID_MEMBER']]['id'] = 0; + $themeUser[$message['ID_MEMBER']]['group'] = $txt[28]; + $themeUser[$message['ID_MEMBER']]['link'] = $message['posterName']; + $themeUser[$message['ID_MEMBER']]['email'] = $message['posterEmail']; + } + $themeUser[$message['ID_MEMBER']]['ip'] = $message['posterIP']; + + // Do the censor thang... + censorText($message['body']); + censorText($message['subject']); + + censorText($message['first_subject']); + + // Shorten this message if necessary. + if ($context['compact']) + { + // Set the number of characters before and after the searched keyword. + $charLimit = 40; + + $message['body'] = strtr($message['body'], array("\n" => ' ', '
    ' => "\n")); + $message['body'] = doUBBC($message['body'], $message['smileysEnabled']); + $message['body'] = strip_tags($message['body']); + + if (strlen($message['body']) > $charLimit) + { + if (empty($context['key_words'])) + $message['body'] = htmlspecialchars(substr(un_htmlspecialchars($message['body']), 0, $charLimit) . (strlen($message['body']) > $charLimit ? '...' : ''), ENT_QUOTES); + else + { + $matchString = ''; + foreach ($context['key_words'] as $keyword) + $matchString .= strtr(preg_quote($keyword, '/'), array('\*' => '.+?')) . '|'; + $matchString = substr($matchString, 0, -1); + $message['body'] = un_htmlspecialchars(str_replace(' ', ' ', $message['body'])); + if (empty($modSettings['search_match_complete_words'])) + preg_match_all('/([^\s\W]{' . $charLimit . '}[\s\W]|[\s\W].{0,' . $charLimit . '}?|^)(' . $matchString . ')(.{0,' . $charLimit . '}[\s\W]|[^\s\W]{' . $charLimit . '})/is', $message['body'], $matches); + else + preg_match_all('/([^\s\W]{' . $charLimit . '}[\s\W]|[\s\W].{0,' . $charLimit . '}?[\s\W]|^)(' . $matchString . ')([\s\W].{0,' . $charLimit . '}[\s\W]|[\s\W][^\s\W]{' . $charLimit . '})/is', $message['body'], $matches); + $message['body'] = ''; + foreach ($matches[0] as $index => $match) + $message['body'] .= '... ' . htmlspecialchars($match, ENT_QUOTES) . ' ...
    '; + } + + // Re-fix the international characters. + $message['body'] = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $message['body']); + } + } + else + { + // Run UBBC interpreter on the message. + $message['body'] = doUBBC($message['body'], $message['smileysEnabled']); + } + + $output = array_merge($context['topics'][$message['ID_MSG']], array( + 'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($message['isSticky']), + 'is_locked' => !empty($message['locked']), + 'is_poll' => $modSettings['pollMode'] == '1' && $message['ID_POLL'] > 0, + 'is_hot' => $message['numReplies'] >= $modSettings['hotTopicPosts'], + 'is_very_hot' => $message['numReplies'] >= $modSettings['hotTopicVeryPosts'], + 'views' => $message['numViews'], + 'replies' => $message['numReplies'], + 'can_reply' => in_array($message['ID_BOARD'], $boards_can['post_reply_any']) || in_array(0, $boards_can['post_reply_any']), + 'can_mark_notify' => in_array($message['ID_BOARD'], $boards_can['mark_any_notify']) || in_array(0, $boards_can['mark_any_notify']), + 'first_post' => array( + 'id' => $message['first_msg'], + 'time' => timeformat($message['first_posterTime']), + 'subject' => $message['first_subject'], + 'href' => $scripturl . '?topic=' . $message['ID_TOPIC'] . '.0', + 'link' => '' . $message['first_subject'] . '', + 'icon' => $message['icon'], + 'member' => array( + 'id' => $message['first_member_id'], + 'name' => $message['first_member_name'], + 'href' => !empty($message['first_member_id']) ? $scripturl . '?action=profile;u=' . $message['first_member_id'] : '', + 'link' => !empty($message['first_member_id']) ? '' . $message['first_member_name'] . '' : $message['first_member_name'] + ) + ), + 'last_post' => array( + 'id' => $message['last_msg'], + 'time' => timeformat($message['last_posterTime']), + 'timestamp' => $message['last_posterTime'], + 'member' => array( + 'id' => $message['last_member_id'], + 'name' => $message['last_member_name'], + 'href' => !empty($message['last_member_id']) ? $scripturl . '?action=profile;u=' . $message['last_member_id'] : '', + 'link' => !empty($message['last_member_id']) ? '' . $message['last_member_name'] . '' : $message['last_member_name'] + ) + ), + 'board' => array( + 'id' => $message['ID_BOARD'], + 'name' => $message['bName'], + 'href' => $scripturl . '?board=' . $message['ID_BOARD'] . '.0', + 'link' => '' . $message['bName'] . '' + ), + 'category' => array( + 'id' => $message['ID_CAT'], + 'name' => $message['cName'], + 'href' => $scripturl . '#' . $message['ID_CAT'], + 'link' => '' . $message['cName'] . '' + ) + )); + determineTopicClass($output); + + $body_highlighted = $message['body']; + $subject_highlighted = $message['subject']; + + foreach ($context['key_words'] as $query) + { + // Fix the international characters in the keyword too. + $query = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', strtr(preg_quote($query, '/'), array('&' => '&'))); + + $body_highlighted = preg_replace('/((<[^>]*)|' . $query . ')/ie', "'\$2' == '\$1' ? stripslashes('\$1') : '\$1'", $body_highlighted); + $subject_highlighted = preg_replace('/((<[^>]*)|' . $query . ')/ie', "'$2' == '$1' ? stripslashes('$1') : '$1'", $subject_highlighted); + } + + $output['matches'][] = array( + 'id' => $message['ID_MSG'], + 'attachment' => loadAttachmentContext($message['ID_MSG']), + 'alternate' => $counter % 2, + 'member' => &$themeUser[$message['ID_MEMBER']], + 'icon' => $message['icon'], + 'subject' => $message['subject'], + 'subject_highlighted' => $subject_highlighted, + 'time' => timeformat($message['posterTime']), + 'timestamp' => $message['posterTime'], + 'counter' => $counter, + 'modified' => array( + 'time' => timeformat($message['modifiedTime']), + 'timestamp' => $message['modifiedTime'], + 'name' => $message['modifiedName'] + ), + 'body' => $message['body'], + 'body_highlighted' => $body_highlighted, + 'start' => 'msg' . $message['ID_MSG'] + ); + $counter++; + + return $output; +} + +?> diff --git a/Sources/Search.php.backup.1 b/Sources/Search.php.backup.1 new file mode 100644 index 0000000..06b0718 --- /dev/null +++ b/Sources/Search.php.backup.1 @@ -0,0 +1,937 @@ + $scripturl . '?action=search', + 'name' => $txt[182] + ); + + // If you got back from search2 by using the linktree, you get your original search parameters back. + if (isset($_REQUEST['params'])) + { + $temp_params = explode('|"|', base64_decode($_REQUEST['params'])); + $context['search_params'] = array(); + foreach ($temp_params as $i => $data) + { + list ($k, $v) = explode('|\'|', $data); + $context['search_params'][$k] = stripslashes($v); + } + if (isset($context['search_params']['brd'])) + $context['search_params']['brd'] = $context['search_params']['brd'] == '' ? array() : explode(',', $context['search_params']['brd']); + } + + if (isset($context['search_params']['search'])) + $context['search_params']['search'] = htmlspecialchars($context['search_params']['search']); + if (isset($context['search_params']['userspec'])) + $context['search_params']['userspec'] = htmlspecialchars(stripslashes($context['search_params']['userspec'])); + + // Find all the boards this user is allowed to see. + $request = db_query(" + SELECT b.ID_CAT, c.name AS catName, b.ID_BOARD, b.name, b.childLevel + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT) + WHERE $user_info[query_see_board] + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['num_boards'] = mysql_num_rows($request); + $context['categories'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + // This category hasn't been set up yet.. + if (!isset($context['categories'][$row['ID_CAT']])) + $context['categories'][$row['ID_CAT']] = array( + 'id' => $row['ID_CAT'], + 'name' => $row['catName'], + 'boards' => array() + ); + + // Set this board up, and let the template know when it's a child. (indent them..) + $context['categories'][$row['ID_CAT']]['boards'][$row['ID_BOARD']] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'child_level' => $row['childLevel'] + ); + } + mysql_free_result($request); + + // Simple or not? + $context['simple_search'] = !empty($modSettings['simpleSearch']) && !isset($_GET['advanced']); + $context['page_title'] = $txt[183]; +} + +// Gather the results and show them. +function PlushSearch2() +{ + global $modSettings, $sourcedir; + global $scripturl, $txt, $db_prefix, $user_info, $context, $messages_request, $attachments, $boards_can; + + $weight_factors = array( + 'frequency', + 'age', + 'length', + 'subject', + 'first_message', + ); + + $weight = array(); + $weight_total = 0; + foreach ($weight_factors as $weight_factor) + { + $weight[$weight_factor] = empty($modSettings['search_weight_' . $weight_factor]) ? 0 : (int) $modSettings['search_weight_' . $weight_factor]; + $weight_total += $weight[$weight_factor]; + } + + // Zero weight. Weightless. + if (empty($weight_total)) + fatal_lang_error('search_invalid_weights'); + + + // Fine-tune the weight of each search factor. These factors should add up to 100. + $weight = array( + // The more message within a topic match the search query, the higher the ranking. + 'frequency' => 50, + // The more recent a message is, the higher its ranking. + 'age' => 5, + // The larger the topic is, the higher its ranking. + 'length' => 20, + // If a search string happens to be part of the topic subject, it's probably a better match. + 'subject' => 15, + // If the first message of a topic is a match, then the whole topic might be more interesting. + 'first_message' => 10, + ); + + + // These vars don't require an interface, the're just here for tweaking. + $recentPercentage = 0.30; + $humungousTopicPosts = 200; + $maxMembersToSearch = 500; + + loadTemplate('Search'); + + // Are you allowed? + isAllowedTo('search_posts'); + + // So, we're allowed here, let's clean up the start variable - just incase. + $_REQUEST['start'] = (int) $_REQUEST['start']; + + require_once($sourcedir . '/Display.php'); + + // $search_params will carry all settings that differ from the default search parameters. + // That way, the URLs involved in a search page will be kept as short as possible. + $search_params = array(); + + if (isset($_REQUEST['params'])) + { + $temp_params = explode('|"|', base64_decode($_REQUEST['params'])); + foreach ($temp_params as $i => $data) + { + list ($k, $v) = explode('|\'|', $data); + $search_params[$k] = stripslashes($v); + } + if (isset($search_params['brd'])) + $search_params['brd'] = $search_params['brd'] == '' ? array() : explode(',', $search_params['brd']); + } + else + { + $search_params['subject_only'] = true; + } + + + // 1 => 'allwords' (default, don't set as param) / 2 => 'anywords'. + if (!empty($search_params['searchtype']) || (!empty($_REQUEST['searchtype']) && $_REQUEST['searchtype'] == 2)) + $search_params['searchtype'] = 2; + + // Minimum age of messages. Default to zero (don't set param in that case). + if (!empty($search_params['minage']) || (!empty($_REQUEST['minage']) && $_REQUEST['minage'] > 0)) + $search_params['minage'] = !empty($search_params['minage']) ? (int) $search_params['minage'] : (int) $_REQUEST['minage']; + + // Maximum age of messages. Default to infinite (9999 days: param not set). + if (!empty($search_params['maxage']) || (!empty($_REQUEST['maxage']) && $_REQUEST['maxage'] != 9999)) + $search_params['maxage'] = !empty($search_params['maxage']) ? (int) $search_params['maxage'] : (int) $_REQUEST['maxage']; + + $timeAddition = ''; + $timeAddition .= !empty($search_params['minage']) ? ' AND m.posterTime <= ' . (time() - $search_params['minage'] * 86400) : ''; + $timeAddition .= !empty($search_params['maxage']) ? ' AND m.posterTime >= ' . (time() - $search_params['maxage'] * 86400) : ''; + + // Default the user name to a wildcard matching every user (*). + if (!empty($search_params['user_spec']) || (!empty($_REQUEST['userspec']) && $_REQUEST['userspec'] != '*')) + $search_params['userspec'] = isset($search_params['userspec']) ? $search_params['userspec'] : $_REQUEST['userspec']; + + // If there's no specific user, then don't mention it in the main query. + if (empty($search_params['userspec'])) + $userQuery = ''; + else + { + $userString = strtolower(addslashes(strtr($search_params['userspec'], array('%' => '\%', '_' => '\_', '*' => '%', '?' => '_')))); + // Retrieve a list of possible members. + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE realName LIKE '$userString'", __FILE__, __LINE__); + // Simply do nothing if there're too many members matching the criteria. + if (mysql_num_rows($request) > $maxMembersToSearch) + $userQuery = ''; + elseif (mysql_num_rows($request) == 0) + $userQuery = "m.ID_MEMBER = 0 AND m.posterName LIKE '$userString'"; + else + { + $memberlist = array(); + while ($row = mysql_fetch_assoc($request)) + $memberlist[] = $row['ID_MEMBER']; + $userQuery = "(m.ID_MEMBER IN (" . implode(', ', $memberlist) . ") OR (m.ID_MEMBER = 0 AND m.posterName LIKE '$userString'))"; + } + } + + // If the boards were passed by URL (params=), temporarily put them back in $_REQUEST. + if (!empty($search_params['brd']) && is_array($search_params['brd'])) + $_REQUEST['brd'] = $search_params['brd']; + + // Make sure all boards are integers. + if (!empty($_REQUEST['brd'])) + foreach ($_REQUEST['brd'] as $id => $brd) + $_REQUEST['brd'][$id] = (int) $brd; + + // Select all boards you've selected AND are allowed to see. + if ($user_info['is_admin']) + $search_params['brd'] = empty($_REQUEST['brd']) ? array() : $_REQUEST['brd']; + else + { + $request = db_query(" + SELECT b.ID_BOARD + FROM {$db_prefix}boards AS b + WHERE $user_info[query_see_board]" . (empty($_REQUEST['brd']) ? '' : " + AND b.ID_BOARD IN (" . implode(', ', $_REQUEST['brd']) . ")"), __FILE__, __LINE__); + $search_params['brd'] = array(); + while ($row = mysql_fetch_assoc($request)) + $search_params['brd'][] = $row['ID_BOARD']; + mysql_free_result($request); + + // This error should pro'bly only happen for hackers. + if (empty($search_params['brd'])) + fatal_lang_error('search_no_boards'); + } + + // If we've selected all boards, this parameter can be left empty. + $request = db_query(" + SELECT COUNT(ID_BOARD) + FROM {$db_prefix}boards", __FILE__, __LINE__); + list ($num_boards) = mysql_fetch_row($request); + mysql_free_result($request); + + if ($num_boards == count($search_params['brd'])) + $search_params['brd'] = array(); + // Make sure these all boards are numbers. + elseif (!empty($search_params['brd'])) + { + foreach ($search_params['brd'] as $k => $v) + $search_params['brd'][$k] = (int) $v; + } + + $search_params['show_complete'] = !empty($search_params['show_complete']) || !empty($_REQUEST['show_complete']); + $search_params['subject_only'] = !empty($search_params['subject_only']) || !empty($_REQUEST['subject_only']); + + $context['compact'] = !$search_params['show_complete']; + + // What are we searching for? + $search_params['search'] = !empty($search_params['search']) ? $search_params['search'] : (isset($_REQUEST['search']) ? stripslashes($_REQUEST['search']) : ''); + // Nothing?? + if (!isset($search_params['search']) || $search_params['search'] == '') + fatal_lang_error('no_valid_search_string', false); + + // Extract phrase parts first (e.g. some words "this is a phrase" some more words.) + preg_match_all('/(?:^|\s)"([^"]+)"(?:$|\s)/', $search_params['search'], $matches, PREG_PATTERN_ORDER); + $searchArray = $matches[1]; + + // Remove the phrase parts and extract the words. + $searchArray = array_merge($searchArray, explode(' ', preg_replace('/(?:^|\s)"([^"]+)"(?:$|\s)/', ' ', $search_params['search']))); + + // Trim everything and make sure there are no words that are the same. + foreach ($searchArray as $index => $value) + { + $searchArray[$index] = addslashes(strtolower(trim($value))); + if (!isset($searchArray[$index]) || $searchArray[$index] == '') + unset($searchArray[$index]); + } + $searchArray = array_slice(array_unique($searchArray), 0, 10); + + if (empty($searchArray)) + fatal_lang_error('no_valid_search_string', false); + + // Each word is matched against the body and the subject. + $searchParts = array(); + foreach ($searchArray as $word) + { + if (empty($modSettings['search_match_complete_words'])) + $searchParts[] = " LIKE '%" . strtr($word, array('_' => '\\_', '%' => '\\%')) . "%'"; + else + $searchParts[] = " RLIKE '[[:<:]]" . addcslashes(preg_replace(array('/([\[\]$.+?|{}])/', '/\*/'), array('[$1]', '.+'), $word), '') . "[[:>:]]'"; + } + + $searchQuery = 0; + + // Either all words must match (searchtype == 1) or any of the words (searchtype == 2). + if (empty($search_params['searchtype']) OR $search_params['searchtype'] == 1) + { + if (!$search_params['subject_only']) + $searchQuery = 'm.body' . implode(' AND m.body', $searchParts) . $timeAddition; + $topicQuery = 'm.subject' . implode(' AND m.subject', $searchParts) . $timeAddition; + } + else + { + if (!$search_params['subject_only']) + $searchQuery = (count($searchParts) > 1 ? '(' : '') . 'm.body' . implode(' OR m.body', $searchParts) . (count($searchParts) > 1 ? ')' : '') . $timeAddition; + $topicQuery = (count($searchParts) > 1 ? '(' : '') . 'm.subject' . implode(' OR m.subject', $searchParts) . (count($searchParts) > 1 ? ')' : '') . $timeAddition; + } + + // Get the sorting parameters right. Default to sort by relevance descending. + $sort_columns = array( + 'relevance', + 'numReplies', + 'ID_MSG', + ); + if (empty($search_params['sort']) && !empty($_REQUEST['sort'])) + list ($search_params['sort'], $search_params['sort_dir']) = array_pad(explode('|', $_REQUEST['sort']), 2, ''); + $search_params['sort'] = !empty($search_params['sort']) && in_array($search_params['sort'], $sort_columns) ? $search_params['sort'] : 'relevance'; + $search_params['sort_dir'] = !empty($search_params['sort_dir']) && $search_params['sort_dir'] == 'asc' ? 'asc' : 'desc'; + + $context['mark'] = array(); + foreach ($searchArray as $word) + $context['mark'][$word] = '' . $word . ''; + + // All search params have been checked, let's compile them to a single string... made less simple by PHP 4.3.9 and below. + $temp_params = $search_params; + if (isset($temp_params['brd'])) + $temp_params['brd'] = implode(',', $temp_params['brd']); + $context['params'] = array(); + foreach ($temp_params as $k => $v) + $context['params'][] = $k . '|\'|' . addslashes($v); + $context['params'] = base64_encode(implode('|"|', $context['params'])); + + // ... and add the links to the link tree. + $context['linktree'][] = array( + 'url' => $scripturl . '?action=search;params=' . $context['params'], + 'name' => $txt[182] + ); + $context['linktree'][] = array( + 'url' => $scripturl . '?action=search2;params=' . $context['params'], + 'name' => $txt['search_results'] + ); + + // Determine some values needed to calculate the relevance. + $minMsg = (int) (1 - $recentPercentage) * $modSettings['maxMsgID']; + $recentMsg = $modSettings['maxMsgID'] - $minMsg; + + $mainQuery = " + t.ID_TOPIC, + $weight[frequency] * IF(m.ID_MSG IS NOT NULL, COUNT(m.ID_MSG) / (t.numReplies + 1), 0) + + $weight[age] * IF(m.ID_MSG IS NULL OR MAX(m.ID_MSG) < $minMsg, 0, (MAX(m.ID_MSG) - $minMsg) / $recentMsg) + + $weight[length] * IF(t.numReplies < $humungousTopicPosts, t.numReplies / $humungousTopicPosts, 1) + + $weight[subject] * t.is_subject + + $weight[first_message] * IF(MIN(m.ID_MSG) = t.ID_FIRST_MSG, 1, 0) AS relevance, + IF(COUNT(m.ID_MSG) = 0, t.ID_FIRST_MSG, MAX(m.ID_MSG)) AS ID_MSG, COUNT(m.ID_MSG) AS num_matches + FROM {$db_prefix}matches AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? '' : " + WHERE $userQuery") ." + GROUP BY t.ID_TOPIC"; + + $context['topics'] = array(); + $use_cache = !empty($modSettings['search_cache_size']); + + // Either the results are not cached, or caching is disabled, so we need to create a temporary table. + if (!$use_cache || empty($_SESSION['search_cache']) || $_SESSION['search_cache']['params'] != $context['params']) + { + // Temporary tables are preferrable, but require the right MySQL permissions. + if (empty($modSettings['disableTemporaryTables'])) + { + // Get rid of it if it already exists. + mysql_query(" + DROP TABLE {$db_prefix}matches"); + + $result = mysql_query(" + CREATE TEMPORARY TABLE {$db_prefix}matches ( + ID_TOPIC mediumint(8) unsigned NOT NULL default '0', + ID_FIRST_MSG int(10) unsigned NOT NULL default '0', + numReplies int(11) NOT NULL default '0', + is_subject tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (ID_TOPIC) + ) TYPE=HEAP"); + + if ($result === false) + { + updateSettings(array('disableTemporaryTables' => '1')); + fatal_lang_error('unable_to_create_temporary'); + } + + if (!$search_params['subject_only']) + { + // Let's determine how many results we can expect. + db_query(" + INSERT INTO {$db_prefix}matches + SELECT DISTINCT t.ID_TOPIC, t.ID_FIRST_MSG, t.numReplies, 0 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE t.ID_TOPIC = m.ID_TOPIC" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $searchQuery", __FILE__, __LINE__); + $messageMatches = db_affected_rows(); + } + + // Select all topics that have subjects matching the search query. + db_query(" + INSERT IGNORE INTO {$db_prefix}matches + SELECT m.ID_TOPIC AS ID_TOPIC, m.ID_MSG, t.numReplies, 1 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE m.ID_MSG = t.ID_FIRST_MSG" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $topicQuery", __FILE__, __LINE__); + $subjectMatches = db_affected_rows(); + + if (!$search_params['subject_only']) + { + $request = db_query(" + SELECT COUNT(ID_TOPIC) + FROM {$db_prefix}matches", __FILE__, __LINE__); + list ($numResults) = mysql_fetch_row($request); + mysql_free_result($request); + } + else + $numResults = $subjectMatches; + + if (empty($numResults)) + $use_cache = false; + elseif (!$use_cache || $numResults <= $modSettings['search_results_per_page']) + { + $request = db_query(" + SELECT$mainQuery + ORDER BY $search_params[sort] $search_params[sort_dir] + LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $context['topics'][$row['ID_MSG']] = array( + 'id' => $row['ID_TOPIC'], + 'relevance' => round(100 * $row['relevance'] / $weight_total, 1) . '%', + 'num_matches' => $row['num_matches'], + 'matches' => array(), + ); + mysql_free_result($request); + + // We don't need cache, thank you. + $use_cache = false; + } + // Search is not yet cached, let's cache it. + elseif ($use_cache) + { + $modSettings['search_pointer'] = empty($modSettings['search_pointer']) ? 0 : (int) $modSettings['search_pointer']; + + // Increase the pointer. + updateSettings(array('search_pointer' => $modSettings['search_pointer'] >= 255 ? 0 : $modSettings['search_pointer'] + 1)); + + // Make sure this value isn't larger than 255 or the tinyint key field wouldn't be able to handle it. + $modSettings['search_cache_size'] = empty($modSettings['search_cache_size']) || $modSettings['search_cache_size'] > 255 ? 255 : $modSettings['search_cache_size']; + + // Remove old cached results and (if set) the previous session cached result. + db_query(" + DELETE FROM {$db_prefix}log_search + WHERE (ID_SEARCH >= $modSettings[search_pointer]" . ($modSettings['search_pointer'] < $modSettings['search_cache_size'] ? ' + AND ID_SEARCH < ' . (256 + $modSettings['search_pointer'] - $modSettings['search_cache_size']) : ' + OR ID_SEARCH < ' . ($modSettings['search_pointer'] - $modSettings['search_cache_size'])) . ')' . (isset($_SESSION['search_cache']['ID_SEARCH']) ? " + OR ID_SEARCH = " . $_SESSION['search_cache']['ID_SEARCH'] : ''), __FILE__, __LINE__); + + // Insert the new cached results. + if (!empty($numResults)) + db_query(" + INSERT IGNORE INTO {$db_prefix}log_search + (ID_SEARCH, ID_TOPIC, relevance, ID_MSG, num_matches) + SELECT $modSettings[search_pointer], $mainQuery", __FILE__, __LINE__); + $numResults = empty($numResults) ? 0 : db_affected_rows(); + + // Store it for the session. + $_SESSION['search_cache'] = array( + 'ID_SEARCH' => $modSettings['search_pointer'], + 'num_results' => $numResults, + 'params' => $context['params'], + ); + } + + // Get rid of the temporary table. + $request = db_query(" + DROP TABLE {$db_prefix}matches", __FILE__, __LINE__); + } + // Create temporary tables is disabled, we're gonna need to use PHP's memory and sorting. + else + { + $matchingTopics = array(); + + if (!$search_params['subject_only']) + { + // Get all the topics with a message match. + $request = db_query(" + SELECT DISTINCT t.ID_TOPIC, t.ID_FIRST_MSG, t.numReplies, 0 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE t.ID_TOPIC = m.ID_TOPIC" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $searchQuery", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $matchingTopics[$row['ID_TOPIC']] = $row; + $messageMatches = count($matchingTopics); + } + + // Get all the topics with a subject match. + $request = db_query(" + SELECT m.ID_TOPIC AS ID_TOPIC, t.ID_FIRST_MSG, t.numReplies, 1 AS is_subject + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE m.ID_MSG = t.ID_FIRST_MSG" . (empty($search_params['brd']) ? '' : " + AND m.ID_BOARD IN (" . implode(', ', $search_params['brd']) . ")") . (empty($userQuery) ? '' : " + AND $userQuery") . " + AND $topicQuery", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $matchingTopics[$row['ID_TOPIC']] = $row; + $subjectMatches = db_affected_rows(); + + $numResults = $search_params['subject_only'] ? $subjectMatches : count($matchingTopics); + + if (empty($numResults)) + $use_cache = false; + elseif (!$use_cache || $numResults <= $modSettings['search_results_per_page']) + { + $sort = array(); + $request = db_query(" + SELECT + t.ID_TOPIC, COUNT(m.ID_MSG) AS numMsg, MAX(m.ID_MSG) AS lastMatch, MIN(m.ID_MSG) AS firstMatch, + COUNT(m.ID_MSG) AS num_matches + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? ' + WHERE t.ID_TOPIC IN (' . implode(', ', array_keys($matchingTopics)) . ')' : " + WHERE $userQuery + AND t.ID_TOPIC IN (" . implode(', ', array_keys($matchingTopics)) . ")") . " + GROUP BY t.ID_TOPIC + LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__); + $tmp = array(); + while ($row = mysql_fetch_assoc($request)) + { + $relevance = + $weight['frequency'] * ($row['numMsg'] == 0 ? 0 : $row['numMsg'] / ($matchingTopics[$row['ID_TOPIC']]['numReplies'] + 1)) + + $weight['age'] * (!isset($row['ID_MSG']) || $row['ID_MSG'] === null || $row['lastMatch'] < $minMsg ? 0 : ($row['lastMatch'] - $minMsg) / $recentMsg) + + $weight['length'] * ($matchingTopics[$row['ID_TOPIC']]['numReplies'] < $humungousTopicPosts ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] / $humungousTopicPosts : 1) + + $weight['subject'] * $matchingTopics[$row['ID_TOPIC']]['is_subject'] + + $weight['first_message'] * ($row['firstMatch'] == $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] ? 1 : 0); + $ID_MSG = $row['numMsg'] == 0 ? $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] : $row['lastMatch']; + $sort[$ID_MSG] = $search_params['sort'] == 'relevance' ? $relevance : ($search_params['sort'] == 'numReplies' ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] : $ID_MSG); + $tmp[$ID_MSG] = array( + 'id' => $row['ID_TOPIC'], + 'relevance' => round(100 * $relevance / $weight_total, 1) . '%', + 'num_matches' => $row['num_matches'], + 'matches' => array(), + ); + } + mysql_free_result($request); + + // Do the manual sorting. + if ($search_params['sort_dir'] == 'desc') + krsort($sort); + else + ksort($sort); + foreach ($sort as $ID_MSG => $value) + $context['topics'][$ID_MSG] = $tmp[$ID_MSG]; + unset($tmp); + + // We don't need cache, thank you. + $use_cache = false; + } + // Search is not yet cached, let's do that now. + elseif ($use_cache) + { + $modSettings['search_pointer'] = empty($modSettings['search_pointer']) ? 0 : (int) $modSettings['search_pointer']; + + $modSettings['search_cache_size'] = empty($modSettings['search_cache_size']) || $modSettings['search_cache_size'] > 255 ? 255 : $modSettings['search_cache_size']; + + // Remove old cached results. + db_query(" + DELETE FROM {$db_prefix}log_search + WHERE (ID_SEARCH >= $modSettings[search_pointer]" . ($modSettings['search_pointer'] < $modSettings['search_cache_size'] ? ' + AND ID_SEARCH < ' . (256 + $modSettings['search_pointer'] - $modSettings['search_cache_size']) : ' + OR ID_SEARCH < ' . ($modSettings['search_pointer'] - $modSettings['search_cache_size'])) . ')' . (isset($_SESSION['search_cache']['ID_SEARCH']) ? " + OR ID_SEARCH = " . $_SESSION['search_cache']['ID_SEARCH'] : ''), __FILE__, __LINE__); + + // Insert the new results into cache. + if (!empty($numResults)) + { + $insertRows = array(); + $sort = array(); + + // Get all topics that match the search query. + $request = db_query(" + SELECT + t.ID_TOPIC, COUNT(m.ID_MSG) AS numMsg, MAX(m.ID_MSG) AS lastMatch, MIN(m.ID_MSG) AS firstMatch + FROM {$db_prefix}topics AS t + LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? ' + WHERE t.ID_TOPIC IN (' . implode(', ', array_keys($matchingTopics)) . ')' : " + WHERE $userQuery + AND t.ID_TOPIC IN (" . implode(', ', array_keys($matchingTopics)) . ")") . " + GROUP BY t.ID_TOPIC", __FILE__, __LINE__); + $tmp = array(); + while ($row = mysql_fetch_assoc($request)) + { + $relevance = + $weight['frequency'] * ($row['numMsg'] == 0 ? 0 : $row['numMsg'] / ($matchingTopics[$row['ID_TOPIC']]['numReplies'] + 1)) + + $weight['age'] * (!isset($row['ID_MSG']) || $row['ID_MSG'] === null || $row['lastMatch'] < $minMsg ? 0 : ($row['lastMatch'] - $minMsg) / $recentMsg) + + $weight['length'] * ($matchingTopics[$row['ID_TOPIC']]['numReplies'] < $humungousTopicPosts ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] / $humungousTopicPosts : 1) + + $weight['subject'] * $matchingTopics[$row['ID_TOPIC']]['is_subject'] + + $weight['first_message'] * ($row['firstMatch'] == $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] ? 1 : 0); + $ID_MSG = $row['numMsg'] == 0 ? $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] : $row['lastMatch']; + $sort[$ID_MSG] = $search_params['sort'] == 'relevance' ? $relevance : ($search_params['sort'] == 'numReplies' ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] : $ID_MSG); + $tmp[$ID_MSG] = (isset($tmp[$ID_MSG]) ? $tmp[$ID_MSG] : '') . '(' . (int) $modSettings['search_pointer'] . ', ' . (int) $row['ID_TOPIC'] . ', ' . (int) $relevance . ', ' . (int) $ID_MSG . ', ' . (int) $row['numMsg'] . '),'; + } + mysql_free_result($request); + + // Do the sorting of the rows. + if ($search_params['sort_dir'] == 'desc') + krsort($sort); + else + ksort($sort); + foreach ($sort as $ID_MSG => $value) + $insertRows[$ID_MSG] = substr($tmp[$ID_MSG], 0, -1); + unset($tmp); + + // Insert the matching topics into the cache. + if (!empty($insertRows)) + db_query(" + INSERT INTO {$db_prefix}log_search + (ID_SEARCH, ID_TOPIC, relevance, ID_MSG, num_matches) + VALUES " . implode(', ', $insertRows), __FILE__, __LINE__); + } + $numResults = empty($numResults) ? 0 : db_affected_rows(); + + // Store the cache information into the session. + $_SESSION['search_cache'] = array( + 'ID_SEARCH' => $modSettings['search_pointer'], + 'num_results' => $numResults, + 'params' => $context['params'], + ); + + // Increase the cache pointer. + updateSettings(array('search_pointer' => $modSettings['search_pointer'] >= 255 ? 0 : $modSettings['search_pointer'] + 1)); + } + } + } + + // Current search should be cached by now, grab it. + if ($use_cache) + { + $request = db_query(" + SELECT ls.ID_TOPIC, ls.ID_MSG, ls.relevance, ls.num_matches + FROM {$db_prefix}log_search AS ls" . ($search_params['sort'] == 'numReplies' ? ", {$db_prefix}topics AS t" : '') . " + WHERE ID_SEARCH = " . $_SESSION['search_cache']['ID_SEARCH'] . ($search_params['sort'] == 'numReplies' ? " + AND t.ID_TOPIC = ls.ID_TOPIC" : '') . " + ORDER BY $search_params[sort] $search_params[sort_dir] + LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $context['topics'][$row['ID_MSG']] = array( + 'id' => $row['ID_TOPIC'], + 'relevance' => round($row['relevance'] / 10, 1) . '%', + 'num_matches' => $row['num_matches'], + 'matches' => array(), + ); + mysql_free_result($request); + + $numResults = $_SESSION['search_cache']['num_results']; + } + + // Now that we know how many results to expect we can start calculating the page numbers. + $context['page_index'] = constructPageIndex($scripturl . '?action=search2;params=' . $context['params'], $_REQUEST['start'], $numResults, $modSettings['search_results_per_page'], false); + + if (!empty($context['topics'])) + { + // Create an array for the permissions. + $boards_can = array( + 'post_reply_own' => boardsAllowedTo('post_reply_own'), + 'post_reply_any' => boardsAllowedTo('post_reply_any'), + 'mark_any_notify' => boardsAllowedTo('mark_any_notify') + ); + + // Load the posters... + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}messages + WHERE ID_MEMBER != 0 + AND ID_MSG IN (" . implode(', ', array_keys($context['topics'])) . ')', __FILE__, __LINE__); + $posters = array(); + while ($row = mysql_fetch_assoc($request)) + $posters[] = $row['ID_MEMBER']; + mysql_free_result($request); + + if (!empty($posters)) + loadMemberData(array_unique($posters)); + + // Get the messages out for the callback - select enough that it can be made to look just like Display. + $messages_request = db_query(" + SELECT + m.ID_MSG, m.subject, m.posterName, m.posterEmail, m.posterTime, m.ID_MEMBER, + m.icon, m.posterIP, m.body, m.smileysEnabled, m.modifiedTime, m.modifiedName, + a.filename, IFNULL(a.size, 0) AS filesize, a.ID_ATTACH, a.downloads, + first_m.ID_MSG AS first_msg, first_m.subject AS first_subject, first_m.icon, first_m.posterTime AS first_posterTime, + first_mem.ID_MEMBER AS first_member_id, IFNULL(first_mem.realName, first_m.posterName) AS first_member_name, + last_m.ID_MSG AS last_msg, last_m.posterTime AS last_posterTime, last_mem.ID_MEMBER AS last_member_id, + IFNULL(last_mem.realName, last_m.posterName) AS last_member_name, + t.ID_TOPIC, t.isSticky, t.locked, t.ID_POLL, t.numReplies, t.numViews, + b.ID_BOARD, b.name AS bName, c.ID_CAT, c.name AS cName + FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}categories AS c, {$db_prefix}messages AS first_m, {$db_prefix}messages AS last_m) + LEFT JOIN {$db_prefix}members AS first_mem ON (first_mem.ID_MEMBER = first_m.ID_MEMBER) + LEFT JOIN {$db_prefix}members AS last_mem ON (last_mem.ID_MEMBER = first_m.ID_MEMBER) + LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MSG = m.ID_MSG) + WHERE m.ID_MSG IN (" . implode(', ', array_keys($context['topics'])) . ") + AND t.ID_TOPIC = m.ID_TOPIC + AND b.ID_BOARD = t.ID_BOARD + AND c.ID_CAT = b.ID_CAT + AND first_m.ID_MSG = t.ID_FIRST_MSG + AND last_m.ID_MSG = t.ID_LAST_MSG + ORDER BY FIND_IN_SET(m.ID_MSG, '" . implode(',', array_keys($context['topics'])) . "') + LIMIT " . count($context['topics']), __FILE__, __LINE__); + // Note that the reg-exp slows things alot, but makes things make a lot more sense. + } + + $context['key_words'] = &$searchArray; + + // Set the basic stuff for the template. + $context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']); + + $context['sub_template'] = 'results'; + $context['page_title'] = $txt[166]; + $context['get_topics'] = 'prepareSearchContext'; + $context['can_send_pm'] = allowedTo('pm_send'); + + loadJumpTo(); +} + +// Callback to return messages - saves memory. +function prepareSearchContext($reset = false) +{ + global $txt, $modSettings, $scripturl, $ID_MEMBER; + global $themeUser, $context, $messages_request, $db_prefix, $attachments, $boards_can; + + // Remember which message this is. (ie. reply #83) + static $counter = null; + if ($counter == null || $reset) + $counter = $_REQUEST['start'] + 1; + + // If the query returned false, bail. + if ($messages_request == false) + return false; + + // Start from the beginning... + if ($reset) + return @mysql_data_seek($messages_request, 0); + + // Attempt to get the next message. + $message = mysql_fetch_assoc($messages_request); + if (!$message) + return false; + + // Can't have an empty subject can we? + $message['subject'] = $message['subject'] != '' ? $message['subject'] : $txt[24]; + $message['first_subject'] = $message['first_subject'] != '' ? $message['first_subject'] : $txt[24]; + + // If it couldn't load, or the user was a guest.... someday may be done with a guest table. + if (!loadMemberContext($message['ID_MEMBER'])) + { + // Notice this information isn't used anywhere else.... *cough guest table cough* + $themeUser[$message['ID_MEMBER']]['name'] = $message['posterName']; + $themeUser[$message['ID_MEMBER']]['id'] = 0; + $themeUser[$message['ID_MEMBER']]['group'] = $txt[28]; + $themeUser[$message['ID_MEMBER']]['link'] = $message['posterName']; + $themeUser[$message['ID_MEMBER']]['email'] = $message['posterEmail']; + } + $themeUser[$message['ID_MEMBER']]['ip'] = $message['posterIP']; + + // Do the censor thang... + censorText($message['body']); + censorText($message['subject']); + + censorText($message['first_subject']); + + // Shorten this message if necessary. + if ($context['compact']) + { + // Set the number of characters before and after the searched keyword. + $charLimit = 40; + + $message['body'] = strtr($message['body'], array("\n" => ' ', '
    ' => "\n")); + $message['body'] = doUBBC($message['body'], $message['smileysEnabled']); + $message['body'] = strip_tags($message['body']); + + if (strlen($message['body']) > $charLimit) + { + if (empty($context['key_words'])) + $message['body'] = htmlspecialchars(substr(un_htmlspecialchars($message['body']), 0, $charLimit) . (strlen($message['body']) > $charLimit ? '...' : ''), ENT_QUOTES); + else + { + $matchString = ''; + foreach ($context['key_words'] as $keyword) + $matchString .= strtr(preg_quote($keyword, '/'), array('\*' => '.+?')) . '|'; + $matchString = substr($matchString, 0, -1); + $message['body'] = un_htmlspecialchars(str_replace(' ', ' ', $message['body'])); + if (empty($modSettings['search_match_complete_words'])) + preg_match_all('/([^\s\W]{' . $charLimit . '}[\s\W]|[\s\W].{0,' . $charLimit . '}?|^)(' . $matchString . ')(.{0,' . $charLimit . '}[\s\W]|[^\s\W]{' . $charLimit . '})/isu', $message['body'], $matches); + else + preg_match_all('/([^\s\W]{' . $charLimit . '}[\s\W]|[\s\W].{0,' . $charLimit . '}?[\s\W]|^)(' . $matchString . ')([\s\W].{0,' . $charLimit . '}[\s\W]|[\s\W][^\s\W]{' . $charLimit . '})/isu', $message['body'], $matches); + $message['body'] = ''; + foreach ($matches[0] as $index => $match) { + if ($index > 2) break; + $message['body'] .= '... ' . htmlspecialchars($match, ENT_QUOTES) . ' ...
    '; + } + } + + // Re-fix the international characters. + $message['body'] = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $message['body']); + } + } + else + { + // Run UBBC interpreter on the message. + $message['body'] = doUBBC($message['body'], $message['smileysEnabled']); + } +if (isset ($_GET['debug'])) var_dump($context['topics']); + $output = array_merge($context['topics'][$message['ID_MSG']], array( + 'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($message['isSticky']), + 'is_locked' => !empty($message['locked']), + 'is_poll' => $modSettings['pollMode'] == '1' && $message['ID_POLL'] > 0, + 'is_hot' => $message['numReplies'] >= $modSettings['hotTopicPosts'], + 'is_very_hot' => $message['numReplies'] >= $modSettings['hotTopicVeryPosts'], + 'views' => $message['numViews'], + 'replies' => $message['numReplies'], + 'can_reply' => in_array($message['ID_BOARD'], $boards_can['post_reply_any']) || in_array(0, $boards_can['post_reply_any']), + 'can_mark_notify' => in_array($message['ID_BOARD'], $boards_can['mark_any_notify']) || in_array(0, $boards_can['mark_any_notify']), + 'first_post' => array( + 'id' => $message['first_msg'], + 'time' => timeformat($message['first_posterTime']), + 'subject' => $message['first_subject'], + 'href' => $scripturl . '?topic=' . $message['ID_TOPIC'] . '.0', + 'link' => '' . $message['first_subject'] . '', + 'icon' => $message['icon'], + 'member' => array( + 'id' => $message['first_member_id'], + 'name' => $message['first_member_name'], + 'href' => !empty($message['first_member_id']) ? $scripturl . '?action=profile;u=' . $message['first_member_id'] : '', + 'link' => !empty($message['first_member_id']) ? '' . $message['first_member_name'] . '' : $message['first_member_name'] + ) + ), + 'last_post' => array( + 'id' => $message['last_msg'], + 'time' => timeformat($message['last_posterTime']), + 'timestamp' => $message['last_posterTime'], + 'member' => array( + 'id' => $message['last_member_id'], + 'name' => $message['last_member_name'], + 'href' => !empty($message['last_member_id']) ? $scripturl . '?action=profile;u=' . $message['last_member_id'] : '', + 'link' => !empty($message['last_member_id']) ? '' . $message['last_member_name'] . '' : $message['last_member_name'] + ) + ), + 'board' => array( + 'id' => $message['ID_BOARD'], + 'name' => $message['bName'], + 'href' => $scripturl . '?board=' . $message['ID_BOARD'] . '.0', + 'link' => '' . $message['bName'] . '' + ), + 'category' => array( + 'id' => $message['ID_CAT'], + 'name' => $message['cName'], + 'href' => $scripturl . '#' . $message['ID_CAT'], + 'link' => '' . $message['cName'] . '' + ) + )); + determineTopicClass($output); + + $body_highlighted = $message['body']; + $subject_highlighted = $message['subject']; + + foreach ($context['key_words'] as $query) + { + // Fix the international characters in the keyword too. + $query = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', strtr(preg_quote($query, '/'), array('&' => '&'))); + + $body_highlighted = preg_replace('/((<[^>]*)|' . $query . ')/ie', "'\$2' == '\$1' ? stripslashes('\$1') : '\$1'", $body_highlighted); + $subject_highlighted = preg_replace('/((<[^>]*)|' . $query . ')/ie', "'$2' == '$1' ? stripslashes('$1') : '$1'", $subject_highlighted); + } + + $output['matches'][] = array( + 'id' => $message['ID_MSG'], + 'attachment' => loadAttachmentContext($message['ID_MSG']), + 'alternate' => $counter % 2, + 'member' => &$themeUser[$message['ID_MEMBER']], + 'icon' => $message['icon'], + 'subject' => $message['subject'], + 'subject_highlighted' => $subject_highlighted, + 'time' => timeformat($message['posterTime']), + 'timestamp' => $message['posterTime'], + 'counter' => $counter, + 'modified' => array( + 'time' => timeformat($message['modifiedTime']), + 'timestamp' => $message['modifiedTime'], + 'name' => $message['modifiedName'] + ), + 'body' => $message['body'], + 'body_highlighted' => $body_highlighted, + 'start' => 'msg' . $message['ID_MSG'] + ); + $counter++; + + return $output; +} + +?> diff --git a/Sources/Security.php b/Sources/Security.php new file mode 100644 index 0000000..ea1bc31 --- /dev/null +++ b/Sources/Security.php @@ -0,0 +1,763 @@ += time())) + return; + + require_once($sourcedir . '/Subs-Auth.php'); + + // Posting the password... check it. + if (isset($_POST['admin_pass'])) + { + checkSession(); + + // Password correct? + if (md5_hmac($_POST['admin_pass'], strtolower($user_info['username'])) == $user_info['passwd']) + $_SESSION['admin_time'] = time(); + // That password is wrong, sonny. + else + adminLogin(); + } + // Need to type in a password for that, man. + else + adminLogin(); +} + +// Require a user who is logged in. (not a guest.) +function is_not_guest($message = '') +{ + global $user_info, $sourcedir, $txt, $context; + + // Luckily, this person isn't a guest. + if (!$user_info['is_guest']) + return; + + // People always worry when they see people doing things they aren't actually doing... + $_GET['action'] = ''; + writeLog(true); + + $_SESSION['login_url'] = $_SERVER['REQUEST_URI']; + + // Load the Login template and language file. + loadTemplate('Login'); + loadLanguage('Login'); + + // Use the kick_guest sub template... + $context['kick_message'] = $message; + $context['sub_template'] = 'kick_guest'; + $context['page_title'] = $txt[34]; + + obExit(); +} + +function autoWarn() +{ + global $txt, $db_prefix, $modSettings, $sourcedir; + + loadLanguage('InstantMessage'); + + // Only check warning levels once every blue moon + updateSettings(array('autoWarningTime' => time() + 600)); + $request = db_query(" + SELECT ID, memberID, timeToWarn, time, level + FROM {$db_prefix}vwarnings WHERE level < 3 AND level > 0", __FILE__, __LINE__); + include_once($sourcedir . '/Subs-Post.php'); + while ($row = mysql_fetch_assoc($request)){ + $IM=0; + if($row['timeToWarn'] == -1){ + // Check if time is expired + if ($row['level'] == 1) + $timeinc = $modSettings['warningAutoTime']*86400; + else + $timeinc = $modSettings['muteAutoTime']*86400; + } + else + $timeinc = $row['timeToWarn']*86400; + + if(time() >= $row['time'] + $timeinc) { + db_query(" + UPDATE {$db_prefix}vwarnings + SET level = level - 1, time = time + " . $timeinc . ", + timeToWarn = -1 + WHERE ID=$row[ID]", __FILE__, __LINE__); + db_query(" + UPDATE {$db_prefix}members + SET warning=warning - 1 + WHERE ID_MEMBER=$row[memberID]",__FILE__, __LINE__); + $IM=1; + } + if ($IM==1){ + $result = db_query(" + SELECT memberName, ID_MEMBER, emailAddress + FROM {$db_prefix}members + WHERE ID_MEMBER=$row[memberID]", __FILE__, __LINE__); + list($nameTo, $toID, $emailTo) = mysql_fetch_row($result); + $result = db_query(" + SELECT ID_MEMBER, realName, memberName FROM {$db_prefix}members + WHERE ID_GROUP=1 LIMIT 1", __FILE__, __LINE__); + $fromInfo = mysql_fetch_row($result); + $from = array( + 'id' => $fromInfo[0], + 'name' => $fromInfo[1], + 'username' => $fromInfo[2], + ); + $immessage = $nameTo . "\n\n" . $txt['visual_warning_reduced']; + sendpm($toID, null, $txt['visual_reduced'], $immessage, $from); + } + } +} +// Do banning related stuff. (ie. disallow access....) +function is_not_banned() +{ + global $txt, $db_prefix, $ID_MEMBER, $modSettings, $context, $user_info; + + // You cannot be banned if you are an admin - doesn't help if you log out. + if ($user_info['is_admin']) + return; + + // Only check the ban every so often. (to reduce load.) + if (!isset($_SESSION['ban']['last_checked']) || ($_SESSION['ban']['last_checked'] < $modSettings['banLastUpdated']) || !isset($_SESSION['ban']['ID_MEMBER']) || $_SESSION['ban']['ID_MEMBER'] != $ID_MEMBER || !isset($_SESSION['ban']['ip']) || $_SESSION['ban']['ip'] != $user_info['ip']) + { + // Innocent until proven guilty. (but we know you are! :P) + $_SESSION['ban'] = array( + 'full_ban' => array('is_banned' => false), + 'cannot_register' => array('is_banned' => false), + 'cannot_post' => array('is_banned' => false), + 'last_checked' => time(), + 'ID_MEMBER' => $ID_MEMBER, + 'ip' => $user_info['ip'], + ); + + $ban_query = array(); + + // Check if we have a valid IP address. + if (preg_match('/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/', $user_info['ip'], $ip_parts) == 1) + { + $ban_query[] = "(ban_type = 'ip_ban' + AND ($ip_parts[1] BETWEEN ip_low1 AND ip_high1) + AND ($ip_parts[2] BETWEEN ip_low2 AND ip_high2) + AND ($ip_parts[3] BETWEEN ip_low3 AND ip_high3) + AND ($ip_parts[4] BETWEEN ip_low4 AND ip_high4))"; + + // IP was valid, maybe there's also a hostname... + if (empty($modSettings['disableHostnameLookup'])) + { + $hostname = @gethostbyaddr($user_info['ip']); + if (strlen($hostname) > 0) + $ban_query[] = "(ban_type = 'hostname_ban' AND ('$hostname' LIKE hostname))"; + } + } + // We use '255.255.255.255' for 'unknown' since it's not valid anyway. + elseif ($user_info['ip'] == 'unknown') + $ban_query[] = "(ban_type = 'ip_ban' + AND ip_low1 = 255 AND ip_high1 = 255 + AND ip_low2 = 255 AND ip_high2 = 255 + AND ip_low3 = 255 AND ip_high3 = 255 + AND ip_low4 = 255 AND ip_high4 = 255)"; + + // Is their email address banned? + if (strlen($user_info['email']) != 0) + $ban_query[] = "(ban_type = 'email_ban' AND ('" . addslashes($user_info['email']) . "' LIKE email_address))"; + + // How about this user? + if (!$user_info['is_guest']) + $ban_query[] = "(ban_type = 'user_ban' AND ID_MEMBER = $ID_MEMBER)"; + + // Check the ban, if there's information. + if (!empty($ban_query)) + { + $request = db_query(" + SELECT ban_type, restriction_type, reason + FROM {$db_prefix}banned + WHERE (expire_time IS NULL OR expire_time > " . time() . ") + AND (" . implode(' OR ', $ban_query) . ')', __FILE__, __LINE__); + // Store every type of ban that applies to you in your session. + while ($row = mysql_fetch_assoc($request)) + $_SESSION['ban'][$row['restriction_type']] = array( + 'is_banned' => true, + 'reason' => empty($row['reason']) ? '' : '

    ' . $txt['ban_reason'] . ': ' . $row['reason'], + 'type' => $row['ban_type'] + ); + } + } + + // If you're fully banned, it's end of the story for you. + if ($_SESSION['ban']['full_ban']['is_banned']) + { + db_query(" + INSERT INTO {$db_prefix}log_banned + (ID_MEMBER, ip, email, logTime) + VALUES ($ID_MEMBER, '$user_info[ip]', " . (!$user_info['is_guest'] ? "'$user_info[email]'" : 'NULL') . ', ' . time() . ')', __FILE__, __LINE__); + + // 'Log' the user out. Can't have any funny business... (save the name!) + $old_name = isset($user_info['name']) && $user_info['name'] != '' ? $user_info['name'] : $txt[28]; + $user_info['name'] = ''; + $user_info['username'] = ''; + $user_info['is_guest'] = true; + $user_info['is_admin'] = false; + $user_info['permissions'] = array(); + $ID_MEMBER = 0; + $context['user'] = array( + 'id' => 0, + 'username' => '', + 'name' => $txt[28], + 'is_guest' => true, + 'is_logged' => false, + 'is_admin' => false, + 'is_mod' => false, + 'language' => $user_info['language'] + ); + + // You banned, sucka! + fatal_error(sprintf($txt[430], $old_name) . $_SESSION['ban']['full_ban']['reason']); + } + + // Fix up the banning permissions. + if (isset($user_info['permissions'])) + banPermissions(); +} + +// Fix permissions according to ban status. +function banPermissions() +{ + global $user_info; + + // Somehow they got here, at least take away all permissions... + if (isset($_SESSION['ban']) && $_SESSION['ban']['full_ban']['is_banned']) + $user_info['permissions'] = array(); + // Okay, well, you can watch, but don't touch a thing. + elseif (isset($_SESSION['ban']) && $_SESSION['ban']['cannot_post']['is_banned']) + { + $user_info['permissions'] = array_diff( + $user_info['permissions'], + array( + 'pm_send', + 'calendar_post', 'calendar_edit_own', 'calendar_edit_any', + 'poll_post', + 'poll_add_own', 'poll_add_any', + 'poll_edit_own', 'poll_edit_any', + 'poll_lock_own', 'poll_lock_any', + 'poll_remove_own', 'poll_remove_any', + 'manage_attachments', 'manage_smileys', 'manage_boards', 'admin_forum', 'manage_permissions', + 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', + 'profile_identity_any', 'profile_extra_any', 'profile_title_any', + 'post_new', 'post_reply_own', 'post_reply_any', + 'remove_own', 'remove_any', 'remove_replies', + 'make_sticky', + 'merge_any', 'split_any', + 'modify_own', 'modify_any', 'modify_replies', + 'move_any', + 'send_topic', + 'lock_own', 'lock_any', + 'delete_own', 'delete_any', + ) + ); + } +} + +// Check if a name is in the reserved words list. (name, current member id, name/username?.) +function isReservedName($name, $current_ID_MEMBER = 0, $is_name = true) +{ + global $user_info, $modSettings, $db_prefix; + + $checkName = strtolower($name); + + // Administrators are never restricted ;). + if (!allowedTo('moderate_forum') && ((!empty($modSettings['reserveName']) && $is_name) || !empty($modSettings['reserveUser']) && !$is_name)) + { + $reservedNames = explode("\n", $modSettings['reserveNames']); + // Case sensitive check? + $checkName = empty($modSettings['reserveCase']) ? strtolower($checkName) : $checkName; + + // Check each name in the list... + foreach ($reservedNames as $reserved) + { + if ($reserved == '') + continue; + + // Case sensitive name? + $reservedCheck = empty($modSettings['reserveCase']) ? strtolower($reserved) : $reserved; + // If it's not just entire word, check for it in there somewhere... + if ($checkName == $reservedCheck || (strpos($checkName, $reservedCheck) !== false && empty($modSettings['reserveWord']))) + fatal_lang_error(244, true, array($reserved)); + } + } + + // Get rid of any SQL parts of the reserved name and make it lowercase. + $checkName = strtr($name, array('_' => '\\_', '%' => '\\%')); + + // Make sure they don't want someone else's name. + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}members + WHERE " . (empty($current_ID_MEMBER) ? '' : "ID_MEMBER != $current_ID_MEMBER + AND ") . "(realName LIKE '$checkName' OR memberName LIKE '$checkName') + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + return true; + mysql_free_result($request); + + // Does name case insensitive match a member group name? + $request = db_query(" + SELECT ID_GROUP + FROM {$db_prefix}membergroups + WHERE groupName LIKE '$checkName' + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + return true; + mysql_free_result($request); + + // Okay, they passed. + return false; +} + +// Make sure the user's correct session was passed, and they came from here. (type can be post, get, or request.) +function checkSession($type = 'post', $from_action = '', $is_fatal = true) +{ + global $sc, $modSettings, $boardurl; + + // Is it in as $_POST['sc']? + if ($type == 'post' && (!isset($_POST['sc']) || $_POST['sc'] != $sc)) + $error = 'smf304'; + // How about $_GET['sesc']? + elseif ($type == 'get' && (!isset($_GET['sesc']) || $_GET['sesc'] != $sc)) + $error = 'smf305'; + // Or can it be in either? + elseif ($type == 'request' && (!isset($_GET['sesc']) || $_GET['sesc'] != $sc) && (!isset($_POST['sc']) || $_POST['sc'] != $sc)) + $error = 'smf305'; + + // Verify that they aren't changing user agents on us - that could be bad. + if ((!isset($_SESSION['USER_AGENT']) || $_SESSION['USER_AGENT'] != $_SERVER['HTTP_USER_AGENT']) && empty($modSettings['disableCheckUA'])) + $error = 'smf305'; + + // Check the referring site - it should be the same server at least! + $referrer = isset($_SERVER['HTTP_REFERER']) ? parse_url($_SERVER['HTTP_REFERER']) : array(); + if (!empty($referrer['host'])) + { + if (strpos($_SERVER['HTTP_HOST'], ':') !== false) + $real_host = substr($_SERVER['HTTP_HOST'], 0, strpos($_SERVER['HTTP_HOST'], ':')); + else + $real_host = $_SERVER['HTTP_HOST']; + + $parsed_url = parse_url($boardurl); + + // Are global cookies on? If so, let's check them ;). + if (!empty($modSettings['globalCookies'])) + { + if (preg_match('~(?:[^\.]+\.)?([^\.]{3,}\..+)\z~i', $parsed_url['host'], $parts) == 1) + $parsed_url['host'] = $parts[1]; + + if (preg_match('~(?:[^\.]+\.)?([^\.]{3,}\..+)\z~i', $referrer['host'], $parts) == 1) + $referrer['host'] = $parts[1]; + + if (preg_match('~(?:[^\.]+\.)?([^\.]{3,}\..+)\z~i', $real_host, $parts) == 1) + $real_host = $parts[1]; + } + + // Okay: referrer must either match parsed_url or real_host. + if (strtolower($referrer['host']) != strtolower($parsed_url['host']) && strtolower($referrer['host']) != strtolower($real_host)) + { + $error = 'smf306'; + $log_error = true; + } + } + + // Well, first of all, if a from_action is specified you'd better have an old_url. + if (!empty($from_action) && (!isset($_SESSION['old_url']) || preg_match('~[?;&]action=' . $from_action . '([;&]|$)~', $_SESSION['old_url']) == 0)) + { + $error = 'smf306'; + $log_error = true; + } + + // Everything is ok, return an empty string. + if (!isset($error)) + return ''; + // A session error occurred, show the error. + elseif ($is_fatal) + fatal_lang_error($error, isset($log_error)); + // A session error occurred, return the error to the calling function. + else + return $error; +} + +// Check whether a form has been submitted twice. +function checkSubmitOnce($action, $is_fatal = true) +{ + global $context; + + // Register a form number and store it in the session stack. (use this on the page that has the form.) + if ($action == 'register') + { + // The stack hasn't been created yet. Start it off with a single bit in it and move the pointer to 0. + if (!isset($_SESSION['form_stack']) || !isset($_SESSION['form_stack_pointer'])) + { + $_SESSION['form_stack'] = chr(1); + $_SESSION['form_stack_pointer'] = 0; + } + // We've already got one, so set the next bit in it. + else + setBit($_SESSION['form_stack'], $_SESSION['form_stack_pointer'], 1); + + // Get the current value, and then increment the pointer. + $context['form_sequence_number'] = $_SESSION['form_stack_pointer']++; + } + // Check whether the submitted number can be found in the session. + elseif ($action == 'check') + { + // If the variable is indeed set, we have a stack, AND the bit isn't set on the stack.... + if (isset($_REQUEST['seqnum']) && isset($_SESSION['form_stack']) && !getBit($_SESSION['form_stack'], $_REQUEST['seqnum'])) + { + // You've already submitted. + if ($is_fatal) + fatal_lang_error('error_form_already_submitted', false); + else + return false; + } + // Otherwise, let's set the seqnum stack. + elseif (!isset($_REQUEST['seqnum'])) + $_REQUEST['seqnum'] = 0; + + // Release the number, never to be used again during this session. + setBit($_SESSION['form_stack'], $_REQUEST['seqnum'], 0); + + return true; + } + // Don't check, just free the stack number. + elseif ($action == 'free' && !empty($_REQUEST['seqnum']) && getBit($_SESSION['form_stack'], $_REQUEST['seqnum'])) + setBit($_SESSION['form_stack'], $_REQUEST['seqnum'], 0); +} + +// Store a bit in a string at the given position (used by checkSubmitOnce). +function setBit(&$string, $position, $value) +{ + // Get the character position of the character carying the bit. + $charPos = floor($position / 8); + + // Get the bit number of the character. + $bitPos = $position % 8; + + // Enhance the string if its length is not sufficient. + if (strlen($string) < $charPos + 1) + $string .= str_repeat(chr(0), $charPos + 1 - strlen($string)); + + // Set or unset the bit depending on $value. + if (empty($value)) + $string{$charPos} = chr(ord($string{$charPos}) & ~pow(2, $bitPos)); + else + $string{$charPos} = chr(ord($string{$charPos}) | pow(2, $bitPos)); +} + +// Check whether a bit at the given position is set (used by checkSubmitOnce). +function getBit(&$string, $position) +{ + // Get the position of the character this bit is in. + $charPos = floor($position / 8); + + // If the string isn't even that long, obviously it's 0/false. + if (strlen($string) < $charPos + 1) + return false; + + // If the character's bits coincide with 2 ^ position, we got it! (assuming position is the size of the character, 8.) + return (ord($string{$charPos}) & pow(2, $position % 8)) > 0; +} + +// Check the user's permissions. +function allowedTo($permission, $boards = null) +{ + global $user_info, $db_prefix, $ID_MEMBER; + + // You're always allowed to do nothing. (unless you're a working man, MR. LAZY :P!) + if (empty($permission)) + return true; + + // You're never allowed to do something if your data hasn't been loaded yet! + if (empty($user_info) || !isset($user_info['permissions'])) + return false; + + // Administrators are supermen :P. + if ($user_info['is_admin']) + return true; + + // no more than 3 polls in 24 hours. moderators excluded + if (! $user_info['is_mod'] && in_array($permission, array ('poll_post', 'poll_add_own'))) { + $request = db_query(" + SELECT COUNT(*) as recent_polls + FROM {$db_prefix}polls + WHERE ID_MEMBER='{$ID_MEMBER}' + AND ts >= NOW() - INTERVAL 1 DAY", __FILE__, __LINE__); + list($c) = mysql_fetch_row($request); + if ($c >= 3 ) return false; + } + + // Are we checking the _current_ board, or some other boards? + if ($boards === null) + { + // Check if they can do it. + if (!is_array($permission) && in_array($permission, $user_info['permissions'])) + return true; + // Search for any of a list of permissions. + elseif (is_array($permission) && count(array_intersect($permission, $user_info['permissions'])) != 0) + return true; + // You aren't allowed, by default. + else + return false; + } + elseif (!is_array($boards)) + $boards = array($boards); + + $request = db_query(" + SELECT MIN(bp.addDeny) AS addDeny + FROM {$db_prefix}boards AS b, {$db_prefix}board_permissions AS bp + WHERE b.ID_BOARD IN (" . implode(', ', $boards) . ") + AND bp.ID_BOARD = IF(b.use_local_permissions = 1, b.ID_BOARD, 0) + AND bp.ID_GROUP IN (" . implode(', ', array_diff($user_info['groups'], array(3))) . ") + AND bp.permission " . (is_array($permission) ? "IN (" . implode("', '", $permission) . ")" : " = '$permission'") . " + GROUP BY b.ID_BOARD", __FILE__, __LINE__); + + // Make sure they can do it on all of the boards. + if (mysql_num_rows($request) != count($boards)) + return false; + + $result = true; + while ($row = mysql_fetch_assoc($request)) + $result &= !empty($row['addDeny']); + mysql_free_result($request); + + // If the query returned 1, they can do it... otherwise, they can't. + return $result; +} + +// Fatal error if they cannot... +function isAllowedTo($permission, $boards = null) +{ + global $user_info, $txt; + + static $heavy_permissions = array( + 'admin_forum', + 'manage_attachments', + 'manage_smileys', + 'manage_boards', + 'edit_news', + 'moderate_forum', + 'manage_bans', + 'manage_membergroups', + 'manage_permissions', + ); + + // Make it an array, even if a string was passed. + $permission = is_array($permission) ? $permission : array($permission); + + // Check the permission and return an error... + if (!allowedTo($permission, $boards)) + { + // Pick the last array entry as the permission shown as the error. + $error_permission = array_pop($permission); + + // If they are a guest, show a login. (because the error might be gone if they do!) + if ($user_info['is_guest']) + { + loadLanguage('Errors'); + is_not_guest($txt['cannot_' . $error_permission]); + } + + // Clear the action because they aren't really doing that! + $_GET['action'] = ''; + writeLog(true); + + fatal_lang_error('cannot_' . $error_permission, false); + } + + // If you're doing something on behalf of some "heavy" permissions, validate your session. + // (take out the heavy permissions, and if you can't do anything but those, you need a validated session.) + if (!allowedTo(array_diff($permission, $heavy_permissions), $boards)) + validateSession(); +} + +// Return the boards a user has a certain (board) permission on. (array(0) if all.) +function boardsAllowedTo($permission) +{ + global $db_prefix, $ID_MEMBER, $user_info; + + // Administrators are all powerful, sorry. + if ($user_info['is_admin']) + return array(0); + $boards = array(); + $deny_boards = array(); + + // All groups the user is in except 'moderator'. + $groups = array_diff($user_info['groups'], array(3)); + + // Fetch boards that have the permission globally. + $request = db_query(" + SELECT b.ID_BOARD, IFNULL(bp.addDeny, mod_bp.addDeny) AS addDeny + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}board_permissions AS bp ON (bp.ID_BOARD = 0 AND bp.ID_GROUP IN (" . implode(', ', $groups) . ") AND bp.permission = '$permission') + LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_MEMBER = $ID_MEMBER AND mods.ID_BOARD = b.ID_BOARD) + LEFT JOIN {$db_prefix}board_permissions AS mod_bp ON (mod_bp.ID_BOARD = 0 AND mod_bp.ID_GROUP = 3 AND mod_bp.permission = '$permission') + WHERE b.use_local_permissions = 0 + AND (!ISNULL(bp.ID_BOARD) OR (!ISNULL(mod_bp.ID_BOARD) AND !ISNULL(mods.ID_MEMBER)))", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if (empty($row['addDeny'])) + $deny_boards[] = $row['ID_BOARD']; + else + $boards[] = $row['ID_BOARD']; + } + mysql_free_result($request); + + // Fetch boards that have the permission locally. + $request = db_query(" + SELECT b.ID_BOARD, IFNULL(bp.addDeny, mod_bp.addDeny) AS addDeny + FROM {$db_prefix}boards AS b + LEFT JOIN {$db_prefix}board_permissions AS bp ON (bp.ID_BOARD = b.ID_BOARD AND bp.ID_GROUP IN (" . implode(', ', $groups) . ") AND bp.permission = '$permission') + LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_MEMBER = $ID_MEMBER AND mods.ID_BOARD = b.ID_BOARD) + LEFT JOIN {$db_prefix}board_permissions AS mod_bp ON (mod_bp.ID_BOARD = mods.ID_BOARD AND mod_bp.ID_GROUP = 3 AND mod_bp.permission = '$permission') + WHERE b.use_local_permissions = 1 + AND (!ISNULL(bp.ID_BOARD) OR !ISNULL(mod_bp.ID_BOARD))", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if (empty($row['addDeny'])) + $deny_boards[] = $row['ID_BOARD']; + else + $boards[] = $row['ID_BOARD']; + } + mysql_free_result($request); + + return array_values(array_diff($boards, $deny_boards)); +} + +?> diff --git a/Sources/SendTopic.php b/Sources/SendTopic.php new file mode 100644 index 0000000..0d4f268 --- /dev/null +++ b/Sources/SendTopic.php @@ -0,0 +1,243 @@ + \ No newline at end of file diff --git a/Sources/SplitTopics.php b/Sources/SplitTopics.php new file mode 100644 index 0000000..9a2f623 --- /dev/null +++ b/Sources/SplitTopics.php @@ -0,0 +1,1038 @@ + 4) + $subAction = 'SplitTopics1'; + else + $subAction = 'SplitTopics' . (int) $_REQUEST['sa']; + + $subAction(); +} + +// Part 1: General stuff. +function SplitTopics1() +{ + global $txt, $topic, $db_prefix, $context; + + // Validate "at". + if (empty($_GET['at'])) + fatal_lang_error(337, false); + $_GET['at'] = (int) $_GET['at']; + + // Retrieve the subject and stuff of the specific topic/message. + $request = db_query(" + SELECT m.subject, t.numReplies, t.ID_FIRST_MSG + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t + WHERE m.ID_MSG = $_GET[at] + AND m.ID_TOPIC = $topic + AND t.ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf272'); + list ($_REQUEST['subname'], $numReplies, $ID_FIRST_MSG) = mysql_fetch_row($request); + mysql_free_result($request); + + // Check if there is more than one message in the topic. (there should be.) + if ($numReplies < 1) + fatal_lang_error('smf270', false); + + // Check if this is the first message in the topic (if so, the first and second option won't be available) + if ($ID_FIRST_MSG == $_GET['at']) + return SplitTopics3(); + + // Basic template information.... + $context['message'] = array( + 'id' => $_GET['at'], + 'subject' => $_REQUEST['subname'] + ); + $context['sub_template'] = 'ask'; + $context['page_title'] = $txt['smf251']; +} + +// Alright, you've decided what you want to do with it.... now to do it. +function SplitTopics2() +{ + global $txt, $board, $topic, $db_prefix, $context, $ID_MEMBER; + + // Check the session to make sure they meant to do this. + checkSession(); + + // They blanked the subject name. + if (!isset($_POST['subname']) || $_POST['subname'] == '') + $_POST['subname'] = $txt['smf258']; + + // Redirect to the selector if they chose selective. + if ($_POST['step2'] == 'selective') + { + $_REQUEST['subname'] = $_POST['subname']; + return SplitTopics3(); + } + + // The old topic... + $split1_ID_TOPIC = $topic; + + /// The new first message and member. + $split2_firstMsg = $_POST['at']; + $split2_firstMem = getMsgMemberID($split2_firstMsg); + + // Find the old first, original last, and original number of replies. + $tresult = db_query(" + SELECT MIN(m.ID_MSG) AS myID_FIRST_MSG, MAX(m.ID_MSG) AS myID_LAST_MSG, COUNT(m.ID_MSG) - 1 AS myNumReplies, t.isSticky + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE m.ID_TOPIC = $split1_ID_TOPIC + AND t.ID_TOPIC = $split1_ID_TOPIC + GROUP BY t.ID_TOPIC", __FILE__, __LINE__); + list ($split1_firstMsg, $orig_lastMsg, $orig_replies, $isSticky) = mysql_fetch_row($tresult); + mysql_free_result($tresult); + $split1_firstMem = getMsgMemberID($split1_firstMsg); + $orig_lastMem = getMsgMemberID($orig_lastMsg); + + // If you're not trying to do a selective on the first message.. what are you doing? + if ($_POST['at'] == $split1_firstMsg) + fatal_lang_error('smf268'); + + // If you are splitting all those after, or "onlythis" and this is the last post... + if ($_POST['step2'] == 'afterthis' || $orig_lastMsg == $split2_firstMsg) + { + // By logic, the new last message/member is the original last message/member. + $split2_lastMsg = $orig_lastMsg; + $split2_lastMem = $orig_lastMem; + + // Find the last message and member of the old topic. + $request = db_query(" + SELECT m.ID_MSG, IFNULL(mem.ID_MEMBER, 0) AS myID_MEMBER + FROM {$db_prefix}messages AS m + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE ID_TOPIC = $split1_ID_TOPIC + AND ID_MSG < $_POST[at] + ORDER BY ID_MSG DESC + LIMIT 1", __FILE__, __LINE__); + list ($split1_lastMsg, $split1_lastMem) = mysql_fetch_row($request); + mysql_free_result($request); + + // Find the number of replies for the new topic - thus finding the old as well. + $request = db_query(" + SELECT COUNT(ID_MSG) - 1 AS numReplies + FROM {$db_prefix}messages + WHERE ID_TOPIC = $split1_ID_TOPIC + AND ID_MSG >= $_POST[at]", __FILE__, __LINE__); + list ($split2_replies) = mysql_fetch_row($request); + mysql_free_result($request); + $split1_replies = $orig_replies - $split2_replies - 1; + } + elseif ($_POST['step2'] == 'onlythis') + { + // If you're only splitting off this message, things are simple. + $split1_lastMsg = $orig_lastMsg; + $split1_lastMem = $orig_lastMem; + // Only one message - no replies. + $split2_lastMsg = $split2_firstMsg; + $split2_lastMem = $split2_firstMem; + $split2_replies = 0; + $split1_replies = $orig_replies - 1; + } + // There's another action?! + else + fatal_lang_error(1, false); + + // No db changes yet, so let's double check to see if something got messed up. + if ($split1_firstMsg <= 0 || $split1_lastMsg <= 0 || $split2_firstMsg <= 0 || $split2_lastMsg <= 0 || $split1_replies < 0 || $split2_replies < 0) + fatal_lang_error('smf272'); + + // Make the new topic, but use 0 for the last and first ID_MSG to avoid UNIQUE errors. (fix 'em at the end!) + db_query(" + INSERT INTO {$db_prefix}topics + (ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_FIRST_MSG, ID_LAST_MSG, numReplies, isSticky) + VALUES ($board, $split2_firstMem, $split2_firstMem, 0, 0, $split2_replies, $isSticky)", __FILE__, __LINE__); + $split2_ID_TOPIC = db_insert_id(); + if ($split2_ID_TOPIC <= 0) + fatal_lang_error('smf273'); + + // 'Move' the messages. + db_query(" + UPDATE {$db_prefix}messages + SET ID_TOPIC = $split2_ID_TOPIC + WHERE ID_TOPIC = $split1_ID_TOPIC + AND (ID_MSG BETWEEN $split2_firstMsg AND $split2_lastMsg) + LIMIT " . ($split2_lastMsg - $split2_firstMsg + 1), __FILE__, __LINE__); + // Set the subject of the first message of the new topic. + db_query(" + UPDATE {$db_prefix}messages + SET subject = '" . preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', htmlspecialchars($_POST['subname'])) . "' + WHERE ID_MSG = $_POST[at] + LIMIT 1", __FILE__, __LINE__); + + // Mess with the new first message, etc. + db_query(" + UPDATE {$db_prefix}topics + SET ID_FIRST_MSG = $split1_firstMsg, ID_LAST_MSG = $split1_lastMsg, numReplies = $split1_replies, + ID_MEMBER_STARTED = $split1_firstMem, ID_MEMBER_UPDATED = $split1_lastMem + WHERE ID_TOPIC = $split1_ID_TOPIC + LIMIT 1", __FILE__, __LINE__); + + // Now, put the first/last message back to what they should be. + db_query(" + UPDATE {$db_prefix}topics + SET ID_FIRST_MSG = $split2_firstMsg, ID_LAST_MSG = $split2_lastMsg + WHERE ID_TOPIC = $split2_ID_TOPIC + LIMIT 1", __FILE__, __LINE__); + + // The board has more topics now. + db_query(" + UPDATE {$db_prefix}boards + SET numTopics = numTopics + 1 + WHERE ID_BOARD = $board + LIMIT 1", __FILE__, __LINE__); + + // The user has to have read it, hopefully, because they split it! + db_query(" + REPLACE INTO {$db_prefix}log_topics + (logTime, ID_MEMBER, ID_TOPIC) + VALUES (" . time() . ", $ID_MEMBER, $split2_ID_TOPIC)", __FILE__, __LINE__); + + // Clean up. + updateStats('topic'); + updateLastMessages($board); + + $context['old_topic'] = $split1_ID_TOPIC; + $context['new_topic'] = $split2_ID_TOPIC; + $context['page_title'] = $txt['smf251']; + + logAction('split', array('topic' => $topic, 'new_topic' => $split2_ID_TOPIC)); + // Notify people that this topic has been split? + sendNotifications($topic, 'split'); +} + +// Get a selective list of topics... +function SplitTopics3() +{ + global $txt, $scripturl, $topic, $db_prefix, $context, $modSettings; + + $context['page_title'] = $txt['smf251'] . ' - ' . $txt['smf257']; + + // Some stuff for our favorite template. + $context['new_subject'] = stripslashes($_REQUEST['subname']); + + // Get the maximum number of messages. + $result = db_query(" + SELECT COUNT(ID_MSG) + FROM {$db_prefix}messages + WHERE ID_TOPIC = $topic", __FILE__, __LINE__); + list ($maxmessages) = mysql_fetch_row($result); + mysql_free_result($result); + + // Build a page list. + $context['page_index'] = constructPageIndex($scripturl . '?action=splittopics;sa=3;subname=' . urlencode($_REQUEST['subname']) . ';topic=' . $topic, $_REQUEST['start'], $maxmessages, $modSettings['defaultMaxMessages'], true); + + // Get the messages and stick them into an array. + $tresult = db_query(" + SELECT m.subject, IFNULL(mem.realName, m.posterName) AS realName, m.body, m.ID_MSG + FROM {$db_prefix}messages AS m + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE m.ID_TOPIC = $topic + ORDER BY m.ID_MSG DESC + LIMIT $_REQUEST[start], $modSettings[defaultMaxMessages]", __FILE__, __LINE__); + $context['messages'] = array(); + while ($row = mysql_fetch_assoc($tresult)) + { + $row['body'] = doUBBC($row['body']); + + $context['messages'][] = array( + 'subject' => $row['subject'], + 'body' => $row['body'], + 'id' => $row['ID_MSG'], + 'poster' => $row['realName'] + ); + } + mysql_free_result($tresult); + + // Using the "select" sub template. + $context['sub_template'] = 'select'; +} + +// Actually and selectively split the topics out. +function SplitTopics4() +{ + global $txt, $board, $topic, $db_prefix, $context, $ID_MEMBER; + + // Make sure the session id was passed with post. + checkSession(); + + // Default the subject in case it's blank. + if (!isset($_POST['subname']) || $_POST['subname'] == '') + $_POST['subname'] = $txt['smf258']; + + // The old topic's ID is the current one. + $split1_ID_TOPIC = $topic; + + // You must've selected some messages! Can't split out none! + if (empty($_POST['selpost'])) + fatal_lang_error('smf271', false); + + // No sense in imploding it over and over again. + $postList = implode(',', array_keys($_POST['selpost'])); + + // Find the new first and last not in the list. (old topic) + $result = db_query(" + SELECT MIN(m.ID_MSG) AS myID_FIRST_MSG, MAX(m.ID_MSG) AS myID_LAST_MSG, COUNT(m.ID_MSG) - 1 AS myNumReplies, t.isSticky + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t + WHERE m.ID_MSG NOT IN ($postList) + AND m.ID_TOPIC = $split1_ID_TOPIC + AND t.ID_TOPIC = $split1_ID_TOPIC + GROUP BY m.ID_TOPIC + LIMIT 1", __FILE__, __LINE__); + // You can't select ALL the messages! + if (mysql_num_rows($result) == 0) + fatal_lang_error('smf271b', false); + list ($split1_firstMsg, $split1_lastMsg, $split1_replies, $isSticky) = mysql_fetch_row($result); + mysql_free_result($result); + $split1_firstMem = getMsgMemberID($split1_firstMsg); + $split1_lastMem = getMsgMemberID($split1_lastMsg); + + // Find the first and last in the list. (new topic) + $result = db_query(" + SELECT MIN(ID_MSG) AS myID_FIRST_MSG, MAX(ID_MSG) AS myID_LAST_MSG, COUNT(ID_MSG) - 1 AS myNumReplies + FROM {$db_prefix}messages + WHERE ID_MSG IN ($postList) + AND ID_TOPIC = $split1_ID_TOPIC + GROUP BY ID_TOPIC + LIMIT 1", __FILE__, __LINE__); + list ($split2_firstMsg, $split2_lastMsg, $split2_replies) = mysql_fetch_row($result); + mysql_free_result($result); + $split2_firstMem = getMsgMemberID($split2_firstMsg); + $split2_lastMem = getMsgMemberID($split2_lastMsg); + + // No database changes yet, so let's double check to see if everything makes at least a little sense. + if ($split1_firstMsg <= 0 || $split1_lastMsg <= 0 || $split2_firstMsg <= 0 || $split2_lastMsg <= 0 || $split1_replies < 0 || $split2_replies < 0) + fatal_lang_error('smf272'); + + // We're off to insert the new topic! Use 0 for now to avoid UNIQUE errors. + db_query(" + INSERT INTO {$db_prefix}topics + (ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_FIRST_MSG, ID_LAST_MSG, numReplies, isSticky) + VALUES ($board, $split2_firstMem, $split2_lastMem, 0, 0, $split2_replies, $isSticky)", __FILE__, __LINE__); + $split2_ID_TOPIC = db_insert_id(); + if ($split2_ID_TOPIC <= 0) + fatal_lang_error('smf273'); + + // Move the messages over to the other topic. + db_query(" + UPDATE {$db_prefix}messages + SET ID_TOPIC = $split2_ID_TOPIC, subject = '" . preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', htmlspecialchars($_POST['subname'])) . "' + WHERE ID_MSG IN ($postList) + LIMIT " . count($_POST['selpost']), __FILE__, __LINE__); + + // Mess with the old topic's first, last, and number of messages. + db_query(" + UPDATE {$db_prefix}topics + SET numReplies = $split1_replies, ID_FIRST_MSG = $split1_firstMsg, ID_LAST_MSG = $split1_lastMsg, + ID_MEMBER_STARTED = $split1_firstMem, ID_MEMBER_UPDATED = $split1_lastMem + WHERE ID_TOPIC = $split1_ID_TOPIC + LIMIT 1", __FILE__, __LINE__); + + // Now, put the first/last message back to what they should be. + db_query(" + UPDATE {$db_prefix}topics + SET ID_FIRST_MSG = $split2_firstMsg, ID_LAST_MSG = $split2_lastMsg + WHERE ID_TOPIC = $split2_ID_TOPIC + LIMIT 1", __FILE__, __LINE__); + + // The board has more topics now. + db_query(" + UPDATE {$db_prefix}boards + SET numTopics = numTopics + 1 + WHERE ID_BOARD = $board + LIMIT 1", __FILE__, __LINE__); + + // The user has to have read it, hopefully, because they split it! + db_query(" + REPLACE INTO {$db_prefix}log_topics + (logTime, ID_MEMBER, ID_TOPIC) + VALUES (" . time() . ", $ID_MEMBER, $split2_ID_TOPIC)", __FILE__, __LINE__); + + // Housekeeping. + updateStats('topic'); + updateLastMessages($board); + + $context['old_topic'] = $split1_ID_TOPIC; + $context['new_topic'] = $split2_ID_TOPIC; + $context['page_title'] = $txt['smf251']; + + logAction('split', array('topic' => $topic, 'new_topic' => $split2_ID_TOPIC)); + // Notify people that this topic has been split? + sendNotifications($topic, 'split'); +} + +// Merge two topics into one topic... useful if they have the same basic subject. +function MergeTopics() +{ + // Load the template.... + loadTemplate('SplitTopics'); + + // ?action=splittopics;sa=LETSBREAKIT won't work, sorry. + if (!isset($_REQUEST['sa']) || !is_numeric($_REQUEST['sa']) || $_REQUEST['sa'] < 1 || $_REQUEST['sa'] > 4) + $subAction = 'MergeTopics1'; + else + $subAction = 'MergeTopics' . (int) $_REQUEST['sa']; + + $subAction(); +} + +// Merge two topics together. +function MergeTopics1() +{ + global $txt, $board, $context; + global $scripturl, $topic, $db_prefix, $user_info, $modSettings; + + $_REQUEST['targetboard'] = isset($_REQUEST['targetboard']) ? (int) $_REQUEST['targetboard'] : $board; + $context['target_board'] = $_REQUEST['targetboard']; + + // How many topics are on this board? (used for paging.) + $request = db_query(" + SELECT COUNT(ID_TOPIC) + FROM {$db_prefix}topics + WHERE ID_BOARD = $_REQUEST[targetboard]", __FILE__, __LINE__); + list ($topiccount) = mysql_fetch_row($request); + mysql_free_result($request); + + // Make the page list. + $context['page_index'] = constructPageIndex($scripturl . '?action=mergetopics;from=' . $_GET['from'] . ';targetboard=' . $_REQUEST['targetboard'] . ';board=' . $board, $_REQUEST['start'], $topiccount, $modSettings['defaultMaxTopics'], true); + + // Get the topic's subject. + $request = db_query(" + SELECT m.subject + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t + WHERE m.ID_MSG = t.ID_FIRST_MSG + AND t.ID_TOPIC = $_GET[from] + AND t.ID_BOARD = $board + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf232'); + list ($subject) = mysql_fetch_row($request); + mysql_free_result($request); + + // Tell the template a few things.. + $context['origin_topic'] = $_GET['from']; + $context['origin_subject'] = $subject; + $context['origin_js_subject'] = addcslashes(addslashes($subject), '/'); + $context['page_title'] = $txt['smf252']; + + // Check which boards you have merge permissions on. + $merge_boards = boardsAllowedTo('merge_any'); + + if (empty($merge_boards)) + fatal_lang_error('cannot_merge_any'); + + // Get a list of boards they can navigate to to merge. + $request = db_query(" + SELECT b.ID_BOARD, b.name AS bName, c.name AS cName + FROM {$db_prefix}boards AS b, {$db_prefix}categories AS c + WHERE b.ID_CAT = c.ID_CAT + AND $user_info[query_see_board]" . (!in_array(0, $merge_boards) ? " + AND b.ID_BOARD IN (" . implode(', ', $merge_boards) . ")" : '') . " + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['boards'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['boards'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['bName'], + 'category' => $row['cName'] + ); + mysql_free_result($request); + + // Get some topics to merge it with. + $request = db_query(" + SELECT t.ID_TOPIC, m.subject, m.ID_MEMBER, IFNULL(mem.realName, m.posterName) AS posterName + FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m, {$db_prefix}messages AS m2) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE m.ID_MSG = t.ID_FIRST_MSG + AND m2.ID_MSG = t.ID_LAST_MSG + AND t.ID_BOARD = $_REQUEST[targetboard] + AND t.ID_TOPIC != $_GET[from] + ORDER BY " . (!empty($modSettings['enableStickyTopics']) ? 't.isSticky DESC, ' : '') . "m2.posterTime DESC + LIMIT $_REQUEST[start], $modSettings[defaultMaxTopics]", __FILE__, __LINE__); + $context['topics'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + censorText($row['subject']); + + $context['topics'][] = array( + 'id' => $row['ID_TOPIC'], + 'poster' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['posterName'], + 'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '' . $row['posterName'] . '' + ), + 'subject' => $row['subject'], + 'js_subject' => addcslashes(addslashes($row['subject']), '/') + ); + } + + $context['sub_template'] = 'merge'; +} + +// Now that the topic IDs are known, do the proper merging. +function MergeTopics2($topics = array()) +{ + global $db_prefix, $user_info, $txt, $context, $scripturl, $sourcedir; + + // The parameters of MergeTopics2 were set, so this must've been an internal call. + if (!empty($topics)) + { + isAllowedTo('merge_any'); + loadTemplate('SplitTopics'); + } + + // Handle URLs from MergeTopics1. + if (!empty($_GET['from']) && !empty($_GET['to'])) + $topics = array($_GET['from'], $_GET['to']); + + // If we came from a form, the topic IDs came by post. + if (!empty($_POST['topics']) && is_array($_POST['topics'])) + $topics = $_POST['topics']; + + // There's nothing to merge with just one topic... + if (empty($topics) || !is_array($topics) || count($topics) == 1) + fatal_lang_error('merge_need_more_topics'); + + // Make sure every topic is numeric, or some nasty things could be done with the DB. + foreach ($topics as $id => $topic) + $topics[$id] = (int) $topic; + + // Get info about the topics and polls that will be merged. + $request = db_query(" + SELECT + t.ID_TOPIC, t.ID_BOARD, t.ID_POLL, t.numViews, t.isSticky, + m1.subject, m1.posterTime AS time_started, IFNULL(mem1.ID_MEMBER, 0) AS ID_MEMBER_STARTED, IFNULL(mem1.realName, m1.posterName) AS name_started, + m2.posterTime AS time_updated, IFNULL(mem2.ID_MEMBER, 0) AS ID_MEMBER_UPDATED, IFNULL(mem2.realName, m2.posterName) AS name_updated + FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m1, {$db_prefix}messages AS m2) + LEFT JOIN {$db_prefix}members AS mem1 ON (mem1.ID_MEMBER = m1.ID_MEMBER) + LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER = m2.ID_MEMBER) + WHERE t.ID_TOPIC IN (" . implode(', ', $topics) . ") + AND m1.ID_MSG = t.ID_FIRST_MSG + AND m2.ID_MSG = t.ID_LAST_MSG + ORDER BY t.ID_FIRST_MSG + LIMIT " . count($topics), __FILE__, __LINE__); + if (mysql_num_rows($request) < 2) + fatal_lang_error('smf263'); + $num_views = 0; + $isSticky = 0; + $boards = array(); + $polls = array(); + while ($row = mysql_fetch_assoc($request)) + { + $topic_data[$row['ID_TOPIC']] = array( + 'id' => $row['ID_TOPIC'], + 'board' => $row['ID_BOARD'], + 'poll' => $row['ID_POLL'], + 'numViews' => $row['numViews'], + 'subject' => $row['subject'], + 'started' => array( + 'time' => timeformat($row['time_started']), + 'timestamp' => $row['time_started'], + 'href' => empty($row['ID_MEMBER_STARTED']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER_STARTED'], + 'link' => empty($row['ID_MEMBER_STARTED']) ? $row['name_started'] : '' . $row['name_started'] . '' + ), + 'updated' => array( + 'time' => timeformat($row['time_updated']), + 'timestamp' => $row['time_updated'], + 'href' => empty($row['ID_MEMBER_UPDATED']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER_UPDATED'], + 'link' => empty($row['ID_MEMBER_UPDATED']) ? $row['name_updated'] : '' . $row['name_updated'] . '' + ) + ); + $num_views += $row['numViews']; + $boards[] = $row['ID_BOARD']; + // If there's no poll, ID_POLL == 0. + if ($row['ID_POLL'] > 0) + $polls[] = $row['ID_POLL']; + // Store the ID_TOPIC with the lowest ID_FIRST_MSG. + if (empty($firstTopic)) + $firstTopic = $row['ID_TOPIC']; + + $isSticky = max($isSticky, $row['isSticky']); + } + mysql_free_result($request); + + $boards = array_values(array_unique($boards)); + + // Get the boards a user is allowed to merge in. + $merge_boards = boardsAllowedTo('merge_any'); + if (empty($merge_boards)) + fatal_lang_error('cannot_merge_any'); + + // Make sure they can see all boards.... + $request = db_query(" + SELECT b.ID_BOARD + FROM {$db_prefix}boards AS b + WHERE b.ID_BOARD IN (" . implode(', ', $boards) . ") + AND $user_info[query_see_board]" . (!in_array(0, $merge_boards) ? " + AND b.ID_BOARD IN (" . implode(', ', $merge_boards) . ")" : '') . " + LIMIT " . count($boards), __FILE__, __LINE__); + // If the number of boards that's in the output isn't exactly the same as we've put in there, you're in trouble. + if (mysql_num_rows($request) != count($boards)) + fatal_lang_error('smf232'); + mysql_free_result($request); + + if (empty($_POST['sa']) || (int) $_POST['sa'] != 2) + { + if (count($polls) > 1) + { + $request = db_query(" + SELECT t.ID_TOPIC, t.ID_POLL, m.subject, p.question + FROM {$db_prefix}polls AS p, {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE p.ID_POLL IN (" . implode(', ', $polls) . ") + AND t.ID_POLL = p.ID_POLL + AND m.ID_MSG = t.ID_FIRST_MSG + LIMIT " . count($polls), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $context['polls'][] = array( + 'id' => $row['ID_POLL'], + 'topic' => array( + 'id' => $row['ID_TOPIC'], + 'subject' => $row['subject'] + ), + 'question' => $row['question'], + 'selected' => $row['ID_TOPIC'] == $firstTopic + ); + mysql_free_result($request); + } + if (count($boards) > 1) + { + $request = db_query(" + SELECT ID_BOARD, name + FROM {$db_prefix}boards + WHERE ID_BOARD IN (" . implode(', ', $boards) . ") + ORDER BY name + LIMIT " . count($boards), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $context['boards'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['name'], + 'selected' => $row['ID_BOARD'] == $topic_data[$firstTopic]['board'] + ); + } + + $context['topics'] = $topic_data; + foreach ($topic_data as $id => $topic) + $context['topics'][$id]['selected'] = $topic['id'] == $firstTopic; + + $context['page_title'] = $txt['smf252']; + $context['sub_template'] = 'merge_extra_options'; + return; + } + + // Determine target board. + $target_board = count($boards) > 1 ? (int) $_POST['board'] : $boards[0]; + if (!in_array($target_board, $boards)) + fatal_lang_error('smf232'); + + // Determine which poll will survive and which polls won't. + $target_poll = count($polls) > 1 ? (int) $_POST['poll'] : (count($polls) == 1 ? $polls[0] : -1); + if ($target_poll > 0 && !in_array($target_poll, $polls)) + fatal_lang_error(1, false); + $deleted_polls = empty($target_poll) ? $polls : array_diff($polls, array($target_poll)); + + // Determine the subject of the newly merged topic - was a custom subject was filled in? + if (empty($_POST['subject']) && isset($_POST['custom_subject']) && $_POST['custom_subject'] != '') + $target_subject = preg_replace('~&#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', htmlspecialchars($_POST['custom_subject'])); + // A subject was selected... + elseif (!empty($topic_data[(int) $_POST['subject']]['subject'])) + $target_subject = addslashes($topic_data[(int) $_POST['subject']]['subject']); + // Nothing worked? Just take the subject of the first message. + else + $target_subject = addslashes($topic_data[$firstTopic]['subject']); + + // Get the first and last message and the number of messages.... + $request = db_query(" + SELECT MIN(ID_MSG), MAX(ID_MSG), COUNT(ID_MSG) - 1 + FROM {$db_prefix}messages + WHERE ID_TOPIC IN (" . implode(', ', $topics) . ")", __FILE__, __LINE__); + list ($first_msg, $last_msg, $num_replies) = mysql_fetch_row($request); + mysql_free_result($request); + + // Get the member ID of the first and last message. + $request = db_query(" + SELECT ID_MEMBER + FROM {$db_prefix}messages + WHERE ID_MSG IN ($first_msg, $last_msg) + ORDER BY ID_MSG + LIMIT 2", __FILE__, __LINE__); + list ($member_started) = mysql_fetch_row($request); + list ($member_updated) = mysql_fetch_row($request); + mysql_free_result($request); + + // Delete the old topics.... + db_query(" + DELETE FROM {$db_prefix}topics + WHERE ID_TOPIC IN (" . implode(', ', $topics) . ") + LIMIT " . count($topics), __FILE__, __LINE__); + + // Insert a new topic. + db_query(" + INSERT INTO {$db_prefix}topics + (ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_FIRST_MSG, ID_LAST_MSG, ID_POLL, numReplies, numViews, isSticky) + VALUES ($target_board, $member_started, $member_updated, $first_msg, $last_msg, $target_poll, $num_replies, $num_views, $isSticky)", __FILE__, __LINE__); + $ID_TOPIC = db_insert_id(); + + // Something went wrong creating the new topic. + if (empty($ID_TOPIC)) + fatal_lang_error('merge_create_topic_failed'); + + // Change the topic IDs of all messages that will be merged. Also adjust subjects if 'enforce subject' was checked. + db_query(" + UPDATE {$db_prefix}messages + SET ID_TOPIC = $ID_TOPIC, ID_BOARD = $target_board" . (!empty($_POST['enforce_subject']) ? ", subject = '$txt[response_prefix]$target_subject'" : '') . " + WHERE ID_TOPIC IN (" . implode(', ', $topics) . ")", __FILE__, __LINE__); + + // Change the subject of the first message. + db_query(" + UPDATE {$db_prefix}messages + SET subject = '$target_subject' + WHERE ID_MSG = $first_msg + LIMIT 1", __FILE__, __LINE__); + + // Adjust all calendar events to point to the new topic. + db_query(" + UPDATE {$db_prefix}calendar + SET ID_TOPIC = $ID_TOPIC, ID_BOARD = $target_board + WHERE ID_TOPIC IN (" . implode(', ', $topics) . ")", __FILE__, __LINE__); + + // Merge log topic entries. + $request = db_query(" + SELECT ID_MEMBER, MIN(logTime) AS newLogTime + FROM {$db_prefix}log_topics + WHERE ID_TOPIC IN (" . implode(', ', $topics) . ") + GROUP BY ID_MEMBER", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + { + $insertEntries = array(); + while ($row = mysql_fetch_assoc($request)) + $insertEntries[] = "($row[ID_MEMBER], $ID_TOPIC, $row[newLogTime])"; + + db_query(" + REPLACE INTO {$db_prefix}log_topics + (ID_MEMBER, ID_TOPIC, logTime) + VALUES " . implode(', ', $insertEntries), __FILE__, __LINE__); + unset($insertEntries); + + // Get rid of the old log entries. + db_query(" + DELETE FROM {$db_prefix}log_topics + WHERE ID_TOPIC IN (" . implode(', ', $topics) . ")", __FILE__, __LINE__); + } + mysql_free_result($request); + + // Merge topic notifications. + if (!empty($_POST['notifications']) && is_array($_POST['notifications'])) + { + // Check if the notification array contains valid topics. + if (count(array_diff($_POST['notifications'], $topics)) > 0) + fatal_lang_error('smf232'); + $request = db_query(" + SELECT ID_MEMBER, MAX(sent) AS sent + FROM {$db_prefix}log_notify + WHERE ID_TOPIC IN (" . implode(', ', $_POST['notifications']) . ") + GROUP BY ID_MEMBER", __FILE__, __LINE__); + if (mysql_num_rows($request) > 0) + { + $insertEntries = array(); + while ($row = mysql_fetch_assoc($request)) + $insertEntries[] = "($row[ID_MEMBER], $ID_TOPIC, 0, $row[sent])"; + + db_query(" + INSERT INTO {$db_prefix}log_notify + (ID_MEMBER, ID_TOPIC, ID_BOARD, sent) + VALUES " . implode(', ', $insertEntries), __FILE__, __LINE__); + unset($insertEntries); + + db_query(" + DELETE FROM {$db_prefix}log_topics + WHERE ID_TOPIC IN (" . implode(', ', $topics) . ")", __FILE__, __LINE__); + } + mysql_free_result($request); + } + + // Get rid of the redundant polls. + if (!empty($deleted_polls)) + { + db_query(" + DELETE FROM {$db_prefix}polls + WHERE ID_POLL IN (" . implode(', ', $deleted_polls) . ") + LIMIT 1", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}poll_choices + WHERE ID_POLL IN (" . implode(', ', $deleted_polls) . ")", __FILE__, __LINE__); + db_query(" + DELETE FROM {$db_prefix}log_polls + WHERE ID_POLL IN (" . implode(', ', $deleted_polls) . ")", __FILE__, __LINE__); + } + + // Fix the board totals. + if (count($boards) > 1) + { + $request = db_query(" + SELECT ID_BOARD, COUNT(ID_TOPIC) AS numTopics, SUM(numReplies) + COUNT(ID_TOPIC) AS numPosts + FROM {$db_prefix}topics + WHERE ID_BOARD IN (" . implode(', ', $boards) . ") + GROUP BY ID_BOARD + LIMIT " . count($boards), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = $row[numPosts], numTopics = $row[numTopics] + WHERE ID_BOARD = $row[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + mysql_free_result($request); + } + else + db_query(" + UPDATE {$db_prefix}boards + SET numTopics = numTopics - " . (count($topics) - 1) . " + WHERE ID_BOARD = $target_board + LIMIT 1", __FILE__, __LINE__); + + // Update all the statistics. + updateStats('topic'); + updateLastMessages($boards); + + logAction('merge', array('topic' => $ID_TOPIC)); + // Notify people that these topics have been merged? + require_once($sourcedir . '/Subs-Post.php'); + sendNotifications($ID_TOPIC, 'merge'); + + // Send them to the all done page. + redirectexit('action=mergetopics;sa=3;to=' . $ID_TOPIC . ';targetboard=' . $target_board); +} + +// Tell the user the move was done properly. +function MergeTopics3() +{ + global $txt, $context; + + // Make sure the template knows everything... + $context['target_board'] = $_GET['targetboard']; + $context['target_topic'] = $_GET['to']; + + $context['page_title'] = $txt['smf252']; + $context['sub_template'] = 'merge_done'; +} + + +// "link" topics: make one related to another, so users will get a number of +// "Related topics" links +function LinkTopics() +{ + // Load the template.... + loadTemplate('SplitTopics'); + + // ?action=splittopics;sa=LETSBREAKIT won't work, sorry. + if (!isset($_REQUEST['sa']) || !is_numeric($_REQUEST['sa']) || $_REQUEST['sa'] < 1 || $_REQUEST['sa'] > 4) + $subAction = 'LinkTopics1'; + else + $subAction = 'LinkTopics' . (int) $_REQUEST['sa']; + + $subAction(); +} + +// +function LinkTopics1() +{ + global $txt, $board, $context; + global $scripturl, $topic, $db_prefix, $user_info, $modSettings; + + $_REQUEST['targetboard'] = isset($_REQUEST['targetboard']) ? (int) $_REQUEST['targetboard'] : $board; + $context['target_board'] = $_REQUEST['targetboard']; + + // How many topics are on this board? (used for paging.) + $request = db_query(" + SELECT COUNT(ID_TOPIC) + FROM {$db_prefix}topics + WHERE ID_BOARD = $_REQUEST[targetboard]", __FILE__, __LINE__); + list ($topiccount) = mysql_fetch_row($request); + mysql_free_result($request); + + // Make the page list. + $context['page_index'] = constructPageIndex($scripturl . '?action=linktopics;from=' . $_GET['from'] . ';targetboard=' . $_REQUEST['targetboard'] . ';board=' . $board, $_REQUEST['start'], $topiccount, $modSettings['defaultMaxTopics'], true); + + // Get the topic's subject. + $request = db_query(" + SELECT m.subject + FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t + WHERE m.ID_MSG = t.ID_FIRST_MSG + AND t.ID_TOPIC = $_GET[from] + AND t.ID_BOARD = $board + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($request) == 0) + fatal_lang_error('smf232'); + list ($subject) = mysql_fetch_row($request); + mysql_free_result($request); + + // Tell the template a few things.. + $context['origin_topic'] = $_GET['from']; + $context['origin_subject'] = $subject; + $context['origin_js_subject'] = addcslashes(addslashes($subject), '/'); + $context['page_title'] = $txt['smf252']; + + // Check which boards you have merge permissions on. + $merge_boards = boardsAllowedTo('merge_any'); + + if (empty($merge_boards)) + fatal_lang_error('cannot_merge_any'); + + // Get a list of boards they can navigate to to merge. + $request = db_query(" + SELECT b.ID_BOARD, b.name AS bName, c.name AS cName + FROM {$db_prefix}boards AS b, {$db_prefix}categories AS c + WHERE b.ID_CAT = c.ID_CAT + AND $user_info[query_see_board]" . (!in_array(0, $merge_boards) ? " + AND b.ID_BOARD IN (" . implode(', ', $merge_boards) . ")" : '') . " + ORDER BY c.catOrder, b.boardOrder", __FILE__, __LINE__); + $context['boards'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['boards'][] = array( + 'id' => $row['ID_BOARD'], + 'name' => $row['bName'], + 'category' => $row['cName'] + ); + mysql_free_result($request); + + // Get some topics to merge it with. + $request = db_query(" + SELECT t.ID_TOPIC, m.subject, m.ID_MEMBER, IFNULL(mem.realName, m.posterName) AS posterName + FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m, {$db_prefix}messages AS m2) + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE m.ID_MSG = t.ID_FIRST_MSG + AND m2.ID_MSG = t.ID_LAST_MSG + AND t.ID_BOARD = $_REQUEST[targetboard] + AND t.ID_TOPIC != $_GET[from] + ORDER BY " . (!empty($modSettings['enableStickyTopics']) ? 't.isSticky DESC, ' : '') . "m2.posterTime DESC + LIMIT $_REQUEST[start], $modSettings[defaultMaxTopics]", __FILE__, __LINE__); + $context['topics'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + censorText($row['subject']); + + $context['topics'][] = array( + 'id' => $row['ID_TOPIC'], + 'poster' => array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['posterName'], + 'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '' . $row['posterName'] . '' + ), + 'subject' => $row['subject'], + 'js_subject' => addcslashes(addslashes($row['subject']), '/') + ); + } + + $context['sub_template'] = 'link'; +} + +// Now that the topic IDs are known, do the proper linking. +function LinkTopics2($topics = array()) +{ + global $db_prefix, $user_info, $txt, $context, $scripturl, $sourcedir; + + // The parameters of MergeTopics2 were set, so this must've been an internal call. + if (!empty($topics)) + { + isAllowedTo('merge_any'); + loadTemplate('SplitTopics'); + } + + // Handle URLs from MergeTopics1. + if (!empty($_GET['from']) && !empty($_GET['to'])) + $topics = array($_GET['from'], $_GET['to']); + + // If we came from a form, the topic IDs came by post. + if (!empty($_POST['topics']) && is_array($_POST['topics'])) + $topics = $_POST['topics']; + + // There's nothing to merge with just one topic... + if (empty($topics) || !is_array($topics) || count($topics) == 1) + fatal_lang_error('merge_need_more_topics'); + + // Make sure every topic is numeric, or some nasty things could be done with the DB. + foreach ($topics as $id => $topic) + $topics[$id] = (int) $topic; + + + $request=db_query(" + SELECT ID_TOPIC FROM {$db_prefix}topics + WHERE ID_TOPIC IN (". implode(",",$topics).")" + ,__FILE__, __LINE__); + + if(mysql_num_rows($request)!=2) + fatal_lang_error('merge_need_more_topics'); + + db_query(" + INSERT INTO {$db_prefix}related_topics + VALUES({$topics[0]}, {$topics[1]})", + __FILE__, __LINE__); + + logAction('link', array('topic' => $ID_TOPIC)); + + // Send them to the all done page. + redirectexit('action=linktopics;sa=3;to=' . $topics[0] . ';targetboard=' . $_GET['targetboard']); +} + +// Tell the user the move was done properly. +function LinkTopics3() +{ + global $txt, $context; + + // Make sure the template knows everything... + $context['target_board'] = $_GET['targetboard']; + $context['target_topic'] = $_GET['to']; + + $context['page_title'] = $txt['smf252']; + $context['sub_template'] = 'merge_done'; +} + +?> \ No newline at end of file diff --git a/Sources/Stats.php b/Sources/Stats.php new file mode 100644 index 0000000..cb60285 --- /dev/null +++ b/Sources/Stats.php @@ -0,0 +1,415 @@ + $scripturl . '?action=stats', + 'name' => $txt['smf_stats_1'] + ); + $context['page_title'] = $context['forum_name'] . ' - ' . $txt['smf_stats_1']; + + $context['show_member_list'] = allowedTo('view_mlist'); + + // Get averages... + $result = db_query(" + SELECT + SUM(posts) AS posts, SUM(topics) AS topics, SUM(registers) AS registers, + SUM(mostOn) AS mostOn, MIN(date) AS date + FROM {$db_prefix}log_activity", __FILE__, __LINE__); + $row = mysql_fetch_assoc($result); + mysql_free_result($result); + + // This would be the amount of time the forum has been up... in days... + $total_days_up = ceil((time() - strtotime($row['date'])) / (60 * 60 * 24)); + + $context['average_posts'] = round($row['posts'] / $total_days_up, 2); + $context['average_topics'] = round($row['topics'] / $total_days_up, 2); + $context['average_members'] = round($row['registers'] / $total_days_up, 2); + $context['average_online'] = round($row['mostOn'] / $total_days_up, 2); + + // How many users are online now. + $result = db_query(" + SELECT COUNT(session) + FROM {$db_prefix}log_online", __FILE__, __LINE__); + list ($context['users_online']) = mysql_fetch_row($result); + mysql_free_result($result); + + // Statistics such as number of boards, categories, etc. + $result = db_query(" + SELECT COUNT(b.ID_BOARD) + FROM {$db_prefix}boards AS b", __FILE__, __LINE__); + list ($context['num_boards']) = mysql_fetch_row($result); + mysql_free_result($result); + + $result = db_query(" + SELECT COUNT(c.ID_CAT) + FROM {$db_prefix}categories AS c", __FILE__, __LINE__); + list ($context['num_categories']) = mysql_fetch_row($result); + mysql_free_result($result); + + $context['num_members'] = &$modSettings['memberCount']; + $context['num_posts'] = &$modSettings['totalMessages']; + $context['num_topics'] = &$modSettings['totalTopics']; + $context['most_members_online'] = array( + 'number' => &$modSettings['mostOnline'], + 'date' => timeformat($modSettings['mostDate']) + ); + $context['latest_member'] = array( + 'name' => $modSettings['latestRealName'], + 'id' => $modSettings['latestMember'], + 'href' => $scripturl . '?action=profile;u=' . $modSettings['latestMember'], + 'link' => '' . $modSettings['latestRealName'] . '' + ); + + // Male vs. female ratio. + $result = db_query(" + SELECT COUNT(ID_MEMBER) AS memberCount, gender + FROM {$db_prefix}members + GROUP BY gender", __FILE__, __LINE__); + $context['gender'] = array(); + while ($row = mysql_fetch_assoc($result)) + { + // Assuming we're telling... male or female? + if (!empty($row['gender'])) + $context['gender'][$row['gender'] == 2 ? 'females' : 'males'] = $row['memberCount']; + } + mysql_free_result($result); + + if (empty($context['gender']['males'])) + $context['gender']['males'] = 0; + if (empty($context['gender']['females'])) + $context['gender']['females'] = 0; + + // Try and come up with some "sensible" default states in case of a non-mixed board. + if ($context['gender']['males'] == $context['gender']['females']) + $context['gender']['ratio'] = '1:1'; + elseif ($context['gender']['males'] == 0) + $context['gender']['ratio'] = '0:1'; + elseif ($context['gender']['females'] == 0) + $context['gender']['ratio'] = '1:0'; + elseif ($context['gender']['males'] > $context['gender']['females']) + $context['gender']['ratio'] = round($context['gender']['males'] / $context['gender']['females'], 1) . ':1'; + elseif ($context['gender']['females'] > $context['gender']['males']) + $context['gender']['ratio'] = '1:' . round($context['gender']['females'] / $context['gender']['males'], 1); + + $date = strftime('%Y%m%d', forum_time(false)); + + // Members online so far today. + $result = db_query(" + SELECT mostOn + FROM {$db_prefix}log_activity + WHERE date = $date + LIMIT 1", __FILE__, __LINE__); + list ($context['online_today']) = mysql_fetch_row($result); + mysql_free_result($result); + + // Poster top 10. + $members_result = db_query(" + SELECT ID_MEMBER, realName, posts + FROM {$db_prefix}members + WHERE posts > 0 + ORDER BY posts DESC + LIMIT 10", __FILE__, __LINE__); + $context['top_posters'] = array(); + $max_num_posts = 1; + while ($row_members = mysql_fetch_assoc($members_result)) + { + $context['top_posters'][] = array( + 'name' => $row_members['realName'], + 'id' => $row_members['ID_MEMBER'], + 'num_posts' => $row_members['posts'], + 'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'], + 'link' => '' . $row_members['realName'] . '' + ); + + if ($max_num_posts < $row_members['posts']) + $max_num_posts = $row_members['posts']; + } + foreach ($context['top_posters'] as $i => $poster) + $context['top_posters'][$i]['post_percent'] = round(($poster['num_posts'] * 100) / $max_num_posts); + + // Board top 10. + $boards_result = db_query(" + SELECT ID_BOARD, name, numPosts + FROM {$db_prefix}boards AS b + WHERE $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " + AND b.ID_BOARD != $modSettings[recycle_board]" : '') . " + ORDER BY numPosts DESC + LIMIT 10", __FILE__, __LINE__); + $context['top_boards'] = array(); + $max_num_posts = 1; + while ($row_board = mysql_fetch_assoc($boards_result)) + { + $context['top_boards'][] = array( + 'id' => $row_board['ID_BOARD'], + 'name' => $row_board['name'], + 'num_posts' => $row_board['numPosts'], + 'href' => $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0', + 'link' => '' . $row_board['name'] . '' + ); + + if ($max_num_posts < $row_board['numPosts']) + $max_num_posts = $row_board['numPosts']; + } + foreach ($context['top_boards'] as $i => $board) + $context['top_boards'][$i]['post_percent'] = round(($board['num_posts'] * 100) / $max_num_posts); + + // Topic replies top 10. + $topic_reply_result = db_query(" + SELECT m.subject, t.numReplies, t.ID_BOARD, t.ID_TOPIC, b.name + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m, {$db_prefix}boards AS b + WHERE m.ID_MSG = t.ID_FIRST_MSG + AND $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " + AND b.ID_BOARD != $modSettings[recycle_board]" : '') . " + AND t.ID_BOARD = b.ID_BOARD + ORDER BY t.numReplies DESC + LIMIT 10", __FILE__, __LINE__); + $context['top_topics_replies'] = array(); + $max_num_replies = 1; + while ($row_topic_reply = mysql_fetch_assoc($topic_reply_result)) + { + censorText($row_topic_reply['subject']); + + $context['top_topics_replies'][] = array( + 'id' => $row_topic_reply['ID_TOPIC'], + 'board' => array( + 'id' => $row_topic_reply['ID_BOARD'], + 'name' => $row_topic_reply['name'], + 'href' => $scripturl . '?board=' . $row_topic_reply['ID_BOARD'] . '.0', + 'link' => '' . $row_topic_reply['name'] . '' + ), + 'subject' => $row_topic_reply['subject'], + 'num_replies' => $row_topic_reply['numReplies'], + 'href' => $scripturl . '?topic=' . $row_topic_reply['ID_TOPIC'] . '.0', + 'link' => '' . $row_topic_reply['subject'] . '' + ); + + if ($max_num_replies < $row_topic_reply['numReplies']) + $max_num_replies = $row_topic_reply['numReplies']; + } + foreach ($context['top_topics_replies'] as $i => $topic) + $context['top_topics_replies'][$i]['post_percent'] = round(($topic['num_replies'] * 100) / $max_num_replies); + + // Topic views top 10. + $topic_view_result = db_query(" + SELECT m.subject, t.numViews, t.ID_BOARD, t.ID_TOPIC, b.name + FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m, {$db_prefix}boards AS b + WHERE m.ID_MSG = t.ID_FIRST_MSG + AND $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " + AND b.ID_BOARD != $modSettings[recycle_board]" : '') . " + AND t.ID_BOARD = b.ID_BOARD + ORDER BY t.numViews DESC + LIMIT 10", __FILE__, __LINE__); + $context['top_topics_views'] = array(); + $max_num_views = 1; + while ($row_topic_views = mysql_fetch_assoc($topic_view_result)) + { + censorText($row_topic_views['subject']); + + $context['top_topics_views'][] = array( + 'id' => $row_topic_views['ID_TOPIC'], + 'board' => array( + 'id' => $row_topic_views['ID_BOARD'], + 'name' => $row_topic_views['name'], + 'href' => $scripturl . '?board=' . $row_topic_views['ID_BOARD'] . '.0', + 'link' => '' . $row_topic_views['name'] . '' + ), + 'subject' => $row_topic_views['subject'], + 'num_views' => $row_topic_views['numViews'], + 'href' => $scripturl . '?topic=' . $row_topic_views['ID_TOPIC'] . '.0', + 'link' => '' . $row_topic_views['subject'] . '' + ); + + if ($max_num_views < $row_topic_views['numViews']) + $max_num_views = $row_topic_views['numViews']; + } + foreach ($context['top_topics_views'] as $i => $topic) + $context['top_topics_views'][$i]['post_percent'] = round(($topic['num_views'] * 100) / $max_num_views); + + // Topic poster top 10. + $members_result = db_query(" + SELECT t.ID_MEMBER_STARTED, COUNT(t.ID_TOPIC) AS hits, mem.realName + FROM {$db_prefix}topics AS t, {$db_prefix}members AS mem + WHERE t.ID_MEMBER_STARTED = mem.ID_MEMBER" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " + AND t.ID_BOARD != $modSettings[recycle_board]" : '') . " + GROUP BY t.ID_MEMBER_STARTED + ORDER BY hits DESC + LIMIT 10", __FILE__, __LINE__); + $context['top_starters'] = array(); + $max_num_topics = 1; + while ($row_members = mysql_fetch_assoc($members_result)) + { + $context['top_starters'][] = array( + 'name' => $row_members['realName'], + 'id' => $row_members['ID_MEMBER_STARTED'], + 'num_topics' => $row_members['hits'], + 'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER_STARTED'], + 'link' => '' . $row_members['realName'] . '' + ); + + if ($max_num_topics < $row_members['hits']) + $max_num_topics = $row_members['hits']; + } + foreach ($context['top_starters'] as $i => $topic) + $context['top_starters'][$i]['post_percent'] = round(($topic['num_topics'] * 100) / $max_num_topics); + + // Time online top 10. + $members_result = db_query(" + SELECT ID_MEMBER, realName, totalTimeLoggedIn + FROM {$db_prefix}members + ORDER BY totalTimeLoggedIn DESC + LIMIT 10", __FILE__, __LINE__); + $context['top_time_online'] = array(); + $max_time_online = 1; + while ($row_members = mysql_fetch_assoc($members_result)) + { + // Figure out the days, hours and minutes. + $timeDays = floor($row_members['totalTimeLoggedIn'] / 86400); + $timeHours = floor(($row_members['totalTimeLoggedIn'] % 86400) / 3600); + + // Figure out which things to show... (days, hours, minutes, etc.) + $timelogged = ''; + if ($timeDays > 0) + $timelogged .= $timeDays . $txt['totalTimeLogged5']; + if ($timeHours > 0) + $timelogged .= $timeHours . $txt['totalTimeLogged6']; + $timelogged .= floor(($row_members['totalTimeLoggedIn'] % 3600) / 60) . $txt['totalTimeLogged7']; + + $context['top_time_online'][] = array( + 'id' => $row_members['ID_MEMBER'], + 'name' => $row_members['realName'], + 'time_online' => $timelogged, + 'seconds_online' => $row_members['totalTimeLoggedIn'], + 'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'], + 'link' => '' . $row_members['realName'] . '' + ); + + if ($max_time_online < $row_members['totalTimeLoggedIn']) + $max_time_online = $row_members['totalTimeLoggedIn']; + } + foreach ($context['top_time_online'] as $i => $member) + $context['top_time_online'][$i]['time_percent'] = round(($member['seconds_online'] * 100) / $max_time_online); + + if (!empty($_REQUEST['expand'])) + { + $month = (int) substr($_REQUEST['expand'], 4); + $year = (int) substr($_REQUEST['expand'], 0, 4); + if ($year > 1900 && $year < 2200 && $month >= 1 && $month <= 12) + $_SESSION['expanded_stats'][$year][] = $month; + } + elseif (!empty($_REQUEST['collapse'])) + { + $month = (int) substr($_REQUEST['collapse'], 4); + $year = (int) substr($_REQUEST['collapse'], 0, 4); + if (!empty($_SESSION['expanded_stats'][$year])) + $_SESSION['expanded_stats'][$year] = array_diff($_SESSION['expanded_stats'][$year], array($month)); + } + + // Activity by month. + $months_result = db_query(" + SELECT + YEAR(date) AS stats_year, MONTH(date) AS stats_month, SUM(hits) AS hits, SUM(registers) AS registers, SUM(topics) AS topics, SUM(posts) AS posts, + MAX(mostOn) AS mostOn + FROM {$db_prefix}log_activity + GROUP BY stats_year, stats_month", __FILE__, __LINE__); + $context['monthly'] = array(); + while ($row_months = mysql_fetch_assoc($months_result)) + { + $ID_MONTH = $row_months['stats_year'] . str_pad($row_months['stats_month'], 2, '0', STR_PAD_LEFT); + $expanded = !empty($_SESSION['expanded_stats'][$row_months['stats_year']]) && in_array($row_months['stats_month'], $_SESSION['expanded_stats'][$row_months['stats_year']]); + + $context['monthly'][$ID_MONTH] = array( + 'date' => array( + 'month' => str_pad($row_months['stats_month'], 2, '0', STR_PAD_LEFT), + 'year' => $row_months['stats_year'] + ), + 'href' => $scripturl . '?action=stats;' . ($expanded ? 'collapse' : 'expand') . '=' . $ID_MONTH . '#' . $ID_MONTH, + 'link' => '' . $months[$row_months['stats_month']] . ' ' . $row_months['stats_year'] . '', + 'month' => $months[$row_months['stats_month']], + 'new_topics' => $row_months['topics'], + 'new_posts' => $row_months['posts'], + 'new_members' => $row_months['registers'], + 'most_members_online' => $row_months['mostOn'], + 'hits' => $row_months['hits'], + 'days' => array(), + 'expanded' => $expanded + ); + } + + // This gets rid of the filesort on the query ;). + krsort($context['monthly']); + + if (empty($_SESSION['expanded_stats'])) + return; + + $condition = array(); + foreach ($_SESSION['expanded_stats'] as $year => $months) + if (!empty($months)) + $condition[] = "YEAR(date) = $year AND MONTH(date) IN (" . implode(', ', $months) . ')'; + + if (empty($condition)) + return; + + // Activity by day. + $days_result = db_query(" + SELECT YEAR(date) AS stats_year, MONTH(date) AS stats_month, DAYOFMONTH(date) AS stats_day, topics, posts, registers, mostOn, hits + FROM {$db_prefix}log_activity + WHERE " . implode(' + OR ', $condition) ." + ORDER BY stats_day ASC", __FILE__, __LINE__); + while ($row_days = mysql_fetch_assoc($days_result)) + $context['monthly'][$row_days['stats_year'] . str_pad($row_days['stats_month'], 2, '0', STR_PAD_LEFT)]['days'][] = array( + 'day' => str_pad($row_days['stats_day'], 2, '0', STR_PAD_LEFT), + 'month' => str_pad($row_days['stats_month'], 2, '0', STR_PAD_LEFT), + 'year' => $row_days['stats_year'], + 'new_topics' => $row_days['topics'], + 'new_posts' => $row_days['posts'], + 'new_members' => $row_days['registers'], + 'most_members_online' => $row_days['mostOn'], + 'hits' => $row_days['hits'] + ); +} + +?> diff --git a/Sources/Subs-Auth.php b/Sources/Subs-Auth.php new file mode 100644 index 0000000..2129b54 --- /dev/null +++ b/Sources/Subs-Auth.php @@ -0,0 +1,403 @@ + $v) + $context['get_data'] .= $k . '=' . $v . ';'; + $context['get_data'] = substr($context['get_data'], 0, -1); + + // They used a wrong password, log it and unset that. + if (isset($_POST['admin_pass'])) + { + log_error($txt['security_wrong']); + unset($_POST['admin_pass']); + } + + // Now go through $_POST. Make sure the session hash is sent. + $_POST['sc'] = $context['session_id']; + foreach ($_POST as $k => $v) + $context['post_data'] .= adminLogin_outputPostVars($k, $v); + + // Now we'll use the admin_login sub template of the Login template. + $context['sub_template'] = 'admin_login'; + + // And title the page something like "Login". + if (!isset($context['page_title'])) + $context['page_title'] = $txt[34]; + + obExit(); +} + +function adminLogin_outputPostVars($k, $v) +{ + if (!is_array($v)) + return ' +'; + else + { + $ret = ''; + foreach ($v as $k2 => $v2) + $ret .= adminLogin_outputPostVars($k . '[' . $k2 . ']', $v2); + + return $ret; + } +} + +// Show an error message for the connection problems. +function show_db_error() +{ + global $db_last_error, $sourcedir, $mbname, $maintenance, $mtitle, $mmessage, $db_error_send, $db_connection, $webmaster_email; + + // Don't cache this page! + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + header('Cache-Control: no-cache'); + + if ($db_last_error < time() - 3600 * 24 * 3 && empty($maintenance) && !empty($db_error_send)) + { + require_once($sourcedir . '/Admin.php'); + updateSettingsFile(array('db_last_error' => time())); + + // Languages files aren't loaded yet :(. + //@mail($webmaster_email, $mbname . ': SMF Database Error!', "There has been a problem with the database!\nMySQL reported:\n" . mysql_error($db_connection)); + } + + if (!empty($maintenance)) + echo ' + + + ', $mtitle, ' + + +

    ', $mtitle, '

    + ', $mmessage, ' + +'; + // What to do? Language files haven't and can't be loaded yet... + else + echo ' + + + Connection Problems. + + +

    Connection Problems

    + Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later. + +'; + + die; +} + +// Find members by email address, username, or real name. +function findMembers($names, $use_wildcards = false) +{ + global $db_prefix, $scripturl, $user_info, $modSettings; + + // If it's not already an array, make it one. + if (!is_array($names)) + $names = explode(',', $names); + + foreach ($names as $i => $name) + { + // Add slashes, trim, and fix wildcards for each name. + $names[$i] = addslashes(trim(strtolower($name))); + + // Make it so standard wildcards will work. (* and ?) + if ($use_wildcards) + $names[$i] = strtr($names[$i],array('%' => '\%', '_' => '\_', '*' => '%', '?' => '_')); + } + + // Nothing found yet. + $results = array(); + + // This ensures you can't search someones email address if you can't see it. + $condition = $user_info['is_admin'] || empty($modSettings['allow_hideEmail']) ? '' : 'hideEmail = 0 AND'; + + // Search by username, display name, and email address. + $request = db_query(" + SELECT ID_MEMBER, memberName, realName, emailAddress, hideEmail + FROM {$db_prefix}members" . ($use_wildcards ? " + WHERE memberName LIKE '" . implode("' + OR memberName LIKE '", $names) . "' + OR realName LIKE '" . implode("' + OR realName LIKE '", $names) . "' + OR ($condition emailAddress LIKE '" . implode("') + OR ($condition emailAddress LIKE '", $names) . "')" : " + WHERE memberName IN ('" . implode("', '", $names) . "') + OR realName IN ('" . implode("', '", $names) . "') + OR ($condition emailAddress IN ('" . implode("', '", $names) . "'))"), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $results[$row['ID_MEMBER']] = array( + 'id' => $row['ID_MEMBER'], + 'name' => $row['realName'], + 'username' => $row['memberName'], + 'email' => empty($row['hideEmail']) || empty($modSettings['allow_hideEmail']) || $user_info['is_admin'] ? $row['emailAddress'] : '', + 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], + 'link' => '' . $row['realName'] . '' + ); + } + mysql_free_result($request); + + // Return all the results. + return $results; +} + +function JSMembers() +{ + global $db_prefix, $context, $scripturl; + + checkSession('get'); + + // Why is this in the Help template, you ask? Well, erm... it helps you. Does that work? + loadTemplate('Help'); + + $context['template_layers'] = array(); + $context['sub_template'] = 'find_members'; + + if (isset($_REQUEST['search'])) + $context['last_search'] = htmlspecialchars(stripslashes($_REQUEST['search']), ENT_QUOTES); + else + $_REQUEST['start'] = 0; + + // Allow the user to pass the input to be added to to the box. + $context['input_box_name'] = isset($_REQUEST['input']) ? $_REQUEST['input'] : 'to'; + + // Take the delimiter over GET in case it's \n or something. + $context['delimiter'] = isset($_REQUEST['delim']) ? stripslashes($_REQUEST['delim']) : ', '; + $context['quote_results'] = !empty($_REQUEST['quote']); + + // List all the results. + $context['results'] = array(); + + // If the user has done a search, well - search. + if (isset($_REQUEST['search'])) + { + $_REQUEST['search'] = addslashes(htmlspecialchars(stripslashes($_REQUEST['search']), ENT_QUOTES)); + $context['results'] = findMembers(array($_REQUEST['search']), true); + $total_results = count($context['results']); + + $context['page_index'] = constructPageIndex($scripturl . '?action=findmember;search=' . $context['last_search'] . ';sesc=' . $context['session_id'] . ';input=' . $context['input_box_name'] . ($context['quote_results'] ? ';quote' : ''), $_REQUEST['start'], $total_results, 7); + + $context['results'] = array_slice($context['results'], $_REQUEST['start'], 7); + } +} + +// This function generates a random password for a user and emails it to them. +function resetPassword($memID, $username = null) +{ + global $db_prefix, $scripturl, $context, $txt, $sourcedir; + + // Language... and a required file. + loadLanguage('Login'); + require_once($sourcedir . '/Subs-Post.php'); + + // Get some important details. + $request = db_query(" + SELECT memberName, emailAddress + FROM {$db_prefix}members + WHERE ID_MEMBER = $memID", __FILE__, __LINE__); + list ($user, $email) = mysql_fetch_row($request); + mysql_free_result($request); + + if ($username !== null) + $user = trim($username); + + // Generate a random password. + $newPassword = substr(preg_replace('/\W/', '', md5(rand())), 0, 10); + $newPassword_md5 = md5_hmac($newPassword, strtolower($user)); + + // Do some checks on the username if needed. + if ($username !== null) + { + // No name?! How can you register with no name? + if ($user == '') + fatal_lang_error(37, false); + + // Only these characters are permitted. + if (in_array($user, array('_', '|')) || preg_match('~[<>&"\'=\\\]~', $user) != 0 || strpos($user, '[code]') !== false || strpos($user, '[/code]') !== false) + fatal_lang_error(240, false); + + if (stristr($user, $txt[28]) !== false) + fatal_lang_error(244, true, array($txt[28])); + + if (isReservedName($user, $memID, false)) + fatal_error('(' . htmlspecialchars($user) . ') ' . $txt[473], false); + + // Update the database... + updateMemberData($memID, array('memberName' => '\'' . $user . '\'', 'passwd' => '\'' . $newPassword_md5 . '\'')); + } + else + updateMemberData($memID, array('passwd' => '\'' . $newPassword_md5 . '\'')); + + // Send them the email informing them of the change - then we're done! + sendmail($email, $txt['change_password'], + "$txt[hello_member] $user!\n\n" . + "$txt[change_password_1] $context[forum_name] $txt[change_password_2]\n\n" . + "$txt[719]$user, $txt[492] $newPassword\n\n" . + "$txt[701]\n" . + "$scripturl?action=profile\n\n" . + $txt[130]); +} + +?> \ No newline at end of file diff --git a/Sources/Subs-Boards.php b/Sources/Subs-Boards.php new file mode 100644 index 0000000..9e257c2 --- /dev/null +++ b/Sources/Subs-Boards.php @@ -0,0 +1,592 @@ + 0) + { + $boards = array(); + while ($row = mysql_fetch_assoc($result)) + $boards[] = $row['ID_BOARD']; + + markBoardsRead($boards, isset($_REQUEST['unread'])); + } + mysql_free_result($result); + + $_SESSION['ID_MSG_LAST_VISIT'] = $modSettings['maxMsgID']; + if (!empty($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'action=unread') !== false) + redirectexit('action=unread'); + + redirectexit(); + } + elseif (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'unreadreplies') + { + // Make sure all the boards are integers! + $topics = explode('-', $_REQUEST['topics']); + + $setString = ''; + foreach ($topics as $ID_TOPIC) + { + $ID_TOPIC = (int) $ID_TOPIC; + $setString .= " + (" . time() . ", $ID_MEMBER, $ID_TOPIC),"; + } + + db_query(" + REPLACE INTO {$db_prefix}log_topics + (logTime, ID_MEMBER, ID_TOPIC) + VALUES" . substr($setString, 0, -1), __FILE__, __LINE__); + + redirectexit('action=unreadreplies'); + } + // Special case: mark a topic unread! + elseif (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'topic') + { + $result = db_query(" + SELECT posterTime + FROM {$db_prefix}messages + WHERE ID_TOPIC = $topic + ORDER BY ID_MSG + LIMIT " . (int) $_REQUEST['start'] . ", 1", __FILE__, __LINE__); + list ($earlyTime) = mysql_fetch_row($result); + mysql_free_result($result); + + // Use a time one second earlier than the first time: blam, unread! + db_query(" + REPLACE INTO {$db_prefix}log_topics + (logTime, ID_MEMBER, ID_TOPIC) + VALUES ($earlyTime - 1, $ID_MEMBER, $topic)", __FILE__, __LINE__); + + redirectexit('board=' . $board . '.0'); + } + else + { + if (empty($board)) + redirectexit(); + + markBoardsRead(array($board), isset($_REQUEST['unread'])); + + if (!isset($_REQUEST['unread'])) + { + // Find all the boards this user can see. + $result = db_query(" + SELECT b.ID_BOARD + FROM {$db_prefix}boards AS b + WHERE b.ID_PARENT = $board + AND childLevel = " . ($board_info['child_level'] + 1) . " + AND $user_info[query_see_board]", __FILE__, __LINE__); + if (mysql_num_rows($result) > 0) + { + $setString = ''; + while ($row = mysql_fetch_assoc($result)) + $setString .= ' + (' . time() . ', ' . $ID_MEMBER . ', ' . $row['ID_BOARD'] . '),'; + + db_query(" + REPLACE INTO {$db_prefix}log_boards + (logTime, ID_MEMBER, ID_BOARD) + VALUES" . substr($setString, 0, -1), __FILE__, __LINE__); + } + mysql_free_result($result); + + //redirectexit('board=' . $board . '.0'); + if (empty($board_info['parent'])) + redirectexit(); + else + redirectexit('board=' . $board_info['parent'] . '.0'); + } + else + { + if (empty($board_info['parent'])) + redirectexit(); + else + redirectexit('board=' . $board_info['parent'] . '.0'); + } + } +} + +// Get the ID_MEMBER associated with the specified message. +function getMsgMemberID($messageID) +{ + global $db_prefix; + + // Find the topic and make sure the member still exists. + $result = db_query(" + SELECT IFNULL(mem.ID_MEMBER, 0) + FROM {$db_prefix}messages AS m + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) + WHERE m.ID_MSG = " . (int) $messageID . " + LIMIT 1", __FILE__, __LINE__); + if (mysql_num_rows($result) > 0) + list ($memberID) = mysql_fetch_row($result); + // The message doesn't even exist. + else + $memberID = 0; + mysql_free_result($result); + + return $memberID; +} + +// Collapse or expand a category +function CollapseCategory() +{ + global $ID_MEMBER, $db_prefix, $sourcedir; + + $_REQUEST['c'] = (int) $_REQUEST['c']; + + // Not very complicated... just make sure the value is there. + if ($_REQUEST['sa'] == 'collapse') + { + db_query(" + INSERT IGNORE INTO {$db_prefix}collapsed_categories + (ID_CAT, ID_MEMBER) + VALUES ($_REQUEST[c], $ID_MEMBER)", __FILE__, __LINE__); + } + // Now just make sure it's not there. + elseif ($_REQUEST['sa'] == 'expand') + { + db_query(" + DELETE FROM {$db_prefix}collapsed_categories + WHERE ID_MEMBER = $ID_MEMBER + AND ID_CAT = $_REQUEST[c] + LIMIT 1", __FILE__, __LINE__); + } + + // And go back to the back to board index. + require_once($sourcedir . '/BoardIndex.php'); + BoardIndex(); +} + +// Allows for moderation from the message index. +function QuickModeration() +{ + global $db_prefix, $sourcedir, $board, $ID_MEMBER, $modSettings, $sourcedir; + + // Check the session = get or post. + checkSession('request'); + + // This is going to be needed to send off the notifications. + require_once($sourcedir . '/Subs-Post.php'); + + // Remember the last board they moved things to. + if (isset($_REQUEST['move_to'])) + $_SESSION['move_to_topic'] = $_REQUEST['move_to']; + + // Only a few possible actions. + $possibleActions = array(); + + if (allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics'])) + $possibleActions[] = 'sticky'; + if (allowedTo('move_any') || allowedTo('move_own')) + $possibleActions[] = 'move'; + if (allowedTo('delete_any') | allowedTo('delete_own')) + $possibleActions[] = 'remove'; + if (allowedTo('lock_any') | allowedTo('lock_own')) + $possibleActions[] = 'lock'; + if (allowedTo('merge_any')) + $possibleActions[] = 'merge'; + + // Two methods: $_REQUEST['actions'] (ID_TOPIC => action), and $_REQUEST['topics'] and $_REQUEST['qaction']. + // (if action is 'move', $_REQUEST['move_to'] or $_REQUEST['move_tos'][$topic] is used.) + if (!empty($_REQUEST['topics'])) + { + // If the action isn't valid, just quit now. + if (empty($_REQUEST['qaction']) || !in_array($_REQUEST['qaction'], $possibleActions)) + redirectexit('board=' . $board . '.' . $_REQUEST['start']); + + // Merge requires all topics as one parameter and can be done at once. + if ($_REQUEST['qaction'] == 'merge') + { + // Merge requires at least two topics. + if (empty($_REQUEST['topics']) || count($_REQUEST['topics']) < 2) + redirectexit('board=' . $board . '.' . $_REQUEST['start']); + + require_once($sourcedir . '/SplitTopics.php'); + return MergeTopics2($_REQUEST['topics']); + } + + // Just convert to the other method, to make it easier. + foreach ($_REQUEST['topics'] as $topic) + $_REQUEST['actions'][(int) $topic] = $_REQUEST['qaction']; + } + + // Weird... how'd you get here? + if (empty($_REQUEST['actions'])) + redirectexit('board=' . $board . '.' . $_REQUEST['start']); + + // Validate each action. + $temp = array(); + foreach ($_REQUEST['actions'] as $topic => $action) + { + if (in_array($action, $possibleActions)) + $temp[(int) $topic] = $action; + } + $_REQUEST['actions'] = $temp; + + if (!empty($_REQUEST['actions'])) + { + // Find all topics that *aren't* on this board. + $request = db_query(" + SELECT ID_TOPIC + FROM {$db_prefix}topics + WHERE ID_TOPIC IN (" . implode(', ', array_keys($_REQUEST['actions'])) . ") + AND ID_BOARD != $board + LIMIT " . count($_REQUEST['actions']), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + unset($_REQUEST['actions'][$row['ID_TOPIC']]); + mysql_free_result($request); + } + + $stickyCache = array(); + $moveCache = array(0 => array(), 1 => array()); + $removeCache = array(); + $lockCache = array(); + + // Separate the actions. + foreach ($_REQUEST['actions'] as $topic => $action) + { + $topic = (int) $topic; + + if ($action == 'sticky') + $stickyCache[] = $topic; + elseif ($action == 'move') + { + // $moveCache[0] is the topic, $moveCache[1] is the board to move to. + $moveCache[1][$topic] = (int) (isset($_REQUEST['move_tos'][$topic]) ? $_REQUEST['move_tos'][$topic] : $_REQUEST['move_to']); + + if (empty($moveCache[1][$topic])) + continue; + + $moveCache[0][] = $topic; + } + elseif ($action == 'remove') + $removeCache[] = $topic; + elseif ($action == 'lock') + $lockCache[] = $topic; + + logAction($action, array('topic' => $topic)); + + // Notify people that this topic has been locked/stickied/moved/removed? + sendNotifications($topic, $action); + } + + $affectedBoards = array($board => array(0, 0)); + + // Do all the stickies... + if (!empty($stickyCache)) + { + db_query(" + UPDATE {$db_prefix}topics + SET isSticky = IF(isSticky = 1, 0, 1) + WHERE ID_TOPIC IN (" . implode(', ', $stickyCache) . ") + LIMIT " . count($stickyCache), __FILE__, __LINE__); + } + + // Move sucka! (this is, by the by, probably the most complicated part....) + if (!empty($moveCache[0])) + { + // I know - I just KNOW you're trying to beat the system. Too bad for you... we CHECK :P. + $request = db_query(" + SELECT numReplies, ID_TOPIC + FROM {$db_prefix}topics + WHERE ID_TOPIC IN (" . implode(', ', $moveCache[0]) . ")" . (!allowedTo('move_any') ? " + AND ID_MEMBER_STARTED = $ID_MEMBER" : '') . " + LIMIT " . count($moveCache[0]), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $to = $moveCache[1][$row['ID_TOPIC']]; + $row['numReplies']++; + + if (empty($to)) + continue; + + if (!isset($affectedBoards[$to])) + $affectedBoards[$to] = array(0, 0); + + $affectedBoards[$board][0]--; + $affectedBoards[$board][1] -= $row['numReplies']; + + $affectedBoards[$to][0]++; + $affectedBoards[$to][1] += $row['numReplies']; + + // Move the actual topic. + db_query(" + UPDATE {$db_prefix}topics + SET ID_BOARD = $to + WHERE ID_TOPIC = $row[ID_TOPIC] + LIMIT 1", __FILE__, __LINE__); + + db_query(" + UPDATE {$db_prefix}messages + SET ID_BOARD = $to + WHERE ID_TOPIC = $row[ID_TOPIC]", __FILE__, __LINE__); + db_query(" + UPDATE {$db_prefix}calendar + SET ID_BOARD = $to + WHERE ID_TOPIC = $row[ID_TOPIC]", __FILE__, __LINE__); + } + mysql_free_result($request); + + foreach ($affectedBoards as $ID_BOARD => $topicsPosts) + { + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = numPosts + $topicsPosts[1], numTopics = numTopics + $topicsPosts[0] + WHERE ID_BOARD = $ID_BOARD + LIMIT 1", __FILE__, __LINE__); + } + } + + // Now delete the topics... + if (!empty($removeCache)) + { + // They can only delete their own topics. (we wouldn't be here if they couldn't do that..) + if (!allowedTo('delete_any')) + { + $result = db_query(" + SELECT ID_TOPIC + FROM {$db_prefix}topics + WHERE ID_TOPIC IN (" . implode(', ', $removeCache) . ") + AND ID_MEMBER_STARTED = $ID_MEMBER + LIMIT " . count($removeCache), __FILE__, __LINE__); + $removeCache = array(); + while ($row = mysql_fetch_assoc($result)) + $removeCache[] = $row['ID_TOPIC']; + mysql_free_result($result); + } + + // Maybe *none* were their own topics. + if (!empty($removeCache)) + { + require_once($sourcedir . '/RemoveTopic.php'); + removeTopics($removeCache); + } + } + + // And lastly, lock the topics... + if (!empty($lockCache)) + { + // Gotta make sure they CAN lock/unlock these topics... + if (!allowedTo('lock_any')) + { + // Make sure they started the topic AND it isn't already locked by someone with higher priv's. + $result = db_query(" + SELECT ID_TOPIC + FROM {$db_prefix}topics + WHERE ID_TOPIC IN (" . implode(', ', $lockCache) . ") + AND ID_MEMBER_STARTED = $ID_MEMBER + AND locked IN (2, 0) + LIMIT " . count($lockCache), __FILE__, __LINE__); + $lockCache = array(); + while ($row = mysql_fetch_assoc($result)) + $lockCache[] = $row['ID_TOPIC']; + mysql_free_result($result); + } + + // It could just be that *none* were their own topics... + if (!empty($lockCache)) + { + // Alternate the locked value. + db_query(" + UPDATE {$db_prefix}topics + SET locked = IF(locked = 0, " . (allowedTo('lock_any') ? '1' : '2') . ", 0) + WHERE ID_TOPIC IN (" . implode(', ', $lockCache) . ") + LIMIT " . count($lockCache), __FILE__, __LINE__); + } + } + + updateStats('topic'); + updateStats('message'); + updateStats('calendar'); + + updateLastMessages(array_keys($affectedBoards)); + + redirectexit('board=' . $board . '.' . $_REQUEST['start']); +} + +// In-topic quick moderation. +function QuickModeration2() +{ + global $sourcedir, $db_prefix, $topic, $board, $ID_MEMBER; + + // Check the session = get or post. + checkSession('request'); + + require_once($sourcedir . '/RemoveTopic.php'); + + if (empty($_REQUEST['msgs'])) + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); + + $messages = array(); + foreach ($_REQUEST['msgs'] as $dummy) + $messages[] = (int) $dummy; + + // Allowed to delete any message? + if (allowedTo('remove_any')) + $allowed_all = true; + // Allowed to delete replies to their messages? + elseif (allowedTo('remove_replies')) + { + $request = db_query(" + SELECT ID_MEMBER_STARTED + FROM {$db_prefix}topics + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + list ($starter) = mysql_fetch_row($request); + mysql_free_result($request); + + $allowed_all = $starter == $ID_MEMBER; + } + else + $allowed_all = false; + + if (!$allowed_all) + isAllowedTo('remove_own'); + + // Allowed to remove which messages? + $request = db_query(" + SELECT ID_MSG, subject, ID_MEMBER + FROM {$db_prefix}messages + WHERE ID_MSG IN (" . implode(', ', $messages) . ") + AND ID_TOPIC = $topic" . (!$allowed_all ? " + AND ID_MEMBER = $ID_MEMBER" : '') . " + LIMIT " . count($messages), __FILE__, __LINE__); + $messages = array(); + while ($row = mysql_fetch_assoc($request)) + $messages[$row['ID_MSG']] = array($row['subject'], $row['ID_MEMBER']); + mysql_free_result($request); + + // Get the first message in the topic - because you can't delete that! + $request = db_query(" + SELECT ID_FIRST_MSG + FROM {$db_prefix}topics + WHERE ID_TOPIC = $topic + LIMIT 1", __FILE__, __LINE__); + list ($first_message) = mysql_fetch_row($request); + mysql_free_result($request); + + // Delete all the messages we know they can delete. ($messages) + foreach ($messages as $message => $info) + { + // Just skip the first message. + if ($message == $first_message) + continue; + + removeMessage($message); + + // Log this moderation action ;). + if (allowedTo('remove_any')) + logAction('delete', array('topic' => $topic, 'subject' => $info[0], 'member' => $info[1])); + } + + redirectexit('topic=' . $topic . '.' . $_REQUEST['start']); +} + +?> \ No newline at end of file diff --git a/Sources/Subs-Graphics.php b/Sources/Subs-Graphics.php new file mode 100644 index 0000000..54b8793 --- /dev/null +++ b/Sources/Subs-Graphics.php @@ -0,0 +1,1202 @@ + 'gif', + '2' => 'jpeg', + '3' => 'png', + '6' => 'bmp', + '15' => 'wbmp' + ); + + // Check to see if GD is installed and what version. + $testGD = get_extension_funcs('gd'); + + // If GD is not installed, this function is pointless. + if (empty($testGD)) + return false; + + // GD 2 maybe? + $gd2 = in_array('imagecreatetruecolor', $testGD) && function_exists('imagecreatetruecolor'); + unset($testGD); + + require_once($sourcedir . '/ManageAttachments.php'); + removeAttachments('a.ID_MEMBER = ' . $memID); + db_query(" + INSERT INTO {$db_prefix}attachments + (ID_MEMBER, filename, size) + VALUES ($memID, '$destName', 1)", __FILE__, __LINE__); + $attachID = db_insert_id(); + + $destName = $modSettings['attachmentUploadDir'] . '/' . $destName . '.tmp'; + + $success = false; + $sizes = url_image_size($url); + + // Gif? That might mean trouble if gif support is not available. + if ($sizes[2] == 1 && !function_exists('imagecreatefromgif') && function_exists('imagecreatefrompng')) + { + // Download it to the temporary file... use the special gif library... and save as png. + if (copy($url, $destName) && $img = @gif_loadFile($destName) && gif_outputAsPng($img, $destName)) + { + // From here it can be resized. + if ($src_img = imagecreatefrompng($destName)) + { + resizeImage($src_img, $destName, imagesx($src_img), imagesy($src_img), $max_width, $max_height); + $success = true; + } + } + } + // A known and supported format? + elseif (isset($default_formats[$sizes[2]]) && function_exists('imagecreatefrom' . $default_formats[$sizes[2]])) + { + $imagecreatefrom = 'imagecreatefrom' . $default_formats[$sizes[2]]; + if ($src_img = $imagecreatefrom($url)) + { + resizeImage($src_img, $destName, imagesx($src_img), imagesy($src_img), $max_width, $max_height); + $success = true; + } + } + // Remove the .tmp extension. + $destName = substr($destName, 0, -4); + + if ($success) + { + // Remove the .tmp extension from the attachment. + if (rename($destName . '.tmp', $destName)) + { + // Write filesize in the database. + db_query(" + UPDATE {$db_prefix}attachments + SET size = " . filesize($destName) . " + WHERE ID_ATTACH = $attachID + LIMIT 1", __FILE__, __LINE__); + return true; + } + else + return false; + } + else + { + db_query(" + DELETE FROM {$db_prefix}attachments + WHERE ID_ATTACH = $attachID + LIMIT 1", __FILE__, __LINE__); + + @unlink($destName . '.tmp'); + return false; + } +} + +function resizeImage($src_img, $destName, $src_width, $src_height, $max_width, $max_height) +{ + global $gd2, $modSettings; + + // Determine whether to resize to max width or to max height (depending on the limits.) + if (!empty($max_width) && (empty($max_height) || $src_height * $max_width / $src_width <= $max_height)) + { + $dst_width = $max_width; + $dst_height = floor($src_height * $max_width / $src_width); + } + else + { + $dst_width = floor($src_width * $max_height / $src_height); + $dst_height = $max_height; + } + + // (make a true color image, because it just looks better for resizing.) + if ($gd2) + $dst_img = imagecreatetruecolor($dst_width, $dst_height); + else + $dst_img = imagecreate($dst_width, $dst_height); + + // Resize it! + if ($gd2) + imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); + else + imageCopyResampleBicubic($dst_img, $src_img, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); + + // Save it! + if (!empty($modSettings['avatar_download_png'])) + imagepng($dst_img, $destName); + else + imagejpeg($dst_img, $destName); + + // Free the memory. + imagedestroy($src_img); + imagedestroy($dst_img); +} + +function imageCopyResampleBicubic($dst_img, $src_img, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) +{ + $palsize = ImageColorsTotal($src_img); + for ($i = 0; $i < $palsize; $i++) + { + $colors = ImageColorsForIndex($src_img, $i); + ImageColorAllocate($dst_img, $colors['red'], $colors['green'], $colors['blue']); + } + + $scaleX = ($src_w - 1) / $dst_w; + $scaleY = ($src_h - 1) / $dst_h; + + $scaleX2 = (int) $scaleX / 2; + $scaleY2 = (int) $scaleY / 2; + + for ($j = $src_y; $j < $dst_h; $j++) + { + $sY = (int) $j * $scaleY; + $y13 = $sY + $scaleY2; + + for ($i = $src_x; $i < $dst_w; $i++) + { + $sX = (int) $i * $scaleX; + $x34 = $sX + $scaleX2; + + $color1 = ImageColorsForIndex($src_img, ImageColorAt($src_img, $sX, $y13)); + $color2 = ImageColorsForIndex($src_img, ImageColorAt($src_img, $sX, $sY)); + $color3 = ImageColorsForIndex($src_img, ImageColorAt($src_img, $x34, $y13)); + $color4 = ImageColorsForIndex($src_img, ImageColorAt($src_img, $x34, $sY)); + + $red = ($color1['red'] + $color2['red'] + $color3['red'] + $color4['red']) / 4; + $green = ($color1['green'] + $color2['green'] + $color3['green'] + $color4['green']) / 4; + $blue = ($color1['blue'] + $color2['blue'] + $color3['blue'] + $color4['blue']) / 4; + + ImageSetPixel($dst_img, $i + $dst_x - $src_x, $j + $dst_y - $src_y, ImageColorClosest($dst_img, $red, $green, $blue)); + } + } +} + +if (!function_exists('imagecreatefrombmp')) +{ + function imagecreatefrombmp($filename) + { + global $gd2; + + $fp = fopen($filename, 'rb'); + + $errors = error_reporting(0); + + $header = unpack('vtype/Vsize/Vreserved/Voffset', fread($fp, 14)); + $info = unpack('Vsize/Vwidth/Vheight/vplanes/vbits/Vcompression/Vimagesize/Vxres/Vyres/Vncolor/Vcolorimportant', fread($fp, 40)); + + if ($header['type'] != 0x4D42) + false; + + if ($gd2) + $dst_img = imagecreatetruecolor($info['width'], $info['height']); + else + $dst_img = imagecreate($info['width'], $info['height']); + + $palette_size = $header['offset'] - 54; + $info['ncolor'] = $palette_size / 4; + + $palette = array(); + + $palettedata = fread($fp, $palette_size); + $n = 0; + for ($j = 0; $j < $palette_size; $j++) + { + $b = ord($palettedata{$j++}); + $g = ord($palettedata{$j++}); + $r = ord($palettedata{$j++}); + + $palette[$n++] = imagecolorallocate($dst_img, $r, $g, $b); + } + + $scan_line_size = ($info['bits'] * $info['width'] + 7) >> 3; + $scan_line_align = $scan_line_size & 3 ? 4 - ($scan_line_size & 3) : 0; + + for ($y = 0, $l = $info['height'] - 1; $y < $info['height']; $y++, $l--) + { + fseek($fp, $header['offset'] + ($scan_line_size + $scan_line_align) * $l); + $scan_line = fread($fp, $scan_line_size); + + if (strlen($scan_line) < $scan_line_size) + continue; + + if ($info['bits'] == 32) + { + $x = 0; + for ($j = 0; $j < $scan_line_size; $x++) + { + $b = ord($scan_line{$j++}); + $g = ord($scan_line{$j++}); + $r = ord($scan_line{$j++}); + $j++; + + $color = imagecolorexact($dst_img, $r, $g, $b); + if ($color == -1) + { + $color = imagecolorallocate($dst_img, $r, $g, $b); + + // Gah! Out of colors? Stupid GD 1... try anyhow. + if ($color == -1) + $color = imagecolorclosest($dst_img, $r, $g, $b); + } + + imagesetpixel($dst_img, $x, $y, $color); + } + } + elseif ($info['bits'] == 24) + { + $x = 0; + for ($j = 0; $j < $scan_line_size; $x++) + { + $b = ord($scan_line{$j++}); + $g = ord($scan_line{$j++}); + $r = ord($scan_line{$j++}); + + $color = imagecolorexact($dst_img, $r, $g, $b); + if ($color == -1) + { + $color = imagecolorallocate($dst_img, $r, $g, $b); + + // Gah! Out of colors? Stupid GD 1... try anyhow. + if ($color == -1) + $color = imagecolorclosest($dst_img, $r, $g, $b); + } + + imagesetpixel($dst_img, $x, $y, $color); + } + } + elseif ($info['bits'] == 16) + { + $x = 0; + for ($j = 0; $j < $scan_line_size; $x++) + { + $b1 = ord($scan_line{$j++}); + $b2 = ord($scan_line{$j++}); + + $word = $b2 * 256 + $b1; + + $b = (($word & 31) * 255) / 31; + $g = ((($word >> 5) & 31) * 255) / 31; + $r = ((($word >> 10) & 31) * 255) / 31; + + // Scale the image colors up properly. + $color = imagecolorexact($dst_img, $r, $g, $b); + if ($color == -1) + { + $color = imagecolorallocate($dst_img, $r, $g, $b); + + // Gah! Out of colors? Stupid GD 1... try anyhow. + if ($color == -1) + $color = imagecolorclosest($dst_img, $r, $g, $b); + } + + imagesetpixel($dst_img, $x, $y, $color); + } + } + elseif ($info['bits'] == 8) + { + $x = 0; + for ($j = 0; $j < $scan_line_size; $x++) + imagesetpixel($dst_img, $x, $y, $palette[ord($scan_line{$j++})]); + } + elseif ($info['bits'] == 4) + { + $x = 0; + for ($j = 0; $j < $scan_line_size; $x++) + { + $byte = ord($scan_line{$j++}); + + imagesetpixel($dst_img, $x, $y, $palette[(int) ($byte / 16)]); + if (++$x < $info['width']) + imagesetpixel($dst_img, $x, $y, $palette[$byte & 15]); + } + } + else + { + // Sorry, I'm just not going to do monochrome :P. + } + } + + fclose($fp); + + error_reporting($errors); + + return $dst_img; + } +} + +function gif_loadFile($lpszFileName, $iIndex = 0) +{ + $gif = new CGIF(); + + if (!$gif->loadFile($lpszFileName, $iIndex)) + return false; + + return $gif; +} + +function gif_outputAsPng($gif, $lpszFileName, $bgColor = -1) +{ + if (!isset($gif) || @get_class($gif) != 'cgif' || !$gif->loaded() || $lpszFileName == '') + return false; + + $fd = $gif->getPng($bgColor); + if (strlen($fd) <= 0) + return false; + + if (!($fh = @fopen($lpszFileName, 'wb'))) + return false; + + @fwrite($fh, $fd, strlen($fd)); + @fflush($fh); + @fclose($fh); + + return true; +} + +class CGIFLZW +{ + var $MAX_LZW_BITS; + var $Fresh, $CodeSize, $SetCodeSize, $MaxCode, $MaxCodeSize, $FirstCode, $OldCode; + var $ClearCode, $EndCode, $Next, $Vals, $Stack, $sp, $Buf, $CurBit, $LastBit, $Done, $LastByte; + + // CONSTRUCTOR + function CGIFLZW() + { + $this->MAX_LZW_BITS = 12; + unset($this->Next); + unset($this->Vals); + unset($this->Stack); + unset($this->Buf); + + $this->Next = range(0, (1 << $this->MAX_LZW_BITS) - 1); + $this->Vals = range(0, (1 << $this->MAX_LZW_BITS) - 1); + $this->Stack = range(0, (1 << ($this->MAX_LZW_BITS + 1)) - 1); + $this->Buf = range(0, 279); + } + + function deCompress($data, &$datLen) + { + $stLen = strlen($data); + $datLen = 0; + $ret = ''; + + // INITIALIZATION + $this->LZWCommand($data, true); + + while (($iIndex = $this->LZWCommand($data, false)) >= 0) + $ret .= chr($iIndex); + + $datLen = $stLen - strlen($data); + + if ($iIndex != -2) + return false; + + return $ret; + } + + function LZWCommand(&$data, $bInit) + { + if ($bInit) + { + $this->SetCodeSize = ord($data{0}); + $data = substr($data, 1); + + $this->CodeSize = $this->SetCodeSize + 1; + $this->ClearCode = 1 << $this->SetCodeSize; + $this->EndCode = $this->ClearCode + 1; + $this->MaxCode = $this->ClearCode + 2; + $this->MaxCodeSize = $this->ClearCode << 1; + + $this->GetCode($data, $bInit); + + $this->Fresh = 1; + for ($i = 0; $i < $this->ClearCode; $i++) + { + $this->Next[$i] = 0; + $this->Vals[$i] = $i; + } + + for (; $i < (1 << $this->MAX_LZW_BITS); $i++) + { + $this->Next[$i] = 0; + $this->Vals[$i] = 0; + } + + $this->sp = 0; + return 1; + } + + if ($this->Fresh) + { + $this->Fresh = 0; + do + { + $this->FirstCode = $this->GetCode($data, $bInit); + $this->OldCode = $this->FirstCode; + } + while ($this->FirstCode == $this->ClearCode); + + return $this->FirstCode; + } + + if ($this->sp > 0) + { + $this->sp--; + return $this->Stack[$this->sp]; + } + + while (($Code = $this->GetCode($data, $bInit)) >= 0) + { + if ($Code == $this->ClearCode) + { + for ($i = 0; $i < $this->ClearCode; $i++) + { + $this->Next[$i] = 0; + $this->Vals[$i] = $i; + } + + for (; $i < (1 << $this->MAX_LZW_BITS); $i++) + { + $this->Next[$i] = 0; + $this->Vals[$i] = 0; + } + + $this->CodeSize = $this->SetCodeSize + 1; + $this->MaxCodeSize = $this->ClearCode << 1; + $this->MaxCode = $this->ClearCode + 2; + $this->sp = 0; + $this->FirstCode = $this->GetCode($data, $bInit); + $this->OldCode = $this->FirstCode; + + return $this->FirstCode; + } + + if ($Code == $this->EndCode) + return -2; + + $InCode = $Code; + if ($Code >= $this->MaxCode) + { + $this->Stack[$this->sp] = $this->FirstCode; + $this->sp++; + $Code = $this->OldCode; + } + + while ($Code >= $this->ClearCode) + { + $this->Stack[$this->sp] = $this->Vals[$Code]; + $this->sp++; + + if ($Code == $this->Next[$Code]) // Circular table entry, big GIF Error! + return -1; + + $Code = $this->Next[$Code]; + } + + $this->FirstCode = $this->Vals[$Code]; + $this->Stack[$this->sp] = $this->FirstCode; + $this->sp++; + + if (($Code = $this->MaxCode) < (1 << $this->MAX_LZW_BITS)) + { + $this->Next[$Code] = $this->OldCode; + $this->Vals[$Code] = $this->FirstCode; + $this->MaxCode++; + + if (($this->MaxCode >= $this->MaxCodeSize) && ($this->MaxCodeSize < (1 << $this->MAX_LZW_BITS))) + { + $this->MaxCodeSize *= 2; + $this->CodeSize++; + } + } + + $this->OldCode = $InCode; + if ($this->sp > 0) + { + $this->sp--; + return $this->Stack[$this->sp]; + } + } + + return $Code; + } + + function GetCode(&$data, $bInit) + { + if ($bInit) + { + $this->CurBit = 0; + $this->LastBit = 0; + $this->Done = 0; + $this->LastByte = 2; + + return 1; + } + + if (($this->CurBit + $this->CodeSize) >= $this->LastBit) + { + if ($this->Done) + { + // Ran off the end of my bits... + if ($this->CurBit >= $this->LastBit) + return 0; + + return -1; + } + + $this->Buf[0] = $this->Buf[$this->LastByte - 2]; + $this->Buf[1] = $this->Buf[$this->LastByte - 1]; + + $Count = ord($data{0}); + $data = substr($data, 1); + + if ($Count) + { + for ($i = 0; $i < $Count; $i++) + $this->Buf[2 + $i] = ord($data{$i}); + + $data = substr($data, $Count); + } + else + $this->Done = 1; + + $this->LastByte = 2 + $Count; + $this->CurBit = ($this->CurBit - $this->LastBit) + 16; + $this->LastBit = (2 + $Count) << 3; + } + + $iRet = 0; + for ($i = $this->CurBit, $j = 0; $j < $this->CodeSize; $i++, $j++) + $iRet |= (($this->Buf[intval($i / 8)] & (1 << ($i % 8))) != 0) << $j; + + $this->CurBit += $this->CodeSize; + return $iRet; + } +} + +class CGIFCOLORTABLE +{ + var $m_nColors; + var $m_arColors; + + // CONSTRUCTOR + function CGIFCOLORTABLE() + { + unset($this->m_nColors); + unset($this->m_arColors); + } + + function load($lpData, $num) + { + $this->m_nColors = 0; + $this->m_arColors = array(); + + for ($i = 0; $i < $num; $i++) + { + $rgb = substr($lpData, $i * 3, 3); + if (strlen($rgb) < 3) + return false; + + $this->m_arColors[] = (ord($rgb{2}) << 16) + (ord($rgb{1}) << 8) + ord($rgb{0}); + $this->m_nColors++; + } + + return true; + } + + function toString() + { + $ret = ''; + + for ($i = 0; $i < $this->m_nColors; $i++) + { + $ret .= + chr(($this->m_arColors[$i] & 0x000000FF)) . // R + chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G + chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B + } + + return $ret; + } + + function colorIndex($rgb) + { + $rgb = intval($rgb) & 0xFFFFFF; + $r1 = ($rgb & 0x0000FF); + $g1 = ($rgb & 0x00FF00) >> 8; + $b1 = ($rgb & 0xFF0000) >> 16; + $idx = -1; + + for ($i = 0; $i < $this->m_nColors; $i++) + { + $r2 = ($this->m_arColors[$i] & 0x000000FF); + $g2 = ($this->m_arColors[$i] & 0x0000FF00) >> 8; + $b2 = ($this->m_arColors[$i] & 0x00FF0000) >> 16; + $d = abs($r2 - $r1) + abs($g2 - $g1) + abs($b2 - $b1); + + if (($idx == -1) || ($d < $dif)) + { + $idx = $i; + $dif = $d; + } + } + + return $idx; + } +} + +class CGIFFILEHEADER +{ + var $m_lpVer; + var $m_nWidth; + var $m_nHeight; + var $m_bGlobalClr; + var $m_nColorRes; + var $m_bSorted; + var $m_nTableSize; + var $m_nBgColor; + var $m_nPixelRatio; + var $m_colorTable; + + // CONSTRUCTOR + function CGIFFILEHEADER() + { + unset($this->m_lpVer); + unset($this->m_nWidth); + unset($this->m_nHeight); + unset($this->m_bGlobalClr); + unset($this->m_nColorRes); + unset($this->m_bSorted); + unset($this->m_nTableSize); + unset($this->m_nBgColor); + unset($this->m_nPixelRatio); + unset($this->m_colorTable); + } + + function load($lpData, &$hdrLen) + { + $hdrLen = 0; + + $this->m_lpVer = substr($lpData, 0, 6); + if (($this->m_lpVer != 'GIF87a') && ($this->m_lpVer != 'GIF89a')) + return false; + + $this->m_nWidth = $this->w2i(substr($lpData, 6, 2)); + $this->m_nHeight = $this->w2i(substr($lpData, 8, 2)); + if (!$this->m_nWidth || !$this->m_nHeight) + return false; + + $b = ord(substr($lpData, 10, 1)); + $this->m_bGlobalClr = ($b & 0x80) ? true : false; + $this->m_nColorRes = ($b & 0x70) >> 4; + $this->m_bSorted = ($b & 0x08) ? true : false; + $this->m_nTableSize = 2 << ($b & 0x07); + $this->m_nBgColor = ord(substr($lpData, 11, 1)); + $this->m_nPixelRatio = ord(substr($lpData, 12, 1)); + $hdrLen = 13; + + if ($this->m_bGlobalClr) + { + $this->m_colorTable = new CGIFCOLORTABLE(); + if (!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) + return false; + + $hdrLen += 3 * $this->m_nTableSize; + } + + return true; + } + + function w2i($str) + { + return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); + } +} + +class CGIFIMAGEHEADER +{ + var $m_nLeft; + var $m_nTop; + var $m_nWidth; + var $m_nHeight; + var $m_bLocalClr; + var $m_bInterlace; + var $m_bSorted; + var $m_nTableSize; + var $m_colorTable; + + // CONSTRUCTOR + function CGIFIMAGEHEADER() + { + unset($this->m_nLeft); + unset($this->m_nTop); + unset($this->m_nWidth); + unset($this->m_nHeight); + unset($this->m_bLocalClr); + unset($this->m_bInterlace); + unset($this->m_bSorted); + unset($this->m_nTableSize); + unset($this->m_colorTable); + } + + function load($lpData, &$hdrLen) + { + $hdrLen = 0; + + $this->m_nLeft = $this->w2i(substr($lpData, 0, 2)); + $this->m_nTop = $this->w2i(substr($lpData, 2, 2)); + $this->m_nWidth = $this->w2i(substr($lpData, 4, 2)); + $this->m_nHeight = $this->w2i(substr($lpData, 6, 2)); + + if (!$this->m_nWidth || !$this->m_nHeight) + return false; + + $b = ord($lpData{8}); + $this->m_bLocalClr = ($b & 0x80) ? true : false; + $this->m_bInterlace = ($b & 0x40) ? true : false; + $this->m_bSorted = ($b & 0x20) ? true : false; + $this->m_nTableSize = 2 << ($b & 0x07); + $hdrLen = 9; + + if ($this->m_bLocalClr) + { + $this->m_colorTable = new CGIFCOLORTABLE(); + if (!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) + return false; + + $hdrLen += 3 * $this->m_nTableSize; + } + + return true; + } + + function w2i($str) + { + return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); + } +} + +class CGIFIMAGE +{ + var $m_disp; + var $m_bUser; + var $m_bTrans; + var $m_nDelay; + var $m_nTrans; + var $m_lpComm; + var $m_gih; + var $m_data; + var $m_lzw; + + function CGIFIMAGE() + { + unset($this->m_disp); + unset($this->m_bUser); + //unset($this->m_bTrans); + unset($this->m_nDelay); + unset($this->m_nTrans); + unset($this->m_lpComm); + unset($this->m_data); + $this->m_gih = new CGIFIMAGEHEADER(); + $this->m_lzw = new CGIFLZW(); + } + + function load($data, &$datLen) + { + $datLen = 0; + + while (true) + { + $b = ord($data{0}); + $data = substr($data, 1); + $datLen++; + + switch ($b) + { + case 0x21: // Extension + if (!$this->skipExt($data, $len = 0)) + return false; + + $datLen += $len; + break; + + case 0x2C: // Image + // LOAD HEADER & COLOR TABLE + if (!$this->m_gih->load($data, $len = 0)) + return false; + + $data = substr($data, $len); + $datLen += $len; + + // ALLOC BUFFER + if (!($this->m_data = $this->m_lzw->deCompress($data, $len = 0))) + return false; + + $data = substr($data, $len); + $datLen += $len; + + if ($this->m_gih->m_bInterlace) + $this->deInterlace(); + + return true; + + case 0x3B: // EOF + default: + return false; + } + } + return false; + } + + function skipExt(&$data, &$extLen) + { + $extLen = 0; + + $b = ord($data{0}); + $data = substr($data, 1); + $extLen++; + + switch ($b) + { + case 0xF9: // Graphic Control + $b = ord($data{1}); + $this->m_disp = ($b & 0x1C) >> 2; + $this->m_bUser = ($b & 0x02) ? true : false; + $this->m_bTrans = ($b & 0x01) ? true : false; + $this->m_nDelay = $this->w2i(substr($data, 2, 2)); + $this->m_nTrans = ord($data{4}); + break; + + case 0xFE: // Comment + $this->m_lpComm = substr($data, 1, ord($data{0})); + break; + + case 0x01: // Plain text + break; + + case 0xFF: // Application + break; + } + + // SKIP DEFAULT AS DEFS MAY CHANGE + $b = ord($data{0}); + $data = substr($data, 1); + $extLen++; + while ($b > 0) + { + $data = substr($data, $b); + $extLen += $b; + $b = ord($data{0}); + $data = substr($data, 1); + $extLen++; + } + return true; + } + + function w2i($str) + { + return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); + } + + function deInterlace() + { + $data = $this->m_data; + + for ($i = 0; $i < 4; $i++) + { + switch ($i) + { + case 0: + $s = 8; + $y = 0; + break; + + case 1: + $s = 8; + $y = 4; + break; + + case 2: + $s = 4; + $y = 2; + break; + + case 3: + $s = 2; + $y = 1; + break; + } + + for (; $y < $this->m_gih->m_nHeight; $y += $s) + { + $lne = substr($this->m_data, 0, $this->m_gih->m_nWidth); + $this->m_data = substr($this->m_data, $this->m_gih->m_nWidth); + + $data = + substr($data, 0, $y * $this->m_gih->m_nWidth) . + $lne . + substr($data, ($y + 1) * $this->m_gih->m_nWidth); + } + } + + $this->m_data = $data; + } +} + +class CGIF +{ + var $m_gfh; + var $m_lpData; + var $m_img; + var $m_bLoaded; + + // CONSTRUCTOR + function CGIF() + { + $this->m_gfh = new CGIFFILEHEADER(); + $this->m_img = new CGIFIMAGE(); + $this->m_lpData = ''; + $this->m_bLoaded = false; + } + + function loadFile($lpszFileName, $iIndex) + { + if ($iIndex < 0) + return false; + + // READ FILE + if (!($fh = @fopen($lpszFileName, 'rb'))) + return false; + + $this->m_lpData = @fread($fh, @filesize($lpszFileName)); + fclose($fh); + + // GET FILE HEADER + if (!$this->m_gfh->load($this->m_lpData, $len = 0)) + return false; + + $this->m_lpData = substr($this->m_lpData, $len); + + do + { + if (!$this->m_img->load($this->m_lpData, $imgLen = 0)) + return false; + + $this->m_lpData = substr($this->m_lpData, $imgLen); + } + while ($iIndex-- > 0); + + $this->m_bLoaded = true; + return true; + } + + function getPng($bgColor) + { + $out = ''; + + if (!$this->m_bLoaded) + return false; + + // PREPARE COLOR TABLE (RGBQUADs) + if ($this->m_img->m_gih->m_bLocalClr) + { + $nColors = $this->m_img->m_gih->m_nTableSize; + $pal = $this->m_img->m_gih->m_colorTable->toString(); + if ($bgColor != -1) + $bgColor = $this->m_img->m_gih->m_colorTable->colorIndex($bgColor); + } + elseif ($this->m_gfh->m_bGlobalClr) + { + $nColors = $this->m_gfh->m_nTableSize; + $pal = $this->m_gfh->m_colorTable->toString(); + if ($bgColor != -1) + $bgColor = $this->m_gfh->m_colorTable->colorIndex($bgColor); + } + else + { + $nColors = 0; + $bgColor = -1; + } + + // PREPARE BITMAP BITS + $data = $this->m_img->m_data; + $nPxl = 0; + $bmp = ''; + for ($y = 0; $y < $this->m_gfh->m_nHeight; $y++) + { + $bmp .= "\x00"; + for ($x = 0; $x < $this->m_gfh->m_nWidth; $x++, $nPxl++) + { + if ( + ($x >= $this->m_img->m_gih->m_nLeft) && + ($y >= $this->m_img->m_gih->m_nTop) && + ($x < ($this->m_img->m_gih->m_nLeft + $this->m_img->m_gih->m_nWidth)) && + ($y < ($this->m_img->m_gih->m_nTop + $this->m_img->m_gih->m_nHeight))) + { + // PART OF IMAGE + $bmp .= $data{$nPxl}; + } + else + { + // BACKGROUND + if ($bgColor == -1) + $bmp .= chr($this->m_gfh->m_nBgColor); + else + $bmp .= chr($bgColor); + } + } + } + $bmp = gzcompress($bmp, 9); + + /////////////////////////////////////////////////////////////////////// + // SIGNATURE + $out .= "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"; + /////////////////////////////////////////////////////////////////////// + // HEADER + $out .= "\x00\x00\x00\x0D"; + $tmp = 'IHDR'; + $tmp .= $this->ndword($this->m_gfh->m_nWidth); + $tmp .= $this->ndword($this->m_gfh->m_nHeight); + $tmp .= "\x08\x03\x00\x00\x00"; + $out .= $tmp; + $out .= $this->ndword(crc32($tmp)); + /////////////////////////////////////////////////////////////////////// + // PALETTE + if ($nColors > 0) + { + $out .= $this->ndword($nColors * 3); + $tmp = 'PLTE'; + $tmp .= $pal; + $out .= $tmp; + $out .= $this->ndword(crc32($tmp)); + } + /////////////////////////////////////////////////////////////////////// + // TRANSPARENCY + if ($this->m_img->m_bTrans && ($nColors > 0)) + { + $out .= $this->ndword($nColors); + $tmp = 'tRNS'; + for ($i = 0; $i < $nColors; $i++) + $tmp .= ($i == $this->m_img->m_nTrans) ? "\x00" : "\xFF"; + $out .= $tmp; + $out .= $this->ndword(crc32($tmp)); + } + /////////////////////////////////////////////////////////////////////// + // DATA BITS + $out .= $this->ndword(strlen($bmp)); + $tmp = "IDAT"; + $tmp .= $bmp; + $out .= $tmp; + $out .= $this->ndword(crc32($tmp)); + /////////////////////////////////////////////////////////////////////// + // END OF FILE + $out .= "\x00\x00\x00\x00IEND\xAE\x42\x60\x82"; + + return $out; + } + + function dword($val) + { + $val = intval($val); + return chr($val & 0xFF).chr(($val & 0xFF00) >> 8).chr(($val & 0xFF0000) >> 16).chr(($val & 0xFF000000) >> 24); + } + + function ndword($val) + { + $val = intval($val); + return chr(($val & 0xFF000000) >> 24).chr(($val & 0xFF0000) >> 16).chr(($val & 0xFF00) >> 8).chr($val & 0xFF); + } + + function width() + { + return $this->m_gfh->m_nWidth; + } + + function height() + { + return $this->m_gfh->m_nHeight; + } + + function loaded() + { + return $this->m_bLoaded; + } +} + +?> \ No newline at end of file diff --git a/Sources/Subs-Package.php b/Sources/Subs-Package.php new file mode 100644 index 0000000..47ecbe7 --- /dev/null +++ b/Sources/Subs-Package.php @@ -0,0 +1,2141 @@ +path(path, true) in that instead of an xmlArray + of elements, an array of xmlArray's is returned for use with foreach. + + string xmlArray::create_xml(string path = '.') + - returns the specified path as an xml file. +*/ + +// Get the data from the file and extract it. +function read_tgz_file($gzfilename, $destination, $single_file = false, $overwrite = false) +{ + if (function_exists('file_get_contents')) + { + $data = @file_get_contents($gzfilename); + + if ($data === false) + return false; + } + else + { + $fp = @fopen($gzfilename, 'rb'); + if ($fp === false) + return false; + + $data = ''; + while (!feof($fp)) + $data .= fread($fp, 4096); + fclose($fp); + } + + return read_tgz_data($data, $destination, $single_file, $overwrite); +} + +// Extract tar.gz data. If destination is null, return a listing. +function read_tgz_data($data, $destination, $single_file = false, $overwrite = false) +{ + umask(0); + if ($destination !== null && !file_exists($destination) && !$single_file) + mkdir($destination, 0777); + + // No signature? + if (strlen($data) < 2) + return false; + + $id = unpack('H2a/H2b', substr($data, 0, 2)); + if (strtolower($id['a'] . $id['b']) != '1f8b') + { + // Okay, this ain't no tar.gz, but maybe it's a zip file. + if (substr($data, 0, 2) == 'PK') + return read_zip_data($data, $destination, $single_file, $overwrite); + else + return false; + } + + $flags = unpack('Ct/Cf', substr($data, 2, 2)); + + // Not deflate! + if ($flags['t'] != 8) + return false; + $flags = $flags['f']; + + $offset = 10; + $octdec = array('mode', 'uid', 'gid', 'size', 'mtime', 'checksum', 'type'); + + // "Read" the filename and comment. + if ($flags & 12) + { + while ($flags & 8 && $data{$offset++} != "\0") + $offset; + while ($flags & 4 && $data{$offset++} != "\0") + $offset; + } + + $crc = unpack('Vcrc32/Visize', substr($data, strlen($data) - 8, 8)); + $data = @gzinflate(substr($data, $offset, strlen($data) - 8 - $offset)); + + if ($crc['crc32'] != crc32($data)) + return false; + + $blocks = strlen($data) / 512 - 1; + $offset = 0; + + $return = array(); + + while ($offset < $blocks) + { + $header = substr($data, $offset << 9, 512); + $current = unpack('a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100linkname/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155path', $header); + + foreach ($current as $k => $v) + { + if (in_array($k, $octdec)) + $current[$k] = octdec(trim($v)); + else + $current[$k] = trim($v); + } + + $checksum = 256; + for ($i = 0; $i < 148; $i++) + $checksum += ord($header{$i}); + for ($i = 156; $i < 512; $i++) + $checksum += ord($header{$i}); + + if ($current['checksum'] != $checksum) + return $return; + + $size = ceil($current['size'] / 512); + $current['data'] = substr($data, ++$offset << 9, $current['size']); + $offset += $size; + + // Not a directory and doesn't exist already... + if (substr($current['filename'], -1, 1) != '/' && !file_exists($destination . '/' . $current['filename'])) + $write_this = true; + // File exists... check if it is newer. + elseif (substr($current['filename'], -1, 1) != '/') + $write_this = $overwrite || filemtime($destination . '/' . $current['filename']) < $current['mtime']; + // Folder... create. + elseif ($destination !== null && !$single_file) + { + // Protect from accidental parent directory writing... + $current['filename'] = strtr($current['filename'], array('../' => '', '/..' => '')); + + if (!file_exists($destination . '/' . $current['filename'])) + mkdir($destination . '/' . $current['filename'], 0777); + $write_this = false; + } + else + $write_this = false; + + if ($write_this && $destination !== null) + { + if (strpos($current['filename'], '/') !== false && !$single_file) + { + $dirs = explode('/', $current['filename']); + array_pop($dirs); + + $dirpath = $destination . '/'; + foreach ($dirs as $dir) + { + if (!file_exists($dirpath . $dir)) + mkdir($dirpath . $dir, 0777); + $dirpath .= $dir . '/'; + } + } + + // Is this the file we're looking for? + if ($single_file && ($destination == $current['filename'] || $destination == '*/' . basename($current['filename']))) + return $current['data']; + // If we're looking for another file, keep going. + elseif ($single_file) + continue; + + file_put_contents($destination . '/' . $current['filename'], $current['data']); + } + + if (substr($current['filename'], -1, 1) != '/') + $return[] = array( + 'filename' => $current['filename'], + 'size' => $current['size'], + 'skipped' => false + ); + } + + if ($single_file) + return false; + else + return $return; +} + +// Extract zip data. If destination is null, return a listing. +function read_zip_data($data, $destination, $single_file = false, $overwrite = false) +{ + umask(0); + if ($destination !== null && !file_exists($destination) && !$single_file) + mkdir($destination, 0777); + + // Look for the PK header... + if (substr($data, 0, 2) != 'PK') + return false; + + // Find the central whosamawhatsit at the end; if there's a comment it's a pain. + if (substr($data, -22, 4) == 'PK' . chr(5) . chr(6)) + $p = -22; + else + { + // Have to find where the comment begins, ugh. + for ($p = -22; $p > -strlen($data); $p--) + { + if (substr($data, $p, 4) == 'PK' . chr(5) . chr(6)) + break; + } + } + + $return = array(); + + // Get the basic zip file info. + $zip_info = unpack('vfiles/Vsize/Voffset', substr($data, $p + 10, 10)); + + $p = $zip_info['offset']; + for ($i = 0; $i < $zip_info['files']; $i++) + { + // Make sure this is a file entry... + if (substr($data, $p, 4) != 'PK' . chr(1) . chr(2)) + return false; + + // Get all the important file information. + $file_info = unpack('Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', substr($data, $p + 16, 30)); + $file_info['filename'] = substr($data, $p + 46, $file_info['filename_len']); + + // Skip all the information we don't care about anyway. + $p += 46 + $file_info['filename_len'] + $file_info['extra_len'] + $file_info['comment_len']; + + // If this is a file, and it doesn't exist.... happy days! + if (substr($file_info['filename'], -1, 1) != '/' && !file_exists($destination . '/' . $file_info['filename'])) + $write_this = true; + // If the file exists, we may not want to overwrite it. + elseif (substr($file_info['filename'], -1, 1) != '/') + $write_this = $overwrite; + // This is a directory, so we're gonna want to create it. (probably...) + elseif ($destination !== null && !$single_file) + { + // Just a little accident prevention, don't mind me. + $file_info['filename'] = strtr($file_info['filename'], array('../' => '', '/..' => '')); + + if (!file_exists($destination . '/' . $file_info['filename'])) + mkdir($destination . '/' . $file_info['filename'], 0777); + $write_this = false; + } + else + $write_this = false; + + // Okay! We can write this file, looks good from here... + if ($write_this && $destination !== null) + { + if (strpos($file_info['filename'], '/') !== false && !$single_file) + { + // Make any parents this file may need to have for things to work out. + $dirs = explode('/', $file_info['filename']); + array_pop($dirs); + + $dirpath = $destination . '/'; + foreach ($dirs as $dir) + { + if (!file_exists($dirpath . $dir)) + mkdir($dirpath . $dir, 0777); + $dirpath .= $dir . '/'; + } + } + + // Check that the data is there and does exist. + if (substr($data, $file_info['offset'], 4) != 'PK' . chr(3) . chr(4)) + return false; + + // Get the actual compressed data. + $file_info['data'] = substr($data, $file_info['offset'] + 30 + $file_info['filename_len'] + $file_info['extra_len'], $file_info['compressed_size']); + + // Only inflate it if we need to ;). + if ($file_info['compressed_size'] != $file_info['size']) + $file_info['data'] = @gzinflate($file_info['data']); + + // If we're looking for a specific file, and this is it... ka-bam, baby. + if ($single_file && ($destination == $file_info['filename'] || $destination == '*/' . basename($file_info['filename']))) + return $file_info['data']; + // Oh? Another file. Fine. You don't like this file, do you? I know how it is. Yeah... just go away. No, don't apologize. I know this file's just not *good enough* for you. + elseif ($single_file) + continue; + + file_put_contents($destination . '/' . $file_info['filename'], $file_info['data']); + } + + if (substr($file_info['filename'], -1, 1) != '/') + $return[] = array( + 'filename' => $file_info['filename'], + 'size' => $file_info['size'], + 'skipped' => false + ); + } + + if ($single_file) + return false; + else + return $return; +} + +// Checks the existence of a remote file since file_exists() does not do remote. +function url_exists($url) +{ + $a_url = parse_url($url); + + if (!isset($a_url['scheme'])) + return false; + + // Attempt to connect... + $temp = ''; + $fid = fsockopen($a_url['host'], !isset($a_url['port']) ? 80 : $a_url['port'], $temp, $temp, 8); + if (!$fid) + return false; + + fputs($fid, 'HEAD ' . $a_url['path'] . " HTTP/1.0\r\nHost: " . $a_url['host'] . "\r\n\r\n"); + $head = fread($fid, 1024); + fclose($fid); + + return preg_match('~^HTTP/.+\s+200~i', $head) == 1; +} + +// Load the installed packages. +function loadInstalledPackages() +{ + global $boarddir; + + $installed_mods = file($boarddir . '/Packages/installed.list'); + + $installed = array(); + for ($i = 0, $n = count($installed_mods); $i < $n; $i++) + { + // Skip any empty lines. + if (trim($installed_mods[$i]) == '') + continue; + + // Ignore errors with borked installed.list's. + list ($name, $file, $id, $version) = array_pad(explode('|^|', $installed_mods[$i]), 4, ''); + + // Pretty simple, eh? + $installed[] = array( + 'name' => stripslashes($name), + 'filename' => stripslashes($file), + 'id' => $id, + 'version' => trim($version) + ); + } + + return $installed; +} + +function saveInstalledPackages($instmods) +{ + global $boarddir; + + // Attempt to make the installed.list file writable if it isn't yet. + if (!is_writable($boarddir . '/Packages/installed.list')) + @chmod($boarddir . '/Packages/installed.list', 0777); + + $data = ''; + foreach ($instmods as $packageInfo) + { + if (empty($packageInfo)) + continue; + + $data .= trim($packageInfo['name']) . '|^|' . trim($packageInfo['filename']) . '|^|' . trim($packageInfo['id']) . '|^|' . trim($packageInfo['version']) . "\n"; + } + file_put_contents($boarddir . '/Packages/installed.list', $data); +} + +function getPackageInfo($gzfilename) +{ + global $boarddir; + + // Extract package-info.xml from downloaded file. (*/ is used because it could be in any directory.) + if (strpos($gzfilename, 'http://') !== false) + $packageInfo = read_tgz_file($gzfilename, '*/package-info.xml', true); + else + { + if (!file_exists($boarddir . '/Packages/' . $gzfilename)) + return false; + + $packageInfo = read_tgz_file($boarddir . '/Packages/' . $gzfilename, '*/package-info.xml', true); + } + + // Parse package-info.xml into an xmlArray. + $packageInfo = new xmlArray($packageInfo); + + if (!$packageInfo->exists('package-info[0]')) + return false; + + $packageInfo = $packageInfo->path('package-info[0]'); + + $package = $packageInfo->to_array(); + $package['xml'] = $packageInfo; + $package['filename'] = $gzfilename; + + if (!isset($package['type'])) + $package['type'] = 'modification'; + + return $package; +} + +// Parses a package-info.xml file - method can be 'install', 'upgrade', or 'uninstall'. +function parsePackageInfo(&$packageXML, $testing_only = true, $method = 'install', $previous_version = '') +{ + global $boarddir, $forum_version; + + // Mayday! That action doesn't exist!! + if (!$packageXML->exists($method)) + return array(); + + // We haven't found the package script yet... + $script = false; + $the_version = strtr($forum_version, array('SMF ' => '')); + + // Get all the versions of this method and find the right one. + $these_methods = $packageXML->set($method); + foreach ($these_methods as $this_method) + { + // They specified certain versions this part is for. + if ($this_method->exists('@for')) + { + // Don't keep going if this won't work for this version of SMF. + if (!matchPackageVersion($the_version, $this_method->fetch('@for'))) + continue; + } + + // Upgrades may go from a certain old version of the mod. + if ($method == 'upgrade' && $this_method->exists('@from')) + { + // Well, this is for the wrong old version... + if (!matchPackageVersion($previous_version, $this_method->fetch('@from'))) + continue; + } + + // We've found it! + $script = $this_method; + break; + } + + // Bad news, a matching script wasn't found! + if ($script === false) + return array(); + + // Find all the actions in this method - in theory, these should only be allowed actions. (* means all.) + $actions = $script->set('*'); + $return = array(); + + $temp_auto = 0; + + // This is the testing phase... nothing shall be done yet. + foreach ($actions as $action) + { + $actionType = $action->name(); + + if ($actionType == 'readme' || $actionType == 'code' || $actionType == 'modification') + { + if ($action->exists('@type') && $action->fetch('@type') == 'inline') + { + $filename = $boarddir . '/Packages/temp/$auto_' . $temp_auto++ . ($actionType == 'readme' ? '.txt' : ($actionType == 'code' ? '.php' : '.mod')); + file_put_contents($filename, $action->fetch('.')); + $filename = strtr($filename, array($boarddir . '/Packages/temp/' => '')); + } + else + $filename = $action->fetch('.'); + + $return[] = array( + 'type' => $actionType, + 'filename' => $filename, + 'description' => '', + 'reverse' => $action->exists('@reverse') && $action->fetch('@reverse') == 'true', + 'boardmod' => $action->exists('@format') && $action->fetch('@format') == 'boardmod', + ); + + continue; + } + + $this_action = &$return[]; + $this_action = array( + 'type' => $actionType, + 'filename' => $action->fetch('@name'), + 'description' => $action->fetch('.') + ); + + // If there is a destination, make sure it makes sense. + if (substr($actionType, 0, 6) != 'remove') + $this_action['destination'] = parse_path($action->fetch('@destination')) . '/' . basename($this_action['filename']); + else + $this_action['filename'] = parse_path($this_action['filename']); + + // If we're moving or requiring (copying) a file + if (substr($actionType, 0, 4) == 'move' || substr($actionType, 0, 7) == 'require') + { + if ($action->exists('@from')) + $this_action['source'] = parse_path($action->fetch('@from')); + else + $this_action['source'] = $boarddir . '/Packages/temp/' . $this_action['filename']; + } + + // Check if these things can be done. (chmod's etc.) + if ($actionType == 'create-dir') + { + if (!mktree($this_action['destination'], false)) + { + $temp = $this_action['destination']; + while (!file_exists($temp) && strlen($temp) > 1) + $temp = dirname($temp); + + $return[] = array( + 'type' => 'chmod', + 'filename' => $temp + ); + } + } + elseif ($actionType == 'create-file') + { + if (!mktree(dirname($this_action['destination']), false)) + { + $temp = dirname($this_action['destination']); + while (!file_exists($temp) && strlen($temp) > 1) + $temp = dirname($temp); + + $return[] = array( + 'type' => 'chmod', + 'filename' => $temp + ); + } + + if (!is_writable($this_action['destination']) && (file_exists($this_action['destination']) || !is_writable(dirname($this_action['destination'])))) + $return[] = array( + 'type' => 'chmod', + 'filename' => $this_action['destination'] + ); + } + elseif ($actionType == 'require-dir') + { + if (!mktree($this_action['destination'], false)) + { + $temp = $this_action['destination']; + while (!file_exists($temp) && strlen($temp) > 1) + $temp = dirname($temp); + + $return[] = array( + 'type' => 'chmod', + 'filename' => $temp + ); + } + } + elseif ($actionType == 'require-file') + { + if (!mktree(dirname($this_action['destination']), false)) + { + $temp = dirname($this_action['destination']); + while (!file_exists($temp) && strlen($temp) > 1) + $temp = dirname($temp); + + $return[] = array( + 'type' => 'chmod', + 'filename' => $temp + ); + } + + if (!is_writable($this_action['destination']) && (file_exists($this_action['destination']) || !is_writable(dirname($this_action['destination'])))) + $return[] = array( + 'type' => 'chmod', + 'filename' => $this_action['destination'] + ); + } + elseif ($actionType == 'move-dir' || $actionType == 'move-file') + { + if (!mktree(dirname($this_action['destination']), false)) + { + $temp = dirname($this_action['destination']); + while (!file_exists($temp) && strlen($temp) > 1) + $temp = dirname($temp); + + $return[] = array( + 'type' => 'chmod', + 'filename' => $temp + ); + } + + if (!is_writable($this_action['destination']) && (file_exists($this_action['destination']) || !is_writable(dirname($this_action['destination'])))) + $return[] = array( + 'type' => 'chmod', + 'filename' => $this_action['destination'] + ); + } + elseif ($actionType == 'remove-dir') + { + if (!is_writable($this_action['filename']) && file_exists($this_action['destination'])) + $return[] = array( + 'type' => 'chmod', + 'filename' => $this_action['filename'] + ); + } + elseif ($actionType == 'remove-file') + { + if (!is_writable($this_action['filename']) && file_exists($this_action['filename'])) + $return[] = array( + 'type' => 'chmod', + 'filename' => $this_action['filename'] + ); + } + } + + // Only testing - just return a list of things to be done. + if ($testing_only) + return $return; + + umask(0); + + $failure = false; + $not_done = array(array('type' => '!')); + foreach ($return as $action) + { + if ($action['type'] == 'modification' || $action['type'] == 'code') + $not_done[] = $action; + + if ($action['type'] == 'create-dir') + $failure |= !mktree($action['destination'], 0777); + elseif ($action['type'] == 'create-file') + { + $failure |= !mktree(dirname($action['destination']), 0777); + + // Create an empty file. + $f = fopen($action['destination'], 'w'); + + if ($f == false) + $failure = true; + else + fclose($f); + } + elseif ($action['type'] == 'require-dir') + copytree($action['source'], $action['destination']); + elseif ($action['type'] == 'require-file') + { + $failure |= !mktree(dirname($action['destination']), 0777); + + if (!is_writable($action['destination'])) + @chmod($action['destination'], 0777); + + $failure |= !copy($action['source'], $action['destination']); + } + elseif ($action['type'] == 'move-dir' || $action['type'] == 'move-file') + { + $failure |= !mktree(dirname($action['destination']), 0777); + + $failure |= !rename($action['source'], $action['destination']); + } + elseif ($action['type'] == 'remove-dir') + deltree($action['filename']); + elseif ($action['type'] == 'remove-file') + { + if (!is_writable($action['filename'])) + @chmod($action['filename'], 0777); + + $failure |= !unlink($action['filename']); + } + } + + return $not_done; +} + +// This is such a pain I created a function for it :P. +function matchPackageVersion($version, $versions) +{ + $for = explode(',', $versions); + + // Trim them all! + for ($i = 0, $n = count($for); $i < $n; $i++) + $for[$i] = trim($for[$i]); + + // The version is explicitly defined... too easy. + if (in_array($version, $for)) + return true; + + foreach ($for as $list) + { + // Look for a version specification like "1.0-1.2". + if (strpos($list, '-') === false) + continue; + + list ($lower, $upper) = explode('-', $list); + if (trim($lower) < $version && trim($upper) > $version) + return true; + } + + // Well, I guess it doesn't match... + return false; +} + +function parse_path($path) +{ + global $modSettings, $boarddir, $sourcedir, $settings; + + $search = array( + '\\', + '$boarddir', + '$sourcedir', + '$avatardir', + '$themedir', + '$languagedir', + '$smileysdir', + ); + $replace = array( + '/', + $boarddir, + $sourcedir, + $modSettings['avatar_directory'], + $settings['default_theme_dir'], + $settings['default_theme_dir'] . '/languages', + $modSettings['smileys_dir'], + ); + + return str_replace($search, $replace, $path); +} + +function deltree($dir, $delete_dir = true) +{ + if (!file_exists($dir)) + return; + + $current_dir = opendir($dir); + if ($current_dir == false) + return; + + while ($entryname = readdir($current_dir)) + { + if (in_array($entryname, array('.', '..'))) + continue; + + if (is_dir($dir . '/' . $entryname)) + deltree($dir . '/' . $entryname); + else + { + if (!is_writable($dir . '/' . $entryname)) + @chmod($dir . '/' . $entryname, 0777); + unlink($dir . '/' . $entryname); + } + } + + closedir($current_dir); + + if ($delete_dir) + { + if (!is_writable($dir)) + @chmod($dir, 0777); + rmdir($dir); + } +} + +function mktree($strPath, $mode) +{ + if (is_dir($strPath)) + { + if (!is_writable($strPath) && $mode !== false) + @chmod($strPath, $mode); + return is_writable($strPath); + } + + if (!mktree(dirname($strPath), $mode)) + return false; + + if (!is_writable(dirname($strPath)) && $mode !== false) + @chmod(dirname($strPath), $mode); + + return $mode === false ? is_writable(dirname($strPath)) || file_exists($strPath) : mkdir($strPath, $mode); +} + +function copytree($source, $destination) +{ + if (!file_exists($destination)) + mktree($destination, 0777); + elseif (!is_writable($destination)) + @chmod($destination, 0777); + + $current_dir = opendir($source); + if ($current_dir == false) + return; + + while ($entryname = readdir($current_dir)) + { + if (in_array($entryname, array('.', '..'))) + continue; + + if (is_dir($source . '/' . $entryname)) + copytree($source . '/' . $entryname, $destination . '/' . $entryname); + else + copy($source . '/' . $entryname, $destination . '/' . $entryname); + } + + closedir($current_dir); +} + +// Parse an xml based modification file. +function parseModification($file, $testing = true, $undo = false) +{ + global $boarddir, $sourcedir, $settings, $txt, $modSettings; + + @set_time_limit(600); + $xml = new xmlArray(strtr($file, array("\r" => ''))); + $actions = array(); + $everything_found = true; + + if (!$xml->exists('modification') || !$xml->exists('modification/file')) + { + $actions[] = array( + 'type' => 'error', + 'filename' => '-', + 'debug' => $txt['package_modification_malformed'] + ); + return $actions; + } + + $files = $xml->set('modification/file'); + foreach ($files as $file) + { + $working_file = parse_path(trim($file->fetch('@name'))); + + // Doesn't exist - give an error or what? + if (!file_exists($working_file) && (!$file->exists('@error') || (trim($file->fetch('@error')) != 'ignore' && trim($file->fetch('@error')) != 'skip'))) + { + $actions[] = array( + 'type' => 'missing', + 'filename' => $working_file, + 'debug' => $txt['package_modification_missing'] + ); + + $everything_found = false; + continue; + } + // Skip the file if it doesn't exist. + elseif (!file_exists($working_file) && $file->exists('@error') && trim($file->fetch('@error')) == 'skip') + continue; + // Okay, we're creating this file then...? + elseif (!file_exists($working_file)) + $working_data = ''; + // Phew, it exists! Load 'er up! + else + $working_data = str_replace("\r", '', implode('', file($working_file))); + + $actions[] = array( + 'type' => 'opened', + 'filename' => $working_file + ); + + $operations = $file->exists('operation') ? $file->set('operation') : array(); + foreach ($operations as $operation) + { + // Special case: find the end of the file! + if ($operation->exists('search/@position') && trim($operation->fetch('search/@position')) == 'end') + { + $replace_with = $operation->fetch('add'); + + if (substr(rtrim($working_data), -3) == "\n?" . '>') + $working_data = substr(rtrim($working_data), 0, -3) . $replace_with . "\n?" . '>'; + else + $working_data = $working_data . $replace_with; + + $actions[] = array( + 'type' => 'append', + 'filename' => $working_file, + 'add' => $replace_with + ); + } + // Otherwise we will need to look for the search data. + else + { + // Start with what we have.... + $working_search = ''; + $replace_with = $operation->exists('add') ? $operation->fetch('add') : ''; + + // Are we doing a fancy-shmancy regexp search? + $regexp = false; + + $temp_searches = $operation->set('search'); + if (count($temp_searches) > 1) + { + // Resort the list so replace comes first - it must. + $searches = array(); + foreach ($temp_searches as $i => $v) + { + // A quick check on whether it's a regular expression search... + if (!$undo && $temp_searches[$i]->exists('@regexp') && trim($temp_searches[$i]->fetch('@regexp')) == 'true') + $regexp = true; + + if (!$v->exists('@position') || ($v->fetch('@position') != 'before' && $v->fetch('@position') != 'after')) + { + $searches[] = $v; + unset($temp_searches[$i]); + } + } + + // Add on the rest, in the order they were in. + $searches = array_merge($searches, $temp_searches); + } + else + { + $searches = $temp_searches; + $regexp = !$undo && $searches[0]->exists('@regexp') && trim($searches[0]->fetch('@regexp')) == 'true'; + } + + // If we're not using regular expression search, replace out any $'s and \'s! + if (!$regexp) + { + // Shuzzup. This is done so we can safely use a regular expression. ($0 is bad!!) + if (!$undo) + $replace_with = strtr($replace_with, array('$' => '[$PACK' . 'AGE1$]', '\\' => '[$PACK' . 'AGE2$]')); + else + $replace_with = preg_quote($replace_with, '~'); + } + + // Go through all the search conditions. + foreach ($searches as $search) + { + $this_clean_search = $search->fetch('.'); + + // Are we not using regular expressions explicitly? + if (!$regexp) + { + $this_search = preg_quote($this_clean_search, '~'); + + // Remember, can't have whitespace correction and regexp on at the same time. + if ($search->exists('@whitespace') && trim($search->fetch('@whitespace')) != 'loose') + $this_search = preg_replace('~[ \t]+~', '[ \t]+', $this_search); + + // Shuzzup again. Read the comment above a few lines where this is done to $replace_with... + if ($undo) + $working_search = strtr($working_search, array('$' => '[$PACK' . 'AGE1$]', '\\' => '[$PACK' . 'AGE2$]')); + } + else + $this_search = $this_clean_search; + + // Get the position to replace on. + $position = $search->exists('@position') ? trim($search->fetch('@position')) : 'replace'; + + if ($position == 'before') + { + if (!$regexp) + { + if (!$undo) + { + $working_search = '(' . $this_search . ')' . $working_search; + $replace_with = '$1' . $replace_with; + } + else + { + $working_search = '$1' . $working_search; + $replace_with = '(' . $this_search . ')' . $replace_with; + } + } + else + { + $working_search = $this_search . $working_search; + $replace_with = $this_clean_search . $replace_with; + } + } + elseif ($position == 'after') + { + if (!$regexp) + { + if (!$undo) + { + $working_search = $working_search . '(' . $this_search . ')'; + $replace_with = $replace_with . '$1'; + } + else + { + $working_search = $working_search . '$1'; + $replace_with = $replace_with . '(' . $this_search . ')'; + } + } + else + { + $working_search = $working_search . $this_search; + $replace_with = $replace_with . $this_clean_search; + } + } + else + { + if (!$undo) + $working_search = $this_search; + else + $working_search = $this_clean_search; + } + } + + if ($undo) + { + $temp = $replace_with; + $replace_with = $working_search; + $working_search = $temp; + + // We can't undo this! + if (trim($working_search) == '' || trim($replace_with) == '') + continue; + } + elseif ($working_search == '') + continue; + + $failed = preg_match('~' . $working_search . '~s', $working_data) == 0; + if ($failed && (!$operation->exists('@error') || $operation->fetch('@error') == 'fatal')) + { + $actions[] = array( + 'type' => 'failure', + 'filename' => $working_file, + 'search' => $working_search + ); + + $everything_found = false; + continue; + } + elseif (!$failed && $operation->exists('@error') && $operation->fetch('@error') == 'required') + { + $actions[] = array( + 'type' => 'failure', + 'filename' => $working_file, + 'search' => $working_search + ); + + $everything_found = false; + continue; + } + + if ($replace_with == '') + continue; + + $working_data = preg_replace('~' . $working_search . '~s', $replace_with, $working_data); + + $actions[] = array( + 'type' => 'replace', + 'filename' => $working_file, + 'search' => $working_search, + 'replace' => $replace_with + ); + } + } + + // Fix any little helper symbols ;). + $working_data = strtr($working_data, array('[$PACK' . 'AGE1$]' => '$', '[$PACK' . 'AGE2$]' => '\\')); + + if (file_exists($working_file) && !is_writable($working_file)) + @chmod($working_file, 0755); + if (file_exists($working_file) && !is_writable($working_file)) + @chmod($working_file, 0777); + + if (!file_exists($working_file) && !is_writable(dirname($working_file))) + @chmod(dirname($working_file), 0755); + if (!file_exists($working_file) && !is_writable(dirname($working_file))) + @chmod(dirname($working_file), 0777); + + if ((file_exists($working_file) && !is_writable($working_file)) || !is_writable(dirname($working_file))) + $actions[] = array( + 'type' => 'chmod', + 'filename' => $working_file + ); + + if (basename($working_file) == 'Settings_bak.php') + continue; + + if (!$testing) + { + if (!empty($modSettings['package_make_backups']) && file_exists($working_file)) + { + // No, no, not Settings.php! + if (basename($working_file) == 'Settings.php') + copy($working_file, dirname($working_file) . '/Settings_bak.php'); + else + copy($working_file, $working_file . '~'); + } + + file_put_contents($working_file, $working_data); + } + + $actions[] = array( + 'type' => 'saved', + 'filename' => $working_file + ); + } + + $actions[] = array( + 'type' => 'result', + 'status' => $everything_found + ); + + return $actions; +} + +// Parses a BoardMod format mod file... +function parseBoardMod($file, $testing = true, $undo = false) +{ + global $boarddir, $sourcedir, $settings, $txt, $modSettings; + + @set_time_limit(600); + $file = strtr($file, array("\r" => '')); + + $working_file = null; + $working_search = null; + $working_data = ''; + $replace_with = null; + + $actions = array(); + $everything_found = true; + + while (preg_match('~<(edit file|file|search|search for|add|add after|replace|add before|before)>\n(.*?)\n~is', $file, $code_match) != 0) + { + // Edit a specific file. + if ($code_match[1] == 'file' || $code_match[1] == 'edit file') + { + // Backup the old file. + if ($working_file !== null) + { + if (file_exists($working_file) && !is_writable($working_file)) + @chmod($working_file, 0777); + elseif (!is_writable(dirname($working_file))) + @chmod(dirname($working_file), 0777); + + // Don't even dare. + if (basename($working_file) == 'Settings_bak.php') + continue; + + if (!is_writable($working_file)) + $actions[] = array( + 'type' => 'chmod', + 'filename' => $working_file + ); + + if (!$testing) + { + if (!empty($modSettings['package_make_backups']) && file_exists($working_file)) + { + if (basename($working_file) == 'Settings.php') + copy($working_file, dirname($working_file) . '/Settings_bak.php'); + else + copy($working_file, $working_file . '~'); + } + + file_put_contents($working_file, $working_data); + } + } + + if ($working_file !== null) + $actions[] = array( + 'type' => 'saved', + 'filename' => $working_file + ); + + // Make sure the file exists! + $code_match[2] = parse_path($code_match[2]); + $working_file = $code_match[2]; + if (!file_exists($code_match[2])) + { + $places_to_check = array($boarddir, $sourcedir, $settings['default_theme_dir'], $settings['default_theme_dir'] . '/languages'); + + foreach ($places_to_check as $place) + if (file_exists($place . '/' . $code_match[2])) + { + $code_match[2] = $place . '/' . $code_match[2]; + break; + } + } + + if (file_exists($code_match[2])) + { + // Load the new file. + $working_data = str_replace("\r", '', implode('', file($code_match[2]))); + + $actions[] = array( + 'type' => 'opened', + 'filename' => $working_file + ); + } + else + { + $actions[] = array( + 'type' => 'missing', + 'filename' => $working_file + ); + + $working_file = null; + $everything_found = false; + } + + // Can't be searching for something... + $working_search = null; + } + // Search for a specific string. + elseif (($code_match[1] == 'search' || $code_match[1] == 'search for') && $working_file !== null) + { + if ($working_search !== null) + { + $actions[] = array( + 'type' => 'error', + 'filename' => $working_file + ); + + $everything_found = false; + } + + $working_search = $code_match[2]; + } + // Must've already loaded a search string. + elseif ($working_search !== null) + { + // This is the base string.... + $replace_with = $code_match[2]; + + // Add this afterward... + if ($code_match[1] == 'add' || $code_match[1] == 'add after') + $replace_with = $working_search . "\n" . $replace_with; + // Add this beforehand. + elseif ($code_match[1] == 'before' || $code_match[1] == 'add before') + $replace_with .= "\n" . $working_search; + // Otherwise.. replace with $replace_with ;). + } + + // If we have a search string, replace string, and open file.. + if ($working_search !== null && $replace_with !== null && $working_file !== null) + { + // Make sure it's somewhere in the string. + if ($undo) + { + $temp = $replace_with; + $replace_with = $working_search; + $working_search = $temp; + } + + if (strpos($working_data, $working_search) !== false) + { + $working_data = str_replace($working_search, $replace_with, $working_data); + + $actions[] = array( + 'type' => 'replace', + 'filename' => $working_file, + 'search' => $working_search, + 'replace' => $replace_with + ); + } + // It wasn't found! + else + { + $actions[] = array( + 'type' => 'failure', + 'filename' => $working_file, + 'search' => $working_search + ); + + $everything_found = false; + } + + // These don't hold any meaning now. + $working_search = null; + $replace_with = null; + } + + // Get rid of the old tag. + $file = substr_replace($file, '', strpos($file, $code_match[0]), strlen($code_match[0])); + } + + // Backup the old file. + if ($working_file !== null) + { + if (file_exists($working_file) && !is_writable($working_file)) + @chmod($working_file, 0777); + elseif (!is_writable(dirname($working_file))) + @chmod(dirname($working_file), 0777); + + if (!is_writable($working_file)) + $actions[] = array( + 'type' => 'chmod', + 'filename' => $working_file + ); + + if (!$testing) + { + if (!empty($modSettings['package_make_backups']) && file_exists($working_file)) + copy($working_file, $working_file . '~'); + + file_put_contents($working_file, $working_data); + } + } + + if ($working_file !== null) + $actions[] = array( + 'type' => 'saved', + 'filename' => $working_file + ); + + $actions[] = array( + 'type' => 'result', + 'status' => $everything_found + ); + + return $actions; +} + +// Create a file - this is defined in PHP 5, just use the same function name. +if (!function_exists('file_put_contents')) +{ + function file_put_contents($filename, $data) + { + $text_filetypes = array('php', 'txt', '.js', 'css', 'vbs', 'tml', 'htm'); + + $fp = fopen($filename, in_array(substr($filename, -3), $text_filetypes) ? 'w' : 'wb'); + + if (!$fp) + return 0; + + fwrite($fp, $data); + fclose($fp); + + return strlen($data); + } +} + +// An xml array. Reads in xml, allows you to access it simply. Version 1.1. +class xmlArray +{ + // The array and debugging output level. + var $array, $debug_level, $trim; + + // Create an xml array. + // the xml data, trim elements?, debugging output level, reserved. + //ie. $xml = new xmlArray(file('data.xml')); + function xmlArray($data, $auto_trim = false, $level = null, $is_clone = false) + { + // Set the debug level. + $this->debug_level = $level !== null ? $level : error_reporting(); + $this->trim = $auto_trim; + + // Is the data already parsed? + if ($is_clone) + { + $this->array = $data; + return; + } + + // Is the input an array? (ie. passed from file()?) + if (is_array($data)) + $data = implode('', $data); + + // Remove any xml declaration or doctype, and parse out comments and CDATA. + $data = $this->_to_cdata(preg_replace(array('/^<\?xml.+?\?>/is', '/]+?>/s', '//s'), '', $data)); + + // Now parse the xml! + $this->array = $this->_parse($data); + } + + // Get the root element's name. + //ie. echo $element->name(); + function name() + { + return isset($this->array['name']) ? $this->array['name'] : ''; + } + + // Get a specified element's value or attribute by path. + // the path to the element to fetch, whether to include elements? + //ie. $data = $xml->fetch('html/head/title'); + function fetch($path, $get_elements = false) + { + // Get the element, in array form. + $array = $this->path($path); + + if ($array === false) + return false; + + // Getting elements into this is a bit complicated... + if ($get_elements && !is_string($array)) + { + $temp = ''; + + // Use the _xml() function to get the xml data. + foreach ($array->array as $val) + { + // Skip the name and any attributes. + if (is_array($val)) + $temp .= $this->_xml($val, null); + } + + // Just get the XML data and then take out the CDATAs. + return $this->_to_cdata($temp); + } + + // Return the value - taking care to pick out all the text values. + return is_string($array) ? $array : $this->_fetch($array->array); + } + + // Get an element, returns a new xmlArray. + // the path to the element to get, always return full result set? (ie. don't contract a single item.) + //ie. $element = $xml->path('html/body'); + function path($path, $return_full = false) + { + // Split up the path. + $path = explode('/', $path); + + // Start with a base array. + $array = $this->array; + + // For each element in the path. + foreach ($path as $el) + { + // Deal with sets.... + if (strpos($el, '[') !== false) + { + $lvl = (int) substr($el, strpos($el, '[') + 1); + $el = substr($el, 0, strpos($el, '[')); + } + // Find an attribute. + elseif (substr($el, 0, 1) == '@') + { + // It simplifies things if the attribute is already there ;). + if (isset($array[$el])) + return $array[$el]; + else + { + // Cause an error. + if ($this->debug_level & E_NOTICE) + trigger_error('Undefined XML attribute: ' . substr($el, 1), E_USER_NOTICE); + return false; + } + } + else + $lvl = null; + + // Find this element. + $array = $this->_path($array, $el, $lvl); + } + + // Clean up after $lvl, for $return_full. + if ($return_full && (!isset($array['name']) || substr($array['name'], -1) != ']')) + $array = array('name' => $el . '[]', $array); + + // Create the right type of class... + $newClass = get_class($this); + + // Return a new xmlArray for the result. + return $array === false ? false : new $newClass($array, $this->trim, $this->debug_level, true); + } + + // Check if an element exists. + // the path to the element to get. + //ie. echo $xml->exists('html/body') ? 'y' : 'n'; + function exists($path) + { + // Split up the path. + $path = explode('/', $path); + + // Start with a base array. + $array = $this->array; + + // For each element in the path. + foreach ($path as $el) + { + // Deal with sets.... + if (strpos($el, '[') !== false) + { + $lvl = (int) substr($el, strpos($el, '[') + 1); + $el = substr($el, 0, strpos($el, '[')); + } + // Find an attribute. + elseif (substr($el, 0, 1) == '@') + return isset($array[$el]); + else + $lvl = null; + + // Find this element. + $array = $this->_path($array, $el, $lvl, true); + } + + return $array !== false; + } + + // Count the number of occurances of a path. + // the path to search for. + //ie. echo $xml->count('html/head/meta'); + function count($path) + { + // Get the element, always returning a full set. + $temp = $this->path($path, true); + + // Start at zero, then count up all the numeric keys. + $i = 0; + foreach ($temp->array as $item) + { + if (is_array($item)) + $i++; + } + + return $i; + } + + // Get an array of xmlArray's for use with foreach. + // the path to search for. + //ie. foreach ($xml->set('html/body/p') as $p) + function set($path) + { + // None as yet, just get the path. + $array = array(); + $xml = $this->path($path, true); + + foreach ($xml->array as $val) + { + // Skip these, they aren't elements. + if (!is_array($val) || $val['name'] == '!') + continue; + + // Create the right type of class... + $newClass = get_class($this); + + // Create a new xmlArray and stick it in the array. + $array[] = new $newClass($val, $this->trim, $this->debug_level, true); + } + + return $array; + } + + // Create an xml file from an xml array. + // the path to the element. (optional) + //ie. echo $this->create_xml() + function create_xml($path = null) + { + // Was a path specified? If so, use that array. + if ($path !== null) + { + $path = $this->path($path); + + // The path was not found!!! + if ($path === false) + return false; + + $path = $path->array; + } + // Just use the current array. + else + $path = $this->array; + + // Add the xml declaration to the front. + return '' . $this->_xml($path, 0); + } + + // Output the xml in an array form. + // the path to output. + //ie. print_r($xml->to_array()); + function to_array($path = null) + { + // Are we doing a specific path? + if ($path !== null) + { + $path = $this->path($path); + + // The path was not found!!! + if ($path === false) + return false; + + $path = $path->array; + } + // No, so just use the current array. + else + $path = $this->array; + + return $this->_array($path); + } + + // Parse data into an array. (privately used...) + function _parse($data) + { + // Start with an 'empty' array with no data. + $current = array( + ); + + // Loop until we're out of data. + while ($data != '') + { + // Find and remove the next tag. + preg_match('/\A<([\w\-:]+)((?:\s+.+?)?)(\s\/)?>/', $data, $match); + if (isset($match[0])) + $data = preg_replace('/' . preg_quote($match[0], '/') . '/s', '', $data, 1); + + // Didn't find a tag? Keep looping.... + if (!isset($match[1]) || $match[1] == '') + { + // If there's no <, the rest is data. + if (strpos($data, '<') === false) + { + $text_value = $this->_from_cdata($data); + $data = ''; + + if ($text_value != '') + $current[] = array( + 'name' => '!', + 'value' => $text_value + ); + } + // If the < isn't immediately next to the current position... more data. + elseif (strpos($data, '<') > 0) + { + $text_value = $this->_from_cdata(substr($data, 0, strpos($data, '<'))); + $data = substr($data, strpos($data, '<')); + + if ($text_value != '') + $current[] = array( + 'name' => '!', + 'value' => $text_value + ); + } + // If we're looking at a with no start, kill it. + elseif (strpos($data, '<') !== false && strpos($data, '<') == 0) + { + if (strpos($data, '<', 1) !== false) + { + $text_value = $this->_from_cdata(substr($data, 0, strpos($data, '<', 1))); + $data = substr($data, strpos($data, '<', 1)); + + if ($text_value != '') + $current[] = array( + 'name' => '!', + 'value' => $text_value + ); + } + else + { + $text_value = $this->_from_cdata($data); + $data = ''; + + if ($text_value != '') + $current[] = array( + 'name' => '!', + 'value' => $text_value + ); + } + } + + // Wait for an actual occurance of an element. + continue; + } + + // Create a new element in the array. + $el = &$current[]; + $el['name'] = $match[1]; + + // If this ISN'T empty, remove the close tag and parse the inner data. + if ((!isset($match[3]) || $match[3] != ' /') && (!isset($match[2]) || $match[2] != ' /')) + { + $tag = preg_quote($match[1], '/'); + $reg = '/\A(.*?(<' . $tag . ' .*?>.*?<\/' . $tag . '>.*?)*?)<\/' . $tag . '>/s'; + + // Remove the element and fetch the inner data. + preg_match($reg, $data, $inner_match); + $data = preg_replace($reg, '', $data, 1); + + if (!isset($inner_match[1])) + continue; + + // Parse the inner data. + if (strpos($inner_match[1], '<') !== false) + $el += $this->_parse($inner_match[1]); + elseif (trim($inner_match[1]) != '') + { + $text_value = $this->_from_cdata($inner_match[1]); + if ($text_value != '') + $el[] = array( + 'name' => '!', + 'value' => $text_value + ); + } + } + + // If we're dealing with attributes as well, parse them out. + if (isset($match[2]) && $match[2] != '') + { + // Find all the attribute pairs in the string. + preg_match_all('/([\w:]+)="(.+?)"/', $match[2], $attr, PREG_SET_ORDER); + + // Set them as @attribute-name. + foreach ($attr as $match_attr) + $el['@' . $match_attr[1]] = $match_attr[2]; + } + } + + // Return the parsed array. + return $current; + } + + // Get a specific element's xml. (priavtely used...) + function _xml($array, $indent) + { + $indentation = $indent !== null ? ' +' . str_repeat(' ', $indent) : ''; + + // This is a set of elements, with no name... + if (is_array($array) && !isset($array['name'])) + { + $temp = ''; + foreach ($array as $val) + $temp .= $this->_xml($val, $indent); + return $temp; + } + + // This is just text! + if ($array['name'] == '!') + return $indentation . ''; + elseif (substr($array['name'], -2) == '[]') + $array['name'] = substr($array['name'], 0, -2); + + // Start the element. + $output = $indentation . '<' . $array['name']; + + $inside_elements = false; + $output_el = ''; + + // Run through and recurively output all the elements or attrbutes inside this. + foreach ($array as $k => $v) + { + if (substr($k, 0, 1) == '@') + $output .= ' ' . substr($k, 1) . '="' . $v . '"'; + elseif (is_array($v)) + { + $output_el .= $this->_xml($v, $indent === null ? null : $indent + 1); + $inside_elements = true; + } + } + + // Indent, if necessary.... then close the tag. + if ($inside_elements) + $output .= '>' . $output_el . $indentation . ''; + else + $output .= ' />'; + + return $output; + } + + // Return an element as an array... + function _array($array) + { + $return = array(); + $text = ''; + foreach ($array as $value) + { + if (!is_array($value) || !isset($value['name'])) + continue; + + if ($value['name'] == '!') + $text .= $value['value']; + else + $return[$value['name']] = $this->_array($value); + } + + if (empty($return)) + return $text; + else + return $return; + } + + // Parse out CDATA tags. (htmlspecialchars them...) + function _to_cdata($data) + { + // Match all of the CDATA tags. + preg_match_all('//s', $data, $match, PREG_SET_ORDER); + + // Replace them with htmlentities'd versions. + foreach ($match as $m) + $data = str_replace($m[0], htmlentities($m[1], ENT_QUOTES), $data); + + return $data; + } + + // Turn the CDATAs back to normal text. + function _from_cdata($data) + { + // Get the HTML translation table and reverse it. + $trans_tbl = array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES)); + + // Translate all the entities out. + $data = strtr(preg_replace('~&#(\d{1,4});~e', "chr('\$1')", $data), $trans_tbl); + + return $this->trim ? trim($data) : $data; + } + + // Given an array, return the text from that array. (recursive and privately used.) + function _fetch($array) + { + // Don't return anything if this is just a string. + if (is_string($array)) + return ''; + + $temp = ''; + foreach ($array as $text) + { + // This means it's most likely an attribute or the name itself. + if (!isset($text['name'])) + continue; + + // This is text! + if ($text['name'] == '!') + $temp .= $text['value']; + // Another element - dive in ;). + else + $temp .= $this->_fetch($text); + } + + // Return all the bits and pieces we've put together. + return $temp; + } + + // Get a specific array by path, one level down. (privately used...) + function _path($array, $path, $level, $no_error = false) + { + // Is $array even an array? It might be false! + if (!is_array($array)) + return false; + + // Asking for *no* path? + if ($path == '' || $path == '.') + return $array; + $paths = explode('|', $path); + + // A * means all elements of any name. + $show_all = in_array('*', $paths); + + $results = array(); + + // Check each element. + foreach ($array as $value) + { + if (!is_array($value) || $value['name'] === '!') + continue; + + if ($show_all || in_array($value['name'], $paths)) + { + // Skip elements before "the one". + if ($level !== null && $level > 0) + $level--; + else + $results[] = $value; + } + } + + // No results found... + if (empty($results)) + { + // Cause an error. + if ($this->debug_level & E_NOTICE && !$no_error) + trigger_error('Undefined XML element: ' . $path, E_USER_NOTICE); + return false; + } + // Only one result. + elseif (count($results) == 1 || $level !== null) + return $results[0]; + // Return the result set. + else + return $results + array('name' => $path . '[]'); + } +} + +// http://www.faqs.org/rfcs/rfc959.html +class ftp_connection +{ + var $connection = 'no_connection', $error = false; + + // Create a new FTP connection... + function ftp_connection($ftp_server, $ftp_port, $ftp_user, $ftp_pass) + { + // Connect to the FTP server. + $this->connection = @fsockopen($ftp_server, $ftp_port, $err, $err, 5); + if (!$this->connection) + { + $this->error = 'bad_server'; + return; + } + + // Get the welcome message... + if (!$this->check_response(220)) + { + echo $this->error = 'bad_response'; + return; + } + + // Send the username, it should ask for a password. + fwrite($this->connection, 'USER ' . $ftp_user . "\r\n"); + if (!$this->check_response(331)) + { + $this->error = 'bad_username'; + return; + } + + // Now send the password... and hope it goes okay. + fwrite($this->connection, 'PASS ' . $ftp_pass . "\r\n"); + if (!$this->check_response(230)) + { + $this->error = 'bad_password'; + return; + } + } + + function chdir($ftp_path) + { + if (!is_resource($this->connection)) + return false; + + // No slash on the end, please... + if (substr($ftp_path, -1) == '/') + $ftp_path = substr($ftp_path, 0, -1); + + fwrite($this->connection, 'CWD ' . $ftp_path . "\r\n"); + if (!$this->check_response(250)) + { + $this->error = 'bad_path'; + return false; + } + + return true; + } + + function chmod($ftp_file, $chmod) + { + if (!is_resource($this->connection)) + return false; + + // Convert the chmod value from octal (0777) to text ("777"). + fwrite($this->connection, 'SITE CHMOD ' . decoct($chmod) . ' ' . $ftp_file . "\r\n"); + if (!$this->check_response(200)) + { + $this->error = 'bad_file'; + return false; + } + + return true; + } + + function unlink($ftp_file) + { + // We are actually connected, right? + if (!is_resource($this->connection)) + return false; + + // Delete file X. + fwrite($this->connection, 'DELE ' . $ftp_file . "\r\n"); + if (!$this->check_response(250)) + { + $this->error = 'bad_file'; + return false; + } + + return true; + } + + function check_response($desired) + { + // Wait for a response that isn't continued with -, but don't wait too long. + $time = time(); + do + $response = fgets($this->connection, 1024); + while (substr($response, 3, 1) != ' ' && time() - $time < 5); + + // Was the desired response returned? + return substr($response, 0, 3) == $desired; + } + + function close() + { + // Goodbye! + fwrite($this->connection, "QUIT\r\n"); + fclose($this->connection); + + return true; + } +} + +?> diff --git a/Sources/Subs-Post.php b/Sources/Subs-Post.php new file mode 100644 index 0000000..01839f2 --- /dev/null +++ b/Sources/Subs-Post.php @@ -0,0 +1,992 @@ +)/me(?: | )(.*?)([\r\n]|
    |\z)~i', '$1[me="' . $user_info['name'] . '"]$2[/me]$3', $message); + else + $message = preg_replace('~(\A|\n|
    )/me(?: | )(.*?)([\r\n]|
    |\z)~i', '$1[me=' . $user_info['name'] . ']$2[/me]$3', $message); + + // Remove \r's, replace tabs with spaces, two spaces with hard spaces, and \n's with breaks. (last is optional...) + $message = strtr($message, array("\r" => '', ' ' => '  ')); + if ($breaks) + $message = strtr($message, array("\n" => '
    ')); + + // Check if all quotes are closed... + $parts = preg_split('~(\[/quote\])~i', $message, -1, PREG_SPLIT_DELIM_CAPTURE); + + $level = 0; + for ($i = 0, $n = count($parts); $i < $n; $i++) + { + if (preg_match('~\[/quote\]~i',$parts[$i]) != 0) + $level--; + preg_match_all('~(\[quote=.+?\])|(\[quote author=.+?\])|(\[quote author=(.+?) link=(.+?) date=(.+?)\])|(\[quote\])~i', $parts[$i], $regs); + $level += count($regs[0]); + + // Add on extra [quote]s... + if ($level < 0) + { + $parts[$i] = str_repeat('[quote]', 0 - $level) . $parts[$i]; + $level = 0; + } + } + $message = implode('', $parts); + + // Add additional [/quote]s to the end. + if ($level > 0) + $message .= str_repeat('[/quote]', $level); + + // Check if all code tags are closed. + $codeopen = preg_match_all('~(?!\[)(\[code\])~i', $message, $dummy); + $codeclose = preg_match_all('~(?!\[)(\[/code\])~i', $message, $dummy); + + // Close/open all code tags... + if ($codeopen > $codeclose) + $message .= str_repeat('[/code]', $codeopen - $codeclose); + elseif ($codeclose > $codeopen) + $message = str_repeat('[code]', $codeclose - $codeopen) . $message; + + // Now that we've fixed all the code tags, let's fix the img and url tags... + $parts = preg_split('~\[/?code\]~i', $message); + + // Only mess with stuff outside [code] tags. + for ($i = 0, $n = count($parts); $i < $n; $i++) + { + // 1 (odd) means a code section, not post text. + if ($i % 2 == 1) + $parts[$i] = '[code]' . $parts[$i] . '[/code]'; + // Mess with the tags outside [code]. + else + fixTags($parts[$i]); + } + + // Put it back together and remove that first space. + $message = implode('', $parts); +} + +// Fix any URLs posted - ie. remove 'javascript:'. +function fixTags(&$message) +{ + global $modSettings; + + $fixArray = array + ( + // [img]http://...[/img] or [img width=1]http://...[/img] + array('tag' => 'img', 'protocol' => 'http', 'embeddedUrl' => false, 'hasEqualSign' => false, 'hasExtra' => true), + // [url]http://...[/url] + array('tag' => 'url', 'protocol' => 'http', 'embeddedUrl' => true, 'hasEqualSign' => false), + // [url=http://...]name[/url] + array('tag' => 'url', 'protocol' => 'http', 'embeddedUrl' => true, 'hasEqualSign' => true), + // [iurl]http://...[/iurl] + array('tag' => 'iurl', 'protocol' => 'http', 'embeddedUrl' => true, 'hasEqualSign' => false), + // [iurl=http://...]name[/iurl] + array('tag' => 'iurl', 'protocol' => 'http', 'embeddedUrl' => true, 'hasEqualSign' => true), + // [ftp]ftp://...[/ftp] + array('tag' => 'ftp', 'protocol' => 'ftp', 'embeddedUrl' => true, 'hasEqualSign' => false), + // [ftp=ftp://...]name[/ftp] + array('tag' => 'ftp', 'protocol' => 'ftp', 'embeddedUrl' => true, 'hasEqualSign' => true), + // [flash]http://...[/flash] + array('tag' => 'flash', 'protocol' => 'http', 'embeddedUrl' => false, 'hasEqualSign' => true, 'hasExtra' => true) + ); + + // Fix each type of tag. + foreach ($fixArray as $param) + fixTag($message, $param['tag'], $param['protocol'], $param['embeddedUrl'], $param['hasEqualSign'], isset($param['hasExtra'])); + + // Now fix possible security problems with images loading links automatically... + $message = preg_replace('~(\[img.*?\])(.+?)\[/img\]~eis', '\'$1\' . preg_replace(\'~action(=|%3d)(?!dlattach)~i\', \'action-\', \'$2\') . \'[/img]\'', $message); + + // Limit the size of images posted? + if (!empty($modSettings['maxwidth']) || !empty($modSettings['maxheight'])) + { + // Find all the img tags - with or without width and height. + preg_match_all('~\[img(\s+width=\d+)?(\s+height=\d+)?(\s+width=\d+)?\](.+?)\[/img\]~is', $message, $matches, PREG_PATTERN_ORDER); + + $replaces = array(); + foreach ($matches[0] as $match => $dummy) + { + // If the width was after the height, handle it. + $matches[1][$match] = !empty($matches[3][$match]) ? $matches[3][$match] : $matches[1][$match]; + + // Now figure out if they had a desired height or width... + $desired_width = !empty($matches[1][$match]) ? (int) substr(trim($matches[1][$match]), 6) : 0; + $desired_height = !empty($matches[2][$match]) ? (int) substr(trim($matches[2][$match]), 7) : 0; + + // One was omitted, or both. We'll have to find its real size... + if (empty($desired_width) || empty($desired_height)) + { + list ($width, $height) = url_image_size($matches[4][$match]); + + // They don't have any desired width or height! + if (empty($desired_width) && empty($desired_height)) + { + $desired_width = $width; + $desired_height = $height; + } + // Scale it to the width... + elseif (empty($desired_width)) + $desired_width = (int) (($desired_height * $width) / $height); + // Scale if to the height. + else + $desired_height = (int) (($desired_width * $height) / $width); + } + + // If the width and height are fine, just continue along... + if ($desired_width <= $modSettings['maxwidth'] && $desired_height <= $modSettings['maxheight']) + continue; + + // Too bad, it's too wide. Make it as wide as the maximum. + if ($desired_width > $modSettings['maxwidth'] && !empty($modSettings['maxwidth'])) + { + $desired_height = (int) (($modSettings['maxwidth'] * $desired_height) / $desired_width); + $desired_width = $modSettings['maxwidth']; + } + + // Now check the height, as well. Might have to scale twice, even... + if ($desired_height > $modSettings['maxheight'] && !empty($modSettings['maxheight'])) + { + $desired_width = (int) (($modSettings['maxheight'] * $desired_width) / $desired_height); + $desired_height = $modSettings['maxheight']; + } + + $replaces[$matches[0][$match]] = '[img width=' . $desired_width . ' height=' . $desired_height . ']' . $matches[4][$match] . '[/img]'; + } + + // If any img tags were actually changed... + if (!empty($replaces)) + $message = strtr($message, $replaces); + } +} + +// Fix a specific class of tag - ie. url with =. +function fixTag(&$message, $myTag, $protocol, $embeddedUrl = false, $hasEqualSign = false, $hasExtra = false) +{ + while (preg_match('/\[(' . $myTag . ($hasExtra ? '(?:[^\]]*?)' : '') . ')' . ($hasEqualSign ? '(=([^\]]*?))' : '(())') . '\](.+?)\[\/(' . $myTag . ')\]/is', $message, $matches)) + { + // All the different information from the match. + $leftTag = $matches[1]; + $equalTo = $matches[3]; + $searchfor = $matches[4]; + $rightTag = $matches[5]; + $replace = $hasEqualSign && $embeddedUrl ? $equalTo : $searchfor; + + // Remove all leading and trailing whitespace. + $replace = trim($replace); + if (!stristr($replace, $protocol . '://')) + { + if ($protocol != 'http' || !stristr($replace, 'https://')) + $replace = $protocol . '://' . $replace; + else + $replace = stristr($replace, 'https://'); + } + else + $replace = stristr($replace, $protocol . '://'); + + // Put the tag back together. + if ($hasEqualSign && $embeddedUrl) + $message = str_replace( + '[' . $leftTag . '=' . $equalTo . ']' . $searchfor . '[/' . $rightTag . ']', + '<' . $myTag . '=' . $replace . ']' . $searchfor . '', $message); + elseif ($hasEqualSign && !$embeddedUrl) + $message = str_replace( + '[' . $leftTag . '=' . $equalTo . ']' . $searchfor . '[/' . $rightTag . ']', + '<' . $myTag . '=' . $equalTo . ']' . $replace . '', $message); + elseif ($embeddedUrl && $replace != $searchfor) + $message = str_replace( + '[' . $leftTag . ']' . $searchfor . '[/' . $rightTag . ']', + '<' . $myTag . '=' . $replace . ']' . $searchfor . '', $message); + else + $message = str_replace( + '[' . $leftTag . ']' . $searchfor . '[/' . $rightTag . ']', + '<' . preg_replace('~' . preg_quote($myTag) . '~i', $myTag, $leftTag) . '>' . $replace . '', $message); + } + + // Replace the braces with brackets. + $message = str_replace( + array('<' . $myTag . '>', '<' . $myTag . '=', ''), + array('[' . $myTag . ']', '[' . $myTag . '=', '[/' . $myTag . ']'), $message); + + // If there is extra stuff we also need to do this. (flash, img.) + if ($hasExtra) + $message = preg_replace('~<(' . $myTag . '.+?)>~i', '[$1]', $message); +} + +// Send off an email. +function sendmail($to, $subject, $message, $from = null, $send_html = false) +{ + global $webmaster_email, $context, $modSettings, $txt, $scripturl; + + // So far so good. + $mail_result = true; + + // If the recipient list isn't an array, make it one. + $to_array = is_array($to) ? $to : array($to); + + // Get rid of slashes and entities. + $subject = un_htmlspecialchars(stripslashes($subject)); + // Make the message use \r\n's only. + $message = str_replace(array("\r", "\n"), array('', "\r\n"), stripslashes($message)); + + // Construct the mail headers... + $headers = 'From: "' . addcslashes($from !== null ? $from : $context['forum_name'], '<>[]()\'\\"') . '" <' . $webmaster_email . ">\r\n"; + $headers .= $from !== null ? 'Reply-To: <' . $from . ">\r\n" : ''; + $headers .= 'Return-Path: ' . $webmaster_email . "\r\n"; + $headers .= 'Date: ' . gmdate('D, d M Y H:i:s') . ' +0000' . "\r\n"; + + // Sending HTML? Let's plop in some basic stuff, then. + if ($send_html) + $headers .= 'Content-Type: text/html; charset=' . $txt['lang_character_set']; + // Text is good too. + else + $headers .= 'Content-Type: text/plain; charset=' . $txt['lang_character_set']; + + // MIME encode the subject - this is tricksy. + for ($i = 0; $i < strlen($subject); $i++) + if (ord($subject{$i}) > 128 || $subject{$i} == '=' || $subject{$i} == '?' || $subject{$i} == '_') + { + // Add on to the string whenever we find a special character. + $subject = substr($subject, 0, $i) . '=' . strtoupper(dechex(ord($subject{$i}))) . substr($subject, $i + 1); + $i18n_char = true; + } + + // We don't need to mess with the subject line if no special characters were in it.. + if (!empty($i18n_char)) + $subject = '=?' . $txt['lang_character_set'] . '?Q?' . $subject . '?='; + + // SMTP or sendmail? + if ($modSettings['mail_type'] == 'sendmail') + { + $subject = strtr($subject, array("\r" => '', "\n" => '')); + $message = strtr($message, array("\r" => '')); + $headers = strtr($headers, array("\r" => '')); + + foreach ($to_array as $to) + { + if (!mail(strtr($to, array("\r" => '', "\n" => '')), $subject, $message, $headers)) + { + log_error(sprintf($txt['mail_send_unable'], $to)); + $mail_result = false; + } + } + } + else + $mail_result = smtp_mail($to_array, $subject, $message, "MIME-Version: 1.0\r\n" . $headers); + + // Everything go smoothly? + return $mail_result; +} + +// Send off a personal message. +function sendpm($recipients, $subject, $message, $store_outbox, $from = null) +{ + global $db_prefix, $ID_MEMBER, $scripturl, $txt, $user_info, $language; + + // Initialize log array. + $log = array( + 'failed' => array(), + 'sent' => array() + ); + + if ($from === null) + $from = array( + 'id' => $ID_MEMBER, + 'name' => $user_info['name'], + 'username' => $user_info['username'] + ); + // Probably not needed. /me something should be of the typer. + else + $user_info['name'] = $from['name']; + + // This is the one that will go in their inbox. + $htmlmessage = htmlspecialchars($message, ENT_QUOTES); + $htmlsubject = htmlspecialchars($subject); + preparsecode($htmlmessage); + + // Get a list of usernames and convert them to IDs. + $usernames = array(); + foreach ($recipients as $rec_type => $rec) + { + foreach ($rec as $id => $member) + { + if (!is_numeric($recipients[$rec_type][$id])) + { + $recipients[$rec_type][$id] = strtolower(trim(preg_replace('/[<>&"\'=\\\]/', '', $recipients[$rec_type][$id]))); + $usernames[$recipients[$rec_type][$id]] = 0; + } + } + } + if (!empty($usernames)) + { + $request = db_query(" + SELECT ID_MEMBER, memberName + FROM {$db_prefix}members + WHERE memberName IN ('" . explode("', '", array_keys($usernames)) . "')", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + if (isset($usernames[strtolower($row['memberName'])])) + $usernames[strtolower($row['memberName'])] = $row['ID_MEMBER']; + + // Replace the usernames with IDs. Drop usernames that couldn't be found. + foreach ($recipients as $rec_type => $rec) + foreach ($rec as $id => $member) + { + if (is_numeric($recipients[$rec_type][$id])) + continue; + + if (!empty($usernames[$member])) + $recipients[$rec_type][$id] = $usernames[$member]; + else + { + $log['failed'][] = sprintf($txt['pm_error_user_not_found'], $recipients[$rec_type][$id]); + unset($recipients[$rec_type][$id]); + } + } + } + + // Make sure there are no duplicate 'to' members. + $recipients['to'] = array_unique($recipients['to']); + + // Only 'bcc' members that aren't already in 'to'. + $recipients['bcc'] = array_diff(array_unique($recipients['bcc']), $recipients['to']); + + // Combine 'to' and 'bcc' recipients. + $all_to = array_merge($recipients['to'], $recipients['bcc']); + + $request = db_query(" + SELECT + mem.memberName, mem.realName, mem.ID_MEMBER, mem.emailAddress, mem.lngfile, mg.maxMessages, + mem.im_email_notify, mem.instantMessages," . (allowedTo('moderate_forum') ? ' 0' : " + (mem.im_ignore_list = '*' OR FIND_IN_SET($from[id], mem.im_ignore_list))") . " AS ignored + FROM {$db_prefix}members AS mem + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP)) + WHERE mem.ID_MEMBER IN (" . implode(", ", $all_to) . ") + ORDER BY mem.lngfile + LIMIT " . count($all_to), __FILE__, __LINE__); + $notifications = array(); + while ($row = mysql_fetch_assoc($request)) + { + if (!empty($row['maxMessages']) && $row['maxMessages'] <= $row['instantMessages'] && !allowedTo('moderate_forum')) + { + $log['failed'][] = sprintf($txt['pm_error_data_limit_reached'], $row['realName']); + unset($all_to[array_search($row['ID_MEMBER'], $all_to)]); + continue; + } + + if (!empty($row['ignored'])) + { + $log['failed'][] = sprintf($txt['pm_error_ignored_by_user'], $row['realName']); + unset($all_to[array_search($row['ID_MEMBER'], $all_to)]); + continue; + } + + // Send a notification, if enabled. + if (!empty($row['im_email_notify']) && !empty($row['emailAddress'])) + $notifications[empty($row['lngfile']) || empty($modSettings['userLanguage']) ? $language : $row['lngfile']][] = $row['emailAddress']; + + $log['sent'][] = sprintf($txt['pm_successfully_sent'], $row['realName']); + } + mysql_free_result($request); + + // Only 'send' the message if there are any recipients left. + if (empty($all_to)) + return $log; + + // Insert the message itself and then grab the last insert id. + db_query(" + INSERT INTO {$db_prefix}instant_messages + (ID_MEMBER_FROM, deletedBySender, fromName, msgtime, subject, body) + VALUES ($from[id], " . ($store_outbox ? '0' : '1') . ", '$from[username]', " . time() . ", '$htmlsubject', '$htmlmessage')", __FILE__, __LINE__); + $ID_PM = db_insert_id(); + + // Some people think manually deleting instant_messages is fun... it's not. We protect against it though :) + db_query(" + DELETE FROM {$db_prefix}im_recipients + WHERE ID_PM = $ID_PM", __FILE__, __LINE__); + + // Add the recipients. + if (!empty($ID_PM)) + { + $insertRows = array(); + foreach ($all_to as $to) + $insertRows[] = "($ID_PM, $to, " . (in_array($to, $recipients['bcc']) ? '1' : '0') . ')'; + db_query(" + INSERT INTO {$db_prefix}im_recipients + (ID_PM, ID_MEMBER, bcc) + VALUES " . implode(', + ', $insertRows), __FILE__, __LINE__); + } + + foreach ($notifications as $lang => $notification_list) + { + // Make sure to use the right language. + loadLanguage('InstantMessage', $lang, false); + + // Replace the right things in the message strings. + $mailsubject = str_replace(array('SUBJECT', 'SENDER'), array($subject, $from['name']), $txt[561]); + $mailmessage = str_replace(array('SUBJECT', 'MESSAGE', 'SENDER'), array($subject, $message, $from['name']), $txt[562]); + $mailmessage .= "\n\n" . $txt['instant_reply'] . ' ' . $scripturl . '?action=pm;sa=send;f=inbox;pmsg=' . $ID_PM . ';quote;u=' . $from['id']; + + // Off the notification email goes! + sendmail($notification_list, $mailsubject, $mailmessage); + } + + // Add one to their unread and read message counts. + updateMemberData($all_to, array('instantMessages' => '+', 'unreadMessages' => '+')); + + return $log; +} + +// Send an email via SMTP. +function smtp_mail($mail_to_array, $subject, $message, $headers) +{ + global $modSettings, $webmaster_email, $txt; + + // Try to connect to the SMTP server... if it doesn't exist, only wait five seconds. + if (!$socket = fsockopen($modSettings['smtp_host'], empty($modSettings['smtp_port']) ? 25 : $modSettings['smtp_port'], $errno, $errstr, 5)) + { + // Unable to connect! Don't show any error message, but just log one and try to continue anyway. + log_error($txt['smtp_no_connect'] . ' : ' . $errno . ' : ' . $errstr); + return false; + } + + // Wait for a response of 220, without "-" continuer. + if (!server_parse(null, $socket, '220')) + return false; + + if ($modSettings['smtp_username'] != '' && $modSettings['smtp_password'] != '') + { + // EHLO could be understood to mean encrypted hello... + if (!server_parse('EHLO ' . $modSettings['smtp_host'], $socket, '250')) + return false; + if (!server_parse('AUTH LOGIN', $socket, '334')) + return false; + // Send the username ans password, encoded. + if (!server_parse(base64_encode($modSettings['smtp_username']), $socket, '334')) + return false; + if (!server_parse(base64_encode($modSettings['smtp_password']), $socket, '235')) + return false; + } + else + { + // Just say "helo". + if (!server_parse('HELO ' . $modSettings['smtp_host'], $socket, '250')) + return false; + } + + foreach ($mail_to_array as $mail_to) + { + // From, to, and then start the data... + if (!server_parse('MAIL FROM: <' . $webmaster_email . '>', $socket, '250')) + return false; + if (!server_parse('RCPT TO: <' . $mail_to . '>', $socket, '250')) + return false; + if (!server_parse('DATA', $socket, '354')) + return false; + fputs($socket, 'Subject: ' . $subject . "\r\n"); + if (strlen($mail_to) > 0) + fputs($socket, 'To: <' . $mail_to . ">\r\n"); + fputs($socket, $headers . "\r\n\r\n"); + fputs($socket, $message . "\r\n"); + + // Send a ., or in other words "end of data". + if (!server_parse('.', $socket, '250')) + return false; + // Reset the connection to send another email. + if (!server_parse('RSET', $socket, '250')) + return false; + } + fputs($socket, "QUIT\r\n"); + fclose($socket); + + return true; +} + +// Parse a message to the SMTP server. +function server_parse($message, $socket, $response) +{ + global $txt; + + if ($message !== null) + fputs($socket, $message . "\r\n"); + + // No response yet. + $server_response = ''; + + while (substr($server_response, 3, 1) != ' ') + if (!($server_response = fgets($socket, 256))) + { + log_error($txt['smtp_bad_response']); + return false; + } + + if (substr($server_response, 0, 3) != $response) + { + log_error($txt['smtp_error'] . $server_response); + return false; + } + + return true; +} + +// Makes sure the calendar post is valid. +function calendarValidatePost() +{ + global $modSettings, $txt, $sourcedir; + + if (!isset($_POST['deleteevent'])) + { + // No month? No year? + if (!isset($_POST['month'])) + fatal_lang_error('calendar7', false); + if (!isset($_POST['year'])) + fatal_lang_error('calendar8', false); + + // Check the month and year... + if ($_POST['month'] < 1 || $_POST['month'] > 12) + fatal_lang_error('calendar1', false); + if ($_POST['year'] < $modSettings['cal_minyear'] || $_POST['year'] > $modSettings['cal_maxyear']) + fatal_lang_error('calendar2', false); + } + + // Make sure they're allowed to post... + isAllowedTo('calendar_post'); + + if (isset($_POST['span'])) + { + // Make sure it's turned on and not some fool trying to trick it. + if ($modSettings['cal_allowspan'] != 1) + fatal_lang_error('calendar55', false); + if ($_POST['span'] < 1 || $_POST['span'] > $modSettings['cal_maxspan']) + fatal_lang_error('calendar56', false); + } + + // There is no need to validate the following values if we are just deleting the event. + if (!isset($_POST['deleteevent'])) + { + // No day? + if (!isset($_POST['day'])) + fatal_lang_error('calendar14', false); + if (!isset($_POST['evtitle']) && !isset($_POST['subject'])) + fatal_lang_error('calendar15', false); + elseif (!isset($_POST['evtitle'])) + $_POST['evtitle'] = $_POST['subject']; + + // Bad day? + if (!checkdate($_POST['month'], $_POST['day'], $_POST['year'])) + fatal_lang_error('calendar16', false); + + // No title? + if (trim($_POST['evtitle']) == '') + fatal_lang_error('calendar17', false); + if (strlen($_POST['evtitle']) > 30) + $_POST['evtitle'] = substr($_POST['evtitle'], 0, 30); + $_POST['evtitle'] = str_replace(';', '', $_POST['evtitle']); + } +} + +// Prints a post box. Used everywhere you post or send. +function theme_postbox($msg) +{ + global $txt, $modSettings, $db_prefix; + global $context, $settings, $user_info; + + // Switch between default images and back... mostly in case you don't have an InstantMessage template, but do ahve a Post template. + if (isset($settings['use_default_images']) && $settings['use_default_images'] == 'defaults' && isset($settings['default_template'])) + { + $temp1 = $settings['theme_url']; + $settings['theme_url'] = $settings['default_theme_url']; + + $temp2 = $settings['images_url']; + $settings['images_url'] = $settings['default_images_url']; + + $temp3 = $settings['theme_dir']; + $settings['theme_dir'] = $settings['default_theme_dir']; + } + + // Load the Post template and language file. + loadTemplate('Post'); + loadLanguage('Post'); + + // Initialize smiley array... + $context['smileys'] = array( + 'postform' => array(), + 'popup' => array(), + ); + + // Load smileys - don't bother to run a query if we're not using the database's ones anyhow. + if (empty($modSettings['smiley_enable']) && $user_info['smiley_set'] != 'none') + $context['smileys']['postform'][] = array( + 'smileys' => array( + array('code' => ':)', 'filename' => 'smiley.gif', 'description' => $txt[287]), + array('code' => ';)', 'filename' => 'wink.gif', 'description' => $txt[292]), + array('code' => ':D', 'filename' => 'cheesy.gif', 'description' => $txt[289]), + array('code' => ';D', 'filename' => 'grin.gif', 'description' => $txt[293]), + array('code' => '>:(', 'filename' => 'angry.gif', 'description' => $txt[288]), + array('code' => ':(', 'filename' => 'sad.gif', 'description' => $txt[291]), + array('code' => ':o', 'filename' => 'shocked.gif', 'description' => $txt[294]), + array('code' => '8)', 'filename' => 'cool.gif', 'description' => $txt[295]), + array('code' => '???', 'filename' => 'huh.gif', 'description' => $txt[296]), + array('code' => '::)', 'filename' => 'rolleyes.gif', 'description' => $txt[450]), + array('code' => ':P', 'filename' => 'tongue.gif', 'description' => $txt[451]), + array('code' => ':-[', 'filename' => 'embarassed.gif', 'description' => $txt[526]), + array('code' => ':-X', 'filename' => 'lipsrsealed.gif', 'description' => $txt[527]), + array('code' => ':-\\', 'filename' => 'undecided.gif', 'description' => $txt[528]), + array('code' => ':-*', 'filename' => 'kiss.gif', 'description' => $txt[529]), + array('code' => ':\'(', 'filename' => 'cry.gif', 'description' => $txt[530]) + ), + 'last' => true, + ); + elseif ($user_info['smiley_set'] != 'none') + { + $request = db_query(" + SELECT code, filename, description, smileyRow, hidden + FROM {$db_prefix}smileys + WHERE hidden IN (0, 2) + ORDER BY smileyRow, smileyOrder", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + $context['smileys'][empty($row['hidden']) ? 'postform' : 'popup'][$row['smileyRow']]['smileys'][] = $row; + mysql_free_result($request); + } + + // Clean house... add slashes to the code for javascript. + foreach (array_keys($context['smileys']) as $location) + { + foreach ($context['smileys'][$location] as $j => $row) + { + $n = count($context['smileys'][$location][$j]['smileys']); + for ($i = 0; $i < $n; $i++) + { + $context['smileys'][$location][$j]['smileys'][$i]['code'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['code']); + $context['smileys'][$location][$j]['smileys'][$i]['js_description'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['description']); + } + + $context['smileys'][$location][$j]['smileys'][$n - 1]['last'] = true; + } + if (!empty($context['smileys'][$location])) + $context['smileys'][$location][count($context['smileys'][$location]) - 1]['last'] = true; + } + $settings['smileys_url'] = $modSettings['smileys_url'] . '/' . $user_info['smiley_set']; + + // Allow for things to be overridden. + if (!isset($context['post_box_columns'])) + $context['post_box_columns'] = 60; + if (!isset($context['post_box_rows'])) + $context['post_box_rows'] = 12; + if (!isset($context['post_box_name'])) + $context['post_box_name'] = 'message'; + if (!isset($context['post_form'])) + $context['post_form'] = 'postmodify'; + + // Set a flag so the sub template knows what to do... + $context['show_bbc'] = !empty($modSettings['enableBBC']) && !empty($settings['show_bbc']); + + // Generate a list of buttons that shouldn't be shown - this should be the fastest way to do this. + if (!empty($modSettings['disabledBBC'])) + { + $disabled_tags = explode(',', $modSettings['disabledBBC']); + foreach ($disabled_tags as $tag) + $context['disabled_tags'][trim($tag)] = true; + } + + // Go! Supa-sub-template-smash! + template_postbox($msg); + + // Switch the URLs back... now we're back to whatever the main sub template is. (like folder in InstantMessage.) + if (isset($settings['use_default_images']) && $settings['use_default_images'] == 'defaults' && isset($settings['default_template'])) + { + $settings['theme_url'] = $temp1; + $settings['images_url'] = $temp2; + $settings['theme_dir'] = $temp3; + } +} + +function SpellCheck() +{ + global $txt, $context; + + // A list of "words" we know about but pspell doesn't. + $known_words = array('smf', 'php', 'mysql', 'www', 'http', 'smfisawesome', 'grandia', 'terranigma'); + + loadTemplate('Post'); + loadLanguage('Post'); + + // Okay, this looks funny, but it actually fixes a weird bug. + ob_start(); + $old = error_reporting(0); + + // See, first, some windows machines don't load pspell properly on the first try. Dumb, but this is a workaround. + pspell_new('en'); + + // Next, the dictionary in question may not exist. So, we try it... but... + $pspell_link = pspell_new($txt['lang_dictionary'], $txt['lang_spelling'], '', strtr($txt['lang_character_set'], array('iso-' => 'iso', 'ISO-' => 'iso')), PSPELL_FAST | PSPELL_RUN_TOGETHER); + error_reporting($old); + ob_end_clean(); + + // Most people don't have anything but english installed... so we use english as a last resort. + if (!$pspell_link) + $pspell_link = pspell_new('en', '', '', '', PSPELL_FAST | PSPELL_RUN_TOGETHER); + + if (!isset($_POST['spellstring']) || !isset($_POST['spell_formname']) || !isset($_POST['spell_fieldname']) || !$pspell_link) + die; + + // Can't have any \n's or \r's in javascript strings. + $mystr = trim(str_replace(array("\r", "\n"), array('', '_|_'), stripslashes($_POST['spellstring']))); + + preg_match_all('/(?:<[^>]+>)|(?:\[[^ ][^\]]*\])|(?:&[^;\ ]+;)|(?<=^|[^[:alpha:]\'])([[:alpha:]\']+)/is', $mystr, $alphas, PREG_PATTERN_ORDER); + + // Do this after because the js doesn't count '\"' as two, but PHP does. + $context['spell_js'] = ' + var txt = {"done": "' . $txt['spellcheck_done'] . '"}; + var mispstr = "' . str_replace(array('\\', '"', ''), array('\\\\', '\\"', '<" + "/script>'), $mystr) . '"; + var misps = Array('; + + // This is some sanity checking: they should be chronological. + $last_occurance = 0; + + $found_words = false; + $code_block = false; + for ($i = 0, $n = count($alphas[0]); $i < $n; $i++) + { + // Check if we're inside a code block... + if (preg_match('~\[/?code\]~i', $alphas[0][$i])) + $code_block = !$code_block; + + // If the word is an html tag, an entity, a bbc tag, inside [code], a known word, or spelled right... + if (empty($alphas[1][$i]) || $code_block || in_array(strtolower($alphas[1][$i]), $known_words) || pspell_check($pspell_link, $alphas[1][$i])) + { + // Add on this word's length, and continue. + $last_occurance += strlen($alphas[0][$i]); + continue; + } + + // Find the word, and move up the "last occurance" to here. + $last_occurance = strpos($mystr, $alphas[0][$i], $last_occurance + 1); + $found_words = true; + + // Add on the javascript for this misspelling. + $context['spell_js'] .= ' + new misp("' . $alphas[1][$i] . '", ' . (int) $last_occurance . ', ' . ($last_occurance + strlen($alphas[1][$i]) - 1) . ', ['; + + // If there are suggestions, add them in... + $suggestions = pspell_suggest($pspell_link, $alphas[1][$i]); + if (!empty($suggestions)) + $context['spell_js'] .= '"' . join('", "', $suggestions) . '"'; + + $context['spell_js'] .= ']),'; + } + + // If words were found, take off the last comma. + if ($found_words) + $context['spell_js'] = substr($context['spell_js'], 0, -1); + + $context['spell_js'] .= ' + );'; + + // And instruct the template system to just show the spellcheck sub template. + $context['template_layers'] = array(); + $context['sub_template'] = 'spellcheck'; +} + +// Notify members that something has happened to a topic they marked! +function sendNotifications($ID_TOPIC, $type) +{ + global $txt, $scripturl, $db_prefix, $language, $user_info; + global $ID_MEMBER, $modSettings, $sourcedir; + + $notification_types = array( + 'reply' => array('subject' => 'notification_reply_subject', 'message' => 'notification_reply'), + 'sticky' => array('subject' => 'notification_sticky_subject', 'message' => 'notification_sticky'), + 'lock' => array('subject' => 'notification_lock_subject', 'message' => 'notification_lock'), + 'unlock' => array('subject' => 'notification_unlock_subject', 'message' => 'notification_unlock'), + 'remove' => array('subject' => 'notification_remove_subject', 'message' => 'notification_remove'), + 'move' => array('subject' => 'notification_move_subject', 'message' => 'notification_move'), + 'merge' => array('subject' => 'notification_merge_subject', 'message' => 'notification_merge'), + 'split' => array('subject' => 'notification_split_subject', 'message' => 'notification_split'), + ); + $current_type = $notification_types[$type]; + + // Can't do it if there's no topic. + if (empty($ID_TOPIC)) + return; + + // Get the board and subject... + $result = db_query(" + SELECT ID_BOARD, subject + FROM {$db_prefix}messages + WHERE ID_TOPIC = $ID_TOPIC + ORDER BY ID_MSG + LIMIT 1", __FILE__, __LINE__); + list ($ID_BOARD, $subject) = mysql_fetch_row($result); + mysql_free_result($result); + + // Censor... + censorText($subject); + $subject = un_htmlspecialchars($subject); + + // Find the members with notification on for this topic. + $members = db_query(" + SELECT + mem.ID_MEMBER, mem.emailAddress, mem.notifyOnce, mem.lngfile, ln.sent, mem.ID_GROUP, + mem.additionalGroups, b.memberGroups, mem.ID_POST_GROUP + FROM {$db_prefix}log_notify AS ln, {$db_prefix}members AS mem, {$db_prefix}topics AS t, {$db_prefix}boards AS b + WHERE ln.ID_TOPIC = $ID_TOPIC + AND t.ID_TOPIC = $ID_TOPIC + AND b.ID_BOARD = $ID_BOARD + AND mem.ID_MEMBER != $ID_MEMBER + AND ln.ID_MEMBER = mem.ID_MEMBER + GROUP BY mem.ID_MEMBER + ORDER BY mem.lngfile", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($members)) + { + if ($row['ID_GROUP'] != 1) + { + $allowed = explode(',', $row['memberGroups']); + $row['additionalGroups'] = explode(',', $row['additionalGroups']); + $row['additionalGroups'][] = $row['ID_GROUP']; + $row['additionalGroups'][] = $row['ID_POST_GROUP']; + + if (count(array_intersect($allowed, $row['additionalGroups'])) == 0) + continue; + } + + loadLanguage('Post', empty($row['lngfile']) || empty($modSettings['userLanguage']) ? $language : $row['lngfile'], false); + + $message = sprintf($txt[$current_type['message']], un_htmlspecialchars($user_info['name'])); + if ($type != 'remove') + $message .= + $scripturl . '?topic=' . $ID_TOPIC . '.new;topicseen#new' . "\n\n" . + $txt['notifyUnsubscribe'] . ': ' . $scripturl . '?action=notify;topic=' . $ID_TOPIC . '.0'; + if (!empty($row['notifyOnce']) && $type == 'reply') + $message .= "\n\n" . $txt['notifyXOnce2']; + + // Send only if once is off or it's on and it hasn't been sent. + if ($type != 'reply' || empty($row['notifyOnce']) || empty($row['sent'])) + { + sendmail($row['emailAddress'], sprintf($txt[$current_type['subject']], $subject), + $message . "\n\n" . + $txt[130]); + } + } + mysql_free_result($members); + + // Sent! + if ($type == 'reply') + db_query(" + UPDATE {$db_prefix}log_notify + SET sent = 1 + WHERE ID_TOPIC = $ID_TOPIC + AND ID_MEMBER != $ID_MEMBER", __FILE__, __LINE__); +} + +?> \ No newline at end of file diff --git a/Sources/Subs.php b/Sources/Subs.php new file mode 100644 index 0000000..6c45696 --- /dev/null +++ b/Sources/Subs.php @@ -0,0 +1,2263 @@ + $pos1) + { + $pos = $pos1; + break; + } + + $pos = $pos2 + 1; + } + $clean .= '%s'; + + $old_pos = $pos + 1; + } + $clean .= substr($db_string, $old_pos); + $clean = trim(strtolower(preg_replace(array('~\s+~s', '~/\*!40001 SQL_NO_CACHE \*/~', '~/\*!40000 USE INDEX \([A-Za-z\_]+?\) \*/~'), array(' ', '', ''), $clean))); + + // We don't use UNION in SMF, at least so far. But it's useful for injections. + if (strpos($clean, 'union') !== false && preg_match('~(^|[^a-z])union($|[^[a-z])~s', $clean) != 0) + $fail = true; + // Comments? We don't use comments in our queries, we leave 'em outside! + elseif (strpos($clean, '/*') > 2 || strpos($clean, '--') !== false) + $fail = true; + // Trying to change passwords, slow us down, or something? + elseif (strpos($clean, 'set password') !== false && preg_match('~(^|[^a-z])set password($|[^[a-z])~s', $clean) != 0) + $fail = true; + elseif (strpos($clean, 'benchmark') !== false && preg_match('~(^|[^a-z])benchmark($|[^[a-z])~s', $clean) != 0) + $fail = true; + // Sub selects? We don't use those either. + elseif (preg_match('~\([^)]*?select~s', $clean) != 0) + $fail = true; + + if (!empty($fail)) + { + log_error('Hacking attempt...' . "\n" . $db_string, $file, $line); + fatal_error('Hacking attempt...', false); + } + } + + $ret = mysql_query($db_string, $db_connection); + if ($ret === false) + $ret = db_error($db_string, $file, $line); + + // Debugging. + if (isset($GLOBALS['db_show_debug']) && $GLOBALS['db_show_debug'] === true) + { + $end = explode(' ', microtime()); + $db_cache[$db_count]['t'] = $end[0] + $end[1] - $st[0] - $st[1]; + } + + return $ret; +} + +function db_affected_rows() +{ + global $db_connection; + + return mysql_affected_rows($db_connection); +} + +function db_insert_id() +{ + global $db_connection; + + return mysql_insert_id($db_connection); +} + +// Update the last message in a board, and its parents. +function updateLastMessages($setboards) +{ + global $db_prefix, $board_info, $board; + + if (!is_array($setboards)) + $setboards = array($setboards); + + // Find the latest message on this board. (highest ID_MSG) + $result = db_query(" + SELECT ID_BOARD, MAX(ID_MSG) AS ID_MSG, MAX(posterTime) AS posterTime + FROM {$db_prefix}messages + WHERE ID_BOARD" . (count($setboards) == 1 ? " = $setboards[0]" : ' IN (' . implode(', ', $setboards) . ')') . " + GROUP BY ID_BOARD", __FILE__, __LINE__); + $setboards = array_flip($setboards); + while ($row = mysql_fetch_assoc($result)) + { + // Okay, this board is done ;). + unset($setboards[$row['ID_BOARD']]); + + // Update the board! + db_query(" + UPDATE {$db_prefix}boards + SET ID_LAST_MSG = $row[ID_MSG], lastUpdated = $row[posterTime] + WHERE ID_BOARD = $row[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + + // The loadBoard function hasn't loaded this board yet? + if (empty($board) || $board != $row['ID_BOARD']) + $the_parent_boards = getBoardParents($row['ID_BOARD']); + else + $the_parent_boards = $board_info['parent_boards']; + + if (isset($the_parent_boards[$row['ID_BOARD']])) + unset($the_parent_boards[$row['ID_BOARD']]); + + $the_parent_boards = array_keys($the_parent_boards); + + // If the board has parents update them too. + if (!empty($the_parent_boards)) + { + db_query(" + UPDATE {$db_prefix}boards + SET lastUpdated = $row[posterTime] + WHERE ID_BOARD IN (" . implode(',', $the_parent_boards) . ") + AND lastUpdated < $row[posterTime] + AND childLevel != 0 + LIMIT " . count($the_parent_boards), __FILE__, __LINE__); + + // Don't do them twice. + foreach ($the_parent_boards as $ID_BOARD) + if (isset($setboards[$ID_BOARD])) + unset($setboards[$ID_BOARD]); + } + } + + if (!empty($setboards)) + db_query(" + UPDATE {$db_prefix}boards + SET ID_LAST_MSG = 0 + WHERE ID_BOARD IN (" . implode(', ', array_keys($setboards)) . ") + LIMIT 1", __FILE__, __LINE__); +} + +// Update some basic statistics... +function updateStats($type, $condition = '1') +{ + global $db_prefix, $sourcedir, $modSettings; + + switch ($type) + { + case 'member': + // Update the latest member (highest ID_MEMBER) and count. + $result = db_query(" + SELECT COUNT(ID_MEMBER), MAX(ID_MEMBER) + FROM {$db_prefix}members", __FILE__, __LINE__); + list ($memberCount, $latestmember) = mysql_fetch_row($result); + mysql_free_result($result); + + // Get the latest member's display name. + $result = db_query(" + SELECT IFNULL(realName, memberName) AS realName + FROM {$db_prefix}members + WHERE ID_MEMBER = " . (int) $latestmember . " + LIMIT 1", __FILE__, __LINE__); + list ($latestRealName) = mysql_fetch_row($result); + mysql_free_result($result); + + // Update the amount of members awaiting approval. + if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 2) + { + $result = db_query(" + SELECT COUNT(ID_MEMBER) + FROM {$db_prefix}members + WHERE is_activated = 0 + AND validation_code = ''", __FILE__, __LINE__); + list ($unapprovedCount) = mysql_fetch_row($result); + mysql_free_result($result); + } + else + $unapprovedCount = $modSettings['unapprovedMembers']; + + updateSettings(array( + 'latestMember' => $latestmember, + 'latestRealName' => $latestRealName, + 'memberCount' => $memberCount, + 'unapprovedMembers' => $unapprovedCount + )); + break; + case 'message': + // Get the number of messages... + $result = db_query(" + SELECT COUNT(ID_MSG) AS totalMessages, MAX(ID_MSG) AS maxMsgID + FROM {$db_prefix}messages", __FILE__, __LINE__); + $row = mysql_fetch_assoc($result); + mysql_free_result($result); + + updateSettings(array( + 'totalMessages' => $row['totalMessages'], + 'maxMsgID' => $row['maxMsgID'] + )); + break; + case 'topic': + // Get the number of topics. + $result = db_query(" + SELECT COUNT(ID_TOPIC) AS totalTopics + FROM {$db_prefix}topics", __FILE__, __LINE__); + $row = mysql_fetch_assoc($result); + mysql_free_result($result); + + updateSettings(array('totalTopics' => $row['totalTopics'])); + break; + case 'calendar': + require_once($sourcedir . '/Calendar.php'); + + // Calculate the YYYY-MM-DD of the lowest and highest days. + $low_date = strftime('%Y-%m-%d', forum_time(false) - 24 * 3600); + $high_date = strftime('%Y-%m-%d', forum_time(false) + $modSettings['cal_days_for_index'] * 24 * 3600); + + $holidays = calendarHolidayArray($low_date, $high_date); + $bday = calendarBirthdayArray($low_date, $high_date); + $events = calendarEventArray($low_date, $high_date, false); + + // Cache the results in the settings. + updateSettings(array( + 'cal_today_updated' => strftime('%Y%m%d', forum_time(false)), + 'cal_today_holiday' => addslashes(serialize($holidays)), + 'cal_today_birthday' => addslashes(serialize($bday)), + 'cal_today_event' => addslashes(serialize($events)) + )); + break; + case 'postgroups': + // Fetch postgroups. + $request = db_query(" + SELECT ID_GROUP, minPosts + FROM {$db_prefix}membergroups + WHERE minPosts != -1", __FILE__, __LINE__); + $postgroups = array(); + while ($row = mysql_fetch_assoc($request)) + $postgroups[$row['ID_GROUP']] = $row['minPosts']; + mysql_free_result($request); + + // Oh great, they've screwed their post groups. + if (empty($postgroups)) + return; + + // Sort them this way because if it's done with MySQL it causes a filesort :(. + arsort($postgroups); + + // Set all membergroups from most posts to least posts. + $conditions = ''; + foreach ($postgroups as $id => $minPosts) + { + $conditions .= ' + WHEN posts >= ' . $minPosts . (!empty($lastMin) ? ' AND posts <= ' . $lastMin : '') . ' THEN ' . $id; + $lastMin = $minPosts; + } + + // A big fat CASE WHEN... END is faster than a zillion UPDATE's ;). + db_query(" + UPDATE {$db_prefix}members + SET ID_POST_GROUP = CASE$conditions + ELSE 0 + END" . ($condition != '1' ? " + WHERE $condition" : ''), __FILE__, __LINE__); + break; + } +} + +// Assumes the data has been slashed. +function updateMemberData($members, $data) +{ + global $db_prefix; + + $setString = ''; + foreach ($data as $var => $val) + { + if ($val === '+') + $val = $var . ' + 1'; + elseif ($val === '-') + $val = $var . ' - 1'; + + $setString .= " + $var = $val,"; + } + + if (is_array($members)) + $condition = 'ID_MEMBER IN (' . implode(', ', $members) . ') + LIMIT ' . count($members); + elseif ($members === null) + $condition = '1'; + else + $condition = 'ID_MEMBER = ' . $members . ' + LIMIT 1'; + + db_query(" + UPDATE {$db_prefix}members + SET" . substr($setString, 0, -1) . ' + WHERE ' . $condition, __FILE__, __LINE__); + + if (isset($data['posts'])) + updateStats('postgroups', $condition); +} + +// Updates the settings table as well as $modSettings +// All input variables and values are assumed to have escaped apostrophes(')! +function updateSettings($changeArray) +{ + global $db_prefix, $modSettings; + + if (empty($changeArray) || !is_array($changeArray)) + return; + + $replaceArray = array(); + foreach ($changeArray as $variable => $value) + { + // Don't bother if it's already like that ;). + if (isset($modSettings[$variable]) && $modSettings[$variable] == stripslashes($value)) + continue; + + $replaceArray[] = "('$variable', '$value')"; + $modSettings[$variable] = stripslashes($value); + } + + if (empty($replaceArray)) + return; + + db_query(" + REPLACE INTO {$db_prefix}settings + (variable, value) + VALUES " . implode(', + ', $replaceArray), __FILE__, __LINE__); +} + +function constructAlphabetIndex($base_url) +{ + $letters_ru = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЫЭЮЯ'; + $letters_en = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; + + $index = ' + + '; + + for ($i=0;$i'. mb_substr($letters_en, $i,1). ' + '; + + } + + $index .= ' + +
    + + '; + for ($i=0;$i'. mb_substr($letters_ru, $i,1). ' + '; + } + + $index .= ' + +
    '; + + return $index; +} + +/* Constructs a page list. +ie. $pageindex = constructPageIndex($scripturl . '?board=' . $board, $_REQUEST['start'], $num_messages, $maxindex, true); */ +function constructPageIndex($base_url, &$start, $max_value, $num_per_page, $compact_start = false, $additional = '') +{ + global $modSettings; + + // Save whether $start was less than 0 or not. + $start_invalid = $start < 0; + + // Make sure $start is a proper variable - not less than 0. + if ($start_invalid) + $start = 0; + // Not greater than the upper bound. + elseif ($start >= $max_value) + $start = (int) $max_value - (((int) $max_value % (int) $num_per_page) == 0 ? $num_per_page : ((int) $max_value % (int) $num_per_page)); + // And it has to be a multiple of $num_per_page! + else + $start = (int) $start - ((int) $start % (int) $num_per_page); + + // Somehow $start ended up zero through the subtractions... fix it. + if ($start < 0) + $start = 0; + + // Wireless will need the protocol on the URL somewhere. + if (WIRELESS) + { + $base_url .= ';' . WIRELESS_PROTOCOL; + $compact_start = false; + } + + $base_link = '« '; + + // Show all the pages. + $display_page = 1; + for ($counter = 0; $counter < $max_value; $counter += $num_per_page) + $pageindex .= $start == $counter && !$start_invalid ? $display_page++ : $base_link . $counter . ($additional == '' ? '': ';' . $additional) . '">' . $display_page++ . ' '; + + // Show the right arrow. + $display_page = ($start + $num_per_page) > $max_value ? $max_value : ($start + $num_per_page); + if ($start != $counter - $max_value && !$start_invalid) + $pageindex .= $display_page > $counter - $num_per_page ? ' ' : $base_link . $display_page . ($additional == '' ? '': ';' . $additional) . '">» '; + } + else + { + // If they didn't enter an odd value, pretend they did. + $PageContiguous = (int) ($modSettings['compactTopicPagesContiguous'] - ($modSettings['compactTopicPagesContiguous'] % 2)) / 2; + + // Show the first page. (>1< ... 6 7 [8] 9 10 ... 15) + if ($start > $num_per_page * $PageContiguous) + $pageindex = $base_link . '0">1 '; + else + $pageindex = ''; + + // Show the ... after the first page. (1 >...< 6 7 [8] 9 10 ... 15) + if ($start > $num_per_page * ($PageContiguous + 1)) + $pageindex .= ' ... '; + + // Show the pages before the current one. (1 ... >6 7< [8] 9 10 ... 15) + for ($nCont = $PageContiguous; $nCont >= 1; $nCont--) + if ($start >= $num_per_page * $nCont) + { + $tmpStart = $start - $num_per_page * $nCont; + $pageindex.= $base_link . $tmpStart . ($additional == '' ? '': ';' . $additional) . '">' . ($tmpStart / $num_per_page + 1) . ' '; + } + + // Show the current page. (1 ... 6 7 >[8]< 9 10 ... 15) + if (!$start_invalid) + $pageindex .= '[' . ($start / $num_per_page + 1) . '] '; + else + $pageindex .= $base_link . $start . ($additional == '' ? '': ';' . $additional) . '">' . ($start / $num_per_page + 1) . ' '; + + // Show the pages after the current one... (1 ... 6 7 [8] >9 10< ... 15) + $tmpMaxPages = (int) (($max_value - 1) / $num_per_page) * $num_per_page; + for ($nCont = 1; $nCont <= $PageContiguous; $nCont++) + if ($start + $num_per_page * $nCont <= $tmpMaxPages) + { + $tmpStart = $start + $num_per_page * $nCont; + $pageindex .= $base_link . $tmpStart . ($additional == '' ? '': ';' . $additional) . '">' . ($tmpStart / $num_per_page + 1) . ' '; + } + + // Show the '...' part near the end. (1 ... 6 7 [8] 9 10 >...< 15) + if ($start + $num_per_page * ($PageContiguous + 1) < $tmpMaxPages) + $pageindex .= ' ... '; + + // Show the last number in the list. (1 ... 6 7 [8] 9 10 ... >15<) + if ($start + $num_per_page * $PageContiguous < $tmpMaxPages) + $pageindex .= $base_link . $tmpMaxPages . ($additional == '' ? '': ';' . $additional) . '">' . ($tmpMaxPages / $num_per_page + 1) . ' '; + } + + return $pageindex; +} + +// Formats a number to display in the style of the admin's choosing. +function comma_format($number) +{ + global $modSettings; + static $thousands_separator = null, $decimal_separator = null, $decimal_count = null; + + // Cache these values... + if ($decimal_separator === null) + { + // Not set for whatever reason? + if (empty($modSettings['number_format']) || preg_match('~^1([^\d]*)?234([^\d]*)(0*?)$~', $modSettings['number_format'], $matches) != 1) + return $number; + + // Cache these each load... + $thousands_separator = $matches[1]; + $decimal_separator = $matches[2]; + $decimal_count = strlen($matches[3]); + } + + // Format the string with our friend, number_format. + return number_format($number, is_float($number) ? $decimal_count : 0, $decimal_separator, $thousands_separator); +} + +// Format a time to make it look purdy. +function timeformat($logTime, $show_today = true) +{ + global $user_info, $txt, $db_prefix, $modSettings; + global $days, $months, $days_short, $months_short; + + // Offset the time. + $time = $logTime + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600; + + // We can't have a negative date! + if ($time < 0) + $time = 0; + + // Today and Yesterday? + if ($modSettings['todayMod'] >= 1 && $show_today) + { + // Get the current time. + $nowtime = forum_time(); + + $then = @getdate($time); + $now = @getdate($nowtime); + + // Try to make something of a time format string... + if (strpos($user_info['time_format'], '%H') === false && strpos($user_info['time_format'], '%T') === false) + $today_fmt = '%I:%M %p'; + else + $today_fmt = '%H:%M'; + + // Same day of the year, same year.... Today! + if ($then['yday'] == $now['yday'] && $then['year'] == $now['year']) + return $txt['smf10'] . strftime($today_fmt, $time); + + // Day-of-year is one less and same year, or it's the first of the year and that's the last of the year... + if ($modSettings['todayMod'] == '2' && (($then['yday'] == $now['yday'] - 1 && $then['year'] == $now['year']) || ($now['yday'] == 0 && $then['year'] == $now['year'] - 1) && $then['mon'] == 12 && $then['mday'] == 31)) + return $txt['smf10b'] . strftime($today_fmt, $time); + } + + // Strip slashes off the time format string. + $str = $user_info['time_format']; + + if (setlocale(LC_TIME, @$txt['lang_locale'])) + { + $str = ereg_replace('%a', ucwords(strftime('%a', $time)), $str); + $str = ereg_replace('%A', ucwords(strftime('%A', $time)), $str); + $str = ereg_replace('%b', ucwords(strftime('%b', $time)), $str); + $str = ereg_replace('%B', ucwords(strftime('%B', $time)), $str); + } + else + { + // Do-it-yourself time localization. Fun. + $str = ereg_replace('%a', @$days_short[(int) strftime('%w', $time)], $str); + $str = ereg_replace('%A', @$days[(int) strftime('%w', $time)], $str); + $str = ereg_replace('%b', @$months_short[(int) strftime('%m', $time)], $str); + $str = ereg_replace('%B', @$months[(int) strftime('%m', $time)], $str); + $str = ereg_replace('%p', (strftime('%H', $time) < 12 ? 'am' : 'pm'), $str); + } + + // Format any other characters.. + return strftime($str, $time); +} + +// Removes special entities from strings. Compatibility... +function un_htmlspecialchars($string) +{ + return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES)) + array(''' => '\'', ' ' => ' ')); +} + +// The current time with offset. +function forum_time($use_user_offset = true) +{ + global $user_info, $modSettings; + + return time() + ($modSettings['time_offset'] + ($use_user_offset ? $user_info['time_offset'] : 0)) * 3600; +} + +// Parse smileys (if $enableSmileys is true) and BBC in $message. +function doUBBC($message, $enableSmileys = true) +{ + global $txt, $modSettings, $context; + + // Item codes - for
  • types. Used with [*], [@], [o], etc. + static $itemcode = array( + '[*]' => '
  • ', + '[@]' => '
  • ', + '[+]' => '
  • ', + '[x]' => '
  • ', + '[#]' => '
  • ', + '[o]' => '
  • ', + '[O]' => '
  • ', + '[upload]' => '' + ); + + if (empty($modSettings['enableBBC'])) + return $message; + + if (substr($message, 0, 1) == ' ') + $message = ' ' . substr($message, 1); + + // Rip apart code tags. + $parts = preg_split('~\[/?code\](
    )?~', ' ' . strtr($message, array("\n" => '
    '))); + + // For each part.... + for ($i = 0, $n = count($parts); $i < $n; $i++) + { + // If we're outside a block... (0: outside, 1: inside, 2: outside, 3: inside, etc.) + if ($i % 2 == 0) + { + // Close the Code block, unless this is the first block. (meaning it wasn't opened yet.) + if ($i > 0) + $parts[$i] = '
  • ' . $parts[$i]; + + + // Find any [php] code tags.... CAPTURING the delimiter. + $php_parts = preg_split('~(\[php\])(?:
    )?|(\[/php\])~', $parts[$i], -1, PREG_SPLIT_DELIM_CAPTURE); + + for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++) + { + // Do PHP code coloring. (this is a start tag, so everything until a [/php] should be highlighted.) + if ($php_parts[$php_i] == '[php]') + { + // Get rid of the start tag. + $php_parts[$php_i] = ''; + + $php_string = ''; + while ($php_i < count($php_parts) && $php_parts[$php_i] != '[/php]') + { + $php_string .= $php_parts[$php_i]; + + // This makes it easier; jut clear it out and let the implode do all the work. + $php_parts[$php_i++] = ''; + } + + // Highlight the PHP code, and then remove the ?php and ? we added to do so. + $php_parts[$php_i] = highlight_php_code(substr(trim($php_string), 0, 5) != '<?' ? '<?php' . $php_string . '?>' : $php_string); + if (substr(trim($php_string), 0, 5) != '<?') + $php_parts[$php_i] = preg_replace(array('~^(.+?)<\?php~', '~\?>((?:)*)$~'), '$1', $php_parts[$php_i], 1); + + $did_php = true; + } + else + $did_php = false; + + // Parse any URLs.... have to get rid of the @ problems some things cause... stupid email addresses. + if (!empty($modSettings['autoLinkUrls']) && (strpos($php_parts[$php_i], '://') !== false || strpos($php_parts[$php_i], 'www.') !== false)) + { + // Switch out quotes really quick because they can cause problems. + $php_parts[$php_i] = strtr($php_parts[$php_i], array(''' => '\'', ' ' => '\xA0', '"' => '>">', '"' => '<"<', '<' => '\.(;\'"])((?:http|https|ftp|ftps)://[\w\-_@:|]+(?:\.[\w\-_]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\']*|\([\w\-_\~%\.@,\?&;=#()+:\']*)*[/\w\-_\~%@\?;=#])~i', '~(?<=[\s>(\'])(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\']*|\([\w\-_\~%\.@,\?&;=#()+:\']*)*[/\w\-_\~%@\?;=#])~i'), array('[url]$1[/url]', '[url=http://$1]$1[/url]'), $php_parts[$php_i]); + $php_parts[$php_i] = strtr($php_parts[$php_i], array('\'' => ''', '\xA0' => ' ', '>">' => '"', '<"<' => '"', ' '<')); + } + + // Parse code..... + parsecode($php_parts[$php_i]); + + // Parse smileys? + if (!$enableSmileys || $did_php) + continue; + + // This isn't code; change any tabs to spaces. + $php_parts[$php_i] = strtr($php_parts[$php_i], array("\t" => '   ')); + + // Often requested but also very kludgey; break long words. + if (!empty($modSettings['fixLongWords'])) + { + // This is SADLY and INCREDIBLY browser dependent. + if ($context['browser']['is_gecko'] || strpos($_SERVER['HTTP_USER_AGENT'], 'Konqueror') !== false) + $breaker = ' '; + // Opera... + elseif ($context['browser']['is_opera']) + $breaker = ' '; + // Internet Explorer... + else + $breaker = ' '; + + // The idea is, find words xx long, and then replace them with xx + space + more. + $php_parts[$php_i] = preg_replace( + '/(?<=[>;:\?\.\! \xA0\]()])(\w{' . $modSettings['fixLongWords'] . ',})/e', + "preg_replace('/(.{" . $modSettings['fixLongWords'] . "})/', '\\\$1$breaker', '\$1')", + $php_parts[$php_i]); + } + + // Figure out smileys... + parsesmileys($php_parts[$php_i]); + + // List items - warning they might disrupt your code... + if (empty($modSettings['disabledBBC']) || preg_match('~[\s,](list|li)[\s,]~', $modSettings['disabledBBC']) == 0) + { + $php_parts[$php_i] = strtr($php_parts[$php_i], $itemcode); + + // Now do the [0], which is special and sometimes annoying. + $php_parts[$php_i] = preg_replace('~([ \t>]| )\[0\]~', '$1
  • ', $php_parts[$php_i]); + } + else + $php_parts[$php_i] = str_replace(array_keys($itemcode), '
    ', $php_parts[$php_i]); + } + + $parts[$i] = implode('', $php_parts); + } + // Add the Code: part. + elseif ($i <= count($parts) - 1) + { + $php_parts = preg_split('~(<\?php|\?>)~', $parts[$i], -1, PREG_SPLIT_DELIM_CAPTURE); + + for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++) + { + // Do PHP code coloring? + if ($php_parts[$php_i] != '<?php') + continue; + + $php_string = ''; + while ($php_i + 1 < count($php_parts) && $php_parts[$php_i] != '?>') + { + $php_string .= $php_parts[$php_i]; + $php_parts[$php_i++] = ''; + } + $php_parts[$php_i] = highlight_php_code($php_string . $php_parts[$php_i]); + } + + // Fix the PHP code stuff... + $parts[$i] = str_replace("
    \t
    ", "\t", implode('', $php_parts)); + + // Older browsers are annoying, aren't they? + if ($context['browser']['is_ie4'] || $context['browser']['is_ie5'] || $context['browser']['is_ie5.5']) + $parts[$i] = str_replace("\t", "
    \t
    ", $parts[$i]); + else + $parts[$i] = str_replace("\t", "\t", $parts[$i]); + + $parts[$i] = '
    ' . $txt['smf238'] . ':
    ' . $parts[$i]; + } + } + $message = substr(implode('', $parts), 1); + + // Fix things. + $message = strtr($message, array(' ' => '  ', "\r" => '', "\n" => '
    ')); + + $message = preg_replace('~href="(https?://)((?!([-\w]+\.)*rock\.ru).*)"~iU', 'href="http://rock.ru/go/$1$2"', $message); + return $message; +} + +// Parses the code in message, using the normal syntax used by some many forums... +function parsecode(&$message) +{ + global $modSettings, $scripturl, $txt, $settings, $context; + static $codefromcache = array(), $codetocache = array(); + + // If it wasn't already set, set it. + if (empty($codefromcache)) + { + // If any tags are disabled then we won't add them. + if (!empty($modSettings['disabledBBC'])) + { + $disabled = array_flip(explode(',', $modSettings['disabledBBC'])); + + foreach ($disabled as $tag => $dummy) + $disabled[trim($tag)] = true; + } + + $code_to_from = array( + // A named email address. [email=me@some.place.com]me[/email] And, you can't have []s in your email, I should know. + '~\[email=([^<">]+?)\](.+?)\[/email\]~ie' => isset($disabled['email']) ? '"$2 ($1)"' : '" """, "]" => "", "[" => "")) . "\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\])~i", "", strtr("$2", array("@" => "@"))) . ""', + // An image. Width and height can be are optional. + '~\[img(\s+width=([\d]+))?(\s+height=([\d]+))?\s*\](?:
    )*([^<">]+?)(?:
    )*\[/img\]~ie' => isset($disabled['img']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$5", array("@" => "@")))' : '" "@", "\"" => """))) . "\" alt=\"\"" . ("$2" != "" ? " width=\"$2\"" : "") . ("$4" != "" ? " height=\"$4\"" : "") . " border=\"0\" />"', + // Find an inside link. (named?) ie. [iurl]www.simplemachines.org[/iurl] + '~\[iurl=([^<">]+?)\](.+?)\[/iurl\]~ie' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '" """))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[flash.*?\]|\[/flash\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "@"))) . ""' : 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$2") . " ($1)"') : '" """))) . "\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "@"))) . ""', + '~\[iurl\]([^<">]+?)\[/iurl\]~ie' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '" """))) . "\" target=\"_blank\">$1"' : '"$1"') : '" """))) . "\">$1"', + // FTP link. Named...? [ftp=upload.sourceforge.net]Sourceforge[/ftp] + '~\[ftp\]([^<">]+?)\[/ftp\]~ie' => isset($disabled['ftp']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$1")' : '" """))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array("@" => "@"))) . ""', + '~\[ftp=([^<">]+?)\](.+?)\[/ftp\]~ie' => isset($disabled['ftp']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$2") . " ($1)"' : '" """))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "@"))) . ""', + // Find a (named?) URL... [url]www.simplemachines.org[/url] or [url=www.simplemachines.org]SMF[/url] + '~\[url=([^:\]<">]+?)\]([^\]]*?\[url(?:=[^\]<">]+?)?\][^<">]+?\[/url\].*?)\[/url\]~ie' => isset($disabled['url']) ? 'preg_replace("~(\[url.*?\]|\[/url\])~i", "", "$2") . " ($1)"' : '" """))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\])~i", "", strtr("$2", array("@" => "@"))) . ""', + '~\[url=([^<">]+?)\](.+?)\[/url\]~ie' => isset($disabled['url']) ? '"$2 ($1)"' : '" """))) . "\" target=\"_blank\">" . strtr("$2", array("@" => "@")) . ""', + '~\[url\](?:
    )*([^<">]+?)(?:
    )*\[/url\]~ie' => isset($disabled['url']) ? '"$1"' : '" """))) . "\" target=\"_blank\">$1"', + // Bold, italics, underline, strikeout. + '~\[b\](.+?)\[/b\]~i' => isset($disabled['b']) ? '$1' : '$1', + '~\[i\](.+?)\[/i\]~i' => isset($disabled['i']) ? '$1' : '$1', + '~\[u\](.+?)\[/u\]~i' => isset($disabled['u']) ? '$1' : '$1', + '~\[s\](.+?)\[/s\]~i' => isset($disabled['s']) ? '$1' : '$1', + // A quote. May or may not specify an author and/or link and date. + '~\[quote(?: author)?="(.{1,80}?)"\](?:
    )?~i' => isset($disabled['quote']) ? '
    ' : '
    ' . $txt['smf239'] . ': $1
    ', + '~\[quote author=(.{1,80}?) link=(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?) date=(\d+)\](?:
    )?~ei' => isset($disabled['quote']) ? '\'
    \'' : '\'
    ' . $txt['smf239'] . ' ($1 \' . timeformat(\'$3\') . \')
    \'', + '~\[quote author=(.{1,80}?)\](?:
    )?~i' => isset($disabled['quote']) ? '
    ' : '
    ' . $txt['smf239'] . ': $1
    ', + '~\[quote\](?:
    )?~i' => isset($disabled['quote']) ? '
    ' : '
    ' . $txt['smf240'] . '
    ', + '~\[/quote\](?:
    )?~i' => isset($disabled['quote']) ? '
    ' : '
    ', + // Size the font. [size=large]HELLO![/size] + '~\[size=([\d]{1,2}p[xt]|(?:x-)?small(?:er)?|(?:x-)?large[r]?)\](.+?)\[/size\]~i' => isset($disabled['size']) ? '$2' : '$2', + '~\[size=([\d])\](.+?)\[/size\]~i' => isset($disabled['size']) ? '$2' : '$2', + // Performat/justify text. [center]Justifying is good.[/center] + '~\[pre\](.+?)\[/pre\]~i' => isset($disabled['pre']) ? '$1' : '
    $1
    ', + '~\[left\](.+?)\[/left\]~i' => isset($disabled['left']) ? '$1' : '
    $1
    ', + '~\[right\](.+?)\[/right\]~i' => isset($disabled['right']) ? '$1' : '
    $1
    ', + '~\[center\](.+?)\[/center\]~i' => isset($disabled['center']) ? '$1' : '$1', + // Teletyped text. Monospace, in other words. + '~\[tt\](.+?)\[/tt\]~i' => isset($disabled['tt']) ? '$1' : '$1', + // Subscript and superscript. 6[sup]2[/sup] = 36. + '~\[sub\](.+?)\[/sub\]~i' => isset($disabled['sub']) ? '$1' : '$1', + '~\[sup\](.+?)\[/sup\]~i' => isset($disabled['sup']) ? '$1' : '$1', + // An email address. [email]me@some.place.com[/email] + '~\[email\](?:
    )*(.+?)(?:
    )*\[/email\]~ie' => isset($disabled['email']) ? '"$1"' : '" """, "[" => "", "]" => "")) . "\">$1"', + // Specify a specific font. [font=Comic Sans]Blah![/font] + '~\[font=([\w,\-\s]+?)\](.+?)\[/font\]~i' => isset($disabled['font']) ? '$2' : '$2', + // Colors.... [red]See?[/red] + '~\[color=(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[\w]{1,12})\](.*?)\[/color\]~i' => isset($disabled['color']) ? '$2' : '$2', + '~\[(black|white|red|green|blue)\](.+?)\[/\1\]~i' => isset($disabled['color']) ? '$2' : '$2', + '~\[(chr|k)issy\](.+?)\[/\1issy\]~i' => isset($disabled['color']) ? '$2' : '$2 :-*', + // Lists... [list][*]First, ...[o]Second![li]THIRD!!![/li][/list] + '~\[list\](?:
    )?~i' => isset($disabled['list']) || isset($disabled['li']) ? '' : '
      ', + '~\[/list\](?:
      )?~i' => isset($disabled['list']) || isset($disabled['li']) ? '' : '
    ', + '~(?:
    | |\s)*\[li\](.+?)\[/li\](?:
    | |\s)*~i' => isset($disabled['list']) || isset($disabled['li']) ? '
    $1
    ' : '
  • $1
  • ', + // Horizontal rule. [hr] => ------------------. + '~\[hr(?:\s*/)?\]~i' => isset($disabled['hr']) ? '' : '
    ', + // A break. [br] or [br /]. (it makes no sense to disable this one :P.) + '~\[br(?:\s*/)?\]~i' => '
    ', + // Right-to-left and left-to-right strings. + '~\[(ltr|rtl)\](.+?)\[/\1\]~i' => isset($disabled['ltr']) || isset($disabled['rtl']) ? '$2' : '
    $2
    ', + // Acronyms and abbreviations... [acronym=Bulletin Board Code]BBC[/acronym] + '~\[abbr=((?:")?)(.+?)\\1\](.+?)\[/abbr\]~ie' => isset($disabled['abbr']) ? '"$3 ($2)"' : '" """)) . "\">$3"', + '~\[acronym=((?:")?)(.+?)\\1\](.+?)\[/acronym\]~ie' => isset($disabled['acronym']) ? '"$3 ($2)"' : '" """)) . "\">$3"', + // [me=Comment]does something[/me] + '~\[me=((?:")?)(.{1,80}?)\\1\](.+?)\[/me\](?:
    )?~i' => isset($disabled['ftp']) ? '/me $3
    ' : '
    * $2 $3
    ', + // An email address they just typed in. Don't match if there's already a mailto: or = before it. + '~(?<=[\?\s\xA0[\]()*\\\;>]|^)([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?,\s\xA0\[\]()*\\\]|$|
    | |>|<|"|'|\.(?:\.| |\s|$|
    ))~i' => '$1', + '~(?<=
    )([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?\.,\s\xA0\[\]()*\\\]|$|
    | |>|<|"|')~i' => '$1', + // This last one fixes spaces at the beginning of lines. + '~
    ~' => '
     ', + // Match a table... hopefully with everything in the right place. + '~\[table\](?:\s|\xA0|
    | )*((?:\[tr\](?:\s|\xA0|
    | )*\[td\]).*?(?:(?:\s|\xA0|
    | )*\[/td\]\[/tr\])*)(?:\s|\xA0|
    | )*\[/table\](?:\s|\xA0|
    | )?~i' => '$1
    ', + ); + + $codefromcache = array_keys($code_to_from); + $codetocache = array_values($code_to_from); + + // GLOWING or /shadowed/ text. + $codefromcache[] = '~\[glow=([#\w]{3,12}),([012]\d{1,2}|\d{1,2})(,[^]]+)?\](.+?)\[/glow\]~i'; + $codetocache[] = isset($disabled['glow']) ? '$4' : '
    $4
    '; + $codefromcache[] = '~\[shadow=([#\w]{3,12}),(left|right|top|bottom|[0123]\d{0,2})\](.+?)\[/shadow\]~ei'; + $codetocache[] = isset($disabled['shadow']) ? 'strtr(\'$3\', array(\'\\"\' => \'"\'))' : '\'
    \' . strtr(\'$3\', array(\'\\"\' => \'"\')) . \'
    \''; + + // Moving text... [move]stuff[/move] + $codefromcache[] = '~\[move\](.+?)\[/move\]~i'; + $codetocache[] = isset($disabled['move']) ? '$1' : '$1'; + + // Handle flash. + $codefromcache[] = '~\[flash=(\d+),(\d+)\](?:
    )*([^<>]+?)(?:
    )*\[/flash\]~ie'; + if (empty($modSettings['enableEmbeddedFlash']) || isset($disabled['flash'])) + $codetocache[] = isset($disabled['url']) ? '"$3"' : '" """)) . "\" target=\"_blank\">$3"'; + // Internet Explorer for Windows. + elseif ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie']) + $codetocache[] = '" """)) . "\" /> """)) . "\" width=\"$1\" height=\"$2\" play=\"true\" loop=\"true\" quality=\"high\" AllowScriptAccess=\"never\" /><a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a>"'; + // Anything else. + else + $codetocache[] = '" """)) . "\" width=\"$1\" height=\"$2\" play=\"true\" loop=\"true\" quality=\"high\" AllowScriptAccess=\"never\" /><a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a>"'; + } + + // Nothing to parse... ? + if (!strstr($message, '[') && !strstr($message, '://') && !strstr($message, '@') && !strstr($message, '/me') && !strstr($message, '<')) + return; + + $message = strtr($message, array('$' => '$')); + + // Replace somewhere with HTML. + if (!empty($modSettings['enablePostHTML']) && strstr($message, '<')) + { + $message = preg_replace('~<a\s+href=(?:")?(?:\[url\])?((?:http://|ftp:/\|https://|ftps://|mailto:).+?)(?:\[/url\])?(?:")?>(.+?)</a>~ie', '\'\' . preg_replace(\'~(\[url.*?\]|\[/url\])~\', \'\', \'$2\') . \'\'', $message); + + // Do - with security... action= -> action-. + preg_match_all('~<img\s+src=(?:")?(?:\[url\])?((?:http://|ftp://|https://|ftps://).+?)(?:\[/url\])?(?:")?(?:\s+alt=(?:")?(.*?)(?:")?)?(?:\s?/)?>~i', $message, $matches, PREG_PATTERN_ORDER); + if (!empty($matches[0])) + { + $replaces = array(); + foreach ($matches[1] as $match => $imgtag) + { + // No alt? + if (!isset($matches[2][$match])) + $matches[2][$match] = ''; + + // Remove action= from the URL - no funny business, now. + if ($imgtag != preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag)) + $replaces[$matches[0][$match]] = '' . $matches[2][$match] . ''; + + // Check if the image is larger than allowed. + if (!empty($modSettings['maxwidth']) && !empty($modSettings['maxheight'])) + { + list ($width, $height) = url_image_size($imgtag); + + if ($width > $modSettings['maxwidth'] || $height > $modSettings['maxheight']) + { + if ($width > $modSettings['maxwidth'] && !empty($modSettings['maxwidth'])) + { + $height = floor($modSettings['maxwidth'] / $width * $height); + $width = $modSettings['maxwidth']; + if ($height > $modSettings['maxheight'] && !empty($modSettings['maxheight'])) + { + $width = floor($modSettings['maxheight'] / $height * $width); + $height = $modSettings['maxheight']; + } + } + else + { + if ($height > $modSettings['maxheight'] && !empty($modSettings['maxheight'])) + { + $width = floor($modSettings['maxheight'] / $height * $width); + $height = $modSettings['maxheight']; + } + } + } + + // Set the new image tag. + $replaces[$matches[0][$match]] = '' . $matches[2][$match] . ''; + } + elseif (strpos($matches[0][$match], '[url]') !== false || substr($matches[0][$match], 0, 4) == '<') + $replaces[$matches[0][$match]] = '' . $matches[2][$match] . ''; + } + + $message = strtr($message, $replaces); + } + } + + // Do the code if necessary. + if (strstr($message, '[') || strstr($message, '://') || strstr($message, '@') || strstr($message, '/me')) + { + $shadow_directions = array('left' => '270', 'right' => '90', 'top' => '0', 'bottom' => '180'); + + $message = preg_replace($codefromcache, $codetocache, $message); + $message = preg_replace_callback('#\[video\](.+?)\[/video\]#', 'parseVideo', $message); + + // Tables need to be done twice or they won't work properly. + if (strpos($message, '') !== false) + { + for ($i = 0; $i < 2; $i++) + $message = preg_replace( + array( + '~((?:
    ||\[/tr\])(?:\s|\xA0|
    | )*(?:|\[tr\])||\[/td\])(?:\s|\xA0|
    | )*\[td\](?:\s|\xA0|
    | )*(.*?)(?:\s|\xA0|
    | )*\[/td\](?:\s|\xA0|
    | )*((?:|\[/tr\])(?:\s|\xA0|
    | )*(?:|\[tr\]|
    )||\[td\])~i', + '~(||\[/tr\])(?:\s|\xA0|
    | )*\[tr\](?:\s|\xA0|
    | )*(.*?)(?:\s|\xA0|
    | )*\[/tr\](?:\s|\xA0|
    | )*(
    ||\[tr\])~i' + ), + array( + '$1$2$3', + '$1$2$3' + ), $message + ); + } + } + + // Enable Basic HTML? + if (!empty($modSettings['enablePostHTML']) && strstr($message, '<')) + { + // b, u, i, s, pre... basic tags. + $closable_tags = array('b', 'u', 'i', 's', 'pre', 'blockquote'); + foreach ($closable_tags as $tag) + { + $opens = substr_count($message, '<' . $tag . '>'); + $closes = substr_count($message, '</' . $tag . '>'); + $message = str_replace(array('<' . $tag . '>', '</' . $tag . '>'), array('<' . $tag . '>', ''), $message); + + if ($closes < $opens) + $message .= str_repeat('', $opens - $closes); + } + + //
    should be empty. + $empty_tags = array('br'); + foreach ($empty_tags as $tag) + $message = str_replace(array('<' . $tag . '>', '<' . $tag . '/>', '<' . $tag . ' />'), '<' . $tag . ' />', $message); + } +} + +function parseVideo($matches) { + $url = $matches[1]; + + // check if it's a vimeo video + if (preg_match('~^(http://)?(www\.)?vimeo\.com/\d+?~', $url)) { + return parseVideoVimeo($url); + } elseif (preg_match('~^(http://)?(www\.)?youtube\.com/.*[\?&]v=~', $url)) { + return parseVideoYoutube($url); + } elseif (preg_match('~^(http://)?vids.myspace.com/~', $url)) { + return parseVideoMyspace($url); + } elseif (preg_match('~^(http://)?(www\.)?dailymotion\.com/video/~', $url)) { + return parseVideoDailymotion($url); + } else { + return $matches[1]; + } +} + +function parseVideoMyspace($url) +{ + $ttl = 0; + $html = eaccelerator_get($url); + if ($html !== NULL) { + return $html; + } + $page = file_get_contents(htmlspecialchars_decode($url)); + file_put_contents('/tmp/myspace', $page); + $matches = array (); + preg_match('~link type="text/xml\+oembed" href="(.+)"~imsU', $page, $matches); + if (! empty ($matches)) { + $xml_url = $matches[1].'&maxheight=360'; + $html = getVideoOEmbed($xml_url); + file_put_contents('/tmp/myspace.oembed', $xml_url); + } else { + $html = false; + } + + if ($html == false) { + $html = 'Посмотреть видео'; + $ttl = 60; + } + eaccelerator_put($url, $html, 60); + return $html; +} + +function parseVideoDailymotion($url) +{ + $ttl = 0; + $html = eaccelerator_get($url); + if ($html !== NULL) { + return $html; + } + $oembed_endpoint = 'http://www.dailymotion.com/api/oembed'; + // Create the URLs + $xml_url = $oembed_endpoint.'?url='.rawurlencode($url). + '&format=xml'; + $html = getVideoOEmbed($xml_url); + if ($html == false) { + $html = 'Посмотреть видео'; + $ttl = 60; + } + eaccelerator_put($url, $html, 60); + return $html; +} +function parseVideoYoutube($url) +{ + $ttl = 0; + $html = eaccelerator_get($url); + if ($html !== NULL) { + return $html; + } + $oembed_endpoint = 'http://www.youtube.com/oembed'; + // Create the URLs + $xml_url = $oembed_endpoint.'?url='.rawurlencode($url). + '&format=xml'; +#&maxwidth=640&maxheight=360'; + $html = getVideoOEmbed($xml_url); + if ($html == false) { + $html = 'Посмотреть видео'; + $ttl = 60; + } + eaccelerator_put($url, $html, $ttl); + return $html; +} + +function parseVideoVimeo($url) +{ + $ttl = 0; + $html = eaccelerator_get($url); + if ($html !== NULL) { + return $html; + } + $oembed_endpoint = 'http://www.vimeo.com/api/oembed'; + // Create the URLs + $xml_url = $oembed_endpoint.'.xml?url='.rawurlencode($url). + '&maxwidth=640&maxheight=360'; + $html = getVideoOEmbed($xml_url); + if ($html == false) { + $html = 'Посмотреть видео'; + $ttl = 60; + } + eaccelerator_put($url, $html, $ttl); + return $html; +} + +function getVideoOEmbed($xml_url) +{ + // Load in the oEmbed XML + $xml = curl_get($xml_url); + if ($xml !== FALSE) { + $oembed = @simplexml_load_string($xml); + return html_entity_decode($oembed->html); + } else { + return false; + } +} + +// Curl helper function +function curl_get($url) { + $curl = curl_init($url); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_TIMEOUT, 5); + curl_setopt($curl, CURLOPT_FAILONERROR, 1); + $return = curl_exec($curl); + curl_close($curl); + return $return; +} + + +// Parse smileys in the passed message. +function parsesmileys(&$message) +{ + global $modSettings, $db_prefix, $txt, $user_info; + static $smileyfromcache = array(), $smileytocache = array(); + + // If the smiley array hasn't been set, do it now. + if (empty($smileyfromcache) && $user_info['smiley_set'] != 'none') + { + // Use the default smileys if it is disabled. (better for "portability" of smileys.) + if (empty($modSettings['smiley_enable'])) + { + $smileysfrom = array('>:D', ':D', '::)', '>:(', ':)', ';)', ';D', ':(', ':o', '8)', ':P', '???', ':-[', ':-X', ':-*', ':\'(', ':-\\', '^-^', 'O0', 'C:-)', '0:)'); + $smileysto = array('evil.gif', 'cheesy.gif', 'rolleyes.gif', 'angry.gif', 'smiley.gif', 'wink.gif', 'grin.gif', 'sad.gif', 'shocked.gif', 'cool.gif', 'tongue.gif', 'huh.gif', 'embarassed.gif', 'lipsrsealed.gif', 'kiss.gif', 'cry.gif', 'undecided.gif', 'azn.gif', 'afro.gif', 'police.gif', 'angel.gif'); + $smileysdescs = array('', $txt[289], $txt[450], $txt[288], $txt[287], $txt[292], $txt[293], $txt[291], $txt[294], $txt[295], $txt[451], $txt[296], $txt[526], $txt[527], $txt[529], $txt[530], $txt[528], '', '', '', ''); + } + else + { + // Load the smileys in reverse order by length so they don't get parsed wrong. + $result = db_query(" + SELECT code, filename, description + FROM {$db_prefix}smileys + ORDER BY LENGTH(code) DESC", __FILE__, __LINE__); + $smileysfrom = array(); + $smileysto = array(); + $smileysdescs = array(); + while ($row = mysql_fetch_assoc($result)) + { + $smileysfrom[] = $row['code']; + $smileysto[] = $row['filename']; + $smileysdescs[] = $row['description']; + } + mysql_free_result($result); + } + + // This smiley regex makes sure it doesn't parse smileys within code tags (so [url=mailto:David@bla.com] doesn't parse the :D smiley) + for ($i = 0, $n = count($smileysfrom); $i < $n; $i++) + { + #$smileyfromcache[] = '/(?<=[>:\?\.\s\xA0[\]()*\\\;])(' . preg_quote($smileysfrom[$i], '/') . '|' . preg_quote(htmlspecialchars($smileysfrom[$i], ENT_QUOTES), '/') . ')(?=[^[:alpha:]0-9]|$)/'; + $smileyfromcache[] = '/(' . preg_quote($smileysfrom[$i], '/') . '|' . preg_quote(htmlspecialchars($smileysfrom[$i], ENT_QUOTES), '/') . ')(?=[^[:alpha:]0-9]|$)/'; + $smileytocache[] = '' . htmlspecialchars($smileysdescs[$i]) . ''; + } + } + + // Replace away! (do it twice just in case.) + $message = preg_replace($smileyfromcache, $smileytocache, $message); +} + +// Highlight any code... +function highlight_php_code($code) +{ + global $context; + + // Remove special characters. + $code = un_htmlspecialchars(strtr($code, array('
    ' => "\n", "\t" => 'SMF_TAB();'))); + + $oldlevel = error_reporting(0); + + // It's easier in 4.2.x+. + if ((float) PHP_VERSION < 4.2) + { + ob_start(); + @highlight_string($code); + $buffer = str_replace(array("\n", "\r"), '', ob_get_contents()); + ob_end_clean(); + } + else + $buffer = str_replace(array("\n", "\r"), '', @highlight_string($code, true)); + + error_reporting($oldlevel); + + // Yes, I know this is kludging it, but this is the best way to preserve tabs from PHP :P. + $buffer = preg_replace('~SMF_TAB(<(font color|span style)="[^"]*?">)?\(\);~', "
    \t
    ", $buffer); + + return strtr($buffer, array('\'' => ''', '' => '', '' => '')); +} + +// Put this user in the online log. +function writeLog($force = false) +{ + global $db_prefix, $ID_MEMBER, $user_info, $sc, $modSettings; + + // Don't mark them as online more than every so often. + if (empty($_SESSION['log_time']) || $_SESSION['log_time'] < (time() - 8) || $force) + $_SESSION['log_time'] = time(); + else + return; + + if (!empty($modSettings['who_enabled'])) + { + $serialized = $_GET + array('USER_AGENT' => $_SERVER['HTTP_USER_AGENT']); + unset($serialized['sesc']); + $serialized = addslashes(serialize($serialized)); + } + else + $serialized = ''; + + // Guests use 0, members use their session ID. + $session_id = $user_info['is_guest'] ? 'ip' . $user_info['ip'] : session_id(); + + db_query(" + DELETE FROM {$db_prefix}log_online + WHERE logTime < NOW() - INTERVAL " . ($modSettings['lastActive'] * 60) . " SECOND + OR session = '$session_id'" . (empty($ID_MEMBER) ? '' : " OR ID_MEMBER = $ID_MEMBER"), __FILE__, __LINE__); + db_query(" + INSERT IGNORE INTO {$db_prefix}log_online + (session, ID_MEMBER, ip, url) + VALUES ('$session_id', $ID_MEMBER, IFNULL(INET_ATON('$user_info[ip]'), 0), '$serialized')", __FILE__, __LINE__); + + // Well, they are online now. + if (empty($_SESSION['timeOnlineUpdated'])) + $_SESSION['timeOnlineUpdated'] = time(); + + // Set their login time, if not already done within the last minute. + if (!empty($user_info['last_login']) && $user_info['last_login'] < time() - 60) + { + // Don't count longer than 15 minutes. + if (time() - $_SESSION['timeOnlineUpdated'] > 60 * 15) + $_SESSION['timeOnlineUpdated'] = time(); + + updateMemberData($ID_MEMBER, array('lastLogin' => time(), 'memberIP' => '\'' . $user_info['ip'] . '\'', 'totalTimeLoggedIn' => 'totalTimeLoggedIn + ' . (time() - $_SESSION['timeOnlineUpdated']))); + + $user_info['total_time_logged_in'] += time() - $_SESSION['timeOnlineUpdated']; + $_SESSION['timeOnlineUpdated'] = time(); + } +} + +/* Make sure the browser doesn't come back and repost the form data. + Should be used whenever anything is posted. */ +function redirectexit($setLocation = '', $add = true, $refresh = false) +{ + global $scripturl, $modSettings; + + // Add the scripturl on if needed. + if (WIRELESS) + { + if ($add) + $setLocation = $scripturl . '?' . $setLocation; + + $char = strpos($setLocation, '?') === false ? '?' : ';'; + + if (strpos($setLocation, '#') ==! false) + $setLocation = strtr($setLocation, array('#' => $char . WIRELESS_PROTOCOL . '#')); + else + $setLocation .= $char . WIRELESS_PROTOCOL; + } + elseif ($add) + $setLocation = $scripturl . ($setLocation != '' ? '?' . $setLocation : ''); + + // Put the session ID in. + if (defined('SID') && SID != '') + $setLocation = preg_replace('/' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', $scripturl . '?' . SID . '&', $setLocation); + + // Send the header only. + if (empty($modSettings['redirectMetaRefresh'])) + { + // We send a Refresh header only in special cases because Location looks better. (and is quicker...) + if ($refresh) + header('Refresh: 0; URL=' . strtr($setLocation, array(' ' => '%20', ';' => '%3b'))); + else + header('Location: ' . str_replace(' ', '%20', $setLocation)); + } + else + { + echo ' + + + + + + ', $setLocation, ' + +'; + } + + obExit(false); +} + +// Ends execution. Takes care of template loading and remembering the previous URL. +function obExit($do_header = null, $do_footer = null, $from_index = false) +{ + global $context, $modSettings; + static $header_done = false; + + // Clear out the stat cache. + trackStats(); + + if ($do_header === null) + $do_header = !$header_done; + if ($do_footer === null) + $do_footer = $do_header; + + // Has the template/header been done yet? + if ($do_header) + { + // Start up the session URL fixer. + ob_start('ob_sessrewrite'); + + // Display the screen in the logical order. + template_header(); + $header_done = true; + } + if ($do_footer) + { + // Just show the footer, then. + loadSubTemplate(isset($context['sub_template']) ? $context['sub_template'] : 'main'); + template_footer(); + + // (since this is just debugging... it's okay that it's after .) + db_debug_junk(); + } + + // Remember this URL in case someone doesn't like sending HTTP_REFERER. + $_SESSION['old_url'] = $_SERVER['REQUEST_URI']; + + // For session check verfication.... don't switch browsers... + $_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT']; + + // Don't exit if we're coming from index.php; that will pass through normally. + if (!$from_index || WIRELESS) + exit; +} + +// Set up the administration sections. +function adminIndex($area) +{ + global $txt, $context, $scripturl, $sc, $modSettings, $user_info, $settings; + + // Load the language and templates.... + loadLanguage('Admin'); + loadTemplate('Admin'); + + // Admin area 'Forum Controls'. + $context['admin_areas']['forum'] = array( + 'title' => $txt[427], + 'areas' => array( + 'index' => '' . $txt[208] . '', + 'credits' => '' . $txt['support_credits_title'] . '', + ) + ); + + if (allowedTo('edit_news')) + $context['admin_areas']['forum']['areas']['edit_news'] = '' . $txt[7] . ''; + + if (allowedTo('manage_boards')) + $context['admin_areas']['forum']['areas']['manage_boards'] = '' . $txt[4] . ''; + + if (allowedTo('admin_forum')) + $context['admin_areas']['forum']['areas']['manage_packages'] = '' . $txt['package1'] . ''; + + if (allowedTo('manage_attachments')) + $context['admin_areas']['forum']['areas']['manage_attachments'] = '' . $txt['smf201'] . ''; + + // Admin area 'Forum Configuration'. + if (allowedTo(array('manage_smileys', 'admin_forum', 'moderate_forum'))) + { + $context['admin_areas']['config'] = array( + 'title' => $txt[428], + 'areas' => array() + ); + + if (allowedTo('admin_forum')) + { + $context['admin_areas']['config']['areas']['edit_mods_settings'] = '' . $txt['modSettings_title'] . ''; + $context['admin_areas']['config']['areas']['edit_settings'] = '' . $txt[222] . ''; + $context['admin_areas']['config']['areas']['edit_theme_settings'] = '' . $txt['theme_current_settings'] . ''; + $context['admin_areas']['config']['areas']['manage_themes'] = '' . $txt['theme_admin'] . ''; + } + + if (allowedTo('manage_smileys')) + $context['admin_areas']['config']['areas']['manage_smileys'] = '' . $txt['smileys_manage'] . ''; + + if (allowedTo('moderate_forum')) + { + $context['admin_areas']['config']['areas']['edit_censored'] = '' . $txt[135] . ''; + $context['admin_areas']['config']['areas']['edit_agreement'] = '' . $txt['smf11'] . ''; + } + } + + // Admin area 'Member Controls'. + if (allowedTo(array('moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'manage_permissions'))) + { + $context['admin_areas']['members'] = array( + 'title' => $txt[426], + 'areas' => array() + ); + + if (allowedTo('manage_membergroups')) + $context['admin_areas']['members']['areas']['edit_groups'] = '' . $txt[8] . ''; + + if (allowedTo('manage_permissions')) + $context['admin_areas']['members']['areas']['edit_permissions'] = '' . $txt['edit_permissions'] . ''; + + if (allowedTo('moderate_forum')) + { + $context['admin_areas']['members']['areas']['registration_center'] = '' . (!empty($modSettings['registration_method']) && $modSettings['registration_method'] != 3 ? $txt['registration_center'] : $txt['registration_member']) . ''; + $context['admin_areas']['members']['areas']['view_members'] = '' . $txt[5] . ''; + $context['admin_areas']['members']['areas']['edit_reserved_names'] = '' . $txt[207] . ''; + $context['admin_areas']['members']['areas']['warning_manager'] = '' . $txt['visual_warning_management'] . ''; + $context['admin_areas']['members']['areas']['postmod_manager'] = '' . $txt['visual_postmod_manager'] . ''; + } + + if (allowedTo('send_mail')) + $context['admin_areas']['members']['areas']['email_members'] = '' . $txt[6] . ''; + + if (allowedTo('manage_bans')) + $context['admin_areas']['members']['areas']['ban_members'] = '' . $txt['ban_title'] . ''; + } + + // Admin area 'Maintenance Controls'. + if (allowedTo('admin_forum')) + { + $context['admin_areas']['maintenance'] = array( + 'title' => $txt[501], + 'areas' => array( + 'maintain_forum' => '' . $txt['maintain_title'] . '', + 'view_errors' => '' . $txt['errlog1'] . '' + ) + ); + + if (!empty($modSettings['modlog_enabled'])) + $context['admin_areas']['maintenance']['areas']['view_moderation_log'] = '' . $txt['modlog_view'] . ''; + } + + // Make sure the administrator has a valid session... + validateSession(); + + // Figure out which one we're in now... + foreach ($context['admin_areas'] as $id => $section) + if (isset($section[$area])) + $context['admin_section'] = $id; + $context['admin_area'] = $area; + + // obExit will know what to do! + $context['template_layers'][] = 'admin'; +} + +// Usage: logAction('remove', array('starter' => $ID_MEMBER_STARTED)); +function logAction($action, $extra = array()) +{ + global $db_prefix, $ID_MEMBER, $modSettings, $user_info; + + if (!empty($modSettings['modlog_enabled'])) + { + db_query(" + INSERT INTO {$db_prefix}log_actions + (logTime, ID_MEMBER, IP, action, extra) + VALUES (" . time() . ", $ID_MEMBER, '$user_info[ip]', '$action', + '" . addslashes(serialize($extra)) . "')", __FILE__, __LINE__); + + return db_insert_id(); + } + + return false; +} + +// Track Statistics. +function trackStats($stats = array()) +{ + global $db_prefix, $modSettings; + static $cache_stats = array(); + + if (empty($modSettings['trackStats'])) + return false; + if (!empty($stats)) + return $cache_stats = array_merge($cache_stats, $stats); + elseif (empty($cache_stats)) + return false; + + $setStringUpdate = ''; + foreach ($cache_stats as $field => $change) + { + $setStringUpdate .= ' + ' . $field . ' = ' . ($change === '+' ? $field . ' + 1' : $change) . ','; + + if ($change === '+') + $cache_stats[$field] = 1; + } + + $date = strftime('%Y%m%d', forum_time(false)); + db_query(" + UPDATE {$db_prefix}log_activity + SET" . substr($setStringUpdate, 0, -1) . " + WHERE date = $date + LIMIT 1", __FILE__, __LINE__); + if (db_affected_rows() == 0) + { + db_query(" + INSERT IGNORE INTO {$db_prefix}log_activity + (date, " . implode(', ', array_keys($cache_stats)) . ") + VALUES ($date, " . implode(', ', $cache_stats) . ')', __FILE__, __LINE__); + } + + return true; +} + +// Make sure the user isn't posting over and over again. +function spamProtection($error_type) +{ + global $modSettings, $txt, $db_prefix, $user_info; + + // Delete old entries... if you can moderate this board or this is login, override spamWaitTime with 2. + if ($error_type == 'spam' && !allowedTo('moderate_board')) + db_query(" + DELETE FROM {$db_prefix}log_floodcontrol + WHERE logTime < " . (time() - $modSettings['spamWaitTime']), __FILE__, __LINE__); + else + db_query(" + DELETE FROM {$db_prefix}log_floodcontrol + WHERE (logTime < " . (time() - 2) . " AND ip = '$user_info[ip]') + OR logTime < " . (time() - $modSettings['spamWaitTime']), __FILE__, __LINE__); + + // Add a new entry, deleting the old if necessary. + db_query(" + REPLACE INTO {$db_prefix}log_floodcontrol + (ip, logTime) + VALUES ('$user_info[ip]', " . time() . ")", __FILE__, __LINE__); + // If affected is 0 or 2, it was there already. + if (db_affected_rows() != 1) + { + // Spammer! You only have to wait a *few* seconds! + fatal_lang_error($error_type . 'WaitTime_broken', false, array($modSettings['spamWaitTime'])); + return true; + } + + // They haven't posted within the limit. + return false; +} + +// Get the size of a specified image with better error handling. +function url_image_size($url) +{ + // Get the host to pester... + preg_match('~^\w+://(.+?)/(.*)$~', $url, $match); + + // Can't figure it out, just try the image size. + if ($url == '' || $url == 'http://' || $url == 'https://') + return false; + elseif (!isset($match[1])) + return @getimagesize($url); + + // Try to connect to the server... give it one full second. + $temp = 0; + $fp = @fsockopen($match[1], 80, $temp, $temp, 1); + + // Successful? Continue... + if ($fp != false) + { + // Send the HEAD request. + fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Connection: close' . "\r\n" . 'Host: ' . $match[1] . "\r\n\r\n"); + // Read in the HTTP/1.1 or whatever. + $test = substr(fgets($fp, 11), -1); + fclose($fp); + + // See if it returned a 404/403 or something. + if ($test < 4) + return @getimagesize($url); + } + + // Didn't work. + return false; +} + +function determineTopicClass(&$topic_context) +{ + // Set topic class depending on locked status and number of replies. + if ($topic_context['is_very_hot']) + $topic_context['class'] = 'veryhot'; + elseif ($topic_context['is_hot']) + $topic_context['class'] = 'hot'; + else + $topic_context['class'] = 'normal'; + + $topic_context['class'] .= $topic_context['is_poll'] ? '_poll' : '_post'; + + if ($topic_context['is_locked']) + $topic_context['class'] .= '_locked'; + + if ($topic_context['is_sticky']) + $topic_context['class'] .= '_sticky'; + + // This is so old themes will still work. + $topic_context['extended_class'] = &$topic_context['class']; +} + +// Sets up the basic theme context stuff. +function setupThemeContext() +{ + global $modSettings, $user_info, $scripturl, $context, $settings, $options, $txt, $maintenance; + global $db_prefix; // Grudge's Mod + + // Get some news... + $context['news_lines'] = explode("\n", str_replace("\r", '', trim(addslashes($modSettings['news'])))); + $context['fader_news_lines'] = array(); + for ($i = 0, $n = count($context['news_lines']); $i < $n; $i++) + { + if (trim($context['news_lines'][$i]) == '') + continue; + + // Clean it up for presentation ;). + $context['news_lines'][$i] = doUBBC(stripslashes(trim($context['news_lines'][$i]))); + + // Gotta be special for the javascript. + $context['fader_news_lines'][$i] = strtr(addslashes($context['news_lines'][$i]), array('/' => '\/', ' (isset($_SESSION['unread_messages']) ? $_SESSION['unread_messages'] : 0)) + $context['user']['popup_messages'] = true; + else + $context['user']['popup_messages'] = false; + $_SESSION['unread_messages'] = $user_info['unread_messages']; + + if (allowedTo('moderate_forum')) + $context['unapproved_members'] = !empty($modSettings['registration_method']) && $modSettings['registration_method'] == 2 ? $modSettings['unapprovedMembers'] : 0; + + $context['user']['avatar'] = array(); + + // Figure out the avatar... uploaded? + if ($user_info['avatar']['url'] == '') + { + // If they are allowed to use an uploaded avatar. + if (!empty($user_info['avatar']['ID_ATTACH']) && !empty($modSettings['avatar_allow_upload'])) + { + $__avatar = glob('attachments/avatar_'.$context['user']['id'].'.{jpg,png,gif}', GLOB_BRACE); + if (!empty($__avatar)) $__avatar = $__avatar[0]; + $context['user']['avatar']['href'] = 'http://img.rock.ru/forum/'.$__avatar; + } + } + // Full URL? + elseif (substr($user_info['avatar']['url'], 0, 7) == 'http://' && !empty($modSettings['avatar_allow_external_url'])) + { + $context['user']['avatar']['href'] = $user_info['avatar']['url']; + if ($modSettings['avatar_action_too_large'] == 'option_html_resize') + { + if (!empty($modSettings['avatar_max_width_external'])) + $context['user']['avatar']['width'] = $modSettings['avatar_max_width_external']; + if (!empty($modSettings['avatar_max_height_external'])) + $context['user']['avatar']['height'] = $modSettings['avatar_max_height_external']; + } + } + // Server stored? + elseif (!empty($modSettings['avatar_allow_server_stored'])) + $context['user']['avatar']['href'] = $modSettings['avatar_url'] . '/' . htmlspecialchars($user_info['avatar']['url']); + + if (!empty($context['user']['avatar'])) + $context['user']['avatar']['image'] = ''; + + // Figure out how long they've been logged in. + $context['user']['total_time_logged_in'] = array( + 'days' => floor($user_info['total_time_logged_in'] / 86400), + 'hours' => floor(($user_info['total_time_logged_in'] % 86400) / 3600), + 'minutes' => floor(($user_info['total_time_logged_in'] % 3600) / 60) + ); + } + else + { + $context['user']['messages'] = 0; + $context['user']['unread_messages'] = 0; + $context['user']['avatar'] = array(); + $context['user']['total_time_logged_in'] = array('days' => 0, 'hours' => 0, 'minutes' => 0); + $context['user']['popup_messages'] = false; + + if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1) + $txt['welcome_guest'] .= $txt['welcome_guest_activate']; + } + + // Set up the menu privileges. + $context['allow_search'] = allowedTo('search_posts'); + $context['allow_admin'] = allowedTo(array('admin_forum', 'manage_boards', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_attachments', 'manage_smileys')); + $context['allow_edit_profile'] = !$user_info['is_guest'] && allowedTo(array('profile_view_own', 'profile_view_any', 'profile_identity_own', 'profile_identity_any', 'profile_extra_own', 'profile_extra_any', 'profile_remove_own', 'profile_remove_any', 'moderate_forum', 'manage_membergroups')); + $context['allow_calendar'] = allowedTo('calendar_view') && !empty($modSettings['cal_enabled']); + + $context['allow_pm'] = allowedTo('pm_read'); + + $context['in_maintenance'] = !empty($maintenance); + $context['current_time'] = timeformat(time(), false); + $context['show_vBlogin'] = !empty($modSettings['enableVBStyleLogin']) && $user_info['is_guest']; + + // This is here because old index templates might still use it. + $context['show_news'] = !empty($settings['enable_news']); + + // This is done to make it easier to add to all themes... + if ($context['user']['popup_messages'] && !empty($options['popup_messages'])) + { + $context['html_headers'] .= ' + '; + } + + if (!isset($context['page_title'])) + $context['page_title'] = ''; +} + +// This is the only template included in the sources... +function template_rawdata() +{ + global $context; + + echo $context['raw_data']; +} + +function template_header() +{ + global $txt, $modSettings, $context, $settings, $user_info; + + setupThemeContext(); + + // Print stuff to prevent caching of pages. + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + + foreach ($context['template_layers'] as $layer) + { + loadSubTemplate($layer . '_above', true); + + // May seem contrived, but this is done in case the main layer isn't there... + if ($layer == 'main' && allowedTo('admin_forum')) + { + $securityFiles = array('install.php', 'upgrade.php', 'repair_paths.php', 'repair_settings.php'); + foreach ($securityFiles as $i => $securityFile) + { + if (!file_exists($securityFile)) + unset($securityFiles[$i]); + } + + if (!empty($securityFiles)) + { + echo ' +
    + ', $txt['smf299'], ' +
    '; + + foreach ($securityFiles as $securityFile) + echo ' + ', $txt['smf300'], $securityFile, '!
    '; + + echo ' +
    +
    '; + } + } + // If the user is banned from posting inform them of it. + elseif ($layer == 'main' && !empty($_SESSION['ban']['cannot_post']['is_banned'])) + { + echo ' +
    + ', sprintf($txt['you_are_post_banned'], $user_info['is_guest'] ? $txt[28] : $user_info['name']); + + // The substr here is used to get rid of the first of two
    s. + if (isset($_SESSION['ban']['cannot_post']['reason'])) + echo ' +
    ', substr($_SESSION['ban']['cannot_post']['reason'], 6), '
    '; + + echo ' +
    '; + } + } + + if (isset($settings['use_default_images']) && $settings['use_default_images'] == 'defaults' && isset($settings['default_template'])) + { + $settings['theme_url'] = $settings['default_theme_url']; + $settings['images_url'] = $settings['default_images_url']; + $settings['theme_dir'] = $settings['default_theme_dir']; + } +} + +// Show the copyright... +function theme_copyright($get_it = false) +{ + global $forum_copyright, $context, $boardurl, $forum_version, $txt; + static $found = false; + + // Meaning, this is the footer checking in.. + if ($get_it === true) + return $found; + + echo ' + '; + + if ($get_it == 'none') + { + $found = true; + echo ' + The administrator doesn\'t want a copyright notice saying this is copyright 2001-2005 by
    Lewis Media, and named SMF, so the forum will honor this request.'; + } + // If it's in the copyright, and we are outputting it... it's been found. + elseif ((strpos($forum_copyright, 'SMF') !== false || strpos($forum_copyright, 'SMF') !== false || strpos($forum_copyright, 'SMF') !== false) && (strpos($forum_copyright, 'Lewis Media') !== false || strpos($forum_copyright, 'Lewis Media') !== false)) + { + $found = true; + echo $forum_copyright; + } + + echo ' + '; +} + +function template_footer() +{ + global $context, $settings, $modSettings, $time_start, $db_count; + + // Show the load time? (only makes sense for the footer.) + $context['show_load_time'] = $modSettings['timeLoadPageEnable'] == 1; + $time_start = explode(' ', $time_start); + $time_end = explode(' ', microtime()); + $context['load_time'] = round($time_end[0] + $time_end[1] - $time_start[0] - $time_start[1], 3); + $context['load_queries'] = $db_count; + + if (isset($settings['use_default_images']) && $settings['use_default_images'] == 'defaults' && isset($settings['default_template'])) + { + $settings['theme_url'] = $settings['actual_theme_url']; + $settings['images_url'] = $settings['actual_images_url']; + $settings['theme_dir'] = $settings['actual_theme_dir']; + } + + foreach (array_reverse($context['template_layers']) as $layer) + loadSubTemplate($layer . '_below', true); + + // Do not remove hard-coded text - it's in here so users cannot change the text easily. (as if it were in language file) + if (!theme_copyright(true) && !empty($context['template_layers']) && SMF !== 'SSI' && !WIRELESS) + { + echo ' +
    + Sorry, the copyright must be in the template.
    + Please notify this ' . "forum's" . ' administrator that this site is using an ILLEGAL copy of SMF! +
    '; + + log_error('Copyright removed!!'); + } +} + +// Debugging. +function db_debug_junk() +{ + global $db_cache, $db_count, $context, $scripturl; + + // Add to Settings.php if you want to show the debugging information. + if (!isset($GLOBALS['db_show_debug']) || $GLOBALS['db_show_debug'] !== true || (isset($_GET['action']) && $_GET['action'] == 'viewquery')) + return; + + if (empty($_SESSION['view_queries'])) + $_SESSION['view_queries'] = 0; + + $_SESSION['debug'] = $db_cache; + echo ' +
    ', (isset($context['template']) ? ' + Template: ' . $context['template'] . '' . (isset($context['sub_template']) ? ' (' . $context['sub_template'] . ')' : '') . '.
    ' : ''), ' + Queries used: ', $db_count, '.
    +
    '; + + if ($_SESSION['view_queries'] == 1) + foreach ($db_cache as $q => $qq) + echo ' + ', substr(trim($qq['q']), 0, 6) == 'SELECT' ? '' : '', nl2br(str_replace("\t", '   ', ltrim($qq['q'], "\n\r"))) . ' in ' . $qq['f'] . ' line ' . $qq['l'] . ', which took ' . $qq['t'] . ' seconds.
    +
    '; + + echo ' + [' . (empty($_SESSION['view_queries']) ? 'show' : 'hide') . ' queries] +
    '; +} + +// Get an attachment's encrypted filename. If $new is true, won't check for file existence. +function getAttachmentFilename($filename, $attachment_id, $new = false) +{ + global $modSettings; + + // Remove special accented characters - ie. s?. + $clean_name = strtr($filename, '????????????????????????????????????????????????????????????', 'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'); + $clean_name = strtr($clean_name, array('?' => 'TH', '?' => 'th', '?' => 'DH', '?' => 'dh', '?' => 'ss', '?' => 'OE', '?' => 'oe', '?' => 'AE', '?' => 'ae', '?' => 'u')); + + // Sorry, no spaces, dots, or anything else but letters allowed. + $clean_name = preg_replace(array('/\s/', '/[^\w_\.\-]/'), array('_', ''), $clean_name); + + $enc_name = $attachment_id . '_' . str_replace('.', '_', $clean_name) . md5($clean_name); + $clean_name = preg_replace('~\.[\.]+~', '.', $clean_name); + + if ($attachment_id == false || ($new && empty($modSettings['attachmentEncryptFilenames']))) + return $clean_name; + elseif ($new) + return $enc_name; + + if (file_exists($modSettings['attachmentUploadDir'] . '/' . $enc_name)) + $filename = $modSettings['attachmentUploadDir'] . '/' . $enc_name; + else + $filename = $modSettings['attachmentUploadDir'] . '/' . $clean_name; + + return $filename; +} + +function getThumbnailFilename($filename, $attachment_id, $new = false) +{ + global $modSettings; +/* + // Remove special accented characters - ie. s?. + $clean_name = strtr($filename, '????????????????????????????????????????????????????????????', 'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'); + $clean_name = strtr($clean_name, array('?' => 'TH', '?' => 'th', '?' => 'DH', '?' => 'dh', '?' => 'ss', '?' => 'OE', '?' => 'oe', '?' => 'AE', '?' => 'ae', '?' => 'u')); + + // Sorry, no spaces, dots, or anything else but letters allowed. + $clean_name = preg_replace(array('/\s/', '/[^\w_\.\-]/'), array('_', ''), $clean_name); + + $enc_name = $attachment_id . '_' . str_replace('.', '_', $clean_name) . md5($clean_name); + $clean_name = preg_replace('~\.[\.]+~', '.', $clean_name); + + if ($attachment_id == false || ($new && empty($modSettings['attachmentEncryptFilenames']))) + return $clean_name; + elseif ($new) + return $enc_name; + + if (file_exists($modSettings['attachmentUploadDir'] . '/thumbs/' . $enc_name)) + $filename = $modSettings['attachmentUploadDir'] . '/thumbs/' . $enc_name; + else + $filename = $modSettings['attachmentUploadDir'] . '/thumbs/' . $clean_name; + + return $filename;*/ + return $modSettings['attachmentUploadDir']."/thumbs/".$attachment_id.md5($filename); +} + +function ob_googlebot_getAgent( &$user_agent, &$user_name, &$result, $guest ) +{ + //Search Spiders + $spider_agents = array ( + array ( + 'agent' => 'WISENutbot', + 'spidername' => 'Looksmart spider', + 'spider' => true, + ), + array ( + 'agent' => 'MSNBot', + 'spidername' => 'MSN spider', + 'spider' => true, + ), + array ( + 'agent' => 'W3C_Validator', + 'spidername' => 'W3C Validator', + 'spider' => true, + ), + array ( + 'agent' => 'Googlebot-Image', + 'spidername' => 'Google-Image Spider', + 'spider' => true, + ), + array ( + 'agent' => 'Googlebot', + 'spidername' => 'Google spider', + 'spider' => true, + ), + array ( + 'agent' => 'Mediapartners-Google', + 'spidername' => 'Google AdSense spider', + 'spider' => true, + ), + array ( + 'agent' => 'Scooter', + 'spidername' => 'Altavista spider', + 'spider' => true, + ), + array ( + 'agent' => 'Yahoo! Slurp', + 'spidername' => 'Yahoo spider', + 'spider' => true, + ), + array ( + 'agent' => 'Yandex', + 'spidername' => 'YandexBot', + 'spider' => true + ), + array ( + 'agent' => 'Rambler', + 'spidername' => 'RamblerBot', + 'spider' => true + ), + array ( + 'agent' => 'FAST-WebCrawler', + 'spider' => true, + ), + array ( + 'agent' => 'Wget', + 'spider' => true, + ), + array ( + 'agent' => 'Ask Jeeves', + 'spider' => true, + ), + array ( + 'agent' => 'Speedy Spider', + 'spider' => true, + ), + array ( + 'agent' => 'SurveyBot', + 'spider' => true, + ), + array ( + 'agent' => 'IBM_Planetwide', + 'spider' => true, + ), + array ( + 'agent' => 'GigaBot', + 'spider' => true, + ), + array ( + 'agent' => 'ia_archiver', + 'spider' => true, + ), + array ( + 'agent' => 'FAST-WebCrawler', + 'spider' => true, + ), + array ( + 'agent' => 'Inktomi Slurp', + 'spider' => true, + ), + ); + + foreach( $spider_agents as $poss ) + if (strpos(strtolower($user_agent), strtolower($poss['agent'])) !== false) + { + if ( $guest && isset($poss['spider']) && $poss['spider'] ) + $user_name = isset($poss['spidername']) ? $poss['spidername'] : (isset($poss['name']) ? $poss['name'] : $poss['agent']); + + $result = isset($poss['name']) ? $poss['name'] : $poss['agent']; + return isset($poss['spider']) && $poss['spider']; + } + + $result = $user_agent; + return false; +}; + +?> diff --git a/Sources/Themes.php b/Sources/Themes.php new file mode 100644 index 0000000..24eb5d7 --- /dev/null +++ b/Sources/Themes.php @@ -0,0 +1,1304 @@ + 'ThemeAdmin', + 'settings' => 'SetThemeSettings', + 'options' => 'SetThemeOptions', + 'remove' => 'RemoveTheme', + 'pick' => 'PickTheme', + 'install' => 'ThemeInstall', + 'edit' => 'EditTheme' + ); + + // Follow the sa or just go to administration. + if (!empty($subActions[$_GET['sa']])) + $subActions[$_GET['sa']](); + else + $subActions['admin'](); +} + +// Administrative global settings. +function SetThemeSettings() +{ + global $txt, $sc, $context, $settings, $db_prefix, $modSettings; + + if (empty($_GET['id'])) + return ThemeAdmin(); + $_GET['id'] = (int) $_GET['id']; + + loadLanguage('Admin'); + isAllowedTo('admin_forum'); + + // Just for navigation, show some nice bar on the left. + adminIndex($settings['theme_id'] == $_GET['id'] ? 'edit_theme_settings' : 'manage_themes'); + + // Validate inputs/user. + if (empty($_GET['id'])) + fatal_lang_error('theme3', false); + + // Submitting! + if (isset($_POST['submit'])) + { + checkSession(); + + if (empty($_POST['options'])) + $_POST['options'] = array(); + if (empty($_POST['default_options'])) + $_POST['default_options'] = array(); + + // Set up the sql query. + $setString = ''; + foreach ($_POST['options'] as $opt => $val) + $setString .= " + (0, $_GET[id], '$opt', '" . (is_array($val) ? implode(',', $val) : $val) . "'),"; + foreach ($_POST['default_options'] as $opt => $val) + $setString .= " + (0, 1, '$opt', '" . (is_array($val) ? implode(',', $val) : $val) . "'),"; + // If we're actually inserting something.. + if ($setString != '') + { + // Get rid of the last comma. + $setString = substr($setString, 0, strlen($setString) - 1); + + db_query(" + REPLACE INTO {$db_prefix}themes + (ID_MEMBER, ID_THEME, variable, value) + VALUES $setString", __FILE__, __LINE__); + } + + redirectexit('action=theme;sa=settings;id=' . $_GET['id'] . ';sesc=' . $sc); + } + + checkSession('get'); + + // Fetch the smiley sets... + $sets = explode(',', 'none,' . $modSettings['smiley_sets_known']); + $set_names = explode("\n", $txt['smileys_none'] . "\n" . $modSettings['smiley_sets_names']); + $context['smiley_sets'] = array( + '' => $txt['smileys_no_default'] + ); + foreach ($sets as $i => $set) + $context['smiley_sets'][$set] = $set_names[$i]; + + $old_id = $settings['theme_id']; + loadTheme($_GET['id'], false); + + // Let the theme take care of the settings. + loadTemplate('Settings'); + loadSubTemplate('settings'); + + $context['sub_template'] = 'set_settings'; + $context['page_title'] = $txt['theme4']; + + foreach ($settings as $setting => $dummy) + { + if (!in_array($setting, array('theme_url', 'theme_dir', 'images_url'))) + $settings[$setting] = htmlspecialchars($settings[$setting]); + } + + $context['settings'] = $context['theme_settings']; + $context['theme_settings'] = $settings; + + foreach ($context['settings'] as $i => $setting) + { + if (!isset($setting['type']) || $setting['type'] == 'bool') + $context['settings'][$i]['type'] = 'checkbox'; + elseif ($setting['type'] == 'int' || $setting['type'] == 'integer') + $context['settings'][$i]['type'] = 'number'; + elseif ($setting['type'] == 'string') + $context['settings'][$i]['type'] = 'text'; + + if (isset($setting['options'])) + $context['settings'][$i]['type'] = 'list'; + + $context['settings'][$i]['value'] = !isset($settings[$setting['id']]) ? '' : $settings[$setting['id']]; + } + + loadTheme($old_id, false); + + loadTemplate('Themes'); +} + +// Administrative global settings. +function SetThemeOptions() +{ + global $txt, $sc, $context, $settings, $db_prefix, $modSettings; + + if (empty($_GET['id'])) + return ThemeAdmin(); + $_GET['id'] = (int) $_GET['id']; + if (empty($_GET['id'])) + fatal_lang_error('theme3', false); + + loadLanguage('Profile'); + isAllowedTo('admin_forum'); + + adminIndex('manage_themes'); + + // Submit? + if (isset($_POST['submit']) && empty($_POST['who'])) + { + checkSession(); + + if (empty($_POST['options'])) + $_POST['options'] = array(); + if (empty($_POST['default_options'])) + $_POST['default_options'] = array(); + + // Set up the sql query. + $setString = ''; + + foreach ($_POST['options'] as $opt => $val) + $setString .= " + (-1, $_GET[id], '$opt', '" . (is_array($val) ? implode(',', $val) : $val) . "'),"; + + $old_settings = array(); + foreach ($_POST['default_options'] as $opt => $val) + { + $old_settings[] = $opt; + + $setString .= " + (-1, 1, '$opt', '" . (is_array($val) ? implode(',', $val) : $val) . "'),"; + } + + // If we're actually inserting something.. + if ($setString != '') + { + // Get rid of the last comma. + $setString = substr($setString, 0, strlen($setString) - 1); + + // Are there options in non-default themes set that should be cleared? + if (!empty($old_settings)) + db_query(" + DELETE FROM {$db_prefix}themes + WHERE ID_THEME != 1 + AND ID_MEMBER = -1 + AND variable IN ('" . implode("', '", $old_settings) . "')", __FILE__, __LINE__); + + db_query(" + REPLACE INTO {$db_prefix}themes + (ID_MEMBER, ID_THEME, variable, value) + VALUES $setString", __FILE__, __LINE__); + } + + redirectexit('action=theme;sa=options;id=' . $_GET['id'] . ';sesc=' . $sc); + } + elseif (isset($_POST['submit']) && !empty($_POST['who'])) + { + checkSession(); + + if (empty($_POST['options'])) + $_POST['options'] = array(); + if (empty($_POST['default_options'])) + $_POST['default_options'] = array(); + + $old_settings = array(); + foreach ($_POST['default_options'] as $opt => $val) + { + db_query(" + REPLACE INTO {$db_prefix}themes + (ID_MEMBER, ID_THEME, variable, value) + SELECT ID_MEMBER, 1, '$opt', '" . (is_array($val) ? implode(',', $val) : $val) . "' + FROM {$db_prefix}members", __FILE__, __LINE__); + + db_query(" + REPLACE INTO {$db_prefix}themes + (ID_MEMBER, ID_THEME, variable, value) + VALUES (-1, 1, '$opt', '" . (is_array($val) ? implode(',', $val) : $val) . "')", __FILE__, __LINE__); + + $old_settings[] = $opt; + } + + // Delete options from other themes. + if (!empty($old_settings)) + db_query(" + DELETE FROM {$db_prefix}themes + WHERE ID_THEME != 1 + AND ID_MEMBER != 0 + AND variable IN ('" . implode("', '", $old_settings) . "')", __FILE__, __LINE__); + + foreach ($_POST['options'] as $opt => $val) + { + db_query(" + REPLACE INTO {$db_prefix}themes + (ID_MEMBER, ID_THEME, variable, value) + SELECT ID_MEMBER, $_GET[id], '$opt', '" . (is_array($val) ? implode(',', $val) : $val) . "' + FROM {$db_prefix}members", __FILE__, __LINE__); + + db_query(" + REPLACE INTO {$db_prefix}themes + (ID_MEMBER, ID_THEME, variable, value) + VALUES (-1, $_GET[id], '$opt', '" . (is_array($val) ? implode(',', $val) : $val) . "')", __FILE__, __LINE__); + } + + redirectexit('action=theme;sa=options;id=' . $_GET['id'] . ';sesc=' . $sc . ';who=1'); + } + + checkSession('get'); + + $old_id = $settings['theme_id']; + loadTheme($_GET['id'], false); + + // Let the theme take care of the settings. + loadTemplate('Settings'); + loadSubTemplate('options'); + + $context['sub_template'] = 'set_options'; + $context['page_title'] = $txt['theme4']; + + $context['options'] = $context['theme_options']; + $context['theme_settings'] = $settings; + + if (empty($_REQUEST['who'])) + { + $request = db_query(" + SELECT variable, value + FROM {$db_prefix}themes + WHERE ID_THEME IN (1, " . $_GET['id'] . ") + AND ID_MEMBER = -1", __FILE__, __LINE__); + $context['theme_options'] = array(); + while ($row = mysql_fetch_assoc($request)) + $context['theme_options'][$row['variable']] = $row['value']; + mysql_free_result($request); + + $context['theme_options_reset'] = false; + } + else + { + $context['theme_options'] = array(); + $context['theme_options_reset'] = true; + } + + foreach ($context['options'] as $i => $setting) + { + if (!isset($setting['type']) || $setting['type'] == 'bool') + $context['options'][$i]['type'] = 'checkbox'; + elseif ($setting['type'] == 'int' || $setting['type'] == 'integer') + $context['options'][$i]['type'] = 'number'; + elseif ($setting['type'] == 'string') + $context['options'][$i]['type'] = 'text'; + + if (isset($setting['options'])) + $context['options'][$i]['type'] = 'list'; + + $context['options'][$i]['value'] = !isset($context['theme_options'][$setting['id']]) ? '' : $context['theme_options'][$setting['id']]; + } + + loadTheme($old_id, false); + + loadTemplate('Themes'); +} + +function ThemeAdmin() +{ + global $txt, $context, $db_prefix, $sc, $boarddir; + + loadLanguage('Admin'); + isAllowedTo('admin_forum'); + + adminIndex('manage_themes'); + + // If we aren't submitting - that is, if we are about to... + if (!isset($_POST['submit'])) + { + checkSession('get'); + + loadTemplate('Themes'); + + // Load up all the themes. + $context['themes'] = array(); + $request = db_query(" + SELECT value AS name, ID_THEME + FROM {$db_prefix}themes + WHERE variable = 'name' + AND ID_MEMBER = 0 + ORDER BY ID_THEME", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $context['themes'][] = array( + 'id' => $row['ID_THEME'], + 'name' => $row['name'] + ); + } + mysql_free_result($request); + + // Can we create a new theme? + $context['can_create_new'] = is_writable($boarddir . '/Themes'); + $context['new_theme_dir'] = $boarddir . '/Themes/'; + + // Look for a non existent theme directory. (ie theme87.) + $theme_dir = $boarddir . '/Themes/theme'; + $i = 1; + while (file_exists($theme_dir . $i)) + $i++; + $context['new_theme_name'] = 'theme' . $i; + } + else + { + checkSession(); + + // Commit the new settings. + updateSettings(array( + 'theme_allow' => $_POST['options']['theme_allow'], + 'theme_default' => $_POST['options']['theme_default'], + 'theme_guests' => $_POST['options']['theme_guests'] + )); + + if ((int) $_POST['theme_reset'] != -1) + updateMemberData(null, array('ID_THEME' => (int) $_POST['theme_reset'])); + + redirectexit('action=theme;sa=admin;sesc=' . $sc); + } +} + +// Remove a theme from the database. +function RemoveTheme() +{ + global $db_prefix, $modSettings, $sc; + + checkSession('get'); + + isAllowedTo('admin_forum'); + + // You can't delete the default theme! + if ($_GET['th'] == 1) + fatal_lang_error(1, false); + + // The theme's ID must be an integer. + $_GET['th'] = (int) $_GET['th']; + + $known = explode(',', $modSettings['knownThemes']); + for ($i = 0, $n = count($known); $i < $n; $i++) + { + if ($known[$i] == $_GET['th']) + unset($known[$i]); + } + + db_query(" + DELETE FROM {$db_prefix}themes + WHERE ID_THEME = $_GET[th]", __FILE__, __LINE__); + + db_query(" + UPDATE {$db_prefix}members + SET ID_THEME = 0 + WHERE ID_THEME = $_GET[th]", __FILE__, __LINE__); + + $known = strtr(implode(',', $known), array(',,' => ',')); + + // Fix it if the theme was the overall default theme. + if ($modSettings['theme_guests'] == $_GET['th']) + updateSettings(array('theme_guests' => '1', 'knownThemes' => $known)); + else + updateSettings(array('knownThemes' => $known)); + + redirectexit('action=theme;sa=admin;sesc=' . $sc); +} + +// Choose a theme from a list. +function PickTheme() +{ + global $txt, $db_prefix, $sc, $context, $modSettings, $user_info, $ID_MEMBER, $language; + + checkSession('get'); + + loadTemplate('Themes'); + loadLanguage('Profile'); + + $_SESSION['ID_THEME'] = 0; + + // Have we made a desicion, or are we just browsing? + if (isset($_GET['id'])) + { + // Save for this user. + if (!isset($_REQUEST['u']) || !allowedTo('admin_forum')) + { + updateMemberData($ID_MEMBER, array('ID_THEME' => (int) $_GET['id'])); + + redirectexit('action=profile;sa=theme'); + } + // For everyone. + elseif ($_REQUEST['u'] == '0') + { + updateMemberData(null, array('ID_THEME' => (int) $_GET['id'])); + + redirectexit('action=theme;sa=admin;sesc=' . $sc); + } + // Change the default/guest theme. + elseif ($_REQUEST['u'] == '-1') + { + updateSettings(array('theme_guests' => (int) $_GET['id'])); + + redirectexit('action=theme;sa=admin;sesc=' . $sc); + } + // Change a specific member's theme. + else + { + updateMemberData((int) $_REQUEST['u'], array('ID_THEME' => (int) $_GET['id'])); + + redirectexit('action=profile;u=' . (int) $_REQUEST['u'] . ';sa=theme'); + } + } + + // Figure out who the member of the minute is, and what theme they've chosen. + if (!isset($_REQUEST['u']) || !allowedTo('admin_forum')) + { + $context['current_member'] = $ID_MEMBER; + $context['current_theme'] = $user_info['theme']; + } + // Everyone can't chose just one. + elseif ($_REQUEST['u'] == '0') + { + $context['current_member'] = 0; + $context['current_theme'] = 0; + } + // Guests and such... + elseif ($_REQUEST['u'] == '-1') + { + $context['current_member'] = -1; + $context['current_theme'] = $modSettings['theme_guests']; + } + // Someones else :P. + else + { + $context['current_member'] = (int) $_REQUEST['u']; + + $request = db_query(" + SELECT ID_THEME + FROM {$db_prefix}members + WHERE ID_MEMBER = $context[current_member] + LIMIT 1", __FILE__, __LINE__); + list ($context['current_theme']) = mysql_fetch_row($request); + mysql_free_result($request); + } + // Get the theme name and descriptions. + $context['available_themes'] = array(); + if (!empty($modSettings['knownThemes'])) + { + $knownThemes = implode("', '", explode(',', $modSettings['knownThemes'])); + + $request = db_query(" + SELECT ID_THEME, variable, value + FROM {$db_prefix}themes + WHERE variable IN ('name', 'theme_url', 'theme_dir', 'images_url')" . (empty($modSettings['theme_default']) && !allowedTo('admin_forum') ? " + AND ID_THEME IN ('$knownThemes') + AND ID_THEME != 1" : '') . " + AND ID_THEME != 0 + LIMIT " . count(explode(',', $modSettings['knownThemes'])) * 4, __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + if (!isset($context['available_themes'][$row['ID_THEME']])) + $context['available_themes'][$row['ID_THEME']] = array( + 'id' => $row['ID_THEME'], + 'selected' => $context['current_theme'] == $row['ID_THEME'], + 'num_users' => 0 + ); + $context['available_themes'][$row['ID_THEME']][$row['variable']] = $row['value']; + } + mysql_free_result($request); + } + + // Okay, this is a complicated problem: the default theme is 1, but they aren't allowed to access 1! + if (!isset($context['available_themes'][$modSettings['theme_guests']])) + { + $context['available_themes'][0] = array( + 'num_users' => 0 + ); + $guest_theme = 0; + } + else + $guest_theme = $modSettings['theme_guests']; + + $request = db_query(" + SELECT COUNT(ID_MEMBER) AS theCount, ID_THEME + FROM {$db_prefix}members + GROUP BY ID_THEME DESC", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + // Figure out which theme it is they are REALLY using. + if ($row['ID_THEME'] == 1 && empty($modSettings['theme_default'])) + $row['ID_THEME'] = $guest_theme; + elseif (empty($modSettings['theme_allow'])) + $row['ID_THEME'] = $guest_theme; + + if (isset($context['available_themes'][$row['ID_THEME']])) + $context['available_themes'][$row['ID_THEME']]['num_users'] += $row['theCount']; + else + $context['available_themes'][$guest_theme]['num_users'] += $row['theCount']; + } + + foreach ($context['available_themes'] as $ID_THEME => $theme_data) + { + // Don't try to load the forum or board default theme's data... it doesn't have any! + if ($ID_THEME == 0) + continue; + + $settings = $theme_data; + $settings['theme_id'] = $ID_THEME; + + if (file_exists($settings['theme_dir'] . '/languages/Settings.' . $user_info['language'] . '.php')) + include($settings['theme_dir'] . '/languages/Settings.' . $user_info['language'] . '.php'); + elseif (file_exists($settings['theme_dir'] . '/languages/Settings.' . $language . '.php')) + include($settings['theme_dir'] . '/languages/Settings.' . $language . '.php'); + else + { + $txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif'; + $txt['theme_description'] = ''; + } + + $context['available_themes'][$ID_THEME]['thumbnail_href'] = $txt['theme_thumbnail_href']; + $context['available_themes'][$ID_THEME]['description'] = $txt['theme_description']; + } + + // As long as we're not doing the default theme... + if (!isset($_REQUEST['u']) || $_REQUEST['u'] >= 0) + { + if ($guest_theme != 0) + $context['available_themes'][0] = $context['available_themes'][$guest_theme]; + $context['available_themes'][0]['id'] = 0; + $context['available_themes'][0]['name'] = $txt['theme_forum_default']; + $context['available_themes'][0]['selected'] = $context['current_theme'] == 0; + $context['available_themes'][0]['description'] = $txt['theme_global_description']; + } + + ksort($context['available_themes']); + + $context['page_title'] = &$txt['theme_pick']; + $context['sub_template'] = 'pick'; +} + +function ThemeInstall() +{ + global $sourcedir, $boarddir, $boardurl, $db_prefix, $txt, $context, $settings, $modSettings; + + checkSession('request'); + + isAllowedTo('admin_forum'); + checkSession('request'); + + loadTemplate('Themes'); + + if (isset($_GET['theme_id'])) + { + adminIndex('manage_themes'); + + $context['sub_template'] = 'installed'; + $context['page_title'] = $txt['theme_installed']; + $context['installed_theme'] = array( + 'id' => (int) $_GET['theme_id'], + 'name' => $_GET['theme_name'] + ); + + return; + } + + if (!empty($_REQUEST['copy']) && (!isset($_REQUEST['theme_dir']) || stripslashes($_REQUEST['theme_dir']) == $boarddir . '/Themes/' || !file_exists($_REQUEST['theme_dir'])) && (empty($_FILES['theme_gz']) || $_FILES['theme_gz']['error'] == 4) && empty($_REQUEST['theme_gz'])) + { + // Hopefully the themes directory is writable, or we might have a problem. + if (!is_writable($boarddir . '/Themes')) + fatal_lang_error('theme_install_write_error'); + + $theme_dir = $boarddir . '/Themes/' . preg_replace('~[^A-Za-z0-9_\- ]~', '', $_REQUEST['copy']); + + umask(0); + mkdir($theme_dir, 0777); + + // Copy over the default non-theme files. + $to_copy = array('/style.css', '/index.php', '/index.template.php'); + foreach ($to_copy as $file) + { + copy($settings['default_theme_dir'] . $file, $theme_dir . $file); + @chmod($theme_dir . $file, 0777); + } + + $theme_name = $_REQUEST['copy']; + $images_url = $settings['default_images_url']; + } + elseif (isset($_REQUEST['theme_dir']) && (empty($_FILES['theme_gz']) || $_FILES['theme_gz']['error'] == 4) && empty($_REQUEST['theme_gz'])) + { + if (!is_dir($_REQUEST['theme_dir']) || !file_exists($_REQUEST['theme_dir'] . '/theme_info.xml')) + fatal_lang_error('theme_install_error', false); + + $theme_name = basename($_REQUEST['theme_dir']); + $theme_dir = $_REQUEST['theme_dir']; + } + else + { + // Hopefully the themes directory is writable, or we might have a problem. + if (!is_writable($boarddir . '/Themes')) + fatal_lang_error('theme_install_write_error'); + + require_once($sourcedir . '/Subs-Package.php'); + + // Set the default settings... + $theme_name = strtok(basename(isset($_FILES['theme_gz']) ? $_FILES['theme_gz']['name'] : $_REQUEST['theme_gz']), '.'); + $theme_name = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $theme_name); + $theme_dir = $boarddir . '/Themes/' . $theme_name; + + if (isset($_FILES['theme_gz']) && is_uploaded_file($_FILES['theme_gz']['tmp_name'])) + $extracted = read_tgz_file($_FILES['theme_gz']['tmp_name'], $boarddir . '/Themes/' . $theme_name); + elseif (isset($_REQUEST['theme_gz'])) + { + // Check that the theme is from simplemachines.org, for now... maybe add mirroring later. + if (preg_match('~^http://[\w_\-]+\.simplemachines\.org/~', $_REQUEST['theme_gz']) == 0 || strpos($_REQUEST['theme_gz'], 'dlattach') !== false) + fatal_lang_error('not_on_simplemachines'); + + $extracted = read_tgz_file($_REQUEST['theme_gz'], $boarddir . '/Themes/' . $theme_name); + } + else + redirectexit('action=theme;sa=admin;sesc=' . $context['session_id']); + } + + // Something go wrong? + if ($theme_dir != '' && basename($theme_dir) != 'Themes') + { + // Defaults. + $install_info = array( + 'theme_url' => $boardurl . '/Themes/' . basename($theme_dir), + 'images_url' => isset($images_url) ? $images_url : $boardurl . '/Themes/' . basename($theme_dir) . '/images', + 'theme_dir' => $theme_dir, + 'name' => $theme_name + ); + + if (file_exists($theme_dir . '/theme_info.xml')) + { + $theme_info = implode('', file($theme_dir . '/theme_info.xml')); + + $xml_elements = array( + 'name' => 'name', + 'theme_layers' => 'layers', + 'theme_templates' => 'templates', + 'based_on' => 'based-on', + ); + foreach ($xml_elements as $var => $name) + { + if (preg_match('~<' . $name . '>(?:)?~', $theme_info, $match) == 1) + $install_info[$var] = $match[1]; + } + + if (preg_match('~(?:)?~', $theme_info, $match) == 1) + $install_info['images_url'] = $install_info['theme_url'] . '/' . $match[1]; + if (preg_match('~(?:)?~', $theme_info, $match) == 1) + $install_info += unserialize($match[1]); + } + + if (isset($install_info['based_on'])) + { + if ($install_info['based_on'] == 'default') + { + $install_info['theme_url'] = $settings['default_theme_url']; + $install_info['images_url'] = $settings['default_images_url']; + } + unset($install_info['based_on']); + } + + // Find the newest ID_THEME. + $result = db_query(" + SELECT MAX(ID_THEME) + FROM {$db_prefix}themes", __FILE__, __LINE__); + list ($ID_THEME) = mysql_fetch_row($result); + mysql_free_result($result); + + // This will be theme number... + $ID_THEME++; + + $setString = ''; + foreach ($install_info as $var => $val) + $setString .= " + ($ID_THEME, '" . addslashes($var) . "', '" . addslashes($val) . "'),"; + $setString = substr($setString, 0, -1); + + db_query(" + INSERT INTO {$db_prefix}themes + (ID_THEME, variable, value) + VALUES$setString", __FILE__, __LINE__); + + updateSettings(array('knownThemes' => strtr($modSettings['knownThemes'] . ',' . $ID_THEME, array(',,' => ',')))); + } + + redirectexit('action=theme;sa=install;theme_id=' . $ID_THEME . ';theme_name=' . urlencode(stripslashes($install_info['name'])) . ';sesc=' . $context['session_id']); +} + +// Possibly the simplest and best example of how to ues the template system. +function WrapAction() +{ + global $context, $settings, $sourcedir; + + // Load any necessary template(s)? + if (isset($settings['catch_action']['template'])) + { + // Load both the template and language file. (but don't fret if the language file isn't there...) + loadTemplate($settings['catch_action']['template']); + loadLanguage($settings['catch_action']['template'], '', false); + } + + // Any special layers? + if (isset($settings['catch_action']['layers'])) + $context['template_layers'] = $settings['catch_action']['layers']; + + // Just call a function? + if (isset($settings['catch_action']['function'])) + { + if (isset($settings['catch_action']['filename'])) + template_include($sourcedir . '/' . $settings['catch_action']['filename'], true); + + $settings['catch_action']['function'](); + } + // And finally, the main sub template ;). + else + $context['sub_template'] = $settings['catch_action']['sub_template']; +} + +// Set an option via javascript. +function SetJavaScript() +{ + global $db_prefix, $ID_MEMBER, $settings, $user_info; + + // Sorry, guests can't do this. + if ($user_info['is_guest']) + obExit(false); + + // Check the session id. + checkSession('get'); + + // This good-for-nothing pixel is being used to keep the session alive. + if (empty($_GET['var']) || !isset($_GET['val'])) + die; + //redirectexit($settings['images_url'] . '/blank.gif', false); + + // Use a specific theme? + if (isset($_GET['id'])) + $settings['theme_id'] = (int) $_GET['id']; + + // Update the option. + db_query(" + REPLACE INTO {$db_prefix}themes + (ID_THEME, ID_MEMBER, variable, value) + VALUES ($settings[theme_id], $ID_MEMBER, '$_GET[var]', '" . (is_array($_GET['val']) ? implode(',', $_GET['val']) : $_GET['val']) . "')", __FILE__, __LINE__); + + // Don't output anything... + //redirectexit($settings['images_url'] . '/blank.gif', false); + die; +} + +function EditTheme() +{ + global $context, $settings, $db_prefix, $boarddir; + + isAllowedTo('admin_forum'); + loadTemplate('Themes'); + + adminIndex('manage_themes'); + + $_GET['id'] = (int) $_GET['id']; + $context['session_error'] = false; + + // Get the directory of the theme we are editing. + $request = db_query(" + SELECT value, ID_THEME + FROM {$db_prefix}themes + WHERE variable = 'theme_dir' + AND ID_THEME = $_GET[id]", __FILE__, __LINE__); + list ($theme_dir, $context['theme_id']) = mysql_fetch_row($request); + mysql_free_result($request); + + if (isset($_POST['submit'])) + { + if (checkSession('post', '', false) == '') + { + $_POST['entire_file'] = rtrim(strtr(stripslashes($_POST['entire_file']), array("\r" => '', ' ' => "\t"))); + + if (isset($_REQUEST['style'])) + { + $fp = fopen($theme_dir . '/style.css', 'w'); + fwrite($fp, $_POST['entire_file']); + fclose($fp); + } + else + { + $fp = fopen($theme_dir . '/index.template.php', 'w'); + fwrite($fp, $_POST['entire_file']); + fclose($fp); + } + } + // Session timed out. + else + { + loadLanguage('Errors'); + + $context['session_error'] = true; + $context['sub_template'] = isset($_REQUEST['style']) ? 'edit_style' : 'edit_template'; + + // Recycle the submitted data. + $context['entire_file'] = htmlspecialchars(stripslashes($_POST['entire_file'])); + + // You were able to submit it, so it's reasonable to assume you are allowed to save. + $context['allow_save'] = true; + + return; + } + } + else + checkSession('get'); + + if (isset($_REQUEST['style']) && file_exists($theme_dir . '/style.css')) + { + $context['allow_save'] = is_writable($theme_dir . '/style.css'); + $context['allow_save_filename'] = strtr($theme_dir . '/style.css', array($boarddir => '...')); + $context['entire_file'] = implode('', file($theme_dir . '/style.css')); + + $context['sub_template'] = 'edit_style'; + } + elseif (!isset($_REQUEST['style']) && file_exists($theme_dir . '/index.template.php')) + { + $context['allow_save'] = is_writable($theme_dir . '/index.template.php'); + $context['allow_save_filename'] = strtr($theme_dir . '/index.template.php', array($boarddir => '...')); + $context['entire_file'] = implode('', file($theme_dir . '/index.template.php')); + + $context['sub_template'] = 'edit_template'; + } + else + fatal_lang_error('theme_edit_missing', false); + + $context['entire_file'] = htmlspecialchars(strtr($context['entire_file'], array("\t" => ' '))); +} + +function convert_template($output_dir, $old_template = '') +{ + global $boarddir; + + if ($old_template == '') + { + // Step 1: Get the template.php file. + if (file_exists($boarddir . '/template.php')) + $old_template = implode('', file($boarddir . '/template.php')); + elseif (file_exists($boarddir . '/template.html')) + $old_template = implode('', file($boarddir . '/template.html')); + else + fatal_lang_error('theme_convert_error'); + } + + // Step 2: Change any single quotes to \'. + $old_template = strtr($old_template, array('\'' => '\\\'')); + + // Step 3: Parse out any existing PHP code. + $old_template = preg_replace('~\<\?php(.*)\?\>~es', "phpcodefix('\$1')", $old_template); + + // Step 4: Now we add the beginning and end... + $old_template = '\'; + + // Each tree item has a URL and name. Some may have extra_before and extra_after. + foreach ($context[\'linktree\'] as $k => $tree) + { + // Show the | | |-[] Folders. + if (!$settings[\'linktree_inline\']) + { + if ($k > 0) + echo str_repeat(\'| \', $k - 1), \'|-\'; + echo \'+  \'; + } + + if (isset($tree[\'extra_before\'])) + echo $tree[\'extra_before\']; + echo \'\', $settings[\'linktree_link\'] && isset($tree[\'url\']) ? \'\' . $tree[\'name\'] . \'\' : $tree[\'name\'], \'\'; + if (isset($tree[\'extra_after\'])) + echo $tree[\'extra_after\']; + + // Don\'t show a separator for the last one. + if ($k != count($context[\'linktree\']) - 1) + echo $settings[\'linktree_inline\'] ? \'  |  \' : \'
    \'; + } + + echo \'\'; +} + +// Show the menu up top. Something like [home] [help] [profile] [logout]... +function template_menu() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Show the [home] and [help] buttons. + echo \' + \', ($settings[\'use_image_buttons\'] ? \'\' . $txt[103] . \'\' : $txt[103]), \'\', $context[\'menu_separator\'], \' + \', ($settings[\'use_image_buttons\'] ? \'\' . $txt[119] . \'\' : $txt[119]), \'\', $context[\'menu_separator\']; + + // How about the [search] button? + if ($context[\'allow_search\']) + echo \' + \', ($settings[\'use_image_buttons\'] ? \'\' . $txt[182] . \'\' : $txt[182]), \'\', $context[\'menu_separator\']; + + // Is the user allowed to administrate at all? ([admin]) + if ($context[\'allow_admin\']) + echo \' + \', ($settings[\'use_image_buttons\'] ? \'\' . $txt[2] . \'\' : $txt[2]), \'\', $context[\'menu_separator\']; + + // Edit Profile... [profile] + if ($context[\'allow_edit_profile\']) + echo \' + \', ($settings[\'use_image_buttons\'] ? \'\' . $txt[79] . \'\' : $txt[467]), \'\', $context[\'menu_separator\']; + + // The [calendar]! + if ($context[\'allow_calendar\']) + echo \' + \', ($settings[\'use_image_buttons\'] ? \'\' . $txt[\'calendar24\'] . \'\' : $txt[\'calendar24\']), \'\', $context[\'menu_separator\']; + + // If the user is a guest, show [login] and [register] buttons. + if ($context[\'user\'][\'is_guest\']) + { + echo \' + \', ($settings[\'use_image_buttons\'] ? \'\' . $txt[34] . \'\' : $txt[34]), \'\', $context[\'menu_separator\'], \' + \', ($settings[\'use_image_buttons\'] ? \'\' . $txt[97] . \'\' : $txt[97]), \'\'; + } + // Otherwise, they might want to [logout]... + else + echo \' + \', ($settings[\'use_image_buttons\'] ? \'\' . $txt[108] . \'\' : $txt[108]), \'\'; +} + +?>'; + + // Step 5: Do the html tag. + $old_template = preg_replace('~\~i', '', $old_template); + + // Step 6: The javascript stuff. + $old_template = preg_replace('~\~i', ' + + + \' . $context[\'html_headers\'] . \'', $old_template); + + // Step 7: The character set. + $old_template = preg_replace('~\]+http-equiv=["]?Content-Type["]?[^>]*?\>~i', '', $old_template); + + // Step 8: The wonderous tags. + $tags = array( + // + 'title' => '\' . $context[\'page_title\'] . \'', + // + 'boardname' => '\' . $context[\'forum_name\'] . \'', + // + 'uname' => '\'; + + // If the user is logged in, display stuff like their name, new messages, etc. + if ($context[\'user\'][\'is_logged\']) + { + echo \' + \', $txt[\'hello_member\'], \' \', $context[\'user\'][\'name\'], \', \'; + + // Are there any members waiting for approval? + if (!empty($context[\'unapproved_members\'])) + echo \'
    + \', $context[\'unapproved_members\'] == 1 ? $txt[\'approve_thereis\'] : $txt[\'approve_thereare\'], \' \', $context[\'unapproved_members\'] == 1 ? $txt[\'approve_member\'] : $context[\'unapproved_members\'] . \' \' . $txt[\'approve_members\'], \' \', $txt[\'approve_members_waiting\']; + + // Is the forum in maintenance mode? + if ($context[\'in_maintenance\'] && $context[\'user\'][\'is_admin\']) + echo \'
    + \', $txt[616], \'\'; + } + // Otherwise they\'re a guest - so politely ask them to register or login. + else + echo \' + \', $txt[\'welcome_guest\']; + + echo ' . "'", + // + 'im' => '\'; + if ($context[\'user\'][\'is_logged\'] && $context[\'allow_pm\']) + echo $txt[152], \' \', $context[\'user\'][\'messages\'], \' \', ($context[\'user\'][\'messages\'] != 1 ? $txt[153] : $txt[471]), \'\', $txt[\'newmessages4\'], \' \', $context[\'user\'][\'unread_messages\'], \' \', ($context[\'user\'][\'unread_messages\'] == 1 ? $txt[\'newmessages0\'] : $txt[\'newmessages1\']), \'.\'; + echo ' . "'", + // + 'time' => '\' . $context[\'current_time\'] . \'', + // + 'menu' => '\'; + + // Show the menu here, according to the menu sub template. + template_menu(); + + echo ' . "'", + // + 'position' => '\' . $context[\'page_title\'] . \'', + // + 'news' => '\'; + + // Show a random news item? (or you could pick one from news_lines...) + if (!empty($settings[\'enable_news\'])) + echo \'\', $txt[102], \': \', $context[\'random_news_line\']; + + echo ' . "'", + // + 'main' => '\'; +} + +function template_main_below() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' ."'", + // + 'vbstylelogin' => '\'; + + // Show a vB style login for quick login? + if ($context[\'show_vBlogin\']) + echo \' + + +
    +

    + + + +
    + \', $txt[\'smf52\'], \' +
    +
    \'; + else + echo \'
    \'; + + echo ' . "'", + // + 'copyright' => '\', theme_copyright(), \'', + ); + + foreach ($tags as $yy => $val) + $old_template = preg_replace('~\~i', $val, $old_template); + + // Step 9: Add the time creation code. + $old_template = preg_replace('~\~i', '\'; + + // Show the load time? + if ($context[\'show_load_time\']) + echo \' +
    + \', $txt[\'smf301\'], $context[\'load_time\'], $txt[\'smf302\'], $context[\'load_queries\'], $txt[\'smf302b\'], \' +
    \'; + + echo \'', $old_template); + + // Step 10: Try to make the style changes. (function because it's a lot of work...) + $style = makeStyleChanges($old_template); + + $fp = @fopen($output_dir . '/index.template.php', 'w'); + fwrite($fp, $old_template); + fclose($fp); +} + +// This is here because it's sorta complex. +function phpcodefix($string) +{ + // First remove the slashes from the single quotes. + $string = strtr(stripslashes($string), array('\\\'' => '\'')); + + // Now add on an end echo and begin echo ;). + $string = "'; +$string + echo '"; + + return $string; +} + +function makeStyleChanges(&$old_template) +{ + if (preg_match('~~i', $old_template) == 0) + return false; + + preg_match('~()~is', $old_template, $style); + + if (empty($style[1])) + return false; + + $new_style = $style[1]; + + // Add some extra stuff... + $new_style .= ' +.quoteheader, .codeheader {color: #000000; text-decoration: none; font-style: normal; font-weight: bold;} +.smalltext {font-size: 8pt;} +.normaltext {font-size: 10pt;} +.largetext {font-size: 12pt;} +input.check {background-color: transparent;}'; + + // Get rid of the old .windowbg3. + $new_style = preg_replace('~\.windowbg3~i', '.hrcolor', $new_style); + + // Add some stuff to .code and .quote... + $new_style = preg_replace('~(\.code\s*[{][^}]+)}~is', '$1; border: 1px solid black; margin: 1px; padding: 1px;}', $new_style); + $new_style = preg_replace('~(\.quote\s*[{][^}]+)}~is', '$1; border: 1px solid black; margin: 1px; padding: 1px;}', $new_style); + $new_style = preg_replace('~(\.code,\s*\.quote\s*[{][^}]+)}~is', '$1; border: 1px solid black; margin: 1px; padding: 1px;}', $new_style); + + // Copy from .text1 => .titlebg. + preg_match('~\.text1\s*[{]([^}]+)}~is', $new_style, $temp); + if (isset($temp[1])) + { + $new_style = preg_replace('~\.titlebg(\s*[{])([^}]+)}~is', '.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited, .titlebg a:hover$1' . $temp[1] . ';$2}', $new_style); + $new_style = preg_replace('~\.text1\s*[{]([^}]+)}~is', '', $new_style); + } + else + $new_style = preg_replace('~\.titlebg(\s*[{][^}]+)}~is', '.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited, .titlebg a:hover$1}', $new_style); + + // Look for the background-color of bordercolor... if it's not found, try black. (dumb guess!) + preg_match('~\.bordercolor\s*[{]([^}]+)}~is', $new_style, $temp); + if (!empty($temp[1])) + preg_match('~background(?:-color)?:\s*([^;}\s]+)~is', $temp[1], $temp); + if (empty($temp[1])) + $temp[1] = 'black'; + + $new_style .= ' +.tborder {border: 1px solid ' . $temp[1] . ';}'; + + $old_template = str_replace($style[0], $new_style . "\n" . $style[2], $old_template); + + return true; +} + +?> diff --git a/Sources/ViewQuery.php b/Sources/ViewQuery.php new file mode 100644 index 0000000..a05213c --- /dev/null +++ b/Sources/ViewQuery.php @@ -0,0 +1,140 @@ + + + + ', $context['forum_name'], ' + + + + '; + + foreach ($_SESSION['debug'] as $q => $qq) + { + // Fix the indentation.... + $qq['q'] = ltrim(str_replace("\r", '', $qq['q']), "\n"); + $query = explode("\n", $qq['q']); + $min_indent = 0; + foreach ($query as $line) + { + preg_match('/^(\t*)/', $line, $qqi); + if (strlen($qqi[0]) < $min_indent || $min_indent == 0) + $min_indent = strlen($qqi[0]); + } + foreach ($query as $l => $dummy) + $query[$l] = substr($dummy, $min_indent); + $qq['q'] = implode("\n", $query); + + $is_select_query = substr(trim($qq['q']), 0, 6) == 'SELECT'; + + echo ' + + ' . nl2br(str_replace("\t", '   ', htmlspecialchars($qq['q']))) . ' +
    + in ' . $qq['f'] . ' line ' . $qq['l'] . ', which took ' . $qq['t'] . ' seconds.
    +
    '; + + // Explain the query. + if ($qqj == $q + 1 && $is_select_query) + { + $result = mysql_query(" + EXPLAIN " . $qq['q'], $db_connection); + if ($result === false) + die(mysql_error($db_connection)); + + echo ' + '; + + $row = mysql_fetch_assoc($result); + mysql_data_seek($result, 0); + + echo ' + + + + '; + + while ($row = mysql_fetch_assoc($result)) + { + echo ' + + + + '; + } + + echo ' +
    ' . implode('', array_keys($row)) . '
    ' . implode('', $row) . '
    +
    '; + } + } + + echo ' + +'; + + obExit(false); +} + +?> \ No newline at end of file diff --git a/Sources/Viewkarma.php b/Sources/Viewkarma.php new file mode 100644 index 0000000..f076b7f --- /dev/null +++ b/Sources/Viewkarma.php @@ -0,0 +1,459 @@ + 'lk.ID_EXECUTOR', + 'targ' => 'lk.ID_TARGET', + 'action' => 'lk.action', + 'time' => 'lk.logTime' + ); + + // By default, sorting by time + if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']])) + { + $context['sort_by'] = 'time'; + $_REQUEST['sort'] = 'lk.logTime'; + } + // DESC, ASC + else + { + $context['sort_by'] = $_REQUEST['sort']; + $_REQUEST['sort'] = $sort_methods[$_REQUEST['sort']]; + } + + $context['sort_direction'] = isset($_REQUEST['asc']) ? 'up' : 'down'; + + // All values + $request = db_query(" + SELECT COUNT(action) + FROM {$db_prefix}log_karma + ", __FILE__, __LINE__); + list ($totalActions) = mysql_fetch_row($request); + mysql_free_result($request); + + + // Context variables, like title, etc + $context['page_title'] = $txt['viewkarma_title']; + $context['linktree'][] = array( + 'url' => $scripturl . '?action=viewkarma', + 'name' => $txt['viewkarma_title'] ); + $context['page_index'] = constructPageIndex($scripturl . '?action=viewkarma' ,$_REQUEST['start'], $totalActions, $modSettings['karmamaxmembers']); + $context['start'] = $_REQUEST['start']; + $context['totalActions'] = $totalActions; + + //Main DB Query + $result = db_query(" + SELECT lk.ID_TARGET, lk.ID_EXECUTOR, lk.logTime, lk.action, lk.Description, lk.link, memt.realName AS targetName, meme.realName AS executorName, memt.karmaGood AS targetKarmaGood, memt.karmaBad AS targetKarmaBad, meme.KarmaGood AS executorKarmaGood, meme.KarmaBad AS executorKarmaBad + FROM {$db_prefix}log_karma AS lk, {$db_prefix}members AS memt, {$db_prefix}members AS meme + WHERE memt.ID_MEMBER = lk.ID_TARGET + AND meme.ID_MEMBER = lk.ID_EXECUTOR + ORDER BY $_REQUEST[sort] " . (isset($_REQUEST['asc']) ? 'ASC' : 'DESC') . " + LIMIT $context[start], $modSettings[karmamaxmembers]", __FILE__, __LINE__); + + $num_results = mysql_num_rows($result); + $context['num_results'] = $num_results; + + //All recieve values to context variables please. + $context['karma_changes'] = array(); + while ($row = mysql_fetch_assoc($result)) + $context['karma_changes'][] = array( + 'executor' => stripslashes($row['executorName']), + 'target' => stripslashes($row['targetName']), + 'action' => ($row['action'] == 1) ? '+' : '-', + 'Description' => stripslashes($row['Description']), + 'time' => timeformat($row['logTime']), + 'id_exec' => stripslashes($row['ID_EXECUTOR']), + 'id_targ' => stripslashes($row['ID_TARGET']), + 'targetkarmagood' => stripslashes($row['targetKarmaGood']), + 'targetkarmabad' => stripslashes($row['targetKarmaBad']), + 'executorkarmagood' => stripslashes($row['executorKarmaGood']), + 'executorkarmabad' => stripslashes($row['executorKarmaBad']), + 'link' => stripslashes($row['link']), + 'logtime' => stripslashes($row['logTime']), + ); +mysql_free_result($result); + + // Delete specific karma? + if (isset($_POST['delete'])) + deleteKarma(); + + // Clear Get variable. + if (!isset($_GET['start']) || $_GET['start'] < 0) + $_GET['start'] = 0; + + //Show other karma statistic if needed + if (!empty($modSettings['karmaotherstat'])) + show_other_stat(); + + +} + +function OwnKarma() +{ + global $db_prefix, $context, $scripturl, $modSettings, $txt, $user_info, $ID_MEMBER; + + // , + if (empty($modSettings['karmadescmod'])) + fatal_lang_error('smf63', false); + if (!empty($modSettings['karmaisowner']) && $_REQUEST['u']!=$ID_MEMBER && ($user_info['is_admin']!=1)) + fatal_lang_error('cannot_karmalog_view', false); + + + // + isAllowedTo('karmalog_view'); + + + loadTemplate('Viewkarma'); + + // ... + $sort_methods = array( + 'exec' => 'lk.ID_EXECUTOR', + 'targ' => 'lk.ID_TARGET', + 'action' => 'lk.action', + 'time' => 'lk.logTime' + ); + + // + if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']])) + { + $context['sort_by'] = 'time'; + $_REQUEST['sort'] = 'lk.logTime'; + } + // , + else + { + $context['sort_by'] = $_REQUEST['sort']; + $_REQUEST['sort'] = $sort_methods[$_REQUEST['sort']]; + } + + $context['sort_direction'] = isset($_REQUEST['asc']) ? 'up' : 'down'; + + //Request['u'] . + $_REQUEST['u'] = isset($_REQUEST['u']) ? (int) $_REQUEST['u'] : 0; + if (empty($_REQUEST['u'])) + fatal_lang_error('viewkarma_error', false); + + // + $request = db_query(" + SELECT COUNT(action) + FROM {$db_prefix}log_karma + WHERE ID_TARGET=".$_REQUEST['u']." + ", __FILE__, __LINE__); + list ($totalActions) = mysql_fetch_row($request); + mysql_free_result($request); + + // . ( , ) + $context['page_title'] = $txt['viewkarma_title']; + $context['linktree'][] = array( + 'url' => $scripturl . '?action=ownkarma;u=' . $_REQUEST['u'] . '', + 'name' => $txt['viewkarma_title'] ); + $context['page_index'] = constructPageIndex($scripturl . '?action=ownkarma;u=' . $_REQUEST['u'] . '' ,$_REQUEST['start'], $totalActions, $modSettings['karmamaxmembers']); + $context['start'] = $_REQUEST['start']; + $context['totalActions'] = $totalActions; + + // + $result = db_query(" + SELECT lk.ID_TARGET, lk.ID_EXECUTOR, lk.logTime, lk.action, lk.Description, lk.link, memt.realName AS targetName, meme.realName AS executorName, memt.karmaGood AS targetKarmaGood, memt.karmaBad AS targetKarmaBad, meme.KarmaGood AS executorKarmaGood, meme.KarmaBad AS executorKarmaBad + FROM {$db_prefix}log_karma AS lk, {$db_prefix}members AS memt, {$db_prefix}members AS meme + WHERE memt.ID_MEMBER = lk.ID_TARGET + AND meme.ID_MEMBER = lk.ID_EXECUTOR + AND lk.ID_TARGET = ".$_REQUEST['u']." + ORDER BY $_REQUEST[sort] " . (isset($_REQUEST['asc']) ? 'ASC' : 'DESC') . " + LIMIT $context[start], $modSettings[karmamaxmembers]", __FILE__, __LINE__); + + $num_results = mysql_num_rows($result); + $context['num_results'] = $num_results; + + // . + $context['karma_changes'] = array(); + while ($row = mysql_fetch_assoc($result)) + $context['karma_changes'][] = array( + 'executor' => stripslashes($row['executorName']), + 'target' => stripslashes($row['targetName']), + 'action' => ($row['action'] == 1) ? '+' : '-', + 'Description' => stripslashes($row['Description']), + 'time' => timeformat($row['logTime']), + 'id_exec' => stripslashes($row['ID_EXECUTOR']), + 'id_targ' => stripslashes($row['ID_TARGET']), + 'targetkarmagood' => stripslashes($row['targetKarmaGood']), + 'targetkarmabad' => stripslashes($row['targetKarmaBad']), + 'executorkarmagood' => stripslashes($row['executorKarmaGood']), + 'executorkarmabad' => stripslashes($row['executorKarmaBad']), + 'link' => stripslashes($row['link']), + 'logtime' => stripslashes($row['logTime']), + ); +mysql_free_result($result); + + // Deleting specific karma? + if (isset($_POST['delete'])) + deleteKarma(); + + // Clean up start. + if (!isset($_GET['start']) || $_GET['start'] < 0) + $_GET['start'] = 0; + + if (!empty($modSettings['karmaotherstat'])) + show_other_stat(); +} + +function OtherKarma() +{ + global $db_prefix, $context, $scripturl, $modSettings, $txt, $user_info, $ID_MEMBER; + + // , + if (empty($modSettings['karmadescmod'])) + fatal_lang_error('smf63', false); + if (!empty($modSettings['karmaisowner']) && $_REQUEST['u']!=$ID_MEMBER && ($user_info['is_admin']!=1)) + fatal_lang_error('cannot_karmalog_view', false); + + + // + isAllowedTo('karmalog_view'); + + loadTemplate('Viewkarma'); + + // ... + $sort_methods = array( + 'exec' => 'lk.ID_EXECUTOR', + 'targ' => 'lk.ID_TARGET', + 'action' => 'lk.action', + 'time' => 'lk.logTime' + ); + + // + if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']])) + { + $context['sort_by'] = 'time'; + $_REQUEST['sort'] = 'lk.logTime'; + } + // , + else + { + $context['sort_by'] = $_REQUEST['sort']; + $_REQUEST['sort'] = $sort_methods[$_REQUEST['sort']]; + } + + $context['sort_direction'] = isset($_REQUEST['asc']) ? 'up' : 'down'; + + //Request['u'] . + $_REQUEST['u'] = isset($_REQUEST['u']) ? (int) $_REQUEST['u'] : 0; + if (empty($_REQUEST['u'])) + fatal_lang_error('viewkarma_error', false); + + // + $request = db_query(" + SELECT COUNT(action) + FROM {$db_prefix}log_karma + WHERE ID_EXECUTOR=".$_REQUEST['u']." + ", __FILE__, __LINE__); + list ($totalActions) = mysql_fetch_row($request); + mysql_free_result($request); + + // . ( , ) + $context['page_title'] = $txt['viewkarma_title']; + $context['linktree'][] = array( + 'url' => $scripturl . '?action=otherkarma;u=' . $_REQUEST['u'] . '', + 'name' => $txt['viewkarma_title'] ); + $context['page_index'] = constructPageIndex($scripturl . '?action=otherkarma;u=' . $_REQUEST['u'] . '' ,$_REQUEST['start'], $totalActions, $modSettings['karmamaxmembers']); + $context['start'] = $_REQUEST['start']; + $context['totalActions'] = $totalActions; + + // + $result = db_query(" + SELECT lk.ID_TARGET, lk.ID_EXECUTOR, lk.logTime, lk.action, lk.Description, lk.link, memt.realName AS targetName, meme.realName AS executorName, memt.karmaGood AS targetKarmaGood, memt.karmaBad AS targetKarmaBad, meme.KarmaGood AS executorKarmaGood, meme.KarmaBad AS executorKarmaBad + FROM {$db_prefix}log_karma AS lk, {$db_prefix}members AS memt, {$db_prefix}members AS meme + WHERE memt.ID_MEMBER = lk.ID_TARGET + AND meme.ID_MEMBER = lk.ID_EXECUTOR + AND lk.ID_EXECUTOR = ".$_REQUEST['u']." + ORDER BY $_REQUEST[sort] " . (isset($_REQUEST['asc']) ? 'ASC' : 'DESC') . " + LIMIT $context[start], $modSettings[karmamaxmembers]", __FILE__, __LINE__); + + $num_results = mysql_num_rows($result); + $context['num_results'] = $num_results; + + // . + $context['karma_changes'] = array(); + while ($row = mysql_fetch_assoc($result)) + $context['karma_changes'][] = array( + 'executor' => stripslashes($row['executorName']), + 'target' => stripslashes($row['targetName']), + 'action' => ($row['action'] == 1) ? '+' : '-', + 'Description' => stripslashes($row['Description']), + 'time' => timeformat($row['logTime']), + 'id_exec' => stripslashes($row['ID_EXECUTOR']), + 'id_targ' => stripslashes($row['ID_TARGET']), + 'targetkarmagood' => stripslashes($row['targetKarmaGood']), + 'targetkarmabad' => stripslashes($row['targetKarmaBad']), + 'executorkarmagood' => stripslashes($row['executorKarmaGood']), + 'executorkarmabad' => stripslashes($row['executorKarmaBad']), + 'link' => stripslashes($row['link']), + 'logtime' => stripslashes($row['logTime']), + ); +mysql_free_result($result); + + // Deleting specific karma? + if (isset($_POST['delete'])) + deleteKarma(); + + // Clean up start. + if (!isset($_GET['start']) || $_GET['start'] < 0) + $_GET['start'] = 0; + + if (!empty($modSettings['karmaotherstat'])) + show_other_stat(); +} + +// Delete checked karma entries from the database. +function deleteKarma() +{ + global $db_prefix, $context; + + // Just specific karma? + if (!empty($_POST['delete'])) + { + db_query(" + DELETE FROM {$db_prefix}log_karma + WHERE logTime IN (" . implode(',', array_unique($_POST["delete"])) . ')', __FILE__, __LINE__); + + // Go back to where we were. + redirectexit('action=viewkarma;start=' . $_GET['start'] . ';sort='. $_GET['sort'].';' . (isset($_GET['desc']) ? 'desc' : 'asc') . ''); + } + + // Back to the karma log! + redirectexit('action=viewkarma'); + + +} + +function show_other_stat() +{ + global $db_prefix, $context, $scripturl, $modSettings, $txt, $user_info, $ID_MEMBER; + + $date = strftime('%Y%m%d', forum_time(false)); + + //User, MAX applauded other users + $user_max_appl_result = db_query(" + SELECT COUNT(*) AS cnt, mem.realName + FROM {$db_prefix}log_karma AS lk, {$db_prefix}members AS mem + WHERE lk.action = 1 + AND mem.ID_MEMBER = lk.ID_EXECUTOR + GROUP BY lk.ID_EXECUTOR + ORDER BY cnt DESC + LIMIT 1",__FILE__,__LINE__); + $row = mysql_fetch_row($user_max_appl_result); + $context['memidappl']= stripslashes($row[1]); + $context['memidapplcount'] = stripslashes($row[0]); + mysql_free_result($user_max_appl_result); + + //User, MAX smited other users. + $user_max_smit_result = db_query(" + SELECT COUNT(*) AS cnt, mem.realName + FROM {$db_prefix}log_karma AS lk, {$db_prefix}members AS mem + WHERE lk.action = -1 + AND mem.ID_MEMBER = lk.ID_EXECUTOR + GROUP BY lk.ID_EXECUTOR + ORDER BY cnt DESC + LIMIT 1",__FILE__,__LINE__); + $row = mysql_fetch_row($user_max_smit_result); + $context['memidsmit']= stripslashes($row[1]); + $context['memidsmitcount'] = stripslashes($row[0]); + mysql_free_result($user_max_smit_result); + + //Today karma points + $today_karma_points = db_query(" + SELECT COUNT(*) + FROM {$db_prefix}log_karma + WHERE FROM_UNIXTIME( logTime, '%Y%m%d' ) = $date + ",__FILE__, __LINE__); + $row = mysql_fetch_row($today_karma_points); + $context['today_point'] = stripslashes($row[0]); + mysql_free_result($today_karma_points); + + //Today plus + $today_plus_points = db_query(" + SELECT COUNT(*) + FROM {$db_prefix}log_karma + WHERE FROM_UNIXTIME( logTime, '%Y%m%d' ) = $date + AND action = 1 + ",__FILE__,__LINE__); + $row = mysql_fetch_row($today_plus_points); + $context['today_plus'] = stripslashes($row[0]); + $context['today_minus'] = $context['today_point'] - $context['today_plus']; + mysql_free_result($today_plus_points); + + + //Top 5 max applauded users. + $applaud_result = db_query(" + SELECT ID_MEMBER, realName, karmaGood + FROM {$db_prefix}members + WHERE karmaGood >= 0 + ORDER BY karmaGood DESC + LIMIT 5", __FILE__, __LINE__); + $context['top_applaud'] = array(); + $max_num_posts = 1; + while ($row_applaud = mysql_fetch_assoc($applaud_result)) + { + $context['top_applaud'][] = array( + 'name' => $row_applaud['realName'], + 'id' => $row_applaud['ID_MEMBER'], + 'num_karma' => $row_applaud['karmaGood'], + 'href' => $scripturl . '?action=profile;u=' . $row_applaud['ID_MEMBER'], + 'link' => '' . $row_applaud['realName'] . '' + ); + + if ($max_num_posts < $row_applaud['karmaGood']) + $max_num_posts = $row_applaud['karmaGood']; + } + mysql_free_result($applaud_result); + + foreach ($context['top_applaud'] as $i => $applauder) + $context['top_applaud'][$i]['karma_percent'] = round(($applauder['num_karma'] * 100) / $max_num_posts); + + //Top 5 smited users. + $smite_result = db_query(" + SELECT ID_MEMBER, realName, karmaBad + FROM {$db_prefix}members + WHERE karmaBad >= 0 + ORDER BY karmaBad DESC + LIMIT 5", __FILE__, __LINE__); + $context['top_smite'] = array(); + $max_num_posts = 1; + while ($row_smite = mysql_fetch_assoc($smite_result)) + { + $context['top_smite'][] = array( + 'name' => $row_smite['realName'], + 'id' => $row_smite['ID_MEMBER'], + 'num_karma' => $row_smite['karmaBad'], + 'href' => $scripturl . '?action=profile;u=' . $row_smite['ID_MEMBER'], + 'link' => '' . $row_smite['realName'] . '' + ); + + if ($max_num_posts < $row_smite['karmaBad']) + $max_num_posts = $row_smite['karmaBad']; + } + foreach ($context['top_smite'] as $i => $smiter) + $context['top_smite'][$i]['karma_percent'] = round(($smiter['num_karma'] * 100) / $max_num_posts); + + mysql_free_result($smite_result); + } +?> diff --git a/Sources/VisualWarning.php b/Sources/VisualWarning.php new file mode 100644 index 0000000..966af01 --- /dev/null +++ b/Sources/VisualWarning.php @@ -0,0 +1,495 @@ + $row['ID'], + 'body' => $message['body'], + 'level' => $row['level'], + 'time' => timeformat($row['time']), + 'warningtext' => $row['warningText'], + ); + } + obExit(); +} + + +function AddWarning2() +{ + global $scripturl, $db_prefix, $settings, $modSettings, $txt, $sourcedir, $forum_version; + + // Permission + isAllowedTo('visual_warn_any'); + + // Load the language file for sendpm. + loadLanguage('InstantMessage'); + + if ($_REQUEST['timelast'] == "") + $_REQUEST['timelast'] = -1; + + $_REQUEST['level'] = isset($_REQUEST['level']) ? (int) $_REQUEST['level'] : 0; + $_REQUEST['msg'] = isset($_REQUEST['msg']) ? (int) $_REQUEST['msg'] : 0; + $_REQUEST['user'] = isset($_REQUEST['user']) ? (int) $_REQUEST['user'] : 0; + $_REQUEST['timelast'] = isset($_REQUEST['timelast']) ? (int) $_REQUEST['timelast'] : 0; + + // Sorry dude but admins only here + if ($_REQUEST['level'] > 3) + is_admin(); + + // Sort out the message. + $message = htmlspecialchars($_REQUEST['warningmsg'], ENT_QUOTES); + preparsecode($message); + + $request = db_query(" + SELECT ID_MEMBER, memberName, warning, emailAddress + FROM {$db_prefix}members + WHERE ID_MEMBER = $_REQUEST[user] LIMIT 1", __FILE__, __LINE__); + $member = mysql_fetch_assoc($request); + if ($_REQUEST['msg'] != -1){ + $request = db_query(" + SELECT body + FROM {$db_prefix}messages + WHERE ID_MSG = $_REQUEST[msg] LIMIT 1", __FILE__, __LINE__); + list($body) = mysql_fetch_row($request); + } + else + $body = ''; + // Make the warnings things look pretty + if ($_REQUEST['msg'] != -1 && $body != '' && $_REQUEST['level'] > 0 && $_REQUEST['level'] < 5){ + if ($_REQUEST['level'] == 1){ + $warn = 'warn'; + } + elseif ($_REQUEST['level'] == 2){ + $warn = 'mute'; + } + else { + $warn = 'ban'; + } + $body .= "\n[center]" + . ($modSettings['visualw_image_' . $warn] != "" ? + '[img]' . $settings['images_url'] . '/' . $modSettings['visualw_image_' . $warn] . '[/img]' + : '') + . ($modSettings['visualw_color_' . $warn] != "" ? + ' ' . $message + : '') . '[/center]'; + // Update the message + db_query(" + UPDATE {$db_prefix}messages + SET body = '$body' + WHERE ID_MSG = $_REQUEST[msg]", __FILE__, __LINE__); + } + // firstly update the user profile for the new warning + db_query(" + UPDATE {$db_prefix}members + SET warning = $_REQUEST[level] + WHERE ID_MEMBER = $_REQUEST[user]", __FILE__, __LINE__); + // Now if the warning has been changed to zero - delete the members entry in the warning table + if ($_REQUEST['level'] == 0) + { + $_REQUEST['warnid'] = (int) $_REQUEST['warnid']; + if ($_REQUEST['warnid'] != -1) + db_query(" + DELETE FROM {$db_prefix}vwarnings + WHERE ID = $_REQUEST[warnid] LIMIT 1", __FILE__, __LINE__); + } + else{ + if ($_REQUEST['level'] == 3){ + is_admin(); + // Ban this user! (Modifications for SMF 1.1 by Permutations) + $ban_time = time(); + $expire_time = ( $_REQUEST['timelast'] != -1 ) ? ( time() + 24 * 60 * 60 * (int) $_REQUEST['timelast'] ) : 'NULL'; + $the_version = strtr($forum_version, array('SMF ' => '')); + $major_version = substr( $the_version, 0, 3 ); + if ( $major_version == '1.1' ) { + // each user banned by Visual Warning is in a separate group so notes can be added for each individual + $ban_group_name = 'VW_'.$_REQUEST['user']; + db_query(" + INSERT INTO {$db_prefix}ban_groups (name, ban_time, expire_time, cannot_access, reason, notes) + VALUES ('$ban_group_name', $ban_time, $expire_time, 1, '$message', '$txt[visual_warning_management]')", __FILE__, __LINE__); + $id_ban_group = db_insert_id(); + db_query(" + INSERT INTO {$db_prefix}ban_items (ID_BAN_GROUP, ID_MEMBER) + VALUES ($id_ban_group, $_REQUEST[user])", __FILE__, __LINE__); + } + elseif ( $major_version == '1.0' ) { + db_query(" + INSERT INTO {$db_prefix}banned (ID_MEMBER, ban_type, reason, notes, restriction_type, ban_time, expire_time) + VALUES ($_REQUEST[user], 'user_ban', '$message', '$txt[visual_warning_management]', 'full_ban', $ban_time, $expire_time)", __FILE__, __LINE__); + } + } + // for all the rest just update the table with the new details! + elseif($_REQUEST['warnid'] == -1){ + $time=time(); + db_query(" + INSERT INTO {$db_prefix}vwarnings + (memberID, messageID, warningText, time, level, timeToWarn, set_by) + VALUES ($_REQUEST[user],$_REQUEST[msg],'$message', + " . time() . ", $_REQUEST[level], $_REQUEST[timelast], '{$user_info['user_name']}')",__FILE__, __LINE__); + } + else{ + db_query(" + UPDATE {$db_prefix}vwarnings + SET time = " . time() . ", level=$_REQUEST[level], messageID=$_REQUEST[msg], + warningText='$message', timeToWarn=$_REQUEST[timelast] + WHERE ID=$_REQUEST[warnid]", __FILE__, __LINE__); + } + } + // Send user warning IM + if($member['warning'] != $_REQUEST['level']){ + $imsubject = $member['warning'] > $_REQUEST['level'] ? $txt['visual_reduced'] : $txt['visual_official_warning']; +# $immessage = $member['memberName'] . "\n\n"; + $immessage = ""; + if($member['warning'] < $_REQUEST['level']){ + if ($_REQUEST['msg'] != -1 && $_REQUEST['topic'] != -1) { + $immessage .= $txt['visual_received_warning'] . + "\n\n $scripturl?topic=$_REQUEST[topic].msg$_REQUEST[msg]#msg$_REQUEST[msg]\n\n"; + $immessage .= "[quote]".$body."[/quote]"; + } + else + $immessage .= $txt['visual_warning_increased']; + } + else + $immessage .= $txt['visual_warning_reduced']; + $recs = array( + 'to' => array($member['ID_MEMBER']), + 'bcc' => array() + ); + sendpm($recs, $imsubject, $immessage, 0); + } + if ($_REQUEST['back'] != -1) + redirectexit("$scripturl?action=$back"); + elseif ($_REQUEST['msg'] != -1 && $_REQUEST['topic'] != -1) + redirectexit("topic=$_REQUEST[topic].msg$_REQUEST[msg]#msg$_REQUEST[msg]"); + else + redirectexit(); +} + +function ListWarnings() +{ + + global $scripturl, $db_prefix, $settings, $modSettings, $ID_MEMBER, $txt, $context; + + loadTemplate('VisualWarning'); + $context['sub_template'] = 'list_warnings'; + $context['page_title'] = $txt['visual_warning_management']; + + adminIndex('warning_manager'); + + // Permission + isAllowedTo('visual_warn_any'); + + $request = db_query(" + SELECT w.ID, w.memberID, w.warningText, w.time, w.level, m.memberName, m.realName + FROM {$db_prefix}vwarnings as w + LEFT JOIN {$db_prefix}members as m ON (m.ID_MEMBER = w.memberID) + WHERE w.level > 0 AND w.level < 3 + ORDER BY w.time", __FILE__, __LINE__); + + $context['warnings'] = array(); + $warnText = array( + 1 => 'warn', + 2 => 'mute' + ); + while ($row = mysql_fetch_assoc($request)) + { + $context['warnings'][] = array( + 'memberID' => $row['memberID'], + 'time' => timeformat($row['time']), + 'memberName' => $row['memberName'], + 'realName' => $row['realName'], + 'level' => $txt['visual_text_' . $warnText[$row['level']]], + 'warningText' => $row['warningText'] + ); + } + obExit(); +} + + +function ListWarnings2(){ + global $scripturl, $db_prefix, $settings, $modSettings, $txt; + + // Permission + isAllowedTo('visual_warn_any'); + + if (empty($_REQUEST['lower'])) + $_REQUEST['lower'] = array(); + + foreach ($_REQUEST['lower'] as $id => $dummy) + { + $id = (int) $id; + db_query(" + UPDATE {$db_prefix}members + SET warning = warning - 1 + WHERE ID_MEMBER = $id AND warning > 0", __FILE__, __LINE__); + $request = db_query(" + SELECT level FROM + {$db_prefix}vwarnings + WHERE memberID = $id LIMIT 1", __FILE__, __LINE__); + list($level) = mysql_fetch_row($request); + if ($level == 1) + db_query(" + DELETE FROM + {$db_prefix}vwarnings + WHERE memberID = $id", __FILE__, __LINE__); + else + db_query(" + UPDATE {$db_prefix}vwarnings + SET level = level - 1, timeToWarn = -1 + WHERE memberID = $id", __FILE__, __LINE__); + } + redirectexit("action=warnlist"); +} + +function Manager(){ + + global $scripturl, $db_prefix, $settings, $modSettings, $enable_ubbc, $txt, $context, $sourcedir; + + $context['start'] = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0; + $display=40; + + // Permissions + isAllowedTo('visual_approve_any'); + + loadTemplate('VisualWarning'); + $context['sub_template'] = 'pmod_manager'; + $context['page_title'] = $txt['visual_postmod_manager']; + + adminIndex('postmod_manager'); + + $request = db_query(" + SELECT p.ID, p.ID_MEMBER, p.ID_POLL, p.subject, p.body, + m.realName, m.memberName + FROM {$db_prefix}postmoderation as p + LEFT JOIN {$db_prefix}members as m ON (m.ID_MEMBER = p.ID_MEMBER) + ORDER BY p.posterTime + LIMIT $context[start], $display", __FILE__, __LINE__); + $numrows = mysql_num_rows($request); + $context['posts'] = array(); + while ($row = mysql_fetch_assoc($request)) + { + preparsecode($row['body']); + if ($enable_ubbc) + $row['body'] = doUBBC($row['body']); + $context['posts'][] = array( + 'ID' => $row['ID'], + 'ID_POLL'=> $row['ID_POLL'], + 'ID_MEMBER' => $row['ID_MEMBER'], + 'subject' => $row['subject'], + 'body' => $row['body'], + 'realName' => $row['realName'], + 'memberName' => $row['memberName'] + ); + } + $context['pageIndex'] = constructPageIndex("$scripturl?action=warnpmman", $context['start'], $numrows, $display); + obExit(); +} + +function Manager2(){ + global $scripturl, $db_prefix, $settings, $modSettings, $sourcedir, $txt; + + // Permissions + isAllowedTo('visual_approve_any'); + + if (empty($_REQUEST['message'])) + $_REQUEST['message'] = array(); + + foreach ($_REQUEST['message'] as $id => $dummy) + { + $id = (int) $id; + $request = db_query(" + SELECT ID, ID_MEMBER, ID_BOARD, ID_POLL, ID_TOPIC, subject, posterName, + posterEmail, posterTime, posterIP, body, icon, smiliesEnabled + FROM {$db_prefix}postmoderation + WHERE ID = $id LIMIT 1", __FILE__, __LINE__); + $row = mysql_fetch_assoc($request); + // Due to current sorting methods only this will work! :( + $row['posterTime'] = time(); + if($txt['visual_postmod_approve'] == $_REQUEST['waction']) + { //approve + $time=time(); + $row['body'] = addslashes($row['body']); + $row['subject'] = addslashes($row['subject']); + // Insert the post. + db_query(" + INSERT INTO {$db_prefix}messages + (ID_BOARD, ID_TOPIC, ID_MEMBER, subject, posterName, posterEmail, posterTime, + posterIP, smileysEnabled, body, icon) + VALUES ($row[ID_BOARD], $row[ID_TOPIC], $row[ID_MEMBER], '$row[subject]', '$row[posterName]', '$row[posterEmail]', + '$row[posterTime]','$row[posterIP]', '$row[smiliesEnabled]', '$row[body]', + '$row[icon]')", __FILE__, __LINE__); + $ID_MSG = mysql_insert_id(); + // Post count + db_query(" + UPDATE {$db_prefix}members + SET posts = posts + 1 + WHERE ID_MEMBER = $row[ID_MEMBER]", __FILE__, __LINE__); + if ($row['ID_TOPIC'] == 0 || $row['ID_TOPIC'] == -1) //new topic + { + if ($ID_MSG > 0) + { + // Insert the new topic. + db_query(" + INSERT INTO {$db_prefix}topics + (ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_FIRST_MSG, ID_LAST_MSG, + numViews, ID_POLL) + VALUES ($row[ID_BOARD], $row[ID_MEMBER], $row[ID_MEMBER], $ID_MSG, $ID_MSG, + 0, $row[ID_POLL])", __FILE__, __LINE__); + $topic = mysql_insert_id(); + if ($topic > 0) + { + // Fix the message with the topic. + db_query(" + UPDATE {$db_prefix}messages + SET ID_TOPIC = $topic + WHERE ID_MSG = $ID_MSG + LIMIT 1", __FILE__, __LINE__); + // Increase the number of posts and topics on the board. + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = numPosts + 1, numTopics = numTopics + 1 + WHERE ID_BOARD = $row[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + + // There's been a new topic AND a new post today. + if (!empty($modSettings['trackStats'])) + trackStats(array('topics' => '+', 'posts' => '+')); + + // Update all the stats so everyone knows about this new topic and message. + updateStats('topic'); + updateStats('message'); + updateLastMessages($row['ID_BOARD']); + } + } + $newTopic = true; + } + else + { + if ($ID_MSG > 0) + { + // Check this is the most recent reply + $request = db_query(" + SELECT ID_MSG + FROM {$db_prefix}messages + WHERE ID_TOPIC = $row[ID_TOPIC] + ORDER BY posterTime LIMIT 1", __FILE__, __LINE__); + list($lastMsg) = mysql_fetch_row($request); + // Update the number of replies and the lock/sticky status. + db_query(" + UPDATE {$db_prefix}topics + SET " . ($lastMsg == $ID_MSG ? 'ID_MEMBER_UPDATED = ' . $row['ID_MEMBER'] . ' + , ID_LAST_MSG = ' . $ID_MSG . ',' : '') . " + numReplies = numReplies + 1 + WHERE ID_TOPIC = $row[ID_TOPIC] + LIMIT 1", __FILE__, __LINE__); + // Update the post count. + db_query(" + UPDATE {$db_prefix}boards + SET numPosts = numPosts + 1 + WHERE ID_BOARD = $row[ID_BOARD] + LIMIT 1", __FILE__, __LINE__); + + // Statistics... + if (!empty($modSettings['trackStats'])) + trackStats(array('posts' => '+')); + + // Update the *other* stats. + updateStats('message'); + updateLastMessages($row['ID_BOARD']); + } + $newTopic = false; + } + //now just delete the post from the moderation list! + db_query(" + DELETE + FROM {$db_prefix}postmoderation + WHERE id=$row[ID] LIMIT 1", __FILE__, __LINE__); + } + else{ //delete + if ($row['ID_POLL'] > 0)//delete poll entry too + { + // Remove all poll choices. + db_query(" + DELETE FROM {$db_prefix}poll_choices + WHERE ID_POLL = $row[ID_POLL]", __FILE__, __LINE__); + // Remove the poll itself. + db_query(" + DELETE FROM {$db_prefix}polls + WHERE ID_POLL = $row[ID_POLL] + LIMIT 1", __FILE__, __LINE__); + } + db_query(" + DELETE + FROM {$db_prefix}postmoderation + WHERE ID = $row[ID] LIMIT 1", __FILE__, __LINE__); + } + + } + redirectexit("action=warnpmman;start=$_REQUEST[start]"); +} + +?> diff --git a/Sources/Who.php b/Sources/Who.php new file mode 100644 index 0000000..b04f662 --- /dev/null +++ b/Sources/Who.php @@ -0,0 +1,366 @@ + array('moderate_forum', 'manage_membergroups', 'manage_bans', 'admin_forum', 'manage_permissions', 'send_mail', 'manage_attachments', 'manage_smileys', 'manage_boards', 'edit_news'), + 'ban' => array('manage_bans'), + 'boardrecount' => array('admin_forum'), + 'calendar' => array('calendar_view'), + 'editnews' => array('edit_news'), + 'mailing' => array('send_mail'), + 'maintain' => array('admin_forum'), + 'manageattachments' => array('manage_attachments'), + 'manageboards' => array('manage_boards'), + 'mlist' => array('view_mlist'), + 'optimizetables' => array('admin_forum'), + 'repairboards' => array('admin_forum'), + 'search' => array('search_posts'), + 'search2' => array('search_posts'), + 'sendtopic' => array('send_topic'), + 'setcensor' => array('moderate_forum'), + 'setreserve' => array('moderate_forum'), + 'stats' => array('view_stats'), + 'viewErrorLog' => array('admin_forum'), + 'viewmembers' => array('moderate_forum'), + ); + + // Setup the linktree and page title. + $context['page_title'] = $txt['who_title']; + $context['linktree'][] = array( + 'url' => $scripturl . '?action=who', + 'name' => $txt['who_title'] + ); + + // Load up the guest user. + $themeUser[0] = array( + 'id' => 0, + 'name' => $txt[28], + 'group' => $txt[28], + 'href' => '', + 'link' => $txt[28], + 'email' => $txt[28], + 'is_guest' => true + ); + + // These are done to later query these in large chunks. (instead of one by one.) + $topic_ids = array(); + $profile_ids = array(); + $board_ids = array(); + + // Sort out... the column sorting. + $sort_methods = array( + 'user' => 'mem.realName', + 'time' => 'lo.logTime' + ); + + // By default order by last time online. + if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']])) + { + $context['sort_by'] = 'time'; + $_REQUEST['sort'] = 'lo.logTime'; + } + // Otherwise default to ascending. + else + { + $context['sort_by'] = $_REQUEST['sort']; + $_REQUEST['sort'] = $sort_methods[$_REQUEST['sort']]; + } + + $context['sort_direction'] = isset($_REQUEST['asc']) ? 'up' : 'down'; + + // Get the total amount of members online. + $request = db_query(" + SELECT COUNT(lo.ID_MEMBER) + FROM {$db_prefix}log_online AS lo + LEFT JOIN {$db_prefix}members AS mem ON (lo.ID_MEMBER = mem.ID_MEMBER)" . (!allowedTo('moderate_forum') ? " + WHERE IFNULL(mem.showOnline, 1) = 1" : ''), __FILE__, __LINE__); + list ($totalMembers) = mysql_fetch_row($request); + mysql_free_result($request); + + // Prepare some page index variables. + $context['start'] = $_REQUEST['start']; + $context['page_index'] = constructPageIndex($scripturl . '?action=who;sort=' . $context['sort_by'] . (isset($_REQUEST['asc']) ? ';asc' : ''), $context['start'], $totalMembers, $modSettings['defaultMaxMembers']); + + // Look for people online, provided they don't mind if you see they are. + $request = db_query(" + SELECT + UNIX_TIMESTAMP(lo.logTime) AS logTime, lo.ID_MEMBER, INET_NTOA(lo.ip) AS ip, lo.url, + mem.realName, IFNULL(mem.showOnline, 1) AS showOnline, lo.session, mg.onlineColor + FROM {$db_prefix}log_online AS lo + LEFT JOIN {$db_prefix}members AS mem ON (lo.ID_MEMBER = mem.ID_MEMBER) + LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))" . (!allowedTo('moderate_forum') ? " + WHERE IFNULL(mem.showOnline, 1) = 1" : '') . " + ORDER BY $_REQUEST[sort] " . (isset($_REQUEST['asc']) ? 'ASC' : 'DESC') . " + LIMIT $context[start], $modSettings[defaultMaxMembers]", __FILE__, __LINE__); + $context['members'] = array(); + $member_ids = array(); + while ($row = mysql_fetch_assoc($request)) + { + // Get the request parameters.. + $actions = @unserialize($row['url']); + if ($actions === false) + continue; + + // By default, anyone can view this topic. + $can_view = true; + + // Find out what topic they are accessing. + if (isset($actions['topic'])) + $topic = (int) $actions['topic']; + elseif (isset($actions['from'])) + $topic = (int) $actions['from']; + else + $topic = 0; + + // Find out what message they are accessing. + if (isset($actions['msg'])) + $msgid = (int) $actions['msg']; + elseif (isset($actions['quote'])) + $msgid = (int) $actions['quote']; + else + $msgid = 0; + + // Check if there was no action or the action is display. + if (!isset($actions['action']) || $actions['action'] == 'display') + { + // It's a topic! Must be! + if (isset($actions['topic'])) + { + // Assume they can't view it, and queue it up for later. + $action = $txt['who_hidden']; + $topic_ids[$topic][] = array($row['session'], $txt['who_topic']); + } + // It's a board! + elseif (isset($actions['board'])) + { + // Hide first, show later. + $action = $txt['who_hidden']; + $board_ids[$actions['board']][] = array($row['session'], $txt['who_board']); + } + // It's the board index!! It must be! + else + $action = $txt['who_index']; + } + // Probably an error or some goon? + elseif ($actions['action'] == '') + $action = $txt['who_index']; + // Some other normal action...? + else + { + // Viewing/editing a profile. + if ($actions['action'] == 'profile' || $actions['action'] == 'profile2') + { + // Whose? Their own? + if (empty($actions['u'])) + $actions['u'] = $row['ID_MEMBER']; + + $action = $txt['who_hidden']; + $profile_ids[(int) $actions['u']][] = array($row['session'], $actions['action'] == 'profile' ? $txt['who_viewprofile'] : $txt['who_profile']); + } + elseif (($actions['action'] == 'post' || $actions['action'] == 'post2') && empty($actions['topic']) && isset($actions['board'])) + { + $action = $txt['who_hidden']; + $board_ids[(int) $actions['board']][] = array($row['session'], isset($actions['poll']) ? $txt['who_poll'] : $txt['who_post']); + } + // A subaction anyone can view... if the language string is there, show it. + elseif (isset($actions['sa']) && isset($txt['whoall_' . $actions['action'] . '_' . $actions['sa']])) + $action = $txt['whoall_' . $actions['action'] . '_' . $actions['sa']]; + // An action any old fellow can look at. (if ['whoall_' . $action] exists, we know everyone can see it.) + elseif (isset($txt['whoall_' . $actions['action']])) + $action = $txt['whoall_' . $actions['action']]; + // Viewable if and only if they can see the board... + elseif (isset($txt['whotopic_' . $actions['action']])) + { + $action = $txt['who_hidden']; + $topic_ids[$topic][] = array($row['session'], $txt['whotopic_' . $actions['action']]); + } + elseif (isset($txt['whopost_' . $actions['action']])) + { + $result = db_query(" + SELECT m.ID_TOPIC, m.subject + FROM {$db_prefix}boards AS b, {$db_prefix}messages AS m + WHERE $user_info[query_see_board] + AND m.ID_MSG = $msgid + AND m.ID_BOARD = b.ID_BOARD + LIMIT 1", __FILE__, __LINE__); + list ($ID_TOPIC, $subject) = mysql_fetch_row($result); + $action = sprintf($txt['whopost_' . $actions['action']], $ID_TOPIC, $subject); + mysql_free_result($result); + + $can_view = !empty($ID_TOPIC); + } + // Viewable only by administrators.. (if it starts with whoadmin, it's admin only!) + elseif (allowedTo('moderate_forum') && isset($txt['whoadmin_' . $actions['action']])) + $action = $txt['whoadmin_' . $actions['action']]; + // Viewable by permission level. + elseif (isset($allowedActions[$actions['action']])) + { + $action = $txt['whoallow_' . $actions['action']]; + $can_view = allowedTo($allowedActions[$actions['action']]); + } + // Unlisted or unknown action. + else + $action = $txt['who_unknown']; + } + + // Send the information to the template. + $context['members'][$row['session']] = array( + 'id' => $row['ID_MEMBER'], + 'ip' => allowedTo('moderate_forum') ? $row['ip'] : '', + // It is *going* to be today, so why keep that information in there? + 'time' => strtr(timeformat($row['logTime']), array($txt['smf10'] => '')), + 'timestamp' => $row['logTime'], + 'action' => $can_view || allowedTo('moderate_forum') ? $action : $txt['who_hidden'], + 'query' => $actions, + 'is_hidden' => $row['showOnline'] == 0, + 'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'] + ); + + $member_ids[$row['session']] = $row['ID_MEMBER']; + } + mysql_free_result($request); + + // Load the user data for these members. + loadMemberData($member_ids); + + // Load topic names. + if (!empty($topic_ids)) + { + $result = db_query(" + SELECT t.ID_TOPIC, m.subject + FROM {$db_prefix}boards AS b, {$db_prefix}topics AS t, {$db_prefix}messages AS m + WHERE $user_info[query_see_board] + AND t.ID_TOPIC IN (" . implode(', ', array_keys($topic_ids)) . ") + AND t.ID_BOARD = b.ID_BOARD + AND m.ID_MSG = t.ID_FIRST_MSG + LIMIT " . count($topic_ids), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + // Show the topic's subject for each of the actions. + foreach ($topic_ids[$row['ID_TOPIC']] as $session_text) { + $context['members'][$session_text[0]]['action'] = sprintf($session_text[1], $row['ID_TOPIC'], censorText($row['subject'])); + } + } + mysql_free_result($result); + } + + // Load board names. + if (!empty($board_ids)) + { + $result = db_query(" + SELECT b.ID_BOARD, b.name + FROM {$db_prefix}boards AS b + WHERE $user_info[query_see_board] + AND b.ID_BOARD IN (" . implode(', ', array_keys($board_ids)) . ") + LIMIT " . count($board_ids), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + // Put the board name into the string for each member... + foreach ($board_ids[$row['ID_BOARD']] as $session_text) + $context['members'][$session_text[0]]['action'] = sprintf($session_text[1], $row['ID_BOARD'], $row['name']); + } + mysql_free_result($result); + } + + // Load member names for the profile. + if (!empty($profile_ids)) + { + $result = db_query(" + SELECT ID_MEMBER, realName + FROM {$db_prefix}members + WHERE ID_MEMBER IN (" . implode(', ', array_keys($profile_ids)) . ") + LIMIT " . count($profile_ids), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + // If they aren't allowed to view this person's profile, skip it. + if (!allowedTo('profile_view_any') && ($ID_MEMBER != $row['ID_MEMBER'] || !allowedTo('profile_view_own'))) + continue; + + // Set their action on each - session/text to sprintf. + foreach ($profile_ids[$row['ID_MEMBER']] as $session_text) + $context['members'][$session_text[0]]['action'] = sprintf($session_text[1], $row['ID_MEMBER'], $row['realName']); + } + mysql_free_result($result); + } + + // Put it in the context variables. + foreach ($context['members'] as $i => $member) + { + if ($member['id'] != 0) + $member['id'] = loadMemberContext($member['id']) ? $member['id'] : 0; + + // Keep the IP that came from the database. + $themeUser[$member['id']]['ip'] = $member['ip']; + $context['members'][$i] += $themeUser[$member['id']]; + } + + // Some people can't send personal messages... + $context['can_send_pm'] = allowedTo('pm_send'); +} + +?> diff --git a/Sources/index.php b/Sources/index.php new file mode 100644 index 0000000..6ea8411 --- /dev/null +++ b/Sources/index.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/Themes/classic/BoardIndex.template.php b/Themes/classic/BoardIndex.template.php new file mode 100644 index 0000000..c49af60 --- /dev/null +++ b/Themes/classic/BoardIndex.template.php @@ -0,0 +1,413 @@ + + + ', theme_linktree(), ' + '; + if (!$settings['show_sp1_info']) + echo ' + ', $txt[19], ': ', $modSettings['memberCount'], '  •  ', $txt[95], ': ', $modSettings['totalMessages'], '  •  ', $txt[64], ': ', $modSettings['totalTopics'], ' + ', ($settings['show_latest_member'] ? '
    ' . $txt[201] . ' ' . $context['latest_member']['link'] . '' . $txt[581] : ''); + echo ' + + +'; + + // Show the news fader? (assuming there are things to show...) + if ($settings['show_newsfader'] && !empty($context['fader_news_lines'])) + { + echo ' +
    +
    ', $txt[102], '
    +
    + + + + +
    '; + + // Prepare all the javascript settings. + echo ' +
    ', $context['news_lines'][0], '
    + + +
    '; + } + + // Show the "Board name Topics Posts Last Post" header. + echo ' + + + + + + + '; + + /* Each category in categories is made up of: + id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?), + new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge), + and boards. (see below.) */ + foreach ($context['categories'] as $category) + { + // Show the category's name, and let them collapse it... if they feel like it. + echo ' + + + '; + + // Only if it's NOT collapsed.. + if (!$category['is_collapsed']) + { + /* Each board in each category's boards has: + new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.), + children (see below.), link_children (easier to use.), children_new (are they new?), + topics (# of), posts (# of), link, href, and last_post. (see below.) */ + foreach ($category['boards'] as $board) + { + echo ' + + + + + '; + + /* The board's and children's 'last_post's have: + time, timestamp (a number that represents the time.), id (of the post), topic (topic id.), + link, href, subject, start (where they should go for the first unread post.), + and member. (which has id, name, link, href, username in it.) */ + echo ' + + '; + } + } + } + + // Show the "New Posts" and "No New Posts" legend. + if ($context['user']['is_logged']) + { + echo ' + + + + '; + } + + echo ' +
    ', $txt[20], '', $txt[330], '', $txt[21], '', $txt[22], '
    '; + + // If this category even can collapse, show a link to collapse it. + if ($category['can_collapse']) + echo ' + ', $category['collapse_image'], ''; + + echo ' + ', $category['link'], ' +
    ' . $txt[333] . ' + + ', $board['link'], '
    + ', $board['description']; + + // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) + if (!empty($board['moderators'])) + echo '
    + ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) + if (!empty($board['children'])) + { + // Sort the links into an array with new boards bold so it can be imploded. + $children = array(); + /* Each child in each board's children has: + id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ + foreach ($board['children'] as $child) + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + + echo ' +
    + ', $txt['parent_boards'], ': ', implode(', ', $children), '
    '; + } + + echo ' +
    ', $board['topics'], '', $board['posts'], ' + + ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], '
    + ', $txt[525], ' ', $board['last_post']['member']['link'], ' +
    +
    + ' . $txt[333] . '  ' . $txt[334] . ' + '; + // Show the mark all as read button? + if ($settings['show_mark_read']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]), ''; + echo ' +
    '; + + // Here's where the "Info Center" starts... + echo ' +
    +
    + + + + '; + + // This is the "Recent Posts" bar. + if (!empty($settings['number_recent_posts'])) + { + echo ' + + + + + + + '; + } + + // Show information about events, birthdays, and holidays on the calendar. + if ($context['show_calendar']) + { + echo ' + + + + + + '; + } + + // Show a member bar. Not heavily ornate, but functional at least. + if ($settings['show_member_bar']) + { + echo ' + + + + + + + '; + } + + // Show YaBB SP1 style information... + if ($settings['show_sp1_info']) + { + echo ' + + + + + + + '; + } + + // "Users online" - in order of activity. + echo ' + + + + + + '; + + // If they are logged in, but SP1 style information is off... show a personal message bar. + if ($context['user']['is_logged'] && !$settings['show_sp1_info']) + { + echo ' + + + + + + '; + } + + // Show the login bar. (it's only true if they are logged out anyway.) + if ($context['show_login_bar']) + { + echo ' + + + + + + + '; + } + + echo ' +
    ', $txt[685], '
    ', $txt[214], '
    + + ', $txt[214], ' + '; + + // Only show one post. + if ($settings['number_recent_posts'] == 1) + { + // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.) + echo ' + ', $txt[214], '
    + + ', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')
    +
    '; + } + // Show lots of posts. + elseif (!empty($context['latest_posts'])) + { + echo ' + '; + /* Each post in latest_posts has: + board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), + subject, short_subject (shortened with...), time, link, and href. */ + foreach ($context['latest_posts'] as $post) + echo ' + + + + + '; + echo ' +
    [', $post['board']['link'], ']', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '', $post['time'], '
    '; + } + echo ' +
    ', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '
    + + ', $txt['calendar24'], ' + + '; + + // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P. + if (!empty($context['calendar_holidays'])) + echo ' + ', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), '
    '; + + // People's birthdays. Like mine. And yours, I guess. Kidding. + if (!empty($context['calendar_birthdays'])) + { + echo ' + ', $context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], ' '; + /* Each member in calendar_birthdays has: + id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */ + foreach ($context['calendar_birthdays'] as $member) + echo ' + ', $member['is_today'] ? '' : '', $member['name'], $member['is_today'] ? '' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '
    ' : ', '; + } + // Events like community get-togethers. + if (!empty($context['calendar_events'])) + { + echo ' + ', $context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], ' '; + /* Each event in calendar_events should have: + title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */ + foreach ($context['calendar_events'] as $event) + echo ' + ', $event['can_edit'] ? '* ' : '', '', $event['is_today'] ? '' . $event['title'] . '' : $event['title'], '', $event['is_last'] ? '
    ' : ', '; + + // Show a little help text to help them along ;). + if ($context['calendar_can_edit']) + echo ' + (', $txt['calendar_how_edit'], ')'; + } + echo ' +
    +
    ', $txt[331], '
    + ', $context['show_member_list'] ? '' : '', '', $txt[332], '', $context['show_member_list'] ? '' : '', ' + + ', $context['show_member_list'] ? '' . $txt[332] . '' : $txt[332], '
    + ', $txt[200], ' +
    ', $txt[645], '
    + + ', $txt[645], ' + + + + +
    + ', $txt[490], ': ', $modSettings['totalTopics'], '      ', $txt[489], ': ', $modSettings['totalMessages'], '
    + ', !empty($context['latest_post']) ? $txt[659] . ': + "' . $context['latest_post']['link'] . '" (' . $context['latest_post']['time'] . ')
    ' : '', ' + ', $txt[234], '', $context['show_stats'] ? '
    + ' . $txt['smf223'] . '' : '', ' +
    + ', $txt[488], ': ', $context['show_member_list'] ? '' . $modSettings['memberCount'] . '' : $modSettings['memberCount'], '
    + ', $txt[656], ': ', $context['latest_member']['link'], '
    '; + // If they are logged in, show their unread message count, etc.. + if ($context['user']['is_logged'] && $context['allow_pm']) + echo ' + ', $txt['smf199'], ': ', $context['user']['messages'], ' ', $txt['newmessages3'], ': ', $context['user']['unread_messages'], ''; + echo ' +
    +
    ', $txt[158], '
    + ', $context['show_who'] ? '' : '', '', $txt[158], '', $context['show_who'] ? '' : '', ' + + ', $context['show_who'] ? '' : '', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'], $context['num_users_hidden'] > 0 ? ' (' . $context['num_users_hidden'] . ' ' . $txt['hidden'] . ')' : '', $context['show_who'] ? '' : '', '
    + '; + + // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link. + if (!empty($context['users_online'])) + echo ' + ', $txt[140], ':
    ', implode(', ', $context['list_users_online']); + + echo ' +
    ', $context['show_stats'] && !$settings['show_sp1_info'] ? ' + ' . $txt['smf223'] . '' : '', ' +
    +
    ', $txt[159], '
    + ', $context['allow_pm'] ? '' : '', '', $txt[159], '', $context['allow_pm'] ? '' : '', ' + + ', $txt[159], '
    + + ', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], $context['allow_pm'] ? ' ' . $txt[662] . '' : '', ' ', $txt[663], ' + +
    + ', $txt[34], ' (' . $txt[315] . ') +
    + + ', $txt[34], ' + +
    + + + + + + +
    + + + + + + + + + +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/classic/Display.template.php b/Themes/classic/Display.template.php new file mode 100755 index 0000000..7698ce7 --- /dev/null +++ b/Themes/classic/Display.template.php @@ -0,0 +1,663 @@ + +', $context['first_new_message'] ? '' : ''; + + // Show the linktree as well as the "Who's Viewing" information. + echo ' + + + '; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + } + + // Show the previous/next links. + echo ' + + +
    ', theme_linktree(), ''; + + // Show just numbers...? + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + // Or show the actual people viewing the topic? + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + + // Now show how many guests are here too. + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], ' + ', $context['previous_next'], ' +
    '; + + // Show the page index... "Pages: [1]". + echo ' + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index']; + + // Show a "go down" link? + if (!empty($modSettings['topbottomEnable'])) + echo $context['menu_separator'], '', $settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5'], ''; + + echo ' + ', theme_show_main_buttons(), '
    +
    '; + + // Is this topic also a poll? + if ($context['is_poll']) + { + echo ' + + + + + + + + +
    + ', $txt['smf43'], ' +
    ', $txt['smf21'], ': + ', $context['poll']['question']; + + // Are they not allowed to vote but allowed to view the options? + if (!$context['allow_vote']) + { + echo ' + + + + + ', $context['allow_poll_view'] ? ' + + + ' : '', ' +
    + '; + + // Show each option with its corresponding percentage bar. + foreach ($context['poll']['options'] as $option) + echo ' + + ', $context['allow_poll_view'] ? ' + + ' : '', ' + '; + + echo ' +
    ', $option['option'], ' ' . $option['bar'] . $option['votes'] . ' (' . $option['percent'] . '%)
    +
    '; + + // If they are allowed to revote - show them a link! + if ($context['allow_change_vote']) + echo ' + ', $txt['poll_change_vote'], '
    '; + + // If they're allowed to lock the poll, show a link! + if ($context['poll']['lock']) + echo ' + ', !$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b'], '
    '; + + // If they're allowed to edit the poll... guess what... show a link! + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    ' . $txt['smf24'] . ': ' . $context['poll']['total_votes'] . '

    '; + } + // They are allowed to vote! Go to it! + else + { + echo ' +
    + + + + + + + + + +
    '; + + // Show a warning if they are allowed more than one option. + if ($context['poll']['allowed_warning']) + echo ' + ', $context['poll']['allowed_warning'], ' +
    '; + + // Show each option with its button - a radio likely. + foreach ($context['poll']['options'] as $option) + echo ' + ', $option['vote_button'], ' ', $option['option'], '
    '; + + echo ' +
    '; + + // Allowed to view the results? (without voting!) + if ($context['allow_poll_view']) + echo ' + ', $txt['smf29'], '
    '; + + // Show a link for locking the poll as well... + if ($context['poll']['lock']) + echo ' + ', (!$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b']), '
    '; + + // Want to edit it? Click right here...... + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    + +
    '; + } + + echo ' +
    '; + } + + // Show the topic information - icon, subject, etc. + echo ' + + + + + +
    + + ', $txt[29], ' + + ', $txt[118], ': ', $context['subject'], '  (', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ') +
    '; + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
    '; + + echo ' +'; + + // Get all the messages... + while ($message = $context['get_message']()) + { + echo ' + '; + if (($context['is_sticky'] || $context['is_fisrt_sticky']) && ($message['id']==$context['topic_first_message'])) { + echo ''; + } + + if (($context['is_sticky'] || $context['is_fisrt_sticky']) && ($message['id']==$context['topic_first_message'])) { + echo ''; + } + + } + echo ' +
    '; + + // Show the message anchor and a "new" anchor if this message is new. + if ($message['id'] != $context['first_message']) + echo ' + ', $message['first_new'] ? '' : ''; + + echo ' + + +
    '; + + // Show information about the poster of this message. + echo ' + + + + + '; + + // Now for the attachments, signature, ip logged, etc... + echo ' + + + +
    + ', $message['member']['link'], '
    + '; + + // Show the member's custom title, if they have one. + if (isset($message['member']['title']) && $message['member']['title'] != '') + echo ' + ', $message['member']['title'], '
    '; + + // Show the member's primary group (like 'Administrator') if they have one. + if (isset($message['member']['group']) && $message['member']['group'] != '') + echo ' + ', $message['member']['group'], '
    '; + + // Don't show these things for guests. + if (!$message['member']['is_guest']) + { + // Show the post group if and only if they have no other group or the option is on, and they are in a post group. + if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') + echo ' + ', $message['member']['post_group'], '
    '; + echo ' + ', $message['member']['group_stars'], '
    '; + + // Is karma display enabled? Total or +/-? + if ($modSettings['karmaMode'] == '1') + echo ' +
    + ', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
    '; + elseif ($modSettings['karmaMode'] == '2') + echo ' +
    + ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
    '; + + // Is this user allowed to modify this member's karma? + if ($message['member']['karma']['allow']) + echo ' + ', $modSettings['karmaApplaudLabel'], ' + ', $modSettings['karmaSmiteLabel'], '
    '; + + // Show online and offline buttons? + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) + echo ' + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $message['member']['online']['text'] . '' : '', '

    '; + + // Show the member's gender icon? + if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '') + echo ' + ', $txt[231], ': ', $message['member']['gender']['image'], '
    '; + + // Show how many posts they have made. + echo ' + ', $txt[26], ': ', $message['member']['posts'], '
    +
    '; + + // Show avatars, images, etc.? + if (!empty($settings['show_user_images']) && empty($options['show_no_avatars'])) + echo ' + ', $message['member']['avatar']['image'], '
    '; + + // Show their personal text? + if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') + echo ' + ', $message['member']['blurb'], '
    +
    '; + + // This shows the popular messaging icons. + echo ' + ', $message['member']['icq']['link'], ' + ', $message['member']['msn']['link'], ' + ', $message['member']['yim']['link'], ' + ', $message['member']['aim']['link'], '
    '; + + // Show the profile, website, email address, and personal message buttons. + if ($settings['show_profile_buttons']) + { + // Don't show the profile button if you're not allowed to view the profile. + if ($message['member']['can_view_profile']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[27] . '' : $txt[27]), ''; + + // Don't show an icon if they haven't specified a website. + if ($message['member']['website']['url'] != '') + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; + + // Don't show the email address if they want it hidden. + if (empty($message['member']['hide_email'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + + // Since we know this person isn't a guest, you *can* message them. + if ($context['can_send_pm']) + echo ' + ', $settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'], ''; + } + } + // Otherwise, show the guest's email. + else + echo ' +
    +
    + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + + // Done with the information about the poster... on to the post itself. + echo ' +
    +
    + + + + +
    + ', $message['subject'], '
    '; + + // If this is the first post, (#0) just say when it was posted - otherwise give the reply #. + echo ' + « ', !($message['id'] == $context['topic_first_message']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ': ', $message['time'], ' »
    '; + + // Can they reply? Have they turned on quick reply? + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + // So... quick reply is off, but they *can* reply? + elseif ($context['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + + // Can the user modify the contents of this post? + if ($message['can_modify']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[66] . '' : $txt[17]), ''; + + // How about... even... remove it entirely?! + if ($message['can_remove']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + + // What about splitting it off the rest of the topic? + if ($context['can_split']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['smf251'] . '' : $txt['smf251']), ''; + + // Show a checkbox for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove']) + echo ' + '; + + // Show the post itself, finally! + echo ' +
    +
    + ', $message['body'], ' +
    + + + + + +
    '; + + // Assuming there are attachments... + if (!empty($message['attachment'])) + { + echo ' +
    '; + + foreach ($message['attachment'] as $attachment) + { + if (isset($attachment['image'])) + echo ' + ', $attachment['image'], '
    '; + echo ' + * ' . $attachment['name'] . ' (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['width'] . 'x' . $attachment['height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)
    '; + } + } + + echo ' +
    '; + + // Show " Last Edit: Time by Person " if this post was edited. + if ($settings['show_modify'] && !empty($message['modified']['name'])) + echo ' + « ', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], ' »'; + + echo ' + '; + + // Maybe they want to report this post to the moderator(s)? + if ($context['can_report_moderator']) + echo ' + ', $txt['rtm1'], '  '; + echo ' + '; + + // Show the IP to this user for this post - because you can moderate? + if ($context['can_moderate_forum'] && !empty($message['member']['ip'])) + echo ' + ', $message['member']['ip'], ' (?)'; + // Or, should we show it because this is you? + elseif ($message['can_see_ip']) + echo ' + ', $message['member']['ip'], ''; + // Okay, are you at least logged in? Then we can show something about why IPs are logged... + elseif (!$context['user']['is_guest']) + echo ' + ', $txt[511], ''; + // Otherwise, you see NOTHING! + else + echo ' + ', $txt[511]; + + echo ' +
    '; + + // Show the member's signature? + if (!empty($message['member']['signature']) && empty($options['show_no_signatures'])) + echo ' +
    +
    ', $message['member']['signature'], '
    '; + + echo ' +
    +
    +
     
     
    + +
    + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index'], ($modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : ''), ' + + ', theme_show_main_buttons(), '  +
    +
    +
    + + + '; + if ($settings['linktree_inline']) + echo ' + '; + echo ' + + + + +
    ', theme_linktree(), ' ', $context['previous_next'], '
    + ', theme_show_mod_buttons(), ' +
    '; + + // This button has an identity crisis: it wishes it were an image. (kinda like the characters in The Wizard of Oz.) + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post']) + echo ' + +
    '; + + echo ' + + + + +
    +
    + ' . $txt[160] . ': +   + +
    +
    '; + + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + { + if ($context['show_spellchecking']) + echo ' + '; + + echo ' + + + + + + + + + +
    + ', $txt['quick_reply_1'], '
    '; + if ($context['show_spellchecking']) + echo ' +
    '; + } + + echo ''; +} + +function theme_show_main_buttons() +{ + global $context, $settings, $options, $txt, $scripturl; + + $buttonArray = array(); + if ($context['can_reply']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + if ($context['can_add_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + if ($context['can_send_topic']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; + + return implode($context['menu_separator'], $buttonArray); +} + +function theme_show_mod_buttons() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + $moderationButtons = array(); + + if ($context['can_move']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt[132] . '' : $txt[132]) . ''; + if ($context['can_delete']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt[63] . '' : $txt[63]) . ''; + if ($context['can_lock']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280']) . '' : (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280'])) . ''; + if ($context['can_sticky']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278']) . '' : (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278'])) . ''; + if ($context['can_merge']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf252'] . '' : $txt['smf252']) . ''; + if ($context['can_remove_poll']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['poll_remove'] . '' : $txt['poll_remove']) . ''; + + if ($context['calendar_post']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['calendar37'] . '' : $txt['calendar37']) . ''; + + if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + $moderationButtons[] = $settings['use_image_buttons'] ? '' : '' . $txt['quickmod_delete_selected'] . ''; + + return implode($context['menu_separator'], $moderationButtons); +} + +?> \ No newline at end of file diff --git a/Themes/classic/Display.template.php~ b/Themes/classic/Display.template.php~ new file mode 100644 index 0000000..38a5716 --- /dev/null +++ b/Themes/classic/Display.template.php~ @@ -0,0 +1,659 @@ + +', $context['first_new_message'] ? '' : ''; + + // Show the linktree as well as the "Who's Viewing" information. + echo ' + + + '; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + } + + // Show the previous/next links. + echo ' + + +
    ', theme_linktree(), ''; + + // Show just numbers...? + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + // Or show the actual people viewing the topic? + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + + // Now show how many guests are here too. + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], ' + ', $context['previous_next'], ' +
    '; + + // Show the page index... "Pages: [1]". + echo ' + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index']; + + // Show a "go down" link? + if (!empty($modSettings['topbottomEnable'])) + echo $context['menu_separator'], '', $settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5'], ''; + + echo ' + ', theme_show_main_buttons(), '
    +
    '; + + // Is this topic also a poll? + if ($context['is_poll']) + { + echo ' + + + + + + + + +
    + ', $txt['smf43'], ' +
    ', $txt['smf21'], ': + ', $context['poll']['question']; + + // Are they not allowed to vote but allowed to view the options? + if (!$context['allow_vote']) + { + echo ' + + + + + ', $context['allow_poll_view'] ? ' + + + ' : '', ' +
    + '; + + // Show each option with its corresponding percentage bar. + foreach ($context['poll']['options'] as $option) + echo ' + + ', $context['allow_poll_view'] ? ' + + ' : '', ' + '; + + echo ' +
    ', $option['option'], ' ' . $option['bar'] . $option['votes'] . ' (' . $option['percent'] . '%)
    +
    '; + + // If they are allowed to revote - show them a link! + if ($context['allow_change_vote']) + echo ' + ', $txt['poll_change_vote'], '
    '; + + // If they're allowed to lock the poll, show a link! + if ($context['poll']['lock']) + echo ' + ', !$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b'], '
    '; + + // If they're allowed to edit the poll... guess what... show a link! + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    ' . $txt['smf24'] . ': ' . $context['poll']['total_votes'] . '

    '; + } + // They are allowed to vote! Go to it! + else + { + echo ' +
    + + + + + + + + + +
    '; + + // Show a warning if they are allowed more than one option. + if ($context['poll']['allowed_warning']) + echo ' + ', $context['poll']['allowed_warning'], ' +
    '; + + // Show each option with its button - a radio likely. + foreach ($context['poll']['options'] as $option) + echo ' + ', $option['vote_button'], ' ', $option['option'], '
    '; + + echo ' +
    '; + + // Allowed to view the results? (without voting!) + if ($context['allow_poll_view']) + echo ' + ', $txt['smf29'], '
    '; + + // Show a link for locking the poll as well... + if ($context['poll']['lock']) + echo ' + ', (!$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b']), '
    '; + + // Want to edit it? Click right here...... + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    + +
    '; + } + + echo ' +
    '; + } + + // Show the topic information - icon, subject, etc. + echo ' + + + + + +
    + + ', $txt[29], ' + + ', $txt[118], ': ', $context['subject'], '  (', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ') +
    '; + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
    '; + + echo ' +'; + + // Get all the messages... + while ($message = $context['get_message']()) + { + echo ' + '; + if (($context['is_sticky'] || $context['is_fisrt_sticky']) && ($message['id']==$context['topic_first_message'])) { + echo ''; + } + + } + echo ' +
    '; + + // Show the message anchor and a "new" anchor if this message is new. + if ($message['id'] != $context['first_message']) + echo ' + ', $message['first_new'] ? '' : ''; + + echo ' + + +
    '; + + // Show information about the poster of this message. + echo ' + + + + + '; + + // Now for the attachments, signature, ip logged, etc... + echo ' + + + +
    + ', $message['member']['link'], '
    + '; + + // Show the member's custom title, if they have one. + if (isset($message['member']['title']) && $message['member']['title'] != '') + echo ' + ', $message['member']['title'], '
    '; + + // Show the member's primary group (like 'Administrator') if they have one. + if (isset($message['member']['group']) && $message['member']['group'] != '') + echo ' + ', $message['member']['group'], '
    '; + + // Don't show these things for guests. + if (!$message['member']['is_guest']) + { + // Show the post group if and only if they have no other group or the option is on, and they are in a post group. + if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') + echo ' + ', $message['member']['post_group'], '
    '; + echo ' + ', $message['member']['group_stars'], '
    '; + + // Is karma display enabled? Total or +/-? + if ($modSettings['karmaMode'] == '1') + echo ' +
    + ', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
    '; + elseif ($modSettings['karmaMode'] == '2') + echo ' +
    + ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
    '; + + // Is this user allowed to modify this member's karma? + if ($message['member']['karma']['allow']) + echo ' + ', $modSettings['karmaApplaudLabel'], ' + ', $modSettings['karmaSmiteLabel'], '
    '; + + // Show online and offline buttons? + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) + echo ' + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $message['member']['online']['text'] . '' : '', '

    '; + + // Show the member's gender icon? + if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '') + echo ' + ', $txt[231], ': ', $message['member']['gender']['image'], '
    '; + + // Show how many posts they have made. + echo ' + ', $txt[26], ': ', $message['member']['posts'], '
    +
    '; + + // Show avatars, images, etc.? + if (!empty($settings['show_user_images']) && empty($options['show_no_avatars'])) + echo ' + ', $message['member']['avatar']['image'], '
    '; + + // Show their personal text? + if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') + echo ' + ', $message['member']['blurb'], '
    +
    '; + + // This shows the popular messaging icons. + echo ' + ', $message['member']['icq']['link'], ' + ', $message['member']['msn']['link'], ' + ', $message['member']['yim']['link'], ' + ', $message['member']['aim']['link'], '
    '; + + // Show the profile, website, email address, and personal message buttons. + if ($settings['show_profile_buttons']) + { + // Don't show the profile button if you're not allowed to view the profile. + if ($message['member']['can_view_profile']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[27] . '' : $txt[27]), ''; + + // Don't show an icon if they haven't specified a website. + if ($message['member']['website']['url'] != '') + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; + + // Don't show the email address if they want it hidden. + if (empty($message['member']['hide_email'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + + // Since we know this person isn't a guest, you *can* message them. + if ($context['can_send_pm']) + echo ' + ', $settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'], ''; + } + } + // Otherwise, show the guest's email. + else + echo ' +
    +
    + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + + // Done with the information about the poster... on to the post itself. + echo ' +
    +
    + + + + +
    + ', $message['subject'], '
    '; + + // If this is the first post, (#0) just say when it was posted - otherwise give the reply #. + echo ' + « ', !($message['id'] == $context['topic_first_message']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ': ', $message['time'], ' »
    '; + + // Can they reply? Have they turned on quick reply? + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + // So... quick reply is off, but they *can* reply? + elseif ($context['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + + // Can the user modify the contents of this post? + if ($message['can_modify']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[66] . '' : $txt[17]), ''; + + // How about... even... remove it entirely?! + if ($message['can_remove']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + + // What about splitting it off the rest of the topic? + if ($context['can_split']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['smf251'] . '' : $txt['smf251']), ''; + + // Show a checkbox for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove']) + echo ' + '; + + // Show the post itself, finally! + echo ' +
    +
    + ', $message['body'], ' +
    + + + + + +
    '; + + // Assuming there are attachments... + if (!empty($message['attachment'])) + { + echo ' +
    '; + + foreach ($message['attachment'] as $attachment) + { + if (isset($attachment['image'])) + echo ' + ', $attachment['image'], '
    '; + echo ' + * ' . $attachment['name'] . ' (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['width'] . 'x' . $attachment['height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)
    '; + } + } + + echo ' +
    '; + + // Show " Last Edit: Time by Person " if this post was edited. + if ($settings['show_modify'] && !empty($message['modified']['name'])) + echo ' + « ', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], ' »'; + + echo ' + '; + + // Maybe they want to report this post to the moderator(s)? + if ($context['can_report_moderator']) + echo ' + ', $txt['rtm1'], '  '; + echo ' + '; + + // Show the IP to this user for this post - because you can moderate? + if ($context['can_moderate_forum'] && !empty($message['member']['ip'])) + echo ' + ', $message['member']['ip'], ' (?)'; + // Or, should we show it because this is you? + elseif ($message['can_see_ip']) + echo ' + ', $message['member']['ip'], ''; + // Okay, are you at least logged in? Then we can show something about why IPs are logged... + elseif (!$context['user']['is_guest']) + echo ' + ', $txt[511], ''; + // Otherwise, you see NOTHING! + else + echo ' + ', $txt[511]; + + echo ' +
    '; + + // Show the member's signature? + if (!empty($message['member']['signature']) && empty($options['show_no_signatures'])) + echo ' +
    +
    ', $message['member']['signature'], '
    '; + + echo ' +
    +
    +
     
    + +
    + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index'], ($modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : ''), ' + + ', theme_show_main_buttons(), '  +
    +
    +
    + + + '; + if ($settings['linktree_inline']) + echo ' + '; + echo ' + + + + +
    ', theme_linktree(), ' ', $context['previous_next'], '
    + ', theme_show_mod_buttons(), ' +
    '; + + // This button has an identity crisis: it wishes it were an image. (kinda like the characters in The Wizard of Oz.) + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post']) + echo ' + +
    '; + + echo ' + + + + +
    +
    + ' . $txt[160] . ': +   + +
    +
    '; + + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + { + if ($context['show_spellchecking']) + echo ' + '; + + echo ' + + + + + + + + + +
    + ', $txt['quick_reply_1'], '
    '; + if ($context['show_spellchecking']) + echo ' +
    '; + } + + echo ''; +} + +function theme_show_main_buttons() +{ + global $context, $settings, $options, $txt, $scripturl; + + $buttonArray = array(); + if ($context['can_reply']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + if ($context['can_add_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + if ($context['can_send_topic']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; + + return implode($context['menu_separator'], $buttonArray); +} + +function theme_show_mod_buttons() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + $moderationButtons = array(); + + if ($context['can_move']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt[132] . '' : $txt[132]) . ''; + if ($context['can_delete']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt[63] . '' : $txt[63]) . ''; + if ($context['can_lock']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280']) . '' : (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280'])) . ''; + if ($context['can_sticky']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278']) . '' : (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278'])) . ''; + if ($context['can_merge']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf252'] . '' : $txt['smf252']) . ''; + if ($context['can_remove_poll']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['poll_remove'] . '' : $txt['poll_remove']) . ''; + + if ($context['calendar_post']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['calendar37'] . '' : $txt['calendar37']) . ''; + + if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + $moderationButtons[] = $settings['use_image_buttons'] ? '' : '' . $txt['quickmod_delete_selected'] . ''; + + return implode($context['menu_separator'], $moderationButtons); +} + +?> \ No newline at end of file diff --git a/Themes/classic/MessageIndex.template.php b/Themes/classic/MessageIndex.template.php new file mode 100755 index 0000000..de3a496 --- /dev/null +++ b/Themes/classic/MessageIndex.template.php @@ -0,0 +1,335 @@ + + + ', theme_linktree(), ''; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], ''; + } + echo ' + +'; + + if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) + { + echo ' + + + + + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + + + '; + } + echo ' +
    ', $txt[20], '', $txt[330], '', $txt[21], '', $txt[22], '
    ', $board['new'] ? '' . $txt[333] . '' : '' . $txt[334] . '', ' + + ' . $board['link'] . '
    + ' . $board['description']; + + if (!empty($board['moderators'])) + echo '
    + ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), ''; + + if (!empty($board['children'])) + { + $children = array(); + foreach ($board['children'] as $child) + { + if ($child['new']) + $children[] = '' . $child['link'] . ''; + else + $children[] = $child['link']; + } + + echo ' +
    +
    ', $txt['parent_boards'], ': ', implode(', ', $children), ''; + } + + echo ' +
    + ', $board['topics'], ' + + ', $board['posts'], ' + + + ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], '
    + ', $txt[525], ' ', $board['last_post']['member']['link'], ' +
    +
    +
    '; + } + + if (!empty($options['show_board_desc']) && $context['description'] != '') + { + echo ' + + + + +
    + ', $context['description'], ' +
    '; + } + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5']) . '' : '', '', theme_show_buttons(), '
    +
    '; + + // If Quick Moderation is enabled (and set to checkboxes - 1) start the form. + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' +
    '; + + echo ' + + '; + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + if (!empty($options['display_quick_mod'])) + echo ' + '; + } + else + echo ' + '; + echo ' + '; + + foreach ($context['topics'] as $topic) + { + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + echo ''; + } + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + echo ''; + } + echo ' + + + + + + + + '; + + // Show the quick moderation options? + if (!empty($options['display_quick_mod'])) + { + echo ' + '; + } + echo ' + '; + } + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + { + echo ' + + + '; + } + + echo ' +
    '; + $first_topic = current($context['topics']); + echo $first_topic['is_sticky'] ? $txt['sticky_topics'] : '' ,'', $txt[70], $context['sort_by'] == 'subject' ? ' ' : '', '', $txt[109], $context['sort_by'] == 'starter' ? ' ' : '', '', $txt[110], $context['sort_by'] == 'replies' ? ' ' : '', '', $txt[301], $context['sort_by'] == 'views' ? ' ' : '', '', $txt[111], $context['sort_by'] == 'last_post' ? ' ' : '', '', $options['display_quick_mod'] != 1 ? ' ' : ' + + ', '', $txt[151], '
     ', $txt['non_sticky_topics'], '
     ', $txt['non_sticky_topics'], '
    + + + ' . $topic['first_post']['link'] . ' ' . ($topic['new'] && $context['user']['is_logged'] ? '' . $txt[302] . '' : '') . ' ' . $topic['pages'] . ' + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['replies'] . ' + ' . $topic['views'] . ' + ' . $topic['last_post']['time'] . '
    ' . $txt[525] . ' ' . $topic['last_post']['member']['link'] . '
    '; + if ($options['display_quick_mod'] == 1 && ($topic['quick_mod']['remove'] || $topic['quick_mod']['lock'] || $topic['quick_mod']['sticky'] || $topic['quick_mod']['move'])) + echo ' + '; + else + { + if ($topic['quick_mod']['remove']) + echo '', $txt[63], ''; + if ($topic['quick_mod']['lock']) + echo '', $txt['smf279'], ''; + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) + echo '
    '; + if ($topic['quick_mod']['sticky']) + echo '', $txt['smf277'], ''; + if ($topic['quick_mod']['move']) + echo '', $txt[132], ''; + } + echo '
    + '; + if ($context['can_move']) + { + echo ' + '; + } + echo ' + +
    '; + + // Finish off the form - again, if Quick Moderation is being done with checkboxes. (1) + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' + +
    '; + + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : '', '', theme_show_buttons(), '
    +
    +'; + if ($settings['linktree_inline']) + echo ' + + + '; + echo ' + + + + + +
    ', theme_linktree(), '

    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    +
    + : +   + +
    +
    '; +} + +function theme_show_buttons() +{ + global $context, $settings, $options, $txt, $scripturl; + + $buttonArray = array(); + + // If they are logged in, and the mark read buttons are enabled.. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[300] . '' : $txt[300]) . ''; + + // If the user has permission to show the notification button... ask them if they're sure, though. + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Are they allowed to post new topics? + if ($context['can_post_new']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[33] . '' : $txt[33]) . ''; + + // How about new polls, can the user post those? + if ($context['can_post_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf20'] . '' : $txt['smf20']) . ''; + + return implode($context['menu_separator'], $buttonArray); +} + +?> \ No newline at end of file diff --git a/Themes/classic/MessageIndex.template.php~ b/Themes/classic/MessageIndex.template.php~ new file mode 100644 index 0000000..24ca6e7 --- /dev/null +++ b/Themes/classic/MessageIndex.template.php~ @@ -0,0 +1,329 @@ + + + ', theme_linktree(), ''; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], ''; + } + echo ' + +'; + + if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) + { + echo ' + + + + + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + + + '; + } + echo ' +
    ', $txt[20], '', $txt[330], '', $txt[21], '', $txt[22], '
    ', $board['new'] ? '' . $txt[333] . '' : '' . $txt[334] . '', ' + + ' . $board['link'] . '
    + ' . $board['description']; + + if (!empty($board['moderators'])) + echo '
    + ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), ''; + + if (!empty($board['children'])) + { + $children = array(); + foreach ($board['children'] as $child) + { + if ($child['new']) + $children[] = '' . $child['link'] . ''; + else + $children[] = $child['link']; + } + + echo ' +
    +
    ', $txt['parent_boards'], ': ', implode(', ', $children), ''; + } + + echo ' +
    + ', $board['topics'], ' + + ', $board['posts'], ' + + + ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], '
    + ', $txt[525], ' ', $board['last_post']['member']['link'], ' +
    +
    +
    '; + } + + if (!empty($options['show_board_desc']) && $context['description'] != '') + { + echo ' + + + + +
    + ', $context['description'], ' +
    '; + } + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5']) . '' : '', '', theme_show_buttons(), '
    +
    '; + + // If Quick Moderation is enabled (and set to checkboxes - 1) start the form. + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' +
    '; + + echo ' + + '; + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + if (!empty($options['display_quick_mod'])) + echo ' + '; + } + else + echo ' + '; + echo ' + '; + + foreach ($context['topics'] as $topic) + { + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + echo ''; + } + echo ' + + + + + + + + '; + + // Show the quick moderation options? + if (!empty($options['display_quick_mod'])) + { + echo ' + '; + } + echo ' + '; + } + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + { + echo ' + + + '; + } + + echo ' +
    '; + $first_topic = current($context['topics']); + echo $first_topic['is_sticky'] ? $txt['sticky_topics'] : '' ,'', $txt[70], $context['sort_by'] == 'subject' ? ' ' : '', '', $txt[109], $context['sort_by'] == 'starter' ? ' ' : '', '', $txt[110], $context['sort_by'] == 'replies' ? ' ' : '', '', $txt[301], $context['sort_by'] == 'views' ? ' ' : '', '', $txt[111], $context['sort_by'] == 'last_post' ? ' ' : '', '', $options['display_quick_mod'] != 1 ? ' ' : ' + + ', '', $txt[151], '
     ', $txt['non_sticky_topics'], '
    + + + ' . $topic['first_post']['link'] . ' ' . ($topic['new'] && $context['user']['is_logged'] ? '' . $txt[302] . '' : '') . ' ' . $topic['pages'] . ' + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['replies'] . ' + ' . $topic['views'] . ' + ' . $topic['last_post']['time'] . '
    ' . $txt[525] . ' ' . $topic['last_post']['member']['link'] . '
    '; + if ($options['display_quick_mod'] == 1 && ($topic['quick_mod']['remove'] || $topic['quick_mod']['lock'] || $topic['quick_mod']['sticky'] || $topic['quick_mod']['move'])) + echo ' + '; + else + { + if ($topic['quick_mod']['remove']) + echo '', $txt[63], ''; + if ($topic['quick_mod']['lock']) + echo '', $txt['smf279'], ''; + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) + echo '
    '; + if ($topic['quick_mod']['sticky']) + echo '', $txt['smf277'], ''; + if ($topic['quick_mod']['move']) + echo '', $txt[132], ''; + } + echo '
    + '; + if ($context['can_move']) + { + echo ' + '; + } + echo ' + +
    '; + + // Finish off the form - again, if Quick Moderation is being done with checkboxes. (1) + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' + +
    '; + + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : '', '', theme_show_buttons(), '
    +
    +'; + if ($settings['linktree_inline']) + echo ' + + + '; + echo ' + + + + + +
    ', theme_linktree(), '

    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    +
    + : +   + +
    +
    '; +} + +function theme_show_buttons() +{ + global $context, $settings, $options, $txt, $scripturl; + + $buttonArray = array(); + + // If they are logged in, and the mark read buttons are enabled.. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[300] . '' : $txt[300]) . ''; + + // If the user has permission to show the notification button... ask them if they're sure, though. + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Are they allowed to post new topics? + if ($context['can_post_new']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[33] . '' : $txt[33]) . ''; + + // How about new polls, can the user post those? + if ($context['can_post_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf20'] . '' : $txt['smf20']) . ''; + + return implode($context['menu_separator'], $buttonArray); +} + +?> \ No newline at end of file diff --git a/Themes/classic/Post.template.php b/Themes/classic/Post.template.php new file mode 100644 index 0000000..9471396 --- /dev/null +++ b/Themes/classic/Post.template.php @@ -0,0 +1,783 @@ +'; + + echo ' + + +
    + + + + +
    + ', theme_linktree(), ' +
    '; + + if (isset($context['preview_message'])) + echo ' + + + + + + + + +
    ' . $context['preview_subject'] . '
    + ' . $context['preview_message'] . ' +

    '; + + if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) + echo ' + '; + + echo ' + + + + + + + +
    ' . $context['page_title'] . '
    ' . (isset($context['current_topic']) ? ' + ' : '') . ' + '; + + // If an error occurred, explain what happened. + if (!empty($context['post_error']['messages'])) + { + echo ' + + + + '; + } + + // If it's locked, show a message to warn the replyer. + if ($context['locked']) + echo ' + + + + '; + + // Guests have to put in their name and email... + if (isset($context['name']) && isset($context['email'])) + echo ' + + + + + + + + '; + + if ($context['make_event']) + { + echo ' + + + + + + + '; + + if ($context['event']['new'] && !empty($modSettings['cal_allowspan'])) + { + echo ' + + + + '; + } + + if ($context['event']['new'] && $context['is_new_topic']) + { + echo ' + + + + '; + } + } + + echo ' + + + + + + + + '; + if ($context['make_poll']) + { + echo ' + + + + + + + + + + + + + + + + + + + + '; + } + + theme_postbox($context['message']); + + if (isset($context['last_modified'])) + echo ' + + + + '; + + if (!empty($settings['additional_options_collapsable'])) + echo ' + + + '; + echo ' + + + + '; + + if (!empty($context['current_attachments'])) + { + echo ' + + + + '; + } + if ($context['can_post_attachment']) + echo ' + + + + '; + + echo ' + + + + + + +
    + ', $context['error_type'] == 'serious' ? '' . $txt['error_while_submitting'] . '' : '', ' +
    + ', implode('
    ', $context['post_error']['messages']), ' +
    +
    + ', $txt['smf287'], ' +
    + ', $txt[68], ': + + +
    + ', $txt[69], ': + + +
    ', $txt['calendar12'], '
    + ', $txt['calendar10'], '  +   + ', $txt['calendar9'], '  +   + ', $txt['calendar11'], '  + +
    ', $txt['calendar54'], ' + +
    ', $txt['calendar13'], ' + +
    + ' . $txt[70] . ': + + +
    + ' . $txt[71] . ': + + + +
    + ' . $txt['smf21'] . ': + + +
    '; + + // Loop through all the choices and print them out. + foreach ($context['choices'] as $choice) + { + echo ' + : '; + + if (!$choice['is_last']) + echo '
    '; + } + + echo ' + (', $txt['poll_add_option'], ') +
    ', $txt['poll_options'], ': ', $txt['poll_options5'], '
    ', $txt['poll_options1a'], ' ', $txt['poll_options1b'], '
    + ', $txt['poll_options2'], '
    + ', $txt['poll_options3'], '
    + ', $txt['poll_options4'], '
    +
    +
    + ' . $txt[211] . ': + + ' . $context['last_modified'] . ' +
    + + ', $txt['post_additionalopt'], ' +
    +
    + + + + + + + + + + + ', ' + + ', $context['can_announce'] && $context['is_first_post'] ? ' + + + + ' : '', ' +
    ', $context['can_notify'] ? ' ' . $txt['smf14'] : '', '', $context['can_lock'] ? ' ' . $txt['smf15'] : '', '
    ' . $txt['back_to_topic'] . '', $context['can_sticky'] ? ' ' . $txt['sticky_after2'] : '', '
    ' . $txt[277] . '', $context['can_move'] ? ' ' . $txt['move_after2'] : '', '
    +
    +
    + ' . $txt['smf119b'] . ': + + + ', $txt['smf130'], ':
    '; + foreach ($context['current_attachments'] as $attachment) + echo ' + ' . $attachment['name'] . '
    '; + echo ' +
    +
    + ' . $txt['smf119'] . ': + + ' . ($context['attached'] != '' ? $txt['attach_preview'] . ': ' . $context['attached'] . '
    ' : '') . ' +
    +
    + ' . (!empty($modSettings['attachmentCheckExtensions']) ? $txt['smf120'] . ': ' . $context['allowed_extensions'] . '
    ' : '') . ' + ' . $txt['smf121'] . ': ' . $modSettings['attachmentSizeLimit'] . ' ' . $txt['smf211'] . ' + +
    '; + if (!empty($settings['additional_options_collapsable']) && empty($context['attached'])) + echo ' + '; + echo ' +
    ' . $txt['smf16'] . '

    + + '; + + if ($context['make_event'] && !$context['event']['new']) + echo ' + '; + + if ($context['show_spellchecking']) + echo ' + '; + + echo ' +
    +
    '; + + // Assuming this isn't a new topic pass across the number of replies when the topic was created. + if (isset($context['num_replies'])) + echo ' + '; + + echo ' + + +
    '; + + if ($context['show_spellchecking']) + echo ' +
    '; + + if (isset($context['previous_posts']) && count($context['previous_posts']) > 0) + { + echo ' +

    + + + + +
    + + + + '; + foreach ($context['previous_posts'] as $post) + echo ' + + + + + + + + '; + echo ' +
    ' . $txt[468] . '
    + ' . $txt[279] . ': ' . $post['poster'] . ' + + ' . $txt[280] . ': ' . $post['time'] . ' +
    + ' . $txt[260] . ' +
    + ' . $post['message'] . ' +
    +
    '; + } +} + +function template_postbox(&$message) +{ + global $context, $settings, $options, $txt; + + if ($context['show_bbc']) + { + echo ' + + + ' . $txt[252] . ': + + '; + + $context['bbc_tags'] = array(); + $context['bbc_tags'][] = array( + 'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]), + 'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]), + 'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]), + 'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]), + array(), + 'glow' => array('code' => 'glow', 'before' => '[glow=red,2,300]', 'after' => '[/glow]', 'description' => $txt[442]), + 'shadow' => array('code' => 'shadow', 'before' => '[shadow=red,left]', 'after' => '[/shadow]', 'description' => $txt[443]), + 'move' => array('code' => 'move', 'before' => '[move]', 'after' => '[/move]', 'description' => $txt[439]), + array(), + 'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]), + 'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]), + 'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]), + 'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]), + array(), + 'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]), + array(), + 'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]), + 'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]), + ); + $context['bbc_tags'][] = array( + 'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]), + 'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]), + 'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]), + 'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]), + 'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]), + array(), + 'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]), + 'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]), + 'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]), + array(), + 'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]), + 'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]), + 'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]), + array(), + 'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $txt[259]), + 'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]), + array(), + 'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]), + ); + + foreach ($context['bbc_tags'] as $i => $row) + { + foreach ($row as $image => $tag) + { + // Is this tag disabled? + if (!empty($tag['code']) && !empty($context['disabled_tags'][$tag['code']])) + continue; + + if (isset($tag['before'])) + echo '' . $tag['description'] . ''; + } + + if ($i != count($context['bbc_tags']) - 1) + echo '
    '; + } + + echo ' + + + '; + } + // Now start printing all of the smileys. + if (!empty($context['smileys']['postform'])) + { + echo ' + + + '; + + // Show each row of smileys ;). + foreach ($context['smileys']['postform'] as $smiley_row) + { + foreach ($smiley_row['smileys'] as $smiley) + echo ' + ', $smiley['description'], ''; + + // If this isn't the last row, show a break. + if (empty($smiley_row['last'])) + echo '
    '; + } + + // If the smileys popup is to be shown... show it! + if (!empty($context['smileys']['popup'])) + echo ' + [', $txt['more_smileys'], ']'; + + echo ' + + '; + } + + // Show an extra link for additional smileys (if there are any). + if (!empty($context['smileys']['popup'])) + { + echo ' + '; + } + + echo ' + + + ' . $txt[72] . ': + + + + + '; +} + +function template_spellcheck() +{ + global $context, $settings, $options, $txt; + + echo ' + + + ', $txt['spell_check'], ' + + + + + + + + + +
    +
     
    + + + +
    + ', $txt['spellcheck_change_to'], '
    + +
    + ', $txt['spellcheck_suggest'], '
    + +
    +
    + + + + +
    +
    + +'; +} + +?> \ No newline at end of file diff --git a/Themes/classic/Recent.template.php b/Themes/classic/Recent.template.php new file mode 100644 index 0000000..1aca5e3 --- /dev/null +++ b/Themes/classic/Recent.template.php @@ -0,0 +1,255 @@ + + + +  ' . $post['counter'] . '  + + +  ' . $post['category']['name'] . ' / ' . $post['board']['name'] . ' / ' . $post['subject'] . ' + + +  ' . $txt[30] . ': ' . $post['time'] . '  + + + + + ' . $txt[109] . ' ' . $post['first_poster']['link'] . ' | ' . $txt[22] . ' ' . $txt[525] . ' ' . $post['poster']['link'] . ' + + + + + ' . $post['message'] . ' + + + + '; + + if ($post['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + if ($post['can_reply'] && $post['can_mark_notify']) + echo ' + ', $context['menu_separator']; + if ($post['can_mark_notify']) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + echo ' + + +
    '; + } + + echo ' + ' . $txt[236] . ' ' . $txt[237] . '
    '; +} + +function template_unread() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + echo ' + + + + +
    ', theme_linktree(), '
    + + +
    + + +
    + + + ', $settings['show_mark_read'] ? ' + ' : '', ' + +
    ' . $txt[139] . ': ' . $context['page_index'] . '' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . '
    +
    + + '; + if (!empty($context['topics'])) + echo ' + + + + + + '; + else + echo ' + '; + echo ' + '; + + foreach ($context['topics'] as $topic) + { + echo ' + + + + + + + + + '; + } + + if (!empty($context['topics']) && !$context['showing_all_topics']) + echo ' + + + '; + + echo ' +
     ' . $txt[70] . '' . $txt[109] . '' . $txt[110] . '' . $txt[301] . '' . $txt[111] . '', $context['showing_all_topics'] ? $txt[151] : $txt['unread_topics_visit_none'], '
    + + + ' . $topic['first_post']['link'] . ' ' . $txt[302] . ' ' . $topic['pages'] . ' +
    ' . $txt['smf88'] . ' ' . $topic['board']['link'] . '
    + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['replies'] . ' + ' . $topic['views'] . ' + ' . $topic['last_post']['time'] . '
    ' . $txt[525] . ' ' . $topic['last_post']['member']['link'] . '
    ', $txt['unread_topics_all'], '
    + + +
    + + + ', $settings['show_mark_read'] ? ' + ' : '', ' + +
    ' . $txt[139] . ': ' . $context['page_index'] . '' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . '
    +
    +
    + + + + + +
    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    '; +} + +function template_replies() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + echo ' + + + + +
    ', theme_linktree(), '
    + + +
    + + +
    + + + + + +
    ' . $txt[139] . ': ' . $context['page_index'] . ''; + if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . ''; + echo ' +
    +
    + + '; + if (!empty($context['topics'])) + echo ' + + + + + + '; + else + echo ' + '; + echo ' + '; + + foreach ($context['topics'] as $topic) + { + echo ' + + + + + + + + + '; + } + + echo ' +
     ' . $txt[70] . '' . $txt[109] . '' . $txt[110] . '' . $txt[301] . '' . $txt[111] . '' . $txt[151] . '
    + + + ' . $topic['first_post']['link'] . ' ' . $txt[302] . ' ' . $topic['pages'] . ' +
    ' . $txt['smf88'] . ' ' . $topic['board']['link'] . '
    + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['replies'] . ' + ' . $topic['views'] . ' + ' . $topic['last_post']['time'] . '
    ' . $txt[525] . ' ' . $topic['last_post']['member']['link'] . '
    + + +
    + + + + + +
    ' . $txt[139] . ': ' . $context['page_index'] . ''; + if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . ''; + echo ' +
    +
    +
    + + + + + +
    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/classic/Search.template.php b/Themes/classic/Search.template.php new file mode 100644 index 0000000..bd03f8d --- /dev/null +++ b/Themes/classic/Search.template.php @@ -0,0 +1,346 @@ + +
    + + + + +
    ', theme_linktree(), '
    + + + + + + + +
    ' . $txt[183] . '
    '; + + if ($context['simple_search']) + { + echo ' + ' . $txt[582] . ':
    +   +
    + ' . $txt['smf298'] . ' + '; + } + else + { + echo ' + + + + + + + + + + + + + + + + + + + + + + + +
    + ', $txt[582], ': + + ', $txt[583], ': +
    + + +     + +   +
     
    ', $txt['search_options'], ':', $txt['search_post_age'], ':
    +
    + +
    + ', $txt['search_between'], '  ', $txt['search_and'], '  ', $txt[579], '. +
     
    ', $txt['search_order'], ': 
    + +  
    +

    + ', $txt[189], ':

    + '; + + $temp_boards = array(); + foreach ($context['categories'] as $category) + { + $temp_boards[] = array( + 'name' => $category['name'] + ); + $temp_boards = array_merge($temp_boards, array_values($category['boards'])); + } + + $max_boards = ceil(count($temp_boards) / 2); + if ($max_boards < 2) + $max_boards = 2; + for ($i = 0; $i < $max_boards; $i++) + { + echo ' + + '; + if (isset($temp_boards[$i + $max_boards])) + { + echo ' + '; + } + echo ' + '; + } + + echo ' +
    '; + if (isset($temp_boards[$i]['id'])) + echo ' + ', str_repeat('  ', $temp_boards[$i]['child_level']), ' + '; + else + echo '', $temp_boards[$i]['name'], ''; + echo ' + '; + if (isset($temp_boards[$i + $max_boards]['id'])) + echo ' + ', str_repeat('  ', $temp_boards[$i + $max_boards]['child_level']), ' + '; + else + echo '', $temp_boards[$i + $max_boards]['name'], ''; + echo ' +

    + +
    +
    + + + + +
    + +
    '; + } + echo ' +
    +
    '; +} + +function template_results() +{ + global $context, $settings, $options, $txt, $scripturl; + + if ($context['compact']) + { + echo ' +', theme_linktree(), ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    + + '; + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + } + else + echo ' + '; + echo ' + '; + + while ($topic = $context['get_topics']()) + { + echo ' + + + + + + + '; + } + echo ' +
    ', $txt[70], '', $txt[109], '', $txt['search_relevance'], '', $txt['search_date_posted'], '', $txt['search_no_results'], '
    + + + ' . $topic['first_post']['link'] . ' +
    ' . $txt['smf88'] . ' ' . $topic['board']['link'] . '
    '; + + foreach ($topic['matches'] as $message) + { + echo ' +
    +
    ' . $message['subject_highlighted'] . ' ', $txt[525], ' ' . $message['member']['link'] . '
    '; + + if ($message['body_highlighted'] != '') + echo ' +
    ' . $message['body_highlighted'] . '
    '; + } + + echo ' +
    + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['relevance'] . ' + ' . $topic['first_post']['time'] . '
    + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], ' 
    +
    +'; + if ($settings['linktree_inline']) + echo ' + + + '; + echo ' + + + +
    ', theme_linktree(), '

    +
    +   + +
    +
    '; + } + else + { + echo ' + ', theme_linktree(), ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    +
    '; + if (empty($context['topics'])) + echo ' +
    +

    + (', $txt['search_no_results'], ')

    +
    +
    '; + + while ($topic = $context['get_topics']()) + { + foreach ($topic['matches'] as $message) + { + // Create buttons row. + $buttonArray = array(); + if ($topic['can_reply']) + { + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]) . ''; + } + if ($topic['can_mark_notify'] && $context['user']['is_logged']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + echo ' + + + + +
    + + + + + + + + + + + + + +
     ', $message['counter'], '   + ', $topic['category']['name'], ' / + ', $topic['board']['name'], ' / + ', $message['subject_highlighted'], ' +  ', $txt[30], ': ', $message['time'], ' 
    ', $txt[109], ' ', $topic['first_post']['member']['link'], ', ', $txt[72], ' ', $txt[525], ' ', $message['member']['link'], '', $txt['search_relevance'], ': ', $topic['relevance'], '
    ', $message['body_highlighted'], '
    +  ', implode($context['menu_separator'], $buttonArray), '
    +

    '; + } + } + + echo ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    '; + if ($settings['linktree_inline']) + echo theme_linktree(); + } +} + +?> \ No newline at end of file diff --git a/Themes/classic/images/Female.gif b/Themes/classic/images/Female.gif new file mode 100644 index 0000000..321f2c9 Binary files /dev/null and b/Themes/classic/images/Female.gif differ diff --git a/Themes/classic/images/Male.gif b/Themes/classic/images/Male.gif new file mode 100644 index 0000000..bc98e06 Binary files /dev/null and b/Themes/classic/images/Male.gif differ diff --git a/Themes/classic/images/aim.gif b/Themes/classic/images/aim.gif new file mode 100644 index 0000000..fa09556 Binary files /dev/null and b/Themes/classic/images/aim.gif differ diff --git a/Themes/classic/images/bar.gif b/Themes/classic/images/bar.gif new file mode 100644 index 0000000..3ba459c Binary files /dev/null and b/Themes/classic/images/bar.gif differ diff --git a/Themes/classic/images/bbc/bold.gif b/Themes/classic/images/bbc/bold.gif new file mode 100644 index 0000000..4a928cf Binary files /dev/null and b/Themes/classic/images/bbc/bold.gif differ diff --git a/Themes/classic/images/bbc/center.gif b/Themes/classic/images/bbc/center.gif new file mode 100644 index 0000000..c26d37c Binary files /dev/null and b/Themes/classic/images/bbc/center.gif differ diff --git a/Themes/classic/images/bbc/code.gif b/Themes/classic/images/bbc/code.gif new file mode 100644 index 0000000..1ed9392 Binary files /dev/null and b/Themes/classic/images/bbc/code.gif differ diff --git a/Themes/classic/images/bbc/email.gif b/Themes/classic/images/bbc/email.gif new file mode 100644 index 0000000..001a05e Binary files /dev/null and b/Themes/classic/images/bbc/email.gif differ diff --git a/Themes/classic/images/bbc/face.gif b/Themes/classic/images/bbc/face.gif new file mode 100644 index 0000000..f864314 Binary files /dev/null and b/Themes/classic/images/bbc/face.gif differ diff --git a/Themes/classic/images/bbc/flash.gif b/Themes/classic/images/bbc/flash.gif new file mode 100644 index 0000000..b477d1f Binary files /dev/null and b/Themes/classic/images/bbc/flash.gif differ diff --git a/Themes/classic/images/bbc/ftp.gif b/Themes/classic/images/bbc/ftp.gif new file mode 100644 index 0000000..04bad7e Binary files /dev/null and b/Themes/classic/images/bbc/ftp.gif differ diff --git a/Themes/classic/images/bbc/glow.gif b/Themes/classic/images/bbc/glow.gif new file mode 100644 index 0000000..4e35a53 Binary files /dev/null and b/Themes/classic/images/bbc/glow.gif differ diff --git a/Themes/classic/images/bbc/hr.gif b/Themes/classic/images/bbc/hr.gif new file mode 100644 index 0000000..4299492 Binary files /dev/null and b/Themes/classic/images/bbc/hr.gif differ diff --git a/Themes/classic/images/bbc/img.gif b/Themes/classic/images/bbc/img.gif new file mode 100644 index 0000000..8ab4877 Binary files /dev/null and b/Themes/classic/images/bbc/img.gif differ diff --git a/Themes/classic/images/bbc/italicize.gif b/Themes/classic/images/bbc/italicize.gif new file mode 100644 index 0000000..b47e252 Binary files /dev/null and b/Themes/classic/images/bbc/italicize.gif differ diff --git a/Themes/classic/images/bbc/left.gif b/Themes/classic/images/bbc/left.gif new file mode 100644 index 0000000..493e952 Binary files /dev/null and b/Themes/classic/images/bbc/left.gif differ diff --git a/Themes/classic/images/bbc/list.gif b/Themes/classic/images/bbc/list.gif new file mode 100644 index 0000000..eeaa495 Binary files /dev/null and b/Themes/classic/images/bbc/list.gif differ diff --git a/Themes/classic/images/bbc/move.gif b/Themes/classic/images/bbc/move.gif new file mode 100644 index 0000000..f38f9b5 Binary files /dev/null and b/Themes/classic/images/bbc/move.gif differ diff --git a/Themes/classic/images/bbc/pre.gif b/Themes/classic/images/bbc/pre.gif new file mode 100644 index 0000000..1b64a19 Binary files /dev/null and b/Themes/classic/images/bbc/pre.gif differ diff --git a/Themes/classic/images/bbc/quote.gif b/Themes/classic/images/bbc/quote.gif new file mode 100644 index 0000000..d91d13d Binary files /dev/null and b/Themes/classic/images/bbc/quote.gif differ diff --git a/Themes/classic/images/bbc/right.gif b/Themes/classic/images/bbc/right.gif new file mode 100644 index 0000000..c869cef Binary files /dev/null and b/Themes/classic/images/bbc/right.gif differ diff --git a/Themes/classic/images/bbc/shadow.gif b/Themes/classic/images/bbc/shadow.gif new file mode 100644 index 0000000..e20a57e Binary files /dev/null and b/Themes/classic/images/bbc/shadow.gif differ diff --git a/Themes/classic/images/bbc/size.gif b/Themes/classic/images/bbc/size.gif new file mode 100644 index 0000000..172f757 Binary files /dev/null and b/Themes/classic/images/bbc/size.gif differ diff --git a/Themes/classic/images/bbc/strike.gif b/Themes/classic/images/bbc/strike.gif new file mode 100644 index 0000000..a5763ef Binary files /dev/null and b/Themes/classic/images/bbc/strike.gif differ diff --git a/Themes/classic/images/bbc/sub.gif b/Themes/classic/images/bbc/sub.gif new file mode 100644 index 0000000..adcffe1 Binary files /dev/null and b/Themes/classic/images/bbc/sub.gif differ diff --git a/Themes/classic/images/bbc/sup.gif b/Themes/classic/images/bbc/sup.gif new file mode 100644 index 0000000..c19fbfb Binary files /dev/null and b/Themes/classic/images/bbc/sup.gif differ diff --git a/Themes/classic/images/bbc/table.gif b/Themes/classic/images/bbc/table.gif new file mode 100644 index 0000000..879bbc9 Binary files /dev/null and b/Themes/classic/images/bbc/table.gif differ diff --git a/Themes/classic/images/bbc/td.gif b/Themes/classic/images/bbc/td.gif new file mode 100644 index 0000000..921923d Binary files /dev/null and b/Themes/classic/images/bbc/td.gif differ diff --git a/Themes/classic/images/bbc/tele.gif b/Themes/classic/images/bbc/tele.gif new file mode 100644 index 0000000..5d14749 Binary files /dev/null and b/Themes/classic/images/bbc/tele.gif differ diff --git a/Themes/classic/images/bbc/tr.gif b/Themes/classic/images/bbc/tr.gif new file mode 100644 index 0000000..ae5e710 Binary files /dev/null and b/Themes/classic/images/bbc/tr.gif differ diff --git a/Themes/classic/images/bbc/underline.gif b/Themes/classic/images/bbc/underline.gif new file mode 100644 index 0000000..0a0dd86 Binary files /dev/null and b/Themes/classic/images/bbc/underline.gif differ diff --git a/Themes/classic/images/bbc/url.gif b/Themes/classic/images/bbc/url.gif new file mode 100644 index 0000000..c81f294 Binary files /dev/null and b/Themes/classic/images/bbc/url.gif differ diff --git a/Themes/classic/images/bdaycake.gif b/Themes/classic/images/bdaycake.gif new file mode 100644 index 0000000..06951dd Binary files /dev/null and b/Themes/classic/images/bdaycake.gif differ diff --git a/Themes/classic/images/blank.gif b/Themes/classic/images/blank.gif new file mode 100644 index 0000000..5bfd67a Binary files /dev/null and b/Themes/classic/images/blank.gif differ diff --git a/Themes/classic/images/board.gif b/Themes/classic/images/board.gif new file mode 100644 index 0000000..b3bc440 Binary files /dev/null and b/Themes/classic/images/board.gif differ diff --git a/Themes/classic/images/catbg.gif b/Themes/classic/images/catbg.gif new file mode 100644 index 0000000..fb21d8e Binary files /dev/null and b/Themes/classic/images/catbg.gif differ diff --git a/Themes/classic/images/catbg.jpg b/Themes/classic/images/catbg.jpg new file mode 100644 index 0000000..60631d9 Binary files /dev/null and b/Themes/classic/images/catbg.jpg differ diff --git a/Themes/classic/images/collapse.gif b/Themes/classic/images/collapse.gif new file mode 100644 index 0000000..e2c321f Binary files /dev/null and b/Themes/classic/images/collapse.gif differ diff --git a/Themes/classic/images/construction.gif b/Themes/classic/images/construction.gif new file mode 100644 index 0000000..38a9bb9 Binary files /dev/null and b/Themes/classic/images/construction.gif differ diff --git a/Themes/classic/images/email_sm.gif b/Themes/classic/images/email_sm.gif new file mode 100644 index 0000000..86a7524 Binary files /dev/null and b/Themes/classic/images/email_sm.gif differ diff --git a/Themes/classic/images/english/addpoll.gif b/Themes/classic/images/english/addpoll.gif new file mode 100644 index 0000000..825a25c Binary files /dev/null and b/Themes/classic/images/english/addpoll.gif differ diff --git a/Themes/classic/images/english/admin.gif b/Themes/classic/images/english/admin.gif new file mode 100644 index 0000000..c1b42ae Binary files /dev/null and b/Themes/classic/images/english/admin.gif differ diff --git a/Themes/classic/images/english/admin_lock.gif b/Themes/classic/images/english/admin_lock.gif new file mode 100644 index 0000000..94c0a17 Binary files /dev/null and b/Themes/classic/images/english/admin_lock.gif differ diff --git a/Themes/classic/images/english/admin_move.gif b/Themes/classic/images/english/admin_move.gif new file mode 100644 index 0000000..3158e49 Binary files /dev/null and b/Themes/classic/images/english/admin_move.gif differ diff --git a/Themes/classic/images/english/admin_rem.gif b/Themes/classic/images/english/admin_rem.gif new file mode 100644 index 0000000..91c6973 Binary files /dev/null and b/Themes/classic/images/english/admin_rem.gif differ diff --git a/Themes/classic/images/english/admin_remove_poll.gif b/Themes/classic/images/english/admin_remove_poll.gif new file mode 100644 index 0000000..ae2f15b Binary files /dev/null and b/Themes/classic/images/english/admin_remove_poll.gif differ diff --git a/Themes/classic/images/english/admin_sticky.gif b/Themes/classic/images/english/admin_sticky.gif new file mode 100644 index 0000000..f63060c Binary files /dev/null and b/Themes/classic/images/english/admin_sticky.gif differ diff --git a/Themes/classic/images/english/calendar.gif b/Themes/classic/images/english/calendar.gif new file mode 100644 index 0000000..f4c5e0a Binary files /dev/null and b/Themes/classic/images/english/calendar.gif differ diff --git a/Themes/classic/images/english/calendarpe.gif b/Themes/classic/images/english/calendarpe.gif new file mode 100644 index 0000000..850bb56 Binary files /dev/null and b/Themes/classic/images/english/calendarpe.gif differ diff --git a/Themes/classic/images/english/delete.gif b/Themes/classic/images/english/delete.gif new file mode 100644 index 0000000..8d6c4d0 Binary files /dev/null and b/Themes/classic/images/english/delete.gif differ diff --git a/Themes/classic/images/english/delete_selected.gif b/Themes/classic/images/english/delete_selected.gif new file mode 100644 index 0000000..c958010 Binary files /dev/null and b/Themes/classic/images/english/delete_selected.gif differ diff --git a/Themes/classic/images/english/email.gif b/Themes/classic/images/english/email.gif new file mode 100644 index 0000000..8b280b8 Binary files /dev/null and b/Themes/classic/images/english/email.gif differ diff --git a/Themes/classic/images/english/go_down.gif b/Themes/classic/images/english/go_down.gif new file mode 100644 index 0000000..f4adb89 Binary files /dev/null and b/Themes/classic/images/english/go_down.gif differ diff --git a/Themes/classic/images/english/go_up.gif b/Themes/classic/images/english/go_up.gif new file mode 100644 index 0000000..9e0c1e8 Binary files /dev/null and b/Themes/classic/images/english/go_up.gif differ diff --git a/Themes/classic/images/english/help.gif b/Themes/classic/images/english/help.gif new file mode 100644 index 0000000..2a10ad3 Binary files /dev/null and b/Themes/classic/images/english/help.gif differ diff --git a/Themes/classic/images/english/home.gif b/Themes/classic/images/english/home.gif new file mode 100644 index 0000000..aa8677b Binary files /dev/null and b/Themes/classic/images/english/home.gif differ diff --git a/Themes/classic/images/english/im_delete.gif b/Themes/classic/images/english/im_delete.gif new file mode 100644 index 0000000..956c22d Binary files /dev/null and b/Themes/classic/images/english/im_delete.gif differ diff --git a/Themes/classic/images/english/im_inbox.gif b/Themes/classic/images/english/im_inbox.gif new file mode 100644 index 0000000..8e745d5 Binary files /dev/null and b/Themes/classic/images/english/im_inbox.gif differ diff --git a/Themes/classic/images/english/im_new.gif b/Themes/classic/images/english/im_new.gif new file mode 100644 index 0000000..bb1867b Binary files /dev/null and b/Themes/classic/images/english/im_new.gif differ diff --git a/Themes/classic/images/english/im_outbox.gif b/Themes/classic/images/english/im_outbox.gif new file mode 100644 index 0000000..c68b99c Binary files /dev/null and b/Themes/classic/images/english/im_outbox.gif differ diff --git a/Themes/classic/images/english/im_reload.gif b/Themes/classic/images/english/im_reload.gif new file mode 100644 index 0000000..f6d2744 Binary files /dev/null and b/Themes/classic/images/english/im_reload.gif differ diff --git a/Themes/classic/images/english/im_reply.gif b/Themes/classic/images/english/im_reply.gif new file mode 100644 index 0000000..aaae943 Binary files /dev/null and b/Themes/classic/images/english/im_reply.gif differ diff --git a/Themes/classic/images/english/linktocal.gif b/Themes/classic/images/english/linktocal.gif new file mode 100644 index 0000000..7d2b5e5 Binary files /dev/null and b/Themes/classic/images/english/linktocal.gif differ diff --git a/Themes/classic/images/english/login.gif b/Themes/classic/images/english/login.gif new file mode 100644 index 0000000..b1cdcfa Binary files /dev/null and b/Themes/classic/images/english/login.gif differ diff --git a/Themes/classic/images/english/logout.gif b/Themes/classic/images/english/logout.gif new file mode 100644 index 0000000..107e7eb Binary files /dev/null and b/Themes/classic/images/english/logout.gif differ diff --git a/Themes/classic/images/english/markread.gif b/Themes/classic/images/english/markread.gif new file mode 100644 index 0000000..4d2b27f Binary files /dev/null and b/Themes/classic/images/english/markread.gif differ diff --git a/Themes/classic/images/english/markunread.gif b/Themes/classic/images/english/markunread.gif new file mode 100644 index 0000000..3694a13 Binary files /dev/null and b/Themes/classic/images/english/markunread.gif differ diff --git a/Themes/classic/images/english/merge.gif b/Themes/classic/images/english/merge.gif new file mode 100644 index 0000000..2610362 Binary files /dev/null and b/Themes/classic/images/english/merge.gif differ diff --git a/Themes/classic/images/english/modify.gif b/Themes/classic/images/english/modify.gif new file mode 100644 index 0000000..54c3bad Binary files /dev/null and b/Themes/classic/images/english/modify.gif differ diff --git a/Themes/classic/images/english/new.gif b/Themes/classic/images/english/new.gif new file mode 100644 index 0000000..7c4aab8 Binary files /dev/null and b/Themes/classic/images/english/new.gif differ diff --git a/Themes/classic/images/english/new_none.gif b/Themes/classic/images/english/new_none.gif new file mode 100644 index 0000000..34182fc Binary files /dev/null and b/Themes/classic/images/english/new_none.gif differ diff --git a/Themes/classic/images/english/new_poll.gif b/Themes/classic/images/english/new_poll.gif new file mode 100644 index 0000000..65d7608 Binary files /dev/null and b/Themes/classic/images/english/new_poll.gif differ diff --git a/Themes/classic/images/english/new_some.gif b/Themes/classic/images/english/new_some.gif new file mode 100644 index 0000000..db13c50 Binary files /dev/null and b/Themes/classic/images/english/new_some.gif differ diff --git a/Themes/classic/images/english/new_topic.gif b/Themes/classic/images/english/new_topic.gif new file mode 100644 index 0000000..a9deb32 Binary files /dev/null and b/Themes/classic/images/english/new_topic.gif differ diff --git a/Themes/classic/images/english/notify.gif b/Themes/classic/images/english/notify.gif new file mode 100644 index 0000000..2e2e2af Binary files /dev/null and b/Themes/classic/images/english/notify.gif differ diff --git a/Themes/classic/images/english/notify_sm.gif b/Themes/classic/images/english/notify_sm.gif new file mode 100644 index 0000000..e402269 Binary files /dev/null and b/Themes/classic/images/english/notify_sm.gif differ diff --git a/Themes/classic/images/english/print.gif b/Themes/classic/images/english/print.gif new file mode 100644 index 0000000..9152007 Binary files /dev/null and b/Themes/classic/images/english/print.gif differ diff --git a/Themes/classic/images/english/profile.gif b/Themes/classic/images/english/profile.gif new file mode 100644 index 0000000..dbefd12 Binary files /dev/null and b/Themes/classic/images/english/profile.gif differ diff --git a/Themes/classic/images/english/quote.gif b/Themes/classic/images/english/quote.gif new file mode 100644 index 0000000..0693fe6 Binary files /dev/null and b/Themes/classic/images/english/quote.gif differ diff --git a/Themes/classic/images/english/register.gif b/Themes/classic/images/english/register.gif new file mode 100644 index 0000000..aa8149e Binary files /dev/null and b/Themes/classic/images/english/register.gif differ diff --git a/Themes/classic/images/english/reply.gif b/Themes/classic/images/english/reply.gif new file mode 100644 index 0000000..bd9a172 Binary files /dev/null and b/Themes/classic/images/english/reply.gif differ diff --git a/Themes/classic/images/english/reply_sm.gif b/Themes/classic/images/english/reply_sm.gif new file mode 100644 index 0000000..b4011e1 Binary files /dev/null and b/Themes/classic/images/english/reply_sm.gif differ diff --git a/Themes/classic/images/english/search.gif b/Themes/classic/images/english/search.gif new file mode 100644 index 0000000..d75802c Binary files /dev/null and b/Themes/classic/images/english/search.gif differ diff --git a/Themes/classic/images/english/sendtopic.gif b/Themes/classic/images/english/sendtopic.gif new file mode 100644 index 0000000..a7461ff Binary files /dev/null and b/Themes/classic/images/english/sendtopic.gif differ diff --git a/Themes/classic/images/english/split.gif b/Themes/classic/images/english/split.gif new file mode 100644 index 0000000..f123565 Binary files /dev/null and b/Themes/classic/images/english/split.gif differ diff --git a/Themes/classic/images/expand.gif b/Themes/classic/images/expand.gif new file mode 100644 index 0000000..52f3db4 Binary files /dev/null and b/Themes/classic/images/expand.gif differ diff --git a/Themes/classic/images/filter.gif b/Themes/classic/images/filter.gif new file mode 100644 index 0000000..b5aa23d Binary files /dev/null and b/Themes/classic/images/filter.gif differ diff --git a/Themes/classic/images/helplogo.gif b/Themes/classic/images/helplogo.gif new file mode 100644 index 0000000..fe4143e Binary files /dev/null and b/Themes/classic/images/helplogo.gif differ diff --git a/Themes/classic/images/helptopics.gif b/Themes/classic/images/helptopics.gif new file mode 100644 index 0000000..906ff47 Binary files /dev/null and b/Themes/classic/images/helptopics.gif differ diff --git a/Themes/classic/images/icons/assist.gif b/Themes/classic/images/icons/assist.gif new file mode 100644 index 0000000..84289cd Binary files /dev/null and b/Themes/classic/images/icons/assist.gif differ diff --git a/Themes/classic/images/icons/bullet_grin.gif b/Themes/classic/images/icons/bullet_grin.gif new file mode 100644 index 0000000..6c62a83 Binary files /dev/null and b/Themes/classic/images/icons/bullet_grin.gif differ diff --git a/Themes/classic/images/icons/calendar.gif b/Themes/classic/images/icons/calendar.gif new file mode 100644 index 0000000..482326e Binary files /dev/null and b/Themes/classic/images/icons/calendar.gif differ diff --git a/Themes/classic/images/icons/clip.gif b/Themes/classic/images/icons/clip.gif new file mode 100644 index 0000000..a9633c2 Binary files /dev/null and b/Themes/classic/images/icons/clip.gif differ diff --git a/Themes/classic/images/icons/config_sm.gif b/Themes/classic/images/icons/config_sm.gif new file mode 100644 index 0000000..4a81984 Binary files /dev/null and b/Themes/classic/images/icons/config_sm.gif differ diff --git a/Themes/classic/images/icons/delete.gif b/Themes/classic/images/icons/delete.gif new file mode 100644 index 0000000..5d1aeec Binary files /dev/null and b/Themes/classic/images/icons/delete.gif differ diff --git a/Themes/classic/images/icons/folder_open.gif b/Themes/classic/images/icons/folder_open.gif new file mode 100644 index 0000000..53942f7 Binary files /dev/null and b/Themes/classic/images/icons/folder_open.gif differ diff --git a/Themes/classic/images/icons/im_newmsg.gif b/Themes/classic/images/icons/im_newmsg.gif new file mode 100644 index 0000000..e3de228 Binary files /dev/null and b/Themes/classic/images/icons/im_newmsg.gif differ diff --git a/Themes/classic/images/icons/info.gif b/Themes/classic/images/icons/info.gif new file mode 100644 index 0000000..21b08be Binary files /dev/null and b/Themes/classic/images/icons/info.gif differ diff --git a/Themes/classic/images/icons/linktree_main.gif b/Themes/classic/images/icons/linktree_main.gif new file mode 100644 index 0000000..988f0c3 Binary files /dev/null and b/Themes/classic/images/icons/linktree_main.gif differ diff --git a/Themes/classic/images/icons/linktree_side.gif b/Themes/classic/images/icons/linktree_side.gif new file mode 100644 index 0000000..a54a031 Binary files /dev/null and b/Themes/classic/images/icons/linktree_side.gif differ diff --git a/Themes/classic/images/icons/login.gif b/Themes/classic/images/icons/login.gif new file mode 100644 index 0000000..db7b987 Binary files /dev/null and b/Themes/classic/images/icons/login.gif differ diff --git a/Themes/classic/images/icons/login_sm.gif b/Themes/classic/images/icons/login_sm.gif new file mode 100644 index 0000000..5da1e73 Binary files /dev/null and b/Themes/classic/images/icons/login_sm.gif differ diff --git a/Themes/classic/images/icons/members.gif b/Themes/classic/images/icons/members.gif new file mode 100644 index 0000000..8ecbd63 Binary files /dev/null and b/Themes/classic/images/icons/members.gif differ diff --git a/Themes/classic/images/icons/notify_sm.gif b/Themes/classic/images/icons/notify_sm.gif new file mode 100644 index 0000000..81b35c2 Binary files /dev/null and b/Themes/classic/images/icons/notify_sm.gif differ diff --git a/Themes/classic/images/icons/online.gif b/Themes/classic/images/icons/online.gif new file mode 100644 index 0000000..5684323 Binary files /dev/null and b/Themes/classic/images/icons/online.gif differ diff --git a/Themes/classic/images/icons/package_installed.gif b/Themes/classic/images/icons/package_installed.gif new file mode 100644 index 0000000..b569525 Binary files /dev/null and b/Themes/classic/images/icons/package_installed.gif differ diff --git a/Themes/classic/images/icons/package_old.gif b/Themes/classic/images/icons/package_old.gif new file mode 100644 index 0000000..d7ef52c Binary files /dev/null and b/Themes/classic/images/icons/package_old.gif differ diff --git a/Themes/classic/images/icons/profile_sm.gif b/Themes/classic/images/icons/profile_sm.gif new file mode 100644 index 0000000..c8903f6 Binary files /dev/null and b/Themes/classic/images/icons/profile_sm.gif differ diff --git a/Themes/classic/images/icons/quick_lock.gif b/Themes/classic/images/icons/quick_lock.gif new file mode 100644 index 0000000..6afbc91 Binary files /dev/null and b/Themes/classic/images/icons/quick_lock.gif differ diff --git a/Themes/classic/images/icons/quick_move.gif b/Themes/classic/images/icons/quick_move.gif new file mode 100644 index 0000000..310baef Binary files /dev/null and b/Themes/classic/images/icons/quick_move.gif differ diff --git a/Themes/classic/images/icons/quick_remove.gif b/Themes/classic/images/icons/quick_remove.gif new file mode 100644 index 0000000..d7546b1 Binary files /dev/null and b/Themes/classic/images/icons/quick_remove.gif differ diff --git a/Themes/classic/images/icons/quick_sticky.gif b/Themes/classic/images/icons/quick_sticky.gif new file mode 100644 index 0000000..2d51954 Binary files /dev/null and b/Themes/classic/images/icons/quick_sticky.gif differ diff --git a/Themes/classic/images/icq.gif b/Themes/classic/images/icq.gif new file mode 100644 index 0000000..6ec3d98 Binary files /dev/null and b/Themes/classic/images/icq.gif differ diff --git a/Themes/classic/images/im_off.gif b/Themes/classic/images/im_off.gif new file mode 100644 index 0000000..4f14150 Binary files /dev/null and b/Themes/classic/images/im_off.gif differ diff --git a/Themes/classic/images/im_on.gif b/Themes/classic/images/im_on.gif new file mode 100644 index 0000000..5b1d4c3 Binary files /dev/null and b/Themes/classic/images/im_on.gif differ diff --git a/Themes/classic/images/im_sm_newmsg.gif b/Themes/classic/images/im_sm_newmsg.gif new file mode 100644 index 0000000..e3de228 Binary files /dev/null and b/Themes/classic/images/im_sm_newmsg.gif differ diff --git a/Themes/classic/images/im_sm_prefs.gif b/Themes/classic/images/im_sm_prefs.gif new file mode 100644 index 0000000..304639e Binary files /dev/null and b/Themes/classic/images/im_sm_prefs.gif differ diff --git a/Themes/classic/images/ip.gif b/Themes/classic/images/ip.gif new file mode 100644 index 0000000..c79d2da Binary files /dev/null and b/Themes/classic/images/ip.gif differ diff --git a/Themes/classic/images/message_sm.gif b/Themes/classic/images/message_sm.gif new file mode 100644 index 0000000..0e5f36a Binary files /dev/null and b/Themes/classic/images/message_sm.gif differ diff --git a/Themes/classic/images/msntalk.gif b/Themes/classic/images/msntalk.gif new file mode 100644 index 0000000..6eacb5b Binary files /dev/null and b/Themes/classic/images/msntalk.gif differ diff --git a/Themes/classic/images/mysql.gif b/Themes/classic/images/mysql.gif new file mode 100644 index 0000000..24e619e Binary files /dev/null and b/Themes/classic/images/mysql.gif differ diff --git a/Themes/classic/images/off.gif b/Themes/classic/images/off.gif new file mode 100644 index 0000000..b97cbc1 Binary files /dev/null and b/Themes/classic/images/off.gif differ diff --git a/Themes/classic/images/on.gif b/Themes/classic/images/on.gif new file mode 100644 index 0000000..7329475 Binary files /dev/null and b/Themes/classic/images/on.gif differ diff --git a/Themes/classic/images/php.gif b/Themes/classic/images/php.gif new file mode 100644 index 0000000..8045396 Binary files /dev/null and b/Themes/classic/images/php.gif differ diff --git a/Themes/classic/images/poll_left.gif b/Themes/classic/images/poll_left.gif new file mode 100644 index 0000000..ac7df6b Binary files /dev/null and b/Themes/classic/images/poll_left.gif differ diff --git a/Themes/classic/images/poll_middle.gif b/Themes/classic/images/poll_middle.gif new file mode 100644 index 0000000..cdffb90 Binary files /dev/null and b/Themes/classic/images/poll_middle.gif differ diff --git a/Themes/classic/images/poll_right.gif b/Themes/classic/images/poll_right.gif new file mode 100644 index 0000000..337187f Binary files /dev/null and b/Themes/classic/images/poll_right.gif differ diff --git a/Themes/classic/images/post/angry.gif b/Themes/classic/images/post/angry.gif new file mode 100644 index 0000000..82a57d2 Binary files /dev/null and b/Themes/classic/images/post/angry.gif differ diff --git a/Themes/classic/images/post/cheesy.gif b/Themes/classic/images/post/cheesy.gif new file mode 100644 index 0000000..8506d9b Binary files /dev/null and b/Themes/classic/images/post/cheesy.gif differ diff --git a/Themes/classic/images/post/exclamation.gif b/Themes/classic/images/post/exclamation.gif new file mode 100644 index 0000000..e77cfed Binary files /dev/null and b/Themes/classic/images/post/exclamation.gif differ diff --git a/Themes/classic/images/post/grin.gif b/Themes/classic/images/post/grin.gif new file mode 100644 index 0000000..6ebddf5 Binary files /dev/null and b/Themes/classic/images/post/grin.gif differ diff --git a/Themes/classic/images/post/lamp.gif b/Themes/classic/images/post/lamp.gif new file mode 100644 index 0000000..d894edd Binary files /dev/null and b/Themes/classic/images/post/lamp.gif differ diff --git a/Themes/classic/images/post/moved.gif b/Themes/classic/images/post/moved.gif new file mode 100644 index 0000000..aad605b Binary files /dev/null and b/Themes/classic/images/post/moved.gif differ diff --git a/Themes/classic/images/post/question.gif b/Themes/classic/images/post/question.gif new file mode 100644 index 0000000..75b69d5 Binary files /dev/null and b/Themes/classic/images/post/question.gif differ diff --git a/Themes/classic/images/post/recycled.gif b/Themes/classic/images/post/recycled.gif new file mode 100644 index 0000000..91e5c67 Binary files /dev/null and b/Themes/classic/images/post/recycled.gif differ diff --git a/Themes/classic/images/post/sad.gif b/Themes/classic/images/post/sad.gif new file mode 100644 index 0000000..d27ec53 Binary files /dev/null and b/Themes/classic/images/post/sad.gif differ diff --git a/Themes/classic/images/post/smiley.gif b/Themes/classic/images/post/smiley.gif new file mode 100644 index 0000000..e8e8a84 Binary files /dev/null and b/Themes/classic/images/post/smiley.gif differ diff --git a/Themes/classic/images/post/thumbdown.gif b/Themes/classic/images/post/thumbdown.gif new file mode 100644 index 0000000..ab7e040 Binary files /dev/null and b/Themes/classic/images/post/thumbdown.gif differ diff --git a/Themes/classic/images/post/thumbup.gif b/Themes/classic/images/post/thumbup.gif new file mode 100644 index 0000000..62e0d02 Binary files /dev/null and b/Themes/classic/images/post/thumbup.gif differ diff --git a/Themes/classic/images/post/wink.gif b/Themes/classic/images/post/wink.gif new file mode 100644 index 0000000..9627123 Binary files /dev/null and b/Themes/classic/images/post/wink.gif differ diff --git a/Themes/classic/images/post/wireless.gif b/Themes/classic/images/post/wireless.gif new file mode 100644 index 0000000..9b66c37 Binary files /dev/null and b/Themes/classic/images/post/wireless.gif differ diff --git a/Themes/classic/images/post/xx.gif b/Themes/classic/images/post/xx.gif new file mode 100644 index 0000000..c46442f Binary files /dev/null and b/Themes/classic/images/post/xx.gif differ diff --git a/Themes/classic/images/russian/addpoll.gif b/Themes/classic/images/russian/addpoll.gif new file mode 100644 index 0000000..ed3f4f9 Binary files /dev/null and b/Themes/classic/images/russian/addpoll.gif differ diff --git a/Themes/classic/images/russian/addpoll.png b/Themes/classic/images/russian/addpoll.png new file mode 100644 index 0000000..2965e52 Binary files /dev/null and b/Themes/classic/images/russian/addpoll.png differ diff --git a/Themes/classic/images/russian/admin.gif b/Themes/classic/images/russian/admin.gif new file mode 100644 index 0000000..665637e Binary files /dev/null and b/Themes/classic/images/russian/admin.gif differ diff --git a/Themes/classic/images/russian/admin.png b/Themes/classic/images/russian/admin.png new file mode 100644 index 0000000..ab70db1 Binary files /dev/null and b/Themes/classic/images/russian/admin.png differ diff --git a/Themes/classic/images/russian/admin_lock.gif b/Themes/classic/images/russian/admin_lock.gif new file mode 100644 index 0000000..9b393f8 Binary files /dev/null and b/Themes/classic/images/russian/admin_lock.gif differ diff --git a/Themes/classic/images/russian/admin_lock.png b/Themes/classic/images/russian/admin_lock.png new file mode 100644 index 0000000..a6c1256 Binary files /dev/null and b/Themes/classic/images/russian/admin_lock.png differ diff --git a/Themes/classic/images/russian/admin_move.gif b/Themes/classic/images/russian/admin_move.gif new file mode 100644 index 0000000..ba16f22 Binary files /dev/null and b/Themes/classic/images/russian/admin_move.gif differ diff --git a/Themes/classic/images/russian/admin_rem.gif b/Themes/classic/images/russian/admin_rem.gif new file mode 100644 index 0000000..9fb0fae Binary files /dev/null and b/Themes/classic/images/russian/admin_rem.gif differ diff --git a/Themes/classic/images/russian/admin_remove_poll.gif b/Themes/classic/images/russian/admin_remove_poll.gif new file mode 100644 index 0000000..3189ea3 Binary files /dev/null and b/Themes/classic/images/russian/admin_remove_poll.gif differ diff --git a/Themes/classic/images/russian/admin_sticky.gif b/Themes/classic/images/russian/admin_sticky.gif new file mode 100644 index 0000000..a8dc5d8 Binary files /dev/null and b/Themes/classic/images/russian/admin_sticky.gif differ diff --git a/Themes/classic/images/russian/calendar.gif b/Themes/classic/images/russian/calendar.gif new file mode 100644 index 0000000..cef9d36 Binary files /dev/null and b/Themes/classic/images/russian/calendar.gif differ diff --git a/Themes/classic/images/russian/calendarpe.gif b/Themes/classic/images/russian/calendarpe.gif new file mode 100644 index 0000000..527ca38 Binary files /dev/null and b/Themes/classic/images/russian/calendarpe.gif differ diff --git a/Themes/classic/images/russian/chat.gif b/Themes/classic/images/russian/chat.gif new file mode 100644 index 0000000..8caa5fb Binary files /dev/null and b/Themes/classic/images/russian/chat.gif differ diff --git a/Themes/classic/images/russian/delete.gif b/Themes/classic/images/russian/delete.gif new file mode 100644 index 0000000..c1c40c2 Binary files /dev/null and b/Themes/classic/images/russian/delete.gif differ diff --git a/Themes/classic/images/russian/delete_selected.gif b/Themes/classic/images/russian/delete_selected.gif new file mode 100644 index 0000000..2571232 Binary files /dev/null and b/Themes/classic/images/russian/delete_selected.gif differ diff --git a/Themes/classic/images/russian/email.gif b/Themes/classic/images/russian/email.gif new file mode 100644 index 0000000..8b280b8 Binary files /dev/null and b/Themes/classic/images/russian/email.gif differ diff --git a/Themes/classic/images/russian/go_down.gif b/Themes/classic/images/russian/go_down.gif new file mode 100644 index 0000000..5108bed Binary files /dev/null and b/Themes/classic/images/russian/go_down.gif differ diff --git a/Themes/classic/images/russian/go_up.gif b/Themes/classic/images/russian/go_up.gif new file mode 100644 index 0000000..06a0658 Binary files /dev/null and b/Themes/classic/images/russian/go_up.gif differ diff --git a/Themes/classic/images/russian/help.gif b/Themes/classic/images/russian/help.gif new file mode 100644 index 0000000..8b02f41 Binary files /dev/null and b/Themes/classic/images/russian/help.gif differ diff --git a/Themes/classic/images/russian/home.gif b/Themes/classic/images/russian/home.gif new file mode 100644 index 0000000..5044752 Binary files /dev/null and b/Themes/classic/images/russian/home.gif differ diff --git a/Themes/classic/images/russian/im_delete.gif b/Themes/classic/images/russian/im_delete.gif new file mode 100644 index 0000000..c502f82 Binary files /dev/null and b/Themes/classic/images/russian/im_delete.gif differ diff --git a/Themes/classic/images/russian/im_inbox.gif b/Themes/classic/images/russian/im_inbox.gif new file mode 100644 index 0000000..4e603ca Binary files /dev/null and b/Themes/classic/images/russian/im_inbox.gif differ diff --git a/Themes/classic/images/russian/im_new.gif b/Themes/classic/images/russian/im_new.gif new file mode 100644 index 0000000..4023aca Binary files /dev/null and b/Themes/classic/images/russian/im_new.gif differ diff --git a/Themes/classic/images/russian/im_outbox.gif b/Themes/classic/images/russian/im_outbox.gif new file mode 100644 index 0000000..c215f0d Binary files /dev/null and b/Themes/classic/images/russian/im_outbox.gif differ diff --git a/Themes/classic/images/russian/im_reload.gif b/Themes/classic/images/russian/im_reload.gif new file mode 100644 index 0000000..78e618e Binary files /dev/null and b/Themes/classic/images/russian/im_reload.gif differ diff --git a/Themes/classic/images/russian/im_reply.gif b/Themes/classic/images/russian/im_reply.gif new file mode 100644 index 0000000..ddf0b90 Binary files /dev/null and b/Themes/classic/images/russian/im_reply.gif differ diff --git a/Themes/classic/images/russian/linktocal.gif b/Themes/classic/images/russian/linktocal.gif new file mode 100644 index 0000000..aff9e20 Binary files /dev/null and b/Themes/classic/images/russian/linktocal.gif differ diff --git a/Themes/classic/images/russian/login.gif b/Themes/classic/images/russian/login.gif new file mode 100644 index 0000000..687e31a Binary files /dev/null and b/Themes/classic/images/russian/login.gif differ diff --git a/Themes/classic/images/russian/logout.gif b/Themes/classic/images/russian/logout.gif new file mode 100644 index 0000000..5b25ca9 Binary files /dev/null and b/Themes/classic/images/russian/logout.gif differ diff --git a/Themes/classic/images/russian/markread.gif b/Themes/classic/images/russian/markread.gif new file mode 100644 index 0000000..6e22c78 Binary files /dev/null and b/Themes/classic/images/russian/markread.gif differ diff --git a/Themes/classic/images/russian/markunread.gif b/Themes/classic/images/russian/markunread.gif new file mode 100644 index 0000000..d86864b Binary files /dev/null and b/Themes/classic/images/russian/markunread.gif differ diff --git a/Themes/classic/images/russian/merge.gif b/Themes/classic/images/russian/merge.gif new file mode 100644 index 0000000..0d83ba4 Binary files /dev/null and b/Themes/classic/images/russian/merge.gif differ diff --git a/Themes/classic/images/russian/modify.gif b/Themes/classic/images/russian/modify.gif new file mode 100644 index 0000000..5765705 Binary files /dev/null and b/Themes/classic/images/russian/modify.gif differ diff --git a/Themes/classic/images/russian/new.gif b/Themes/classic/images/russian/new.gif new file mode 100644 index 0000000..7c4aab8 Binary files /dev/null and b/Themes/classic/images/russian/new.gif differ diff --git a/Themes/classic/images/russian/new_none.gif b/Themes/classic/images/russian/new_none.gif new file mode 100644 index 0000000..16a63d4 Binary files /dev/null and b/Themes/classic/images/russian/new_none.gif differ diff --git a/Themes/classic/images/russian/new_poll.gif b/Themes/classic/images/russian/new_poll.gif new file mode 100644 index 0000000..b22499e Binary files /dev/null and b/Themes/classic/images/russian/new_poll.gif differ diff --git a/Themes/classic/images/russian/new_some.gif b/Themes/classic/images/russian/new_some.gif new file mode 100644 index 0000000..a8b874e Binary files /dev/null and b/Themes/classic/images/russian/new_some.gif differ diff --git a/Themes/classic/images/russian/new_topic.gif b/Themes/classic/images/russian/new_topic.gif new file mode 100644 index 0000000..2db31df Binary files /dev/null and b/Themes/classic/images/russian/new_topic.gif differ diff --git a/Themes/classic/images/russian/notify.gif b/Themes/classic/images/russian/notify.gif new file mode 100644 index 0000000..1c0b4e5 Binary files /dev/null and b/Themes/classic/images/russian/notify.gif differ diff --git a/Themes/classic/images/russian/notify_sm.gif b/Themes/classic/images/russian/notify_sm.gif new file mode 100644 index 0000000..bf71e60 Binary files /dev/null and b/Themes/classic/images/russian/notify_sm.gif differ diff --git a/Themes/classic/images/russian/print.gif b/Themes/classic/images/russian/print.gif new file mode 100644 index 0000000..42b7228 Binary files /dev/null and b/Themes/classic/images/russian/print.gif differ diff --git a/Themes/classic/images/russian/profile.gif b/Themes/classic/images/russian/profile.gif new file mode 100644 index 0000000..bd6ad80 Binary files /dev/null and b/Themes/classic/images/russian/profile.gif differ diff --git a/Themes/classic/images/russian/quote.gif b/Themes/classic/images/russian/quote.gif new file mode 100644 index 0000000..2e898ee Binary files /dev/null and b/Themes/classic/images/russian/quote.gif differ diff --git a/Themes/classic/images/russian/register.gif b/Themes/classic/images/russian/register.gif new file mode 100644 index 0000000..5e98649 Binary files /dev/null and b/Themes/classic/images/russian/register.gif differ diff --git a/Themes/classic/images/russian/reply.gif b/Themes/classic/images/russian/reply.gif new file mode 100644 index 0000000..d783e9e Binary files /dev/null and b/Themes/classic/images/russian/reply.gif differ diff --git a/Themes/classic/images/russian/reply_sm.gif b/Themes/classic/images/russian/reply_sm.gif new file mode 100644 index 0000000..3f87c43 Binary files /dev/null and b/Themes/classic/images/russian/reply_sm.gif differ diff --git a/Themes/classic/images/russian/search.gif b/Themes/classic/images/russian/search.gif new file mode 100644 index 0000000..c87afe0 Binary files /dev/null and b/Themes/classic/images/russian/search.gif differ diff --git a/Themes/classic/images/russian/sendtopic.gif b/Themes/classic/images/russian/sendtopic.gif new file mode 100644 index 0000000..f3fae40 Binary files /dev/null and b/Themes/classic/images/russian/sendtopic.gif differ diff --git a/Themes/classic/images/russian/split.gif b/Themes/classic/images/russian/split.gif new file mode 100644 index 0000000..03e3d36 Binary files /dev/null and b/Themes/classic/images/russian/split.gif differ diff --git a/Themes/classic/images/selected.gif b/Themes/classic/images/selected.gif new file mode 100644 index 0000000..63ab671 Binary files /dev/null and b/Themes/classic/images/selected.gif differ diff --git a/Themes/classic/images/selogo.gif b/Themes/classic/images/selogo.gif new file mode 100644 index 0000000..db47a8a Binary files /dev/null and b/Themes/classic/images/selogo.gif differ diff --git a/Themes/classic/images/smflogo.gif b/Themes/classic/images/smflogo.gif new file mode 100644 index 0000000..65fa21b Binary files /dev/null and b/Themes/classic/images/smflogo.gif differ diff --git a/Themes/classic/images/smiley_select_spot.gif b/Themes/classic/images/smiley_select_spot.gif new file mode 100644 index 0000000..3e62a27 Binary files /dev/null and b/Themes/classic/images/smiley_select_spot.gif differ diff --git a/Themes/classic/images/sort_down.gif b/Themes/classic/images/sort_down.gif new file mode 100644 index 0000000..e2c321f Binary files /dev/null and b/Themes/classic/images/sort_down.gif differ diff --git a/Themes/classic/images/sort_up.gif b/Themes/classic/images/sort_up.gif new file mode 100644 index 0000000..7cce122 Binary files /dev/null and b/Themes/classic/images/sort_up.gif differ diff --git a/Themes/classic/images/star.gif b/Themes/classic/images/star.gif new file mode 100644 index 0000000..2177240 Binary files /dev/null and b/Themes/classic/images/star.gif differ diff --git a/Themes/classic/images/staradmin.gif b/Themes/classic/images/staradmin.gif new file mode 100644 index 0000000..df654ea Binary files /dev/null and b/Themes/classic/images/staradmin.gif differ diff --git a/Themes/classic/images/stargmod.gif b/Themes/classic/images/stargmod.gif new file mode 100644 index 0000000..74f6047 Binary files /dev/null and b/Themes/classic/images/stargmod.gif differ diff --git a/Themes/classic/images/starmod.gif b/Themes/classic/images/starmod.gif new file mode 100644 index 0000000..9d5e147 Binary files /dev/null and b/Themes/classic/images/starmod.gif differ diff --git a/Themes/classic/images/stats_board.gif b/Themes/classic/images/stats_board.gif new file mode 100644 index 0000000..8f00a55 Binary files /dev/null and b/Themes/classic/images/stats_board.gif differ diff --git a/Themes/classic/images/stats_history.gif b/Themes/classic/images/stats_history.gif new file mode 100644 index 0000000..6ef3079 Binary files /dev/null and b/Themes/classic/images/stats_history.gif differ diff --git a/Themes/classic/images/stats_info.gif b/Themes/classic/images/stats_info.gif new file mode 100644 index 0000000..3a9cd6d Binary files /dev/null and b/Themes/classic/images/stats_info.gif differ diff --git a/Themes/classic/images/stats_posters.gif b/Themes/classic/images/stats_posters.gif new file mode 100644 index 0000000..e072080 Binary files /dev/null and b/Themes/classic/images/stats_posters.gif differ diff --git a/Themes/classic/images/stats_replies.gif b/Themes/classic/images/stats_replies.gif new file mode 100644 index 0000000..12deb51 Binary files /dev/null and b/Themes/classic/images/stats_replies.gif differ diff --git a/Themes/classic/images/stats_views.gif b/Themes/classic/images/stats_views.gif new file mode 100644 index 0000000..128e6ec Binary files /dev/null and b/Themes/classic/images/stats_views.gif differ diff --git a/Themes/classic/images/thumbnail.gif b/Themes/classic/images/thumbnail.gif new file mode 100644 index 0000000..548765a Binary files /dev/null and b/Themes/classic/images/thumbnail.gif differ diff --git a/Themes/classic/images/topic/hot_poll.gif b/Themes/classic/images/topic/hot_poll.gif new file mode 100644 index 0000000..f7d06b7 Binary files /dev/null and b/Themes/classic/images/topic/hot_poll.gif differ diff --git a/Themes/classic/images/topic/hot_poll_locked.gif b/Themes/classic/images/topic/hot_poll_locked.gif new file mode 100644 index 0000000..1792e99 Binary files /dev/null and b/Themes/classic/images/topic/hot_poll_locked.gif differ diff --git a/Themes/classic/images/topic/hot_poll_locked_sticky.gif b/Themes/classic/images/topic/hot_poll_locked_sticky.gif new file mode 100644 index 0000000..447cfdb Binary files /dev/null and b/Themes/classic/images/topic/hot_poll_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/hot_poll_sticky.gif b/Themes/classic/images/topic/hot_poll_sticky.gif new file mode 100644 index 0000000..447cfdb Binary files /dev/null and b/Themes/classic/images/topic/hot_poll_sticky.gif differ diff --git a/Themes/classic/images/topic/hot_post.gif b/Themes/classic/images/topic/hot_post.gif new file mode 100644 index 0000000..9a13745 Binary files /dev/null and b/Themes/classic/images/topic/hot_post.gif differ diff --git a/Themes/classic/images/topic/hot_post_locked.gif b/Themes/classic/images/topic/hot_post_locked.gif new file mode 100644 index 0000000..0af1444 Binary files /dev/null and b/Themes/classic/images/topic/hot_post_locked.gif differ diff --git a/Themes/classic/images/topic/hot_post_locked_sticky.gif b/Themes/classic/images/topic/hot_post_locked_sticky.gif new file mode 100644 index 0000000..97fc333 Binary files /dev/null and b/Themes/classic/images/topic/hot_post_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/hot_post_sticky.gif b/Themes/classic/images/topic/hot_post_sticky.gif new file mode 100644 index 0000000..3f4e842 Binary files /dev/null and b/Themes/classic/images/topic/hot_post_sticky.gif differ diff --git a/Themes/classic/images/topic/my_hot_poll.gif b/Themes/classic/images/topic/my_hot_poll.gif new file mode 100644 index 0000000..cc37f93 Binary files /dev/null and b/Themes/classic/images/topic/my_hot_poll.gif differ diff --git a/Themes/classic/images/topic/my_hot_poll_locked.gif b/Themes/classic/images/topic/my_hot_poll_locked.gif new file mode 100644 index 0000000..f9c0976 Binary files /dev/null and b/Themes/classic/images/topic/my_hot_poll_locked.gif differ diff --git a/Themes/classic/images/topic/my_hot_poll_locked_sticky.gif b/Themes/classic/images/topic/my_hot_poll_locked_sticky.gif new file mode 100644 index 0000000..55f59f6 Binary files /dev/null and b/Themes/classic/images/topic/my_hot_poll_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/my_hot_poll_sticky.gif b/Themes/classic/images/topic/my_hot_poll_sticky.gif new file mode 100644 index 0000000..55f59f6 Binary files /dev/null and b/Themes/classic/images/topic/my_hot_poll_sticky.gif differ diff --git a/Themes/classic/images/topic/my_hot_post.gif b/Themes/classic/images/topic/my_hot_post.gif new file mode 100644 index 0000000..ff3e16e Binary files /dev/null and b/Themes/classic/images/topic/my_hot_post.gif differ diff --git a/Themes/classic/images/topic/my_hot_post_locked.gif b/Themes/classic/images/topic/my_hot_post_locked.gif new file mode 100644 index 0000000..8fb10ba Binary files /dev/null and b/Themes/classic/images/topic/my_hot_post_locked.gif differ diff --git a/Themes/classic/images/topic/my_hot_post_locked_sticky.gif b/Themes/classic/images/topic/my_hot_post_locked_sticky.gif new file mode 100644 index 0000000..0a1fcf0 Binary files /dev/null and b/Themes/classic/images/topic/my_hot_post_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/my_hot_post_sticky.gif b/Themes/classic/images/topic/my_hot_post_sticky.gif new file mode 100644 index 0000000..8189750 Binary files /dev/null and b/Themes/classic/images/topic/my_hot_post_sticky.gif differ diff --git a/Themes/classic/images/topic/my_normal_poll.gif b/Themes/classic/images/topic/my_normal_poll.gif new file mode 100644 index 0000000..cc37f93 Binary files /dev/null and b/Themes/classic/images/topic/my_normal_poll.gif differ diff --git a/Themes/classic/images/topic/my_normal_poll_locked.gif b/Themes/classic/images/topic/my_normal_poll_locked.gif new file mode 100644 index 0000000..f9c0976 Binary files /dev/null and b/Themes/classic/images/topic/my_normal_poll_locked.gif differ diff --git a/Themes/classic/images/topic/my_normal_poll_locked_sticky.gif b/Themes/classic/images/topic/my_normal_poll_locked_sticky.gif new file mode 100644 index 0000000..55f59f6 Binary files /dev/null and b/Themes/classic/images/topic/my_normal_poll_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/my_normal_poll_sticky.gif b/Themes/classic/images/topic/my_normal_poll_sticky.gif new file mode 100644 index 0000000..55f59f6 Binary files /dev/null and b/Themes/classic/images/topic/my_normal_poll_sticky.gif differ diff --git a/Themes/classic/images/topic/my_normal_post.gif b/Themes/classic/images/topic/my_normal_post.gif new file mode 100644 index 0000000..04c6da9 Binary files /dev/null and b/Themes/classic/images/topic/my_normal_post.gif differ diff --git a/Themes/classic/images/topic/my_normal_post_locked.gif b/Themes/classic/images/topic/my_normal_post_locked.gif new file mode 100644 index 0000000..8fb10ba Binary files /dev/null and b/Themes/classic/images/topic/my_normal_post_locked.gif differ diff --git a/Themes/classic/images/topic/my_normal_post_locked_sticky.gif b/Themes/classic/images/topic/my_normal_post_locked_sticky.gif new file mode 100644 index 0000000..0a1fcf0 Binary files /dev/null and b/Themes/classic/images/topic/my_normal_post_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/my_normal_post_sticky.gif b/Themes/classic/images/topic/my_normal_post_sticky.gif new file mode 100644 index 0000000..8189750 Binary files /dev/null and b/Themes/classic/images/topic/my_normal_post_sticky.gif differ diff --git a/Themes/classic/images/topic/my_veryhot_poll.gif b/Themes/classic/images/topic/my_veryhot_poll.gif new file mode 100644 index 0000000..cc37f93 Binary files /dev/null and b/Themes/classic/images/topic/my_veryhot_poll.gif differ diff --git a/Themes/classic/images/topic/my_veryhot_poll_locked.gif b/Themes/classic/images/topic/my_veryhot_poll_locked.gif new file mode 100644 index 0000000..f9c0976 Binary files /dev/null and b/Themes/classic/images/topic/my_veryhot_poll_locked.gif differ diff --git a/Themes/classic/images/topic/my_veryhot_poll_locked_sticky.gif b/Themes/classic/images/topic/my_veryhot_poll_locked_sticky.gif new file mode 100644 index 0000000..55f59f6 Binary files /dev/null and b/Themes/classic/images/topic/my_veryhot_poll_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/my_veryhot_poll_sticky.gif b/Themes/classic/images/topic/my_veryhot_poll_sticky.gif new file mode 100644 index 0000000..55f59f6 Binary files /dev/null and b/Themes/classic/images/topic/my_veryhot_poll_sticky.gif differ diff --git a/Themes/classic/images/topic/my_veryhot_post.gif b/Themes/classic/images/topic/my_veryhot_post.gif new file mode 100644 index 0000000..49dcc58 Binary files /dev/null and b/Themes/classic/images/topic/my_veryhot_post.gif differ diff --git a/Themes/classic/images/topic/my_veryhot_post_locked.gif b/Themes/classic/images/topic/my_veryhot_post_locked.gif new file mode 100644 index 0000000..8fb10ba Binary files /dev/null and b/Themes/classic/images/topic/my_veryhot_post_locked.gif differ diff --git a/Themes/classic/images/topic/my_veryhot_post_locked_sticky.gif b/Themes/classic/images/topic/my_veryhot_post_locked_sticky.gif new file mode 100644 index 0000000..0a1fcf0 Binary files /dev/null and b/Themes/classic/images/topic/my_veryhot_post_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/my_veryhot_post_sticky.gif b/Themes/classic/images/topic/my_veryhot_post_sticky.gif new file mode 100644 index 0000000..8189750 Binary files /dev/null and b/Themes/classic/images/topic/my_veryhot_post_sticky.gif differ diff --git a/Themes/classic/images/topic/normal_poll.gif b/Themes/classic/images/topic/normal_poll.gif new file mode 100644 index 0000000..f7d06b7 Binary files /dev/null and b/Themes/classic/images/topic/normal_poll.gif differ diff --git a/Themes/classic/images/topic/normal_poll_locked.gif b/Themes/classic/images/topic/normal_poll_locked.gif new file mode 100644 index 0000000..1792e99 Binary files /dev/null and b/Themes/classic/images/topic/normal_poll_locked.gif differ diff --git a/Themes/classic/images/topic/normal_poll_locked_sticky.gif b/Themes/classic/images/topic/normal_poll_locked_sticky.gif new file mode 100644 index 0000000..447cfdb Binary files /dev/null and b/Themes/classic/images/topic/normal_poll_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/normal_poll_sticky.gif b/Themes/classic/images/topic/normal_poll_sticky.gif new file mode 100644 index 0000000..447cfdb Binary files /dev/null and b/Themes/classic/images/topic/normal_poll_sticky.gif differ diff --git a/Themes/classic/images/topic/normal_post.gif b/Themes/classic/images/topic/normal_post.gif new file mode 100644 index 0000000..c0d1d6a Binary files /dev/null and b/Themes/classic/images/topic/normal_post.gif differ diff --git a/Themes/classic/images/topic/normal_post_locked.gif b/Themes/classic/images/topic/normal_post_locked.gif new file mode 100644 index 0000000..0af1444 Binary files /dev/null and b/Themes/classic/images/topic/normal_post_locked.gif differ diff --git a/Themes/classic/images/topic/normal_post_locked_sticky.gif b/Themes/classic/images/topic/normal_post_locked_sticky.gif new file mode 100644 index 0000000..97fc333 Binary files /dev/null and b/Themes/classic/images/topic/normal_post_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/normal_post_sticky.gif b/Themes/classic/images/topic/normal_post_sticky.gif new file mode 100644 index 0000000..3f4e842 Binary files /dev/null and b/Themes/classic/images/topic/normal_post_sticky.gif differ diff --git a/Themes/classic/images/topic/veryhot_poll.gif b/Themes/classic/images/topic/veryhot_poll.gif new file mode 100644 index 0000000..f7d06b7 Binary files /dev/null and b/Themes/classic/images/topic/veryhot_poll.gif differ diff --git a/Themes/classic/images/topic/veryhot_poll_locked.gif b/Themes/classic/images/topic/veryhot_poll_locked.gif new file mode 100644 index 0000000..1792e99 Binary files /dev/null and b/Themes/classic/images/topic/veryhot_poll_locked.gif differ diff --git a/Themes/classic/images/topic/veryhot_poll_locked_sticky.gif b/Themes/classic/images/topic/veryhot_poll_locked_sticky.gif new file mode 100644 index 0000000..447cfdb Binary files /dev/null and b/Themes/classic/images/topic/veryhot_poll_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/veryhot_poll_sticky.gif b/Themes/classic/images/topic/veryhot_poll_sticky.gif new file mode 100644 index 0000000..447cfdb Binary files /dev/null and b/Themes/classic/images/topic/veryhot_poll_sticky.gif differ diff --git a/Themes/classic/images/topic/veryhot_post.gif b/Themes/classic/images/topic/veryhot_post.gif new file mode 100644 index 0000000..7809db8 Binary files /dev/null and b/Themes/classic/images/topic/veryhot_post.gif differ diff --git a/Themes/classic/images/topic/veryhot_post_locked.gif b/Themes/classic/images/topic/veryhot_post_locked.gif new file mode 100644 index 0000000..0af1444 Binary files /dev/null and b/Themes/classic/images/topic/veryhot_post_locked.gif differ diff --git a/Themes/classic/images/topic/veryhot_post_locked_sticky.gif b/Themes/classic/images/topic/veryhot_post_locked_sticky.gif new file mode 100644 index 0000000..97fc333 Binary files /dev/null and b/Themes/classic/images/topic/veryhot_post_locked_sticky.gif differ diff --git a/Themes/classic/images/topic/veryhot_post_sticky.gif b/Themes/classic/images/topic/veryhot_post_sticky.gif new file mode 100644 index 0000000..3f4e842 Binary files /dev/null and b/Themes/classic/images/topic/veryhot_post_sticky.gif differ diff --git a/Themes/classic/images/useroff.gif b/Themes/classic/images/useroff.gif new file mode 100644 index 0000000..e3cb222 Binary files /dev/null and b/Themes/classic/images/useroff.gif differ diff --git a/Themes/classic/images/useron.gif b/Themes/classic/images/useron.gif new file mode 100644 index 0000000..c9a320b Binary files /dev/null and b/Themes/classic/images/useron.gif differ diff --git a/Themes/classic/images/valid-css.gif b/Themes/classic/images/valid-css.gif new file mode 100644 index 0000000..26d266d Binary files /dev/null and b/Themes/classic/images/valid-css.gif differ diff --git a/Themes/classic/images/valid-xhtml10.gif b/Themes/classic/images/valid-xhtml10.gif new file mode 100644 index 0000000..baa461a Binary files /dev/null and b/Themes/classic/images/valid-xhtml10.gif differ diff --git a/Themes/classic/images/www.gif b/Themes/classic/images/www.gif new file mode 100644 index 0000000..a8aa1fc Binary files /dev/null and b/Themes/classic/images/www.gif differ diff --git a/Themes/classic/images/www_sm.gif b/Themes/classic/images/www_sm.gif new file mode 100644 index 0000000..a8aa1fc Binary files /dev/null and b/Themes/classic/images/www_sm.gif differ diff --git a/Themes/classic/images/yim.gif b/Themes/classic/images/yim.gif new file mode 100644 index 0000000..bfc9ab2 Binary files /dev/null and b/Themes/classic/images/yim.gif differ diff --git a/Themes/classic/index.php b/Themes/classic/index.php new file mode 100644 index 0000000..be9895a --- /dev/null +++ b/Themes/classic/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/Themes/classic/index.template.php b/Themes/classic/index.template.php new file mode 100644 index 0000000..770907a --- /dev/null +++ b/Themes/classic/index.template.php @@ -0,0 +1,301 @@ + + + + + + + + ', $context['page_title'], ' + '; + + /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...) + Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual. + Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big. + Standards compliance mode happens when you use xhtml... */ + if ($context['browser']['needs_size_fix']) + echo ' + '; + + // Show all the relative links, such as help, search, contents, and the like. + echo ' + + + '; + + // If we're viewing a topic, these should be the previous and next topics, respectively. + if (!empty($context['current_topic'])) + echo ' + + '; + + // If we're in a board, or a topic for that matter, the index will be the board's index. + if (!empty($context['current_board'])) + echo ' + '; + + // Output any remaining HTML headers. (from mods, maybe?) + echo $context['html_headers'], ' + +'; + + // The logo, user information, news, and menu. + echo ' + + + + + + + + '; + + // Show a random news item? (or you could pick one from news_lines...) + if (!empty($settings['enable_news'])) + echo ' + + + '; + + echo ' +
    '; + + // If the user is logged in, display stuff like their name, new messages, etc. + if ($context['user']['is_logged']) + { + echo ' + ', $txt['hello_member'], ' ', $context['user']['name'], '', $context['allow_pm'] ? ', ' . $txt[152] . ' ' . $context['user']['messages'] . ' ' . ($context['user']['messages'] != 1 ? $txt[153] : $txt[471]) . '' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']) : '', '.'; + + // Are there any members waiting for approval? + if (!empty($context['unapproved_members'])) + echo '
    + ', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' ', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], ' ', $txt['approve_members_waiting']; + + // Is the forum in maintenance mode? + if ($context['in_maintenance'] && $context['user']['is_admin']) + echo '
    + ', $txt[616], ''; + } + // Otherwise they're a guest - so politely ask them to register or login. + else + echo ' + ', $txt['welcome_guest']; + + echo ' +
    ', $context['current_time'], ' +
    '; + + // Show the menu here, according to the menu sub template. + template_menu(); + + echo ' +
    + ', $txt[102], ': ', $context['random_news_line'], ' +
    + +
    + + +
    '; +} + +function template_main_below() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    '; + + // Show a vB style login for quick login? + if ($context['show_vBlogin']) + echo ' + + +
    +

    + + + +
    + ', $txt['smf52'], ' +
    +
    '; + // Don't show a login box, just a break. + else + echo ' +
    '; + + // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere! + echo ' +
    + + + + + + + +
    + ', $txt['powered_by_mysql'], ' + ', $txt['powered_by_php'], ' + + ', theme_copyright(), ' + + ', $txt['valid_xhtml'], ' + ', $txt['valid_css'], ' +
    '; + + // Show the load time? + if ($context['show_load_time']) + echo ' +
    + ', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], ' +
    '; + + // And then we're done! + echo ' + +'; +} + +// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. +function theme_linktree() +{ + global $context, $settings, $options; + + // Folder style or inline? Inline has a smaller font. + echo ''; + + // Each tree item has a URL and name. Some may have extra_before and extra_after. + foreach ($context['linktree'] as $link_num => $tree) + { + // Show the | | |-[] Folders. + if (!$settings['linktree_inline']) + { + if ($link_num > 0) + echo str_repeat('| ', $link_num - 1), '|-'; + echo '+  '; + } + + // Show something before the link? + if (isset($tree['extra_before'])) + echo $tree['extra_before']; + + // Show the link, including a URL if it should have one. + echo '', $settings['linktree_link'] && isset($tree['url']) ? '' . $tree['name'] . '' : $tree['name'], ''; + + // Show something after the link...? + if (isset($tree['extra_after'])) + echo $tree['extra_after']; + + // Don't show a separator for the last one. + if ($link_num != count($context['linktree']) - 1) + echo $settings['linktree_inline'] ? '  |  ' : '
    '; + } + + echo '
    '; +} + +// Show the menu up top. Something like [home] [help] [profile] [logout]... +function template_menu() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Show the [home] and [help] buttons. + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[103] . '' : $txt[103]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[119] . '' : $txt[119]), '', $context['menu_separator']; + + // How about the [search] button? + if ($context['allow_search']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[182] . '' : $txt[182]), '', $context['menu_separator']; + + // Is the user allowed to administrate at all? ([admin]) + if ($context['allow_admin']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[2] . '' : $txt[2]), '', $context['menu_separator']; + + // Edit Profile... [profile] + if ($context['allow_edit_profile']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[79] . '' : $txt[467]), '', $context['menu_separator']; + + // The [calendar]! + if ($context['allow_calendar']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['calendar24'] . '' : $txt['calendar24']), '', $context['menu_separator']; + + // If the user is a guest, show [login] and [register] buttons. + if ($context['user']['is_guest']) + { + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[34] . '' : $txt[34]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[97] . '' : $txt[97]), ''; + } + // Otherwise, they might want to [logout]... + else + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[108] . '' : $txt[108]), ''; +} + +?> \ No newline at end of file diff --git a/Themes/classic/languages/Settings.english.php b/Themes/classic/languages/Settings.english.php new file mode 100644 index 0000000..6742c0d --- /dev/null +++ b/Themes/classic/languages/Settings.english.php @@ -0,0 +1,7 @@ +
    Author: The YaBB SE Team.'; + +?> \ No newline at end of file diff --git a/Themes/classic/license.txt b/Themes/classic/license.txt new file mode 100644 index 0000000..2bf90ec --- /dev/null +++ b/Themes/classic/license.txt @@ -0,0 +1,73 @@ +Definitions +----------------------------------------------------------------------------- +i. This Package is defined as all of the files within any archive file or any +group of files released in conjunction by Simple Machines, Lewis Media, or a +derived or modified work based on such files. + +ii. A Modification, or a Mod, is defined as instructions, to be performed +manually or in an automated manner, that alter any part of this Package. + +iii. A Modified Package is defined as this Package or a derivative of it with +one or more Modification applied to it. + +iv. Distribution is defined as allowing one or more other people to in any +way download or receive a copy of this Package, a Modified Package, or a +derivative of this Package. + +v. The Software is defined as an installed copy of this Package, a Modified +Package, or a derivative of this Package. + +vi. The Simple Machines Website is defined as http://www.simplemachines.org/. + +Agreement +----------------------------------------------------------------------------- +1. Permission is hereby granted to use, copy, modify and/or distribute this +Package, provided that: + a. All copyright notices within source files and as generated by the +Software as output are retained, unchanged. + b. Any Distribution of this Package, whether as a Modified Package or +not, includes this file and is released under the terms of this Agreement. +This clause is not dependent upon any measure of changes made to this +Package. + c. This Package, Modified Packages, and derivative works may not be +sold or released under any paid license. Copying fees for the transport of +this Package, support fees for installation or other services, and hosting +fees for hosting the Software may, however, be imposed. + d. Any Distribution of this Package, whether as a Modified Package +or not, requires express written consent from Lewis Media. + +2. You may make Modifications to this Package or a derivative of it, and +distribute your Modifications in a form that is separate from the Package, +such as patches. The following restrictions apply to Modifications: + a. A Modification must not alter or remove any copyright notices in +the Software or Package, generated or otherwise. + b. When a Modification to the Package is released, a non-exclusive +royalty-free right is granted to Lewis Media to distribute the Modification +in future versions of the Package provided such versions remain available +under the terms of this Agreement in addition to any other license(s) of the +initial developer. + c. Any Distribution of a Modified Package or derivative requires +express written consent from Lewis Media. + +3. Permission is hereby also granted to distribute programs which depend on +this Package, provided that you do not distribute any Modified Package +without express written consent. + +4. Lewis Media reserves the right to change the terms of this Agreement at +any time, although those changes are not retroactive to past releases. +Changes to this document will be announced via email using the Simple +Machines email notification list. Failure to receive notification of a change +does not make those changes invalid. A current copy of this Agreement can be +found on the Simple Machines Website. + +5. This Agreement will terminate automatically if you fail to comply with the +limitations described herein. Upon termination, you must destroy all copies +of this Package, the Software, and any derivatives within 48 hours. + +----------------------------------------------------------------------------- +THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY WARRANTY. ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY +OUT OF THE USE OR MISUSE OF THIS PACKAGE. \ No newline at end of file diff --git a/Themes/classic/style.css b/Themes/classic/style.css new file mode 100644 index 0000000..594b056 --- /dev/null +++ b/Themes/classic/style.css @@ -0,0 +1,201 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #005177; + background-color: transparent; + text-decoration: none; +} +a:hover +{ + color: #cc3333; + background-color: transparent; + text-decoration: none; +} + +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + color: #000000; + background-color: transparent; + text-decoration: none; +} +a.nav:hover +{ + font-weight: bold; + color: #cc3333; + background-color: transparent; + text-decoration: underline; +} + +/* Tables should show empty cells too. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Verdana in black. */ +body, td +{ + color: #000000; + font-size: small; + font-family: verdana, arial, helvetica, sans-serif; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea +{ + font-size: 9pt; + color: #000000; + font-family: verdana, arial, helvetica, sans-serif; + background-color: #afc6db; +} + +/* Checkboxes shouldn't have a background color. */ +input.check +{ + background-color: transparent; +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + font-size: 8pt; + font-weight: normal; + color: #000000; + font-family: verdana, arial, helvetica, sans-serif; + background-color: #afc6db; +} + +/* Standard horizontal rule.. */ +hr +{ + color: #6394bd; + background-color: transparent; +} +/* A more colorful hr.. */ +.hrcolor +{ + height: 1px; + border: 0; + color: #6394bd; + background-color: #6394bd; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #000000; + background-color: #dee7ef; + border: 1px solid black; + margin: 1px; + padding: 1px; + font-size: x-small; +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid black; + margin: 1px; + padding: 1px; + font-size: x-small; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #000000; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. */ +.help +{ + cursor: help; + background-color: transparent; +} + +/* /me uses this a lot. */ +.meaction +{ + color: red; + background-color: transparent; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 100%; +} + +/* Highlighted text - such as search results. */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds... */ +.windowbg +{ + color: #000000; + background-color: #afc6db; +} +.windowbg2 +{ + color: #000000; + background-color: #f8f8f8; +} + +/* Titles - such as table headers. */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + font-weight: bold; + font-style: normal; + color: #ffffff; + background-color: #6e94b7; +} +.titlebg a:hover +{ + color: #ffffff; + text-decoration: underline; +} + +/* The category headers, page indexes, and such things. */ +.catbg +{ + font-weight: bold; + background-color: #afc6db; + background-image: url(images/catbg.gif); + color: #000000; +} + +/* The borders around things. */ +.bordercolor +{ + background-color: #6394bd; +} +.tborder +{ + border: 1px solid #6394bd; +} + +/* Default font sizes. */ +.smalltext +{ + font-size: x-small; +} +.normaltext +{ + font-size: small; +} +.largetext +{ + font-size: large; +} \ No newline at end of file diff --git a/Themes/classic/theme_info.xml b/Themes/classic/theme_info.xml new file mode 100644 index 0000000..6693bd1 --- /dev/null +++ b/Themes/classic/theme_info.xml @@ -0,0 +1,15 @@ + + + + Classic YaBB SE Theme + + info@simplemachines.org + + http://www.simplemachines.org/ + + main + + index + + + diff --git a/Themes/default/Admin.template.php b/Themes/default/Admin.template.php new file mode 100644 index 0000000..fae24e5 --- /dev/null +++ b/Themes/default/Admin.template.php @@ -0,0 +1,930 @@ + + + '; + + // For every section that appears on the sidebar... + foreach ($context['admin_areas'] as $section) + { + // Show the section header - and pump up the line spacing for readability. + echo ' + + + + + + '; + } + + // This is where the actual "main content" area for the admin section starts. + echo ' +
    ', $section['title'], '
    '; + + // For every area of this section show a link to that area (bold if it's currently selected.) + foreach ($section['areas'] as $i => $area) + { + // Is this the current area, or just some area? + if ($i == $context['admin_area']) + echo ' + ', $area, '
    '; + else + echo ' + ', $area, '
    '; + } + + echo ' +
    + + '; +} + +// Part of the admin layer - used with admin_above to close the table started in it. +function template_admin_below() +{ + global $context, $settings, $options; + + echo ' + + + '; +} + +// This is the administration center home. +function template_admin() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + // Welcome message for the admin. + echo ' + + + + + + +
    ', $txt[208], '
    + ', $txt['hello_guest'], ' ', $context['user']['name'], '! +
    ', $txt[644], '
    +
    '; + + // Is there an update available? + echo ' + '; + + echo ' + '; + + // Display the "live news" from simplemachines.org. + echo ' + + '; + + // Show the user version information from their server. + echo ' + +
    + + + + + + +
    + ', $txt[119], ' ', $txt['smf217'], ' +
    +
    ', $txt['lfyi'], '
    +
    +
      + + + + + + +
    ', $txt['support_title'], '
    + ', $txt['support_versions'], ':
    + ', $txt['support_versions_forum'], ': + ', $context['forum_version'], '
    + ', $txt['support_versions_current'], ': + ??
    + ', $context['can_admin'] ? '' . $txt['dvc_more'] . '' : '', '
    '; + + // Display all the members who can administrate the forum. + echo ' +
    + ', $txt[684] . ': + ', implode(', ', $context['administrators']), ' +
    +
    '; + + echo ' + + '; + + $row = false; + foreach ($context['quick_admin_tasks'] as $task) + { + echo ' + '; + + if ($row && !$task['is_last']) + echo ' + + '; + + $row = !$row; + } + + echo ' + +
    +
    ', $task['link'], '
    + ', $task['description'], ' +
    '; + + // The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization. + echo ' + + '; + + // This sets the announcements and current versions themselves ;). + echo ' + '; +} + +// Show some support information and credits to those who helped make this. +function template_credits() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Show the user version information from their server. + echo ' + + + + + + +
    ', $txt['support_title'], '
    + ', $txt['support_versions'], ':
    + ', $txt['support_versions_forum'], ': + ', $context['forum_version'], '', $context['can_admin'] ? ' ' . $txt['dvc_more'] . '' : '', '
    + ', $txt['support_versions_current'], ': + ??
    '; + + // Display all the variables we have server information for. + foreach ($context['current_versions'] as $version) + echo ' + ', $version['title'], ': + ', $version['version'], '
    '; + + echo ' + +
    '; + + // Display latest support questions from simplemachines.org. + echo ' + + + + + + +
    ', $txt[119], ' ', $txt['support_latest'], '
    +
    ', $txt['support_latest_fetch'], '
    +
    '; + + // The most important part - the credits :P. + echo ' + + + + + + +
    ', $txt[571], '
    ', $context['credits'], '
    '; + + // This makes all the support information available to the support script... + echo ' + + + + '; + + // This setsthe latest support stuff. + echo ' + '; +} + +// Form for editing current news on the site. +function template_edit_news() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + + + '; + + // Loop through all the current news items so you can edit/remove them. + foreach ($context['admin_current_news'] as $admin_news) + echo ' + + + '; + + // This provides an empty text box to add a news item to the site. + echo ' + + + + +
    + ', $txt[119], ' ', $txt[7], ' +
    ', $txt[670], '
    ', $txt[507], '
    +
    +
    +
    ', $admin_news['parsed'], '
    +
    + +
    + + + + +
    + +
    '; +} + +// Form for editing the agreement shown for people registering to the forum. +function template_edit_agreement() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Just a big box to edit the text file ;). + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' ', $txt['smf11'], ' +
    '; + + // Warning for if the file isn't writable. + if (!empty($context['warning'])) + echo ' +
    ', $context['warning'], '
    '; + + echo ' + ', $txt['smf12'], ' +
    '; + + // Show the actual agreement in an oversized text box. + echo ' +
    +
    +
    + +
    + +
    '; +} + +// Displays information about file versions installed, and compares them to current version. +function template_view_versions() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + + + + + + + +
    ', $txt[429], '
    ', $txt['dvc1'], '
    + + + + '; + + // The current version of the core SMF package. + echo ' + + + '; + + // Now list all the source file versions, starting with the overall version (if all match!). + echo ' + + + +
    ', $txt[495], '', $txt['dvc_your'], '', $txt['dvc_current'], '
    ', $txt[496], '', $context['forum_version'], '??
    ', $txt['dvc_sources'], '????
    + '; + + // Loop through every source file displaying its version - using javascript. + foreach ($context['file_versions'] as $filename => $version) + echo ' + + + '; + + // Default template files. + echo ' +
    ', $filename, '', $version, '??
    + + + + +
    ', $txt['dvc_default'], '????
    + '; + + foreach ($context['default_template_versions'] as $filename => $version) + echo ' + + + '; + + // Now the language files... + echo ' +
    ', $filename, '', $version, '??
    + + + + +
    ', $txt['dvc_languages'], '????
    + '; + + foreach ($context['default_language_versions'] as $language => $files) + { + foreach ($files as $filename => $version) + echo ' + + + '; + } + + echo ' +
    ', $filename, '.', $language, '.php', $version, '??
    '; + + // Finally, display the version information for the currently selected theme - if it is not the default one. + if (!empty($context['template_versions'])) + { + echo ' + + + + +
    ', $txt['dvc_templates'], '????
    + '; + + foreach ($context['template_versions'] as $filename => $version) + echo ' + + + '; + + echo ' +
    ', $filename, '', $version, '??
    '; + } + + echo ' +
    '; + + /* Below is the hefty javascript for this. Upon opening the page it checks the current file versions with ones + held at simplemachines.org and works out if they are up to date. If they aren't it colors that files number + red. It also contains the function, swapOption, that toggles showing the detailed information for each of the + file catorgories. (sources, languages, and templates.) */ + echo ' + + '; + + // Internet Explorer 4 is tricky, it won't set any innerHTML until after load. + if ($context['browser']['is_ie4']) + echo ' + '; + else + echo ' + '; +} + +// Form for stopping people using naughty words, etc. +function template_edit_censored() +{ + global $context, $settings, $options, $scripturl, $txt; + + // First section is for adding/removing words from the censored list. + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' ', $txt[135], ' +
    ', $txt[141], '
    + ', $txt[136], '
    '; + + // Show text boxes for censoring [bad ] => [good ]. + foreach ($context['censored_words'] as $vulgar => $proper) + echo ' +
    =>
    '; + + // Now provide a way to censor more words. + echo ' + + +
    +
    +
    +
    +
    +
    + +
    + + +
    '; + + // This table lets you test out your filters by typing in rude words and seeing what comes out. + echo ' + + + + + + +
    ', $txt['censor_test'], '
    + + +
    + +
    '; +} + +// Template for forum maintenance page. +function template_maintain() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Starts off with general maintenance procedures. + echo ' + + + + + + + '; + + // Backing up the database...? Good idea! + echo ' + + + + + + '; + + // Pruning any older posts. + echo ' + + + + + + +
    ', $txt[119], ' ', $txt['maintain_title'], ' - ', $txt['maintain_general'], '
    + ', $txt['maintain_optimize'], '
    + ', $txt['maintain_version'], '
    + ', $txt['maintain_errors'], '
    + ', $txt['maintain_recount'], '
    + ', $txt['maintain_logs'], '
    + +', $txt['maintain_karmalog'], '
    +
    ', $txt[119], ' ', $txt['maintain_title'], ' - ', $txt['maintain_backup'], '
    +
    +
    +
    +
    + +
    + + +
    +
    ', $txt[119], ' ', $txt['maintain_title'], ' - ', $txt['maintain_old'], '
    + '; + + // Bit of javascript for showing which boards to prune in an otherwise hidden list. + echo ' + '; + + // The otherwise hidden "choose which boards to prune". + echo ' +
    + ', $txt['maintain_old1'], '', $txt['maintain_old2'], '
    +
    + + ', $txt['maintain_old_all'], ' + + +
    + +
    +
    '; + + // Pop up a box to say function completed if the user has been redirected back here from a function they ran. + if ($context['maintenance_finished']) + echo ' + '; +} + +?> \ No newline at end of file diff --git a/Themes/default/BoardIndex.template.php b/Themes/default/BoardIndex.template.php new file mode 100644 index 0000000..1a50062 --- /dev/null +++ b/Themes/default/BoardIndex.template.php @@ -0,0 +1,484 @@ + + + ', theme_linktree(), ' + '; + if (!$settings['show_sp1_info']) + echo ' + ', $txt[19], ': ', $modSettings['memberCount'], '  •  ', $txt[95], ': ', $modSettings['totalMessages'], '  •  ', $txt[64], ': ', $modSettings['totalTopics'], ' + ', ($settings['show_latest_member'] ? '
    ' . $txt[201] . ' ' . $context['latest_member']['link'] . '' . $txt[581] : ''); + echo ' + + +'; + + + // Show the news fader? (assuming there are things to show...) + // REMOVE THE ZERO!!! + if ($settings['show_newsfader'] && !empty($context['fader_news_lines'])) + { + echo ' +
    + + + + + + + +
    ', $txt[102], '
    '; + + // Prepare all the javascript settings. + echo ' +
    ', $context['news_lines'][0], '
    + + +
    +
    '; + } + + /* Each category in categories is made up of: + id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?), + new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge), + and boards. (see below.) */ + + + foreach ($context['categories'] as $category) + { + echo ' +
    + + + '; + + // Assuming the category hasn't been collapsed... + if (!$category['is_collapsed']) + { + /* Each board in each category's boards has: + new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.), + children (see below.), link_children (easier to use.), children_new (are they new?), + topics (# of), posts (# of), link, href, and last_post. (see below.) */ + foreach ($category['boards'] as $board) + { + echo ' + + + '; +/* + +*/ echo ' + + '; + } + } + + echo ' +
    '; + + // If this category even can collapse, show a link to collapse it. + if ($category['can_collapse']) + echo ' + ', $category['collapse_image'], ''; + + echo ' + ', $category['link'], ' +
    '; + + // If the board is new, show a strong indicator. + if ($board['new']) + echo '', $txt[333], ''; + // This board doesn't have new posts, but its children do. + elseif ($board['children_new']) + echo '', $txt[333], ''; + // No new posts at all! The agony!! + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) + if (false && !empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) + if (!empty($board['children'])) + { + // Sort the links into an array with new boards bold so it can be imploded. + $children = array(); + /* Each child in each board's children has: + id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', implode('
    ', $children), '
    '; + } + + // Show some basic information about the number of posts, etc. + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + /* The board's and children's 'last_post's have: + time, timestamp (a number that represents the time.), id (of the post), topic (topic id.), + link, href, subject, start (where they should go for the first unread post.), + and member. (which has id, name, link, href, username in it.) */ + if (!empty($board['last_post']['id'])) + echo ' + ', $board['last_post']['link'], ' (', $board['last_post']['member']['link'], ') ', $board['last_post']['time']; + + echo ' +
    +
    '; + } + if ($context['user']['is_logged']) + { + echo ' +
    + + + + +
    + ', $txt[333], ' + ', $txt[334], ' + '; + // Show the mark all as read button? + if ($settings['show_mark_read']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]), ''; + echo ' +
    '; + + } + + // Here's where the "Info Center" starts... + echo ' +
    +
    + + + '; + + // This is the "Recent Posts" bar. + if (!empty($settings['number_recent_posts'])) + { + echo ' + + + + + + + '; + } + + // Show information about events, birthdays, and holidays on the calendar. + if ($context['show_calendar']) + { + echo ' + + + + + + '; + } + + // Show a member bar. Not heavily ornate, but functional at least. + if ($settings['show_member_bar']) + { + echo ' + + + + + + + '; + } + + + +// Show YaBB SP1 style information... + if ($settings['show_sp1_info']) + { + echo ' + + + + + + + '; + } + + + /* if ($settings['show_sp1_info']) + { + echo ' + + + + + + + '; + }*/ +// "Users online" - in order of activity. + echo ' + + + + + + '; + + // If they are logged in, but SP1 style information is off... show a personal message bar. + if ($context['user']['is_logged'] && !$settings['show_sp1_info']) + { + echo ' + + + + + + '; + } + + // Show the login bar. (it's only true if they are logged out anyway.) + if ($context['show_login_bar']) + { + echo ' + + + + + + + '; + } + + echo ' +
    ', $txt[685], '
    ', $txt[214], '
    + + ', $txt[214], ' + '; + + // Only show one post. + if ($settings['number_recent_posts'] == 1) + { + // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.) + echo ' + ', $txt[214], ' +
    + ', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')
    +
    '; + } + // Show lots of posts. + elseif (!empty($context['latest_posts'])) + { + echo ' + '; + /* Each post in latest_posts has: + board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), + subject, short_subject (shortened with...), time, link, and href. */ + foreach ($context['latest_posts'] as $post) + echo ' + + + + + '; + echo ' +
    [', $post['board']['link'], ']', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '', $post['time'], '
    '; + } + echo ' +
    ', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '
    + + ', $txt['calendar24'], ' + + '; + + // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P. + if (!empty($context['calendar_holidays'])) + echo ' + ', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), '
    '; + + // People's birthdays. Like mine. And yours, I guess. Kidding. + if (!empty($context['calendar_birthdays'])) + { + echo ' + ', $context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], ' '; + /* Each member in calendar_birthdays has: + id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */ + foreach ($context['calendar_birthdays'] as $member) + echo ' + ', $member['is_today'] ? '' : '', $member['name'], $member['is_today'] ? '' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '
    ' : ', '; + } + // Events like community get-togethers. + if (!empty($context['calendar_events'])) + { + echo ' + ', $context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], ' '; + /* Each event in calendar_events should have: + title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */ + foreach ($context['calendar_events'] as $event) + echo ' + ', $event['can_edit'] ? '* ' : '', '', $event['is_today'] ? '' . $event['title'] . '' : $event['title'], '', $event['is_last'] ? '
    ' : ', '; + + // Show a little help text to help them along ;). + if ($context['calendar_can_edit']) + echo ' + (', $txt['calendar_how_edit'], ')'; + } + echo ' +
    +
    ', $txt[331], '
    + + ', $txt[332], ' + + ', $txt[332], ' +
    ', $txt[200], '
    +
    ', $txt[645], '
    + + ', $txt[645], ' + + + + +
    +
    ', $txt[490], ': ', $modSettings['totalTopics'], '
    ', $txt[489], ': ', $modSettings['totalMessages'], '
    ', !empty($context['latest_post']) ? ' + ' . $txt[659] . ': "' . $context['latest_post']['link'] . '" (' . $context['latest_post']['time'] . ')
    ' : '', ' + ', $txt[234], '', $context['show_stats'] ? '
    + ' . $txt['smf223'] . '' : '', ' +
    + ', $txt[488], ': ', $modSettings['memberCount'], '
    + ', $txt[656], ': ', $context['latest_member']['link'], '
    '; + // If they are logged in, show their unread message count, etc.. + if ($context['user']['is_logged']) + echo ' + ', $txt['smf199'], ': ', $context['user']['messages'], ' ', $txt['newmessages3'], ': ', $context['user']['unread_messages'], ''; + echo ' +
    +
    ', $txt[645], '
    + ', $txt[645], ' + + + ', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': ', $context['common_stats']['latest_member']['link'], ' +
    ' . $txt[659] . ': "' . $context['latest_post']['link'] . '" ( ' . $context['latest_post']['time'] . ' )
    + ', $txt[234], '', $context['show_stats'] ? '
    + ' . $txt['smf223'] . '' : '', ' + + '; + if ((!empty($modSettings['karmadescmod'])) && (empty($modSettings['karmaisowner']))) + { if ($context['show_karmastat']) + echo ' + '. $txt['statkarma'].'',' '; + } + elseif ((!empty($modSettings['karmadescmod'])) && ($context['user']['is_admin'])) + { if ($context['show_karmastat']) + echo ' + '. $txt['statkarma'].'',' '; +} + echo' +
    +
    ', $txt[158], '
    + + ', $txt[158], ' + + ', /*(empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '),*/ $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'], (empty($context['num_users_hidden']) ? '' : ' (' . $context['num_users_hidden'] . ' ' . $txt['hidden'] . ')'), '
    + '; + + // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link. + if (!empty($context['users_online'])) + echo ' + ', $txt[140], ':
    ', implode(', ', $context['list_users_online']); + + if (!empty($context['spiders'])) + { + if ($modSettings['ob_googlebot_display_own_list']) + echo ' +
    + ', $txt['ob_googlebot_spiders_last_active'], ':
    '; + else + { + if (empty($context['users_online'])) + echo ' + ', $txt[140], ':
    '; + else + echo ', '; + } + + echo implode(', ', $context['spiders']); + } + + echo ' +
    ', $context['show_stats'] && !$settings['show_sp1_info'] ? ' + ' . $txt['smf223'] . '' : '', ' +
    +
    ', $txt[159], '
    + + ', $txt[159], ' + + ', $txt[159], ' +
    + ', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' ', $txt[662], ' ', $txt[663], ' +
    +
    ', $txt[34], ' (' . $txt[315] . ')
    + + ', $txt[34], ' + +
    + + + + + + +
    + + + + + + + + + +
    +
    +
    '; +} + +?> diff --git a/Themes/default/Calendar.template.php b/Themes/default/Calendar.template.php new file mode 100644 index 0000000..cf3a3d5 --- /dev/null +++ b/Themes/default/Calendar.template.php @@ -0,0 +1,164 @@ + +
    ', theme_linktree(), '
    + + + '; + + // Show each day of the week. + foreach ($context['week_days'] as $day) + echo ' + '; + echo ' + '; + + /* Each week in weeks contains the following: + days (a list of days), number (week # in the year.) */ + foreach ($context['weeks'] as $week) + { + echo ' + '; + + /* Every day has the following: + day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?), + holidays, events, birthdays. (last three are lists.) */ + foreach ($week['days'] as $day) + { + // If this is today, make it a different color and show a border. + echo ' + '; + } + + echo ' + '; + } + + echo ' +
    ' . $months[$context['current_month']] . ' ' . $context['current_year'] . '
    ' . $days[$day] . '
    '; + + // Skip it if it should be blank - it's not a day if it has no number. + if (!empty($day['day'])) + { + // Should the day number be a link? + if (!empty($modSettings['cal_daysaslink']) && $context['can_post']) + echo ' + ', $day['day'], ''; + else + echo ' + ', $day['day'], ''; + + // Is this the first day of the week? (and are we showing week numbers?) + if ($day['is_first_day']) + echo ' - ', $txt['calendar51'], ' ', $week['number']; + + // Are there any holidays? + if (!empty($day['holidays'])) + echo ' +
    + ', $txt['calendar5'], ' ', implode(', ', $day['holidays']), '
    '; + + // Show any birthdays... + if (!empty($day['birthdays'])) + { + echo ' +
    + ', $txt['calendar3'], ' '; + + /* Each of the birthdays has: + id, name (person), age (if they have one set?), and is_last. (last in list?) */ + foreach ($day['birthdays'] as $member) + echo ' + ', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '' : ', '; + echo ' +
    '; + } + + // Any special posted events? + if (!empty($day['events'])) + { + echo ' +
    + ', $txt['calendar4'], ' '; + /* The events are made up of: + title, href, is_last, can_edit (are they allowed to?), and modify_href. */ + foreach ($day['events'] as $event) + { + // If they can edit the event, show a star they can click on.... + if ($event['can_edit']) + echo ' + * '; + + echo ' + ', $event['title'], '', $event['is_last'] ? '' : ', '; + } + echo ' +
    '; + } + echo '
    '; + } + + echo ' +
    + + + + + + + + +
    '; + + // Is there a calendar for last month to look at? + if (isset($context['previous_calendar'])) + echo ' +  « ', $months_short[$context['previous_calendar']['month']], ' ', $context['previous_calendar']['year'], ''; + echo ' + '; + // Show a little "post event" button? + if ($context['can_post']) + echo ' + ', $settings['use_image_buttons'] ? '' . $txt['calendar23'] . '' : $txt['calendar23'], ''; + echo ' + +   +   + + '; + // Show another post button just for symmetry. + if ($context['can_post']) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt['calendar23'] . '' : $txt['calendar23']) . ''; + echo ' + '; + + // Is there a calendar for next month? + if (isset($context['next_calendar'])) + echo ' + ' . $months_short[$context['next_calendar']['month']] . ' ' . $context['next_calendar']['year'] . ' » '; + echo ' +
    + '; +} + +?> diff --git a/Themes/default/Clusterer.js b/Themes/default/Clusterer.js new file mode 100644 index 0000000..45b2526 --- /dev/null +++ b/Themes/default/Clusterer.js @@ -0,0 +1,586 @@ +// Clusterer.js - marker clustering routines for Google Maps apps +// +// Using these routines is very simple. +// +// 1) Load the routines into your code: +// +// +// 2) Create a Clusterer object, passing it your map object: +// +// var clusterer = new Clusterer( map ); +// +// 3) Wherever you now do map.addOverlay( marker ), instead call +// clusterer.AddMarker( marker, title ). The title is just a +// short descriptive string to use in the cluster info-boxes. +// +// 4) If you are doing any map.removeOverlay( marker ) calls, change those +// to clusterer.RemoveMarker( marker ). +// +// That's it! Everything else happens automatically. +// +// +// Copyright 2005 by Jef Poskanzer . +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// For commentary on this license please see http://www.acme.com/license.html + + +var defaultMaxVisibleMarkers = 150; +var defaultGridSize = 5; +var defaultMinMarkersPerCluster = 5; +var defaultMaxLinesPerInfoBox = 10; + +var defaultIcon = new GIcon(); +defaultIcon.image = 'http://www.acme.com/resources/images/markers/blue_large.PNG'; +defaultIcon.shadow = 'http://www.acme.com/resources/images/markers/shadow_large.PNG'; +defaultIcon.iconSize = new GSize( 30, 51 ); +defaultIcon.shadowSize = new GSize( 56, 51 ); +defaultIcon.iconAnchor = new GPoint( 13, 34 ); +defaultIcon.infoWindowAnchor = new GPoint( 13, 3 ); +defaultIcon.infoShadowAnchor = new GPoint( 27, 37 ); + + +// Constructor. +function Clusterer( map ) + { + this.map = map; + this.markers = []; + this.clusters = []; + this.timeout = null; + this.currentZoomLevel = map.getZoomLevel(); + + this.maxVisibleMarkers = defaultMaxVisibleMarkers; + this.gridSize = defaultGridSize; + this.minMarkersPerCluster = defaultMinMarkersPerCluster; + this.maxLinesPerInfoBox = defaultMaxLinesPerInfoBox; + this.icon = defaultIcon; + + GEvent.addListener( map, 'zoom', ClustererMakeCaller( ClustererDisplay, this ) ); + GEvent.addListener( map, 'moveend', ClustererMakeCaller( ClustererDisplay, this ) ); + GEvent.addListener( map, 'infowindowclose', ClustererMakeCaller( ClustererPopDown, this ) ); + } + + +// Call this to change the cluster icon. +Clusterer.prototype.SetIcon = function ( icon ) + { + this.icon = icon; + } + + +// Call this to add a marker. +Clusterer.prototype.AddMarker = function ( marker, title ) + { + // Putting the map into a marker property is not mentioned in the API, + // but it lets up pop up an infobox for markers which have not yet been + // added to the map. + marker.map = this.map; + marker.title = title; + this.markers.push( marker ); + this.DisplayLater(); + } + + +// Call this to remove a marker. +Clusterer.prototype.RemoveMarker = function ( marker ) + { + for ( var i = 0; i < this.markers.length; ++i ) + if ( this.markers[i] == marker ) + { + if ( marker.onMap ) + this.map.removeOverlay( marker ); + for ( j = 0; j < this.clusters.length; ++j ) + { + cluster = clusterer.clusters[j]; + if ( cluster != null ) + { + for ( k = 0; k < cluster.markers.length; ++k ) + if ( cluster.markers[k] == marker ) + { + cluster.markers[k] = null; + --cluster.markerCount; + break; + } + if ( cluster.markerCount == 0 ) + { + this.ClearCluster( cluster ); + clusterer.clusters[j] = null; + } + else if ( cluster == this.poppedUpCluster ) + ClustererRePop( this ); + } + } + this.markers[i] = null; + break; + } + this.DisplayLater(); + } + +Clusterer.prototype.DisplayLater = function () + { + if ( this.timeout != null ) + window.clearTimeout( this.timeout ); + this.timeout = window.setTimeout( ClustererMakeCaller( ClustererDisplay, this ), 50 ); + } + + +function ClustererDisplay( clusterer ) + { + var i, j, marker, cluster, point; + + window.clearTimeout( clusterer.timeout ); + + var newZoomLevel = clusterer.map.getZoomLevel(); + if ( newZoomLevel != clusterer.currentZoomLevel ) + { + // When the zoom level changes, we have to remove all the clusters. + for ( i = 0; i < clusterer.clusters.length; ++i ) + if ( clusterer.clusters[i] != null ) + { + clusterer.ClearCluster( clusterer.clusters[i] ); + clusterer.clusters[i] = null; + } + clusterer.clusters.length = 0; + clusterer.currentZoomLevel = newZoomLevel; + } + + // Get the current bounds of the visible area. + var bounds = clusterer.map.getBoundsLatLng(); + + // Expand the bounds a little, so things look smoother when scrolling + // by small amounts. + var dx = bounds.maxX - bounds.minX; + var dy = bounds.maxY - bounds.minY; + dx *= 0.10; + dy *= 0.10; + bounds.maxX += dx; + bounds.minX -= dx; + bounds.maxY += dy; + bounds.minY -= dy; + + // Partition the markers into visible and non-visible lists. + var visibleMarkers = []; + var nonvisibleMarkers = []; + for ( i = 0; i < clusterer.markers.length; ++i ) + { + marker = clusterer.markers[i]; + if ( marker != null ) + if ( ClustererPointInBounds( marker.point, bounds ) ) + visibleMarkers.push( marker ); + else + nonvisibleMarkers.push( marker ); + } + + // Take down the non-visible markers. + for ( i = 0; i < nonvisibleMarkers.length; ++i ) + { + marker = nonvisibleMarkers[i]; + if ( marker.onMap ) + { + clusterer.map.removeOverlay( marker ); + marker.onMap = false; + } + } + + // Take down the non-visible clusters. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null && ! ClustererPointInBounds( cluster.marker.point, bounds ) && cluster.onMap ) + { + clusterer.map.removeOverlay( cluster.marker ); + cluster.onMap = false; + } + } + + // Clustering! This is some complicated stuff. We have three goals + // here. One, limit the number of markers & clusters displayed, so the + // maps code doesn't slow to a crawl. Two, when possible keep existing + // clusters instead of replacing them with new ones, so that the app pans + // better. And three, of course, be CPU and memory efficient. + if ( visibleMarkers.length > clusterer.maxVisibleMarkers ) + { + // Add to the list of clusters by splitting up the current bounds + // into a grid. + var latRange = bounds.maxY - bounds.minY; + var latInc = latRange / clusterer.gridSize; + var lonInc = latInc / Math.cos( ( bounds.maxY + bounds.minY ) / 2.0 * Math.PI / 180.0 ); + for ( var lat = bounds.minY; lat <= bounds.maxY; lat += latInc ) + for ( var lon = bounds.minX; lon <= bounds.maxX; lon += lonInc ) + { + cluster = new Object(); + cluster.clusterer = clusterer; + cluster.bounds = new GBounds( lon, lat, lon + lonInc, lat + latInc ); + cluster.markers = []; + cluster.markerCount = 0; + cluster.onMap = false; + cluster.marker = null; + clusterer.clusters.push( cluster ); + } + + // Put all the unclustered visible markers into a cluster - the first + // one it fits in, which favors pre-existing clusters. + for ( i = 0; i < visibleMarkers.length; ++i ) + { + marker = visibleMarkers[i]; + if ( marker != null && ! marker.inCluster ) + { + for ( j = 0; j < clusterer.clusters.length; ++j ) + { + cluster = clusterer.clusters[j]; + if ( cluster != null && ClustererPointInBounds( marker.point, cluster.bounds ) ) + { + cluster.markers.push( marker ); + ++cluster.markerCount; + marker.inCluster = true; + } + } + } + } + + // Get rid of any clusters containing only a few markers. + for ( i = 0; i < clusterer.clusters.length; ++i ) + if ( clusterer.clusters[i] != null && clusterer.clusters[i].markerCount < clusterer.minMarkersPerCluster ) + { + clusterer.ClearCluster( clusterer.clusters[i] ); + clusterer.clusters[i] = null; + } + + // Shrink the clusters list. + for ( i = clusterer.clusters.length - 1; i >= 0; --i ) + if ( clusterer.clusters[i] != null ) + break; + else + --clusterer.clusters.length; + + // Ok, we have our clusters. Go through the markers in each + // cluster and remove them from the map if they are currently up. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null ) + { + for ( j = 0; j < cluster.markers.length; ++j ) + { + marker = cluster.markers[j]; + if ( marker != null && marker.onMap ) + { + clusterer.map.removeOverlay( marker ); + marker.onMap = false; + } + } + } + } + + // Now make cluster-markers for any clusters that need one. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null && cluster.marker == null ) + { + // Figure out the average coordinates of the markers in this + // cluster. + var xTotal = 0.0, yTotal = 0.0; + for ( j = 0; j < cluster.markers.length; ++j ) + { + marker = cluster.markers[j]; + if ( marker != null ) + { + xTotal += ( + marker.point.x ); + yTotal += ( + marker.point.y ); + } + } + point = new GPoint( xTotal / cluster.markerCount, yTotal / cluster.markerCount ); + marker = new GMarker( point, clusterer.icon ); + cluster.marker = marker; + GEvent.addListener( marker, 'click', ClustererMakeCaller( ClustererPopUp, cluster ) ); + } + } + } + + // Display the visible markers not already up and not in clusters. + for ( i = 0; i < visibleMarkers.length; ++i ) + { + marker = visibleMarkers[i]; + if ( marker != null && ! marker.onMap && ! marker.inCluster ) + { + clusterer.map.addOverlay( marker ); + var title = marker.title; + if ( title ) + ClustererSetTooltip( marker, title ); + marker.onMap = true; + } + } + + // Display the visible clusters not already up. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null && ! cluster.onMap && ClustererPointInBounds( cluster.marker.point, bounds ) ) + { + clusterer.map.addOverlay( cluster.marker ); + cluster.onMap = true; + } + } + + // In case a cluster is currently popped-up, re-pop to get any new + // markers into the infobox. + ClustererRePop( clusterer ); + } + + +function ClustererPopUp( cluster ) + { + var clusterer = cluster.clusterer; + var html = ''; + var n = 0; + for ( var i = 0; i < cluster.markers.length; ++i ) + { + var marker = cluster.markers[i]; + if ( marker != null ) + { + ++n; + html += ''; + if ( n == clusterer.maxLinesPerInfoBox - 1 && cluster.markerCount > clusterer.maxLinesPerInfoBox ) + { + html += ''; + break; + } + } + } + html += '
    '; + if ( marker.icon.smallImage ) + html += ''; + else + html += ''; + html += '' + marker.title + '
    ...and ' + ( cluster.markerCount - n ) + ' more
    '; + clusterer.poppedUpCluster = cluster; + cluster.marker.openInfoWindowHtml( html ); + } + + +function ClustererRePop( clusterer ) + { + if ( clusterer.poppedUpCluster != null ) + ClustererPopUp( poppedUpCluster ); + } + + +function ClustererPopDown( clusterer ) + { + clusterer.poppedUpCluster = null; + } + + +Clusterer.prototype.ClearCluster = function ( cluster ) + { + var i, marker; + + for ( i = 0; i < cluster.markers.length; ++i ) + if ( cluster.markers[i] != null ) + { + cluster.markers[i].inCluster = false; + cluster.markers[i] = null; + } + cluster.markers.length = 0; + cluster.markerCount = 0; + if ( cluster == this.poppedUpCluster ) + this.map.closeInfoWindow(); + if ( cluster.onMap ) + { + this.map.removeOverlay( cluster.marker ); + cluster.onMap = false; + } + } + + +function ClustererPointInBounds( point, bounds ) + { + var x = ( + point.x ); + var y = ( + point.y ); + return x >= bounds.minX && x <= bounds.maxX && + y >= bounds.minY && y <= bounds.maxY; + } + + +// This returns a function closure that calls the given routine with the +// specified arg. +function ClustererMakeCaller( func, arg ) + { + return function () { func( arg ); }; + } + + +function ClustererSetTooltip( marker, title ) + { + // Tooltips are in text, not HTML, so we have to strip any HTML stuff + // out of the title. + var textTitle = ClustererDeHtmlize( title ); + + // Now add the title to whichever parts of the marker are present. + if ( marker.transparentIcon ) + marker.transparentIcon.setAttribute( 'title' , textTitle ); + if ( marker.imageMap ) + marker.imageMap.setAttribute( 'title' , textTitle ); + if ( marker.iconImage ) + marker.iconImage.setAttribute( 'title' , textTitle ); + } + + +function ClustererEntityToIso8859( inStr ) + { + var outStr = ''; + for ( var i = 0; i < inStr.length; ++i ) + { + var c = inStr.charAt( i ); + if ( c != '&' ) + outStr += c; + else + { + var semi = inStr.indexOf( ';', i ); + if ( semi == -1 ) + outStr += c; + else + { + var entity = inStr.substring( i + 1, semi ); + if ( entity == 'iexcl' ) outStr += ''; + else if ( entity == 'copy' ) outStr += ''; + else if ( entity == 'laquo' ) outStr += ''; + else if ( entity == 'reg' ) outStr += ''; + else if ( entity == 'deg' ) outStr += ''; + else if ( entity == 'raquo' ) outStr += ''; + else if ( entity == 'iquest' ) outStr += ''; + else if ( entity == 'Agrave' ) outStr += ''; + else if ( entity == 'Aacute' ) outStr += ''; + else if ( entity == 'Acirc' ) outStr += ''; + else if ( entity == 'Atilde' ) outStr += ''; + else if ( entity == 'Auml' ) outStr += ''; + else if ( entity == 'Aring' ) outStr += ''; + else if ( entity == 'AElig' ) outStr += ''; + else if ( entity == 'Ccedil' ) outStr += ''; + else if ( entity == 'Egrave' ) outStr += ''; + else if ( entity == 'Eacute' ) outStr += ''; + else if ( entity == 'Ecirc' ) outStr += ''; + else if ( entity == 'Euml' ) outStr += ''; + else if ( entity == 'Igrave' ) outStr += ''; + else if ( entity == 'Iacute' ) outStr += ''; + else if ( entity == 'Icirc' ) outStr += ''; + else if ( entity == 'Iuml' ) outStr += ''; + else if ( entity == 'Ntilde' ) outStr += ''; + else if ( entity == 'Ograve' ) outStr += ''; + else if ( entity == 'Oacute' ) outStr += ''; + else if ( entity == 'Ocirc' ) outStr += ''; + else if ( entity == 'Otilde' ) outStr += ''; + else if ( entity == 'Ouml' ) outStr += ''; + else if ( entity == 'Oslash' ) outStr += ''; + else if ( entity == 'Ugrave' ) outStr += ''; + else if ( entity == 'Uacute' ) outStr += ''; + else if ( entity == 'Ucirc' ) outStr += ''; + else if ( entity == 'Uuml' ) outStr += ''; + else if ( entity == 'Yacute' ) outStr += ''; + else if ( entity == 'szlig' ) outStr += ''; + else if ( entity == 'agrave' ) outStr += ''; + else if ( entity == 'aacute' ) outStr += ''; + else if ( entity == 'acirc' ) outStr += ''; + else if ( entity == 'atilde' ) outStr += ''; + else if ( entity == 'auml' ) outStr += ''; + else if ( entity == 'aring' ) outStr += ''; + else if ( entity == 'aelig' ) outStr += ''; + else if ( entity == 'ccedil' ) outStr += ''; + else if ( entity == 'egrave' ) outStr += ''; + else if ( entity == 'eacute' ) outStr += ''; + else if ( entity == 'ecirc' ) outStr += ''; + else if ( entity == 'euml' ) outStr += ''; + else if ( entity == 'igrave' ) outStr += ''; + else if ( entity == 'iacute' ) outStr += ''; + else if ( entity == 'icirc' ) outStr += ''; + else if ( entity == 'iuml' ) outStr += ''; + else if ( entity == 'ntilde' ) outStr += ''; + else if ( entity == 'ograve' ) outStr += ''; + else if ( entity == 'oacute' ) outStr += ''; + else if ( entity == 'ocirc' ) outStr += ''; + else if ( entity == 'otilde' ) outStr += ''; + else if ( entity == 'ouml' ) outStr += ''; + else if ( entity == 'oslash' ) outStr += ''; + else if ( entity == 'ugrave' ) outStr += ''; + else if ( entity == 'uacute' ) outStr += ''; + else if ( entity == 'ucirc' ) outStr += ''; + else if ( entity == 'uuml' ) outStr += ''; + else if ( entity == 'yacute' ) outStr += ''; + else if ( entity == 'yuml' ) outStr += ''; + else if ( entity == 'nbsp' ) outStr += ' '; + else if ( entity == 'lt' ) outStr += '<'; + else if ( entity == 'gt' ) outStr += '>'; + else if ( entity == 'amp' ) outStr += '&'; + else outStr += '&' + entity + ';'; + i += entity.length + 1; + } + } + } + return outStr; + } + + +function ClustererDeEntityize( inStr ) + { + var outStr = ''; + for ( var i = 0; i < inStr.length; ++i ) + { + var c = inStr.charAt( i ); + if ( c != '&' ) + outStr += c; + else + { + var semi = inStr.indexOf( ';', i ); + if ( semi != -1 ) + i = semi; + } + } + return outStr; + } + + +function ClustererDeElementize( inStr ) + { + var outStr = ''; + for ( var i = 0; i < inStr.length; ++i ) + { + var c = inStr.charAt( i ); + if ( c != '<' ) + outStr += c; + else + { + var gt = inStr.indexOf( '>', i ); + if ( gt != -1 ) + i = gt; + } + } + return outStr; + } + + +function ClustererDeHtmlize( str ) + { + return ClustererDeEntityize( ClustererEntityToIso8859( ClustererDeElementize( str ) ) ); + } diff --git a/Themes/default/DescriptionKarma.template.php b/Themes/default/DescriptionKarma.template.php new file mode 100644 index 0000000..2219ade --- /dev/null +++ b/Themes/default/DescriptionKarma.template.php @@ -0,0 +1,48 @@ + + +', theme_linktree(), '
    +
    + + + + + + + + + + + + + + + +
    ',$txt['whykarmamod'],''; + if ($_REQUEST['sa'] == 'applaud') echo $txt['karmadescappl']; else echo $txt['karmadescsmi']; echo'
    ', $txt['karmamoder'], '
    ',$txt['karmarequare'],'
    +
    '; + + + +} +?> diff --git a/Themes/default/Display.template.php b/Themes/default/Display.template.php new file mode 100644 index 0000000..d0c250c --- /dev/null +++ b/Themes/default/Display.template.php @@ -0,0 +1,1088 @@ + +', $context['first_new_message'] ? '' : ''; + + // Show the linktree as well as the "Who's Viewing" information. + echo theme_linktree(); + + // Show the topic information - icon, subject, etc. + echo ' +

    ',$context['subject'], '

    '; + if (! empty ($context['subtitle'])) + echo ' +

    ' . $context['subtitle'] . '

    '; +/* echo ' + ', $context['moderators_list'],'';*/ + + // Is there any related topics? + if (!empty($context['related_topics'])) + { + echo ' + '; + } + + + // Is this topic also a poll? + if ($context['is_poll']) + { + echo ' + + + + + + + + +
    + ', $txt['smf43'], ' +
    ', $txt['smf21'], ': + ', $context['poll']['question']; + if (!empty($context['poll']['expire_time'])) + echo ' +  (', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': ', $context['poll']['expire_time'], ')'; + + // Are they not allowed to vote but allowed to view the options? + if (!$context['allow_vote']) + { + echo ' + + + + + ', $context['allow_poll_view'] ? ' + + + ' : '', ' +
    + '; + + // Show each option with its corresponding percentage bar. + foreach ($context['poll']['options'] as $option) + echo ' + + ', $context['allow_poll_view'] ? ' + ' : '', ' + '; + + echo ' +
    ', $option['option'], '' . $option['bar'] . ' ' . $option['votes'] . ' (' . $option['percent'] . '%)
    +
    '; + + // If they are allowed to revote - show them a link! + if ($context['allow_change_vote']) + echo ' + ', $txt['poll_change_vote'], '
    '; + + // If they're allowed to lock the poll, show a link! + if ($context['poll']['lock']) + echo ' + ', !$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b'], '
    '; + + // If they're allowed to edit the poll... guess what... show a link! + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    ' . $txt['smf24'] . ': ' . $context['poll']['total_votes'] . '

    '; + } + // They are allowed to vote! Go to it! + else + { + echo ' +
    + + + + + + + + + +
    '; + + // Show a warning if they are allowed more than one option. + if ($context['poll']['allowed_warning']) + echo ' + ', $context['poll']['allowed_warning'], ' +
    '; + + // Show each option with its button - a radio likely. + $_i = 0; + foreach ($context['poll']['options'] as $option) + echo ' + ', $option['vote_button'], '
    '; + + echo ' +
    '; + + // Allowed to view the results? (without voting!) + if ($context['allow_poll_view']) + echo ' + ', $txt['smf29'], '
    '; + + // Show a link for locking the poll as well... + if ($context['poll']['lock']) + echo ' + ', (!$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b']), '
    '; + + // Want to edit it? Click right here...... + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    + +
    '; + } + + echo ' +
    '; + } + + // Show the page index... "Pages: [1]". + echo ' + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index']; + + // Show a "go down" link? + if (!empty($modSettings['topbottomEnable'])) + echo $context['menu_separator'], '', $settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5'], ''; + + echo ' + '; + + $buttonArray = array(); + if ($context['can_reply']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // This is a special case; if they can see mark unread, put it at the top... otherwise show add poll. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; + elseif ($context['can_add_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; + + if ($context['can_send_topic']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; + + echo implode($context['menu_separator'], $buttonArray); + + echo '
    +
    '; + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
    '; + + echo ' +'; + + // Get all the messages... + while ($message = $context['get_message']()) + { + echo ' + '; + + + if ($banner_count++ == 0 AND $context['user']['is_guest']) { + echo ''; + } elseif (($context['is_sticky'] || $context['is_first_sticky']) && ($message['id']==$context['topic_first_message'])) { + echo ''; + } + + } + echo ' + +
    '; + + // Show the message anchor and a "new" anchor if this message is new. + if ($message['id'] != $context['first_message']) + echo ' + ', $message['first_new'] ? '' : ''; + + echo ' + + +
    '; + + // Show information about the poster of this message. + + // pink nickname for Diana //////////////////////// +/* if($message['member']['name'] == 'Diana') + $_special_color = 'style="color: violet"'; + else $_special_color = '';*/ + /////////////////////////////////////////////////// + echo ' + + '; + echo ' + + + '; + + // Now for the attachments, signature, ip logged, etc... + echo ' + + + +
    '; +# echo ' +# '; + // Show the member's gender icon? + if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '') + echo ' + ',$message['member']['gender']['image']; + if (empty($context['user']['is_guest'])) { + $_special_color=""; + if(isset($message['member']['group']) && $message['member']['group'] != '' && isset($message['member']['group_color'])) + $_special_color='style="color: '.$message['member']['group_color'].';"'; + echo ' + ',$message['member']['name'],' +
    '; + unset($_special_color); + } + else + echo ' + ',$message['member']['name'],' +
    '; + + // Show the member's custom title, if they have one. + if (isset($message['member']['title']) && $message['member']['title'] != '') + echo ' + ', $message['member']['title'], '
    '; + + // Show the member's primary group (like 'Administrator') if they have one. + if (isset($message['member']['group']) && $message['member']['group'] != '') + echo ' + ', $message['member']['group']; + if (!$context['user']['is_guest'] && isset($message['member']['warning']['link']) && $message['member']['warning']['link'] != '') + echo' + ', $message['member']['warning']['link']; + + echo '
    '; + // Don't show these things for guests. + if (!$message['member']['is_guest'] /*&& !$context['user']['is_guest']*/) + { + // Show the post group if and only if they have no other group or the option is on, and they are in a post group. +/* if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') + echo ' + ', $message['member']['post_group'], '
    '; + echo ' + ', $message['member']['group_stars'], '
    ';*/ + + + // Show avatars, images, etc.? + if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) + echo ' +
    ', $message['member']['avatar']['image'], '
    '; + + // Show their personal text? + if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') + echo ' + ', $message['member']['blurb'], '

    + '; + else + echo '
    '; + + // Show online and offline buttons? + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'] && $message['member']['online']['is_online']) + echo ' + ', /*$context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ?*/ ' ' . $message['member']['online']['text'] . '' /*: ''*/, ' - '; + + // Show how many posts they have made. +// echo ' +// ', $txt[26], ': ', $message['member']['posts'], '
    +//
    '; + + // This shows the popular messaging icons. +/* echo ' + ', $message['member']['icq']['link'], ' + ', $message['member']['msn']['link'], ' + ', $message['member']['aim']['link'], ' + ', $message['member']['yim']['link'], '
    '; +*/ + + // Show the profile, website, email address, and personal message buttons. + if ($settings['show_profile_buttons']) + { + // Don't show the profile button if you're not allowed to view the profile. + if ($message['member']['can_view_profile']) + echo ' + ', (/*$settings['use_image_buttons'] ? '' . $txt[27] . '' : */$txt[27]), ''; +/* + // Don't show an icon if they haven't specified a website. + if ($message['member']['website']['url'] != '') + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; + + // Don't show the email address if they want it hidden. + if (empty($message['member']['hide_email'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; +*/ + // Since we know this person isn't a guest, you *can* message them. + if ($context['can_send_pm']) + echo ' - ', /*$settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'],*/ $txt['online4'], ''; + } +/* } + // Otherwise, show the guest's email. + else + echo ' +
    +
    + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + */ + + // Is karma display enabled? Total or +/-? + if ($modSettings['karmaMode'] == '1' AND $modSettings['karmadescmod'] == 1) + echo ' +
    ', $modSettings['karmaLabel'], ' '/*, '
    '*/; + elseif ($modSettings['karmaMode'] == '1' AND $modSettings['karmadescmod'] == 0) + echo ' +
    ', $modSettings['karmaLabel'], ' '; + /*elseif ($modSettings['karmaMode'] == '2') + echo ' +
    + ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
    ';*/ + + // Is this user allowed to modify this member's karma? + if ($message['member']['karma']['allow']) + echo '  + + [ ', $message['member']['karma']['good'] - $message['member']['karma']['bad'],' ] -
    '; + else + echo $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
    '; + + + // Show how many posts they have made. + echo ' +
    ', $txt[26], ': ', $message['member']['posts'], ' +
    '; + + } + // Done with the information about the poster... on to the post itself. + echo ' +
    +
    + + + +
    ', $message['subject'], '';/*--> + '; + ', $message['subject'], '';*/ + + // If this is the first post, (#0) just say when it was posted - otherwise give the reply #. + echo ' + '/*, !($message['id'] == $context['topic_first_message']) ? $txt['post_no']. $message['counter'] : '', ' ', $txt[30], ': '*/, $message['time'], ''; + + if ($message['id']==$context['topic_first_message']) { + echo '
    '; + } + echo ' +
    '; + + // Can they reply? Have they turned on quick reply? + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + // So... quick reply is off, but they *can* reply? + elseif ($context['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + + // Can the user modify the contents of this post? + if ($message['can_modify']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[66] . '' : $txt[17]), ''; + + // How about... even... remove it entirely?! + if ($message['can_remove']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + if ($context['can_warn']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['visual_raise'] . '' : $txt['visual_warn']), ''; + + + // What about splitting it off the rest of the topic? + if ($context['can_split']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['smf251'] . '' : $txt['smf251']), ''; + + // Show a checkbox for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove']) + echo ' + '; + + // Show the post itself, finally! + echo ' +
    +
    +
    ', $message['body']; + /*if($modSettings['nowplayingEnabled'] && $message['nowplaying'] != '') + { + if(isset($modSettings['nowplaying_image']) && $modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text']) && $modSettings['nowplaying_text'] != '') + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + echo '

    ', $nowplayingstring, ' ', $message['nowplaying'], ''; + }*/ + echo '
    '; + if ( 0 AND $message['id']==$context['topic_first_message']) { + echo '
    '; + } + echo ' +
    + + + + + +
    '; + + // Assuming there are attachments... + if (!empty($message['attachment'])) + { + echo ' +
    +
    '; + + foreach ($message['attachment'] as $attachment) + { + if (isset($attachment['image'])) + echo ' + + ', $attachment['image'], ' +
    '; + echo ' + * ' . $attachment['name'] . ' (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['width'] . 'x' . $attachment['height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)
    '; + } + + echo ' +
    '; + } + + echo ' +
    '; + + // Show "? Last Edit: Time by Person ?" if this post was edited. + if ($settings['show_modify'] && !empty($message['modified']['name'])) + echo ' + « ', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], ' »'; + if($modSettings['nowplayingEnabled'] && $message['nowplaying'] != '' && !$context['user']['is_guest']) + { + if(isset($modSettings['nowplaying_image']) && $modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text']) && $modSettings['nowplaying_text'] != '') + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + echo '

    ', $nowplayingstring, ' ', $message['nowplaying'], ''; + } + + echo ' +
    '; + + // put to site + if($context['user']['is_admin'] OR $context['user']['name'] == 'Yeah_baby') + echo' + На сайт '; + + // quick quote + if (!$context['user']['is_guest']) + echo ' + Быстрая цитата '; + + // Maybe they want to report this post to the moderator(s)? + if ($context['can_report_moderator']) + echo ' + ', $txt['rtm1'], '  '; + + /*echo ' + ';*/ + // Show the IP to this user for this post - because you can moderate? + if ($context['can_moderate_forum'] && !empty($message['member']['ip'])) + echo ' + ', $message['member']['ip'], ''; + // Or, should we show it because this is you? + elseif (false and $message['can_see_ip']) + echo ' + ', $message['member']['ip'], ''; + // Okay, are you at least logged in? Then we can show something about why IPs are logged... +/* elseif (!$context['user']['is_guest']) + echo ' + ', $txt[511], '';*/ + // Otherwise, you see NOTHING! + else + echo ' + '/*, $txt[511]*/; + + echo ' +
    '; + + // Show the member's signature? + if (/*empty($context['user']['is_guest']) &&*/ + !empty($message['member']['signature']) && + empty($options['show_no_signatures'])) + echo ' +
    +
    ', $message['member']['signature'], '
    '; + + echo ' +
    +
    +
    '; + ?> +
    + + +
    +
     
    + + + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index'], ($modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : ''), ' + '; + + $buttonArray = array(); + if ($context['can_reply']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Another special case, similar to above but reversed. Show "add poll" unless they can't - then show unread here too. + if ($context['can_add_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; + elseif ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; + + if ($context['can_send_topic']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; + + echo implode($context['menu_separator'], $buttonArray); + + echo '  +
    +
    + + + '; + if ($settings['linktree_inline']) + echo ' + '; + echo ' + + +
    ', theme_linktree(), ' | ', $txt[118], ': ',$context['subject'],' ', $context['previous_next'], '
    '; + + echo ' +
    ', theme_show_mod_buttons(), '
    '; + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post']) + echo ' + +
    '; + if (!empty($settings['display_who_viewing'])) + { + echo ' +
    ', $txt['who_viewing_topic']; + + // Show just numbers...? + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + // Or show the actual people viewing the topic? + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + + // Now show how many guests are here too. + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], /*$txt['who_viewing_topic'],*/ '
    '; + } + + echo ' +
    +
    + ' . $txt[160] . ': +   + +
    +
    +
    '; + + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + { + if ($context['show_spellchecking']) + echo ' +'; + + echo ' + + + + + + + + +
    + ', $txt['quick_reply_1'], '
    '; + if ($context['show_spellchecking']) + echo ' +
    '; + + echo ' +
    '; + } + + echo ''; +} + +function theme_show_mod_buttons() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + $moderationButtons = array(); + + if ($context['can_move']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt[132] . '' : $txt[132]) . ''; + if ($context['can_delete']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt[63] . '' : $txt[63]) . ''; + if ($context['can_lock']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280']) . '' : (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280'])) . ''; + if ($context['can_sticky']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278']) . '' : (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278'])) . ''; + if ($context['can_merge']){ + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf252'] . '' : $txt['smf252']) . ''; + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf252lnk'] . '' : $txt['smf252lnk']) . ''; + } + if ($context['can_remove_poll']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['poll_remove'] . '' : $txt['poll_remove']) . ''; + + if ($context['calendar_post']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['calendar37'] . '' : $txt['calendar37']) . ''; + + if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + $moderationButtons[] = $settings['use_image_buttons'] ? '' : '' . $txt['quickmod_delete_selected'] . ''; + + if ($context['can_sticky']) + $moderationButtons[] = '' .$txt['make_first_sticky']. ''; + + + return implode($context['menu_separator'], $moderationButtons); +} + +// Show an enhanced quick reply box for those that want everything. +function template_enhanced_quick_reply() +{ + global $context, $modSettings, $settings, $txt, $options, $scripturl, $db_prefix; + + loadLanguage('Post'); + // Initialize smiley array... + $context['smileys'] = array( + 'postform' => array(), + 'popup' => array(), + ); + + // Load smileys - don't bother to run a query if we're not using the database's ones anyhow. + if (empty($modSettings['smiley_enable']) && $context['user']['smiley_set'] != 'none') + $context['smileys']['postform'][] = array( + 'smileys' => array( + array('code' => ':)', 'filename' => 'default/smiley.gif', 'description' => $txt[287]), + array('code' => ';)', 'filename' => 'wink.gif', 'description' => $txt[292]), + array('code' => ':D', 'filename' => 'cheesy.gif', 'description' => $txt[289]), + array('code' => ';D', 'filename' => 'grin.gif', 'description' => $txt[293]), + array('code' => '>:(', 'filename' => 'angry.gif', 'description' => $txt[288]), + array('code' => ':(', 'filename' => 'sad.gif', 'description' => $txt[291]), + array('code' => ':o', 'filename' => 'shocked.gif', 'description' => $txt[294]), + array('code' => '8)', 'filename' => 'cool.gif', 'description' => $txt[295]), + array('code' => '???', 'filename' => 'huh.gif', 'description' => $txt[296]), + array('code' => '::)', 'filename' => 'rolleyes.gif', 'description' => $txt[450]), + array('code' => ':P', 'filename' => 'tongue.gif', 'description' => $txt[451]), + array('code' => ':-[', 'filename' => 'embarrassed.gif', 'description' => $txt[526]), + array('code' => ':-X', 'filename' => 'lipsrsealed.gif', 'description' => $txt[527]), + array('code' => ':-\\', 'filename' => 'undecided.gif', 'description' => $txt[528]), + array('code' => ':-*', 'filename' => 'kiss.gif', 'description' => $txt[529]), + array('code' => ':\'(', 'filename' => 'cry.gif', 'description' => $txt[530]) + ), + 'last' => true, + ); + elseif ($context['user']['smiley_set'] != 'none') + { + $request = db_query(" + SELECT code, filename, description, smileyRow, hidden + FROM {$db_prefix}smileys + WHERE hidden IN (0, 2) + ORDER BY smileyRow, smileyOrder", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $row['code'] = htmlspecialchars($row['code']); + $row['filename'] = htmlspecialchars($row['filename']); + $row['description'] = htmlspecialchars($row['description']); + + $context['smileys'][empty($row['hidden']) ? 'postform' : 'popup'][$row['smileyRow']]['smileys'][] = $row; + } + mysql_free_result($request); + + } + + // Clean house... add slashes to the code for javascript. + foreach (array_keys($context['smileys']) as $location) + { + foreach ($context['smileys'][$location] as $j => $row) + { + $n = count($context['smileys'][$location][$j]['smileys']); + for ($i = 0; $i < $n; $i++) + { + $context['smileys'][$location][$j]['smileys'][$i]['code'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['code']); + $context['smileys'][$location][$j]['smileys'][$i]['js_description'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['description']); + } + + $context['smileys'][$location][$j]['smileys'][$n - 1]['last'] = true; + } + if (!empty($context['smileys'][$location])) + $context['smileys'][$location][count($context['smileys'][$location]) - 1]['last'] = true; + } +// $settings['smileys_url'] = $settings['smileys_url']. '/' . $context['user']['smiley_set']; + $settings['smileys_url'] = "http://rock.ru/forum/Smileys/default"; + + // Allow for things to be overridden. + if (!isset($context['post_box_columns'])) + $context['post_box_columns'] = 75; + if (!isset($context['post_box_rows'])) + $context['post_box_rows'] = 7; + if (!isset($context['post_box_name'])) + $context['post_box_name'] = 'message'; + if (!isset($context['post_form'])) + $context['post_form'] = 'postmodify'; + + // Generate a list of buttons that shouldn't be shown - this should be the fastest way to do this. + if (!empty($modSettings['disabledBBC'])) + { + $disabled_tags = explode(',', $modSettings['disabledBBC']); + foreach ($disabled_tags as $tag) + $context['disabled_tags'][trim($tag)] = true; + } + + // Assuming BBC code is enabled then print the buttons and some javascript to handle it. + if (0 and !empty($modSettings['enableBBC']) && !empty($settings['show_bbc'])) + { + echo ' + + + + '; + + // The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you! + $context['bbc_tags'] = array(); + $context['bbc_tags'][] = array( + 'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]), + 'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]), + 'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]), + 'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]), + array(), + 'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]), + 'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]), + 'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]), + 'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]), + array(), + 'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]), + array(), + 'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]), + 'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]), + ); + $context['bbc_tags'][] = array( + 'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]), + 'video' => array('code' => 'video', 'before' => '[video]', 'after' => '[/video]', 'description' => 'Вставить видео'), + 'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]), + 'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]), + 'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]), + 'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]), + array(), + 'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]), + 'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]), + 'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]), + array(), + 'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]), + 'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]), + 'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]), + array(), + 'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $txt[259]), + 'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]), + array(), + 'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]), + ); + // Here loop through the array, printing the images/rows/separators! + foreach ($context['bbc_tags'][0] as $image => $tag) + { + // Is there a "before" part for this bbc button? If not, it can't be a button!! + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + // Print a drop down list for all the colors we allow! + if (!isset($context['disabled_tags']['color'])) + echo ' '; + echo '
    '; + + // Print the buttom row of buttons! + foreach ($context['bbc_tags'][1] as $image => $tag) + { + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + echo ' + + '; + } + + // Now start printing all of the smileys. + if (!empty($context['smileys']['postform'])) + { + echo ' + + '; + + // Show each row of smileys ;). + foreach ($context['smileys']['postform'] as $smiley_row) + { + foreach ($smiley_row['smileys'] as $smiley) + echo ' + ', $smiley['description'], ''; + + // If this isn't the last row, show a break. + if (empty($smiley_row['last'])) + echo '
    '; + } + + // If the smileys popup is to be shown... show it! + if (!empty($context['smileys']['popup'])) + echo ' + [', $txt['more_smileys'], ']'; + + echo ' + + '; + } + + // If there are additional smileys then ensure we provide the javascript for them. + if (0 AND !empty($context['smileys']['popup'])) + { + echo ' + '; + } + +} +?> diff --git a/Themes/default/Errors.template.php b/Themes/default/Errors.template.php new file mode 100644 index 0000000..d8d6723 --- /dev/null +++ b/Themes/default/Errors.template.php @@ -0,0 +1,141 @@ + + + ', $context['error_title'], ' + + + + ', $context['error_message'], ' + + +'; + + // Show a back button (using javascript.) + echo ' +'; +} + +function template_error_log() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' +
    + + + + + + + '; + + if ($context['has_filter']) + echo ' + + + '; + echo ' + + + '; + + if (!empty($context['errors'])) + echo ' + + + '; + + foreach ($context['errors'] as $error) + { + echo ' + + + '; + } + + if (!empty($context['errors'])) + echo ' + + + '; + else + echo ' + + + '; + + echo ' + + + +
    ', $txt[119], ' ', $txt['errlog1'], '
    ', $txt['errlog2'], '
    + ', $txt['applying_filter'], ': ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], ' (', $txt['clear_filter'], ') +
    + + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    +
    + +
    + + + + + + + + + + + +
    + ', $txt['apply_filter'], ': ', $txt['filter_only_member'], ' + ', $error['member']['link'], ' + + + ', $error['time'], ' +
    + ', $txt['apply_filter'], ': ', $txt['filter_only_ip'], ' + ', $error['member']['ip'], '   + '; + + if ($error['member']['session'] != '') + echo ' + ', $txt['apply_filter'], ': ', $txt['filter_only_session'], ' + ', $error['member']['session']; + + echo ' +
    +
    ', $txt['apply_filter'], ': ', $txt['filter_only_message'], '
    +
    ', $error['message']['html'], '
    +
    +
    + +
    ', $txt[151], '
    + + +
    ', $txt[139], ': ', $context['page_index'], '
    +

    '; + if ($context['sort_direction'] == 'down') + echo ' + '; + echo ' + +
    '; +} + +?> diff --git a/Themes/default/GoogleMap.template.php b/Themes/default/GoogleMap.template.php new file mode 100644 index 0000000..c253fdd --- /dev/null +++ b/Themes/default/GoogleMap.template.php @@ -0,0 +1,77 @@ + + +function template_map() { + global $context, $modSettings, $scripturl, $txt, $settings; + + if ($modSettings['googleMapsEnable']) { +echo '
    +
    Member Map
    +
    + + + +
    + + + '; +if ($modSettings['googleMapsEnableLegend']) { +echo ' + + '; +} +echo ' + + + +
    + '; +if ($modSettings['googleSidebar'] == 1) +echo ' + '; +if ($modSettings['googleSidebar'] == 2) +echo ' + + '; +echo ' +
    +
    +
    + +
    + +
    + + + +
    + '; +if (!$modSettings['googleMapsPinGender']) + echo ' + '; +else + echo ' + + + '; +if ($modSettings['googleMapsEnableClusterer']) +echo ' + '; +echo ' +
    ', $txt['googleMapGreenPinGD'], '', $txt['googleMapGreenPinNG'], '', $txt['googleMapBluePin'], '', $txt['googleMapRedPin'], '', $txt['googleMapPurplePin'], '
    +
    '; +if (allowedTo('googleMap_place')) + echo $txt['googleMapAddPinNote']; +echo ' + + +
    +
    +
    +
    '; + } +} + +?> diff --git a/Themes/default/Help.template.php b/Themes/default/Help.template.php new file mode 100644 index 0000000..e5cabbf --- /dev/null +++ b/Themes/default/Help.template.php @@ -0,0 +1,137 @@ + + + + + ', $context['page_title'], ' + + + + + ', $context['help_text'], '
    +
    + + +'; +} + +function template_find_members() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + ', $txt['find_members'], ' + + + + + + +
    + + + + + + + + + + +
    ', $txt['find_members'], '
    + ', $txt['find_username'], ':
    +
    + ', $txt['find_wildcards'], ' +
    + + +
    + +
    + + + + + '; + + if (empty($context['results'])) + echo ' + + + '; + else + { + $alternate = true; + foreach ($context['results'] as $result) + { + echo ' + + + '; + + $alternate = !$alternate; + } + + echo ' + + + '; + } + + echo ' +
    ', $txt['find_results'], '
    ', $txt['find_no_results'], '
    + ' . $txt[27] . ' + ', $result['name'], ' +
    ', $txt[139], ': ', $context['page_index'], '
    + + + +
    '; + + if (empty($context['results'])) + echo ' + '; + + echo ' + +'; +} + +?> \ No newline at end of file diff --git a/Themes/default/InstantMessage.template.php b/Themes/default/InstantMessage.template.php new file mode 100644 index 0000000..8f8508a --- /dev/null +++ b/Themes/default/InstantMessage.template.php @@ -0,0 +1,468 @@ + + + + + +
    ', theme_linktree(), '
    + + + + + + + + + + '; + if (!$context['show_delete']) + echo ' + + + '; + $next_alternate = false; + while ($message = $context['get_pmessage']()) + { + echo ' + + + + + + '; + $next_alternate = $message['alternate']; + } + + echo ' + + + +
    ', $context['show_delete'] ? ' + ' . ($settings['use_image_buttons'] ? '' . $txt[412] . '' : $txt[412]) . '' . $context['menu_separator'] : '', $context['can_send_pm'] ? ($context['from_or_to'] == 'from' ? ' + ' . ($settings['use_image_buttons'] ? '' . $txt[320] . '' : $txt[320]) . '' . $context['menu_separator'] : ' + ' . ($settings['use_image_buttons'] ? '' . $txt[316] . '' : $txt[316]) . '' . $context['menu_separator']) : '', $context['can_send_pm'] ? ' + ' . ($settings['use_image_buttons'] ? '' . $txt[321] . '' : $txt[321]) . '' . $context['menu_separator'] : '', ' + ', ($settings['use_image_buttons'] ? '' . $txt[322] . '' : $txt[322]), ' +
    ', $txt[317], $context['sort_by'] == 'date' ? ' ' : '', '', $txt[319], $context['sort_by'] == 'subject' ? ' ' : '', '', ($context['from_or_to'] == 'from' ? $txt[318] : $txt[324]), $context['sort_by'] == 'name' ? ' ' : '', '
    ', $txt[151], '
    ', $message['time'], '', $message['subject'], '', ($context['from_or_to'] == 'from' ? $message['member']['link'] : (empty($message['recipients']['to']) ? '' : implode(', ', $message['recipients']['to']))), '
    + + + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    +
    '; + + if ($context['get_pmessage'](true)) + { + echo ' + + + + + +
     ', $txt[29], '', $txt[118], '
    + '; + + while ($message = $context['get_pmessage']()) + { + $windowcss = $message['alternate'] == 0 ? 'windowbg' : 'windowbg2'; + + echo ' + '; + } + + echo ' + +
    + + + +
    + + + + + + + + +
    '; + if ($message['member']['gender']['image'] != '') + echo ' + ', $message['member']['gender']['image']; + + echo ' + ', $message['member']['link'], ' +
    '; + if (isset($message['member']['title']) && $message['member']['title'] != '') + echo ' + ', $message['member']['title'], '
    '; +/* + if (isset($message['member']['group']) && $message['member']['group'] != '') + echo ' + ', $message['member']['group'], '
    '; +*/ + + if (!$message['member']['is_guest']) + { +/* + // Show the post group if and only if they have no other group or the option is on, and they are in a post group. + if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') + echo ' + ', $message['member']['post_group'], '
    '; + echo ' + ', $message['member']['group_stars'], '
    '; +*/ + // Is karma display enabled? Total or +/-? + if ($modSettings['karmaMode'] == '1') + echo ' +
    + ', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
    '; + elseif ($modSettings['karmaMode'] == '2') + echo ' +
    + ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
    '; + + // Is this user allowed to modify this member's karma? + if ($message['member']['karma']['allow']) + echo ' + ', $modSettings['karmaApplaudLabel'], ' ', $modSettings['karmaSmiteLabel'], '
    '; + + // Show online and offline buttons? + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) + echo ' + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $message['member']['online']['text'] . '' : '', '

    '; + + // Show how many posts they have made. + echo ' + ', $txt[26], ': ', $message['member']['posts'], '
    +
    '; + + // Show avatars, images, etc.? + if (!empty($settings['show_user_images']) && empty($options['show_no_avatars'])) + echo ' + ', $message['member']['avatar']['image'], '
    '; + + // Show their personal text? + if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') + echo ' + ', $message['member']['blurb'], '
    +
    '; + echo ' + ', $message['member']['icq']['link'], ' + ', $message['member']['msn']['link'], ' + ', $message['member']['yim']['link'], ' + ', $message['member']['aim']['link'], '
    '; + + // Show the profile, website, email address, and personal message buttons. + if ($settings['show_profile_buttons']) + { + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[27] . '' : $txt[27]), ''; + if ($message['member']['website']['url'] != '') + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; + if (empty($message['member']['hide_email'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + if (!$context['user']['is_guest'] && $context['can_send_pm']) + echo ' + ', $settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'], ''; + } + } + else + echo ' +
    +
    + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + echo ' +
    +
    + + + +
    + ', $message['subject'], ''; + + // Show who the message was sent to. + echo ' +
    « ', $txt['sent_to'], ': '; + + // People it was sent directly to.... + if (!empty($message['recipients']['to'])) + echo implode(', ', $message['recipients']['to']); + // Otherwise, we're just going to say "some people". + elseif ($context['folder'] != 'outbox') + echo '(', $txt['pm_undisclosed_recipients'], ')'; + + echo ' ', $txt[30], ': ', $message['time'], ' »
    '; + + // If we're in the outbox, show who it was sent to besides the "To:" people. + if (!empty($message['recipients']['bcc'])) + echo ' +
    « ', $txt[1502], ': ', implode(', ', $message['recipients']['bcc']), ' »
    '; + + echo ' +
    '; + + // Show reply buttons if you have the permission to send PMs. + if ($context['can_send_pm']) + { + // You can't really reply if the member is gone. + if (!$message['member']['is_guest']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]), ' ', $context['menu_separator']; + // This is for "forwarding" - even if the member is gone. + else + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), '', $context['menu_separator']; + } + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[154] . '' : $txt[154]), ' + +
    +
    +
    ', $message['body'], '
    +
    '; + + // Show the member's signature? + if (!empty($message['member']['signature']) && empty($options['show_no_signatures'])) + echo ' +
    +
    ', $message['member']['signature'], '
    '; + + echo ' +
    +
    +
    + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    '; + } + + echo ' + +'; +} + +function template_send() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + if ($context['show_spellchecking']) + echo ' + '; + + echo ' + + + + +
    ', theme_linktree(), '
    + + + + +
    + ', ($settings['use_image_buttons'] ? '' . $txt[316] . '' : $txt[316]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[320] . '' : $txt[320]), '', $context['menu_separator'], ' +
    '; + + // Show which messages were sent successfully and which failed. + if (!empty($context['send_log'])) + { + echo ' +
    + + + + + + + +
    ', $txt['pm_send_report'], '
    '; + foreach ($context['send_log']['sent'] as $log_entry) + echo '', $log_entry, '
    '; + foreach ($context['send_log']['failed'] as $log_entry) + echo '', $log_entry, '
    '; + echo ' +

    '; + } + + // Show the preview of the personal message. + if (isset($context['preview_message'])) + echo ' +
    + + + + + + + +
    ', $context['preview_subject'], '
    + ', $context['preview_message'], ' +

    '; + + // Main message editing box. + echo ' + + + + + + +
    ', $txt[321], ' ', $txt[321], '
    +
    + '; + + // If there were errors for sending the PM, show them. + if (!empty($context['post_error']['messages'])) + { + echo ' + + + + '; + } + + // To and bcc. Include a button to search for members. + echo ' + + + + + + + '; + // Subject of personal message. + echo ' + + + + '; + + // Show BBC buttons, smileys and textbox. + theme_postbox($context['message']); + + // Send, Preview, spellcheck buttons. + echo ' + + + + + + + +
    + ', $txt['error_while_submitting'], ' +
    + ', implode('
    ', $context['post_error']['messages']), ' +
    +
    ', $txt[150], ': +   + ', $txt['find_members'], ' ', $txt['find_members'], ' +
    ', $txt[1502], ': +   + ', $txt['find_members'], ' ', $txt[748], ' +
    ', $txt[70], ':
    + + '; + if ($context['show_spellchecking']) + echo ' + '; + echo ' +
    + +
    + + +
    +
    '; + + // Some hidden information is needed in order to make the spell checking work. + if ($context['show_spellchecking']) + echo ' +
    '; + + // Show the message you're replying to. + if ($context['reply']) + echo ' +
    +
    + + + + + + + + + + +
    ', $txt[319], ': ', $context['quoted_message']['subject'], '
    + + + + + +
    ', $txt[318], ': ', $context['quoted_message']['member']['name'], '', $txt[30], ': ', $context['quoted_message']['time'], '
    +
    ', $context['quoted_message']['body'], '
    '; +} + +// This template asks the user whether they wish to empty out their folder/messages. +function template_ask_delete() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + + + + + +
    ', ($context['delete_all'] ? $txt[411] : $txt[412]), '
    + ', $txt[413], '
    +
    + ', $txt[163], ' - ', $txt[164], ' +
    '; +} + +// This template asks the user what messages they want to prune. +function template_prune() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + + + +
    ', $txt[411], '
    ', $txt['pm_prune_desc1'], ' ', $txt['pm_prune_desc2'], '
    + +
    '; +} + +?> diff --git a/Themes/default/Login.template.php b/Themes/default/Login.template.php new file mode 100644 index 0000000..34ea54f --- /dev/null +++ b/Themes/default/Login.template.php @@ -0,0 +1,271 @@ + + + + '; + + // Did they make a mistake last time? + if (isset($context['login_error'])) + echo ' + + '; + + // Or perhaps there's some special description for this time? + if (isset($context['description'])) + echo ' + + '; + + // Now just get the basic information - username, password, etc. + echo ' + + + + + + + + + + + + + + + + + +
    + ', $txt[34], ' +
    + ', $context['login_error'], ' +
    + ', $context['description'], '
    +
    +
    ', $txt[35], ':
    ', $txt[36], ':
    ', $txt[497], ':
    ', $txt[508], ':
    ', $txt[315], '

    + '; + + // Focus on the correct input - username or password. + echo ' + '; +} + +// Tell a guest to get lost or login! +function template_kick_guest() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + // This isn't that much... just like normal login but with a message at the top. + echo ' +
    + + + + '; + + // Show the message or default message. + echo ' + '; + + // And now the login information. + echo ' + + + + + +
    ', $txt[633], '
    + ', empty($context['kick_message']) ? $txt[634] : $context['kick_message'], '
    + ', $txt[635], ' ', $txt[636], ' ', $txt[637], ' +
    ', $txt[34], '
    + + + + + + + + + + + + + + + + + + +
    ', $txt[35], ':
    ', $txt[36], ':
    ', $txt[497], ':
    ', $txt[508], ':
    ', $txt[315], '

    +
    +
    '; + + // Do the focus thing... + echo ' + '; +} + +// This is for maintenance mode. +function template_maintenance() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + // Display the administrator's message at the top. + echo ' +
    + + + + + + + + + '; + + // And now all the same basic login stuff from before. + echo ' + + +
    ', $context['title'], '
    + ', $txt['maintenance3'], ' + ', $context['description'], '
    ', $txt[114], '
    + + + + + + + + + + + + + + +
    ', $txt[35], ':', $txt[36], ':  
    ', $txt[497], ':  ', $txt[508], ':
    +
    +
    '; +} + +// This is for the security stuff - makes administrators login every so often. +function template_admin_login() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Since this should redirect to whatever they were doing, send all the get data. + echo ' +
    + + + + '; + + // We just need the password. + echo ' + + + +
    + ', $txt[34], ' +
    + ', $txt[36], ': ', $txt[119], '
    + +
    '; + + // Make sure to output all the old post data. + echo $context['post_data'], ' +
    '; + + // Focus on the password box. + echo ' +'; +} + +// Activate your account manually? +function template_retry_activate() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Just ask them for their code so they can try it again... + echo ' +
    +
    + + + '; + + // You didn't even have an ID? + if (empty($context['member_id'])) + echo ' + + + '; + + echo ' + + + + + + +
    ', $context['page_title'], '
    ', $txt['invalid_activation_username'], ':
    ', $txt['invalid_activation_retry'], ':
    +
    '; +} + +// Activate your account manually? +function template_resend() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Just ask them for their code so they can try it again... + echo ' +
    +
    + + + + + + + + + + + + + + + '; + + if ($context['can_activate']) + echo ' + + + + + '; + + echo ' + + +
    ', $context['page_title'], '
    ', $txt['invalid_activation_username'], ':
    ', $txt['invalid_activation_new'], '
    ', $txt['invalid_activation_new_email'], ':
    ', $txt['invalid_activation_password'], ':
    ', $txt['invalid_activation_known'], '
    ', $txt['invalid_activation_retry'], ':
    +
    '; +} + +?> diff --git a/Themes/default/ManageAttachments.template.php b/Themes/default/ManageAttachments.template.php new file mode 100644 index 0000000..fe912c9 --- /dev/null +++ b/Themes/default/ManageAttachments.template.php @@ -0,0 +1,107 @@ + + + ', $txt['smf201'], ' + + ', $txt['smf202'], ' + + ', $txt['smf203'], ' + + + + + + + + + + + + +
    ', $txt['smf204'], ':', $context['num_attachments'], '
    ', $txt['attachment_manager_total_avatars'], ':', $context['num_avatars'], '
    ', $txt['smf205'], ':', $context['attachment_total_size'], ' ', $txt['smf211'], ' [', $txt['attachment_manager_recount'], ']
    ', $txt['smf206'], ':', isset($context['attachment_space']) ? $context['attachment_space'] . ' ' . $txt['smf211'] : $txt['smf215'], '
    + + + ', $txt['smf207'], ' + + +
    + ', $txt[72], ':
    + ', $txt['smf209'], ' ', $txt[579], ' + + +
    +
    + ', $txt[72], ':
    + ', $txt['smf210'], ' ', $txt['smf211'], ' + + +
    +
    + ', $txt['attachment_manager_avatars_older'], ' ', $txt[579], ' + + +
    + + + +
    +
    + + + + + + + + + + + + '; + $alternate = false; + foreach ($context['posts'] as $post) + { + echo ' + + + + + + + '; + $alternate = !$alternate; + } + echo ' + + + + + + +
    ', $txt['attachment_manager_browse_files'], '
    '; + + if (!$context['browse_avatars']) + echo ' + >', $txt['attachment_manager_attachments'], ' | + ', $txt['attachment_manager_avatars'], ''; + else + echo ' + ', $txt['attachment_manager_attachments'], ' | + >', $txt['attachment_manager_avatars'], ''; + + echo ' +
    ', $txt['smf213'], $context['sort_by'] == 'name' ? ' ' : '', '', $txt['smf214'], $context['sort_by'] == 'size' ? ' ' : '', '', empty($context['browse_avatars']) ? $txt[279] : $txt['attachment_manager_member'], $context['sort_by'] == 'member' ? ' ' : '', '', empty($context['browse_avatars']) ? $txt[317] : $txt['attachment_manager_last_active'], $context['sort_by'] == 'date' ? ' ' : '', '
    ', $post['attachment']['link'], '', $post['attachment']['size'], $txt['smf211'], '', $post['poster']['link'], '', $post['time'], !$context['browse_avatars'] ? '
    ' . $txt['smf88'] . ' ' . $post['link'] : '', '
    ', $txt[139], ': ', $context['page_index'], '
    + + + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/default/ManageBoards.template.php b/Themes/default/ManageBoards.template.php new file mode 100644 index 0000000..681d944 --- /dev/null +++ b/Themes/default/ManageBoards.template.php @@ -0,0 +1,409 @@ + + + + ' . $txt[119] . ' + ' . $txt[41] . ' + + + ' . $txt[677] . ' + + + ' . $txt['boardsEdit'] . ' + + '; + + // Button for creating a new category. + echo ' + + +
    + + +
    + + '; + + // Loop through every categories, listing the boards in each as we go. + foreach ($context['categories'] as $category) + { + // Link to modify the category. + echo ' + + + ', $category['name'], ' ', $txt['catModify'], ' + + '; + + // Boards table header. + echo ' + + +
    + + + + '; + + $alternate = false; + + // List through every board in the category, printing its name and link to modify the board. + foreach ($category['boards'] as $board) + { + $alternate = !$alternate; + + echo ' + + + + + '; + } + + // Button to add a new board. + echo ' + + + +
    ', $txt['mboards_name'], '
    ', $board['name'], '', $context['can_manage_permissions'] ? '' . $txt['mboards_permissions'] . '' : '', '', $txt['mboards_modify'], '

    + +
    + + '; + } + echo ' + '; +} + +// Template for editing/adding a category on the forum. +function template_modify_category() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Print table header. + echo ' +
    + + + +
    + + + + + + +
    ', isset($context['category']['is_new']) ? $txt['mboards_new_cat_name'] : $txt['catEdit'], '
    + + '; + // If this isn't the only category, let the user choose where this category should be positioned down the board index. + if (count($context['category_order']) > 1) + { + echo ' + + + '; + } + // Allow the user to edit the category name and/or choose whether you can collapse the category. + echo ' + + + + + + '; + + // Table footer. + echo ' + + + +
    + ', $txt[43], '
    +

    +
    + +
    + ', $txt[44], ':
    + ', $txt[672], '

    +
    + +
    + ' . $txt['collapse_enable'] . '
    + ' . $txt['collapse_desc'] . '

    +
    + +
    +
    '; + if (isset($context['category']['is_new'])) + echo ' + '; + else + echo ' + + '; + echo ' +
    + '; + // If this category is empty we don't bother with the next confirmation screen. + if ($context['category']['is_empty']) + echo ' + '; + echo ' +
    +
    +
    '; +} + +// A template to confirm if a user wishes to delete a category - and whether they want to save the boards. +function template_confirm_category_delete() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Print table header. + echo ' +
    + + + + + + + + +
    ', $txt['mboards_delete_cat'], '
    + ', $txt['mboards_delete_cat_contains'], ': +
      '; + + foreach ($context['category']['children'] as $child) + echo ' +
    • ', $child['node']['name'], '
    • '; + + echo ' +
    +
    +
    + + + + + + + + + + +
    ', $txt['mboards_delete_what_do'], ':
    +
    + : + +
    + + +
    + + + +
    '; +} + +// Below is the template for adding/editing an board on the forum. +function template_modify_board() +{ + global $context, $settings, $options, $scripturl, $txt; + + // The main table header. + echo ' +
    + + + +
    + + + + + + +
    ', isset($context['board']['is_new']) ? $txt['mboards_new_board_name'] : $txt['boardsEdit'], '
    + '; + + // Option for choosing the category the board lives in. + echo ' + + + + '; + + // If this isn't the only board in this category let the user choose where the board is to live. + if ((isset($context['board']['is_new']) && count($context['board_order']) > 0) || count($context['board_order']) > 1) + { + echo ' + + + '; + } + + // Options for board name and description. + echo ' + + + + + + + + + '; + + // Options to choose moderators, specifiy as announcement board and choose whether to count posts here. + echo ' + + + + + + + '; + + // Here the user can choose to force this board to use a theme other than the default theme for the forum. + echo ' + + + + + + + '; + + // Finish off the table. + echo ' + + + +
    + ', $txt['mboards_category'], '
    +

    +
    + +
    + ', $txt[43], '
    +

    +
    '; + + // The first select box gives the user the option to position it before, after or as a child of another board. + echo ' +   '; + + // The second select box lists all the boards in the category. + echo ' + +
    + ', $txt[44], ':
    + ', $txt[672], '

    +
    + +
    + ', $txt['mboards_description'], '
    + ', $txt['mboards_description_desc'], '

    +
    + +
    + ', $txt['mboards_groups'], '
    + ', $txt['mboards_groups_desc'], '

    +
    '; + + // List all the membergroups so the user can choose who may access this board. + foreach ($context['groups'] as $group) + echo ' + ' . $group['name'] . '  
    '; + echo ' + ', $txt[737], '  
    +
    +
    + ', $txt['mboards_moderators'], '
    + ', $txt['mboards_moderators_desc'], '

    +
    + + ', $txt['find_members'], ' +
    + ', $txt['mboards_count_posts'], '
    + ', $txt['mboards_count_posts_desc'], '

    +
    + +
    + ', $txt['mboards_theme'], '
    + ', $txt['mboards_theme_desc'], '

    +
    + +
    + ', $txt['mboards_override_theme'], '
    + ', $txt['mboards_override_theme_desc'], '

    +
    + +
    +
    '; + if (isset($context['board']['is_new'])) + echo ' + + '; + else + echo ' + + '; + echo ' +
    + +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/default/ManageMembers.template.php b/Themes/default/ManageMembers.template.php new file mode 100644 index 0000000..534047d --- /dev/null +++ b/Themes/default/ManageMembers.template.php @@ -0,0 +1,1424 @@ + +
    + + + + + + +
    ' . $txt[119] . ' ' . $txt['membergroups_title'] . '
    ', $txt['membergroups_description'], '
    +
    + +
    + + + + + + + + '; + foreach ($context['groups']['regular'] as $group) + { + echo ' + + + + + + '; + } + + echo ' + + + +
    ', $txt['membergroups_regular'], '
    ', $txt['membergroups_name'], '', $txt['membergroups_stars'], '', $txt['membergroups_members_top'], '', $txt[17], '
    ', empty($group['color']) ? $group['name'] : '' . $group['name'] . '', '', $group['stars'], '', $group['can_search'] ? $group['link'] : $group['num_members'], '' . $txt['membergroups_modify'] . '
    + +
    + + +
    + + + + + + + + + '; + foreach ($context['groups']['post'] as $group) + { + echo ' + + + + + + + '; + } + + echo ' + + + +
    ', $txt['membergroups_post'], '
    ', $txt['membergroups_name'], '', $txt['membergroups_stars'], '', $txt['membergroups_members_top'], '', $txt['membergroups_min_posts'], '', $txt[17], '
    ', empty($group['color']) ? $group['name'] : '' . $group['name'] . '', '', $group['stars'], '', $group['can_search'] ? $group['link'] : $group['num_members'], '', $group['min_posts'], '' . $txt['membergroups_modify'] . '
    + +
    + + +
    +
    '; +} + +function template_new_group() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + ', $context['postgroup'] ? ' + + + ' : '', ' + + + + + + + + + + + +
    ', $txt['membergroups_new_group'], '
    ', $txt['membergroups_group_name'], ':
    ' . $txt['membergroups_min_posts'] . ':
    ', $txt['membergroups_permissions'], ':', $txt['membergroups_new_as_type'], ':   ', $txt['membergroups_can_edit_later'], '
    ', $txt['membergroups_new_as_copy'], ':
    ', $txt['membergroups_new_board'], ': +
    ', $txt['membergroups_new_board_desc'], '
    +
    '; + + foreach ($context['boards'] as $board) + echo ' +
    '; + + echo ' +
    + +

    + +
    '; +} + +function template_edit_group() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + '; + if ($context['group']['allow_post_group']) + echo ' + + + + + + + '; + echo ' + + + + + + + + + + + + + + + + + + + +
    ', $txt['membergroups_edit_group'], ' - ', $context['group']['name'], '
    ', $txt['membergroups_edit_name'], ':
    ', $txt['membergroups_min_posts'], ':
    ', $txt['membergroups_online_color'], ':
    ', $txt['membergroups_star_count'], ':
    ', $txt['membergroups_star_image'], ':
    ', $txt['membergroups_star_image_note'], '
    *
    + ', $txt['membergroups_max_messages'], ': +
    ', $txt['membergroups_max_messages_note'], '
    +
    +
    + ', $context['group']['allow_delete'] ? ' + ' : '', ' +
    + +
    '; + + if ($context['group']['allow_post_group']) + echo ' + '; +} + +function template_group_members() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + + + + + + + + + + + '; + + if (empty($context['members'])) + echo ' + + + '; + + $alternate = false; + foreach ($context['members'] as $member) + { + echo ' + + + + + + + + '; + $alternate = !$alternate; + } + + echo ' + + + +
    ', $context['page_title'], '
    ', $txt['membergroups_members_all_current_desc'], '
    ', $txt[139], ': ', $context['page_index'], '
    ', $txt[68], $context['sort_by'] == 'name' ? ' ' : '', '', $txt[69], $context['sort_by'] == 'email' ? ' ' : '', '', $txt['attachment_manager_last_active'], $context['sort_by'] == 'active' ? ' ' : '', '', $txt[233], $context['sort_by'] == 'registered' ? ' ' : '', '', $txt[21], $context['sort_by'] == 'posts' ? ' ' : '', '
    ', $txt['membergroups_members_no_members'], '
    ', $member['name'], '', $member['email'], '', $member['last_online'], '', $member['registered'], '', $member['posts'], '
    + +

    '; + + if (!empty($context['group']['assignable'])) + { + echo ' + + + + + + + + + +
    ', $txt['membergroups_members_add_title'], '
    ', $txt['membergroups_members_add_desc'], ': + + ', $txt['find_members'], ' +
    + +
    '; + } + + echo ' + +
    '; +} + +function template_email_members() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + + + +
    ' . $txt[119] . ' ', $txt[6], '
    ' . $txt['smf250'] . '
    '; + + foreach ($context['groups'] as $group) + echo ' + (', $group['member_count'], ')
    '; + + echo ' +
    '; + + if ($context['can_send_pm']) + echo ' +
    '; + + echo ' + +
    + +
    + +
    '; +} + +function template_email_members_compose() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + +
    + ' . $txt[119] . ' ' . $txt[6] . ' +
    ' . $txt[735] . '
    + +
    +
    + + + + + + + + +
    ' . $txt[338] . '
    ', $txt['email_variables'], '
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    '; +} + +function template_view_members() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + '; + if ($context['sub_action'] == 'all' || $context['sub_action'] == 'query') + { + echo ' + + + + + + + '; + foreach ($context['columns'] as $column) + { + echo ' + '; + } + if ($context['can_delete_members']) + echo ' + '; + else + echo ' + '; + echo ' + '; + if (empty($context['members'])) + echo ' + + + '; + else + { + foreach ($context['members'] as $member) + { + echo ' + + + + + + + + '; + if ($context['can_delete_members']) + echo ' + '; + else + echo ' + '; + echo ' + '; + } + echo ' + + + '; + } + } + else + { + echo ' + + + '; + } + echo ' +
    + ' . $txt[119] . ' ' . $txt[9] . ' +
    + ', $context['sub_action'] == 'all' ? '>' : '', '', $txt[303], ' | ', $context['sub_action'] == 'search' || $context['sub_action'] == 'query' ? '>' : '', $context['sub_action'] == 'search' || $context['sub_action'] == 'all' ? '' . $txt['mlist_search'] . '' : $txt['search_results'] . ' (' . $txt['mlist_search2'] . ')', ' +
    + ', $txt[11], ' +
    + ', $txt[139], ': ' . $context['page_index'] . ' +
    + '; + if ($column['selected']) + echo $column['label'] . ' '; + else + echo $column['label']; + echo ' + + +
    (', $txt['search_no_results'], ')
    + ' . $member['id'] . ' + + ' . $member['username'] . ' + + ' . $member['name'] . ' + + ' . $member['email'] . ' + + ' . $member['ip'] . ' + + ' . $member['last_active'] . ' + + ' . $member['posts'] . ' + + +
    ', $context['can_delete_members'] ? ' + ' : '', ' + + + + ', $context['sort_direction'] == 'up' ? ' + ' : '', ' +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['search_for'], ':
    (', $txt['wild_cards_allowed'], ')
    ', $txt['member_id'], ': + + ', $txt[35], ':
    ', $txt['age'], ': + + ', $txt['email_address'], ':
    ', $txt[26], ': + + ', $txt[96], ':
    ', $txt[233], ': + + ', $txt['date_format'], '', $txt[227], ':
    ', $txt['viewmembers_online'], ': + + ', $txt['date_format'], '', $txt['ip_address'], ':
    ', $txt[231], ': + ', $txt['undefined_gender'], '   + ', $txt[238], '   + ', $txt[239], '   + ', $txt['messenger_address'], ':
    ', $txt['activation_status'], ': + ', $txt['activated'], '   + ', $txt['not_activated'], ' +
    +  

    + ', $txt['member_part_of_these_membergroups'], ':

    +
    + + + + + + '; + foreach ($context['membergroups'] as $membergroup) + echo ' + + + + + '; + echo ' +
    ', $txt['membergroups'], '', $txt['primary'], '', $txt['additional'], '
    + ', $membergroup['name'], ' + + + + ', $membergroup['can_be_additional'] ? '' : ' ', ' +
    +
    + + + + + '; + foreach ($context['postgroups'] as $postgroup) + echo ' + + + + '; + echo ' +
    ', $txt['membergroups_postgroups'], '
    + ', $postgroup['name'], ' + + +
    +
    + + +
    +
    +
    '; +} + +function template_ban_list() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' + ', $txt['ban_title'], ' +
    + > ', $txt['ban_edit_list'], ' | + ', $txt['ban_add_new'], ' | + ', $txt['ban_log'], ' +
    ', $txt['ban_description'], '
    +
    + + + + '; + foreach ($context['columns'] as $column) + { + if ($column['selected']) + echo ' + + ', $column['label'], '  + '; + elseif ($column['sortable']) + echo ' + + ', $column['link'], ' + '; + else + echo ' + + ', $column['label'], ' + '; + } + echo ' + + '; + + while ($ban = $context['get_ban']()) + { + echo ' + + + + + + + + + '; + } + echo ' + + + +
    ', $txt[139], ': ', $context['page_index'], '
    '; + if ($ban['type'] == 'ip_ban') + echo '', $txt[512], ': ', $ban['ip']; + elseif ($ban['type'] == 'hostname_ban') + echo '', $txt['hostname'], ': ', $ban['hostname']; + elseif ($ban['type'] == 'email_ban') + echo '', $txt[69], ': ', $ban['email']; + elseif ($ban['type'] == 'user_ban') + echo '', $txt[35], ': ', $ban['user']['link']; + echo ' + ', $ban['reason'], '', $ban['notes'], '', $ban['restriction'], '', $ban['expires'], ' +  ', $txt[17], ' +
    + +
    '; +} + +function template_ban_edit() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' + ', $txt['ban_title'], ' +
    '; + if ($context['sub_action'] == 'add') + echo ' + ', $txt['ban_edit_list'], ' | + > ', $txt['ban_add_new'], ' | '; + else + echo ' + > ', $txt['ban_edit_list'], ' | + ', $txt['ban_add_new'], ' | '; + echo ' + ', $txt['ban_log'], ' +
    ', $txt['ban_description'], '
    +
    + + + + + + +
    + ', $txt['ban_banned_entity'], ': + + + + '; + if (empty($modSettings['disableHostnameLookup'])) + echo ' + + '; + echo ' + + + + +
    + + + ', $txt['ban_on_ip'], ':
    + +
    + + + ', $txt['ban_on_hostname'], ':
    + +
    + + + ', $txt['ban_on_email'], ':
    + +
    + + + ', $txt['ban_on_username'], ':
    + +
    +
    + ', $txt['ban_expiration'], ':
    + + + + + + +
    + + + ', $txt['never'], ' +
    + + + ', $txt['ban_will_expire_within'], ':
    + ', $txt['ban_days'], '
    +
    +
    + ', $txt['ban_reason'], ': +
    ', $txt['ban_reason_desc'], '
    + +
    +
    + ', $txt['ban_notes'], ': +
    ', $txt['ban_notes_desc'], '
    + +
    +
    + ', $txt['ban_restriction'], ':
    + ', $txt['ban_full_ban'], '
    + ', $txt['ban_cannot_post'], '
    + ', $txt['ban_cannot_register'], '
    +
    +     +
    ', $context['sub_action'] == 'add' ? '' : ' + ', ' + +
    '; +} + +function template_ban_log() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' + ', $txt['ban_title'], ' +
    + ', $txt['ban_edit_list'], ' | + ', $txt['ban_add_new'], ' | + > ', $txt['ban_log'], ' +
    ', $txt['ban_log_description'], '
    +
    + + + + + + + + + + '; + if (empty($context['log_entries'])) + echo ' + + + '; + else + { + foreach ($context['log_entries'] as $log) + echo ' + + + + + + + '; + echo ' + + + '; + } + echo ' +
    ', $txt[139], ': ', $context['page_index'], '
    + ' . $txt['ban_log_ip'], $context['sort'] == 'ip' ? ' ' : '', ' + + ' . $txt['ban_log_email'], $context['sort'] == 'email' ? ' ' : '', ' + + ' . $txt['ban_log_member'], $context['sort'] == 'name' ? ' ' : '', ' + + ' . $txt['ban_log_date'], $context['sort'] == 'date' ? ' ' : '', ' +
    (', $txt['ban_log_no_entries'], ')
    ', $log['ip'], '', $log['email'], '', empty($log['member']['id']) ? '' . $txt[470] . '' : $log['member']['link'], '', $log['date'], '
    + + +
    + +
    '; +} + +function template_edit_reserved_words() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ' . $txt[119] . ' ' . $txt[341] . ' +
    ' . $txt[699] . '
    +
    +
    ' . $txt[342] . '
    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    + +
    '; +} + +// This template shows an admin information on a users IP addresses used and errors attributed to them. +function template_trackUser() +{ + global $context, $settings, $options, $scripturl, $txt; + + // The first table shows IP information about the user. + echo ' +
    + + + + '; + + // The last IP the user used. + echo ' + + + + '; + + // Lists of IP addresses used in messages / error messages. + echo ' + + + + + + + '; + + // List any members that have used the same IP addresses as the current member. + echo ' + + + + +
    + ', $txt['view_ips_by'], ' ', $context['member']['name'], ' +
    ', $txt['most_recent_ip'], ': + ', $context['last_ip'], ' +
    ', $txt['ips_in_messages'], ': + ', (count($context['ips']) > 0 ? implode(', ', $context['ips']) : '(' . $txt['none'] . ')'), ' +
    ', $txt['ips_in_errors'], ': + ', (count($context['ips']) > 0 ? implode(', ', $context['error_ips']) : '(' . $txt['none'] . ')'), ' +
    ', $txt['members_in_range'], ': + ', (count($context['members_in_range']) > 0 ? implode(', ', $context['members_in_range']) : '(' . $txt['none'] . ')'), ' +
    +
    +
    '; + + // The second table lists all the error messages the user has caused/received. + echo ' +
    + + + + + + + + + + + + '; + + // If there arn't any messages just give a message stating this. + if (empty($context['error_messages'])) + echo ' + '; + + // Otherwise print every error message out. + else + // For every error message print the IP address that caused it, the message displayed and the date it occurred. + foreach ($context['error_messages'] as $error) + echo ' + + + + + '; + echo ' +
    + ', $txt['errors_by'], ' ', $context['member']['name'], ' +
    + ', $txt['errors_desc'], ' +
    + ', $txt[139], ': ', $context['page_index'], ' +
    ', $txt['ip_address'], '', $txt[72], '', $txt[317], '
    ', $txt['no_errors_from_user'], '
    + ', $error['ip'], ' + + ', $error['message'], '
    + ', $error['url'], ' +
    ', $error['time'], '
    +
    '; +} + +// The template for trackIP, allowing the admin to see where/who a certain IP has been used. +function template_trackIP() +{ + global $context, $settings, $options, $scripturl, $txt; + + // This function always defaults to the last IP used by a member but can be set to track any IP. + echo ' +
    '; + + // The first table in the template gives an input box to allow the admin to enter another IP to track. + echo ' +
    + + + + + + +
    ', $txt['trackIP'], '
    + ', $txt['enter_ip'], ':     +
    +
    +
    +
    '; + + // The table inbetween the first and second table shows links to the whois server for every region. + if ($context['single_ip']) + { + echo ' +
    + + + + + + +
    + ', $txt['whois_title'], ' ', $context['ip'], ' +
    '; + foreach ($context['whois_servers'] as $server) + echo ' + ', $server['name'], '
    '; + echo ' +
    +
    +
    '; + } + + // The second table lists all the members who have been logged as using this IP address. + echo ' +
    + + + + + + + '; + if (empty($context['ips'])) + echo ' + '; + else + // Loop through each of the members and display them. + foreach ($context['ips'] as $ip => $memberlist) + echo ' + + + + '; + echo ' +
    + ', $txt['members_from_ip'], ' ', $context['ip'], ' +
    ', $txt['ip_address'], '', $txt['display_name'], '
    ', $txt['no_members_from_ip'], '
    ', $ip, '', implode(', ', $memberlist), '
    +
    +
    '; + + // The third table in the template displays a list of all the messages sent using this IP (can be quite long). + echo ' +
    + + + + + + + + + + + + + '; + + // No message means nothing to do! + if (empty($context['messages'])) + echo ' + '; + else + // For every message print the IP, member who posts it, subject (with link) and date posted. + foreach ($context['messages'] as $message) + echo ' + + + + + + '; + echo ' +
    + ', $txt['messages_from_ip'], ' ', $context['ip'], ' +
    + ', $txt['messages_from_ip_desc'], ' +
    + ', $txt[139], ': ', $context['message_page_index'], ' +
    ', $txt['ip_address'], '', $txt['rtm8'], '', $txt[319], '', $txt[317], '
    ', $txt['no_messages_from_ip'], '
    + ', $message['ip'], ' + + ', $message['member']['link'], ' + + + ', $message['subject'], ' + + ', $message['time'], '
    +
    +
    '; + + // The final table in the template lists all the error messages caused/received by anyone using this IP address. + echo ' +
    + + + + + + + + + + + + + '; + if (empty($context['error_messages'])) + echo ' + '; + else + // For each error print IP address, member, message received and date caused. + foreach ($context['error_messages'] as $error) + echo ' + + + + + + '; + echo ' +
    + ', $txt['errors_from_ip'], ' ', $context['ip'], ' +
    + ', $txt['errors_from_ip_desc'], ' +
    + ', $txt[139], ': ', $context['error_page_index'], ' +
    ', $txt['ip_address'], '', $txt['display_name'], '', $txt[72], '', $txt[317], '
    ', $txt['no_errors_from_ip'], '
    + ', $error['ip'], ' + + ', $error['member']['link'], ' + + ', $error['message'], '
    + ', $error['url'], ' +
    ', $error['error_time'], '
    +
    '; +} + +function template_showPermissions() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + + + '; + if ($context['member']['has_all_permissions']) + { + echo ' + + + '; + } + else + { + // General Permissions section. + echo ' + + + '; + if (!empty($context['member']['permissions']['general'])) + { + echo ' + + + + '; + + foreach ($context['member']['permissions']['general'] as $permission) + { + echo ' + + + + '; + } + } + else + echo ' + + + '; + + // Board permission section. + echo ' + + + '; + if (!empty($context['member']['permissions']['board'])) + { + echo ' + + + + '; + foreach ($context['member']['permissions']['board'] as $permission) + { + echo ' + + + + '; + } + } + else + echo ' + + + '; + } + echo ' +
    +   ', $txt['showPermissions'], ' +
    ', $txt['showPermissions_all'], '
    ', $txt['showPermissions_general'], '
    ', $txt['showPermissions_permission'], '
    + ', $permission['is_denied'] ? '' . $permission['id'] . '' : $permission['id'], '
    + ', $permission['name'], ' +
    '; + if ($permission['is_denied']) + echo ' + ', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']); + else + echo ' + ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']); + echo ' +
    ', $txt['showPermissions_none_general'], '
    + +
    + ', $txt['showPermissions_select'], ': + +
    +
    ', $txt['showPermissions_permission'], '
    + ', $permission['is_denied'] || !$permission['is_global'] ? '' . $permission['id'] . '' : $permission['id'], '
    + ', $permission['name'], ' +
    '; + if (!$permission['is_global']) + echo ' + ', $txt['showPermissions_local_only'], '
    + ', $txt['showPermissions_boards'], ':
       ', implode('
       ', $permission['boards']['allowed']); + elseif ($permission['is_global'] && $permission['is_denied']) + { + echo ' + ', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '
    '; + if (empty($context['current_board'])) + echo ' + ', $txt['showPermissions_boards_denied'], ': ', empty($permission['boards']['allowed']) ? $txt['showPermissions_all_boards'] : $txt['showPermissions_all_boards_except'] . ':
       ' . implode('
       ', $permission['boards']['allowed']); + } + elseif ($permission['is_global']) + { + echo ' + ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']), '
    '; + if (empty($context['current_board'])) + echo ' + ', $txt['showPermissions_boards'], ': ', empty($permission['boards']['denied']) ? $txt['showPermissions_all_boards'] : $txt['showPermissions_all_boards_except'] . ':
       ' . implode('
       ', $permission['boards']['denied']); + } + echo ' +
    ', $txt['showPermissions_none_board'], '

    '; +} + +function template_announce() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + + + +
    ', $txt['announce_title'], '
    ', $txt['announce_desc'], '
    + ', $txt['announce_this_topic'], ' ', $context['topic_subject'], '
    +
    '; + + foreach ($context['groups'] as $group) + echo ' + (', $group['member_count'], ')
    '; + + echo ' +
    + +
    + +
    + + + + +
    '; +} + +function template_announcement_send() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + +
    + ', $txt['announce_sending'], ' ', $context['topic_subject'], ' +
    ', $context['percentage_done'], '% ', $txt['announce_done'], '
    + +
    + + + + + + +
    + '; +} + +?> \ No newline at end of file diff --git a/Themes/default/ManagePermissions.template.php b/Themes/default/ManagePermissions.template.php new file mode 100644 index 0000000..cfd8275 --- /dev/null +++ b/Themes/default/ManagePermissions.template.php @@ -0,0 +1,309 @@ + + + + + + + + + + + + '; + + if (!empty($context['board'])) + echo ' + '; + + echo ' + + + '; + + foreach ($context['groups'] as $group) + { + echo ' + + + + '; + + if (!empty($context['board'])) + { + echo ' + '; + } + + echo ' + + + '; + } + + echo ' + + + +
    ' . $txt[119] . ' ' . $txt['permissions_title'] . '
    ', empty($context['board']) ? $txt['permissions_groups'] : $txt['permissions_boards'] . ' (' . $context['board']['name'] . ')', '
    ', $txt['membergroups_name'], '', $txt['membergroups_members_top'], ' + ', $txt['membergroups_permissions'], '
    +
    ', $txt['permissions_allowed'], '
    ', $txt['permissions_denied'], ' +
    ', $txt['permissions_access'], '', $txt['permissions_modify'], ' +
    ', $group['name'], '', $group['can_search'] ? $group['link'] : $group['num_members'], ' +
    ', $group['num_permissions']['allowed'], '
    ', empty($group['num_permissions']['denied']) || $group['id'] == 1 ? $group['num_permissions']['denied'] : '' . $group['num_permissions']['denied'] . '', ' +
    '; + + // Don't show the checkbox for admins and moderators, doesn't make sense! + if ($group['id'] != 1 && $group['id'] != 3) + echo ' + '; + + echo ' + ', $group['allow_modify'] ? '' . $txt['permissions_modify'] . '' : '', '', $group['allow_modify'] ? '' : '', '
    +
    +
    ', $txt['permissions_with_selection'], '...
    + ', $txt['permissions_apply_pre_defined'], ' (?): +

    '; + + if (!empty($context['board']) && !empty($context['copy_boards'])) + { + echo ' + ', $txt['permissions_copy_from_board'], ': +

    '; + } + + echo ' + ', $txt['permissions_like_group'], ': +

    +   +
    + + +
    +
    '; + if (!empty($context['boards'])) + { + echo ' + + + + + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + '; + } + + echo ' +
    ' . $txt[119] . ' ', $txt['permissions_boards'], '
    ', $txt[20], '', $txt['permissions_switch'], '
    + ', str_repeat('-', $board['child_level']), ' ' . $board['name'] . ' (', $board['use_local_permissions'] ? $txt['permissions_local'] : $txt['permissions_global'], ') + ', $txt['permissions_global'], '', $txt['permissions_local'], '
    '; + } + + if (!empty($context['board'])) + echo ' + '; + + echo ' + + '; +} + +function template_modify_group() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + +
    + + + '; + echo ' + + + '; + foreach ($context['permissions'] as $permission_type) + { + if ($permission_type['show']) + { + echo ' + + + + '; + foreach ($permission_type['columns'] as $column) + { + echo ' + '; + } + } + } + echo ' + + + +
    ', $context['local'] ? $txt['permissions_modify_local'] : $txt['permissions_modify_group'] . ' - ' . $context['group']['name'], '
    ', $txt['permissions_option_desc'], '
    '; + if ($context['local']) + echo ' + ', $txt['permissions_local_for'], ' \'', $context['group']['name'], '\' ', $txt['permissions_on'], ' \'', $context['board']['name'], '\''; + else + echo ' + ', $permission_type['id'] == 'membergroup' ? $txt['permissions_general'] : $txt['permissions_board'] . ' - ' . $context['group']['name']; + echo ' +
    + '; + foreach ($column as $permissionGroup) + { + echo ' + + + + + + '; + + if (!empty($permissionGroup['permissions'])) + { + $alternate = false; + foreach ($permissionGroup['permissions'] as $permission) + { + echo ' + + '; + if ($permission['has_own_any']) + echo ' + + + + + + + + + + + + + + '; + else + echo ' + + + + + '; + + $alternate = !$alternate; + } + } + + echo ' + + + '; + } + + echo ' +
    ', $permissionGroup['name'], '
    ', $txt['permissions_option_on'], '
    ', $txt['permissions_option_off'], '
    ', $txt['permissions_option_deny'], '
    + ', $permission['show_help'] ? '' . $txt[119] . '' : '', ' + ', $permission['name'], '
    ', $permission['own']['name'], ':
    ', $permission['any']['name'], ':
    ', $permission['name'], '
     
    +
     
    + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/default/ManageSmileys.template.php b/Themes/default/ManageSmileys.template.php new file mode 100644 index 0000000..b1ab058 --- /dev/null +++ b/Themes/default/ManageSmileys.template.php @@ -0,0 +1,734 @@ + + + ', $txt[119], ' ', $txt['smileys_manage'], ' + + + + > ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' + + + + ', $context['explain_text'], ' + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['smiley_settings'], '
    ', $txt['smiley_set_select_default'], ': + +
    :
    :
    ', $txt['smileys_enable_note'], '
    ', $txt['smiley_sets_base_url'], ':
    ', $txt['smiley_sets_base_dir'], ':
    + +
    + +
    '; +} + +// Editing the smiley sets. +function template_editsets() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + > ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + '; + + foreach ($context['smiley_sets'] as $smiley_set) + echo ' + + + + + + + '; + + echo ' + + + +
    ', $txt['smiley_sets_default'], '', $txt['smiley_sets_name'], '', $txt['smiley_sets_url'], '', $txt['smiley_set_modify'], ' 
    ', $smiley_set['selected'] ? '*' : '', '', $smiley_set['name'], '', $modSettings['smileys_url'], '/', $smiley_set['path'], '/...', $txt['smiley_set_modify'], '', $smiley_set['id'] != 0 ? '' : '', '
    +
    + + +
    + +

    + + + + + + + +
    ', $txt['smiley_sets_latest'], '
    ', $txt['smiley_sets_latest_fetch'], '
    + + + '; +} + +// Modifying a smiley set. +function template_modifyset() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + > ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + '; + + // If this is an existing set, and there are still un-added smileys - offer an import opportunity. + if (!empty($context['current_set']['can_import'])) + { + echo ' + + + '; + } + + echo ' + + + + + + + + + + + + '; + + // If this is a new smiley set they have the option to import smileys already in the directory. + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) + echo ' + + + + '; + + echo ' + + + +
    ', $context['current_set']['is_new'] ? $txt['smiley_set_new'] : $txt['smiley_set_modify_existing'], '
    + ', $context['current_set']['can_import'] == 1 ? $txt['smiley_set_import_single'] : $txt['smiley_set_import_multiple'], ' ', $txt['662'], ' ', $context['current_set']['can_import'] == 1 ? $txt['smiley_set_to_import_single'] : $txt['smiley_set_to_import_multiple'], ' +
    :
    : + ', $modSettings['smileys_url'], '/'; + if ($context['current_set']['id'] == 'default') + echo 'default'; + elseif (empty($context['smiley_set_dirs'])) + echo ' + '; + else + { + echo ' + '; + } + echo '/.. +
    :
    :
    + +
    + + +
    '; +} + +// Editing smileys themselves. +function template_editsmileys() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + > ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + '; + foreach ($context['smileys'] as $smiley) + echo ' + + + '; + echo ' + + + +
    + +
    + ', $context['sort'] == 'code' ? '' . $txt['smileys_code'] . '' : '' . $txt['smileys_code'] . '', ' + + ', $context['sort'] == 'filename' ? '' . $txt['smileys_filename'] . '' : '' . $txt['smileys_filename'] . '', ' + + ', $context['sort'] == 'hidden' ? '' . $txt['smileys_location'] . '' : '' . $txt['smileys_location'] . '', ' + + ', $context['sort'] == 'description' ? '' . $txt['smileys_description'] . '' : '' . $txt['smileys_description'] . '', ' + + ', $txt['smileys_modify'], ' +
    + ', $smiley['description'], ' + + ', $smiley['code'], ' + + ', $smiley['filename'], ' + + ', $smiley['location'], ' + + ', $smiley['description'], empty($smiley['sets_not_found']) ? '' : '
    + ' . $txt['smileys_not_found_in_set'] . ': ' . implode(', ', $smiley['sets_not_found']), ' +
    + ', $txt['smileys_modify'], ' + + +
    +
    + +
    + +
    + '; +} + +// Editing an individual smiley +function template_modifysmiley() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + > ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['smiley_modify_existing'], '
    ', $txt['smiley_preview'], ': ( ', $txt['smiley_preview_using'], ': ) +
    :
    : '; + if (empty($context['filenames'])) + echo ' + '; + else + { + echo ' + '; + } + echo ' +
    :
    : + +
    + +
    + + +
    + '; +} + +// Adding a new smiley. +function template_addsmiley() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + > ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['smileys_add_method'], ':
    + ( ', $txt['smiley_preview_using'], ': ) +
    + : + '; + if (empty($context['filenames'])) + echo ' + '; + else + { + echo ' + '; + echo ' + '; + } + + echo ' +
    ', $txt['smileys_add_upload_choose'], ':
    ', $txt['smileys_add_upload_choose_desc'], '
    +
    + + + + + + + + + + + + + + + + + + + +
    ', $txt['smiley_new'], '
    :
    :
    : + +
    + +
    + '; +} + +// Ordering smileys. +function template_setorder() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + > ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    '; + + foreach ($context['smileys'] as $location) + { + echo ' +
    +
    + + + + + + + + + + +
    ', $location['title'], '
    ', $location['description'], '
    + ', empty($context['move_smiley']) ? $txt['smileys_move_select_smiley'] : $txt['smileys_move_select_destination'], '...
    '; + foreach ($location['rows'] as $row) + { + if (!empty($context['move_smiley'])) + echo ' + ', $txt['smileys_move_here'], ''; + foreach ($row as $smiley) + { + if (empty($context['move_smiley'])) + echo '', $smiley['description'], ''; + else + echo '', $smiley['description'], '', $txt['smileys_move_here'], ''; + } + echo ' +
    '; + } + if (!empty($context['move_smiley'])) + echo ' + ', $txt['smileys_move_here'], ''; + echo ' +
    +
    '; + } +} + +?> \ No newline at end of file diff --git a/Themes/default/Memberlist.template.php b/Themes/default/Memberlist.template.php new file mode 100644 index 0000000..d1d4f99 --- /dev/null +++ b/Themes/default/Memberlist.template.php @@ -0,0 +1,171 @@ + + + ', theme_linktree(), ' + + '; + + // Display links to view all/search. + echo ' + + + + + + + + '; + + // Display each of the column headers of the table. + foreach ($context['columns'] as $column) + { + // We're not able (through the template) to sort the search results right now... + if (isset($context['old_search'])) + echo ' + + ', $column['label'], ''; + // This is a selected solumn, so underline it or some such. + elseif ($column['selected']) + echo ' + '; + // This is just some column... show the link and be done with it. + else + echo ' + + ', $column['link'], ''; + } + + echo ' + '; + + // Assuming there are members loop through each one displaying their data. + if (!empty($context['members'])) + { + foreach ($context['members'] as $member) + echo ' + + + + + + + + + + + + + + '; + } + // No members? + else + echo ' + + + '; + + // Show the page numbers again. (makes 'em easier to find!) + echo ' + + + +
    + ', $context['sort_links'], ' +
    '; + + // Display page numbers and the a-z links for sorting by name if not a result of a search. + if (!isset($context['old_search'])) + echo ' + + + + + +
    ', $txt[139], ': ', $context['page_index'], '', $context['letter_links'] . '
    '; + // If this is a result of a search then just show the page numbers. + else + echo ' + ', $txt[139], ': ', $context['page_index']; + + echo ' +
    + ' . $column['label'] . '
    + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $member['online']['text'] . '' : $member['online']['label'], $context['can_send_pm'] ? '' : '', ' + ', $member['link'], '', $member['email'], '', $member['website']['link'], '', $member['icq']['link'], '', $member['aim']['link'], '', $member['yim']['link'], '', $member['msn']['link'], '', $member['group'], '', $member['registered'], '', $member['posts'], ' + ', $member['posts'] > 0 ? '' : '', ' +
    ', $txt[170], '
    ', $txt[139], ': ', $context['page_index'], '
    '; + + // If it is displaying the result of a search show a "search again" link to edit their criteria. + if (isset($context['old_search'])) + echo ' +
    + ', $txt['mlist_search2'], ''; +} + +// A page allowing people to search the member list. +function template_search() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Start the submission form for the search! + echo ' +
    '; + + // Display that link tree... + echo ' + + + + +
    ', theme_linktree(), '
    '; + + // Display links to view all/search. + echo ' + + + + '; + + // Display the input boxes for the form. + echo ' + + + +
    + ', $context['sort_links'] . ' +
    + + + + + + + + +
    +
    + ', $txt[582], ':
    +
    +
    + ', $txt['mlist_search_email'], '
    + ', $txt['mlist_search_messenger'], '
    + ', $txt['mlist_search_group'], ' +
    + ', $txt['mlist_search_name'], '
    + ', $txt['mlist_search_website'], ' +
    +
    +
    '; +} + +?> diff --git a/Themes/default/MessageIndex.template.php b/Themes/default/MessageIndex.template.php new file mode 100644 index 0000000..0b841ef --- /dev/null +++ b/Themes/default/MessageIndex.template.php @@ -0,0 +1,416 @@ +', theme_linktree(); + echo ' +

    ' . $context['page_title'] . '

    '; + + if (isset ($context['moderators_list'])) { + echo ' + ', $context['moderators_list'], ''; + } + + echo ' +
    '; + + if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) + { + echo ' +
    + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + + '; + } + echo ' +
    ', $txt['parent_boards'], '
    '; + + // Is this board itself new? + if ($board['new']) + echo '', $txt[333], ''; + // Is one of this board's children new, then? + elseif ($board['children_new']) + echo '', $txt[333], ''; + // I guess it's not new at all. + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + if (!empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + if (!empty($board['children'])) + { + $children = array(); + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', $txt['parent_boards'], ': ', implode(', ', $children), '
    '; + } + + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + if (!empty($board['last_post']['id'])) + echo ' + ', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link']; + + echo ' +
    '; + } + + if (!empty($options['show_board_desc']) && $context['description'] != '') + { + echo ' + + + + +
    + ', $context['description'], ' +
    '; + } + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5']) . '' : '', '', theme_show_buttons(), '
    '; + + if (true OR isset($_GET['debug'])) + echo $context['alphabet_index']; + + echo ' +
    '; + + // If Quick Moderation is enabled (and set to checkboxes - 1) start the form. + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' +
    '; + + echo ' + + '; + + // Are there actually any topics to show? + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + + // Show a "select all" box for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' + '; + // If it's on in "image" mode, don't show anything but the column. + elseif (!empty($options['display_quick_mod'])) + echo ' + '; + } + // No topics.... just say, "sorry bub". + else + echo ' + '; + + echo ' + '; + + foreach ($context['topics'] as $topic) + { + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + if($context['user']['is_guest']) + echo ''; + else echo ''; + } + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + echo ''; + } + echo ' + + + + + + + + '; + + // Show the quick moderation options? + if (!empty($options['display_quick_mod'])) + { + echo ' + '; + } + echo ' + '; + } + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + { + echo ' + + + '; + } + + echo ' +
    '; + $first_topic = current($context['topics']); + echo $first_topic['is_sticky'] ? $txt['sticky_topics'] : '' ,'', $txt[70],'', $txt[109], '', $txt[110], '', $txt[301], '', $txt[111], ' + + ', $txt[151], '
    +
    + + +
     ', $txt['non_sticky_topics'], '
     ', $txt['non_sticky_topics'], '
    + + + + '; + // Is this topic new? (assuming they are logged in!) + if ($topic['new'] && $context['user']['is_logged']) + echo ' + ', $txt[302], ''; + + echo ' + ', $topic['first_post']['link']; + + if (! empty ($topic['subtitle'])) + echo ' +
    ', $topic['subtitle'], '
    '; + + echo ' + ', $topic['pages'], ' +
    + ', $topic['first_post']['member']['link'], ' + + ', $topic['replies'], ' + + ', $topic['views'], ' + '; +/* if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif')) + echo ' + ', $txt[111], '';*/ + echo ' + + ', $topic['last_post']['time'], '
    + ', $txt[525], ' ', $topic['last_post']['member']['link'], ' +
    +
    '; + if ($options['display_quick_mod'] == 1 && ($topic['quick_mod']['remove'] || $topic['quick_mod']['lock'] || $topic['quick_mod']['sticky'] || $topic['quick_mod']['move'])) + echo ' + '; + else + { + // Check permissions on each and show only the ones they are allowed to use. + if ($topic['quick_mod']['remove']) + echo '', $txt[63], ''; + if ($topic['quick_mod']['lock']) + echo '', $txt['smf279'], ''; + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) + echo '
    '; + if ($topic['quick_mod']['sticky']) + echo '', $txt['smf277'], ''; + if ($topic['quick_mod']['move']) + echo '', $txt[132], ''; + } + echo '
    + '; + if ($context['can_move']) + { + echo ' + '; + } + echo ' + +
    '; + + // Finish off the form - again, if Quick Moderation is being done with checkboxes. (1) + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' + +
    '; + + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : '', '', theme_show_buttons(), '
    +
    + '; + + // Show breadcrumbs at the bottom too? + if ($settings['linktree_inline']) + echo ' + + + + '; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + } + + echo ' + + + + + + +
    ', theme_linktree(), '

    '; + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + else + echo $txt['who_viewing_board'],empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], '
    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    '; + echo ' +
    + : +   + +
    '; + + echo ' + +
    '; +} + +function theme_show_buttons() +{ + global $context, $settings, $options, $txt, $scripturl; + + $buttonArray = array(); + + // If they are logged in, and the mark read buttons are enabled.. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[300] . '' : $txt[300]) . ''; + + // If the user has permission to show the notification button... ask them if they're sure, though. + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Are they allowed to post new topics? + if ($context['can_post_new']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[33] . '' : $txt[33]) . ''; + + // How about new polls, can the user post those? + if ($context['can_post_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf20'] . '' : $txt['smf20']) . ''; + + return implode($context['menu_separator'], $buttonArray); +} + +?> diff --git a/Themes/default/MessageIndex.template.php.backup b/Themes/default/MessageIndex.template.php.backup new file mode 100644 index 0000000..c93c0f3 --- /dev/null +++ b/Themes/default/MessageIndex.template.php.backup @@ -0,0 +1,417 @@ +', theme_linktree(); + echo ' +

    ' . $context['page_title'] . '

    '; + + if (isset ($context['moderators_list'])) { + echo ' + ', $context['moderators_list'], ''; + } + + echo ' +
  • '; + + if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) + { + echo ' +
    + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + + '; + } + echo ' +
    ', $txt['parent_boards'], '
    '; + + // Is this board itself new? + if ($board['new']) + echo '', $txt[333], ''; + // Is one of this board's children new, then? + elseif ($board['children_new']) + echo '', $txt[333], ''; + // I guess it's not new at all. + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + if (!empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + if (!empty($board['children'])) + { + $children = array(); + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', $txt['parent_boards'], ': ', implode(', ', $children), '
    '; + } + + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + if (!empty($board['last_post']['id'])) + echo ' + ', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link']; + + echo ' +
    '; + } + + if (!empty($options['show_board_desc']) && $context['description'] != '') + { + echo ' + + + + +
    + ', $context['description'], ' +
    '; + } + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5']) . '' : '', '', theme_show_buttons(), '
    '; + + if (true OR isset($_GET['debug'])) + echo $context['alphabet_index']; + + echo ' +
    '; + + // If Quick Moderation is enabled (and set to checkboxes - 1) start the form. + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' +
    '; + + echo ' + + '; + + // Are there actually any topics to show? + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + + // Show a "select all" box for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' + '; + // If it's on in "image" mode, don't show anything but the column. + elseif (!empty($options['display_quick_mod'])) + echo ' + '; + } + // No topics.... just say, "sorry bub". + else + echo ' + '; + + echo ' + '; + + foreach ($context['topics'] as $topic) + { + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + if($context['user']['is_guest']) + echo ''; + else echo ''; + } + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + echo ''; + } + echo ' + + + + + + + + '; + + // Show the quick moderation options? + if (!empty($options['display_quick_mod'])) + { + echo ' + '; + } + echo ' + '; + } + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + { + echo ' + + + '; + } + + echo ' +
    '; + $first_topic = current($context['topics']); + echo $first_topic['is_sticky'] ? $txt['sticky_topics'] : '' ,'', $txt[70],'', $txt[109], '', $txt[110], '', $txt[301], '', $txt[111], ' + + ', $txt[151], '
    +
    + + +
     ', $txt['non_sticky_topics'], '
     ', $txt['non_sticky_topics'], '
    + + + + '; + // Is this topic new? (assuming they are logged in!) + if ($topic['new'] && $context['user']['is_logged']) + echo ' + ', $txt[302], ''; + + echo ' + ', $topic['first_post']['link']; + + if (! empty ($topic['subtitle'])) + echo ' +
    ', $topic['subtitle'], '
    '; + + echo ' + ', $topic['pages'], ' +
    + ', $topic['first_post']['member']['link'], ' + + ', $topic['replies'], ' + + ', $topic['views'], ' + '; +/* if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif')) + echo ' + ', $txt[111], '';*/ + echo ' + + ', $topic['last_post']['time'], '
    + ', $txt[525], ' ', $topic['last_post']['member']['link'], ' +
    +
    '; + if ($options['display_quick_mod'] == 1 && ($topic['quick_mod']['remove'] || $topic['quick_mod']['lock'] || $topic['quick_mod']['sticky'] || $topic['quick_mod']['move'])) + echo ' + '; + else + { + // Check permissions on each and show only the ones they are allowed to use. + if ($topic['quick_mod']['remove']) + echo '', $txt[63], ''; + if ($topic['quick_mod']['lock']) + echo '', $txt['smf279'], ''; + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) + echo '
    '; + if ($topic['quick_mod']['sticky']) + echo '', $txt['smf277'], ''; + if ($topic['quick_mod']['move']) + echo '', $txt[132], ''; + } + echo '
    + '; + if ($context['can_move']) + { + echo ' + '; + } + echo ' + +
    '; + + // Finish off the form - again, if Quick Moderation is being done with checkboxes. (1) + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' + +
    '; + + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : '', '', theme_show_buttons(), '
    +
    + '; + + // Show breadcrumbs at the bottom too? + if ($settings['linktree_inline']) + echo ' + + + + '; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + } + + echo ' + + + + + + +
    ', theme_linktree(), '

    '; + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + else + echo $txt['who_viewing_board'],empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], '
    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    '; +if (0) { + echo ' +
    + : +   + +
    '; +} + echo ' + +
    '; +} + +function theme_show_buttons() +{ + global $context, $settings, $options, $txt, $scripturl; + + $buttonArray = array(); + + // If they are logged in, and the mark read buttons are enabled.. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[300] . '' : $txt[300]) . ''; + + // If the user has permission to show the notification button... ask them if they're sure, though. + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Are they allowed to post new topics? + if ($context['can_post_new']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[33] . '' : $txt[33]) . ''; + + // How about new polls, can the user post those? + if ($context['can_post_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf20'] . '' : $txt['smf20']) . ''; + + return implode($context['menu_separator'], $buttonArray); +} + +?> diff --git a/Themes/default/MessageIndex.template.php.new b/Themes/default/MessageIndex.template.php.new new file mode 100644 index 0000000..f7c44b5 --- /dev/null +++ b/Themes/default/MessageIndex.template.php.new @@ -0,0 +1,371 @@ +', theme_linktree(); + echo ' +

    ' . $context['page_title'] . '

    '; + + if (isset ($context['moderators_list'])) { + echo ' + ', $context['moderators_list'], ''; + } + + echo ' +
    '; + + if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) + { + echo ' +
    + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + + '; + } + echo ' +
    ', $txt['parent_boards'], '
    '; + + // Is this board itself new? + if ($board['new']) + echo '', $txt[333], ''; + // Is one of this board's children new, then? + elseif ($board['children_new']) + echo '', $txt[333], ''; + // I guess it's not new at all. + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + if (!empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + if (!empty($board['children'])) + { + $children = array(); + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', $txt['parent_boards'], ': ', implode(', ', $children), '
    '; + } + + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + if (!empty($board['last_post']['id'])) + echo ' + ', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link']; + + echo ' +
    '; + } + + if (!empty($options['show_board_desc']) && $context['description'] != '') + { + echo ' + + + + +
    + ', $context['description'], ' +
    '; + } + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5']) . '' : '', '', theme_show_buttons(), '
    '; + + if (isset($_GET['debug'])) + echo $context['alphabet_index']; + + echo ' +
    '; + + // If Quick Moderation is enabled (and set to checkboxes - 1) start the form. + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' +
    '; + + + // Are there actually any topics to show? + if (!empty($context['topics'])) + { + $first_topic = current($context['topics']); + } + // No topics.... just say, "sorry bub". + else + echo ' +
    ', $txt[151], '
    '; + + $odd = false; + foreach ($context['topics'] as $topic) + { + $odd = !$odd; + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + if($context['user']['is_guest']) + echo ' +
    + + +
    '; + else echo '
    '; + } + + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + echo '
    ', $txt['non_sticky_topics'], '
    '; + } + + if ($odd) + echo '
    + + + + + + '; + + // This is used to alternate the color of the background. + $alternate = true; + + // For every member display their name, time and action (and more for admin). + foreach ($context['members'] as $member) + { + // $alternate will either be true or false. If it's true, use "windowbg2" and otherwise use "windowbg". + echo ' + + + + + '; + + // Switch alternate to whatever it wasn't this time. (true -> false -> true -> false, etc.) + $alternate = !$alternate; + } + + echo ' + + + +
    ', $txt['who_user'], ' ', $context['sort_by'] == 'user' ? '' : '', '', $txt['who_time'], ' ', $context['sort_by'] == 'time' ? '' : '', '', $txt['who_action'], '
    '; + + // Guests don't have information like icq, msn, y!, and aim... and they can't be messaged. + if (!$member['is_guest']) + { + echo ' +
    + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $member['online']['text'] . '' : $member['online']['text'], $context['can_send_pm'] ? '' : '', ' + ', $member['icq']['link'], ' ', $member['msn']['link'], ' ', $member['yim']['link'], ' ', $member['aim']['link'], ' +
    '; + } + + echo ' + ', $member['is_guest'] ? $member['name'] : '' . $member['name'] . '', ''; + + if (!empty($member['ip'])) + echo ' + (' . $member['ip'] . ')'; + + echo ' +
    ', $member['time'], '', $member['action'], '
    ', $txt[139], ': ', $context['page_index'], '
    '; +} + +?> \ No newline at end of file diff --git a/Themes/default/Wireless.template.php b/Themes/default/Wireless.template.php new file mode 100644 index 0000000..f2b73f5 --- /dev/null +++ b/Themes/default/Wireless.template.php @@ -0,0 +1,498 @@ + + +'; +} + +// This is the board index (main page) in WAP 1.1. +function template_wap_boardindex() +{ + global $context, $settings, $options, $scripturl; + + // This is the "main" card... + echo ' + +

    ', $context['forum_name'], '

    '; + + // Show an anchor for each category. + foreach ($context['categories'] as $category) + echo ' +

    ', $category['name'], '

    '; + + // Okay, that's it for the main card. + echo ' +
    '; + + // Now fill out the deck of cards with the boards in each category. + foreach ($context['categories'] as $category) + { + // Begin the card, and make the name available. + echo ' + +

    ', $category['name'], '

    '; + + // Now show a link for each board. + foreach ($category['boards'] as $board) + echo ' +

    ', $board['name'], '

    '; + + echo ' +
    '; + } +} + +// This is the message index (list of topics in a board) for WAP 1.1. +function template_wap_messageindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + +

    ', $context['name'], '

    +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + + if (isset($context['boards']) && count($context['boards']) > 0) + { + foreach ($context['boards'] as $board) + echo ' +

    - ' . $board['name'] . '

    '; + echo ' +


    '; + } + + if (!empty($context['topics'])) + foreach ($context['topics'] as $topic) + echo ' +

    ' . $topic['first_post']['subject'] . ' - ' . $topic['first_post']['member']['name'] . '

    '; + + echo ' +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    +
    '; +} + +function template_wap_display() +{ + global $context, $settings, $options, $txt; + + echo ' + +

    ' . $context['subject'] . '

    +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + while ($message = $context['get_message']()) + { + // This is a special modification to the post so it will work on phones: + $wireless_message = strip_tags(str_replace(array('
    ', '
    ', '
    '), '
    ', $message['body']), '
    '); + + echo ' +

    ' . $message['member']['name'] . ':

    +

    ' . $wireless_message . '

    '; + } + echo ' +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    + '; +} + +function template_wap_error() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + +

    ' . $context['error_title'] . '

    +

    ' . $context['error_message'], '

    +

    ', $txt['wireless_error_home'], '

    +
    '; +} + +function template_wap_below() +{ + global $context, $settings, $options; + + echo ' +'; +} + +// The cHTML protocol used for i-mode starts here. +function template_imode_above() +{ + global $context, $settings, $options; + + echo ' + + + + ', $context['page_title'], ' + + '; +} + +function template_imode_boardindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + '; + $count = 0; + foreach ($context['categories'] as $category) + { + echo ' + '; + foreach ($category['boards'] as $board) + { + $count++; + echo ' + '; + } + } + echo ' + '; + if ($context['user']['is_guest']) + echo ' + '; + else + echo ' + '; + echo ' +
    ' . $context['forum_name'] . '
    ' . $category['name'] . '
    ' . ($board['new'] ? '' : '') . ($count < 10 ? '&#' . (59105 + $count) . '; ' : '- ') . ($board['new'] ? '' : '') . '' . $board['name'] . '
    ', $txt['wireless_options'], '
    ', $txt['wireless_options_login'], '
    ', $txt['wireless_options_logout'], '
    '; +} + +function template_imode_messageindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + '; + + if (!empty($context['boards'])) + { + echo ' + '; + foreach ($context['boards'] as $board) + echo ' + '; + } + + $count = 0; + if (!empty($context['topics'])) + { + echo ' + + '; + foreach ($context['topics'] as $topic) + { + $count++; + echo ' + '; + } + } + echo ' + + ' . (!empty($context['links']['next']) ? ' + ' : '') . (!empty($context['links']['prev']) ? ' + ' : '') . ($context['can_post_new'] ? ' + ' : '') . ' +
    ' . $context['name'] . '
    ' . $txt['parent_boards'] . '
    ' . ($board['new'] ? '- ' : '- ') . '' . $board['name'] . '
    ' . $txt[64] . '
    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '
    ' . ($count < 10 ? '&#' . (59105 + $count) . '; ' : '') . '' . $topic['first_post']['subject'] . '' . ($topic['new'] && $context['user']['is_logged'] ? ' [' . $txt[302] . ']' : '') . '
    ', $txt['wireless_navigation'], '
    ' . $txt['wireless_navigation_up'] . '
    ' . $txt['wireless_navigation_next'] . '
    [*] ' . $txt['wireless_navigation_prev'] . '
    ' . $txt[33] . '
    '; +} + +function template_imode_display() +{ + global $context, $settings, $options, $scripturl, $board, $txt; + + echo ' + + + '; + while ($message = $context['get_message']()) + { + // This is a special modification to the post so it will work on phones: + $wireless_message = strip_tags(str_replace(array('
    ', '
    ', '
    '), '
    ', $message['body']), '
    '); + + echo ' +
    '; + } + echo ' + + ' . (!empty($context['links']['next']) ? ' + ' : '') . (!empty($context['links']['prev']) ? ' + ' : '') . ($context['can_reply'] ? ' + ' : '') . ' +
    ' . $context['subject'] . '
    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '
    ' . ($message['first_new'] ? ' + ' : '') . ' + ' . $message['member']['name'] . ':
    + ' . $wireless_message . ' +
    ', $txt['wireless_navigation'], '
    ' . $txt['wireless_navigation_index'] . '
    ' . $txt['wireless_navigation_next'] . '
    ' . $txt['wireless_navigation_prev'] . '
    ' . $txt[146] . '
    '; +} + +function template_imode_post() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + ' . ($context['locked'] ? ' + ' : '') . (isset($context['name']) ? ' + + ' : '') . (isset($context['email']) ? ' + + ' : '') . ' + + + + + + +
    ' . $txt['smf287'] . '
    ' . (isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) ? '' . $txt[35] . '' : $txt[35]) . ':
    ' . (isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? '' . $txt[69] . '' : $txt[69]) . ':
    ' . (isset($context['post_error']['no_subject']) ? '' . $txt[70] . '' : $txt[70]) . ':
    ' . (isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? '' . $txt[72] . '' : $txt[72]) . ':
    + + + + + ' . (isset($context['current_topic']) ? ' + ' : '') . ' + +
    +  ' . (isset($context['current_topic']) ? '' . $txt['wireless_navigation_topic'] . '' : '' . $txt['wireless_navigation_index'] . '') . ' +
    +
    '; +} + +function template_imode_login() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + '; + if (isset($context['login_error'])) + echo ' + '; + echo ' + + + + + + + +
    ' . $txt[34] . '
    ' . $context['login_error'] . '
    ' . $txt[35] . ':
    ' . $txt[36] . ':
    ' . $txt['wireless_navigation'] . '
    [0] ' . $txt['wireless_navigation_up'] . '
    +
    '; +} + +function template_imode_error() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + +
    ' . $context['error_title'] . '
    ' . $context['error_message'], '
    [0] ' . $txt['wireless_error_home'] . '
    '; +} + +function template_imode_below() +{ + global $context, $settings, $options; + + echo ' + +'; +} + +// XHTMLMP (XHTML Mobile Profile) templates used for WAP 2.0 start here +function template_wap2_above() +{ + global $context, $settings, $options; + + echo ' + + + + ', $context['page_title'], ' + + + '; +} + +function template_wap2_boardindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +

    ' . $context['forum_name'] . '

    '; + + $count = 0; + foreach ($context['categories'] as $category) + { + echo ' +

    ' . ($category['can_collapse'] ? '' : '') . $category['name'] . ($category['can_collapse'] ? '' : '') . '

    '; + foreach ($category['boards'] as $board) + { + $count++; + echo ' +

    ' . ($board['new'] ? '' : '') . ($count < 10 ? '[' . $count . '] ' : '[-] ') . ($board['new'] ? '' : '') . '' . $board['name'] . '

    '; + } + } + + echo ' +

    ' . $txt['wireless_options'] . '

    '; + if ($context['user']['is_guest']) + echo ' +

    ' . $txt['wireless_options_login'] . '

    '; + else + echo ' +

    ' . $txt['wireless_options_logout'] . '

    '; +} + +function template_wap2_messageindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +

    ' . $context['name'] . '

    '; + + if (!empty($context['boards'])) + { + echo ' +

    ' . $txt['parent_boards'] . '

    '; + foreach ($context['boards'] as $board) + echo ' +

    ' . ($board['new'] ? '[-] ' : '[-] ') . '' . $board['name'] . '

    '; + } + + $count = 0; + if (!empty($context['topics'])) + { + echo ' +

    ' . $txt[64] . '

    +

    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + foreach ($context['topics'] as $topic) + { + $count++; + echo ' +

    ' . ($count < 10 ? '[' . $count . '] ' : '') . '' . $topic['first_post']['subject'] . '' . ($topic['new'] && $context['user']['is_logged'] ? ' [' . $txt[302] . ']' : '') . '

    '; + } + } + echo ' +

    ', $txt['wireless_navigation'], '

    +

    [0] ' . $txt['wireless_navigation_up'] . '

    ' . (!empty($context['links']['next']) ? ' +

    [#] ' . $txt['wireless_navigation_next'] . '

    ' : '') . (!empty($context['links']['prev']) ? ' +

    [*] ' . $txt['wireless_navigation_prev'] . '

    ' : '') . ($context['can_post_new'] ? ' +

    ' . $txt[33] . '

    ' : ''); +} + +function template_wap2_display() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +

    ' . $context['subject'] . '

    +

    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + $alternate = true; + while ($message = $context['get_message']()) + { + // This is a special modification to the post so it will work on phones: + $wireless_message = strip_tags(str_replace(array('
    ', '
    ', '
    '), '
    ', $message['body']), '
    '); + + echo ($message['first_new'] ? ' + ' : '') . ' +

    + ' . $message['member']['name'] . ':
    + ' . $wireless_message . ' +

    '; + $alternate = !$alternate; + } + echo ' +

    ' . $txt['wireless_navigation'] . '

    +

    [0] ' . $txt['wireless_navigation_index'] . '

    ' . (!empty($context['links']['next']) ? ' +

    [#] ' . $txt['wireless_navigation_next'] . '

    ' : '') . (!empty($context['links']['prev']) ? ' +

    [*] ' . $txt['wireless_navigation_prev'] . '

    ' : '') . ($context['can_reply'] ? ' +

    ' . $txt[146] . '

    ' : ''); +} + +function template_wap2_login() +{ + global $context, $settings, $options, $scripturl, $txt; + echo ' +
    +

    ' . $txt[34] . '

    '; + if (isset($context['login_error'])) + echo ' +

    ' . $context['login_error'] . '

    '; + echo ' +

    ' . $txt[35] . ':

    +

    +

    ' . $txt[36] . ':

    +

    +

    +

    ' . $txt['wireless_navigation'] . '

    +

    [0] ' . $txt['wireless_navigation_up'] . '

    +
    '; +} + +function template_wap2_post() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    +

    ' . $context['page_title'] . '

    ' . ($context['locked'] ? ' +

    + ' . $txt['smf287'] . ' +

    ' : '') . (isset($context['name']) ? ' +

    + ' . $txt[35] . ': +

    ' : '') . (isset($context['email']) ? ' +

    + ' . $txt[69] . ': +

    ' : '') . ' +

    + ' . $txt[70] . ': +

    +

    + ' . $txt[72] . ':
    + +

    +

    + + + + + ' . (isset($context['current_topic']) ? ' + ' : '') . ' + +

    +

    [0] ' . (isset($context['current_topic']) ? '' . $txt['wireless_navigation_topic'] . '' : '' . $txt['wireless_navigation_index'] . '') . '

    +
    '; +} + +function template_wap2_error() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +

    ' . $context['error_title'] . '

    +

    ' . $context['error_message'], '

    +

    [0] ' . $txt['wireless_error_home'] . '

    '; +} + +function template_wap2_below() +{ + global $context, $settings, $options; + + echo ' + +'; +} + +?> \ No newline at end of file diff --git a/Themes/default/bogus.js b/Themes/default/bogus.js new file mode 100644 index 0000000..e69de29 diff --git a/Themes/default/bogus.php b/Themes/default/bogus.php new file mode 100644 index 0000000..2443a70 --- /dev/null +++ b/Themes/default/bogus.php @@ -0,0 +1,4 @@ += 510) + smfFadeSwitch = !smfFadeSwitch; + // All the way faded out? + else if (smfFadePercent <= -64) + { + smfFadeSwitch = !smfFadeSwitch; + + // Go to the next item, or first if we're out of items. + setInnerHTML(smfFadeScroller, smfFadeBefore + smfFadeContent[smfFadeIndex++] + smfFadeAfter); + if (smfFadeIndex >= smfFadeContent.length) + smfFadeIndex = 0; + } + + // Increment or decrement the fade percentage. + if (smfFadeSwitch) + smfFadePercent -= 255 / smfFadeDelay; + else + smfFadePercent += 255 / smfFadeDelay; + + // If it's not outside 0 and 256... (otherwise it's just delay time.) + if (smfFadePercent < 256 && smfFadePercent > 0) + { + // Easier... also faster... + var tempPercent = smfFadePercent / 255; + + // Get the new R, G, and B. (it should be bottom + (range of color * percent)...) + var r = Math.ceil(smfFadeTo.r + smfFadeRange.r * tempPercent); + var g = Math.ceil(smfFadeTo.g + smfFadeRange.g * tempPercent); + var b = Math.ceil(smfFadeTo.b + smfFadeRange.b * tempPercent); + + // Set the color in the style, thereby fading it. + smfFadeScroller.style.color = 'rgb(' + r + ', ' + g + ', ' + b + ')'; + } + + // Keep going... + window.setTimeout('smfFader()', 10); +} \ No newline at end of file diff --git a/Themes/default/fonts-compat.css b/Themes/default/fonts-compat.css new file mode 100644 index 0000000..a58f0ae --- /dev/null +++ b/Themes/default/fonts-compat.css @@ -0,0 +1,16 @@ +body, td, .normaltext, .windowbg, .windowbg2, .titlebg, .bordercolor, .tborder, .catbg, .catbg2, .windowbg td, .windowbg2 td, .titlebg td +{ + font-size: x-small; +} +.smalltext, td.smalltext, i.smalltext, div.smalltext, .smalltext td, .quote, .quoteheader, .codeheader +{ + font-size: xx-small; +} +.largetext +{ + font-size: medium; +} +.code +{ + font-size: xx-small; +} \ No newline at end of file diff --git a/Themes/default/help/help.css b/Themes/default/help/help.css new file mode 100644 index 0000000..93ef7db --- /dev/null +++ b/Themes/default/help/help.css @@ -0,0 +1,84 @@ +body, td +{ + font-family: verdana, arial, helvetica, sans-serif; + font-size: 12px; +} +body +{ + margin: 20px; + line-height: 1.5; +} +h1, h2, h3, h4, h5, h6 +{ + font-family: arial, helvetica, sans-serif; +} +h1, h2 +{ + font-size: 18px; + margin-bottom: 0.5em; +} +h3, h4, h5, h6 +{ + font-size: 16px; + margin: 0; +} +p +{ + margin: 0 0 1.5em 0; +} +a:link, a:visited, a:active, a:hover +{ + color: #0000cc; + background-color : transparent; +} +.board, .board:link +{ + color: #000000; + text-decoration: underline; +} +.board:visited, .board:hover +{ + color: #323232; + text-decoration: underline; +} +div.footer +{ + text-align: center; + color: #6f6f6f; + padding: 3pt; +} +.smalltext +{ + font-size: 10px; +} +#menu +{ + line-height: 1; +} +#menu p +{ + margin: 0 0 1em 0; + line-height: 2; +} +table#reference1, table#reference2 +{ + border: 1px solid #cccccc; +} +table#reference1 td, table#reference2 td +{ + vertical-align: top; + background-color: #efefef; + border: 1px solid #cccccc; +} +th +{ + color: white; + background-color: #6b8eae; + border: 1px solid #6b8eae; + font-weight: bold; + text-align: left; +} +ol.la +{ + list-style-type: lower-alpha; +} \ No newline at end of file diff --git a/Themes/default/help/index.english.html b/Themes/default/help/index.english.html new file mode 100644 index 0000000..7757b16 --- /dev/null +++ b/Themes/default/help/index.english.html @@ -0,0 +1,382 @@ + + + + + + + + + SMF User Help: Introduction + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Introduction


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    So you've arrived at this Simple Machines Forum (SMF)! Perhaps you've been looking at the board index or a screen telling you that you need to register before you can read it and you're wondering what to do next?

    +

    Well, some forums permit guests to read and post, some permit guests to read only and some are restricted to registered members. We'd recommend registering at any forum that you see yourself using regularly because many of the most useful features will only become available to you when you do so. Since SMF, however, is such a flexible system that few forums are likely to be identical, we will start by describing four key areas that we'd normally expect to be there for you:

    +
      +
    1. The Main Menu
    2. +
    3. The Board Index
    4. +
    5. The Message Index
    6. +
    7. The Topic
    8. +
    +

    The Main Menu

    +

    Supposing you've arrived here as a guest (or have registered but are currently logged out), the main menu (which appears on every page) should normally comprise five or six buttons (or text links):

    +
      +
    • Home, which takes you back to the board index.
    • +
    • Help, which brings you to this guide.
    • +
    • Search, which allows you to search the forums for whatever you're looking for.
    • +
    • Calendar, which links to the forum calendar (if enabled).
    • +
    • Login, which allows you to login if already registered.
    • +
    • Register, which allows you to register (or sometimes apply for registration) when you wish to do so.
    • +
    +

    Once you've registered and logged in, however, the main menu should look a little different:

    +
      +
    • Home (as before).
    • +
    • Help (as before).
    • +
    • Search (as before).
    • +
    • Profile, which allows you to make changes to your profile settings.
    • +
    • Calendar (as before).
    • +
    • Logout, which allows you to logout again if desired.
    • +
    +

    Forum administrators should also note the presence of an additional Admin button.

    +

    The Board Index

    +

    While the board index (forum home page) is packed with all kinds of information and links, the core of the interface (at least in the SMF default theme) normally looks something like this:

    +
    +
    + + + + +
    +  Forum Name
    +
    + + + + + + + + + + +
    -  Category Name
    New PostsBoard Name
    + Board Description
    Number of topics and posts in this boardDate, time, subject and author of last post
    +

    +
    + + + + + +
      New Posts  No New PostsMark ALL messages as read
    +

    +
    +

    +
      +
    • The forum name links back to the top of the board index.
    • +
    • If the category is collapsable (shown by the little arrow symbol), clicking the category name collapses or expands the category as appropriate.
    • +
    • The board name links to the message index for that board.
    • +
    • The board description describes the board's content, and may also include links to child boards and/or specify the board's moderator(s).
    • +
    • The New Posts and No New Posts icons in the leftmost column show registered members whether there have been any new posts to the board since they last read it.
    • +
    • The Mark as Read button enables registered members to mark all posts in the entire forum as 'read'.
    • +
    +

    The Message Index

    +

    Like the board index, the message index interface is quite straightforward when reduced to its essential components:

    +
    +
    + + + + + +
    +  Forum Name
    + |- +  Category Name
    + | |- +  Board Name
    + + + + +
    + + + + + +
    Pages: [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + + + + + + + + + + + + + +
    SubjectStarted byRepliesViewsLast post  
    Topic Subject NewTopic Starter00Date, time and author of last post
    + + + + +
    + + + + + +
    Pages: [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + +
      Topic you have posted in
    +   Normal Topic
    +   Hot Topic (More than 15 Replies)
    +   Very Hot Topic (More than 25 Replies)
      Locked Topic
    +   Sticky Topic
    +   Poll
    +
    + :   +
    +

    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • The page numbers link to further pages of the board, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page.
    • +
    • The Mark as Read button enables registered members to mark all posts in this board as 'read'.
    • +
    • The Notify button enables registered members to subscribe to email notification of replies to topics in this board.
    • +
    • The New Topic and New Poll buttons are for starting new topics and polls, as described in the posting help.
    • +
    • The Subject, Started by, Replies, Views and Last post links enable you to sort the columns by these parameters (with Last post also toggling between descending and ascending order as indicated by the little arrow).
    • +
    • The topic icons in the leftmost column are explained by the key below.
    • +
    • The post icons in the next column are sometimes used to draw attention to the mood or purpose of the topic.
    • +
    • The topic subject links to the start of the topic, with extra links for subsequent pages and new buttons to take registered members straight to their first unread post of the topic.
    • +
    • Where the topic has been started or last replied to by a registered member, their names link to their respective profiles.
    • +
    • The Jump to menu provides a convenient quick method of navigating the forum.
    • +
    +

    The Topic

    +

    Sometimes referred to as threads, topics are where you find the actual messages:

    +
    +
    + + + + +
    +  Forum Name
    + |- +  Category Name
    + | |- +  Board Name
    + | | |- +  Topic Subject
    + + + + +
    + + + + + +
    Pages: [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    + + + + + +
     AuthorTopic: Topic Subject  (Read x times)
    + + + + +
    + + + + +
    + + + + + + + + +
    Author
    + Member Group
    + Post Group
    + *
    + Post Count
    +
    +
    +
    + View Profile Email Personal Message (Offline)
    + + + + + + +
    + Topic Subject +
    + « Date and Time of Post » +
    +
    Reply with quote
    +
    +
    + Here is the text of the message, which is ultimately what we're all here for! Smiley +
    +
    + + + + +
    Report to moderator     Logged
    +
    +
    +
    + + + + +
    + + + + + +
    Pages: [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    +
    +
    +
    + :   +
    +

    +
    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • Some forums may also be configured with previous and next topic links.
    • +
    • The page numbers link to further pages of the topic, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page.
    • +
    • The Reply button enables you to reply to the topic.
    • +
    • The Notify button enables registered members to subscribe to email notification of replies to the topic.
    • +
    • The Mark Unread button enables registered members to mark the topic as 'unread', which means that it will still be listed as new and can be effectively 'saved for later'. Note that this button changes to Add Poll in the bottom button set for users with permission to add polls to existing topics.
    • +
    • The Send Topic button enables registered members to send a link to the topic by email.
    • +
    • The Print button creates a simplified, printer-friendly rendering of the page.
    • +
    • The author name links to the author's profile
    • +
    • The author details in the lefthand column may be accompanied by further personal information.
    • +
    • The topic subject links back to the start of the topic.
    • +
    • The Quote button enables you to quote the post.
    • +
    • Further Modify and Delete options are normally provided to enable registered members to edit their own posts.
    • +
    • Report to moderator enables you to report abusive or wrongly-placed posts to the forum staff.
    • +
    • Logged indicates that the IP of the author has been logged. The actual IP is only available to board administrators
    • +
    • The Jump to menu provides a convenient quick method of navigating the forum.
    • +
    + + + \ No newline at end of file diff --git a/Themes/default/help/index.english.xml b/Themes/default/help/index.english.xml new file mode 100644 index 0000000..cfab7c4 --- /dev/null +++ b/Themes/default/help/index.english.xml @@ -0,0 +1,177 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Introduction + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + So you've arrived at this Simple Machines Forum (SMF)! Perhaps you've been looking at the board index or a screen telling you that you need to register before you can read it and you're wondering what to do next? + Well, some forums permit guests to read and post, some permit guests to read only and some are restricted to registered members. We'd recommend registering at any forum that you see yourself using regularly because many of the most useful features will only become available to you when you do so. Since SMF, however, is such a flexible system that few forums are likely to be identical, we will start by describing four key areas that we'd normally expect to be there for you: + +
    + The Main Menu + Supposing you've arrived here as a guest (or have registered but are currently logged out), the main menu (which appears on every page) should normally comprise five or six buttons (or text links): + + Home, which takes you back to the board index. + Help, which brings you to this guide. + Search, which allows you to search the forums for whatever you're looking for. + Calendar, which links to the forum calendar (if enabled). + Login, which allows you to login if already registered. + Register, which allows you to register (or sometimes apply for registration) when you wish to do so. + + Once you've registered and logged in, however, the main menu should look a little different: + + Home (as before). + Help (as before). + Search (as before). + Profile, which allows you to make changes to your profile settings. + Calendar (as before). + Logout, which allows you to logout again if desired. + + Forum administrators should also note the presence of an additional Admin button. +
    +
    + The Board Index + While the board index (forum home page) is packed with all kinds of information and links, the core of the interface (at least in the SMF default theme) normally looks something like this: + + + Forum Name + Category Name + Board Name + Board Description + Number of topics and posts in this board + Date, time, subject and author of last post + New Posts + No New Posts + Mark ALL messages as read + + + The forum name links back to the top of the board index. + If the category is collapsable (shown by the little arrow symbol), clicking the category name collapses or expands the category as appropriate. + The board name links to the message index for that board. + The board description describes the board's content, and may also include links to child boards and/or specify the board's moderator(s). + The New Posts and No New Posts icons in the leftmost column show registered members whether there have been any new posts to the board since they last read it. + The Mark as Read button enables registered members to mark all posts in the entire forum as 'read'. + +
    +
    + The Message Index + Like the board index, the message index interface is quite straightforward when reduced to its essential components: + + + Pages + Mark Topics as Read for this Board + Are you sure you wish to enable notification of new topics for this board? + Notify of Replies + Start new topic + Post New Poll + Subject + Started by + Replies + Views + Last post + Topic Subject + New + Topic Starter + Date, time and author of last post + Topic you have posted in + Normal Topic + Hot Topic (More than 15 Replies) + Very Hot Topic (More than 25 Replies) + Locked Topic + Sticky Topic + Poll + Jump to + Please select a destination + Another Board + go + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + The page numbers link to further pages of the board, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page. + The Mark as Read button enables registered members to mark all posts in this board as 'read'. + The Notify button enables registered members to subscribe to email notification of replies to topics in this board. + The New Topic and New Poll buttons are for starting new topics and polls, as described in the posting help. + The Subject, Started by, Replies, Views and Last post links enable you to sort the columns by these parameters (with Last post also toggling between descending and ascending order as indicated by the little arrow). + The topic icons in the leftmost column are explained by the key below. + The post icons in the next column are sometimes used to draw attention to the mood or purpose of the topic. + The topic subject links to the start of the topic, with extra links for subsequent pages and new buttons to take registered members straight to their first unread post of the topic. + Where the topic has been started or last replied to by a registered member, their names link to their respective profiles. + The Jump to menu provides a convenient quick method of navigating the forum. + +
    +
    + The Topic + Sometimes referred to as threads, topics are where you find the actual messages: + + + Reply + Are you sure you wish to enable notification of new replies for this topic? + Mark unread + Send this topic + Print + Author + Topic + Read x times + View the profile of Author + Member Group + Post Group + Post Count + Date and Time of Post + Reply with quote + Here is the text of the message, which is ultimately what we're all here for! + Smiley + Report to moderator + Logged + View Profile + Email + Personal Message (Offline) + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + Some forums may also be configured with previous and next topic links. + The page numbers link to further pages of the topic, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page. + The Reply button enables you to reply to the topic. + The Notify button enables registered members to subscribe to email notification of replies to the topic. + The Mark Unread button enables registered members to mark the topic as 'unread', which means that it will still be listed as new and can be effectively 'saved for later'. Note that this button changes to Add Poll in the bottom button set for users with permission to add polls to existing topics. + The Send Topic button enables registered members to send a link to the topic by email. + The Print button creates a simplified, printer-friendly rendering of the page. + The author name links to the author's profile + The author details in the lefthand column may be accompanied by further personal information. + The topic subject links back to the start of the topic. + The Quote button enables you to quote the post. + Further Modify and Delete options are normally provided to enable registered members to edit their own posts. + Report to moderator enables you to report abusive or wrongly-placed posts to the forum staff. + Logged indicates that the IP of the author has been logged. The actual IP is only available to board administrators + The Jump to menu provides a convenient quick method of navigating the forum. + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/default/help/index.russian.html b/Themes/default/help/index.russian.html new file mode 100644 index 0000000..3f3ccc0 --- /dev/null +++ b/Themes/default/help/index.russian.html @@ -0,0 +1,414 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    ! Simple + Machines Forum (SMF)! + , , + ?

    +

    ... + , + . , + , + . , + + SMF:

    +
      +
    1. +
    2. +
    3. +
    4. +
    +

    +

    , + . ( + ) 5 6 :

    +
      +
    • .
    • +
    • - ... - ... !!!! +
    • .
    • +
    • - ( ).
    • +
    • , + .
    • +
    • - ( + ).
    • +
    +

    , + :

    +
      +
    • ( ).
    • +
    • ( ).
    • +
    • ( ).
    • +
    • .
    • +
    • ( ).
    • +
    • , .
    • +
    +

    , + . +

    +

    +

    , + :

    +
    +
    + + + + +
    + 
    +
    + + + + + + + + + + +
    - 
    New Posts
    +
    , ,
    +

    +
    + + + + + +
      s  Mark ALL messages as read
    +

    +
    +

    +

    . + : " " " ". " " - , " " - (: "Board") .
    + : " " " ". " + " - , " " - + ( , ) + .

    +
      +
    • - .
    • +
    • ( ), , ( ) .
    • +
    • - .
    • +
    • . , .
    • +
    • , .
    • +
    • "New" .
    • +
    +

    +

    , , , :

    +
    +
    + + + + + +
    + 
    + |- + 
    + | |- + 
    + + + + +
    + + + + + +
    : [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + + + + + + + + + + + + + +
     
    New 00,
    + + + + +
    + + + + + +
    : [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + +
     
    +  
    +   ( 15 )
    +   ( 25 )
     
    +   ( )
    +  
    +
    + :   +
    +

    +
    +

    +
      +
    • ( ) + , .
    • +
    • - , , .
    • +
    • "New" .
    • +
    • e-mail .
    • +
    • , , .
    • +
    • , , , ( , , , ).
    • +
    • .
    • +
    • .
    • +
    • New, .
    • +
    • ( ) , .
    • +
    • .
    • +
    +

    +

    , , , - + , :

    +
    +
    + + + + +
    + 
    + |- + 
    + | |- + 
    + | | |- + 
    + + + + +
    + + + + + +
    : [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    + + + + + +
     :  ( x )
    + + + + +
    + + + + +
    + + + + + + + + +

    +
    +
    + *
    +
    +
    +
    +
    + View Profile Email Personal Message (Offline)
    + + + + + + +
    + +
    + « » +
    +
    Reply with quote
    +
    +
    + , , , , , ! Smiley +
    +
    + + + + +
        
    +
    +
    +
    + + + + +
    + + + + + +
    : [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    +
    +
    +
    + :   +
    +

    +
    +
    +

    +
      +
    • , .
    • +
    • ( - ) .
    • +
    • - , , .
    • +
    • (, ?).
    • +
    • e-mail .
    • +
    • "New" + , , + "" , + . , + + + .
    • +
    • .
    • +
    • - + , .
    • +
    • - .
    • +
    • , .
    • +
    • , .
    • +
    • .
    • +
    • .
    • +
    • / .
    • +
    • , IP . IP .
    • +
    • .
    • +
    + + + diff --git a/Themes/default/help/index.xslt b/Themes/default/help/index.xslt new file mode 100644 index 0000000..8ae28dc --- /dev/null +++ b/Themes/default/help/index.xslt @@ -0,0 +1,496 @@ + + + + +
    +
    + + + + +
    + + +  + + +
    + + +
    + + + + + + + + + + +
    + -  + + + +
    + + + + + + + + + + + +
    + +
    + + + + + +
    +
    +
    +
    + + + + + +
    +   + +   + + + + + {alt-mark-as-read} +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + + + +
    + + +  + +
    + |- + +  + +
    + | + |- + +  + +
    +
    + + + + +
    + + + + + +
    : [1] + + + {alt-mark-as-read} + + {alt-notify} + + {alt-new-topic} + + {alt-new-poll} +
    +
    + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + +   + +
    + + + + + + + + {alt-new} + + + + + 00 + + + +
    + + + + +
    + + + + + +
    : [1] + + + {alt-mark-as-read} + + {alt-notify} + + {alt-new-topic} + + {alt-new-poll} +
    +
    + + + + + + +
    +   + +
    +   + +
    +   + +
    +   + +
    +   + +
    +   + +
    +   + +
    +
    + : +   + + + + + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + +
    + + +  +
    + |- + +  +
    + | + |- + +  +
    + | + | + |- + +  + +
    +
    + + + + +
    + + + + + +
    + : [1] + + + + {alt-reply} + + {//alt-notify} + + {alt-mark-unread} + + {alt-send-topic} + + {alt-print} +
    +
    + + + + + +
    +   + + :  () +
    + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + +
    + + +
    + +
    + * +
    + +
    +
    +
    +
    + + + + + + {alt-view-profile} + + + + + {alt-email} + + + + + {alt-pm} +
    +
    + + + + + + +
    + + +
    « »
    +
    + + + {alt-reply-with-quote} +
    +
    +
    +  {alt-smiley} +
    +
    + + + + +
    + + +    +   + +
    +
    +
    +
    + + + + + +
    + + + + + +
    + : [1] + + + + {alt-reply} + + {//alt-notify} + + {alt-mark-unread} + + {alt-send-topic} + + {alt-print} +
    +
    +
    +
    +
    + : +   + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/default/help/loginout.english.html b/Themes/default/help/loginout.english.html new file mode 100644 index 0000000..a75cf4a --- /dev/null +++ b/Themes/default/help/loginout.english.html @@ -0,0 +1,145 @@ + + + + + + + + + SMF User Help: Logging In and Out + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Logging In and Out


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    Once you have completed the registration process, you will be able to login to the site for the first time. After that, you can choose whether to stay logged in indefinitely or logout at the end of your visit.

    +
      +
    1. + Logging In +
        +
      1. The Login Screen
      2. +
      3. The Quick Login
      4. +
      +
    2. +
    3. Logging Out
    4. +
    5. Password Reminder
    6. +
    +

    Logging In

    +

    So you might be newly registered or you might simply have been logged out from a previous visit, but there's normally a choice between the login screen and the quick login in either case.

    +

    The Login Screen

    +

    Since this screen (accessed from the Login option of the main menu) is not only where you'll normally be taken on completing registration but also the first thing you'll see in any 'members only' forum, we will describe it first:

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Login
    Username:
    Password:
    Minutes to stay logged in:
    Always stay logged in:
    Forgot your password?
    +
    +

    +

    While the Username and Password fields should be self-explanatory, Minutes to stay logged in simply means the number of minutes the cookie that keeps you logged in will last before expiring and requiring you to login again. So it's not advisable to enter a long time here if you share a computer and are likely to forget to logout, but you might prefer to check Always stay logged in if no-one else has access to your computer.

    +

    The Quick Login

    +

    Although many forums also have a quick login box to allow you to login direct from any screen, its position on the page may vary considerably from forum to forum. In the SMF default theme, for example, it's in the collapsable section at the top, whereas it's more likely to be at the bottom in themes based on the older YaBB SE forum. If you can't see it and it hasn't simply been collapsed, it's either not enabled at all (in which case you should still be able to access the login screen from the main menu) or you're already logged in (in which case the main menu should include a Logout rather than Login link!).

    + + + + +
    + + + + +
    +
    +
    + Login with username, password and session length +
    +
    +

    +

    To use the quick login box, enter your username and password, select your session length from the drop-down menu and click Login. Please note that Forever, like Always stay logged in, simply means that the computer should remember you until you next choose to logout, and not that you actually need to be online all of that time!

    +

    Logging Out

    +

    When you have finished browsing the forum, you may decide to logout. Perhaps you share a workstation with someone else, in which case leaving yourself logged in would not be a good idea. So select the Logout option from the main menu and the forum should log you out, turning you into an instant guest, clearing your name from the list of users online and safeguarding your forum identity until you choose to login again.

    +

    Password Reminder

    +

    If you're trying to login to the forum but have forgetten or lost your password, you can retrieve it with the lost password tool by following the Forgot your password? link from the login screen.

    +
    + + + + + + + + + + + + + + + + + +
    Password reminder
    Username/email: 
    by Userby Email
    Ask me my question
    You can't retrieve your password, but you can set a new one by following a link sent to you by email. You also have the option of setting a new password by answering your secret question.
    +
    +

    You can enter either your username or your email address so long as you check the appropriate option, then click the Send button to send yourself an email containing a link to reset your password. It's also possible to avoid the email altogether if you've set yourself a secret question and answer in your profile, but please beware of questions that anyone could answer or guess (like 'what is the first color of the rainbow?', which would be a very bad choice)!

    + + + \ No newline at end of file diff --git a/Themes/default/help/loginout.english.xml b/Themes/default/help/loginout.english.xml new file mode 100644 index 0000000..d6980fc --- /dev/null +++ b/Themes/default/help/loginout.english.xml @@ -0,0 +1,79 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Logging In and Out + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + Once you have completed the registration process, you will be able to login to the site for the first time. After that, you can choose whether to stay logged in indefinitely or logout at the end of your visit. + +
    + Logging In + So you might be newly registered or you might simply have been logged out from a previous visit, but there's normally a choice between the login screen and the quick login in either case. + + The Login Screen + Since this screen (accessed from the Login option of the main menu) is not only where you'll normally be taken on completing registration but also the first thing you'll see in any 'members only' forum, we will describe it first: + + + Login + Username + Password + Minutes to stay logged in + Always stay logged in + Forgot your password + + While the Username and Password fields should be self-explanatory, Minutes to stay logged in simply means the number of minutes the cookie that keeps you logged in will last before expiring and requiring you to login again. So it's not advisable to enter a long time here if you share a computer and are likely to forget to logout, but you might prefer to check Always stay logged in if no-one else has access to your computer. + + + The Quick Login + Although many forums also have a quick login box to allow you to login direct from any screen, its position on the page may vary considerably from forum to forum. In the SMF default theme, for example, it's in the collapsable section at the top, whereas it's more likely to be at the bottom in themes based on the older YaBB SE forum. If you can't see it and it hasn't simply been collapsed, it's either not enabled at all (in which case you should still be able to access the login screen from the main menu) or you're already logged in (in which case the main menu should include a Logout rather than Login link!). + + + 1 Hour + 1 Day + 1 Week + 1 Month + Forever + Login with username, password and session length + + To use the quick login box, enter your username and password, select your session length from the drop-down menu and click Login. Please note that , like Always stay logged in, simply means that the computer should remember you until you next choose to logout, and not that you actually need to be online all of that time! + +
    +
    + Logging Out + When you have finished browsing the forum, you may decide to logout. Perhaps you share a workstation with someone else, in which case leaving yourself logged in would not be a good idea. So select the Logout option from the main menu and the forum should log you out, turning you into an instant guest, clearing your name from the list of users online and safeguarding your forum identity until you choose to login again. +
    +
    + Password Reminder + If you're trying to login to the forum but have forgetten or lost your password, you can retrieve it with the lost password tool by following the Forgot your password? link from the login screen. + + + Password reminder + Username/email + Send + by User + by Email + Ask me my question + You can't retrieve your password, but you can set a new one by following a link sent to you by email. You also have the option of setting a new password by answering your secret question. + + You can enter either your username or your email address so long as you check the appropriate option, then click the Send button to send yourself an email containing a link to reset your password. It's also possible to avoid the email altogether if you've set yourself a secret question and answer in your profile, but please beware of questions that anyone could answer or guess (like 'what is the first color of the rainbow?', which would be a very bad choice)! +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/default/help/loginout.russian.html b/Themes/default/help/loginout.russian.html new file mode 100644 index 0000000..7777fc8 --- /dev/null +++ b/Themes/default/help/loginout.russian.html @@ -0,0 +1,147 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    , . , .

    +
      +
    1. + +
        +
      1. +
      2. +
      +
    2. +
    3. +
    4. ?
    5. +
    +

    +

    , - , .

    +

    +

    , , - , , , :

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
    :
    :
    ( ):
    :
    ?
    +
    +

    +

    , -. , , , . , . , , .

    +

    +

    , . SMF . , - , , .

    + + + + +
    + + + + +
    +
    +
    + +
    +
    +

    +

    , . , , , , , , .

    +

    +

    , , , . , - . , Online , .

    +

    ?

    +

    , - , + + - ? .

    +
    + + + + + + + + + + + + + + + + + +
    /E-mail: 
    User Email
    , . , .
    +
    +

    , e-mail, . , e-mail . , , , ( ? ).

    + + + diff --git a/Themes/default/help/loginout.xslt b/Themes/default/help/loginout.xslt new file mode 100644 index 0000000..0cde8b0 --- /dev/null +++ b/Themes/default/help/loginout.xslt @@ -0,0 +1,144 @@ + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +   + +
    + : +
    + : + + +
    + : + + +
    + : + + +
    + + + + + +
    + + ? + +
    +
    +
    +
    +
    +
    + + + + + + +
    + + + + +
    +
    + + + + + + + + +
    + + +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + + + +
    + +
    + :  + + + + + + +
    + + + + + +
    + + +
    + +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/default/help/pm.english.html b/Themes/default/help/pm.english.html new file mode 100644 index 0000000..95495e7 --- /dev/null +++ b/Themes/default/help/pm.english.html @@ -0,0 +1,142 @@ + + + + + + + + + SMF User Help: Personal Message + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Personal Message


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    SMF is about community and communication. And there are many ways to communicate, such as posting to the boards, personal messaging, email, ICQ, AIM and YIM. But SMF's own personal message system, as available to registered members in most forums, is sometimes a more suitable option than any of these.

    +
      +
    1. + Personal Messaging +
        +
      1. Description
      2. +
      3. Reading Your Messages
      4. +
      +
    2. +
    3. + The PM Interface +
        +
      1. Starting or Replying to a Message
      2. +
      +
    4. +
    +

    Personal Messaging

    +

    Description

    +

    While email is a good way to correspond directly with members, it also has several drawbacks for forum purposes: you must open your email application to write and send the message, the recipient must open his/her email application and check his/her mail, your message will be mixed in with all the other mail and it can sometimes take several minutes to an hour for mail to reach the recipient.

    +

    As an alternative to email, SMF offers a faster, more private method. Personal messaging on the boards provides instantaneous delivery to the recipient's private mailbox. The mail is sent and received entirely through SMF, so neither you nor the recipient have to open another program or leave SMF. Personal messaging also offers both the sender and the recipient greater privacy because no-one's real email address is revealed. Personal messages show only the handle and name of both parties.

    +

    If a recipient isn't online, personal messages wait in the member's PM box until the next time he/she logs in and reads and/or deletes them. SMF Personal Messages is a self-contained, highly private email system.

    +

    Reading Your Messages

    +

    To read your personal messages, you need to be logged in, then follow the link that says something like 'Hey, [username], you have x messages, x are new'.

    +

    The PM Interface

    +

    The PM interface is similar in operation to that of the message index. While we are showing the inbox interface here, the outbox works in much the same way:

    +
    +
    + +
    + + + + +
    +  Forum Name
    + |- +  Personal Messages
    + | |- +  Inbox
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    Delete all messages in your Inbox Outbox New Message Check for new messages
    Date  SubjectFrom
    Date and time of messageMessage SubjectAnother Member
    + + + + +
    Pages: [1]
    +
    +

    +
    +
    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • The main Delete button deletes all messages in your inbox (or outbox if open). Note that the checkbox and lower Delete button also allow you to delete selected messages, with the top checkbox selecting all.
    • +
    • The Outbox button toggles to your outbox, where it obviously becomes an Inbox button.
    • +
    • The New Message button enables you to start a new message, which is similar to starting a new topic but adds 'To:' and 'Bcc:' (blind carbon copy) fields and the option to save to your outbox.
    • +
    • The Reload button checks for new messages by refreshing the page.
    • +
    • The Date, Subject, and From links enable you to sort the columns by these parameters (with Date also toggling between descending and ascending order as indicated by the little arrow).
    • +
    • The main subject title links to the start of the message, which will be further down the same page.
    • +
    • The page numbers link to further pages of messages as applicable.
    • +
    +

    Starting or Replying to a Message

    +

    There are actually several different ways to start a new personal message, but all require you to be logged in:

    +
      +
    • You can follow the link that says something like 'Hey, [username], you have x messages, x are new', then click the New Message button in your inbox.
    • +
    • You can click another member's name, followed by Send this member a personal message from his/her profile summary screen.
    • +
    • You can start a new message direct by clicking the IM on/offline icon from the user info accompanying all of his/her posts.
    • +
    • You can start a new message direct by clicking the PM on/offline icon from the Current Status in his/her profile summary screen. (This icon/link is often duplicated in the user info described above.)
    • +
    • Replying to a message is very similar to replying to a topic.
    • +
    + + + \ No newline at end of file diff --git a/Themes/default/help/pm.english.xml b/Themes/default/help/pm.english.xml new file mode 100644 index 0000000..6dc2bf7 --- /dev/null +++ b/Themes/default/help/pm.english.xml @@ -0,0 +1,84 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Personal Message + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + SMF is about community and communication. And there are many ways to communicate, such as posting to the boards, personal messaging, email, ICQ, AIM and YIM. But SMF's own personal message system, as available to registered members in most forums, is sometimes a more suitable option than any of these. + +
    + Personal Messaging + + Description + While email is a good way to correspond directly with members, it also has several drawbacks for forum purposes: you must open your email application to write and send the message, the recipient must open his/her email application and check his/her mail, your message will be mixed in with all the other mail and it can sometimes take several minutes to an hour for mail to reach the recipient. + As an alternative to email, SMF offers a faster, more private method. Personal messaging on the boards provides instantaneous delivery to the recipient's private mailbox. The mail is sent and received entirely through SMF, so neither you nor the recipient have to open another program or leave SMF. Personal messaging also offers both the sender and the recipient greater privacy because no-one's real email address is revealed. Personal messages show only the handle and name of both parties. + If a recipient isn't online, personal messages wait in the member's PM box until the next time he/she logs in and reads and/or deletes them. SMF Personal Messages is a self-contained, highly private email system. + + + Reading Your Messages + To read your personal messages, you need to be logged in, then follow the link that says something like 'Hey, [username], you have x messages, x are new'. + +
    +
    + The PM Interface + The PM interface is similar in operation to that of the message index. While we are showing the inbox interface here, the outbox works in much the same way: + + + Forum Name + Personal Messages + Inbox + Delete all messages in your Inbox + Outbox + New Message + Check for new messages + Date + Subject + From + Date and time of message + Another Member + Message Subject + Delete Selected + Pages + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + The main Delete button deletes all messages in your inbox (or outbox if open). Note that the checkbox and lower Delete button also allow you to delete selected messages, with the top checkbox selecting all. + The Outbox button toggles to your outbox, where it obviously becomes an Inbox button. + The New Message button enables you to start a new message, which is similar to starting a new topic but adds 'To:' and 'Bcc:' (blind carbon copy) fields and the option to save to your outbox. + The Reload button checks for new messages by refreshing the page. + The Date, Subject, and From links enable you to sort the columns by these parameters (with Date also toggling between descending and ascending order as indicated by the little arrow). + The main subject title links to the start of the message, which will be further down the same page. + The page numbers link to further pages of messages as applicable. + + + Starting or Replying to a Message + There are actually several different ways to start a new personal message, but all require you to be logged in: + + You can follow the link that says something like 'Hey, [username], you have x messages, x are new', then click the New Message button in your inbox. + You can click another member's name, followed by Send this member a personal message from his/her profile summary screen. + You can start a new message direct by clicking the IM on/offline icon from the user info accompanying all of his/her posts. + You can start a new message direct by clicking the PM on/offline icon from the Current Status in his/her profile summary screen. (This icon/link is often duplicated in the user info described above.) + Replying to a message is very similar to replying to a topic. + + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/default/help/pm.russian.html b/Themes/default/help/pm.russian.html new file mode 100644 index 0000000..1a8a6fe --- /dev/null +++ b/Themes/default/help/pm.russian.html @@ -0,0 +1,142 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    - , , e-mail, IM - , , .

    +
      +
    1. + +
        +
      1. +
      2. +
      +
    2. +
    3. + +
        +
      1. +
      +
    4. +
    +

    +

    +

    , : , , , , , - , .

    +

    e-mail, SMF . . SMF, , . , e-mail , .

    +

    , , ( ). , , , , .

    +

    +

    , , ', [ ], x , x '.

    +

    +

    . , :

    +
    +
    + +
    + + + + +
    + 
    + |- + 
    + | |- + 
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    Delete all messages in your Inbox Outbox New Message Check for new messages
     
    + + + + +
    : [1]
    +
    +

    +
    +
    +
    +

    +
      +
    • ( ) .
    • +
    • ( , ) . , .
    • +
    • , .
    • +
    • , , ':' ':' .
    • +
    • .
    • +
    • , ( , ).
    • +
    • , .
    • +
    • - .
    • +
    +

    +

    , , :

    +
      +
    • , ', [ ], x , x ', .
    • +
    • , .
    • +
    • On/Offline IM, .
    • +
    • On/Offline PM , ( , ).
    • +
    • , .
    • +
    + + + diff --git a/Themes/default/help/pm.xslt b/Themes/default/help/pm.xslt new file mode 100644 index 0000000..755e58d --- /dev/null +++ b/Themes/default/help/pm.xslt @@ -0,0 +1,122 @@ + + + + +
    +
    + + + +
    + + + + +
    + + +  + +
    + |- + +  + +
    + | + |- + +  + +
    +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + + {alt-delete} + + {alt-outbox} + + {alt-new-message} + + {alt-reload} +
    + + +   + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + +
    + + + + +
    : [1]
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/default/help/posting.english.html b/Themes/default/help/posting.english.html new file mode 100644 index 0000000..c6f7e82 --- /dev/null +++ b/Themes/default/help/posting.english.html @@ -0,0 +1,929 @@ + + + + + + + + SMF User Help: Posting + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Posting


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    Since posting messages is basically what forums are all about, we will spend some time looking at the various options and techniques available. Those who are familiar with forum software, HTML or bulletin board code in general may prefer to skip straight to the Bulletin Board Code and Smileys references.

    +

    Please note that, because an SMF forum may be customized extensively by its administrator(s), the presence of a feature in this documentation does not necessarily mean that it will be available to all users in all forums.

    +
      +
    1. + Posting Basics +
        +
      1. Starting a New Topic
      2. +
      3. Starting a New Poll
      4. +
      5. Posting an Event to the Calendar
      6. +
      7. Replying to a Topic or Poll
      8. +
      9. Quoting a Post
      10. +
      11. Modifying or Deleting a Post
      12. +
      +
    2. +
    3. + Standard Posting Options +
        +
      1. Message Icon
      2. +
      3. Bulletin Board Code
      4. +
      5. Smileys
      6. +
      +
    4. +
    5. Tags and Nesting (for beginners)
    6. +
    7. + Additional Options +
        +
      1. Notify me of replies
      2. +
      3. Return to this topic
      4. +
      5. Don't use smileys
      6. +
      7. Attachments
      8. +
      +
    8. +
    9. + References +
        +
      1. SMF Bulletin Board Code
      2. +
      3. SMF Smileys
      4. +
      +
    10. +
    +

    Posting Basics

    +

    Starting a New Topic

    +

    Browse to the board where you wish to post and click the New Topic button (positioned by default at both the top and the bottom of the board, as shown in the User Help Introduction), which should take you to the Start new topic screen. While this presents a number of options, the two most important are the Subject field and main Message field (not labeled as such, but obvious by its size). So enter your subject and start to type (or paste) your message into the main text area, noting that a message missing either a subject or a body will not be accepted for posting until it has both. If you're happy with your plain text message, you can then post it by clicking the Post button and/or preview it first by clicking the Preview button, but there are many further options available to make things that little bit more interesting.

    +
    +
    +
    + + + + +
    +  Forum Name
    + |- +  Category Name
    + | |- +  Board Name
    + | | |- +  Start new topic
    + + + + + + + +
    Start new topic
    + + + + + + + + + + + + + + + + + + +
    Standard Options omitted for clarity and demonstrated below.
    Subject:
    +
    Additional Options omitted for clarity and demonstrated below.

    + shortcuts: hit alt+s to submit/post or alt+p to preview

    +
    +
    +

    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • Some forums may be configured to offer an additional Spell Check button alongside the Post and Preview options.
    • +
    +

    Starting a New Poll

    +

    A poll is basically a topic with an added question and voting options, started by clicking New Poll instead of New Topic as described above. To post a poll it is necessary to fill out the Question field and at least two of the Option fields in addition to the Subject and Message fields required by a standard topic. Further options to configure how many choices the user may vote for, how long the poll should run, whether users can change their votes and what conditions must be fulfilled for the results to be displayed should be self-explanatory.

    +

    To offer more than five choices in a poll, simply click Add Option as many times as necessary.

    +

    Note that it may also be possible for some users in some forums to add a poll to an existing topic.

    +

    Posting an Event to the Calendar

    +

    Where this option has been configured (it's not standard 'out of the box'), you can post an event by selecting Calendar from the main menu followed by Post Event from the calendar screen. What you see now is a Start new topic screen with supplementary fields for the event title, date and target board, which simply add your event to the calendar and create a link back to your post in that board.

    +

    Replying to a Topic or Poll

    +

    Replying to a topic or poll is basically the same as starting a new topic, but it's not necessary to enter anything in the Subject field unless you wish to change what's already there. To vote in a poll, you simply have to select your chosen option(s) and click Submit Vote.

    +

    If 'Quick Reply' has been enabled, a simple reply field will also appear after the post(s) on a page, but you'll have to type your Bulletin Board Code and Smileys manually if you choose to use it.

    +

    Quoting a Post

    +

    To reply to a post by quoting it, you can either click the Quote button for the relevant post and add your own message to the quoted text or click the Reply button followed by Insert Quote from the relevant post in the 'Topic Summary' below, but note that:

    +
      +
    • Both these options add a link to the original post showing the name of the poster and the date and time of the post, whereas the Bulletin Board Code quote tag simply quotes the relevant post without this additional information.
    • +
    • You can also retain or add the 'author' attribute independently of the full Quote function, as demonstrated in the SMF Bulletin Board Code Reference below.
    • +
    +

    Modifying or Deleting a Post

    +

    To modify a post, click the Modify button and make your changes. Note that most forums are likely to be configured to show the date and time of the last edit, but the administrator(s) may also allow a short period to elapse before this happens.

    +

    To delete a post, click the Delete button followed by OK from the Remove this message? box that appears. Some forums may also allow you to remove topics or polls that you start, but the buttons for these are usually at the bottom of the page.

    +

    Standard Posting Options

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + +
    Message icon:
    + BoldItalicizedUnderlineStrikethrough|GlowShadowMarquee|Preformatted TextLeft AlignCenteredRight Align|Horizontal Rule|Font SizeFont Face
    + Insert FlashInsert ImageInsert HyperlinkInsert EmailInsert FTP Link|Insert TableInsert Table RowInsert Table Column|SuperscriptSubscriptTeletype|Insert CodeInsert Quote|Insert List +
    Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry
    +
    +
    +

    +
    +

    +

    Message Icon

    +

    This drop-down menu allows you to change the default icon for the subject line to something matching the mood or purpose of your post.

    +

    Bulletin Board Code

    +

    Bulletin Board Code (or BBC) is the essential tool for formatting and changing the appearance of your post. While it affects the plain text in much the same way as the formatting tools in any word processor, the main Message field does not behave in a WYSIWYG manner, so you should preview your message if you need to see what it will look like when posted.

    +

    A complete SMF Bulletin Board Code Reference is provided below.

    +

    Smileys

    +

    While smileys can be viewed as purely whimsical in nature, they can also play a valuable role in clarifying the written word in much the same way as vocal inflections and/or facial expressions clarify the spoken word. Like most forum software, SMF provides a standard range of smiley images which can be added to posts by clicking the relevant icons or typing the relevant codes. A don't use smileys option is naturally also provided for those occasions when you don't want typed character combinations that would normally be displayed as smileys to be converted to the expected images!

    +

    A complete SMF Smileys Reference is provided below.

    +

    Tags and Nesting (for beginners)

    +

    Before listing the available BBC buttons and their purposes, let's see how they work by imagining that we want to post some text in bold type. While we can start by clicking the B (Bold) button and typing our text between the tags it produces, it's often more practical to type the text first, highlight it and then click the button. So typing 'text', highlighting it and clicking the 'B' button should produce '[b]text[/b]', which renders as text when posted or previewed. (NB This doesn't work in Opera, which inserts the tags at the end of the post.) Subsequently highlighting '[b]text[/b]' and clicking the I (Italicized) button will produce '[i][b]text[/b][/i]', which not only renders as text when posted or previewed but also introduces the concept of nesting, which means that each new set of tags in a case like this should be seen as a new 'box' containing both the original text and any tags already applied to it.

    +

    Note that the BBC tags can also be typed and edited direct instead of clicking the buttons.

    +

    Additional Options

    +

    The following options may appear by default in some forums but be contained within an expanding/collapsing panel (try clicking the link with the arrow below!) in others:

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + +
    + Additional Options...
    +
    + + + + + + + + + + +
     Notify me of replies.
     Return to this topic.
     Don't use smileys.
    +
    +
    Attach:
    +
    + Allowed file types: txt, jpg, gif, pdf, mpg, png
    + Maximum attachment size allowed: 128 KB
    +
    + shortcuts: hit alt+s to submit/post or alt+p to preview

    + +
    +
    +

    +
    +

    +

    Notify me of replies

    +

    Check this to subscribe to email notification for the topic.

    +

    Return to this topic

    +

    Check this to return to the topic (instead of the message index) after posting (NB you can also set this behaviour as a preference in your profile).

    +

    Don't use smileys

    +

    Check this to prevent certain character combinations in your post from being parsed and rendered as smileys.

    +

    Attachments

    +

    If enabled, this feature allows you to attach files to your posts in much the same way as most email clients, so you simply have to browse to the relevant file(s) on your computer before clicking Post. You can delete your attachment(s) or add more by modifying your post, but please note that:

    +
      +
    • The permitted file types and sizes are set by the forum administrator(s).
    • +
    • Although most forums are likely be configured to display attached images as part of the post, it's not possible to preview attachments so you should always browse to and attach your files just before you finally post your message.
    • +
    +

    References

    +

    SMF Bulletin Board Code

    +

    The buttons shown belong to the SMF default theme and may differ from forum to forum.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tag NameButtonCodeOutputComments
    BoldBold[b]bold[/b]bold*
    ItalicizedItalicized[i]italicized[/i]italicized*
    UnderlineUnderline[u]underline[/u]underline*
    StrikethroughStrikethrough[s]strikethrough[/s]strikethrough*
    GlowGlow[glow=red,2,50]glow[/glow] +
    + glow +
    +
    The three attributes (eg red, 2, 50) in the 'glow' tag are color, strength and width respectively.
    ShadowShadow[shadow=red,left]
    + shadow
    + [/shadow]
    +
    + shadow +
    +
    The two attributes (eg red, left) in the 'shadow' tag are color and direction respectively.
    MarqueeMarquee[move]move[/move]moveNot valid XHTML, but can also be used for images!
    Preformatted TextPreformatted Text[pre]Simple
    +   Machines
    +     Forum[/pre]
    +
    +Simple
    +  Machines
    +						Forum
    +
    +
    Preserves critical text formatting, rendered in a monospace font.
    Left AlignLeft Align[left]left align[/left] +

    left align

    +
    *
    CenteredCentered[center]centered[/center] +
    + centered +
    +
    *
    Right AlignRight Align[right]right align[/right] +

    right align

    +
    *
    Right-to-Left*[rtl]right to left![/rtl] +
    + right to left! +
    +
    Typical usage would be to post Arabic or Hebrew in an English document.
    Left-to-Right*[ltr]left to right![/ltr] +
    + left to right! +
    +
    Typical usage would be to post English in an Arabic or Hebrew document.
    Horizontal RuleHorizontal Rule[hr] +
    +
    *
    Font SizeFont Size[size=10pt]font size[/size]font size*
    Font FaceFont Face[font=Verdana]font face[/font]font faceOnly fonts installed on the user's computer will be displayed, so use with caution!
    Font Color[color=Red]red[/color]redSelect the color from the drop-down.
    Insert FlashInsert Flash[flash=200,200]
    + http://somesite/somefile.swf
    + [/flash]
    http://somesite/somefile.swfPlease note that, if embedded Flash has been disabled by the forum administrator(s), the Flash file will appear as a straight hyperlink as shown here. The two attributes in the 'flash' tag (where relevant) are width and height respectively.
    Insert ImageInsert Image[img]
    + http://somesite/image.gif
    + [/img]
    Type the width and height attributes to resize the image.
    [img width=48 height=48]
    + http://somesite/image.gif
    + [/img]
    Insert HyperlinkInsert Hyperlink[url]http://somesite/[/url]http://somesite/NB the 'url' tag opens in a new window, but you can type 'iurl' tags to open in the same window.
    [url=http://somesite/]
    + descriptive link
    + [/url]
    descriptive link
    Insert EmailInsert Email[email]
    + someone@somesite
    + [/email]
    someone@somesite*
    Insert FTP LinkInsert FTP Link[ftp]
    + ftp://somesite/somefile
    + [/ftp]
    ftp://somesite/somefile*
    [ftp=ftp://somesite/somefile]
    + descriptive link
    + [/ftp]
    descriptive link
    Insert TableInsert Table[table][/table]*No meaningful output from the 'table' tags alone.
    Insert Table RowInsert Table Row[table][tr][/tr][/table]*No meaningful output from the 'table' and 'tr' tags alone.
    Insert Table ColumnInsert Table Column[table][tr][td]
    + content
    + [/td][/tr][/table]
    + + + + +
    content
    +
    Note the correct nesting of the tags, so the 'table' tags contain the 'tr' tags, which each contain an equal number of 'td' tags!
    [table][tr][td]SMF[/td]
    + [td]Bulletin[/td][/tr]
    + [tr][td]Board[/td]
    + [td]Code[/td][/tr][/table]
    + + + + + + + + + +
    SMFBulletin
    BoardCode
    +
    SuperscriptSuperscript[sup]superscript[/sup]superscript*
    SubscriptSubscript[sub]subscript[/sub]subscript*
    TeletypeTeletype[tt]teletype[/tt]teletypeMonospace font.
    Insert CodeInsert Code[code]<?php phpinfo(); ?>[/code] +
    + Code: +
    +
    + <?php phpinfo(); ?> +
    +
    Always use to preserve formatting of code and avoid parsing as BBC and/or smileys!
    Insert QuoteInsert Quote[quote]quote[/quote] +
    + Quote +
    +
    + quote +
    +
    Note the optional 'author' attribute.
    [quote author=author]quote[/quote] +
    + Quote from: author +
    +
    + quote +
    +
    Insert ListInsert List[list]
    + [li]SMF[/li]
    + [li]YaBB SE[/li]
    + [/list]
    +
      +
    • SMF
    • +
    • YaBB SE
    • +
    +
    While you can add as many items as you wish, each item must be contained by the correct opening and closing tags. You can also style your list item bullets with special opening tags and no closing tags, but this option doesn't currently output valid XHTML.
    [list]
    + [o]circle
    + [O]circle
    + [0]circle
    + [*]disc
    + [@]disc
    + [+]square
    + [x]square
    + [#]square
    + [/list]
    +
      +
    • circle
    • +
    • circle
    • +
    • circle
    • +
    • disc
    • +
    • disc
    • +
    • square
    • +
    • square
    • +
    • square
    • +
    +
    Abbreviation*[abbr=exemlpi gratia]eg[/abbr]egDisplays the full expression for the abbreviation on mouseover.
    Acronym*[acronym=Simple Machines Forum]SMF[/acronym]SMFDisplays the full expression for the acronym on mouseover.

    +

    SMF Smileys

    +

    The smileys shown here are the standard set from the SMF default theme and may differ from forum to forum.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameImage (click to insert)Code (type to insert)
    Smiley:)
    Wink;)
    Cheesy:D
    Grin;D
    Angry>:(
    Sad:(
    Shocked:o
    Cool8)
    Huh???
    Roll Eyes::)
    Tongue:P
    Embarrassed:-[
    Lips Sealed:-X
    Undecided:-\
    Kiss:-*
    Cry:'(

    +

    Please note that not all of the smiley codes will be correctly parsed and converted to images unless their opening spaces are present.

    + + + \ No newline at end of file diff --git a/Themes/default/help/posting.english.xml b/Themes/default/help/posting.english.xml new file mode 100644 index 0000000..850735b --- /dev/null +++ b/Themes/default/help/posting.english.xml @@ -0,0 +1,683 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Posting + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + Since posting messages is basically what forums are all about, we will spend some time looking at the various options and techniques available. Those who are familiar with forum software, HTML or bulletin board code in general may prefer to skip straight to the Bulletin Board Code and Smileys references. + Please note that, because an SMF forum may be customized extensively by its administrator(s), the presence of a feature in this documentation does not necessarily mean that it will be available to all users in all forums. + +
    + Posting Basics + + Starting a New Topic + Browse to the board where you wish to post and click the New Topic button (positioned by default at both the top and the bottom of the board, as shown in the User Help Introduction), which should take you to the Start new topic screen. While this presents a number of options, the two most important are the Subject field and main Message field (not labeled as such, but obvious by its size). So enter your subject and start to type (or paste) your message into the main text area, noting that a message missing either a subject or a body will not be accepted for posting until it has both. If you're happy with your plain text message, you can then post it by clicking the Post button and/or preview it first by clicking the Preview button, but there are many further options available to make things that little bit more interesting. + + + Forum Name + Category Name + Board Name + Start new topic + Standard Options + Additional Options + omitted for clarity and demonstrated below. + Subject + shortcuts: hit alt+s to submit/post or alt+p to preview + Post + Preview + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + Some forums may be configured to offer an additional Spell Check button alongside the Post and Preview options. + + + + Starting a New Poll + A poll is basically a topic with an added question and voting options, started by clicking New Poll instead of New Topic as described above. To post a poll it is necessary to fill out the Question field and at least two of the Option fields in addition to the Subject and Message fields required by a standard topic. Further options to configure how many choices the user may vote for, how long the poll should run, whether users can change their votes and what conditions must be fulfilled for the results to be displayed should be self-explanatory. + To offer more than five choices in a poll, simply click Add Option as many times as necessary. + Note that it may also be possible for some users in some forums to add a poll to an existing topic. + + + Posting an Event to the Calendar + Where this option has been configured (it's not standard 'out of the box'), you can post an event by selecting Calendar from the main menu followed by Post Event from the calendar screen. What you see now is a Start new topic screen with supplementary fields for the event title, date and target board, which simply add your event to the calendar and create a link back to your post in that board. + + + Replying to a Topic or Poll + Replying to a topic or poll is basically the same as starting a new topic, but it's not necessary to enter anything in the Subject field unless you wish to change what's already there. To vote in a poll, you simply have to select your chosen option(s) and click Submit Vote. + If 'Quick Reply' has been enabled, a simple reply field will also appear after the post(s) on a page, but you'll have to type your Bulletin Board Code and Smileys manually if you choose to use it. + + + Quoting a Post + To reply to a post by quoting it, you can either click the Quote button for the relevant post and add your own message to the quoted text or click the Reply button followed by Insert Quote from the relevant post in the 'Topic Summary' below, but note that: + + Both these options add a link to the original post showing the name of the poster and the date and time of the post, whereas the Bulletin Board Code quote tag simply quotes the relevant post without this additional information. + You can also retain or add the 'author' attribute independently of the full Quote function, as demonstrated in the SMF Bulletin Board Code Reference below. + + + + Modifying or Deleting a Post + To modify a post, click the Modify button and make your changes. Note that most forums are likely to be configured to show the date and time of the last edit, but the administrator(s) may also allow a short period to elapse before this happens. + To delete a post, click the Delete button followed by OK from the Remove this message? box that appears. Some forums may also allow you to remove topics or polls that you start, but the buttons for these are usually at the bottom of the page. + +
    +
    + Standard Posting Options + + + Message icon + Standard + Thumb Up + Thumb Down + Exclamation point + Question mark + Lamp + Smiley + Angry + Cheesy + Grin + Sad + Wink + + Bold + Italicized + Underline + Strikethrough + + Glow + Shadow + Marquee + +
    Preformatted Text
    + Left Align +
    Centered
    + Right Align + +
    Horizontal Rule + + Font Size + Font Face +
    + + Insert Flash + Insert Image + Insert Hyperlink + Insert Email + Insert FTP Link + + Insert Table
    + Insert Table Row + Insert Table Column + + Superscript + Subscript + Teletype + + Insert Code + Insert Quote + + Insert List +
    + + Change Color + Black + Red + Yellow + Pink + Green + Orange + Purple + Blue + Beige + Brown + Teal + Navy + Maroon + Lime Green + + + Smiley + Wink + Cheesy + Grin + Angry + Sad + Shocked + Cool + Huh + Roll Eyes + Tongue + Embarrassed + Lips Sealed + Undecided + Kiss + Cry + +
    + + Message Icon + This drop-down menu allows you to change the default icon for the subject line to something matching the mood or purpose of your post. + + + Bulletin Board Code + Bulletin Board Code (or BBC) is the essential tool for formatting and changing the appearance of your post. While it affects the plain text in much the same way as the formatting tools in any word processor, the main Message field does not behave in a WYSIWYG manner, so you should preview your message if you need to see what it will look like when posted. + A complete SMF Bulletin Board Code Reference is provided below. + + + Smileys + While smileys can be viewed as purely whimsical in nature, they can also play a valuable role in clarifying the written word in much the same way as vocal inflections and/or facial expressions clarify the spoken word. Like most forum software, SMF provides a standard range of smiley images which can be added to posts by clicking the relevant icons or typing the relevant codes. A don't use smileys option is naturally also provided for those occasions when you don't want typed character combinations that would normally be displayed as smileys to be converted to the expected images! + A complete SMF Smileys Reference is provided below. + +
    +
    + Tags and Nesting (for beginners) + Before listing the available BBC buttons and their purposes, let's see how they work by imagining that we want to post some text in bold type. While we can start by clicking the B (Bold) button and typing our text between the tags it produces, it's often more practical to type the text first, highlight it and then click the button. So typing 'text', highlighting it and clicking the 'B' button should produce '[b]text[/b]', which renders as text when posted or previewed. (NB This doesn't work in Opera, which inserts the tags at the end of the post.) Subsequently highlighting '[b]text[/b]' and clicking the I (Italicized) button will produce '[i][b]text[/b][/i]', which not only renders as text when posted or previewed but also introduces the concept of nesting, which means that each new set of tags in a case like this should be seen as a new 'box' containing both the original text and any tags already applied to it. + Note that the BBC tags can also be typed and edited direct instead of clicking the buttons. +
    +
    + Additional Options + The following options may appear by default in some forums but be contained within an expanding/collapsing panel (try clicking the link with the arrow below!) in others: + + + Notify me of replies. + Return to this topic. + Don't use smileys. + Attach + Allowed file types: txt, jpg, gif, pdf, mpg, png + Maximum attachment size allowed: 128 KB + + + Notify me of replies + Check this to subscribe to email notification for the topic. + + + Return to this topic + Check this to return to the topic (instead of the message index) after posting (NB you can also set this behaviour as a preference in your profile). + + + Don't use smileys + Check this to prevent certain character combinations in your post from being parsed and rendered as smileys. + + + Attachments + If enabled, this feature allows you to attach files to your posts in much the same way as most email clients, so you simply have to browse to the relevant file(s) on your computer before clicking Post. You can delete your attachment(s) or add more by modifying your post, but please note that: + + The permitted file types and sizes are set by the forum administrator(s). + Although most forums are likely be configured to display attached images as part of the post, it's not possible to preview attachments so you should always browse to and attach your files just before you finally post your message. + + +
    +
    + References + + SMF Bulletin Board Code + The buttons shown belong to the SMF default theme and may differ from forum to forum. + + + + Tag Name + Button + Code + Output + Comments + + + Bold + bold + [b]bold[/b] + ]]> + bold + ]]> + * + + + Italicized + italicize + [i]italicized[/i] + ]]> + italicized + ]]> + * + + + Underline + underline + [u]underline[/u] + ]]> + underline + ]]> + * + + + Strikethrough + strike + [s]strikethrough[/s] + ]]> + strikethrough + ]]> + * + + + Glow + glow + [glow=red,2,50]glow[/glow] + ]]> + glow + ]]> + The three attributes (eg red, 2, 50) in the 'glow' tag are color, strength and width respectively. + + + Shadow + shadow + [shadow=red,left]]]>shadow]]>[/shadow] + ]]> + shadow + ]]> + The two attributes (eg red, left) in the 'shadow' tag are color and direction respectively. + + + Marquee + move + [move]move[/move] + ]]> + move + ]]> + Not valid XHTML, but can also be used for images! + + + Preformatted Text + pre + [pre]Simple]]>&space;&space;Machines]]>&space;&space;&space;&space;Forum[/pre] + ]]> + Simple + Machines + Forum + ]]> + Preserves critical text formatting, rendered in a monospace font. + + + Left Align + left + [left]left align[/left] + ]]> + left align + ]]> + * + + + Centered + center + [center]centered[/center] + ]]> + centered + ]]> + * + + + Right Align + right + [right]right align[/right] + ]]> + right align + ]]> + * + + + Right-to-Left + none + [rtl]right to left![/rtl] + ]]> + right to left! + ]]> + Typical usage would be to post Arabic or Hebrew in an English document. + + + Left-to-Right + none + [ltr]left to right![/ltr] + ]]> + left to right! + ]]> + Typical usage would be to post English in an Arabic or Hebrew document. + + + Horizontal Rule + hr + [hr] + ]]> + + + * + + + Font Size + size + [size=10pt]font size[/size] + ]]> + font size + ]]> + * + + + Font Face + face + [font=Verdana]font face[/font] + ]]> + font face + ]]> + Only fonts installed on the user's computer will be displayed, so use with caution! + + + Font Color + + + [color=Red]red[/color] + ]]> + red + ]]> + Select the color from the drop-down. + + + Insert Flash + flash + [flash=200,200]]]>http://somesite/somefile.swf]]>[/flash] + ]]> + http://somesite/somefile.swf + ]]> + Please note that, if embedded Flash has been disabled by the forum administrator(s), the Flash file will appear as a straight hyperlink as shown here. The two attributes in the 'flash' tag (where relevant) are width and height respectively. + + + + Insert Image + img + [img]]]>http://somesite/image.gif]]>[/img] + ]]> + + + Type the width and height attributes to resize the image. + + + [img width=48 height=48]]]>http://somesite/image.gif]]>[/img] + ]]> + + + + + Insert Hyperlink + url + [url]http://somesite/[/url] + ]]> + http://somesite/ + ]]> + NB the 'url' tag opens in a new window, but you can type 'iurl' tags to open in the same window. + + + [url=http://somesite/]]]>descriptive link]]>[/url] + ]]> + descriptive link + ]]> + + + Insert Email + email + [email]]]>someone@somesite]]>[/email] + ]]> + someone@somesite + ]]> + * + + + Insert FTP Link + ftp + [ftp]]]>ftp://somesite/somefile]]>[/ftp] + ]]> + ftp://somesite/somefile + ]]> + * + + + [ftp=ftp://somesite/somefile]]]>descriptive link]]>[/ftp] + ]]> + descriptive link + ]]> + + + Insert Table + table + [table][/table] + * + + + No meaningful output from the 'table' tags alone. + + + Insert Table Row + tr + [table][tr][/tr][/table] + * + + + No meaningful output from the 'table' and 'tr' tags alone. + + + Insert Table Column + td + [table][tr][td]]]>content]]>[/td][/tr][/table] + ]]> + content + ]]> + Note the correct nesting of the tags, so the 'table' tags contain the 'tr' tags, which each contain an equal number of 'td' tags! + + + [table][tr][td]SMF[/td]]]>[td]Bulletin[/td][/tr]]]>[tr][td]Board[/td]]]>[td]Code[/td][/tr][/table] + SMFBulletinBoardCode]]> + + + + + Superscript + sup + [sup]superscript[/sup] + ]]> + superscript + ]]> + * + + + Subscript + sub + [sub]subscript[/sub] + ]]> + subscript + ]]> + * + + + Teletype + tele + [tt]teletype[/tt] + ]]> + teletype + ]]> + Monospace font. + + + Insert Code + code + [code]<?php phpinfo(); ?>[/code] + Code:
    <?php phpinfo(); ?>
    ]]> + + + Always use to preserve formatting of code and avoid parsing as BBC and/or smileys! + + + Insert Quote + quote + [quote]quote[/quote] + Quote
    ]]> + quote + ]]> + Note the optional 'author' attribute. + + + [quote author=author]quote[/quote] + Quote from: author
    ]]> + quote + ]]> + + + Insert List + list + [list]]]>[li]SMF[/li]]]>[li]YaBB SE[/li]]]>[/list] +
  • SMF
  • YaBB SE
  • ]]>
    + + + While you can add as many items as you wish, each item must be contained by the correct opening and closing tags. You can also style your list item bullets with special opening tags and no closing tags, but this option doesn't currently output valid XHTML. +
    + + [list]]]>[o]circle]]>[O]circle]]>[0]circle]]>[*]disc]]>[@]disc]]>[+]square]]>[x]square]]>[#]square]]>[/list] +
  • circle
  • circle
  • circle
  • disc
  • disc
  • square
  • square
  • square
    ]]> + + + + + Abbreviation + none + [abbr=exemlpi gratia]eg[/abbr] + ]]> + eg + ]]> + Displays the full expression for the abbreviation on mouseover. + + + Acronym + none + [acronym=Simple Machines Forum]SMF[/acronym] + ]]> + SMF + ]]> + Displays the full expression for the acronym on mouseover. + + + + + SMF Smileys + The smileys shown here are the standard set from the SMF default theme and may differ from forum to forum. + + + + Name + Image (click to insert) + Code (type to insert) + + + Smiley + smiley + :) + + + Wink + wink + ;) + + + Cheesy + cheesy + :D + + + Grin + grin + ;D + + + Angry + angry + >:( + + + Sad + sad + :( + + + Shocked + shocked + :o + + + Cool + cool + 8) + + + Huh + huh + ??? + + + Roll Eyes + rolleyes + ::) + + + Tongue + tongue + :P + + + Embarrassed + embarassed + + :-[ + + + Lips Sealed + lipsrsealed + :-X + + + Undecided + undecided + :-\ + + + Kiss + kiss + :-* + + + Cry + cry + :'( + + + Please note that not all of the smiley codes will be correctly parsed and converted to images unless their opening spaces are present. + + + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + + \ No newline at end of file diff --git a/Themes/default/help/posting.russian.html b/Themes/default/help/posting.russian.html new file mode 100644 index 0000000..4cdc8bf --- /dev/null +++ b/Themes/default/help/posting.russian.html @@ -0,0 +1,1077 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    - , , , , . , - , HTML Bulletin Board, BB .

    +

    - + .

    +
      +
    1. + +
        +
      1. +
      2. +
      3. +
      4. /
      5. +
      6. +
      7. +
      +
    2. +
    3. + +
        +
      1. +
      2. Bulletin Board Code
      3. +
      4. +
      +
    4. +
    5. +
    6. + +
        +
      1. +
      2. +
      3. +
      4. +
      +
    7. +
    8. + +
        +
      1. SMF Bulletin Board
      2. +
      3. SMF
      4. +
      +
    9. +
    +

    +

    +

    , , ( , ), . , - ( , , ). ( , ) . , , , . , , , , SMF - , , .

    +
    +
    +
    + + + + +
    + 
    + |- + 
    + | |- + 
    + | | |- + 
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
      + .
    :
    +
    + .

    + : alt+s alt+p

    +
    +
    +

    +
    +

    +
      +
    • ( ) .
    • +
    • .
    • +
    +

    +

    , + , . + , + + . , + - + , + . + , , + . + - , .

    +

    , .

    +

    .

    +

    +

    ( , ) + , + + . + , - + .

    +

    /

    +

    , , , , . , .

    +

    " ", , .

    +

    +

    , . , :

    + +

    +

    , . , , , .

    +

    , , OK ? , . , .

    +

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + +
    :
    + | |   | |
        Email FTP |       |  | | +
    + Smile + Crying or Very sad + Sad + Exclamation + Surprised + Question + Shocked + Idea + Confused + Arrow + Cool + Neutral + Embarassed + Laughing + Razz +   ! + Wink +  . + Evil or Very Mad +  ! + Rolling Eyes + + ! + Twisted Evil + + +
    +
    +
    +

    +
    +

    +

    +

    , .

    +

    Bulletin Board Code

    +

    Bulletin Board Code ( BBC) - . , HTML, BB . , (Microsoft Word ), , , , .

    +

    SMF Bulletin Board Code .

    +

    +

    , , . , . , .

    +

    .

    +

    .

    +

    , , . , . , - , . . , , " ", B (), "[b] [/b]", . (NB! Opera , ). "[b] [/b]" I () - "[i][b] [/b][/i]", , : , , "", , , .

    +

    , , .

    +

    +

    , :

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + +
    + ...
    +
    + + + + + + + + + + +
      .
      .
      .
    +
    +
    :
    +
    + : jpg, gif, png, mp3, zip, gzip, rar
    + : 500 KB, : 2
    +
    + : alt+s alt+p

    + +
    +
    +

    +
    +

    +

    +

    , .

    +

    +

    , , . .

    +

    +

    , .

    +

    +

    , , . , . , , :

    +
      +
    • .
    • +
    • , , .
    • +
    +

    +

    SMF Bulletin Board Code

    +

    - . , . SMF .

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    [b][/b]*
    [i][/i]*
    [u][/u]*
    [s][/s]*
    [glow=red,2,50][/glow] +
    + +
    +
    ( red, 2, 50) - , .
     [shadow=red,left]
    +
    + [/shadow]
    +
    + +
    +
    ( red, left) - .
    [move][/move] XHTML, !
     [pre]Simple
    +   Machines
    +     Forum[/pre]
    +
    +Simple
    +  Machines
    +			Forum
    +
    +
    , .
     [left] [/left] +

    +
    *
    [center][/center] +
    + +
    +
    *
     [right] [/right] +

    +
    *
    *[rtl] ![/rtl] +
    + ! +
    +
    - . , .
    *[ltr] ![/ltr] +
    + ! +
    +
    - .
     [hr] +
    +
    , . - .
     [size=10pt] e[/size] *
     [font=Verdana] [/font] , , !
    [color=Red][/color] .
     [flash=200,200]
    + http://somesite/somefile.swf
    + [/flash]
    http://somesite/somefile.swf , , , . - .
     [img]
    + http://somesite/image.gif
    + [/img]
    height width, .
    [img width=48 height=48]
    + http://somesite/image.gif
    + [/img]
     [url]http://somesite/[/url]http://somesite/NB! 'url' , 'iurl', .
    [url=http://somesite/]
    + --- !
    + [/url]
    --- !
    E-mail Email[email]
    + @.
    + [/email]
    @.*
    FTP  FTP [ftp]
    + ftp://somesite/somefile
    + [/ftp]
    ftp://somesite/somefile*
    [ftp=ftp://somesite/somefile]
    + --- !
    + [/ftp]
    --- !
     [table][/table]* , .
       [table][tr][/tr][/table]* 'table', .
       [table][tr][td]
    +
    + [/td][/tr][/table]
    + + + + +
    +
    : 'table' 'tr', - 'td'!
    [table][tr][td][/td]
    + [td][/td][/tr]
    + [tr][td][/td]
    + [td][/td][/tr][/table]
    + + + + + + + + + +
    +
     [sup] [/sup] *
     [sub] [/sub] *
    [tt][/tt]
     [code]<?php phpinfo(); ?>[/code] +
    + : +
    +
    + <?php phpinfo(); ?> +
    +
    , BBC / !
    [quote][/quote] +
    + +
    +
    + +
    +
    'author'.
    [quote author=][/quote] +
    + : +
    +
    + +
    +
     [list]
    + [li]SMF[/li]
    + [li]YaBB SE[/li]
    + [/list]
    +
      +
    • SMF
    • +
    • YaBB SE
    • +
    +
    , , . ( ). XHTML.
    [list]
    + [o]
    + [O]
    + [0]
    + [*]
    + [@]
    + [+]
    + [x]
    + [#]
    + [/list]
    +
      +

    • +

    • +

    • +

    • +

    • +

    • +

    • +

    • +
    +

    +

    +

    , SMF, , .

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ( ) ( )
    Smile:)
    Crying or very sad:cry:
    Sad:(
    Exclamation:!:
    Surprised:o
    Question:?:
    Shocked:shock:
    Idea:idea:
    Confused:?
    Arrow:arrow:
    Cool8)
    Neutral:|
    Embarassed:oops:
    Laughing:lol:
    Razz:P
    !:anger:
    Wink:wink:
    :budda:
    Evil or Very Mad:evil:
    !:idea:
    Rolling Eyes:roll:
    King:king:
    !:kiss:
    Twisted Evil:twisted:
    Mad:x
    !:nafig:
    :-:
    :lover:
    :velo:
    :kupid:
    :thunder:
    :banned:
    :attention:
    :stup:
    :close:
    :345:
    :ban:
    :001:
    :offtopic:
    :balet:
    :dead:
    :kiss:
    :lamer:
    :love:
    :susp:
    8X

    +

    , , .

    + + + diff --git a/Themes/default/help/posting.xslt b/Themes/default/help/posting.xslt new file mode 100644 index 0000000..c790966 --- /dev/null +++ b/Themes/default/help/posting.xslt @@ -0,0 +1,454 @@ + + + + +
    +
    +
    + + + + +
    + + +  + +
    + |- + +  + +
    + | + |- + +  + +
    + | + | + |- + +  + +
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
     
    + : + + +
    + +
     
    + +
    + +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + +
    + : + + + +
    + + + + | + {.} + + + +
    + + + | + {.} + +
    + + + + {.} + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + +
    + + ... +
    +
    + + + + + + + + + + +
    +   +
    +   +
    +   +
    +
    +
    + : + + +
    + +
    + +
    + +
    + + +
    + +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + * + + + + {bbc-name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {bbc-name} + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + +
    \ No newline at end of file diff --git a/Themes/default/help/profile.english.html b/Themes/default/help/profile.english.html new file mode 100644 index 0000000..47db2fe --- /dev/null +++ b/Themes/default/help/profile.english.html @@ -0,0 +1,461 @@ + + + + + + + + + SMF User Help: Profile + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Profile


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    The profile screen in the default theme normally consists of a single main pane, with an additional menu to the left to lead you through the editing options for your own profile. Please note that, because an SMF forum may be customized extensively by its administrator(s), the features and user permissions described here are typical rather than definitive.

    +

    To edit your own profile, start by selecting Profile from the main menu or clicking your own username. You can also view (but not edit) other members' profiles by clicking on their names.

    +
      +
    1. + Information Normally Available to all Members +
        +
      1. Profile Info
      2. +
      +
    2. +
    3. + Settings Normally Available to Profile Owners +
        +
      1. Modify Profile
      2. +
      3. Actions
      4. +
      +
    4. +
    5. + Settings Normally Restricted to Admins +
        +
      1. Profile Info
      2. +
      3. Modify Profile
      4. +
      5. Actions
      6. +
      +
    6. +
    +

    Information Normally Available to all Members

    +

    Profile Info

    +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
      Username: Member's login namePicture/Text
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name:Member's screen name
    Posts:Member's number of posts
    Position:Member's member group or post group
    Date Registered:Date and time of registration
    Last Active:Date and time last active
    +
    +
    ICQ:
    AIM:
    MSN:
    YIM:
    Email:member@their.address
    Website:
    Current Status:Online Online
    +
    +
    Gender:
    Age:N/A
    Location:
    Local Time:Current date and time in member's time zone
    Language:
    +
    +
    + + + + + + + +
    Signature:
    +
    +

    +
    Additional Information:
    Send this member a personal message.
    +
    + Show the last posts of this person.
    + Show general statistics for this member.
    +
    +

    +
    +

    +
      +
    • This Summary screen is not only there to tell you about others, but also the first screen that you see when editing your own profile.
    • +
    • Members may choose to hide their email address and/or online status.
    • +
    • The fields left empty here are not filled in by default, so you should edit your profile if you wish to display this information.
    • +
    • You can send the profile owner a Personal Message by clicking the Current Status On/Offline Icon or following the link from Additional Information below.
    • +
    • Show the last posts of this person links to a complete paginated listing of the member's posts.
    • +
    • Show general statistics for this member links to a screen of statistics about the member's time online and posting activity.
    • +
    +

    Settings Normally Available to Profile Owners

    +

    While the Summary screen is the same as the one shown above and the Show Posts and Show Stats links are effectively duplicates, profile owners are also provided with the tools to customize their own profiles:

    +

    Modify Profile

    +
      +
    • Account Related Settings enables you to make changes to your display name (your login or username can only be changed by an administrator), preferred language (if the forum administrators have installed alternative language packs), email and password settings.
    • +
    • Forum Profile Information enables you to enter optional personal details such as gender, birthdate, location, website and instant messenger contact information. It's also where you go to enter your own personal text and signature and select an avatar (personal picture) from a list (if provided by the forum administrators) or link to one of your own on the web.
    • +
    • Look and Layout Preferences enables you to select your preferred theme (forum skin), time zone and format and other personal choices for layout settings. Note that the currently selected option in the menu pane is highlighted in bold type:
    • +
    +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Profile Info
    Summary
    + Show Stats
    + Show Posts
    +
    Modify Profile
    Account Related Settings
    + Forum Profile Information
    + Look and Layout Preferences
    + Notifications and Email
    + Personal Message Options
    +
    Actions
    Delete this account
    +
    +
    +
    + + + + + + + + + + +
       Edit Profile

    + This section allows you to customize the look and layout of the forum.
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Current Theme: Forum or Board Default (change)
    +
    +
    Time Format:
    + Help The format here will be used to show dates throughout this forum.

    +
    + Time Offset: +
    + Number of hours to +/- to make displayed time equal to your local time. +
    +

    + (Current forum time should be displayed here.)
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Show board descriptions inside boards.
    Show child boards on every page inside boards, not just the first.
    Don't show other user's avatars.
    Don't show other user's signatures.
    Return to topics after posting by default.
    Show most recent posts at the top.
    Show most recent personal messages at top.
    First day of the week on the calendar::
    Use quick reply on topic display:
    Show quick-moderation on message index as 
    +
    +
    +

    +
    +
    +

    +
    +

    +
      +
    • Notifications and Email enables you to select personal preferences for notifications (emails about new topics/replies) and lists any notifications that you have set up.
    • +
    • Personal Message Options enables you to set up an ignore list (blacklist) for Personal Messages, to request notification of new PMs by email and to save copies of your outgoing PMs by default.
    • +
    +

    Actions

    +
      +
    • Delete this account does exactly what it says! Yes, there's a confirmation screen, but it really does delete your own account, so be careful...
    • +
    +

    Settings Normally Restricted to Admins

    +

    As well as being able to view/edit any of the details above from other members' profiles, some further options are normally visible to (and executable by) admins only:

    +
    +
    +
    +

    Profile Info

    +
      +
    • Track User provides a list of IP numbers used by the member, other members who might be in the same IP range and error messages generated/experienced by the member.
    • +
    • Track IP provides tools for tracking members, messages and errors from any specified IP range.
    • +
    • Show Permissions lists the board permissions that have been granted to the member and who gave them.
    • +
    +

    Modify Profile

    +
      +
    • Account Related Settings is basically the same screen as shown to profile owners, but with the additional option to assign members to member groups.
    • +
    • Forum Profile Information is basically the same screen as shown to profile owners, but with the additional option to specify custom titles for members.
    • +
    +

    Actions

    +
      +
    • Ban this user provides tools for banning users, configuring the level of the ban and maintaining a ban list noting the details of any bans in force.
    • +
    • Delete this account is similar to the screen of the same name available to all members, but the confirmation question is different when it's not your own account that's about to be deleted.
    • +
    +
    +

    + + + \ No newline at end of file diff --git a/Themes/default/help/profile.english.xml b/Themes/default/help/profile.english.xml new file mode 100644 index 0000000..1e17f1e --- /dev/null +++ b/Themes/default/help/profile.english.xml @@ -0,0 +1,194 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Profile + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + The profile screen in the default theme normally consists of a single main pane, with an additional menu to the left to lead you through the editing options for your own profile. Please note that, because an SMF forum may be customized extensively by its administrator(s), the features and user permissions described here are typical rather than definitive. + To edit your own profile, start by selecting Profile from the main menu or clicking your own username. You can also view (but not edit) other members' profiles by clicking on their names. + +
    + Information Normally Available to all Members + + Profile Info + + + Username + Member's login name + Picture/Text + Name + Member's screen name + Posts + Member's number of posts + Position + Member's member group or post group + Date Registered + Date and time of registration + Last Active + Date and time last active + + Email + member@their.address + Website + Current Status + Personal Message + Online + Gender + Age + N/A + Location + Local Time + Current date and time in member's time zone + Language + Signature + Additional Information + Send this member a personal message. + Show the last posts of this person. + Show general statistics for this member. + + + This Summary screen is not only there to tell you about others, but also the first screen that you see when editing your own profile. + Members may choose to hide their email address and/or online status. + The fields left empty here are not filled in by default, so you should edit your profile if you wish to display this information. + You can send the profile owner a Personal Message by clicking the Current Status On/Offline Icon or following the link from Additional Information below. + Show the last posts of this person links to a complete paginated listing of the member's posts. + Show general statistics for this member links to a screen of statistics about the member's time online and posting activity. + + +
    +
    + Settings Normally Available to Profile Owners + While the Summary screen is the same as the one shown above and the Show Posts and Show Stats links are effectively duplicates, profile owners are also provided with the tools to customize their own profiles: + + Modify Profile + + Account Related Settings enables you to make changes to your display name (your login or username can only be changed by an administrator), preferred language (if the forum administrators have installed alternative language packs), email and password settings. + Forum Profile Information enables you to enter optional personal details such as gender, birthdate, location, website and instant messenger contact information. It's also where you go to enter your own personal text and signature and select an avatar (personal picture) from a list (if provided by the forum administrators) or link to one of your own on the web. + Look and Layout Preferences enables you to select your preferred theme (forum skin), time zone and format and other personal choices for layout settings. Note that the currently selected option in the menu pane is highlighted in bold type: + + + + Profile Info + Summary + Show Stats + Show Posts + Modify Profile + Edit Profile + Account Related Settings + Forum Profile Information + Look and Layout Preferences + Notifications and Email + Personal Message Options + Actions + Delete this account + This section allows you to customize the look and layout of the forum. + Current Theme + Forum or Board Default + change + Time Format + Help + The format here will be used to show dates throughout this forum. + Forum Default + Month Day, Year, HH:MM:SS a/pm + Month Day, Year, HH:MM:SS (army time.) + YYYY-MM-DD, HH:MM:SS + DD Month YYYY, HH:MM:SS + DD-MM-YYYY, HH:MM:SS + Time Offset + Number of hours to +/- to make displayed time equal to your local time. + Current forum time should be displayed here. + Show board descriptions inside boards. + Show child boards on every page inside boards, not just the first. + Don't show other user's avatars. + Don't show other user's signatures. + Return to topics after posting by default. + Show most recent posts at the top. + Show most recent personal messages at top. + Use quick reply on topic display + don't show at all + show, off by default + show, on by default + Show quick-moderation on message index as + don't show + checkboxes + icons + First day of the week on the calendar: + Sunday + Monday + Change profile + + + Notifications and Email enables you to select personal preferences for notifications (emails about new topics/replies) and lists any notifications that you have set up. + Personal Message Options enables you to set up an ignore list (blacklist) for Personal Messages, to request notification of new PMs by email and to save copies of your outgoing PMs by default. + + + + Actions + + Delete this account does exactly what it says! Yes, there's a confirmation screen, but it really does delete your own account, so be careful... + + +
    +
    + Settings Normally Restricted to Admins + As well as being able to view/edit any of the details above from other members' profiles, some further options are normally visible to (and executable by) admins only: + + + + Track User + Track IP + Show Permissions + Ban this user + + + + Profile Info + + Track User provides a list of IP numbers used by the member, other members who might be in the same IP range and error messages generated/experienced by the member. + Track IP provides tools for tracking members, messages and errors from any specified IP range. + Show Permissions lists the board permissions that have been granted to the member and who gave them. + + + + Modify Profile + + Account Related Settings is basically the same screen as shown to profile owners, but with the additional option to assign members to member groups. + Forum Profile Information is basically the same screen as shown to profile owners, but with the additional option to specify custom titles for members. + + + + Actions + + Ban this user provides tools for banning users, configuring the level of the ban and maintaining a ban list noting the details of any bans in force. + Delete this account is similar to the screen of the same name available to all members, but the confirmation question is different when it's not your own account that's about to be deleted. + + + + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/default/help/profile.russian.html b/Themes/default/help/profile.russian.html new file mode 100644 index 0000000..f4695e4 --- /dev/null +++ b/Themes/default/help/profile.russian.html @@ -0,0 +1,466 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    , + . , , + , + .

    +

    , . , ( ) , .

    +
      +
    1. + , +
        +
      1. +
      +
    2. +
    3. + , +
        +
      1. +
      2. +
      +
    4. +
    5. + , +
        +
      1. +
      2. +
      3. +
      +
    6. +
    +

    ,

    +

    +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
      :  () /
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    +
    +
    ICQ:
    AIM:
    MSN:
    YIM:
    E-mail:@.
    :
    :Online Online
    +
    +
    :
    :N/A
    :
    :
    :
    +
    +
    + + + + + + + +
    :
    +
    +

    +
    :
    .
    +
    + .
    + .
    +
    +

    +
    +

    +
      +
    • - , .
    • +
    • e-mail / .
    • +
    • , , , , .
    • +
    • On/Offline .
    • +
    • - , .
    • +
    • - ( , ).
    • +
    +

    ,

    +

    , , :

    +

    +
      +
    • ( ), ( ), e-mail .
    • +
    • , , , , . ( ) ( , ) .
    • +
    • , , , . :
    • +
    +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + +

    +
    +
    +

    +
    +
    + e-mail
    +
    +

    +
    +
    +
    + + + + + + + + + + +
      

    + .
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :   ()
    +
    +
    :
    + Help .

    +
    + : +
    + +/- . +
    +

    + ( .)
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    .
    , .
    .
    , .
    .
    .
    :
    :
     
    +
    +
    +

    +
    +
    +

    +
    +

    +
      +
    • e-mail (e-mail /) , .
    • +
    • () , .
    • +
    +

    +
      +
    • . ! , + , + !
    • +
    +

    ,

    +

    , , , :

    +
    +
    + + + + + + + + + + + + + + + + + + + +

    +
    +
    +
    + IP
    +
    +

    +
    +
    + e-mail
    +
    +

    +
    +
    +

    +
    +

    +
      +
    • IP , , , / ( ) .
    • +
    • IP , IP.
    • +
    • , , .
    • +
    +

    +
      +
    • s , .
    • +
    • , .
    • +
    +

    +
      +
    • , .
    • +
    • , .
    • +
    +
    +

    + + + diff --git a/Themes/default/help/profile.xslt b/Themes/default/help/profile.xslt new file mode 100644 index 0000000..88c7f34 --- /dev/null +++ b/Themes/default/help/profile.xslt @@ -0,0 +1,446 @@ + + + + +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
    +   + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :

    ICQ:
    AIM:
    MSN:
    YIM:
    : + + + +
    :
    : + + + + + () + + + + + + + + +

    :
    :
    :
    :
    + : + +

    + + + + + + + +
    :
    +
    +
    +
    +
    +
    :
    + + + +
    +
    + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + + + +
    +    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + :  () +

    + :
    + + + {help} + +
    +
    + +
    :

    ()

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    : + +
    : + +
      + +
    +

    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    + +
    +
    + +
    \ No newline at end of file diff --git a/Themes/default/help/registering.english.html b/Themes/default/help/registering.english.html new file mode 100644 index 0000000..f1210e0 --- /dev/null +++ b/Themes/default/help/registering.english.html @@ -0,0 +1,118 @@ + + + + + + + + + SMF User Help: Registering + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Registering


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    When you have set up your SMF forum, or wish to join another SMF forum, you should register a username. This will enable you to maintain a consistent identity while posting and keep track of what you've read, no matter where you're working from or what computer you're using. You'll be able to fill out a personal profile and use the built-in personal message system. You'll be able to subscribe to email notifications, monitor your forum activity and more.

    +
      +
    1. How to Register
    2. +
    3. The Registration Screen
    4. +
    +

    How to Register

    +

    Assuming you've arrived at the forum as a guest and wish to register, you should be looking at one of these two things:

    +
      +
    • Any page of the forum, in which you case you should select Register from the main menu.
    • +
    • A login screen headed by a warning about access being restricted to registered members, in which case you should either use the registration link provided or select Register from the main menu.
    • +
    + + + + + + + +
    Warning!
    Only registered members are allowed to access this section.
    + Please login below or register an account with Forum Name.

    +

    The Registration Screen

    +
    +
    +
    + + + + + + + +
    Register - Required Information
    + + + + + + + + + + + + + + + + + +
    + Choose username: +
    + Used only for identification by SMF. You can use special characters after logging in, by changing your displayed name in your profile. +
    +
    + Email: +
    + This must be a valid email address. +
    +
    Choose password:
    Verify password:
    +
    + + + + + + + +
    This is where the registration agreement should be if there is one!

    +
    + +
    +
    +
    +

    +

    When you arrive at the registration screen, you will need to enter a username, email address and password, and may be offered the option of hiding your email address. Since most forums also require you to agree to their terms of use before your registration is accepted, you will normally have to read the agreement and check I Agree before continuing. What happens next depends on how the forum is configured, but, if the next thing you see is a login screen headed by a message inviting you to proceed, that's it, you're through and you can proceed to login! If not, there are two further possibilities:

    +
      +
    • If registration has been configured to require email activation, the next screen will tell you so and you should receive an immediate email with instructions about how to proceed. But there's also a useful link ('Did you miss your activation email?') in the User Info box in case you miss this email or mistype your email address.
    • +
    • If registration has been configured to require approval from a forum administrator, the next screen will tell you so and you should receive both an acknowledgement by email and another email later to inform you whether or not your application has been approved.
    • +
    + + + \ No newline at end of file diff --git a/Themes/default/help/registering.english.xml b/Themes/default/help/registering.english.xml new file mode 100644 index 0000000..33c5479 --- /dev/null +++ b/Themes/default/help/registering.english.xml @@ -0,0 +1,66 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Registering + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + When you have set up your SMF forum, or wish to join another SMF forum, you should register a username. This will enable you to maintain a consistent identity while posting and keep track of what you've read, no matter where you're working from or what computer you're using. You'll be able to fill out a personal profile and use the built-in personal message system. You'll be able to subscribe to email notifications, monitor your forum activity and more. + +
    + How to Register + Assuming you've arrived at the forum as a guest and wish to register, you should be looking at one of these two things: + + Any page of the forum, in which you case you should select Register from the main menu. + A login screen headed by a warning about access being restricted to registered members, in which case you should either use the registration link provided or select Register from the main menu. + + + + Warning! + Only registered members are allowed to access this section. + Please login below or + register an account + with Forum Name. + +
    +
    + The Registration Screen + + + Register - Required Information + Choose username + Used only for identification by SMF. You can use special characters after logging in, by changing your displayed name in your profile. + Email + This must be a valid email address. + Hide email address from public? + Choose password + Verify password + This is where the registration agreement should be if there is one! + I Agree + Register + + When you arrive at the registration screen, you will need to enter a username, email address and password, and may be offered the option of hiding your email address. Since most forums also require you to agree to their terms of use before your registration is accepted, you will normally have to read the agreement and check I Agree before continuing. What happens next depends on how the forum is configured, but, if the next thing you see is a login screen headed by a message inviting you to proceed, that's it, you're through and you can proceed to login! If not, there are two further possibilities: + + If registration has been configured to require email activation, the next screen will tell you so and you should receive an immediate email with instructions about how to proceed. But there's also a useful link ('Did you miss your activation email?') in the User Info box in case you miss this email or mistype your email address. + If registration has been configured to require approval from a forum administrator, the next screen will tell you so and you should receive both an acknowledgement by email and another email later to inform you whether or not your application has been approved. + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/default/help/registering.russian.html b/Themes/default/help/registering.russian.html new file mode 100644 index 0000000..cadd785 --- /dev/null +++ b/Themes/default/help/registering.russian.html @@ -0,0 +1,118 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    "" , SMF - ...! ( SMF ...), , . . .

    +
      +
    1. +
    2. +
    +

    +

    , + :

    +
      +
    • .
    • +
    • , , : , .
    + + + + + + + +
    !
    .
    + , .

    +

    +
    +
    +
    + + + + + + + +
    -
    + + + + + + + + + + + + + + + + + +
    + : +
    + . , , . , . +
    +
    + E-mail: +
    + e-mail . +
    +
    :
    :
    +
    + + + + + + + +
    , , !

    +
    + +
    +
    +
    +

    +

    , e-mail . e-mail , . , . , . , , - , , - ! ! ( , , , ) - :

    +
      +
    • , e-mail . , , . e-mail, ? .
    • +
    • , . , .
    • +
    + + + diff --git a/Themes/default/help/registering.xslt b/Themes/default/help/registering.xslt new file mode 100644 index 0000000..152f8cd --- /dev/null +++ b/Themes/default/help/registering.xslt @@ -0,0 +1,100 @@ + + + + + + + + + + + +
    + +
    + +
    + + + +
    +
    +
    + + +
    +
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + +
    + : +
    +
    + +
    + : +
    +
    + + +
    + : + + +
    + : + + +
    +
    + + + + + + + +
    + +
    + +
    +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/default/help/searching.english.html b/Themes/default/help/searching.english.html new file mode 100644 index 0000000..2fac14e --- /dev/null +++ b/Themes/default/help/searching.english.html @@ -0,0 +1,167 @@ + + + + + + + + + SMF User Help: Searching + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Searching


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    While SMF naturally incorporates a powerful search engine, knowing how to use it is not surprisingly the key to returning successful results!

    +
      +
    1. Starting a Search
    2. +
    3. + Syntax +
        +
      1. Quote Marks
      2. +
      +
    4. +
    5. + Simple or Advanced? +
        +
      1. Simple Search
      2. +
      3. Advanced Search
      4. +
      +
    6. +
    +

    Starting a Search

    +

    Assuming the forum is running the SMF default theme (or a derivative of it), there should be both a simple Search field (partnered by an Advanced search text link) in the collapsable top section and a Search option in the main menu. If not, the main menu Search option should still lead straight to the advanced search screen.

    +

    Syntax

    +

    While you can just type (and search for) any combination of characters, you should consider using quotes to make your search really work for you:

    +

    Quote Marks

    +

    To put this in a nutshell, searching for simple machines forum will return any or all of these three words, but enclosing the search string in double quote marks (ie "simple machines forum") will return only the entire phrase.

    +

    Simple or Advanced?

    +

    Simple Search

    +

    To use the simple search (if enabled), the basic syntax outlined above is all you really need to know. But you might also like to know that this tool searches the entire forum for any or all of what you specify that's been posted during the last 9999 days (which is more than 27 years)! So, to take more control of your search, you should use the advanced search feature.

    +

    Advanced Search

    +

    Although the advanced search screen might initially seem a little intimidating if a forum has many boards and child boards, it's surprisingly straightforward when reduced to its basic components:

    +
    +
    +
    + + + + +
    +  Forum Name
    + |- +  Search
    + + + + + + + +
    Set Search Parameters
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Search for: by user:
        
     
    Options:Message age:

    +
    Between and days.
    Search order:

    + Choose a board to search in, or search all:
    +
    + + + + + + + + +
    Category name

    +
    +
    + + + + +
    +

    +
    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • Despite initial appearances, there are really three options for how to search, with Match all words and Match any words being available from the drop-down, and "Match as phrase" still being available as described above.
    • +
    • The default * in the by user field is essentially a wildcard matching any poster. Please note that, while you can replace this with any single username for a more specific search, it's not currently possible to search for posts by multiple users except as that single wildcard.
    • +
    • Show results as messages returns the full message containing the search string (with a reply option) instead of the usual linked excerpt, but will naturally result in much larger results pages which might be significant if you are searching for a popular word or phrase.
    • +
    • Message age sets the minimum and maximum ages of posts to search.
    • +
    • Choose a board to search in provides you with another tool to narrow the scope of the search, with the default being 'all' (the whole forum or, more properly, all the boards to which you have read access).
    • +
    • The Search button not surprisingly sets the whole thing in motion, but hitting 'Enter' direct from any of the search fields is sometimes more convenient.
    • +
    + + + \ No newline at end of file diff --git a/Themes/default/help/searching.english.xml b/Themes/default/help/searching.english.xml new file mode 100644 index 0000000..322437e --- /dev/null +++ b/Themes/default/help/searching.english.xml @@ -0,0 +1,94 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Searching + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + While SMF naturally incorporates a powerful search engine, knowing how to use it is not surprisingly the key to returning successful results! + +
    + Starting a Search + Assuming the forum is running the SMF default theme (or a derivative of it), there should be both a simple Search field (partnered by an Advanced search text link) in the collapsable top section and a Search option in the main menu. If not, the main menu Search option should still lead straight to the advanced search screen. +
    +
    + Syntax + While you can just type (and search for) any combination of characters, you should consider using quotes to make your search really work for you: + + Quote Marks + To put this in a nutshell, searching for simple machines forum will return any or all of these three words, but enclosing the search string in double quote marks (ie "simple machines forum") will return only the entire phrase. + + +
    +
    + Simple or Advanced? + + Simple Search + To use the simple search (if enabled), the basic syntax outlined above is all you really need to know. But you might also like to know that this tool searches the entire forum for any or all of what you specify that's been posted during the last 9999 days (which is more than 27 years)! So, to take more control of your search, you should use the advanced search feature. + + + Advanced Search + Although the advanced search screen might initially seem a little intimidating if a forum has many boards and child boards, it's surprisingly straightforward when reduced to its basic components: + + + Forum Name + Search + Set Search Parameters + Search for + Match all words + Match any words + by user + Options + Message age + Show results as messages + Topic subjects only + Between + and + days + Search order + Most relevant results first + Largest topics first + Smallest topics first + Most recent topics first + Oldest topics first + Choose a board to search in, or search all + Category name + Board Name + Another Board + Check all + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + Despite initial appearances, there are really three options for how to search, with and being available from the drop-down, and "Match as phrase" still being available as described above. + The default * in the by user field is essentially a wildcard matching any poster. Please note that, while you can replace this with any single username for a more specific search, it's not currently possible to search for posts by multiple users except as that single wildcard. + Show results as messages returns the full message containing the search string (with a reply option) instead of the usual linked excerpt, but will naturally result in much larger results pages which might be significant if you are searching for a popular word or phrase. + Message age sets the minimum and maximum ages of posts to search. + Choose a board to search in provides you with another tool to narrow the scope of the search, with the default being 'all' (the whole forum or, more properly, all the boards to which you have read access). + The Search button not surprisingly sets the whole thing in motion, but hitting 'Enter' direct from any of the search fields is sometimes more convenient. + + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/default/help/searching.russian.html b/Themes/default/help/searching.russian.html new file mode 100644 index 0000000..2209e46 --- /dev/null +++ b/Themes/default/help/searching.russian.html @@ -0,0 +1,167 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    , , !

    +
      +
    1. +
    2. + +
        +
      1. +
      +
    3. +
    4. + ? +
        +
      1. +
      2. +
      +
    5. +
    +

    +

    , ( ) , .

    +

    +

    ( ) , , :

    +

    +

    , , , , ( " ") - , .

    +

    ?

    +

    +

    ( ) . , 9999 ( 27 )! , .

    +

    +

    , , , , :

    +
    +
    +
    + + + + +
    + 
    + |- + 
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :  :
        
     
    : :

    +
    .
    :

    + :
    +
    + + + + + + + + +

    +
    +
    + + + + +
    +

    +
    +
    +

    +
      +
    • ( ) .
    • +
    • , , .
    • +
    • *, , - , . , , *.
    • +
    • , , , , .
    • +
    • , .
    • +
    • . ' ' ( , , , ).
    • +
    • ( ...), 'Enter', , .
    • +
    + + + diff --git a/Themes/default/help/searching.xslt b/Themes/default/help/searching.xslt new file mode 100644 index 0000000..2e7a05b --- /dev/null +++ b/Themes/default/help/searching.xslt @@ -0,0 +1,133 @@ + + + + +
    +
    +
    + + + + +
    + + +  + +
    + |- + +  + +
    +
    + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    : :
    +     +  
     
    ::
    +
    +
    +
    + + + + + . +
    :
    + +
    +
    + : +
    +
    + + + + + + + + +
    + + + + + + +
    + + +
    +
    + +
    +
    + + + + +
    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/default/help/style.xslt b/Themes/default/help/style.xslt new file mode 100644 index 0000000..e5e076a --- /dev/null +++ b/Themes/default/help/style.xslt @@ -0,0 +1,207 @@ + + + +]> + + + + + + + + + + + + + + + + + + Version: 1.0; help/ + + + + + <xsl:value-of select="title" /> + + + + + + + + + + + + + + + + + + + + + + +
    + + {//visit-simple-machines} + + + {//visit-simple-machines} +

    +
    +
    +

    + + + + + + + + + + + + + + + +

    +
    +
    +
    + + + + + + + + + +
      + +
    1. + + + + +
        + +
      1. + + + +
      2. +
        +
      +
      +
    2. +
      +
    +
    + + + + + + + + + + +

    + +

    + +
    + + +

    + +

    + +
    + + +

    +
    + + + + + + + + + + +
    +
    + + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Themes/default/images b/Themes/default/images new file mode 120000 index 0000000..2a29803 --- /dev/null +++ b/Themes/default/images @@ -0,0 +1 @@ +/var/www/img.rock.ru/forum/Themes/default/images \ No newline at end of file diff --git a/Themes/default/index.php b/Themes/default/index.php new file mode 100644 index 0000000..be9895a --- /dev/null +++ b/Themes/default/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/Themes/default/index.template.php b/Themes/default/index.template.php new file mode 100644 index 0000000..5142cae --- /dev/null +++ b/Themes/default/index.template.php @@ -0,0 +1,587 @@ + + + + + + + + + + + + + + + + + '; + echo ' + ', $context['page_title'], ''; + + // This is here because Gecko browsers properly support white-space.... + if ($context['browser']['is_gecko']) + echo ' + '; + + if ($options['style_width'] == 'liquid' OR isset($_COOKIE['style_width']) AND $_COOKIE['style_width'] == 'liquid') { + $style_width = "style.liquid.css"; + } else { + $style_width = "style.fixed.css"; + } + + echo ' + '; + + // Show all the relative links, such as help, search, contents, and the like. + echo ' + + + '; + + // If we're viewing a topic, these should be the previous and next topics, respectively. + // Also, we need jquery here (we don't need it on other pages yet, so let it be here). + if (!empty($context['current_topic'])) + echo ' + + + + + + + '; + + + // If we're in a board, or a topic for that matter, the index will be the board's index. + if (!empty($context['current_board'])) { + echo ' + + '; + } + + // We'll have to use the cookie to remember the header... + if ($context['user']['is_guest']) { + $options['collapse_header'] = !empty($_COOKIE['upshrink']); + } + + // Output any remaining HTML headers. (from mods, maybe?) + echo $context['html_headers']; +?> + +'; +?> + +
    +'; + + // The logo and the three info boxes. + echo ' + + + + + + + + +
    '; + + // This part is the logo and forum name. You should be able to change this to whatever you want... + echo ' + На главную страница форума'; + + echo ' + + Главная - Новости - Тексты песен - Рецензии - Чат - Mp3 - Хостинг для картинок - Блог
    + +
    '; +?> + + +
    + + *';//'; + + // Show the menu here, according to the menu sub template. + template_menu(); + + echo ' +
    '; + + + // The main content should go here. A table is used because IE 6 just can't handle a div. + echo ' + + +
    '; +} + +function template_main_below() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo '
    '; + + // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere! + echo ' + +
    '; + echo ' + + + + + +
    + ', theme_copyright(), ' +
    '; + + // Show the load time? + if ($context['show_load_time']) + echo ' + ', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], ''; + + echo ' +
    '; + + // This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough. + if ($context['browser']['is_ie'] && !$context['browser']['is_ie4'] || $context['browser']['is_mac_ie'] || $context['browser']['is_safari']) + { + // The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself. + echo ' + '; + } + + $cache_dir = '/789324hj324y23789hfsd098/'; + include_once('/var/www/rock' . $cache_dir . 'tnx.php'); + $tnx = new TNX_n('rustyangel', $cache_dir); + + echo ' +
    ', $tnx->show_link(), '
    + +
    + Rambler's Top100 + Rambler's Top100 + MusicCounter'; +?> + + +
    '; + + // Here's some new code + echo ' + '; +?> +
    +
      +
    • +
    + + +
      + +
    • +
    • +
    + +
    +
    + +
    +
    + + + + + + + + + + +
    + +'; +} + +// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. +function theme_linktree() +{ + global $context, $settings, $options; + + // Folder style or inline? Inline has a smaller font. + echo ''; + + // Each tree item has a URL and name. Some may have extra_before and extra_after. + foreach ($context['linktree'] as $link_num => $tree) + { + // Show the | | |-[] Folders. + if (!$settings['linktree_inline']) + { + if ($link_num > 0) + echo str_repeat('| ', $link_num - 1), '|-'; + echo '+  '; + } + + // Show something before the link? + if (isset($tree['extra_before'])) + echo $tree['extra_before']; + + // Show the link, including a URL if it should have one. + echo '', $settings['linktree_link'] && isset($tree['url']) ? '' . $tree['name'] . '' : $tree['name'], ''; + + // Show something after the link...? + if (isset($tree['extra_after'])) + echo $tree['extra_after']; + + // Don't show a separator for the last one. + if ($link_num != count($context['linktree']) - 1) + echo $settings['linktree_inline'] ? '  |  ' : '
    '; + } + + echo '
    '; +} + +// Show the menu up top. Something like [home] [help] [profile] [logout]... +function template_menu() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + // Show the [home] and [help] buttons. + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[103] . '' : $txt[103]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[119] . '' : $txt[119]), '', $context['menu_separator']; + + // How about the [search] button? + if ($context['allow_search']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[182] . '' : $txt[182]), '', $context['menu_separator']; + + // Is the user allowed to administrate at all? ([admin]) + if ($context['allow_admin']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[2] . '' : $txt[2]), '', $context['menu_separator']; + + // Edit Profile... [profile] + if ($context['allow_edit_profile']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[79] . '' : $txt[467]), '', $context['menu_separator']; + + // The [calendar]! + if ($context['allow_calendar']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['calendar24'] . '' : $txt['calendar24']), '', $context['menu_separator']; + + // Google Maps Mod + if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view'))) + echo ' + ', ($settings['use_image_buttons'] ? 'Google Map' : 'Google Map'), '', $context['menu_separator']; + + // If the user is a guest, show [login] and [register] buttons. + if ($context['user']['is_guest']) + { + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[34] . '' : $txt[34]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[97] . '' : $txt[97]), ''; + } + // Otherwise, they might want to [logout]... + else + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[108] . '' : $txt[108]), ''; +} diff --git a/Themes/default/jquery.cookie.js b/Themes/default/jquery.cookie.js new file mode 100644 index 0000000..3214d05 --- /dev/null +++ b/Themes/default/jquery.cookie.js @@ -0,0 +1,37 @@ +jQuery.cookie = function(name, value, options) { + if (typeof value != 'undefined') { + options = options || {}; + if (value === null) { + value = ''; + options.expires = -1; + } + var expires = ''; + if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { + var date; + if (typeof options.expires == 'number') { + date = new Date(); + date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); + } else { + date = options.expires; + } + expires = '; expires=' + date.toUTCString(); + } + var path = options.path ? '; path=' + (options.path) : ''; + var domain = options.domain ? '; domain=' + (options.domain) : ''; + var secure = options.secure ? '; secure' : ''; + document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + } else { + var cookieValue = null; + if (document.cookie && document.cookie != '') { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = jQuery.trim(cookies[i]); + if (cookie.substring(0, name.length + 1) == (name + '=')) { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; + } +}; diff --git a/Themes/default/languages/Admin.english.php b/Themes/default/languages/Admin.english.php new file mode 100644 index 0000000..832ba9b --- /dev/null +++ b/Themes/default/languages/Admin.english.php @@ -0,0 +1,379 @@ +Blank a box to remove that word.'; +$txt[207] = 'Set Reserved Names'; +$txt[216] = 'Edit Your Forum Template'; +$txt[222] = 'Edit Server Settings'; +$txt[338] = 'Send an email to the above email list'; +$txt[341] = 'Set Reserved Names'; +$txt[342] = 'One reserved word per line.'; +$txt[347] = 'This page allows you to change the basic settings for your forum. Be very careful with these settings, as they may render the forum dysfunctional. Also note that some of these options (such as time format) are default options or for guests only.'; +$txt[348] = 'Maintenance Mode?'; +$txt[350] = 'Message Board Name'; +$txt[351] = 'Forum URL'; +$txt[352] = 'Cookie Name'; +$txt[355] = 'Webmaster Email Address'; +$txt[356] = 'SMF Directory'; +$txt[360] = 'Sources Directory'; +$txt[365] = 'Title BG Color'; +$txt[366] = 'Title Text Color'; +$txt[367] = 'Window BG Color'; +$txt[368] = 'Window BG Color #2'; +$txt[369] = 'Category BG Color'; +$txt[370] = 'Table Border Color'; +$txt[379] = 'Enable News?'; +$txt[380] = 'Enable Guest Posting?'; +$txt[388] = 'News Fader Title Color'; +$txt[389] = 'News Fader News Color'; +$txt[424] = 'SMF Admin Options'; +$txt[426] = 'Member Controls'; +$txt[427] = 'Forum Controls'; +$txt[428] = 'Forum Configuration'; +$txt[429] = 'Detailed Version Check'; +$txt[495] = 'SMF File'; +$txt[496] = 'SMF Package'; +$txt[501] = 'Maintenance Controls'; +$txt[521] = 'Show buttons as images instead of text'; +$txt[571] = 'Credits'; +$txt[584] = 'Show and require agreement letter when registering'; +$txt[608] = 'Delete Selected Members'; +$txt[610] = 'Repair All Boards and Topics'; +$txt[644] = 'This is your "' . $txt[208] . '". From here, you can edit settings, maintain your forum, view logs, install packages, manage themes, and many other things.
    If you have any trouble, please look at the "Common Support & Issues" panel. If the information there doesn\'t help you, feel free to look to us for help with the problem.
    You may also find answers to your questions or problems by clicking the ' . $txt[119] . ' symbols for more information on the related functions.'; +$txt[670] = 'Please place one news item per box. Some BBC tags, such as [b], [i] and [u] are allowed in your news, as well as smileys and HTML. Clear a news item\'s text box to remove it.'; +$txt[684] = 'Forum Administrators'; +$txt[699] = 'Reserved names will keep members from registering certain usernames or using these words in their displayed names. Choose the options you wish to use from the bottom before submitting.'; +$txt[702] = 'Send activation email to new members upon registration?'; +$txt[726] = 'Match whole name only. If unchecked, search within names.'; +$txt[727] = 'Match case. If unchecked, search will be case insensitive.'; +$txt[728] = 'Check username.'; +$txt[729] = 'Check display name.'; +$txt[735] = 'You can email anyone from this page. The email addresses of the selected membergroups should appear below, but you may remove or add any email addresses you wish. Be sure that each address is separated in this fashion: \'address1; address2\'.'; +$txt[739] = 'Time in milliseconds to display each item in the news fader'; +$txt[740] = 'Show BBC Buttons on Posting and PM Send Pages?'; + +$txt['smf1'] = 'Failed to make backup of Settings.php - make sure Settings_bak.php exists and is writable.'; +$txt['modSettings_title'] = 'Edit Features and Options'; +$txt['modSettings_info'] = 'Change or set options that control how this forum operates.'; +$txt['smf5'] = 'Server on which the database resides:'; +$txt['smf6'] = 'Database Username:'; +$txt['smf7'] = 'Database Password:'; +$txt['smf8'] = 'Database Name:'; +$txt['smf11'] = 'Edit Registration Agreement'; +$txt['smf12'] = 'This agreement is shown when a user registers an account on this forum and has to be accepted before users can continue registration.'; +$txt['smf54'] = 'Database Tables Prefix:'; +$txt['smf55'] = 'Hold down the ctrl key to select multiple entries. Click the ' . $txt[17] . ' button when you are done.'; +$txt['smf73'] = 'Listing of forum errors'; +$txt['smf74'] = 'The following errors are fouling up your forum (blank if none)'; +$txt['smf75'] = 'has a bad first message'; +$txt['smf76'] = 'has a bad last message'; +$txt['smf81'] = 'does not have a matching board'; +$txt['smf83'] = 'does not have a matching category'; +$txt['smf84'] = 'Category'; +$txt['smf85'] = 'Would you like to fix these errors?'; +$txt['smf86'] = 'Fixing forum errors'; +$txt['smf89'] = 'Error creating a'; +$txt['smf92'] = 'All errors fixed! Please check on any categories, boards, or topics created to decide what to do with them.'; +$txt['smf201'] = 'Attachment Manager'; +$txt['smf202'] = 'From here you can administer the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed below.'; +$txt['smf203'] = 'File Attachment Statistics'; +$txt['smf204'] = 'Total Attachments'; +$txt['smf205'] = 'Total Size of Attachment Directory'; +$txt['smf206'] = 'Total Space Available in Attachment Directory'; +$txt['smf207'] = 'File Attachment Options'; +$txt['smf208'] = 'Attachment Log'; +$txt['smf209'] = 'Remove attachments older than'; +$txt['smf210'] = 'Remove attachments larger than'; +$txt['smf213'] = 'Attachment Name'; +$txt['smf214'] = 'File Size'; +$txt['smf215'] = 'No maximum directory size is currently set'; +$txt['smf216'] = '[attachment deleted by admin]'; +$txt['smf217'] = 'Live from Simple Machines...'; +$txt['smf219'] = 'Remove All'; +$txt['smf250'] = 'Please select the Member Group(s) you would like to send an email to.'; +$txt['smf281'] = 'Optimize Database'; +$txt['smf282'] = 'Your database contains %d tables.'; +$txt['smf283'] = 'Attempting to optimize your database...'; +$txt['smf284'] = 'Optimizing %1$s... %2$f kb optimized.'; +$txt['smf285'] = 'All of the tables were already optimized.'; +$txt['smf285b'] = 'It wasn\'t necessary to optimize any tables.'; +$txt['smf286'] = ' table(s) optimized.'; +$txt['smf307'] = 'has a non-existent topic ID'; +$txt['smf308'] = 'contains no messages'; +$txt['smf309'] = 'has a wrong number of replies'; +$txt['smf310'] = 'has a non-existent member ID'; +$txt['smf311'] = 'Successfully inserted salvaged messages in salvage category'; +$txt['smf312'] = 'topic(s) without messages have been removed successfully'; +$txt['smf319'] = 'Admin must approve all new members'; +$txt['smf320'] = 'Warning - agreement.txt is not writable, any changes you make will NOT be saved.'; + +$txt['dvc1'] = 'This shows you the versions of your installation\'s files versus those of the latest version. If any of these files are out of date, you should download and upgrade to the latest version at www.simplemachines.org.'; +$txt['dvc_more'] = '(more detailed)'; + +$txt['lfyi'] = 'You are unable to connect to simplemachines.org\'s latest news file.'; + +$txt['smileys_manage'] = 'Smileys and Smiley Sets'; +$txt['smileys_manage_info'] = 'Install new smiley sets or add smileys to existing ones.'; +$txt['package1'] = 'Package Manager'; +$txt['package_info'] = 'Install new features or modify existing ones with this interface.'; +$txt['theme_admin'] = 'Theme and Layout Settings'; +$txt['theme_admin_info'] = 'Setup and manage your themes and set or reset theme options.'; +$txt['registration_center'] = 'Registration Management'; +$txt['registration_center_info'] = 'Register, approve, and manage member registration.'; +$txt['registration_member'] = 'Register New Member'; + +$txt['viewmembers_name'] = 'Username (display name)'; +$txt['viewmembers_online'] = 'Last Online'; +$txt['viewmembers_today'] = 'Today'; +$txt['viewmembers_day_ago'] = 'day ago'; +$txt['viewmembers_days_ago'] = 'days ago'; + +$txt['display_name'] = 'Display name'; +$txt['email_address'] = 'Email Address'; +$txt['ip_address'] = 'IP address'; +$txt['member_id'] = 'ID'; + +$txt['security_wrong'] = 'Administration login attempt!' . "\n" . + 'Referer: ' . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'unknown') . "\n" . + 'User agent: ' . $_SERVER['HTTP_USER_AGENT'] . "\n" . + 'IP: ' . $GLOBALS['user_info']['ip']; + +$txt['email_as_html'] = 'Send in HTML format. (with this you can put normal HTML in the email.)'; +$txt['email_parsed_html'] = 'Add <br />s and &nbsp;s to this message.'; +$txt['email_variables'] = 'In this message you can use a few "variables". Click here for more information.'; +$txt['email_force'] = 'Send this to members even if they have chosen not to receive announcements.'; +$txt['email_as_pms'] = 'Send this to these groups using personal messages.'; + +$txt['ban_title'] = 'Ban Members'; +$txt[724] = 'IP banning: (e.g. 192.168.12.213 or 128.0.*.*) - one entry per line'; +$txt[725] = 'Email banning: (e.g. badguy@somewhere.com) - one entry per line'; +$txt[7252] = 'User name banning: (e.g. l33tuser) - one entry per line'; + +$txt['ban_description'] = 'Here you can ban troublesome people either by IP, hostname, username, or email.'; +$txt['ban_add_new'] = 'Add new ban'; +$txt['ban_banned_entity'] = 'Banned entity'; +$txt['ban_on_ip'] = 'Ban on IP (e.g. 192.168.10-20.*)'; +$txt['ban_on_hostname'] = 'Ban on Hostname (e.g. *.mil)'; +$txt['ban_on_email'] = 'Ban on Email Address (e.g. *@badsite.com)'; +$txt['ban_on_username'] = 'Ban on Username'; +$txt['ban_notes'] = 'Notes'; +$txt['ban_restriction'] = 'Restriction'; +$txt['ban_full_ban'] = 'Full ban'; +$txt['ban_cannot_post'] = 'Cannot post'; +$txt['ban_cannot_register'] = 'Cannot register'; +$txt['ban_add'] = 'Add'; +$txt['ban_edit_list'] = 'Edit ban list'; +$txt['ban_type'] = 'Ban Type'; +$txt['ban_days'] = 'day(s)'; +$txt['ban_will_expire_within'] = 'Ban will expire after'; +$txt['ban_expires'] = 'Expires'; +$txt['ban_actions'] = 'Actions'; +$txt['ban_expiration'] = 'Expiration'; +$txt['ban_reason_desc'] = 'Reason for ban, to be displayed to banned member.'; +$txt['ban_notes_desc'] = 'Notes that may assist other staff members.'; +$txt['ban_remove_selected'] = 'Remove selected'; +$txt['ban_remove_selected_confirm'] = 'Are you sure you want to remove the selected bans?'; +$txt['ban_modify'] = 'Modify'; + +$txt['ban_log'] = 'Ban log'; +$txt['ban_log_description'] = 'The ban log shows all attempts to enter the forum by banned users (\'full ban\' and \'cannot register\' ban only).'; +$txt['ban_log_no_entries'] = 'No ban log entries'; +$txt['ban_log_ip'] = 'IP'; +$txt['ban_log_email'] = 'Email address'; +$txt['ban_log_member'] = 'Member'; +$txt['ban_log_date'] = 'Date'; +$txt['ban_log_remove_all'] = 'Remove all'; +$txt['ban_log_remove_all_confirm'] = 'Are you sure you want to delete all ban log entries?'; +$txt['ban_log_remove_selected'] = 'Remove selected'; +$txt['ban_log_remove_selected_confirm'] = 'Are you sure you want to delete all selected ban log entries?'; + +$txt['apply_filter'] = 'Apply Filter'; +$txt['applying_filter'] = 'Applying Filter'; +$txt['filter_only_member'] = 'Only show the error messages of this member'; +$txt['filter_only_ip'] = 'Only show the error messages of this IP address'; +$txt['filter_only_session'] = 'Only show the error messages of this session'; +$txt['filter_only_url'] = 'Only show the error messages of this URL'; +$txt['filter_only_message'] = 'Only show the errors with the same message'; +$txt['session'] = 'Session'; +$txt['error_url'] = 'URL of page causing the error'; +$txt['error_message'] = 'Error message'; +$txt['clear_filter'] = 'Clear filter'; +$txt['remove_selection'] = 'Remove Selection'; +$txt['remove_filtered_results'] = 'Remove All Filtered Results'; +$txt['sure_about_errorlog_remove'] = 'Are you sure you want to remove all error messages?'; +$txt['reverse_direction'] = 'Reverse chronological order of list'; + +$txt['settings_not_writable'] = 'These settings cannot be changed because Settings.php is read only.'; + +$txt['maintain_title'] = 'Forum Maintenance'; +$txt['maintain_info'] = 'Optimize tables, make backups, check for errors, and prune boards with these tools.'; +$txt['maintain_done'] = 'Maintenance Completed.'; + +$txt['maintain_general'] = 'General Maintenance'; +$txt['maintain_recount'] = 'Recount all forum totals and statistics.'; +$txt['maintain_errors'] = 'Find and repair any errors.'; +$txt['maintain_logs'] = 'Empty out unimportant logs.'; + +$txt['maintain_karmalog'] = 'Empty out Karmachange Description log'; +$txt['maintain_optimize'] = 'Optimize all tables to improve performance.'; +$txt['maintain_version'] = 'Check all files against current versions.'; + +$txt['maintain_backup'] = 'Backup Database'; +$txt['maintain_backup_struct'] = 'Save the table structure.'; +$txt['maintain_backup_data'] = 'Save the table data. (the important stuff.)'; +$txt['maintain_backup_gz'] = 'Compress the file with gzip.'; +$txt['maintain_backup_save'] = 'Download'; + +$txt['maintain_old'] = 'Remove Old Posts'; +$txt['maintain_old1'] = 'Remove all topics not posted in for '; +$txt['maintain_old2'] = ' days, besides stickies.'; +$txt['maintain_old_all'] = 'All Boards'; +$txt['maintain_old_choose'] = 'Choose Specific Boards'; +$txt['maintain_old_remove'] = 'Remove'; +$txt['maintain_old_confirm'] = 'Are you really sure you want to delete old posts?\\n\\nThis cannot be undone!'; + +$txt['db_error_send'] = 'Send emails on MySQL connection error'; +$txt['db_persist'] = 'Use a persistent connection'; + +$txt['default_language'] = 'Default Forum Language'; + +$txt['maintenance1'] = 'Subject for display:'; +$txt['maintenance2'] = 'Message for display:'; + +$txt['errlog1'] = 'View Forum Error Log'; +$txt['errlog2'] = 'The error log tracks every error encountered by your forum. To delete any errors from the database, mark the checkbox, and click the ' . $txt[31] . ' button at the bottom of the page.'; + +$txt['theme4'] = 'Theme Settings'; +$txt['theme_current_settings'] = 'Current Theme\'s Settings'; + +$txt['parent_repair_found'] = 'Board %d does not have an existing parent board. (its parent is board %d)'; +$txt['parent_repair_fixed'] = 'Successfully assigned orphaned boards to the salvage area.'; + +$txt['repair_zeroed_ids'] = 'Found topics and/or messages with topic or message IDs of 0.'; + +$txt['dvc_your'] = 'Your Version'; +$txt['dvc_current'] = 'Current Version'; +$txt['dvc_sources'] = 'Sources'; +$txt['dvc_default'] = 'Default Templates'; +$txt['dvc_templates'] = 'Current Templates'; +$txt['dvc_languages'] = 'Language Files'; + +$txt['modlog_view'] = 'View Moderation Log'; +$txt['modlog_date'] = 'Date'; +$txt['modlog_member'] = 'Member'; +$txt['modlog_position'] = 'Position'; +$txt['modlog_action'] = 'Action'; +$txt['modlog_ip'] = 'IP'; +$txt['modlog_search_result'] = 'Search Results'; +$txt['modlog_total_entries'] = 'Total Entries'; +$txt['modlog_ac_banned'] = 'Banned'; +$txt['modlog_ac_locked'] = 'Locked'; +$txt['modlog_ac_stickied'] = 'Stickied'; +$txt['modlog_ac_deleted'] = 'Deleted'; +$txt['modlog_ac_deleted_member'] = 'Deleted Member'; +$txt['modlog_ac_removed'] = 'Removed'; +$txt['modlog_ac_modified'] = 'Modified'; +$txt['modlog_ac_merged'] = 'Merged'; +$txt['modlog_ac_split'] = 'Split'; +$txt['modlog_ac_moved'] = 'Moved'; +$txt['modlog_ac_profile'] = 'Profile Edit'; +$txt['modlog_ac_pruned'] = 'Pruned Board'; +$txt['modlog_ac_news'] = 'Edited News'; +$txt['modlog_enter_comment'] = 'Enter Moderation Comment'; +$txt['modlog_moderation_log'] = 'Moderation Log'; +$txt['modlog_moderation_log_desc'] = 'Below is a list of all the moderation actions that have been carried out by moderators of the forum.
    Please note: Entries cannot be removed from this log until they are at least 24 hours old.'; +$txt['modlog_no_entries_found'] = 'No entries found'; +$txt['modlog_remove'] = 'Remove'; +$txt['modlog_removeall'] = 'Remove All'; +$txt['modlog_go'] = 'Go'; +$txt['modlog_add'] = 'Add'; +$txt['modlog_search'] = 'Quick Search'; +$txt['modlog_by'] = 'By'; + +$txt['smileys_default_set_for_theme'] = 'Select default smiley set for this theme'; +$txt['smileys_no_default'] = '(use global default smiley set)'; + +$txt['censor_test'] = 'Test Censored Words'; +$txt['censor_test_save'] = 'Test'; +$txt['censor_case'] = 'Ignore case when censoring.'; +$txt['smf231'] = 'Check only whole words.'; + +$txt['admin_confirm_password'] = '(confirm)'; + +$txt['date_format'] = '(YYYY-MM-DD)'; +$txt['undefined_gender'] = 'Undefined'; +$txt['age'] = 'User age'; +$txt['activation_status'] = 'Activation Status'; +$txt['activated'] = 'Activated'; +$txt['not_activated'] = 'Not activated'; +$txt['primary'] = 'Primary'; +$txt['additional'] = 'Additional'; +$txt['messenger_address'] = 'Messenger Address'; +$txt['wild_cards_allowed'] = 'wildcard characters * and ? are allowed'; +$txt['search_for'] = 'Search for'; +$txt['member_part_of_these_membergroups'] = 'Member is part of these membergroups'; +$txt['membergroups'] = 'Membergroups'; +$txt['confirm_delete_members'] = 'Are you sure you want to delete the selected members?'; + +$txt['support_credits_title'] = 'Support and Credits'; +$txt['support_credits_info'] = 'Get support on common issues and version information to give if you have problems.'; +$txt['support_title'] = 'Support Information'; +$txt['support_versions_current'] = 'Current SMF version'; +$txt['support_versions_forum'] = 'Forum version'; +$txt['support_versions_php'] = 'PHP version'; +$txt['support_versions_mysql'] = 'MySQL version'; +$txt['support_versions_server'] = 'Server version'; +$txt['support_versions_gd'] = 'GD version'; +$txt['support_versions'] = 'Version Information'; +$txt['support_latest'] = 'Common Support & Issues'; +$txt['support_latest_fetch'] = 'Retrieving support information...'; + +$txt['edit_permissions'] = 'Edit Permissions'; +$txt['edit_permissions_info'] = 'Change restrictions and available features globally or to specific boards.'; +$txt['membergroups_members'] = 'Ungrouped Members'; +$txt['membergroups_guests'] = 'Unregistered Guests'; +$txt['membergroups_guests_na'] = 'n/a'; +$txt['membergroups_name'] = 'Name'; +$txt['membergroups_stars'] = 'Stars'; +$txt['membergroups_members_top'] = 'Members'; +$txt['membergroups_add_group'] = 'Add group'; +$txt['membergroups_permissions'] = 'Permissions'; + +$txt['permitgroups_restrict'] = 'Restrictive'; +$txt['permitgroups_standard'] = 'Standard'; +$txt['permitgroups_moderator'] = 'Moderator'; +$txt['permitgroups_maintenance'] = 'Maintenance'; +$txt['permitgroups_inherit'] = 'Inherit'; + +$txt['confirm_delete_attachments_all'] = 'Are you sure you want to delete all attachments?'; +$txt['confirm_delete_attachments'] = 'Are you sure you want to delete the selected attachments?'; +$txt['attachment_manager_browse_files'] = 'Browse Files'; +$txt['attachment_manager_recount'] = 'Recount'; +$txt['attachment_manager_avatars'] = 'Avatars'; +$txt['attachment_manager_attachments'] = 'Attachments'; +$txt['attachment_manager_last_active'] = 'Last Active'; +$txt['attachment_manager_member'] = 'Member'; +$txt['attachment_manager_avatars_older'] = 'Remove avatars from members not active for more than'; +$txt['attachment_manager_total_avatars'] = 'Total Avatars'; + +$txt['editnews_clickadd'] = 'Click here to add another item.'; +$txt['editnews_remove_selected'] = 'Remove selected'; +$txt['editnews_remove_confirm'] = 'Are you sure you want to delete the selected news items?'; +$txt['censor_clickadd'] = 'Click here to add another word.'; + +$txt['update_available'] = 'Update Available!'; +$txt['update_message'] = 'You\'re using an outdated version of SMF, which contains some bugs which have since been fixed. + It is recommended that you update your forum to the latest version as soon as possible. It only takes a minute!'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Admin.russian.php b/Themes/default/languages/Admin.russian.php new file mode 100644 index 0000000..b8130c0 --- /dev/null +++ b/Themes/default/languages/Admin.russian.php @@ -0,0 +1,380 @@ +Пустая ячейка - отключает цензуру слов.'; +$txt[207] = 'Установка зарезервированных имен'; +$txt[216] = 'Редактировать ваш шаблон Форума'; +$txt[222] = 'Редактировать настройки сервера'; +$txt[338] = 'Отправить Email по списку адресов представленному выше'; +$txt[341] = 'Установка зарезервированных имен'; +$txt[342] = 'Одно резервируемое слово на строку.'; +$txt[347] = 'Эта страница позволит Вам изменять настройки вашего форума. Следует быть очень осторожным с этими установочными параметрами, так как они могут вывести из строя Ваш SMF-форум. Также имейте в виду, что некоторые установки являются установками по умолчанию или установками для гостей (например, формат времени).'; +$txt[348] = 'Поставить На Техобслуживание?'; +$txt[350] = 'Название Форума'; +$txt[351] = 'URL Форума'; +$txt[352] = 'Cookie Name'; +$txt[355] = 'Email Вэбмастера'; +$txt[356] = 'Директория SMF Форума'; +$txt[360] = 'Sources - Исходная директория'; +$txt[365] = 'Цвет Фона Заглавия'; +$txt[366] = 'Цвет Текста Заглавия'; +$txt[367] = 'Цвет Фона Окна'; +$txt[368] = 'Цвет Фона Окна №2'; +$txt[369] = 'Цвет Фона Категории'; +$txt[370] = 'Цвет Обрамления Таблицы'; +$txt[379] = 'Включить Новости?'; +$txt[380] = 'Позволить Гостям Писать Сообщения?'; +$txt[388] = 'Цвет Заголовка Новостной Ленты'; +$txt[389] = 'Цвет Новостей Новостной Ленты'; +$txt[424] = 'Административные Опции SMF'; +$txt[426] = 'Контроль Участников'; +$txt[427] = 'Контроль Форума'; +$txt[428] = 'Конфигурация Форума'; +$txt[429] = 'Детальная Проверка Версии'; +$txt[495] = 'SMF Файл'; +$txt[496] = 'SMF Пакет'; +$txt[501] = 'Управление Техобслуживанием'; +$txt[521] = 'Показывать образы кнопок, вместо текста'; +$txt[571] = 'Разработчики'; +$txt[584] = 'Показывать соглашение участнику при регистрации'; +$txt[608] = 'Удалить Выбранных Участников'; +$txt[610] = 'Исправить Все Форумы и Темы'; +$txt[644] = 'Это ваша \'' . $txt[208] . '\'. Вы можете отсюда редактировать настройки, осуществлять техподдержку, смотреть логи, устанавливать дополнительные файлы, управлять темами и множество других вещей.
    Если возникают какие-либо проблемы, пожалуйста, смотрите панель " Общая Поддержка и Несоответствия". Если эта информация не помогает Вам, не бойтесь обращаться к нам за помощью с Вашими проблемами.
    Так же, Вы можете найти решения различных проблем нажав ' . $txt[119] . ' знак для получения более подробной информации относительно данной функции.'; +$txt[670] = 'Пожалуйста, помещайте по одной новости в окошко. Здесь разрешены некоторые BBC таги, такие как [b], [i] и [u] , а также смайлики и HTML. Очистите окошко, чтобы удалить новость.'; +$txt[684] = 'Администраторы Форума'; +$txt[699] = 'Зарезервированные имена будут запрещены для использования в качестве имени пользователя и отображаемого имени. Выберите опции, которые вы хотите использовать, поставив галочку перед подтверждением.'; +$txt[702] = 'Посылать Email с активацией для регистрации нового пользователя?'; +$txt[726] = 'Привести в соответствие полные имена. Если отключено, будет искать зарезервированные слова только в пределах имени.'; +$txt[727] = 'Согласовать данные. Если отключено, будет искать безотносительно регистру.'; +$txt[728] = 'Проверить имя пользователя.'; +$txt[729] = 'Проверить отображаемое имя.'; +$txt[735] = 'Вы можете написать с этой страницы электронное письмо кому угодно. Email выбранных групп участников появляются ниже, но вы можете удалить или добавить адреса по вашему желанию. Убедитесь, что каждый адрес разделен таким образом: \'address1; address2\'.'; +$txt[739] = 'Время в миллисекундах для обновления каждого пункта в новостной ленте'; +$txt[740] = 'Отобразить кнопки BBC на странице сообщений и странице отправки личных сообщений?'; + +$txt['smf1'] = 'Не получилось сделать бекап файла Settings.php - убедитесь, что файл Settings_bak.php существует и перезаписываемый.'; +$txt['modSettings_title'] = 'Изменить настройки и опции'; +$txt['modSettings_info'] = 'Изменить или установить опции, которые контролируют работу форума.'; +$txt['smf5'] = 'Сервер (хост) на котором расположена база данных:'; +$txt['smf6'] = 'Пользователь базы данных(DB Username):'; +$txt['smf7'] = 'Пароль к базе данных (DBPassword):'; +$txt['smf8'] = 'Имя базы данных (DB Name):'; +$txt['smf11'] = 'Изменить соглашение пользователя'; +$txt['smf12'] = 'Это соглашение демонстрируется пользователю при регистрации, и он не сможет продолжить регистрацию, пока не подтвердит его.'; +$txt['smf54'] = 'Префикс базы данных (DB Prefix):'; +$txt['smf55'] = 'Держите CTRL чтобы выбрать несколько значений . Нажмите ' . $txt[17] . ' когда все сделаете.'; +$txt['smf73'] = 'Список ошибок форума'; +$txt['smf74'] = 'Эти ошибки засоряют ваш Форум (пусто, если их нет)'; +$txt['smf75'] = 'ошибочно первое сообщение'; +$txt['smf76'] = 'ошибочно последнее сообщение'; +$txt['smf81'] = 'не подходит соответствующему форуму'; +$txt['smf83'] = 'не подходит соответствующей категории'; +$txt['smf84'] = 'Категория'; +$txt['smf85'] = 'Желаете ли вы исправить эти ошибки?'; +$txt['smf86'] = 'Исправление ошибок форума'; +$txt['smf89'] = 'Ошибка создает'; +$txt['smf92'] = 'Все ошибки исправлены! Вам необходимо проверить любую созданную категорию, форум или тему, чтобы решить, что с ними делать.'; +$txt['smf201'] = 'Менеджер вложений'; +$txt['smf202'] = 'Отсюда вы можете администрировать вложения на сервере. Вы можете удалять вложения в соответствии с их размером или датой. Статистика по вложениям отображена ниже.'; +$txt['smf203'] = 'Статистика Вложений'; +$txt['smf204'] = 'Количество Вложений'; +$txt['smf205'] = 'Общий Размер Вложений'; +$txt['smf206'] = 'Всего пространства, отведенного под папку вложений'; +$txt['smf207'] = 'Опции Вложений'; +$txt['smf208'] = 'Лог Вложений'; +$txt['smf209'] = 'Удалить вложения старше чем'; +$txt['smf210'] = 'Удалить вложения больше чем'; +$txt['smf213'] = 'Имя Вложения'; +$txt['smf214'] = 'Размер Файла'; +$txt['smf215'] = 'Не определен максимальный размер папки'; +$txt['smf216'] = '[вложение удалено администратором]'; +$txt['smf217'] = 'Напрямую с Simple Machines...'; +$txt['smf219'] = 'Удалить Все'; +$txt['smf250'] = 'Пожалуйста, выберите Группу (группы) участников, которым вы хотите отправить Email.'; +$txt['smf281'] = 'Оптимизировать базу данных'; +$txt['smf282'] = 'Ваша база данных содержит %d таблиц.'; +$txt['smf283'] = 'Оптимизация базы данных...'; +$txt['smf284'] = 'Оптимизация %1$s... %2$f kb оптимизировано.'; +$txt['smf285'] = 'Все таблицы уже оптимизированы.'; +$txt['smf285b'] = 'Не было необходимости оптимизировать таблицы.'; +$txt['smf286'] = ' таблица(ы) прошли оптимизацию.'; +$txt['smf307'] = 'содержит не существующий ID темы'; +$txt['smf308'] = 'не содержит сообщения'; +$txt['smf309'] = 'содержит не правильное количество сообщений'; +$txt['smf310'] = 'содержит не существующий ID участника'; +$txt['smf311'] = 'Удачно вставлено спасенное сообщение в спасенную категорию'; +$txt['smf312'] = 'тема (темы) не содержащие сообщений были успешно удалены'; +$txt['smf319'] = 'Администратор должен утверждать всех новых участников'; +$txt['smf320'] = 'Внимание - agreement.txt не переписывается. Любые внесенные изменения НЕ будут сохранены'; + +$txt['dvc1'] = 'Здесь сравниваются ваши установочные файлы с последними версиями этих файлов. Если какие-либо файлы устарели, вам следует загрузить новые и обновить их до последней версии на www.simplemachines.org.'; +$txt['dvc_more'] = '(более детально)'; + +$txt['lfyi'] = 'Не возможно соединиться и получить информацию о последних обновлениях на simplemachines.org.'; + +$txt['smileys_manage'] = 'Смайлы и наборы смайлов'; +$txt['smileys_manage_info'] = 'Установить новый набор смайлов или добавить смайлы к существующим.'; +$txt['package1'] = 'Менеджер пакетов'; +$txt['package_info'] = 'Установить новые функции или изменить существующие в этом интерфейсе.'; +$txt['theme_admin'] = 'Темы и настройки внешнего вида'; +$txt['theme_admin_info'] = 'Установите и настройте ваши темы, выберите или сросьте опции в теме.'; +$txt['registration_center'] = 'Управление Регистрацией'; +$txt['registration_center_info'] = 'Зарегистрируйте, подтвердите и управляйте регистрацие участников.'; +$txt['registration_member'] = 'Зарегистрировать нового участника'; + +$txt['viewmembers_name'] = 'Имя пользователя (видимое на Форуме)'; +$txt['viewmembers_online'] = 'Последний раз был Online'; +$txt['viewmembers_today'] = 'Сегодня'; +$txt['viewmembers_day_ago'] = 'день назад'; +$txt['viewmembers_days_ago'] = 'дней назад'; + +$txt['display_name'] = 'Отображаемое имя'; +$txt['email_address'] = 'Email Адрес'; +$txt['ip_address'] = 'IP адрес'; +$txt['member_id'] = 'ID'; + +$txt['security_wrong'] = 'Попытка входа администратора!' . "\n" . + 'Обратиться: ' . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'unknown') . "\n" . + 'User agent: ' . $_SERVER['HTTP_USER_AGENT'] . "\n" . + 'IP: ' . $GLOBALS['user_info']['ip']; + +$txt['email_as_html'] = 'Отправить в формате HTML (отметив здесь, Вы сможете использовать обычный HTML в email.)'; +$txt['email_parsed_html'] = 'Добавить <br />s и &nbsp;s в сообщение.'; +$txt['email_variables'] = 'В этом сообщении Вы можете использовать "переменные ". Нажмите сюда для более подробной информации.'; +$txt['email_force'] = 'Отправить это участникам, даже если они выбрали не принимать сообщения.'; +$txt['email_as_pms'] = 'Отправить это выбранным группам участников используя Личные Сообщения.'; + +$txt['ban_title'] = 'Бан участников'; +$txt[724] = 'Забанить IP адреса: (например, 192.168.12.213 or 128.0.*.*)-один адрес в строке'; +$txt[725] = 'Забанить по email: (например, badguy@somewhere.com) - один адрес в строке +'; +$txt[7252] = 'Забанить по имени пользователей: (например, 111user) - одно имя в строке'; + +$txt['ban_description'] = 'Здесь Вы можете забанить проблемных посетителей по IP, по хосту, по имени или email.'; +$txt['ban_add_new'] = 'Добавить новый бан'; +$txt['ban_banned_entity'] = 'Забаненые значения'; +$txt['ban_on_ip'] = 'Забанить по IP (например, 192.168.10-20.*)'; +$txt['ban_on_hostname'] = 'Забанить по хосту (например, *.mil)'; +$txt['ban_on_email'] = 'Забанить по email адресу (например, *@badsite.com)'; +$txt['ban_on_username'] = 'Забанить по имени пользователя'; +$txt['ban_notes'] = 'Заметки'; +$txt['ban_restriction'] = 'Ограничение'; +$txt['ban_full_ban'] = 'Полный бан'; +$txt['ban_cannot_post'] = 'Не может  отправлять сообщения'; +$txt['ban_cannot_register'] = 'Не может  регистрироваться'; +$txt['ban_add'] = 'Добавить'; +$txt['ban_edit_list'] = 'Редактировать список банов'; +$txt['ban_type'] = 'Тип бана'; +$txt['ban_days'] = 'день(дней)'; +$txt['ban_will_expire_within'] = 'Срок бана закончится через'; +$txt['ban_expires'] = 'Заканчивается'; +$txt['ban_actions'] = 'Действия'; +$txt['ban_expiration'] = 'Окончание'; +$txt['ban_reason_desc'] = 'Причина бана, которая будет показана забанненому пользователю.'; +$txt['ban_notes_desc'] = 'Заметки, которые могут помочь другим пользователям относительно бана.';$txt['ban_remove_selected'] = 'Remove selected'; +$txt['ban_remove_selected_confirm'] = 'Are you sure you want to remove the selected bans?'; +$txt['ban_modify'] = 'Modify'; + +$txt['ban_remove_selected'] = 'Исключить выбранное'; +$txt['ban_remove_selected_confirm'] = 'Вы уверены, что хотите исключить выбранные баны?'; +$txt['ban_modify'] = 'Изменить'; + +$txt['ban_log'] = 'Лог банов'; +$txt['ban_log_description'] = 'Лог банов показывает попытки войти на форум забаненых пользователей (\'полный бан\' и \'нельзя зарегистрироваться\' только эти баны).'; +$txt['ban_log_no_entries'] = 'Не вести лог забаненых входов'; +$txt['ban_log_ip'] = 'IP'; +$txt['ban_log_email'] = 'Email адрес'; +$txt['ban_log_member'] = 'Участник'; +$txt['ban_log_date'] = 'Дата'; +$txt['ban_log_remove_all'] = 'Удалить все'; +$txt['ban_log_remove_all_confirm'] = 'Вы уверены, что хотите удалить все логи збаненых входов?'; +$txt['ban_log_remove_selected'] = 'Удалить выбранное'; +$txt['ban_log_remove_selected_confirm'] = 'Вы уверены, что хотите удалить все выбранные логи збаненых входов?'; + +$txt['apply_filter'] = 'Применить фильтр'; +$txt['applying_filter'] = 'Примененный фильтр'; +$txt['filter_only_member'] = 'Показать только сообщения об ошибках этого участника'; +$txt['filter_only_ip'] = 'Показать только сообщения об ошибках для этого IP'; +$txt['filter_only_session'] = 'Показать только сообщения об ошибках этой сессии'; +$txt['filter_only_url'] = 'Показать только сообщения об ошибках этого URL'; +$txt['filter_only_message'] = 'Показать только сообщения об ошибках одинакового содержания'; +$txt['session'] = 'Сессия'; +$txt['error_url'] = 'URL этой страницы приводит к ошибке'; +$txt['error_message'] = 'Сообщение об ошибке'; +$txt['clear_filter'] = 'Отчистить фильтр'; +$txt['remove_selection'] = 'Убрать выделение'; +$txt['remove_filtered_results'] = 'Убрать Все Результаты Фильтра'; +$txt['sure_about_errorlog_remove'] = 'Вы уверены, что хотите удалить все сообщения об ошибках?'; +$txt['reverse_direction'] = 'Изменить хронологический порядок списка'; + +$txt['settings_not_writable'] = 'Эти настройки не могут быть изменены, так как Settings.php только для чтения(CHMOD).'; + +$txt['maintain_title'] = 'Техподдержка форума'; +$txt['maintain_info'] = 'Оптимизация таблиц, создание бекапов, проверка ошибок и чистка разделов с помощью этих инструментов.'; +$txt['maintain_done'] = 'Техподдержка Закончена.'; + +$txt['maintain_general'] = 'Основная Техподдержка'; +$txt['maintain_recount'] = 'Пересчитать все форумы и статистику.'; +$txt['maintain_errors'] = 'Найти и исправить любые ошибки.'; +$txt['maintain_logs'] = 'Удалить все маловажные логи.'; +$txt['maintain_optimize'] = 'Оптимизировать все таблицы, чтобы увеличить производительность форума.'; +$txt['maintain_version'] = 'Сравнить все файлы с последними версиями.'; + +$txt['maintain_backup'] = 'Бекап Базы Данных'; +$txt['maintain_backup_struct'] = 'Сохранить структуру таблиц.'; +$txt['maintain_backup_data'] = 'Сохранить значения таблицы. (важное действие.)'; +$txt['maintain_backup_gz'] = 'Сжать файл с помощью gzip.'; +$txt['maintain_backup_save'] = 'Загрузить'; + +$txt['maintain_old'] = 'Удалить Старые Сообщения'; +$txt['maintain_old1'] = 'Удалить все темы, на которые не отвечали в течение '; +$txt['maintain_old2'] = ' дней (кроме прикрепленных тем).'; +$txt['maintain_old_all'] = 'Все Форумы'; +$txt['maintain_old_choose'] = 'Выбрать определенные форумы'; +$txt['maintain_old_remove'] = 'Удалить'; +$txt['maintain_old_confirm'] = 'Вы уверены, что хотите удалить старые сообщения?\\n\\nЭто не может быть восстановлено!'; + +$txt['db_error_send'] = 'Отправлять email, при ошибке соединения с MySQL'; +$txt['db_persist'] = 'Используйте устойчивое соединение'; + +$txt['default_language'] = 'Язык Форума По Умолчанию'; + +$txt['maintenance1'] = 'Отображаемая Тема:'; +$txt['maintenance2'] = 'Отображаемое сообщение:'; + +$txt['errlog1'] = 'Просмотреть лог ошибок Форума'; +$txt['errlog2'] = 'Лог Ошибок отслеживает каждую ошибку в форуме. Для удаления всех ошибок из базы данных поставьте галочку и нажмите кнопку ' . $txt[31] . ' внизу страницы.'; + +$txt['theme4'] = 'Настройка Темы'; +$txt['theme_current_settings'] = 'Настройка текущей темы'; + +$txt['parent_repair_found'] = 'Форум %d Не имеет существующей родительской директории (это и так родительская директория %d)'; +$txt['parent_repair_fixed'] = 'Успешно назначен зависший форум в область сохранения.'; + +$txt['repair_zeroed_ids'] = 'Найти темы или сообщения с 0 ID.'; + +$txt['dvc_your'] = 'Ваша Версия'; +$txt['dvc_current'] = 'Текущая Версия'; +$txt['dvc_sources'] = 'Sources - Источник'; +$txt['dvc_default'] = 'Шаблон По Умолчанию'; +$txt['dvc_templates'] = 'Текущий Шаблон'; +$txt['dvc_languages'] = 'Языковые Файлы'; + +$txt['modlog_view'] = 'Просмотреть лог модерирования'; +$txt['modlog_date'] = 'Дата'; +$txt['modlog_member'] = 'Участник'; +$txt['modlog_position'] = 'Место'; +$txt['modlog_action'] = 'Действие'; +$txt['modlog_ip'] = 'IP'; +$txt['modlog_search_result'] = 'Результаты Поиска'; +$txt['modlog_total_entries'] = 'Всего Значений'; +$txt['modlog_ac_banned'] = 'Забанено'; +$txt['modlog_ac_locked'] = 'Закрыто'; +$txt['modlog_ac_stickied'] = 'Прикреплено'; +$txt['modlog_ac_deleted'] = 'Стерто'; +$txt['modlog_ac_deleted_member'] = 'Удалено Участников'; +$txt['modlog_ac_removed'] = 'Удалено'; +$txt['modlog_ac_modified'] = 'Изменено'; +$txt['modlog_ac_merged'] = 'Соединено'; +$txt['modlog_ac_split'] = 'Разделено'; +$txt['modlog_ac_moved'] = 'Перемещено'; +$txt['modlog_ac_profile'] = 'Профиль РедактированProfile Edit'; +$txt['modlog_ac_pruned'] = 'Обрезано Разделов'; +$txt['modlog_ac_news'] = 'Редактировано Новостей'; +$txt['modlog_enter_comment'] = 'Введено Комментариев Модератора'; +$txt['modlog_moderation_log'] = 'Лог Модерирования'; +$txt['modlog_moderation_log_desc'] = 'Ниже приведен список всех действий выполненных модераторами Форума.
    Пожалуйста заметьте: Значения не могут быть удалены ранее, чем через 24 часа.'; +$txt['modlog_no_entries_found'] = 'Не найдено значений'; +$txt['modlog_remove'] = 'Удалить'; +$txt['modlog_removeall'] = 'Удалить Все'; +$txt['modlog_go'] = 'Вперед'; +$txt['modlog_add'] = 'Добавить'; +$txt['modlog_search'] = 'Быстрый Поиск'; +$txt['modlog_by'] = 'От'; + +$txt['smileys_default_set_for_theme'] = 'Выберите набор смайлов по умолчанию для этой Темы'; +$txt['smileys_no_default'] = '(Использовать общий набор смайлов)'; + +$txt['censor_test'] = 'Протестировать цензуру слов'; +$txt['censor_test_save'] = 'Тестировать'; +$txt['censor_case'] = 'Игнорировать регистр букв при цензуре.'; +$txt['smf231'] = 'Проверка только по целым словам.'; + +$txt['admin_confirm_password'] = '(подтвердить)'; + +$txt['date_format'] = '(ГГГГ-ММ-ДД)'; +$txt['undefined_gender'] = 'Неопределенно'; +$txt['age'] = 'Возраст пользователя'; +$txt['activation_status'] = 'Статус активации'; +$txt['activated'] = 'Активирован'; +$txt['not_activated'] = 'Не активирован'; +$txt['primary'] = 'Первичный'; +$txt['additional'] = 'Дополнительный'; +$txt['messenger_address'] = 'Messenger Address'; +$txt['wild_cards_allowed'] = 'Групповые символы * и ? разрешены'; +$txt['search_for'] = 'Искать по'; +$txt['member_part_of_these_membergroups'] = 'Участник - член этих групп участников'; +$txt['membergroups'] = 'Группы участников'; +$txt['confirm_delete_members'] = 'Вы уверены, что хотите удалить выбранных участников?'; + +$txt['support_credits_title'] = 'Поддержка и информация'; +$txt['support_credits_info'] = 'Получить техническую поддержку и информацию о версиях, чтобы решить ваши проблемы.'; +$txt['support_title'] = 'Информационная Поддержка'; +$txt['support_versions_current'] = 'Текущая версия SMF'; +$txt['support_versions_forum'] = 'Версия Форума'; +$txt['support_versions_php'] = 'Версия PHP'; +$txt['support_versions_mysql'] = 'Версия MySQL'; +$txt['support_versions_server'] = 'Версия сервера'; +$txt['support_versions_gd'] = 'Версия GD'; +$txt['support_versions'] = 'Информация о версии'; +$txt['support_latest'] = 'Общая Поддержка и Несоответствия'; +$txt['support_latest_fetch'] = 'Получение информации о поддержке...'; + +$txt['edit_permissions'] = 'Редактировать права пользователей'; +$txt['edit_permissions_info'] = 'Изменить ограниченные и доступные опции на всем форуме или в отдельных разделах.'; +$txt['membergroups_members'] = 'Пользователи Без групп'; +$txt['membergroups_guests'] = 'Незарегистрированные Гости'; +$txt['membergroups_guests_na'] = 'нет данных'; +$txt['membergroups_name'] = 'Имя пользователя'; +$txt['membergroups_stars'] = 'Звездочки'; +$txt['membergroups_members_top'] = 'Участники'; +$txt['membergroups_add_group'] = 'Добавить группу'; +$txt['membergroups_permissions'] = 'Права'; + +$txt['permitgroups_restrict'] = 'Ограниченный'; +$txt['permitgroups_standard'] = 'Стандартный'; +$txt['permitgroups_moderator'] = 'Модератор'; +$txt['permitgroups_maintenance'] = 'Техподдержка'; +$txt['permitgroups_inherit'] = 'Наследственный'; + +$txt['confirm_delete_attachments_all'] = 'Вы уверены, что хотите удалить все вложения?'; +$txt['confirm_delete_attachments'] = 'Вы уверены, что хотите удалить выбранные вложения?'; +$txt['attachment_manager_browse_files'] = 'Смотреть Файлы'; +$txt['attachment_manager_recount'] = 'Пересчитать'; +$txt['attachment_manager_avatars'] = 'Аватары'; +$txt['attachment_manager_attachments'] = 'Вложения'; +$txt['attachment_manager_last_active'] = 'Последний Активный'; +$txt['attachment_manager_member'] = 'Участник'; +$txt['attachment_manager_avatars_older'] = 'Удалить аватары участников неактивных в течение более чем'; +$txt['attachment_manager_total_avatars'] = 'Всего Аватаров'; + +$txt['editnews_clickadd'] = 'Кликните сюда, чтобы добавить еще окошко.'; +$txt['editnews_remove_selected'] = 'Убрать выбранные'; +$txt['editnews_remove_confirm'] = 'Вы уверены, что хотите удалить выбранные новости?'; +$txt['censor_clickadd'] = 'Кликните сюда, чтобы добавить другое слово.'; +$txt['update_available'] = 'Обновление доступно!'; +$txt['update_message'] = 'Вы используете устаревшую версию форума SMF, содержащую ошибки и баги, которые были в устранены в более новой версии. + Рекомендуется скачать файлы новой версии форума и обновить версию как можно скорее. Это займёт у вас не более минуты!'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Errors.english.php b/Themes/default/languages/Errors.english.php new file mode 100644 index 0000000..33f55f9 --- /dev/null +++ b/Themes/default/languages/Errors.english.php @@ -0,0 +1,243 @@ +register.'; +$txt[213] = 'Passwords aren\'t the same.'; +$txt[223] = 'Sorry, you must register before using this feature.'; +$txt[241] = 'Invalid character used in Password.'; +$txt[242] = 'Invalid character used in Name.'; +$txt[243] = 'Invalid character used in email.'; +$txt[244] = 'The username you tried to use contains the reserved name \'%s\'. Please try another username.'; +$txt[337] = 'This field only accepts numbers from 0-9'; +$txt[472] = 'This topic doesn\'t exist on this board.'; + +$txt['smf26'] = 'You didn\'t select a vote option.'; +$txt['smf27'] = 'Either that poll doesn\'t exist, the poll has been locked, or you tried to vote twice.'; +$txt['smf28'] = 'This option is only available to registered members.'; +$txt['smf31'] = 'This was locked by an administrator. You cannot unlock it.'; +$txt['smf61'] = 'Sorry, you are not permitted to modify your own karma.'; +$txt['smf63'] = 'Sorry, this feature is disabled.'; +$txt['smf115b'] = 'Cannot access attachments upload path!'; +$txt['smf122'] = 'Your file is too large. The maximum attachment size allowed is %d KB.'; +$txt['smf124'] = 'Your attachment couldn\'t be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.

    Please consult your server administrator for more information.'; +$txt['smf125'] = 'Sorry! There is already an attachment with the same filename as the one you tried to upload. Please rename the file and try again.'; +$txt['smf126'] = 'The upload folder is full. Please try a smaller file and/or contact an administrator.'; +$txt['smf191'] = 'Could not connect to server or could not find file'; +$txt['smf253'] = 'You are not allowed to split topics'; +$txt['smf232'] = 'The board you specified doesn\'t exist'; +$txt['smf262'] = 'You are not allowed to merge topics'; +$txt['smf263'] = 'You specified an invalid topic ID.'; +$txt['smf268'] = 'You cannot split a topic at the first post.'; +$txt['smf270'] = 'This topic only contains one message and cannot be split.'; +$txt['smf271'] = 'no messages selected'; +$txt['smf271b'] = 'Unable to split. You have selected every message.'; +$txt['smf272'] = 'Unable to find messages'; +$txt['smf273'] = 'Unable to insert topic'; +$txt['smf289'] = 'You have chosen a username of an already existing moderator. Please choose another username'; +$txt['smf304'] = 'Your session timed out while posting. Please go back and try again.'; +$txt['smf305'] = 'Session verification failed. Please try logging out and back in again, and then try again.'; +$txt['smf306'] = 'Unable to verify referring url. Please go back and try again.'; + +$txt['cannot_admin_forum'] = 'You are not allowed to administrate this forum.'; +$txt['cannot_calendar_edit_any'] = 'You cannot edit calendar events.'; +$txt['cannot_calendar_edit_own'] = 'You don\'t have the privileges necessary to edit your own events.'; +$txt['cannot_calendar_post'] = 'Event posting isn\'t allowed - sorry.'; +$txt['cannot_calendar_view'] = 'Sorry, but you are not allowed to view the calendar.'; +$txt['cannot_delete_any'] = 'Sorry, but you don\'t have the privilege to remove just any topic.'; +$txt['cannot_delete_own'] = 'You cannot delete your own topics in this board.'; +$txt['cannot_edit_news'] = 'You are not allowed to edit news items on this forum.'; +$txt['cannot_pm_read'] = 'Sorry, you can\'t read your personal messages.'; +$txt['cannot_pm_send'] = 'You are not allowed to send personal messages.'; +$txt['cannot_karma_edit'] = 'You aren\'t permitted to modify other people\'s karma.'; +$txt['cannot_lock_any'] = 'You are not allowed to lock just any topic here.'; +$txt['cannot_lock_own'] = 'Apologies, but you cannot lock your own topics here.'; +$txt['cannot_make_sticky'] = 'You don\'t have permission to sticky this topic.'; +$txt['cannot_manage_attachments'] = 'You\'re not allowed to manage attachments or avatars.'; +$txt['cannot_manage_bans'] = 'You\'re not allowed to change the list of bans.'; +$txt['cannot_manage_boards'] = 'You are not allowed to manage boards and categories.'; +$txt['cannot_manage_membergroups'] = 'You don\'t have permission to modify or assign membergroup.'; +$txt['cannot_manage_permissions'] = 'You don\'t have permission to manage permissions.'; +$txt['cannot_manage_smileys'] = 'You\'re not allowed to manage smileys.'; +$txt['cannot_mark_any_notify'] = 'You don\'t have the permissions necessary to get notifications from this topic.'; +$txt['cannot_mark_notify'] = 'Sorry, but you are not permitted to request notifications from this board.'; +$txt['cannot_merge_any'] = 'You aren\'t allowed to merge topics on one of the selected board(s).'; +$txt['cannot_moderate_forum'] = 'You are not allowed to moderate this forum.'; +$txt['cannot_modify_any'] = 'You aren\'t allowed to modify just any post.'; +$txt['cannot_modify_own'] = 'Sorry, but you aren\'t allowed to edit your own posts.'; +$txt['cannot_modify_replies'] = 'Even though this post is a reply to your topic, you cannot edit it.'; +$txt['cannot_move_any'] = 'You are not allowed to move topics in this board.'; +$txt['cannot_poll_add_own'] = 'Sorry, you aren\'t allowed to add polls to your own topics in this board.'; +$txt['cannot_poll_add_any'] = 'You don\'t have the access to add polls to this topic.'; +$txt['cannot_poll_edit_own'] = 'You cannot edit this poll, even though it is your own.'; +$txt['cannot_poll_edit_any'] = 'You have been denied access to editing polls in this board.'; +$txt['cannot_poll_lock_own'] = 'You are not allowed to lock your own polls in this board.'; +$txt['cannot_poll_lock_any'] = 'Sorry, but you aren\'t allowed to lock just any poll.'; +$txt['cannot_poll_post'] = 'You aren\'t allowed to post polls in the current board.'; +$txt['cannot_poll_remove_own'] = 'You are not permitted to remove this poll from your topic.'; +$txt['cannot_poll_remove_any'] = 'You cannot remove just any poll on this board.'; +$txt['cannot_poll_view'] = 'You are not allowed to view polls in this board.'; +$txt['cannot_poll_vote'] = 'Sorry, but you cannot vote in polls in this board.'; +$txt['cannot_post_attachment'] = 'You don\'t have permission to post attachments here.'; +$txt['cannot_post_new'] = 'Sorry, you cannot post new topics in this board.'; +$txt['cannot_post_reply_any'] = 'You are not permitted to post replies to topics on this board.'; +$txt['cannot_post_reply_own'] = 'You are not allowed to post replies even to your own topics in this board.'; +$txt['cannot_profile_remove_own'] = 'Sorry, but you aren\'t allowed to delete your own account.'; +$txt['cannot_profile_remove_any'] = 'You don\'t have the permissions to go about removing people\'s accounts!'; +$txt['cannot_profile_extra_any'] = 'You are not permitted to modify profile settings.'; +$txt['cannot_profile_identity_any'] = 'You aren\'t allowed to edit account settings.'; +$txt['cannot_profile_title_any'] = 'You cannot edit people\'s custom titles.'; +$txt['cannot_profile_extra_own'] = 'Sorry, but you don\'t have the necessary permissions to edit your profile data.'; +$txt['cannot_profile_identity_own'] = 'You can\'t change your identity at the current moment.'; +$txt['cannot_profile_title_own'] = 'You are not allowed to change your custom title.'; +$txt['cannot_profile_remote_avatar'] = 'You don\'t have the privilege of using a remote avatar.'; +$txt['cannot_profile_view_own'] = 'Many apologies, but you can\'t view your own profile.'; +$txt['cannot_profile_view_any'] = 'Many apologies, but you can\'t view just any profile.'; +$txt['cannot_remove_own'] = 'You are not, on this board, allowed to delete your own posts.'; +$txt['cannot_remove_replies'] = 'Sorry, but you cannot remove these posts, even though they are replies to your topic.'; +$txt['cannot_remove_any'] = 'Deleting just any posts in this board is not allowed.'; +$txt['cannot_report_any'] = 'You are not allowed to report posts in this board.'; +$txt['cannot_search_posts'] = 'You are not allowed to search for posts in this forum.'; +$txt['cannot_send_mail'] = 'You don\'t have the privilege of sending out emails to everyone.'; +$txt['cannot_send_topic'] = 'Sorry, but the administrator has disallowed sending topics on this board.'; +$txt['cannot_split_any'] = 'Splitting just any topic is not allowed in this board.'; +$txt['cannot_view_attachments'] = 'It seems that you are not allowed to download or view attachments on this board.'; +$txt['cannot_view_mlist'] = 'You can\'t view the memberlist because you don\'t have permission to.'; +$txt['cannot_view_stats'] = 'You aren\'t allowed to view the forum statistics.'; +$txt['cannot_who_view'] = 'Sorry - you don\'t have the proper permissions to view the Who\'s Online list.'; + +$txt['theme3'] = 'That theme does not exist.'; +$txt['theme_dir_wrong'] = 'The default theme\'s directory is wrong, please correct it by clicking this text.'; +$txt['search_no_boards'] = 'No valid boards were selected!'; +$txt['registration_disabled'] = 'Sorry, registration is currently disabled.'; +$txt['registration_no_secret_question'] = 'Sorry, there is no secret question set for this member.'; +$txt['poll_range_error'] = 'Sorry, the poll must run for more than 0 days.'; +$txt['delFirstPost'] = 'You are not allowed to delete the first post in a topic.

    If you want to delete this topic, click on the Remove Topic link, or ask a moderator/administrator to do it for you.

    '; +$txt['parent_error'] = 'Unable to create board!'; +$txt['login_cookie_error'] = 'You were unable to login. Please check your cookie settings.'; +$txt['previous_next_end'] = 'You\'ve reached the end of the topics. You can\'t go any farther.'; +$txt['pswd7'] = 'Sorry, but you did not answer your question correctly. Please click back to try again, or click back twice to use the default method of obtaining your password.'; +$txt['rtm11'] = 'No moderators found!'; +$txt['parent_not_found'] = 'Board structure corrupt: unable to find parent board'; + +$txt['calendar_off'] = 'You cannot access the calendar right now because it is disabled.'; +$txt['calendar1'] = 'Invalid month value.'; +$txt['calendar2'] = 'Invalid year value.'; +$txt['calendar7'] = 'Event month is missing.'; +$txt['calendar8'] = 'Event year is missing.'; +$txt['calendar14'] = 'Event day is missing.'; +$txt['calendar15'] = 'Event title is missing.'; +$txt['calendar16'] = 'Invalid date.'; +$txt['calendar17'] = 'No event title was entered.'; +$txt['calendar18'] = 'Missing event ID.'; +$txt['calendar19'] = 'You do not have permission to edit this event.'; +$txt['calendar38'] = 'Board ID is missing.'; +$txt['calendar39'] = 'Topic ID is missing.'; +$txt['calendar40'] = 'Topic doesn\'t exist.'; +$txt['calendar41'] = 'You are not the owner of this topic.'; +$txt['calendar42'] = 'The board does not exist.'; +$txt['calendar55'] = 'The span feature is currently disabled.'; +$txt['calendar56'] = 'Invalid number of days to span.'; + +$txt['moveto_noboards'] = 'There are no boards to move this topic to!'; + +$txt['already_activated'] = 'Your account has already been activated.'; + +$txt['invalid_email'] = 'Invalid email address / email address range.
    Example of a valid email address: evil.user@badsite.com.
    Example of a valid email address range: *@*.badsite.com'; +$txt['invalid_expiration_date'] = 'Expiration date is not valid'; +$txt['invalid_hostname'] = 'Invalid host name / host name range.
    Example of a valid host name: proxy4.badhost.com
    Example of a valid host name range: *.badhost.com'; +$txt['invalid_ip'] = 'Invalid IP / IP range.
    Example of a valid IP address: 127.0.0.1
    Example of a valid IP range: 127.0.0-20.*'; +$txt['invalid_username'] = 'Member name not found'; +$txt['no_ban_admin'] = 'You may not ban an admin - You must demote them first!'; +$txt['no_bantype_selected'] = 'No ban type was selected'; +$txt['ban_not_found'] = 'Ban not found'; +$txt['ban_unknown_restriction_type'] = 'Restriction type unknown'; + +$txt['recycle_no_valid_board'] = 'No valid board selected for recycle topics'; + +$txt['login_threshold_fail'] = 'Sorry, you are out of login chances. Please come back and try again later.'; + +$txt['who_off'] = 'You cannot access Who\'s Online right now because it is disabled.'; + +$txt['merge_create_topic_failed'] = 'Error creating a new topic.'; +$txt['merge_need_more_topics'] = 'Merge topics require at least two topics to merge.'; + +$txt['spamWaitTime_broken'] = 'The last posting from your IP was less than %d seconds ago. Please try again later.'; +$txt['registerWaitTime_broken'] = 'You already registered just %d seconds ago!'; +$txt['loginWaitTime_broken'] = 'You will have to wait about %d seconds to login again, sorry.'; + +$txt['no_valid_search_string'] = 'Did you forget to put something to search for?'; +$txt['topic_gone'] = 'The topic or board you are looking for appears to be either missing or off limits to you.'; +$txt['theme_edit_missing'] = 'The file you are trying to edit... can\'t even be found!'; + +$txt['attachments_no_write'] = 'The attachments upload directory is not writable. Your attachment or avatar cannot be saved.'; +$txt['attachments_limit_per_post'] = 'You may not upload more than %d attachments per post'; + +$txt['rtm_not_own'] = 'You can\'t report your own post to the moderator, that doesn\'t make sense!'; + +$txt['no_dump_database'] = 'Only administrators can make database backups!'; +$txt['pm_not_yours'] = 'The personal message you\'re trying to quote is not your own or does not exist, please go back and try again.'; +$txt['mangled_post'] = 'Mangled form data - please go back and try again.'; + +$txt['error_while_submitting'] = 'The following error or errors occurred while posting this message:'; +$txt['error_long_name'] = 'The name you tried to use was too long.'; +$txt['error_no_name'] = 'No name was provided.'; +$txt['error_bad_name'] = 'The name you submitted cannot be used, because it is or contains a reserved name.'; +$txt['error_no_email'] = 'No email address was provided.'; +$txt['error_bad_email'] = 'An invalid email address was given.'; +$txt['error_no_event'] = 'No event name has been given.'; +$txt['error_no_subject'] = 'No subject was filled in.'; +$txt['error_no_question'] = 'No question was filled in for this poll.'; +$txt['error_no_message'] = 'The message body was left empty.'; +$txt['error_long_message'] = 'The message exceeds the maximum allowed length (' . $modSettings['max_messageLength'] . ' characters).'; +$txt['error_session_timeout'] = 'Your session timed out while posting. Please try to re-submit your message.'; +$txt['error_no_to'] = 'No recipients specified.'; +$txt['error_bad_to'] = 'One or more \'to\'-recipients could not be found.'; +$txt['error_bad_bcc'] = 'One or more \'bcc\'-recipients could not be found.'; +$txt['error_form_already_submitted'] = 'You already submitted this post! You might have accidently double clicked, or tried to refresh.'; +$txt['error_poll_few'] = 'You must have at least two choices!'; + +$txt['smiley_not_found'] = 'Smiley not found.'; +$txt['smiley_has_no_code'] = 'No code for this smiley was given.'; +$txt['smiley_has_no_filename'] = 'No filename for this smiley was given.'; +$txt['smiley_not_unique'] = 'A smiley with that code already exists.'; +$txt['smiley_set_already_exists'] = 'A smiley set with that URL already exists'; +$txt['smiley_set_not_found'] = 'Smiley set not found'; +$txt['smiley_set_path_already_used'] = 'The URL of the smiley set is already being used by another smiley set.'; +$txt['smiley_set_unable_to_import'] = 'Unable to import smiley set. Either the directory is invalid or cannot be accessed.'; + +$txt['smileys_upload_error'] = 'Failed to upload file.'; +$txt['smileys_upload_error_blank'] = 'All smiley sets must have an image!'; +$txt['smileys_upload_error_name'] = 'All smileys must have the same filename!'; +$txt['smileys_upload_error_illegal'] = 'Illegal Type.'; + +$txt['search_invalid_weights'] = 'Search weights are not properly configured. At least one weight should be configure to be non-zero. Please report this error to an administrator.'; +$txt['unable_to_create_temporary'] = 'Search was unable to create temporary tables. Please report this error to an administrator.'; + +$txt['package_no_file'] = 'Unable to find package file!'; +$txt['packageget_unable'] = 'Unable to connect to the server. Please try using this URL instead.'; +$txt['not_on_simplemachines'] = 'Sorry, packages can only be downloaded like this from the simplemachines.org server.'; +$txt['package_cant_uninstall'] = 'This package was either never installed or was already uninstalled - you can\'t uninstall it now.'; +$txt['package_cant_download'] = 'You cannot download or install new packages because the Packages directory is not writable!'; +$txt['package_upload_error'] = 'Could not upload package, please check directory permissions!'; +$txt['package_upload_error_exists'] = 'The file you are uploading already exists on the server. Please delete it first then try again.'; + +$txt['no_membergroup_selected'] = 'No membergroup selected'; + +$txt['attachment_not_found'] = 'Attachment Not Found'; + +$txt['cannot_karmalog_view'] = 'Sorry - you don\'t have the proper permissions to view the Karma Description list.'; +$txt['viewkarma_error'] = 'User ID must be a number'; +$txt['karma_not_topic_starter'] = 'Sorry, he is not topic author.'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Errors.russian.php b/Themes/default/languages/Errors.russian.php new file mode 100644 index 0000000..0c53978 --- /dev/null +++ b/Themes/default/languages/Errors.russian.php @@ -0,0 +1,245 @@ +сделайте это сейчас .'; +$txt[213] = 'Пароли не одинаковы.'; +$txt[223] = 'Извините, перед тем, как использовать эти настройки вы должны зарегистрироваться.'; +$txt[241] = 'Использован недопустимый символ в Пароле.'; +$txt[242] = 'Использован недопустимый символ в Имени.'; +$txt[243] = 'Использован недопустимый символ в Email.'; +$txt[244] = 'Имя пользователя, которое вы пытаетесь зарегистрировать - зарезервировано \'%s\'. Пожалуйста, выберите другое имя.'; +$txt[337] = 'В этом поле можно указывать только числа от 0 до 9'; +$txt[472] = 'Эта тема не существует в этом форуме.'; +$txt[568] = 'Пожалуйста, напишите свое имя покороче. Оно слишком длинное ;)'; + +$txt['smf26'] = 'Вы не выбрали, за что голосовать.'; +$txt['smf27'] = 'Опрос или не существует, или закрыт, или Вы пытаетесь проголосовать дважды.'; +$txt['smf28'] = 'Эта опция доступна только зарегистрированным участникам.'; +$txt['smf31'] = 'Было закрыто администратором. Вы не можете открыть.'; +$txt['smf61'] = 'Извините, но Вы не можете изменять собственную репутацию.'; +$txt['smf63'] = 'Извините, эта опция отключена.'; +$txt['smf115b'] = 'Нет доступа к пути загрузки вложений!'; +$txt['smf122'] = 'Ваш файл слишком большой. Максимальный размер вложения должен быть не более %d KB.'; +$txt['smf124'] = 'Ваше вложение не может быть сохранено. Либо загружается очень долго, либо файл больше, чем позволяет сервер.

    Пожалуйста, проконсультируйтесь с администратором для более подробной информации.'; +$txt['smf125'] = 'Извините! Такой файл уже существует. Пожалуйста, переименуйте файл и попробуйте снова.'; +$txt['smf126'] = 'Папка upload заполнена. Попробуйте файл меньшего размера или свяжитесь с администратором.'; +$txt['smf191'] = 'Не получилось соединиться с сервером или файл не найден'; +$txt['smf253'] = 'Вы не можете разделять темы'; +$txt['smf232'] = 'Указанный Вами форум не существует'; +$txt['smf262'] = 'Вы не можете соединять темы'; +$txt['smf263'] = 'Вы указали не правильный ID темы.'; +$txt['smf268'] = 'Вы не можете разделять тему с первого сообщения.'; +$txt['smf270'] = 'Эта тема содержит только одно сообщение и не может быть разделена.'; +$txt['smf271'] = 'не выбраны сообщения'; +$txt['smf271b'] = 'Невозможно разделить. Вы выбрали все сообщения.'; +$txt['smf272'] = 'Невозможно найти сообщения'; +$txt['smf273'] = 'Невозможно вставить тему'; +$txt['smf289'] = 'Вы выбрали имя пользователя существующего Модератора. Пожалуйста выберите другое.'; +$txt['smf304'] = 'Ваша сессия закончилась, за время написания сообщения. Вернитесь назад и попробуйте снова.'; +$txt['smf305'] = 'Проверка сессии провалилась. Пожалуйста, выйдите из форума и зайдите снова, и попробуйте заново.'; +$txt['smf306'] = 'Не возможно проверить отсылаемое месторасположение. Пожалуйста, вернитесь назад и попробуйте снова.'; + +$txt['cannot_admin_forum'] = 'Вы не можете администрировать этот Форум.'; +$txt['cannot_calendar_edit_any'] = 'Вы не можете редактировать календарные события.'; +$txt['cannot_calendar_edit_own'] = 'У вас нет необходимых привилегий, чтобы редактировать ваши события.'; +$txt['cannot_calendar_post'] = 'Размещение событий запрещено, извините.'; +$txt['cannot_calendar_view'] = 'Извините, но вы не можете просматривать календарь.'; +$txt['cannot_delete_any'] = 'Извините, но у Вас нет привилегий удалять любые темы.'; +$txt['cannot_delete_own'] = 'Вы не можете удалять собственные темы на форуме.'; +$txt['cannot_edit_forum'] = 'Вы не можете администрировать форум.'; +$txt['cannot_edit_news'] = 'Вы не можете редактировать новости на этом форуме.'; +$txt['cannot_pm_read'] = 'Извините, Вы не можете читать личные сообщения.'; +$txt['cannot_pm_send'] = 'Вы не можете отправлять личные сообщения.'; +$txt['cannot_karma_edit'] = 'Вы не можете изменять репутации других людей.'; +$txt['cannot_lock_any'] = 'Вы не можете закрывать любую тему здесь.'; +$txt['cannot_lock_own'] = 'Извините, но Вы не можете закрывать Ваши темы здесь.'; +$txt['cannot_make_sticky'] = 'Вы не можете прикрепить эту тему.'; +$txt['cannot_manage_attachments'] = 'Вам не разрешается управлять вложениями или аватарами.'; +$txt['cannot_manage_bans'] = 'Вам не позволено менять список банов.'; +$txt['cannot_manage_boards'] = 'Вам не позволено управлять разделами и категориями.'; +$txt['cannot_manage_membergroups'] = 'У вас нет права для изменения или добавления групп пользователей.'; +$txt['cannot_manage_permissions'] = 'У вас нет права для управления правами пользователей.'; +$txt['cannot_manage_smileys'] = 'Вам не позволено управлять смайлами.'; +$txt['cannot_mark_any_notify'] = 'У вас нет необходимого разрешения получать извещения от этой темы.'; +$txt['cannot_mark_notify'] = 'Извините, но Вам не разрешено получать извещения из этого раздела.'; +$txt['cannot_merge_any'] = 'Вы не можете соединять темы на выбранном форуме (форумах).'; +$txt['cannot_moderate_forum'] = 'Вы не можете модерировать этот форум.'; +$txt['cannot_modify_any'] = 'Вы не можете модерировать любое сообщение.'; +$txt['cannot_modify_own'] = 'Извините, но Вы не можете редактировать Ваши сообщения.'; +$txt['cannot_modify_replies'] = 'Даже если это сообщение ответ в Вашей теме, вы не можете редактировать его.'; +$txt['cannot_move_any'] = 'Вы не можете перемещать темы в этом форуме.'; +$txt['cannot_poll_add_own'] = 'Извините, но вы не можете добавлять опросы в Вашей теме на этом форуме.'; +$txt['cannot_poll_add_any'] = 'У вас нет доступа к добавлению опроса в этой теме.'; +$txt['cannot_poll_edit_own'] = 'Вы не можете редактировать опрос, даже если это Ваше собственное.'; +$txt['cannot_poll_edit_any'] = 'Вам отказано в доступе к редактированию опросов в этом форуме.'; +$txt['cannot_poll_lock_own'] = 'Вы не можете закрывать свои опросы на этом форуме.'; +$txt['cannot_poll_lock_any'] = 'Извините, но вы не можете закрывать любой опрос.'; +$txt['cannot_poll_post'] = 'Вы не можете создавать опросы в этом разделе.'; +$txt['cannot_poll_remove_own'] = 'Вам не разрешено удалить опрос из вашей темы.'; +$txt['cannot_poll_remove_any'] = 'Вы не можете удалять любой опрос в этом разделе.'; +$txt['cannot_poll_view'] = 'Вы не можете просматривать опросы в этом разделе.'; +$txt['cannot_poll_vote'] = 'Извините, но Вы не можете голосовать в этом разделе.'; +$txt['cannot_post_attachment'] = 'У Вас нет разрешения вставлять вложения здесь.'; +$txt['cannot_post_new'] = 'Извините, но вы не можете создавать новые темы в этом разделе.'; +$txt['cannot_post_reply_any'] = 'Вы не можете отвечать в темах на этом разделе.'; +$txt['cannot_post_reply_own'] = 'Вы не можете отвечать даже в Ваших собственных темах в этом разделе.'; +$txt['cannot_profile_remove_own'] = 'Извините, но Вам не позволено удалять собственный аккаунт.'; +$txt['cannot_profile_remove_any'] = 'У Вас нет права удаления чужих аккаунтов!'; +$txt['cannot_profile_extra_any'] = 'Вам не разрешено изменять настройки профиля.'; +$txt['cannot_profile_identity_any'] = 'Вам не разрешено редактировать настройки аккаунта.'; +$txt['cannot_profile_title_any'] = 'Вы не можете редактировать заголовок профиля людей.'; +$txt['cannot_profile_extra_own'] = 'Извините, но у Вас нет достаточных прав, чтобы редактировать Ваши данные в профиле.'; +$txt['cannot_profile_identity_own'] = 'Вы не можете изменять Вашу личность в данный момент.'; +$txt['cannot_profile_title_own'] = 'Вы не можете изменять Ваш заголовок профиля.'; +$txt['cannot_profile_remote_avatar'] = 'У Вас нет привилегии использования удаленного аватора.'; +$txt['cannot_profile_view_own'] = 'Тыща извинений, но Вы не можете посмотреть свой профиль.'; +$txt['cannot_profile_view_any'] = 'Тыща извинений, но вы не можете посмотреть никакой профиль.'; +$txt['cannot_remove_own'] = 'Вы не на том форуме, где можно удалять свои сообщения.'; +$txt['cannot_remove_replies'] = 'Извините, но Вы не можете удалять сообщения, даже если они являются ответами в Вашей теме.'; +$txt['cannot_remove_any'] = 'Удаление любых сообщений в этом форуме запрещено.'; +$txt['cannot_report_any'] = 'Вы не можете сообщать о сообщениях в этом форуме.'; +$txt['cannot_search_posts'] = 'Вы не можете искать сообщения в этом форуме.'; +$txt['cannot_send_mail'] = 'У Вас нет привилегии отправлять email любому.'; +$txt['cannot_send_topic'] = 'Извините, но администратор отключил отправку темы на этом форуме.'; +$txt['cannot_split_any'] = 'Разделение любых тем на этом форуме запрещено.'; +$txt['cannot_view_attachments'] = 'По-видимому, вам не позволено скачивать или просматривать вложения на этом форуме.'; +$txt['cannot_view_mlist'] = 'Вы не можете посмотреть список участников, так как у Вас нет разрешения.'; +$txt['cannot_view_stats'] = 'Вам не позволено смотреть статистику Форума.'; +$txt['cannot_who_view'] = 'Извините, но у Вас нет необходимого разрешения, что бы смотреть, кто Online.'; + +$txt['theme3'] = 'Эта Тема не существует.'; +$txt['theme_dir_wrong'] = 'Директория темы по умолчанию неправильна, пожалуйста, исправте ее нажав на этот текст.'; +$txt['search_no_boards'] = 'Не выбраны действующие форумы!'; +$txt['registration_disabled'] = 'Извините, но регистрация сейчас отключена.'; +$txt['registration_no_secret_question'] = 'Извинити, но для этого пользователя не выбран сикретный вопрос.'; +$txt['poll_range_error'] = 'Извините, опрос должен длиться больше 0 дней.'; +$txt['delFirstPost'] = 'Вы не можете удалить первое сообщение в теме.

    Если вы хотите удалить эту тему, нажмите ссылку удалить тему или попросите администратора/модератора сделать это за вас.

    '; +$txt['parent_error'] = 'Не получилось создать форум!'; +$txt['login_cookie_error'] = 'Не получилось войти. Пожалуйста, проверьте настройки cookie.'; +$txt['previous_next_end'] = 'Вы дошли до конца списка.'; +$txt['pswd7'] = 'Извините, но вы не ответили правильно на Ваш вопрос. Нажмите назад и попробуйте снова, или нажмите Назад дважды, чтобы использовать обычный метод получения пароля.'; +$txt['rtm11'] = 'Не найдены модераторы!'; +$txt['parent_not_found'] = 'Структура раздела испорчена: не получилось найти родительский форум'; + +$txt['calendar_off'] = 'Вы не можете попасть на календарь сейчас, так как он отключен.'; +$txt['calendar1'] = 'Неправильное значение месяца.'; +$txt['calendar2'] = 'Неправильное значение года.'; +$txt['calendar7'] = 'Пропущен месяц события.'; +$txt['calendar8'] = 'Пропущен год события.'; +$txt['calendar14'] = 'Пропущен день события.'; +$txt['calendar15'] = 'Пропущен заголовок события.'; +$txt['calendar16'] = 'Неправильная дата.'; +$txt['calendar17'] = 'Не введен заголовок события.'; +$txt['calendar18'] = 'Пропущен ID события.'; +$txt['calendar19'] = 'У вас нет права редактирования этого события.'; +$txt['calendar38'] = 'ID раздела пропущен.'; +$txt['calendar39'] = 'ID темы пропущен.'; +$txt['calendar40'] = 'Тема не существует.'; +$txt['calendar41'] = 'Вы не являетесь владельцем этой темы.'; +$txt['calendar42'] = 'Форум не существует.'; +$txt['calendar55'] = 'Возможность временного диапазона отключена.'; +$txt['calendar56'] = 'Неправильное количество дней временного диапазона.'; + +$txt['moveto_noboards'] = 'Нет форума для перемещения туда этой темы!'; + +$txt['already_activated'] = 'Ваш аккаунт уже активирован.'; + +$txt['invalid_email'] = 'Не правильный email адрес или диапазон адресов email.
    Пример правильного email адреса: evil.user@badsite.com.
    Пример правильного диапазона адресов email: *@*.badsite.com'; +$txt['invalid_expiration_date'] = 'Дата окончания не подходящая'; +$txt['invalid_hostname'] = 'Неправильное имя хоста или диапазона имен хостов.
    Пример правильного имени хоста: proxy4.badhost.com
    Пример правильного диапазона имен хостов: *.badhost.com'; +$txt['invalid_ip'] = 'Неправильный IP или диапазон IP.
    Пример правильного IP адреса: 127.0.0.1
    Пример правильного диапазона IP адресов: 127.0.0-20.*'; +$txt['invalid_username'] = 'Имя участника не найдено'; +$txt['no_ban_admin'] = 'Вы не можете забанить админа, Вы должны сначала понизить его звание!'; +$txt['no_bantype_selected'] = 'Не выбран тип бана'; +$txt['ban_not_found'] = 'Бан не найден'; +$txt['ban_unknown_restriction_type'] = 'Тип запрета не известен'; + +$txt['recycle_no_valid_board'] = 'Не выбран действующий форум для удаления темы'; + +$txt['login_threshold_fail'] = 'Извините, но у Вас нет возможности для входа. Пожалуйста, попробуйте позже.'; + +$txt['who_off'] = 'Вы не можете получить доступ к просмотру тех Кто Online прямо сейчас, так как эта функция выключена.'; + +$txt['merge_create_topic_failed'] = 'Ошибка при создании новой темы.'; +$txt['merge_need_more_topics'] = 'Соединение тем требует наличия, по крайней мере, двух тем для соединения.'; + +$txt['spamWaitTime_broken'] = 'Последнее сообщение было отправлено с Вашего IP меньше чем %d секунд назад. Пожалуйста, попробуйте заново позже.'; +$txt['registerWaitTime_broken'] = 'Вы уже зарегистрировались %d секунд назад!'; +$txt['loginWaitTime_broken'] = 'Вам придется подождать около %d секунд, чтобы войти заново, извините.'; + +$txt['no_valid_search_string'] = 'Вы забыли ввести что-то для поиска?'; +$txt['topic_gone'] = 'Тема или форум, которую вы ищите или отсутствует, или запрещена для входа.'; +$txt['theme_edit_missing'] = 'Файл, который вы пытаетесь редактировать, даже не найден!'; + +$txt['attachments_no_write'] = 'Папка для вложений не записываема. Ваше вложение или аватар не может быть сохранен.'; + +$txt['attachments_limit_per_post'] = 'Вы не можете загружать больше %d вложений в одном сообщении'; + +$txt['rtm_not_own'] = 'Вы не можете сообщать о ваших собственных сообщениях модератору. В этом нет смысла!!!'; + +$txt['no_dump_database'] = 'Только администратор может делать бекапы базы данных!'; +$txt['pm_not_yours'] = 'Личное сообщение, которое Вы пытаетесь процетировать не ваше или его не существует, пожалуйста, вернитесь назад и попробуйте снова.'; +$txt['mangled_post'] = 'Что-то с датой, пожалуйста, вернитесь и попробуйте заново.'; + +$txt['error_while_submitting'] = 'Следующие ошибки произошли во время написания сообщения:'; +$txt['error_long_name'] = 'Имя, которое Вы пытались использовать слишком длинное.'; +$txt['error_no_name'] = 'Никакое имя не было предоставлено.'; +$txt['error_bad_name'] = 'Имя, которым Вы подписались, не может быть использовано, так как содержит зарезервированное имя.'; +$txt['error_no_email'] = 'Не предоставлен Email адрес.'; +$txt['error_bad_email'] = 'Неправильный Email адрес был дан.'; +$txt['error_no_event'] = 'Не было дано название события.'; +$txt['error_no_subject'] = 'Тема не была заполнена.'; +$txt['error_no_question'] = 'Не было задано вопроса в этом опросе.'; +$txt['error_no_message'] = 'Сообщение было оставлено пустым.'; +$txt['error_long_message'] = 'Сообщение превышает максимально допустимую длину (' . $modSettings['max_messageLength'] . ' букв).'; +$txt['error_session_timeout'] = 'Ваша сессия истекла во время письма. Пожалуйста, попробуйте вставить заново ваше сообщение.'; +$txt['error_no_to'] = 'Не были обозначены получатели.'; +$txt['error_bad_to'] = 'Один или несколько \'to\'-получателей не найдены.'; +$txt['error_bad_bcc'] = 'Один или несколько \'bcc\'-получателей не найдены.'; +$txt['error_form_already_submitted'] = 'Вы уже вставили это сообщение! Возможно, Вы случайно нажали дважды или пытались обновить страницу.'; +$txt['error_poll_few'] = 'Должно быть как минимум две возможности для выбора!'; + +$txt['smiley_not_found'] = 'Смайл не найден.'; +$txt['smiley_has_no_code'] = 'Этому смайлу не был присвоен код.'; +$txt['smiley_has_no_filename'] = 'Не был назван файл этого смайла.'; +$txt['smiley_not_unique'] = 'Смайл с таким кодом уже существует.'; +$txt['smiley_set_already_exists'] = 'Набор смайлов с таким URL уже существует'; +$txt['smiley_set_not_found'] = 'Набор смайлов не найден'; +$txt['smiley_set_path_already_used'] = 'URL набора смайлов уже использовался другим набором смайлов.'; +$txt['smiley_set_unable_to_import'] = 'Невозможно импортировать набор смайлов. Или директория неправильная, или к ней нет доступа.'; + +$txt['smileys_upload_error'] = 'Не получилось загрузить файлы.'; +$txt['smileys_upload_error_blank'] = 'Все наборы смайлов должны иметь картинку!'; +$txt['smileys_upload_error_name'] = 'Все смайлы должны иметь одинаковые имена!'; +$txt['smileys_upload_error_illegal'] = 'Неверный Тип.'; + +$txt['search_invalid_weights'] = 'Поисковые значимости неправильно сконфигурированы. Как минимум один фактор должен отличаться от нуля. Пожалуйста сообщите об этой ошибке администратору..'; +$txt['unable_to_create_temporary'] = 'Поиск не смог создать временную таблицу. Пожалуйста, сообщите об этой ошибке администратору.'; + +$txt['package_no_file'] = 'Не получилось найти пакетный файл!'; +$txt['packageget_unable'] = 'Не получилось соединиться с сервером. Пожалуйста, попробуйте использовать этот URL вместо того.'; +$txt['not_on_simplemachines'] = 'Извините, пакеты могут быть только загружены, как этот с сервера simplemachines.org.'; +$txt['package_cant_uninstall'] = 'Этот пакет или не был никогда установлен, или уже удален - Вы не можете удалить его сейчас.'; +$txt['package_cant_download'] = 'Вы не можете загрузить или установить новый пакет, так как директория Пакетов не записываема (CHMOD)!'; +$txt['package_upload_error'] = 'Не могу загрузить пакет, пожалуйста, проверте разрешения для директории!'; +$txt['package_upload_error_exists'] = 'Файл, который Вы загружаете, уже существует на сервере. Пожалуйста, удалите его сначала, а потом попробуйте снова.'; + +$txt['no_membergroup_selected'] = 'Не выбраны группы пользователей'; + +$txt['attachment_not_found'] = 'Вложение Не Найдено'; + +$txt['cannot_karmalog_view'] = 'Sorry - you don\'t have the proper permissions to view the Karma Description list.'; +$txt['viewkarma_error'] = 'User ID must be a number'; +$txt['karma_not_topic_starter'] = 'Sorry, he is not topic author.'; +?> diff --git a/Themes/default/languages/Help.english.php b/Themes/default/languages/Help.english.php new file mode 100644 index 0000000..f6954ca --- /dev/null +++ b/Themes/default/languages/Help.english.php @@ -0,0 +1,392 @@ +Edit Boards
    + In this menu you can create/reorder/remove boards, and the categories + above them. For example, if you had a wide-ranging + site that offered information on "Sports" and "Cars" and "Music", these + would be the top-level Categories you\'d create. Under each of these + categories you\'d likely want to create hierarchical "sub-categories", + or "Boards" for topics within each. It\'s a simple hierarchy, with this structure:
    +
      +
    • + Sports +  - A "category" +
    • +
        +
      • + Baseball +  - A board under the category of "Sports" +
      • +
          +
        • + Stats +  - A child board under the board of "Baseball" +
        • +
        +
      • Football +  - A board under the category of "Sports"
      • +
      +
    + Categories allow you to break down the board into broad topics ("Cars, + Sports"), and the "Boards" under them are the actual topics under which + members can post. A user interested in Pintos + would post a message under "Cars->Pinto". Categories allow people to + quickly find what their interests are: Instead of a "Store" you have + "Hardware" and "Clothing" stores you can go to. This simplifies your + search for "pipe joint compound" because you can go to the Hardware + Store "category" instead of the Clothing Store (where you\'re unlikely + to find pipe joint compound).
    + As noted above, a Board is a key topic underneath a broad category. + If you want to discuss "Pintos" you\'d go to the "Auto" category and + jump into the "Pinto" board to post your thoughts in that board.
    + Administrative functions for this menu item are to create new boards + under each category, to reorder them (put "Pinto" behind "Chevy"), or + to delete the board entirely.'; + +$helptxt[2] = 'Edit Forum News
    + This allows you to set the text for news items displayed on the Board Index page. + Add any item you want (e.g., "Don\'t miss the conference this Tuesday"). Each news item should + go in a separate box, and they are displayed randomly.'; + +$helptxt[3] = 'Edit Registration Agreement
    + This allows you to set the text for the registration agreement displayed when members sign up for your forum. + You can add or remove anything from the default registration agreement, which is included in SMF.'; + +$helptxt[4] = 'View all Members
    + View all members in the board. You are presented with a hyperlinked list of member names. You may click + on any of the names to find details of the members (homepage, age, etc.), and as Administrator + you are able to modify these parameters. You have complete control over members, including the + ability to delete them from the forum.'; + +$helptxt[6] = 'Email Your Members
    + From this menu you can send messages to all members who\'ve registered and entered their + email addresses (not all will, of course). You may edit the distribution list, or send messages + to all. Useful for important update/news information.'; + +$helptxt[7] = 'Ban Members
    + SMF provides the ability to "ban" users, to prevent people who have violated the trust of the board + by spamming, trolling, etc. This allows you to those users who are detrimental to your forum. As an admin, + when you view messages, you can see each user\'s IP address used to post at that time. In the ban list, + you simply type that IP address in, save, and they can no longer post from that location.
    You can also + ban people through their email address.'; + +$helptxt[8] = 'Set Reserved Names
    + This allows you to put in keywords or names that you want to restrict people from using as + a name or username.'; + +$helptxt[10] = 'Edit Features and Options
    + There are several features in this section that can be changed to your preference. Options for installed mods will generally also appear in here.'; + +$helptxt[11] = 'Edit Censored Words
    + SMF offers the option to censor certain words, by replacing them with another one.
    + Add a new word per line, like the example bellow:
    + cl*wn=funny guy
    +
    + (* can be used as a wildcard.)'; + +$helptxt['number_format'] = 'Number Format
    + You can use this setting to format the way in which numbers on your forum will be displayed to the user. The format of this setting is:
    +
    1,234.00

    + Where \',\' is the character used to split up groups of thousands, \'.\' is the character used as the decimal point and the number of zeros dictate the accuracy of roundings.'; + +$helptxt['time_format'] = 'Time Format
    + You have the power to adjust how the time and date look for yourself. There are a lot of little letters, but it\'s quite simple. + The conventions follow PHP\'s strftime function and are described as below (more details can be found at php.net).
    +
    + The following characters are recognized in the format string:
    + +   %a - abbreviated weekday name
    +   %A - full weekday name
    +   %b - abbreviated month name
    +   %B - full month name
    +   %d - day of the month (01 to 31)
    +   %D* - same as %m/%d/%y
    +   %e* - day of the month (1 to 31)
    +   %H - hour using a 24-hour clock (range 00 to 23)
    +   %I - hour using a 12-hour clock (range 01 to 12)
    +   %m - month as a number (01 to 12)
    +   %M - minute as a number
    +   %p - either "am" or "pm" according to the given time
    +   %R* - time in 24 hour notation
    +   %S - second as a decimal number
    +   %T* - current time, equal to %H:%M:%S
    +   %y - 2 digit year (00 to 99)
    +   %Y - 4 digit year
    +   %Z - time zone or name or abbreviation
    +   %% - a literal \'%\' character
    +
    + * Does not work on Windows-based servers.
    '; + +$helptxt[13] = 'Live announcements
    + This box shows recently updated announcements from www.simplemachines.org. + You should check here every now and then for updates, new releases, and important information from the Simple Machines Team.'; + +$helptxt[14] = 'Registration Management
    + This section contains all the functions that could be necessary to manage new registrations on the forum. It contains up to three + sections which are visible depending on your forum settings. These are:

    +
      +
    • + Awaiting Approval
      + This section is only shown if you have enabled admin approval of all new registrations. Anyone who registers to join your + forum will only become a full member once they have been approved by an admin. The section lists all those members who + are still awaiting approval, along with their email and IP address. You can choose to either accept or reject (delete) + any member on the list by checking the box next to the member and choosing the action from the drop-down box at the bottom + of the screen. When rejecting a member you can choose to delete the member either with or without notifying them of your decision.

      +
    • +
    • + Awaiting Activation
      + This section will only be visible if you have activation of member accounts enabled on the forum. This section will list all + members who have still not activated their new accounts. From this screen you can choose to either accept, reject or remind + members with outstanding registrations. As above you can also choose to email the member to inform them of the + action you have taken.

      +
    • +
    • + Register New Member
      + From this screen you can choose to register accounts for new members on their behalf. This can be useful in forums where registration is closed + to new members, or in cases where the admin wishes to create a test account. If the option to require activation of the account + is selected the member will be emailed a activation link which must be clicked before they can use the account. Similarly you can + select to email the users new password to the stated email address. +
    • +
    '; + +$helptxt[15] = 'Moderation Log
    + This section allows members of the admin team to track all the moderation actions that the forum moderators have performed. To ensure that + moderators cannot remove references to the actions they have performed, entries may not be deleted until 24 hours after the action was taken. + The \'objects\' column lists any variables associated with the action.'; +$helptxt[16] = 'Error Log
    + The error log tracks logs every serious error encountered by users using your forum. It lists all of these errors by date which can be sorted + by clicking the black arrow next to each date. Additionally you can filter the errors by clicking the picture next to each error statistic. This + allows you to filter, for example, by member. When a filter is active the only results that will be displayed will be those that match that filter.'; +$helptxt[17] = 'Theme Settings
    + The settings screen allows you to change settings specific to a theme. These settings include options such as the themes directory and URL information but + also options that affect the layout of a theme on your forum. Most themes will have a variety of user configurable options, allowing you to adapt a theme + to suit your individual forum needs.'; +$helptxt['smileys'] = 'Smiley Center
    + Here you can add and remove smileys, and smiley sets. Note importantly that if a smiley is in one set, it\'s in all sets - otherwise, it might + get confusing for your users using different sets.'; + +// Mod Settings + +$helptxt['topicSummaryPosts'] = 'This allows you to set the number of previous posts shown in the topic summary at the reply screen.'; +$helptxt['enableStickyTopics'] = 'Stickies are topics that remain on top of the topic list. They are mostly used for important + messages. Although you can change this with permissions, by default only moderators and administrators can make topics sticky.'; +$helptxt['userLanguage'] = 'Turning this option on will allow users to select which language file they use. It will not affect the + default selection.'; +$helptxt['trackStats'] = 'Stats:
    This will allow users to see the latest posts and the most popular topics on your forum. + It will also show several statistics, like the most members online, new members and new topics.
    + Hits:
    Adds another column to the stats page with the number of hits on your forum.'; +$helptxt['titlesEnable'] = 'Switching Custom Titles on will allow members with the relevant permission to create a special title for themselves. + This will be shown underneath the name.
    For example:
    Jeff
    Cool Guy'; +$helptxt['topbottomEnable'] = 'This will add go up and go down buttons, so that member can go to the top and bottom of a page + without scrolling.'; +$helptxt['onlineEnable'] = 'This will show an image to indicate whether the member is online or offline'; +$helptxt['todayMod'] = 'This will show "Today", or "Yesterday", instead of the date.'; +$helptxt['enablePreviousNext'] = 'This will show a link to the next and previous topic.'; +$helptxt['pollMode'] = 'This selects whether polls are enabled or not. If polls are disabled, any existing polls will be hidden + from the topic listing. You can choose to continue to show the regular topic without their polls by selecting + "Show Existing Polls as Topics".

    To choose who can post polls, view polls, and similar, you + can allow and disallow those permissions. Remember this if polls are not working.'; +$helptxt['enableVBStyleLogin'] = 'This will show a more compact login on every page of the forum for guests.'; +$helptxt['enableCompressedOutput'] = 'This option will compress output to lower bandwidth consumption, but it requires + zlib to be installed.'; +$helptxt['databaseSession_enable'] = 'This option makes use of the database for session storage - it is best for load balanced servers, but helps with all timeout issues and can make the forum faster. Doesn\'t work if session.auto_start is on.'; +$helptxt['databaseSession_loose'] = 'Turning this on will decrease the bandwidth your forum uses, and make it so clicking back will not reload the page - the downside is that the (new) icons won\'t update, among other things. (unless you click to that page instead of going back to it.)'; +$helptxt['databaseSession_lifetime'] = 'This is the number of seconds for sessions to last after they haven\'t been accessed. If a session is not accessed for too long, it is said to have "timed out". Anything higher than 2400 is recommended.'; +$helptxt['m16'] = 'Enabling this will cause your current location to be shown on a single line, as opposed to in a tree-like manner.'; +$helptxt['m17'] = 'This will change the layout of the statistics shown at the bottom of the boardindex.'; +$helptxt['enableErrorLogging'] = 'This will log any errors, like a failed login, so you can see what went wrong.'; +$helptxt['notifyAnncmnts_UserDisable'] = 'This will allow users to opt out of notification of new posts on announcement boards.'; +$helptxt['compactTopicPagesEnable'] = 'This will just show a selection of the number of pages.
    Example: + "3" to display: 1 ... 4 [5] 6 ... 9
    + "5" to display: 1 ... 3 4 [5] 6 7 ... 9'; +$helptxt['timeLoadPageEnable'] = 'This will show the time in seconds SMF took to create that page at the bottom of the board.'; +$helptxt['removeNestedQuotes'] = 'This will only show the quote of the post in question, not any quoted posts from that post.'; +$helptxt['simpleSearch'] = 'This will show a simple search form and a link to a more advanced form.'; +$helptxt['maxwidth'] = 'This allows you to set a maximum size for posted pictures. Pictures smaller than the maximum will not be affected.'; +$helptxt['mail_type'] = 'This allows you to select either the default PHP mail program or your mail server. + Fill in the details of your outgoing mail server unless you selected sendmail.'; +$helptxt['attachmentEnable'] = 'Attachments are files that members can upload, and attach to a post.

    + Check attachment extension:
    Do you want to check the extension of the files?
    + Allowed attachment extensions:
    You can set the allowed extensions of attached files.
    + Display attachment as picture in posts:
    If the uploaded file is a picture, this will show it underneath the post
    + Attachments directory:
    The path to your attachment folder
    (example: /home/sites/yoursite/www/forum/attachments)
    + Attachments URL:
    The URL to your attachment folder
    (example: http://www.yoursite.com/forum/attachments)
    + Max attachment folder space (in KB):
    Select how large the attachment folder can be, including all files within it.
    + Max attachment size per post (in KB):
    Select the maximum filesize of all attachments made per post. If this is lower than the per-attachment limit, this will be the limit.
    + Max size per attachment (in KB):
    Select the maximum filesize of each separate attachment.
    + Max number of attachments per post:
    Select the number of attachments a person can make, per post.'; +$helptxt['karmapermiss'] = 'By default this option is switched off and Karma Log can look only admins. If you want to do Karma Log available for other users or moderators, etc, enable this option and give the right that group, which can look Log in "Permissions" section.'; +$helptxt['karmalinks'] = 'If you enable this feauture, users will see two links in their profiles (Own or other users). They can see who change their karma and whom they change it. Karma Description Mod must be enabled'; +$helptxt['karmakarma'] = 'It\'s display users karma in Karma log opposit the usernames. For example: Username (+12/-8)'; +$helptxt['karmaurl'] = 'If you enable this option, you and your users can view where their karma was change'; +$helptxt['karmaisowner'] = 'If you enable this option, only profile owner will see two links to his own karma log. By the way, your users will resieve an error if they input an url adress (like http://your_forum.com/index.php?action=ownkarma;u=other_user) by the hand if you don\'t want your users can view other users karma log. Whole karma log will be disabled too. ONLY OWN KARMA LOG.'; +$helptxt['karmaMode'] = 'Karma is a feature that shows the popularity of a member. Members, if allowed, can + \'applaud\' or \'smite\' other members, which is how their popularity is calculated. You can change the + number of posts needed to have a "karma", the time between smites or applauds, and if administrators + have to wait this time as well.

    Whether or not groups of members can smite others is controlled by + a permission. If you have trouble getting this feature to work for everyone, double check your permissions.'; +$helptxt['cal_enabled'] = 'The calendar can be used for showing birthdays, or for showing important moments happening in your community.

    + Show days as link to \'Post Event\':
    This will allow members to post events for that day, when they click on that date
    + Show week numbers:
    Show which week it is.
    + Max days in advance on board index:
    If this is set to 7, the next week\'s worth of events will be shown.
    + Show holidays on board index:
    Show today\'s holidays in a calendar bar on the board index.
    + Show birthdays on board index:
    Show today\'s birthdays in a calendar bar on the board index.
    + Show events on board index:
    Show today\'s events in a calendar bar on the board index.
    + Default Board to Post In:
    What\'s the default board to post events in?
    + Minimum year:
    Select the "first" year on the calendar list.
    + Maximum year:
    Select the "last" year on the calendar list
    + Birthday color:
    Select the color of the birthday text
    + Event color:
    Select the color of the event text
    + Holiday color:
    Select the color of the Holiday text
    + Allow events to span multiple days:
    Check to allow events to span multiple days.
    + Max number of days an event can span:
    Select the maximum days that an event can span.

    + Remember that usage of the calendar (posting events, viewing events, etc.) is controlled by permissions set on the permissions screen.'; +$helptxt['localCookies'] = 'SMF uses cookies to store login information on the client computer. + Cookies can be stored globally (myserver.com) or locally (myserver.com/path/to/forum).
    + Check this option if you\'re experiencing problems with users getting logged out automatically.
    + Globally stored cookies are less secure when used on a shared webserver (like Tripod).
    + Local cookies don\'t work outside the forum folder so, if your forum is stored at www.myserver.com/forum, pages like www.myserver.com/index.php cannot access the account information. + Especially when using SSI.php, global cookies are recommended.'; +$helptxt['disabledBBC'] = 'This setting allows you to manually disable certain Bulletin Board Codes from being used on your forum. To do this just type in a comma separated list of all codes you wish to remain inactive.

    + Example:
    \'move,glow,table,tr,td\' - This would disable the move, glow and table tags from being used on your forum.

    + Please note that this does not work on all tags.'; +$helptxt['enableBBC'] = 'Selecting this option will allow your members to use Bulletin Board Code (BBC) throughout the forum, allowing users to format their posts with images, type formatting and more.'; +$helptxt['enableNewReplyWarning'] = 'When this option is enabled, a member who is making a post on your forum will be shown a warning message if a new reply is received while they are writing their message. This presents them with an opportunity to adjust their post accordingly.'; +$helptxt['time_offset'] = 'Not all forum administrators want their forum to use the same time zone as the server upon which it is hosted. Use this option to specify a time difference (in hours) from which the forum should operate from the server time. Negative and decimal values are permitted.'; +$helptxt['spamWaitTime'] = 'Here you can select the amount of time that must pass between postings. This can be used to stop people from "spamming" your forum by limiting how often they can post.'; + +$helptxt['enablePostHTML'] = 'This will allow the posting of some basic HTML tags: + <b>, <u>, <i>, <pre>, <blockquote>, <img src="" />, <a href="">, and <br />.'; + +$helptxt['themes'] = 'Here you can select whether the default theme can be chosen, what theme guests will use, + as well as other options. Click on a theme to the right to change the settings for it.'; +$helptxt['theme_install'] = 'This allows you to install new themes. You can do this from an already created directory, by uploading an archive for the theme, or by copying the default theme.

    Note that the archive or directory must have a theme_info.xml definition file.'; +$helptxt['enableEmbeddedFlash'] = 'This option will allow your users to use Flash directly inside their posts, + just like images. This could pose a security risk, although few have successfully exploited it. + USE AT YOUR OWN RISK!'; +$helptxt['xmlnews_enable'] = 'Allows people to link to Recent news + and similar data. It is also recommended that you limit the size of recent posts/news because, when rss data + is displayed in some clients, like Trillian, it is expected to be truncated.'; +$helptxt['hotTopicPosts'] = 'Change the number of posts for a topic to reach the state of a "hot" or + "very hot" topic.'; +$helptxt['globalCookies'] = 'Allows for the use of subdomain independent cookies. For example, if...
    + Your site is at http://www.simplemachines.org/,
    + And your forum is at http://forum.simplemachines.org/,
    + Using this modification will allow you to access the forum\'s cookie on your site.'; +$helptxt['redirectMetaRefresh'] = 'Normally, SMF uses a "Location" header to redirect you to various places in the forum. However, this doesn\'t always work on some older servers.

    Enable this if you experience problems staying logged in.'; +$helptxt['securityDisable'] = 'This disables the additional password check for the administration section. This is not recommended!'; +$helptxt['securityDisable_why'] = 'This is your current password. (the same one you use to login.)

    Having to type this helps ensure that you want to do whatever administration you are doing, and that it is you doing it.'; +$helptxt['emailmembers'] = 'In this message you can use a few "variables". These are:
    + {$board_url} - The URL to your forum.
    + {$current_time} - The current time.
    + {$member.email} - The current member\'s email.
    + {$member.link} - The current member\'s link.
    + {$member.id} - The current member\'s id.
    + {$member.name} - The current member\'s name. (for personalization.)
    + {$latest_member.link} - The most recently registered member\'s link.
    + {$latest_member.id} - The most recently registered member\'s id.
    + {$latest_member.name} - The most recently registered member\'s name.'; +$helptxt['attachmentEncryptFilenames'] = 'Encrypting attachment filenames allows you to have more than one attachment of the + same name, to safely use .php files for attachments, and heightens security. It, however, could make it more + difficult to rebuild your database if something drastic happened.'; + +$helptxt['failed_login_threshold'] = 'Set the number of failed login attempts before directing the user to the password reminder screen.'; +$helptxt['edit_wait_time'] = 'Number of seconds allowed for a post to be edited before logging the last edit date.'; +$helptxt['enableSpellChecking'] = 'Enable spell checking. You MUST have the pspell library installed on your server and your PHP configuration set up to use the pspell library. Your server ' . (function_exists('pspell_new') == 1 ? 'DOES' : 'DOES NOT') . ' appear to have this set up.'; +$helptxt['lastActive'] = 'Set the number of minutes to show people are active in X number of minutes on the board index. Default is 15 minutes.'; + +$helptxt['autoOptDatabase'] = 'This option optimizes the database every so many days. Set it to 1 to make a daily optimization. You can also specify a maximum number of online users, so that you won\'t overload your server or inconvenience too many users.'; +$helptxt['autoFixDatabase'] = 'This will automatically fix broken tables and resume like nothing happened. This can be useful, because the only way to fix it is to REPAIR the table, and this way your forum won\'t be down until you notice. It does email you when this happens.'; + +$helptxt['enableParticipation'] = 'This shows a little icon on the topics the user has posted in.'; + +$helptxt['db_persist'] = 'Keeps the connection active to increase performance. If you aren\'t on a dedicated server, this may cause you problems with your host.'; + +$helptxt['queryless_urls'] = 'This changes the format of URLs a little so search engines will like them better. They will look like index.php/topic,1.html.

    This feature will ' . (strpos(php_sapi_name(), 'apache') !== false ? '' : 'not') . ' work on your server.'; +$helptxt['fixLongWords'] = 'This option breaks words longer than a certain length into pieces so they don\'t disturb the forum\'s layout. (as much...) This option should not be set to a value under 40.'; + +$helptxt['who_enabled'] = 'This option allows you to turn on or off the ability for users to see who is browsing the forum and what they are doing.'; + +$helptxt['recycle_enable'] = '"Recycles" deleted topics and posts to the specified board.'; + +$helptxt['default_personalText'] = 'Sets the default text a user will have as their "personal text."'; + +$helptxt['modlog_enabled'] = 'Logs all moderation actions.'; + +$helptxt['guest_hideContacts'] = 'If selected this option will hide the email addresses and messenger contact details + of all members from any guests on your forum'; + +$helptxt['registration_method'] = 'This option determines what method of registration is used for people wishing to join your forum. You can select from:

    +
      +
    • + Registration Disabled:
      + Disables the registration process, which means that no new members can register to join your forum.
      +
    • + Immediate Registration
      + New members can login and post immediately after registering on your forum.
      +
    • + Member Activation
      + When this option is enabled any members registering to the forum will have a activation link emailed to them which they must click before they can become full members
      +
    • + Member Approval
      + This option will make it so all new members registering to your forum will need to be approved by the admin before they become members. +
    • +
    '; +$helptxt['send_validation_onChange'] = 'When this option is checked all members who change their email address in their profile will have to reactivate their account from an email sent to that address'; +$helptxt['send_welcomeEmail'] = 'When this option is enabled all new members will be sent an email welcoming them to your community'; +$helptxt['allow_hideOnline'] = 'With this option enabled all members will be able to hide their online status from other users (except administrators). If disabled only users who can moderate the forum can hide their presence. Note that disabling this option will not change any existing member\'s status - it just stops them from hiding themselves in the future.'; +$helptxt['allow_hideEmail'] = 'With this option enabled members can choose to hide their email address from other members. However, administrators can always see everyone\'s email addresses.'; + +$helptxt['latest_support'] = 'This panel shows you some of the most common problems and questions on your server configuration. Don\'t worry, this information isn\'t logged or anything.

    If this stays as "Retrieving support information...", your computer probably cannot connect to www.simplemachines.org.'; +$helptxt['latest_packages'] = 'Here you can see some of the most popular and some random packages or mods, with quick and easy installations.

    If this section doesn\'t show up, your computer probably cannot connect to www.simplemachines.org.'; +$helptxt['latest_themes'] = 'This area shows a few of the latest and most popular themes from www.simplemachines.org. It may not show up properly if your computer can\'t find www.simplemachines.org, though.'; + +$helptxt['secret_why_blank'] = 'For your security, the answer to your question (as well as your password) is encrypted in such a way that SMF can only tell you if get it right, so it can never tell you (or anyone else, importantly!) what your answer or password is.'; +$helptxt['moderator_why_missing'] = 'Since moderation is done on a board-by-board basis, you have to make members moderators from the board management interface.'; + +$helptxt['permissions'] = 'Permissions are how you either allow groups to, or deny groups from, doing specific things.

    You can modify multiple boards at once with the checkboxes, or look at the permissions for a specific group by clicking \'Modify.\''; +$helptxt['permissions_board'] = 'If a board is set to \'Global,\' it means that the board will not have any special permissions. \'Local\' means it will have its own permissions - separate from the global ones. This allows you to have a board that has more or less permissions than another, without requiring you to set them for each and every board.'; +$helptxt['permissions_quickgroups'] = 'These allow you to use the "default" permission setups - standard means \'nothing special\', restrictive means \'like a guest\', moderator means \'what a moderator has\', and lastly \'maintenance\' means permissions very close to those of an administrator.'; +$helptxt['membergroups'] = 'In SMF there are two types of groups that your members can be part of. These are: +
      +
    • Regular Groups: A regular group is a group to which members are not automatically put into. To assign a member to be in a group simply go to their profile and click "Account Settings". From here you can assign them any number of regular groups to which they will be part.
    • +
    • Post Groups: Unlike regular groups post based groups cannot be assigned. Instead, members are automatically assigned to a post based group when they reach the minimum number of posts required to be in that group.
    • +
    '; + +$helptxt['calendar_how_edit'] = 'You can edit these events by clicking on the red asterisk (*) next to their names.'; + +$helptxt['maintenance_general'] = 'From here, you are able to optimize all your tables (makes them smaller and faster!), make sure you have the newest versions, find any errors that might be messing up your board, recount totals, and empty logs.

    The last two should be avoided unless something is wrong, but don\'t hurt anything.'; +$helptxt['maintenance_backup'] = 'This area allows you to save a copy of all the posts, settings, members, and other information in your forum to a very large file.

    It is recommended that you do this often, perhaps weekly, for safety and security.'; +$helptxt['maintenance_rot'] = 'This allows you to completely and irrevocably remove old topics. It is recommended that you try to make a backup first, just in case you remove something you didn\'t mean to.

    Use this option with care.'; + +$helptxt['avatar_allow_server_stored'] = 'This allows your members to pick from avatars stored on your server itself. They are, generally, in the same place as SMF under the avatars folder.
    As a tip, if you create directories in that folder, you can make "categories" of avatars.'; +$helptxt['avatar_allow_external_url'] = 'With this enabled, your members can type in a URL to their own avatar. The downside of this is that, in some cases, they may use avatars that are overly large or portray images you don\'t want on your forum.

    Remember that members need the permission to choose a remote avatar for this to work for them. This option only enables the use for those with the proper permission.'; +$helptxt['avatar_check_size'] = 'This can help to "enforce" the size restriction, but it can also slow things down markedly. Use with care.'; +$helptxt['avatar_allow_upload'] = 'This option is much like "Allow members to select an external avatar", except that you have better control over the avatars, a better time resizing them, and your members do not have to have somewhere to put avatars.

    However, the downside is that it can take a lot of space on your server.'; +$helptxt['avatar_download_png'] = 'PNGs are larger, but offer better quality compression. If this is unchecked, JPEG will be used instead - which is often smaller, but also of lesser or blurry quality.'; + +$helptxt['disableHostnameLookup'] = 'This disables host name lookups, which on some servers are very slow. Note that this will make banning less effective.'; + +$helptxt['nowplaying_image'] = "The name of the image to display next to the now playing entry in posts. If no image is entered, cddisc.gif is used instead. The image must be in the
    images
    directory for each theme."; +$helptxt['nowplaying_text'] = "Optional text to display between the image and the now playing entry in posts. If no text is specified, only the image will be used. HTML is allowed here."; + +$helptxt['search_match_complete_words'] = 'This option limits search results to full words that match a users query. For example, if this option is disabled, a search term like \'here\' would match \'here\', \'there\', and \'hereafter\'. Enabling this option would limit search results to only match \'here\'.

    Please notice that enabling this option might slow down the search function, especially if the amount of messages is large.'; +$helptxt['disableTemporaryTables'] = 'This option prevents the usage of temporary tables. Since this option makes search queries slower, it\'s advisable to only use it if you don\'t have permissions to create temporary tables.'; +$helptxt['search_cache_size'] = 'Search caching is used to limit the amount of extensive database queries. Once the user has entered a search query, the results are cached in the database. This way, the next pages of the search results are already available without need for extensive search.

    Use this setting to limit the amount of cached results. Increasing this value requires a larger database (about 20kb for each cached result).'; +$helptxt['search_weight_frequency'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor counts the amount of matching messages and divides them by the total number of messages within a topic.'; +$helptxt['search_weight_age'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor rates the age of the last matching message within a topic. The more recent this message is, the higher the score.'; +$helptxt['search_weight_length'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor is based on the topic size. The more messages are within the topic, the higher the score.'; +$helptxt['search_weight_subject'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor looks whether a search term can be found withing the subject of a topic.'; +$helptxt['search_weight_first_message'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor looks whether a match can be found in the first message of a topic.'; + +$helptxt['see_admin_ip'] = 'IP addresses are shown to administrators and moderators to facilitate moderation and to make it easier to track people up to no good. Remember that IP addresses may not always be identifying, and most people\'s IP addresses change periodically.

    Members are also allowed to see their own IPs.'; +$helptxt['see_member_ip'] = 'Your IP address is shown only to you and moderators. Remember that this information is not identifying, and that most IPs change periodically.

    You cannot see other members\' IP addresses, and they cannot see yours.'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Help.russian.php b/Themes/default/languages/Help.russian.php new file mode 100644 index 0000000..389893c --- /dev/null +++ b/Themes/default/languages/Help.russian.php @@ -0,0 +1,324 @@ +Редактирование Форумов
    + В этом меню, Вы можете создавать/преобразовывать/удалять разделы, и категории. Например, если у вас есть сайт, посвященный "Спорту" , "Автомобилям" и "Музыке", они будут корневыми категориями, созданными Вами. Внутри каждой категории, Вы бы хотели создать "Подкатегории", +или "разделы" с соответствующими темами. Это простая иерархия с такой структурой:
    +
      +
    • + Спорт +  - A "категория" +
    • +
        +
      • + Баскетбол +  - Раздел в категории о "Спорте" +
      • +
          +
        • + Статистика +  - Форум в разделе о "Баскетболе" +
        • +
        +
      • Футбол +  - Раздел в категории о "Спорте"
      • +
      +
    + Категории позволяют Вам разделять Форум по тематикам ("Автомобили, + Спорт"), и "Разделы" в которых актуальные темы, где участники смогут писать свои сообщения. Пользователи, интересующиеся Грузовиками, будут писать сообщения в разделе + "Автомобили->Грузовики". Категории позволяют людям быстро найти свой раздел по интересам: Вместо "Магазин" у Вас будет + "Железо" и "Одежда" магазины, в которые Вы сможете пойти. Это облегчит Вам поиск "средства для соединения труб" так как пойдете прямиком в раздел Магазины с Железом "категорию" вместо Одежного Магазина (где вы врядли найдете средство для соединения труб).
    + Как сказано выше, раздел - это ключевая тема под категорией. + Если Вы хотите обсудить "Грузовики" Вы пойдете в "Автомобили" категорию и перейдете в раздел "Грузовики" раздел, где вы сможете написать сообщения.
    + Административные функции для этого меню состоят в том, чтобы создавать новые разделы под категориями, в их переупорядочивании (поставить "Грузовики" после "Chevy"), или удалить раздел полностью.'; + +$helptxt[2] = 'Редактирование Новостей Форума
    + Здесь Вы можете редактировать новости, отображаемые на главной странице Форума. Напишите, что Вы хотите (например, "Не пропустите конференцию в этот вторник"). Каждая новость должна быть в отдельном окошке, и отображаться они будут в случайном порядке.'; + +$helptxt[3] = 'Редактировать Регистрационное Соглашение
    + Здесь Вы можете написать регистрационное соглашение, которое будет показыватьься пользователю во время регистрации на Вашем форуме. Вы можете добавить или удалить все что угодно в соглашение, которое по умолчанию включено в SMF'; + + +$helptxt[4] = 'Просмотр Всех Участников
    + Просмотреть всех участников Форума. Вам показывается список гиперлинков пользовательских имен. Вы можете нажать на имя любого пользователя, чтобы посмотреть детальную информацию о нем (домашняя страница, возраст и т.д.), и, в качестве Администратора, можно изменять эти параметры. У вас будет полный контроль над пользователями, включая возможность удаления их с форума.'; + +$helptxt[6] = 'Послать Email Участникам
    + Из этого меню Вы можете послать сообщения всем пользователям, зарегистрированным на Вашем Форуме и оставившим email (не всем, конечно). Вы можете редактировать список рассылаемых или отправить email всем. Полезно для важной информации - новости, обновления..'; + +$helptxt[7] = 'Бан Участников
    + SMF предоставляет возможность "бана" пользователей, чтобы не пропустить пользователей, которым не доверяете за рассылку спама, плохое поведение и т.д.. Вы можете забанить любого, зашедшего на Ваш форум. Как Администратор, просматривая Форум, Вы видете IP каждого пользователя. В списке банов, просто наберите IP адрес и сохраните, и пользователь больше не сможет писать с этого IP. Так же Вы можете забанить пользователя по email адресу.'; + +$helptxt[8] = 'Установить Зарезервированные Имена
    + Здесь Вы можете вписать имена или слова, которые пользователи не смогут использовать как имя или имя пользователя.'; + + +$helptxt[10] = 'Изменить Настройки и Опции
    + Здесь располагаются некоторые настройки, которые меняют определенные параметры Вашего форума. Опции установленных модификаций (mods) также находятся в этом разделе.'; + +$helptxt[11] = 'Установить Цензуру Слов
    + SMF предлагает возможность цензуры определенных слов, посредством замены их другими словами или символами.
    + Добавьте новое слово, по одному на строчку, как в примере ниже:
    + кл*ун=смешной парень
    +
    + (* заменяет любой символ.)'; + +$helptxt['number_format'] = 'Формат Чисел
    + Вы можете настраивать формат чисел на вашем Форуме, в котором их они будут видны пользователям. Формат данных настроек такой:
    +
    1,234.00

    + Где \',\' знак, разделяющий тысячи, а \'.\' знак десятичной дроби, обозначающий точность приближения.'; + +$helptxt['time_format'] = 'Формат Времени
    + У Вас есть возможность настроить, как будет выглядеть время и дата лично для Вас. Много маленьких букв, но все просто. + Это условные обозначения PHP формата времени, его описание ниже (более подробно вы можете познакомиться на php.net).
    +
    + Следующие символы распознаются в строке формата времени:
    + +   %a - аббревиатура дня недели
    +   %A - полное название дня недели
    +   %b - аббревиатура месяца
    +   %B - полное название месяца
    +   %d - день месяца (от 01 до 31)
    +   %D* - такой как %м/%в/%г
    +   %e* - день месяца (от 1 до 31)
    +   %H - 24-х часовой формат времени (отсчет с 00 до 23)
    +   %I - 12-и часовой формат времени (отсчет с 01 до 12)
    +   %m - цифра вместо месяца (01 to 12)
    +   %M - минуты цифрой
    +   %p - или"am" или "pm" в зависимости от времени
    +   %R* - время в 24-х часовой системе счисления
    +   %S - секунды как десятичное число
    +   %T* - текущее время равно %Ч:%М:%С
    +   %y - 2 цифры года (с 00 до 99)
    +   %Y - 4 цифры года
    +   %Z - временная зона, имя или аббревиатура
    +   %% - буквенный \'%\' символ
    +
    + * Не работает на Windows серверах.
    '; + +$helptxt[13] = 'Динамические объявления
    + В этом поле показываются последние новости с сайта www.simplemachines.org. +Вам следует достаточно часто проверять информацию об обновлениях, новых версиях от Simple Machines Team.'; + +$helptxt[14] = 'Управление Регистрацией
    + В этом разделе находятся все необходимые функции, которые могут пригодиться при управлении регистрацией новых пользователей. В нем может быть до 3-х секций, которые видимы, в зависимости от настроек форума. Это:

    +
      +
    • + Ожидание Подтверждения
      + Эта секция показывается только в том случае, если включено подтверждение регистрации новых пользователей администратором. Все, кто регистрируется на форуме, становятся полноправными участниками только после подтверждения администратора. Здесь отображается список пользователей, которые ожидают подтверждения с их IP адресами и email. Вы можете разрешить или отказать пользователю, отметив или оставив пустой ячейку, рядом с пользователем и выбрать необходимое действие в ниспадающем окне внизу страницы. При отказе пользователю, Вы так же можете удалить его аккаунт с или без оповещением его о вашем решении.

      +
    • +
    • + Ожидание Активации
      + Этот раздел будет отображаться при условии, что включена активация аккаунтов участников форума. Здесь будут перечислены все пользователи, которые не активировали свои аккаунты. На этой странице, Вы можете выбрать разрешить, отказать или напомнить участнику о просроченной регистрации. Как и выше, можно проинформировать пользователя о Ваших действиях.

      +
    • +
    • + Регистрация Новых Участников
      + На этой странице Вы можете регистрировать аккаунты на имя участников. Это будет полезно на форумах, где закрыта регистрация новых участников, или в случаях, если администратор желает создать тестовый аккаунт. Если на форуме требуется активация аккаунт, пользователь получит email с ссылкой для активации, которую ему надо будет нажать для того, чтобы пользоваться форумом. Так же, вы можете выбрать, отправить ли пользователю email с паролем на указанный при регистрации адрес. +
    • +
    '; + +$helptxt[15] = 'Лог Модерирования
    + Эта секция позволяет команде администраторов отслеживать все действия по модерированию, которые выполнили модераторы форума. Чтобы убедиться, что модераторы не могут удалять ссылки на действия, которые они совершили, значения не удаляются в течение 24 часов с момента совершения действия. + Список \'объектов\' содержит любые изменения относительно действия.'; +$helptxt[16] = 'Лог Ошибок
    + Лог ошибок содержит список всех серьезных ошибок, случившихся при использовании форума пользователями. Здесь содержатся список ошибок по дате, который может быть сохранен нажатием черной стрелки рядом с каждой записью. Дополнительно, Вы можете отфильтровать ошибки, нажав картинку рядом со статистическими данными ошибки. Это позволяет, например, отфильтровать ошибки для определенного пользователя. Когда фильтр активирован, показываются только ошибки, соответствующие фильтру..'; +$helptxt[17] = 'Настройки Темы
    + Эти настройки позволяют Вам изменять тему Вашего форума. Эти настройки включают такие опции, как директория темы, информацию о URL, а также настройки внешнего вида форума. Большинство тем будут иметь множество настроек конфигурации для пользователей, позволяющие адаптировать форум под ваши собственные нужды.'; +$helptxt['smileys'] = 'Центр Смайлов
    + Здесь вы можете добавлять и удалять смайлы и наборы смайлов. Вы можете добавлять и удалять смайлы/наборы смайлов. Учтите, что если смайл в одном наборе, то его надо добавить и в другие, чтобы не приводить в замешательство пользователей, использующих разные наборы.'; + +// Mod Settings + +$helptxt['topicSummaryPosts'] = 'Это позволяет Вам установить число отображаемых предыдущих сообщений в окне написания ответа на форуме.'; +$helptxt['enableStickyTopics'] = 'Прикрепленные темы, всегда остаются вверху списка тем. В основном, они используются для важных сообщений на форуме. Только модераторы и администраторы, по умолчанию, могут сделать тему прикрепленной.'; +$helptxt['userLanguage'] = 'Включив эту опцию, Вы разрешите пользователям выбирать язык, который они будут использовать. Это не повлияет на настройки языка по умолчанию.'; +$helptxt['trackStats'] = 'Статистика:
    Это позволяет пользователям просмотреть последние сообщения и увидеть наиболее горячие темы Вашего форума. Также, здесь показывается другая статистика - количество участников на форуме, новые участники и новые темы.
    + Нажатия:
    Добавляет другой столбец статистики, с количеством заходов на форум.'; +$helptxt['titlesEnable'] = 'Включение Изменения Титула позволит пользователям с определенным доступом создавать специальный титул для себя. Он показывается под именем.
    Например:
    Jeff
    Крутой Чувак'; +$helptxt['topbottomEnable'] = 'Это добавит кнопки снизу и вверху страницы, чтобы пользователи могли легко перемещаться вниз или вверх страницы без скроллинга.'; +$helptxt['onlineEnable'] = 'Это отображает картинку, обозначающую, на форуме ли пользоваель или нет'; +$helptxt['todayMod'] = 'Это показывает "Сегодня", или "Вчера", вместо даты.'; +$helptxt['enablePreviousNext'] = 'Это показывает ссылку на следующую или предыдущую страницу.'; +$helptxt['pollMode'] = 'Здесь выбирается, включено голосование или нет. Если голосование отключено, существующие голосования будут скрыты в списке тем. Вы можете выбрать, отображение существующих голосований, выбрав "Отображать Существующие Опросы как Темы".

    Вы можете выбрать, кому разрешено создавать голосования в меню прав пользователей. Помните об этом если голосование не работает.'; +$helptxt['enableVBStyleLogin'] = 'Это будет отображать маленькое поле для входа на форум снизу страницы.'; +$helptxt['enableCompressedOutput'] = 'Эта опция будет сжимать исходящие данные для для увеличения пропускной способности, но она требует чтобы был установлен zlib.'; +$helptxt['databaseSession_enable'] = 'Эта опция полезна для хранения сессий в базе данных - это подходит для сбалансированных серверов, решает проблему с истечением времени и форум работает быстрей. Не работает, если включена session.auto_start.'; +$helptxt['databaseSession_loose'] = 'Включив эту опцию, вы сократите трафик используемый форумом, например, нажав Назад, страница не будет закачиваться заново, не будут обновляться картинки. (Если Вы, конечно, нажмете назад, а не на ссылку страницы)'; +$helptxt['databaseSession_lifetime'] = 'Это время сессии в секундах которое проходит после того как не было запросов на форум. Если сессия бездействует слишком долго, происходит "timed out". Рекомендуется выставлять более 2400.'; +$helptxt['m16'] = 'Включив эту опцию, Ваше расположение на страницах форума будет отображаться в одной строке, вместо древовидной структуры.'; +$helptxt['m17'] = 'Это изменит вид статистики, отображаемой внизу страницы форума.'; +$helptxt['enableErrorLogging'] = 'Будет вестись лог любых ошибок, например, неправильный логин, чтобы Вы могли видеть, что не правильно.'; +$helptxt['notifyAnncmnts_UserDisable'] = 'Это позволит пользователям отказаться от уведомлений о новых сообщениях в объявлениях форума.'; +$helptxt['compactTopicPagesEnable'] = 'Будет отображаться количество страниц рядом с выбранной страницей.
    Например: + "3" отображается: 1 ... 4 [5] 6 ... 9
    + "5" отображается: 1 ... 3 4 [5] 6 7 ... 9'; +$helptxt['timeLoadPageEnable'] = 'Будет отображаться время в секундах внизу страницы, которое заняло у SMF чтобы создать страницу.'; +$helptxt['removeNestedQuotes'] = 'Будет отображаться только цитата сообщения, а другие цитаты нет.'; +$helptxt['simpleSearch'] = 'Будет отображаться форма простого поиска и ссылка на расширенный поиск.'; +$helptxt['maxwidth'] = 'Это позволит Вам установить максимальный размер вставленнй картинки. Картинки меньше чем установленный размер не изменяются.'; +$helptxt['mail_type'] = 'Вы можете выбрать PHP почтовую программу или ваш почтовый сервер. Заполните настройки Вашей исходящей почты если не выбрали sendmail.'; +$helptxt['attachmentEnable'] = 'Вложения, это те файлы, которые пользователи закачивают и прикрепляют к сообщению.

    + Проверять Расширение Вложения:
    Вы хотите включить проверку расширений файлов?
    + Разрешенные Расширения Вложений:
    Вы можете устанавливать доступные расширения для вложений.
    + Отображать Вложение как Картинку в Сообщении:
    Если вложена картинка, она будет отображаться под сообщением
    + Папка Вложений:
    Путь к папке вложений
    (например: /home/sites/yoursite/www/forum/attachments)
    + URL Вложений:
    URL адрес к папке вложений
    (например: http://www.yoursite.com/forum/attachments)
    + Максимальный Размер Папки Вложений (в KB):
    Выберите какого размера будет папка вложений со всеми файлами.
    + Максимальный Размер Вложений В Сообщении (в KB):
    Выберите максимальный размер вложений на одно сообщение. Если он меньше, чем размер дного вложения, то он будет максимумом.
    + Максимальный Размер Вложения (в KB):
    Выберите максимальный размер одного вложения.
    + Максимальное Количество Вложений в Сообщении:
    Выберете максимальное количество сообщений, которое пользователь может прикрепить к сообщению.'; +$helptxt['karmaMode'] = 'Репутация - это характеристика, которая показывает популярность участника. Участники, если могут, одобряют или не одобряют других пользователей, таким образом, популярность складывается. Вы можете изменить количество сообщений, необходимых для появления "репутации", время между оценками, и нужно ли администратору выжидать время.

    Либо возможность оценивать других определяется разрешениями. Если у Вас трудности с включением этой функции для всех, дважды проверьте разрешенные пользователям действия.'; +$helptxt['cal_enabled'] = 'Календарь может быть использован для отображения дней рождений или отображения важных событий вашего сообщества.

    + Показывать День как Ссылку к \'Событию\':
    Это позволит участникам вставлять события на дату, на которую они нажали
    + Показывать Номера Недель:
    Показывать, каков номер недели.
    + Максимальное количество дней приближения праздника на главной странице Форума:
    Если установлено 7, то будет показано событие которое произойдет через неделю.
    + Показывать Праздники на Главной Странице:
    Показывать сегодняшние праздники в разделе календаря на главной странице.
    + Показывать Дни Рождения на Главной Странице:
    Показывать сегодняшние дни рождения в календаре на главной странице Форума.
    + Показывать События на Главной Странице:
    Показывать сегодняшние события в календаре на главной странице Форума.
    + Раздел Форума по Умолчанию для Событий:
    В какой раздел форума вставляются события по умолчанию?
    + Самый Ранний Год:
    Выберите "первый" год для календаря.
    + Самый Поздний Год:
    Выберите "последний" год для календаря
    + Цвет Дня Рождения:
    Выберите цвет текста дней рождений
    + Цвет Событий:
    Выберите цвет текста событий
    + Цвет Праздников:
    Выберите цвет текста праздников
    + Разрешить Событиям Продлеваться Несколько Дней:
    Отметте, чтобы включить многодневные события.
    + Максимальное Количество Дней Продолжения Событий:
    Выберите максимальное количество дней, которое может длиться событие.
    + Помните, использование календаря (размещение событий, просмотр их, и т.д.) определяется уровенем прав пользователей.'; +$helptxt['localCookies'] = 'SMF использует cookies чтобы сохранять информацию о входе на компьютере клиента. + Cookies могут сохраняться как глобальные(myserver.com) или локально (myserver.com/path/to/forum).
    + Отметте здесь, если возникают проблемы с автоматическим входом пользователей на Форум.
    + Глобально хранящиеся cookies менее безопасны чем общие веб серверы (например, Tripod).
    + Локальные cookies не работают вне папки Форума, и если Форум находится по адресу www.myserver.com/forum, страницы типа www.myserver.com/index.php не имеют доступ к информации об аккаунте. + Особенно, если используется SSI.php, глобальные cookies рекомендуются.'; +$helptxt['disabledBBC'] = 'Эта настройка позволяет Вам вручную отключить Bulletin Board Codes для использования на вашем Форуме. Чтобы сделать это, просто напишите через запятую список кодов, которые не будут работать.

    + Например:
    \'move,glow,table,tr,td\' - Это отключит движение, свечение и таблицы при форматировании сообщений на вашем Форуме.

    + Заметьте, что это не работает со всеми тэгами.'; +$helptxt['enableBBC'] = 'Выделив эту опцию, Вы разрешите пользователям использование Bulletin Board Code (BBC) на всем Форуме, позволите форматировать их сообщения используя картинки, редактор шрифтов и другое.'; +$helptxt['enableNewReplyWarning'] = 'Когда эта опция включена, пользователь, который пишет сообщение на Форуме, получит сообщение, что появился новый ответ в теме. Это дает возможность вносить изменения незамедлительно.'; +$helptxt['time_offset'] = 'Не все администраторы желают, чтобы их форум использовал туже временную зону, как и сервер на котором он хостится. Используйте эту опцию для определения разницы времени (в часах) относительно сервера. Отрицательные и десятичные значения запрещены.'; +$helptxt['spamWaitTime'] = 'Здесь Вы можете определить отрезок времени, который должен пройти между отправкой сообщений пользователей. Этим вы остановите людей от спама, ограничив частоту сообщений.'; + +$helptxt['enablePostHTML'] = 'Это позволит использование основных HTML тэгов: + <b>, <u>, <i>, <pre>, <blockquote>, <img src="" />, <a href="">, и <br />.'; + +$helptxt['themes'] = 'Здесь Вы можете выбрать, будет ли тема по умолчанию гостевой, или другие опции. Кликните на тему справа, чтобы изменить для этого настройки.'; +$helptxt['theme_install'] = 'Это позволит Вам устанавливать новые темы. Вы можете сделать это из уже созданной директории, загрузив архив темы, или скопировав тему по умолчанию.

    Заметьте, что архив или каталог должны иметь определяющий файл theme_info.xml.'; +$helptxt['enableEmbeddedFlash'] = 'Эта опция позволит пользователям использовать Flash прямо внутри сообщений, как картинки. Это уменьшает безопасность, но некоторые успешно используют. + ПОЛЬЗУЙТЕСЬ НА ВАШ СТРАХ И РИСК!'; +$helptxt['xmlnews_enable'] = 'Позволяет людям пользоваться функцией Последние новости + и подобными данными. Также рекомендуется ограничить размер недавних сообщений/новостей, т.к. когда rss данные отображаются в некоторых клиентах, как Trillian, они могут оказаться усеченными.'; +$helptxt['hotTopicPosts'] = 'Изменить количество сообщений для темы для достижения состояния "горячая" или + "очень горячая" тема.'; +$helptxt['globalCookies'] = 'Разрешить использование субдоменных независимых cookies. Например, если...
    + Ваш сайт на http://www.simplemachines.org/,
    + А Форум на http://forum.simplemachines.org/,
    + Используя эту модификацию, позволит использовать cookies Форума на Вашем сайте.'; +$helptxt['redirectMetaRefresh'] = 'Обычно, SMF использует "Местоположение" заголовка, чтобы перенаправить вас в другие места Форума. Но, конечно, это не всегда работает на некоторых старых серверах.

    Включите эту опцию, если у Вас возникают проблемы с присутствием на Форуме и входом на сервер.'; +$helptxt['securityDisable'] = 'Это отключает добавочную проверку пароля в разделе администрирования. Не рекомендуется!'; +$helptxt['securityDisable_why'] = 'Это Ваш текущий пароль. (тот же, который Вы используете для входа.)

    Заставляя себя ввести его, Вы подтверждаете, что хотите администрировать, и что это именно Вы делаете.'; +$helptxt['emailmembers'] = 'В этом сообщении Вы можете использовать несколько "изменений". Это:
    + {$board_url} - URL Вашего Форума.
    + {$current_time} - Текущее время.
    + {$member.email} - Email текущего пользователя.
    + {$member.link} - Путь текущего пользователя.
    + {$member.id} - Id текущего пользователя.
    + {$member.name} - Имя текущего пользователя. (для персонализации.)
    + {$latest_member.link} - Путь к недавно зарегистрированным пользователям.
    + {$latest_member.id} - Недавно зарегистрированные Id пользователей.
    + {$latest_member.name} - Недавно зарегистрированные имена пользователей.'; +$helptxt['attachmentEncryptFilenames'] = 'Криптование имен вложений позволяет вам использовать более одного файла с одинаковыми именами, для безопасного использования .php файлов для вложений, и большей безопасности. Это конечно может создать некоторые трудности для восстановления базы данных, если что-то плохое случится.'; + +$helptxt['failed_login_threshold'] = 'Установить количество попыток входа на Форум, перед тем как перенаправить пользователя на страницу восстановления пароля.'; +$helptxt['edit_wait_time'] = 'Количество секунд для редактирования сообщения, перед тем как вставить дату последнего редактирования сообщения.'; +$helptxt['enableSpellChecking'] = 'Включение проверки орфографии. У вас ДОЛЖНА быть установлена pspell библиотека на сервере и конфигурация PHP должна использовать pspell библиотеку. На вашем сервере ' . (function_exists('pspell_new') == 1 ? 'ЕСТЬ' : 'НЕТ') . ' этой функции.'; +$helptxt['lastActive'] = 'Установить количество минут в течение которых пользователь отображается как активный на форуме. По умолчанию установлено 15 минут.'; + +$helptxt['autoOptDatabase'] = 'Эта опция оптимизирует базу данных через определенное количество дней. Поставьте 1, для ежедневной оптимизации. Вы также можете установить максимальное количество активных пользователей, чтобы не перегружать Ваш серевер и не создавать неудобств множеству пользователей.'; +$helptxt['autoFixDatabase'] = 'Это автоматически исправит сбойные таблицы, и Форум продолжит работу, как ни в чем не бывало. Это может быть полезным, так как единственный способ устранения неполадки - это ИСПРАВИТЬ таблицу, и ваш форум не отключится пока Вы не будете об этом знать. Вам отправится сообщение, что это произошло.'; + +$helptxt['enableParticipation'] = 'Будет отображаться маленькая иконка на теме, в которой пользователь писал сообщение.'; + +$helptxt['db_persist'] = 'Поддерживает соединение активным для увеличения производительности. Если у вас не выделенный сервер, могут появиться проблемы с Вашим хостом.'; + +$helptxt['queryless_urls'] = 'Это меняет немного формат URL-ов, что бошльше нравится поисковым машинам. Они будут выглядеть как index.php/topic,1.html.

    Эта опция будет ' . (strpos(php_sapi_name(), 'apache') !== false ? 'работать' : 'недоступна') . ' на Вашем сервере.'; +$helptxt['fixLongWords'] = 'Эта опция устанавливает максимальную длину слов на Форуме, чтобы не портить вид. Эта опция не должна быть менее 40.'; + +$helptxt['who_enabled'] = 'Эта опция включает или отключает возможность пользователей отслеживать, кто смотрит Форум и что он делает.'; + +$helptxt['recycle_enable'] = '"Восстанавливает" удаленные темы и сообщения в определенном разделе.'; + +$helptxt['default_personalText'] = 'Установить текст пользователя, который у него будет как "персональный текст."'; + +$helptxt['modlog_enabled'] = 'Вести лог модерирования.'; + +$helptxt['guest_hideContacts'] = 'Если отмечено это поле, то будет скрываться email и информация о мессенджерах всех пользователей от Гостей Форума'; + +$helptxt['registration_method'] = 'Эта опция определяет метод регистрации для желающих зарегистрироваться на Форуме. Вы можете выбрать из:

    +
      +
    • + Регистрация Отключена:
      + Отключает регистрацию, т.о. новые участники не могут регистрироваться на Вашем Форуме.
      +
    • + Мгновенная Регистрация
      + Новые участники могут зайти на Форум сразу же после регистрации.
      +
    • + Активация Участников
      + Когда выбрана эта опция, пользователь получит email с ссылкой для активации, которую ему надо будет нажать для того, чтобы стать полноценным участником.
      +
    • + Подтверждение Участников
      + Эта опция включает регистрацию новых участников только после подтверждения администратора Форума. +
    • +
    '; +$helptxt['send_validation_onChange'] = 'Когда отмеченно это поле, все пользователи, которые меняют свой Email в Профиле, должны будут реактевировать свой аккаунт из email, присланного на этот адрес.'; +$helptxt['send_welcomeEmail'] = 'Если отмечено это поле, все новые пользователи будут получать пригласительный email в Ваше сообщество'; +$helptxt['allow_hideOnline'] = 'Используя эту опцию, все пользователи смогут прятать свой статус активности на Форуме от других пользователей (кроме администраторов). Если не отмечено, то только пользователи, имеющие право модерировать форум, могут менять статус своего присутствия. Заметьте, что отключение этой опции не изменит существующий статус пользователя - это только запретит им прятаться в будущем.'; +$helptxt['allow_hideEmail'] = 'С включением этой опции, участники смогут прятать свой Email от других пользователей. Но, естественно, администратор будет видеть все адреса email.'; + +$helptxt['latest_support'] = 'Эта панель показывает наиболее часто встречающиеся проблемы и вопросы, возникающие на вашей конфигурации сервера. Не беспокойтесь, эта информации не отслеживается или что-то в этом роде.

    Если показывается сообщение "Retrieving support information...", Ваш компьютер, возможно, не может соединиться с www.simplemachines.org.'; +$helptxt['latest_packages'] = 'Здесь Вы увидите некоторые наиболее популярные моды и некоторые случайные моды, которые легко устанавливаются.

    Если эта секция не показывается, Ваш компьютер, возможно, не может соединиться сwww.simplemachines.org.'; +$helptxt['latest_themes'] = 'В этой области показывается несколько последних и наиболее популярных тем сwww.simplemachines.org. Может не отображаться, если Ваш компьютер не может найти www.simplemachines.org.'; + +$helptxt['secret_why_blank'] = 'Для обеспечения безопасности, ответ на вопрос (также как и пароль)закодирован, таким образом, SMF может только ответить правильно или нет, но никогда не скажет тебе (или кому-либо еще, ВАЖНО!) какой у Вас ответ или пароль'; +$helptxt['moderator_why_missing'] = 'После создания разделов, вы должны назначить модераторов из управление интерфейсом форума.'; + +$helptxt['permissions'] = 'Права означают, разрешается или запрещается определенным группам пользователей выполнять установленные действия.

    Вы можете изменить многие разделы, отметив здесь, либо посмотрите права для определенной группы нажав \'Изменить.\''; +$helptxt['permissions_board'] = 'Если раздел обозначен как \'Общий,\' значит, в нем не будет каких-то ограничений по доступу. \'Локальный\' означает, что здесь действуют определенные права, отличные от общих. Это позволит Вам создавать разделы с различными уровнями прав, избавив от необходимости устанавливать для каждого раздела отдельно.'; +$helptxt['permissions_quickgroups'] = 'Это позволит Вам использовать "умолчальные" настройки прав - стандартные обозначают \'ничего специального\', ограниченые обозначают \'гостевые\', модератор означает \'что модератор может\', и наконец \'поддержка\' означает права очень близкие к администраторским.'; +$helptxt['membergroups'] = 'В SMF существует две группы, в которых могут состоять участники. Это: +
      +
    • Обычные Группы: Обычная группа - это группа, в которую участник не заносится автоматически. Чтобы добавить участника в группу, просто зайдите в его Профиль, и кликните на "Настройки Аккаунта". Отсюда Вы можете добавить участника в обычную группу.
    • +
    • Группы По Сообщениям: В отличие от обычных групп, в эту группу нельзя добавить участников. Вместо этого участники автоматически заносятся в группу по достижению минимально необходимого количества сообщений.
    • +
    '; + +$helptxt['calendar_how_edit'] = 'Вы можете редактировать события, кликнув на красную звездочку (*) сразу за именем.'; + +$helptxt['maintenance_general'] = 'Отсюда Вы можете оптимизировать все таблицы (чтобы сделать их меньше и быстрее!), убедиться, что у Вас новейшая версия, найти все ошибки, которые могут путать Ваш Форум, пересчитать все и удалить логи.

    Последние два пункта необходимо избегать, пока что-то не сбоит, но они не портят ничего.'; +$helptxt['maintenance_backup'] = 'Эта область позволяет Вам сохранить копию всех сообщений, настроек, участников и другую информацию на Вашем Форуме в очень большой файл.

    Рекомендуется делать это почаще, например, раз в неделю, для большей безопасности.'; +$helptxt['maintenance_rot'] = 'Это позволяет Вам полностью и безвозвратно удалить старые сообщения. Рекомендуется, сначала сделать бекап, в случае, если Вы удалите что-то не то, что хотели.

    Используйте эту опцию осторожно.'; + +$helptxt['avatar_allow_server_stored'] = 'Это позволяет Вашим участникам выбирать аватар, из имеющихся на сервере. Они обычно в том же месте что и SMF в папке аватаров.
    Дополнительно, Вы можете создавать директории в этой папке, чтобы сделать "категории" аватаров.'; +$helptxt['avatar_allow_external_url'] = 'Если это включено, Ваши участники могут вводить URL на их собственный аватар. Плохая сторона этого, то, что они слишком большие или содержат что-то нехорошее.

    Помните, что пользователи должны иметь права выбора удаленного аватара, чтобы это работало для них. Эта опция включается только для тех, кто имеет достаточно прав.'; +$helptxt['avatar_check_size'] = 'Это может помочь "включить" ограничение по размеру аватара, но это также может заметно тормозить. Используйте осторожно.'; +$helptxt['avatar_allow_upload'] = 'Эта опция очень похожа на "Разрешить участникам использовать удаленный аватар",но у Вас будет больший контроль над аватарами, лучшая возможность для изменения размера, и вашим пользователям не надо иметь аватар где-то на стороне.

    Но с другой стороны, это может израсходовать много места на вашем сервере.'; +$helptxt['avatar_download_png'] = 'PNG формат больше, но предлагает более качественное сжатие. Если здесь не отмечено, будет использоваться JPEG, который меньше, но хуже по качеству.'; + +$helptxt['disableHostnameLookup'] = 'Это отключит отображение имя хоста, что на некоторых серверах работает медленно. Заметьте, это сделает банеры менее эффективными.'; + +$helptxt['search_match_complete_words'] = 'Эта опция ограничивает результаты поиска по словам целиком, которые соответствуют пользовательским запросам. Например, если эта опция отключена, слово в поиске \'here\' будет соответствовать результатам \'here\', \'there\', и \'hereafter\'. Включив данную опцию, результат ограничится только соответствием \'here\'.

    Пожалуйста помните, что включение этой функции замедляет поиск, особенно если количество сообщений будет большим'; +$helptxt['disableTemporaryTables'] = 'Эта опция предотвращает использование временных таблиц. Эта опция замедляет механизм поиска, рекомендуется, только если у вас нет возможности создавать временные таблицы.'; +$helptxt['search_cache_size'] = 'Кэширование поиска используется для ограничения обширного количества запросов в базе данных. Результаты запроса кэшируются в базе данных. Таким образом, следующая страница просмотра результатов будет доступна без дополнительного поиска.

    Используйте эту настройку для ограничения размера кэшируемых результатов. Увеличив это значение, требуется большая база данных (около 20kb на каждый запрос).'; +$helptxt['search_weight_frequency'] = 'Факторы соответствия используются для определения релевантности результатов поиска. Измените эти факторы соответствия для наиболее важных вещей вашего форума. Например, для форума новостного сайта большое значение имеют \'последние подходящие сообщения\'. Все значения связаны между собой и должны быть положительными и целыми.

    Этот фактор считает количество подходящих сообщений и делит их на общее количество сообщений в теме.'; +$helptxt['search_weight_age'] = 'Факторы соответствия используются для определения релевантности результатов поиска. Измените эти факторы соответствия для для наиболее важных вещей вашего форума. Например, для форума новостного сайта большое значение имеют \'последние подходящие сообщения\'. Все значения связаны между собой и должны быть положительными и целыми.

    Этот фактор определяет возраст последнего подходящего сообщения в теме. Чем более поздние сообщения, тем больше у них значимость.'; +$helptxt['search_weight_length'] = 'Факторы соответствия используются для определения релевантности результатов поиска. Измените эти факторы соответствия для наиболее важных вещей вашего форума. Например, для форума новостного сайта большое значение имеют \'последние подходящие сообщения\'. Все значения связаны между собой и должны быть положительными и целыми.

    Этот фактор основан на размере темы. Чем больше сообщений в теме, тем более значима эта тема.'; +$helptxt['search_weight_subject'] = 'Факторы соответствия используются для определения релевантности результатов поиска. Измените эти факторы соответствия для наиболее важных вещей вашего форума. Например, для форума новостного сайта большое значение имеют \'последние подходящие сообщения\'. Все значения связаны между собой и должны быть положительными и целыми.

    Этот фактор зависит от присутствия искомого слова в названиях тем.'; +$helptxt['search_weight_first_message'] = 'Факторы соответствия используются для определения релевантности результатов поиска. Измените эти факторы соответствия для наиболее важных вещей вашего форума. Например, для форума новостного сайта большое значение имеют \'последние подходящие сообщения\'. Все значения связаны между собой и должны быть положительными и целыми.

    Этот фактор зависит от присутствия запроса в первом сообщении темы.'; + +$helptxt['see_admin_ip'] = 'IP адреса показываются администраторам и модераторам, чтобы облегчить модерирование и отслеживание действий пользователей. Помните, что не все IP адреса могут быть идентифицированы, и большинство адресов периодически меняется.

    Пользователям также позволяется смотреть собственные IP.'; +$helptxt['see_member_ip'] = 'Ваш IP адрес показывается только Вам и модераторам. Помните, что эта информация не идентифицируется, и что большинство IP меняются периодически.

    Вы не можете смотреть IP других пользователей, а они не могут видеть ваших.'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Install.english.php b/Themes/default/languages/Install.english.php new file mode 100644 index 0000000..6aeff8f --- /dev/null +++ b/Themes/default/languages/Install.english.php @@ -0,0 +1,103 @@ +help is available if you need it.'; +$txt['still_writable'] = 'Your installation directory is still writable. It\'s a good idea to chmod it so that it is not writable for security reasons.'; +$txt['delete_installer'] = 'Click here to delete this install.php file now. (doesn\'t work on all servers.)'; +$txt['go_to_your_forum'] = 'Now you can see your newly installed forum and begin to use it. You should first make sure you are logged in, after which you will be able to access the administration center.'; +$txt['good_luck'] = 'Good luck!
    Simple Machines'; + +$txt['user_refresh_install'] = 'Forum Refreshed'; +$txt['user_refresh_install_desc'] = 'While installing, the installer found that (with the details you provided) one or more of the tables this installer might create already existed.
    Any missing tables in your installation have been recreated with the default data, but no data was deleted from existing tables.'; + +$txt['default_topic_subject'] = 'Welcome to SMF!'; +$txt['default_topic_message'] = 'Welcome to Simple Machines Forum!

    We hope you enjoy using your forum.  If you have any problems, please feel free to [url=http://www.simplemachines.org/community/index.php]ask us for assistance[/url].

    Thanks!
    Simple Machines'; +$txt['default_board_name'] = 'General Discussion'; +$txt['default_board_description'] = 'Feel free to talk about anything and everything in this board.'; +$txt['default_category_name'] = 'General Category'; +$txt['default_time_format'] = '%B %d, %Y, %I:%M:%S %p'; + +$txt['error_message_click'] = 'Click here'; +$txt['error_message_try_again'] = 'to try this step again.'; +$txt['error_message_bad_try_again'] = 'to try installing anyway, but note that this is strongly discouraged.'; + +$txt['install_settings'] = 'Basic Settings'; +$txt['install_settings_info'] = 'Just a few things for you to setup ;).'; +$txt['install_settings_name'] = 'Forum name'; +$txt['install_settings_name_info'] = 'This is the name of your forum, ie. "The Testing Forum".'; +$txt['install_settings_name_default'] = 'My Community'; +$txt['install_settings_url'] = 'Forum URL'; +$txt['install_settings_url_info'] = 'This is the URL to your forum without the trailing \'/\'!.
    In most cases, you can leave the default value in this box alone - it is usually right.'; +$txt['install_settings_compress'] = 'Gzip Output'; +$txt['install_settings_compress_title'] = 'Compress output to save bandwidth.'; +// In this string, you can translate the word "PASS" to change what it says when the test passes. +$txt['install_settings_compress_info'] = 'This function does not work properly on all servers, but can save you a lot of bandwidth.
    Click here to test it. (it should just say "PASS".)'; +$txt['install_settings_dbsession'] = 'Database Sessions'; +$txt['install_settings_dbsession_title'] = 'Use the database for sessions instead of using files.'; +$txt['install_settings_dbsession_info1'] = 'This feature is almost always for the best, as it makes sessions more dependable.'; +$txt['install_settings_dbsession_info2'] = 'It doesn\'t seem like this feature will work on your server, but you can try it.'; +$txt['install_settings_proceed'] = 'Proceed'; + +$txt['mysql_settings'] = 'MySQL Server Settings'; +$txt['mysql_settings_info'] = 'These are the settings to use for your MySQL server. If you don\'t know the values, you should ask your host what they are.'; +$txt['mysql_settings_server'] = 'MySQL server name'; +$txt['mysql_settings_server_info'] = 'This is nearly always localhost - so if you don\'t know, try localhost.'; +$txt['mysql_settings_username'] = 'MySQL username'; +$txt['mysql_settings_username_info'] = 'Fill in the username you need to connect to your MySQL database here.
    If you don\'t know what it is, try the username of your ftp account, most of the time they are the same.'; +$txt['mysql_settings_password'] = 'MySQL password'; +$txt['mysql_settings_password_info'] = 'Here, put the password you need to connect to your MySQL database.
    If you don\'t know this, you should try the password to your ftp account.'; +$txt['mysql_settings_database'] = 'MySQL database name'; +$txt['mysql_settings_database_info'] = 'Fill in the name of the database you want to use for SMF to store its data in.
    If this database does not exist, this installer will try to create it.'; +$txt['mysql_settings_prefix'] = 'MySQL table prefix'; +$txt['mysql_settings_prefix_info'] = 'The prefix for every table in the database. Do not install two forums with the same prefix!
    This value allows for multiple installations in one database.'; + +$txt['user_settings'] = 'Create Your Account'; +$txt['user_settings_info'] = 'The installer will now create a new administrator account for you.'; +$txt['user_settings_username'] = 'Your username'; +$txt['user_settings_username_info'] = 'Choose the name you want to login with.
    This can\'t be changed later, but your display name can be.'; +$txt['user_settings_password'] = 'Password'; +$txt['user_settings_password_info'] = 'Fill in your preferred password here, and remember it well!'; +$txt['user_settings_again'] = 'Password'; +$txt['user_settings_again_info'] = '(just for verification.)'; +$txt['user_settings_email'] = 'Email Address'; +$txt['user_settings_email_info'] = 'Provide your email address as well. This must be a valid email address.'; +$txt['user_settings_database'] = 'MySQL Database Password'; +$txt['user_settings_database_info'] = 'The installer requires that you supply the database password to create an administrator account, for security reasons.'; +$txt['user_settings_proceed'] = 'Finish'; + +$txt['ftp_setup'] = 'FTP Connection Information'; +$txt['ftp_setup_info'] = 'This installer can connect via FTP to fix the files that need to be writable and are not. If this doesn\'t work for you, you will have to go in manually and make the files writable. Please note that this doesn\'t support SSL right now.'; +$txt['ftp_server'] = 'Server'; +$txt['ftp_server_info'] = 'This should be the server and port for your FTP server.'; +$txt['ftp_port'] = 'Port'; +$txt['ftp_username'] = 'Username'; +$txt['ftp_username_info'] = 'The username to login with. This will not be saved anywhere.'; +$txt['ftp_password'] = 'Password'; +$txt['ftp_password_info'] = 'The password to login with. This will not be saved anywhere.'; +$txt['ftp_path'] = 'Install Path'; +$txt['ftp_path_info'] = 'This is the relative path you use in your FTP server.'; +$txt['ftp_connect'] = 'Connect'; +$txt['ftp_setup_why'] = 'What is this step for?'; +$txt['ftp_setup_why_info'] = 'Some files need to be writable for SMF to work properly. This step allows you to let the installer make them writable for you. However, in some cases it won\'t work - in that case, please make the following files 777 (writable):'; +$txt['ftp_setup_again'] = 'to test if these files are writable again.'; + +$txt['error_php_too_low'] = 'Warning! You do not appear to have a version of PHP installed on your webserver that meets SMF\'s minimum installations requirements.
    If you are not the host, you will need to ask your host to upgrade, or use a different host - otherwise, please upgrade PHP to a recent version.

    If you know for a fact that your PHP version is high enough you may continue, although this is strongly discouraged.'; +$txt['error_missing_files'] = 'Unable to find crucial installation files in the directory of this script!

    Please make sure you uploaded the entire installation package, including the sql file, and then try again.'; +$txt['error_session_save_path'] = 'Please inform your host that the session.save_path specified in php.ini is not valid! It needs to be changed to a directory that exists, and is writable by the user PHP is running under.
    '; +$txt['error_windows_chmod'] = 'You\'re on a windows server, and some crucial files are not writable. Please ask your host to give write permissions to the user PHP is running under for the files in your SMF installation. The following files or directories need to be writable:'; +$txt['error_ftp_no_connect'] = 'Unable to connect to FTP server with this combination of details.'; +$txt['error_mysql_connect'] = 'Cannot connect to the MySQL database server with the supplied data.

    If you are not sure about what to type in, please contact your host.'; +$txt['error_mysql_too_low'] = 'The version of MySQL that your database server is using is very old, and does not meet SMF\'s minimum requirements.

    Please ask your host to either upgrade it or supply a new one, and if they won\'t, please try a different host.'; +$txt['error_mysql_database'] = 'The installer was unable to access the "%s" database. With some hosts, you have to create the database in your administration panel before SMF can use it. Some also add prefixes - like your username - to your database names.'; +$txt['error_mysql_queries'] = 'Some of the queries were not executed properly. This could be caused by an unsupported (development or old) version of MySQL.

    Technical information about the queries:'; +$txt['error_mysql_queries_line'] = 'Line #'; +$txt['error_mysql_missing'] = 'The installer was unable to detect MySQL support in PHP. Please ask your host to ensure that PHP was compiled with MySQL, or that the proper extension is being loaded.'; +$txt['error_user_settings_again_match'] = 'You typed in two completely different passwords!'; +$txt['error_user_settings_taken'] = 'Sorry, a member is already registered with that username and/or password.

    A new account has not been created.'; +$txt['error_user_settings_query'] = 'A database error occurred while trying to create an administrator. This error was:'; +$txt['error_subs_missing'] = 'Unable to find the Sources/Subs.php file. Please make sure it was uploaded properly, and then try again.'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Install.russian.php b/Themes/default/languages/Install.russian.php new file mode 100644 index 0000000..a6c7e51 --- /dev/null +++ b/Themes/default/languages/Install.russian.php @@ -0,0 +1,103 @@ +доступна помощь если потребуется.'; +$txt['still_writable'] = 'Ваша установочная директория записываема. Неплохая идея, сменить CHMOD, чтобы она не была записываема из соображений безопасности.'; +$txt['delete_installer'] = 'Кликните сюда, чтобы удалить файл install.php сейчасже. (работает не на всех серверах.)'; +$txt['go_to_your_forum'] = 'Теперь Вы можете посмотреть Ваш вновь установленный Форум и начать им пользоваться. Сперва убедитесь, что Вы зашли на Форум, после чего будет доступен раздел администрирования.'; +$txt['good_luck'] = 'Удачи!
    Simple Machines'; + +$txt['user_refresh_install'] = 'Форум Обновлен'; +$txt['user_refresh_install_desc'] = 'В процессе установки было обнаружено (используя предоставленные Вами данные), что одна или более таблиц, которые могла создать программа установки, уже существуют.
    Любые пропущенные таблицы при установке были вновь созданы и содержат данные, как по умолчанию, но никакая информация не была уничтожена в существующих таблицах.'; + +$txt['default_topic_subject'] = 'Добро пожаловать в SMF!'; +$txt['default_topic_message'] = 'Добро пожаловать на Simple Machines Forum!

    Мы надеемся, что Вам понравится работать с нашим форумом.  При возникновении любых проблем [url=http://www.simplemachines.org/community/index.php]обращайтесь за помощью[/url].

    Спасибо!
    Simple Machines'; +$txt['default_board_name'] = 'General Discussion'; +$txt['default_board_description'] = 'Вы можете обсудить любые вопросы в этом разделе.'; +$txt['default_category_name'] = 'General Category'; +$txt['default_time_format'] = '%B %d, %Y, %I:%M:%S %p'; + +$txt['error_message_click'] = 'Кликните сюда'; +$txt['error_message_try_again'] = 'чтобы повторить этот шаг снова.'; +$txt['error_message_bad_try_again'] = 'все равно попробовать установить, но учтите, что это строго не рекомендуется.'; + +$txt['install_settings'] = 'Основные Настройки'; +$txt['install_settings_info'] = 'Всего несколько пунктов для Вашей установки ;).'; +$txt['install_settings_name'] = 'Название Форума'; +$txt['install_settings_name_info'] = 'Это имя Вашего Форума, например "Тестовый Форум".'; +$txt['install_settings_name_default'] = 'My Community'; +$txt['install_settings_url'] = 'URL Форума'; +$txt['install_settings_url_info'] = 'Это URL ведущий на Ваш Форум без сопровождающих знаков \'/\'!.
    В большинстве случаев, Вы можете оставить это поле без изменений - оно, обычно, правильное.'; +$txt['install_settings_compress'] = 'Gzip Версия'; +$txt['install_settings_compress_title'] = 'Сжатая версия бережет трафик.'; +// In this string, you can translate the word "PASS" to change what it says when the test passes. +$txt['install_settings_compress_info'] = 'Эта функция не всегда поддерживается серверами, но помогает сберечь трафик.
    Нажмите сюда чтобы проверить эту функцию. (Ответ должен быть "РАБОТАЕТ".)'; +$txt['install_settings_dbsession'] = 'Сессии Базы Данных'; +$txt['install_settings_dbsession_title'] = 'Используйте Базу Данных сессиями вместо использования файлов.'; +$txt['install_settings_dbsession_info1'] = 'Эта возможность почти всегда более предпочтительна, так как делает сессии более зависимыми.'; +$txt['install_settings_dbsession_info2'] = ' Вряд ли это сработает на Вашем сервере, но Вы можете попробовать.'; +$txt['install_settings_proceed'] = 'Продолжить'; + +$txt['mysql_settings'] = 'Настройки MySQL Сервера'; +$txt['mysql_settings_info'] = 'Это необходимые настройки для использования Вашего MySQL сервера. Если вы их не знаете, то следует узнать их у провайдера.'; +$txt['mysql_settings_server'] = 'Имя MySQL сервера'; +$txt['mysql_settings_server_info'] = 'Почти всегда это localhost - поэтому, если Вы точно не знаете, попробуйте localhost.'; +$txt['mysql_settings_username'] = 'Имя пользователя MySQL'; +$txt['mysql_settings_username_info'] = 'Впишите имя пользователя, необходимое здесь для соединения с Вашей MySQL Базой Данных.
    Если Вы не знаете, попробуйте имя(username) вашего ftp аккаунта, часто они одинаковы.'; +$txt['mysql_settings_password'] = 'Пароль MySQL'; +$txt['mysql_settings_password_info'] = 'Здесь введите пароль для соединения с MySQL Базой Данных.
    Если не знаете, попробуйте пароль вашего ftp аккаунта.'; +$txt['mysql_settings_database'] = 'Название Базы Данных MySQL'; +$txt['mysql_settings_database_info'] = 'Впишите название Базы Данных, которое будет использоваться SMF для хранения данных.
    Если БД не существует, программа-установщик попробует создать ее.'; +$txt['mysql_settings_prefix'] = 'MySQL префикс таблиц'; +$txt['mysql_settings_prefix_info'] = 'Префикс для каждой таблицы Базы Данных. Не устанавливайте два Форума с одинаковыми префиксами!
    Это значение позволяет множественную установку в одну Базу Данных.'; + +$txt['user_settings'] = 'Создайте Ваш Аккаунт'; +$txt['user_settings_info'] = 'Установщик сейчас создаст новый аккаунт администратора для Вас.'; +$txt['user_settings_username'] = 'Ваше имя пользователя'; +$txt['user_settings_username_info'] = 'Выберите имя, которое Вы будете вводить для входа на Форум.
    Его нельзя будет изменить, но отображаемое имя можно.'; +$txt['user_settings_password'] = 'Пароль'; +$txt['user_settings_password_info'] = 'Введите сюда Ваш пароль и запомните его!'; +$txt['user_settings_again'] = 'Пароль'; +$txt['user_settings_again_info'] = '(для сверки.)'; +$txt['user_settings_email'] = 'Email Адрес'; +$txt['user_settings_email_info'] = 'Впишите Ваш email адрес также. Это должен быть действующий email адрес.'; +$txt['user_settings_database'] = 'Пароль MySQL Базы Данных'; +$txt['user_settings_database_info'] = 'Установка требует, чтобы Вы ввели пароль Базы Данных для создания аккаунта, это из соображений безопасности.'; +$txt['user_settings_proceed'] = 'Конец'; + +$txt['ftp_setup'] = 'Информация FTP Соединения'; +$txt['ftp_setup_info'] = 'Установщик может соединяться через FTP, чтобы исправить файлы, которые должны быть записываемые и нет. Если у Вас не срабатывает, Вам придется в ручную сделать файлы записываемыми. Пожалуйста обратите внимание, что SSL сразу не поддерживается.'; +$txt['ftp_server'] = 'Сервер'; +$txt['ftp_server_info'] = 'Это должен быть сервер и порт Вашего FTP сервера.'; +$txt['ftp_port'] = 'Порт'; +$txt['ftp_username'] = 'Имя пользователя'; +$txt['ftp_username_info'] = 'Имя пользователя(username) для входа на FTP. Оно не будет сохранено где бы то ни было.'; +$txt['ftp_password'] = 'Пароль'; +$txt['ftp_password_info'] = 'Пароль для входа на FTP. Он не будет сохранен где бы то ни было.'; +$txt['ftp_path'] = 'Путь Установки'; +$txt['ftp_path_info'] = 'Это родной путь, используемый на Вашем FTP сервер.'; +$txt['ftp_connect'] = 'Соединиться'; +$txt['ftp_setup_why'] = 'Для чего этот шаг?'; +$txt['ftp_setup_why_info'] = 'Некоторые файлы должны быть записываемы для нормальной работы SMF. Этот шаг позволяет Вам предоставить эту возможность установщику, т.е. сделать записываемыми без Вашего вмешательства. Естественно, в некоторых случаях иногда это не работает. Тогда сделайте следующие файлы CHMOD 777 (записываемыми):'; +$txt['ftp_setup_again'] = 'проверяет снова возможность записи файлов.'; + +$txt['error_php_too_low'] = 'Предупреждение! Не похоже, что на Вашем сервере установлена версия PHP, а это является минимальным требованием SMF для установки.
    Если у Вас не собственный хостинг, Вам необходимо попросить провайдера модернизироваться, или придется использовать другой хостинг, пожалуйста обновите PHP до недавних версий.

    Если Вы уверены, что Ваша PHP версия вполне подходит, можно продолжить, хотя это строго не рекомендуется.'; +$txt['error_missing_files'] = 'Не получилось найти важных установочных файлов в директории по скрипту!

    Пожалуйста, проверьте, что загружена вся установочная папка, включая sql файл и попробуйте заново.'; +$txt['error_session_save_path'] = 'Пожалуйста, уведомьте вашего хостера, что session.save_path указанный в php.ini не действителен! Его необходимо заменить на существующую директорию, и доступна запись под PHP.
    '; +$txt['error_windows_chmod'] = 'У вас windows сервер, и некоторые ключевые файлы не записываемы. Пожалуйста, обратитесь к Вашему хостеру, чтобы он сделал доступной перезапись для пользователей, при использовании PHP, для файлов Вашей SMF установки. Следующие директории должны быть записываемые:'; +$txt['error_ftp_no_connect'] = 'Невозможно подключиться к FTP серверу используя эти данные.'; +$txt['error_mysql_connect'] = 'Не получилось соединиться с Базой Данных MySQL сервера, используя предоставленные данные.

    Если Вы не знаете, что надо вводить, пожалуйста, узнайте у хостера.'; +$txt['error_mysql_too_low'] = 'Версия MySQL сервера, которую использует ваша БД, очень старая, и не соответствует минимальным требованиям SMF.

    Пожалуйста, попросите хостера обновить версию, а если Вам откажут, то придется найти другого хостера.'; +$txt['error_mysql_database'] = 'Инсталлятор не смог получить доступ к "%s" Базе Данных. На некоторых хостах, Вам необходимо создать БД в панели администратора, перед тем, как SMF сможет ее использовать. Еще можно добавить префиксы - как Ваше имя пользователя(username) - как имя вашей Базы Данных..'; +$txt['error_mysql_queries'] = 'Некоторые запросы не были выполнены правильно. Это возможно связано с не поддерживающей (разработчики мешают или старая) версией MySQL.

    Техническая информация по запросам:'; +$txt['error_mysql_queries_line'] = 'Строка #'; +$txt['error_mysql_missing'] = 'Инсталлятор не обнаружил поддержки MySQL в PHP. Пожалуйста, попросите хостера убедиться, что PHP составлен с использованием MySQL, или необходимые расширения были загружены.'; +$txt['error_user_settings_again_match'] = 'Вы ввели абсолютно разные пароли!'; +$txt['error_user_settings_taken'] = 'Извините, участник уже существует с таким именем и/или паролем.

    Новый аккаунт не был создан.'; +$txt['error_user_settings_query'] = 'Ошибка базы данных произошла в процессе создания администратора. Это следующая ошибка:'; +$txt['error_subs_missing'] = 'Не получается найти Sources/Subs.php файл. Пожалуйста, убедитесь, что они загружены и попробуйте снова'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/InstantMessage.english.php b/Themes/default/languages/InstantMessage.english.php new file mode 100644 index 0000000..7e8a0d0 --- /dev/null +++ b/Themes/default/languages/InstantMessage.english.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/Themes/default/languages/InstantMessage.russian.php b/Themes/default/languages/InstantMessage.russian.php new file mode 100644 index 0000000..a86ab72 --- /dev/null +++ b/Themes/default/languages/InstantMessage.russian.php @@ -0,0 +1,38 @@ + diff --git a/Themes/default/languages/Login.english.php b/Themes/default/languages/Login.english.php new file mode 100644 index 0000000..5e8bd0a --- /dev/null +++ b/Themes/default/languages/Login.english.php @@ -0,0 +1,110 @@ + \ No newline at end of file diff --git a/Themes/default/languages/Login.russian.php b/Themes/default/languages/Login.russian.php new file mode 100644 index 0000000..58b804c --- /dev/null +++ b/Themes/default/languages/Login.russian.php @@ -0,0 +1,108 @@ + или просто посетите эту страницу сразу же после входа:'; +$txt[719] = 'Ваше имя пользователя:'; +$txt[730] = 'Этот email (%s) уже используется зарегистрированным пользователем. Если это ошибка, перейдите на страницу входа и выберите Забыл пароль.'; + +$txt['ban_register_prohibited'] = 'Извините, вы не можете зарегистрироваться на этом форуме.'; + +$txt['activate_mail'] = ' Прежде чем войти на форум вы должны активировать ваш аккаунт. Пожалуйста, пройдите по этой ссылке'; +$txt['activate_account'] = 'Активация аккаунта'; +$txt['activate_success'] = 'Ваш аккаунт был успешно активирован. Теперь вы можете войти на форум под вашим логином.'; +$txt['activate_not_completed1'] = 'Прежде чем вы сможете войти на форум вам необходимо проверить ваш почтовый ящик, адрес которого вы указали при регистрации. По данному адресу придёт специальное письмо, в котором будут находиться инструкции по активации вашего аккаунта.'; +$txt['activate_not_completed2'] = 'Отправить ещё одно письмо для активации?'; +$txt['activate_after_registration'] = 'Большое спасибо за регистрацию. В ближайшее время на ваш электронный адрес придёт письмо, содержащее ссылку, проследовав по которой вы активируете ваш аккаунт.'; +$txt['invalid_userid'] = 'Пользователь не создан'; +$txt['invalid_activation_code'] = 'Неправильный код для активации'; +$txt['invalid_activation_username'] = 'Имя или e-mail'; +$txt['invalid_activation_new'] = ' Если Вы зарегистрировались с неправильным адресом электронной почты, введите новый адрес и ваш пароль здесь.'; +$txt['invalid_activation_new_email'] = 'Новый действующий e-mail адрес '; +$txt['invalid_activation_password'] = 'Старый пароль'; +$txt['invalid_activation_resend'] = 'Переслать код для активации'; +$txt['invalid_activation_known'] = 'Если вы уже знаете ваш код активации, пожалуйста, введите его здесь.'; +$txt['invalid_activation_retry'] = 'Код для активации'; +$txt['invalid_activation_submit'] = 'Активировать'; + +$txt['change_email_success'] = 'Ваш e-mail адрес был изменён и на него было выслано новое письмо для активации аккаунта.'; +$txt['resend_email_success'] = 'Письмо с кодом для активации отправлено на ваш новый адрес.'; +$txt['change_password'] = 'Подробности о вашем новом пароле'; +$txt['change_password_1'] = 'Подробности о вашем логине '; +$txt['change_password_2'] = 'произошли изменения и ваш пароль был сменился. Подробнее.'; + +$txt['maintenance3'] = 'Этот раздел форума находится в режиме обслуживания.'; + +$txt['register_agree'] = 'Пожалуйста, прочтите и примите условия соглашения.'; + +$txt['approval_after_registration'] = 'Большое спасибо за регистрацию. Вы сможете начать пользоваться вашим аккаунтом после получения письма-уведомления от администратора форума.'; +$txt['approval_email'] = 'Вы сможете начать пользоваться вашим аккаунтом после получения письма-уведомления от администратора форума.'; + +$txt['admin_register'] = 'Регистрация '; +$txt['admin_register_desc'] = 'Здесь вы можете регистрировать новых пользователей и при желании уведомлять их по e-mail об этом.'; +$txt['admin_register_username'] = ' Новое имя пользователя'; +$txt['admin_register_email'] = 'E-mail'; +$txt['admin_register_password'] = 'Пароль'; +$txt['admin_register_username_desc'] = 'Имя пользователя для нового участника'; +$txt['admin_register_email_desc'] = 'E-mail участника'; +$txt['admin_register_password_desc'] = 'Пароль для нового участника'; +$txt['admin_register_email_detail'] = ' Отправить новый пароль участнику по e-mail'; +$txt['admin_register_email_detail_desc'] = 'Email требуется даже если не выбран'; +$txt['admin_register_email_activate'] = 'Требуется активация аккаунта пользователя'; +$txt['admin_register_group'] = 'Основная группа пользователей'; +$txt['admin_register_group_desc'] = ' Новый пользователь входит в Основную группу'; +$txt['admin_register_group_none'] = '(не входит в Основную группу пользователей)'; + +$txt['admin_browse_approve'] = 'Пользователи, ожидающие разрешения администратора форума'; +$txt['admin_browse_approve_desc'] = 'Здесь Вы можете управлять пользователями, ожидающими разрешения администратора форума.'; +$txt['admin_browse_activate'] = 'Участники, ожидающие активации своих аккаунтов'; +$txt['admin_browse_activate_desc'] = 'Список участников до сих пор не активировавших свои аккаунты.'; +$txt['admin_browse_register_new'] = 'Регистрация нового участника'; +$txt['admin_browse_awaiting_approval'] = 'Ожидает разрешения'; +$txt['admin_browse_awaiting_activate'] = ' Ожидает активации'; +$txt['admin_browse_username'] = ' Имя пользователя'; +$txt['admin_browse_email'] = 'Email'; +$txt['admin_browse_ip'] = 'IP'; +$txt['admin_browse_registered'] = 'Зарегистрированный пользователь'; +$txt['admin_browse_id'] = 'ID'; +$txt['admin_browse_with_selected'] = 'с выбранными'; +$txt['admin_browse_no_members'] = 'нет пользователей в данный момент'; +// Don't use entities in the below strings, except the main ones. (lt, gt, quot.) +$txt['admin_browse_warn'] = ' все выбранные участники?'; +$txt['admin_browse_w_approve'] = ' подтвердить'; +$txt['admin_browse_w_activate'] = ' Активировать'; +$txt['admin_browse_w_delete'] = ' Удалить'; +$txt['admin_browse_w_remind'] = ' Напомнить'; +$txt['admin_browse_w_email'] = ' и отправить e-mail'; + +$txt['admin_approve_reject'] = ' Отклонённая регистрация'; +$txt['admin_approve_reject_desc'] = ' С сожалением сообщаю, что Ваше заявление о регистрации на форуме'; +$txt['admin_approve_reject_desc2'] = 'было отклонено.'; +$txt['admin_approve_remind'] = 'Напоминание о регистрации'; +$txt['admin_approve_remind_desc'] = ' Вы до сих пор не активировали ваш аккаунт на'; +$txt['admin_approve_remind_desc2'] = 'Пожалуйста, для активирования вашего аккаунта, пройдите по ссылке:'; +$txt['admin_approve_accept_desc'] = 'Ваш аккаунт был активирован администратором форума вручную, и теперь вы можете входить на форум и оставлять свои сообщения.'; + +$txt['admin_notify_subject'] = 'Новый участник'; +$txt['admin_notify_profile'] = '%s стал новым участником на вашем форуме. Пройдите по нижеследующей ссылке чтобы просмотреть его профиль.'; +$txt['admin_notify_approval'] = 'Прежде чем этот пользователь станет полноправным участником форума его аккаунт должен получить одобрение администратора. Пройдите по нижеследующей ссылке, чтобы принять своё решение по данному пользователю:'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/ManageBoards.english.php b/Themes/default/languages/ManageBoards.english.php new file mode 100644 index 0000000..1b61261 --- /dev/null +++ b/Themes/default/languages/ManageBoards.english.php @@ -0,0 +1,66 @@ +"username", "username". (these must be usernames not display names!)
    To create a new board, click the Add Board button. To make the new board a child of a current board, select "Child of..." from the Order drop down menu when creating the board.'; +$txt['parent_members_only'] = 'Ungrouped Members'; +$txt['parent_guests_only'] = 'Guests'; +$txt['catConfirm'] = 'Do you really want to delete this category?'; +$txt['boardConfirm'] = 'Do you really want to delete this board?'; + +$txt['catEdit'] = 'Edit Category'; +$txt['boardsEdit'] = 'Modify Boards'; +$txt['collapse_enable'] = 'Collapsable'; +$txt['collapse_desc'] = 'Allow users to collapse this category?'; +$txt['catModify'] = '(modify)'; + +$txt['mboards_order_after'] = 'After '; +$txt['mboards_order_inside'] = 'Inside '; +$txt['mboards_order_first'] = 'In first place'; + +$txt['mboards_new_cat'] = 'Create new category'; +$txt['mboards_new_board'] = 'Add Board'; +$txt['mboards_new_cat_name'] = 'New Category'; +$txt['mboards_add_cat_button'] = 'Add Category'; +$txt['mboards_new_board_name'] = 'New Board'; + +$txt['mboards_name'] = 'Name'; +$txt['mboards_modify'] = 'modify'; +$txt['mboards_permissions'] = 'permissions'; + +$txt['mboards_delete_cat'] = 'Delete Category'; +$txt['mboards_delete_board'] = 'Delete Board'; + +$txt['mboards_delete_cat_contains'] = 'Deleting this category will also delete the below boards, including all topics, posts and attachments within each board'; +$txt['mboards_delete_what_do'] = 'Please select what you would like to do with these boards'; +$txt['mboards_delete_option1'] = 'Delete category and all boards contained within.'; +$txt['mboards_delete_option2'] = 'Delete category and move all boards contained within to'; +$txt['mboards_delete_confirm'] = 'Confirm'; +$txt['mboards_delete_cancel'] = 'Cancel'; +$txt['mboards_delete_error'] = 'No category selected!'; + +$txt['mboards_category'] = 'Category'; +$txt['mboards_description'] = 'Description'; +$txt['mboards_description_desc'] = 'A short description of your board.'; +$txt['mboards_groups'] = 'Allowed Groups'; +$txt['mboards_groups_desc'] = 'Groups allowed to access this board.'; +$txt['mboards_moderators'] = 'Moderators'; +$txt['mboards_moderators_desc'] = 'Additional members to have moderation privileges on this board. Note that administrators don\'t have to be listed here.'; +$txt['mboards_count_posts'] = 'Count Posts'; +$txt['mboards_count_posts_desc'] = 'Makes new replies and topics raise members\' post counts.'; +$txt['mboards_unchanged'] = 'Unchanged'; +$txt['mboards_theme'] = 'Board Theme'; +$txt['mboards_theme_desc'] = 'This allows you to change the look of your forum inside only this board.'; +$txt['mboards_theme_default'] = '(overall forum default.)'; +$txt['mboards_override_theme'] = 'Override Member\'s Theme'; +$txt['mboards_override_theme_desc'] = 'Use this board\'s theme even if the member didn\'t choose to use the defaults.'; + +$txt['mboards_order_before'] = 'Before'; +$txt['mboards_order_child_of'] = 'Child of'; +$txt['mboards_current_position'] = 'Current Position'; +$txt['no_valid_parent'] = 'Board %s does not have a valid parent. Use the \'find and repair errors\' function to fix this.'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/ManageBoards.russian.php b/Themes/default/languages/ManageBoards.russian.php new file mode 100644 index 0000000..2b1dab2 --- /dev/null +++ b/Themes/default/languages/ManageBoards.russian.php @@ -0,0 +1,66 @@ +"username", "username". (Здесь должны быть имена пользователей, а не отображаемые имена!)
    Чтобы создать новый форум, нажмите кнопку Добавить Форум. Создать новый форум, дочерний по отношению к текущему, выберите "Дочерний от..." из списка ниспадающего меню при создании форума.'; +$txt['parent_members_only'] = 'Участники без Групп'; +$txt['parent_guests_only'] = 'Гости'; +$txt['catConfirm'] = 'Вы действительно хотите удалить эту категорию?'; +$txt['boardConfirm'] = 'Вы действительно хотите удалить этот форум?'; + +$txt['catEdit'] = 'Редактировать Категорию'; +$txt['boardsEdit'] = 'Изменить Форумы'; +$txt['collapse_enable'] = 'Разборный'; +$txt['collapse_desc'] = 'Разрешить пользователям разбирать эту категорию?'; +$txt['catModify'] = '(изменять)'; + +$txt['mboards_order_after'] = 'После '; +$txt['mboards_order_inside'] = 'Внутри '; +$txt['mboards_order_first'] = 'На первом месте'; + +$txt['mboards_new_cat'] = 'Создать новую категорию'; +$txt['mboards_new_board'] = 'Добавить Форум'; +$txt['mboards_new_cat_name'] = 'Новая Категория'; +$txt['mboards_add_cat_button'] = 'Добавить Категорию'; +$txt['mboards_new_board_name'] = 'Новый Форум'; + +$txt['mboards_name'] = 'Имя'; +$txt['mboards_modify'] = 'изменить'; +$txt['mboards_permissions'] = 'права'; + +$txt['mboards_delete_cat'] = 'Удалить Категорию'; +$txt['mboards_delete_board'] = 'Удалить Форум'; + +$txt['mboards_delete_cat_contains'] = 'Удалив эту категорию, также будут удалены все форумы внутри ее, темы, сообщения и вложения в каждоми форуме'; +$txt['mboards_delete_what_do'] = 'Пожалуйста, выберите, что Вы хотите сделать с этими форумами'; +$txt['mboards_delete_option1'] = 'Удалить категорию и все форумы внутри ее.'; +$txt['mboards_delete_option2'] = 'Удалить категорию и переместить все темы из нее в'; +$txt['mboards_delete_confirm'] = 'Подтвердите'; +$txt['mboards_delete_cancel'] = 'Отмените'; +$txt['mboards_delete_error'] = 'Не выбрана категория!'; + +$txt['mboards_category'] = 'Категория'; +$txt['mboards_description'] = 'Описание'; +$txt['mboards_description_desc'] = 'Короткое описание Вашего форума.'; +$txt['mboards_groups'] = 'Доступно Группам'; +$txt['mboards_groups_desc'] = 'Следующие Группы имеют доступ на этот форум.'; +$txt['mboards_moderators'] = 'Модераторы'; +$txt['mboards_moderators_desc'] = 'Дополнительные участники, имеющие привилегии модератора на этом форуме. Заметьте, что администратора не надо включать в список.'; +$txt['mboards_count_posts'] = 'Считать Сообщения'; +$txt['mboards_count_posts_desc'] = 'Делает новые сообщения и темы участника считаемыми.'; +$txt['mboards_unchanged'] = 'Не изменено'; +$txt['mboards_theme'] = 'Тема Форума'; +$txt['mboards_theme_desc'] = 'Это позволяет Вам изменить вид форума только внутри этого раздела.'; +$txt['mboards_theme_default'] = '(вид форума по умолчанию.)'; +$txt['mboards_override_theme'] = 'Задавить Тему Участника'; +$txt['mboards_override_theme_desc'] = 'Используйте эту тему форума, даже если участник не выбирал ее по умолчанию.'; + +$txt['mboards_order_before'] = 'Перед'; +$txt['mboards_order_child_of'] = 'Дочерний от'; +$txt['mboards_current_position'] = 'Текущая Позиция'; +$txt['no_valid_parent'] = 'Форум %s не имеет действующего родительского раздела. Используйте \'найти и исправить ошибки\' для исправления этого.'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/ManageMembers.english.php b/Themes/default/languages/ManageMembers.english.php new file mode 100644 index 0000000..0af2d66 --- /dev/null +++ b/Themes/default/languages/ManageMembers.english.php @@ -0,0 +1,45 @@ + \ No newline at end of file diff --git a/Themes/default/languages/ManageMembers.russian.php b/Themes/default/languages/ManageMembers.russian.php new file mode 100644 index 0000000..3999125 --- /dev/null +++ b/Themes/default/languages/ManageMembers.russian.php @@ -0,0 +1,45 @@ + \ No newline at end of file diff --git a/Themes/default/languages/ManagePermissions.english.php b/Themes/default/languages/ManagePermissions.english.php new file mode 100644 index 0000000..0a89de5 --- /dev/null +++ b/Themes/default/languages/ManagePermissions.english.php @@ -0,0 +1,218 @@ +\'Deny\' (D).

    Remember that if you deny a permission, any member - whether moderator or otherwise - that is in that group will be denied that as well.
    For this reason, you should use deny carefully, only when necessary. Disallow, on the other hand, denies unless otherwise granted.'; + +$txt['permissiongroup_general'] = 'General'; +$txt['permissionname_view_stats'] = 'View forum statistics'; +$txt['permissionhelp_view_stats'] = 'The forum statistics is a page summarizing all statistics of the forum, like member count, daily number of posts, and several top 10 statistics. Enabling this permission adds a link to the bottom of the board index (\'[More Stats]\').'; +$txt['permissionname_view_mlist'] = 'View the memberlist'; +$txt['permissionhelp_view_mlist'] = 'The memberlist shows all members that have registered on your forum. The list can be sorted and searched. The memberlist is linked from both the boardindex and the stats page, by clicking on the number of members.'; +$txt['permissionname_who_view'] = 'View Who\'s Online'; +$txt['permissionhelp_who_view'] = 'Who\'s online shows all members that are currently online and what they are doing at that moment. This permission will only work if you also have enabled it in \'Features and Options\'. You can access the \'Who\'s Online\' screen by clicking the link in the \'Users Online\' section of the board index.'; +$txt['permissionname_search_posts'] = 'Search for posts and topics'; +$txt['permissionhelp_search_posts'] = 'The Search permission allows the user to search all boards he or she is allowed to access. When the search permission is enabled, a \'Search\' button will be added to the forum button bar.'; +$txt['permissionname_karma_edit'] = 'Change other people\'s karma'; +$txt['permissionhelp_karma_edit'] = 'Karma is a feature that shows the popularity of a member. In order to use this feature, you need to have it enabled in \'Features and Options\'. This permission will allow a membergroup to cast a vote. This permission has no effect on guests.'; + +$txt['permissiongroup_pm'] = 'Personal Messaging'; +$txt['permissionname_pm_read'] = 'Read personal messages'; +$txt['permissionhelp_pm_read'] = 'This permission allows users to access the Personal Messages section and read their Personal Messages. Without this permission a user is unable to send Personal Messages.'; +$txt['permissionname_pm_send'] = 'Send personal messages'; +$txt['permissionhelp_pm_send'] = 'Send personal messages to other registered members. Requires the \'Read personal messages\' permission.'; + +$txt['permissiongroup_calendar'] = 'Calendar'; +$txt['permissionname_calendar_view'] = 'View the calendar'; +$txt['permissionhelp_calendar_view'] = 'The calendar shows for each month the birthdays, events and holidays. This permission allows access to this calendar. When this permission is enabled, a button will be added to the top button bar and a list will be shown at the bottom of the board index with current and upcoming birthdays, events and holidays. The calendar needs be enabled from \'Edit Features and Options\'.'; +$txt['permissionname_calendar_post'] = 'Create events in the calendar'; +$txt['permissionhelp_calendar_post'] = 'An Event is a topic linked to a certain date or date range. Creating events can be done from the calendar. An event can only be created if the user that creates the event is allowed to post new topics.'; +$txt['permissionname_calendar_edit'] = 'Edit events in the calendar'; +$txt['permissionhelp_calendar_edit'] = 'An Event is a topic linked to a certain date or date range. Event can be edited by clicking the red asterisk (*) next to the event in the calendar view. In order to be able to edit an event, a user must have sufficient permissions to edit the first message of the topic that is linked to the event.'; +$txt['permissionname_calendar_edit_own'] = 'Own events'; +$txt['permissionname_calendar_edit_any'] = 'Any events'; + +$txt['permissiongroup_maintenance'] = 'Forum administration'; +$txt['permissionname_admin_forum'] = 'Administrate forum and database'; +$txt['permissionhelp_admin_forum'] = 'This permission allows a user to:
    • change forum, database and theme settings
    • manage packages
    • use the forum and database maintenance tools
    • view the error and mod logs
    Use this permission with caution, as it is very powerful.'; +$txt['permissionname_manage_boards'] = 'Manage boards and categories'; +$txt['permissionhelp_manage_boards'] = 'This permission allows creation, editing and removal of boards and categories.'; +$txt['permissionname_manage_attachments'] = 'Manage attachments and avatars'; +$txt['permissionhelp_manage_attachments'] = 'This permission allows access to the attachment center, where all forum attachments and avatars are listed and can be removed.'; +$txt['permissionname_manage_smileys'] = 'Manage smileys'; +$txt['permissionhelp_manage_smileys'] = 'This allows access to the smiley center. In the smiley center you can add, edit and remove smileys and smiley sets.'; +$txt['permissionname_edit_news'] = 'Edit news'; +$txt['permissionhelp_edit_news'] = 'The news function allows a random news line to appear on each screen. In order to use the news function, enabled it in the forum settings.'; + +$txt['permissiongroup_member_admin'] = 'Member administration'; +$txt['permissionname_moderate_forum'] = 'Moderate forum members'; +$txt['permissionhelp_moderate_forum'] = 'This permission includes all important member moderation functions:
    • access to registration management
    • access to the view/delete members screen
    • extensive profile info, including track IP/user and (hidden) online status
    • activate accounts
    • get approval notifications and approve accounts
    • immune to ignore PM
    • several small things
    '; +$txt['permissionname_manage_membergroups'] = 'Manage and assign membergroups'; +$txt['permissionhelp_manage_membergroups'] = 'This permission allows a user to edit membergroups and assign membergroups to other members.'; +$txt['permissionname_manage_permissions'] = 'Manage permissions'; +$txt['permissionhelp_manage_permissions'] = 'This permission allows a user to edit all permissions of a membergroup, globally or for individual boards.'; +$txt['permissionname_manage_bans'] = 'Manage ban list'; +$txt['permissionhelp_manage_bans'] = 'This permission allows a user to add or remove usernames, IP addresses, hostnames and email addresses to a list of banned users. It also allows to view and remove log entries of banned users that attempted to login.'; +$txt['permissionname_send_mail'] = 'Send a forum email to members'; +$txt['permissionhelp_send_mail'] = 'Mass mail all forum members, or just a few membergroups by email or personal message (the latter requires \'Send Personal Message\' permission).'; + +$txt['permissiongroup_profile'] = 'Member Profiles'; +$txt['permissionname_profile_view'] = 'View profile summary and stats'; +$txt['permissionhelp_profile_view'] = 'This permission allows users clicking on a username to see a summary of profile settings, some statistics and all posts of the user.'; +$txt['permissionname_profile_view_own'] = 'Own profile'; +$txt['permissionname_profile_view_any'] = 'Any profile'; +$txt['permissionname_profile_identity'] = 'Edit account settings'; +$txt['permissionhelp_profile_identity'] = 'Account settings are the basic settings of a profile, like password, email address, membergroup and preferred language.'; +$txt['permissionname_profile_identity_own'] = 'Own profile'; +$txt['permissionname_profile_identity_any'] = 'Any profile'; +$txt['permissionname_profile_extra'] = 'Edit additional profile settings'; +$txt['permissionhelp_profile_extra'] = 'Additional profile settings include settings for avatars, theme preferences, notifications and Personal Messages.'; +$txt['permissionname_profile_extra_own'] = 'Own profile'; +$txt['permissionname_profile_extra_any'] = 'Any profile'; +$txt['permissionname_profile_title'] = 'Edit custom title'; +$txt['permissionhelp_profile_title'] = 'The custom title is shown on the topic display page, under the profile of each user that has a custom title.'; +$txt['permissionname_profile_title_own'] = 'Own profile'; +$txt['permissionname_profile_title_any'] = 'Any profile'; +$txt['permissionname_profile_remove'] = 'Delete account'; +$txt['permissionhelp_profile_remove'] = 'This permission allows a user to delete his account, when set to \'Own Account\'.'; +$txt['permissionname_profile_remove_own'] = 'Own account'; +$txt['permissionname_profile_remove_any'] = 'Any account'; +$txt['permissionname_profile_remote_avatar'] = 'Choose a remotely stored avatar'; +$txt['permissionhelp_profile_remote_avatar'] = 'Because avatars might influence the page creation time negatively, it is possible to disallow certain membergroups to use avatars from external servers. '; + +$txt['permissiongroup_general_board'] = 'General'; +$txt['permissionname_moderate_board'] = 'Moderate board'; +$txt['permissionhelp_moderate_board'] = 'The moderate board permission adds a few small permissions that make a moderator a real moderator. Permissions include replying to locked topics, changing the poll expire time and viewing poll results.'; + +$txt['permissiongroup_topic'] = 'Topics'; +$txt['permissionname_post_new'] = 'Post new topics'; +$txt['permissionhelp_post_new'] = 'This permission allows users to post new topics. It doesn\'t allow to post replies to topics.'; +$txt['permissionname_merge_any'] = 'Merge any topic'; +$txt['permissionhelp_merge_any'] = 'Merge two or more topic into one. The order of messages within the merged topic will be based on the time the messages were created. A user can only merge topics on those boards a user is allowed to merge. In order to merge multiple topics at once, a user has to enable quickmoderation in their profile settings.'; +$txt['permissionname_split_any'] = 'Split any topic'; +$txt['permissionhelp_split_any'] = 'Split a topic into two separate topics.'; +$txt['permissionname_send_topic'] = 'Send topics to friends'; +$txt['permissionhelp_send_topic'] = 'This permission allows a user to mail a topic to a friend, by entering their email address and allows adding a message.'; +$txt['permissionname_make_sticky'] = 'Make topics sticky'; +$txt['permissionhelp_make_sticky'] = 'Sticky topics are topics that always remain on top of a board. They can be useful for announcements or other important messages.'; +$txt['permissionname_move'] = 'Move topic'; +$txt['permissionhelp_move'] = 'Move a topic from one board to the other. Users can only select target boards they are allowed to access.'; +$txt['permissionname_move_own'] = 'Own topic'; +$txt['permissionname_move_any'] = 'Any topic'; +$txt['permissionname_lock'] = 'Lock topics'; +$txt['permissionhelp_lock'] = 'This permission allows a user to lock a topic. This can be done in order to make sure no one can reply to a topic. Only uses with a \'Moderate board\' permission can still post in locked topics.'; +$txt['permissionname_lock_own'] = 'Own topic'; +$txt['permissionname_lock_any'] = 'Any topic'; +$txt['permissionname_delete'] = 'Remove topics'; +$txt['permissionhelp_delete'] = 'Delete topics as a whole. Note that this permission doesn\'t allow to delete specific messages within the topic!'; +$txt['permissionname_delete_own'] = 'Own topic'; +$txt['permissionname_delete_any'] = 'Any topics'; +$txt['permissionname_post_reply'] = 'Post replies to topics'; +$txt['permissionhelp_post_reply'] = 'This permission allows replying to topics.'; +$txt['permissionname_post_reply_own'] = 'Own topic'; +$txt['permissionname_post_reply_any'] = 'Any topic'; +$txt['permissionname_modify_replies'] = 'Modify replies to own topics'; +$txt['permissionhelp_modify_replies'] = 'This permission allows a user that started a topic to modify all replies to their topic.'; +$txt['permissionname_remove_replies'] = 'Delete replies to own topics'; +$txt['permissionhelp_remove_replies'] = 'This permission allows a user that started a topic to remove all replies to their topic.'; +$txt['permissionname_announce_topic'] = 'Announce topic'; +$txt['permissionhelp_announce_topic'] = 'This allows to send an announcement e-mail about a topic to all members or to a few membergroups.'; + +$txt['permissiongroup_post'] = 'Posts'; +$txt['permissionname_remove'] = 'Delete posts'; +$txt['permissionhelp_remove'] = 'Remove posts. This does not allow a user to delete the first post of a topic.'; +$txt['permissionname_remove_own'] = 'Own post'; +$txt['permissionname_remove_any'] = 'Any post'; +$txt['permissionname_modify'] = 'Modify posts'; +$txt['permissionhelp_modify'] = 'Edit posts'; +$txt['permissionname_modify_own'] = 'Own post'; +$txt['permissionname_modify_any'] = 'Any post'; +$txt['permissionname_report_any'] = 'Report posts to the moderators'; +$txt['permissionhelp_report_any'] = 'This permission adds a link to each message, allowing a user to report a post to a moderator. On reporting, all moderators on that board will receive an email with a link to the reported post and a description of the problem (as given by the reporting user).'; + +$txt['permissiongroup_poll'] = 'Polls'; +$txt['permissionname_poll_view'] = 'View polls'; +$txt['permissionhelp_poll_view'] = 'This permission allows a user to view a poll. Without this permission, the user will only see the topic.'; +$txt['permissionname_poll_vote'] = 'Vote in polls'; +$txt['permissionhelp_poll_vote'] = 'This permission allows a (registered) user to cast one vote. It doesn\'t apply to guests.'; +$txt['permissionname_poll_post'] = 'Post polls'; +$txt['permissionhelp_poll_post'] = 'This permission allows a user to post a new poll. As polls are special cases of topics, you cannot use this permission without the \'Post new topic\' permission.'; +$txt['permissionname_poll_add'] = 'Add poll to topics'; +$txt['permissionhelp_poll_add'] = 'Add poll to topics allows a user to add a poll after the topic has been created. This permission requires sufficient rights to edit the first post of a topic.'; +$txt['permissionname_poll_add_own'] = 'Own topics'; +$txt['permissionname_poll_add_any'] = 'Any topics'; +$txt['permissionname_poll_edit'] = 'Edit polls'; +$txt['permissionhelp_poll_edit'] = 'This permission allows to edit the options of a poll and to reset the poll. In order to edit the maximum number of votes and the expiration time, a user needs to have the \'Moderate board\' permission.'; +$txt['permissionname_poll_edit_own'] = 'Own poll'; +$txt['permissionname_poll_edit_any'] = 'Any poll'; +$txt['permissionname_poll_lock'] = 'Lock polls'; +$txt['permissionhelp_poll_lock'] = 'Locking polls prevents the poll from accepting any more votes.'; +$txt['permissionname_poll_lock_own'] = 'Own poll'; +$txt['permissionname_poll_lock_any'] = 'Any poll'; +$txt['permissionname_poll_remove'] = 'Remove polls'; +$txt['permissionhelp_poll_remove'] = 'This permission allows removal of polls.'; +$txt['permissionname_poll_remove_own'] = 'Own poll'; +$txt['permissionname_poll_remove_any'] = 'Any poll'; + +$txt['permissiongroup_notification'] = 'Notifications'; +$txt['permissionname_mark_any_notify'] = 'Request notification on replies'; +$txt['permissionhelp_mark_any_notify'] = 'This feature allows users to receive a notification whenever someone replies to a topic they subscribed to.'; +$txt['permissionname_mark_notify'] = 'Request notification on new topics'; +$txt['permissionhelp_mark_notify'] = 'Notification on new topics is a feature that allows a user to receive an email every time a new topic is created on the board they subscribe to.'; + +$txt['permissiongroup_attachment'] = 'Attachments'; +$txt['permissionname_view_attachments'] = 'View attachments'; +$txt['permissionhelp_view_attachments'] = 'Attachments are files that are attached to posted messages. This feature can be enabled and configured in \'Edit Features and Options\'. Since attachments are not directly accessed, you can protect them from being downloaded by users that don\'t have this permission.'; +$txt['permissionname_post_attachment'] = 'Post attachments'; +$txt['permissionhelp_post_attachment'] = 'Attachments are files that are attached to posted messages. One message can contain multiple attachments.'; + +$txt['permissionicon'] = ''; + +$txt['permissionname_karmalog_view'] = 'View Karma Log'; +$txt['permissionhelp_karmalog_view'] = 'Karma Description Log shows all members karma and description of applauding or smiting. This permission will only work if you also have enabled it in \'Features and Options\'. You can access the Karma Description screen by clicking the link in the \'Karma Stat\' section of the board index.'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/ManagePermissions.russian.php b/Themes/default/languages/ManagePermissions.russian.php new file mode 100644 index 0000000..92ca959 --- /dev/null +++ b/Themes/default/languages/ManagePermissions.russian.php @@ -0,0 +1,217 @@ ++'; +$txt['permissions_option_off'] = ''; +$txt['permissions_option_deny'] = '×'; +$txt['permissions_option_desc'] = 'Для каждого права Вы можете выбрать либо \'Позволить\' (+), \'Отклонить\' (—), или \'Запретить\' (×).

    Помните, что если вы ограничили права, любому участнику, например, модератору, или кому-то еще, то всем пользователям группы будет запрещено данное право.
    По этой причине, следует использовать запреты осторожно, только по необходимости. Отклонение прав, с другой стороны, запрещает их, если они не предоставлены другим образом.'; + +$txt['permissiongroup_general'] = 'Общие'; +$txt['permissionname_view_stats'] = 'Смотреть статистику форума'; +$txt['permissionhelp_view_stats'] = 'Страница статистики форума хранит общую информацию о форуме, например, общее число участников, количество сообщений за день/месяц и некоторую статистику "10 самых..." Включив это право, будет добавлена ссылка внизу страницы (\'[Подробная статистика]\').'; +$txt['permissionname_view_mlist'] = 'Смотреть список участников'; +$txt['permissionhelp_view_mlist'] = 'Список участников показывает всех пользователей, зарегистрированных на форуме. По списку участников можно устраивать поиск и классификацию. Ссылка на список участников есть как на главной странице, так и на странице статистики. Пройдите по ссылке на список участников.'; +$txt['permissionname_who_view'] = 'Смотреть Кто Online'; +$txt['permissionhelp_who_view'] = 'Список пользователей online показывает, кто сейчас online, и кто что на форуме сейчас делает. Это право также будет доступно, только если Вы его включили в \'Общих настройках\'. Вы можете попасть на страницу \'Кто Online\', нажав на ссылку \'Участники online\' на главной странице.'; +$txt['permissionname_search_posts'] = 'Использовать поиск по форуму'; +$txt['permissionhelp_search_posts'] = 'Право к поиску позволяет пользователю устраивать искать по всем страницам форума, к которым имеется у него имеется доступ. Если право поиска включено, то кнопка \'Поиск\' будет автоматически добавлена в кнопочное меню вверху каждой страницы форума.'; +$txt['permissionname_karma_edit'] = 'Изменять репутацию других людей'; +$txt['permissionhelp_karma_edit'] = 'Репутация - это рейтинг, показывающий мнение других участников форума об этом пользователе. Для того, чтобы использовать эту опцию, ее надо включить в \'Общих настройках\'. Это право позволит разрешённым группам пользователей голосовать. Это право недоступно гостям.'; + +$txt['permissiongroup_pm'] = 'Личные Сообщения'; +$txt['permissionname_pm_read'] = 'Смотреть личные сообщения'; +$txt['permissionhelp_pm_read'] = 'Это право разрешает пользователям использовать функцию "личные сообщения". Без этого права пользователи не смогут получать и отправлять личные сообщения.'; +$txt['permissionname_pm_send'] = 'Отправлять личные сообщения'; +$txt['permissionhelp_pm_send'] = 'Отправлять личные сообщения другим зарегистрированым пользователям. Необходимо право \'Смотреть личные сообщения\'.'; + +$txt['permissiongroup_calendar'] = 'Календарь'; +$txt['permissionname_calendar_view'] = 'Смотреть календарь'; +$txt['permissionhelp_calendar_view'] = 'Календарь показывает дни рождения участников, события и праздники, отмеченые на форуме. Это право дает доступ к просмотру календаря. Когда это право включено, кнопка "Календарь" будет автоматически добавлена в кнопочное меню вверху каждой страницы форума, также календарь будет отображаться внизу главной страницы форума с текущими и приближающимися днями рождения, праздниками и событиями. Календарь должен быть включен в \'Общих настройках\'.'; +$txt['permissionname_calendar_post'] = 'Создавать события в календаре'; +$txt['permissionhelp_calendar_post'] = 'Событие - это привязка темы к определенной дате или отрезку времени. Создать событие можно в календаре. Событие могут создавать пользователи, если у них имеются права создавать новые темы на форуме.'; +$txt['permissionname_calendar_edit'] = 'Редактировать события в календаре'; +$txt['permissionhelp_calendar_edit'] = 'Событие - это привязка темы к определенной дате или отрезку времени. Событие может быть отредактировано при нажатии на красную звездочку (*) рядом с событием в календаре. Для того чтобы отредактировать событие, пользователь должен иметь право редактирования сообщения в теме, к которому привязано событие.'; +$txt['permissionname_calendar_edit_own'] = 'Собственные события'; +$txt['permissionname_calendar_edit_any'] = 'Любые события'; + +$txt['permissiongroup_maintenance'] = 'Администрирование форума'; +$txt['permissionname_admin_forum'] = 'Администрировать форум и базу данных'; +$txt['permissionhelp_admin_forum'] = 'Это право позволяет пользователям:
    • Менять настройки соединения с форумом, базой данных и шаблонами
    • Управлять пакетами
    • Использовать инструменты технической поддержки форума и базы данных
    • Смотреть ошибки и логи модераторов
    Используйте это право осторожно, оно фактически делает пользователя администратором.'; +$txt['permissionname_manage_boards'] = 'Редактировать разделы и категории форума'; +$txt['permissionhelp_manage_boards'] = 'Это право разрешает создавать, редактировать и удалять разделы и категории форума.'; +$txt['permissionname_manage_attachments'] = 'Управлять вложениями и аватарами'; +$txt['permissionhelp_manage_attachments'] = 'Это право пускает пользователей в центр вложений, где ведётся подсчёт всех вложений и аватаром. Оттуда вложения и аватары могут быть удалены.'; +$txt['permissionname_manage_smileys'] = 'Управление смайлами'; +$txt['permissionhelp_manage_smileys'] = 'Это дает право доступа к центру смайлов. В центре смайлов Вы можете добавлять, редактировать и удалять смайлы и наборы смайлов.'; +$txt['permissionname_edit_news'] = 'Редактировать новости'; +$txt['permissionhelp_edit_news'] = 'Эта новостная функция позволяет видеть случайные новостные ленты форума на каждом экране. Для использования новостной функции, включите ее в настройках форума.'; + +$txt['permissiongroup_member_admin'] = 'Контроль участников'; +$txt['permissionname_moderate_forum'] = 'Управлять аккаунтами участников'; +$txt['permissionhelp_moderate_forum'] = 'Это право включает все важные функции контроля участников:
    • доступ к параметрам регистрации
    • доступ к просмотру/удалению участников
    • редактирование дополнительной информации участника, включая отслеживание IP-адресов пользователей и отображение скрытого online статуса
    • активацию новых аккаунтов
    • получение подтверждения уведомлений на подтверждение аккаунтов
    • возможность игнорирования личных сообщений
    • и кое-что ещё
    '; +$txt['permissionname_manage_membergroups'] = 'Редактировать группы пользователей'; +$txt['permissionhelp_manage_membergroups'] = 'Это право позволяет создавать и редактировать группы пользователей, а также назначать их другим участникам.'; +$txt['permissionname_manage_permissions'] = 'Редактировать права пользователей'; +$txt['permissionhelp_manage_permissions'] = 'Это право позволяет пользователям редактировать все права групп пользователей во всех разделах и отдельных разделах.'; +$txt['permissionname_manage_bans'] = 'Редактировать бан-лист'; +$txt['permissionhelp_manage_bans'] = 'Это право позволяет забанивать нежелательных участников на форуме. То есть, добавлять и удалять имена пользователей, IP адреса, хосты и email адреса в списке забаненых пользователей. Этот также позволяет смотреть и удалять логи забаненых пользователей и их попытки входа.'; +$txt['permissionname_send_mail'] = 'Отправлять e-mail от имени форума его участникам'; +$txt['permissionhelp_send_mail'] = 'Массовая рассылка участникам форума, или нескольким группам по e-mail или личными сообщениями (последнее требует право на отправку личных сообщений.'; + +$txt['permissiongroup_profile'] = 'Профиль Участника'; +$txt['permissionname_profile_view'] = 'Просмотр данных профиль и статистики'; +$txt['permissionhelp_profile_view'] = 'Это право дает возможность кликнуть на имя пользователя, чтобы посмотреть настройки профиля, некоторую статистику и все сообщения пользователя.'; +$txt['permissionname_profile_view_own'] = 'Собственный профиль'; +$txt['permissionname_profile_view_any'] = 'Любой профиль'; +$txt['permissionname_profile_identity'] = 'Редактировать настройки аккаунта'; +$txt['permissionhelp_profile_identity'] = 'Настройки аккаунта - это основные настройки профиля, такие как, пароль, email адрес, группы пользователей и предпочитаемый язык.'; +$txt['permissionname_profile_identity_own'] = 'Собственный профиль'; +$txt['permissionname_profile_identity_any'] = 'Любой профиль'; +$txt['permissionname_profile_extra'] = 'Редактировать дополнительные настройки профиля'; +$txt['permissionhelp_profile_extra'] = 'Дополнительные настройки профиля включают настройки аватара, предпочитаемой темы, извещения и Личные сообщения.'; +$txt['permissionname_profile_extra_own'] = 'Собственный профиль'; +$txt['permissionname_profile_extra_any'] = 'Любой профиль'; +$txt['permissionname_profile_title'] = 'Редактировать выбранный титул'; +$txt['permissionhelp_profile_title'] = 'Выбранный титул показывается на странице темы, под под профилем каждого пользователя, у кого свой титул.'; +$txt['permissionname_profile_title_own'] = 'Собственный профиль'; +$txt['permissionname_profile_title_any'] = 'Любой профиль'; +$txt['permissionname_profile_remove'] = 'Удалять аккаунты участников'; +$txt['permissionhelp_profile_remove'] = 'Это право позволяет удалить только свой аккаунт, если установлено \'Собственный Аккаунт\'.'; +$txt['permissionname_profile_remove_own'] = 'Собственный аккаунт'; +$txt['permissionname_profile_remove_any'] = 'Любой аккаунт'; +$txt['permissionname_profile_remote_avatar'] = 'Загружать аватар с удалённого сервера'; +$txt['permissionhelp_profile_remote_avatar'] = 'Так как аватары могут негативно влиять на время создания страницы, можно отказать определенным группам пользователей использовать аватар с удаленных серверов. '; + +$txt['permissiongroup_general_board'] = 'Общие права в разделе'; +$txt['permissionname_moderate_board'] = 'Привилегии в разделе'; +$txt['permissionhelp_moderate_board'] = 'Доступ к модерированию форума добавляет некоторые права в разделе. Права включают ответы в закрытых темах, изменение времени опроса и просмотр результатов опроса.'; + +$txt['permissiongroup_topic'] = 'Права в темах'; +$txt['permissionname_post_new'] = 'Создавать новую тему'; +$txt['permissionhelp_post_new'] = 'Это право позволяет создавать новые темы пользователями. Но это не позволяет отвечать в темах.'; +$txt['permissionname_merge_any'] = 'Сливать две темы в одну'; +$txt['permissionhelp_merge_any'] = 'Соединение одной или более тем в одну. Порядок сообщений в соединенной теме будет определяться временем создания сообщения. Пользователь сможет соединять только на тех форумах, где ему позволено. Для соединения множества тем сразу, пользователь должен включить быстрое модерирование в настройках профиля.'; +$txt['permissionname_split_any'] = 'Разделять тему на две (split)'; +$txt['permissionhelp_split_any'] = 'Позволяет разделять тему на две независимых темы.'; +$txt['permissionname_send_topic'] = 'Послылать адрес темы по e-mail'; +$txt['permissionhelp_send_topic'] = 'Это право позволяет отправлять тему другу введя его email и позволяет добавлять сообщение.'; +$txt['permissionname_make_sticky'] = 'Помечать тему "важной"'; +$txt['permissionhelp_make_sticky'] = 'Важные (прикрепленные) темы всегда остаются первыми вверху списка тем в разделе. Они могут быть полезными для объявлений или других важных сообщений.'; +$txt['permissionname_move'] = 'Перемещать темы'; +$txt['permissionhelp_move'] = 'Перемещать темы из одного раздела в другой. Пользователи могут перемещать темы только в те разделы, к которым у них есть доступ.'; +$txt['permissionname_move_own'] = 'Собственная тема'; +$txt['permissionname_move_any'] = 'Любая тема'; +$txt['permissionname_lock'] = 'Закрывать темы'; +$txt['permissionhelp_lock'] = 'Это право разрешает пользователю закрывать тему. Это делается для того, что бы никто не мог отвечать в теме. Только пользователи с \'Привилегиями в разделе\' могут все равно писать в закрытой теме.'; +$txt['permissionname_lock_own'] = 'Собственная тема'; +$txt['permissionname_lock_any'] = 'Любая тема'; +$txt['permissionname_delete'] = 'Удалять темы'; +$txt['permissionhelp_delete'] = 'Удалить целые темы. Заметьте, что это право не позволяет удалять отдельные сообщения в теме!'; +$txt['permissionname_delete_own'] = 'Собственная тема'; +$txt['permissionname_delete_any'] = 'Любая тема'; +$txt['permissionname_post_reply'] = 'Писать ответы в темах'; +$txt['permissionhelp_post_reply'] = 'Это право позволяет писать ответы в темах.'; +$txt['permissionname_post_reply_own'] = 'Собственная тема'; +$txt['permissionname_post_reply_any'] = 'Любая тема'; +$txt['permissionname_modify_replies'] = 'Изменять ответы других участников в своих темах'; +$txt['permissionhelp_modify_replies'] = 'Это право разрешает пользователю, начавшему тему, изменять все ответы в его теме.'; +$txt['permissionname_remove_replies'] = 'Удалять любые ответы в собственной теме'; +$txt['permissionhelp_remove_replies'] = 'Это право разрешает пользователю, начавшему тему, удалять все ответы в его теме.'; +$txt['permissionname_announce_topic'] = 'Уведомлять о теме'; +$txt['permissionhelp_announce_topic'] = 'Разрешается отправлять объявления по e-mail о теме всем участникам или участникам некоторых групп.'; + +$txt['permissiongroup_post'] = 'Сообщения'; +$txt['permissionname_remove'] = 'Удалять сообщения'; +$txt['permissionhelp_remove'] = 'Это право не дает возможность пользователям удалять первое сообщение темы.'; +$txt['permissionname_remove_own'] = 'Собственное сообщение'; +$txt['permissionname_remove_any'] = 'Любое сообщение'; +$txt['permissionname_modify'] = 'Изменять сообщения'; +$txt['permissionhelp_modify'] = 'Редактировать сообщения'; +$txt['permissionname_modify_own'] = 'Собственное сообщение'; +$txt['permissionname_modify_any'] = 'Любое сообщение'; +$txt['permissionname_report_any'] = 'Доносить модераторам о плохих сообщениях'; +$txt['permissionhelp_report_any'] = 'Автоматическое уведомление всех модераторов форума по e-mail об этом сообщении. (Используется при доносе на плохие сообщения)'; + +$txt['permissiongroup_poll'] = 'Опросы'; +$txt['permissionname_poll_view'] = 'Смотреть опросы'; +$txt['permissionhelp_poll_view'] = 'Это право позволяет смотреть опросы. Без этого, пользователь увидет только тему.'; +$txt['permissionname_poll_vote'] = 'Голосовать в опросах'; +$txt['permissionhelp_poll_vote'] = 'Этот право позволяет (зарегистрированным) пользователям оставлять свой голос. Не работает для гостей.'; +$txt['permissionname_poll_post'] = 'Создавать опросы'; +$txt['permissionhelp_poll_post'] = 'Этот доступ разрешает пользователю создавать опросы. Так как опрос - это часть темы, Вы не можете использовать это право без права\'Создавать новую тему\'.'; +$txt['permissionname_poll_add'] = 'Добавлять опрос в темы'; +$txt['permissionhelp_poll_add'] = 'Добавление опросов в темы, позволяет добавлять опрос после того, как тема была создана. Это право требует достаточных прав для редактирования первого сообщения темы.'; +$txt['permissionname_poll_add_own'] = 'Собственные темы'; +$txt['permissionname_poll_add_any'] = 'Любые темы'; +$txt['permissionname_poll_edit'] = 'Редактировать опросы'; +$txt['permissionhelp_poll_edit'] = 'Это право позволяет редактировать опции опроса и сбрасывать опрос. Для того, чтобы добиться максимума голосов и изменить время опроса, пользователь должен обладать правом к \'Модерированию Форума\'.'; +$txt['permissionname_poll_edit_own'] = 'Собственный опрос'; +$txt['permissionname_poll_edit_any'] = 'Любой опрос'; +$txt['permissionname_poll_lock'] = 'Закрывать опросы'; +$txt['permissionhelp_poll_lock'] = 'Закрытие опроса делает невозможным продолжение голосования.'; +$txt['permissionname_poll_lock_own'] = 'Собственный опрос'; +$txt['permissionname_poll_lock_any'] = 'Любой опрос'; +$txt['permissionname_poll_remove'] = 'Удалять опросы'; +$txt['permissionhelp_poll_remove'] = 'Это право позволяет удалять опросы.'; +$txt['permissionname_poll_remove_own'] = 'Собственный опрос'; +$txt['permissionname_poll_remove_any'] = 'Любой опрос'; + +$txt['permissiongroup_notification'] = 'Уведомления'; +$txt['permissionname_mark_any_notify'] = 'Подписываться на уведомления о новых сообщениях по e-mail'; +$txt['permissionhelp_mark_any_notify'] = 'Эта опция позволяет получать уведомления, когда кто-то отвечает в теме, на которую пользователь подписался.'; +$txt['permissionname_mark_notify'] = 'Подписываться на уведомления о создании новых тем в разделе'; +$txt['permissionhelp_mark_notify'] = 'Извещение о новых темах - это опция, которая позволяет получать e-mail каждый раз, когда создается новая тема в разделе, на который участник подписался.'; + +$txt['permissiongroup_attachment'] = 'Вложения'; +$txt['permissionname_view_attachments'] = 'Смотреть вложения'; +$txt['permissionhelp_view_attachments'] = 'Вложения, это файлы, которые прикрепляются к сообщению. Эта опция может быть включена и сконфигурирована в \'Общих настройках\'. Так как вложения не доступны напрямую, Вы можете ограничить пользователей, у которых нет этих прав.'; +$txt['permissionname_post_attachment'] = 'Добавлять вложения'; +$txt['permissionhelp_post_attachment'] = 'Вложения, это файлы, которые прикреплены к сообщению. Одно сообщение может содержать множество вложений.'; + +$txt['permissionicon'] = ''; + +$txt['permissionname_karmalog_view'] = 'View Karma Log'; +$txt['permissionhelp_karmalog_view'] = 'Karma Description Log shows all members karma and description of applauding or smiting. This permission will only work if you also have enabled it in \'Features and Options\'. You can access the Karma Description screen by clicking the link in the \'Karma Stat\' section of the board index.'; +?> diff --git a/Themes/default/languages/ManageSmileys.english.php b/Themes/default/languages/ManageSmileys.english.php new file mode 100644 index 0000000..045439f --- /dev/null +++ b/Themes/default/languages/ManageSmileys.english.php @@ -0,0 +1,78 @@ +Here you can change the name and location of each smiley set - remember, however, that all sets share the same smileys.'; +$txt['smiley_editsmileys_explain'] = 'Change your smileys here by clicking on the smiley you want to modify. Remember that these smileys all have to exist in all the sets or some smileys won\'t show up! Don\'t forget to save after you are done editing!'; +$txt['smiley_setorder_explain'] = 'Change the order of the smileys here.'; +$txt['smiley_addsmiley_explain'] = 'Here you can add a new smiley - either from an existing file or by uploading new ones.'; + +$txt['smileys_set_order'] = 'Set smiley order'; +$txt['smiley_settings'] = 'Smiley settings'; +$txt['smiley_sets_base_dir'] = 'Absolute path to all smiley sets'; +$txt['smiley_set_select_default'] = 'Default Smiley Set'; +$txt['smiley_set_new'] = 'Create new smiley set'; +$txt['smiley_set_modify_existing'] = 'Modify existing smiley set'; +$txt['smiley_set_modify'] = 'Modify'; +$txt['smiley_set_import_directory'] = 'Import smileys already in this directory'; +$txt['smiley_set_import_single'] = 'There is one smiley in this smiley set not yet imported. Click'; +$txt['smiley_set_import_multiple'] = 'There are %d smileys in the directory that have no yet been imported. Click'; +$txt['smiley_set_to_import_single'] = 'to import it now.'; +$txt['smiley_set_to_import_multiple'] = 'to import them now.'; + +$txt['smileys_location'] = 'Location'; +$txt['smileys_location_form'] = 'Post form'; +$txt['smileys_location_hidden'] = 'Hidden'; +$txt['smileys_location_popup'] = 'Popup'; +$txt['smileys_modify'] = 'modify'; +$txt['smileys_not_found_in_set'] = 'Smiley not found in set(s)'; +$txt['smileys_default_description'] = '(Insert a description)'; +$txt['smiley_new'] = 'Add new smiley'; +$txt['smiley_modify_existing'] = 'Modify smiley'; +$txt['smiley_preview'] = 'Preview'; +$txt['smiley_preview_using'] = 'using smiley set'; +$txt['smileys_confirm'] = 'Are you sure you want to remove these smileys?\\n\\nNote: This won\\\'t remove the images, just the choices.'; +$txt['smileys_location_form_description'] = 'These smileys will appear above the text area, when posting a new forum message or Personal Message.'; +$txt['smileys_location_popup_description'] = 'These smileys will be shown in a popup, that is shown after a user has clicked \'[more]\''; +$txt['smileys_move_select_destination'] = 'Select smiley destination'; +$txt['smileys_move_select_smiley'] = 'Select smiley to move'; +$txt['smileys_move_here'] = 'Move smiley to this location'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/ManageSmileys.russian.php b/Themes/default/languages/ManageSmileys.russian.php new file mode 100644 index 0000000..8dddd57 --- /dev/null +++ b/Themes/default/languages/ManageSmileys.russian.php @@ -0,0 +1,78 @@ +Здесь Вы можете менять название или местоположение каждого набора смайлов, помните, что все наборы должны содержать одинаковые смайлы.'; +$txt['smiley_editsmileys_explain'] = 'Измените Ваши смайлы, нажмите на те, которые Вы хотите изменить. Помните, что все смайлы должны существовать во всех наборах, или некоторые смайлы не будут отображаться! Не забудте сохраниться, после того как сделаете изменения!'; +$txt['smiley_setorder_explain'] = 'Измените здесь порядок смайлов.'; +$txt['smiley_addsmiley_explain'] = 'Здесь Вы можете добавить новый смайл - как из существующего файла, так и загрузив его.'; + +$txt['smileys_set_order'] = 'Порядок наборов смайлов'; +$txt['smiley_settings'] = 'Настройки смайлов'; +$txt['smiley_sets_base_dir'] = 'Полный путь к наборам смайлов'; +$txt['smiley_set_select_default'] = 'Набор Смайлов По Умолчанию'; +$txt['smiley_set_new'] = 'Создать новый набор смайлов'; +$txt['smiley_set_modify_existing'] = 'Изменить существующий набор смайлов'; +$txt['smiley_set_modify'] = 'Изменить'; +$txt['smiley_set_import_directory'] = 'Импортируемые смайлы уже в этой директории'; +$txt['smiley_set_import_single'] = 'Один смайл в этом наборе смайлов не импортирован еще. Кликните'; +$txt['smiley_set_import_multiple'] = 'Здесь %d смайлов в директории, которые еще не импортировали. Кликните'; +$txt['smiley_set_to_import_single'] = 'чтобы импортировать его сейчас.'; +$txt['smiley_set_to_import_multiple'] = 'чтобы импортировать их сейчас.'; + +$txt['smileys_location'] = 'Местоположение'; +$txt['smileys_location_form'] = 'Вставить форму'; +$txt['smileys_location_hidden'] = 'Спрятанное'; +$txt['smileys_location_popup'] = 'Всплывающее'; +$txt['smileys_modify'] = 'изменить'; +$txt['smileys_not_found_in_set'] = 'Смайлы не найдены в этом наборе(наборах)'; +$txt['smileys_default_description'] = '(Вставьте описание)'; +$txt['smiley_new'] = 'Добавить новый смайл'; +$txt['smiley_modify_existing'] = 'Изменить смайл'; +$txt['smiley_preview'] = 'Предпросмотр'; +$txt['smiley_preview_using'] = 'используя набор смайлов'; +$txt['smileys_confirm'] = 'Вы уверены, что хотите удалить эти смайлы?\\n\\nУчтите: это не\\ удалит картинки, а только возможность выбора.'; +$txt['smileys_location_form_description'] = 'Эти смайлы отображаются сверху над полем ввода сообщения, при создании нового сообщения или Личного Сообщения.'; +$txt['smileys_location_popup_description'] = 'Эти смайлы будут отображаться во всплывающих сообщениях, после того как пользователь кликнет на \'[больше]\''; +$txt['smileys_move_select_destination'] = 'Выберете место назначение смайлов'; +$txt['smileys_move_select_smiley'] = 'Выберите смайлы для перемещения'; +$txt['smileys_move_here'] = 'Передвинуть смайлы на это место'; + +?> diff --git a/Themes/default/languages/ModSettings.english.php b/Themes/default/languages/ModSettings.english.php new file mode 100644 index 0000000..3b52cdb --- /dev/null +++ b/Themes/default/languages/ModSettings.english.php @@ -0,0 +1,203 @@ +theme settings for more options. Click the help icons for more information about a setting.'; +$txt['mods_cat_expand_all'] = '(expand all)'; + +$txt['mods_cat_features'] = 'Basic Forum Features'; +$txt['pollMode'] = 'Poll mode'; +$txt['smf34'] = 'Disable polls'; +$txt['smf32'] = 'Enable polls'; +$txt['smf33'] = 'Show existing polls as topics'; +$txt['enableStickyTopics'] = 'Enable sticky topics'; +$txt['allow_guestAccess'] = 'Allow guests to browse the forum'; +$txt['userLanguage'] = 'Enable user-selectable language support'; +$txt['allow_editDisplayName'] = 'Allow users to edit their displayed name?'; +$txt['allow_hideOnline'] = 'Allow non-administrators to hide their online status?'; +$txt['allow_hideEmail'] = 'Allow users to hide their email from everyone except admins?'; +$txt['guest_hideContacts'] = 'Do not reveal contact details of members to guests'; +$txt['titlesEnable'] = 'Enable custom titles'; +$txt['default_personalText'] = 'Default personal text'; +$txt['max_signatureLength'] = 'Maximum allowed characters in signatures
    (0 for no max.)
    '; +$txt['removeNestedQuotes'] = 'Remove nested quotes when posting'; +$txt['enableEmbeddedFlash'] = 'Embed flash into posts
    (may be a security risk!)
    '; +$txt['enablePostHTML'] = 'Enable basic HTML in posts'; +$txt['disabledBBC'] = 'Disabled BBC Code (comma separated)'; +$txt['enableBBC'] = 'Enable bulletin board code (BBC)'; +$txt['enableNewReplyWarning'] = 'Warn members of new replies made while posting?'; +$txt['max_messageLength'] = 'Maximum allowed characters in posts
    (0 for no max.)
    '; +$txt['number_format'] = 'Default number format'; +$txt['time_format'] = 'Default time format'; +$txt['time_offset'] = 'Overall time offset
    (added to the member specific option.)
    '; +$txt['spamWaitTime'] = 'Seconds required between posts from the same IP'; +$txt['edit_wait_time'] = 'Courtesy edit wait time'; +$txt['failed_login_threshold'] = 'Failed login threshold'; +$txt['lastActive'] = 'User online time threshold'; +$txt['enableSpellChecking'] = 'Enable spell checking
    (this does not work on all servers!)
    '; +$txt['trackStats'] = 'Track daily statistics'; +$txt['hitStats'] = 'Track daily hits (must have stats enabled)'; +$txt['enableCompressedOutput'] = 'Enable compressed output'; +$txt['databaseSession_enable'] = 'Use database driven sessions'; +$txt['databaseSession_loose'] = 'Allow browsers to go back to cached pages'; +$txt['databaseSession_lifetime'] = 'Seconds before an unused session timeout'; +$txt['enableErrorLogging'] = 'Enable error logging'; +$txt['cookieTime'] = 'Default login cookies length (in minutes)'; +$txt['localCookies'] = 'Enable local storage of cookies
    (SSI won\'t work well with this on.)
    '; +$txt['globalCookies'] = 'Use subdomain independent cookies
    (turn off local cookies first!)
    '; +$txt['redirectMetaRefresh'] = 'Use a META redirect instead of HTTP
    (for IIS 4.0 and some Apache versions.)
    '; +$txt['securityDisable'] = 'Disable administration security'; +$txt['registration_method'] = 'Method of registration employed for new members'; +$txt['registration_disabled'] = 'Registration Disabled'; +$txt['registration_standard'] = 'Immediate Registration'; +$txt['registration_activate'] = 'Member Activation'; +$txt['registration_approval'] = 'Member Approval'; +$txt['notify_on_new_registration'] = 'Notify administrators when a new member joins'; +$txt['send_validation_onChange'] = 'Require reactivation after email change'; +$txt['send_welcomeEmail'] = 'Send welcome email to new members'; +$txt['autoOptDatabase'] = 'Optimize tables every how many days?
    (0 to disable.)
    '; +$txt['autoOptMaxOnline'] = 'Maximum users online when optimizing
    (0 for no max.)
    '; +$txt['autoFixDatabase'] = 'Automatically fix broken tables'; +$txt['notifyAnncmnts_UserDisable'] = 'Allow users to disable announcements'; +$txt['modlog_enabled'] = 'Log moderation actions'; +$txt['queryless_urls'] = 'Search engine friendly URLs
    Apache only!
    '; +$txt['maxwidth'] = 'Max width of posted pictures (0 = disable)'; +$txt['maxheight'] = 'Max height of posted pictures (0 = disable)'; +$txt['mail_type'] = 'Mail type'; +$txt['smtp_host'] = 'SMTP server'; +$txt['smtp_port'] = 'SMTP port'; +$txt['smtp_username'] = 'SMTP username'; +$txt['smtp_password'] = 'SMTP password'; +$txt['xmlnews_enable'] = 'Enable XML/RSS news'; +$txt['xmlnews_maxlen'] = 'Maximum post length:
    (0 to disable, bad idea.)
    '; +$txt['recycle_enable'] = 'Enable recycling of deleted topics'; +$txt['recycle_board'] = 'Board for recycled topics'; + +$txt['mods_cat_layout'] = 'Layout and Options'; +$txt['compactTopicPagesEnable'] = 'Limit number of displayed page links'; +$txt['smf235'] = 'Contiguous pages to display:'; +$txt['smf236'] = 'to display'; +$txt['todayMod'] = 'Enable "Today" feature'; +$txt['smf290'] = 'Disabled'; +$txt['smf291'] = 'Only Today'; +$txt['smf292'] = 'Today & Yesterday'; +$txt['topbottomEnable'] = 'Enable Go Up/Go Down buttons'; +$txt['onlineEnable'] = 'Show online/offline in posts and PMs'; +$txt['enableVBStyleLogin'] = 'Show a quick login on every page'; +$txt['autoLinkUrls'] = 'Automatically link posted URLs'; +$txt['fixLongWords'] = 'Break up words with more letters than:
    (0 to disable)
    '; +$txt['defaultMaxTopics'] = 'Maximum topics to display in the message index'; +$txt['defaultMaxMessages'] = 'Maximum messages to display in a topic page'; +$txt['defaultMaxMembers'] = 'Members per page in member list'; +$txt['topicSummaryPosts'] = 'Posts to show on topic summary'; +$txt['enableAllMessages'] = 'Max number of replies in a topic to show "All" posts:
    (0 to never show "All")
    '; +$txt['hotTopicPosts'] = 'Number of posts for a hot topic'; +$txt['hotTopicVeryPosts'] = 'Number of posts for a very hot topic'; +$txt['enableParticipation'] = 'Enable participation icons'; +$txt['enablePreviousNext'] = 'Enable previous/next topic links'; +$txt['timeLoadPageEnable'] = 'Display time taken to create every page'; +$txt['disableHostnameLookup'] = 'Disable hostname lookups?'; +$txt['who_enabled'] = 'Enable who\'s online list'; + +$txt['mods_cat_search'] = 'Search'; +$txt['simpleSearch'] = 'Enable simple search'; +$txt['search_match_complete_words'] = 'Only search for complete word matches'; +$txt['disableTemporaryTables'] = 'Disable temporary tables
    (only check if use of temporary tables is not allowed)
    '; +$txt['search_results_per_page'] = 'Number of search results per page'; +$txt['search_cache_size'] = 'Maximum cached searches
    (0 to disable caching)
    '; +$txt['search_weight_frequency'] = 'Relative search weight for number of matching messages within a topic'; +$txt['search_weight_age'] = 'Relative search weight for age of last matching message'; +$txt['search_weight_length'] = 'Relative search weight for topic length'; +$txt['search_weight_subject'] = 'Relative search weight for a matching subject'; +$txt['search_weight_first_message'] = 'Relative search weight for a first message match'; + +$txt['mods_cat_avatars'] = 'Avatars'; +$txt['avatar_allow_server_stored'] = 'Allow members to select a server-stored avatar'; +$txt['avatar_directory'] = 'Avatars directory'; +$txt['avatar_url'] = 'Avatars URL'; +$txt['avatar_allow_external_url'] = 'Allow members to select an external avatar (using a URL)'; +$txt['avatar_max_width_external'] = 'Maximum width external avatar (0 = no limit)'; +$txt['avatar_max_height_external'] = 'Maximum height external avatar (0 = no limit)'; +$txt['avatar_check_size'] = 'Check the avatar size every time it is displayed'; +$txt['avatar_action_too_large'] = 'If the avatar is too large...'; +$txt['option_refuse'] = 'Refuse it'; +$txt['option_html_resize'] = 'Let the HTML resize it'; +$txt['option_download_and_resize'] = 'Download and resize it (requires GD module)'; +$txt['avatar_allow_upload'] = 'Allow members to upload their own avatars'; +$txt['avatar_max_width_upload'] = 'Maximum width of uploaded avatar (0 = no limit)'; +$txt['avatar_max_height_upload'] = 'Maximum height of uploaded avatar (0 = no limit)'; +$txt['avatar_resize_upload'] = 'Resize oversized large avatars (requires GD module)'; +$txt['avatar_download_png'] = 'Use PNG for resized avatars?'; + +$txt['smf294'] = 'Attachments'; +$txt['attachmentEnable'] = 'Attachments mode'; +$txt['smf111'] = 'Disable attachments|Enable all attachments|Disable new attachments'; +$txt['attachmentCheckExtensions'] = 'Check attachment\'s extension'; +$txt['attachmentExtensions'] = 'Allowed attachment extensions'; +$txt['attachmentShowImages'] = 'Display image attachments as pictures under post'; +$txt['attachmentEncryptFilenames'] = 'Encrypt stored filenames'; +$txt['attachmentUploadDir'] = 'Attachments directory'; +$txt['attachmentDirSizeLimit'] = 'Max attachment folder space (in KB)'; +$txt['attachmentPostLimit'] = 'Max attachment size per post (in KB)'; +$txt['attachmentSizeLimit'] = 'Max size per attachment (in KB)'; +$txt['attachmentNumPerPostLimit'] = 'Max number of attachments per post'; + +$txt['smf293'] = 'Karma'; +$txt['karmaMode'] = 'Karma mode'; +$txt['smf64'] = 'Disable karma|Enable karma total|Enable karma positive/negative'; +$txt['karmaMinPosts'] = 'Set the minimum posts needed to modify karma'; +$txt['karmaWaitTime'] = 'Set wait time in hours'; +$txt['karmaTimeRestrictAdmins'] = 'Restrict administrators to wait time'; +$txt['karmaLabel'] = 'Karma label'; +$txt['karmaApplaudLabel'] = 'Karma applaud label'; +$txt['karmaSmiteLabel'] = 'Karma smite label'; + +$txt['karmadescmod'] = 'Enable Karma Description Mod'; +$txt['karmamaxmembers'] = 'Members per page in Karma Description log'; +$txt['karmalogview'] = 'Use member names as link to their profiles'; +$txt['karmapermiss'] = 'Allow users view Karma Description log (See Permissions)'; +$txt['karmalinks'] = 'Enable karma links in users profiles'; +$txt['karmaisowner'] = 'Disable whole karma log for users but enable own karma log'; +$txt['karmakarma'] = 'Display users karma(+/-) in Karma Description Log'; +$txt['karmaurl'] = 'Enable "Where" field in Karma Description Log'; +$txt['karmaotherstat'] = 'Show other Karma Statistics'; +$txt['karmasurv'] = 'Applaud or smite users without explanation'; +$txt['karmawhatwrite'] = 'Write this in the log, when explanation is disabled'; +$txt['karmacensor'] = 'Censor karma explanation'; +$txt['karmatopicstarter'] = 'Users can change only topic starter karma'; + +$txt['googleMapsEnable'] = 'Enable the Google Member Map'; +$txt['googleMapsEnableLegend'] = 'Show a Pin Legend'; +$txt['googleSidebar'] = 'Where to show sidebar'; +$txt['googleMapsKey'] = 'The key from the Google Maps API Page'; +$txt['googleMapsPinGender'] = 'Should the pins reflect users gender?'; +$txt['googleMapsPinNumber'] = 'Number of max pins to show on map'; +$txt['googleMapsType'] = 'The map type to show'; +$txt['googleMapsDefaultLat'] = 'The default Latitude'; +$txt['googleMapsDefaultLong'] = 'The default Longitude'; +$txt['googleMapsDefaultZoom'] = 'The defualt Zoom'; +$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering'; +$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster'; +$txt['googleMapsMaxVisMarker'] = 'Maximum Visable Pins On Map'; +$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters'; +$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box'; +$txt['googleMapFO'] = 'Member Map'; + +$txt['mods_cat_calendar'] = 'Calendar'; +$txt['cal_enabled'] = 'Enable the calendar'; +$txt['cal_daysaslink'] = 'Show days as links to \'Post Event\''; +$txt['cal_showweeknum'] = 'Show week numbers'; +$txt['cal_days_for_index'] = 'Max days in advance on board index'; +$txt['cal_showholidaysonindex'] = 'Show holidays on board index'; +$txt['cal_showbdaysonindex'] = 'Show birthdays on board index'; +$txt['cal_showeventsonindex'] = 'Show events on board index'; +$txt['cal_defaultboard'] = 'Default board to post events in'; +$txt['cal_minyear'] = 'Minimum year'; +$txt['cal_maxyear'] = 'Maximum year'; +$txt['cal_bdaycolor'] = 'Birthday color'; +$txt['cal_eventcolor'] = 'Event color'; +$txt['cal_holidaycolor'] = 'Holiday color'; +$txt['cal_allowspan'] = 'Allow events to span multiple days'; +$txt['cal_maxspan'] = 'Max number of days an event can span'; + +$txt['recent_topics'] = 'Show recent topics instead of recent posts'; +?> \ No newline at end of file diff --git a/Themes/default/languages/ModSettings.english.php~ b/Themes/default/languages/ModSettings.english.php~ new file mode 100644 index 0000000..e2869ef --- /dev/null +++ b/Themes/default/languages/ModSettings.english.php~ @@ -0,0 +1,202 @@ +theme settings for more options. Click the help icons for more information about a setting.'; +$txt['mods_cat_expand_all'] = '(expand all)'; + +$txt['mods_cat_features'] = 'Basic Forum Features'; +$txt['pollMode'] = 'Poll mode'; +$txt['smf34'] = 'Disable polls'; +$txt['smf32'] = 'Enable polls'; +$txt['smf33'] = 'Show existing polls as topics'; +$txt['enableStickyTopics'] = 'Enable sticky topics'; +$txt['allow_guestAccess'] = 'Allow guests to browse the forum'; +$txt['userLanguage'] = 'Enable user-selectable language support'; +$txt['allow_editDisplayName'] = 'Allow users to edit their displayed name?'; +$txt['allow_hideOnline'] = 'Allow non-administrators to hide their online status?'; +$txt['allow_hideEmail'] = 'Allow users to hide their email from everyone except admins?'; +$txt['guest_hideContacts'] = 'Do not reveal contact details of members to guests'; +$txt['titlesEnable'] = 'Enable custom titles'; +$txt['default_personalText'] = 'Default personal text'; +$txt['max_signatureLength'] = 'Maximum allowed characters in signatures
    (0 for no max.)
    '; +$txt['removeNestedQuotes'] = 'Remove nested quotes when posting'; +$txt['enableEmbeddedFlash'] = 'Embed flash into posts
    (may be a security risk!)
    '; +$txt['enablePostHTML'] = 'Enable basic HTML in posts'; +$txt['disabledBBC'] = 'Disabled BBC Code (comma separated)'; +$txt['enableBBC'] = 'Enable bulletin board code (BBC)'; +$txt['enableNewReplyWarning'] = 'Warn members of new replies made while posting?'; +$txt['max_messageLength'] = 'Maximum allowed characters in posts
    (0 for no max.)
    '; +$txt['number_format'] = 'Default number format'; +$txt['time_format'] = 'Default time format'; +$txt['time_offset'] = 'Overall time offset
    (added to the member specific option.)
    '; +$txt['spamWaitTime'] = 'Seconds required between posts from the same IP'; +$txt['edit_wait_time'] = 'Courtesy edit wait time'; +$txt['failed_login_threshold'] = 'Failed login threshold'; +$txt['lastActive'] = 'User online time threshold'; +$txt['enableSpellChecking'] = 'Enable spell checking
    (this does not work on all servers!)
    '; +$txt['trackStats'] = 'Track daily statistics'; +$txt['hitStats'] = 'Track daily hits (must have stats enabled)'; +$txt['enableCompressedOutput'] = 'Enable compressed output'; +$txt['databaseSession_enable'] = 'Use database driven sessions'; +$txt['databaseSession_loose'] = 'Allow browsers to go back to cached pages'; +$txt['databaseSession_lifetime'] = 'Seconds before an unused session timeout'; +$txt['enableErrorLogging'] = 'Enable error logging'; +$txt['cookieTime'] = 'Default login cookies length (in minutes)'; +$txt['localCookies'] = 'Enable local storage of cookies
    (SSI won\'t work well with this on.)
    '; +$txt['globalCookies'] = 'Use subdomain independent cookies
    (turn off local cookies first!)
    '; +$txt['redirectMetaRefresh'] = 'Use a META redirect instead of HTTP
    (for IIS 4.0 and some Apache versions.)
    '; +$txt['securityDisable'] = 'Disable administration security'; +$txt['registration_method'] = 'Method of registration employed for new members'; +$txt['registration_disabled'] = 'Registration Disabled'; +$txt['registration_standard'] = 'Immediate Registration'; +$txt['registration_activate'] = 'Member Activation'; +$txt['registration_approval'] = 'Member Approval'; +$txt['notify_on_new_registration'] = 'Notify administrators when a new member joins'; +$txt['send_validation_onChange'] = 'Require reactivation after email change'; +$txt['send_welcomeEmail'] = 'Send welcome email to new members'; +$txt['autoOptDatabase'] = 'Optimize tables every how many days?
    (0 to disable.)
    '; +$txt['autoOptMaxOnline'] = 'Maximum users online when optimizing
    (0 for no max.)
    '; +$txt['autoFixDatabase'] = 'Automatically fix broken tables'; +$txt['notifyAnncmnts_UserDisable'] = 'Allow users to disable announcements'; +$txt['modlog_enabled'] = 'Log moderation actions'; +$txt['queryless_urls'] = 'Search engine friendly URLs
    Apache only!
    '; +$txt['maxwidth'] = 'Max width of posted pictures (0 = disable)'; +$txt['maxheight'] = 'Max height of posted pictures (0 = disable)'; +$txt['mail_type'] = 'Mail type'; +$txt['smtp_host'] = 'SMTP server'; +$txt['smtp_port'] = 'SMTP port'; +$txt['smtp_username'] = 'SMTP username'; +$txt['smtp_password'] = 'SMTP password'; +$txt['xmlnews_enable'] = 'Enable XML/RSS news'; +$txt['xmlnews_maxlen'] = 'Maximum post length:
    (0 to disable, bad idea.)
    '; +$txt['recycle_enable'] = 'Enable recycling of deleted topics'; +$txt['recycle_board'] = 'Board for recycled topics'; + +$txt['mods_cat_layout'] = 'Layout and Options'; +$txt['compactTopicPagesEnable'] = 'Limit number of displayed page links'; +$txt['smf235'] = 'Contiguous pages to display:'; +$txt['smf236'] = 'to display'; +$txt['todayMod'] = 'Enable "Today" feature'; +$txt['smf290'] = 'Disabled'; +$txt['smf291'] = 'Only Today'; +$txt['smf292'] = 'Today & Yesterday'; +$txt['topbottomEnable'] = 'Enable Go Up/Go Down buttons'; +$txt['onlineEnable'] = 'Show online/offline in posts and PMs'; +$txt['enableVBStyleLogin'] = 'Show a quick login on every page'; +$txt['autoLinkUrls'] = 'Automatically link posted URLs'; +$txt['fixLongWords'] = 'Break up words with more letters than:
    (0 to disable)
    '; +$txt['defaultMaxTopics'] = 'Maximum topics to display in the message index'; +$txt['defaultMaxMessages'] = 'Maximum messages to display in a topic page'; +$txt['defaultMaxMembers'] = 'Members per page in member list'; +$txt['topicSummaryPosts'] = 'Posts to show on topic summary'; +$txt['enableAllMessages'] = 'Max number of replies in a topic to show "All" posts:
    (0 to never show "All")
    '; +$txt['hotTopicPosts'] = 'Number of posts for a hot topic'; +$txt['hotTopicVeryPosts'] = 'Number of posts for a very hot topic'; +$txt['enableParticipation'] = 'Enable participation icons'; +$txt['enablePreviousNext'] = 'Enable previous/next topic links'; +$txt['timeLoadPageEnable'] = 'Display time taken to create every page'; +$txt['disableHostnameLookup'] = 'Disable hostname lookups?'; +$txt['who_enabled'] = 'Enable who\'s online list'; + +$txt['mods_cat_search'] = 'Search'; +$txt['simpleSearch'] = 'Enable simple search'; +$txt['search_match_complete_words'] = 'Only search for complete word matches'; +$txt['disableTemporaryTables'] = 'Disable temporary tables
    (only check if use of temporary tables is not allowed)
    '; +$txt['search_results_per_page'] = 'Number of search results per page'; +$txt['search_cache_size'] = 'Maximum cached searches
    (0 to disable caching)
    '; +$txt['search_weight_frequency'] = 'Relative search weight for number of matching messages within a topic'; +$txt['search_weight_age'] = 'Relative search weight for age of last matching message'; +$txt['search_weight_length'] = 'Relative search weight for topic length'; +$txt['search_weight_subject'] = 'Relative search weight for a matching subject'; +$txt['search_weight_first_message'] = 'Relative search weight for a first message match'; + +$txt['mods_cat_avatars'] = 'Avatars'; +$txt['avatar_allow_server_stored'] = 'Allow members to select a server-stored avatar'; +$txt['avatar_directory'] = 'Avatars directory'; +$txt['avatar_url'] = 'Avatars URL'; +$txt['avatar_allow_external_url'] = 'Allow members to select an external avatar (using a URL)'; +$txt['avatar_max_width_external'] = 'Maximum width external avatar (0 = no limit)'; +$txt['avatar_max_height_external'] = 'Maximum height external avatar (0 = no limit)'; +$txt['avatar_check_size'] = 'Check the avatar size every time it is displayed'; +$txt['avatar_action_too_large'] = 'If the avatar is too large...'; +$txt['option_refuse'] = 'Refuse it'; +$txt['option_html_resize'] = 'Let the HTML resize it'; +$txt['option_download_and_resize'] = 'Download and resize it (requires GD module)'; +$txt['avatar_allow_upload'] = 'Allow members to upload their own avatars'; +$txt['avatar_max_width_upload'] = 'Maximum width of uploaded avatar (0 = no limit)'; +$txt['avatar_max_height_upload'] = 'Maximum height of uploaded avatar (0 = no limit)'; +$txt['avatar_resize_upload'] = 'Resize oversized large avatars (requires GD module)'; +$txt['avatar_download_png'] = 'Use PNG for resized avatars?'; + +$txt['smf294'] = 'Attachments'; +$txt['attachmentEnable'] = 'Attachments mode'; +$txt['smf111'] = 'Disable attachments|Enable all attachments|Disable new attachments'; +$txt['attachmentCheckExtensions'] = 'Check attachment\'s extension'; +$txt['attachmentExtensions'] = 'Allowed attachment extensions'; +$txt['attachmentShowImages'] = 'Display image attachments as pictures under post'; +$txt['attachmentEncryptFilenames'] = 'Encrypt stored filenames'; +$txt['attachmentUploadDir'] = 'Attachments directory'; +$txt['attachmentDirSizeLimit'] = 'Max attachment folder space (in KB)'; +$txt['attachmentPostLimit'] = 'Max attachment size per post (in KB)'; +$txt['attachmentSizeLimit'] = 'Max size per attachment (in KB)'; +$txt['attachmentNumPerPostLimit'] = 'Max number of attachments per post'; + +$txt['smf293'] = 'Karma'; +$txt['karmaMode'] = 'Karma mode'; +$txt['smf64'] = 'Disable karma|Enable karma total|Enable karma positive/negative'; +$txt['karmaMinPosts'] = 'Set the minimum posts needed to modify karma'; +$txt['karmaWaitTime'] = 'Set wait time in hours'; +$txt['karmaTimeRestrictAdmins'] = 'Restrict administrators to wait time'; +$txt['karmaLabel'] = 'Karma label'; +$txt['karmaApplaudLabel'] = 'Karma applaud label'; +$txt['karmaSmiteLabel'] = 'Karma smite label'; + +$txt['karmadescmod'] = 'Enable Karma Description Mod'; +$txt['karmamaxmembers'] = 'Members per page in Karma Description log'; +$txt['karmalogview'] = 'Use member names as link to their profiles'; +$txt['karmapermiss'] = 'Allow users view Karma Description log (See Permissions)'; +$txt['karmalinks'] = 'Enable karma links in users profiles'; +$txt['karmaisowner'] = 'Disable whole karma log for users but enable own karma log'; +$txt['karmakarma'] = 'Display users karma(+/-) in Karma Description Log'; +$txt['karmaurl'] = 'Enable "Where" field in Karma Description Log'; +$txt['karmaotherstat'] = 'Show other Karma Statistics'; +$txt['karmasurv'] = 'Applaud or smite users without explanation'; +$txt['karmawhatwrite'] = 'Write this in the log, when explanation is disabled'; +$txt['karmacensor'] = 'Censor karma explanation'; +$txt['karmatopicstarter'] = 'Users can change only topic starter karma'; + +$txt['googleMapsEnable'] = 'Enable the Google Member Map'; +$txt['googleMapsEnableLegend'] = 'Show a Pin Legend'; +$txt['googleSidebar'] = 'Where to show sidebar'; +$txt['googleMapsKey'] = 'The key from the Google Maps API Page'; +$txt['googleMapsPinGender'] = 'Should the pins reflect users gender?'; +$txt['googleMapsPinNumber'] = 'Number of max pins to show on map'; +$txt['googleMapsType'] = 'The map type to show'; +$txt['googleMapsDefaultLat'] = 'The default Latitude'; +$txt['googleMapsDefaultLong'] = 'The default Longitude'; +$txt['googleMapsDefaultZoom'] = 'The defualt Zoom'; +$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering'; +$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster'; +$txt['googleMapsMaxVisMarker'] = 'Maximum Visable Pins On Map'; +$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters'; +$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box'; +$txt['googleMapFO'] = 'Member Map'; + +$txt['mods_cat_calendar'] = 'Calendar'; +$txt['cal_enabled'] = 'Enable the calendar'; +$txt['cal_daysaslink'] = 'Show days as links to \'Post Event\''; +$txt['cal_showweeknum'] = 'Show week numbers'; +$txt['cal_days_for_index'] = 'Max days in advance on board index'; +$txt['cal_showholidaysonindex'] = 'Show holidays on board index'; +$txt['cal_showbdaysonindex'] = 'Show birthdays on board index'; +$txt['cal_showeventsonindex'] = 'Show events on board index'; +$txt['cal_defaultboard'] = 'Default board to post events in'; +$txt['cal_minyear'] = 'Minimum year'; +$txt['cal_maxyear'] = 'Maximum year'; +$txt['cal_bdaycolor'] = 'Birthday color'; +$txt['cal_eventcolor'] = 'Event color'; +$txt['cal_holidaycolor'] = 'Holiday color'; +$txt['cal_allowspan'] = 'Allow events to span multiple days'; +$txt['cal_maxspan'] = 'Max number of days an event can span'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/ModSettings.russian.php b/Themes/default/languages/ModSettings.russian.php new file mode 100644 index 0000000..6dd355c --- /dev/null +++ b/Themes/default/languages/ModSettings.russian.php @@ -0,0 +1,211 @@ +настройки темы где больше опций. Нажмите иконку помощи, чтобы получить больше информации о настройках.'; +$txt['mods_cat_expand_all'] = '(расширить все)'; + +$txt['mods_cat_features'] = 'Основные Опции Форума'; +$txt['pollMode'] = 'Мод опроса'; +$txt['smf34'] = 'Отключить опросы'; +$txt['smf32'] = 'Включить опросы'; +$txt['smf33'] = 'Показывать существующие опросы как темы'; +$txt['enableStickyTopics'] = 'Включить прикрепленные темы'; +$txt['allow_guestAccess'] = 'Позволить гостям смотреть форум'; +$txt['userLanguage'] = 'Включить выбираемые языки пользователя'; +$txt['allow_editDisplayName'] = 'Позволить пользователям редактировать их отображаемые имена?'; +$txt['allow_hideOnline'] = 'Позволить не администраторам прятать их online статус?'; +$txt['allow_hideEmail'] = 'Разрешить пользователям прятать их email от всех, кроме администратора?'; +$txt['guest_hideContacts'] = 'Не показывать адреса пользователей гостям'; +$txt['titlesEnable'] = 'Включить изменяемый титул'; +$txt['default_personalText'] = 'Персональный текст по умолчанию'; +$txt['max_signatureLength'] = 'Максимум позволенных букв в подписях
    (0 чтоб без ограничений.)
    '; +$txt['removeNestedQuotes'] = 'Удалять угнездившиеся цитаты при вводе сообщений'; +$txt['enableEmbeddedFlash'] = 'Вставлять flash в сообщения
    (есть риск безопасности!)
    '; +$txt['enablePostHTML'] = 'Включить basic HTML в сообщениях'; +$txt['disabledBBC'] = 'Выключенные BBC Коды (разделены запятой)'; +$txt['enableBBC'] = 'Включить bulletin board code (BBC)'; +$txt['enableNewReplyWarning'] = 'Предупреждать участников о новых ответах, сделанных пока они печатали сообщение?'; +$txt['max_messageLength'] = 'Максимальное количество букв в сообщениях
    (0 - без ограничений.)
    '; +$txt['number_format'] = 'Числовой формат по умолчанию'; +$txt['time_format'] = 'Формат времени по умолчанию'; +$txt['time_offset'] = 'Начало отсчета вемени
    (добавлено к определяемым участником опциям.)
    '; +$txt['spamWaitTime'] = 'Количество секунд между сообщениями с одного IP'; +$txt['edit_wait_time'] = 'Аккуратно редактируйте время ожидания'; +$txt['failed_login_threshold'] = 'Порог несработавших входов'; +$txt['lastActive'] = 'Порог времени для присутствующего пользователя'; +$txt['enableSpellChecking'] = 'Включить проверку орфографии
    (Работает не на всех серверах!)
    '; +$txt['trackStats'] = 'Отслеживать ежедневную статистику'; +$txt['hitStats'] = 'Отслеживать ежедневные нажатия (статистика должна быть включена)'; +$txt['enableCompressedOutput'] = 'Включить сжатый трафик'; +$txt['databaseSession_enable'] = 'Использовать ведение сессий Базы Данных'; +$txt['databaseSession_loose'] = 'Разрешить браузерам возвращаться на кэшируемые страницы'; +$txt['databaseSession_lifetime'] = 'Время, которое истекает перед неиспользованной сессией'; +$txt['enableErrorLogging'] = 'Включить лог ошибок'; +$txt['cookieTime'] = 'По умолчанию cookies входа длиной (в минутах)'; +$txt['localCookies'] = 'Включить локальное хранение cookies
    (SSI не будет нормально работать с этим.)
    '; +$txt['globalCookies'] = 'Использовать субдомены независимых cookies
    (отключите локальные cookies сначала!)
    '; +$txt['redirectMetaRefresh'] = 'Использовать META перенаправление вместо HTTP
    (для IIS 4.0 и некоторых Apache версий.)
    '; +$txt['securityDisable'] = 'Отключить безопасность в администрировании'; +$txt['registration_method'] = 'Метод регистрации работающий для новых участников'; +$txt['registration_disabled'] = 'Регистрация Отключена'; +$txt['registration_standard'] = 'Мгновенная Регистрация'; +$txt['registration_activate'] = 'Активация Участников'; +$txt['registration_approval'] = 'Подтверждение Участников'; +$txt['notify_on_new_registration'] = 'Извещать администраторов, когда присоединяется новый участник'; +$txt['send_validation_onChange'] = 'Требовать реактивации, когда меняется email'; +$txt['send_welcomeEmail'] = 'Отправлять приветственный email новым участникам'; +$txt['autoOptDatabase'] = 'Как часто (в днях) оптимизировать таблицы?
    (0 значит отключено.)
    '; +$txt['autoOptMaxOnline'] = 'Максимум пользователей online когда происходит оптимизация
    (0 если без ограничений.)
    '; +$txt['autoFixDatabase'] = 'Автоматически исправлять испорченные таблицы'; +$txt['notifyAnncmnts_UserDisable'] = 'Позволять пользователям отключать объявления'; +$txt['modlog_enabled'] = 'Вести лог действий модератора'; +$txt['queryless_urls'] = 'Поисковый движок дружественных URLs
    Apache только!
    '; +$txt['maxwidth'] = 'Максимальная ширина вставленных картинок (0 = отключено)'; +$txt['maxheight'] = 'Максимальная высота вставленных картинок (0 = отключено)'; +$txt['mail_type'] = 'Тип почты'; +$txt['smtp_host'] = 'SMTP сервер'; +$txt['smtp_port'] = 'SMTP порт'; +$txt['smtp_username'] = 'SMTP имя пользователя'; +$txt['smtp_password'] = 'SMTP пароль'; +$txt['xmlnews_enable'] = 'Включить XML/RSS новости'; +$txt['xmlnews_maxlen'] = 'Максимальная длина сообщения:
    (0 чтоб отключить, плохая идея.)
    '; +$txt['recycle_enable'] = 'Включить восстановление удаленных тем'; +$txt['recycle_board'] = 'Форум для восстановленных тем'; + +$txt['mods_cat_layout'] = 'Внешний вид и Опции'; +$txt['compactTopicPagesEnable'] = 'Ограничить количество отображаемых страниц ссылок'; +$txt['smf235'] = 'Смежные страницы для отображения:'; +$txt['smf236'] = 'для отображения'; +$txt['todayMod'] = 'Включить функцию "Сегодня"'; +$txt['smf290'] = 'Отключено'; +$txt['smf291'] = 'Только Сегодня'; +$txt['smf292'] = 'Сегодня & Вчера'; +$txt['topbottomEnable'] = 'Включить кнопки Вверх/Вниз'; +$txt['onlineEnable'] = 'Показывать в сообщениях и ЛС статус online/offline'; +$txt['enableVBStyleLogin'] = 'Показывать быстрый вход на форум на каждой странице'; +$txt['autoLinkUrls'] = 'Автоматически цеплять напечатанные URLs'; +$txt['fixLongWords'] = 'Разделять слова с количеством букв более чем:
    (0 значит отключить)
    '; +$txt['defaultMaxTopics'] = 'Максимум тем отображаемых на странице'; +$txt['defaultMaxMessages'] = 'Максимум сообщений отображаемых в теме'; +$txt['defaultMaxMembers'] = 'Пользователей на страницу в списке пользователей'; +$txt['topicSummaryPosts'] = 'Отображать сообщений в краткой информации о теме'; +$txt['enableAllMessages'] = 'Максимальное количество ответов в теме при отображения "Всех" сообщений:
    (0 значит никогда не показывать "Все")
    '; +$txt['hotTopicPosts'] = 'Количество сообщений для горячей темы'; +$txt['hotTopicVeryPosts'] = 'Количество сообщений для очень горячей темы'; +$txt['enableParticipation'] = 'Включить иконки участия'; +$txt['enablePreviousNext'] = 'Включить ссылки предыдущая/следующая тема'; +$txt['timeLoadPageEnable'] = 'Отображать время ушедшее на создание каждой страницы'; +$txt['disableHostnameLookup'] = 'Отключить видимость имени хоста?'; +$txt['who_enabled'] = 'Включить список Кто online'; + +$txt['mods_cat_search'] = 'Поиск'; +$txt['simpleSearch'] = 'Включить простой поиск'; +$txt['search_match_complete_words'] = 'Искать только полное совпадение слов'; +$txt['disableTemporaryTables'] = 'Отключить временные таблицы
    (только проверьте, что временные таблицы не разрешены)
    '; +$txt['search_results_per_page'] = 'Количество результатов поиска на страницу'; +$txt['search_cache_size'] = 'Максимум кэшируемых поисков
    (0 чтобы отключить кэширование)
    '; +$txt['search_weight_frequency'] = 'Относительный весовой поиск по количеству подходящих сообщений в теме'; +$txt['search_weight_age'] = 'Относительный весовой поиск по времени создания последнего сообщения'; +$txt['search_weight_length'] = 'Относительный весовой поиск по длине темы'; +$txt['search_weight_subject'] = 'Относительный весовой поиск по подходящей теме'; +$txt['search_weight_first_message'] = 'Относительный весовой поиск по первому сообщению в теме'; + +$txt['mods_cat_avatars'] = 'Аватары'; +$txt['avatar_allow_server_stored'] = 'Позволить пользователям выбирать хранящиеся на сервере аватары'; +$txt['avatar_directory'] = 'Папка аватаров'; +$txt['avatar_url'] = 'URL аватаров'; +$txt['avatar_allow_external_url'] = 'Позволить пользователям выбирать внешний аватар (используя URL)'; +$txt['avatar_max_width_external'] = 'Максимальная ширина внешних аватаров (0 = без ограничений)'; +$txt['avatar_max_height_external'] = 'Максимальная высота внешних аватаров (0 = без ограничений)'; +$txt['avatar_check_size'] = 'Проверять размер аватара каждый раз, когда он отображается'; +$txt['avatar_action_too_large'] = 'Если аватар слишком большой...'; +$txt['option_refuse'] = 'Отбросить его'; +$txt['option_html_resize'] = 'Позволить HTML изменить его размер'; +$txt['option_download_and_resize'] = 'Загрузить и изменить его размер (требуется GD модуль)'; +$txt['avatar_allow_upload'] = 'Позволить участникам загружать их собственные аватары'; +$txt['avatar_max_width_upload'] = 'Максимальная ширина загруженных аватаров (0 = без ограничений)'; +$txt['avatar_max_height_upload'] = 'Максимальная высота загруженных аватаров (0 = без ограничений)'; +$txt['avatar_resize_upload'] = 'Изменить размер слишком больших аватаров (требуется GD модуль)'; +$txt['avatar_download_png'] = 'Использовать PNG для изменения размера аватаров?'; + +$txt['smf294'] = 'Вложения'; +$txt['attachmentEnable'] = 'Мод вложений'; +$txt['smf111'] = 'Отключить вложения|Включить вложения|Отключить новые вложения'; +$txt['attachmentCheckExtensions'] = 'Проверять расширения вложений'; +$txt['attachmentExtensions'] = 'Разрешенные расширения вложений'; +$txt['attachmentShowImages'] = 'Отображать картинку вложений как картинку под сообщением'; +$txt['attachmentEncryptFilenames'] = 'Кодировать хранящиеся имена файлов'; +$txt['attachmentUploadDir'] = 'Папка вложений'; +$txt['attachmentDirSizeLimit'] = 'Максимальный размер папки вложений (в KB)'; +$txt['attachmentPostLimit'] = 'Максимальный размер вложений на одно сообщение (в KB)'; +$txt['attachmentSizeLimit'] = 'Максимальный размер одного вложения (в KB)'; +$txt['attachmentNumPerPostLimit'] = 'Максимальное количество вложений на одно сообщение'; + +$txt['smf293'] = 'Репутация'; +$txt['karmaMode'] = 'Мод репутации'; +$txt['smf64'] = 'Отключить репутацию|Включить репутацию вообще|Отключить репутацию позитивную/негативную'; +$txt['karmaMinPosts'] = 'Установить минимум сообщений необходимый для изменения репутации'; +$txt['karmaWaitTime'] = 'Установить период ожидания в часах'; +$txt['karmaTimeRestrictAdmins'] = 'Ограничивать администраторов по времени ожидания'; +$txt['karmaLabel'] = 'Ярлык репутации'; +$txt['karmaApplaudLabel'] = 'Ярлык улучшения репутации'; +$txt['karmaSmiteLabel'] = 'Ярлык ухудшения репутации'; + +$txt['googleMapsEnable'] = 'Enable the Google Member Map'; +$txt['googleMapsEnableLegend'] = 'Show a Pin Legend'; +$txt['googleSidebar'] = 'Where to show sidebar'; +$txt['googleMapsKey'] = 'The key from the Google Maps API Page'; +$txt['googleMapsPinGender'] = 'Should the pins reflect users gender?'; +$txt['googleMapsPinNumber'] = 'Number of max pins to show on map'; +$txt['googleMapsType'] = 'The map type to show'; +$txt['googleMapsDefaultLat'] = 'The default Latitude'; +$txt['googleMapsDefaultLong'] = 'The default Longitude'; +$txt['googleMapsDefaultZoom'] = 'The defualt Zoom'; +$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering'; +$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster'; +$txt['googleMapsMaxVisMarker'] = 'Maximum Visable Pins On Map'; +$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters'; +$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box'; +$txt['googleMapFO'] = 'Member Map'; + +$txt['mods_cat_calendar'] = 'Календарь'; +$txt['cal_enabled'] = 'Включить календарь'; +$txt['cal_daysaslink'] = 'Показывать дни как ссылку на \'Создать Событие\''; +$txt['cal_showweeknum'] = 'Показывать номера недель'; +$txt['cal_days_for_index'] = 'Максимум дней приближения на главной странице Форума'; +$txt['cal_showholidaysonindex'] = 'Показывать праздники на главной странице Форума'; +$txt['cal_showbdaysonindex'] = 'Показывать дни рождения на главной странице форума'; +$txt['cal_showeventsonindex'] = 'Показывать события на главной странице Форума'; +$txt['cal_defaultboard'] = 'Страница по умолчанию для сообщений о событиях'; +$txt['cal_minyear'] = 'Минимальный год'; +$txt['cal_maxyear'] = 'Максимальный год'; +$txt['cal_bdaycolor'] = 'Цвет дня рождения'; +$txt['cal_eventcolor'] = 'Цвет события'; +$txt['cal_holidaycolor'] = 'Цвет праздника'; +$txt['cal_allowspan'] = 'Позволить длительность события в течении нескольких дней'; +$txt['cal_maxspan'] = 'Максимальное количество дней, которое может длиться событие'; + +$txt['smf293'] = 'Karma'; +$txt['karmaMode'] = 'Karma mode'; +$txt['smf64'] = 'Disable karma|Enable karma total|Enable karma positive/negative'; +$txt['karmaMinPosts'] = 'Set the minimum posts needed to modify karma'; +$txt['karmaWaitTime'] = 'Set wait time in hours'; +$txt['karmaTimeRestrictAdmins'] = 'Restrict administrators to wait time'; +$txt['karmaLabel'] = 'Karma label'; +$txt['karmaApplaudLabel'] = 'Karma applaud label'; +$txt['karmaSmiteLabel'] = 'Karma smite label'; + +$txt['karmadescmod'] = 'Enable Karma Description Mod'; +$txt['karmamaxmembers'] = 'Members per page in Karma Description log'; +$txt['karmalogview'] = 'Use member names as link to their profiles'; +$txt['karmapermiss'] = 'Allow users view Karma Description log (See Permissions)'; +$txt['karmalinks'] = 'Enable karma links in users profiles'; +$txt['karmaisowner'] = 'Disable whole karma log for users but enable own karma log'; +$txt['karmakarma'] = 'Display users karma(+/-) in Karma Description Log'; +$txt['karmaurl'] = 'Enable "Where" field in Karma Description Log'; +$txt['karmaotherstat'] = 'Show other Karma Statistics'; +$txt['karmasurv'] = 'Applaud or smite users without explanation'; +$txt['karmawhatwrite'] = 'Write this in the log, when explanation is disabled'; +$txt['karmacensor'] = 'Censor karma explanation'; +$txt['karmatopicstarter'] = 'Users can change only topic starter karma'; +?> diff --git a/Themes/default/languages/Modifications.english.php b/Themes/default/languages/Modifications.english.php new file mode 100644 index 0000000..1862ff3 --- /dev/null +++ b/Themes/default/languages/Modifications.english.php @@ -0,0 +1,186 @@ +Click here to go place your pin if you have not already.'; +$txt['googleMapDisclaimer'] = 'Place your pin as close as you feel comfortable doing so.'; +$txt['cannot_googleMap_view'] = 'Sorry, you\'re not allowed to view the Member Map.'; +$txt['permissionname_googleMap_view'] = 'View Member Map'; +$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map. If not set, the people will not see the map.'; +$txt['cannot_googleMap_place'] = 'Sorry, you\'re not allowed to place a pin for the Member Map.'; +$txt['permissionname_googleMap_place'] = 'Place Pin on Member Map'; +$txt['permissionhelp_googleMap_place'] = 'Allow the people place there pin the Member Map. If not set, the people will not be able to place there pins.'; + +// Now Playing Mod +$txt['nowplaying1'] = "Now Playing"; +$txt['nowplaying2'] = "Now Playing: What are you listening to? [optional]"; +$txt['nowplaying3'] = "Now Playing: "; +$txt['nowplayingEnabled'] = "Enable 'Now Playing'?"; +$txt['nowplaying_image'] = "Now Playing Image: "; +$txt['nowplaying_text'] = "Now Playing Text: "; + +// OB - Googlebot - Begin + +// Boardindex Strings +$txt['ob_googlebot_modname'] = 'Googlebot & Spiders'; +$txt['ob_googlebot_spider'] = 'Spider'; +$txt['ob_googlebot_spiders'] = 'Spiders'; +$txt['ob_googlebot_spiders_last_active'] = 'Spiders active in past ' . $modSettings['lastActive'] . ' minutes'; + +// ModSettings +$txt['ob_googlebot_count_all_instances'] = 'Count all instances of same spider'; +$txt['ob_googlebot_display_all_instances'] = 'Display all instances of same spider
    ("' . $txt['ob_googlebot_count_all_instances'] . '" must be selected)
    '; +$txt['ob_googlebot_display_agent'] = 'Display agent instead of name'; +$txt['ob_googlebot_display_own_list'] = 'Display spiders in its own list'; +$txt['ob_googlebot_count_most_online'] = 'Count in "Most Online"'; + +// Permissions +$txt['permissiongroup_googlebot'] = $txt['ob_googlebot_modname']; +$txt['permissionname_googlebot_view'] = 'View Googlebot & Spiders'; + +// OB - Googlebot - End + +$txt['visual_warning_mod']='Visual Warning Mod'; +$txt['visualw_mess_ban']='Message To Show For Banned User'; +$txt['visualw_mess_mute']='Message To Show For Muted User'; +$txt['visualw_mess_pmod']='Message To Show For Post Moderated User'; +$txt['visualw_mess_warn']='Message To Show For Warned User'; +$txt['visualw_color_ban']='Color of Message For Banned User'; +$txt['visualw_color_mute']='Color of Message For Muted User'; +$txt['visualw_color_pmod']='Color of Message For Post Moderated User'; +$txt['visualw_color_warn']='Color of Message For Warned User'; +$txt['visualw_image_ban']='Image to Show For Banned User'; +$txt['visualw_image_mute']='Image to Show For Muted User'; +$txt['visualw_image_pmod']='Image to Show For Post Moderated User'; +$txt['visualw_image_warn']='Image to Show For Warned User'; +$txt['warningAutoTime']='Default Time Before Warning Removed (Days):'; +$txt['moderationAutoTime']='Default Time Before Moderation Removed (Days):'; +$txt['muteAutoTime']='Default Time Before Mute Removed (Days):'; +$txt['visualw_pmod_edit']='Moderated Users May Edit Messages:'; +$txt['visual_require_mod'] = 'messages require moderation'; +$txt['visual_raise']='Raise Warning Level'; +$txt['visual_no_perm']='You Do Not Have Permission To Raise Warning Levels'; +$txt['visual_no_warnings']='User has NO Current Warnings!'; +$txt['visual_prev_warning']='Previous Warning Details'; +$txt['visual_current_level']='Current Level:'; +$txt['visual_topic_raised']='Topic Where Raised:'; +$txt['visual_time_raised']='Time When Raised:'; +$txt['visual_reason_raised']='Reason For Raise:'; +$txt['visual_level_details']='New Level Details'; +$txt['visual_submit']='Submit'; +$txt['visual_new_level']='New Level:'; +$txt['visual_warning_management']='Warning Management'; +$txt['visual_list_desc']='This lists all users that currently have some form of warning (levels 1,2 or 3. Level 4 is not listed as these members have already been banned! You can choose to mass reduce members here or click the member to adjust level accordingly'; +$txt['visual_member']='Member'; +$txt['visual_level']='Level'; +$txt['visual_reason']='Reason'; +$txt['visual_when']='When'; +$txt['visual_text_warn']='Warned'; +$txt['visual_warn']='Warn'; +$txt['visual_perm_modify']='You Do Not Have Permission To Modify This Message'; +$txt['visual_official_warning']='You Have Received an Offical Warning'; +$txt['visual_received_warning']='You have received a warning for recent conduct on our message board. Please follow the link below for more information:'; +$txt['visual_been_muted']='You Have Been Muted Due To Bad Behaviour'; +$txt['visual_no_karma']='You May Not Give Karma Whilst Warned'; +$txt['visual_stages']='(0=None, 1=Warned, 2=Moderated, 3=Muted. 4=Banned)'; +$txt['visual_text_pmod']='Moderated'; +$txt['visual_text_mute']='Muted'; +$txt['visual_text_ban']='Banned'; +$txt['visual_none']='None'; +$txt['visual_warning_increased']='I have to inform you that your warning level on the board has been increased.'; +$txt['visual_warning_reduced']='I am pleased to announce that your warning level on the board has been reduced.'; +$txt['visual_reduced']='Warning level reduced'; +$txt['visual_lasts']='Time Warning Lasts (Blank=Default)'; +$txt['visual_postmod_manager']='Post Moderation Manager'; +$txt['visual_postmod_user_under']='This User Is Currently Having All Theirs Posts Approved Before Posting'; +$txt['visual_postmod_under']='You Are Currently Under Post Moderation'; +$txt['visual_postmod_not']='This User Is Not Post Moderated'; +$txt['visual_postmod_is']='This User Is Post Moderated'; +$txt['visual_postmod_change']='Change This User\'s Status'; +$txt['visual_postmod']='Post Moderation'; +$txt['visual_postmod_auth']='You are not authorised to perform this action!'; +$txt['visual_postmod_appear']='You Are Currently Under Post Moderation - Your Post Will Appear After Approval'; +$txt['visual_postmod_awaiting']='These are all the posts awaiting moderation. To approve a posts (or posts) check all the messages you wish to approve and select "Approve" to delete messages off select those messages you wish to delete and select "Delete"'; +$txt['visual_postmod_username']='Username'; +$txt['visual_postmod_subject']='Subject/Message'; +$txt['visual_postmod_approve']='Approve'; +$txt['visual_postmod_delete']='Delete'; +$txt['permissiongroup_visual_warn']='Give warnings and perform post moderation'; +$txt['permissionname_visual_warn_any']='Warn users'; +$txt['permissionname_visual_approve_any']='Approve posts'; +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +//Begin Profile Comments Text Strings + +//Permissions +$txt['permissiongroup_pcomments'] = 'Profile Comments'; +$txt['permissionname_pcomments_view'] = 'View Comments'; +$txt['permissionhelp_pcomments_view'] = 'If the user is allowed to view user comments.'; +$txt['permissionname_pcomments_add'] = 'Allow add Comments'; +$txt['permissionhelp_pcomments_add'] = 'If the user is allowed to enter comments in others profile.'; +$txt['permissionname_pcomments_edit_own'] = 'Edit own comment.'; +$txt['permissionhelp_pcomments_edit_own'] = 'Allows the user to edit their own comments.'; +$txt['permissionname_pcomments_edit_any'] = 'Edit any comment'; +$txt['permissionhelp_pcomments_edit_any'] = 'Allows the user to edit any comments.'; +$txt['permissionname_pcomments_delete_own'] = 'Delete own comment.'; +$txt['permissionhelp_pcomments_delete_own'] = 'Allows the user to delete their own comments.'; +$txt['permissionname_pcomments_delete_any'] = 'Delete any comment'; +$txt['permissionhelp_pcomments_delete_any'] = 'Allows the user to delete any comments.'; +$txt['cannot_pcomments_add'] = 'You are not allowed to add comments.'; +$txt['cannot_pcomments_edit_own'] = 'You are not allowed to edit your own comment.'; +$txt['cannot_pcomments_edit_any'] = 'You are not allowed to edit any comment.'; +$txt['cannot_pcomments_delete_own'] = 'You are not allowed to delete own comment.'; +$txt['cannot_pcomments_delete_any'] = 'You are not allowed to delete any comment.'; +$txt['permissionname_pcomments_autocomment'] = 'Auto Approve Comments'; +$txt['permissionhelp_pcomments_autocomment'] = 'Comments do not need to wait for approval.'; +// Profile Comments Profile.template.php text strings +$txt['pcomments_usercomments'] = 'User Comments'; +$txt['pcomments_editcomment'] = '[Edit Comment]'; +$txt['pcomments_delcomment'] = '[Delete Comment]'; +$txt['pcomments_addcomment'] = 'Add Comment'; +$txt['pcomments_admin'] = 'Profile Comments'; +$txt['pcomments_text_pages'] = 'Pages: '; +//END Profile Comments Text Strings + +//Begin Profile Comments Text Strings + +//Permissions +$txt['permissiongroup_pcomments'] = 'Profile Comments'; +$txt['permissionname_pcomments_view'] = 'View Comments'; +$txt['permissionhelp_pcomments_view'] = 'If the user is allowed to view user comments.'; +$txt['permissionname_pcomments_add'] = 'Allow add Comments'; +$txt['permissionhelp_pcomments_add'] = 'If the user is allowed to enter comments in others profile.'; +$txt['permissionname_pcomments_edit_own'] = 'Edit own comment.'; +$txt['permissionhelp_pcomments_edit_own'] = 'Allows the user to edit their own comments.'; +$txt['permissionname_pcomments_edit_any'] = 'Edit any comment'; +$txt['permissionhelp_pcomments_edit_any'] = 'Allows the user to edit any comments.'; +$txt['permissionname_pcomments_delete_own'] = 'Delete own comment.'; +$txt['permissionhelp_pcomments_delete_own'] = 'Allows the user to delete their own comments.'; +$txt['permissionname_pcomments_delete_any'] = 'Delete any comment'; +$txt['permissionhelp_pcomments_delete_any'] = 'Allows the user to delete any comments.'; +$txt['cannot_pcomments_add'] = 'You are not allowed to add comments.'; +$txt['cannot_pcomments_edit_own'] = 'You are not allowed to edit your own comment.'; +$txt['cannot_pcomments_edit_any'] = 'You are not allowed to edit any comment.'; +$txt['cannot_pcomments_delete_own'] = 'You are not allowed to delete own comment.'; +$txt['cannot_pcomments_delete_any'] = 'You are not allowed to delete any comment.'; +$txt['permissionname_pcomments_autocomment'] = 'Auto Approve Comments'; +$txt['permissionhelp_pcomments_autocomment'] = 'Comments do not need to wait for approval.'; +// Profile Comments Profile.template.php text strings +$txt['pcomments_usercomments'] = 'User Comments'; +$txt['pcomments_editcomment'] = '[Edit Comment]'; +$txt['pcomments_delcomment'] = '[Delete Comment]'; +$txt['pcomments_addcomment'] = 'Add Comment'; +$txt['pcomments_admin'] = 'Profile Comments'; +$txt['pcomments_text_pages'] = 'Pages: '; +//END Profile Comments Text Strings + +?> \ No newline at end of file diff --git a/Themes/default/languages/Modifications.english.php~ b/Themes/default/languages/Modifications.english.php~ new file mode 100644 index 0000000..ad38e5f --- /dev/null +++ b/Themes/default/languages/Modifications.english.php~ @@ -0,0 +1,218 @@ +Click here to go place your pin if you have not already.'; +$txt['googleMapDisclaimer'] = 'Place your pin as close as you feel comfortable doing so.'; +$txt['cannot_googleMap_view'] = 'Sorry, you\'re not allowed to view the Member Map.'; +$txt['permissionname_googleMap_view'] = 'View Member Map'; +$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map. If not set, the people will not see the map.'; +$txt['cannot_googleMap_place'] = 'Sorry, you\'re not allowed to place a pin for the Member Map.'; +$txt['permissionname_googleMap_place'] = 'Place Pin on Member Map'; +$txt['permissionhelp_googleMap_place'] = 'Allow the people place there pin the Member Map. If not set, the people will not be able to place there pins.'; + +// Now Playing Mod +$txt['nowplaying1'] = "Now Playing"; +$txt['nowplaying2'] = "Now Playing: What are you listening to? [optional]"; +$txt['nowplaying3'] = "Now Playing: "; +$txt['nowplayingEnabled'] = "Enable 'Now Playing'?"; +$txt['nowplaying_image'] = "Now Playing Image: "; +$txt['nowplaying_text'] = "Now Playing Text: "; + +// OB - Googlebot - Begin + +// Boardindex Strings +$txt['ob_googlebot_modname'] = 'Googlebot & Spiders'; +$txt['ob_googlebot_spider'] = 'Spider'; +$txt['ob_googlebot_spiders'] = 'Spiders'; +$txt['ob_googlebot_spiders_last_active'] = 'Spiders active in past ' . $modSettings['lastActive'] . ' minutes'; + +// ModSettings +$txt['ob_googlebot_count_all_instances'] = 'Count all instances of same spider'; +$txt['ob_googlebot_display_all_instances'] = 'Display all instances of same spider
    ("' . $txt['ob_googlebot_count_all_instances'] . '" must be selected)
    '; +$txt['ob_googlebot_display_agent'] = 'Display agent instead of name'; +$txt['ob_googlebot_display_own_list'] = 'Display spiders in its own list'; +$txt['ob_googlebot_count_most_online'] = 'Count in "Most Online"'; + +// Permissions +$txt['permissiongroup_googlebot'] = $txt['ob_googlebot_modname']; +$txt['permissionname_googlebot_view'] = 'View Googlebot & Spiders'; + +// OB - Googlebot - End + +$txt['visual_warning_mod']='Visual Warning Mod'; +$txt['visualw_mess_ban']='Message To Show For Banned User'; +$txt['visualw_mess_mute']='Message To Show For Muted User'; +$txt['visualw_mess_pmod']='Message To Show For Post Moderated User'; +$txt['visualw_mess_warn']='Message To Show For Warned User'; +$txt['visualw_color_ban']='Color of Message For Banned User'; +$txt['visualw_color_mute']='Color of Message For Muted User'; +$txt['visualw_color_pmod']='Color of Message For Post Moderated User'; +$txt['visualw_color_warn']='Color of Message For Warned User'; +$txt['visualw_image_ban']='Image to Show For Banned User'; +$txt['visualw_image_mute']='Image to Show For Muted User'; +$txt['visualw_image_pmod']='Image to Show For Post Moderated User'; +$txt['visualw_image_warn']='Image to Show For Warned User'; +$txt['warningAutoTime']='Default Time Before Warning Removed (Days):'; +$txt['moderationAutoTime']='Default Time Before Moderation Removed (Days):'; +$txt['muteAutoTime']='Default Time Before Mute Removed (Days):'; +$txt['visualw_pmod_edit']='Moderated Users May Edit Messages:'; +$txt['visual_require_mod'] = 'messages require moderation'; +$txt['visual_raise']='Raise Warning Level'; +$txt['visual_no_perm']='You Do Not Have Permission To Raise Warning Levels'; +$txt['visual_no_warnings']='User has NO Current Warnings!'; +$txt['visual_prev_warning']='Previous Warning Details'; +$txt['visual_current_level']='Current Level:'; +$txt['visual_topic_raised']='Topic Where Raised:'; +$txt['visual_time_raised']='Time When Raised:'; +$txt['visual_reason_raised']='Reason For Raise:'; +$txt['visual_level_details']='New Level Details'; +$txt['visual_submit']='Submit'; +$txt['visual_new_level']='New Level:'; +$txt['visual_warning_management']='Warning Management'; +$txt['visual_list_desc']='This lists all users that currently have some form of warning (levels 1,2 or 3. Level 4 is not listed as these members have already been banned! You can choose to mass reduce members here or click the member to adjust level accordingly'; +$txt['visual_member']='Member'; +$txt['visual_level']='Level'; +$txt['visual_reason']='Reason'; +$txt['visual_when']='When'; +$txt['visual_text_warn']='Warned'; +$txt['visual_warn']='Warn'; +$txt['visual_perm_modify']='You Do Not Have Permission To Modify This Message'; +$txt['visual_official_warning']='You Have Received an Offical Warning'; +$txt['visual_received_warning']='You have received a warning for recent conduct on our message board. Please follow the link below for more information:'; +$txt['visual_been_muted']='You Have Been Muted Due To Bad Behaviour'; +$txt['visual_no_karma']='You May Not Give Karma Whilst Warned'; +$txt['visual_stages']='(0=None, 1=Warned, 2=Moderated, 3=Muted. 4=Banned)'; +$txt['visual_text_pmod']='Moderated'; +$txt['visual_text_mute']='Muted'; +$txt['visual_text_ban']='Banned'; +$txt['visual_none']='None'; +$txt['visual_warning_increased']='I have to inform you that your warning level on the board has been increased.'; +$txt['visual_warning_reduced']='I am pleased to announce that your warning level on the board has been reduced.'; +$txt['visual_reduced']='Warning level reduced'; +$txt['visual_lasts']='Time Warning Lasts (Blank=Default)'; +$txt['visual_postmod_manager']='Post Moderation Manager'; +$txt['visual_postmod_user_under']='This User Is Currently Having All Theirs Posts Approved Before Posting'; +$txt['visual_postmod_under']='You Are Currently Under Post Moderation'; +$txt['visual_postmod_not']='This User Is Not Post Moderated'; +$txt['visual_postmod_is']='This User Is Post Moderated'; +$txt['visual_postmod_change']='Change This User\'s Status'; +$txt['visual_postmod']='Post Moderation'; +$txt['visual_postmod_auth']='You are not authorised to perform this action!'; +$txt['visual_postmod_appear']='You Are Currently Under Post Moderation - Your Post Will Appear After Approval'; +$txt['visual_postmod_awaiting']='These are all the posts awaiting moderation. To approve a posts (or posts) check all the messages you wish to approve and select "Approve" to delete messages off select those messages you wish to delete and select "Delete"'; +$txt['visual_postmod_username']='Username'; +$txt['visual_postmod_subject']='Subject/Message'; +$txt['visual_postmod_approve']='Approve'; +$txt['visual_postmod_delete']='Delete'; +$txt['permissiongroup_visual_warn']='Give warnings and perform post moderation'; +$txt['permissionname_visual_warn_any']='Warn users'; +$txt['permissionname_visual_approve_any']='Approve posts'; +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +//Begin Profile Comments Text Strings + +//Permissions +$txt['permissiongroup_pcomments'] = 'Profile Comments'; +$txt['permissionname_pcomments_view'] = 'View Comments'; +$txt['permissionhelp_pcomments_view'] = 'If the user is allowed to view user comments.'; +$txt['permissionname_pcomments_add'] = 'Allow add Comments'; +$txt['permissionhelp_pcomments_add'] = 'If the user is allowed to enter comments in others profile.'; +$txt['permissionname_pcomments_edit_own'] = 'Edit own comment.'; +$txt['permissionhelp_pcomments_edit_own'] = 'Allows the user to edit their own comments.'; +$txt['permissionname_pcomments_edit_any'] = 'Edit any comment'; +$txt['permissionhelp_pcomments_edit_any'] = 'Allows the user to edit any comments.'; +$txt['permissionname_pcomments_delete_own'] = 'Delete own comment.'; +$txt['permissionhelp_pcomments_delete_own'] = 'Allows the user to delete their own comments.'; +$txt['permissionname_pcomments_delete_any'] = 'Delete any comment'; +$txt['permissionhelp_pcomments_delete_any'] = 'Allows the user to delete any comments.'; +$txt['cannot_pcomments_add'] = 'You are not allowed to add comments.'; +$txt['cannot_pcomments_edit_own'] = 'You are not allowed to edit your own comment.'; +$txt['cannot_pcomments_edit_any'] = 'You are not allowed to edit any comment.'; +$txt['cannot_pcomments_delete_own'] = 'You are not allowed to delete own comment.'; +$txt['cannot_pcomments_delete_any'] = 'You are not allowed to delete any comment.'; +$txt['permissionname_pcomments_autocomment'] = 'Auto Approve Comments'; +$txt['permissionhelp_pcomments_autocomment'] = 'Comments do not need to wait for approval.'; +// Profile Comments Profile.template.php text strings +$txt['pcomments_usercomments'] = 'User Comments'; +$txt['pcomments_editcomment'] = '[Edit Comment]'; +$txt['pcomments_delcomment'] = '[Delete Comment]'; +$txt['pcomments_addcomment'] = 'Add Comment'; +$txt['pcomments_admin'] = 'Profile Comments'; +$txt['pcomments_text_pages'] = 'Pages: '; +//END Profile Comments Text Strings + +//Begin Profile Comments Text Strings + +//Permissions +$txt['permissiongroup_pcomments'] = 'Profile Comments'; +$txt['permissionname_pcomments_view'] = 'View Comments'; +$txt['permissionhelp_pcomments_view'] = 'If the user is allowed to view user comments.'; +$txt['permissionname_pcomments_add'] = 'Allow add Comments'; +$txt['permissionhelp_pcomments_add'] = 'If the user is allowed to enter comments in others profile.'; +$txt['permissionname_pcomments_edit_own'] = 'Edit own comment.'; +$txt['permissionhelp_pcomments_edit_own'] = 'Allows the user to edit their own comments.'; +$txt['permissionname_pcomments_edit_any'] = 'Edit any comment'; +$txt['permissionhelp_pcomments_edit_any'] = 'Allows the user to edit any comments.'; +$txt['permissionname_pcomments_delete_own'] = 'Delete own comment.'; +$txt['permissionhelp_pcomments_delete_own'] = 'Allows the user to delete their own comments.'; +$txt['permissionname_pcomments_delete_any'] = 'Delete any comment'; +$txt['permissionhelp_pcomments_delete_any'] = 'Allows the user to delete any comments.'; +$txt['cannot_pcomments_add'] = 'You are not allowed to add comments.'; +$txt['cannot_pcomments_edit_own'] = 'You are not allowed to edit your own comment.'; +$txt['cannot_pcomments_edit_any'] = 'You are not allowed to edit any comment.'; +$txt['cannot_pcomments_delete_own'] = 'You are not allowed to delete own comment.'; +$txt['cannot_pcomments_delete_any'] = 'You are not allowed to delete any comment.'; +$txt['permissionname_pcomments_autocomment'] = 'Auto Approve Comments'; +$txt['permissionhelp_pcomments_autocomment'] = 'Comments do not need to wait for approval.'; +// Profile Comments Profile.template.php text strings +$txt['pcomments_usercomments'] = 'User Comments'; +$txt['pcomments_editcomment'] = '[Edit Comment]'; +$txt['pcomments_delcomment'] = '[Delete Comment]'; +$txt['pcomments_addcomment'] = 'Add Comment'; +$txt['pcomments_admin'] = 'Profile Comments'; +$txt['pcomments_text_pages'] = 'Pages: '; +//END Profile Comments Text Strings + +//Begin Profile Comments Text Strings + +//Permissions +$txt['permissiongroup_pcomments'] = 'Profile Comments'; +$txt['permissionname_pcomments_view'] = 'View Comments'; +$txt['permissionhelp_pcomments_view'] = 'If the user is allowed to view user comments.'; +$txt['permissionname_pcomments_add'] = 'Allow add Comments'; +$txt['permissionhelp_pcomments_add'] = 'If the user is allowed to enter comments in others profile.'; +$txt['permissionname_pcomments_edit_own'] = 'Edit own comment.'; +$txt['permissionhelp_pcomments_edit_own'] = 'Allows the user to edit their own comments.'; +$txt['permissionname_pcomments_edit_any'] = 'Edit any comment'; +$txt['permissionhelp_pcomments_edit_any'] = 'Allows the user to edit any comments.'; +$txt['permissionname_pcomments_delete_own'] = 'Delete own comment.'; +$txt['permissionhelp_pcomments_delete_own'] = 'Allows the user to delete their own comments.'; +$txt['permissionname_pcomments_delete_any'] = 'Delete any comment'; +$txt['permissionhelp_pcomments_delete_any'] = 'Allows the user to delete any comments.'; +$txt['cannot_pcomments_add'] = 'You are not allowed to add comments.'; +$txt['cannot_pcomments_edit_own'] = 'You are not allowed to edit your own comment.'; +$txt['cannot_pcomments_edit_any'] = 'You are not allowed to edit any comment.'; +$txt['cannot_pcomments_delete_own'] = 'You are not allowed to delete own comment.'; +$txt['cannot_pcomments_delete_any'] = 'You are not allowed to delete any comment.'; +$txt['permissionname_pcomments_autocomment'] = 'Auto Approve Comments'; +$txt['permissionhelp_pcomments_autocomment'] = 'Comments do not need to wait for approval.'; +// Profile Comments Profile.template.php text strings +$txt['pcomments_usercomments'] = 'User Comments'; +$txt['pcomments_editcomment'] = '[Edit Comment]'; +$txt['pcomments_delcomment'] = '[Delete Comment]'; +$txt['pcomments_addcomment'] = 'Add Comment'; +$txt['pcomments_admin'] = 'Profile Comments'; +$txt['pcomments_text_pages'] = 'Pages: '; +//END Profile Comments Text Strings + +?> \ No newline at end of file diff --git a/Themes/default/languages/Modifications.russian.php b/Themes/default/languages/Modifications.russian.php new file mode 100644 index 0000000..b90a412 --- /dev/null +++ b/Themes/default/languages/Modifications.russian.php @@ -0,0 +1,146 @@ +Добавьте себя на карту'; +$txt['googleMapDisclaimer'] = 'Щелкните мышкой по карте, чтобы поставить метку в любом понравившемся Вам месте (подразумевается, что это место, где Вы живёте). Чтобы убрать метку, щёлкните по ней мышкой.'; +$txt['cannot_googleMap_view'] = 'Извините, Вам нельзя смотреть карту'; +$txt['permissionname_googleMap_view'] = 'Смотреть карту'; +$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map. If not set, the people will not see the map.'; +$txt['cannot_googleMap_place'] = 'Извините, Вам не разрешено ставить своб метку на карте'; +$txt['permissionname_googleMap_place'] = 'Ставить метку на карте'; +$txt['permissionhelp_googleMap_place'] = 'Allow the people place there pin the Member Map. If not set, the people will not be able to place there pins.'; + +// Now Playing Mod +$txt['nowplaying1'] = "Now Playing"; +$txt['nowplaying2'] = "В колонках: Что вы сейчас слушаете? [заполнять необязательно]"; +$txt['nowplaying3'] = "В колонках: "; +$txt['nowplayingEnabled'] = "Enable 'Now Playing'?"; +$txt['nowplaying_image'] = "Now Playing Image: "; +$txt['nowplaying_text'] = "Now Playing Text: "; + +// OB - Googlebot - Begin + +// Boardindex Strings +$txt['ob_googlebot_modname'] = 'Роботы'; +$txt['ob_googlebot_spider'] = 'Spider'; +$txt['ob_googlebot_spiders'] = 'Spiders'; +$txt['ob_googlebot_spiders_last_active'] = 'Spiders active in past ' . $modSettings['lastActive'] . ' minutes'; + +// ModSettings +$txt['ob_googlebot_count_all_instances'] = 'Count all instances of same spider'; +$txt['ob_googlebot_display_all_instances'] = 'Display all instances of same spider
    ("' . $txt['ob_googlebot_count_all_instances'] . '" must be selected)
    '; +$txt['ob_googlebot_display_agent'] = 'Display agent instead of name'; +$txt['ob_googlebot_display_own_list'] = 'Display spiders in its own list'; +$txt['ob_googlebot_count_most_online'] = 'Count in "Most Online"'; + +// Permissions +$txt['permissiongroup_googlebot'] = $txt['ob_googlebot_modname']; +$txt['permissionname_googlebot_view'] = 'View Googlebot & Spiders'; + +// OB - Googlebot - End +$txt['visual_warning_mod']='Visual Warning Mod'; +$txt['visualw_mess_ban']='Message To Show For Banned User'; +$txt['visualw_mess_mute']='Message To Show For Muted User'; +$txt['visualw_mess_pmod']='Message To Show For Post Moderated User'; +$txt['visualw_mess_warn']='Message To Show For Warned User'; +$txt['visualw_color_ban']='Color of Message For Banned User'; +$txt['visualw_color_mute']='Color of Message For Muted User'; +$txt['visualw_color_pmod']='Color of Message For Post Moderated User'; +$txt['visualw_color_warn']='Color of Message For Warned User'; +$txt['visualw_image_ban']='Image to Show For Banned User'; +$txt['visualw_image_mute']='Image to Show For Muted User'; +$txt['visualw_image_pmod']='Image to Show For Post Moderated User'; +$txt['visualw_image_warn']='Image to Show For Warned User'; +$txt['warningAutoTime']='Default Time Before Warning Removed (Days):'; +$txt['moderationAutoTime']='Default Time Before Moderation Removed (Days):'; +$txt['muteAutoTime']='Default Time Before Mute Removed (Days):'; +$txt['visualw_pmod_edit']='Moderated Users May Edit Messages:'; +$txt['visual_require_mod'] = 'messages require moderation'; +$txt['visual_raise']='Raise Warning Level'; +$txt['visual_no_perm']='You Do Not Have Permission To Raise Warning Levels'; +$txt['visual_no_warnings']='User has NO Current Warnings!'; +$txt['visual_prev_warning']='Previous Warning Details'; +$txt['visual_current_level']='Current Level:'; +$txt['visual_topic_raised']='Topic Where Raised:'; +$txt['visual_time_raised']='Time When Raised:'; +$txt['visual_reason_raised']='Reason For Raise:'; +$txt['visual_level_details']='New Level Details'; +$txt['visual_submit']='Submit'; +$txt['visual_new_level']='New Level:'; +$txt['visual_warning_management']='Warning Management'; +$txt['visual_list_desc']='This lists all users that currently have some form of warning (levels 1,2 or 3. Level 4 is not listed as these members have already been banned! You can choose to mass reduce members here or click the member to adjust level accordingly'; +$txt['visual_member']='Member'; +$txt['visual_level']='Уровень'; +$txt['visual_reason']='Причина'; +$txt['visual_when']='Когда'; +$txt['visual_text_warn']='Предупреждение'; +$txt['visual_warn']='Warn'; +$txt['visual_perm_modify']='У Вас недостаточно прав, чтобы изменить это сообщение'; +$txt['visual_official_warning']='Вы получили официально предупреждение'; +$txt['visual_received_warning']='На Вас было наложено наказание за следющее сообщение:'; +$txt['visual_been_muted']='Вы были временно переведены в режим "Только чтение"'; +$txt['visual_no_karma']='Вы не можете изменять рейтинг пользоваталей, пока наказаны'; +$txt['visual_stages']='(0=Нет наказания, 1=Предупреждение, 2=Только чтение, 3=Бан)'; +$txt['visual_text_pmod']='Премодерация'; +$txt['visual_text_mute']='Только чтение'; +$txt['visual_text_ban']='Бан'; +$txt['visual_none']='(Нет)'; +$txt['visual_warning_increased']='Мы вынуждены сообщить, что нам пришлось наложить на Вас более строгое наказание.'; +$txt['visual_warning_reduced']='Мы рады сообщить Вам, что Ваше наказание было заменено на менее строгое.'; +$txt['visual_reduced']='Наказание заменено на менее строгое'; +$txt['visual_lasts']='Срок наказания в днях (оставьте пустым для настройки по умолчанию)'; +$txt['visual_postmod_manager']='Post Moderation Manager'; +$txt['visual_postmod_user_under']='This User Is Currently Having All Theirs Posts Approved Before Posting'; +$txt['visual_postmod_under']='You Are Currently Under Post Moderation'; +$txt['visual_postmod_not']='This User Is Not Post Moderated'; +$txt['visual_postmod_is']='This User Is Post Moderated'; +$txt['visual_postmod_change']='Change This User\'s Status'; +$txt['visual_postmod']='Post Moderation'; +$txt['visual_postmod_auth']='You are not authorised to perform this action!'; +$txt['visual_postmod_appear']='You Are Currently Under Post Moderation - Your Post Will Appear After Approval'; +$txt['visual_postmod_awaiting']='These are all the posts awaiting moderation. To approve a posts (or posts) check all the messages you wish to approve and select "Approve" to delete messages off select those messages you wish to delete and select "Delete"'; +$txt['visual_postmod_username']='Username'; +$txt['visual_postmod_subject']='Subject/Message'; +$txt['visual_postmod_approve']='Approve'; +$txt['visual_postmod_delete']='Delete'; +$txt['permissiongroup_visual_warn']='Give warnings and perform post moderation'; +$txt['permissionname_visual_warn_any']='Warn users'; +$txt['permissionname_visual_approve_any']='Approve posts'; + + +$txt['make_first_sticky']='Прикрепить первый пост ко всей теме'; + +$txt['link_topics']='Объединить темы'; +$txt['link_topics_explain']='Темы будут "связаны", и пользователи смогут увидтеть ссылку "Связанные темы" и быстро перейти из одной темы в другую'; +$txt['related_topics']='Смотрите также:'; + + +//Begin CAPTCHA Mod 0.1 +//General Strings +$txt['captchaEnter'] = "Введите пожалуйста код, который Вы видите на картинке"; +$txt['captchaEnterShort'] = "Введите код"; +$txt['captchaWrong'] = "Вы ввели код неправильно.
    К сожалению, Вам придётся вернуться назад и попробовать снова."; +$txt['captchaMaxTries'] = "Вы ввели неверный код слишком много раз, и потому не сможете зарегистрироваться. Если Вы всё же человек, пожалуйста, свяжитесь с нами по электронной почте, и мы Вам поможем."; + +//When posting a reply to a topic +$txt['error_captcha_wrong'] = "Вы ввели неправильный код"; + +//Administration strings +$txt['captchaHeading'] = "CAPTCHA Settings"; +$txt['captchaChars'] = "Number of characters to use for code"; +$txt['captchaMinSize'] = "Minimum Font Size"; +$txt['captchaMaxSize'] = "Maximum Font Size"; +$txt['captchaMaxRotate'] = "Maximum angle for character rotation"; +$txt['captchaNoise'] = "Enable Noise
    enabled = make characters 'noisy' (recommended), disabled = use grid
    "; +$txt['captchaWebSafeColours'] = "Only use web safe colours"; +$txt['captchaBadGuysURL'] = "'Bad Guys' URL
    (when someone tries to avoid the CAPTCHA, they will get redirected here)
    "; + +//Additions in CAPTCHA Mod 0.2 +$txt['captchaReadAndType'] = "Нужно ввести %s символов с картинки. Это могут быть цифры от 0 до 9 и латинские буквы от A до F"; +//End CAPTCHA Mod +?> diff --git a/Themes/default/languages/Packages.english.php b/Themes/default/languages/Packages.english.php new file mode 100644 index 0000000..29bf83d --- /dev/null +++ b/Themes/default/languages/Packages.english.php @@ -0,0 +1,163 @@ +File not found'; +$txt['package_action_error'] = 'Modification parse error'; +$txt['package_action_failure'] = 'Failure'; +$txt['package_action_success'] = 'Success'; + +$txt['package_uninstall_actions'] = 'Uninstall Actions'; +$txt['package_uninstall_done'] = 'The package has been uninstalled, it should no longer take effect.'; +$txt['package_uninstall_cannot'] = 'This package cannot be uninstalled, because there is no uninstaller!

    Please contact the mod author for more information.'; + +$txt['package_install_options'] = 'Installation Options'; +$txt['package_install_options_ftp_why'] = 'Using FTP is the easiest way to get around having to manually chmod the files writable by FTP yourself for the package manager to work.
    Here you can set the default values for some fields.'; +$txt['package_install_options_ftp_server'] = 'FTP Server'; +$txt['package_install_options_ftp_port'] = 'Port'; +$txt['package_install_options_ftp_user'] = 'Username'; +$txt['package_install_options_make_backups'] = 'Create Backup versions of replaced files with a tilda (~) on the end of their names.'; + +$txt['package_ftp_necessary'] = 'FTP Information Required'; +$txt['package_ftp_why'] = 'Some of the files this package needs to modify are not writable. This needs to be changed by logging into FTP and chmoding the files.'; +$txt['package_ftp_why_download'] = 'To download packages, the Packages directory and files in it need to be writable - and they are not currently. The package manager can use your FTP information to fix this.'; +$txt['package_ftp_server'] = 'FTP Server'; +$txt['package_ftp_port'] = 'Port'; +$txt['package_ftp_username'] = 'Username'; +$txt['package_ftp_password'] = 'Password'; +$txt['package_ftp_path'] = 'Local path to SMF'; + +// For a break, use \\n instead of
    ... and don't use entities. +$txt['package_delete_bad'] = 'The package you are about to delete is currently installed! If you delete it, you may not be able to uninstall it later.\\n\\nAre you sure?'; + +$txt['package_examine_file'] = 'View file in package'; +$txt['package_file_contents'] = 'Contents of file'; + +$txt['package_upload_title'] = 'Upload a Package'; +$txt['package_upload_select'] = 'Package to Upload'; +$txt['package_upload'] = 'Upload'; +$txt['package_upload_error_supports'] = 'The package manager currently allows only these file types: '; +$txt['package_upload_error_broken'] = 'The package you tried to upload either is not a valid package or has become corrupted.'; +$txt['package_uploaded_success'] = 'Package uploaded successfully'; +$txt['package_uploaded_successfully'] = 'The package has been uploaded successfully'; + +$txt['package_modification_malformed'] = 'Malformed or invalid modification file.'; +$txt['package_modification_missing'] = 'The file could not be found.'; +$txt['package_no_zlib'] = 'Sorry, your PHP configuration doesn\'t have support for zlib. Without this, the package manager cannot function. Please contact your host about this for more information.'; + +//Begin CAPTCHA Mod 0.1 + //General Strings + $txt['captchaEnter'] = "Please enter the code as shown"; + $txt['captchaEnterShort'] = "Enter Code"; + $txt['captchaWrong'] = "Sorry, you didn't enter the correct code.
    You must go back, refresh the page, and enter the new code!"; + $txt['captchaMaxTries'] = "Sorry, you've entered the code wrong too many times. Registration cannot continue."; + + //When posting a reply to a topic + $txt['error_captcha_wrong'] = "The code was entered incorrectly."; + + //Administration strings + $txt['captchaHeading'] = "CAPTCHA Settings"; + $txt['captchaChars'] = "Number of characters to use for code"; + $txt['captchaMinSize'] = "Minimum Font Size"; + $txt['captchaMaxSize'] = "Maximum Font Size"; + $txt['captchaMaxRotate'] = "Maximum angle for character rotation"; + $txt['captchaNoise'] = "Enable Noise
    enabled = make characters 'noisy' (recommended), disabled = use grid
    "; + $txt['captchaWebSafeColours'] = "Only use web safe colours"; + $txt['captchaBadGuysURL'] = "'Bad Guys' URL
    (when someone tries to avoid the CAPTCHA, they will get redirected here)
    "; + + //Additions in CAPTCHA Mod 0.2 + $txt['captchaReadAndType'] = "You must read and type the %s characters within 0..9 and A..F"; +//End CAPTCHA Mod + +?> diff --git a/Themes/default/languages/Packages.russian.php b/Themes/default/languages/Packages.russian.php new file mode 100644 index 0000000..9502a4a --- /dev/null +++ b/Themes/default/languages/Packages.russian.php @@ -0,0 +1,164 @@ +Файл не найден'; +$txt['package_action_error'] = 'Ошибка анализа модификации'; +$txt['package_action_failure'] = 'Неудача'; +$txt['package_action_success'] = 'Успех'; + +$txt['package_uninstall_actions'] = 'Удалить Действие'; +$txt['package_uninstall_done'] = 'Пакет удален, он работать больше не будет.'; +$txt['package_uninstall_cannot'] = 'Этот пакет не может быть удален, так как нет файла анинсталлера!

    Пожалуйста, свяжитесь с автором за более подробной информацией.'; + +$txt['package_install_options'] = 'Опции Установки'; +$txt['package_install_options_ftp_why'] = 'Использование FTP это самый простой способ просмотреть и изменить chmod файлов на записываемость через FTP для работы менеджера пакетов.
    Здесь Вы можете установить некоторые значения для некоторых полей.'; +$txt['package_install_options_ftp_server'] = 'FTP Сервер'; +$txt['package_install_options_ftp_port'] = 'Порт'; +$txt['package_install_options_ftp_user'] = 'Имя пользователя'; +$txt['package_install_options_make_backups'] = 'Создавать бекап версию заменяемых файлов с тильдой (~) в конце их имен.'; + +$txt['package_ftp_necessary'] = 'Требуемая FTP Информация'; +$txt['package_ftp_why'] = 'Некоторые файлы, которые необходимо изменить этому пакету не записывамы. Это необходимо изменить вручную зайдя на FTP и изменив CHMOD файлов.'; +$txt['package_ftp_why_download'] = 'Чтобы загрузить пакеты, директория Пакетов и файлы в нем должны быть записываемы - а они не такие в данный момент. Менеджер пакетов может использовать вашу FTP информацию, чтобы исправить это.'; +$txt['package_ftp_server'] = 'FTP Сервер'; +$txt['package_ftp_port'] = 'Порт'; +$txt['package_ftp_username'] = 'Имя пользователя'; +$txt['package_ftp_password'] = 'Пароль'; +$txt['package_ftp_path'] = 'Локальный путь к SMF'; + +// For a break, use \\n instead of
    ... and don't use entities. +$txt['package_delete_bad'] = 'Пакет, который Вы собираетесь удалить установлен! Если Вы удалите его, Вы не сможете анинсталить его позже.\\n\\nВы уверены?'; + +$txt['package_examine_file'] = 'Смотреть файл в пакете'; +$txt['package_file_contents'] = 'Содержание файла'; + +$txt['package_upload_title'] = 'Закачать Пакет'; +$txt['package_upload_select'] = 'Пакет для Закачки'; +$txt['package_upload'] = 'Закачать'; +$txt['package_upload_error_supports'] = 'Менеджер покетов сейчас позволяет только эти типы файлов: '; +$txt['package_upload_error_broken'] = 'Пакет, который Вы пытаетесь закачать или не соответствующий или стал поврежден.'; +$txt['package_uploaded_success'] = 'Пакет закачан успешно'; +$txt['package_uploaded_successfully'] = 'Пакет был закачан успешно'; + +$txt['package_modification_malformed'] = 'Плохо сформированный или недействительный файл модификации.'; +$txt['package_modification_missing'] = 'Файл не может быть найден.'; +$txt['package_no_zlib'] = 'Извините, Ваша конфигурация PHP не поддерживает zlib. Без этого , менеджер пакетов не может функционировать. Пожалуйста, свяжитесь с хостером для более подробной информации об этом.'; + + +//Begin CAPTCHA Mod 0.1 +//General Strings +$txt['captchaEnter'] = "Пожалуйста, введите код, который видите на картинке"; +$txt['captchaEnterShort'] = "Введите коде"; +$txt['captchaWrong'] = "Вы ввели код неправильно.
    К сожалению, Вам придётся вернуться назад и попробовать снова."; +$txt['captchaMaxTries'] ="Вы ввели неверный код слишком много раз. Если Вы в самом деле человек, а не робот, пожалуйста, свяжитесь с нами по электронной почте, и мы поможем Вам зарегистрироваться."; + +//When posting a reply to a topic +$txt['error_captcha_wrong'] = "Код введён неверно."; + +//Administration strings +$txt['captchaHeading'] = "CAPTCHA Settings"; +$txt['captchaChars'] = "Number of characters to use for code"; +$txt['captchaMinSize'] = "Minimum Font Size"; +$txt['captchaMaxSize'] = "Maximum Font Size"; +$txt['captchaMaxRotate'] = "Maximum angle for character rotation"; +$txt['captchaNoise'] = "Enable Noise
    enabled = make characters 'noisy' (recommended), disabled = use grid
    "; +$txt['captchaWebSafeColours'] = "Only use web safe colours"; +$txt['captchaBadGuysURL'] = "'Bad Guys' URL
    (when someone tries to avoid the CAPTCHA, they will get redirected here)
    "; + +//Additions in CAPTCHA Mod 0.2 +$txt['captchaReadAndType'] = "Нужно ввести %s символов с картинки, это могут быть цифры от 0 до 9 и латинские буквы от A до F"; +//End CAPTCHA Mod + +?> diff --git a/Themes/default/languages/PersonalMessage.english.php b/Themes/default/languages/PersonalMessage.english.php new file mode 100644 index 0000000..7e8a0d0 --- /dev/null +++ b/Themes/default/languages/PersonalMessage.english.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/Themes/default/languages/Post.english.php b/Themes/default/languages/Post.english.php new file mode 100644 index 0000000..ee00b07 --- /dev/null +++ b/Themes/default/languages/Post.english.php @@ -0,0 +1,173 @@ +Only admins and moderators can reply.'; + +$txt['notifyXAnn2'] = 'New announcement'; +$txt['notifyXAnn3'] = 'View it at'; +$txt['notifyXOnce2'] = 'More replies may be posted, but you won\'t receive any more notifications until you read the topic.'; + +$txt['rtm2'] = 'Enter comment'; +$txt['rtm3'] = 'Reported post'; +$txt['rtm4'] = 'by'; +$txt['rtm10'] = 'Submit'; +$txt['rtm_email1'] = 'The following post, "%s" by'; +$txt['rtm_email2'] = 'has been reported by'; +$txt['rtm_email3'] = 'on a board you moderate'; +$txt['rtm_email_comment'] = 'The reporter has made the following comment'; + +$txt['attach_preview'] = 'You may need to reattach any files you attached, such as'; +$txt['maxAttachPerPost'] = 'per post'; + +$txt['post_additionalopt'] = 'Additional Options...'; +$txt['sticky_after2'] = 'Sticky this topic.'; +$txt['move_after2'] = 'Move this topic.'; +$txt['back_to_topic'] = 'Return to this topic.'; + +$txt['retrieving_quote'] = 'Retrieving Quote...'; + +$txt['poll_options'] = 'Poll Options'; +$txt['poll_options1a'] = 'Run the poll for'; +$txt['poll_options1b'] = 'days. (leave blank for no limit)'; +$txt['poll_options2'] = 'Show the poll\'s results to anyone.'; +$txt['poll_options3'] = 'Only show the results after someone has voted.'; +$txt['poll_options4'] = 'Only show the results after the poll has expired.'; +$txt['poll_options5'] = 'Maximum votes per user.'; +$txt['poll_options7'] = 'Allow user to change vote.'; +$txt['poll_error1'] = 'You selected too many options - maximum allowed is %s'; +$txt['poll_add_option'] = 'Add Option'; + +$txt['spellcheck_done'] = 'Spell checking complete.'; +$txt['spellcheck_change_to'] = 'Change To:'; +$txt['spellcheck_suggest'] = 'Suggestions:'; +$txt['spellcheck_change'] = 'Change'; +$txt['spellcheck_change_all'] = 'Change All'; +$txt['spellcheck_ignore'] = 'Ignore'; +$txt['spellcheck_ignore_all'] = 'Ignore All'; + +$txt['attach_lose'] = 'You will have to reattach any attachments, continue with preview?'; +$txt['more_attachments'] = 'more attachments'; +// Don't use entities in the below string. +$txt['more_attachments_error'] = 'Sorry, you aren\'t allowed to post any more attachments.'; + +$txt['more_smileys'] = 'more'; +$txt['more_smileys_title'] = 'Additional smileys'; +$txt['more_smileys_pick'] = 'Pick a smiley'; +$txt['more_smileys_close_window'] = 'Close Window'; + +$txt['error_new_reply'] = 'Warning - while you were typing a new reply has been posted. You may wish to review your post.'; +$txt['error_new_replies'] = 'Warning - while you were typing %d new replies have been posted. You may wish to review your post.'; +$txt['error_new_reply_reading'] = 'Warning - while you were reading a new reply has been posted. You may wish to review your post.'; +$txt['error_new_replies_reading'] = 'Warning - while you were reading %d new replies have been posted. You may wish to review your post.'; + +$txt['notification_reply_subject'] = 'Topic reply: %s'; +$txt['notification_reply'] = 'A reply has been posted to a topic you are watching by %s.' . "\n\n" . 'View the reply at: '; +$txt['notification_sticky_subject'] = 'Topic stickied: %s'; +$txt['notification_sticky'] = 'A topic you are watching has been marked as a sticky topic by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_lock_subject'] = 'Topic locked: %s'; +$txt['notification_lock'] = 'A topic you are watching has been locked by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_unlock_subject'] = 'Topic unlocked: %s'; +$txt['notification_unlock'] = 'A topic you are watching has been unlocked by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_remove_subject'] = 'Topic removed: %s'; +$txt['notification_remove'] = 'A topic you are watching has been removed by %s.'; +$txt['notification_move_subject'] = 'Topic moved: %s'; +$txt['notification_move'] = 'A topic you are watching has been moved to another board by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_merge_subject'] = 'Topic merged: %s'; +$txt['notification_merge'] = 'A topic you are watching has been merged with another topic by %s.' . "\n\n" . 'View the new merged topic at: '; +$txt['notification_split_subject'] = 'Topic split: %s'; +$txt['notification_split'] = 'A topic you are watching has been split into two or more topics by %s.' . "\n\n" . 'View what remains of this topic at: '; + +$txt['announce_this_topic'] = 'Send an announce about this topic to the members:'; +$txt['announce_title'] = 'Send an announcement'; +$txt['announce_desc'] = 'This form allows you to send an announcement to the selected membergroups about this topic.'; +$txt['announce_sending'] = 'Sending announcement of topic'; +$txt['announce_done'] = 'done'; +$txt['announce_continue'] = 'Continue'; +$txt['announce_topic'] = 'Announce topic.'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Post.russian.php b/Themes/default/languages/Post.russian.php new file mode 100644 index 0000000..6fc6cf3 --- /dev/null +++ b/Themes/default/languages/Post.russian.php @@ -0,0 +1,173 @@ +Только Администраторы и Модераторы могут здесь отвечать.'; + +$txt['notifyXAnn2'] = 'Новое сообщение'; +$txt['notifyXAnn3'] = 'Посмотреть'; +$txt['notifyXOnce2'] = 'Могут быть добавлены новые ответы, но Вы не получите уведомления о них, пока не зайдете на форум.'; + +$txt['rtm2'] = 'Оставить комментарий'; +$txt['rtm3'] = 'Собщение для '; +$txt['rtm4'] = ''; +$txt['rtm10'] = 'Добавить'; +$txt['rtm_email1'] = 'Об этом сообщении , "%s" '; +$txt['rtm_email2'] = 'получено уведомление от'; +$txt['rtm_email3'] = 'на форуме, модератором которого вы являетесь'; +$txt['rtm_email_comment'] = 'Был сделан следующий комментарий'; + +$txt['attach_preview'] = ' Потребуется снова добавить этот файл: '; +$txt['maxAttachPerPost'] = 'на одно сообщение'; + +$txt['post_additionalopt'] = 'Дополнительный настройки...'; +$txt['sticky_after2'] = 'Сделать тему важной.'; +$txt['move_after2'] = 'Переместить эту тему.'; +$txt['back_to_topic'] = 'Возвратиться в эту тему.'; + +$txt['retrieving_quote'] = ' Вставить цитату... .'; + +$txt['poll_options'] = 'Опции опроса'; +$txt['poll_options1a'] = 'Создать опрос на'; +$txt['poll_options1b'] = 'дней. (оставить пустым для безлиминтого опроса)'; +$txt['poll_options2'] = 'Показывать результаты опроса всем.'; +$txt['poll_options3'] = 'Показывать результаты, после того, как отдан голос.'; +$txt['poll_options4'] = 'Показывать результаты после завершения опроса.'; +$txt['poll_options5'] = 'Максимальное количество голосов от одного пользователя.'; +$txt['poll_options7'] = 'Разрешить пользователям менять свой ответ.'; +$txt['poll_error1'] = 'Вы выбрали слишком много вариантов - максимальное количество %s'; +$txt['poll_add_option'] = 'Добавить вариант'; + +$txt['spellcheck_done'] = 'Проверка орфографии завершена.'; +$txt['spellcheck_change_to'] = ' Изменить на:'; +$txt['spellcheck_suggest'] = 'Предложения:'; +$txt['spellcheck_change'] = 'Изменить'; +$txt['spellcheck_change_all'] = 'Изменить всё'; +$txt['spellcheck_ignore'] = 'Игнорировать'; +$txt['spellcheck_ignore_all'] = 'Игнорировать всё'; + +$txt['attach_lose'] = 'Вам потребуется произвести повторное добавление всех вложений, продолжить?'; +$txt['more_attachments'] = 'добавить вложение'; +// Don't use entities in the below string. +$txt['more_attachments_error'] = 'Вы не можете добавлять ещё вложения.'; + +$txt['more_smileys'] = 'ещё...'; +$txt['more_smileys_title'] = 'Дополнительные смайлики'; +$txt['more_smileys_pick'] = 'Выбрать смайлик'; +$txt['more_smileys_close_window'] = 'Закрыть окно'; + +$txt['error_new_reply'] = 'Внимание - пока Вы составляли сообщение, в теме был новый ответ. Вы можете изменить ваше сообщение.'; +$txt['error_new_replies'] = 'Внимание - пока Вы составляли сообщение, в теме было %d новых ответов. Вы можете изменить ваше сообщение.'; +$txt['error_new_reply_reading'] = 'Внимание - пока Вы просматривали, в теме был новый ответ. Вы можете изменить ваше сообщение.'; +$txt['error_new_replies_reading'] = 'Внимание - пока Вы просматривали, в теме было %d новых ответов. Вы можете изменить ваше сообщение.'; + +$txt['notification_reply_subject'] = 'Ответ в теме: %s'; +$txt['notification_reply'] = 'Ответ в теме, которую вы просматриваете был сделан пользователем %s.' . "\n\n" . 'Прочитать ответ: '; +$txt['notification_sticky_subject'] = 'Тема помечена важной: %s'; +$txt['notification_sticky'] = 'Тема, которую Вы просматриваете, была сделана сделана важной пользователем %s.' . "\n\n" . 'Просмотреть тему: '; +$txt['notification_lock_subject'] = 'Тема заблокирована: %s'; +$txt['notification_lock'] = 'Тема, которую Вы просматриваете, была заблокирована пользователем %s.' . "\n\n" . 'Просмотреть тему: '; +$txt['notification_unlock_subject'] = 'Тема разблокирована: %s'; +$txt['notification_unlock'] = 'Тема, которую Вы просматриваете, была разблокирована пользователем %s.' . "\n\n" . 'VПросмотреть тему: '; +$txt['notification_remove_subject'] = 'Тема удалена: %s'; +$txt['notification_remove'] = 'Просматриваемая вами тема была удалена пользователем %s.'; +$txt['notification_move_subject'] = 'Тема перемещена: %s'; +$txt['notification_move'] = 'Тема перемещена в другой раздел форума пользователем %s.' . "\n\n" . 'Новый адрес: '; +$txt['notification_merge_subject'] = 'Тема объединена: %s'; +$txt['notification_merge'] = 'Тема, которую вы просматриваете была слита с другой темой пользователем %s.' . "\n\n" . 'Просмотр новой объединённой темы: '; +$txt['notification_split_subject'] = 'Тема разделена: %s'; +$txt['notification_split'] = 'Тема, которую вы просматриваете была разделена на две или более темы пользователем %s.' . "\n\n" . 'View what remains of this topic at: '; + +$txt['announce_this_topic'] = 'Выслать анонс о этой теме пользователям:'; +$txt['announce_title'] = 'Выслать анонс'; +$txt['announce_desc'] = 'Этот форум позволяет Вам отсылать анонс о этой теме выбранным группам пользователей.'; +$txt['announce_sending'] = 'Выслать анонс о теме'; +$txt['announce_done'] = 'выполнено'; +$txt['announce_continue'] = 'Продолжить'; +$txt['announce_topic'] = 'Анонс темы.'; + +?> diff --git a/Themes/default/languages/Profile.english.php b/Themes/default/languages/Profile.english.php new file mode 100644 index 0000000..b1958bf --- /dev/null +++ b/Themes/default/languages/Profile.english.php @@ -0,0 +1,273 @@ +http://www.mypage.com/mypic.gif)'; +$txt[475] = 'I have my own pic'; +$txt[479] = 'The format here will be used to show dates throughout this forum.'; +$txt[486] = 'Time Format'; +$txt[487] = 'Time Offset must be between -23.5 and 23.5.'; +$txt[518] = 'This is the displayed name that people will see.'; +$txt[519] = 'Number of hours to +/- to make displayed time equal to your local time.'; +$txt[563] = 'Birthdate'; +$txt[564] = 'Month (MM)'; +$txt[565] = 'Day (DD)'; +$txt[566] = 'Year (YYYY)'; +$txt[596] = 'For best security, you should use six or more characters with a combination of letters, numbers, and symbols.'; +$txt[597] = 'Additional Information'; +$txt[598] = 'This must be included if you specify a URL below.'; +$txt[599] = 'This must be a complete URL.'; +$txt[600] = 'This is your ICQ number.'; +$txt[601] = 'This is your AOL Instant Messenger nickname.'; +$txt[602] = 'This is your Yahoo! Instant Messenger nickname.'; +$txt[606] = 'Signatures are displayed at the bottom of each post or personal message. BBC code and smileys may be used in your signature.'; +$txt[664] = 'Max ' . $modSettings['max_signatureLength'] . '; characters remaining: '; +$txt[688] = 'Send this member a personal message'; +$txt[722] = 'hidden'; +$txt[741] = 'Current forum time'; +$txt[749] = 'The \'number of posts\' box can only contain digits.'; + +$txt['smf225'] = 'Language'; +$txt['smf227'] = 'Avatar image is too big, please resize it and try again (max'; +$txt['smf233'] = 'Invalid Date Registered value, valid example:'; +$txt['smf237'] = 'Your MSN messenger email address'; +$txt['smf241'] = 'Current Password'; +$txt['smf243'] = 'You haven\'t entered your current password.'; +// Don't use entities in the below string, except the main ones. (lt, gt, quot.) +$txt['smf244'] = 'For security reasons, your current password is required to make changes to your account.'; + +// Profile enhancements +$txt['pswd1'] = 'Secret Question'; +$txt['secret_desc'] = 'To help retrieve your password, enter a question here with an answer that only you know.'; +$txt['secret_desc2'] = 'Choose carefully, you wouldn\'t want someone guessing your answer!'; +$txt['pswd2'] = 'Answer'; +$txt['pswd3'] = 'Ask me my question'; +$txt['pswd4'] = 'You can\'t retrieve your password, but you can set a new one by following a link sent to you by email. You also have the option of setting a new password by answering your secret question.'; +$txt['pswd5'] = 'Sorry, but you did not specify a valid combination of Secret Question and Answer in your profile. Please click on the back button, and use the default method of obtaining your password.'; +$txt['pswd6'] = 'Please enter the answer to your question, and the password you would like to use. Your password will be changed to the one you select provided you answer the question correctly.'; +$txt['pswd8'] = 'Your password was changed successfully.
    Click here to login.'; +$txt['secret_why_blank'] = 'why is this blank?'; + +$txt['theme1a'] = 'Current Theme'; +$txt['theme1b'] = '(change)'; +$txt['theme2'] = 'Theme preferences'; +$txt['theme_forum_default'] = 'Forum or Board Default'; +$txt['theme_forum_default_desc'] = 'This is the default theme, which means your theme will change along with the administrator\'s settings and the board you are viewing.'; + +$txt['profileConfirm'] = 'Do you really want to delete this user?'; + +$txt['title1'] = 'Custom Title'; + +$txt['lastLoggedIn'] = 'Last Active'; + +$txt['notifyX'] = 'Notification Settings:'; +$txt['notifyX1'] = 'Save settings'; +$txt['notifyXAnn4'] = 'Receive forum announcements and important notifications by email.'; +$txt['notifyXOnce1'] = 'Receive reply notification only for the first unread reply.'; +$txt['auto_notify'] = 'Turn notification on when you post or reply to a topic.'; + +$txt['notifications_topics'] = 'Current Topic Notifications'; +$txt['notifications_topics_list'] = 'You are being notified of replies to the following topics'; +$txt['notifications_topics_none'] = 'You are not currently receiving any notifications from topics.'; +$txt['notifications_topics_howto'] = 'To receive notifications from a topic, click the "notify" button while viewing it.'; +$txt['notifications_boards'] = 'Current Board Notifications'; +$txt['notifications_boards_list'] = 'You are being notified of new topics posted in the following boards'; +$txt['notifications_boards_none'] = 'You aren\'t receiving notifications on any boards right now.'; +$txt['notifications_boards_howto'] = 'To request notifications from a specific board, click the "notify" button in the index of that board.'; +$txt['notifications_update'] = 'Unsubscribe'; + +$txt[325] = 'Ignorelist'; +$txt[326] = 'Add one Username on each line.
    Or enter * to ignore all messages.'; +$txt[327] = 'Notify by email every time you receive a personal message.'; + +$txt['statPanel_showStats'] = 'User statistics for: '; +$txt['statPanel_users_votes'] = 'Number of Votes Cast'; +$txt['statPanel_users_polls'] = 'Number of Polls Created'; +$txt['statPanel_total_time_online'] = 'Total Time Spent Online'; +$txt['statPanel_noPosts'] = 'No posts to speak of!'; +$txt['statPanel_generalStats'] = 'General Statistics'; +$txt['statPanel_posts'] = 'posts'; +$txt['statPanel_topics'] = 'topics'; +$txt['statPanel_votes'] = 'votes'; +$txt['statPanel_polls'] = 'polls'; +$txt['statPanel_topBoards'] = 'Most Popular Boards By Posts'; +$txt['statPanel_topBoardsActivity'] = 'Most Popular Boards By Activity'; +$txt['statPanel_activityTime'] = 'Posting Activity By Time'; +$txt['statPanel_timeOfDay'] = 'Time of Day'; +$txt['statPanel_show'] = 'Show general statistics for this member'; + +$txt['deleteAccount_warning'] = 'Warning - These actions are irreversible!'; +$txt['deleteAccount_desc'] = 'From this page you can delete this user\'s account and posts.'; +$txt['deleteAccount_member'] = 'Delete this member\'s account'; +$txt['deleteAccount_posts'] = 'Posts of user that are to be removed'; +$txt['deleteAccount_none'] = 'None'; +$txt['deleteAccount_all_posts'] = 'All Posts'; +$txt['deleteAccount_topics'] = 'Topics and Posts'; +$txt['deleteAccount_confirm'] = 'Are you completely sure you want to delete this account?'; + +$txt['profileInfo'] = 'Profile Info'; +$txt['summary'] = 'Summary'; +$txt['showPosts'] = 'Show Posts'; +$txt['statPanel'] = 'Show Stats'; +$txt['trackUser'] = 'Track User'; +$txt['trackIP'] = 'Track IP'; + +$txt['profileEdit'] = 'Modify Profile'; +$txt['account'] = 'Account Related Settings'; +$txt['account_info'] = 'These are your account settings. This page holds all critical information that identifies you on this forum. For security reasons, you will need to enter your (current) password to make changes to this information.'; +$txt['forumProfile'] = 'Forum Profile Information'; +$txt['forumProfile_info'] = 'You can change your personal information on this page. This information will be displayed throughout ' . $context['forum_name'] . '. If you aren\'t comfortable with sharing some information, simply skip it - nothing here is required.'; +$txt['theme'] = 'Look and Layout Preferences'; +$txt['theme_info'] = 'This section allows you to customize the look and layout of the forum.'; +$txt['notification'] = 'Notifications and Email'; +$txt['notification_info'] = 'SMF allows you to be notified of replies to posts, newly posted topics, and forum announcements. You can change those settings here, or oversee the topics and boards you are currently being receiving notifications for.'; +$txt['pmprefs'] = 'Personal Message Options'; +$txt['pmprefs_info'] = 'Other members of ' . $context['forum_name'] . ' can contact your personally, but sometimes you may want to ignore someone\'s messages. This page allows you to set that, among other things.'; + +$txt['profileAction'] = 'Actions'; +$txt['deleteAccount'] = 'Delete this account'; +$txt['profileSendIm'] = 'Send personal message'; +$txt['profileBanUser'] = 'Ban this user'; + +$txt['display_name'] = 'Display name'; +$txt['enter_ip'] = 'Enter IP (range)'; +$txt['errors_by'] = 'Error messages by'; +$txt['errors_desc'] = 'Below is a list of all the recent errors that this user has generated/experienced.'; +$txt['errors_from_ip'] = 'Error messages from IP (range)'; +$txt['errors_from_ip_desc'] = 'Below is a list of all recent error messages generated by this IP (range).'; +$txt['invalid_ip'] = 'Invalid IP address. Note that only asterisks (*) are allowed as masks, e.g. 127.0.*.*'; +$txt['ip_address'] = 'IP address'; +$txt['ips_in_errors'] = 'IPs used in error messages'; +$txt['ips_in_messages'] = 'IPs used in messages'; +$txt['members_from_ip'] = 'Members from IP (range)'; +$txt['members_in_range'] = 'Members possibly in the same range'; +$txt['messages_from_ip'] = 'Messages posted from IP (range)'; +$txt['messages_from_ip_desc'] = 'Below is a list of all messages posted from this IP (range).'; +$txt['most_recent_ip'] = 'Most recent IP address'; +$txt['no_errors_from_ip'] = 'No error messages from the specified IP (range) found'; +$txt['no_errors_from_user'] = 'No error messages from the specified user found'; +$txt['no_members_from_ip'] = 'No members from the specified IP (range) found'; +$txt['no_messages_from_ip'] = 'No messages from the specified IP (range) found'; +$txt['none'] = 'None'; +$txt['own_profile_confirm'] = 'Do you really want to delete your own account?'; +$txt['view_ips_by'] = 'View IPs used by'; + +$txt['avatar_will_upload'] = 'I will upload my own picture'; + +$txt['activate_reactivate_title'] = 'Welcome back to'; +$txt['activate_reactivate_mail'] = 'In order to re-validate your email address, your account has been deactivated. Click the following link to activate it again:'; +$txt['activate_changed_email'] = 'You\'ve changed your email address. In order to validate this address you will receive an email. Click the link in that email to reactivate your account.'; + +$txt[394] = 'Unable to send reminder email.'; +$txt[395] = 'Send an email to'; +$txt[396] = 'to ask for password'; +$txt[669] = 'Password Reminder'; + +$txt['smf100'] = 'Username/Email'; +$txt['smf101'] = 'by User'; +$txt['smf102'] = 'by Email'; + +$txt['reminder_subject'] = 'New password for ' . $context['forum_name']; +$txt['reminder_mail'] = 'This mail was sent because the \'forgot password\' function has been applied to your account. To set a new password click the following link'; +$txt['reminder_sent'] = 'A mail has been sent to your email address. Click the link in that mail to set a new password.'; +$txt['reminder_set_password'] = 'Set Password'; +$txt['reminder_password_set'] = 'Password successfully set'; +$txt['reminder_error'] = '%s failed to answer their secret question correctly when attempting to change a forgotten password.'; + +$txt['registration_not_approved'] = 'Sorry, this account has not yet been approved. If you need to change your email address please click'; +$txt['registration_not_activated'] = 'Sorry, this account has not yet been activated. If you need to resend the activation email please click'; + +$txt['primary_membergroup'] = 'Primary Membergroup'; +$txt['additional_membergroups'] = 'Additional Membergroups'; +// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'. +$txt['additional_membergroups_show'] = '[ show additional groups ]'; +$txt['no_primary_membergroup'] = '(no primary membergroup)'; +$txt['deadmin_confirm'] = 'Are you sure you wish to irrevocably remove your admin status?'; + +$txt['account_not_activated'] = 'Account is currently not activated'; +$txt['account_activate'] = 'activate'; + +$txt['show_online'] = 'Show others your online status?'; + +$txt['return_to_post'] = 'Return to topics after posting by default.'; +$txt['copy_to_outbox'] = 'Save a copy of each Personal Message in my outbox by default.'; +$txt['popup_messages'] = 'Show a popup when you receive new messages?'; +$txt['recent_posts_at_top'] = 'Show most recent posts at the top.'; +$txt['recent_pms_at_top'] = 'Show most recent personal messages at top.'; + +$txt['timeformat_easy0'] = '(Forum Default)'; +$txt['timeformat_easy1'] = 'Month Day, Year, HH:MM:SS a/pm'; +$txt['timeformat_easy2'] = 'Month Day, Year, HH:MM:SS (army time.)'; +$txt['timeformat_easy3'] = 'YYYY-MM-DD, HH:MM:SS'; +$txt['timeformat_easy4'] = 'DD Month YYYY, HH:MM:SS'; +$txt['timeformat_easy5'] = 'DD-MM-YYYY, HH:MM:SS'; + +$txt['rtm8'] = 'Poster'; + +$txt[732] = 'Show board descriptions inside boards.'; +$txt['show_children'] = 'Show child boards on every page inside boards, not just the first.'; +$txt['show_no_avatars'] = 'Don\'t show other users\' avatars.'; +$txt['show_no_signatures'] = 'Don\'t show other users\' signatures.'; +$txt['show_no_censored'] = 'Leave words uncensored.'; +$txt['calendar_start_day'] = 'First day of the week on the calendar'; +$txt['display_quick_reply'] = 'Use quick reply on topic display: '; +$txt['display_quick_reply1'] = 'don\'t show at all'; +$txt['display_quick_reply2'] = 'show, off by default'; +$txt['display_quick_reply3'] = 'show, on by default'; +$txt['display_quick_mod'] = 'Show quick-moderation on message index as '; +$txt['display_quick_mod_none'] = 'don\'t show.'; +$txt['display_quick_mod_check'] = 'checkboxes.'; +$txt['display_quick_mod_image'] = 'icons.'; + +$txt['whois_title'] = 'Look up IP on a regional whois-server'; +$txt['whois_apnic'] = 'APNIC (Asia Pacific region)'; +$txt['whois_arin'] = 'ARIN (North America, a portion of the Caribbean and sub-Saharan Africa)'; +$txt['whois_lacnic'] = 'LACNIC (Latin American and Caribbean region)'; +$txt['whois_ripe'] = 'RIPE (Europe, the Middle East and parts of Africa and Asia)'; + +$txt['moderator_why_missing'] = 'why isn\'t moderator here?'; +$txt['username_change'] = 'change'; +$txt['username_warning'] = 'To change this member\'s username, the forum must also reset their password, which will be emailed to the member with their new username.'; + +$txt['showPermissions'] = 'Show Permissions'; +$txt['showPermissions_given'] = 'Given by'; +$txt['showPermissions_denied'] = 'Denied by'; +$txt['showPermissions_permission'] = 'Permission (denied permissions are struck out)'; +$txt['showPermissions_none_general'] = 'This member has no general permissions set.'; +$txt['showPermissions_none_board'] = 'This member has no board specific permissions set.'; +$txt['showPermissions_all'] = 'As an administrator, this member has all possible permissions.'; +$txt['showPermissions_select'] = 'Board specific permissions for'; +$txt['showPermissions_general'] = 'General Permissions'; +$txt['showPermissions_global'] = 'All boards'; +$txt['showPermissions_all_boards'] = 'All'; +$txt['showPermissions_all_boards_except'] = 'All, except'; +$txt['showPermissions_boards'] = 'Boards'; +$txt['showPermissions_boards_denied'] = 'Boards denied'; +$txt['showPermissions_local_only'] = 'Permission only locally available'; + +$txt['local_time'] = 'Local Time'; +$txt['posts_per_day'] = 'per day'; + +$txt['who_change_my_karma'] = 'Who change my karma?'; +$txt['whom_i_change_karma'] = 'Whom I change karma?'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Profile.russian.php b/Themes/default/languages/Profile.russian.php new file mode 100644 index 0000000..a3ede3c --- /dev/null +++ b/Themes/default/languages/Profile.russian.php @@ -0,0 +1,272 @@ +http://www.mypage.com/mypic.gif)'; +$txt[475] = 'Своя картинка'; +$txt[479] = 'Формат отображения даты.'; +$txt[486] = 'Формат отображения времени'; +$txt[487] = 'Разница во времени должна быть в пределах от -23.5 до 23.5.'; +$txt[518] = 'Отображаемое имя, которое пользователи будут видеть.'; +$txt[519] = 'Количество часов +/- к времени сервера.'; +$txt[563] = 'Дата рождения'; +$txt[564] = 'Месяц (MM)'; +$txt[565] = 'День (ДД)'; +$txt[566] = 'Год (ГГГГ)'; +$txt[596] = 'Для безопасности лучше использовать 6 или более символов в произвольной комбинации.'; +$txt[597] = 'Дополнительная информация'; +$txt[598] = 'Используется, если только вы ниже введёте URL сайта.'; +$txt[599] = 'Укажите полный URL.'; +$txt[600] = 'Ваш ICQ .'; +$txt[601] = 'Ваш ник в AOL Instant Messenger.'; +$txt[602] = 'Ваш ник в Yahoo! Instant Messenger.'; +$txt[606] = 'Подписи отображаются снизу каждого сообщения или Личного Сообщения. BBC код и смайлы могут использоваться в подписи.'; +$txt[664] = 'Макс. ' . $modSettings['max_signatureLength'] . '; осталось символов: '; +$txt[688] = 'Отправить личное сообщение'; +$txt[722] = 'скрытый'; +$txt[741] = 'Текущее время сервера'; +$txt[749] = 'Должны быть только цифры.'; + +$txt['smf225'] = 'Язык'; +$txt['smf227'] = 'Размер аватара слишком велик, попробуйте уменьшить и повторить (max'; +$txt['smf233'] = 'Неправильно введена дата, должно быть в виде :'; +$txt['smf237'] = 'Ваш MSN messenger e-mail'; +$txt['smf241'] = 'Правильный пароль'; +$txt['smf243'] = 'Неверный пароль.'; +// Don't use entities in the below string, except the main ones. (lt, gt, quot.) +$txt['smf244'] = 'По соображениям безопасности ваш пароль должен отличаться от аккаунта.'; + +// Profile enhancements +$txt['pswd1'] = 'Секретный вопрос'; +$txt['secret_desc'] = 'Для напоминания пароля введите вопрос с ответом, который знаете только вы.'; +$txt['secret_desc2'] = 'Будьте осторожны, чтобы никто другой не сумел бы догадаться об ответе на ваш вопрос!'; +$txt['pswd2'] = 'Ответ'; +$txt['pswd3'] = 'Спросить у меня мой вопрос'; +$txt['pswd4'] = 'Вы не можете восстановить свой старый пароль, но Вы можете получить новый по почте. Вы можете также установить новый пароль, ответив на секретный вопрос.'; +$txt['pswd5'] = 'Извините, но Вы ввели не правильную комбинацию секретного вопроса и ответа установленного в Вашем профиле. Пожалуйста, вернитесь на предыдущую страницу и используйте стандартный способ для восстановления пароля.'; +$txt['pswd6'] = 'Пожалуйста, введите ответ на ваш вопрос и пароль, которым хотите пользоваться. Ваш пароль изменится на тот, который вы выберите.'; +$txt['pswd8'] = 'Ваш пароль успешно сменён.
    Кликните сюда чтобы войти.'; +$txt['secret_why_blank'] = 'почему пусто?'; + +$txt['theme1a'] = 'Текущий шаблон'; +$txt['theme1b'] = '(сменить)'; +$txt['theme2'] = 'Настройки шаблона'; +$txt['theme_forum_default'] = 'Форум или раздел по умолчанию'; +$txt['theme_forum_default_desc'] = 'Это тема по умолчанию, это значит, что она будет меняться если администратор меняет настройки и Вы смотрите форум.'; + +$txt['profileConfirm'] = 'Удалить этого пользователя?'; + +$txt['title1'] = 'Подпись'; + +$txt['lastLoggedIn'] = 'Последняя активность'; + +$txt['notifyX'] = 'Настройки уведомлений:'; +$txt['notifyX1'] = 'Сохранить'; +$txt['notifyXAnn4'] = 'Получать объявления и важные извещения форума по email.'; +$txt['notifyXOnce1'] = 'Получать извещение только о первом не прочтенном ответе.'; +$txt['auto_notify'] = 'Включить извещения, если вы пишете сообщение или отвечаете в теме.'; + +$txt['notifications_topics'] = 'Текущие настройки уведомлений в темах'; +$txt['notifications_topics_list'] = 'Вы извещаетесь об ответах в следующих темах'; +$txt['notifications_topics_none'] = 'Вы сейчас не получаете извещения с тем.'; +$txt['notifications_topics_howto'] = 'Чтобы получать извещения с тем, кликните на кнопку "извещать", пока просматриваете тему.'; +$txt['notifications_boards'] = 'Извещения Текущего Форума'; +$txt['notifications_boards_list'] = 'Вам приходят извещения о новых темах в следующих форумах'; +$txt['notifications_boards_none'] = 'Вы не получаете сейчас извещения с любых форумов.'; +$txt['notifications_boards_howto'] = 'Чтобы получать извещения с определенных форумов, кликните кнопку "извещать" на странице форума.'; +$txt['notifications_update'] = 'Отписаться'; + +$txt[325] = 'Чёрный список'; +$txt[326] = 'По одному имени на строку.
    Или поставьте * чтобы игнорировать все сообщения.'; +$txt[327] = 'Уведомлять по e-mail при получении новых личных сообщений.'; + +$txt['statPanel_showStats'] = 'Статистика пользователя: '; +$txt['statPanel_users_votes'] = 'Подано голосов'; +$txt['statPanel_users_polls'] = 'Создано голосований'; +$txt['statPanel_total_time_online'] = 'Всего находился на форуме'; +$txt['statPanel_noPosts'] = 'Вы ещё не разу не отвечали!'; +$txt['statPanel_generalStats'] = 'Основная статистика'; +$txt['statPanel_posts'] = 'ответов'; +$txt['statPanel_topics'] = 'тем'; +$txt['statPanel_votes'] = 'голосов'; +$txt['statPanel_polls'] = 'голосований'; +$txt['statPanel_topBoards'] = 'Активность на форумах (кол-во ответов)'; +$txt['statPanel_topBoardsActivity'] = 'Активность на форумах (% ответов)'; +$txt['statPanel_activityTime'] = 'Среднее число сообщений '; +$txt['statPanel_timeOfDay'] = 'раз в день'; +$txt['statPanel_show'] = 'Показать основную статистику пользователя'; + +$txt['deleteAccount_warning'] = 'Предупреждение - Это действие не восстанавливаемо!'; +$txt['deleteAccount_desc'] = 'С этой страницы Вы можете удалять пользовательские сообщения и аккаунты.'; +$txt['deleteAccount_member'] = 'Удалить аккаунт этого участника'; +$txt['deleteAccount_posts'] = 'Сообщений было удалено'; +$txt['deleteAccount_none'] = 'Ни одного'; +$txt['deleteAccount_all_posts'] = 'Все ответы'; +$txt['deleteAccount_topics'] = 'Тем и ответов'; +$txt['deleteAccount_confirm'] = 'Вы уверены, что хотите удалить этот аккаунт?'; + +$txt['profileInfo'] = 'Профиль пользователя'; +$txt['summary'] = 'Основная информация'; +$txt['showPosts'] = 'Показать ответы'; +$txt['statPanel'] = 'Статистика'; +$txt['trackUser'] = 'Проверка участника'; +$txt['trackIP'] = 'Поиск IP'; + +$txt['profileEdit'] = 'Изменить профиль'; +$txt['account'] = 'Настройки аккаунта'; +$txt['account_info'] = 'Здесь настройки Вашего аккаунта. На этой странице находится критически важная информация, идентифицирующая Вас на форуме. По соображениям безопасности, Вам необходимо ввести текущий пароль, для изменения этой информации.'; +$txt['forumProfile'] = 'Профиль на форуме'; +$txt['forumProfile_info'] = 'Здесь вы можете изменить информацию о себе, которая будет отображаться на форуме ' . $context['forum_name'] . '. Вы не обязаны указывать полную информацию о себе.'; +$txt['theme'] = 'Внешний вид форума'; +$txt['theme_info'] = 'Здесь вы можете настроить предпочитаемый внешний вид форума.'; +$txt['notification'] = 'Уведомления по e-mail'; +$txt['notification_info'] = 'SMF предоставляет возможность извещать Вас об ответах, о новых темах и объявлениях на форуме. Вы можете изменить эти настройки здесь, или пересмотреть темы и форумы, с которых Вы сейчас получаете извещения.'; +$txt['pmprefs'] = 'Настройки личных сообщений'; +$txt['pmprefs_info'] = 'Другие участники ' . $context['forum_name'] . ' могут связаться с Вами, но вы можете игнорировать чьи-либо сообщения. Эта страница позволяет Вам также сделать и это.'; + +$txt['profileAction'] = 'Действия'; +$txt['deleteAccount'] = 'Удалить аккаунт'; +$txt['profileSendIm'] = 'Отправить личное сообщения'; +$txt['profileBanUser'] = 'Бан участника'; + +$txt['display_name'] = 'Отображаемое имя'; +$txt['enter_ip'] = 'Ввести IP (ранг)'; +$txt['errors_by'] = 'Сообщения с ошибками'; +$txt['errors_desc'] = 'Ниже список всех недавних ошибок, которые вызвал пользователь.'; +$txt['errors_from_ip'] = 'Сообщения с ошибками от IP (ранг)'; +$txt['errors_from_ip_desc'] = 'Ниже список недавних ошибок, вызванный следующим IP (диапазоном IP).'; +$txt['invalid_ip'] = 'Ошибочный IP адрес. Заметьте, что только звездочки (*) разрешены как маски, напр. 127.0.*.*'; +$txt['ip_address'] = 'IP адрес'; +$txt['ips_in_errors'] = 'IP использовался в ошибочных сообщениях'; +$txt['ips_in_messages'] = 'IP использовался в сообщениях'; +$txt['members_from_ip'] = 'Участники с IP (диапазоном IP)'; +$txt['members_in_range'] = 'Участники возможно в одном диапазоне'; +$txt['messages_from_ip'] = 'Сообщения созданные с IP (диапазона IP)'; +$txt['messages_from_ip_desc'] = 'Ниже список всех сообщений с этого IP (диапазона IP).'; +$txt['most_recent_ip'] = 'Самые последние IP адреса.'; +$txt['no_errors_from_ip'] = 'Не найдено сообщений об ошибках для указанного IP адреса(диапазона IP)'; +$txt['no_errors_from_user'] = 'Не найдено сообщений об ошибках для указанного пользователя'; +$txt['no_members_from_ip'] = 'Не найдено участника с подходящим IP (диапазоном IP)'; +$txt['no_messages_from_ip'] = 'Не найдены сообщения с указанного IP (диапазона IP)'; +$txt['none'] = 'Ни один'; +$txt['own_profile_confirm'] = 'Вы действительно хотите удалить ваш собственный аккаунт?'; +$txt['view_ips_by'] = 'Посмотреть IP адреса использованные'; + +$txt['avatar_will_upload'] = 'Я загружу свою картинку'; + +$txt['activate_reactivate_title'] = 'С возвращением'; +$txt['activate_reactivate_mail'] = 'Для проверки работы вашего email? Ваш аккаунт был деактивирован. Нажмите на следующую ссылку для активации:'; +$txt['activate_changed_email'] = 'Вы изменили email адрес. Для проверки этого адреса, вам выслан email. Нажмите ссылку для реактивации аккаунта.'; + +$txt[394] = 'Не получается отправить email напоминание.'; +$txt[395] = 'Отправить e-mail'; +$txt[396] = 'чтобы запросить пароль'; +$txt[669] = 'Напоминание пароля'; + +$txt['smf100'] = 'Пользователь/E-mail'; +$txt['smf101'] = 'по User'; +$txt['smf102'] = 'по Email'; + +$txt['reminder_subject'] = 'Новый пароль для ' . $context['forum_name']; +$txt['reminder_mail'] = 'Этот email был выслан, так как функция \'забыт пароль\' была применена для вашего аккаунта. Чтобы изменить пароль, нажмите следующую ссылку'; +$txt['reminder_sent'] = 'Письмо было отправлено на Ваш email адрес. Нажмите ссылку в этом письме, чтобы установить новый пароль.'; +$txt['reminder_set_password'] = 'Установить Пароль'; +$txt['reminder_password_set'] = 'Пароль успешно установлен'; +$txt['reminder_error'] = '%s не правильно ответили на секретный вопрос при попытке изменения забытого пароля.'; + +$txt['registration_not_approved'] = 'Извините, этот аккаунт не был подтвержден. Если Вам надо сменить email адрес, пожалуйста, кликните'; +$txt['registration_not_activated'] = 'Извините, этот аккаунт не был активирован. Если Вам необходимо заново переслать email активации, пожалуйста, кликните'; + +$txt['primary_membergroup'] = 'Основная группа участников'; +$txt['additional_membergroups'] = 'Дополнительные группы участников'; +// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'. +$txt['additional_membergroups_show'] = '[ показывать дополнительные группы ]'; +$txt['no_primary_membergroup'] = '(нет основополагающей группы)'; +$txt['deadmin_confirm'] = 'Вы уверены, что хотите безвозвратно снять ваш статус администратора??'; + +$txt['account_not_activated'] = 'Аккаунт не активирован'; +$txt['account_activate'] = 'активировать'; + +$txt['show_online'] = 'Показывать остальным ваш online статус?'; + +$txt['return_to_post'] = 'По умолчанию, возвращаться в тему после ответа.'; +$txt['copy_to_outbox'] = 'Сохранять копию каждого Личного Сообщения в исходящих по умолчанию.'; +$txt['popup_messages'] = 'Выводить предупреждение, при получении нового личного сообщения?'; +$txt['recent_posts_at_top'] = 'Показывать новые сообщения сверху.'; +$txt['recent_pms_at_top'] = 'Показывать новые личные сообщения вверху.'; + +$txt['timeformat_easy0'] = '(Настройки по умолчанию)'; +$txt['timeformat_easy1'] = 'Месяц День, Год, ЧЧ:ММ:СС a/pm'; +$txt['timeformat_easy2'] = 'Месяц День, Год, ЧЧ:ММ:СС (по военному.)'; +$txt['timeformat_easy3'] = 'ГГГГ-ММ-ДД, ЧЧ:ММ:СС'; +$txt['timeformat_easy4'] = 'ДД Месяц ГГГГ, ЧЧ:MM:СС'; +$txt['timeformat_easy5'] = 'ДД-MM-ГГГГ, ЧЧ:MM:СС'; + +$txt['rtm8'] = 'Объявление'; + +$txt[732] = 'Показывать описание форумов внутри.'; +$txt['show_children'] = 'Показывать дочерние форумы на каждой странице внутри форума, а не только на первой.'; +$txt['show_no_avatars'] = 'Не показывать аватары других пользователей.'; +$txt['show_no_signatures'] = 'Не показывать подписи других пользователей.'; +$txt['show_no_censored'] = 'Оставлять слова не цензурируемыми.'; +$txt['calendar_start_day'] = 'Первый день в неделе в календаре.'; +$txt['display_quick_reply'] = 'Использовать быстрый ответ на странице темы: '; +$txt['display_quick_reply1'] = 'не показывать'; +$txt['display_quick_reply2'] = 'не показывать по умолчанию'; +$txt['display_quick_reply3'] = 'показывать по умолчанию'; +$txt['display_quick_mod'] = 'Показывать быстрое модерирование на странице сообщения как '; +$txt['display_quick_mod_none'] = 'не показывать.'; +$txt['display_quick_mod_check'] = 'ячейки.'; +$txt['display_quick_mod_image'] = 'иконки.'; + +$txt['whois_title'] = 'Смотреть IP на региональных whois-серверах'; +$txt['whois_apnic'] = 'APNIC (Asia Pacific region)'; +$txt['whois_arin'] = 'ARIN (North America, a portion of the Caribbean and sub-Saharan Africa)'; +$txt['whois_lacnic'] = 'LACNIC (Latin American and Caribbean region)'; +$txt['whois_ripe'] = 'RIPE (Europe, the Middle East and parts of Africa and Asia)'; + +$txt['moderator_why_missing'] = 'почему здесь нет модератора?'; +$txt['username_change'] = 'изменить'; +$txt['username_warning'] = 'Чтобы сменить имена пользователей, форум также должен сменить их пароли, которые будут отправлены пользователю вместе с новым логином.'; + +$txt['showPermissions'] = 'Показать права'; +$txt['showPermissions_given'] = 'Разрешено'; +$txt['showPermissions_denied'] = 'Запрещено'; +$txt['showPermissions_permission'] = 'Право (запрещенные права вычеркнуты)'; +$txt['showPermissions_none_general'] = 'У этого участника нет основных прав.'; +$txt['showPermissions_none_board'] = 'Нет особых прав.'; +$txt['showPermissions_all'] = 'Все права администратора.'; +$txt['showPermissions_select'] = 'Специальные права в разделах'; +$txt['showPermissions_general'] = 'Основные права'; +$txt['showPermissions_global'] = 'Все форумы'; +$txt['showPermissions_all_boards'] = 'Все'; +$txt['showPermissions_all_boards_except'] = 'Все, кроме'; +$txt['showPermissions_boards'] = 'Форумы'; +$txt['showPermissions_boards_denied'] = 'Форумы запрещены'; +$txt['showPermissions_local_only'] = 'Права доступны только локально'; + +$txt['local_time'] = 'Местное время'; +$txt['posts_per_day'] = 'раз в день'; + +$txt['who_change_my_karma'] = 'Кто изменял мой рейтинг?'; +$txt['whom_i_change_karma'] = 'Чей рейтинг менял(а) я?'; +?> diff --git a/Themes/default/languages/ProfileComments.russian.php b/Themes/default/languages/ProfileComments.russian.php new file mode 100644 index 0000000..ae97ecc --- /dev/null +++ b/Themes/default/languages/ProfileComments.russian.php @@ -0,0 +1,54 @@ + \ No newline at end of file diff --git a/Themes/default/languages/Settings.english.php b/Themes/default/languages/Settings.english.php new file mode 100644 index 0000000..7310b01 --- /dev/null +++ b/Themes/default/languages/Settings.english.php @@ -0,0 +1,7 @@ +
    Thanks go to Babylonking and Alienine.'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Settings.russian.php b/Themes/default/languages/Settings.russian.php new file mode 100644 index 0000000..8790b57 --- /dev/null +++ b/Themes/default/languages/Settings.russian.php @@ -0,0 +1,7 @@ +
    Thanks go to Babylonking and Alienine.'; + +?> diff --git a/Themes/default/languages/Stats.english.php b/Themes/default/languages/Stats.english.php new file mode 100644 index 0000000..1494b1b --- /dev/null +++ b/Themes/default/languages/Stats.english.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/Themes/default/languages/Stats.russian.php b/Themes/default/languages/Stats.russian.php new file mode 100644 index 0000000..62cdb3e --- /dev/null +++ b/Themes/default/languages/Stats.russian.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/Themes/default/languages/Themes.english.php b/Themes/default/languages/Themes.english.php new file mode 100644 index 0000000..315fd83 --- /dev/null +++ b/Themes/default/languages/Themes.english.php @@ -0,0 +1,89 @@ +On the right, you can modify the settings for your themes.'; + +$txt['theme_allow'] = 'Allow members to select their own themes.'; +$txt['theme_default'] = 'Allow members to select the "Default" theme.'; +$txt['theme_guests'] = 'Overall forum default'; +$txt['theme_select'] = 'choose...'; +$txt['theme_reset'] = 'Reset everyone to'; +$txt['theme_nochange'] = 'No change'; +$txt['theme_forum_default'] = 'Forum Default'; + +$txt['theme_settings'] = 'settings'; +$txt['theme_remove'] = 'remove'; +$txt['theme_remove_confirm'] = 'Are you sure you want to permanently remove this theme?'; + +$txt['theme_install'] = 'Install a New Theme'; +$txt['theme_install_file'] = 'From a file'; +$txt['theme_install_dir'] = 'From a directory on the server'; +$txt['theme_install_error'] = 'That theme directory doesn\'t exist, or doesn\'t contain a theme!'; +$txt['theme_install_write_error'] = 'The Themes directory must be writable to continue!'; +$txt['theme_install_go'] = 'Install!'; +$txt['theme_install_new'] = 'Create a copy of Default named'; +$txt['theme_install_new_confirm'] = 'Install a new theme?'; +$txt['theme_install_writable'] = 'Warning - you cannot create or install a new theme as your themes directory is not currently writable!'; +$txt['theme_installed'] = 'Installed Successfully'; +$txt['theme_installed_message'] = 'was installed successfully.'; + +$txt['theme_latest'] = 'Latest and Greatest Themes'; +$txt['theme_latest_fetch'] = 'Fetching latest themes from www.simplemachines.org...'; + +$txt['theme_pick'] = 'Choose a theme...'; +$txt['theme_preview'] = 'preview »'; +$txt['theme_set'] = 'use this theme'; +$txt['theme_user'] = 'person is using this theme.'; +$txt['theme_users'] = 'people are using this theme.'; + +$txt['theme_edit'] = 'Edit Theme'; +$txt['theme_edit_style'] = 'Modify the style.css file. (colors, fonts, etc.)'; +$txt['theme_edit_index'] = 'Modify the index template. (the main template)'; +$txt['theme_edit_no_save'] = 'This file cannot be saved because it is not writable! Please make sure the following file is 777 or has the proper permissions'; +$txt['theme_edit_save'] = 'Save Changes'; + +$txt['theme_global_description'] = 'This is the default theme, which means your theme will change along with the administrators\' settings and the board you are viewing.'; + +$txt['theme5'] = 'Theme URLs and Configuration'; +$txt['theme6'] = 'Theme Options and Preferences'; +$txt['actual_theme_name'] = 'This theme\'s name: '; +$txt['actual_theme_dir'] = 'This theme\'s directory: '; +$txt['actual_theme_url'] = 'This theme\'s URL: '; +$txt['actual_images_url'] = 'This theme\'s images URL: '; + +$txt['additional_options_collapsable'] = 'Enable collapsable additional post options'; +$txt['allow_no_censored'] = 'Allow users to turn off word censoring?'; +$txt['who_display_viewing'] = 'Show who is viewing the board index and posts'; +$txt['who_display_viewing_off'] = 'Don\'t show'; +$txt['who_display_viewing_numbers'] = 'Show only numbers'; +$txt['who_display_viewing_names'] = 'Show member names'; +$txt['smf93'] = 'Disable recent posts'; +$txt['smf94'] = 'Enable single post'; +$txt['smf95'] = 'Enable multiple posts'; +$txt['smf105'] = 'Enable inline links'; +$txt['smf106'] = 'Enabling this will cause your current location to be drawn in a single line, as opposed to in a tree-like manner.'; +$txt['smf200'] = 'Enable SP1 style statistics on board index'; +$txt[382] = 'Show latest member on board index'; +$txt[383] = 'Show last modification date on modified posts'; +$txt[384] = 'Show user avatars in message view'; +$txt[385] = 'Show personal text in message view'; +$txt[386] = 'Show gender images in message view'; +$txt[387] = 'Show news fader on board index'; +$txt[510] = 'Show members list bar on board index?'; +$txt[522] = 'Show current position in forum as link instead of text?'; +$txt[523] = 'Show view profile button under post?'; +$txt[618] = 'Enable and show \'Mark as Read\' buttons?'; +$txt['number_recent_posts'] = 'Number of recent posts to display on board index:'; +$txt['number_recent_posts_desc'] = 'To disable the recent posts bar set this value to zero.'; +$txt['hide_post_group'] = 'Hide post group titles for grouped members?'; +$txt['hide_post_group_desc'] = 'Enabling this will not display a members post group title on the message view if they are assigned to a non-post based group.'; + +$txt['theme_options_reset_link'] = 'Reset member specific options for all members.'; +$txt['theme_options_reset'] = 'Resetting options for everyone. To change an option, first check the box to the left of it. This signifies that, for all members, this option should be changed. Next, specify what you want the option to be. If the first checkbox is not checked, the option will be left as it is for each member.'; +$txt['theme_options_defaults_link'] = 'Change the default member specific options.'; +$txt['theme_options_defaults'] = 'These are the default values for some member specific settings. Changing these will only affect new members and guests.'; +$txt['theme_options_title'] = 'Change or reset default options'; +$txt['theme_settings_link'] = 'Back to this theme\'s general settings. (save first!)'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Themes.russian.php b/Themes/default/languages/Themes.russian.php new file mode 100644 index 0000000..b4013dd --- /dev/null +++ b/Themes/default/languages/Themes.russian.php @@ -0,0 +1,89 @@ +Справа, Вы можете изменить настройки для Ваших тем.'; + +$txt['theme_allow'] = 'Позволить участникам выбирать их собственные темы.'; +$txt['theme_default'] = 'Позволить участникам выбирать тему "По умолчанию".'; +$txt['theme_guests'] = 'Вид форума по дефолту'; +$txt['theme_select'] = 'выбрать...'; +$txt['theme_reset'] = 'Изменить всем на'; +$txt['theme_nochange'] = 'Не менять'; +$txt['theme_forum_default'] = 'Форум По Умолчанию'; + +$txt['theme_settings'] = 'настройки'; +$txt['theme_remove'] = 'убрать'; +$txt['theme_remove_confirm'] = 'Вы уверены, что хотите навсегда убрать эту тему?'; + +$txt['theme_install'] = 'Установить Новую Тему'; +$txt['theme_install_file'] = 'Из файла'; +$txt['theme_install_dir'] = 'Из директории на сервере'; +$txt['theme_install_error'] = 'Эта директория темы не существует или не содержит тему!'; +$txt['theme_install_write_error'] = 'Директория темы должна быть записываема для продолжения!'; +$txt['theme_install_go'] = 'Установитьl!'; +$txt['theme_install_new'] = 'Создать копию темы по умолчанию и назвать ее'; +$txt['theme_install_new_confirm'] = 'Установить новую тему?'; +$txt['theme_install_writable'] = 'Внимание - Вы не можете создать или установить новую тему, так как Ваша директория для тем не записываема!'; +$txt['theme_installed'] = 'Успешно Установлена'; +$txt['theme_installed_message'] = 'была успешно установлена.'; + +$txt['theme_latest'] = 'Последние и Лучшие Темы'; +$txt['theme_latest_fetch'] = 'Заманиваем последние темы с www.simplemachines.org...'; + +$txt['theme_pick'] = 'Выбрать тему...'; +$txt['theme_preview'] = 'просмотр »'; +$txt['theme_set'] = 'использовать эту тему'; +$txt['theme_user'] = 'человек использует эту тему.'; +$txt['theme_users'] = 'людей использует эту тему.'; + +$txt['theme_edit'] = 'Редактировать Тему'; +$txt['theme_edit_style'] = 'Измените файл style.css. (цвета, шрифты и т.д.)'; +$txt['theme_edit_index'] = 'Измените шаблон главной страницы. (главный шаблон)'; +$txt['theme_edit_no_save'] = 'Этот файл не может быть сохранен, так как он не записываемый! Пожалуйста, убедитесь, что следующий файл CHMOD 777 или имеет соответствующие возможности'; +$txt['theme_edit_save'] = 'Сохранить Изменения'; + +$txt['theme_global_description'] = 'Это тема по умолчанию, это значит, что тема будет изменяться вместе с настройками администратора и форумом, который Вы смотрите.'; + +$txt['theme5'] = 'URLы Темы и Конфигурация'; +$txt['theme6'] = 'Опции и Предпочтения Темы'; +$txt['actual_theme_name'] = 'Название этой темы: '; +$txt['actual_theme_dir'] = 'Директория этой темы: '; +$txt['actual_theme_url'] = 'URL этой темы: '; +$txt['actual_images_url'] = 'URL картинок этой темы: '; + +$txt['additional_options_collapsable'] = 'Включить разделяющиеся дополнительные опции сообщения'; +$txt['allow_no_censored'] = 'Позволять пользователям отключать цензуру слов?'; +$txt['who_display_viewing'] = 'Показывать, кто смотрит страницу форума и сообщения'; +$txt['who_display_viewing_off'] = 'Не показывать'; +$txt['who_display_viewing_numbers'] = 'Показывать только количество'; +$txt['who_display_viewing_names'] = 'Показывать имена участников'; +$txt['smf93'] = 'Отключить недавние сообщения'; +$txt['smf94'] = 'Включить одиночное сообщение'; +$txt['smf95'] = 'Включить множественные сообщения'; +$txt['smf105'] = 'Включить однострочные ссылки'; +$txt['smf106'] = 'Включив эту опцию, Ваше текущее положение будет показываться в одну линию, вместо древовидной структуры.'; +$txt['smf200'] = 'Включить стиль SP1 статистики на странице форума'; +$txt[382] = 'Показывать последних участников на странице форума'; +$txt[383] = 'Показывать последнюю дату изменения в измененных сообщениях'; +$txt[384] = 'Показывать аватары пользователей при просмотре сообщений'; +$txt[385] = 'Показывать личный текст при просмотре сообщений'; +$txt[386] = 'Показывать пол при просмотре сообщений'; +$txt[387] = 'Показывать новостную панель на главной странице форума'; +$txt[510] = 'Показывать бар списка пользователей на главной странице форума?'; +$txt[522] = 'Показывать текущую позицию на форуме как ссылку, вместо текста?'; +$txt[523] = 'Показывать кнопку просмотра профиля под сообщением?'; +$txt[618] = 'Включить и отображать \'Отметить как Прочтенное\' кнопки?'; +$txt['number_recent_posts'] = 'Количество недавних сообщений, отображаемых на главной странице форума:'; +$txt['number_recent_posts_desc'] = 'Чтобы отключить бар недавних сообщений, установите это значение на ноль.'; +$txt['hide_post_group'] = 'Скрывать групповые титулы для участников групп?'; +$txt['hide_post_group_desc'] = 'Включив это, не будет отображаться групповой титул в сообщениях участников при просмотре сообщения, если они прикреплены к группе не зависящей от количества сообщений.'; + +$txt['theme_options_reset_link'] = 'Сбросить специальные опции участника для всех участников.'; +$txt['theme_options_reset'] = 'Сбрасываются опции для всех. Для изменения опции, сначала проверьте опции справа. Это обозначает, что для всех данная опция должна быть изменена. Потом, выберите, какой должна быть опция. Если первая ячейка не отмечена, опция останется, той же для всех участников.'; +$txt['theme_options_defaults_link'] = 'Измените первоначальные специальные опции участника.'; +$txt['theme_options_defaults'] = 'Это значения по умолчанию для некоторых специальных настроек участника. Эти изменения затронут только новых пользователей и гостей.'; +$txt['theme_options_title'] = 'Измените или сбросьте значения по умолчанию'; +$txt['theme_settings_link'] = 'Назад в основные настройки этой темы. (сохраните сперва!)'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Who.english.php b/Themes/default/languages/Who.english.php new file mode 100644 index 0000000..d1c09dc --- /dev/null +++ b/Themes/default/languages/Who.english.php @@ -0,0 +1,102 @@ +Nothing, or nothing you can see...'; +$txt['who_unknown'] = 'Unknown Action'; +$txt['who_user'] = 'User'; +$txt['who_time'] = 'Time'; +$txt['who_action'] = 'Action'; + +$txt['whoall_activate'] = 'Activating their account.'; +$txt['whoall_help'] = 'Viewing the help page.'; +$txt['whoall_helpadmin'] = 'Viewing the admin help pages.'; +$txt['whoall_pm'] = 'Viewing their messages.'; +$txt['whoall_login'] = 'Logging into the forum.'; +$txt['whoall_login2'] = 'Logging into the forum.'; +$txt['whoall_logout'] = 'Logging out of the forum.'; +$txt['whoall_markasread'] = 'Marking topics read.'; +$txt['whoall_news'] = 'Viewing the news.'; +$txt['whoall_notify'] = 'Changing their notification settings.'; +$txt['whoall_notifyboard'] = 'Changing their notification settings.'; +$txt['whoall_recent'] = 'Viewing a list of recent topics.'; +$txt['whoall_register'] = 'Registering for an account on the forum.'; +$txt['whoall_register2'] = 'Registering for an account on the forum.'; +$txt['whoall_reminder'] = 'Requesting a password reminder.'; +$txt['whoall_repottm'] = 'Reporting a topic to a moderator.'; +$txt['whoall_spellcheck'] = 'Using the spellchecker'; +$txt['whoall_unread'] = 'Viewing unread topics since their last visit.'; +$txt['whoall_unreadreplies'] = 'Viewing unread replies since their last visit.'; +$txt['whoall_who'] = 'Viewing Who\'s Online.'; +$txt['whoall_.xml'] = 'Viewing an XML feed.'; + +$txt['whoadmin_viewkarma'] = 'Viewing Karmachange Description log.'; +$txt['whoall_modifykarma'] = 'Changing karma.'; + +$txt['whoall_googlemap'] = 'Viewing the Member Map.'; +$txt['whoall_.kml'] = 'Viewing the Google Earth Feed.'; + +$txt['whoall_collapse_collapse'] = 'Collapsing a category.'; +$txt['whoall_collapse_expand'] = 'Expanding a category.'; +$txt['whoall_pm_removeall'] = 'Removing all their messages.'; +$txt['whoall_pm_send'] = 'Sending a message.'; +$txt['whoall_pm_send2'] = 'Sending a message.'; + +$txt['whotopic_dlattach'] = 'Viewing an attachment.'; +$txt['whotopic_editpoll'] = 'Editing the poll in "%s".'; +$txt['whotopic_mergetopics'] = 'Merging the topic "%s" with another topic.'; +$txt['whotopic_movetopic'] = 'Moving the topic "%s" to another board.'; +$txt['whotopic_post'] = 'Posting in %s.'; +$txt['whotopic_post2'] = 'Posting in %s.'; +$txt['whotopic_printpage'] = 'Printing the topic "%s".'; +$txt['whotopic_splittopics'] = 'Splitting the topic "%s" into two topics.'; +$txt['whotopic_vote'] = 'Voting in %s.'; + +$txt['whopost_quotefast'] = 'Quoting a post from "%s".'; + +$txt['whoadmin_detailedversion'] = 'Doing a detailed version check.'; +$txt['whoadmin_dumpdb'] = 'Backing up the database to file.'; +$txt['whoadmin_editagreement'] = 'Editing the registration agreement.'; +$txt['whoadmin_modifyModSettings'] = 'Editing forum features and options.'; +$txt['whoadmin_modifyModSettings2'] = 'Editing forum features and options.'; +$txt['whoadmin_modlog'] = 'Viewing the moderator log.'; +$txt['whoadmin_modsettings'] = 'Editing the forum settings.'; +$txt['whoadmin_packageget'] = 'Getting packages.'; +$txt['whoadmin_packages'] = 'Viewing the package manager.'; +$txt['whoadmin_permissions'] = 'Editing the forum permissions.'; +$txt['whoadmin_pgadd'] = 'Adding a package.'; +$txt['whoadmin_pgbrowse'] = 'Browsing the package server.'; +$txt['whoadmin_pgdownload'] = 'Downloading a package.'; +$txt['whoadmin_pgremove'] = 'Removing a package.'; +$txt['whoadmin_theme'] = 'Editing the theme settings.'; +$txt['whoadmin_trackip'] = 'Tracking an IP address.'; + +$txt['whoallow_manageboards'] = 'Editing the board and category settings.'; +$txt['whoallow_admin'] = 'Viewing the admin page.'; +$txt['whoallow_ban'] = 'Editing the ban list.'; +$txt['whoallow_boardrecount'] = 'Recounting the forum totals.'; +$txt['whoallow_calendar'] = 'Viewing the calendar.'; +$txt['whoallow_editnews'] = 'Editing the news.'; +$txt['whoallow_mailing'] = 'Sending a forum email.'; +$txt['whoallow_maintain'] = 'Performing routine forum maintenance.'; +$txt['whoallow_manageattachments'] = 'Managing the attachments.'; +$txt['whoallow_mlist'] = 'Viewing the memberlist.'; +$txt['whoallow_optimizetables'] = 'Optimizing the database tables.'; +$txt['whoallow_repairboards'] = 'Repairing the database tables.'; +$txt['whoallow_search'] = 'Searching the forum.'; +$txt['whoallow_search2'] = 'Viewing the results of a search.'; +$txt['whoallow_sendtopic'] = 'Sending a topic to a friend.'; +$txt['whoallow_setcensor'] = 'Editing the censor text.'; +$txt['whoallow_setreserve'] = 'Editing the reserved names.'; +$txt['whoallow_stats'] = 'Viewing the forum stats.'; +$txt['whoallow_viewErrorLog'] = 'Viewing the error log.'; +$txt['whoallow_viewmembers'] = 'Viewing a list of members.'; + +$txt['who_topic'] = 'Viewing the topic %s.'; +$txt['who_board'] = 'Viewing the board %s.'; +$txt['who_index'] = 'Viewing the board index of ' . $context['forum_name'] . '.'; +$txt['who_viewprofile'] = 'Viewing %s\'s profile.'; +$txt['who_profile'] = 'Editing the profile of %s.'; +$txt['who_post'] = 'Posting a new topic in %s.'; +$txt['who_poll'] = 'Posting a new poll in %s.'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/Who.russian.php b/Themes/default/languages/Who.russian.php new file mode 100644 index 0000000..f1bbb13 --- /dev/null +++ b/Themes/default/languages/Who.russian.php @@ -0,0 +1,101 @@ +Ничего, или ничего что Вы можете видеть...'; +$txt['who_unknown'] = 'Неизвестное Действие'; +$txt['who_user'] = 'Пользователь'; +$txt['who_time'] = 'Время'; +$txt['who_action'] = 'Действие'; + +$txt['whoall_activate'] = 'Активирует свой аккаунт.'; +$txt['whoall_help'] = 'Смотрит страницу помощи.'; +$txt['whoall_helpadmin'] = 'Смотрит страницу помощи администрирования.'; +$txt['whoall_pm'] = 'Смотрит свои личные сообщения.'; +$txt['whoall_login'] = 'Входит на форум.'; +$txt['whoall_login2'] = 'Входит на форум.'; +$txt['whoall_logout'] = 'Выходит с форума.'; +$txt['whoall_markasread'] = 'Помечает темы как прочитанные.'; +$txt['whoall_news'] = 'Смотрит новости.'; +$txt['whoall_notify'] = 'Изменяет свои настройки извещений.'; +$txt['whoall_notifyboard'] = 'Изменяет свои настройки извещений.'; +$txt['whoall_recent'] = 'Смотрит список недавних сообщений.'; +$txt['whoall_register'] = 'Регистрирует аккаунт на форуме.'; +$txt['whoall_register2'] = 'Регистрирует аккаунт на форуме.'; +$txt['whoall_reminder'] = 'Запрашивает восстановление пароля.'; +$txt['whoall_repottm'] = 'Сообщает о теме модератору.'; +$txt['whoall_spellcheck'] = 'Проверяет орфографию'; +$txt['whoall_unread'] = 'Смотрит нечитанные темы с даты последнего посещения.'; +$txt['whoall_unreadreplies'] = 'Смотрит нечитанные ответы с даты последнего посещения.'; +$txt['whoall_who'] = 'Смотрит Кто Online.'; +$txt['whoall_.xml'] = 'Смотрит XML данные.'; + +$txt['whoall_collapse_collapse'] = 'Разбивает категорию.'; +$txt['whoall_collapse_expand'] = 'Расширяет категорию.'; +$txt['whoall_pm_removeall'] = 'Удаляет все свои сообщения.'; +$txt['whoall_pm_send'] = 'Отправляет личное сообщение.'; +$txt['whoall_pm_send2'] = 'Отправляет личное сообщение.'; + +$txt['whotopic_dlattach'] = 'Смотрит вложение.'; +$txt['whotopic_editpoll'] = 'Редактирует опрос в "%s".'; +$txt['whotopic_mergetopics'] = 'Соединяет тему "%s" с другой темой.'; +$txt['whotopic_movetopic'] = 'Перемещает тему "%s" на другой форум.'; +$txt['whotopic_post'] = 'Пишет сообщение в %s.'; +$txt['whotopic_post2'] = 'Пишет сообщение в %s.'; +$txt['whotopic_printpage'] = 'Печатает тему "%s".'; +$txt['whotopic_splittopics'] = 'Разделяет тему "%s" на две темы.'; +$txt['whotopic_vote'] = 'Голосует в %s.'; + +$txt['whopost_quotefast'] = 'Цитирует сообщение из "%s".'; + +$txt['whoadmin_detailedversion'] = 'Делает детальную проверку версии.'; +$txt['whoadmin_dumpdb'] = 'Делает бекап Базы Данных в файл.'; +$txt['whoadmin_editagreement'] = 'Редактирует регистрационное соглашение.'; +$txt['whoadmin_modifyModSettings'] = 'Редактирует настройки и опции форума.'; +$txt['whoadmin_modifyModSettings2'] = 'Редактирует настройки и опции форума.'; +$txt['whoadmin_modlog'] = 'Просматривает лог модерирования.'; +$txt['whoadmin_modsettings'] = 'Редактирует настройки форума.'; +$txt['whoadmin_packageget'] = 'Получает пакеты.'; +$txt['whoadmin_packages'] = 'Смотрит менеджер пакетов.'; +$txt['whoadmin_permissions'] = 'Редактирует права на форума.'; +$txt['whoadmin_pgadd'] = 'Добавляет пакет.'; +$txt['whoadmin_pgbrowse'] = 'Просматривает сервер пакетов.'; +$txt['whoadmin_pgdownload'] = 'Загружает пакет.'; +$txt['whoadmin_pgremove'] = 'Удаляет пакет.'; +$txt['whoadmin_theme'] = 'Редактирует настройки темы.'; +$txt['whoadmin_trackip'] = 'Отслеживает IP адрес.'; + +$txt['whoallow_manageboards'] = 'Редактирует настройки форума и категорий.'; +$txt['whoallow_admin'] = 'Смотрит страницу администрирования.'; +$txt['whoallow_ban'] = 'Редактирует список бана.'; +$txt['whoallow_boardrecount'] = 'Пересчитывает данные форума.'; +$txt['whoallow_calendar'] = 'Смотрит календарь.'; +$txt['whoallow_editnews'] = 'Редактирует новости.'; +$txt['whoallow_mailing'] = 'Отправляет email с форума.'; +$txt['whoallow_maintain'] = 'Выполняет рутинную техподдержку.'; +$txt['whoallow_manageattachments'] = 'Управляет вложениями.'; +$txt['whoallow_mlist'] = 'Смотрит список участников.'; +$txt['whoallow_optimizetables'] = 'Оптимизирует таблицы базы данных.'; +$txt['whoallow_repairboards'] = 'Чинит таблицы базы данных.'; +$txt['whoallow_search'] = 'Ищет на форуме.'; +$txt['whoallow_search2'] = 'Смотрит результаты поиска.'; +$txt['whoallow_sendtopic'] = 'Отправляет тему другу.'; +$txt['whoallow_setcensor'] = 'Редактирует текст цензуры.'; +$txt['whoallow_setreserve'] = 'Редактирует зарезервированные имена.'; +$txt['whoallow_stats'] = 'Смотрит статистику форума.'; +$txt['whoallow_viewErrorLog'] = 'Смотрит лог ошибок.'; +$txt['whoallow_viewmembers'] = 'Смотрит список участников.'; + +$txt['who_topic'] = 'Смотрит тему %s.'; +$txt['who_board'] = 'Смотрит форум %s.'; +$txt['who_index'] = 'Смотрит главную страницу форума ' . $context['forum_name'] . '.'; +$txt['who_viewprofile'] = 'Смотрит профиль участника %s.'; +$txt['who_profile'] = 'Редактирует профиль %s.'; +$txt['who_post'] = 'Создает новую тему в разделе %s.'; +$txt['who_poll'] = 'Создает новый опрос в разделе %s.'; + +$txt['whoall_googlemap'] = 'Viewing the Member Map.'; + +$txt['whoadmin_viewkarma'] = 'viewing karmachange description log.'; +$txt['whoall_modifykarma'] = 'changing karma.'; + +?> diff --git a/Themes/default/languages/Wireless.english.php b/Themes/default/languages/Wireless.english.php new file mode 100644 index 0000000..cf0708e --- /dev/null +++ b/Themes/default/languages/Wireless.english.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/Themes/default/languages/Wireless.russian.php b/Themes/default/languages/Wireless.russian.php new file mode 100644 index 0000000..8cd0d02 --- /dev/null +++ b/Themes/default/languages/Wireless.russian.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/Themes/default/languages/index.english.php b/Themes/default/languages/index.english.php new file mode 100644 index 0000000..cd1a773 --- /dev/null +++ b/Themes/default/languages/index.english.php @@ -0,0 +1,647 @@ + 'January'. (or translated, of course.) +$months = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); +$months_short = array(1 => 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); + +$txt['newmessages0'] = 'is new'; +$txt['newmessages1'] = 'are new'; +$txt['newmessages3'] = 'New'; +$txt['newmessages4'] = ','; + +$txt[2] = 'Admin'; + +$txt[10] = 'Save'; + +$txt[17] = 'Modify'; +$txt[18] = $context['forum_name'] . ' - Index'; +$txt[19] = 'Members'; +$txt[20] = 'Board name'; +$txt[21] = 'Posts'; +$txt[22] = 'Last post'; + +$txt[24] = '(No subject)'; +$txt[26] = 'Posts'; +$txt[27] = 'View Profile'; +$txt[28] = 'Guest'; +$txt[29] = 'Author'; +$txt[30] = 'on'; +$txt[31] = 'Remove'; +$txt[33] = 'Start new topic'; + +$txt[34] = 'Login'; +$txt[35] = 'Username'; +$txt[36] = 'Password'; + +$txt[40] = 'That username does not exist.'; + +$txt[62] = 'Board Moderator'; +$txt[63] = 'Remove Topic'; +$txt[64] = 'Topics'; +$txt[66] = 'Modify message'; +$txt[68] = 'Name'; +$txt[69] = 'Email'; +$txt[70] = 'Subject'; +$txt[72] = 'Message'; + +$txt[79] = 'Edit Profile'; + +$txt[81] = 'Choose password'; +$txt[82] = 'Verify password'; +$txt[87] = 'Position'; + +$txt[92] = 'View the profile of'; +$txt[94] = 'Total'; +$txt[95] = 'Posts'; +$txt[96] = 'Website'; +$txt[97] = 'Register'; + +$txt[101] = 'Message Index'; +$txt[102] = 'News'; +$txt[103] = 'Home'; + +$txt[104] = 'Lock/Unlock Topic'; +$txt[105] = 'Post'; +$txt[106] = 'An Error Has Occurred!'; +$txt[107] = 'at'; +$txt[108] = 'Logout'; +$txt[109] = 'Started by'; +$txt[110] = 'Replies'; +$txt[111] = 'Last post'; +$txt[114] = 'Administration Login'; +$txt[118] = 'Topic'; +$txt[119] = 'Help'; +$txt[121] = 'Remove message'; +$txt[125] = 'Notify'; +$txt[126] = 'Do you want a notification email if someone replies to this topic?'; +$txt[130] = "Regards,\nThe " . $context['forum_name'] . ' Team.'; +$txt[131] = 'Notify of replies'; +$txt[132] = 'Move Topic'; +$txt[133] = 'Move to'; +$txt[139] = 'Pages'; +$txt[140] = 'Users active in past ' . $modSettings['lastActive'] . ' minutes'; +$txt[144] = 'Personal Messages'; +$txt[145] = 'Reply with quote'; +$txt[146] = 'Reply'; + +$txt[151] = 'No messages...'; +$txt[152] = 'you have'; +$txt[153] = 'messages'; +$txt[154] = 'Remove this message'; + +$txt[158] = 'Users Online'; +$txt[159] = 'Personal Message'; +$txt[160] = 'Jump to'; +$txt[161] = 'go'; +$txt[162] = 'Are you sure you want to remove this topic?'; +$txt[163] = 'Yes'; +$txt[164] = 'No'; + +$txt[166] = 'Search Results'; +$txt[167] = 'End of results'; +$txt[170] = 'Sorry, no matches were found'; +$txt[176] = 'on'; + +$txt[182] = 'Search'; +$txt[183] = 'Set Search Parameters'; +$txt[189] = 'Choose a board to search in, or search all'; +$txt[190] = 'All'; + +$txt[193] = 'Back'; +$txt[194] = 'reminder'; +$txt[195] = 'Topic started by'; +$txt[196] = 'Title'; +$txt[197] = 'Post by'; +$txt[200] = 'Searchable list of all registered members.'; +$txt[201] = 'Please welcome'; +$txt[208] = 'Administration Center'; +$txt[209] = 'I\'m a llama!'; +$txt[211] = 'Last Edit'; +$txt[212] = 'Would you like to deactivate Notification on this topic?'; + +$txt[214] = 'Recent Posts'; + +$txt[227] = 'Location'; +$txt[231] = 'Gender'; +$txt[233] = 'Date Registered'; + +$txt[234] = 'View the 10 most recent posts on the forum.'; +$txt[235] = 'is the most recently updated topic'; +$txt[236] = 'Return'; +$txt[237] = 'to the board index.'; + +$txt[238] = 'Male'; +$txt[239] = 'Female'; + +$txt[240] = 'Invalid character used in Username.'; + +$txt['welcome_guest'] = 'Welcome, ' . $txt[28] . '. Please login or register.'; +$txt['welcome_guest_activate'] = '
    Did you miss your activation email?'; +$txt['hello_member'] = 'Hey,'; +$txt['hello_guest'] = 'Welcome,'; +$txt[247] = 'Hey,'; +$txt[248] = 'Welcome,'; +$txt[249] = 'Please'; +$txt[250] = 'Back'; +$txt[251] = 'Please select a destination'; + +$txt[279] = 'Posted by'; + +$txt[287] = 'Smiley'; +$txt[288] = 'Angry'; +$txt[289] = 'Cheesy'; +$txt[290] = 'Laugh'; +$txt[291] = 'Sad'; +$txt[292] = 'Wink'; +$txt[293] = 'Grin'; +$txt[294] = 'Shocked'; +$txt[295] = 'Cool'; +$txt[296] = 'Huh'; +$txt[450] = 'Roll Eyes'; +$txt[451] = 'Tongue'; +$txt[526] = 'Embarrassed'; +$txt[527] = 'Lips sealed'; +$txt[528] = 'Undecided'; +$txt[529] = 'Kiss'; +$txt[530] = 'Cry'; + +$txt[298] = 'Moderator'; +$txt[299] = 'Moderators'; + +$txt[300] = 'Mark Topics as Read for this Board'; +$txt[301] = 'Views'; +$txt[302] = 'New'; + +$txt[303] = 'View All Users'; +$txt[305] = 'View'; +$txt[307] = 'Email'; + +$txt[308] = 'Viewing Members'; +$txt[309] = 'of'; +$txt[310] = 'total members'; +$txt[311] = 'to'; +$txt[315] = 'Forgot your password?'; + +$txt[317] = 'Date'; +$txt[318] = 'From'; +$txt[319] = 'Subject'; +$txt[322] = 'Check for new messages'; +$txt[324] = 'To'; + +$txt[330] = 'Topics'; +$txt[331] = 'Members'; +$txt[332] = 'Members List'; +$txt[333] = 'New Posts'; +$txt[334] = 'No New Posts'; + +$txt['sendtopic_send'] = 'Send'; +$txt[343] = 'Match all words'; +$txt[344] = 'Match any words'; + +$txt[371] = 'Time Offset'; +$txt[377] = 'or'; + +$txt[398] = 'Sorry, no matches were found'; + +$txt[418] = 'Notification'; + +$txt[430] = 'Sorry %s, you are banned from using this forum!'; + +$txt[452] = 'Mark ALL messages as read'; + +$txt[454] = 'Hot Topic (More than ' . $modSettings['hotTopicPosts'] . ' Replies)'; +$txt[455] = 'Very Hot Topic (More than ' . $modSettings['hotTopicVeryPosts'] . ' Replies)'; +$txt[456] = 'Locked Topic'; +$txt[457] = 'Normal Topic'; +$txt['participation_caption'] = 'Topic you have posted in'; + +$txt[462] = 'GO'; + +$txt[465] = 'Print'; +$txt[467] = 'Profile'; +$txt[468] = 'Topic Summary'; +$txt[470] = 'N/A'; +$txt[471] = 'message'; +$txt[473] = 'This name is already in use by another member.'; + +$txt[488] = 'Total Members'; +$txt[489] = 'Total Posts'; +$txt[490] = 'Total Topics'; + +$txt[497] = 'Minutes to stay logged in'; + +$txt[507] = 'Preview'; +$txt[508] = 'Always stay logged in'; + +$txt[511] = 'Logged'; +$txt[512] = 'IP'; + +$txt[513] = 'ICQ'; +$txt[515] = 'WWW'; + +$txt[525] = 'by'; + +$txt[578] = 'hours'; +$txt[579] = 'days'; + +$txt[581] = ', our newest member.'; + +$txt[582] = 'Search for'; +$txt[583] = 'by user'; + +$txt[603] = 'AIM'; +// In this string, please use +'s for spaces. +$txt['aim_default_message'] = 'Hi.+Are+you+there?'; +$txt[604] = 'YIM'; + +$txt[616] = 'Remember, this forum is in \'Maintenance Mode\'.'; + +$txt[641] = 'Read'; +$txt[642] = 'times'; + +$txt[645] = 'Forum Stats'; +$txt[656] = 'Latest Member'; +$txt[658] = 'Total Categories'; +$txt[659] = 'Latest Post'; + +$txt[660] = 'You\'ve got'; +$txt[661] = 'Click'; +$txt[662] = 'here'; +$txt[663] = 'to view them.'; + +$txt[665] = 'Total Boards'; + +$txt[668] = 'Print Page'; + +$txt[679] = 'This must be a valid email address.'; + +$txt[683] = 'I am a geek!!'; +$txt[685] = $context['forum_name'] . ' - Info Center'; + +$txt[707] = 'Send this topic'; + +$txt['sendtopic_title'] = 'Send the topic "%s" to a friend.'; +$txt['sendtopic_dear'] = 'Dear %s,'; +$txt['sendtopic_this_topic'] = 'I want you to check out "%s" on ' . $context['forum_name'] . '. To view it, please click this link'; +$txt['sendtopic_thanks'] = 'Thanks'; +$txt['sendtopic_sender_name'] = 'Your name'; +$txt['sendtopic_sender_email'] = 'Your email address'; +$txt['sendtopic_receiver_name'] = 'Recipient\'s name'; +$txt['sendtopic_receiver_email'] = 'Recipient\'s email address'; +$txt['sendtopic_comment'] = 'Add a comment'; +$txt['sendtopic2'] = 'A comment has also been added regarding this topic'; + +$txt[721] = 'Hide email address from public?'; + +$txt[737] = 'Check all'; + +$txt[1001] = 'Database Error'; +$txt[1002] = 'Please try again. If you come back to this error screen, report the error to an administrator.'; +$txt[1003] = 'File'; +$txt[1004] = 'Line'; +$txt[1005] = 'SMF has detected and automatically tried to repair an error in your database. If you continue to have problems, or continue to receive these emails, please contact your host.'; +$txt['database_error_versions'] = 'Note: It appears that your database may require an upgrade. Your forum files are currently at version ' . $forum_version . ', whereas your database is at version SMF ' . $modSettings['smfVersion'] . '. It is recommended that you execute the latest version of upgrade.php.'; +$txt['template_parse_error'] = 'Template Parse Error!'; +$txt['template_parse_error_message'] = 'It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

    You can also try refreshing this page.'; +$txt['template_parse_error_details'] = 'There was a problem loading the %1$s template or language file. Please check the syntax and try again - remember, single quotes (\') often have to be escaped with a slash (\\). To see more specific error information from PHP, try accessing the file directly.

    You may want to try to refresh this page or use the default theme.'; + +$txt['smf10'] = 'Today at '; +$txt['smf10b'] = 'Yesterday at '; +$txt['smf20'] = 'Post new poll'; +$txt['smf21'] = 'Question'; +$txt['smf23'] = 'Submit Vote'; +$txt['smf24'] = 'Total Votes'; +$txt['smf25'] = 'shortcuts: hit alt+s to submit/post or alt+p to preview'; +$txt['smf29'] = 'View results.'; +$txt['smf30'] = 'Lock Voting'; +$txt['smf30b'] = 'Unlock Voting'; +$txt['smf39'] = 'Edit Poll'; +$txt['smf43'] = 'Poll'; +$txt['smf47'] = '1 Day'; +$txt['smf48'] = '1 Week'; +$txt['smf49'] = '1 Month'; +$txt['smf50'] = 'Forever'; +$txt['smf52'] = 'Login with username, password and session length'; +$txt['smf53'] = '1 Hour'; +$txt['smf56'] = 'MOVED'; +$txt['smf57'] = 'Please enter a brief description as to
    why this topic is being moved.'; +$txt['smf60'] = 'Sorry, you don\'t have enough posts to modify karma - you need at least '; +$txt['smf62'] = 'Sorry, you can\'t repeat a karma action without waiting '; +$txt['smf82'] = 'Board'; +$txt['smf88'] = 'in'; +$txt['smf96'] = 'Sticky Topic'; + +$txt['smf138'] = 'Delete'; + +$txt['smf199'] = 'Your Personal Messages'; + +$txt['smf211'] = 'KB'; + +$txt['smf223'] = '[More Stats]'; + +$txt['smf238'] = 'Code'; +$txt['smf239'] = 'Quote from'; +$txt['smf240'] = 'Quote'; + +$txt['smf251'] = 'Split Topic'; +$txt['smf252'] = 'Merge Topics'; +$txt['smf252lnk'] = 'Link Topics'; +$txt['smf254'] = 'Subject For New Topic'; +$txt['smf255'] = 'Only split this post.'; +$txt['smf256'] = 'Split topic after and including this post.'; +$txt['smf257'] = 'Select posts to split.'; +$txt['smf258'] = 'New Topic'; +$txt['smf259'] = 'Topic successfully split into two topics.'; +$txt['smf260'] = 'Origin Topic'; +$txt['smf261'] = 'Please select which posts you wish to split.'; +$txt['smf264'] = 'Topics successfully merged.'; +$txt['smf265'] = 'Newly Merged Topic'; +$txt['smf266'] = 'Topic to be merged'; +$txt['smf267'] = 'Target board'; +$txt['smf269'] = 'Target topic'; +$txt['smf274'] = 'Are you sure you want to merge'; +$txt['smf275'] = 'with'; +$txt['smf276'] = 'This function will merge the messages of two topics into one topic. The messages will be sorted according to the time of posting. Therefore the earliest posted message will be the first message of the merged topic.'; + +$txt['smf277'] = 'Set topic sticky'; +$txt['smf278'] = 'Set topic non-sticky'; +$txt['smf279'] = 'Lock topic'; +$txt['smf280'] = 'Unlock topic'; + +$txt['smf298'] = 'Advanced search'; + +$txt['smf299'] = 'MAJOR SECURITY RISK:'; +$txt['smf300'] = 'You have not removed '; + +$txt['smf301'] = 'Page created in '; +$txt['smf302'] = ' seconds with '; +$txt['smf302b'] = ' queries.'; + +$txt['smf315'] = 'Use this function to inform the moderators and administrators of an abusive or wrongly posted message.
    Please note that your email address will be revealed to the moderators if you use this.'; + +$txt['online2'] = 'Online'; +$txt['online3'] = 'Offline'; +$txt['online4'] = 'Personal Message (Online)'; +$txt['online5'] = 'Personal Message (Offline)'; +$txt['online8'] = 'Status'; + +$txt['topbottom4'] = 'Go Up'; +$txt['topbottom5'] = 'Go Down'; + +$forum_copyright = $context['forum_name'] . ' | Powered by ' . $forum_version . '.
    +© 2001-2005, Lewis Media. All Rights Reserved.'; + +$txt['calendar3'] = 'Birthdays:'; +$txt['calendar4'] = 'Events:'; +$txt['calendar3b'] = 'Upcoming Birthdays:'; +$txt['calendar4b'] = 'Upcoming Events:'; +$txt['calendar5'] = ''; // Prompt for holidays in the calendar, leave blank to just display the holiday's name. +$txt['calendar9'] = 'Month:'; +$txt['calendar10'] = 'Year:'; +$txt['calendar11'] = 'Day:'; +$txt['calendar12'] = 'Event Title:'; +$txt['calendar13'] = 'Post In:'; +$txt['calendar20'] = 'Edit Event'; +$txt['calendar21'] = 'Delete this event?'; +$txt['calendar22'] = 'Delete Event'; +$txt['calendar23'] = 'Post Event'; +$txt['calendar24'] = 'Calendar'; +$txt['calendar37'] = 'Link to Calendar'; +$txt['calendar43'] = 'Link Event'; +$txt['calendar47'] = 'Upcoming Calendar'; +$txt['calendar47b'] = 'Today\'s Calendar'; +$txt['calendar51'] = 'Week'; +$txt['calendar54'] = 'Number of Days:'; +$txt['calendar_how_edit'] = 'how do you edit these events?'; + +$txt['moveTopic1'] = 'Post a redirection topic'; +$txt['moveTopic2'] = 'Change the topic\'s subject'; +$txt['moveTopic3'] = 'New subject'; +$txt['moveTopic4'] = 'Change every message\'s subject'; + +$txt['theme_template_error'] = 'Unable to load the \'%s\' template.'; +$txt['theme_language_error'] = 'Unable to load the \'%s\' language file.'; + +$txt['parent_boards'] = 'Child Boards'; + +$txt['smtp_no_connect'] = 'Could not connect to SMTP host'; +$txt['smtp_bad_response'] = 'Couldn\'t get mail server response codes'; +$txt['smtp_error'] = 'Ran into problems sending Mail. Error: '; +$txt['mail_send_unable'] = 'Unable to send mail to the email address \'%s\''; + +$txt['mlist_search'] = 'Search for users'; +$txt['mlist_search2'] = 'Search again'; +$txt['mlist_search_email'] = 'Search by email address'; +$txt['mlist_search_messenger'] = 'Search by messenger nickname'; +$txt['mlist_search_group'] = 'Search by position'; +$txt['mlist_search_name'] = 'Search by name'; +$txt['mlist_search_website'] = 'Search by website'; +$txt['mlist_search_results'] = 'Search results for'; + +$txt['attach_downloaded'] = 'downloaded'; +$txt['attach_viewed'] = 'viewed'; +$txt['attach_times'] = 'times'; + +$txt['MSN'] = 'MSN'; + +$txt['never'] = 'Never'; + +$txt['hostname'] = 'Hostname'; +$txt['you_are_post_banned'] = 'Sorry %s, you are banned from posting or sending personal messages on this forum.'; +$txt['ban_reason'] = 'Reason'; + +$txt['tables_optimized'] = 'Database tables optimized'; + +$txt['add_poll'] = 'Add poll'; +$txt['poll_options6'] = 'You may only select up to %s options.'; +$txt['poll_remove'] = 'Remove Poll'; +$txt['poll_remove_warn'] = 'Are you sure you want to remove this poll from the topic?'; +$txt['poll_results_expire'] = 'Results will be shown when voting has closed'; +$txt['poll_expires_on'] = 'Voting closes'; +$txt['poll_expired_on'] = 'Voting closed'; +$txt['poll_change_vote'] = 'Remove Vote'; + +$txt['quick_mod_remove'] = 'Remove selected'; +$txt['quick_mod_lock'] = 'Lock selected'; +$txt['quick_mod_sticky'] = 'Sticky selected'; +$txt['quick_mod_move'] = 'Move selected to'; +$txt['quick_mod_merge'] = 'Merge selected'; +$txt['quick_mod_go'] = 'Go!'; +$txt['quickmod_confirm'] = 'Are you sure you want to do this?'; + +$txt['spell_check'] = 'Spell Check'; + +$txt['quick_reply_1'] = 'Quick Reply'; +$txt['quick_reply_2'] = 'With a Quick-Reply you can use bulletin board code and smileys as you would in a normal post, but much more conveniently.'; +$txt['quick_reply_warning'] = 'Warning: this topic is currently locked!
    Only admins and moderators can reply.'; + +$txt['notification_enable_board'] = 'Are you sure you wish to enable notification of new topics for this board?'; +$txt['notification_disable_board'] = 'Are you sure you wish to disable notification of new topics for this board?'; +$txt['notification_enable_topic'] = 'Are you sure you wish to enable notification of new replies for this topic?'; +$txt['notification_disable_topic'] = 'Are you sure you wish to disable notification of new replies for this topic?'; + +$txt['rtm1'] = 'Report to moderator'; + +$txt['unread_topics_visit'] = 'Recent Unread Topics'; +$txt['unread_topics_visit_none'] = 'No unread topics found since your last visit. Click here to try all unread topics.'; +$txt['unread_topics_all'] = 'All Unread Topics'; +$txt['unread_replies'] = 'Updated Topics'; + +$txt['who_title'] = 'Who\'s Online'; +$txt['who_and'] = ' and '; +$txt['who_viewing_topic'] = ' are viewing this topic.'; +$txt['who_viewing_board'] = ' are viewing this board.'; +$txt['who_member'] = 'Member'; + +$txt['powered_by_php'] = 'Powered by PHP'; +$txt['powered_by_mysql'] = 'Powered by MySQL'; +$txt['valid_html'] = 'Valid HTML 4.01!'; +$txt['valid_xhtml'] = 'Valid XHTML 1.0!'; +$txt['valid_css'] = 'Valid CSS!'; + +$txt['guest'] = 'Guest'; +$txt['guests'] = 'Guests'; +$txt['user'] = 'User'; +$txt['users'] = 'Users'; +$txt['hidden'] = 'Hidden'; + +$txt['merge_select_target_board'] = 'Select the target board of the merged topic'; +$txt['merge_select_poll'] = 'Select which poll the merged topic should have'; +$txt['merge_topic_list'] = 'Select topics to be merged'; +$txt['merge_select_subject'] = 'Select subject of merged topic'; +$txt['merge_custom_subject'] = 'Custom subject'; +$txt['merge_enforce_subject'] = 'Change the subject of all the messages'; +$txt['merge_include_notifications'] = 'Include notifications?'; +$txt['merge_check'] = 'Merge?'; +$txt['merge_no_poll'] = 'No poll'; + +$txt['response_prefix'] = 'Re: '; +$txt['current_icon'] = 'Current Icon'; + +$txt['smileys_current'] = 'Current Smiley Set'; +$txt['smileys_none'] = 'No Smileys'; + +$txt['search_results'] = 'Search Results'; +$txt['search_post_age'] = 'Message age'; +$txt['search_between'] = 'Between'; +$txt['search_and'] = 'and'; +$txt['search_options'] = 'Options'; +$txt['search_show_complete_messages'] = 'Show results as messages'; +$txt['search_subject_only'] = 'Topic subjects only'; +$txt['search_relevance'] = 'Relevance'; +$txt['search_matches'] = 'Matches'; +$txt['search_no_results'] = 'No results found'; +$txt['search_date_posted'] = 'Date Posted'; +$txt['search_order'] = 'Search order'; +$txt['search_orderby_relevant_first'] = 'Most relevant results first'; +$txt['search_orderby_large_first'] = 'Largest topics first'; +$txt['search_orderby_small_first'] = 'Smallest topics first'; +$txt['search_orderby_recent_first'] = 'Most recent topics first'; +$txt['search_orderby_old_first'] = 'Oldest topics first'; + +$txt['totalTimeLogged1'] = 'Total time logged in: '; +$txt['totalTimeLogged2'] = ' days, '; +$txt['totalTimeLogged3'] = ' hours and '; +$txt['totalTimeLogged4'] = ' minutes.'; +$txt['totalTimeLogged5'] = 'd '; +$txt['totalTimeLogged6'] = 'h '; +$txt['totalTimeLogged7'] = 'm'; + +$txt['approve_thereis'] = 'There is'; +$txt['approve_thereare'] = 'There are'; +$txt['approve_member'] = 'one member'; +$txt['approve_members'] = 'members'; +$txt['approve_members_waiting'] = 'awaiting approval.'; + +$txt['notifyboard_turnon'] = 'Do you want a notification email when someone posts a new topic in this board?'; +$txt['notifyboard_turnoff'] = 'Are you sure you do not want to receive new topic notifications for this board?'; + +$txt['activate_code'] = 'Your activation code is'; + +$txt['find_members'] = 'Find Members'; +$txt['find_username'] = 'Name, username, or email address'; +$txt['find_wildcards'] = 'Allowed Wildcards: *, ?'; +$txt['find_no_results'] = 'No results found'; +$txt['find_results'] = 'Results'; +$txt['find_close'] = 'Close'; + +$txt['unread_since_visit'] = 'Show unread posts since last visit.'; +$txt['show_unread_replies'] = 'Show new replies to your posts.'; + +$txt['change_color'] = 'Change Color'; + +$txt['quickmod_delete_selected'] = 'Delete Selected'; + +// In this string, don't use entities. (&, etc.) +$txt['show_personal_messages'] = 'You have received one or more new personal messages.\\nView them now (in a new window)?'; + +$txt['previous_next_back'] = '« previous'; +$txt['previous_next_forward'] = 'next »'; + +$txt['movetopic_auto_board'] = '[BOARD]'; +$txt['movetopic_auto_topic'] = '[TOPIC LINK]'; +$txt['movetopic_default'] = 'This topic has been moved to ' . $txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic']; + +$txt['upshrink_description'] = 'Shrink or expand the header.'; + +$txt['mark_unread'] = 'Mark unread'; + +$txt['ssi_not_direct'] = 'Please don\'t access SSI.php by URL directly; you may want to use the path (%s) or add ?ssi_function=something.'; + +//Karma Description Mod (Модификация просмотра кармы) +$txt['karmaview'] = 'Karma Change Log'; /*Просмотр изменения репутации пользователей*/ +$txt['whykarmamod'] = 'Karma change'; /*Изменение репутации*/ +$txt['Description'] = 'No Description'; /*Нет описания*/ +$txt['karmamoder'] = 'Reason for changing the karma of this user'; /*Пожалуйста, напишите за что вы изменяете карму этому пользователю*/ +$txt['karmarequare'] = '(Required field)'; /*Обязательно для заполнения*/ +$txt['karmawho'] = 'Who'; /*Кто*/ +$txt['karmawhos'] = 'Whom'; /*Кому*/ +$txt['karmawhat'] = 'What (+/-)'; /*Что*/ +$txt['karmadesc'] = 'For What'; /*За что*/ +$txt['karmatime'] = 'When'; /*Когда*/ +$txt['karmanumb'] = 'Values: '; /*Всего значений*/ +$txt['statkarma'] = '[Karma Stats]'; /*Статистика кармы*/ +$txt['viewkarma_title'] = 'Karma Change Description'; /*Изменение кармы*/ +$txt['deletekarma'] = 'Delete'; /*Удалить*/ +$txt['clearkarma'] = 'Clear'; /*Очистить*/ +$txt['nextver'] = 'In next mod version'; +$txt['karma_delete_confirm'] = 'Are you sure you want to delete this record?'; /*Вы уверены что хотите удалить эту запись?*/ +$txt['karma_back'] = '< Back'; //Назад +$txt['karma_continue'] = 'Continue >'; //Продолжить +$txt['karmadescappl'] = ' (Applaud)'; //Прибавить +$txt['karmadescsmi'] = ' (Smite)'; //Убавить +$txt['karmawhere'] = 'Where'; +$txt['karmawhereurl'] = 'In topic'; +$txt['karmawhereurl2'] = 'In PM'; +$txt['karma_delete'] = 'Delete'; +$txt['sure_about_karma_remove'] = 'Are you sure you want to delete this record?'; +$txt['karma_stat'] = 'Karma Statistic'; +$txt['karma_top_applaud'] = 'Top 5 applauded users'; +$txt['karma_top_smite'] = 'Top 5 smited users'; +$txt['karma_other_stat'] = 'General Statistics'; +$txt['karma_max_appl'] = 'User MAX applauding other users'; +$txt['karma_max_smit'] = 'User MAX smiting other users'; +$txt['karma_today'] = 'Karma points today'; +$txt['karma_today_plus'] = 'Today "+"'; +$txt['karma_today_minus'] = 'Today "-"'; + +?> \ No newline at end of file diff --git a/Themes/default/languages/index.russian.php b/Themes/default/languages/index.russian.php new file mode 100644 index 0000000..dc5cd51 --- /dev/null +++ b/Themes/default/languages/index.russian.php @@ -0,0 +1,648 @@ + 'January'. (or translated, of course.) +$months = array(1 => 'января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'); +$months_short = array(1 => 'Янв.', 'Фев.', 'Март', 'Апр.', 'Май', 'Июнь', 'Июль', 'Авг.', 'Сен.', 'Окт.', 'Нов.', 'Дек.'); + +$txt['newmessages0'] = 'новое'; +$txt['newmessages1'] = 'новых'; +$txt['newmessages3'] = 'новых'; +$txt['newmessages4'] = ','; + +$txt[2] = 'Админ'; + +$txt[10] = 'Сохранить'; + +$txt[17] = 'Изменить'; +$txt[18] = $context['forum_name'] . ' - форум'; +$txt[19] = 'участников'; +$txt[20] = 'Название форума'; +$txt[21] = 'Сообщения'; +$txt[22] = 'Последнее сообщение'; + +$txt[24] = '(отсутствует)'; +$txt[26] = 'Cообщений'; +$txt[27] = 'Профиль'; +$txt[28] = 'гость'; +$txt[29] = 'автор'; +$txt[30] = 'было'; +$txt[31] = 'Удалить'; +$txt[33] = 'Новая тема'; + +$txt[34] = 'Войти'; +$txt[35] = 'Имя'; +$txt[36] = 'Пароль'; + +$txt[40] = 'Такого участника на форуме не существует.'; + +$txt[62] = 'Модератор'; +$txt[63] = 'Удалить тему'; +$txt[64] = 'темах'; +$txt[66] = 'Править'; +$txt[68] = 'Отображаемое имя'; +$txt[69] = 'E-mail'; +$txt[70] = 'Тема'; +$txt[72] = 'Сообщение'; + +$txt[79] = 'Редактировать профиль'; + +$txt[81] = 'Выбрать пароль'; +$txt[82] = 'Подтвердить пароль'; +$txt[87] = 'Статус'; + +$txt[92] = 'Просмотр профиля'; +$txt[94] = 'Всего'; +$txt[95] = 'Сообщений'; +$txt[96] = 'Сайт'; +$txt[97] = 'зарегистрируйтесь'; + +$txt[101] = 'Список тем'; +$txt[102] = 'Новости'; +$txt[103] = 'Начало'; + +$txt[104] = 'закрыть/открыть тему'; +$txt[105] = 'Отправить'; +$txt[106] = 'Ошибка!'; +$txt[107] = 'в'; +$txt[108] = 'Выйти'; +$txt[109] = 'Автор'; +$txt[110] = 'Сообщений'; +$txt[111] = 'Обновление'; +$txt[114] = 'Вход для администратора'; +$txt[118] = 'Тема'; +$txt[119] = 'Помощь'; +$txt[121] = 'Удалить сообщение'; +$txt[125] = 'Извещать об ответе'; +$txt[126] = 'Вы хотите получать извещения при получении ответа на это сообщение? '; +$txt[130] = 'С наилучшими пожеланиями, от '. $context['forum_name'] . ' форума.'; +$txt[131] = 'Уведомление об ответе'; +$txt[132] = 'Переместить тему'; +$txt[133] = 'Переместить в'; +$txt[139] = 'Страницы'; +$txt[140] = 'Активные пользователи за последние ' . $modSettings['lastActive'] . ' минут'; +$txt[144] = 'Личные Сообщения'; +$txt[145] = 'Цитировать'; +$txt[146] = ' Ответить'; + +$txt[151] = 'Нет сообщений...'; +$txt[152] = 'личных сообщений'; +$txt[153] = 'всего '; +$txt[154] = ' Удалить сообщение'; + +$txt[158] = 'Сейчас на сайте'; +$txt[159] = 'Личное Сообщение'; +$txt[160] = 'Перейти в раздел'; +$txt[161] = 'Вперёд'; +$txt[162] = 'Вы уверены в том, что хотите удалить эту тему?'; +$txt[163] = 'Да'; +$txt[164] = 'Нет'; + +$txt[166] = 'Результаты поиска'; +$txt[167] = 'Всё'; +$txt[170] = 'Ничего не найдено'; +$txt[176] = 'на'; + +$txt[182] = 'Поиск'; +$txt[183] = 'Выбрать параметры поиска'; +$txt[189] = 'Искать в форумах'; +$txt[190] = 'все'; + +$txt[193] = 'Назад '; +$txt[194] = 'напомнить'; +$txt[195] = 'Автор'; +$txt[196] = 'Название'; +$txt[197] = 'Ответил'; +$txt[200] = 'Список участников.'; +$txt[201] = 'Добро Пожаловать!'; +$txt[208] = 'Панель администрирования'; +$txt[209] = 'Я новичок!'; +$txt[211] = 'Последняя правка'; +$txt[212] = 'Отключить извещения по этой теме? '; + +$txt[214] = 'Последние сообщения'; + +$txt[227] = 'Место жительства'; +$txt[231] = 'Пол'; +$txt[233] = 'Дата Регистрации'; + +$txt[234] = 'Последние 10 сообщений на форуме.'; +$txt[235] = 'самая популярная тема'; +$txt[236] = 'Назад'; +$txt[237] = 'на главную страницу'; + +$txt[238] = 'Муж.'; +$txt[239] = 'Жен.'; + +$txt[240] = 'Использован недопустимый символ в имени пользователя. '; + +$txt['welcome_guest'] = ' Добро Пожаловать, ' . $txt[28] . '. Пожалуйста войдите или зарегистрируйтесь, если хотите стать полноправным участником форума.'; +$txt['welcome_guest_activate'] = '
    Не получили активационное письмо?'; +$txt['hello_member'] = 'Привет,'; +$txt['hello_guest'] = 'Добро пожаловать,'; +$txt[247] = 'Привет,'; +$txt[248] = 'Добро пожаловать,'; +$txt[249] = 'пожалуйста'; +$txt[250] = 'назад'; +$txt[251] = 'Укажите куда перейти'; + +$txt[279] = 'Отправлено'; + +$txt[287] = 'Улыбка'; +$txt[288] = 'Злость'; +$txt[289] = 'Плохой'; +$txt[290] = 'Смех'; +$txt[291] = 'Грустный'; +$txt[292] = 'Подмигивающий'; +$txt[293] = 'Усмешка'; +$txt[294] = 'шокирован'; +$txt[295] = 'круто'; +$txt[296] = 'хех'; +$txt[450] = 'глазки кверху'; +$txt[451] = 'язык'; +$txt[526] = 'обеспокоенный'; +$txt[527] = 'рот на замке'; +$txt[528] = 'в замешательстве'; +$txt[529] = 'поцелуй'; +$txt[530] = 'плач'; + +$txt[298] = 'Модератор'; +$txt[299] = 'Модераторы'; + +$txt[300] = 'Отметить темы как прочитанные'; +$txt[301] = 'Просмотров'; +$txt[302] = 'новый'; + +$txt[303] = 'Просмотр участников'; +$txt[305] = 'Просмотр'; +$txt[307] = 'E-mail'; + +$txt[308] = 'Просмотр участников с'; +$txt[309] = 'всех'; +$txt[310] = 'участников'; +$txt[311] = 'по'; +$txt[315] = 'Забыли пароль?'; + +$txt[317] = 'Дата'; +$txt[318] = 'от'; +$txt[319] = 'Тема'; +$txt[322] = 'Обновить'; +$txt[324] = 'в'; + +$txt[330] = 'Темах'; +$txt[331] = 'Участники'; +$txt[332] = 'Список участников'; +$txt[333] = 'Новые сообщения'; +$txt[334] = 'Нет новых сообщений'; + +$txt['sendtopic_send'] = 'Отправить'; +$txt[343] = 'По фразе целиком'; +$txt[344] = 'По любому из слов'; + +$txt[371] = 'Коррекция временной зоны'; +$txt[377] = 'или'; + +$txt[398] = 'Ничего не найдено'; + +$txt[418] = 'Предупреждение'; + +$txt[430] = 'Извините %s, Вам запрещено посещать этот форум!'; + +$txt[452] = 'Отметить все сообщения как прочитанные'; + +$txt[454] = 'Горячая тема (более ' . $modSettings['hotTopicPosts'] . ' сообщений)'; +$txt[455] = 'Очень горячая тема (более ' . $modSettings['hotTopicVeryPosts'] . ' сообщений)'; +$txt[456] = 'Закрытая тема'; +$txt[457] = 'Открытая тема'; +$txt['participation_caption'] = 'В теме есть Ваши соощения'; + +$txt[462] = 'Вперёд'; + +$txt[465] = 'Печать'; +$txt[467] = 'Профиль'; +$txt[468] = 'Всего тем'; +$txt[470] = 'N/A'; +$txt[471] = 'сообщение'; +$txt[473] = 'Это имя уже занято другим участником.'; + +$txt[488] = 'Всего участников'; +$txt[489] = 'Всего сообщений'; +$txt[490] = 'Всего тем'; + +$txt[497] = 'Продолжительность сессии (в минутах)'; + +$txt[507] = 'Предварительный просмотр'; +$txt[508] = 'Запомнить'; + +$txt[511] = 'Авторизирован'; +$txt[512] = 'IP'; + +$txt[513] = 'ICQ'; +$txt[515] = 'WWW'; + +$txt[525] = 'от'; + +$txt[578] = 'часов'; +$txt[579] = 'дней'; + +$txt[581] = ', наш новый участник.'; + +$txt[582] = 'Искать'; +$txt[583] = 'От пользователя'; + +$txt[603] = 'AIM'; +// In this string, please use +'s for spaces. +$txt['aim_default_message'] = 'Привет+Ты+сейчас+здесь?'; +$txt[604] = 'YIM'; + +$txt[616] = 'Помните, этот форум находится в \'режиме обслуживания\'.'; + +$txt[641] = 'прочитано'; +$txt[642] = 'раз'; + +$txt[645] = 'Статистика форума'; +$txt[656] = 'Последний участник'; +$txt[658] = 'Всего категорий'; +$txt[659] = 'Последнее сообщение'; + +$txt[660] = 'Вы получили'; +$txt[661] = 'Кликните'; +$txt[662] = 'здесь'; +$txt[663] = 'чтобы прочитать их.'; + +$txt[665] = 'Всего форумов'; + +$txt[668] = 'Печать страницы'; + +$txt[679] = 'Адрес e-mail должен быть действующим.'; + +$txt[683] = 'Вот такой я!!'; +$txt[685] = $context['forum_name'] . ' - Информационный центр'; + +$txt[707] = 'Отправить'; + +$txt['sendtopic_title'] = 'Сообщить о теме "%s" другу.'; +$txt['sendtopic_dear'] = 'Привет %s,'; +$txt['sendtopic_this_topic'] = 'Советую заглянуть на "%s" на форуме ' . $context['forum_name'] . '. Для просмотра нужно пройти по ссылке'; +$txt['sendtopic_thanks'] = 'Спасибо'; +$txt['sendtopic_sender_name'] = 'Ваше имя'; +$txt['sendtopic_sender_email'] = 'Ваш e-mail'; +$txt['sendtopic_receiver_name'] = 'Имя Вашего друга'; +$txt['sendtopic_receiver_email'] = 'e-mail друга'; +$txt['sendtopic_comment'] = 'Добавить комментарий'; +$txt['sendtopic2'] = 'Комментарий добавлен'; + +$txt[721] = 'Скрыть Ваш e-mail от других участников?'; + +$txt[737] = 'Проверить всё'; + +$txt[1001] = 'Ошибка в базе данных'; +$txt[1002] = 'Пожалуйста, попробуйте снова. При повторной ошибке свяжитесь с администратором форума.'; +$txt[1003] = 'Файл'; +$txt[1004] = 'строка'; +$txt[1005] = 'SMF-форум обнаружил и автоматически исправил ошибку в Вашей базе данных. Если у Вас всё равно возникают проблемы, обратитесь к вашей хостинговой компании.'; +$txt['database_error_versions'] = ' Вероятно, что ваша база данных требует модернизации. Ваши файлы форума - в настоящее время в версии ' . $forum_version . ', тогда как ваша база данных - в версии SMF-форума' . $modSettings['smfVersion'] . '. Рекомендуется, чтобы Вы выполнили последнюю версию upgrade.php.'; +$txt['template_parse_error'] = 'Ошибка в шаблоне!'; +$txt['template_parse_error_message'] = 'Вероятно произошли какие-то сбои в системе шаблонов форума. Эта проблема должна быть временной, поэтому, пожалуйста, вернитесь позже и попробуйте еще раз. Если Вы снова увидите это сообщение, пожалуйста войдите в контакт с администратором.

    Так же попробуйте перезагрузить страницу.'; +$txt['template_parse_error_details'] = 'Проблема с %1$s шаблоном или с языковым файлом. Пожалуйста, проверьте синтаксис и попробуйте ещё раз - помните, что одинарные кавычки (\') нельзя ставить после слэша(\\). Подробности о синтаксисе PHP здесь.

    Попробуйте снова перезагрузить страницу или использовать предустановленные по умолчанию шаблоны.'; + +$txt['smf10'] = ' сегодня в '; +$txt['smf10b'] = 'вчера в '; +$txt['smf20'] = 'Новый опрос'; +$txt['smf21'] = 'Вопрос'; +$txt['smf23'] = 'Голосовать'; +$txt['smf24'] = 'Всего голосов'; +$txt['smf25'] = 'Для быстроты: нажмите клавиши alt+s для подключения или alt+p для предварительного просмотра'; +$txt['smf29'] = 'Просмотр результатов.'; +$txt['smf30'] = 'Закрыть опрос'; +$txt['smf30b'] = 'Открыть опрос'; +$txt['smf39'] = ' Редактировать опрос'; +$txt['smf43'] = 'Опрос'; +$txt['smf47'] = '1 день'; +$txt['smf48'] = '1 неделя'; +$txt['smf49'] = '1 месяц'; +$txt['smf50'] = 'Постоянно'; +$txt['smf52'] = 'Войти'; +$txt['smf53'] = '1 час'; +$txt['smf56'] = 'ПЕРЕМЕЩЕНО'; +$txt['smf57'] = 'Пожалуйста, введите пояснение
    почему эта тема была перемещена.'; +$txt['smf60'] = 'Извините, у Вас недостаточно сообщений для изменения репутации - должно быть, по крайней мере '; +$txt['smf62'] = 'Извините, необходимо немного подождать, а затем повторить действие.'; +$txt['smf82'] = 'Форум (раздел)'; +$txt['smf88'] = 'в'; +$txt['smf96'] = 'Важная тема'; + +$txt['smf138'] = 'Удалить'; + +$txt['smf199'] = 'Ваши личные сообщения'; + +$txt['smf211'] = 'KB'; + +$txt['smf223'] = '[Подробная статистика]'; + +$txt['smf238'] = 'код'; +$txt['smf239'] = 'Цитата'; +$txt['smf240'] = 'Цитата'; + +$txt['smf251'] = 'Разбить тему'; +$txt['smf252'] = 'Объединить темы'; +$txt['smf252lnk'] = 'Ob\'dinit\' temy'; +$txt['smf254'] = 'Описание новой темы'; +$txt['smf255'] = 'Разбить только это сообщение.'; +$txt['smf256'] = 'Разбить тему и переместить это сообщение, и сообщения после него.'; +$txt['smf257'] = 'Выбрать сообщения для разделения.'; +$txt['smf258'] = 'Новая тема'; +$txt['smf259'] = 'Тема успешно разбита на две.'; +$txt['smf260'] = 'Первоначальная тема'; +$txt['smf261'] = 'Пожалуйста, выберите сообщения, которые вы хотите объединить. '; +$txt['smf264'] = ' Темы объединены успешно.'; +$txt['smf265'] = ' Новая объединённая тема'; +$txt['smf266'] = 'Объединённая тема'; +$txt['smf267'] = 'Место на разделе'; +$txt['smf269'] = 'Результирующая тема'; +$txt['smf274'] = ' Вы уверены, что хотите объединить'; +$txt['smf275'] = 'с'; +$txt['smf276'] = 'Эта функция объединяет две темы в одну. Сообщения будут рассортированы по дате. Самое раннее сообщение будет первым в объединённом топике.'; + +$txt['smf277'] = 'Сделать тему важной'; +$txt['smf278'] = 'Снять с темы статус важной'; +$txt['smf279'] = 'Закрыть тему'; +$txt['smf280'] = 'Открыть тему'; + +$txt['smf298'] = 'Расширенный поиск'; + +$txt['smf299'] = 'Большой риск в обеспечении безопасности:'; +$txt['smf300'] = 'Вы не удалили '; + +$txt['smf301'] = 'Страница сгенерирована за'; +$txt['smf302'] = 'секунд'; +$txt['smf302b'] = ' запросы.'; + +$txt['smf315'] = 'Используйте эту функцию для уведомления модераторов и администраторов в случае появления оскорбительных или неправильных сообщений на форуме.
    Учтите, что Ваш e-mail станет в таком случае известен модераторам сайта.'; + +$txt['online2'] = 'Online'; +$txt['online3'] = 'Offline'; +$txt['online4'] = 'PM'; +$txt['online5'] = 'PM'; +$txt['online8'] = 'Присутствие'; + +$txt['topbottom4'] = 'Вверх'; +$txt['topbottom5'] = 'Вниз'; + +$forum_copyright = $context['forum_name'] . ' | Powered by ' . $forum_version . '.
    +© 2001-2005, Lewis Media. All Rights Reserved.'; + +$txt['calendar3'] = 'Дни рождения:'; +$txt['calendar4'] = 'События:'; +$txt['calendar3b'] = 'Ближайшие Дни Рождения:'; +$txt['calendar4b'] = 'Ближайшие события:'; +$txt['calendar5'] = ''; // Prompt for holidays in the calendar, leave blank to just display the holiday's name. +$txt['calendar9'] = 'Месяц:'; +$txt['calendar10'] = 'Год:'; +$txt['calendar11'] = 'День:'; +$txt['calendar12'] = 'Название события:'; +$txt['calendar13'] = 'Отправить в:'; +$txt['calendar20'] = 'Редактировать событие'; +$txt['calendar21'] = 'Удалить это событие?'; +$txt['calendar22'] = 'Удалить событие'; +$txt['calendar23'] = 'Создать событие'; +$txt['calendar24'] = 'Календарь'; +$txt['calendar37'] = 'Ссылка на календарь'; +$txt['calendar43'] = 'Ссылка на событие'; +$txt['calendar47'] = 'Календарь предстоящих событий'; +$txt['calendar47b'] = 'Сегодняшний календарь'; +$txt['calendar51'] = 'Неделя'; +$txt['calendar54'] = 'Число дней:'; +$txt['calendar_how_edit'] = 'как отредактировать это событие?'; + +$txt['moveTopic1'] = 'Объявите тему перенесённого топика'; +$txt['moveTopic2'] = 'Изменить тему'; +$txt['moveTopic3'] = 'Новая тема'; +$txt['moveTopic4'] = 'Изменить тему всех сообщений'; + +$txt['theme_template_error'] = 'Необходимо загрузить \'%s\' шаблон.'; +$txt['theme_language_error'] = 'Необходима загрузка \'%s\' языкового файла.'; + +$txt['parent_boards'] = 'Подраздел'; + +$txt['smtp_no_connect'] = 'Нет соединения с SMTP хостом'; +$txt['smtp_bad_response'] = 'Не получены коды поддержки mail-сервера'; +$txt['smtp_error'] = 'Проблема с отправкой e-mail. Ошибка: '; +$txt['mail_send_unable'] = 'Не удалось отправить письмо на почтовый адрес \'%s\''; + +$txt['mlist_search'] = 'Поиск участников'; +$txt['mlist_search2'] = 'Повторный поиск'; +$txt['mlist_search_email'] = 'Искать по Еmail'; +$txt['mlist_search_messenger'] = 'Искать по нику отправителя'; +$txt['mlist_search_group'] = 'Искать по положению'; +$txt['mlist_search_name'] = 'Искать по имени'; +$txt['mlist_search_website'] = 'Искать по адресу сайта'; +$txt['mlist_search_results'] = 'Искать результаты для'; + +$txt['attach_downloaded'] = 'загружено'; +$txt['attach_viewed'] = 'просмотрено'; +$txt['attach_times'] = 'раз'; + +$txt['MSN'] = 'MSN'; + +$txt['never'] = 'Никогда'; + +$txt['hostname'] = 'Hostname'; +$txt['you_are_post_banned'] = 'Извините %s, вы забанены.'; +$txt['ban_reason'] = 'Причина'; + +$txt['tables_optimized'] = 'Таблицы базы данных оптимизированы'; + +$txt['add_poll'] = 'Новый опрос'; +$txt['poll_options6'] = 'Вы можете выбрать %s опций.'; +$txt['poll_remove'] = 'Удалить опрос'; +$txt['poll_remove_warn'] = 'Вы уверены в том, что хотите удалить опрос из данной темы?'; +$txt['poll_results_expire'] = 'Результаты будут показаны только после окончания опроса'; +$txt['poll_expires_on'] = 'Закрытие опроса'; +$txt['poll_expired_on'] = 'Опрос закрыт'; +$txt['poll_change_vote'] = 'Проголосовать заново'; + +$txt['quick_mod_remove'] = 'Удалить выбранные'; +$txt['quick_mod_lock'] = 'Закрыть выбранные'; +$txt['quick_mod_sticky'] = 'Разделить выбранные'; +$txt['quick_mod_move'] = 'Переместить выбранные'; +$txt['quick_mod_merge'] = 'Объединить выбранное'; +$txt['quick_mod_go'] = 'Go!'; +$txt['quickmod_confirm'] = 'Вы уверены?'; + +$txt['spell_check'] = 'Проверка правописания'; + +$txt['quick_reply_1'] = 'Быстрый ответ'; +$txt['quick_reply_2'] = 'Вместе с формой быстрого ответа вы можете пользоваться обычными кодами и смайликами, и это будет гораздо быстрее и удобнее.'; +$txt['quick_reply_warning'] = 'Внимание: эта тема закрыта!
    Отвечать могут только администраторы и модераторы форума.'; + +$txt['notification_enable_board'] = 'Вы уверены, что хотите получать уведомления при создании новых тем в данном разделе форума?'; +$txt['notification_disable_board'] = 'Отключить уведомление?'; +$txt['notification_enable_topic'] = 'Вы уверены, что хотите получать уведомления о новых сообщениях в этой теме?'; +$txt['notification_disable_topic'] = 'Отключить уведомление?'; + +$txt['rtm1'] = 'Сообщить модератору'; + +$txt['unread_topics_visit'] = 'Непрочитанные темы'; +$txt['unread_topics_visit_none'] = 'Нет непрочитанных тем с момента вашего последнего посещения. Все непрочитанные темы..'; +$txt['unread_topics_all'] = 'Непрочитанные темы'; +$txt['unread_replies'] = 'Обновлённые темы'; + +$txt['who_title'] = 'Кто Online'; +$txt['who_and'] = ' и '; +$txt['who_viewing_topic'] = 'Эту тему сейчас просмaтривают '; +$txt['who_viewing_board'] = 'Этот форум сейчас просматривают '; +$txt['who_member'] = 'Участник'; + +$txt['powered_by_php'] = 'Powered by PHP'; +$txt['powered_by_mysql'] = 'Powered by MySQL'; +$txt['valid_html'] = 'Valid HTML 4.01!'; +$txt['valid_xhtml'] = 'Valid XHTML 1.0!'; +$txt['valid_css'] = 'Valid CSS!'; + +$txt['guest'] = 'Гость'; +$txt['guests'] = 'Гостей'; +$txt['user'] = 'Участник'; +$txt['users'] = 'Участников'; +$txt['hidden'] = 'Скрыты'; + +$txt['merge_select_target_board'] = 'Выбрать место для объединённой темы'; +$txt['merge_select_poll'] = 'Выбрать какой опрос должен быть в объединённой теме'; +$txt['merge_topic_list'] = 'Выбрать темы для объединения'; +$txt['merge_select_subject'] = 'Название объединённой темы '; +$txt['merge_custom_subject'] = 'Управление темой'; +$txt['merge_enforce_subject'] = ' Изменить тему во всех сообщениях'; +$txt['merge_include_notifications'] = 'Включить уведомление?'; +$txt['merge_check'] = 'Объединить?'; +$txt['merge_no_poll'] = 'Нет опроса'; + +$txt['response_prefix'] = 'Re: '; +$txt['current_icon'] = 'Иконка'; + +$txt['smileys_current'] = 'Набор смайликов'; +$txt['smileys_none'] = 'Нет смайликов'; + +$txt['search_results'] = 'Результаты поиска'; +$txt['search_post_age'] = 'Возраст сообщения'; +$txt['search_between'] = 'между'; +$txt['search_and'] = 'и'; +$txt['search_options'] = 'Опции'; +$txt['search_show_complete_messages'] = 'Отображать результаты в виде сообщений'; +$txt['search_subject_only'] = 'Только темы'; +$txt['search_relevance'] = 'Релевантность'; +$txt['search_matches'] = 'Результатов'; +$txt['search_no_results'] = 'Ничего не найдено'; +$txt['search_date_posted'] = 'Дата сообщения'; +$txt['search_order'] = 'Упорядочить сообщения по'; +$txt['search_orderby_relevant_first'] = 'релевантности'; +$txt['search_orderby_large_first'] = 'по величине топиков (прямой порядок расположения)'; +$txt['search_orderby_small_first'] = 'по величине топиков (обратный порядок расположения)по самым маленьким топикам'; +$txt['search_orderby_recent_first'] = 'по дате (прямой порядок расположения)'; +$txt['search_orderby_old_first'] = 'по дате (обратный порядок расположения)'; + +$txt['totalTimeLogged1'] = 'Общее время нахождения на форуме: '; +$txt['totalTimeLogged2'] = ' дн, '; +$txt['totalTimeLogged3'] = ' ч. и '; +$txt['totalTimeLogged4'] = ' мин.'; +$txt['totalTimeLogged5'] = 'д '; +$txt['totalTimeLogged6'] = 'ч '; +$txt['totalTimeLogged7'] = 'м'; + +$txt['approve_thereis'] = 'Находится'; +$txt['approve_thereare'] = 'Находятся'; +$txt['approve_member'] = 'один участник'; +$txt['approve_members'] = 'участников'; +$txt['approve_members_waiting'] = 'ждут разрешения.'; + +$txt['notifyboard_turnon'] = 'Вы хотите получать уведомления о размещении новых тем?'; +$txt['notifyboard_turnoff'] = 'Вы уверены, что не хотите получать уведомления о размещении новых тем?'; + +$txt['activate_code'] = 'Ваш код для активации'; + +$txt['find_members'] = 'Поиск участников'; +$txt['find_username'] = 'Имя, ник или e-mail'; +$txt['find_wildcards'] = 'Разрешены символы: *, ?'; +$txt['find_no_results'] = 'Ничего не найдено'; +$txt['find_results'] = 'Результаты'; +$txt['find_close'] = 'Закрыть'; + +$txt['unread_since_visit'] = 'Показать непрочитанные сообщения с последнего посещения.'; +$txt['show_unread_replies'] = 'Показать новые ответы на ваши сообщения.'; + +$txt['change_color'] = 'Изменить цвет'; + +$txt['quickmod_delete_selected'] = 'Удалить выбранные'; + +// In this string, don't use entities. (&, etc.) +$txt['show_personal_messages'] = 'Вы получили одно или несколько личных сообщений\\ Хотите прочитать (в новом окне)?'; + +$txt['previous_next_back'] = '< предыдущая'; +$txt['previous_next_forward'] = 'следующая >'; + +$txt['movetopic_auto_board'] = '[Раздел форума ]'; +$txt['movetopic_auto_topic'] = '[Ссылка на тему]'; +$txt['movetopic_default'] = 'Тема перенесена в ' . $txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic']; + +$txt['upshrink_description'] = 'Изменить длину заголовка.'; + +$txt['mark_unread'] = 'Пометить прочитанными'; + +$txt['ssi_not_direct'] = 'Не обращайтесь к файлу SSI.php по адресу напрямую; Вы можете использовать путь (%s) или добавить ?ssi_function=something.'; + +//Karma Description Mod (Модификация просмотра кармы) +$txt['karmaview'] = 'Просмотр изменения рейтинга пользователей'; +$txt['whykarmamod'] = 'Изменение рейтинга'; +$txt['Description'] = 'Нет описания'; +$txt['karmamoder'] = 'Пожалуйста, напишите за что вы изменяете рейтинг этому пользователю'; +$txt['karmarequare'] = '(Обязательно для заполнения)'; +$txt['karmawho'] = 'Кто'; +$txt['karmawhos'] = 'Кому'; +$txt['karmawhat'] = '(+/-)'; +$txt['karmadesc'] = 'За что'; +$txt['karmatime'] = 'Когда'; +$txt['karmanumb'] = 'Всего значений:'; +$txt['statkarma'] = '[Karma Stats]'; /*Статистика кармы*/ +$txt['viewkarma_title'] = 'Рейтинг пользователя'; /*Изменение кармы*/ +$txt['deletekarma'] = 'Удалить'; +$txt['clearkarma'] = 'Очистить'; +$txt['nextver'] = 'In next mod version'; +$txt['karma_delete_confirm'] = 'Вы уверены что хотите удалить эту запись?'; +$txt['karma_back'] = '< Назад'; +$txt['karma_continue'] = 'Продолжить >'; +$txt['karmadescappl'] = ' (+)'; //Прибавить +$txt['karmadescsmi'] = ' (-)'; //Убавить +$txt['karmawhere'] = 'Где'; +$txt['karmawhereurl'] = 'В теме'; +$txt['karmawhereurl2'] = 'В личном сообщении'; +$txt['karma_delete'] = 'Удалить'; +$txt['sure_about_karma_remove'] = 'Удалить эта запись?'; +$txt['karma_stat'] = 'Статистика'; +$txt['karma_top_applaud'] = 'Больше всего плюсов'; +$txt['karma_top_smite'] = 'Больше всего минусов'; +$txt['karma_other_stat'] = 'Общая статистика'; +$txt['karma_max_appl'] = 'Больше всех плюсов поставил'; +$txt['karma_max_smit'] = 'Больше всех минусов поставил'; +$txt['karma_today'] = 'Всего рейтингов сегодня'; +$txt['karma_today_plus'] = 'Плюсов'; +$txt['karma_today_minus'] = 'Минусов'; + +$txt['post_no'] = 'Сообщение #' +?> diff --git a/Themes/default/license.txt b/Themes/default/license.txt new file mode 100644 index 0000000..2bf90ec --- /dev/null +++ b/Themes/default/license.txt @@ -0,0 +1,73 @@ +Definitions +----------------------------------------------------------------------------- +i. This Package is defined as all of the files within any archive file or any +group of files released in conjunction by Simple Machines, Lewis Media, or a +derived or modified work based on such files. + +ii. A Modification, or a Mod, is defined as instructions, to be performed +manually or in an automated manner, that alter any part of this Package. + +iii. A Modified Package is defined as this Package or a derivative of it with +one or more Modification applied to it. + +iv. Distribution is defined as allowing one or more other people to in any +way download or receive a copy of this Package, a Modified Package, or a +derivative of this Package. + +v. The Software is defined as an installed copy of this Package, a Modified +Package, or a derivative of this Package. + +vi. The Simple Machines Website is defined as http://www.simplemachines.org/. + +Agreement +----------------------------------------------------------------------------- +1. Permission is hereby granted to use, copy, modify and/or distribute this +Package, provided that: + a. All copyright notices within source files and as generated by the +Software as output are retained, unchanged. + b. Any Distribution of this Package, whether as a Modified Package or +not, includes this file and is released under the terms of this Agreement. +This clause is not dependent upon any measure of changes made to this +Package. + c. This Package, Modified Packages, and derivative works may not be +sold or released under any paid license. Copying fees for the transport of +this Package, support fees for installation or other services, and hosting +fees for hosting the Software may, however, be imposed. + d. Any Distribution of this Package, whether as a Modified Package +or not, requires express written consent from Lewis Media. + +2. You may make Modifications to this Package or a derivative of it, and +distribute your Modifications in a form that is separate from the Package, +such as patches. The following restrictions apply to Modifications: + a. A Modification must not alter or remove any copyright notices in +the Software or Package, generated or otherwise. + b. When a Modification to the Package is released, a non-exclusive +royalty-free right is granted to Lewis Media to distribute the Modification +in future versions of the Package provided such versions remain available +under the terms of this Agreement in addition to any other license(s) of the +initial developer. + c. Any Distribution of a Modified Package or derivative requires +express written consent from Lewis Media. + +3. Permission is hereby also granted to distribute programs which depend on +this Package, provided that you do not distribute any Modified Package +without express written consent. + +4. Lewis Media reserves the right to change the terms of this Agreement at +any time, although those changes are not retroactive to past releases. +Changes to this document will be announced via email using the Simple +Machines email notification list. Failure to receive notification of a change +does not make those changes invalid. A current copy of this Agreement can be +found on the Simple Machines Website. + +5. This Agreement will terminate automatically if you fail to comply with the +limitations described herein. Upon termination, you must destroy all copies +of this Package, the Software, and any derivatives within 48 hours. + +----------------------------------------------------------------------------- +THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY WARRANTY. ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY +OUT OF THE USE OR MISUSE OF THIS PACKAGE. \ No newline at end of file diff --git a/Themes/default/minmax.js b/Themes/default/minmax.js new file mode 100644 index 0000000..3d4c7d6 --- /dev/null +++ b/Themes/default/minmax.js @@ -0,0 +1,145 @@ +// minmax.js: make IE5+/Win support CSS min/max-width/height +// version 1.0, 08-Aug-2003 +// written by Andrew Clover , use freely + +/*@cc_on +@if (@_win32 && @_jscript_version>4) + +var minmax_elements; + +minmax_props= new Array( + new Array('max-height','maxHeight') +); + +// Binding. Called on all new elements. If , initialise; check all +// elements for minmax properties + +function minmax_bind(el) { + + var i, em, ms; + var st= el.style, cs= el.currentStyle; + + if (minmax_elements==window.undefined) { + // initialise when body element has turned up, but only on IE + if (!document.body || !document.body.currentStyle) return; + minmax_elements= new Array(); + window.attachEvent('onresize', minmax_delayout); + // make font size listener + em= document.createElement('div'); + em.setAttribute('id', 'minmax_em'); + em.style.position= 'absolute'; em.style.visibility= 'hidden'; + em.style.fontSize= 'xx-large'; em.style.height= '5em'; + em.style.top='-5em'; em.style.left= '0'; + if (em.style.setExpression) { + em.style.setExpression('width', 'minmax_checkFont()'); + document.body.insertBefore(em, document.body.firstChild); + } + } + + //if(el.class!="signature") return; + + // transform hyphenated properties the browser has not caught to camelCase + for (i= minmax_props.length; i-->0;) + if (cs[minmax_props[i][0]]) + st[minmax_props[i][1]]= cs[minmax_props[i][0]]; + // add element with properties to list, store optimal size values + for (i= minmax_props.length; i-->0;) { + ms= cs[minmax_props[i][1]]; + if (ms && ms!='auto' && ms!='none' && ms!='0' && ms!='') { + st.minmaxWidth= cs.width; st.minmaxHeight= cs.height; + minmax_elements[minmax_elements.length]= el; + // will need a layout later + minmax_delayout(); + break; + } } +} + +// check for font size changes + +var minmax_fontsize= 0; +function minmax_checkFont() { + var fs= document.getElementById('minmax_em').offsetHeight; + if (minmax_fontsize!=fs && minmax_fontsize!=0) + minmax_delayout(); + minmax_fontsize= fs; + return '5em'; +} + +// Layout. Called after window and font size-change. Go through elements we +// picked out earlier and set their size to the minimum, maximum and optimum, +// choosing whichever is appropriate + +// Request re-layout at next available moment +var minmax_delaying= false; +function minmax_delayout() { + if (minmax_delaying) return; + minmax_delaying= true; + window.setTimeout(minmax_layout, 0); +} + +function minmax_stopdelaying() { + minmax_delaying= false; +} + +function minmax_layout() { + window.setTimeout(minmax_stopdelaying, 100); + var i, el, st, cs, optimal, inrange; + for (i= minmax_elements.length; i-->0;) { + el= minmax_elements[i]; st= el.style; cs= el.currentStyle; + + // horizontal size bounding + st.width= st.minmaxWidth; optimal= el.offsetWidth; + inrange= true; + if (inrange && cs.minWidth && cs.minWidth!='0' && cs.minWidth!='auto' && cs.minWidth!='') { + st.width= cs.minWidth; + inrange= (el.offsetWidthoptimal); + } + if (inrange) st.width= st.minmaxWidth; + + // vertical size bounding + st.height= st.minmaxHeight; optimal= el.offsetHeight; + inrange= true; + if (inrange && cs.minHeight && cs.minHeight!='0' && cs.minHeight!='auto' && cs.minHeight!='') { + st.height= cs.minHeight; + inrange= (el.offsetHeightoptimal); + } + if (inrange) st.height= st.minmaxHeight; + } +} + +// Scanning. Check document every so often until it has finished loading. Do +// nothing until arrives, then call main init. Pass any new elements +// found on each scan to be bound + +var minmax_SCANDELAY= 1500; + +function minmax_scan() { + var el; + for (var i= 0; i'; + break; + + // 2 is an attribute. + + // Just some text.. + case 3: + str += node.nodeValue; + break; + + // A CDATA section. + case 4: + str += ''; + break; + + // Entity reference.. + case 5: + str += '&' + node.nodeName + ';'; + break; + + // 6 is an actual entity, 7 is a PI. + + // Comment. + case 8: + str += ''; + break; + } + + return str; +} + +// Checks for variable in theArray. +function in_array(variable, theArray) +{ + return $.inArray(variable, theArray); +} + +// Find a specific radio button in its group and select it. +function selectRadioByName(radioGroup, name) +{ + for (var i = 0; i < radioGroup.length; i++) + { + if (radioGroup[i].value == name) + return radioGroup[i].checked = true; + } + + return false; +} + +// Invert all checkboxes at once by clicking a single checkbox. +function invertAll(headerfield, checkform, mask) +{ + for (var i = 0; i < checkform.length; i++) + { + if (typeof(mask) != "undefined" && checkform[i].name.substr(0, mask.length) != mask) + continue; + + if (!checkform[i].disabled) + checkform[i].checked = headerfield.checked; + } +} +function emoticon(text) +{ + replaceText(text, document.postmodify.message); +} + +function getMsgInfo(_name, _topic_id, _msg_id, _date) { + quote_name=_name; + quote_topic_id=_topic_id; + quote_msg_id=_msg_id; + quote_date=_date; +} + +function quoteSelection() { + var txt = ''; + if (document.getSelection) { + txt = document.getSelection(); + } + else if (window.getSelection) { + txt = window.getSelection(); + } + else if (document.selection) { + txt = document.selection.createRange().text; + } + + if (txt) { + // Add tags around selection + emoticon('[quote author='+quote_name+' link=topic='+quote_topic_id+'.msg'+quote_msg_id+'#msg'+quote_msg_id+' date='+quote_date+']' + txt+ '[/quote]\n'); + txt = ''; + return; + }else{ + alert("Сначала надо выделить текст"); + } +} + +function shrinkHeader(mode) +{ + if (is_guest == "") { + $.get("index.php?action=jsoption;var=collapse_header;val=" + (mode ? 1 : 0) + ";sesc=" + sesc + ";" + (new Date().getTime())); + } else { + $.cookie("upshrink",mode ? 1 : 0,{expires : 365}); + } + + $("#upshrink").attr("src", smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif")); + + $("#upshrinkHeader").toggleClass("hidden"); + + current_header = mode; + +} + +function swapOptions() +{ + document.getElementById("quickReplyExpand").src = smf_images_url + "/" + (currentSwap ? "collapse.gif" : "expand.gif"); + document.getElementById("quickReplyOptions").style.display = currentSwap ? "" : "none"; + + currentSwap = !currentSwap; +} + +setTimeout("fetchSession();", 60000); +function fetchSession() +{ + $.get(smf_script_url + "?action=jsoption;sesc=" +sesc +";" + (new Date().getTime())); + setTimeout("fetchSession();", 60000); +} + +function doQuote(messageid) +{ + if (currentSwap) + window.location.href = "http://rock.ru/forum/index.php?action=post;quote=" + messageid + ";topic=22901.40;sesc=" + sesc; + else + { + window.open("http://rock.ru/forum/index.php?action=quotefast;quote=" + messageid + ";sesc=" + sesc, "quote", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,top=40,left=40,width=240,height=90,resizable=no;"); + if (navigator.appName == "Microsoft Internet Explorer") + window.location.hash = "quickreply"; + else + window.location.hash = "#quickreply"; + } +} + +var smileys = [ +[ +[":cry:","12.gif",":cry:"], + [":rage:","13.gif",":rage:"], + [":B","14.gif",":B"], + [":roll:","15.gif",":roll:"], + [":ooi:","5.gif",":ooi:"], + [":wink:","16.gif",":wink:"], + [":yes:","17.gif",":yes:"], + [":bot:","18.gif",":bot:"], + [":ir:","9.gif","I roll!"], + [":z)","19.gif",":z)"], + [":arrow:","20.gif",":arrow:"], + [":vip:","21.gif",":vip:"], + [":Heppy:","22.gif",":Heppy:"], + [":think:","23.gif",":think:"], + [":bye:","24.gif",":bye:"], + [":roul:","25.gif",":roul:"], + [":pst:","26.gif",":pst:"]], + [ + [":o","27.gif",":o"], + [":closed:","28.gif",":closed:"], + [":cens:","29.gif",":cens:"], + [":tani:","30.gif",":tani:"], + [":appl:","31.gif",":appl:"], + [":idnk:","32.gif",":idnk:"], + [":sing:","33.gif",":sing:"], + [":shock:","34.gif",":shock:"], + [":res:","36.gif",":res:"], + [":alc:","37.gif",":alc:"], + [":lam:","38.gif",":lam:"], + [":box:","39.gif",":box:"], + [":tom:","40.gif",":tom:"], + [":lol:","41.gif",":lol:"], + [":vill:","42.gif",":vill:"]], + [ + [":idea:","43.gif",":idea:"], + [":E","45.gif",":E"], + [":horns:","47.gif",":horns:"], + [":poz:","49.gif",":poz:"], + [":meg:","51.gif",":meg:"], + [":dj:","52.gif",":dj:"], + [":rul:","53.gif",":rul:"], + [":sp:","55.gif",":sp:"], + [":stapp:","56.gif","Storm of applause"], + [":heart:","58.gif","Heart"], + [":kiss:","59.gif","Kiss"]], + [ + [":spam:","60.gif","Spam"], + [":party:","61.gif","Party"], + [":ser:","62.gif","Song"], + [":eam:","63.gif","Dream"], + [":gift:","64.gif","Gift"], + [":adore:","65.gif","I adore"], + [":pie:","66.gif","Pie"], + [":egg:","67.gif","Egg"], + [":cnrt:","68.gif","Concert"], + [":oftop:","69.gif","Off Topic"], + [":foo:","70.gif","Football"], + [":mob:","71.gif","Cellular"], + [":hoo:","72.gif","Not hooligan"], + [":tog:","73.gif","Together"], + [":pnk:","74.gif","Pancake"], + [":pati:","75.gif","Party Time"]], + [ + [":-({|=:","76.gif","I here"], + [":haaw:","77.gif","Head about a wall"], + [":angel:","78.gif","Angel"], + [":kil:","79.gif","killer"], + [":died:","80.gif","Cemetery"], + [":cof:","81.gif","Coffee"], + [":fruit:","82.gif","Forbidden fruit"], + [":tease:","83.gif","To tease"], + [":evil:","84.gif","Devil"], + [":exc:","85.gif","Excellently"], + [":niah:","86.gif","Not I, and he"], + [":Head:","87.gif","Studio"], + [":gl:","88.gif","girl"], + [":granat:","89.gif","Pomegranate"], + [":gans:","90.gif","Gangster"], + [":user:","91.gif","User"]], + [ + [":ny:","92.gif","New year"], + [":mvol:","93.gif","Megavolt"], + [":boat:","94.gif","In a boat"], + [":phone:","95.gif","Phone"], + [":cop:","96.gif","Cop"], + [":smok:","97.gif","Smoking"], + [":bic:","98.gif","Bicycle"], + [":ban:","99.gif","Ban?"], + [":bar:","100.gif",":bar:"]]]; +var smileyPopupWindow; + +function moreSmileys() +{ + var row, i; + + if (smileyPopupWindow) + smileyPopupWindow.close(); + + smileyPopupWindow = window.open("", "add_smileys", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=480,height=220,resizable=yes"); + smileyPopupWindow.document.write('\n'); + smileyPopupWindow.document.write('\n\t\n\t\tДополнительные смайлики\n\t\t\n\t'); + smileyPopupWindow.document.write('\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
    Выбрать смайлик
    '); + + for (row = 0; row < smileys.length; row++) + { + for (i = 0; i < smileys[row].length; i++) + { + smileys[row][i][2] = smileys[row][i][2].replace(/"/g, '"'); + smileyPopupWindow.document.write('' + smileys[row][i][2] + ' '); + } + smileyPopupWindow.document.write("
    "); + } + + smileyPopupWindow.document.write('
    Закрыть окно
    \n\t\n'); + smileyPopupWindow.document.close(); +} + +yandex_partner_id = 18555; +yandex_site_bg_color = '3A3A3A'; +yandex_stat_id = 1; +yandex_site_charset = 'utf-8'; +yandex_ad_format = 'direct'; +yandex_font_size = 1; +yandex_direct_type = 'horizontal'; +yandex_direct_border_type = 'ad'; +yandex_direct_limit = 4; +yandex_direct_header_bg_color = 'FBE5C0'; +yandex_direct_bg_color = '3A3A3A'; +yandex_direct_border_color = 'FBE5C0'; +yandex_direct_title_color = 'CFCECE'; +yandex_direct_url_color = 'FFC246'; +yandex_direct_all_color = 'FFC246'; +yandex_direct_text_color = 'CACACA'; +yandex_direct_hover_color = 'FFC246'; +yandex_direct_favicon = false; diff --git a/Themes/default/script.js.cp1251 b/Themes/default/script.js.cp1251 new file mode 100644 index 0000000..9ba7d71 --- /dev/null +++ b/Themes/default/script.js.cp1251 @@ -0,0 +1,307 @@ +var smf_formSubmitted = false; +var quote_name=''; +var quote_topic_id=''; +var quote_msg_id=''; +var quote_date=0; + +// Define document.getElementById for Internet Explorer 4. +if (typeof(document.getElementById) == "undefined") + document.getElementById = function (id) + { + // Just return the corresponding index of all. + return document.all[id]; + } + +// Open a new window in a smaller popup. +function reqWin(desktopURL, alternateWidth, alternateHeight) +{ + window.open(desktopURL, 'requested_popup', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=' + (alternateWidth ? alternateWidth : 480) + ',height=' + (alternateHeight ? alternateHeight : 220) + ',resizable=no'); + + // Return false so the click won't follow the link ;). + return false; +} + +// Remember the current position. +function storeCaret(text) +{ + // Only bother if it will be useful. + if (typeof(text.createTextRange) != 'undefined') + text.caretPos = document.selection.createRange().duplicate(); +} + +// Replaces the currently selected text with the passed text. +function replaceText(text, textarea) +{ + // Attempt to create a text range (IE). + if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange) + { + var caretPos = textarea.caretPos; + + caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; + caretPos.select(); + } + // Mozilla text range replace. + else if (typeof(textarea.selectionStart) != "undefined") + { + var begin = textarea.value.substr(0, textarea.selectionStart); + var end = textarea.value.substr(textarea.selectionEnd); + var scrollPos = textarea.scrollTop; + + textarea.value = begin + text + end; + + if (textarea.setSelectionRange) + { + textarea.focus(); + textarea.setSelectionRange(begin.length + text.length, begin.length + text.length); + } + textarea.scrollTop = scrollPos; + } + // Just put it on the end. + else + { + textarea.value += text; + textarea.focus(textarea.value.length - 1); + } +} + +// Surrounds the selected text with text1 and text2. +function surroundText(text1, text2, textarea) +{ + // Can a text range be created? + if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange) + { + var caretPos = textarea.caretPos; + + caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text1 + caretPos.text + text2 + ' ' : text1 + caretPos.text + text2; + caretPos.select(); + } + // Mozilla text range wrap. + else if (typeof(textarea.selectionStart) != "undefined") + { + var begin = textarea.value.substr(0, textarea.selectionStart); + var selection = textarea.value.substr(textarea.selectionStart, textarea.selectionEnd - textarea.selectionStart); + var end = textarea.value.substr(textarea.selectionEnd); + var newCursorPos = textarea.selectionStart; + var scrollPos = textarea.scrollTop; + + textarea.value = begin + text1 + selection + text2 + end; + + if (textarea.setSelectionRange) + { + if (selection.length == 0) + textarea.setSelectionRange(newCursorPos + text1.length, newCursorPos + text1.length); + else + textarea.setSelectionRange(newCursorPos, newCursorPos + text1.length + selection.length + text2.length); + textarea.focus(); + } + textarea.scrollTop = scrollPos; + } + // Just put them on the end, then. + else + { + textarea.value += text1 + text2; + textarea.focus(textarea.value.length - 1); + } +} + +// Checks if the passed input's value is nothing. +function isEmptyText(theField) +{ + // Copy the value so changes can be made.. + var theValue = theField.value; + + // Strip whitespace off the left side. + while (theValue.length > 0 && (theValue.charAt(0) == ' ' || theValue.charAt(0) == '\t')) + theValue = theValue.substring(1, theValue.length); + // Strip whitespace off the right side. + while (theValue.length > 0 && (theValue.charAt(theValue.length - 1) == ' ' || theValue.charAt(theValue.length - 1) == '\t')) + theValue = theValue.substring(0, theValue.length - 1); + + if (theValue == '') + return true; + else + return false; +} + +// Only allow form submission ONCE. +function submitonce(theform) +{ + smf_formSubmitted = true; +} +function submitThisOnce(item) +{ + // Hateful, hateful fix for Safari 1.3 beta. + if (navigator.userAgent.indexOf('AppleWebKit') != -1) + return !smf_formSubmitted; + + for (var i = 0; i < item.form.length; i++) + if (typeof(item.form[i]) != "undefined" && item.form[i].tagName.toLowerCase() == "textarea") + item.form[i].readOnly = true; + + return !smf_formSubmitted; +} + +// Set the "inside" HTML of an element. +function setInnerHTML(element, toValue) +{ + // IE has this built in... + if (typeof(element.innerHTML) != 'undefined') + element.innerHTML = toValue; + else + { + var range = document.createRange(); + range.selectNodeContents(element); + range.deleteContents(); + element.appendChild(range.createContextualFragment(toValue)); + } +} + +// Set the "outer" HTML of an element. +function setOuterHTML(element, toValue) +{ + if (typeof(element.outerHTML) != 'undefined') + element.outerHTML = toValue; + else + { + var range = document.createRange(); + range.setStartBefore(element); + element.parentNode.replaceChild(range.createContextualFragment(toValue), element); + } +} + +// Get the inner HTML of an element. +function getInnerHTML(element) +{ + if (typeof(element.innerHTML) != 'undefined') + return element.innerHTML; + else + { + var returnStr = ''; + for (var i = 0; i < element.childNodes.length; i++) + returnStr += getOuterHTML(element.childNodes[i]); + + return returnStr; + } +} + +function getOuterHTML(node) +{ + if (typeof(node.outerHTML) != 'undefined') + return node.outerHTML; + + var str = ''; + + switch (node.nodeType) + { + // An element. + case 1: + str += '<' + node.nodeName; + + for (var i = 0; i < node.attributes.length; i++) + { + if (node.attributes[i].nodeValue != null) + str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"'; + } + + if (node.childNodes.length == 0 && in_array(node.nodeName.toLowerCase(), ['hr', 'input', 'img', 'link', 'meta', 'br'])) + str += ' />'; + else + str += '>' + getInnerHTML(node) + ''; + break; + + // 2 is an attribute. + + // Just some text.. + case 3: + str += node.nodeValue; + break; + + // A CDATA section. + case 4: + str += ''; + break; + + // Entity reference.. + case 5: + str += '&' + node.nodeName + ';'; + break; + + // 6 is an actual entity, 7 is a PI. + + // Comment. + case 8: + str += ''; + break; + } + + return str; +} + +// Checks for variable in theArray. +function in_array(variable, theArray) +{ + for (var i = 0; i < theArray.length; i++) + { + if (theArray[i] == variable) + return true; + } + return false; +} + +// Find a specific radio button in its group and select it. +function selectRadioByName(radioGroup, name) +{ + for (var i = 0; i < radioGroup.length; i++) + { + if (radioGroup[i].value == name) + return radioGroup[i].checked = true; + } + + return false; +} + +// Invert all checkboxes at once by clicking a single checkbox. +function invertAll(headerfield, checkform, mask) +{ + for (var i = 0; i < checkform.length; i++) + { + if (typeof(mask) != "undefined" && checkform[i].name.substr(0, mask.length) != mask) + continue; + + if (!checkform[i].disabled) + checkform[i].checked = headerfield.checked; + } +} +function emoticon(text) +{ + replaceText(text, document.postmodify.message); +} + +function getMsgInfo(_name, _topic_id, _msg_id, _date) { + quote_name=_name; + quote_topic_id=_topic_id; + quote_msg_id=_msg_id; + quote_date=_date; +} + +function quoteSelection() { + var txt = ''; + if (window.getSelection) { + txt = window.getSelection(); + } + else if (document.getSelection) { + txt = document.getSelection(); + } + else if (document.selection) { + txt = document.selection.createRange().text; + } + + if (txt) { + // Add tags around selection + emoticon('[quote author='+quote_name+' link=topic='+quote_topic_id+'.msg'+quote_msg_id+'#msg'+quote_msg_id+' date='+quote_date+']' + txt+ '[/quote]\n'); + txt = ''; + return; + }else{ + alert(" "); + } +} diff --git a/Themes/default/script.js.old b/Themes/default/script.js.old new file mode 100644 index 0000000..e6c33da --- /dev/null +++ b/Themes/default/script.js.old @@ -0,0 +1,473 @@ +var smf_formSubmitted = false; +var quote_name=''; +var quote_topic_id=''; +var quote_msg_id=''; +var quote_date=0; + +// Define document.getElementById for Internet Explorer 4. +if (typeof(document.getElementById) == "undefined") + document.getElementById = function (id) + { + // Just return the corresponding index of all. + return document.all[id]; + } + +// Open a new window in a smaller popup. +function reqWin(desktopURL, alternateWidth, alternateHeight) +{ + window.open(desktopURL, 'requested_popup', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=' + (alternateWidth ? alternateWidth : 480) + ',height=' + (alternateHeight ? alternateHeight : 220) + ',resizable=no'); + + // Return false so the click won't follow the link ;). + return false; +} + +// Remember the current position. +function storeCaret(text) +{ + // Only bother if it will be useful. + if (typeof(text.createTextRange) != 'undefined') + text.caretPos = document.selection.createRange().duplicate(); +} + +// Replaces the currently selected text with the passed text. +function replaceText(text, textarea) +{ + // Attempt to create a text range (IE). + if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange) + { + var caretPos = textarea.caretPos; + + caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; + caretPos.select(); + } + // Mozilla text range replace. + else if (typeof(textarea.selectionStart) != "undefined") + { + var begin = textarea.value.substr(0, textarea.selectionStart); + var end = textarea.value.substr(textarea.selectionEnd); + var scrollPos = textarea.scrollTop; + + textarea.value = begin + text + end; + + if (textarea.setSelectionRange) + { + textarea.focus(); + textarea.setSelectionRange(begin.length + text.length, begin.length + text.length); + } + textarea.scrollTop = scrollPos; + } + // Just put it on the end. + else + { + textarea.value += text; + textarea.focus(textarea.value.length - 1); + } +} + +// Surrounds the selected text with text1 and text2. +function surroundText(text1, text2, textarea) +{ + // Can a text range be created? + if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange) + { + var caretPos = textarea.caretPos; + + caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text1 + caretPos.text + text2 + ' ' : text1 + caretPos.text + text2; + caretPos.select(); + } + // Mozilla text range wrap. + else if (typeof(textarea.selectionStart) != "undefined") + { + var begin = textarea.value.substr(0, textarea.selectionStart); + var selection = textarea.value.substr(textarea.selectionStart, textarea.selectionEnd - textarea.selectionStart); + var end = textarea.value.substr(textarea.selectionEnd); + var newCursorPos = textarea.selectionStart; + var scrollPos = textarea.scrollTop; + + textarea.value = begin + text1 + selection + text2 + end; + + if (textarea.setSelectionRange) + { + if (selection.length == 0) + textarea.setSelectionRange(newCursorPos + text1.length, newCursorPos + text1.length); + else + textarea.setSelectionRange(newCursorPos, newCursorPos + text1.length + selection.length + text2.length); + textarea.focus(); + } + textarea.scrollTop = scrollPos; + } + // Just put them on the end, then. + else + { + textarea.value += text1 + text2; + textarea.focus(textarea.value.length - 1); + } +} + +// Checks if the passed input's value is nothing. +function isEmptyText(theField) +{ + // Copy the value so changes can be made.. + var theValue = theField.value; + + // Strip whitespace off the left side. + while (theValue.length > 0 && (theValue.charAt(0) == ' ' || theValue.charAt(0) == '\t')) + theValue = theValue.substring(1, theValue.length); + // Strip whitespace off the right side. + while (theValue.length > 0 && (theValue.charAt(theValue.length - 1) == ' ' || theValue.charAt(theValue.length - 1) == '\t')) + theValue = theValue.substring(0, theValue.length - 1); + + if (theValue == '') + return true; + else + return false; +} + +// Only allow form submission ONCE. +function submitonce(theform) +{ + smf_formSubmitted = true; +} +function submitThisOnce(item) +{ + // Hateful, hateful fix for Safari 1.3 beta. + if (navigator.userAgent.indexOf('AppleWebKit') != -1) + return !smf_formSubmitted; + + for (var i = 0; i < item.form.length; i++) + if (typeof(item.form[i]) != "undefined" && item.form[i].tagName.toLowerCase() == "textarea") + item.form[i].readOnly = true; + + return !smf_formSubmitted; +} + +// Set the "inside" HTML of an element. +function setInnerHTML(element, toValue) +{ + // IE has this built in... + if (typeof(element.innerHTML) != 'undefined') + element.innerHTML = toValue; + else + { + var range = document.createRange(); + range.selectNodeContents(element); + range.deleteContents(); + element.appendChild(range.createContextualFragment(toValue)); + } +} + +// Set the "outer" HTML of an element. +function setOuterHTML(element, toValue) +{ + if (typeof(element.outerHTML) != 'undefined') + element.outerHTML = toValue; + else + { + var range = document.createRange(); + range.setStartBefore(element); + element.parentNode.replaceChild(range.createContextualFragment(toValue), element); + } +} + +// Get the inner HTML of an element. +function getInnerHTML(element) +{ + if (typeof(element.innerHTML) != 'undefined') + return element.innerHTML; + else + { + var returnStr = ''; + for (var i = 0; i < element.childNodes.length; i++) + returnStr += getOuterHTML(element.childNodes[i]); + + return returnStr; + } +} + +function getOuterHTML(node) +{ + if (typeof(node.outerHTML) != 'undefined') + return node.outerHTML; + + var str = ''; + + switch (node.nodeType) + { + // An element. + case 1: + str += '<' + node.nodeName; + + for (var i = 0; i < node.attributes.length; i++) + { + if (node.attributes[i].nodeValue != null) + str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"'; + } + + if (node.childNodes.length == 0 && in_array(node.nodeName.toLowerCase(), ['hr', 'input', 'img', 'link', 'meta', 'br'])) + str += ' />'; + else + str += '>' + getInnerHTML(node) + ''; + break; + + // 2 is an attribute. + + // Just some text.. + case 3: + str += node.nodeValue; + break; + + // A CDATA section. + case 4: + str += ''; + break; + + // Entity reference.. + case 5: + str += '&' + node.nodeName + ';'; + break; + + // 6 is an actual entity, 7 is a PI. + + // Comment. + case 8: + str += ''; + break; + } + + return str; +} + +// Checks for variable in theArray. +function in_array(variable, theArray) +{ + for (var i = 0; i < theArray.length; i++) + { + if (theArray[i] == variable) + return true; + } + return false; +} + +// Find a specific radio button in its group and select it. +function selectRadioByName(radioGroup, name) +{ + for (var i = 0; i < radioGroup.length; i++) + { + if (radioGroup[i].value == name) + return radioGroup[i].checked = true; + } + + return false; +} + +// Invert all checkboxes at once by clicking a single checkbox. +function invertAll(headerfield, checkform, mask) +{ + for (var i = 0; i < checkform.length; i++) + { + if (typeof(mask) != "undefined" && checkform[i].name.substr(0, mask.length) != mask) + continue; + + if (!checkform[i].disabled) + checkform[i].checked = headerfield.checked; + } +} +function emoticon(text) +{ + replaceText(text, document.postmodify.message); +} + +function getMsgInfo(_name, _topic_id, _msg_id, _date) { + quote_name=_name; + quote_topic_id=_topic_id; + quote_msg_id=_msg_id; + quote_date=_date; +} + +function quoteSelection() { + var txt = ''; + if (document.getSelection) { + txt = document.getSelection(); + } + else if (window.getSelection) { + txt = window.getSelection(); + } + else if (document.selection) { + txt = document.selection.createRange().text; + } + + if (txt) { + // Add tags around selection + emoticon('[quote author='+quote_name+' link=topic='+quote_topic_id+'.msg'+quote_msg_id+'#msg'+quote_msg_id+' date='+quote_date+']' + txt+ '[/quote]\n'); + txt = ''; + return; + }else{ + alert("Сначала надо выделить текст"); + } +} + +function shrinkHeader(mode) +{ + if (is_guest == "") { +// document.getElementById("upshrinkTemp").src = "http://rock.ru/forum/index.php?action=jsoption;var=collapse_header;val=" + (mode ? 1 : 0) + ";sesc=" + sesc + ";" + (new Date().getTime()); + $.get("index.php?action=jsoption;var=collapse_header;val=" + (mode ? 1 : 0) + ";sesc=" + sesc + ";" + (new Date().getTime())); + } else { + document.cookie = "upshrink=" + (mode ? 1 : 0); + } + + $("#upshrink").attr("src", smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif")); + + $("#upshrinkHeader").toggleClass("hidden"); + + current_header = mode; + +} + +function swapOptions() +{ + document.getElementById("quickReplyExpand").src = smf_images_url + "/" + (currentSwap ? "collapse.gif" : "expand.gif"); + document.getElementById("quickReplyOptions").style.display = currentSwap ? "" : "none"; + + currentSwap = !currentSwap; +} + +setTimeout("fetchSession();", 600000); +function fetchSession() +{ + document.getElementById("fetchSessionTemp").src = smf_script_url + "?action=jsoption;sesc=" +sesc +";" + (new Date().getTime()); + setTimeout("fetchSession();", 600000); +} + +function doQuote(messageid) +{ + if (currentSwap) + window.location.href = "http://rock.ru/forum/index.php?action=post;quote=" + messageid + ";topic=22901.40;sesc=" + sesc; + else + { + window.open("http://rock.ru/forum/index.php?action=quotefast;quote=" + messageid + ";sesc=" + sesc, "quote", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,top=40,left=40,width=240,height=90,resizable=no;"); + if (navigator.appName == "Microsoft Internet Explorer") + window.location.hash = "quickreply"; + else + window.location.hash = "#quickreply"; + } +} + +var smileys = [ +[ +[":cry:","12.gif",":cry:"], + [":rage:","13.gif",":rage:"], + [":B","14.gif",":B"], + [":roll:","15.gif",":roll:"], + [":ooi:","5.gif",":ooi:"], + [":wink:","16.gif",":wink:"], + [":yes:","17.gif",":yes:"], + [":bot:","18.gif",":bot:"], + [":ir:","9.gif","I roll!"], + [":z)","19.gif",":z)"], + [":arrow:","20.gif",":arrow:"], + [":vip:","21.gif",":vip:"], + [":Heppy:","22.gif",":Heppy:"], + [":think:","23.gif",":think:"], + [":bye:","24.gif",":bye:"], + [":roul:","25.gif",":roul:"], + [":pst:","26.gif",":pst:"]], + [ + [":o","27.gif",":o"], + [":closed:","28.gif",":closed:"], + [":cens:","29.gif",":cens:"], + [":tani:","30.gif",":tani:"], + [":appl:","31.gif",":appl:"], + [":idnk:","32.gif",":idnk:"], + [":sing:","33.gif",":sing:"], + [":shock:","34.gif",":shock:"], + [":res:","36.gif",":res:"], + [":alc:","37.gif",":alc:"], + [":lam:","38.gif",":lam:"], + [":box:","39.gif",":box:"], + [":tom:","40.gif",":tom:"], + [":lol:","41.gif",":lol:"], + [":vill:","42.gif",":vill:"]], + [ + [":idea:","43.gif",":idea:"], + [":E","45.gif",":E"], + [":horns:","47.gif",":horns:"], + [":poz:","49.gif",":poz:"], + [":meg:","51.gif",":meg:"], + [":dj:","52.gif",":dj:"], + [":rul:","53.gif",":rul:"], + [":sp:","55.gif",":sp:"], + [":stapp:","56.gif","Storm of applause"], + [":heart:","58.gif","Heart"], + [":kiss:","59.gif","Kiss"]], + [ + [":spam:","60.gif","Spam"], + [":party:","61.gif","Party"], + [":ser:","62.gif","Song"], + [":eam:","63.gif","Dream"], + [":gift:","64.gif","Gift"], + [":adore:","65.gif","I adore"], + [":pie:","66.gif","Pie"], + [":egg:","67.gif","Egg"], + [":cnrt:","68.gif","Concert"], + [":oftop:","69.gif","Off Topic"], + [":foo:","70.gif","Football"], + [":mob:","71.gif","Cellular"], + [":hoo:","72.gif","Not hooligan"], + [":tog:","73.gif","Together"], + [":pnk:","74.gif","Pancake"], + [":pati:","75.gif","Party Time"]], + [ + [":-({|=:","76.gif","I here"], + [":haaw:","77.gif","Head about a wall"], + [":angel:","78.gif","Angel"], + [":kil:","79.gif","killer"], + [":died:","80.gif","Cemetery"], + [":cof:","81.gif","Coffee"], + [":fruit:","82.gif","Forbidden fruit"], + [":tease:","83.gif","To tease"], + [":evil:","84.gif","Devil"], + [":exc:","85.gif","Excellently"], + [":niah:","86.gif","Not I, and he"], + [":Head:","87.gif","Studio"], + [":gl:","88.gif","girl"], + [":granat:","89.gif","Pomegranate"], + [":gans:","90.gif","Gangster"], + [":user:","91.gif","User"]], + [ + [":ny:","92.gif","New year"], + [":mvol:","93.gif","Megavolt"], + [":boat:","94.gif","In a boat"], + [":phone:","95.gif","Phone"], + [":cop:","96.gif","Cop"], + [":smok:","97.gif","Smoking"], + [":bic:","98.gif","Bicycle"], + [":ban:","99.gif","Ban?"], + [":bar:","100.gif",":bar:"]]]; +var smileyPopupWindow; + +function moreSmileys() +{ + var row, i; + + if (smileyPopupWindow) + smileyPopupWindow.close(); + + smileyPopupWindow = window.open("", "add_smileys", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=480,height=220,resizable=yes"); + smileyPopupWindow.document.write('\n'); + smileyPopupWindow.document.write('\n\t\n\t\tДополнительные смайлики\n\t\t\n\t'); + smileyPopupWindow.document.write('\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
    Выбрать смайлик
    '); + + for (row = 0; row < smileys.length; row++) + { + for (i = 0; i < smileys[row].length; i++) + { + smileys[row][i][2] = smileys[row][i][2].replace(/"/g, '"'); + smileyPopupWindow.document.write('' + smileys[row][i][2] + ' '); + } + smileyPopupWindow.document.write("
    "); + } + + smileyPopupWindow.document.write('
    Закрыть окно
    \n\t\n'); + smileyPopupWindow.document.close(); +} + diff --git a/Themes/default/spellcheck.js b/Themes/default/spellcheck.js new file mode 100644 index 0000000..fb3b70d --- /dev/null +++ b/Themes/default/spellcheck.js @@ -0,0 +1,269 @@ +// Public functions -------------------------------- + +// spellCheck - spell check a field +function spellCheck(formName, fieldName, spelltext) +{ + var spellform = document.forms['spell_form']; + + spellform.spell_formname.value = formName; + spellform.spell_fieldname.value = fieldName; + spellform.spellstring.value = document.forms[formName][fieldName].value; + + openSpellWin(640, 480); + spellform.submit(); + + return true; +} + +// Private functions ------------------------------- + +// globals +var wordindex = -1, offsetindex = 0; +var ignoredWords = []; + +// misspelled word object +function misp(word, start, end, suggestions) +{ + // The word, start index, end index, and array of suggestions. + this.word = word; + this.start = start; + this.end = end; + this.suggestions = suggestions; +} + +// replace the word in the misps array at the "wordindex" index. The +// misps array is generated by a PHP script after the string to be spell +// checked is evaluated with pspell +function replaceWord() +{ + var frm = document.fm1; + var strstart = ''; + var strend; + + // if this isn't the beginning of the string then get all of the string + // that is before the word we are replacing + if (misps[wordindex].start != 0) + strstart = mispstr.slice(0, misps[wordindex].start + offsetindex); + + // get the end of the string after the word we are replacing + strend = mispstr.slice(misps[wordindex].end + 1 + offsetindex); + + // rebuild the string with the new word + mispstr = strstart + frm.changeto.value + strend; + + // update offsetindex to compensate for replacing a word with a word + // of a different length. + offsetindex += frm.changeto.value.length - misps[wordindex].word.length; + + // update the word so future replaceAll calls don't change it + misps[wordindex].word = frm.changeto.value; + + nextWord(false); +} + +// replaces all instances of currently selected word with contents chosen by user. +// note: currently only replaces words after highlighted word. I think we can re-index +// all words at replacement or ignore time to have it wrap to the beginning if we want +// to. +function replaceAll() +{ + var frm = document.fm1; + var strstart = ''; + var strend; + var idx; + var origword; + var localoffsetindex = offsetindex; + + origword = misps[wordindex].word; + + // reindex everything past the current word + for (idx = wordindex; idx < misps.length; idx++) + { + misps[idx].start += localoffsetindex; + misps[idx].end += localoffsetindex; + } + + localoffsetindex = 0; + + for (idx = 0; idx < misps.length; idx++) + { + if (misps[idx].word == origword) + { + if (misps[idx].start != 0) + strstart = mispstr.slice(0, misps[idx].start + localoffsetindex); + + // get the end of the string after the word we are replacing + strend = mispstr.slice(misps[idx].end + 1 + localoffsetindex); + + // rebuild the string with the new word + mispstr = strstart + frm.changeto.value + strend; + + // update offsetindex to compensate for replacing a word with a word + // of a different length. + localoffsetindex += frm.changeto.value.length - misps[idx].word.length; + } + + // we have to re-index everything after replacements + misps[idx].start += localoffsetindex; + misps[idx].end += localoffsetindex; + } + + // add the word to the ignore array + ignoredWords[origword] = true; + + // reset offsetindex since we reindexed + offsetindex = 0; + + nextWord(false); +} + +// highlight the word that was selected using the nextWord function +function highlightWord() +{ + var strstart = ''; + var strend; + + // if this isn't the beginning of the string then get all of the string + // that is before the word we are replacing + + if (misps[wordindex].start != 0) + strstart = mispstr.slice(0, misps[wordindex].start + offsetindex); + + // get the end of the string after the word we are replacing + + strend = mispstr.slice(misps[wordindex].end + 1 + offsetindex); + + // rebuild the string with a span wrapped around the misspelled word + // so we can highlight it in the div the user is viewing the string in + + var divptr, newValue; + divptr = document.getElementById("spellview"); + + newValue = un_htmlspecialchars(strstart) + '' + misps[wordindex].word + '' + un_htmlspecialchars(strend); + setInnerHTML(divptr, newValue.replace(/_\|_/g, '
    ')); + + var spellview_height = typeof(document.getElementById("spellview").currentStyle) != "undefined" ? parseInt(document.getElementById("spellview").currentStyle.height) : document.getElementById("spellview").offsetHeight; + var word_position = document.getElementById("h1").offsetTop; + var current_position = document.getElementById("spellview").scrollTop; + + // The spellview is not tall enough! Scroll down! + if (spellview_height <= (word_position + current_position)) + document.getElementById("spellview").scrollTop = word_position + current_position - spellview_height + 32; +} + +// Called by onLoad handler to start the process of evaluating misspelled words. +function startsp() +{ + nextWord(false); +} + +function getCorrectedText() +{ + return mispstr; +} + +// Display the next misspelled word to the user and populate the suggested spellings box. +function nextWord(ignoreall) +{ + var frm = document.fm1; + var sug = document.fm1.suggestions; + var sugidx = 0; + var newopt; + var isselected = 0; + + // Push ignored word onto ignoredWords array. + if (ignoreall) + ignoredWords[misps[wordindex].word] = true; + + // update the index of all words we have processed + // This must be done to accomodate the replaceAll function. + if (wordindex >= 0) + { + misps[wordindex].start += offsetindex; + misps[wordindex].end += offsetindex; + } + + // increment the counter for the array of misspelled words + wordindex++; + + // draw it and quit if there are no more misspelled words to evaluate + if (misps.length <= wordindex) + { + var divptr; + divptr = document.getElementById("spellview"); + setInnerHTML(divptr, un_htmlspecialchars(mispstr).replace(/_\|_/g, "
    ")); + + clearBox(sug); + alert(txt['done']); + frm.change.disabled = true; + frm.changeall.disabled = true; + frm.ignore.disabled = true; + frm.ignoreall.disabled = true; + + // put line feeds back + mispstr = mispstr.replace(/_\|_/g, "\n"); + + // get a handle to the field we need to re-populate + window.opener.document.forms[spell_formname][spell_fieldname].value = mispstr; + window.close(); + return true; + } + + // check to see if word is supposed to be ignored + if (typeof(ignoredWords[misps[wordindex].word]) != "undefined") + { + nextWord(false); + return false; + } + + // clear out the suggestions box + clearBox(sug); + + // re-populate the suggestions box if there are any suggested spellings for the word + if (misps[wordindex].suggestions.length) + { + for (sugidx = 0; sugidx < misps[wordindex].suggestions.length; sugidx++) + { + if (sugidx == 0) + isselected = 1; + else + isselected = 0; + newopt = new Option(misps[wordindex].suggestions[sugidx], misps[wordindex].suggestions[sugidx], 0, isselected); + sug.options[sugidx] = newopt; + + if (isselected) + { + frm.changeto.value = misps[wordindex].suggestions[sugidx]; + frm.changeto.select(); + } + } + } + highlightWord(); + + return false; +} + +function un_htmlspecialchars(thetext) +{ + thetext = thetext.replace(/\/g, ">"); + thetext = thetext.replace(/\n/g, "
    "); + thetext = thetext.replace(/\ \ /g, "  "); + + return thetext; +} + +// remove all items from the suggested spelling box +function clearBox(box) +{ + var length = box.length; + + // delete old options -- remember that select boxes automatically re-index + for (var i = 0; i < length; i++) + box.options[0] = null; +} + +function openSpellWin(width, height) +{ + window.open("", "spellWindow", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + width + ",height=" + height); +} \ No newline at end of file diff --git a/Themes/default/style.css b/Themes/default/style.css new file mode 100644 index 0000000..1bc72b6 --- /dev/null +++ b/Themes/default/style.css @@ -0,0 +1,307 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #FFC246; + text-decoration: underline; +} +a:hover +{ + color: #FFFFFF; + text-decoration: underline; +} + +.karma, .karma:link, .karma:visited +{ + font-size: 11px; + color: #D2D2D2; + text-decoration: none; +} + +.header, .header:link, .header:visited +{ + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + font-size: 11px; + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +a.nav:hover, a.karma:hover +{ + text-decoration: underline; +} + +.mapProfile {color: black;} + +a.mapProfile {color: blue;} + + +/* Tables should show empty cells. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Tahoma in black. */ +body, td +{ + color: #C5C9CF; + font-size: small; + font-family: Tahoma, arial, helvetica, sans-serif; +} + +/* The main body of the entire forum. */ +body +{ + background-color: #434343; + margin: 0px; + padding: 0px; + width: 100%; + text-align: center; +} + +#wrapper +{ + text-align: left; + margin: auto; +/* width: 90%;*/ + min-width: 700px; + max-width: 1000px; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea, button +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 13px; + font-weight: normal; + padding: 2px; +} + +/* All input elements that are checkboxes or radio buttons. */ +input.check +{ +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 11px; + font-weight: normal; + padding: 0px; +} + +/* Standard horizontal rule.. ([hr], etc.) */ +hr, .hrcolor +{ + height: 1px; + border: 0; + color: #000000; + background-color: #000000; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #F6F6F6; + background-color: #5C5C5C; + border: 1px solid #000000; + margin: 1px; + padding: 1px; +/* font-size: x-small;*/ +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid #000000; + padding: 1px; + font-family: "courier new", helvetica, "times new roman", sans-serif; +/* font-size: x-small;*/ + width: 99%; + margin: 1px auto 1px auto; + white-space: nowrap; + overflow: auto; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #c5c9cf; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help +{ + cursor: help; +} + +/* /me uses this a lot. (emote, try typing /me in a post.) */ +.meaction +{ + color: red; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 96%; +} + +/* Highlighted text - such as search results ;). */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds for posts, and several other sections of the forum. */ +.windowbg +{ + color: #C5C9CF; + background-color: #4D4D4D; +} +.windowbg2 +{ + color: #C5C9CF; + background-color: #575757; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature +{ +overflow: hidden; +width: 100%; +padding-bottom: 3px; +max-height: 70px; +height:expression(this.offsetHeight>70 ? "70px" : "auto"); +} + +/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + color: white; + font-style: normal; + text-decoration: none; + background-color: #313131; +} +.titlebg a:hover +{ + color: #dfdfdf; +} + +.catbg, .catbg2 +{ + font-weight: bold; + background-color: #384658; + color: #ffffff; +} + +/* This is used for tables that have a grid/border background color (such as the topic listing.) */ +.bordercolor +{ + background-color: #313131; +} + +/* This is used on tables that should just have a border around them. */ +.tborder +{ + border: 0px solid #313131; + background-color: #313131; + padding: 0px; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext +{ + font-size: x-small; + font-family: Tahoma, arial, helvetica, sans-serif; +} +.normaltext +{ +/* font-size: small;*/ +} +.largetext +{ + font-size: large; +} + +/* This is the white header area where the title, menu bars, and header boxes are. */ +#headerarea +{ + background-color: #434343; + border-bottom: 1px solid black; +} +/* This is the main area of the forum, the part that's gray. */ +/*#bodyarea +{ + background-color: #3F3F3F; +}*/ +/* And this is the bottom, where the copyright is, etc. */ +#footerarea +{ + color: black; + background-color: #3F3F3F; + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +/* This is for the special header boxes on the top (user info, key stats, news box.) */ +.headertitles +{ + background-color: #434343; + border: 1px solid #434343; +} +.headerbodies +{ + border: 1px solid #000000; + background-color: #575757; + background-repeat: repeat-x; + background-position: bottom; +} +.online { + color: lightgreen; + font-weight: bold; + font-family: Tahoma, arial, helvetica, sans-serif; + font-size: x-small; +} +.penalty { + color: white; + font-size: small; + font-weight: bold; +} +.ban { + background-color: red; +} +.read-only { + background-color: orange; +} +.warning { + background-color: green; +} + +.b { + font-weight: bold; +} +.i { + font-style: italic; +} diff --git a/Themes/default/style.css.backup b/Themes/default/style.css.backup new file mode 100644 index 0000000..a7d8500 --- /dev/null +++ b/Themes/default/style.css.backup @@ -0,0 +1,291 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #FFC246; + text-decoration: underline; +} +a:hover +{ + color: #FFFFFF; + text-decoration: underline; +} + +.karma, .karma:link, .karma:visited +{ + font-size: 11px; + color: #D2D2D2; + text-decoration: none; +} + +.header, .header:link, .header:visited +{ + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + font-size: 11px; + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +a.nav:hover, a.karma:hover +{ + text-decoration: underline; +} + +.mapProfile {color: black;} + +a.mapProfile {color: blue;} + + +/* Tables should show empty cells. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Tahoma in black. */ +body, td +{ + color: #C5C9CF; + font-size: small; + font-family: Tahoma, arial, helvetica, sans-serif; +} + +/* The main body of the entire forum. */ +body +{ + background-color: #434343; + margin: 0px; + padding: 0px; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea, button +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 13px; + font-weight: normal; + padding: 2px; +} + +/* All input elements that are checkboxes or radio buttons. */ +input.check +{ +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 11px; + font-weight: normal; + padding: 0px; +} + +/* Standard horizontal rule.. ([hr], etc.) */ +hr, .hrcolor +{ + height: 1px; + border: 0; + color: #000000; + background-color: #000000; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #F6F6F6; + background-color: #5C5C5C; + border: 1px solid #000000; + margin: 1px; + padding: 1px; +/* font-size: x-small;*/ +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid #000000; + padding: 1px; + font-family: "courier new", helvetica, "times new roman", sans-serif; +/* font-size: x-small;*/ + width: 99%; + margin: 1px auto 1px auto; + white-space: nowrap; + overflow: auto; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #c5c9cf; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help +{ + cursor: help; +} + +/* /me uses this a lot. (emote, try typing /me in a post.) */ +.meaction +{ + color: red; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 96%; +} + +/* Highlighted text - such as search results ;). */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds for posts, and several other sections of the forum. */ +.windowbg +{ + color: #C5C9CF; + background-color: #4D4D4D; +} +.windowbg2 +{ + color: #C5C9CF; + background-color: #575757; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature +{ +overflow: hidden; +width: 100%; +padding-bottom: 3px; +max-height: 70px; +height:expression(this.offsetHeight>70 ? "70px" : "auto"); +} + +/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + color: white; + font-style: normal; + text-decoration: none; + background-color: #313131; +} +.titlebg a:hover +{ + color: #dfdfdf; +} + +.catbg, .catbg2 +{ + font-weight: bold; + background-color: #384658; + color: #ffffff; +} + +/* This is used for tables that have a grid/border background color (such as the topic listing.) */ +.bordercolor +{ + background-color: #313131; +} + +/* This is used on tables that should just have a border around them. */ +.tborder +{ + border: 0px solid #313131; + background-color: #313131; + padding: 0px; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext +{ + font-size: x-small; + font-family: Tahoma, arial, helvetica, sans-serif; +} +.normaltext +{ +/* font-size: small;*/ +} +.largetext +{ + font-size: large; +} + +/* This is the white header area where the title, menu bars, and header boxes are. */ +#headerarea +{ + background-color: #434343; + border-bottom: 1px solid black; +} +/* This is the main area of the forum, the part that's gray. */ +#bodyarea +{ + background-color: #3F3F3F; +} +/* And this is the bottom, where the copyright is, etc. */ +#footerarea +{ + color: black; + background-color: #3F3F3F; + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +/* This is for the special header boxes on the top (user info, key stats, news box.) */ +.headertitles +{ + background-color: #434343; + border: 1px solid #434343; +} +.headerbodies +{ + border: 1px solid #000000; + background-color: #575757; + background-repeat: repeat-x; + background-position: bottom; +} +.online { + background-color: green; + color: white; + font-weight: bold; + font-family: Tahoma, arial, helvetica, sans-serif; + font-size: x-small; +} +.penalty { + color: white; + font-size: small; + font-weight: bold; +} +.ban { + background-color: red; +} +.read-only { + background-color: orange; +} +.warning { + background-color: green; +} + diff --git a/Themes/default/style.fixed.css b/Themes/default/style.fixed.css new file mode 100644 index 0000000..6165aa1 --- /dev/null +++ b/Themes/default/style.fixed.css @@ -0,0 +1,333 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #FFC246; + text-decoration: underline; +} +a:hover +{ + color: #FFFFFF; + text-decoration: underline; +} + +.karma, .karma:link, .karma:visited +{ + font-size: 11px; + color: #D2D2D2; + text-decoration: none; +} + +.header, .header:link, .header:visited +{ + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + font-size: 11px; + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +a.nav:hover, a.karma:hover +{ + text-decoration: underline; +} + +.mapProfile {color: black;} + +a.mapProfile {color: blue;} + + +/* Tables should show empty cells. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Tahoma in black. */ +body, td +{ + color: #C5C9CF; +/* font-size: small;*/ + font-size: small; + font-family: Tahoma, arial, helvetica, sans-serif; +} + +/* The main body of the entire forum. */ +body +{ + background-color: #434343; + margin: 0px; + padding: 0px; + width: 100%; + text-align: center; +} + +#wrapper +{ + text-align: left; + margin: auto; +/* width: 90%;*/ + min-width: 700px; + max-width: 1000px; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea, button +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; +/* font-family: Verdana, Arial; + font-size: 13px;*/ + font-weight: normal; + padding: 2px; +} + +/* All input elements that are checkboxes or radio buttons. */ +input.check +{ +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; +/* font-family: Verdana, Arial; + font-size: 11px;*/ + font-weight: normal; + padding: 0px; +} + +/* Standard horizontal rule.. ([hr], etc.) */ +hr, .hrcolor +{ + height: 1px; + border: 0; + color: #000000; + background-color: #000000; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #F6F6F6; + background-color: #5C5C5C; + border: 1px solid #000000; + margin: 1px; + padding: 1px; +/* font-size: x-small;*/ +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid #000000; + padding: 1px; + font-family: "courier new", helvetica, "times new roman", sans-serif; +/* font-size: x-small;*/ + width: 99%; + margin: 1px auto 1px auto; + white-space: nowrap; + overflow: auto; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #c5c9cf; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help +{ + cursor: help; +} + +/* /me uses this a lot. (emote, try typing /me in a post.) */ +.meaction +{ + color: red; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 96%; +} + +/* Highlighted text - such as search results ;). */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds for posts, and several other sections of the forum. */ +.windowbg +{ + color: #C5C9CF; + background-color: #4D4D4D; +} +.windowbg2 +{ + color: #C5C9CF; + background-color: #575757; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature +{ +overflow: hidden; +width: 100%; +padding-bottom: 3px; +max-height: 70px; +height:expression(this.offsetHeight>70 ? "70px" : "auto"); +} + +/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + color: white; + font-style: normal; + text-decoration: none; + background-color: #313131; +} +.titlebg a:hover +{ + color: #dfdfdf; +} + +.catbg, .catbg2 +{ + font-weight: bold; + background-color: #384658; + color: #ffffff; +} + +/* This is used for tables that have a grid/border background color (such as the topic listing.) */ +.bordercolor +{ + background-color: #313131; +} + +/* This is used on tables that should just have a border around them. */ +.tborder +{ + border: 0px solid #313131; + background-color: #313131; + padding: 0px; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext +{ + font-size: 90%; +} +.normaltext +{ +/* font-size: small;*/ +} +.largetext +{ + font-size: 110%; +} + +/* This is the white header area where the title, menu bars, and header boxes are. */ +#headerarea +{ + background-color: #434343; + border-bottom: 1px solid black; +} +/* This is the main area of the forum, the part that's gray. */ +/*#bodyarea +{ + background-color: #3F3F3F; +}*/ +/* And this is the bottom, where the copyright is, etc. */ +#footerarea +{ + color: black; + background-color: #3F3F3F; + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +/* This is for the special header boxes on the top (user info, key stats, news box.) */ +.headertitles +{ + background-color: #434343; + border: 1px solid #434343; +} +.headerbodies +{ + border: 1px solid #000000; + background-color: #575757; + background-repeat: repeat-x; + background-position: bottom; +} +.online { + color: lightgreen; + font-weight: bold; + font-size: x-small; +} +.penalty { + color: white; + font-size: small; + font-weight: bold; +} +.ban { + background-color: red; +} +.read-only { + background-color: orange; +} +.warning { + background-color: green; +} + +.b { + font-weight: bold; +} +.i { + font-style: italic; +} +.hidden { + display: none; +} +.subtitle { + color: white; + font-style: italic; +} +.topiclink { + border: 1px solid #313131; + padding: 5px; + margin: 5px 0; +} +.odd { + background-color: #575757; +} +.newposts { + left: -40px; + position: relative; + margin-right: -27px; +} +.topiclink img { + vertical-align: middle; +} + +.message-container img { + max-width: 100%; +} diff --git a/Themes/default/style.liquid.css b/Themes/default/style.liquid.css new file mode 100644 index 0000000..3f71b76 --- /dev/null +++ b/Themes/default/style.liquid.css @@ -0,0 +1,324 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #FFC246; + text-decoration: underline; +} +a:hover +{ + color: #FFFFFF; + text-decoration: underline; +} + +.karma, .karma:link, .karma:visited +{ + font-size: 11px; + color: #D2D2D2; + text-decoration: none; +} + +.header, .header:link, .header:visited +{ + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + font-size: 11px; + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +a.nav:hover, a.karma:hover +{ + text-decoration: underline; +} + +.mapProfile {color: black;} + +a.mapProfile {color: blue;} + + +/* Tables should show empty cells. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Tahoma in black. */ +body, td +{ + color: #C5C9CF; + font-size: small; + font-family: Tahoma, arial, helvetica, sans-serif; +} + +/* The main body of the entire forum. */ +body +{ + background-color: #434343; + margin: 0px; + padding: 0px; + width: 100%; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea, button +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 13px; + font-weight: normal; + padding: 2px; +} + +/* All input elements that are checkboxes or radio buttons. */ +input.check +{ +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 11px; + font-weight: normal; + padding: 0px; +} + +/* Standard horizontal rule.. ([hr], etc.) */ +hr, .hrcolor +{ + height: 1px; + border: 0; + color: #000000; + background-color: #000000; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #F6F6F6; + background-color: #5C5C5C; + border: 1px solid #000000; + margin: 1px; + padding: 1px; +/* font-size: x-small;*/ +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid #000000; + padding: 1px; + font-family: "courier new", helvetica, "times new roman", sans-serif; +/* font-size: x-small;*/ + width: 99%; + margin: 1px auto 1px auto; + white-space: nowrap; + overflow: auto; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #c5c9cf; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help +{ + cursor: help; +} + +/* /me uses this a lot. (emote, try typing /me in a post.) */ +.meaction +{ + color: red; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 96%; +} + +/* Highlighted text - such as search results ;). */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds for posts, and several other sections of the forum. */ +.windowbg +{ + color: #C5C9CF; + background-color: #4D4D4D; +} +.windowbg2 +{ + color: #C5C9CF; + background-color: #575757; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature +{ +overflow: hidden; +width: 100%; +padding-bottom: 3px; +max-height: 70px; +height:expression(this.offsetHeight>70 ? "70px" : "auto"); +} + +/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + color: white; + font-style: normal; + text-decoration: none; + background-color: #313131; +} +.titlebg a:hover +{ + color: #dfdfdf; +} + +.catbg, .catbg2 +{ + font-weight: bold; + background-color: #384658; + color: #ffffff; +} + +/* This is used for tables that have a grid/border background color (such as the topic listing.) */ +.bordercolor +{ + background-color: #313131; +} + +/* This is used on tables that should just have a border around them. */ +.tborder +{ + border: 0px solid #313131; + background-color: #313131; + padding: 0px; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext +{ + font-size: x-small; + font-family: Tahoma, arial, helvetica, sans-serif; +} +.normaltext +{ +/* font-size: small;*/ +} +.largetext +{ + font-size: 110%; +} + +/* This is the white header area where the title, menu bars, and header boxes are. */ +#headerarea +{ + background-color: #434343; + border-bottom: 1px solid black; +} +/* This is the main area of the forum, the part that's gray. */ +/*#bodyarea +{ + background-color: #3F3F3F; +}*/ +/* And this is the bottom, where the copyright is, etc. */ +#footerarea +{ + color: black; + background-color: #3F3F3F; + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +/* This is for the special header boxes on the top (user info, key stats, news box.) */ +.headertitles +{ + background-color: #434343; + border: 1px solid #434343; +} +.headerbodies +{ + border: 1px solid #000000; + background-color: #575757; + background-repeat: repeat-x; + background-position: bottom; +} +.online { + color: lightgreen; + font-weight: bold; + font-family: Tahoma, arial, helvetica, sans-serif; + font-size: x-small; +} +.penalty { + color: white; + font-size: small; + font-weight: bold; +} +.ban { + background-color: red; +} +.read-only { + background-color: orange; +} +.warning { + background-color: green; +} + +.b { + font-weight: bold; +} +.i { + font-style: italic; +} +.hidden { + display: none; +} +.topiclink { + border: 1px solid #313131; + padding: 5px; + margin: 5px 0; +} +.odd { + background-color: #575757; +} +.newposts { + left: -40px; + position: relative; + margin-right: -27px; +} +.topiclink img { + vertical-align: middle; +} +.subtitle { + color: white; + font-style: italic; +} + +.message-container img { + max-width: 100%; +} diff --git a/Themes/default/wireless.css b/Themes/default/wireless.css new file mode 100644 index 0000000..81ad3a6 --- /dev/null +++ b/Themes/default/wireless.css @@ -0,0 +1,34 @@ +.catbg, tr.catbg td +{ + background-color: #6d92aa; + color: #ffffff; +} + +.titlebg, .titlebg a, .titlebg a:link, .titlebg a:visited +{ + background-color: #b6dbff; + color: #000000; + text-decoration: none; +} + +.windowbg, tr.windowbg td +{ + background-color: #ffffff; + color: #000000; +} +.windowbg2, tr.windowbg2 td +{ + background-color: #c0c0c0; + color: #000000; +} + +.new, a:link.new, a:visited.new +{ + background-color: #2f2fc0; + color: #ffffff; +} + +.updated +{ + color: #ff0000; +} \ No newline at end of file diff --git a/Themes/fixed/Admin.template.php b/Themes/fixed/Admin.template.php new file mode 100755 index 0000000..fae24e5 --- /dev/null +++ b/Themes/fixed/Admin.template.php @@ -0,0 +1,930 @@ + + + '; + + // For every section that appears on the sidebar... + foreach ($context['admin_areas'] as $section) + { + // Show the section header - and pump up the line spacing for readability. + echo ' + + + + + + '; + } + + // This is where the actual "main content" area for the admin section starts. + echo ' +
    ', $section['title'], '
    '; + + // For every area of this section show a link to that area (bold if it's currently selected.) + foreach ($section['areas'] as $i => $area) + { + // Is this the current area, or just some area? + if ($i == $context['admin_area']) + echo ' + ', $area, '
    '; + else + echo ' + ', $area, '
    '; + } + + echo ' +
    + + '; +} + +// Part of the admin layer - used with admin_above to close the table started in it. +function template_admin_below() +{ + global $context, $settings, $options; + + echo ' + + + '; +} + +// This is the administration center home. +function template_admin() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + // Welcome message for the admin. + echo ' + + + + + + +
    ', $txt[208], '
    + ', $txt['hello_guest'], ' ', $context['user']['name'], '! +
    ', $txt[644], '
    +
    '; + + // Is there an update available? + echo ' + '; + + echo ' + '; + + // Display the "live news" from simplemachines.org. + echo ' + + '; + + // Show the user version information from their server. + echo ' + +
    + + + + + + +
    + ', $txt[119], ' ', $txt['smf217'], ' +
    +
    ', $txt['lfyi'], '
    +
    +
      + + + + + + +
    ', $txt['support_title'], '
    + ', $txt['support_versions'], ':
    + ', $txt['support_versions_forum'], ': + ', $context['forum_version'], '
    + ', $txt['support_versions_current'], ': + ??
    + ', $context['can_admin'] ? '' . $txt['dvc_more'] . '' : '', '
    '; + + // Display all the members who can administrate the forum. + echo ' +
    + ', $txt[684] . ': + ', implode(', ', $context['administrators']), ' +
    +
    '; + + echo ' + + '; + + $row = false; + foreach ($context['quick_admin_tasks'] as $task) + { + echo ' + '; + + if ($row && !$task['is_last']) + echo ' + + '; + + $row = !$row; + } + + echo ' + +
    +
    ', $task['link'], '
    + ', $task['description'], ' +
    '; + + // The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization. + echo ' + + '; + + // This sets the announcements and current versions themselves ;). + echo ' + '; +} + +// Show some support information and credits to those who helped make this. +function template_credits() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Show the user version information from their server. + echo ' + + + + + + +
    ', $txt['support_title'], '
    + ', $txt['support_versions'], ':
    + ', $txt['support_versions_forum'], ': + ', $context['forum_version'], '', $context['can_admin'] ? ' ' . $txt['dvc_more'] . '' : '', '
    + ', $txt['support_versions_current'], ': + ??
    '; + + // Display all the variables we have server information for. + foreach ($context['current_versions'] as $version) + echo ' + ', $version['title'], ': + ', $version['version'], '
    '; + + echo ' + +
    '; + + // Display latest support questions from simplemachines.org. + echo ' + + + + + + +
    ', $txt[119], ' ', $txt['support_latest'], '
    +
    ', $txt['support_latest_fetch'], '
    +
    '; + + // The most important part - the credits :P. + echo ' + + + + + + +
    ', $txt[571], '
    ', $context['credits'], '
    '; + + // This makes all the support information available to the support script... + echo ' + + + + '; + + // This setsthe latest support stuff. + echo ' + '; +} + +// Form for editing current news on the site. +function template_edit_news() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + + + '; + + // Loop through all the current news items so you can edit/remove them. + foreach ($context['admin_current_news'] as $admin_news) + echo ' + + + '; + + // This provides an empty text box to add a news item to the site. + echo ' + + + + +
    + ', $txt[119], ' ', $txt[7], ' +
    ', $txt[670], '
    ', $txt[507], '
    +
    +
    +
    ', $admin_news['parsed'], '
    +
    + +
    + + + + +
    + +
    '; +} + +// Form for editing the agreement shown for people registering to the forum. +function template_edit_agreement() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Just a big box to edit the text file ;). + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' ', $txt['smf11'], ' +
    '; + + // Warning for if the file isn't writable. + if (!empty($context['warning'])) + echo ' +
    ', $context['warning'], '
    '; + + echo ' + ', $txt['smf12'], ' +
    '; + + // Show the actual agreement in an oversized text box. + echo ' +
    +
    +
    + +
    + +
    '; +} + +// Displays information about file versions installed, and compares them to current version. +function template_view_versions() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + + + + + + + +
    ', $txt[429], '
    ', $txt['dvc1'], '
    + + + + '; + + // The current version of the core SMF package. + echo ' + + + '; + + // Now list all the source file versions, starting with the overall version (if all match!). + echo ' + + + +
    ', $txt[495], '', $txt['dvc_your'], '', $txt['dvc_current'], '
    ', $txt[496], '', $context['forum_version'], '??
    ', $txt['dvc_sources'], '????
    + '; + + // Loop through every source file displaying its version - using javascript. + foreach ($context['file_versions'] as $filename => $version) + echo ' + + + '; + + // Default template files. + echo ' +
    ', $filename, '', $version, '??
    + + + + +
    ', $txt['dvc_default'], '????
    + '; + + foreach ($context['default_template_versions'] as $filename => $version) + echo ' + + + '; + + // Now the language files... + echo ' +
    ', $filename, '', $version, '??
    + + + + +
    ', $txt['dvc_languages'], '????
    + '; + + foreach ($context['default_language_versions'] as $language => $files) + { + foreach ($files as $filename => $version) + echo ' + + + '; + } + + echo ' +
    ', $filename, '.', $language, '.php', $version, '??
    '; + + // Finally, display the version information for the currently selected theme - if it is not the default one. + if (!empty($context['template_versions'])) + { + echo ' + + + + +
    ', $txt['dvc_templates'], '????
    + '; + + foreach ($context['template_versions'] as $filename => $version) + echo ' + + + '; + + echo ' +
    ', $filename, '', $version, '??
    '; + } + + echo ' +
    '; + + /* Below is the hefty javascript for this. Upon opening the page it checks the current file versions with ones + held at simplemachines.org and works out if they are up to date. If they aren't it colors that files number + red. It also contains the function, swapOption, that toggles showing the detailed information for each of the + file catorgories. (sources, languages, and templates.) */ + echo ' + + '; + + // Internet Explorer 4 is tricky, it won't set any innerHTML until after load. + if ($context['browser']['is_ie4']) + echo ' + '; + else + echo ' + '; +} + +// Form for stopping people using naughty words, etc. +function template_edit_censored() +{ + global $context, $settings, $options, $scripturl, $txt; + + // First section is for adding/removing words from the censored list. + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' ', $txt[135], ' +
    ', $txt[141], '
    + ', $txt[136], '
    '; + + // Show text boxes for censoring [bad ] => [good ]. + foreach ($context['censored_words'] as $vulgar => $proper) + echo ' +
    =>
    '; + + // Now provide a way to censor more words. + echo ' + + +
    +
    +
    +
    +
    +
    + +
    + + +
    '; + + // This table lets you test out your filters by typing in rude words and seeing what comes out. + echo ' + + + + + + +
    ', $txt['censor_test'], '
    + + +
    + +
    '; +} + +// Template for forum maintenance page. +function template_maintain() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Starts off with general maintenance procedures. + echo ' + + + + + + + '; + + // Backing up the database...? Good idea! + echo ' + + + + + + '; + + // Pruning any older posts. + echo ' + + + + + + +
    ', $txt[119], ' ', $txt['maintain_title'], ' - ', $txt['maintain_general'], '
    + ', $txt['maintain_optimize'], '
    + ', $txt['maintain_version'], '
    + ', $txt['maintain_errors'], '
    + ', $txt['maintain_recount'], '
    + ', $txt['maintain_logs'], '
    + +', $txt['maintain_karmalog'], '
    +
    ', $txt[119], ' ', $txt['maintain_title'], ' - ', $txt['maintain_backup'], '
    +
    +
    +
    +
    + +
    + + +
    +
    ', $txt[119], ' ', $txt['maintain_title'], ' - ', $txt['maintain_old'], '
    + '; + + // Bit of javascript for showing which boards to prune in an otherwise hidden list. + echo ' + '; + + // The otherwise hidden "choose which boards to prune". + echo ' +
    + ', $txt['maintain_old1'], '', $txt['maintain_old2'], '
    +
    + + ', $txt['maintain_old_all'], ' + + +
    + +
    +
    '; + + // Pop up a box to say function completed if the user has been redirected back here from a function they ran. + if ($context['maintenance_finished']) + echo ' + '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/BoardIndex.template.php b/Themes/fixed/BoardIndex.template.php new file mode 100755 index 0000000..0447e12 --- /dev/null +++ b/Themes/fixed/BoardIndex.template.php @@ -0,0 +1,529 @@ + + + ', theme_linktree(), ' + '; + if (!$settings['show_sp1_info']) + echo ' + ', $txt[19], ': ', $modSettings['memberCount'], '  •  ', $txt[95], ': ', $modSettings['totalMessages'], '  •  ', $txt[64], ': ', $modSettings['totalTopics'], ' + ', ($settings['show_latest_member'] ? '
    ' . $txt[201] . ' ' . $context['latest_member']['link'] . '' . $txt[581] : ''); + echo ' + + +'; + + + // Show the news fader? (assuming there are things to show...) + // REMOVE THE ZERO!!! + if ($settings['show_newsfader'] && !empty($context['fader_news_lines'])) + { + echo ' +
    + + + + + + + +
    ', $txt[102], '
    '; + + // Prepare all the javascript settings. + echo ' +
    ', $context['news_lines'][0], '
    + + +
    +
    '; + } + + /* Each category in categories is made up of: + id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?), + new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge), + and boards. (see below.) */ + + $first=true; + + foreach ($context['categories'] as $category) + { + echo ' +
    + + + '; + + // Assuming the category hasn't been collapsed... + if (!$category['is_collapsed']) + { + /* Each board in each category's boards has: + new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.), + children (see below.), link_children (easier to use.), children_new (are they new?), + topics (# of), posts (# of), link, href, and last_post. (see below.) */ + foreach ($category['boards'] as $board) + { + echo ' + + + + + + '; + } + } + + echo ' +
    '; + + // If this category even can collapse, show a link to collapse it. + if ($category['can_collapse']) + echo ' + ', $category['collapse_image'], ''; + + echo ' + ', $category['link'], ' +
    '; + + // If the board is new, show a strong indicator. + if ($board['new']) + echo '', $txt[333], ''; + // This board doesn't have new posts, but its children do. + elseif ($board['children_new']) + echo '', $txt[333], ''; + // No new posts at all! The agony!! + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) + if (!empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) + if (!empty($board['children'])) + { + // Sort the links into an array with new boards bold so it can be imploded. + $children = array(); + /* Each child in each board's children has: + id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', $txt['parent_boards'], ': ', implode(', ', $children), '
    '; + } + + // Show some basic information about the number of posts, etc. + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + /* The board's and children's 'last_post's have: + time, timestamp (a number that represents the time.), id (of the post), topic (topic id.), + link, href, subject, start (where they should go for the first unread post.), + and member. (which has id, name, link, href, username in it.) */ + if (!empty($board['last_post']['id'])) + echo ' + ', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link']; + + echo ' +
    +
    '; + if($first && $context['user']['is_guest']) { + echo ' +
    + +

    '; + + $first=false; + } + + } + + if(/*$context['user']['is_guest'] || $context['user']['is_admin']*/false) + echo' +
    + + +

    '; + + if ($context['user']['is_logged']) + { + echo ' +
    + + + + +
    + ', $txt[333], ' + ', $txt[334], ' + '; + // Show the mark all as read button? + if ($settings['show_mark_read']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]), ''; + echo ' +
    '; + + } + + // Here's where the "Info Center" starts... + echo ' +
    +
    + + + '; + + // This is the "Recent Posts" bar. + if (!empty($settings['number_recent_posts'])) + { + echo ' + + + + + + + '; + } + + // Show information about events, birthdays, and holidays on the calendar. + if ($context['show_calendar']) + { + echo ' + + + + + + '; + } + + // Show a member bar. Not heavily ornate, but functional at least. + if ($settings['show_member_bar']) + { + echo ' + + + + + + + '; + } + + + +// Show YaBB SP1 style information... + if ($settings['show_sp1_info']) + { + echo ' + + + + + + + '; + } + + + /* if ($settings['show_sp1_info']) + { + echo ' + + + + + + + '; + }*/ +// "Users online" - in order of activity. + echo ' + + + + + + '; + + // If they are logged in, but SP1 style information is off... show a personal message bar. + if ($context['user']['is_logged'] && !$settings['show_sp1_info']) + { + echo ' + + + + + + '; + } + + // Show the login bar. (it's only true if they are logged out anyway.) + if ($context['show_login_bar']) + { + echo ' + + + + + + + '; + } + + echo ' +
    ', $txt[685], '
    ', $txt[214], '
    + + ', $txt[214], ' + '; + + // Only show one post. + if ($settings['number_recent_posts'] == 1) + { + // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.) + echo ' + ', $txt[214], ' +
    + ', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')
    +
    '; + } + // Show lots of posts. + elseif (!empty($context['latest_posts'])) + { + echo ' + '; + /* Each post in latest_posts has: + board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), + subject, short_subject (shortened with...), time, link, and href. */ + foreach ($context['latest_posts'] as $post) + echo ' + + + + + '; + echo ' +
    [', $post['board']['link'], ']', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '', $post['time'], '
    '; + } + echo ' +
    ', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '
    + + ', $txt['calendar24'], ' + + '; + + // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P. + if (!empty($context['calendar_holidays'])) + echo ' + ', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), '
    '; + + // People's birthdays. Like mine. And yours, I guess. Kidding. + if (!empty($context['calendar_birthdays'])) + { + echo ' + ', $context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], ' '; + /* Each member in calendar_birthdays has: + id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */ + foreach ($context['calendar_birthdays'] as $member) + echo ' + ', $member['is_today'] ? '' : '', $member['name'], $member['is_today'] ? '' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '
    ' : ', '; + } + // Events like community get-togethers. + if (!empty($context['calendar_events'])) + { + echo ' + ', $context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], ' '; + /* Each event in calendar_events should have: + title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */ + foreach ($context['calendar_events'] as $event) + echo ' + ', $event['can_edit'] ? '* ' : '', '', $event['is_today'] ? '' . $event['title'] . '' : $event['title'], '', $event['is_last'] ? '
    ' : ', '; + + // Show a little help text to help them along ;). + if ($context['calendar_can_edit']) + echo ' + (', $txt['calendar_how_edit'], ')'; + } + echo ' +
    +
    ', $txt[331], '
    + + ', $txt[332], ' + + ', $txt[332], ' +
    ', $txt[200], '
    +
    ', $txt[645], '
    + + ', $txt[645], ' + + + + +
    +
    ', $txt[490], ': ', $modSettings['totalTopics'], '
    ', $txt[489], ': ', $modSettings['totalMessages'], '
    ', !empty($context['latest_post']) ? ' + ' . $txt[659] . ': "' . $context['latest_post']['link'] . '" (' . $context['latest_post']['time'] . ')
    ' : '', ' + ', $txt[234], '', $context['show_stats'] ? '
    + ' . $txt['smf223'] . '' : '', ' +
    + ', $txt[488], ': ', $modSettings['memberCount'], '
    + ', $txt[656], ': ', $context['latest_member']['link'], '
    '; + // If they are logged in, show their unread message count, etc.. + if ($context['user']['is_logged']) + echo ' + ', $txt['smf199'], ': ', $context['user']['messages'], ' ', $txt['newmessages3'], ': ', $context['user']['unread_messages'], ''; + echo ' +
    +
    ', $txt[645], '
    + ', $txt[645], ' + + + ', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': ', $context['common_stats']['latest_member']['link'], ' +
    ' . $txt[659] . ': "' . $context['latest_post']['link'] . '" ( ' . $context['latest_post']['time'] . ' )
    + ', $txt[234], '', $context['show_stats'] ? '
    + ' . $txt['smf223'] . '' : '', ' + + '; + if ((!empty($modSettings['karmadescmod'])) && (empty($modSettings['karmaisowner']))) + { if ($context['show_karmastat']) + echo ' + '. $txt['statkarma'].'',' '; + } + elseif ((!empty($modSettings['karmadescmod'])) && ($context['user']['is_admin'])) + { if ($context['show_karmastat']) + echo ' + '. $txt['statkarma'].'',' '; +} + echo' +
    +
    ', $txt[158], '
    + + ', $txt[158], ' + + ', /*(empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '),*/ $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'], (empty($context['num_users_hidden']) ? '' : ' (' . $context['num_users_hidden'] . ' ' . $txt['hidden'] . ')'), '
    + '; + + // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link. + if (!empty($context['users_online'])) + echo ' + ', $txt[140], ':
    ', implode(', ', $context['list_users_online']); + + if (!empty($context['spiders'])) + { + if ($modSettings['ob_googlebot_display_own_list']) + echo ' +
    + ', $txt['ob_googlebot_spiders_last_active'], ':
    '; + else + { + if (empty($context['users_online'])) + echo ' + ', $txt[140], ':
    '; + else + echo ', '; + } + + echo implode(', ', $context['spiders']); + } + + echo ' +
    ', $context['show_stats'] && !$settings['show_sp1_info'] ? ' + ' . $txt['smf223'] . '' : '', ' +
    +
    ', $txt[159], '
    + + ', $txt[159], ' + + ', $txt[159], ' +
    + ', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' ', $txt[662], ' ', $txt[663], ' +
    +
    ', $txt[34], ' (' . $txt[315] . ')
    + + ', $txt[34], ' + +
    + + + + + + +
    + + + + + + + + + +
    +
    +
    '; +} + +?> diff --git a/Themes/fixed/BoardIndex.template.php~ b/Themes/fixed/BoardIndex.template.php~ new file mode 100644 index 0000000..920a839 --- /dev/null +++ b/Themes/fixed/BoardIndex.template.php~ @@ -0,0 +1,462 @@ + + + ', theme_linktree(), ' + '; + if (!$settings['show_sp1_info']) + echo ' + ', $txt[19], ': ', $modSettings['memberCount'], '  •  ', $txt[95], ': ', $modSettings['totalMessages'], '  •  ', $txt[64], ': ', $modSettings['totalTopics'], ' + ', ($settings['show_latest_member'] ? '
    ' . $txt[201] . ' ' . $context['latest_member']['link'] . '' . $txt[581] : ''); + echo ' + + +'; + + // Show the news fader? (assuming there are things to show...) + if ($settings['show_newsfader'] && !empty($context['fader_news_lines'])) + { + echo ' +
    + + + + + + + + +
    ', $txt[102], '
    '; + + // Prepare all the javascript settings. +/* echo ' +
    ', $context['news_lines'][0], '
    + + +
    +
    ';*/ + + } + + /* Each category in categories is made up of: + id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?), + new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge), + and boards. (see below.) */ + foreach ($context['categories'] as $category) + { + echo ' +
    + + + '; + + // Assuming the category hasn't been collapsed... + if (!$category['is_collapsed']) + { + /* Each board in each category's boards has: + new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.), + children (see below.), link_children (easier to use.), children_new (are they new?), + topics (# of), posts (# of), link, href, and last_post. (see below.) */ + foreach ($category['boards'] as $board) + { + echo ' + + + + + + '; + } + } + + echo ' +
    '; + + // If this category even can collapse, show a link to collapse it. + if ($category['can_collapse']) + echo ' + ', $category['collapse_image'], ''; + + echo ' + ', $category['link'], ' +
    '; + + // If the board is new, show a strong indicator. + if ($board['new']) + echo '', $txt[333], ''; + // This board doesn't have new posts, but its children do. + elseif ($board['children_new']) + echo '', $txt[333], ''; + // No new posts at all! The agony!! + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) + if (!empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) + if (!empty($board['children'])) + { + // Sort the links into an array with new boards bold so it can be imploded. + $children = array(); + /* Each child in each board's children has: + id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', $txt['parent_boards'], ': ', implode(', ', $children), '
    '; + } + + // Show some basic information about the number of posts, etc. + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + /* The board's and children's 'last_post's have: + time, timestamp (a number that represents the time.), id (of the post), topic (topic id.), + link, href, subject, start (where they should go for the first unread post.), + and member. (which has id, name, link, href, username in it.) */ + if (!empty($board['last_post']['id'])) + echo ' + ', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link']; + + echo ' +
    +
    '; + } + + if ($context['user']['is_logged']) + { + echo ' +
    + + + + +
    + ', $txt[333], ' + ', $txt[334], ' + '; + // Show the mark all as read button? + if ($settings['show_mark_read']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]), ''; + echo ' +
    '; + } + + // Here's where the "Info Center" starts... + echo ' +
    +
    + + + '; + + // This is the "Recent Posts" bar. + if (!empty($settings['number_recent_posts'])) + { + echo ' + + + + + + + '; + } + + // Show information about events, birthdays, and holidays on the calendar. + if ($context['show_calendar']) + { + echo ' + + + + + + '; + } + + // Show a member bar. Not heavily ornate, but functional at least. + if ($settings['show_member_bar']) + { + echo ' + + + + + + + '; + } + + + +// Show YaBB SP1 style information... + if ($settings['show_sp1_info']) + { + echo ' + + + + + + + '; + } + + + /* if ($settings['show_sp1_info']) + { + echo ' + + + + + + + '; + }*/ +// "Users online" - in order of activity. + echo ' + + + + + + '; + + // If they are logged in, but SP1 style information is off... show a personal message bar. + if ($context['user']['is_logged'] && !$settings['show_sp1_info']) + { + echo ' + + + + + + '; + } + + // Show the login bar. (it's only true if they are logged out anyway.) + if ($context['show_login_bar']) + { + echo ' + + + + + + + '; + } + + echo ' +
    ', $txt[685], '
    ', $txt[214], '
    + + ', $txt[214], ' + '; + + // Only show one post. + if ($settings['number_recent_posts'] == 1) + { + // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.) + echo ' + ', $txt[214], ' +
    + ', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')
    +
    '; + } + // Show lots of posts. + elseif (!empty($context['latest_posts'])) + { + echo ' + '; + /* Each post in latest_posts has: + board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), + subject, short_subject (shortened with...), time, link, and href. */ + foreach ($context['latest_posts'] as $post) + echo ' + + + + + '; + echo ' +
    [', $post['board']['link'], ']', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '', $post['time'], '
    '; + } + echo ' +
    ', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '
    + + ', $txt['calendar24'], ' + + '; + + // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P. + if (!empty($context['calendar_holidays'])) + echo ' + ', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), '
    '; + + // People's birthdays. Like mine. And yours, I guess. Kidding. + if (!empty($context['calendar_birthdays'])) + { + echo ' + ', $context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], ' '; + /* Each member in calendar_birthdays has: + id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */ + foreach ($context['calendar_birthdays'] as $member) + echo ' + ', $member['is_today'] ? '' : '', $member['name'], $member['is_today'] ? '' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '
    ' : ', '; + } + // Events like community get-togethers. + if (!empty($context['calendar_events'])) + { + echo ' + ', $context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], ' '; + /* Each event in calendar_events should have: + title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */ + foreach ($context['calendar_events'] as $event) + echo ' + ', $event['can_edit'] ? '* ' : '', '', $event['is_today'] ? '' . $event['title'] . '' : $event['title'], '', $event['is_last'] ? '
    ' : ', '; + + // Show a little help text to help them along ;). + if ($context['calendar_can_edit']) + echo ' + (', $txt['calendar_how_edit'], ')'; + } + echo ' +
    +
    ', $txt[331], '
    + + ', $txt[332], ' + + ', $txt[332], ' +
    ', $txt[200], '
    +
    ', $txt[645], '
    + + ', $txt[645], ' + + + + +
    +
    ', $txt[490], ': ', $modSettings['totalTopics'], '
    ', $txt[489], ': ', $modSettings['totalMessages'], '
    ', !empty($context['latest_post']) ? ' + ' . $txt[659] . ': "' . $context['latest_post']['link'] . '" (' . $context['latest_post']['time'] . ')
    ' : '', ' + ', $txt[234], '', $context['show_stats'] ? '
    + ' . $txt['smf223'] . '' : '', ' +
    + ', $txt[488], ': ', $modSettings['memberCount'], '
    + ', $txt[656], ': ', $context['latest_member']['link'], '
    '; + // If they are logged in, show their unread message count, etc.. + if ($context['user']['is_logged']) + echo ' + ', $txt['smf199'], ': ', $context['user']['messages'], ' ', $txt['newmessages3'], ': ', $context['user']['unread_messages'], ''; + echo ' +
    +
    ', $txt[645], '
    + ', $txt[645], ' + + + ', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': ', $context['common_stats']['latest_member']['link'], ' +
    ' . $txt[659] . ': "' . $context['latest_post']['link'] . '" ( ' . $context['latest_post']['time'] . ' )
    + ', $txt[234], '', $context['show_stats'] ? '
    + ' . $txt['smf223'] . '' : '', ' + + '; + if ((!empty($modSettings['karmadescmod'])) && (empty($modSettings['karmaisowner']))) + { if ($context['show_karmastat']) + echo ' + '. $txt['statkarma'].'',' '; + } + elseif ((!empty($modSettings['karmadescmod'])) && ($context['user']['is_admin'])) + { if ($context['show_karmastat']) + echo ' + '. $txt['statkarma'].'',' '; +} + echo' +
    +
    ', $txt[158], '
    + + ', $txt[158], ' + + ', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'], (empty($context['num_users_hidden']) ? '' : ' (' . $context['num_users_hidden'] . ' ' . $txt['hidden'] . ')'), '
    + '; + + // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link. + if (!empty($context['users_online'])) + echo ' + ', $txt[140], ':
    ', implode(', ', $context['list_users_online']); + + echo ' +
    ', $context['show_stats'] && !$settings['show_sp1_info'] ? ' + ' . $txt['smf223'] . '' : '', ' +
    +
    ', $txt[159], '
    + + ', $txt[159], ' + + ', $txt[159], ' +
    + ', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' ', $txt[662], ' ', $txt[663], ' +
    +
    ', $txt[34], ' (' . $txt[315] . ')
    + + ', $txt[34], ' + +
    + + + + + + +
    + + + + + + + + + +
    +
    +
    '; +} + +?> diff --git a/Themes/fixed/Calendar.template.php b/Themes/fixed/Calendar.template.php new file mode 100644 index 0000000..cf3a3d5 --- /dev/null +++ b/Themes/fixed/Calendar.template.php @@ -0,0 +1,164 @@ + +
    ', theme_linktree(), '
    + + + '; + + // Show each day of the week. + foreach ($context['week_days'] as $day) + echo ' + '; + echo ' + '; + + /* Each week in weeks contains the following: + days (a list of days), number (week # in the year.) */ + foreach ($context['weeks'] as $week) + { + echo ' + '; + + /* Every day has the following: + day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?), + holidays, events, birthdays. (last three are lists.) */ + foreach ($week['days'] as $day) + { + // If this is today, make it a different color and show a border. + echo ' + '; + } + + echo ' + '; + } + + echo ' +
    ' . $months[$context['current_month']] . ' ' . $context['current_year'] . '
    ' . $days[$day] . '
    '; + + // Skip it if it should be blank - it's not a day if it has no number. + if (!empty($day['day'])) + { + // Should the day number be a link? + if (!empty($modSettings['cal_daysaslink']) && $context['can_post']) + echo ' + ', $day['day'], ''; + else + echo ' + ', $day['day'], ''; + + // Is this the first day of the week? (and are we showing week numbers?) + if ($day['is_first_day']) + echo ' - ', $txt['calendar51'], ' ', $week['number']; + + // Are there any holidays? + if (!empty($day['holidays'])) + echo ' +
    + ', $txt['calendar5'], ' ', implode(', ', $day['holidays']), '
    '; + + // Show any birthdays... + if (!empty($day['birthdays'])) + { + echo ' +
    + ', $txt['calendar3'], ' '; + + /* Each of the birthdays has: + id, name (person), age (if they have one set?), and is_last. (last in list?) */ + foreach ($day['birthdays'] as $member) + echo ' + ', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '' : ', '; + echo ' +
    '; + } + + // Any special posted events? + if (!empty($day['events'])) + { + echo ' +
    + ', $txt['calendar4'], ' '; + /* The events are made up of: + title, href, is_last, can_edit (are they allowed to?), and modify_href. */ + foreach ($day['events'] as $event) + { + // If they can edit the event, show a star they can click on.... + if ($event['can_edit']) + echo ' + * '; + + echo ' + ', $event['title'], '', $event['is_last'] ? '' : ', '; + } + echo ' +
    '; + } + echo '
    '; + } + + echo ' +
    + + + + + + + + +
    '; + + // Is there a calendar for last month to look at? + if (isset($context['previous_calendar'])) + echo ' +  « ', $months_short[$context['previous_calendar']['month']], ' ', $context['previous_calendar']['year'], ''; + echo ' + '; + // Show a little "post event" button? + if ($context['can_post']) + echo ' + ', $settings['use_image_buttons'] ? '' . $txt['calendar23'] . '' : $txt['calendar23'], ''; + echo ' + +   +   + + '; + // Show another post button just for symmetry. + if ($context['can_post']) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt['calendar23'] . '' : $txt['calendar23']) . ''; + echo ' + '; + + // Is there a calendar for next month? + if (isset($context['next_calendar'])) + echo ' + ' . $months_short[$context['next_calendar']['month']] . ' ' . $context['next_calendar']['year'] . ' » '; + echo ' +
    + '; +} + +?> diff --git a/Themes/fixed/Clusterer.js b/Themes/fixed/Clusterer.js new file mode 100644 index 0000000..45b2526 --- /dev/null +++ b/Themes/fixed/Clusterer.js @@ -0,0 +1,586 @@ +// Clusterer.js - marker clustering routines for Google Maps apps +// +// Using these routines is very simple. +// +// 1) Load the routines into your code: +// +// +// 2) Create a Clusterer object, passing it your map object: +// +// var clusterer = new Clusterer( map ); +// +// 3) Wherever you now do map.addOverlay( marker ), instead call +// clusterer.AddMarker( marker, title ). The title is just a +// short descriptive string to use in the cluster info-boxes. +// +// 4) If you are doing any map.removeOverlay( marker ) calls, change those +// to clusterer.RemoveMarker( marker ). +// +// That's it! Everything else happens automatically. +// +// +// Copyright 2005 by Jef Poskanzer . +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// For commentary on this license please see http://www.acme.com/license.html + + +var defaultMaxVisibleMarkers = 150; +var defaultGridSize = 5; +var defaultMinMarkersPerCluster = 5; +var defaultMaxLinesPerInfoBox = 10; + +var defaultIcon = new GIcon(); +defaultIcon.image = 'http://www.acme.com/resources/images/markers/blue_large.PNG'; +defaultIcon.shadow = 'http://www.acme.com/resources/images/markers/shadow_large.PNG'; +defaultIcon.iconSize = new GSize( 30, 51 ); +defaultIcon.shadowSize = new GSize( 56, 51 ); +defaultIcon.iconAnchor = new GPoint( 13, 34 ); +defaultIcon.infoWindowAnchor = new GPoint( 13, 3 ); +defaultIcon.infoShadowAnchor = new GPoint( 27, 37 ); + + +// Constructor. +function Clusterer( map ) + { + this.map = map; + this.markers = []; + this.clusters = []; + this.timeout = null; + this.currentZoomLevel = map.getZoomLevel(); + + this.maxVisibleMarkers = defaultMaxVisibleMarkers; + this.gridSize = defaultGridSize; + this.minMarkersPerCluster = defaultMinMarkersPerCluster; + this.maxLinesPerInfoBox = defaultMaxLinesPerInfoBox; + this.icon = defaultIcon; + + GEvent.addListener( map, 'zoom', ClustererMakeCaller( ClustererDisplay, this ) ); + GEvent.addListener( map, 'moveend', ClustererMakeCaller( ClustererDisplay, this ) ); + GEvent.addListener( map, 'infowindowclose', ClustererMakeCaller( ClustererPopDown, this ) ); + } + + +// Call this to change the cluster icon. +Clusterer.prototype.SetIcon = function ( icon ) + { + this.icon = icon; + } + + +// Call this to add a marker. +Clusterer.prototype.AddMarker = function ( marker, title ) + { + // Putting the map into a marker property is not mentioned in the API, + // but it lets up pop up an infobox for markers which have not yet been + // added to the map. + marker.map = this.map; + marker.title = title; + this.markers.push( marker ); + this.DisplayLater(); + } + + +// Call this to remove a marker. +Clusterer.prototype.RemoveMarker = function ( marker ) + { + for ( var i = 0; i < this.markers.length; ++i ) + if ( this.markers[i] == marker ) + { + if ( marker.onMap ) + this.map.removeOverlay( marker ); + for ( j = 0; j < this.clusters.length; ++j ) + { + cluster = clusterer.clusters[j]; + if ( cluster != null ) + { + for ( k = 0; k < cluster.markers.length; ++k ) + if ( cluster.markers[k] == marker ) + { + cluster.markers[k] = null; + --cluster.markerCount; + break; + } + if ( cluster.markerCount == 0 ) + { + this.ClearCluster( cluster ); + clusterer.clusters[j] = null; + } + else if ( cluster == this.poppedUpCluster ) + ClustererRePop( this ); + } + } + this.markers[i] = null; + break; + } + this.DisplayLater(); + } + +Clusterer.prototype.DisplayLater = function () + { + if ( this.timeout != null ) + window.clearTimeout( this.timeout ); + this.timeout = window.setTimeout( ClustererMakeCaller( ClustererDisplay, this ), 50 ); + } + + +function ClustererDisplay( clusterer ) + { + var i, j, marker, cluster, point; + + window.clearTimeout( clusterer.timeout ); + + var newZoomLevel = clusterer.map.getZoomLevel(); + if ( newZoomLevel != clusterer.currentZoomLevel ) + { + // When the zoom level changes, we have to remove all the clusters. + for ( i = 0; i < clusterer.clusters.length; ++i ) + if ( clusterer.clusters[i] != null ) + { + clusterer.ClearCluster( clusterer.clusters[i] ); + clusterer.clusters[i] = null; + } + clusterer.clusters.length = 0; + clusterer.currentZoomLevel = newZoomLevel; + } + + // Get the current bounds of the visible area. + var bounds = clusterer.map.getBoundsLatLng(); + + // Expand the bounds a little, so things look smoother when scrolling + // by small amounts. + var dx = bounds.maxX - bounds.minX; + var dy = bounds.maxY - bounds.minY; + dx *= 0.10; + dy *= 0.10; + bounds.maxX += dx; + bounds.minX -= dx; + bounds.maxY += dy; + bounds.minY -= dy; + + // Partition the markers into visible and non-visible lists. + var visibleMarkers = []; + var nonvisibleMarkers = []; + for ( i = 0; i < clusterer.markers.length; ++i ) + { + marker = clusterer.markers[i]; + if ( marker != null ) + if ( ClustererPointInBounds( marker.point, bounds ) ) + visibleMarkers.push( marker ); + else + nonvisibleMarkers.push( marker ); + } + + // Take down the non-visible markers. + for ( i = 0; i < nonvisibleMarkers.length; ++i ) + { + marker = nonvisibleMarkers[i]; + if ( marker.onMap ) + { + clusterer.map.removeOverlay( marker ); + marker.onMap = false; + } + } + + // Take down the non-visible clusters. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null && ! ClustererPointInBounds( cluster.marker.point, bounds ) && cluster.onMap ) + { + clusterer.map.removeOverlay( cluster.marker ); + cluster.onMap = false; + } + } + + // Clustering! This is some complicated stuff. We have three goals + // here. One, limit the number of markers & clusters displayed, so the + // maps code doesn't slow to a crawl. Two, when possible keep existing + // clusters instead of replacing them with new ones, so that the app pans + // better. And three, of course, be CPU and memory efficient. + if ( visibleMarkers.length > clusterer.maxVisibleMarkers ) + { + // Add to the list of clusters by splitting up the current bounds + // into a grid. + var latRange = bounds.maxY - bounds.minY; + var latInc = latRange / clusterer.gridSize; + var lonInc = latInc / Math.cos( ( bounds.maxY + bounds.minY ) / 2.0 * Math.PI / 180.0 ); + for ( var lat = bounds.minY; lat <= bounds.maxY; lat += latInc ) + for ( var lon = bounds.minX; lon <= bounds.maxX; lon += lonInc ) + { + cluster = new Object(); + cluster.clusterer = clusterer; + cluster.bounds = new GBounds( lon, lat, lon + lonInc, lat + latInc ); + cluster.markers = []; + cluster.markerCount = 0; + cluster.onMap = false; + cluster.marker = null; + clusterer.clusters.push( cluster ); + } + + // Put all the unclustered visible markers into a cluster - the first + // one it fits in, which favors pre-existing clusters. + for ( i = 0; i < visibleMarkers.length; ++i ) + { + marker = visibleMarkers[i]; + if ( marker != null && ! marker.inCluster ) + { + for ( j = 0; j < clusterer.clusters.length; ++j ) + { + cluster = clusterer.clusters[j]; + if ( cluster != null && ClustererPointInBounds( marker.point, cluster.bounds ) ) + { + cluster.markers.push( marker ); + ++cluster.markerCount; + marker.inCluster = true; + } + } + } + } + + // Get rid of any clusters containing only a few markers. + for ( i = 0; i < clusterer.clusters.length; ++i ) + if ( clusterer.clusters[i] != null && clusterer.clusters[i].markerCount < clusterer.minMarkersPerCluster ) + { + clusterer.ClearCluster( clusterer.clusters[i] ); + clusterer.clusters[i] = null; + } + + // Shrink the clusters list. + for ( i = clusterer.clusters.length - 1; i >= 0; --i ) + if ( clusterer.clusters[i] != null ) + break; + else + --clusterer.clusters.length; + + // Ok, we have our clusters. Go through the markers in each + // cluster and remove them from the map if they are currently up. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null ) + { + for ( j = 0; j < cluster.markers.length; ++j ) + { + marker = cluster.markers[j]; + if ( marker != null && marker.onMap ) + { + clusterer.map.removeOverlay( marker ); + marker.onMap = false; + } + } + } + } + + // Now make cluster-markers for any clusters that need one. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null && cluster.marker == null ) + { + // Figure out the average coordinates of the markers in this + // cluster. + var xTotal = 0.0, yTotal = 0.0; + for ( j = 0; j < cluster.markers.length; ++j ) + { + marker = cluster.markers[j]; + if ( marker != null ) + { + xTotal += ( + marker.point.x ); + yTotal += ( + marker.point.y ); + } + } + point = new GPoint( xTotal / cluster.markerCount, yTotal / cluster.markerCount ); + marker = new GMarker( point, clusterer.icon ); + cluster.marker = marker; + GEvent.addListener( marker, 'click', ClustererMakeCaller( ClustererPopUp, cluster ) ); + } + } + } + + // Display the visible markers not already up and not in clusters. + for ( i = 0; i < visibleMarkers.length; ++i ) + { + marker = visibleMarkers[i]; + if ( marker != null && ! marker.onMap && ! marker.inCluster ) + { + clusterer.map.addOverlay( marker ); + var title = marker.title; + if ( title ) + ClustererSetTooltip( marker, title ); + marker.onMap = true; + } + } + + // Display the visible clusters not already up. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null && ! cluster.onMap && ClustererPointInBounds( cluster.marker.point, bounds ) ) + { + clusterer.map.addOverlay( cluster.marker ); + cluster.onMap = true; + } + } + + // In case a cluster is currently popped-up, re-pop to get any new + // markers into the infobox. + ClustererRePop( clusterer ); + } + + +function ClustererPopUp( cluster ) + { + var clusterer = cluster.clusterer; + var html = ''; + var n = 0; + for ( var i = 0; i < cluster.markers.length; ++i ) + { + var marker = cluster.markers[i]; + if ( marker != null ) + { + ++n; + html += ''; + if ( n == clusterer.maxLinesPerInfoBox - 1 && cluster.markerCount > clusterer.maxLinesPerInfoBox ) + { + html += ''; + break; + } + } + } + html += '
    '; + if ( marker.icon.smallImage ) + html += ''; + else + html += ''; + html += '' + marker.title + '
    ...and ' + ( cluster.markerCount - n ) + ' more
    '; + clusterer.poppedUpCluster = cluster; + cluster.marker.openInfoWindowHtml( html ); + } + + +function ClustererRePop( clusterer ) + { + if ( clusterer.poppedUpCluster != null ) + ClustererPopUp( poppedUpCluster ); + } + + +function ClustererPopDown( clusterer ) + { + clusterer.poppedUpCluster = null; + } + + +Clusterer.prototype.ClearCluster = function ( cluster ) + { + var i, marker; + + for ( i = 0; i < cluster.markers.length; ++i ) + if ( cluster.markers[i] != null ) + { + cluster.markers[i].inCluster = false; + cluster.markers[i] = null; + } + cluster.markers.length = 0; + cluster.markerCount = 0; + if ( cluster == this.poppedUpCluster ) + this.map.closeInfoWindow(); + if ( cluster.onMap ) + { + this.map.removeOverlay( cluster.marker ); + cluster.onMap = false; + } + } + + +function ClustererPointInBounds( point, bounds ) + { + var x = ( + point.x ); + var y = ( + point.y ); + return x >= bounds.minX && x <= bounds.maxX && + y >= bounds.minY && y <= bounds.maxY; + } + + +// This returns a function closure that calls the given routine with the +// specified arg. +function ClustererMakeCaller( func, arg ) + { + return function () { func( arg ); }; + } + + +function ClustererSetTooltip( marker, title ) + { + // Tooltips are in text, not HTML, so we have to strip any HTML stuff + // out of the title. + var textTitle = ClustererDeHtmlize( title ); + + // Now add the title to whichever parts of the marker are present. + if ( marker.transparentIcon ) + marker.transparentIcon.setAttribute( 'title' , textTitle ); + if ( marker.imageMap ) + marker.imageMap.setAttribute( 'title' , textTitle ); + if ( marker.iconImage ) + marker.iconImage.setAttribute( 'title' , textTitle ); + } + + +function ClustererEntityToIso8859( inStr ) + { + var outStr = ''; + for ( var i = 0; i < inStr.length; ++i ) + { + var c = inStr.charAt( i ); + if ( c != '&' ) + outStr += c; + else + { + var semi = inStr.indexOf( ';', i ); + if ( semi == -1 ) + outStr += c; + else + { + var entity = inStr.substring( i + 1, semi ); + if ( entity == 'iexcl' ) outStr += ''; + else if ( entity == 'copy' ) outStr += ''; + else if ( entity == 'laquo' ) outStr += ''; + else if ( entity == 'reg' ) outStr += ''; + else if ( entity == 'deg' ) outStr += ''; + else if ( entity == 'raquo' ) outStr += ''; + else if ( entity == 'iquest' ) outStr += ''; + else if ( entity == 'Agrave' ) outStr += ''; + else if ( entity == 'Aacute' ) outStr += ''; + else if ( entity == 'Acirc' ) outStr += ''; + else if ( entity == 'Atilde' ) outStr += ''; + else if ( entity == 'Auml' ) outStr += ''; + else if ( entity == 'Aring' ) outStr += ''; + else if ( entity == 'AElig' ) outStr += ''; + else if ( entity == 'Ccedil' ) outStr += ''; + else if ( entity == 'Egrave' ) outStr += ''; + else if ( entity == 'Eacute' ) outStr += ''; + else if ( entity == 'Ecirc' ) outStr += ''; + else if ( entity == 'Euml' ) outStr += ''; + else if ( entity == 'Igrave' ) outStr += ''; + else if ( entity == 'Iacute' ) outStr += ''; + else if ( entity == 'Icirc' ) outStr += ''; + else if ( entity == 'Iuml' ) outStr += ''; + else if ( entity == 'Ntilde' ) outStr += ''; + else if ( entity == 'Ograve' ) outStr += ''; + else if ( entity == 'Oacute' ) outStr += ''; + else if ( entity == 'Ocirc' ) outStr += ''; + else if ( entity == 'Otilde' ) outStr += ''; + else if ( entity == 'Ouml' ) outStr += ''; + else if ( entity == 'Oslash' ) outStr += ''; + else if ( entity == 'Ugrave' ) outStr += ''; + else if ( entity == 'Uacute' ) outStr += ''; + else if ( entity == 'Ucirc' ) outStr += ''; + else if ( entity == 'Uuml' ) outStr += ''; + else if ( entity == 'Yacute' ) outStr += ''; + else if ( entity == 'szlig' ) outStr += ''; + else if ( entity == 'agrave' ) outStr += ''; + else if ( entity == 'aacute' ) outStr += ''; + else if ( entity == 'acirc' ) outStr += ''; + else if ( entity == 'atilde' ) outStr += ''; + else if ( entity == 'auml' ) outStr += ''; + else if ( entity == 'aring' ) outStr += ''; + else if ( entity == 'aelig' ) outStr += ''; + else if ( entity == 'ccedil' ) outStr += ''; + else if ( entity == 'egrave' ) outStr += ''; + else if ( entity == 'eacute' ) outStr += ''; + else if ( entity == 'ecirc' ) outStr += ''; + else if ( entity == 'euml' ) outStr += ''; + else if ( entity == 'igrave' ) outStr += ''; + else if ( entity == 'iacute' ) outStr += ''; + else if ( entity == 'icirc' ) outStr += ''; + else if ( entity == 'iuml' ) outStr += ''; + else if ( entity == 'ntilde' ) outStr += ''; + else if ( entity == 'ograve' ) outStr += ''; + else if ( entity == 'oacute' ) outStr += ''; + else if ( entity == 'ocirc' ) outStr += ''; + else if ( entity == 'otilde' ) outStr += ''; + else if ( entity == 'ouml' ) outStr += ''; + else if ( entity == 'oslash' ) outStr += ''; + else if ( entity == 'ugrave' ) outStr += ''; + else if ( entity == 'uacute' ) outStr += ''; + else if ( entity == 'ucirc' ) outStr += ''; + else if ( entity == 'uuml' ) outStr += ''; + else if ( entity == 'yacute' ) outStr += ''; + else if ( entity == 'yuml' ) outStr += ''; + else if ( entity == 'nbsp' ) outStr += ' '; + else if ( entity == 'lt' ) outStr += '<'; + else if ( entity == 'gt' ) outStr += '>'; + else if ( entity == 'amp' ) outStr += '&'; + else outStr += '&' + entity + ';'; + i += entity.length + 1; + } + } + } + return outStr; + } + + +function ClustererDeEntityize( inStr ) + { + var outStr = ''; + for ( var i = 0; i < inStr.length; ++i ) + { + var c = inStr.charAt( i ); + if ( c != '&' ) + outStr += c; + else + { + var semi = inStr.indexOf( ';', i ); + if ( semi != -1 ) + i = semi; + } + } + return outStr; + } + + +function ClustererDeElementize( inStr ) + { + var outStr = ''; + for ( var i = 0; i < inStr.length; ++i ) + { + var c = inStr.charAt( i ); + if ( c != '<' ) + outStr += c; + else + { + var gt = inStr.indexOf( '>', i ); + if ( gt != -1 ) + i = gt; + } + } + return outStr; + } + + +function ClustererDeHtmlize( str ) + { + return ClustererDeEntityize( ClustererEntityToIso8859( ClustererDeElementize( str ) ) ); + } diff --git a/Themes/fixed/DescriptionKarma.template.php b/Themes/fixed/DescriptionKarma.template.php new file mode 100644 index 0000000..2219ade --- /dev/null +++ b/Themes/fixed/DescriptionKarma.template.php @@ -0,0 +1,48 @@ + + +', theme_linktree(), '
    +
    + + + + + + + + + + + + + + + +
    ',$txt['whykarmamod'],''; + if ($_REQUEST['sa'] == 'applaud') echo $txt['karmadescappl']; else echo $txt['karmadescsmi']; echo'
    ', $txt['karmamoder'], '
    ',$txt['karmarequare'],'
    +
    '; + + + +} +?> diff --git a/Themes/fixed/Display.template.php b/Themes/fixed/Display.template.php new file mode 100755 index 0000000..8d803ef --- /dev/null +++ b/Themes/fixed/Display.template.php @@ -0,0 +1,1118 @@ + +', $context['first_new_message'] ? '' : ''; + + // Show the linktree as well as the "Who's Viewing" information. + echo ' + + + '; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + } + + // Show the previous/next links. + echo ' + + +
    ', theme_linktree(), ''; + + // Show just numbers...? + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + // Or show the actual people viewing the topic? + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + + // Now show how many guests are here too. + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], ' + ', $context['previous_next'], ' +
    '; + + // Is there any related topics? + if (!empty($context['related_topics'])) + { + echo ' + + + + + + + + '; + foreach($context['related_topics'] as $rt) + { + echo' + + + '; + } + echo ' + + + +
     
    ',$txt['related_topics'],'
    ',$rt['subj'],'
     
    '; + } + + // Is this topic also a poll? + if ($context['is_poll']) + { + echo ' + + + + + + + + +
    + ', $txt['smf43'], ' +
    ', $txt['smf21'], ': + ', $context['poll']['question']; + if (!empty($context['poll']['expire_time'])) + echo ' +  (', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': ', $context['poll']['expire_time'], ')'; + + // Are they not allowed to vote but allowed to view the options? + if (!$context['allow_vote']) + { + echo ' + + + + + ', $context['allow_poll_view'] ? ' + + + ' : '', ' +
    + '; + + // Show each option with its corresponding percentage bar. + foreach ($context['poll']['options'] as $option) + echo ' + + ', $context['allow_poll_view'] ? ' + ' : '', ' + '; + + echo ' +
    ', $option['option'], '' . $option['bar'] . ' ' . $option['votes'] . ' (' . $option['percent'] . '%)
    +
    '; + + // If they are allowed to revote - show them a link! + if ($context['allow_change_vote']) + echo ' + ', $txt['poll_change_vote'], '
    '; + + // If they're allowed to lock the poll, show a link! + if ($context['poll']['lock']) + echo ' + ', !$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b'], '
    '; + + // If they're allowed to edit the poll... guess what... show a link! + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    ' . $txt['smf24'] . ': ' . $context['poll']['total_votes'] . '

    '; + } + // They are allowed to vote! Go to it! + else + { + echo ' +
    + + + + + + + + + +
    '; + + // Show a warning if they are allowed more than one option. + if ($context['poll']['allowed_warning']) + echo ' + ', $context['poll']['allowed_warning'], ' +
    '; + + // Show each option with its button - a radio likely. + foreach ($context['poll']['options'] as $option) + echo ' + ', $option['vote_button'], ' ', $option['option'], '
    '; + + echo ' +
    '; + + // Allowed to view the results? (without voting!) + if ($context['allow_poll_view']) + echo ' + ', $txt['smf29'], '
    '; + + // Show a link for locking the poll as well... + if ($context['poll']['lock']) + echo ' + ', (!$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b']), '
    '; + + // Want to edit it? Click right here...... + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    + +
    '; + } + + echo ' +
    '; + } + + // Show the page index... "Pages: [1]". + echo ' + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index']; + + // Show a "go down" link? + if (!empty($modSettings['topbottomEnable'])) + echo $context['menu_separator'], '', $settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5'], ''; + + echo ' + '; + + $buttonArray = array(); + if ($context['can_reply']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // This is a special case; if they can see mark unread, put it at the top... otherwise show add poll. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; + elseif ($context['can_add_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; + + if ($context['can_send_topic']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; + + echo implode($context['menu_separator'], $buttonArray); + + echo '
    +
    '; + + // Show the topic information - icon, subject, etc. + echo ' + + + + + +
    + ', $txt[29], ' + + ', $txt[118], ': ', $context['subject'], '  (', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ') +
    '; + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
    '; + + echo ' +'; + + // Get all the messages... + while ($message = $context['get_message']()) + { + echo ' + '; + if(($context['is_sticky'] || $context['is_first_sticky']) && ($message['id']==$context['topic_first_message'])) { + echo ''; + } + + } + echo ' + +
    '; + + // Show the message anchor and a "new" anchor if this message is new. + if ($message['id'] != $context['first_message']) + echo ' + ', $message['first_new'] ? '' : ''; + + echo ' + + +
    '; + + // Show information about the poster of this message. + + // pink nickname for Diana //////////////////////// +/* if($message['member']['name'] == 'Diana') + $_special_color = 'style="color: violet"'; + else $_special_color = '';*/ + /////////////////////////////////////////////////// + echo ' + + + + + '; + + // Now for the attachments, signature, ip logged, etc... + echo ' + + + +
    '; + // Show the member's gender icon? + if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '') + echo ' + ',$message['member']['gender']['image']; + if (empty($context['user']['is_guest'])) { + $_special_color=""; + if(isset($message['member']['group']) && $message['member']['group'] != '' && isset($message['member']['group_color'])) + $_special_color='style="color: '.$message['member']['group_color'].';"'; + echo ' + ',$message['member']['name'],' +
    '; + unset($_special_color); + } + else + echo ' + ',$message['member']['name'],' +
    '; + + // Show the member's custom title, if they have one. + if (isset($message['member']['title']) && $message['member']['title'] != '') + echo ' + ', $message['member']['title'], '
    '; + + // Show the member's primary group (like 'Administrator') if they have one. + if (isset($message['member']['group']) && $message['member']['group'] != '') + echo ' + ', $message['member']['group']; + if (!$context['user']['is_guest'] && isset($message['member']['warning']['link']) && $message['member']['warning']['link'] != '') + echo' + ', $message['member']['warning']['link']; + + echo '
    '; + // Don't show these things for guests. + if (!$message['member']['is_guest'] && !$context['user']['is_guest']) + { + // Show the post group if and only if they have no other group or the option is on, and they are in a post group. +/* if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') + echo ' + ', $message['member']['post_group'], '
    '; + echo ' + ', $message['member']['group_stars'], '
    ';*/ + + + // Show avatars, images, etc.? + if (empty($context['user']['is_guest']) && !empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) + echo ' +
    ', $message['member']['avatar']['image'], '
    '; + + // Show their personal text? + if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') + echo ' + ', $message['member']['blurb'], '

    + '; + else + echo '
    '; + + // Show online and offline buttons? + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'] && $message['member']['online']['is_online']) + echo ' + ', /*$context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ?*/ ' ' . $message['member']['online']['text'] . '' /*: ''*/, ' - '; + + // Show how many posts they have made. +// echo ' +// ', $txt[26], ': ', $message['member']['posts'], '
    +//
    '; + + // This shows the popular messaging icons. +/* echo ' + ', $message['member']['icq']['link'], ' + ', $message['member']['msn']['link'], ' + ', $message['member']['aim']['link'], ' + ', $message['member']['yim']['link'], '
    '; +*/ + + // Show the profile, website, email address, and personal message buttons. + if ($settings['show_profile_buttons']) + { + // Don't show the profile button if you're not allowed to view the profile. + if ($message['member']['can_view_profile']) + echo ' + ', (/*$settings['use_image_buttons'] ? '' . $txt[27] . '' : */$txt[27]), ''; +/* + // Don't show an icon if they haven't specified a website. + if ($message['member']['website']['url'] != '') + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; + + // Don't show the email address if they want it hidden. + if (empty($message['member']['hide_email'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; +*/ + // Since we know this person isn't a guest, you *can* message them. + if ($context['can_send_pm']) + echo ' - ', /*$settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'],*/ $txt['online4'], ''; + } +/* } + // Otherwise, show the guest's email. + else + echo ' +
    +
    + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + */ + + // Is karma display enabled? Total or +/-? + if ($modSettings['karmaMode'] == '1') + echo ' +
    ', $modSettings['karmaLabel'], ' '/*, '
    '*/; + /*elseif ($modSettings['karmaMode'] == '2') + echo ' +
    + ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
    ';*/ + + // Is this user allowed to modify this member's karma? + if ($message['member']['karma']['allow']) + echo '  + [ ', $message['member']['karma']['good'] - $message['member']['karma']['bad'],' ]
    '; + else + echo $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
    '; + + + // Show how many posts they have made. + echo ' +
    ', $txt[26], ': ', $message['member']['posts'], ' +
    '; + + } + // Done with the information about the poster... on to the post itself. + echo ' +
    +
    + + + + +
    + ', $message['subject'], ''; + + // If this is the first post, (#0) just say when it was posted - otherwise give the reply #. + echo ' +
    ', !($message['id'] == $context['topic_first_message']) ? $txt['post_no']. $message['counter'] : '', ' ', $txt[30], ': ', $message['time'], '
    '; + + // Can they reply? Have they turned on quick reply? + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + // So... quick reply is off, but they *can* reply? + elseif ($context['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + + // Can the user modify the contents of this post? + if ($message['can_modify']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[66] . '' : $txt[17]), ''; + + // How about... even... remove it entirely?! + if ($message['can_remove']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + if ($context['can_warn']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['visual_raise'] . '' : $txt['visual_warn']), ''; + + + // What about splitting it off the rest of the topic? + if ($context['can_split']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['smf251'] . '' : $txt['smf251']), ''; + + // Show a checkbox for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove']) + echo ' + '; + + // Show the post itself, finally! + echo ' +
    +
    +
    ', $message['body']; + /*if($modSettings['nowplayingEnabled'] && $message['nowplaying'] != '') + { + if(isset($modSettings['nowplaying_image']) && $modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text']) && $modSettings['nowplaying_text'] != '') + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + echo '

    ', $nowplayingstring, ' ', $message['nowplaying'], ''; + }*/ + echo '
    +
    + + + + + +
    '; + + // Assuming there are attachments... + if (!empty($message['attachment'])) + { + echo ' +
    +
    '; + + foreach ($message['attachment'] as $attachment) + { + if (isset($attachment['image'])) + echo ' + + ', $attachment['image'], ' +
    '; + echo ' + * ' . $attachment['name'] . ' (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['width'] . 'x' . $attachment['height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)
    '; + } + + echo ' +
    '; + } + + echo ' +
    '; + + // Show "? Last Edit: Time by Person ?" if this post was edited. + if ($settings['show_modify'] && !empty($message['modified']['name'])) + echo ' + « ', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], ' »'; + if($modSettings['nowplayingEnabled'] && $message['nowplaying'] != '' && !$context['user']['is_guest']) + { + if(isset($modSettings['nowplaying_image']) && $modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text']) && $modSettings['nowplaying_text'] != '') + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + echo '

    ', $nowplayingstring, ' ', $message['nowplaying'], ''; + } + + echo ' +
    '; + + // put to site + if($context['user']['is_admin']) + echo' +  '; + + // quick quote + if (!$context['user']['is_guest']) + echo ' +  '; + + // Maybe they want to report this post to the moderator(s)? + if ($context['can_report_moderator']) + echo ' + ', $txt['rtm1'], '  '; + + /*echo ' + ';*/ + // Show the IP to this user for this post - because you can moderate? + if ($context['can_moderate_forum'] && !empty($message['member']['ip'])) + echo ' + ', $message['member']['ip'], ' (?)'; + // Or, should we show it because this is you? + elseif ($message['can_see_ip']) + echo ' + ', $message['member']['ip'], ''; + // Okay, are you at least logged in? Then we can show something about why IPs are logged... +/* elseif (!$context['user']['is_guest']) + echo ' + ', $txt[511], '';*/ + // Otherwise, you see NOTHING! + else + echo ' + '/*, $txt[511]*/; + + echo ' +
    '; + + // Show the member's signature? + if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && !$context['user']['is_guest']) + echo ' +
    +
    ', $message['member']['signature'], '
    '; + + echo ' +
    +
    +
     
    + + + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index'], ($modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : ''), ' + '; + + $buttonArray = array(); + if ($context['can_reply']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Another special case, similar to above but reversed. Show "add poll" unless they can't - then show unread here too. + if ($context['can_add_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; + elseif ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; + + if ($context['can_send_topic']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; + + echo implode($context['menu_separator'], $buttonArray); + + echo '  +
    +
    + + + '; + if ($settings['linktree_inline']) + echo ' + '; + echo ' + + +
    ', theme_linktree(), ' ', $context['previous_next'], '
    +
    ', theme_show_mod_buttons(), '
    '; + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post']) + echo ' + +
    '; + + echo ' +
    +
    + ' . $txt[160] . ': +   + +
    +
    +
    '; + + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + { + if ($context['show_spellchecking']) + echo ' +'; + + echo ' + + + + + + + + + + + '; + } + + // Now start printing all of the smileys. + if (!empty($context['smileys']['postform'])) + { + echo ' + + + + '; + } + + // If there are additional smileys then ensure we provide the javascript for them. + if (!empty($context['smileys']['popup'])) + { + echo ' + '; + } + + // Finally the most important bit - the actual text box to write in! + echo ' + + + + '; +} +?> diff --git a/Themes/fixed/Display.template.php~ b/Themes/fixed/Display.template.php~ new file mode 100644 index 0000000..3432fc5 --- /dev/null +++ b/Themes/fixed/Display.template.php~ @@ -0,0 +1,1059 @@ + +', $context['first_new_message'] ? '' : ''; + + // Show the linktree as well as the "Who's Viewing" information. + echo ' +
    + ', $txt['quick_reply_1'], '
    + '; + + // The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you! + $context['bbc_tags'] = array(); + $context['bbc_tags'][] = array( + 'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]), + 'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]), + 'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]), + 'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]), + array(), + 'glow' => array('code' => 'glow', 'before' => '[glow=red,2,300]', 'after' => '[/glow]', 'description' => $txt[442]), + 'shadow' => array('code' => 'shadow', 'before' => '[shadow=red,left]', 'after' => '[/shadow]', 'description' => $txt[443]), + 'move' => array('code' => 'move', 'before' => '[move]', 'after' => '[/move]', 'description' => $txt[439]), + array(), + 'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]), + 'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]), + 'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]), + 'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]), + array(), + 'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]), + array(), + 'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]), + 'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]), + ); + $context['bbc_tags'][] = array( + 'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]), + 'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]), + 'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]), + 'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]), + 'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]), + array(), + 'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]), + 'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]), + 'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]), + array(), + 'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]), + 'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]), + 'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]), + array(), + 'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $txt[259]), + 'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]), + array(), + 'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]), + ); + // Here loop through the array, printing the images/rows/separators! + foreach ($context['bbc_tags'][0] as $image => $tag) + { + // Is there a "before" part for this bbc button? If not, it can't be a button!! + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + // Print a drop down list for all the colors we allow! + if (!isset($context['disabled_tags']['color'])) + echo ' '; + echo '
    '; + + // Print the buttom row of buttons! + foreach ($context['bbc_tags'][1] as $image => $tag) + { + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + echo ' +
    '; + + // Show each row of smileys ;). + foreach ($context['smileys']['postform'] as $smiley_row) + { + foreach ($smiley_row['smileys'] as $smiley) + echo ' + ', $smiley['description'], ''; + + // If this isn't the last row, show a break. + if (empty($smiley_row['last'])) + echo '
    '; + } + + // If the smileys popup is to be shown... show it! + if (!empty($context['smileys']['popup'])) + echo ' + [', $txt['more_smileys'], ']'; + + echo ' +
    + +
    + + '; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + } + + // Show the previous/next links. + echo ' + + +
    ', theme_linktree(), ''; + + // Show just numbers...? + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + // Or show the actual people viewing the topic? + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + + // Now show how many guests are here too. + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], ' + ', $context['previous_next'], ' +
    '; + + // Is this topic also a poll? + if ($context['is_poll']) + { + echo ' + + + + + + + + +
    + ', $txt['smf43'], ' +
    ', $txt['smf21'], ': + ', $context['poll']['question']; + if (!empty($context['poll']['expire_time'])) + echo ' +  (', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': ', $context['poll']['expire_time'], ')'; + + // Are they not allowed to vote but allowed to view the options? + if (!$context['allow_vote']) + { + echo ' + + + + + ', $context['allow_poll_view'] ? ' + + + ' : '', ' +
    + '; + + // Show each option with its corresponding percentage bar. + foreach ($context['poll']['options'] as $option) + echo ' + + ', $context['allow_poll_view'] ? ' + ' : '', ' + '; + + echo ' +
    ', $option['option'], '' . $option['bar'] . ' ' . $option['votes'] . ' (' . $option['percent'] . '%)
    +
    '; + + // If they are allowed to revote - show them a link! + if ($context['allow_change_vote']) + echo ' + ', $txt['poll_change_vote'], '
    '; + + // If they're allowed to lock the poll, show a link! + if ($context['poll']['lock']) + echo ' + ', !$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b'], '
    '; + + // If they're allowed to edit the poll... guess what... show a link! + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    ' . $txt['smf24'] . ': ' . $context['poll']['total_votes'] . '

    '; + } + // They are allowed to vote! Go to it! + else + { + echo ' +
    + + + + + + + + + +
    '; + + // Show a warning if they are allowed more than one option. + if ($context['poll']['allowed_warning']) + echo ' + ', $context['poll']['allowed_warning'], ' +
    '; + + // Show each option with its button - a radio likely. + foreach ($context['poll']['options'] as $option) + echo ' + ', $option['vote_button'], ' ', $option['option'], '
    '; + + echo ' +
    '; + + // Allowed to view the results? (without voting!) + if ($context['allow_poll_view']) + echo ' + ', $txt['smf29'], '
    '; + + // Show a link for locking the poll as well... + if ($context['poll']['lock']) + echo ' + ', (!$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b']), '
    '; + + // Want to edit it? Click right here...... + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    + +
    '; + } + + echo ' +
    '; + } + + // Show the page index... "Pages: [1]". + echo ' + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index']; + + // Show a "go down" link? + if (!empty($modSettings['topbottomEnable'])) + echo $context['menu_separator'], '', $settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5'], ''; + + echo ' + '; + + $buttonArray = array(); + if ($context['can_reply']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // This is a special case; if they can see mark unread, put it at the top... otherwise show add poll. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; + elseif ($context['can_add_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; + + if ($context['can_send_topic']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; + + echo implode($context['menu_separator'], $buttonArray); + + echo '
    +
    '; + + // Show the topic information - icon, subject, etc. + echo ' + + + + + +
    + ', $txt[29], ' + + ', $txt[118], ': ', $context['subject'], '  (', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ') +
    '; + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
    '; + + echo ' +'; + + // Get all the messages... + while ($message = $context['get_message']()) + { + echo ' + '; + if(($context['is_sticky'] || $context['is_first_sticky']) && ($message['id']==$context['topic_first_message'])) { + echo ''; + } + + } + echo ' + +
    '; + + // Show the message anchor and a "new" anchor if this message is new. + if ($message['id'] != $context['first_message']) + echo ' + ', $message['first_new'] ? '' : ''; + + echo ' + + +
    '; + + // Show information about the poster of this message. + + // pink nickname for Diana //////////////////////// +/* if($message['member']['name'] == 'Diana') + $_special_color = 'style="color: violet"'; + else $_special_color = '';*/ + /////////////////////////////////////////////////// + echo ' + + + + + '; + + // Now for the attachments, signature, ip logged, etc... + echo ' + + + +
    '; + // Show the member's gender icon? + if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '') + echo ' + ',$message['member']['gender']['image']; + echo ' + ',$message['member']['name'],' +
    '; + + // Show the member's custom title, if they have one. + if (isset($message['member']['title']) && $message['member']['title'] != '') + echo ' + ', $message['member']['title'], '
    '; + + // Show the member's primary group (like 'Administrator') if they have one. + if (isset($message['member']['group']) && $message['member']['group'] != '') + echo ' + ', $message['member']['group']; + if (isset($message['member']['warning']['link']) && $message['member']['warning']['link'] != '') + echo' + ', $message['member']['warning']['link']; + + echo '
    '; + // Don't show these things for guests. + if (!$message['member']['is_guest']) + { + // Show the post group if and only if they have no other group or the option is on, and they are in a post group. +/* if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') + echo ' + ', $message['member']['post_group'], '
    '; + echo ' + ', $message['member']['group_stars'], '
    ';*/ + + + // Show avatars, images, etc.? + if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) + echo ' +
    ', $message['member']['avatar']['image'], '
    '; + + // Show their personal text? + if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') + echo ' + ', $message['member']['blurb'], '
    + '; + + // Is karma display enabled? Total or +/-? + if ($modSettings['karmaMode'] == '1') + echo ' +
    + ', $modSettings['karmaLabel'], ' '/*, '
    '*/; + /*elseif ($modSettings['karmaMode'] == '2') + echo ' +
    + ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
    ';*/ + + // Is this user allowed to modify this member's karma? + if ($message['member']['karma']['allow']) + echo '  +  [ ', $message['member']['karma']['good'] - $message['member']['karma']['bad'],' ]  +
    '; + else + echo $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
    '; + + // Show online and offline buttons? + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) + echo ' + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $message['member']['online']['text'] . '' : '', '

    '; + + // Show how many posts they have made. + echo ' + ', $txt[26], ': ', $message['member']['posts'], '
    +
    '; + + // This shows the popular messaging icons. + echo ' + ', $message['member']['icq']['link'], ' + ', $message['member']['msn']['link'], ' + ', $message['member']['aim']['link'], ' + ', $message['member']['yim']['link'], '
    '; + + // Show the profile, website, email address, and personal message buttons. + if ($settings['show_profile_buttons']) + { + // Don't show the profile button if you're not allowed to view the profile. + if ($message['member']['can_view_profile']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[27] . '' : $txt[27]), ''; + + // Don't show an icon if they haven't specified a website. + if ($message['member']['website']['url'] != '') + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; + + // Don't show the email address if they want it hidden. + if (empty($message['member']['hide_email'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + + // Since we know this person isn't a guest, you *can* message them. + if ($context['can_send_pm']) + echo ' + ', $settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'], ''; + } + } + // Otherwise, show the guest's email. + else + echo ' +
    +
    + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + + // Done with the information about the poster... on to the post itself. + echo ' +
    +
    + + + + +
    + ', $message['subject'], ''; + + // If this is the first post, (#0) just say when it was posted - otherwise give the reply #. + echo ' +
    ', !($message['id'] == $context['topic_first_message']) ? $txt['post_no']. $message['counter'] : '', ' ', $txt[30], ': ', $message['time'], '
    '; + + // Can they reply? Have they turned on quick reply? + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + // So... quick reply is off, but they *can* reply? + elseif ($context['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + + // Can the user modify the contents of this post? + if ($message['can_modify']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[66] . '' : $txt[17]), ''; + + // How about... even... remove it entirely?! + if ($message['can_remove']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + if ($context['can_warn']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['visual_raise'] . '' : $txt['visual_warn']), ''; + + + // What about splitting it off the rest of the topic? + if ($context['can_split']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['smf251'] . '' : $txt['smf251']), ''; + + // Show a checkbox for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove']) + echo ' + '; + + // Show the post itself, finally! + echo ' +
    +
    +
    ', $message['body']; + /*if($modSettings['nowplayingEnabled'] && $message['nowplaying'] != '') + { + if(isset($modSettings['nowplaying_image']) && $modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text']) && $modSettings['nowplaying_text'] != '') + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + echo '

    ', $nowplayingstring, ' ', $message['nowplaying'], ''; + }*/ + echo '
    +
    + + + + + +
    '; + + // Assuming there are attachments... + if (!empty($message['attachment'])) + { + echo ' +
    +
    '; + + foreach ($message['attachment'] as $attachment) + { + if (isset($attachment['image'])) + echo ' + ', $attachment['image'], '
    '; + echo ' + * ' . $attachment['name'] . ' (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['width'] . 'x' . $attachment['height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)
    '; + } + + echo ' +
    '; + } + + echo ' +
    '; + + // Show " Last Edit: Time by Person " if this post was edited. + /*if ($settings['show_modify'] && !empty($message['modified']['name'])) + echo ' + « ', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], ' »';*/ + if($modSettings['nowplayingEnabled'] && $message['nowplaying'] != '') + { + if(isset($modSettings['nowplaying_image']) && $modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text']) && $modSettings['nowplaying_text'] != '') + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + echo '

    ', $nowplayingstring, ' ', $message['nowplaying'], ''; + } + + echo ' +
    '; + + // quick quote + echo ' +  '; + + // Maybe they want to report this post to the moderator(s)? + if ($context['can_report_moderator']) + echo ' + ', $txt['rtm1'], '  '; + + /*echo ' + ';*/ + // Show the IP to this user for this post - because you can moderate? + if ($context['can_moderate_forum'] && !empty($message['member']['ip'])) + echo ' + ', $message['member']['ip'], ' (?)'; + // Or, should we show it because this is you? + elseif ($message['can_see_ip']) + echo ' + ', $message['member']['ip'], ''; + // Okay, are you at least logged in? Then we can show something about why IPs are logged... +/* elseif (!$context['user']['is_guest']) + echo ' + ', $txt[511], '';*/ + // Otherwise, you see NOTHING! + else + echo ' + '/*, $txt[511]*/; + + echo ' +
    '; + + // Show the member's signature? + if (!empty($message['member']['signature']) && empty($options['show_no_signatures'])) + echo ' +
    +
    ', $message['member']['signature'], '
    '; + + echo ' +
    +
    +
     
    + + + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index'], ($modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : ''), ' + '; + + $buttonArray = array(); + if ($context['can_reply']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Another special case, similar to above but reversed. Show "add poll" unless they can't - then show unread here too. + if ($context['can_add_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; + elseif ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; + + if ($context['can_send_topic']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; + + echo implode($context['menu_separator'], $buttonArray); + + echo '  +
    +
    + + + '; + if ($settings['linktree_inline']) + echo ' + '; + echo ' + + +
    ', theme_linktree(), ' ', $context['previous_next'], '
    +
    ', theme_show_mod_buttons(), '
    '; + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post']) + echo ' + +
    '; + + echo ' +
    +
    + ' . $txt[160] . ': +   + +
    +
    +
    '; + + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + { + if ($context['show_spellchecking']) + echo ' +'; + + echo ' + + + + + + + + + + + '; + } + + // Now start printing all of the smileys. + if (!empty($context['smileys']['postform'])) + { + echo ' + + + + '; + } + + // If there are additional smileys then ensure we provide the javascript for them. + if (!empty($context['smileys']['popup'])) + { + echo ' + '; + } + + // Finally the most important bit - the actual text box to write in! + echo ' + + + + '; +} +?> diff --git a/Themes/fixed/Errors.template.php b/Themes/fixed/Errors.template.php new file mode 100644 index 0000000..d8d6723 --- /dev/null +++ b/Themes/fixed/Errors.template.php @@ -0,0 +1,141 @@ + + + + + + + +
    + ', $txt['quick_reply_1'], '
    + '; + + // The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you! + $context['bbc_tags'] = array(); + $context['bbc_tags'][] = array( + 'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]), + 'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]), + 'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]), + 'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]), + array(), + 'glow' => array('code' => 'glow', 'before' => '[glow=red,2,300]', 'after' => '[/glow]', 'description' => $txt[442]), + 'shadow' => array('code' => 'shadow', 'before' => '[shadow=red,left]', 'after' => '[/shadow]', 'description' => $txt[443]), + 'move' => array('code' => 'move', 'before' => '[move]', 'after' => '[/move]', 'description' => $txt[439]), + array(), + 'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]), + 'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]), + 'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]), + 'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]), + array(), + 'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]), + array(), + 'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]), + 'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]), + ); + $context['bbc_tags'][] = array( + 'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]), + 'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]), + 'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]), + 'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]), + 'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]), + array(), + 'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]), + 'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]), + 'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]), + array(), + 'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]), + 'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]), + 'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]), + array(), + 'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $txt[259]), + 'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]), + array(), + 'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]), + ); + // Here loop through the array, printing the images/rows/separators! + foreach ($context['bbc_tags'][0] as $image => $tag) + { + // Is there a "before" part for this bbc button? If not, it can't be a button!! + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + // Print a drop down list for all the colors we allow! + if (!isset($context['disabled_tags']['color'])) + echo ' '; + echo '
    '; + + // Print the buttom row of buttons! + foreach ($context['bbc_tags'][1] as $image => $tag) + { + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + echo ' +
    '; + + // Show each row of smileys ;). + foreach ($context['smileys']['postform'] as $smiley_row) + { + foreach ($smiley_row['smileys'] as $smiley) + echo ' + ', $smiley['description'], ''; + + // If this isn't the last row, show a break. + if (empty($smiley_row['last'])) + echo '
    '; + } + + // If the smileys popup is to be shown... show it! + if (!empty($context['smileys']['popup'])) + echo ' + [', $txt['more_smileys'], ']'; + + echo ' +
    + +
    ', $context['error_title'], '
    + ', $context['error_message'], ' +
    '; + + // Show a back button (using javascript.) + echo ' +'; +} + +function template_error_log() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' +
    + + + + + + + '; + + if ($context['has_filter']) + echo ' + + + '; + echo ' + + + '; + + if (!empty($context['errors'])) + echo ' + + + '; + + foreach ($context['errors'] as $error) + { + echo ' + + + '; + } + + if (!empty($context['errors'])) + echo ' + + + '; + else + echo ' + + + '; + + echo ' + + + +
    ', $txt[119], ' ', $txt['errlog1'], '
    ', $txt['errlog2'], '
    + ', $txt['applying_filter'], ': ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], ' (', $txt['clear_filter'], ') +
    + + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    +
    + +
    + + + + + + + + + + + +
    + ', $txt['apply_filter'], ': ', $txt['filter_only_member'], ' + ', $error['member']['link'], ' + + + ', $error['time'], ' +
    + ', $txt['apply_filter'], ': ', $txt['filter_only_ip'], ' + ', $error['member']['ip'], '   + '; + + if ($error['member']['session'] != '') + echo ' + ', $txt['apply_filter'], ': ', $txt['filter_only_session'], ' + ', $error['member']['session']; + + echo ' +
    +
    ', $txt['apply_filter'], ': ', $txt['filter_only_message'], '
    +
    ', $error['message']['html'], '
    +
    +
    + +
    ', $txt[151], '
    + + +
    ', $txt[139], ': ', $context['page_index'], '
    +

    '; + if ($context['sort_direction'] == 'down') + echo ' + '; + echo ' + +
    '; +} + +?> diff --git a/Themes/fixed/GoogleMap.template.php b/Themes/fixed/GoogleMap.template.php new file mode 100644 index 0000000..c253fdd --- /dev/null +++ b/Themes/fixed/GoogleMap.template.php @@ -0,0 +1,77 @@ + + +function template_map() { + global $context, $modSettings, $scripturl, $txt, $settings; + + if ($modSettings['googleMapsEnable']) { +echo '
    +
    Member Map
    +
    + + + +
    + + + '; +if ($modSettings['googleMapsEnableLegend']) { +echo ' + + '; +} +echo ' + + + +
    + '; +if ($modSettings['googleSidebar'] == 1) +echo ' + '; +if ($modSettings['googleSidebar'] == 2) +echo ' + + '; +echo ' +
    +
    +
    + +
    + +
    + + + +
    + '; +if (!$modSettings['googleMapsPinGender']) + echo ' + '; +else + echo ' + + + '; +if ($modSettings['googleMapsEnableClusterer']) +echo ' + '; +echo ' +
    ', $txt['googleMapGreenPinGD'], '', $txt['googleMapGreenPinNG'], '', $txt['googleMapBluePin'], '', $txt['googleMapRedPin'], '', $txt['googleMapPurplePin'], '
    +
    '; +if (allowedTo('googleMap_place')) + echo $txt['googleMapAddPinNote']; +echo ' + + +
    +
    +
    +
    '; + } +} + +?> diff --git a/Themes/fixed/Help.template.php b/Themes/fixed/Help.template.php new file mode 100644 index 0000000..e5cabbf --- /dev/null +++ b/Themes/fixed/Help.template.php @@ -0,0 +1,137 @@ + + + + + ', $context['page_title'], ' + + + + + ', $context['help_text'], '
    +
    + + +'; +} + +function template_find_members() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + ', $txt['find_members'], ' + + + + + + +
    + + + + + + + + + + +
    ', $txt['find_members'], '
    + ', $txt['find_username'], ':
    +
    + ', $txt['find_wildcards'], ' +
    + + +
    + +
    + + + + + '; + + if (empty($context['results'])) + echo ' + + + '; + else + { + $alternate = true; + foreach ($context['results'] as $result) + { + echo ' + + + '; + + $alternate = !$alternate; + } + + echo ' + + + '; + } + + echo ' +
    ', $txt['find_results'], '
    ', $txt['find_no_results'], '
    + ' . $txt[27] . ' + ', $result['name'], ' +
    ', $txt[139], ': ', $context['page_index'], '
    + + + +
    '; + + if (empty($context['results'])) + echo ' + '; + + echo ' + +'; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/InstantMessage.template.php b/Themes/fixed/InstantMessage.template.php new file mode 100644 index 0000000..08361bc --- /dev/null +++ b/Themes/fixed/InstantMessage.template.php @@ -0,0 +1,465 @@ + + + + + +
    ', theme_linktree(), '
    + + + + + + + + + + '; + if (!$context['show_delete']) + echo ' + + + '; + $next_alternate = false; + while ($message = $context['get_pmessage']()) + { + echo ' + + + + + + '; + $next_alternate = $message['alternate']; + } + + echo ' + + + +
    ', $context['show_delete'] ? ' + ' . ($settings['use_image_buttons'] ? '' . $txt[412] . '' : $txt[412]) . '' . $context['menu_separator'] : '', $context['can_send_pm'] ? ($context['from_or_to'] == 'from' ? ' + ' . ($settings['use_image_buttons'] ? '' . $txt[320] . '' : $txt[320]) . '' . $context['menu_separator'] : ' + ' . ($settings['use_image_buttons'] ? '' . $txt[316] . '' : $txt[316]) . '' . $context['menu_separator']) : '', $context['can_send_pm'] ? ' + ' . ($settings['use_image_buttons'] ? '' . $txt[321] . '' : $txt[321]) . '' . $context['menu_separator'] : '', ' + ', ($settings['use_image_buttons'] ? '' . $txt[322] . '' : $txt[322]), ' +
    ', $txt[317], $context['sort_by'] == 'date' ? ' ' : '', '', $txt[319], $context['sort_by'] == 'subject' ? ' ' : '', '', ($context['from_or_to'] == 'from' ? $txt[318] : $txt[324]), $context['sort_by'] == 'name' ? ' ' : '', '
    ', $txt[151], '
    ', $message['time'], '', $message['subject'], '', ($context['from_or_to'] == 'from' ? $message['member']['link'] : (empty($message['recipients']['to']) ? '' : implode(', ', $message['recipients']['to']))), '
    + + + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    +
    '; + + if ($context['get_pmessage'](true)) + { + echo ' + + + + + +
     ', $txt[29], '', $txt[118], '
    + '; + + while ($message = $context['get_pmessage']()) + { + $windowcss = $message['alternate'] == 0 ? 'windowbg' : 'windowbg2'; + + echo ' + '; + } + + echo ' + +
    + + + +
    + + + + + + + + +
    + ', $message['member']['link'], ' +
    '; + if (isset($message['member']['title']) && $message['member']['title'] != '') + echo ' + ', $message['member']['title'], '
    '; + if (isset($message['member']['group']) && $message['member']['group'] != '') + echo ' + ', $message['member']['group'], '
    '; + + if (!$message['member']['is_guest']) + { + // Show the post group if and only if they have no other group or the option is on, and they are in a post group. + if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') + echo ' + ', $message['member']['post_group'], '
    '; + echo ' + ', $message['member']['group_stars'], '
    '; + + // Is karma display enabled? Total or +/-? + if ($modSettings['karmaMode'] == '1') + echo ' +
    + ', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
    '; + elseif ($modSettings['karmaMode'] == '2') + echo ' +
    + ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
    '; + + // Is this user allowed to modify this member's karma? + if ($message['member']['karma']['allow']) + echo ' + ', $modSettings['karmaApplaudLabel'], ' ', $modSettings['karmaSmiteLabel'], '
    '; + + // Show online and offline buttons? + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) + echo ' + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $message['member']['online']['text'] . '' : '', '

    '; + + // Show the member's gender icon? + if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '') + echo ' + ', $txt[231], ': ', $message['member']['gender']['image'], '
    '; + + // Show how many posts they have made. + echo ' + ', $txt[26], ': ', $message['member']['posts'], '
    +
    '; + + // Show avatars, images, etc.? + if (!empty($settings['show_user_images']) && empty($options['show_no_avatars'])) + echo ' + ', $message['member']['avatar']['image'], '
    '; + + // Show their personal text? + if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') + echo ' + ', $message['member']['blurb'], '
    +
    '; + echo ' + ', $message['member']['icq']['link'], ' + ', $message['member']['msn']['link'], ' + ', $message['member']['yim']['link'], ' + ', $message['member']['aim']['link'], '
    '; + + // Show the profile, website, email address, and personal message buttons. + if ($settings['show_profile_buttons']) + { + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[27] . '' : $txt[27]), ''; + if ($message['member']['website']['url'] != '') + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; + if (empty($message['member']['hide_email'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + if (!$context['user']['is_guest'] && $context['can_send_pm']) + echo ' + ', $settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'], ''; + } + } + else + echo ' +
    +
    + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + echo ' +
    +
    + + + +
    + ', $message['subject'], ''; + + // Show who the message was sent to. + echo ' +
    « ', $txt['sent_to'], ': '; + + // People it was sent directly to.... + if (!empty($message['recipients']['to'])) + echo implode(', ', $message['recipients']['to']); + // Otherwise, we're just going to say "some people". + elseif ($context['folder'] != 'outbox') + echo '(', $txt['pm_undisclosed_recipients'], ')'; + + echo ' ', $txt[30], ': ', $message['time'], ' »
    '; + + // If we're in the outbox, show who it was sent to besides the "To:" people. + if (!empty($message['recipients']['bcc'])) + echo ' +
    « ', $txt[1502], ': ', implode(', ', $message['recipients']['bcc']), ' »
    '; + + echo ' +
    '; + + // Show reply buttons if you have the permission to send PMs. + if ($context['can_send_pm']) + { + // You can't really reply if the member is gone. + if (!$message['member']['is_guest']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]), ' ', $context['menu_separator']; + // This is for "forwarding" - even if the member is gone. + else + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), '', $context['menu_separator']; + } + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[154] . '' : $txt[154]), ' + +
    +
    +
    ', $message['body'], '
    +
    '; + + // Show the member's signature? + if (!empty($message['member']['signature']) && empty($options['show_no_signatures'])) + echo ' +
    +
    ', $message['member']['signature'], '
    '; + + echo ' +
    +
    +
    + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    '; + } + + echo ' + +'; +} + +function template_send() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + if ($context['show_spellchecking']) + echo ' + '; + + echo ' + + + + +
    ', theme_linktree(), '
    + + + + +
    + ', ($settings['use_image_buttons'] ? '' . $txt[316] . '' : $txt[316]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[320] . '' : $txt[320]), '', $context['menu_separator'], ' +
    '; + + // Show which messages were sent successfully and which failed. + if (!empty($context['send_log'])) + { + echo ' +
    + + + + + + + +
    ', $txt['pm_send_report'], '
    '; + foreach ($context['send_log']['sent'] as $log_entry) + echo '', $log_entry, '
    '; + foreach ($context['send_log']['failed'] as $log_entry) + echo '', $log_entry, '
    '; + echo ' +

    '; + } + + // Show the preview of the personal message. + if (isset($context['preview_message'])) + echo ' +
    + + + + + + + +
    ', $context['preview_subject'], '
    + ', $context['preview_message'], ' +

    '; + + // Main message editing box. + echo ' + + + + + + +
    ', $txt[321], ' ', $txt[321], '
    +
    + '; + + // If there were errors for sending the PM, show them. + if (!empty($context['post_error']['messages'])) + { + echo ' + + + + '; + } + + // To and bcc. Include a button to search for members. + echo ' + + + + + + + '; + // Subject of personal message. + echo ' + + + + '; + + // Show BBC buttons, smileys and textbox. + theme_postbox($context['message']); + + // Send, Preview, spellcheck buttons. + echo ' + + + + + + + +
    + ', $txt['error_while_submitting'], ' +
    + ', implode('
    ', $context['post_error']['messages']), ' +
    +
    ', $txt[150], ': +   + ', $txt['find_members'], ' ', $txt['find_members'], ' +
    ', $txt[1502], ': +   + ', $txt['find_members'], ' ', $txt[748], ' +
    ', $txt[70], ':
    + + '; + if ($context['show_spellchecking']) + echo ' + '; + echo ' +
    + +
    + + +
    +
    '; + + // Some hidden information is needed in order to make the spell checking work. + if ($context['show_spellchecking']) + echo ' +
    '; + + // Show the message you're replying to. + if ($context['reply']) + echo ' +
    +
    + + + + + + + + + + +
    ', $txt[319], ': ', $context['quoted_message']['subject'], '
    + + + + + +
    ', $txt[318], ': ', $context['quoted_message']['member']['name'], '', $txt[30], ': ', $context['quoted_message']['time'], '
    +
    ', $context['quoted_message']['body'], '
    '; +} + +// This template asks the user whether they wish to empty out their folder/messages. +function template_ask_delete() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + + + + + +
    ', ($context['delete_all'] ? $txt[411] : $txt[412]), '
    + ', $txt[413], '
    +
    + ', $txt[163], ' - ', $txt[164], ' +
    '; +} + +// This template asks the user what messages they want to prune. +function template_prune() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + + + +
    ', $txt[411], '
    ', $txt['pm_prune_desc1'], ' ', $txt['pm_prune_desc2'], '
    + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Login.template.php b/Themes/fixed/Login.template.php new file mode 100644 index 0000000..8a20343 --- /dev/null +++ b/Themes/fixed/Login.template.php @@ -0,0 +1,271 @@ + + + + '; + + // Did they make a mistake last time? + if (isset($context['login_error'])) + echo ' + + '; + + // Or perhaps there's some special description for this time? + if (isset($context['description'])) + echo ' + + '; + + // Now just get the basic information - username, password, etc. + echo ' + + + + + + + + + + + + + + + + + +
    + ', $txt[34], ' +
    + ', $context['login_error'], ' +
    + ', $context['description'], '
    +
    +
    ', $txt[35], ':
    ', $txt[36], ':
    ', $txt[497], ':
    ', $txt[508], ':
    ', $txt[315], '

    + '; + + // Focus on the correct input - username or password. + echo ' + '; +} + +// Tell a guest to get lost or login! +function template_kick_guest() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + // This isn't that much... just like normal login but with a message at the top. + echo ' +
    + + + + '; + + // Show the message or default message. + echo ' + '; + + // And now the login information. + echo ' + + + + + +
    ', $txt[633], '
    + ', empty($context['kick_message']) ? $txt[634] : $context['kick_message'], '
    + ', $txt[635], ' ', $txt[636], ' ', $txt[637], ' +
    ', $txt[34], '
    + + + + + + + + + + + + + + + + + + +
    ', $txt[35], ':
    ', $txt[36], ':
    ', $txt[497], ':
    ', $txt[508], ':
    ', $txt[315], '

    +
    +
    '; + + // Do the focus thing... + echo ' + '; +} + +// This is for maintenance mode. +function template_maintenance() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + // Display the administrator's message at the top. + echo ' +
    + + + + + + + + + '; + + // And now all the same basic login stuff from before. + echo ' + + +
    ', $context['title'], '
    + ', $txt['maintenance3'], ' + ', $context['description'], '
    ', $txt[114], '
    + + + + + + + + + + + + + + +
    ', $txt[35], ':', $txt[36], ':  
    ', $txt[497], ':  ', $txt[508], ':
    +
    +
    '; +} + +// This is for the security stuff - makes administrators login every so often. +function template_admin_login() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Since this should redirect to whatever they were doing, send all the get data. + echo ' +
    + + + + '; + + // We just need the password. + echo ' + + + +
    + ', $txt[34], ' +
    + ', $txt[36], ': ', $txt[119], '
    + +
    '; + + // Make sure to output all the old post data. + echo $context['post_data'], ' +
    '; + + // Focus on the password box. + echo ' +'; +} + +// Activate your account manually? +function template_retry_activate() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Just ask them for their code so they can try it again... + echo ' +
    +
    + + + '; + + // You didn't even have an ID? + if (empty($context['member_id'])) + echo ' + + + '; + + echo ' + + + + + + +
    ', $context['page_title'], '
    ', $txt['invalid_activation_username'], ':
    ', $txt['invalid_activation_retry'], ':
    +
    '; +} + +// Activate your account manually? +function template_resend() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Just ask them for their code so they can try it again... + echo ' +
    +
    + + + + + + + + + + + + + + + '; + + if ($context['can_activate']) + echo ' + + + + + '; + + echo ' + + +
    ', $context['page_title'], '
    ', $txt['invalid_activation_username'], ':
    ', $txt['invalid_activation_new'], '
    ', $txt['invalid_activation_new_email'], ':
    ', $txt['invalid_activation_password'], ':
    ', $txt['invalid_activation_known'], '
    ', $txt['invalid_activation_retry'], ':
    +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/ManageAttachments.template.php b/Themes/fixed/ManageAttachments.template.php new file mode 100644 index 0000000..fe912c9 --- /dev/null +++ b/Themes/fixed/ManageAttachments.template.php @@ -0,0 +1,107 @@ + + + ', $txt['smf201'], ' + + ', $txt['smf202'], ' + + ', $txt['smf203'], ' + + + + + + + + + + + + +
    ', $txt['smf204'], ':', $context['num_attachments'], '
    ', $txt['attachment_manager_total_avatars'], ':', $context['num_avatars'], '
    ', $txt['smf205'], ':', $context['attachment_total_size'], ' ', $txt['smf211'], ' [', $txt['attachment_manager_recount'], ']
    ', $txt['smf206'], ':', isset($context['attachment_space']) ? $context['attachment_space'] . ' ' . $txt['smf211'] : $txt['smf215'], '
    + + + ', $txt['smf207'], ' + + +
    + ', $txt[72], ':
    + ', $txt['smf209'], ' ', $txt[579], ' + + +
    +
    + ', $txt[72], ':
    + ', $txt['smf210'], ' ', $txt['smf211'], ' + + +
    +
    + ', $txt['attachment_manager_avatars_older'], ' ', $txt[579], ' + + +
    + + + +
    +
    + + + + + + + + + + + + '; + $alternate = false; + foreach ($context['posts'] as $post) + { + echo ' + + + + + + + '; + $alternate = !$alternate; + } + echo ' + + + + + + +
    ', $txt['attachment_manager_browse_files'], '
    '; + + if (!$context['browse_avatars']) + echo ' + >', $txt['attachment_manager_attachments'], ' | + ', $txt['attachment_manager_avatars'], ''; + else + echo ' + ', $txt['attachment_manager_attachments'], ' | + >', $txt['attachment_manager_avatars'], ''; + + echo ' +
    ', $txt['smf213'], $context['sort_by'] == 'name' ? ' ' : '', '', $txt['smf214'], $context['sort_by'] == 'size' ? ' ' : '', '', empty($context['browse_avatars']) ? $txt[279] : $txt['attachment_manager_member'], $context['sort_by'] == 'member' ? ' ' : '', '', empty($context['browse_avatars']) ? $txt[317] : $txt['attachment_manager_last_active'], $context['sort_by'] == 'date' ? ' ' : '', '
    ', $post['attachment']['link'], '', $post['attachment']['size'], $txt['smf211'], '', $post['poster']['link'], '', $post['time'], !$context['browse_avatars'] ? '
    ' . $txt['smf88'] . ' ' . $post['link'] : '', '
    ', $txt[139], ': ', $context['page_index'], '
    + + + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/ManageBoards.template.php b/Themes/fixed/ManageBoards.template.php new file mode 100644 index 0000000..681d944 --- /dev/null +++ b/Themes/fixed/ManageBoards.template.php @@ -0,0 +1,409 @@ + + + + ' . $txt[119] . ' + ' . $txt[41] . ' + + + ' . $txt[677] . ' + + + ' . $txt['boardsEdit'] . ' + + '; + + // Button for creating a new category. + echo ' + + +
    + + +
    + + '; + + // Loop through every categories, listing the boards in each as we go. + foreach ($context['categories'] as $category) + { + // Link to modify the category. + echo ' + + + ', $category['name'], ' ', $txt['catModify'], ' + + '; + + // Boards table header. + echo ' + + +
    + + + + '; + + $alternate = false; + + // List through every board in the category, printing its name and link to modify the board. + foreach ($category['boards'] as $board) + { + $alternate = !$alternate; + + echo ' + + + + + '; + } + + // Button to add a new board. + echo ' + + + +
    ', $txt['mboards_name'], '
    ', $board['name'], '', $context['can_manage_permissions'] ? '' . $txt['mboards_permissions'] . '' : '', '', $txt['mboards_modify'], '

    + +
    + + '; + } + echo ' + '; +} + +// Template for editing/adding a category on the forum. +function template_modify_category() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Print table header. + echo ' +
    + + + +
    + + + + + + +
    ', isset($context['category']['is_new']) ? $txt['mboards_new_cat_name'] : $txt['catEdit'], '
    + + '; + // If this isn't the only category, let the user choose where this category should be positioned down the board index. + if (count($context['category_order']) > 1) + { + echo ' + + + '; + } + // Allow the user to edit the category name and/or choose whether you can collapse the category. + echo ' + + + + + + '; + + // Table footer. + echo ' + + + +
    + ', $txt[43], '
    +

    +
    + +
    + ', $txt[44], ':
    + ', $txt[672], '

    +
    + +
    + ' . $txt['collapse_enable'] . '
    + ' . $txt['collapse_desc'] . '

    +
    + +
    +
    '; + if (isset($context['category']['is_new'])) + echo ' + '; + else + echo ' + + '; + echo ' +
    + '; + // If this category is empty we don't bother with the next confirmation screen. + if ($context['category']['is_empty']) + echo ' + '; + echo ' +
    +
    +
    '; +} + +// A template to confirm if a user wishes to delete a category - and whether they want to save the boards. +function template_confirm_category_delete() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Print table header. + echo ' +
    + + + + + + + + +
    ', $txt['mboards_delete_cat'], '
    + ', $txt['mboards_delete_cat_contains'], ': +
      '; + + foreach ($context['category']['children'] as $child) + echo ' +
    • ', $child['node']['name'], '
    • '; + + echo ' +
    +
    +
    + + + + + + + + + + +
    ', $txt['mboards_delete_what_do'], ':
    +
    + : + +
    + + +
    + + + +
    '; +} + +// Below is the template for adding/editing an board on the forum. +function template_modify_board() +{ + global $context, $settings, $options, $scripturl, $txt; + + // The main table header. + echo ' +
    + + + +
    + + + + + + +
    ', isset($context['board']['is_new']) ? $txt['mboards_new_board_name'] : $txt['boardsEdit'], '
    + '; + + // Option for choosing the category the board lives in. + echo ' + + + + '; + + // If this isn't the only board in this category let the user choose where the board is to live. + if ((isset($context['board']['is_new']) && count($context['board_order']) > 0) || count($context['board_order']) > 1) + { + echo ' + + + '; + } + + // Options for board name and description. + echo ' + + + + + + + + + '; + + // Options to choose moderators, specifiy as announcement board and choose whether to count posts here. + echo ' + + + + + + + '; + + // Here the user can choose to force this board to use a theme other than the default theme for the forum. + echo ' + + + + + + + '; + + // Finish off the table. + echo ' + + + +
    + ', $txt['mboards_category'], '
    +

    +
    + +
    + ', $txt[43], '
    +

    +
    '; + + // The first select box gives the user the option to position it before, after or as a child of another board. + echo ' +   '; + + // The second select box lists all the boards in the category. + echo ' + +
    + ', $txt[44], ':
    + ', $txt[672], '

    +
    + +
    + ', $txt['mboards_description'], '
    + ', $txt['mboards_description_desc'], '

    +
    + +
    + ', $txt['mboards_groups'], '
    + ', $txt['mboards_groups_desc'], '

    +
    '; + + // List all the membergroups so the user can choose who may access this board. + foreach ($context['groups'] as $group) + echo ' + ' . $group['name'] . '  
    '; + echo ' + ', $txt[737], '  
    +
    +
    + ', $txt['mboards_moderators'], '
    + ', $txt['mboards_moderators_desc'], '

    +
    + + ', $txt['find_members'], ' +
    + ', $txt['mboards_count_posts'], '
    + ', $txt['mboards_count_posts_desc'], '

    +
    + +
    + ', $txt['mboards_theme'], '
    + ', $txt['mboards_theme_desc'], '

    +
    + +
    + ', $txt['mboards_override_theme'], '
    + ', $txt['mboards_override_theme_desc'], '

    +
    + +
    +
    '; + if (isset($context['board']['is_new'])) + echo ' + + '; + else + echo ' + + '; + echo ' +
    + +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/ManageMembers.template.php b/Themes/fixed/ManageMembers.template.php new file mode 100644 index 0000000..534047d --- /dev/null +++ b/Themes/fixed/ManageMembers.template.php @@ -0,0 +1,1424 @@ + +
    + + + + + + +
    ' . $txt[119] . ' ' . $txt['membergroups_title'] . '
    ', $txt['membergroups_description'], '
    +
    + +
    + + + + + + + + '; + foreach ($context['groups']['regular'] as $group) + { + echo ' + + + + + + '; + } + + echo ' + + + +
    ', $txt['membergroups_regular'], '
    ', $txt['membergroups_name'], '', $txt['membergroups_stars'], '', $txt['membergroups_members_top'], '', $txt[17], '
    ', empty($group['color']) ? $group['name'] : '' . $group['name'] . '', '', $group['stars'], '', $group['can_search'] ? $group['link'] : $group['num_members'], '' . $txt['membergroups_modify'] . '
    + +
    + + +
    + + + + + + + + + '; + foreach ($context['groups']['post'] as $group) + { + echo ' + + + + + + + '; + } + + echo ' + + + +
    ', $txt['membergroups_post'], '
    ', $txt['membergroups_name'], '', $txt['membergroups_stars'], '', $txt['membergroups_members_top'], '', $txt['membergroups_min_posts'], '', $txt[17], '
    ', empty($group['color']) ? $group['name'] : '' . $group['name'] . '', '', $group['stars'], '', $group['can_search'] ? $group['link'] : $group['num_members'], '', $group['min_posts'], '' . $txt['membergroups_modify'] . '
    + +
    + + +
    + '; +} + +function template_new_group() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + ', $context['postgroup'] ? ' + + + ' : '', ' + + + + + + + + + + + +
    ', $txt['membergroups_new_group'], '
    ', $txt['membergroups_group_name'], ':
    ' . $txt['membergroups_min_posts'] . ':
    ', $txt['membergroups_permissions'], ':', $txt['membergroups_new_as_type'], ':   ', $txt['membergroups_can_edit_later'], '
    ', $txt['membergroups_new_as_copy'], ':
    ', $txt['membergroups_new_board'], ': +
    ', $txt['membergroups_new_board_desc'], '
    +
    '; + + foreach ($context['boards'] as $board) + echo ' +
    '; + + echo ' +
    + +

    + +
    '; +} + +function template_edit_group() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + '; + if ($context['group']['allow_post_group']) + echo ' + + + + + + + '; + echo ' + + + + + + + + + + + + + + + + + + + +
    ', $txt['membergroups_edit_group'], ' - ', $context['group']['name'], '
    ', $txt['membergroups_edit_name'], ':
    ', $txt['membergroups_min_posts'], ':
    ', $txt['membergroups_online_color'], ':
    ', $txt['membergroups_star_count'], ':
    ', $txt['membergroups_star_image'], ':
    ', $txt['membergroups_star_image_note'], '
    *
    + ', $txt['membergroups_max_messages'], ': +
    ', $txt['membergroups_max_messages_note'], '
    +
    +
    + ', $context['group']['allow_delete'] ? ' + ' : '', ' +
    + +
    '; + + if ($context['group']['allow_post_group']) + echo ' + '; +} + +function template_group_members() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + + + + + + + + + + + '; + + if (empty($context['members'])) + echo ' + + + '; + + $alternate = false; + foreach ($context['members'] as $member) + { + echo ' + + + + + + + + '; + $alternate = !$alternate; + } + + echo ' + + + +
    ', $context['page_title'], '
    ', $txt['membergroups_members_all_current_desc'], '
    ', $txt[139], ': ', $context['page_index'], '
    ', $txt[68], $context['sort_by'] == 'name' ? ' ' : '', '', $txt[69], $context['sort_by'] == 'email' ? ' ' : '', '', $txt['attachment_manager_last_active'], $context['sort_by'] == 'active' ? ' ' : '', '', $txt[233], $context['sort_by'] == 'registered' ? ' ' : '', '', $txt[21], $context['sort_by'] == 'posts' ? ' ' : '', '
    ', $txt['membergroups_members_no_members'], '
    ', $member['name'], '', $member['email'], '', $member['last_online'], '', $member['registered'], '', $member['posts'], '
    + +

    '; + + if (!empty($context['group']['assignable'])) + { + echo ' + + + + + + + + + +
    ', $txt['membergroups_members_add_title'], '
    ', $txt['membergroups_members_add_desc'], ': + + ', $txt['find_members'], ' +
    + +
    '; + } + + echo ' + +
    '; +} + +function template_email_members() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + + + +
    ' . $txt[119] . ' ', $txt[6], '
    ' . $txt['smf250'] . '
    '; + + foreach ($context['groups'] as $group) + echo ' + (', $group['member_count'], ')
    '; + + echo ' +
    '; + + if ($context['can_send_pm']) + echo ' +
    '; + + echo ' + +
    + +
    + +
    '; +} + +function template_email_members_compose() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + +
    + ' . $txt[119] . ' ' . $txt[6] . ' +
    ' . $txt[735] . '
    + +
    +
    + + + + + + + + +
    ' . $txt[338] . '
    ', $txt['email_variables'], '
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    '; +} + +function template_view_members() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + '; + if ($context['sub_action'] == 'all' || $context['sub_action'] == 'query') + { + echo ' + + + + + + + '; + foreach ($context['columns'] as $column) + { + echo ' + '; + } + if ($context['can_delete_members']) + echo ' + '; + else + echo ' + '; + echo ' + '; + if (empty($context['members'])) + echo ' + + + '; + else + { + foreach ($context['members'] as $member) + { + echo ' + + + + + + + + '; + if ($context['can_delete_members']) + echo ' + '; + else + echo ' + '; + echo ' + '; + } + echo ' + + + '; + } + } + else + { + echo ' + + + '; + } + echo ' +
    + ' . $txt[119] . ' ' . $txt[9] . ' +
    + ', $context['sub_action'] == 'all' ? '>' : '', '', $txt[303], ' | ', $context['sub_action'] == 'search' || $context['sub_action'] == 'query' ? '>' : '', $context['sub_action'] == 'search' || $context['sub_action'] == 'all' ? '' . $txt['mlist_search'] . '' : $txt['search_results'] . ' (' . $txt['mlist_search2'] . ')', ' +
    + ', $txt[11], ' +
    + ', $txt[139], ': ' . $context['page_index'] . ' +
    + '; + if ($column['selected']) + echo $column['label'] . ' '; + else + echo $column['label']; + echo ' + + +
    (', $txt['search_no_results'], ')
    + ' . $member['id'] . ' + + ' . $member['username'] . ' + + ' . $member['name'] . ' + + ' . $member['email'] . ' + + ' . $member['ip'] . ' + + ' . $member['last_active'] . ' + + ' . $member['posts'] . ' + + +
    ', $context['can_delete_members'] ? ' + ' : '', ' + + + + ', $context['sort_direction'] == 'up' ? ' + ' : '', ' +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['search_for'], ':
    (', $txt['wild_cards_allowed'], ')
    ', $txt['member_id'], ': + + ', $txt[35], ':
    ', $txt['age'], ': + + ', $txt['email_address'], ':
    ', $txt[26], ': + + ', $txt[96], ':
    ', $txt[233], ': + + ', $txt['date_format'], '', $txt[227], ':
    ', $txt['viewmembers_online'], ': + + ', $txt['date_format'], '', $txt['ip_address'], ':
    ', $txt[231], ': + ', $txt['undefined_gender'], '   + ', $txt[238], '   + ', $txt[239], '   + ', $txt['messenger_address'], ':
    ', $txt['activation_status'], ': + ', $txt['activated'], '   + ', $txt['not_activated'], ' +
    +  

    + ', $txt['member_part_of_these_membergroups'], ':

    +
    + + + + + + '; + foreach ($context['membergroups'] as $membergroup) + echo ' + + + + + '; + echo ' +
    ', $txt['membergroups'], '', $txt['primary'], '', $txt['additional'], '
    + ', $membergroup['name'], ' + + + + ', $membergroup['can_be_additional'] ? '' : ' ', ' +
    +
    + + + + + '; + foreach ($context['postgroups'] as $postgroup) + echo ' + + + + '; + echo ' +
    ', $txt['membergroups_postgroups'], '
    + ', $postgroup['name'], ' + + +
    +
    + + +
    +
    +
    '; +} + +function template_ban_list() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' + ', $txt['ban_title'], ' +
    + > ', $txt['ban_edit_list'], ' | + ', $txt['ban_add_new'], ' | + ', $txt['ban_log'], ' +
    ', $txt['ban_description'], '
    +
    + + + + '; + foreach ($context['columns'] as $column) + { + if ($column['selected']) + echo ' + + ', $column['label'], '  + '; + elseif ($column['sortable']) + echo ' + + ', $column['link'], ' + '; + else + echo ' + + ', $column['label'], ' + '; + } + echo ' + + '; + + while ($ban = $context['get_ban']()) + { + echo ' + + + + + + + + + '; + } + echo ' + + + +
    ', $txt[139], ': ', $context['page_index'], '
    '; + if ($ban['type'] == 'ip_ban') + echo '', $txt[512], ': ', $ban['ip']; + elseif ($ban['type'] == 'hostname_ban') + echo '', $txt['hostname'], ': ', $ban['hostname']; + elseif ($ban['type'] == 'email_ban') + echo '', $txt[69], ': ', $ban['email']; + elseif ($ban['type'] == 'user_ban') + echo '', $txt[35], ': ', $ban['user']['link']; + echo ' + ', $ban['reason'], '', $ban['notes'], '', $ban['restriction'], '', $ban['expires'], ' +  ', $txt[17], ' +
    + +
    '; +} + +function template_ban_edit() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' + ', $txt['ban_title'], ' +
    '; + if ($context['sub_action'] == 'add') + echo ' + ', $txt['ban_edit_list'], ' | + > ', $txt['ban_add_new'], ' | '; + else + echo ' + > ', $txt['ban_edit_list'], ' | + ', $txt['ban_add_new'], ' | '; + echo ' + ', $txt['ban_log'], ' +
    ', $txt['ban_description'], '
    +
    + + + + + + +
    + ', $txt['ban_banned_entity'], ': + + + + '; + if (empty($modSettings['disableHostnameLookup'])) + echo ' + + '; + echo ' + + + + +
    + + + ', $txt['ban_on_ip'], ':
    + +
    + + + ', $txt['ban_on_hostname'], ':
    + +
    + + + ', $txt['ban_on_email'], ':
    + +
    + + + ', $txt['ban_on_username'], ':
    + +
    +
    + ', $txt['ban_expiration'], ':
    + + + + + + +
    + + + ', $txt['never'], ' +
    + + + ', $txt['ban_will_expire_within'], ':
    + ', $txt['ban_days'], '
    +
    +
    + ', $txt['ban_reason'], ': +
    ', $txt['ban_reason_desc'], '
    + +
    +
    + ', $txt['ban_notes'], ': +
    ', $txt['ban_notes_desc'], '
    + +
    +
    + ', $txt['ban_restriction'], ':
    + ', $txt['ban_full_ban'], '
    + ', $txt['ban_cannot_post'], '
    + ', $txt['ban_cannot_register'], '
    +
    +     +
    ', $context['sub_action'] == 'add' ? '' : ' + ', ' + +
    '; +} + +function template_ban_log() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' + ', $txt['ban_title'], ' +
    + ', $txt['ban_edit_list'], ' | + ', $txt['ban_add_new'], ' | + > ', $txt['ban_log'], ' +
    ', $txt['ban_log_description'], '
    +
    + + + + + + + + + + '; + if (empty($context['log_entries'])) + echo ' + + + '; + else + { + foreach ($context['log_entries'] as $log) + echo ' + + + + + + + '; + echo ' + + + '; + } + echo ' +
    ', $txt[139], ': ', $context['page_index'], '
    + ' . $txt['ban_log_ip'], $context['sort'] == 'ip' ? ' ' : '', ' + + ' . $txt['ban_log_email'], $context['sort'] == 'email' ? ' ' : '', ' + + ' . $txt['ban_log_member'], $context['sort'] == 'name' ? ' ' : '', ' + + ' . $txt['ban_log_date'], $context['sort'] == 'date' ? ' ' : '', ' +
    (', $txt['ban_log_no_entries'], ')
    ', $log['ip'], '', $log['email'], '', empty($log['member']['id']) ? '' . $txt[470] . '' : $log['member']['link'], '', $log['date'], '
    + + +
    + +
    '; +} + +function template_edit_reserved_words() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ' . $txt[119] . ' ' . $txt[341] . ' +
    ' . $txt[699] . '
    +
    +
    ' . $txt[342] . '
    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    + +
    '; +} + +// This template shows an admin information on a users IP addresses used and errors attributed to them. +function template_trackUser() +{ + global $context, $settings, $options, $scripturl, $txt; + + // The first table shows IP information about the user. + echo ' +
    + + + + '; + + // The last IP the user used. + echo ' + + + + '; + + // Lists of IP addresses used in messages / error messages. + echo ' + + + + + + + '; + + // List any members that have used the same IP addresses as the current member. + echo ' + + + + +
    + ', $txt['view_ips_by'], ' ', $context['member']['name'], ' +
    ', $txt['most_recent_ip'], ': + ', $context['last_ip'], ' +
    ', $txt['ips_in_messages'], ': + ', (count($context['ips']) > 0 ? implode(', ', $context['ips']) : '(' . $txt['none'] . ')'), ' +
    ', $txt['ips_in_errors'], ': + ', (count($context['ips']) > 0 ? implode(', ', $context['error_ips']) : '(' . $txt['none'] . ')'), ' +
    ', $txt['members_in_range'], ': + ', (count($context['members_in_range']) > 0 ? implode(', ', $context['members_in_range']) : '(' . $txt['none'] . ')'), ' +
    +
    +
    '; + + // The second table lists all the error messages the user has caused/received. + echo ' +
    + + + + + + + + + + + + '; + + // If there arn't any messages just give a message stating this. + if (empty($context['error_messages'])) + echo ' + '; + + // Otherwise print every error message out. + else + // For every error message print the IP address that caused it, the message displayed and the date it occurred. + foreach ($context['error_messages'] as $error) + echo ' + + + + + '; + echo ' +
    + ', $txt['errors_by'], ' ', $context['member']['name'], ' +
    + ', $txt['errors_desc'], ' +
    + ', $txt[139], ': ', $context['page_index'], ' +
    ', $txt['ip_address'], '', $txt[72], '', $txt[317], '
    ', $txt['no_errors_from_user'], '
    + ', $error['ip'], ' + + ', $error['message'], '
    + ', $error['url'], ' +
    ', $error['time'], '
    +
    '; +} + +// The template for trackIP, allowing the admin to see where/who a certain IP has been used. +function template_trackIP() +{ + global $context, $settings, $options, $scripturl, $txt; + + // This function always defaults to the last IP used by a member but can be set to track any IP. + echo ' +
    '; + + // The first table in the template gives an input box to allow the admin to enter another IP to track. + echo ' +
    + + + + + + +
    ', $txt['trackIP'], '
    + ', $txt['enter_ip'], ':     +
    +
    +
    +
    '; + + // The table inbetween the first and second table shows links to the whois server for every region. + if ($context['single_ip']) + { + echo ' +
    + + + + + + +
    + ', $txt['whois_title'], ' ', $context['ip'], ' +
    '; + foreach ($context['whois_servers'] as $server) + echo ' + ', $server['name'], '
    '; + echo ' +
    +
    +
    '; + } + + // The second table lists all the members who have been logged as using this IP address. + echo ' +
    + + + + + + + '; + if (empty($context['ips'])) + echo ' + '; + else + // Loop through each of the members and display them. + foreach ($context['ips'] as $ip => $memberlist) + echo ' + + + + '; + echo ' +
    + ', $txt['members_from_ip'], ' ', $context['ip'], ' +
    ', $txt['ip_address'], '', $txt['display_name'], '
    ', $txt['no_members_from_ip'], '
    ', $ip, '', implode(', ', $memberlist), '
    +
    +
    '; + + // The third table in the template displays a list of all the messages sent using this IP (can be quite long). + echo ' +
    + + + + + + + + + + + + + '; + + // No message means nothing to do! + if (empty($context['messages'])) + echo ' + '; + else + // For every message print the IP, member who posts it, subject (with link) and date posted. + foreach ($context['messages'] as $message) + echo ' + + + + + + '; + echo ' +
    + ', $txt['messages_from_ip'], ' ', $context['ip'], ' +
    + ', $txt['messages_from_ip_desc'], ' +
    + ', $txt[139], ': ', $context['message_page_index'], ' +
    ', $txt['ip_address'], '', $txt['rtm8'], '', $txt[319], '', $txt[317], '
    ', $txt['no_messages_from_ip'], '
    + ', $message['ip'], ' + + ', $message['member']['link'], ' + + + ', $message['subject'], ' + + ', $message['time'], '
    +
    +
    '; + + // The final table in the template lists all the error messages caused/received by anyone using this IP address. + echo ' +
    + + + + + + + + + + + + + '; + if (empty($context['error_messages'])) + echo ' + '; + else + // For each error print IP address, member, message received and date caused. + foreach ($context['error_messages'] as $error) + echo ' + + + + + + '; + echo ' +
    + ', $txt['errors_from_ip'], ' ', $context['ip'], ' +
    + ', $txt['errors_from_ip_desc'], ' +
    + ', $txt[139], ': ', $context['error_page_index'], ' +
    ', $txt['ip_address'], '', $txt['display_name'], '', $txt[72], '', $txt[317], '
    ', $txt['no_errors_from_ip'], '
    + ', $error['ip'], ' + + ', $error['member']['link'], ' + + ', $error['message'], '
    + ', $error['url'], ' +
    ', $error['error_time'], '
    +
    '; +} + +function template_showPermissions() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + + + '; + if ($context['member']['has_all_permissions']) + { + echo ' + + + '; + } + else + { + // General Permissions section. + echo ' + + + '; + if (!empty($context['member']['permissions']['general'])) + { + echo ' + + + + '; + + foreach ($context['member']['permissions']['general'] as $permission) + { + echo ' + + + + '; + } + } + else + echo ' + + + '; + + // Board permission section. + echo ' + + + '; + if (!empty($context['member']['permissions']['board'])) + { + echo ' + + + + '; + foreach ($context['member']['permissions']['board'] as $permission) + { + echo ' + + + + '; + } + } + else + echo ' + + + '; + } + echo ' +
    +   ', $txt['showPermissions'], ' +
    ', $txt['showPermissions_all'], '
    ', $txt['showPermissions_general'], '
    ', $txt['showPermissions_permission'], '
    + ', $permission['is_denied'] ? '' . $permission['id'] . '' : $permission['id'], '
    + ', $permission['name'], ' +
    '; + if ($permission['is_denied']) + echo ' + ', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']); + else + echo ' + ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']); + echo ' +
    ', $txt['showPermissions_none_general'], '
    + +
    + ', $txt['showPermissions_select'], ': + +
    +
    ', $txt['showPermissions_permission'], '
    + ', $permission['is_denied'] || !$permission['is_global'] ? '' . $permission['id'] . '' : $permission['id'], '
    + ', $permission['name'], ' +
    '; + if (!$permission['is_global']) + echo ' + ', $txt['showPermissions_local_only'], '
    + ', $txt['showPermissions_boards'], ':
       ', implode('
       ', $permission['boards']['allowed']); + elseif ($permission['is_global'] && $permission['is_denied']) + { + echo ' + ', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '
    '; + if (empty($context['current_board'])) + echo ' + ', $txt['showPermissions_boards_denied'], ': ', empty($permission['boards']['allowed']) ? $txt['showPermissions_all_boards'] : $txt['showPermissions_all_boards_except'] . ':
       ' . implode('
       ', $permission['boards']['allowed']); + } + elseif ($permission['is_global']) + { + echo ' + ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']), '
    '; + if (empty($context['current_board'])) + echo ' + ', $txt['showPermissions_boards'], ': ', empty($permission['boards']['denied']) ? $txt['showPermissions_all_boards'] : $txt['showPermissions_all_boards_except'] . ':
       ' . implode('
       ', $permission['boards']['denied']); + } + echo ' +
    ', $txt['showPermissions_none_board'], '

    '; +} + +function template_announce() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + + + +
    ', $txt['announce_title'], '
    ', $txt['announce_desc'], '
    + ', $txt['announce_this_topic'], ' ', $context['topic_subject'], '
    +
    '; + + foreach ($context['groups'] as $group) + echo ' + (', $group['member_count'], ')
    '; + + echo ' +
    + +
    + +
    + + + + +
    '; +} + +function template_announcement_send() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + +
    + ', $txt['announce_sending'], ' ', $context['topic_subject'], ' +
    ', $context['percentage_done'], '% ', $txt['announce_done'], '
    + +
    + + + + + + +
    + '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/ManagePermissions.template.php b/Themes/fixed/ManagePermissions.template.php new file mode 100644 index 0000000..cfd8275 --- /dev/null +++ b/Themes/fixed/ManagePermissions.template.php @@ -0,0 +1,309 @@ + + + + + + + + + + + + '; + + if (!empty($context['board'])) + echo ' + '; + + echo ' + + + '; + + foreach ($context['groups'] as $group) + { + echo ' + + + + '; + + if (!empty($context['board'])) + { + echo ' + '; + } + + echo ' + + + '; + } + + echo ' + + + +
    ' . $txt[119] . ' ' . $txt['permissions_title'] . '
    ', empty($context['board']) ? $txt['permissions_groups'] : $txt['permissions_boards'] . ' (' . $context['board']['name'] . ')', '
    ', $txt['membergroups_name'], '', $txt['membergroups_members_top'], ' + ', $txt['membergroups_permissions'], '
    +
    ', $txt['permissions_allowed'], '
    ', $txt['permissions_denied'], ' +
    ', $txt['permissions_access'], '', $txt['permissions_modify'], ' +
    ', $group['name'], '', $group['can_search'] ? $group['link'] : $group['num_members'], ' +
    ', $group['num_permissions']['allowed'], '
    ', empty($group['num_permissions']['denied']) || $group['id'] == 1 ? $group['num_permissions']['denied'] : '' . $group['num_permissions']['denied'] . '', ' +
    '; + + // Don't show the checkbox for admins and moderators, doesn't make sense! + if ($group['id'] != 1 && $group['id'] != 3) + echo ' + '; + + echo ' + ', $group['allow_modify'] ? '' . $txt['permissions_modify'] . '' : '', '', $group['allow_modify'] ? '' : '', '
    +
    +
    ', $txt['permissions_with_selection'], '...
    + ', $txt['permissions_apply_pre_defined'], ' (?): +

    '; + + if (!empty($context['board']) && !empty($context['copy_boards'])) + { + echo ' + ', $txt['permissions_copy_from_board'], ': +

    '; + } + + echo ' + ', $txt['permissions_like_group'], ': +

    +   +
    + + +
    +
    '; + if (!empty($context['boards'])) + { + echo ' + + + + + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + '; + } + + echo ' +
    ' . $txt[119] . ' ', $txt['permissions_boards'], '
    ', $txt[20], '', $txt['permissions_switch'], '
    + ', str_repeat('-', $board['child_level']), ' ' . $board['name'] . ' (', $board['use_local_permissions'] ? $txt['permissions_local'] : $txt['permissions_global'], ') + ', $txt['permissions_global'], '', $txt['permissions_local'], '
    '; + } + + if (!empty($context['board'])) + echo ' + '; + + echo ' + + '; +} + +function template_modify_group() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + +
    + + + '; + echo ' + + + '; + foreach ($context['permissions'] as $permission_type) + { + if ($permission_type['show']) + { + echo ' + + + + '; + foreach ($permission_type['columns'] as $column) + { + echo ' + '; + } + } + } + echo ' + + + +
    ', $context['local'] ? $txt['permissions_modify_local'] : $txt['permissions_modify_group'] . ' - ' . $context['group']['name'], '
    ', $txt['permissions_option_desc'], '
    '; + if ($context['local']) + echo ' + ', $txt['permissions_local_for'], ' \'', $context['group']['name'], '\' ', $txt['permissions_on'], ' \'', $context['board']['name'], '\''; + else + echo ' + ', $permission_type['id'] == 'membergroup' ? $txt['permissions_general'] : $txt['permissions_board'] . ' - ' . $context['group']['name']; + echo ' +
    + '; + foreach ($column as $permissionGroup) + { + echo ' + + + + + + '; + + if (!empty($permissionGroup['permissions'])) + { + $alternate = false; + foreach ($permissionGroup['permissions'] as $permission) + { + echo ' + + '; + if ($permission['has_own_any']) + echo ' + + + + + + + + + + + + + + '; + else + echo ' + + + + + '; + + $alternate = !$alternate; + } + } + + echo ' + + + '; + } + + echo ' +
    ', $permissionGroup['name'], '
    ', $txt['permissions_option_on'], '
    ', $txt['permissions_option_off'], '
    ', $txt['permissions_option_deny'], '
    + ', $permission['show_help'] ? '' . $txt[119] . '' : '', ' + ', $permission['name'], '
    ', $permission['own']['name'], ':
    ', $permission['any']['name'], ':
    ', $permission['name'], '
     
    +
     
    + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/ManageSmileys.template.php b/Themes/fixed/ManageSmileys.template.php new file mode 100644 index 0000000..b1ab058 --- /dev/null +++ b/Themes/fixed/ManageSmileys.template.php @@ -0,0 +1,734 @@ + + + ', $txt[119], ' ', $txt['smileys_manage'], ' + + + + > ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' + + + + ', $context['explain_text'], ' + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['smiley_settings'], '
    ', $txt['smiley_set_select_default'], ': + +
    :
    :
    ', $txt['smileys_enable_note'], '
    ', $txt['smiley_sets_base_url'], ':
    ', $txt['smiley_sets_base_dir'], ':
    + +
    + +
    '; +} + +// Editing the smiley sets. +function template_editsets() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + > ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + '; + + foreach ($context['smiley_sets'] as $smiley_set) + echo ' + + + + + + + '; + + echo ' + + + +
    ', $txt['smiley_sets_default'], '', $txt['smiley_sets_name'], '', $txt['smiley_sets_url'], '', $txt['smiley_set_modify'], ' 
    ', $smiley_set['selected'] ? '*' : '', '', $smiley_set['name'], '', $modSettings['smileys_url'], '/', $smiley_set['path'], '/...', $txt['smiley_set_modify'], '', $smiley_set['id'] != 0 ? '' : '', '
    +
    + + +
    + +

    + + + + + + + +
    ', $txt['smiley_sets_latest'], '
    ', $txt['smiley_sets_latest_fetch'], '
    + + + '; +} + +// Modifying a smiley set. +function template_modifyset() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + > ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + '; + + // If this is an existing set, and there are still un-added smileys - offer an import opportunity. + if (!empty($context['current_set']['can_import'])) + { + echo ' + + + '; + } + + echo ' + + + + + + + + + + + + '; + + // If this is a new smiley set they have the option to import smileys already in the directory. + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) + echo ' + + + + '; + + echo ' + + + +
    ', $context['current_set']['is_new'] ? $txt['smiley_set_new'] : $txt['smiley_set_modify_existing'], '
    + ', $context['current_set']['can_import'] == 1 ? $txt['smiley_set_import_single'] : $txt['smiley_set_import_multiple'], ' ', $txt['662'], ' ', $context['current_set']['can_import'] == 1 ? $txt['smiley_set_to_import_single'] : $txt['smiley_set_to_import_multiple'], ' +
    :
    : + ', $modSettings['smileys_url'], '/'; + if ($context['current_set']['id'] == 'default') + echo 'default'; + elseif (empty($context['smiley_set_dirs'])) + echo ' + '; + else + { + echo ' + '; + } + echo '/.. +
    :
    :
    + +
    + + +
    '; +} + +// Editing smileys themselves. +function template_editsmileys() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + > ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + '; + foreach ($context['smileys'] as $smiley) + echo ' + + + '; + echo ' + + + +
    + +
    + ', $context['sort'] == 'code' ? '' . $txt['smileys_code'] . '' : '' . $txt['smileys_code'] . '', ' + + ', $context['sort'] == 'filename' ? '' . $txt['smileys_filename'] . '' : '' . $txt['smileys_filename'] . '', ' + + ', $context['sort'] == 'hidden' ? '' . $txt['smileys_location'] . '' : '' . $txt['smileys_location'] . '', ' + + ', $context['sort'] == 'description' ? '' . $txt['smileys_description'] . '' : '' . $txt['smileys_description'] . '', ' + + ', $txt['smileys_modify'], ' +
    + ', $smiley['description'], ' + + ', $smiley['code'], ' + + ', $smiley['filename'], ' + + ', $smiley['location'], ' + + ', $smiley['description'], empty($smiley['sets_not_found']) ? '' : '
    + ' . $txt['smileys_not_found_in_set'] . ': ' . implode(', ', $smiley['sets_not_found']), ' +
    + ', $txt['smileys_modify'], ' + + +
    +
    + +
    + +
    + '; +} + +// Editing an individual smiley +function template_modifysmiley() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + > ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['smiley_modify_existing'], '
    ', $txt['smiley_preview'], ': ( ', $txt['smiley_preview_using'], ': ) +
    :
    : '; + if (empty($context['filenames'])) + echo ' + '; + else + { + echo ' + '; + } + echo ' +
    :
    : + +
    + +
    + + +
    + '; +} + +// Adding a new smiley. +function template_addsmiley() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + > ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['smileys_add_method'], ':
    + ( ', $txt['smiley_preview_using'], ': ) +
    + : + '; + if (empty($context['filenames'])) + echo ' + '; + else + { + echo ' + '; + echo ' + '; + } + + echo ' +
    ', $txt['smileys_add_upload_choose'], ':
    ', $txt['smileys_add_upload_choose_desc'], '
    +
    + + + + + + + + + + + + + + + + + + + +
    ', $txt['smiley_new'], '
    :
    :
    : + +
    + +
    + '; +} + +// Ordering smileys. +function template_setorder() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + > ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    '; + + foreach ($context['smileys'] as $location) + { + echo ' +
    +
    + + + + + + + + + + +
    ', $location['title'], '
    ', $location['description'], '
    + ', empty($context['move_smiley']) ? $txt['smileys_move_select_smiley'] : $txt['smileys_move_select_destination'], '...
    '; + foreach ($location['rows'] as $row) + { + if (!empty($context['move_smiley'])) + echo ' + ', $txt['smileys_move_here'], ''; + foreach ($row as $smiley) + { + if (empty($context['move_smiley'])) + echo '', $smiley['description'], ''; + else + echo '', $smiley['description'], '', $txt['smileys_move_here'], ''; + } + echo ' +
    '; + } + if (!empty($context['move_smiley'])) + echo ' + ', $txt['smileys_move_here'], ''; + echo ' +
    +
    '; + } +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Memberlist.template.php b/Themes/fixed/Memberlist.template.php new file mode 100644 index 0000000..beb2be9 --- /dev/null +++ b/Themes/fixed/Memberlist.template.php @@ -0,0 +1,171 @@ + + + ', theme_linktree(), ' + + '; + + // Display links to view all/search. + echo ' + + + + + + + + '; + + // Display each of the column headers of the table. + foreach ($context['columns'] as $column) + { + // We're not able (through the template) to sort the search results right now... + if (isset($context['old_search'])) + echo ' + + ', $column['label'], ''; + // This is a selected solumn, so underline it or some such. + elseif ($column['selected']) + echo ' + '; + // This is just some column... show the link and be done with it. + else + echo ' + + ', $column['link'], ''; + } + + echo ' + '; + + // Assuming there are members loop through each one displaying their data. + if (!empty($context['members'])) + { + foreach ($context['members'] as $member) + echo ' + + + + + + + + + + + + + + '; + } + // No members? + else + echo ' + + + '; + + // Show the page numbers again. (makes 'em easier to find!) + echo ' + + + +
    + ', $context['sort_links'], ' +
    '; + + // Display page numbers and the a-z links for sorting by name if not a result of a search. + if (!isset($context['old_search'])) + echo ' + + + + + +
    ', $txt[139], ': ', $context['page_index'], '', $context['letter_links'] . '
    '; + // If this is a result of a search then just show the page numbers. + else + echo ' + ', $txt[139], ': ', $context['page_index']; + + echo ' +
    + ' . $column['label'] . '
    + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $member['online']['text'] . '' : $member['online']['label'], $context['can_send_pm'] ? '' : '', ' + ', $member['link'], '', $member['email'], '', $member['website']['link'], '', $member['icq']['link'], '', $member['aim']['link'], '', $member['yim']['link'], '', $member['msn']['link'], '', $member['group'], '', $member['registered'], '', $member['posts'], ' + ', $member['posts'] > 0 ? '' : '', ' +
    ', $txt[170], '
    ', $txt[139], ': ', $context['page_index'], '
    '; + + // If it is displaying the result of a search show a "search again" link to edit their criteria. + if (isset($context['old_search'])) + echo ' +
    + ', $txt['mlist_search2'], ''; +} + +// A page allowing people to search the member list. +function template_search() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Start the submission form for the search! + echo ' +
    '; + + // Display that link tree... + echo ' + + + + +
    ', theme_linktree(), '
    '; + + // Display links to view all/search. + echo ' + + + + '; + + // Display the input boxes for the form. + echo ' + + + +
    + ', $context['sort_links'] . ' +
    + + + + + + + + +
    +
    + ', $txt[582], ':
    +
    +
    + ', $txt['mlist_search_email'], '
    + ', $txt['mlist_search_messenger'], '
    + ', $txt['mlist_search_group'], ' +
    + ', $txt['mlist_search_name'], '
    + ', $txt['mlist_search_website'], ' +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/MessageIndex.template.php b/Themes/fixed/MessageIndex.template.php new file mode 100755 index 0000000..2baedf2 --- /dev/null +++ b/Themes/fixed/MessageIndex.template.php @@ -0,0 +1,396 @@ + + + ', theme_linktree(), ''; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], ''; + } + echo ' + + '; + + if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) + { + echo ' +
    + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + + '; + } + echo ' +
    ', $txt['parent_boards'], '
    '; + + // Is this board itself new? + if ($board['new']) + echo '', $txt[333], ''; + // Is one of this board's children new, then? + elseif ($board['children_new']) + echo '', $txt[333], ''; + // I guess it's not new at all. + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + if (!empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + if (!empty($board['children'])) + { + $children = array(); + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', $txt['parent_boards'], ': ', implode(', ', $children), '
    '; + } + + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + if (!empty($board['last_post']['id'])) + echo ' + ', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link']; + + echo ' +
    '; + } + + if (!empty($options['show_board_desc']) && $context['description'] != '') + { + echo ' + + + + +
    + ', $context['description'], ' +
    '; + } + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5']) . '' : '', '', theme_show_buttons(), '
    +
    '; + + // If Quick Moderation is enabled (and set to checkboxes - 1) start the form. + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' +
    '; + + echo ' + + '; + + // Are there actually any topics to show? + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + + // Show a "select all" box for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' + '; + // If it's on in "image" mode, don't show anything but the column. + elseif (!empty($options['display_quick_mod'])) + echo ' + '; + } + // No topics.... just say, "sorry bub". + else + echo ' + '; + + echo ' + '; + + foreach ($context['topics'] as $topic) + { + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + if($context['user']['is_guest']) + echo ''; + else echo ''; + } + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + echo ''; + } + echo ' + + + + + + + + '; + + // Show the quick moderation options? + if (!empty($options['display_quick_mod'])) + { + echo ' + '; + } + echo ' + '; + } + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + { + echo ' + + + '; + } + + echo ' +
    '; + $first_topic = current($context['topics']); + echo $first_topic['is_sticky'] ? $txt['sticky_topics'] : '' ,'', $txt[70],'', $txt[109], '', $txt[110], '', $txt[301], '', $txt[111], ' + + ', $txt[151], '
    +
    + + +
     ', $txt['non_sticky_topics'], '
     ', $txt['non_sticky_topics'], '
    + + + + '; + // Is this topic new? (assuming they are logged in!) + if ($topic['new'] && $context['user']['is_logged']) + echo ' + ', $txt[302], ''; + + echo ' + ', $topic['first_post']['link']; + + echo ' + ', $topic['pages'], ' + + ', $topic['first_post']['member']['link'], ' + + ', $topic['replies'], ' + + ', $topic['views'], ' + '; + /*if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif')) + echo ' + ';*/ + echo ' + + ', $topic['last_post']['time'], '
    + ', $txt[525], ' ', $topic['last_post']['member']['link'], ' +
    +
    '; + if ($options['display_quick_mod'] == 1 && ($topic['quick_mod']['remove'] || $topic['quick_mod']['lock'] || $topic['quick_mod']['sticky'] || $topic['quick_mod']['move'])) + echo ' + '; + else + { + // Check permissions on each and show only the ones they are allowed to use. + if ($topic['quick_mod']['remove']) + echo '', $txt[63], ''; + if ($topic['quick_mod']['lock']) + echo '', $txt['smf279'], ''; + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) + echo '
    '; + if ($topic['quick_mod']['sticky']) + echo '', $txt['smf277'], ''; + if ($topic['quick_mod']['move']) + echo '', $txt[132], ''; + } + echo '
    + '; + if ($context['can_move']) + { + echo ' + '; + } + echo ' + +
    '; + + // Finish off the form - again, if Quick Moderation is being done with checkboxes. (1) + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' + +
    '; + + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : '', '', theme_show_buttons(), '
    +
    + '; + + // Show breadcrumbs at the bottom too? + if ($settings['linktree_inline']) + echo ' + + + '; + + echo ' + + + + + +
    ', theme_linktree(), '

    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    +
    + : +   + +
    +
    '; +} + +function theme_show_buttons() +{ + global $context, $settings, $options, $txt, $scripturl; + + $buttonArray = array(); + + // If they are logged in, and the mark read buttons are enabled.. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[300] . '' : $txt[300]) . ''; + + // If the user has permission to show the notification button... ask them if they're sure, though. + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Are they allowed to post new topics? + if ($context['can_post_new']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[33] . '' : $txt[33]) . ''; + + // How about new polls, can the user post those? + if ($context['can_post_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf20'] . '' : $txt['smf20']) . ''; + + return implode($context['menu_separator'], $buttonArray); +} + +?> diff --git a/Themes/fixed/MessageIndex.template.php~ b/Themes/fixed/MessageIndex.template.php~ new file mode 100644 index 0000000..9d5dc2a --- /dev/null +++ b/Themes/fixed/MessageIndex.template.php~ @@ -0,0 +1,389 @@ + + + ', theme_linktree(), ''; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], ''; + } + echo ' + + '; + + if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) + { + echo ' +
    + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + + '; + } + echo ' +
    ', $txt['parent_boards'], '
    '; + + // Is this board itself new? + if ($board['new']) + echo '', $txt[333], ''; + // Is one of this board's children new, then? + elseif ($board['children_new']) + echo '', $txt[333], ''; + // I guess it's not new at all. + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + if (!empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + if (!empty($board['children'])) + { + $children = array(); + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', $txt['parent_boards'], ': ', implode(', ', $children), '
    '; + } + + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + if (!empty($board['last_post']['id'])) + echo ' + ', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link']; + + echo ' +
    '; + } + + if (!empty($options['show_board_desc']) && $context['description'] != '') + { + echo ' + + + + +
    + ', $context['description'], ' +
    '; + } + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5']) . '' : '', '', theme_show_buttons(), '
    +
    '; + + // If Quick Moderation is enabled (and set to checkboxes - 1) start the form. + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' +
    '; + + echo ' + + '; + + // Are there actually any topics to show? + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + + // Show a "select all" box for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' + '; + // If it's on in "image" mode, don't show anything but the column. + elseif (!empty($options['display_quick_mod'])) + echo ' + '; + } + // No topics.... just say, "sorry bub". + else + echo ' + '; + + echo ' + '; + + foreach ($context['topics'] as $topic) + { + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + echo ''; + + // ', $txt['non_sticky_topics'], ''; + } + echo ' + + + + + + + + '; + + // Show the quick moderation options? + if (!empty($options['display_quick_mod'])) + { + echo ' + '; + } + echo ' + '; + } + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + { + echo ' + + + '; + } + + echo ' +
    '; + $first_topic = current($context['topics']); + echo $first_topic['is_sticky'] ? $txt['sticky_topics'] : '' ,'', $txt[70],'', $txt[109], '', $txt[110], '', $txt[301], '', $txt[111], ' + + ', $txt[151], '
    '; + + +
    + + + + '; + // Is this topic new? (assuming they are logged in!) + if ($topic['new'] && $context['user']['is_logged']) + echo ' + ', $txt[302], ''; + + echo ' + ', $topic['first_post']['link']; + + echo ' + ', $topic['pages'], ' + + ', $topic['first_post']['member']['link'], ' + + ', $topic['replies'], ' + + ', $topic['views'], ' + '; + /*if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif')) + echo ' + ';*/ + echo ' + + ', $topic['last_post']['time'], '
    + ', $txt[525], ' ', $topic['last_post']['member']['link'], ' +
    +
    '; + if ($options['display_quick_mod'] == 1 && ($topic['quick_mod']['remove'] || $topic['quick_mod']['lock'] || $topic['quick_mod']['sticky'] || $topic['quick_mod']['move'])) + echo ' + '; + else + { + // Check permissions on each and show only the ones they are allowed to use. + if ($topic['quick_mod']['remove']) + echo '', $txt[63], ''; + if ($topic['quick_mod']['lock']) + echo '', $txt['smf279'], ''; + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) + echo '
    '; + if ($topic['quick_mod']['sticky']) + echo '', $txt['smf277'], ''; + if ($topic['quick_mod']['move']) + echo '', $txt[132], ''; + } + echo '
    + '; + if ($context['can_move']) + { + echo ' + '; + } + echo ' + +
    '; + + // Finish off the form - again, if Quick Moderation is being done with checkboxes. (1) + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' + +
    '; + + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : '', '', theme_show_buttons(), '
    +
    + '; + + // Show breadcrumbs at the bottom too? + if ($settings['linktree_inline']) + echo ' + + + '; + + echo ' + + + + + +
    ', theme_linktree(), '

    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    +
    + : +   + +
    +
    '; +} + +function theme_show_buttons() +{ + global $context, $settings, $options, $txt, $scripturl; + + $buttonArray = array(); + + // If they are logged in, and the mark read buttons are enabled.. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[300] . '' : $txt[300]) . ''; + + // If the user has permission to show the notification button... ask them if they're sure, though. + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Are they allowed to post new topics? + if ($context['can_post_new']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[33] . '' : $txt[33]) . ''; + + // How about new polls, can the user post those? + if ($context['can_post_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf20'] . '' : $txt['smf20']) . ''; + + return implode($context['menu_separator'], $buttonArray); +} + +?> diff --git a/Themes/fixed/Modlog.template.php b/Themes/fixed/Modlog.template.php new file mode 100644 index 0000000..76d02ce --- /dev/null +++ b/Themes/fixed/Modlog.template.php @@ -0,0 +1,114 @@ + + + + +
    + + + + + + + '; + + // Only display page numbers if not a result of a search. + if (!empty($context['page_index'])) + echo ' + + + '; + echo ' +
    +
    ' . $txt[119] . ' ', $txt['modlog_moderation_log'], '
    +
    ', $context['entrynum'], '
    +
    ', $txt['modlog_moderation_log_desc'], '
    ', $txt[139], ': ', $context['page_index'], '
    + + + '; + + foreach ($context['columns'] as $column) + { + if (!empty($column['not_sortable'])) + echo ' + '; + else + { + echo ' + '; + } + } + + echo ' + '; + + foreach ($context['entries'] as $entry) + { + echo ' + + + + + + + + + + + '; + } + + if (empty($context['entries'])) + echo ' + + + '; + + echo ' +
    ', $column['label'], ''; + if ($column['selected']) + echo '', $column['label'], ' '; + else + echo $column['label']; + echo '
    ', $entry['action'], '', $entry['time'], '', $entry['moderator']['link'], '', $entry['position'], '', $entry['ip'], '
    '; + + foreach ($entry['extra'] as $key => $value) + echo ' + ', $key, ': ', $value; + echo ' +
    + ', $txt['modlog_no_entries_found'], ' +
    + + + + '; + + if (!empty($context['page_index'])) + echo ' + + + '; + + echo ' +
    +
    + + +
    + ', $txt['modlog_search'], ' (', $txt['modlog_by'], ': ', $context['columns'][$context['order']]['label'], ')  + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    + + '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/MoveTopic.template.php b/Themes/fixed/MoveTopic.template.php new file mode 100644 index 0000000..81c339b --- /dev/null +++ b/Themes/fixed/MoveTopic.template.php @@ -0,0 +1,55 @@ + + + + + + + +
    ', $txt[132], '
    + ', $txt[133], ':
    +
    +
    + '; + + // Disable the reason textarea when the postRedirect checkbox is unchecked... + echo ' +
    +
    + ', $txt['smf57'], '
    +
    +
    +
    + +
    '; + + if ($context['back_to_topic']) + echo ' + '; + + echo ' + + + '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Notify.template.php b/Themes/fixed/Notify.template.php new file mode 100644 index 0000000..e76809c --- /dev/null +++ b/Themes/fixed/Notify.template.php @@ -0,0 +1,42 @@ + + + ', $txt[125], ' + + + + ', $context['notification_set'] ? $txt[212] : $txt[126], '
    +
    + ', $txt[163], ' - ', $txt[164], ' + + + '; +} + +function template_notify_board() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + +
    ', $txt[125], '
    + ', $context['notification_set'] ? $txt['notifyboard_turnoff'] : $txt['notifyboard_turnon'], '
    +
    + ', $txt[163], ' - ', $txt[164], ' +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Packages.template.php b/Themes/fixed/Packages.template.php new file mode 100644 index 0000000..1dd5611 --- /dev/null +++ b/Themes/fixed/Packages.template.php @@ -0,0 +1,866 @@ + + + + + + + +
    ', $txt['package2'], '
    + [ ', $txt['package3'], ' ]
    + [ ', $txt['package5'], ' ]
    + [ ', $txt['package6'], ' ]
    + [ ', $txt['package_install_options'], ' ]
    +
    '; +} + +function template_view_package() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + +
    ', $txt['smf159b'], '
    '; + + if ($context['is_installed']) + echo ' + ', $txt['package_installed_warning1'], '
    +
    + ', $txt['package_installed_warning2'], '
    +
    '; + + echo ' + ', $txt['package_installed_warning3'], ' +
    +
    '; + + if (isset($context['package_readme'])) + echo ' + + + + + + +
    ', $txt['package_install_readme'], '
    ', $context['package_readme'], '
    +
    '; + + echo ' + + + + + + + + + '; + + // Yes, this looks strange, but it's here because of a typo near the 1.0 release. It should be necessary, but we can't break all the language files for that this late in the game. + echo ' + + + + + '; + } + + echo ' +
    ', $context['page_title'], '
    ', $context['uninstalling'] ? $txt['package_uninstall_actions'] : $txt['package42'], ' ', $txt['package43'], ' ', $context['filename'], ':
    '; + + if (empty($context['actions'])) + echo ' + ', $txt['package45'], ''; + else + { + echo ' + ', $txt['package44'], ' + + + + + + + '; + + $alternate = true; + foreach ($context['actions'] as $i => $packageaction) + { + echo ' + + + + + + '; + $alternate = !$alternate; + } + + echo ' +
    ', $txt['package_install_type'], '', $txt['package_install_action'], '', $txt['package_install_desc'], '
    ', $i + 1, '.', $packageaction['type'], '', $packageaction['action'], '', $packageaction['description'], '
    +
    '; + + if (!$context['ftp_needed']) + echo ' + [ ', $txt['smf154'], ' ]'; + else + { + echo ' +
    ', isset($txt['package_ftp_necessary']) ? $txt['package_ftp_necessary'] : $txt['package_ftp_neccessary'], '
    + ', $txt['package_ftp_why'], ' + +
    + + + + + + + + + + + + + + +
    +
    + +
    + +
    + +
    + +
    +
    +
    '; + } + + echo ' +
    '; +} + +function template_extract_package() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + + + +
    ', $context['page_title'], '
    ', $txt['package_installed_extract'], '
    '; + + if ($context['uninstalling']) + echo ' + ', $txt['package_uninstall_done']; + elseif ($context['install_finished']) + { + if ($context['extract_type'] == 'avatar') + echo ' + ', $txt['package39']; + elseif ($context['extract_type'] == 'language') + echo ' + ', $txt['package41']; + else + echo ' + ', $txt['package_installed_done']; + } + else + echo ' + ', $txt['package45']; + + echo ' +
    '; +} + +function template_list() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + + + +
    ', $context['page_title'], '
    ', $txt['smf181'], ' ', $context['filename'], ':
    +
      '; + + foreach ($context['files'] as $fileinfo) + echo ' +
    1. ', $fileinfo['filename'], ' (', $fileinfo['size'], ' ', $txt['package_bytes'], ')
    2. '; + + echo ' +
    + [ ', $txt[193], ' ] +
    '; +} + +function template_examine() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + + + +
    ', $context['page_title'], '
    ', $txt['package_file_contents'], ' ', $context['filename'], ':
    +
    ', $context['filedata'], '
    + + [ ', $txt['package14'], ' ] +
    '; +} + +function template_view_installed() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + + + +
    ' . $context['page_title'] . '
    ' . $txt['package6'] . '
    '; + + if (empty($context['installed_mods'])) + { + echo ' + + + + +
    ', $txt['smf189b'], '
    '; + } + else + { + echo ' + + + + + + '; + + foreach ($context['installed_mods'] as $i => $file) + echo ' + + + + + + '; + + echo ' +
      ', $txt['pacman2'], '', $txt['pacman3'], '
    ', ++$i, '.', $file['name'], '', $file['version'], '[ ', $txt['smf198b'], ' ]
    +
    + [ ', $txt['smf198d'], ' ]'; + } + + echo ' +
    '; +} + +function template_browse() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + +
    ', $txt[119], ' ', $txt['packages_latest'], '
    ', $txt['packages_latest_fetch'], '
    + + + '; + + // Gotta love IE4, and its hatefulness... + if ($context['browser']['is_ie4']) + echo ' + '; + else + echo ' + '; + + echo ' +
    + + + + + '; + + if (!empty($context['available_mods'])) + { + echo ' + + + + + '; + } + + if (!empty($context['available_avatars'])) + { + echo ' + + + + + '; + } + + if (!empty($context['available_languages'])) + { + echo ' + + + + + '; + } + + if (!empty($context['available_other'])) + { + echo ' + + + + + '; + } + + if (empty($context['available_mods']) && empty($context['available_avatars']) && empty($context['available_languages']) && empty($context['available_other'])) + echo ' + + + '; + + echo ' +
    ', $context['page_title'], '
    ', $txt['package7'], '
    + + + + + + + '; + + foreach ($context['available_mods'] as $i => $package) + { + echo ' + + + + + + '; + } + + echo ' +
      ', $txt['pacman2'], '', $txt['pacman3'], '  
    ', ++$i, '.', $package['name'], ' + ', $package['version']; + + if ($package['is_installed'] && !$package['is_newer']) + echo ' + '; + + echo ' + '; + + if ($package['can_uninstall']) + echo ' + [ ', $txt['smf198b'], ' ]'; + elseif ($package['can_upgrade']) + echo ' + [ ', $txt['package_upgrade'], ' ]'; + elseif ($package['can_install']) + echo ' + [ ', $txt['package11'], ' ]'; + + echo ' + [ ', $txt['package14'], ' ] + [ ', $txt['package52'], ' ] +
    +
    ', $txt['package8'], '
    + + + + + + + '; + + foreach ($context['available_avatars'] as $i => $package) + { + echo ' + + + + + + '; + } + + echo ' +
      ', $txt['pacman2'], '', $txt['pacman3'], '  
    ', ++$i, '.', $package['name'], '', $package['version']; + + if ($package['is_installed'] && !$package['is_newer']) + echo ' + '; + + echo ' + '; + + if ($package['can_uninstall']) + echo ' + [ ', $txt['smf198b'], ' ]'; + elseif ($package['can_upgrade']) + echo ' + [ ', $txt['package_upgrade'], ' ]'; + elseif ($package['can_install']) + echo ' + [ ', $txt['package11'], ' ]'; + + echo ' + [ ', $txt['package14'], ' ] + [ ', $txt['package52'], ' ] +
    +
    ' . $txt['package9'] . '
    + + + + + + + '; + + foreach ($context['available_languages'] as $i => $package) + { + echo ' + + + + + + '; + } + + echo ' +
      ' . $txt['pacman2'] . '' . $txt['pacman3'] . '  
    ' . ++$i . '.' . $package['name'] . '' . $package['version']; + + if ($package['is_installed'] && !$package['is_newer']) + echo ' + '; + + echo ' + '; + + if ($package['can_uninstall']) + echo ' + [ ', $txt['smf198b'], ' ]'; + elseif ($package['can_upgrade']) + echo ' + [ ', $txt['package_upgrade'], ' ]'; + elseif ($package['can_install']) + echo ' + [ ', $txt['package11'], ' ]'; + + echo ' + [ ', $txt['package14'], ' ] + [ ', $txt['package52'], ' ] +
    +
    ' . $txt['package10'] . '
    + + + + + + + '; + + foreach ($context['available_other'] as $i => $package) + { + echo ' + + + + + + '; + } + + echo ' +
      ' . $txt['pacman2'] . '' . $txt['pacman3'] . '  
    ' . ++$i . '.' . $package['name'] . '' . $package['version']; + + if ($package['is_installed'] && !$package['is_newer']) + echo ' + '; + + echo ' + '; + + if ($package['can_uninstall']) + echo ' + [ ', $txt['smf198b'], ' ]'; + elseif ($package['can_upgrade']) + echo ' + [ ', $txt['package_upgrade'], ' ]'; + elseif ($package['can_install']) + echo ' + [ ', $txt['package11'], ' ]'; + + echo ' + [ ', $txt['package14'], ' ] + [ ', $txt['package52'], ' ] +
    +
    ', $txt['smf189'], '
    + + + + +
    + ', $txt['package_installed_key'], ' + ', $txt['package_installed_current'], ' + ', $txt['package_installed_old'], ' +
    '; +} + +function template_servers() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + '; + + if ($context['package_download_broken']) + { + // While this may look strange, it's here because of a typo near the 1.0 release. It should be necessary, but we can't break all the language files for that this late in the game. + echo ' + + + + + '; + } + + echo ' + + + + + + + + + +
    ', $context['page_title'], '
    ', isset($txt['package_ftp_necessary']) ? $txt['package_ftp_necessary'] : $txt['package_ftp_neccessary'], '
    + ', $txt['package_ftp_why_download'], ' + +
    + + + + + + + + + + + + + + +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    ' . $txt['smf183'] . '
    + '; + foreach ($context['servers'] as $server) + echo ' + + + + + '; + echo ' +
    + ' . $server['name'] . ' + + [ ' . $txt['smf184'] . ' ] + + [ ' . $txt['smf138'] . ' ] +
    +
    +
    ' . $txt['smf185'] . '
    +
    + + + + + + + + + + +
    ' . $txt['smf186'] . ':
    ' . $txt['smf187'] . ':
    + +
    +
    +
    + + + + + + +
    ' . $txt['package_upload_title'] . '
    +
    + ' . $txt['package_upload_select'] . ': +
    + +
    +
    '; +} + +function template_package_list() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + +
    ' . $context['page_title'] . '
    '; + + // No packages, as yet. + if (empty($context['package_list'])) + echo ' +
      +
    • ', $txt['smf189'], '
    • +
    '; + // List out the packages... + else + { + foreach ($context['package_list'] as $package) + { + // A title. + if ($package['is_title']) + echo ' + ', $package['name'], '

    '; + // A heading. + elseif ($package['is_heading']) + echo ' + ', $package['name'], '

    '; + // Textual message. Could be empty just for a blank line. + elseif ($package['is_text']) + echo ' + ', $package['name'], '

    '; + // This is supposed to be a rule.. + elseif ($package['is_line']) + echo ' +
    '; + // A remote link. + elseif ($package['is_remote']) + echo ' + ', $package['link'], '

    '; + // Otherwise, it's a package. + else + { + // 1. Some mod [ Download ]. + echo ' + ', $package['count'], '. ', $package['can_install'] ? '' : '', $package['name'], $package['can_install'] ? '' : '', ' [ ', $txt['smf190'], ' ]'; + + // Mark as installed and current? + if ($package['is_installed'] && !$package['is_newer']) + echo '', $package['is_current'] ? $txt['package_installed_current'] : $txt['package_installed_old'], ''; + + // Show the mod type? + if ($package['type'] != '') + echo '
    + ', $txt['package24'], ':  ', ucwords(strtolower($package['type'])); + // Show the version number? + if ($package['version'] != '') + echo '
    + ', $txt['pacman3'], ':  ', $package['version']; + // How 'bout the author? + if ($package['author']['name'] != '') + echo '
    + ', $txt['pacman4'], ':  ', $package['author']['link']; + // The homepage.... + if ($package['author']['website']['link'] != '') + echo '
    + ', $txt['pacman6'], ':  ', $package['author']['website']['link']; + + // Desciption: bleh bleh! + // Location of file: http://someplace/. + echo '
    + ', $txt['pacman9'], ':  ', $package['description'], '
    + ', $txt['pacman10'], ':  ', $package['href'], '
    +
    '; + } + } + echo ' +
    '; + } + + echo ' +
    + + + + +
    + ', $txt['package_installed_key'], ' + ', $txt['package_installed_current'], ' + ', $txt['package_installed_old'], ' +
    '; +} + +function template_downloaded() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + +
    ' . $context['page_title'] . '
    + ' . (!isset($context['server']) ? $txt['package_uploaded_successfully'] : $txt['smf193']) . '

    + + + + + +
    ' . $context['package']['name'] . ' + ' . $context['package']['install']['link'] . ' + ' . $context['package']['list_files']['link'] . ' +
    +
    + [ ' . $txt[193] . ' ] +
    '; +} + +function template_install_options() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + + + + +
    ', $context['page_title'], '
    ', $txt['package_install_options_ftp_why'], '
    +
    +
    +
    +
    + +
    +
    + +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Poll.template.php b/Themes/fixed/Poll.template.php new file mode 100644 index 0000000..cbc8abd --- /dev/null +++ b/Themes/fixed/Poll.template.php @@ -0,0 +1,110 @@ +'; + + // Start the main poll form. + echo ' +
    + + + + +
    ', theme_linktree(), '
    + + + + + + +
    ' . $txt['smf39'] . '
    + + + + + + + + + '; + + if ($context['can_moderate_poll']) + echo ' + + + + + + + + + + '; + else + echo ' + '; + + echo ' + + + + + + + + + +
    ' . $txt['smf21'] . ':
    '; + + foreach ($context['choices'] as $choice) + { + echo ' + : '; + + // Does this option have a vote count yet, or is it new? + if ($choice['votes'] != -1) + echo ' (', $choice['votes'], ' ', $txt['smf42'], ')'; + + if (!$choice['is_last']) + echo '
    '; + } + + echo ' + (', $txt['poll_add_option'], ') +
    ', $txt['poll_options'], ': ', $txt['poll_options5'], '
    ', $txt['poll_options1a'], ' ', $txt['poll_options1b'], '
    ', $txt['poll_options'], ': + ' . $txt['poll_options2'] . '
    + ' . $txt['poll_options3'] . '
    + ' . $txt['poll_options4'] . '
    +
    +
    ' . $txt['smf40'] . ': ' . $txt['smf41'] . '
    +
    ' . $txt['smf16'] . '

    + + +
    +
    + + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Post.template.php b/Themes/fixed/Post.template.php new file mode 100755 index 0000000..0b50db9 --- /dev/null +++ b/Themes/fixed/Post.template.php @@ -0,0 +1,947 @@ +'; + + // Start the javascript... and boy is there a lot. + echo ' + + +
    + + + + +
    + ', theme_linktree(), ' +
    '; + + // If the user wants to see how their message looks - the preview table is where it's at! + if (isset($context['preview_message'])) + + { + echo ' + + + + + + + + +
    ', $context['preview_subject'], '
    +
    ', $context['preview_message']; + if($modSettings['nowplayingEnabled'] && $context['preview_nowplaying'] != '') + { + if($modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text'])) + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + + echo '

    ', $nowplayingstring, ' ', $context['preview_nowplaying'], ''; + } + echo '
    +

    '; + + } + + if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) + echo ' + '; + + // Start the main table. + echo ' + + + + + + + +
    ', $context['page_title'], '
    ', isset($context['current_topic']) ? ' + ' : '', ' + '; + + // If an error occurred, explain what happened. + if (!empty($context['post_error']['messages'])) + { + echo ' + + + + '; + } + + // If it's locked, show a message to warn the replyer. + if ($context['locked']) + echo ' + + + + '; + + // Guests have to put in their name and email... + if (isset($context['name']) && isset($context['email'])) + echo ' + + + + + + + + '; + + // Are you posting a calendar event? + if ($context['make_event']) + { + echo ' + + + + + + + '; + + // If events can span more than one day then allow the user to select how long it should last. + if ($context['event']['new'] && !empty($modSettings['cal_allowspan'])) + { + echo ' + + + + '; + } + + // If this is a new event let the user specify which board they want the linked post to be put into. + if ($context['event']['new'] && $context['is_new_topic']) + { + echo ' + + + + '; + } + } + + // Now show the subject box for this post. + echo ' + + + + + + + + '; + + // If this is a poll then display all the poll options! + if ($context['make_poll']) + { + echo ' + + + + + + + + + + + + + + + + + + + + + + + + '; + } + + // The below function prints the BBC, smileys and the message itself out. + theme_postbox($context['message']); + + if($modSettings['nowplayingEnabled']) + { + echo' + + + + '; + } + + // If this message has been edited in the past - display when it was. + if (isset($context['last_modified'])) + echo ' + + + + '; + + // If the admin has enabled the hiding of the additional options - show a link and image for it. + if (!empty($settings['additional_options_collapsable'])) + echo ' + + + '; + + // Display the check boxes for all the standard options - if they are available to the user! + echo ' + + + + '; + + // If this post already has attachments on it - give information about them. + if (!empty($context['current_attachments'])) + { + echo ' + + + + '; + } + + // Is the user allowed to post any additional ones? If so give them the boxes to do it! + if (isset($context['warning'])) + echo' + + + '; + elseif ($context['can_post_attachment']) + { + echo ' + + + + '; + } + + // Finally, the submit buttons - and some javascript to hide the additional options on load. + echo ' + + + + + + +
    + ', $context['error_type'] == 'serious' ? '' . $txt['error_while_submitting'] . '' : '', ' +
    + ', implode('
    ', $context['post_error']['messages']), ' +
    +
    + ', $txt['smf287'], ' +
    + ', $txt[68], ': + + +
    + ', $txt[69], ': + + +
    + ', $txt['calendar12'], ' + + +
    + ', $txt['calendar10'], '  +   + ', $txt['calendar9'], '  +   + ', $txt['calendar11'], '  + +
    ', $txt['calendar54'], ' + +
    ', $txt['calendar13'], ' + +
    + ', $txt[70], ': + + +
    + ', $txt[71], ': + + + +
    + ', $txt['smf21'], ': + + +
    '; + + // Loop through all the choices and print them out. + foreach ($context['choices'] as $choice) + { + echo ' + : '; + + if (!$choice['is_last']) + echo '
    '; + } + + echo ' + (', $txt['poll_add_option'], ') +
    ', $txt['poll_options'], ': ', $txt['poll_options5'], '
    ', $txt['poll_options1a'], ' ', $txt['poll_options1b'], '
    + ', $txt['poll_options2'], '
    + ', $txt['poll_options3'], '
    + ', $txt['poll_options4'], '
    +
    +
    ', $txt['nowplaying3'], ' + +
    + ', $txt[211], ': + + ', $context['last_modified'], ' +
    + + ', $txt['post_additionalopt'], ' +
    +
    + + + + + + + + + + + ', ' + + ', $context['can_announce'] && $context['is_first_post'] ? ' + + + + ' : '', ' +
    ', $context['can_notify'] ? '' : '', '', $context['can_lock'] ? '' : '', '
    ', $context['can_sticky'] ? '' : '', '
    ', $context['can_move'] ? '' : '', '
    +
    +
    + ', $txt['smf119b'], ': + + + ', $txt['smf130'], ':
    '; + foreach ($context['current_attachments'] as $attachment) + echo ' + ', $attachment['name'], '
    '; + echo ' +
    +
    + ' . $txt['visual_postmod_appear'] . ' +
    + ', $txt['smf119'], ': + + ', ($context['attached'] != '' ? $txt['attach_preview'] . ': ' . $context['attached'] . '
    ' : ''), ' + '; + + // Show more boxes only if they aren't approaching their limit. + if ($context['num_allowed_attachments'] > 1) + echo ' + + (', $txt['more_attachments'], ')
    + '; + + // Show some useful information such as allowed extensions, maximum size and amount of attachments allowed. + if (!empty($modSettings['attachmentCheckExtensions'])) + echo ' + ', $txt['smf120'], ': ', $context['allowed_extensions'], '
    '; + echo ' + ', $txt['smf121'], ': ', $modSettings['attachmentSizeLimit'], ' ' . $txt['smf211'], !empty($modSettings['attachmentNumPerPostLimit']) ? ', ' . $txt['maxAttachPerPost'] . ': ' . $modSettings['attachmentNumPerPostLimit'] : '', ' + +
    '; + if (!empty($settings['additional_options_collapsable']) && empty($context['attached'])) + echo ' + '; + echo ' +
    ', $txt['smf16'], '

    + + '; + + // Option to delete an event if user is editing one. + if ($context['make_event'] && !$context['event']['new']) + echo ' + '; + + // Spell check button if the option is enabled. + if ($context['show_spellchecking']) + echo ' + '; + + // This image is a cunning way to keep a session alive - works with some javascript above. + echo ' +
    +
    '; + + // Assuming this isn't a new topic pass across the number of replies when the topic was created. + if (isset($context['num_replies'])) + echo ' + '; + + echo ' + + +
    '; + + // A hidden form to post data to the spell checking window. + if ($context['show_spellchecking']) + echo ' +
    + + + +
    '; + + // If the user is replying to a topic show the previous posts. + if (isset($context['previous_posts']) && count($context['previous_posts']) > 0) + { + echo ' +

    + + + + +
    + + + + '; + foreach ($context['previous_posts'] as $post) + + { + echo ' + + + + + '; + } + echo ' +
    ', $txt[468], '
    +
    ', $txt[280], ': ', $post['time'], '
    + ', $txt[279], ': ', $post['poster'], ' +
    + +
    ', $post['message']; + if($modSettings['nowplayingEnabled'] && $post['nowplaying'] != '') + { + if($modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text'])) + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + + echo '

    ', $nowplayingstring, ' ', $post['nowplaying'], ''; + } + echo '
    +
    +
    '; + } +} + +// This function displays all the stuff you'd expect to see with a message box, the box, BBC buttons and of course smileys. +function template_postbox(&$message) +{ + global $context, $settings, $options, $txt, $modSettings; + + // Assuming BBC code is enabled then print the buttons and some javascript to handle it. + if ($context['show_bbc']) + { + echo ' + + + + '; + + // The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you! + $context['bbc_tags'] = array(); + $context['bbc_tags'][] = array( + 'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]), + 'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]), + 'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]), + 'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]), + array(), + 'glow' => array('code' => 'glow', 'before' => '[glow=red,2,300]', 'after' => '[/glow]', 'description' => $txt[442]), + 'shadow' => array('code' => 'shadow', 'before' => '[shadow=red,left]', 'after' => '[/shadow]', 'description' => $txt[443]), + 'move' => array('code' => 'move', 'before' => '[move]', 'after' => '[/move]', 'description' => $txt[439]), + array(), + 'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]), + 'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]), + 'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]), + 'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]), + array(), + 'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]), + array(), + 'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]), + 'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]), + ); + $context['bbc_tags'][] = array( + 'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]), + 'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]), + 'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]), + 'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]), + 'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]), + array(), + 'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]), + 'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]), + 'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]), + array(), + 'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]), + 'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]), + 'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]), + array(), + 'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $txt[259]), + 'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]), + array(), + 'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]), + ); + + // Here loop through the array, printing the images/rows/separators! + foreach ($context['bbc_tags'][0] as $image => $tag) + { + // Is there a "before" part for this bbc button? If not, it can't be a button!! + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + // Print a drop down list for all the colors we allow! + if (!isset($context['disabled_tags']['color'])) + echo ' '; + echo '
    '; + + // Print the buttom row of buttons! + foreach ($context['bbc_tags'][1] as $image => $tag) + { + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + echo ' + + '; + } + + // Now start printing all of the smileys. + if (!empty($context['smileys']['postform'])) + { + echo ' + + + '; + + // Show each row of smileys ;). + foreach ($context['smileys']['postform'] as $smiley_row) + { + foreach ($smiley_row['smileys'] as $smiley) + echo ' + ', $smiley['description'], ''; + + // If this isn't the last row, show a break. + if (empty($smiley_row['last'])) + echo '
    '; + } + + // If the smileys popup is to be shown... show it! + if (!empty($context['smileys']['popup'])) + echo ' + [', $txt['more_smileys'], ']'; + + echo ' + + '; + } + + // If there are additional smileys then ensure we provide the javascript for them. + if (!empty($context['smileys']['popup'])) + { + echo ' + '; + } + + // Finally the most important bit - the actual text box to write in! + echo ' + + + + + + '; +} + +// The template for the spellchecker. +function template_spellcheck() +{ + global $context, $settings, $options, $txt; + + // The style information that makes the spellchecker look... like the forum hopefully! + echo ' + + + ', $txt['spell_check'], ' + + + + + + + + + +
    +
     
    + + + +
    + ', $txt['spellcheck_change_to'], '
    + +
    + ', $txt['spellcheck_suggest'], '
    + +
    +
    + + + + +
    +
    + +'; +} + +?> diff --git a/Themes/fixed/Post.template.php~ b/Themes/fixed/Post.template.php~ new file mode 100644 index 0000000..1c6bee2 --- /dev/null +++ b/Themes/fixed/Post.template.php~ @@ -0,0 +1,940 @@ +'; + + // Start the javascript... and boy is there a lot. + echo ' + + +
    + + + + +
    + ', theme_linktree(), ' +
    '; + + // If the user wants to see how their message looks - the preview table is where it's at! + if (isset($context['preview_message'])) + + { + echo ' + + + + + + + + +
    ', $context['preview_subject'], '
    +
    ', $context['preview_message']; + if($modSettings['nowplayingEnabled'] && $context['preview_nowplaying'] != '') + { + if($modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text'])) + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + + echo '

    ', $nowplayingstring, ' ', $context['preview_nowplaying'], ''; + } + echo '
    +

    '; + + } + + if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) + echo ' + '; + + // Start the main table. + echo ' + + + + + + + +
    ', $context['page_title'], '
    ', isset($context['current_topic']) ? ' + ' : '', ' + '; + + // If an error occurred, explain what happened. + if (!empty($context['post_error']['messages'])) + { + echo ' + + + + '; + } + + // If it's locked, show a message to warn the replyer. + if ($context['locked']) + echo ' + + + + '; + + // Guests have to put in their name and email... + if (isset($context['name']) && isset($context['email'])) + echo ' + + + + + + + + '; + + // Are you posting a calendar event? + if ($context['make_event']) + { + echo ' + + + + + + + '; + + // If events can span more than one day then allow the user to select how long it should last. + if ($context['event']['new'] && !empty($modSettings['cal_allowspan'])) + { + echo ' + + + + '; + } + + // If this is a new event let the user specify which board they want the linked post to be put into. + if ($context['event']['new'] && $context['is_new_topic']) + { + echo ' + + + + '; + } + } + + // Now show the subject box for this post. + echo ' + + + + + + + + '; + + // If this is a poll then display all the poll options! + if ($context['make_poll']) + { + echo ' + + + + + + + + + + + + + + + + + + + + + + + + '; + } + + // The below function prints the BBC, smileys and the message itself out. + theme_postbox($context['message']); + + if($modSettings['nowplayingEnabled']) + { + echo' + + + + '; + } + + // If this message has been edited in the past - display when it was. + if (isset($context['last_modified'])) + echo ' + + + + '; + + // If the admin has enabled the hiding of the additional options - show a link and image for it. + if (!empty($settings['additional_options_collapsable'])) + echo ' + + + '; + + // Display the check boxes for all the standard options - if they are available to the user! + echo ' + + + + '; + + // If this post already has attachments on it - give information about them. + if (!empty($context['current_attachments'])) + { + echo ' + + + + '; + } + + // Is the user allowed to post any additional ones? If so give them the boxes to do it! + if ($context['can_post_attachment']) + { + echo ' + + + + '; + } + + // Finally, the submit buttons - and some javascript to hide the additional options on load. + echo ' + + + + + + +
    + ', $context['error_type'] == 'serious' ? '' . $txt['error_while_submitting'] . '' : '', ' +
    + ', implode('
    ', $context['post_error']['messages']), ' +
    +
    + ', $txt['smf287'], ' +
    + ', $txt[68], ': + + +
    + ', $txt[69], ': + + +
    + ', $txt['calendar12'], ' + + +
    + ', $txt['calendar10'], '  +   + ', $txt['calendar9'], '  +   + ', $txt['calendar11'], '  + +
    ', $txt['calendar54'], ' + +
    ', $txt['calendar13'], ' + +
    + ', $txt[70], ': + + +
    + ', $txt[71], ': + + + +
    + ', $txt['smf21'], ': + + +
    '; + + // Loop through all the choices and print them out. + foreach ($context['choices'] as $choice) + { + echo ' + : '; + + if (!$choice['is_last']) + echo '
    '; + } + + echo ' + (', $txt['poll_add_option'], ') +
    ', $txt['poll_options'], ': ', $txt['poll_options5'], '
    ', $txt['poll_options1a'], ' ', $txt['poll_options1b'], '
    + ', $txt['poll_options2'], '
    + ', $txt['poll_options3'], '
    + ', $txt['poll_options4'], '
    +
    +
    ', $txt['nowplaying3'], ' + +
    + ', $txt[211], ': + + ', $context['last_modified'], ' +
    + + ', $txt['post_additionalopt'], ' +
    +
    + + + + + + + + + + + ', ' + + ', $context['can_announce'] && $context['is_first_post'] ? ' + + + + ' : '', ' +
    ', $context['can_notify'] ? '' : '', '', $context['can_lock'] ? '' : '', '
    ', $context['can_sticky'] ? '' : '', '
    ', $context['can_move'] ? '' : '', '
    +
    +
    + ', $txt['smf119b'], ': + + + ', $txt['smf130'], ':
    '; + foreach ($context['current_attachments'] as $attachment) + echo ' + ', $attachment['name'], '
    '; + echo ' +
    +
    + ', $txt['smf119'], ': + + ', ($context['attached'] != '' ? $txt['attach_preview'] . ': ' . $context['attached'] . '
    ' : ''), ' + '; + + // Show more boxes only if they aren't approaching their limit. + if ($context['num_allowed_attachments'] > 1) + echo ' + + (', $txt['more_attachments'], ')
    + '; + + // Show some useful information such as allowed extensions, maximum size and amount of attachments allowed. + if (!empty($modSettings['attachmentCheckExtensions'])) + echo ' + ', $txt['smf120'], ': ', $context['allowed_extensions'], '
    '; + echo ' + ', $txt['smf121'], ': ', $modSettings['attachmentSizeLimit'], ' ' . $txt['smf211'], !empty($modSettings['attachmentNumPerPostLimit']) ? ', ' . $txt['maxAttachPerPost'] . ': ' . $modSettings['attachmentNumPerPostLimit'] : '', ' + +
    '; + if (!empty($settings['additional_options_collapsable']) && empty($context['attached'])) + echo ' + '; + echo ' +
    ', $txt['smf16'], '

    + + '; + + // Option to delete an event if user is editing one. + if ($context['make_event'] && !$context['event']['new']) + echo ' + '; + + // Spell check button if the option is enabled. + if ($context['show_spellchecking']) + echo ' + '; + + // This image is a cunning way to keep a session alive - works with some javascript above. + echo ' +
    +
    '; + + // Assuming this isn't a new topic pass across the number of replies when the topic was created. + if (isset($context['num_replies'])) + echo ' + '; + + echo ' + + +
    '; + + // A hidden form to post data to the spell checking window. + if ($context['show_spellchecking']) + echo ' +
    + + + +
    '; + + // If the user is replying to a topic show the previous posts. + if (isset($context['previous_posts']) && count($context['previous_posts']) > 0) + { + echo ' +

    + + + + +
    + + + + '; + foreach ($context['previous_posts'] as $post) + + { + echo ' + + + + + '; + } + echo ' +
    ', $txt[468], '
    +
    ', $txt[280], ': ', $post['time'], '
    + ', $txt[279], ': ', $post['poster'], ' +
    + +
    ', $post['message']; + if($modSettings['nowplayingEnabled'] && $post['nowplaying'] != '') + { + if($modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text'])) + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + + echo '

    ', $nowplayingstring, ' ', $post['nowplaying'], ''; + } + echo '
    +
    +
    '; + } +} + +// This function displays all the stuff you'd expect to see with a message box, the box, BBC buttons and of course smileys. +function template_postbox(&$message) +{ + global $context, $settings, $options, $txt, $modSettings; + + // Assuming BBC code is enabled then print the buttons and some javascript to handle it. + if ($context['show_bbc']) + { + echo ' + + + + '; + + // The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you! + $context['bbc_tags'] = array(); + $context['bbc_tags'][] = array( + 'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]), + 'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]), + 'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]), + 'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]), + array(), + 'glow' => array('code' => 'glow', 'before' => '[glow=red,2,300]', 'after' => '[/glow]', 'description' => $txt[442]), + 'shadow' => array('code' => 'shadow', 'before' => '[shadow=red,left]', 'after' => '[/shadow]', 'description' => $txt[443]), + 'move' => array('code' => 'move', 'before' => '[move]', 'after' => '[/move]', 'description' => $txt[439]), + array(), + 'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]), + 'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]), + 'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]), + 'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]), + array(), + 'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]), + array(), + 'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]), + 'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]), + ); + $context['bbc_tags'][] = array( + 'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]), + 'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]), + 'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]), + 'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]), + 'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]), + array(), + 'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]), + 'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]), + 'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]), + array(), + 'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]), + 'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]), + 'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]), + array(), + 'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $txt[259]), + 'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]), + array(), + 'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]), + ); + + // Here loop through the array, printing the images/rows/separators! + foreach ($context['bbc_tags'][0] as $image => $tag) + { + // Is there a "before" part for this bbc button? If not, it can't be a button!! + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + // Print a drop down list for all the colors we allow! + if (!isset($context['disabled_tags']['color'])) + echo ' '; + echo '
    '; + + // Print the buttom row of buttons! + foreach ($context['bbc_tags'][1] as $image => $tag) + { + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + echo ' + + '; + } + + // Now start printing all of the smileys. + if (!empty($context['smileys']['postform'])) + { + echo ' + + + '; + + // Show each row of smileys ;). + foreach ($context['smileys']['postform'] as $smiley_row) + { + foreach ($smiley_row['smileys'] as $smiley) + echo ' + ', $smiley['description'], ''; + + // If this isn't the last row, show a break. + if (empty($smiley_row['last'])) + echo '
    '; + } + + // If the smileys popup is to be shown... show it! + if (!empty($context['smileys']['popup'])) + echo ' + [', $txt['more_smileys'], ']'; + + echo ' + + '; + } + + // If there are additional smileys then ensure we provide the javascript for them. + if (!empty($context['smileys']['popup'])) + { + echo ' + '; + } + + // Finally the most important bit - the actual text box to write in! + echo ' + + + + + + '; +} + +// The template for the spellchecker. +function template_spellcheck() +{ + global $context, $settings, $options, $txt; + + // The style information that makes the spellchecker look... like the forum hopefully! + echo ' + + + ', $txt['spell_check'], ' + + + + + + + + + +
    +
     
    + + + +
    + ', $txt['spellcheck_change_to'], '
    + +
    + ', $txt['spellcheck_suggest'], '
    + +
    +
    + + + + +
    +
    + +'; +} + +?> diff --git a/Themes/fixed/Printpage.template.php b/Themes/fixed/Printpage.template.php new file mode 100644 index 0000000..9f9fbef --- /dev/null +++ b/Themes/fixed/Printpage.template.php @@ -0,0 +1,106 @@ + + + + + ', $txt[668], ' - ', $context['topic_subject'], ' + '; + + /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...) + Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual. + Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big. + Standards compliance mode happens when you use xhtml... */ + if ($context['browser']['needs_size_fix']) + echo ' + '; + + echo ' + + +

    ', $context['forum_name'], '

    +

    ', $context['category_name'], ' => ', $context['board_name'], ' => ', $txt[195], ': ', $context['poster_name'], ' ', $txt[176], ' ', $context['post_time'] . '

    + + + + + +
    '; +} + +function template_main() +{ + global $context, $settings, $options, $txt; + + foreach ($context['posts'] as $post) + echo ' +
    +
    + ', $txt[196], ': ', $post['subject'], '
    + ', $txt[197], ': ', $post['member'], ' ', $txt[176], ' ', $post['time'], ' +
    +
    ', $post['body'], '
    '; +} + +function template_print_below() +{ + global $context, $settings, $options; + + echo ' +

    +
    ', theme_copyright(), '
    +
    + +'; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Profile.template.php b/Themes/fixed/Profile.template.php new file mode 100755 index 0000000..0e4ad2f --- /dev/null +++ b/Themes/fixed/Profile.template.php @@ -0,0 +1,1831 @@ + + + + '; + + // Loop through every area, displaying its name as a header. + foreach ($context['profile_areas'] as $section) + { + echo ' + + + + + + '; + } + echo ' +
    ', $section['title'], '
    '; + + // For every section of the area display it, and bold it if it's the current area. + foreach ($section['areas'] as $i => $area) + if ($i == $context['menu_item_selected']) + echo ' + ', $area, '
    '; + else + echo ' + ', $area, '
    '; + echo ' +
    +
    + + '; + } + // If no areas exist just open up a containing table. + else + { + echo ' + + + + +
    '; + } +} + +// Template for closing off table started in profile_above. +function template_profile_below() +{ + global $context, $settings, $options; + + echo ' +
    '; +} + +// This template displays users details without any option to edit them. +function template_summary() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + // First do the containing table and table header. + echo ' + + + + + '; + + // Do the left hand column - where all the important user info is displayed. + echo ' + + '; + + // Now print the second column where the members avatar/text is shown. + echo ' + + '; +/* + if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view'))) { + if(isset($context['member']['googleMap']['latitude']) && isset($context['member']['googleMap']['longitude'])) { + echo ' + + + "; + } + } +*/ + // Finally, if applicable, span the bottom of the table with links to other useful member functions. + echo ' + + + + + + +
    +   + ', $txt[35], ': ', $context['member']['username'], ' + ', $txt[232], '
    + + + + + '; + if (!empty($modSettings['titlesEnable']) && $context['member']['title'] != '') + { + echo ' + + + + '; + } + echo ' + + + + + + + '; + + // If the person looking is an admin they can check the members IP address and hostname. + if ($user_info['is_admin']) + { + echo ' + + + + + '; + } + + /* +// If karma enabled show the members karma. + if ($modSettings['karmaMode'] == '1') + echo ' + + + '; + elseif ($modSettings['karmaMode'] == '2') + echo ' + + + '; + echo ' + + + + + + + '; +*/ +// If karma enabled show the members karma. + if ($modSettings['karmaMode'] == '1') + { echo ' + + + '; + if (!empty($modSettings['karmadescmod']) && !empty($modSettings['karmalinks'])) + { if ($context['show_karmastat']) + echo ' + '; + if (!empty($modSettings['karmaisowner']) && ($context['owner']==1)) echo ' + + + '; + elseif (empty($modSettings['karmaisowner'])) echo' + + + '; + elseif ($context['user']['is_admin']) echo ' + + + ' + ;} + } + + elseif ($modSettings['karmaMode'] == '2') + { echo ' + + + '; + if (!empty($modSettings['karmadescmod']) && !empty($modSettings['karmalinks'])) + { if ($context['show_karmastat']) + echo ' + '; + if (!empty($modSettings['karmaisowner']) && ($context['owner']==1)) echo ' + + + '; + elseif (empty($modSettings['karmaisowner'])) echo' + + + '; + elseif ($context['user']['is_admin']) echo ' + + + ' + ;} + } + echo ' + + + + + + + '; + + // If the person looking at the summary is an admin the the account isn't activated, give the admin the ability to do it themselves. + if ($user_info['is_admin'] && !$context['member']['is_activated']) + echo ' + + + + + '; + + // Messenger type information. + echo ' + + + + + + + + + + + + + + + + + + + + + + + + +'; +if ($context['member']['warning']['link'] != '') +echo' + + + +'; +echo' + + + + + + + + + + + + + + '; + + if (!empty($modSettings['userLanguage'])) + echo ' + + + '; + + echo ' + + '; + + // Show the users signature. + echo ' + + + +
    ', $txt[68], ': ', $context['member']['name'], '
    ', $txt['title1'], ': ', $context['member']['title'], '
    ', $txt[86], ': ', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')
    ', $txt[87], ': ', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '
    + ', $txt[512], ': + + ', $context['member']['ip'], ' +
    + ', $txt['hostname'], ': + +
    ', $context['member']['hostname'], '
    +
    + ', $modSettings['karmaLabel'], ' + + ', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), ' +
    + ', $modSettings['karmaLabel'], ' + + +', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], ' +
    ', $txt[233], ': ', $context['member']['registered'], '
    ', $txt['lastLoggedIn'], ': ', $context['member']['last_login'], '
    + ', $modSettings['karmaLabel'], ' + + ', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), ' +
    '.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].'
    + ', $modSettings['karmaLabel'], ' + + +', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], ' +
    '.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].'
    ', $txt[233], ': ', $context['member']['registered'], '
    ', $txt['lastLoggedIn'], ': ', $context['member']['last_login'], '

    + ' . $txt['account_not_activated'] . ' (' . $txt['account_activate'] . ') +

    ', $txt[513], ':', $context['member']['icq']['link_text'], '
    ', $txt[603], ': ', $context['member']['aim']['link_text'], '
    ', $txt['MSN'], ': ', $context['member']['msn']['link_text'], '
    ', $txt[604], ': ', $context['member']['yim']['link_text'], '
    ', $txt[69], ': '; + + // Only show the email address if it's not hidden. + if ($context['member']['email_public']) + echo ' + ', $context['member']['email'], ''; + // ... Or if the one looking at the profile is an admin they can see it anyway. + elseif (!$context['member']['hide_email']) + echo ' + ', $context['member']['email'], ''; + else + echo ' + ', $txt[722], ''; + + // Some more information. + echo ' +
    ', $txt[96], ': ', $context['member']['website']['title'], '
    ', $txt[113], ' + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $context['member']['online']['text'] . '' : $context['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $context['member']['online']['text'] . '' : '', ' +
    ' . $txt['visual_current_level'] . ' ' . $context['member']['warning']['link'] . '

    ', $txt[231], ': ', $context['member']['gender']['name'], '
    ', $txt[420], ':', $context['member']['age'] . ($context['member']['today_is_birthday'] ? '   ' : ''), '
    ', $txt[227], ':', $context['member']['location'], '
    ', $txt['local_time'], ':', $context['member']['local_time'], '
    ', $txt['smf225'], ':', $context['member']['language'], '

    + + + + + + +
    ', $txt[85], ':
    ', $context['member']['signature'], '
    +
    +
    + ', $context['member']['avatar']['image'], '

    + ', $context['member']['blurb'], ' +
    + +
    + + + +
    ', $txt[597], ':
    '; + if (!$context['user']['is_owner'] && $context['can_send_pm']) + echo ' + ', $txt[688], '.
    +
    '; + echo ' + ', $txt[460], ' ', $txt[461], '.
    + ', $txt['statPanel_show'], '.
    +
    +
    '; +} + +// Template for showing all the posts of the user, in chronological order. +function template_showPosts() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + + '; + + // Only show posts if they have made some! + if (!empty($context['posts'])) + { + // Page numbers. + echo ' + + + +
    +   ', $txt['showPosts'], ' +
    + ', $txt[139], ': ', $context['page_index'], ' +
    '; + + // For every post to be displayed, give it its own subtable, and show the important details of the post. + foreach ($context['posts'] as $post) + { + echo ' + + + + +
    + + + + + + + + + + + + +
    + ', $post['counter'], ' + +  ', $post['category']['name'], ' / ', $post['board']['name'], ' / ', $post['subject'], ' + + ', $txt[30], ': ', $post['time'], ' +
    ', $post['body']; + if($modSettings['nowplayingEnabled'] && $post['nowplaying'] != '') + { + if($modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + + if(isset($modSettings['nowplaying_text'])) + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + + echo '

    ', $nowplayingstring, ' ', $post['nowplaying'], ''; + } + echo '
    '; + + if ($post['can_delete']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + if ($post['can_delete'] && ($post['can_mark_notify'] || $post['can_reply'])) + echo ' + ', $context['menu_separator']; + if ($post['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + if ($post['can_reply'] && $post['can_mark_notify']) + echo ' + ', $context['menu_separator']; + if ($post['can_mark_notify']) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + echo ' +
    +
    '; + } + + // Show more page numbers. + echo ' + + + + +
    + ', $txt[139], ': ', $context['page_index'], ' +
    '; + } + // No posts? Just end the table with a informative message. + else + echo ' + + + ', $txt[170], ' + + + '; +} + +// Template for user statistics, showing graphs and the like. +function template_statPanel() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + + '; + + // First, show a few text statistics such as post/topic count. + echo ' + + + + '; + + // This next section draws a graph showing what times of day they post the most. + echo ' + + + + + + '; + + // The final section is two columns with the most popular boards by posts and activity (activity = users posts / total posts). + echo ' + + + + + + + + + +
      ', $txt['statPanel_generalStats'], '
    + + + + + + + + + + + + + + + + + +
    ', $txt['statPanel_total_time_online'], ':', $context['time_logged_in'], '
    ', $txt[489], ':', $context['num_posts'], ' ', $txt['statPanel_posts'], '
    ', $txt[490], ':', $context['num_topics'], ' ', $txt['statPanel_topics'], '
    ', $txt['statPanel_users_polls'], ':', $context['num_polls'], ' ', $txt['statPanel_polls'], '
    ', $txt['statPanel_users_votes'], ':', $context['num_votes'], ' ', $txt['statPanel_votes'], '
    +
    ', $txt['statPanel_activityTime'], '
    + '; + + // If they haven't post at all, don't draw the graph. + if (empty($context['posts_by_time'])) + echo ' + + + '; + // Otherwise do! + else + { + echo ' + + '; + + // Loops through each hour drawing the bar to the correct height. + foreach ($context['posts_by_time'] as $time_of_day) + echo ' + '; + echo ' + + + '; + // The labels. + foreach ($context['posts_by_time'] as $time_of_day) + echo ' + '; + echo ' + + + + '; + } + echo ' +
    ', $txt['statPanel_noPosts'], '
    ', $time_of_day['hour'], '
    ', $txt['statPanel_timeOfDay'], '
    +
    ', $txt['statPanel_topBoards'], '', $txt['statPanel_topBoardsActivity'], '
    + '; + if (empty($context['popular_boards'])) + echo ' + + + '; + else + { + // Draw a bar for every board. + foreach ($context['popular_boards'] as $board) + { + echo ' + + + + + '; + } + } + echo ' +
    ', $txt['statPanel_noPosts'], '
    ', $board['link'], '', $board['posts'] > 0 ? '' : ' ', '', $board['posts'], '
    +
    + '; + if (empty($context['board_activity'])) + echo ' + + + '; + else + { + // Draw a bar for every board. + foreach ($context['board_activity'] as $activity) + { + echo ' + + + + + '; + } + } + echo ' +
    ', $txt['statPanel_noPosts'], '
    ', $activity['link'], '', $activity['percent'] > 0 ? '' : ' ', '', $activity['percent'], '%
    +
    '; +} + +// Template for changing user account information. +function template_account() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + // Javascript for checking if password has been entered / taking admin powers away from themselves. + echo ' + '; + + // The main containing header. + echo ' +
    + + + + '; + + // Display Name, language and date user registered. + echo ' + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['account_info'], ' +
    + '; + + // Only show these settings if you're allowed to edit the account itself (not just the membergroups). + if ($context['allow_edit_account']) + { + if ($context['user']['is_admin'] && !empty($context['allow_edit_username'])) + echo ' + + + + + + + '; + else + echo ' + + + + '; + + echo ' + + + + '; + + // Allow the administrator to change the date they registered on and their post count. + if ($context['user']['is_admin']) + echo ' + + + + + + + + '; + + // Only display if admin has enabled "user selectable language". + if (!empty($modSettings['userLanguage']) && count($context['languages']) > 1) + { + echo ' + + + + '; + } + } + // Only display member group information/editing with the proper permissions. + if ($context['allow_edit_membergroups']) + { + echo ' + + + + + + + + + '; + } + + // Show this part if you're not only here for assigning membergroups. + if ($context['allow_edit_account']) + { + // Show email address box. + echo ' + + + + + + '; + + // If the user is allowed to hide their email address from the public give them the option to here. + if ($context['allow_hide_email']) + { + echo ' + + + + '; + } + + // Option to show online status - if they are allowed to. + if ($context['allow_hide_online']) + { + echo ' + + + + '; + } + + // Show boxes so that the user may change his or her password. + echo ' + + + + + + + + + '; + + // This section allows the user to enter secret question/answer so they can reset a forgotten password. + echo ' + + + + + + + + + '; + } + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    ', $txt['username_warning'], '
    + ', $txt[35], ': + + +
    + ', $txt[35], ': ', $context['user']['is_admin'] ? ' + ' : '', ' + + ', $context['member']['username'], ' +
    + ', $txt[68], ': +
    ', $txt[518], '
    +
    ', ($context['allow_edit_name'] ? '' : $context['member']['name']), '
    ', $txt[233], ':
    ', $txt[86], ':
    ', $txt[349], ': + +

    ', $txt['primary_membergroup'], ': + + +
    ', $txt['additional_membergroups'], ': +
    + '; + // For each membergroup show a checkbox so members can be assigned to more than one group. + foreach ($context['member_groups'] as $member_group) + if ($member_group['can_be_additional']) + echo ' + ', $member_group['name'], '
    '; + echo ' +
    + +

    ', $txt[69], ':
    ', $txt[679], '
    ', $txt[721], '
    ', $txt['show_online'], '

    ', $txt[81], ':
    ', $txt[596], '
    ', $txt[82], ':

    ', $txt['pswd1'], ':
    ', $txt['secret_desc'], '
    ', $txt['pswd2'], ':
    ', $txt['secret_desc2'], '
    ', $txt['secret_why_blank'], '
    +
    +
    '; +} + +// Template for forum specific options - avatar, signature etc. +function template_forumProfile() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + if (!empty($modSettings['avatar_allow_server_stored'])) + echo ' + '; + + // The main containing header. + echo ' +
    + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['forumProfile_info'], ' +
    + '; + + // This is the avatar selection table that is only displayed if avatars are enabled! + if (!empty($modSettings['avatar_allow_server_stored']) || !empty($modSettings['avatar_allow_external_url']) || !empty($modSettings['avatar_allow_upload'])) + { + // If users are allowed to choose avatars stored on the server show selection boxes to choice them from. + if (!empty($modSettings['avatar_allow_server_stored'])) + { + echo ' + + + + '; + } + + // If the user can link to an off server avatar, show them a box to input the address. + if (!empty($context['member']['avatar']['allow_external'])) + { + echo ' + + + + '; + } + + // If the user is able to upload avatars to the server show them an upload box. + if (!empty($modSettings['avatar_allow_upload'])) + echo ' + + + + '; + } + + // Personal text... + echo ' + + + + + + + '; + + // Gender, birthdate and location. + echo ' + + + + + + + + + + + + + '; + + // All the messenger type contact info. + echo ' + + + + + + + + + + + + + + + '; + + // Input box for custom titles, if they can edit it... + if (!empty($modSettings['titlesEnable']) && $context['allow_edit_title']) + echo ' + + + + '; + + // Show the signature box. + echo ' + + + + '; + + // Website details. + echo ' + + + + + + + + + + '; + + // If karma is enabled let the admin edit it... + if ($user_info['is_admin'] && !empty($modSettings['karmaMode'])) + { + echo ' + + + + + + '; + } + + + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    + + + +
    + ', $txt[229], ': +
    Do Nothing
    +
    +
    + + + +
    + + + +
    +
    + + + +
    ', $txt[475], ':
    ', $txt[474], '
    +
    + +
    + + + +
    ', $txt['avatar_will_upload'], ':
    +
    + ', ($context['member']['avatar']['ID_ATTACH'] > 0 ? '

    ' : ''), ' + +
    ', $txt[228], ':

    + ', $txt[563], ': +
    ', $txt[566], ' - ', $txt[564], ' - ', $txt[565], '
    +
    + - + - + +
    ', $txt[227], ':
    ', $txt[231], ': + +

    ', $txt[513], ':
    ', $txt[600], '
    ', $txt[603], ':
    ', $txt[601], '
    ', $txt['MSN'], ':
    ', $txt['smf237'], '.
    ', $txt[604], ':
    ', $txt[602], '

    ' . $txt['title1'] . ':
    + ', $txt[85], ': +
    ', $txt[606], '

    +
    '; + + if ($context['show_spellchecking']) + echo ' + '; + + echo ' +
    +
    '; + + // If there is a limit at all! + if (!empty($context['max_signature_length'])) + echo ' + ', $txt[664], ' ', $context['max_signature_length'], ''; + + // Load the spell checker? + if ($context['show_spellchecking']) + echo ' + '; + + // Some javascript used to count how many characters have been used so far in the signature. + echo ' + +

    ', $txt[83], ':
    ', $txt[598], '
    ', $txt[84], ':
    ', $txt[599], '

    ', $modSettings['karmaLabel'], ' + ', $modSettings['karmaApplaudLabel'], ' ', $modSettings['karmaSmiteLabel'], '
    + (', $txt[94], ': ', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), ') +
    +
    '; + + /* If the admin has enabled choosing avatars stored on the server, the below javascript is used to update the + file listing of avatars as the user changes catergory. It also updates the preview image as they choose + different files on the select box. */ + if (!empty($modSettings['avatar_allow_server_stored'])) + echo ' + '; + echo ' +
    '; + + if ($context['show_spellchecking']) + echo ' +
    '; +} + +// goooooooooooooogle map +function template_map() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + // The main containing header. + echo ' +
    + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['forumProfile_info'], ' +
    + '; + //Google Map Member Map + if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_place'))) { + echo ' + + + + + "; + } + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +

    + +
    +
    ', $txt['googleMapDisclaimer'] ,'
    + + + +
    +
    '; +} + + + +// Template for showing theme settings. Note: template_options() actually adds the theme specific options. +function template_theme() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $days; + + // The main containing header. + echo ' + + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['theme_info'], ' +
    + '; + + // Are they allowed to change their theme? + if ($modSettings['theme_allow'] || $context['user']['is_admin']) + { + echo ' + + + '; + } + + // Are multiple smiley sets enabled? + if (!empty($modSettings['smiley_sets_enable'])) + { + echo ' + + + '; + } + + if ($modSettings['theme_allow'] || $context['user']['is_admin'] || !empty($modSettings['smiley_sets_enable'])) + echo ' + + + '; + + // Allow the user to change the way the time is displayed. + echo ' + + + + + + + + + '; + + echo ' + + + '; + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    ', $txt['theme1a'], ': ', $context['member']['theme']['name'], ' ', $txt['theme1b'], '
    + ', $txt['smileys_current'], ': + :) +

    + ', $txt[486], ':
    + ', $txt[119], ' + ', $txt[479], ' +
    +
    + +
    ', $txt[371], ':
    ', $txt[519], '

    ', $txt[741], ': ', $context['current_forum_time'], '

    + + + + + + + + + + '; + + if ($settings['allow_no_censored']) + echo ' + + + '; + + echo ' + + + + + + + + + + + + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + +
    + +
    + +
    +
    +
    +
    '; +} + +function template_notification() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + // The main containing header. + echo ' + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['notification_info'], ' +
    +
    '; + + // Allow notification on announcements to be disabled? + if (!empty($modSettings['notifyAnncmnts_UserDisable'])) + echo ' +   +
    '; + + // More notification options. + echo ' +   +
    + +   +
    + +
    + + + + +
    +
    +
    +
    +
    +
    + + +
    ', $txt['notifications_topics'], '
    + + + '; + if (!empty($context['topic_notifications'])) + { + echo ' + + + + '; + foreach ($context['topic_notifications'] as $topic) + { + echo ' + + + + + '; + } + + echo ' + + + + + + '; + } + else + echo ' + + '; + echo ' +
    + + ' . $txt[70] . '' . $txt[109] . '
    + ', $topic['link']; + + if ($topic['new']) + echo ' ', $txt[302], ''; + + echo '
    + ' . $txt['smf88'] . ' ' . $topic['board']['link'] . ' +
    ' . $topic['poster']['link'] . ' + +
    + ', $txt[139], ': ', $context['page_index'], ' +
    + +
    + ', $txt['notifications_topics_none'], '
    +
    ', $txt['notifications_topics_howto'], '
    +
    +
    + + + +
    +

    +
    +
    + + +
    ', $txt['notifications_boards'], '
    + + + '; + if (!empty($context['board_notifications'])) + { + echo ' + + '; + foreach ($context['board_notifications'] as $board) + { + echo ' + + + + '; + } + + echo ' + + + '; + } + else + echo ' + '; + echo ' + +
    + + ' . $txt['smf82'] . '
    ', $board['link']; + + if ($board['new']) + echo ' ', $txt[302], ''; + + echo ' + +
    + +
    + ', $txt['notifications_boards_none'], '
    +
    ', $txt['notifications_boards_howto'], '
    +
    +
    + + + +
    +

    '; +} + +// Template for options related to personal messages. +function template_pmprefs() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + // The main containing header. + echo ' +
    + + + + + + '; + + // A text box for the user to input usernames of everyone they want to ignore personal messages from. + echo ' + + + +
    +    + ', $txt[79], ' +
    + ', $txt['pmprefs_info'], ' +
    + + + + + '; + + // Extra options available to the user for personal messages. + echo ' + + + '; + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    + ', $txt[325], ': +
    + ', $txt[326], '
    +
    + ', $txt['find_members'], ' ', $txt['find_members'], ' +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    '; +} + +// Template to show for deleting a users account - now with added delete post capability! +function template_deleteAccount() +{ + global $context, $settings, $options, $scripturl, $txt, $scripturl; + + // The main containing header. + echo ' +
    + + + + '; + // If deleting another account give them a lovely info box. + if (!$context['member']['is_owner']) + echo ' + + + '; + echo ' + + + +
    +    + ', $txt['deleteAccount'], ' +
    + ', $txt['deleteAccount_desc'], ' +
    + + + + + '; + } + // Otherwise an admin doesn't need to enter a password - but they still get a warning - plus the option to delete lovely posts! + else + { + echo '
    ', $txt['deleteAccount_warning'], ' + +
    + + + + + + + + '; + } + echo ' +
    '; + + // If the user is deleting their own account warn them first - and require a password! + if ($context['member']['is_owner']) + { + echo ' + ', $txt['own_profile_confirm'], '

    +
    + ', $txt['smf241'], ': + +      + + + + +
    + ', $txt['deleteAccount_posts'], ': +
    + +
    + + + + +
    +
    +
    '; +} + +// Template for the password box/save button stuck at the bottom of every profile page. +function template_profile_save() +{ + global $context, $settings, $options, $txt; + + echo ' + +
    + '; + + // Only show the password box if it's actually needed. + if ($context['user']['is_owner'] && $context['require_password']) + echo ' + + ', $txt['smf241'], ': +
    ', $txt['smf244'], '
    + + + '; + else + echo ' + '; + + echo ' + + + + + + '; +} + +?> diff --git a/Themes/fixed/Profile.template.php~ b/Themes/fixed/Profile.template.php~ new file mode 100644 index 0000000..d568da8 --- /dev/null +++ b/Themes/fixed/Profile.template.php~ @@ -0,0 +1,1791 @@ + + + + '; + + // Loop through every area, displaying its name as a header. + foreach ($context['profile_areas'] as $section) + { + echo ' + + + + + + '; + } + echo ' +
    ', $section['title'], '
    '; + + // For every section of the area display it, and bold it if it's the current area. + foreach ($section['areas'] as $i => $area) + if ($i == $context['menu_item_selected']) + echo ' + ', $area, '
    '; + else + echo ' + ', $area, '
    '; + echo ' +
    +
    + + '; + } + // If no areas exist just open up a containing table. + else + { + echo ' + + + + +
    '; + } +} + +// Template for closing off table started in profile_above. +function template_profile_below() +{ + global $context, $settings, $options; + + echo ' +
    '; +} + +// This template displays users details without any option to edit them. +function template_summary() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + // First do the containing table and table header. + echo ' + + + + + '; + + // Do the left hand column - where all the important user info is displayed. + echo ' + + '; + + // Now print the second column where the members avatar/text is shown. + echo ' + + '; +/* + if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view'))) { + if(isset($context['member']['googleMap']['latitude']) && isset($context['member']['googleMap']['longitude'])) { + echo ' + + + "; + } + } +*/ + // Finally, if applicable, span the bottom of the table with links to other useful member functions. + echo ' + + + + + + +
    +   + ', $txt[35], ': ', $context['member']['username'], ' + ', $txt[232], '
    + + + + + '; + if (!empty($modSettings['titlesEnable']) && $context['member']['title'] != '') + { + echo ' + + + + '; + } + echo ' + + + + + + + '; + + // If the person looking is an admin they can check the members IP address and hostname. + if ($user_info['is_admin']) + { + echo ' + + + + + '; + } + + /* +// If karma enabled show the members karma. + if ($modSettings['karmaMode'] == '1') + echo ' + + + '; + elseif ($modSettings['karmaMode'] == '2') + echo ' + + + '; + echo ' + + + + + + + '; +*/ +// If karma enabled show the members karma. + if ($modSettings['karmaMode'] == '1') + { echo ' + + + '; + if (!empty($modSettings['karmadescmod']) && !empty($modSettings['karmalinks'])) + { if ($context['show_karmastat']) + echo ' + '; + if (!empty($modSettings['karmaisowner']) && ($context['owner']==1)) echo ' + + + '; + elseif (empty($modSettings['karmaisowner'])) echo' + + + '; + elseif ($context['user']['is_admin']) echo ' + + + ' + ;} + } + + elseif ($modSettings['karmaMode'] == '2') + { echo ' + + + '; + if (!empty($modSettings['karmadescmod']) && !empty($modSettings['karmalinks'])) + { if ($context['show_karmastat']) + echo ' + '; + if (!empty($modSettings['karmaisowner']) && ($context['owner']==1)) echo ' + + + '; + elseif (empty($modSettings['karmaisowner'])) echo' + + + '; + elseif ($context['user']['is_admin']) echo ' + + + ' + ;} + } + echo ' + + + + + + + '; + + // If the person looking at the summary is an admin the the account isn't activated, give the admin the ability to do it themselves. + if ($user_info['is_admin'] && !$context['member']['is_activated']) + echo ' + + + + + '; + + // Messenger type information. + echo ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + + if (!empty($modSettings['userLanguage'])) + echo ' + + + '; + + echo ' + + '; + + // Show the users signature. + echo ' + + + +
    ', $txt[68], ': ', $context['member']['name'], '
    ', $txt['title1'], ': ', $context['member']['title'], '
    ', $txt[86], ': ', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')
    ', $txt[87], ': ', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '
    + ', $txt[512], ': + + ', $context['member']['ip'], ' +
    + ', $txt['hostname'], ': + +
    ', $context['member']['hostname'], '
    +
    + ', $modSettings['karmaLabel'], ' + + ', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), ' +
    + ', $modSettings['karmaLabel'], ' + + +', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], ' +
    ', $txt[233], ': ', $context['member']['registered'], '
    ', $txt['lastLoggedIn'], ': ', $context['member']['last_login'], '
    + ', $modSettings['karmaLabel'], ' + + ', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), ' +
    '.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].'
    + ', $modSettings['karmaLabel'], ' + + +', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], ' +
    '.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].'
    ', $txt[233], ': ', $context['member']['registered'], '
    ', $txt['lastLoggedIn'], ': ', $context['member']['last_login'], '

    + ' . $txt['account_not_activated'] . ' (' . $txt['account_activate'] . ') +

    ', $txt[513], ':', $context['member']['icq']['link_text'], '
    ', $txt[603], ': ', $context['member']['aim']['link_text'], '
    ', $txt['MSN'], ': ', $context['member']['msn']['link_text'], '
    ', $txt[604], ': ', $context['member']['yim']['link_text'], '
    ', $txt[69], ': '; + + // Only show the email address if it's not hidden. + if ($context['member']['email_public']) + echo ' + ', $context['member']['email'], ''; + // ... Or if the one looking at the profile is an admin they can see it anyway. + elseif (!$context['member']['hide_email']) + echo ' + ', $context['member']['email'], ''; + else + echo ' + ', $txt[722], ''; + + // Some more information. + echo ' +
    ', $txt[96], ': ', $context['member']['website']['title'], '
    ', $txt[113], ' + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $context['member']['online']['text'] . '' : $context['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $context['member']['online']['text'] . '' : '', ' +

    ', $txt[231], ': ', $context['member']['gender']['name'], '
    ', $txt[420], ':', $context['member']['age'] . ($context['member']['today_is_birthday'] ? '   ' : ''), '
    ', $txt[227], ':', $context['member']['location'], '
    ', $txt['local_time'], ':', $context['member']['local_time'], '
    ', $txt['smf225'], ':', $context['member']['language'], '

    + + + + + + +
    ', $txt[85], ':
    ', $context['member']['signature'], '
    +
    +
    + ', $context['member']['avatar']['image'], '

    + ', $context['member']['blurb'], ' +
    + +
    + + + +
    ', $txt[597], ':
    '; + if (!$context['user']['is_owner'] && $context['can_send_pm']) + echo ' + ', $txt[688], '.
    +
    '; + echo ' + ', $txt[460], ' ', $txt[461], '.
    + ', $txt['statPanel_show'], '.
    +
    +
    '; +} + +// Template for showing all the posts of the user, in chronological order. +function template_showPosts() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + + '; + + // Only show posts if they have made some! + if (!empty($context['posts'])) + { + // Page numbers. + echo ' + + + +
    +   ', $txt['showPosts'], ' +
    + ', $txt[139], ': ', $context['page_index'], ' +
    '; + + // For every post to be displayed, give it its own subtable, and show the important details of the post. + foreach ($context['posts'] as $post) + { + echo ' + + + + +
    + + + + + + + + + + + + +
    + ', $post['counter'], ' + +  ', $post['category']['name'], ' / ', $post['board']['name'], ' / ', $post['subject'], ' + + ', $txt[30], ': ', $post['time'], ' +
    ', $post['body']; + if($modSettings['nowplayingEnabled'] && $post['nowplaying'] != '') + { + if($modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + + if(isset($modSettings['nowplaying_text'])) + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + + echo '

    ', $nowplayingstring, ' ', $post['nowplaying'], ''; + } + echo '
    '; + + if ($post['can_delete']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + if ($post['can_delete'] && ($post['can_mark_notify'] || $post['can_reply'])) + echo ' + ', $context['menu_separator']; + if ($post['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + if ($post['can_reply'] && $post['can_mark_notify']) + echo ' + ', $context['menu_separator']; + if ($post['can_mark_notify']) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + echo ' +
    +
    '; + } + + // Show more page numbers. + echo ' + + + + +
    + ', $txt[139], ': ', $context['page_index'], ' +
    '; + } + // No posts? Just end the table with a informative message. + else + echo ' + + + ', $txt[170], ' + + + '; +} + +// Template for user statistics, showing graphs and the like. +function template_statPanel() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + + '; + + // First, show a few text statistics such as post/topic count. + echo ' + + + + '; + + // This next section draws a graph showing what times of day they post the most. + echo ' + + + + + + '; + + // The final section is two columns with the most popular boards by posts and activity (activity = users posts / total posts). + echo ' + + + + + + + + + +
      ', $txt['statPanel_generalStats'], '
    + + + + + + + + + + + + + + + + + +
    ', $txt['statPanel_total_time_online'], ':', $context['time_logged_in'], '
    ', $txt[489], ':', $context['num_posts'], ' ', $txt['statPanel_posts'], '
    ', $txt[490], ':', $context['num_topics'], ' ', $txt['statPanel_topics'], '
    ', $txt['statPanel_users_polls'], ':', $context['num_polls'], ' ', $txt['statPanel_polls'], '
    ', $txt['statPanel_users_votes'], ':', $context['num_votes'], ' ', $txt['statPanel_votes'], '
    +
    ', $txt['statPanel_activityTime'], '
    + '; + + // If they haven't post at all, don't draw the graph. + if (empty($context['posts_by_time'])) + echo ' + + + '; + // Otherwise do! + else + { + echo ' + + '; + + // Loops through each hour drawing the bar to the correct height. + foreach ($context['posts_by_time'] as $time_of_day) + echo ' + '; + echo ' + + + '; + // The labels. + foreach ($context['posts_by_time'] as $time_of_day) + echo ' + '; + echo ' + + + + '; + } + echo ' +
    ', $txt['statPanel_noPosts'], '
    ', $time_of_day['hour'], '
    ', $txt['statPanel_timeOfDay'], '
    +
    ', $txt['statPanel_topBoards'], '', $txt['statPanel_topBoardsActivity'], '
    + '; + if (empty($context['popular_boards'])) + echo ' + + + '; + else + { + // Draw a bar for every board. + foreach ($context['popular_boards'] as $board) + { + echo ' + + + + + '; + } + } + echo ' +
    ', $txt['statPanel_noPosts'], '
    ', $board['link'], '', $board['posts'] > 0 ? '' : ' ', '', $board['posts'], '
    +
    + '; + if (empty($context['board_activity'])) + echo ' + + + '; + else + { + // Draw a bar for every board. + foreach ($context['board_activity'] as $activity) + { + echo ' + + + + + '; + } + } + echo ' +
    ', $txt['statPanel_noPosts'], '
    ', $activity['link'], '', $activity['percent'] > 0 ? '' : ' ', '', $activity['percent'], '%
    +
    '; +} + +// Template for changing user account information. +function template_account() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + // Javascript for checking if password has been entered / taking admin powers away from themselves. + echo ' + '; + + // The main containing header. + echo ' +
    + + + + '; + + // Display Name, language and date user registered. + echo ' + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['account_info'], ' +
    + '; + + // Only show these settings if you're allowed to edit the account itself (not just the membergroups). + if ($context['allow_edit_account']) + { + if ($context['user']['is_admin'] && !empty($context['allow_edit_username'])) + echo ' + + + + + + + '; + else + echo ' + + + + '; + + echo ' + + + + '; + + // Allow the administrator to change the date they registered on and their post count. + if ($context['user']['is_admin']) + echo ' + + + + + + + + '; + + // Only display if admin has enabled "user selectable language". + if (!empty($modSettings['userLanguage']) && count($context['languages']) > 1) + { + echo ' + + + + '; + } + } + // Only display member group information/editing with the proper permissions. + if ($context['allow_edit_membergroups']) + { + echo ' + + + + + + + + + '; + } + + // Show this part if you're not only here for assigning membergroups. + if ($context['allow_edit_account']) + { + // Show email address box. + echo ' + + + + + + '; + + // If the user is allowed to hide their email address from the public give them the option to here. + if ($context['allow_hide_email']) + { + echo ' + + + + '; + } + + // Option to show online status - if they are allowed to. + if ($context['allow_hide_online']) + { + echo ' + + + + '; + } + + // Show boxes so that the user may change his or her password. + echo ' + + + + + + + + + '; + + // This section allows the user to enter secret question/answer so they can reset a forgotten password. + echo ' + + + + + + + + + '; + } + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    ', $txt['username_warning'], '
    + ', $txt[35], ': + + +
    + ', $txt[35], ': ', $context['user']['is_admin'] ? ' + ' : '', ' + + ', $context['member']['username'], ' +
    + ', $txt[68], ': +
    ', $txt[518], '
    +
    ', ($context['allow_edit_name'] ? '' : $context['member']['name']), '
    ', $txt[233], ':
    ', $txt[86], ':
    ', $txt[349], ': + +

    ', $txt['primary_membergroup'], ': + + +
    ', $txt['additional_membergroups'], ': +
    + '; + // For each membergroup show a checkbox so members can be assigned to more than one group. + foreach ($context['member_groups'] as $member_group) + if ($member_group['can_be_additional']) + echo ' + ', $member_group['name'], '
    '; + echo ' +
    + +

    ', $txt[69], ':
    ', $txt[679], '
    ', $txt[721], '
    ', $txt['show_online'], '

    ', $txt[81], ':
    ', $txt[596], '
    ', $txt[82], ':

    ', $txt['pswd1'], ':
    ', $txt['secret_desc'], '
    ', $txt['pswd2'], ':
    ', $txt['secret_desc2'], '
    ', $txt['secret_why_blank'], '
    +
    +
    '; +} + +// Template for forum specific options - avatar, signature etc. +function template_forumProfile() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + if (!empty($modSettings['avatar_allow_server_stored'])) + echo ' + '; + + // The main containing header. + echo ' +
    + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['forumProfile_info'], ' +
    + '; + + // This is the avatar selection table that is only displayed if avatars are enabled! + if (!empty($modSettings['avatar_allow_server_stored']) || !empty($modSettings['avatar_allow_external_url']) || !empty($modSettings['avatar_allow_upload'])) + { + // If users are allowed to choose avatars stored on the server show selection boxes to choice them from. + if (!empty($modSettings['avatar_allow_server_stored'])) + { + echo ' + + + + '; + } + + // If the user can link to an off server avatar, show them a box to input the address. + if (!empty($context['member']['avatar']['allow_external'])) + { + echo ' + + + + '; + } + + // If the user is able to upload avatars to the server show them an upload box. + if (!empty($modSettings['avatar_allow_upload'])) + echo ' + + + + '; + } + + // Personal text... + echo ' + + + + + + + '; + + // Gender, birthdate and location. + echo ' + + + + + + + + + + + + + '; + + // All the messenger type contact info. + echo ' + + + + + + + + + + + + + + + '; + + // Input box for custom titles, if they can edit it... + if (!empty($modSettings['titlesEnable']) && $context['allow_edit_title']) + echo ' + + + + '; + + // Show the signature box. + echo ' + + + + '; + + // Website details. + echo ' + + + + + + + + + + '; + + // If karma is enabled let the admin edit it... + if ($user_info['is_admin'] && !empty($modSettings['karmaMode'])) + { + echo ' + + + + + + '; + } + + + //Google Map Member Map +/* if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_place'))) { + echo ' + + + + + "; + } +*/ + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    + + + +
    + ', $txt[229], ': +
    Do Nothing
    +
    +
    + + + +
    + + + +
    +
    + + + +
    ', $txt[475], ':
    ', $txt[474], '
    +
    + +
    + + + +
    ', $txt['avatar_will_upload'], ':
    +
    + ', ($context['member']['avatar']['ID_ATTACH'] > 0 ? '

    ' : ''), ' + +
    ', $txt[228], ':

    + ', $txt[563], ': +
    ', $txt[566], ' - ', $txt[564], ' - ', $txt[565], '
    +
    + - + - + +
    ', $txt[227], ':
    ', $txt[231], ': + +

    ', $txt[513], ':
    ', $txt[600], '
    ', $txt[603], ':
    ', $txt[601], '
    ', $txt['MSN'], ':
    ', $txt['smf237'], '.
    ', $txt[604], ':
    ', $txt[602], '

    ' . $txt['title1'] . ':
    + ', $txt[85], ': +
    ', $txt[606], '

    +
    '; + + if ($context['show_spellchecking']) + echo ' + '; + + echo ' +
    +
    '; + + // If there is a limit at all! + if (!empty($context['max_signature_length'])) + echo ' + ', $txt[664], ' ', $context['max_signature_length'], ''; + + // Load the spell checker? + if ($context['show_spellchecking']) + echo ' + '; + + // Some javascript used to count how many characters have been used so far in the signature. + echo ' + +

    ', $txt[83], ':
    ', $txt[598], '
    ', $txt[84], ':
    ', $txt[599], '

    ', $modSettings['karmaLabel'], ' + ', $modSettings['karmaApplaudLabel'], ' ', $modSettings['karmaSmiteLabel'], '
    + (', $txt[94], ': ', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), ') +

    + +
    +
    Click to place a point or click on your point to remove it.
    +
    ', $txt['googleMapDisclaimer'] ,'
    + + + + +
    +
    '; + + /* If the admin has enabled choosing avatars stored on the server, the below javascript is used to update the + file listing of avatars as the user changes catergory. It also updates the preview image as they choose + different files on the select box. */ + if (!empty($modSettings['avatar_allow_server_stored'])) + echo ' + '; + echo ' +
    '; + + if ($context['show_spellchecking']) + echo ' +
    '; +} + +// Template for showing theme settings. Note: template_options() actually adds the theme specific options. +function template_theme() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $days; + + // The main containing header. + echo ' +
    + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['theme_info'], ' +
    + '; + + // Are they allowed to change their theme? + if ($modSettings['theme_allow'] || $context['user']['is_admin']) + { + echo ' + + + '; + } + + // Are multiple smiley sets enabled? + if (!empty($modSettings['smiley_sets_enable'])) + { + echo ' + + + '; + } + + if ($modSettings['theme_allow'] || $context['user']['is_admin'] || !empty($modSettings['smiley_sets_enable'])) + echo ' + + + '; + + // Allow the user to change the way the time is displayed. + echo ' + + + + + + + + + '; + + echo ' + + + '; + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    ', $txt['theme1a'], ': ', $context['member']['theme']['name'], ' ', $txt['theme1b'], '
    + ', $txt['smileys_current'], ': + :) +

    + ', $txt[486], ':
    + ', $txt[119], ' + ', $txt[479], ' +
    +
    + +
    ', $txt[371], ':
    ', $txt[519], '

    ', $txt[741], ': ', $context['current_forum_time'], '

    + + + + + + + + + + '; + + if ($settings['allow_no_censored']) + echo ' + + + '; + + echo ' + + + + + + + + + + + + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + +
    + +
    + +
    +
    +
    +
    '; +} + +function template_notification() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + // The main containing header. + echo ' + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['notification_info'], ' +
    +
    '; + + // Allow notification on announcements to be disabled? + if (!empty($modSettings['notifyAnncmnts_UserDisable'])) + echo ' +   +
    '; + + // More notification options. + echo ' +   +
    + +   +
    + +
    + + + + +
    +
    +
    +
    +
    +
    + + +
    ', $txt['notifications_topics'], '
    + + + '; + if (!empty($context['topic_notifications'])) + { + echo ' + + + + '; + foreach ($context['topic_notifications'] as $topic) + { + echo ' + + + + + '; + } + + echo ' + + + + + + '; + } + else + echo ' + + '; + echo ' +
    + + ' . $txt[70] . '' . $txt[109] . '
    + ', $topic['link']; + + if ($topic['new']) + echo ' ', $txt[302], ''; + + echo '
    + ' . $txt['smf88'] . ' ' . $topic['board']['link'] . ' +
    ' . $topic['poster']['link'] . ' + +
    + ', $txt[139], ': ', $context['page_index'], ' +
    + +
    + ', $txt['notifications_topics_none'], '
    +
    ', $txt['notifications_topics_howto'], '
    +
    +
    + + + +
    +

    +
    +
    + + +
    ', $txt['notifications_boards'], '
    + + + '; + if (!empty($context['board_notifications'])) + { + echo ' + + '; + foreach ($context['board_notifications'] as $board) + { + echo ' + + + + '; + } + + echo ' + + + '; + } + else + echo ' + '; + echo ' + +
    + + ' . $txt['smf82'] . '
    ', $board['link']; + + if ($board['new']) + echo ' ', $txt[302], ''; + + echo ' + +
    + +
    + ', $txt['notifications_boards_none'], '
    +
    ', $txt['notifications_boards_howto'], '
    +
    +
    + + + +
    +

    '; +} + +// Template for options related to personal messages. +function template_pmprefs() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + // The main containing header. + echo ' +
    + + + + + + '; + + // A text box for the user to input usernames of everyone they want to ignore personal messages from. + echo ' + + + +
    +    + ', $txt[79], ' +
    + ', $txt['pmprefs_info'], ' +
    + + + + + '; + + // Extra options available to the user for personal messages. + echo ' + + + '; + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    + ', $txt[325], ': +
    + ', $txt[326], '
    +
    + ', $txt['find_members'], ' ', $txt['find_members'], ' +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    '; +} + +// Template to show for deleting a users account - now with added delete post capability! +function template_deleteAccount() +{ + global $context, $settings, $options, $scripturl, $txt, $scripturl; + + // The main containing header. + echo ' +
    + + + + '; + // If deleting another account give them a lovely info box. + if (!$context['member']['is_owner']) + echo ' + + + '; + echo ' + + + +
    +    + ', $txt['deleteAccount'], ' +
    + ', $txt['deleteAccount_desc'], ' +
    + + + + + '; + } + // Otherwise an admin doesn't need to enter a password - but they still get a warning - plus the option to delete lovely posts! + else + { + echo '
    ', $txt['deleteAccount_warning'], ' + +
    + + + + + + + + '; + } + echo ' +
    '; + + // If the user is deleting their own account warn them first - and require a password! + if ($context['member']['is_owner']) + { + echo ' + ', $txt['own_profile_confirm'], '

    +
    + ', $txt['smf241'], ': + +      + + + + +
    + ', $txt['deleteAccount_posts'], ': +
    + +
    + + + + +
    +
    +
    '; +} + +// Template for the password box/save button stuck at the bottom of every profile page. +function template_profile_save() +{ + global $context, $settings, $options, $txt; + + echo ' + +
    + '; + + // Only show the password box if it's actually needed. + if ($context['user']['is_owner'] && $context['require_password']) + echo ' + + ', $txt['smf241'], ': +
    ', $txt['smf244'], '
    + + + '; + else + echo ' + '; + + echo ' + + + + + + '; +} + +?> diff --git a/Themes/fixed/Recent.template.php b/Themes/fixed/Recent.template.php new file mode 100644 index 0000000..8418350 --- /dev/null +++ b/Themes/fixed/Recent.template.php @@ -0,0 +1,292 @@ + + + +  ' . $post['counter'] . '  + + +  ' . $post['category']['name'] . ' / ' . $post['board']['name'] . ' / ' . $post['subject'] . ' + + +  ' . $txt[30] . ': ' . $post['time'] . '  + + + + + ' . $txt[109] . ' ' . $post['first_poster']['link'] . ' | ' . $txt[22] . ' ' . $txt[525] . ' ' . $post['poster']['link'] . ' + + + + + ' . $post['message'] . ' + + + + '; + + if ($post['can_delete']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + if ($post['can_delete'] && ($post['can_mark_notify'] || $post['can_reply'])) + echo ' + ', $context['menu_separator']; + if ($post['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + if ($post['can_reply'] && $post['can_mark_notify']) + echo ' + ', $context['menu_separator']; + if ($post['can_mark_notify']) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + echo ' + + +
    '; + } + + echo ' + ' . $txt[236] . ' ' . $txt[237] . '
    '; +} + +function template_unread() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + echo ' + + + + +
    ', theme_linktree(), '
    + + + + + +
    + + + ', $settings['show_mark_read'] ? ' + ' : '', ' + +
    ' . $txt[139] . ': ' . $context['page_index'] . '' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . '
    +
    + + + +
    + + '; + if (!empty($context['topics'])) + echo ' + + + + + + '; + else + echo ' + '; + echo ' + '; + + foreach ($context['topics'] as $topic) + { + echo ' + + + + + + + + + '; + } + + if (!empty($context['topics']) && !$context['showing_all_topics']) + echo ' + + + '; + + echo ' +
     ' . $txt[70] . '' . $txt[109] . '' . $txt[110] . '' . $txt[301] . '' . $txt[111] . '', $context['showing_all_topics'] ? $txt[151] : $txt['unread_topics_visit_none'], '
    + + + ' . $topic['first_post']['link'] . ' ' . $txt[302] . ' ' . $topic['pages'] . ' +
    ' . $txt['smf88'] . ' ' . $topic['board']['link'] . '
    + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['replies'] . ' + ' . $topic['views'] . ''; + if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif')) + echo ' + ', $txt[111], ''; + echo ' + + ', $topic['last_post']['time'], '
    + ', $txt[525], ' ', $topic['last_post']['member']['link'], ' +
    ', $txt['unread_topics_all'], '
    +
    + + + + + +
    + + + ', $settings['show_mark_read'] ? ' + ' : '', ' + +
    ' . $txt[139] . ': ' . $context['page_index'] . '' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . '
    +
    + + + + + + +
    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    '; +} + +function template_replies() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + echo ' + + + + +
    ', theme_linktree(), '
    + + + + + +
    + + + + + +
    ' . $txt[139] . ': ' . $context['page_index'] . ''; + + if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . ''; + + echo '
    +
    + + + +
    + + '; + if (!empty($context['topics'])) + echo ' + + + + + + '; + else + echo ' + '; + echo ' + '; + + foreach ($context['topics'] as $topic) + { + echo ' + + + + + + + + + '; + } + + echo ' +
     ' . $txt[70] . '' . $txt[109] . '' . $txt[110] . '' . $txt[301] . '' . $txt[111] . '' . $txt[151] . '
    + + + ' . $topic['first_post']['link'] . ' ' . $txt[302] . ' ' . $topic['pages'] . ' +
    ' . $txt['smf88'] . ' ' . $topic['board']['link'] . '
    + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['replies'] . ' + ' . $topic['views'] . ''; + if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif')) + echo ' + ', $txt[111], ''; + echo ' + + ', $topic['last_post']['time'], '
    + ', $txt[525], ' ', $topic['last_post']['member']['link'], ' +
    +
    + + + + + +
    + + + + + +
    ' . $txt[139] . ': ' . $context['page_index'] . ''; + + if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . ''; + + echo '
    +
    + + + + + + +
    + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Register.template.php b/Themes/fixed/Register.template.php new file mode 100644 index 0000000..f946f7c --- /dev/null +++ b/Themes/fixed/Register.template.php @@ -0,0 +1,390 @@ + +
    + + + + + + +
    ', $txt[97], ' - ', $txt[517], '
    + + + + + + + + + + + + + + +
    + ', $txt[98], ': +
    ', $txt[520], '
    +
    + +
    + ', $txt[69], ': +
    ', $txt[679], '
    +
    + '; + + // Are they allowed to hide their email? + if ($context['allow_hide_email']) + echo ' + '; + + echo ' +
    + ', $txt[81], ': + + +
    + ', $txt[82], ': + + +
    +
    '; + + // Require them to agree here? + if ($context['require_agreement']) + echo ' + + + + + + +
    + ', $context['agreement'], ' +
    + +
    '; + + echo ' +
    +
    + +
    +
    '; + + // Uncheck the agreement thing.... + if ($context['require_agreement']) + echo ' +'; +} + +// After registration... all done ;). +function template_after() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Not much to see here, just a quick... "you're now registered!" or what have you. + echo ' +
    + + + + + + +
    ', $context['page_title'], '
    ', $context['description'], '

    +
    '; +} + +function template_admin_browse() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + +
    + + + + + + + + + + + + + + '; + + foreach ($context['columns'] as $column) + { + echo ' + '; + } + + echo ' + + '; + + if (empty($context['members'])) + echo ' + + + '; + else + { + foreach ($context['members'] as $member) + echo ' + + + + + + + + '; + + echo ' + + + '; + } + + echo ' + + + +
    ' . $txt[119] . ' ', $txt['registration_center'], '
    '; + + if (isset($context['types_enabled'])) + { + if ($context['types_enabled'] == 'approve' || $context['types_enabled'] == 'both') + echo ' + ', $context['browse_type'] == 'approve' ? '>' . $txt['admin_browse_awaiting_approval'] : '' . $txt['admin_browse_awaiting_approval'] . ''; + + if ($context['types_enabled'] == 'both') + echo ' + |'; + + if ($context['types_enabled'] == 'activate' || $context['types_enabled'] == 'both') + echo ' + ', $context['browse_type'] == 'activate' ? '>' . $txt['admin_browse_awaiting_activate'] : '' . $txt['admin_browse_awaiting_activate'] . ''; + echo ' + |'; + } + + echo ' + ', $txt['admin_browse_register_new'], ' +
    + ', $txt['admin_browse_' . $context['browse_type'] . '_desc'], ' +
    ', $txt[139], ': ', $context['page_index'], '
    + '; + + if ($column['selected']) + echo $column['label'], ' '; + else + echo $column['label']; + + echo ' +
    ', $txt['admin_browse_no_members'], ' ', ($context['browse_type'] == 'approve' ? $txt['admin_browse_awaiting_approval'] : $txt['admin_browse_awaiting_activate']), '
    ', $member['id'], ' + ', $member['username'], ' + + ', $member['email'], '', $member['ip'], '', $member['dateRegistered'], ' + +
    + + + + + + ', $context['sort_direction'] == 'up' ? ' + ' : '', ' +
    ', $txt[139], ': ', $context['page_index'], '
    + +
    '; +} + +function template_admin_register() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ' . $txt[119] . ' ', $txt['registration_center'], ' +
    '; + + if (isset($context['types_enabled'])) + { + if ($context['types_enabled'] == 'approve' || $context['types_enabled'] == 'both') + echo ' + ', $txt['admin_browse_awaiting_approval'], ''; + + if ($context['types_enabled'] == 'both') + echo ' + |'; + + if ($context['types_enabled'] == 'activate' || $context['types_enabled'] == 'both') + echo ' + ', $txt['admin_browse_awaiting_activate'], ''; + + echo ' + |'; + } + + echo ' + >', $txt['admin_browse_register_new'], ' +
    + ', $txt['admin_register_desc'], ' +
    + ', $txt['admin_register_username'], ': +
    ', $txt['admin_register_username_desc'], '
    +
    + +
    + ', $txt['admin_register_email'], ': +
    ', $txt['admin_register_email_desc'], '
    +
    + +
    + ', $txt['admin_register_password'], ': +
    ', $txt['admin_register_password_desc'], '
    +
    +
    +
    + ', $txt['admin_register_group'], ': +
    ', $txt['admin_register_group_desc'], '
    +
    +
    +
    + ', $txt['admin_register_email_detail'], ': +
    ', $txt['admin_register_email_detail_desc'], '
    +
    +
    +
    + ', $txt['admin_register_email_activate'], ': + +
    +
    + +
    + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Reminder.template.php b/Themes/fixed/Reminder.template.php new file mode 100644 index 0000000..6052b7a --- /dev/null +++ b/Themes/fixed/Reminder.template.php @@ -0,0 +1,114 @@ + +
    + + + + + + + + + + + + + +
    + ', $txt[36], ' ', $txt[194], ' +
    ', $txt['smf100'], ':
    ', $txt['pswd4'], '
    + +
    '; +} + +function template_sent() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + +
    ' . $context['page_title'] . '
    + ' . $context['description'] . ' +
    '; +} + +function template_set_password() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    +
    + + + + + + + + + + + + +
    ', $context['page_title'], '
    + ', $txt[81], ':
    + ', $txt[596], ' +
    ', $txt[82], ':
    + + + +
    '; +} + +function template_ask() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    +
    + + + + + + + + + + + + + + + + + + + + +
    ', $txt[36], ' ', $txt[194], '
    ', $txt['pswd6'], '
    ', $txt['pswd1'], ': ', $context['secret_question'], '
    ', $txt['pswd2'], ':
    + ', $txt[81], ':
    + ', $txt[596], ' +
    ', $txt[82], ':
    + + + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Search.template.php b/Themes/fixed/Search.template.php new file mode 100644 index 0000000..3769d9e --- /dev/null +++ b/Themes/fixed/Search.template.php @@ -0,0 +1,342 @@ + +
    + + + + +
    ', theme_linktree(), '
    + + + + + + + +
    ' . $txt[183] . '
    '; + + if ($context['simple_search']) + { + echo ' + ' . $txt[582] . ':
    +   +
    + ' . $txt['smf298'] . ' + '; + } + else + { + echo ' + + + + + + + + + + + + + + + + + + + + + +
    + ', $txt[582], ': + + ', $txt[583], ': +
    + + + + + +
    ', $txt['search_options'], ':', $txt['search_post_age'], ':
    +
    + +
    + ', $txt['search_between'], '  ', $txt['search_and'], '  ', $txt[579], '. +
    ', $txt['search_order'], ':
    + +
    +
    + ', $txt[189], ':
    + + '; + + $temp_boards = array(); + foreach ($context['categories'] as $category) + { + $temp_boards[] = array( + 'name' => $category['name'] + ); + $temp_boards = array_merge($temp_boards, array_values($category['boards'])); + } + + $max_boards = ceil(count($temp_boards) / 2); + if ($max_boards < 2) + $max_boards = 2; + for ($i = 0; $i < $max_boards; $i++) + { + echo ' + + '; + if (isset($temp_boards[$i + $max_boards])) + { + echo ' + '; + } + echo ' + '; + } + + echo ' +
    '; + + if (isset($temp_boards[$i]['id'])) + echo ' + '; + elseif (isset($temp_boards[$i]['name'])) + echo '', $temp_boards[$i]['name'], ''; + + echo ' + '; + if (isset($temp_boards[$i + $max_boards]['id'])) + echo ' + '; + else + echo '', $temp_boards[$i + $max_boards]['name'], ''; + echo ' +

    +
    +
    + +
    '; + } + + echo ' +
    +
    '; +} + +function template_results() +{ + global $context, $settings, $options, $txt, $scripturl; + + if ($context['compact']) + { + echo ' +', theme_linktree(), ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    + + '; + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + } + else + echo ' + '; + echo ' + '; + + while ($topic = $context['get_topics']()) + { + echo ' + + + + + + + '; + } + echo ' +
    ', $txt[70], '', $txt[109], '', $txt['search_relevance'], '', $txt['search_date_posted'], '', $txt['search_no_results'], '
    + + + ' . $topic['first_post']['link'] . ' +
    ' . $txt['smf88'] . ' ' . $topic['board']['link'] . '
    '; + + foreach ($topic['matches'] as $message) + { + echo ' +
    +
    ' . $message['subject_highlighted'] . ' ', $txt[525], ' ' . $message['member']['link'] . '
    '; + + if ($message['body_highlighted'] != '') + echo ' +
    ' . $message['body_highlighted'] . '
    '; + } + + echo ' +
    + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['relevance'] . ' + ' . $topic['first_post']['time'] . '
    + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], ' 
    +
    +'; + if ($settings['linktree_inline']) + echo ' + + + '; + echo ' + + + +
    ', theme_linktree(), '

    +
    +   + +
    +
    '; + } + else + { + echo ' + ', theme_linktree(), ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    +
    '; + if (empty($context['topics'])) + echo ' +
    +

    + (', $txt['search_no_results'], ')

    +
    +
    '; + + while ($topic = $context['get_topics']()) + { + foreach ($topic['matches'] as $message) + { + // Create buttons row. + $buttonArray = array(); + if ($topic['can_reply']) + { + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]) . ''; + } + if ($topic['can_mark_notify'] && $context['user']['is_logged']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + echo ' + + + + +
    + + + + + + + + + + + + + +
     ', $message['counter'], '   + ', $topic['category']['name'], ' / + ', $topic['board']['name'], ' / + ', $message['subject_highlighted'], ' +  ', $txt[30], ': ', $message['time'], ' 
    ', $txt[109], ' ', $topic['first_post']['member']['link'], ', ', $txt[72], ' ', $txt[525], ' ', $message['member']['link'], '', $txt['search_relevance'], ': ', $topic['relevance'], '
    ', $message['body_highlighted'], '
    +  ', implode($context['menu_separator'], $buttonArray), '
    +

    '; + } + } + + echo ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    '; + if ($settings['linktree_inline']) + echo theme_linktree(); + } +} + +?> diff --git a/Themes/fixed/SendTopic.template.php b/Themes/fixed/SendTopic.template.php new file mode 100644 index 0000000..f63ce0f --- /dev/null +++ b/Themes/fixed/SendTopic.template.php @@ -0,0 +1,74 @@ + + + + + '; + + // Just show all the input boxes, in a line... + echo ' + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + ', $context['page_title'], ' +
    ', $txt['sendtopic_sender_name'], ':
    ', $txt['sendtopic_sender_email'], ':
    ', $txt['sendtopic_comment'], ':

    ', $txt['sendtopic_receiver_name'], ':
    ', $txt['sendtopic_receiver_email'], ':

    + + '; +} + +function template_report() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + +
    ', $txt['rtm1'], '
    +
    ', $txt['smf315'], '
    + ', $txt['rtm2'], ': + +
    + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Settings.template.php b/Themes/fixed/Settings.template.php new file mode 100644 index 0000000..8082bff --- /dev/null +++ b/Themes/fixed/Settings.template.php @@ -0,0 +1,189 @@ + 'show_board_desc', + 'label' => $txt[732], + ), + array( + 'id' => 'show_children', + 'label' => $txt['show_children'], + ), + array( + 'id' => 'show_no_avatars', + 'label' => $txt['show_no_avatars'], + ), + array( + 'id' => 'show_no_signatures', + 'label' => $txt['show_no_signatures'], + ), + array( + 'id' => 'show_no_censored', + 'label' => $txt['show_no_censored'], + ), + array( + 'id' => 'return_to_post', + 'label' => $txt['return_to_post'], + ), + array( + 'id' => 'view_newest_first', + 'label' => $txt['recent_posts_at_top'], + ), + array( + 'id' => 'view_newest_pm_first', + 'label' => $txt['recent_pms_at_top'], + ), + array( + 'id' => 'popup_messages', + 'label' => $txt['popup_messages'], + ), + array( + 'id' => 'copy_to_outbox', + 'label' => $txt['copy_to_outbox'], + ), + array( + 'id' => 'auto_notify', + 'label' => $txt['auto_notify'], + ), + array( + 'id' => 'calendar_start_day', + 'label' => $txt['calendar_start_day'], + 'options' => array( + 0 => $days[0], + 1 => $days[1], + ), + ), + array( + 'id' => 'display_quick_reply', + 'label' => $txt['display_quick_reply'], + 'options' => array( + 0 => $txt['display_quick_reply1'], + 1 => $txt['display_quick_reply2'], + 2 => $txt['display_quick_reply3'] + ), + ), + array( + 'id' => 'display_quick_mod', + 'label' => $txt['display_quick_mod'], + 'options' => array( + 0 => $txt['display_quick_mod_none'], + 1 => $txt['display_quick_mod_check'], + 2 => $txt['display_quick_mod_image'], + ), + ), + ); +} + +function template_settings() +{ + global $context, $settings, $options, $scripturl, $txt; + + $context['theme_settings'] = array( + array( + 'id' => 'number_recent_posts', + 'label' => $txt['number_recent_posts'], + 'description' => $txt['number_recent_posts_desc'], + 'type' => 'number', + ), + array( + 'id' => 'display_who_viewing', + 'label' => $txt['who_display_viewing'], + 'options' => array( + 0 => $txt['who_display_viewing_off'], + 1 => $txt['who_display_viewing_numbers'], + 2 => $txt['who_display_viewing_names'], + ), + ), + array( + 'id' => 'smiley_sets_default', + 'label' => $txt['smileys_default_set_for_theme'], + 'options' => $context['smiley_sets'], + ), + array( + 'id' => 'show_modify', + 'label' => $txt[383], + ), + array( + 'id' => 'show_member_bar', + 'label' => $txt[510], + ), + array( + 'id' => 'linktree_link', + 'label' => $txt[522], + ), + array( + 'id' => 'show_profile_buttons', + 'label' => $txt[523], + ), + array( + 'id' => 'show_mark_read', + 'label' => $txt[618], + ), + array( + 'id' => 'linktree_inline', + 'label' => $txt['smf105'], + 'description' => $txt['smf106'], + ), + array( + 'id' => 'show_sp1_info', + 'label' => $txt['smf200'], + ), + array( + 'id' => 'allow_no_censored', + 'label' => $txt['allow_no_censored'], + ), + array( + 'id' => 'show_bbc', + 'label' => $txt[740], + ), + array( + 'id' => 'additional_options_collapsable', + 'label' => $txt['additional_options_collapsable'], + ), + array( + 'id' => 'enable_news', + 'label' => $txt[379], + ), + array( + 'id' => 'show_newsfader', + 'label' => $txt[387], + ), + array( + 'id' => 'newsfader_time', + 'label' => $txt[739], + 'type' => 'number', + ), + array( + 'id' => 'show_user_images', + 'label' => $txt[384], + ), + array( + 'id' => 'show_blurb', + 'label' => $txt[385], + ), + array( + 'id' => 'show_latest_member', + 'label' => $txt[382], + ), + array( + 'id' => 'use_image_buttons', + 'label' => $txt[521], + ), + array( + 'id' => 'show_gender', + 'label' => $txt[386], + ), + array( + 'id' => 'hide_post_group', + 'label' => $txt['hide_post_group'], + 'description' => $txt['hide_post_group_desc'], + ), + ); +} + +?> \ No newline at end of file diff --git a/Themes/fixed/SplitTopics.template.php b/Themes/fixed/SplitTopics.template.php new file mode 100644 index 0000000..781620a --- /dev/null +++ b/Themes/fixed/SplitTopics.template.php @@ -0,0 +1,495 @@ + + + + + + + + +
    ', $txt['smf251'], '
    + :
    +
    + ', $txt['smf255'], '
    + ', $txt['smf256'], '
    + ', $txt['smf257'], '
    +
    + +
    + + '; +} + +function template_main() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + +
    ' . $txt['smf251'] . '
    + ' . $txt['smf259'] . '

    + ' . $txt[101] . '
    + ' . $txt['smf260'] . '
    + ' . $txt['smf258'] . ' +
    '; +} + +function template_select() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + '; + foreach ($context['messages'] as $message) + echo ' + + + '; + echo ' +
    + ' . $txt['smf251'] . ' - ' . $txt['smf257'] . ' +
    + ' . $txt['smf261'] . ' +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    + + ' . $message['subject'] . ' - ' . $message['poster'] . '
    + ' . $message['body'] . ' +
    +
    +

    + + +

    + +
    '; +} + +function template_merge_done() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + +
    ' . $txt['smf252'] . '
    +
    + ' . $txt['smf264'] . '
    +
    + ' . $txt[101] . '
    + ' . $txt['smf265'] . ' +
    '; +} + +function template_merge() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + + + + + + + +
    ' . $txt['smf252'] . '
    ' . $txt['smf276'] . '
    + + +
    ' . $txt[139] . ': ' . $context['page_index'] . '
    +
    + + + + + + + + + + + +

    ' . $txt['smf266'] . ':

    ' . $context['origin_subject'] . '

    ' . $txt['smf267'] . ':
    +
    + +

    ' . $txt['smf269'] . ':
    +
    + '; + foreach ($context['topics'] as $topic) + echo ' + + + + '; + echo ' +
    + ' . ($settings['use_image_buttons'] ? '' . $txt['smf252'] . '' : $txt['smf252']) . '  + + ' . $topic['subject'] . ' ' . $txt[109] . ' ' . $topic['poster']['link'] . ' +
    +
    +
    + + +
    ' . $txt[139] . ': ' . $context['page_index'] . '
    +
    +
    '; +} + +function template_merge_extra_options() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + '; + + if (!empty($context['boards'])) + { + echo ' + + + + + '; + } + if (!empty($context['polls'])) + { + echo ' + + + + + '; + } + echo ' + + + +
    ' . $txt['smf252'] . '
    ' . $txt['merge_topic_list'] . '
    + + + + + + + + '; + foreach ($context['topics'] as $topic) + echo ' + + + + + + + '; + echo ' +
    ' . $txt['merge_check'] . '' . $txt[70] . '' . $txt[109] . '' . $txt[111] . '' . $txt['merge_include_notifications'] . '
    + + + ' . $topic['subject'] . ' + + ' . $topic['started']['link'] . '
    + ' . $topic['started']['time'] . ' +
    + ' . $topic['updated']['link'] . '
    + ' . $topic['updated']['time'] . ' +
    + +
    +
    +
    '; + + echo ' + ', $txt['merge_select_subject'], ':
    +
    + ', $txt['merge_enforce_subject'], ' +
    ' . $txt['merge_select_target_board'] . '
    '; + foreach ($context['boards'] as $board) + echo ' + + + '; + echo ' +
    + ' . $board['name'] . ' +
    ' . $txt['merge_select_poll'] . '
    '; + foreach ($context['polls'] as $poll) + echo ' + + + '; + echo ' + + + +
    + ' . $poll['question'] . ' (' . $txt[118] . ': ' . $poll['topic']['subject'] . ') +
    + (' . $txt['merge_no_poll'] . ') +
    + + +
    +
    '; +} + +function template_link_done() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + +
    ' . $txt['smf252'] . '
    +
    + ' . $txt['smf264'] . '
    +
    + ' . $txt[101] . '
    + ' . $txt['smf265'] . ' +
    '; +} + +function template_link() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + + + + + + + +
    ' . $txt['link_topics'] . '
    ' . $txt['link_topicvs_exlain']. '
    + + +
    ' . $txt[139] . ': ' . $context['page_index'] . '
    +
    + + + + + + + + + + + +

    ' . $context['origin_subject'] . '

    ' . $txt['smf267'] . ':
    +
    + +

    ' . $txt['smf269'] . ':
    +
    + '; + foreach ($context['topics'] as $topic) + echo ' + + + + '; + echo ' +
    + ' . ($settings['use_image_buttons'] ? '' . $txt['smf252'] . '' : $txt['smf252']) . '  + + ' . $topic['subject'] . ' ' . $txt[109] . ' ' . $topic['poster']['link'] . ' +
    +
    +
    + + +
    ' . $txt[139] . ': ' . $context['page_index'] . '
    +
    +
    '; +} + +/*function template_link_extra_options() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + '; + + if (!empty($context['boards'])) + { + echo ' + + + + + '; + } + if (!empty($context['polls'])) + { + echo ' + + + + + '; + } + echo ' + + + +
    ' . $txt['smf252'] . '
    ' . $txt['merge_topic_list'] . '
    + + + + + + + + '; + foreach ($context['topics'] as $topic) + echo ' + + + + + + + '; + echo ' +
    ' . $txt['merge_check'] . '' . $txt[70] . '' . $txt[109] . '' . $txt[111] . '' . $txt['merge_include_notifications'] . '
    + + + ' . $topic['subject'] . ' + + ' . $topic['started']['link'] . '
    + ' . $topic['started']['time'] . ' +
    + ' . $topic['updated']['link'] . '
    + ' . $topic['updated']['time'] . ' +
    + +
    +
    +
    '; + + echo ' + ', $txt['merge_select_subject'], ':
    +
    + ', $txt['merge_enforce_subject'], ' +
    ' . $txt['merge_select_target_board'] . '
    '; + foreach ($context['boards'] as $board) + echo ' + + + '; + echo ' +
    + ' . $board['name'] . ' +
    ' . $txt['merge_select_poll'] . '
    '; + foreach ($context['polls'] as $poll) + echo ' + + + '; + echo ' + + + +
    + ' . $poll['question'] . ' (' . $txt[118] . ': ' . $poll['topic']['subject'] . ') +
    + (' . $txt['merge_no_poll'] . ') +
    + + +
    +
    '; +} +*/ +?> \ No newline at end of file diff --git a/Themes/fixed/Stats.template.php b/Themes/fixed/Stats.template.php new file mode 100644 index 0000000..e0f4c37 --- /dev/null +++ b/Themes/fixed/Stats.template.php @@ -0,0 +1,233 @@ + + + ', theme_linktree(), ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $context['page_title'], '
    ', $txt['smf_stats_2'], '
    + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt[488], ':', $context['show_member_list'] ? '' . $context['num_members'] . '' : $context['num_members'], '
    ', $txt[489], ':', $context['num_posts'], '
    ', $txt[490], ':', $context['num_topics'], '
    ', $txt[658], ':', $context['num_categories'], '
    ', $txt['users_online'], ':', $context['users_online'], '
    ', $txt[888], ':', $context['most_members_online']['number'], ' - ', $context['most_members_online']['date'], '
    ', $txt['users_online_today'], ':', $context['online_today'], '
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['average_members'], ':', $context['average_members'], '
    ', $txt['average_posts'], ':', $context['average_posts'], '
    ', $txt['average_topics'], ':', $context['average_topics'], '
    ', $txt[665], ':', $context['num_boards'], '
    ', $txt[656], ':', $context['latest_member']['link'], '
    ', $txt['average_online'], ':', $context['average_online'], '
    ', $txt['gender_ratio'], ':', $context['gender']['ratio'], '
    +
    ', $txt['smf_stats_3'], '', $txt['smf_stats_4'], '
    + '; + foreach ($context['top_posters'] as $poster) + echo ' + + + + + '; + echo ' +
    ', $poster['link'], '', $poster['num_posts'] > 0 ? '' : ' ', '', $poster['num_posts'], '
    +
    + '; + foreach ($context['top_boards'] as $board) + echo ' + + + + + '; + echo ' +
    ', $board['link'], '', $board['num_posts'] > 0 ? '' : ' ', '', $board['num_posts'], '
    +
    ', $txt['smf_stats_11'], '', $txt['smf_stats_12'], '
    + '; + foreach ($context['top_topics_replies'] as $topic) + echo ' + + + + + '; + echo ' +
    ', $topic['link'], '', $topic['num_replies'] > 0 ? '' : ' ', '', $topic['num_replies'], '
    +
    + '; + foreach ($context['top_topics_views'] as $topic) + echo ' + + + + + '; + echo ' +
    ', $topic['link'], '', $topic['num_views'] > 0 ? '' : ' ', '', $topic['num_views'], '
    +
    ', $txt['smf_stats_15'], '', $txt['smf_stats_16'], '
    + '; + foreach ($context['top_starters'] as $poster) + echo ' + + + + + '; + echo ' +
    ', $poster['link'], '', $poster['num_topics'] > 0 ? '' : ' ', '', $poster['num_topics'], '
    +
    + '; + foreach ($context['top_time_online'] as $poster) + echo ' + + + + + '; + echo ' +
    ', $poster['link'], '', $poster['time_online'] > 0 ? '' : ' ', '', $poster['time_online'], '
    +
    ', $txt['smf_stats_5'], '
    '; + + if (!empty($context['monthly'])) + { + echo ' + + + + + + + '; + if (!empty($modSettings['hitStats'])) + echo ' + '; + echo ' + '; + + foreach ($context['monthly'] as $month) + { + echo ' + + + + + + '; + if (!empty($modSettings['hitStats'])) + echo ' + '; + echo ' + '; + + if ($month['expanded']) + { + foreach ($month['days'] as $day) + { + echo ' + + + + + + '; + if (!empty($modSettings['hitStats'])) + echo ' + '; + echo ' + '; + } + } + } + echo ' +
    ', $txt['smf_stats_13'], '', $txt['smf_stats_7'], '', $txt['smf_stats_8'], '', $txt['smf_stats_9'], '', $txt['smf_stats_14'], '', $txt['smf_stats_10'], '
    + ', $month['link'], ' + ', $month['new_topics'], '', $month['new_posts'], '', $month['new_members'], '', $month['most_members_online'], '', $month['hits'], '
    ', $day['year'], '-', $day['month'], '-', $day['day'], '', $day['new_topics'], '', $day['new_posts'], '', $day['new_members'], '', $day['most_members_online'], '', $day['hits'], '
    '; + } + + echo ' +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Themes.template.php b/Themes/fixed/Themes.template.php new file mode 100644 index 0000000..bdb2dcf --- /dev/null +++ b/Themes/fixed/Themes.template.php @@ -0,0 +1,488 @@ + + + + + + + '; + + // Show each theme.... with X for delete and a link to settings. + foreach ($context['themes'] as $theme) + { + echo ' + + + + '; + } + + echo ' +
    ', $txt['theme4'], '
    ', $theme['name'], ''; + + // You *cannot* delete the default theme. It's important! + if ($theme['id'] != 1) + echo ' + ', $txt['theme_remove'], ''; + + echo ' +
    '; + + // Show all the basic theme settings - like allowing users to select them, etc. + echo ' +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ', $txt[119], ' + ', $txt['themeadmin_title'], ' +
    ', $txt['themeadmin_explain'], '
    ', $txt['theme_allow'], '
    ', $txt['theme_default'], '
    ', $txt['theme_guests'], ': + +   ', $txt['theme_select'], '
    ', $txt['theme_reset'], ': + +   ', $txt['theme_select'], '
    + +
    '; + + // Warn them if theme creation isn't possible! + if (!$context['can_create_new']) + echo ' + ', $txt['theme_install_writable'], '

    '; + + echo ' +
    + + + + '; + + // Here's a little box for installing a new theme. + if ($context['can_create_new']) + echo ' + + + + '; + + echo ' + + + + + + '; + + if ($context['can_create_new']) + echo ' + + + + + + '; + + echo ' + +
    ', $txt[119], ' ', $txt['theme_install'], '
    :
    :
    + +
    + +
    '; + + // And lastly, link to simplemachines.org for latest themes and info! + echo ' + + + + + + + +
    ', $txt[119], ' ', $txt['theme_latest'], '
    ', $txt['theme_latest_fetch'], '
    + + + + +'; + + // Gotta love IE4, and its hatefulness... + if ($context['browser']['is_ie4']) + echo ' + '; + else + echo ' + '; +} + +// This template allows for the selection of different themes ;). +function template_pick() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Just go through each theme and show its information - thumbnail, etc. + foreach ($context['available_themes'] as $theme) + echo ' + + + + + + + + +
    + + ', $theme['description'], ' +
    +
    ', $theme['num_users'], ' ', ($theme['num_users'] == 1 ? $txt['theme_user'] : $txt['theme_users']), '
    + ', $txt['theme_set'], ' | + ', $txt['theme_preview'], ' +
    +
    '; +} + +// Okay, that theme was installed successfully! +function template_installed() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Not much to show except a link back... + echo ' + + + + + + + +
    ', $context['page_title'], '
    + ', $context['installed_theme']['name'], ' ', $txt['theme_installed_message'], '
    +
    + ', $txt[250], ' +
    '; +} + +// Wanna edit the stylesheet? +function template_edit_style() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Just show a big box.... grey out the Save button if it's not saveable... (ie. not 777.) + echo ' +
    + ', $context['session_error'] ? ' + + + ' : '', ' + + + + + + +
    +
    + ' . $txt['error_session_timeout'] . ' +
    +
    ', $txt['theme_edit'], '
    '; + + if (!$context['allow_save']) + echo ' + ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
    '; + + echo ' +
    + +
    + +
    '; +} + +// This edits the template... +function template_edit_template() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Not much to do here either, just a save button that can be disabled... + echo ' +
    + ', $context['session_error'] ? ' + + + ' : '', ' + + + + + + +
    +
    + ' . $txt['error_session_timeout'] . ' +
    +
    ', $txt['theme_edit'], '
    '; + + if (!$context['allow_save']) + echo ' + ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
    '; + + echo ' +
    + +
    + +
    '; +} + +function template_set_settings() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + '; + + if ($context['theme_settings']['theme_id'] != 1) + echo ' + + + + + + '; + + echo ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + + foreach ($context['settings'] as $setting) + { + echo ' + + + '; + } + + echo ' + + + +
    ', $txt[119], ' ', $txt['theme4'], ' - ', $context['theme_settings']['name'], '
    ', $txt['theme_edit'], '
    + ', $txt['theme_edit_index'], '
    + ', $txt['theme_edit_style'], '
    +
    +
    ', $txt['theme5'], '
    ', $txt['actual_theme_name'], '
    ', $txt['actual_theme_url'], '
    ', $txt['actual_images_url'], '
    ', $txt['actual_theme_dir'], '
    ', $txt['theme6'], '
    ', $txt['theme_options_defaults_link'], '
    ', $txt['theme_options_reset_link'], '
    '; + + if ($setting['type'] == 'checkbox') + echo ' + + '; + elseif ($setting['type'] == 'list') + { + echo ' + + '; + } + else + echo ' + + '; + + if (isset($setting['description'])) + echo ' +
    ', $setting['description'], '
    '; + + echo ' +

    + +
    '; +} + +function template_set_options() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + '; + + foreach ($context['options'] as $setting) + { + echo ' + + + '; + } + + echo ' + + + + + + +
    ', $txt['theme_options_title'], ' - ', $context['theme_settings']['name'], '
    ', $context['theme_options_reset'] ? $txt['theme_options_reset'] : $txt['theme_options_defaults'], '
    '; + + if ($context['theme_options_reset']) + echo ' + '; + + if ($setting['type'] == 'checkbox') + { + echo ' + + '; + } + elseif ($setting['type'] == 'list') + { + echo ' + + '; + } + else + echo ' + + '; + + if (isset($setting['description'])) + echo ' +
    ', $setting['description'], '
    '; + + echo ' +
    ', $txt['theme_settings_link'], '

    + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Viewkarma.template.php b/Themes/fixed/Viewkarma.template.php new file mode 100644 index 0000000..f45e897 --- /dev/null +++ b/Themes/fixed/Viewkarma.template.php @@ -0,0 +1,156 @@ +', theme_linktree(), ' +
    + + + + '; if ($user_info['is_admin']) echo ' '; echo ' + + '; + $WhatPageIsIt = $_SERVER["QUERY_STRING"]; + if (isset($_REQUEST['u'])) $UserViewing = $_REQUEST['u']; + if(strstr($WhatPageIsIt, "viewkarma")){ $WhatPage='viewkarma';} + elseif(strstr($WhatPageIsIt, "otherkarma")){ $WhatPage='otherkarma;u='.$UserViewing;} + else{$WhatPage='ownkarma;u='.$UserViewing.'';} + echo' + + + + + '; if (!empty($modSettings['karmaurl'])) echo ''; echo ' + + '; if ($user_info['is_admin']) echo ' '; echo ' + '; + + // . + foreach ($context['karma_changes'] as $member) + +if (!empty($modSettings['karmalogview']) && ($user_info['is_admin']) || (empty($modSettings['karmalogview'])) && ($user_info['is_admin'])) +{ + echo ' + + + + + + '; + if (!empty($modSettings['karmaurl'])) + echo ''; + echo ' + + '; +} +elseif (!empty($modSettings['karmalogview'])) +{ + echo ' + + + + + '; + if (!empty($modSettings['karmaurl'])) + echo ''; + echo ' + '; +} +else +{ + echo ' + + + + + + + + '; +} + // + echo' + + '; + if ($user_info['is_admin']) echo ' '; echo ' + + + '; + if ($user_info['is_admin']) echo ' '; echo ' + +
    ', $txt['karmaview'], '
    ', $txt['karmawho'], '', $context['sort_by'] == 'exec' ? '' : '', '', $txt['karmawhos'],'', $context['sort_by'] == 'targ' ? '' : '', '', $txt['karmawhat'],'', $context['sort_by'] == 'action' ? '' : '', '', $txt['karmadesc'],'', $txt['karmawhere'],'', $txt['karmatime'],'', $context['sort_by'] == 'time' ? '' : '', 'Delete
    ' . $member['executor'] . ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['executorkarmagood'],'/-',$member['executorkarmabad'],')'; + echo '' . $member['target'] . ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['targetkarmagood'],'/-',$member['targetkarmabad'],')'; + echo '', $member['action'], '', $member['Description'], '',$member['link']!='PM' ? ''.$txt['karmawhereurl'].'' : $txt['karmawhereurl2'],'', $member['time'], '
    ' . $member['executor'] . ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['executorkarmagood'],'/-',$member['executorkarmabad'],')'; + echo '' . $member['target'] . ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['targetkarmagood'],'/-',$member['targetkarmabad'],')'; + echo '', $member['action'], '', $member['Description'], ''.$txt['karmawhereurl'].'', $member['time'], '
    ' , $member['executor'] , ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['executorkarmagood'],'/-',$member['executorkarmabad'],')'; + echo '' , $member['target'] , ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['targetkarmagood'],'/-',$member['targetkarmabad'],')'; + echo '', $member['action'], '', $member['Description'], ''.$txt['karmawhereurl'].'', $member['time'], '
    (',$txt['karmanumb'].$context['totalActions'],')
    ', $txt[139], ': ', $context['page_index'] , '
    '; + + // + if (!empty($modSettings['karmaotherstat'])) + { + echo ' + + + + + + + + + + + + +
    ', $txt['karma_stat'], ' +
    ',$txt['karma_other_stat'],'',$txt['karma_top_applaud'],'',$txt['karma_top_smite'],'
    + + + + + + + + +
    ',$txt['karma_max_appl'],'',$context['memidappl'],' + [',$context['memidapplcount'],']
    ',$txt['karma_max_smit'],'',$context['memidsmit'],' - [',$context['memidsmitcount'],']
    ',$txt['karma_today'],'',$context['today_point'] ,'
    ',$txt['karma_today_plus'],'',$context['today_plus'] ,'
    ',$txt['karma_today_minus'],'',$context['today_minus'] ,'
    + '; + foreach ($context['top_applaud'] as $applauder) + echo ' + + + + '; + echo '
    ', $applauder['link'], '', $applauder['num_karma'] > 0 ? '' : ' ', '+ ', $applauder['num_karma'], '
    + '; + foreach ($context['top_smite'] as $smiter) + echo ' + + + + '; + echo '
    ', $smiter['link'], '', $smiter['num_karma'] > 0 ? '' : ' ', '- ', $smiter['num_karma'], '
    '; + } + + +} +?> diff --git a/Themes/fixed/VisualWarning.template.php b/Themes/fixed/VisualWarning.template.php new file mode 100644 index 0000000..33df07c --- /dev/null +++ b/Themes/fixed/VisualWarning.template.php @@ -0,0 +1,250 @@ + + + + ' . $txt['visual_warning_management'] . ' + + '; + if (!isset($context['previous'])) + echo' + + + ' . $txt['visual_no_warnings'] . ' + + '; + else + { + echo' + + + ' . $txt['visual_prev_warning'] . ' + + + + + ' . $txt['visual_current_level'] . ' + + + '; + if ($context['previous']['level'] == 0) + echo $txt['visual_none']; + elseif ($context['previous']['level'] == 1) + echo $txt['visual_text_warn']; + elseif ($context['previous']['level'] == 2) + echo $txt['visual_text_pmod']; + elseif ($context['previous']['level'] == 3) + echo $txt['visual_text_mute']; + else + echo $txt['visual_text_ban']; + echo' + + + + + ' . $txt['visual_topic_raised'] . ' + + + ' . $context['previous']['body'] . ' + + + + ' . $txt['visual_time_raised'] . ' + + + ' . $context['previous']['time'] . ' + + + + ' . $txt['visual_reason_raised'] . ' + + + ' . $context['previous']['warningtext'] . ' + + '; + } + echo' + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + ' . $txt['visual_level_details'] . ' +
    + ' . $txt['visual_new_level'] . ' + + ' . $txt['visual_stages'] . ' +
    + ' . $txt['visual_lasts'] . ': + + +
    + ' . $txt['visual_reason_raised'] . ' + + +
    + +
    +
    '; + +} + +function template_list_warnings() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + echo' +
    + + + + + + + + + + + + + '; + foreach ($context['warnings'] as $warning) + echo' + + + + + + + '; + echo' + + + +
    + +  ' . $txt['visual_warning_management'] . ' +
    + ' . $txt['visual_list_desc'] . ' +
    + + ' . $txt['visual_member'] . ' + + ' . $txt['visual_level'] . ' + + ' . $txt['visual_reason'] . ' + + ' . $txt['visual_when'] . ' +
    + + + ' . $warning['memberName'] . ' (' . $warning['realName'] . ') + + ' . $warning['level'] . ' + + ' . $warning['warningText'] . ' + + ' . $warning['time'] . ' +
    + +
    +
    '; +} + +function template_pmod_manager() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + echo' +
    + + + + + + + + + + '; + foreach ($context['posts'] as $post) + { + echo' + + + + + '; + } + echo' + + + +
    + +  ' . $txt['visual_postmod_manager'] . ' +
    + ' . $txt['visual_postmod_awaiting'] . ' +
    + + ' . $txt['visual_postmod_username'] . ' + + ' . $txt['visual_postmod_subject'] . ' +
    + + + ' . $post['memberName'] . ' (' . $post['realName'] . ') + + + + + + + + +
    + ' . $post['subject'] . ($post['ID_POLL'] != -1 && $post['ID_POLL'] != 0 ? '(POLL)' : '') . ' +
    + ' . $post['body'] . ' +
    +
    + + + +
    +
    + + + + +
    + ' . $context['pageIndex'] . ' +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Who.template.php b/Themes/fixed/Who.template.php new file mode 100644 index 0000000..abefdec --- /dev/null +++ b/Themes/fixed/Who.template.php @@ -0,0 +1,64 @@ +', theme_linktree(), ' + + + + + + '; + + // This is used to alternate the color of the background. + $alternate = true; + + // For every member display their name, time and action (and more for admin). + foreach ($context['members'] as $member) + { + // $alternate will either be true or false. If it's true, use "windowbg2" and otherwise use "windowbg". + echo ' + + + + + '; + + // Switch alternate to whatever it wasn't this time. (true -> false -> true -> false, etc.) + $alternate = !$alternate; + } + + echo ' + + + +
    ', $txt['who_user'], ' ', $context['sort_by'] == 'user' ? '' : '', '', $txt['who_time'], ' ', $context['sort_by'] == 'time' ? '' : '', '', $txt['who_action'], '
    '; + + // Guests don't have information like icq, msn, y!, and aim... and they can't be messaged. + if (!$member['is_guest']) + { + echo ' +
    + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $member['online']['text'] . '' : $member['online']['text'], $context['can_send_pm'] ? '' : '', ' + ', $member['icq']['link'], ' ', $member['msn']['link'], ' ', $member['yim']['link'], ' ', $member['aim']['link'], ' +
    '; + } + + echo ' + ', $member['is_guest'] ? $member['name'] : '' . $member['name'] . '', ''; + + if (!empty($member['ip'])) + echo ' + (' . $member['ip'] . ')'; + + echo ' +
    ', $member['time'], '', $member['action'], '
    ', $txt[139], ': ', $context['page_index'], '
    '; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/Wireless.template.php b/Themes/fixed/Wireless.template.php new file mode 100644 index 0000000..f2b73f5 --- /dev/null +++ b/Themes/fixed/Wireless.template.php @@ -0,0 +1,498 @@ + + +'; +} + +// This is the board index (main page) in WAP 1.1. +function template_wap_boardindex() +{ + global $context, $settings, $options, $scripturl; + + // This is the "main" card... + echo ' + +

    ', $context['forum_name'], '

    '; + + // Show an anchor for each category. + foreach ($context['categories'] as $category) + echo ' +

    ', $category['name'], '

    '; + + // Okay, that's it for the main card. + echo ' +
    '; + + // Now fill out the deck of cards with the boards in each category. + foreach ($context['categories'] as $category) + { + // Begin the card, and make the name available. + echo ' + +

    ', $category['name'], '

    '; + + // Now show a link for each board. + foreach ($category['boards'] as $board) + echo ' +

    ', $board['name'], '

    '; + + echo ' +
    '; + } +} + +// This is the message index (list of topics in a board) for WAP 1.1. +function template_wap_messageindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + +

    ', $context['name'], '

    +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + + if (isset($context['boards']) && count($context['boards']) > 0) + { + foreach ($context['boards'] as $board) + echo ' +

    - ' . $board['name'] . '

    '; + echo ' +


    '; + } + + if (!empty($context['topics'])) + foreach ($context['topics'] as $topic) + echo ' +

    ' . $topic['first_post']['subject'] . ' - ' . $topic['first_post']['member']['name'] . '

    '; + + echo ' +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    +
    '; +} + +function template_wap_display() +{ + global $context, $settings, $options, $txt; + + echo ' + +

    ' . $context['subject'] . '

    +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + while ($message = $context['get_message']()) + { + // This is a special modification to the post so it will work on phones: + $wireless_message = strip_tags(str_replace(array('
    ', '
    ', '
    '), '
    ', $message['body']), '
    '); + + echo ' +

    ' . $message['member']['name'] . ':

    +

    ' . $wireless_message . '

    '; + } + echo ' +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    + '; +} + +function template_wap_error() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + +

    ' . $context['error_title'] . '

    +

    ' . $context['error_message'], '

    +

    ', $txt['wireless_error_home'], '

    +
    '; +} + +function template_wap_below() +{ + global $context, $settings, $options; + + echo ' +'; +} + +// The cHTML protocol used for i-mode starts here. +function template_imode_above() +{ + global $context, $settings, $options; + + echo ' + + + + ', $context['page_title'], ' + + '; +} + +function template_imode_boardindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + '; + $count = 0; + foreach ($context['categories'] as $category) + { + echo ' + '; + foreach ($category['boards'] as $board) + { + $count++; + echo ' + '; + } + } + echo ' + '; + if ($context['user']['is_guest']) + echo ' + '; + else + echo ' + '; + echo ' +
    ' . $context['forum_name'] . '
    ' . $category['name'] . '
    ' . ($board['new'] ? '' : '') . ($count < 10 ? '&#' . (59105 + $count) . '; ' : '- ') . ($board['new'] ? '' : '') . '' . $board['name'] . '
    ', $txt['wireless_options'], '
    ', $txt['wireless_options_login'], '
    ', $txt['wireless_options_logout'], '
    '; +} + +function template_imode_messageindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + '; + + if (!empty($context['boards'])) + { + echo ' + '; + foreach ($context['boards'] as $board) + echo ' + '; + } + + $count = 0; + if (!empty($context['topics'])) + { + echo ' + + '; + foreach ($context['topics'] as $topic) + { + $count++; + echo ' + '; + } + } + echo ' + + ' . (!empty($context['links']['next']) ? ' + ' : '') . (!empty($context['links']['prev']) ? ' + ' : '') . ($context['can_post_new'] ? ' + ' : '') . ' +
    ' . $context['name'] . '
    ' . $txt['parent_boards'] . '
    ' . ($board['new'] ? '- ' : '- ') . '' . $board['name'] . '
    ' . $txt[64] . '
    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '
    ' . ($count < 10 ? '&#' . (59105 + $count) . '; ' : '') . '' . $topic['first_post']['subject'] . '' . ($topic['new'] && $context['user']['is_logged'] ? ' [' . $txt[302] . ']' : '') . '
    ', $txt['wireless_navigation'], '
    ' . $txt['wireless_navigation_up'] . '
    ' . $txt['wireless_navigation_next'] . '
    [*] ' . $txt['wireless_navigation_prev'] . '
    ' . $txt[33] . '
    '; +} + +function template_imode_display() +{ + global $context, $settings, $options, $scripturl, $board, $txt; + + echo ' + + + '; + while ($message = $context['get_message']()) + { + // This is a special modification to the post so it will work on phones: + $wireless_message = strip_tags(str_replace(array('
    ', '
    ', '
    '), '
    ', $message['body']), '
    '); + + echo ' +
    '; + } + echo ' + + ' . (!empty($context['links']['next']) ? ' + ' : '') . (!empty($context['links']['prev']) ? ' + ' : '') . ($context['can_reply'] ? ' + ' : '') . ' +
    ' . $context['subject'] . '
    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '
    ' . ($message['first_new'] ? ' + ' : '') . ' + ' . $message['member']['name'] . ':
    + ' . $wireless_message . ' +
    ', $txt['wireless_navigation'], '
    ' . $txt['wireless_navigation_index'] . '
    ' . $txt['wireless_navigation_next'] . '
    ' . $txt['wireless_navigation_prev'] . '
    ' . $txt[146] . '
    '; +} + +function template_imode_post() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + ' . ($context['locked'] ? ' + ' : '') . (isset($context['name']) ? ' + + ' : '') . (isset($context['email']) ? ' + + ' : '') . ' + + + + + + +
    ' . $txt['smf287'] . '
    ' . (isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) ? '' . $txt[35] . '' : $txt[35]) . ':
    ' . (isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? '' . $txt[69] . '' : $txt[69]) . ':
    ' . (isset($context['post_error']['no_subject']) ? '' . $txt[70] . '' : $txt[70]) . ':
    ' . (isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? '' . $txt[72] . '' : $txt[72]) . ':
    + + + + + ' . (isset($context['current_topic']) ? ' + ' : '') . ' + +
    +  ' . (isset($context['current_topic']) ? '' . $txt['wireless_navigation_topic'] . '' : '' . $txt['wireless_navigation_index'] . '') . ' +
    +
    '; +} + +function template_imode_login() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + '; + if (isset($context['login_error'])) + echo ' + '; + echo ' + + + + + + + +
    ' . $txt[34] . '
    ' . $context['login_error'] . '
    ' . $txt[35] . ':
    ' . $txt[36] . ':
    ' . $txt['wireless_navigation'] . '
    [0] ' . $txt['wireless_navigation_up'] . '
    +
    '; +} + +function template_imode_error() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + +
    ' . $context['error_title'] . '
    ' . $context['error_message'], '
    [0] ' . $txt['wireless_error_home'] . '
    '; +} + +function template_imode_below() +{ + global $context, $settings, $options; + + echo ' + +'; +} + +// XHTMLMP (XHTML Mobile Profile) templates used for WAP 2.0 start here +function template_wap2_above() +{ + global $context, $settings, $options; + + echo ' + + + + ', $context['page_title'], ' + + + '; +} + +function template_wap2_boardindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +

    ' . $context['forum_name'] . '

    '; + + $count = 0; + foreach ($context['categories'] as $category) + { + echo ' +

    ' . ($category['can_collapse'] ? '' : '') . $category['name'] . ($category['can_collapse'] ? '' : '') . '

    '; + foreach ($category['boards'] as $board) + { + $count++; + echo ' +

    ' . ($board['new'] ? '' : '') . ($count < 10 ? '[' . $count . '] ' : '[-] ') . ($board['new'] ? '' : '') . '' . $board['name'] . '

    '; + } + } + + echo ' +

    ' . $txt['wireless_options'] . '

    '; + if ($context['user']['is_guest']) + echo ' +

    ' . $txt['wireless_options_login'] . '

    '; + else + echo ' +

    ' . $txt['wireless_options_logout'] . '

    '; +} + +function template_wap2_messageindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +

    ' . $context['name'] . '

    '; + + if (!empty($context['boards'])) + { + echo ' +

    ' . $txt['parent_boards'] . '

    '; + foreach ($context['boards'] as $board) + echo ' +

    ' . ($board['new'] ? '[-] ' : '[-] ') . '' . $board['name'] . '

    '; + } + + $count = 0; + if (!empty($context['topics'])) + { + echo ' +

    ' . $txt[64] . '

    +

    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + foreach ($context['topics'] as $topic) + { + $count++; + echo ' +

    ' . ($count < 10 ? '[' . $count . '] ' : '') . '' . $topic['first_post']['subject'] . '' . ($topic['new'] && $context['user']['is_logged'] ? ' [' . $txt[302] . ']' : '') . '

    '; + } + } + echo ' +

    ', $txt['wireless_navigation'], '

    +

    [0] ' . $txt['wireless_navigation_up'] . '

    ' . (!empty($context['links']['next']) ? ' +

    [#] ' . $txt['wireless_navigation_next'] . '

    ' : '') . (!empty($context['links']['prev']) ? ' +

    [*] ' . $txt['wireless_navigation_prev'] . '

    ' : '') . ($context['can_post_new'] ? ' +

    ' . $txt[33] . '

    ' : ''); +} + +function template_wap2_display() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +

    ' . $context['subject'] . '

    +

    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + $alternate = true; + while ($message = $context['get_message']()) + { + // This is a special modification to the post so it will work on phones: + $wireless_message = strip_tags(str_replace(array('
    ', '
    ', '
    '), '
    ', $message['body']), '
    '); + + echo ($message['first_new'] ? ' + ' : '') . ' +

    + ' . $message['member']['name'] . ':
    + ' . $wireless_message . ' +

    '; + $alternate = !$alternate; + } + echo ' +

    ' . $txt['wireless_navigation'] . '

    +

    [0] ' . $txt['wireless_navigation_index'] . '

    ' . (!empty($context['links']['next']) ? ' +

    [#] ' . $txt['wireless_navigation_next'] . '

    ' : '') . (!empty($context['links']['prev']) ? ' +

    [*] ' . $txt['wireless_navigation_prev'] . '

    ' : '') . ($context['can_reply'] ? ' +

    ' . $txt[146] . '

    ' : ''); +} + +function template_wap2_login() +{ + global $context, $settings, $options, $scripturl, $txt; + echo ' +
    +

    ' . $txt[34] . '

    '; + if (isset($context['login_error'])) + echo ' +

    ' . $context['login_error'] . '

    '; + echo ' +

    ' . $txt[35] . ':

    +

    +

    ' . $txt[36] . ':

    +

    +

    +

    ' . $txt['wireless_navigation'] . '

    +

    [0] ' . $txt['wireless_navigation_up'] . '

    +
    '; +} + +function template_wap2_post() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    +

    ' . $context['page_title'] . '

    ' . ($context['locked'] ? ' +

    + ' . $txt['smf287'] . ' +

    ' : '') . (isset($context['name']) ? ' +

    + ' . $txt[35] . ': +

    ' : '') . (isset($context['email']) ? ' +

    + ' . $txt[69] . ': +

    ' : '') . ' +

    + ' . $txt[70] . ': +

    +

    + ' . $txt[72] . ':
    + +

    +

    + + + + + ' . (isset($context['current_topic']) ? ' + ' : '') . ' + +

    +

    [0] ' . (isset($context['current_topic']) ? '' . $txt['wireless_navigation_topic'] . '' : '' . $txt['wireless_navigation_index'] . '') . '

    +
    '; +} + +function template_wap2_error() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +

    ' . $context['error_title'] . '

    +

    ' . $context['error_message'], '

    +

    [0] ' . $txt['wireless_error_home'] . '

    '; +} + +function template_wap2_below() +{ + global $context, $settings, $options; + + echo ' + +'; +} + +?> \ No newline at end of file diff --git a/Themes/fixed/fader.js b/Themes/fixed/fader.js new file mode 100644 index 0000000..b950c44 --- /dev/null +++ b/Themes/fixed/fader.js @@ -0,0 +1,72 @@ +// smfFadeIndex: the current item in smfFadeContent. +var smfFadeIndex = -1; +// smfFadePercent: percent of fade. (-64 to 510.) +var smfFadePercent = 510 +// smfFadeSwitch: direction. (in or out) +var smfFadeSwitch = false; +// smfFadeScroller: the actual div to mess with. +var smfFadeScroller = document.getElementById('smfFadeScroller'); +// The ranges to fade from for R, G, and B. (how far apart they are.) +var smfFadeRange = { + 'r': smfFadeFrom.r - smfFadeTo.r, + 'g': smfFadeFrom.g - smfFadeTo.g, + 'b': smfFadeFrom.b - smfFadeTo.b +}; + +// Divide by 10 because we are doing it 10 times per 1ms. +smfFadeDelay /= 10; + +// Start the fader! +window.setTimeout('smfFader()', 10); + +// Main fading function... called 10 times an ms. +function smfFader() +{ + if (smfFadeContent.length <= 1) + return; + + // Starting out? Set up the first item. + if (smfFadeIndex == -1) + { + setInnerHTML(smfFadeScroller, smfFadeBefore + smfFadeContent[0] + smfFadeAfter); + smfFadeIndex = 1; + } + + // Are we already done fading in? If so, fade out. + if (smfFadePercent >= 510) + smfFadeSwitch = !smfFadeSwitch; + // All the way faded out? + else if (smfFadePercent <= -64) + { + smfFadeSwitch = !smfFadeSwitch; + + // Go to the next item, or first if we're out of items. + setInnerHTML(smfFadeScroller, smfFadeBefore + smfFadeContent[smfFadeIndex++] + smfFadeAfter); + if (smfFadeIndex >= smfFadeContent.length) + smfFadeIndex = 0; + } + + // Increment or decrement the fade percentage. + if (smfFadeSwitch) + smfFadePercent -= 255 / smfFadeDelay; + else + smfFadePercent += 255 / smfFadeDelay; + + // If it's not outside 0 and 256... (otherwise it's just delay time.) + if (smfFadePercent < 256 && smfFadePercent > 0) + { + // Easier... also faster... + var tempPercent = smfFadePercent / 255; + + // Get the new R, G, and B. (it should be bottom + (range of color * percent)...) + var r = Math.ceil(smfFadeTo.r + smfFadeRange.r * tempPercent); + var g = Math.ceil(smfFadeTo.g + smfFadeRange.g * tempPercent); + var b = Math.ceil(smfFadeTo.b + smfFadeRange.b * tempPercent); + + // Set the color in the style, thereby fading it. + smfFadeScroller.style.color = 'rgb(' + r + ', ' + g + ', ' + b + ')'; + } + + // Keep going... + window.setTimeout('smfFader()', 10); +} \ No newline at end of file diff --git a/Themes/fixed/fonts-compat.css b/Themes/fixed/fonts-compat.css new file mode 100644 index 0000000..a58f0ae --- /dev/null +++ b/Themes/fixed/fonts-compat.css @@ -0,0 +1,16 @@ +body, td, .normaltext, .windowbg, .windowbg2, .titlebg, .bordercolor, .tborder, .catbg, .catbg2, .windowbg td, .windowbg2 td, .titlebg td +{ + font-size: x-small; +} +.smalltext, td.smalltext, i.smalltext, div.smalltext, .smalltext td, .quote, .quoteheader, .codeheader +{ + font-size: xx-small; +} +.largetext +{ + font-size: medium; +} +.code +{ + font-size: xx-small; +} \ No newline at end of file diff --git a/Themes/fixed/help/help.css b/Themes/fixed/help/help.css new file mode 100644 index 0000000..93ef7db --- /dev/null +++ b/Themes/fixed/help/help.css @@ -0,0 +1,84 @@ +body, td +{ + font-family: verdana, arial, helvetica, sans-serif; + font-size: 12px; +} +body +{ + margin: 20px; + line-height: 1.5; +} +h1, h2, h3, h4, h5, h6 +{ + font-family: arial, helvetica, sans-serif; +} +h1, h2 +{ + font-size: 18px; + margin-bottom: 0.5em; +} +h3, h4, h5, h6 +{ + font-size: 16px; + margin: 0; +} +p +{ + margin: 0 0 1.5em 0; +} +a:link, a:visited, a:active, a:hover +{ + color: #0000cc; + background-color : transparent; +} +.board, .board:link +{ + color: #000000; + text-decoration: underline; +} +.board:visited, .board:hover +{ + color: #323232; + text-decoration: underline; +} +div.footer +{ + text-align: center; + color: #6f6f6f; + padding: 3pt; +} +.smalltext +{ + font-size: 10px; +} +#menu +{ + line-height: 1; +} +#menu p +{ + margin: 0 0 1em 0; + line-height: 2; +} +table#reference1, table#reference2 +{ + border: 1px solid #cccccc; +} +table#reference1 td, table#reference2 td +{ + vertical-align: top; + background-color: #efefef; + border: 1px solid #cccccc; +} +th +{ + color: white; + background-color: #6b8eae; + border: 1px solid #6b8eae; + font-weight: bold; + text-align: left; +} +ol.la +{ + list-style-type: lower-alpha; +} \ No newline at end of file diff --git a/Themes/fixed/help/index.english.html b/Themes/fixed/help/index.english.html new file mode 100644 index 0000000..7757b16 --- /dev/null +++ b/Themes/fixed/help/index.english.html @@ -0,0 +1,382 @@ + + + + + + + + + SMF User Help: Introduction + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Introduction


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    So you've arrived at this Simple Machines Forum (SMF)! Perhaps you've been looking at the board index or a screen telling you that you need to register before you can read it and you're wondering what to do next?

    +

    Well, some forums permit guests to read and post, some permit guests to read only and some are restricted to registered members. We'd recommend registering at any forum that you see yourself using regularly because many of the most useful features will only become available to you when you do so. Since SMF, however, is such a flexible system that few forums are likely to be identical, we will start by describing four key areas that we'd normally expect to be there for you:

    +
      +
    1. The Main Menu
    2. +
    3. The Board Index
    4. +
    5. The Message Index
    6. +
    7. The Topic
    8. +
    +

    The Main Menu

    +

    Supposing you've arrived here as a guest (or have registered but are currently logged out), the main menu (which appears on every page) should normally comprise five or six buttons (or text links):

    +
      +
    • Home, which takes you back to the board index.
    • +
    • Help, which brings you to this guide.
    • +
    • Search, which allows you to search the forums for whatever you're looking for.
    • +
    • Calendar, which links to the forum calendar (if enabled).
    • +
    • Login, which allows you to login if already registered.
    • +
    • Register, which allows you to register (or sometimes apply for registration) when you wish to do so.
    • +
    +

    Once you've registered and logged in, however, the main menu should look a little different:

    +
      +
    • Home (as before).
    • +
    • Help (as before).
    • +
    • Search (as before).
    • +
    • Profile, which allows you to make changes to your profile settings.
    • +
    • Calendar (as before).
    • +
    • Logout, which allows you to logout again if desired.
    • +
    +

    Forum administrators should also note the presence of an additional Admin button.

    +

    The Board Index

    +

    While the board index (forum home page) is packed with all kinds of information and links, the core of the interface (at least in the SMF default theme) normally looks something like this:

    +
    +
    + + + + +
    +  Forum Name
    +
    + + + + + + + + + + +
    -  Category Name
    New PostsBoard Name
    + Board Description
    Number of topics and posts in this boardDate, time, subject and author of last post
    +

    +
    + + + + + +
      New Posts  No New PostsMark ALL messages as read
    +

    +
    +

    +
      +
    • The forum name links back to the top of the board index.
    • +
    • If the category is collapsable (shown by the little arrow symbol), clicking the category name collapses or expands the category as appropriate.
    • +
    • The board name links to the message index for that board.
    • +
    • The board description describes the board's content, and may also include links to child boards and/or specify the board's moderator(s).
    • +
    • The New Posts and No New Posts icons in the leftmost column show registered members whether there have been any new posts to the board since they last read it.
    • +
    • The Mark as Read button enables registered members to mark all posts in the entire forum as 'read'.
    • +
    +

    The Message Index

    +

    Like the board index, the message index interface is quite straightforward when reduced to its essential components:

    +
    +
    + + + + + +
    +  Forum Name
    + |- +  Category Name
    + | |- +  Board Name
    + + + + +
    + + + + + +
    Pages: [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + + + + + + + + + + + + + +
    SubjectStarted byRepliesViewsLast post  
    Topic Subject NewTopic Starter00Date, time and author of last post
    + + + + +
    + + + + + +
    Pages: [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + +
      Topic you have posted in
    +   Normal Topic
    +   Hot Topic (More than 15 Replies)
    +   Very Hot Topic (More than 25 Replies)
      Locked Topic
    +   Sticky Topic
    +   Poll
    +
    + :   +
    +

    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • The page numbers link to further pages of the board, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page.
    • +
    • The Mark as Read button enables registered members to mark all posts in this board as 'read'.
    • +
    • The Notify button enables registered members to subscribe to email notification of replies to topics in this board.
    • +
    • The New Topic and New Poll buttons are for starting new topics and polls, as described in the posting help.
    • +
    • The Subject, Started by, Replies, Views and Last post links enable you to sort the columns by these parameters (with Last post also toggling between descending and ascending order as indicated by the little arrow).
    • +
    • The topic icons in the leftmost column are explained by the key below.
    • +
    • The post icons in the next column are sometimes used to draw attention to the mood or purpose of the topic.
    • +
    • The topic subject links to the start of the topic, with extra links for subsequent pages and new buttons to take registered members straight to their first unread post of the topic.
    • +
    • Where the topic has been started or last replied to by a registered member, their names link to their respective profiles.
    • +
    • The Jump to menu provides a convenient quick method of navigating the forum.
    • +
    +

    The Topic

    +

    Sometimes referred to as threads, topics are where you find the actual messages:

    +
    +
    + + + + +
    +  Forum Name
    + |- +  Category Name
    + | |- +  Board Name
    + | | |- +  Topic Subject
    + + + + +
    + + + + + +
    Pages: [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    + + + + + +
     AuthorTopic: Topic Subject  (Read x times)
    + + + + +
    + + + + +
    + + + + + + + + +
    Author
    + Member Group
    + Post Group
    + *
    + Post Count
    +
    +
    +
    + View Profile Email Personal Message (Offline)
    + + + + + + +
    + Topic Subject +
    + « Date and Time of Post » +
    +
    Reply with quote
    +
    +
    + Here is the text of the message, which is ultimately what we're all here for! Smiley +
    +
    + + + + +
    Report to moderator     Logged
    +
    +
    +
    + + + + +
    + + + + + +
    Pages: [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    +
    +
    +
    + :   +
    +

    +
    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • Some forums may also be configured with previous and next topic links.
    • +
    • The page numbers link to further pages of the topic, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page.
    • +
    • The Reply button enables you to reply to the topic.
    • +
    • The Notify button enables registered members to subscribe to email notification of replies to the topic.
    • +
    • The Mark Unread button enables registered members to mark the topic as 'unread', which means that it will still be listed as new and can be effectively 'saved for later'. Note that this button changes to Add Poll in the bottom button set for users with permission to add polls to existing topics.
    • +
    • The Send Topic button enables registered members to send a link to the topic by email.
    • +
    • The Print button creates a simplified, printer-friendly rendering of the page.
    • +
    • The author name links to the author's profile
    • +
    • The author details in the lefthand column may be accompanied by further personal information.
    • +
    • The topic subject links back to the start of the topic.
    • +
    • The Quote button enables you to quote the post.
    • +
    • Further Modify and Delete options are normally provided to enable registered members to edit their own posts.
    • +
    • Report to moderator enables you to report abusive or wrongly-placed posts to the forum staff.
    • +
    • Logged indicates that the IP of the author has been logged. The actual IP is only available to board administrators
    • +
    • The Jump to menu provides a convenient quick method of navigating the forum.
    • +
    + + + \ No newline at end of file diff --git a/Themes/fixed/help/index.english.xml b/Themes/fixed/help/index.english.xml new file mode 100644 index 0000000..cfab7c4 --- /dev/null +++ b/Themes/fixed/help/index.english.xml @@ -0,0 +1,177 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Introduction + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + So you've arrived at this Simple Machines Forum (SMF)! Perhaps you've been looking at the board index or a screen telling you that you need to register before you can read it and you're wondering what to do next? + Well, some forums permit guests to read and post, some permit guests to read only and some are restricted to registered members. We'd recommend registering at any forum that you see yourself using regularly because many of the most useful features will only become available to you when you do so. Since SMF, however, is such a flexible system that few forums are likely to be identical, we will start by describing four key areas that we'd normally expect to be there for you: + +
    + The Main Menu + Supposing you've arrived here as a guest (or have registered but are currently logged out), the main menu (which appears on every page) should normally comprise five or six buttons (or text links): + + Home, which takes you back to the board index. + Help, which brings you to this guide. + Search, which allows you to search the forums for whatever you're looking for. + Calendar, which links to the forum calendar (if enabled). + Login, which allows you to login if already registered. + Register, which allows you to register (or sometimes apply for registration) when you wish to do so. + + Once you've registered and logged in, however, the main menu should look a little different: + + Home (as before). + Help (as before). + Search (as before). + Profile, which allows you to make changes to your profile settings. + Calendar (as before). + Logout, which allows you to logout again if desired. + + Forum administrators should also note the presence of an additional Admin button. +
    +
    + The Board Index + While the board index (forum home page) is packed with all kinds of information and links, the core of the interface (at least in the SMF default theme) normally looks something like this: + + + Forum Name + Category Name + Board Name + Board Description + Number of topics and posts in this board + Date, time, subject and author of last post + New Posts + No New Posts + Mark ALL messages as read + + + The forum name links back to the top of the board index. + If the category is collapsable (shown by the little arrow symbol), clicking the category name collapses or expands the category as appropriate. + The board name links to the message index for that board. + The board description describes the board's content, and may also include links to child boards and/or specify the board's moderator(s). + The New Posts and No New Posts icons in the leftmost column show registered members whether there have been any new posts to the board since they last read it. + The Mark as Read button enables registered members to mark all posts in the entire forum as 'read'. + +
    +
    + The Message Index + Like the board index, the message index interface is quite straightforward when reduced to its essential components: + + + Pages + Mark Topics as Read for this Board + Are you sure you wish to enable notification of new topics for this board? + Notify of Replies + Start new topic + Post New Poll + Subject + Started by + Replies + Views + Last post + Topic Subject + New + Topic Starter + Date, time and author of last post + Topic you have posted in + Normal Topic + Hot Topic (More than 15 Replies) + Very Hot Topic (More than 25 Replies) + Locked Topic + Sticky Topic + Poll + Jump to + Please select a destination + Another Board + go + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + The page numbers link to further pages of the board, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page. + The Mark as Read button enables registered members to mark all posts in this board as 'read'. + The Notify button enables registered members to subscribe to email notification of replies to topics in this board. + The New Topic and New Poll buttons are for starting new topics and polls, as described in the posting help. + The Subject, Started by, Replies, Views and Last post links enable you to sort the columns by these parameters (with Last post also toggling between descending and ascending order as indicated by the little arrow). + The topic icons in the leftmost column are explained by the key below. + The post icons in the next column are sometimes used to draw attention to the mood or purpose of the topic. + The topic subject links to the start of the topic, with extra links for subsequent pages and new buttons to take registered members straight to their first unread post of the topic. + Where the topic has been started or last replied to by a registered member, their names link to their respective profiles. + The Jump to menu provides a convenient quick method of navigating the forum. + +
    +
    + The Topic + Sometimes referred to as threads, topics are where you find the actual messages: + + + Reply + Are you sure you wish to enable notification of new replies for this topic? + Mark unread + Send this topic + Print + Author + Topic + Read x times + View the profile of Author + Member Group + Post Group + Post Count + Date and Time of Post + Reply with quote + Here is the text of the message, which is ultimately what we're all here for! + Smiley + Report to moderator + Logged + View Profile + Email + Personal Message (Offline) + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + Some forums may also be configured with previous and next topic links. + The page numbers link to further pages of the topic, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page. + The Reply button enables you to reply to the topic. + The Notify button enables registered members to subscribe to email notification of replies to the topic. + The Mark Unread button enables registered members to mark the topic as 'unread', which means that it will still be listed as new and can be effectively 'saved for later'. Note that this button changes to Add Poll in the bottom button set for users with permission to add polls to existing topics. + The Send Topic button enables registered members to send a link to the topic by email. + The Print button creates a simplified, printer-friendly rendering of the page. + The author name links to the author's profile + The author details in the lefthand column may be accompanied by further personal information. + The topic subject links back to the start of the topic. + The Quote button enables you to quote the post. + Further Modify and Delete options are normally provided to enable registered members to edit their own posts. + Report to moderator enables you to report abusive or wrongly-placed posts to the forum staff. + Logged indicates that the IP of the author has been logged. The actual IP is only available to board administrators + The Jump to menu provides a convenient quick method of navigating the forum. + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/fixed/help/index.russian.html b/Themes/fixed/help/index.russian.html new file mode 100644 index 0000000..3f3ccc0 --- /dev/null +++ b/Themes/fixed/help/index.russian.html @@ -0,0 +1,414 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    ! Simple + Machines Forum (SMF)! + , , + ?

    +

    ... + , + . , + , + . , + + SMF:

    +
      +
    1. +
    2. +
    3. +
    4. +
    +

    +

    , + . ( + ) 5 6 :

    +
      +
    • .
    • +
    • - ... - ... !!!! +
    • .
    • +
    • - ( ).
    • +
    • , + .
    • +
    • - ( + ).
    • +
    +

    , + :

    +
      +
    • ( ).
    • +
    • ( ).
    • +
    • ( ).
    • +
    • .
    • +
    • ( ).
    • +
    • , .
    • +
    +

    , + . +

    +

    +

    , + :

    +
    +
    + + + + +
    + 
    +
    + + + + + + + + + + +
    - 
    New Posts
    +
    , ,
    +

    +
    + + + + + +
      s  Mark ALL messages as read
    +

    +
    +

    +

    . + : " " " ". " " - , " " - (: "Board") .
    + : " " " ". " + " - , " " - + ( , ) + .

    +
      +
    • - .
    • +
    • ( ), , ( ) .
    • +
    • - .
    • +
    • . , .
    • +
    • , .
    • +
    • "New" .
    • +
    +

    +

    , , , :

    +
    +
    + + + + + +
    + 
    + |- + 
    + | |- + 
    + + + + +
    + + + + + +
    : [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + + + + + + + + + + + + + +
     
    New 00,
    + + + + +
    + + + + + +
    : [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + +
     
    +  
    +   ( 15 )
    +   ( 25 )
     
    +   ( )
    +  
    +
    + :   +
    +

    +
    +

    +
      +
    • ( ) + , .
    • +
    • - , , .
    • +
    • "New" .
    • +
    • e-mail .
    • +
    • , , .
    • +
    • , , , ( , , , ).
    • +
    • .
    • +
    • .
    • +
    • New, .
    • +
    • ( ) , .
    • +
    • .
    • +
    +

    +

    , , , - + , :

    +
    +
    + + + + +
    + 
    + |- + 
    + | |- + 
    + | | |- + 
    + + + + +
    + + + + + +
    : [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    + + + + + +
     :  ( x )
    + + + + +
    + + + + +
    + + + + + + + + +

    +
    +
    + *
    +
    +
    +
    +
    + View Profile Email Personal Message (Offline)
    + + + + + + +
    + +
    + « » +
    +
    Reply with quote
    +
    +
    + , , , , , ! Smiley +
    +
    + + + + +
        
    +
    +
    +
    + + + + +
    + + + + + +
    : [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    +
    +
    +
    + :   +
    +

    +
    +
    +

    +
      +
    • , .
    • +
    • ( - ) .
    • +
    • - , , .
    • +
    • (, ?).
    • +
    • e-mail .
    • +
    • "New" + , , + "" , + . , + + + .
    • +
    • .
    • +
    • - + , .
    • +
    • - .
    • +
    • , .
    • +
    • , .
    • +
    • .
    • +
    • .
    • +
    • / .
    • +
    • , IP . IP .
    • +
    • .
    • +
    + + + diff --git a/Themes/fixed/help/index.xslt b/Themes/fixed/help/index.xslt new file mode 100644 index 0000000..8ae28dc --- /dev/null +++ b/Themes/fixed/help/index.xslt @@ -0,0 +1,496 @@ + + + + +
    +
    + + + + +
    + + +  + + +
    + + +
    + + + + + + + + + + +
    + -  + + + +
    + + + + + + + + + + + +
    + +
    + + + + + +
    +
    +
    +
    + + + + + +
    +   + +   + + + + + {alt-mark-as-read} +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + + + +
    + + +  + +
    + |- + +  + +
    + | + |- + +  + +
    +
    + + + + +
    + + + + + +
    : [1] + + + {alt-mark-as-read} + + {alt-notify} + + {alt-new-topic} + + {alt-new-poll} +
    +
    + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + +   + +
    + + + + + + + + {alt-new} + + + + + 00 + + + +
    + + + + +
    + + + + + +
    : [1] + + + {alt-mark-as-read} + + {alt-notify} + + {alt-new-topic} + + {alt-new-poll} +
    +
    + + + + + + +
    +   + +
    +   + +
    +   + +
    +   + +
    +   + +
    +   + +
    +   + +
    +
    + : +   + + + + + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + +
    + + +  +
    + |- + +  +
    + | + |- + +  +
    + | + | + |- + +  + +
    +
    + + + + +
    + + + + + +
    + : [1] + + + + {alt-reply} + + {//alt-notify} + + {alt-mark-unread} + + {alt-send-topic} + + {alt-print} +
    +
    + + + + + +
    +   + + :  () +
    + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + +
    + + +
    + +
    + * +
    + +
    +
    +
    +
    + + + + + + {alt-view-profile} + + + + + {alt-email} + + + + + {alt-pm} +
    +
    + + + + + + +
    + + +
    « »
    +
    + + + {alt-reply-with-quote} +
    +
    +
    +  {alt-smiley} +
    +
    + + + + +
    + + +    +   + +
    +
    +
    +
    + + + + + +
    + + + + + +
    + : [1] + + + + {alt-reply} + + {//alt-notify} + + {alt-mark-unread} + + {alt-send-topic} + + {alt-print} +
    +
    +
    +
    +
    + : +   + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/fixed/help/loginout.english.html b/Themes/fixed/help/loginout.english.html new file mode 100644 index 0000000..a75cf4a --- /dev/null +++ b/Themes/fixed/help/loginout.english.html @@ -0,0 +1,145 @@ + + + + + + + + + SMF User Help: Logging In and Out + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Logging In and Out


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    Once you have completed the registration process, you will be able to login to the site for the first time. After that, you can choose whether to stay logged in indefinitely or logout at the end of your visit.

    +
      +
    1. + Logging In +
        +
      1. The Login Screen
      2. +
      3. The Quick Login
      4. +
      +
    2. +
    3. Logging Out
    4. +
    5. Password Reminder
    6. +
    +

    Logging In

    +

    So you might be newly registered or you might simply have been logged out from a previous visit, but there's normally a choice between the login screen and the quick login in either case.

    +

    The Login Screen

    +

    Since this screen (accessed from the Login option of the main menu) is not only where you'll normally be taken on completing registration but also the first thing you'll see in any 'members only' forum, we will describe it first:

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Login
    Username:
    Password:
    Minutes to stay logged in:
    Always stay logged in:
    Forgot your password?
    +
    +

    +

    While the Username and Password fields should be self-explanatory, Minutes to stay logged in simply means the number of minutes the cookie that keeps you logged in will last before expiring and requiring you to login again. So it's not advisable to enter a long time here if you share a computer and are likely to forget to logout, but you might prefer to check Always stay logged in if no-one else has access to your computer.

    +

    The Quick Login

    +

    Although many forums also have a quick login box to allow you to login direct from any screen, its position on the page may vary considerably from forum to forum. In the SMF default theme, for example, it's in the collapsable section at the top, whereas it's more likely to be at the bottom in themes based on the older YaBB SE forum. If you can't see it and it hasn't simply been collapsed, it's either not enabled at all (in which case you should still be able to access the login screen from the main menu) or you're already logged in (in which case the main menu should include a Logout rather than Login link!).

    + + + + +
    + + + + +
    +
    +
    + Login with username, password and session length +
    +
    +

    +

    To use the quick login box, enter your username and password, select your session length from the drop-down menu and click Login. Please note that Forever, like Always stay logged in, simply means that the computer should remember you until you next choose to logout, and not that you actually need to be online all of that time!

    +

    Logging Out

    +

    When you have finished browsing the forum, you may decide to logout. Perhaps you share a workstation with someone else, in which case leaving yourself logged in would not be a good idea. So select the Logout option from the main menu and the forum should log you out, turning you into an instant guest, clearing your name from the list of users online and safeguarding your forum identity until you choose to login again.

    +

    Password Reminder

    +

    If you're trying to login to the forum but have forgetten or lost your password, you can retrieve it with the lost password tool by following the Forgot your password? link from the login screen.

    +
    + + + + + + + + + + + + + + + + + +
    Password reminder
    Username/email: 
    by Userby Email
    Ask me my question
    You can't retrieve your password, but you can set a new one by following a link sent to you by email. You also have the option of setting a new password by answering your secret question.
    +
    +

    You can enter either your username or your email address so long as you check the appropriate option, then click the Send button to send yourself an email containing a link to reset your password. It's also possible to avoid the email altogether if you've set yourself a secret question and answer in your profile, but please beware of questions that anyone could answer or guess (like 'what is the first color of the rainbow?', which would be a very bad choice)!

    + + + \ No newline at end of file diff --git a/Themes/fixed/help/loginout.english.xml b/Themes/fixed/help/loginout.english.xml new file mode 100644 index 0000000..d6980fc --- /dev/null +++ b/Themes/fixed/help/loginout.english.xml @@ -0,0 +1,79 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Logging In and Out + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + Once you have completed the registration process, you will be able to login to the site for the first time. After that, you can choose whether to stay logged in indefinitely or logout at the end of your visit. + +
    + Logging In + So you might be newly registered or you might simply have been logged out from a previous visit, but there's normally a choice between the login screen and the quick login in either case. + + The Login Screen + Since this screen (accessed from the Login option of the main menu) is not only where you'll normally be taken on completing registration but also the first thing you'll see in any 'members only' forum, we will describe it first: + + + Login + Username + Password + Minutes to stay logged in + Always stay logged in + Forgot your password + + While the Username and Password fields should be self-explanatory, Minutes to stay logged in simply means the number of minutes the cookie that keeps you logged in will last before expiring and requiring you to login again. So it's not advisable to enter a long time here if you share a computer and are likely to forget to logout, but you might prefer to check Always stay logged in if no-one else has access to your computer. + + + The Quick Login + Although many forums also have a quick login box to allow you to login direct from any screen, its position on the page may vary considerably from forum to forum. In the SMF default theme, for example, it's in the collapsable section at the top, whereas it's more likely to be at the bottom in themes based on the older YaBB SE forum. If you can't see it and it hasn't simply been collapsed, it's either not enabled at all (in which case you should still be able to access the login screen from the main menu) or you're already logged in (in which case the main menu should include a Logout rather than Login link!). + + + 1 Hour + 1 Day + 1 Week + 1 Month + Forever + Login with username, password and session length + + To use the quick login box, enter your username and password, select your session length from the drop-down menu and click Login. Please note that , like Always stay logged in, simply means that the computer should remember you until you next choose to logout, and not that you actually need to be online all of that time! + +
    +
    + Logging Out + When you have finished browsing the forum, you may decide to logout. Perhaps you share a workstation with someone else, in which case leaving yourself logged in would not be a good idea. So select the Logout option from the main menu and the forum should log you out, turning you into an instant guest, clearing your name from the list of users online and safeguarding your forum identity until you choose to login again. +
    +
    + Password Reminder + If you're trying to login to the forum but have forgetten or lost your password, you can retrieve it with the lost password tool by following the Forgot your password? link from the login screen. + + + Password reminder + Username/email + Send + by User + by Email + Ask me my question + You can't retrieve your password, but you can set a new one by following a link sent to you by email. You also have the option of setting a new password by answering your secret question. + + You can enter either your username or your email address so long as you check the appropriate option, then click the Send button to send yourself an email containing a link to reset your password. It's also possible to avoid the email altogether if you've set yourself a secret question and answer in your profile, but please beware of questions that anyone could answer or guess (like 'what is the first color of the rainbow?', which would be a very bad choice)! +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/fixed/help/loginout.russian.html b/Themes/fixed/help/loginout.russian.html new file mode 100644 index 0000000..7777fc8 --- /dev/null +++ b/Themes/fixed/help/loginout.russian.html @@ -0,0 +1,147 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    , . , .

    +
      +
    1. + +
        +
      1. +
      2. +
      +
    2. +
    3. +
    4. ?
    5. +
    +

    +

    , - , .

    +

    +

    , , - , , , :

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
    :
    :
    ( ):
    :
    ?
    +
    +

    +

    , -. , , , . , . , , .

    +

    +

    , . SMF . , - , , .

    + + + + +
    + + + + +
    +
    +
    + +
    +
    +

    +

    , . , , , , , , .

    +

    +

    , , , . , - . , Online , .

    +

    ?

    +

    , - , + + - ? .

    +
    + + + + + + + + + + + + + + + + + +
    /E-mail: 
    User Email
    , . , .
    +
    +

    , e-mail, . , e-mail . , , , ( ? ).

    + + + diff --git a/Themes/fixed/help/loginout.xslt b/Themes/fixed/help/loginout.xslt new file mode 100644 index 0000000..0cde8b0 --- /dev/null +++ b/Themes/fixed/help/loginout.xslt @@ -0,0 +1,144 @@ + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +   + +
    + : +
    + : + + +
    + : + + +
    + : + + +
    + + + + + +
    + + ? + +
    +
    +
    +
    +
    +
    + + + + + + +
    + + + + +
    +
    + + + + + + + + +
    + + +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + + + +
    + +
    + :  + + + + + + +
    + + + + + +
    + + +
    + +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/fixed/help/pm.english.html b/Themes/fixed/help/pm.english.html new file mode 100644 index 0000000..95495e7 --- /dev/null +++ b/Themes/fixed/help/pm.english.html @@ -0,0 +1,142 @@ + + + + + + + + + SMF User Help: Personal Message + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Personal Message


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    SMF is about community and communication. And there are many ways to communicate, such as posting to the boards, personal messaging, email, ICQ, AIM and YIM. But SMF's own personal message system, as available to registered members in most forums, is sometimes a more suitable option than any of these.

    +
      +
    1. + Personal Messaging +
        +
      1. Description
      2. +
      3. Reading Your Messages
      4. +
      +
    2. +
    3. + The PM Interface +
        +
      1. Starting or Replying to a Message
      2. +
      +
    4. +
    +

    Personal Messaging

    +

    Description

    +

    While email is a good way to correspond directly with members, it also has several drawbacks for forum purposes: you must open your email application to write and send the message, the recipient must open his/her email application and check his/her mail, your message will be mixed in with all the other mail and it can sometimes take several minutes to an hour for mail to reach the recipient.

    +

    As an alternative to email, SMF offers a faster, more private method. Personal messaging on the boards provides instantaneous delivery to the recipient's private mailbox. The mail is sent and received entirely through SMF, so neither you nor the recipient have to open another program or leave SMF. Personal messaging also offers both the sender and the recipient greater privacy because no-one's real email address is revealed. Personal messages show only the handle and name of both parties.

    +

    If a recipient isn't online, personal messages wait in the member's PM box until the next time he/she logs in and reads and/or deletes them. SMF Personal Messages is a self-contained, highly private email system.

    +

    Reading Your Messages

    +

    To read your personal messages, you need to be logged in, then follow the link that says something like 'Hey, [username], you have x messages, x are new'.

    +

    The PM Interface

    +

    The PM interface is similar in operation to that of the message index. While we are showing the inbox interface here, the outbox works in much the same way:

    +
    +
    + +
    + + + + +
    +  Forum Name
    + |- +  Personal Messages
    + | |- +  Inbox
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    Delete all messages in your Inbox Outbox New Message Check for new messages
    Date  SubjectFrom
    Date and time of messageMessage SubjectAnother Member
    + + + + +
    Pages: [1]
    +
    +

    +
    +
    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • The main Delete button deletes all messages in your inbox (or outbox if open). Note that the checkbox and lower Delete button also allow you to delete selected messages, with the top checkbox selecting all.
    • +
    • The Outbox button toggles to your outbox, where it obviously becomes an Inbox button.
    • +
    • The New Message button enables you to start a new message, which is similar to starting a new topic but adds 'To:' and 'Bcc:' (blind carbon copy) fields and the option to save to your outbox.
    • +
    • The Reload button checks for new messages by refreshing the page.
    • +
    • The Date, Subject, and From links enable you to sort the columns by these parameters (with Date also toggling between descending and ascending order as indicated by the little arrow).
    • +
    • The main subject title links to the start of the message, which will be further down the same page.
    • +
    • The page numbers link to further pages of messages as applicable.
    • +
    +

    Starting or Replying to a Message

    +

    There are actually several different ways to start a new personal message, but all require you to be logged in:

    +
      +
    • You can follow the link that says something like 'Hey, [username], you have x messages, x are new', then click the New Message button in your inbox.
    • +
    • You can click another member's name, followed by Send this member a personal message from his/her profile summary screen.
    • +
    • You can start a new message direct by clicking the IM on/offline icon from the user info accompanying all of his/her posts.
    • +
    • You can start a new message direct by clicking the PM on/offline icon from the Current Status in his/her profile summary screen. (This icon/link is often duplicated in the user info described above.)
    • +
    • Replying to a message is very similar to replying to a topic.
    • +
    + + + \ No newline at end of file diff --git a/Themes/fixed/help/pm.english.xml b/Themes/fixed/help/pm.english.xml new file mode 100644 index 0000000..6dc2bf7 --- /dev/null +++ b/Themes/fixed/help/pm.english.xml @@ -0,0 +1,84 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Personal Message + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + SMF is about community and communication. And there are many ways to communicate, such as posting to the boards, personal messaging, email, ICQ, AIM and YIM. But SMF's own personal message system, as available to registered members in most forums, is sometimes a more suitable option than any of these. + +
    + Personal Messaging + + Description + While email is a good way to correspond directly with members, it also has several drawbacks for forum purposes: you must open your email application to write and send the message, the recipient must open his/her email application and check his/her mail, your message will be mixed in with all the other mail and it can sometimes take several minutes to an hour for mail to reach the recipient. + As an alternative to email, SMF offers a faster, more private method. Personal messaging on the boards provides instantaneous delivery to the recipient's private mailbox. The mail is sent and received entirely through SMF, so neither you nor the recipient have to open another program or leave SMF. Personal messaging also offers both the sender and the recipient greater privacy because no-one's real email address is revealed. Personal messages show only the handle and name of both parties. + If a recipient isn't online, personal messages wait in the member's PM box until the next time he/she logs in and reads and/or deletes them. SMF Personal Messages is a self-contained, highly private email system. + + + Reading Your Messages + To read your personal messages, you need to be logged in, then follow the link that says something like 'Hey, [username], you have x messages, x are new'. + +
    +
    + The PM Interface + The PM interface is similar in operation to that of the message index. While we are showing the inbox interface here, the outbox works in much the same way: + + + Forum Name + Personal Messages + Inbox + Delete all messages in your Inbox + Outbox + New Message + Check for new messages + Date + Subject + From + Date and time of message + Another Member + Message Subject + Delete Selected + Pages + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + The main Delete button deletes all messages in your inbox (or outbox if open). Note that the checkbox and lower Delete button also allow you to delete selected messages, with the top checkbox selecting all. + The Outbox button toggles to your outbox, where it obviously becomes an Inbox button. + The New Message button enables you to start a new message, which is similar to starting a new topic but adds 'To:' and 'Bcc:' (blind carbon copy) fields and the option to save to your outbox. + The Reload button checks for new messages by refreshing the page. + The Date, Subject, and From links enable you to sort the columns by these parameters (with Date also toggling between descending and ascending order as indicated by the little arrow). + The main subject title links to the start of the message, which will be further down the same page. + The page numbers link to further pages of messages as applicable. + + + Starting or Replying to a Message + There are actually several different ways to start a new personal message, but all require you to be logged in: + + You can follow the link that says something like 'Hey, [username], you have x messages, x are new', then click the New Message button in your inbox. + You can click another member's name, followed by Send this member a personal message from his/her profile summary screen. + You can start a new message direct by clicking the IM on/offline icon from the user info accompanying all of his/her posts. + You can start a new message direct by clicking the PM on/offline icon from the Current Status in his/her profile summary screen. (This icon/link is often duplicated in the user info described above.) + Replying to a message is very similar to replying to a topic. + + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/fixed/help/pm.russian.html b/Themes/fixed/help/pm.russian.html new file mode 100644 index 0000000..1a8a6fe --- /dev/null +++ b/Themes/fixed/help/pm.russian.html @@ -0,0 +1,142 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    - , , e-mail, IM - , , .

    +
      +
    1. + +
        +
      1. +
      2. +
      +
    2. +
    3. + +
        +
      1. +
      +
    4. +
    +

    +

    +

    , : , , , , , - , .

    +

    e-mail, SMF . . SMF, , . , e-mail , .

    +

    , , ( ). , , , , .

    +

    +

    , , ', [ ], x , x '.

    +

    +

    . , :

    +
    +
    + +
    + + + + +
    + 
    + |- + 
    + | |- + 
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    Delete all messages in your Inbox Outbox New Message Check for new messages
     
    + + + + +
    : [1]
    +
    +

    +
    +
    +
    +

    +
      +
    • ( ) .
    • +
    • ( , ) . , .
    • +
    • , .
    • +
    • , , ':' ':' .
    • +
    • .
    • +
    • , ( , ).
    • +
    • , .
    • +
    • - .
    • +
    +

    +

    , , :

    +
      +
    • , ', [ ], x , x ', .
    • +
    • , .
    • +
    • On/Offline IM, .
    • +
    • On/Offline PM , ( , ).
    • +
    • , .
    • +
    + + + diff --git a/Themes/fixed/help/pm.xslt b/Themes/fixed/help/pm.xslt new file mode 100644 index 0000000..755e58d --- /dev/null +++ b/Themes/fixed/help/pm.xslt @@ -0,0 +1,122 @@ + + + + +
    +
    + + + +
    + + + + +
    + + +  + +
    + |- + +  + +
    + | + |- + +  + +
    +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + + {alt-delete} + + {alt-outbox} + + {alt-new-message} + + {alt-reload} +
    + + +   + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + +
    + + + + +
    : [1]
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/fixed/help/posting.english.html b/Themes/fixed/help/posting.english.html new file mode 100644 index 0000000..c6f7e82 --- /dev/null +++ b/Themes/fixed/help/posting.english.html @@ -0,0 +1,929 @@ + + + + + + + + SMF User Help: Posting + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Posting


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    Since posting messages is basically what forums are all about, we will spend some time looking at the various options and techniques available. Those who are familiar with forum software, HTML or bulletin board code in general may prefer to skip straight to the Bulletin Board Code and Smileys references.

    +

    Please note that, because an SMF forum may be customized extensively by its administrator(s), the presence of a feature in this documentation does not necessarily mean that it will be available to all users in all forums.

    +
      +
    1. + Posting Basics +
        +
      1. Starting a New Topic
      2. +
      3. Starting a New Poll
      4. +
      5. Posting an Event to the Calendar
      6. +
      7. Replying to a Topic or Poll
      8. +
      9. Quoting a Post
      10. +
      11. Modifying or Deleting a Post
      12. +
      +
    2. +
    3. + Standard Posting Options +
        +
      1. Message Icon
      2. +
      3. Bulletin Board Code
      4. +
      5. Smileys
      6. +
      +
    4. +
    5. Tags and Nesting (for beginners)
    6. +
    7. + Additional Options +
        +
      1. Notify me of replies
      2. +
      3. Return to this topic
      4. +
      5. Don't use smileys
      6. +
      7. Attachments
      8. +
      +
    8. +
    9. + References +
        +
      1. SMF Bulletin Board Code
      2. +
      3. SMF Smileys
      4. +
      +
    10. +
    +

    Posting Basics

    +

    Starting a New Topic

    +

    Browse to the board where you wish to post and click the New Topic button (positioned by default at both the top and the bottom of the board, as shown in the User Help Introduction), which should take you to the Start new topic screen. While this presents a number of options, the two most important are the Subject field and main Message field (not labeled as such, but obvious by its size). So enter your subject and start to type (or paste) your message into the main text area, noting that a message missing either a subject or a body will not be accepted for posting until it has both. If you're happy with your plain text message, you can then post it by clicking the Post button and/or preview it first by clicking the Preview button, but there are many further options available to make things that little bit more interesting.

    +
    +
    +
    + + + + +
    +  Forum Name
    + |- +  Category Name
    + | |- +  Board Name
    + | | |- +  Start new topic
    + + + + + + + +
    Start new topic
    + + + + + + + + + + + + + + + + + + +
    Standard Options omitted for clarity and demonstrated below.
    Subject:
    +
    Additional Options omitted for clarity and demonstrated below.

    + shortcuts: hit alt+s to submit/post or alt+p to preview

    +
    +
    +

    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • Some forums may be configured to offer an additional Spell Check button alongside the Post and Preview options.
    • +
    +

    Starting a New Poll

    +

    A poll is basically a topic with an added question and voting options, started by clicking New Poll instead of New Topic as described above. To post a poll it is necessary to fill out the Question field and at least two of the Option fields in addition to the Subject and Message fields required by a standard topic. Further options to configure how many choices the user may vote for, how long the poll should run, whether users can change their votes and what conditions must be fulfilled for the results to be displayed should be self-explanatory.

    +

    To offer more than five choices in a poll, simply click Add Option as many times as necessary.

    +

    Note that it may also be possible for some users in some forums to add a poll to an existing topic.

    +

    Posting an Event to the Calendar

    +

    Where this option has been configured (it's not standard 'out of the box'), you can post an event by selecting Calendar from the main menu followed by Post Event from the calendar screen. What you see now is a Start new topic screen with supplementary fields for the event title, date and target board, which simply add your event to the calendar and create a link back to your post in that board.

    +

    Replying to a Topic or Poll

    +

    Replying to a topic or poll is basically the same as starting a new topic, but it's not necessary to enter anything in the Subject field unless you wish to change what's already there. To vote in a poll, you simply have to select your chosen option(s) and click Submit Vote.

    +

    If 'Quick Reply' has been enabled, a simple reply field will also appear after the post(s) on a page, but you'll have to type your Bulletin Board Code and Smileys manually if you choose to use it.

    +

    Quoting a Post

    +

    To reply to a post by quoting it, you can either click the Quote button for the relevant post and add your own message to the quoted text or click the Reply button followed by Insert Quote from the relevant post in the 'Topic Summary' below, but note that:

    +
      +
    • Both these options add a link to the original post showing the name of the poster and the date and time of the post, whereas the Bulletin Board Code quote tag simply quotes the relevant post without this additional information.
    • +
    • You can also retain or add the 'author' attribute independently of the full Quote function, as demonstrated in the SMF Bulletin Board Code Reference below.
    • +
    +

    Modifying or Deleting a Post

    +

    To modify a post, click the Modify button and make your changes. Note that most forums are likely to be configured to show the date and time of the last edit, but the administrator(s) may also allow a short period to elapse before this happens.

    +

    To delete a post, click the Delete button followed by OK from the Remove this message? box that appears. Some forums may also allow you to remove topics or polls that you start, but the buttons for these are usually at the bottom of the page.

    +

    Standard Posting Options

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + +
    Message icon:
    + BoldItalicizedUnderlineStrikethrough|GlowShadowMarquee|Preformatted TextLeft AlignCenteredRight Align|Horizontal Rule|Font SizeFont Face
    + Insert FlashInsert ImageInsert HyperlinkInsert EmailInsert FTP Link|Insert TableInsert Table RowInsert Table Column|SuperscriptSubscriptTeletype|Insert CodeInsert Quote|Insert List +
    Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry
    +
    +
    +

    +
    +

    +

    Message Icon

    +

    This drop-down menu allows you to change the default icon for the subject line to something matching the mood or purpose of your post.

    +

    Bulletin Board Code

    +

    Bulletin Board Code (or BBC) is the essential tool for formatting and changing the appearance of your post. While it affects the plain text in much the same way as the formatting tools in any word processor, the main Message field does not behave in a WYSIWYG manner, so you should preview your message if you need to see what it will look like when posted.

    +

    A complete SMF Bulletin Board Code Reference is provided below.

    +

    Smileys

    +

    While smileys can be viewed as purely whimsical in nature, they can also play a valuable role in clarifying the written word in much the same way as vocal inflections and/or facial expressions clarify the spoken word. Like most forum software, SMF provides a standard range of smiley images which can be added to posts by clicking the relevant icons or typing the relevant codes. A don't use smileys option is naturally also provided for those occasions when you don't want typed character combinations that would normally be displayed as smileys to be converted to the expected images!

    +

    A complete SMF Smileys Reference is provided below.

    +

    Tags and Nesting (for beginners)

    +

    Before listing the available BBC buttons and their purposes, let's see how they work by imagining that we want to post some text in bold type. While we can start by clicking the B (Bold) button and typing our text between the tags it produces, it's often more practical to type the text first, highlight it and then click the button. So typing 'text', highlighting it and clicking the 'B' button should produce '[b]text[/b]', which renders as text when posted or previewed. (NB This doesn't work in Opera, which inserts the tags at the end of the post.) Subsequently highlighting '[b]text[/b]' and clicking the I (Italicized) button will produce '[i][b]text[/b][/i]', which not only renders as text when posted or previewed but also introduces the concept of nesting, which means that each new set of tags in a case like this should be seen as a new 'box' containing both the original text and any tags already applied to it.

    +

    Note that the BBC tags can also be typed and edited direct instead of clicking the buttons.

    +

    Additional Options

    +

    The following options may appear by default in some forums but be contained within an expanding/collapsing panel (try clicking the link with the arrow below!) in others:

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + +
    + Additional Options...
    +
    + + + + + + + + + + +
     Notify me of replies.
     Return to this topic.
     Don't use smileys.
    +
    +
    Attach:
    +
    + Allowed file types: txt, jpg, gif, pdf, mpg, png
    + Maximum attachment size allowed: 128 KB
    +
    + shortcuts: hit alt+s to submit/post or alt+p to preview

    + +
    +
    +

    +
    +

    +

    Notify me of replies

    +

    Check this to subscribe to email notification for the topic.

    +

    Return to this topic

    +

    Check this to return to the topic (instead of the message index) after posting (NB you can also set this behaviour as a preference in your profile).

    +

    Don't use smileys

    +

    Check this to prevent certain character combinations in your post from being parsed and rendered as smileys.

    +

    Attachments

    +

    If enabled, this feature allows you to attach files to your posts in much the same way as most email clients, so you simply have to browse to the relevant file(s) on your computer before clicking Post. You can delete your attachment(s) or add more by modifying your post, but please note that:

    +
      +
    • The permitted file types and sizes are set by the forum administrator(s).
    • +
    • Although most forums are likely be configured to display attached images as part of the post, it's not possible to preview attachments so you should always browse to and attach your files just before you finally post your message.
    • +
    +

    References

    +

    SMF Bulletin Board Code

    +

    The buttons shown belong to the SMF default theme and may differ from forum to forum.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tag NameButtonCodeOutputComments
    BoldBold[b]bold[/b]bold*
    ItalicizedItalicized[i]italicized[/i]italicized*
    UnderlineUnderline[u]underline[/u]underline*
    StrikethroughStrikethrough[s]strikethrough[/s]strikethrough*
    GlowGlow[glow=red,2,50]glow[/glow] +
    + glow +
    +
    The three attributes (eg red, 2, 50) in the 'glow' tag are color, strength and width respectively.
    ShadowShadow[shadow=red,left]
    + shadow
    + [/shadow]
    +
    + shadow +
    +
    The two attributes (eg red, left) in the 'shadow' tag are color and direction respectively.
    MarqueeMarquee[move]move[/move]moveNot valid XHTML, but can also be used for images!
    Preformatted TextPreformatted Text[pre]Simple
    +   Machines
    +     Forum[/pre]
    +
    +Simple
    +  Machines
    +						Forum
    +
    +
    Preserves critical text formatting, rendered in a monospace font.
    Left AlignLeft Align[left]left align[/left] +

    left align

    +
    *
    CenteredCentered[center]centered[/center] +
    + centered +
    +
    *
    Right AlignRight Align[right]right align[/right] +

    right align

    +
    *
    Right-to-Left*[rtl]right to left![/rtl] +
    + right to left! +
    +
    Typical usage would be to post Arabic or Hebrew in an English document.
    Left-to-Right*[ltr]left to right![/ltr] +
    + left to right! +
    +
    Typical usage would be to post English in an Arabic or Hebrew document.
    Horizontal RuleHorizontal Rule[hr] +
    +
    *
    Font SizeFont Size[size=10pt]font size[/size]font size*
    Font FaceFont Face[font=Verdana]font face[/font]font faceOnly fonts installed on the user's computer will be displayed, so use with caution!
    Font Color[color=Red]red[/color]redSelect the color from the drop-down.
    Insert FlashInsert Flash[flash=200,200]
    + http://somesite/somefile.swf
    + [/flash]
    http://somesite/somefile.swfPlease note that, if embedded Flash has been disabled by the forum administrator(s), the Flash file will appear as a straight hyperlink as shown here. The two attributes in the 'flash' tag (where relevant) are width and height respectively.
    Insert ImageInsert Image[img]
    + http://somesite/image.gif
    + [/img]
    Type the width and height attributes to resize the image.
    [img width=48 height=48]
    + http://somesite/image.gif
    + [/img]
    Insert HyperlinkInsert Hyperlink[url]http://somesite/[/url]http://somesite/NB the 'url' tag opens in a new window, but you can type 'iurl' tags to open in the same window.
    [url=http://somesite/]
    + descriptive link
    + [/url]
    descriptive link
    Insert EmailInsert Email[email]
    + someone@somesite
    + [/email]
    someone@somesite*
    Insert FTP LinkInsert FTP Link[ftp]
    + ftp://somesite/somefile
    + [/ftp]
    ftp://somesite/somefile*
    [ftp=ftp://somesite/somefile]
    + descriptive link
    + [/ftp]
    descriptive link
    Insert TableInsert Table[table][/table]*No meaningful output from the 'table' tags alone.
    Insert Table RowInsert Table Row[table][tr][/tr][/table]*No meaningful output from the 'table' and 'tr' tags alone.
    Insert Table ColumnInsert Table Column[table][tr][td]
    + content
    + [/td][/tr][/table]
    + + + + +
    content
    +
    Note the correct nesting of the tags, so the 'table' tags contain the 'tr' tags, which each contain an equal number of 'td' tags!
    [table][tr][td]SMF[/td]
    + [td]Bulletin[/td][/tr]
    + [tr][td]Board[/td]
    + [td]Code[/td][/tr][/table]
    + + + + + + + + + +
    SMFBulletin
    BoardCode
    +
    SuperscriptSuperscript[sup]superscript[/sup]superscript*
    SubscriptSubscript[sub]subscript[/sub]subscript*
    TeletypeTeletype[tt]teletype[/tt]teletypeMonospace font.
    Insert CodeInsert Code[code]<?php phpinfo(); ?>[/code] +
    + Code: +
    +
    + <?php phpinfo(); ?> +
    +
    Always use to preserve formatting of code and avoid parsing as BBC and/or smileys!
    Insert QuoteInsert Quote[quote]quote[/quote] +
    + Quote +
    +
    + quote +
    +
    Note the optional 'author' attribute.
    [quote author=author]quote[/quote] +
    + Quote from: author +
    +
    + quote +
    +
    Insert ListInsert List[list]
    + [li]SMF[/li]
    + [li]YaBB SE[/li]
    + [/list]
    +
      +
    • SMF
    • +
    • YaBB SE
    • +
    +
    While you can add as many items as you wish, each item must be contained by the correct opening and closing tags. You can also style your list item bullets with special opening tags and no closing tags, but this option doesn't currently output valid XHTML.
    [list]
    + [o]circle
    + [O]circle
    + [0]circle
    + [*]disc
    + [@]disc
    + [+]square
    + [x]square
    + [#]square
    + [/list]
    +
      +
    • circle
    • +
    • circle
    • +
    • circle
    • +
    • disc
    • +
    • disc
    • +
    • square
    • +
    • square
    • +
    • square
    • +
    +
    Abbreviation*[abbr=exemlpi gratia]eg[/abbr]egDisplays the full expression for the abbreviation on mouseover.
    Acronym*[acronym=Simple Machines Forum]SMF[/acronym]SMFDisplays the full expression for the acronym on mouseover.

    +

    SMF Smileys

    +

    The smileys shown here are the standard set from the SMF default theme and may differ from forum to forum.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameImage (click to insert)Code (type to insert)
    Smiley:)
    Wink;)
    Cheesy:D
    Grin;D
    Angry>:(
    Sad:(
    Shocked:o
    Cool8)
    Huh???
    Roll Eyes::)
    Tongue:P
    Embarrassed:-[
    Lips Sealed:-X
    Undecided:-\
    Kiss:-*
    Cry:'(

    +

    Please note that not all of the smiley codes will be correctly parsed and converted to images unless their opening spaces are present.

    + + + \ No newline at end of file diff --git a/Themes/fixed/help/posting.english.xml b/Themes/fixed/help/posting.english.xml new file mode 100644 index 0000000..850735b --- /dev/null +++ b/Themes/fixed/help/posting.english.xml @@ -0,0 +1,683 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Posting + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + Since posting messages is basically what forums are all about, we will spend some time looking at the various options and techniques available. Those who are familiar with forum software, HTML or bulletin board code in general may prefer to skip straight to the Bulletin Board Code and Smileys references. + Please note that, because an SMF forum may be customized extensively by its administrator(s), the presence of a feature in this documentation does not necessarily mean that it will be available to all users in all forums. + +
    + Posting Basics + + Starting a New Topic + Browse to the board where you wish to post and click the New Topic button (positioned by default at both the top and the bottom of the board, as shown in the User Help Introduction), which should take you to the Start new topic screen. While this presents a number of options, the two most important are the Subject field and main Message field (not labeled as such, but obvious by its size). So enter your subject and start to type (or paste) your message into the main text area, noting that a message missing either a subject or a body will not be accepted for posting until it has both. If you're happy with your plain text message, you can then post it by clicking the Post button and/or preview it first by clicking the Preview button, but there are many further options available to make things that little bit more interesting. + + + Forum Name + Category Name + Board Name + Start new topic + Standard Options + Additional Options + omitted for clarity and demonstrated below. + Subject + shortcuts: hit alt+s to submit/post or alt+p to preview + Post + Preview + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + Some forums may be configured to offer an additional Spell Check button alongside the Post and Preview options. + + + + Starting a New Poll + A poll is basically a topic with an added question and voting options, started by clicking New Poll instead of New Topic as described above. To post a poll it is necessary to fill out the Question field and at least two of the Option fields in addition to the Subject and Message fields required by a standard topic. Further options to configure how many choices the user may vote for, how long the poll should run, whether users can change their votes and what conditions must be fulfilled for the results to be displayed should be self-explanatory. + To offer more than five choices in a poll, simply click Add Option as many times as necessary. + Note that it may also be possible for some users in some forums to add a poll to an existing topic. + + + Posting an Event to the Calendar + Where this option has been configured (it's not standard 'out of the box'), you can post an event by selecting Calendar from the main menu followed by Post Event from the calendar screen. What you see now is a Start new topic screen with supplementary fields for the event title, date and target board, which simply add your event to the calendar and create a link back to your post in that board. + + + Replying to a Topic or Poll + Replying to a topic or poll is basically the same as starting a new topic, but it's not necessary to enter anything in the Subject field unless you wish to change what's already there. To vote in a poll, you simply have to select your chosen option(s) and click Submit Vote. + If 'Quick Reply' has been enabled, a simple reply field will also appear after the post(s) on a page, but you'll have to type your Bulletin Board Code and Smileys manually if you choose to use it. + + + Quoting a Post + To reply to a post by quoting it, you can either click the Quote button for the relevant post and add your own message to the quoted text or click the Reply button followed by Insert Quote from the relevant post in the 'Topic Summary' below, but note that: + + Both these options add a link to the original post showing the name of the poster and the date and time of the post, whereas the Bulletin Board Code quote tag simply quotes the relevant post without this additional information. + You can also retain or add the 'author' attribute independently of the full Quote function, as demonstrated in the SMF Bulletin Board Code Reference below. + + + + Modifying or Deleting a Post + To modify a post, click the Modify button and make your changes. Note that most forums are likely to be configured to show the date and time of the last edit, but the administrator(s) may also allow a short period to elapse before this happens. + To delete a post, click the Delete button followed by OK from the Remove this message? box that appears. Some forums may also allow you to remove topics or polls that you start, but the buttons for these are usually at the bottom of the page. + +
    +
    + Standard Posting Options + + + Message icon + Standard + Thumb Up + Thumb Down + Exclamation point + Question mark + Lamp + Smiley + Angry + Cheesy + Grin + Sad + Wink + + Bold + Italicized + Underline + Strikethrough + + Glow + Shadow + Marquee + +
    Preformatted Text
    + Left Align +
    Centered
    + Right Align + +
    Horizontal Rule + + Font Size + Font Face +
    + + Insert Flash + Insert Image + Insert Hyperlink + Insert Email + Insert FTP Link + + Insert Table
    + Insert Table Row + Insert Table Column + + Superscript + Subscript + Teletype + + Insert Code + Insert Quote + + Insert List +
    + + Change Color + Black + Red + Yellow + Pink + Green + Orange + Purple + Blue + Beige + Brown + Teal + Navy + Maroon + Lime Green + + + Smiley + Wink + Cheesy + Grin + Angry + Sad + Shocked + Cool + Huh + Roll Eyes + Tongue + Embarrassed + Lips Sealed + Undecided + Kiss + Cry + +
    + + Message Icon + This drop-down menu allows you to change the default icon for the subject line to something matching the mood or purpose of your post. + + + Bulletin Board Code + Bulletin Board Code (or BBC) is the essential tool for formatting and changing the appearance of your post. While it affects the plain text in much the same way as the formatting tools in any word processor, the main Message field does not behave in a WYSIWYG manner, so you should preview your message if you need to see what it will look like when posted. + A complete SMF Bulletin Board Code Reference is provided below. + + + Smileys + While smileys can be viewed as purely whimsical in nature, they can also play a valuable role in clarifying the written word in much the same way as vocal inflections and/or facial expressions clarify the spoken word. Like most forum software, SMF provides a standard range of smiley images which can be added to posts by clicking the relevant icons or typing the relevant codes. A don't use smileys option is naturally also provided for those occasions when you don't want typed character combinations that would normally be displayed as smileys to be converted to the expected images! + A complete SMF Smileys Reference is provided below. + +
    +
    + Tags and Nesting (for beginners) + Before listing the available BBC buttons and their purposes, let's see how they work by imagining that we want to post some text in bold type. While we can start by clicking the B (Bold) button and typing our text between the tags it produces, it's often more practical to type the text first, highlight it and then click the button. So typing 'text', highlighting it and clicking the 'B' button should produce '[b]text[/b]', which renders as text when posted or previewed. (NB This doesn't work in Opera, which inserts the tags at the end of the post.) Subsequently highlighting '[b]text[/b]' and clicking the I (Italicized) button will produce '[i][b]text[/b][/i]', which not only renders as text when posted or previewed but also introduces the concept of nesting, which means that each new set of tags in a case like this should be seen as a new 'box' containing both the original text and any tags already applied to it. + Note that the BBC tags can also be typed and edited direct instead of clicking the buttons. +
    +
    + Additional Options + The following options may appear by default in some forums but be contained within an expanding/collapsing panel (try clicking the link with the arrow below!) in others: + + + Notify me of replies. + Return to this topic. + Don't use smileys. + Attach + Allowed file types: txt, jpg, gif, pdf, mpg, png + Maximum attachment size allowed: 128 KB + + + Notify me of replies + Check this to subscribe to email notification for the topic. + + + Return to this topic + Check this to return to the topic (instead of the message index) after posting (NB you can also set this behaviour as a preference in your profile). + + + Don't use smileys + Check this to prevent certain character combinations in your post from being parsed and rendered as smileys. + + + Attachments + If enabled, this feature allows you to attach files to your posts in much the same way as most email clients, so you simply have to browse to the relevant file(s) on your computer before clicking Post. You can delete your attachment(s) or add more by modifying your post, but please note that: + + The permitted file types and sizes are set by the forum administrator(s). + Although most forums are likely be configured to display attached images as part of the post, it's not possible to preview attachments so you should always browse to and attach your files just before you finally post your message. + + +
    +
    + References + + SMF Bulletin Board Code + The buttons shown belong to the SMF default theme and may differ from forum to forum. + + + + Tag Name + Button + Code + Output + Comments + + + Bold + bold + [b]bold[/b] + ]]> + bold + ]]> + * + + + Italicized + italicize + [i]italicized[/i] + ]]> + italicized + ]]> + * + + + Underline + underline + [u]underline[/u] + ]]> + underline + ]]> + * + + + Strikethrough + strike + [s]strikethrough[/s] + ]]> + strikethrough + ]]> + * + + + Glow + glow + [glow=red,2,50]glow[/glow] + ]]> + glow + ]]> + The three attributes (eg red, 2, 50) in the 'glow' tag are color, strength and width respectively. + + + Shadow + shadow + [shadow=red,left]]]>shadow]]>[/shadow] + ]]> + shadow + ]]> + The two attributes (eg red, left) in the 'shadow' tag are color and direction respectively. + + + Marquee + move + [move]move[/move] + ]]> + move + ]]> + Not valid XHTML, but can also be used for images! + + + Preformatted Text + pre + [pre]Simple]]>&space;&space;Machines]]>&space;&space;&space;&space;Forum[/pre] + ]]> + Simple + Machines + Forum + ]]> + Preserves critical text formatting, rendered in a monospace font. + + + Left Align + left + [left]left align[/left] + ]]> + left align + ]]> + * + + + Centered + center + [center]centered[/center] + ]]> + centered + ]]> + * + + + Right Align + right + [right]right align[/right] + ]]> + right align + ]]> + * + + + Right-to-Left + none + [rtl]right to left![/rtl] + ]]> + right to left! + ]]> + Typical usage would be to post Arabic or Hebrew in an English document. + + + Left-to-Right + none + [ltr]left to right![/ltr] + ]]> + left to right! + ]]> + Typical usage would be to post English in an Arabic or Hebrew document. + + + Horizontal Rule + hr + [hr] + ]]> + + + * + + + Font Size + size + [size=10pt]font size[/size] + ]]> + font size + ]]> + * + + + Font Face + face + [font=Verdana]font face[/font] + ]]> + font face + ]]> + Only fonts installed on the user's computer will be displayed, so use with caution! + + + Font Color + + + [color=Red]red[/color] + ]]> + red + ]]> + Select the color from the drop-down. + + + Insert Flash + flash + [flash=200,200]]]>http://somesite/somefile.swf]]>[/flash] + ]]> + http://somesite/somefile.swf + ]]> + Please note that, if embedded Flash has been disabled by the forum administrator(s), the Flash file will appear as a straight hyperlink as shown here. The two attributes in the 'flash' tag (where relevant) are width and height respectively. + + + + Insert Image + img + [img]]]>http://somesite/image.gif]]>[/img] + ]]> + + + Type the width and height attributes to resize the image. + + + [img width=48 height=48]]]>http://somesite/image.gif]]>[/img] + ]]> + + + + + Insert Hyperlink + url + [url]http://somesite/[/url] + ]]> + http://somesite/ + ]]> + NB the 'url' tag opens in a new window, but you can type 'iurl' tags to open in the same window. + + + [url=http://somesite/]]]>descriptive link]]>[/url] + ]]> + descriptive link + ]]> + + + Insert Email + email + [email]]]>someone@somesite]]>[/email] + ]]> + someone@somesite + ]]> + * + + + Insert FTP Link + ftp + [ftp]]]>ftp://somesite/somefile]]>[/ftp] + ]]> + ftp://somesite/somefile + ]]> + * + + + [ftp=ftp://somesite/somefile]]]>descriptive link]]>[/ftp] + ]]> + descriptive link + ]]> + + + Insert Table + table + [table][/table] + * + + + No meaningful output from the 'table' tags alone. + + + Insert Table Row + tr + [table][tr][/tr][/table] + * + + + No meaningful output from the 'table' and 'tr' tags alone. + + + Insert Table Column + td + [table][tr][td]]]>content]]>[/td][/tr][/table] + ]]> + content + ]]> + Note the correct nesting of the tags, so the 'table' tags contain the 'tr' tags, which each contain an equal number of 'td' tags! + + + [table][tr][td]SMF[/td]]]>[td]Bulletin[/td][/tr]]]>[tr][td]Board[/td]]]>[td]Code[/td][/tr][/table] + SMFBulletinBoardCode]]> + + + + + Superscript + sup + [sup]superscript[/sup] + ]]> + superscript + ]]> + * + + + Subscript + sub + [sub]subscript[/sub] + ]]> + subscript + ]]> + * + + + Teletype + tele + [tt]teletype[/tt] + ]]> + teletype + ]]> + Monospace font. + + + Insert Code + code + [code]<?php phpinfo(); ?>[/code] + Code:
    <?php phpinfo(); ?>
    ]]> + + + Always use to preserve formatting of code and avoid parsing as BBC and/or smileys! + + + Insert Quote + quote + [quote]quote[/quote] + Quote
    ]]> + quote + ]]> + Note the optional 'author' attribute. + + + [quote author=author]quote[/quote] + Quote from: author
    ]]> + quote + ]]> + + + Insert List + list + [list]]]>[li]SMF[/li]]]>[li]YaBB SE[/li]]]>[/list] +
  • SMF
  • YaBB SE
  • ]]>
    + + + While you can add as many items as you wish, each item must be contained by the correct opening and closing tags. You can also style your list item bullets with special opening tags and no closing tags, but this option doesn't currently output valid XHTML. +
    + + [list]]]>[o]circle]]>[O]circle]]>[0]circle]]>[*]disc]]>[@]disc]]>[+]square]]>[x]square]]>[#]square]]>[/list] +
  • circle
  • circle
  • circle
  • disc
  • disc
  • square
  • square
  • square
    ]]> + + + + + Abbreviation + none + [abbr=exemlpi gratia]eg[/abbr] + ]]> + eg + ]]> + Displays the full expression for the abbreviation on mouseover. + + + Acronym + none + [acronym=Simple Machines Forum]SMF[/acronym] + ]]> + SMF + ]]> + Displays the full expression for the acronym on mouseover. + + + + + SMF Smileys + The smileys shown here are the standard set from the SMF default theme and may differ from forum to forum. + + + + Name + Image (click to insert) + Code (type to insert) + + + Smiley + smiley + :) + + + Wink + wink + ;) + + + Cheesy + cheesy + :D + + + Grin + grin + ;D + + + Angry + angry + >:( + + + Sad + sad + :( + + + Shocked + shocked + :o + + + Cool + cool + 8) + + + Huh + huh + ??? + + + Roll Eyes + rolleyes + ::) + + + Tongue + tongue + :P + + + Embarrassed + embarassed + + :-[ + + + Lips Sealed + lipsrsealed + :-X + + + Undecided + undecided + :-\ + + + Kiss + kiss + :-* + + + Cry + cry + :'( + + + Please note that not all of the smiley codes will be correctly parsed and converted to images unless their opening spaces are present. + + + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + + \ No newline at end of file diff --git a/Themes/fixed/help/posting.russian.html b/Themes/fixed/help/posting.russian.html new file mode 100644 index 0000000..4cdc8bf --- /dev/null +++ b/Themes/fixed/help/posting.russian.html @@ -0,0 +1,1077 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    - , , , , . , - , HTML Bulletin Board, BB .

    +

    - + .

    +
      +
    1. + +
        +
      1. +
      2. +
      3. +
      4. /
      5. +
      6. +
      7. +
      +
    2. +
    3. + +
        +
      1. +
      2. Bulletin Board Code
      3. +
      4. +
      +
    4. +
    5. +
    6. + +
        +
      1. +
      2. +
      3. +
      4. +
      +
    7. +
    8. + +
        +
      1. SMF Bulletin Board
      2. +
      3. SMF
      4. +
      +
    9. +
    +

    +

    +

    , , ( , ), . , - ( , , ). ( , ) . , , , . , , , , SMF - , , .

    +
    +
    +
    + + + + +
    + 
    + |- + 
    + | |- + 
    + | | |- + 
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
      + .
    :
    +
    + .

    + : alt+s alt+p

    +
    +
    +

    +
    +

    +
      +
    • ( ) .
    • +
    • .
    • +
    +

    +

    , + , . + , + + . , + - + , + . + , , + . + - , .

    +

    , .

    +

    .

    +

    +

    ( , ) + , + + . + , - + .

    +

    /

    +

    , , , , . , .

    +

    " ", , .

    +

    +

    , . , :

    + +

    +

    , . , , , .

    +

    , , OK ? , . , .

    +

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + +
    :
    + | |   | |
        Email FTP |       |  | | +
    + Smile + Crying or Very sad + Sad + Exclamation + Surprised + Question + Shocked + Idea + Confused + Arrow + Cool + Neutral + Embarassed + Laughing + Razz +   ! + Wink +  . + Evil or Very Mad +  ! + Rolling Eyes + + ! + Twisted Evil + + +
    +
    +
    +

    +
    +

    +

    +

    , .

    +

    Bulletin Board Code

    +

    Bulletin Board Code ( BBC) - . , HTML, BB . , (Microsoft Word ), , , , .

    +

    SMF Bulletin Board Code .

    +

    +

    , , . , . , .

    +

    .

    +

    .

    +

    , , . , . , - , . . , , " ", B (), "[b] [/b]", . (NB! Opera , ). "[b] [/b]" I () - "[i][b] [/b][/i]", , : , , "", , , .

    +

    , , .

    +

    +

    , :

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + +
    + ...
    +
    + + + + + + + + + + +
      .
      .
      .
    +
    +
    :
    +
    + : jpg, gif, png, mp3, zip, gzip, rar
    + : 500 KB, : 2
    +
    + : alt+s alt+p

    + +
    +
    +

    +
    +

    +

    +

    , .

    +

    +

    , , . .

    +

    +

    , .

    +

    +

    , , . , . , , :

    +
      +
    • .
    • +
    • , , .
    • +
    +

    +

    SMF Bulletin Board Code

    +

    - . , . SMF .

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    [b][/b]*
    [i][/i]*
    [u][/u]*
    [s][/s]*
    [glow=red,2,50][/glow] +
    + +
    +
    ( red, 2, 50) - , .
     [shadow=red,left]
    +
    + [/shadow]
    +
    + +
    +
    ( red, left) - .
    [move][/move] XHTML, !
     [pre]Simple
    +   Machines
    +     Forum[/pre]
    +
    +Simple
    +  Machines
    +			Forum
    +
    +
    , .
     [left] [/left] +

    +
    *
    [center][/center] +
    + +
    +
    *
     [right] [/right] +

    +
    *
    *[rtl] ![/rtl] +
    + ! +
    +
    - . , .
    *[ltr] ![/ltr] +
    + ! +
    +
    - .
     [hr] +
    +
    , . - .
     [size=10pt] e[/size] *
     [font=Verdana] [/font] , , !
    [color=Red][/color] .
     [flash=200,200]
    + http://somesite/somefile.swf
    + [/flash]
    http://somesite/somefile.swf , , , . - .
     [img]
    + http://somesite/image.gif
    + [/img]
    height width, .
    [img width=48 height=48]
    + http://somesite/image.gif
    + [/img]
     [url]http://somesite/[/url]http://somesite/NB! 'url' , 'iurl', .
    [url=http://somesite/]
    + --- !
    + [/url]
    --- !
    E-mail Email[email]
    + @.
    + [/email]
    @.*
    FTP  FTP [ftp]
    + ftp://somesite/somefile
    + [/ftp]
    ftp://somesite/somefile*
    [ftp=ftp://somesite/somefile]
    + --- !
    + [/ftp]
    --- !
     [table][/table]* , .
       [table][tr][/tr][/table]* 'table', .
       [table][tr][td]
    +
    + [/td][/tr][/table]
    + + + + +
    +
    : 'table' 'tr', - 'td'!
    [table][tr][td][/td]
    + [td][/td][/tr]
    + [tr][td][/td]
    + [td][/td][/tr][/table]
    + + + + + + + + + +
    +
     [sup] [/sup] *
     [sub] [/sub] *
    [tt][/tt]
     [code]<?php phpinfo(); ?>[/code] +
    + : +
    +
    + <?php phpinfo(); ?> +
    +
    , BBC / !
    [quote][/quote] +
    + +
    +
    + +
    +
    'author'.
    [quote author=][/quote] +
    + : +
    +
    + +
    +
     [list]
    + [li]SMF[/li]
    + [li]YaBB SE[/li]
    + [/list]
    +
      +
    • SMF
    • +
    • YaBB SE
    • +
    +
    , , . ( ). XHTML.
    [list]
    + [o]
    + [O]
    + [0]
    + [*]
    + [@]
    + [+]
    + [x]
    + [#]
    + [/list]
    +
      +

    • +

    • +

    • +

    • +

    • +

    • +

    • +

    • +
    +

    +

    +

    , SMF, , .

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ( ) ( )
    Smile:)
    Crying or very sad:cry:
    Sad:(
    Exclamation:!:
    Surprised:o
    Question:?:
    Shocked:shock:
    Idea:idea:
    Confused:?
    Arrow:arrow:
    Cool8)
    Neutral:|
    Embarassed:oops:
    Laughing:lol:
    Razz:P
    !:anger:
    Wink:wink:
    :budda:
    Evil or Very Mad:evil:
    !:idea:
    Rolling Eyes:roll:
    King:king:
    !:kiss:
    Twisted Evil:twisted:
    Mad:x
    !:nafig:
    :-:
    :lover:
    :velo:
    :kupid:
    :thunder:
    :banned:
    :attention:
    :stup:
    :close:
    :345:
    :ban:
    :001:
    :offtopic:
    :balet:
    :dead:
    :kiss:
    :lamer:
    :love:
    :susp:
    8X

    +

    , , .

    + + + diff --git a/Themes/fixed/help/posting.xslt b/Themes/fixed/help/posting.xslt new file mode 100644 index 0000000..c790966 --- /dev/null +++ b/Themes/fixed/help/posting.xslt @@ -0,0 +1,454 @@ + + + + +
    +
    +
    + + + + +
    + + +  + +
    + |- + +  + +
    + | + |- + +  + +
    + | + | + |- + +  + +
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
     
    + : + + +
    + +
     
    + +
    + +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + +
    + : + + + +
    + + + + | + {.} + + + +
    + + + | + {.} + +
    + + + + {.} + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + +
    + + ... +
    +
    + + + + + + + + + + +
    +   +
    +   +
    +   +
    +
    +
    + : + + +
    + +
    + +
    + +
    + + +
    + +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + * + + + + {bbc-name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {bbc-name} + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + +
    \ No newline at end of file diff --git a/Themes/fixed/help/profile.english.html b/Themes/fixed/help/profile.english.html new file mode 100644 index 0000000..47db2fe --- /dev/null +++ b/Themes/fixed/help/profile.english.html @@ -0,0 +1,461 @@ + + + + + + + + + SMF User Help: Profile + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Profile


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    The profile screen in the default theme normally consists of a single main pane, with an additional menu to the left to lead you through the editing options for your own profile. Please note that, because an SMF forum may be customized extensively by its administrator(s), the features and user permissions described here are typical rather than definitive.

    +

    To edit your own profile, start by selecting Profile from the main menu or clicking your own username. You can also view (but not edit) other members' profiles by clicking on their names.

    +
      +
    1. + Information Normally Available to all Members +
        +
      1. Profile Info
      2. +
      +
    2. +
    3. + Settings Normally Available to Profile Owners +
        +
      1. Modify Profile
      2. +
      3. Actions
      4. +
      +
    4. +
    5. + Settings Normally Restricted to Admins +
        +
      1. Profile Info
      2. +
      3. Modify Profile
      4. +
      5. Actions
      6. +
      +
    6. +
    +

    Information Normally Available to all Members

    +

    Profile Info

    +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
      Username: Member's login namePicture/Text
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name:Member's screen name
    Posts:Member's number of posts
    Position:Member's member group or post group
    Date Registered:Date and time of registration
    Last Active:Date and time last active
    +
    +
    ICQ:
    AIM:
    MSN:
    YIM:
    Email:member@their.address
    Website:
    Current Status:Online Online
    +
    +
    Gender:
    Age:N/A
    Location:
    Local Time:Current date and time in member's time zone
    Language:
    +
    +
    + + + + + + + +
    Signature:
    +
    +

    +
    Additional Information:
    Send this member a personal message.
    +
    + Show the last posts of this person.
    + Show general statistics for this member.
    +
    +

    +
    +

    +
      +
    • This Summary screen is not only there to tell you about others, but also the first screen that you see when editing your own profile.
    • +
    • Members may choose to hide their email address and/or online status.
    • +
    • The fields left empty here are not filled in by default, so you should edit your profile if you wish to display this information.
    • +
    • You can send the profile owner a Personal Message by clicking the Current Status On/Offline Icon or following the link from Additional Information below.
    • +
    • Show the last posts of this person links to a complete paginated listing of the member's posts.
    • +
    • Show general statistics for this member links to a screen of statistics about the member's time online and posting activity.
    • +
    +

    Settings Normally Available to Profile Owners

    +

    While the Summary screen is the same as the one shown above and the Show Posts and Show Stats links are effectively duplicates, profile owners are also provided with the tools to customize their own profiles:

    +

    Modify Profile

    +
      +
    • Account Related Settings enables you to make changes to your display name (your login or username can only be changed by an administrator), preferred language (if the forum administrators have installed alternative language packs), email and password settings.
    • +
    • Forum Profile Information enables you to enter optional personal details such as gender, birthdate, location, website and instant messenger contact information. It's also where you go to enter your own personal text and signature and select an avatar (personal picture) from a list (if provided by the forum administrators) or link to one of your own on the web.
    • +
    • Look and Layout Preferences enables you to select your preferred theme (forum skin), time zone and format and other personal choices for layout settings. Note that the currently selected option in the menu pane is highlighted in bold type:
    • +
    +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Profile Info
    Summary
    + Show Stats
    + Show Posts
    +
    Modify Profile
    Account Related Settings
    + Forum Profile Information
    + Look and Layout Preferences
    + Notifications and Email
    + Personal Message Options
    +
    Actions
    Delete this account
    +
    +
    +
    + + + + + + + + + + +
       Edit Profile

    + This section allows you to customize the look and layout of the forum.
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Current Theme: Forum or Board Default (change)
    +
    +
    Time Format:
    + Help The format here will be used to show dates throughout this forum.

    +
    + Time Offset: +
    + Number of hours to +/- to make displayed time equal to your local time. +
    +

    + (Current forum time should be displayed here.)
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Show board descriptions inside boards.
    Show child boards on every page inside boards, not just the first.
    Don't show other user's avatars.
    Don't show other user's signatures.
    Return to topics after posting by default.
    Show most recent posts at the top.
    Show most recent personal messages at top.
    First day of the week on the calendar::
    Use quick reply on topic display:
    Show quick-moderation on message index as 
    +
    +
    +

    +
    +
    +

    +
    +

    +
      +
    • Notifications and Email enables you to select personal preferences for notifications (emails about new topics/replies) and lists any notifications that you have set up.
    • +
    • Personal Message Options enables you to set up an ignore list (blacklist) for Personal Messages, to request notification of new PMs by email and to save copies of your outgoing PMs by default.
    • +
    +

    Actions

    +
      +
    • Delete this account does exactly what it says! Yes, there's a confirmation screen, but it really does delete your own account, so be careful...
    • +
    +

    Settings Normally Restricted to Admins

    +

    As well as being able to view/edit any of the details above from other members' profiles, some further options are normally visible to (and executable by) admins only:

    +
    +
    +
    +

    Profile Info

    +
      +
    • Track User provides a list of IP numbers used by the member, other members who might be in the same IP range and error messages generated/experienced by the member.
    • +
    • Track IP provides tools for tracking members, messages and errors from any specified IP range.
    • +
    • Show Permissions lists the board permissions that have been granted to the member and who gave them.
    • +
    +

    Modify Profile

    +
      +
    • Account Related Settings is basically the same screen as shown to profile owners, but with the additional option to assign members to member groups.
    • +
    • Forum Profile Information is basically the same screen as shown to profile owners, but with the additional option to specify custom titles for members.
    • +
    +

    Actions

    +
      +
    • Ban this user provides tools for banning users, configuring the level of the ban and maintaining a ban list noting the details of any bans in force.
    • +
    • Delete this account is similar to the screen of the same name available to all members, but the confirmation question is different when it's not your own account that's about to be deleted.
    • +
    +
    +

    + + + \ No newline at end of file diff --git a/Themes/fixed/help/profile.english.xml b/Themes/fixed/help/profile.english.xml new file mode 100644 index 0000000..1e17f1e --- /dev/null +++ b/Themes/fixed/help/profile.english.xml @@ -0,0 +1,194 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Profile + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + The profile screen in the default theme normally consists of a single main pane, with an additional menu to the left to lead you through the editing options for your own profile. Please note that, because an SMF forum may be customized extensively by its administrator(s), the features and user permissions described here are typical rather than definitive. + To edit your own profile, start by selecting Profile from the main menu or clicking your own username. You can also view (but not edit) other members' profiles by clicking on their names. + +
    + Information Normally Available to all Members + + Profile Info + + + Username + Member's login name + Picture/Text + Name + Member's screen name + Posts + Member's number of posts + Position + Member's member group or post group + Date Registered + Date and time of registration + Last Active + Date and time last active + + Email + member@their.address + Website + Current Status + Personal Message + Online + Gender + Age + N/A + Location + Local Time + Current date and time in member's time zone + Language + Signature + Additional Information + Send this member a personal message. + Show the last posts of this person. + Show general statistics for this member. + + + This Summary screen is not only there to tell you about others, but also the first screen that you see when editing your own profile. + Members may choose to hide their email address and/or online status. + The fields left empty here are not filled in by default, so you should edit your profile if you wish to display this information. + You can send the profile owner a Personal Message by clicking the Current Status On/Offline Icon or following the link from Additional Information below. + Show the last posts of this person links to a complete paginated listing of the member's posts. + Show general statistics for this member links to a screen of statistics about the member's time online and posting activity. + + +
    +
    + Settings Normally Available to Profile Owners + While the Summary screen is the same as the one shown above and the Show Posts and Show Stats links are effectively duplicates, profile owners are also provided with the tools to customize their own profiles: + + Modify Profile + + Account Related Settings enables you to make changes to your display name (your login or username can only be changed by an administrator), preferred language (if the forum administrators have installed alternative language packs), email and password settings. + Forum Profile Information enables you to enter optional personal details such as gender, birthdate, location, website and instant messenger contact information. It's also where you go to enter your own personal text and signature and select an avatar (personal picture) from a list (if provided by the forum administrators) or link to one of your own on the web. + Look and Layout Preferences enables you to select your preferred theme (forum skin), time zone and format and other personal choices for layout settings. Note that the currently selected option in the menu pane is highlighted in bold type: + + + + Profile Info + Summary + Show Stats + Show Posts + Modify Profile + Edit Profile + Account Related Settings + Forum Profile Information + Look and Layout Preferences + Notifications and Email + Personal Message Options + Actions + Delete this account + This section allows you to customize the look and layout of the forum. + Current Theme + Forum or Board Default + change + Time Format + Help + The format here will be used to show dates throughout this forum. + Forum Default + Month Day, Year, HH:MM:SS a/pm + Month Day, Year, HH:MM:SS (army time.) + YYYY-MM-DD, HH:MM:SS + DD Month YYYY, HH:MM:SS + DD-MM-YYYY, HH:MM:SS + Time Offset + Number of hours to +/- to make displayed time equal to your local time. + Current forum time should be displayed here. + Show board descriptions inside boards. + Show child boards on every page inside boards, not just the first. + Don't show other user's avatars. + Don't show other user's signatures. + Return to topics after posting by default. + Show most recent posts at the top. + Show most recent personal messages at top. + Use quick reply on topic display + don't show at all + show, off by default + show, on by default + Show quick-moderation on message index as + don't show + checkboxes + icons + First day of the week on the calendar: + Sunday + Monday + Change profile + + + Notifications and Email enables you to select personal preferences for notifications (emails about new topics/replies) and lists any notifications that you have set up. + Personal Message Options enables you to set up an ignore list (blacklist) for Personal Messages, to request notification of new PMs by email and to save copies of your outgoing PMs by default. + + + + Actions + + Delete this account does exactly what it says! Yes, there's a confirmation screen, but it really does delete your own account, so be careful... + + +
    +
    + Settings Normally Restricted to Admins + As well as being able to view/edit any of the details above from other members' profiles, some further options are normally visible to (and executable by) admins only: + + + + Track User + Track IP + Show Permissions + Ban this user + + + + Profile Info + + Track User provides a list of IP numbers used by the member, other members who might be in the same IP range and error messages generated/experienced by the member. + Track IP provides tools for tracking members, messages and errors from any specified IP range. + Show Permissions lists the board permissions that have been granted to the member and who gave them. + + + + Modify Profile + + Account Related Settings is basically the same screen as shown to profile owners, but with the additional option to assign members to member groups. + Forum Profile Information is basically the same screen as shown to profile owners, but with the additional option to specify custom titles for members. + + + + Actions + + Ban this user provides tools for banning users, configuring the level of the ban and maintaining a ban list noting the details of any bans in force. + Delete this account is similar to the screen of the same name available to all members, but the confirmation question is different when it's not your own account that's about to be deleted. + + + + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/fixed/help/profile.russian.html b/Themes/fixed/help/profile.russian.html new file mode 100644 index 0000000..f4695e4 --- /dev/null +++ b/Themes/fixed/help/profile.russian.html @@ -0,0 +1,466 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    , + . , , + , + .

    +

    , . , ( ) , .

    +
      +
    1. + , +
        +
      1. +
      +
    2. +
    3. + , +
        +
      1. +
      2. +
      +
    4. +
    5. + , +
        +
      1. +
      2. +
      3. +
      +
    6. +
    +

    ,

    +

    +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
      :  () /
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    +
    +
    ICQ:
    AIM:
    MSN:
    YIM:
    E-mail:@.
    :
    :Online Online
    +
    +
    :
    :N/A
    :
    :
    :
    +
    +
    + + + + + + + +
    :
    +
    +

    +
    :
    .
    +
    + .
    + .
    +
    +

    +
    +

    +
      +
    • - , .
    • +
    • e-mail / .
    • +
    • , , , , .
    • +
    • On/Offline .
    • +
    • - , .
    • +
    • - ( , ).
    • +
    +

    ,

    +

    , , :

    +

    +
      +
    • ( ), ( ), e-mail .
    • +
    • , , , , . ( ) ( , ) .
    • +
    • , , , . :
    • +
    +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + +

    +
    +
    +

    +
    +
    + e-mail
    +
    +

    +
    +
    +
    + + + + + + + + + + +
      

    + .
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :   ()
    +
    +
    :
    + Help .

    +
    + : +
    + +/- . +
    +

    + ( .)
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    .
    , .
    .
    , .
    .
    .
    :
    :
     
    +
    +
    +

    +
    +
    +

    +
    +

    +
      +
    • e-mail (e-mail /) , .
    • +
    • () , .
    • +
    +

    +
      +
    • . ! , + , + !
    • +
    +

    ,

    +

    , , , :

    +
    +
    + + + + + + + + + + + + + + + + + + + +

    +
    +
    +
    + IP
    +
    +

    +
    +
    + e-mail
    +
    +

    +
    +
    +

    +
    +

    +
      +
    • IP , , , / ( ) .
    • +
    • IP , IP.
    • +
    • , , .
    • +
    +

    +
      +
    • s , .
    • +
    • , .
    • +
    +

    +
      +
    • , .
    • +
    • , .
    • +
    +
    +

    + + + diff --git a/Themes/fixed/help/profile.xslt b/Themes/fixed/help/profile.xslt new file mode 100644 index 0000000..88c7f34 --- /dev/null +++ b/Themes/fixed/help/profile.xslt @@ -0,0 +1,446 @@ + + + + +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
    +   + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :

    ICQ:
    AIM:
    MSN:
    YIM:
    : + + + +
    :
    : + + + + + () + + + + + + + + +

    :
    :
    :
    :
    + : + +

    + + + + + + + +
    :
    +
    +
    +
    +
    +
    :
    + + + +
    +
    + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + + + +
    +    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + :  () +

    + :
    + + + {help} + +
    +
    + +
    :

    ()

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    : + +
    : + +
      + +
    +

    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    + +
    +
    + +
    \ No newline at end of file diff --git a/Themes/fixed/help/registering.english.html b/Themes/fixed/help/registering.english.html new file mode 100644 index 0000000..f1210e0 --- /dev/null +++ b/Themes/fixed/help/registering.english.html @@ -0,0 +1,118 @@ + + + + + + + + + SMF User Help: Registering + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Registering


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    When you have set up your SMF forum, or wish to join another SMF forum, you should register a username. This will enable you to maintain a consistent identity while posting and keep track of what you've read, no matter where you're working from or what computer you're using. You'll be able to fill out a personal profile and use the built-in personal message system. You'll be able to subscribe to email notifications, monitor your forum activity and more.

    +
      +
    1. How to Register
    2. +
    3. The Registration Screen
    4. +
    +

    How to Register

    +

    Assuming you've arrived at the forum as a guest and wish to register, you should be looking at one of these two things:

    +
      +
    • Any page of the forum, in which you case you should select Register from the main menu.
    • +
    • A login screen headed by a warning about access being restricted to registered members, in which case you should either use the registration link provided or select Register from the main menu.
    • +
    + + + + + + + +
    Warning!
    Only registered members are allowed to access this section.
    + Please login below or register an account with Forum Name.

    +

    The Registration Screen

    +
    +
    +
    + + + + + + + +
    Register - Required Information
    + + + + + + + + + + + + + + + + + +
    + Choose username: +
    + Used only for identification by SMF. You can use special characters after logging in, by changing your displayed name in your profile. +
    +
    + Email: +
    + This must be a valid email address. +
    +
    Choose password:
    Verify password:
    +
    + + + + + + + +
    This is where the registration agreement should be if there is one!

    +
    + +
    +
    +
    +

    +

    When you arrive at the registration screen, you will need to enter a username, email address and password, and may be offered the option of hiding your email address. Since most forums also require you to agree to their terms of use before your registration is accepted, you will normally have to read the agreement and check I Agree before continuing. What happens next depends on how the forum is configured, but, if the next thing you see is a login screen headed by a message inviting you to proceed, that's it, you're through and you can proceed to login! If not, there are two further possibilities:

    +
      +
    • If registration has been configured to require email activation, the next screen will tell you so and you should receive an immediate email with instructions about how to proceed. But there's also a useful link ('Did you miss your activation email?') in the User Info box in case you miss this email or mistype your email address.
    • +
    • If registration has been configured to require approval from a forum administrator, the next screen will tell you so and you should receive both an acknowledgement by email and another email later to inform you whether or not your application has been approved.
    • +
    + + + \ No newline at end of file diff --git a/Themes/fixed/help/registering.english.xml b/Themes/fixed/help/registering.english.xml new file mode 100644 index 0000000..33c5479 --- /dev/null +++ b/Themes/fixed/help/registering.english.xml @@ -0,0 +1,66 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Registering + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + When you have set up your SMF forum, or wish to join another SMF forum, you should register a username. This will enable you to maintain a consistent identity while posting and keep track of what you've read, no matter where you're working from or what computer you're using. You'll be able to fill out a personal profile and use the built-in personal message system. You'll be able to subscribe to email notifications, monitor your forum activity and more. + +
    + How to Register + Assuming you've arrived at the forum as a guest and wish to register, you should be looking at one of these two things: + + Any page of the forum, in which you case you should select Register from the main menu. + A login screen headed by a warning about access being restricted to registered members, in which case you should either use the registration link provided or select Register from the main menu. + + + + Warning! + Only registered members are allowed to access this section. + Please login below or + register an account + with Forum Name. + +
    +
    + The Registration Screen + + + Register - Required Information + Choose username + Used only for identification by SMF. You can use special characters after logging in, by changing your displayed name in your profile. + Email + This must be a valid email address. + Hide email address from public? + Choose password + Verify password + This is where the registration agreement should be if there is one! + I Agree + Register + + When you arrive at the registration screen, you will need to enter a username, email address and password, and may be offered the option of hiding your email address. Since most forums also require you to agree to their terms of use before your registration is accepted, you will normally have to read the agreement and check I Agree before continuing. What happens next depends on how the forum is configured, but, if the next thing you see is a login screen headed by a message inviting you to proceed, that's it, you're through and you can proceed to login! If not, there are two further possibilities: + + If registration has been configured to require email activation, the next screen will tell you so and you should receive an immediate email with instructions about how to proceed. But there's also a useful link ('Did you miss your activation email?') in the User Info box in case you miss this email or mistype your email address. + If registration has been configured to require approval from a forum administrator, the next screen will tell you so and you should receive both an acknowledgement by email and another email later to inform you whether or not your application has been approved. + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/fixed/help/registering.russian.html b/Themes/fixed/help/registering.russian.html new file mode 100644 index 0000000..cadd785 --- /dev/null +++ b/Themes/fixed/help/registering.russian.html @@ -0,0 +1,118 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    "" , SMF - ...! ( SMF ...), , . . .

    +
      +
    1. +
    2. +
    +

    +

    , + :

    +
      +
    • .
    • +
    • , , : , .
    + + + + + + + +
    !
    .
    + , .

    +

    +
    +
    +
    + + + + + + + +
    -
    + + + + + + + + + + + + + + + + + +
    + : +
    + . , , . , . +
    +
    + E-mail: +
    + e-mail . +
    +
    :
    :
    +
    + + + + + + + +
    , , !

    +
    + +
    +
    +
    +

    +

    , e-mail . e-mail , . , . , . , , - , , - ! ! ( , , , ) - :

    +
      +
    • , e-mail . , , . e-mail, ? .
    • +
    • , . , .
    • +
    + + + diff --git a/Themes/fixed/help/registering.xslt b/Themes/fixed/help/registering.xslt new file mode 100644 index 0000000..152f8cd --- /dev/null +++ b/Themes/fixed/help/registering.xslt @@ -0,0 +1,100 @@ + + + + + + + + + + + +
    + +
    + +
    + + + +
    +
    +
    + + +
    +
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + +
    + : +
    +
    + +
    + : +
    +
    + + +
    + : + + +
    + : + + +
    +
    + + + + + + + +
    + +
    + +
    +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/fixed/help/searching.english.html b/Themes/fixed/help/searching.english.html new file mode 100644 index 0000000..2fac14e --- /dev/null +++ b/Themes/fixed/help/searching.english.html @@ -0,0 +1,167 @@ + + + + + + + + + SMF User Help: Searching + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Searching


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    While SMF naturally incorporates a powerful search engine, knowing how to use it is not surprisingly the key to returning successful results!

    +
      +
    1. Starting a Search
    2. +
    3. + Syntax +
        +
      1. Quote Marks
      2. +
      +
    4. +
    5. + Simple or Advanced? +
        +
      1. Simple Search
      2. +
      3. Advanced Search
      4. +
      +
    6. +
    +

    Starting a Search

    +

    Assuming the forum is running the SMF default theme (or a derivative of it), there should be both a simple Search field (partnered by an Advanced search text link) in the collapsable top section and a Search option in the main menu. If not, the main menu Search option should still lead straight to the advanced search screen.

    +

    Syntax

    +

    While you can just type (and search for) any combination of characters, you should consider using quotes to make your search really work for you:

    +

    Quote Marks

    +

    To put this in a nutshell, searching for simple machines forum will return any or all of these three words, but enclosing the search string in double quote marks (ie "simple machines forum") will return only the entire phrase.

    +

    Simple or Advanced?

    +

    Simple Search

    +

    To use the simple search (if enabled), the basic syntax outlined above is all you really need to know. But you might also like to know that this tool searches the entire forum for any or all of what you specify that's been posted during the last 9999 days (which is more than 27 years)! So, to take more control of your search, you should use the advanced search feature.

    +

    Advanced Search

    +

    Although the advanced search screen might initially seem a little intimidating if a forum has many boards and child boards, it's surprisingly straightforward when reduced to its basic components:

    +
    +
    +
    + + + + +
    +  Forum Name
    + |- +  Search
    + + + + + + + +
    Set Search Parameters
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Search for: by user:
        
     
    Options:Message age:

    +
    Between and days.
    Search order:

    + Choose a board to search in, or search all:
    +
    + + + + + + + + +
    Category name

    +
    +
    + + + + +
    +

    +
    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • Despite initial appearances, there are really three options for how to search, with Match all words and Match any words being available from the drop-down, and "Match as phrase" still being available as described above.
    • +
    • The default * in the by user field is essentially a wildcard matching any poster. Please note that, while you can replace this with any single username for a more specific search, it's not currently possible to search for posts by multiple users except as that single wildcard.
    • +
    • Show results as messages returns the full message containing the search string (with a reply option) instead of the usual linked excerpt, but will naturally result in much larger results pages which might be significant if you are searching for a popular word or phrase.
    • +
    • Message age sets the minimum and maximum ages of posts to search.
    • +
    • Choose a board to search in provides you with another tool to narrow the scope of the search, with the default being 'all' (the whole forum or, more properly, all the boards to which you have read access).
    • +
    • The Search button not surprisingly sets the whole thing in motion, but hitting 'Enter' direct from any of the search fields is sometimes more convenient.
    • +
    + + + \ No newline at end of file diff --git a/Themes/fixed/help/searching.english.xml b/Themes/fixed/help/searching.english.xml new file mode 100644 index 0000000..322437e --- /dev/null +++ b/Themes/fixed/help/searching.english.xml @@ -0,0 +1,94 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Searching + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + While SMF naturally incorporates a powerful search engine, knowing how to use it is not surprisingly the key to returning successful results! + +
    + Starting a Search + Assuming the forum is running the SMF default theme (or a derivative of it), there should be both a simple Search field (partnered by an Advanced search text link) in the collapsable top section and a Search option in the main menu. If not, the main menu Search option should still lead straight to the advanced search screen. +
    +
    + Syntax + While you can just type (and search for) any combination of characters, you should consider using quotes to make your search really work for you: + + Quote Marks + To put this in a nutshell, searching for simple machines forum will return any or all of these three words, but enclosing the search string in double quote marks (ie "simple machines forum") will return only the entire phrase. + + +
    +
    + Simple or Advanced? + + Simple Search + To use the simple search (if enabled), the basic syntax outlined above is all you really need to know. But you might also like to know that this tool searches the entire forum for any or all of what you specify that's been posted during the last 9999 days (which is more than 27 years)! So, to take more control of your search, you should use the advanced search feature. + + + Advanced Search + Although the advanced search screen might initially seem a little intimidating if a forum has many boards and child boards, it's surprisingly straightforward when reduced to its basic components: + + + Forum Name + Search + Set Search Parameters + Search for + Match all words + Match any words + by user + Options + Message age + Show results as messages + Topic subjects only + Between + and + days + Search order + Most relevant results first + Largest topics first + Smallest topics first + Most recent topics first + Oldest topics first + Choose a board to search in, or search all + Category name + Board Name + Another Board + Check all + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + Despite initial appearances, there are really three options for how to search, with and being available from the drop-down, and "Match as phrase" still being available as described above. + The default * in the by user field is essentially a wildcard matching any poster. Please note that, while you can replace this with any single username for a more specific search, it's not currently possible to search for posts by multiple users except as that single wildcard. + Show results as messages returns the full message containing the search string (with a reply option) instead of the usual linked excerpt, but will naturally result in much larger results pages which might be significant if you are searching for a popular word or phrase. + Message age sets the minimum and maximum ages of posts to search. + Choose a board to search in provides you with another tool to narrow the scope of the search, with the default being 'all' (the whole forum or, more properly, all the boards to which you have read access). + The Search button not surprisingly sets the whole thing in motion, but hitting 'Enter' direct from any of the search fields is sometimes more convenient. + + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/fixed/help/searching.russian.html b/Themes/fixed/help/searching.russian.html new file mode 100644 index 0000000..2209e46 --- /dev/null +++ b/Themes/fixed/help/searching.russian.html @@ -0,0 +1,167 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    , , !

    +
      +
    1. +
    2. + +
        +
      1. +
      +
    3. +
    4. + ? +
        +
      1. +
      2. +
      +
    5. +
    +

    +

    , ( ) , .

    +

    +

    ( ) , , :

    +

    +

    , , , , ( " ") - , .

    +

    ?

    +

    +

    ( ) . , 9999 ( 27 )! , .

    +

    +

    , , , , :

    +
    +
    +
    + + + + +
    + 
    + |- + 
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :  :
        
     
    : :

    +
    .
    :

    + :
    +
    + + + + + + + + +

    +
    +
    + + + + +
    +

    +
    +
    +

    +
      +
    • ( ) .
    • +
    • , , .
    • +
    • *, , - , . , , *.
    • +
    • , , , , .
    • +
    • , .
    • +
    • . ' ' ( , , , ).
    • +
    • ( ...), 'Enter', , .
    • +
    + + + diff --git a/Themes/fixed/help/searching.xslt b/Themes/fixed/help/searching.xslt new file mode 100644 index 0000000..2e7a05b --- /dev/null +++ b/Themes/fixed/help/searching.xslt @@ -0,0 +1,133 @@ + + + + +
    +
    +
    + + + + +
    + + +  + +
    + |- + +  + +
    +
    + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    : :
    +     +  
     
    ::
    +
    +
    +
    + + + + + . +
    :
    + +
    +
    + : +
    +
    + + + + + + + + +
    + + + + + + +
    + + +
    +
    + +
    +
    + + + + +
    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/fixed/help/style.xslt b/Themes/fixed/help/style.xslt new file mode 100644 index 0000000..e5e076a --- /dev/null +++ b/Themes/fixed/help/style.xslt @@ -0,0 +1,207 @@ + + + +]> + + + + + + + + + + + + + + + + + + Version: 1.0; help/ + + + + + <xsl:value-of select="title" /> + + + + + + + + + + + + + + + + + + + + + + +
    + + {//visit-simple-machines} + + + {//visit-simple-machines} +

    +
    +
    +

    + + + + + + + + + + + + + + + +

    +
    +
    +
    + + + + + + + + + +
      + +
    1. + + + + +
        + +
      1. + + + +
      2. +
        +
      +
      +
    2. +
      +
    +
    + + + + + + + + + + +

    + +

    + +
    + + +

    + +

    + +
    + + +

    +
    + + + + + + + + + + +
    +
    + + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Themes/fixed/images/Female.gif b/Themes/fixed/images/Female.gif new file mode 100644 index 0000000..2aecd56 Binary files /dev/null and b/Themes/fixed/images/Female.gif differ diff --git a/Themes/fixed/images/Male.gif b/Themes/fixed/images/Male.gif new file mode 100644 index 0000000..b12b710 Binary files /dev/null and b/Themes/fixed/images/Male.gif differ diff --git a/Themes/fixed/images/aim.gif b/Themes/fixed/images/aim.gif new file mode 100644 index 0000000..fa09556 Binary files /dev/null and b/Themes/fixed/images/aim.gif differ diff --git a/Themes/fixed/images/bar.gif b/Themes/fixed/images/bar.gif new file mode 100644 index 0000000..c1020a0 Binary files /dev/null and b/Themes/fixed/images/bar.gif differ diff --git a/Themes/fixed/images/bbc/bbc_bg.gif b/Themes/fixed/images/bbc/bbc_bg.gif new file mode 100644 index 0000000..0c8518e Binary files /dev/null and b/Themes/fixed/images/bbc/bbc_bg.gif differ diff --git a/Themes/fixed/images/bbc/bbc_hoverbg.gif b/Themes/fixed/images/bbc/bbc_hoverbg.gif new file mode 100644 index 0000000..7874fb5 Binary files /dev/null and b/Themes/fixed/images/bbc/bbc_hoverbg.gif differ diff --git a/Themes/fixed/images/bbc/bold.gif b/Themes/fixed/images/bbc/bold.gif new file mode 100644 index 0000000..7d21f0a Binary files /dev/null and b/Themes/fixed/images/bbc/bold.gif differ diff --git a/Themes/fixed/images/bbc/center.gif b/Themes/fixed/images/bbc/center.gif new file mode 100644 index 0000000..736bc87 Binary files /dev/null and b/Themes/fixed/images/bbc/center.gif differ diff --git a/Themes/fixed/images/bbc/code.gif b/Themes/fixed/images/bbc/code.gif new file mode 100644 index 0000000..645e7b5 Binary files /dev/null and b/Themes/fixed/images/bbc/code.gif differ diff --git a/Themes/fixed/images/bbc/divider.gif b/Themes/fixed/images/bbc/divider.gif new file mode 100644 index 0000000..d4f35e1 Binary files /dev/null and b/Themes/fixed/images/bbc/divider.gif differ diff --git a/Themes/fixed/images/bbc/email.gif b/Themes/fixed/images/bbc/email.gif new file mode 100644 index 0000000..de68993 Binary files /dev/null and b/Themes/fixed/images/bbc/email.gif differ diff --git a/Themes/fixed/images/bbc/face.gif b/Themes/fixed/images/bbc/face.gif new file mode 100644 index 0000000..6cddfbc Binary files /dev/null and b/Themes/fixed/images/bbc/face.gif differ diff --git a/Themes/fixed/images/bbc/flash.gif b/Themes/fixed/images/bbc/flash.gif new file mode 100644 index 0000000..9115380 Binary files /dev/null and b/Themes/fixed/images/bbc/flash.gif differ diff --git a/Themes/fixed/images/bbc/ftp.gif b/Themes/fixed/images/bbc/ftp.gif new file mode 100644 index 0000000..344f5cd Binary files /dev/null and b/Themes/fixed/images/bbc/ftp.gif differ diff --git a/Themes/fixed/images/bbc/glow.gif b/Themes/fixed/images/bbc/glow.gif new file mode 100644 index 0000000..0f0dce7 Binary files /dev/null and b/Themes/fixed/images/bbc/glow.gif differ diff --git a/Themes/fixed/images/bbc/hr.gif b/Themes/fixed/images/bbc/hr.gif new file mode 100644 index 0000000..433f8a7 Binary files /dev/null and b/Themes/fixed/images/bbc/hr.gif differ diff --git a/Themes/fixed/images/bbc/img.gif b/Themes/fixed/images/bbc/img.gif new file mode 100644 index 0000000..02817e7 Binary files /dev/null and b/Themes/fixed/images/bbc/img.gif differ diff --git a/Themes/fixed/images/bbc/italicize.gif b/Themes/fixed/images/bbc/italicize.gif new file mode 100644 index 0000000..68c7147 Binary files /dev/null and b/Themes/fixed/images/bbc/italicize.gif differ diff --git a/Themes/fixed/images/bbc/left.gif b/Themes/fixed/images/bbc/left.gif new file mode 100644 index 0000000..87bd529 Binary files /dev/null and b/Themes/fixed/images/bbc/left.gif differ diff --git a/Themes/fixed/images/bbc/list.gif b/Themes/fixed/images/bbc/list.gif new file mode 100644 index 0000000..95494c0 Binary files /dev/null and b/Themes/fixed/images/bbc/list.gif differ diff --git a/Themes/fixed/images/bbc/move.gif b/Themes/fixed/images/bbc/move.gif new file mode 100644 index 0000000..a0d65ec Binary files /dev/null and b/Themes/fixed/images/bbc/move.gif differ diff --git a/Themes/fixed/images/bbc/pre.gif b/Themes/fixed/images/bbc/pre.gif new file mode 100644 index 0000000..e42bfd6 Binary files /dev/null and b/Themes/fixed/images/bbc/pre.gif differ diff --git a/Themes/fixed/images/bbc/quote.gif b/Themes/fixed/images/bbc/quote.gif new file mode 100644 index 0000000..07a6195 Binary files /dev/null and b/Themes/fixed/images/bbc/quote.gif differ diff --git a/Themes/fixed/images/bbc/right.gif b/Themes/fixed/images/bbc/right.gif new file mode 100644 index 0000000..54d74aa Binary files /dev/null and b/Themes/fixed/images/bbc/right.gif differ diff --git a/Themes/fixed/images/bbc/shadow.gif b/Themes/fixed/images/bbc/shadow.gif new file mode 100644 index 0000000..84145d1 Binary files /dev/null and b/Themes/fixed/images/bbc/shadow.gif differ diff --git a/Themes/fixed/images/bbc/size.gif b/Themes/fixed/images/bbc/size.gif new file mode 100644 index 0000000..d7e5724 Binary files /dev/null and b/Themes/fixed/images/bbc/size.gif differ diff --git a/Themes/fixed/images/bbc/strike.gif b/Themes/fixed/images/bbc/strike.gif new file mode 100644 index 0000000..9d42fc3 Binary files /dev/null and b/Themes/fixed/images/bbc/strike.gif differ diff --git a/Themes/fixed/images/bbc/sub.gif b/Themes/fixed/images/bbc/sub.gif new file mode 100644 index 0000000..03fb567 Binary files /dev/null and b/Themes/fixed/images/bbc/sub.gif differ diff --git a/Themes/fixed/images/bbc/sup.gif b/Themes/fixed/images/bbc/sup.gif new file mode 100644 index 0000000..fa936d0 Binary files /dev/null and b/Themes/fixed/images/bbc/sup.gif differ diff --git a/Themes/fixed/images/bbc/table.gif b/Themes/fixed/images/bbc/table.gif new file mode 100644 index 0000000..d98b438 Binary files /dev/null and b/Themes/fixed/images/bbc/table.gif differ diff --git a/Themes/fixed/images/bbc/td.gif b/Themes/fixed/images/bbc/td.gif new file mode 100644 index 0000000..4880caf Binary files /dev/null and b/Themes/fixed/images/bbc/td.gif differ diff --git a/Themes/fixed/images/bbc/tele.gif b/Themes/fixed/images/bbc/tele.gif new file mode 100644 index 0000000..2f5077d Binary files /dev/null and b/Themes/fixed/images/bbc/tele.gif differ diff --git a/Themes/fixed/images/bbc/tr.gif b/Themes/fixed/images/bbc/tr.gif new file mode 100644 index 0000000..2ef31de Binary files /dev/null and b/Themes/fixed/images/bbc/tr.gif differ diff --git a/Themes/fixed/images/bbc/underline.gif b/Themes/fixed/images/bbc/underline.gif new file mode 100644 index 0000000..c667ed4 Binary files /dev/null and b/Themes/fixed/images/bbc/underline.gif differ diff --git a/Themes/fixed/images/bbc/url.gif b/Themes/fixed/images/bbc/url.gif new file mode 100644 index 0000000..712e6e9 Binary files /dev/null and b/Themes/fixed/images/bbc/url.gif differ diff --git a/Themes/fixed/images/bdaycake.gif b/Themes/fixed/images/bdaycake.gif new file mode 100644 index 0000000..67693ee Binary files /dev/null and b/Themes/fixed/images/bdaycake.gif differ diff --git a/Themes/fixed/images/blank.gif b/Themes/fixed/images/blank.gif new file mode 100644 index 0000000..5bfd67a Binary files /dev/null and b/Themes/fixed/images/blank.gif differ diff --git a/Themes/fixed/images/board.gif b/Themes/fixed/images/board.gif new file mode 100644 index 0000000..b3bc440 Binary files /dev/null and b/Themes/fixed/images/board.gif differ diff --git a/Themes/fixed/images/box_bg.gif b/Themes/fixed/images/box_bg.gif new file mode 100644 index 0000000..19239a3 Binary files /dev/null and b/Themes/fixed/images/box_bg.gif differ diff --git a/Themes/fixed/images/catbg.jpg b/Themes/fixed/images/catbg.jpg new file mode 100644 index 0000000..5d24d4b Binary files /dev/null and b/Themes/fixed/images/catbg.jpg differ diff --git a/Themes/fixed/images/catbg2.jpg b/Themes/fixed/images/catbg2.jpg new file mode 100644 index 0000000..794ea87 Binary files /dev/null and b/Themes/fixed/images/catbg2.jpg differ diff --git a/Themes/fixed/images/cddisc.gif b/Themes/fixed/images/cddisc.gif new file mode 100644 index 0000000..da9f2d9 Binary files /dev/null and b/Themes/fixed/images/cddisc.gif differ diff --git a/Themes/fixed/images/collapse.gif b/Themes/fixed/images/collapse.gif new file mode 100644 index 0000000..6c755db Binary files /dev/null and b/Themes/fixed/images/collapse.gif differ diff --git a/Themes/fixed/images/construction.gif b/Themes/fixed/images/construction.gif new file mode 100644 index 0000000..38a9bb9 Binary files /dev/null and b/Themes/fixed/images/construction.gif differ diff --git a/Themes/fixed/images/email_sm.gif b/Themes/fixed/images/email_sm.gif new file mode 100644 index 0000000..a0ce41b Binary files /dev/null and b/Themes/fixed/images/email_sm.gif differ diff --git a/Themes/fixed/images/english/addpoll.gif b/Themes/fixed/images/english/addpoll.gif new file mode 100644 index 0000000..0fb5bd8 Binary files /dev/null and b/Themes/fixed/images/english/addpoll.gif differ diff --git a/Themes/fixed/images/english/admin.gif b/Themes/fixed/images/english/admin.gif new file mode 100644 index 0000000..4b9917f Binary files /dev/null and b/Themes/fixed/images/english/admin.gif differ diff --git a/Themes/fixed/images/english/admin_lock.gif b/Themes/fixed/images/english/admin_lock.gif new file mode 100644 index 0000000..866cf86 Binary files /dev/null and b/Themes/fixed/images/english/admin_lock.gif differ diff --git a/Themes/fixed/images/english/admin_move.gif b/Themes/fixed/images/english/admin_move.gif new file mode 100644 index 0000000..d54645c Binary files /dev/null and b/Themes/fixed/images/english/admin_move.gif differ diff --git a/Themes/fixed/images/english/admin_rem.gif b/Themes/fixed/images/english/admin_rem.gif new file mode 100644 index 0000000..e8fd812 Binary files /dev/null and b/Themes/fixed/images/english/admin_rem.gif differ diff --git a/Themes/fixed/images/english/admin_remove_poll.gif b/Themes/fixed/images/english/admin_remove_poll.gif new file mode 100644 index 0000000..1d29f66 Binary files /dev/null and b/Themes/fixed/images/english/admin_remove_poll.gif differ diff --git a/Themes/fixed/images/english/admin_sticky.gif b/Themes/fixed/images/english/admin_sticky.gif new file mode 100644 index 0000000..4158692 Binary files /dev/null and b/Themes/fixed/images/english/admin_sticky.gif differ diff --git a/Themes/fixed/images/english/calendar.gif b/Themes/fixed/images/english/calendar.gif new file mode 100644 index 0000000..a9ed143 Binary files /dev/null and b/Themes/fixed/images/english/calendar.gif differ diff --git a/Themes/fixed/images/english/calendarpe.gif b/Themes/fixed/images/english/calendarpe.gif new file mode 100644 index 0000000..743c799 Binary files /dev/null and b/Themes/fixed/images/english/calendarpe.gif differ diff --git a/Themes/fixed/images/english/delete.gif b/Themes/fixed/images/english/delete.gif new file mode 100644 index 0000000..21e0f80 Binary files /dev/null and b/Themes/fixed/images/english/delete.gif differ diff --git a/Themes/fixed/images/english/delete_selected.gif b/Themes/fixed/images/english/delete_selected.gif new file mode 100644 index 0000000..6869d30 Binary files /dev/null and b/Themes/fixed/images/english/delete_selected.gif differ diff --git a/Themes/fixed/images/english/go_down.gif b/Themes/fixed/images/english/go_down.gif new file mode 100644 index 0000000..b081d55 Binary files /dev/null and b/Themes/fixed/images/english/go_down.gif differ diff --git a/Themes/fixed/images/english/go_up.gif b/Themes/fixed/images/english/go_up.gif new file mode 100644 index 0000000..a0dc866 Binary files /dev/null and b/Themes/fixed/images/english/go_up.gif differ diff --git a/Themes/fixed/images/english/googlemap.gif b/Themes/fixed/images/english/googlemap.gif new file mode 100644 index 0000000..62e8e3c Binary files /dev/null and b/Themes/fixed/images/english/googlemap.gif differ diff --git a/Themes/fixed/images/english/help.gif b/Themes/fixed/images/english/help.gif new file mode 100644 index 0000000..0e1f65b Binary files /dev/null and b/Themes/fixed/images/english/help.gif differ diff --git a/Themes/fixed/images/english/home.gif b/Themes/fixed/images/english/home.gif new file mode 100644 index 0000000..8ac55bf Binary files /dev/null and b/Themes/fixed/images/english/home.gif differ diff --git a/Themes/fixed/images/english/im_delete.gif b/Themes/fixed/images/english/im_delete.gif new file mode 100644 index 0000000..77cbdd0 Binary files /dev/null and b/Themes/fixed/images/english/im_delete.gif differ diff --git a/Themes/fixed/images/english/im_inbox.gif b/Themes/fixed/images/english/im_inbox.gif new file mode 100644 index 0000000..3d044a7 Binary files /dev/null and b/Themes/fixed/images/english/im_inbox.gif differ diff --git a/Themes/fixed/images/english/im_new.gif b/Themes/fixed/images/english/im_new.gif new file mode 100644 index 0000000..bb4a5bc Binary files /dev/null and b/Themes/fixed/images/english/im_new.gif differ diff --git a/Themes/fixed/images/english/im_outbox.gif b/Themes/fixed/images/english/im_outbox.gif new file mode 100644 index 0000000..17d5d45 Binary files /dev/null and b/Themes/fixed/images/english/im_outbox.gif differ diff --git a/Themes/fixed/images/english/im_reload.gif b/Themes/fixed/images/english/im_reload.gif new file mode 100644 index 0000000..01a20bd Binary files /dev/null and b/Themes/fixed/images/english/im_reload.gif differ diff --git a/Themes/fixed/images/english/im_reply.gif b/Themes/fixed/images/english/im_reply.gif new file mode 100644 index 0000000..4a7c3d9 Binary files /dev/null and b/Themes/fixed/images/english/im_reply.gif differ diff --git a/Themes/fixed/images/english/im_visualw.gif b/Themes/fixed/images/english/im_visualw.gif new file mode 100644 index 0000000..9198751 Binary files /dev/null and b/Themes/fixed/images/english/im_visualw.gif differ diff --git a/Themes/fixed/images/english/keystats.gif b/Themes/fixed/images/english/keystats.gif new file mode 100644 index 0000000..e699165 Binary files /dev/null and b/Themes/fixed/images/english/keystats.gif differ diff --git a/Themes/fixed/images/english/linktocal.gif b/Themes/fixed/images/english/linktocal.gif new file mode 100644 index 0000000..5efc0b0 Binary files /dev/null and b/Themes/fixed/images/english/linktocal.gif differ diff --git a/Themes/fixed/images/english/login.gif b/Themes/fixed/images/english/login.gif new file mode 100644 index 0000000..532cd4d Binary files /dev/null and b/Themes/fixed/images/english/login.gif differ diff --git a/Themes/fixed/images/english/logout.gif b/Themes/fixed/images/english/logout.gif new file mode 100644 index 0000000..e983e6b Binary files /dev/null and b/Themes/fixed/images/english/logout.gif differ diff --git a/Themes/fixed/images/english/markread.gif b/Themes/fixed/images/english/markread.gif new file mode 100644 index 0000000..e302ea6 Binary files /dev/null and b/Themes/fixed/images/english/markread.gif differ diff --git a/Themes/fixed/images/english/markunread.gif b/Themes/fixed/images/english/markunread.gif new file mode 100644 index 0000000..2d24caf Binary files /dev/null and b/Themes/fixed/images/english/markunread.gif differ diff --git a/Themes/fixed/images/english/memberlist.gif b/Themes/fixed/images/english/memberlist.gif new file mode 100644 index 0000000..16ff52a Binary files /dev/null and b/Themes/fixed/images/english/memberlist.gif differ diff --git a/Themes/fixed/images/english/merge.gif b/Themes/fixed/images/english/merge.gif new file mode 100644 index 0000000..b4afc73 Binary files /dev/null and b/Themes/fixed/images/english/merge.gif differ diff --git a/Themes/fixed/images/english/mergeposts.gif b/Themes/fixed/images/english/mergeposts.gif new file mode 100644 index 0000000..c5acd1a Binary files /dev/null and b/Themes/fixed/images/english/mergeposts.gif differ diff --git a/Themes/fixed/images/english/modify.gif b/Themes/fixed/images/english/modify.gif new file mode 100644 index 0000000..955e2a8 Binary files /dev/null and b/Themes/fixed/images/english/modify.gif differ diff --git a/Themes/fixed/images/english/new.gif b/Themes/fixed/images/english/new.gif new file mode 100644 index 0000000..b4bab0e Binary files /dev/null and b/Themes/fixed/images/english/new.gif differ diff --git a/Themes/fixed/images/english/new_poll.gif b/Themes/fixed/images/english/new_poll.gif new file mode 100644 index 0000000..e1081db Binary files /dev/null and b/Themes/fixed/images/english/new_poll.gif differ diff --git a/Themes/fixed/images/english/new_topic.gif b/Themes/fixed/images/english/new_topic.gif new file mode 100644 index 0000000..09ab88f Binary files /dev/null and b/Themes/fixed/images/english/new_topic.gif differ diff --git a/Themes/fixed/images/english/newsbox.gif b/Themes/fixed/images/english/newsbox.gif new file mode 100644 index 0000000..db262ac Binary files /dev/null and b/Themes/fixed/images/english/newsbox.gif differ diff --git a/Themes/fixed/images/english/notify.gif b/Themes/fixed/images/english/notify.gif new file mode 100644 index 0000000..2bc6ba0 Binary files /dev/null and b/Themes/fixed/images/english/notify.gif differ diff --git a/Themes/fixed/images/english/notify_sm.gif b/Themes/fixed/images/english/notify_sm.gif new file mode 100644 index 0000000..88c29e0 Binary files /dev/null and b/Themes/fixed/images/english/notify_sm.gif differ diff --git a/Themes/fixed/images/english/print.gif b/Themes/fixed/images/english/print.gif new file mode 100644 index 0000000..81862e9 Binary files /dev/null and b/Themes/fixed/images/english/print.gif differ diff --git a/Themes/fixed/images/english/profile.gif b/Themes/fixed/images/english/profile.gif new file mode 100644 index 0000000..5db46e8 Binary files /dev/null and b/Themes/fixed/images/english/profile.gif differ diff --git a/Themes/fixed/images/english/quote.gif b/Themes/fixed/images/english/quote.gif new file mode 100644 index 0000000..1041c13 Binary files /dev/null and b/Themes/fixed/images/english/quote.gif differ diff --git a/Themes/fixed/images/english/register.gif b/Themes/fixed/images/english/register.gif new file mode 100644 index 0000000..bc75a3e Binary files /dev/null and b/Themes/fixed/images/english/register.gif differ diff --git a/Themes/fixed/images/english/reply.gif b/Themes/fixed/images/english/reply.gif new file mode 100644 index 0000000..ccfc291 Binary files /dev/null and b/Themes/fixed/images/english/reply.gif differ diff --git a/Themes/fixed/images/english/reply_sm.gif b/Themes/fixed/images/english/reply_sm.gif new file mode 100644 index 0000000..cf1f888 Binary files /dev/null and b/Themes/fixed/images/english/reply_sm.gif differ diff --git a/Themes/fixed/images/english/search.gif b/Themes/fixed/images/english/search.gif new file mode 100644 index 0000000..43d7ef5 Binary files /dev/null and b/Themes/fixed/images/english/search.gif differ diff --git a/Themes/fixed/images/english/sendtopic.gif b/Themes/fixed/images/english/sendtopic.gif new file mode 100644 index 0000000..1f19627 Binary files /dev/null and b/Themes/fixed/images/english/sendtopic.gif differ diff --git a/Themes/fixed/images/english/split.gif b/Themes/fixed/images/english/split.gif new file mode 100644 index 0000000..41a897a Binary files /dev/null and b/Themes/fixed/images/english/split.gif differ diff --git a/Themes/fixed/images/english/userinfo.gif b/Themes/fixed/images/english/userinfo.gif new file mode 100644 index 0000000..83da9f5 Binary files /dev/null and b/Themes/fixed/images/english/userinfo.gif differ diff --git a/Themes/fixed/images/english/who.gif b/Themes/fixed/images/english/who.gif new file mode 100644 index 0000000..7ff8f27 Binary files /dev/null and b/Themes/fixed/images/english/who.gif differ diff --git a/Themes/fixed/images/expand.gif b/Themes/fixed/images/expand.gif new file mode 100644 index 0000000..4d2d54e Binary files /dev/null and b/Themes/fixed/images/expand.gif differ diff --git a/Themes/fixed/images/filter.gif b/Themes/fixed/images/filter.gif new file mode 100644 index 0000000..b5aa23d Binary files /dev/null and b/Themes/fixed/images/filter.gif differ diff --git a/Themes/fixed/images/google_earth_feed.gif b/Themes/fixed/images/google_earth_feed.gif new file mode 100644 index 0000000..0301a50 Binary files /dev/null and b/Themes/fixed/images/google_earth_feed.gif differ diff --git a/Themes/fixed/images/h_powered-mysql.gif b/Themes/fixed/images/h_powered-mysql.gif new file mode 100644 index 0000000..4be7926 Binary files /dev/null and b/Themes/fixed/images/h_powered-mysql.gif differ diff --git a/Themes/fixed/images/h_powered-php.gif b/Themes/fixed/images/h_powered-php.gif new file mode 100644 index 0000000..a5e812a Binary files /dev/null and b/Themes/fixed/images/h_powered-php.gif differ diff --git a/Themes/fixed/images/h_valid-css.gif b/Themes/fixed/images/h_valid-css.gif new file mode 100644 index 0000000..bc5eced Binary files /dev/null and b/Themes/fixed/images/h_valid-css.gif differ diff --git a/Themes/fixed/images/h_valid-xhtml10.gif b/Themes/fixed/images/h_valid-xhtml10.gif new file mode 100644 index 0000000..dc35b9b Binary files /dev/null and b/Themes/fixed/images/h_valid-xhtml10.gif differ diff --git a/Themes/fixed/images/helplogo.jpg b/Themes/fixed/images/helplogo.jpg new file mode 100644 index 0000000..849aa23 Binary files /dev/null and b/Themes/fixed/images/helplogo.jpg differ diff --git a/Themes/fixed/images/helptopics.gif b/Themes/fixed/images/helptopics.gif new file mode 100644 index 0000000..55c5fc3 Binary files /dev/null and b/Themes/fixed/images/helptopics.gif differ diff --git a/Themes/fixed/images/icons/assist.gif b/Themes/fixed/images/icons/assist.gif new file mode 100644 index 0000000..84289cd Binary files /dev/null and b/Themes/fixed/images/icons/assist.gif differ diff --git a/Themes/fixed/images/icons/bullet_grin.gif b/Themes/fixed/images/icons/bullet_grin.gif new file mode 100644 index 0000000..6c62a83 Binary files /dev/null and b/Themes/fixed/images/icons/bullet_grin.gif differ diff --git a/Themes/fixed/images/icons/calendar.gif b/Themes/fixed/images/icons/calendar.gif new file mode 100644 index 0000000..52231f9 Binary files /dev/null and b/Themes/fixed/images/icons/calendar.gif differ diff --git a/Themes/fixed/images/icons/clip.gif b/Themes/fixed/images/icons/clip.gif new file mode 100644 index 0000000..a9633c2 Binary files /dev/null and b/Themes/fixed/images/icons/clip.gif differ diff --git a/Themes/fixed/images/icons/config_sm.gif b/Themes/fixed/images/icons/config_sm.gif new file mode 100644 index 0000000..304639e Binary files /dev/null and b/Themes/fixed/images/icons/config_sm.gif differ diff --git a/Themes/fixed/images/icons/delete.gif b/Themes/fixed/images/icons/delete.gif new file mode 100644 index 0000000..5d1aeec Binary files /dev/null and b/Themes/fixed/images/icons/delete.gif differ diff --git a/Themes/fixed/images/icons/folder_open.gif b/Themes/fixed/images/icons/folder_open.gif new file mode 100644 index 0000000..a1c4534 Binary files /dev/null and b/Themes/fixed/images/icons/folder_open.gif differ diff --git a/Themes/fixed/images/icons/im_newmsg.gif b/Themes/fixed/images/icons/im_newmsg.gif new file mode 100644 index 0000000..18b6687 Binary files /dev/null and b/Themes/fixed/images/icons/im_newmsg.gif differ diff --git a/Themes/fixed/images/icons/info.gif b/Themes/fixed/images/icons/info.gif new file mode 100644 index 0000000..d254ec0 Binary files /dev/null and b/Themes/fixed/images/icons/info.gif differ diff --git a/Themes/fixed/images/icons/last_post.gif b/Themes/fixed/images/icons/last_post.gif new file mode 100644 index 0000000..89f53c9 Binary files /dev/null and b/Themes/fixed/images/icons/last_post.gif differ diff --git a/Themes/fixed/images/icons/linktree_main.gif b/Themes/fixed/images/icons/linktree_main.gif new file mode 100644 index 0000000..adb3936 Binary files /dev/null and b/Themes/fixed/images/icons/linktree_main.gif differ diff --git a/Themes/fixed/images/icons/linktree_side.gif b/Themes/fixed/images/icons/linktree_side.gif new file mode 100644 index 0000000..87656c3 Binary files /dev/null and b/Themes/fixed/images/icons/linktree_side.gif differ diff --git a/Themes/fixed/images/icons/login.gif b/Themes/fixed/images/icons/login.gif new file mode 100644 index 0000000..db7b987 Binary files /dev/null and b/Themes/fixed/images/icons/login.gif differ diff --git a/Themes/fixed/images/icons/login_sm.gif b/Themes/fixed/images/icons/login_sm.gif new file mode 100644 index 0000000..5da1e73 Binary files /dev/null and b/Themes/fixed/images/icons/login_sm.gif differ diff --git a/Themes/fixed/images/icons/members.gif b/Themes/fixed/images/icons/members.gif new file mode 100644 index 0000000..8cb25ba Binary files /dev/null and b/Themes/fixed/images/icons/members.gif differ diff --git a/Themes/fixed/images/icons/notify_sm.gif b/Themes/fixed/images/icons/notify_sm.gif new file mode 100644 index 0000000..6d254c9 Binary files /dev/null and b/Themes/fixed/images/icons/notify_sm.gif differ diff --git a/Themes/fixed/images/icons/online.gif b/Themes/fixed/images/icons/online.gif new file mode 100644 index 0000000..4c90ae7 Binary files /dev/null and b/Themes/fixed/images/icons/online.gif differ diff --git a/Themes/fixed/images/icons/package_installed.gif b/Themes/fixed/images/icons/package_installed.gif new file mode 100644 index 0000000..b569525 Binary files /dev/null and b/Themes/fixed/images/icons/package_installed.gif differ diff --git a/Themes/fixed/images/icons/package_old.gif b/Themes/fixed/images/icons/package_old.gif new file mode 100644 index 0000000..d7ef52c Binary files /dev/null and b/Themes/fixed/images/icons/package_old.gif differ diff --git a/Themes/fixed/images/icons/profile_sm.gif b/Themes/fixed/images/icons/profile_sm.gif new file mode 100644 index 0000000..5cec038 Binary files /dev/null and b/Themes/fixed/images/icons/profile_sm.gif differ diff --git a/Themes/fixed/images/icons/quick_lock.gif b/Themes/fixed/images/icons/quick_lock.gif new file mode 100644 index 0000000..6afbc91 Binary files /dev/null and b/Themes/fixed/images/icons/quick_lock.gif differ diff --git a/Themes/fixed/images/icons/quick_move.gif b/Themes/fixed/images/icons/quick_move.gif new file mode 100644 index 0000000..310baef Binary files /dev/null and b/Themes/fixed/images/icons/quick_move.gif differ diff --git a/Themes/fixed/images/icons/quick_remove.gif b/Themes/fixed/images/icons/quick_remove.gif new file mode 100644 index 0000000..d7546b1 Binary files /dev/null and b/Themes/fixed/images/icons/quick_remove.gif differ diff --git a/Themes/fixed/images/icons/quick_sticky.gif b/Themes/fixed/images/icons/quick_sticky.gif new file mode 100644 index 0000000..2d51954 Binary files /dev/null and b/Themes/fixed/images/icons/quick_sticky.gif differ diff --git a/Themes/fixed/images/icons/rep_minus.gif b/Themes/fixed/images/icons/rep_minus.gif new file mode 100644 index 0000000..3e8af43 Binary files /dev/null and b/Themes/fixed/images/icons/rep_minus.gif differ diff --git a/Themes/fixed/images/icons/rep_plus.gif b/Themes/fixed/images/icons/rep_plus.gif new file mode 100644 index 0000000..e5752e7 Binary files /dev/null and b/Themes/fixed/images/icons/rep_plus.gif differ diff --git a/Themes/fixed/images/icq.gif b/Themes/fixed/images/icq.gif new file mode 100644 index 0000000..6ec3d98 Binary files /dev/null and b/Themes/fixed/images/icq.gif differ diff --git a/Themes/fixed/images/im_off.gif b/Themes/fixed/images/im_off.gif new file mode 100644 index 0000000..58e4f96 Binary files /dev/null and b/Themes/fixed/images/im_off.gif differ diff --git a/Themes/fixed/images/im_on.gif b/Themes/fixed/images/im_on.gif new file mode 100644 index 0000000..3e97cb1 Binary files /dev/null and b/Themes/fixed/images/im_on.gif differ diff --git a/Themes/fixed/images/im_sm_newmsg.gif b/Themes/fixed/images/im_sm_newmsg.gif new file mode 100644 index 0000000..e3de228 Binary files /dev/null and b/Themes/fixed/images/im_sm_newmsg.gif differ diff --git a/Themes/fixed/images/im_sm_prefs.gif b/Themes/fixed/images/im_sm_prefs.gif new file mode 100644 index 0000000..304639e Binary files /dev/null and b/Themes/fixed/images/im_sm_prefs.gif differ diff --git a/Themes/fixed/images/ip.gif b/Themes/fixed/images/ip.gif new file mode 100644 index 0000000..e3ac911 Binary files /dev/null and b/Themes/fixed/images/ip.gif differ diff --git a/Themes/fixed/images/logo.gif b/Themes/fixed/images/logo.gif new file mode 100644 index 0000000..a1c5db7 Binary files /dev/null and b/Themes/fixed/images/logo.gif differ diff --git a/Themes/fixed/images/members.gif b/Themes/fixed/images/members.gif new file mode 100644 index 0000000..74886b0 Binary files /dev/null and b/Themes/fixed/images/members.gif differ diff --git a/Themes/fixed/images/message_sm.gif b/Themes/fixed/images/message_sm.gif new file mode 100644 index 0000000..0e5f36a Binary files /dev/null and b/Themes/fixed/images/message_sm.gif differ diff --git a/Themes/fixed/images/msntalk.gif b/Themes/fixed/images/msntalk.gif new file mode 100644 index 0000000..6eacb5b Binary files /dev/null and b/Themes/fixed/images/msntalk.gif differ diff --git a/Themes/fixed/images/new_none.gif b/Themes/fixed/images/new_none.gif new file mode 100644 index 0000000..f324dc0 Binary files /dev/null and b/Themes/fixed/images/new_none.gif differ diff --git a/Themes/fixed/images/new_some.gif b/Themes/fixed/images/new_some.gif new file mode 100644 index 0000000..00c18d6 Binary files /dev/null and b/Themes/fixed/images/new_some.gif differ diff --git a/Themes/fixed/images/off.gif b/Themes/fixed/images/off.gif new file mode 100644 index 0000000..6a18e27 Binary files /dev/null and b/Themes/fixed/images/off.gif differ diff --git a/Themes/fixed/images/on.gif b/Themes/fixed/images/on.gif new file mode 100644 index 0000000..d312f33 Binary files /dev/null and b/Themes/fixed/images/on.gif differ diff --git a/Themes/fixed/images/on2.gif b/Themes/fixed/images/on2.gif new file mode 100644 index 0000000..ea000cc Binary files /dev/null and b/Themes/fixed/images/on2.gif differ diff --git a/Themes/fixed/images/poll_left.gif b/Themes/fixed/images/poll_left.gif new file mode 100644 index 0000000..ac7df6b Binary files /dev/null and b/Themes/fixed/images/poll_left.gif differ diff --git a/Themes/fixed/images/poll_middle.gif b/Themes/fixed/images/poll_middle.gif new file mode 100644 index 0000000..cdffb90 Binary files /dev/null and b/Themes/fixed/images/poll_middle.gif differ diff --git a/Themes/fixed/images/poll_right.gif b/Themes/fixed/images/poll_right.gif new file mode 100644 index 0000000..337187f Binary files /dev/null and b/Themes/fixed/images/poll_right.gif differ diff --git a/Themes/fixed/images/post/Thumbs.db b/Themes/fixed/images/post/Thumbs.db new file mode 100644 index 0000000..ce90b65 Binary files /dev/null and b/Themes/fixed/images/post/Thumbs.db differ diff --git a/Themes/fixed/images/post/angry.gif b/Themes/fixed/images/post/angry.gif new file mode 100644 index 0000000..a654fc0 Binary files /dev/null and b/Themes/fixed/images/post/angry.gif differ diff --git a/Themes/fixed/images/post/cheesy.gif b/Themes/fixed/images/post/cheesy.gif new file mode 100644 index 0000000..1c7893f Binary files /dev/null and b/Themes/fixed/images/post/cheesy.gif differ diff --git a/Themes/fixed/images/post/exclamation.gif b/Themes/fixed/images/post/exclamation.gif new file mode 100644 index 0000000..e77cfed Binary files /dev/null and b/Themes/fixed/images/post/exclamation.gif differ diff --git a/Themes/fixed/images/post/grin.gif b/Themes/fixed/images/post/grin.gif new file mode 100644 index 0000000..91a16c4 Binary files /dev/null and b/Themes/fixed/images/post/grin.gif differ diff --git a/Themes/fixed/images/post/lamp.gif b/Themes/fixed/images/post/lamp.gif new file mode 100644 index 0000000..d894edd Binary files /dev/null and b/Themes/fixed/images/post/lamp.gif differ diff --git a/Themes/fixed/images/post/moved.gif b/Themes/fixed/images/post/moved.gif new file mode 100644 index 0000000..aad605b Binary files /dev/null and b/Themes/fixed/images/post/moved.gif differ diff --git a/Themes/fixed/images/post/question.gif b/Themes/fixed/images/post/question.gif new file mode 100644 index 0000000..75b69d5 Binary files /dev/null and b/Themes/fixed/images/post/question.gif differ diff --git a/Themes/fixed/images/post/recycled.gif b/Themes/fixed/images/post/recycled.gif new file mode 100644 index 0000000..91e5c67 Binary files /dev/null and b/Themes/fixed/images/post/recycled.gif differ diff --git a/Themes/fixed/images/post/sad.gif b/Themes/fixed/images/post/sad.gif new file mode 100644 index 0000000..bed07ca Binary files /dev/null and b/Themes/fixed/images/post/sad.gif differ diff --git a/Themes/fixed/images/post/smiley.gif b/Themes/fixed/images/post/smiley.gif new file mode 100644 index 0000000..0b0ea19 Binary files /dev/null and b/Themes/fixed/images/post/smiley.gif differ diff --git a/Themes/fixed/images/post/thumbdown.gif b/Themes/fixed/images/post/thumbdown.gif new file mode 100644 index 0000000..ab7e040 Binary files /dev/null and b/Themes/fixed/images/post/thumbdown.gif differ diff --git a/Themes/fixed/images/post/thumbup.gif b/Themes/fixed/images/post/thumbup.gif new file mode 100644 index 0000000..62e0d02 Binary files /dev/null and b/Themes/fixed/images/post/thumbup.gif differ diff --git a/Themes/fixed/images/post/wink.gif b/Themes/fixed/images/post/wink.gif new file mode 100644 index 0000000..c7b79ff Binary files /dev/null and b/Themes/fixed/images/post/wink.gif differ diff --git a/Themes/fixed/images/post/wireless.gif b/Themes/fixed/images/post/wireless.gif new file mode 100644 index 0000000..9b66c37 Binary files /dev/null and b/Themes/fixed/images/post/wireless.gif differ diff --git a/Themes/fixed/images/post/xx.gif b/Themes/fixed/images/post/xx.gif new file mode 100644 index 0000000..a41adec Binary files /dev/null and b/Themes/fixed/images/post/xx.gif differ diff --git a/Themes/fixed/images/powered-mysql.gif b/Themes/fixed/images/powered-mysql.gif new file mode 100644 index 0000000..7f2e758 Binary files /dev/null and b/Themes/fixed/images/powered-mysql.gif differ diff --git a/Themes/fixed/images/powered-php.gif b/Themes/fixed/images/powered-php.gif new file mode 100644 index 0000000..813034b Binary files /dev/null and b/Themes/fixed/images/powered-php.gif differ diff --git a/Themes/fixed/images/russian/Thumbs.db b/Themes/fixed/images/russian/Thumbs.db new file mode 100644 index 0000000..7579827 Binary files /dev/null and b/Themes/fixed/images/russian/Thumbs.db differ diff --git a/Themes/fixed/images/russian/addpoll.gif b/Themes/fixed/images/russian/addpoll.gif new file mode 100644 index 0000000..ea83bfe Binary files /dev/null and b/Themes/fixed/images/russian/addpoll.gif differ diff --git a/Themes/fixed/images/russian/admin.gif b/Themes/fixed/images/russian/admin.gif new file mode 100644 index 0000000..35b9e68 Binary files /dev/null and b/Themes/fixed/images/russian/admin.gif differ diff --git a/Themes/fixed/images/russian/admin_lock.gif b/Themes/fixed/images/russian/admin_lock.gif new file mode 100644 index 0000000..7be9195 Binary files /dev/null and b/Themes/fixed/images/russian/admin_lock.gif differ diff --git a/Themes/fixed/images/russian/admin_move.gif b/Themes/fixed/images/russian/admin_move.gif new file mode 100644 index 0000000..100341f Binary files /dev/null and b/Themes/fixed/images/russian/admin_move.gif differ diff --git a/Themes/fixed/images/russian/admin_rem.gif b/Themes/fixed/images/russian/admin_rem.gif new file mode 100644 index 0000000..baafeae Binary files /dev/null and b/Themes/fixed/images/russian/admin_rem.gif differ diff --git a/Themes/fixed/images/russian/admin_remove_poll.gif b/Themes/fixed/images/russian/admin_remove_poll.gif new file mode 100644 index 0000000..be969e5 Binary files /dev/null and b/Themes/fixed/images/russian/admin_remove_poll.gif differ diff --git a/Themes/fixed/images/russian/admin_sticky.gif b/Themes/fixed/images/russian/admin_sticky.gif new file mode 100644 index 0000000..84afc08 Binary files /dev/null and b/Themes/fixed/images/russian/admin_sticky.gif differ diff --git a/Themes/fixed/images/russian/calendar.gif b/Themes/fixed/images/russian/calendar.gif new file mode 100644 index 0000000..57da10e Binary files /dev/null and b/Themes/fixed/images/russian/calendar.gif differ diff --git a/Themes/fixed/images/russian/calendarpe.gif b/Themes/fixed/images/russian/calendarpe.gif new file mode 100644 index 0000000..4bf911e Binary files /dev/null and b/Themes/fixed/images/russian/calendarpe.gif differ diff --git a/Themes/fixed/images/russian/delete.gif b/Themes/fixed/images/russian/delete.gif new file mode 100644 index 0000000..19e176d Binary files /dev/null and b/Themes/fixed/images/russian/delete.gif differ diff --git a/Themes/fixed/images/russian/delete_selected.gif b/Themes/fixed/images/russian/delete_selected.gif new file mode 100644 index 0000000..96d3400 Binary files /dev/null and b/Themes/fixed/images/russian/delete_selected.gif differ diff --git a/Themes/fixed/images/russian/go_down.gif b/Themes/fixed/images/russian/go_down.gif new file mode 100644 index 0000000..9e584d1 Binary files /dev/null and b/Themes/fixed/images/russian/go_down.gif differ diff --git a/Themes/fixed/images/russian/go_up.gif b/Themes/fixed/images/russian/go_up.gif new file mode 100644 index 0000000..e890674 Binary files /dev/null and b/Themes/fixed/images/russian/go_up.gif differ diff --git a/Themes/fixed/images/russian/googlemap.gif b/Themes/fixed/images/russian/googlemap.gif new file mode 100644 index 0000000..1c1c602 Binary files /dev/null and b/Themes/fixed/images/russian/googlemap.gif differ diff --git a/Themes/fixed/images/russian/help.gif b/Themes/fixed/images/russian/help.gif new file mode 100644 index 0000000..1bc0847 Binary files /dev/null and b/Themes/fixed/images/russian/help.gif differ diff --git a/Themes/fixed/images/russian/home.gif b/Themes/fixed/images/russian/home.gif new file mode 100644 index 0000000..520a421 Binary files /dev/null and b/Themes/fixed/images/russian/home.gif differ diff --git a/Themes/fixed/images/russian/im_delete.gif b/Themes/fixed/images/russian/im_delete.gif new file mode 100644 index 0000000..50977b3 Binary files /dev/null and b/Themes/fixed/images/russian/im_delete.gif differ diff --git a/Themes/fixed/images/russian/im_inbox.gif b/Themes/fixed/images/russian/im_inbox.gif new file mode 100644 index 0000000..3872f67 Binary files /dev/null and b/Themes/fixed/images/russian/im_inbox.gif differ diff --git a/Themes/fixed/images/russian/im_new.gif b/Themes/fixed/images/russian/im_new.gif new file mode 100644 index 0000000..a6a4127 Binary files /dev/null and b/Themes/fixed/images/russian/im_new.gif differ diff --git a/Themes/fixed/images/russian/im_outbox.gif b/Themes/fixed/images/russian/im_outbox.gif new file mode 100644 index 0000000..65d1555 Binary files /dev/null and b/Themes/fixed/images/russian/im_outbox.gif differ diff --git a/Themes/fixed/images/russian/im_reload.gif b/Themes/fixed/images/russian/im_reload.gif new file mode 100644 index 0000000..28b4b62 Binary files /dev/null and b/Themes/fixed/images/russian/im_reload.gif differ diff --git a/Themes/fixed/images/russian/im_reply.gif b/Themes/fixed/images/russian/im_reply.gif new file mode 100644 index 0000000..60a4d16 Binary files /dev/null and b/Themes/fixed/images/russian/im_reply.gif differ diff --git a/Themes/fixed/images/russian/im_visualw.gif b/Themes/fixed/images/russian/im_visualw.gif new file mode 100644 index 0000000..1ecde89 Binary files /dev/null and b/Themes/fixed/images/russian/im_visualw.gif differ diff --git a/Themes/fixed/images/russian/keystats.gif b/Themes/fixed/images/russian/keystats.gif new file mode 100644 index 0000000..295c199 Binary files /dev/null and b/Themes/fixed/images/russian/keystats.gif differ diff --git a/Themes/fixed/images/russian/link.gif b/Themes/fixed/images/russian/link.gif new file mode 100644 index 0000000..2318039 Binary files /dev/null and b/Themes/fixed/images/russian/link.gif differ diff --git a/Themes/fixed/images/russian/linktocal.gif b/Themes/fixed/images/russian/linktocal.gif new file mode 100644 index 0000000..695f6e0 Binary files /dev/null and b/Themes/fixed/images/russian/linktocal.gif differ diff --git a/Themes/fixed/images/russian/login.gif b/Themes/fixed/images/russian/login.gif new file mode 100644 index 0000000..fd0b206 Binary files /dev/null and b/Themes/fixed/images/russian/login.gif differ diff --git a/Themes/fixed/images/russian/logout.gif b/Themes/fixed/images/russian/logout.gif new file mode 100644 index 0000000..649a07d Binary files /dev/null and b/Themes/fixed/images/russian/logout.gif differ diff --git a/Themes/fixed/images/russian/markread.gif b/Themes/fixed/images/russian/markread.gif new file mode 100644 index 0000000..8b09696 Binary files /dev/null and b/Themes/fixed/images/russian/markread.gif differ diff --git a/Themes/fixed/images/russian/markunread.gif b/Themes/fixed/images/russian/markunread.gif new file mode 100644 index 0000000..a357d76 Binary files /dev/null and b/Themes/fixed/images/russian/markunread.gif differ diff --git a/Themes/fixed/images/russian/memberlist.gif b/Themes/fixed/images/russian/memberlist.gif new file mode 100644 index 0000000..026e766 Binary files /dev/null and b/Themes/fixed/images/russian/memberlist.gif differ diff --git a/Themes/fixed/images/russian/merge.gif b/Themes/fixed/images/russian/merge.gif new file mode 100644 index 0000000..11ec1a4 Binary files /dev/null and b/Themes/fixed/images/russian/merge.gif differ diff --git a/Themes/fixed/images/russian/modify.gif b/Themes/fixed/images/russian/modify.gif new file mode 100644 index 0000000..7ea2092 Binary files /dev/null and b/Themes/fixed/images/russian/modify.gif differ diff --git a/Themes/fixed/images/russian/new.gif b/Themes/fixed/images/russian/new.gif new file mode 100644 index 0000000..498537b Binary files /dev/null and b/Themes/fixed/images/russian/new.gif differ diff --git a/Themes/fixed/images/russian/new_poll.gif b/Themes/fixed/images/russian/new_poll.gif new file mode 100644 index 0000000..6431e63 Binary files /dev/null and b/Themes/fixed/images/russian/new_poll.gif differ diff --git a/Themes/fixed/images/russian/new_topic.gif b/Themes/fixed/images/russian/new_topic.gif new file mode 100644 index 0000000..7e19c61 Binary files /dev/null and b/Themes/fixed/images/russian/new_topic.gif differ diff --git a/Themes/fixed/images/russian/newsbox.gif b/Themes/fixed/images/russian/newsbox.gif new file mode 100644 index 0000000..75116ea Binary files /dev/null and b/Themes/fixed/images/russian/newsbox.gif differ diff --git a/Themes/fixed/images/russian/notify.gif b/Themes/fixed/images/russian/notify.gif new file mode 100644 index 0000000..ac9e7e4 Binary files /dev/null and b/Themes/fixed/images/russian/notify.gif differ diff --git a/Themes/fixed/images/russian/notify_sm.gif b/Themes/fixed/images/russian/notify_sm.gif new file mode 100644 index 0000000..bbf87f8 Binary files /dev/null and b/Themes/fixed/images/russian/notify_sm.gif differ diff --git a/Themes/fixed/images/russian/post_top.gif b/Themes/fixed/images/russian/post_top.gif new file mode 100644 index 0000000..80a66f2 Binary files /dev/null and b/Themes/fixed/images/russian/post_top.gif differ diff --git a/Themes/fixed/images/russian/print.gif b/Themes/fixed/images/russian/print.gif new file mode 100644 index 0000000..5aa2250 Binary files /dev/null and b/Themes/fixed/images/russian/print.gif differ diff --git a/Themes/fixed/images/russian/profile.gif b/Themes/fixed/images/russian/profile.gif new file mode 100644 index 0000000..3467357 Binary files /dev/null and b/Themes/fixed/images/russian/profile.gif differ diff --git a/Themes/fixed/images/russian/quote.gif b/Themes/fixed/images/russian/quote.gif new file mode 100644 index 0000000..1ead64a Binary files /dev/null and b/Themes/fixed/images/russian/quote.gif differ diff --git a/Themes/fixed/images/russian/register.gif b/Themes/fixed/images/russian/register.gif new file mode 100644 index 0000000..fe61704 Binary files /dev/null and b/Themes/fixed/images/russian/register.gif differ diff --git a/Themes/fixed/images/russian/reply.gif b/Themes/fixed/images/russian/reply.gif new file mode 100644 index 0000000..e80fdaf Binary files /dev/null and b/Themes/fixed/images/russian/reply.gif differ diff --git a/Themes/fixed/images/russian/reply_sm.gif b/Themes/fixed/images/russian/reply_sm.gif new file mode 100644 index 0000000..2b81c83 Binary files /dev/null and b/Themes/fixed/images/russian/reply_sm.gif differ diff --git a/Themes/fixed/images/russian/search.gif b/Themes/fixed/images/russian/search.gif new file mode 100644 index 0000000..5ec114d Binary files /dev/null and b/Themes/fixed/images/russian/search.gif differ diff --git a/Themes/fixed/images/russian/sendtopic.gif b/Themes/fixed/images/russian/sendtopic.gif new file mode 100644 index 0000000..60551d2 Binary files /dev/null and b/Themes/fixed/images/russian/sendtopic.gif differ diff --git a/Themes/fixed/images/russian/split.gif b/Themes/fixed/images/russian/split.gif new file mode 100644 index 0000000..351acf6 Binary files /dev/null and b/Themes/fixed/images/russian/split.gif differ diff --git a/Themes/fixed/images/russian/userinfo.gif b/Themes/fixed/images/russian/userinfo.gif new file mode 100644 index 0000000..210c469 Binary files /dev/null and b/Themes/fixed/images/russian/userinfo.gif differ diff --git a/Themes/fixed/images/russian/who.gif b/Themes/fixed/images/russian/who.gif new file mode 100644 index 0000000..41acaa3 Binary files /dev/null and b/Themes/fixed/images/russian/who.gif differ diff --git a/Themes/fixed/images/selected.gif b/Themes/fixed/images/selected.gif new file mode 100644 index 0000000..4d2d54e Binary files /dev/null and b/Themes/fixed/images/selected.gif differ diff --git a/Themes/fixed/images/smflogo.gif b/Themes/fixed/images/smflogo.gif new file mode 100644 index 0000000..8bd92dd Binary files /dev/null and b/Themes/fixed/images/smflogo.gif differ diff --git a/Themes/fixed/images/smiley_select_spot.gif b/Themes/fixed/images/smiley_select_spot.gif new file mode 100644 index 0000000..3e62a27 Binary files /dev/null and b/Themes/fixed/images/smiley_select_spot.gif differ diff --git a/Themes/fixed/images/sort_down.gif b/Themes/fixed/images/sort_down.gif new file mode 100644 index 0000000..6c755db Binary files /dev/null and b/Themes/fixed/images/sort_down.gif differ diff --git a/Themes/fixed/images/sort_up.gif b/Themes/fixed/images/sort_up.gif new file mode 100644 index 0000000..7e5731a Binary files /dev/null and b/Themes/fixed/images/sort_up.gif differ diff --git a/Themes/fixed/images/star.gif b/Themes/fixed/images/star.gif new file mode 100644 index 0000000..2177240 Binary files /dev/null and b/Themes/fixed/images/star.gif differ diff --git a/Themes/fixed/images/staradmin.gif b/Themes/fixed/images/staradmin.gif new file mode 100644 index 0000000..df654ea Binary files /dev/null and b/Themes/fixed/images/staradmin.gif differ diff --git a/Themes/fixed/images/stargmod.gif b/Themes/fixed/images/stargmod.gif new file mode 100644 index 0000000..7c45274 Binary files /dev/null and b/Themes/fixed/images/stargmod.gif differ diff --git a/Themes/fixed/images/starmod.gif b/Themes/fixed/images/starmod.gif new file mode 100644 index 0000000..9ba551d Binary files /dev/null and b/Themes/fixed/images/starmod.gif differ diff --git a/Themes/fixed/images/stats_board.gif b/Themes/fixed/images/stats_board.gif new file mode 100644 index 0000000..8f00a55 Binary files /dev/null and b/Themes/fixed/images/stats_board.gif differ diff --git a/Themes/fixed/images/stats_history.gif b/Themes/fixed/images/stats_history.gif new file mode 100644 index 0000000..6ef3079 Binary files /dev/null and b/Themes/fixed/images/stats_history.gif differ diff --git a/Themes/fixed/images/stats_info.gif b/Themes/fixed/images/stats_info.gif new file mode 100644 index 0000000..3a9cd6d Binary files /dev/null and b/Themes/fixed/images/stats_info.gif differ diff --git a/Themes/fixed/images/stats_posters.gif b/Themes/fixed/images/stats_posters.gif new file mode 100644 index 0000000..2297f93 Binary files /dev/null and b/Themes/fixed/images/stats_posters.gif differ diff --git a/Themes/fixed/images/stats_replies.gif b/Themes/fixed/images/stats_replies.gif new file mode 100644 index 0000000..12deb51 Binary files /dev/null and b/Themes/fixed/images/stats_replies.gif differ diff --git a/Themes/fixed/images/stats_views.gif b/Themes/fixed/images/stats_views.gif new file mode 100644 index 0000000..128e6ec Binary files /dev/null and b/Themes/fixed/images/stats_views.gif differ diff --git a/Themes/fixed/images/thumbnail.gif b/Themes/fixed/images/thumbnail.gif new file mode 100644 index 0000000..629aabe Binary files /dev/null and b/Themes/fixed/images/thumbnail.gif differ diff --git a/Themes/fixed/images/topic/Thumbs.db b/Themes/fixed/images/topic/Thumbs.db new file mode 100644 index 0000000..0f0ad0d Binary files /dev/null and b/Themes/fixed/images/topic/Thumbs.db differ diff --git a/Themes/fixed/images/topic/hot_poll.gif b/Themes/fixed/images/topic/hot_poll.gif new file mode 100644 index 0000000..fe67ea8 Binary files /dev/null and b/Themes/fixed/images/topic/hot_poll.gif differ diff --git a/Themes/fixed/images/topic/hot_poll_locked.gif b/Themes/fixed/images/topic/hot_poll_locked.gif new file mode 100644 index 0000000..8fb250a Binary files /dev/null and b/Themes/fixed/images/topic/hot_poll_locked.gif differ diff --git a/Themes/fixed/images/topic/hot_poll_locked_sticky.gif b/Themes/fixed/images/topic/hot_poll_locked_sticky.gif new file mode 100644 index 0000000..d71406e Binary files /dev/null and b/Themes/fixed/images/topic/hot_poll_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/hot_poll_sticky.gif b/Themes/fixed/images/topic/hot_poll_sticky.gif new file mode 100644 index 0000000..a09f929 Binary files /dev/null and b/Themes/fixed/images/topic/hot_poll_sticky.gif differ diff --git a/Themes/fixed/images/topic/hot_post.gif b/Themes/fixed/images/topic/hot_post.gif new file mode 100644 index 0000000..fef8314 Binary files /dev/null and b/Themes/fixed/images/topic/hot_post.gif differ diff --git a/Themes/fixed/images/topic/hot_post_locked.gif b/Themes/fixed/images/topic/hot_post_locked.gif new file mode 100644 index 0000000..8eae113 Binary files /dev/null and b/Themes/fixed/images/topic/hot_post_locked.gif differ diff --git a/Themes/fixed/images/topic/hot_post_locked_sticky.gif b/Themes/fixed/images/topic/hot_post_locked_sticky.gif new file mode 100644 index 0000000..a90239c Binary files /dev/null and b/Themes/fixed/images/topic/hot_post_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/hot_post_sticky.gif b/Themes/fixed/images/topic/hot_post_sticky.gif new file mode 100644 index 0000000..cadc692 Binary files /dev/null and b/Themes/fixed/images/topic/hot_post_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_hot_poll.gif b/Themes/fixed/images/topic/my_hot_poll.gif new file mode 100644 index 0000000..6d6fd27 Binary files /dev/null and b/Themes/fixed/images/topic/my_hot_poll.gif differ diff --git a/Themes/fixed/images/topic/my_hot_poll_locked.gif b/Themes/fixed/images/topic/my_hot_poll_locked.gif new file mode 100644 index 0000000..8d57c67 Binary files /dev/null and b/Themes/fixed/images/topic/my_hot_poll_locked.gif differ diff --git a/Themes/fixed/images/topic/my_hot_poll_locked_sticky.gif b/Themes/fixed/images/topic/my_hot_poll_locked_sticky.gif new file mode 100644 index 0000000..3638c67 Binary files /dev/null and b/Themes/fixed/images/topic/my_hot_poll_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_hot_poll_sticky.gif b/Themes/fixed/images/topic/my_hot_poll_sticky.gif new file mode 100644 index 0000000..ec4d252 Binary files /dev/null and b/Themes/fixed/images/topic/my_hot_poll_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_hot_post.gif b/Themes/fixed/images/topic/my_hot_post.gif new file mode 100644 index 0000000..0df551b Binary files /dev/null and b/Themes/fixed/images/topic/my_hot_post.gif differ diff --git a/Themes/fixed/images/topic/my_hot_post_locked.gif b/Themes/fixed/images/topic/my_hot_post_locked.gif new file mode 100644 index 0000000..49268fd Binary files /dev/null and b/Themes/fixed/images/topic/my_hot_post_locked.gif differ diff --git a/Themes/fixed/images/topic/my_hot_post_locked_sticky.gif b/Themes/fixed/images/topic/my_hot_post_locked_sticky.gif new file mode 100644 index 0000000..82c4e25 Binary files /dev/null and b/Themes/fixed/images/topic/my_hot_post_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_hot_post_sticky.gif b/Themes/fixed/images/topic/my_hot_post_sticky.gif new file mode 100644 index 0000000..aa874a9 Binary files /dev/null and b/Themes/fixed/images/topic/my_hot_post_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_normal_poll.gif b/Themes/fixed/images/topic/my_normal_poll.gif new file mode 100644 index 0000000..f3ec78e Binary files /dev/null and b/Themes/fixed/images/topic/my_normal_poll.gif differ diff --git a/Themes/fixed/images/topic/my_normal_poll_locked.gif b/Themes/fixed/images/topic/my_normal_poll_locked.gif new file mode 100644 index 0000000..3d037f4 Binary files /dev/null and b/Themes/fixed/images/topic/my_normal_poll_locked.gif differ diff --git a/Themes/fixed/images/topic/my_normal_poll_locked_sticky.gif b/Themes/fixed/images/topic/my_normal_poll_locked_sticky.gif new file mode 100644 index 0000000..d98a79f Binary files /dev/null and b/Themes/fixed/images/topic/my_normal_poll_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_normal_poll_sticky.gif b/Themes/fixed/images/topic/my_normal_poll_sticky.gif new file mode 100644 index 0000000..233fdfb Binary files /dev/null and b/Themes/fixed/images/topic/my_normal_poll_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_normal_post.gif b/Themes/fixed/images/topic/my_normal_post.gif new file mode 100644 index 0000000..f2800d5 Binary files /dev/null and b/Themes/fixed/images/topic/my_normal_post.gif differ diff --git a/Themes/fixed/images/topic/my_normal_post_locked.gif b/Themes/fixed/images/topic/my_normal_post_locked.gif new file mode 100644 index 0000000..7f4f27b Binary files /dev/null and b/Themes/fixed/images/topic/my_normal_post_locked.gif differ diff --git a/Themes/fixed/images/topic/my_normal_post_locked_sticky.gif b/Themes/fixed/images/topic/my_normal_post_locked_sticky.gif new file mode 100644 index 0000000..96da880 Binary files /dev/null and b/Themes/fixed/images/topic/my_normal_post_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_normal_post_sticky.gif b/Themes/fixed/images/topic/my_normal_post_sticky.gif new file mode 100644 index 0000000..eed7022 Binary files /dev/null and b/Themes/fixed/images/topic/my_normal_post_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_veryhot_poll.gif b/Themes/fixed/images/topic/my_veryhot_poll.gif new file mode 100644 index 0000000..a2d37d5 Binary files /dev/null and b/Themes/fixed/images/topic/my_veryhot_poll.gif differ diff --git a/Themes/fixed/images/topic/my_veryhot_poll_locked.gif b/Themes/fixed/images/topic/my_veryhot_poll_locked.gif new file mode 100644 index 0000000..fd84ca7 Binary files /dev/null and b/Themes/fixed/images/topic/my_veryhot_poll_locked.gif differ diff --git a/Themes/fixed/images/topic/my_veryhot_poll_locked_sticky.gif b/Themes/fixed/images/topic/my_veryhot_poll_locked_sticky.gif new file mode 100644 index 0000000..2ee1cc6 Binary files /dev/null and b/Themes/fixed/images/topic/my_veryhot_poll_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_veryhot_poll_sticky.gif b/Themes/fixed/images/topic/my_veryhot_poll_sticky.gif new file mode 100644 index 0000000..353edb0 Binary files /dev/null and b/Themes/fixed/images/topic/my_veryhot_poll_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_veryhot_post.gif b/Themes/fixed/images/topic/my_veryhot_post.gif new file mode 100644 index 0000000..8d05cba Binary files /dev/null and b/Themes/fixed/images/topic/my_veryhot_post.gif differ diff --git a/Themes/fixed/images/topic/my_veryhot_post_locked.gif b/Themes/fixed/images/topic/my_veryhot_post_locked.gif new file mode 100644 index 0000000..dbb031d Binary files /dev/null and b/Themes/fixed/images/topic/my_veryhot_post_locked.gif differ diff --git a/Themes/fixed/images/topic/my_veryhot_post_locked_sticky.gif b/Themes/fixed/images/topic/my_veryhot_post_locked_sticky.gif new file mode 100644 index 0000000..c8b0f2f Binary files /dev/null and b/Themes/fixed/images/topic/my_veryhot_post_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/my_veryhot_post_sticky.gif b/Themes/fixed/images/topic/my_veryhot_post_sticky.gif new file mode 100644 index 0000000..34f1d54 Binary files /dev/null and b/Themes/fixed/images/topic/my_veryhot_post_sticky.gif differ diff --git a/Themes/fixed/images/topic/normal_poll.gif b/Themes/fixed/images/topic/normal_poll.gif new file mode 100644 index 0000000..d3f555a Binary files /dev/null and b/Themes/fixed/images/topic/normal_poll.gif differ diff --git a/Themes/fixed/images/topic/normal_poll_locked.gif b/Themes/fixed/images/topic/normal_poll_locked.gif new file mode 100644 index 0000000..17150a2 Binary files /dev/null and b/Themes/fixed/images/topic/normal_poll_locked.gif differ diff --git a/Themes/fixed/images/topic/normal_poll_locked_sticky.gif b/Themes/fixed/images/topic/normal_poll_locked_sticky.gif new file mode 100644 index 0000000..daf18d3 Binary files /dev/null and b/Themes/fixed/images/topic/normal_poll_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/normal_poll_sticky.gif b/Themes/fixed/images/topic/normal_poll_sticky.gif new file mode 100644 index 0000000..14b4154 Binary files /dev/null and b/Themes/fixed/images/topic/normal_poll_sticky.gif differ diff --git a/Themes/fixed/images/topic/normal_post.gif b/Themes/fixed/images/topic/normal_post.gif new file mode 100644 index 0000000..d8d8629 Binary files /dev/null and b/Themes/fixed/images/topic/normal_post.gif differ diff --git a/Themes/fixed/images/topic/normal_post_locked.gif b/Themes/fixed/images/topic/normal_post_locked.gif new file mode 100644 index 0000000..cc370d6 Binary files /dev/null and b/Themes/fixed/images/topic/normal_post_locked.gif differ diff --git a/Themes/fixed/images/topic/normal_post_locked_sticky.gif b/Themes/fixed/images/topic/normal_post_locked_sticky.gif new file mode 100644 index 0000000..812f497 Binary files /dev/null and b/Themes/fixed/images/topic/normal_post_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/normal_post_sticky.gif b/Themes/fixed/images/topic/normal_post_sticky.gif new file mode 100644 index 0000000..5a5955c Binary files /dev/null and b/Themes/fixed/images/topic/normal_post_sticky.gif differ diff --git a/Themes/fixed/images/topic/post_top.gif b/Themes/fixed/images/topic/post_top.gif new file mode 100644 index 0000000..80a66f2 Binary files /dev/null and b/Themes/fixed/images/topic/post_top.gif differ diff --git a/Themes/fixed/images/topic/veryhot_poll.gif b/Themes/fixed/images/topic/veryhot_poll.gif new file mode 100644 index 0000000..15c4b99 Binary files /dev/null and b/Themes/fixed/images/topic/veryhot_poll.gif differ diff --git a/Themes/fixed/images/topic/veryhot_poll_locked.gif b/Themes/fixed/images/topic/veryhot_poll_locked.gif new file mode 100644 index 0000000..bec7770 Binary files /dev/null and b/Themes/fixed/images/topic/veryhot_poll_locked.gif differ diff --git a/Themes/fixed/images/topic/veryhot_poll_locked_sticky.gif b/Themes/fixed/images/topic/veryhot_poll_locked_sticky.gif new file mode 100644 index 0000000..eab0666 Binary files /dev/null and b/Themes/fixed/images/topic/veryhot_poll_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/veryhot_poll_sticky.gif b/Themes/fixed/images/topic/veryhot_poll_sticky.gif new file mode 100644 index 0000000..693fa39 Binary files /dev/null and b/Themes/fixed/images/topic/veryhot_poll_sticky.gif differ diff --git a/Themes/fixed/images/topic/veryhot_post.gif b/Themes/fixed/images/topic/veryhot_post.gif new file mode 100644 index 0000000..c5735ae Binary files /dev/null and b/Themes/fixed/images/topic/veryhot_post.gif differ diff --git a/Themes/fixed/images/topic/veryhot_post_locked.gif b/Themes/fixed/images/topic/veryhot_post_locked.gif new file mode 100644 index 0000000..39704b7 Binary files /dev/null and b/Themes/fixed/images/topic/veryhot_post_locked.gif differ diff --git a/Themes/fixed/images/topic/veryhot_post_locked_sticky.gif b/Themes/fixed/images/topic/veryhot_post_locked_sticky.gif new file mode 100644 index 0000000..f4bb058 Binary files /dev/null and b/Themes/fixed/images/topic/veryhot_post_locked_sticky.gif differ diff --git a/Themes/fixed/images/topic/veryhot_post_sticky.gif b/Themes/fixed/images/topic/veryhot_post_sticky.gif new file mode 100644 index 0000000..2d76eb8 Binary files /dev/null and b/Themes/fixed/images/topic/veryhot_post_sticky.gif differ diff --git a/Themes/fixed/images/upshrink.gif b/Themes/fixed/images/upshrink.gif new file mode 100644 index 0000000..7ebc2a0 Binary files /dev/null and b/Themes/fixed/images/upshrink.gif differ diff --git a/Themes/fixed/images/upshrink2.gif b/Themes/fixed/images/upshrink2.gif new file mode 100644 index 0000000..e4508a5 Binary files /dev/null and b/Themes/fixed/images/upshrink2.gif differ diff --git a/Themes/fixed/images/useroff.gif b/Themes/fixed/images/useroff.gif new file mode 100644 index 0000000..e3cb222 Binary files /dev/null and b/Themes/fixed/images/useroff.gif differ diff --git a/Themes/fixed/images/useron.gif b/Themes/fixed/images/useron.gif new file mode 100644 index 0000000..c9a320b Binary files /dev/null and b/Themes/fixed/images/useron.gif differ diff --git a/Themes/fixed/images/valid-css.gif b/Themes/fixed/images/valid-css.gif new file mode 100644 index 0000000..b54a42b Binary files /dev/null and b/Themes/fixed/images/valid-css.gif differ diff --git a/Themes/fixed/images/valid-xhtml10.gif b/Themes/fixed/images/valid-xhtml10.gif new file mode 100644 index 0000000..dc64fd2 Binary files /dev/null and b/Themes/fixed/images/valid-xhtml10.gif differ diff --git a/Themes/fixed/images/warnban.gif b/Themes/fixed/images/warnban.gif new file mode 100644 index 0000000..047f5bc Binary files /dev/null and b/Themes/fixed/images/warnban.gif differ diff --git a/Themes/fixed/images/warnmute.gif b/Themes/fixed/images/warnmute.gif new file mode 100644 index 0000000..98e2c2b Binary files /dev/null and b/Themes/fixed/images/warnmute.gif differ diff --git a/Themes/fixed/images/warnpmod.gif b/Themes/fixed/images/warnpmod.gif new file mode 100644 index 0000000..106a2da Binary files /dev/null and b/Themes/fixed/images/warnpmod.gif differ diff --git a/Themes/fixed/images/warnwarn.gif b/Themes/fixed/images/warnwarn.gif new file mode 100644 index 0000000..26d272a Binary files /dev/null and b/Themes/fixed/images/warnwarn.gif differ diff --git a/Themes/fixed/images/www.gif b/Themes/fixed/images/www.gif new file mode 100644 index 0000000..a8aa1fc Binary files /dev/null and b/Themes/fixed/images/www.gif differ diff --git a/Themes/fixed/images/www_sm.gif b/Themes/fixed/images/www_sm.gif new file mode 100644 index 0000000..858a44d Binary files /dev/null and b/Themes/fixed/images/www_sm.gif differ diff --git a/Themes/fixed/images/yim.gif b/Themes/fixed/images/yim.gif new file mode 100644 index 0000000..bfc9ab2 Binary files /dev/null and b/Themes/fixed/images/yim.gif differ diff --git a/Themes/fixed/index.php b/Themes/fixed/index.php new file mode 100644 index 0000000..be9895a --- /dev/null +++ b/Themes/fixed/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/Themes/fixed/index.template.php b/Themes/fixed/index.template.php new file mode 100755 index 0000000..de62a86 --- /dev/null +++ b/Themes/fixed/index.template.php @@ -0,0 +1,493 @@ + + + + + + + + + ', $context['page_title'], ''; + + // This is here because Gecko browsers properly support white-space.... + if ($context['browser']['is_gecko']) + echo ' + '; + + echo ' + '; + + /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...) + Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual. + Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big. + Standards compliance mode happens when you use xhtml... */ + if ($context['browser']['needs_size_fix']) + echo ' + '; + + // Show all the relative links, such as help, search, contents, and the like. + echo ' + + + '; + + // If we're viewing a topic, these should be the previous and next topics, respectively. + if (!empty($context['current_topic'])) + echo ' + + '; + + // If we're in a board, or a topic for that matter, the index will be the board's index. + if (!empty($context['current_board'])) + echo ' + '; + + // We'll have to use the cookie to remember the header... + if ($context['user']['is_guest']) + $options['collapse_header'] = !empty($_COOKIE['upshrink']); + + // Output any remaining HTML headers. (from mods, maybe?) + echo $context['html_headers'], ' + + + + + +'; + echo' +
    '; + + // Because of the way width/padding are calculated, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!) + echo ' +
    '; + + // The logo and the three info boxes. + echo ' + + + + + + + + + +
    '; + + // This part is the logo and forum name. You should be able to change this to whatever you want... + echo ' +    '; + + echo ' + + - - -   - - Mp3 - ,  L Zepp
    + + '; +/* if(!($context['user']['is_guest']||$context['user']['is_admin'])) + echo ' + +'; +*/ + echo ' +
    + + *'; + + // Show the menu here, according to the menu sub template. + template_menu(); + + echo ' +
    '; + + // The main content should go here. A table is used because IE 6 just can't handle a div. + echo ' + + +
    '; +} + +function template_main_below() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo '
    '; + + // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere! + echo ' + +
    + + + + + +
    + ', theme_copyright(), ' +
    '; + + // Show the load time? + if ($context['show_load_time']) + echo ' + ', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], ''; + + echo ' +
    '; + + // This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough. + if ($context['browser']['is_ie'] && !$context['browser']['is_ie4'] || $context['browser']['is_mac_ie'] || $context['browser']['is_safari']) + { + // The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself. + echo ' + '; + } + + echo ' +
    + + + Rambler\'s Top100 + + + +Rambler\'s Top100 + + + + + + +
    +
    + +'; +} + +// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. +function theme_linktree() +{ + global $context, $settings, $options; + + // Folder style or inline? Inline has a smaller font. + echo ''; + + // Each tree item has a URL and name. Some may have extra_before and extra_after. + foreach ($context['linktree'] as $link_num => $tree) + { + // Show the | | |-[] Folders. + if (!$settings['linktree_inline']) + { + if ($link_num > 0) + echo str_repeat('| ', $link_num - 1), '|-'; + echo '+  '; + } + + // Show something before the link? + if (isset($tree['extra_before'])) + echo $tree['extra_before']; + + // Show the link, including a URL if it should have one. + echo '', $settings['linktree_link'] && isset($tree['url']) ? '' . $tree['name'] . '' : $tree['name'], ''; + + // Show something after the link...? + if (isset($tree['extra_after'])) + echo $tree['extra_after']; + + // Don't show a separator for the last one. + if ($link_num != count($context['linktree']) - 1) + echo $settings['linktree_inline'] ? '  |  ' : '
    '; + } + + echo '
    '; +} + +// Show the menu up top. Something like [home] [help] [profile] [logout]... +function template_menu() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + // Show the [home] and [help] buttons. + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[103] . '' : $txt[103]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[119] . '' : $txt[119]), '', $context['menu_separator']; + + // How about the [search] button? + if ($context['allow_search']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[182] . '' : $txt[182]), '', $context['menu_separator']; + + // Is the user allowed to administrate at all? ([admin]) + if ($context['allow_admin']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[2] . '' : $txt[2]), '', $context['menu_separator']; + + // Edit Profile... [profile] + if ($context['allow_edit_profile']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[79] . '' : $txt[467]), '', $context['menu_separator']; + + // The [calendar]! + if ($context['allow_calendar']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['calendar24'] . '' : $txt['calendar24']), '', $context['menu_separator']; + + // Google Maps Mod + if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view'))) + echo ' + ', ($settings['use_image_buttons'] ? 'Google Map' : 'Google Map'), '', $context['menu_separator']; + + // If the user is a guest, show [login] and [register] buttons. + if ($context['user']['is_guest']) + { + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[34] . '' : $txt[34]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[97] . '' : $txt[97]), ''; + } + // Otherwise, they might want to [logout]... + else + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[108] . '' : $txt[108]), ''; +} + +?> diff --git a/Themes/fixed/index.template.php~ b/Themes/fixed/index.template.php~ new file mode 100644 index 0000000..36bed81 --- /dev/null +++ b/Themes/fixed/index.template.php~ @@ -0,0 +1,436 @@ + + + + + + + + ', $context['page_title'], ''; + + // This is here because Gecko browsers properly support white-space.... + if ($context['browser']['is_gecko']) + echo ' + '; + + echo ' + '; + + /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...) + Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual. + Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big. + Standards compliance mode happens when you use xhtml... */ + if ($context['browser']['needs_size_fix']) + echo ' + '; + + // Show all the relative links, such as help, search, contents, and the like. + echo ' + + + '; + + // If we're viewing a topic, these should be the previous and next topics, respectively. + if (!empty($context['current_topic'])) + echo ' + + '; + + // If we're in a board, or a topic for that matter, the index will be the board's index. + if (!empty($context['current_board'])) + echo ' + '; + + // We'll have to use the cookie to remember the header... + if ($context['user']['is_guest']) + $options['collapse_header'] = !empty($_COOKIE['upshrink']); + + // Output any remaining HTML headers. (from mods, maybe?) + echo $context['html_headers'], ' + + + +'; + + // Because of the way width/padding are calculated, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!) + echo ' +
    '; + + // The logo and the three info boxes. + echo ' + + + + + + + + +
    '; + + // This part is the logo and forum name. You should be able to change this to whatever you want... + echo ' +    '; + + echo ' +
    + + *'; + + // Show the menu here, according to the menu sub template. + template_menu(); + + echo ' +
    '; + + // The main content should go here. A table is used because IE 6 just can't handle a div. + echo ' + + +
    '; +} + +function template_main_below() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo '
    '; + + // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere! + echo ' + +
    + + + + + +
    + ', theme_copyright(), ' +
    '; + + // Show the load time? + if ($context['show_load_time']) + echo ' + ', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], ''; + + echo ' +
    '; + + // This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough. + if ($context['browser']['is_ie'] && !$context['browser']['is_ie4'] || $context['browser']['is_mac_ie'] || $context['browser']['is_safari']) + { + // The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself. + echo ' + '; + } + + echo ' + + + Rambler\'s Top100 + + +'; +} + +// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. +function theme_linktree() +{ + global $context, $settings, $options; + + // Folder style or inline? Inline has a smaller font. + echo ''; + + // Each tree item has a URL and name. Some may have extra_before and extra_after. + foreach ($context['linktree'] as $link_num => $tree) + { + // Show the | | |-[] Folders. + if (!$settings['linktree_inline']) + { + if ($link_num > 0) + echo str_repeat('| ', $link_num - 1), '|-'; + echo '+  '; + } + + // Show something before the link? + if (isset($tree['extra_before'])) + echo $tree['extra_before']; + + // Show the link, including a URL if it should have one. + echo '', $settings['linktree_link'] && isset($tree['url']) ? '' . $tree['name'] . '' : $tree['name'], ''; + + // Show something after the link...? + if (isset($tree['extra_after'])) + echo $tree['extra_after']; + + // Don't show a separator for the last one. + if ($link_num != count($context['linktree']) - 1) + echo $settings['linktree_inline'] ? '  |  ' : '
    '; + } + + echo '
    '; +} + +// Show the menu up top. Something like [home] [help] [profile] [logout]... +function template_menu() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + // Show the [home] and [help] buttons. + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[103] . '' : $txt[103]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[119] . '' : $txt[119]), '', $context['menu_separator']; + + // How about the [search] button? + if ($context['allow_search']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[182] . '' : $txt[182]), '', $context['menu_separator']; + + // Is the user allowed to administrate at all? ([admin]) + if ($context['allow_admin']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[2] . '' : $txt[2]), '', $context['menu_separator']; + + // Edit Profile... [profile] + if ($context['allow_edit_profile']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[79] . '' : $txt[467]), '', $context['menu_separator']; + + // The [calendar]! + if ($context['allow_calendar']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['calendar24'] . '' : $txt['calendar24']), '', $context['menu_separator']; + + // Google Maps Mod + if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view'))) + echo ' + ', ($settings['use_image_buttons'] ? 'Google Map' : 'Google Map'), '', $context['menu_separator']; + + // If the user is a guest, show [login] and [register] buttons. + if ($context['user']['is_guest']) + { + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[34] . '' : $txt[34]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[97] . '' : $txt[97]), ''; + } + // Otherwise, they might want to [logout]... + else + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[108] . '' : $txt[108]), ''; +} + +?> diff --git a/Themes/fixed/languages/Admin.english.php b/Themes/fixed/languages/Admin.english.php new file mode 100755 index 0000000..832ba9b --- /dev/null +++ b/Themes/fixed/languages/Admin.english.php @@ -0,0 +1,379 @@ +Blank a box to remove that word.'; +$txt[207] = 'Set Reserved Names'; +$txt[216] = 'Edit Your Forum Template'; +$txt[222] = 'Edit Server Settings'; +$txt[338] = 'Send an email to the above email list'; +$txt[341] = 'Set Reserved Names'; +$txt[342] = 'One reserved word per line.'; +$txt[347] = 'This page allows you to change the basic settings for your forum. Be very careful with these settings, as they may render the forum dysfunctional. Also note that some of these options (such as time format) are default options or for guests only.'; +$txt[348] = 'Maintenance Mode?'; +$txt[350] = 'Message Board Name'; +$txt[351] = 'Forum URL'; +$txt[352] = 'Cookie Name'; +$txt[355] = 'Webmaster Email Address'; +$txt[356] = 'SMF Directory'; +$txt[360] = 'Sources Directory'; +$txt[365] = 'Title BG Color'; +$txt[366] = 'Title Text Color'; +$txt[367] = 'Window BG Color'; +$txt[368] = 'Window BG Color #2'; +$txt[369] = 'Category BG Color'; +$txt[370] = 'Table Border Color'; +$txt[379] = 'Enable News?'; +$txt[380] = 'Enable Guest Posting?'; +$txt[388] = 'News Fader Title Color'; +$txt[389] = 'News Fader News Color'; +$txt[424] = 'SMF Admin Options'; +$txt[426] = 'Member Controls'; +$txt[427] = 'Forum Controls'; +$txt[428] = 'Forum Configuration'; +$txt[429] = 'Detailed Version Check'; +$txt[495] = 'SMF File'; +$txt[496] = 'SMF Package'; +$txt[501] = 'Maintenance Controls'; +$txt[521] = 'Show buttons as images instead of text'; +$txt[571] = 'Credits'; +$txt[584] = 'Show and require agreement letter when registering'; +$txt[608] = 'Delete Selected Members'; +$txt[610] = 'Repair All Boards and Topics'; +$txt[644] = 'This is your "' . $txt[208] . '". From here, you can edit settings, maintain your forum, view logs, install packages, manage themes, and many other things.
    If you have any trouble, please look at the "Common Support & Issues" panel. If the information there doesn\'t help you, feel free to look to us for help with the problem.
    You may also find answers to your questions or problems by clicking the ' . $txt[119] . ' symbols for more information on the related functions.'; +$txt[670] = 'Please place one news item per box. Some BBC tags, such as [b], [i] and [u] are allowed in your news, as well as smileys and HTML. Clear a news item\'s text box to remove it.'; +$txt[684] = 'Forum Administrators'; +$txt[699] = 'Reserved names will keep members from registering certain usernames or using these words in their displayed names. Choose the options you wish to use from the bottom before submitting.'; +$txt[702] = 'Send activation email to new members upon registration?'; +$txt[726] = 'Match whole name only. If unchecked, search within names.'; +$txt[727] = 'Match case. If unchecked, search will be case insensitive.'; +$txt[728] = 'Check username.'; +$txt[729] = 'Check display name.'; +$txt[735] = 'You can email anyone from this page. The email addresses of the selected membergroups should appear below, but you may remove or add any email addresses you wish. Be sure that each address is separated in this fashion: \'address1; address2\'.'; +$txt[739] = 'Time in milliseconds to display each item in the news fader'; +$txt[740] = 'Show BBC Buttons on Posting and PM Send Pages?'; + +$txt['smf1'] = 'Failed to make backup of Settings.php - make sure Settings_bak.php exists and is writable.'; +$txt['modSettings_title'] = 'Edit Features and Options'; +$txt['modSettings_info'] = 'Change or set options that control how this forum operates.'; +$txt['smf5'] = 'Server on which the database resides:'; +$txt['smf6'] = 'Database Username:'; +$txt['smf7'] = 'Database Password:'; +$txt['smf8'] = 'Database Name:'; +$txt['smf11'] = 'Edit Registration Agreement'; +$txt['smf12'] = 'This agreement is shown when a user registers an account on this forum and has to be accepted before users can continue registration.'; +$txt['smf54'] = 'Database Tables Prefix:'; +$txt['smf55'] = 'Hold down the ctrl key to select multiple entries. Click the ' . $txt[17] . ' button when you are done.'; +$txt['smf73'] = 'Listing of forum errors'; +$txt['smf74'] = 'The following errors are fouling up your forum (blank if none)'; +$txt['smf75'] = 'has a bad first message'; +$txt['smf76'] = 'has a bad last message'; +$txt['smf81'] = 'does not have a matching board'; +$txt['smf83'] = 'does not have a matching category'; +$txt['smf84'] = 'Category'; +$txt['smf85'] = 'Would you like to fix these errors?'; +$txt['smf86'] = 'Fixing forum errors'; +$txt['smf89'] = 'Error creating a'; +$txt['smf92'] = 'All errors fixed! Please check on any categories, boards, or topics created to decide what to do with them.'; +$txt['smf201'] = 'Attachment Manager'; +$txt['smf202'] = 'From here you can administer the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed below.'; +$txt['smf203'] = 'File Attachment Statistics'; +$txt['smf204'] = 'Total Attachments'; +$txt['smf205'] = 'Total Size of Attachment Directory'; +$txt['smf206'] = 'Total Space Available in Attachment Directory'; +$txt['smf207'] = 'File Attachment Options'; +$txt['smf208'] = 'Attachment Log'; +$txt['smf209'] = 'Remove attachments older than'; +$txt['smf210'] = 'Remove attachments larger than'; +$txt['smf213'] = 'Attachment Name'; +$txt['smf214'] = 'File Size'; +$txt['smf215'] = 'No maximum directory size is currently set'; +$txt['smf216'] = '[attachment deleted by admin]'; +$txt['smf217'] = 'Live from Simple Machines...'; +$txt['smf219'] = 'Remove All'; +$txt['smf250'] = 'Please select the Member Group(s) you would like to send an email to.'; +$txt['smf281'] = 'Optimize Database'; +$txt['smf282'] = 'Your database contains %d tables.'; +$txt['smf283'] = 'Attempting to optimize your database...'; +$txt['smf284'] = 'Optimizing %1$s... %2$f kb optimized.'; +$txt['smf285'] = 'All of the tables were already optimized.'; +$txt['smf285b'] = 'It wasn\'t necessary to optimize any tables.'; +$txt['smf286'] = ' table(s) optimized.'; +$txt['smf307'] = 'has a non-existent topic ID'; +$txt['smf308'] = 'contains no messages'; +$txt['smf309'] = 'has a wrong number of replies'; +$txt['smf310'] = 'has a non-existent member ID'; +$txt['smf311'] = 'Successfully inserted salvaged messages in salvage category'; +$txt['smf312'] = 'topic(s) without messages have been removed successfully'; +$txt['smf319'] = 'Admin must approve all new members'; +$txt['smf320'] = 'Warning - agreement.txt is not writable, any changes you make will NOT be saved.'; + +$txt['dvc1'] = 'This shows you the versions of your installation\'s files versus those of the latest version. If any of these files are out of date, you should download and upgrade to the latest version at www.simplemachines.org.'; +$txt['dvc_more'] = '(more detailed)'; + +$txt['lfyi'] = 'You are unable to connect to simplemachines.org\'s latest news file.'; + +$txt['smileys_manage'] = 'Smileys and Smiley Sets'; +$txt['smileys_manage_info'] = 'Install new smiley sets or add smileys to existing ones.'; +$txt['package1'] = 'Package Manager'; +$txt['package_info'] = 'Install new features or modify existing ones with this interface.'; +$txt['theme_admin'] = 'Theme and Layout Settings'; +$txt['theme_admin_info'] = 'Setup and manage your themes and set or reset theme options.'; +$txt['registration_center'] = 'Registration Management'; +$txt['registration_center_info'] = 'Register, approve, and manage member registration.'; +$txt['registration_member'] = 'Register New Member'; + +$txt['viewmembers_name'] = 'Username (display name)'; +$txt['viewmembers_online'] = 'Last Online'; +$txt['viewmembers_today'] = 'Today'; +$txt['viewmembers_day_ago'] = 'day ago'; +$txt['viewmembers_days_ago'] = 'days ago'; + +$txt['display_name'] = 'Display name'; +$txt['email_address'] = 'Email Address'; +$txt['ip_address'] = 'IP address'; +$txt['member_id'] = 'ID'; + +$txt['security_wrong'] = 'Administration login attempt!' . "\n" . + 'Referer: ' . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'unknown') . "\n" . + 'User agent: ' . $_SERVER['HTTP_USER_AGENT'] . "\n" . + 'IP: ' . $GLOBALS['user_info']['ip']; + +$txt['email_as_html'] = 'Send in HTML format. (with this you can put normal HTML in the email.)'; +$txt['email_parsed_html'] = 'Add <br />s and &nbsp;s to this message.'; +$txt['email_variables'] = 'In this message you can use a few "variables". Click here for more information.'; +$txt['email_force'] = 'Send this to members even if they have chosen not to receive announcements.'; +$txt['email_as_pms'] = 'Send this to these groups using personal messages.'; + +$txt['ban_title'] = 'Ban Members'; +$txt[724] = 'IP banning: (e.g. 192.168.12.213 or 128.0.*.*) - one entry per line'; +$txt[725] = 'Email banning: (e.g. badguy@somewhere.com) - one entry per line'; +$txt[7252] = 'User name banning: (e.g. l33tuser) - one entry per line'; + +$txt['ban_description'] = 'Here you can ban troublesome people either by IP, hostname, username, or email.'; +$txt['ban_add_new'] = 'Add new ban'; +$txt['ban_banned_entity'] = 'Banned entity'; +$txt['ban_on_ip'] = 'Ban on IP (e.g. 192.168.10-20.*)'; +$txt['ban_on_hostname'] = 'Ban on Hostname (e.g. *.mil)'; +$txt['ban_on_email'] = 'Ban on Email Address (e.g. *@badsite.com)'; +$txt['ban_on_username'] = 'Ban on Username'; +$txt['ban_notes'] = 'Notes'; +$txt['ban_restriction'] = 'Restriction'; +$txt['ban_full_ban'] = 'Full ban'; +$txt['ban_cannot_post'] = 'Cannot post'; +$txt['ban_cannot_register'] = 'Cannot register'; +$txt['ban_add'] = 'Add'; +$txt['ban_edit_list'] = 'Edit ban list'; +$txt['ban_type'] = 'Ban Type'; +$txt['ban_days'] = 'day(s)'; +$txt['ban_will_expire_within'] = 'Ban will expire after'; +$txt['ban_expires'] = 'Expires'; +$txt['ban_actions'] = 'Actions'; +$txt['ban_expiration'] = 'Expiration'; +$txt['ban_reason_desc'] = 'Reason for ban, to be displayed to banned member.'; +$txt['ban_notes_desc'] = 'Notes that may assist other staff members.'; +$txt['ban_remove_selected'] = 'Remove selected'; +$txt['ban_remove_selected_confirm'] = 'Are you sure you want to remove the selected bans?'; +$txt['ban_modify'] = 'Modify'; + +$txt['ban_log'] = 'Ban log'; +$txt['ban_log_description'] = 'The ban log shows all attempts to enter the forum by banned users (\'full ban\' and \'cannot register\' ban only).'; +$txt['ban_log_no_entries'] = 'No ban log entries'; +$txt['ban_log_ip'] = 'IP'; +$txt['ban_log_email'] = 'Email address'; +$txt['ban_log_member'] = 'Member'; +$txt['ban_log_date'] = 'Date'; +$txt['ban_log_remove_all'] = 'Remove all'; +$txt['ban_log_remove_all_confirm'] = 'Are you sure you want to delete all ban log entries?'; +$txt['ban_log_remove_selected'] = 'Remove selected'; +$txt['ban_log_remove_selected_confirm'] = 'Are you sure you want to delete all selected ban log entries?'; + +$txt['apply_filter'] = 'Apply Filter'; +$txt['applying_filter'] = 'Applying Filter'; +$txt['filter_only_member'] = 'Only show the error messages of this member'; +$txt['filter_only_ip'] = 'Only show the error messages of this IP address'; +$txt['filter_only_session'] = 'Only show the error messages of this session'; +$txt['filter_only_url'] = 'Only show the error messages of this URL'; +$txt['filter_only_message'] = 'Only show the errors with the same message'; +$txt['session'] = 'Session'; +$txt['error_url'] = 'URL of page causing the error'; +$txt['error_message'] = 'Error message'; +$txt['clear_filter'] = 'Clear filter'; +$txt['remove_selection'] = 'Remove Selection'; +$txt['remove_filtered_results'] = 'Remove All Filtered Results'; +$txt['sure_about_errorlog_remove'] = 'Are you sure you want to remove all error messages?'; +$txt['reverse_direction'] = 'Reverse chronological order of list'; + +$txt['settings_not_writable'] = 'These settings cannot be changed because Settings.php is read only.'; + +$txt['maintain_title'] = 'Forum Maintenance'; +$txt['maintain_info'] = 'Optimize tables, make backups, check for errors, and prune boards with these tools.'; +$txt['maintain_done'] = 'Maintenance Completed.'; + +$txt['maintain_general'] = 'General Maintenance'; +$txt['maintain_recount'] = 'Recount all forum totals and statistics.'; +$txt['maintain_errors'] = 'Find and repair any errors.'; +$txt['maintain_logs'] = 'Empty out unimportant logs.'; + +$txt['maintain_karmalog'] = 'Empty out Karmachange Description log'; +$txt['maintain_optimize'] = 'Optimize all tables to improve performance.'; +$txt['maintain_version'] = 'Check all files against current versions.'; + +$txt['maintain_backup'] = 'Backup Database'; +$txt['maintain_backup_struct'] = 'Save the table structure.'; +$txt['maintain_backup_data'] = 'Save the table data. (the important stuff.)'; +$txt['maintain_backup_gz'] = 'Compress the file with gzip.'; +$txt['maintain_backup_save'] = 'Download'; + +$txt['maintain_old'] = 'Remove Old Posts'; +$txt['maintain_old1'] = 'Remove all topics not posted in for '; +$txt['maintain_old2'] = ' days, besides stickies.'; +$txt['maintain_old_all'] = 'All Boards'; +$txt['maintain_old_choose'] = 'Choose Specific Boards'; +$txt['maintain_old_remove'] = 'Remove'; +$txt['maintain_old_confirm'] = 'Are you really sure you want to delete old posts?\\n\\nThis cannot be undone!'; + +$txt['db_error_send'] = 'Send emails on MySQL connection error'; +$txt['db_persist'] = 'Use a persistent connection'; + +$txt['default_language'] = 'Default Forum Language'; + +$txt['maintenance1'] = 'Subject for display:'; +$txt['maintenance2'] = 'Message for display:'; + +$txt['errlog1'] = 'View Forum Error Log'; +$txt['errlog2'] = 'The error log tracks every error encountered by your forum. To delete any errors from the database, mark the checkbox, and click the ' . $txt[31] . ' button at the bottom of the page.'; + +$txt['theme4'] = 'Theme Settings'; +$txt['theme_current_settings'] = 'Current Theme\'s Settings'; + +$txt['parent_repair_found'] = 'Board %d does not have an existing parent board. (its parent is board %d)'; +$txt['parent_repair_fixed'] = 'Successfully assigned orphaned boards to the salvage area.'; + +$txt['repair_zeroed_ids'] = 'Found topics and/or messages with topic or message IDs of 0.'; + +$txt['dvc_your'] = 'Your Version'; +$txt['dvc_current'] = 'Current Version'; +$txt['dvc_sources'] = 'Sources'; +$txt['dvc_default'] = 'Default Templates'; +$txt['dvc_templates'] = 'Current Templates'; +$txt['dvc_languages'] = 'Language Files'; + +$txt['modlog_view'] = 'View Moderation Log'; +$txt['modlog_date'] = 'Date'; +$txt['modlog_member'] = 'Member'; +$txt['modlog_position'] = 'Position'; +$txt['modlog_action'] = 'Action'; +$txt['modlog_ip'] = 'IP'; +$txt['modlog_search_result'] = 'Search Results'; +$txt['modlog_total_entries'] = 'Total Entries'; +$txt['modlog_ac_banned'] = 'Banned'; +$txt['modlog_ac_locked'] = 'Locked'; +$txt['modlog_ac_stickied'] = 'Stickied'; +$txt['modlog_ac_deleted'] = 'Deleted'; +$txt['modlog_ac_deleted_member'] = 'Deleted Member'; +$txt['modlog_ac_removed'] = 'Removed'; +$txt['modlog_ac_modified'] = 'Modified'; +$txt['modlog_ac_merged'] = 'Merged'; +$txt['modlog_ac_split'] = 'Split'; +$txt['modlog_ac_moved'] = 'Moved'; +$txt['modlog_ac_profile'] = 'Profile Edit'; +$txt['modlog_ac_pruned'] = 'Pruned Board'; +$txt['modlog_ac_news'] = 'Edited News'; +$txt['modlog_enter_comment'] = 'Enter Moderation Comment'; +$txt['modlog_moderation_log'] = 'Moderation Log'; +$txt['modlog_moderation_log_desc'] = 'Below is a list of all the moderation actions that have been carried out by moderators of the forum.
    Please note: Entries cannot be removed from this log until they are at least 24 hours old.'; +$txt['modlog_no_entries_found'] = 'No entries found'; +$txt['modlog_remove'] = 'Remove'; +$txt['modlog_removeall'] = 'Remove All'; +$txt['modlog_go'] = 'Go'; +$txt['modlog_add'] = 'Add'; +$txt['modlog_search'] = 'Quick Search'; +$txt['modlog_by'] = 'By'; + +$txt['smileys_default_set_for_theme'] = 'Select default smiley set for this theme'; +$txt['smileys_no_default'] = '(use global default smiley set)'; + +$txt['censor_test'] = 'Test Censored Words'; +$txt['censor_test_save'] = 'Test'; +$txt['censor_case'] = 'Ignore case when censoring.'; +$txt['smf231'] = 'Check only whole words.'; + +$txt['admin_confirm_password'] = '(confirm)'; + +$txt['date_format'] = '(YYYY-MM-DD)'; +$txt['undefined_gender'] = 'Undefined'; +$txt['age'] = 'User age'; +$txt['activation_status'] = 'Activation Status'; +$txt['activated'] = 'Activated'; +$txt['not_activated'] = 'Not activated'; +$txt['primary'] = 'Primary'; +$txt['additional'] = 'Additional'; +$txt['messenger_address'] = 'Messenger Address'; +$txt['wild_cards_allowed'] = 'wildcard characters * and ? are allowed'; +$txt['search_for'] = 'Search for'; +$txt['member_part_of_these_membergroups'] = 'Member is part of these membergroups'; +$txt['membergroups'] = 'Membergroups'; +$txt['confirm_delete_members'] = 'Are you sure you want to delete the selected members?'; + +$txt['support_credits_title'] = 'Support and Credits'; +$txt['support_credits_info'] = 'Get support on common issues and version information to give if you have problems.'; +$txt['support_title'] = 'Support Information'; +$txt['support_versions_current'] = 'Current SMF version'; +$txt['support_versions_forum'] = 'Forum version'; +$txt['support_versions_php'] = 'PHP version'; +$txt['support_versions_mysql'] = 'MySQL version'; +$txt['support_versions_server'] = 'Server version'; +$txt['support_versions_gd'] = 'GD version'; +$txt['support_versions'] = 'Version Information'; +$txt['support_latest'] = 'Common Support & Issues'; +$txt['support_latest_fetch'] = 'Retrieving support information...'; + +$txt['edit_permissions'] = 'Edit Permissions'; +$txt['edit_permissions_info'] = 'Change restrictions and available features globally or to specific boards.'; +$txt['membergroups_members'] = 'Ungrouped Members'; +$txt['membergroups_guests'] = 'Unregistered Guests'; +$txt['membergroups_guests_na'] = 'n/a'; +$txt['membergroups_name'] = 'Name'; +$txt['membergroups_stars'] = 'Stars'; +$txt['membergroups_members_top'] = 'Members'; +$txt['membergroups_add_group'] = 'Add group'; +$txt['membergroups_permissions'] = 'Permissions'; + +$txt['permitgroups_restrict'] = 'Restrictive'; +$txt['permitgroups_standard'] = 'Standard'; +$txt['permitgroups_moderator'] = 'Moderator'; +$txt['permitgroups_maintenance'] = 'Maintenance'; +$txt['permitgroups_inherit'] = 'Inherit'; + +$txt['confirm_delete_attachments_all'] = 'Are you sure you want to delete all attachments?'; +$txt['confirm_delete_attachments'] = 'Are you sure you want to delete the selected attachments?'; +$txt['attachment_manager_browse_files'] = 'Browse Files'; +$txt['attachment_manager_recount'] = 'Recount'; +$txt['attachment_manager_avatars'] = 'Avatars'; +$txt['attachment_manager_attachments'] = 'Attachments'; +$txt['attachment_manager_last_active'] = 'Last Active'; +$txt['attachment_manager_member'] = 'Member'; +$txt['attachment_manager_avatars_older'] = 'Remove avatars from members not active for more than'; +$txt['attachment_manager_total_avatars'] = 'Total Avatars'; + +$txt['editnews_clickadd'] = 'Click here to add another item.'; +$txt['editnews_remove_selected'] = 'Remove selected'; +$txt['editnews_remove_confirm'] = 'Are you sure you want to delete the selected news items?'; +$txt['censor_clickadd'] = 'Click here to add another word.'; + +$txt['update_available'] = 'Update Available!'; +$txt['update_message'] = 'You\'re using an outdated version of SMF, which contains some bugs which have since been fixed. + It is recommended that you update your forum to the latest version as soon as possible. It only takes a minute!'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Admin.russian.php b/Themes/fixed/languages/Admin.russian.php new file mode 100644 index 0000000..718dd46 --- /dev/null +++ b/Themes/fixed/languages/Admin.russian.php @@ -0,0 +1,380 @@ + - .'; +$txt[207] = ' '; +$txt[216] = ' '; +$txt[222] = ' '; +$txt[338] = ' Email '; +$txt[341] = ' '; +$txt[342] = ' .'; +$txt[347] = ' . , SMF-. , (, ).'; +$txt[348] = ' ?'; +$txt[350] = ' '; +$txt[351] = 'URL '; +$txt[352] = 'Cookie Name'; +$txt[355] = 'Email '; +$txt[356] = ' SMF '; +$txt[360] = 'Sources - '; +$txt[365] = ' '; +$txt[366] = ' '; +$txt[367] = ' '; +$txt[368] = ' 2'; +$txt[369] = ' '; +$txt[370] = ' '; +$txt[379] = ' ?'; +$txt[380] = ' ?'; +$txt[388] = ' '; +$txt[389] = ' '; +$txt[424] = ' SMF'; +$txt[426] = ' '; +$txt[427] = ' '; +$txt[428] = ' '; +$txt[429] = ' '; +$txt[495] = 'SMF '; +$txt[496] = 'SMF '; +$txt[501] = ' '; +$txt[521] = ' , '; +$txt[571] = ''; +$txt[584] = ' '; +$txt[608] = ' '; +$txt[610] = ' '; +$txt[644] = ' \'' . $txt[208] . '\'. , , , , .
    - , , " ". , .
    , ' . $txt[119] . ' .'; +$txt[670] = ', . BBC , [b], [i] [u] , HTML. , .'; +$txt[684] = ' '; +$txt[699] = ' . , , .'; +$txt[702] = ' Email ?'; +$txt[726] = ' . , .'; +$txt[727] = ' . , .'; +$txt[728] = ' .'; +$txt[729] = ' .'; +$txt[735] = ' . Email , . , : \'address1; address2\'.'; +$txt[739] = ' '; +$txt[740] = ' BBC ?'; + +$txt['smf1'] = ' Settings.php - , Settings_bak.php .'; +$txt['modSettings_title'] = ' '; +$txt['modSettings_info'] = ' , .'; +$txt['smf5'] = ' () :'; +$txt['smf6'] = ' (DB Username):'; +$txt['smf7'] = ' (DBPassword):'; +$txt['smf8'] = ' (DB Name):'; +$txt['smf11'] = ' '; +$txt['smf12'] = ' , , .'; +$txt['smf54'] = ' (DB Prefix):'; +$txt['smf55'] = ' CTRL . ' . $txt[17] . ' .'; +$txt['smf73'] = ' '; +$txt['smf74'] = ' (, )'; +$txt['smf75'] = ' '; +$txt['smf76'] = ' '; +$txt['smf81'] = ' '; +$txt['smf83'] = ' '; +$txt['smf84'] = ''; +$txt['smf85'] = ' ?'; +$txt['smf86'] = ' '; +$txt['smf89'] = ' '; +$txt['smf92'] = ' ! , , , .'; +$txt['smf201'] = ' '; +$txt['smf202'] = ' . . .'; +$txt['smf203'] = ' '; +$txt['smf204'] = ' '; +$txt['smf205'] = ' '; +$txt['smf206'] = ' , '; +$txt['smf207'] = ' '; +$txt['smf208'] = ' '; +$txt['smf209'] = ' '; +$txt['smf210'] = ' '; +$txt['smf213'] = ' '; +$txt['smf214'] = ' '; +$txt['smf215'] = ' '; +$txt['smf216'] = '[ ]'; +$txt['smf217'] = ' Simple Machines...'; +$txt['smf219'] = ' '; +$txt['smf250'] = ', () , Email.'; +$txt['smf281'] = ' '; +$txt['smf282'] = ' %d .'; +$txt['smf283'] = ' ...'; +$txt['smf284'] = ' %1$s... %2$f kb .'; +$txt['smf285'] = ' .'; +$txt['smf285b'] = ' .'; +$txt['smf286'] = ' () .'; +$txt['smf307'] = ' ID '; +$txt['smf308'] = ' '; +$txt['smf309'] = ' '; +$txt['smf310'] = ' ID '; +$txt['smf311'] = ' '; +$txt['smf312'] = ' () '; +$txt['smf319'] = ' '; +$txt['smf320'] = ' - agreement.txt . '; + +$txt['dvc1'] = ' . - , www.simplemachines.org.'; +$txt['dvc_more'] = '( )'; + +$txt['lfyi'] = ' simplemachines.org.'; + +$txt['smileys_manage'] = ' '; +$txt['smileys_manage_info'] = ' .'; +$txt['package1'] = ' '; +$txt['package_info'] = ' .'; +$txt['theme_admin'] = ' '; +$txt['theme_admin_info'] = ' , .'; +$txt['registration_center'] = ' '; +$txt['registration_center_info'] = ', .'; +$txt['registration_member'] = ' '; + +$txt['viewmembers_name'] = ' ( )'; +$txt['viewmembers_online'] = ' Online'; +$txt['viewmembers_today'] = ''; +$txt['viewmembers_day_ago'] = ' '; +$txt['viewmembers_days_ago'] = ' '; + +$txt['display_name'] = ' '; +$txt['email_address'] = 'Email '; +$txt['ip_address'] = 'IP '; +$txt['member_id'] = 'ID'; + +$txt['security_wrong'] = ' !' . "\n" . + ': ' . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'unknown') . "\n" . + 'User agent: ' . $_SERVER['HTTP_USER_AGENT'] . "\n" . + 'IP: ' . $GLOBALS['user_info']['ip']; + +$txt['email_as_html'] = ' HTML ( , HTML email.)'; +$txt['email_parsed_html'] = ' <br />s &nbsp;s .'; +$txt['email_variables'] = ' " ". .'; +$txt['email_force'] = ' , .'; +$txt['email_as_pms'] = ' .'; + +$txt['ban_title'] = ' '; +$txt[724] = ' IP : (, 192.168.12.213 or 128.0.*.*)- '; +$txt[725] = ' email: (, badguy@somewhere.com) - +'; +$txt[7252] = ' : (, 111user) - '; + +$txt['ban_description'] = ' IP, , email.'; +$txt['ban_add_new'] = ' '; +$txt['ban_banned_entity'] = ' '; +$txt['ban_on_ip'] = ' IP (, 192.168.10-20.*)'; +$txt['ban_on_hostname'] = ' (, *.mil)'; +$txt['ban_on_email'] = ' email (, *@badsite.com)'; +$txt['ban_on_username'] = ' '; +$txt['ban_notes'] = ''; +$txt['ban_restriction'] = ''; +$txt['ban_full_ban'] = ' '; +$txt['ban_cannot_post'] = '   '; +$txt['ban_cannot_register'] = '  '; +$txt['ban_add'] = ''; +$txt['ban_edit_list'] = ' '; +$txt['ban_type'] = ' '; +$txt['ban_days'] = '()'; +$txt['ban_will_expire_within'] = ' '; +$txt['ban_expires'] = ''; +$txt['ban_actions'] = ''; +$txt['ban_expiration'] = ''; +$txt['ban_reason_desc'] = ' , .'; +$txt['ban_notes_desc'] = ', .';$txt['ban_remove_selected'] = 'Remove selected'; +$txt['ban_remove_selected_confirm'] = 'Are you sure you want to remove the selected bans?'; +$txt['ban_modify'] = 'Modify'; + +$txt['ban_remove_selected'] = ' '; +$txt['ban_remove_selected_confirm'] = ' , ?'; +$txt['ban_modify'] = ''; + +$txt['ban_log'] = ' '; +$txt['ban_log_description'] = ' (\' \' \' \' ).'; +$txt['ban_log_no_entries'] = ' '; +$txt['ban_log_ip'] = 'IP'; +$txt['ban_log_email'] = 'Email '; +$txt['ban_log_member'] = ''; +$txt['ban_log_date'] = ''; +$txt['ban_log_remove_all'] = ' '; +$txt['ban_log_remove_all_confirm'] = ' , ?'; +$txt['ban_log_remove_selected'] = ' '; +$txt['ban_log_remove_selected_confirm'] = ' , ?'; + +$txt['apply_filter'] = ' '; +$txt['applying_filter'] = ' '; +$txt['filter_only_member'] = ' '; +$txt['filter_only_ip'] = ' IP'; +$txt['filter_only_session'] = ' '; +$txt['filter_only_url'] = ' URL'; +$txt['filter_only_message'] = ' '; +$txt['session'] = ''; +$txt['error_url'] = 'URL '; +$txt['error_message'] = ' '; +$txt['clear_filter'] = ' '; +$txt['remove_selection'] = ' '; +$txt['remove_filtered_results'] = ' '; +$txt['sure_about_errorlog_remove'] = ' , ?'; +$txt['reverse_direction'] = ' '; + +$txt['settings_not_writable'] = ' , Settings.php (CHMOD).'; + +$txt['maintain_title'] = ' '; +$txt['maintain_info'] = ' , , .'; +$txt['maintain_done'] = ' .'; + +$txt['maintain_general'] = ' '; +$txt['maintain_recount'] = ' .'; +$txt['maintain_errors'] = ' .'; +$txt['maintain_logs'] = ' .'; +$txt['maintain_optimize'] = ' , .'; +$txt['maintain_version'] = ' .'; + +$txt['maintain_backup'] = ' '; +$txt['maintain_backup_struct'] = ' .'; +$txt['maintain_backup_data'] = ' . ( .)'; +$txt['maintain_backup_gz'] = ' gzip.'; +$txt['maintain_backup_save'] = ''; + +$txt['maintain_old'] = ' '; +$txt['maintain_old1'] = ' , '; +$txt['maintain_old2'] = ' ( ).'; +$txt['maintain_old_all'] = ' '; +$txt['maintain_old_choose'] = ' '; +$txt['maintain_old_remove'] = ''; +$txt['maintain_old_confirm'] = ' , ?\\n\\n !'; + +$txt['db_error_send'] = ' email, MySQL'; +$txt['db_persist'] = ' '; + +$txt['default_language'] = ' '; + +$txt['maintenance1'] = ' :'; +$txt['maintenance2'] = ' :'; + +$txt['errlog1'] = ' '; +$txt['errlog2'] = ' . ' . $txt[31] . ' .'; + +$txt['theme4'] = ' '; +$txt['theme_current_settings'] = ' '; + +$txt['parent_repair_found'] = ' %d ( %d)'; +$txt['parent_repair_fixed'] = ' .'; + +$txt['repair_zeroed_ids'] = ' 0 ID.'; + +$txt['dvc_your'] = ' '; +$txt['dvc_current'] = ' '; +$txt['dvc_sources'] = 'Sources - '; +$txt['dvc_default'] = ' '; +$txt['dvc_templates'] = ' '; +$txt['dvc_languages'] = ' '; + +$txt['modlog_view'] = ' '; +$txt['modlog_date'] = ''; +$txt['modlog_member'] = ''; +$txt['modlog_position'] = ''; +$txt['modlog_action'] = ''; +$txt['modlog_ip'] = 'IP'; +$txt['modlog_search_result'] = ' '; +$txt['modlog_total_entries'] = ' '; +$txt['modlog_ac_banned'] = ''; +$txt['modlog_ac_locked'] = ''; +$txt['modlog_ac_stickied'] = ''; +$txt['modlog_ac_deleted'] = ''; +$txt['modlog_ac_deleted_member'] = ' '; +$txt['modlog_ac_removed'] = ''; +$txt['modlog_ac_modified'] = ''; +$txt['modlog_ac_merged'] = ''; +$txt['modlog_ac_split'] = ''; +$txt['modlog_ac_moved'] = ''; +$txt['modlog_ac_profile'] = ' Profile Edit'; +$txt['modlog_ac_pruned'] = ' '; +$txt['modlog_ac_news'] = ' '; +$txt['modlog_enter_comment'] = ' '; +$txt['modlog_moderation_log'] = ' '; +$txt['modlog_moderation_log_desc'] = ' .
    : , 24 .'; +$txt['modlog_no_entries_found'] = ' '; +$txt['modlog_remove'] = ''; +$txt['modlog_removeall'] = ' '; +$txt['modlog_go'] = ''; +$txt['modlog_add'] = ''; +$txt['modlog_search'] = ' '; +$txt['modlog_by'] = ''; + +$txt['smileys_default_set_for_theme'] = ' '; +$txt['smileys_no_default'] = '( )'; + +$txt['censor_test'] = ' '; +$txt['censor_test_save'] = ''; +$txt['censor_case'] = ' .'; +$txt['smf231'] = ' .'; + +$txt['admin_confirm_password'] = '()'; + +$txt['date_format'] = '(--)'; +$txt['undefined_gender'] = ''; +$txt['age'] = ' '; +$txt['activation_status'] = ' '; +$txt['activated'] = ''; +$txt['not_activated'] = ' '; +$txt['primary'] = ''; +$txt['additional'] = ''; +$txt['messenger_address'] = 'Messenger Address'; +$txt['wild_cards_allowed'] = ' * ? '; +$txt['search_for'] = ' '; +$txt['member_part_of_these_membergroups'] = ' - '; +$txt['membergroups'] = ' '; +$txt['confirm_delete_members'] = ' , ?'; + +$txt['support_credits_title'] = ' '; +$txt['support_credits_info'] = ' , .'; +$txt['support_title'] = ' '; +$txt['support_versions_current'] = ' SMF'; +$txt['support_versions_forum'] = ' '; +$txt['support_versions_php'] = ' PHP'; +$txt['support_versions_mysql'] = ' MySQL'; +$txt['support_versions_server'] = ' '; +$txt['support_versions_gd'] = ' GD'; +$txt['support_versions'] = ' '; +$txt['support_latest'] = ' '; +$txt['support_latest_fetch'] = ' ...'; + +$txt['edit_permissions'] = ' '; +$txt['edit_permissions_info'] = ' .'; +$txt['membergroups_members'] = ' '; +$txt['membergroups_guests'] = ' '; +$txt['membergroups_guests_na'] = ' '; +$txt['membergroups_name'] = ' '; +$txt['membergroups_stars'] = ''; +$txt['membergroups_members_top'] = ''; +$txt['membergroups_add_group'] = ' '; +$txt['membergroups_permissions'] = ''; + +$txt['permitgroups_restrict'] = ''; +$txt['permitgroups_standard'] = ''; +$txt['permitgroups_moderator'] = ''; +$txt['permitgroups_maintenance'] = ''; +$txt['permitgroups_inherit'] = ''; + +$txt['confirm_delete_attachments_all'] = ' , ?'; +$txt['confirm_delete_attachments'] = ' , ?'; +$txt['attachment_manager_browse_files'] = ' '; +$txt['attachment_manager_recount'] = ''; +$txt['attachment_manager_avatars'] = ''; +$txt['attachment_manager_attachments'] = ''; +$txt['attachment_manager_last_active'] = ' '; +$txt['attachment_manager_member'] = ''; +$txt['attachment_manager_avatars_older'] = ' '; +$txt['attachment_manager_total_avatars'] = ' '; + +$txt['editnews_clickadd'] = ' , .'; +$txt['editnews_remove_selected'] = ' '; +$txt['editnews_remove_confirm'] = ' , ?'; +$txt['censor_clickadd'] = ' , .'; +$txt['update_available'] = ' !'; +$txt['update_message'] = ' SMF, , . + . !'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Errors.english.php b/Themes/fixed/languages/Errors.english.php new file mode 100755 index 0000000..33f55f9 --- /dev/null +++ b/Themes/fixed/languages/Errors.english.php @@ -0,0 +1,243 @@ +register.'; +$txt[213] = 'Passwords aren\'t the same.'; +$txt[223] = 'Sorry, you must register before using this feature.'; +$txt[241] = 'Invalid character used in Password.'; +$txt[242] = 'Invalid character used in Name.'; +$txt[243] = 'Invalid character used in email.'; +$txt[244] = 'The username you tried to use contains the reserved name \'%s\'. Please try another username.'; +$txt[337] = 'This field only accepts numbers from 0-9'; +$txt[472] = 'This topic doesn\'t exist on this board.'; + +$txt['smf26'] = 'You didn\'t select a vote option.'; +$txt['smf27'] = 'Either that poll doesn\'t exist, the poll has been locked, or you tried to vote twice.'; +$txt['smf28'] = 'This option is only available to registered members.'; +$txt['smf31'] = 'This was locked by an administrator. You cannot unlock it.'; +$txt['smf61'] = 'Sorry, you are not permitted to modify your own karma.'; +$txt['smf63'] = 'Sorry, this feature is disabled.'; +$txt['smf115b'] = 'Cannot access attachments upload path!'; +$txt['smf122'] = 'Your file is too large. The maximum attachment size allowed is %d KB.'; +$txt['smf124'] = 'Your attachment couldn\'t be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.

    Please consult your server administrator for more information.'; +$txt['smf125'] = 'Sorry! There is already an attachment with the same filename as the one you tried to upload. Please rename the file and try again.'; +$txt['smf126'] = 'The upload folder is full. Please try a smaller file and/or contact an administrator.'; +$txt['smf191'] = 'Could not connect to server or could not find file'; +$txt['smf253'] = 'You are not allowed to split topics'; +$txt['smf232'] = 'The board you specified doesn\'t exist'; +$txt['smf262'] = 'You are not allowed to merge topics'; +$txt['smf263'] = 'You specified an invalid topic ID.'; +$txt['smf268'] = 'You cannot split a topic at the first post.'; +$txt['smf270'] = 'This topic only contains one message and cannot be split.'; +$txt['smf271'] = 'no messages selected'; +$txt['smf271b'] = 'Unable to split. You have selected every message.'; +$txt['smf272'] = 'Unable to find messages'; +$txt['smf273'] = 'Unable to insert topic'; +$txt['smf289'] = 'You have chosen a username of an already existing moderator. Please choose another username'; +$txt['smf304'] = 'Your session timed out while posting. Please go back and try again.'; +$txt['smf305'] = 'Session verification failed. Please try logging out and back in again, and then try again.'; +$txt['smf306'] = 'Unable to verify referring url. Please go back and try again.'; + +$txt['cannot_admin_forum'] = 'You are not allowed to administrate this forum.'; +$txt['cannot_calendar_edit_any'] = 'You cannot edit calendar events.'; +$txt['cannot_calendar_edit_own'] = 'You don\'t have the privileges necessary to edit your own events.'; +$txt['cannot_calendar_post'] = 'Event posting isn\'t allowed - sorry.'; +$txt['cannot_calendar_view'] = 'Sorry, but you are not allowed to view the calendar.'; +$txt['cannot_delete_any'] = 'Sorry, but you don\'t have the privilege to remove just any topic.'; +$txt['cannot_delete_own'] = 'You cannot delete your own topics in this board.'; +$txt['cannot_edit_news'] = 'You are not allowed to edit news items on this forum.'; +$txt['cannot_pm_read'] = 'Sorry, you can\'t read your personal messages.'; +$txt['cannot_pm_send'] = 'You are not allowed to send personal messages.'; +$txt['cannot_karma_edit'] = 'You aren\'t permitted to modify other people\'s karma.'; +$txt['cannot_lock_any'] = 'You are not allowed to lock just any topic here.'; +$txt['cannot_lock_own'] = 'Apologies, but you cannot lock your own topics here.'; +$txt['cannot_make_sticky'] = 'You don\'t have permission to sticky this topic.'; +$txt['cannot_manage_attachments'] = 'You\'re not allowed to manage attachments or avatars.'; +$txt['cannot_manage_bans'] = 'You\'re not allowed to change the list of bans.'; +$txt['cannot_manage_boards'] = 'You are not allowed to manage boards and categories.'; +$txt['cannot_manage_membergroups'] = 'You don\'t have permission to modify or assign membergroup.'; +$txt['cannot_manage_permissions'] = 'You don\'t have permission to manage permissions.'; +$txt['cannot_manage_smileys'] = 'You\'re not allowed to manage smileys.'; +$txt['cannot_mark_any_notify'] = 'You don\'t have the permissions necessary to get notifications from this topic.'; +$txt['cannot_mark_notify'] = 'Sorry, but you are not permitted to request notifications from this board.'; +$txt['cannot_merge_any'] = 'You aren\'t allowed to merge topics on one of the selected board(s).'; +$txt['cannot_moderate_forum'] = 'You are not allowed to moderate this forum.'; +$txt['cannot_modify_any'] = 'You aren\'t allowed to modify just any post.'; +$txt['cannot_modify_own'] = 'Sorry, but you aren\'t allowed to edit your own posts.'; +$txt['cannot_modify_replies'] = 'Even though this post is a reply to your topic, you cannot edit it.'; +$txt['cannot_move_any'] = 'You are not allowed to move topics in this board.'; +$txt['cannot_poll_add_own'] = 'Sorry, you aren\'t allowed to add polls to your own topics in this board.'; +$txt['cannot_poll_add_any'] = 'You don\'t have the access to add polls to this topic.'; +$txt['cannot_poll_edit_own'] = 'You cannot edit this poll, even though it is your own.'; +$txt['cannot_poll_edit_any'] = 'You have been denied access to editing polls in this board.'; +$txt['cannot_poll_lock_own'] = 'You are not allowed to lock your own polls in this board.'; +$txt['cannot_poll_lock_any'] = 'Sorry, but you aren\'t allowed to lock just any poll.'; +$txt['cannot_poll_post'] = 'You aren\'t allowed to post polls in the current board.'; +$txt['cannot_poll_remove_own'] = 'You are not permitted to remove this poll from your topic.'; +$txt['cannot_poll_remove_any'] = 'You cannot remove just any poll on this board.'; +$txt['cannot_poll_view'] = 'You are not allowed to view polls in this board.'; +$txt['cannot_poll_vote'] = 'Sorry, but you cannot vote in polls in this board.'; +$txt['cannot_post_attachment'] = 'You don\'t have permission to post attachments here.'; +$txt['cannot_post_new'] = 'Sorry, you cannot post new topics in this board.'; +$txt['cannot_post_reply_any'] = 'You are not permitted to post replies to topics on this board.'; +$txt['cannot_post_reply_own'] = 'You are not allowed to post replies even to your own topics in this board.'; +$txt['cannot_profile_remove_own'] = 'Sorry, but you aren\'t allowed to delete your own account.'; +$txt['cannot_profile_remove_any'] = 'You don\'t have the permissions to go about removing people\'s accounts!'; +$txt['cannot_profile_extra_any'] = 'You are not permitted to modify profile settings.'; +$txt['cannot_profile_identity_any'] = 'You aren\'t allowed to edit account settings.'; +$txt['cannot_profile_title_any'] = 'You cannot edit people\'s custom titles.'; +$txt['cannot_profile_extra_own'] = 'Sorry, but you don\'t have the necessary permissions to edit your profile data.'; +$txt['cannot_profile_identity_own'] = 'You can\'t change your identity at the current moment.'; +$txt['cannot_profile_title_own'] = 'You are not allowed to change your custom title.'; +$txt['cannot_profile_remote_avatar'] = 'You don\'t have the privilege of using a remote avatar.'; +$txt['cannot_profile_view_own'] = 'Many apologies, but you can\'t view your own profile.'; +$txt['cannot_profile_view_any'] = 'Many apologies, but you can\'t view just any profile.'; +$txt['cannot_remove_own'] = 'You are not, on this board, allowed to delete your own posts.'; +$txt['cannot_remove_replies'] = 'Sorry, but you cannot remove these posts, even though they are replies to your topic.'; +$txt['cannot_remove_any'] = 'Deleting just any posts in this board is not allowed.'; +$txt['cannot_report_any'] = 'You are not allowed to report posts in this board.'; +$txt['cannot_search_posts'] = 'You are not allowed to search for posts in this forum.'; +$txt['cannot_send_mail'] = 'You don\'t have the privilege of sending out emails to everyone.'; +$txt['cannot_send_topic'] = 'Sorry, but the administrator has disallowed sending topics on this board.'; +$txt['cannot_split_any'] = 'Splitting just any topic is not allowed in this board.'; +$txt['cannot_view_attachments'] = 'It seems that you are not allowed to download or view attachments on this board.'; +$txt['cannot_view_mlist'] = 'You can\'t view the memberlist because you don\'t have permission to.'; +$txt['cannot_view_stats'] = 'You aren\'t allowed to view the forum statistics.'; +$txt['cannot_who_view'] = 'Sorry - you don\'t have the proper permissions to view the Who\'s Online list.'; + +$txt['theme3'] = 'That theme does not exist.'; +$txt['theme_dir_wrong'] = 'The default theme\'s directory is wrong, please correct it by clicking this text.'; +$txt['search_no_boards'] = 'No valid boards were selected!'; +$txt['registration_disabled'] = 'Sorry, registration is currently disabled.'; +$txt['registration_no_secret_question'] = 'Sorry, there is no secret question set for this member.'; +$txt['poll_range_error'] = 'Sorry, the poll must run for more than 0 days.'; +$txt['delFirstPost'] = 'You are not allowed to delete the first post in a topic.

    If you want to delete this topic, click on the Remove Topic link, or ask a moderator/administrator to do it for you.

    '; +$txt['parent_error'] = 'Unable to create board!'; +$txt['login_cookie_error'] = 'You were unable to login. Please check your cookie settings.'; +$txt['previous_next_end'] = 'You\'ve reached the end of the topics. You can\'t go any farther.'; +$txt['pswd7'] = 'Sorry, but you did not answer your question correctly. Please click back to try again, or click back twice to use the default method of obtaining your password.'; +$txt['rtm11'] = 'No moderators found!'; +$txt['parent_not_found'] = 'Board structure corrupt: unable to find parent board'; + +$txt['calendar_off'] = 'You cannot access the calendar right now because it is disabled.'; +$txt['calendar1'] = 'Invalid month value.'; +$txt['calendar2'] = 'Invalid year value.'; +$txt['calendar7'] = 'Event month is missing.'; +$txt['calendar8'] = 'Event year is missing.'; +$txt['calendar14'] = 'Event day is missing.'; +$txt['calendar15'] = 'Event title is missing.'; +$txt['calendar16'] = 'Invalid date.'; +$txt['calendar17'] = 'No event title was entered.'; +$txt['calendar18'] = 'Missing event ID.'; +$txt['calendar19'] = 'You do not have permission to edit this event.'; +$txt['calendar38'] = 'Board ID is missing.'; +$txt['calendar39'] = 'Topic ID is missing.'; +$txt['calendar40'] = 'Topic doesn\'t exist.'; +$txt['calendar41'] = 'You are not the owner of this topic.'; +$txt['calendar42'] = 'The board does not exist.'; +$txt['calendar55'] = 'The span feature is currently disabled.'; +$txt['calendar56'] = 'Invalid number of days to span.'; + +$txt['moveto_noboards'] = 'There are no boards to move this topic to!'; + +$txt['already_activated'] = 'Your account has already been activated.'; + +$txt['invalid_email'] = 'Invalid email address / email address range.
    Example of a valid email address: evil.user@badsite.com.
    Example of a valid email address range: *@*.badsite.com'; +$txt['invalid_expiration_date'] = 'Expiration date is not valid'; +$txt['invalid_hostname'] = 'Invalid host name / host name range.
    Example of a valid host name: proxy4.badhost.com
    Example of a valid host name range: *.badhost.com'; +$txt['invalid_ip'] = 'Invalid IP / IP range.
    Example of a valid IP address: 127.0.0.1
    Example of a valid IP range: 127.0.0-20.*'; +$txt['invalid_username'] = 'Member name not found'; +$txt['no_ban_admin'] = 'You may not ban an admin - You must demote them first!'; +$txt['no_bantype_selected'] = 'No ban type was selected'; +$txt['ban_not_found'] = 'Ban not found'; +$txt['ban_unknown_restriction_type'] = 'Restriction type unknown'; + +$txt['recycle_no_valid_board'] = 'No valid board selected for recycle topics'; + +$txt['login_threshold_fail'] = 'Sorry, you are out of login chances. Please come back and try again later.'; + +$txt['who_off'] = 'You cannot access Who\'s Online right now because it is disabled.'; + +$txt['merge_create_topic_failed'] = 'Error creating a new topic.'; +$txt['merge_need_more_topics'] = 'Merge topics require at least two topics to merge.'; + +$txt['spamWaitTime_broken'] = 'The last posting from your IP was less than %d seconds ago. Please try again later.'; +$txt['registerWaitTime_broken'] = 'You already registered just %d seconds ago!'; +$txt['loginWaitTime_broken'] = 'You will have to wait about %d seconds to login again, sorry.'; + +$txt['no_valid_search_string'] = 'Did you forget to put something to search for?'; +$txt['topic_gone'] = 'The topic or board you are looking for appears to be either missing or off limits to you.'; +$txt['theme_edit_missing'] = 'The file you are trying to edit... can\'t even be found!'; + +$txt['attachments_no_write'] = 'The attachments upload directory is not writable. Your attachment or avatar cannot be saved.'; +$txt['attachments_limit_per_post'] = 'You may not upload more than %d attachments per post'; + +$txt['rtm_not_own'] = 'You can\'t report your own post to the moderator, that doesn\'t make sense!'; + +$txt['no_dump_database'] = 'Only administrators can make database backups!'; +$txt['pm_not_yours'] = 'The personal message you\'re trying to quote is not your own or does not exist, please go back and try again.'; +$txt['mangled_post'] = 'Mangled form data - please go back and try again.'; + +$txt['error_while_submitting'] = 'The following error or errors occurred while posting this message:'; +$txt['error_long_name'] = 'The name you tried to use was too long.'; +$txt['error_no_name'] = 'No name was provided.'; +$txt['error_bad_name'] = 'The name you submitted cannot be used, because it is or contains a reserved name.'; +$txt['error_no_email'] = 'No email address was provided.'; +$txt['error_bad_email'] = 'An invalid email address was given.'; +$txt['error_no_event'] = 'No event name has been given.'; +$txt['error_no_subject'] = 'No subject was filled in.'; +$txt['error_no_question'] = 'No question was filled in for this poll.'; +$txt['error_no_message'] = 'The message body was left empty.'; +$txt['error_long_message'] = 'The message exceeds the maximum allowed length (' . $modSettings['max_messageLength'] . ' characters).'; +$txt['error_session_timeout'] = 'Your session timed out while posting. Please try to re-submit your message.'; +$txt['error_no_to'] = 'No recipients specified.'; +$txt['error_bad_to'] = 'One or more \'to\'-recipients could not be found.'; +$txt['error_bad_bcc'] = 'One or more \'bcc\'-recipients could not be found.'; +$txt['error_form_already_submitted'] = 'You already submitted this post! You might have accidently double clicked, or tried to refresh.'; +$txt['error_poll_few'] = 'You must have at least two choices!'; + +$txt['smiley_not_found'] = 'Smiley not found.'; +$txt['smiley_has_no_code'] = 'No code for this smiley was given.'; +$txt['smiley_has_no_filename'] = 'No filename for this smiley was given.'; +$txt['smiley_not_unique'] = 'A smiley with that code already exists.'; +$txt['smiley_set_already_exists'] = 'A smiley set with that URL already exists'; +$txt['smiley_set_not_found'] = 'Smiley set not found'; +$txt['smiley_set_path_already_used'] = 'The URL of the smiley set is already being used by another smiley set.'; +$txt['smiley_set_unable_to_import'] = 'Unable to import smiley set. Either the directory is invalid or cannot be accessed.'; + +$txt['smileys_upload_error'] = 'Failed to upload file.'; +$txt['smileys_upload_error_blank'] = 'All smiley sets must have an image!'; +$txt['smileys_upload_error_name'] = 'All smileys must have the same filename!'; +$txt['smileys_upload_error_illegal'] = 'Illegal Type.'; + +$txt['search_invalid_weights'] = 'Search weights are not properly configured. At least one weight should be configure to be non-zero. Please report this error to an administrator.'; +$txt['unable_to_create_temporary'] = 'Search was unable to create temporary tables. Please report this error to an administrator.'; + +$txt['package_no_file'] = 'Unable to find package file!'; +$txt['packageget_unable'] = 'Unable to connect to the server. Please try using this URL instead.'; +$txt['not_on_simplemachines'] = 'Sorry, packages can only be downloaded like this from the simplemachines.org server.'; +$txt['package_cant_uninstall'] = 'This package was either never installed or was already uninstalled - you can\'t uninstall it now.'; +$txt['package_cant_download'] = 'You cannot download or install new packages because the Packages directory is not writable!'; +$txt['package_upload_error'] = 'Could not upload package, please check directory permissions!'; +$txt['package_upload_error_exists'] = 'The file you are uploading already exists on the server. Please delete it first then try again.'; + +$txt['no_membergroup_selected'] = 'No membergroup selected'; + +$txt['attachment_not_found'] = 'Attachment Not Found'; + +$txt['cannot_karmalog_view'] = 'Sorry - you don\'t have the proper permissions to view the Karma Description list.'; +$txt['viewkarma_error'] = 'User ID must be a number'; +$txt['karma_not_topic_starter'] = 'Sorry, he is not topic author.'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Errors.russian.php b/Themes/fixed/languages/Errors.russian.php new file mode 100644 index 0000000..2c89dab --- /dev/null +++ b/Themes/fixed/languages/Errors.russian.php @@ -0,0 +1,245 @@ + .'; +$txt[213] = ' .'; +$txt[223] = ', , .'; +$txt[241] = ' .'; +$txt[242] = ' .'; +$txt[243] = ' Email.'; +$txt[244] = ' , - \'%s\'. , .'; +$txt[337] = ' 0 9'; +$txt[472] = ' .'; +$txt[568] = ', . ;)'; + +$txt['smf26'] = ' , .'; +$txt['smf27'] = ' , , .'; +$txt['smf28'] = ' .'; +$txt['smf31'] = ' . .'; +$txt['smf61'] = ', .'; +$txt['smf63'] = ', .'; +$txt['smf115b'] = ' !'; +$txt['smf122'] = ' . %d KB.'; +$txt['smf124'] = ' . , , .

    , .'; +$txt['smf125'] = '! . , .'; +$txt['smf126'] = ' upload . .'; +$txt['smf191'] = ' '; +$txt['smf253'] = ' '; +$txt['smf232'] = ' '; +$txt['smf262'] = ' '; +$txt['smf263'] = ' ID .'; +$txt['smf268'] = ' .'; +$txt['smf270'] = ' .'; +$txt['smf271'] = ' '; +$txt['smf271b'] = ' . .'; +$txt['smf272'] = ' '; +$txt['smf273'] = ' '; +$txt['smf289'] = ' . .'; +$txt['smf304'] = ' , . .'; +$txt['smf305'] = ' . , , .'; +$txt['smf306'] = ' . , .'; + +$txt['cannot_admin_forum'] = ' .'; +$txt['cannot_calendar_edit_any'] = ' .'; +$txt['cannot_calendar_edit_own'] = ' , .'; +$txt['cannot_calendar_post'] = ' , .'; +$txt['cannot_calendar_view'] = ', .'; +$txt['cannot_delete_any'] = ', .'; +$txt['cannot_delete_own'] = ' .'; +$txt['cannot_edit_forum'] = ' .'; +$txt['cannot_edit_news'] = ' .'; +$txt['cannot_pm_read'] = ', .'; +$txt['cannot_pm_send'] = ' .'; +$txt['cannot_karma_edit'] = ' .'; +$txt['cannot_lock_any'] = ' .'; +$txt['cannot_lock_own'] = ', .'; +$txt['cannot_make_sticky'] = ' .'; +$txt['cannot_manage_attachments'] = ' .'; +$txt['cannot_manage_bans'] = ' .'; +$txt['cannot_manage_boards'] = ' .'; +$txt['cannot_manage_membergroups'] = ' .'; +$txt['cannot_manage_permissions'] = ' .'; +$txt['cannot_manage_smileys'] = ' .'; +$txt['cannot_mark_any_notify'] = ' .'; +$txt['cannot_mark_notify'] = ', .'; +$txt['cannot_merge_any'] = ' ().'; +$txt['cannot_moderate_forum'] = ' .'; +$txt['cannot_modify_any'] = ' .'; +$txt['cannot_modify_own'] = ', .'; +$txt['cannot_modify_replies'] = ' , .'; +$txt['cannot_move_any'] = ' .'; +$txt['cannot_poll_add_own'] = ', .'; +$txt['cannot_poll_add_any'] = ' .'; +$txt['cannot_poll_edit_own'] = ' , .'; +$txt['cannot_poll_edit_any'] = ' .'; +$txt['cannot_poll_lock_own'] = ' .'; +$txt['cannot_poll_lock_any'] = ', .'; +$txt['cannot_poll_post'] = ' .'; +$txt['cannot_poll_remove_own'] = ' .'; +$txt['cannot_poll_remove_any'] = ' .'; +$txt['cannot_poll_view'] = ' .'; +$txt['cannot_poll_vote'] = ', .'; +$txt['cannot_post_attachment'] = ' .'; +$txt['cannot_post_new'] = ', .'; +$txt['cannot_post_reply_any'] = ' .'; +$txt['cannot_post_reply_own'] = ' .'; +$txt['cannot_profile_remove_own'] = ', .'; +$txt['cannot_profile_remove_any'] = ' !'; +$txt['cannot_profile_extra_any'] = ' .'; +$txt['cannot_profile_identity_any'] = ' .'; +$txt['cannot_profile_title_any'] = ' .'; +$txt['cannot_profile_extra_own'] = ', , .'; +$txt['cannot_profile_identity_own'] = ' .'; +$txt['cannot_profile_title_own'] = ' .'; +$txt['cannot_profile_remote_avatar'] = ' .'; +$txt['cannot_profile_view_own'] = ' , .'; +$txt['cannot_profile_view_any'] = ' , .'; +$txt['cannot_remove_own'] = ' , .'; +$txt['cannot_remove_replies'] = ', , .'; +$txt['cannot_remove_any'] = ' .'; +$txt['cannot_report_any'] = ' .'; +$txt['cannot_search_posts'] = ' .'; +$txt['cannot_send_mail'] = ' email .'; +$txt['cannot_send_topic'] = ', .'; +$txt['cannot_split_any'] = ' .'; +$txt['cannot_view_attachments'] = '-, .'; +$txt['cannot_view_mlist'] = ' , .'; +$txt['cannot_view_stats'] = ' .'; +$txt['cannot_who_view'] = ', , , Online.'; + +$txt['theme3'] = ' .'; +$txt['theme_dir_wrong'] = ' , , .'; +$txt['search_no_boards'] = ' !'; +$txt['registration_disabled'] = ', .'; +$txt['registration_no_secret_question'] = ', .'; +$txt['poll_range_error'] = ', 0 .'; +$txt['delFirstPost'] = ' .

    , / .

    '; +$txt['parent_error'] = ' !'; +$txt['login_cookie_error'] = ' . , cookie.'; +$txt['previous_next_end'] = ' .'; +$txt['pswd7'] = ', . , , .'; +$txt['rtm11'] = ' !'; +$txt['parent_not_found'] = ' : '; + +$txt['calendar_off'] = ' , .'; +$txt['calendar1'] = ' .'; +$txt['calendar2'] = ' .'; +$txt['calendar7'] = ' .'; +$txt['calendar8'] = ' .'; +$txt['calendar14'] = ' .'; +$txt['calendar15'] = ' .'; +$txt['calendar16'] = ' .'; +$txt['calendar17'] = ' .'; +$txt['calendar18'] = ' ID .'; +$txt['calendar19'] = ' .'; +$txt['calendar38'] = 'ID .'; +$txt['calendar39'] = 'ID .'; +$txt['calendar40'] = ' .'; +$txt['calendar41'] = ' .'; +$txt['calendar42'] = ' .'; +$txt['calendar55'] = ' .'; +$txt['calendar56'] = ' .'; + +$txt['moveto_noboards'] = ' !'; + +$txt['already_activated'] = ' .'; + +$txt['invalid_email'] = ' email email.
    email : evil.user@badsite.com.
    email: *@*.badsite.com'; +$txt['invalid_expiration_date'] = ' '; +$txt['invalid_hostname'] = ' .
    : proxy4.badhost.com
    : *.badhost.com'; +$txt['invalid_ip'] = ' IP IP.
    IP : 127.0.0.1
    IP : 127.0.0-20.*'; +$txt['invalid_username'] = ' '; +$txt['no_ban_admin'] = ' , !'; +$txt['no_bantype_selected'] = ' '; +$txt['ban_not_found'] = ' '; +$txt['ban_unknown_restriction_type'] = ' '; + +$txt['recycle_no_valid_board'] = ' '; + +$txt['login_threshold_fail'] = ', . , .'; + +$txt['who_off'] = ' Online , .'; + +$txt['merge_create_topic_failed'] = ' .'; +$txt['merge_need_more_topics'] = ' , , .'; + +$txt['spamWaitTime_broken'] = ' IP %d . , .'; +$txt['registerWaitTime_broken'] = ' %d !'; +$txt['loginWaitTime_broken'] = ' %d , , .'; + +$txt['no_valid_search_string'] = ' - ?'; +$txt['topic_gone'] = ' , , .'; +$txt['theme_edit_missing'] = ', , !'; + +$txt['attachments_no_write'] = ' . .'; + +$txt['attachments_limit_per_post'] = ' %d '; + +$txt['rtm_not_own'] = ' . !!!'; + +$txt['no_dump_database'] = ' !'; +$txt['pm_not_yours'] = ' , , , .'; +$txt['mangled_post'] = '- , , .'; + +$txt['error_while_submitting'] = ' :'; +$txt['error_long_name'] = ', .'; +$txt['error_no_name'] = ' .'; +$txt['error_bad_name'] = ', , , .'; +$txt['error_no_email'] = ' Email .'; +$txt['error_bad_email'] = ' Email .'; +$txt['error_no_event'] = ' .'; +$txt['error_no_subject'] = ' .'; +$txt['error_no_question'] = ' .'; +$txt['error_no_message'] = ' .'; +$txt['error_long_message'] = ' (' . $modSettings['max_messageLength'] . ' ).'; +$txt['error_session_timeout'] = ' . , .'; +$txt['error_no_to'] = ' .'; +$txt['error_bad_to'] = ' \'to\'- .'; +$txt['error_bad_bcc'] = ' \'bcc\'- .'; +$txt['error_form_already_submitted'] = ' ! , .'; +$txt['error_poll_few'] = ' !'; + +$txt['smiley_not_found'] = ' .'; +$txt['smiley_has_no_code'] = ' .'; +$txt['smiley_has_no_filename'] = ' .'; +$txt['smiley_not_unique'] = ' .'; +$txt['smiley_set_already_exists'] = ' URL '; +$txt['smiley_set_not_found'] = ' '; +$txt['smiley_set_path_already_used'] = 'URL .'; +$txt['smiley_set_unable_to_import'] = ' . , .'; + +$txt['smileys_upload_error'] = ' .'; +$txt['smileys_upload_error_blank'] = ' !'; +$txt['smileys_upload_error_name'] = ' !'; +$txt['smileys_upload_error_illegal'] = ' .'; + +$txt['search_invalid_weights'] = ' . . ..'; +$txt['unable_to_create_temporary'] = ' . , .'; + +$txt['package_no_file'] = ' !'; +$txt['packageget_unable'] = ' . , URL .'; +$txt['not_on_simplemachines'] = ', , simplemachines.org.'; +$txt['package_cant_uninstall'] = ' , - .'; +$txt['package_cant_download'] = ' , (CHMOD)!'; +$txt['package_upload_error'] = ' , , !'; +$txt['package_upload_error_exists'] = ', , . , , .'; + +$txt['no_membergroup_selected'] = ' '; + +$txt['attachment_not_found'] = ' '; + +$txt['cannot_karmalog_view'] = 'Sorry - you don\'t have the proper permissions to view the Karma Description list.'; +$txt['viewkarma_error'] = 'User ID must be a number'; +$txt['karma_not_topic_starter'] = 'Sorry, he is not topic author.'; +?> diff --git a/Themes/fixed/languages/Help.english.php b/Themes/fixed/languages/Help.english.php new file mode 100755 index 0000000..f6954ca --- /dev/null +++ b/Themes/fixed/languages/Help.english.php @@ -0,0 +1,392 @@ +Edit Boards
    + In this menu you can create/reorder/remove boards, and the categories + above them. For example, if you had a wide-ranging + site that offered information on "Sports" and "Cars" and "Music", these + would be the top-level Categories you\'d create. Under each of these + categories you\'d likely want to create hierarchical "sub-categories", + or "Boards" for topics within each. It\'s a simple hierarchy, with this structure:
    +
      +
    • + Sports +  - A "category" +
    • +
        +
      • + Baseball +  - A board under the category of "Sports" +
      • +
          +
        • + Stats +  - A child board under the board of "Baseball" +
        • +
        +
      • Football +  - A board under the category of "Sports"
      • +
      +
    + Categories allow you to break down the board into broad topics ("Cars, + Sports"), and the "Boards" under them are the actual topics under which + members can post. A user interested in Pintos + would post a message under "Cars->Pinto". Categories allow people to + quickly find what their interests are: Instead of a "Store" you have + "Hardware" and "Clothing" stores you can go to. This simplifies your + search for "pipe joint compound" because you can go to the Hardware + Store "category" instead of the Clothing Store (where you\'re unlikely + to find pipe joint compound).
    + As noted above, a Board is a key topic underneath a broad category. + If you want to discuss "Pintos" you\'d go to the "Auto" category and + jump into the "Pinto" board to post your thoughts in that board.
    + Administrative functions for this menu item are to create new boards + under each category, to reorder them (put "Pinto" behind "Chevy"), or + to delete the board entirely.'; + +$helptxt[2] = 'Edit Forum News
    + This allows you to set the text for news items displayed on the Board Index page. + Add any item you want (e.g., "Don\'t miss the conference this Tuesday"). Each news item should + go in a separate box, and they are displayed randomly.'; + +$helptxt[3] = 'Edit Registration Agreement
    + This allows you to set the text for the registration agreement displayed when members sign up for your forum. + You can add or remove anything from the default registration agreement, which is included in SMF.'; + +$helptxt[4] = 'View all Members
    + View all members in the board. You are presented with a hyperlinked list of member names. You may click + on any of the names to find details of the members (homepage, age, etc.), and as Administrator + you are able to modify these parameters. You have complete control over members, including the + ability to delete them from the forum.'; + +$helptxt[6] = 'Email Your Members
    + From this menu you can send messages to all members who\'ve registered and entered their + email addresses (not all will, of course). You may edit the distribution list, or send messages + to all. Useful for important update/news information.'; + +$helptxt[7] = 'Ban Members
    + SMF provides the ability to "ban" users, to prevent people who have violated the trust of the board + by spamming, trolling, etc. This allows you to those users who are detrimental to your forum. As an admin, + when you view messages, you can see each user\'s IP address used to post at that time. In the ban list, + you simply type that IP address in, save, and they can no longer post from that location.
    You can also + ban people through their email address.'; + +$helptxt[8] = 'Set Reserved Names
    + This allows you to put in keywords or names that you want to restrict people from using as + a name or username.'; + +$helptxt[10] = 'Edit Features and Options
    + There are several features in this section that can be changed to your preference. Options for installed mods will generally also appear in here.'; + +$helptxt[11] = 'Edit Censored Words
    + SMF offers the option to censor certain words, by replacing them with another one.
    + Add a new word per line, like the example bellow:
    + cl*wn=funny guy
    +
    + (* can be used as a wildcard.)'; + +$helptxt['number_format'] = 'Number Format
    + You can use this setting to format the way in which numbers on your forum will be displayed to the user. The format of this setting is:
    +
    1,234.00

    + Where \',\' is the character used to split up groups of thousands, \'.\' is the character used as the decimal point and the number of zeros dictate the accuracy of roundings.'; + +$helptxt['time_format'] = 'Time Format
    + You have the power to adjust how the time and date look for yourself. There are a lot of little letters, but it\'s quite simple. + The conventions follow PHP\'s strftime function and are described as below (more details can be found at php.net).
    +
    + The following characters are recognized in the format string:
    + +   %a - abbreviated weekday name
    +   %A - full weekday name
    +   %b - abbreviated month name
    +   %B - full month name
    +   %d - day of the month (01 to 31)
    +   %D* - same as %m/%d/%y
    +   %e* - day of the month (1 to 31)
    +   %H - hour using a 24-hour clock (range 00 to 23)
    +   %I - hour using a 12-hour clock (range 01 to 12)
    +   %m - month as a number (01 to 12)
    +   %M - minute as a number
    +   %p - either "am" or "pm" according to the given time
    +   %R* - time in 24 hour notation
    +   %S - second as a decimal number
    +   %T* - current time, equal to %H:%M:%S
    +   %y - 2 digit year (00 to 99)
    +   %Y - 4 digit year
    +   %Z - time zone or name or abbreviation
    +   %% - a literal \'%\' character
    +
    + * Does not work on Windows-based servers.
    '; + +$helptxt[13] = 'Live announcements
    + This box shows recently updated announcements from www.simplemachines.org. + You should check here every now and then for updates, new releases, and important information from the Simple Machines Team.'; + +$helptxt[14] = 'Registration Management
    + This section contains all the functions that could be necessary to manage new registrations on the forum. It contains up to three + sections which are visible depending on your forum settings. These are:

    +
      +
    • + Awaiting Approval
      + This section is only shown if you have enabled admin approval of all new registrations. Anyone who registers to join your + forum will only become a full member once they have been approved by an admin. The section lists all those members who + are still awaiting approval, along with their email and IP address. You can choose to either accept or reject (delete) + any member on the list by checking the box next to the member and choosing the action from the drop-down box at the bottom + of the screen. When rejecting a member you can choose to delete the member either with or without notifying them of your decision.

      +
    • +
    • + Awaiting Activation
      + This section will only be visible if you have activation of member accounts enabled on the forum. This section will list all + members who have still not activated their new accounts. From this screen you can choose to either accept, reject or remind + members with outstanding registrations. As above you can also choose to email the member to inform them of the + action you have taken.

      +
    • +
    • + Register New Member
      + From this screen you can choose to register accounts for new members on their behalf. This can be useful in forums where registration is closed + to new members, or in cases where the admin wishes to create a test account. If the option to require activation of the account + is selected the member will be emailed a activation link which must be clicked before they can use the account. Similarly you can + select to email the users new password to the stated email address. +
    • +
    '; + +$helptxt[15] = 'Moderation Log
    + This section allows members of the admin team to track all the moderation actions that the forum moderators have performed. To ensure that + moderators cannot remove references to the actions they have performed, entries may not be deleted until 24 hours after the action was taken. + The \'objects\' column lists any variables associated with the action.'; +$helptxt[16] = 'Error Log
    + The error log tracks logs every serious error encountered by users using your forum. It lists all of these errors by date which can be sorted + by clicking the black arrow next to each date. Additionally you can filter the errors by clicking the picture next to each error statistic. This + allows you to filter, for example, by member. When a filter is active the only results that will be displayed will be those that match that filter.'; +$helptxt[17] = 'Theme Settings
    + The settings screen allows you to change settings specific to a theme. These settings include options such as the themes directory and URL information but + also options that affect the layout of a theme on your forum. Most themes will have a variety of user configurable options, allowing you to adapt a theme + to suit your individual forum needs.'; +$helptxt['smileys'] = 'Smiley Center
    + Here you can add and remove smileys, and smiley sets. Note importantly that if a smiley is in one set, it\'s in all sets - otherwise, it might + get confusing for your users using different sets.'; + +// Mod Settings + +$helptxt['topicSummaryPosts'] = 'This allows you to set the number of previous posts shown in the topic summary at the reply screen.'; +$helptxt['enableStickyTopics'] = 'Stickies are topics that remain on top of the topic list. They are mostly used for important + messages. Although you can change this with permissions, by default only moderators and administrators can make topics sticky.'; +$helptxt['userLanguage'] = 'Turning this option on will allow users to select which language file they use. It will not affect the + default selection.'; +$helptxt['trackStats'] = 'Stats:
    This will allow users to see the latest posts and the most popular topics on your forum. + It will also show several statistics, like the most members online, new members and new topics.
    + Hits:
    Adds another column to the stats page with the number of hits on your forum.'; +$helptxt['titlesEnable'] = 'Switching Custom Titles on will allow members with the relevant permission to create a special title for themselves. + This will be shown underneath the name.
    For example:
    Jeff
    Cool Guy'; +$helptxt['topbottomEnable'] = 'This will add go up and go down buttons, so that member can go to the top and bottom of a page + without scrolling.'; +$helptxt['onlineEnable'] = 'This will show an image to indicate whether the member is online or offline'; +$helptxt['todayMod'] = 'This will show "Today", or "Yesterday", instead of the date.'; +$helptxt['enablePreviousNext'] = 'This will show a link to the next and previous topic.'; +$helptxt['pollMode'] = 'This selects whether polls are enabled or not. If polls are disabled, any existing polls will be hidden + from the topic listing. You can choose to continue to show the regular topic without their polls by selecting + "Show Existing Polls as Topics".

    To choose who can post polls, view polls, and similar, you + can allow and disallow those permissions. Remember this if polls are not working.'; +$helptxt['enableVBStyleLogin'] = 'This will show a more compact login on every page of the forum for guests.'; +$helptxt['enableCompressedOutput'] = 'This option will compress output to lower bandwidth consumption, but it requires + zlib to be installed.'; +$helptxt['databaseSession_enable'] = 'This option makes use of the database for session storage - it is best for load balanced servers, but helps with all timeout issues and can make the forum faster. Doesn\'t work if session.auto_start is on.'; +$helptxt['databaseSession_loose'] = 'Turning this on will decrease the bandwidth your forum uses, and make it so clicking back will not reload the page - the downside is that the (new) icons won\'t update, among other things. (unless you click to that page instead of going back to it.)'; +$helptxt['databaseSession_lifetime'] = 'This is the number of seconds for sessions to last after they haven\'t been accessed. If a session is not accessed for too long, it is said to have "timed out". Anything higher than 2400 is recommended.'; +$helptxt['m16'] = 'Enabling this will cause your current location to be shown on a single line, as opposed to in a tree-like manner.'; +$helptxt['m17'] = 'This will change the layout of the statistics shown at the bottom of the boardindex.'; +$helptxt['enableErrorLogging'] = 'This will log any errors, like a failed login, so you can see what went wrong.'; +$helptxt['notifyAnncmnts_UserDisable'] = 'This will allow users to opt out of notification of new posts on announcement boards.'; +$helptxt['compactTopicPagesEnable'] = 'This will just show a selection of the number of pages.
    Example: + "3" to display: 1 ... 4 [5] 6 ... 9
    + "5" to display: 1 ... 3 4 [5] 6 7 ... 9'; +$helptxt['timeLoadPageEnable'] = 'This will show the time in seconds SMF took to create that page at the bottom of the board.'; +$helptxt['removeNestedQuotes'] = 'This will only show the quote of the post in question, not any quoted posts from that post.'; +$helptxt['simpleSearch'] = 'This will show a simple search form and a link to a more advanced form.'; +$helptxt['maxwidth'] = 'This allows you to set a maximum size for posted pictures. Pictures smaller than the maximum will not be affected.'; +$helptxt['mail_type'] = 'This allows you to select either the default PHP mail program or your mail server. + Fill in the details of your outgoing mail server unless you selected sendmail.'; +$helptxt['attachmentEnable'] = 'Attachments are files that members can upload, and attach to a post.

    + Check attachment extension:
    Do you want to check the extension of the files?
    + Allowed attachment extensions:
    You can set the allowed extensions of attached files.
    + Display attachment as picture in posts:
    If the uploaded file is a picture, this will show it underneath the post
    + Attachments directory:
    The path to your attachment folder
    (example: /home/sites/yoursite/www/forum/attachments)
    + Attachments URL:
    The URL to your attachment folder
    (example: http://www.yoursite.com/forum/attachments)
    + Max attachment folder space (in KB):
    Select how large the attachment folder can be, including all files within it.
    + Max attachment size per post (in KB):
    Select the maximum filesize of all attachments made per post. If this is lower than the per-attachment limit, this will be the limit.
    + Max size per attachment (in KB):
    Select the maximum filesize of each separate attachment.
    + Max number of attachments per post:
    Select the number of attachments a person can make, per post.'; +$helptxt['karmapermiss'] = 'By default this option is switched off and Karma Log can look only admins. If you want to do Karma Log available for other users or moderators, etc, enable this option and give the right that group, which can look Log in "Permissions" section.'; +$helptxt['karmalinks'] = 'If you enable this feauture, users will see two links in their profiles (Own or other users). They can see who change their karma and whom they change it. Karma Description Mod must be enabled'; +$helptxt['karmakarma'] = 'It\'s display users karma in Karma log opposit the usernames. For example: Username (+12/-8)'; +$helptxt['karmaurl'] = 'If you enable this option, you and your users can view where their karma was change'; +$helptxt['karmaisowner'] = 'If you enable this option, only profile owner will see two links to his own karma log. By the way, your users will resieve an error if they input an url adress (like http://your_forum.com/index.php?action=ownkarma;u=other_user) by the hand if you don\'t want your users can view other users karma log. Whole karma log will be disabled too. ONLY OWN KARMA LOG.'; +$helptxt['karmaMode'] = 'Karma is a feature that shows the popularity of a member. Members, if allowed, can + \'applaud\' or \'smite\' other members, which is how their popularity is calculated. You can change the + number of posts needed to have a "karma", the time between smites or applauds, and if administrators + have to wait this time as well.

    Whether or not groups of members can smite others is controlled by + a permission. If you have trouble getting this feature to work for everyone, double check your permissions.'; +$helptxt['cal_enabled'] = 'The calendar can be used for showing birthdays, or for showing important moments happening in your community.

    + Show days as link to \'Post Event\':
    This will allow members to post events for that day, when they click on that date
    + Show week numbers:
    Show which week it is.
    + Max days in advance on board index:
    If this is set to 7, the next week\'s worth of events will be shown.
    + Show holidays on board index:
    Show today\'s holidays in a calendar bar on the board index.
    + Show birthdays on board index:
    Show today\'s birthdays in a calendar bar on the board index.
    + Show events on board index:
    Show today\'s events in a calendar bar on the board index.
    + Default Board to Post In:
    What\'s the default board to post events in?
    + Minimum year:
    Select the "first" year on the calendar list.
    + Maximum year:
    Select the "last" year on the calendar list
    + Birthday color:
    Select the color of the birthday text
    + Event color:
    Select the color of the event text
    + Holiday color:
    Select the color of the Holiday text
    + Allow events to span multiple days:
    Check to allow events to span multiple days.
    + Max number of days an event can span:
    Select the maximum days that an event can span.

    + Remember that usage of the calendar (posting events, viewing events, etc.) is controlled by permissions set on the permissions screen.'; +$helptxt['localCookies'] = 'SMF uses cookies to store login information on the client computer. + Cookies can be stored globally (myserver.com) or locally (myserver.com/path/to/forum).
    + Check this option if you\'re experiencing problems with users getting logged out automatically.
    + Globally stored cookies are less secure when used on a shared webserver (like Tripod).
    + Local cookies don\'t work outside the forum folder so, if your forum is stored at www.myserver.com/forum, pages like www.myserver.com/index.php cannot access the account information. + Especially when using SSI.php, global cookies are recommended.'; +$helptxt['disabledBBC'] = 'This setting allows you to manually disable certain Bulletin Board Codes from being used on your forum. To do this just type in a comma separated list of all codes you wish to remain inactive.

    + Example:
    \'move,glow,table,tr,td\' - This would disable the move, glow and table tags from being used on your forum.

    + Please note that this does not work on all tags.'; +$helptxt['enableBBC'] = 'Selecting this option will allow your members to use Bulletin Board Code (BBC) throughout the forum, allowing users to format their posts with images, type formatting and more.'; +$helptxt['enableNewReplyWarning'] = 'When this option is enabled, a member who is making a post on your forum will be shown a warning message if a new reply is received while they are writing their message. This presents them with an opportunity to adjust their post accordingly.'; +$helptxt['time_offset'] = 'Not all forum administrators want their forum to use the same time zone as the server upon which it is hosted. Use this option to specify a time difference (in hours) from which the forum should operate from the server time. Negative and decimal values are permitted.'; +$helptxt['spamWaitTime'] = 'Here you can select the amount of time that must pass between postings. This can be used to stop people from "spamming" your forum by limiting how often they can post.'; + +$helptxt['enablePostHTML'] = 'This will allow the posting of some basic HTML tags: + <b>, <u>, <i>, <pre>, <blockquote>, <img src="" />, <a href="">, and <br />.'; + +$helptxt['themes'] = 'Here you can select whether the default theme can be chosen, what theme guests will use, + as well as other options. Click on a theme to the right to change the settings for it.'; +$helptxt['theme_install'] = 'This allows you to install new themes. You can do this from an already created directory, by uploading an archive for the theme, or by copying the default theme.

    Note that the archive or directory must have a theme_info.xml definition file.'; +$helptxt['enableEmbeddedFlash'] = 'This option will allow your users to use Flash directly inside their posts, + just like images. This could pose a security risk, although few have successfully exploited it. + USE AT YOUR OWN RISK!'; +$helptxt['xmlnews_enable'] = 'Allows people to link to Recent news + and similar data. It is also recommended that you limit the size of recent posts/news because, when rss data + is displayed in some clients, like Trillian, it is expected to be truncated.'; +$helptxt['hotTopicPosts'] = 'Change the number of posts for a topic to reach the state of a "hot" or + "very hot" topic.'; +$helptxt['globalCookies'] = 'Allows for the use of subdomain independent cookies. For example, if...
    + Your site is at http://www.simplemachines.org/,
    + And your forum is at http://forum.simplemachines.org/,
    + Using this modification will allow you to access the forum\'s cookie on your site.'; +$helptxt['redirectMetaRefresh'] = 'Normally, SMF uses a "Location" header to redirect you to various places in the forum. However, this doesn\'t always work on some older servers.

    Enable this if you experience problems staying logged in.'; +$helptxt['securityDisable'] = 'This disables the additional password check for the administration section. This is not recommended!'; +$helptxt['securityDisable_why'] = 'This is your current password. (the same one you use to login.)

    Having to type this helps ensure that you want to do whatever administration you are doing, and that it is you doing it.'; +$helptxt['emailmembers'] = 'In this message you can use a few "variables". These are:
    + {$board_url} - The URL to your forum.
    + {$current_time} - The current time.
    + {$member.email} - The current member\'s email.
    + {$member.link} - The current member\'s link.
    + {$member.id} - The current member\'s id.
    + {$member.name} - The current member\'s name. (for personalization.)
    + {$latest_member.link} - The most recently registered member\'s link.
    + {$latest_member.id} - The most recently registered member\'s id.
    + {$latest_member.name} - The most recently registered member\'s name.'; +$helptxt['attachmentEncryptFilenames'] = 'Encrypting attachment filenames allows you to have more than one attachment of the + same name, to safely use .php files for attachments, and heightens security. It, however, could make it more + difficult to rebuild your database if something drastic happened.'; + +$helptxt['failed_login_threshold'] = 'Set the number of failed login attempts before directing the user to the password reminder screen.'; +$helptxt['edit_wait_time'] = 'Number of seconds allowed for a post to be edited before logging the last edit date.'; +$helptxt['enableSpellChecking'] = 'Enable spell checking. You MUST have the pspell library installed on your server and your PHP configuration set up to use the pspell library. Your server ' . (function_exists('pspell_new') == 1 ? 'DOES' : 'DOES NOT') . ' appear to have this set up.'; +$helptxt['lastActive'] = 'Set the number of minutes to show people are active in X number of minutes on the board index. Default is 15 minutes.'; + +$helptxt['autoOptDatabase'] = 'This option optimizes the database every so many days. Set it to 1 to make a daily optimization. You can also specify a maximum number of online users, so that you won\'t overload your server or inconvenience too many users.'; +$helptxt['autoFixDatabase'] = 'This will automatically fix broken tables and resume like nothing happened. This can be useful, because the only way to fix it is to REPAIR the table, and this way your forum won\'t be down until you notice. It does email you when this happens.'; + +$helptxt['enableParticipation'] = 'This shows a little icon on the topics the user has posted in.'; + +$helptxt['db_persist'] = 'Keeps the connection active to increase performance. If you aren\'t on a dedicated server, this may cause you problems with your host.'; + +$helptxt['queryless_urls'] = 'This changes the format of URLs a little so search engines will like them better. They will look like index.php/topic,1.html.

    This feature will ' . (strpos(php_sapi_name(), 'apache') !== false ? '' : 'not') . ' work on your server.'; +$helptxt['fixLongWords'] = 'This option breaks words longer than a certain length into pieces so they don\'t disturb the forum\'s layout. (as much...) This option should not be set to a value under 40.'; + +$helptxt['who_enabled'] = 'This option allows you to turn on or off the ability for users to see who is browsing the forum and what they are doing.'; + +$helptxt['recycle_enable'] = '"Recycles" deleted topics and posts to the specified board.'; + +$helptxt['default_personalText'] = 'Sets the default text a user will have as their "personal text."'; + +$helptxt['modlog_enabled'] = 'Logs all moderation actions.'; + +$helptxt['guest_hideContacts'] = 'If selected this option will hide the email addresses and messenger contact details + of all members from any guests on your forum'; + +$helptxt['registration_method'] = 'This option determines what method of registration is used for people wishing to join your forum. You can select from:

    +
      +
    • + Registration Disabled:
      + Disables the registration process, which means that no new members can register to join your forum.
      +
    • + Immediate Registration
      + New members can login and post immediately after registering on your forum.
      +
    • + Member Activation
      + When this option is enabled any members registering to the forum will have a activation link emailed to them which they must click before they can become full members
      +
    • + Member Approval
      + This option will make it so all new members registering to your forum will need to be approved by the admin before they become members. +
    • +
    '; +$helptxt['send_validation_onChange'] = 'When this option is checked all members who change their email address in their profile will have to reactivate their account from an email sent to that address'; +$helptxt['send_welcomeEmail'] = 'When this option is enabled all new members will be sent an email welcoming them to your community'; +$helptxt['allow_hideOnline'] = 'With this option enabled all members will be able to hide their online status from other users (except administrators). If disabled only users who can moderate the forum can hide their presence. Note that disabling this option will not change any existing member\'s status - it just stops them from hiding themselves in the future.'; +$helptxt['allow_hideEmail'] = 'With this option enabled members can choose to hide their email address from other members. However, administrators can always see everyone\'s email addresses.'; + +$helptxt['latest_support'] = 'This panel shows you some of the most common problems and questions on your server configuration. Don\'t worry, this information isn\'t logged or anything.

    If this stays as "Retrieving support information...", your computer probably cannot connect to www.simplemachines.org.'; +$helptxt['latest_packages'] = 'Here you can see some of the most popular and some random packages or mods, with quick and easy installations.

    If this section doesn\'t show up, your computer probably cannot connect to www.simplemachines.org.'; +$helptxt['latest_themes'] = 'This area shows a few of the latest and most popular themes from www.simplemachines.org. It may not show up properly if your computer can\'t find www.simplemachines.org, though.'; + +$helptxt['secret_why_blank'] = 'For your security, the answer to your question (as well as your password) is encrypted in such a way that SMF can only tell you if get it right, so it can never tell you (or anyone else, importantly!) what your answer or password is.'; +$helptxt['moderator_why_missing'] = 'Since moderation is done on a board-by-board basis, you have to make members moderators from the board management interface.'; + +$helptxt['permissions'] = 'Permissions are how you either allow groups to, or deny groups from, doing specific things.

    You can modify multiple boards at once with the checkboxes, or look at the permissions for a specific group by clicking \'Modify.\''; +$helptxt['permissions_board'] = 'If a board is set to \'Global,\' it means that the board will not have any special permissions. \'Local\' means it will have its own permissions - separate from the global ones. This allows you to have a board that has more or less permissions than another, without requiring you to set them for each and every board.'; +$helptxt['permissions_quickgroups'] = 'These allow you to use the "default" permission setups - standard means \'nothing special\', restrictive means \'like a guest\', moderator means \'what a moderator has\', and lastly \'maintenance\' means permissions very close to those of an administrator.'; +$helptxt['membergroups'] = 'In SMF there are two types of groups that your members can be part of. These are: +
      +
    • Regular Groups: A regular group is a group to which members are not automatically put into. To assign a member to be in a group simply go to their profile and click "Account Settings". From here you can assign them any number of regular groups to which they will be part.
    • +
    • Post Groups: Unlike regular groups post based groups cannot be assigned. Instead, members are automatically assigned to a post based group when they reach the minimum number of posts required to be in that group.
    • +
    '; + +$helptxt['calendar_how_edit'] = 'You can edit these events by clicking on the red asterisk (*) next to their names.'; + +$helptxt['maintenance_general'] = 'From here, you are able to optimize all your tables (makes them smaller and faster!), make sure you have the newest versions, find any errors that might be messing up your board, recount totals, and empty logs.

    The last two should be avoided unless something is wrong, but don\'t hurt anything.'; +$helptxt['maintenance_backup'] = 'This area allows you to save a copy of all the posts, settings, members, and other information in your forum to a very large file.

    It is recommended that you do this often, perhaps weekly, for safety and security.'; +$helptxt['maintenance_rot'] = 'This allows you to completely and irrevocably remove old topics. It is recommended that you try to make a backup first, just in case you remove something you didn\'t mean to.

    Use this option with care.'; + +$helptxt['avatar_allow_server_stored'] = 'This allows your members to pick from avatars stored on your server itself. They are, generally, in the same place as SMF under the avatars folder.
    As a tip, if you create directories in that folder, you can make "categories" of avatars.'; +$helptxt['avatar_allow_external_url'] = 'With this enabled, your members can type in a URL to their own avatar. The downside of this is that, in some cases, they may use avatars that are overly large or portray images you don\'t want on your forum.

    Remember that members need the permission to choose a remote avatar for this to work for them. This option only enables the use for those with the proper permission.'; +$helptxt['avatar_check_size'] = 'This can help to "enforce" the size restriction, but it can also slow things down markedly. Use with care.'; +$helptxt['avatar_allow_upload'] = 'This option is much like "Allow members to select an external avatar", except that you have better control over the avatars, a better time resizing them, and your members do not have to have somewhere to put avatars.

    However, the downside is that it can take a lot of space on your server.'; +$helptxt['avatar_download_png'] = 'PNGs are larger, but offer better quality compression. If this is unchecked, JPEG will be used instead - which is often smaller, but also of lesser or blurry quality.'; + +$helptxt['disableHostnameLookup'] = 'This disables host name lookups, which on some servers are very slow. Note that this will make banning less effective.'; + +$helptxt['nowplaying_image'] = "The name of the image to display next to the now playing entry in posts. If no image is entered, cddisc.gif is used instead. The image must be in the
    images
    directory for each theme."; +$helptxt['nowplaying_text'] = "Optional text to display between the image and the now playing entry in posts. If no text is specified, only the image will be used. HTML is allowed here."; + +$helptxt['search_match_complete_words'] = 'This option limits search results to full words that match a users query. For example, if this option is disabled, a search term like \'here\' would match \'here\', \'there\', and \'hereafter\'. Enabling this option would limit search results to only match \'here\'.

    Please notice that enabling this option might slow down the search function, especially if the amount of messages is large.'; +$helptxt['disableTemporaryTables'] = 'This option prevents the usage of temporary tables. Since this option makes search queries slower, it\'s advisable to only use it if you don\'t have permissions to create temporary tables.'; +$helptxt['search_cache_size'] = 'Search caching is used to limit the amount of extensive database queries. Once the user has entered a search query, the results are cached in the database. This way, the next pages of the search results are already available without need for extensive search.

    Use this setting to limit the amount of cached results. Increasing this value requires a larger database (about 20kb for each cached result).'; +$helptxt['search_weight_frequency'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor counts the amount of matching messages and divides them by the total number of messages within a topic.'; +$helptxt['search_weight_age'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor rates the age of the last matching message within a topic. The more recent this message is, the higher the score.'; +$helptxt['search_weight_length'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor is based on the topic size. The more messages are within the topic, the higher the score.'; +$helptxt['search_weight_subject'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor looks whether a search term can be found withing the subject of a topic.'; +$helptxt['search_weight_first_message'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor looks whether a match can be found in the first message of a topic.'; + +$helptxt['see_admin_ip'] = 'IP addresses are shown to administrators and moderators to facilitate moderation and to make it easier to track people up to no good. Remember that IP addresses may not always be identifying, and most people\'s IP addresses change periodically.

    Members are also allowed to see their own IPs.'; +$helptxt['see_member_ip'] = 'Your IP address is shown only to you and moderators. Remember that this information is not identifying, and that most IPs change periodically.

    You cannot see other members\' IP addresses, and they cannot see yours.'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Help.russian.php b/Themes/fixed/languages/Help.russian.php new file mode 100644 index 0000000..9bdc410 --- /dev/null +++ b/Themes/fixed/languages/Help.russian.php @@ -0,0 +1,324 @@ +
    + , // , . , , "" , "" "", , . , "", + "" . :
    +
      +
    • + +  - A "" +
    • +
        +
      • + +  - "" +
      • +
          +
        • + +  - "" +
        • +
        +
      • +  - ""
      • +
      +
    + (", + "), "" , . , , + "->". : "" + "" "" , . " " "" ( ).
    + , - . + "" "" "" , .
    + , , ( "" "Chevy"), .'; + +$helptxt[2] = '
    + , . , (, " "). , .'; + +$helptxt[3] = '
    + , . , SMF'; + + +$helptxt[4] = '
    + . . , ( , ..), , , . , .'; + +$helptxt[6] = ' Email
    + , email ( , ). email . - , ..'; + +$helptxt[7] = '
    + SMF "" , , , ... , . , , IP . , IP , IP. email .'; + +$helptxt[8] = '
    + , .'; + + +$helptxt[10] = '
    + , . (mods) .'; + +$helptxt[11] = '
    + SMF , .
    + , , :
    + *=
    +
    + (* .)'; + +$helptxt['number_format'] = '
    + , . :
    +
    1,234.00

    + \',\' , , \'.\' , .'; + +$helptxt['time_format'] = '
    + , . , . + PHP , ( php.net).
    +
    + :
    + +   %a -
    +   %A -
    +   %b -
    +   %B -
    +   %d - ( 01 31)
    +   %D* - %/%/%
    +   %e* - ( 1 31)
    +   %H - 24- ( 00 23)
    +   %I - 12- ( 01 12)
    +   %m - (01 to 12)
    +   %M -
    +   %p - "am" "pm"
    +   %R* - 24-
    +   %S -
    +   %T* - %:%:%
    +   %y - 2 ( 00 99)
    +   %Y - 4
    +   %Z - ,
    +   %% - \'%\'
    +
    + * Windows .
    '; + +$helptxt[13] = '
    + www.simplemachines.org. + , Simple Machines Team.'; + +$helptxt[14] = '
    + , . 3- , , . :

    +
      +
    • +
      + , . , , . , IP email. , , . , .

      +
    • +
    • +
      + , . , . , , . , .

      +
    • +
    • +
      + . , , , . , email , , . , , email . +
    • +
    '; + +$helptxt[15] = '
    + , . , , , 24 . + \'\' .'; +$helptxt[16] = '
    + , . , . , , . , , . , , ..'; +$helptxt[17] = '
    + . , , URL, . , .'; +$helptxt['smileys'] = '
    + . / . , , , , .'; + +// Mod Settings + +$helptxt['topicSummaryPosts'] = ' .'; +$helptxt['enableStickyTopics'] = ' , . , . , , .'; +$helptxt['userLanguage'] = ' , , . .'; +$helptxt['trackStats'] = ':
    . , - , .
    + :
    , .'; +$helptxt['titlesEnable'] = ' . .
    :
    Jeff
    '; +$helptxt['topbottomEnable'] = ' , .'; +$helptxt['onlineEnable'] = ' , , '; +$helptxt['todayMod'] = ' "", "", .'; +$helptxt['enablePreviousNext'] = ' .'; +$helptxt['pollMode'] = ' , . , . , , " ".

    , . .'; +$helptxt['enableVBStyleLogin'] = ' .'; +$helptxt['enableCompressedOutput'] = ' , zlib.'; +$helptxt['databaseSession_enable'] = ' - , . , session.auto_start.'; +$helptxt['databaseSession_loose'] = ' , , , , , . ( , , , )'; +$helptxt['databaseSession_lifetime'] = ' . , "timed out". 2400.'; +$helptxt['m16'] = ' , , .'; +$helptxt['m17'] = ' , .'; +$helptxt['enableErrorLogging'] = ' , , , , .'; +$helptxt['notifyAnncmnts_UserDisable'] = ' .'; +$helptxt['compactTopicPagesEnable'] = ' .
    : + "3" : 1 ... 4 [5] 6 ... 9
    + "5" : 1 ... 3 4 [5] 6 7 ... 9'; +$helptxt['timeLoadPageEnable'] = ' , SMF .'; +$helptxt['removeNestedQuotes'] = ' , .'; +$helptxt['simpleSearch'] = ' .'; +$helptxt['maxwidth'] = ' . .'; +$helptxt['mail_type'] = ' PHP . sendmail.'; +$helptxt['attachmentEnable'] = ', , .

    + :
    ?
    + :
    .
    + :
    ,
    + :

    (: /home/sites/yoursite/www/forum/attachments)
    + URL :
    URL
    (: http://www.yoursite.com/forum/attachments)
    + ( KB):
    .
    + ( KB):
    . , , .
    + ( KB):
    .
    + :
    , .'; +$helptxt['karmaMode'] = ' - , . , , , , . , "", , .

    . , .'; +$helptxt['cal_enabled'] = ' .

    + \'\':
    ,
    + :
    , .
    + :
    7, .
    + :
    .
    + :
    .
    + :
    .
    + :
    ?
    + :
    "" .
    + :
    ""
    + :

    + :

    + :

    + :
    , .
    + :
    , .
    + , ( , , ..) .'; +$helptxt['localCookies'] = 'SMF cookies . + Cookies (myserver.com) (myserver.com/path/to/forum).
    + , .
    + cookies (, Tripod).
    + cookies , www.myserver.com/forum, www.myserver.com/index.php . + , SSI.php, cookies .'; +$helptxt['disabledBBC'] = ' Bulletin Board Codes . , , .

    + :
    \'move,glow,table,tr,td\' - , .

    + , .'; +$helptxt['enableBBC'] = ' , Bulletin Board Code (BBC) , , .'; +$helptxt['enableNewReplyWarning'] = ' , , , , . .'; +$helptxt['time_offset'] = ' , , . ( ) . .'; +$helptxt['spamWaitTime'] = ' , . , .'; + +$helptxt['enablePostHTML'] = ' HTML : + <b>, <u>, <i>, <pre>, <blockquote>, <img src="" />, <a href="">, <br />.'; + +$helptxt['themes'] = ' , , . , .'; +$helptxt['theme_install'] = ' . , , .

    , theme_info.xml.'; +$helptxt['enableEmbeddedFlash'] = ' Flash , . , . + !'; +$helptxt['xmlnews_enable'] = ' + . /, .. rss , Trillian, .'; +$helptxt['hotTopicPosts'] = ' "" + " " .'; +$helptxt['globalCookies'] = ' cookies. , ...
    + http://www.simplemachines.org/,
    + http://forum.simplemachines.org/,
    + , cookies .'; +$helptxt['redirectMetaRefresh'] = ', SMF "" , . , , .

    , .'; +$helptxt['securityDisable'] = ' . !'; +$helptxt['securityDisable_why'] = ' . ( , .)

    , , , .'; +$helptxt['emailmembers'] = ' "". :
    + {$board_url} - URL .
    + {$current_time} - .
    + {$member.email} - Email .
    + {$member.link} - .
    + {$member.id} - Id .
    + {$member.name} - . ( .)
    + {$latest_member.link} - .
    + {$latest_member.id} - Id .
    + {$latest_member.name} - .'; +$helptxt['attachmentEncryptFilenames'] = ' , .php , . , - .'; + +$helptxt['failed_login_threshold'] = ' , .'; +$helptxt['edit_wait_time'] = ' , .'; +$helptxt['enableSpellChecking'] = ' . pspell PHP pspell . ' . (function_exists('pspell_new') == 1 ? '' : '') . ' .'; +$helptxt['lastActive'] = ' . 15 .'; + +$helptxt['autoOptDatabase'] = ' . 1, . , .'; +$helptxt['autoFixDatabase'] = ' , , . , - , . , .'; + +$helptxt['enableParticipation'] = ' , .'; + +$helptxt['db_persist'] = ' . , .'; + +$helptxt['queryless_urls'] = ' URL-, . index.php/topic,1.html.

    ' . (strpos(php_sapi_name(), 'apache') !== false ? '' : '') . ' .'; +$helptxt['fixLongWords'] = ' , . 40.'; + +$helptxt['who_enabled'] = ' , .'; + +$helptxt['recycle_enable'] = '"" .'; + +$helptxt['default_personalText'] = ' , " ."'; + +$helptxt['modlog_enabled'] = ' .'; + +$helptxt['guest_hideContacts'] = ' , email '; + +$helptxt['registration_method'] = ' . :

    +
      +
    • + :
      + , .. .
      +
    • +
      + .
      +
    • +
      + , email , , .
      +
    • +
      + . +
    • +
    '; +$helptxt['send_validation_onChange'] = ' , , Email , email, .'; +$helptxt['send_welcomeEmail'] = ' , email '; +$helptxt['allow_hideOnline'] = ' , ( ). , , , . , - .'; +$helptxt['allow_hideEmail'] = ' , Email . , , email.'; + +$helptxt['latest_support'] = ' , . , - .

    "Retrieving support information...", , , www.simplemachines.org.'; +$helptxt['latest_packages'] = ' , .

    , , , www.simplemachines.org.'; +$helptxt['latest_themes'] = ' www.simplemachines.org. , www.simplemachines.org.'; + +$helptxt['secret_why_blank'] = ' , ( ), , SMF , ( - , !) '; +$helptxt['moderator_why_missing'] = ' , .'; + +$helptxt['permissions'] = ' , .

    , , \'.\''; +$helptxt['permissions_board'] = ' \',\' , - . \'\' , , . , .'; +$helptxt['permissions_quickgroups'] = ' "" - \' \', \'\', \' \', \'\' .'; +$helptxt['membergroups'] = ' SMF , . : +
      +
    • : - , . , , " ". .
    • +
    • : , . .
    • +
    '; + +$helptxt['calendar_how_edit'] = ' , (*) .'; + +$helptxt['maintenance_general'] = ' ( !), , , , , .

    , - , .'; +$helptxt['maintenance_backup'] = ' , , .

    , , , .'; +$helptxt['maintenance_rot'] = ' . , , , - , .

    .'; + +$helptxt['avatar_allow_server_stored'] = ' , . SMF .
    , , "" .'; +$helptxt['avatar_allow_external_url'] = ' , URL . , , - .

    , , . , .'; +$helptxt['avatar_check_size'] = ' "" , . .'; +$helptxt['avatar_allow_upload'] = ' " ", , , - .

    , .'; +$helptxt['avatar_download_png'] = 'PNG , . , JPEG, , .'; + +$helptxt['disableHostnameLookup'] = ' , . , .'; + +$helptxt['search_match_complete_words'] = ' , . , , \'here\' \'here\', \'there\', \'hereafter\'. , \'here\'.

    , , '; +$helptxt['disableTemporaryTables'] = ' . , , .'; +$helptxt['search_cache_size'] = ' . . , .

    . , ( 20kb ).'; +$helptxt['search_weight_frequency'] = ' . . , \' \'. .

    .'; +$helptxt['search_weight_age'] = ' . . , \' \'. .

    . , .'; +$helptxt['search_weight_length'] = ' . . , \' \'. .

    . , .'; +$helptxt['search_weight_subject'] = ' . . , \' \'. .

    .'; +$helptxt['search_weight_first_message'] = ' . . , \' \'. .

    .'; + +$helptxt['see_admin_ip'] = 'IP , . , IP , .

    IP.'; +$helptxt['see_member_ip'] = ' IP . , , IP .

    IP , .'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Install.english.php b/Themes/fixed/languages/Install.english.php new file mode 100644 index 0000000..6aeff8f --- /dev/null +++ b/Themes/fixed/languages/Install.english.php @@ -0,0 +1,103 @@ +help is available if you need it.'; +$txt['still_writable'] = 'Your installation directory is still writable. It\'s a good idea to chmod it so that it is not writable for security reasons.'; +$txt['delete_installer'] = 'Click here to delete this install.php file now. (doesn\'t work on all servers.)'; +$txt['go_to_your_forum'] = 'Now you can see your newly installed forum and begin to use it. You should first make sure you are logged in, after which you will be able to access the administration center.'; +$txt['good_luck'] = 'Good luck!
    Simple Machines'; + +$txt['user_refresh_install'] = 'Forum Refreshed'; +$txt['user_refresh_install_desc'] = 'While installing, the installer found that (with the details you provided) one or more of the tables this installer might create already existed.
    Any missing tables in your installation have been recreated with the default data, but no data was deleted from existing tables.'; + +$txt['default_topic_subject'] = 'Welcome to SMF!'; +$txt['default_topic_message'] = 'Welcome to Simple Machines Forum!

    We hope you enjoy using your forum.  If you have any problems, please feel free to [url=http://www.simplemachines.org/community/index.php]ask us for assistance[/url].

    Thanks!
    Simple Machines'; +$txt['default_board_name'] = 'General Discussion'; +$txt['default_board_description'] = 'Feel free to talk about anything and everything in this board.'; +$txt['default_category_name'] = 'General Category'; +$txt['default_time_format'] = '%B %d, %Y, %I:%M:%S %p'; + +$txt['error_message_click'] = 'Click here'; +$txt['error_message_try_again'] = 'to try this step again.'; +$txt['error_message_bad_try_again'] = 'to try installing anyway, but note that this is strongly discouraged.'; + +$txt['install_settings'] = 'Basic Settings'; +$txt['install_settings_info'] = 'Just a few things for you to setup ;).'; +$txt['install_settings_name'] = 'Forum name'; +$txt['install_settings_name_info'] = 'This is the name of your forum, ie. "The Testing Forum".'; +$txt['install_settings_name_default'] = 'My Community'; +$txt['install_settings_url'] = 'Forum URL'; +$txt['install_settings_url_info'] = 'This is the URL to your forum without the trailing \'/\'!.
    In most cases, you can leave the default value in this box alone - it is usually right.'; +$txt['install_settings_compress'] = 'Gzip Output'; +$txt['install_settings_compress_title'] = 'Compress output to save bandwidth.'; +// In this string, you can translate the word "PASS" to change what it says when the test passes. +$txt['install_settings_compress_info'] = 'This function does not work properly on all servers, but can save you a lot of bandwidth.
    Click here to test it. (it should just say "PASS".)'; +$txt['install_settings_dbsession'] = 'Database Sessions'; +$txt['install_settings_dbsession_title'] = 'Use the database for sessions instead of using files.'; +$txt['install_settings_dbsession_info1'] = 'This feature is almost always for the best, as it makes sessions more dependable.'; +$txt['install_settings_dbsession_info2'] = 'It doesn\'t seem like this feature will work on your server, but you can try it.'; +$txt['install_settings_proceed'] = 'Proceed'; + +$txt['mysql_settings'] = 'MySQL Server Settings'; +$txt['mysql_settings_info'] = 'These are the settings to use for your MySQL server. If you don\'t know the values, you should ask your host what they are.'; +$txt['mysql_settings_server'] = 'MySQL server name'; +$txt['mysql_settings_server_info'] = 'This is nearly always localhost - so if you don\'t know, try localhost.'; +$txt['mysql_settings_username'] = 'MySQL username'; +$txt['mysql_settings_username_info'] = 'Fill in the username you need to connect to your MySQL database here.
    If you don\'t know what it is, try the username of your ftp account, most of the time they are the same.'; +$txt['mysql_settings_password'] = 'MySQL password'; +$txt['mysql_settings_password_info'] = 'Here, put the password you need to connect to your MySQL database.
    If you don\'t know this, you should try the password to your ftp account.'; +$txt['mysql_settings_database'] = 'MySQL database name'; +$txt['mysql_settings_database_info'] = 'Fill in the name of the database you want to use for SMF to store its data in.
    If this database does not exist, this installer will try to create it.'; +$txt['mysql_settings_prefix'] = 'MySQL table prefix'; +$txt['mysql_settings_prefix_info'] = 'The prefix for every table in the database. Do not install two forums with the same prefix!
    This value allows for multiple installations in one database.'; + +$txt['user_settings'] = 'Create Your Account'; +$txt['user_settings_info'] = 'The installer will now create a new administrator account for you.'; +$txt['user_settings_username'] = 'Your username'; +$txt['user_settings_username_info'] = 'Choose the name you want to login with.
    This can\'t be changed later, but your display name can be.'; +$txt['user_settings_password'] = 'Password'; +$txt['user_settings_password_info'] = 'Fill in your preferred password here, and remember it well!'; +$txt['user_settings_again'] = 'Password'; +$txt['user_settings_again_info'] = '(just for verification.)'; +$txt['user_settings_email'] = 'Email Address'; +$txt['user_settings_email_info'] = 'Provide your email address as well. This must be a valid email address.'; +$txt['user_settings_database'] = 'MySQL Database Password'; +$txt['user_settings_database_info'] = 'The installer requires that you supply the database password to create an administrator account, for security reasons.'; +$txt['user_settings_proceed'] = 'Finish'; + +$txt['ftp_setup'] = 'FTP Connection Information'; +$txt['ftp_setup_info'] = 'This installer can connect via FTP to fix the files that need to be writable and are not. If this doesn\'t work for you, you will have to go in manually and make the files writable. Please note that this doesn\'t support SSL right now.'; +$txt['ftp_server'] = 'Server'; +$txt['ftp_server_info'] = 'This should be the server and port for your FTP server.'; +$txt['ftp_port'] = 'Port'; +$txt['ftp_username'] = 'Username'; +$txt['ftp_username_info'] = 'The username to login with. This will not be saved anywhere.'; +$txt['ftp_password'] = 'Password'; +$txt['ftp_password_info'] = 'The password to login with. This will not be saved anywhere.'; +$txt['ftp_path'] = 'Install Path'; +$txt['ftp_path_info'] = 'This is the relative path you use in your FTP server.'; +$txt['ftp_connect'] = 'Connect'; +$txt['ftp_setup_why'] = 'What is this step for?'; +$txt['ftp_setup_why_info'] = 'Some files need to be writable for SMF to work properly. This step allows you to let the installer make them writable for you. However, in some cases it won\'t work - in that case, please make the following files 777 (writable):'; +$txt['ftp_setup_again'] = 'to test if these files are writable again.'; + +$txt['error_php_too_low'] = 'Warning! You do not appear to have a version of PHP installed on your webserver that meets SMF\'s minimum installations requirements.
    If you are not the host, you will need to ask your host to upgrade, or use a different host - otherwise, please upgrade PHP to a recent version.

    If you know for a fact that your PHP version is high enough you may continue, although this is strongly discouraged.'; +$txt['error_missing_files'] = 'Unable to find crucial installation files in the directory of this script!

    Please make sure you uploaded the entire installation package, including the sql file, and then try again.'; +$txt['error_session_save_path'] = 'Please inform your host that the session.save_path specified in php.ini is not valid! It needs to be changed to a directory that exists, and is writable by the user PHP is running under.
    '; +$txt['error_windows_chmod'] = 'You\'re on a windows server, and some crucial files are not writable. Please ask your host to give write permissions to the user PHP is running under for the files in your SMF installation. The following files or directories need to be writable:'; +$txt['error_ftp_no_connect'] = 'Unable to connect to FTP server with this combination of details.'; +$txt['error_mysql_connect'] = 'Cannot connect to the MySQL database server with the supplied data.

    If you are not sure about what to type in, please contact your host.'; +$txt['error_mysql_too_low'] = 'The version of MySQL that your database server is using is very old, and does not meet SMF\'s minimum requirements.

    Please ask your host to either upgrade it or supply a new one, and if they won\'t, please try a different host.'; +$txt['error_mysql_database'] = 'The installer was unable to access the "%s" database. With some hosts, you have to create the database in your administration panel before SMF can use it. Some also add prefixes - like your username - to your database names.'; +$txt['error_mysql_queries'] = 'Some of the queries were not executed properly. This could be caused by an unsupported (development or old) version of MySQL.

    Technical information about the queries:'; +$txt['error_mysql_queries_line'] = 'Line #'; +$txt['error_mysql_missing'] = 'The installer was unable to detect MySQL support in PHP. Please ask your host to ensure that PHP was compiled with MySQL, or that the proper extension is being loaded.'; +$txt['error_user_settings_again_match'] = 'You typed in two completely different passwords!'; +$txt['error_user_settings_taken'] = 'Sorry, a member is already registered with that username and/or password.

    A new account has not been created.'; +$txt['error_user_settings_query'] = 'A database error occurred while trying to create an administrator. This error was:'; +$txt['error_subs_missing'] = 'Unable to find the Sources/Subs.php file. Please make sure it was uploaded properly, and then try again.'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Install.russian.php b/Themes/fixed/languages/Install.russian.php new file mode 100644 index 0000000..62c1f18 --- /dev/null +++ b/Themes/fixed/languages/Install.russian.php @@ -0,0 +1,103 @@ + .'; +$txt['still_writable'] = ' . , CHMOD, .'; +$txt['delete_installer'] = ' , install.php . ( .)'; +$txt['go_to_your_forum'] = ' . , , .'; +$txt['good_luck'] = '!
    Simple Machines'; + +$txt['user_refresh_install'] = ' '; +$txt['user_refresh_install_desc'] = ' ( ), , , .
    , , .'; + +$txt['default_topic_subject'] = ' SMF!'; +$txt['default_topic_message'] = ' Simple Machines Forum!

    , .  [url=http://www.simplemachines.org/community/index.php] [/url].

    !
    Simple Machines'; +$txt['default_board_name'] = 'General Discussion'; +$txt['default_board_description'] = ' .'; +$txt['default_category_name'] = 'General Category'; +$txt['default_time_format'] = '%B %d, %Y, %I:%M:%S %p'; + +$txt['error_message_click'] = ' '; +$txt['error_message_try_again'] = ' .'; +$txt['error_message_bad_try_again'] = ' , , .'; + +$txt['install_settings'] = ' '; +$txt['install_settings_info'] = ' ;).'; +$txt['install_settings_name'] = ' '; +$txt['install_settings_name_info'] = ' , " ".'; +$txt['install_settings_name_default'] = 'My Community'; +$txt['install_settings_url'] = 'URL '; +$txt['install_settings_url_info'] = ' URL \'/\'!.
    , - , , .'; +$txt['install_settings_compress'] = 'Gzip '; +$txt['install_settings_compress_title'] = ' .'; +// In this string, you can translate the word "PASS" to change what it says when the test passes. +$txt['install_settings_compress_info'] = ' , .
    . ( "".)'; +$txt['install_settings_dbsession'] = ' '; +$txt['install_settings_dbsession_title'] = ' .'; +$txt['install_settings_dbsession_info1'] = ' , .'; +$txt['install_settings_dbsession_info2'] = ' , .'; +$txt['install_settings_proceed'] = ''; + +$txt['mysql_settings'] = ' MySQL '; +$txt['mysql_settings_info'] = ' MySQL . , .'; +$txt['mysql_settings_server'] = ' MySQL '; +$txt['mysql_settings_server_info'] = ' localhost - , , localhost.'; +$txt['mysql_settings_username'] = ' MySQL'; +$txt['mysql_settings_username_info'] = ' , MySQL .
    , (username) ftp , .'; +$txt['mysql_settings_password'] = ' MySQL'; +$txt['mysql_settings_password_info'] = ' MySQL .
    , ftp .'; +$txt['mysql_settings_database'] = ' MySQL'; +$txt['mysql_settings_database_info'] = ' , SMF .
    , - .'; +$txt['mysql_settings_prefix'] = 'MySQL '; +$txt['mysql_settings_prefix_info'] = ' . !
    .'; + +$txt['user_settings'] = ' '; +$txt['user_settings_info'] = ' .'; +$txt['user_settings_username'] = ' '; +$txt['user_settings_username_info'] = ' , .
    , .'; +$txt['user_settings_password'] = ''; +$txt['user_settings_password_info'] = ' !'; +$txt['user_settings_again'] = ''; +$txt['user_settings_again_info'] = '( .)'; +$txt['user_settings_email'] = 'Email '; +$txt['user_settings_email_info'] = ' email . email .'; +$txt['user_settings_database'] = ' MySQL '; +$txt['user_settings_database_info'] = ' , , .'; +$txt['user_settings_proceed'] = ''; + +$txt['ftp_setup'] = ' FTP '; +$txt['ftp_setup_info'] = ' FTP, , . , . , SSL .'; +$txt['ftp_server'] = ''; +$txt['ftp_server_info'] = ' FTP .'; +$txt['ftp_port'] = ''; +$txt['ftp_username'] = ' '; +$txt['ftp_username_info'] = ' (username) FTP. .'; +$txt['ftp_password'] = ''; +$txt['ftp_password_info'] = ' FTP. .'; +$txt['ftp_path'] = ' '; +$txt['ftp_path_info'] = ' , FTP .'; +$txt['ftp_connect'] = ''; +$txt['ftp_setup_why'] = ' ?'; +$txt['ftp_setup_why_info'] = ' SMF. , .. . , . CHMOD 777 ():'; +$txt['ftp_setup_again'] = ' .'; + +$txt['error_php_too_low'] = '! , PHP, SMF .
    , , , PHP .

    , PHP , , .'; +$txt['error_missing_files'] = ' !

    , , , sql .'; +$txt['error_session_save_path'] = ', , session.save_path php.ini ! , PHP.
    '; +$txt['error_windows_chmod'] = ' windows , . , , , PHP, SMF . :'; +$txt['error_ftp_no_connect'] = ' FTP .'; +$txt['error_mysql_connect'] = ' MySQL , .

    , , , .'; +$txt['error_mysql_too_low'] = ' MySQL , , , SMF.

    , , , .'; +$txt['error_mysql_database'] = ' "%s" . , , , SMF . - (username) - ..'; +$txt['error_mysql_queries'] = ' . ( ) MySQL.

    :'; +$txt['error_mysql_queries_line'] = ' #'; +$txt['error_mysql_missing'] = ' MySQL PHP. , , PHP MySQL, .'; +$txt['error_user_settings_again_match'] = ' !'; +$txt['error_user_settings_taken'] = ', / .

    .'; +$txt['error_user_settings_query'] = ' . :'; +$txt['error_subs_missing'] = ' Sources/Subs.php . , , '; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/InstantMessage.english.php b/Themes/fixed/languages/InstantMessage.english.php new file mode 100644 index 0000000..7e8a0d0 --- /dev/null +++ b/Themes/fixed/languages/InstantMessage.english.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/Themes/fixed/languages/InstantMessage.russian.php b/Themes/fixed/languages/InstantMessage.russian.php new file mode 100644 index 0000000..3d783f2 --- /dev/null +++ b/Themes/fixed/languages/InstantMessage.russian.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/Themes/fixed/languages/Login.english.php b/Themes/fixed/languages/Login.english.php new file mode 100644 index 0000000..5e8bd0a --- /dev/null +++ b/Themes/fixed/languages/Login.english.php @@ -0,0 +1,110 @@ + \ No newline at end of file diff --git a/Themes/fixed/languages/Login.russian.php b/Themes/fixed/languages/Login.russian.php new file mode 100644 index 0000000..7511bf2 --- /dev/null +++ b/Themes/fixed/languages/Login.russian.php @@ -0,0 +1,108 @@ + :'; +$txt[719] = ' :'; +$txt[730] = ' email (%s) . , .'; + +$txt['ban_register_prohibited'] = ', .'; + +$txt['activate_mail'] = ' . , '; +$txt['activate_account'] = ' '; +$txt['activate_success'] = ' . .'; +$txt['activate_not_completed1'] = ' , . , .'; +$txt['activate_not_completed2'] = ' ?'; +$txt['activate_after_registration'] = ' . , , .'; +$txt['invalid_userid'] = ' '; +$txt['invalid_activation_code'] = ' '; +$txt['invalid_activation_username'] = ' e-mail'; +$txt['invalid_activation_new'] = ' , .'; +$txt['invalid_activation_new_email'] = ' e-mail '; +$txt['invalid_activation_password'] = ' '; +$txt['invalid_activation_resend'] = ' '; +$txt['invalid_activation_known'] = ' , , .'; +$txt['invalid_activation_retry'] = ' '; +$txt['invalid_activation_submit'] = ''; + +$txt['change_email_success'] = ' e-mail .'; +$txt['resend_email_success'] = ' .'; +$txt['change_password'] = ' '; +$txt['change_password_1'] = ' '; +$txt['change_password_2'] = ' . .'; + +$txt['maintenance3'] = ' .'; + +$txt['register_agree'] = ', .'; + +$txt['approval_after_registration'] = ' . - .'; +$txt['approval_email'] = ' - .'; + +$txt['admin_register'] = ' '; +$txt['admin_register_desc'] = ' e-mail .'; +$txt['admin_register_username'] = ' '; +$txt['admin_register_email'] = 'E-mail'; +$txt['admin_register_password'] = ''; +$txt['admin_register_username_desc'] = ' '; +$txt['admin_register_email_desc'] = 'E-mail '; +$txt['admin_register_password_desc'] = ' '; +$txt['admin_register_email_detail'] = ' e-mail'; +$txt['admin_register_email_detail_desc'] = 'Email '; +$txt['admin_register_email_activate'] = ' '; +$txt['admin_register_group'] = ' '; +$txt['admin_register_group_desc'] = ' '; +$txt['admin_register_group_none'] = '( )'; + +$txt['admin_browse_approve'] = ', '; +$txt['admin_browse_approve_desc'] = ' , .'; +$txt['admin_browse_activate'] = ', '; +$txt['admin_browse_activate_desc'] = ' .'; +$txt['admin_browse_register_new'] = ' '; +$txt['admin_browse_awaiting_approval'] = ' '; +$txt['admin_browse_awaiting_activate'] = ' '; +$txt['admin_browse_username'] = ' '; +$txt['admin_browse_email'] = 'Email'; +$txt['admin_browse_ip'] = 'IP'; +$txt['admin_browse_registered'] = ' '; +$txt['admin_browse_id'] = 'ID'; +$txt['admin_browse_with_selected'] = ' '; +$txt['admin_browse_no_members'] = ' '; +// Don't use entities in the below strings, except the main ones. (lt, gt, quot.) +$txt['admin_browse_warn'] = ' ?'; +$txt['admin_browse_w_approve'] = ' '; +$txt['admin_browse_w_activate'] = ' '; +$txt['admin_browse_w_delete'] = ' '; +$txt['admin_browse_w_remind'] = ' '; +$txt['admin_browse_w_email'] = ' e-mail'; + +$txt['admin_approve_reject'] = ' '; +$txt['admin_approve_reject_desc'] = ' , '; +$txt['admin_approve_reject_desc2'] = ' .'; +$txt['admin_approve_remind'] = ' '; +$txt['admin_approve_remind_desc'] = ' '; +$txt['admin_approve_remind_desc2'] = ', , :'; +$txt['admin_approve_accept_desc'] = ' , .'; + +$txt['admin_notify_subject'] = ' '; +$txt['admin_notify_profile'] = '%s . .'; +$txt['admin_notify_approval'] = ' . , :'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/ManageBoards.english.php b/Themes/fixed/languages/ManageBoards.english.php new file mode 100644 index 0000000..1b61261 --- /dev/null +++ b/Themes/fixed/languages/ManageBoards.english.php @@ -0,0 +1,66 @@ +"username", "username"
    . (these must be usernames not display names!)
    To create a new board, click the Add Board button. To make the new board a child of a current board, select "Child of..." from the Order drop down menu when creating the board.'; +$txt['parent_members_only'] = 'Ungrouped Members'; +$txt['parent_guests_only'] = 'Guests'; +$txt['catConfirm'] = 'Do you really want to delete this category?'; +$txt['boardConfirm'] = 'Do you really want to delete this board?'; + +$txt['catEdit'] = 'Edit Category'; +$txt['boardsEdit'] = 'Modify Boards'; +$txt['collapse_enable'] = 'Collapsable'; +$txt['collapse_desc'] = 'Allow users to collapse this category?'; +$txt['catModify'] = '(modify)'; + +$txt['mboards_order_after'] = 'After '; +$txt['mboards_order_inside'] = 'Inside '; +$txt['mboards_order_first'] = 'In first place'; + +$txt['mboards_new_cat'] = 'Create new category'; +$txt['mboards_new_board'] = 'Add Board'; +$txt['mboards_new_cat_name'] = 'New Category'; +$txt['mboards_add_cat_button'] = 'Add Category'; +$txt['mboards_new_board_name'] = 'New Board'; + +$txt['mboards_name'] = 'Name'; +$txt['mboards_modify'] = 'modify'; +$txt['mboards_permissions'] = 'permissions'; + +$txt['mboards_delete_cat'] = 'Delete Category'; +$txt['mboards_delete_board'] = 'Delete Board'; + +$txt['mboards_delete_cat_contains'] = 'Deleting this category will also delete the below boards, including all topics, posts and attachments within each board'; +$txt['mboards_delete_what_do'] = 'Please select what you would like to do with these boards'; +$txt['mboards_delete_option1'] = 'Delete category and all boards contained within.'; +$txt['mboards_delete_option2'] = 'Delete category and move all boards contained within to'; +$txt['mboards_delete_confirm'] = 'Confirm'; +$txt['mboards_delete_cancel'] = 'Cancel'; +$txt['mboards_delete_error'] = 'No category selected!'; + +$txt['mboards_category'] = 'Category'; +$txt['mboards_description'] = 'Description'; +$txt['mboards_description_desc'] = 'A short description of your board.'; +$txt['mboards_groups'] = 'Allowed Groups'; +$txt['mboards_groups_desc'] = 'Groups allowed to access this board.'; +$txt['mboards_moderators'] = 'Moderators'; +$txt['mboards_moderators_desc'] = 'Additional members to have moderation privileges on this board. Note that administrators don\'t have to be listed here.'; +$txt['mboards_count_posts'] = 'Count Posts'; +$txt['mboards_count_posts_desc'] = 'Makes new replies and topics raise members\' post counts.'; +$txt['mboards_unchanged'] = 'Unchanged'; +$txt['mboards_theme'] = 'Board Theme'; +$txt['mboards_theme_desc'] = 'This allows you to change the look of your forum inside only this board.'; +$txt['mboards_theme_default'] = '(overall forum default.)'; +$txt['mboards_override_theme'] = 'Override Member\'s Theme'; +$txt['mboards_override_theme_desc'] = 'Use this board\'s theme even if the member didn\'t choose to use the defaults.'; + +$txt['mboards_order_before'] = 'Before'; +$txt['mboards_order_child_of'] = 'Child of'; +$txt['mboards_current_position'] = 'Current Position'; +$txt['no_valid_parent'] = 'Board %s does not have a valid parent. Use the \'find and repair errors\' function to fix this.'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/ManageBoards.russian.php b/Themes/fixed/languages/ManageBoards.russian.php new file mode 100644 index 0000000..2954b15 --- /dev/null +++ b/Themes/fixed/languages/ManageBoards.russian.php @@ -0,0 +1,66 @@ +"username", "username". ( , !)
    , . , , " ..." .'; +$txt['parent_members_only'] = ' '; +$txt['parent_guests_only'] = ''; +$txt['catConfirm'] = ' ?'; +$txt['boardConfirm'] = ' ?'; + +$txt['catEdit'] = ' '; +$txt['boardsEdit'] = ' '; +$txt['collapse_enable'] = ''; +$txt['collapse_desc'] = ' ?'; +$txt['catModify'] = '()'; + +$txt['mboards_order_after'] = ' '; +$txt['mboards_order_inside'] = ' '; +$txt['mboards_order_first'] = ' '; + +$txt['mboards_new_cat'] = ' '; +$txt['mboards_new_board'] = ' '; +$txt['mboards_new_cat_name'] = ' '; +$txt['mboards_add_cat_button'] = ' '; +$txt['mboards_new_board_name'] = ' '; + +$txt['mboards_name'] = ''; +$txt['mboards_modify'] = ''; +$txt['mboards_permissions'] = ''; + +$txt['mboards_delete_cat'] = ' '; +$txt['mboards_delete_board'] = ' '; + +$txt['mboards_delete_cat_contains'] = ' , , , '; +$txt['mboards_delete_what_do'] = ', , '; +$txt['mboards_delete_option1'] = ' .'; +$txt['mboards_delete_option2'] = ' '; +$txt['mboards_delete_confirm'] = ''; +$txt['mboards_delete_cancel'] = ''; +$txt['mboards_delete_error'] = ' !'; + +$txt['mboards_category'] = ''; +$txt['mboards_description'] = ''; +$txt['mboards_description_desc'] = ' .'; +$txt['mboards_groups'] = ' '; +$txt['mboards_groups_desc'] = ' .'; +$txt['mboards_moderators'] = ''; +$txt['mboards_moderators_desc'] = ' , . , .'; +$txt['mboards_count_posts'] = ' '; +$txt['mboards_count_posts_desc'] = ' .'; +$txt['mboards_unchanged'] = ' '; +$txt['mboards_theme'] = ' '; +$txt['mboards_theme_desc'] = ' .'; +$txt['mboards_theme_default'] = '( .)'; +$txt['mboards_override_theme'] = ' '; +$txt['mboards_override_theme_desc'] = ' , .'; + +$txt['mboards_order_before'] = ''; +$txt['mboards_order_child_of'] = ' '; +$txt['mboards_current_position'] = ' '; +$txt['no_valid_parent'] = ' %s . \' \' .'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/ManageMembers.english.php b/Themes/fixed/languages/ManageMembers.english.php new file mode 100644 index 0000000..0af2d66 --- /dev/null +++ b/Themes/fixed/languages/ManageMembers.english.php @@ -0,0 +1,45 @@ + \ No newline at end of file diff --git a/Themes/fixed/languages/ManageMembers.russian.php b/Themes/fixed/languages/ManageMembers.russian.php new file mode 100644 index 0000000..22e5f5f --- /dev/null +++ b/Themes/fixed/languages/ManageMembers.russian.php @@ -0,0 +1,45 @@ + \ No newline at end of file diff --git a/Themes/fixed/languages/ManagePermissions.english.php b/Themes/fixed/languages/ManagePermissions.english.php new file mode 100755 index 0000000..0a89de5 --- /dev/null +++ b/Themes/fixed/languages/ManagePermissions.english.php @@ -0,0 +1,218 @@ +\'Deny\' (D).

    Remember that if you deny a permission, any member - whether moderator or otherwise - that is in that group will be denied that as well.
    For this reason, you should use deny carefully, only when necessary. Disallow, on the other hand, denies unless otherwise granted.'; + +$txt['permissiongroup_general'] = 'General'; +$txt['permissionname_view_stats'] = 'View forum statistics'; +$txt['permissionhelp_view_stats'] = 'The forum statistics is a page summarizing all statistics of the forum, like member count, daily number of posts, and several top 10 statistics. Enabling this permission adds a link to the bottom of the board index (\'[More Stats]\').'; +$txt['permissionname_view_mlist'] = 'View the memberlist'; +$txt['permissionhelp_view_mlist'] = 'The memberlist shows all members that have registered on your forum. The list can be sorted and searched. The memberlist is linked from both the boardindex and the stats page, by clicking on the number of members.'; +$txt['permissionname_who_view'] = 'View Who\'s Online'; +$txt['permissionhelp_who_view'] = 'Who\'s online shows all members that are currently online and what they are doing at that moment. This permission will only work if you also have enabled it in \'Features and Options\'. You can access the \'Who\'s Online\' screen by clicking the link in the \'Users Online\' section of the board index.'; +$txt['permissionname_search_posts'] = 'Search for posts and topics'; +$txt['permissionhelp_search_posts'] = 'The Search permission allows the user to search all boards he or she is allowed to access. When the search permission is enabled, a \'Search\' button will be added to the forum button bar.'; +$txt['permissionname_karma_edit'] = 'Change other people\'s karma'; +$txt['permissionhelp_karma_edit'] = 'Karma is a feature that shows the popularity of a member. In order to use this feature, you need to have it enabled in \'Features and Options\'. This permission will allow a membergroup to cast a vote. This permission has no effect on guests.'; + +$txt['permissiongroup_pm'] = 'Personal Messaging'; +$txt['permissionname_pm_read'] = 'Read personal messages'; +$txt['permissionhelp_pm_read'] = 'This permission allows users to access the Personal Messages section and read their Personal Messages. Without this permission a user is unable to send Personal Messages.'; +$txt['permissionname_pm_send'] = 'Send personal messages'; +$txt['permissionhelp_pm_send'] = 'Send personal messages to other registered members. Requires the \'Read personal messages\' permission.'; + +$txt['permissiongroup_calendar'] = 'Calendar'; +$txt['permissionname_calendar_view'] = 'View the calendar'; +$txt['permissionhelp_calendar_view'] = 'The calendar shows for each month the birthdays, events and holidays. This permission allows access to this calendar. When this permission is enabled, a button will be added to the top button bar and a list will be shown at the bottom of the board index with current and upcoming birthdays, events and holidays. The calendar needs be enabled from \'Edit Features and Options\'.'; +$txt['permissionname_calendar_post'] = 'Create events in the calendar'; +$txt['permissionhelp_calendar_post'] = 'An Event is a topic linked to a certain date or date range. Creating events can be done from the calendar. An event can only be created if the user that creates the event is allowed to post new topics.'; +$txt['permissionname_calendar_edit'] = 'Edit events in the calendar'; +$txt['permissionhelp_calendar_edit'] = 'An Event is a topic linked to a certain date or date range. Event can be edited by clicking the red asterisk (*) next to the event in the calendar view. In order to be able to edit an event, a user must have sufficient permissions to edit the first message of the topic that is linked to the event.'; +$txt['permissionname_calendar_edit_own'] = 'Own events'; +$txt['permissionname_calendar_edit_any'] = 'Any events'; + +$txt['permissiongroup_maintenance'] = 'Forum administration'; +$txt['permissionname_admin_forum'] = 'Administrate forum and database'; +$txt['permissionhelp_admin_forum'] = 'This permission allows a user to:
    • change forum, database and theme settings
    • manage packages
    • use the forum and database maintenance tools
    • view the error and mod logs
    Use this permission with caution, as it is very powerful.'; +$txt['permissionname_manage_boards'] = 'Manage boards and categories'; +$txt['permissionhelp_manage_boards'] = 'This permission allows creation, editing and removal of boards and categories.'; +$txt['permissionname_manage_attachments'] = 'Manage attachments and avatars'; +$txt['permissionhelp_manage_attachments'] = 'This permission allows access to the attachment center, where all forum attachments and avatars are listed and can be removed.'; +$txt['permissionname_manage_smileys'] = 'Manage smileys'; +$txt['permissionhelp_manage_smileys'] = 'This allows access to the smiley center. In the smiley center you can add, edit and remove smileys and smiley sets.'; +$txt['permissionname_edit_news'] = 'Edit news'; +$txt['permissionhelp_edit_news'] = 'The news function allows a random news line to appear on each screen. In order to use the news function, enabled it in the forum settings.'; + +$txt['permissiongroup_member_admin'] = 'Member administration'; +$txt['permissionname_moderate_forum'] = 'Moderate forum members'; +$txt['permissionhelp_moderate_forum'] = 'This permission includes all important member moderation functions:
    • access to registration management
    • access to the view/delete members screen
    • extensive profile info, including track IP/user and (hidden) online status
    • activate accounts
    • get approval notifications and approve accounts
    • immune to ignore PM
    • several small things
    '; +$txt['permissionname_manage_membergroups'] = 'Manage and assign membergroups'; +$txt['permissionhelp_manage_membergroups'] = 'This permission allows a user to edit membergroups and assign membergroups to other members.'; +$txt['permissionname_manage_permissions'] = 'Manage permissions'; +$txt['permissionhelp_manage_permissions'] = 'This permission allows a user to edit all permissions of a membergroup, globally or for individual boards.'; +$txt['permissionname_manage_bans'] = 'Manage ban list'; +$txt['permissionhelp_manage_bans'] = 'This permission allows a user to add or remove usernames, IP addresses, hostnames and email addresses to a list of banned users. It also allows to view and remove log entries of banned users that attempted to login.'; +$txt['permissionname_send_mail'] = 'Send a forum email to members'; +$txt['permissionhelp_send_mail'] = 'Mass mail all forum members, or just a few membergroups by email or personal message (the latter requires \'Send Personal Message\' permission).'; + +$txt['permissiongroup_profile'] = 'Member Profiles'; +$txt['permissionname_profile_view'] = 'View profile summary and stats'; +$txt['permissionhelp_profile_view'] = 'This permission allows users clicking on a username to see a summary of profile settings, some statistics and all posts of the user.'; +$txt['permissionname_profile_view_own'] = 'Own profile'; +$txt['permissionname_profile_view_any'] = 'Any profile'; +$txt['permissionname_profile_identity'] = 'Edit account settings'; +$txt['permissionhelp_profile_identity'] = 'Account settings are the basic settings of a profile, like password, email address, membergroup and preferred language.'; +$txt['permissionname_profile_identity_own'] = 'Own profile'; +$txt['permissionname_profile_identity_any'] = 'Any profile'; +$txt['permissionname_profile_extra'] = 'Edit additional profile settings'; +$txt['permissionhelp_profile_extra'] = 'Additional profile settings include settings for avatars, theme preferences, notifications and Personal Messages.'; +$txt['permissionname_profile_extra_own'] = 'Own profile'; +$txt['permissionname_profile_extra_any'] = 'Any profile'; +$txt['permissionname_profile_title'] = 'Edit custom title'; +$txt['permissionhelp_profile_title'] = 'The custom title is shown on the topic display page, under the profile of each user that has a custom title.'; +$txt['permissionname_profile_title_own'] = 'Own profile'; +$txt['permissionname_profile_title_any'] = 'Any profile'; +$txt['permissionname_profile_remove'] = 'Delete account'; +$txt['permissionhelp_profile_remove'] = 'This permission allows a user to delete his account, when set to \'Own Account\'.'; +$txt['permissionname_profile_remove_own'] = 'Own account'; +$txt['permissionname_profile_remove_any'] = 'Any account'; +$txt['permissionname_profile_remote_avatar'] = 'Choose a remotely stored avatar'; +$txt['permissionhelp_profile_remote_avatar'] = 'Because avatars might influence the page creation time negatively, it is possible to disallow certain membergroups to use avatars from external servers. '; + +$txt['permissiongroup_general_board'] = 'General'; +$txt['permissionname_moderate_board'] = 'Moderate board'; +$txt['permissionhelp_moderate_board'] = 'The moderate board permission adds a few small permissions that make a moderator a real moderator. Permissions include replying to locked topics, changing the poll expire time and viewing poll results.'; + +$txt['permissiongroup_topic'] = 'Topics'; +$txt['permissionname_post_new'] = 'Post new topics'; +$txt['permissionhelp_post_new'] = 'This permission allows users to post new topics. It doesn\'t allow to post replies to topics.'; +$txt['permissionname_merge_any'] = 'Merge any topic'; +$txt['permissionhelp_merge_any'] = 'Merge two or more topic into one. The order of messages within the merged topic will be based on the time the messages were created. A user can only merge topics on those boards a user is allowed to merge. In order to merge multiple topics at once, a user has to enable quickmoderation in their profile settings.'; +$txt['permissionname_split_any'] = 'Split any topic'; +$txt['permissionhelp_split_any'] = 'Split a topic into two separate topics.'; +$txt['permissionname_send_topic'] = 'Send topics to friends'; +$txt['permissionhelp_send_topic'] = 'This permission allows a user to mail a topic to a friend, by entering their email address and allows adding a message.'; +$txt['permissionname_make_sticky'] = 'Make topics sticky'; +$txt['permissionhelp_make_sticky'] = 'Sticky topics are topics that always remain on top of a board. They can be useful for announcements or other important messages.'; +$txt['permissionname_move'] = 'Move topic'; +$txt['permissionhelp_move'] = 'Move a topic from one board to the other. Users can only select target boards they are allowed to access.'; +$txt['permissionname_move_own'] = 'Own topic'; +$txt['permissionname_move_any'] = 'Any topic'; +$txt['permissionname_lock'] = 'Lock topics'; +$txt['permissionhelp_lock'] = 'This permission allows a user to lock a topic. This can be done in order to make sure no one can reply to a topic. Only uses with a \'Moderate board\' permission can still post in locked topics.'; +$txt['permissionname_lock_own'] = 'Own topic'; +$txt['permissionname_lock_any'] = 'Any topic'; +$txt['permissionname_delete'] = 'Remove topics'; +$txt['permissionhelp_delete'] = 'Delete topics as a whole. Note that this permission doesn\'t allow to delete specific messages within the topic!'; +$txt['permissionname_delete_own'] = 'Own topic'; +$txt['permissionname_delete_any'] = 'Any topics'; +$txt['permissionname_post_reply'] = 'Post replies to topics'; +$txt['permissionhelp_post_reply'] = 'This permission allows replying to topics.'; +$txt['permissionname_post_reply_own'] = 'Own topic'; +$txt['permissionname_post_reply_any'] = 'Any topic'; +$txt['permissionname_modify_replies'] = 'Modify replies to own topics'; +$txt['permissionhelp_modify_replies'] = 'This permission allows a user that started a topic to modify all replies to their topic.'; +$txt['permissionname_remove_replies'] = 'Delete replies to own topics'; +$txt['permissionhelp_remove_replies'] = 'This permission allows a user that started a topic to remove all replies to their topic.'; +$txt['permissionname_announce_topic'] = 'Announce topic'; +$txt['permissionhelp_announce_topic'] = 'This allows to send an announcement e-mail about a topic to all members or to a few membergroups.'; + +$txt['permissiongroup_post'] = 'Posts'; +$txt['permissionname_remove'] = 'Delete posts'; +$txt['permissionhelp_remove'] = 'Remove posts. This does not allow a user to delete the first post of a topic.'; +$txt['permissionname_remove_own'] = 'Own post'; +$txt['permissionname_remove_any'] = 'Any post'; +$txt['permissionname_modify'] = 'Modify posts'; +$txt['permissionhelp_modify'] = 'Edit posts'; +$txt['permissionname_modify_own'] = 'Own post'; +$txt['permissionname_modify_any'] = 'Any post'; +$txt['permissionname_report_any'] = 'Report posts to the moderators'; +$txt['permissionhelp_report_any'] = 'This permission adds a link to each message, allowing a user to report a post to a moderator. On reporting, all moderators on that board will receive an email with a link to the reported post and a description of the problem (as given by the reporting user).'; + +$txt['permissiongroup_poll'] = 'Polls'; +$txt['permissionname_poll_view'] = 'View polls'; +$txt['permissionhelp_poll_view'] = 'This permission allows a user to view a poll. Without this permission, the user will only see the topic.'; +$txt['permissionname_poll_vote'] = 'Vote in polls'; +$txt['permissionhelp_poll_vote'] = 'This permission allows a (registered) user to cast one vote. It doesn\'t apply to guests.'; +$txt['permissionname_poll_post'] = 'Post polls'; +$txt['permissionhelp_poll_post'] = 'This permission allows a user to post a new poll. As polls are special cases of topics, you cannot use this permission without the \'Post new topic\' permission.'; +$txt['permissionname_poll_add'] = 'Add poll to topics'; +$txt['permissionhelp_poll_add'] = 'Add poll to topics allows a user to add a poll after the topic has been created. This permission requires sufficient rights to edit the first post of a topic.'; +$txt['permissionname_poll_add_own'] = 'Own topics'; +$txt['permissionname_poll_add_any'] = 'Any topics'; +$txt['permissionname_poll_edit'] = 'Edit polls'; +$txt['permissionhelp_poll_edit'] = 'This permission allows to edit the options of a poll and to reset the poll. In order to edit the maximum number of votes and the expiration time, a user needs to have the \'Moderate board\' permission.'; +$txt['permissionname_poll_edit_own'] = 'Own poll'; +$txt['permissionname_poll_edit_any'] = 'Any poll'; +$txt['permissionname_poll_lock'] = 'Lock polls'; +$txt['permissionhelp_poll_lock'] = 'Locking polls prevents the poll from accepting any more votes.'; +$txt['permissionname_poll_lock_own'] = 'Own poll'; +$txt['permissionname_poll_lock_any'] = 'Any poll'; +$txt['permissionname_poll_remove'] = 'Remove polls'; +$txt['permissionhelp_poll_remove'] = 'This permission allows removal of polls.'; +$txt['permissionname_poll_remove_own'] = 'Own poll'; +$txt['permissionname_poll_remove_any'] = 'Any poll'; + +$txt['permissiongroup_notification'] = 'Notifications'; +$txt['permissionname_mark_any_notify'] = 'Request notification on replies'; +$txt['permissionhelp_mark_any_notify'] = 'This feature allows users to receive a notification whenever someone replies to a topic they subscribed to.'; +$txt['permissionname_mark_notify'] = 'Request notification on new topics'; +$txt['permissionhelp_mark_notify'] = 'Notification on new topics is a feature that allows a user to receive an email every time a new topic is created on the board they subscribe to.'; + +$txt['permissiongroup_attachment'] = 'Attachments'; +$txt['permissionname_view_attachments'] = 'View attachments'; +$txt['permissionhelp_view_attachments'] = 'Attachments are files that are attached to posted messages. This feature can be enabled and configured in \'Edit Features and Options\'. Since attachments are not directly accessed, you can protect them from being downloaded by users that don\'t have this permission.'; +$txt['permissionname_post_attachment'] = 'Post attachments'; +$txt['permissionhelp_post_attachment'] = 'Attachments are files that are attached to posted messages. One message can contain multiple attachments.'; + +$txt['permissionicon'] = ''; + +$txt['permissionname_karmalog_view'] = 'View Karma Log'; +$txt['permissionhelp_karmalog_view'] = 'Karma Description Log shows all members karma and description of applauding or smiting. This permission will only work if you also have enabled it in \'Features and Options\'. You can access the Karma Description screen by clicking the link in the \'Karma Stat\' section of the board index.'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/ManagePermissions.russian.php b/Themes/fixed/languages/ManagePermissions.russian.php new file mode 100644 index 0000000..c8219a8 --- /dev/null +++ b/Themes/fixed/languages/ManagePermissions.russian.php @@ -0,0 +1,217 @@ ++'; +$txt['permissions_option_off'] = ''; +$txt['permissions_option_deny'] = '×'; +$txt['permissions_option_desc'] = ' \'\' (+), \'\' (), \'\' (×).

    , , , , , - , .
    , , . , , , .'; + +$txt['permissiongroup_general'] = ''; +$txt['permissionname_view_stats'] = ' '; +$txt['permissionhelp_view_stats'] = ' , , , / "10 ..." , (\'[ ]\').'; +$txt['permissionname_view_mlist'] = ' '; +$txt['permissionhelp_view_mlist'] = ' , . . , . .'; +$txt['permissionname_who_view'] = ' Online'; +$txt['permissionhelp_who_view'] = ' online , online, . , \' \'. \' Online\', \' online\' .'; +$txt['permissionname_search_posts'] = ' '; +$txt['permissionhelp_search_posts'] = ' , . , \'\' .'; +$txt['permissionname_karma_edit'] = ' '; +$txt['permissionhelp_karma_edit'] = ' - , . , , \' \'. . .'; + +$txt['permissiongroup_pm'] = ' '; +$txt['permissionname_pm_read'] = ' '; +$txt['permissionhelp_pm_read'] = ' " ". .'; +$txt['permissionname_pm_send'] = ' '; +$txt['permissionhelp_pm_send'] = ' . \' \'.'; + +$txt['permissiongroup_calendar'] = ''; +$txt['permissionname_calendar_view'] = ' '; +$txt['permissionhelp_calendar_view'] = ' , , . . , "" , , . \' \'.'; +$txt['permissionname_calendar_post'] = ' '; +$txt['permissionhelp_calendar_post'] = ' - . . , .'; +$txt['permissionname_calendar_edit'] = ' '; +$txt['permissionhelp_calendar_edit'] = ' - . (*) . , , .'; +$txt['permissionname_calendar_edit_own'] = ' '; +$txt['permissionname_calendar_edit_any'] = ' '; + +$txt['permissiongroup_maintenance'] = ' '; +$txt['permissionname_admin_forum'] = ' '; +$txt['permissionhelp_admin_forum'] = ' :
    • ,
    , .'; +$txt['permissionname_manage_boards'] = ' '; +$txt['permissionhelp_manage_boards'] = ' , .'; +$txt['permissionname_manage_attachments'] = ' '; +$txt['permissionhelp_manage_attachments'] = ' , . .'; +$txt['permissionname_manage_smileys'] = ' '; +$txt['permissionhelp_manage_smileys'] = ' . , .'; +$txt['permissionname_edit_news'] = ' '; +$txt['permissionhelp_edit_news'] = ' . , .'; + +$txt['permissiongroup_member_admin'] = ' '; +$txt['permissionname_moderate_forum'] = ' '; +$txt['permissionhelp_moderate_forum'] = ' :
    • /
    • , IP- online
    • -
    '; +$txt['permissionname_manage_membergroups'] = ' '; +$txt['permissionhelp_manage_membergroups'] = ' , .'; +$txt['permissionname_manage_permissions'] = ' '; +$txt['permissionhelp_manage_permissions'] = ' .'; +$txt['permissionname_manage_bans'] = ' -'; +$txt['permissionhelp_manage_bans'] = ' . , , IP , email . .'; +$txt['permissionname_send_mail'] = ' e-mail '; +$txt['permissionhelp_send_mail'] = ' , e-mail ( .'; + +$txt['permissiongroup_profile'] = ' '; +$txt['permissionname_profile_view'] = ' '; +$txt['permissionhelp_profile_view'] = ' , , .'; +$txt['permissionname_profile_view_own'] = ' '; +$txt['permissionname_profile_view_any'] = ' '; +$txt['permissionname_profile_identity'] = ' '; +$txt['permissionhelp_profile_identity'] = ' - , , , email , .'; +$txt['permissionname_profile_identity_own'] = ' '; +$txt['permissionname_profile_identity_any'] = ' '; +$txt['permissionname_profile_extra'] = ' '; +$txt['permissionhelp_profile_extra'] = ' , , .'; +$txt['permissionname_profile_extra_own'] = ' '; +$txt['permissionname_profile_extra_any'] = ' '; +$txt['permissionname_profile_title'] = ' '; +$txt['permissionhelp_profile_title'] = ' , , .'; +$txt['permissionname_profile_title_own'] = ' '; +$txt['permissionname_profile_title_any'] = ' '; +$txt['permissionname_profile_remove'] = ' '; +$txt['permissionhelp_profile_remove'] = ' , \' \'.'; +$txt['permissionname_profile_remove_own'] = ' '; +$txt['permissionname_profile_remove_any'] = ' '; +$txt['permissionname_profile_remote_avatar'] = ' '; +$txt['permissionhelp_profile_remote_avatar'] = ' , . '; + +$txt['permissiongroup_general_board'] = ' '; +$txt['permissionname_moderate_board'] = ' '; +$txt['permissionhelp_moderate_board'] = ' . , .'; + +$txt['permissiongroup_topic'] = ' '; +$txt['permissionname_post_new'] = ' '; +$txt['permissionhelp_post_new'] = ' . .'; +$txt['permissionname_merge_any'] = ' '; +$txt['permissionhelp_merge_any'] = ' . . , . , .'; +$txt['permissionname_split_any'] = ' (split)'; +$txt['permissionhelp_split_any'] = ' .'; +$txt['permissionname_send_topic'] = ' e-mail'; +$txt['permissionhelp_send_topic'] = ' email .'; +$txt['permissionname_make_sticky'] = ' ""'; +$txt['permissionhelp_make_sticky'] = ' () . .'; +$txt['permissionname_move'] = ' '; +$txt['permissionhelp_move'] = ' . , .'; +$txt['permissionname_move_own'] = ' '; +$txt['permissionname_move_any'] = ' '; +$txt['permissionname_lock'] = ' '; +$txt['permissionhelp_lock'] = ' . , . \' \' .'; +$txt['permissionname_lock_own'] = ' '; +$txt['permissionname_lock_any'] = ' '; +$txt['permissionname_delete'] = ' '; +$txt['permissionhelp_delete'] = ' . , !'; +$txt['permissionname_delete_own'] = ' '; +$txt['permissionname_delete_any'] = ' '; +$txt['permissionname_post_reply'] = ' '; +$txt['permissionhelp_post_reply'] = ' .'; +$txt['permissionname_post_reply_own'] = ' '; +$txt['permissionname_post_reply_any'] = ' '; +$txt['permissionname_modify_replies'] = ' '; +$txt['permissionhelp_modify_replies'] = ' , , .'; +$txt['permissionname_remove_replies'] = ' '; +$txt['permissionhelp_remove_replies'] = ' , , .'; +$txt['permissionname_announce_topic'] = ' '; +$txt['permissionhelp_announce_topic'] = ' e-mail .'; + +$txt['permissiongroup_post'] = ''; +$txt['permissionname_remove'] = ' '; +$txt['permissionhelp_remove'] = ' .'; +$txt['permissionname_remove_own'] = ' '; +$txt['permissionname_remove_any'] = ' '; +$txt['permissionname_modify'] = ' '; +$txt['permissionhelp_modify'] = ' '; +$txt['permissionname_modify_own'] = ' '; +$txt['permissionname_modify_any'] = ' '; +$txt['permissionname_report_any'] = ' '; +$txt['permissionhelp_report_any'] = ' e-mail . ( )'; + +$txt['permissiongroup_poll'] = ''; +$txt['permissionname_poll_view'] = ' '; +$txt['permissionhelp_poll_view'] = ' . , .'; +$txt['permissionname_poll_vote'] = ' '; +$txt['permissionhelp_poll_vote'] = ' () . .'; +$txt['permissionname_poll_post'] = ' '; +$txt['permissionhelp_poll_post'] = ' . - , \' \'.'; +$txt['permissionname_poll_add'] = ' '; +$txt['permissionhelp_poll_add'] = ' , , . .'; +$txt['permissionname_poll_add_own'] = ' '; +$txt['permissionname_poll_add_any'] = ' '; +$txt['permissionname_poll_edit'] = ' '; +$txt['permissionhelp_poll_edit'] = ' . , , \' \'.'; +$txt['permissionname_poll_edit_own'] = ' '; +$txt['permissionname_poll_edit_any'] = ' '; +$txt['permissionname_poll_lock'] = ' '; +$txt['permissionhelp_poll_lock'] = ' .'; +$txt['permissionname_poll_lock_own'] = ' '; +$txt['permissionname_poll_lock_any'] = ' '; +$txt['permissionname_poll_remove'] = ' '; +$txt['permissionhelp_poll_remove'] = ' .'; +$txt['permissionname_poll_remove_own'] = ' '; +$txt['permissionname_poll_remove_any'] = ' '; + +$txt['permissiongroup_notification'] = ''; +$txt['permissionname_mark_any_notify'] = ' e-mail'; +$txt['permissionhelp_mark_any_notify'] = ' , - , .'; +$txt['permissionname_mark_notify'] = ' '; +$txt['permissionhelp_mark_notify'] = ' - , e-mail , , .'; + +$txt['permissiongroup_attachment'] = ''; +$txt['permissionname_view_attachments'] = ' '; +$txt['permissionhelp_view_attachments'] = ', , . \' \'. , , .'; +$txt['permissionname_post_attachment'] = ' '; +$txt['permissionhelp_post_attachment'] = ', , . .'; + +$txt['permissionicon'] = ''; + +$txt['permissionname_karmalog_view'] = 'View Karma Log'; +$txt['permissionhelp_karmalog_view'] = 'Karma Description Log shows all members karma and description of applauding or smiting. This permission will only work if you also have enabled it in \'Features and Options\'. You can access the Karma Description screen by clicking the link in the \'Karma Stat\' section of the board index.'; +?> diff --git a/Themes/fixed/languages/ManageSmileys.english.php b/Themes/fixed/languages/ManageSmileys.english.php new file mode 100644 index 0000000..045439f --- /dev/null +++ b/Themes/fixed/languages/ManageSmileys.english.php @@ -0,0 +1,78 @@ +Here you can change the name and location of each smiley set - remember, however, that all sets share the same smileys.'; +$txt['smiley_editsmileys_explain'] = 'Change your smileys here by clicking on the smiley you want to modify. Remember that these smileys all have to exist in all the sets or some smileys won\'t show up! Don\'t forget to save after you are done editing!'; +$txt['smiley_setorder_explain'] = 'Change the order of the smileys here.'; +$txt['smiley_addsmiley_explain'] = 'Here you can add a new smiley - either from an existing file or by uploading new ones.'; + +$txt['smileys_set_order'] = 'Set smiley order'; +$txt['smiley_settings'] = 'Smiley settings'; +$txt['smiley_sets_base_dir'] = 'Absolute path to all smiley sets'; +$txt['smiley_set_select_default'] = 'Default Smiley Set'; +$txt['smiley_set_new'] = 'Create new smiley set'; +$txt['smiley_set_modify_existing'] = 'Modify existing smiley set'; +$txt['smiley_set_modify'] = 'Modify'; +$txt['smiley_set_import_directory'] = 'Import smileys already in this directory'; +$txt['smiley_set_import_single'] = 'There is one smiley in this smiley set not yet imported. Click'; +$txt['smiley_set_import_multiple'] = 'There are %d smileys in the directory that have no yet been imported. Click'; +$txt['smiley_set_to_import_single'] = 'to import it now.'; +$txt['smiley_set_to_import_multiple'] = 'to import them now.'; + +$txt['smileys_location'] = 'Location'; +$txt['smileys_location_form'] = 'Post form'; +$txt['smileys_location_hidden'] = 'Hidden'; +$txt['smileys_location_popup'] = 'Popup'; +$txt['smileys_modify'] = 'modify'; +$txt['smileys_not_found_in_set'] = 'Smiley not found in set(s)'; +$txt['smileys_default_description'] = '(Insert a description)'; +$txt['smiley_new'] = 'Add new smiley'; +$txt['smiley_modify_existing'] = 'Modify smiley'; +$txt['smiley_preview'] = 'Preview'; +$txt['smiley_preview_using'] = 'using smiley set'; +$txt['smileys_confirm'] = 'Are you sure you want to remove these smileys?\\n\\nNote: This won\\\'t remove the images, just the choices.'; +$txt['smileys_location_form_description'] = 'These smileys will appear above the text area, when posting a new forum message or Personal Message.'; +$txt['smileys_location_popup_description'] = 'These smileys will be shown in a popup, that is shown after a user has clicked \'[more]\''; +$txt['smileys_move_select_destination'] = 'Select smiley destination'; +$txt['smileys_move_select_smiley'] = 'Select smiley to move'; +$txt['smileys_move_here'] = 'Move smiley to this location'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/ManageSmileys.russian.php b/Themes/fixed/languages/ManageSmileys.russian.php new file mode 100644 index 0000000..e139c8f --- /dev/null +++ b/Themes/fixed/languages/ManageSmileys.russian.php @@ -0,0 +1,78 @@ + , , .'; +$txt['smiley_editsmileys_explain'] = ' , , . , , ! , !'; +$txt['smiley_setorder_explain'] = ' .'; +$txt['smiley_addsmiley_explain'] = ' - , .'; + +$txt['smileys_set_order'] = ' '; +$txt['smiley_settings'] = ' '; +$txt['smiley_sets_base_dir'] = ' '; +$txt['smiley_set_select_default'] = ' '; +$txt['smiley_set_new'] = ' '; +$txt['smiley_set_modify_existing'] = ' '; +$txt['smiley_set_modify'] = ''; +$txt['smiley_set_import_directory'] = ' '; +$txt['smiley_set_import_single'] = ' . '; +$txt['smiley_set_import_multiple'] = ' %d , . '; +$txt['smiley_set_to_import_single'] = ' .'; +$txt['smiley_set_to_import_multiple'] = ' .'; + +$txt['smileys_location'] = ''; +$txt['smileys_location_form'] = ' '; +$txt['smileys_location_hidden'] = ''; +$txt['smileys_location_popup'] = ''; +$txt['smileys_modify'] = ''; +$txt['smileys_not_found_in_set'] = ' ()'; +$txt['smileys_default_description'] = '( )'; +$txt['smiley_new'] = ' '; +$txt['smiley_modify_existing'] = ' '; +$txt['smiley_preview'] = ''; +$txt['smiley_preview_using'] = ' '; +$txt['smileys_confirm'] = ' , ?\\n\\n: \\ , .'; +$txt['smileys_location_form_description'] = ' , .'; +$txt['smileys_location_popup_description'] = ' , \'[]\''; +$txt['smileys_move_select_destination'] = ' '; +$txt['smileys_move_select_smiley'] = ' '; +$txt['smileys_move_here'] = ' '; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/MessageIndex.template.php b/Themes/fixed/languages/MessageIndex.template.php new file mode 100644 index 0000000..851b83b --- /dev/null +++ b/Themes/fixed/languages/MessageIndex.template.php @@ -0,0 +1,361 @@ + + + ', theme_linktree(), ''; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], ''; + } + echo ' + + '; + + if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) + { + echo ' +
    + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + + '; + } + echo ' +
    ', $txt['parent_boards'], '
    '; + + // Is this board itself new? + if ($board['new']) + echo '', $txt[333], ''; + // Is one of this board's children new, then? + elseif ($board['children_new']) + echo '', $txt[333], ''; + // I guess it's not new at all. + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + if (!empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + if (!empty($board['children'])) + { + $children = array(); + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', $txt['parent_boards'], ': ', implode(', ', $children), '
    '; + } + + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + if (!empty($board['last_post']['id'])) + echo ' + ', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link']; + + echo ' +
    '; + } + + if (!empty($options['show_board_desc']) && $context['description'] != '') + { + echo ' + + + + +
    + ', $context['description'], ' +
    '; + } + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5']) . '' : '', '', theme_show_buttons(), '
    +
    '; + + // If Quick Moderation is enabled (and set to checkboxes - 1) start the form. + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' +
    '; + + echo ' + + '; + + // Are there actually any topics to show? + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + + // Show a "select all" box for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' + '; + // If it's on in "image" mode, don't show anything but the column. + elseif (!empty($options['display_quick_mod'])) + echo ' + '; + } + // No topics.... just say, "sorry bub". + else + echo ' + '; + + echo ' + '; + + foreach ($context['topics'] as $topic) + { + echo ' + + + + + + + + '; + + // Show the quick moderation options? + if (!empty($options['display_quick_mod'])) + { + echo ' + '; + } + echo ' + '; + } + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + { + echo ' + + + '; + } + + echo ' +
    ', $txt[70], $context['sort_by'] == 'subject' ? ' ' : '', '', $txt[109], $context['sort_by'] == 'starter' ? ' ' : '', '', $txt[110], $context['sort_by'] == 'replies' ? ' ' : '', '', $txt[301], $context['sort_by'] == 'views' ? ' ' : '', '', $txt[111], $context['sort_by'] == 'last_post' ? ' ' : '', ' + + ', $txt[151], '
    + + + + + ', $topic['first_post']['link']; + + // Is this topic new? (assuming they are logged in!) + if ($topic['new'] && $context['user']['is_logged']) + echo ' + ', $txt[302], ''; + + echo ' + ', $topic['pages'], ' + + ', $topic['first_post']['member']['link'], ' + + ', $topic['replies'], ' + + ', $topic['views'], ' + '; + /*if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif')) + echo ' + ';*/ + echo ' + + ', $topic['last_post']['time'], '
    + ', $txt[525], ' ', $topic['last_post']['member']['link'], ' +
    +
    '; + if ($options['display_quick_mod'] == 1 && ($topic['quick_mod']['remove'] || $topic['quick_mod']['lock'] || $topic['quick_mod']['sticky'] || $topic['quick_mod']['move'])) + echo ' + '; + else + { + // Check permissions on each and show only the ones they are allowed to use. + if ($topic['quick_mod']['remove']) + echo '', $txt[63], ''; + if ($topic['quick_mod']['lock']) + echo '', $txt['smf279'], ''; + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) + echo '
    '; + if ($topic['quick_mod']['sticky']) + echo '', $txt['smf277'], ''; + if ($topic['quick_mod']['move']) + echo '', $txt[132], ''; + } + echo '
    + '; + if ($context['can_move']) + { + echo ' + '; + } + echo ' + +
    '; + + // Finish off the form - again, if Quick Moderation is being done with checkboxes. (1) + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' + +
    '; + + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : '', '', theme_show_buttons(), '
    +
    + '; + + // Show breadcrumbs at the bottom too? + if ($settings['linktree_inline']) + echo ' + + + '; + + echo ' + + + + + +
    ', theme_linktree(), '

    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    +
    + : +   + +
    +
    '; +} + +function theme_show_buttons() +{ + global $context, $settings, $options, $txt, $scripturl; + + $buttonArray = array(); + + // If they are logged in, and the mark read buttons are enabled.. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[300] . '' : $txt[300]) . ''; + + // If the user has permission to show the notification button... ask them if they're sure, though. + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Are they allowed to post new topics? + if ($context['can_post_new']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[33] . '' : $txt[33]) . ''; + + // How about new polls, can the user post those? + if ($context['can_post_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf20'] . '' : $txt['smf20']) . ''; + + return implode($context['menu_separator'], $buttonArray); +} + +?> diff --git a/Themes/fixed/languages/ModSettings.english.php b/Themes/fixed/languages/ModSettings.english.php new file mode 100755 index 0000000..e2869ef --- /dev/null +++ b/Themes/fixed/languages/ModSettings.english.php @@ -0,0 +1,202 @@ +theme settings for more options. Click the help icons for more information about a setting.'; +$txt['mods_cat_expand_all'] = '(expand all)'; + +$txt['mods_cat_features'] = 'Basic Forum Features'; +$txt['pollMode'] = 'Poll mode'; +$txt['smf34'] = 'Disable polls'; +$txt['smf32'] = 'Enable polls'; +$txt['smf33'] = 'Show existing polls as topics'; +$txt['enableStickyTopics'] = 'Enable sticky topics'; +$txt['allow_guestAccess'] = 'Allow guests to browse the forum'; +$txt['userLanguage'] = 'Enable user-selectable language support'; +$txt['allow_editDisplayName'] = 'Allow users to edit their displayed name?'; +$txt['allow_hideOnline'] = 'Allow non-administrators to hide their online status?'; +$txt['allow_hideEmail'] = 'Allow users to hide their email from everyone except admins?'; +$txt['guest_hideContacts'] = 'Do not reveal contact details of members to guests'; +$txt['titlesEnable'] = 'Enable custom titles'; +$txt['default_personalText'] = 'Default personal text'; +$txt['max_signatureLength'] = 'Maximum allowed characters in signatures
    (0 for no max.)
    '; +$txt['removeNestedQuotes'] = 'Remove nested quotes when posting'; +$txt['enableEmbeddedFlash'] = 'Embed flash into posts
    (may be a security risk!)
    '; +$txt['enablePostHTML'] = 'Enable basic HTML in posts'; +$txt['disabledBBC'] = 'Disabled BBC Code (comma separated)'; +$txt['enableBBC'] = 'Enable bulletin board code (BBC)'; +$txt['enableNewReplyWarning'] = 'Warn members of new replies made while posting?'; +$txt['max_messageLength'] = 'Maximum allowed characters in posts
    (0 for no max.)
    '; +$txt['number_format'] = 'Default number format'; +$txt['time_format'] = 'Default time format'; +$txt['time_offset'] = 'Overall time offset
    (added to the member specific option.)
    '; +$txt['spamWaitTime'] = 'Seconds required between posts from the same IP'; +$txt['edit_wait_time'] = 'Courtesy edit wait time'; +$txt['failed_login_threshold'] = 'Failed login threshold'; +$txt['lastActive'] = 'User online time threshold'; +$txt['enableSpellChecking'] = 'Enable spell checking
    (this does not work on all servers!)
    '; +$txt['trackStats'] = 'Track daily statistics'; +$txt['hitStats'] = 'Track daily hits (must have stats enabled)'; +$txt['enableCompressedOutput'] = 'Enable compressed output'; +$txt['databaseSession_enable'] = 'Use database driven sessions'; +$txt['databaseSession_loose'] = 'Allow browsers to go back to cached pages'; +$txt['databaseSession_lifetime'] = 'Seconds before an unused session timeout'; +$txt['enableErrorLogging'] = 'Enable error logging'; +$txt['cookieTime'] = 'Default login cookies length (in minutes)'; +$txt['localCookies'] = 'Enable local storage of cookies
    (SSI won\'t work well with this on.)
    '; +$txt['globalCookies'] = 'Use subdomain independent cookies
    (turn off local cookies first!)
    '; +$txt['redirectMetaRefresh'] = 'Use a META redirect instead of HTTP
    (for IIS 4.0 and some Apache versions.)
    '; +$txt['securityDisable'] = 'Disable administration security'; +$txt['registration_method'] = 'Method of registration employed for new members'; +$txt['registration_disabled'] = 'Registration Disabled'; +$txt['registration_standard'] = 'Immediate Registration'; +$txt['registration_activate'] = 'Member Activation'; +$txt['registration_approval'] = 'Member Approval'; +$txt['notify_on_new_registration'] = 'Notify administrators when a new member joins'; +$txt['send_validation_onChange'] = 'Require reactivation after email change'; +$txt['send_welcomeEmail'] = 'Send welcome email to new members'; +$txt['autoOptDatabase'] = 'Optimize tables every how many days?
    (0 to disable.)
    '; +$txt['autoOptMaxOnline'] = 'Maximum users online when optimizing
    (0 for no max.)
    '; +$txt['autoFixDatabase'] = 'Automatically fix broken tables'; +$txt['notifyAnncmnts_UserDisable'] = 'Allow users to disable announcements'; +$txt['modlog_enabled'] = 'Log moderation actions'; +$txt['queryless_urls'] = 'Search engine friendly URLs
    Apache only!
    '; +$txt['maxwidth'] = 'Max width of posted pictures (0 = disable)'; +$txt['maxheight'] = 'Max height of posted pictures (0 = disable)'; +$txt['mail_type'] = 'Mail type'; +$txt['smtp_host'] = 'SMTP server'; +$txt['smtp_port'] = 'SMTP port'; +$txt['smtp_username'] = 'SMTP username'; +$txt['smtp_password'] = 'SMTP password'; +$txt['xmlnews_enable'] = 'Enable XML/RSS news'; +$txt['xmlnews_maxlen'] = 'Maximum post length:
    (0 to disable, bad idea.)
    '; +$txt['recycle_enable'] = 'Enable recycling of deleted topics'; +$txt['recycle_board'] = 'Board for recycled topics'; + +$txt['mods_cat_layout'] = 'Layout and Options'; +$txt['compactTopicPagesEnable'] = 'Limit number of displayed page links'; +$txt['smf235'] = 'Contiguous pages to display:'; +$txt['smf236'] = 'to display'; +$txt['todayMod'] = 'Enable "Today" feature'; +$txt['smf290'] = 'Disabled'; +$txt['smf291'] = 'Only Today'; +$txt['smf292'] = 'Today & Yesterday'; +$txt['topbottomEnable'] = 'Enable Go Up/Go Down buttons'; +$txt['onlineEnable'] = 'Show online/offline in posts and PMs'; +$txt['enableVBStyleLogin'] = 'Show a quick login on every page'; +$txt['autoLinkUrls'] = 'Automatically link posted URLs'; +$txt['fixLongWords'] = 'Break up words with more letters than:
    (0 to disable)
    '; +$txt['defaultMaxTopics'] = 'Maximum topics to display in the message index'; +$txt['defaultMaxMessages'] = 'Maximum messages to display in a topic page'; +$txt['defaultMaxMembers'] = 'Members per page in member list'; +$txt['topicSummaryPosts'] = 'Posts to show on topic summary'; +$txt['enableAllMessages'] = 'Max number of replies in a topic to show "All" posts:
    (0 to never show "All")
    '; +$txt['hotTopicPosts'] = 'Number of posts for a hot topic'; +$txt['hotTopicVeryPosts'] = 'Number of posts for a very hot topic'; +$txt['enableParticipation'] = 'Enable participation icons'; +$txt['enablePreviousNext'] = 'Enable previous/next topic links'; +$txt['timeLoadPageEnable'] = 'Display time taken to create every page'; +$txt['disableHostnameLookup'] = 'Disable hostname lookups?'; +$txt['who_enabled'] = 'Enable who\'s online list'; + +$txt['mods_cat_search'] = 'Search'; +$txt['simpleSearch'] = 'Enable simple search'; +$txt['search_match_complete_words'] = 'Only search for complete word matches'; +$txt['disableTemporaryTables'] = 'Disable temporary tables
    (only check if use of temporary tables is not allowed)
    '; +$txt['search_results_per_page'] = 'Number of search results per page'; +$txt['search_cache_size'] = 'Maximum cached searches
    (0 to disable caching)
    '; +$txt['search_weight_frequency'] = 'Relative search weight for number of matching messages within a topic'; +$txt['search_weight_age'] = 'Relative search weight for age of last matching message'; +$txt['search_weight_length'] = 'Relative search weight for topic length'; +$txt['search_weight_subject'] = 'Relative search weight for a matching subject'; +$txt['search_weight_first_message'] = 'Relative search weight for a first message match'; + +$txt['mods_cat_avatars'] = 'Avatars'; +$txt['avatar_allow_server_stored'] = 'Allow members to select a server-stored avatar'; +$txt['avatar_directory'] = 'Avatars directory'; +$txt['avatar_url'] = 'Avatars URL'; +$txt['avatar_allow_external_url'] = 'Allow members to select an external avatar (using a URL)'; +$txt['avatar_max_width_external'] = 'Maximum width external avatar (0 = no limit)'; +$txt['avatar_max_height_external'] = 'Maximum height external avatar (0 = no limit)'; +$txt['avatar_check_size'] = 'Check the avatar size every time it is displayed'; +$txt['avatar_action_too_large'] = 'If the avatar is too large...'; +$txt['option_refuse'] = 'Refuse it'; +$txt['option_html_resize'] = 'Let the HTML resize it'; +$txt['option_download_and_resize'] = 'Download and resize it (requires GD module)'; +$txt['avatar_allow_upload'] = 'Allow members to upload their own avatars'; +$txt['avatar_max_width_upload'] = 'Maximum width of uploaded avatar (0 = no limit)'; +$txt['avatar_max_height_upload'] = 'Maximum height of uploaded avatar (0 = no limit)'; +$txt['avatar_resize_upload'] = 'Resize oversized large avatars (requires GD module)'; +$txt['avatar_download_png'] = 'Use PNG for resized avatars?'; + +$txt['smf294'] = 'Attachments'; +$txt['attachmentEnable'] = 'Attachments mode'; +$txt['smf111'] = 'Disable attachments|Enable all attachments|Disable new attachments'; +$txt['attachmentCheckExtensions'] = 'Check attachment\'s extension'; +$txt['attachmentExtensions'] = 'Allowed attachment extensions'; +$txt['attachmentShowImages'] = 'Display image attachments as pictures under post'; +$txt['attachmentEncryptFilenames'] = 'Encrypt stored filenames'; +$txt['attachmentUploadDir'] = 'Attachments directory'; +$txt['attachmentDirSizeLimit'] = 'Max attachment folder space (in KB)'; +$txt['attachmentPostLimit'] = 'Max attachment size per post (in KB)'; +$txt['attachmentSizeLimit'] = 'Max size per attachment (in KB)'; +$txt['attachmentNumPerPostLimit'] = 'Max number of attachments per post'; + +$txt['smf293'] = 'Karma'; +$txt['karmaMode'] = 'Karma mode'; +$txt['smf64'] = 'Disable karma|Enable karma total|Enable karma positive/negative'; +$txt['karmaMinPosts'] = 'Set the minimum posts needed to modify karma'; +$txt['karmaWaitTime'] = 'Set wait time in hours'; +$txt['karmaTimeRestrictAdmins'] = 'Restrict administrators to wait time'; +$txt['karmaLabel'] = 'Karma label'; +$txt['karmaApplaudLabel'] = 'Karma applaud label'; +$txt['karmaSmiteLabel'] = 'Karma smite label'; + +$txt['karmadescmod'] = 'Enable Karma Description Mod'; +$txt['karmamaxmembers'] = 'Members per page in Karma Description log'; +$txt['karmalogview'] = 'Use member names as link to their profiles'; +$txt['karmapermiss'] = 'Allow users view Karma Description log (See Permissions)'; +$txt['karmalinks'] = 'Enable karma links in users profiles'; +$txt['karmaisowner'] = 'Disable whole karma log for users but enable own karma log'; +$txt['karmakarma'] = 'Display users karma(+/-) in Karma Description Log'; +$txt['karmaurl'] = 'Enable "Where" field in Karma Description Log'; +$txt['karmaotherstat'] = 'Show other Karma Statistics'; +$txt['karmasurv'] = 'Applaud or smite users without explanation'; +$txt['karmawhatwrite'] = 'Write this in the log, when explanation is disabled'; +$txt['karmacensor'] = 'Censor karma explanation'; +$txt['karmatopicstarter'] = 'Users can change only topic starter karma'; + +$txt['googleMapsEnable'] = 'Enable the Google Member Map'; +$txt['googleMapsEnableLegend'] = 'Show a Pin Legend'; +$txt['googleSidebar'] = 'Where to show sidebar'; +$txt['googleMapsKey'] = 'The key from the Google Maps API Page'; +$txt['googleMapsPinGender'] = 'Should the pins reflect users gender?'; +$txt['googleMapsPinNumber'] = 'Number of max pins to show on map'; +$txt['googleMapsType'] = 'The map type to show'; +$txt['googleMapsDefaultLat'] = 'The default Latitude'; +$txt['googleMapsDefaultLong'] = 'The default Longitude'; +$txt['googleMapsDefaultZoom'] = 'The defualt Zoom'; +$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering'; +$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster'; +$txt['googleMapsMaxVisMarker'] = 'Maximum Visable Pins On Map'; +$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters'; +$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box'; +$txt['googleMapFO'] = 'Member Map'; + +$txt['mods_cat_calendar'] = 'Calendar'; +$txt['cal_enabled'] = 'Enable the calendar'; +$txt['cal_daysaslink'] = 'Show days as links to \'Post Event\''; +$txt['cal_showweeknum'] = 'Show week numbers'; +$txt['cal_days_for_index'] = 'Max days in advance on board index'; +$txt['cal_showholidaysonindex'] = 'Show holidays on board index'; +$txt['cal_showbdaysonindex'] = 'Show birthdays on board index'; +$txt['cal_showeventsonindex'] = 'Show events on board index'; +$txt['cal_defaultboard'] = 'Default board to post events in'; +$txt['cal_minyear'] = 'Minimum year'; +$txt['cal_maxyear'] = 'Maximum year'; +$txt['cal_bdaycolor'] = 'Birthday color'; +$txt['cal_eventcolor'] = 'Event color'; +$txt['cal_holidaycolor'] = 'Holiday color'; +$txt['cal_allowspan'] = 'Allow events to span multiple days'; +$txt['cal_maxspan'] = 'Max number of days an event can span'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/ModSettings.english.php~ b/Themes/fixed/languages/ModSettings.english.php~ new file mode 100644 index 0000000..6f7ea71 --- /dev/null +++ b/Themes/fixed/languages/ModSettings.english.php~ @@ -0,0 +1,209 @@ +theme settings for more options. Click the help icons for more information about a setting.'; +$txt['mods_cat_expand_all'] = '(expand all)'; + +$txt['mods_cat_features'] = 'Basic Forum Features'; +$txt['pollMode'] = 'Poll mode'; +$txt['smf34'] = 'Disable polls'; +$txt['smf32'] = 'Enable polls'; +$txt['smf33'] = 'Show existing polls as topics'; +$txt['enableStickyTopics'] = 'Enable sticky topics'; +$txt['allow_guestAccess'] = 'Allow guests to browse the forum'; +$txt['userLanguage'] = 'Enable user-selectable language support'; +$txt['allow_editDisplayName'] = 'Allow users to edit their displayed name?'; +$txt['allow_hideOnline'] = 'Allow non-administrators to hide their online status?'; +$txt['allow_hideEmail'] = 'Allow users to hide their email from everyone except admins?'; +$txt['guest_hideContacts'] = 'Do not reveal contact details of members to guests'; +$txt['titlesEnable'] = 'Enable custom titles'; +$txt['default_personalText'] = 'Default personal text'; +$txt['max_signatureLength'] = 'Maximum allowed characters in signatures
    (0 for no max.)
    '; +$txt['removeNestedQuotes'] = 'Remove nested quotes when posting'; +$txt['enableEmbeddedFlash'] = 'Embed flash into posts
    (may be a security risk!)
    '; +$txt['enablePostHTML'] = 'Enable basic HTML in posts'; +$txt['disabledBBC'] = 'Disabled BBC Code (comma separated)'; +$txt['enableBBC'] = 'Enable bulletin board code (BBC)'; +$txt['enableNewReplyWarning'] = 'Warn members of new replies made while posting?'; +$txt['max_messageLength'] = 'Maximum allowed characters in posts
    (0 for no max.)
    '; +$txt['number_format'] = 'Default number format'; +$txt['time_format'] = 'Default time format'; +$txt['time_offset'] = 'Overall time offset
    (added to the member specific option.)
    '; +$txt['spamWaitTime'] = 'Seconds required between posts from the same IP'; +$txt['edit_wait_time'] = 'Courtesy edit wait time'; +$txt['failed_login_threshold'] = 'Failed login threshold'; +$txt['lastActive'] = 'User online time threshold'; +$txt['enableSpellChecking'] = 'Enable spell checking
    (this does not work on all servers!)
    '; +$txt['trackStats'] = 'Track daily statistics'; +$txt['hitStats'] = 'Track daily hits (must have stats enabled)'; +$txt['enableCompressedOutput'] = 'Enable compressed output'; +$txt['databaseSession_enable'] = 'Use database driven sessions'; +$txt['databaseSession_loose'] = 'Allow browsers to go back to cached pages'; +$txt['databaseSession_lifetime'] = 'Seconds before an unused session timeout'; +$txt['enableErrorLogging'] = 'Enable error logging'; +$txt['cookieTime'] = 'Default login cookies length (in minutes)'; +$txt['localCookies'] = 'Enable local storage of cookies
    (SSI won\'t work well with this on.)
    '; +$txt['globalCookies'] = 'Use subdomain independent cookies
    (turn off local cookies first!)
    '; +$txt['redirectMetaRefresh'] = 'Use a META redirect instead of HTTP
    (for IIS 4.0 and some Apache versions.)
    '; +$txt['securityDisable'] = 'Disable administration security'; +$txt['registration_method'] = 'Method of registration employed for new members'; +$txt['registration_disabled'] = 'Registration Disabled'; +$txt['registration_standard'] = 'Immediate Registration'; +$txt['registration_activate'] = 'Member Activation'; +$txt['registration_approval'] = 'Member Approval'; +$txt['notify_on_new_registration'] = 'Notify administrators when a new member joins'; +$txt['send_validation_onChange'] = 'Require reactivation after email change'; +$txt['send_welcomeEmail'] = 'Send welcome email to new members'; +$txt['autoOptDatabase'] = 'Optimize tables every how many days?
    (0 to disable.)
    '; +$txt['autoOptMaxOnline'] = 'Maximum users online when optimizing
    (0 for no max.)
    '; +$txt['autoFixDatabase'] = 'Automatically fix broken tables'; +$txt['notifyAnncmnts_UserDisable'] = 'Allow users to disable announcements'; +$txt['modlog_enabled'] = 'Log moderation actions'; +$txt['queryless_urls'] = 'Search engine friendly URLs
    Apache only!
    '; +$txt['maxwidth'] = 'Max width of posted pictures (0 = disable)'; +$txt['maxheight'] = 'Max height of posted pictures (0 = disable)'; +$txt['mail_type'] = 'Mail type'; +$txt['smtp_host'] = 'SMTP server'; +$txt['smtp_port'] = 'SMTP port'; +$txt['smtp_username'] = 'SMTP username'; +$txt['smtp_password'] = 'SMTP password'; +$txt['xmlnews_enable'] = 'Enable XML/RSS news'; +$txt['xmlnews_maxlen'] = 'Maximum post length:
    (0 to disable, bad idea.)
    '; +$txt['recycle_enable'] = 'Enable recycling of deleted topics'; +$txt['recycle_board'] = 'Board for recycled topics'; + +$txt['mods_cat_layout'] = 'Layout and Options'; +$txt['compactTopicPagesEnable'] = 'Limit number of displayed page links'; +$txt['smf235'] = 'Contiguous pages to display:'; +$txt['smf236'] = 'to display'; +$txt['todayMod'] = 'Enable "Today" feature'; +$txt['smf290'] = 'Disabled'; +$txt['smf291'] = 'Only Today'; +$txt['smf292'] = 'Today & Yesterday'; +$txt['topbottomEnable'] = 'Enable Go Up/Go Down buttons'; +$txt['onlineEnable'] = 'Show online/offline in posts and PMs'; +$txt['enableVBStyleLogin'] = 'Show a quick login on every page'; +$txt['autoLinkUrls'] = 'Automatically link posted URLs'; +$txt['fixLongWords'] = 'Break up words with more letters than:
    (0 to disable)
    '; +$txt['defaultMaxTopics'] = 'Maximum topics to display in the message index'; +$txt['defaultMaxMessages'] = 'Maximum messages to display in a topic page'; +$txt['defaultMaxMembers'] = 'Members per page in member list'; +$txt['topicSummaryPosts'] = 'Posts to show on topic summary'; +$txt['enableAllMessages'] = 'Max number of replies in a topic to show "All" posts:
    (0 to never show "All")
    '; +$txt['hotTopicPosts'] = 'Number of posts for a hot topic'; +$txt['hotTopicVeryPosts'] = 'Number of posts for a very hot topic'; +$txt['enableParticipation'] = 'Enable participation icons'; +$txt['enablePreviousNext'] = 'Enable previous/next topic links'; +$txt['timeLoadPageEnable'] = 'Display time taken to create every page'; +$txt['disableHostnameLookup'] = 'Disable hostname lookups?'; +$txt['who_enabled'] = 'Enable who\'s online list'; + +$txt['mods_cat_search'] = 'Search'; +$txt['simpleSearch'] = 'Enable simple search'; +$txt['search_match_complete_words'] = 'Only search for complete word matches'; +$txt['disableTemporaryTables'] = 'Disable temporary tables
    (only check if use of temporary tables is not allowed)
    '; +$txt['search_results_per_page'] = 'Number of search results per page'; +$txt['search_cache_size'] = 'Maximum cached searches
    (0 to disable caching)
    '; +$txt['search_weight_frequency'] = 'Relative search weight for number of matching messages within a topic'; +$txt['search_weight_age'] = 'Relative search weight for age of last matching message'; +$txt['search_weight_length'] = 'Relative search weight for topic length'; +$txt['search_weight_subject'] = 'Relative search weight for a matching subject'; +$txt['search_weight_first_message'] = 'Relative search weight for a first message match'; + +$txt['mods_cat_avatars'] = 'Avatars'; +$txt['avatar_allow_server_stored'] = 'Allow members to select a server-stored avatar'; +$txt['avatar_directory'] = 'Avatars directory'; +$txt['avatar_url'] = 'Avatars URL'; +$txt['avatar_allow_external_url'] = 'Allow members to select an external avatar (using a URL)'; +$txt['avatar_max_width_external'] = 'Maximum width external avatar (0 = no limit)'; +$txt['avatar_max_height_external'] = 'Maximum height external avatar (0 = no limit)'; +$txt['avatar_check_size'] = 'Check the avatar size every time it is displayed'; +$txt['avatar_action_too_large'] = 'If the avatar is too large...'; +$txt['option_refuse'] = 'Refuse it'; +$txt['option_html_resize'] = 'Let the HTML resize it'; +$txt['option_download_and_resize'] = 'Download and resize it (requires GD module)'; +$txt['avatar_allow_upload'] = 'Allow members to upload their own avatars'; +$txt['avatar_max_width_upload'] = 'Maximum width of uploaded avatar (0 = no limit)'; +$txt['avatar_max_height_upload'] = 'Maximum height of uploaded avatar (0 = no limit)'; +$txt['avatar_resize_upload'] = 'Resize oversized large avatars (requires GD module)'; +$txt['avatar_download_png'] = 'Use PNG for resized avatars?'; + +$txt['smf294'] = 'Attachments'; +$txt['attachmentEnable'] = 'Attachments mode'; +$txt['smf111'] = 'Disable attachments|Enable all attachments|Disable new attachments'; +$txt['attachmentCheckExtensions'] = 'Check attachment\'s extension'; +$txt['attachmentExtensions'] = 'Allowed attachment extensions'; +$txt['attachmentShowImages'] = 'Display image attachments as pictures under post'; +$txt['attachmentEncryptFilenames'] = 'Encrypt stored filenames'; +$txt['attachmentUploadDir'] = 'Attachments directory'; +$txt['attachmentDirSizeLimit'] = 'Max attachment folder space (in KB)'; +$txt['attachmentPostLimit'] = 'Max attachment size per post (in KB)'; +$txt['attachmentSizeLimit'] = 'Max size per attachment (in KB)'; +$txt['attachmentNumPerPostLimit'] = 'Max number of attachments per post'; + +$txt['smf293'] = 'Karma'; +$txt['karmaMode'] = 'Karma mode'; +$txt['smf64'] = 'Disable karma|Enable karma total|Enable karma positive/negative'; +$txt['karmaMinPosts'] = 'Set the minimum posts needed to modify karma'; +$txt['karmaWaitTime'] = 'Set wait time in hours'; +$txt['karmaTimeRestrictAdmins'] = 'Restrict administrators to wait time'; +$txt['karmaLabel'] = 'Karma label'; +$txt['karmaApplaudLabel'] = 'Karma applaud label'; +$txt['karmaSmiteLabel'] = 'Karma smite label'; + +$txt['karmadescmod'] = 'Enable Karma Description Mod'; +$txt['karmamaxmembers'] = 'Members per page in Karma Description log'; +$txt['karmalogview'] = 'Use member names as link to their profiles'; +$txt['karmapermiss'] = 'Allow users view Karma Description log (See Permissions)'; +$txt['karmalinks'] = 'Enable karma links in users profiles'; +$txt['karmaisowner'] = 'Disable whole karma log for users but enable own karma log'; +$txt['karmakarma'] = 'Display users karma(+/-) in Karma Description Log'; +$txt['karmaurl'] = 'Enable "Where" field in Karma Description Log'; +$txt['karmaotherstat'] = 'Show other Karma Statistics'; +$txt['karmasurv'] = 'Applaud or smite users without explanation'; +$txt['karmawhatwrite'] = 'Write this in the log, when explanation is disabled'; +$txt['karmacensor'] = 'Censor karma explanation'; +$txt['karmatopicstarter'] = 'Users can change only topic starter karma'; + +$txt['googleMapsEnable'] = 'Enable the Google Member Map'; +$txt['googleMapsEnableLegend'] = 'Show a Pin Legend'; +$txt['googleSidebar'] = 'Where to show sidebar'; +$txt['googleMapsKey'] = 'The key from the Google Maps API Page'; +$txt['googleMapsPinGender'] = 'Should the pins reflect users gender?'; +$txt['googleMapsPinNumber'] = 'Number of max pins to show on map'; +$txt['googleMapsType'] = 'The map type to show'; +$txt['googleMapsDefaultLat'] = 'The default Latitude'; +$txt['googleMapsDefaultLong'] = 'The default Longitude'; +$txt['googleMapsDefaultZoom'] = 'The defualt Zoom'; +$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering'; +$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster'; +$txt['googleMapsMaxVisMarker'] = 'Maximum Visable Pins On Map'; +$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters'; +$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box'; +$txt['googleMapFO'] = 'Member Map'; + +$txt['mods_cat_calendar'] = 'Calendar'; +$txt['cal_enabled'] = 'Enable the calendar'; +$txt['cal_daysaslink'] = 'Show days as links to \'Post Event\''; +$txt['cal_showweeknum'] = 'Show week numbers'; +$txt['cal_days_for_index'] = 'Max days in advance on board index'; +$txt['cal_showholidaysonindex'] = 'Show holidays on board index'; +$txt['cal_showbdaysonindex'] = 'Show birthdays on board index'; +$txt['cal_showeventsonindex'] = 'Show events on board index'; +$txt['cal_defaultboard'] = 'Default board to post events in'; +$txt['cal_minyear'] = 'Minimum year'; +$txt['cal_maxyear'] = 'Maximum year'; +$txt['cal_bdaycolor'] = 'Birthday color'; +$txt['cal_eventcolor'] = 'Event color'; +$txt['cal_holidaycolor'] = 'Holiday color'; +$txt['cal_allowspan'] = 'Allow events to span multiple days'; +$txt['cal_maxspan'] = 'Max number of days an event can span'; + +$txt['MergePost_Headline'] = 'Doublepost Settings'; +$txt['MergePost_Automatic'] = 'Automatic merge new doubleposts'; +$txt['MergePost_AutomaticTime'] = 'Time between the posts with automatic merge, in seconds.(0 = everytime)'; +$txt['MergePost_AdminDoublePost'] = 'Merge new "Admin" doubleposts'; +$txt['MergePost_OldTimeAdd'] = 'Add not the Old time, before new post [hr] line'; +$txt['MergePost_NoHR'] = 'Show no splitline and no time on merged post'; +$txt['MergePost_IgnorePostLenth'] = 'Ignore the maximum post length'; +?> \ No newline at end of file diff --git a/Themes/fixed/languages/ModSettings.russian.php b/Themes/fixed/languages/ModSettings.russian.php new file mode 100644 index 0000000..46c1bc7 --- /dev/null +++ b/Themes/fixed/languages/ModSettings.russian.php @@ -0,0 +1,211 @@ + . , .'; +$txt['mods_cat_expand_all'] = '( )'; + +$txt['mods_cat_features'] = ' '; +$txt['pollMode'] = ' '; +$txt['smf34'] = ' '; +$txt['smf32'] = ' '; +$txt['smf33'] = ' '; +$txt['enableStickyTopics'] = ' '; +$txt['allow_guestAccess'] = ' '; +$txt['userLanguage'] = ' '; +$txt['allow_editDisplayName'] = ' ?'; +$txt['allow_hideOnline'] = ' online ?'; +$txt['allow_hideEmail'] = ' email , ?'; +$txt['guest_hideContacts'] = ' '; +$txt['titlesEnable'] = ' '; +$txt['default_personalText'] = ' '; +$txt['max_signatureLength'] = '
    (0 .)
    '; +$txt['removeNestedQuotes'] = ' '; +$txt['enableEmbeddedFlash'] = ' flash
    ( !)
    '; +$txt['enablePostHTML'] = ' basic HTML '; +$txt['disabledBBC'] = ' BBC ( )'; +$txt['enableBBC'] = ' bulletin board code (BBC)'; +$txt['enableNewReplyWarning'] = ' , ?'; +$txt['max_messageLength'] = '
    (0 - .)
    '; +$txt['number_format'] = ' '; +$txt['time_format'] = ' '; +$txt['time_offset'] = '
    ( .)
    '; +$txt['spamWaitTime'] = ' IP'; +$txt['edit_wait_time'] = ' '; +$txt['failed_login_threshold'] = ' '; +$txt['lastActive'] = ' '; +$txt['enableSpellChecking'] = '
    ( !)
    '; +$txt['trackStats'] = ' '; +$txt['hitStats'] = ' ( )'; +$txt['enableCompressedOutput'] = ' '; +$txt['databaseSession_enable'] = ' '; +$txt['databaseSession_loose'] = ' '; +$txt['databaseSession_lifetime'] = ', '; +$txt['enableErrorLogging'] = ' '; +$txt['cookieTime'] = ' cookies ( )'; +$txt['localCookies'] = ' cookies
    (SSI .)
    '; +$txt['globalCookies'] = ' cookies
    ( cookies !)
    '; +$txt['redirectMetaRefresh'] = ' META HTTP
    ( IIS 4.0 Apache .)
    '; +$txt['securityDisable'] = ' '; +$txt['registration_method'] = ' '; +$txt['registration_disabled'] = ' '; +$txt['registration_standard'] = ' '; +$txt['registration_activate'] = ' '; +$txt['registration_approval'] = ' '; +$txt['notify_on_new_registration'] = ' , '; +$txt['send_validation_onChange'] = ' , email'; +$txt['send_welcomeEmail'] = ' email '; +$txt['autoOptDatabase'] = ' ( ) ?
    (0 .)
    '; +$txt['autoOptMaxOnline'] = ' online
    (0 .)
    '; +$txt['autoFixDatabase'] = ' '; +$txt['notifyAnncmnts_UserDisable'] = ' '; +$txt['modlog_enabled'] = ' '; +$txt['queryless_urls'] = ' URLs
    Apache !
    '; +$txt['maxwidth'] = ' (0 = )'; +$txt['maxheight'] = ' (0 = )'; +$txt['mail_type'] = ' '; +$txt['smtp_host'] = 'SMTP '; +$txt['smtp_port'] = 'SMTP '; +$txt['smtp_username'] = 'SMTP '; +$txt['smtp_password'] = 'SMTP '; +$txt['xmlnews_enable'] = ' XML/RSS '; +$txt['xmlnews_maxlen'] = ' :
    (0 , .)
    '; +$txt['recycle_enable'] = ' '; +$txt['recycle_board'] = ' '; + +$txt['mods_cat_layout'] = ' '; +$txt['compactTopicPagesEnable'] = ' '; +$txt['smf235'] = ' :'; +$txt['smf236'] = ' '; +$txt['todayMod'] = ' ""'; +$txt['smf290'] = ''; +$txt['smf291'] = ' '; +$txt['smf292'] = ' & '; +$txt['topbottomEnable'] = ' /'; +$txt['onlineEnable'] = ' online/offline'; +$txt['enableVBStyleLogin'] = ' '; +$txt['autoLinkUrls'] = ' URLs'; +$txt['fixLongWords'] = ' :
    (0 )
    '; +$txt['defaultMaxTopics'] = ' '; +$txt['defaultMaxMessages'] = ' '; +$txt['defaultMaxMembers'] = ' '; +$txt['topicSummaryPosts'] = ' '; +$txt['enableAllMessages'] = ' "" :
    (0 "")
    '; +$txt['hotTopicPosts'] = ' '; +$txt['hotTopicVeryPosts'] = ' '; +$txt['enableParticipation'] = ' '; +$txt['enablePreviousNext'] = ' / '; +$txt['timeLoadPageEnable'] = ' '; +$txt['disableHostnameLookup'] = ' ?'; +$txt['who_enabled'] = ' online'; + +$txt['mods_cat_search'] = ''; +$txt['simpleSearch'] = ' '; +$txt['search_match_complete_words'] = ' '; +$txt['disableTemporaryTables'] = '
    ( , )
    '; +$txt['search_results_per_page'] = ' '; +$txt['search_cache_size'] = '
    (0 )
    '; +$txt['search_weight_frequency'] = ' '; +$txt['search_weight_age'] = ' '; +$txt['search_weight_length'] = ' '; +$txt['search_weight_subject'] = ' '; +$txt['search_weight_first_message'] = ' '; + +$txt['mods_cat_avatars'] = ''; +$txt['avatar_allow_server_stored'] = ' '; +$txt['avatar_directory'] = ' '; +$txt['avatar_url'] = 'URL '; +$txt['avatar_allow_external_url'] = ' ( URL)'; +$txt['avatar_max_width_external'] = ' (0 = )'; +$txt['avatar_max_height_external'] = ' (0 = )'; +$txt['avatar_check_size'] = ' , '; +$txt['avatar_action_too_large'] = ' ...'; +$txt['option_refuse'] = ' '; +$txt['option_html_resize'] = ' HTML '; +$txt['option_download_and_resize'] = ' ( GD )'; +$txt['avatar_allow_upload'] = ' '; +$txt['avatar_max_width_upload'] = ' (0 = )'; +$txt['avatar_max_height_upload'] = ' (0 = )'; +$txt['avatar_resize_upload'] = ' ( GD )'; +$txt['avatar_download_png'] = ' PNG ?'; + +$txt['smf294'] = ''; +$txt['attachmentEnable'] = ' '; +$txt['smf111'] = ' | | '; +$txt['attachmentCheckExtensions'] = ' '; +$txt['attachmentExtensions'] = ' '; +$txt['attachmentShowImages'] = ' '; +$txt['attachmentEncryptFilenames'] = ' '; +$txt['attachmentUploadDir'] = ' '; +$txt['attachmentDirSizeLimit'] = ' ( KB)'; +$txt['attachmentPostLimit'] = ' ( KB)'; +$txt['attachmentSizeLimit'] = ' ( KB)'; +$txt['attachmentNumPerPostLimit'] = ' '; + +$txt['smf293'] = ''; +$txt['karmaMode'] = ' '; +$txt['smf64'] = ' | | /'; +$txt['karmaMinPosts'] = ' '; +$txt['karmaWaitTime'] = ' '; +$txt['karmaTimeRestrictAdmins'] = ' '; +$txt['karmaLabel'] = ' '; +$txt['karmaApplaudLabel'] = ' '; +$txt['karmaSmiteLabel'] = ' '; + +$txt['googleMapsEnable'] = 'Enable the Google Member Map'; +$txt['googleMapsEnableLegend'] = 'Show a Pin Legend'; +$txt['googleSidebar'] = 'Where to show sidebar'; +$txt['googleMapsKey'] = 'The key from the Google Maps API Page'; +$txt['googleMapsPinGender'] = 'Should the pins reflect users gender?'; +$txt['googleMapsPinNumber'] = 'Number of max pins to show on map'; +$txt['googleMapsType'] = 'The map type to show'; +$txt['googleMapsDefaultLat'] = 'The default Latitude'; +$txt['googleMapsDefaultLong'] = 'The default Longitude'; +$txt['googleMapsDefaultZoom'] = 'The defualt Zoom'; +$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering'; +$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster'; +$txt['googleMapsMaxVisMarker'] = 'Maximum Visable Pins On Map'; +$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters'; +$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box'; +$txt['googleMapFO'] = 'Member Map'; + +$txt['mods_cat_calendar'] = ''; +$txt['cal_enabled'] = ' '; +$txt['cal_daysaslink'] = ' \' \''; +$txt['cal_showweeknum'] = ' '; +$txt['cal_days_for_index'] = ' '; +$txt['cal_showholidaysonindex'] = ' '; +$txt['cal_showbdaysonindex'] = ' '; +$txt['cal_showeventsonindex'] = ' '; +$txt['cal_defaultboard'] = ' '; +$txt['cal_minyear'] = ' '; +$txt['cal_maxyear'] = ' '; +$txt['cal_bdaycolor'] = ' '; +$txt['cal_eventcolor'] = ' '; +$txt['cal_holidaycolor'] = ' '; +$txt['cal_allowspan'] = ' '; +$txt['cal_maxspan'] = ' , '; + +$txt['smf293'] = 'Karma'; +$txt['karmaMode'] = 'Karma mode'; +$txt['smf64'] = 'Disable karma|Enable karma total|Enable karma positive/negative'; +$txt['karmaMinPosts'] = 'Set the minimum posts needed to modify karma'; +$txt['karmaWaitTime'] = 'Set wait time in hours'; +$txt['karmaTimeRestrictAdmins'] = 'Restrict administrators to wait time'; +$txt['karmaLabel'] = 'Karma label'; +$txt['karmaApplaudLabel'] = 'Karma applaud label'; +$txt['karmaSmiteLabel'] = 'Karma smite label'; + +$txt['karmadescmod'] = 'Enable Karma Description Mod'; +$txt['karmamaxmembers'] = 'Members per page in Karma Description log'; +$txt['karmalogview'] = 'Use member names as link to their profiles'; +$txt['karmapermiss'] = 'Allow users view Karma Description log (See Permissions)'; +$txt['karmalinks'] = 'Enable karma links in users profiles'; +$txt['karmaisowner'] = 'Disable whole karma log for users but enable own karma log'; +$txt['karmakarma'] = 'Display users karma(+/-) in Karma Description Log'; +$txt['karmaurl'] = 'Enable "Where" field in Karma Description Log'; +$txt['karmaotherstat'] = 'Show other Karma Statistics'; +$txt['karmasurv'] = 'Applaud or smite users without explanation'; +$txt['karmawhatwrite'] = 'Write this in the log, when explanation is disabled'; +$txt['karmacensor'] = 'Censor karma explanation'; +$txt['karmatopicstarter'] = 'Users can change only topic starter karma'; +?> diff --git a/Themes/fixed/languages/Modifications.english.php b/Themes/fixed/languages/Modifications.english.php new file mode 100755 index 0000000..5f11ec8 --- /dev/null +++ b/Themes/fixed/languages/Modifications.english.php @@ -0,0 +1,122 @@ +Click here to go place your pin if you have not already.'; +$txt['googleMapDisclaimer'] = 'Place your pin as close as you feel comfortable doing so.'; +$txt['cannot_googleMap_view'] = 'Sorry, you\'re not allowed to view the Member Map.'; +$txt['permissionname_googleMap_view'] = 'View Member Map'; +$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map. If not set, the people will not see the map.'; +$txt['cannot_googleMap_place'] = 'Sorry, you\'re not allowed to place a pin for the Member Map.'; +$txt['permissionname_googleMap_place'] = 'Place Pin on Member Map'; +$txt['permissionhelp_googleMap_place'] = 'Allow the people place there pin the Member Map. If not set, the people will not be able to place there pins.'; + +// Now Playing Mod +$txt['nowplaying1'] = "Now Playing"; +$txt['nowplaying2'] = "Now Playing: What are you listening to? [optional]"; +$txt['nowplaying3'] = "Now Playing: "; +$txt['nowplayingEnabled'] = "Enable 'Now Playing'?"; +$txt['nowplaying_image'] = "Now Playing Image: "; +$txt['nowplaying_text'] = "Now Playing Text: "; + +// OB - Googlebot - Begin + +// Boardindex Strings +$txt['ob_googlebot_modname'] = 'Googlebot & Spiders'; +$txt['ob_googlebot_spider'] = 'Spider'; +$txt['ob_googlebot_spiders'] = 'Spiders'; +$txt['ob_googlebot_spiders_last_active'] = 'Spiders active in past ' . $modSettings['lastActive'] . ' minutes'; + +// ModSettings +$txt['ob_googlebot_count_all_instances'] = 'Count all instances of same spider'; +$txt['ob_googlebot_display_all_instances'] = 'Display all instances of same spider
    ("' . $txt['ob_googlebot_count_all_instances'] . '" must be selected)
    '; +$txt['ob_googlebot_display_agent'] = 'Display agent instead of name'; +$txt['ob_googlebot_display_own_list'] = 'Display spiders in its own list'; +$txt['ob_googlebot_count_most_online'] = 'Count in "Most Online"'; + +// Permissions +$txt['permissiongroup_googlebot'] = $txt['ob_googlebot_modname']; +$txt['permissionname_googlebot_view'] = 'View Googlebot & Spiders'; + +// OB - Googlebot - End + +$txt['visual_warning_mod']='Visual Warning Mod'; +$txt['visualw_mess_ban']='Message To Show For Banned User'; +$txt['visualw_mess_mute']='Message To Show For Muted User'; +$txt['visualw_mess_pmod']='Message To Show For Post Moderated User'; +$txt['visualw_mess_warn']='Message To Show For Warned User'; +$txt['visualw_color_ban']='Color of Message For Banned User'; +$txt['visualw_color_mute']='Color of Message For Muted User'; +$txt['visualw_color_pmod']='Color of Message For Post Moderated User'; +$txt['visualw_color_warn']='Color of Message For Warned User'; +$txt['visualw_image_ban']='Image to Show For Banned User'; +$txt['visualw_image_mute']='Image to Show For Muted User'; +$txt['visualw_image_pmod']='Image to Show For Post Moderated User'; +$txt['visualw_image_warn']='Image to Show For Warned User'; +$txt['warningAutoTime']='Default Time Before Warning Removed (Days):'; +$txt['moderationAutoTime']='Default Time Before Moderation Removed (Days):'; +$txt['muteAutoTime']='Default Time Before Mute Removed (Days):'; +$txt['visualw_pmod_edit']='Moderated Users May Edit Messages:'; +$txt['visual_require_mod'] = 'messages require moderation'; +$txt['visual_raise']='Raise Warning Level'; +$txt['visual_no_perm']='You Do Not Have Permission To Raise Warning Levels'; +$txt['visual_no_warnings']='User has NO Current Warnings!'; +$txt['visual_prev_warning']='Previous Warning Details'; +$txt['visual_current_level']='Current Level:'; +$txt['visual_topic_raised']='Topic Where Raised:'; +$txt['visual_time_raised']='Time When Raised:'; +$txt['visual_reason_raised']='Reason For Raise:'; +$txt['visual_level_details']='New Level Details'; +$txt['visual_submit']='Submit'; +$txt['visual_new_level']='New Level:'; +$txt['visual_warning_management']='Warning Management'; +$txt['visual_list_desc']='This lists all users that currently have some form of warning (levels 1,2 or 3. Level 4 is not listed as these members have already been banned! You can choose to mass reduce members here or click the member to adjust level accordingly'; +$txt['visual_member']='Member'; +$txt['visual_level']='Level'; +$txt['visual_reason']='Reason'; +$txt['visual_when']='When'; +$txt['visual_text_warn']='Warned'; +$txt['visual_warn']='Warn'; +$txt['visual_perm_modify']='You Do Not Have Permission To Modify This Message'; +$txt['visual_official_warning']='You Have Received an Offical Warning'; +$txt['visual_received_warning']='You have received a warning for recent conduct on our message board. Please follow the link below for more information:'; +$txt['visual_been_muted']='You Have Been Muted Due To Bad Behaviour'; +$txt['visual_no_karma']='You May Not Give Karma Whilst Warned'; +$txt['visual_stages']='(0=None, 1=Warned, 2=Moderated, 3=Muted. 4=Banned)'; +$txt['visual_text_pmod']='Moderated'; +$txt['visual_text_mute']='Muted'; +$txt['visual_text_ban']='Banned'; +$txt['visual_none']='None'; +$txt['visual_warning_increased']='I have to inform you that your warning level on the board has been increased.'; +$txt['visual_warning_reduced']='I am pleased to announce that your warning level on the board has been reduced.'; +$txt['visual_reduced']='Warning level reduced'; +$txt['visual_lasts']='Time Warning Lasts (Blank=Default)'; +$txt['visual_postmod_manager']='Post Moderation Manager'; +$txt['visual_postmod_user_under']='This User Is Currently Having All Theirs Posts Approved Before Posting'; +$txt['visual_postmod_under']='You Are Currently Under Post Moderation'; +$txt['visual_postmod_not']='This User Is Not Post Moderated'; +$txt['visual_postmod_is']='This User Is Post Moderated'; +$txt['visual_postmod_change']='Change This User\'s Status'; +$txt['visual_postmod']='Post Moderation'; +$txt['visual_postmod_auth']='You are not authorised to perform this action!'; +$txt['visual_postmod_appear']='You Are Currently Under Post Moderation - Your Post Will Appear After Approval'; +$txt['visual_postmod_awaiting']='These are all the posts awaiting moderation. To approve a posts (or posts) check all the messages you wish to approve and select "Approve" to delete messages off select those messages you wish to delete and select "Delete"'; +$txt['visual_postmod_username']='Username'; +$txt['visual_postmod_subject']='Subject/Message'; +$txt['visual_postmod_approve']='Approve'; +$txt['visual_postmod_delete']='Delete'; +$txt['permissiongroup_visual_warn']='Give warnings and perform post moderation'; +$txt['permissionname_visual_warn_any']='Warn users'; +$txt['permissionname_visual_approve_any']='Approve posts'; +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Modifications.english.php~ b/Themes/fixed/languages/Modifications.english.php~ new file mode 100644 index 0000000..daf1cbf --- /dev/null +++ b/Themes/fixed/languages/Modifications.english.php~ @@ -0,0 +1,119 @@ +Click here to go place your pin if you have not already.'; +$txt['googleMapDisclaimer'] = 'Place your pin as close as you feel comfortable doing so.'; +$txt['cannot_googleMap_view'] = 'Sorry, you\'re not allowed to view the Member Map.'; +$txt['permissionname_googleMap_view'] = 'View Member Map'; +$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map. If not set, the people will not see the map.'; +$txt['cannot_googleMap_place'] = 'Sorry, you\'re not allowed to place a pin for the Member Map.'; +$txt['permissionname_googleMap_place'] = 'Place Pin on Member Map'; +$txt['permissionhelp_googleMap_place'] = 'Allow the people place there pin the Member Map. If not set, the people will not be able to place there pins.'; + +// Now Playing Mod +$txt['nowplaying1'] = "Now Playing"; +$txt['nowplaying2'] = "Now Playing: What are you listening to? [optional]"; +$txt['nowplaying3'] = "Now Playing: "; +$txt['nowplayingEnabled'] = "Enable 'Now Playing'?"; +$txt['nowplaying_image'] = "Now Playing Image: "; +$txt['nowplaying_text'] = "Now Playing Text: "; + +// OB - Googlebot - Begin + +// Boardindex Strings +$txt['ob_googlebot_modname'] = 'Googlebot & Spiders'; +$txt['ob_googlebot_spider'] = 'Spider'; +$txt['ob_googlebot_spiders'] = 'Spiders'; +$txt['ob_googlebot_spiders_last_active'] = 'Spiders active in past ' . $modSettings['lastActive'] . ' minutes'; + +// ModSettings +$txt['ob_googlebot_count_all_instances'] = 'Count all instances of same spider'; +$txt['ob_googlebot_display_all_instances'] = 'Display all instances of same spider
    ("' . $txt['ob_googlebot_count_all_instances'] . '" must be selected)
    '; +$txt['ob_googlebot_display_agent'] = 'Display agent instead of name'; +$txt['ob_googlebot_display_own_list'] = 'Display spiders in its own list'; +$txt['ob_googlebot_count_most_online'] = 'Count in "Most Online"'; + +// Permissions +$txt['permissiongroup_googlebot'] = $txt['ob_googlebot_modname']; +$txt['permissionname_googlebot_view'] = 'View Googlebot & Spiders'; + +// OB - Googlebot - End + +$txt['visual_warning_mod']='Visual Warning Mod'; +$txt['visualw_mess_ban']='Message To Show For Banned User'; +$txt['visualw_mess_mute']='Message To Show For Muted User'; +$txt['visualw_mess_pmod']='Message To Show For Post Moderated User'; +$txt['visualw_mess_warn']='Message To Show For Warned User'; +$txt['visualw_color_ban']='Color of Message For Banned User'; +$txt['visualw_color_mute']='Color of Message For Muted User'; +$txt['visualw_color_pmod']='Color of Message For Post Moderated User'; +$txt['visualw_color_warn']='Color of Message For Warned User'; +$txt['visualw_image_ban']='Image to Show For Banned User'; +$txt['visualw_image_mute']='Image to Show For Muted User'; +$txt['visualw_image_pmod']='Image to Show For Post Moderated User'; +$txt['visualw_image_warn']='Image to Show For Warned User'; +$txt['warningAutoTime']='Default Time Before Warning Removed (Days):'; +$txt['moderationAutoTime']='Default Time Before Moderation Removed (Days):'; +$txt['muteAutoTime']='Default Time Before Mute Removed (Days):'; +$txt['visualw_pmod_edit']='Moderated Users May Edit Messages:'; +$txt['visual_require_mod'] = 'messages require moderation'; +$txt['visual_raise']='Raise Warning Level'; +$txt['visual_no_perm']='You Do Not Have Permission To Raise Warning Levels'; +$txt['visual_no_warnings']='User has NO Current Warnings!'; +$txt['visual_prev_warning']='Previous Warning Details'; +$txt['visual_current_level']='Current Level:'; +$txt['visual_topic_raised']='Topic Where Raised:'; +$txt['visual_time_raised']='Time When Raised:'; +$txt['visual_reason_raised']='Reason For Raise:'; +$txt['visual_level_details']='New Level Details'; +$txt['visual_submit']='Submit'; +$txt['visual_new_level']='New Level:'; +$txt['visual_warning_management']='Warning Management'; +$txt['visual_list_desc']='This lists all users that currently have some form of warning (levels 1,2 or 3. Level 4 is not listed as these members have already been banned! You can choose to mass reduce members here or click the member to adjust level accordingly'; +$txt['visual_member']='Member'; +$txt['visual_level']='Level'; +$txt['visual_reason']='Reason'; +$txt['visual_when']='When'; +$txt['visual_text_warn']='Warned'; +$txt['visual_warn']='Warn'; +$txt['visual_perm_modify']='You Do Not Have Permission To Modify This Message'; +$txt['visual_official_warning']='You Have Received an Offical Warning'; +$txt['visual_received_warning']='You have received a warning for recent conduct on our message board. Please follow the link below for more information:'; +$txt['visual_been_muted']='You Have Been Muted Due To Bad Behaviour'; +$txt['visual_no_karma']='You May Not Give Karma Whilst Warned'; +$txt['visual_stages']='(0=None, 1=Warned, 2=Moderated, 3=Muted. 4=Banned)'; +$txt['visual_text_pmod']='Moderated'; +$txt['visual_text_mute']='Muted'; +$txt['visual_text_ban']='Banned'; +$txt['visual_none']='None'; +$txt['visual_warning_increased']='I have to inform you that your warning level on the board has been increased.'; +$txt['visual_warning_reduced']='I am pleased to announce that your warning level on the board has been reduced.'; +$txt['visual_reduced']='Warning level reduced'; +$txt['visual_lasts']='Time Warning Lasts (Blank=Default)'; +$txt['visual_postmod_manager']='Post Moderation Manager'; +$txt['visual_postmod_user_under']='This User Is Currently Having All Theirs Posts Approved Before Posting'; +$txt['visual_postmod_under']='You Are Currently Under Post Moderation'; +$txt['visual_postmod_not']='This User Is Not Post Moderated'; +$txt['visual_postmod_is']='This User Is Post Moderated'; +$txt['visual_postmod_change']='Change This User\'s Status'; +$txt['visual_postmod']='Post Moderation'; +$txt['visual_postmod_auth']='You are not authorised to perform this action!'; +$txt['visual_postmod_appear']='You Are Currently Under Post Moderation - Your Post Will Appear After Approval'; +$txt['visual_postmod_awaiting']='These are all the posts awaiting moderation. To approve a posts (or posts) check all the messages you wish to approve and select "Approve" to delete messages off select those messages you wish to delete and select "Delete"'; +$txt['visual_postmod_username']='Username'; +$txt['visual_postmod_subject']='Subject/Message'; +$txt['visual_postmod_approve']='Approve'; +$txt['visual_postmod_delete']='Delete'; +$txt['permissiongroup_visual_warn']='Give warnings and perform post moderation'; +$txt['permissionname_visual_warn_any']='Warn users'; +$txt['permissionname_visual_approve_any']='Approve posts'; +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Modifications.russian.php b/Themes/fixed/languages/Modifications.russian.php new file mode 100644 index 0000000..780f4df --- /dev/null +++ b/Themes/fixed/languages/Modifications.russian.php @@ -0,0 +1,119 @@ + '; +$txt['googleMapDisclaimer'] = ' , (, , ). , .'; +$txt['cannot_googleMap_view'] = ', '; +$txt['permissionname_googleMap_view'] = ' '; +$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map. If not set, the people will not see the map.'; +$txt['cannot_googleMap_place'] = ', '; +$txt['permissionname_googleMap_place'] = ' '; +$txt['permissionhelp_googleMap_place'] = 'Allow the people place there pin the Member Map. If not set, the people will not be able to place there pins.'; + +// Now Playing Mod +$txt['nowplaying1'] = "Now Playing"; +$txt['nowplaying2'] = " : ? [ ]"; +$txt['nowplaying3'] = " : "; +$txt['nowplayingEnabled'] = "Enable 'Now Playing'?"; +$txt['nowplaying_image'] = "Now Playing Image: "; +$txt['nowplaying_text'] = "Now Playing Text: "; + +// OB - Googlebot - Begin + +// Boardindex Strings +$txt['ob_googlebot_modname'] = 'Googlebot & Spiders'; +$txt['ob_googlebot_spider'] = 'Spider'; +$txt['ob_googlebot_spiders'] = 'Spiders'; +$txt['ob_googlebot_spiders_last_active'] = 'Spiders active in past ' . $modSettings['lastActive'] . ' minutes'; + +// ModSettings +$txt['ob_googlebot_count_all_instances'] = 'Count all instances of same spider'; +$txt['ob_googlebot_display_all_instances'] = 'Display all instances of same spider
    ("' . $txt['ob_googlebot_count_all_instances'] . '" must be selected)
    '; +$txt['ob_googlebot_display_agent'] = 'Display agent instead of name'; +$txt['ob_googlebot_display_own_list'] = 'Display spiders in its own list'; +$txt['ob_googlebot_count_most_online'] = 'Count in "Most Online"'; + +// Permissions +$txt['permissiongroup_googlebot'] = $txt['ob_googlebot_modname']; +$txt['permissionname_googlebot_view'] = 'View Googlebot & Spiders'; + +// OB - Googlebot - End +$txt['visual_warning_mod']='Visual Warning Mod'; +$txt['visualw_mess_ban']='Message To Show For Banned User'; +$txt['visualw_mess_mute']='Message To Show For Muted User'; +$txt['visualw_mess_pmod']='Message To Show For Post Moderated User'; +$txt['visualw_mess_warn']='Message To Show For Warned User'; +$txt['visualw_color_ban']='Color of Message For Banned User'; +$txt['visualw_color_mute']='Color of Message For Muted User'; +$txt['visualw_color_pmod']='Color of Message For Post Moderated User'; +$txt['visualw_color_warn']='Color of Message For Warned User'; +$txt['visualw_image_ban']='Image to Show For Banned User'; +$txt['visualw_image_mute']='Image to Show For Muted User'; +$txt['visualw_image_pmod']='Image to Show For Post Moderated User'; +$txt['visualw_image_warn']='Image to Show For Warned User'; +$txt['warningAutoTime']='Default Time Before Warning Removed (Days):'; +$txt['moderationAutoTime']='Default Time Before Moderation Removed (Days):'; +$txt['muteAutoTime']='Default Time Before Mute Removed (Days):'; +$txt['visualw_pmod_edit']='Moderated Users May Edit Messages:'; +$txt['visual_require_mod'] = 'messages require moderation'; +$txt['visual_raise']='Raise Warning Level'; +$txt['visual_no_perm']='You Do Not Have Permission To Raise Warning Levels'; +$txt['visual_no_warnings']='User has NO Current Warnings!'; +$txt['visual_prev_warning']='Previous Warning Details'; +$txt['visual_current_level']='Current Level:'; +$txt['visual_topic_raised']='Topic Where Raised:'; +$txt['visual_time_raised']='Time When Raised:'; +$txt['visual_reason_raised']='Reason For Raise:'; +$txt['visual_level_details']='New Level Details'; +$txt['visual_submit']='Submit'; +$txt['visual_new_level']='New Level:'; +$txt['visual_warning_management']='Warning Management'; +$txt['visual_list_desc']='This lists all users that currently have some form of warning (levels 1,2 or 3. Level 4 is not listed as these members have already been banned! You can choose to mass reduce members here or click the member to adjust level accordingly'; +$txt['visual_member']='Member'; +$txt['visual_level']=''; +$txt['visual_reason']=''; +$txt['visual_when']=''; +$txt['visual_text_warn']=''; +$txt['visual_warn']='Warn'; +$txt['visual_perm_modify']='You Do Not Have Permission To Modify This Message'; +$txt['visual_official_warning']='You Have Received an Offical Warning'; +$txt['visual_received_warning']='You have received a warning for recent conduct on our message board. Please follow the link below for more information:'; +$txt['visual_been_muted']='You Have Been Muted Due To Bad Behaviour'; +$txt['visual_no_karma']='You May Not Give Karma Whilst Warned'; +$txt['visual_stages']='(0= , 1=, 2=, 3= . 4=)'; +$txt['visual_text_pmod']=''; +$txt['visual_text_mute']=' '; +$txt['visual_text_ban']=''; +$txt['visual_none']='None'; +$txt['visual_warning_increased']='I have to inform you that your warning level on the board has been increased.'; +$txt['visual_warning_reduced']='I am pleased to announce that your warning level on the board has been reduced.'; +$txt['visual_reduced']='Warning level reduced'; +$txt['visual_lasts']='Time Warning Lasts (Blank=Default)'; +$txt['visual_postmod_manager']='Post Moderation Manager'; +$txt['visual_postmod_user_under']='This User Is Currently Having All Theirs Posts Approved Before Posting'; +$txt['visual_postmod_under']='You Are Currently Under Post Moderation'; +$txt['visual_postmod_not']='This User Is Not Post Moderated'; +$txt['visual_postmod_is']='This User Is Post Moderated'; +$txt['visual_postmod_change']='Change This User\'s Status'; +$txt['visual_postmod']='Post Moderation'; +$txt['visual_postmod_auth']='You are not authorised to perform this action!'; +$txt['visual_postmod_appear']='You Are Currently Under Post Moderation - Your Post Will Appear After Approval'; +$txt['visual_postmod_awaiting']='These are all the posts awaiting moderation. To approve a posts (or posts) check all the messages you wish to approve and select "Approve" to delete messages off select those messages you wish to delete and select "Delete"'; +$txt['visual_postmod_username']='Username'; +$txt['visual_postmod_subject']='Subject/Message'; +$txt['visual_postmod_approve']='Approve'; +$txt['visual_postmod_delete']='Delete'; +$txt['permissiongroup_visual_warn']='Give warnings and perform post moderation'; +$txt['permissionname_visual_warn_any']='Warn users'; +$txt['permissionname_visual_approve_any']='Approve posts'; +$txt['make_first_sticky']=' '; + +$txt['link_topics']=' '; +$txt['link_topics_explain']=' "", " " '; +$txt['related_topics']=' :'; +?> diff --git a/Themes/fixed/languages/Packages.english.php b/Themes/fixed/languages/Packages.english.php new file mode 100644 index 0000000..02f3f66 --- /dev/null +++ b/Themes/fixed/languages/Packages.english.php @@ -0,0 +1,139 @@ +File not found'; +$txt['package_action_error'] = 'Modification parse error'; +$txt['package_action_failure'] = 'Failure'; +$txt['package_action_success'] = 'Success'; + +$txt['package_uninstall_actions'] = 'Uninstall Actions'; +$txt['package_uninstall_done'] = 'The package has been uninstalled, it should no longer take effect.'; +$txt['package_uninstall_cannot'] = 'This package cannot be uninstalled, because there is no uninstaller!

    Please contact the mod author for more information.'; + +$txt['package_install_options'] = 'Installation Options'; +$txt['package_install_options_ftp_why'] = 'Using FTP is the easiest way to get around having to manually chmod the files writable by FTP yourself for the package manager to work.
    Here you can set the default values for some fields.'; +$txt['package_install_options_ftp_server'] = 'FTP Server'; +$txt['package_install_options_ftp_port'] = 'Port'; +$txt['package_install_options_ftp_user'] = 'Username'; +$txt['package_install_options_make_backups'] = 'Create Backup versions of replaced files with a tilda (~) on the end of their names.'; + +$txt['package_ftp_necessary'] = 'FTP Information Required'; +$txt['package_ftp_why'] = 'Some of the files this package needs to modify are not writable. This needs to be changed by logging into FTP and chmoding the files.'; +$txt['package_ftp_why_download'] = 'To download packages, the Packages directory and files in it need to be writable - and they are not currently. The package manager can use your FTP information to fix this.'; +$txt['package_ftp_server'] = 'FTP Server'; +$txt['package_ftp_port'] = 'Port'; +$txt['package_ftp_username'] = 'Username'; +$txt['package_ftp_password'] = 'Password'; +$txt['package_ftp_path'] = 'Local path to SMF'; + +// For a break, use \\n instead of
    ... and don't use entities. +$txt['package_delete_bad'] = 'The package you are about to delete is currently installed! If you delete it, you may not be able to uninstall it later.\\n\\nAre you sure?'; + +$txt['package_examine_file'] = 'View file in package'; +$txt['package_file_contents'] = 'Contents of file'; + +$txt['package_upload_title'] = 'Upload a Package'; +$txt['package_upload_select'] = 'Package to Upload'; +$txt['package_upload'] = 'Upload'; +$txt['package_upload_error_supports'] = 'The package manager currently allows only these file types: '; +$txt['package_upload_error_broken'] = 'The package you tried to upload either is not a valid package or has become corrupted.'; +$txt['package_uploaded_success'] = 'Package uploaded successfully'; +$txt['package_uploaded_successfully'] = 'The package has been uploaded successfully'; + +$txt['package_modification_malformed'] = 'Malformed or invalid modification file.'; +$txt['package_modification_missing'] = 'The file could not be found.'; +$txt['package_no_zlib'] = 'Sorry, your PHP configuration doesn\'t have support for zlib. Without this, the package manager cannot function. Please contact your host about this for more information.'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Packages.russian.php b/Themes/fixed/languages/Packages.russian.php new file mode 100644 index 0000000..6acff04 --- /dev/null +++ b/Themes/fixed/languages/Packages.russian.php @@ -0,0 +1,139 @@ + '; +$txt['package_action_error'] = ' '; +$txt['package_action_failure'] = ''; +$txt['package_action_success'] = ''; + +$txt['package_uninstall_actions'] = ' '; +$txt['package_uninstall_done'] = ' , .'; +$txt['package_uninstall_cannot'] = ' , !

    , .'; + +$txt['package_install_options'] = ' '; +$txt['package_install_options_ftp_why'] = ' FTP chmod FTP .
    .'; +$txt['package_install_options_ftp_server'] = 'FTP '; +$txt['package_install_options_ftp_port'] = ''; +$txt['package_install_options_ftp_user'] = ' '; +$txt['package_install_options_make_backups'] = ' (~) .'; + +$txt['package_ftp_necessary'] = ' FTP '; +$txt['package_ftp_why'] = ' , . FTP CHMOD .'; +$txt['package_ftp_why_download'] = ' , - . FTP , .'; +$txt['package_ftp_server'] = 'FTP '; +$txt['package_ftp_port'] = ''; +$txt['package_ftp_username'] = ' '; +$txt['package_ftp_password'] = ''; +$txt['package_ftp_path'] = ' SMF'; + +// For a break, use \\n instead of
    ... and don't use entities. +$txt['package_delete_bad'] = ', ! , .\\n\\n ?'; + +$txt['package_examine_file'] = ' '; +$txt['package_file_contents'] = ' '; + +$txt['package_upload_title'] = ' '; +$txt['package_upload_select'] = ' '; +$txt['package_upload'] = ''; +$txt['package_upload_error_supports'] = ' : '; +$txt['package_upload_error_broken'] = ', .'; +$txt['package_uploaded_success'] = ' '; +$txt['package_uploaded_successfully'] = ' '; + +$txt['package_modification_malformed'] = ' .'; +$txt['package_modification_missing'] = ' .'; +$txt['package_no_zlib'] = ', PHP zlib. , . , .'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/PersonalMessage.english.php b/Themes/fixed/languages/PersonalMessage.english.php new file mode 100644 index 0000000..7e8a0d0 --- /dev/null +++ b/Themes/fixed/languages/PersonalMessage.english.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/Themes/fixed/languages/Post.english.php b/Themes/fixed/languages/Post.english.php new file mode 100644 index 0000000..ee00b07 --- /dev/null +++ b/Themes/fixed/languages/Post.english.php @@ -0,0 +1,173 @@ +Only admins and moderators can reply.'; + +$txt['notifyXAnn2'] = 'New announcement'; +$txt['notifyXAnn3'] = 'View it at'; +$txt['notifyXOnce2'] = 'More replies may be posted, but you won\'t receive any more notifications until you read the topic.'; + +$txt['rtm2'] = 'Enter comment'; +$txt['rtm3'] = 'Reported post'; +$txt['rtm4'] = 'by'; +$txt['rtm10'] = 'Submit'; +$txt['rtm_email1'] = 'The following post, "%s" by'; +$txt['rtm_email2'] = 'has been reported by'; +$txt['rtm_email3'] = 'on a board you moderate'; +$txt['rtm_email_comment'] = 'The reporter has made the following comment'; + +$txt['attach_preview'] = 'You may need to reattach any files you attached, such as'; +$txt['maxAttachPerPost'] = 'per post'; + +$txt['post_additionalopt'] = 'Additional Options...'; +$txt['sticky_after2'] = 'Sticky this topic.'; +$txt['move_after2'] = 'Move this topic.'; +$txt['back_to_topic'] = 'Return to this topic.'; + +$txt['retrieving_quote'] = 'Retrieving Quote...'; + +$txt['poll_options'] = 'Poll Options'; +$txt['poll_options1a'] = 'Run the poll for'; +$txt['poll_options1b'] = 'days. (leave blank for no limit)'; +$txt['poll_options2'] = 'Show the poll\'s results to anyone.'; +$txt['poll_options3'] = 'Only show the results after someone has voted.'; +$txt['poll_options4'] = 'Only show the results after the poll has expired.'; +$txt['poll_options5'] = 'Maximum votes per user.'; +$txt['poll_options7'] = 'Allow user to change vote.'; +$txt['poll_error1'] = 'You selected too many options - maximum allowed is %s'; +$txt['poll_add_option'] = 'Add Option'; + +$txt['spellcheck_done'] = 'Spell checking complete.'; +$txt['spellcheck_change_to'] = 'Change To:'; +$txt['spellcheck_suggest'] = 'Suggestions:'; +$txt['spellcheck_change'] = 'Change'; +$txt['spellcheck_change_all'] = 'Change All'; +$txt['spellcheck_ignore'] = 'Ignore'; +$txt['spellcheck_ignore_all'] = 'Ignore All'; + +$txt['attach_lose'] = 'You will have to reattach any attachments, continue with preview?'; +$txt['more_attachments'] = 'more attachments'; +// Don't use entities in the below string. +$txt['more_attachments_error'] = 'Sorry, you aren\'t allowed to post any more attachments.'; + +$txt['more_smileys'] = 'more'; +$txt['more_smileys_title'] = 'Additional smileys'; +$txt['more_smileys_pick'] = 'Pick a smiley'; +$txt['more_smileys_close_window'] = 'Close Window'; + +$txt['error_new_reply'] = 'Warning - while you were typing a new reply has been posted. You may wish to review your post.'; +$txt['error_new_replies'] = 'Warning - while you were typing %d new replies have been posted. You may wish to review your post.'; +$txt['error_new_reply_reading'] = 'Warning - while you were reading a new reply has been posted. You may wish to review your post.'; +$txt['error_new_replies_reading'] = 'Warning - while you were reading %d new replies have been posted. You may wish to review your post.'; + +$txt['notification_reply_subject'] = 'Topic reply: %s'; +$txt['notification_reply'] = 'A reply has been posted to a topic you are watching by %s.' . "\n\n" . 'View the reply at: '; +$txt['notification_sticky_subject'] = 'Topic stickied: %s'; +$txt['notification_sticky'] = 'A topic you are watching has been marked as a sticky topic by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_lock_subject'] = 'Topic locked: %s'; +$txt['notification_lock'] = 'A topic you are watching has been locked by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_unlock_subject'] = 'Topic unlocked: %s'; +$txt['notification_unlock'] = 'A topic you are watching has been unlocked by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_remove_subject'] = 'Topic removed: %s'; +$txt['notification_remove'] = 'A topic you are watching has been removed by %s.'; +$txt['notification_move_subject'] = 'Topic moved: %s'; +$txt['notification_move'] = 'A topic you are watching has been moved to another board by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_merge_subject'] = 'Topic merged: %s'; +$txt['notification_merge'] = 'A topic you are watching has been merged with another topic by %s.' . "\n\n" . 'View the new merged topic at: '; +$txt['notification_split_subject'] = 'Topic split: %s'; +$txt['notification_split'] = 'A topic you are watching has been split into two or more topics by %s.' . "\n\n" . 'View what remains of this topic at: '; + +$txt['announce_this_topic'] = 'Send an announce about this topic to the members:'; +$txt['announce_title'] = 'Send an announcement'; +$txt['announce_desc'] = 'This form allows you to send an announcement to the selected membergroups about this topic.'; +$txt['announce_sending'] = 'Sending announcement of topic'; +$txt['announce_done'] = 'done'; +$txt['announce_continue'] = 'Continue'; +$txt['announce_topic'] = 'Announce topic.'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Post.russian.php b/Themes/fixed/languages/Post.russian.php new file mode 100644 index 0000000..763c2b4 --- /dev/null +++ b/Themes/fixed/languages/Post.russian.php @@ -0,0 +1,173 @@ + .'; + +$txt['notifyXAnn2'] = ' '; +$txt['notifyXAnn3'] = ''; +$txt['notifyXOnce2'] = ' , , .'; + +$txt['rtm2'] = ' '; +$txt['rtm3'] = ' '; +$txt['rtm4'] = ''; +$txt['rtm10'] = ''; +$txt['rtm_email1'] = ' , "%s" '; +$txt['rtm_email2'] = ' '; +$txt['rtm_email3'] = ' , '; +$txt['rtm_email_comment'] = ' '; + +$txt['attach_preview'] = ' : '; +$txt['maxAttachPerPost'] = ' '; + +$txt['post_additionalopt'] = ' ...'; +$txt['sticky_after2'] = ' .'; +$txt['move_after2'] = ' .'; +$txt['back_to_topic'] = ' .'; + +$txt['retrieving_quote'] = ' ... .'; + +$txt['poll_options'] = ' '; +$txt['poll_options1a'] = ' '; +$txt['poll_options1b'] = '. ( )'; +$txt['poll_options2'] = ' .'; +$txt['poll_options3'] = ' , , .'; +$txt['poll_options4'] = ' .'; +$txt['poll_options5'] = ' .'; +$txt['poll_options7'] = ' .'; +$txt['poll_error1'] = ' - %s'; +$txt['poll_add_option'] = ' '; + +$txt['spellcheck_done'] = ' .'; +$txt['spellcheck_change_to'] = ' :'; +$txt['spellcheck_suggest'] = ':'; +$txt['spellcheck_change'] = ''; +$txt['spellcheck_change_all'] = ' '; +$txt['spellcheck_ignore'] = ''; +$txt['spellcheck_ignore_all'] = ' '; + +$txt['attach_lose'] = ' , ?'; +$txt['more_attachments'] = ' '; +// Don't use entities in the below string. +$txt['more_attachments_error'] = ' .'; + +$txt['more_smileys'] = ''; +$txt['more_smileys_title'] = ' '; +$txt['more_smileys_pick'] = ' '; +$txt['more_smileys_close_window'] = ' '; + +$txt['error_new_reply'] = ' - , . .'; +$txt['error_new_replies'] = ' - , %d . .'; +$txt['error_new_reply_reading'] = ' - , . .'; +$txt['error_new_replies_reading'] = ' - , %d . .'; + +$txt['notification_reply_subject'] = ' : %s'; +$txt['notification_reply'] = ' , %s.' . "\n\n" . ' : '; +$txt['notification_sticky_subject'] = ' : %s'; +$txt['notification_sticky'] = ', , %s.' . "\n\n" . ' : '; +$txt['notification_lock_subject'] = ' : %s'; +$txt['notification_lock'] = ', , %s.' . "\n\n" . ' : '; +$txt['notification_unlock_subject'] = ' : %s'; +$txt['notification_unlock'] = ', , %s.' . "\n\n" . 'V : '; +$txt['notification_remove_subject'] = ' : %s'; +$txt['notification_remove'] = ' %s.'; +$txt['notification_move_subject'] = ' : %s'; +$txt['notification_move'] = ' %s.' . "\n\n" . ' : '; +$txt['notification_merge_subject'] = ' : %s'; +$txt['notification_merge'] = ', %s.' . "\n\n" . ' : '; +$txt['notification_split_subject'] = ' : %s'; +$txt['notification_split'] = ', %s.' . "\n\n" . 'View what remains of this topic at: '; + +$txt['announce_this_topic'] = ' :'; +$txt['announce_title'] = ' '; +$txt['announce_desc'] = ' .'; +$txt['announce_sending'] = ' '; +$txt['announce_done'] = ''; +$txt['announce_continue'] = ''; +$txt['announce_topic'] = ' .'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Profile.english.php b/Themes/fixed/languages/Profile.english.php new file mode 100755 index 0000000..b1958bf --- /dev/null +++ b/Themes/fixed/languages/Profile.english.php @@ -0,0 +1,273 @@ +http://www.mypage.com/mypic.gif)'; +$txt[475] = 'I have my own pic'; +$txt[479] = 'The format here will be used to show dates throughout this forum.'; +$txt[486] = 'Time Format'; +$txt[487] = 'Time Offset must be between -23.5 and 23.5.'; +$txt[518] = 'This is the displayed name that people will see.'; +$txt[519] = 'Number of hours to +/- to make displayed time equal to your local time.'; +$txt[563] = 'Birthdate'; +$txt[564] = 'Month (MM)'; +$txt[565] = 'Day (DD)'; +$txt[566] = 'Year (YYYY)'; +$txt[596] = 'For best security, you should use six or more characters with a combination of letters, numbers, and symbols.'; +$txt[597] = 'Additional Information'; +$txt[598] = 'This must be included if you specify a URL below.'; +$txt[599] = 'This must be a complete URL.'; +$txt[600] = 'This is your ICQ number.'; +$txt[601] = 'This is your AOL Instant Messenger nickname.'; +$txt[602] = 'This is your Yahoo! Instant Messenger nickname.'; +$txt[606] = 'Signatures are displayed at the bottom of each post or personal message. BBC code and smileys may be used in your signature.'; +$txt[664] = 'Max ' . $modSettings['max_signatureLength'] . '; characters remaining: '; +$txt[688] = 'Send this member a personal message'; +$txt[722] = 'hidden'; +$txt[741] = 'Current forum time'; +$txt[749] = 'The \'number of posts\' box can only contain digits.'; + +$txt['smf225'] = 'Language'; +$txt['smf227'] = 'Avatar image is too big, please resize it and try again (max'; +$txt['smf233'] = 'Invalid Date Registered value, valid example:'; +$txt['smf237'] = 'Your MSN messenger email address'; +$txt['smf241'] = 'Current Password'; +$txt['smf243'] = 'You haven\'t entered your current password.'; +// Don't use entities in the below string, except the main ones. (lt, gt, quot.) +$txt['smf244'] = 'For security reasons, your current password is required to make changes to your account.'; + +// Profile enhancements +$txt['pswd1'] = 'Secret Question'; +$txt['secret_desc'] = 'To help retrieve your password, enter a question here with an answer that only you know.'; +$txt['secret_desc2'] = 'Choose carefully, you wouldn\'t want someone guessing your answer!'; +$txt['pswd2'] = 'Answer'; +$txt['pswd3'] = 'Ask me my question'; +$txt['pswd4'] = 'You can\'t retrieve your password, but you can set a new one by following a link sent to you by email. You also have the option of setting a new password by answering your secret question.'; +$txt['pswd5'] = 'Sorry, but you did not specify a valid combination of Secret Question and Answer in your profile. Please click on the back button, and use the default method of obtaining your password.'; +$txt['pswd6'] = 'Please enter the answer to your question, and the password you would like to use. Your password will be changed to the one you select provided you answer the question correctly.'; +$txt['pswd8'] = 'Your password was changed successfully.
    Click here to login.'; +$txt['secret_why_blank'] = 'why is this blank?'; + +$txt['theme1a'] = 'Current Theme'; +$txt['theme1b'] = '(change)'; +$txt['theme2'] = 'Theme preferences'; +$txt['theme_forum_default'] = 'Forum or Board Default'; +$txt['theme_forum_default_desc'] = 'This is the default theme, which means your theme will change along with the administrator\'s settings and the board you are viewing.'; + +$txt['profileConfirm'] = 'Do you really want to delete this user?'; + +$txt['title1'] = 'Custom Title'; + +$txt['lastLoggedIn'] = 'Last Active'; + +$txt['notifyX'] = 'Notification Settings:'; +$txt['notifyX1'] = 'Save settings'; +$txt['notifyXAnn4'] = 'Receive forum announcements and important notifications by email.'; +$txt['notifyXOnce1'] = 'Receive reply notification only for the first unread reply.'; +$txt['auto_notify'] = 'Turn notification on when you post or reply to a topic.'; + +$txt['notifications_topics'] = 'Current Topic Notifications'; +$txt['notifications_topics_list'] = 'You are being notified of replies to the following topics'; +$txt['notifications_topics_none'] = 'You are not currently receiving any notifications from topics.'; +$txt['notifications_topics_howto'] = 'To receive notifications from a topic, click the "notify" button while viewing it.'; +$txt['notifications_boards'] = 'Current Board Notifications'; +$txt['notifications_boards_list'] = 'You are being notified of new topics posted in the following boards'; +$txt['notifications_boards_none'] = 'You aren\'t receiving notifications on any boards right now.'; +$txt['notifications_boards_howto'] = 'To request notifications from a specific board, click the "notify" button in the index of that board.'; +$txt['notifications_update'] = 'Unsubscribe'; + +$txt[325] = 'Ignorelist'; +$txt[326] = 'Add one Username on each line.
    Or enter * to ignore all messages.'; +$txt[327] = 'Notify by email every time you receive a personal message.'; + +$txt['statPanel_showStats'] = 'User statistics for: '; +$txt['statPanel_users_votes'] = 'Number of Votes Cast'; +$txt['statPanel_users_polls'] = 'Number of Polls Created'; +$txt['statPanel_total_time_online'] = 'Total Time Spent Online'; +$txt['statPanel_noPosts'] = 'No posts to speak of!'; +$txt['statPanel_generalStats'] = 'General Statistics'; +$txt['statPanel_posts'] = 'posts'; +$txt['statPanel_topics'] = 'topics'; +$txt['statPanel_votes'] = 'votes'; +$txt['statPanel_polls'] = 'polls'; +$txt['statPanel_topBoards'] = 'Most Popular Boards By Posts'; +$txt['statPanel_topBoardsActivity'] = 'Most Popular Boards By Activity'; +$txt['statPanel_activityTime'] = 'Posting Activity By Time'; +$txt['statPanel_timeOfDay'] = 'Time of Day'; +$txt['statPanel_show'] = 'Show general statistics for this member'; + +$txt['deleteAccount_warning'] = 'Warning - These actions are irreversible!'; +$txt['deleteAccount_desc'] = 'From this page you can delete this user\'s account and posts.'; +$txt['deleteAccount_member'] = 'Delete this member\'s account'; +$txt['deleteAccount_posts'] = 'Posts of user that are to be removed'; +$txt['deleteAccount_none'] = 'None'; +$txt['deleteAccount_all_posts'] = 'All Posts'; +$txt['deleteAccount_topics'] = 'Topics and Posts'; +$txt['deleteAccount_confirm'] = 'Are you completely sure you want to delete this account?'; + +$txt['profileInfo'] = 'Profile Info'; +$txt['summary'] = 'Summary'; +$txt['showPosts'] = 'Show Posts'; +$txt['statPanel'] = 'Show Stats'; +$txt['trackUser'] = 'Track User'; +$txt['trackIP'] = 'Track IP'; + +$txt['profileEdit'] = 'Modify Profile'; +$txt['account'] = 'Account Related Settings'; +$txt['account_info'] = 'These are your account settings. This page holds all critical information that identifies you on this forum. For security reasons, you will need to enter your (current) password to make changes to this information.'; +$txt['forumProfile'] = 'Forum Profile Information'; +$txt['forumProfile_info'] = 'You can change your personal information on this page. This information will be displayed throughout ' . $context['forum_name'] . '. If you aren\'t comfortable with sharing some information, simply skip it - nothing here is required.'; +$txt['theme'] = 'Look and Layout Preferences'; +$txt['theme_info'] = 'This section allows you to customize the look and layout of the forum.'; +$txt['notification'] = 'Notifications and Email'; +$txt['notification_info'] = 'SMF allows you to be notified of replies to posts, newly posted topics, and forum announcements. You can change those settings here, or oversee the topics and boards you are currently being receiving notifications for.'; +$txt['pmprefs'] = 'Personal Message Options'; +$txt['pmprefs_info'] = 'Other members of ' . $context['forum_name'] . ' can contact your personally, but sometimes you may want to ignore someone\'s messages. This page allows you to set that, among other things.'; + +$txt['profileAction'] = 'Actions'; +$txt['deleteAccount'] = 'Delete this account'; +$txt['profileSendIm'] = 'Send personal message'; +$txt['profileBanUser'] = 'Ban this user'; + +$txt['display_name'] = 'Display name'; +$txt['enter_ip'] = 'Enter IP (range)'; +$txt['errors_by'] = 'Error messages by'; +$txt['errors_desc'] = 'Below is a list of all the recent errors that this user has generated/experienced.'; +$txt['errors_from_ip'] = 'Error messages from IP (range)'; +$txt['errors_from_ip_desc'] = 'Below is a list of all recent error messages generated by this IP (range).'; +$txt['invalid_ip'] = 'Invalid IP address. Note that only asterisks (*) are allowed as masks, e.g. 127.0.*.*'; +$txt['ip_address'] = 'IP address'; +$txt['ips_in_errors'] = 'IPs used in error messages'; +$txt['ips_in_messages'] = 'IPs used in messages'; +$txt['members_from_ip'] = 'Members from IP (range)'; +$txt['members_in_range'] = 'Members possibly in the same range'; +$txt['messages_from_ip'] = 'Messages posted from IP (range)'; +$txt['messages_from_ip_desc'] = 'Below is a list of all messages posted from this IP (range).'; +$txt['most_recent_ip'] = 'Most recent IP address'; +$txt['no_errors_from_ip'] = 'No error messages from the specified IP (range) found'; +$txt['no_errors_from_user'] = 'No error messages from the specified user found'; +$txt['no_members_from_ip'] = 'No members from the specified IP (range) found'; +$txt['no_messages_from_ip'] = 'No messages from the specified IP (range) found'; +$txt['none'] = 'None'; +$txt['own_profile_confirm'] = 'Do you really want to delete your own account?'; +$txt['view_ips_by'] = 'View IPs used by'; + +$txt['avatar_will_upload'] = 'I will upload my own picture'; + +$txt['activate_reactivate_title'] = 'Welcome back to'; +$txt['activate_reactivate_mail'] = 'In order to re-validate your email address, your account has been deactivated. Click the following link to activate it again:'; +$txt['activate_changed_email'] = 'You\'ve changed your email address. In order to validate this address you will receive an email. Click the link in that email to reactivate your account.'; + +$txt[394] = 'Unable to send reminder email.'; +$txt[395] = 'Send an email to'; +$txt[396] = 'to ask for password'; +$txt[669] = 'Password Reminder'; + +$txt['smf100'] = 'Username/Email'; +$txt['smf101'] = 'by User'; +$txt['smf102'] = 'by Email'; + +$txt['reminder_subject'] = 'New password for ' . $context['forum_name']; +$txt['reminder_mail'] = 'This mail was sent because the \'forgot password\' function has been applied to your account. To set a new password click the following link'; +$txt['reminder_sent'] = 'A mail has been sent to your email address. Click the link in that mail to set a new password.'; +$txt['reminder_set_password'] = 'Set Password'; +$txt['reminder_password_set'] = 'Password successfully set'; +$txt['reminder_error'] = '%s failed to answer their secret question correctly when attempting to change a forgotten password.'; + +$txt['registration_not_approved'] = 'Sorry, this account has not yet been approved. If you need to change your email address please click'; +$txt['registration_not_activated'] = 'Sorry, this account has not yet been activated. If you need to resend the activation email please click'; + +$txt['primary_membergroup'] = 'Primary Membergroup'; +$txt['additional_membergroups'] = 'Additional Membergroups'; +// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'. +$txt['additional_membergroups_show'] = '[ show additional groups ]'; +$txt['no_primary_membergroup'] = '(no primary membergroup)'; +$txt['deadmin_confirm'] = 'Are you sure you wish to irrevocably remove your admin status?'; + +$txt['account_not_activated'] = 'Account is currently not activated'; +$txt['account_activate'] = 'activate'; + +$txt['show_online'] = 'Show others your online status?'; + +$txt['return_to_post'] = 'Return to topics after posting by default.'; +$txt['copy_to_outbox'] = 'Save a copy of each Personal Message in my outbox by default.'; +$txt['popup_messages'] = 'Show a popup when you receive new messages?'; +$txt['recent_posts_at_top'] = 'Show most recent posts at the top.'; +$txt['recent_pms_at_top'] = 'Show most recent personal messages at top.'; + +$txt['timeformat_easy0'] = '(Forum Default)'; +$txt['timeformat_easy1'] = 'Month Day, Year, HH:MM:SS a/pm'; +$txt['timeformat_easy2'] = 'Month Day, Year, HH:MM:SS (army time.)'; +$txt['timeformat_easy3'] = 'YYYY-MM-DD, HH:MM:SS'; +$txt['timeformat_easy4'] = 'DD Month YYYY, HH:MM:SS'; +$txt['timeformat_easy5'] = 'DD-MM-YYYY, HH:MM:SS'; + +$txt['rtm8'] = 'Poster'; + +$txt[732] = 'Show board descriptions inside boards.'; +$txt['show_children'] = 'Show child boards on every page inside boards, not just the first.'; +$txt['show_no_avatars'] = 'Don\'t show other users\' avatars.'; +$txt['show_no_signatures'] = 'Don\'t show other users\' signatures.'; +$txt['show_no_censored'] = 'Leave words uncensored.'; +$txt['calendar_start_day'] = 'First day of the week on the calendar'; +$txt['display_quick_reply'] = 'Use quick reply on topic display: '; +$txt['display_quick_reply1'] = 'don\'t show at all'; +$txt['display_quick_reply2'] = 'show, off by default'; +$txt['display_quick_reply3'] = 'show, on by default'; +$txt['display_quick_mod'] = 'Show quick-moderation on message index as '; +$txt['display_quick_mod_none'] = 'don\'t show.'; +$txt['display_quick_mod_check'] = 'checkboxes.'; +$txt['display_quick_mod_image'] = 'icons.'; + +$txt['whois_title'] = 'Look up IP on a regional whois-server'; +$txt['whois_apnic'] = 'APNIC (Asia Pacific region)'; +$txt['whois_arin'] = 'ARIN (North America, a portion of the Caribbean and sub-Saharan Africa)'; +$txt['whois_lacnic'] = 'LACNIC (Latin American and Caribbean region)'; +$txt['whois_ripe'] = 'RIPE (Europe, the Middle East and parts of Africa and Asia)'; + +$txt['moderator_why_missing'] = 'why isn\'t moderator here?'; +$txt['username_change'] = 'change'; +$txt['username_warning'] = 'To change this member\'s username, the forum must also reset their password, which will be emailed to the member with their new username.'; + +$txt['showPermissions'] = 'Show Permissions'; +$txt['showPermissions_given'] = 'Given by'; +$txt['showPermissions_denied'] = 'Denied by'; +$txt['showPermissions_permission'] = 'Permission (denied permissions are struck out)'; +$txt['showPermissions_none_general'] = 'This member has no general permissions set.'; +$txt['showPermissions_none_board'] = 'This member has no board specific permissions set.'; +$txt['showPermissions_all'] = 'As an administrator, this member has all possible permissions.'; +$txt['showPermissions_select'] = 'Board specific permissions for'; +$txt['showPermissions_general'] = 'General Permissions'; +$txt['showPermissions_global'] = 'All boards'; +$txt['showPermissions_all_boards'] = 'All'; +$txt['showPermissions_all_boards_except'] = 'All, except'; +$txt['showPermissions_boards'] = 'Boards'; +$txt['showPermissions_boards_denied'] = 'Boards denied'; +$txt['showPermissions_local_only'] = 'Permission only locally available'; + +$txt['local_time'] = 'Local Time'; +$txt['posts_per_day'] = 'per day'; + +$txt['who_change_my_karma'] = 'Who change my karma?'; +$txt['whom_i_change_karma'] = 'Whom I change karma?'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Profile.russian.php b/Themes/fixed/languages/Profile.russian.php new file mode 100644 index 0000000..862697e --- /dev/null +++ b/Themes/fixed/languages/Profile.russian.php @@ -0,0 +1,272 @@ +http://www.mypage.com/mypic.gif)'; +$txt[475] = ' '; +$txt[479] = ' .'; +$txt[486] = ' '; +$txt[487] = ' -23.5 23.5.'; +$txt[518] = ' , .'; +$txt[519] = ' +/- .'; +$txt[563] = ' '; +$txt[564] = ' (MM)'; +$txt[565] = ' ()'; +$txt[566] = ' ()'; +$txt[596] = ' 6 .'; +$txt[597] = ' '; +$txt[598] = ', URL .'; +$txt[599] = ' URL.'; +$txt[600] = ' ICQ .'; +$txt[601] = ' AOL Instant Messenger.'; +$txt[602] = ' Yahoo! Instant Messenger.'; +$txt[606] = ' . BBC .'; +$txt[664] = '. ' . $modSettings['max_signatureLength'] . '; : '; +$txt[688] = ' '; +$txt[722] = ''; +$txt[741] = ' '; +$txt[749] = ' .'; + +$txt['smf225'] = ''; +$txt['smf227'] = ' , (max'; +$txt['smf233'] = ' , :'; +$txt['smf237'] = ' MSN messenger e-mail'; +$txt['smf241'] = ' '; +$txt['smf243'] = ' .'; +// Don't use entities in the below string, except the main ones. (lt, gt, quot.) +$txt['smf244'] = ' .'; + +// Profile enhancements +$txt['pswd1'] = ' '; +$txt['secret_desc'] = ' , .'; +$txt['secret_desc2'] = ' , !'; +$txt['pswd2'] = ''; +$txt['pswd3'] = ' '; +$txt['pswd4'] = ' , . , .'; +$txt['pswd5'] = ', . , .'; +$txt['pswd6'] = ', , . , .'; +$txt['pswd8'] = ' .
    .'; +$txt['secret_why_blank'] = ' ?'; + +$txt['theme1a'] = ' '; +$txt['theme1b'] = '()'; +$txt['theme2'] = ' '; +$txt['theme_forum_default'] = ' '; +$txt['theme_forum_default_desc'] = ' , , .'; + +$txt['profileConfirm'] = ' ?'; + +$txt['title1'] = ''; + +$txt['lastLoggedIn'] = ' '; + +$txt['notifyX'] = ' :'; +$txt['notifyX1'] = ''; +$txt['notifyXAnn4'] = ' email.'; +$txt['notifyXOnce1'] = ' .'; +$txt['auto_notify'] = ' , .'; + +$txt['notifications_topics'] = ' '; +$txt['notifications_topics_list'] = ' '; +$txt['notifications_topics_none'] = ' .'; +$txt['notifications_topics_howto'] = ' , "", .'; +$txt['notifications_boards'] = ' '; +$txt['notifications_boards_list'] = ' '; +$txt['notifications_boards_none'] = ' .'; +$txt['notifications_boards_howto'] = ' , "" .'; +$txt['notifications_update'] = ''; + +$txt[325] = '׸ '; +$txt[326] = ' .
    * .'; +$txt[327] = ' e-mail .'; + +$txt['statPanel_showStats'] = ' : '; +$txt['statPanel_users_votes'] = ' '; +$txt['statPanel_users_polls'] = ' '; +$txt['statPanel_total_time_online'] = ' '; +$txt['statPanel_noPosts'] = ' !'; +$txt['statPanel_generalStats'] = ' '; +$txt['statPanel_posts'] = ''; +$txt['statPanel_topics'] = ''; +$txt['statPanel_votes'] = ''; +$txt['statPanel_polls'] = ''; +$txt['statPanel_topBoards'] = ' (- )'; +$txt['statPanel_topBoardsActivity'] = ' (% )'; +$txt['statPanel_activityTime'] = ' '; +$txt['statPanel_timeOfDay'] = ' '; +$txt['statPanel_show'] = ' '; + +$txt['deleteAccount_warning'] = ' - !'; +$txt['deleteAccount_desc'] = ' .'; +$txt['deleteAccount_member'] = ' '; +$txt['deleteAccount_posts'] = ' '; +$txt['deleteAccount_none'] = ' '; +$txt['deleteAccount_all_posts'] = ' '; +$txt['deleteAccount_topics'] = ' '; +$txt['deleteAccount_confirm'] = ' , ?'; + +$txt['profileInfo'] = ' '; +$txt['summary'] = ' '; +$txt['showPosts'] = ' '; +$txt['statPanel'] = ''; +$txt['trackUser'] = ' '; +$txt['trackIP'] = ' IP'; + +$txt['profileEdit'] = ' '; +$txt['account'] = ' '; +$txt['account_info'] = ' . , . , , .'; +$txt['forumProfile'] = ' '; +$txt['forumProfile_info'] = ' , ' . $context['forum_name'] . '. .'; +$txt['theme'] = ' '; +$txt['theme_info'] = ' .'; +$txt['notification'] = ' e-mail'; +$txt['notification_info'] = 'SMF , . , , .'; +$txt['pmprefs'] = ' '; +$txt['pmprefs_info'] = ' ' . $context['forum_name'] . ' , - . .'; + +$txt['profileAction'] = ''; +$txt['deleteAccount'] = ' '; +$txt['profileSendIm'] = ' '; +$txt['profileBanUser'] = ' '; + +$txt['display_name'] = ' '; +$txt['enter_ip'] = ' IP ()'; +$txt['errors_by'] = ' '; +$txt['errors_desc'] = ' , .'; +$txt['errors_from_ip'] = ' IP ()'; +$txt['errors_from_ip_desc'] = ' , IP ( IP).'; +$txt['invalid_ip'] = ' IP . , (*) , . 127.0.*.*'; +$txt['ip_address'] = 'IP '; +$txt['ips_in_errors'] = 'IP '; +$txt['ips_in_messages'] = 'IP '; +$txt['members_from_ip'] = ' IP ( IP)'; +$txt['members_in_range'] = ' '; +$txt['messages_from_ip'] = ' IP ( IP)'; +$txt['messages_from_ip_desc'] = ' IP ( IP).'; +$txt['most_recent_ip'] = ' IP .'; +$txt['no_errors_from_ip'] = ' IP ( IP)'; +$txt['no_errors_from_user'] = ' '; +$txt['no_members_from_ip'] = ' IP ( IP)'; +$txt['no_messages_from_ip'] = ' IP ( IP)'; +$txt['none'] = ' '; +$txt['own_profile_confirm'] = ' ?'; +$txt['view_ips_by'] = ' IP '; + +$txt['avatar_will_upload'] = ' '; + +$txt['activate_reactivate_title'] = ' '; +$txt['activate_reactivate_mail'] = ' email? . :'; +$txt['activate_changed_email'] = ' email . , email. .'; + +$txt[394] = ' email .'; +$txt[395] = ' e-mail'; +$txt[396] = ' '; +$txt[669] = ' '; + +$txt['smf100'] = '/E-mail'; +$txt['smf101'] = ' User'; +$txt['smf102'] = ' Email'; + +$txt['reminder_subject'] = ' ' . $context['forum_name']; +$txt['reminder_mail'] = ' email , \' \' . , '; +$txt['reminder_sent'] = ' email . , .'; +$txt['reminder_set_password'] = ' '; +$txt['reminder_password_set'] = ' '; +$txt['reminder_error'] = '%s .'; + +$txt['registration_not_approved'] = ', . email , , '; +$txt['registration_not_activated'] = ', . email , , '; + +$txt['primary_membergroup'] = ' '; +$txt['additional_membergroups'] = ' '; +// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'. +$txt['additional_membergroups_show'] = '[ ]'; +$txt['no_primary_membergroup'] = '( )'; +$txt['deadmin_confirm'] = ' , ??'; + +$txt['account_not_activated'] = ' '; +$txt['account_activate'] = ''; + +$txt['show_online'] = ' online ?'; + +$txt['return_to_post'] = ' , .'; +$txt['copy_to_outbox'] = ' .'; +$txt['popup_messages'] = ' , ?'; +$txt['recent_posts_at_top'] = ' .'; +$txt['recent_pms_at_top'] = ' .'; + +$txt['timeformat_easy0'] = '( )'; +$txt['timeformat_easy1'] = ' , , :: a/pm'; +$txt['timeformat_easy2'] = ' , , :: ( .)'; +$txt['timeformat_easy3'] = '--, ::'; +$txt['timeformat_easy4'] = ' , :MM:'; +$txt['timeformat_easy5'] = '-MM-, :MM:'; + +$txt['rtm8'] = ''; + +$txt[732] = ' .'; +$txt['show_children'] = ' , .'; +$txt['show_no_avatars'] = ' .'; +$txt['show_no_signatures'] = ' .'; +$txt['show_no_censored'] = ' .'; +$txt['calendar_start_day'] = ' .'; +$txt['display_quick_reply'] = ' : '; +$txt['display_quick_reply1'] = ' '; +$txt['display_quick_reply2'] = ' '; +$txt['display_quick_reply3'] = ' '; +$txt['display_quick_mod'] = ' '; +$txt['display_quick_mod_none'] = ' .'; +$txt['display_quick_mod_check'] = '.'; +$txt['display_quick_mod_image'] = '.'; + +$txt['whois_title'] = ' IP whois-'; +$txt['whois_apnic'] = 'APNIC (Asia Pacific region)'; +$txt['whois_arin'] = 'ARIN (North America, a portion of the Caribbean and sub-Saharan Africa)'; +$txt['whois_lacnic'] = 'LACNIC (Latin American and Caribbean region)'; +$txt['whois_ripe'] = 'RIPE (Europe, the Middle East and parts of Africa and Asia)'; + +$txt['moderator_why_missing'] = ' ?'; +$txt['username_change'] = ''; +$txt['username_warning'] = ' , , .'; + +$txt['showPermissions'] = ' '; +$txt['showPermissions_given'] = ''; +$txt['showPermissions_denied'] = ''; +$txt['showPermissions_permission'] = ' ( )'; +$txt['showPermissions_none_general'] = ' .'; +$txt['showPermissions_none_board'] = ' .'; +$txt['showPermissions_all'] = ' .'; +$txt['showPermissions_select'] = ' '; +$txt['showPermissions_general'] = ' '; +$txt['showPermissions_global'] = ' '; +$txt['showPermissions_all_boards'] = ''; +$txt['showPermissions_all_boards_except'] = ', '; +$txt['showPermissions_boards'] = ''; +$txt['showPermissions_boards_denied'] = ' '; +$txt['showPermissions_local_only'] = ' '; + +$txt['local_time'] = ' '; +$txt['posts_per_day'] = ' '; + +$txt['who_change_my_karma'] = ' ?'; +$txt['whom_i_change_karma'] = ' () ?'; +?> diff --git a/Themes/fixed/languages/Settings.english.php b/Themes/fixed/languages/Settings.english.php new file mode 100644 index 0000000..7310b01 --- /dev/null +++ b/Themes/fixed/languages/Settings.english.php @@ -0,0 +1,7 @@ +
    Thanks go to Babylonking and Alienine.'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Settings.russian.php b/Themes/fixed/languages/Settings.russian.php new file mode 100644 index 0000000..8790b57 --- /dev/null +++ b/Themes/fixed/languages/Settings.russian.php @@ -0,0 +1,7 @@ +
    Thanks go to Babylonking and Alienine.'; + +?> diff --git a/Themes/fixed/languages/Stats.english.php b/Themes/fixed/languages/Stats.english.php new file mode 100644 index 0000000..1494b1b --- /dev/null +++ b/Themes/fixed/languages/Stats.english.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/Themes/fixed/languages/Stats.russian.php b/Themes/fixed/languages/Stats.russian.php new file mode 100644 index 0000000..604a9a3 --- /dev/null +++ b/Themes/fixed/languages/Stats.russian.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/Themes/fixed/languages/Themes.english.php b/Themes/fixed/languages/Themes.english.php new file mode 100644 index 0000000..315fd83 --- /dev/null +++ b/Themes/fixed/languages/Themes.english.php @@ -0,0 +1,89 @@ +On the right, you can modify the settings for your themes.'; + +$txt['theme_allow'] = 'Allow members to select their own themes.'; +$txt['theme_default'] = 'Allow members to select the "Default" theme.'; +$txt['theme_guests'] = 'Overall forum default'; +$txt['theme_select'] = 'choose...'; +$txt['theme_reset'] = 'Reset everyone to'; +$txt['theme_nochange'] = 'No change'; +$txt['theme_forum_default'] = 'Forum Default'; + +$txt['theme_settings'] = 'settings'; +$txt['theme_remove'] = 'remove'; +$txt['theme_remove_confirm'] = 'Are you sure you want to permanently remove this theme?'; + +$txt['theme_install'] = 'Install a New Theme'; +$txt['theme_install_file'] = 'From a file'; +$txt['theme_install_dir'] = 'From a directory on the server'; +$txt['theme_install_error'] = 'That theme directory doesn\'t exist, or doesn\'t contain a theme!'; +$txt['theme_install_write_error'] = 'The Themes directory must be writable to continue!'; +$txt['theme_install_go'] = 'Install!'; +$txt['theme_install_new'] = 'Create a copy of Default named'; +$txt['theme_install_new_confirm'] = 'Install a new theme?'; +$txt['theme_install_writable'] = 'Warning - you cannot create or install a new theme as your themes directory is not currently writable!'; +$txt['theme_installed'] = 'Installed Successfully'; +$txt['theme_installed_message'] = 'was installed successfully.'; + +$txt['theme_latest'] = 'Latest and Greatest Themes'; +$txt['theme_latest_fetch'] = 'Fetching latest themes from www.simplemachines.org...'; + +$txt['theme_pick'] = 'Choose a theme...'; +$txt['theme_preview'] = 'preview »'; +$txt['theme_set'] = 'use this theme'; +$txt['theme_user'] = 'person is using this theme.'; +$txt['theme_users'] = 'people are using this theme.'; + +$txt['theme_edit'] = 'Edit Theme'; +$txt['theme_edit_style'] = 'Modify the style.css file. (colors, fonts, etc.)'; +$txt['theme_edit_index'] = 'Modify the index template. (the main template)'; +$txt['theme_edit_no_save'] = 'This file cannot be saved because it is not writable! Please make sure the following file is 777 or has the proper permissions'; +$txt['theme_edit_save'] = 'Save Changes'; + +$txt['theme_global_description'] = 'This is the default theme, which means your theme will change along with the administrators\' settings and the board you are viewing.'; + +$txt['theme5'] = 'Theme URLs and Configuration'; +$txt['theme6'] = 'Theme Options and Preferences'; +$txt['actual_theme_name'] = 'This theme\'s name: '; +$txt['actual_theme_dir'] = 'This theme\'s directory: '; +$txt['actual_theme_url'] = 'This theme\'s URL: '; +$txt['actual_images_url'] = 'This theme\'s images URL: '; + +$txt['additional_options_collapsable'] = 'Enable collapsable additional post options'; +$txt['allow_no_censored'] = 'Allow users to turn off word censoring?'; +$txt['who_display_viewing'] = 'Show who is viewing the board index and posts'; +$txt['who_display_viewing_off'] = 'Don\'t show'; +$txt['who_display_viewing_numbers'] = 'Show only numbers'; +$txt['who_display_viewing_names'] = 'Show member names'; +$txt['smf93'] = 'Disable recent posts'; +$txt['smf94'] = 'Enable single post'; +$txt['smf95'] = 'Enable multiple posts'; +$txt['smf105'] = 'Enable inline links'; +$txt['smf106'] = 'Enabling this will cause your current location to be drawn in a single line, as opposed to in a tree-like manner.'; +$txt['smf200'] = 'Enable SP1 style statistics on board index'; +$txt[382] = 'Show latest member on board index'; +$txt[383] = 'Show last modification date on modified posts'; +$txt[384] = 'Show user avatars in message view'; +$txt[385] = 'Show personal text in message view'; +$txt[386] = 'Show gender images in message view'; +$txt[387] = 'Show news fader on board index'; +$txt[510] = 'Show members list bar on board index?'; +$txt[522] = 'Show current position in forum as link instead of text?'; +$txt[523] = 'Show view profile button under post?'; +$txt[618] = 'Enable and show \'Mark as Read\' buttons?'; +$txt['number_recent_posts'] = 'Number of recent posts to display on board index:'; +$txt['number_recent_posts_desc'] = 'To disable the recent posts bar set this value to zero.'; +$txt['hide_post_group'] = 'Hide post group titles for grouped members?'; +$txt['hide_post_group_desc'] = 'Enabling this will not display a members post group title on the message view if they are assigned to a non-post based group.'; + +$txt['theme_options_reset_link'] = 'Reset member specific options for all members.'; +$txt['theme_options_reset'] = 'Resetting options for everyone. To change an option, first check the box to the left of it. This signifies that, for all members, this option should be changed. Next, specify what you want the option to be. If the first checkbox is not checked, the option will be left as it is for each member.'; +$txt['theme_options_defaults_link'] = 'Change the default member specific options.'; +$txt['theme_options_defaults'] = 'These are the default values for some member specific settings. Changing these will only affect new members and guests.'; +$txt['theme_options_title'] = 'Change or reset default options'; +$txt['theme_settings_link'] = 'Back to this theme\'s general settings. (save first!)'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Themes.russian.php b/Themes/fixed/languages/Themes.russian.php new file mode 100644 index 0000000..4dfe431 --- /dev/null +++ b/Themes/fixed/languages/Themes.russian.php @@ -0,0 +1,89 @@ +, .'; + +$txt['theme_allow'] = ' .'; +$txt['theme_default'] = ' " ".'; +$txt['theme_guests'] = ' '; +$txt['theme_select'] = '...'; +$txt['theme_reset'] = ' '; +$txt['theme_nochange'] = ' '; +$txt['theme_forum_default'] = ' '; + +$txt['theme_settings'] = ''; +$txt['theme_remove'] = ''; +$txt['theme_remove_confirm'] = ' , ?'; + +$txt['theme_install'] = ' '; +$txt['theme_install_file'] = ' '; +$txt['theme_install_dir'] = ' '; +$txt['theme_install_error'] = ' !'; +$txt['theme_install_write_error'] = ' !'; +$txt['theme_install_go'] = 'l!'; +$txt['theme_install_new'] = ' '; +$txt['theme_install_new_confirm'] = ' ?'; +$txt['theme_install_writable'] = ' - , !'; +$txt['theme_installed'] = ' '; +$txt['theme_installed_message'] = ' .'; + +$txt['theme_latest'] = ' '; +$txt['theme_latest_fetch'] = ' www.simplemachines.org...'; + +$txt['theme_pick'] = ' ...'; +$txt['theme_preview'] = ' »'; +$txt['theme_set'] = ' '; +$txt['theme_user'] = ' .'; +$txt['theme_users'] = ' .'; + +$txt['theme_edit'] = ' '; +$txt['theme_edit_style'] = ' style.css. (, ..)'; +$txt['theme_edit_index'] = ' . ( )'; +$txt['theme_edit_no_save'] = ' , ! , , CHMOD 777 '; +$txt['theme_edit_save'] = ' '; + +$txt['theme_global_description'] = ' , , , .'; + +$txt['theme5'] = 'URL '; +$txt['theme6'] = ' '; +$txt['actual_theme_name'] = ' : '; +$txt['actual_theme_dir'] = ' : '; +$txt['actual_theme_url'] = 'URL : '; +$txt['actual_images_url'] = 'URL : '; + +$txt['additional_options_collapsable'] = ' '; +$txt['allow_no_censored'] = ' ?'; +$txt['who_display_viewing'] = ', '; +$txt['who_display_viewing_off'] = ' '; +$txt['who_display_viewing_numbers'] = ' '; +$txt['who_display_viewing_names'] = ' '; +$txt['smf93'] = ' '; +$txt['smf94'] = ' '; +$txt['smf95'] = ' '; +$txt['smf105'] = ' '; +$txt['smf106'] = ' , , .'; +$txt['smf200'] = ' SP1 '; +$txt[382] = ' '; +$txt[383] = ' '; +$txt[384] = ' '; +$txt[385] = ' '; +$txt[386] = ' '; +$txt[387] = ' '; +$txt[510] = ' ?'; +$txt[522] = ' , ?'; +$txt[523] = ' ?'; +$txt[618] = ' \' \' ?'; +$txt['number_recent_posts'] = ' , :'; +$txt['number_recent_posts_desc'] = ' , .'; +$txt['hide_post_group'] = ' ?'; +$txt['hide_post_group_desc'] = ' , , .'; + +$txt['theme_options_reset_link'] = ' .'; +$txt['theme_options_reset'] = ' . , . , . , , . , , .'; +$txt['theme_options_defaults_link'] = ' .'; +$txt['theme_options_defaults'] = ' . .'; +$txt['theme_options_title'] = ' '; +$txt['theme_settings_link'] = ' . ( !)'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Who.english.php b/Themes/fixed/languages/Who.english.php new file mode 100755 index 0000000..d1c09dc --- /dev/null +++ b/Themes/fixed/languages/Who.english.php @@ -0,0 +1,102 @@ +Nothing, or nothing you can see...'; +$txt['who_unknown'] = 'Unknown Action'; +$txt['who_user'] = 'User'; +$txt['who_time'] = 'Time'; +$txt['who_action'] = 'Action'; + +$txt['whoall_activate'] = 'Activating their account.'; +$txt['whoall_help'] = 'Viewing the help page.'; +$txt['whoall_helpadmin'] = 'Viewing the admin help pages.'; +$txt['whoall_pm'] = 'Viewing their messages.'; +$txt['whoall_login'] = 'Logging into the forum.'; +$txt['whoall_login2'] = 'Logging into the forum.'; +$txt['whoall_logout'] = 'Logging out of the forum.'; +$txt['whoall_markasread'] = 'Marking topics read.'; +$txt['whoall_news'] = 'Viewing the news.'; +$txt['whoall_notify'] = 'Changing their notification settings.'; +$txt['whoall_notifyboard'] = 'Changing their notification settings.'; +$txt['whoall_recent'] = 'Viewing a list of recent topics.'; +$txt['whoall_register'] = 'Registering for an account on the forum.'; +$txt['whoall_register2'] = 'Registering for an account on the forum.'; +$txt['whoall_reminder'] = 'Requesting a password reminder.'; +$txt['whoall_repottm'] = 'Reporting a topic to a moderator.'; +$txt['whoall_spellcheck'] = 'Using the spellchecker'; +$txt['whoall_unread'] = 'Viewing unread topics since their last visit.'; +$txt['whoall_unreadreplies'] = 'Viewing unread replies since their last visit.'; +$txt['whoall_who'] = 'Viewing Who\'s Online.'; +$txt['whoall_.xml'] = 'Viewing an XML feed.'; + +$txt['whoadmin_viewkarma'] = 'Viewing Karmachange Description log.'; +$txt['whoall_modifykarma'] = 'Changing karma.'; + +$txt['whoall_googlemap'] = 'Viewing the Member Map.'; +$txt['whoall_.kml'] = 'Viewing the Google Earth Feed.'; + +$txt['whoall_collapse_collapse'] = 'Collapsing a category.'; +$txt['whoall_collapse_expand'] = 'Expanding a category.'; +$txt['whoall_pm_removeall'] = 'Removing all their messages.'; +$txt['whoall_pm_send'] = 'Sending a message.'; +$txt['whoall_pm_send2'] = 'Sending a message.'; + +$txt['whotopic_dlattach'] = 'Viewing an attachment.'; +$txt['whotopic_editpoll'] = 'Editing the poll in "%s".'; +$txt['whotopic_mergetopics'] = 'Merging the topic "%s" with another topic.'; +$txt['whotopic_movetopic'] = 'Moving the topic "%s" to another board.'; +$txt['whotopic_post'] = 'Posting in %s.'; +$txt['whotopic_post2'] = 'Posting in %s.'; +$txt['whotopic_printpage'] = 'Printing the topic "%s".'; +$txt['whotopic_splittopics'] = 'Splitting the topic "%s" into two topics.'; +$txt['whotopic_vote'] = 'Voting in %s.'; + +$txt['whopost_quotefast'] = 'Quoting a post from "%s".'; + +$txt['whoadmin_detailedversion'] = 'Doing a detailed version check.'; +$txt['whoadmin_dumpdb'] = 'Backing up the database to file.'; +$txt['whoadmin_editagreement'] = 'Editing the registration agreement.'; +$txt['whoadmin_modifyModSettings'] = 'Editing forum features and options.'; +$txt['whoadmin_modifyModSettings2'] = 'Editing forum features and options.'; +$txt['whoadmin_modlog'] = 'Viewing the moderator log.'; +$txt['whoadmin_modsettings'] = 'Editing the forum settings.'; +$txt['whoadmin_packageget'] = 'Getting packages.'; +$txt['whoadmin_packages'] = 'Viewing the package manager.'; +$txt['whoadmin_permissions'] = 'Editing the forum permissions.'; +$txt['whoadmin_pgadd'] = 'Adding a package.'; +$txt['whoadmin_pgbrowse'] = 'Browsing the package server.'; +$txt['whoadmin_pgdownload'] = 'Downloading a package.'; +$txt['whoadmin_pgremove'] = 'Removing a package.'; +$txt['whoadmin_theme'] = 'Editing the theme settings.'; +$txt['whoadmin_trackip'] = 'Tracking an IP address.'; + +$txt['whoallow_manageboards'] = 'Editing the board and category settings.'; +$txt['whoallow_admin'] = 'Viewing the admin page.'; +$txt['whoallow_ban'] = 'Editing the ban list.'; +$txt['whoallow_boardrecount'] = 'Recounting the forum totals.'; +$txt['whoallow_calendar'] = 'Viewing the calendar.'; +$txt['whoallow_editnews'] = 'Editing the news.'; +$txt['whoallow_mailing'] = 'Sending a forum email.'; +$txt['whoallow_maintain'] = 'Performing routine forum maintenance.'; +$txt['whoallow_manageattachments'] = 'Managing the attachments.'; +$txt['whoallow_mlist'] = 'Viewing the memberlist.'; +$txt['whoallow_optimizetables'] = 'Optimizing the database tables.'; +$txt['whoallow_repairboards'] = 'Repairing the database tables.'; +$txt['whoallow_search'] = 'Searching the forum.'; +$txt['whoallow_search2'] = 'Viewing the results of a search.'; +$txt['whoallow_sendtopic'] = 'Sending a topic to a friend.'; +$txt['whoallow_setcensor'] = 'Editing the censor text.'; +$txt['whoallow_setreserve'] = 'Editing the reserved names.'; +$txt['whoallow_stats'] = 'Viewing the forum stats.'; +$txt['whoallow_viewErrorLog'] = 'Viewing the error log.'; +$txt['whoallow_viewmembers'] = 'Viewing a list of members.'; + +$txt['who_topic'] = 'Viewing the topic %s.'; +$txt['who_board'] = 'Viewing the board %s.'; +$txt['who_index'] = 'Viewing the board index of ' . $context['forum_name'] . '.'; +$txt['who_viewprofile'] = 'Viewing %s\'s profile.'; +$txt['who_profile'] = 'Editing the profile of %s.'; +$txt['who_post'] = 'Posting a new topic in %s.'; +$txt['who_poll'] = 'Posting a new poll in %s.'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/Who.russian.php b/Themes/fixed/languages/Who.russian.php new file mode 100644 index 0000000..18fe51e --- /dev/null +++ b/Themes/fixed/languages/Who.russian.php @@ -0,0 +1,101 @@ +, ...'; +$txt['who_unknown'] = ' '; +$txt['who_user'] = ''; +$txt['who_time'] = ''; +$txt['who_action'] = ''; + +$txt['whoall_activate'] = ' .'; +$txt['whoall_help'] = ' .'; +$txt['whoall_helpadmin'] = ' .'; +$txt['whoall_pm'] = ' .'; +$txt['whoall_login'] = ' .'; +$txt['whoall_login2'] = ' .'; +$txt['whoall_logout'] = ' .'; +$txt['whoall_markasread'] = ' .'; +$txt['whoall_news'] = ' .'; +$txt['whoall_notify'] = ' .'; +$txt['whoall_notifyboard'] = ' .'; +$txt['whoall_recent'] = ' .'; +$txt['whoall_register'] = ' .'; +$txt['whoall_register2'] = ' .'; +$txt['whoall_reminder'] = ' .'; +$txt['whoall_repottm'] = ' .'; +$txt['whoall_spellcheck'] = ' '; +$txt['whoall_unread'] = ' .'; +$txt['whoall_unreadreplies'] = ' .'; +$txt['whoall_who'] = ' Online.'; +$txt['whoall_.xml'] = ' XML .'; + +$txt['whoall_collapse_collapse'] = ' .'; +$txt['whoall_collapse_expand'] = ' .'; +$txt['whoall_pm_removeall'] = ' .'; +$txt['whoall_pm_send'] = ' .'; +$txt['whoall_pm_send2'] = ' .'; + +$txt['whotopic_dlattach'] = ' .'; +$txt['whotopic_editpoll'] = ' "%s".'; +$txt['whotopic_mergetopics'] = ' "%s" .'; +$txt['whotopic_movetopic'] = ' "%s" .'; +$txt['whotopic_post'] = ' %s.'; +$txt['whotopic_post2'] = ' %s.'; +$txt['whotopic_printpage'] = ' "%s".'; +$txt['whotopic_splittopics'] = ' "%s" .'; +$txt['whotopic_vote'] = ' %s.'; + +$txt['whopost_quotefast'] = ' "%s".'; + +$txt['whoadmin_detailedversion'] = ' .'; +$txt['whoadmin_dumpdb'] = ' .'; +$txt['whoadmin_editagreement'] = ' .'; +$txt['whoadmin_modifyModSettings'] = ' .'; +$txt['whoadmin_modifyModSettings2'] = ' .'; +$txt['whoadmin_modlog'] = ' .'; +$txt['whoadmin_modsettings'] = ' .'; +$txt['whoadmin_packageget'] = ' .'; +$txt['whoadmin_packages'] = ' .'; +$txt['whoadmin_permissions'] = ' .'; +$txt['whoadmin_pgadd'] = ' .'; +$txt['whoadmin_pgbrowse'] = ' .'; +$txt['whoadmin_pgdownload'] = ' .'; +$txt['whoadmin_pgremove'] = ' .'; +$txt['whoadmin_theme'] = ' .'; +$txt['whoadmin_trackip'] = ' IP .'; + +$txt['whoallow_manageboards'] = ' .'; +$txt['whoallow_admin'] = ' .'; +$txt['whoallow_ban'] = ' .'; +$txt['whoallow_boardrecount'] = ' .'; +$txt['whoallow_calendar'] = ' .'; +$txt['whoallow_editnews'] = ' .'; +$txt['whoallow_mailing'] = ' email .'; +$txt['whoallow_maintain'] = ' .'; +$txt['whoallow_manageattachments'] = ' .'; +$txt['whoallow_mlist'] = ' .'; +$txt['whoallow_optimizetables'] = ' .'; +$txt['whoallow_repairboards'] = ' .'; +$txt['whoallow_search'] = ' .'; +$txt['whoallow_search2'] = ' .'; +$txt['whoallow_sendtopic'] = ' .'; +$txt['whoallow_setcensor'] = ' .'; +$txt['whoallow_setreserve'] = ' .'; +$txt['whoallow_stats'] = ' .'; +$txt['whoallow_viewErrorLog'] = ' .'; +$txt['whoallow_viewmembers'] = ' .'; + +$txt['who_topic'] = ' %s.'; +$txt['who_board'] = ' %s.'; +$txt['who_index'] = ' ' . $context['forum_name'] . '.'; +$txt['who_viewprofile'] = ' %s\.'; +$txt['who_profile'] = ' %s.'; +$txt['who_post'] = ' %s.'; +$txt['who_poll'] = ' %s.'; + +$txt['whoall_googlemap'] = 'Viewing the Member Map.'; + +$txt['whoadmin_viewkarma'] = 'viewing karmachange description log.'; +$txt['whoall_modifykarma'] = 'changing karma.'; + +?> diff --git a/Themes/fixed/languages/Wireless.english.php b/Themes/fixed/languages/Wireless.english.php new file mode 100644 index 0000000..cf0708e --- /dev/null +++ b/Themes/fixed/languages/Wireless.english.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/Themes/fixed/languages/Wireless.russian.php b/Themes/fixed/languages/Wireless.russian.php new file mode 100644 index 0000000..c4c3819 --- /dev/null +++ b/Themes/fixed/languages/Wireless.russian.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/Themes/fixed/languages/index.english.php b/Themes/fixed/languages/index.english.php new file mode 100755 index 0000000..0f06982 --- /dev/null +++ b/Themes/fixed/languages/index.english.php @@ -0,0 +1,647 @@ + 'January'. (or translated, of course.) +$months = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); +$months_short = array(1 => 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); + +$txt['newmessages0'] = 'is new'; +$txt['newmessages1'] = 'are new'; +$txt['newmessages3'] = 'New'; +$txt['newmessages4'] = ','; + +$txt[2] = 'Admin'; + +$txt[10] = 'Save'; + +$txt[17] = 'Modify'; +$txt[18] = $context['forum_name'] . ' - Index'; +$txt[19] = 'Members'; +$txt[20] = 'Board name'; +$txt[21] = 'Posts'; +$txt[22] = 'Last post'; + +$txt[24] = '(No subject)'; +$txt[26] = 'Posts'; +$txt[27] = 'View Profile'; +$txt[28] = 'Guest'; +$txt[29] = 'Author'; +$txt[30] = 'on'; +$txt[31] = 'Remove'; +$txt[33] = 'Start new topic'; + +$txt[34] = 'Login'; +$txt[35] = 'Username'; +$txt[36] = 'Password'; + +$txt[40] = 'That username does not exist.'; + +$txt[62] = 'Board Moderator'; +$txt[63] = 'Remove Topic'; +$txt[64] = 'Topics'; +$txt[66] = 'Modify message'; +$txt[68] = 'Name'; +$txt[69] = 'Email'; +$txt[70] = 'Subject'; +$txt[72] = 'Message'; + +$txt[79] = 'Edit Profile'; + +$txt[81] = 'Choose password'; +$txt[82] = 'Verify password'; +$txt[87] = 'Position'; + +$txt[92] = 'View the profile of'; +$txt[94] = 'Total'; +$txt[95] = 'Posts'; +$txt[96] = 'Website'; +$txt[97] = 'Register'; + +$txt[101] = 'Message Index'; +$txt[102] = 'News'; +$txt[103] = 'Home'; + +$txt[104] = 'Lock/Unlock Topic'; +$txt[105] = 'Post'; +$txt[106] = 'An Error Has Occurred!'; +$txt[107] = 'at'; +$txt[108] = 'Logout'; +$txt[109] = 'Started by'; +$txt[110] = 'Replies'; +$txt[111] = 'Last post'; +$txt[114] = 'Administration Login'; +$txt[118] = 'Topic'; +$txt[119] = 'Help'; +$txt[121] = 'Remove message'; +$txt[125] = 'Notify'; +$txt[126] = 'Do you want a notification email if someone replies to this topic?'; +$txt[130] = "Regards,\nThe " . $context['forum_name'] . ' Team.'; +$txt[131] = 'Notify of replies'; +$txt[132] = 'Move Topic'; +$txt[133] = 'Move to'; +$txt[139] = 'Pages'; +$txt[140] = 'Users active in past ' . $modSettings['lastActive'] . ' minutes'; +$txt[144] = 'Personal Messages'; +$txt[145] = 'Reply with quote'; +$txt[146] = 'Reply'; + +$txt[151] = 'No messages...'; +$txt[152] = 'you have'; +$txt[153] = 'messages'; +$txt[154] = 'Remove this message'; + +$txt[158] = 'Users Online'; +$txt[159] = 'Personal Message'; +$txt[160] = 'Jump to'; +$txt[161] = 'go'; +$txt[162] = 'Are you sure you want to remove this topic?'; +$txt[163] = 'Yes'; +$txt[164] = 'No'; + +$txt[166] = 'Search Results'; +$txt[167] = 'End of results'; +$txt[170] = 'Sorry, no matches were found'; +$txt[176] = 'on'; + +$txt[182] = 'Search'; +$txt[183] = 'Set Search Parameters'; +$txt[189] = 'Choose a board to search in, or search all'; +$txt[190] = 'All'; + +$txt[193] = 'Back'; +$txt[194] = 'reminder'; +$txt[195] = 'Topic started by'; +$txt[196] = 'Title'; +$txt[197] = 'Post by'; +$txt[200] = 'Searchable list of all registered members.'; +$txt[201] = 'Please welcome'; +$txt[208] = 'Administration Center'; +$txt[209] = 'I\'m a llama!'; +$txt[211] = 'Last Edit'; +$txt[212] = 'Would you like to deactivate Notification on this topic?'; + +$txt[214] = 'Recent Posts'; + +$txt[227] = 'Location'; +$txt[231] = 'Gender'; +$txt[233] = 'Date Registered'; + +$txt[234] = 'View the 10 most recent posts on the forum.'; +$txt[235] = 'is the most recently updated topic'; +$txt[236] = 'Return'; +$txt[237] = 'to the board index.'; + +$txt[238] = 'Male'; +$txt[239] = 'Female'; + +$txt[240] = 'Invalid character used in Username.'; + +$txt['welcome_guest'] = 'Welcome, ' . $txt[28] . '. Please login or register.'; +$txt['welcome_guest_activate'] = '
    Did you miss your activation email?'; +$txt['hello_member'] = 'Hey,'; +$txt['hello_guest'] = 'Welcome,'; +$txt[247] = 'Hey,'; +$txt[248] = 'Welcome,'; +$txt[249] = 'Please'; +$txt[250] = 'Back'; +$txt[251] = 'Please select a destination'; + +$txt[279] = 'Posted by'; + +$txt[287] = 'Smiley'; +$txt[288] = 'Angry'; +$txt[289] = 'Cheesy'; +$txt[290] = 'Laugh'; +$txt[291] = 'Sad'; +$txt[292] = 'Wink'; +$txt[293] = 'Grin'; +$txt[294] = 'Shocked'; +$txt[295] = 'Cool'; +$txt[296] = 'Huh'; +$txt[450] = 'Roll Eyes'; +$txt[451] = 'Tongue'; +$txt[526] = 'Embarrassed'; +$txt[527] = 'Lips sealed'; +$txt[528] = 'Undecided'; +$txt[529] = 'Kiss'; +$txt[530] = 'Cry'; + +$txt[298] = 'Moderator'; +$txt[299] = 'Moderators'; + +$txt[300] = 'Mark Topics as Read for this Board'; +$txt[301] = 'Views'; +$txt[302] = 'New'; + +$txt[303] = 'View All Users'; +$txt[305] = 'View'; +$txt[307] = 'Email'; + +$txt[308] = 'Viewing Members'; +$txt[309] = 'of'; +$txt[310] = 'total members'; +$txt[311] = 'to'; +$txt[315] = 'Forgot your password?'; + +$txt[317] = 'Date'; +$txt[318] = 'From'; +$txt[319] = 'Subject'; +$txt[322] = 'Check for new messages'; +$txt[324] = 'To'; + +$txt[330] = 'Topics'; +$txt[331] = 'Members'; +$txt[332] = 'Members List'; +$txt[333] = 'New Posts'; +$txt[334] = 'No New Posts'; + +$txt['sendtopic_send'] = 'Send'; +$txt[343] = 'Match all words'; +$txt[344] = 'Match any words'; + +$txt[371] = 'Time Offset'; +$txt[377] = 'or'; + +$txt[398] = 'Sorry, no matches were found'; + +$txt[418] = 'Notification'; + +$txt[430] = 'Sorry %s, you are banned from using this forum!'; + +$txt[452] = 'Mark ALL messages as read'; + +$txt[454] = 'Hot Topic (More than ' . $modSettings['hotTopicPosts'] . ' Replies)'; +$txt[455] = 'Very Hot Topic (More than ' . $modSettings['hotTopicVeryPosts'] . ' Replies)'; +$txt[456] = 'Locked Topic'; +$txt[457] = 'Normal Topic'; +$txt['participation_caption'] = 'Topic you have posted in'; + +$txt[462] = 'GO'; + +$txt[465] = 'Print'; +$txt[467] = 'Profile'; +$txt[468] = 'Topic Summary'; +$txt[470] = 'N/A'; +$txt[471] = 'message'; +$txt[473] = 'This name is already in use by another member.'; + +$txt[488] = 'Total Members'; +$txt[489] = 'Total Posts'; +$txt[490] = 'Total Topics'; + +$txt[497] = 'Minutes to stay logged in'; + +$txt[507] = 'Preview'; +$txt[508] = 'Always stay logged in'; + +$txt[511] = 'Logged'; +$txt[512] = 'IP'; + +$txt[513] = 'ICQ'; +$txt[515] = 'WWW'; + +$txt[525] = 'by'; + +$txt[578] = 'hours'; +$txt[579] = 'days'; + +$txt[581] = ', our newest member.'; + +$txt[582] = 'Search for'; +$txt[583] = 'by user'; + +$txt[603] = 'AIM'; +// In this string, please use +'s for spaces. +$txt['aim_default_message'] = 'Hi.+Are+you+there?'; +$txt[604] = 'YIM'; + +$txt[616] = 'Remember, this forum is in \'Maintenance Mode\'.'; + +$txt[641] = 'Read'; +$txt[642] = 'times'; + +$txt[645] = 'Forum Stats'; +$txt[656] = 'Latest Member'; +$txt[658] = 'Total Categories'; +$txt[659] = 'Latest Post'; + +$txt[660] = 'You\'ve got'; +$txt[661] = 'Click'; +$txt[662] = 'here'; +$txt[663] = 'to view them.'; + +$txt[665] = 'Total Boards'; + +$txt[668] = 'Print Page'; + +$txt[679] = 'This must be a valid email address.'; + +$txt[683] = 'I am a geek!!'; +$txt[685] = $context['forum_name'] . ' - Info Center'; + +$txt[707] = 'Send this topic'; + +$txt['sendtopic_title'] = 'Send the topic "%s" to a friend.'; +$txt['sendtopic_dear'] = 'Dear %s,'; +$txt['sendtopic_this_topic'] = 'I want you to check out "%s" on ' . $context['forum_name'] . '. To view it, please click this link'; +$txt['sendtopic_thanks'] = 'Thanks'; +$txt['sendtopic_sender_name'] = 'Your name'; +$txt['sendtopic_sender_email'] = 'Your email address'; +$txt['sendtopic_receiver_name'] = 'Recipient\'s name'; +$txt['sendtopic_receiver_email'] = 'Recipient\'s email address'; +$txt['sendtopic_comment'] = 'Add a comment'; +$txt['sendtopic2'] = 'A comment has also been added regarding this topic'; + +$txt[721] = 'Hide email address from public?'; + +$txt[737] = 'Check all'; + +$txt[1001] = 'Database Error'; +$txt[1002] = 'Please try again. If you come back to this error screen, report the error to an administrator.'; +$txt[1003] = 'File'; +$txt[1004] = 'Line'; +$txt[1005] = 'SMF has detected and automatically tried to repair an error in your database. If you continue to have problems, or continue to receive these emails, please contact your host.'; +$txt['database_error_versions'] = 'Note: It appears that your database may require an upgrade. Your forum files are currently at version ' . $forum_version . ', whereas your database is at version SMF ' . $modSettings['smfVersion'] . '. It is recommended that you execute the latest version of upgrade.php.'; +$txt['template_parse_error'] = 'Template Parse Error!'; +$txt['template_parse_error_message'] = 'It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

    You can also try refreshing this page.'; +$txt['template_parse_error_details'] = 'There was a problem loading the %1$s template or language file. Please check the syntax and try again - remember, single quotes (\') often have to be escaped with a slash (\\). To see more specific error information from PHP, try accessing the file directly.

    You may want to try to refresh this page or use the default theme.'; + +$txt['smf10'] = 'Today at '; +$txt['smf10b'] = 'Yesterday at '; +$txt['smf20'] = 'Post new poll'; +$txt['smf21'] = 'Question'; +$txt['smf23'] = 'Submit Vote'; +$txt['smf24'] = 'Total Votes'; +$txt['smf25'] = 'shortcuts: hit alt+s to submit/post or alt+p to preview'; +$txt['smf29'] = 'View results.'; +$txt['smf30'] = 'Lock Voting'; +$txt['smf30b'] = 'Unlock Voting'; +$txt['smf39'] = 'Edit Poll'; +$txt['smf43'] = 'Poll'; +$txt['smf47'] = '1 Day'; +$txt['smf48'] = '1 Week'; +$txt['smf49'] = '1 Month'; +$txt['smf50'] = 'Forever'; +$txt['smf52'] = 'Login with username, password and session length'; +$txt['smf53'] = '1 Hour'; +$txt['smf56'] = 'MOVED'; +$txt['smf57'] = 'Please enter a brief description as to
    why this topic is being moved.'; +$txt['smf60'] = 'Sorry, you don\'t have enough posts to modify karma - you need at least '; +$txt['smf62'] = 'Sorry, you can\'t repeat a karma action without waiting '; +$txt['smf82'] = 'Board'; +$txt['smf88'] = 'in'; +$txt['smf96'] = 'Sticky Topic'; + +$txt['smf138'] = 'Delete'; + +$txt['smf199'] = 'Your Personal Messages'; + +$txt['smf211'] = 'KB'; + +$txt['smf223'] = '[More Stats]'; + +$txt['smf238'] = 'Code'; +$txt['smf239'] = 'Quote from'; +$txt['smf240'] = 'Quote'; + +$txt['smf251'] = 'Split Topic'; +$txt['smf252'] = 'Merge Topics'; +$txt['smf252lnk'] = 'Link Topics'; +$txt['smf254'] = 'Subject For New Topic'; +$txt['smf255'] = 'Only split this post.'; +$txt['smf256'] = 'Split topic after and including this post.'; +$txt['smf257'] = 'Select posts to split.'; +$txt['smf258'] = 'New Topic'; +$txt['smf259'] = 'Topic successfully split into two topics.'; +$txt['smf260'] = 'Origin Topic'; +$txt['smf261'] = 'Please select which posts you wish to split.'; +$txt['smf264'] = 'Topics successfully merged.'; +$txt['smf265'] = 'Newly Merged Topic'; +$txt['smf266'] = 'Topic to be merged'; +$txt['smf267'] = 'Target board'; +$txt['smf269'] = 'Target topic'; +$txt['smf274'] = 'Are you sure you want to merge'; +$txt['smf275'] = 'with'; +$txt['smf276'] = 'This function will merge the messages of two topics into one topic. The messages will be sorted according to the time of posting. Therefore the earliest posted message will be the first message of the merged topic.'; + +$txt['smf277'] = 'Set topic sticky'; +$txt['smf278'] = 'Set topic non-sticky'; +$txt['smf279'] = 'Lock topic'; +$txt['smf280'] = 'Unlock topic'; + +$txt['smf298'] = 'Advanced search'; + +$txt['smf299'] = 'MAJOR SECURITY RISK:'; +$txt['smf300'] = 'You have not removed '; + +$txt['smf301'] = 'Page created in '; +$txt['smf302'] = ' seconds with '; +$txt['smf302b'] = ' queries.'; + +$txt['smf315'] = 'Use this function to inform the moderators and administrators of an abusive or wrongly posted message.
    Please note that your email address will be revealed to the moderators if you use this.'; + +$txt['online2'] = 'Online'; +$txt['online3'] = 'Offline'; +$txt['online4'] = 'Personal Message (Online)'; +$txt['online5'] = 'Personal Message (Offline)'; +$txt['online8'] = 'Status'; + +$txt['topbottom4'] = 'Go Up'; +$txt['topbottom5'] = 'Go Down'; + +$forum_copyright = $context['forum_name'] . ' | Powered by ' . $forum_version . '.
    +© 2001-2005, Lewis Media. All Rights Reserved.'; + +$txt['calendar3'] = 'Birthdays:'; +$txt['calendar4'] = 'Events:'; +$txt['calendar3b'] = 'Upcoming Birthdays:'; +$txt['calendar4b'] = 'Upcoming Events:'; +$txt['calendar5'] = ''; // Prompt for holidays in the calendar, leave blank to just display the holiday's name. +$txt['calendar9'] = 'Month:'; +$txt['calendar10'] = 'Year:'; +$txt['calendar11'] = 'Day:'; +$txt['calendar12'] = 'Event Title:'; +$txt['calendar13'] = 'Post In:'; +$txt['calendar20'] = 'Edit Event'; +$txt['calendar21'] = 'Delete this event?'; +$txt['calendar22'] = 'Delete Event'; +$txt['calendar23'] = 'Post Event'; +$txt['calendar24'] = 'Calendar'; +$txt['calendar37'] = 'Link to Calendar'; +$txt['calendar43'] = 'Link Event'; +$txt['calendar47'] = 'Upcoming Calendar'; +$txt['calendar47b'] = 'Today\'s Calendar'; +$txt['calendar51'] = 'Week'; +$txt['calendar54'] = 'Number of Days:'; +$txt['calendar_how_edit'] = 'how do you edit these events?'; + +$txt['moveTopic1'] = 'Post a redirection topic'; +$txt['moveTopic2'] = 'Change the topic\'s subject'; +$txt['moveTopic3'] = 'New subject'; +$txt['moveTopic4'] = 'Change every message\'s subject'; + +$txt['theme_template_error'] = 'Unable to load the \'%s\' template.'; +$txt['theme_language_error'] = 'Unable to load the \'%s\' language file.'; + +$txt['parent_boards'] = 'Child Boards'; + +$txt['smtp_no_connect'] = 'Could not connect to SMTP host'; +$txt['smtp_bad_response'] = 'Couldn\'t get mail server response codes'; +$txt['smtp_error'] = 'Ran into problems sending Mail. Error: '; +$txt['mail_send_unable'] = 'Unable to send mail to the email address \'%s\''; + +$txt['mlist_search'] = 'Search for users'; +$txt['mlist_search2'] = 'Search again'; +$txt['mlist_search_email'] = 'Search by email address'; +$txt['mlist_search_messenger'] = 'Search by messenger nickname'; +$txt['mlist_search_group'] = 'Search by position'; +$txt['mlist_search_name'] = 'Search by name'; +$txt['mlist_search_website'] = 'Search by website'; +$txt['mlist_search_results'] = 'Search results for'; + +$txt['attach_downloaded'] = 'downloaded'; +$txt['attach_viewed'] = 'viewed'; +$txt['attach_times'] = 'times'; + +$txt['MSN'] = 'MSN'; + +$txt['never'] = 'Never'; + +$txt['hostname'] = 'Hostname'; +$txt['you_are_post_banned'] = 'Sorry %s, you are banned from posting or sending personal messages on this forum.'; +$txt['ban_reason'] = 'Reason'; + +$txt['tables_optimized'] = 'Database tables optimized'; + +$txt['add_poll'] = 'Add poll'; +$txt['poll_options6'] = 'You may only select up to %s options.'; +$txt['poll_remove'] = 'Remove Poll'; +$txt['poll_remove_warn'] = 'Are you sure you want to remove this poll from the topic?'; +$txt['poll_results_expire'] = 'Results will be shown when voting has closed'; +$txt['poll_expires_on'] = 'Voting closes'; +$txt['poll_expired_on'] = 'Voting closed'; +$txt['poll_change_vote'] = 'Remove Vote'; + +$txt['quick_mod_remove'] = 'Remove selected'; +$txt['quick_mod_lock'] = 'Lock selected'; +$txt['quick_mod_sticky'] = 'Sticky selected'; +$txt['quick_mod_move'] = 'Move selected to'; +$txt['quick_mod_merge'] = 'Merge selected'; +$txt['quick_mod_go'] = 'Go!'; +$txt['quickmod_confirm'] = 'Are you sure you want to do this?'; + +$txt['spell_check'] = 'Spell Check'; + +$txt['quick_reply_1'] = 'Quick Reply'; +$txt['quick_reply_2'] = 'With a Quick-Reply you can use bulletin board code and smileys as you would in a normal post, but much more conveniently.'; +$txt['quick_reply_warning'] = 'Warning: this topic is currently locked!
    Only admins and moderators can reply.'; + +$txt['notification_enable_board'] = 'Are you sure you wish to enable notification of new topics for this board?'; +$txt['notification_disable_board'] = 'Are you sure you wish to disable notification of new topics for this board?'; +$txt['notification_enable_topic'] = 'Are you sure you wish to enable notification of new replies for this topic?'; +$txt['notification_disable_topic'] = 'Are you sure you wish to disable notification of new replies for this topic?'; + +$txt['rtm1'] = 'Report to moderator'; + +$txt['unread_topics_visit'] = 'Recent Unread Topics'; +$txt['unread_topics_visit_none'] = 'No unread topics found since your last visit. Click here to try all unread topics.'; +$txt['unread_topics_all'] = 'All Unread Topics'; +$txt['unread_replies'] = 'Updated Topics'; + +$txt['who_title'] = 'Who\'s Online'; +$txt['who_and'] = ' and '; +$txt['who_viewing_topic'] = ' are viewing this topic.'; +$txt['who_viewing_board'] = ' are viewing this board.'; +$txt['who_member'] = 'Member'; + +$txt['powered_by_php'] = 'Powered by PHP'; +$txt['powered_by_mysql'] = 'Powered by MySQL'; +$txt['valid_html'] = 'Valid HTML 4.01!'; +$txt['valid_xhtml'] = 'Valid XHTML 1.0!'; +$txt['valid_css'] = 'Valid CSS!'; + +$txt['guest'] = 'Guest'; +$txt['guests'] = 'Guests'; +$txt['user'] = 'User'; +$txt['users'] = 'Users'; +$txt['hidden'] = 'Hidden'; + +$txt['merge_select_target_board'] = 'Select the target board of the merged topic'; +$txt['merge_select_poll'] = 'Select which poll the merged topic should have'; +$txt['merge_topic_list'] = 'Select topics to be merged'; +$txt['merge_select_subject'] = 'Select subject of merged topic'; +$txt['merge_custom_subject'] = 'Custom subject'; +$txt['merge_enforce_subject'] = 'Change the subject of all the messages'; +$txt['merge_include_notifications'] = 'Include notifications?'; +$txt['merge_check'] = 'Merge?'; +$txt['merge_no_poll'] = 'No poll'; + +$txt['response_prefix'] = 'Re: '; +$txt['current_icon'] = 'Current Icon'; + +$txt['smileys_current'] = 'Current Smiley Set'; +$txt['smileys_none'] = 'No Smileys'; + +$txt['search_results'] = 'Search Results'; +$txt['search_post_age'] = 'Message age'; +$txt['search_between'] = 'Between'; +$txt['search_and'] = 'and'; +$txt['search_options'] = 'Options'; +$txt['search_show_complete_messages'] = 'Show results as messages'; +$txt['search_subject_only'] = 'Topic subjects only'; +$txt['search_relevance'] = 'Relevance'; +$txt['search_matches'] = 'Matches'; +$txt['search_no_results'] = 'No results found'; +$txt['search_date_posted'] = 'Date Posted'; +$txt['search_order'] = 'Search order'; +$txt['search_orderby_relevant_first'] = 'Most relevant results first'; +$txt['search_orderby_large_first'] = 'Largest topics first'; +$txt['search_orderby_small_first'] = 'Smallest topics first'; +$txt['search_orderby_recent_first'] = 'Most recent topics first'; +$txt['search_orderby_old_first'] = 'Oldest topics first'; + +$txt['totalTimeLogged1'] = 'Total time logged in: '; +$txt['totalTimeLogged2'] = ' days, '; +$txt['totalTimeLogged3'] = ' hours and '; +$txt['totalTimeLogged4'] = ' minutes.'; +$txt['totalTimeLogged5'] = 'd '; +$txt['totalTimeLogged6'] = 'h '; +$txt['totalTimeLogged7'] = 'm'; + +$txt['approve_thereis'] = 'There is'; +$txt['approve_thereare'] = 'There are'; +$txt['approve_member'] = 'one member'; +$txt['approve_members'] = 'members'; +$txt['approve_members_waiting'] = 'awaiting approval.'; + +$txt['notifyboard_turnon'] = 'Do you want a notification email when someone posts a new topic in this board?'; +$txt['notifyboard_turnoff'] = 'Are you sure you do not want to receive new topic notifications for this board?'; + +$txt['activate_code'] = 'Your activation code is'; + +$txt['find_members'] = 'Find Members'; +$txt['find_username'] = 'Name, username, or email address'; +$txt['find_wildcards'] = 'Allowed Wildcards: *, ?'; +$txt['find_no_results'] = 'No results found'; +$txt['find_results'] = 'Results'; +$txt['find_close'] = 'Close'; + +$txt['unread_since_visit'] = 'Show unread posts since last visit.'; +$txt['show_unread_replies'] = 'Show new replies to your posts.'; + +$txt['change_color'] = 'Change Color'; + +$txt['quickmod_delete_selected'] = 'Delete Selected'; + +// In this string, don't use entities. (&, etc.) +$txt['show_personal_messages'] = 'You have received one or more new personal messages.\\nView them now (in a new window)?'; + +$txt['previous_next_back'] = '« previous'; +$txt['previous_next_forward'] = 'next »'; + +$txt['movetopic_auto_board'] = '[BOARD]'; +$txt['movetopic_auto_topic'] = '[TOPIC LINK]'; +$txt['movetopic_default'] = 'This topic has been moved to ' . $txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic']; + +$txt['upshrink_description'] = 'Shrink or expand the header.'; + +$txt['mark_unread'] = 'Mark unread'; + +$txt['ssi_not_direct'] = 'Please don\'t access SSI.php by URL directly; you may want to use the path (%s) or add ?ssi_function=something.'; + +//Karma Description Mod ( ) +$txt['karmaview'] = 'Karma Change Log'; /* */ +$txt['whykarmamod'] = 'Karma change'; /* */ +$txt['Description'] = 'No Description'; /* */ +$txt['karmamoder'] = 'Reason for changing the karma of this user'; /*, */ +$txt['karmarequare'] = '(Required field)'; /* */ +$txt['karmawho'] = 'Who'; /**/ +$txt['karmawhos'] = 'Whom'; /**/ +$txt['karmawhat'] = 'What (+/-)'; /**/ +$txt['karmadesc'] = 'For What'; /* */ +$txt['karmatime'] = 'When'; /**/ +$txt['karmanumb'] = 'Values: '; /* */ +$txt['statkarma'] = '[Karma Stats]'; /* */ +$txt['viewkarma_title'] = 'Karma Change Description'; /* */ +$txt['deletekarma'] = 'Delete'; /**/ +$txt['clearkarma'] = 'Clear'; /**/ +$txt['nextver'] = 'In next mod version'; +$txt['karma_delete_confirm'] = 'Are you sure you want to delete this record?'; /* ?*/ +$txt['karma_back'] = '< Back'; // +$txt['karma_continue'] = 'Continue >'; // +$txt['karmadescappl'] = ' (Applaud)'; // +$txt['karmadescsmi'] = ' (Smite)'; // +$txt['karmawhere'] = 'Where'; +$txt['karmawhereurl'] = 'In topic'; +$txt['karmawhereurl2'] = 'In PM'; +$txt['karma_delete'] = 'Delete'; +$txt['sure_about_karma_remove'] = 'Are you sure you want to delete this record?'; +$txt['karma_stat'] = 'Karma Statistic'; +$txt['karma_top_applaud'] = 'Top 5 applauded users'; +$txt['karma_top_smite'] = 'Top 5 smited users'; +$txt['karma_other_stat'] = 'General Statistics'; +$txt['karma_max_appl'] = 'User MAX applauding other users'; +$txt['karma_max_smit'] = 'User MAX smiting other users'; +$txt['karma_today'] = 'Karma points today'; +$txt['karma_today_plus'] = 'Today "+"'; +$txt['karma_today_minus'] = 'Today "-"'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/index.english.php~ b/Themes/fixed/languages/index.english.php~ new file mode 100644 index 0000000..2767cf5 --- /dev/null +++ b/Themes/fixed/languages/index.english.php~ @@ -0,0 +1,652 @@ + 'January'. (or translated, of course.) +$months = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); +$months_short = array(1 => 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); + +$txt['newmessages0'] = 'is new'; +$txt['newmessages1'] = 'are new'; +$txt['newmessages3'] = 'New'; +$txt['newmessages4'] = ','; + +$txt[2] = 'Admin'; + +$txt[10] = 'Save'; + +$txt[17] = 'Modify'; +$txt[18] = $context['forum_name'] . ' - Index'; +$txt[19] = 'Members'; +$txt[20] = 'Board name'; +$txt[21] = 'Posts'; +$txt[22] = 'Last post'; + +$txt[24] = '(No subject)'; +$txt[26] = 'Posts'; +$txt[27] = 'View Profile'; +$txt[28] = 'Guest'; +$txt[29] = 'Author'; +$txt[30] = 'on'; +$txt[31] = 'Remove'; +$txt[33] = 'Start new topic'; + +$txt[34] = 'Login'; +$txt[35] = 'Username'; +$txt[36] = 'Password'; + +$txt[40] = 'That username does not exist.'; + +$txt[62] = 'Board Moderator'; +$txt[63] = 'Remove Topic'; +$txt[64] = 'Topics'; +$txt[66] = 'Modify message'; +$txt[68] = 'Name'; +$txt[69] = 'Email'; +$txt[70] = 'Subject'; +$txt[72] = 'Message'; + +$txt[79] = 'Edit Profile'; + +$txt[81] = 'Choose password'; +$txt[82] = 'Verify password'; +$txt[87] = 'Position'; + +$txt[92] = 'View the profile of'; +$txt[94] = 'Total'; +$txt[95] = 'Posts'; +$txt[96] = 'Website'; +$txt[97] = 'Register'; + +$txt[101] = 'Message Index'; +$txt[102] = 'News'; +$txt[103] = 'Home'; + +$txt[104] = 'Lock/Unlock Topic'; +$txt[105] = 'Post'; +$txt[106] = 'An Error Has Occurred!'; +$txt[107] = 'at'; +$txt[108] = 'Logout'; +$txt[109] = 'Started by'; +$txt[110] = 'Replies'; +$txt[111] = 'Last post'; +$txt[114] = 'Administration Login'; +$txt[118] = 'Topic'; +$txt[119] = 'Help'; +$txt[121] = 'Remove message'; +$txt[125] = 'Notify'; +$txt[126] = 'Do you want a notification email if someone replies to this topic?'; +$txt[130] = "Regards,\nThe " . $context['forum_name'] . ' Team.'; +$txt[131] = 'Notify of replies'; +$txt[132] = 'Move Topic'; +$txt[133] = 'Move to'; +$txt[139] = 'Pages'; +$txt[140] = 'Users active in past ' . $modSettings['lastActive'] . ' minutes'; +$txt[144] = 'Personal Messages'; +$txt[145] = 'Reply with quote'; +$txt[146] = 'Reply'; + +$txt[151] = 'No messages...'; +$txt[152] = 'you have'; +$txt[153] = 'messages'; +$txt[154] = 'Remove this message'; + +$txt[158] = 'Users Online'; +$txt[159] = 'Personal Message'; +$txt[160] = 'Jump to'; +$txt[161] = 'go'; +$txt[162] = 'Are you sure you want to remove this topic?'; +$txt[163] = 'Yes'; +$txt[164] = 'No'; + +$txt[166] = 'Search Results'; +$txt[167] = 'End of results'; +$txt[170] = 'Sorry, no matches were found'; +$txt[176] = 'on'; + +$txt[182] = 'Search'; +$txt[183] = 'Set Search Parameters'; +$txt[189] = 'Choose a board to search in, or search all'; +$txt[190] = 'All'; + +$txt[193] = 'Back'; +$txt[194] = 'reminder'; +$txt[195] = 'Topic started by'; +$txt[196] = 'Title'; +$txt[197] = 'Post by'; +$txt[200] = 'Searchable list of all registered members.'; +$txt[201] = 'Please welcome'; +$txt[208] = 'Administration Center'; +$txt[209] = 'I\'m a llama!'; +$txt[211] = 'Last Edit'; +$txt[212] = 'Would you like to deactivate Notification on this topic?'; + +$txt[214] = 'Recent Posts'; + +$txt[227] = 'Location'; +$txt[231] = 'Gender'; +$txt[233] = 'Date Registered'; + +$txt[234] = 'View the 10 most recent posts on the forum.'; +$txt[235] = 'is the most recently updated topic'; +$txt[236] = 'Return'; +$txt[237] = 'to the board index.'; + +$txt[238] = 'Male'; +$txt[239] = 'Female'; + +$txt[240] = 'Invalid character used in Username.'; + +$txt['welcome_guest'] = 'Welcome, ' . $txt[28] . '. Please login or register.'; +$txt['welcome_guest_activate'] = '
    Did you miss your activation email?'; +$txt['hello_member'] = 'Hey,'; +$txt['hello_guest'] = 'Welcome,'; +$txt[247] = 'Hey,'; +$txt[248] = 'Welcome,'; +$txt[249] = 'Please'; +$txt[250] = 'Back'; +$txt[251] = 'Please select a destination'; + +$txt[279] = 'Posted by'; + +$txt[287] = 'Smiley'; +$txt[288] = 'Angry'; +$txt[289] = 'Cheesy'; +$txt[290] = 'Laugh'; +$txt[291] = 'Sad'; +$txt[292] = 'Wink'; +$txt[293] = 'Grin'; +$txt[294] = 'Shocked'; +$txt[295] = 'Cool'; +$txt[296] = 'Huh'; +$txt[450] = 'Roll Eyes'; +$txt[451] = 'Tongue'; +$txt[526] = 'Embarrassed'; +$txt[527] = 'Lips sealed'; +$txt[528] = 'Undecided'; +$txt[529] = 'Kiss'; +$txt[530] = 'Cry'; + +$txt[298] = 'Moderator'; +$txt[299] = 'Moderators'; + +$txt[300] = 'Mark Topics as Read for this Board'; +$txt[301] = 'Views'; +$txt[302] = 'New'; + +$txt[303] = 'View All Users'; +$txt[305] = 'View'; +$txt[307] = 'Email'; + +$txt[308] = 'Viewing Members'; +$txt[309] = 'of'; +$txt[310] = 'total members'; +$txt[311] = 'to'; +$txt[315] = 'Forgot your password?'; + +$txt[317] = 'Date'; +$txt[318] = 'From'; +$txt[319] = 'Subject'; +$txt[322] = 'Check for new messages'; +$txt[324] = 'To'; + +$txt[330] = 'Topics'; +$txt[331] = 'Members'; +$txt[332] = 'Members List'; +$txt[333] = 'New Posts'; +$txt[334] = 'No New Posts'; + +$txt['sendtopic_send'] = 'Send'; +$txt[343] = 'Match all words'; +$txt[344] = 'Match any words'; + +$txt[371] = 'Time Offset'; +$txt[377] = 'or'; + +$txt[398] = 'Sorry, no matches were found'; + +$txt[418] = 'Notification'; + +$txt[430] = 'Sorry %s, you are banned from using this forum!'; + +$txt[452] = 'Mark ALL messages as read'; + +$txt[454] = 'Hot Topic (More than ' . $modSettings['hotTopicPosts'] . ' Replies)'; +$txt[455] = 'Very Hot Topic (More than ' . $modSettings['hotTopicVeryPosts'] . ' Replies)'; +$txt[456] = 'Locked Topic'; +$txt[457] = 'Normal Topic'; +$txt['participation_caption'] = 'Topic you have posted in'; + +$txt[462] = 'GO'; + +$txt[465] = 'Print'; +$txt[467] = 'Profile'; +$txt[468] = 'Topic Summary'; +$txt[470] = 'N/A'; +$txt[471] = 'message'; +$txt[473] = 'This name is already in use by another member.'; + +$txt[488] = 'Total Members'; +$txt[489] = 'Total Posts'; +$txt[490] = 'Total Topics'; + +$txt[497] = 'Minutes to stay logged in'; + +$txt[507] = 'Preview'; +$txt[508] = 'Always stay logged in'; + +$txt[511] = 'Logged'; +$txt[512] = 'IP'; + +$txt[513] = 'ICQ'; +$txt[515] = 'WWW'; + +$txt[525] = 'by'; + +$txt[578] = 'hours'; +$txt[579] = 'days'; + +$txt[581] = ', our newest member.'; + +$txt[582] = 'Search for'; +$txt[583] = 'by user'; + +$txt[603] = 'AIM'; +// In this string, please use +'s for spaces. +$txt['aim_default_message'] = 'Hi.+Are+you+there?'; +$txt[604] = 'YIM'; + +$txt[616] = 'Remember, this forum is in \'Maintenance Mode\'.'; + +$txt[641] = 'Read'; +$txt[642] = 'times'; + +$txt[645] = 'Forum Stats'; +$txt[656] = 'Latest Member'; +$txt[658] = 'Total Categories'; +$txt[659] = 'Latest Post'; + +$txt[660] = 'You\'ve got'; +$txt[661] = 'Click'; +$txt[662] = 'here'; +$txt[663] = 'to view them.'; + +$txt[665] = 'Total Boards'; + +$txt[668] = 'Print Page'; + +$txt[679] = 'This must be a valid email address.'; + +$txt[683] = 'I am a geek!!'; +$txt[685] = $context['forum_name'] . ' - Info Center'; + +$txt[707] = 'Send this topic'; + +$txt['sendtopic_title'] = 'Send the topic "%s" to a friend.'; +$txt['sendtopic_dear'] = 'Dear %s,'; +$txt['sendtopic_this_topic'] = 'I want you to check out "%s" on ' . $context['forum_name'] . '. To view it, please click this link'; +$txt['sendtopic_thanks'] = 'Thanks'; +$txt['sendtopic_sender_name'] = 'Your name'; +$txt['sendtopic_sender_email'] = 'Your email address'; +$txt['sendtopic_receiver_name'] = 'Recipient\'s name'; +$txt['sendtopic_receiver_email'] = 'Recipient\'s email address'; +$txt['sendtopic_comment'] = 'Add a comment'; +$txt['sendtopic2'] = 'A comment has also been added regarding this topic'; + +$txt[721] = 'Hide email address from public?'; + +$txt[737] = 'Check all'; + +$txt[1001] = 'Database Error'; +$txt[1002] = 'Please try again. If you come back to this error screen, report the error to an administrator.'; +$txt[1003] = 'File'; +$txt[1004] = 'Line'; +$txt[1005] = 'SMF has detected and automatically tried to repair an error in your database. If you continue to have problems, or continue to receive these emails, please contact your host.'; +$txt['database_error_versions'] = 'Note: It appears that your database may require an upgrade. Your forum files are currently at version ' . $forum_version . ', whereas your database is at version SMF ' . $modSettings['smfVersion'] . '. It is recommended that you execute the latest version of upgrade.php.'; +$txt['template_parse_error'] = 'Template Parse Error!'; +$txt['template_parse_error_message'] = 'It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

    You can also try refreshing this page.'; +$txt['template_parse_error_details'] = 'There was a problem loading the %1$s template or language file. Please check the syntax and try again - remember, single quotes (\') often have to be escaped with a slash (\\). To see more specific error information from PHP, try accessing the file directly.

    You may want to try to refresh this page or use the default theme.'; + +$txt['smf10'] = 'Today at '; +$txt['smf10b'] = 'Yesterday at '; +$txt['smf20'] = 'Post new poll'; +$txt['smf21'] = 'Question'; +$txt['smf23'] = 'Submit Vote'; +$txt['smf24'] = 'Total Votes'; +$txt['smf25'] = 'shortcuts: hit alt+s to submit/post or alt+p to preview'; +$txt['smf29'] = 'View results.'; +$txt['smf30'] = 'Lock Voting'; +$txt['smf30b'] = 'Unlock Voting'; +$txt['smf39'] = 'Edit Poll'; +$txt['smf43'] = 'Poll'; +$txt['smf47'] = '1 Day'; +$txt['smf48'] = '1 Week'; +$txt['smf49'] = '1 Month'; +$txt['smf50'] = 'Forever'; +$txt['smf52'] = 'Login with username, password and session length'; +$txt['smf53'] = '1 Hour'; +$txt['smf56'] = 'MOVED'; +$txt['smf57'] = 'Please enter a brief description as to
    why this topic is being moved.'; +$txt['smf60'] = 'Sorry, you don\'t have enough posts to modify karma - you need at least '; +$txt['smf62'] = 'Sorry, you can\'t repeat a karma action without waiting '; +$txt['smf82'] = 'Board'; +$txt['smf88'] = 'in'; +$txt['smf96'] = 'Sticky Topic'; + +$txt['smf138'] = 'Delete'; + +$txt['smf199'] = 'Your Personal Messages'; + +$txt['smf211'] = 'KB'; + +$txt['smf223'] = '[More Stats]'; + +$txt['smf238'] = 'Code'; +$txt['smf239'] = 'Quote from'; +$txt['smf240'] = 'Quote'; + +$txt['smf251'] = 'Split Topic'; +$txt['smf252'] = 'Merge Topics'; +$txt['smf254'] = 'Subject For New Topic'; +$txt['smf255'] = 'Only split this post.'; +$txt['smf256'] = 'Split topic after and including this post.'; +$txt['smf257'] = 'Select posts to split.'; +$txt['smf258'] = 'New Topic'; +$txt['smf259'] = 'Topic successfully split into two topics.'; +$txt['smf260'] = 'Origin Topic'; +$txt['smf261'] = 'Please select which posts you wish to split.'; +$txt['smf264'] = 'Topics successfully merged.'; +$txt['smf265'] = 'Newly Merged Topic'; +$txt['smf266'] = 'Topic to be merged'; +$txt['smf267'] = 'Target board'; +$txt['smf269'] = 'Target topic'; +$txt['smf274'] = 'Are you sure you want to merge'; +$txt['smf275'] = 'with'; +$txt['smf276'] = 'This function will merge the messages of two topics into one topic. The messages will be sorted according to the time of posting. Therefore the earliest posted message will be the first message of the merged topic.'; + +$txt['smf277'] = 'Set topic sticky'; +$txt['smf278'] = 'Set topic non-sticky'; +$txt['smf279'] = 'Lock topic'; +$txt['smf280'] = 'Unlock topic'; + +$txt['smf298'] = 'Advanced search'; + +$txt['smf299'] = 'MAJOR SECURITY RISK:'; +$txt['smf300'] = 'You have not removed '; + +$txt['smf301'] = 'Page created in '; +$txt['smf302'] = ' seconds with '; +$txt['smf302b'] = ' queries.'; + +$txt['smf315'] = 'Use this function to inform the moderators and administrators of an abusive or wrongly posted message.
    Please note that your email address will be revealed to the moderators if you use this.'; + +$txt['online2'] = 'Online'; +$txt['online3'] = 'Offline'; +$txt['online4'] = 'Personal Message (Online)'; +$txt['online5'] = 'Personal Message (Offline)'; +$txt['online8'] = 'Status'; + +$txt['topbottom4'] = 'Go Up'; +$txt['topbottom5'] = 'Go Down'; + +$forum_copyright = $context['forum_name'] . ' | Powered by ' . $forum_version . '.
    +© 2001-2005, Lewis Media. All Rights Reserved.'; + +$txt['calendar3'] = 'Birthdays:'; +$txt['calendar4'] = 'Events:'; +$txt['calendar3b'] = 'Upcoming Birthdays:'; +$txt['calendar4b'] = 'Upcoming Events:'; +$txt['calendar5'] = ''; // Prompt for holidays in the calendar, leave blank to just display the holiday's name. +$txt['calendar9'] = 'Month:'; +$txt['calendar10'] = 'Year:'; +$txt['calendar11'] = 'Day:'; +$txt['calendar12'] = 'Event Title:'; +$txt['calendar13'] = 'Post In:'; +$txt['calendar20'] = 'Edit Event'; +$txt['calendar21'] = 'Delete this event?'; +$txt['calendar22'] = 'Delete Event'; +$txt['calendar23'] = 'Post Event'; +$txt['calendar24'] = 'Calendar'; +$txt['calendar37'] = 'Link to Calendar'; +$txt['calendar43'] = 'Link Event'; +$txt['calendar47'] = 'Upcoming Calendar'; +$txt['calendar47b'] = 'Today\'s Calendar'; +$txt['calendar51'] = 'Week'; +$txt['calendar54'] = 'Number of Days:'; +$txt['calendar_how_edit'] = 'how do you edit these events?'; + +$txt['moveTopic1'] = 'Post a redirection topic'; +$txt['moveTopic2'] = 'Change the topic\'s subject'; +$txt['moveTopic3'] = 'New subject'; +$txt['moveTopic4'] = 'Change every message\'s subject'; + +$txt['theme_template_error'] = 'Unable to load the \'%s\' template.'; +$txt['theme_language_error'] = 'Unable to load the \'%s\' language file.'; + +$txt['parent_boards'] = 'Child Boards'; + +$txt['smtp_no_connect'] = 'Could not connect to SMTP host'; +$txt['smtp_bad_response'] = 'Couldn\'t get mail server response codes'; +$txt['smtp_error'] = 'Ran into problems sending Mail. Error: '; +$txt['mail_send_unable'] = 'Unable to send mail to the email address \'%s\''; + +$txt['mlist_search'] = 'Search for users'; +$txt['mlist_search2'] = 'Search again'; +$txt['mlist_search_email'] = 'Search by email address'; +$txt['mlist_search_messenger'] = 'Search by messenger nickname'; +$txt['mlist_search_group'] = 'Search by position'; +$txt['mlist_search_name'] = 'Search by name'; +$txt['mlist_search_website'] = 'Search by website'; +$txt['mlist_search_results'] = 'Search results for'; + +$txt['attach_downloaded'] = 'downloaded'; +$txt['attach_viewed'] = 'viewed'; +$txt['attach_times'] = 'times'; + +$txt['MSN'] = 'MSN'; + +$txt['never'] = 'Never'; + +$txt['hostname'] = 'Hostname'; +$txt['you_are_post_banned'] = 'Sorry %s, you are banned from posting or sending personal messages on this forum.'; +$txt['ban_reason'] = 'Reason'; + +$txt['tables_optimized'] = 'Database tables optimized'; + +$txt['add_poll'] = 'Add poll'; +$txt['poll_options6'] = 'You may only select up to %s options.'; +$txt['poll_remove'] = 'Remove Poll'; +$txt['poll_remove_warn'] = 'Are you sure you want to remove this poll from the topic?'; +$txt['poll_results_expire'] = 'Results will be shown when voting has closed'; +$txt['poll_expires_on'] = 'Voting closes'; +$txt['poll_expired_on'] = 'Voting closed'; +$txt['poll_change_vote'] = 'Remove Vote'; + +$txt['quick_mod_remove'] = 'Remove selected'; +$txt['quick_mod_lock'] = 'Lock selected'; +$txt['quick_mod_sticky'] = 'Sticky selected'; +$txt['quick_mod_move'] = 'Move selected to'; +$txt['quick_mod_merge'] = 'Merge selected'; +$txt['quick_mod_go'] = 'Go!'; +$txt['quickmod_confirm'] = 'Are you sure you want to do this?'; + +$txt['spell_check'] = 'Spell Check'; + +$txt['quick_reply_1'] = 'Quick Reply'; +$txt['quick_reply_2'] = 'With a Quick-Reply you can use bulletin board code and smileys as you would in a normal post, but much more conveniently.'; +$txt['quick_reply_warning'] = 'Warning: this topic is currently locked!
    Only admins and moderators can reply.'; + +$txt['notification_enable_board'] = 'Are you sure you wish to enable notification of new topics for this board?'; +$txt['notification_disable_board'] = 'Are you sure you wish to disable notification of new topics for this board?'; +$txt['notification_enable_topic'] = 'Are you sure you wish to enable notification of new replies for this topic?'; +$txt['notification_disable_topic'] = 'Are you sure you wish to disable notification of new replies for this topic?'; + +$txt['rtm1'] = 'Report to moderator'; + +$txt['unread_topics_visit'] = 'Recent Unread Topics'; +$txt['unread_topics_visit_none'] = 'No unread topics found since your last visit. Click here to try all unread topics.'; +$txt['unread_topics_all'] = 'All Unread Topics'; +$txt['unread_replies'] = 'Updated Topics'; + +$txt['who_title'] = 'Who\'s Online'; +$txt['who_and'] = ' and '; +$txt['who_viewing_topic'] = ' are viewing this topic.'; +$txt['who_viewing_board'] = ' are viewing this board.'; +$txt['who_member'] = 'Member'; + +$txt['powered_by_php'] = 'Powered by PHP'; +$txt['powered_by_mysql'] = 'Powered by MySQL'; +$txt['valid_html'] = 'Valid HTML 4.01!'; +$txt['valid_xhtml'] = 'Valid XHTML 1.0!'; +$txt['valid_css'] = 'Valid CSS!'; + +$txt['guest'] = 'Guest'; +$txt['guests'] = 'Guests'; +$txt['user'] = 'User'; +$txt['users'] = 'Users'; +$txt['hidden'] = 'Hidden'; + +$txt['merge_select_target_board'] = 'Select the target board of the merged topic'; +$txt['merge_select_poll'] = 'Select which poll the merged topic should have'; +$txt['merge_topic_list'] = 'Select topics to be merged'; +$txt['merge_select_subject'] = 'Select subject of merged topic'; +$txt['merge_custom_subject'] = 'Custom subject'; +$txt['merge_enforce_subject'] = 'Change the subject of all the messages'; +$txt['merge_include_notifications'] = 'Include notifications?'; +$txt['merge_check'] = 'Merge?'; +$txt['merge_no_poll'] = 'No poll'; +$txt['merge_doublepost'] = 'Merge the Double Posts'; +$txt['merge_error_dbpo'] = 'You are not allowed to do this!'; +$txt['merge_error_notf'] = 'Sorry, no Posts found to Merge.'; +$txt['merge_error_noid'] = 'No Message ID or Topic found!'; +$txt['search_date_posted'] = 'Posted on'; +$txt['merge_error_lenth'] = 'The merged post have reached the maximum post length!'; + +$txt['response_prefix'] = 'Re: '; +$txt['current_icon'] = 'Current Icon'; + +$txt['smileys_current'] = 'Current Smiley Set'; +$txt['smileys_none'] = 'No Smileys'; + +$txt['search_results'] = 'Search Results'; +$txt['search_post_age'] = 'Message age'; +$txt['search_between'] = 'Between'; +$txt['search_and'] = 'and'; +$txt['search_options'] = 'Options'; +$txt['search_show_complete_messages'] = 'Show results as messages'; +$txt['search_subject_only'] = 'Topic subjects only'; +$txt['search_relevance'] = 'Relevance'; +$txt['search_matches'] = 'Matches'; +$txt['search_no_results'] = 'No results found'; +$txt['search_date_posted'] = 'Date Posted'; +$txt['search_order'] = 'Search order'; +$txt['search_orderby_relevant_first'] = 'Most relevant results first'; +$txt['search_orderby_large_first'] = 'Largest topics first'; +$txt['search_orderby_small_first'] = 'Smallest topics first'; +$txt['search_orderby_recent_first'] = 'Most recent topics first'; +$txt['search_orderby_old_first'] = 'Oldest topics first'; + +$txt['totalTimeLogged1'] = 'Total time logged in: '; +$txt['totalTimeLogged2'] = ' days, '; +$txt['totalTimeLogged3'] = ' hours and '; +$txt['totalTimeLogged4'] = ' minutes.'; +$txt['totalTimeLogged5'] = 'd '; +$txt['totalTimeLogged6'] = 'h '; +$txt['totalTimeLogged7'] = 'm'; + +$txt['approve_thereis'] = 'There is'; +$txt['approve_thereare'] = 'There are'; +$txt['approve_member'] = 'one member'; +$txt['approve_members'] = 'members'; +$txt['approve_members_waiting'] = 'awaiting approval.'; + +$txt['notifyboard_turnon'] = 'Do you want a notification email when someone posts a new topic in this board?'; +$txt['notifyboard_turnoff'] = 'Are you sure you do not want to receive new topic notifications for this board?'; + +$txt['activate_code'] = 'Your activation code is'; + +$txt['find_members'] = 'Find Members'; +$txt['find_username'] = 'Name, username, or email address'; +$txt['find_wildcards'] = 'Allowed Wildcards: *, ?'; +$txt['find_no_results'] = 'No results found'; +$txt['find_results'] = 'Results'; +$txt['find_close'] = 'Close'; + +$txt['unread_since_visit'] = 'Show unread posts since last visit.'; +$txt['show_unread_replies'] = 'Show new replies to your posts.'; + +$txt['change_color'] = 'Change Color'; + +$txt['quickmod_delete_selected'] = 'Delete Selected'; + +// In this string, don't use entities. (&, etc.) +$txt['show_personal_messages'] = 'You have received one or more new personal messages.\\nView them now (in a new window)?'; + +$txt['previous_next_back'] = '« previous'; +$txt['previous_next_forward'] = 'next »'; + +$txt['movetopic_auto_board'] = '[BOARD]'; +$txt['movetopic_auto_topic'] = '[TOPIC LINK]'; +$txt['movetopic_default'] = 'This topic has been moved to ' . $txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic']; + +$txt['upshrink_description'] = 'Shrink or expand the header.'; + +$txt['mark_unread'] = 'Mark unread'; + +$txt['ssi_not_direct'] = 'Please don\'t access SSI.php by URL directly; you may want to use the path (%s) or add ?ssi_function=something.'; + +//Karma Description Mod ( ) +$txt['karmaview'] = 'Karma Change Log'; /* */ +$txt['whykarmamod'] = 'Karma change'; /* */ +$txt['Description'] = 'No Description'; /* */ +$txt['karmamoder'] = 'Reason for changing the karma of this user'; /*, */ +$txt['karmarequare'] = '(Required field)'; /* */ +$txt['karmawho'] = 'Who'; /**/ +$txt['karmawhos'] = 'Whom'; /**/ +$txt['karmawhat'] = 'What (+/-)'; /**/ +$txt['karmadesc'] = 'For What'; /* */ +$txt['karmatime'] = 'When'; /**/ +$txt['karmanumb'] = 'Values: '; /* */ +$txt['statkarma'] = '[Karma Stats]'; /* */ +$txt['viewkarma_title'] = 'Karma Change Description'; /* */ +$txt['deletekarma'] = 'Delete'; /**/ +$txt['clearkarma'] = 'Clear'; /**/ +$txt['nextver'] = 'In next mod version'; +$txt['karma_delete_confirm'] = 'Are you sure you want to delete this record?'; /* ?*/ +$txt['karma_back'] = '< Back'; // +$txt['karma_continue'] = 'Continue >'; // +$txt['karmadescappl'] = ' (Applaud)'; // +$txt['karmadescsmi'] = ' (Smite)'; // +$txt['karmawhere'] = 'Where'; +$txt['karmawhereurl'] = 'In topic'; +$txt['karmawhereurl2'] = 'In PM'; +$txt['karma_delete'] = 'Delete'; +$txt['sure_about_karma_remove'] = 'Are you sure you want to delete this record?'; +$txt['karma_stat'] = 'Karma Statistic'; +$txt['karma_top_applaud'] = 'Top 5 applauded users'; +$txt['karma_top_smite'] = 'Top 5 smited users'; +$txt['karma_other_stat'] = 'General Statistics'; +$txt['karma_max_appl'] = 'User MAX applauding other users'; +$txt['karma_max_smit'] = 'User MAX smiting other users'; +$txt['karma_today'] = 'Karma points today'; +$txt['karma_today_plus'] = 'Today "+"'; +$txt['karma_today_minus'] = 'Today "-"'; + +?> \ No newline at end of file diff --git a/Themes/fixed/languages/index.russian.php b/Themes/fixed/languages/index.russian.php new file mode 100644 index 0000000..2b5c2f2 --- /dev/null +++ b/Themes/fixed/languages/index.russian.php @@ -0,0 +1,648 @@ + 'January'. (or translated, of course.) +$months = array(1 => '', '', '', '', '', '', '', '', '', '', '', ''); +$months_short = array(1 => '.', '.', '', '.', '', '', '', '.', '.', '.', '.', '.'); + +$txt['newmessages0'] = ''; +$txt['newmessages1'] = ''; +$txt['newmessages3'] = ''; +$txt['newmessages4'] = ','; + +$txt[2] = ''; + +$txt[10] = ''; + +$txt[17] = ''; +$txt[18] = $context['forum_name'] . ' - '; +$txt[19] = ''; +$txt[20] = ' '; +$txt[21] = ''; +$txt[22] = ' '; + +$txt[24] = '()'; +$txt[26] = ''; +$txt[27] = ''; +$txt[28] = ''; +$txt[29] = ''; +$txt[30] = ''; +$txt[31] = ''; +$txt[33] = ' '; + +$txt[34] = ''; +$txt[35] = ''; +$txt[36] = ''; + +$txt[40] = ' .'; + +$txt[62] = ''; +$txt[63] = ' '; +$txt[64] = ''; +$txt[66] = ''; +$txt[68] = ' '; +$txt[69] = 'E-mail'; +$txt[70] = ''; +$txt[72] = ''; + +$txt[79] = ' '; + +$txt[81] = ' '; +$txt[82] = ' '; +$txt[87] = ''; + +$txt[92] = ' '; +$txt[94] = ''; +$txt[95] = ''; +$txt[96] = ''; +$txt[97] = ''; + +$txt[101] = ' '; +$txt[102] = ''; +$txt[103] = ''; + +$txt[104] = '/ '; +$txt[105] = ''; +$txt[106] = '!'; +$txt[107] = ''; +$txt[108] = ''; +$txt[109] = ''; +$txt[110] = ''; +$txt[111] = ''; +$txt[114] = ' '; +$txt[118] = ''; +$txt[119] = ''; +$txt[121] = ' '; +$txt[125] = ' '; +$txt[126] = ' ? '; +$txt[130] = ' , '. $context['forum_name'] . ' .'; +$txt[131] = ' '; +$txt[132] = ' '; +$txt[133] = ' '; +$txt[139] = ''; +$txt[140] = ' ' . $modSettings['lastActive'] . ' '; +$txt[144] = ' '; +$txt[145] = ''; +$txt[146] = ' '; + +$txt[151] = ' ...'; +$txt[152] = ' '; +$txt[153] = ' '; +$txt[154] = ' '; + +$txt[158] = ' Online'; +$txt[159] = ' '; +$txt[160] = ' '; +$txt[161] = ''; +$txt[162] = ' , ?'; +$txt[163] = ''; +$txt[164] = ''; + +$txt[166] = ' '; +$txt[167] = ''; +$txt[170] = ' '; +$txt[176] = ''; + +$txt[182] = ''; +$txt[183] = ' '; +$txt[189] = ' '; +$txt[190] = ''; + +$txt[193] = ' '; +$txt[194] = ''; +$txt[195] = ''; +$txt[196] = ''; +$txt[197] = ''; +$txt[200] = ' .'; +$txt[201] = ' !'; +$txt[208] = ' '; +$txt[209] = ' !'; +$txt[211] = ' '; +$txt[212] = ' ? '; + +$txt[214] = ' '; + +$txt[227] = ' '; +$txt[231] = ''; +$txt[233] = ' '; + +$txt[234] = ' 10 .'; +$txt[235] = ' '; +$txt[236] = ''; +$txt[237] = ' '; + +$txt[238] = '.'; +$txt[239] = '.'; + +$txt[240] = ' . '; + +$txt['welcome_guest'] = ' , ' . $txt[28] . '. , .'; +$txt['welcome_guest_activate'] = '
    ?'; +$txt['hello_member'] = ','; +$txt['hello_guest'] = ' ,'; +$txt[247] = ','; +$txt[248] = ' ,'; +$txt[249] = ''; +$txt[250] = ''; +$txt[251] = ' '; + +$txt[279] = ''; + +$txt[287] = ''; +$txt[288] = ''; +$txt[289] = ''; +$txt[290] = ''; +$txt[291] = ''; +$txt[292] = ''; +$txt[293] = ''; +$txt[294] = ''; +$txt[295] = ''; +$txt[296] = ''; +$txt[450] = ' '; +$txt[451] = ''; +$txt[526] = ''; +$txt[527] = ' '; +$txt[528] = ' '; +$txt[529] = ''; +$txt[530] = ''; + +$txt[298] = ''; +$txt[299] = ''; + +$txt[300] = ' '; +$txt[301] = ''; +$txt[302] = ''; + +$txt[303] = ' '; +$txt[305] = ''; +$txt[307] = 'E-mail'; + +$txt[308] = ' '; +$txt[309] = ''; +$txt[310] = ''; +$txt[311] = ''; +$txt[315] = ' ?'; + +$txt[317] = ''; +$txt[318] = ''; +$txt[319] = ''; +$txt[322] = ''; +$txt[324] = ''; + +$txt[330] = ''; +$txt[331] = ''; +$txt[332] = ' '; +$txt[333] = ' '; +$txt[334] = ' '; + +$txt['sendtopic_send'] = ''; +$txt[343] = ' '; +$txt[344] = ' '; + +$txt[371] = ' '; +$txt[377] = ''; + +$txt[398] = ' '; + +$txt[418] = ''; + +$txt[430] = ' %s, !'; + +$txt[452] = ' '; + +$txt[454] = ' ( ' . $modSettings['hotTopicPosts'] . ' )'; +$txt[455] = ' ( ' . $modSettings['hotTopicVeryPosts'] . ' )'; +$txt[456] = ' '; +$txt[457] = ' '; +$txt['participation_caption'] = ' '; + +$txt[462] = ''; + +$txt[465] = ''; +$txt[467] = ''; +$txt[468] = ' '; +$txt[470] = 'N/A'; +$txt[471] = ''; +$txt[473] = ' .'; + +$txt[488] = ' '; +$txt[489] = ' '; +$txt[490] = ' '; + +$txt[497] = ' ( )'; + +$txt[507] = ' '; +$txt[508] = ''; + +$txt[511] = ''; +$txt[512] = 'IP'; + +$txt[513] = 'ICQ'; +$txt[515] = 'WWW'; + +$txt[525] = ''; + +$txt[578] = ''; +$txt[579] = ''; + +$txt[581] = ', .'; + +$txt[582] = ''; +$txt[583] = ' '; + +$txt[603] = 'AIM'; +// In this string, please use +'s for spaces. +$txt['aim_default_message'] = '+++?'; +$txt[604] = 'YIM'; + +$txt[616] = ', \' \'.'; + +$txt[641] = ''; +$txt[642] = ''; + +$txt[645] = ' '; +$txt[656] = ' '; +$txt[658] = ' '; +$txt[659] = ' '; + +$txt[660] = ' '; +$txt[661] = ''; +$txt[662] = ''; +$txt[663] = ' .'; + +$txt[665] = ' '; + +$txt[668] = ' '; + +$txt[679] = ' e-mail .'; + +$txt[683] = ' !!'; +$txt[685] = $context['forum_name'] . ' - '; + +$txt[707] = ''; + +$txt['sendtopic_title'] = ' "%s" .'; +$txt['sendtopic_dear'] = ' %s,'; +$txt['sendtopic_this_topic'] = ' "%s" ' . $context['forum_name'] . '. '; +$txt['sendtopic_thanks'] = ''; +$txt['sendtopic_sender_name'] = ' '; +$txt['sendtopic_sender_email'] = ' e-mail'; +$txt['sendtopic_receiver_name'] = ' '; +$txt['sendtopic_receiver_email'] = 'e-mail '; +$txt['sendtopic_comment'] = ' '; +$txt['sendtopic2'] = ' '; + +$txt[721] = ' e-mail ?'; + +$txt[737] = ' '; + +$txt[1001] = ' '; +$txt[1002] = ', . .'; +$txt[1003] = ''; +$txt[1004] = ''; +$txt[1005] = 'SMF- . , .'; +$txt['database_error_versions'] = ': , . - ' . $forum_version . ', - SMF-' . $modSettings['smfVersion'] . '. , upgrade.php.'; +$txt['template_parse_error'] = ' !'; +$txt['template_parse_error_message'] = ' - . , , , . , .

    .'; +$txt['template_parse_error_details'] = ' %1$s . , - , (\') (\\). PHP .

    .'; + +$txt['smf10'] = ' '; +$txt['smf10b'] = ' '; +$txt['smf20'] = ' '; +$txt['smf21'] = ''; +$txt['smf23'] = ''; +$txt['smf24'] = ' '; +$txt['smf25'] = ' : alt+s alt+p '; +$txt['smf29'] = ' .'; +$txt['smf30'] = ' '; +$txt['smf30b'] = ' '; +$txt['smf39'] = ' '; +$txt['smf43'] = ''; +$txt['smf47'] = '1 '; +$txt['smf48'] = '1 '; +$txt['smf49'] = '1 '; +$txt['smf50'] = ''; +$txt['smf52'] = ''; +$txt['smf53'] = '1 '; +$txt['smf56'] = ''; +$txt['smf57'] = ',
    .'; +$txt['smf60'] = ', - , '; +$txt['smf62'] = ', , .'; +$txt['smf82'] = ' ()'; +$txt['smf88'] = ''; +$txt['smf96'] = ' '; + +$txt['smf138'] = ''; + +$txt['smf199'] = ' '; + +$txt['smf211'] = 'KB'; + +$txt['smf223'] = '[ ]'; + +$txt['smf238'] = ''; +$txt['smf239'] = ' '; +$txt['smf240'] = ''; + +$txt['smf251'] = ' '; +$txt['smf252'] = ' '; +$txt['smf252lnk'] = 'Ob\'dinit\' temy'; +$txt['smf254'] = ' '; +$txt['smf255'] = ' .'; +$txt['smf256'] = ' , .'; +$txt['smf257'] = ' .'; +$txt['smf258'] = ' '; +$txt['smf259'] = ' .'; +$txt['smf260'] = ' '; +$txt['smf261'] = ', , . '; +$txt['smf264'] = ' .'; +$txt['smf265'] = ' '; +$txt['smf266'] = ' '; +$txt['smf267'] = ' '; +$txt['smf269'] = ' '; +$txt['smf274'] = ' , '; +$txt['smf275'] = ''; +$txt['smf276'] = ' . . .'; + +$txt['smf277'] = ' '; +$txt['smf278'] = ' '; +$txt['smf279'] = ' '; +$txt['smf280'] = ' '; + +$txt['smf298'] = ' '; + +$txt['smf299'] = ' :'; +$txt['smf300'] = ' '; + +$txt['smf301'] = ' '; +$txt['smf302'] = ''; +$txt['smf302b'] = ' .'; + +$txt['smf315'] = ' .
    , e-mail .'; + +$txt['online2'] = 'Online'; +$txt['online3'] = 'Offline'; +$txt['online4'] = 'PM'; +$txt['online5'] = 'PM'; +$txt['online8'] = ''; + +$txt['topbottom4'] = ''; +$txt['topbottom5'] = ''; + +$forum_copyright = $context['forum_name'] . ' | Powered by ' . $forum_version . '.
    +© 2001-2005, Lewis Media. All Rights Reserved.'; + +$txt['calendar3'] = ' :'; +$txt['calendar4'] = ':'; +$txt['calendar3b'] = ' :'; +$txt['calendar4b'] = ' :'; +$txt['calendar5'] = ''; // Prompt for holidays in the calendar, leave blank to just display the holiday's name. +$txt['calendar9'] = ':'; +$txt['calendar10'] = ':'; +$txt['calendar11'] = ':'; +$txt['calendar12'] = ' :'; +$txt['calendar13'] = ' :'; +$txt['calendar20'] = ' '; +$txt['calendar21'] = ' ?'; +$txt['calendar22'] = ' '; +$txt['calendar23'] = ' '; +$txt['calendar24'] = ''; +$txt['calendar37'] = ' '; +$txt['calendar43'] = ' '; +$txt['calendar47'] = ' '; +$txt['calendar47b'] = ' '; +$txt['calendar51'] = ''; +$txt['calendar54'] = ' :'; +$txt['calendar_how_edit'] = ' ?'; + +$txt['moveTopic1'] = ' '; +$txt['moveTopic2'] = ' '; +$txt['moveTopic3'] = ' '; +$txt['moveTopic4'] = ' '; + +$txt['theme_template_error'] = ' \'%s\' .'; +$txt['theme_language_error'] = ' \'%s\' .'; + +$txt['parent_boards'] = ''; + +$txt['smtp_no_connect'] = ' SMTP '; +$txt['smtp_bad_response'] = ' mail-'; +$txt['smtp_error'] = ' e-mail. : '; +$txt['mail_send_unable'] = ' \'%s\''; + +$txt['mlist_search'] = ' '; +$txt['mlist_search2'] = ' '; +$txt['mlist_search_email'] = ' mail'; +$txt['mlist_search_messenger'] = ' '; +$txt['mlist_search_group'] = ' '; +$txt['mlist_search_name'] = ' '; +$txt['mlist_search_website'] = ' '; +$txt['mlist_search_results'] = ' '; + +$txt['attach_downloaded'] = ''; +$txt['attach_viewed'] = ''; +$txt['attach_times'] = ''; + +$txt['MSN'] = 'MSN'; + +$txt['never'] = ''; + +$txt['hostname'] = 'Hostname'; +$txt['you_are_post_banned'] = ' %s, .'; +$txt['ban_reason'] = ''; + +$txt['tables_optimized'] = ' '; + +$txt['add_poll'] = ' '; +$txt['poll_options6'] = ' %s .'; +$txt['poll_remove'] = ' '; +$txt['poll_remove_warn'] = ' , ?'; +$txt['poll_results_expire'] = ' '; +$txt['poll_expires_on'] = ' '; +$txt['poll_expired_on'] = ' '; +$txt['poll_change_vote'] = ' '; + +$txt['quick_mod_remove'] = ' '; +$txt['quick_mod_lock'] = ' '; +$txt['quick_mod_sticky'] = ' '; +$txt['quick_mod_move'] = ' '; +$txt['quick_mod_merge'] = ' '; +$txt['quick_mod_go'] = 'Go!'; +$txt['quickmod_confirm'] = ' ?'; + +$txt['spell_check'] = ' '; + +$txt['quick_reply_1'] = ' '; +$txt['quick_reply_2'] = ' , .'; +$txt['quick_reply_warning'] = ': !
    .'; + +$txt['notification_enable_board'] = ' , ?'; +$txt['notification_disable_board'] = ' ?'; +$txt['notification_enable_topic'] = ' , ?'; +$txt['notification_disable_topic'] = ' ?'; + +$txt['rtm1'] = ' '; + +$txt['unread_topics_visit'] = ' '; +$txt['unread_topics_visit_none'] = ' . ..'; +$txt['unread_topics_all'] = ' '; +$txt['unread_replies'] = ' '; + +$txt['who_title'] = ' Online'; +$txt['who_and'] = ' '; +$txt['who_viewing_topic'] = ' .'; +$txt['who_viewing_board'] = ' .'; +$txt['who_member'] = ''; + +$txt['powered_by_php'] = 'Powered by PHP'; +$txt['powered_by_mysql'] = 'Powered by MySQL'; +$txt['valid_html'] = 'Valid HTML 4.01!'; +$txt['valid_xhtml'] = 'Valid XHTML 1.0!'; +$txt['valid_css'] = 'Valid CSS!'; + +$txt['guest'] = ''; +$txt['guests'] = ''; +$txt['user'] = ''; +$txt['users'] = ''; +$txt['hidden'] = ''; + +$txt['merge_select_target_board'] = ' '; +$txt['merge_select_poll'] = ' '; +$txt['merge_topic_list'] = ' '; +$txt['merge_select_subject'] = ' '; +$txt['merge_custom_subject'] = ' '; +$txt['merge_enforce_subject'] = ' '; +$txt['merge_include_notifications'] = ' ?'; +$txt['merge_check'] = '?'; +$txt['merge_no_poll'] = ' '; + +$txt['response_prefix'] = 'Re: '; +$txt['current_icon'] = ''; + +$txt['smileys_current'] = ' '; +$txt['smileys_none'] = ' '; + +$txt['search_results'] = ' '; +$txt['search_post_age'] = ' '; +$txt['search_between'] = ''; +$txt['search_and'] = ''; +$txt['search_options'] = ''; +$txt['search_show_complete_messages'] = ' '; +$txt['search_subject_only'] = ' '; +$txt['search_relevance'] = ''; +$txt['search_matches'] = ''; +$txt['search_no_results'] = ' '; +$txt['search_date_posted'] = ' '; +$txt['search_order'] = ' '; +$txt['search_orderby_relevant_first'] = ''; +$txt['search_orderby_large_first'] = ' ( )'; +$txt['search_orderby_small_first'] = ' ( ) '; +$txt['search_orderby_recent_first'] = ' ( )'; +$txt['search_orderby_old_first'] = ' ( )'; + +$txt['totalTimeLogged1'] = ' : '; +$txt['totalTimeLogged2'] = ' , '; +$txt['totalTimeLogged3'] = ' . '; +$txt['totalTimeLogged4'] = ' .'; +$txt['totalTimeLogged5'] = ' '; +$txt['totalTimeLogged6'] = ' '; +$txt['totalTimeLogged7'] = ''; + +$txt['approve_thereis'] = ''; +$txt['approve_thereare'] = ''; +$txt['approve_member'] = ' '; +$txt['approve_members'] = ''; +$txt['approve_members_waiting'] = ' .'; + +$txt['notifyboard_turnon'] = ' ?'; +$txt['notifyboard_turnoff'] = ' , ?'; + +$txt['activate_code'] = ' '; + +$txt['find_members'] = ' '; +$txt['find_username'] = ', e-mail'; +$txt['find_wildcards'] = ' : *, ?'; +$txt['find_no_results'] = ' '; +$txt['find_results'] = ''; +$txt['find_close'] = ''; + +$txt['unread_since_visit'] = ' .'; +$txt['show_unread_replies'] = ' .'; + +$txt['change_color'] = ' '; + +$txt['quickmod_delete_selected'] = ' '; + +// In this string, don't use entities. (&, etc.) +$txt['show_personal_messages'] = ' \\ ( )?'; + +$txt['previous_next_back'] = '? '; +$txt['previous_next_forward'] = ' ?'; + +$txt['movetopic_auto_board'] = '[ ]'; +$txt['movetopic_auto_topic'] = '[ ]'; +$txt['movetopic_default'] = ' ' . $txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic']; + +$txt['upshrink_description'] = ' .'; + +$txt['mark_unread'] = ' '; + +$txt['ssi_not_direct'] = ' SSI.php ; (%s) ?ssi_function=something.'; + +//Karma Description Mod ( ) +$txt['karmaview'] = ' '; +$txt['whykarmamod'] = ' '; +$txt['Description'] = ' '; +$txt['karmamoder'] = ', '; +$txt['karmarequare'] = '( )'; +$txt['karmawho'] = ''; +$txt['karmawhos'] = ''; +$txt['karmawhat'] = '(+/-)'; +$txt['karmadesc'] = ' '; +$txt['karmatime'] = ''; +$txt['karmanumb'] = ' :'; +$txt['statkarma'] = '[Karma Stats]'; /* */ +$txt['viewkarma_title'] = 'Karma Change Description'; /* */ +$txt['deletekarma'] = ''; +$txt['clearkarma'] = ''; +$txt['nextver'] = 'In next mod version'; +$txt['karma_delete_confirm'] = ' ?'; +$txt['karma_back'] = '< '; +$txt['karma_continue'] = ' >'; +$txt['karmadescappl'] = ' (+)'; // +$txt['karmadescsmi'] = ' (-)'; // +$txt['karmawhere'] = 'Where'; +$txt['karmawhereurl'] = ' '; +$txt['karmawhereurl2'] = ' '; +$txt['karma_delete'] = 'Delete'; +$txt['sure_about_karma_remove'] = 'Are you sure you want to delete this record?'; +$txt['karma_stat'] = 'Karma Statistic'; +$txt['karma_top_applaud'] = '5 '; +$txt['karma_top_smite'] = '5 '; +$txt['karma_other_stat'] = 'General Statistics'; +$txt['karma_max_appl'] = 'User MAX applauding other users'; +$txt['karma_max_smit'] = 'User MAX smiting other users'; +$txt['karma_today'] = 'Karma points today'; +$txt['karma_today_plus'] = 'Today "+"'; +$txt['karma_today_minus'] = 'Today "-"'; + +$txt['post_no'] = " #" +?> diff --git a/Themes/fixed/license.txt b/Themes/fixed/license.txt new file mode 100644 index 0000000..2bf90ec --- /dev/null +++ b/Themes/fixed/license.txt @@ -0,0 +1,73 @@ +Definitions +----------------------------------------------------------------------------- +i. This Package is defined as all of the files within any archive file or any +group of files released in conjunction by Simple Machines, Lewis Media, or a +derived or modified work based on such files. + +ii. A Modification, or a Mod, is defined as instructions, to be performed +manually or in an automated manner, that alter any part of this Package. + +iii. A Modified Package is defined as this Package or a derivative of it with +one or more Modification applied to it. + +iv. Distribution is defined as allowing one or more other people to in any +way download or receive a copy of this Package, a Modified Package, or a +derivative of this Package. + +v. The Software is defined as an installed copy of this Package, a Modified +Package, or a derivative of this Package. + +vi. The Simple Machines Website is defined as http://www.simplemachines.org/. + +Agreement +----------------------------------------------------------------------------- +1. Permission is hereby granted to use, copy, modify and/or distribute this +Package, provided that: + a. All copyright notices within source files and as generated by the +Software as output are retained, unchanged. + b. Any Distribution of this Package, whether as a Modified Package or +not, includes this file and is released under the terms of this Agreement. +This clause is not dependent upon any measure of changes made to this +Package. + c. This Package, Modified Packages, and derivative works may not be +sold or released under any paid license. Copying fees for the transport of +this Package, support fees for installation or other services, and hosting +fees for hosting the Software may, however, be imposed. + d. Any Distribution of this Package, whether as a Modified Package +or not, requires express written consent from Lewis Media. + +2. You may make Modifications to this Package or a derivative of it, and +distribute your Modifications in a form that is separate from the Package, +such as patches. The following restrictions apply to Modifications: + a. A Modification must not alter or remove any copyright notices in +the Software or Package, generated or otherwise. + b. When a Modification to the Package is released, a non-exclusive +royalty-free right is granted to Lewis Media to distribute the Modification +in future versions of the Package provided such versions remain available +under the terms of this Agreement in addition to any other license(s) of the +initial developer. + c. Any Distribution of a Modified Package or derivative requires +express written consent from Lewis Media. + +3. Permission is hereby also granted to distribute programs which depend on +this Package, provided that you do not distribute any Modified Package +without express written consent. + +4. Lewis Media reserves the right to change the terms of this Agreement at +any time, although those changes are not retroactive to past releases. +Changes to this document will be announced via email using the Simple +Machines email notification list. Failure to receive notification of a change +does not make those changes invalid. A current copy of this Agreement can be +found on the Simple Machines Website. + +5. This Agreement will terminate automatically if you fail to comply with the +limitations described herein. Upon termination, you must destroy all copies +of this Package, the Software, and any derivatives within 48 hours. + +----------------------------------------------------------------------------- +THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY WARRANTY. ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY +OUT OF THE USE OR MISUSE OF THIS PACKAGE. \ No newline at end of file diff --git a/Themes/fixed/minmax.js b/Themes/fixed/minmax.js new file mode 100644 index 0000000..3d4c7d6 --- /dev/null +++ b/Themes/fixed/minmax.js @@ -0,0 +1,145 @@ +// minmax.js: make IE5+/Win support CSS min/max-width/height +// version 1.0, 08-Aug-2003 +// written by Andrew Clover , use freely + +/*@cc_on +@if (@_win32 && @_jscript_version>4) + +var minmax_elements; + +minmax_props= new Array( + new Array('max-height','maxHeight') +); + +// Binding. Called on all new elements. If , initialise; check all +// elements for minmax properties + +function minmax_bind(el) { + + var i, em, ms; + var st= el.style, cs= el.currentStyle; + + if (minmax_elements==window.undefined) { + // initialise when body element has turned up, but only on IE + if (!document.body || !document.body.currentStyle) return; + minmax_elements= new Array(); + window.attachEvent('onresize', minmax_delayout); + // make font size listener + em= document.createElement('div'); + em.setAttribute('id', 'minmax_em'); + em.style.position= 'absolute'; em.style.visibility= 'hidden'; + em.style.fontSize= 'xx-large'; em.style.height= '5em'; + em.style.top='-5em'; em.style.left= '0'; + if (em.style.setExpression) { + em.style.setExpression('width', 'minmax_checkFont()'); + document.body.insertBefore(em, document.body.firstChild); + } + } + + //if(el.class!="signature") return; + + // transform hyphenated properties the browser has not caught to camelCase + for (i= minmax_props.length; i-->0;) + if (cs[minmax_props[i][0]]) + st[minmax_props[i][1]]= cs[minmax_props[i][0]]; + // add element with properties to list, store optimal size values + for (i= minmax_props.length; i-->0;) { + ms= cs[minmax_props[i][1]]; + if (ms && ms!='auto' && ms!='none' && ms!='0' && ms!='') { + st.minmaxWidth= cs.width; st.minmaxHeight= cs.height; + minmax_elements[minmax_elements.length]= el; + // will need a layout later + minmax_delayout(); + break; + } } +} + +// check for font size changes + +var minmax_fontsize= 0; +function minmax_checkFont() { + var fs= document.getElementById('minmax_em').offsetHeight; + if (minmax_fontsize!=fs && minmax_fontsize!=0) + minmax_delayout(); + minmax_fontsize= fs; + return '5em'; +} + +// Layout. Called after window and font size-change. Go through elements we +// picked out earlier and set their size to the minimum, maximum and optimum, +// choosing whichever is appropriate + +// Request re-layout at next available moment +var minmax_delaying= false; +function minmax_delayout() { + if (minmax_delaying) return; + minmax_delaying= true; + window.setTimeout(minmax_layout, 0); +} + +function minmax_stopdelaying() { + minmax_delaying= false; +} + +function minmax_layout() { + window.setTimeout(minmax_stopdelaying, 100); + var i, el, st, cs, optimal, inrange; + for (i= minmax_elements.length; i-->0;) { + el= minmax_elements[i]; st= el.style; cs= el.currentStyle; + + // horizontal size bounding + st.width= st.minmaxWidth; optimal= el.offsetWidth; + inrange= true; + if (inrange && cs.minWidth && cs.minWidth!='0' && cs.minWidth!='auto' && cs.minWidth!='') { + st.width= cs.minWidth; + inrange= (el.offsetWidthoptimal); + } + if (inrange) st.width= st.minmaxWidth; + + // vertical size bounding + st.height= st.minmaxHeight; optimal= el.offsetHeight; + inrange= true; + if (inrange && cs.minHeight && cs.minHeight!='0' && cs.minHeight!='auto' && cs.minHeight!='') { + st.height= cs.minHeight; + inrange= (el.offsetHeightoptimal); + } + if (inrange) st.height= st.minmaxHeight; + } +} + +// Scanning. Check document every so often until it has finished loading. Do +// nothing until arrives, then call main init. Pass any new elements +// found on each scan to be bound + +var minmax_SCANDELAY= 1500; + +function minmax_scan() { + var el; + for (var i= 0; i 0 && (theValue.charAt(0) == ' ' || theValue.charAt(0) == '\t')) + theValue = theValue.substring(1, theValue.length); + // Strip whitespace off the right side. + while (theValue.length > 0 && (theValue.charAt(theValue.length - 1) == ' ' || theValue.charAt(theValue.length - 1) == '\t')) + theValue = theValue.substring(0, theValue.length - 1); + + if (theValue == '') + return true; + else + return false; +} + +// Only allow form submission ONCE. +function submitonce(theform) +{ + smf_formSubmitted = true; +} +function submitThisOnce(item) +{ + // Hateful, hateful fix for Safari 1.3 beta. + if (navigator.userAgent.indexOf('AppleWebKit') != -1) + return !smf_formSubmitted; + + for (var i = 0; i < item.form.length; i++) + if (typeof(item.form[i]) != "undefined" && item.form[i].tagName.toLowerCase() == "textarea") + item.form[i].readOnly = true; + + return !smf_formSubmitted; +} + +// Set the "inside" HTML of an element. +function setInnerHTML(element, toValue) +{ + // IE has this built in... + if (typeof(element.innerHTML) != 'undefined') + element.innerHTML = toValue; + else + { + var range = document.createRange(); + range.selectNodeContents(element); + range.deleteContents(); + element.appendChild(range.createContextualFragment(toValue)); + } +} + +// Set the "outer" HTML of an element. +function setOuterHTML(element, toValue) +{ + if (typeof(element.outerHTML) != 'undefined') + element.outerHTML = toValue; + else + { + var range = document.createRange(); + range.setStartBefore(element); + element.parentNode.replaceChild(range.createContextualFragment(toValue), element); + } +} + +// Get the inner HTML of an element. +function getInnerHTML(element) +{ + if (typeof(element.innerHTML) != 'undefined') + return element.innerHTML; + else + { + var returnStr = ''; + for (var i = 0; i < element.childNodes.length; i++) + returnStr += getOuterHTML(element.childNodes[i]); + + return returnStr; + } +} + +function getOuterHTML(node) +{ + if (typeof(node.outerHTML) != 'undefined') + return node.outerHTML; + + var str = ''; + + switch (node.nodeType) + { + // An element. + case 1: + str += '<' + node.nodeName; + + for (var i = 0; i < node.attributes.length; i++) + { + if (node.attributes[i].nodeValue != null) + str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"'; + } + + if (node.childNodes.length == 0 && in_array(node.nodeName.toLowerCase(), ['hr', 'input', 'img', 'link', 'meta', 'br'])) + str += ' />'; + else + str += '>' + getInnerHTML(node) + ''; + break; + + // 2 is an attribute. + + // Just some text.. + case 3: + str += node.nodeValue; + break; + + // A CDATA section. + case 4: + str += ''; + break; + + // Entity reference.. + case 5: + str += '&' + node.nodeName + ';'; + break; + + // 6 is an actual entity, 7 is a PI. + + // Comment. + case 8: + str += ''; + break; + } + + return str; +} + +// Checks for variable in theArray. +function in_array(variable, theArray) +{ + for (var i = 0; i < theArray.length; i++) + { + if (theArray[i] == variable) + return true; + } + return false; +} + +// Find a specific radio button in its group and select it. +function selectRadioByName(radioGroup, name) +{ + for (var i = 0; i < radioGroup.length; i++) + { + if (radioGroup[i].value == name) + return radioGroup[i].checked = true; + } + + return false; +} + +// Invert all checkboxes at once by clicking a single checkbox. +function invertAll(headerfield, checkform, mask) +{ + for (var i = 0; i < checkform.length; i++) + { + if (typeof(mask) != "undefined" && checkform[i].name.substr(0, mask.length) != mask) + continue; + + if (!checkform[i].disabled) + checkform[i].checked = headerfield.checked; + } +} +function emoticon(text) +{ + replaceText(text, document.postmodify.message); +} + +function getMsgInfo(_name, _topic_id, _msg_id, _date) { + quote_name=_name; + quote_topic_id=_topic_id; + quote_msg_id=_msg_id; + quote_date=_date; +} + +function quoteSelection() { + var txt = ''; + if (window.getSelection) { + txt = window.getSelection(); + } + else if (document.getSelection) { + txt = document.getSelection(); + } + else if (document.selection) { + txt = document.selection.createRange().text; + } + + if (txt) { + // Add tags around selection + emoticon('[quote author='+quote_name+' link=topic='+quote_topic_id+'.msg'+quote_msg_id+'#msg'+quote_msg_id+' date='+quote_date+']' + txt+ '[/quote]\n'); + txt = ''; + return; + }else{ + alert(" "); + } +} diff --git a/Themes/fixed/spellcheck.js b/Themes/fixed/spellcheck.js new file mode 100644 index 0000000..fb3b70d --- /dev/null +++ b/Themes/fixed/spellcheck.js @@ -0,0 +1,269 @@ +// Public functions -------------------------------- + +// spellCheck - spell check a field +function spellCheck(formName, fieldName, spelltext) +{ + var spellform = document.forms['spell_form']; + + spellform.spell_formname.value = formName; + spellform.spell_fieldname.value = fieldName; + spellform.spellstring.value = document.forms[formName][fieldName].value; + + openSpellWin(640, 480); + spellform.submit(); + + return true; +} + +// Private functions ------------------------------- + +// globals +var wordindex = -1, offsetindex = 0; +var ignoredWords = []; + +// misspelled word object +function misp(word, start, end, suggestions) +{ + // The word, start index, end index, and array of suggestions. + this.word = word; + this.start = start; + this.end = end; + this.suggestions = suggestions; +} + +// replace the word in the misps array at the "wordindex" index. The +// misps array is generated by a PHP script after the string to be spell +// checked is evaluated with pspell +function replaceWord() +{ + var frm = document.fm1; + var strstart = ''; + var strend; + + // if this isn't the beginning of the string then get all of the string + // that is before the word we are replacing + if (misps[wordindex].start != 0) + strstart = mispstr.slice(0, misps[wordindex].start + offsetindex); + + // get the end of the string after the word we are replacing + strend = mispstr.slice(misps[wordindex].end + 1 + offsetindex); + + // rebuild the string with the new word + mispstr = strstart + frm.changeto.value + strend; + + // update offsetindex to compensate for replacing a word with a word + // of a different length. + offsetindex += frm.changeto.value.length - misps[wordindex].word.length; + + // update the word so future replaceAll calls don't change it + misps[wordindex].word = frm.changeto.value; + + nextWord(false); +} + +// replaces all instances of currently selected word with contents chosen by user. +// note: currently only replaces words after highlighted word. I think we can re-index +// all words at replacement or ignore time to have it wrap to the beginning if we want +// to. +function replaceAll() +{ + var frm = document.fm1; + var strstart = ''; + var strend; + var idx; + var origword; + var localoffsetindex = offsetindex; + + origword = misps[wordindex].word; + + // reindex everything past the current word + for (idx = wordindex; idx < misps.length; idx++) + { + misps[idx].start += localoffsetindex; + misps[idx].end += localoffsetindex; + } + + localoffsetindex = 0; + + for (idx = 0; idx < misps.length; idx++) + { + if (misps[idx].word == origword) + { + if (misps[idx].start != 0) + strstart = mispstr.slice(0, misps[idx].start + localoffsetindex); + + // get the end of the string after the word we are replacing + strend = mispstr.slice(misps[idx].end + 1 + localoffsetindex); + + // rebuild the string with the new word + mispstr = strstart + frm.changeto.value + strend; + + // update offsetindex to compensate for replacing a word with a word + // of a different length. + localoffsetindex += frm.changeto.value.length - misps[idx].word.length; + } + + // we have to re-index everything after replacements + misps[idx].start += localoffsetindex; + misps[idx].end += localoffsetindex; + } + + // add the word to the ignore array + ignoredWords[origword] = true; + + // reset offsetindex since we reindexed + offsetindex = 0; + + nextWord(false); +} + +// highlight the word that was selected using the nextWord function +function highlightWord() +{ + var strstart = ''; + var strend; + + // if this isn't the beginning of the string then get all of the string + // that is before the word we are replacing + + if (misps[wordindex].start != 0) + strstart = mispstr.slice(0, misps[wordindex].start + offsetindex); + + // get the end of the string after the word we are replacing + + strend = mispstr.slice(misps[wordindex].end + 1 + offsetindex); + + // rebuild the string with a span wrapped around the misspelled word + // so we can highlight it in the div the user is viewing the string in + + var divptr, newValue; + divptr = document.getElementById("spellview"); + + newValue = un_htmlspecialchars(strstart) + '' + misps[wordindex].word + '' + un_htmlspecialchars(strend); + setInnerHTML(divptr, newValue.replace(/_\|_/g, '
    ')); + + var spellview_height = typeof(document.getElementById("spellview").currentStyle) != "undefined" ? parseInt(document.getElementById("spellview").currentStyle.height) : document.getElementById("spellview").offsetHeight; + var word_position = document.getElementById("h1").offsetTop; + var current_position = document.getElementById("spellview").scrollTop; + + // The spellview is not tall enough! Scroll down! + if (spellview_height <= (word_position + current_position)) + document.getElementById("spellview").scrollTop = word_position + current_position - spellview_height + 32; +} + +// Called by onLoad handler to start the process of evaluating misspelled words. +function startsp() +{ + nextWord(false); +} + +function getCorrectedText() +{ + return mispstr; +} + +// Display the next misspelled word to the user and populate the suggested spellings box. +function nextWord(ignoreall) +{ + var frm = document.fm1; + var sug = document.fm1.suggestions; + var sugidx = 0; + var newopt; + var isselected = 0; + + // Push ignored word onto ignoredWords array. + if (ignoreall) + ignoredWords[misps[wordindex].word] = true; + + // update the index of all words we have processed + // This must be done to accomodate the replaceAll function. + if (wordindex >= 0) + { + misps[wordindex].start += offsetindex; + misps[wordindex].end += offsetindex; + } + + // increment the counter for the array of misspelled words + wordindex++; + + // draw it and quit if there are no more misspelled words to evaluate + if (misps.length <= wordindex) + { + var divptr; + divptr = document.getElementById("spellview"); + setInnerHTML(divptr, un_htmlspecialchars(mispstr).replace(/_\|_/g, "
    ")); + + clearBox(sug); + alert(txt['done']); + frm.change.disabled = true; + frm.changeall.disabled = true; + frm.ignore.disabled = true; + frm.ignoreall.disabled = true; + + // put line feeds back + mispstr = mispstr.replace(/_\|_/g, "\n"); + + // get a handle to the field we need to re-populate + window.opener.document.forms[spell_formname][spell_fieldname].value = mispstr; + window.close(); + return true; + } + + // check to see if word is supposed to be ignored + if (typeof(ignoredWords[misps[wordindex].word]) != "undefined") + { + nextWord(false); + return false; + } + + // clear out the suggestions box + clearBox(sug); + + // re-populate the suggestions box if there are any suggested spellings for the word + if (misps[wordindex].suggestions.length) + { + for (sugidx = 0; sugidx < misps[wordindex].suggestions.length; sugidx++) + { + if (sugidx == 0) + isselected = 1; + else + isselected = 0; + newopt = new Option(misps[wordindex].suggestions[sugidx], misps[wordindex].suggestions[sugidx], 0, isselected); + sug.options[sugidx] = newopt; + + if (isselected) + { + frm.changeto.value = misps[wordindex].suggestions[sugidx]; + frm.changeto.select(); + } + } + } + highlightWord(); + + return false; +} + +function un_htmlspecialchars(thetext) +{ + thetext = thetext.replace(/\/g, ">"); + thetext = thetext.replace(/\n/g, "
    "); + thetext = thetext.replace(/\ \ /g, "  "); + + return thetext; +} + +// remove all items from the suggested spelling box +function clearBox(box) +{ + var length = box.length; + + // delete old options -- remember that select boxes automatically re-index + for (var i = 0; i < length; i++) + box.options[0] = null; +} + +function openSpellWin(width, height) +{ + window.open("", "spellWindow", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + width + ",height=" + height); +} \ No newline at end of file diff --git a/Themes/fixed/style.css b/Themes/fixed/style.css new file mode 100755 index 0000000..0088593 --- /dev/null +++ b/Themes/fixed/style.css @@ -0,0 +1,260 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #FFC246; + text-decoration: underline; +} +a:hover +{ + color: #FFFFFF; + text-decoration: underline; +} + +.karma, .karma:link, .karma:visited +{ + font-size: 11px; + color: #D2D2D2; + text-decoration: none; +} + +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + font-size: 11px; + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +a.nav:hover, a.karma:hover +{ + text-decoration: underline; +} + +.mapProfile {color: black;} + +a.mapProfile {color: blue;} + + +/* Tables should show empty cells. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Tahoma in black. */ +body, td +{ + color: #C5C9CF; + font-size: small; + font-family: Tahoma, arial, helvetica, serif; +} + +/* The main body of the entire forum. */ +body +{ + background-color: #434343; + margin: 0px; + padding: 0px; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea, button +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 13px; + font-weight: normal; + padding: 2px; +} + +/* All input elements that are checkboxes or radio buttons. */ +input.check +{ +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 11px; + font-weight: normal; + padding: 0px; +} + +/* Standard horizontal rule.. ([hr], etc.) */ +hr, .hrcolor +{ + height: 1px; + border: 0; + color: #000000; + background-color: #000000; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #F6F6F6; + background-color: #5C5C5C; + border: 1px solid #000000; + margin: 1px; + padding: 1px; +/* font-size: x-small;*/ +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid #000000; + padding: 1px; + font-family: "courier new", helvetica, "times new roman", serif; +/* font-size: x-small;*/ + width: 99%; + margin: 1px auto 1px auto; + white-space: nowrap; + overflow: auto; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #000000; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help +{ + cursor: help; +} + +/* /me uses this a lot. (emote, try typing /me in a post.) */ +.meaction +{ + color: red; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 96%; +} + +/* Highlighted text - such as search results ;). */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds for posts, and several other sections of the forum. */ +.windowbg +{ + color: #C5C9CF; + background-color: #4D4D4D; +} +.windowbg2 +{ + color: #C5C9CF; + background-color: #575757; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature +{ +max-height: 70px; +height:expression(this.offsetHeight>70 ? "70px" : "auto"); +} + +/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + color: white; + font-style: normal; + text-decoration: none; + background-color: #313131; +} +.titlebg a:hover +{ + color: #dfdfdf; +} + +.catbg, .catbg2 +{ + font-weight: bold; + background-color: #384658; + color: #ffffff; +} + +/* This is used for tables that have a grid/border background color (such as the topic listing.) */ +.bordercolor +{ + background-color: #313131; +} + +/* This is used on tables that should just have a border around them. */ +.tborder +{ + border: 0px solid #313131; + background-color: #313131; + padding: 0px; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext +{ + font-size: x-small; + font-family: Tahoma, arial, helvetica, serif; +} +.normaltext +{ + font-size: small; +} +.largetext +{ + font-size: large; +} + +/* This is the white header area where the title, menu bars, and header boxes are. */ +#headerarea +{ + background-color: #434343; + border-bottom: 1px solid black; +} +/* This is the main area of the forum, the part that's gray. */ +#bodyarea +{ + background-color: #3F3F3F; +} +/* And this is the bottom, where the copyright is, etc. */ +#footerarea +{ + color: black; + background-color: #3F3F3F; + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +/* This is for the special header boxes on the top (user info, key stats, news box.) */ +.headertitles +{ + background-color: #434343; + border: 1px solid #434343; +} +.headerbodies +{ + border: 1px solid #000000; + background-color: #575757; + background-repeat: repeat-x; + background-position: bottom; +} diff --git a/Themes/fixed/style.css~ b/Themes/fixed/style.css~ new file mode 100644 index 0000000..1375695 --- /dev/null +++ b/Themes/fixed/style.css~ @@ -0,0 +1,245 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #FFC246; + text-decoration: underline; +} +a:hover +{ + color: #FFFFFF; + text-decoration: underline; +} + +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + font-size: 11px; + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +a.nav:hover +{ + text-decoration: underline; +} + +/* Tables should show empty cells. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Tahoma in black. */ +body, td +{ + color: #C5C9CF; + font-size: small; + font-family: Tahoma, arial, helvetica, serif; +} + +/* The main body of the entire forum. */ +body +{ + background-color: #434343; + margin: 0px; + padding: 0px; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea, button +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 13px; + font-weight: normal; + padding: 2px; +} + +/* All input elements that are checkboxes or radio buttons. */ +input.check +{ +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 11px; + font-weight: normal; + padding: 0px; +} + +/* Standard horizontal rule.. ([hr], etc.) */ +hr, .hrcolor +{ + height: 1px; + border: 0; + color: #000000; + background-color: #000000; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #F6F6F6; + background-color: #5C5C5C; + border: 1px solid #000000; + margin: 1px; + padding: 1px; +/* font-size: x-small;*/ +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid #000000; + padding: 1px; + font-family: "courier new", helvetica, "times new roman", serif; +/* font-size: x-small;*/ + width: 99%; + margin: 1px auto 1px auto; + white-space: nowrap; + overflow: auto; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #000000; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help +{ + cursor: help; +} + +/* /me uses this a lot. (emote, try typing /me in a post.) */ +.meaction +{ + color: red; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 96%; +} + +/* Highlighted text - such as search results ;). */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds for posts, and several other sections of the forum. */ +.windowbg +{ + color: #C5C9CF; + background-color: #4D4D4D; +} +.windowbg2 +{ + color: #C5C9CF; + background-color: #575757; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature +{ +} + +/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + color: white; + font-style: normal; + background-color: #313131; +} +.titlebg a:hover +{ + color: #dfdfdf; +} + +.catbg, .catbg2 +{ + font-weight: bold; + background-color: #384658; + color: #ffffff; +} + +/* This is used for tables that have a grid/border background color (such as the topic listing.) */ +.bordercolor +{ + background-color: #000000; +} + +/* This is used on tables that should just have a border around them. */ +.tborder +{ + border: 0px solid #000000; + background-color: #000000; + padding: 0px; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext +{ + font-size: x-small; + font-family: Tahoma, arial, helvetica, serif; +} +.normaltext +{ + font-size: small; +} +.largetext +{ + font-size: large; +} + +/* This is the white header area where the title, menu bars, and header boxes are. */ +#headerarea +{ + background-color: #434343; + border-bottom: 1px solid black; +} +/* This is the main area of the forum, the part that's gray. */ +#bodyarea +{ + background-color: #3F3F3F; +} +/* And this is the bottom, where the copyright is, etc. */ +#footerarea +{ + color: black; + background-color: #3F3F3F; + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +/* This is for the special header boxes on the top (user info, key stats, news box.) */ +.headertitles +{ + background-color: #434343; + border: 1px solid #434343; +} +.headerbodies +{ + border: 1px solid #000000; + background-color: #575757; + background-repeat: repeat-x; + background-position: bottom; +} diff --git a/Themes/fixed/theme_info.xml b/Themes/fixed/theme_info.xml new file mode 100644 index 0000000..30f868f --- /dev/null +++ b/Themes/fixed/theme_info.xml @@ -0,0 +1,15 @@ + + + + + + aleksei.miheev@gmail.com + + http://www.rock.ru/ + + main + + index + + + diff --git a/Themes/fixed/wireless.css b/Themes/fixed/wireless.css new file mode 100644 index 0000000..81ad3a6 --- /dev/null +++ b/Themes/fixed/wireless.css @@ -0,0 +1,34 @@ +.catbg, tr.catbg td +{ + background-color: #6d92aa; + color: #ffffff; +} + +.titlebg, .titlebg a, .titlebg a:link, .titlebg a:visited +{ + background-color: #b6dbff; + color: #000000; + text-decoration: none; +} + +.windowbg, tr.windowbg td +{ + background-color: #ffffff; + color: #000000; +} +.windowbg2, tr.windowbg2 td +{ + background-color: #c0c0c0; + color: #000000; +} + +.new, a:link.new, a:visited.new +{ + background-color: #2f2fc0; + color: #ffffff; +} + +.updated +{ + color: #ff0000; +} \ No newline at end of file diff --git a/Themes/index.php b/Themes/index.php new file mode 100644 index 0000000..2480ce0 --- /dev/null +++ b/Themes/index.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/Themes/modern/Admin.template.php b/Themes/modern/Admin.template.php new file mode 100644 index 0000000..fae24e5 --- /dev/null +++ b/Themes/modern/Admin.template.php @@ -0,0 +1,930 @@ + + + '; + + // For every section that appears on the sidebar... + foreach ($context['admin_areas'] as $section) + { + // Show the section header - and pump up the line spacing for readability. + echo ' + + + + + + '; + } + + // This is where the actual "main content" area for the admin section starts. + echo ' +
    ', $section['title'], '
    '; + + // For every area of this section show a link to that area (bold if it's currently selected.) + foreach ($section['areas'] as $i => $area) + { + // Is this the current area, or just some area? + if ($i == $context['admin_area']) + echo ' + ', $area, '
    '; + else + echo ' + ', $area, '
    '; + } + + echo ' +
    + + '; +} + +// Part of the admin layer - used with admin_above to close the table started in it. +function template_admin_below() +{ + global $context, $settings, $options; + + echo ' + + + '; +} + +// This is the administration center home. +function template_admin() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + // Welcome message for the admin. + echo ' + + + + + + +
    ', $txt[208], '
    + ', $txt['hello_guest'], ' ', $context['user']['name'], '! +
    ', $txt[644], '
    +
    '; + + // Is there an update available? + echo ' + '; + + echo ' + '; + + // Display the "live news" from simplemachines.org. + echo ' + + '; + + // Show the user version information from their server. + echo ' + +
    + + + + + + +
    + ', $txt[119], ' ', $txt['smf217'], ' +
    +
    ', $txt['lfyi'], '
    +
    +
      + + + + + + +
    ', $txt['support_title'], '
    + ', $txt['support_versions'], ':
    + ', $txt['support_versions_forum'], ': + ', $context['forum_version'], '
    + ', $txt['support_versions_current'], ': + ??
    + ', $context['can_admin'] ? '' . $txt['dvc_more'] . '' : '', '
    '; + + // Display all the members who can administrate the forum. + echo ' +
    + ', $txt[684] . ': + ', implode(', ', $context['administrators']), ' +
    +
    '; + + echo ' + + '; + + $row = false; + foreach ($context['quick_admin_tasks'] as $task) + { + echo ' + '; + + if ($row && !$task['is_last']) + echo ' + + '; + + $row = !$row; + } + + echo ' + +
    +
    ', $task['link'], '
    + ', $task['description'], ' +
    '; + + // The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization. + echo ' + + '; + + // This sets the announcements and current versions themselves ;). + echo ' + '; +} + +// Show some support information and credits to those who helped make this. +function template_credits() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Show the user version information from their server. + echo ' + + + + + + +
    ', $txt['support_title'], '
    + ', $txt['support_versions'], ':
    + ', $txt['support_versions_forum'], ': + ', $context['forum_version'], '', $context['can_admin'] ? ' ' . $txt['dvc_more'] . '' : '', '
    + ', $txt['support_versions_current'], ': + ??
    '; + + // Display all the variables we have server information for. + foreach ($context['current_versions'] as $version) + echo ' + ', $version['title'], ': + ', $version['version'], '
    '; + + echo ' + +
    '; + + // Display latest support questions from simplemachines.org. + echo ' + + + + + + +
    ', $txt[119], ' ', $txt['support_latest'], '
    +
    ', $txt['support_latest_fetch'], '
    +
    '; + + // The most important part - the credits :P. + echo ' + + + + + + +
    ', $txt[571], '
    ', $context['credits'], '
    '; + + // This makes all the support information available to the support script... + echo ' + + + + '; + + // This setsthe latest support stuff. + echo ' + '; +} + +// Form for editing current news on the site. +function template_edit_news() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + + + '; + + // Loop through all the current news items so you can edit/remove them. + foreach ($context['admin_current_news'] as $admin_news) + echo ' + + + '; + + // This provides an empty text box to add a news item to the site. + echo ' + + + + +
    + ', $txt[119], ' ', $txt[7], ' +
    ', $txt[670], '
    ', $txt[507], '
    +
    +
    +
    ', $admin_news['parsed'], '
    +
    + +
    + + + + +
    + +
    '; +} + +// Form for editing the agreement shown for people registering to the forum. +function template_edit_agreement() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Just a big box to edit the text file ;). + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' ', $txt['smf11'], ' +
    '; + + // Warning for if the file isn't writable. + if (!empty($context['warning'])) + echo ' +
    ', $context['warning'], '
    '; + + echo ' + ', $txt['smf12'], ' +
    '; + + // Show the actual agreement in an oversized text box. + echo ' +
    +
    +
    + +
    + +
    '; +} + +// Displays information about file versions installed, and compares them to current version. +function template_view_versions() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + + + + + + + +
    ', $txt[429], '
    ', $txt['dvc1'], '
    + + + + '; + + // The current version of the core SMF package. + echo ' + + + '; + + // Now list all the source file versions, starting with the overall version (if all match!). + echo ' + + + +
    ', $txt[495], '', $txt['dvc_your'], '', $txt['dvc_current'], '
    ', $txt[496], '', $context['forum_version'], '??
    ', $txt['dvc_sources'], '????
    + '; + + // Loop through every source file displaying its version - using javascript. + foreach ($context['file_versions'] as $filename => $version) + echo ' + + + '; + + // Default template files. + echo ' +
    ', $filename, '', $version, '??
    + + + + +
    ', $txt['dvc_default'], '????
    + '; + + foreach ($context['default_template_versions'] as $filename => $version) + echo ' + + + '; + + // Now the language files... + echo ' +
    ', $filename, '', $version, '??
    + + + + +
    ', $txt['dvc_languages'], '????
    + '; + + foreach ($context['default_language_versions'] as $language => $files) + { + foreach ($files as $filename => $version) + echo ' + + + '; + } + + echo ' +
    ', $filename, '.', $language, '.php', $version, '??
    '; + + // Finally, display the version information for the currently selected theme - if it is not the default one. + if (!empty($context['template_versions'])) + { + echo ' + + + + +
    ', $txt['dvc_templates'], '????
    + '; + + foreach ($context['template_versions'] as $filename => $version) + echo ' + + + '; + + echo ' +
    ', $filename, '', $version, '??
    '; + } + + echo ' +
    '; + + /* Below is the hefty javascript for this. Upon opening the page it checks the current file versions with ones + held at simplemachines.org and works out if they are up to date. If they aren't it colors that files number + red. It also contains the function, swapOption, that toggles showing the detailed information for each of the + file catorgories. (sources, languages, and templates.) */ + echo ' + + '; + + // Internet Explorer 4 is tricky, it won't set any innerHTML until after load. + if ($context['browser']['is_ie4']) + echo ' + '; + else + echo ' + '; +} + +// Form for stopping people using naughty words, etc. +function template_edit_censored() +{ + global $context, $settings, $options, $scripturl, $txt; + + // First section is for adding/removing words from the censored list. + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' ', $txt[135], ' +
    ', $txt[141], '
    + ', $txt[136], '
    '; + + // Show text boxes for censoring [bad ] => [good ]. + foreach ($context['censored_words'] as $vulgar => $proper) + echo ' +
    =>
    '; + + // Now provide a way to censor more words. + echo ' + + +
    +
    +
    +
    +
    +
    + +
    + + +
    '; + + // This table lets you test out your filters by typing in rude words and seeing what comes out. + echo ' + + + + + + +
    ', $txt['censor_test'], '
    + + +
    + +
    '; +} + +// Template for forum maintenance page. +function template_maintain() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Starts off with general maintenance procedures. + echo ' + + + + + + + '; + + // Backing up the database...? Good idea! + echo ' + + + + + + '; + + // Pruning any older posts. + echo ' + + + + + + +
    ', $txt[119], ' ', $txt['maintain_title'], ' - ', $txt['maintain_general'], '
    + ', $txt['maintain_optimize'], '
    + ', $txt['maintain_version'], '
    + ', $txt['maintain_errors'], '
    + ', $txt['maintain_recount'], '
    + ', $txt['maintain_logs'], '
    + +', $txt['maintain_karmalog'], '
    +
    ', $txt[119], ' ', $txt['maintain_title'], ' - ', $txt['maintain_backup'], '
    +
    +
    +
    +
    + +
    + + +
    +
    ', $txt[119], ' ', $txt['maintain_title'], ' - ', $txt['maintain_old'], '
    + '; + + // Bit of javascript for showing which boards to prune in an otherwise hidden list. + echo ' + '; + + // The otherwise hidden "choose which boards to prune". + echo ' +
    + ', $txt['maintain_old1'], '', $txt['maintain_old2'], '
    +
    + + ', $txt['maintain_old_all'], ' + + +
    + +
    +
    '; + + // Pop up a box to say function completed if the user has been redirected back here from a function they ran. + if ($context['maintenance_finished']) + echo ' + '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/BoardIndex.template.php b/Themes/modern/BoardIndex.template.php new file mode 100644 index 0000000..1a50062 --- /dev/null +++ b/Themes/modern/BoardIndex.template.php @@ -0,0 +1,484 @@ + + + ', theme_linktree(), ' + '; + if (!$settings['show_sp1_info']) + echo ' + ', $txt[19], ': ', $modSettings['memberCount'], '  •  ', $txt[95], ': ', $modSettings['totalMessages'], '  •  ', $txt[64], ': ', $modSettings['totalTopics'], ' + ', ($settings['show_latest_member'] ? '
    ' . $txt[201] . ' ' . $context['latest_member']['link'] . '' . $txt[581] : ''); + echo ' + + +'; + + + // Show the news fader? (assuming there are things to show...) + // REMOVE THE ZERO!!! + if ($settings['show_newsfader'] && !empty($context['fader_news_lines'])) + { + echo ' +
    + + + + + + + +
    ', $txt[102], '
    '; + + // Prepare all the javascript settings. + echo ' +
    ', $context['news_lines'][0], '
    + + +
    +
    '; + } + + /* Each category in categories is made up of: + id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?), + new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge), + and boards. (see below.) */ + + + foreach ($context['categories'] as $category) + { + echo ' +
    + + + '; + + // Assuming the category hasn't been collapsed... + if (!$category['is_collapsed']) + { + /* Each board in each category's boards has: + new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.), + children (see below.), link_children (easier to use.), children_new (are they new?), + topics (# of), posts (# of), link, href, and last_post. (see below.) */ + foreach ($category['boards'] as $board) + { + echo ' + + + '; +/* + +*/ echo ' + + '; + } + } + + echo ' +
    '; + + // If this category even can collapse, show a link to collapse it. + if ($category['can_collapse']) + echo ' + ', $category['collapse_image'], ''; + + echo ' + ', $category['link'], ' +
    '; + + // If the board is new, show a strong indicator. + if ($board['new']) + echo '', $txt[333], ''; + // This board doesn't have new posts, but its children do. + elseif ($board['children_new']) + echo '', $txt[333], ''; + // No new posts at all! The agony!! + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) + if (false && !empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) + if (!empty($board['children'])) + { + // Sort the links into an array with new boards bold so it can be imploded. + $children = array(); + /* Each child in each board's children has: + id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', implode('
    ', $children), '
    '; + } + + // Show some basic information about the number of posts, etc. + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + /* The board's and children's 'last_post's have: + time, timestamp (a number that represents the time.), id (of the post), topic (topic id.), + link, href, subject, start (where they should go for the first unread post.), + and member. (which has id, name, link, href, username in it.) */ + if (!empty($board['last_post']['id'])) + echo ' + ', $board['last_post']['link'], ' (', $board['last_post']['member']['link'], ') ', $board['last_post']['time']; + + echo ' +
    +
    '; + } + if ($context['user']['is_logged']) + { + echo ' +
    + + + + +
    + ', $txt[333], ' + ', $txt[334], ' + '; + // Show the mark all as read button? + if ($settings['show_mark_read']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]), ''; + echo ' +
    '; + + } + + // Here's where the "Info Center" starts... + echo ' +
    +
    + + + '; + + // This is the "Recent Posts" bar. + if (!empty($settings['number_recent_posts'])) + { + echo ' + + + + + + + '; + } + + // Show information about events, birthdays, and holidays on the calendar. + if ($context['show_calendar']) + { + echo ' + + + + + + '; + } + + // Show a member bar. Not heavily ornate, but functional at least. + if ($settings['show_member_bar']) + { + echo ' + + + + + + + '; + } + + + +// Show YaBB SP1 style information... + if ($settings['show_sp1_info']) + { + echo ' + + + + + + + '; + } + + + /* if ($settings['show_sp1_info']) + { + echo ' + + + + + + + '; + }*/ +// "Users online" - in order of activity. + echo ' + + + + + + '; + + // If they are logged in, but SP1 style information is off... show a personal message bar. + if ($context['user']['is_logged'] && !$settings['show_sp1_info']) + { + echo ' + + + + + + '; + } + + // Show the login bar. (it's only true if they are logged out anyway.) + if ($context['show_login_bar']) + { + echo ' + + + + + + + '; + } + + echo ' +
    ', $txt[685], '
    ', $txt[214], '
    + + ', $txt[214], ' + '; + + // Only show one post. + if ($settings['number_recent_posts'] == 1) + { + // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.) + echo ' + ', $txt[214], ' +
    + ', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')
    +
    '; + } + // Show lots of posts. + elseif (!empty($context['latest_posts'])) + { + echo ' + '; + /* Each post in latest_posts has: + board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), + subject, short_subject (shortened with...), time, link, and href. */ + foreach ($context['latest_posts'] as $post) + echo ' + + + + + '; + echo ' +
    [', $post['board']['link'], ']', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '', $post['time'], '
    '; + } + echo ' +
    ', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '
    + + ', $txt['calendar24'], ' + + '; + + // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P. + if (!empty($context['calendar_holidays'])) + echo ' + ', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), '
    '; + + // People's birthdays. Like mine. And yours, I guess. Kidding. + if (!empty($context['calendar_birthdays'])) + { + echo ' + ', $context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], ' '; + /* Each member in calendar_birthdays has: + id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */ + foreach ($context['calendar_birthdays'] as $member) + echo ' + ', $member['is_today'] ? '' : '', $member['name'], $member['is_today'] ? '' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '
    ' : ', '; + } + // Events like community get-togethers. + if (!empty($context['calendar_events'])) + { + echo ' + ', $context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], ' '; + /* Each event in calendar_events should have: + title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */ + foreach ($context['calendar_events'] as $event) + echo ' + ', $event['can_edit'] ? '* ' : '', '', $event['is_today'] ? '' . $event['title'] . '' : $event['title'], '', $event['is_last'] ? '
    ' : ', '; + + // Show a little help text to help them along ;). + if ($context['calendar_can_edit']) + echo ' + (', $txt['calendar_how_edit'], ')'; + } + echo ' +
    +
    ', $txt[331], '
    + + ', $txt[332], ' + + ', $txt[332], ' +
    ', $txt[200], '
    +
    ', $txt[645], '
    + + ', $txt[645], ' + + + + +
    +
    ', $txt[490], ': ', $modSettings['totalTopics'], '
    ', $txt[489], ': ', $modSettings['totalMessages'], '
    ', !empty($context['latest_post']) ? ' + ' . $txt[659] . ': "' . $context['latest_post']['link'] . '" (' . $context['latest_post']['time'] . ')
    ' : '', ' + ', $txt[234], '', $context['show_stats'] ? '
    + ' . $txt['smf223'] . '' : '', ' +
    + ', $txt[488], ': ', $modSettings['memberCount'], '
    + ', $txt[656], ': ', $context['latest_member']['link'], '
    '; + // If they are logged in, show their unread message count, etc.. + if ($context['user']['is_logged']) + echo ' + ', $txt['smf199'], ': ', $context['user']['messages'], ' ', $txt['newmessages3'], ': ', $context['user']['unread_messages'], ''; + echo ' +
    +
    ', $txt[645], '
    + ', $txt[645], ' + + + ', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': ', $context['common_stats']['latest_member']['link'], ' +
    ' . $txt[659] . ': "' . $context['latest_post']['link'] . '" ( ' . $context['latest_post']['time'] . ' )
    + ', $txt[234], '', $context['show_stats'] ? '
    + ' . $txt['smf223'] . '' : '', ' + + '; + if ((!empty($modSettings['karmadescmod'])) && (empty($modSettings['karmaisowner']))) + { if ($context['show_karmastat']) + echo ' + '. $txt['statkarma'].'',' '; + } + elseif ((!empty($modSettings['karmadescmod'])) && ($context['user']['is_admin'])) + { if ($context['show_karmastat']) + echo ' + '. $txt['statkarma'].'',' '; +} + echo' +
    +
    ', $txt[158], '
    + + ', $txt[158], ' + + ', /*(empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '),*/ $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'], (empty($context['num_users_hidden']) ? '' : ' (' . $context['num_users_hidden'] . ' ' . $txt['hidden'] . ')'), '
    + '; + + // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link. + if (!empty($context['users_online'])) + echo ' + ', $txt[140], ':
    ', implode(', ', $context['list_users_online']); + + if (!empty($context['spiders'])) + { + if ($modSettings['ob_googlebot_display_own_list']) + echo ' +
    + ', $txt['ob_googlebot_spiders_last_active'], ':
    '; + else + { + if (empty($context['users_online'])) + echo ' + ', $txt[140], ':
    '; + else + echo ', '; + } + + echo implode(', ', $context['spiders']); + } + + echo ' +
    ', $context['show_stats'] && !$settings['show_sp1_info'] ? ' + ' . $txt['smf223'] . '' : '', ' +
    +
    ', $txt[159], '
    + + ', $txt[159], ' + + ', $txt[159], ' +
    + ', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' ', $txt[662], ' ', $txt[663], ' +
    +
    ', $txt[34], ' (' . $txt[315] . ')
    + + ', $txt[34], ' + +
    + + + + + + +
    + + + + + + + + + +
    +
    +
    '; +} + +?> diff --git a/Themes/modern/Calendar.template.php b/Themes/modern/Calendar.template.php new file mode 100644 index 0000000..cf3a3d5 --- /dev/null +++ b/Themes/modern/Calendar.template.php @@ -0,0 +1,164 @@ + +
    ', theme_linktree(), '
    + + + '; + + // Show each day of the week. + foreach ($context['week_days'] as $day) + echo ' + '; + echo ' + '; + + /* Each week in weeks contains the following: + days (a list of days), number (week # in the year.) */ + foreach ($context['weeks'] as $week) + { + echo ' + '; + + /* Every day has the following: + day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?), + holidays, events, birthdays. (last three are lists.) */ + foreach ($week['days'] as $day) + { + // If this is today, make it a different color and show a border. + echo ' + '; + } + + echo ' + '; + } + + echo ' +
    ' . $months[$context['current_month']] . ' ' . $context['current_year'] . '
    ' . $days[$day] . '
    '; + + // Skip it if it should be blank - it's not a day if it has no number. + if (!empty($day['day'])) + { + // Should the day number be a link? + if (!empty($modSettings['cal_daysaslink']) && $context['can_post']) + echo ' + ', $day['day'], ''; + else + echo ' + ', $day['day'], ''; + + // Is this the first day of the week? (and are we showing week numbers?) + if ($day['is_first_day']) + echo ' - ', $txt['calendar51'], ' ', $week['number']; + + // Are there any holidays? + if (!empty($day['holidays'])) + echo ' +
    + ', $txt['calendar5'], ' ', implode(', ', $day['holidays']), '
    '; + + // Show any birthdays... + if (!empty($day['birthdays'])) + { + echo ' +
    + ', $txt['calendar3'], ' '; + + /* Each of the birthdays has: + id, name (person), age (if they have one set?), and is_last. (last in list?) */ + foreach ($day['birthdays'] as $member) + echo ' + ', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '' : ', '; + echo ' +
    '; + } + + // Any special posted events? + if (!empty($day['events'])) + { + echo ' +
    + ', $txt['calendar4'], ' '; + /* The events are made up of: + title, href, is_last, can_edit (are they allowed to?), and modify_href. */ + foreach ($day['events'] as $event) + { + // If they can edit the event, show a star they can click on.... + if ($event['can_edit']) + echo ' + * '; + + echo ' + ', $event['title'], '', $event['is_last'] ? '' : ', '; + } + echo ' +
    '; + } + echo '
    '; + } + + echo ' +
    + + + + + + + + +
    '; + + // Is there a calendar for last month to look at? + if (isset($context['previous_calendar'])) + echo ' +  « ', $months_short[$context['previous_calendar']['month']], ' ', $context['previous_calendar']['year'], ''; + echo ' + '; + // Show a little "post event" button? + if ($context['can_post']) + echo ' + ', $settings['use_image_buttons'] ? '' . $txt['calendar23'] . '' : $txt['calendar23'], ''; + echo ' + +   +   + + '; + // Show another post button just for symmetry. + if ($context['can_post']) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt['calendar23'] . '' : $txt['calendar23']) . ''; + echo ' + '; + + // Is there a calendar for next month? + if (isset($context['next_calendar'])) + echo ' + ' . $months_short[$context['next_calendar']['month']] . ' ' . $context['next_calendar']['year'] . ' » '; + echo ' +
    + '; +} + +?> diff --git a/Themes/modern/Clusterer.js b/Themes/modern/Clusterer.js new file mode 100644 index 0000000..45b2526 --- /dev/null +++ b/Themes/modern/Clusterer.js @@ -0,0 +1,586 @@ +// Clusterer.js - marker clustering routines for Google Maps apps +// +// Using these routines is very simple. +// +// 1) Load the routines into your code: +// +// +// 2) Create a Clusterer object, passing it your map object: +// +// var clusterer = new Clusterer( map ); +// +// 3) Wherever you now do map.addOverlay( marker ), instead call +// clusterer.AddMarker( marker, title ). The title is just a +// short descriptive string to use in the cluster info-boxes. +// +// 4) If you are doing any map.removeOverlay( marker ) calls, change those +// to clusterer.RemoveMarker( marker ). +// +// That's it! Everything else happens automatically. +// +// +// Copyright 2005 by Jef Poskanzer . +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// For commentary on this license please see http://www.acme.com/license.html + + +var defaultMaxVisibleMarkers = 150; +var defaultGridSize = 5; +var defaultMinMarkersPerCluster = 5; +var defaultMaxLinesPerInfoBox = 10; + +var defaultIcon = new GIcon(); +defaultIcon.image = 'http://www.acme.com/resources/images/markers/blue_large.PNG'; +defaultIcon.shadow = 'http://www.acme.com/resources/images/markers/shadow_large.PNG'; +defaultIcon.iconSize = new GSize( 30, 51 ); +defaultIcon.shadowSize = new GSize( 56, 51 ); +defaultIcon.iconAnchor = new GPoint( 13, 34 ); +defaultIcon.infoWindowAnchor = new GPoint( 13, 3 ); +defaultIcon.infoShadowAnchor = new GPoint( 27, 37 ); + + +// Constructor. +function Clusterer( map ) + { + this.map = map; + this.markers = []; + this.clusters = []; + this.timeout = null; + this.currentZoomLevel = map.getZoomLevel(); + + this.maxVisibleMarkers = defaultMaxVisibleMarkers; + this.gridSize = defaultGridSize; + this.minMarkersPerCluster = defaultMinMarkersPerCluster; + this.maxLinesPerInfoBox = defaultMaxLinesPerInfoBox; + this.icon = defaultIcon; + + GEvent.addListener( map, 'zoom', ClustererMakeCaller( ClustererDisplay, this ) ); + GEvent.addListener( map, 'moveend', ClustererMakeCaller( ClustererDisplay, this ) ); + GEvent.addListener( map, 'infowindowclose', ClustererMakeCaller( ClustererPopDown, this ) ); + } + + +// Call this to change the cluster icon. +Clusterer.prototype.SetIcon = function ( icon ) + { + this.icon = icon; + } + + +// Call this to add a marker. +Clusterer.prototype.AddMarker = function ( marker, title ) + { + // Putting the map into a marker property is not mentioned in the API, + // but it lets up pop up an infobox for markers which have not yet been + // added to the map. + marker.map = this.map; + marker.title = title; + this.markers.push( marker ); + this.DisplayLater(); + } + + +// Call this to remove a marker. +Clusterer.prototype.RemoveMarker = function ( marker ) + { + for ( var i = 0; i < this.markers.length; ++i ) + if ( this.markers[i] == marker ) + { + if ( marker.onMap ) + this.map.removeOverlay( marker ); + for ( j = 0; j < this.clusters.length; ++j ) + { + cluster = clusterer.clusters[j]; + if ( cluster != null ) + { + for ( k = 0; k < cluster.markers.length; ++k ) + if ( cluster.markers[k] == marker ) + { + cluster.markers[k] = null; + --cluster.markerCount; + break; + } + if ( cluster.markerCount == 0 ) + { + this.ClearCluster( cluster ); + clusterer.clusters[j] = null; + } + else if ( cluster == this.poppedUpCluster ) + ClustererRePop( this ); + } + } + this.markers[i] = null; + break; + } + this.DisplayLater(); + } + +Clusterer.prototype.DisplayLater = function () + { + if ( this.timeout != null ) + window.clearTimeout( this.timeout ); + this.timeout = window.setTimeout( ClustererMakeCaller( ClustererDisplay, this ), 50 ); + } + + +function ClustererDisplay( clusterer ) + { + var i, j, marker, cluster, point; + + window.clearTimeout( clusterer.timeout ); + + var newZoomLevel = clusterer.map.getZoomLevel(); + if ( newZoomLevel != clusterer.currentZoomLevel ) + { + // When the zoom level changes, we have to remove all the clusters. + for ( i = 0; i < clusterer.clusters.length; ++i ) + if ( clusterer.clusters[i] != null ) + { + clusterer.ClearCluster( clusterer.clusters[i] ); + clusterer.clusters[i] = null; + } + clusterer.clusters.length = 0; + clusterer.currentZoomLevel = newZoomLevel; + } + + // Get the current bounds of the visible area. + var bounds = clusterer.map.getBoundsLatLng(); + + // Expand the bounds a little, so things look smoother when scrolling + // by small amounts. + var dx = bounds.maxX - bounds.minX; + var dy = bounds.maxY - bounds.minY; + dx *= 0.10; + dy *= 0.10; + bounds.maxX += dx; + bounds.minX -= dx; + bounds.maxY += dy; + bounds.minY -= dy; + + // Partition the markers into visible and non-visible lists. + var visibleMarkers = []; + var nonvisibleMarkers = []; + for ( i = 0; i < clusterer.markers.length; ++i ) + { + marker = clusterer.markers[i]; + if ( marker != null ) + if ( ClustererPointInBounds( marker.point, bounds ) ) + visibleMarkers.push( marker ); + else + nonvisibleMarkers.push( marker ); + } + + // Take down the non-visible markers. + for ( i = 0; i < nonvisibleMarkers.length; ++i ) + { + marker = nonvisibleMarkers[i]; + if ( marker.onMap ) + { + clusterer.map.removeOverlay( marker ); + marker.onMap = false; + } + } + + // Take down the non-visible clusters. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null && ! ClustererPointInBounds( cluster.marker.point, bounds ) && cluster.onMap ) + { + clusterer.map.removeOverlay( cluster.marker ); + cluster.onMap = false; + } + } + + // Clustering! This is some complicated stuff. We have three goals + // here. One, limit the number of markers & clusters displayed, so the + // maps code doesn't slow to a crawl. Two, when possible keep existing + // clusters instead of replacing them with new ones, so that the app pans + // better. And three, of course, be CPU and memory efficient. + if ( visibleMarkers.length > clusterer.maxVisibleMarkers ) + { + // Add to the list of clusters by splitting up the current bounds + // into a grid. + var latRange = bounds.maxY - bounds.minY; + var latInc = latRange / clusterer.gridSize; + var lonInc = latInc / Math.cos( ( bounds.maxY + bounds.minY ) / 2.0 * Math.PI / 180.0 ); + for ( var lat = bounds.minY; lat <= bounds.maxY; lat += latInc ) + for ( var lon = bounds.minX; lon <= bounds.maxX; lon += lonInc ) + { + cluster = new Object(); + cluster.clusterer = clusterer; + cluster.bounds = new GBounds( lon, lat, lon + lonInc, lat + latInc ); + cluster.markers = []; + cluster.markerCount = 0; + cluster.onMap = false; + cluster.marker = null; + clusterer.clusters.push( cluster ); + } + + // Put all the unclustered visible markers into a cluster - the first + // one it fits in, which favors pre-existing clusters. + for ( i = 0; i < visibleMarkers.length; ++i ) + { + marker = visibleMarkers[i]; + if ( marker != null && ! marker.inCluster ) + { + for ( j = 0; j < clusterer.clusters.length; ++j ) + { + cluster = clusterer.clusters[j]; + if ( cluster != null && ClustererPointInBounds( marker.point, cluster.bounds ) ) + { + cluster.markers.push( marker ); + ++cluster.markerCount; + marker.inCluster = true; + } + } + } + } + + // Get rid of any clusters containing only a few markers. + for ( i = 0; i < clusterer.clusters.length; ++i ) + if ( clusterer.clusters[i] != null && clusterer.clusters[i].markerCount < clusterer.minMarkersPerCluster ) + { + clusterer.ClearCluster( clusterer.clusters[i] ); + clusterer.clusters[i] = null; + } + + // Shrink the clusters list. + for ( i = clusterer.clusters.length - 1; i >= 0; --i ) + if ( clusterer.clusters[i] != null ) + break; + else + --clusterer.clusters.length; + + // Ok, we have our clusters. Go through the markers in each + // cluster and remove them from the map if they are currently up. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null ) + { + for ( j = 0; j < cluster.markers.length; ++j ) + { + marker = cluster.markers[j]; + if ( marker != null && marker.onMap ) + { + clusterer.map.removeOverlay( marker ); + marker.onMap = false; + } + } + } + } + + // Now make cluster-markers for any clusters that need one. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null && cluster.marker == null ) + { + // Figure out the average coordinates of the markers in this + // cluster. + var xTotal = 0.0, yTotal = 0.0; + for ( j = 0; j < cluster.markers.length; ++j ) + { + marker = cluster.markers[j]; + if ( marker != null ) + { + xTotal += ( + marker.point.x ); + yTotal += ( + marker.point.y ); + } + } + point = new GPoint( xTotal / cluster.markerCount, yTotal / cluster.markerCount ); + marker = new GMarker( point, clusterer.icon ); + cluster.marker = marker; + GEvent.addListener( marker, 'click', ClustererMakeCaller( ClustererPopUp, cluster ) ); + } + } + } + + // Display the visible markers not already up and not in clusters. + for ( i = 0; i < visibleMarkers.length; ++i ) + { + marker = visibleMarkers[i]; + if ( marker != null && ! marker.onMap && ! marker.inCluster ) + { + clusterer.map.addOverlay( marker ); + var title = marker.title; + if ( title ) + ClustererSetTooltip( marker, title ); + marker.onMap = true; + } + } + + // Display the visible clusters not already up. + for ( i = 0; i < clusterer.clusters.length; ++i ) + { + cluster = clusterer.clusters[i]; + if ( cluster != null && ! cluster.onMap && ClustererPointInBounds( cluster.marker.point, bounds ) ) + { + clusterer.map.addOverlay( cluster.marker ); + cluster.onMap = true; + } + } + + // In case a cluster is currently popped-up, re-pop to get any new + // markers into the infobox. + ClustererRePop( clusterer ); + } + + +function ClustererPopUp( cluster ) + { + var clusterer = cluster.clusterer; + var html = ''; + var n = 0; + for ( var i = 0; i < cluster.markers.length; ++i ) + { + var marker = cluster.markers[i]; + if ( marker != null ) + { + ++n; + html += ''; + if ( n == clusterer.maxLinesPerInfoBox - 1 && cluster.markerCount > clusterer.maxLinesPerInfoBox ) + { + html += ''; + break; + } + } + } + html += '
    '; + if ( marker.icon.smallImage ) + html += ''; + else + html += ''; + html += '' + marker.title + '
    ...and ' + ( cluster.markerCount - n ) + ' more
    '; + clusterer.poppedUpCluster = cluster; + cluster.marker.openInfoWindowHtml( html ); + } + + +function ClustererRePop( clusterer ) + { + if ( clusterer.poppedUpCluster != null ) + ClustererPopUp( poppedUpCluster ); + } + + +function ClustererPopDown( clusterer ) + { + clusterer.poppedUpCluster = null; + } + + +Clusterer.prototype.ClearCluster = function ( cluster ) + { + var i, marker; + + for ( i = 0; i < cluster.markers.length; ++i ) + if ( cluster.markers[i] != null ) + { + cluster.markers[i].inCluster = false; + cluster.markers[i] = null; + } + cluster.markers.length = 0; + cluster.markerCount = 0; + if ( cluster == this.poppedUpCluster ) + this.map.closeInfoWindow(); + if ( cluster.onMap ) + { + this.map.removeOverlay( cluster.marker ); + cluster.onMap = false; + } + } + + +function ClustererPointInBounds( point, bounds ) + { + var x = ( + point.x ); + var y = ( + point.y ); + return x >= bounds.minX && x <= bounds.maxX && + y >= bounds.minY && y <= bounds.maxY; + } + + +// This returns a function closure that calls the given routine with the +// specified arg. +function ClustererMakeCaller( func, arg ) + { + return function () { func( arg ); }; + } + + +function ClustererSetTooltip( marker, title ) + { + // Tooltips are in text, not HTML, so we have to strip any HTML stuff + // out of the title. + var textTitle = ClustererDeHtmlize( title ); + + // Now add the title to whichever parts of the marker are present. + if ( marker.transparentIcon ) + marker.transparentIcon.setAttribute( 'title' , textTitle ); + if ( marker.imageMap ) + marker.imageMap.setAttribute( 'title' , textTitle ); + if ( marker.iconImage ) + marker.iconImage.setAttribute( 'title' , textTitle ); + } + + +function ClustererEntityToIso8859( inStr ) + { + var outStr = ''; + for ( var i = 0; i < inStr.length; ++i ) + { + var c = inStr.charAt( i ); + if ( c != '&' ) + outStr += c; + else + { + var semi = inStr.indexOf( ';', i ); + if ( semi == -1 ) + outStr += c; + else + { + var entity = inStr.substring( i + 1, semi ); + if ( entity == 'iexcl' ) outStr += ''; + else if ( entity == 'copy' ) outStr += ''; + else if ( entity == 'laquo' ) outStr += ''; + else if ( entity == 'reg' ) outStr += ''; + else if ( entity == 'deg' ) outStr += ''; + else if ( entity == 'raquo' ) outStr += ''; + else if ( entity == 'iquest' ) outStr += ''; + else if ( entity == 'Agrave' ) outStr += ''; + else if ( entity == 'Aacute' ) outStr += ''; + else if ( entity == 'Acirc' ) outStr += ''; + else if ( entity == 'Atilde' ) outStr += ''; + else if ( entity == 'Auml' ) outStr += ''; + else if ( entity == 'Aring' ) outStr += ''; + else if ( entity == 'AElig' ) outStr += ''; + else if ( entity == 'Ccedil' ) outStr += ''; + else if ( entity == 'Egrave' ) outStr += ''; + else if ( entity == 'Eacute' ) outStr += ''; + else if ( entity == 'Ecirc' ) outStr += ''; + else if ( entity == 'Euml' ) outStr += ''; + else if ( entity == 'Igrave' ) outStr += ''; + else if ( entity == 'Iacute' ) outStr += ''; + else if ( entity == 'Icirc' ) outStr += ''; + else if ( entity == 'Iuml' ) outStr += ''; + else if ( entity == 'Ntilde' ) outStr += ''; + else if ( entity == 'Ograve' ) outStr += ''; + else if ( entity == 'Oacute' ) outStr += ''; + else if ( entity == 'Ocirc' ) outStr += ''; + else if ( entity == 'Otilde' ) outStr += ''; + else if ( entity == 'Ouml' ) outStr += ''; + else if ( entity == 'Oslash' ) outStr += ''; + else if ( entity == 'Ugrave' ) outStr += ''; + else if ( entity == 'Uacute' ) outStr += ''; + else if ( entity == 'Ucirc' ) outStr += ''; + else if ( entity == 'Uuml' ) outStr += ''; + else if ( entity == 'Yacute' ) outStr += ''; + else if ( entity == 'szlig' ) outStr += ''; + else if ( entity == 'agrave' ) outStr += ''; + else if ( entity == 'aacute' ) outStr += ''; + else if ( entity == 'acirc' ) outStr += ''; + else if ( entity == 'atilde' ) outStr += ''; + else if ( entity == 'auml' ) outStr += ''; + else if ( entity == 'aring' ) outStr += ''; + else if ( entity == 'aelig' ) outStr += ''; + else if ( entity == 'ccedil' ) outStr += ''; + else if ( entity == 'egrave' ) outStr += ''; + else if ( entity == 'eacute' ) outStr += ''; + else if ( entity == 'ecirc' ) outStr += ''; + else if ( entity == 'euml' ) outStr += ''; + else if ( entity == 'igrave' ) outStr += ''; + else if ( entity == 'iacute' ) outStr += ''; + else if ( entity == 'icirc' ) outStr += ''; + else if ( entity == 'iuml' ) outStr += ''; + else if ( entity == 'ntilde' ) outStr += ''; + else if ( entity == 'ograve' ) outStr += ''; + else if ( entity == 'oacute' ) outStr += ''; + else if ( entity == 'ocirc' ) outStr += ''; + else if ( entity == 'otilde' ) outStr += ''; + else if ( entity == 'ouml' ) outStr += ''; + else if ( entity == 'oslash' ) outStr += ''; + else if ( entity == 'ugrave' ) outStr += ''; + else if ( entity == 'uacute' ) outStr += ''; + else if ( entity == 'ucirc' ) outStr += ''; + else if ( entity == 'uuml' ) outStr += ''; + else if ( entity == 'yacute' ) outStr += ''; + else if ( entity == 'yuml' ) outStr += ''; + else if ( entity == 'nbsp' ) outStr += ' '; + else if ( entity == 'lt' ) outStr += '<'; + else if ( entity == 'gt' ) outStr += '>'; + else if ( entity == 'amp' ) outStr += '&'; + else outStr += '&' + entity + ';'; + i += entity.length + 1; + } + } + } + return outStr; + } + + +function ClustererDeEntityize( inStr ) + { + var outStr = ''; + for ( var i = 0; i < inStr.length; ++i ) + { + var c = inStr.charAt( i ); + if ( c != '&' ) + outStr += c; + else + { + var semi = inStr.indexOf( ';', i ); + if ( semi != -1 ) + i = semi; + } + } + return outStr; + } + + +function ClustererDeElementize( inStr ) + { + var outStr = ''; + for ( var i = 0; i < inStr.length; ++i ) + { + var c = inStr.charAt( i ); + if ( c != '<' ) + outStr += c; + else + { + var gt = inStr.indexOf( '>', i ); + if ( gt != -1 ) + i = gt; + } + } + return outStr; + } + + +function ClustererDeHtmlize( str ) + { + return ClustererDeEntityize( ClustererEntityToIso8859( ClustererDeElementize( str ) ) ); + } diff --git a/Themes/modern/DescriptionKarma.template.php b/Themes/modern/DescriptionKarma.template.php new file mode 100644 index 0000000..2219ade --- /dev/null +++ b/Themes/modern/DescriptionKarma.template.php @@ -0,0 +1,48 @@ + + +', theme_linktree(), '
    +
    + + + + + + + + + + + + + + + +
    ',$txt['whykarmamod'],''; + if ($_REQUEST['sa'] == 'applaud') echo $txt['karmadescappl']; else echo $txt['karmadescsmi']; echo'
    ', $txt['karmamoder'], '
    ',$txt['karmarequare'],'
    +
    '; + + + +} +?> diff --git a/Themes/modern/Display.template.php b/Themes/modern/Display.template.php new file mode 100644 index 0000000..72c3dd5 --- /dev/null +++ b/Themes/modern/Display.template.php @@ -0,0 +1,1094 @@ + +', $context['first_new_message'] ? '' : ''; + + // Show the linktree as well as the "Who's Viewing" information. + echo theme_linktree(); + + // Is there any related topics? + if (!empty($context['related_topics'])) + { + echo ' + + + + + + + + '; + foreach($context['related_topics'] as $rt) + { + echo' + + + '; + } + echo ' + + + +
     
    ',$txt['related_topics'],'
    ',$rt['subj'],'
     
    '; + } + + // Show the topic information - icon, subject, etc. + echo ' + + + + +
    +

    ',$context['subject'], '

    '; + if (! empty ($context['subtitle'])) + echo ' +

    ' . $context['subtitle'] . '

    '; + echo ' + ', $context['moderators_list'],' +
    '; + + // Is this topic also a poll? + if ($context['is_poll']) + { + echo ' + + + + + + + + +
    + ', $txt['smf43'], ' +
    ', $txt['smf21'], ': + ', $context['poll']['question']; + if (!empty($context['poll']['expire_time'])) + echo ' +  (', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': ', $context['poll']['expire_time'], ')'; + + // Are they not allowed to vote but allowed to view the options? + if (!$context['allow_vote']) + { + echo ' + + + + + ', $context['allow_poll_view'] ? ' + + + ' : '', ' +
    + '; + + // Show each option with its corresponding percentage bar. + foreach ($context['poll']['options'] as $option) + echo ' + + ', $context['allow_poll_view'] ? ' + ' : '', ' + '; + + echo ' +
    ', $option['option'], '' . $option['bar'] . ' ' . $option['votes'] . ' (' . $option['percent'] . '%)
    +
    '; + + // If they are allowed to revote - show them a link! + if ($context['allow_change_vote']) + echo ' + ', $txt['poll_change_vote'], '
    '; + + // If they're allowed to lock the poll, show a link! + if ($context['poll']['lock']) + echo ' + ', !$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b'], '
    '; + + // If they're allowed to edit the poll... guess what... show a link! + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    ' . $txt['smf24'] . ': ' . $context['poll']['total_votes'] . '

    '; + } + // They are allowed to vote! Go to it! + else + { + echo ' +
    + + + + + + + + + +
    '; + + // Show a warning if they are allowed more than one option. + if ($context['poll']['allowed_warning']) + echo ' + ', $context['poll']['allowed_warning'], ' +
    '; + + // Show each option with its button - a radio likely. + $_i = 0; + foreach ($context['poll']['options'] as $option) + echo ' + ', $option['vote_button'], '
    '; + + echo ' +
    '; + + // Allowed to view the results? (without voting!) + if ($context['allow_poll_view']) + echo ' + ', $txt['smf29'], '
    '; + + // Show a link for locking the poll as well... + if ($context['poll']['lock']) + echo ' + ', (!$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b']), '
    '; + + // Want to edit it? Click right here...... + if ($context['poll']['edit']) + echo ' + ', $txt['smf39'], ''; + + echo ' +
    + +
    '; + } + + echo ' +
    '; + } + + // Show the page index... "Pages: [1]". + echo ' + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index']; + + // Show a "go down" link? + if (!empty($modSettings['topbottomEnable'])) + echo $context['menu_separator'], '', $settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5'], ''; + + echo ' + '; + + $buttonArray = array(); + if ($context['can_reply']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // This is a special case; if they can see mark unread, put it at the top... otherwise show add poll. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; + elseif ($context['can_add_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; + + if ($context['can_send_topic']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; + + echo implode($context['menu_separator'], $buttonArray); + + echo '
    +
    '; + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
    '; + + echo ' +'; + + // Get all the messages... + while ($message = $context['get_message']()) + { + echo ' + '; + + + if ($banner_count++ == 0 AND $context['user']['is_guest']) { + echo ''; + } elseif (($context['is_sticky'] || $context['is_first_sticky']) && ($message['id']==$context['topic_first_message'])) { + echo ''; + } + + } + echo ' + +
    '; + + // Show the message anchor and a "new" anchor if this message is new. + if ($message['id'] != $context['first_message']) + echo ' + ', $message['first_new'] ? '' : ''; + + echo ' + + +
    '; + + // Show information about the poster of this message. + + // pink nickname for Diana //////////////////////// +/* if($message['member']['name'] == 'Diana') + $_special_color = 'style="color: violet"'; + else $_special_color = '';*/ + /////////////////////////////////////////////////// + echo ' + + '; + echo ' + + + '; + + // Now for the attachments, signature, ip logged, etc... + echo ' + + + +
    '; +# echo ' +# '; + // Show the member's gender icon? + if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '') + echo ' + ',$message['member']['gender']['image']; + if (empty($context['user']['is_guest'])) { + $_special_color=""; + if(isset($message['member']['group']) && $message['member']['group'] != '' && isset($message['member']['group_color'])) + $_special_color='style="color: '.$message['member']['group_color'].';"'; + echo ' + ',$message['member']['name'],' +
    '; + unset($_special_color); + } + else + echo ' + ',$message['member']['name'],' +
    '; + + // Show the member's custom title, if they have one. + if (isset($message['member']['title']) && $message['member']['title'] != '') + echo ' + ', $message['member']['title'], '
    '; + + // Show the member's primary group (like 'Administrator') if they have one. + if (isset($message['member']['group']) && $message['member']['group'] != '') + echo ' + ', $message['member']['group']; + if (!$context['user']['is_guest'] && isset($message['member']['warning']['link']) && $message['member']['warning']['link'] != '') + echo' + ', $message['member']['warning']['link']; + + echo '
    '; + // Don't show these things for guests. + if (!$message['member']['is_guest'] /*&& !$context['user']['is_guest']*/) + { + // Show the post group if and only if they have no other group or the option is on, and they are in a post group. +/* if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') + echo ' + ', $message['member']['post_group'], '
    '; + echo ' + ', $message['member']['group_stars'], '
    ';*/ + + + // Show avatars, images, etc.? + if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) + echo ' +
    ', $message['member']['avatar']['image'], '
    '; + + // Show their personal text? + if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') + echo ' + ', $message['member']['blurb'], '

    + '; + else + echo '
    '; + + // Show online and offline buttons? + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'] && $message['member']['online']['is_online']) + echo ' + ', /*$context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ?*/ ' ' . $message['member']['online']['text'] . '' /*: ''*/, ' - '; + + // Show how many posts they have made. +// echo ' +// ', $txt[26], ': ', $message['member']['posts'], '
    +//
    '; + + // This shows the popular messaging icons. +/* echo ' + ', $message['member']['icq']['link'], ' + ', $message['member']['msn']['link'], ' + ', $message['member']['aim']['link'], ' + ', $message['member']['yim']['link'], '
    '; +*/ + + // Show the profile, website, email address, and personal message buttons. + if ($settings['show_profile_buttons']) + { + // Don't show the profile button if you're not allowed to view the profile. + if ($message['member']['can_view_profile']) + echo ' + ', (/*$settings['use_image_buttons'] ? '' . $txt[27] . '' : */$txt[27]), ''; +/* + // Don't show an icon if they haven't specified a website. + if ($message['member']['website']['url'] != '') + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; + + // Don't show the email address if they want it hidden. + if (empty($message['member']['hide_email'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; +*/ + // Since we know this person isn't a guest, you *can* message them. + if ($context['can_send_pm']) + echo ' - ', /*$settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'],*/ $txt['online4'], ''; + } +/* } + // Otherwise, show the guest's email. + else + echo ' +
    +
    + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + */ + + // Is karma display enabled? Total or +/-? + if ($modSettings['karmaMode'] == '1' AND $modSettings['karmadescmod'] == 1) + echo ' +
    ', $modSettings['karmaLabel'], ' '/*, '
    '*/; + elseif ($modSettings['karmaMode'] == '1' AND $modSettings['karmadescmod'] == 0) + echo ' +
    ', $modSettings['karmaLabel'], ' '; + /*elseif ($modSettings['karmaMode'] == '2') + echo ' +
    + ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
    ';*/ + + // Is this user allowed to modify this member's karma? + if ($message['member']['karma']['allow']) + echo '  + + [ ', $message['member']['karma']['good'] - $message['member']['karma']['bad'],' ] -
    '; + else + echo $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
    '; + + + // Show how many posts they have made. + echo ' +
    ', $txt[26], ': ', $message['member']['posts'], ' +
    '; + + } + // Done with the information about the poster... on to the post itself. + echo ' +
    +
    + + + +
    ', $message['subject'], '';/*--> + '; + ', $message['subject'], '';*/ + + // If this is the first post, (#0) just say when it was posted - otherwise give the reply #. + echo ' + '/*, !($message['id'] == $context['topic_first_message']) ? $txt['post_no']. $message['counter'] : '', ' ', $txt[30], ': '*/, $message['time'], ''; + + // Can they reply? Have they turned on quick reply? + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + // So... quick reply is off, but they *can* reply? + elseif ($context['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + + // Can the user modify the contents of this post? + if ($message['can_modify']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[66] . '' : $txt[17]), ''; + + // How about... even... remove it entirely?! + if ($message['can_remove']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + if ($context['can_warn']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['visual_raise'] . '' : $txt['visual_warn']), ''; + + + // What about splitting it off the rest of the topic? + if ($context['can_split']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['smf251'] . '' : $txt['smf251']), ''; + + // Show a checkbox for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove']) + echo ' + '; + + // Show the post itself, finally! + echo ' +
    +
    +
    ', $message['body']; + /*if($modSettings['nowplayingEnabled'] && $message['nowplaying'] != '') + { + if(isset($modSettings['nowplaying_image']) && $modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text']) && $modSettings['nowplaying_text'] != '') + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + echo '

    ', $nowplayingstring, ' ', $message['nowplaying'], ''; + }*/ + echo '
    +
    + + + + + +
    '; + + // Assuming there are attachments... + if (!empty($message['attachment'])) + { + echo ' +
    +
    '; + + foreach ($message['attachment'] as $attachment) + { + if (isset($attachment['image'])) + echo ' + + ', $attachment['image'], ' +
    '; + echo ' + * ' . $attachment['name'] . ' (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['width'] . 'x' . $attachment['height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)
    '; + } + + echo ' +
    '; + } + + echo ' +
    '; + + // Show "? Last Edit: Time by Person ?" if this post was edited. + if ($settings['show_modify'] && !empty($message['modified']['name'])) + echo ' + « ', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], ' »'; + if($modSettings['nowplayingEnabled'] && $message['nowplaying'] != '' && !$context['user']['is_guest']) + { + if(isset($modSettings['nowplaying_image']) && $modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text']) && $modSettings['nowplaying_text'] != '') + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + echo '

    ', $nowplayingstring, ' ', $message['nowplaying'], ''; + } + + echo ' +
    '; + + // put to site + if($context['user']['is_admin'] OR $context['user']['name'] == 'Yeah_baby') + echo' + На сайт '; + + // quick quote + if (!$context['user']['is_guest']) + echo ' + Быстрая цитата '; + + // Maybe they want to report this post to the moderator(s)? + if ($context['can_report_moderator']) + echo ' + ', $txt['rtm1'], '  '; + + /*echo ' + ';*/ + // Show the IP to this user for this post - because you can moderate? + if ($context['can_moderate_forum'] && !empty($message['member']['ip'])) + echo ' + ', $message['member']['ip'], ''; + // Or, should we show it because this is you? + elseif (false and $message['can_see_ip']) + echo ' + ', $message['member']['ip'], ''; + // Okay, are you at least logged in? Then we can show something about why IPs are logged... +/* elseif (!$context['user']['is_guest']) + echo ' + ', $txt[511], '';*/ + // Otherwise, you see NOTHING! + else + echo ' + '/*, $txt[511]*/; + + echo ' +
    '; + + // Show the member's signature? + if (/*empty($context['user']['is_guest']) &&*/ + !empty($message['member']['signature']) && + empty($options['show_no_signatures'])) + echo ' +
    +
    ', $message['member']['signature'], '
    '; + + echo ' +
    +
    +
    '; + ?> +
    + + +
    +
     
    + + + + + + +
    + + + + + +
    + ', $txt[139], ': ', $context['page_index'], ($modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : ''), ' + '; + + $buttonArray = array(); + if ($context['can_reply']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Another special case, similar to above but reversed. Show "add poll" unless they can't - then show unread here too. + if ($context['can_add_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; + elseif ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; + + if ($context['can_send_topic']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; + + echo implode($context['menu_separator'], $buttonArray); + + echo '  +
    +
    + + + '; + if ($settings['linktree_inline']) + echo ' + '; + echo ' + + +
    ', theme_linktree(), ' | ', $txt[118], ': ',$context['subject'],' ', $context['previous_next'], '
    '; + + echo ' +
    ', theme_show_mod_buttons(), '
    '; + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post']) + echo ' + +
    '; + if (!empty($settings['display_who_viewing'])) + { + echo ' +
    ', $txt['who_viewing_topic']; + + // Show just numbers...? + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + // Or show the actual people viewing the topic? + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + + // Now show how many guests are here too. + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], /*$txt['who_viewing_topic'],*/ '
    '; + } + + echo ' +
    +
    + ' . $txt[160] . ': +   + +
    +
    +
    '; + + if ($context['can_reply'] && !empty($options['display_quick_reply'])) + { + if ($context['show_spellchecking']) + echo ' +'; + + echo ' + + + + + + + + +
    + ', $txt['quick_reply_1'], '
    '; + if ($context['show_spellchecking']) + echo ' +
    '; + + echo ' +'; + } + + echo ''; +} + +function theme_show_mod_buttons() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + $moderationButtons = array(); + + if ($context['can_move']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt[132] . '' : $txt[132]) . ''; + if ($context['can_delete']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt[63] . '' : $txt[63]) . ''; + if ($context['can_lock']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280']) . '' : (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280'])) . ''; + if ($context['can_sticky']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278']) . '' : (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278'])) . ''; + if ($context['can_merge']){ + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf252'] . '' : $txt['smf252']) . ''; + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf252lnk'] . '' : $txt['smf252lnk']) . ''; + } + if ($context['can_remove_poll']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['poll_remove'] . '' : $txt['poll_remove']) . ''; + + if ($context['calendar_post']) + $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['calendar37'] . '' : $txt['calendar37']) . ''; + + if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + $moderationButtons[] = $settings['use_image_buttons'] ? '' : '' . $txt['quickmod_delete_selected'] . ''; + + if ($context['can_sticky']) + $moderationButtons[] = '' .$txt['make_first_sticky']. ''; + + + return implode($context['menu_separator'], $moderationButtons); +} + +// Show an enhanced quick reply box for those that want everything. +function template_enhanced_quick_reply() +{ + global $context, $modSettings, $settings, $txt, $options, $scripturl, $db_prefix; + + loadLanguage('Post'); + // Initialize smiley array... + $context['smileys'] = array( + 'postform' => array(), + 'popup' => array(), + ); + + // Load smileys - don't bother to run a query if we're not using the database's ones anyhow. + if (empty($modSettings['smiley_enable']) && $context['user']['smiley_set'] != 'none') + $context['smileys']['postform'][] = array( + 'smileys' => array( + array('code' => ':)', 'filename' => 'default/smiley.gif', 'description' => $txt[287]), + array('code' => ';)', 'filename' => 'wink.gif', 'description' => $txt[292]), + array('code' => ':D', 'filename' => 'cheesy.gif', 'description' => $txt[289]), + array('code' => ';D', 'filename' => 'grin.gif', 'description' => $txt[293]), + array('code' => '>:(', 'filename' => 'angry.gif', 'description' => $txt[288]), + array('code' => ':(', 'filename' => 'sad.gif', 'description' => $txt[291]), + array('code' => ':o', 'filename' => 'shocked.gif', 'description' => $txt[294]), + array('code' => '8)', 'filename' => 'cool.gif', 'description' => $txt[295]), + array('code' => '???', 'filename' => 'huh.gif', 'description' => $txt[296]), + array('code' => '::)', 'filename' => 'rolleyes.gif', 'description' => $txt[450]), + array('code' => ':P', 'filename' => 'tongue.gif', 'description' => $txt[451]), + array('code' => ':-[', 'filename' => 'embarrassed.gif', 'description' => $txt[526]), + array('code' => ':-X', 'filename' => 'lipsrsealed.gif', 'description' => $txt[527]), + array('code' => ':-\\', 'filename' => 'undecided.gif', 'description' => $txt[528]), + array('code' => ':-*', 'filename' => 'kiss.gif', 'description' => $txt[529]), + array('code' => ':\'(', 'filename' => 'cry.gif', 'description' => $txt[530]) + ), + 'last' => true, + ); + elseif ($context['user']['smiley_set'] != 'none') + { + $request = db_query(" + SELECT code, filename, description, smileyRow, hidden + FROM {$db_prefix}smileys + WHERE hidden IN (0, 2) + ORDER BY smileyRow, smileyOrder", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $row['code'] = htmlspecialchars($row['code']); + $row['filename'] = htmlspecialchars($row['filename']); + $row['description'] = htmlspecialchars($row['description']); + + $context['smileys'][empty($row['hidden']) ? 'postform' : 'popup'][$row['smileyRow']]['smileys'][] = $row; + } + mysql_free_result($request); + + } + + // Clean house... add slashes to the code for javascript. + foreach (array_keys($context['smileys']) as $location) + { + foreach ($context['smileys'][$location] as $j => $row) + { + $n = count($context['smileys'][$location][$j]['smileys']); + for ($i = 0; $i < $n; $i++) + { + $context['smileys'][$location][$j]['smileys'][$i]['code'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['code']); + $context['smileys'][$location][$j]['smileys'][$i]['js_description'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['description']); + } + + $context['smileys'][$location][$j]['smileys'][$n - 1]['last'] = true; + } + if (!empty($context['smileys'][$location])) + $context['smileys'][$location][count($context['smileys'][$location]) - 1]['last'] = true; + } +// $settings['smileys_url'] = $settings['smileys_url']. '/' . $context['user']['smiley_set']; + $settings['smileys_url'] = "http://rock.ru/forum/Smileys/default"; + + // Allow for things to be overridden. + if (!isset($context['post_box_columns'])) + $context['post_box_columns'] = 75; + if (!isset($context['post_box_rows'])) + $context['post_box_rows'] = 7; + if (!isset($context['post_box_name'])) + $context['post_box_name'] = 'message'; + if (!isset($context['post_form'])) + $context['post_form'] = 'postmodify'; + + // Generate a list of buttons that shouldn't be shown - this should be the fastest way to do this. + if (!empty($modSettings['disabledBBC'])) + { + $disabled_tags = explode(',', $modSettings['disabledBBC']); + foreach ($disabled_tags as $tag) + $context['disabled_tags'][trim($tag)] = true; + } + + // Assuming BBC code is enabled then print the buttons and some javascript to handle it. + if (0 and !empty($modSettings['enableBBC']) && !empty($settings['show_bbc'])) + { + echo ' + + + + '; + + // The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you! + $context['bbc_tags'] = array(); + $context['bbc_tags'][] = array( + 'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]), + 'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]), + 'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]), + 'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]), + array(), + 'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]), + 'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]), + 'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]), + 'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]), + array(), + 'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]), + array(), + 'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]), + 'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]), + ); + $context['bbc_tags'][] = array( + 'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]), + 'video' => array('code' => 'video', 'before' => '[video]', 'after' => '[/video]', 'description' => 'Вставить видео'), + 'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]), + 'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]), + 'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]), + 'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]), + array(), + 'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]), + 'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]), + 'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]), + array(), + 'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]), + 'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]), + 'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]), + array(), + 'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $txt[259]), + 'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]), + array(), + 'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]), + ); + // Here loop through the array, printing the images/rows/separators! + foreach ($context['bbc_tags'][0] as $image => $tag) + { + // Is there a "before" part for this bbc button? If not, it can't be a button!! + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + // Print a drop down list for all the colors we allow! + if (!isset($context['disabled_tags']['color'])) + echo ' '; + echo '
    '; + + // Print the buttom row of buttons! + foreach ($context['bbc_tags'][1] as $image => $tag) + { + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + echo ' + + '; + } + + // Now start printing all of the smileys. + if (!empty($context['smileys']['postform'])) + { + echo ' + + '; + + // Show each row of smileys ;). + foreach ($context['smileys']['postform'] as $smiley_row) + { + foreach ($smiley_row['smileys'] as $smiley) + echo ' + ', $smiley['description'], ''; + + // If this isn't the last row, show a break. + if (empty($smiley_row['last'])) + echo '
    '; + } + + // If the smileys popup is to be shown... show it! + if (!empty($context['smileys']['popup'])) + echo ' + [', $txt['more_smileys'], ']'; + + echo ' + + '; + } + + // If there are additional smileys then ensure we provide the javascript for them. + if (0 AND !empty($context['smileys']['popup'])) + { + echo ' + '; + } + +} +?> diff --git a/Themes/modern/Errors.template.php b/Themes/modern/Errors.template.php new file mode 100644 index 0000000..d8d6723 --- /dev/null +++ b/Themes/modern/Errors.template.php @@ -0,0 +1,141 @@ + + + ', $context['error_title'], ' + + + + ', $context['error_message'], ' + + +'; + + // Show a back button (using javascript.) + echo ' +'; +} + +function template_error_log() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' +
    + + + + + + + '; + + if ($context['has_filter']) + echo ' + + + '; + echo ' + + + '; + + if (!empty($context['errors'])) + echo ' + + + '; + + foreach ($context['errors'] as $error) + { + echo ' + + + '; + } + + if (!empty($context['errors'])) + echo ' + + + '; + else + echo ' + + + '; + + echo ' + + + +
    ', $txt[119], ' ', $txt['errlog1'], '
    ', $txt['errlog2'], '
    + ', $txt['applying_filter'], ': ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], ' (', $txt['clear_filter'], ') +
    + + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    +
    + +
    + + + + + + + + + + + +
    + ', $txt['apply_filter'], ': ', $txt['filter_only_member'], ' + ', $error['member']['link'], ' + + + ', $error['time'], ' +
    + ', $txt['apply_filter'], ': ', $txt['filter_only_ip'], ' + ', $error['member']['ip'], '   + '; + + if ($error['member']['session'] != '') + echo ' + ', $txt['apply_filter'], ': ', $txt['filter_only_session'], ' + ', $error['member']['session']; + + echo ' +
    +
    ', $txt['apply_filter'], ': ', $txt['filter_only_message'], '
    +
    ', $error['message']['html'], '
    +
    +
    + +
    ', $txt[151], '
    + + +
    ', $txt[139], ': ', $context['page_index'], '
    +

    '; + if ($context['sort_direction'] == 'down') + echo ' + '; + echo ' + +
    '; +} + +?> diff --git a/Themes/modern/GoogleMap.template.php b/Themes/modern/GoogleMap.template.php new file mode 100644 index 0000000..c253fdd --- /dev/null +++ b/Themes/modern/GoogleMap.template.php @@ -0,0 +1,77 @@ + + +function template_map() { + global $context, $modSettings, $scripturl, $txt, $settings; + + if ($modSettings['googleMapsEnable']) { +echo '
    +
    Member Map
    +
    + + + +
    + + + '; +if ($modSettings['googleMapsEnableLegend']) { +echo ' + + '; +} +echo ' + + + +
    + '; +if ($modSettings['googleSidebar'] == 1) +echo ' + '; +if ($modSettings['googleSidebar'] == 2) +echo ' + + '; +echo ' +
    +
    +
    + +
    + +
    + + + +
    + '; +if (!$modSettings['googleMapsPinGender']) + echo ' + '; +else + echo ' + + + '; +if ($modSettings['googleMapsEnableClusterer']) +echo ' + '; +echo ' +
    ', $txt['googleMapGreenPinGD'], '', $txt['googleMapGreenPinNG'], '', $txt['googleMapBluePin'], '', $txt['googleMapRedPin'], '', $txt['googleMapPurplePin'], '
    +
    '; +if (allowedTo('googleMap_place')) + echo $txt['googleMapAddPinNote']; +echo ' + + +
    +
    +
    +
    '; + } +} + +?> diff --git a/Themes/modern/Help.template.php b/Themes/modern/Help.template.php new file mode 100644 index 0000000..e5cabbf --- /dev/null +++ b/Themes/modern/Help.template.php @@ -0,0 +1,137 @@ + + + + + ', $context['page_title'], ' + + + + + ', $context['help_text'], '
    +
    + + +'; +} + +function template_find_members() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + ', $txt['find_members'], ' + + + + + + +
    + + + + + + + + + + +
    ', $txt['find_members'], '
    + ', $txt['find_username'], ':
    +
    + ', $txt['find_wildcards'], ' +
    + + +
    + +
    + + + + + '; + + if (empty($context['results'])) + echo ' + + + '; + else + { + $alternate = true; + foreach ($context['results'] as $result) + { + echo ' + + + '; + + $alternate = !$alternate; + } + + echo ' + + + '; + } + + echo ' +
    ', $txt['find_results'], '
    ', $txt['find_no_results'], '
    + ' . $txt[27] . ' + ', $result['name'], ' +
    ', $txt[139], ': ', $context['page_index'], '
    + + + +
    '; + + if (empty($context['results'])) + echo ' + '; + + echo ' + +'; +} + +?> \ No newline at end of file diff --git a/Themes/modern/InstantMessage.template.php b/Themes/modern/InstantMessage.template.php new file mode 100644 index 0000000..8f8508a --- /dev/null +++ b/Themes/modern/InstantMessage.template.php @@ -0,0 +1,468 @@ + + + + + +
    ', theme_linktree(), '
    + + + + + + + + + + '; + if (!$context['show_delete']) + echo ' + + + '; + $next_alternate = false; + while ($message = $context['get_pmessage']()) + { + echo ' + + + + + + '; + $next_alternate = $message['alternate']; + } + + echo ' + + + +
    ', $context['show_delete'] ? ' + ' . ($settings['use_image_buttons'] ? '' . $txt[412] . '' : $txt[412]) . '' . $context['menu_separator'] : '', $context['can_send_pm'] ? ($context['from_or_to'] == 'from' ? ' + ' . ($settings['use_image_buttons'] ? '' . $txt[320] . '' : $txt[320]) . '' . $context['menu_separator'] : ' + ' . ($settings['use_image_buttons'] ? '' . $txt[316] . '' : $txt[316]) . '' . $context['menu_separator']) : '', $context['can_send_pm'] ? ' + ' . ($settings['use_image_buttons'] ? '' . $txt[321] . '' : $txt[321]) . '' . $context['menu_separator'] : '', ' + ', ($settings['use_image_buttons'] ? '' . $txt[322] . '' : $txt[322]), ' +
    ', $txt[317], $context['sort_by'] == 'date' ? ' ' : '', '', $txt[319], $context['sort_by'] == 'subject' ? ' ' : '', '', ($context['from_or_to'] == 'from' ? $txt[318] : $txt[324]), $context['sort_by'] == 'name' ? ' ' : '', '
    ', $txt[151], '
    ', $message['time'], '', $message['subject'], '', ($context['from_or_to'] == 'from' ? $message['member']['link'] : (empty($message['recipients']['to']) ? '' : implode(', ', $message['recipients']['to']))), '
    + + + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    +
    '; + + if ($context['get_pmessage'](true)) + { + echo ' + + + + + +
     ', $txt[29], '', $txt[118], '
    + '; + + while ($message = $context['get_pmessage']()) + { + $windowcss = $message['alternate'] == 0 ? 'windowbg' : 'windowbg2'; + + echo ' + '; + } + + echo ' + +
    + + + +
    + + + + + + + + +
    '; + if ($message['member']['gender']['image'] != '') + echo ' + ', $message['member']['gender']['image']; + + echo ' + ', $message['member']['link'], ' +
    '; + if (isset($message['member']['title']) && $message['member']['title'] != '') + echo ' + ', $message['member']['title'], '
    '; +/* + if (isset($message['member']['group']) && $message['member']['group'] != '') + echo ' + ', $message['member']['group'], '
    '; +*/ + + if (!$message['member']['is_guest']) + { +/* + // Show the post group if and only if they have no other group or the option is on, and they are in a post group. + if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') + echo ' + ', $message['member']['post_group'], '
    '; + echo ' + ', $message['member']['group_stars'], '
    '; +*/ + // Is karma display enabled? Total or +/-? + if ($modSettings['karmaMode'] == '1') + echo ' +
    + ', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
    '; + elseif ($modSettings['karmaMode'] == '2') + echo ' +
    + ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
    '; + + // Is this user allowed to modify this member's karma? + if ($message['member']['karma']['allow']) + echo ' + ', $modSettings['karmaApplaudLabel'], ' ', $modSettings['karmaSmiteLabel'], '
    '; + + // Show online and offline buttons? + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) + echo ' + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $message['member']['online']['text'] . '' : '', '

    '; + + // Show how many posts they have made. + echo ' + ', $txt[26], ': ', $message['member']['posts'], '
    +
    '; + + // Show avatars, images, etc.? + if (!empty($settings['show_user_images']) && empty($options['show_no_avatars'])) + echo ' + ', $message['member']['avatar']['image'], '
    '; + + // Show their personal text? + if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') + echo ' + ', $message['member']['blurb'], '
    +
    '; + echo ' + ', $message['member']['icq']['link'], ' + ', $message['member']['msn']['link'], ' + ', $message['member']['yim']['link'], ' + ', $message['member']['aim']['link'], '
    '; + + // Show the profile, website, email address, and personal message buttons. + if ($settings['show_profile_buttons']) + { + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[27] . '' : $txt[27]), ''; + if ($message['member']['website']['url'] != '') + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; + if (empty($message['member']['hide_email'])) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + if (!$context['user']['is_guest'] && $context['can_send_pm']) + echo ' + ', $settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'], ''; + } + } + else + echo ' +
    +
    + ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; + echo ' +
    +
    + + + +
    + ', $message['subject'], ''; + + // Show who the message was sent to. + echo ' +
    « ', $txt['sent_to'], ': '; + + // People it was sent directly to.... + if (!empty($message['recipients']['to'])) + echo implode(', ', $message['recipients']['to']); + // Otherwise, we're just going to say "some people". + elseif ($context['folder'] != 'outbox') + echo '(', $txt['pm_undisclosed_recipients'], ')'; + + echo ' ', $txt[30], ': ', $message['time'], ' »
    '; + + // If we're in the outbox, show who it was sent to besides the "To:" people. + if (!empty($message['recipients']['bcc'])) + echo ' +
    « ', $txt[1502], ': ', implode(', ', $message['recipients']['bcc']), ' »
    '; + + echo ' +
    '; + + // Show reply buttons if you have the permission to send PMs. + if ($context['can_send_pm']) + { + // You can't really reply if the member is gone. + if (!$message['member']['is_guest']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]), ' ', $context['menu_separator']; + // This is for "forwarding" - even if the member is gone. + else + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), '', $context['menu_separator']; + } + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[154] . '' : $txt[154]), ' + +
    +
    +
    ', $message['body'], '
    +
    '; + + // Show the member's signature? + if (!empty($message['member']['signature']) && empty($options['show_no_signatures'])) + echo ' +
    +
    ', $message['member']['signature'], '
    '; + + echo ' +
    +
    +
    + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    '; + } + + echo ' + +'; +} + +function template_send() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + if ($context['show_spellchecking']) + echo ' + '; + + echo ' + + + + +
    ', theme_linktree(), '
    + + + + +
    + ', ($settings['use_image_buttons'] ? '' . $txt[316] . '' : $txt[316]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[320] . '' : $txt[320]), '', $context['menu_separator'], ' +
    '; + + // Show which messages were sent successfully and which failed. + if (!empty($context['send_log'])) + { + echo ' +
    + + + + + + + +
    ', $txt['pm_send_report'], '
    '; + foreach ($context['send_log']['sent'] as $log_entry) + echo '', $log_entry, '
    '; + foreach ($context['send_log']['failed'] as $log_entry) + echo '', $log_entry, '
    '; + echo ' +

    '; + } + + // Show the preview of the personal message. + if (isset($context['preview_message'])) + echo ' +
    + + + + + + + +
    ', $context['preview_subject'], '
    + ', $context['preview_message'], ' +

    '; + + // Main message editing box. + echo ' + + + + + + +
    ', $txt[321], ' ', $txt[321], '
    +
    + '; + + // If there were errors for sending the PM, show them. + if (!empty($context['post_error']['messages'])) + { + echo ' + + + + '; + } + + // To and bcc. Include a button to search for members. + echo ' + + + + + + + '; + // Subject of personal message. + echo ' + + + + '; + + // Show BBC buttons, smileys and textbox. + theme_postbox($context['message']); + + // Send, Preview, spellcheck buttons. + echo ' + + + + + + + +
    + ', $txt['error_while_submitting'], ' +
    + ', implode('
    ', $context['post_error']['messages']), ' +
    +
    ', $txt[150], ': +   + ', $txt['find_members'], ' ', $txt['find_members'], ' +
    ', $txt[1502], ': +   + ', $txt['find_members'], ' ', $txt[748], ' +
    ', $txt[70], ':
    + + '; + if ($context['show_spellchecking']) + echo ' + '; + echo ' +
    + +
    + + +
    +
    '; + + // Some hidden information is needed in order to make the spell checking work. + if ($context['show_spellchecking']) + echo ' +
    '; + + // Show the message you're replying to. + if ($context['reply']) + echo ' +
    +
    + + + + + + + + + + +
    ', $txt[319], ': ', $context['quoted_message']['subject'], '
    + + + + + +
    ', $txt[318], ': ', $context['quoted_message']['member']['name'], '', $txt[30], ': ', $context['quoted_message']['time'], '
    +
    ', $context['quoted_message']['body'], '
    '; +} + +// This template asks the user whether they wish to empty out their folder/messages. +function template_ask_delete() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + + + + + +
    ', ($context['delete_all'] ? $txt[411] : $txt[412]), '
    + ', $txt[413], '
    +
    + ', $txt[163], ' - ', $txt[164], ' +
    '; +} + +// This template asks the user what messages they want to prune. +function template_prune() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + + + +
    ', $txt[411], '
    ', $txt['pm_prune_desc1'], ' ', $txt['pm_prune_desc2'], '
    + +
    '; +} + +?> diff --git a/Themes/modern/Login.template.php b/Themes/modern/Login.template.php new file mode 100644 index 0000000..34ea54f --- /dev/null +++ b/Themes/modern/Login.template.php @@ -0,0 +1,271 @@ + + + + '; + + // Did they make a mistake last time? + if (isset($context['login_error'])) + echo ' + + '; + + // Or perhaps there's some special description for this time? + if (isset($context['description'])) + echo ' + + '; + + // Now just get the basic information - username, password, etc. + echo ' + + + + + + + + + + + + + + + + + +
    + ', $txt[34], ' +
    + ', $context['login_error'], ' +
    + ', $context['description'], '
    +
    +
    ', $txt[35], ':
    ', $txt[36], ':
    ', $txt[497], ':
    ', $txt[508], ':
    ', $txt[315], '

    + '; + + // Focus on the correct input - username or password. + echo ' + '; +} + +// Tell a guest to get lost or login! +function template_kick_guest() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + // This isn't that much... just like normal login but with a message at the top. + echo ' +
    + + + + '; + + // Show the message or default message. + echo ' + '; + + // And now the login information. + echo ' + + + + + +
    ', $txt[633], '
    + ', empty($context['kick_message']) ? $txt[634] : $context['kick_message'], '
    + ', $txt[635], ' ', $txt[636], ' ', $txt[637], ' +
    ', $txt[34], '
    + + + + + + + + + + + + + + + + + + +
    ', $txt[35], ':
    ', $txt[36], ':
    ', $txt[497], ':
    ', $txt[508], ':
    ', $txt[315], '

    +
    +
    '; + + // Do the focus thing... + echo ' + '; +} + +// This is for maintenance mode. +function template_maintenance() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + // Display the administrator's message at the top. + echo ' +
    + + + + + + + + + '; + + // And now all the same basic login stuff from before. + echo ' + + +
    ', $context['title'], '
    + ', $txt['maintenance3'], ' + ', $context['description'], '
    ', $txt[114], '
    + + + + + + + + + + + + + + +
    ', $txt[35], ':', $txt[36], ':  
    ', $txt[497], ':  ', $txt[508], ':
    +
    +
    '; +} + +// This is for the security stuff - makes administrators login every so often. +function template_admin_login() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Since this should redirect to whatever they were doing, send all the get data. + echo ' +
    + + + + '; + + // We just need the password. + echo ' + + + +
    + ', $txt[34], ' +
    + ', $txt[36], ': ', $txt[119], '
    + +
    '; + + // Make sure to output all the old post data. + echo $context['post_data'], ' +
    '; + + // Focus on the password box. + echo ' +'; +} + +// Activate your account manually? +function template_retry_activate() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Just ask them for their code so they can try it again... + echo ' +
    +
    + + + '; + + // You didn't even have an ID? + if (empty($context['member_id'])) + echo ' + + + '; + + echo ' + + + + + + +
    ', $context['page_title'], '
    ', $txt['invalid_activation_username'], ':
    ', $txt['invalid_activation_retry'], ':
    +
    '; +} + +// Activate your account manually? +function template_resend() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Just ask them for their code so they can try it again... + echo ' +
    +
    + + + + + + + + + + + + + + + '; + + if ($context['can_activate']) + echo ' + + + + + '; + + echo ' + + +
    ', $context['page_title'], '
    ', $txt['invalid_activation_username'], ':
    ', $txt['invalid_activation_new'], '
    ', $txt['invalid_activation_new_email'], ':
    ', $txt['invalid_activation_password'], ':
    ', $txt['invalid_activation_known'], '
    ', $txt['invalid_activation_retry'], ':
    +
    '; +} + +?> diff --git a/Themes/modern/ManageAttachments.template.php b/Themes/modern/ManageAttachments.template.php new file mode 100644 index 0000000..fe912c9 --- /dev/null +++ b/Themes/modern/ManageAttachments.template.php @@ -0,0 +1,107 @@ + + + ', $txt['smf201'], ' + + ', $txt['smf202'], ' + + ', $txt['smf203'], ' + + + + + + + + + + + + +
    ', $txt['smf204'], ':', $context['num_attachments'], '
    ', $txt['attachment_manager_total_avatars'], ':', $context['num_avatars'], '
    ', $txt['smf205'], ':', $context['attachment_total_size'], ' ', $txt['smf211'], ' [', $txt['attachment_manager_recount'], ']
    ', $txt['smf206'], ':', isset($context['attachment_space']) ? $context['attachment_space'] . ' ' . $txt['smf211'] : $txt['smf215'], '
    + + + ', $txt['smf207'], ' + + +
    + ', $txt[72], ':
    + ', $txt['smf209'], ' ', $txt[579], ' + + +
    +
    + ', $txt[72], ':
    + ', $txt['smf210'], ' ', $txt['smf211'], ' + + +
    +
    + ', $txt['attachment_manager_avatars_older'], ' ', $txt[579], ' + + +
    + + + +
    +
    + + + + + + + + + + + + '; + $alternate = false; + foreach ($context['posts'] as $post) + { + echo ' + + + + + + + '; + $alternate = !$alternate; + } + echo ' + + + + + + +
    ', $txt['attachment_manager_browse_files'], '
    '; + + if (!$context['browse_avatars']) + echo ' + >', $txt['attachment_manager_attachments'], ' | + ', $txt['attachment_manager_avatars'], ''; + else + echo ' + ', $txt['attachment_manager_attachments'], ' | + >', $txt['attachment_manager_avatars'], ''; + + echo ' +
    ', $txt['smf213'], $context['sort_by'] == 'name' ? ' ' : '', '', $txt['smf214'], $context['sort_by'] == 'size' ? ' ' : '', '', empty($context['browse_avatars']) ? $txt[279] : $txt['attachment_manager_member'], $context['sort_by'] == 'member' ? ' ' : '', '', empty($context['browse_avatars']) ? $txt[317] : $txt['attachment_manager_last_active'], $context['sort_by'] == 'date' ? ' ' : '', '
    ', $post['attachment']['link'], '', $post['attachment']['size'], $txt['smf211'], '', $post['poster']['link'], '', $post['time'], !$context['browse_avatars'] ? '
    ' . $txt['smf88'] . ' ' . $post['link'] : '', '
    ', $txt[139], ': ', $context['page_index'], '
    + + + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/ManageBoards.template.php b/Themes/modern/ManageBoards.template.php new file mode 100644 index 0000000..681d944 --- /dev/null +++ b/Themes/modern/ManageBoards.template.php @@ -0,0 +1,409 @@ + + + + ' . $txt[119] . ' + ' . $txt[41] . ' + + + ' . $txt[677] . ' + + + ' . $txt['boardsEdit'] . ' + + '; + + // Button for creating a new category. + echo ' + + +
    + + +
    + + '; + + // Loop through every categories, listing the boards in each as we go. + foreach ($context['categories'] as $category) + { + // Link to modify the category. + echo ' + + + ', $category['name'], ' ', $txt['catModify'], ' + + '; + + // Boards table header. + echo ' + + +
    + + + + '; + + $alternate = false; + + // List through every board in the category, printing its name and link to modify the board. + foreach ($category['boards'] as $board) + { + $alternate = !$alternate; + + echo ' + + + + + '; + } + + // Button to add a new board. + echo ' + + + +
    ', $txt['mboards_name'], '
    ', $board['name'], '', $context['can_manage_permissions'] ? '' . $txt['mboards_permissions'] . '' : '', '', $txt['mboards_modify'], '

    + +
    + + '; + } + echo ' + '; +} + +// Template for editing/adding a category on the forum. +function template_modify_category() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Print table header. + echo ' +
    + + + +
    + + + + + + +
    ', isset($context['category']['is_new']) ? $txt['mboards_new_cat_name'] : $txt['catEdit'], '
    + + '; + // If this isn't the only category, let the user choose where this category should be positioned down the board index. + if (count($context['category_order']) > 1) + { + echo ' + + + '; + } + // Allow the user to edit the category name and/or choose whether you can collapse the category. + echo ' + + + + + + '; + + // Table footer. + echo ' + + + +
    + ', $txt[43], '
    +

    +
    + +
    + ', $txt[44], ':
    + ', $txt[672], '

    +
    + +
    + ' . $txt['collapse_enable'] . '
    + ' . $txt['collapse_desc'] . '

    +
    + +
    +
    '; + if (isset($context['category']['is_new'])) + echo ' + '; + else + echo ' + + '; + echo ' +
    + '; + // If this category is empty we don't bother with the next confirmation screen. + if ($context['category']['is_empty']) + echo ' + '; + echo ' +
    +
    +
    '; +} + +// A template to confirm if a user wishes to delete a category - and whether they want to save the boards. +function template_confirm_category_delete() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Print table header. + echo ' +
    + + + + + + + + +
    ', $txt['mboards_delete_cat'], '
    + ', $txt['mboards_delete_cat_contains'], ': +
      '; + + foreach ($context['category']['children'] as $child) + echo ' +
    • ', $child['node']['name'], '
    • '; + + echo ' +
    +
    +
    + + + + + + + + + + +
    ', $txt['mboards_delete_what_do'], ':
    +
    + : + +
    + + +
    + + + +
    '; +} + +// Below is the template for adding/editing an board on the forum. +function template_modify_board() +{ + global $context, $settings, $options, $scripturl, $txt; + + // The main table header. + echo ' +
    + + + +
    + + + + + + +
    ', isset($context['board']['is_new']) ? $txt['mboards_new_board_name'] : $txt['boardsEdit'], '
    + '; + + // Option for choosing the category the board lives in. + echo ' + + + + '; + + // If this isn't the only board in this category let the user choose where the board is to live. + if ((isset($context['board']['is_new']) && count($context['board_order']) > 0) || count($context['board_order']) > 1) + { + echo ' + + + '; + } + + // Options for board name and description. + echo ' + + + + + + + + + '; + + // Options to choose moderators, specifiy as announcement board and choose whether to count posts here. + echo ' + + + + + + + '; + + // Here the user can choose to force this board to use a theme other than the default theme for the forum. + echo ' + + + + + + + '; + + // Finish off the table. + echo ' + + + +
    + ', $txt['mboards_category'], '
    +

    +
    + +
    + ', $txt[43], '
    +

    +
    '; + + // The first select box gives the user the option to position it before, after or as a child of another board. + echo ' +   '; + + // The second select box lists all the boards in the category. + echo ' + +
    + ', $txt[44], ':
    + ', $txt[672], '

    +
    + +
    + ', $txt['mboards_description'], '
    + ', $txt['mboards_description_desc'], '

    +
    + +
    + ', $txt['mboards_groups'], '
    + ', $txt['mboards_groups_desc'], '

    +
    '; + + // List all the membergroups so the user can choose who may access this board. + foreach ($context['groups'] as $group) + echo ' + ' . $group['name'] . '  
    '; + echo ' + ', $txt[737], '  
    +
    +
    + ', $txt['mboards_moderators'], '
    + ', $txt['mboards_moderators_desc'], '

    +
    + + ', $txt['find_members'], ' +
    + ', $txt['mboards_count_posts'], '
    + ', $txt['mboards_count_posts_desc'], '

    +
    + +
    + ', $txt['mboards_theme'], '
    + ', $txt['mboards_theme_desc'], '

    +
    + +
    + ', $txt['mboards_override_theme'], '
    + ', $txt['mboards_override_theme_desc'], '

    +
    + +
    +
    '; + if (isset($context['board']['is_new'])) + echo ' + + '; + else + echo ' + + '; + echo ' +
    + +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/ManageMembers.template.php b/Themes/modern/ManageMembers.template.php new file mode 100644 index 0000000..534047d --- /dev/null +++ b/Themes/modern/ManageMembers.template.php @@ -0,0 +1,1424 @@ + +
    + + + + + + +
    ' . $txt[119] . ' ' . $txt['membergroups_title'] . '
    ', $txt['membergroups_description'], '
    +
    + +
    + + + + + + + + '; + foreach ($context['groups']['regular'] as $group) + { + echo ' + + + + + + '; + } + + echo ' + + + +
    ', $txt['membergroups_regular'], '
    ', $txt['membergroups_name'], '', $txt['membergroups_stars'], '', $txt['membergroups_members_top'], '', $txt[17], '
    ', empty($group['color']) ? $group['name'] : '' . $group['name'] . '', '', $group['stars'], '', $group['can_search'] ? $group['link'] : $group['num_members'], '' . $txt['membergroups_modify'] . '
    + +
    + + +
    + + + + + + + + + '; + foreach ($context['groups']['post'] as $group) + { + echo ' + + + + + + + '; + } + + echo ' + + + +
    ', $txt['membergroups_post'], '
    ', $txt['membergroups_name'], '', $txt['membergroups_stars'], '', $txt['membergroups_members_top'], '', $txt['membergroups_min_posts'], '', $txt[17], '
    ', empty($group['color']) ? $group['name'] : '' . $group['name'] . '', '', $group['stars'], '', $group['can_search'] ? $group['link'] : $group['num_members'], '', $group['min_posts'], '' . $txt['membergroups_modify'] . '
    + +
    + + +
    + '; +} + +function template_new_group() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + ', $context['postgroup'] ? ' + + + ' : '', ' + + + + + + + + + + + +
    ', $txt['membergroups_new_group'], '
    ', $txt['membergroups_group_name'], ':
    ' . $txt['membergroups_min_posts'] . ':
    ', $txt['membergroups_permissions'], ':', $txt['membergroups_new_as_type'], ':   ', $txt['membergroups_can_edit_later'], '
    ', $txt['membergroups_new_as_copy'], ':
    ', $txt['membergroups_new_board'], ': +
    ', $txt['membergroups_new_board_desc'], '
    +
    '; + + foreach ($context['boards'] as $board) + echo ' +
    '; + + echo ' +
    + +

    + +
    '; +} + +function template_edit_group() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + '; + if ($context['group']['allow_post_group']) + echo ' + + + + + + + '; + echo ' + + + + + + + + + + + + + + + + + + + +
    ', $txt['membergroups_edit_group'], ' - ', $context['group']['name'], '
    ', $txt['membergroups_edit_name'], ':
    ', $txt['membergroups_min_posts'], ':
    ', $txt['membergroups_online_color'], ':
    ', $txt['membergroups_star_count'], ':
    ', $txt['membergroups_star_image'], ':
    ', $txt['membergroups_star_image_note'], '
    *
    + ', $txt['membergroups_max_messages'], ': +
    ', $txt['membergroups_max_messages_note'], '
    +
    +
    + ', $context['group']['allow_delete'] ? ' + ' : '', ' +
    + +
    '; + + if ($context['group']['allow_post_group']) + echo ' + '; +} + +function template_group_members() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + + + + + + + + + + + '; + + if (empty($context['members'])) + echo ' + + + '; + + $alternate = false; + foreach ($context['members'] as $member) + { + echo ' + + + + + + + + '; + $alternate = !$alternate; + } + + echo ' + + + +
    ', $context['page_title'], '
    ', $txt['membergroups_members_all_current_desc'], '
    ', $txt[139], ': ', $context['page_index'], '
    ', $txt[68], $context['sort_by'] == 'name' ? ' ' : '', '', $txt[69], $context['sort_by'] == 'email' ? ' ' : '', '', $txt['attachment_manager_last_active'], $context['sort_by'] == 'active' ? ' ' : '', '', $txt[233], $context['sort_by'] == 'registered' ? ' ' : '', '', $txt[21], $context['sort_by'] == 'posts' ? ' ' : '', '
    ', $txt['membergroups_members_no_members'], '
    ', $member['name'], '', $member['email'], '', $member['last_online'], '', $member['registered'], '', $member['posts'], '
    + +

    '; + + if (!empty($context['group']['assignable'])) + { + echo ' + + + + + + + + + +
    ', $txt['membergroups_members_add_title'], '
    ', $txt['membergroups_members_add_desc'], ': + + ', $txt['find_members'], ' +
    + +
    '; + } + + echo ' + +
    '; +} + +function template_email_members() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + + + +
    ' . $txt[119] . ' ', $txt[6], '
    ' . $txt['smf250'] . '
    '; + + foreach ($context['groups'] as $group) + echo ' + (', $group['member_count'], ')
    '; + + echo ' +
    '; + + if ($context['can_send_pm']) + echo ' +
    '; + + echo ' + +
    + +
    + +
    '; +} + +function template_email_members_compose() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + +
    + ' . $txt[119] . ' ' . $txt[6] . ' +
    ' . $txt[735] . '
    + +
    +
    + + + + + + + + +
    ' . $txt[338] . '
    ', $txt['email_variables'], '
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    '; +} + +function template_view_members() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + '; + if ($context['sub_action'] == 'all' || $context['sub_action'] == 'query') + { + echo ' + + + + + + + '; + foreach ($context['columns'] as $column) + { + echo ' + '; + } + if ($context['can_delete_members']) + echo ' + '; + else + echo ' + '; + echo ' + '; + if (empty($context['members'])) + echo ' + + + '; + else + { + foreach ($context['members'] as $member) + { + echo ' + + + + + + + + '; + if ($context['can_delete_members']) + echo ' + '; + else + echo ' + '; + echo ' + '; + } + echo ' + + + '; + } + } + else + { + echo ' + + + '; + } + echo ' +
    + ' . $txt[119] . ' ' . $txt[9] . ' +
    + ', $context['sub_action'] == 'all' ? '>' : '', '', $txt[303], ' | ', $context['sub_action'] == 'search' || $context['sub_action'] == 'query' ? '>' : '', $context['sub_action'] == 'search' || $context['sub_action'] == 'all' ? '' . $txt['mlist_search'] . '' : $txt['search_results'] . ' (' . $txt['mlist_search2'] . ')', ' +
    + ', $txt[11], ' +
    + ', $txt[139], ': ' . $context['page_index'] . ' +
    + '; + if ($column['selected']) + echo $column['label'] . ' '; + else + echo $column['label']; + echo ' + + +
    (', $txt['search_no_results'], ')
    + ' . $member['id'] . ' + + ' . $member['username'] . ' + + ' . $member['name'] . ' + + ' . $member['email'] . ' + + ' . $member['ip'] . ' + + ' . $member['last_active'] . ' + + ' . $member['posts'] . ' + + +
    ', $context['can_delete_members'] ? ' + ' : '', ' + + + + ', $context['sort_direction'] == 'up' ? ' + ' : '', ' +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['search_for'], ':
    (', $txt['wild_cards_allowed'], ')
    ', $txt['member_id'], ': + + ', $txt[35], ':
    ', $txt['age'], ': + + ', $txt['email_address'], ':
    ', $txt[26], ': + + ', $txt[96], ':
    ', $txt[233], ': + + ', $txt['date_format'], '', $txt[227], ':
    ', $txt['viewmembers_online'], ': + + ', $txt['date_format'], '', $txt['ip_address'], ':
    ', $txt[231], ': + ', $txt['undefined_gender'], '   + ', $txt[238], '   + ', $txt[239], '   + ', $txt['messenger_address'], ':
    ', $txt['activation_status'], ': + ', $txt['activated'], '   + ', $txt['not_activated'], ' +
    +  

    + ', $txt['member_part_of_these_membergroups'], ':

    +
    + + + + + + '; + foreach ($context['membergroups'] as $membergroup) + echo ' + + + + + '; + echo ' +
    ', $txt['membergroups'], '', $txt['primary'], '', $txt['additional'], '
    + ', $membergroup['name'], ' + + + + ', $membergroup['can_be_additional'] ? '' : ' ', ' +
    +
    + + + + + '; + foreach ($context['postgroups'] as $postgroup) + echo ' + + + + '; + echo ' +
    ', $txt['membergroups_postgroups'], '
    + ', $postgroup['name'], ' + + +
    +
    + + +
    +
    +
    '; +} + +function template_ban_list() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' + ', $txt['ban_title'], ' +
    + > ', $txt['ban_edit_list'], ' | + ', $txt['ban_add_new'], ' | + ', $txt['ban_log'], ' +
    ', $txt['ban_description'], '
    +
    + + + + '; + foreach ($context['columns'] as $column) + { + if ($column['selected']) + echo ' + + ', $column['label'], '  + '; + elseif ($column['sortable']) + echo ' + + ', $column['link'], ' + '; + else + echo ' + + ', $column['label'], ' + '; + } + echo ' + + '; + + while ($ban = $context['get_ban']()) + { + echo ' + + + + + + + + + '; + } + echo ' + + + +
    ', $txt[139], ': ', $context['page_index'], '
    '; + if ($ban['type'] == 'ip_ban') + echo '', $txt[512], ': ', $ban['ip']; + elseif ($ban['type'] == 'hostname_ban') + echo '', $txt['hostname'], ': ', $ban['hostname']; + elseif ($ban['type'] == 'email_ban') + echo '', $txt[69], ': ', $ban['email']; + elseif ($ban['type'] == 'user_ban') + echo '', $txt[35], ': ', $ban['user']['link']; + echo ' + ', $ban['reason'], '', $ban['notes'], '', $ban['restriction'], '', $ban['expires'], ' +  ', $txt[17], ' +
    + +
    '; +} + +function template_ban_edit() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' + ', $txt['ban_title'], ' +
    '; + if ($context['sub_action'] == 'add') + echo ' + ', $txt['ban_edit_list'], ' | + > ', $txt['ban_add_new'], ' | '; + else + echo ' + > ', $txt['ban_edit_list'], ' | + ', $txt['ban_add_new'], ' | '; + echo ' + ', $txt['ban_log'], ' +
    ', $txt['ban_description'], '
    +
    + + + + + + +
    + ', $txt['ban_banned_entity'], ': + + + + '; + if (empty($modSettings['disableHostnameLookup'])) + echo ' + + '; + echo ' + + + + +
    + + + ', $txt['ban_on_ip'], ':
    + +
    + + + ', $txt['ban_on_hostname'], ':
    + +
    + + + ', $txt['ban_on_email'], ':
    + +
    + + + ', $txt['ban_on_username'], ':
    + +
    +
    + ', $txt['ban_expiration'], ':
    + + + + + + +
    + + + ', $txt['never'], ' +
    + + + ', $txt['ban_will_expire_within'], ':
    + ', $txt['ban_days'], '
    +
    +
    + ', $txt['ban_reason'], ': +
    ', $txt['ban_reason_desc'], '
    + +
    +
    + ', $txt['ban_notes'], ': +
    ', $txt['ban_notes_desc'], '
    + +
    +
    + ', $txt['ban_restriction'], ':
    + ', $txt['ban_full_ban'], '
    + ', $txt['ban_cannot_post'], '
    + ', $txt['ban_cannot_register'], '
    +
    +     +
    ', $context['sub_action'] == 'add' ? '' : ' + ', ' + +
    '; +} + +function template_ban_log() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ', $txt[119], ' + ', $txt['ban_title'], ' +
    + ', $txt['ban_edit_list'], ' | + ', $txt['ban_add_new'], ' | + > ', $txt['ban_log'], ' +
    ', $txt['ban_log_description'], '
    +
    + + + + + + + + + + '; + if (empty($context['log_entries'])) + echo ' + + + '; + else + { + foreach ($context['log_entries'] as $log) + echo ' + + + + + + + '; + echo ' + + + '; + } + echo ' +
    ', $txt[139], ': ', $context['page_index'], '
    + ' . $txt['ban_log_ip'], $context['sort'] == 'ip' ? ' ' : '', ' + + ' . $txt['ban_log_email'], $context['sort'] == 'email' ? ' ' : '', ' + + ' . $txt['ban_log_member'], $context['sort'] == 'name' ? ' ' : '', ' + + ' . $txt['ban_log_date'], $context['sort'] == 'date' ? ' ' : '', ' +
    (', $txt['ban_log_no_entries'], ')
    ', $log['ip'], '', $log['email'], '', empty($log['member']['id']) ? '' . $txt[470] . '' : $log['member']['link'], '', $log['date'], '
    + + +
    + +
    '; +} + +function template_edit_reserved_words() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + +
    + ' . $txt[119] . ' ' . $txt[341] . ' +
    ' . $txt[699] . '
    +
    +
    ' . $txt[342] . '
    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    + +
    '; +} + +// This template shows an admin information on a users IP addresses used and errors attributed to them. +function template_trackUser() +{ + global $context, $settings, $options, $scripturl, $txt; + + // The first table shows IP information about the user. + echo ' +
    + + + + '; + + // The last IP the user used. + echo ' + + + + '; + + // Lists of IP addresses used in messages / error messages. + echo ' + + + + + + + '; + + // List any members that have used the same IP addresses as the current member. + echo ' + + + + +
    + ', $txt['view_ips_by'], ' ', $context['member']['name'], ' +
    ', $txt['most_recent_ip'], ': + ', $context['last_ip'], ' +
    ', $txt['ips_in_messages'], ': + ', (count($context['ips']) > 0 ? implode(', ', $context['ips']) : '(' . $txt['none'] . ')'), ' +
    ', $txt['ips_in_errors'], ': + ', (count($context['ips']) > 0 ? implode(', ', $context['error_ips']) : '(' . $txt['none'] . ')'), ' +
    ', $txt['members_in_range'], ': + ', (count($context['members_in_range']) > 0 ? implode(', ', $context['members_in_range']) : '(' . $txt['none'] . ')'), ' +
    +
    +
    '; + + // The second table lists all the error messages the user has caused/received. + echo ' +
    + + + + + + + + + + + + '; + + // If there arn't any messages just give a message stating this. + if (empty($context['error_messages'])) + echo ' + '; + + // Otherwise print every error message out. + else + // For every error message print the IP address that caused it, the message displayed and the date it occurred. + foreach ($context['error_messages'] as $error) + echo ' + + + + + '; + echo ' +
    + ', $txt['errors_by'], ' ', $context['member']['name'], ' +
    + ', $txt['errors_desc'], ' +
    + ', $txt[139], ': ', $context['page_index'], ' +
    ', $txt['ip_address'], '', $txt[72], '', $txt[317], '
    ', $txt['no_errors_from_user'], '
    + ', $error['ip'], ' + + ', $error['message'], '
    + ', $error['url'], ' +
    ', $error['time'], '
    +
    '; +} + +// The template for trackIP, allowing the admin to see where/who a certain IP has been used. +function template_trackIP() +{ + global $context, $settings, $options, $scripturl, $txt; + + // This function always defaults to the last IP used by a member but can be set to track any IP. + echo ' +
    '; + + // The first table in the template gives an input box to allow the admin to enter another IP to track. + echo ' +
    + + + + + + +
    ', $txt['trackIP'], '
    + ', $txt['enter_ip'], ':     +
    +
    +
    +
    '; + + // The table inbetween the first and second table shows links to the whois server for every region. + if ($context['single_ip']) + { + echo ' +
    + + + + + + +
    + ', $txt['whois_title'], ' ', $context['ip'], ' +
    '; + foreach ($context['whois_servers'] as $server) + echo ' + ', $server['name'], '
    '; + echo ' +
    +
    +
    '; + } + + // The second table lists all the members who have been logged as using this IP address. + echo ' +
    + + + + + + + '; + if (empty($context['ips'])) + echo ' + '; + else + // Loop through each of the members and display them. + foreach ($context['ips'] as $ip => $memberlist) + echo ' + + + + '; + echo ' +
    + ', $txt['members_from_ip'], ' ', $context['ip'], ' +
    ', $txt['ip_address'], '', $txt['display_name'], '
    ', $txt['no_members_from_ip'], '
    ', $ip, '', implode(', ', $memberlist), '
    +
    +
    '; + + // The third table in the template displays a list of all the messages sent using this IP (can be quite long). + echo ' +
    + + + + + + + + + + + + + '; + + // No message means nothing to do! + if (empty($context['messages'])) + echo ' + '; + else + // For every message print the IP, member who posts it, subject (with link) and date posted. + foreach ($context['messages'] as $message) + echo ' + + + + + + '; + echo ' +
    + ', $txt['messages_from_ip'], ' ', $context['ip'], ' +
    + ', $txt['messages_from_ip_desc'], ' +
    + ', $txt[139], ': ', $context['message_page_index'], ' +
    ', $txt['ip_address'], '', $txt['rtm8'], '', $txt[319], '', $txt[317], '
    ', $txt['no_messages_from_ip'], '
    + ', $message['ip'], ' + + ', $message['member']['link'], ' + + + ', $message['subject'], ' + + ', $message['time'], '
    +
    +
    '; + + // The final table in the template lists all the error messages caused/received by anyone using this IP address. + echo ' +
    + + + + + + + + + + + + + '; + if (empty($context['error_messages'])) + echo ' + '; + else + // For each error print IP address, member, message received and date caused. + foreach ($context['error_messages'] as $error) + echo ' + + + + + + '; + echo ' +
    + ', $txt['errors_from_ip'], ' ', $context['ip'], ' +
    + ', $txt['errors_from_ip_desc'], ' +
    + ', $txt[139], ': ', $context['error_page_index'], ' +
    ', $txt['ip_address'], '', $txt['display_name'], '', $txt[72], '', $txt[317], '
    ', $txt['no_errors_from_ip'], '
    + ', $error['ip'], ' + + ', $error['member']['link'], ' + + ', $error['message'], '
    + ', $error['url'], ' +
    ', $error['error_time'], '
    +
    '; +} + +function template_showPermissions() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + + + '; + if ($context['member']['has_all_permissions']) + { + echo ' + + + '; + } + else + { + // General Permissions section. + echo ' + + + '; + if (!empty($context['member']['permissions']['general'])) + { + echo ' + + + + '; + + foreach ($context['member']['permissions']['general'] as $permission) + { + echo ' + + + + '; + } + } + else + echo ' + + + '; + + // Board permission section. + echo ' + + + '; + if (!empty($context['member']['permissions']['board'])) + { + echo ' + + + + '; + foreach ($context['member']['permissions']['board'] as $permission) + { + echo ' + + + + '; + } + } + else + echo ' + + + '; + } + echo ' +
    +   ', $txt['showPermissions'], ' +
    ', $txt['showPermissions_all'], '
    ', $txt['showPermissions_general'], '
    ', $txt['showPermissions_permission'], '
    + ', $permission['is_denied'] ? '' . $permission['id'] . '' : $permission['id'], '
    + ', $permission['name'], ' +
    '; + if ($permission['is_denied']) + echo ' + ', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']); + else + echo ' + ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']); + echo ' +
    ', $txt['showPermissions_none_general'], '
    + +
    + ', $txt['showPermissions_select'], ': + +
    +
    ', $txt['showPermissions_permission'], '
    + ', $permission['is_denied'] || !$permission['is_global'] ? '' . $permission['id'] . '' : $permission['id'], '
    + ', $permission['name'], ' +
    '; + if (!$permission['is_global']) + echo ' + ', $txt['showPermissions_local_only'], '
    + ', $txt['showPermissions_boards'], ':
       ', implode('
       ', $permission['boards']['allowed']); + elseif ($permission['is_global'] && $permission['is_denied']) + { + echo ' + ', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '
    '; + if (empty($context['current_board'])) + echo ' + ', $txt['showPermissions_boards_denied'], ': ', empty($permission['boards']['allowed']) ? $txt['showPermissions_all_boards'] : $txt['showPermissions_all_boards_except'] . ':
       ' . implode('
       ', $permission['boards']['allowed']); + } + elseif ($permission['is_global']) + { + echo ' + ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']), '
    '; + if (empty($context['current_board'])) + echo ' + ', $txt['showPermissions_boards'], ': ', empty($permission['boards']['denied']) ? $txt['showPermissions_all_boards'] : $txt['showPermissions_all_boards_except'] . ':
       ' . implode('
       ', $permission['boards']['denied']); + } + echo ' +
    ', $txt['showPermissions_none_board'], '

    '; +} + +function template_announce() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + + + +
    ', $txt['announce_title'], '
    ', $txt['announce_desc'], '
    + ', $txt['announce_this_topic'], ' ', $context['topic_subject'], '
    +
    '; + + foreach ($context['groups'] as $group) + echo ' + (', $group['member_count'], ')
    '; + + echo ' +
    + +
    + +
    + + + + +
    '; +} + +function template_announcement_send() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + +
    + ', $txt['announce_sending'], ' ', $context['topic_subject'], ' +
    ', $context['percentage_done'], '% ', $txt['announce_done'], '
    + +
    + + + + + + +
    + '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/ManagePermissions.template.php b/Themes/modern/ManagePermissions.template.php new file mode 100644 index 0000000..cfd8275 --- /dev/null +++ b/Themes/modern/ManagePermissions.template.php @@ -0,0 +1,309 @@ + + + + + + + + + + + + '; + + if (!empty($context['board'])) + echo ' + '; + + echo ' + + + '; + + foreach ($context['groups'] as $group) + { + echo ' + + + + '; + + if (!empty($context['board'])) + { + echo ' + '; + } + + echo ' + + + '; + } + + echo ' + + + +
    ' . $txt[119] . ' ' . $txt['permissions_title'] . '
    ', empty($context['board']) ? $txt['permissions_groups'] : $txt['permissions_boards'] . ' (' . $context['board']['name'] . ')', '
    ', $txt['membergroups_name'], '', $txt['membergroups_members_top'], ' + ', $txt['membergroups_permissions'], '
    +
    ', $txt['permissions_allowed'], '
    ', $txt['permissions_denied'], ' +
    ', $txt['permissions_access'], '', $txt['permissions_modify'], ' +
    ', $group['name'], '', $group['can_search'] ? $group['link'] : $group['num_members'], ' +
    ', $group['num_permissions']['allowed'], '
    ', empty($group['num_permissions']['denied']) || $group['id'] == 1 ? $group['num_permissions']['denied'] : '' . $group['num_permissions']['denied'] . '', ' +
    '; + + // Don't show the checkbox for admins and moderators, doesn't make sense! + if ($group['id'] != 1 && $group['id'] != 3) + echo ' + '; + + echo ' + ', $group['allow_modify'] ? '' . $txt['permissions_modify'] . '' : '', '', $group['allow_modify'] ? '' : '', '
    +
    +
    ', $txt['permissions_with_selection'], '...
    + ', $txt['permissions_apply_pre_defined'], ' (?): +

    '; + + if (!empty($context['board']) && !empty($context['copy_boards'])) + { + echo ' + ', $txt['permissions_copy_from_board'], ': +

    '; + } + + echo ' + ', $txt['permissions_like_group'], ': +

    +   +
    + + +
    +
    '; + if (!empty($context['boards'])) + { + echo ' + + + + + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + '; + } + + echo ' +
    ' . $txt[119] . ' ', $txt['permissions_boards'], '
    ', $txt[20], '', $txt['permissions_switch'], '
    + ', str_repeat('-', $board['child_level']), ' ' . $board['name'] . ' (', $board['use_local_permissions'] ? $txt['permissions_local'] : $txt['permissions_global'], ') + ', $txt['permissions_global'], '', $txt['permissions_local'], '
    '; + } + + if (!empty($context['board'])) + echo ' + '; + + echo ' + + '; +} + +function template_modify_group() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + +
    + + + '; + echo ' + + + '; + foreach ($context['permissions'] as $permission_type) + { + if ($permission_type['show']) + { + echo ' + + + + '; + foreach ($permission_type['columns'] as $column) + { + echo ' + '; + } + } + } + echo ' + + + +
    ', $context['local'] ? $txt['permissions_modify_local'] : $txt['permissions_modify_group'] . ' - ' . $context['group']['name'], '
    ', $txt['permissions_option_desc'], '
    '; + if ($context['local']) + echo ' + ', $txt['permissions_local_for'], ' \'', $context['group']['name'], '\' ', $txt['permissions_on'], ' \'', $context['board']['name'], '\''; + else + echo ' + ', $permission_type['id'] == 'membergroup' ? $txt['permissions_general'] : $txt['permissions_board'] . ' - ' . $context['group']['name']; + echo ' +
    + '; + foreach ($column as $permissionGroup) + { + echo ' + + + + + + '; + + if (!empty($permissionGroup['permissions'])) + { + $alternate = false; + foreach ($permissionGroup['permissions'] as $permission) + { + echo ' + + '; + if ($permission['has_own_any']) + echo ' + + + + + + + + + + + + + + '; + else + echo ' + + + + + '; + + $alternate = !$alternate; + } + } + + echo ' + + + '; + } + + echo ' +
    ', $permissionGroup['name'], '
    ', $txt['permissions_option_on'], '
    ', $txt['permissions_option_off'], '
    ', $txt['permissions_option_deny'], '
    + ', $permission['show_help'] ? '' . $txt[119] . '' : '', ' + ', $permission['name'], '
    ', $permission['own']['name'], ':
    ', $permission['any']['name'], ':
    ', $permission['name'], '
     
    +
     
    + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/ManageSmileys.template.php b/Themes/modern/ManageSmileys.template.php new file mode 100644 index 0000000..b1ab058 --- /dev/null +++ b/Themes/modern/ManageSmileys.template.php @@ -0,0 +1,734 @@ + + + ', $txt[119], ' ', $txt['smileys_manage'], ' + + + + > ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' + + + + ', $context['explain_text'], ' + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['smiley_settings'], '
    ', $txt['smiley_set_select_default'], ': + +
    :
    :
    ', $txt['smileys_enable_note'], '
    ', $txt['smiley_sets_base_url'], ':
    ', $txt['smiley_sets_base_dir'], ':
    + +
    + +
    '; +} + +// Editing the smiley sets. +function template_editsets() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + > ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + '; + + foreach ($context['smiley_sets'] as $smiley_set) + echo ' + + + + + + + '; + + echo ' + + + +
    ', $txt['smiley_sets_default'], '', $txt['smiley_sets_name'], '', $txt['smiley_sets_url'], '', $txt['smiley_set_modify'], ' 
    ', $smiley_set['selected'] ? '*' : '', '', $smiley_set['name'], '', $modSettings['smileys_url'], '/', $smiley_set['path'], '/...', $txt['smiley_set_modify'], '', $smiley_set['id'] != 0 ? '' : '', '
    +
    + + +
    + +

    + + + + + + + +
    ', $txt['smiley_sets_latest'], '
    ', $txt['smiley_sets_latest_fetch'], '
    + + + '; +} + +// Modifying a smiley set. +function template_modifyset() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + > ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + '; + + // If this is an existing set, and there are still un-added smileys - offer an import opportunity. + if (!empty($context['current_set']['can_import'])) + { + echo ' + + + '; + } + + echo ' + + + + + + + + + + + + '; + + // If this is a new smiley set they have the option to import smileys already in the directory. + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) + echo ' + + + + '; + + echo ' + + + +
    ', $context['current_set']['is_new'] ? $txt['smiley_set_new'] : $txt['smiley_set_modify_existing'], '
    + ', $context['current_set']['can_import'] == 1 ? $txt['smiley_set_import_single'] : $txt['smiley_set_import_multiple'], ' ', $txt['662'], ' ', $context['current_set']['can_import'] == 1 ? $txt['smiley_set_to_import_single'] : $txt['smiley_set_to_import_multiple'], ' +
    :
    : + ', $modSettings['smileys_url'], '/'; + if ($context['current_set']['id'] == 'default') + echo 'default'; + elseif (empty($context['smiley_set_dirs'])) + echo ' + '; + else + { + echo ' + '; + } + echo '/.. +
    :
    :
    + +
    + + +
    '; +} + +// Editing smileys themselves. +function template_editsmileys() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + > ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + '; + foreach ($context['smileys'] as $smiley) + echo ' + + + '; + echo ' + + + +
    + +
    + ', $context['sort'] == 'code' ? '' . $txt['smileys_code'] . '' : '' . $txt['smileys_code'] . '', ' + + ', $context['sort'] == 'filename' ? '' . $txt['smileys_filename'] . '' : '' . $txt['smileys_filename'] . '', ' + + ', $context['sort'] == 'hidden' ? '' . $txt['smileys_location'] . '' : '' . $txt['smileys_location'] . '', ' + + ', $context['sort'] == 'description' ? '' . $txt['smileys_description'] . '' : '' . $txt['smileys_description'] . '', ' + + ', $txt['smileys_modify'], ' +
    + ', $smiley['description'], ' + + ', $smiley['code'], ' + + ', $smiley['filename'], ' + + ', $smiley['location'], ' + + ', $smiley['description'], empty($smiley['sets_not_found']) ? '' : '
    + ' . $txt['smileys_not_found_in_set'] . ': ' . implode(', ', $smiley['sets_not_found']), ' +
    + ', $txt['smileys_modify'], ' + + +
    +
    + +
    + +
    + '; +} + +// Editing an individual smiley +function template_modifysmiley() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + > ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['smiley_modify_existing'], '
    ', $txt['smiley_preview'], ': ( ', $txt['smiley_preview_using'], ': ) +
    :
    : '; + if (empty($context['filenames'])) + echo ' + '; + else + { + echo ' + '; + } + echo ' +
    :
    : + +
    + +
    + + +
    + '; +} + +// Adding a new smiley. +function template_addsmiley() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + > ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['smileys_add_method'], ':
    + ( ', $txt['smiley_preview_using'], ': ) +
    + : + '; + if (empty($context['filenames'])) + echo ' + '; + else + { + echo ' + '; + echo ' + '; + } + + echo ' +
    ', $txt['smileys_add_upload_choose'], ':
    ', $txt['smileys_add_upload_choose_desc'], '
    +
    + + + + + + + + + + + + + + + + + + + +
    ', $txt['smiley_new'], '
    :
    :
    : + +
    + +
    + '; +} + +// Ordering smileys. +function template_setorder() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + + + + + + + + + +
    ', $txt[119], ' ', $txt['smileys_manage'], '
    + ', $txt['smiley_settings'], ' | + ', $txt['smiley_sets'], ''; + + if (!empty($modSettings['smiley_enable'])) + { + echo ' | + ', $txt['smileys_add'], ' | + ', $txt['smileys_edit'], ' | + > ', $txt['smileys_set_order'], ''; + } + + echo ' +
    ', $context['explain_text'], '
    +
    '; + + foreach ($context['smileys'] as $location) + { + echo ' +
    +
    + + + + + + + + + + +
    ', $location['title'], '
    ', $location['description'], '
    + ', empty($context['move_smiley']) ? $txt['smileys_move_select_smiley'] : $txt['smileys_move_select_destination'], '...
    '; + foreach ($location['rows'] as $row) + { + if (!empty($context['move_smiley'])) + echo ' + ', $txt['smileys_move_here'], ''; + foreach ($row as $smiley) + { + if (empty($context['move_smiley'])) + echo '', $smiley['description'], ''; + else + echo '', $smiley['description'], '', $txt['smileys_move_here'], ''; + } + echo ' +
    '; + } + if (!empty($context['move_smiley'])) + echo ' + ', $txt['smileys_move_here'], ''; + echo ' +
    +
    '; + } +} + +?> \ No newline at end of file diff --git a/Themes/modern/Memberlist.template.php b/Themes/modern/Memberlist.template.php new file mode 100644 index 0000000..beb2be9 --- /dev/null +++ b/Themes/modern/Memberlist.template.php @@ -0,0 +1,171 @@ + + + ', theme_linktree(), ' + + '; + + // Display links to view all/search. + echo ' + + + + + + + + '; + + // Display each of the column headers of the table. + foreach ($context['columns'] as $column) + { + // We're not able (through the template) to sort the search results right now... + if (isset($context['old_search'])) + echo ' + + ', $column['label'], ''; + // This is a selected solumn, so underline it or some such. + elseif ($column['selected']) + echo ' + '; + // This is just some column... show the link and be done with it. + else + echo ' + + ', $column['link'], ''; + } + + echo ' + '; + + // Assuming there are members loop through each one displaying their data. + if (!empty($context['members'])) + { + foreach ($context['members'] as $member) + echo ' + + + + + + + + + + + + + + '; + } + // No members? + else + echo ' + + + '; + + // Show the page numbers again. (makes 'em easier to find!) + echo ' + + + +
    + ', $context['sort_links'], ' +
    '; + + // Display page numbers and the a-z links for sorting by name if not a result of a search. + if (!isset($context['old_search'])) + echo ' + + + + + +
    ', $txt[139], ': ', $context['page_index'], '', $context['letter_links'] . '
    '; + // If this is a result of a search then just show the page numbers. + else + echo ' + ', $txt[139], ': ', $context['page_index']; + + echo ' +
    + ' . $column['label'] . '
    + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $member['online']['text'] . '' : $member['online']['label'], $context['can_send_pm'] ? '' : '', ' + ', $member['link'], '', $member['email'], '', $member['website']['link'], '', $member['icq']['link'], '', $member['aim']['link'], '', $member['yim']['link'], '', $member['msn']['link'], '', $member['group'], '', $member['registered'], '', $member['posts'], ' + ', $member['posts'] > 0 ? '' : '', ' +
    ', $txt[170], '
    ', $txt[139], ': ', $context['page_index'], '
    '; + + // If it is displaying the result of a search show a "search again" link to edit their criteria. + if (isset($context['old_search'])) + echo ' +
    + ', $txt['mlist_search2'], ''; +} + +// A page allowing people to search the member list. +function template_search() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Start the submission form for the search! + echo ' +
    '; + + // Display that link tree... + echo ' + + + + +
    ', theme_linktree(), '
    '; + + // Display links to view all/search. + echo ' + + + + '; + + // Display the input boxes for the form. + echo ' + + + +
    + ', $context['sort_links'] . ' +
    + + + + + + + + +
    +
    + ', $txt[582], ':
    +
    +
    + ', $txt['mlist_search_email'], '
    + ', $txt['mlist_search_messenger'], '
    + ', $txt['mlist_search_group'], ' +
    + ', $txt['mlist_search_name'], '
    + ', $txt['mlist_search_website'], ' +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/MessageIndex.template.php b/Themes/modern/MessageIndex.template.php new file mode 100644 index 0000000..5f3bf71 --- /dev/null +++ b/Themes/modern/MessageIndex.template.php @@ -0,0 +1,424 @@ + + + ', theme_linktree(), ''; + echo ' + + +

    ' . $context['page_title'] . '

    '; + + if (isset ($context['moderators_list'])) { + echo ' + + + ', $context['moderators_list'], ''; + } + + echo ' + + '; + + if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) + { + echo ' +
    + + + '; + foreach ($context['boards'] as $board) + { + echo ' + + + + + + '; + } + echo ' +
    ', $txt['parent_boards'], '
    '; + + // Is this board itself new? + if ($board['new']) + echo '', $txt[333], ''; + // Is one of this board's children new, then? + elseif ($board['children_new']) + echo '', $txt[333], ''; + // I guess it's not new at all. + else + echo '', $txt[334], ''; + + echo ' + ', $board['name'], '
    + ', $board['description']; + + if (!empty($board['moderators'])) + echo ' +
    ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
    '; + + if (!empty($board['children'])) + { + $children = array(); + foreach ($board['children'] as $child) + { + $child['link'] = '' . $child['name'] . ''; + $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; + } + + echo ' +
    ', $txt['parent_boards'], ': ', implode(', ', $children), '
    '; + } + + echo ' +
    + ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
    + ', $board['topics'],' ', $txt[330], ' +
    '; + + if (!empty($board['last_post']['id'])) + echo ' + ', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '
    + ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link']; + + echo ' +
    '; + } + + if (!empty($options['show_board_desc']) && $context['description'] != '') + { + echo ' + + + + +
    + ', $context['description'], ' +
    '; + } + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom5'] . '' : $txt['topbottom5']) . '' : '', '', theme_show_buttons(), '
    '; + + if (true OR isset($_GET['debug'])) + echo $context['alphabet_index']; + + echo ' +
    '; + + // If Quick Moderation is enabled (and set to checkboxes - 1) start the form. + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' +
    '; + + echo ' + + '; + + // Are there actually any topics to show? + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + + // Show a "select all" box for quick moderation? + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' + '; + // If it's on in "image" mode, don't show anything but the column. + elseif (!empty($options['display_quick_mod'])) + echo ' + '; + } + // No topics.... just say, "sorry bub". + else + echo ' + '; + + echo ' + '; + + foreach ($context['topics'] as $topic) + { + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + if($context['user']['is_guest']) + echo ''; + else echo ''; + } + + if ($first_topic['is_sticky'] && !$topic['is_sticky']) { + $first_topic['is_sticky'] = 0; + // Display separator + echo ''; + } + echo ' + + + + + + + + '; + + // Show the quick moderation options? + if (!empty($options['display_quick_mod'])) + { + echo ' + '; + } + echo ' + '; + } + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + { + echo ' + + + '; + } + + echo ' +
    '; + $first_topic = current($context['topics']); + echo $first_topic['is_sticky'] ? $txt['sticky_topics'] : '' ,'', $txt[70],'', $txt[109], '', $txt[110], '', $txt[301], '', $txt[111], ' + + ', $txt[151], '
    +
    + + +
     ', $txt['non_sticky_topics'], '
     ', $txt['non_sticky_topics'], '
    + + + + '; + // Is this topic new? (assuming they are logged in!) + if ($topic['new'] && $context['user']['is_logged']) + echo ' + ', $txt[302], ''; + + echo ' + ', $topic['first_post']['link']; + + if (! empty ($topic['subtitle'])) + echo ' +
    ', $topic['subtitle'], '
    '; + + echo ' + ', $topic['pages'], ' +
    + ', $topic['first_post']['member']['link'], ' + + ', $topic['replies'], ' + + ', $topic['views'], ' + '; +/* if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif')) + echo ' + ', $txt[111], '';*/ + echo ' + + ', $topic['last_post']['time'], '
    + ', $txt[525], ' ', $topic['last_post']['member']['link'], ' +
    +
    '; + if ($options['display_quick_mod'] == 1 && ($topic['quick_mod']['remove'] || $topic['quick_mod']['lock'] || $topic['quick_mod']['sticky'] || $topic['quick_mod']['move'])) + echo ' + '; + else + { + // Check permissions on each and show only the ones they are allowed to use. + if ($topic['quick_mod']['remove']) + echo '', $txt[63], ''; + if ($topic['quick_mod']['lock']) + echo '', $txt['smf279'], ''; + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) + echo '
    '; + if ($topic['quick_mod']['sticky']) + echo '', $txt['smf277'], ''; + if ($topic['quick_mod']['move']) + echo '', $txt[132], ''; + } + echo '
    + '; + if ($context['can_move']) + { + echo ' + '; + } + echo ' + +
    '; + + // Finish off the form - again, if Quick Moderation is being done with checkboxes. (1) + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + echo ' + +
    '; + + echo ' + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], $modSettings['topbottomEnable'] ? $context['menu_separator'] . '' . ($settings['use_image_buttons'] ? '' . $txt['topbottom4'] . '' : $txt['topbottom4']) . '' : '', '', theme_show_buttons(), '
    +
    + '; + + // Show breadcrumbs at the bottom too? + if ($settings['linktree_inline']) + echo ' + + + + '; + if (!empty($settings['display_who_viewing'])) + { + echo ' + '; + } + + echo ' + + + + + + +
    ', theme_linktree(), '

    '; + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + else + echo $txt['who_viewing_board'],empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], '
    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    '; +if (0) { + echo ' +
    + : +   + +
    '; +} + echo ' + +
    '; +} + +function theme_show_buttons() +{ + global $context, $settings, $options, $txt, $scripturl; + + $buttonArray = array(); + + // If they are logged in, and the mark read buttons are enabled.. + if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[300] . '' : $txt[300]) . ''; + + // If the user has permission to show the notification button... ask them if they're sure, though. + if ($context['can_mark_notify']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + // Are they allowed to post new topics? + if ($context['can_post_new']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[33] . '' : $txt[33]) . ''; + + // How about new polls, can the user post those? + if ($context['can_post_poll']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf20'] . '' : $txt['smf20']) . ''; + + return implode($context['menu_separator'], $buttonArray); +} + +?> diff --git a/Themes/modern/Modlog.template.php b/Themes/modern/Modlog.template.php new file mode 100644 index 0000000..76d02ce --- /dev/null +++ b/Themes/modern/Modlog.template.php @@ -0,0 +1,114 @@ + + + + +
    + + + + + + + '; + + // Only display page numbers if not a result of a search. + if (!empty($context['page_index'])) + echo ' + + + '; + echo ' +
    +
    ' . $txt[119] . ' ', $txt['modlog_moderation_log'], '
    +
    ', $context['entrynum'], '
    +
    ', $txt['modlog_moderation_log_desc'], '
    ', $txt[139], ': ', $context['page_index'], '
    + + + '; + + foreach ($context['columns'] as $column) + { + if (!empty($column['not_sortable'])) + echo ' + '; + else + { + echo ' + '; + } + } + + echo ' + '; + + foreach ($context['entries'] as $entry) + { + echo ' + + + + + + + + + + + '; + } + + if (empty($context['entries'])) + echo ' + + + '; + + echo ' +
    ', $column['label'], ''; + if ($column['selected']) + echo '', $column['label'], ' '; + else + echo $column['label']; + echo '
    ', $entry['action'], '', $entry['time'], '', $entry['moderator']['link'], '', $entry['position'], '', $entry['ip'], '
    '; + + foreach ($entry['extra'] as $key => $value) + echo ' + ', $key, ': ', $value; + echo ' +
    + ', $txt['modlog_no_entries_found'], ' +
    + + + + '; + + if (!empty($context['page_index'])) + echo ' + + + '; + + echo ' +
    +
    + + +
    + ', $txt['modlog_search'], ' (', $txt['modlog_by'], ': ', $context['columns'][$context['order']]['label'], ')  + +
    ', $txt[139], ': ', $context['page_index'], '
    +
    + + '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/MoreSmilies.template.php b/Themes/modern/MoreSmilies.template.php new file mode 100644 index 0000000..03e0077 --- /dev/null +++ b/Themes/modern/MoreSmilies.template.php @@ -0,0 +1,63 @@ +\n\'); + smileyPopupWindow.document.write(\'\n\t\n\t\t', $txt['more_smileys_title'], '\n\t\t\n\t\'); + smileyPopupWindow.document.write(\'\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
    ', $txt['more_smileys_pick'], '
    \'); + + for (row = 0; row < smileys.length; row++) + { + for (i = 0; i < smileys[row].length; i++) + { + smileys[row][i][2] = smileys[row][i][2].replace(/"/g, \'"\'); + smileyPopupWindow.document.write(\'\' + smileys[row][i][2] + \' \'); + } + smileyPopupWindow.document.write("
    "); + } + + smileyPopupWindow.document.write(\'
    ', $txt['more_smileys_close_window'], '
    \n\t\n\'); + smileyPopupWindow.document.close(); + } + // ]]>'; + } +} +?> diff --git a/Themes/modern/MoveTopic.template.php b/Themes/modern/MoveTopic.template.php new file mode 100644 index 0000000..81c339b --- /dev/null +++ b/Themes/modern/MoveTopic.template.php @@ -0,0 +1,55 @@ + + + + + + + +
    ', $txt[132], '
    + ', $txt[133], ':
    +
    +
    + '; + + // Disable the reason textarea when the postRedirect checkbox is unchecked... + echo ' +
    +
    + ', $txt['smf57'], '
    +
    +
    +
    + +
    '; + + if ($context['back_to_topic']) + echo ' + '; + + echo ' + + + '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/Newsearch.template.php b/Themes/modern/Newsearch.template.php new file mode 100644 index 0000000..5062cfd --- /dev/null +++ b/Themes/modern/Newsearch.template.php @@ -0,0 +1,336 @@ + +
    + + + + +
    ', theme_linktree(), '
    + + + + + + + +
    ' . $txt[183] . '
    '; + + if ($context['simple_search']) + { + echo ' + ' . $txt[582] . ':
    +   +
    + ' . $txt['smf298'] . ' + '; + } + else + { + echo ' + + + + + + + + + + + + + + + + + + + + + +
    + ', $txt[582], ': + + ', $txt[583], ': +
    + + + + + +
    ', $txt['search_options'], ':', $txt['search_post_age'], ':
    +
    + +
    + ', $txt['search_between'], '  ', $txt['search_and'], '  ', $txt[579], '. +
    ', $txt['search_order'], ':
    + +
    +
    + ', $txt[189], ':
    + + '; + + $temp_boards = array(); + foreach ($context['categories'] as $category) + { + $temp_boards[] = array( + 'name' => $category['name'] + ); + $temp_boards = array_merge($temp_boards, array_values($category['boards'])); + } + + $max_boards = ceil(count($temp_boards) / 2); + if ($max_boards < 2) + $max_boards = 2; + for ($i = 0; $i < $max_boards; $i++) + { + echo ' + + '; + if (isset($temp_boards[$i + $max_boards])) + { + echo ' + '; + } + echo ' + '; + } + + echo ' +
    '; + + if (isset($temp_boards[$i]['id'])) + echo ' + '; + elseif (isset($temp_boards[$i]['name'])) + echo '', $temp_boards[$i]['name'], ''; + + echo ' + '; + if (isset($temp_boards[$i + $max_boards]['id'])) + echo ' + '; + else + echo '', $temp_boards[$i + $max_boards]['name'], ''; + echo ' +

    +
    +
    + +
    '; + } + + echo ' +
    +
    '; +} + +function template_results() +{ + global $context, $settings, $options, $txt, $scripturl; + + if ($context['compact']) + { + echo ' +', theme_linktree(), ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    + + '; + if (!empty($context['topics'])) + { + echo ' + + + + '; + } + else + echo ' + '; + echo ' + '; + + while ($topic = $context['get_topics']()) + { + echo ' + + + + + '; + } + echo ' +
    ', $txt[70], '', $txt['search_date_posted'], '', $txt['search_no_results'], '
    + + + ' . $topic['first_post']['link'] . ' +
    ' . $txt['smf88'] . ' ' . $topic['board']['link'] . '
    '; + + foreach ($topic['matches'] as $message) + { + echo ' +
    +
    ' . $message['subject_highlighted'] . ' ', $txt[525], ' ' . $message['member']['link'] . '
    '; + + if ($message['body_highlighted'] != '') + echo ' +
    ' . $message['body_highlighted'] . '
    '; + } + + echo ' +
    + ' . $topic['first_post']['time'] . '
    + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], ' 
    +
    +'; + if ($settings['linktree_inline']) + echo ' + + + '; + echo ' + + + +
    ', theme_linktree(), '

    +
    +   + +
    +
    '; + } + else + { + echo ' + ', theme_linktree(), ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    +
    '; + if (empty($context['topics'])) + echo ' +
    +

    + (', $txt['search_no_results'], ')

    +
    +
    '; + + while ($topic = $context['get_topics']()) + { + foreach ($topic['matches'] as $message) + { + // Create buttons row. + $buttonArray = array(); + if ($topic['can_reply']) + { + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]) . ''; + } + if ($topic['can_mark_notify'] && $context['user']['is_logged']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + echo ' + + + + +
    + + + + + + + + + + + + + +
     ', $message['counter'], '   + ', $topic['category']['name'], ' / + ', $topic['board']['name'], ' / + ', $message['subject_highlighted'], ' +  ', $txt[30], ': ', $message['time'], ' 
    ', $txt[109], ' ', $topic['first_post']['member']['link'], ', ', $txt[72], ' ', $txt[525], ' ', $message['member']['link'], '', $txt['search_relevance'], ': ', $topic['relevance'], '
    ', $message['body_highlighted'], '
    +  ', implode($context['menu_separator'], $buttonArray), '
    +

    '; + } + } + + echo ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    '; + if ($settings['linktree_inline']) + echo theme_linktree(); + } +} + +?> diff --git a/Themes/modern/Notify.template.php b/Themes/modern/Notify.template.php new file mode 100644 index 0000000..e76809c --- /dev/null +++ b/Themes/modern/Notify.template.php @@ -0,0 +1,42 @@ + + + ', $txt[125], ' + + + + ', $context['notification_set'] ? $txt[212] : $txt[126], '
    +
    + ', $txt[163], ' - ', $txt[164], ' + + + '; +} + +function template_notify_board() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + +
    ', $txt[125], '
    + ', $context['notification_set'] ? $txt['notifyboard_turnoff'] : $txt['notifyboard_turnon'], '
    +
    + ', $txt[163], ' - ', $txt[164], ' +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/Packages.template.php b/Themes/modern/Packages.template.php new file mode 100644 index 0000000..1dd5611 --- /dev/null +++ b/Themes/modern/Packages.template.php @@ -0,0 +1,866 @@ + + + + + + + +
    ', $txt['package2'], '
    + [ ', $txt['package3'], ' ]
    + [ ', $txt['package5'], ' ]
    + [ ', $txt['package6'], ' ]
    + [ ', $txt['package_install_options'], ' ]
    +
    '; +} + +function template_view_package() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + +
    ', $txt['smf159b'], '
    '; + + if ($context['is_installed']) + echo ' + ', $txt['package_installed_warning1'], '
    +
    + ', $txt['package_installed_warning2'], '
    +
    '; + + echo ' + ', $txt['package_installed_warning3'], ' +
    +
    '; + + if (isset($context['package_readme'])) + echo ' + + + + + + +
    ', $txt['package_install_readme'], '
    ', $context['package_readme'], '
    +
    '; + + echo ' + + + + + + + + + '; + + // Yes, this looks strange, but it's here because of a typo near the 1.0 release. It should be necessary, but we can't break all the language files for that this late in the game. + echo ' + + + + + '; + } + + echo ' +
    ', $context['page_title'], '
    ', $context['uninstalling'] ? $txt['package_uninstall_actions'] : $txt['package42'], ' ', $txt['package43'], ' ', $context['filename'], ':
    '; + + if (empty($context['actions'])) + echo ' + ', $txt['package45'], ''; + else + { + echo ' + ', $txt['package44'], ' + + + + + + + '; + + $alternate = true; + foreach ($context['actions'] as $i => $packageaction) + { + echo ' + + + + + + '; + $alternate = !$alternate; + } + + echo ' +
    ', $txt['package_install_type'], '', $txt['package_install_action'], '', $txt['package_install_desc'], '
    ', $i + 1, '.', $packageaction['type'], '', $packageaction['action'], '', $packageaction['description'], '
    +
    '; + + if (!$context['ftp_needed']) + echo ' + [ ', $txt['smf154'], ' ]'; + else + { + echo ' +
    ', isset($txt['package_ftp_necessary']) ? $txt['package_ftp_necessary'] : $txt['package_ftp_neccessary'], '
    + ', $txt['package_ftp_why'], ' + +
    + + + + + + + + + + + + + + +
    +
    + +
    + +
    + +
    + +
    +
    +
    '; + } + + echo ' +
    '; +} + +function template_extract_package() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + + + +
    ', $context['page_title'], '
    ', $txt['package_installed_extract'], '
    '; + + if ($context['uninstalling']) + echo ' + ', $txt['package_uninstall_done']; + elseif ($context['install_finished']) + { + if ($context['extract_type'] == 'avatar') + echo ' + ', $txt['package39']; + elseif ($context['extract_type'] == 'language') + echo ' + ', $txt['package41']; + else + echo ' + ', $txt['package_installed_done']; + } + else + echo ' + ', $txt['package45']; + + echo ' +
    '; +} + +function template_list() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + + + +
    ', $context['page_title'], '
    ', $txt['smf181'], ' ', $context['filename'], ':
    +
      '; + + foreach ($context['files'] as $fileinfo) + echo ' +
    1. ', $fileinfo['filename'], ' (', $fileinfo['size'], ' ', $txt['package_bytes'], ')
    2. '; + + echo ' +
    + [ ', $txt[193], ' ] +
    '; +} + +function template_examine() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + + + +
    ', $context['page_title'], '
    ', $txt['package_file_contents'], ' ', $context['filename'], ':
    +
    ', $context['filedata'], '
    + + [ ', $txt['package14'], ' ] +
    '; +} + +function template_view_installed() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + + + +
    ' . $context['page_title'] . '
    ' . $txt['package6'] . '
    '; + + if (empty($context['installed_mods'])) + { + echo ' + + + + +
    ', $txt['smf189b'], '
    '; + } + else + { + echo ' + + + + + + '; + + foreach ($context['installed_mods'] as $i => $file) + echo ' + + + + + + '; + + echo ' +
      ', $txt['pacman2'], '', $txt['pacman3'], '
    ', ++$i, '.', $file['name'], '', $file['version'], '[ ', $txt['smf198b'], ' ]
    +
    + [ ', $txt['smf198d'], ' ]'; + } + + echo ' +
    '; +} + +function template_browse() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + +
    ', $txt[119], ' ', $txt['packages_latest'], '
    ', $txt['packages_latest_fetch'], '
    + + + '; + + // Gotta love IE4, and its hatefulness... + if ($context['browser']['is_ie4']) + echo ' + '; + else + echo ' + '; + + echo ' +
    + + + + + '; + + if (!empty($context['available_mods'])) + { + echo ' + + + + + '; + } + + if (!empty($context['available_avatars'])) + { + echo ' + + + + + '; + } + + if (!empty($context['available_languages'])) + { + echo ' + + + + + '; + } + + if (!empty($context['available_other'])) + { + echo ' + + + + + '; + } + + if (empty($context['available_mods']) && empty($context['available_avatars']) && empty($context['available_languages']) && empty($context['available_other'])) + echo ' + + + '; + + echo ' +
    ', $context['page_title'], '
    ', $txt['package7'], '
    + + + + + + + '; + + foreach ($context['available_mods'] as $i => $package) + { + echo ' + + + + + + '; + } + + echo ' +
      ', $txt['pacman2'], '', $txt['pacman3'], '  
    ', ++$i, '.', $package['name'], ' + ', $package['version']; + + if ($package['is_installed'] && !$package['is_newer']) + echo ' + '; + + echo ' + '; + + if ($package['can_uninstall']) + echo ' + [ ', $txt['smf198b'], ' ]'; + elseif ($package['can_upgrade']) + echo ' + [ ', $txt['package_upgrade'], ' ]'; + elseif ($package['can_install']) + echo ' + [ ', $txt['package11'], ' ]'; + + echo ' + [ ', $txt['package14'], ' ] + [ ', $txt['package52'], ' ] +
    +
    ', $txt['package8'], '
    + + + + + + + '; + + foreach ($context['available_avatars'] as $i => $package) + { + echo ' + + + + + + '; + } + + echo ' +
      ', $txt['pacman2'], '', $txt['pacman3'], '  
    ', ++$i, '.', $package['name'], '', $package['version']; + + if ($package['is_installed'] && !$package['is_newer']) + echo ' + '; + + echo ' + '; + + if ($package['can_uninstall']) + echo ' + [ ', $txt['smf198b'], ' ]'; + elseif ($package['can_upgrade']) + echo ' + [ ', $txt['package_upgrade'], ' ]'; + elseif ($package['can_install']) + echo ' + [ ', $txt['package11'], ' ]'; + + echo ' + [ ', $txt['package14'], ' ] + [ ', $txt['package52'], ' ] +
    +
    ' . $txt['package9'] . '
    + + + + + + + '; + + foreach ($context['available_languages'] as $i => $package) + { + echo ' + + + + + + '; + } + + echo ' +
      ' . $txt['pacman2'] . '' . $txt['pacman3'] . '  
    ' . ++$i . '.' . $package['name'] . '' . $package['version']; + + if ($package['is_installed'] && !$package['is_newer']) + echo ' + '; + + echo ' + '; + + if ($package['can_uninstall']) + echo ' + [ ', $txt['smf198b'], ' ]'; + elseif ($package['can_upgrade']) + echo ' + [ ', $txt['package_upgrade'], ' ]'; + elseif ($package['can_install']) + echo ' + [ ', $txt['package11'], ' ]'; + + echo ' + [ ', $txt['package14'], ' ] + [ ', $txt['package52'], ' ] +
    +
    ' . $txt['package10'] . '
    + + + + + + + '; + + foreach ($context['available_other'] as $i => $package) + { + echo ' + + + + + + '; + } + + echo ' +
      ' . $txt['pacman2'] . '' . $txt['pacman3'] . '  
    ' . ++$i . '.' . $package['name'] . '' . $package['version']; + + if ($package['is_installed'] && !$package['is_newer']) + echo ' + '; + + echo ' + '; + + if ($package['can_uninstall']) + echo ' + [ ', $txt['smf198b'], ' ]'; + elseif ($package['can_upgrade']) + echo ' + [ ', $txt['package_upgrade'], ' ]'; + elseif ($package['can_install']) + echo ' + [ ', $txt['package11'], ' ]'; + + echo ' + [ ', $txt['package14'], ' ] + [ ', $txt['package52'], ' ] +
    +
    ', $txt['smf189'], '
    + + + + +
    + ', $txt['package_installed_key'], ' + ', $txt['package_installed_current'], ' + ', $txt['package_installed_old'], ' +
    '; +} + +function template_servers() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + '; + + if ($context['package_download_broken']) + { + // While this may look strange, it's here because of a typo near the 1.0 release. It should be necessary, but we can't break all the language files for that this late in the game. + echo ' + + + + + '; + } + + echo ' + + + + + + + + + +
    ', $context['page_title'], '
    ', isset($txt['package_ftp_necessary']) ? $txt['package_ftp_necessary'] : $txt['package_ftp_neccessary'], '
    + ', $txt['package_ftp_why_download'], ' + +
    + + + + + + + + + + + + + + +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    ' . $txt['smf183'] . '
    + '; + foreach ($context['servers'] as $server) + echo ' + + + + + '; + echo ' +
    + ' . $server['name'] . ' + + [ ' . $txt['smf184'] . ' ] + + [ ' . $txt['smf138'] . ' ] +
    +
    +
    ' . $txt['smf185'] . '
    +
    + + + + + + + + + + +
    ' . $txt['smf186'] . ':
    ' . $txt['smf187'] . ':
    + +
    +
    +
    + + + + + + +
    ' . $txt['package_upload_title'] . '
    +
    + ' . $txt['package_upload_select'] . ': +
    + +
    +
    '; +} + +function template_package_list() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + +
    ' . $context['page_title'] . '
    '; + + // No packages, as yet. + if (empty($context['package_list'])) + echo ' +
      +
    • ', $txt['smf189'], '
    • +
    '; + // List out the packages... + else + { + foreach ($context['package_list'] as $package) + { + // A title. + if ($package['is_title']) + echo ' + ', $package['name'], '

    '; + // A heading. + elseif ($package['is_heading']) + echo ' + ', $package['name'], '

    '; + // Textual message. Could be empty just for a blank line. + elseif ($package['is_text']) + echo ' + ', $package['name'], '

    '; + // This is supposed to be a rule.. + elseif ($package['is_line']) + echo ' +
    '; + // A remote link. + elseif ($package['is_remote']) + echo ' + ', $package['link'], '

    '; + // Otherwise, it's a package. + else + { + // 1. Some mod [ Download ]. + echo ' + ', $package['count'], '. ', $package['can_install'] ? '' : '', $package['name'], $package['can_install'] ? '' : '', ' [ ', $txt['smf190'], ' ]'; + + // Mark as installed and current? + if ($package['is_installed'] && !$package['is_newer']) + echo '', $package['is_current'] ? $txt['package_installed_current'] : $txt['package_installed_old'], ''; + + // Show the mod type? + if ($package['type'] != '') + echo '
    + ', $txt['package24'], ':  ', ucwords(strtolower($package['type'])); + // Show the version number? + if ($package['version'] != '') + echo '
    + ', $txt['pacman3'], ':  ', $package['version']; + // How 'bout the author? + if ($package['author']['name'] != '') + echo '
    + ', $txt['pacman4'], ':  ', $package['author']['link']; + // The homepage.... + if ($package['author']['website']['link'] != '') + echo '
    + ', $txt['pacman6'], ':  ', $package['author']['website']['link']; + + // Desciption: bleh bleh! + // Location of file: http://someplace/. + echo '
    + ', $txt['pacman9'], ':  ', $package['description'], '
    + ', $txt['pacman10'], ':  ', $package['href'], '
    +
    '; + } + } + echo ' +
    '; + } + + echo ' +
    + + + + +
    + ', $txt['package_installed_key'], ' + ', $txt['package_installed_current'], ' + ', $txt['package_installed_old'], ' +
    '; +} + +function template_downloaded() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + +
    ' . $context['page_title'] . '
    + ' . (!isset($context['server']) ? $txt['package_uploaded_successfully'] : $txt['smf193']) . '

    + + + + + +
    ' . $context['package']['name'] . ' + ' . $context['package']['install']['link'] . ' + ' . $context['package']['list_files']['link'] . ' +
    +
    + [ ' . $txt[193] . ' ] +
    '; +} + +function template_install_options() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + + + + + +
    ', $context['page_title'], '
    ', $txt['package_install_options_ftp_why'], '
    +
    +
    +
    +
    + +
    +
    + +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/Poll.template.php b/Themes/modern/Poll.template.php new file mode 100644 index 0000000..cbc8abd --- /dev/null +++ b/Themes/modern/Poll.template.php @@ -0,0 +1,110 @@ +'; + + // Start the main poll form. + echo ' +
    + + + + +
    ', theme_linktree(), '
    + + + + + + +
    ' . $txt['smf39'] . '
    + + + + + + + + + '; + + if ($context['can_moderate_poll']) + echo ' + + + + + + + + + + '; + else + echo ' + '; + + echo ' + + + + + + + + + +
    ' . $txt['smf21'] . ':
    '; + + foreach ($context['choices'] as $choice) + { + echo ' + : '; + + // Does this option have a vote count yet, or is it new? + if ($choice['votes'] != -1) + echo ' (', $choice['votes'], ' ', $txt['smf42'], ')'; + + if (!$choice['is_last']) + echo '
    '; + } + + echo ' + (', $txt['poll_add_option'], ') +
    ', $txt['poll_options'], ': ', $txt['poll_options5'], '
    ', $txt['poll_options1a'], ' ', $txt['poll_options1b'], '
    ', $txt['poll_options'], ': + ' . $txt['poll_options2'] . '
    + ' . $txt['poll_options3'] . '
    + ' . $txt['poll_options4'] . '
    +
    +
    ' . $txt['smf40'] . ': ' . $txt['smf41'] . '
    +
    ' . $txt['smf16'] . '

    + + +
    +
    + + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/Post.template.php b/Themes/modern/Post.template.php new file mode 100644 index 0000000..6dbaa6e --- /dev/null +++ b/Themes/modern/Post.template.php @@ -0,0 +1,955 @@ +'; + + // Start the javascript... and boy is there a lot. + echo ' + + +
    + + + + +
    + ', theme_linktree(), ' +
    '; + + // If the user wants to see how their message looks - the preview table is where it's at! + if (isset($context['preview_message'])) + + { + echo ' + + + + + + + + +
    ', $context['preview_subject'], '
    +
    ', $context['preview_message']; + if($modSettings['nowplayingEnabled'] && $context['preview_nowplaying'] != '') + { + if($modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text'])) + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + + echo '

    ', $nowplayingstring, ' ', $context['preview_nowplaying'], ''; + } + echo '
    +

    '; + + } + + if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) + echo ' + '; + + // Start the main table. + echo ' + + + + + + + +
    ', $context['page_title'], '
    ', isset($context['current_topic']) ? ' + ' : '', ' + '; + + // If an error occurred, explain what happened. + if (!empty($context['post_error']['messages'])) + { + echo ' + + + + '; + } + + // If it's locked, show a message to warn the replyer. + if ($context['locked']) + echo ' + + + + '; + + // Guests have to put in their name and email... + if (isset($context['name']) && isset($context['email'])) + echo ' + + + + + + + + '; + + // Are you posting a calendar event? + if ($context['make_event']) + { + echo ' + + + + + + + '; + + // If events can span more than one day then allow the user to select how long it should last. + if ($context['event']['new'] && !empty($modSettings['cal_allowspan'])) + { + echo ' + + + + '; + } + + // If this is a new event let the user specify which board they want the linked post to be put into. + if ($context['event']['new'] && $context['is_new_topic']) + { + echo ' + + + + '; + } + } + + // Now show the subject box for this post. + echo ' + + + + '; + if ($context['is_first_post']) + echo ' + + + + '; + echo ' + + + + '; + + // If this is a poll then display all the poll options! + if ($context['make_poll']) + { + echo ' + + + + + + + + + + + + + + + + + + + + + + + + '; + } + + // The below function prints the BBC, smileys and the message itself out. + theme_postbox($context['message']); + + if($modSettings['nowplayingEnabled']) + { + echo' + + + + '; + } + + // If this message has been edited in the past - display when it was. + if (isset($context['last_modified'])) + echo ' + + + + '; + + // If the admin has enabled the hiding of the additional options - show a link and image for it. + if (!empty($settings['additional_options_collapsable'])) + echo ' + + + '; + + // Display the check boxes for all the standard options - if they are available to the user! + echo ' + + + + '; + + // If this post already has attachments on it - give information about them. + if (!empty($context['current_attachments'])) + { + echo ' + + + + '; + } + + // Is the user allowed to post any additional ones? If so give them the boxes to do it! + if (isset($context['warning'])) + echo' + + + '; + elseif ($context['can_post_attachment']) + { + echo ' + + + + '; + } + + // Finally, the submit buttons - and some javascript to hide the additional options on load. + echo ' + + + + + + +
    + ', $context['error_type'] == 'serious' ? '' . $txt['error_while_submitting'] . '' : '', ' +
    + ', implode('
    ', $context['post_error']['messages']), ' +
    +
    + ', $txt['smf287'], ' +
    + ', $txt[68], ': + + +
    + ', $txt[69], ': + + +
    + ', $txt['calendar12'], ' + + +
    + ', $txt['calendar10'], '  +   + ', $txt['calendar9'], '  +   + ', $txt['calendar11'], '  + +
    ', $txt['calendar54'], ' + +
    ', $txt['calendar13'], ' + +
    + ', $txt[70], ': + + +
    + Подзаголовок: + + +
    + ', $txt[71], ': + + + +
    + ', $txt['smf21'], ': + + +
    '; + + // Loop through all the choices and print them out. + foreach ($context['choices'] as $choice) + { + echo ' + : '; + + if (!$choice['is_last']) + echo '
    '; + } + + echo ' + (', $txt['poll_add_option'], ') +
    ', $txt['poll_options'], ': ', $txt['poll_options5'], '
    ', $txt['poll_options1a'], ' ', $txt['poll_options1b'], '
    + ', $txt['poll_options2'], '
    + ', $txt['poll_options3'], '
    + ', $txt['poll_options4'], '
    +
    +
    ', $txt['nowplaying3'], ' + +
    + ', $txt[211], ': + + ', $context['last_modified'], ' +
    + + ', $txt['post_additionalopt'], ' +
    +
    + + + + + + + + + + + ', ' + + ', $context['can_announce'] && $context['is_first_post'] ? ' + + + + ' : '', ' +
    ', $context['can_notify'] ? '' : '', '', $context['can_lock'] ? '' : '', '
    ', $context['can_sticky'] ? '' : '', '
    ', $context['can_move'] ? '' : '', '
    +
    +
    + ', $txt['smf119b'], ': + + + ', $txt['smf130'], ':
    '; + foreach ($context['current_attachments'] as $attachment) + echo ' + ', $attachment['name'], '
    '; + echo ' +
    +
    + ' . $txt['visual_postmod_appear'] . ' +
    + ', $txt['smf119'], ': + + ', ($context['attached'] != '' ? $txt['attach_preview'] . ': ' . $context['attached'] . '
    ' : ''), ' + '; + + // Show more boxes only if they aren't approaching their limit. + if ($context['num_allowed_attachments'] > 1) + echo ' + + (', $txt['more_attachments'], ')
    + '; + + // Show some useful information such as allowed extensions, maximum size and amount of attachments allowed. + if (!empty($modSettings['attachmentCheckExtensions'])) + echo ' + ', $txt['smf120'], ': ', $context['allowed_extensions'], '
    '; + echo ' + ', $txt['smf121'], ': ', $modSettings['attachmentSizeLimit'], ' ' . $txt['smf211'], !empty($modSettings['attachmentNumPerPostLimit']) ? ', ' . $txt['maxAttachPerPost'] . ': ' . $modSettings['attachmentNumPerPostLimit'] : '', ' + +
    '; + if (!empty($settings['additional_options_collapsable']) && empty($context['attached'])) + echo ' + '; + echo ' +
    ', $txt['smf16'], '

    + + '; + + // Option to delete an event if user is editing one. + if ($context['make_event'] && !$context['event']['new']) + echo ' + '; + + // Spell check button if the option is enabled. + if ($context['show_spellchecking']) + echo ' + '; + + // This image is a cunning way to keep a session alive - works with some javascript above. + echo ' +
    +
    '; + + // Assuming this isn't a new topic pass across the number of replies when the topic was created. + if (isset($context['num_replies'])) + echo ' + '; + + echo ' + + +
    '; + + // A hidden form to post data to the spell checking window. + if ($context['show_spellchecking']) + echo ' +
    + + + +
    '; + + // If the user is replying to a topic show the previous posts. + if (isset($context['previous_posts']) && count($context['previous_posts']) > 0) + { + echo ' +

    + + + + +
    + + + + '; + foreach ($context['previous_posts'] as $post) + + { + echo ' + + + + + '; + } + echo ' +
    ', $txt[468], '
    +
    ', $txt[280], ': ', $post['time'], '
    + ', $txt[279], ': ', $post['poster'], ' +
    + +
    ', $post['message']; + if($modSettings['nowplayingEnabled'] && $post['nowplaying'] != '') + { + if($modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + if(isset($modSettings['nowplaying_text'])) + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + + echo '

    ', $nowplayingstring, ' ', $post['nowplaying'], ''; + } + echo '
    +
    +
    '; + } +} + +// This function displays all the stuff you'd expect to see with a message box, the box, BBC buttons and of course smileys. +function template_postbox(&$message) +{ + global $context, $settings, $options, $txt, $modSettings; + + // Assuming BBC code is enabled then print the buttons and some javascript to handle it. + if ($context['show_bbc']) + { + echo ' + + + + '; + + // The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you! + $context['bbc_tags'] = array(); + $context['bbc_tags'][] = array( + 'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]), + 'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]), + 'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]), + 'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]), + array(), + 'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]), + 'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]), + 'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]), + 'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]), + array(), + 'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]), + array(), + 'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]), + 'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]), + ); + $context['bbc_tags'][] = array( + 'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]), + 'video' => array('code' => 'video', 'before' => '[video]', 'after' => '[/video]', 'description' => 'Вставить видео'), + 'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]), + 'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]), + 'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]), + 'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]), + array(), + 'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]), + 'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]), + 'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]), + array(), + 'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]), + 'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]), + 'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]), + array(), + 'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $txt[259]), + 'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]), + array(), + 'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]), + ); + + // Here loop through the array, printing the images/rows/separators! + foreach ($context['bbc_tags'][0] as $image => $tag) + { + // Is there a "before" part for this bbc button? If not, it can't be a button!! + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + // Print a drop down list for all the colors we allow! + if (!isset($context['disabled_tags']['color'])) + echo ' '; + echo '
    '; + + // Print the buttom row of buttons! + foreach ($context['bbc_tags'][1] as $image => $tag) + { + if (isset($tag['before'])) + { + // Is this tag disabled? + if (!empty($context['disabled_tags'][$tag['code']])) + continue; + + // If there's no after, we're just replacing the entire selection in the post box. + if (!isset($tag['after'])) + echo ''; + // On the other hand, if there is one we are surrounding the selection ;). + else + echo ''; + + // Okay... we have the link. Now for the image and the closing ! + echo '', $tag['description'], ''; + } + // I guess it's a divider... + else + echo '|'; + } + + echo ' + + '; + } + + // Now start printing all of the smileys. + if (!empty($context['smileys']['postform'])) + { + echo ' + + + '; + + // Show each row of smileys ;). + foreach ($context['smileys']['postform'] as $smiley_row) + { + foreach ($smiley_row['smileys'] as $smiley) + echo ' + ', $smiley['description'], ''; + + // If this isn't the last row, show a break. + if (empty($smiley_row['last'])) + echo '
    '; + } + + // If the smileys popup is to be shown... show it! + if (!empty($context['smileys']['popup'])) + echo ' + [', $txt['more_smileys'], ']'; + + echo ' + + '; + } + + // If there are additional smileys then ensure we provide the javascript for them. + if (!empty($context['smileys']['popup'])) + { + echo ' + '; + } + + // Finally the most important bit - the actual text box to write in! + echo ' + + + + + + '; +} + +// The template for the spellchecker. +function template_spellcheck() +{ + global $context, $settings, $options, $txt; + + // The style information that makes the spellchecker look... like the forum hopefully! + echo ' + + + ', $txt['spell_check'], ' + + + + + + + + + +
    +
     
    + + + +
    + ', $txt['spellcheck_change_to'], '
    + +
    + ', $txt['spellcheck_suggest'], '
    + +
    +
    + + + + +
    +
    + +'; +} + +?> diff --git a/Themes/modern/Printpage.template.php b/Themes/modern/Printpage.template.php new file mode 100644 index 0000000..a3e09d7 --- /dev/null +++ b/Themes/modern/Printpage.template.php @@ -0,0 +1,107 @@ + + + + + ', $txt[668], ' - ', $context['topic_subject'], ' + '; + + /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...) + Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual. + Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big. + Standards compliance mode happens when you use xhtml... */ + if ($context['browser']['needs_size_fix']) + echo ' + '; + + echo ' + + + +

    ', $context['forum_name'], '

    +

    ', $context['category_name'], ' => ', $context['board_name'], ' => ', $txt[195], ': ', $context['poster_name'], ' ', $txt[176], ' ', $context['post_time'] . '

    + + + + + +
    '; +} + +function template_main() +{ + global $context, $settings, $options, $txt; + + foreach ($context['posts'] as $post) + echo ' +
    +
    + '/*, $txt[196], ': ', $post['subject'], '
    + ', $txt[197], ': '*/, '', $post['member'], ' '/*, $txt[176]*/, ' ', /*'',*/ $post['time'], /*''*/ ' +
    +
    ', $post['body'], '
    '; +} + +function template_print_below() +{ + global $context, $settings, $options; + + echo ' +

    +
    ', theme_copyright(), '
    +
    + +'; +} + +?> diff --git a/Themes/modern/Profile.template.php b/Themes/modern/Profile.template.php new file mode 100644 index 0000000..798af10 --- /dev/null +++ b/Themes/modern/Profile.template.php @@ -0,0 +1,1846 @@ + + + + '; + + // Loop through every area, displaying its name as a header. + foreach ($context['profile_areas'] as $section) + { + echo ' + + + + + + '; + } + echo ' +
    ', $section['title'], '
    '; + + // For every section of the area display it, and bold it if it's the current area. + foreach ($section['areas'] as $i => $area) + if ($i == $context['menu_item_selected']) + echo ' + ', $area, '
    '; + else + echo ' + ', $area, '
    '; + echo ' +
    +
    + + '; + } + // If no areas exist just open up a containing table. + else + { + echo ' + + + + +
    '; + } +} + +// Template for closing off table started in profile_above. +function template_profile_below() +{ + global $context, $settings, $options; + + echo ' +
    '; +} + +// This template displays users details without any option to edit them. +function template_summary() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + // First do the containing table and table header. + echo ' + + + + + '; + + // Do the left hand column - where all the important user info is displayed. + echo ' + + '; + + // Now print the second column where the members avatar/text is shown. + echo ' + + '; +/* + if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view'))) { + if(isset($context['member']['googleMap']['latitude']) && isset($context['member']['googleMap']['longitude'])) { + echo ' + + + "; + } + } +*/ + // Finally, if applicable, span the bottom of the table with links to other useful member functions. + echo ' + + + + + + + '; + + echo ' + +
    +   + ', $txt[35], ': ', $context['member']['username'], ' + ', $txt[232], '
    + + + + + '; + if (!empty($modSettings['titlesEnable']) && $context['member']['title'] != '') + { + echo ' + + + + '; + } + echo ' + + + + '; +/* + echo ' + + + '; +*/ + + // If the person looking is an admin they can check the members IP address and hostname. + if ($user_info['is_admin']) + { + echo ' + + + + + + + '; + } + + /* +// If karma enabled show the members karma. + if ($modSettings['karmaMode'] == '1') + echo ' + + + '; + elseif ($modSettings['karmaMode'] == '2') + echo ' + + + '; + echo ' + + + + + + + '; +*/ +// If karma enabled show the members karma. + if ($modSettings['karmaMode'] == '1') + { echo ' + + + '; + if (!empty($modSettings['karmadescmod']) && !empty($modSettings['karmalinks'])) + { if ($context['show_karmastat']) + echo ' + '; + if (!empty($modSettings['karmaisowner']) && ($context['owner']==1)) echo ' + + + '; + elseif (empty($modSettings['karmaisowner'])) echo' + + + '; + elseif ($context['user']['is_admin']) echo ' + + + ' + ;} + } + + elseif ($modSettings['karmaMode'] == '2') + { echo ' + + + '; + if (!empty($modSettings['karmadescmod']) && !empty($modSettings['karmalinks'])) + { if ($context['show_karmastat']) + echo ' + '; + if (!empty($modSettings['karmaisowner']) && ($context['owner']==1)) echo ' + + + '; + elseif (empty($modSettings['karmaisowner'])) echo' + + + '; + elseif ($context['user']['is_admin']) echo ' + + + ' + ;} + } + echo ' + + + + + + + '; + + // If the person looking at the summary is an admin the the account isn't activated, give the admin the ability to do it themselves. + if ($user_info['is_admin'] && !$context['member']['is_activated']) + echo ' + + + + + '; + + // Messenger type information. + echo ' + + + + + + + + + + + + + + + + + + + + + + + + +'; +if ($context['member']['warning']['link'] != '') +echo' + + + +'; +echo' + + + + + + + + + + + + + + '; + + if (!empty($modSettings['userLanguage'])) + echo ' + + + '; + + echo ' + + '; + + // Show the users signature. + echo ' + + + +
    ', $txt[68], ': ', $context['member']['name'], '
    ', $txt['title1'], ': ', $context['member']['title'], '
    ', $txt[86], ': ', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')
    ', $txt[87], ': ', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '
    + ', $txt[512], ': + + ', $context['member']['ip'], ' +
    + ', $txt['hostname'], ': + +
    ', $context['member']['hostname'], '
    +
    + DNSBL: + +
    ', $context['member']['dnsbl_status'], '
    +
    + ', $modSettings['karmaLabel'], ' + + ', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), ' +
    + ', $modSettings['karmaLabel'], ' + + +', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], ' +
    ', $txt[233], ': ', $context['member']['registered'], '
    ', $txt['lastLoggedIn'], ': ', $context['member']['last_login'], '
    + ', $modSettings['karmaLabel'], ' + + ', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), ' +
    '.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].'
    + ', $modSettings['karmaLabel'], ' + + +', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], ' +
    '.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].''.$txt['who_change_my_karma'].''.$txt['whom_i_change_karma'].'
    ', $txt[233], ': ', $context['member']['registered'], '
    ', $txt['lastLoggedIn'], ': ', $context['member']['last_login'], '

    + ' . $txt['account_not_activated'] . ' (' . $txt['account_activate'] . ') +

    ', $txt[513], ':', $context['member']['icq']['link_text'], '
    ', $txt[603], ': ', $context['member']['aim']['link_text'], '
    ', $txt['MSN'], ': ', $context['member']['msn']['link_text'], '
    ', $txt[604], ': ', $context['member']['yim']['link_text'], '
    ', $txt[69], ': '; + + // Only show the email address if it's not hidden. + if ($context['member']['email_public']) + echo ' + ', $context['member']['email'], ''; + // ... Or if the one looking at the profile is an admin they can see it anyway. + elseif (!$context['member']['hide_email']) + echo ' + ', $context['member']['email'], ''; + else + echo ' + ', $txt[722], ''; + + // Some more information. + echo ' +
    ', $txt[96], ': ', $context['member']['website']['title'] ? $context['member']['website']['title'] : $context['member']['website']['url'], '
    ', $txt[113], ' + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $context['member']['online']['text'] . '' : $context['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $context['member']['online']['text'] . '' : '', ' +
    ' . $txt['visual_current_level'] . ' ' . $context['member']['warning']['link'] . '

    ', $txt[231], ': ', $context['member']['gender']['name'], '
    ', $txt[420], ':', $context['member']['age'] . ($context['member']['today_is_birthday'] ? '   ' : ''), '
    ', $txt[227], ':', $context['member']['location'], '
    ', $txt['local_time'], ':', $context['member']['local_time'], '
    ', $txt['smf225'], ':', $context['member']['language'], '

    + + + + + + +
    ', $txt[85], ':
    ', $context['member']['signature'], '
    +
    +
    + ', $context['member']['avatar']['image'], '

    + ', $context['member']['blurb'], ' +
    + +
    + + + +
    ', $txt[597], ':
    '; + if (!$context['user']['is_owner'] && $context['can_send_pm']) + echo ' + ', $txt[688], '.
    +
    '; + echo ' + ', $txt[460], ' ', $txt[461], '.
    + ', $txt['statPanel_show'], '.
    +
    +
    '; +} + +// Template for showing all the posts of the user, in chronological order. +function template_showPosts() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + + '; + + // Only show posts if they have made some! + if (!empty($context['posts'])) + { + // Page numbers. + echo ' + + + +
    +   ', $txt['showPosts'], ' +
    + ', $txt[139], ': ', $context['page_index'], ' +
    '; + + // For every post to be displayed, give it its own subtable, and show the important details of the post. + foreach ($context['posts'] as $post) + { + echo ' + + + + +
    + + + + + + + + + + + + +
    + ', $post['counter'], ' + +  ', $post['category']['name'], ' / ', $post['board']['name'], ' / ', $post['subject'], ' + + ', $txt[30], ': ', $post['time'], ' +
    ', $post['body']; + if($modSettings['nowplayingEnabled'] && $post['nowplaying'] != '') + { + if($modSettings['nowplaying_image'] != '') + $nowplayingstring = ''; + else + $nowplayingstring = ''; + + if(isset($modSettings['nowplaying_text'])) + $nowplayingstring .= ' ' . $modSettings['nowplaying_text']; + + echo '

    ', $nowplayingstring, ' ', $post['nowplaying'], ''; + } + echo '
    '; + + if ($post['can_delete']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + if ($post['can_delete'] && ($post['can_mark_notify'] || $post['can_reply'])) + echo ' + ', $context['menu_separator']; + if ($post['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + if ($post['can_reply'] && $post['can_mark_notify']) + echo ' + ', $context['menu_separator']; + if ($post['can_mark_notify']) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + echo ' +
    +
    '; + } + + // Show more page numbers. + echo ' + + + + +
    + ', $txt[139], ': ', $context['page_index'], ' +
    '; + } + // No posts? Just end the table with a informative message. + else + echo ' + + + ', $txt[170], ' + + + '; +} + +// Template for user statistics, showing graphs and the like. +function template_statPanel() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + echo ' + + + + '; + + // First, show a few text statistics such as post/topic count. + echo ' + + + + '; + + // This next section draws a graph showing what times of day they post the most. + echo ' + + + + + + '; + + // The final section is two columns with the most popular boards by posts and activity (activity = users posts / total posts). + echo ' + + + + + + + + + +
      ', $txt['statPanel_generalStats'], '
    + + + + + + + + + + + + + + + + + +
    ', $txt['statPanel_total_time_online'], ':', $context['time_logged_in'], '
    ', $txt[489], ':', $context['num_posts'], ' ', $txt['statPanel_posts'], '
    ', $txt[490], ':', $context['num_topics'], ' ', $txt['statPanel_topics'], '
    ', $txt['statPanel_users_polls'], ':', $context['num_polls'], ' ', $txt['statPanel_polls'], '
    ', $txt['statPanel_users_votes'], ':', $context['num_votes'], ' ', $txt['statPanel_votes'], '
    +
    ', $txt['statPanel_activityTime'], '
    + '; + + // If they haven't post at all, don't draw the graph. + if (empty($context['posts_by_time'])) + echo ' + + + '; + // Otherwise do! + else + { + echo ' + + '; + + // Loops through each hour drawing the bar to the correct height. + foreach ($context['posts_by_time'] as $time_of_day) + echo ' + '; + echo ' + + + '; + // The labels. + foreach ($context['posts_by_time'] as $time_of_day) + echo ' + '; + echo ' + + + + '; + } + echo ' +
    ', $txt['statPanel_noPosts'], '
    ', $time_of_day['hour'], '
    ', $txt['statPanel_timeOfDay'], '
    +
    ', $txt['statPanel_topBoards'], '', $txt['statPanel_topBoardsActivity'], '
    + '; + if (empty($context['popular_boards'])) + echo ' + + + '; + else + { + // Draw a bar for every board. + foreach ($context['popular_boards'] as $board) + { + echo ' + + + + + '; + } + } + echo ' +
    ', $txt['statPanel_noPosts'], '
    ', $board['link'], '', $board['posts'] > 0 ? '' : ' ', '', $board['posts'], '
    +
    + '; + if (empty($context['board_activity'])) + echo ' + + + '; + else + { + // Draw a bar for every board. + foreach ($context['board_activity'] as $activity) + { + echo ' + + + + + '; + } + } + echo ' +
    ', $txt['statPanel_noPosts'], '
    ', $activity['link'], '', $activity['percent'] > 0 ? '' : ' ', '', $activity['percent'], '%
    +
    '; +} + +// Template for changing user account information. +function template_account() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt; + + // Javascript for checking if password has been entered / taking admin powers away from themselves. + echo ' + '; + + // The main containing header. + echo ' +
    + + + + '; + + // Display Name, language and date user registered. + echo ' + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['account_info'], ' +
    + '; + + // Only show these settings if you're allowed to edit the account itself (not just the membergroups). + if ($context['allow_edit_account']) + { + if ($context['user']['is_admin'] && !empty($context['allow_edit_username'])) + echo ' + + + + + + + '; + else + echo ' + + + + '; + + echo ' + + + + '; + + // Allow the administrator to change the date they registered on and their post count. + if ($context['user']['is_admin']) + echo ' + + + + + + + + '; + + // Only display if admin has enabled "user selectable language". + if (!empty($modSettings['userLanguage']) && count($context['languages']) > 1) + { + echo ' + + + + '; + } + } + // Only display member group information/editing with the proper permissions. + if ($context['allow_edit_membergroups']) + { + echo ' + + + + + + + + + '; + } + + // Show this part if you're not only here for assigning membergroups. + if ($context['allow_edit_account']) + { + // Show email address box. + echo ' + + + + + + '; + + // If the user is allowed to hide their email address from the public give them the option to here. + if ($context['allow_hide_email']) + { + echo ' + + + + '; + } + + // Option to show online status - if they are allowed to. + if ($context['allow_hide_online']) + { + echo ' + + + + '; + } + + // Show boxes so that the user may change his or her password. + echo ' + + + + + + + + + '; + + // This section allows the user to enter secret question/answer so they can reset a forgotten password. + echo ' + + + + + + + + + '; + } + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    ', $txt['username_warning'], '
    + ', $txt[35], ': + + +
    + ', $txt[35], ': ', $context['user']['is_admin'] ? ' + ' : '', ' + + ', $context['member']['username'], ' +
    + ', $txt[68], ': +
    ', $txt[518], '
    +
    ', ($context['allow_edit_name'] ? '' : $context['member']['name']), '
    ', $txt[233], ':
    ', $txt[86], ':
    ', $txt[349], ': + +

    ', $txt['primary_membergroup'], ': + + +
    ', $txt['additional_membergroups'], ': +
    + '; + // For each membergroup show a checkbox so members can be assigned to more than one group. + foreach ($context['member_groups'] as $member_group) + if ($member_group['can_be_additional']) + echo ' + ', $member_group['name'], '
    '; + echo ' +
    + +

    ', $txt[69], ':
    ', $txt[679], '
    ', $txt[721], '
    ', $txt['show_online'], '

    ', $txt[81], ':
    ', $txt[596], '
    ', $txt[82], ':

    ', $txt['pswd1'], ':
    ', $txt['secret_desc'], '
    ', $txt['pswd2'], ':
    ', $txt['secret_desc2'], '
    ', $txt['secret_why_blank'], '
    +
    +
    '; +} + +// Template for forum specific options - avatar, signature etc. +function template_forumProfile() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + if (!empty($modSettings['avatar_allow_server_stored'])) + echo ' + '; + + // The main containing header. + echo ' +
    + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['forumProfile_info'], ' +
    + '; + + // This is the avatar selection table that is only displayed if avatars are enabled! + if (!empty($modSettings['avatar_allow_server_stored']) || !empty($modSettings['avatar_allow_external_url']) || !empty($modSettings['avatar_allow_upload'])) + { + // If users are allowed to choose avatars stored on the server show selection boxes to choice them from. + if (!empty($modSettings['avatar_allow_server_stored'])) + { + echo ' + + + + '; + } + + // If the user can link to an off server avatar, show them a box to input the address. + if (!empty($context['member']['avatar']['allow_external'])) + { + echo ' + + + + '; + } + + // If the user is able to upload avatars to the server show them an upload box. + if (!empty($modSettings['avatar_allow_upload'])) + echo ' + + + + '; + } + + // Personal text... + echo ' + + + + + + + '; + + // Gender, birthdate and location. + echo ' + + + + + + + + + + + + + '; + + // All the messenger type contact info. + echo ' + + + + + + + + + + + + + + + '; + + // Input box for custom titles, if they can edit it... + if (!empty($modSettings['titlesEnable']) && $context['allow_edit_title']) + echo ' + + + + '; + + // Show the signature box. + //TODO add new permission 'edit signature' + if ($context['member']['id'] != 7388) { + echo ' + + + + '; + } + // Website details. + echo ' + + + + + + + + + + '; + + // If karma is enabled let the admin edit it... + if ($user_info['is_admin'] && !empty($modSettings['karmaMode'])) + { + echo ' + + + + + + '; + } + + + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    + + + +
    + ', $txt[229], ': +
    Do Nothing
    +
    +
    + + + +
    + + + +
    +
    + + + +
    ', $txt[475], ':
    ', $txt[474], '
    +
    + +
    + + + +
    ', $txt['avatar_will_upload'], ':
    +
    + ', ($context['member']['avatar']['ID_ATTACH'] > 0 ? '

    ' : ''), ' + +
    ', $txt[228], ':

    + ', $txt[563], ': +
    ', $txt[566], ' - ', $txt[564], ' - ', $txt[565], '
    +
    + - + - + +
    ', $txt[227], ':
    ', $txt[231], ': + +

    ', $txt[513], ':
    ', $txt[600], '
    ', $txt[603], ':
    ', $txt[601], '
    ', $txt['MSN'], ':
    ', $txt['smf237'], '.
    ', $txt[604], ':
    ', $txt[602], '

    ' . $txt['title1'] . ':
    + ', $txt[85], ': +
    ', $txt[606], '

    +
    '; + + if ($context['show_spellchecking']) + echo ' + '; + + echo ' +
    +
    '; + + // If there is a limit at all! + if (!empty($context['max_signature_length'])) + echo ' + ', $txt[664], ' ', $context['max_signature_length'], ''; + + // Load the spell checker? + if ($context['show_spellchecking']) + echo ' + '; + + // Some javascript used to count how many characters have been used so far in the signature. + echo ' + +

    ', $txt[83], ':
    ', $txt[598], '
    ', $txt[84], ':
    ', $txt[599], '

    ', $modSettings['karmaLabel'], ' + ', $modSettings['karmaApplaudLabel'], ' ', $modSettings['karmaSmiteLabel'], '
    + (', $txt[94], ': ', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), ') +
    +
    '; + + /* If the admin has enabled choosing avatars stored on the server, the below javascript is used to update the + file listing of avatars as the user changes catergory. It also updates the preview image as they choose + different files on the select box. */ + if (!empty($modSettings['avatar_allow_server_stored'])) + echo ' + '; + echo ' +
    '; + + if ($context['show_spellchecking']) + echo ' +
    '; +} + +// goooooooooooooogle map +function template_map() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + // The main containing header. + echo ' +
    + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['forumProfile_info'], ' +
    + '; + //Google Map Member Map + if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_place'))) { + echo ' + + + + + "; + } + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +

    + +
    +
    ', $txt['googleMapDisclaimer'] ,'
    + + + +
    +
    '; +} + + + +// Template for showing theme settings. Note: template_options() actually adds the theme specific options. +function template_theme() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $days; + + // The main containing header. + echo ' + + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['theme_info'], ' +
    + '; + + // Are they allowed to change their theme? + if ($modSettings['theme_allow'] || $context['user']['is_admin']) + { + echo ' + + + '; + } + + // Are multiple smiley sets enabled? + if (!empty($modSettings['smiley_sets_enable'])) + { + echo ' + + + '; + } + + if ($modSettings['theme_allow'] || $context['user']['is_admin'] || !empty($modSettings['smiley_sets_enable'])) + echo ' + + + '; + + // Allow the user to change the way the time is displayed. + echo ' + + + + + + + + + '; + + echo ' + + + '; + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    ', $txt['theme1a'], ': ', $context['member']['theme']['name'], ' ', $txt['theme1b'], '
    + ', $txt['smileys_current'], ': + :) +

    + ', $txt[486], ':
    + ', $txt[119], ' + ', $txt[479], ' +
    +
    + +
    ', $txt[371], ':
    ', $txt[519], '

    ', $txt[741], ': ', $context['current_forum_time'], '

    + + + + + + + + + + '; + + if ($settings['allow_no_censored']) + echo ' + + + '; + + echo ' + + + + + + + + + + + + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + +
    + +
    + +
    +
    +
    +
    '; +} + +function template_notification() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + // The main containing header. + echo ' + + + + + + + + +
    +    + ', $txt[79], ' +
    + ', $txt['notification_info'], ' +
    +
    '; + + // Allow notification on announcements to be disabled? + if (!empty($modSettings['notifyAnncmnts_UserDisable'])) + echo ' +   +
    '; + + // More notification options. + echo ' +   +
    + +   +
    + +
    + + + + +
    +
    +
    +
    +
    +
    + + +
    ', $txt['notifications_topics'], '
    + + + '; + if (!empty($context['topic_notifications'])) + { + echo ' + + + + '; + foreach ($context['topic_notifications'] as $topic) + { + echo ' + + + + + '; + } + + echo ' + + + + + + '; + } + else + echo ' + + '; + echo ' +
    + + ' . $txt[70] . '' . $txt[109] . '
    + ', $topic['link']; + + if ($topic['new']) + echo ' ', $txt[302], ''; + + echo '
    + ' . $txt['smf88'] . ' ' . $topic['board']['link'] . ' +
    ' . $topic['poster']['link'] . ' + +
    + ', $txt[139], ': ', $context['page_index'], ' +
    + +
    + ', $txt['notifications_topics_none'], '
    +
    ', $txt['notifications_topics_howto'], '
    +
    +
    + + + +
    +

    +
    +
    + + +
    ', $txt['notifications_boards'], '
    + + + '; + if (!empty($context['board_notifications'])) + { + echo ' + + '; + foreach ($context['board_notifications'] as $board) + { + echo ' + + + + '; + } + + echo ' + + + '; + } + else + echo ' + '; + echo ' + +
    + + ' . $txt['smf82'] . '
    ', $board['link']; + + if ($board['new']) + echo ' ', $txt[302], ''; + + echo ' + +
    + +
    + ', $txt['notifications_boards_none'], '
    +
    ', $txt['notifications_boards_howto'], '
    +
    +
    + + + +
    +

    '; +} + +// Template for options related to personal messages. +function template_pmprefs() +{ + global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info; + + // The main containing header. + echo ' +
    + + + + + + '; + + // A text box for the user to input usernames of everyone they want to ignore personal messages from. + echo ' + + + +
    +    + ', $txt[79], ' +
    + ', $txt['pmprefs_info'], ' +
    + + + + + '; + + // Extra options available to the user for personal messages. + echo ' + + + '; + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    + ', $txt[325], ': +
    + ', $txt[326], '
    +
    + ', $txt['find_members'], ' ', $txt['find_members'], ' +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    '; +} + +// Template to show for deleting a users account - now with added delete post capability! +function template_deleteAccount() +{ + global $context, $settings, $options, $scripturl, $txt, $scripturl; + + // The main containing header. + echo ' +
    + + + + '; + // If deleting another account give them a lovely info box. + if (!$context['member']['is_owner']) + echo ' + + + '; + echo ' + + + +
    +    + ', $txt['deleteAccount'], ' +
    + ', $txt['deleteAccount_desc'], ' +
    + + + + + '; + } + // Otherwise an admin doesn't need to enter a password - but they still get a warning - plus the option to delete lovely posts! + else + { + echo '
    ', $txt['deleteAccount_warning'], ' + +
    + + + + + + + + '; + } + echo ' +
    '; + + // If the user is deleting their own account warn them first - and require a password! + if ($context['member']['is_owner']) + { + echo ' + ', $txt['own_profile_confirm'], '

    +
    + ', $txt['smf241'], ': + +      + + + + +
    + ', $txt['deleteAccount_posts'], ': +
    + +
    + + + + +
    +
    +
    '; +} + +// Template for the password box/save button stuck at the bottom of every profile page. +function template_profile_save() +{ + global $context, $settings, $options, $txt; + + echo ' + +
    + '; + + // Only show the password box if it's actually needed. + if ($context['user']['is_owner'] && $context['require_password']) + echo ' + + ', $txt['smf241'], ': +
    ', $txt['smf244'], '
    + + + '; + else + echo ' + '; + + echo ' + + + + + + '; +} + +?> diff --git a/Themes/modern/Recent.template.php b/Themes/modern/Recent.template.php new file mode 100644 index 0000000..f07c5e6 --- /dev/null +++ b/Themes/modern/Recent.template.php @@ -0,0 +1,292 @@ + + + +  ' . $post['counter'] . '  + + +  ' . $post['category']['name'] . ' / ' . $post['board']['name'] . ' / ' . $post['subject'] . ' + + +  ' . $txt[30] . ': ' . $post['time'] . '  + + + + + ' . $txt[109] . ' ' . $post['first_poster']['link'] . ' | ' . $txt[22] . ' ' . $txt[525] . ' ' . $post['poster']['link'] . ' + + + + + ' . $post['message'] . ' + + + + '; + + if ($post['can_delete']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[121] . '' : $txt[31]), ''; + if ($post['can_delete'] && ($post['can_mark_notify'] || $post['can_reply'])) + echo ' + ', $context['menu_separator']; + if ($post['can_reply']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]), ''; + if ($post['can_reply'] && $post['can_mark_notify']) + echo ' + ', $context['menu_separator']; + if ($post['can_mark_notify']) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + echo ' + + +
    '; + } + + echo ' + ' . $txt[236] . ' ' . $txt[237] . '
    '; +} + +function template_unread() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + echo ' + + + + +
    ', theme_linktree(), '
    + + + + + +
    + + + ', $settings['show_mark_read'] ? ' + ' : '', ' + +
    ' . $txt[139] . ': ' . $context['page_index'] . '' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . '
    +
    + + + +
    + + '; + if (!empty($context['topics'])) + echo ' + + + + + + '; + else + echo ' + '; + echo ' + '; + + foreach ($context['topics'] as $topic) + { + echo ' + + + + + + + + + '; + } + + if (!empty($context['topics']) && !$context['showing_all_topics']) + echo ' + + + '; + + echo ' +
     ' . $txt[70] . '' . $txt[109] . '' . $txt[110] . '' . $txt[301] . '' . $txt[111] . '', $context['showing_all_topics'] ? $txt[151] : $txt['unread_topics_visit_none'], '
    + + + ' . $topic['first_post']['link'] . ' ' . $txt[302] . ' ' . $topic['pages'] . ' +
    ' . $txt['smf88'] . ' ' . $topic['board']['link'] . '
    + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['replies'] . ' + ' . $topic['views'] . ''; + if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif')) + echo ' + ', $txt[111], ''; + echo ' + + ', $topic['last_post']['time'], '
    + ', $txt[525], ' ', $topic['last_post']['member']['link'], ' +
    ', $txt['unread_topics_all'], '
    +
    + + + + + +
    + + + ', $settings['show_mark_read'] ? ' + ' : '', ' + +
    ' . $txt[139] . ': ' . $context['page_index'] . '' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . '
    +
    + + + + + + +
    ', !empty($modSettings['enableParticipation']) ? ' + ' . $txt['participation_caption'] . '
    ' : '', ' + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    '; +} + +function template_replies() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + echo ' + + + + +
    ', theme_linktree(), '
    + + + + + +
    + + + + + +
    ' . $txt[139] . ': ' . $context['page_index'] . ''; + + if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . ''; + + echo '
    +
    + + + +
    + + '; + if (!empty($context['topics'])) + echo ' + + + + + + '; + else + echo ' + '; + echo ' + '; + + foreach ($context['topics'] as $topic) + { + echo ' + + + + + + + + + '; + } + + echo ' +
     ' . $txt[70] . '' . $txt[109] . '' . $txt[110] . '' . $txt[301] . '' . $txt[111] . '' . $txt[151] . '
    + + + ' . $topic['first_post']['link'] . ' ' . $txt[302] . ' ' . $topic['pages'] . ' +
    ' . $txt['smf88'] . ' ' . $topic['board']['link'] . '
    + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['replies'] . ' + ' . $topic['views'] . ''; + if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif')) + echo ' + ', $txt[111], ''; + echo ' + + ', $topic['last_post']['time'], '
    + ', $txt[525], ' ', $topic['last_post']['member']['link'], ' +
    +
    + + + + + +
    + + + + + +
    ' . $txt[139] . ': ' . $context['page_index'] . ''; + + if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) + echo ' + ' . ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]) . ''; + + echo '
    +
    + + + + + + +
    + ' . $txt[457] . '
    + ' . $txt[454] . '
    + ' . $txt[455] . ' +
    + ' . $txt[456] . '
    ' . ($modSettings['enableStickyTopics'] == '1' ? ' + ' . $txt['smf96'] . '
    ' : '') . ($modSettings['pollMode'] == '1' ? ' + ' . $txt['smf43'] : '') . ' +
    '; +} + +?> diff --git a/Themes/modern/Register.template.php b/Themes/modern/Register.template.php new file mode 100644 index 0000000..0506a91 --- /dev/null +++ b/Themes/modern/Register.template.php @@ -0,0 +1,402 @@ + + +
    + + + + + + +
    ', $txt[97], ' - ', $txt[517], '
    + + + + + + + + + + + + + + + + + + + + +
    + ', $txt[98], ': +
    ', $txt[520], '
    +
    + +
    + ', $txt[69], ': +
    ', $txt[679], '
    +
    + '; + + // Are they allowed to hide their email? + if ($context['allow_hide_email']) + echo ' + '; + + echo ' +
    + ', $txt[81], ': + + +
    + ', $txt[82], ': + + +
    + ', $txt['captchaEnter'], ': + + ', $context['captcha_image'], ' + +
    +
    '; + + // Require them to agree here? + if ($context['require_agreement']) + echo ' + + + + + + +
    + ', $context['agreement'], ' +
    + +
    '; + + echo ' +
    +
    + +
    +
    '; + + // Uncheck the agreement thing.... + if ($context['require_agreement']) + echo ' +'; +} + +// After registration... all done ;). +function template_after() +{ + global $context, $settings, $options, $txt, $scripturl; + + // Not much to see here, just a quick... "you're now registered!" or what have you. + echo ' +
    + + + + + + +
    ', $context['page_title'], '
    ', $context['description'], '

    +
    '; +} + +function template_admin_browse() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + +
    + + + + + + + + + + + + + + '; + + foreach ($context['columns'] as $column) + { + echo ' + '; + } + + echo ' + + '; + + if (empty($context['members'])) + echo ' + + + '; + else + { + foreach ($context['members'] as $member) + echo ' + + + + + + + + '; + + echo ' + + + '; + } + + echo ' + + + +
    ' . $txt[119] . ' ', $txt['registration_center'], '
    '; + + if (isset($context['types_enabled'])) + { + if ($context['types_enabled'] == 'approve' || $context['types_enabled'] == 'both') + echo ' + ', $context['browse_type'] == 'approve' ? '>' . $txt['admin_browse_awaiting_approval'] : '' . $txt['admin_browse_awaiting_approval'] . ''; + + if ($context['types_enabled'] == 'both') + echo ' + |'; + + if ($context['types_enabled'] == 'activate' || $context['types_enabled'] == 'both') + echo ' + ', $context['browse_type'] == 'activate' ? '>' . $txt['admin_browse_awaiting_activate'] : '' . $txt['admin_browse_awaiting_activate'] . ''; + echo ' + |'; + } + + echo ' + ', $txt['admin_browse_register_new'], ' +
    + ', $txt['admin_browse_' . $context['browse_type'] . '_desc'], ' +
    ', $txt[139], ': ', $context['page_index'], '
    + '; + + if ($column['selected']) + echo $column['label'], ' '; + else + echo $column['label']; + + echo ' +
    ', $txt['admin_browse_no_members'], ' ', ($context['browse_type'] == 'approve' ? $txt['admin_browse_awaiting_approval'] : $txt['admin_browse_awaiting_activate']), '
    ', $member['id'], ' + ', $member['username'], '', ($member['possibleBot'] == 1 ? ' (Bot?)' : '') , ' + + ', $member['email'], '', $member['ip'], '', $member['dateRegistered'], ' + +
    + + + + + + ', $context['sort_direction'] == 'up' ? ' + ' : '', ' +
    ', $txt[139], ': ', $context['page_index'], '
    + +
    '; +} + +function template_admin_register() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + echo ' + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ' . $txt[119] . ' ', $txt['registration_center'], ' +
    '; + + if (isset($context['types_enabled'])) + { + if ($context['types_enabled'] == 'approve' || $context['types_enabled'] == 'both') + echo ' + ', $txt['admin_browse_awaiting_approval'], ''; + + if ($context['types_enabled'] == 'both') + echo ' + |'; + + if ($context['types_enabled'] == 'activate' || $context['types_enabled'] == 'both') + echo ' + ', $txt['admin_browse_awaiting_activate'], ''; + + echo ' + |'; + } + + echo ' + >', $txt['admin_browse_register_new'], ' +
    + ', $txt['admin_register_desc'], ' +
    + ', $txt['admin_register_username'], ': +
    ', $txt['admin_register_username_desc'], '
    +
    + +
    + ', $txt['admin_register_email'], ': +
    ', $txt['admin_register_email_desc'], '
    +
    + +
    + ', $txt['admin_register_password'], ': +
    ', $txt['admin_register_password_desc'], '
    +
    +
    +
    + ', $txt['admin_register_group'], ': +
    ', $txt['admin_register_group_desc'], '
    +
    +
    +
    + ', $txt['admin_register_email_detail'], ': +
    ', $txt['admin_register_email_detail_desc'], '
    +
    +
    +
    + ', $txt['admin_register_email_activate'], ': + +
    +
    + +
    + +
    '; +} + +?> diff --git a/Themes/modern/Reminder.template.php b/Themes/modern/Reminder.template.php new file mode 100644 index 0000000..6052b7a --- /dev/null +++ b/Themes/modern/Reminder.template.php @@ -0,0 +1,114 @@ + +
    + + + + + + + + + + + + + +
    + ', $txt[36], ' ', $txt[194], ' +
    ', $txt['smf100'], ':
    ', $txt['pswd4'], '
    + +
    '; +} + +function template_sent() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + +
    ' . $context['page_title'] . '
    + ' . $context['description'] . ' +
    '; +} + +function template_set_password() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    +
    + + + + + + + + + + + + +
    ', $context['page_title'], '
    + ', $txt[81], ':
    + ', $txt[596], ' +
    ', $txt[82], ':
    + + + +
    '; +} + +function template_ask() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    +
    + + + + + + + + + + + + + + + + + + + + +
    ', $txt[36], ' ', $txt[194], '
    ', $txt['pswd6'], '
    ', $txt['pswd1'], ': ', $context['secret_question'], '
    ', $txt['pswd2'], ':
    + ', $txt[81], ':
    + ', $txt[596], ' +
    ', $txt[82], ':
    + + + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/Search.template.php b/Themes/modern/Search.template.php new file mode 100644 index 0000000..fa009dd --- /dev/null +++ b/Themes/modern/Search.template.php @@ -0,0 +1,342 @@ + +
    + + + + +
    ', theme_linktree(), '
    + + + + + + + +
    ' . $txt[183] . '
    '; + + if ($context['simple_search']) + { + echo ' + ' . $txt[582] . ':
    +   +
    + ' . $txt['smf298'] . ' + '; + } + else + { + echo ' + + + + + + + + + + + + + + + + + + + + + +
    + ', $txt[582], ': + + ', $txt[583], ': +
    + + + + + +
    ', $txt['search_options'], ':', $txt['search_post_age'], ':
    +
    + +
    + ', $txt['search_between'], '  ', $txt['search_and'], '  ', $txt[579], '. +
    ', $txt['search_order'], ':
    + +
    +
    + ', $txt[189], ':
    + + '; + + $temp_boards = array(); + foreach ($context['categories'] as $category) + { + $temp_boards[] = array( + 'name' => $category['name'] + ); + $temp_boards = array_merge($temp_boards, array_values($category['boards'])); + } + + $max_boards = ceil(count($temp_boards) / 2); + if ($max_boards < 2) + $max_boards = 2; + for ($i = 0; $i < $max_boards; $i++) + { + echo ' + + '; + if (isset($temp_boards[$i + $max_boards])) + { + echo ' + '; + } + echo ' + '; + } + + echo ' +
    '; + + if (isset($temp_boards[$i]['id'])) + echo ' + '; + elseif (isset($temp_boards[$i]['name'])) + echo '', $temp_boards[$i]['name'], ''; + + echo ' + '; + if (isset($temp_boards[$i + $max_boards]['id'])) + echo ' + '; + else + echo '', $temp_boards[$i + $max_boards]['name'], ''; + echo ' +

    +
    +
    + +
    '; + } + + echo ' +
    +
    '; +} + +function template_results() +{ + global $context, $settings, $options, $txt, $scripturl; + + if ($context['compact']) + { + echo ' +', theme_linktree(), ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    + + '; + if (!empty($context['topics'])) + { + echo ' + + + + + + '; + } + else + echo ' + '; + echo ' + '; + + while ($topic = $context['get_topics']()) + { + echo ' + + + + + + + '; + } + echo ' +
    ', $txt[70], '', $txt[109], '', $txt['search_relevance'], '', $txt['search_date_posted'], '', $txt['search_no_results'], '
    + + + ' . $topic['first_post']['link'] . ' +
    ' . $txt['smf88'] . ' ' . $topic['board']['link'] . '
    '; + + foreach ($topic['matches'] as $message) + { + echo ' +
    +
    ' . $message['subject_highlighted'] . ' ', $txt[525], ' ' . $message['member']['link'] . '
    '; + + if ($message['body_highlighted'] != '') + echo ' +
    ' . $message['body_highlighted'] . '
    '; + } + + echo ' +
    + ' . $topic['first_post']['member']['link'] . ' + ' . $topic['relevance'] . ' + ' . $topic['first_post']['time'] . '
    + + + + +
    + + + + + +
    ', $txt[139], ': ', $context['page_index'], ' 
    +
    +'; + if ($settings['linktree_inline']) + echo ' + + + '; + echo ' + + + +
    ', theme_linktree(), '

    +
    +   + +
    +
    '; + } + else + { + echo ' + ', theme_linktree(), ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    +
    '; + if (empty($context['topics'])) + echo ' +
    +

    + (', $txt['search_no_results'], ')

    +
    +
    '; + + while ($topic = $context['get_topics']()) + { + foreach ($topic['matches'] as $message) + { + // Create buttons row. + $buttonArray = array(); + if ($topic['can_reply']) + { + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[145] . '' : $txt[145]) . ''; + } + if ($topic['can_mark_notify'] && $context['user']['is_logged']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; + + echo ' + + + + +
    + + + + + + + + + + + + + +
     ', $message['counter'], '   + ', $topic['category']['name'], ' / + ', $topic['board']['name'], ' / + ', $message['subject_highlighted'], ' +  ', $txt[30], ': ', $message['time'], ' 
    ', $txt[109], ' ', $topic['first_post']['member']['link'], ', ', $txt[72], ' ', $txt[525], ' ', $message['member']['link'], '', $txt['search_relevance'], ': ', $topic['relevance'], '
    ', $message['body_highlighted'], '
    +  ', implode($context['menu_separator'], $buttonArray), '
    +

    '; + } + } + + echo ' + + + + +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    '; + if ($settings['linktree_inline']) + echo theme_linktree(); + } +} + +?> diff --git a/Themes/modern/SendTopic.template.php b/Themes/modern/SendTopic.template.php new file mode 100644 index 0000000..f63ce0f --- /dev/null +++ b/Themes/modern/SendTopic.template.php @@ -0,0 +1,74 @@ + + + + + '; + + // Just show all the input boxes, in a line... + echo ' + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + ', $context['page_title'], ' +
    ', $txt['sendtopic_sender_name'], ':
    ', $txt['sendtopic_sender_email'], ':
    ', $txt['sendtopic_comment'], ':

    ', $txt['sendtopic_receiver_name'], ':
    ', $txt['sendtopic_receiver_email'], ':

    + + '; +} + +function template_report() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + +
    ', $txt['rtm1'], '
    +
    ', $txt['smf315'], '
    + ', $txt['rtm2'], ': + +
    + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/Settings.template.php b/Themes/modern/Settings.template.php new file mode 100644 index 0000000..8082bff --- /dev/null +++ b/Themes/modern/Settings.template.php @@ -0,0 +1,189 @@ + 'show_board_desc', + 'label' => $txt[732], + ), + array( + 'id' => 'show_children', + 'label' => $txt['show_children'], + ), + array( + 'id' => 'show_no_avatars', + 'label' => $txt['show_no_avatars'], + ), + array( + 'id' => 'show_no_signatures', + 'label' => $txt['show_no_signatures'], + ), + array( + 'id' => 'show_no_censored', + 'label' => $txt['show_no_censored'], + ), + array( + 'id' => 'return_to_post', + 'label' => $txt['return_to_post'], + ), + array( + 'id' => 'view_newest_first', + 'label' => $txt['recent_posts_at_top'], + ), + array( + 'id' => 'view_newest_pm_first', + 'label' => $txt['recent_pms_at_top'], + ), + array( + 'id' => 'popup_messages', + 'label' => $txt['popup_messages'], + ), + array( + 'id' => 'copy_to_outbox', + 'label' => $txt['copy_to_outbox'], + ), + array( + 'id' => 'auto_notify', + 'label' => $txt['auto_notify'], + ), + array( + 'id' => 'calendar_start_day', + 'label' => $txt['calendar_start_day'], + 'options' => array( + 0 => $days[0], + 1 => $days[1], + ), + ), + array( + 'id' => 'display_quick_reply', + 'label' => $txt['display_quick_reply'], + 'options' => array( + 0 => $txt['display_quick_reply1'], + 1 => $txt['display_quick_reply2'], + 2 => $txt['display_quick_reply3'] + ), + ), + array( + 'id' => 'display_quick_mod', + 'label' => $txt['display_quick_mod'], + 'options' => array( + 0 => $txt['display_quick_mod_none'], + 1 => $txt['display_quick_mod_check'], + 2 => $txt['display_quick_mod_image'], + ), + ), + ); +} + +function template_settings() +{ + global $context, $settings, $options, $scripturl, $txt; + + $context['theme_settings'] = array( + array( + 'id' => 'number_recent_posts', + 'label' => $txt['number_recent_posts'], + 'description' => $txt['number_recent_posts_desc'], + 'type' => 'number', + ), + array( + 'id' => 'display_who_viewing', + 'label' => $txt['who_display_viewing'], + 'options' => array( + 0 => $txt['who_display_viewing_off'], + 1 => $txt['who_display_viewing_numbers'], + 2 => $txt['who_display_viewing_names'], + ), + ), + array( + 'id' => 'smiley_sets_default', + 'label' => $txt['smileys_default_set_for_theme'], + 'options' => $context['smiley_sets'], + ), + array( + 'id' => 'show_modify', + 'label' => $txt[383], + ), + array( + 'id' => 'show_member_bar', + 'label' => $txt[510], + ), + array( + 'id' => 'linktree_link', + 'label' => $txt[522], + ), + array( + 'id' => 'show_profile_buttons', + 'label' => $txt[523], + ), + array( + 'id' => 'show_mark_read', + 'label' => $txt[618], + ), + array( + 'id' => 'linktree_inline', + 'label' => $txt['smf105'], + 'description' => $txt['smf106'], + ), + array( + 'id' => 'show_sp1_info', + 'label' => $txt['smf200'], + ), + array( + 'id' => 'allow_no_censored', + 'label' => $txt['allow_no_censored'], + ), + array( + 'id' => 'show_bbc', + 'label' => $txt[740], + ), + array( + 'id' => 'additional_options_collapsable', + 'label' => $txt['additional_options_collapsable'], + ), + array( + 'id' => 'enable_news', + 'label' => $txt[379], + ), + array( + 'id' => 'show_newsfader', + 'label' => $txt[387], + ), + array( + 'id' => 'newsfader_time', + 'label' => $txt[739], + 'type' => 'number', + ), + array( + 'id' => 'show_user_images', + 'label' => $txt[384], + ), + array( + 'id' => 'show_blurb', + 'label' => $txt[385], + ), + array( + 'id' => 'show_latest_member', + 'label' => $txt[382], + ), + array( + 'id' => 'use_image_buttons', + 'label' => $txt[521], + ), + array( + 'id' => 'show_gender', + 'label' => $txt[386], + ), + array( + 'id' => 'hide_post_group', + 'label' => $txt['hide_post_group'], + 'description' => $txt['hide_post_group_desc'], + ), + ); +} + +?> \ No newline at end of file diff --git a/Themes/modern/SplitTopics.template.php b/Themes/modern/SplitTopics.template.php new file mode 100644 index 0000000..781620a --- /dev/null +++ b/Themes/modern/SplitTopics.template.php @@ -0,0 +1,495 @@ + + + + + + + + +
    ', $txt['smf251'], '
    + :
    +
    + ', $txt['smf255'], '
    + ', $txt['smf256'], '
    + ', $txt['smf257'], '
    +
    + +
    + + '; +} + +function template_main() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + +
    ' . $txt['smf251'] . '
    + ' . $txt['smf259'] . '

    + ' . $txt[101] . '
    + ' . $txt['smf260'] . '
    + ' . $txt['smf258'] . ' +
    '; +} + +function template_select() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + '; + foreach ($context['messages'] as $message) + echo ' + + + '; + echo ' +
    + ' . $txt['smf251'] . ' - ' . $txt['smf257'] . ' +
    + ' . $txt['smf261'] . ' +
    + ' . $txt[139] . ': ' . $context['page_index'] . ' +
    + + ' . $message['subject'] . ' - ' . $message['poster'] . '
    + ' . $message['body'] . ' +
    +
    +

    + + +

    + +
    '; +} + +function template_merge_done() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + +
    ' . $txt['smf252'] . '
    +
    + ' . $txt['smf264'] . '
    +
    + ' . $txt[101] . '
    + ' . $txt['smf265'] . ' +
    '; +} + +function template_merge() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + + + + + + + +
    ' . $txt['smf252'] . '
    ' . $txt['smf276'] . '
    + + +
    ' . $txt[139] . ': ' . $context['page_index'] . '
    +
    + + + + + + + + + + + +

    ' . $txt['smf266'] . ':

    ' . $context['origin_subject'] . '

    ' . $txt['smf267'] . ':
    +
    + +

    ' . $txt['smf269'] . ':
    +
    + '; + foreach ($context['topics'] as $topic) + echo ' + + + + '; + echo ' +
    + ' . ($settings['use_image_buttons'] ? '' . $txt['smf252'] . '' : $txt['smf252']) . '  + + ' . $topic['subject'] . ' ' . $txt[109] . ' ' . $topic['poster']['link'] . ' +
    +
    +
    + + +
    ' . $txt[139] . ': ' . $context['page_index'] . '
    +
    +
    '; +} + +function template_merge_extra_options() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + '; + + if (!empty($context['boards'])) + { + echo ' + + + + + '; + } + if (!empty($context['polls'])) + { + echo ' + + + + + '; + } + echo ' + + + +
    ' . $txt['smf252'] . '
    ' . $txt['merge_topic_list'] . '
    + + + + + + + + '; + foreach ($context['topics'] as $topic) + echo ' + + + + + + + '; + echo ' +
    ' . $txt['merge_check'] . '' . $txt[70] . '' . $txt[109] . '' . $txt[111] . '' . $txt['merge_include_notifications'] . '
    + + + ' . $topic['subject'] . ' + + ' . $topic['started']['link'] . '
    + ' . $topic['started']['time'] . ' +
    + ' . $topic['updated']['link'] . '
    + ' . $topic['updated']['time'] . ' +
    + +
    +
    +
    '; + + echo ' + ', $txt['merge_select_subject'], ':
    +
    + ', $txt['merge_enforce_subject'], ' +
    ' . $txt['merge_select_target_board'] . '
    '; + foreach ($context['boards'] as $board) + echo ' + + + '; + echo ' +
    + ' . $board['name'] . ' +
    ' . $txt['merge_select_poll'] . '
    '; + foreach ($context['polls'] as $poll) + echo ' + + + '; + echo ' + + + +
    + ' . $poll['question'] . ' (' . $txt[118] . ': ' . $poll['topic']['subject'] . ') +
    + (' . $txt['merge_no_poll'] . ') +
    + + +
    +
    '; +} + +function template_link_done() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + + + +
    ' . $txt['smf252'] . '
    +
    + ' . $txt['smf264'] . '
    +
    + ' . $txt[101] . '
    + ' . $txt['smf265'] . ' +
    '; +} + +function template_link() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + + + + + + + + + +
    ' . $txt['link_topics'] . '
    ' . $txt['link_topicvs_exlain']. '
    + + +
    ' . $txt[139] . ': ' . $context['page_index'] . '
    +
    + + + + + + + + + + + +

    ' . $context['origin_subject'] . '

    ' . $txt['smf267'] . ':
    +
    + +

    ' . $txt['smf269'] . ':
    +
    + '; + foreach ($context['topics'] as $topic) + echo ' + + + + '; + echo ' +
    + ' . ($settings['use_image_buttons'] ? '' . $txt['smf252'] . '' : $txt['smf252']) . '  + + ' . $topic['subject'] . ' ' . $txt[109] . ' ' . $topic['poster']['link'] . ' +
    +
    +
    + + +
    ' . $txt[139] . ': ' . $context['page_index'] . '
    +
    +
    '; +} + +/*function template_link_extra_options() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    + + + + + + + + '; + + if (!empty($context['boards'])) + { + echo ' + + + + + '; + } + if (!empty($context['polls'])) + { + echo ' + + + + + '; + } + echo ' + + + +
    ' . $txt['smf252'] . '
    ' . $txt['merge_topic_list'] . '
    + + + + + + + + '; + foreach ($context['topics'] as $topic) + echo ' + + + + + + + '; + echo ' +
    ' . $txt['merge_check'] . '' . $txt[70] . '' . $txt[109] . '' . $txt[111] . '' . $txt['merge_include_notifications'] . '
    + + + ' . $topic['subject'] . ' + + ' . $topic['started']['link'] . '
    + ' . $topic['started']['time'] . ' +
    + ' . $topic['updated']['link'] . '
    + ' . $topic['updated']['time'] . ' +
    + +
    +
    +
    '; + + echo ' + ', $txt['merge_select_subject'], ':
    +
    + ', $txt['merge_enforce_subject'], ' +
    ' . $txt['merge_select_target_board'] . '
    '; + foreach ($context['boards'] as $board) + echo ' + + + '; + echo ' +
    + ' . $board['name'] . ' +
    ' . $txt['merge_select_poll'] . '
    '; + foreach ($context['polls'] as $poll) + echo ' + + + '; + echo ' + + + +
    + ' . $poll['question'] . ' (' . $txt[118] . ': ' . $poll['topic']['subject'] . ') +
    + (' . $txt['merge_no_poll'] . ') +
    + + +
    +
    '; +} +*/ +?> \ No newline at end of file diff --git a/Themes/modern/Stats.template.php b/Themes/modern/Stats.template.php new file mode 100644 index 0000000..41f6f8f --- /dev/null +++ b/Themes/modern/Stats.template.php @@ -0,0 +1,233 @@ + + + ', theme_linktree(), ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ', $context['page_title'], '
    ', $txt['smf_stats_2'], '
    + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt[488], ':', $context['show_member_list'] ? '' . $context['num_members'] . '' : $context['num_members'], '
    ', $txt[489], ':', $context['num_posts'], '
    ', $txt[490], ':', $context['num_topics'], '
    ', $txt[658], ':', $context['num_categories'], '
    ', $txt['users_online'], ':', $context['users_online'], '
    ', $txt[888], ':', $context['most_members_online']['number'], ' - ', $context['most_members_online']['date'], '
    ', $txt['users_online_today'], ':', $context['online_today'], '
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    ', $txt['average_members'], ':', $context['average_members'], '
    ', $txt['average_posts'], ':', $context['average_posts'], '
    ', $txt['average_topics'], ':', $context['average_topics'], '
    ', $txt[665], ':', $context['num_boards'], '
    ', $txt[656], ':', $context['latest_member']['link'], '
    ', $txt['average_online'], ':', $context['average_online'], '
    ', $txt['gender_ratio'], ':', $context['gender']['ratio'], '
    +
    ', $txt['smf_stats_3'], '', $txt['smf_stats_4'], '
    + '; + foreach ($context['top_posters'] as $poster) + echo ' + + + + + '; + echo ' +
    ', $poster['link'], '', $poster['num_posts'] > 0 ? '' : ' ', '', $poster['num_posts'], '
    +
    + '; + foreach ($context['top_boards'] as $board) + echo ' + + + + + '; + echo ' +
    ', $board['link'], '', $board['num_posts'] > 0 ? '' : ' ', '', $board['num_posts'], '
    +
    ', $txt['smf_stats_11'], '', $txt['smf_stats_12'], '
    + '; + foreach ($context['top_topics_replies'] as $topic) + echo ' + + + + + '; + echo ' +
    ', $topic['link'], '', $topic['num_replies'] > 0 ? '' : ' ', '', $topic['num_replies'], '
    +
    + '; + foreach ($context['top_topics_views'] as $topic) + echo ' + + + + + '; + echo ' +
    ', $topic['link'], '', $topic['num_views'] > 0 ? '' : ' ', '', $topic['num_views'], '
    +
    ', $txt['smf_stats_15'], '', $txt['smf_stats_16'], '
    + '; + foreach ($context['top_starters'] as $poster) + echo ' + + + + + '; + echo ' +
    ', $poster['link'], '', $poster['num_topics'] > 0 ? '' : ' ', '', $poster['num_topics'], '
    +
    + '; + foreach ($context['top_time_online'] as $poster) + echo ' + + + + + '; + echo ' +
    ', $poster['link'], '', $poster['time_online'] > 0 ? '' : ' ', '', $poster['time_online'], '
    +
    ', $txt['smf_stats_5'], '
    '; + + if (!empty($context['monthly'])) + { + echo ' + + + + + + + '; + if (!empty($modSettings['hitStats'])) + echo ' + '; + echo ' + '; + + foreach ($context['monthly'] as $month) + { + echo ' + + + + + + '; + if (!empty($modSettings['hitStats'])) + echo ' + '; + echo ' + '; + + if ($month['expanded']) + { + foreach ($month['days'] as $day) + { + echo ' + + + + + + '; + if (!empty($modSettings['hitStats'])) + echo ' + '; + echo ' + '; + } + } + } + echo ' +
    ', $txt['smf_stats_13'], '', $txt['smf_stats_7'], '', $txt['smf_stats_8'], '', $txt['smf_stats_9'], '', $txt['smf_stats_14'], '', $txt['smf_stats_10'], '
    + ', $month['link'], ' + ', $month['new_topics'], '', $month['new_posts'], '', $month['new_members'], '', $month['most_members_online'], '', $month['hits'], '
    ', $day['year'], '-', $day['month'], '-', $day['day'], '', $day['new_topics'], '', $day['new_posts'], '', $day['new_members'], '', $day['most_members_online'], '', $day['hits'], '
    '; + } + + echo ' +
    '; +} + +?> diff --git a/Themes/modern/Themes.template.php b/Themes/modern/Themes.template.php new file mode 100644 index 0000000..bdb2dcf --- /dev/null +++ b/Themes/modern/Themes.template.php @@ -0,0 +1,488 @@ + + + + + + + '; + + // Show each theme.... with X for delete and a link to settings. + foreach ($context['themes'] as $theme) + { + echo ' + + + + '; + } + + echo ' +
    ', $txt['theme4'], '
    ', $theme['name'], ''; + + // You *cannot* delete the default theme. It's important! + if ($theme['id'] != 1) + echo ' + ', $txt['theme_remove'], ''; + + echo ' +
    '; + + // Show all the basic theme settings - like allowing users to select them, etc. + echo ' +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ', $txt[119], ' + ', $txt['themeadmin_title'], ' +
    ', $txt['themeadmin_explain'], '
    ', $txt['theme_allow'], '
    ', $txt['theme_default'], '
    ', $txt['theme_guests'], ': + +   ', $txt['theme_select'], '
    ', $txt['theme_reset'], ': + +   ', $txt['theme_select'], '
    + +
    '; + + // Warn them if theme creation isn't possible! + if (!$context['can_create_new']) + echo ' + ', $txt['theme_install_writable'], '

    '; + + echo ' +
    + + + + '; + + // Here's a little box for installing a new theme. + if ($context['can_create_new']) + echo ' + + + + '; + + echo ' + + + + + + '; + + if ($context['can_create_new']) + echo ' + + + + + + '; + + echo ' + +
    ', $txt[119], ' ', $txt['theme_install'], '
    :
    :
    + +
    + +
    '; + + // And lastly, link to simplemachines.org for latest themes and info! + echo ' + + + + + + + +
    ', $txt[119], ' ', $txt['theme_latest'], '
    ', $txt['theme_latest_fetch'], '
    + + + + +'; + + // Gotta love IE4, and its hatefulness... + if ($context['browser']['is_ie4']) + echo ' + '; + else + echo ' + '; +} + +// This template allows for the selection of different themes ;). +function template_pick() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Just go through each theme and show its information - thumbnail, etc. + foreach ($context['available_themes'] as $theme) + echo ' + + + + + + + + +
    + + ', $theme['description'], ' +
    +
    ', $theme['num_users'], ' ', ($theme['num_users'] == 1 ? $txt['theme_user'] : $txt['theme_users']), '
    + ', $txt['theme_set'], ' | + ', $txt['theme_preview'], ' +
    +
    '; +} + +// Okay, that theme was installed successfully! +function template_installed() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Not much to show except a link back... + echo ' + + + + + + + +
    ', $context['page_title'], '
    + ', $context['installed_theme']['name'], ' ', $txt['theme_installed_message'], '
    +
    + ', $txt[250], ' +
    '; +} + +// Wanna edit the stylesheet? +function template_edit_style() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Just show a big box.... grey out the Save button if it's not saveable... (ie. not 777.) + echo ' +
    + ', $context['session_error'] ? ' + + + ' : '', ' + + + + + + +
    +
    + ' . $txt['error_session_timeout'] . ' +
    +
    ', $txt['theme_edit'], '
    '; + + if (!$context['allow_save']) + echo ' + ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
    '; + + echo ' +
    + +
    + +
    '; +} + +// This edits the template... +function template_edit_template() +{ + global $context, $settings, $options, $scripturl, $txt; + + // Not much to do here either, just a save button that can be disabled... + echo ' +
    + ', $context['session_error'] ? ' + + + ' : '', ' + + + + + + +
    +
    + ' . $txt['error_session_timeout'] . ' +
    +
    ', $txt['theme_edit'], '
    '; + + if (!$context['allow_save']) + echo ' + ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
    '; + + echo ' +
    + +
    + +
    '; +} + +function template_set_settings() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + '; + + if ($context['theme_settings']['theme_id'] != 1) + echo ' + + + + + + '; + + echo ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + + foreach ($context['settings'] as $setting) + { + echo ' + + + '; + } + + echo ' + + + +
    ', $txt[119], ' ', $txt['theme4'], ' - ', $context['theme_settings']['name'], '
    ', $txt['theme_edit'], '
    + ', $txt['theme_edit_index'], '
    + ', $txt['theme_edit_style'], '
    +
    +
    ', $txt['theme5'], '
    ', $txt['actual_theme_name'], '
    ', $txt['actual_theme_url'], '
    ', $txt['actual_images_url'], '
    ', $txt['actual_theme_dir'], '
    ', $txt['theme6'], '
    ', $txt['theme_options_defaults_link'], '
    ', $txt['theme_options_reset_link'], '
    '; + + if ($setting['type'] == 'checkbox') + echo ' + + '; + elseif ($setting['type'] == 'list') + { + echo ' + + '; + } + else + echo ' + + '; + + if (isset($setting['description'])) + echo ' +
    ', $setting['description'], '
    '; + + echo ' +

    + +
    '; +} + +function template_set_options() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + + + + + + + '; + + foreach ($context['options'] as $setting) + { + echo ' + + + '; + } + + echo ' + + + + + + +
    ', $txt['theme_options_title'], ' - ', $context['theme_settings']['name'], '
    ', $context['theme_options_reset'] ? $txt['theme_options_reset'] : $txt['theme_options_defaults'], '
    '; + + if ($context['theme_options_reset']) + echo ' + '; + + if ($setting['type'] == 'checkbox') + { + echo ' + + '; + } + elseif ($setting['type'] == 'list') + { + echo ' + + '; + } + else + echo ' + + '; + + if (isset($setting['description'])) + echo ' +
    ', $setting['description'], '
    '; + + echo ' +
    ', $txt['theme_settings_link'], '

    + +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/Viewkarma.template.php b/Themes/modern/Viewkarma.template.php new file mode 100644 index 0000000..f45e897 --- /dev/null +++ b/Themes/modern/Viewkarma.template.php @@ -0,0 +1,156 @@ +', theme_linktree(), ' +
    + + + + '; if ($user_info['is_admin']) echo ' '; echo ' + + '; + $WhatPageIsIt = $_SERVER["QUERY_STRING"]; + if (isset($_REQUEST['u'])) $UserViewing = $_REQUEST['u']; + if(strstr($WhatPageIsIt, "viewkarma")){ $WhatPage='viewkarma';} + elseif(strstr($WhatPageIsIt, "otherkarma")){ $WhatPage='otherkarma;u='.$UserViewing;} + else{$WhatPage='ownkarma;u='.$UserViewing.'';} + echo' + + + + + '; if (!empty($modSettings['karmaurl'])) echo ''; echo ' + + '; if ($user_info['is_admin']) echo ' '; echo ' + '; + + // . + foreach ($context['karma_changes'] as $member) + +if (!empty($modSettings['karmalogview']) && ($user_info['is_admin']) || (empty($modSettings['karmalogview'])) && ($user_info['is_admin'])) +{ + echo ' + + + + + + '; + if (!empty($modSettings['karmaurl'])) + echo ''; + echo ' + + '; +} +elseif (!empty($modSettings['karmalogview'])) +{ + echo ' + + + + + '; + if (!empty($modSettings['karmaurl'])) + echo ''; + echo ' + '; +} +else +{ + echo ' + + + + + + + + '; +} + // + echo' + + '; + if ($user_info['is_admin']) echo ' '; echo ' + + + '; + if ($user_info['is_admin']) echo ' '; echo ' + +
    ', $txt['karmaview'], '
    ', $txt['karmawho'], '', $context['sort_by'] == 'exec' ? '' : '', '', $txt['karmawhos'],'', $context['sort_by'] == 'targ' ? '' : '', '', $txt['karmawhat'],'', $context['sort_by'] == 'action' ? '' : '', '', $txt['karmadesc'],'', $txt['karmawhere'],'', $txt['karmatime'],'', $context['sort_by'] == 'time' ? '' : '', 'Delete
    ' . $member['executor'] . ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['executorkarmagood'],'/-',$member['executorkarmabad'],')'; + echo '' . $member['target'] . ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['targetkarmagood'],'/-',$member['targetkarmabad'],')'; + echo '', $member['action'], '', $member['Description'], '',$member['link']!='PM' ? ''.$txt['karmawhereurl'].'' : $txt['karmawhereurl2'],'', $member['time'], '
    ' . $member['executor'] . ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['executorkarmagood'],'/-',$member['executorkarmabad'],')'; + echo '' . $member['target'] . ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['targetkarmagood'],'/-',$member['targetkarmabad'],')'; + echo '', $member['action'], '', $member['Description'], ''.$txt['karmawhereurl'].'', $member['time'], '
    ' , $member['executor'] , ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['executorkarmagood'],'/-',$member['executorkarmabad'],')'; + echo '' , $member['target'] , ''; + if (!empty($modSettings['karmakarma'])) + echo' (+',$member['targetkarmagood'],'/-',$member['targetkarmabad'],')'; + echo '', $member['action'], '', $member['Description'], ''.$txt['karmawhereurl'].'', $member['time'], '
    (',$txt['karmanumb'].$context['totalActions'],')
    ', $txt[139], ': ', $context['page_index'] , '
    '; + + // + if (!empty($modSettings['karmaotherstat'])) + { + echo ' + + + + + + + + + + + + +
    ', $txt['karma_stat'], ' +
    ',$txt['karma_other_stat'],'',$txt['karma_top_applaud'],'',$txt['karma_top_smite'],'
    + + + + + + + + +
    ',$txt['karma_max_appl'],'',$context['memidappl'],' + [',$context['memidapplcount'],']
    ',$txt['karma_max_smit'],'',$context['memidsmit'],' - [',$context['memidsmitcount'],']
    ',$txt['karma_today'],'',$context['today_point'] ,'
    ',$txt['karma_today_plus'],'',$context['today_plus'] ,'
    ',$txt['karma_today_minus'],'',$context['today_minus'] ,'
    + '; + foreach ($context['top_applaud'] as $applauder) + echo ' + + + + '; + echo '
    ', $applauder['link'], '', $applauder['num_karma'] > 0 ? '' : ' ', '+ ', $applauder['num_karma'], '
    + '; + foreach ($context['top_smite'] as $smiter) + echo ' + + + + '; + echo '
    ', $smiter['link'], '', $smiter['num_karma'] > 0 ? '' : ' ', '- ', $smiter['num_karma'], '
    '; + } + + +} +?> diff --git a/Themes/modern/VisualWarning.template.php b/Themes/modern/VisualWarning.template.php new file mode 100644 index 0000000..33df07c --- /dev/null +++ b/Themes/modern/VisualWarning.template.php @@ -0,0 +1,250 @@ + + + + ' . $txt['visual_warning_management'] . ' + + '; + if (!isset($context['previous'])) + echo' + + + ' . $txt['visual_no_warnings'] . ' + + '; + else + { + echo' + + + ' . $txt['visual_prev_warning'] . ' + + + + + ' . $txt['visual_current_level'] . ' + + + '; + if ($context['previous']['level'] == 0) + echo $txt['visual_none']; + elseif ($context['previous']['level'] == 1) + echo $txt['visual_text_warn']; + elseif ($context['previous']['level'] == 2) + echo $txt['visual_text_pmod']; + elseif ($context['previous']['level'] == 3) + echo $txt['visual_text_mute']; + else + echo $txt['visual_text_ban']; + echo' + + + + + ' . $txt['visual_topic_raised'] . ' + + + ' . $context['previous']['body'] . ' + + + + ' . $txt['visual_time_raised'] . ' + + + ' . $context['previous']['time'] . ' + + + + ' . $txt['visual_reason_raised'] . ' + + + ' . $context['previous']['warningtext'] . ' + + '; + } + echo' + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + ' . $txt['visual_level_details'] . ' +
    + ' . $txt['visual_new_level'] . ' + + ' . $txt['visual_stages'] . ' +
    + ' . $txt['visual_lasts'] . ': + + +
    + ' . $txt['visual_reason_raised'] . ' + + +
    + +
    +
    '; + +} + +function template_list_warnings() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + echo' +
    + + + + + + + + + + + + + '; + foreach ($context['warnings'] as $warning) + echo' + + + + + + + '; + echo' + + + +
    + +  ' . $txt['visual_warning_management'] . ' +
    + ' . $txt['visual_list_desc'] . ' +
    + + ' . $txt['visual_member'] . ' + + ' . $txt['visual_level'] . ' + + ' . $txt['visual_reason'] . ' + + ' . $txt['visual_when'] . ' +
    + + + ' . $warning['memberName'] . ' (' . $warning['realName'] . ') + + ' . $warning['level'] . ' + + ' . $warning['warningText'] . ' + + ' . $warning['time'] . ' +
    + +
    +
    '; +} + +function template_pmod_manager() +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + echo' +
    + + + + + + + + + + '; + foreach ($context['posts'] as $post) + { + echo' + + + + + '; + } + echo' + + + +
    + +  ' . $txt['visual_postmod_manager'] . ' +
    + ' . $txt['visual_postmod_awaiting'] . ' +
    + + ' . $txt['visual_postmod_username'] . ' + + ' . $txt['visual_postmod_subject'] . ' +
    + + + ' . $post['memberName'] . ' (' . $post['realName'] . ') + + + + + + + + +
    + ' . $post['subject'] . ($post['ID_POLL'] != -1 && $post['ID_POLL'] != 0 ? '(POLL)' : '') . ' +
    + ' . $post['body'] . ' +
    +
    + + + +
    +
    + + + + +
    + ' . $context['pageIndex'] . ' +
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/Who.template.php b/Themes/modern/Who.template.php new file mode 100644 index 0000000..abefdec --- /dev/null +++ b/Themes/modern/Who.template.php @@ -0,0 +1,64 @@ +', theme_linktree(), ' + + + + + + '; + + // This is used to alternate the color of the background. + $alternate = true; + + // For every member display their name, time and action (and more for admin). + foreach ($context['members'] as $member) + { + // $alternate will either be true or false. If it's true, use "windowbg2" and otherwise use "windowbg". + echo ' + + + + + '; + + // Switch alternate to whatever it wasn't this time. (true -> false -> true -> false, etc.) + $alternate = !$alternate; + } + + echo ' + + + +
    ', $txt['who_user'], ' ', $context['sort_by'] == 'user' ? '' : '', '', $txt['who_time'], ' ', $context['sort_by'] == 'time' ? '' : '', '', $txt['who_action'], '
    '; + + // Guests don't have information like icq, msn, y!, and aim... and they can't be messaged. + if (!$member['is_guest']) + { + echo ' +
    + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $member['online']['text'] . '' : $member['online']['text'], $context['can_send_pm'] ? '' : '', ' + ', $member['icq']['link'], ' ', $member['msn']['link'], ' ', $member['yim']['link'], ' ', $member['aim']['link'], ' +
    '; + } + + echo ' + ', $member['is_guest'] ? $member['name'] : '' . $member['name'] . '', ''; + + if (!empty($member['ip'])) + echo ' + (' . $member['ip'] . ')'; + + echo ' +
    ', $member['time'], '', $member['action'], '
    ', $txt[139], ': ', $context['page_index'], '
    '; +} + +?> \ No newline at end of file diff --git a/Themes/modern/Wireless.template.php b/Themes/modern/Wireless.template.php new file mode 100644 index 0000000..f2b73f5 --- /dev/null +++ b/Themes/modern/Wireless.template.php @@ -0,0 +1,498 @@ + + +'; +} + +// This is the board index (main page) in WAP 1.1. +function template_wap_boardindex() +{ + global $context, $settings, $options, $scripturl; + + // This is the "main" card... + echo ' + +

    ', $context['forum_name'], '

    '; + + // Show an anchor for each category. + foreach ($context['categories'] as $category) + echo ' +

    ', $category['name'], '

    '; + + // Okay, that's it for the main card. + echo ' +
    '; + + // Now fill out the deck of cards with the boards in each category. + foreach ($context['categories'] as $category) + { + // Begin the card, and make the name available. + echo ' + +

    ', $category['name'], '

    '; + + // Now show a link for each board. + foreach ($category['boards'] as $board) + echo ' +

    ', $board['name'], '

    '; + + echo ' +
    '; + } +} + +// This is the message index (list of topics in a board) for WAP 1.1. +function template_wap_messageindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + +

    ', $context['name'], '

    +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + + if (isset($context['boards']) && count($context['boards']) > 0) + { + foreach ($context['boards'] as $board) + echo ' +

    - ' . $board['name'] . '

    '; + echo ' +


    '; + } + + if (!empty($context['topics'])) + foreach ($context['topics'] as $topic) + echo ' +

    ' . $topic['first_post']['subject'] . ' - ' . $topic['first_post']['member']['name'] . '

    '; + + echo ' +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    +
    '; +} + +function template_wap_display() +{ + global $context, $settings, $options, $txt; + + echo ' + +

    ' . $context['subject'] . '

    +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + while ($message = $context['get_message']()) + { + // This is a special modification to the post so it will work on phones: + $wireless_message = strip_tags(str_replace(array('
    ', '
    ', '
    '), '
    ', $message['body']), '
    '); + + echo ' +

    ' . $message['member']['name'] . ':

    +

    ' . $wireless_message . '

    '; + } + echo ' +

    ', $txt[139], ': ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    + '; +} + +function template_wap_error() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + +

    ' . $context['error_title'] . '

    +

    ' . $context['error_message'], '

    +

    ', $txt['wireless_error_home'], '

    +
    '; +} + +function template_wap_below() +{ + global $context, $settings, $options; + + echo ' +'; +} + +// The cHTML protocol used for i-mode starts here. +function template_imode_above() +{ + global $context, $settings, $options; + + echo ' + + + + ', $context['page_title'], ' + + '; +} + +function template_imode_boardindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + '; + $count = 0; + foreach ($context['categories'] as $category) + { + echo ' + '; + foreach ($category['boards'] as $board) + { + $count++; + echo ' + '; + } + } + echo ' + '; + if ($context['user']['is_guest']) + echo ' + '; + else + echo ' + '; + echo ' +
    ' . $context['forum_name'] . '
    ' . $category['name'] . '
    ' . ($board['new'] ? '' : '') . ($count < 10 ? '&#' . (59105 + $count) . '; ' : '- ') . ($board['new'] ? '' : '') . '' . $board['name'] . '
    ', $txt['wireless_options'], '
    ', $txt['wireless_options_login'], '
    ', $txt['wireless_options_logout'], '
    '; +} + +function template_imode_messageindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' + + '; + + if (!empty($context['boards'])) + { + echo ' + '; + foreach ($context['boards'] as $board) + echo ' + '; + } + + $count = 0; + if (!empty($context['topics'])) + { + echo ' + + '; + foreach ($context['topics'] as $topic) + { + $count++; + echo ' + '; + } + } + echo ' + + ' . (!empty($context['links']['next']) ? ' + ' : '') . (!empty($context['links']['prev']) ? ' + ' : '') . ($context['can_post_new'] ? ' + ' : '') . ' +
    ' . $context['name'] . '
    ' . $txt['parent_boards'] . '
    ' . ($board['new'] ? '- ' : '- ') . '' . $board['name'] . '
    ' . $txt[64] . '
    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '
    ' . ($count < 10 ? '&#' . (59105 + $count) . '; ' : '') . '' . $topic['first_post']['subject'] . '' . ($topic['new'] && $context['user']['is_logged'] ? ' [' . $txt[302] . ']' : '') . '
    ', $txt['wireless_navigation'], '
    ' . $txt['wireless_navigation_up'] . '
    ' . $txt['wireless_navigation_next'] . '
    [*] ' . $txt['wireless_navigation_prev'] . '
    ' . $txt[33] . '
    '; +} + +function template_imode_display() +{ + global $context, $settings, $options, $scripturl, $board, $txt; + + echo ' + + + '; + while ($message = $context['get_message']()) + { + // This is a special modification to the post so it will work on phones: + $wireless_message = strip_tags(str_replace(array('
    ', '
    ', '
    '), '
    ', $message['body']), '
    '); + + echo ' +
    '; + } + echo ' + + ' . (!empty($context['links']['next']) ? ' + ' : '') . (!empty($context['links']['prev']) ? ' + ' : '') . ($context['can_reply'] ? ' + ' : '') . ' +
    ' . $context['subject'] . '
    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '
    ' . ($message['first_new'] ? ' + ' : '') . ' + ' . $message['member']['name'] . ':
    + ' . $wireless_message . ' +
    ', $txt['wireless_navigation'], '
    ' . $txt['wireless_navigation_index'] . '
    ' . $txt['wireless_navigation_next'] . '
    ' . $txt['wireless_navigation_prev'] . '
    ' . $txt[146] . '
    '; +} + +function template_imode_post() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + ' . ($context['locked'] ? ' + ' : '') . (isset($context['name']) ? ' + + ' : '') . (isset($context['email']) ? ' + + ' : '') . ' + + + + + + +
    ' . $txt['smf287'] . '
    ' . (isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) ? '' . $txt[35] . '' : $txt[35]) . ':
    ' . (isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? '' . $txt[69] . '' : $txt[69]) . ':
    ' . (isset($context['post_error']['no_subject']) ? '' . $txt[70] . '' : $txt[70]) . ':
    ' . (isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? '' . $txt[72] . '' : $txt[72]) . ':
    + + + + + ' . (isset($context['current_topic']) ? ' + ' : '') . ' + +
    +  ' . (isset($context['current_topic']) ? '' . $txt['wireless_navigation_topic'] . '' : '' . $txt['wireless_navigation_index'] . '') . ' +
    +
    '; +} + +function template_imode_login() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    + + '; + if (isset($context['login_error'])) + echo ' + '; + echo ' + + + + + + + +
    ' . $txt[34] . '
    ' . $context['login_error'] . '
    ' . $txt[35] . ':
    ' . $txt[36] . ':
    ' . $txt['wireless_navigation'] . '
    [0] ' . $txt['wireless_navigation_up'] . '
    +
    '; +} + +function template_imode_error() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' + + + + +
    ' . $context['error_title'] . '
    ' . $context['error_message'], '
    [0] ' . $txt['wireless_error_home'] . '
    '; +} + +function template_imode_below() +{ + global $context, $settings, $options; + + echo ' + +'; +} + +// XHTMLMP (XHTML Mobile Profile) templates used for WAP 2.0 start here +function template_wap2_above() +{ + global $context, $settings, $options; + + echo ' + + + + ', $context['page_title'], ' + + + '; +} + +function template_wap2_boardindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +

    ' . $context['forum_name'] . '

    '; + + $count = 0; + foreach ($context['categories'] as $category) + { + echo ' +

    ' . ($category['can_collapse'] ? '' : '') . $category['name'] . ($category['can_collapse'] ? '' : '') . '

    '; + foreach ($category['boards'] as $board) + { + $count++; + echo ' +

    ' . ($board['new'] ? '' : '') . ($count < 10 ? '[' . $count . '] ' : '[-] ') . ($board['new'] ? '' : '') . '' . $board['name'] . '

    '; + } + } + + echo ' +

    ' . $txt['wireless_options'] . '

    '; + if ($context['user']['is_guest']) + echo ' +

    ' . $txt['wireless_options_login'] . '

    '; + else + echo ' +

    ' . $txt['wireless_options_logout'] . '

    '; +} + +function template_wap2_messageindex() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +

    ' . $context['name'] . '

    '; + + if (!empty($context['boards'])) + { + echo ' +

    ' . $txt['parent_boards'] . '

    '; + foreach ($context['boards'] as $board) + echo ' +

    ' . ($board['new'] ? '[-] ' : '[-] ') . '' . $board['name'] . '

    '; + } + + $count = 0; + if (!empty($context['topics'])) + { + echo ' +

    ' . $txt[64] . '

    +

    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + foreach ($context['topics'] as $topic) + { + $count++; + echo ' +

    ' . ($count < 10 ? '[' . $count . '] ' : '') . '' . $topic['first_post']['subject'] . '' . ($topic['new'] && $context['user']['is_logged'] ? ' [' . $txt[302] . ']' : '') . '

    '; + } + } + echo ' +

    ', $txt['wireless_navigation'], '

    +

    [0] ' . $txt['wireless_navigation_up'] . '

    ' . (!empty($context['links']['next']) ? ' +

    [#] ' . $txt['wireless_navigation_next'] . '

    ' : '') . (!empty($context['links']['prev']) ? ' +

    [*] ' . $txt['wireless_navigation_prev'] . '

    ' : '') . ($context['can_post_new'] ? ' +

    ' . $txt[33] . '

    ' : ''); +} + +function template_wap2_display() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +

    ' . $context['subject'] . '

    +

    ' . (!empty($context['links']['prev']) ? '<< < ' : '') . '(' . $context['page_info']['current_page'] . '/' . $context['page_info']['num_pages'] . ')' . (!empty($context['links']['next']) ? ' > >> ' : '') . '

    '; + $alternate = true; + while ($message = $context['get_message']()) + { + // This is a special modification to the post so it will work on phones: + $wireless_message = strip_tags(str_replace(array('
    ', '
    ', '
    '), '
    ', $message['body']), '
    '); + + echo ($message['first_new'] ? ' + ' : '') . ' +

    + ' . $message['member']['name'] . ':
    + ' . $wireless_message . ' +

    '; + $alternate = !$alternate; + } + echo ' +

    ' . $txt['wireless_navigation'] . '

    +

    [0] ' . $txt['wireless_navigation_index'] . '

    ' . (!empty($context['links']['next']) ? ' +

    [#] ' . $txt['wireless_navigation_next'] . '

    ' : '') . (!empty($context['links']['prev']) ? ' +

    [*] ' . $txt['wireless_navigation_prev'] . '

    ' : '') . ($context['can_reply'] ? ' +

    ' . $txt[146] . '

    ' : ''); +} + +function template_wap2_login() +{ + global $context, $settings, $options, $scripturl, $txt; + echo ' +
    +

    ' . $txt[34] . '

    '; + if (isset($context['login_error'])) + echo ' +

    ' . $context['login_error'] . '

    '; + echo ' +

    ' . $txt[35] . ':

    +

    +

    ' . $txt[36] . ':

    +

    +

    +

    ' . $txt['wireless_navigation'] . '

    +

    [0] ' . $txt['wireless_navigation_up'] . '

    +
    '; +} + +function template_wap2_post() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo ' +
    +

    ' . $context['page_title'] . '

    ' . ($context['locked'] ? ' +

    + ' . $txt['smf287'] . ' +

    ' : '') . (isset($context['name']) ? ' +

    + ' . $txt[35] . ': +

    ' : '') . (isset($context['email']) ? ' +

    + ' . $txt[69] . ': +

    ' : '') . ' +

    + ' . $txt[70] . ': +

    +

    + ' . $txt[72] . ':
    + +

    +

    + + + + + ' . (isset($context['current_topic']) ? ' + ' : '') . ' + +

    +

    [0] ' . (isset($context['current_topic']) ? '' . $txt['wireless_navigation_topic'] . '' : '' . $txt['wireless_navigation_index'] . '') . '

    +
    '; +} + +function template_wap2_error() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +

    ' . $context['error_title'] . '

    +

    ' . $context['error_message'], '

    +

    [0] ' . $txt['wireless_error_home'] . '

    '; +} + +function template_wap2_below() +{ + global $context, $settings, $options; + + echo ' + +'; +} + +?> \ No newline at end of file diff --git a/Themes/modern/bogus.js b/Themes/modern/bogus.js new file mode 100644 index 0000000..e69de29 diff --git a/Themes/modern/bogus.php b/Themes/modern/bogus.php new file mode 100644 index 0000000..2443a70 --- /dev/null +++ b/Themes/modern/bogus.php @@ -0,0 +1,4 @@ += 510) + smfFadeSwitch = !smfFadeSwitch; + // All the way faded out? + else if (smfFadePercent <= -64) + { + smfFadeSwitch = !smfFadeSwitch; + + // Go to the next item, or first if we're out of items. + setInnerHTML(smfFadeScroller, smfFadeBefore + smfFadeContent[smfFadeIndex++] + smfFadeAfter); + if (smfFadeIndex >= smfFadeContent.length) + smfFadeIndex = 0; + } + + // Increment or decrement the fade percentage. + if (smfFadeSwitch) + smfFadePercent -= 255 / smfFadeDelay; + else + smfFadePercent += 255 / smfFadeDelay; + + // If it's not outside 0 and 256... (otherwise it's just delay time.) + if (smfFadePercent < 256 && smfFadePercent > 0) + { + // Easier... also faster... + var tempPercent = smfFadePercent / 255; + + // Get the new R, G, and B. (it should be bottom + (range of color * percent)...) + var r = Math.ceil(smfFadeTo.r + smfFadeRange.r * tempPercent); + var g = Math.ceil(smfFadeTo.g + smfFadeRange.g * tempPercent); + var b = Math.ceil(smfFadeTo.b + smfFadeRange.b * tempPercent); + + // Set the color in the style, thereby fading it. + smfFadeScroller.style.color = 'rgb(' + r + ', ' + g + ', ' + b + ')'; + } + + // Keep going... + window.setTimeout('smfFader()', 10); +} \ No newline at end of file diff --git a/Themes/modern/fonts-compat.css b/Themes/modern/fonts-compat.css new file mode 100644 index 0000000..a58f0ae --- /dev/null +++ b/Themes/modern/fonts-compat.css @@ -0,0 +1,16 @@ +body, td, .normaltext, .windowbg, .windowbg2, .titlebg, .bordercolor, .tborder, .catbg, .catbg2, .windowbg td, .windowbg2 td, .titlebg td +{ + font-size: x-small; +} +.smalltext, td.smalltext, i.smalltext, div.smalltext, .smalltext td, .quote, .quoteheader, .codeheader +{ + font-size: xx-small; +} +.largetext +{ + font-size: medium; +} +.code +{ + font-size: xx-small; +} \ No newline at end of file diff --git a/Themes/modern/help/help.css b/Themes/modern/help/help.css new file mode 100644 index 0000000..93ef7db --- /dev/null +++ b/Themes/modern/help/help.css @@ -0,0 +1,84 @@ +body, td +{ + font-family: verdana, arial, helvetica, sans-serif; + font-size: 12px; +} +body +{ + margin: 20px; + line-height: 1.5; +} +h1, h2, h3, h4, h5, h6 +{ + font-family: arial, helvetica, sans-serif; +} +h1, h2 +{ + font-size: 18px; + margin-bottom: 0.5em; +} +h3, h4, h5, h6 +{ + font-size: 16px; + margin: 0; +} +p +{ + margin: 0 0 1.5em 0; +} +a:link, a:visited, a:active, a:hover +{ + color: #0000cc; + background-color : transparent; +} +.board, .board:link +{ + color: #000000; + text-decoration: underline; +} +.board:visited, .board:hover +{ + color: #323232; + text-decoration: underline; +} +div.footer +{ + text-align: center; + color: #6f6f6f; + padding: 3pt; +} +.smalltext +{ + font-size: 10px; +} +#menu +{ + line-height: 1; +} +#menu p +{ + margin: 0 0 1em 0; + line-height: 2; +} +table#reference1, table#reference2 +{ + border: 1px solid #cccccc; +} +table#reference1 td, table#reference2 td +{ + vertical-align: top; + background-color: #efefef; + border: 1px solid #cccccc; +} +th +{ + color: white; + background-color: #6b8eae; + border: 1px solid #6b8eae; + font-weight: bold; + text-align: left; +} +ol.la +{ + list-style-type: lower-alpha; +} \ No newline at end of file diff --git a/Themes/modern/help/index.english.html b/Themes/modern/help/index.english.html new file mode 100644 index 0000000..7757b16 --- /dev/null +++ b/Themes/modern/help/index.english.html @@ -0,0 +1,382 @@ + + + + + + + + + SMF User Help: Introduction + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Introduction


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    So you've arrived at this Simple Machines Forum (SMF)! Perhaps you've been looking at the board index or a screen telling you that you need to register before you can read it and you're wondering what to do next?

    +

    Well, some forums permit guests to read and post, some permit guests to read only and some are restricted to registered members. We'd recommend registering at any forum that you see yourself using regularly because many of the most useful features will only become available to you when you do so. Since SMF, however, is such a flexible system that few forums are likely to be identical, we will start by describing four key areas that we'd normally expect to be there for you:

    +
      +
    1. The Main Menu
    2. +
    3. The Board Index
    4. +
    5. The Message Index
    6. +
    7. The Topic
    8. +
    +

    The Main Menu

    +

    Supposing you've arrived here as a guest (or have registered but are currently logged out), the main menu (which appears on every page) should normally comprise five or six buttons (or text links):

    +
      +
    • Home, which takes you back to the board index.
    • +
    • Help, which brings you to this guide.
    • +
    • Search, which allows you to search the forums for whatever you're looking for.
    • +
    • Calendar, which links to the forum calendar (if enabled).
    • +
    • Login, which allows you to login if already registered.
    • +
    • Register, which allows you to register (or sometimes apply for registration) when you wish to do so.
    • +
    +

    Once you've registered and logged in, however, the main menu should look a little different:

    +
      +
    • Home (as before).
    • +
    • Help (as before).
    • +
    • Search (as before).
    • +
    • Profile, which allows you to make changes to your profile settings.
    • +
    • Calendar (as before).
    • +
    • Logout, which allows you to logout again if desired.
    • +
    +

    Forum administrators should also note the presence of an additional Admin button.

    +

    The Board Index

    +

    While the board index (forum home page) is packed with all kinds of information and links, the core of the interface (at least in the SMF default theme) normally looks something like this:

    +
    +
    + + + + +
    +  Forum Name
    +
    + + + + + + + + + + +
    -  Category Name
    New PostsBoard Name
    + Board Description
    Number of topics and posts in this boardDate, time, subject and author of last post
    +

    +
    + + + + + +
      New Posts  No New PostsMark ALL messages as read
    +

    +
    +

    +
      +
    • The forum name links back to the top of the board index.
    • +
    • If the category is collapsable (shown by the little arrow symbol), clicking the category name collapses or expands the category as appropriate.
    • +
    • The board name links to the message index for that board.
    • +
    • The board description describes the board's content, and may also include links to child boards and/or specify the board's moderator(s).
    • +
    • The New Posts and No New Posts icons in the leftmost column show registered members whether there have been any new posts to the board since they last read it.
    • +
    • The Mark as Read button enables registered members to mark all posts in the entire forum as 'read'.
    • +
    +

    The Message Index

    +

    Like the board index, the message index interface is quite straightforward when reduced to its essential components:

    +
    +
    + + + + + +
    +  Forum Name
    + |- +  Category Name
    + | |- +  Board Name
    + + + + +
    + + + + + +
    Pages: [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + + + + + + + + + + + + + +
    SubjectStarted byRepliesViewsLast post  
    Topic Subject NewTopic Starter00Date, time and author of last post
    + + + + +
    + + + + + +
    Pages: [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + +
      Topic you have posted in
    +   Normal Topic
    +   Hot Topic (More than 15 Replies)
    +   Very Hot Topic (More than 25 Replies)
      Locked Topic
    +   Sticky Topic
    +   Poll
    +
    + :   +
    +

    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • The page numbers link to further pages of the board, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page.
    • +
    • The Mark as Read button enables registered members to mark all posts in this board as 'read'.
    • +
    • The Notify button enables registered members to subscribe to email notification of replies to topics in this board.
    • +
    • The New Topic and New Poll buttons are for starting new topics and polls, as described in the posting help.
    • +
    • The Subject, Started by, Replies, Views and Last post links enable you to sort the columns by these parameters (with Last post also toggling between descending and ascending order as indicated by the little arrow).
    • +
    • The topic icons in the leftmost column are explained by the key below.
    • +
    • The post icons in the next column are sometimes used to draw attention to the mood or purpose of the topic.
    • +
    • The topic subject links to the start of the topic, with extra links for subsequent pages and new buttons to take registered members straight to their first unread post of the topic.
    • +
    • Where the topic has been started or last replied to by a registered member, their names link to their respective profiles.
    • +
    • The Jump to menu provides a convenient quick method of navigating the forum.
    • +
    +

    The Topic

    +

    Sometimes referred to as threads, topics are where you find the actual messages:

    +
    +
    + + + + +
    +  Forum Name
    + |- +  Category Name
    + | |- +  Board Name
    + | | |- +  Topic Subject
    + + + + +
    + + + + + +
    Pages: [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    + + + + + +
     AuthorTopic: Topic Subject  (Read x times)
    + + + + +
    + + + + +
    + + + + + + + + +
    Author
    + Member Group
    + Post Group
    + *
    + Post Count
    +
    +
    +
    + View Profile Email Personal Message (Offline)
    + + + + + + +
    + Topic Subject +
    + « Date and Time of Post » +
    +
    Reply with quote
    +
    +
    + Here is the text of the message, which is ultimately what we're all here for! Smiley +
    +
    + + + + +
    Report to moderator     Logged
    +
    +
    +
    + + + + +
    + + + + + +
    Pages: [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    +
    +
    +
    + :   +
    +

    +
    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • Some forums may also be configured with previous and next topic links.
    • +
    • The page numbers link to further pages of the topic, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page.
    • +
    • The Reply button enables you to reply to the topic.
    • +
    • The Notify button enables registered members to subscribe to email notification of replies to the topic.
    • +
    • The Mark Unread button enables registered members to mark the topic as 'unread', which means that it will still be listed as new and can be effectively 'saved for later'. Note that this button changes to Add Poll in the bottom button set for users with permission to add polls to existing topics.
    • +
    • The Send Topic button enables registered members to send a link to the topic by email.
    • +
    • The Print button creates a simplified, printer-friendly rendering of the page.
    • +
    • The author name links to the author's profile
    • +
    • The author details in the lefthand column may be accompanied by further personal information.
    • +
    • The topic subject links back to the start of the topic.
    • +
    • The Quote button enables you to quote the post.
    • +
    • Further Modify and Delete options are normally provided to enable registered members to edit their own posts.
    • +
    • Report to moderator enables you to report abusive or wrongly-placed posts to the forum staff.
    • +
    • Logged indicates that the IP of the author has been logged. The actual IP is only available to board administrators
    • +
    • The Jump to menu provides a convenient quick method of navigating the forum.
    • +
    + + + \ No newline at end of file diff --git a/Themes/modern/help/index.english.xml b/Themes/modern/help/index.english.xml new file mode 100644 index 0000000..cfab7c4 --- /dev/null +++ b/Themes/modern/help/index.english.xml @@ -0,0 +1,177 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Introduction + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + So you've arrived at this Simple Machines Forum (SMF)! Perhaps you've been looking at the board index or a screen telling you that you need to register before you can read it and you're wondering what to do next? + Well, some forums permit guests to read and post, some permit guests to read only and some are restricted to registered members. We'd recommend registering at any forum that you see yourself using regularly because many of the most useful features will only become available to you when you do so. Since SMF, however, is such a flexible system that few forums are likely to be identical, we will start by describing four key areas that we'd normally expect to be there for you: + +
    + The Main Menu + Supposing you've arrived here as a guest (or have registered but are currently logged out), the main menu (which appears on every page) should normally comprise five or six buttons (or text links): + + Home, which takes you back to the board index. + Help, which brings you to this guide. + Search, which allows you to search the forums for whatever you're looking for. + Calendar, which links to the forum calendar (if enabled). + Login, which allows you to login if already registered. + Register, which allows you to register (or sometimes apply for registration) when you wish to do so. + + Once you've registered and logged in, however, the main menu should look a little different: + + Home (as before). + Help (as before). + Search (as before). + Profile, which allows you to make changes to your profile settings. + Calendar (as before). + Logout, which allows you to logout again if desired. + + Forum administrators should also note the presence of an additional Admin button. +
    +
    + The Board Index + While the board index (forum home page) is packed with all kinds of information and links, the core of the interface (at least in the SMF default theme) normally looks something like this: + + + Forum Name + Category Name + Board Name + Board Description + Number of topics and posts in this board + Date, time, subject and author of last post + New Posts + No New Posts + Mark ALL messages as read + + + The forum name links back to the top of the board index. + If the category is collapsable (shown by the little arrow symbol), clicking the category name collapses or expands the category as appropriate. + The board name links to the message index for that board. + The board description describes the board's content, and may also include links to child boards and/or specify the board's moderator(s). + The New Posts and No New Posts icons in the leftmost column show registered members whether there have been any new posts to the board since they last read it. + The Mark as Read button enables registered members to mark all posts in the entire forum as 'read'. + +
    +
    + The Message Index + Like the board index, the message index interface is quite straightforward when reduced to its essential components: + + + Pages + Mark Topics as Read for this Board + Are you sure you wish to enable notification of new topics for this board? + Notify of Replies + Start new topic + Post New Poll + Subject + Started by + Replies + Views + Last post + Topic Subject + New + Topic Starter + Date, time and author of last post + Topic you have posted in + Normal Topic + Hot Topic (More than 15 Replies) + Very Hot Topic (More than 25 Replies) + Locked Topic + Sticky Topic + Poll + Jump to + Please select a destination + Another Board + go + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + The page numbers link to further pages of the board, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page. + The Mark as Read button enables registered members to mark all posts in this board as 'read'. + The Notify button enables registered members to subscribe to email notification of replies to topics in this board. + The New Topic and New Poll buttons are for starting new topics and polls, as described in the posting help. + The Subject, Started by, Replies, Views and Last post links enable you to sort the columns by these parameters (with Last post also toggling between descending and ascending order as indicated by the little arrow). + The topic icons in the leftmost column are explained by the key below. + The post icons in the next column are sometimes used to draw attention to the mood or purpose of the topic. + The topic subject links to the start of the topic, with extra links for subsequent pages and new buttons to take registered members straight to their first unread post of the topic. + Where the topic has been started or last replied to by a registered member, their names link to their respective profiles. + The Jump to menu provides a convenient quick method of navigating the forum. + +
    +
    + The Topic + Sometimes referred to as threads, topics are where you find the actual messages: + + + Reply + Are you sure you wish to enable notification of new replies for this topic? + Mark unread + Send this topic + Print + Author + Topic + Read x times + View the profile of Author + Member Group + Post Group + Post Count + Date and Time of Post + Reply with quote + Here is the text of the message, which is ultimately what we're all here for! + Smiley + Report to moderator + Logged + View Profile + Email + Personal Message (Offline) + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + Some forums may also be configured with previous and next topic links. + The page numbers link to further pages of the topic, and may be accompanied by Go Up and Go Down buttons linking to the top and bottom of the current page. + The Reply button enables you to reply to the topic. + The Notify button enables registered members to subscribe to email notification of replies to the topic. + The Mark Unread button enables registered members to mark the topic as 'unread', which means that it will still be listed as new and can be effectively 'saved for later'. Note that this button changes to Add Poll in the bottom button set for users with permission to add polls to existing topics. + The Send Topic button enables registered members to send a link to the topic by email. + The Print button creates a simplified, printer-friendly rendering of the page. + The author name links to the author's profile + The author details in the lefthand column may be accompanied by further personal information. + The topic subject links back to the start of the topic. + The Quote button enables you to quote the post. + Further Modify and Delete options are normally provided to enable registered members to edit their own posts. + Report to moderator enables you to report abusive or wrongly-placed posts to the forum staff. + Logged indicates that the IP of the author has been logged. The actual IP is only available to board administrators + The Jump to menu provides a convenient quick method of navigating the forum. + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/modern/help/index.russian.html b/Themes/modern/help/index.russian.html new file mode 100644 index 0000000..3f3ccc0 --- /dev/null +++ b/Themes/modern/help/index.russian.html @@ -0,0 +1,414 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    ! Simple + Machines Forum (SMF)! + , , + ?

    +

    ... + , + . , + , + . , + + SMF:

    +
      +
    1. +
    2. +
    3. +
    4. +
    +

    +

    , + . ( + ) 5 6 :

    +
      +
    • .
    • +
    • - ... - ... !!!! +
    • .
    • +
    • - ( ).
    • +
    • , + .
    • +
    • - ( + ).
    • +
    +

    , + :

    +
      +
    • ( ).
    • +
    • ( ).
    • +
    • ( ).
    • +
    • .
    • +
    • ( ).
    • +
    • , .
    • +
    +

    , + . +

    +

    +

    , + :

    +
    +
    + + + + +
    + 
    +
    + + + + + + + + + + +
    - 
    New Posts
    +
    , ,
    +

    +
    + + + + + +
      s  Mark ALL messages as read
    +

    +
    +

    +

    . + : " " " ". " " - , " " - (: "Board") .
    + : " " " ". " + " - , " " - + ( , ) + .

    +
      +
    • - .
    • +
    • ( ), , ( ) .
    • +
    • - .
    • +
    • . , .
    • +
    • , .
    • +
    • "New" .
    • +
    +

    +

    , , , :

    +
    +
    + + + + + +
    + 
    + |- + 
    + | |- + 
    + + + + +
    + + + + + +
    : [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + + + + + + + + + + + + + +
     
    New 00,
    + + + + +
    + + + + + +
    : [1]Mark Topics as Read for this Board Notify of Replies Start new topic Post New Poll
    +
    + + + + + + +
     
    +  
    +   ( 15 )
    +   ( 25 )
     
    +   ( )
    +  
    +
    + :   +
    +

    +
    +

    +
      +
    • ( ) + , .
    • +
    • - , , .
    • +
    • "New" .
    • +
    • e-mail .
    • +
    • , , .
    • +
    • , , , ( , , , ).
    • +
    • .
    • +
    • .
    • +
    • New, .
    • +
    • ( ) , .
    • +
    • .
    • +
    +

    +

    , , , - + , :

    +
    +
    + + + + +
    + 
    + |- + 
    + | |- + 
    + | | |- + 
    + + + + +
    + + + + + +
    : [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    + + + + + +
     :  ( x )
    + + + + +
    + + + + +
    + + + + + + + + +

    +
    +
    + *
    +
    +
    +
    +
    + View Profile Email Personal Message (Offline)
    + + + + + + +
    + +
    + « » +
    +
    Reply with quote
    +
    +
    + , , , , , ! Smiley +
    +
    + + + + +
        
    +
    +
    +
    + + + + +
    + + + + + +
    : [1]Reply Notify of Replies Mark unread Send this topic Print
    +
    +
    +
    +
    + :   +
    +

    +
    +
    +

    +
      +
    • , .
    • +
    • ( - ) .
    • +
    • - , , .
    • +
    • (, ?).
    • +
    • e-mail .
    • +
    • "New" + , , + "" , + . , + + + .
    • +
    • .
    • +
    • - + , .
    • +
    • - .
    • +
    • , .
    • +
    • , .
    • +
    • .
    • +
    • .
    • +
    • / .
    • +
    • , IP . IP .
    • +
    • .
    • +
    + + + diff --git a/Themes/modern/help/index.xslt b/Themes/modern/help/index.xslt new file mode 100644 index 0000000..8ae28dc --- /dev/null +++ b/Themes/modern/help/index.xslt @@ -0,0 +1,496 @@ + + + + +
    +
    + + + + +
    + + +  + + +
    + + +
    + + + + + + + + + + +
    + -  + + + +
    + + + + + + + + + + + +
    + +
    + + + + + +
    +
    +
    +
    + + + + + +
    +   + +   + + + + + {alt-mark-as-read} +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + + + +
    + + +  + +
    + |- + +  + +
    + | + |- + +  + +
    +
    + + + + +
    + + + + + +
    : [1] + + + {alt-mark-as-read} + + {alt-notify} + + {alt-new-topic} + + {alt-new-poll} +
    +
    + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + +   + +
    + + + + + + + + {alt-new} + + + + + 00 + + + +
    + + + + +
    + + + + + +
    : [1] + + + {alt-mark-as-read} + + {alt-notify} + + {alt-new-topic} + + {alt-new-poll} +
    +
    + + + + + + +
    +   + +
    +   + +
    +   + +
    +   + +
    +   + +
    +   + +
    +   + +
    +
    + : +   + + + + + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + +
    + + +  +
    + |- + +  +
    + | + |- + +  +
    + | + | + |- + +  + +
    +
    + + + + +
    + + + + + +
    + : [1] + + + + {alt-reply} + + {//alt-notify} + + {alt-mark-unread} + + {alt-send-topic} + + {alt-print} +
    +
    + + + + + +
    +   + + :  () +
    + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + +
    + + +
    + +
    + * +
    + +
    +
    +
    +
    + + + + + + {alt-view-profile} + + + + + {alt-email} + + + + + {alt-pm} +
    +
    + + + + + + +
    + + +
    « »
    +
    + + + {alt-reply-with-quote} +
    +
    +
    +  {alt-smiley} +
    +
    + + + + +
    + + +    +   + +
    +
    +
    +
    + + + + + +
    + + + + + +
    + : [1] + + + + {alt-reply} + + {//alt-notify} + + {alt-mark-unread} + + {alt-send-topic} + + {alt-print} +
    +
    +
    +
    +
    + : +   + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/modern/help/loginout.english.html b/Themes/modern/help/loginout.english.html new file mode 100644 index 0000000..a75cf4a --- /dev/null +++ b/Themes/modern/help/loginout.english.html @@ -0,0 +1,145 @@ + + + + + + + + + SMF User Help: Logging In and Out + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Logging In and Out


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    Once you have completed the registration process, you will be able to login to the site for the first time. After that, you can choose whether to stay logged in indefinitely or logout at the end of your visit.

    +
      +
    1. + Logging In +
        +
      1. The Login Screen
      2. +
      3. The Quick Login
      4. +
      +
    2. +
    3. Logging Out
    4. +
    5. Password Reminder
    6. +
    +

    Logging In

    +

    So you might be newly registered or you might simply have been logged out from a previous visit, but there's normally a choice between the login screen and the quick login in either case.

    +

    The Login Screen

    +

    Since this screen (accessed from the Login option of the main menu) is not only where you'll normally be taken on completing registration but also the first thing you'll see in any 'members only' forum, we will describe it first:

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Login
    Username:
    Password:
    Minutes to stay logged in:
    Always stay logged in:
    Forgot your password?
    +
    +

    +

    While the Username and Password fields should be self-explanatory, Minutes to stay logged in simply means the number of minutes the cookie that keeps you logged in will last before expiring and requiring you to login again. So it's not advisable to enter a long time here if you share a computer and are likely to forget to logout, but you might prefer to check Always stay logged in if no-one else has access to your computer.

    +

    The Quick Login

    +

    Although many forums also have a quick login box to allow you to login direct from any screen, its position on the page may vary considerably from forum to forum. In the SMF default theme, for example, it's in the collapsable section at the top, whereas it's more likely to be at the bottom in themes based on the older YaBB SE forum. If you can't see it and it hasn't simply been collapsed, it's either not enabled at all (in which case you should still be able to access the login screen from the main menu) or you're already logged in (in which case the main menu should include a Logout rather than Login link!).

    + + + + +
    + + + + +
    +
    +
    + Login with username, password and session length +
    +
    +

    +

    To use the quick login box, enter your username and password, select your session length from the drop-down menu and click Login. Please note that Forever, like Always stay logged in, simply means that the computer should remember you until you next choose to logout, and not that you actually need to be online all of that time!

    +

    Logging Out

    +

    When you have finished browsing the forum, you may decide to logout. Perhaps you share a workstation with someone else, in which case leaving yourself logged in would not be a good idea. So select the Logout option from the main menu and the forum should log you out, turning you into an instant guest, clearing your name from the list of users online and safeguarding your forum identity until you choose to login again.

    +

    Password Reminder

    +

    If you're trying to login to the forum but have forgetten or lost your password, you can retrieve it with the lost password tool by following the Forgot your password? link from the login screen.

    +
    + + + + + + + + + + + + + + + + + +
    Password reminder
    Username/email: 
    by Userby Email
    Ask me my question
    You can't retrieve your password, but you can set a new one by following a link sent to you by email. You also have the option of setting a new password by answering your secret question.
    +
    +

    You can enter either your username or your email address so long as you check the appropriate option, then click the Send button to send yourself an email containing a link to reset your password. It's also possible to avoid the email altogether if you've set yourself a secret question and answer in your profile, but please beware of questions that anyone could answer or guess (like 'what is the first color of the rainbow?', which would be a very bad choice)!

    + + + \ No newline at end of file diff --git a/Themes/modern/help/loginout.english.xml b/Themes/modern/help/loginout.english.xml new file mode 100644 index 0000000..d6980fc --- /dev/null +++ b/Themes/modern/help/loginout.english.xml @@ -0,0 +1,79 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Logging In and Out + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + Once you have completed the registration process, you will be able to login to the site for the first time. After that, you can choose whether to stay logged in indefinitely or logout at the end of your visit. + +
    + Logging In + So you might be newly registered or you might simply have been logged out from a previous visit, but there's normally a choice between the login screen and the quick login in either case. + + The Login Screen + Since this screen (accessed from the Login option of the main menu) is not only where you'll normally be taken on completing registration but also the first thing you'll see in any 'members only' forum, we will describe it first: + + + Login + Username + Password + Minutes to stay logged in + Always stay logged in + Forgot your password + + While the Username and Password fields should be self-explanatory, Minutes to stay logged in simply means the number of minutes the cookie that keeps you logged in will last before expiring and requiring you to login again. So it's not advisable to enter a long time here if you share a computer and are likely to forget to logout, but you might prefer to check Always stay logged in if no-one else has access to your computer. + + + The Quick Login + Although many forums also have a quick login box to allow you to login direct from any screen, its position on the page may vary considerably from forum to forum. In the SMF default theme, for example, it's in the collapsable section at the top, whereas it's more likely to be at the bottom in themes based on the older YaBB SE forum. If you can't see it and it hasn't simply been collapsed, it's either not enabled at all (in which case you should still be able to access the login screen from the main menu) or you're already logged in (in which case the main menu should include a Logout rather than Login link!). + + + 1 Hour + 1 Day + 1 Week + 1 Month + Forever + Login with username, password and session length + + To use the quick login box, enter your username and password, select your session length from the drop-down menu and click Login. Please note that , like Always stay logged in, simply means that the computer should remember you until you next choose to logout, and not that you actually need to be online all of that time! + +
    +
    + Logging Out + When you have finished browsing the forum, you may decide to logout. Perhaps you share a workstation with someone else, in which case leaving yourself logged in would not be a good idea. So select the Logout option from the main menu and the forum should log you out, turning you into an instant guest, clearing your name from the list of users online and safeguarding your forum identity until you choose to login again. +
    +
    + Password Reminder + If you're trying to login to the forum but have forgetten or lost your password, you can retrieve it with the lost password tool by following the Forgot your password? link from the login screen. + + + Password reminder + Username/email + Send + by User + by Email + Ask me my question + You can't retrieve your password, but you can set a new one by following a link sent to you by email. You also have the option of setting a new password by answering your secret question. + + You can enter either your username or your email address so long as you check the appropriate option, then click the Send button to send yourself an email containing a link to reset your password. It's also possible to avoid the email altogether if you've set yourself a secret question and answer in your profile, but please beware of questions that anyone could answer or guess (like 'what is the first color of the rainbow?', which would be a very bad choice)! +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/modern/help/loginout.russian.html b/Themes/modern/help/loginout.russian.html new file mode 100644 index 0000000..7777fc8 --- /dev/null +++ b/Themes/modern/help/loginout.russian.html @@ -0,0 +1,147 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    , . , .

    +
      +
    1. + +
        +
      1. +
      2. +
      +
    2. +
    3. +
    4. ?
    5. +
    +

    +

    , - , .

    +

    +

    , , - , , , :

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
    :
    :
    ( ):
    :
    ?
    +
    +

    +

    , -. , , , . , . , , .

    +

    +

    , . SMF . , - , , .

    + + + + +
    + + + + +
    +
    +
    + +
    +
    +

    +

    , . , , , , , , .

    +

    +

    , , , . , - . , Online , .

    +

    ?

    +

    , - , + + - ? .

    +
    + + + + + + + + + + + + + + + + + +
    /E-mail: 
    User Email
    , . , .
    +
    +

    , e-mail, . , e-mail . , , , ( ? ).

    + + + diff --git a/Themes/modern/help/loginout.xslt b/Themes/modern/help/loginout.xslt new file mode 100644 index 0000000..0cde8b0 --- /dev/null +++ b/Themes/modern/help/loginout.xslt @@ -0,0 +1,144 @@ + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +   + +
    + : +
    + : + + +
    + : + + +
    + : + + +
    + + + + + +
    + + ? + +
    +
    +
    +
    +
    +
    + + + + + + +
    + + + + +
    +
    + + + + + + + + +
    + + +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + + + +
    + +
    + :  + + + + + + +
    + + + + + +
    + + +
    + +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/modern/help/pm.english.html b/Themes/modern/help/pm.english.html new file mode 100644 index 0000000..95495e7 --- /dev/null +++ b/Themes/modern/help/pm.english.html @@ -0,0 +1,142 @@ + + + + + + + + + SMF User Help: Personal Message + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Personal Message


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    SMF is about community and communication. And there are many ways to communicate, such as posting to the boards, personal messaging, email, ICQ, AIM and YIM. But SMF's own personal message system, as available to registered members in most forums, is sometimes a more suitable option than any of these.

    +
      +
    1. + Personal Messaging +
        +
      1. Description
      2. +
      3. Reading Your Messages
      4. +
      +
    2. +
    3. + The PM Interface +
        +
      1. Starting or Replying to a Message
      2. +
      +
    4. +
    +

    Personal Messaging

    +

    Description

    +

    While email is a good way to correspond directly with members, it also has several drawbacks for forum purposes: you must open your email application to write and send the message, the recipient must open his/her email application and check his/her mail, your message will be mixed in with all the other mail and it can sometimes take several minutes to an hour for mail to reach the recipient.

    +

    As an alternative to email, SMF offers a faster, more private method. Personal messaging on the boards provides instantaneous delivery to the recipient's private mailbox. The mail is sent and received entirely through SMF, so neither you nor the recipient have to open another program or leave SMF. Personal messaging also offers both the sender and the recipient greater privacy because no-one's real email address is revealed. Personal messages show only the handle and name of both parties.

    +

    If a recipient isn't online, personal messages wait in the member's PM box until the next time he/she logs in and reads and/or deletes them. SMF Personal Messages is a self-contained, highly private email system.

    +

    Reading Your Messages

    +

    To read your personal messages, you need to be logged in, then follow the link that says something like 'Hey, [username], you have x messages, x are new'.

    +

    The PM Interface

    +

    The PM interface is similar in operation to that of the message index. While we are showing the inbox interface here, the outbox works in much the same way:

    +
    +
    + +
    + + + + +
    +  Forum Name
    + |- +  Personal Messages
    + | |- +  Inbox
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    Delete all messages in your Inbox Outbox New Message Check for new messages
    Date  SubjectFrom
    Date and time of messageMessage SubjectAnother Member
    + + + + +
    Pages: [1]
    +
    +

    +
    +
    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • The main Delete button deletes all messages in your inbox (or outbox if open). Note that the checkbox and lower Delete button also allow you to delete selected messages, with the top checkbox selecting all.
    • +
    • The Outbox button toggles to your outbox, where it obviously becomes an Inbox button.
    • +
    • The New Message button enables you to start a new message, which is similar to starting a new topic but adds 'To:' and 'Bcc:' (blind carbon copy) fields and the option to save to your outbox.
    • +
    • The Reload button checks for new messages by refreshing the page.
    • +
    • The Date, Subject, and From links enable you to sort the columns by these parameters (with Date also toggling between descending and ascending order as indicated by the little arrow).
    • +
    • The main subject title links to the start of the message, which will be further down the same page.
    • +
    • The page numbers link to further pages of messages as applicable.
    • +
    +

    Starting or Replying to a Message

    +

    There are actually several different ways to start a new personal message, but all require you to be logged in:

    +
      +
    • You can follow the link that says something like 'Hey, [username], you have x messages, x are new', then click the New Message button in your inbox.
    • +
    • You can click another member's name, followed by Send this member a personal message from his/her profile summary screen.
    • +
    • You can start a new message direct by clicking the IM on/offline icon from the user info accompanying all of his/her posts.
    • +
    • You can start a new message direct by clicking the PM on/offline icon from the Current Status in his/her profile summary screen. (This icon/link is often duplicated in the user info described above.)
    • +
    • Replying to a message is very similar to replying to a topic.
    • +
    + + + \ No newline at end of file diff --git a/Themes/modern/help/pm.english.xml b/Themes/modern/help/pm.english.xml new file mode 100644 index 0000000..6dc2bf7 --- /dev/null +++ b/Themes/modern/help/pm.english.xml @@ -0,0 +1,84 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Personal Message + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + SMF is about community and communication. And there are many ways to communicate, such as posting to the boards, personal messaging, email, ICQ, AIM and YIM. But SMF's own personal message system, as available to registered members in most forums, is sometimes a more suitable option than any of these. + +
    + Personal Messaging + + Description + While email is a good way to correspond directly with members, it also has several drawbacks for forum purposes: you must open your email application to write and send the message, the recipient must open his/her email application and check his/her mail, your message will be mixed in with all the other mail and it can sometimes take several minutes to an hour for mail to reach the recipient. + As an alternative to email, SMF offers a faster, more private method. Personal messaging on the boards provides instantaneous delivery to the recipient's private mailbox. The mail is sent and received entirely through SMF, so neither you nor the recipient have to open another program or leave SMF. Personal messaging also offers both the sender and the recipient greater privacy because no-one's real email address is revealed. Personal messages show only the handle and name of both parties. + If a recipient isn't online, personal messages wait in the member's PM box until the next time he/she logs in and reads and/or deletes them. SMF Personal Messages is a self-contained, highly private email system. + + + Reading Your Messages + To read your personal messages, you need to be logged in, then follow the link that says something like 'Hey, [username], you have x messages, x are new'. + +
    +
    + The PM Interface + The PM interface is similar in operation to that of the message index. While we are showing the inbox interface here, the outbox works in much the same way: + + + Forum Name + Personal Messages + Inbox + Delete all messages in your Inbox + Outbox + New Message + Check for new messages + Date + Subject + From + Date and time of message + Another Member + Message Subject + Delete Selected + Pages + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + The main Delete button deletes all messages in your inbox (or outbox if open). Note that the checkbox and lower Delete button also allow you to delete selected messages, with the top checkbox selecting all. + The Outbox button toggles to your outbox, where it obviously becomes an Inbox button. + The New Message button enables you to start a new message, which is similar to starting a new topic but adds 'To:' and 'Bcc:' (blind carbon copy) fields and the option to save to your outbox. + The Reload button checks for new messages by refreshing the page. + The Date, Subject, and From links enable you to sort the columns by these parameters (with Date also toggling between descending and ascending order as indicated by the little arrow). + The main subject title links to the start of the message, which will be further down the same page. + The page numbers link to further pages of messages as applicable. + + + Starting or Replying to a Message + There are actually several different ways to start a new personal message, but all require you to be logged in: + + You can follow the link that says something like 'Hey, [username], you have x messages, x are new', then click the New Message button in your inbox. + You can click another member's name, followed by Send this member a personal message from his/her profile summary screen. + You can start a new message direct by clicking the IM on/offline icon from the user info accompanying all of his/her posts. + You can start a new message direct by clicking the PM on/offline icon from the Current Status in his/her profile summary screen. (This icon/link is often duplicated in the user info described above.) + Replying to a message is very similar to replying to a topic. + + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/modern/help/pm.russian.html b/Themes/modern/help/pm.russian.html new file mode 100644 index 0000000..1a8a6fe --- /dev/null +++ b/Themes/modern/help/pm.russian.html @@ -0,0 +1,142 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    - , , e-mail, IM - , , .

    +
      +
    1. + +
        +
      1. +
      2. +
      +
    2. +
    3. + +
        +
      1. +
      +
    4. +
    +

    +

    +

    , : , , , , , - , .

    +

    e-mail, SMF . . SMF, , . , e-mail , .

    +

    , , ( ). , , , , .

    +

    +

    , , ', [ ], x , x '.

    +

    +

    . , :

    +
    +
    + +
    + + + + +
    + 
    + |- + 
    + | |- + 
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    Delete all messages in your Inbox Outbox New Message Check for new messages
     
    + + + + +
    : [1]
    +
    +

    +
    +
    +
    +

    +
      +
    • ( ) .
    • +
    • ( , ) . , .
    • +
    • , .
    • +
    • , , ':' ':' .
    • +
    • .
    • +
    • , ( , ).
    • +
    • , .
    • +
    • - .
    • +
    +

    +

    , , :

    +
      +
    • , ', [ ], x , x ', .
    • +
    • , .
    • +
    • On/Offline IM, .
    • +
    • On/Offline PM , ( , ).
    • +
    • , .
    • +
    + + + diff --git a/Themes/modern/help/pm.xslt b/Themes/modern/help/pm.xslt new file mode 100644 index 0000000..755e58d --- /dev/null +++ b/Themes/modern/help/pm.xslt @@ -0,0 +1,122 @@ + + + + +
    +
    + + + +
    + + + + +
    + + +  + +
    + |- + +  + +
    + | + |- + +  + +
    +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + + {alt-delete} + + {alt-outbox} + + {alt-new-message} + + {alt-reload} +
    + + +   + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + +
    + + + + +
    : [1]
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/modern/help/posting.english.html b/Themes/modern/help/posting.english.html new file mode 100644 index 0000000..c6f7e82 --- /dev/null +++ b/Themes/modern/help/posting.english.html @@ -0,0 +1,929 @@ + + + + + + + + SMF User Help: Posting + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Posting


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    Since posting messages is basically what forums are all about, we will spend some time looking at the various options and techniques available. Those who are familiar with forum software, HTML or bulletin board code in general may prefer to skip straight to the Bulletin Board Code and Smileys references.

    +

    Please note that, because an SMF forum may be customized extensively by its administrator(s), the presence of a feature in this documentation does not necessarily mean that it will be available to all users in all forums.

    +
      +
    1. + Posting Basics +
        +
      1. Starting a New Topic
      2. +
      3. Starting a New Poll
      4. +
      5. Posting an Event to the Calendar
      6. +
      7. Replying to a Topic or Poll
      8. +
      9. Quoting a Post
      10. +
      11. Modifying or Deleting a Post
      12. +
      +
    2. +
    3. + Standard Posting Options +
        +
      1. Message Icon
      2. +
      3. Bulletin Board Code
      4. +
      5. Smileys
      6. +
      +
    4. +
    5. Tags and Nesting (for beginners)
    6. +
    7. + Additional Options +
        +
      1. Notify me of replies
      2. +
      3. Return to this topic
      4. +
      5. Don't use smileys
      6. +
      7. Attachments
      8. +
      +
    8. +
    9. + References +
        +
      1. SMF Bulletin Board Code
      2. +
      3. SMF Smileys
      4. +
      +
    10. +
    +

    Posting Basics

    +

    Starting a New Topic

    +

    Browse to the board where you wish to post and click the New Topic button (positioned by default at both the top and the bottom of the board, as shown in the User Help Introduction), which should take you to the Start new topic screen. While this presents a number of options, the two most important are the Subject field and main Message field (not labeled as such, but obvious by its size). So enter your subject and start to type (or paste) your message into the main text area, noting that a message missing either a subject or a body will not be accepted for posting until it has both. If you're happy with your plain text message, you can then post it by clicking the Post button and/or preview it first by clicking the Preview button, but there are many further options available to make things that little bit more interesting.

    +
    +
    +
    + + + + +
    +  Forum Name
    + |- +  Category Name
    + | |- +  Board Name
    + | | |- +  Start new topic
    + + + + + + + +
    Start new topic
    + + + + + + + + + + + + + + + + + + +
    Standard Options omitted for clarity and demonstrated below.
    Subject:
    +
    Additional Options omitted for clarity and demonstrated below.

    + shortcuts: hit alt+s to submit/post or alt+p to preview

    +
    +
    +

    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • Some forums may be configured to offer an additional Spell Check button alongside the Post and Preview options.
    • +
    +

    Starting a New Poll

    +

    A poll is basically a topic with an added question and voting options, started by clicking New Poll instead of New Topic as described above. To post a poll it is necessary to fill out the Question field and at least two of the Option fields in addition to the Subject and Message fields required by a standard topic. Further options to configure how many choices the user may vote for, how long the poll should run, whether users can change their votes and what conditions must be fulfilled for the results to be displayed should be self-explanatory.

    +

    To offer more than five choices in a poll, simply click Add Option as many times as necessary.

    +

    Note that it may also be possible for some users in some forums to add a poll to an existing topic.

    +

    Posting an Event to the Calendar

    +

    Where this option has been configured (it's not standard 'out of the box'), you can post an event by selecting Calendar from the main menu followed by Post Event from the calendar screen. What you see now is a Start new topic screen with supplementary fields for the event title, date and target board, which simply add your event to the calendar and create a link back to your post in that board.

    +

    Replying to a Topic or Poll

    +

    Replying to a topic or poll is basically the same as starting a new topic, but it's not necessary to enter anything in the Subject field unless you wish to change what's already there. To vote in a poll, you simply have to select your chosen option(s) and click Submit Vote.

    +

    If 'Quick Reply' has been enabled, a simple reply field will also appear after the post(s) on a page, but you'll have to type your Bulletin Board Code and Smileys manually if you choose to use it.

    +

    Quoting a Post

    +

    To reply to a post by quoting it, you can either click the Quote button for the relevant post and add your own message to the quoted text or click the Reply button followed by Insert Quote from the relevant post in the 'Topic Summary' below, but note that:

    +
      +
    • Both these options add a link to the original post showing the name of the poster and the date and time of the post, whereas the Bulletin Board Code quote tag simply quotes the relevant post without this additional information.
    • +
    • You can also retain or add the 'author' attribute independently of the full Quote function, as demonstrated in the SMF Bulletin Board Code Reference below.
    • +
    +

    Modifying or Deleting a Post

    +

    To modify a post, click the Modify button and make your changes. Note that most forums are likely to be configured to show the date and time of the last edit, but the administrator(s) may also allow a short period to elapse before this happens.

    +

    To delete a post, click the Delete button followed by OK from the Remove this message? box that appears. Some forums may also allow you to remove topics or polls that you start, but the buttons for these are usually at the bottom of the page.

    +

    Standard Posting Options

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + +
    Message icon:
    + BoldItalicizedUnderlineStrikethrough|GlowShadowMarquee|Preformatted TextLeft AlignCenteredRight Align|Horizontal Rule|Font SizeFont Face
    + Insert FlashInsert ImageInsert HyperlinkInsert EmailInsert FTP Link|Insert TableInsert Table RowInsert Table Column|SuperscriptSubscriptTeletype|Insert CodeInsert Quote|Insert List +
    Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry
    +
    +
    +

    +
    +

    +

    Message Icon

    +

    This drop-down menu allows you to change the default icon for the subject line to something matching the mood or purpose of your post.

    +

    Bulletin Board Code

    +

    Bulletin Board Code (or BBC) is the essential tool for formatting and changing the appearance of your post. While it affects the plain text in much the same way as the formatting tools in any word processor, the main Message field does not behave in a WYSIWYG manner, so you should preview your message if you need to see what it will look like when posted.

    +

    A complete SMF Bulletin Board Code Reference is provided below.

    +

    Smileys

    +

    While smileys can be viewed as purely whimsical in nature, they can also play a valuable role in clarifying the written word in much the same way as vocal inflections and/or facial expressions clarify the spoken word. Like most forum software, SMF provides a standard range of smiley images which can be added to posts by clicking the relevant icons or typing the relevant codes. A don't use smileys option is naturally also provided for those occasions when you don't want typed character combinations that would normally be displayed as smileys to be converted to the expected images!

    +

    A complete SMF Smileys Reference is provided below.

    +

    Tags and Nesting (for beginners)

    +

    Before listing the available BBC buttons and their purposes, let's see how they work by imagining that we want to post some text in bold type. While we can start by clicking the B (Bold) button and typing our text between the tags it produces, it's often more practical to type the text first, highlight it and then click the button. So typing 'text', highlighting it and clicking the 'B' button should produce '[b]text[/b]', which renders as text when posted or previewed. (NB This doesn't work in Opera, which inserts the tags at the end of the post.) Subsequently highlighting '[b]text[/b]' and clicking the I (Italicized) button will produce '[i][b]text[/b][/i]', which not only renders as text when posted or previewed but also introduces the concept of nesting, which means that each new set of tags in a case like this should be seen as a new 'box' containing both the original text and any tags already applied to it.

    +

    Note that the BBC tags can also be typed and edited direct instead of clicking the buttons.

    +

    Additional Options

    +

    The following options may appear by default in some forums but be contained within an expanding/collapsing panel (try clicking the link with the arrow below!) in others:

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + +
    + Additional Options...
    +
    + + + + + + + + + + +
     Notify me of replies.
     Return to this topic.
     Don't use smileys.
    +
    +
    Attach:
    +
    + Allowed file types: txt, jpg, gif, pdf, mpg, png
    + Maximum attachment size allowed: 128 KB
    +
    + shortcuts: hit alt+s to submit/post or alt+p to preview

    + +
    +
    +

    +
    +

    +

    Notify me of replies

    +

    Check this to subscribe to email notification for the topic.

    +

    Return to this topic

    +

    Check this to return to the topic (instead of the message index) after posting (NB you can also set this behaviour as a preference in your profile).

    +

    Don't use smileys

    +

    Check this to prevent certain character combinations in your post from being parsed and rendered as smileys.

    +

    Attachments

    +

    If enabled, this feature allows you to attach files to your posts in much the same way as most email clients, so you simply have to browse to the relevant file(s) on your computer before clicking Post. You can delete your attachment(s) or add more by modifying your post, but please note that:

    +
      +
    • The permitted file types and sizes are set by the forum administrator(s).
    • +
    • Although most forums are likely be configured to display attached images as part of the post, it's not possible to preview attachments so you should always browse to and attach your files just before you finally post your message.
    • +
    +

    References

    +

    SMF Bulletin Board Code

    +

    The buttons shown belong to the SMF default theme and may differ from forum to forum.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tag NameButtonCodeOutputComments
    BoldBold[b]bold[/b]bold*
    ItalicizedItalicized[i]italicized[/i]italicized*
    UnderlineUnderline[u]underline[/u]underline*
    StrikethroughStrikethrough[s]strikethrough[/s]strikethrough*
    GlowGlow[glow=red,2,50]glow[/glow] +
    + glow +
    +
    The three attributes (eg red, 2, 50) in the 'glow' tag are color, strength and width respectively.
    ShadowShadow[shadow=red,left]
    + shadow
    + [/shadow]
    +
    + shadow +
    +
    The two attributes (eg red, left) in the 'shadow' tag are color and direction respectively.
    MarqueeMarquee[move]move[/move]moveNot valid XHTML, but can also be used for images!
    Preformatted TextPreformatted Text[pre]Simple
    +   Machines
    +     Forum[/pre]
    +
    +Simple
    +  Machines
    +						Forum
    +
    +
    Preserves critical text formatting, rendered in a monospace font.
    Left AlignLeft Align[left]left align[/left] +

    left align

    +
    *
    CenteredCentered[center]centered[/center] +
    + centered +
    +
    *
    Right AlignRight Align[right]right align[/right] +

    right align

    +
    *
    Right-to-Left*[rtl]right to left![/rtl] +
    + right to left! +
    +
    Typical usage would be to post Arabic or Hebrew in an English document.
    Left-to-Right*[ltr]left to right![/ltr] +
    + left to right! +
    +
    Typical usage would be to post English in an Arabic or Hebrew document.
    Horizontal RuleHorizontal Rule[hr] +
    +
    *
    Font SizeFont Size[size=10pt]font size[/size]font size*
    Font FaceFont Face[font=Verdana]font face[/font]font faceOnly fonts installed on the user's computer will be displayed, so use with caution!
    Font Color[color=Red]red[/color]redSelect the color from the drop-down.
    Insert FlashInsert Flash[flash=200,200]
    + http://somesite/somefile.swf
    + [/flash]
    http://somesite/somefile.swfPlease note that, if embedded Flash has been disabled by the forum administrator(s), the Flash file will appear as a straight hyperlink as shown here. The two attributes in the 'flash' tag (where relevant) are width and height respectively.
    Insert ImageInsert Image[img]
    + http://somesite/image.gif
    + [/img]
    Type the width and height attributes to resize the image.
    [img width=48 height=48]
    + http://somesite/image.gif
    + [/img]
    Insert HyperlinkInsert Hyperlink[url]http://somesite/[/url]http://somesite/NB the 'url' tag opens in a new window, but you can type 'iurl' tags to open in the same window.
    [url=http://somesite/]
    + descriptive link
    + [/url]
    descriptive link
    Insert EmailInsert Email[email]
    + someone@somesite
    + [/email]
    someone@somesite*
    Insert FTP LinkInsert FTP Link[ftp]
    + ftp://somesite/somefile
    + [/ftp]
    ftp://somesite/somefile*
    [ftp=ftp://somesite/somefile]
    + descriptive link
    + [/ftp]
    descriptive link
    Insert TableInsert Table[table][/table]*No meaningful output from the 'table' tags alone.
    Insert Table RowInsert Table Row[table][tr][/tr][/table]*No meaningful output from the 'table' and 'tr' tags alone.
    Insert Table ColumnInsert Table Column[table][tr][td]
    + content
    + [/td][/tr][/table]
    + + + + +
    content
    +
    Note the correct nesting of the tags, so the 'table' tags contain the 'tr' tags, which each contain an equal number of 'td' tags!
    [table][tr][td]SMF[/td]
    + [td]Bulletin[/td][/tr]
    + [tr][td]Board[/td]
    + [td]Code[/td][/tr][/table]
    + + + + + + + + + +
    SMFBulletin
    BoardCode
    +
    SuperscriptSuperscript[sup]superscript[/sup]superscript*
    SubscriptSubscript[sub]subscript[/sub]subscript*
    TeletypeTeletype[tt]teletype[/tt]teletypeMonospace font.
    Insert CodeInsert Code[code]<?php phpinfo(); ?>[/code] +
    + Code: +
    +
    + <?php phpinfo(); ?> +
    +
    Always use to preserve formatting of code and avoid parsing as BBC and/or smileys!
    Insert QuoteInsert Quote[quote]quote[/quote] +
    + Quote +
    +
    + quote +
    +
    Note the optional 'author' attribute.
    [quote author=author]quote[/quote] +
    + Quote from: author +
    +
    + quote +
    +
    Insert ListInsert List[list]
    + [li]SMF[/li]
    + [li]YaBB SE[/li]
    + [/list]
    +
      +
    • SMF
    • +
    • YaBB SE
    • +
    +
    While you can add as many items as you wish, each item must be contained by the correct opening and closing tags. You can also style your list item bullets with special opening tags and no closing tags, but this option doesn't currently output valid XHTML.
    [list]
    + [o]circle
    + [O]circle
    + [0]circle
    + [*]disc
    + [@]disc
    + [+]square
    + [x]square
    + [#]square
    + [/list]
    +
      +
    • circle
    • +
    • circle
    • +
    • circle
    • +
    • disc
    • +
    • disc
    • +
    • square
    • +
    • square
    • +
    • square
    • +
    +
    Abbreviation*[abbr=exemlpi gratia]eg[/abbr]egDisplays the full expression for the abbreviation on mouseover.
    Acronym*[acronym=Simple Machines Forum]SMF[/acronym]SMFDisplays the full expression for the acronym on mouseover.

    +

    SMF Smileys

    +

    The smileys shown here are the standard set from the SMF default theme and may differ from forum to forum.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameImage (click to insert)Code (type to insert)
    Smiley:)
    Wink;)
    Cheesy:D
    Grin;D
    Angry>:(
    Sad:(
    Shocked:o
    Cool8)
    Huh???
    Roll Eyes::)
    Tongue:P
    Embarrassed:-[
    Lips Sealed:-X
    Undecided:-\
    Kiss:-*
    Cry:'(

    +

    Please note that not all of the smiley codes will be correctly parsed and converted to images unless their opening spaces are present.

    + + + \ No newline at end of file diff --git a/Themes/modern/help/posting.english.xml b/Themes/modern/help/posting.english.xml new file mode 100644 index 0000000..850735b --- /dev/null +++ b/Themes/modern/help/posting.english.xml @@ -0,0 +1,683 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Posting + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + Since posting messages is basically what forums are all about, we will spend some time looking at the various options and techniques available. Those who are familiar with forum software, HTML or bulletin board code in general may prefer to skip straight to the Bulletin Board Code and Smileys references. + Please note that, because an SMF forum may be customized extensively by its administrator(s), the presence of a feature in this documentation does not necessarily mean that it will be available to all users in all forums. + +
    + Posting Basics + + Starting a New Topic + Browse to the board where you wish to post and click the New Topic button (positioned by default at both the top and the bottom of the board, as shown in the User Help Introduction), which should take you to the Start new topic screen. While this presents a number of options, the two most important are the Subject field and main Message field (not labeled as such, but obvious by its size). So enter your subject and start to type (or paste) your message into the main text area, noting that a message missing either a subject or a body will not be accepted for posting until it has both. If you're happy with your plain text message, you can then post it by clicking the Post button and/or preview it first by clicking the Preview button, but there are many further options available to make things that little bit more interesting. + + + Forum Name + Category Name + Board Name + Start new topic + Standard Options + Additional Options + omitted for clarity and demonstrated below. + Subject + shortcuts: hit alt+s to submit/post or alt+p to preview + Post + Preview + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + Some forums may be configured to offer an additional Spell Check button alongside the Post and Preview options. + + + + Starting a New Poll + A poll is basically a topic with an added question and voting options, started by clicking New Poll instead of New Topic as described above. To post a poll it is necessary to fill out the Question field and at least two of the Option fields in addition to the Subject and Message fields required by a standard topic. Further options to configure how many choices the user may vote for, how long the poll should run, whether users can change their votes and what conditions must be fulfilled for the results to be displayed should be self-explanatory. + To offer more than five choices in a poll, simply click Add Option as many times as necessary. + Note that it may also be possible for some users in some forums to add a poll to an existing topic. + + + Posting an Event to the Calendar + Where this option has been configured (it's not standard 'out of the box'), you can post an event by selecting Calendar from the main menu followed by Post Event from the calendar screen. What you see now is a Start new topic screen with supplementary fields for the event title, date and target board, which simply add your event to the calendar and create a link back to your post in that board. + + + Replying to a Topic or Poll + Replying to a topic or poll is basically the same as starting a new topic, but it's not necessary to enter anything in the Subject field unless you wish to change what's already there. To vote in a poll, you simply have to select your chosen option(s) and click Submit Vote. + If 'Quick Reply' has been enabled, a simple reply field will also appear after the post(s) on a page, but you'll have to type your Bulletin Board Code and Smileys manually if you choose to use it. + + + Quoting a Post + To reply to a post by quoting it, you can either click the Quote button for the relevant post and add your own message to the quoted text or click the Reply button followed by Insert Quote from the relevant post in the 'Topic Summary' below, but note that: + + Both these options add a link to the original post showing the name of the poster and the date and time of the post, whereas the Bulletin Board Code quote tag simply quotes the relevant post without this additional information. + You can also retain or add the 'author' attribute independently of the full Quote function, as demonstrated in the SMF Bulletin Board Code Reference below. + + + + Modifying or Deleting a Post + To modify a post, click the Modify button and make your changes. Note that most forums are likely to be configured to show the date and time of the last edit, but the administrator(s) may also allow a short period to elapse before this happens. + To delete a post, click the Delete button followed by OK from the Remove this message? box that appears. Some forums may also allow you to remove topics or polls that you start, but the buttons for these are usually at the bottom of the page. + +
    +
    + Standard Posting Options + + + Message icon + Standard + Thumb Up + Thumb Down + Exclamation point + Question mark + Lamp + Smiley + Angry + Cheesy + Grin + Sad + Wink + + Bold + Italicized + Underline + Strikethrough + + Glow + Shadow + Marquee + +
    Preformatted Text
    + Left Align +
    Centered
    + Right Align + +
    Horizontal Rule + + Font Size + Font Face +
    + + Insert Flash + Insert Image + Insert Hyperlink + Insert Email + Insert FTP Link + + Insert Table
    + Insert Table Row + Insert Table Column + + Superscript + Subscript + Teletype + + Insert Code + Insert Quote + + Insert List +
    + + Change Color + Black + Red + Yellow + Pink + Green + Orange + Purple + Blue + Beige + Brown + Teal + Navy + Maroon + Lime Green + + + Smiley + Wink + Cheesy + Grin + Angry + Sad + Shocked + Cool + Huh + Roll Eyes + Tongue + Embarrassed + Lips Sealed + Undecided + Kiss + Cry + +
    + + Message Icon + This drop-down menu allows you to change the default icon for the subject line to something matching the mood or purpose of your post. + + + Bulletin Board Code + Bulletin Board Code (or BBC) is the essential tool for formatting and changing the appearance of your post. While it affects the plain text in much the same way as the formatting tools in any word processor, the main Message field does not behave in a WYSIWYG manner, so you should preview your message if you need to see what it will look like when posted. + A complete SMF Bulletin Board Code Reference is provided below. + + + Smileys + While smileys can be viewed as purely whimsical in nature, they can also play a valuable role in clarifying the written word in much the same way as vocal inflections and/or facial expressions clarify the spoken word. Like most forum software, SMF provides a standard range of smiley images which can be added to posts by clicking the relevant icons or typing the relevant codes. A don't use smileys option is naturally also provided for those occasions when you don't want typed character combinations that would normally be displayed as smileys to be converted to the expected images! + A complete SMF Smileys Reference is provided below. + +
    +
    + Tags and Nesting (for beginners) + Before listing the available BBC buttons and their purposes, let's see how they work by imagining that we want to post some text in bold type. While we can start by clicking the B (Bold) button and typing our text between the tags it produces, it's often more practical to type the text first, highlight it and then click the button. So typing 'text', highlighting it and clicking the 'B' button should produce '[b]text[/b]', which renders as text when posted or previewed. (NB This doesn't work in Opera, which inserts the tags at the end of the post.) Subsequently highlighting '[b]text[/b]' and clicking the I (Italicized) button will produce '[i][b]text[/b][/i]', which not only renders as text when posted or previewed but also introduces the concept of nesting, which means that each new set of tags in a case like this should be seen as a new 'box' containing both the original text and any tags already applied to it. + Note that the BBC tags can also be typed and edited direct instead of clicking the buttons. +
    +
    + Additional Options + The following options may appear by default in some forums but be contained within an expanding/collapsing panel (try clicking the link with the arrow below!) in others: + + + Notify me of replies. + Return to this topic. + Don't use smileys. + Attach + Allowed file types: txt, jpg, gif, pdf, mpg, png + Maximum attachment size allowed: 128 KB + + + Notify me of replies + Check this to subscribe to email notification for the topic. + + + Return to this topic + Check this to return to the topic (instead of the message index) after posting (NB you can also set this behaviour as a preference in your profile). + + + Don't use smileys + Check this to prevent certain character combinations in your post from being parsed and rendered as smileys. + + + Attachments + If enabled, this feature allows you to attach files to your posts in much the same way as most email clients, so you simply have to browse to the relevant file(s) on your computer before clicking Post. You can delete your attachment(s) or add more by modifying your post, but please note that: + + The permitted file types and sizes are set by the forum administrator(s). + Although most forums are likely be configured to display attached images as part of the post, it's not possible to preview attachments so you should always browse to and attach your files just before you finally post your message. + + +
    +
    + References + + SMF Bulletin Board Code + The buttons shown belong to the SMF default theme and may differ from forum to forum. + + + + Tag Name + Button + Code + Output + Comments + + + Bold + bold + [b]bold[/b] + ]]> + bold + ]]> + * + + + Italicized + italicize + [i]italicized[/i] + ]]> + italicized + ]]> + * + + + Underline + underline + [u]underline[/u] + ]]> + underline + ]]> + * + + + Strikethrough + strike + [s]strikethrough[/s] + ]]> + strikethrough + ]]> + * + + + Glow + glow + [glow=red,2,50]glow[/glow] + ]]> + glow + ]]> + The three attributes (eg red, 2, 50) in the 'glow' tag are color, strength and width respectively. + + + Shadow + shadow + [shadow=red,left]]]>shadow]]>[/shadow] + ]]> + shadow + ]]> + The two attributes (eg red, left) in the 'shadow' tag are color and direction respectively. + + + Marquee + move + [move]move[/move] + ]]> + move + ]]> + Not valid XHTML, but can also be used for images! + + + Preformatted Text + pre + [pre]Simple]]>&space;&space;Machines]]>&space;&space;&space;&space;Forum[/pre] + ]]> + Simple + Machines + Forum + ]]> + Preserves critical text formatting, rendered in a monospace font. + + + Left Align + left + [left]left align[/left] + ]]> + left align + ]]> + * + + + Centered + center + [center]centered[/center] + ]]> + centered + ]]> + * + + + Right Align + right + [right]right align[/right] + ]]> + right align + ]]> + * + + + Right-to-Left + none + [rtl]right to left![/rtl] + ]]> + right to left! + ]]> + Typical usage would be to post Arabic or Hebrew in an English document. + + + Left-to-Right + none + [ltr]left to right![/ltr] + ]]> + left to right! + ]]> + Typical usage would be to post English in an Arabic or Hebrew document. + + + Horizontal Rule + hr + [hr] + ]]> + + + * + + + Font Size + size + [size=10pt]font size[/size] + ]]> + font size + ]]> + * + + + Font Face + face + [font=Verdana]font face[/font] + ]]> + font face + ]]> + Only fonts installed on the user's computer will be displayed, so use with caution! + + + Font Color + + + [color=Red]red[/color] + ]]> + red + ]]> + Select the color from the drop-down. + + + Insert Flash + flash + [flash=200,200]]]>http://somesite/somefile.swf]]>[/flash] + ]]> + http://somesite/somefile.swf + ]]> + Please note that, if embedded Flash has been disabled by the forum administrator(s), the Flash file will appear as a straight hyperlink as shown here. The two attributes in the 'flash' tag (where relevant) are width and height respectively. + + + + Insert Image + img + [img]]]>http://somesite/image.gif]]>[/img] + ]]> + + + Type the width and height attributes to resize the image. + + + [img width=48 height=48]]]>http://somesite/image.gif]]>[/img] + ]]> + + + + + Insert Hyperlink + url + [url]http://somesite/[/url] + ]]> + http://somesite/ + ]]> + NB the 'url' tag opens in a new window, but you can type 'iurl' tags to open in the same window. + + + [url=http://somesite/]]]>descriptive link]]>[/url] + ]]> + descriptive link + ]]> + + + Insert Email + email + [email]]]>someone@somesite]]>[/email] + ]]> + someone@somesite + ]]> + * + + + Insert FTP Link + ftp + [ftp]]]>ftp://somesite/somefile]]>[/ftp] + ]]> + ftp://somesite/somefile + ]]> + * + + + [ftp=ftp://somesite/somefile]]]>descriptive link]]>[/ftp] + ]]> + descriptive link + ]]> + + + Insert Table + table + [table][/table] + * + + + No meaningful output from the 'table' tags alone. + + + Insert Table Row + tr + [table][tr][/tr][/table] + * + + + No meaningful output from the 'table' and 'tr' tags alone. + + + Insert Table Column + td + [table][tr][td]]]>content]]>[/td][/tr][/table] + ]]> + content + ]]> + Note the correct nesting of the tags, so the 'table' tags contain the 'tr' tags, which each contain an equal number of 'td' tags! + + + [table][tr][td]SMF[/td]]]>[td]Bulletin[/td][/tr]]]>[tr][td]Board[/td]]]>[td]Code[/td][/tr][/table] + SMFBulletinBoardCode]]> + + + + + Superscript + sup + [sup]superscript[/sup] + ]]> + superscript + ]]> + * + + + Subscript + sub + [sub]subscript[/sub] + ]]> + subscript + ]]> + * + + + Teletype + tele + [tt]teletype[/tt] + ]]> + teletype + ]]> + Monospace font. + + + Insert Code + code + [code]<?php phpinfo(); ?>[/code] + Code:
    <?php phpinfo(); ?>
    ]]> + + + Always use to preserve formatting of code and avoid parsing as BBC and/or smileys! + + + Insert Quote + quote + [quote]quote[/quote] + Quote
    ]]> + quote + ]]> + Note the optional 'author' attribute. + + + [quote author=author]quote[/quote] + Quote from: author
    ]]> + quote + ]]> + + + Insert List + list + [list]]]>[li]SMF[/li]]]>[li]YaBB SE[/li]]]>[/list] +
  • SMF
  • YaBB SE
  • ]]>
    + + + While you can add as many items as you wish, each item must be contained by the correct opening and closing tags. You can also style your list item bullets with special opening tags and no closing tags, but this option doesn't currently output valid XHTML. +
    + + [list]]]>[o]circle]]>[O]circle]]>[0]circle]]>[*]disc]]>[@]disc]]>[+]square]]>[x]square]]>[#]square]]>[/list] +
  • circle
  • circle
  • circle
  • disc
  • disc
  • square
  • square
  • square
    ]]> + + + + + Abbreviation + none + [abbr=exemlpi gratia]eg[/abbr] + ]]> + eg + ]]> + Displays the full expression for the abbreviation on mouseover. + + + Acronym + none + [acronym=Simple Machines Forum]SMF[/acronym] + ]]> + SMF + ]]> + Displays the full expression for the acronym on mouseover. + + + + + SMF Smileys + The smileys shown here are the standard set from the SMF default theme and may differ from forum to forum. + + + + Name + Image (click to insert) + Code (type to insert) + + + Smiley + smiley + :) + + + Wink + wink + ;) + + + Cheesy + cheesy + :D + + + Grin + grin + ;D + + + Angry + angry + >:( + + + Sad + sad + :( + + + Shocked + shocked + :o + + + Cool + cool + 8) + + + Huh + huh + ??? + + + Roll Eyes + rolleyes + ::) + + + Tongue + tongue + :P + + + Embarrassed + embarassed + + :-[ + + + Lips Sealed + lipsrsealed + :-X + + + Undecided + undecided + :-\ + + + Kiss + kiss + :-* + + + Cry + cry + :'( + + + Please note that not all of the smiley codes will be correctly parsed and converted to images unless their opening spaces are present. + + + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + + \ No newline at end of file diff --git a/Themes/modern/help/posting.russian.html b/Themes/modern/help/posting.russian.html new file mode 100644 index 0000000..4cdc8bf --- /dev/null +++ b/Themes/modern/help/posting.russian.html @@ -0,0 +1,1077 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    - , , , , . , - , HTML Bulletin Board, BB .

    +

    - + .

    +
      +
    1. + +
        +
      1. +
      2. +
      3. +
      4. /
      5. +
      6. +
      7. +
      +
    2. +
    3. + +
        +
      1. +
      2. Bulletin Board Code
      3. +
      4. +
      +
    4. +
    5. +
    6. + +
        +
      1. +
      2. +
      3. +
      4. +
      +
    7. +
    8. + +
        +
      1. SMF Bulletin Board
      2. +
      3. SMF
      4. +
      +
    9. +
    +

    +

    +

    , , ( , ), . , - ( , , ). ( , ) . , , , . , , , , SMF - , , .

    +
    +
    +
    + + + + +
    + 
    + |- + 
    + | |- + 
    + | | |- + 
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
      + .
    :
    +
    + .

    + : alt+s alt+p

    +
    +
    +

    +
    +

    +
      +
    • ( ) .
    • +
    • .
    • +
    +

    +

    , + , . + , + + . , + - + , + . + , , + . + - , .

    +

    , .

    +

    .

    +

    +

    ( , ) + , + + . + , - + .

    +

    /

    +

    , , , , . , .

    +

    " ", , .

    +

    +

    , . , :

    + +

    +

    , . , , , .

    +

    , , OK ? , . , .

    +

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + +
    :
    + | |   | |
        Email FTP |       |  | | +
    + Smile + Crying or Very sad + Sad + Exclamation + Surprised + Question + Shocked + Idea + Confused + Arrow + Cool + Neutral + Embarassed + Laughing + Razz +   ! + Wink +  . + Evil or Very Mad +  ! + Rolling Eyes + + ! + Twisted Evil + + +
    +
    +
    +

    +
    +

    +

    +

    , .

    +

    Bulletin Board Code

    +

    Bulletin Board Code ( BBC) - . , HTML, BB . , (Microsoft Word ), , , , .

    +

    SMF Bulletin Board Code .

    +

    +

    , , . , . , .

    +

    .

    +

    .

    +

    , , . , . , - , . . , , " ", B (), "[b] [/b]", . (NB! Opera , ). "[b] [/b]" I () - "[i][b] [/b][/i]", , : , , "", , , .

    +

    , , .

    +

    +

    , :

    +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + +
    + ...
    +
    + + + + + + + + + + +
      .
      .
      .
    +
    +
    :
    +
    + : jpg, gif, png, mp3, zip, gzip, rar
    + : 500 KB, : 2
    +
    + : alt+s alt+p

    + +
    +
    +

    +
    +

    +

    +

    , .

    +

    +

    , , . .

    +

    +

    , .

    +

    +

    , , . , . , , :

    +
      +
    • .
    • +
    • , , .
    • +
    +

    +

    SMF Bulletin Board Code

    +

    - . , . SMF .

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    [b][/b]*
    [i][/i]*
    [u][/u]*
    [s][/s]*
    [glow=red,2,50][/glow] +
    + +
    +
    ( red, 2, 50) - , .
     [shadow=red,left]
    +
    + [/shadow]
    +
    + +
    +
    ( red, left) - .
    [move][/move] XHTML, !
     [pre]Simple
    +   Machines
    +     Forum[/pre]
    +
    +Simple
    +  Machines
    +			Forum
    +
    +
    , .
     [left] [/left] +

    +
    *
    [center][/center] +
    + +
    +
    *
     [right] [/right] +

    +
    *
    *[rtl] ![/rtl] +
    + ! +
    +
    - . , .
    *[ltr] ![/ltr] +
    + ! +
    +
    - .
     [hr] +
    +
    , . - .
     [size=10pt] e[/size] *
     [font=Verdana] [/font] , , !
    [color=Red][/color] .
     [flash=200,200]
    + http://somesite/somefile.swf
    + [/flash]
    http://somesite/somefile.swf , , , . - .
     [img]
    + http://somesite/image.gif
    + [/img]
    height width, .
    [img width=48 height=48]
    + http://somesite/image.gif
    + [/img]
     [url]http://somesite/[/url]http://somesite/NB! 'url' , 'iurl', .
    [url=http://somesite/]
    + --- !
    + [/url]
    --- !
    E-mail Email[email]
    + @.
    + [/email]
    @.*
    FTP  FTP [ftp]
    + ftp://somesite/somefile
    + [/ftp]
    ftp://somesite/somefile*
    [ftp=ftp://somesite/somefile]
    + --- !
    + [/ftp]
    --- !
     [table][/table]* , .
       [table][tr][/tr][/table]* 'table', .
       [table][tr][td]
    +
    + [/td][/tr][/table]
    + + + + +
    +
    : 'table' 'tr', - 'td'!
    [table][tr][td][/td]
    + [td][/td][/tr]
    + [tr][td][/td]
    + [td][/td][/tr][/table]
    + + + + + + + + + +
    +
     [sup] [/sup] *
     [sub] [/sub] *
    [tt][/tt]
     [code]<?php phpinfo(); ?>[/code] +
    + : +
    +
    + <?php phpinfo(); ?> +
    +
    , BBC / !
    [quote][/quote] +
    + +
    +
    + +
    +
    'author'.
    [quote author=][/quote] +
    + : +
    +
    + +
    +
     [list]
    + [li]SMF[/li]
    + [li]YaBB SE[/li]
    + [/list]
    +
      +
    • SMF
    • +
    • YaBB SE
    • +
    +
    , , . ( ). XHTML.
    [list]
    + [o]
    + [O]
    + [0]
    + [*]
    + [@]
    + [+]
    + [x]
    + [#]
    + [/list]
    +
      +

    • +

    • +

    • +

    • +

    • +

    • +

    • +

    • +
    +

    +

    +

    , SMF, , .

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ( ) ( )
    Smile:)
    Crying or very sad:cry:
    Sad:(
    Exclamation:!:
    Surprised:o
    Question:?:
    Shocked:shock:
    Idea:idea:
    Confused:?
    Arrow:arrow:
    Cool8)
    Neutral:|
    Embarassed:oops:
    Laughing:lol:
    Razz:P
    !:anger:
    Wink:wink:
    :budda:
    Evil or Very Mad:evil:
    !:idea:
    Rolling Eyes:roll:
    King:king:
    !:kiss:
    Twisted Evil:twisted:
    Mad:x
    !:nafig:
    :-:
    :lover:
    :velo:
    :kupid:
    :thunder:
    :banned:
    :attention:
    :stup:
    :close:
    :345:
    :ban:
    :001:
    :offtopic:
    :balet:
    :dead:
    :kiss:
    :lamer:
    :love:
    :susp:
    8X

    +

    , , .

    + + + diff --git a/Themes/modern/help/posting.xslt b/Themes/modern/help/posting.xslt new file mode 100644 index 0000000..c790966 --- /dev/null +++ b/Themes/modern/help/posting.xslt @@ -0,0 +1,454 @@ + + + + +
    +
    +
    + + + + +
    + + +  + +
    + |- + +  + +
    + | + |- + +  + +
    + | + | + |- + +  + +
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
     
    + : + + +
    + +
     
    + +
    + +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + +
    + : + + + +
    + + + + | + {.} + + + +
    + + + | + {.} + +
    + + + + {.} + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + + + +
    + + ... +
    +
    + + + + + + + + + + +
    +   +
    +   +
    +   +
    +
    +
    + : + + +
    + +
    + +
    + +
    + + +
    + +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + * + + + + {bbc-name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {bbc-name} + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + +
    \ No newline at end of file diff --git a/Themes/modern/help/profile.english.html b/Themes/modern/help/profile.english.html new file mode 100644 index 0000000..47db2fe --- /dev/null +++ b/Themes/modern/help/profile.english.html @@ -0,0 +1,461 @@ + + + + + + + + + SMF User Help: Profile + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Profile


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    The profile screen in the default theme normally consists of a single main pane, with an additional menu to the left to lead you through the editing options for your own profile. Please note that, because an SMF forum may be customized extensively by its administrator(s), the features and user permissions described here are typical rather than definitive.

    +

    To edit your own profile, start by selecting Profile from the main menu or clicking your own username. You can also view (but not edit) other members' profiles by clicking on their names.

    +
      +
    1. + Information Normally Available to all Members +
        +
      1. Profile Info
      2. +
      +
    2. +
    3. + Settings Normally Available to Profile Owners +
        +
      1. Modify Profile
      2. +
      3. Actions
      4. +
      +
    4. +
    5. + Settings Normally Restricted to Admins +
        +
      1. Profile Info
      2. +
      3. Modify Profile
      4. +
      5. Actions
      6. +
      +
    6. +
    +

    Information Normally Available to all Members

    +

    Profile Info

    +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
      Username: Member's login namePicture/Text
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name:Member's screen name
    Posts:Member's number of posts
    Position:Member's member group or post group
    Date Registered:Date and time of registration
    Last Active:Date and time last active
    +
    +
    ICQ:
    AIM:
    MSN:
    YIM:
    Email:member@their.address
    Website:
    Current Status:Online Online
    +
    +
    Gender:
    Age:N/A
    Location:
    Local Time:Current date and time in member's time zone
    Language:
    +
    +
    + + + + + + + +
    Signature:
    +
    +

    +
    Additional Information:
    Send this member a personal message.
    +
    + Show the last posts of this person.
    + Show general statistics for this member.
    +
    +

    +
    +

    +
      +
    • This Summary screen is not only there to tell you about others, but also the first screen that you see when editing your own profile.
    • +
    • Members may choose to hide their email address and/or online status.
    • +
    • The fields left empty here are not filled in by default, so you should edit your profile if you wish to display this information.
    • +
    • You can send the profile owner a Personal Message by clicking the Current Status On/Offline Icon or following the link from Additional Information below.
    • +
    • Show the last posts of this person links to a complete paginated listing of the member's posts.
    • +
    • Show general statistics for this member links to a screen of statistics about the member's time online and posting activity.
    • +
    +

    Settings Normally Available to Profile Owners

    +

    While the Summary screen is the same as the one shown above and the Show Posts and Show Stats links are effectively duplicates, profile owners are also provided with the tools to customize their own profiles:

    +

    Modify Profile

    +
      +
    • Account Related Settings enables you to make changes to your display name (your login or username can only be changed by an administrator), preferred language (if the forum administrators have installed alternative language packs), email and password settings.
    • +
    • Forum Profile Information enables you to enter optional personal details such as gender, birthdate, location, website and instant messenger contact information. It's also where you go to enter your own personal text and signature and select an avatar (personal picture) from a list (if provided by the forum administrators) or link to one of your own on the web.
    • +
    • Look and Layout Preferences enables you to select your preferred theme (forum skin), time zone and format and other personal choices for layout settings. Note that the currently selected option in the menu pane is highlighted in bold type:
    • +
    +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Profile Info
    Summary
    + Show Stats
    + Show Posts
    +
    Modify Profile
    Account Related Settings
    + Forum Profile Information
    + Look and Layout Preferences
    + Notifications and Email
    + Personal Message Options
    +
    Actions
    Delete this account
    +
    +
    +
    + + + + + + + + + + +
       Edit Profile

    + This section allows you to customize the look and layout of the forum.
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Current Theme: Forum or Board Default (change)
    +
    +
    Time Format:
    + Help The format here will be used to show dates throughout this forum.

    +
    + Time Offset: +
    + Number of hours to +/- to make displayed time equal to your local time. +
    +

    + (Current forum time should be displayed here.)
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Show board descriptions inside boards.
    Show child boards on every page inside boards, not just the first.
    Don't show other user's avatars.
    Don't show other user's signatures.
    Return to topics after posting by default.
    Show most recent posts at the top.
    Show most recent personal messages at top.
    First day of the week on the calendar::
    Use quick reply on topic display:
    Show quick-moderation on message index as 
    +
    +
    +

    +
    +
    +

    +
    +

    +
      +
    • Notifications and Email enables you to select personal preferences for notifications (emails about new topics/replies) and lists any notifications that you have set up.
    • +
    • Personal Message Options enables you to set up an ignore list (blacklist) for Personal Messages, to request notification of new PMs by email and to save copies of your outgoing PMs by default.
    • +
    +

    Actions

    +
      +
    • Delete this account does exactly what it says! Yes, there's a confirmation screen, but it really does delete your own account, so be careful...
    • +
    +

    Settings Normally Restricted to Admins

    +

    As well as being able to view/edit any of the details above from other members' profiles, some further options are normally visible to (and executable by) admins only:

    +
    +
    +
    +

    Profile Info

    +
      +
    • Track User provides a list of IP numbers used by the member, other members who might be in the same IP range and error messages generated/experienced by the member.
    • +
    • Track IP provides tools for tracking members, messages and errors from any specified IP range.
    • +
    • Show Permissions lists the board permissions that have been granted to the member and who gave them.
    • +
    +

    Modify Profile

    +
      +
    • Account Related Settings is basically the same screen as shown to profile owners, but with the additional option to assign members to member groups.
    • +
    • Forum Profile Information is basically the same screen as shown to profile owners, but with the additional option to specify custom titles for members.
    • +
    +

    Actions

    +
      +
    • Ban this user provides tools for banning users, configuring the level of the ban and maintaining a ban list noting the details of any bans in force.
    • +
    • Delete this account is similar to the screen of the same name available to all members, but the confirmation question is different when it's not your own account that's about to be deleted.
    • +
    +
    +

    + + + \ No newline at end of file diff --git a/Themes/modern/help/profile.english.xml b/Themes/modern/help/profile.english.xml new file mode 100644 index 0000000..1e17f1e --- /dev/null +++ b/Themes/modern/help/profile.english.xml @@ -0,0 +1,194 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Profile + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + The profile screen in the default theme normally consists of a single main pane, with an additional menu to the left to lead you through the editing options for your own profile. Please note that, because an SMF forum may be customized extensively by its administrator(s), the features and user permissions described here are typical rather than definitive. + To edit your own profile, start by selecting Profile from the main menu or clicking your own username. You can also view (but not edit) other members' profiles by clicking on their names. + +
    + Information Normally Available to all Members + + Profile Info + + + Username + Member's login name + Picture/Text + Name + Member's screen name + Posts + Member's number of posts + Position + Member's member group or post group + Date Registered + Date and time of registration + Last Active + Date and time last active + + Email + member@their.address + Website + Current Status + Personal Message + Online + Gender + Age + N/A + Location + Local Time + Current date and time in member's time zone + Language + Signature + Additional Information + Send this member a personal message. + Show the last posts of this person. + Show general statistics for this member. + + + This Summary screen is not only there to tell you about others, but also the first screen that you see when editing your own profile. + Members may choose to hide their email address and/or online status. + The fields left empty here are not filled in by default, so you should edit your profile if you wish to display this information. + You can send the profile owner a Personal Message by clicking the Current Status On/Offline Icon or following the link from Additional Information below. + Show the last posts of this person links to a complete paginated listing of the member's posts. + Show general statistics for this member links to a screen of statistics about the member's time online and posting activity. + + +
    +
    + Settings Normally Available to Profile Owners + While the Summary screen is the same as the one shown above and the Show Posts and Show Stats links are effectively duplicates, profile owners are also provided with the tools to customize their own profiles: + + Modify Profile + + Account Related Settings enables you to make changes to your display name (your login or username can only be changed by an administrator), preferred language (if the forum administrators have installed alternative language packs), email and password settings. + Forum Profile Information enables you to enter optional personal details such as gender, birthdate, location, website and instant messenger contact information. It's also where you go to enter your own personal text and signature and select an avatar (personal picture) from a list (if provided by the forum administrators) or link to one of your own on the web. + Look and Layout Preferences enables you to select your preferred theme (forum skin), time zone and format and other personal choices for layout settings. Note that the currently selected option in the menu pane is highlighted in bold type: + + + + Profile Info + Summary + Show Stats + Show Posts + Modify Profile + Edit Profile + Account Related Settings + Forum Profile Information + Look and Layout Preferences + Notifications and Email + Personal Message Options + Actions + Delete this account + This section allows you to customize the look and layout of the forum. + Current Theme + Forum or Board Default + change + Time Format + Help + The format here will be used to show dates throughout this forum. + Forum Default + Month Day, Year, HH:MM:SS a/pm + Month Day, Year, HH:MM:SS (army time.) + YYYY-MM-DD, HH:MM:SS + DD Month YYYY, HH:MM:SS + DD-MM-YYYY, HH:MM:SS + Time Offset + Number of hours to +/- to make displayed time equal to your local time. + Current forum time should be displayed here. + Show board descriptions inside boards. + Show child boards on every page inside boards, not just the first. + Don't show other user's avatars. + Don't show other user's signatures. + Return to topics after posting by default. + Show most recent posts at the top. + Show most recent personal messages at top. + Use quick reply on topic display + don't show at all + show, off by default + show, on by default + Show quick-moderation on message index as + don't show + checkboxes + icons + First day of the week on the calendar: + Sunday + Monday + Change profile + + + Notifications and Email enables you to select personal preferences for notifications (emails about new topics/replies) and lists any notifications that you have set up. + Personal Message Options enables you to set up an ignore list (blacklist) for Personal Messages, to request notification of new PMs by email and to save copies of your outgoing PMs by default. + + + + Actions + + Delete this account does exactly what it says! Yes, there's a confirmation screen, but it really does delete your own account, so be careful... + + +
    +
    + Settings Normally Restricted to Admins + As well as being able to view/edit any of the details above from other members' profiles, some further options are normally visible to (and executable by) admins only: + + + + Track User + Track IP + Show Permissions + Ban this user + + + + Profile Info + + Track User provides a list of IP numbers used by the member, other members who might be in the same IP range and error messages generated/experienced by the member. + Track IP provides tools for tracking members, messages and errors from any specified IP range. + Show Permissions lists the board permissions that have been granted to the member and who gave them. + + + + Modify Profile + + Account Related Settings is basically the same screen as shown to profile owners, but with the additional option to assign members to member groups. + Forum Profile Information is basically the same screen as shown to profile owners, but with the additional option to specify custom titles for members. + + + + Actions + + Ban this user provides tools for banning users, configuring the level of the ban and maintaining a ban list noting the details of any bans in force. + Delete this account is similar to the screen of the same name available to all members, but the confirmation question is different when it's not your own account that's about to be deleted. + + + + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/modern/help/profile.russian.html b/Themes/modern/help/profile.russian.html new file mode 100644 index 0000000..f4695e4 --- /dev/null +++ b/Themes/modern/help/profile.russian.html @@ -0,0 +1,466 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    , + . , , + , + .

    +

    , . , ( ) , .

    +
      +
    1. + , +
        +
      1. +
      +
    2. +
    3. + , +
        +
      1. +
      2. +
      +
    4. +
    5. + , +
        +
      1. +
      2. +
      3. +
      +
    6. +
    +

    ,

    +

    +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
      :  () /
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    +
    +
    ICQ:
    AIM:
    MSN:
    YIM:
    E-mail:@.
    :
    :Online Online
    +
    +
    :
    :N/A
    :
    :
    :
    +
    +
    + + + + + + + +
    :
    +
    +

    +
    :
    .
    +
    + .
    + .
    +
    +

    +
    +

    +
      +
    • - , .
    • +
    • e-mail / .
    • +
    • , , , , .
    • +
    • On/Offline .
    • +
    • - , .
    • +
    • - ( , ).
    • +
    +

    ,

    +

    , , :

    +

    +
      +
    • ( ), ( ), e-mail .
    • +
    • , , , , . ( ) ( , ) .
    • +
    • , , , . :
    • +
    +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + +

    +
    +
    +

    +
    +
    + e-mail
    +
    +

    +
    +
    +
    + + + + + + + + + + +
      

    + .
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :   ()
    +
    +
    :
    + Help .

    +
    + : +
    + +/- . +
    +

    + ( .)
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    .
    , .
    .
    , .
    .
    .
    :
    :
     
    +
    +
    +

    +
    +
    +

    +
    +

    +
      +
    • e-mail (e-mail /) , .
    • +
    • () , .
    • +
    +

    +
      +
    • . ! , + , + !
    • +
    +

    ,

    +

    , , , :

    +
    +
    + + + + + + + + + + + + + + + + + + + +

    +
    +
    +
    + IP
    +
    +

    +
    +
    + e-mail
    +
    +

    +
    +
    +

    +
    +

    +
      +
    • IP , , , / ( ) .
    • +
    • IP , IP.
    • +
    • , , .
    • +
    +

    +
      +
    • s , .
    • +
    • , .
    • +
    +

    +
      +
    • , .
    • +
    • , .
    • +
    +
    +

    + + + diff --git a/Themes/modern/help/profile.xslt b/Themes/modern/help/profile.xslt new file mode 100644 index 0000000..88c7f34 --- /dev/null +++ b/Themes/modern/help/profile.xslt @@ -0,0 +1,446 @@ + + + + +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
    +   + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :

    ICQ:
    AIM:
    MSN:
    YIM:
    : + + + +
    :
    : + + + + + () + + + + + + + + +

    :
    :
    :
    :
    + : + +

    + + + + + + + +
    :
    +
    +
    +
    +
    +
    :
    + + + +
    +
    + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + + + +
    +    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + :  () +

    + :
    + + + {help} + +
    +
    + +
    :

    ()

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    : + +
    : + +
      + +
    +

    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    + +
    +
    + +
    \ No newline at end of file diff --git a/Themes/modern/help/registering.english.html b/Themes/modern/help/registering.english.html new file mode 100644 index 0000000..f1210e0 --- /dev/null +++ b/Themes/modern/help/registering.english.html @@ -0,0 +1,118 @@ + + + + + + + + + SMF User Help: Registering + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Registering


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    When you have set up your SMF forum, or wish to join another SMF forum, you should register a username. This will enable you to maintain a consistent identity while posting and keep track of what you've read, no matter where you're working from or what computer you're using. You'll be able to fill out a personal profile and use the built-in personal message system. You'll be able to subscribe to email notifications, monitor your forum activity and more.

    +
      +
    1. How to Register
    2. +
    3. The Registration Screen
    4. +
    +

    How to Register

    +

    Assuming you've arrived at the forum as a guest and wish to register, you should be looking at one of these two things:

    +
      +
    • Any page of the forum, in which you case you should select Register from the main menu.
    • +
    • A login screen headed by a warning about access being restricted to registered members, in which case you should either use the registration link provided or select Register from the main menu.
    • +
    + + + + + + + +
    Warning!
    Only registered members are allowed to access this section.
    + Please login below or register an account with Forum Name.

    +

    The Registration Screen

    +
    +
    +
    + + + + + + + +
    Register - Required Information
    + + + + + + + + + + + + + + + + + +
    + Choose username: +
    + Used only for identification by SMF. You can use special characters after logging in, by changing your displayed name in your profile. +
    +
    + Email: +
    + This must be a valid email address. +
    +
    Choose password:
    Verify password:
    +
    + + + + + + + +
    This is where the registration agreement should be if there is one!

    +
    + +
    +
    +
    +

    +

    When you arrive at the registration screen, you will need to enter a username, email address and password, and may be offered the option of hiding your email address. Since most forums also require you to agree to their terms of use before your registration is accepted, you will normally have to read the agreement and check I Agree before continuing. What happens next depends on how the forum is configured, but, if the next thing you see is a login screen headed by a message inviting you to proceed, that's it, you're through and you can proceed to login! If not, there are two further possibilities:

    +
      +
    • If registration has been configured to require email activation, the next screen will tell you so and you should receive an immediate email with instructions about how to proceed. But there's also a useful link ('Did you miss your activation email?') in the User Info box in case you miss this email or mistype your email address.
    • +
    • If registration has been configured to require approval from a forum administrator, the next screen will tell you so and you should receive both an acknowledgement by email and another email later to inform you whether or not your application has been approved.
    • +
    + + + \ No newline at end of file diff --git a/Themes/modern/help/registering.english.xml b/Themes/modern/help/registering.english.xml new file mode 100644 index 0000000..33c5479 --- /dev/null +++ b/Themes/modern/help/registering.english.xml @@ -0,0 +1,66 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Registering + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + When you have set up your SMF forum, or wish to join another SMF forum, you should register a username. This will enable you to maintain a consistent identity while posting and keep track of what you've read, no matter where you're working from or what computer you're using. You'll be able to fill out a personal profile and use the built-in personal message system. You'll be able to subscribe to email notifications, monitor your forum activity and more. + +
    + How to Register + Assuming you've arrived at the forum as a guest and wish to register, you should be looking at one of these two things: + + Any page of the forum, in which you case you should select Register from the main menu. + A login screen headed by a warning about access being restricted to registered members, in which case you should either use the registration link provided or select Register from the main menu. + + + + Warning! + Only registered members are allowed to access this section. + Please login below or + register an account + with Forum Name. + +
    +
    + The Registration Screen + + + Register - Required Information + Choose username + Used only for identification by SMF. You can use special characters after logging in, by changing your displayed name in your profile. + Email + This must be a valid email address. + Hide email address from public? + Choose password + Verify password + This is where the registration agreement should be if there is one! + I Agree + Register + + When you arrive at the registration screen, you will need to enter a username, email address and password, and may be offered the option of hiding your email address. Since most forums also require you to agree to their terms of use before your registration is accepted, you will normally have to read the agreement and check I Agree before continuing. What happens next depends on how the forum is configured, but, if the next thing you see is a login screen headed by a message inviting you to proceed, that's it, you're through and you can proceed to login! If not, there are two further possibilities: + + If registration has been configured to require email activation, the next screen will tell you so and you should receive an immediate email with instructions about how to proceed. But there's also a useful link ('Did you miss your activation email?') in the User Info box in case you miss this email or mistype your email address. + If registration has been configured to require approval from a forum administrator, the next screen will tell you so and you should receive both an acknowledgement by email and another email later to inform you whether or not your application has been approved. + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/modern/help/registering.russian.html b/Themes/modern/help/registering.russian.html new file mode 100644 index 0000000..cadd785 --- /dev/null +++ b/Themes/modern/help/registering.russian.html @@ -0,0 +1,118 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    "" , SMF - ...! ( SMF ...), , . . .

    +
      +
    1. +
    2. +
    +

    +

    , + :

    +
      +
    • .
    • +
    • , , : , .
    + + + + + + + +
    !
    .
    + , .

    +

    +
    +
    +
    + + + + + + + +
    -
    + + + + + + + + + + + + + + + + + +
    + : +
    + . , , . , . +
    +
    + E-mail: +
    + e-mail . +
    +
    :
    :
    +
    + + + + + + + +
    , , !

    +
    + +
    +
    +
    +

    +

    , e-mail . e-mail , . , . , . , , - , , - ! ! ( , , , ) - :

    +
      +
    • , e-mail . , , . e-mail, ? .
    • +
    • , . , .
    • +
    + + + diff --git a/Themes/modern/help/registering.xslt b/Themes/modern/help/registering.xslt new file mode 100644 index 0000000..152f8cd --- /dev/null +++ b/Themes/modern/help/registering.xslt @@ -0,0 +1,100 @@ + + + + + + + + + + + +
    + +
    + +
    + + + +
    +
    +
    + + +
    +
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + +
    + : +
    +
    + +
    + : +
    +
    + + +
    + : + + +
    + : + + +
    +
    + + + + + + + +
    + +
    + +
    +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/modern/help/searching.english.html b/Themes/modern/help/searching.english.html new file mode 100644 index 0000000..2fac14e --- /dev/null +++ b/Themes/modern/help/searching.english.html @@ -0,0 +1,167 @@ + + + + + + + + + SMF User Help: Searching + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF User Help: Searching


    +
    +

    IntroductionRegisteringLogging InProfilePostingPersonal MessageSearching

    +
    +
    +

    While SMF naturally incorporates a powerful search engine, knowing how to use it is not surprisingly the key to returning successful results!

    +
      +
    1. Starting a Search
    2. +
    3. + Syntax +
        +
      1. Quote Marks
      2. +
      +
    4. +
    5. + Simple or Advanced? +
        +
      1. Simple Search
      2. +
      3. Advanced Search
      4. +
      +
    6. +
    +

    Starting a Search

    +

    Assuming the forum is running the SMF default theme (or a derivative of it), there should be both a simple Search field (partnered by an Advanced search text link) in the collapsable top section and a Search option in the main menu. If not, the main menu Search option should still lead straight to the advanced search screen.

    +

    Syntax

    +

    While you can just type (and search for) any combination of characters, you should consider using quotes to make your search really work for you:

    +

    Quote Marks

    +

    To put this in a nutshell, searching for simple machines forum will return any or all of these three words, but enclosing the search string in double quote marks (ie "simple machines forum") will return only the entire phrase.

    +

    Simple or Advanced?

    +

    Simple Search

    +

    To use the simple search (if enabled), the basic syntax outlined above is all you really need to know. But you might also like to know that this tool searches the entire forum for any or all of what you specify that's been posted during the last 9999 days (which is more than 27 years)! So, to take more control of your search, you should use the advanced search feature.

    +

    Advanced Search

    +

    Although the advanced search screen might initially seem a little intimidating if a forum has many boards and child boards, it's surprisingly straightforward when reduced to its basic components:

    +
    +
    +
    + + + + +
    +  Forum Name
    + |- +  Search
    + + + + + + + +
    Set Search Parameters
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Search for: by user:
        
     
    Options:Message age:

    +
    Between and days.
    Search order:

    + Choose a board to search in, or search all:
    +
    + + + + + + + + +
    Category name

    +
    +
    + + + + +
    +

    +
    +
    +

    +
      +
    • Some forums show the navigation tree at the top in a space-saving horizontal mode.
    • +
    • Despite initial appearances, there are really three options for how to search, with Match all words and Match any words being available from the drop-down, and "Match as phrase" still being available as described above.
    • +
    • The default * in the by user field is essentially a wildcard matching any poster. Please note that, while you can replace this with any single username for a more specific search, it's not currently possible to search for posts by multiple users except as that single wildcard.
    • +
    • Show results as messages returns the full message containing the search string (with a reply option) instead of the usual linked excerpt, but will naturally result in much larger results pages which might be significant if you are searching for a popular word or phrase.
    • +
    • Message age sets the minimum and maximum ages of posts to search.
    • +
    • Choose a board to search in provides you with another tool to narrow the scope of the search, with the default being 'all' (the whole forum or, more properly, all the boards to which you have read access).
    • +
    • The Search button not surprisingly sets the whole thing in motion, but hitting 'Enter' direct from any of the search fields is sometimes more convenient.
    • +
    + + + \ No newline at end of file diff --git a/Themes/modern/help/searching.english.xml b/Themes/modern/help/searching.english.xml new file mode 100644 index 0000000..322437e --- /dev/null +++ b/Themes/modern/help/searching.english.xml @@ -0,0 +1,94 @@ + + + + +]> + + + + english + Visit Simple Machines! + SMF User Help: Searching + + Introduction + Registering + Logging&space;In + Profile + Posting + Personal&space;Message + Searching + + + While SMF naturally incorporates a powerful search engine, knowing how to use it is not surprisingly the key to returning successful results! + +
    + Starting a Search + Assuming the forum is running the SMF default theme (or a derivative of it), there should be both a simple Search field (partnered by an Advanced search text link) in the collapsable top section and a Search option in the main menu. If not, the main menu Search option should still lead straight to the advanced search screen. +
    +
    + Syntax + While you can just type (and search for) any combination of characters, you should consider using quotes to make your search really work for you: + + Quote Marks + To put this in a nutshell, searching for simple machines forum will return any or all of these three words, but enclosing the search string in double quote marks (ie "simple machines forum") will return only the entire phrase. + + +
    +
    + Simple or Advanced? + + Simple Search + To use the simple search (if enabled), the basic syntax outlined above is all you really need to know. But you might also like to know that this tool searches the entire forum for any or all of what you specify that's been posted during the last 9999 days (which is more than 27 years)! So, to take more control of your search, you should use the advanced search feature. + + + Advanced Search + Although the advanced search screen might initially seem a little intimidating if a forum has many boards and child boards, it's surprisingly straightforward when reduced to its basic components: + + + Forum Name + Search + Set Search Parameters + Search for + Match all words + Match any words + by user + Options + Message age + Show results as messages + Topic subjects only + Between + and + days + Search order + Most relevant results first + Largest topics first + Smallest topics first + Most recent topics first + Oldest topics first + Choose a board to search in, or search all + Category name + Board Name + Another Board + Check all + + + Some forums show the navigation tree at the top in a space-saving horizontal mode. + Despite initial appearances, there are really three options for how to search, with and being available from the drop-down, and "Match as phrase" still being available as described above. + The default * in the by user field is essentially a wildcard matching any poster. Please note that, while you can replace this with any single username for a more specific search, it's not currently possible to search for posts by multiple users except as that single wildcard. + Show results as messages returns the full message containing the search string (with a reply option) instead of the usual linked excerpt, but will naturally result in much larger results pages which might be significant if you are searching for a popular word or phrase. + Message age sets the minimum and maximum ages of posts to search. + Choose a board to search in provides you with another tool to narrow the scope of the search, with the default being 'all' (the whole forum or, more properly, all the boards to which you have read access). + The Search button not surprisingly sets the whole thing in motion, but hitting 'Enter' direct from any of the search fields is sometimes more convenient. + + +
    + + Copyright ©right; 2001-2005 Lewis Media. All Rights Reserved. + +
    \ No newline at end of file diff --git a/Themes/modern/help/searching.russian.html b/Themes/modern/help/searching.russian.html new file mode 100644 index 0000000..2209e46 --- /dev/null +++ b/Themes/modern/help/searching.russian.html @@ -0,0 +1,167 @@ + + + + + + + + + SMF : + + + + + + + + + +
    Visit Simple Machines! + Visit Simple Machines! +

    SMF :


    +
    +

      

    +
    +
    +

    , , !

    +
      +
    1. +
    2. + +
        +
      1. +
      +
    3. +
    4. + ? +
        +
      1. +
      2. +
      +
    5. +
    +

    +

    , ( ) , .

    +

    +

    ( ) , , :

    +

    +

    , , , , ( " ") - , .

    +

    ?

    +

    +

    ( ) . , 9999 ( 27 )! , .

    +

    +

    , , , , :

    +
    +
    +
    + + + + +
    + 
    + |- + 
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :  :
        
     
    : :

    +
    .
    :

    + :
    +
    + + + + + + + + +

    +
    +
    + + + + +
    +

    +
    +
    +

    +
      +
    • ( ) .
    • +
    • , , .
    • +
    • *, , - , . , , *.
    • +
    • , , , , .
    • +
    • , .
    • +
    • . ' ' ( , , , ).
    • +
    • ( ...), 'Enter', , .
    • +
    + + + diff --git a/Themes/modern/help/searching.xslt b/Themes/modern/help/searching.xslt new file mode 100644 index 0000000..2e7a05b --- /dev/null +++ b/Themes/modern/help/searching.xslt @@ -0,0 +1,133 @@ + + + + +
    +
    +
    + + + + +
    + + +  + +
    + |- + +  + +
    +
    + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    : :
    +     +  
     
    ::
    +
    +
    +
    + + + + + . +
    :
    + +
    +
    + : +
    +
    + + + + + + + + +
    + + + + + + +
    + + +
    +
    + +
    +
    + + + + +
    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/Themes/modern/help/style.xslt b/Themes/modern/help/style.xslt new file mode 100644 index 0000000..e5e076a --- /dev/null +++ b/Themes/modern/help/style.xslt @@ -0,0 +1,207 @@ + + + +]> + + + + + + + + + + + + + + + + + + Version: 1.0; help/ + + + + + <xsl:value-of select="title" /> + + + + + + + + + + + + + + + + + + + + + + +
    + + {//visit-simple-machines} + + + {//visit-simple-machines} +

    +
    +
    +

    + + + + + + + + + + + + + + + +

    +
    +
    +
    + + + + + + + + + +
      + +
    1. + + + + +
        + +
      1. + + + +
      2. +
        +
      +
      +
    2. +
      +
    +
    + + + + + + + + + + +

    + +

    + +
    + + +

    + +

    + +
    + + +

    +
    + + + + + + + + + + +
    +
    + + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Themes/modern/images b/Themes/modern/images new file mode 120000 index 0000000..2a29803 --- /dev/null +++ b/Themes/modern/images @@ -0,0 +1 @@ +/var/www/img.rock.ru/forum/Themes/default/images \ No newline at end of file diff --git a/Themes/modern/index.php b/Themes/modern/index.php new file mode 100644 index 0000000..be9895a --- /dev/null +++ b/Themes/modern/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/Themes/modern/index.template.php b/Themes/modern/index.template.php new file mode 100644 index 0000000..4632de0 --- /dev/null +++ b/Themes/modern/index.template.php @@ -0,0 +1,596 @@ + + + + + + + + + + + + + + + + '; + echo ' + ', $context['page_title'], ''; + + // This is here because Gecko browsers properly support white-space.... + if ($context['browser']['is_gecko']) + echo ' + '; + + if ($options['style_width'] == 'liquid' OR isset($_COOKIE['style_width']) AND $_COOKIE['style_width'] == 'liquid') { + $style_width = "style.liquid.css"; + } else { + $style_width = "style.fixed.css"; + } + + echo ' + '; + + // Show all the relative links, such as help, search, contents, and the like. + echo ' + + + '; + + // If we're viewing a topic, these should be the previous and next topics, respectively. + // Also, we need jquery here (we don't need it on other pages yet, so let it be here). + if (!empty($context['current_topic'])) + echo ' + + + + + + + '; + + + // If we're in a board, or a topic for that matter, the index will be the board's index. + if (!empty($context['current_board'])) { + echo ' + + '; + } + + // We'll have to use the cookie to remember the header... + if ($context['user']['is_guest']) { + echo ' + '; + $options['collapse_header'] = !empty($_COOKIE['upshrink']); + } + + // Output any remaining HTML headers. (from mods, maybe?) + echo $context['html_headers']; +?> + +'; +?> + +
    +'; + + // The logo and the three info boxes. + echo ' + + + + + + + + +
    '; + + // This part is the logo and forum name. You should be able to change this to whatever you want... + echo ' + На главную страница форума'; + + echo ' + + Главная - Новости - Тексты песен - Рецензии - Чат - Mp3 - Хостинг для картинок - Блог
    + +
    '; +?> + + +
    + + *';//'; + + // Show the menu here, according to the menu sub template. + template_menu(); + + echo ' +
    '; + + + // The main content should go here. A table is used because IE 6 just can't handle a div. + echo ' + + +
    '; +} + +function template_main_below() +{ + global $context, $settings, $options, $scripturl, $txt; + + echo '
    '; + + // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere! + echo ' + +
    '; + echo ' + + + + + +
    + ', theme_copyright(), ' +
    '; + + // Show the load time? + if ($context['show_load_time']) + echo ' + ', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], ''; + + echo ' +
    '; + + // This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough. + if ($context['browser']['is_ie'] && !$context['browser']['is_ie4'] || $context['browser']['is_mac_ie'] || $context['browser']['is_safari']) + { + // The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself. + echo ' + '; + } + + $cache_dir = '/789324hj324y23789hfsd098/'; + include_once('/var/www/rock' . $cache_dir . 'tnx.php'); + $tnx = new TNX_n('rustyangel', $cache_dir); + + echo ' +
    ', $tnx->show_link(), '
    + +
    + Rambler's Top100 + Rambler's Top100 + MusicCounter'; +?> + + +
    '; + + // Here's some new code + echo ' + '; +?> +
    +
      +
    • +
    + + + +
  •   + +
  • + + +*/?> +
      + +
    • +
    • +
    + +
    +
    + +
    +
    + + + + + + + + + + +
    + +'; +} + +// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. +function theme_linktree() +{ + global $context, $settings, $options; + + // Folder style or inline? Inline has a smaller font. + echo ''; + + // Each tree item has a URL and name. Some may have extra_before and extra_after. + foreach ($context['linktree'] as $link_num => $tree) + { + // Show the | | |-[] Folders. + if (!$settings['linktree_inline']) + { + if ($link_num > 0) + echo str_repeat('| ', $link_num - 1), '|-'; + echo '+  '; + } + + // Show something before the link? + if (isset($tree['extra_before'])) + echo $tree['extra_before']; + + // Show the link, including a URL if it should have one. + echo '', $settings['linktree_link'] && isset($tree['url']) ? '' . $tree['name'] . '' : $tree['name'], ''; + + // Show something after the link...? + if (isset($tree['extra_after'])) + echo $tree['extra_after']; + + // Don't show a separator for the last one. + if ($link_num != count($context['linktree']) - 1) + echo $settings['linktree_inline'] ? '  |  ' : '
    '; + } + + echo '
    '; +} + +// Show the menu up top. Something like [home] [help] [profile] [logout]... +function template_menu() +{ + global $context, $settings, $options, $scripturl, $txt, $modSettings; + + // Show the [home] and [help] buttons. + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[103] . '' : $txt[103]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[119] . '' : $txt[119]), '', $context['menu_separator']; + + // How about the [search] button? + if ($context['allow_search']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[182] . '' : $txt[182]), '', $context['menu_separator']; + + // Is the user allowed to administrate at all? ([admin]) + if ($context['allow_admin']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[2] . '' : $txt[2]), '', $context['menu_separator']; + + // Edit Profile... [profile] + if ($context['allow_edit_profile']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[79] . '' : $txt[467]), '', $context['menu_separator']; + + // The [calendar]! + if ($context['allow_calendar']) + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt['calendar24'] . '' : $txt['calendar24']), '', $context['menu_separator']; + + // Google Maps Mod + if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view'))) + echo ' + ', ($settings['use_image_buttons'] ? 'Google Map' : 'Google Map'), '', $context['menu_separator']; + + // If the user is a guest, show [login] and [register] buttons. + if ($context['user']['is_guest']) + { + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[34] . '' : $txt[34]), '', $context['menu_separator'], ' + ', ($settings['use_image_buttons'] ? '' . $txt[97] . '' : $txt[97]), ''; + } + // Otherwise, they might want to [logout]... + else + echo ' + ', ($settings['use_image_buttons'] ? '' . $txt[108] . '' : $txt[108]), ''; +} diff --git a/Themes/modern/jquery.cookie.js b/Themes/modern/jquery.cookie.js new file mode 100644 index 0000000..3214d05 --- /dev/null +++ b/Themes/modern/jquery.cookie.js @@ -0,0 +1,37 @@ +jQuery.cookie = function(name, value, options) { + if (typeof value != 'undefined') { + options = options || {}; + if (value === null) { + value = ''; + options.expires = -1; + } + var expires = ''; + if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { + var date; + if (typeof options.expires == 'number') { + date = new Date(); + date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); + } else { + date = options.expires; + } + expires = '; expires=' + date.toUTCString(); + } + var path = options.path ? '; path=' + (options.path) : ''; + var domain = options.domain ? '; domain=' + (options.domain) : ''; + var secure = options.secure ? '; secure' : ''; + document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + } else { + var cookieValue = null; + if (document.cookie && document.cookie != '') { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = jQuery.trim(cookies[i]); + if (cookie.substring(0, name.length + 1) == (name + '=')) { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; + } +}; diff --git a/Themes/modern/languages/Admin.english.php b/Themes/modern/languages/Admin.english.php new file mode 100644 index 0000000..832ba9b --- /dev/null +++ b/Themes/modern/languages/Admin.english.php @@ -0,0 +1,379 @@ +Blank a box to remove that word.'; +$txt[207] = 'Set Reserved Names'; +$txt[216] = 'Edit Your Forum Template'; +$txt[222] = 'Edit Server Settings'; +$txt[338] = 'Send an email to the above email list'; +$txt[341] = 'Set Reserved Names'; +$txt[342] = 'One reserved word per line.'; +$txt[347] = 'This page allows you to change the basic settings for your forum. Be very careful with these settings, as they may render the forum dysfunctional. Also note that some of these options (such as time format) are default options or for guests only.'; +$txt[348] = 'Maintenance Mode?'; +$txt[350] = 'Message Board Name'; +$txt[351] = 'Forum URL'; +$txt[352] = 'Cookie Name'; +$txt[355] = 'Webmaster Email Address'; +$txt[356] = 'SMF Directory'; +$txt[360] = 'Sources Directory'; +$txt[365] = 'Title BG Color'; +$txt[366] = 'Title Text Color'; +$txt[367] = 'Window BG Color'; +$txt[368] = 'Window BG Color #2'; +$txt[369] = 'Category BG Color'; +$txt[370] = 'Table Border Color'; +$txt[379] = 'Enable News?'; +$txt[380] = 'Enable Guest Posting?'; +$txt[388] = 'News Fader Title Color'; +$txt[389] = 'News Fader News Color'; +$txt[424] = 'SMF Admin Options'; +$txt[426] = 'Member Controls'; +$txt[427] = 'Forum Controls'; +$txt[428] = 'Forum Configuration'; +$txt[429] = 'Detailed Version Check'; +$txt[495] = 'SMF File'; +$txt[496] = 'SMF Package'; +$txt[501] = 'Maintenance Controls'; +$txt[521] = 'Show buttons as images instead of text'; +$txt[571] = 'Credits'; +$txt[584] = 'Show and require agreement letter when registering'; +$txt[608] = 'Delete Selected Members'; +$txt[610] = 'Repair All Boards and Topics'; +$txt[644] = 'This is your "' . $txt[208] . '". From here, you can edit settings, maintain your forum, view logs, install packages, manage themes, and many other things.
    If you have any trouble, please look at the "Common Support & Issues" panel. If the information there doesn\'t help you, feel free to look to us for help with the problem.
    You may also find answers to your questions or problems by clicking the ' . $txt[119] . ' symbols for more information on the related functions.'; +$txt[670] = 'Please place one news item per box. Some BBC tags, such as [b], [i] and [u] are allowed in your news, as well as smileys and HTML. Clear a news item\'s text box to remove it.'; +$txt[684] = 'Forum Administrators'; +$txt[699] = 'Reserved names will keep members from registering certain usernames or using these words in their displayed names. Choose the options you wish to use from the bottom before submitting.'; +$txt[702] = 'Send activation email to new members upon registration?'; +$txt[726] = 'Match whole name only. If unchecked, search within names.'; +$txt[727] = 'Match case. If unchecked, search will be case insensitive.'; +$txt[728] = 'Check username.'; +$txt[729] = 'Check display name.'; +$txt[735] = 'You can email anyone from this page. The email addresses of the selected membergroups should appear below, but you may remove or add any email addresses you wish. Be sure that each address is separated in this fashion: \'address1; address2\'.'; +$txt[739] = 'Time in milliseconds to display each item in the news fader'; +$txt[740] = 'Show BBC Buttons on Posting and PM Send Pages?'; + +$txt['smf1'] = 'Failed to make backup of Settings.php - make sure Settings_bak.php exists and is writable.'; +$txt['modSettings_title'] = 'Edit Features and Options'; +$txt['modSettings_info'] = 'Change or set options that control how this forum operates.'; +$txt['smf5'] = 'Server on which the database resides:'; +$txt['smf6'] = 'Database Username:'; +$txt['smf7'] = 'Database Password:'; +$txt['smf8'] = 'Database Name:'; +$txt['smf11'] = 'Edit Registration Agreement'; +$txt['smf12'] = 'This agreement is shown when a user registers an account on this forum and has to be accepted before users can continue registration.'; +$txt['smf54'] = 'Database Tables Prefix:'; +$txt['smf55'] = 'Hold down the ctrl key to select multiple entries. Click the ' . $txt[17] . ' button when you are done.'; +$txt['smf73'] = 'Listing of forum errors'; +$txt['smf74'] = 'The following errors are fouling up your forum (blank if none)'; +$txt['smf75'] = 'has a bad first message'; +$txt['smf76'] = 'has a bad last message'; +$txt['smf81'] = 'does not have a matching board'; +$txt['smf83'] = 'does not have a matching category'; +$txt['smf84'] = 'Category'; +$txt['smf85'] = 'Would you like to fix these errors?'; +$txt['smf86'] = 'Fixing forum errors'; +$txt['smf89'] = 'Error creating a'; +$txt['smf92'] = 'All errors fixed! Please check on any categories, boards, or topics created to decide what to do with them.'; +$txt['smf201'] = 'Attachment Manager'; +$txt['smf202'] = 'From here you can administer the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed below.'; +$txt['smf203'] = 'File Attachment Statistics'; +$txt['smf204'] = 'Total Attachments'; +$txt['smf205'] = 'Total Size of Attachment Directory'; +$txt['smf206'] = 'Total Space Available in Attachment Directory'; +$txt['smf207'] = 'File Attachment Options'; +$txt['smf208'] = 'Attachment Log'; +$txt['smf209'] = 'Remove attachments older than'; +$txt['smf210'] = 'Remove attachments larger than'; +$txt['smf213'] = 'Attachment Name'; +$txt['smf214'] = 'File Size'; +$txt['smf215'] = 'No maximum directory size is currently set'; +$txt['smf216'] = '[attachment deleted by admin]'; +$txt['smf217'] = 'Live from Simple Machines...'; +$txt['smf219'] = 'Remove All'; +$txt['smf250'] = 'Please select the Member Group(s) you would like to send an email to.'; +$txt['smf281'] = 'Optimize Database'; +$txt['smf282'] = 'Your database contains %d tables.'; +$txt['smf283'] = 'Attempting to optimize your database...'; +$txt['smf284'] = 'Optimizing %1$s... %2$f kb optimized.'; +$txt['smf285'] = 'All of the tables were already optimized.'; +$txt['smf285b'] = 'It wasn\'t necessary to optimize any tables.'; +$txt['smf286'] = ' table(s) optimized.'; +$txt['smf307'] = 'has a non-existent topic ID'; +$txt['smf308'] = 'contains no messages'; +$txt['smf309'] = 'has a wrong number of replies'; +$txt['smf310'] = 'has a non-existent member ID'; +$txt['smf311'] = 'Successfully inserted salvaged messages in salvage category'; +$txt['smf312'] = 'topic(s) without messages have been removed successfully'; +$txt['smf319'] = 'Admin must approve all new members'; +$txt['smf320'] = 'Warning - agreement.txt is not writable, any changes you make will NOT be saved.'; + +$txt['dvc1'] = 'This shows you the versions of your installation\'s files versus those of the latest version. If any of these files are out of date, you should download and upgrade to the latest version at www.simplemachines.org.'; +$txt['dvc_more'] = '(more detailed)'; + +$txt['lfyi'] = 'You are unable to connect to simplemachines.org\'s latest news file.'; + +$txt['smileys_manage'] = 'Smileys and Smiley Sets'; +$txt['smileys_manage_info'] = 'Install new smiley sets or add smileys to existing ones.'; +$txt['package1'] = 'Package Manager'; +$txt['package_info'] = 'Install new features or modify existing ones with this interface.'; +$txt['theme_admin'] = 'Theme and Layout Settings'; +$txt['theme_admin_info'] = 'Setup and manage your themes and set or reset theme options.'; +$txt['registration_center'] = 'Registration Management'; +$txt['registration_center_info'] = 'Register, approve, and manage member registration.'; +$txt['registration_member'] = 'Register New Member'; + +$txt['viewmembers_name'] = 'Username (display name)'; +$txt['viewmembers_online'] = 'Last Online'; +$txt['viewmembers_today'] = 'Today'; +$txt['viewmembers_day_ago'] = 'day ago'; +$txt['viewmembers_days_ago'] = 'days ago'; + +$txt['display_name'] = 'Display name'; +$txt['email_address'] = 'Email Address'; +$txt['ip_address'] = 'IP address'; +$txt['member_id'] = 'ID'; + +$txt['security_wrong'] = 'Administration login attempt!' . "\n" . + 'Referer: ' . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'unknown') . "\n" . + 'User agent: ' . $_SERVER['HTTP_USER_AGENT'] . "\n" . + 'IP: ' . $GLOBALS['user_info']['ip']; + +$txt['email_as_html'] = 'Send in HTML format. (with this you can put normal HTML in the email.)'; +$txt['email_parsed_html'] = 'Add <br />s and &nbsp;s to this message.'; +$txt['email_variables'] = 'In this message you can use a few "variables". Click here for more information.'; +$txt['email_force'] = 'Send this to members even if they have chosen not to receive announcements.'; +$txt['email_as_pms'] = 'Send this to these groups using personal messages.'; + +$txt['ban_title'] = 'Ban Members'; +$txt[724] = 'IP banning: (e.g. 192.168.12.213 or 128.0.*.*) - one entry per line'; +$txt[725] = 'Email banning: (e.g. badguy@somewhere.com) - one entry per line'; +$txt[7252] = 'User name banning: (e.g. l33tuser) - one entry per line'; + +$txt['ban_description'] = 'Here you can ban troublesome people either by IP, hostname, username, or email.'; +$txt['ban_add_new'] = 'Add new ban'; +$txt['ban_banned_entity'] = 'Banned entity'; +$txt['ban_on_ip'] = 'Ban on IP (e.g. 192.168.10-20.*)'; +$txt['ban_on_hostname'] = 'Ban on Hostname (e.g. *.mil)'; +$txt['ban_on_email'] = 'Ban on Email Address (e.g. *@badsite.com)'; +$txt['ban_on_username'] = 'Ban on Username'; +$txt['ban_notes'] = 'Notes'; +$txt['ban_restriction'] = 'Restriction'; +$txt['ban_full_ban'] = 'Full ban'; +$txt['ban_cannot_post'] = 'Cannot post'; +$txt['ban_cannot_register'] = 'Cannot register'; +$txt['ban_add'] = 'Add'; +$txt['ban_edit_list'] = 'Edit ban list'; +$txt['ban_type'] = 'Ban Type'; +$txt['ban_days'] = 'day(s)'; +$txt['ban_will_expire_within'] = 'Ban will expire after'; +$txt['ban_expires'] = 'Expires'; +$txt['ban_actions'] = 'Actions'; +$txt['ban_expiration'] = 'Expiration'; +$txt['ban_reason_desc'] = 'Reason for ban, to be displayed to banned member.'; +$txt['ban_notes_desc'] = 'Notes that may assist other staff members.'; +$txt['ban_remove_selected'] = 'Remove selected'; +$txt['ban_remove_selected_confirm'] = 'Are you sure you want to remove the selected bans?'; +$txt['ban_modify'] = 'Modify'; + +$txt['ban_log'] = 'Ban log'; +$txt['ban_log_description'] = 'The ban log shows all attempts to enter the forum by banned users (\'full ban\' and \'cannot register\' ban only).'; +$txt['ban_log_no_entries'] = 'No ban log entries'; +$txt['ban_log_ip'] = 'IP'; +$txt['ban_log_email'] = 'Email address'; +$txt['ban_log_member'] = 'Member'; +$txt['ban_log_date'] = 'Date'; +$txt['ban_log_remove_all'] = 'Remove all'; +$txt['ban_log_remove_all_confirm'] = 'Are you sure you want to delete all ban log entries?'; +$txt['ban_log_remove_selected'] = 'Remove selected'; +$txt['ban_log_remove_selected_confirm'] = 'Are you sure you want to delete all selected ban log entries?'; + +$txt['apply_filter'] = 'Apply Filter'; +$txt['applying_filter'] = 'Applying Filter'; +$txt['filter_only_member'] = 'Only show the error messages of this member'; +$txt['filter_only_ip'] = 'Only show the error messages of this IP address'; +$txt['filter_only_session'] = 'Only show the error messages of this session'; +$txt['filter_only_url'] = 'Only show the error messages of this URL'; +$txt['filter_only_message'] = 'Only show the errors with the same message'; +$txt['session'] = 'Session'; +$txt['error_url'] = 'URL of page causing the error'; +$txt['error_message'] = 'Error message'; +$txt['clear_filter'] = 'Clear filter'; +$txt['remove_selection'] = 'Remove Selection'; +$txt['remove_filtered_results'] = 'Remove All Filtered Results'; +$txt['sure_about_errorlog_remove'] = 'Are you sure you want to remove all error messages?'; +$txt['reverse_direction'] = 'Reverse chronological order of list'; + +$txt['settings_not_writable'] = 'These settings cannot be changed because Settings.php is read only.'; + +$txt['maintain_title'] = 'Forum Maintenance'; +$txt['maintain_info'] = 'Optimize tables, make backups, check for errors, and prune boards with these tools.'; +$txt['maintain_done'] = 'Maintenance Completed.'; + +$txt['maintain_general'] = 'General Maintenance'; +$txt['maintain_recount'] = 'Recount all forum totals and statistics.'; +$txt['maintain_errors'] = 'Find and repair any errors.'; +$txt['maintain_logs'] = 'Empty out unimportant logs.'; + +$txt['maintain_karmalog'] = 'Empty out Karmachange Description log'; +$txt['maintain_optimize'] = 'Optimize all tables to improve performance.'; +$txt['maintain_version'] = 'Check all files against current versions.'; + +$txt['maintain_backup'] = 'Backup Database'; +$txt['maintain_backup_struct'] = 'Save the table structure.'; +$txt['maintain_backup_data'] = 'Save the table data. (the important stuff.)'; +$txt['maintain_backup_gz'] = 'Compress the file with gzip.'; +$txt['maintain_backup_save'] = 'Download'; + +$txt['maintain_old'] = 'Remove Old Posts'; +$txt['maintain_old1'] = 'Remove all topics not posted in for '; +$txt['maintain_old2'] = ' days, besides stickies.'; +$txt['maintain_old_all'] = 'All Boards'; +$txt['maintain_old_choose'] = 'Choose Specific Boards'; +$txt['maintain_old_remove'] = 'Remove'; +$txt['maintain_old_confirm'] = 'Are you really sure you want to delete old posts?\\n\\nThis cannot be undone!'; + +$txt['db_error_send'] = 'Send emails on MySQL connection error'; +$txt['db_persist'] = 'Use a persistent connection'; + +$txt['default_language'] = 'Default Forum Language'; + +$txt['maintenance1'] = 'Subject for display:'; +$txt['maintenance2'] = 'Message for display:'; + +$txt['errlog1'] = 'View Forum Error Log'; +$txt['errlog2'] = 'The error log tracks every error encountered by your forum. To delete any errors from the database, mark the checkbox, and click the ' . $txt[31] . ' button at the bottom of the page.'; + +$txt['theme4'] = 'Theme Settings'; +$txt['theme_current_settings'] = 'Current Theme\'s Settings'; + +$txt['parent_repair_found'] = 'Board %d does not have an existing parent board. (its parent is board %d)'; +$txt['parent_repair_fixed'] = 'Successfully assigned orphaned boards to the salvage area.'; + +$txt['repair_zeroed_ids'] = 'Found topics and/or messages with topic or message IDs of 0.'; + +$txt['dvc_your'] = 'Your Version'; +$txt['dvc_current'] = 'Current Version'; +$txt['dvc_sources'] = 'Sources'; +$txt['dvc_default'] = 'Default Templates'; +$txt['dvc_templates'] = 'Current Templates'; +$txt['dvc_languages'] = 'Language Files'; + +$txt['modlog_view'] = 'View Moderation Log'; +$txt['modlog_date'] = 'Date'; +$txt['modlog_member'] = 'Member'; +$txt['modlog_position'] = 'Position'; +$txt['modlog_action'] = 'Action'; +$txt['modlog_ip'] = 'IP'; +$txt['modlog_search_result'] = 'Search Results'; +$txt['modlog_total_entries'] = 'Total Entries'; +$txt['modlog_ac_banned'] = 'Banned'; +$txt['modlog_ac_locked'] = 'Locked'; +$txt['modlog_ac_stickied'] = 'Stickied'; +$txt['modlog_ac_deleted'] = 'Deleted'; +$txt['modlog_ac_deleted_member'] = 'Deleted Member'; +$txt['modlog_ac_removed'] = 'Removed'; +$txt['modlog_ac_modified'] = 'Modified'; +$txt['modlog_ac_merged'] = 'Merged'; +$txt['modlog_ac_split'] = 'Split'; +$txt['modlog_ac_moved'] = 'Moved'; +$txt['modlog_ac_profile'] = 'Profile Edit'; +$txt['modlog_ac_pruned'] = 'Pruned Board'; +$txt['modlog_ac_news'] = 'Edited News'; +$txt['modlog_enter_comment'] = 'Enter Moderation Comment'; +$txt['modlog_moderation_log'] = 'Moderation Log'; +$txt['modlog_moderation_log_desc'] = 'Below is a list of all the moderation actions that have been carried out by moderators of the forum.
    Please note: Entries cannot be removed from this log until they are at least 24 hours old.'; +$txt['modlog_no_entries_found'] = 'No entries found'; +$txt['modlog_remove'] = 'Remove'; +$txt['modlog_removeall'] = 'Remove All'; +$txt['modlog_go'] = 'Go'; +$txt['modlog_add'] = 'Add'; +$txt['modlog_search'] = 'Quick Search'; +$txt['modlog_by'] = 'By'; + +$txt['smileys_default_set_for_theme'] = 'Select default smiley set for this theme'; +$txt['smileys_no_default'] = '(use global default smiley set)'; + +$txt['censor_test'] = 'Test Censored Words'; +$txt['censor_test_save'] = 'Test'; +$txt['censor_case'] = 'Ignore case when censoring.'; +$txt['smf231'] = 'Check only whole words.'; + +$txt['admin_confirm_password'] = '(confirm)'; + +$txt['date_format'] = '(YYYY-MM-DD)'; +$txt['undefined_gender'] = 'Undefined'; +$txt['age'] = 'User age'; +$txt['activation_status'] = 'Activation Status'; +$txt['activated'] = 'Activated'; +$txt['not_activated'] = 'Not activated'; +$txt['primary'] = 'Primary'; +$txt['additional'] = 'Additional'; +$txt['messenger_address'] = 'Messenger Address'; +$txt['wild_cards_allowed'] = 'wildcard characters * and ? are allowed'; +$txt['search_for'] = 'Search for'; +$txt['member_part_of_these_membergroups'] = 'Member is part of these membergroups'; +$txt['membergroups'] = 'Membergroups'; +$txt['confirm_delete_members'] = 'Are you sure you want to delete the selected members?'; + +$txt['support_credits_title'] = 'Support and Credits'; +$txt['support_credits_info'] = 'Get support on common issues and version information to give if you have problems.'; +$txt['support_title'] = 'Support Information'; +$txt['support_versions_current'] = 'Current SMF version'; +$txt['support_versions_forum'] = 'Forum version'; +$txt['support_versions_php'] = 'PHP version'; +$txt['support_versions_mysql'] = 'MySQL version'; +$txt['support_versions_server'] = 'Server version'; +$txt['support_versions_gd'] = 'GD version'; +$txt['support_versions'] = 'Version Information'; +$txt['support_latest'] = 'Common Support & Issues'; +$txt['support_latest_fetch'] = 'Retrieving support information...'; + +$txt['edit_permissions'] = 'Edit Permissions'; +$txt['edit_permissions_info'] = 'Change restrictions and available features globally or to specific boards.'; +$txt['membergroups_members'] = 'Ungrouped Members'; +$txt['membergroups_guests'] = 'Unregistered Guests'; +$txt['membergroups_guests_na'] = 'n/a'; +$txt['membergroups_name'] = 'Name'; +$txt['membergroups_stars'] = 'Stars'; +$txt['membergroups_members_top'] = 'Members'; +$txt['membergroups_add_group'] = 'Add group'; +$txt['membergroups_permissions'] = 'Permissions'; + +$txt['permitgroups_restrict'] = 'Restrictive'; +$txt['permitgroups_standard'] = 'Standard'; +$txt['permitgroups_moderator'] = 'Moderator'; +$txt['permitgroups_maintenance'] = 'Maintenance'; +$txt['permitgroups_inherit'] = 'Inherit'; + +$txt['confirm_delete_attachments_all'] = 'Are you sure you want to delete all attachments?'; +$txt['confirm_delete_attachments'] = 'Are you sure you want to delete the selected attachments?'; +$txt['attachment_manager_browse_files'] = 'Browse Files'; +$txt['attachment_manager_recount'] = 'Recount'; +$txt['attachment_manager_avatars'] = 'Avatars'; +$txt['attachment_manager_attachments'] = 'Attachments'; +$txt['attachment_manager_last_active'] = 'Last Active'; +$txt['attachment_manager_member'] = 'Member'; +$txt['attachment_manager_avatars_older'] = 'Remove avatars from members not active for more than'; +$txt['attachment_manager_total_avatars'] = 'Total Avatars'; + +$txt['editnews_clickadd'] = 'Click here to add another item.'; +$txt['editnews_remove_selected'] = 'Remove selected'; +$txt['editnews_remove_confirm'] = 'Are you sure you want to delete the selected news items?'; +$txt['censor_clickadd'] = 'Click here to add another word.'; + +$txt['update_available'] = 'Update Available!'; +$txt['update_message'] = 'You\'re using an outdated version of SMF, which contains some bugs which have since been fixed. + It is recommended that you update your forum to the latest version as soon as possible. It only takes a minute!'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Admin.russian.php b/Themes/modern/languages/Admin.russian.php new file mode 100644 index 0000000..b8130c0 --- /dev/null +++ b/Themes/modern/languages/Admin.russian.php @@ -0,0 +1,380 @@ +Пустая ячейка - отключает цензуру слов.'; +$txt[207] = 'Установка зарезервированных имен'; +$txt[216] = 'Редактировать ваш шаблон Форума'; +$txt[222] = 'Редактировать настройки сервера'; +$txt[338] = 'Отправить Email по списку адресов представленному выше'; +$txt[341] = 'Установка зарезервированных имен'; +$txt[342] = 'Одно резервируемое слово на строку.'; +$txt[347] = 'Эта страница позволит Вам изменять настройки вашего форума. Следует быть очень осторожным с этими установочными параметрами, так как они могут вывести из строя Ваш SMF-форум. Также имейте в виду, что некоторые установки являются установками по умолчанию или установками для гостей (например, формат времени).'; +$txt[348] = 'Поставить На Техобслуживание?'; +$txt[350] = 'Название Форума'; +$txt[351] = 'URL Форума'; +$txt[352] = 'Cookie Name'; +$txt[355] = 'Email Вэбмастера'; +$txt[356] = 'Директория SMF Форума'; +$txt[360] = 'Sources - Исходная директория'; +$txt[365] = 'Цвет Фона Заглавия'; +$txt[366] = 'Цвет Текста Заглавия'; +$txt[367] = 'Цвет Фона Окна'; +$txt[368] = 'Цвет Фона Окна №2'; +$txt[369] = 'Цвет Фона Категории'; +$txt[370] = 'Цвет Обрамления Таблицы'; +$txt[379] = 'Включить Новости?'; +$txt[380] = 'Позволить Гостям Писать Сообщения?'; +$txt[388] = 'Цвет Заголовка Новостной Ленты'; +$txt[389] = 'Цвет Новостей Новостной Ленты'; +$txt[424] = 'Административные Опции SMF'; +$txt[426] = 'Контроль Участников'; +$txt[427] = 'Контроль Форума'; +$txt[428] = 'Конфигурация Форума'; +$txt[429] = 'Детальная Проверка Версии'; +$txt[495] = 'SMF Файл'; +$txt[496] = 'SMF Пакет'; +$txt[501] = 'Управление Техобслуживанием'; +$txt[521] = 'Показывать образы кнопок, вместо текста'; +$txt[571] = 'Разработчики'; +$txt[584] = 'Показывать соглашение участнику при регистрации'; +$txt[608] = 'Удалить Выбранных Участников'; +$txt[610] = 'Исправить Все Форумы и Темы'; +$txt[644] = 'Это ваша \'' . $txt[208] . '\'. Вы можете отсюда редактировать настройки, осуществлять техподдержку, смотреть логи, устанавливать дополнительные файлы, управлять темами и множество других вещей.
    Если возникают какие-либо проблемы, пожалуйста, смотрите панель " Общая Поддержка и Несоответствия". Если эта информация не помогает Вам, не бойтесь обращаться к нам за помощью с Вашими проблемами.
    Так же, Вы можете найти решения различных проблем нажав ' . $txt[119] . ' знак для получения более подробной информации относительно данной функции.'; +$txt[670] = 'Пожалуйста, помещайте по одной новости в окошко. Здесь разрешены некоторые BBC таги, такие как [b], [i] и [u] , а также смайлики и HTML. Очистите окошко, чтобы удалить новость.'; +$txt[684] = 'Администраторы Форума'; +$txt[699] = 'Зарезервированные имена будут запрещены для использования в качестве имени пользователя и отображаемого имени. Выберите опции, которые вы хотите использовать, поставив галочку перед подтверждением.'; +$txt[702] = 'Посылать Email с активацией для регистрации нового пользователя?'; +$txt[726] = 'Привести в соответствие полные имена. Если отключено, будет искать зарезервированные слова только в пределах имени.'; +$txt[727] = 'Согласовать данные. Если отключено, будет искать безотносительно регистру.'; +$txt[728] = 'Проверить имя пользователя.'; +$txt[729] = 'Проверить отображаемое имя.'; +$txt[735] = 'Вы можете написать с этой страницы электронное письмо кому угодно. Email выбранных групп участников появляются ниже, но вы можете удалить или добавить адреса по вашему желанию. Убедитесь, что каждый адрес разделен таким образом: \'address1; address2\'.'; +$txt[739] = 'Время в миллисекундах для обновления каждого пункта в новостной ленте'; +$txt[740] = 'Отобразить кнопки BBC на странице сообщений и странице отправки личных сообщений?'; + +$txt['smf1'] = 'Не получилось сделать бекап файла Settings.php - убедитесь, что файл Settings_bak.php существует и перезаписываемый.'; +$txt['modSettings_title'] = 'Изменить настройки и опции'; +$txt['modSettings_info'] = 'Изменить или установить опции, которые контролируют работу форума.'; +$txt['smf5'] = 'Сервер (хост) на котором расположена база данных:'; +$txt['smf6'] = 'Пользователь базы данных(DB Username):'; +$txt['smf7'] = 'Пароль к базе данных (DBPassword):'; +$txt['smf8'] = 'Имя базы данных (DB Name):'; +$txt['smf11'] = 'Изменить соглашение пользователя'; +$txt['smf12'] = 'Это соглашение демонстрируется пользователю при регистрации, и он не сможет продолжить регистрацию, пока не подтвердит его.'; +$txt['smf54'] = 'Префикс базы данных (DB Prefix):'; +$txt['smf55'] = 'Держите CTRL чтобы выбрать несколько значений . Нажмите ' . $txt[17] . ' когда все сделаете.'; +$txt['smf73'] = 'Список ошибок форума'; +$txt['smf74'] = 'Эти ошибки засоряют ваш Форум (пусто, если их нет)'; +$txt['smf75'] = 'ошибочно первое сообщение'; +$txt['smf76'] = 'ошибочно последнее сообщение'; +$txt['smf81'] = 'не подходит соответствующему форуму'; +$txt['smf83'] = 'не подходит соответствующей категории'; +$txt['smf84'] = 'Категория'; +$txt['smf85'] = 'Желаете ли вы исправить эти ошибки?'; +$txt['smf86'] = 'Исправление ошибок форума'; +$txt['smf89'] = 'Ошибка создает'; +$txt['smf92'] = 'Все ошибки исправлены! Вам необходимо проверить любую созданную категорию, форум или тему, чтобы решить, что с ними делать.'; +$txt['smf201'] = 'Менеджер вложений'; +$txt['smf202'] = 'Отсюда вы можете администрировать вложения на сервере. Вы можете удалять вложения в соответствии с их размером или датой. Статистика по вложениям отображена ниже.'; +$txt['smf203'] = 'Статистика Вложений'; +$txt['smf204'] = 'Количество Вложений'; +$txt['smf205'] = 'Общий Размер Вложений'; +$txt['smf206'] = 'Всего пространства, отведенного под папку вложений'; +$txt['smf207'] = 'Опции Вложений'; +$txt['smf208'] = 'Лог Вложений'; +$txt['smf209'] = 'Удалить вложения старше чем'; +$txt['smf210'] = 'Удалить вложения больше чем'; +$txt['smf213'] = 'Имя Вложения'; +$txt['smf214'] = 'Размер Файла'; +$txt['smf215'] = 'Не определен максимальный размер папки'; +$txt['smf216'] = '[вложение удалено администратором]'; +$txt['smf217'] = 'Напрямую с Simple Machines...'; +$txt['smf219'] = 'Удалить Все'; +$txt['smf250'] = 'Пожалуйста, выберите Группу (группы) участников, которым вы хотите отправить Email.'; +$txt['smf281'] = 'Оптимизировать базу данных'; +$txt['smf282'] = 'Ваша база данных содержит %d таблиц.'; +$txt['smf283'] = 'Оптимизация базы данных...'; +$txt['smf284'] = 'Оптимизация %1$s... %2$f kb оптимизировано.'; +$txt['smf285'] = 'Все таблицы уже оптимизированы.'; +$txt['smf285b'] = 'Не было необходимости оптимизировать таблицы.'; +$txt['smf286'] = ' таблица(ы) прошли оптимизацию.'; +$txt['smf307'] = 'содержит не существующий ID темы'; +$txt['smf308'] = 'не содержит сообщения'; +$txt['smf309'] = 'содержит не правильное количество сообщений'; +$txt['smf310'] = 'содержит не существующий ID участника'; +$txt['smf311'] = 'Удачно вставлено спасенное сообщение в спасенную категорию'; +$txt['smf312'] = 'тема (темы) не содержащие сообщений были успешно удалены'; +$txt['smf319'] = 'Администратор должен утверждать всех новых участников'; +$txt['smf320'] = 'Внимание - agreement.txt не переписывается. Любые внесенные изменения НЕ будут сохранены'; + +$txt['dvc1'] = 'Здесь сравниваются ваши установочные файлы с последними версиями этих файлов. Если какие-либо файлы устарели, вам следует загрузить новые и обновить их до последней версии на www.simplemachines.org.'; +$txt['dvc_more'] = '(более детально)'; + +$txt['lfyi'] = 'Не возможно соединиться и получить информацию о последних обновлениях на simplemachines.org.'; + +$txt['smileys_manage'] = 'Смайлы и наборы смайлов'; +$txt['smileys_manage_info'] = 'Установить новый набор смайлов или добавить смайлы к существующим.'; +$txt['package1'] = 'Менеджер пакетов'; +$txt['package_info'] = 'Установить новые функции или изменить существующие в этом интерфейсе.'; +$txt['theme_admin'] = 'Темы и настройки внешнего вида'; +$txt['theme_admin_info'] = 'Установите и настройте ваши темы, выберите или сросьте опции в теме.'; +$txt['registration_center'] = 'Управление Регистрацией'; +$txt['registration_center_info'] = 'Зарегистрируйте, подтвердите и управляйте регистрацие участников.'; +$txt['registration_member'] = 'Зарегистрировать нового участника'; + +$txt['viewmembers_name'] = 'Имя пользователя (видимое на Форуме)'; +$txt['viewmembers_online'] = 'Последний раз был Online'; +$txt['viewmembers_today'] = 'Сегодня'; +$txt['viewmembers_day_ago'] = 'день назад'; +$txt['viewmembers_days_ago'] = 'дней назад'; + +$txt['display_name'] = 'Отображаемое имя'; +$txt['email_address'] = 'Email Адрес'; +$txt['ip_address'] = 'IP адрес'; +$txt['member_id'] = 'ID'; + +$txt['security_wrong'] = 'Попытка входа администратора!' . "\n" . + 'Обратиться: ' . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'unknown') . "\n" . + 'User agent: ' . $_SERVER['HTTP_USER_AGENT'] . "\n" . + 'IP: ' . $GLOBALS['user_info']['ip']; + +$txt['email_as_html'] = 'Отправить в формате HTML (отметив здесь, Вы сможете использовать обычный HTML в email.)'; +$txt['email_parsed_html'] = 'Добавить <br />s и &nbsp;s в сообщение.'; +$txt['email_variables'] = 'В этом сообщении Вы можете использовать "переменные ". Нажмите сюда для более подробной информации.'; +$txt['email_force'] = 'Отправить это участникам, даже если они выбрали не принимать сообщения.'; +$txt['email_as_pms'] = 'Отправить это выбранным группам участников используя Личные Сообщения.'; + +$txt['ban_title'] = 'Бан участников'; +$txt[724] = 'Забанить IP адреса: (например, 192.168.12.213 or 128.0.*.*)-один адрес в строке'; +$txt[725] = 'Забанить по email: (например, badguy@somewhere.com) - один адрес в строке +'; +$txt[7252] = 'Забанить по имени пользователей: (например, 111user) - одно имя в строке'; + +$txt['ban_description'] = 'Здесь Вы можете забанить проблемных посетителей по IP, по хосту, по имени или email.'; +$txt['ban_add_new'] = 'Добавить новый бан'; +$txt['ban_banned_entity'] = 'Забаненые значения'; +$txt['ban_on_ip'] = 'Забанить по IP (например, 192.168.10-20.*)'; +$txt['ban_on_hostname'] = 'Забанить по хосту (например, *.mil)'; +$txt['ban_on_email'] = 'Забанить по email адресу (например, *@badsite.com)'; +$txt['ban_on_username'] = 'Забанить по имени пользователя'; +$txt['ban_notes'] = 'Заметки'; +$txt['ban_restriction'] = 'Ограничение'; +$txt['ban_full_ban'] = 'Полный бан'; +$txt['ban_cannot_post'] = 'Не может  отправлять сообщения'; +$txt['ban_cannot_register'] = 'Не может  регистрироваться'; +$txt['ban_add'] = 'Добавить'; +$txt['ban_edit_list'] = 'Редактировать список банов'; +$txt['ban_type'] = 'Тип бана'; +$txt['ban_days'] = 'день(дней)'; +$txt['ban_will_expire_within'] = 'Срок бана закончится через'; +$txt['ban_expires'] = 'Заканчивается'; +$txt['ban_actions'] = 'Действия'; +$txt['ban_expiration'] = 'Окончание'; +$txt['ban_reason_desc'] = 'Причина бана, которая будет показана забанненому пользователю.'; +$txt['ban_notes_desc'] = 'Заметки, которые могут помочь другим пользователям относительно бана.';$txt['ban_remove_selected'] = 'Remove selected'; +$txt['ban_remove_selected_confirm'] = 'Are you sure you want to remove the selected bans?'; +$txt['ban_modify'] = 'Modify'; + +$txt['ban_remove_selected'] = 'Исключить выбранное'; +$txt['ban_remove_selected_confirm'] = 'Вы уверены, что хотите исключить выбранные баны?'; +$txt['ban_modify'] = 'Изменить'; + +$txt['ban_log'] = 'Лог банов'; +$txt['ban_log_description'] = 'Лог банов показывает попытки войти на форум забаненых пользователей (\'полный бан\' и \'нельзя зарегистрироваться\' только эти баны).'; +$txt['ban_log_no_entries'] = 'Не вести лог забаненых входов'; +$txt['ban_log_ip'] = 'IP'; +$txt['ban_log_email'] = 'Email адрес'; +$txt['ban_log_member'] = 'Участник'; +$txt['ban_log_date'] = 'Дата'; +$txt['ban_log_remove_all'] = 'Удалить все'; +$txt['ban_log_remove_all_confirm'] = 'Вы уверены, что хотите удалить все логи збаненых входов?'; +$txt['ban_log_remove_selected'] = 'Удалить выбранное'; +$txt['ban_log_remove_selected_confirm'] = 'Вы уверены, что хотите удалить все выбранные логи збаненых входов?'; + +$txt['apply_filter'] = 'Применить фильтр'; +$txt['applying_filter'] = 'Примененный фильтр'; +$txt['filter_only_member'] = 'Показать только сообщения об ошибках этого участника'; +$txt['filter_only_ip'] = 'Показать только сообщения об ошибках для этого IP'; +$txt['filter_only_session'] = 'Показать только сообщения об ошибках этой сессии'; +$txt['filter_only_url'] = 'Показать только сообщения об ошибках этого URL'; +$txt['filter_only_message'] = 'Показать только сообщения об ошибках одинакового содержания'; +$txt['session'] = 'Сессия'; +$txt['error_url'] = 'URL этой страницы приводит к ошибке'; +$txt['error_message'] = 'Сообщение об ошибке'; +$txt['clear_filter'] = 'Отчистить фильтр'; +$txt['remove_selection'] = 'Убрать выделение'; +$txt['remove_filtered_results'] = 'Убрать Все Результаты Фильтра'; +$txt['sure_about_errorlog_remove'] = 'Вы уверены, что хотите удалить все сообщения об ошибках?'; +$txt['reverse_direction'] = 'Изменить хронологический порядок списка'; + +$txt['settings_not_writable'] = 'Эти настройки не могут быть изменены, так как Settings.php только для чтения(CHMOD).'; + +$txt['maintain_title'] = 'Техподдержка форума'; +$txt['maintain_info'] = 'Оптимизация таблиц, создание бекапов, проверка ошибок и чистка разделов с помощью этих инструментов.'; +$txt['maintain_done'] = 'Техподдержка Закончена.'; + +$txt['maintain_general'] = 'Основная Техподдержка'; +$txt['maintain_recount'] = 'Пересчитать все форумы и статистику.'; +$txt['maintain_errors'] = 'Найти и исправить любые ошибки.'; +$txt['maintain_logs'] = 'Удалить все маловажные логи.'; +$txt['maintain_optimize'] = 'Оптимизировать все таблицы, чтобы увеличить производительность форума.'; +$txt['maintain_version'] = 'Сравнить все файлы с последними версиями.'; + +$txt['maintain_backup'] = 'Бекап Базы Данных'; +$txt['maintain_backup_struct'] = 'Сохранить структуру таблиц.'; +$txt['maintain_backup_data'] = 'Сохранить значения таблицы. (важное действие.)'; +$txt['maintain_backup_gz'] = 'Сжать файл с помощью gzip.'; +$txt['maintain_backup_save'] = 'Загрузить'; + +$txt['maintain_old'] = 'Удалить Старые Сообщения'; +$txt['maintain_old1'] = 'Удалить все темы, на которые не отвечали в течение '; +$txt['maintain_old2'] = ' дней (кроме прикрепленных тем).'; +$txt['maintain_old_all'] = 'Все Форумы'; +$txt['maintain_old_choose'] = 'Выбрать определенные форумы'; +$txt['maintain_old_remove'] = 'Удалить'; +$txt['maintain_old_confirm'] = 'Вы уверены, что хотите удалить старые сообщения?\\n\\nЭто не может быть восстановлено!'; + +$txt['db_error_send'] = 'Отправлять email, при ошибке соединения с MySQL'; +$txt['db_persist'] = 'Используйте устойчивое соединение'; + +$txt['default_language'] = 'Язык Форума По Умолчанию'; + +$txt['maintenance1'] = 'Отображаемая Тема:'; +$txt['maintenance2'] = 'Отображаемое сообщение:'; + +$txt['errlog1'] = 'Просмотреть лог ошибок Форума'; +$txt['errlog2'] = 'Лог Ошибок отслеживает каждую ошибку в форуме. Для удаления всех ошибок из базы данных поставьте галочку и нажмите кнопку ' . $txt[31] . ' внизу страницы.'; + +$txt['theme4'] = 'Настройка Темы'; +$txt['theme_current_settings'] = 'Настройка текущей темы'; + +$txt['parent_repair_found'] = 'Форум %d Не имеет существующей родительской директории (это и так родительская директория %d)'; +$txt['parent_repair_fixed'] = 'Успешно назначен зависший форум в область сохранения.'; + +$txt['repair_zeroed_ids'] = 'Найти темы или сообщения с 0 ID.'; + +$txt['dvc_your'] = 'Ваша Версия'; +$txt['dvc_current'] = 'Текущая Версия'; +$txt['dvc_sources'] = 'Sources - Источник'; +$txt['dvc_default'] = 'Шаблон По Умолчанию'; +$txt['dvc_templates'] = 'Текущий Шаблон'; +$txt['dvc_languages'] = 'Языковые Файлы'; + +$txt['modlog_view'] = 'Просмотреть лог модерирования'; +$txt['modlog_date'] = 'Дата'; +$txt['modlog_member'] = 'Участник'; +$txt['modlog_position'] = 'Место'; +$txt['modlog_action'] = 'Действие'; +$txt['modlog_ip'] = 'IP'; +$txt['modlog_search_result'] = 'Результаты Поиска'; +$txt['modlog_total_entries'] = 'Всего Значений'; +$txt['modlog_ac_banned'] = 'Забанено'; +$txt['modlog_ac_locked'] = 'Закрыто'; +$txt['modlog_ac_stickied'] = 'Прикреплено'; +$txt['modlog_ac_deleted'] = 'Стерто'; +$txt['modlog_ac_deleted_member'] = 'Удалено Участников'; +$txt['modlog_ac_removed'] = 'Удалено'; +$txt['modlog_ac_modified'] = 'Изменено'; +$txt['modlog_ac_merged'] = 'Соединено'; +$txt['modlog_ac_split'] = 'Разделено'; +$txt['modlog_ac_moved'] = 'Перемещено'; +$txt['modlog_ac_profile'] = 'Профиль РедактированProfile Edit'; +$txt['modlog_ac_pruned'] = 'Обрезано Разделов'; +$txt['modlog_ac_news'] = 'Редактировано Новостей'; +$txt['modlog_enter_comment'] = 'Введено Комментариев Модератора'; +$txt['modlog_moderation_log'] = 'Лог Модерирования'; +$txt['modlog_moderation_log_desc'] = 'Ниже приведен список всех действий выполненных модераторами Форума.
    Пожалуйста заметьте: Значения не могут быть удалены ранее, чем через 24 часа.'; +$txt['modlog_no_entries_found'] = 'Не найдено значений'; +$txt['modlog_remove'] = 'Удалить'; +$txt['modlog_removeall'] = 'Удалить Все'; +$txt['modlog_go'] = 'Вперед'; +$txt['modlog_add'] = 'Добавить'; +$txt['modlog_search'] = 'Быстрый Поиск'; +$txt['modlog_by'] = 'От'; + +$txt['smileys_default_set_for_theme'] = 'Выберите набор смайлов по умолчанию для этой Темы'; +$txt['smileys_no_default'] = '(Использовать общий набор смайлов)'; + +$txt['censor_test'] = 'Протестировать цензуру слов'; +$txt['censor_test_save'] = 'Тестировать'; +$txt['censor_case'] = 'Игнорировать регистр букв при цензуре.'; +$txt['smf231'] = 'Проверка только по целым словам.'; + +$txt['admin_confirm_password'] = '(подтвердить)'; + +$txt['date_format'] = '(ГГГГ-ММ-ДД)'; +$txt['undefined_gender'] = 'Неопределенно'; +$txt['age'] = 'Возраст пользователя'; +$txt['activation_status'] = 'Статус активации'; +$txt['activated'] = 'Активирован'; +$txt['not_activated'] = 'Не активирован'; +$txt['primary'] = 'Первичный'; +$txt['additional'] = 'Дополнительный'; +$txt['messenger_address'] = 'Messenger Address'; +$txt['wild_cards_allowed'] = 'Групповые символы * и ? разрешены'; +$txt['search_for'] = 'Искать по'; +$txt['member_part_of_these_membergroups'] = 'Участник - член этих групп участников'; +$txt['membergroups'] = 'Группы участников'; +$txt['confirm_delete_members'] = 'Вы уверены, что хотите удалить выбранных участников?'; + +$txt['support_credits_title'] = 'Поддержка и информация'; +$txt['support_credits_info'] = 'Получить техническую поддержку и информацию о версиях, чтобы решить ваши проблемы.'; +$txt['support_title'] = 'Информационная Поддержка'; +$txt['support_versions_current'] = 'Текущая версия SMF'; +$txt['support_versions_forum'] = 'Версия Форума'; +$txt['support_versions_php'] = 'Версия PHP'; +$txt['support_versions_mysql'] = 'Версия MySQL'; +$txt['support_versions_server'] = 'Версия сервера'; +$txt['support_versions_gd'] = 'Версия GD'; +$txt['support_versions'] = 'Информация о версии'; +$txt['support_latest'] = 'Общая Поддержка и Несоответствия'; +$txt['support_latest_fetch'] = 'Получение информации о поддержке...'; + +$txt['edit_permissions'] = 'Редактировать права пользователей'; +$txt['edit_permissions_info'] = 'Изменить ограниченные и доступные опции на всем форуме или в отдельных разделах.'; +$txt['membergroups_members'] = 'Пользователи Без групп'; +$txt['membergroups_guests'] = 'Незарегистрированные Гости'; +$txt['membergroups_guests_na'] = 'нет данных'; +$txt['membergroups_name'] = 'Имя пользователя'; +$txt['membergroups_stars'] = 'Звездочки'; +$txt['membergroups_members_top'] = 'Участники'; +$txt['membergroups_add_group'] = 'Добавить группу'; +$txt['membergroups_permissions'] = 'Права'; + +$txt['permitgroups_restrict'] = 'Ограниченный'; +$txt['permitgroups_standard'] = 'Стандартный'; +$txt['permitgroups_moderator'] = 'Модератор'; +$txt['permitgroups_maintenance'] = 'Техподдержка'; +$txt['permitgroups_inherit'] = 'Наследственный'; + +$txt['confirm_delete_attachments_all'] = 'Вы уверены, что хотите удалить все вложения?'; +$txt['confirm_delete_attachments'] = 'Вы уверены, что хотите удалить выбранные вложения?'; +$txt['attachment_manager_browse_files'] = 'Смотреть Файлы'; +$txt['attachment_manager_recount'] = 'Пересчитать'; +$txt['attachment_manager_avatars'] = 'Аватары'; +$txt['attachment_manager_attachments'] = 'Вложения'; +$txt['attachment_manager_last_active'] = 'Последний Активный'; +$txt['attachment_manager_member'] = 'Участник'; +$txt['attachment_manager_avatars_older'] = 'Удалить аватары участников неактивных в течение более чем'; +$txt['attachment_manager_total_avatars'] = 'Всего Аватаров'; + +$txt['editnews_clickadd'] = 'Кликните сюда, чтобы добавить еще окошко.'; +$txt['editnews_remove_selected'] = 'Убрать выбранные'; +$txt['editnews_remove_confirm'] = 'Вы уверены, что хотите удалить выбранные новости?'; +$txt['censor_clickadd'] = 'Кликните сюда, чтобы добавить другое слово.'; +$txt['update_available'] = 'Обновление доступно!'; +$txt['update_message'] = 'Вы используете устаревшую версию форума SMF, содержащую ошибки и баги, которые были в устранены в более новой версии. + Рекомендуется скачать файлы новой версии форума и обновить версию как можно скорее. Это займёт у вас не более минуты!'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Errors.english.php b/Themes/modern/languages/Errors.english.php new file mode 100644 index 0000000..33f55f9 --- /dev/null +++ b/Themes/modern/languages/Errors.english.php @@ -0,0 +1,243 @@ +register.'; +$txt[213] = 'Passwords aren\'t the same.'; +$txt[223] = 'Sorry, you must register before using this feature.'; +$txt[241] = 'Invalid character used in Password.'; +$txt[242] = 'Invalid character used in Name.'; +$txt[243] = 'Invalid character used in email.'; +$txt[244] = 'The username you tried to use contains the reserved name \'%s\'. Please try another username.'; +$txt[337] = 'This field only accepts numbers from 0-9'; +$txt[472] = 'This topic doesn\'t exist on this board.'; + +$txt['smf26'] = 'You didn\'t select a vote option.'; +$txt['smf27'] = 'Either that poll doesn\'t exist, the poll has been locked, or you tried to vote twice.'; +$txt['smf28'] = 'This option is only available to registered members.'; +$txt['smf31'] = 'This was locked by an administrator. You cannot unlock it.'; +$txt['smf61'] = 'Sorry, you are not permitted to modify your own karma.'; +$txt['smf63'] = 'Sorry, this feature is disabled.'; +$txt['smf115b'] = 'Cannot access attachments upload path!'; +$txt['smf122'] = 'Your file is too large. The maximum attachment size allowed is %d KB.'; +$txt['smf124'] = 'Your attachment couldn\'t be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.

    Please consult your server administrator for more information.'; +$txt['smf125'] = 'Sorry! There is already an attachment with the same filename as the one you tried to upload. Please rename the file and try again.'; +$txt['smf126'] = 'The upload folder is full. Please try a smaller file and/or contact an administrator.'; +$txt['smf191'] = 'Could not connect to server or could not find file'; +$txt['smf253'] = 'You are not allowed to split topics'; +$txt['smf232'] = 'The board you specified doesn\'t exist'; +$txt['smf262'] = 'You are not allowed to merge topics'; +$txt['smf263'] = 'You specified an invalid topic ID.'; +$txt['smf268'] = 'You cannot split a topic at the first post.'; +$txt['smf270'] = 'This topic only contains one message and cannot be split.'; +$txt['smf271'] = 'no messages selected'; +$txt['smf271b'] = 'Unable to split. You have selected every message.'; +$txt['smf272'] = 'Unable to find messages'; +$txt['smf273'] = 'Unable to insert topic'; +$txt['smf289'] = 'You have chosen a username of an already existing moderator. Please choose another username'; +$txt['smf304'] = 'Your session timed out while posting. Please go back and try again.'; +$txt['smf305'] = 'Session verification failed. Please try logging out and back in again, and then try again.'; +$txt['smf306'] = 'Unable to verify referring url. Please go back and try again.'; + +$txt['cannot_admin_forum'] = 'You are not allowed to administrate this forum.'; +$txt['cannot_calendar_edit_any'] = 'You cannot edit calendar events.'; +$txt['cannot_calendar_edit_own'] = 'You don\'t have the privileges necessary to edit your own events.'; +$txt['cannot_calendar_post'] = 'Event posting isn\'t allowed - sorry.'; +$txt['cannot_calendar_view'] = 'Sorry, but you are not allowed to view the calendar.'; +$txt['cannot_delete_any'] = 'Sorry, but you don\'t have the privilege to remove just any topic.'; +$txt['cannot_delete_own'] = 'You cannot delete your own topics in this board.'; +$txt['cannot_edit_news'] = 'You are not allowed to edit news items on this forum.'; +$txt['cannot_pm_read'] = 'Sorry, you can\'t read your personal messages.'; +$txt['cannot_pm_send'] = 'You are not allowed to send personal messages.'; +$txt['cannot_karma_edit'] = 'You aren\'t permitted to modify other people\'s karma.'; +$txt['cannot_lock_any'] = 'You are not allowed to lock just any topic here.'; +$txt['cannot_lock_own'] = 'Apologies, but you cannot lock your own topics here.'; +$txt['cannot_make_sticky'] = 'You don\'t have permission to sticky this topic.'; +$txt['cannot_manage_attachments'] = 'You\'re not allowed to manage attachments or avatars.'; +$txt['cannot_manage_bans'] = 'You\'re not allowed to change the list of bans.'; +$txt['cannot_manage_boards'] = 'You are not allowed to manage boards and categories.'; +$txt['cannot_manage_membergroups'] = 'You don\'t have permission to modify or assign membergroup.'; +$txt['cannot_manage_permissions'] = 'You don\'t have permission to manage permissions.'; +$txt['cannot_manage_smileys'] = 'You\'re not allowed to manage smileys.'; +$txt['cannot_mark_any_notify'] = 'You don\'t have the permissions necessary to get notifications from this topic.'; +$txt['cannot_mark_notify'] = 'Sorry, but you are not permitted to request notifications from this board.'; +$txt['cannot_merge_any'] = 'You aren\'t allowed to merge topics on one of the selected board(s).'; +$txt['cannot_moderate_forum'] = 'You are not allowed to moderate this forum.'; +$txt['cannot_modify_any'] = 'You aren\'t allowed to modify just any post.'; +$txt['cannot_modify_own'] = 'Sorry, but you aren\'t allowed to edit your own posts.'; +$txt['cannot_modify_replies'] = 'Even though this post is a reply to your topic, you cannot edit it.'; +$txt['cannot_move_any'] = 'You are not allowed to move topics in this board.'; +$txt['cannot_poll_add_own'] = 'Sorry, you aren\'t allowed to add polls to your own topics in this board.'; +$txt['cannot_poll_add_any'] = 'You don\'t have the access to add polls to this topic.'; +$txt['cannot_poll_edit_own'] = 'You cannot edit this poll, even though it is your own.'; +$txt['cannot_poll_edit_any'] = 'You have been denied access to editing polls in this board.'; +$txt['cannot_poll_lock_own'] = 'You are not allowed to lock your own polls in this board.'; +$txt['cannot_poll_lock_any'] = 'Sorry, but you aren\'t allowed to lock just any poll.'; +$txt['cannot_poll_post'] = 'You aren\'t allowed to post polls in the current board.'; +$txt['cannot_poll_remove_own'] = 'You are not permitted to remove this poll from your topic.'; +$txt['cannot_poll_remove_any'] = 'You cannot remove just any poll on this board.'; +$txt['cannot_poll_view'] = 'You are not allowed to view polls in this board.'; +$txt['cannot_poll_vote'] = 'Sorry, but you cannot vote in polls in this board.'; +$txt['cannot_post_attachment'] = 'You don\'t have permission to post attachments here.'; +$txt['cannot_post_new'] = 'Sorry, you cannot post new topics in this board.'; +$txt['cannot_post_reply_any'] = 'You are not permitted to post replies to topics on this board.'; +$txt['cannot_post_reply_own'] = 'You are not allowed to post replies even to your own topics in this board.'; +$txt['cannot_profile_remove_own'] = 'Sorry, but you aren\'t allowed to delete your own account.'; +$txt['cannot_profile_remove_any'] = 'You don\'t have the permissions to go about removing people\'s accounts!'; +$txt['cannot_profile_extra_any'] = 'You are not permitted to modify profile settings.'; +$txt['cannot_profile_identity_any'] = 'You aren\'t allowed to edit account settings.'; +$txt['cannot_profile_title_any'] = 'You cannot edit people\'s custom titles.'; +$txt['cannot_profile_extra_own'] = 'Sorry, but you don\'t have the necessary permissions to edit your profile data.'; +$txt['cannot_profile_identity_own'] = 'You can\'t change your identity at the current moment.'; +$txt['cannot_profile_title_own'] = 'You are not allowed to change your custom title.'; +$txt['cannot_profile_remote_avatar'] = 'You don\'t have the privilege of using a remote avatar.'; +$txt['cannot_profile_view_own'] = 'Many apologies, but you can\'t view your own profile.'; +$txt['cannot_profile_view_any'] = 'Many apologies, but you can\'t view just any profile.'; +$txt['cannot_remove_own'] = 'You are not, on this board, allowed to delete your own posts.'; +$txt['cannot_remove_replies'] = 'Sorry, but you cannot remove these posts, even though they are replies to your topic.'; +$txt['cannot_remove_any'] = 'Deleting just any posts in this board is not allowed.'; +$txt['cannot_report_any'] = 'You are not allowed to report posts in this board.'; +$txt['cannot_search_posts'] = 'You are not allowed to search for posts in this forum.'; +$txt['cannot_send_mail'] = 'You don\'t have the privilege of sending out emails to everyone.'; +$txt['cannot_send_topic'] = 'Sorry, but the administrator has disallowed sending topics on this board.'; +$txt['cannot_split_any'] = 'Splitting just any topic is not allowed in this board.'; +$txt['cannot_view_attachments'] = 'It seems that you are not allowed to download or view attachments on this board.'; +$txt['cannot_view_mlist'] = 'You can\'t view the memberlist because you don\'t have permission to.'; +$txt['cannot_view_stats'] = 'You aren\'t allowed to view the forum statistics.'; +$txt['cannot_who_view'] = 'Sorry - you don\'t have the proper permissions to view the Who\'s Online list.'; + +$txt['theme3'] = 'That theme does not exist.'; +$txt['theme_dir_wrong'] = 'The default theme\'s directory is wrong, please correct it by clicking this text.'; +$txt['search_no_boards'] = 'No valid boards were selected!'; +$txt['registration_disabled'] = 'Sorry, registration is currently disabled.'; +$txt['registration_no_secret_question'] = 'Sorry, there is no secret question set for this member.'; +$txt['poll_range_error'] = 'Sorry, the poll must run for more than 0 days.'; +$txt['delFirstPost'] = 'You are not allowed to delete the first post in a topic.

    If you want to delete this topic, click on the Remove Topic link, or ask a moderator/administrator to do it for you.

    '; +$txt['parent_error'] = 'Unable to create board!'; +$txt['login_cookie_error'] = 'You were unable to login. Please check your cookie settings.'; +$txt['previous_next_end'] = 'You\'ve reached the end of the topics. You can\'t go any farther.'; +$txt['pswd7'] = 'Sorry, but you did not answer your question correctly. Please click back to try again, or click back twice to use the default method of obtaining your password.'; +$txt['rtm11'] = 'No moderators found!'; +$txt['parent_not_found'] = 'Board structure corrupt: unable to find parent board'; + +$txt['calendar_off'] = 'You cannot access the calendar right now because it is disabled.'; +$txt['calendar1'] = 'Invalid month value.'; +$txt['calendar2'] = 'Invalid year value.'; +$txt['calendar7'] = 'Event month is missing.'; +$txt['calendar8'] = 'Event year is missing.'; +$txt['calendar14'] = 'Event day is missing.'; +$txt['calendar15'] = 'Event title is missing.'; +$txt['calendar16'] = 'Invalid date.'; +$txt['calendar17'] = 'No event title was entered.'; +$txt['calendar18'] = 'Missing event ID.'; +$txt['calendar19'] = 'You do not have permission to edit this event.'; +$txt['calendar38'] = 'Board ID is missing.'; +$txt['calendar39'] = 'Topic ID is missing.'; +$txt['calendar40'] = 'Topic doesn\'t exist.'; +$txt['calendar41'] = 'You are not the owner of this topic.'; +$txt['calendar42'] = 'The board does not exist.'; +$txt['calendar55'] = 'The span feature is currently disabled.'; +$txt['calendar56'] = 'Invalid number of days to span.'; + +$txt['moveto_noboards'] = 'There are no boards to move this topic to!'; + +$txt['already_activated'] = 'Your account has already been activated.'; + +$txt['invalid_email'] = 'Invalid email address / email address range.
    Example of a valid email address: evil.user@badsite.com.
    Example of a valid email address range: *@*.badsite.com'; +$txt['invalid_expiration_date'] = 'Expiration date is not valid'; +$txt['invalid_hostname'] = 'Invalid host name / host name range.
    Example of a valid host name: proxy4.badhost.com
    Example of a valid host name range: *.badhost.com'; +$txt['invalid_ip'] = 'Invalid IP / IP range.
    Example of a valid IP address: 127.0.0.1
    Example of a valid IP range: 127.0.0-20.*'; +$txt['invalid_username'] = 'Member name not found'; +$txt['no_ban_admin'] = 'You may not ban an admin - You must demote them first!'; +$txt['no_bantype_selected'] = 'No ban type was selected'; +$txt['ban_not_found'] = 'Ban not found'; +$txt['ban_unknown_restriction_type'] = 'Restriction type unknown'; + +$txt['recycle_no_valid_board'] = 'No valid board selected for recycle topics'; + +$txt['login_threshold_fail'] = 'Sorry, you are out of login chances. Please come back and try again later.'; + +$txt['who_off'] = 'You cannot access Who\'s Online right now because it is disabled.'; + +$txt['merge_create_topic_failed'] = 'Error creating a new topic.'; +$txt['merge_need_more_topics'] = 'Merge topics require at least two topics to merge.'; + +$txt['spamWaitTime_broken'] = 'The last posting from your IP was less than %d seconds ago. Please try again later.'; +$txt['registerWaitTime_broken'] = 'You already registered just %d seconds ago!'; +$txt['loginWaitTime_broken'] = 'You will have to wait about %d seconds to login again, sorry.'; + +$txt['no_valid_search_string'] = 'Did you forget to put something to search for?'; +$txt['topic_gone'] = 'The topic or board you are looking for appears to be either missing or off limits to you.'; +$txt['theme_edit_missing'] = 'The file you are trying to edit... can\'t even be found!'; + +$txt['attachments_no_write'] = 'The attachments upload directory is not writable. Your attachment or avatar cannot be saved.'; +$txt['attachments_limit_per_post'] = 'You may not upload more than %d attachments per post'; + +$txt['rtm_not_own'] = 'You can\'t report your own post to the moderator, that doesn\'t make sense!'; + +$txt['no_dump_database'] = 'Only administrators can make database backups!'; +$txt['pm_not_yours'] = 'The personal message you\'re trying to quote is not your own or does not exist, please go back and try again.'; +$txt['mangled_post'] = 'Mangled form data - please go back and try again.'; + +$txt['error_while_submitting'] = 'The following error or errors occurred while posting this message:'; +$txt['error_long_name'] = 'The name you tried to use was too long.'; +$txt['error_no_name'] = 'No name was provided.'; +$txt['error_bad_name'] = 'The name you submitted cannot be used, because it is or contains a reserved name.'; +$txt['error_no_email'] = 'No email address was provided.'; +$txt['error_bad_email'] = 'An invalid email address was given.'; +$txt['error_no_event'] = 'No event name has been given.'; +$txt['error_no_subject'] = 'No subject was filled in.'; +$txt['error_no_question'] = 'No question was filled in for this poll.'; +$txt['error_no_message'] = 'The message body was left empty.'; +$txt['error_long_message'] = 'The message exceeds the maximum allowed length (' . $modSettings['max_messageLength'] . ' characters).'; +$txt['error_session_timeout'] = 'Your session timed out while posting. Please try to re-submit your message.'; +$txt['error_no_to'] = 'No recipients specified.'; +$txt['error_bad_to'] = 'One or more \'to\'-recipients could not be found.'; +$txt['error_bad_bcc'] = 'One or more \'bcc\'-recipients could not be found.'; +$txt['error_form_already_submitted'] = 'You already submitted this post! You might have accidently double clicked, or tried to refresh.'; +$txt['error_poll_few'] = 'You must have at least two choices!'; + +$txt['smiley_not_found'] = 'Smiley not found.'; +$txt['smiley_has_no_code'] = 'No code for this smiley was given.'; +$txt['smiley_has_no_filename'] = 'No filename for this smiley was given.'; +$txt['smiley_not_unique'] = 'A smiley with that code already exists.'; +$txt['smiley_set_already_exists'] = 'A smiley set with that URL already exists'; +$txt['smiley_set_not_found'] = 'Smiley set not found'; +$txt['smiley_set_path_already_used'] = 'The URL of the smiley set is already being used by another smiley set.'; +$txt['smiley_set_unable_to_import'] = 'Unable to import smiley set. Either the directory is invalid or cannot be accessed.'; + +$txt['smileys_upload_error'] = 'Failed to upload file.'; +$txt['smileys_upload_error_blank'] = 'All smiley sets must have an image!'; +$txt['smileys_upload_error_name'] = 'All smileys must have the same filename!'; +$txt['smileys_upload_error_illegal'] = 'Illegal Type.'; + +$txt['search_invalid_weights'] = 'Search weights are not properly configured. At least one weight should be configure to be non-zero. Please report this error to an administrator.'; +$txt['unable_to_create_temporary'] = 'Search was unable to create temporary tables. Please report this error to an administrator.'; + +$txt['package_no_file'] = 'Unable to find package file!'; +$txt['packageget_unable'] = 'Unable to connect to the server. Please try using this URL instead.'; +$txt['not_on_simplemachines'] = 'Sorry, packages can only be downloaded like this from the simplemachines.org server.'; +$txt['package_cant_uninstall'] = 'This package was either never installed or was already uninstalled - you can\'t uninstall it now.'; +$txt['package_cant_download'] = 'You cannot download or install new packages because the Packages directory is not writable!'; +$txt['package_upload_error'] = 'Could not upload package, please check directory permissions!'; +$txt['package_upload_error_exists'] = 'The file you are uploading already exists on the server. Please delete it first then try again.'; + +$txt['no_membergroup_selected'] = 'No membergroup selected'; + +$txt['attachment_not_found'] = 'Attachment Not Found'; + +$txt['cannot_karmalog_view'] = 'Sorry - you don\'t have the proper permissions to view the Karma Description list.'; +$txt['viewkarma_error'] = 'User ID must be a number'; +$txt['karma_not_topic_starter'] = 'Sorry, he is not topic author.'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Errors.russian.php b/Themes/modern/languages/Errors.russian.php new file mode 100644 index 0000000..0c53978 --- /dev/null +++ b/Themes/modern/languages/Errors.russian.php @@ -0,0 +1,245 @@ +сделайте это сейчас .'; +$txt[213] = 'Пароли не одинаковы.'; +$txt[223] = 'Извините, перед тем, как использовать эти настройки вы должны зарегистрироваться.'; +$txt[241] = 'Использован недопустимый символ в Пароле.'; +$txt[242] = 'Использован недопустимый символ в Имени.'; +$txt[243] = 'Использован недопустимый символ в Email.'; +$txt[244] = 'Имя пользователя, которое вы пытаетесь зарегистрировать - зарезервировано \'%s\'. Пожалуйста, выберите другое имя.'; +$txt[337] = 'В этом поле можно указывать только числа от 0 до 9'; +$txt[472] = 'Эта тема не существует в этом форуме.'; +$txt[568] = 'Пожалуйста, напишите свое имя покороче. Оно слишком длинное ;)'; + +$txt['smf26'] = 'Вы не выбрали, за что голосовать.'; +$txt['smf27'] = 'Опрос или не существует, или закрыт, или Вы пытаетесь проголосовать дважды.'; +$txt['smf28'] = 'Эта опция доступна только зарегистрированным участникам.'; +$txt['smf31'] = 'Было закрыто администратором. Вы не можете открыть.'; +$txt['smf61'] = 'Извините, но Вы не можете изменять собственную репутацию.'; +$txt['smf63'] = 'Извините, эта опция отключена.'; +$txt['smf115b'] = 'Нет доступа к пути загрузки вложений!'; +$txt['smf122'] = 'Ваш файл слишком большой. Максимальный размер вложения должен быть не более %d KB.'; +$txt['smf124'] = 'Ваше вложение не может быть сохранено. Либо загружается очень долго, либо файл больше, чем позволяет сервер.

    Пожалуйста, проконсультируйтесь с администратором для более подробной информации.'; +$txt['smf125'] = 'Извините! Такой файл уже существует. Пожалуйста, переименуйте файл и попробуйте снова.'; +$txt['smf126'] = 'Папка upload заполнена. Попробуйте файл меньшего размера или свяжитесь с администратором.'; +$txt['smf191'] = 'Не получилось соединиться с сервером или файл не найден'; +$txt['smf253'] = 'Вы не можете разделять темы'; +$txt['smf232'] = 'Указанный Вами форум не существует'; +$txt['smf262'] = 'Вы не можете соединять темы'; +$txt['smf263'] = 'Вы указали не правильный ID темы.'; +$txt['smf268'] = 'Вы не можете разделять тему с первого сообщения.'; +$txt['smf270'] = 'Эта тема содержит только одно сообщение и не может быть разделена.'; +$txt['smf271'] = 'не выбраны сообщения'; +$txt['smf271b'] = 'Невозможно разделить. Вы выбрали все сообщения.'; +$txt['smf272'] = 'Невозможно найти сообщения'; +$txt['smf273'] = 'Невозможно вставить тему'; +$txt['smf289'] = 'Вы выбрали имя пользователя существующего Модератора. Пожалуйста выберите другое.'; +$txt['smf304'] = 'Ваша сессия закончилась, за время написания сообщения. Вернитесь назад и попробуйте снова.'; +$txt['smf305'] = 'Проверка сессии провалилась. Пожалуйста, выйдите из форума и зайдите снова, и попробуйте заново.'; +$txt['smf306'] = 'Не возможно проверить отсылаемое месторасположение. Пожалуйста, вернитесь назад и попробуйте снова.'; + +$txt['cannot_admin_forum'] = 'Вы не можете администрировать этот Форум.'; +$txt['cannot_calendar_edit_any'] = 'Вы не можете редактировать календарные события.'; +$txt['cannot_calendar_edit_own'] = 'У вас нет необходимых привилегий, чтобы редактировать ваши события.'; +$txt['cannot_calendar_post'] = 'Размещение событий запрещено, извините.'; +$txt['cannot_calendar_view'] = 'Извините, но вы не можете просматривать календарь.'; +$txt['cannot_delete_any'] = 'Извините, но у Вас нет привилегий удалять любые темы.'; +$txt['cannot_delete_own'] = 'Вы не можете удалять собственные темы на форуме.'; +$txt['cannot_edit_forum'] = 'Вы не можете администрировать форум.'; +$txt['cannot_edit_news'] = 'Вы не можете редактировать новости на этом форуме.'; +$txt['cannot_pm_read'] = 'Извините, Вы не можете читать личные сообщения.'; +$txt['cannot_pm_send'] = 'Вы не можете отправлять личные сообщения.'; +$txt['cannot_karma_edit'] = 'Вы не можете изменять репутации других людей.'; +$txt['cannot_lock_any'] = 'Вы не можете закрывать любую тему здесь.'; +$txt['cannot_lock_own'] = 'Извините, но Вы не можете закрывать Ваши темы здесь.'; +$txt['cannot_make_sticky'] = 'Вы не можете прикрепить эту тему.'; +$txt['cannot_manage_attachments'] = 'Вам не разрешается управлять вложениями или аватарами.'; +$txt['cannot_manage_bans'] = 'Вам не позволено менять список банов.'; +$txt['cannot_manage_boards'] = 'Вам не позволено управлять разделами и категориями.'; +$txt['cannot_manage_membergroups'] = 'У вас нет права для изменения или добавления групп пользователей.'; +$txt['cannot_manage_permissions'] = 'У вас нет права для управления правами пользователей.'; +$txt['cannot_manage_smileys'] = 'Вам не позволено управлять смайлами.'; +$txt['cannot_mark_any_notify'] = 'У вас нет необходимого разрешения получать извещения от этой темы.'; +$txt['cannot_mark_notify'] = 'Извините, но Вам не разрешено получать извещения из этого раздела.'; +$txt['cannot_merge_any'] = 'Вы не можете соединять темы на выбранном форуме (форумах).'; +$txt['cannot_moderate_forum'] = 'Вы не можете модерировать этот форум.'; +$txt['cannot_modify_any'] = 'Вы не можете модерировать любое сообщение.'; +$txt['cannot_modify_own'] = 'Извините, но Вы не можете редактировать Ваши сообщения.'; +$txt['cannot_modify_replies'] = 'Даже если это сообщение ответ в Вашей теме, вы не можете редактировать его.'; +$txt['cannot_move_any'] = 'Вы не можете перемещать темы в этом форуме.'; +$txt['cannot_poll_add_own'] = 'Извините, но вы не можете добавлять опросы в Вашей теме на этом форуме.'; +$txt['cannot_poll_add_any'] = 'У вас нет доступа к добавлению опроса в этой теме.'; +$txt['cannot_poll_edit_own'] = 'Вы не можете редактировать опрос, даже если это Ваше собственное.'; +$txt['cannot_poll_edit_any'] = 'Вам отказано в доступе к редактированию опросов в этом форуме.'; +$txt['cannot_poll_lock_own'] = 'Вы не можете закрывать свои опросы на этом форуме.'; +$txt['cannot_poll_lock_any'] = 'Извините, но вы не можете закрывать любой опрос.'; +$txt['cannot_poll_post'] = 'Вы не можете создавать опросы в этом разделе.'; +$txt['cannot_poll_remove_own'] = 'Вам не разрешено удалить опрос из вашей темы.'; +$txt['cannot_poll_remove_any'] = 'Вы не можете удалять любой опрос в этом разделе.'; +$txt['cannot_poll_view'] = 'Вы не можете просматривать опросы в этом разделе.'; +$txt['cannot_poll_vote'] = 'Извините, но Вы не можете голосовать в этом разделе.'; +$txt['cannot_post_attachment'] = 'У Вас нет разрешения вставлять вложения здесь.'; +$txt['cannot_post_new'] = 'Извините, но вы не можете создавать новые темы в этом разделе.'; +$txt['cannot_post_reply_any'] = 'Вы не можете отвечать в темах на этом разделе.'; +$txt['cannot_post_reply_own'] = 'Вы не можете отвечать даже в Ваших собственных темах в этом разделе.'; +$txt['cannot_profile_remove_own'] = 'Извините, но Вам не позволено удалять собственный аккаунт.'; +$txt['cannot_profile_remove_any'] = 'У Вас нет права удаления чужих аккаунтов!'; +$txt['cannot_profile_extra_any'] = 'Вам не разрешено изменять настройки профиля.'; +$txt['cannot_profile_identity_any'] = 'Вам не разрешено редактировать настройки аккаунта.'; +$txt['cannot_profile_title_any'] = 'Вы не можете редактировать заголовок профиля людей.'; +$txt['cannot_profile_extra_own'] = 'Извините, но у Вас нет достаточных прав, чтобы редактировать Ваши данные в профиле.'; +$txt['cannot_profile_identity_own'] = 'Вы не можете изменять Вашу личность в данный момент.'; +$txt['cannot_profile_title_own'] = 'Вы не можете изменять Ваш заголовок профиля.'; +$txt['cannot_profile_remote_avatar'] = 'У Вас нет привилегии использования удаленного аватора.'; +$txt['cannot_profile_view_own'] = 'Тыща извинений, но Вы не можете посмотреть свой профиль.'; +$txt['cannot_profile_view_any'] = 'Тыща извинений, но вы не можете посмотреть никакой профиль.'; +$txt['cannot_remove_own'] = 'Вы не на том форуме, где можно удалять свои сообщения.'; +$txt['cannot_remove_replies'] = 'Извините, но Вы не можете удалять сообщения, даже если они являются ответами в Вашей теме.'; +$txt['cannot_remove_any'] = 'Удаление любых сообщений в этом форуме запрещено.'; +$txt['cannot_report_any'] = 'Вы не можете сообщать о сообщениях в этом форуме.'; +$txt['cannot_search_posts'] = 'Вы не можете искать сообщения в этом форуме.'; +$txt['cannot_send_mail'] = 'У Вас нет привилегии отправлять email любому.'; +$txt['cannot_send_topic'] = 'Извините, но администратор отключил отправку темы на этом форуме.'; +$txt['cannot_split_any'] = 'Разделение любых тем на этом форуме запрещено.'; +$txt['cannot_view_attachments'] = 'По-видимому, вам не позволено скачивать или просматривать вложения на этом форуме.'; +$txt['cannot_view_mlist'] = 'Вы не можете посмотреть список участников, так как у Вас нет разрешения.'; +$txt['cannot_view_stats'] = 'Вам не позволено смотреть статистику Форума.'; +$txt['cannot_who_view'] = 'Извините, но у Вас нет необходимого разрешения, что бы смотреть, кто Online.'; + +$txt['theme3'] = 'Эта Тема не существует.'; +$txt['theme_dir_wrong'] = 'Директория темы по умолчанию неправильна, пожалуйста, исправте ее нажав на этот текст.'; +$txt['search_no_boards'] = 'Не выбраны действующие форумы!'; +$txt['registration_disabled'] = 'Извините, но регистрация сейчас отключена.'; +$txt['registration_no_secret_question'] = 'Извинити, но для этого пользователя не выбран сикретный вопрос.'; +$txt['poll_range_error'] = 'Извините, опрос должен длиться больше 0 дней.'; +$txt['delFirstPost'] = 'Вы не можете удалить первое сообщение в теме.

    Если вы хотите удалить эту тему, нажмите ссылку удалить тему или попросите администратора/модератора сделать это за вас.

    '; +$txt['parent_error'] = 'Не получилось создать форум!'; +$txt['login_cookie_error'] = 'Не получилось войти. Пожалуйста, проверьте настройки cookie.'; +$txt['previous_next_end'] = 'Вы дошли до конца списка.'; +$txt['pswd7'] = 'Извините, но вы не ответили правильно на Ваш вопрос. Нажмите назад и попробуйте снова, или нажмите Назад дважды, чтобы использовать обычный метод получения пароля.'; +$txt['rtm11'] = 'Не найдены модераторы!'; +$txt['parent_not_found'] = 'Структура раздела испорчена: не получилось найти родительский форум'; + +$txt['calendar_off'] = 'Вы не можете попасть на календарь сейчас, так как он отключен.'; +$txt['calendar1'] = 'Неправильное значение месяца.'; +$txt['calendar2'] = 'Неправильное значение года.'; +$txt['calendar7'] = 'Пропущен месяц события.'; +$txt['calendar8'] = 'Пропущен год события.'; +$txt['calendar14'] = 'Пропущен день события.'; +$txt['calendar15'] = 'Пропущен заголовок события.'; +$txt['calendar16'] = 'Неправильная дата.'; +$txt['calendar17'] = 'Не введен заголовок события.'; +$txt['calendar18'] = 'Пропущен ID события.'; +$txt['calendar19'] = 'У вас нет права редактирования этого события.'; +$txt['calendar38'] = 'ID раздела пропущен.'; +$txt['calendar39'] = 'ID темы пропущен.'; +$txt['calendar40'] = 'Тема не существует.'; +$txt['calendar41'] = 'Вы не являетесь владельцем этой темы.'; +$txt['calendar42'] = 'Форум не существует.'; +$txt['calendar55'] = 'Возможность временного диапазона отключена.'; +$txt['calendar56'] = 'Неправильное количество дней временного диапазона.'; + +$txt['moveto_noboards'] = 'Нет форума для перемещения туда этой темы!'; + +$txt['already_activated'] = 'Ваш аккаунт уже активирован.'; + +$txt['invalid_email'] = 'Не правильный email адрес или диапазон адресов email.
    Пример правильного email адреса: evil.user@badsite.com.
    Пример правильного диапазона адресов email: *@*.badsite.com'; +$txt['invalid_expiration_date'] = 'Дата окончания не подходящая'; +$txt['invalid_hostname'] = 'Неправильное имя хоста или диапазона имен хостов.
    Пример правильного имени хоста: proxy4.badhost.com
    Пример правильного диапазона имен хостов: *.badhost.com'; +$txt['invalid_ip'] = 'Неправильный IP или диапазон IP.
    Пример правильного IP адреса: 127.0.0.1
    Пример правильного диапазона IP адресов: 127.0.0-20.*'; +$txt['invalid_username'] = 'Имя участника не найдено'; +$txt['no_ban_admin'] = 'Вы не можете забанить админа, Вы должны сначала понизить его звание!'; +$txt['no_bantype_selected'] = 'Не выбран тип бана'; +$txt['ban_not_found'] = 'Бан не найден'; +$txt['ban_unknown_restriction_type'] = 'Тип запрета не известен'; + +$txt['recycle_no_valid_board'] = 'Не выбран действующий форум для удаления темы'; + +$txt['login_threshold_fail'] = 'Извините, но у Вас нет возможности для входа. Пожалуйста, попробуйте позже.'; + +$txt['who_off'] = 'Вы не можете получить доступ к просмотру тех Кто Online прямо сейчас, так как эта функция выключена.'; + +$txt['merge_create_topic_failed'] = 'Ошибка при создании новой темы.'; +$txt['merge_need_more_topics'] = 'Соединение тем требует наличия, по крайней мере, двух тем для соединения.'; + +$txt['spamWaitTime_broken'] = 'Последнее сообщение было отправлено с Вашего IP меньше чем %d секунд назад. Пожалуйста, попробуйте заново позже.'; +$txt['registerWaitTime_broken'] = 'Вы уже зарегистрировались %d секунд назад!'; +$txt['loginWaitTime_broken'] = 'Вам придется подождать около %d секунд, чтобы войти заново, извините.'; + +$txt['no_valid_search_string'] = 'Вы забыли ввести что-то для поиска?'; +$txt['topic_gone'] = 'Тема или форум, которую вы ищите или отсутствует, или запрещена для входа.'; +$txt['theme_edit_missing'] = 'Файл, который вы пытаетесь редактировать, даже не найден!'; + +$txt['attachments_no_write'] = 'Папка для вложений не записываема. Ваше вложение или аватар не может быть сохранен.'; + +$txt['attachments_limit_per_post'] = 'Вы не можете загружать больше %d вложений в одном сообщении'; + +$txt['rtm_not_own'] = 'Вы не можете сообщать о ваших собственных сообщениях модератору. В этом нет смысла!!!'; + +$txt['no_dump_database'] = 'Только администратор может делать бекапы базы данных!'; +$txt['pm_not_yours'] = 'Личное сообщение, которое Вы пытаетесь процетировать не ваше или его не существует, пожалуйста, вернитесь назад и попробуйте снова.'; +$txt['mangled_post'] = 'Что-то с датой, пожалуйста, вернитесь и попробуйте заново.'; + +$txt['error_while_submitting'] = 'Следующие ошибки произошли во время написания сообщения:'; +$txt['error_long_name'] = 'Имя, которое Вы пытались использовать слишком длинное.'; +$txt['error_no_name'] = 'Никакое имя не было предоставлено.'; +$txt['error_bad_name'] = 'Имя, которым Вы подписались, не может быть использовано, так как содержит зарезервированное имя.'; +$txt['error_no_email'] = 'Не предоставлен Email адрес.'; +$txt['error_bad_email'] = 'Неправильный Email адрес был дан.'; +$txt['error_no_event'] = 'Не было дано название события.'; +$txt['error_no_subject'] = 'Тема не была заполнена.'; +$txt['error_no_question'] = 'Не было задано вопроса в этом опросе.'; +$txt['error_no_message'] = 'Сообщение было оставлено пустым.'; +$txt['error_long_message'] = 'Сообщение превышает максимально допустимую длину (' . $modSettings['max_messageLength'] . ' букв).'; +$txt['error_session_timeout'] = 'Ваша сессия истекла во время письма. Пожалуйста, попробуйте вставить заново ваше сообщение.'; +$txt['error_no_to'] = 'Не были обозначены получатели.'; +$txt['error_bad_to'] = 'Один или несколько \'to\'-получателей не найдены.'; +$txt['error_bad_bcc'] = 'Один или несколько \'bcc\'-получателей не найдены.'; +$txt['error_form_already_submitted'] = 'Вы уже вставили это сообщение! Возможно, Вы случайно нажали дважды или пытались обновить страницу.'; +$txt['error_poll_few'] = 'Должно быть как минимум две возможности для выбора!'; + +$txt['smiley_not_found'] = 'Смайл не найден.'; +$txt['smiley_has_no_code'] = 'Этому смайлу не был присвоен код.'; +$txt['smiley_has_no_filename'] = 'Не был назван файл этого смайла.'; +$txt['smiley_not_unique'] = 'Смайл с таким кодом уже существует.'; +$txt['smiley_set_already_exists'] = 'Набор смайлов с таким URL уже существует'; +$txt['smiley_set_not_found'] = 'Набор смайлов не найден'; +$txt['smiley_set_path_already_used'] = 'URL набора смайлов уже использовался другим набором смайлов.'; +$txt['smiley_set_unable_to_import'] = 'Невозможно импортировать набор смайлов. Или директория неправильная, или к ней нет доступа.'; + +$txt['smileys_upload_error'] = 'Не получилось загрузить файлы.'; +$txt['smileys_upload_error_blank'] = 'Все наборы смайлов должны иметь картинку!'; +$txt['smileys_upload_error_name'] = 'Все смайлы должны иметь одинаковые имена!'; +$txt['smileys_upload_error_illegal'] = 'Неверный Тип.'; + +$txt['search_invalid_weights'] = 'Поисковые значимости неправильно сконфигурированы. Как минимум один фактор должен отличаться от нуля. Пожалуйста сообщите об этой ошибке администратору..'; +$txt['unable_to_create_temporary'] = 'Поиск не смог создать временную таблицу. Пожалуйста, сообщите об этой ошибке администратору.'; + +$txt['package_no_file'] = 'Не получилось найти пакетный файл!'; +$txt['packageget_unable'] = 'Не получилось соединиться с сервером. Пожалуйста, попробуйте использовать этот URL вместо того.'; +$txt['not_on_simplemachines'] = 'Извините, пакеты могут быть только загружены, как этот с сервера simplemachines.org.'; +$txt['package_cant_uninstall'] = 'Этот пакет или не был никогда установлен, или уже удален - Вы не можете удалить его сейчас.'; +$txt['package_cant_download'] = 'Вы не можете загрузить или установить новый пакет, так как директория Пакетов не записываема (CHMOD)!'; +$txt['package_upload_error'] = 'Не могу загрузить пакет, пожалуйста, проверте разрешения для директории!'; +$txt['package_upload_error_exists'] = 'Файл, который Вы загружаете, уже существует на сервере. Пожалуйста, удалите его сначала, а потом попробуйте снова.'; + +$txt['no_membergroup_selected'] = 'Не выбраны группы пользователей'; + +$txt['attachment_not_found'] = 'Вложение Не Найдено'; + +$txt['cannot_karmalog_view'] = 'Sorry - you don\'t have the proper permissions to view the Karma Description list.'; +$txt['viewkarma_error'] = 'User ID must be a number'; +$txt['karma_not_topic_starter'] = 'Sorry, he is not topic author.'; +?> diff --git a/Themes/modern/languages/Help.english.php b/Themes/modern/languages/Help.english.php new file mode 100644 index 0000000..f6954ca --- /dev/null +++ b/Themes/modern/languages/Help.english.php @@ -0,0 +1,392 @@ +Edit Boards
    + In this menu you can create/reorder/remove boards, and the categories + above them. For example, if you had a wide-ranging + site that offered information on "Sports" and "Cars" and "Music", these + would be the top-level Categories you\'d create. Under each of these + categories you\'d likely want to create hierarchical "sub-categories", + or "Boards" for topics within each. It\'s a simple hierarchy, with this structure:
    +
      +
    • + Sports +  - A "category" +
    • +
        +
      • + Baseball +  - A board under the category of "Sports" +
      • +
          +
        • + Stats +  - A child board under the board of "Baseball" +
        • +
        +
      • Football +  - A board under the category of "Sports"
      • +
      +
    + Categories allow you to break down the board into broad topics ("Cars, + Sports"), and the "Boards" under them are the actual topics under which + members can post. A user interested in Pintos + would post a message under "Cars->Pinto". Categories allow people to + quickly find what their interests are: Instead of a "Store" you have + "Hardware" and "Clothing" stores you can go to. This simplifies your + search for "pipe joint compound" because you can go to the Hardware + Store "category" instead of the Clothing Store (where you\'re unlikely + to find pipe joint compound).
    + As noted above, a Board is a key topic underneath a broad category. + If you want to discuss "Pintos" you\'d go to the "Auto" category and + jump into the "Pinto" board to post your thoughts in that board.
    + Administrative functions for this menu item are to create new boards + under each category, to reorder them (put "Pinto" behind "Chevy"), or + to delete the board entirely.'; + +$helptxt[2] = 'Edit Forum News
    + This allows you to set the text for news items displayed on the Board Index page. + Add any item you want (e.g., "Don\'t miss the conference this Tuesday"). Each news item should + go in a separate box, and they are displayed randomly.'; + +$helptxt[3] = 'Edit Registration Agreement
    + This allows you to set the text for the registration agreement displayed when members sign up for your forum. + You can add or remove anything from the default registration agreement, which is included in SMF.'; + +$helptxt[4] = 'View all Members
    + View all members in the board. You are presented with a hyperlinked list of member names. You may click + on any of the names to find details of the members (homepage, age, etc.), and as Administrator + you are able to modify these parameters. You have complete control over members, including the + ability to delete them from the forum.'; + +$helptxt[6] = 'Email Your Members
    + From this menu you can send messages to all members who\'ve registered and entered their + email addresses (not all will, of course). You may edit the distribution list, or send messages + to all. Useful for important update/news information.'; + +$helptxt[7] = 'Ban Members
    + SMF provides the ability to "ban" users, to prevent people who have violated the trust of the board + by spamming, trolling, etc. This allows you to those users who are detrimental to your forum. As an admin, + when you view messages, you can see each user\'s IP address used to post at that time. In the ban list, + you simply type that IP address in, save, and they can no longer post from that location.
    You can also + ban people through their email address.'; + +$helptxt[8] = 'Set Reserved Names
    + This allows you to put in keywords or names that you want to restrict people from using as + a name or username.'; + +$helptxt[10] = 'Edit Features and Options
    + There are several features in this section that can be changed to your preference. Options for installed mods will generally also appear in here.'; + +$helptxt[11] = 'Edit Censored Words
    + SMF offers the option to censor certain words, by replacing them with another one.
    + Add a new word per line, like the example bellow:
    + cl*wn=funny guy
    +
    + (* can be used as a wildcard.)'; + +$helptxt['number_format'] = 'Number Format
    + You can use this setting to format the way in which numbers on your forum will be displayed to the user. The format of this setting is:
    +
    1,234.00

    + Where \',\' is the character used to split up groups of thousands, \'.\' is the character used as the decimal point and the number of zeros dictate the accuracy of roundings.'; + +$helptxt['time_format'] = 'Time Format
    + You have the power to adjust how the time and date look for yourself. There are a lot of little letters, but it\'s quite simple. + The conventions follow PHP\'s strftime function and are described as below (more details can be found at php.net).
    +
    + The following characters are recognized in the format string:
    + +   %a - abbreviated weekday name
    +   %A - full weekday name
    +   %b - abbreviated month name
    +   %B - full month name
    +   %d - day of the month (01 to 31)
    +   %D* - same as %m/%d/%y
    +   %e* - day of the month (1 to 31)
    +   %H - hour using a 24-hour clock (range 00 to 23)
    +   %I - hour using a 12-hour clock (range 01 to 12)
    +   %m - month as a number (01 to 12)
    +   %M - minute as a number
    +   %p - either "am" or "pm" according to the given time
    +   %R* - time in 24 hour notation
    +   %S - second as a decimal number
    +   %T* - current time, equal to %H:%M:%S
    +   %y - 2 digit year (00 to 99)
    +   %Y - 4 digit year
    +   %Z - time zone or name or abbreviation
    +   %% - a literal \'%\' character
    +
    + * Does not work on Windows-based servers.
    '; + +$helptxt[13] = 'Live announcements
    + This box shows recently updated announcements from www.simplemachines.org. + You should check here every now and then for updates, new releases, and important information from the Simple Machines Team.'; + +$helptxt[14] = 'Registration Management
    + This section contains all the functions that could be necessary to manage new registrations on the forum. It contains up to three + sections which are visible depending on your forum settings. These are:

    +
      +
    • + Awaiting Approval
      + This section is only shown if you have enabled admin approval of all new registrations. Anyone who registers to join your + forum will only become a full member once they have been approved by an admin. The section lists all those members who + are still awaiting approval, along with their email and IP address. You can choose to either accept or reject (delete) + any member on the list by checking the box next to the member and choosing the action from the drop-down box at the bottom + of the screen. When rejecting a member you can choose to delete the member either with or without notifying them of your decision.

      +
    • +
    • + Awaiting Activation
      + This section will only be visible if you have activation of member accounts enabled on the forum. This section will list all + members who have still not activated their new accounts. From this screen you can choose to either accept, reject or remind + members with outstanding registrations. As above you can also choose to email the member to inform them of the + action you have taken.

      +
    • +
    • + Register New Member
      + From this screen you can choose to register accounts for new members on their behalf. This can be useful in forums where registration is closed + to new members, or in cases where the admin wishes to create a test account. If the option to require activation of the account + is selected the member will be emailed a activation link which must be clicked before they can use the account. Similarly you can + select to email the users new password to the stated email address. +
    • +
    '; + +$helptxt[15] = 'Moderation Log
    + This section allows members of the admin team to track all the moderation actions that the forum moderators have performed. To ensure that + moderators cannot remove references to the actions they have performed, entries may not be deleted until 24 hours after the action was taken. + The \'objects\' column lists any variables associated with the action.'; +$helptxt[16] = 'Error Log
    + The error log tracks logs every serious error encountered by users using your forum. It lists all of these errors by date which can be sorted + by clicking the black arrow next to each date. Additionally you can filter the errors by clicking the picture next to each error statistic. This + allows you to filter, for example, by member. When a filter is active the only results that will be displayed will be those that match that filter.'; +$helptxt[17] = 'Theme Settings
    + The settings screen allows you to change settings specific to a theme. These settings include options such as the themes directory and URL information but + also options that affect the layout of a theme on your forum. Most themes will have a variety of user configurable options, allowing you to adapt a theme + to suit your individual forum needs.'; +$helptxt['smileys'] = 'Smiley Center
    + Here you can add and remove smileys, and smiley sets. Note importantly that if a smiley is in one set, it\'s in all sets - otherwise, it might + get confusing for your users using different sets.'; + +// Mod Settings + +$helptxt['topicSummaryPosts'] = 'This allows you to set the number of previous posts shown in the topic summary at the reply screen.'; +$helptxt['enableStickyTopics'] = 'Stickies are topics that remain on top of the topic list. They are mostly used for important + messages. Although you can change this with permissions, by default only moderators and administrators can make topics sticky.'; +$helptxt['userLanguage'] = 'Turning this option on will allow users to select which language file they use. It will not affect the + default selection.'; +$helptxt['trackStats'] = 'Stats:
    This will allow users to see the latest posts and the most popular topics on your forum. + It will also show several statistics, like the most members online, new members and new topics.
    + Hits:
    Adds another column to the stats page with the number of hits on your forum.'; +$helptxt['titlesEnable'] = 'Switching Custom Titles on will allow members with the relevant permission to create a special title for themselves. + This will be shown underneath the name.
    For example:
    Jeff
    Cool Guy'; +$helptxt['topbottomEnable'] = 'This will add go up and go down buttons, so that member can go to the top and bottom of a page + without scrolling.'; +$helptxt['onlineEnable'] = 'This will show an image to indicate whether the member is online or offline'; +$helptxt['todayMod'] = 'This will show "Today", or "Yesterday", instead of the date.'; +$helptxt['enablePreviousNext'] = 'This will show a link to the next and previous topic.'; +$helptxt['pollMode'] = 'This selects whether polls are enabled or not. If polls are disabled, any existing polls will be hidden + from the topic listing. You can choose to continue to show the regular topic without their polls by selecting + "Show Existing Polls as Topics".

    To choose who can post polls, view polls, and similar, you + can allow and disallow those permissions. Remember this if polls are not working.'; +$helptxt['enableVBStyleLogin'] = 'This will show a more compact login on every page of the forum for guests.'; +$helptxt['enableCompressedOutput'] = 'This option will compress output to lower bandwidth consumption, but it requires + zlib to be installed.'; +$helptxt['databaseSession_enable'] = 'This option makes use of the database for session storage - it is best for load balanced servers, but helps with all timeout issues and can make the forum faster. Doesn\'t work if session.auto_start is on.'; +$helptxt['databaseSession_loose'] = 'Turning this on will decrease the bandwidth your forum uses, and make it so clicking back will not reload the page - the downside is that the (new) icons won\'t update, among other things. (unless you click to that page instead of going back to it.)'; +$helptxt['databaseSession_lifetime'] = 'This is the number of seconds for sessions to last after they haven\'t been accessed. If a session is not accessed for too long, it is said to have "timed out". Anything higher than 2400 is recommended.'; +$helptxt['m16'] = 'Enabling this will cause your current location to be shown on a single line, as opposed to in a tree-like manner.'; +$helptxt['m17'] = 'This will change the layout of the statistics shown at the bottom of the boardindex.'; +$helptxt['enableErrorLogging'] = 'This will log any errors, like a failed login, so you can see what went wrong.'; +$helptxt['notifyAnncmnts_UserDisable'] = 'This will allow users to opt out of notification of new posts on announcement boards.'; +$helptxt['compactTopicPagesEnable'] = 'This will just show a selection of the number of pages.
    Example: + "3" to display: 1 ... 4 [5] 6 ... 9
    + "5" to display: 1 ... 3 4 [5] 6 7 ... 9'; +$helptxt['timeLoadPageEnable'] = 'This will show the time in seconds SMF took to create that page at the bottom of the board.'; +$helptxt['removeNestedQuotes'] = 'This will only show the quote of the post in question, not any quoted posts from that post.'; +$helptxt['simpleSearch'] = 'This will show a simple search form and a link to a more advanced form.'; +$helptxt['maxwidth'] = 'This allows you to set a maximum size for posted pictures. Pictures smaller than the maximum will not be affected.'; +$helptxt['mail_type'] = 'This allows you to select either the default PHP mail program or your mail server. + Fill in the details of your outgoing mail server unless you selected sendmail.'; +$helptxt['attachmentEnable'] = 'Attachments are files that members can upload, and attach to a post.

    + Check attachment extension:
    Do you want to check the extension of the files?
    + Allowed attachment extensions:
    You can set the allowed extensions of attached files.
    + Display attachment as picture in posts:
    If the uploaded file is a picture, this will show it underneath the post
    + Attachments directory:
    The path to your attachment folder
    (example: /home/sites/yoursite/www/forum/attachments)
    + Attachments URL:
    The URL to your attachment folder
    (example: http://www.yoursite.com/forum/attachments)
    + Max attachment folder space (in KB):
    Select how large the attachment folder can be, including all files within it.
    + Max attachment size per post (in KB):
    Select the maximum filesize of all attachments made per post. If this is lower than the per-attachment limit, this will be the limit.
    + Max size per attachment (in KB):
    Select the maximum filesize of each separate attachment.
    + Max number of attachments per post:
    Select the number of attachments a person can make, per post.'; +$helptxt['karmapermiss'] = 'By default this option is switched off and Karma Log can look only admins. If you want to do Karma Log available for other users or moderators, etc, enable this option and give the right that group, which can look Log in "Permissions" section.'; +$helptxt['karmalinks'] = 'If you enable this feauture, users will see two links in their profiles (Own or other users). They can see who change their karma and whom they change it. Karma Description Mod must be enabled'; +$helptxt['karmakarma'] = 'It\'s display users karma in Karma log opposit the usernames. For example: Username (+12/-8)'; +$helptxt['karmaurl'] = 'If you enable this option, you and your users can view where their karma was change'; +$helptxt['karmaisowner'] = 'If you enable this option, only profile owner will see two links to his own karma log. By the way, your users will resieve an error if they input an url adress (like http://your_forum.com/index.php?action=ownkarma;u=other_user) by the hand if you don\'t want your users can view other users karma log. Whole karma log will be disabled too. ONLY OWN KARMA LOG.'; +$helptxt['karmaMode'] = 'Karma is a feature that shows the popularity of a member. Members, if allowed, can + \'applaud\' or \'smite\' other members, which is how their popularity is calculated. You can change the + number of posts needed to have a "karma", the time between smites or applauds, and if administrators + have to wait this time as well.

    Whether or not groups of members can smite others is controlled by + a permission. If you have trouble getting this feature to work for everyone, double check your permissions.'; +$helptxt['cal_enabled'] = 'The calendar can be used for showing birthdays, or for showing important moments happening in your community.

    + Show days as link to \'Post Event\':
    This will allow members to post events for that day, when they click on that date
    + Show week numbers:
    Show which week it is.
    + Max days in advance on board index:
    If this is set to 7, the next week\'s worth of events will be shown.
    + Show holidays on board index:
    Show today\'s holidays in a calendar bar on the board index.
    + Show birthdays on board index:
    Show today\'s birthdays in a calendar bar on the board index.
    + Show events on board index:
    Show today\'s events in a calendar bar on the board index.
    + Default Board to Post In:
    What\'s the default board to post events in?
    + Minimum year:
    Select the "first" year on the calendar list.
    + Maximum year:
    Select the "last" year on the calendar list
    + Birthday color:
    Select the color of the birthday text
    + Event color:
    Select the color of the event text
    + Holiday color:
    Select the color of the Holiday text
    + Allow events to span multiple days:
    Check to allow events to span multiple days.
    + Max number of days an event can span:
    Select the maximum days that an event can span.

    + Remember that usage of the calendar (posting events, viewing events, etc.) is controlled by permissions set on the permissions screen.'; +$helptxt['localCookies'] = 'SMF uses cookies to store login information on the client computer. + Cookies can be stored globally (myserver.com) or locally (myserver.com/path/to/forum).
    + Check this option if you\'re experiencing problems with users getting logged out automatically.
    + Globally stored cookies are less secure when used on a shared webserver (like Tripod).
    + Local cookies don\'t work outside the forum folder so, if your forum is stored at www.myserver.com/forum, pages like www.myserver.com/index.php cannot access the account information. + Especially when using SSI.php, global cookies are recommended.'; +$helptxt['disabledBBC'] = 'This setting allows you to manually disable certain Bulletin Board Codes from being used on your forum. To do this just type in a comma separated list of all codes you wish to remain inactive.

    + Example:
    \'move,glow,table,tr,td\' - This would disable the move, glow and table tags from being used on your forum.

    + Please note that this does not work on all tags.'; +$helptxt['enableBBC'] = 'Selecting this option will allow your members to use Bulletin Board Code (BBC) throughout the forum, allowing users to format their posts with images, type formatting and more.'; +$helptxt['enableNewReplyWarning'] = 'When this option is enabled, a member who is making a post on your forum will be shown a warning message if a new reply is received while they are writing their message. This presents them with an opportunity to adjust their post accordingly.'; +$helptxt['time_offset'] = 'Not all forum administrators want their forum to use the same time zone as the server upon which it is hosted. Use this option to specify a time difference (in hours) from which the forum should operate from the server time. Negative and decimal values are permitted.'; +$helptxt['spamWaitTime'] = 'Here you can select the amount of time that must pass between postings. This can be used to stop people from "spamming" your forum by limiting how often they can post.'; + +$helptxt['enablePostHTML'] = 'This will allow the posting of some basic HTML tags: + <b>, <u>, <i>, <pre>, <blockquote>, <img src="" />, <a href="">, and <br />.'; + +$helptxt['themes'] = 'Here you can select whether the default theme can be chosen, what theme guests will use, + as well as other options. Click on a theme to the right to change the settings for it.'; +$helptxt['theme_install'] = 'This allows you to install new themes. You can do this from an already created directory, by uploading an archive for the theme, or by copying the default theme.

    Note that the archive or directory must have a theme_info.xml definition file.'; +$helptxt['enableEmbeddedFlash'] = 'This option will allow your users to use Flash directly inside their posts, + just like images. This could pose a security risk, although few have successfully exploited it. + USE AT YOUR OWN RISK!'; +$helptxt['xmlnews_enable'] = 'Allows people to link to Recent news + and similar data. It is also recommended that you limit the size of recent posts/news because, when rss data + is displayed in some clients, like Trillian, it is expected to be truncated.'; +$helptxt['hotTopicPosts'] = 'Change the number of posts for a topic to reach the state of a "hot" or + "very hot" topic.'; +$helptxt['globalCookies'] = 'Allows for the use of subdomain independent cookies. For example, if...
    + Your site is at http://www.simplemachines.org/,
    + And your forum is at http://forum.simplemachines.org/,
    + Using this modification will allow you to access the forum\'s cookie on your site.'; +$helptxt['redirectMetaRefresh'] = 'Normally, SMF uses a "Location" header to redirect you to various places in the forum. However, this doesn\'t always work on some older servers.

    Enable this if you experience problems staying logged in.'; +$helptxt['securityDisable'] = 'This disables the additional password check for the administration section. This is not recommended!'; +$helptxt['securityDisable_why'] = 'This is your current password. (the same one you use to login.)

    Having to type this helps ensure that you want to do whatever administration you are doing, and that it is you doing it.'; +$helptxt['emailmembers'] = 'In this message you can use a few "variables". These are:
    + {$board_url} - The URL to your forum.
    + {$current_time} - The current time.
    + {$member.email} - The current member\'s email.
    + {$member.link} - The current member\'s link.
    + {$member.id} - The current member\'s id.
    + {$member.name} - The current member\'s name. (for personalization.)
    + {$latest_member.link} - The most recently registered member\'s link.
    + {$latest_member.id} - The most recently registered member\'s id.
    + {$latest_member.name} - The most recently registered member\'s name.'; +$helptxt['attachmentEncryptFilenames'] = 'Encrypting attachment filenames allows you to have more than one attachment of the + same name, to safely use .php files for attachments, and heightens security. It, however, could make it more + difficult to rebuild your database if something drastic happened.'; + +$helptxt['failed_login_threshold'] = 'Set the number of failed login attempts before directing the user to the password reminder screen.'; +$helptxt['edit_wait_time'] = 'Number of seconds allowed for a post to be edited before logging the last edit date.'; +$helptxt['enableSpellChecking'] = 'Enable spell checking. You MUST have the pspell library installed on your server and your PHP configuration set up to use the pspell library. Your server ' . (function_exists('pspell_new') == 1 ? 'DOES' : 'DOES NOT') . ' appear to have this set up.'; +$helptxt['lastActive'] = 'Set the number of minutes to show people are active in X number of minutes on the board index. Default is 15 minutes.'; + +$helptxt['autoOptDatabase'] = 'This option optimizes the database every so many days. Set it to 1 to make a daily optimization. You can also specify a maximum number of online users, so that you won\'t overload your server or inconvenience too many users.'; +$helptxt['autoFixDatabase'] = 'This will automatically fix broken tables and resume like nothing happened. This can be useful, because the only way to fix it is to REPAIR the table, and this way your forum won\'t be down until you notice. It does email you when this happens.'; + +$helptxt['enableParticipation'] = 'This shows a little icon on the topics the user has posted in.'; + +$helptxt['db_persist'] = 'Keeps the connection active to increase performance. If you aren\'t on a dedicated server, this may cause you problems with your host.'; + +$helptxt['queryless_urls'] = 'This changes the format of URLs a little so search engines will like them better. They will look like index.php/topic,1.html.

    This feature will ' . (strpos(php_sapi_name(), 'apache') !== false ? '' : 'not') . ' work on your server.'; +$helptxt['fixLongWords'] = 'This option breaks words longer than a certain length into pieces so they don\'t disturb the forum\'s layout. (as much...) This option should not be set to a value under 40.'; + +$helptxt['who_enabled'] = 'This option allows you to turn on or off the ability for users to see who is browsing the forum and what they are doing.'; + +$helptxt['recycle_enable'] = '"Recycles" deleted topics and posts to the specified board.'; + +$helptxt['default_personalText'] = 'Sets the default text a user will have as their "personal text."'; + +$helptxt['modlog_enabled'] = 'Logs all moderation actions.'; + +$helptxt['guest_hideContacts'] = 'If selected this option will hide the email addresses and messenger contact details + of all members from any guests on your forum'; + +$helptxt['registration_method'] = 'This option determines what method of registration is used for people wishing to join your forum. You can select from:

    +
      +
    • + Registration Disabled:
      + Disables the registration process, which means that no new members can register to join your forum.
      +
    • + Immediate Registration
      + New members can login and post immediately after registering on your forum.
      +
    • + Member Activation
      + When this option is enabled any members registering to the forum will have a activation link emailed to them which they must click before they can become full members
      +
    • + Member Approval
      + This option will make it so all new members registering to your forum will need to be approved by the admin before they become members. +
    • +
    '; +$helptxt['send_validation_onChange'] = 'When this option is checked all members who change their email address in their profile will have to reactivate their account from an email sent to that address'; +$helptxt['send_welcomeEmail'] = 'When this option is enabled all new members will be sent an email welcoming them to your community'; +$helptxt['allow_hideOnline'] = 'With this option enabled all members will be able to hide their online status from other users (except administrators). If disabled only users who can moderate the forum can hide their presence. Note that disabling this option will not change any existing member\'s status - it just stops them from hiding themselves in the future.'; +$helptxt['allow_hideEmail'] = 'With this option enabled members can choose to hide their email address from other members. However, administrators can always see everyone\'s email addresses.'; + +$helptxt['latest_support'] = 'This panel shows you some of the most common problems and questions on your server configuration. Don\'t worry, this information isn\'t logged or anything.

    If this stays as "Retrieving support information...", your computer probably cannot connect to www.simplemachines.org.'; +$helptxt['latest_packages'] = 'Here you can see some of the most popular and some random packages or mods, with quick and easy installations.

    If this section doesn\'t show up, your computer probably cannot connect to www.simplemachines.org.'; +$helptxt['latest_themes'] = 'This area shows a few of the latest and most popular themes from www.simplemachines.org. It may not show up properly if your computer can\'t find www.simplemachines.org, though.'; + +$helptxt['secret_why_blank'] = 'For your security, the answer to your question (as well as your password) is encrypted in such a way that SMF can only tell you if get it right, so it can never tell you (or anyone else, importantly!) what your answer or password is.'; +$helptxt['moderator_why_missing'] = 'Since moderation is done on a board-by-board basis, you have to make members moderators from the board management interface.'; + +$helptxt['permissions'] = 'Permissions are how you either allow groups to, or deny groups from, doing specific things.

    You can modify multiple boards at once with the checkboxes, or look at the permissions for a specific group by clicking \'Modify.\''; +$helptxt['permissions_board'] = 'If a board is set to \'Global,\' it means that the board will not have any special permissions. \'Local\' means it will have its own permissions - separate from the global ones. This allows you to have a board that has more or less permissions than another, without requiring you to set them for each and every board.'; +$helptxt['permissions_quickgroups'] = 'These allow you to use the "default" permission setups - standard means \'nothing special\', restrictive means \'like a guest\', moderator means \'what a moderator has\', and lastly \'maintenance\' means permissions very close to those of an administrator.'; +$helptxt['membergroups'] = 'In SMF there are two types of groups that your members can be part of. These are: +
      +
    • Regular Groups: A regular group is a group to which members are not automatically put into. To assign a member to be in a group simply go to their profile and click "Account Settings". From here you can assign them any number of regular groups to which they will be part.
    • +
    • Post Groups: Unlike regular groups post based groups cannot be assigned. Instead, members are automatically assigned to a post based group when they reach the minimum number of posts required to be in that group.
    • +
    '; + +$helptxt['calendar_how_edit'] = 'You can edit these events by clicking on the red asterisk (*) next to their names.'; + +$helptxt['maintenance_general'] = 'From here, you are able to optimize all your tables (makes them smaller and faster!), make sure you have the newest versions, find any errors that might be messing up your board, recount totals, and empty logs.

    The last two should be avoided unless something is wrong, but don\'t hurt anything.'; +$helptxt['maintenance_backup'] = 'This area allows you to save a copy of all the posts, settings, members, and other information in your forum to a very large file.

    It is recommended that you do this often, perhaps weekly, for safety and security.'; +$helptxt['maintenance_rot'] = 'This allows you to completely and irrevocably remove old topics. It is recommended that you try to make a backup first, just in case you remove something you didn\'t mean to.

    Use this option with care.'; + +$helptxt['avatar_allow_server_stored'] = 'This allows your members to pick from avatars stored on your server itself. They are, generally, in the same place as SMF under the avatars folder.
    As a tip, if you create directories in that folder, you can make "categories" of avatars.'; +$helptxt['avatar_allow_external_url'] = 'With this enabled, your members can type in a URL to their own avatar. The downside of this is that, in some cases, they may use avatars that are overly large or portray images you don\'t want on your forum.

    Remember that members need the permission to choose a remote avatar for this to work for them. This option only enables the use for those with the proper permission.'; +$helptxt['avatar_check_size'] = 'This can help to "enforce" the size restriction, but it can also slow things down markedly. Use with care.'; +$helptxt['avatar_allow_upload'] = 'This option is much like "Allow members to select an external avatar", except that you have better control over the avatars, a better time resizing them, and your members do not have to have somewhere to put avatars.

    However, the downside is that it can take a lot of space on your server.'; +$helptxt['avatar_download_png'] = 'PNGs are larger, but offer better quality compression. If this is unchecked, JPEG will be used instead - which is often smaller, but also of lesser or blurry quality.'; + +$helptxt['disableHostnameLookup'] = 'This disables host name lookups, which on some servers are very slow. Note that this will make banning less effective.'; + +$helptxt['nowplaying_image'] = "The name of the image to display next to the now playing entry in posts. If no image is entered, cddisc.gif is used instead. The image must be in the
    images
    directory for each theme."; +$helptxt['nowplaying_text'] = "Optional text to display between the image and the now playing entry in posts. If no text is specified, only the image will be used. HTML is allowed here."; + +$helptxt['search_match_complete_words'] = 'This option limits search results to full words that match a users query. For example, if this option is disabled, a search term like \'here\' would match \'here\', \'there\', and \'hereafter\'. Enabling this option would limit search results to only match \'here\'.

    Please notice that enabling this option might slow down the search function, especially if the amount of messages is large.'; +$helptxt['disableTemporaryTables'] = 'This option prevents the usage of temporary tables. Since this option makes search queries slower, it\'s advisable to only use it if you don\'t have permissions to create temporary tables.'; +$helptxt['search_cache_size'] = 'Search caching is used to limit the amount of extensive database queries. Once the user has entered a search query, the results are cached in the database. This way, the next pages of the search results are already available without need for extensive search.

    Use this setting to limit the amount of cached results. Increasing this value requires a larger database (about 20kb for each cached result).'; +$helptxt['search_weight_frequency'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor counts the amount of matching messages and divides them by the total number of messages within a topic.'; +$helptxt['search_weight_age'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor rates the age of the last matching message within a topic. The more recent this message is, the higher the score.'; +$helptxt['search_weight_length'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor is based on the topic size. The more messages are within the topic, the higher the score.'; +$helptxt['search_weight_subject'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor looks whether a search term can be found withing the subject of a topic.'; +$helptxt['search_weight_first_message'] = 'Weight factors are used to determine the relevancy of a search result. Change these weight factors to match the things that are specifically important for your forum. For instance, a forum of a news site, might want a relatively high value for \'age of last matching message\'. All values are relative in relation to each other and should be positive integers.

    This factor looks whether a match can be found in the first message of a topic.'; + +$helptxt['see_admin_ip'] = 'IP addresses are shown to administrators and moderators to facilitate moderation and to make it easier to track people up to no good. Remember that IP addresses may not always be identifying, and most people\'s IP addresses change periodically.

    Members are also allowed to see their own IPs.'; +$helptxt['see_member_ip'] = 'Your IP address is shown only to you and moderators. Remember that this information is not identifying, and that most IPs change periodically.

    You cannot see other members\' IP addresses, and they cannot see yours.'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Help.russian.php b/Themes/modern/languages/Help.russian.php new file mode 100644 index 0000000..389893c --- /dev/null +++ b/Themes/modern/languages/Help.russian.php @@ -0,0 +1,324 @@ +Редактирование Форумов
    + В этом меню, Вы можете создавать/преобразовывать/удалять разделы, и категории. Например, если у вас есть сайт, посвященный "Спорту" , "Автомобилям" и "Музыке", они будут корневыми категориями, созданными Вами. Внутри каждой категории, Вы бы хотели создать "Подкатегории", +или "разделы" с соответствующими темами. Это простая иерархия с такой структурой:
    +
      +
    • + Спорт +  - A "категория" +
    • +
        +
      • + Баскетбол +  - Раздел в категории о "Спорте" +
      • +
          +
        • + Статистика +  - Форум в разделе о "Баскетболе" +
        • +
        +
      • Футбол +  - Раздел в категории о "Спорте"
      • +
      +
    + Категории позволяют Вам разделять Форум по тематикам ("Автомобили, + Спорт"), и "Разделы" в которых актуальные темы, где участники смогут писать свои сообщения. Пользователи, интересующиеся Грузовиками, будут писать сообщения в разделе + "Автомобили->Грузовики". Категории позволяют людям быстро найти свой раздел по интересам: Вместо "Магазин" у Вас будет + "Железо" и "Одежда" магазины, в которые Вы сможете пойти. Это облегчит Вам поиск "средства для соединения труб" так как пойдете прямиком в раздел Магазины с Железом "категорию" вместо Одежного Магазина (где вы врядли найдете средство для соединения труб).
    + Как сказано выше, раздел - это ключевая тема под категорией. + Если Вы хотите обсудить "Грузовики" Вы пойдете в "Автомобили" категорию и перейдете в раздел "Грузовики" раздел, где вы сможете написать сообщения.
    + Административные функции для этого меню состоят в том, чтобы создавать новые разделы под категориями, в их переупорядочивании (поставить "Грузовики" после "Chevy"), или удалить раздел полностью.'; + +$helptxt[2] = 'Редактирование Новостей Форума
    + Здесь Вы можете редактировать новости, отображаемые на главной странице Форума. Напишите, что Вы хотите (например, "Не пропустите конференцию в этот вторник"). Каждая новость должна быть в отдельном окошке, и отображаться они будут в случайном порядке.'; + +$helptxt[3] = 'Редактировать Регистрационное Соглашение
    + Здесь Вы можете написать регистрационное соглашение, которое будет показыватьься пользователю во время регистрации на Вашем форуме. Вы можете добавить или удалить все что угодно в соглашение, которое по умолчанию включено в SMF'; + + +$helptxt[4] = 'Просмотр Всех Участников
    + Просмотреть всех участников Форума. Вам показывается список гиперлинков пользовательских имен. Вы можете нажать на имя любого пользователя, чтобы посмотреть детальную информацию о нем (домашняя страница, возраст и т.д.), и, в качестве Администратора, можно изменять эти параметры. У вас будет полный контроль над пользователями, включая возможность удаления их с форума.'; + +$helptxt[6] = 'Послать Email Участникам
    + Из этого меню Вы можете послать сообщения всем пользователям, зарегистрированным на Вашем Форуме и оставившим email (не всем, конечно). Вы можете редактировать список рассылаемых или отправить email всем. Полезно для важной информации - новости, обновления..'; + +$helptxt[7] = 'Бан Участников
    + SMF предоставляет возможность "бана" пользователей, чтобы не пропустить пользователей, которым не доверяете за рассылку спама, плохое поведение и т.д.. Вы можете забанить любого, зашедшего на Ваш форум. Как Администратор, просматривая Форум, Вы видете IP каждого пользователя. В списке банов, просто наберите IP адрес и сохраните, и пользователь больше не сможет писать с этого IP. Так же Вы можете забанить пользователя по email адресу.'; + +$helptxt[8] = 'Установить Зарезервированные Имена
    + Здесь Вы можете вписать имена или слова, которые пользователи не смогут использовать как имя или имя пользователя.'; + + +$helptxt[10] = 'Изменить Настройки и Опции
    + Здесь располагаются некоторые настройки, которые меняют определенные параметры Вашего форума. Опции установленных модификаций (mods) также находятся в этом разделе.'; + +$helptxt[11] = 'Установить Цензуру Слов
    + SMF предлагает возможность цензуры определенных слов, посредством замены их другими словами или символами.
    + Добавьте новое слово, по одному на строчку, как в примере ниже:
    + кл*ун=смешной парень
    +
    + (* заменяет любой символ.)'; + +$helptxt['number_format'] = 'Формат Чисел
    + Вы можете настраивать формат чисел на вашем Форуме, в котором их они будут видны пользователям. Формат данных настроек такой:
    +
    1,234.00

    + Где \',\' знак, разделяющий тысячи, а \'.\' знак десятичной дроби, обозначающий точность приближения.'; + +$helptxt['time_format'] = 'Формат Времени
    + У Вас есть возможность настроить, как будет выглядеть время и дата лично для Вас. Много маленьких букв, но все просто. + Это условные обозначения PHP формата времени, его описание ниже (более подробно вы можете познакомиться на php.net).
    +
    + Следующие символы распознаются в строке формата времени:
    + +   %a - аббревиатура дня недели
    +   %A - полное название дня недели
    +   %b - аббревиатура месяца
    +   %B - полное название месяца
    +   %d - день месяца (от 01 до 31)
    +   %D* - такой как %м/%в/%г
    +   %e* - день месяца (от 1 до 31)
    +   %H - 24-х часовой формат времени (отсчет с 00 до 23)
    +   %I - 12-и часовой формат времени (отсчет с 01 до 12)
    +   %m - цифра вместо месяца (01 to 12)
    +   %M - минуты цифрой
    +   %p - или"am" или "pm" в зависимости от времени
    +   %R* - время в 24-х часовой системе счисления
    +   %S - секунды как десятичное число
    +   %T* - текущее время равно %Ч:%М:%С
    +   %y - 2 цифры года (с 00 до 99)
    +   %Y - 4 цифры года
    +   %Z - временная зона, имя или аббревиатура
    +   %% - буквенный \'%\' символ
    +
    + * Не работает на Windows серверах.
    '; + +$helptxt[13] = 'Динамические объявления
    + В этом поле показываются последние новости с сайта www.simplemachines.org. +Вам следует достаточно часто проверять информацию об обновлениях, новых версиях от Simple Machines Team.'; + +$helptxt[14] = 'Управление Регистрацией
    + В этом разделе находятся все необходимые функции, которые могут пригодиться при управлении регистрацией новых пользователей. В нем может быть до 3-х секций, которые видимы, в зависимости от настроек форума. Это:

    +
      +
    • + Ожидание Подтверждения
      + Эта секция показывается только в том случае, если включено подтверждение регистрации новых пользователей администратором. Все, кто регистрируется на форуме, становятся полноправными участниками только после подтверждения администратора. Здесь отображается список пользователей, которые ожидают подтверждения с их IP адресами и email. Вы можете разрешить или отказать пользователю, отметив или оставив пустой ячейку, рядом с пользователем и выбрать необходимое действие в ниспадающем окне внизу страницы. При отказе пользователю, Вы так же можете удалить его аккаунт с или без оповещением его о вашем решении.

      +
    • +
    • + Ожидание Активации
      + Этот раздел будет отображаться при условии, что включена активация аккаунтов участников форума. Здесь будут перечислены все пользователи, которые не активировали свои аккаунты. На этой странице, Вы можете выбрать разрешить, отказать или напомнить участнику о просроченной регистрации. Как и выше, можно проинформировать пользователя о Ваших действиях.

      +
    • +
    • + Регистрация Новых Участников
      + На этой странице Вы можете регистрировать аккаунты на имя участников. Это будет полезно на форумах, где закрыта регистрация новых участников, или в случаях, если администратор желает создать тестовый аккаунт. Если на форуме требуется активация аккаунт, пользователь получит email с ссылкой для активации, которую ему надо будет нажать для того, чтобы пользоваться форумом. Так же, вы можете выбрать, отправить ли пользователю email с паролем на указанный при регистрации адрес. +
    • +
    '; + +$helptxt[15] = 'Лог Модерирования
    + Эта секция позволяет команде администраторов отслеживать все действия по модерированию, которые выполнили модераторы форума. Чтобы убедиться, что модераторы не могут удалять ссылки на действия, которые они совершили, значения не удаляются в течение 24 часов с момента совершения действия. + Список \'объектов\' содержит любые изменения относительно действия.'; +$helptxt[16] = 'Лог Ошибок
    + Лог ошибок содержит список всех серьезных ошибок, случившихся при использовании форума пользователями. Здесь содержатся список ошибок по дате, который может быть сохранен нажатием черной стрелки рядом с каждой записью. Дополнительно, Вы можете отфильтровать ошибки, нажав картинку рядом со статистическими данными ошибки. Это позволяет, например, отфильтровать ошибки для определенного пользователя. Когда фильтр активирован, показываются только ошибки, соответствующие фильтру..'; +$helptxt[17] = 'Настройки Темы
    + Эти настройки позволяют Вам изменять тему Вашего форума. Эти настройки включают такие опции, как директория темы, информацию о URL, а также настройки внешнего вида форума. Большинство тем будут иметь множество настроек конфигурации для пользователей, позволяющие адаптировать форум под ваши собственные нужды.'; +$helptxt['smileys'] = 'Центр Смайлов
    + Здесь вы можете добавлять и удалять смайлы и наборы смайлов. Вы можете добавлять и удалять смайлы/наборы смайлов. Учтите, что если смайл в одном наборе, то его надо добавить и в другие, чтобы не приводить в замешательство пользователей, использующих разные наборы.'; + +// Mod Settings + +$helptxt['topicSummaryPosts'] = 'Это позволяет Вам установить число отображаемых предыдущих сообщений в окне написания ответа на форуме.'; +$helptxt['enableStickyTopics'] = 'Прикрепленные темы, всегда остаются вверху списка тем. В основном, они используются для важных сообщений на форуме. Только модераторы и администраторы, по умолчанию, могут сделать тему прикрепленной.'; +$helptxt['userLanguage'] = 'Включив эту опцию, Вы разрешите пользователям выбирать язык, который они будут использовать. Это не повлияет на настройки языка по умолчанию.'; +$helptxt['trackStats'] = 'Статистика:
    Это позволяет пользователям просмотреть последние сообщения и увидеть наиболее горячие темы Вашего форума. Также, здесь показывается другая статистика - количество участников на форуме, новые участники и новые темы.
    + Нажатия:
    Добавляет другой столбец статистики, с количеством заходов на форум.'; +$helptxt['titlesEnable'] = 'Включение Изменения Титула позволит пользователям с определенным доступом создавать специальный титул для себя. Он показывается под именем.
    Например:
    Jeff
    Крутой Чувак'; +$helptxt['topbottomEnable'] = 'Это добавит кнопки снизу и вверху страницы, чтобы пользователи могли легко перемещаться вниз или вверх страницы без скроллинга.'; +$helptxt['onlineEnable'] = 'Это отображает картинку, обозначающую, на форуме ли пользоваель или нет'; +$helptxt['todayMod'] = 'Это показывает "Сегодня", или "Вчера", вместо даты.'; +$helptxt['enablePreviousNext'] = 'Это показывает ссылку на следующую или предыдущую страницу.'; +$helptxt['pollMode'] = 'Здесь выбирается, включено голосование или нет. Если голосование отключено, существующие голосования будут скрыты в списке тем. Вы можете выбрать, отображение существующих голосований, выбрав "Отображать Существующие Опросы как Темы".

    Вы можете выбрать, кому разрешено создавать голосования в меню прав пользователей. Помните об этом если голосование не работает.'; +$helptxt['enableVBStyleLogin'] = 'Это будет отображать маленькое поле для входа на форум снизу страницы.'; +$helptxt['enableCompressedOutput'] = 'Эта опция будет сжимать исходящие данные для для увеличения пропускной способности, но она требует чтобы был установлен zlib.'; +$helptxt['databaseSession_enable'] = 'Эта опция полезна для хранения сессий в базе данных - это подходит для сбалансированных серверов, решает проблему с истечением времени и форум работает быстрей. Не работает, если включена session.auto_start.'; +$helptxt['databaseSession_loose'] = 'Включив эту опцию, вы сократите трафик используемый форумом, например, нажав Назад, страница не будет закачиваться заново, не будут обновляться картинки. (Если Вы, конечно, нажмете назад, а не на ссылку страницы)'; +$helptxt['databaseSession_lifetime'] = 'Это время сессии в секундах которое проходит после того как не было запросов на форум. Если сессия бездействует слишком долго, происходит "timed out". Рекомендуется выставлять более 2400.'; +$helptxt['m16'] = 'Включив эту опцию, Ваше расположение на страницах форума будет отображаться в одной строке, вместо древовидной структуры.'; +$helptxt['m17'] = 'Это изменит вид статистики, отображаемой внизу страницы форума.'; +$helptxt['enableErrorLogging'] = 'Будет вестись лог любых ошибок, например, неправильный логин, чтобы Вы могли видеть, что не правильно.'; +$helptxt['notifyAnncmnts_UserDisable'] = 'Это позволит пользователям отказаться от уведомлений о новых сообщениях в объявлениях форума.'; +$helptxt['compactTopicPagesEnable'] = 'Будет отображаться количество страниц рядом с выбранной страницей.
    Например: + "3" отображается: 1 ... 4 [5] 6 ... 9
    + "5" отображается: 1 ... 3 4 [5] 6 7 ... 9'; +$helptxt['timeLoadPageEnable'] = 'Будет отображаться время в секундах внизу страницы, которое заняло у SMF чтобы создать страницу.'; +$helptxt['removeNestedQuotes'] = 'Будет отображаться только цитата сообщения, а другие цитаты нет.'; +$helptxt['simpleSearch'] = 'Будет отображаться форма простого поиска и ссылка на расширенный поиск.'; +$helptxt['maxwidth'] = 'Это позволит Вам установить максимальный размер вставленнй картинки. Картинки меньше чем установленный размер не изменяются.'; +$helptxt['mail_type'] = 'Вы можете выбрать PHP почтовую программу или ваш почтовый сервер. Заполните настройки Вашей исходящей почты если не выбрали sendmail.'; +$helptxt['attachmentEnable'] = 'Вложения, это те файлы, которые пользователи закачивают и прикрепляют к сообщению.

    + Проверять Расширение Вложения:
    Вы хотите включить проверку расширений файлов?
    + Разрешенные Расширения Вложений:
    Вы можете устанавливать доступные расширения для вложений.
    + Отображать Вложение как Картинку в Сообщении:
    Если вложена картинка, она будет отображаться под сообщением
    + Папка Вложений:
    Путь к папке вложений
    (например: /home/sites/yoursite/www/forum/attachments)
    + URL Вложений:
    URL адрес к папке вложений
    (например: http://www.yoursite.com/forum/attachments)
    + Максимальный Размер Папки Вложений (в KB):
    Выберите какого размера будет папка вложений со всеми файлами.
    + Максимальный Размер Вложений В Сообщении (в KB):
    Выберите максимальный размер вложений на одно сообщение. Если он меньше, чем размер дного вложения, то он будет максимумом.
    + Максимальный Размер Вложения (в KB):
    Выберите максимальный размер одного вложения.
    + Максимальное Количество Вложений в Сообщении:
    Выберете максимальное количество сообщений, которое пользователь может прикрепить к сообщению.'; +$helptxt['karmaMode'] = 'Репутация - это характеристика, которая показывает популярность участника. Участники, если могут, одобряют или не одобряют других пользователей, таким образом, популярность складывается. Вы можете изменить количество сообщений, необходимых для появления "репутации", время между оценками, и нужно ли администратору выжидать время.

    Либо возможность оценивать других определяется разрешениями. Если у Вас трудности с включением этой функции для всех, дважды проверьте разрешенные пользователям действия.'; +$helptxt['cal_enabled'] = 'Календарь может быть использован для отображения дней рождений или отображения важных событий вашего сообщества.

    + Показывать День как Ссылку к \'Событию\':
    Это позволит участникам вставлять события на дату, на которую они нажали
    + Показывать Номера Недель:
    Показывать, каков номер недели.
    + Максимальное количество дней приближения праздника на главной странице Форума:
    Если установлено 7, то будет показано событие которое произойдет через неделю.
    + Показывать Праздники на Главной Странице:
    Показывать сегодняшние праздники в разделе календаря на главной странице.
    + Показывать Дни Рождения на Главной Странице:
    Показывать сегодняшние дни рождения в календаре на главной странице Форума.
    + Показывать События на Главной Странице:
    Показывать сегодняшние события в календаре на главной странице Форума.
    + Раздел Форума по Умолчанию для Событий:
    В какой раздел форума вставляются события по умолчанию?
    + Самый Ранний Год:
    Выберите "первый" год для календаря.
    + Самый Поздний Год:
    Выберите "последний" год для календаря
    + Цвет Дня Рождения:
    Выберите цвет текста дней рождений
    + Цвет Событий:
    Выберите цвет текста событий
    + Цвет Праздников:
    Выберите цвет текста праздников
    + Разрешить Событиям Продлеваться Несколько Дней:
    Отметте, чтобы включить многодневные события.
    + Максимальное Количество Дней Продолжения Событий:
    Выберите максимальное количество дней, которое может длиться событие.
    + Помните, использование календаря (размещение событий, просмотр их, и т.д.) определяется уровенем прав пользователей.'; +$helptxt['localCookies'] = 'SMF использует cookies чтобы сохранять информацию о входе на компьютере клиента. + Cookies могут сохраняться как глобальные(myserver.com) или локально (myserver.com/path/to/forum).
    + Отметте здесь, если возникают проблемы с автоматическим входом пользователей на Форум.
    + Глобально хранящиеся cookies менее безопасны чем общие веб серверы (например, Tripod).
    + Локальные cookies не работают вне папки Форума, и если Форум находится по адресу www.myserver.com/forum, страницы типа www.myserver.com/index.php не имеют доступ к информации об аккаунте. + Особенно, если используется SSI.php, глобальные cookies рекомендуются.'; +$helptxt['disabledBBC'] = 'Эта настройка позволяет Вам вручную отключить Bulletin Board Codes для использования на вашем Форуме. Чтобы сделать это, просто напишите через запятую список кодов, которые не будут работать.

    + Например:
    \'move,glow,table,tr,td\' - Это отключит движение, свечение и таблицы при форматировании сообщений на вашем Форуме.

    + Заметьте, что это не работает со всеми тэгами.'; +$helptxt['enableBBC'] = 'Выделив эту опцию, Вы разрешите пользователям использование Bulletin Board Code (BBC) на всем Форуме, позволите форматировать их сообщения используя картинки, редактор шрифтов и другое.'; +$helptxt['enableNewReplyWarning'] = 'Когда эта опция включена, пользователь, который пишет сообщение на Форуме, получит сообщение, что появился новый ответ в теме. Это дает возможность вносить изменения незамедлительно.'; +$helptxt['time_offset'] = 'Не все администраторы желают, чтобы их форум использовал туже временную зону, как и сервер на котором он хостится. Используйте эту опцию для определения разницы времени (в часах) относительно сервера. Отрицательные и десятичные значения запрещены.'; +$helptxt['spamWaitTime'] = 'Здесь Вы можете определить отрезок времени, который должен пройти между отправкой сообщений пользователей. Этим вы остановите людей от спама, ограничив частоту сообщений.'; + +$helptxt['enablePostHTML'] = 'Это позволит использование основных HTML тэгов: + <b>, <u>, <i>, <pre>, <blockquote>, <img src="" />, <a href="">, и <br />.'; + +$helptxt['themes'] = 'Здесь Вы можете выбрать, будет ли тема по умолчанию гостевой, или другие опции. Кликните на тему справа, чтобы изменить для этого настройки.'; +$helptxt['theme_install'] = 'Это позволит Вам устанавливать новые темы. Вы можете сделать это из уже созданной директории, загрузив архив темы, или скопировав тему по умолчанию.

    Заметьте, что архив или каталог должны иметь определяющий файл theme_info.xml.'; +$helptxt['enableEmbeddedFlash'] = 'Эта опция позволит пользователям использовать Flash прямо внутри сообщений, как картинки. Это уменьшает безопасность, но некоторые успешно используют. + ПОЛЬЗУЙТЕСЬ НА ВАШ СТРАХ И РИСК!'; +$helptxt['xmlnews_enable'] = 'Позволяет людям пользоваться функцией Последние новости + и подобными данными. Также рекомендуется ограничить размер недавних сообщений/новостей, т.к. когда rss данные отображаются в некоторых клиентах, как Trillian, они могут оказаться усеченными.'; +$helptxt['hotTopicPosts'] = 'Изменить количество сообщений для темы для достижения состояния "горячая" или + "очень горячая" тема.'; +$helptxt['globalCookies'] = 'Разрешить использование субдоменных независимых cookies. Например, если...
    + Ваш сайт на http://www.simplemachines.org/,
    + А Форум на http://forum.simplemachines.org/,
    + Используя эту модификацию, позволит использовать cookies Форума на Вашем сайте.'; +$helptxt['redirectMetaRefresh'] = 'Обычно, SMF использует "Местоположение" заголовка, чтобы перенаправить вас в другие места Форума. Но, конечно, это не всегда работает на некоторых старых серверах.

    Включите эту опцию, если у Вас возникают проблемы с присутствием на Форуме и входом на сервер.'; +$helptxt['securityDisable'] = 'Это отключает добавочную проверку пароля в разделе администрирования. Не рекомендуется!'; +$helptxt['securityDisable_why'] = 'Это Ваш текущий пароль. (тот же, который Вы используете для входа.)

    Заставляя себя ввести его, Вы подтверждаете, что хотите администрировать, и что это именно Вы делаете.'; +$helptxt['emailmembers'] = 'В этом сообщении Вы можете использовать несколько "изменений". Это:
    + {$board_url} - URL Вашего Форума.
    + {$current_time} - Текущее время.
    + {$member.email} - Email текущего пользователя.
    + {$member.link} - Путь текущего пользователя.
    + {$member.id} - Id текущего пользователя.
    + {$member.name} - Имя текущего пользователя. (для персонализации.)
    + {$latest_member.link} - Путь к недавно зарегистрированным пользователям.
    + {$latest_member.id} - Недавно зарегистрированные Id пользователей.
    + {$latest_member.name} - Недавно зарегистрированные имена пользователей.'; +$helptxt['attachmentEncryptFilenames'] = 'Криптование имен вложений позволяет вам использовать более одного файла с одинаковыми именами, для безопасного использования .php файлов для вложений, и большей безопасности. Это конечно может создать некоторые трудности для восстановления базы данных, если что-то плохое случится.'; + +$helptxt['failed_login_threshold'] = 'Установить количество попыток входа на Форум, перед тем как перенаправить пользователя на страницу восстановления пароля.'; +$helptxt['edit_wait_time'] = 'Количество секунд для редактирования сообщения, перед тем как вставить дату последнего редактирования сообщения.'; +$helptxt['enableSpellChecking'] = 'Включение проверки орфографии. У вас ДОЛЖНА быть установлена pspell библиотека на сервере и конфигурация PHP должна использовать pspell библиотеку. На вашем сервере ' . (function_exists('pspell_new') == 1 ? 'ЕСТЬ' : 'НЕТ') . ' этой функции.'; +$helptxt['lastActive'] = 'Установить количество минут в течение которых пользователь отображается как активный на форуме. По умолчанию установлено 15 минут.'; + +$helptxt['autoOptDatabase'] = 'Эта опция оптимизирует базу данных через определенное количество дней. Поставьте 1, для ежедневной оптимизации. Вы также можете установить максимальное количество активных пользователей, чтобы не перегружать Ваш серевер и не создавать неудобств множеству пользователей.'; +$helptxt['autoFixDatabase'] = 'Это автоматически исправит сбойные таблицы, и Форум продолжит работу, как ни в чем не бывало. Это может быть полезным, так как единственный способ устранения неполадки - это ИСПРАВИТЬ таблицу, и ваш форум не отключится пока Вы не будете об этом знать. Вам отправится сообщение, что это произошло.'; + +$helptxt['enableParticipation'] = 'Будет отображаться маленькая иконка на теме, в которой пользователь писал сообщение.'; + +$helptxt['db_persist'] = 'Поддерживает соединение активным для увеличения производительности. Если у вас не выделенный сервер, могут появиться проблемы с Вашим хостом.'; + +$helptxt['queryless_urls'] = 'Это меняет немного формат URL-ов, что бошльше нравится поисковым машинам. Они будут выглядеть как index.php/topic,1.html.

    Эта опция будет ' . (strpos(php_sapi_name(), 'apache') !== false ? 'работать' : 'недоступна') . ' на Вашем сервере.'; +$helptxt['fixLongWords'] = 'Эта опция устанавливает максимальную длину слов на Форуме, чтобы не портить вид. Эта опция не должна быть менее 40.'; + +$helptxt['who_enabled'] = 'Эта опция включает или отключает возможность пользователей отслеживать, кто смотрит Форум и что он делает.'; + +$helptxt['recycle_enable'] = '"Восстанавливает" удаленные темы и сообщения в определенном разделе.'; + +$helptxt['default_personalText'] = 'Установить текст пользователя, который у него будет как "персональный текст."'; + +$helptxt['modlog_enabled'] = 'Вести лог модерирования.'; + +$helptxt['guest_hideContacts'] = 'Если отмечено это поле, то будет скрываться email и информация о мессенджерах всех пользователей от Гостей Форума'; + +$helptxt['registration_method'] = 'Эта опция определяет метод регистрации для желающих зарегистрироваться на Форуме. Вы можете выбрать из:

    +
      +
    • + Регистрация Отключена:
      + Отключает регистрацию, т.о. новые участники не могут регистрироваться на Вашем Форуме.
      +
    • + Мгновенная Регистрация
      + Новые участники могут зайти на Форум сразу же после регистрации.
      +
    • + Активация Участников
      + Когда выбрана эта опция, пользователь получит email с ссылкой для активации, которую ему надо будет нажать для того, чтобы стать полноценным участником.
      +
    • + Подтверждение Участников
      + Эта опция включает регистрацию новых участников только после подтверждения администратора Форума. +
    • +
    '; +$helptxt['send_validation_onChange'] = 'Когда отмеченно это поле, все пользователи, которые меняют свой Email в Профиле, должны будут реактевировать свой аккаунт из email, присланного на этот адрес.'; +$helptxt['send_welcomeEmail'] = 'Если отмечено это поле, все новые пользователи будут получать пригласительный email в Ваше сообщество'; +$helptxt['allow_hideOnline'] = 'Используя эту опцию, все пользователи смогут прятать свой статус активности на Форуме от других пользователей (кроме администраторов). Если не отмечено, то только пользователи, имеющие право модерировать форум, могут менять статус своего присутствия. Заметьте, что отключение этой опции не изменит существующий статус пользователя - это только запретит им прятаться в будущем.'; +$helptxt['allow_hideEmail'] = 'С включением этой опции, участники смогут прятать свой Email от других пользователей. Но, естественно, администратор будет видеть все адреса email.'; + +$helptxt['latest_support'] = 'Эта панель показывает наиболее часто встречающиеся проблемы и вопросы, возникающие на вашей конфигурации сервера. Не беспокойтесь, эта информации не отслеживается или что-то в этом роде.

    Если показывается сообщение "Retrieving support information...", Ваш компьютер, возможно, не может соединиться с www.simplemachines.org.'; +$helptxt['latest_packages'] = 'Здесь Вы увидите некоторые наиболее популярные моды и некоторые случайные моды, которые легко устанавливаются.

    Если эта секция не показывается, Ваш компьютер, возможно, не может соединиться сwww.simplemachines.org.'; +$helptxt['latest_themes'] = 'В этой области показывается несколько последних и наиболее популярных тем сwww.simplemachines.org. Может не отображаться, если Ваш компьютер не может найти www.simplemachines.org.'; + +$helptxt['secret_why_blank'] = 'Для обеспечения безопасности, ответ на вопрос (также как и пароль)закодирован, таким образом, SMF может только ответить правильно или нет, но никогда не скажет тебе (или кому-либо еще, ВАЖНО!) какой у Вас ответ или пароль'; +$helptxt['moderator_why_missing'] = 'После создания разделов, вы должны назначить модераторов из управление интерфейсом форума.'; + +$helptxt['permissions'] = 'Права означают, разрешается или запрещается определенным группам пользователей выполнять установленные действия.

    Вы можете изменить многие разделы, отметив здесь, либо посмотрите права для определенной группы нажав \'Изменить.\''; +$helptxt['permissions_board'] = 'Если раздел обозначен как \'Общий,\' значит, в нем не будет каких-то ограничений по доступу. \'Локальный\' означает, что здесь действуют определенные права, отличные от общих. Это позволит Вам создавать разделы с различными уровнями прав, избавив от необходимости устанавливать для каждого раздела отдельно.'; +$helptxt['permissions_quickgroups'] = 'Это позволит Вам использовать "умолчальные" настройки прав - стандартные обозначают \'ничего специального\', ограниченые обозначают \'гостевые\', модератор означает \'что модератор может\', и наконец \'поддержка\' означает права очень близкие к администраторским.'; +$helptxt['membergroups'] = 'В SMF существует две группы, в которых могут состоять участники. Это: +
      +
    • Обычные Группы: Обычная группа - это группа, в которую участник не заносится автоматически. Чтобы добавить участника в группу, просто зайдите в его Профиль, и кликните на "Настройки Аккаунта". Отсюда Вы можете добавить участника в обычную группу.
    • +
    • Группы По Сообщениям: В отличие от обычных групп, в эту группу нельзя добавить участников. Вместо этого участники автоматически заносятся в группу по достижению минимально необходимого количества сообщений.
    • +
    '; + +$helptxt['calendar_how_edit'] = 'Вы можете редактировать события, кликнув на красную звездочку (*) сразу за именем.'; + +$helptxt['maintenance_general'] = 'Отсюда Вы можете оптимизировать все таблицы (чтобы сделать их меньше и быстрее!), убедиться, что у Вас новейшая версия, найти все ошибки, которые могут путать Ваш Форум, пересчитать все и удалить логи.

    Последние два пункта необходимо избегать, пока что-то не сбоит, но они не портят ничего.'; +$helptxt['maintenance_backup'] = 'Эта область позволяет Вам сохранить копию всех сообщений, настроек, участников и другую информацию на Вашем Форуме в очень большой файл.

    Рекомендуется делать это почаще, например, раз в неделю, для большей безопасности.'; +$helptxt['maintenance_rot'] = 'Это позволяет Вам полностью и безвозвратно удалить старые сообщения. Рекомендуется, сначала сделать бекап, в случае, если Вы удалите что-то не то, что хотели.

    Используйте эту опцию осторожно.'; + +$helptxt['avatar_allow_server_stored'] = 'Это позволяет Вашим участникам выбирать аватар, из имеющихся на сервере. Они обычно в том же месте что и SMF в папке аватаров.
    Дополнительно, Вы можете создавать директории в этой папке, чтобы сделать "категории" аватаров.'; +$helptxt['avatar_allow_external_url'] = 'Если это включено, Ваши участники могут вводить URL на их собственный аватар. Плохая сторона этого, то, что они слишком большие или содержат что-то нехорошее.

    Помните, что пользователи должны иметь права выбора удаленного аватара, чтобы это работало для них. Эта опция включается только для тех, кто имеет достаточно прав.'; +$helptxt['avatar_check_size'] = 'Это может помочь "включить" ограничение по размеру аватара, но это также может заметно тормозить. Используйте осторожно.'; +$helptxt['avatar_allow_upload'] = 'Эта опция очень похожа на "Разрешить участникам использовать удаленный аватар",но у Вас будет больший контроль над аватарами, лучшая возможность для изменения размера, и вашим пользователям не надо иметь аватар где-то на стороне.

    Но с другой стороны, это может израсходовать много места на вашем сервере.'; +$helptxt['avatar_download_png'] = 'PNG формат больше, но предлагает более качественное сжатие. Если здесь не отмечено, будет использоваться JPEG, который меньше, но хуже по качеству.'; + +$helptxt['disableHostnameLookup'] = 'Это отключит отображение имя хоста, что на некоторых серверах работает медленно. Заметьте, это сделает банеры менее эффективными.'; + +$helptxt['search_match_complete_words'] = 'Эта опция ограничивает результаты поиска по словам целиком, которые соответствуют пользовательским запросам. Например, если эта опция отключена, слово в поиске \'here\' будет соответствовать результатам \'here\', \'there\', и \'hereafter\'. Включив данную опцию, результат ограничится только соответствием \'here\'.

    Пожалуйста помните, что включение этой функции замедляет поиск, особенно если количество сообщений будет большим'; +$helptxt['disableTemporaryTables'] = 'Эта опция предотвращает использование временных таблиц. Эта опция замедляет механизм поиска, рекомендуется, только если у вас нет возможности создавать временные таблицы.'; +$helptxt['search_cache_size'] = 'Кэширование поиска используется для ограничения обширного количества запросов в базе данных. Результаты запроса кэшируются в базе данных. Таким образом, следующая страница просмотра результатов будет доступна без дополнительного поиска.

    Используйте эту настройку для ограничения размера кэшируемых результатов. Увеличив это значение, требуется большая база данных (около 20kb на каждый запрос).'; +$helptxt['search_weight_frequency'] = 'Факторы соответствия используются для определения релевантности результатов поиска. Измените эти факторы соответствия для наиболее важных вещей вашего форума. Например, для форума новостного сайта большое значение имеют \'последние подходящие сообщения\'. Все значения связаны между собой и должны быть положительными и целыми.

    Этот фактор считает количество подходящих сообщений и делит их на общее количество сообщений в теме.'; +$helptxt['search_weight_age'] = 'Факторы соответствия используются для определения релевантности результатов поиска. Измените эти факторы соответствия для для наиболее важных вещей вашего форума. Например, для форума новостного сайта большое значение имеют \'последние подходящие сообщения\'. Все значения связаны между собой и должны быть положительными и целыми.

    Этот фактор определяет возраст последнего подходящего сообщения в теме. Чем более поздние сообщения, тем больше у них значимость.'; +$helptxt['search_weight_length'] = 'Факторы соответствия используются для определения релевантности результатов поиска. Измените эти факторы соответствия для наиболее важных вещей вашего форума. Например, для форума новостного сайта большое значение имеют \'последние подходящие сообщения\'. Все значения связаны между собой и должны быть положительными и целыми.

    Этот фактор основан на размере темы. Чем больше сообщений в теме, тем более значима эта тема.'; +$helptxt['search_weight_subject'] = 'Факторы соответствия используются для определения релевантности результатов поиска. Измените эти факторы соответствия для наиболее важных вещей вашего форума. Например, для форума новостного сайта большое значение имеют \'последние подходящие сообщения\'. Все значения связаны между собой и должны быть положительными и целыми.

    Этот фактор зависит от присутствия искомого слова в названиях тем.'; +$helptxt['search_weight_first_message'] = 'Факторы соответствия используются для определения релевантности результатов поиска. Измените эти факторы соответствия для наиболее важных вещей вашего форума. Например, для форума новостного сайта большое значение имеют \'последние подходящие сообщения\'. Все значения связаны между собой и должны быть положительными и целыми.

    Этот фактор зависит от присутствия запроса в первом сообщении темы.'; + +$helptxt['see_admin_ip'] = 'IP адреса показываются администраторам и модераторам, чтобы облегчить модерирование и отслеживание действий пользователей. Помните, что не все IP адреса могут быть идентифицированы, и большинство адресов периодически меняется.

    Пользователям также позволяется смотреть собственные IP.'; +$helptxt['see_member_ip'] = 'Ваш IP адрес показывается только Вам и модераторам. Помните, что эта информация не идентифицируется, и что большинство IP меняются периодически.

    Вы не можете смотреть IP других пользователей, а они не могут видеть ваших.'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Install.english.php b/Themes/modern/languages/Install.english.php new file mode 100644 index 0000000..6aeff8f --- /dev/null +++ b/Themes/modern/languages/Install.english.php @@ -0,0 +1,103 @@ +help is available if you need it.'; +$txt['still_writable'] = 'Your installation directory is still writable. It\'s a good idea to chmod it so that it is not writable for security reasons.'; +$txt['delete_installer'] = 'Click here to delete this install.php file now. (doesn\'t work on all servers.)'; +$txt['go_to_your_forum'] = 'Now you can see your newly installed forum and begin to use it. You should first make sure you are logged in, after which you will be able to access the administration center.'; +$txt['good_luck'] = 'Good luck!
    Simple Machines'; + +$txt['user_refresh_install'] = 'Forum Refreshed'; +$txt['user_refresh_install_desc'] = 'While installing, the installer found that (with the details you provided) one or more of the tables this installer might create already existed.
    Any missing tables in your installation have been recreated with the default data, but no data was deleted from existing tables.'; + +$txt['default_topic_subject'] = 'Welcome to SMF!'; +$txt['default_topic_message'] = 'Welcome to Simple Machines Forum!

    We hope you enjoy using your forum.  If you have any problems, please feel free to [url=http://www.simplemachines.org/community/index.php]ask us for assistance[/url].

    Thanks!
    Simple Machines'; +$txt['default_board_name'] = 'General Discussion'; +$txt['default_board_description'] = 'Feel free to talk about anything and everything in this board.'; +$txt['default_category_name'] = 'General Category'; +$txt['default_time_format'] = '%B %d, %Y, %I:%M:%S %p'; + +$txt['error_message_click'] = 'Click here'; +$txt['error_message_try_again'] = 'to try this step again.'; +$txt['error_message_bad_try_again'] = 'to try installing anyway, but note that this is strongly discouraged.'; + +$txt['install_settings'] = 'Basic Settings'; +$txt['install_settings_info'] = 'Just a few things for you to setup ;).'; +$txt['install_settings_name'] = 'Forum name'; +$txt['install_settings_name_info'] = 'This is the name of your forum, ie. "The Testing Forum".'; +$txt['install_settings_name_default'] = 'My Community'; +$txt['install_settings_url'] = 'Forum URL'; +$txt['install_settings_url_info'] = 'This is the URL to your forum without the trailing \'/\'!.
    In most cases, you can leave the default value in this box alone - it is usually right.'; +$txt['install_settings_compress'] = 'Gzip Output'; +$txt['install_settings_compress_title'] = 'Compress output to save bandwidth.'; +// In this string, you can translate the word "PASS" to change what it says when the test passes. +$txt['install_settings_compress_info'] = 'This function does not work properly on all servers, but can save you a lot of bandwidth.
    Click here to test it. (it should just say "PASS".)'; +$txt['install_settings_dbsession'] = 'Database Sessions'; +$txt['install_settings_dbsession_title'] = 'Use the database for sessions instead of using files.'; +$txt['install_settings_dbsession_info1'] = 'This feature is almost always for the best, as it makes sessions more dependable.'; +$txt['install_settings_dbsession_info2'] = 'It doesn\'t seem like this feature will work on your server, but you can try it.'; +$txt['install_settings_proceed'] = 'Proceed'; + +$txt['mysql_settings'] = 'MySQL Server Settings'; +$txt['mysql_settings_info'] = 'These are the settings to use for your MySQL server. If you don\'t know the values, you should ask your host what they are.'; +$txt['mysql_settings_server'] = 'MySQL server name'; +$txt['mysql_settings_server_info'] = 'This is nearly always localhost - so if you don\'t know, try localhost.'; +$txt['mysql_settings_username'] = 'MySQL username'; +$txt['mysql_settings_username_info'] = 'Fill in the username you need to connect to your MySQL database here.
    If you don\'t know what it is, try the username of your ftp account, most of the time they are the same.'; +$txt['mysql_settings_password'] = 'MySQL password'; +$txt['mysql_settings_password_info'] = 'Here, put the password you need to connect to your MySQL database.
    If you don\'t know this, you should try the password to your ftp account.'; +$txt['mysql_settings_database'] = 'MySQL database name'; +$txt['mysql_settings_database_info'] = 'Fill in the name of the database you want to use for SMF to store its data in.
    If this database does not exist, this installer will try to create it.'; +$txt['mysql_settings_prefix'] = 'MySQL table prefix'; +$txt['mysql_settings_prefix_info'] = 'The prefix for every table in the database. Do not install two forums with the same prefix!
    This value allows for multiple installations in one database.'; + +$txt['user_settings'] = 'Create Your Account'; +$txt['user_settings_info'] = 'The installer will now create a new administrator account for you.'; +$txt['user_settings_username'] = 'Your username'; +$txt['user_settings_username_info'] = 'Choose the name you want to login with.
    This can\'t be changed later, but your display name can be.'; +$txt['user_settings_password'] = 'Password'; +$txt['user_settings_password_info'] = 'Fill in your preferred password here, and remember it well!'; +$txt['user_settings_again'] = 'Password'; +$txt['user_settings_again_info'] = '(just for verification.)'; +$txt['user_settings_email'] = 'Email Address'; +$txt['user_settings_email_info'] = 'Provide your email address as well. This must be a valid email address.'; +$txt['user_settings_database'] = 'MySQL Database Password'; +$txt['user_settings_database_info'] = 'The installer requires that you supply the database password to create an administrator account, for security reasons.'; +$txt['user_settings_proceed'] = 'Finish'; + +$txt['ftp_setup'] = 'FTP Connection Information'; +$txt['ftp_setup_info'] = 'This installer can connect via FTP to fix the files that need to be writable and are not. If this doesn\'t work for you, you will have to go in manually and make the files writable. Please note that this doesn\'t support SSL right now.'; +$txt['ftp_server'] = 'Server'; +$txt['ftp_server_info'] = 'This should be the server and port for your FTP server.'; +$txt['ftp_port'] = 'Port'; +$txt['ftp_username'] = 'Username'; +$txt['ftp_username_info'] = 'The username to login with. This will not be saved anywhere.'; +$txt['ftp_password'] = 'Password'; +$txt['ftp_password_info'] = 'The password to login with. This will not be saved anywhere.'; +$txt['ftp_path'] = 'Install Path'; +$txt['ftp_path_info'] = 'This is the relative path you use in your FTP server.'; +$txt['ftp_connect'] = 'Connect'; +$txt['ftp_setup_why'] = 'What is this step for?'; +$txt['ftp_setup_why_info'] = 'Some files need to be writable for SMF to work properly. This step allows you to let the installer make them writable for you. However, in some cases it won\'t work - in that case, please make the following files 777 (writable):'; +$txt['ftp_setup_again'] = 'to test if these files are writable again.'; + +$txt['error_php_too_low'] = 'Warning! You do not appear to have a version of PHP installed on your webserver that meets SMF\'s minimum installations requirements.
    If you are not the host, you will need to ask your host to upgrade, or use a different host - otherwise, please upgrade PHP to a recent version.

    If you know for a fact that your PHP version is high enough you may continue, although this is strongly discouraged.'; +$txt['error_missing_files'] = 'Unable to find crucial installation files in the directory of this script!

    Please make sure you uploaded the entire installation package, including the sql file, and then try again.'; +$txt['error_session_save_path'] = 'Please inform your host that the session.save_path specified in php.ini is not valid! It needs to be changed to a directory that exists, and is writable by the user PHP is running under.
    '; +$txt['error_windows_chmod'] = 'You\'re on a windows server, and some crucial files are not writable. Please ask your host to give write permissions to the user PHP is running under for the files in your SMF installation. The following files or directories need to be writable:'; +$txt['error_ftp_no_connect'] = 'Unable to connect to FTP server with this combination of details.'; +$txt['error_mysql_connect'] = 'Cannot connect to the MySQL database server with the supplied data.

    If you are not sure about what to type in, please contact your host.'; +$txt['error_mysql_too_low'] = 'The version of MySQL that your database server is using is very old, and does not meet SMF\'s minimum requirements.

    Please ask your host to either upgrade it or supply a new one, and if they won\'t, please try a different host.'; +$txt['error_mysql_database'] = 'The installer was unable to access the "%s" database. With some hosts, you have to create the database in your administration panel before SMF can use it. Some also add prefixes - like your username - to your database names.'; +$txt['error_mysql_queries'] = 'Some of the queries were not executed properly. This could be caused by an unsupported (development or old) version of MySQL.

    Technical information about the queries:'; +$txt['error_mysql_queries_line'] = 'Line #'; +$txt['error_mysql_missing'] = 'The installer was unable to detect MySQL support in PHP. Please ask your host to ensure that PHP was compiled with MySQL, or that the proper extension is being loaded.'; +$txt['error_user_settings_again_match'] = 'You typed in two completely different passwords!'; +$txt['error_user_settings_taken'] = 'Sorry, a member is already registered with that username and/or password.

    A new account has not been created.'; +$txt['error_user_settings_query'] = 'A database error occurred while trying to create an administrator. This error was:'; +$txt['error_subs_missing'] = 'Unable to find the Sources/Subs.php file. Please make sure it was uploaded properly, and then try again.'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Install.russian.php b/Themes/modern/languages/Install.russian.php new file mode 100644 index 0000000..a6c7e51 --- /dev/null +++ b/Themes/modern/languages/Install.russian.php @@ -0,0 +1,103 @@ +доступна помощь если потребуется.'; +$txt['still_writable'] = 'Ваша установочная директория записываема. Неплохая идея, сменить CHMOD, чтобы она не была записываема из соображений безопасности.'; +$txt['delete_installer'] = 'Кликните сюда, чтобы удалить файл install.php сейчасже. (работает не на всех серверах.)'; +$txt['go_to_your_forum'] = 'Теперь Вы можете посмотреть Ваш вновь установленный Форум и начать им пользоваться. Сперва убедитесь, что Вы зашли на Форум, после чего будет доступен раздел администрирования.'; +$txt['good_luck'] = 'Удачи!
    Simple Machines'; + +$txt['user_refresh_install'] = 'Форум Обновлен'; +$txt['user_refresh_install_desc'] = 'В процессе установки было обнаружено (используя предоставленные Вами данные), что одна или более таблиц, которые могла создать программа установки, уже существуют.
    Любые пропущенные таблицы при установке были вновь созданы и содержат данные, как по умолчанию, но никакая информация не была уничтожена в существующих таблицах.'; + +$txt['default_topic_subject'] = 'Добро пожаловать в SMF!'; +$txt['default_topic_message'] = 'Добро пожаловать на Simple Machines Forum!

    Мы надеемся, что Вам понравится работать с нашим форумом.  При возникновении любых проблем [url=http://www.simplemachines.org/community/index.php]обращайтесь за помощью[/url].

    Спасибо!
    Simple Machines'; +$txt['default_board_name'] = 'General Discussion'; +$txt['default_board_description'] = 'Вы можете обсудить любые вопросы в этом разделе.'; +$txt['default_category_name'] = 'General Category'; +$txt['default_time_format'] = '%B %d, %Y, %I:%M:%S %p'; + +$txt['error_message_click'] = 'Кликните сюда'; +$txt['error_message_try_again'] = 'чтобы повторить этот шаг снова.'; +$txt['error_message_bad_try_again'] = 'все равно попробовать установить, но учтите, что это строго не рекомендуется.'; + +$txt['install_settings'] = 'Основные Настройки'; +$txt['install_settings_info'] = 'Всего несколько пунктов для Вашей установки ;).'; +$txt['install_settings_name'] = 'Название Форума'; +$txt['install_settings_name_info'] = 'Это имя Вашего Форума, например "Тестовый Форум".'; +$txt['install_settings_name_default'] = 'My Community'; +$txt['install_settings_url'] = 'URL Форума'; +$txt['install_settings_url_info'] = 'Это URL ведущий на Ваш Форум без сопровождающих знаков \'/\'!.
    В большинстве случаев, Вы можете оставить это поле без изменений - оно, обычно, правильное.'; +$txt['install_settings_compress'] = 'Gzip Версия'; +$txt['install_settings_compress_title'] = 'Сжатая версия бережет трафик.'; +// In this string, you can translate the word "PASS" to change what it says when the test passes. +$txt['install_settings_compress_info'] = 'Эта функция не всегда поддерживается серверами, но помогает сберечь трафик.
    Нажмите сюда чтобы проверить эту функцию. (Ответ должен быть "РАБОТАЕТ".)'; +$txt['install_settings_dbsession'] = 'Сессии Базы Данных'; +$txt['install_settings_dbsession_title'] = 'Используйте Базу Данных сессиями вместо использования файлов.'; +$txt['install_settings_dbsession_info1'] = 'Эта возможность почти всегда более предпочтительна, так как делает сессии более зависимыми.'; +$txt['install_settings_dbsession_info2'] = ' Вряд ли это сработает на Вашем сервере, но Вы можете попробовать.'; +$txt['install_settings_proceed'] = 'Продолжить'; + +$txt['mysql_settings'] = 'Настройки MySQL Сервера'; +$txt['mysql_settings_info'] = 'Это необходимые настройки для использования Вашего MySQL сервера. Если вы их не знаете, то следует узнать их у провайдера.'; +$txt['mysql_settings_server'] = 'Имя MySQL сервера'; +$txt['mysql_settings_server_info'] = 'Почти всегда это localhost - поэтому, если Вы точно не знаете, попробуйте localhost.'; +$txt['mysql_settings_username'] = 'Имя пользователя MySQL'; +$txt['mysql_settings_username_info'] = 'Впишите имя пользователя, необходимое здесь для соединения с Вашей MySQL Базой Данных.
    Если Вы не знаете, попробуйте имя(username) вашего ftp аккаунта, часто они одинаковы.'; +$txt['mysql_settings_password'] = 'Пароль MySQL'; +$txt['mysql_settings_password_info'] = 'Здесь введите пароль для соединения с MySQL Базой Данных.
    Если не знаете, попробуйте пароль вашего ftp аккаунта.'; +$txt['mysql_settings_database'] = 'Название Базы Данных MySQL'; +$txt['mysql_settings_database_info'] = 'Впишите название Базы Данных, которое будет использоваться SMF для хранения данных.
    Если БД не существует, программа-установщик попробует создать ее.'; +$txt['mysql_settings_prefix'] = 'MySQL префикс таблиц'; +$txt['mysql_settings_prefix_info'] = 'Префикс для каждой таблицы Базы Данных. Не устанавливайте два Форума с одинаковыми префиксами!
    Это значение позволяет множественную установку в одну Базу Данных.'; + +$txt['user_settings'] = 'Создайте Ваш Аккаунт'; +$txt['user_settings_info'] = 'Установщик сейчас создаст новый аккаунт администратора для Вас.'; +$txt['user_settings_username'] = 'Ваше имя пользователя'; +$txt['user_settings_username_info'] = 'Выберите имя, которое Вы будете вводить для входа на Форум.
    Его нельзя будет изменить, но отображаемое имя можно.'; +$txt['user_settings_password'] = 'Пароль'; +$txt['user_settings_password_info'] = 'Введите сюда Ваш пароль и запомните его!'; +$txt['user_settings_again'] = 'Пароль'; +$txt['user_settings_again_info'] = '(для сверки.)'; +$txt['user_settings_email'] = 'Email Адрес'; +$txt['user_settings_email_info'] = 'Впишите Ваш email адрес также. Это должен быть действующий email адрес.'; +$txt['user_settings_database'] = 'Пароль MySQL Базы Данных'; +$txt['user_settings_database_info'] = 'Установка требует, чтобы Вы ввели пароль Базы Данных для создания аккаунта, это из соображений безопасности.'; +$txt['user_settings_proceed'] = 'Конец'; + +$txt['ftp_setup'] = 'Информация FTP Соединения'; +$txt['ftp_setup_info'] = 'Установщик может соединяться через FTP, чтобы исправить файлы, которые должны быть записываемые и нет. Если у Вас не срабатывает, Вам придется в ручную сделать файлы записываемыми. Пожалуйста обратите внимание, что SSL сразу не поддерживается.'; +$txt['ftp_server'] = 'Сервер'; +$txt['ftp_server_info'] = 'Это должен быть сервер и порт Вашего FTP сервера.'; +$txt['ftp_port'] = 'Порт'; +$txt['ftp_username'] = 'Имя пользователя'; +$txt['ftp_username_info'] = 'Имя пользователя(username) для входа на FTP. Оно не будет сохранено где бы то ни было.'; +$txt['ftp_password'] = 'Пароль'; +$txt['ftp_password_info'] = 'Пароль для входа на FTP. Он не будет сохранен где бы то ни было.'; +$txt['ftp_path'] = 'Путь Установки'; +$txt['ftp_path_info'] = 'Это родной путь, используемый на Вашем FTP сервер.'; +$txt['ftp_connect'] = 'Соединиться'; +$txt['ftp_setup_why'] = 'Для чего этот шаг?'; +$txt['ftp_setup_why_info'] = 'Некоторые файлы должны быть записываемы для нормальной работы SMF. Этот шаг позволяет Вам предоставить эту возможность установщику, т.е. сделать записываемыми без Вашего вмешательства. Естественно, в некоторых случаях иногда это не работает. Тогда сделайте следующие файлы CHMOD 777 (записываемыми):'; +$txt['ftp_setup_again'] = 'проверяет снова возможность записи файлов.'; + +$txt['error_php_too_low'] = 'Предупреждение! Не похоже, что на Вашем сервере установлена версия PHP, а это является минимальным требованием SMF для установки.
    Если у Вас не собственный хостинг, Вам необходимо попросить провайдера модернизироваться, или придется использовать другой хостинг, пожалуйста обновите PHP до недавних версий.

    Если Вы уверены, что Ваша PHP версия вполне подходит, можно продолжить, хотя это строго не рекомендуется.'; +$txt['error_missing_files'] = 'Не получилось найти важных установочных файлов в директории по скрипту!

    Пожалуйста, проверьте, что загружена вся установочная папка, включая sql файл и попробуйте заново.'; +$txt['error_session_save_path'] = 'Пожалуйста, уведомьте вашего хостера, что session.save_path указанный в php.ini не действителен! Его необходимо заменить на существующую директорию, и доступна запись под PHP.
    '; +$txt['error_windows_chmod'] = 'У вас windows сервер, и некоторые ключевые файлы не записываемы. Пожалуйста, обратитесь к Вашему хостеру, чтобы он сделал доступной перезапись для пользователей, при использовании PHP, для файлов Вашей SMF установки. Следующие директории должны быть записываемые:'; +$txt['error_ftp_no_connect'] = 'Невозможно подключиться к FTP серверу используя эти данные.'; +$txt['error_mysql_connect'] = 'Не получилось соединиться с Базой Данных MySQL сервера, используя предоставленные данные.

    Если Вы не знаете, что надо вводить, пожалуйста, узнайте у хостера.'; +$txt['error_mysql_too_low'] = 'Версия MySQL сервера, которую использует ваша БД, очень старая, и не соответствует минимальным требованиям SMF.

    Пожалуйста, попросите хостера обновить версию, а если Вам откажут, то придется найти другого хостера.'; +$txt['error_mysql_database'] = 'Инсталлятор не смог получить доступ к "%s" Базе Данных. На некоторых хостах, Вам необходимо создать БД в панели администратора, перед тем, как SMF сможет ее использовать. Еще можно добавить префиксы - как Ваше имя пользователя(username) - как имя вашей Базы Данных..'; +$txt['error_mysql_queries'] = 'Некоторые запросы не были выполнены правильно. Это возможно связано с не поддерживающей (разработчики мешают или старая) версией MySQL.

    Техническая информация по запросам:'; +$txt['error_mysql_queries_line'] = 'Строка #'; +$txt['error_mysql_missing'] = 'Инсталлятор не обнаружил поддержки MySQL в PHP. Пожалуйста, попросите хостера убедиться, что PHP составлен с использованием MySQL, или необходимые расширения были загружены.'; +$txt['error_user_settings_again_match'] = 'Вы ввели абсолютно разные пароли!'; +$txt['error_user_settings_taken'] = 'Извините, участник уже существует с таким именем и/или паролем.

    Новый аккаунт не был создан.'; +$txt['error_user_settings_query'] = 'Ошибка базы данных произошла в процессе создания администратора. Это следующая ошибка:'; +$txt['error_subs_missing'] = 'Не получается найти Sources/Subs.php файл. Пожалуйста, убедитесь, что они загружены и попробуйте снова'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/InstantMessage.english.php b/Themes/modern/languages/InstantMessage.english.php new file mode 100644 index 0000000..7e8a0d0 --- /dev/null +++ b/Themes/modern/languages/InstantMessage.english.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/Themes/modern/languages/InstantMessage.russian.php b/Themes/modern/languages/InstantMessage.russian.php new file mode 100644 index 0000000..a86ab72 --- /dev/null +++ b/Themes/modern/languages/InstantMessage.russian.php @@ -0,0 +1,38 @@ + diff --git a/Themes/modern/languages/Login.english.php b/Themes/modern/languages/Login.english.php new file mode 100644 index 0000000..5e8bd0a --- /dev/null +++ b/Themes/modern/languages/Login.english.php @@ -0,0 +1,110 @@ + \ No newline at end of file diff --git a/Themes/modern/languages/Login.russian.php b/Themes/modern/languages/Login.russian.php new file mode 100644 index 0000000..58b804c --- /dev/null +++ b/Themes/modern/languages/Login.russian.php @@ -0,0 +1,108 @@ + или просто посетите эту страницу сразу же после входа:'; +$txt[719] = 'Ваше имя пользователя:'; +$txt[730] = 'Этот email (%s) уже используется зарегистрированным пользователем. Если это ошибка, перейдите на страницу входа и выберите Забыл пароль.'; + +$txt['ban_register_prohibited'] = 'Извините, вы не можете зарегистрироваться на этом форуме.'; + +$txt['activate_mail'] = ' Прежде чем войти на форум вы должны активировать ваш аккаунт. Пожалуйста, пройдите по этой ссылке'; +$txt['activate_account'] = 'Активация аккаунта'; +$txt['activate_success'] = 'Ваш аккаунт был успешно активирован. Теперь вы можете войти на форум под вашим логином.'; +$txt['activate_not_completed1'] = 'Прежде чем вы сможете войти на форум вам необходимо проверить ваш почтовый ящик, адрес которого вы указали при регистрации. По данному адресу придёт специальное письмо, в котором будут находиться инструкции по активации вашего аккаунта.'; +$txt['activate_not_completed2'] = 'Отправить ещё одно письмо для активации?'; +$txt['activate_after_registration'] = 'Большое спасибо за регистрацию. В ближайшее время на ваш электронный адрес придёт письмо, содержащее ссылку, проследовав по которой вы активируете ваш аккаунт.'; +$txt['invalid_userid'] = 'Пользователь не создан'; +$txt['invalid_activation_code'] = 'Неправильный код для активации'; +$txt['invalid_activation_username'] = 'Имя или e-mail'; +$txt['invalid_activation_new'] = ' Если Вы зарегистрировались с неправильным адресом электронной почты, введите новый адрес и ваш пароль здесь.'; +$txt['invalid_activation_new_email'] = 'Новый действующий e-mail адрес '; +$txt['invalid_activation_password'] = 'Старый пароль'; +$txt['invalid_activation_resend'] = 'Переслать код для активации'; +$txt['invalid_activation_known'] = 'Если вы уже знаете ваш код активации, пожалуйста, введите его здесь.'; +$txt['invalid_activation_retry'] = 'Код для активации'; +$txt['invalid_activation_submit'] = 'Активировать'; + +$txt['change_email_success'] = 'Ваш e-mail адрес был изменён и на него было выслано новое письмо для активации аккаунта.'; +$txt['resend_email_success'] = 'Письмо с кодом для активации отправлено на ваш новый адрес.'; +$txt['change_password'] = 'Подробности о вашем новом пароле'; +$txt['change_password_1'] = 'Подробности о вашем логине '; +$txt['change_password_2'] = 'произошли изменения и ваш пароль был сменился. Подробнее.'; + +$txt['maintenance3'] = 'Этот раздел форума находится в режиме обслуживания.'; + +$txt['register_agree'] = 'Пожалуйста, прочтите и примите условия соглашения.'; + +$txt['approval_after_registration'] = 'Большое спасибо за регистрацию. Вы сможете начать пользоваться вашим аккаунтом после получения письма-уведомления от администратора форума.'; +$txt['approval_email'] = 'Вы сможете начать пользоваться вашим аккаунтом после получения письма-уведомления от администратора форума.'; + +$txt['admin_register'] = 'Регистрация '; +$txt['admin_register_desc'] = 'Здесь вы можете регистрировать новых пользователей и при желании уведомлять их по e-mail об этом.'; +$txt['admin_register_username'] = ' Новое имя пользователя'; +$txt['admin_register_email'] = 'E-mail'; +$txt['admin_register_password'] = 'Пароль'; +$txt['admin_register_username_desc'] = 'Имя пользователя для нового участника'; +$txt['admin_register_email_desc'] = 'E-mail участника'; +$txt['admin_register_password_desc'] = 'Пароль для нового участника'; +$txt['admin_register_email_detail'] = ' Отправить новый пароль участнику по e-mail'; +$txt['admin_register_email_detail_desc'] = 'Email требуется даже если не выбран'; +$txt['admin_register_email_activate'] = 'Требуется активация аккаунта пользователя'; +$txt['admin_register_group'] = 'Основная группа пользователей'; +$txt['admin_register_group_desc'] = ' Новый пользователь входит в Основную группу'; +$txt['admin_register_group_none'] = '(не входит в Основную группу пользователей)'; + +$txt['admin_browse_approve'] = 'Пользователи, ожидающие разрешения администратора форума'; +$txt['admin_browse_approve_desc'] = 'Здесь Вы можете управлять пользователями, ожидающими разрешения администратора форума.'; +$txt['admin_browse_activate'] = 'Участники, ожидающие активации своих аккаунтов'; +$txt['admin_browse_activate_desc'] = 'Список участников до сих пор не активировавших свои аккаунты.'; +$txt['admin_browse_register_new'] = 'Регистрация нового участника'; +$txt['admin_browse_awaiting_approval'] = 'Ожидает разрешения'; +$txt['admin_browse_awaiting_activate'] = ' Ожидает активации'; +$txt['admin_browse_username'] = ' Имя пользователя'; +$txt['admin_browse_email'] = 'Email'; +$txt['admin_browse_ip'] = 'IP'; +$txt['admin_browse_registered'] = 'Зарегистрированный пользователь'; +$txt['admin_browse_id'] = 'ID'; +$txt['admin_browse_with_selected'] = 'с выбранными'; +$txt['admin_browse_no_members'] = 'нет пользователей в данный момент'; +// Don't use entities in the below strings, except the main ones. (lt, gt, quot.) +$txt['admin_browse_warn'] = ' все выбранные участники?'; +$txt['admin_browse_w_approve'] = ' подтвердить'; +$txt['admin_browse_w_activate'] = ' Активировать'; +$txt['admin_browse_w_delete'] = ' Удалить'; +$txt['admin_browse_w_remind'] = ' Напомнить'; +$txt['admin_browse_w_email'] = ' и отправить e-mail'; + +$txt['admin_approve_reject'] = ' Отклонённая регистрация'; +$txt['admin_approve_reject_desc'] = ' С сожалением сообщаю, что Ваше заявление о регистрации на форуме'; +$txt['admin_approve_reject_desc2'] = 'было отклонено.'; +$txt['admin_approve_remind'] = 'Напоминание о регистрации'; +$txt['admin_approve_remind_desc'] = ' Вы до сих пор не активировали ваш аккаунт на'; +$txt['admin_approve_remind_desc2'] = 'Пожалуйста, для активирования вашего аккаунта, пройдите по ссылке:'; +$txt['admin_approve_accept_desc'] = 'Ваш аккаунт был активирован администратором форума вручную, и теперь вы можете входить на форум и оставлять свои сообщения.'; + +$txt['admin_notify_subject'] = 'Новый участник'; +$txt['admin_notify_profile'] = '%s стал новым участником на вашем форуме. Пройдите по нижеследующей ссылке чтобы просмотреть его профиль.'; +$txt['admin_notify_approval'] = 'Прежде чем этот пользователь станет полноправным участником форума его аккаунт должен получить одобрение администратора. Пройдите по нижеследующей ссылке, чтобы принять своё решение по данному пользователю:'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/ManageBoards.english.php b/Themes/modern/languages/ManageBoards.english.php new file mode 100644 index 0000000..1b61261 --- /dev/null +++ b/Themes/modern/languages/ManageBoards.english.php @@ -0,0 +1,66 @@ +"username", "username"
    . (these must be usernames not display names!)
    To create a new board, click the Add Board button. To make the new board a child of a current board, select "Child of..." from the Order drop down menu when creating the board.'; +$txt['parent_members_only'] = 'Ungrouped Members'; +$txt['parent_guests_only'] = 'Guests'; +$txt['catConfirm'] = 'Do you really want to delete this category?'; +$txt['boardConfirm'] = 'Do you really want to delete this board?'; + +$txt['catEdit'] = 'Edit Category'; +$txt['boardsEdit'] = 'Modify Boards'; +$txt['collapse_enable'] = 'Collapsable'; +$txt['collapse_desc'] = 'Allow users to collapse this category?'; +$txt['catModify'] = '(modify)'; + +$txt['mboards_order_after'] = 'After '; +$txt['mboards_order_inside'] = 'Inside '; +$txt['mboards_order_first'] = 'In first place'; + +$txt['mboards_new_cat'] = 'Create new category'; +$txt['mboards_new_board'] = 'Add Board'; +$txt['mboards_new_cat_name'] = 'New Category'; +$txt['mboards_add_cat_button'] = 'Add Category'; +$txt['mboards_new_board_name'] = 'New Board'; + +$txt['mboards_name'] = 'Name'; +$txt['mboards_modify'] = 'modify'; +$txt['mboards_permissions'] = 'permissions'; + +$txt['mboards_delete_cat'] = 'Delete Category'; +$txt['mboards_delete_board'] = 'Delete Board'; + +$txt['mboards_delete_cat_contains'] = 'Deleting this category will also delete the below boards, including all topics, posts and attachments within each board'; +$txt['mboards_delete_what_do'] = 'Please select what you would like to do with these boards'; +$txt['mboards_delete_option1'] = 'Delete category and all boards contained within.'; +$txt['mboards_delete_option2'] = 'Delete category and move all boards contained within to'; +$txt['mboards_delete_confirm'] = 'Confirm'; +$txt['mboards_delete_cancel'] = 'Cancel'; +$txt['mboards_delete_error'] = 'No category selected!'; + +$txt['mboards_category'] = 'Category'; +$txt['mboards_description'] = 'Description'; +$txt['mboards_description_desc'] = 'A short description of your board.'; +$txt['mboards_groups'] = 'Allowed Groups'; +$txt['mboards_groups_desc'] = 'Groups allowed to access this board.'; +$txt['mboards_moderators'] = 'Moderators'; +$txt['mboards_moderators_desc'] = 'Additional members to have moderation privileges on this board. Note that administrators don\'t have to be listed here.'; +$txt['mboards_count_posts'] = 'Count Posts'; +$txt['mboards_count_posts_desc'] = 'Makes new replies and topics raise members\' post counts.'; +$txt['mboards_unchanged'] = 'Unchanged'; +$txt['mboards_theme'] = 'Board Theme'; +$txt['mboards_theme_desc'] = 'This allows you to change the look of your forum inside only this board.'; +$txt['mboards_theme_default'] = '(overall forum default.)'; +$txt['mboards_override_theme'] = 'Override Member\'s Theme'; +$txt['mboards_override_theme_desc'] = 'Use this board\'s theme even if the member didn\'t choose to use the defaults.'; + +$txt['mboards_order_before'] = 'Before'; +$txt['mboards_order_child_of'] = 'Child of'; +$txt['mboards_current_position'] = 'Current Position'; +$txt['no_valid_parent'] = 'Board %s does not have a valid parent. Use the \'find and repair errors\' function to fix this.'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/ManageBoards.russian.php b/Themes/modern/languages/ManageBoards.russian.php new file mode 100644 index 0000000..2b1dab2 --- /dev/null +++ b/Themes/modern/languages/ManageBoards.russian.php @@ -0,0 +1,66 @@ +"username", "username". (Здесь должны быть имена пользователей, а не отображаемые имена!)
    Чтобы создать новый форум, нажмите кнопку Добавить Форум. Создать новый форум, дочерний по отношению к текущему, выберите "Дочерний от..." из списка ниспадающего меню при создании форума.'; +$txt['parent_members_only'] = 'Участники без Групп'; +$txt['parent_guests_only'] = 'Гости'; +$txt['catConfirm'] = 'Вы действительно хотите удалить эту категорию?'; +$txt['boardConfirm'] = 'Вы действительно хотите удалить этот форум?'; + +$txt['catEdit'] = 'Редактировать Категорию'; +$txt['boardsEdit'] = 'Изменить Форумы'; +$txt['collapse_enable'] = 'Разборный'; +$txt['collapse_desc'] = 'Разрешить пользователям разбирать эту категорию?'; +$txt['catModify'] = '(изменять)'; + +$txt['mboards_order_after'] = 'После '; +$txt['mboards_order_inside'] = 'Внутри '; +$txt['mboards_order_first'] = 'На первом месте'; + +$txt['mboards_new_cat'] = 'Создать новую категорию'; +$txt['mboards_new_board'] = 'Добавить Форум'; +$txt['mboards_new_cat_name'] = 'Новая Категория'; +$txt['mboards_add_cat_button'] = 'Добавить Категорию'; +$txt['mboards_new_board_name'] = 'Новый Форум'; + +$txt['mboards_name'] = 'Имя'; +$txt['mboards_modify'] = 'изменить'; +$txt['mboards_permissions'] = 'права'; + +$txt['mboards_delete_cat'] = 'Удалить Категорию'; +$txt['mboards_delete_board'] = 'Удалить Форум'; + +$txt['mboards_delete_cat_contains'] = 'Удалив эту категорию, также будут удалены все форумы внутри ее, темы, сообщения и вложения в каждоми форуме'; +$txt['mboards_delete_what_do'] = 'Пожалуйста, выберите, что Вы хотите сделать с этими форумами'; +$txt['mboards_delete_option1'] = 'Удалить категорию и все форумы внутри ее.'; +$txt['mboards_delete_option2'] = 'Удалить категорию и переместить все темы из нее в'; +$txt['mboards_delete_confirm'] = 'Подтвердите'; +$txt['mboards_delete_cancel'] = 'Отмените'; +$txt['mboards_delete_error'] = 'Не выбрана категория!'; + +$txt['mboards_category'] = 'Категория'; +$txt['mboards_description'] = 'Описание'; +$txt['mboards_description_desc'] = 'Короткое описание Вашего форума.'; +$txt['mboards_groups'] = 'Доступно Группам'; +$txt['mboards_groups_desc'] = 'Следующие Группы имеют доступ на этот форум.'; +$txt['mboards_moderators'] = 'Модераторы'; +$txt['mboards_moderators_desc'] = 'Дополнительные участники, имеющие привилегии модератора на этом форуме. Заметьте, что администратора не надо включать в список.'; +$txt['mboards_count_posts'] = 'Считать Сообщения'; +$txt['mboards_count_posts_desc'] = 'Делает новые сообщения и темы участника считаемыми.'; +$txt['mboards_unchanged'] = 'Не изменено'; +$txt['mboards_theme'] = 'Тема Форума'; +$txt['mboards_theme_desc'] = 'Это позволяет Вам изменить вид форума только внутри этого раздела.'; +$txt['mboards_theme_default'] = '(вид форума по умолчанию.)'; +$txt['mboards_override_theme'] = 'Задавить Тему Участника'; +$txt['mboards_override_theme_desc'] = 'Используйте эту тему форума, даже если участник не выбирал ее по умолчанию.'; + +$txt['mboards_order_before'] = 'Перед'; +$txt['mboards_order_child_of'] = 'Дочерний от'; +$txt['mboards_current_position'] = 'Текущая Позиция'; +$txt['no_valid_parent'] = 'Форум %s не имеет действующего родительского раздела. Используйте \'найти и исправить ошибки\' для исправления этого.'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/ManageMembers.english.php b/Themes/modern/languages/ManageMembers.english.php new file mode 100644 index 0000000..0af2d66 --- /dev/null +++ b/Themes/modern/languages/ManageMembers.english.php @@ -0,0 +1,45 @@ + \ No newline at end of file diff --git a/Themes/modern/languages/ManageMembers.russian.php b/Themes/modern/languages/ManageMembers.russian.php new file mode 100644 index 0000000..3999125 --- /dev/null +++ b/Themes/modern/languages/ManageMembers.russian.php @@ -0,0 +1,45 @@ + \ No newline at end of file diff --git a/Themes/modern/languages/ManagePermissions.english.php b/Themes/modern/languages/ManagePermissions.english.php new file mode 100644 index 0000000..0a89de5 --- /dev/null +++ b/Themes/modern/languages/ManagePermissions.english.php @@ -0,0 +1,218 @@ +\'Deny\' (D).

    Remember that if you deny a permission, any member - whether moderator or otherwise - that is in that group will be denied that as well.
    For this reason, you should use deny carefully, only when necessary. Disallow, on the other hand, denies unless otherwise granted.'; + +$txt['permissiongroup_general'] = 'General'; +$txt['permissionname_view_stats'] = 'View forum statistics'; +$txt['permissionhelp_view_stats'] = 'The forum statistics is a page summarizing all statistics of the forum, like member count, daily number of posts, and several top 10 statistics. Enabling this permission adds a link to the bottom of the board index (\'[More Stats]\').'; +$txt['permissionname_view_mlist'] = 'View the memberlist'; +$txt['permissionhelp_view_mlist'] = 'The memberlist shows all members that have registered on your forum. The list can be sorted and searched. The memberlist is linked from both the boardindex and the stats page, by clicking on the number of members.'; +$txt['permissionname_who_view'] = 'View Who\'s Online'; +$txt['permissionhelp_who_view'] = 'Who\'s online shows all members that are currently online and what they are doing at that moment. This permission will only work if you also have enabled it in \'Features and Options\'. You can access the \'Who\'s Online\' screen by clicking the link in the \'Users Online\' section of the board index.'; +$txt['permissionname_search_posts'] = 'Search for posts and topics'; +$txt['permissionhelp_search_posts'] = 'The Search permission allows the user to search all boards he or she is allowed to access. When the search permission is enabled, a \'Search\' button will be added to the forum button bar.'; +$txt['permissionname_karma_edit'] = 'Change other people\'s karma'; +$txt['permissionhelp_karma_edit'] = 'Karma is a feature that shows the popularity of a member. In order to use this feature, you need to have it enabled in \'Features and Options\'. This permission will allow a membergroup to cast a vote. This permission has no effect on guests.'; + +$txt['permissiongroup_pm'] = 'Personal Messaging'; +$txt['permissionname_pm_read'] = 'Read personal messages'; +$txt['permissionhelp_pm_read'] = 'This permission allows users to access the Personal Messages section and read their Personal Messages. Without this permission a user is unable to send Personal Messages.'; +$txt['permissionname_pm_send'] = 'Send personal messages'; +$txt['permissionhelp_pm_send'] = 'Send personal messages to other registered members. Requires the \'Read personal messages\' permission.'; + +$txt['permissiongroup_calendar'] = 'Calendar'; +$txt['permissionname_calendar_view'] = 'View the calendar'; +$txt['permissionhelp_calendar_view'] = 'The calendar shows for each month the birthdays, events and holidays. This permission allows access to this calendar. When this permission is enabled, a button will be added to the top button bar and a list will be shown at the bottom of the board index with current and upcoming birthdays, events and holidays. The calendar needs be enabled from \'Edit Features and Options\'.'; +$txt['permissionname_calendar_post'] = 'Create events in the calendar'; +$txt['permissionhelp_calendar_post'] = 'An Event is a topic linked to a certain date or date range. Creating events can be done from the calendar. An event can only be created if the user that creates the event is allowed to post new topics.'; +$txt['permissionname_calendar_edit'] = 'Edit events in the calendar'; +$txt['permissionhelp_calendar_edit'] = 'An Event is a topic linked to a certain date or date range. Event can be edited by clicking the red asterisk (*) next to the event in the calendar view. In order to be able to edit an event, a user must have sufficient permissions to edit the first message of the topic that is linked to the event.'; +$txt['permissionname_calendar_edit_own'] = 'Own events'; +$txt['permissionname_calendar_edit_any'] = 'Any events'; + +$txt['permissiongroup_maintenance'] = 'Forum administration'; +$txt['permissionname_admin_forum'] = 'Administrate forum and database'; +$txt['permissionhelp_admin_forum'] = 'This permission allows a user to:
    • change forum, database and theme settings
    • manage packages
    • use the forum and database maintenance tools
    • view the error and mod logs
    Use this permission with caution, as it is very powerful.'; +$txt['permissionname_manage_boards'] = 'Manage boards and categories'; +$txt['permissionhelp_manage_boards'] = 'This permission allows creation, editing and removal of boards and categories.'; +$txt['permissionname_manage_attachments'] = 'Manage attachments and avatars'; +$txt['permissionhelp_manage_attachments'] = 'This permission allows access to the attachment center, where all forum attachments and avatars are listed and can be removed.'; +$txt['permissionname_manage_smileys'] = 'Manage smileys'; +$txt['permissionhelp_manage_smileys'] = 'This allows access to the smiley center. In the smiley center you can add, edit and remove smileys and smiley sets.'; +$txt['permissionname_edit_news'] = 'Edit news'; +$txt['permissionhelp_edit_news'] = 'The news function allows a random news line to appear on each screen. In order to use the news function, enabled it in the forum settings.'; + +$txt['permissiongroup_member_admin'] = 'Member administration'; +$txt['permissionname_moderate_forum'] = 'Moderate forum members'; +$txt['permissionhelp_moderate_forum'] = 'This permission includes all important member moderation functions:
    • access to registration management
    • access to the view/delete members screen
    • extensive profile info, including track IP/user and (hidden) online status
    • activate accounts
    • get approval notifications and approve accounts
    • immune to ignore PM
    • several small things
    '; +$txt['permissionname_manage_membergroups'] = 'Manage and assign membergroups'; +$txt['permissionhelp_manage_membergroups'] = 'This permission allows a user to edit membergroups and assign membergroups to other members.'; +$txt['permissionname_manage_permissions'] = 'Manage permissions'; +$txt['permissionhelp_manage_permissions'] = 'This permission allows a user to edit all permissions of a membergroup, globally or for individual boards.'; +$txt['permissionname_manage_bans'] = 'Manage ban list'; +$txt['permissionhelp_manage_bans'] = 'This permission allows a user to add or remove usernames, IP addresses, hostnames and email addresses to a list of banned users. It also allows to view and remove log entries of banned users that attempted to login.'; +$txt['permissionname_send_mail'] = 'Send a forum email to members'; +$txt['permissionhelp_send_mail'] = 'Mass mail all forum members, or just a few membergroups by email or personal message (the latter requires \'Send Personal Message\' permission).'; + +$txt['permissiongroup_profile'] = 'Member Profiles'; +$txt['permissionname_profile_view'] = 'View profile summary and stats'; +$txt['permissionhelp_profile_view'] = 'This permission allows users clicking on a username to see a summary of profile settings, some statistics and all posts of the user.'; +$txt['permissionname_profile_view_own'] = 'Own profile'; +$txt['permissionname_profile_view_any'] = 'Any profile'; +$txt['permissionname_profile_identity'] = 'Edit account settings'; +$txt['permissionhelp_profile_identity'] = 'Account settings are the basic settings of a profile, like password, email address, membergroup and preferred language.'; +$txt['permissionname_profile_identity_own'] = 'Own profile'; +$txt['permissionname_profile_identity_any'] = 'Any profile'; +$txt['permissionname_profile_extra'] = 'Edit additional profile settings'; +$txt['permissionhelp_profile_extra'] = 'Additional profile settings include settings for avatars, theme preferences, notifications and Personal Messages.'; +$txt['permissionname_profile_extra_own'] = 'Own profile'; +$txt['permissionname_profile_extra_any'] = 'Any profile'; +$txt['permissionname_profile_title'] = 'Edit custom title'; +$txt['permissionhelp_profile_title'] = 'The custom title is shown on the topic display page, under the profile of each user that has a custom title.'; +$txt['permissionname_profile_title_own'] = 'Own profile'; +$txt['permissionname_profile_title_any'] = 'Any profile'; +$txt['permissionname_profile_remove'] = 'Delete account'; +$txt['permissionhelp_profile_remove'] = 'This permission allows a user to delete his account, when set to \'Own Account\'.'; +$txt['permissionname_profile_remove_own'] = 'Own account'; +$txt['permissionname_profile_remove_any'] = 'Any account'; +$txt['permissionname_profile_remote_avatar'] = 'Choose a remotely stored avatar'; +$txt['permissionhelp_profile_remote_avatar'] = 'Because avatars might influence the page creation time negatively, it is possible to disallow certain membergroups to use avatars from external servers. '; + +$txt['permissiongroup_general_board'] = 'General'; +$txt['permissionname_moderate_board'] = 'Moderate board'; +$txt['permissionhelp_moderate_board'] = 'The moderate board permission adds a few small permissions that make a moderator a real moderator. Permissions include replying to locked topics, changing the poll expire time and viewing poll results.'; + +$txt['permissiongroup_topic'] = 'Topics'; +$txt['permissionname_post_new'] = 'Post new topics'; +$txt['permissionhelp_post_new'] = 'This permission allows users to post new topics. It doesn\'t allow to post replies to topics.'; +$txt['permissionname_merge_any'] = 'Merge any topic'; +$txt['permissionhelp_merge_any'] = 'Merge two or more topic into one. The order of messages within the merged topic will be based on the time the messages were created. A user can only merge topics on those boards a user is allowed to merge. In order to merge multiple topics at once, a user has to enable quickmoderation in their profile settings.'; +$txt['permissionname_split_any'] = 'Split any topic'; +$txt['permissionhelp_split_any'] = 'Split a topic into two separate topics.'; +$txt['permissionname_send_topic'] = 'Send topics to friends'; +$txt['permissionhelp_send_topic'] = 'This permission allows a user to mail a topic to a friend, by entering their email address and allows adding a message.'; +$txt['permissionname_make_sticky'] = 'Make topics sticky'; +$txt['permissionhelp_make_sticky'] = 'Sticky topics are topics that always remain on top of a board. They can be useful for announcements or other important messages.'; +$txt['permissionname_move'] = 'Move topic'; +$txt['permissionhelp_move'] = 'Move a topic from one board to the other. Users can only select target boards they are allowed to access.'; +$txt['permissionname_move_own'] = 'Own topic'; +$txt['permissionname_move_any'] = 'Any topic'; +$txt['permissionname_lock'] = 'Lock topics'; +$txt['permissionhelp_lock'] = 'This permission allows a user to lock a topic. This can be done in order to make sure no one can reply to a topic. Only uses with a \'Moderate board\' permission can still post in locked topics.'; +$txt['permissionname_lock_own'] = 'Own topic'; +$txt['permissionname_lock_any'] = 'Any topic'; +$txt['permissionname_delete'] = 'Remove topics'; +$txt['permissionhelp_delete'] = 'Delete topics as a whole. Note that this permission doesn\'t allow to delete specific messages within the topic!'; +$txt['permissionname_delete_own'] = 'Own topic'; +$txt['permissionname_delete_any'] = 'Any topics'; +$txt['permissionname_post_reply'] = 'Post replies to topics'; +$txt['permissionhelp_post_reply'] = 'This permission allows replying to topics.'; +$txt['permissionname_post_reply_own'] = 'Own topic'; +$txt['permissionname_post_reply_any'] = 'Any topic'; +$txt['permissionname_modify_replies'] = 'Modify replies to own topics'; +$txt['permissionhelp_modify_replies'] = 'This permission allows a user that started a topic to modify all replies to their topic.'; +$txt['permissionname_remove_replies'] = 'Delete replies to own topics'; +$txt['permissionhelp_remove_replies'] = 'This permission allows a user that started a topic to remove all replies to their topic.'; +$txt['permissionname_announce_topic'] = 'Announce topic'; +$txt['permissionhelp_announce_topic'] = 'This allows to send an announcement e-mail about a topic to all members or to a few membergroups.'; + +$txt['permissiongroup_post'] = 'Posts'; +$txt['permissionname_remove'] = 'Delete posts'; +$txt['permissionhelp_remove'] = 'Remove posts. This does not allow a user to delete the first post of a topic.'; +$txt['permissionname_remove_own'] = 'Own post'; +$txt['permissionname_remove_any'] = 'Any post'; +$txt['permissionname_modify'] = 'Modify posts'; +$txt['permissionhelp_modify'] = 'Edit posts'; +$txt['permissionname_modify_own'] = 'Own post'; +$txt['permissionname_modify_any'] = 'Any post'; +$txt['permissionname_report_any'] = 'Report posts to the moderators'; +$txt['permissionhelp_report_any'] = 'This permission adds a link to each message, allowing a user to report a post to a moderator. On reporting, all moderators on that board will receive an email with a link to the reported post and a description of the problem (as given by the reporting user).'; + +$txt['permissiongroup_poll'] = 'Polls'; +$txt['permissionname_poll_view'] = 'View polls'; +$txt['permissionhelp_poll_view'] = 'This permission allows a user to view a poll. Without this permission, the user will only see the topic.'; +$txt['permissionname_poll_vote'] = 'Vote in polls'; +$txt['permissionhelp_poll_vote'] = 'This permission allows a (registered) user to cast one vote. It doesn\'t apply to guests.'; +$txt['permissionname_poll_post'] = 'Post polls'; +$txt['permissionhelp_poll_post'] = 'This permission allows a user to post a new poll. As polls are special cases of topics, you cannot use this permission without the \'Post new topic\' permission.'; +$txt['permissionname_poll_add'] = 'Add poll to topics'; +$txt['permissionhelp_poll_add'] = 'Add poll to topics allows a user to add a poll after the topic has been created. This permission requires sufficient rights to edit the first post of a topic.'; +$txt['permissionname_poll_add_own'] = 'Own topics'; +$txt['permissionname_poll_add_any'] = 'Any topics'; +$txt['permissionname_poll_edit'] = 'Edit polls'; +$txt['permissionhelp_poll_edit'] = 'This permission allows to edit the options of a poll and to reset the poll. In order to edit the maximum number of votes and the expiration time, a user needs to have the \'Moderate board\' permission.'; +$txt['permissionname_poll_edit_own'] = 'Own poll'; +$txt['permissionname_poll_edit_any'] = 'Any poll'; +$txt['permissionname_poll_lock'] = 'Lock polls'; +$txt['permissionhelp_poll_lock'] = 'Locking polls prevents the poll from accepting any more votes.'; +$txt['permissionname_poll_lock_own'] = 'Own poll'; +$txt['permissionname_poll_lock_any'] = 'Any poll'; +$txt['permissionname_poll_remove'] = 'Remove polls'; +$txt['permissionhelp_poll_remove'] = 'This permission allows removal of polls.'; +$txt['permissionname_poll_remove_own'] = 'Own poll'; +$txt['permissionname_poll_remove_any'] = 'Any poll'; + +$txt['permissiongroup_notification'] = 'Notifications'; +$txt['permissionname_mark_any_notify'] = 'Request notification on replies'; +$txt['permissionhelp_mark_any_notify'] = 'This feature allows users to receive a notification whenever someone replies to a topic they subscribed to.'; +$txt['permissionname_mark_notify'] = 'Request notification on new topics'; +$txt['permissionhelp_mark_notify'] = 'Notification on new topics is a feature that allows a user to receive an email every time a new topic is created on the board they subscribe to.'; + +$txt['permissiongroup_attachment'] = 'Attachments'; +$txt['permissionname_view_attachments'] = 'View attachments'; +$txt['permissionhelp_view_attachments'] = 'Attachments are files that are attached to posted messages. This feature can be enabled and configured in \'Edit Features and Options\'. Since attachments are not directly accessed, you can protect them from being downloaded by users that don\'t have this permission.'; +$txt['permissionname_post_attachment'] = 'Post attachments'; +$txt['permissionhelp_post_attachment'] = 'Attachments are files that are attached to posted messages. One message can contain multiple attachments.'; + +$txt['permissionicon'] = ''; + +$txt['permissionname_karmalog_view'] = 'View Karma Log'; +$txt['permissionhelp_karmalog_view'] = 'Karma Description Log shows all members karma and description of applauding or smiting. This permission will only work if you also have enabled it in \'Features and Options\'. You can access the Karma Description screen by clicking the link in the \'Karma Stat\' section of the board index.'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/ManagePermissions.russian.php b/Themes/modern/languages/ManagePermissions.russian.php new file mode 100644 index 0000000..92ca959 --- /dev/null +++ b/Themes/modern/languages/ManagePermissions.russian.php @@ -0,0 +1,217 @@ ++'; +$txt['permissions_option_off'] = ''; +$txt['permissions_option_deny'] = '×'; +$txt['permissions_option_desc'] = 'Для каждого права Вы можете выбрать либо \'Позволить\' (+), \'Отклонить\' (—), или \'Запретить\' (×).

    Помните, что если вы ограничили права, любому участнику, например, модератору, или кому-то еще, то всем пользователям группы будет запрещено данное право.
    По этой причине, следует использовать запреты осторожно, только по необходимости. Отклонение прав, с другой стороны, запрещает их, если они не предоставлены другим образом.'; + +$txt['permissiongroup_general'] = 'Общие'; +$txt['permissionname_view_stats'] = 'Смотреть статистику форума'; +$txt['permissionhelp_view_stats'] = 'Страница статистики форума хранит общую информацию о форуме, например, общее число участников, количество сообщений за день/месяц и некоторую статистику "10 самых..." Включив это право, будет добавлена ссылка внизу страницы (\'[Подробная статистика]\').'; +$txt['permissionname_view_mlist'] = 'Смотреть список участников'; +$txt['permissionhelp_view_mlist'] = 'Список участников показывает всех пользователей, зарегистрированных на форуме. По списку участников можно устраивать поиск и классификацию. Ссылка на список участников есть как на главной странице, так и на странице статистики. Пройдите по ссылке на список участников.'; +$txt['permissionname_who_view'] = 'Смотреть Кто Online'; +$txt['permissionhelp_who_view'] = 'Список пользователей online показывает, кто сейчас online, и кто что на форуме сейчас делает. Это право также будет доступно, только если Вы его включили в \'Общих настройках\'. Вы можете попасть на страницу \'Кто Online\', нажав на ссылку \'Участники online\' на главной странице.'; +$txt['permissionname_search_posts'] = 'Использовать поиск по форуму'; +$txt['permissionhelp_search_posts'] = 'Право к поиску позволяет пользователю устраивать искать по всем страницам форума, к которым имеется у него имеется доступ. Если право поиска включено, то кнопка \'Поиск\' будет автоматически добавлена в кнопочное меню вверху каждой страницы форума.'; +$txt['permissionname_karma_edit'] = 'Изменять репутацию других людей'; +$txt['permissionhelp_karma_edit'] = 'Репутация - это рейтинг, показывающий мнение других участников форума об этом пользователе. Для того, чтобы использовать эту опцию, ее надо включить в \'Общих настройках\'. Это право позволит разрешённым группам пользователей голосовать. Это право недоступно гостям.'; + +$txt['permissiongroup_pm'] = 'Личные Сообщения'; +$txt['permissionname_pm_read'] = 'Смотреть личные сообщения'; +$txt['permissionhelp_pm_read'] = 'Это право разрешает пользователям использовать функцию "личные сообщения". Без этого права пользователи не смогут получать и отправлять личные сообщения.'; +$txt['permissionname_pm_send'] = 'Отправлять личные сообщения'; +$txt['permissionhelp_pm_send'] = 'Отправлять личные сообщения другим зарегистрированым пользователям. Необходимо право \'Смотреть личные сообщения\'.'; + +$txt['permissiongroup_calendar'] = 'Календарь'; +$txt['permissionname_calendar_view'] = 'Смотреть календарь'; +$txt['permissionhelp_calendar_view'] = 'Календарь показывает дни рождения участников, события и праздники, отмеченые на форуме. Это право дает доступ к просмотру календаря. Когда это право включено, кнопка "Календарь" будет автоматически добавлена в кнопочное меню вверху каждой страницы форума, также календарь будет отображаться внизу главной страницы форума с текущими и приближающимися днями рождения, праздниками и событиями. Календарь должен быть включен в \'Общих настройках\'.'; +$txt['permissionname_calendar_post'] = 'Создавать события в календаре'; +$txt['permissionhelp_calendar_post'] = 'Событие - это привязка темы к определенной дате или отрезку времени. Создать событие можно в календаре. Событие могут создавать пользователи, если у них имеются права создавать новые темы на форуме.'; +$txt['permissionname_calendar_edit'] = 'Редактировать события в календаре'; +$txt['permissionhelp_calendar_edit'] = 'Событие - это привязка темы к определенной дате или отрезку времени. Событие может быть отредактировано при нажатии на красную звездочку (*) рядом с событием в календаре. Для того чтобы отредактировать событие, пользователь должен иметь право редактирования сообщения в теме, к которому привязано событие.'; +$txt['permissionname_calendar_edit_own'] = 'Собственные события'; +$txt['permissionname_calendar_edit_any'] = 'Любые события'; + +$txt['permissiongroup_maintenance'] = 'Администрирование форума'; +$txt['permissionname_admin_forum'] = 'Администрировать форум и базу данных'; +$txt['permissionhelp_admin_forum'] = 'Это право позволяет пользователям:
    • Менять настройки соединения с форумом, базой данных и шаблонами
    • Управлять пакетами
    • Использовать инструменты технической поддержки форума и базы данных
    • Смотреть ошибки и логи модераторов
    Используйте это право осторожно, оно фактически делает пользователя администратором.'; +$txt['permissionname_manage_boards'] = 'Редактировать разделы и категории форума'; +$txt['permissionhelp_manage_boards'] = 'Это право разрешает создавать, редактировать и удалять разделы и категории форума.'; +$txt['permissionname_manage_attachments'] = 'Управлять вложениями и аватарами'; +$txt['permissionhelp_manage_attachments'] = 'Это право пускает пользователей в центр вложений, где ведётся подсчёт всех вложений и аватаром. Оттуда вложения и аватары могут быть удалены.'; +$txt['permissionname_manage_smileys'] = 'Управление смайлами'; +$txt['permissionhelp_manage_smileys'] = 'Это дает право доступа к центру смайлов. В центре смайлов Вы можете добавлять, редактировать и удалять смайлы и наборы смайлов.'; +$txt['permissionname_edit_news'] = 'Редактировать новости'; +$txt['permissionhelp_edit_news'] = 'Эта новостная функция позволяет видеть случайные новостные ленты форума на каждом экране. Для использования новостной функции, включите ее в настройках форума.'; + +$txt['permissiongroup_member_admin'] = 'Контроль участников'; +$txt['permissionname_moderate_forum'] = 'Управлять аккаунтами участников'; +$txt['permissionhelp_moderate_forum'] = 'Это право включает все важные функции контроля участников:
    • доступ к параметрам регистрации
    • доступ к просмотру/удалению участников
    • редактирование дополнительной информации участника, включая отслеживание IP-адресов пользователей и отображение скрытого online статуса
    • активацию новых аккаунтов
    • получение подтверждения уведомлений на подтверждение аккаунтов
    • возможность игнорирования личных сообщений
    • и кое-что ещё
    '; +$txt['permissionname_manage_membergroups'] = 'Редактировать группы пользователей'; +$txt['permissionhelp_manage_membergroups'] = 'Это право позволяет создавать и редактировать группы пользователей, а также назначать их другим участникам.'; +$txt['permissionname_manage_permissions'] = 'Редактировать права пользователей'; +$txt['permissionhelp_manage_permissions'] = 'Это право позволяет пользователям редактировать все права групп пользователей во всех разделах и отдельных разделах.'; +$txt['permissionname_manage_bans'] = 'Редактировать бан-лист'; +$txt['permissionhelp_manage_bans'] = 'Это право позволяет забанивать нежелательных участников на форуме. То есть, добавлять и удалять имена пользователей, IP адреса, хосты и email адреса в списке забаненых пользователей. Этот также позволяет смотреть и удалять логи забаненых пользователей и их попытки входа.'; +$txt['permissionname_send_mail'] = 'Отправлять e-mail от имени форума его участникам'; +$txt['permissionhelp_send_mail'] = 'Массовая рассылка участникам форума, или нескольким группам по e-mail или личными сообщениями (последнее требует право на отправку личных сообщений.'; + +$txt['permissiongroup_profile'] = 'Профиль Участника'; +$txt['permissionname_profile_view'] = 'Просмотр данных профиль и статистики'; +$txt['permissionhelp_profile_view'] = 'Это право дает возможность кликнуть на имя пользователя, чтобы посмотреть настройки профиля, некоторую статистику и все сообщения пользователя.'; +$txt['permissionname_profile_view_own'] = 'Собственный профиль'; +$txt['permissionname_profile_view_any'] = 'Любой профиль'; +$txt['permissionname_profile_identity'] = 'Редактировать настройки аккаунта'; +$txt['permissionhelp_profile_identity'] = 'Настройки аккаунта - это основные настройки профиля, такие как, пароль, email адрес, группы пользователей и предпочитаемый язык.'; +$txt['permissionname_profile_identity_own'] = 'Собственный профиль'; +$txt['permissionname_profile_identity_any'] = 'Любой профиль'; +$txt['permissionname_profile_extra'] = 'Редактировать дополнительные настройки профиля'; +$txt['permissionhelp_profile_extra'] = 'Дополнительные настройки профиля включают настройки аватара, предпочитаемой темы, извещения и Личные сообщения.'; +$txt['permissionname_profile_extra_own'] = 'Собственный профиль'; +$txt['permissionname_profile_extra_any'] = 'Любой профиль'; +$txt['permissionname_profile_title'] = 'Редактировать выбранный титул'; +$txt['permissionhelp_profile_title'] = 'Выбранный титул показывается на странице темы, под под профилем каждого пользователя, у кого свой титул.'; +$txt['permissionname_profile_title_own'] = 'Собственный профиль'; +$txt['permissionname_profile_title_any'] = 'Любой профиль'; +$txt['permissionname_profile_remove'] = 'Удалять аккаунты участников'; +$txt['permissionhelp_profile_remove'] = 'Это право позволяет удалить только свой аккаунт, если установлено \'Собственный Аккаунт\'.'; +$txt['permissionname_profile_remove_own'] = 'Собственный аккаунт'; +$txt['permissionname_profile_remove_any'] = 'Любой аккаунт'; +$txt['permissionname_profile_remote_avatar'] = 'Загружать аватар с удалённого сервера'; +$txt['permissionhelp_profile_remote_avatar'] = 'Так как аватары могут негативно влиять на время создания страницы, можно отказать определенным группам пользователей использовать аватар с удаленных серверов. '; + +$txt['permissiongroup_general_board'] = 'Общие права в разделе'; +$txt['permissionname_moderate_board'] = 'Привилегии в разделе'; +$txt['permissionhelp_moderate_board'] = 'Доступ к модерированию форума добавляет некоторые права в разделе. Права включают ответы в закрытых темах, изменение времени опроса и просмотр результатов опроса.'; + +$txt['permissiongroup_topic'] = 'Права в темах'; +$txt['permissionname_post_new'] = 'Создавать новую тему'; +$txt['permissionhelp_post_new'] = 'Это право позволяет создавать новые темы пользователями. Но это не позволяет отвечать в темах.'; +$txt['permissionname_merge_any'] = 'Сливать две темы в одну'; +$txt['permissionhelp_merge_any'] = 'Соединение одной или более тем в одну. Порядок сообщений в соединенной теме будет определяться временем создания сообщения. Пользователь сможет соединять только на тех форумах, где ему позволено. Для соединения множества тем сразу, пользователь должен включить быстрое модерирование в настройках профиля.'; +$txt['permissionname_split_any'] = 'Разделять тему на две (split)'; +$txt['permissionhelp_split_any'] = 'Позволяет разделять тему на две независимых темы.'; +$txt['permissionname_send_topic'] = 'Послылать адрес темы по e-mail'; +$txt['permissionhelp_send_topic'] = 'Это право позволяет отправлять тему другу введя его email и позволяет добавлять сообщение.'; +$txt['permissionname_make_sticky'] = 'Помечать тему "важной"'; +$txt['permissionhelp_make_sticky'] = 'Важные (прикрепленные) темы всегда остаются первыми вверху списка тем в разделе. Они могут быть полезными для объявлений или других важных сообщений.'; +$txt['permissionname_move'] = 'Перемещать темы'; +$txt['permissionhelp_move'] = 'Перемещать темы из одного раздела в другой. Пользователи могут перемещать темы только в те разделы, к которым у них есть доступ.'; +$txt['permissionname_move_own'] = 'Собственная тема'; +$txt['permissionname_move_any'] = 'Любая тема'; +$txt['permissionname_lock'] = 'Закрывать темы'; +$txt['permissionhelp_lock'] = 'Это право разрешает пользователю закрывать тему. Это делается для того, что бы никто не мог отвечать в теме. Только пользователи с \'Привилегиями в разделе\' могут все равно писать в закрытой теме.'; +$txt['permissionname_lock_own'] = 'Собственная тема'; +$txt['permissionname_lock_any'] = 'Любая тема'; +$txt['permissionname_delete'] = 'Удалять темы'; +$txt['permissionhelp_delete'] = 'Удалить целые темы. Заметьте, что это право не позволяет удалять отдельные сообщения в теме!'; +$txt['permissionname_delete_own'] = 'Собственная тема'; +$txt['permissionname_delete_any'] = 'Любая тема'; +$txt['permissionname_post_reply'] = 'Писать ответы в темах'; +$txt['permissionhelp_post_reply'] = 'Это право позволяет писать ответы в темах.'; +$txt['permissionname_post_reply_own'] = 'Собственная тема'; +$txt['permissionname_post_reply_any'] = 'Любая тема'; +$txt['permissionname_modify_replies'] = 'Изменять ответы других участников в своих темах'; +$txt['permissionhelp_modify_replies'] = 'Это право разрешает пользователю, начавшему тему, изменять все ответы в его теме.'; +$txt['permissionname_remove_replies'] = 'Удалять любые ответы в собственной теме'; +$txt['permissionhelp_remove_replies'] = 'Это право разрешает пользователю, начавшему тему, удалять все ответы в его теме.'; +$txt['permissionname_announce_topic'] = 'Уведомлять о теме'; +$txt['permissionhelp_announce_topic'] = 'Разрешается отправлять объявления по e-mail о теме всем участникам или участникам некоторых групп.'; + +$txt['permissiongroup_post'] = 'Сообщения'; +$txt['permissionname_remove'] = 'Удалять сообщения'; +$txt['permissionhelp_remove'] = 'Это право не дает возможность пользователям удалять первое сообщение темы.'; +$txt['permissionname_remove_own'] = 'Собственное сообщение'; +$txt['permissionname_remove_any'] = 'Любое сообщение'; +$txt['permissionname_modify'] = 'Изменять сообщения'; +$txt['permissionhelp_modify'] = 'Редактировать сообщения'; +$txt['permissionname_modify_own'] = 'Собственное сообщение'; +$txt['permissionname_modify_any'] = 'Любое сообщение'; +$txt['permissionname_report_any'] = 'Доносить модераторам о плохих сообщениях'; +$txt['permissionhelp_report_any'] = 'Автоматическое уведомление всех модераторов форума по e-mail об этом сообщении. (Используется при доносе на плохие сообщения)'; + +$txt['permissiongroup_poll'] = 'Опросы'; +$txt['permissionname_poll_view'] = 'Смотреть опросы'; +$txt['permissionhelp_poll_view'] = 'Это право позволяет смотреть опросы. Без этого, пользователь увидет только тему.'; +$txt['permissionname_poll_vote'] = 'Голосовать в опросах'; +$txt['permissionhelp_poll_vote'] = 'Этот право позволяет (зарегистрированным) пользователям оставлять свой голос. Не работает для гостей.'; +$txt['permissionname_poll_post'] = 'Создавать опросы'; +$txt['permissionhelp_poll_post'] = 'Этот доступ разрешает пользователю создавать опросы. Так как опрос - это часть темы, Вы не можете использовать это право без права\'Создавать новую тему\'.'; +$txt['permissionname_poll_add'] = 'Добавлять опрос в темы'; +$txt['permissionhelp_poll_add'] = 'Добавление опросов в темы, позволяет добавлять опрос после того, как тема была создана. Это право требует достаточных прав для редактирования первого сообщения темы.'; +$txt['permissionname_poll_add_own'] = 'Собственные темы'; +$txt['permissionname_poll_add_any'] = 'Любые темы'; +$txt['permissionname_poll_edit'] = 'Редактировать опросы'; +$txt['permissionhelp_poll_edit'] = 'Это право позволяет редактировать опции опроса и сбрасывать опрос. Для того, чтобы добиться максимума голосов и изменить время опроса, пользователь должен обладать правом к \'Модерированию Форума\'.'; +$txt['permissionname_poll_edit_own'] = 'Собственный опрос'; +$txt['permissionname_poll_edit_any'] = 'Любой опрос'; +$txt['permissionname_poll_lock'] = 'Закрывать опросы'; +$txt['permissionhelp_poll_lock'] = 'Закрытие опроса делает невозможным продолжение голосования.'; +$txt['permissionname_poll_lock_own'] = 'Собственный опрос'; +$txt['permissionname_poll_lock_any'] = 'Любой опрос'; +$txt['permissionname_poll_remove'] = 'Удалять опросы'; +$txt['permissionhelp_poll_remove'] = 'Это право позволяет удалять опросы.'; +$txt['permissionname_poll_remove_own'] = 'Собственный опрос'; +$txt['permissionname_poll_remove_any'] = 'Любой опрос'; + +$txt['permissiongroup_notification'] = 'Уведомления'; +$txt['permissionname_mark_any_notify'] = 'Подписываться на уведомления о новых сообщениях по e-mail'; +$txt['permissionhelp_mark_any_notify'] = 'Эта опция позволяет получать уведомления, когда кто-то отвечает в теме, на которую пользователь подписался.'; +$txt['permissionname_mark_notify'] = 'Подписываться на уведомления о создании новых тем в разделе'; +$txt['permissionhelp_mark_notify'] = 'Извещение о новых темах - это опция, которая позволяет получать e-mail каждый раз, когда создается новая тема в разделе, на который участник подписался.'; + +$txt['permissiongroup_attachment'] = 'Вложения'; +$txt['permissionname_view_attachments'] = 'Смотреть вложения'; +$txt['permissionhelp_view_attachments'] = 'Вложения, это файлы, которые прикрепляются к сообщению. Эта опция может быть включена и сконфигурирована в \'Общих настройках\'. Так как вложения не доступны напрямую, Вы можете ограничить пользователей, у которых нет этих прав.'; +$txt['permissionname_post_attachment'] = 'Добавлять вложения'; +$txt['permissionhelp_post_attachment'] = 'Вложения, это файлы, которые прикреплены к сообщению. Одно сообщение может содержать множество вложений.'; + +$txt['permissionicon'] = ''; + +$txt['permissionname_karmalog_view'] = 'View Karma Log'; +$txt['permissionhelp_karmalog_view'] = 'Karma Description Log shows all members karma and description of applauding or smiting. This permission will only work if you also have enabled it in \'Features and Options\'. You can access the Karma Description screen by clicking the link in the \'Karma Stat\' section of the board index.'; +?> diff --git a/Themes/modern/languages/ManageSmileys.english.php b/Themes/modern/languages/ManageSmileys.english.php new file mode 100644 index 0000000..045439f --- /dev/null +++ b/Themes/modern/languages/ManageSmileys.english.php @@ -0,0 +1,78 @@ +Here you can change the name and location of each smiley set - remember, however, that all sets share the same smileys.'; +$txt['smiley_editsmileys_explain'] = 'Change your smileys here by clicking on the smiley you want to modify. Remember that these smileys all have to exist in all the sets or some smileys won\'t show up! Don\'t forget to save after you are done editing!'; +$txt['smiley_setorder_explain'] = 'Change the order of the smileys here.'; +$txt['smiley_addsmiley_explain'] = 'Here you can add a new smiley - either from an existing file or by uploading new ones.'; + +$txt['smileys_set_order'] = 'Set smiley order'; +$txt['smiley_settings'] = 'Smiley settings'; +$txt['smiley_sets_base_dir'] = 'Absolute path to all smiley sets'; +$txt['smiley_set_select_default'] = 'Default Smiley Set'; +$txt['smiley_set_new'] = 'Create new smiley set'; +$txt['smiley_set_modify_existing'] = 'Modify existing smiley set'; +$txt['smiley_set_modify'] = 'Modify'; +$txt['smiley_set_import_directory'] = 'Import smileys already in this directory'; +$txt['smiley_set_import_single'] = 'There is one smiley in this smiley set not yet imported. Click'; +$txt['smiley_set_import_multiple'] = 'There are %d smileys in the directory that have no yet been imported. Click'; +$txt['smiley_set_to_import_single'] = 'to import it now.'; +$txt['smiley_set_to_import_multiple'] = 'to import them now.'; + +$txt['smileys_location'] = 'Location'; +$txt['smileys_location_form'] = 'Post form'; +$txt['smileys_location_hidden'] = 'Hidden'; +$txt['smileys_location_popup'] = 'Popup'; +$txt['smileys_modify'] = 'modify'; +$txt['smileys_not_found_in_set'] = 'Smiley not found in set(s)'; +$txt['smileys_default_description'] = '(Insert a description)'; +$txt['smiley_new'] = 'Add new smiley'; +$txt['smiley_modify_existing'] = 'Modify smiley'; +$txt['smiley_preview'] = 'Preview'; +$txt['smiley_preview_using'] = 'using smiley set'; +$txt['smileys_confirm'] = 'Are you sure you want to remove these smileys?\\n\\nNote: This won\\\'t remove the images, just the choices.'; +$txt['smileys_location_form_description'] = 'These smileys will appear above the text area, when posting a new forum message or Personal Message.'; +$txt['smileys_location_popup_description'] = 'These smileys will be shown in a popup, that is shown after a user has clicked \'[more]\''; +$txt['smileys_move_select_destination'] = 'Select smiley destination'; +$txt['smileys_move_select_smiley'] = 'Select smiley to move'; +$txt['smileys_move_here'] = 'Move smiley to this location'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/ManageSmileys.russian.php b/Themes/modern/languages/ManageSmileys.russian.php new file mode 100644 index 0000000..8dddd57 --- /dev/null +++ b/Themes/modern/languages/ManageSmileys.russian.php @@ -0,0 +1,78 @@ +Здесь Вы можете менять название или местоположение каждого набора смайлов, помните, что все наборы должны содержать одинаковые смайлы.'; +$txt['smiley_editsmileys_explain'] = 'Измените Ваши смайлы, нажмите на те, которые Вы хотите изменить. Помните, что все смайлы должны существовать во всех наборах, или некоторые смайлы не будут отображаться! Не забудте сохраниться, после того как сделаете изменения!'; +$txt['smiley_setorder_explain'] = 'Измените здесь порядок смайлов.'; +$txt['smiley_addsmiley_explain'] = 'Здесь Вы можете добавить новый смайл - как из существующего файла, так и загрузив его.'; + +$txt['smileys_set_order'] = 'Порядок наборов смайлов'; +$txt['smiley_settings'] = 'Настройки смайлов'; +$txt['smiley_sets_base_dir'] = 'Полный путь к наборам смайлов'; +$txt['smiley_set_select_default'] = 'Набор Смайлов По Умолчанию'; +$txt['smiley_set_new'] = 'Создать новый набор смайлов'; +$txt['smiley_set_modify_existing'] = 'Изменить существующий набор смайлов'; +$txt['smiley_set_modify'] = 'Изменить'; +$txt['smiley_set_import_directory'] = 'Импортируемые смайлы уже в этой директории'; +$txt['smiley_set_import_single'] = 'Один смайл в этом наборе смайлов не импортирован еще. Кликните'; +$txt['smiley_set_import_multiple'] = 'Здесь %d смайлов в директории, которые еще не импортировали. Кликните'; +$txt['smiley_set_to_import_single'] = 'чтобы импортировать его сейчас.'; +$txt['smiley_set_to_import_multiple'] = 'чтобы импортировать их сейчас.'; + +$txt['smileys_location'] = 'Местоположение'; +$txt['smileys_location_form'] = 'Вставить форму'; +$txt['smileys_location_hidden'] = 'Спрятанное'; +$txt['smileys_location_popup'] = 'Всплывающее'; +$txt['smileys_modify'] = 'изменить'; +$txt['smileys_not_found_in_set'] = 'Смайлы не найдены в этом наборе(наборах)'; +$txt['smileys_default_description'] = '(Вставьте описание)'; +$txt['smiley_new'] = 'Добавить новый смайл'; +$txt['smiley_modify_existing'] = 'Изменить смайл'; +$txt['smiley_preview'] = 'Предпросмотр'; +$txt['smiley_preview_using'] = 'используя набор смайлов'; +$txt['smileys_confirm'] = 'Вы уверены, что хотите удалить эти смайлы?\\n\\nУчтите: это не\\ удалит картинки, а только возможность выбора.'; +$txt['smileys_location_form_description'] = 'Эти смайлы отображаются сверху над полем ввода сообщения, при создании нового сообщения или Личного Сообщения.'; +$txt['smileys_location_popup_description'] = 'Эти смайлы будут отображаться во всплывающих сообщениях, после того как пользователь кликнет на \'[больше]\''; +$txt['smileys_move_select_destination'] = 'Выберете место назначение смайлов'; +$txt['smileys_move_select_smiley'] = 'Выберите смайлы для перемещения'; +$txt['smileys_move_here'] = 'Передвинуть смайлы на это место'; + +?> diff --git a/Themes/modern/languages/ModSettings.english.php b/Themes/modern/languages/ModSettings.english.php new file mode 100644 index 0000000..3b52cdb --- /dev/null +++ b/Themes/modern/languages/ModSettings.english.php @@ -0,0 +1,203 @@ +theme settings for more options. Click the help icons for more information about a setting.'; +$txt['mods_cat_expand_all'] = '(expand all)'; + +$txt['mods_cat_features'] = 'Basic Forum Features'; +$txt['pollMode'] = 'Poll mode'; +$txt['smf34'] = 'Disable polls'; +$txt['smf32'] = 'Enable polls'; +$txt['smf33'] = 'Show existing polls as topics'; +$txt['enableStickyTopics'] = 'Enable sticky topics'; +$txt['allow_guestAccess'] = 'Allow guests to browse the forum'; +$txt['userLanguage'] = 'Enable user-selectable language support'; +$txt['allow_editDisplayName'] = 'Allow users to edit their displayed name?'; +$txt['allow_hideOnline'] = 'Allow non-administrators to hide their online status?'; +$txt['allow_hideEmail'] = 'Allow users to hide their email from everyone except admins?'; +$txt['guest_hideContacts'] = 'Do not reveal contact details of members to guests'; +$txt['titlesEnable'] = 'Enable custom titles'; +$txt['default_personalText'] = 'Default personal text'; +$txt['max_signatureLength'] = 'Maximum allowed characters in signatures
    (0 for no max.)
    '; +$txt['removeNestedQuotes'] = 'Remove nested quotes when posting'; +$txt['enableEmbeddedFlash'] = 'Embed flash into posts
    (may be a security risk!)
    '; +$txt['enablePostHTML'] = 'Enable basic HTML in posts'; +$txt['disabledBBC'] = 'Disabled BBC Code (comma separated)'; +$txt['enableBBC'] = 'Enable bulletin board code (BBC)'; +$txt['enableNewReplyWarning'] = 'Warn members of new replies made while posting?'; +$txt['max_messageLength'] = 'Maximum allowed characters in posts
    (0 for no max.)
    '; +$txt['number_format'] = 'Default number format'; +$txt['time_format'] = 'Default time format'; +$txt['time_offset'] = 'Overall time offset
    (added to the member specific option.)
    '; +$txt['spamWaitTime'] = 'Seconds required between posts from the same IP'; +$txt['edit_wait_time'] = 'Courtesy edit wait time'; +$txt['failed_login_threshold'] = 'Failed login threshold'; +$txt['lastActive'] = 'User online time threshold'; +$txt['enableSpellChecking'] = 'Enable spell checking
    (this does not work on all servers!)
    '; +$txt['trackStats'] = 'Track daily statistics'; +$txt['hitStats'] = 'Track daily hits (must have stats enabled)'; +$txt['enableCompressedOutput'] = 'Enable compressed output'; +$txt['databaseSession_enable'] = 'Use database driven sessions'; +$txt['databaseSession_loose'] = 'Allow browsers to go back to cached pages'; +$txt['databaseSession_lifetime'] = 'Seconds before an unused session timeout'; +$txt['enableErrorLogging'] = 'Enable error logging'; +$txt['cookieTime'] = 'Default login cookies length (in minutes)'; +$txt['localCookies'] = 'Enable local storage of cookies
    (SSI won\'t work well with this on.)
    '; +$txt['globalCookies'] = 'Use subdomain independent cookies
    (turn off local cookies first!)
    '; +$txt['redirectMetaRefresh'] = 'Use a META redirect instead of HTTP
    (for IIS 4.0 and some Apache versions.)
    '; +$txt['securityDisable'] = 'Disable administration security'; +$txt['registration_method'] = 'Method of registration employed for new members'; +$txt['registration_disabled'] = 'Registration Disabled'; +$txt['registration_standard'] = 'Immediate Registration'; +$txt['registration_activate'] = 'Member Activation'; +$txt['registration_approval'] = 'Member Approval'; +$txt['notify_on_new_registration'] = 'Notify administrators when a new member joins'; +$txt['send_validation_onChange'] = 'Require reactivation after email change'; +$txt['send_welcomeEmail'] = 'Send welcome email to new members'; +$txt['autoOptDatabase'] = 'Optimize tables every how many days?
    (0 to disable.)
    '; +$txt['autoOptMaxOnline'] = 'Maximum users online when optimizing
    (0 for no max.)
    '; +$txt['autoFixDatabase'] = 'Automatically fix broken tables'; +$txt['notifyAnncmnts_UserDisable'] = 'Allow users to disable announcements'; +$txt['modlog_enabled'] = 'Log moderation actions'; +$txt['queryless_urls'] = 'Search engine friendly URLs
    Apache only!
    '; +$txt['maxwidth'] = 'Max width of posted pictures (0 = disable)'; +$txt['maxheight'] = 'Max height of posted pictures (0 = disable)'; +$txt['mail_type'] = 'Mail type'; +$txt['smtp_host'] = 'SMTP server'; +$txt['smtp_port'] = 'SMTP port'; +$txt['smtp_username'] = 'SMTP username'; +$txt['smtp_password'] = 'SMTP password'; +$txt['xmlnews_enable'] = 'Enable XML/RSS news'; +$txt['xmlnews_maxlen'] = 'Maximum post length:
    (0 to disable, bad idea.)
    '; +$txt['recycle_enable'] = 'Enable recycling of deleted topics'; +$txt['recycle_board'] = 'Board for recycled topics'; + +$txt['mods_cat_layout'] = 'Layout and Options'; +$txt['compactTopicPagesEnable'] = 'Limit number of displayed page links'; +$txt['smf235'] = 'Contiguous pages to display:'; +$txt['smf236'] = 'to display'; +$txt['todayMod'] = 'Enable "Today" feature'; +$txt['smf290'] = 'Disabled'; +$txt['smf291'] = 'Only Today'; +$txt['smf292'] = 'Today & Yesterday'; +$txt['topbottomEnable'] = 'Enable Go Up/Go Down buttons'; +$txt['onlineEnable'] = 'Show online/offline in posts and PMs'; +$txt['enableVBStyleLogin'] = 'Show a quick login on every page'; +$txt['autoLinkUrls'] = 'Automatically link posted URLs'; +$txt['fixLongWords'] = 'Break up words with more letters than:
    (0 to disable)
    '; +$txt['defaultMaxTopics'] = 'Maximum topics to display in the message index'; +$txt['defaultMaxMessages'] = 'Maximum messages to display in a topic page'; +$txt['defaultMaxMembers'] = 'Members per page in member list'; +$txt['topicSummaryPosts'] = 'Posts to show on topic summary'; +$txt['enableAllMessages'] = 'Max number of replies in a topic to show "All" posts:
    (0 to never show "All")
    '; +$txt['hotTopicPosts'] = 'Number of posts for a hot topic'; +$txt['hotTopicVeryPosts'] = 'Number of posts for a very hot topic'; +$txt['enableParticipation'] = 'Enable participation icons'; +$txt['enablePreviousNext'] = 'Enable previous/next topic links'; +$txt['timeLoadPageEnable'] = 'Display time taken to create every page'; +$txt['disableHostnameLookup'] = 'Disable hostname lookups?'; +$txt['who_enabled'] = 'Enable who\'s online list'; + +$txt['mods_cat_search'] = 'Search'; +$txt['simpleSearch'] = 'Enable simple search'; +$txt['search_match_complete_words'] = 'Only search for complete word matches'; +$txt['disableTemporaryTables'] = 'Disable temporary tables
    (only check if use of temporary tables is not allowed)
    '; +$txt['search_results_per_page'] = 'Number of search results per page'; +$txt['search_cache_size'] = 'Maximum cached searches
    (0 to disable caching)
    '; +$txt['search_weight_frequency'] = 'Relative search weight for number of matching messages within a topic'; +$txt['search_weight_age'] = 'Relative search weight for age of last matching message'; +$txt['search_weight_length'] = 'Relative search weight for topic length'; +$txt['search_weight_subject'] = 'Relative search weight for a matching subject'; +$txt['search_weight_first_message'] = 'Relative search weight for a first message match'; + +$txt['mods_cat_avatars'] = 'Avatars'; +$txt['avatar_allow_server_stored'] = 'Allow members to select a server-stored avatar'; +$txt['avatar_directory'] = 'Avatars directory'; +$txt['avatar_url'] = 'Avatars URL'; +$txt['avatar_allow_external_url'] = 'Allow members to select an external avatar (using a URL)'; +$txt['avatar_max_width_external'] = 'Maximum width external avatar (0 = no limit)'; +$txt['avatar_max_height_external'] = 'Maximum height external avatar (0 = no limit)'; +$txt['avatar_check_size'] = 'Check the avatar size every time it is displayed'; +$txt['avatar_action_too_large'] = 'If the avatar is too large...'; +$txt['option_refuse'] = 'Refuse it'; +$txt['option_html_resize'] = 'Let the HTML resize it'; +$txt['option_download_and_resize'] = 'Download and resize it (requires GD module)'; +$txt['avatar_allow_upload'] = 'Allow members to upload their own avatars'; +$txt['avatar_max_width_upload'] = 'Maximum width of uploaded avatar (0 = no limit)'; +$txt['avatar_max_height_upload'] = 'Maximum height of uploaded avatar (0 = no limit)'; +$txt['avatar_resize_upload'] = 'Resize oversized large avatars (requires GD module)'; +$txt['avatar_download_png'] = 'Use PNG for resized avatars?'; + +$txt['smf294'] = 'Attachments'; +$txt['attachmentEnable'] = 'Attachments mode'; +$txt['smf111'] = 'Disable attachments|Enable all attachments|Disable new attachments'; +$txt['attachmentCheckExtensions'] = 'Check attachment\'s extension'; +$txt['attachmentExtensions'] = 'Allowed attachment extensions'; +$txt['attachmentShowImages'] = 'Display image attachments as pictures under post'; +$txt['attachmentEncryptFilenames'] = 'Encrypt stored filenames'; +$txt['attachmentUploadDir'] = 'Attachments directory'; +$txt['attachmentDirSizeLimit'] = 'Max attachment folder space (in KB)'; +$txt['attachmentPostLimit'] = 'Max attachment size per post (in KB)'; +$txt['attachmentSizeLimit'] = 'Max size per attachment (in KB)'; +$txt['attachmentNumPerPostLimit'] = 'Max number of attachments per post'; + +$txt['smf293'] = 'Karma'; +$txt['karmaMode'] = 'Karma mode'; +$txt['smf64'] = 'Disable karma|Enable karma total|Enable karma positive/negative'; +$txt['karmaMinPosts'] = 'Set the minimum posts needed to modify karma'; +$txt['karmaWaitTime'] = 'Set wait time in hours'; +$txt['karmaTimeRestrictAdmins'] = 'Restrict administrators to wait time'; +$txt['karmaLabel'] = 'Karma label'; +$txt['karmaApplaudLabel'] = 'Karma applaud label'; +$txt['karmaSmiteLabel'] = 'Karma smite label'; + +$txt['karmadescmod'] = 'Enable Karma Description Mod'; +$txt['karmamaxmembers'] = 'Members per page in Karma Description log'; +$txt['karmalogview'] = 'Use member names as link to their profiles'; +$txt['karmapermiss'] = 'Allow users view Karma Description log (See Permissions)'; +$txt['karmalinks'] = 'Enable karma links in users profiles'; +$txt['karmaisowner'] = 'Disable whole karma log for users but enable own karma log'; +$txt['karmakarma'] = 'Display users karma(+/-) in Karma Description Log'; +$txt['karmaurl'] = 'Enable "Where" field in Karma Description Log'; +$txt['karmaotherstat'] = 'Show other Karma Statistics'; +$txt['karmasurv'] = 'Applaud or smite users without explanation'; +$txt['karmawhatwrite'] = 'Write this in the log, when explanation is disabled'; +$txt['karmacensor'] = 'Censor karma explanation'; +$txt['karmatopicstarter'] = 'Users can change only topic starter karma'; + +$txt['googleMapsEnable'] = 'Enable the Google Member Map'; +$txt['googleMapsEnableLegend'] = 'Show a Pin Legend'; +$txt['googleSidebar'] = 'Where to show sidebar'; +$txt['googleMapsKey'] = 'The key from the Google Maps API Page'; +$txt['googleMapsPinGender'] = 'Should the pins reflect users gender?'; +$txt['googleMapsPinNumber'] = 'Number of max pins to show on map'; +$txt['googleMapsType'] = 'The map type to show'; +$txt['googleMapsDefaultLat'] = 'The default Latitude'; +$txt['googleMapsDefaultLong'] = 'The default Longitude'; +$txt['googleMapsDefaultZoom'] = 'The defualt Zoom'; +$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering'; +$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster'; +$txt['googleMapsMaxVisMarker'] = 'Maximum Visable Pins On Map'; +$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters'; +$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box'; +$txt['googleMapFO'] = 'Member Map'; + +$txt['mods_cat_calendar'] = 'Calendar'; +$txt['cal_enabled'] = 'Enable the calendar'; +$txt['cal_daysaslink'] = 'Show days as links to \'Post Event\''; +$txt['cal_showweeknum'] = 'Show week numbers'; +$txt['cal_days_for_index'] = 'Max days in advance on board index'; +$txt['cal_showholidaysonindex'] = 'Show holidays on board index'; +$txt['cal_showbdaysonindex'] = 'Show birthdays on board index'; +$txt['cal_showeventsonindex'] = 'Show events on board index'; +$txt['cal_defaultboard'] = 'Default board to post events in'; +$txt['cal_minyear'] = 'Minimum year'; +$txt['cal_maxyear'] = 'Maximum year'; +$txt['cal_bdaycolor'] = 'Birthday color'; +$txt['cal_eventcolor'] = 'Event color'; +$txt['cal_holidaycolor'] = 'Holiday color'; +$txt['cal_allowspan'] = 'Allow events to span multiple days'; +$txt['cal_maxspan'] = 'Max number of days an event can span'; + +$txt['recent_topics'] = 'Show recent topics instead of recent posts'; +?> \ No newline at end of file diff --git a/Themes/modern/languages/ModSettings.english.php~ b/Themes/modern/languages/ModSettings.english.php~ new file mode 100644 index 0000000..e2869ef --- /dev/null +++ b/Themes/modern/languages/ModSettings.english.php~ @@ -0,0 +1,202 @@ +theme settings for more options. Click the help icons for more information about a setting.'; +$txt['mods_cat_expand_all'] = '(expand all)'; + +$txt['mods_cat_features'] = 'Basic Forum Features'; +$txt['pollMode'] = 'Poll mode'; +$txt['smf34'] = 'Disable polls'; +$txt['smf32'] = 'Enable polls'; +$txt['smf33'] = 'Show existing polls as topics'; +$txt['enableStickyTopics'] = 'Enable sticky topics'; +$txt['allow_guestAccess'] = 'Allow guests to browse the forum'; +$txt['userLanguage'] = 'Enable user-selectable language support'; +$txt['allow_editDisplayName'] = 'Allow users to edit their displayed name?'; +$txt['allow_hideOnline'] = 'Allow non-administrators to hide their online status?'; +$txt['allow_hideEmail'] = 'Allow users to hide their email from everyone except admins?'; +$txt['guest_hideContacts'] = 'Do not reveal contact details of members to guests'; +$txt['titlesEnable'] = 'Enable custom titles'; +$txt['default_personalText'] = 'Default personal text'; +$txt['max_signatureLength'] = 'Maximum allowed characters in signatures
    (0 for no max.)
    '; +$txt['removeNestedQuotes'] = 'Remove nested quotes when posting'; +$txt['enableEmbeddedFlash'] = 'Embed flash into posts
    (may be a security risk!)
    '; +$txt['enablePostHTML'] = 'Enable basic HTML in posts'; +$txt['disabledBBC'] = 'Disabled BBC Code (comma separated)'; +$txt['enableBBC'] = 'Enable bulletin board code (BBC)'; +$txt['enableNewReplyWarning'] = 'Warn members of new replies made while posting?'; +$txt['max_messageLength'] = 'Maximum allowed characters in posts
    (0 for no max.)
    '; +$txt['number_format'] = 'Default number format'; +$txt['time_format'] = 'Default time format'; +$txt['time_offset'] = 'Overall time offset
    (added to the member specific option.)
    '; +$txt['spamWaitTime'] = 'Seconds required between posts from the same IP'; +$txt['edit_wait_time'] = 'Courtesy edit wait time'; +$txt['failed_login_threshold'] = 'Failed login threshold'; +$txt['lastActive'] = 'User online time threshold'; +$txt['enableSpellChecking'] = 'Enable spell checking
    (this does not work on all servers!)
    '; +$txt['trackStats'] = 'Track daily statistics'; +$txt['hitStats'] = 'Track daily hits (must have stats enabled)'; +$txt['enableCompressedOutput'] = 'Enable compressed output'; +$txt['databaseSession_enable'] = 'Use database driven sessions'; +$txt['databaseSession_loose'] = 'Allow browsers to go back to cached pages'; +$txt['databaseSession_lifetime'] = 'Seconds before an unused session timeout'; +$txt['enableErrorLogging'] = 'Enable error logging'; +$txt['cookieTime'] = 'Default login cookies length (in minutes)'; +$txt['localCookies'] = 'Enable local storage of cookies
    (SSI won\'t work well with this on.)
    '; +$txt['globalCookies'] = 'Use subdomain independent cookies
    (turn off local cookies first!)
    '; +$txt['redirectMetaRefresh'] = 'Use a META redirect instead of HTTP
    (for IIS 4.0 and some Apache versions.)
    '; +$txt['securityDisable'] = 'Disable administration security'; +$txt['registration_method'] = 'Method of registration employed for new members'; +$txt['registration_disabled'] = 'Registration Disabled'; +$txt['registration_standard'] = 'Immediate Registration'; +$txt['registration_activate'] = 'Member Activation'; +$txt['registration_approval'] = 'Member Approval'; +$txt['notify_on_new_registration'] = 'Notify administrators when a new member joins'; +$txt['send_validation_onChange'] = 'Require reactivation after email change'; +$txt['send_welcomeEmail'] = 'Send welcome email to new members'; +$txt['autoOptDatabase'] = 'Optimize tables every how many days?
    (0 to disable.)
    '; +$txt['autoOptMaxOnline'] = 'Maximum users online when optimizing
    (0 for no max.)
    '; +$txt['autoFixDatabase'] = 'Automatically fix broken tables'; +$txt['notifyAnncmnts_UserDisable'] = 'Allow users to disable announcements'; +$txt['modlog_enabled'] = 'Log moderation actions'; +$txt['queryless_urls'] = 'Search engine friendly URLs
    Apache only!
    '; +$txt['maxwidth'] = 'Max width of posted pictures (0 = disable)'; +$txt['maxheight'] = 'Max height of posted pictures (0 = disable)'; +$txt['mail_type'] = 'Mail type'; +$txt['smtp_host'] = 'SMTP server'; +$txt['smtp_port'] = 'SMTP port'; +$txt['smtp_username'] = 'SMTP username'; +$txt['smtp_password'] = 'SMTP password'; +$txt['xmlnews_enable'] = 'Enable XML/RSS news'; +$txt['xmlnews_maxlen'] = 'Maximum post length:
    (0 to disable, bad idea.)
    '; +$txt['recycle_enable'] = 'Enable recycling of deleted topics'; +$txt['recycle_board'] = 'Board for recycled topics'; + +$txt['mods_cat_layout'] = 'Layout and Options'; +$txt['compactTopicPagesEnable'] = 'Limit number of displayed page links'; +$txt['smf235'] = 'Contiguous pages to display:'; +$txt['smf236'] = 'to display'; +$txt['todayMod'] = 'Enable "Today" feature'; +$txt['smf290'] = 'Disabled'; +$txt['smf291'] = 'Only Today'; +$txt['smf292'] = 'Today & Yesterday'; +$txt['topbottomEnable'] = 'Enable Go Up/Go Down buttons'; +$txt['onlineEnable'] = 'Show online/offline in posts and PMs'; +$txt['enableVBStyleLogin'] = 'Show a quick login on every page'; +$txt['autoLinkUrls'] = 'Automatically link posted URLs'; +$txt['fixLongWords'] = 'Break up words with more letters than:
    (0 to disable)
    '; +$txt['defaultMaxTopics'] = 'Maximum topics to display in the message index'; +$txt['defaultMaxMessages'] = 'Maximum messages to display in a topic page'; +$txt['defaultMaxMembers'] = 'Members per page in member list'; +$txt['topicSummaryPosts'] = 'Posts to show on topic summary'; +$txt['enableAllMessages'] = 'Max number of replies in a topic to show "All" posts:
    (0 to never show "All")
    '; +$txt['hotTopicPosts'] = 'Number of posts for a hot topic'; +$txt['hotTopicVeryPosts'] = 'Number of posts for a very hot topic'; +$txt['enableParticipation'] = 'Enable participation icons'; +$txt['enablePreviousNext'] = 'Enable previous/next topic links'; +$txt['timeLoadPageEnable'] = 'Display time taken to create every page'; +$txt['disableHostnameLookup'] = 'Disable hostname lookups?'; +$txt['who_enabled'] = 'Enable who\'s online list'; + +$txt['mods_cat_search'] = 'Search'; +$txt['simpleSearch'] = 'Enable simple search'; +$txt['search_match_complete_words'] = 'Only search for complete word matches'; +$txt['disableTemporaryTables'] = 'Disable temporary tables
    (only check if use of temporary tables is not allowed)
    '; +$txt['search_results_per_page'] = 'Number of search results per page'; +$txt['search_cache_size'] = 'Maximum cached searches
    (0 to disable caching)
    '; +$txt['search_weight_frequency'] = 'Relative search weight for number of matching messages within a topic'; +$txt['search_weight_age'] = 'Relative search weight for age of last matching message'; +$txt['search_weight_length'] = 'Relative search weight for topic length'; +$txt['search_weight_subject'] = 'Relative search weight for a matching subject'; +$txt['search_weight_first_message'] = 'Relative search weight for a first message match'; + +$txt['mods_cat_avatars'] = 'Avatars'; +$txt['avatar_allow_server_stored'] = 'Allow members to select a server-stored avatar'; +$txt['avatar_directory'] = 'Avatars directory'; +$txt['avatar_url'] = 'Avatars URL'; +$txt['avatar_allow_external_url'] = 'Allow members to select an external avatar (using a URL)'; +$txt['avatar_max_width_external'] = 'Maximum width external avatar (0 = no limit)'; +$txt['avatar_max_height_external'] = 'Maximum height external avatar (0 = no limit)'; +$txt['avatar_check_size'] = 'Check the avatar size every time it is displayed'; +$txt['avatar_action_too_large'] = 'If the avatar is too large...'; +$txt['option_refuse'] = 'Refuse it'; +$txt['option_html_resize'] = 'Let the HTML resize it'; +$txt['option_download_and_resize'] = 'Download and resize it (requires GD module)'; +$txt['avatar_allow_upload'] = 'Allow members to upload their own avatars'; +$txt['avatar_max_width_upload'] = 'Maximum width of uploaded avatar (0 = no limit)'; +$txt['avatar_max_height_upload'] = 'Maximum height of uploaded avatar (0 = no limit)'; +$txt['avatar_resize_upload'] = 'Resize oversized large avatars (requires GD module)'; +$txt['avatar_download_png'] = 'Use PNG for resized avatars?'; + +$txt['smf294'] = 'Attachments'; +$txt['attachmentEnable'] = 'Attachments mode'; +$txt['smf111'] = 'Disable attachments|Enable all attachments|Disable new attachments'; +$txt['attachmentCheckExtensions'] = 'Check attachment\'s extension'; +$txt['attachmentExtensions'] = 'Allowed attachment extensions'; +$txt['attachmentShowImages'] = 'Display image attachments as pictures under post'; +$txt['attachmentEncryptFilenames'] = 'Encrypt stored filenames'; +$txt['attachmentUploadDir'] = 'Attachments directory'; +$txt['attachmentDirSizeLimit'] = 'Max attachment folder space (in KB)'; +$txt['attachmentPostLimit'] = 'Max attachment size per post (in KB)'; +$txt['attachmentSizeLimit'] = 'Max size per attachment (in KB)'; +$txt['attachmentNumPerPostLimit'] = 'Max number of attachments per post'; + +$txt['smf293'] = 'Karma'; +$txt['karmaMode'] = 'Karma mode'; +$txt['smf64'] = 'Disable karma|Enable karma total|Enable karma positive/negative'; +$txt['karmaMinPosts'] = 'Set the minimum posts needed to modify karma'; +$txt['karmaWaitTime'] = 'Set wait time in hours'; +$txt['karmaTimeRestrictAdmins'] = 'Restrict administrators to wait time'; +$txt['karmaLabel'] = 'Karma label'; +$txt['karmaApplaudLabel'] = 'Karma applaud label'; +$txt['karmaSmiteLabel'] = 'Karma smite label'; + +$txt['karmadescmod'] = 'Enable Karma Description Mod'; +$txt['karmamaxmembers'] = 'Members per page in Karma Description log'; +$txt['karmalogview'] = 'Use member names as link to their profiles'; +$txt['karmapermiss'] = 'Allow users view Karma Description log (See Permissions)'; +$txt['karmalinks'] = 'Enable karma links in users profiles'; +$txt['karmaisowner'] = 'Disable whole karma log for users but enable own karma log'; +$txt['karmakarma'] = 'Display users karma(+/-) in Karma Description Log'; +$txt['karmaurl'] = 'Enable "Where" field in Karma Description Log'; +$txt['karmaotherstat'] = 'Show other Karma Statistics'; +$txt['karmasurv'] = 'Applaud or smite users without explanation'; +$txt['karmawhatwrite'] = 'Write this in the log, when explanation is disabled'; +$txt['karmacensor'] = 'Censor karma explanation'; +$txt['karmatopicstarter'] = 'Users can change only topic starter karma'; + +$txt['googleMapsEnable'] = 'Enable the Google Member Map'; +$txt['googleMapsEnableLegend'] = 'Show a Pin Legend'; +$txt['googleSidebar'] = 'Where to show sidebar'; +$txt['googleMapsKey'] = 'The key from the Google Maps API Page'; +$txt['googleMapsPinGender'] = 'Should the pins reflect users gender?'; +$txt['googleMapsPinNumber'] = 'Number of max pins to show on map'; +$txt['googleMapsType'] = 'The map type to show'; +$txt['googleMapsDefaultLat'] = 'The default Latitude'; +$txt['googleMapsDefaultLong'] = 'The default Longitude'; +$txt['googleMapsDefaultZoom'] = 'The defualt Zoom'; +$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering'; +$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster'; +$txt['googleMapsMaxVisMarker'] = 'Maximum Visable Pins On Map'; +$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters'; +$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box'; +$txt['googleMapFO'] = 'Member Map'; + +$txt['mods_cat_calendar'] = 'Calendar'; +$txt['cal_enabled'] = 'Enable the calendar'; +$txt['cal_daysaslink'] = 'Show days as links to \'Post Event\''; +$txt['cal_showweeknum'] = 'Show week numbers'; +$txt['cal_days_for_index'] = 'Max days in advance on board index'; +$txt['cal_showholidaysonindex'] = 'Show holidays on board index'; +$txt['cal_showbdaysonindex'] = 'Show birthdays on board index'; +$txt['cal_showeventsonindex'] = 'Show events on board index'; +$txt['cal_defaultboard'] = 'Default board to post events in'; +$txt['cal_minyear'] = 'Minimum year'; +$txt['cal_maxyear'] = 'Maximum year'; +$txt['cal_bdaycolor'] = 'Birthday color'; +$txt['cal_eventcolor'] = 'Event color'; +$txt['cal_holidaycolor'] = 'Holiday color'; +$txt['cal_allowspan'] = 'Allow events to span multiple days'; +$txt['cal_maxspan'] = 'Max number of days an event can span'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/ModSettings.russian.php b/Themes/modern/languages/ModSettings.russian.php new file mode 100644 index 0000000..6dd355c --- /dev/null +++ b/Themes/modern/languages/ModSettings.russian.php @@ -0,0 +1,211 @@ +настройки темы где больше опций. Нажмите иконку помощи, чтобы получить больше информации о настройках.'; +$txt['mods_cat_expand_all'] = '(расширить все)'; + +$txt['mods_cat_features'] = 'Основные Опции Форума'; +$txt['pollMode'] = 'Мод опроса'; +$txt['smf34'] = 'Отключить опросы'; +$txt['smf32'] = 'Включить опросы'; +$txt['smf33'] = 'Показывать существующие опросы как темы'; +$txt['enableStickyTopics'] = 'Включить прикрепленные темы'; +$txt['allow_guestAccess'] = 'Позволить гостям смотреть форум'; +$txt['userLanguage'] = 'Включить выбираемые языки пользователя'; +$txt['allow_editDisplayName'] = 'Позволить пользователям редактировать их отображаемые имена?'; +$txt['allow_hideOnline'] = 'Позволить не администраторам прятать их online статус?'; +$txt['allow_hideEmail'] = 'Разрешить пользователям прятать их email от всех, кроме администратора?'; +$txt['guest_hideContacts'] = 'Не показывать адреса пользователей гостям'; +$txt['titlesEnable'] = 'Включить изменяемый титул'; +$txt['default_personalText'] = 'Персональный текст по умолчанию'; +$txt['max_signatureLength'] = 'Максимум позволенных букв в подписях
    (0 чтоб без ограничений.)
    '; +$txt['removeNestedQuotes'] = 'Удалять угнездившиеся цитаты при вводе сообщений'; +$txt['enableEmbeddedFlash'] = 'Вставлять flash в сообщения
    (есть риск безопасности!)
    '; +$txt['enablePostHTML'] = 'Включить basic HTML в сообщениях'; +$txt['disabledBBC'] = 'Выключенные BBC Коды (разделены запятой)'; +$txt['enableBBC'] = 'Включить bulletin board code (BBC)'; +$txt['enableNewReplyWarning'] = 'Предупреждать участников о новых ответах, сделанных пока они печатали сообщение?'; +$txt['max_messageLength'] = 'Максимальное количество букв в сообщениях
    (0 - без ограничений.)
    '; +$txt['number_format'] = 'Числовой формат по умолчанию'; +$txt['time_format'] = 'Формат времени по умолчанию'; +$txt['time_offset'] = 'Начало отсчета вемени
    (добавлено к определяемым участником опциям.)
    '; +$txt['spamWaitTime'] = 'Количество секунд между сообщениями с одного IP'; +$txt['edit_wait_time'] = 'Аккуратно редактируйте время ожидания'; +$txt['failed_login_threshold'] = 'Порог несработавших входов'; +$txt['lastActive'] = 'Порог времени для присутствующего пользователя'; +$txt['enableSpellChecking'] = 'Включить проверку орфографии
    (Работает не на всех серверах!)
    '; +$txt['trackStats'] = 'Отслеживать ежедневную статистику'; +$txt['hitStats'] = 'Отслеживать ежедневные нажатия (статистика должна быть включена)'; +$txt['enableCompressedOutput'] = 'Включить сжатый трафик'; +$txt['databaseSession_enable'] = 'Использовать ведение сессий Базы Данных'; +$txt['databaseSession_loose'] = 'Разрешить браузерам возвращаться на кэшируемые страницы'; +$txt['databaseSession_lifetime'] = 'Время, которое истекает перед неиспользованной сессией'; +$txt['enableErrorLogging'] = 'Включить лог ошибок'; +$txt['cookieTime'] = 'По умолчанию cookies входа длиной (в минутах)'; +$txt['localCookies'] = 'Включить локальное хранение cookies
    (SSI не будет нормально работать с этим.)
    '; +$txt['globalCookies'] = 'Использовать субдомены независимых cookies
    (отключите локальные cookies сначала!)
    '; +$txt['redirectMetaRefresh'] = 'Использовать META перенаправление вместо HTTP
    (для IIS 4.0 и некоторых Apache версий.)
    '; +$txt['securityDisable'] = 'Отключить безопасность в администрировании'; +$txt['registration_method'] = 'Метод регистрации работающий для новых участников'; +$txt['registration_disabled'] = 'Регистрация Отключена'; +$txt['registration_standard'] = 'Мгновенная Регистрация'; +$txt['registration_activate'] = 'Активация Участников'; +$txt['registration_approval'] = 'Подтверждение Участников'; +$txt['notify_on_new_registration'] = 'Извещать администраторов, когда присоединяется новый участник'; +$txt['send_validation_onChange'] = 'Требовать реактивации, когда меняется email'; +$txt['send_welcomeEmail'] = 'Отправлять приветственный email новым участникам'; +$txt['autoOptDatabase'] = 'Как часто (в днях) оптимизировать таблицы?
    (0 значит отключено.)
    '; +$txt['autoOptMaxOnline'] = 'Максимум пользователей online когда происходит оптимизация
    (0 если без ограничений.)
    '; +$txt['autoFixDatabase'] = 'Автоматически исправлять испорченные таблицы'; +$txt['notifyAnncmnts_UserDisable'] = 'Позволять пользователям отключать объявления'; +$txt['modlog_enabled'] = 'Вести лог действий модератора'; +$txt['queryless_urls'] = 'Поисковый движок дружественных URLs
    Apache только!
    '; +$txt['maxwidth'] = 'Максимальная ширина вставленных картинок (0 = отключено)'; +$txt['maxheight'] = 'Максимальная высота вставленных картинок (0 = отключено)'; +$txt['mail_type'] = 'Тип почты'; +$txt['smtp_host'] = 'SMTP сервер'; +$txt['smtp_port'] = 'SMTP порт'; +$txt['smtp_username'] = 'SMTP имя пользователя'; +$txt['smtp_password'] = 'SMTP пароль'; +$txt['xmlnews_enable'] = 'Включить XML/RSS новости'; +$txt['xmlnews_maxlen'] = 'Максимальная длина сообщения:
    (0 чтоб отключить, плохая идея.)
    '; +$txt['recycle_enable'] = 'Включить восстановление удаленных тем'; +$txt['recycle_board'] = 'Форум для восстановленных тем'; + +$txt['mods_cat_layout'] = 'Внешний вид и Опции'; +$txt['compactTopicPagesEnable'] = 'Ограничить количество отображаемых страниц ссылок'; +$txt['smf235'] = 'Смежные страницы для отображения:'; +$txt['smf236'] = 'для отображения'; +$txt['todayMod'] = 'Включить функцию "Сегодня"'; +$txt['smf290'] = 'Отключено'; +$txt['smf291'] = 'Только Сегодня'; +$txt['smf292'] = 'Сегодня & Вчера'; +$txt['topbottomEnable'] = 'Включить кнопки Вверх/Вниз'; +$txt['onlineEnable'] = 'Показывать в сообщениях и ЛС статус online/offline'; +$txt['enableVBStyleLogin'] = 'Показывать быстрый вход на форум на каждой странице'; +$txt['autoLinkUrls'] = 'Автоматически цеплять напечатанные URLs'; +$txt['fixLongWords'] = 'Разделять слова с количеством букв более чем:
    (0 значит отключить)
    '; +$txt['defaultMaxTopics'] = 'Максимум тем отображаемых на странице'; +$txt['defaultMaxMessages'] = 'Максимум сообщений отображаемых в теме'; +$txt['defaultMaxMembers'] = 'Пользователей на страницу в списке пользователей'; +$txt['topicSummaryPosts'] = 'Отображать сообщений в краткой информации о теме'; +$txt['enableAllMessages'] = 'Максимальное количество ответов в теме при отображения "Всех" сообщений:
    (0 значит никогда не показывать "Все")
    '; +$txt['hotTopicPosts'] = 'Количество сообщений для горячей темы'; +$txt['hotTopicVeryPosts'] = 'Количество сообщений для очень горячей темы'; +$txt['enableParticipation'] = 'Включить иконки участия'; +$txt['enablePreviousNext'] = 'Включить ссылки предыдущая/следующая тема'; +$txt['timeLoadPageEnable'] = 'Отображать время ушедшее на создание каждой страницы'; +$txt['disableHostnameLookup'] = 'Отключить видимость имени хоста?'; +$txt['who_enabled'] = 'Включить список Кто online'; + +$txt['mods_cat_search'] = 'Поиск'; +$txt['simpleSearch'] = 'Включить простой поиск'; +$txt['search_match_complete_words'] = 'Искать только полное совпадение слов'; +$txt['disableTemporaryTables'] = 'Отключить временные таблицы
    (только проверьте, что временные таблицы не разрешены)
    '; +$txt['search_results_per_page'] = 'Количество результатов поиска на страницу'; +$txt['search_cache_size'] = 'Максимум кэшируемых поисков
    (0 чтобы отключить кэширование)
    '; +$txt['search_weight_frequency'] = 'Относительный весовой поиск по количеству подходящих сообщений в теме'; +$txt['search_weight_age'] = 'Относительный весовой поиск по времени создания последнего сообщения'; +$txt['search_weight_length'] = 'Относительный весовой поиск по длине темы'; +$txt['search_weight_subject'] = 'Относительный весовой поиск по подходящей теме'; +$txt['search_weight_first_message'] = 'Относительный весовой поиск по первому сообщению в теме'; + +$txt['mods_cat_avatars'] = 'Аватары'; +$txt['avatar_allow_server_stored'] = 'Позволить пользователям выбирать хранящиеся на сервере аватары'; +$txt['avatar_directory'] = 'Папка аватаров'; +$txt['avatar_url'] = 'URL аватаров'; +$txt['avatar_allow_external_url'] = 'Позволить пользователям выбирать внешний аватар (используя URL)'; +$txt['avatar_max_width_external'] = 'Максимальная ширина внешних аватаров (0 = без ограничений)'; +$txt['avatar_max_height_external'] = 'Максимальная высота внешних аватаров (0 = без ограничений)'; +$txt['avatar_check_size'] = 'Проверять размер аватара каждый раз, когда он отображается'; +$txt['avatar_action_too_large'] = 'Если аватар слишком большой...'; +$txt['option_refuse'] = 'Отбросить его'; +$txt['option_html_resize'] = 'Позволить HTML изменить его размер'; +$txt['option_download_and_resize'] = 'Загрузить и изменить его размер (требуется GD модуль)'; +$txt['avatar_allow_upload'] = 'Позволить участникам загружать их собственные аватары'; +$txt['avatar_max_width_upload'] = 'Максимальная ширина загруженных аватаров (0 = без ограничений)'; +$txt['avatar_max_height_upload'] = 'Максимальная высота загруженных аватаров (0 = без ограничений)'; +$txt['avatar_resize_upload'] = 'Изменить размер слишком больших аватаров (требуется GD модуль)'; +$txt['avatar_download_png'] = 'Использовать PNG для изменения размера аватаров?'; + +$txt['smf294'] = 'Вложения'; +$txt['attachmentEnable'] = 'Мод вложений'; +$txt['smf111'] = 'Отключить вложения|Включить вложения|Отключить новые вложения'; +$txt['attachmentCheckExtensions'] = 'Проверять расширения вложений'; +$txt['attachmentExtensions'] = 'Разрешенные расширения вложений'; +$txt['attachmentShowImages'] = 'Отображать картинку вложений как картинку под сообщением'; +$txt['attachmentEncryptFilenames'] = 'Кодировать хранящиеся имена файлов'; +$txt['attachmentUploadDir'] = 'Папка вложений'; +$txt['attachmentDirSizeLimit'] = 'Максимальный размер папки вложений (в KB)'; +$txt['attachmentPostLimit'] = 'Максимальный размер вложений на одно сообщение (в KB)'; +$txt['attachmentSizeLimit'] = 'Максимальный размер одного вложения (в KB)'; +$txt['attachmentNumPerPostLimit'] = 'Максимальное количество вложений на одно сообщение'; + +$txt['smf293'] = 'Репутация'; +$txt['karmaMode'] = 'Мод репутации'; +$txt['smf64'] = 'Отключить репутацию|Включить репутацию вообще|Отключить репутацию позитивную/негативную'; +$txt['karmaMinPosts'] = 'Установить минимум сообщений необходимый для изменения репутации'; +$txt['karmaWaitTime'] = 'Установить период ожидания в часах'; +$txt['karmaTimeRestrictAdmins'] = 'Ограничивать администраторов по времени ожидания'; +$txt['karmaLabel'] = 'Ярлык репутации'; +$txt['karmaApplaudLabel'] = 'Ярлык улучшения репутации'; +$txt['karmaSmiteLabel'] = 'Ярлык ухудшения репутации'; + +$txt['googleMapsEnable'] = 'Enable the Google Member Map'; +$txt['googleMapsEnableLegend'] = 'Show a Pin Legend'; +$txt['googleSidebar'] = 'Where to show sidebar'; +$txt['googleMapsKey'] = 'The key from the Google Maps API Page'; +$txt['googleMapsPinGender'] = 'Should the pins reflect users gender?'; +$txt['googleMapsPinNumber'] = 'Number of max pins to show on map'; +$txt['googleMapsType'] = 'The map type to show'; +$txt['googleMapsDefaultLat'] = 'The default Latitude'; +$txt['googleMapsDefaultLong'] = 'The default Longitude'; +$txt['googleMapsDefaultZoom'] = 'The defualt Zoom'; +$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering'; +$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster'; +$txt['googleMapsMaxVisMarker'] = 'Maximum Visable Pins On Map'; +$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters'; +$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box'; +$txt['googleMapFO'] = 'Member Map'; + +$txt['mods_cat_calendar'] = 'Календарь'; +$txt['cal_enabled'] = 'Включить календарь'; +$txt['cal_daysaslink'] = 'Показывать дни как ссылку на \'Создать Событие\''; +$txt['cal_showweeknum'] = 'Показывать номера недель'; +$txt['cal_days_for_index'] = 'Максимум дней приближения на главной странице Форума'; +$txt['cal_showholidaysonindex'] = 'Показывать праздники на главной странице Форума'; +$txt['cal_showbdaysonindex'] = 'Показывать дни рождения на главной странице форума'; +$txt['cal_showeventsonindex'] = 'Показывать события на главной странице Форума'; +$txt['cal_defaultboard'] = 'Страница по умолчанию для сообщений о событиях'; +$txt['cal_minyear'] = 'Минимальный год'; +$txt['cal_maxyear'] = 'Максимальный год'; +$txt['cal_bdaycolor'] = 'Цвет дня рождения'; +$txt['cal_eventcolor'] = 'Цвет события'; +$txt['cal_holidaycolor'] = 'Цвет праздника'; +$txt['cal_allowspan'] = 'Позволить длительность события в течении нескольких дней'; +$txt['cal_maxspan'] = 'Максимальное количество дней, которое может длиться событие'; + +$txt['smf293'] = 'Karma'; +$txt['karmaMode'] = 'Karma mode'; +$txt['smf64'] = 'Disable karma|Enable karma total|Enable karma positive/negative'; +$txt['karmaMinPosts'] = 'Set the minimum posts needed to modify karma'; +$txt['karmaWaitTime'] = 'Set wait time in hours'; +$txt['karmaTimeRestrictAdmins'] = 'Restrict administrators to wait time'; +$txt['karmaLabel'] = 'Karma label'; +$txt['karmaApplaudLabel'] = 'Karma applaud label'; +$txt['karmaSmiteLabel'] = 'Karma smite label'; + +$txt['karmadescmod'] = 'Enable Karma Description Mod'; +$txt['karmamaxmembers'] = 'Members per page in Karma Description log'; +$txt['karmalogview'] = 'Use member names as link to their profiles'; +$txt['karmapermiss'] = 'Allow users view Karma Description log (See Permissions)'; +$txt['karmalinks'] = 'Enable karma links in users profiles'; +$txt['karmaisowner'] = 'Disable whole karma log for users but enable own karma log'; +$txt['karmakarma'] = 'Display users karma(+/-) in Karma Description Log'; +$txt['karmaurl'] = 'Enable "Where" field in Karma Description Log'; +$txt['karmaotherstat'] = 'Show other Karma Statistics'; +$txt['karmasurv'] = 'Applaud or smite users without explanation'; +$txt['karmawhatwrite'] = 'Write this in the log, when explanation is disabled'; +$txt['karmacensor'] = 'Censor karma explanation'; +$txt['karmatopicstarter'] = 'Users can change only topic starter karma'; +?> diff --git a/Themes/modern/languages/Modifications.english.php b/Themes/modern/languages/Modifications.english.php new file mode 100644 index 0000000..1862ff3 --- /dev/null +++ b/Themes/modern/languages/Modifications.english.php @@ -0,0 +1,186 @@ +Click here to go place your pin if you have not already.'; +$txt['googleMapDisclaimer'] = 'Place your pin as close as you feel comfortable doing so.'; +$txt['cannot_googleMap_view'] = 'Sorry, you\'re not allowed to view the Member Map.'; +$txt['permissionname_googleMap_view'] = 'View Member Map'; +$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map. If not set, the people will not see the map.'; +$txt['cannot_googleMap_place'] = 'Sorry, you\'re not allowed to place a pin for the Member Map.'; +$txt['permissionname_googleMap_place'] = 'Place Pin on Member Map'; +$txt['permissionhelp_googleMap_place'] = 'Allow the people place there pin the Member Map. If not set, the people will not be able to place there pins.'; + +// Now Playing Mod +$txt['nowplaying1'] = "Now Playing"; +$txt['nowplaying2'] = "Now Playing: What are you listening to? [optional]"; +$txt['nowplaying3'] = "Now Playing: "; +$txt['nowplayingEnabled'] = "Enable 'Now Playing'?"; +$txt['nowplaying_image'] = "Now Playing Image: "; +$txt['nowplaying_text'] = "Now Playing Text: "; + +// OB - Googlebot - Begin + +// Boardindex Strings +$txt['ob_googlebot_modname'] = 'Googlebot & Spiders'; +$txt['ob_googlebot_spider'] = 'Spider'; +$txt['ob_googlebot_spiders'] = 'Spiders'; +$txt['ob_googlebot_spiders_last_active'] = 'Spiders active in past ' . $modSettings['lastActive'] . ' minutes'; + +// ModSettings +$txt['ob_googlebot_count_all_instances'] = 'Count all instances of same spider'; +$txt['ob_googlebot_display_all_instances'] = 'Display all instances of same spider
    ("' . $txt['ob_googlebot_count_all_instances'] . '" must be selected)
    '; +$txt['ob_googlebot_display_agent'] = 'Display agent instead of name'; +$txt['ob_googlebot_display_own_list'] = 'Display spiders in its own list'; +$txt['ob_googlebot_count_most_online'] = 'Count in "Most Online"'; + +// Permissions +$txt['permissiongroup_googlebot'] = $txt['ob_googlebot_modname']; +$txt['permissionname_googlebot_view'] = 'View Googlebot & Spiders'; + +// OB - Googlebot - End + +$txt['visual_warning_mod']='Visual Warning Mod'; +$txt['visualw_mess_ban']='Message To Show For Banned User'; +$txt['visualw_mess_mute']='Message To Show For Muted User'; +$txt['visualw_mess_pmod']='Message To Show For Post Moderated User'; +$txt['visualw_mess_warn']='Message To Show For Warned User'; +$txt['visualw_color_ban']='Color of Message For Banned User'; +$txt['visualw_color_mute']='Color of Message For Muted User'; +$txt['visualw_color_pmod']='Color of Message For Post Moderated User'; +$txt['visualw_color_warn']='Color of Message For Warned User'; +$txt['visualw_image_ban']='Image to Show For Banned User'; +$txt['visualw_image_mute']='Image to Show For Muted User'; +$txt['visualw_image_pmod']='Image to Show For Post Moderated User'; +$txt['visualw_image_warn']='Image to Show For Warned User'; +$txt['warningAutoTime']='Default Time Before Warning Removed (Days):'; +$txt['moderationAutoTime']='Default Time Before Moderation Removed (Days):'; +$txt['muteAutoTime']='Default Time Before Mute Removed (Days):'; +$txt['visualw_pmod_edit']='Moderated Users May Edit Messages:'; +$txt['visual_require_mod'] = 'messages require moderation'; +$txt['visual_raise']='Raise Warning Level'; +$txt['visual_no_perm']='You Do Not Have Permission To Raise Warning Levels'; +$txt['visual_no_warnings']='User has NO Current Warnings!'; +$txt['visual_prev_warning']='Previous Warning Details'; +$txt['visual_current_level']='Current Level:'; +$txt['visual_topic_raised']='Topic Where Raised:'; +$txt['visual_time_raised']='Time When Raised:'; +$txt['visual_reason_raised']='Reason For Raise:'; +$txt['visual_level_details']='New Level Details'; +$txt['visual_submit']='Submit'; +$txt['visual_new_level']='New Level:'; +$txt['visual_warning_management']='Warning Management'; +$txt['visual_list_desc']='This lists all users that currently have some form of warning (levels 1,2 or 3. Level 4 is not listed as these members have already been banned! You can choose to mass reduce members here or click the member to adjust level accordingly'; +$txt['visual_member']='Member'; +$txt['visual_level']='Level'; +$txt['visual_reason']='Reason'; +$txt['visual_when']='When'; +$txt['visual_text_warn']='Warned'; +$txt['visual_warn']='Warn'; +$txt['visual_perm_modify']='You Do Not Have Permission To Modify This Message'; +$txt['visual_official_warning']='You Have Received an Offical Warning'; +$txt['visual_received_warning']='You have received a warning for recent conduct on our message board. Please follow the link below for more information:'; +$txt['visual_been_muted']='You Have Been Muted Due To Bad Behaviour'; +$txt['visual_no_karma']='You May Not Give Karma Whilst Warned'; +$txt['visual_stages']='(0=None, 1=Warned, 2=Moderated, 3=Muted. 4=Banned)'; +$txt['visual_text_pmod']='Moderated'; +$txt['visual_text_mute']='Muted'; +$txt['visual_text_ban']='Banned'; +$txt['visual_none']='None'; +$txt['visual_warning_increased']='I have to inform you that your warning level on the board has been increased.'; +$txt['visual_warning_reduced']='I am pleased to announce that your warning level on the board has been reduced.'; +$txt['visual_reduced']='Warning level reduced'; +$txt['visual_lasts']='Time Warning Lasts (Blank=Default)'; +$txt['visual_postmod_manager']='Post Moderation Manager'; +$txt['visual_postmod_user_under']='This User Is Currently Having All Theirs Posts Approved Before Posting'; +$txt['visual_postmod_under']='You Are Currently Under Post Moderation'; +$txt['visual_postmod_not']='This User Is Not Post Moderated'; +$txt['visual_postmod_is']='This User Is Post Moderated'; +$txt['visual_postmod_change']='Change This User\'s Status'; +$txt['visual_postmod']='Post Moderation'; +$txt['visual_postmod_auth']='You are not authorised to perform this action!'; +$txt['visual_postmod_appear']='You Are Currently Under Post Moderation - Your Post Will Appear After Approval'; +$txt['visual_postmod_awaiting']='These are all the posts awaiting moderation. To approve a posts (or posts) check all the messages you wish to approve and select "Approve" to delete messages off select those messages you wish to delete and select "Delete"'; +$txt['visual_postmod_username']='Username'; +$txt['visual_postmod_subject']='Subject/Message'; +$txt['visual_postmod_approve']='Approve'; +$txt['visual_postmod_delete']='Delete'; +$txt['permissiongroup_visual_warn']='Give warnings and perform post moderation'; +$txt['permissionname_visual_warn_any']='Warn users'; +$txt['permissionname_visual_approve_any']='Approve posts'; +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +//Begin Profile Comments Text Strings + +//Permissions +$txt['permissiongroup_pcomments'] = 'Profile Comments'; +$txt['permissionname_pcomments_view'] = 'View Comments'; +$txt['permissionhelp_pcomments_view'] = 'If the user is allowed to view user comments.'; +$txt['permissionname_pcomments_add'] = 'Allow add Comments'; +$txt['permissionhelp_pcomments_add'] = 'If the user is allowed to enter comments in others profile.'; +$txt['permissionname_pcomments_edit_own'] = 'Edit own comment.'; +$txt['permissionhelp_pcomments_edit_own'] = 'Allows the user to edit their own comments.'; +$txt['permissionname_pcomments_edit_any'] = 'Edit any comment'; +$txt['permissionhelp_pcomments_edit_any'] = 'Allows the user to edit any comments.'; +$txt['permissionname_pcomments_delete_own'] = 'Delete own comment.'; +$txt['permissionhelp_pcomments_delete_own'] = 'Allows the user to delete their own comments.'; +$txt['permissionname_pcomments_delete_any'] = 'Delete any comment'; +$txt['permissionhelp_pcomments_delete_any'] = 'Allows the user to delete any comments.'; +$txt['cannot_pcomments_add'] = 'You are not allowed to add comments.'; +$txt['cannot_pcomments_edit_own'] = 'You are not allowed to edit your own comment.'; +$txt['cannot_pcomments_edit_any'] = 'You are not allowed to edit any comment.'; +$txt['cannot_pcomments_delete_own'] = 'You are not allowed to delete own comment.'; +$txt['cannot_pcomments_delete_any'] = 'You are not allowed to delete any comment.'; +$txt['permissionname_pcomments_autocomment'] = 'Auto Approve Comments'; +$txt['permissionhelp_pcomments_autocomment'] = 'Comments do not need to wait for approval.'; +// Profile Comments Profile.template.php text strings +$txt['pcomments_usercomments'] = 'User Comments'; +$txt['pcomments_editcomment'] = '[Edit Comment]'; +$txt['pcomments_delcomment'] = '[Delete Comment]'; +$txt['pcomments_addcomment'] = 'Add Comment'; +$txt['pcomments_admin'] = 'Profile Comments'; +$txt['pcomments_text_pages'] = 'Pages: '; +//END Profile Comments Text Strings + +//Begin Profile Comments Text Strings + +//Permissions +$txt['permissiongroup_pcomments'] = 'Profile Comments'; +$txt['permissionname_pcomments_view'] = 'View Comments'; +$txt['permissionhelp_pcomments_view'] = 'If the user is allowed to view user comments.'; +$txt['permissionname_pcomments_add'] = 'Allow add Comments'; +$txt['permissionhelp_pcomments_add'] = 'If the user is allowed to enter comments in others profile.'; +$txt['permissionname_pcomments_edit_own'] = 'Edit own comment.'; +$txt['permissionhelp_pcomments_edit_own'] = 'Allows the user to edit their own comments.'; +$txt['permissionname_pcomments_edit_any'] = 'Edit any comment'; +$txt['permissionhelp_pcomments_edit_any'] = 'Allows the user to edit any comments.'; +$txt['permissionname_pcomments_delete_own'] = 'Delete own comment.'; +$txt['permissionhelp_pcomments_delete_own'] = 'Allows the user to delete their own comments.'; +$txt['permissionname_pcomments_delete_any'] = 'Delete any comment'; +$txt['permissionhelp_pcomments_delete_any'] = 'Allows the user to delete any comments.'; +$txt['cannot_pcomments_add'] = 'You are not allowed to add comments.'; +$txt['cannot_pcomments_edit_own'] = 'You are not allowed to edit your own comment.'; +$txt['cannot_pcomments_edit_any'] = 'You are not allowed to edit any comment.'; +$txt['cannot_pcomments_delete_own'] = 'You are not allowed to delete own comment.'; +$txt['cannot_pcomments_delete_any'] = 'You are not allowed to delete any comment.'; +$txt['permissionname_pcomments_autocomment'] = 'Auto Approve Comments'; +$txt['permissionhelp_pcomments_autocomment'] = 'Comments do not need to wait for approval.'; +// Profile Comments Profile.template.php text strings +$txt['pcomments_usercomments'] = 'User Comments'; +$txt['pcomments_editcomment'] = '[Edit Comment]'; +$txt['pcomments_delcomment'] = '[Delete Comment]'; +$txt['pcomments_addcomment'] = 'Add Comment'; +$txt['pcomments_admin'] = 'Profile Comments'; +$txt['pcomments_text_pages'] = 'Pages: '; +//END Profile Comments Text Strings + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Modifications.english.php~ b/Themes/modern/languages/Modifications.english.php~ new file mode 100644 index 0000000..ad38e5f --- /dev/null +++ b/Themes/modern/languages/Modifications.english.php~ @@ -0,0 +1,218 @@ +Click here to go place your pin if you have not already.'; +$txt['googleMapDisclaimer'] = 'Place your pin as close as you feel comfortable doing so.'; +$txt['cannot_googleMap_view'] = 'Sorry, you\'re not allowed to view the Member Map.'; +$txt['permissionname_googleMap_view'] = 'View Member Map'; +$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map. If not set, the people will not see the map.'; +$txt['cannot_googleMap_place'] = 'Sorry, you\'re not allowed to place a pin for the Member Map.'; +$txt['permissionname_googleMap_place'] = 'Place Pin on Member Map'; +$txt['permissionhelp_googleMap_place'] = 'Allow the people place there pin the Member Map. If not set, the people will not be able to place there pins.'; + +// Now Playing Mod +$txt['nowplaying1'] = "Now Playing"; +$txt['nowplaying2'] = "Now Playing: What are you listening to? [optional]"; +$txt['nowplaying3'] = "Now Playing: "; +$txt['nowplayingEnabled'] = "Enable 'Now Playing'?"; +$txt['nowplaying_image'] = "Now Playing Image: "; +$txt['nowplaying_text'] = "Now Playing Text: "; + +// OB - Googlebot - Begin + +// Boardindex Strings +$txt['ob_googlebot_modname'] = 'Googlebot & Spiders'; +$txt['ob_googlebot_spider'] = 'Spider'; +$txt['ob_googlebot_spiders'] = 'Spiders'; +$txt['ob_googlebot_spiders_last_active'] = 'Spiders active in past ' . $modSettings['lastActive'] . ' minutes'; + +// ModSettings +$txt['ob_googlebot_count_all_instances'] = 'Count all instances of same spider'; +$txt['ob_googlebot_display_all_instances'] = 'Display all instances of same spider
    ("' . $txt['ob_googlebot_count_all_instances'] . '" must be selected)
    '; +$txt['ob_googlebot_display_agent'] = 'Display agent instead of name'; +$txt['ob_googlebot_display_own_list'] = 'Display spiders in its own list'; +$txt['ob_googlebot_count_most_online'] = 'Count in "Most Online"'; + +// Permissions +$txt['permissiongroup_googlebot'] = $txt['ob_googlebot_modname']; +$txt['permissionname_googlebot_view'] = 'View Googlebot & Spiders'; + +// OB - Googlebot - End + +$txt['visual_warning_mod']='Visual Warning Mod'; +$txt['visualw_mess_ban']='Message To Show For Banned User'; +$txt['visualw_mess_mute']='Message To Show For Muted User'; +$txt['visualw_mess_pmod']='Message To Show For Post Moderated User'; +$txt['visualw_mess_warn']='Message To Show For Warned User'; +$txt['visualw_color_ban']='Color of Message For Banned User'; +$txt['visualw_color_mute']='Color of Message For Muted User'; +$txt['visualw_color_pmod']='Color of Message For Post Moderated User'; +$txt['visualw_color_warn']='Color of Message For Warned User'; +$txt['visualw_image_ban']='Image to Show For Banned User'; +$txt['visualw_image_mute']='Image to Show For Muted User'; +$txt['visualw_image_pmod']='Image to Show For Post Moderated User'; +$txt['visualw_image_warn']='Image to Show For Warned User'; +$txt['warningAutoTime']='Default Time Before Warning Removed (Days):'; +$txt['moderationAutoTime']='Default Time Before Moderation Removed (Days):'; +$txt['muteAutoTime']='Default Time Before Mute Removed (Days):'; +$txt['visualw_pmod_edit']='Moderated Users May Edit Messages:'; +$txt['visual_require_mod'] = 'messages require moderation'; +$txt['visual_raise']='Raise Warning Level'; +$txt['visual_no_perm']='You Do Not Have Permission To Raise Warning Levels'; +$txt['visual_no_warnings']='User has NO Current Warnings!'; +$txt['visual_prev_warning']='Previous Warning Details'; +$txt['visual_current_level']='Current Level:'; +$txt['visual_topic_raised']='Topic Where Raised:'; +$txt['visual_time_raised']='Time When Raised:'; +$txt['visual_reason_raised']='Reason For Raise:'; +$txt['visual_level_details']='New Level Details'; +$txt['visual_submit']='Submit'; +$txt['visual_new_level']='New Level:'; +$txt['visual_warning_management']='Warning Management'; +$txt['visual_list_desc']='This lists all users that currently have some form of warning (levels 1,2 or 3. Level 4 is not listed as these members have already been banned! You can choose to mass reduce members here or click the member to adjust level accordingly'; +$txt['visual_member']='Member'; +$txt['visual_level']='Level'; +$txt['visual_reason']='Reason'; +$txt['visual_when']='When'; +$txt['visual_text_warn']='Warned'; +$txt['visual_warn']='Warn'; +$txt['visual_perm_modify']='You Do Not Have Permission To Modify This Message'; +$txt['visual_official_warning']='You Have Received an Offical Warning'; +$txt['visual_received_warning']='You have received a warning for recent conduct on our message board. Please follow the link below for more information:'; +$txt['visual_been_muted']='You Have Been Muted Due To Bad Behaviour'; +$txt['visual_no_karma']='You May Not Give Karma Whilst Warned'; +$txt['visual_stages']='(0=None, 1=Warned, 2=Moderated, 3=Muted. 4=Banned)'; +$txt['visual_text_pmod']='Moderated'; +$txt['visual_text_mute']='Muted'; +$txt['visual_text_ban']='Banned'; +$txt['visual_none']='None'; +$txt['visual_warning_increased']='I have to inform you that your warning level on the board has been increased.'; +$txt['visual_warning_reduced']='I am pleased to announce that your warning level on the board has been reduced.'; +$txt['visual_reduced']='Warning level reduced'; +$txt['visual_lasts']='Time Warning Lasts (Blank=Default)'; +$txt['visual_postmod_manager']='Post Moderation Manager'; +$txt['visual_postmod_user_under']='This User Is Currently Having All Theirs Posts Approved Before Posting'; +$txt['visual_postmod_under']='You Are Currently Under Post Moderation'; +$txt['visual_postmod_not']='This User Is Not Post Moderated'; +$txt['visual_postmod_is']='This User Is Post Moderated'; +$txt['visual_postmod_change']='Change This User\'s Status'; +$txt['visual_postmod']='Post Moderation'; +$txt['visual_postmod_auth']='You are not authorised to perform this action!'; +$txt['visual_postmod_appear']='You Are Currently Under Post Moderation - Your Post Will Appear After Approval'; +$txt['visual_postmod_awaiting']='These are all the posts awaiting moderation. To approve a posts (or posts) check all the messages you wish to approve and select "Approve" to delete messages off select those messages you wish to delete and select "Delete"'; +$txt['visual_postmod_username']='Username'; +$txt['visual_postmod_subject']='Subject/Message'; +$txt['visual_postmod_approve']='Approve'; +$txt['visual_postmod_delete']='Delete'; +$txt['permissiongroup_visual_warn']='Give warnings and perform post moderation'; +$txt['permissionname_visual_warn_any']='Warn users'; +$txt['permissionname_visual_approve_any']='Approve posts'; +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +$txt['non_sticky_topics'] = "Regular topics"; +$txt['sticky_topics'] = "Sticky topics"; + +//Begin Profile Comments Text Strings + +//Permissions +$txt['permissiongroup_pcomments'] = 'Profile Comments'; +$txt['permissionname_pcomments_view'] = 'View Comments'; +$txt['permissionhelp_pcomments_view'] = 'If the user is allowed to view user comments.'; +$txt['permissionname_pcomments_add'] = 'Allow add Comments'; +$txt['permissionhelp_pcomments_add'] = 'If the user is allowed to enter comments in others profile.'; +$txt['permissionname_pcomments_edit_own'] = 'Edit own comment.'; +$txt['permissionhelp_pcomments_edit_own'] = 'Allows the user to edit their own comments.'; +$txt['permissionname_pcomments_edit_any'] = 'Edit any comment'; +$txt['permissionhelp_pcomments_edit_any'] = 'Allows the user to edit any comments.'; +$txt['permissionname_pcomments_delete_own'] = 'Delete own comment.'; +$txt['permissionhelp_pcomments_delete_own'] = 'Allows the user to delete their own comments.'; +$txt['permissionname_pcomments_delete_any'] = 'Delete any comment'; +$txt['permissionhelp_pcomments_delete_any'] = 'Allows the user to delete any comments.'; +$txt['cannot_pcomments_add'] = 'You are not allowed to add comments.'; +$txt['cannot_pcomments_edit_own'] = 'You are not allowed to edit your own comment.'; +$txt['cannot_pcomments_edit_any'] = 'You are not allowed to edit any comment.'; +$txt['cannot_pcomments_delete_own'] = 'You are not allowed to delete own comment.'; +$txt['cannot_pcomments_delete_any'] = 'You are not allowed to delete any comment.'; +$txt['permissionname_pcomments_autocomment'] = 'Auto Approve Comments'; +$txt['permissionhelp_pcomments_autocomment'] = 'Comments do not need to wait for approval.'; +// Profile Comments Profile.template.php text strings +$txt['pcomments_usercomments'] = 'User Comments'; +$txt['pcomments_editcomment'] = '[Edit Comment]'; +$txt['pcomments_delcomment'] = '[Delete Comment]'; +$txt['pcomments_addcomment'] = 'Add Comment'; +$txt['pcomments_admin'] = 'Profile Comments'; +$txt['pcomments_text_pages'] = 'Pages: '; +//END Profile Comments Text Strings + +//Begin Profile Comments Text Strings + +//Permissions +$txt['permissiongroup_pcomments'] = 'Profile Comments'; +$txt['permissionname_pcomments_view'] = 'View Comments'; +$txt['permissionhelp_pcomments_view'] = 'If the user is allowed to view user comments.'; +$txt['permissionname_pcomments_add'] = 'Allow add Comments'; +$txt['permissionhelp_pcomments_add'] = 'If the user is allowed to enter comments in others profile.'; +$txt['permissionname_pcomments_edit_own'] = 'Edit own comment.'; +$txt['permissionhelp_pcomments_edit_own'] = 'Allows the user to edit their own comments.'; +$txt['permissionname_pcomments_edit_any'] = 'Edit any comment'; +$txt['permissionhelp_pcomments_edit_any'] = 'Allows the user to edit any comments.'; +$txt['permissionname_pcomments_delete_own'] = 'Delete own comment.'; +$txt['permissionhelp_pcomments_delete_own'] = 'Allows the user to delete their own comments.'; +$txt['permissionname_pcomments_delete_any'] = 'Delete any comment'; +$txt['permissionhelp_pcomments_delete_any'] = 'Allows the user to delete any comments.'; +$txt['cannot_pcomments_add'] = 'You are not allowed to add comments.'; +$txt['cannot_pcomments_edit_own'] = 'You are not allowed to edit your own comment.'; +$txt['cannot_pcomments_edit_any'] = 'You are not allowed to edit any comment.'; +$txt['cannot_pcomments_delete_own'] = 'You are not allowed to delete own comment.'; +$txt['cannot_pcomments_delete_any'] = 'You are not allowed to delete any comment.'; +$txt['permissionname_pcomments_autocomment'] = 'Auto Approve Comments'; +$txt['permissionhelp_pcomments_autocomment'] = 'Comments do not need to wait for approval.'; +// Profile Comments Profile.template.php text strings +$txt['pcomments_usercomments'] = 'User Comments'; +$txt['pcomments_editcomment'] = '[Edit Comment]'; +$txt['pcomments_delcomment'] = '[Delete Comment]'; +$txt['pcomments_addcomment'] = 'Add Comment'; +$txt['pcomments_admin'] = 'Profile Comments'; +$txt['pcomments_text_pages'] = 'Pages: '; +//END Profile Comments Text Strings + +//Begin Profile Comments Text Strings + +//Permissions +$txt['permissiongroup_pcomments'] = 'Profile Comments'; +$txt['permissionname_pcomments_view'] = 'View Comments'; +$txt['permissionhelp_pcomments_view'] = 'If the user is allowed to view user comments.'; +$txt['permissionname_pcomments_add'] = 'Allow add Comments'; +$txt['permissionhelp_pcomments_add'] = 'If the user is allowed to enter comments in others profile.'; +$txt['permissionname_pcomments_edit_own'] = 'Edit own comment.'; +$txt['permissionhelp_pcomments_edit_own'] = 'Allows the user to edit their own comments.'; +$txt['permissionname_pcomments_edit_any'] = 'Edit any comment'; +$txt['permissionhelp_pcomments_edit_any'] = 'Allows the user to edit any comments.'; +$txt['permissionname_pcomments_delete_own'] = 'Delete own comment.'; +$txt['permissionhelp_pcomments_delete_own'] = 'Allows the user to delete their own comments.'; +$txt['permissionname_pcomments_delete_any'] = 'Delete any comment'; +$txt['permissionhelp_pcomments_delete_any'] = 'Allows the user to delete any comments.'; +$txt['cannot_pcomments_add'] = 'You are not allowed to add comments.'; +$txt['cannot_pcomments_edit_own'] = 'You are not allowed to edit your own comment.'; +$txt['cannot_pcomments_edit_any'] = 'You are not allowed to edit any comment.'; +$txt['cannot_pcomments_delete_own'] = 'You are not allowed to delete own comment.'; +$txt['cannot_pcomments_delete_any'] = 'You are not allowed to delete any comment.'; +$txt['permissionname_pcomments_autocomment'] = 'Auto Approve Comments'; +$txt['permissionhelp_pcomments_autocomment'] = 'Comments do not need to wait for approval.'; +// Profile Comments Profile.template.php text strings +$txt['pcomments_usercomments'] = 'User Comments'; +$txt['pcomments_editcomment'] = '[Edit Comment]'; +$txt['pcomments_delcomment'] = '[Delete Comment]'; +$txt['pcomments_addcomment'] = 'Add Comment'; +$txt['pcomments_admin'] = 'Profile Comments'; +$txt['pcomments_text_pages'] = 'Pages: '; +//END Profile Comments Text Strings + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Modifications.russian.php b/Themes/modern/languages/Modifications.russian.php new file mode 100644 index 0000000..b90a412 --- /dev/null +++ b/Themes/modern/languages/Modifications.russian.php @@ -0,0 +1,146 @@ +Добавьте себя на карту'; +$txt['googleMapDisclaimer'] = 'Щелкните мышкой по карте, чтобы поставить метку в любом понравившемся Вам месте (подразумевается, что это место, где Вы живёте). Чтобы убрать метку, щёлкните по ней мышкой.'; +$txt['cannot_googleMap_view'] = 'Извините, Вам нельзя смотреть карту'; +$txt['permissionname_googleMap_view'] = 'Смотреть карту'; +$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map. If not set, the people will not see the map.'; +$txt['cannot_googleMap_place'] = 'Извините, Вам не разрешено ставить своб метку на карте'; +$txt['permissionname_googleMap_place'] = 'Ставить метку на карте'; +$txt['permissionhelp_googleMap_place'] = 'Allow the people place there pin the Member Map. If not set, the people will not be able to place there pins.'; + +// Now Playing Mod +$txt['nowplaying1'] = "Now Playing"; +$txt['nowplaying2'] = "В колонках: Что вы сейчас слушаете? [заполнять необязательно]"; +$txt['nowplaying3'] = "В колонках: "; +$txt['nowplayingEnabled'] = "Enable 'Now Playing'?"; +$txt['nowplaying_image'] = "Now Playing Image: "; +$txt['nowplaying_text'] = "Now Playing Text: "; + +// OB - Googlebot - Begin + +// Boardindex Strings +$txt['ob_googlebot_modname'] = 'Роботы'; +$txt['ob_googlebot_spider'] = 'Spider'; +$txt['ob_googlebot_spiders'] = 'Spiders'; +$txt['ob_googlebot_spiders_last_active'] = 'Spiders active in past ' . $modSettings['lastActive'] . ' minutes'; + +// ModSettings +$txt['ob_googlebot_count_all_instances'] = 'Count all instances of same spider'; +$txt['ob_googlebot_display_all_instances'] = 'Display all instances of same spider
    ("' . $txt['ob_googlebot_count_all_instances'] . '" must be selected)
    '; +$txt['ob_googlebot_display_agent'] = 'Display agent instead of name'; +$txt['ob_googlebot_display_own_list'] = 'Display spiders in its own list'; +$txt['ob_googlebot_count_most_online'] = 'Count in "Most Online"'; + +// Permissions +$txt['permissiongroup_googlebot'] = $txt['ob_googlebot_modname']; +$txt['permissionname_googlebot_view'] = 'View Googlebot & Spiders'; + +// OB - Googlebot - End +$txt['visual_warning_mod']='Visual Warning Mod'; +$txt['visualw_mess_ban']='Message To Show For Banned User'; +$txt['visualw_mess_mute']='Message To Show For Muted User'; +$txt['visualw_mess_pmod']='Message To Show For Post Moderated User'; +$txt['visualw_mess_warn']='Message To Show For Warned User'; +$txt['visualw_color_ban']='Color of Message For Banned User'; +$txt['visualw_color_mute']='Color of Message For Muted User'; +$txt['visualw_color_pmod']='Color of Message For Post Moderated User'; +$txt['visualw_color_warn']='Color of Message For Warned User'; +$txt['visualw_image_ban']='Image to Show For Banned User'; +$txt['visualw_image_mute']='Image to Show For Muted User'; +$txt['visualw_image_pmod']='Image to Show For Post Moderated User'; +$txt['visualw_image_warn']='Image to Show For Warned User'; +$txt['warningAutoTime']='Default Time Before Warning Removed (Days):'; +$txt['moderationAutoTime']='Default Time Before Moderation Removed (Days):'; +$txt['muteAutoTime']='Default Time Before Mute Removed (Days):'; +$txt['visualw_pmod_edit']='Moderated Users May Edit Messages:'; +$txt['visual_require_mod'] = 'messages require moderation'; +$txt['visual_raise']='Raise Warning Level'; +$txt['visual_no_perm']='You Do Not Have Permission To Raise Warning Levels'; +$txt['visual_no_warnings']='User has NO Current Warnings!'; +$txt['visual_prev_warning']='Previous Warning Details'; +$txt['visual_current_level']='Current Level:'; +$txt['visual_topic_raised']='Topic Where Raised:'; +$txt['visual_time_raised']='Time When Raised:'; +$txt['visual_reason_raised']='Reason For Raise:'; +$txt['visual_level_details']='New Level Details'; +$txt['visual_submit']='Submit'; +$txt['visual_new_level']='New Level:'; +$txt['visual_warning_management']='Warning Management'; +$txt['visual_list_desc']='This lists all users that currently have some form of warning (levels 1,2 or 3. Level 4 is not listed as these members have already been banned! You can choose to mass reduce members here or click the member to adjust level accordingly'; +$txt['visual_member']='Member'; +$txt['visual_level']='Уровень'; +$txt['visual_reason']='Причина'; +$txt['visual_when']='Когда'; +$txt['visual_text_warn']='Предупреждение'; +$txt['visual_warn']='Warn'; +$txt['visual_perm_modify']='У Вас недостаточно прав, чтобы изменить это сообщение'; +$txt['visual_official_warning']='Вы получили официально предупреждение'; +$txt['visual_received_warning']='На Вас было наложено наказание за следющее сообщение:'; +$txt['visual_been_muted']='Вы были временно переведены в режим "Только чтение"'; +$txt['visual_no_karma']='Вы не можете изменять рейтинг пользоваталей, пока наказаны'; +$txt['visual_stages']='(0=Нет наказания, 1=Предупреждение, 2=Только чтение, 3=Бан)'; +$txt['visual_text_pmod']='Премодерация'; +$txt['visual_text_mute']='Только чтение'; +$txt['visual_text_ban']='Бан'; +$txt['visual_none']='(Нет)'; +$txt['visual_warning_increased']='Мы вынуждены сообщить, что нам пришлось наложить на Вас более строгое наказание.'; +$txt['visual_warning_reduced']='Мы рады сообщить Вам, что Ваше наказание было заменено на менее строгое.'; +$txt['visual_reduced']='Наказание заменено на менее строгое'; +$txt['visual_lasts']='Срок наказания в днях (оставьте пустым для настройки по умолчанию)'; +$txt['visual_postmod_manager']='Post Moderation Manager'; +$txt['visual_postmod_user_under']='This User Is Currently Having All Theirs Posts Approved Before Posting'; +$txt['visual_postmod_under']='You Are Currently Under Post Moderation'; +$txt['visual_postmod_not']='This User Is Not Post Moderated'; +$txt['visual_postmod_is']='This User Is Post Moderated'; +$txt['visual_postmod_change']='Change This User\'s Status'; +$txt['visual_postmod']='Post Moderation'; +$txt['visual_postmod_auth']='You are not authorised to perform this action!'; +$txt['visual_postmod_appear']='You Are Currently Under Post Moderation - Your Post Will Appear After Approval'; +$txt['visual_postmod_awaiting']='These are all the posts awaiting moderation. To approve a posts (or posts) check all the messages you wish to approve and select "Approve" to delete messages off select those messages you wish to delete and select "Delete"'; +$txt['visual_postmod_username']='Username'; +$txt['visual_postmod_subject']='Subject/Message'; +$txt['visual_postmod_approve']='Approve'; +$txt['visual_postmod_delete']='Delete'; +$txt['permissiongroup_visual_warn']='Give warnings and perform post moderation'; +$txt['permissionname_visual_warn_any']='Warn users'; +$txt['permissionname_visual_approve_any']='Approve posts'; + + +$txt['make_first_sticky']='Прикрепить первый пост ко всей теме'; + +$txt['link_topics']='Объединить темы'; +$txt['link_topics_explain']='Темы будут "связаны", и пользователи смогут увидтеть ссылку "Связанные темы" и быстро перейти из одной темы в другую'; +$txt['related_topics']='Смотрите также:'; + + +//Begin CAPTCHA Mod 0.1 +//General Strings +$txt['captchaEnter'] = "Введите пожалуйста код, который Вы видите на картинке"; +$txt['captchaEnterShort'] = "Введите код"; +$txt['captchaWrong'] = "Вы ввели код неправильно.
    К сожалению, Вам придётся вернуться назад и попробовать снова."; +$txt['captchaMaxTries'] = "Вы ввели неверный код слишком много раз, и потому не сможете зарегистрироваться. Если Вы всё же человек, пожалуйста, свяжитесь с нами по электронной почте, и мы Вам поможем."; + +//When posting a reply to a topic +$txt['error_captcha_wrong'] = "Вы ввели неправильный код"; + +//Administration strings +$txt['captchaHeading'] = "CAPTCHA Settings"; +$txt['captchaChars'] = "Number of characters to use for code"; +$txt['captchaMinSize'] = "Minimum Font Size"; +$txt['captchaMaxSize'] = "Maximum Font Size"; +$txt['captchaMaxRotate'] = "Maximum angle for character rotation"; +$txt['captchaNoise'] = "Enable Noise
    enabled = make characters 'noisy' (recommended), disabled = use grid
    "; +$txt['captchaWebSafeColours'] = "Only use web safe colours"; +$txt['captchaBadGuysURL'] = "'Bad Guys' URL
    (when someone tries to avoid the CAPTCHA, they will get redirected here)
    "; + +//Additions in CAPTCHA Mod 0.2 +$txt['captchaReadAndType'] = "Нужно ввести %s символов с картинки. Это могут быть цифры от 0 до 9 и латинские буквы от A до F"; +//End CAPTCHA Mod +?> diff --git a/Themes/modern/languages/Packages.english.php b/Themes/modern/languages/Packages.english.php new file mode 100644 index 0000000..29bf83d --- /dev/null +++ b/Themes/modern/languages/Packages.english.php @@ -0,0 +1,163 @@ +File not found'; +$txt['package_action_error'] = 'Modification parse error'; +$txt['package_action_failure'] = 'Failure'; +$txt['package_action_success'] = 'Success'; + +$txt['package_uninstall_actions'] = 'Uninstall Actions'; +$txt['package_uninstall_done'] = 'The package has been uninstalled, it should no longer take effect.'; +$txt['package_uninstall_cannot'] = 'This package cannot be uninstalled, because there is no uninstaller!

    Please contact the mod author for more information.'; + +$txt['package_install_options'] = 'Installation Options'; +$txt['package_install_options_ftp_why'] = 'Using FTP is the easiest way to get around having to manually chmod the files writable by FTP yourself for the package manager to work.
    Here you can set the default values for some fields.'; +$txt['package_install_options_ftp_server'] = 'FTP Server'; +$txt['package_install_options_ftp_port'] = 'Port'; +$txt['package_install_options_ftp_user'] = 'Username'; +$txt['package_install_options_make_backups'] = 'Create Backup versions of replaced files with a tilda (~) on the end of their names.'; + +$txt['package_ftp_necessary'] = 'FTP Information Required'; +$txt['package_ftp_why'] = 'Some of the files this package needs to modify are not writable. This needs to be changed by logging into FTP and chmoding the files.'; +$txt['package_ftp_why_download'] = 'To download packages, the Packages directory and files in it need to be writable - and they are not currently. The package manager can use your FTP information to fix this.'; +$txt['package_ftp_server'] = 'FTP Server'; +$txt['package_ftp_port'] = 'Port'; +$txt['package_ftp_username'] = 'Username'; +$txt['package_ftp_password'] = 'Password'; +$txt['package_ftp_path'] = 'Local path to SMF'; + +// For a break, use \\n instead of
    ... and don't use entities. +$txt['package_delete_bad'] = 'The package you are about to delete is currently installed! If you delete it, you may not be able to uninstall it later.\\n\\nAre you sure?'; + +$txt['package_examine_file'] = 'View file in package'; +$txt['package_file_contents'] = 'Contents of file'; + +$txt['package_upload_title'] = 'Upload a Package'; +$txt['package_upload_select'] = 'Package to Upload'; +$txt['package_upload'] = 'Upload'; +$txt['package_upload_error_supports'] = 'The package manager currently allows only these file types: '; +$txt['package_upload_error_broken'] = 'The package you tried to upload either is not a valid package or has become corrupted.'; +$txt['package_uploaded_success'] = 'Package uploaded successfully'; +$txt['package_uploaded_successfully'] = 'The package has been uploaded successfully'; + +$txt['package_modification_malformed'] = 'Malformed or invalid modification file.'; +$txt['package_modification_missing'] = 'The file could not be found.'; +$txt['package_no_zlib'] = 'Sorry, your PHP configuration doesn\'t have support for zlib. Without this, the package manager cannot function. Please contact your host about this for more information.'; + +//Begin CAPTCHA Mod 0.1 + //General Strings + $txt['captchaEnter'] = "Please enter the code as shown"; + $txt['captchaEnterShort'] = "Enter Code"; + $txt['captchaWrong'] = "Sorry, you didn't enter the correct code.
    You must go back, refresh the page, and enter the new code!"; + $txt['captchaMaxTries'] = "Sorry, you've entered the code wrong too many times. Registration cannot continue."; + + //When posting a reply to a topic + $txt['error_captcha_wrong'] = "The code was entered incorrectly."; + + //Administration strings + $txt['captchaHeading'] = "CAPTCHA Settings"; + $txt['captchaChars'] = "Number of characters to use for code"; + $txt['captchaMinSize'] = "Minimum Font Size"; + $txt['captchaMaxSize'] = "Maximum Font Size"; + $txt['captchaMaxRotate'] = "Maximum angle for character rotation"; + $txt['captchaNoise'] = "Enable Noise
    enabled = make characters 'noisy' (recommended), disabled = use grid
    "; + $txt['captchaWebSafeColours'] = "Only use web safe colours"; + $txt['captchaBadGuysURL'] = "'Bad Guys' URL
    (when someone tries to avoid the CAPTCHA, they will get redirected here)
    "; + + //Additions in CAPTCHA Mod 0.2 + $txt['captchaReadAndType'] = "You must read and type the %s characters within 0..9 and A..F"; +//End CAPTCHA Mod + +?> diff --git a/Themes/modern/languages/Packages.russian.php b/Themes/modern/languages/Packages.russian.php new file mode 100644 index 0000000..9502a4a --- /dev/null +++ b/Themes/modern/languages/Packages.russian.php @@ -0,0 +1,164 @@ +Файл не найден'; +$txt['package_action_error'] = 'Ошибка анализа модификации'; +$txt['package_action_failure'] = 'Неудача'; +$txt['package_action_success'] = 'Успех'; + +$txt['package_uninstall_actions'] = 'Удалить Действие'; +$txt['package_uninstall_done'] = 'Пакет удален, он работать больше не будет.'; +$txt['package_uninstall_cannot'] = 'Этот пакет не может быть удален, так как нет файла анинсталлера!

    Пожалуйста, свяжитесь с автором за более подробной информацией.'; + +$txt['package_install_options'] = 'Опции Установки'; +$txt['package_install_options_ftp_why'] = 'Использование FTP это самый простой способ просмотреть и изменить chmod файлов на записываемость через FTP для работы менеджера пакетов.
    Здесь Вы можете установить некоторые значения для некоторых полей.'; +$txt['package_install_options_ftp_server'] = 'FTP Сервер'; +$txt['package_install_options_ftp_port'] = 'Порт'; +$txt['package_install_options_ftp_user'] = 'Имя пользователя'; +$txt['package_install_options_make_backups'] = 'Создавать бекап версию заменяемых файлов с тильдой (~) в конце их имен.'; + +$txt['package_ftp_necessary'] = 'Требуемая FTP Информация'; +$txt['package_ftp_why'] = 'Некоторые файлы, которые необходимо изменить этому пакету не записывамы. Это необходимо изменить вручную зайдя на FTP и изменив CHMOD файлов.'; +$txt['package_ftp_why_download'] = 'Чтобы загрузить пакеты, директория Пакетов и файлы в нем должны быть записываемы - а они не такие в данный момент. Менеджер пакетов может использовать вашу FTP информацию, чтобы исправить это.'; +$txt['package_ftp_server'] = 'FTP Сервер'; +$txt['package_ftp_port'] = 'Порт'; +$txt['package_ftp_username'] = 'Имя пользователя'; +$txt['package_ftp_password'] = 'Пароль'; +$txt['package_ftp_path'] = 'Локальный путь к SMF'; + +// For a break, use \\n instead of
    ... and don't use entities. +$txt['package_delete_bad'] = 'Пакет, который Вы собираетесь удалить установлен! Если Вы удалите его, Вы не сможете анинсталить его позже.\\n\\nВы уверены?'; + +$txt['package_examine_file'] = 'Смотреть файл в пакете'; +$txt['package_file_contents'] = 'Содержание файла'; + +$txt['package_upload_title'] = 'Закачать Пакет'; +$txt['package_upload_select'] = 'Пакет для Закачки'; +$txt['package_upload'] = 'Закачать'; +$txt['package_upload_error_supports'] = 'Менеджер покетов сейчас позволяет только эти типы файлов: '; +$txt['package_upload_error_broken'] = 'Пакет, который Вы пытаетесь закачать или не соответствующий или стал поврежден.'; +$txt['package_uploaded_success'] = 'Пакет закачан успешно'; +$txt['package_uploaded_successfully'] = 'Пакет был закачан успешно'; + +$txt['package_modification_malformed'] = 'Плохо сформированный или недействительный файл модификации.'; +$txt['package_modification_missing'] = 'Файл не может быть найден.'; +$txt['package_no_zlib'] = 'Извините, Ваша конфигурация PHP не поддерживает zlib. Без этого , менеджер пакетов не может функционировать. Пожалуйста, свяжитесь с хостером для более подробной информации об этом.'; + + +//Begin CAPTCHA Mod 0.1 +//General Strings +$txt['captchaEnter'] = "Пожалуйста, введите код, который видите на картинке"; +$txt['captchaEnterShort'] = "Введите коде"; +$txt['captchaWrong'] = "Вы ввели код неправильно.
    К сожалению, Вам придётся вернуться назад и попробовать снова."; +$txt['captchaMaxTries'] ="Вы ввели неверный код слишком много раз. Если Вы в самом деле человек, а не робот, пожалуйста, свяжитесь с нами по электронной почте, и мы поможем Вам зарегистрироваться."; + +//When posting a reply to a topic +$txt['error_captcha_wrong'] = "Код введён неверно."; + +//Administration strings +$txt['captchaHeading'] = "CAPTCHA Settings"; +$txt['captchaChars'] = "Number of characters to use for code"; +$txt['captchaMinSize'] = "Minimum Font Size"; +$txt['captchaMaxSize'] = "Maximum Font Size"; +$txt['captchaMaxRotate'] = "Maximum angle for character rotation"; +$txt['captchaNoise'] = "Enable Noise
    enabled = make characters 'noisy' (recommended), disabled = use grid
    "; +$txt['captchaWebSafeColours'] = "Only use web safe colours"; +$txt['captchaBadGuysURL'] = "'Bad Guys' URL
    (when someone tries to avoid the CAPTCHA, they will get redirected here)
    "; + +//Additions in CAPTCHA Mod 0.2 +$txt['captchaReadAndType'] = "Нужно ввести %s символов с картинки, это могут быть цифры от 0 до 9 и латинские буквы от A до F"; +//End CAPTCHA Mod + +?> diff --git a/Themes/modern/languages/PersonalMessage.english.php b/Themes/modern/languages/PersonalMessage.english.php new file mode 100644 index 0000000..7e8a0d0 --- /dev/null +++ b/Themes/modern/languages/PersonalMessage.english.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/Themes/modern/languages/Post.english.php b/Themes/modern/languages/Post.english.php new file mode 100644 index 0000000..ee00b07 --- /dev/null +++ b/Themes/modern/languages/Post.english.php @@ -0,0 +1,173 @@ +Only admins and moderators can reply.'; + +$txt['notifyXAnn2'] = 'New announcement'; +$txt['notifyXAnn3'] = 'View it at'; +$txt['notifyXOnce2'] = 'More replies may be posted, but you won\'t receive any more notifications until you read the topic.'; + +$txt['rtm2'] = 'Enter comment'; +$txt['rtm3'] = 'Reported post'; +$txt['rtm4'] = 'by'; +$txt['rtm10'] = 'Submit'; +$txt['rtm_email1'] = 'The following post, "%s" by'; +$txt['rtm_email2'] = 'has been reported by'; +$txt['rtm_email3'] = 'on a board you moderate'; +$txt['rtm_email_comment'] = 'The reporter has made the following comment'; + +$txt['attach_preview'] = 'You may need to reattach any files you attached, such as'; +$txt['maxAttachPerPost'] = 'per post'; + +$txt['post_additionalopt'] = 'Additional Options...'; +$txt['sticky_after2'] = 'Sticky this topic.'; +$txt['move_after2'] = 'Move this topic.'; +$txt['back_to_topic'] = 'Return to this topic.'; + +$txt['retrieving_quote'] = 'Retrieving Quote...'; + +$txt['poll_options'] = 'Poll Options'; +$txt['poll_options1a'] = 'Run the poll for'; +$txt['poll_options1b'] = 'days. (leave blank for no limit)'; +$txt['poll_options2'] = 'Show the poll\'s results to anyone.'; +$txt['poll_options3'] = 'Only show the results after someone has voted.'; +$txt['poll_options4'] = 'Only show the results after the poll has expired.'; +$txt['poll_options5'] = 'Maximum votes per user.'; +$txt['poll_options7'] = 'Allow user to change vote.'; +$txt['poll_error1'] = 'You selected too many options - maximum allowed is %s'; +$txt['poll_add_option'] = 'Add Option'; + +$txt['spellcheck_done'] = 'Spell checking complete.'; +$txt['spellcheck_change_to'] = 'Change To:'; +$txt['spellcheck_suggest'] = 'Suggestions:'; +$txt['spellcheck_change'] = 'Change'; +$txt['spellcheck_change_all'] = 'Change All'; +$txt['spellcheck_ignore'] = 'Ignore'; +$txt['spellcheck_ignore_all'] = 'Ignore All'; + +$txt['attach_lose'] = 'You will have to reattach any attachments, continue with preview?'; +$txt['more_attachments'] = 'more attachments'; +// Don't use entities in the below string. +$txt['more_attachments_error'] = 'Sorry, you aren\'t allowed to post any more attachments.'; + +$txt['more_smileys'] = 'more'; +$txt['more_smileys_title'] = 'Additional smileys'; +$txt['more_smileys_pick'] = 'Pick a smiley'; +$txt['more_smileys_close_window'] = 'Close Window'; + +$txt['error_new_reply'] = 'Warning - while you were typing a new reply has been posted. You may wish to review your post.'; +$txt['error_new_replies'] = 'Warning - while you were typing %d new replies have been posted. You may wish to review your post.'; +$txt['error_new_reply_reading'] = 'Warning - while you were reading a new reply has been posted. You may wish to review your post.'; +$txt['error_new_replies_reading'] = 'Warning - while you were reading %d new replies have been posted. You may wish to review your post.'; + +$txt['notification_reply_subject'] = 'Topic reply: %s'; +$txt['notification_reply'] = 'A reply has been posted to a topic you are watching by %s.' . "\n\n" . 'View the reply at: '; +$txt['notification_sticky_subject'] = 'Topic stickied: %s'; +$txt['notification_sticky'] = 'A topic you are watching has been marked as a sticky topic by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_lock_subject'] = 'Topic locked: %s'; +$txt['notification_lock'] = 'A topic you are watching has been locked by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_unlock_subject'] = 'Topic unlocked: %s'; +$txt['notification_unlock'] = 'A topic you are watching has been unlocked by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_remove_subject'] = 'Topic removed: %s'; +$txt['notification_remove'] = 'A topic you are watching has been removed by %s.'; +$txt['notification_move_subject'] = 'Topic moved: %s'; +$txt['notification_move'] = 'A topic you are watching has been moved to another board by %s.' . "\n\n" . 'View the topic at: '; +$txt['notification_merge_subject'] = 'Topic merged: %s'; +$txt['notification_merge'] = 'A topic you are watching has been merged with another topic by %s.' . "\n\n" . 'View the new merged topic at: '; +$txt['notification_split_subject'] = 'Topic split: %s'; +$txt['notification_split'] = 'A topic you are watching has been split into two or more topics by %s.' . "\n\n" . 'View what remains of this topic at: '; + +$txt['announce_this_topic'] = 'Send an announce about this topic to the members:'; +$txt['announce_title'] = 'Send an announcement'; +$txt['announce_desc'] = 'This form allows you to send an announcement to the selected membergroups about this topic.'; +$txt['announce_sending'] = 'Sending announcement of topic'; +$txt['announce_done'] = 'done'; +$txt['announce_continue'] = 'Continue'; +$txt['announce_topic'] = 'Announce topic.'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Post.russian.php b/Themes/modern/languages/Post.russian.php new file mode 100644 index 0000000..6fc6cf3 --- /dev/null +++ b/Themes/modern/languages/Post.russian.php @@ -0,0 +1,173 @@ +Только Администраторы и Модераторы могут здесь отвечать.'; + +$txt['notifyXAnn2'] = 'Новое сообщение'; +$txt['notifyXAnn3'] = 'Посмотреть'; +$txt['notifyXOnce2'] = 'Могут быть добавлены новые ответы, но Вы не получите уведомления о них, пока не зайдете на форум.'; + +$txt['rtm2'] = 'Оставить комментарий'; +$txt['rtm3'] = 'Собщение для '; +$txt['rtm4'] = ''; +$txt['rtm10'] = 'Добавить'; +$txt['rtm_email1'] = 'Об этом сообщении , "%s" '; +$txt['rtm_email2'] = 'получено уведомление от'; +$txt['rtm_email3'] = 'на форуме, модератором которого вы являетесь'; +$txt['rtm_email_comment'] = 'Был сделан следующий комментарий'; + +$txt['attach_preview'] = ' Потребуется снова добавить этот файл: '; +$txt['maxAttachPerPost'] = 'на одно сообщение'; + +$txt['post_additionalopt'] = 'Дополнительный настройки...'; +$txt['sticky_after2'] = 'Сделать тему важной.'; +$txt['move_after2'] = 'Переместить эту тему.'; +$txt['back_to_topic'] = 'Возвратиться в эту тему.'; + +$txt['retrieving_quote'] = ' Вставить цитату... .'; + +$txt['poll_options'] = 'Опции опроса'; +$txt['poll_options1a'] = 'Создать опрос на'; +$txt['poll_options1b'] = 'дней. (оставить пустым для безлиминтого опроса)'; +$txt['poll_options2'] = 'Показывать результаты опроса всем.'; +$txt['poll_options3'] = 'Показывать результаты, после того, как отдан голос.'; +$txt['poll_options4'] = 'Показывать результаты после завершения опроса.'; +$txt['poll_options5'] = 'Максимальное количество голосов от одного пользователя.'; +$txt['poll_options7'] = 'Разрешить пользователям менять свой ответ.'; +$txt['poll_error1'] = 'Вы выбрали слишком много вариантов - максимальное количество %s'; +$txt['poll_add_option'] = 'Добавить вариант'; + +$txt['spellcheck_done'] = 'Проверка орфографии завершена.'; +$txt['spellcheck_change_to'] = ' Изменить на:'; +$txt['spellcheck_suggest'] = 'Предложения:'; +$txt['spellcheck_change'] = 'Изменить'; +$txt['spellcheck_change_all'] = 'Изменить всё'; +$txt['spellcheck_ignore'] = 'Игнорировать'; +$txt['spellcheck_ignore_all'] = 'Игнорировать всё'; + +$txt['attach_lose'] = 'Вам потребуется произвести повторное добавление всех вложений, продолжить?'; +$txt['more_attachments'] = 'добавить вложение'; +// Don't use entities in the below string. +$txt['more_attachments_error'] = 'Вы не можете добавлять ещё вложения.'; + +$txt['more_smileys'] = 'ещё...'; +$txt['more_smileys_title'] = 'Дополнительные смайлики'; +$txt['more_smileys_pick'] = 'Выбрать смайлик'; +$txt['more_smileys_close_window'] = 'Закрыть окно'; + +$txt['error_new_reply'] = 'Внимание - пока Вы составляли сообщение, в теме был новый ответ. Вы можете изменить ваше сообщение.'; +$txt['error_new_replies'] = 'Внимание - пока Вы составляли сообщение, в теме было %d новых ответов. Вы можете изменить ваше сообщение.'; +$txt['error_new_reply_reading'] = 'Внимание - пока Вы просматривали, в теме был новый ответ. Вы можете изменить ваше сообщение.'; +$txt['error_new_replies_reading'] = 'Внимание - пока Вы просматривали, в теме было %d новых ответов. Вы можете изменить ваше сообщение.'; + +$txt['notification_reply_subject'] = 'Ответ в теме: %s'; +$txt['notification_reply'] = 'Ответ в теме, которую вы просматриваете был сделан пользователем %s.' . "\n\n" . 'Прочитать ответ: '; +$txt['notification_sticky_subject'] = 'Тема помечена важной: %s'; +$txt['notification_sticky'] = 'Тема, которую Вы просматриваете, была сделана сделана важной пользователем %s.' . "\n\n" . 'Просмотреть тему: '; +$txt['notification_lock_subject'] = 'Тема заблокирована: %s'; +$txt['notification_lock'] = 'Тема, которую Вы просматриваете, была заблокирована пользователем %s.' . "\n\n" . 'Просмотреть тему: '; +$txt['notification_unlock_subject'] = 'Тема разблокирована: %s'; +$txt['notification_unlock'] = 'Тема, которую Вы просматриваете, была разблокирована пользователем %s.' . "\n\n" . 'VПросмотреть тему: '; +$txt['notification_remove_subject'] = 'Тема удалена: %s'; +$txt['notification_remove'] = 'Просматриваемая вами тема была удалена пользователем %s.'; +$txt['notification_move_subject'] = 'Тема перемещена: %s'; +$txt['notification_move'] = 'Тема перемещена в другой раздел форума пользователем %s.' . "\n\n" . 'Новый адрес: '; +$txt['notification_merge_subject'] = 'Тема объединена: %s'; +$txt['notification_merge'] = 'Тема, которую вы просматриваете была слита с другой темой пользователем %s.' . "\n\n" . 'Просмотр новой объединённой темы: '; +$txt['notification_split_subject'] = 'Тема разделена: %s'; +$txt['notification_split'] = 'Тема, которую вы просматриваете была разделена на две или более темы пользователем %s.' . "\n\n" . 'View what remains of this topic at: '; + +$txt['announce_this_topic'] = 'Выслать анонс о этой теме пользователям:'; +$txt['announce_title'] = 'Выслать анонс'; +$txt['announce_desc'] = 'Этот форум позволяет Вам отсылать анонс о этой теме выбранным группам пользователей.'; +$txt['announce_sending'] = 'Выслать анонс о теме'; +$txt['announce_done'] = 'выполнено'; +$txt['announce_continue'] = 'Продолжить'; +$txt['announce_topic'] = 'Анонс темы.'; + +?> diff --git a/Themes/modern/languages/Profile.english.php b/Themes/modern/languages/Profile.english.php new file mode 100644 index 0000000..b1958bf --- /dev/null +++ b/Themes/modern/languages/Profile.english.php @@ -0,0 +1,273 @@ +http://www.mypage.com/mypic.gif)'; +$txt[475] = 'I have my own pic'; +$txt[479] = 'The format here will be used to show dates throughout this forum.'; +$txt[486] = 'Time Format'; +$txt[487] = 'Time Offset must be between -23.5 and 23.5.'; +$txt[518] = 'This is the displayed name that people will see.'; +$txt[519] = 'Number of hours to +/- to make displayed time equal to your local time.'; +$txt[563] = 'Birthdate'; +$txt[564] = 'Month (MM)'; +$txt[565] = 'Day (DD)'; +$txt[566] = 'Year (YYYY)'; +$txt[596] = 'For best security, you should use six or more characters with a combination of letters, numbers, and symbols.'; +$txt[597] = 'Additional Information'; +$txt[598] = 'This must be included if you specify a URL below.'; +$txt[599] = 'This must be a complete URL.'; +$txt[600] = 'This is your ICQ number.'; +$txt[601] = 'This is your AOL Instant Messenger nickname.'; +$txt[602] = 'This is your Yahoo! Instant Messenger nickname.'; +$txt[606] = 'Signatures are displayed at the bottom of each post or personal message. BBC code and smileys may be used in your signature.'; +$txt[664] = 'Max ' . $modSettings['max_signatureLength'] . '; characters remaining: '; +$txt[688] = 'Send this member a personal message'; +$txt[722] = 'hidden'; +$txt[741] = 'Current forum time'; +$txt[749] = 'The \'number of posts\' box can only contain digits.'; + +$txt['smf225'] = 'Language'; +$txt['smf227'] = 'Avatar image is too big, please resize it and try again (max'; +$txt['smf233'] = 'Invalid Date Registered value, valid example:'; +$txt['smf237'] = 'Your MSN messenger email address'; +$txt['smf241'] = 'Current Password'; +$txt['smf243'] = 'You haven\'t entered your current password.'; +// Don't use entities in the below string, except the main ones. (lt, gt, quot.) +$txt['smf244'] = 'For security reasons, your current password is required to make changes to your account.'; + +// Profile enhancements +$txt['pswd1'] = 'Secret Question'; +$txt['secret_desc'] = 'To help retrieve your password, enter a question here with an answer that only you know.'; +$txt['secret_desc2'] = 'Choose carefully, you wouldn\'t want someone guessing your answer!'; +$txt['pswd2'] = 'Answer'; +$txt['pswd3'] = 'Ask me my question'; +$txt['pswd4'] = 'You can\'t retrieve your password, but you can set a new one by following a link sent to you by email. You also have the option of setting a new password by answering your secret question.'; +$txt['pswd5'] = 'Sorry, but you did not specify a valid combination of Secret Question and Answer in your profile. Please click on the back button, and use the default method of obtaining your password.'; +$txt['pswd6'] = 'Please enter the answer to your question, and the password you would like to use. Your password will be changed to the one you select provided you answer the question correctly.'; +$txt['pswd8'] = 'Your password was changed successfully.
    Click here to login.'; +$txt['secret_why_blank'] = 'why is this blank?'; + +$txt['theme1a'] = 'Current Theme'; +$txt['theme1b'] = '(change)'; +$txt['theme2'] = 'Theme preferences'; +$txt['theme_forum_default'] = 'Forum or Board Default'; +$txt['theme_forum_default_desc'] = 'This is the default theme, which means your theme will change along with the administrator\'s settings and the board you are viewing.'; + +$txt['profileConfirm'] = 'Do you really want to delete this user?'; + +$txt['title1'] = 'Custom Title'; + +$txt['lastLoggedIn'] = 'Last Active'; + +$txt['notifyX'] = 'Notification Settings:'; +$txt['notifyX1'] = 'Save settings'; +$txt['notifyXAnn4'] = 'Receive forum announcements and important notifications by email.'; +$txt['notifyXOnce1'] = 'Receive reply notification only for the first unread reply.'; +$txt['auto_notify'] = 'Turn notification on when you post or reply to a topic.'; + +$txt['notifications_topics'] = 'Current Topic Notifications'; +$txt['notifications_topics_list'] = 'You are being notified of replies to the following topics'; +$txt['notifications_topics_none'] = 'You are not currently receiving any notifications from topics.'; +$txt['notifications_topics_howto'] = 'To receive notifications from a topic, click the "notify" button while viewing it.'; +$txt['notifications_boards'] = 'Current Board Notifications'; +$txt['notifications_boards_list'] = 'You are being notified of new topics posted in the following boards'; +$txt['notifications_boards_none'] = 'You aren\'t receiving notifications on any boards right now.'; +$txt['notifications_boards_howto'] = 'To request notifications from a specific board, click the "notify" button in the index of that board.'; +$txt['notifications_update'] = 'Unsubscribe'; + +$txt[325] = 'Ignorelist'; +$txt[326] = 'Add one Username on each line.
    Or enter * to ignore all messages.'; +$txt[327] = 'Notify by email every time you receive a personal message.'; + +$txt['statPanel_showStats'] = 'User statistics for: '; +$txt['statPanel_users_votes'] = 'Number of Votes Cast'; +$txt['statPanel_users_polls'] = 'Number of Polls Created'; +$txt['statPanel_total_time_online'] = 'Total Time Spent Online'; +$txt['statPanel_noPosts'] = 'No posts to speak of!'; +$txt['statPanel_generalStats'] = 'General Statistics'; +$txt['statPanel_posts'] = 'posts'; +$txt['statPanel_topics'] = 'topics'; +$txt['statPanel_votes'] = 'votes'; +$txt['statPanel_polls'] = 'polls'; +$txt['statPanel_topBoards'] = 'Most Popular Boards By Posts'; +$txt['statPanel_topBoardsActivity'] = 'Most Popular Boards By Activity'; +$txt['statPanel_activityTime'] = 'Posting Activity By Time'; +$txt['statPanel_timeOfDay'] = 'Time of Day'; +$txt['statPanel_show'] = 'Show general statistics for this member'; + +$txt['deleteAccount_warning'] = 'Warning - These actions are irreversible!'; +$txt['deleteAccount_desc'] = 'From this page you can delete this user\'s account and posts.'; +$txt['deleteAccount_member'] = 'Delete this member\'s account'; +$txt['deleteAccount_posts'] = 'Posts of user that are to be removed'; +$txt['deleteAccount_none'] = 'None'; +$txt['deleteAccount_all_posts'] = 'All Posts'; +$txt['deleteAccount_topics'] = 'Topics and Posts'; +$txt['deleteAccount_confirm'] = 'Are you completely sure you want to delete this account?'; + +$txt['profileInfo'] = 'Profile Info'; +$txt['summary'] = 'Summary'; +$txt['showPosts'] = 'Show Posts'; +$txt['statPanel'] = 'Show Stats'; +$txt['trackUser'] = 'Track User'; +$txt['trackIP'] = 'Track IP'; + +$txt['profileEdit'] = 'Modify Profile'; +$txt['account'] = 'Account Related Settings'; +$txt['account_info'] = 'These are your account settings. This page holds all critical information that identifies you on this forum. For security reasons, you will need to enter your (current) password to make changes to this information.'; +$txt['forumProfile'] = 'Forum Profile Information'; +$txt['forumProfile_info'] = 'You can change your personal information on this page. This information will be displayed throughout ' . $context['forum_name'] . '. If you aren\'t comfortable with sharing some information, simply skip it - nothing here is required.'; +$txt['theme'] = 'Look and Layout Preferences'; +$txt['theme_info'] = 'This section allows you to customize the look and layout of the forum.'; +$txt['notification'] = 'Notifications and Email'; +$txt['notification_info'] = 'SMF allows you to be notified of replies to posts, newly posted topics, and forum announcements. You can change those settings here, or oversee the topics and boards you are currently being receiving notifications for.'; +$txt['pmprefs'] = 'Personal Message Options'; +$txt['pmprefs_info'] = 'Other members of ' . $context['forum_name'] . ' can contact your personally, but sometimes you may want to ignore someone\'s messages. This page allows you to set that, among other things.'; + +$txt['profileAction'] = 'Actions'; +$txt['deleteAccount'] = 'Delete this account'; +$txt['profileSendIm'] = 'Send personal message'; +$txt['profileBanUser'] = 'Ban this user'; + +$txt['display_name'] = 'Display name'; +$txt['enter_ip'] = 'Enter IP (range)'; +$txt['errors_by'] = 'Error messages by'; +$txt['errors_desc'] = 'Below is a list of all the recent errors that this user has generated/experienced.'; +$txt['errors_from_ip'] = 'Error messages from IP (range)'; +$txt['errors_from_ip_desc'] = 'Below is a list of all recent error messages generated by this IP (range).'; +$txt['invalid_ip'] = 'Invalid IP address. Note that only asterisks (*) are allowed as masks, e.g. 127.0.*.*'; +$txt['ip_address'] = 'IP address'; +$txt['ips_in_errors'] = 'IPs used in error messages'; +$txt['ips_in_messages'] = 'IPs used in messages'; +$txt['members_from_ip'] = 'Members from IP (range)'; +$txt['members_in_range'] = 'Members possibly in the same range'; +$txt['messages_from_ip'] = 'Messages posted from IP (range)'; +$txt['messages_from_ip_desc'] = 'Below is a list of all messages posted from this IP (range).'; +$txt['most_recent_ip'] = 'Most recent IP address'; +$txt['no_errors_from_ip'] = 'No error messages from the specified IP (range) found'; +$txt['no_errors_from_user'] = 'No error messages from the specified user found'; +$txt['no_members_from_ip'] = 'No members from the specified IP (range) found'; +$txt['no_messages_from_ip'] = 'No messages from the specified IP (range) found'; +$txt['none'] = 'None'; +$txt['own_profile_confirm'] = 'Do you really want to delete your own account?'; +$txt['view_ips_by'] = 'View IPs used by'; + +$txt['avatar_will_upload'] = 'I will upload my own picture'; + +$txt['activate_reactivate_title'] = 'Welcome back to'; +$txt['activate_reactivate_mail'] = 'In order to re-validate your email address, your account has been deactivated. Click the following link to activate it again:'; +$txt['activate_changed_email'] = 'You\'ve changed your email address. In order to validate this address you will receive an email. Click the link in that email to reactivate your account.'; + +$txt[394] = 'Unable to send reminder email.'; +$txt[395] = 'Send an email to'; +$txt[396] = 'to ask for password'; +$txt[669] = 'Password Reminder'; + +$txt['smf100'] = 'Username/Email'; +$txt['smf101'] = 'by User'; +$txt['smf102'] = 'by Email'; + +$txt['reminder_subject'] = 'New password for ' . $context['forum_name']; +$txt['reminder_mail'] = 'This mail was sent because the \'forgot password\' function has been applied to your account. To set a new password click the following link'; +$txt['reminder_sent'] = 'A mail has been sent to your email address. Click the link in that mail to set a new password.'; +$txt['reminder_set_password'] = 'Set Password'; +$txt['reminder_password_set'] = 'Password successfully set'; +$txt['reminder_error'] = '%s failed to answer their secret question correctly when attempting to change a forgotten password.'; + +$txt['registration_not_approved'] = 'Sorry, this account has not yet been approved. If you need to change your email address please click'; +$txt['registration_not_activated'] = 'Sorry, this account has not yet been activated. If you need to resend the activation email please click'; + +$txt['primary_membergroup'] = 'Primary Membergroup'; +$txt['additional_membergroups'] = 'Additional Membergroups'; +// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'. +$txt['additional_membergroups_show'] = '[ show additional groups ]'; +$txt['no_primary_membergroup'] = '(no primary membergroup)'; +$txt['deadmin_confirm'] = 'Are you sure you wish to irrevocably remove your admin status?'; + +$txt['account_not_activated'] = 'Account is currently not activated'; +$txt['account_activate'] = 'activate'; + +$txt['show_online'] = 'Show others your online status?'; + +$txt['return_to_post'] = 'Return to topics after posting by default.'; +$txt['copy_to_outbox'] = 'Save a copy of each Personal Message in my outbox by default.'; +$txt['popup_messages'] = 'Show a popup when you receive new messages?'; +$txt['recent_posts_at_top'] = 'Show most recent posts at the top.'; +$txt['recent_pms_at_top'] = 'Show most recent personal messages at top.'; + +$txt['timeformat_easy0'] = '(Forum Default)'; +$txt['timeformat_easy1'] = 'Month Day, Year, HH:MM:SS a/pm'; +$txt['timeformat_easy2'] = 'Month Day, Year, HH:MM:SS (army time.)'; +$txt['timeformat_easy3'] = 'YYYY-MM-DD, HH:MM:SS'; +$txt['timeformat_easy4'] = 'DD Month YYYY, HH:MM:SS'; +$txt['timeformat_easy5'] = 'DD-MM-YYYY, HH:MM:SS'; + +$txt['rtm8'] = 'Poster'; + +$txt[732] = 'Show board descriptions inside boards.'; +$txt['show_children'] = 'Show child boards on every page inside boards, not just the first.'; +$txt['show_no_avatars'] = 'Don\'t show other users\' avatars.'; +$txt['show_no_signatures'] = 'Don\'t show other users\' signatures.'; +$txt['show_no_censored'] = 'Leave words uncensored.'; +$txt['calendar_start_day'] = 'First day of the week on the calendar'; +$txt['display_quick_reply'] = 'Use quick reply on topic display: '; +$txt['display_quick_reply1'] = 'don\'t show at all'; +$txt['display_quick_reply2'] = 'show, off by default'; +$txt['display_quick_reply3'] = 'show, on by default'; +$txt['display_quick_mod'] = 'Show quick-moderation on message index as '; +$txt['display_quick_mod_none'] = 'don\'t show.'; +$txt['display_quick_mod_check'] = 'checkboxes.'; +$txt['display_quick_mod_image'] = 'icons.'; + +$txt['whois_title'] = 'Look up IP on a regional whois-server'; +$txt['whois_apnic'] = 'APNIC (Asia Pacific region)'; +$txt['whois_arin'] = 'ARIN (North America, a portion of the Caribbean and sub-Saharan Africa)'; +$txt['whois_lacnic'] = 'LACNIC (Latin American and Caribbean region)'; +$txt['whois_ripe'] = 'RIPE (Europe, the Middle East and parts of Africa and Asia)'; + +$txt['moderator_why_missing'] = 'why isn\'t moderator here?'; +$txt['username_change'] = 'change'; +$txt['username_warning'] = 'To change this member\'s username, the forum must also reset their password, which will be emailed to the member with their new username.'; + +$txt['showPermissions'] = 'Show Permissions'; +$txt['showPermissions_given'] = 'Given by'; +$txt['showPermissions_denied'] = 'Denied by'; +$txt['showPermissions_permission'] = 'Permission (denied permissions are struck out)'; +$txt['showPermissions_none_general'] = 'This member has no general permissions set.'; +$txt['showPermissions_none_board'] = 'This member has no board specific permissions set.'; +$txt['showPermissions_all'] = 'As an administrator, this member has all possible permissions.'; +$txt['showPermissions_select'] = 'Board specific permissions for'; +$txt['showPermissions_general'] = 'General Permissions'; +$txt['showPermissions_global'] = 'All boards'; +$txt['showPermissions_all_boards'] = 'All'; +$txt['showPermissions_all_boards_except'] = 'All, except'; +$txt['showPermissions_boards'] = 'Boards'; +$txt['showPermissions_boards_denied'] = 'Boards denied'; +$txt['showPermissions_local_only'] = 'Permission only locally available'; + +$txt['local_time'] = 'Local Time'; +$txt['posts_per_day'] = 'per day'; + +$txt['who_change_my_karma'] = 'Who change my karma?'; +$txt['whom_i_change_karma'] = 'Whom I change karma?'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Profile.russian.php b/Themes/modern/languages/Profile.russian.php new file mode 100644 index 0000000..a3ede3c --- /dev/null +++ b/Themes/modern/languages/Profile.russian.php @@ -0,0 +1,272 @@ +http://www.mypage.com/mypic.gif)'; +$txt[475] = 'Своя картинка'; +$txt[479] = 'Формат отображения даты.'; +$txt[486] = 'Формат отображения времени'; +$txt[487] = 'Разница во времени должна быть в пределах от -23.5 до 23.5.'; +$txt[518] = 'Отображаемое имя, которое пользователи будут видеть.'; +$txt[519] = 'Количество часов +/- к времени сервера.'; +$txt[563] = 'Дата рождения'; +$txt[564] = 'Месяц (MM)'; +$txt[565] = 'День (ДД)'; +$txt[566] = 'Год (ГГГГ)'; +$txt[596] = 'Для безопасности лучше использовать 6 или более символов в произвольной комбинации.'; +$txt[597] = 'Дополнительная информация'; +$txt[598] = 'Используется, если только вы ниже введёте URL сайта.'; +$txt[599] = 'Укажите полный URL.'; +$txt[600] = 'Ваш ICQ .'; +$txt[601] = 'Ваш ник в AOL Instant Messenger.'; +$txt[602] = 'Ваш ник в Yahoo! Instant Messenger.'; +$txt[606] = 'Подписи отображаются снизу каждого сообщения или Личного Сообщения. BBC код и смайлы могут использоваться в подписи.'; +$txt[664] = 'Макс. ' . $modSettings['max_signatureLength'] . '; осталось символов: '; +$txt[688] = 'Отправить личное сообщение'; +$txt[722] = 'скрытый'; +$txt[741] = 'Текущее время сервера'; +$txt[749] = 'Должны быть только цифры.'; + +$txt['smf225'] = 'Язык'; +$txt['smf227'] = 'Размер аватара слишком велик, попробуйте уменьшить и повторить (max'; +$txt['smf233'] = 'Неправильно введена дата, должно быть в виде :'; +$txt['smf237'] = 'Ваш MSN messenger e-mail'; +$txt['smf241'] = 'Правильный пароль'; +$txt['smf243'] = 'Неверный пароль.'; +// Don't use entities in the below string, except the main ones. (lt, gt, quot.) +$txt['smf244'] = 'По соображениям безопасности ваш пароль должен отличаться от аккаунта.'; + +// Profile enhancements +$txt['pswd1'] = 'Секретный вопрос'; +$txt['secret_desc'] = 'Для напоминания пароля введите вопрос с ответом, который знаете только вы.'; +$txt['secret_desc2'] = 'Будьте осторожны, чтобы никто другой не сумел бы догадаться об ответе на ваш вопрос!'; +$txt['pswd2'] = 'Ответ'; +$txt['pswd3'] = 'Спросить у меня мой вопрос'; +$txt['pswd4'] = 'Вы не можете восстановить свой старый пароль, но Вы можете получить новый по почте. Вы можете также установить новый пароль, ответив на секретный вопрос.'; +$txt['pswd5'] = 'Извините, но Вы ввели не правильную комбинацию секретного вопроса и ответа установленного в Вашем профиле. Пожалуйста, вернитесь на предыдущую страницу и используйте стандартный способ для восстановления пароля.'; +$txt['pswd6'] = 'Пожалуйста, введите ответ на ваш вопрос и пароль, которым хотите пользоваться. Ваш пароль изменится на тот, который вы выберите.'; +$txt['pswd8'] = 'Ваш пароль успешно сменён.
    Кликните сюда чтобы войти.'; +$txt['secret_why_blank'] = 'почему пусто?'; + +$txt['theme1a'] = 'Текущий шаблон'; +$txt['theme1b'] = '(сменить)'; +$txt['theme2'] = 'Настройки шаблона'; +$txt['theme_forum_default'] = 'Форум или раздел по умолчанию'; +$txt['theme_forum_default_desc'] = 'Это тема по умолчанию, это значит, что она будет меняться если администратор меняет настройки и Вы смотрите форум.'; + +$txt['profileConfirm'] = 'Удалить этого пользователя?'; + +$txt['title1'] = 'Подпись'; + +$txt['lastLoggedIn'] = 'Последняя активность'; + +$txt['notifyX'] = 'Настройки уведомлений:'; +$txt['notifyX1'] = 'Сохранить'; +$txt['notifyXAnn4'] = 'Получать объявления и важные извещения форума по email.'; +$txt['notifyXOnce1'] = 'Получать извещение только о первом не прочтенном ответе.'; +$txt['auto_notify'] = 'Включить извещения, если вы пишете сообщение или отвечаете в теме.'; + +$txt['notifications_topics'] = 'Текущие настройки уведомлений в темах'; +$txt['notifications_topics_list'] = 'Вы извещаетесь об ответах в следующих темах'; +$txt['notifications_topics_none'] = 'Вы сейчас не получаете извещения с тем.'; +$txt['notifications_topics_howto'] = 'Чтобы получать извещения с тем, кликните на кнопку "извещать", пока просматриваете тему.'; +$txt['notifications_boards'] = 'Извещения Текущего Форума'; +$txt['notifications_boards_list'] = 'Вам приходят извещения о новых темах в следующих форумах'; +$txt['notifications_boards_none'] = 'Вы не получаете сейчас извещения с любых форумов.'; +$txt['notifications_boards_howto'] = 'Чтобы получать извещения с определенных форумов, кликните кнопку "извещать" на странице форума.'; +$txt['notifications_update'] = 'Отписаться'; + +$txt[325] = 'Чёрный список'; +$txt[326] = 'По одному имени на строку.
    Или поставьте * чтобы игнорировать все сообщения.'; +$txt[327] = 'Уведомлять по e-mail при получении новых личных сообщений.'; + +$txt['statPanel_showStats'] = 'Статистика пользователя: '; +$txt['statPanel_users_votes'] = 'Подано голосов'; +$txt['statPanel_users_polls'] = 'Создано голосований'; +$txt['statPanel_total_time_online'] = 'Всего находился на форуме'; +$txt['statPanel_noPosts'] = 'Вы ещё не разу не отвечали!'; +$txt['statPanel_generalStats'] = 'Основная статистика'; +$txt['statPanel_posts'] = 'ответов'; +$txt['statPanel_topics'] = 'тем'; +$txt['statPanel_votes'] = 'голосов'; +$txt['statPanel_polls'] = 'голосований'; +$txt['statPanel_topBoards'] = 'Активность на форумах (кол-во ответов)'; +$txt['statPanel_topBoardsActivity'] = 'Активность на форумах (% ответов)'; +$txt['statPanel_activityTime'] = 'Среднее число сообщений '; +$txt['statPanel_timeOfDay'] = 'раз в день'; +$txt['statPanel_show'] = 'Показать основную статистику пользователя'; + +$txt['deleteAccount_warning'] = 'Предупреждение - Это действие не восстанавливаемо!'; +$txt['deleteAccount_desc'] = 'С этой страницы Вы можете удалять пользовательские сообщения и аккаунты.'; +$txt['deleteAccount_member'] = 'Удалить аккаунт этого участника'; +$txt['deleteAccount_posts'] = 'Сообщений было удалено'; +$txt['deleteAccount_none'] = 'Ни одного'; +$txt['deleteAccount_all_posts'] = 'Все ответы'; +$txt['deleteAccount_topics'] = 'Тем и ответов'; +$txt['deleteAccount_confirm'] = 'Вы уверены, что хотите удалить этот аккаунт?'; + +$txt['profileInfo'] = 'Профиль пользователя'; +$txt['summary'] = 'Основная информация'; +$txt['showPosts'] = 'Показать ответы'; +$txt['statPanel'] = 'Статистика'; +$txt['trackUser'] = 'Проверка участника'; +$txt['trackIP'] = 'Поиск IP'; + +$txt['profileEdit'] = 'Изменить профиль'; +$txt['account'] = 'Настройки аккаунта'; +$txt['account_info'] = 'Здесь настройки Вашего аккаунта. На этой странице находится критически важная информация, идентифицирующая Вас на форуме. По соображениям безопасности, Вам необходимо ввести текущий пароль, для изменения этой информации.'; +$txt['forumProfile'] = 'Профиль на форуме'; +$txt['forumProfile_info'] = 'Здесь вы можете изменить информацию о себе, которая будет отображаться на форуме ' . $context['forum_name'] . '. Вы не обязаны указывать полную информацию о себе.'; +$txt['theme'] = 'Внешний вид форума'; +$txt['theme_info'] = 'Здесь вы можете настроить предпочитаемый внешний вид форума.'; +$txt['notification'] = 'Уведомления по e-mail'; +$txt['notification_info'] = 'SMF предоставляет возможность извещать Вас об ответах, о новых темах и объявлениях на форуме. Вы можете изменить эти настройки здесь, или пересмотреть темы и форумы, с которых Вы сейчас получаете извещения.'; +$txt['pmprefs'] = 'Настройки личных сообщений'; +$txt['pmprefs_info'] = 'Другие участники ' . $context['forum_name'] . ' могут связаться с Вами, но вы можете игнорировать чьи-либо сообщения. Эта страница позволяет Вам также сделать и это.'; + +$txt['profileAction'] = 'Действия'; +$txt['deleteAccount'] = 'Удалить аккаунт'; +$txt['profileSendIm'] = 'Отправить личное сообщения'; +$txt['profileBanUser'] = 'Бан участника'; + +$txt['display_name'] = 'Отображаемое имя'; +$txt['enter_ip'] = 'Ввести IP (ранг)'; +$txt['errors_by'] = 'Сообщения с ошибками'; +$txt['errors_desc'] = 'Ниже список всех недавних ошибок, которые вызвал пользователь.'; +$txt['errors_from_ip'] = 'Сообщения с ошибками от IP (ранг)'; +$txt['errors_from_ip_desc'] = 'Ниже список недавних ошибок, вызванный следующим IP (диапазоном IP).'; +$txt['invalid_ip'] = 'Ошибочный IP адрес. Заметьте, что только звездочки (*) разрешены как маски, напр. 127.0.*.*'; +$txt['ip_address'] = 'IP адрес'; +$txt['ips_in_errors'] = 'IP использовался в ошибочных сообщениях'; +$txt['ips_in_messages'] = 'IP использовался в сообщениях'; +$txt['members_from_ip'] = 'Участники с IP (диапазоном IP)'; +$txt['members_in_range'] = 'Участники возможно в одном диапазоне'; +$txt['messages_from_ip'] = 'Сообщения созданные с IP (диапазона IP)'; +$txt['messages_from_ip_desc'] = 'Ниже список всех сообщений с этого IP (диапазона IP).'; +$txt['most_recent_ip'] = 'Самые последние IP адреса.'; +$txt['no_errors_from_ip'] = 'Не найдено сообщений об ошибках для указанного IP адреса(диапазона IP)'; +$txt['no_errors_from_user'] = 'Не найдено сообщений об ошибках для указанного пользователя'; +$txt['no_members_from_ip'] = 'Не найдено участника с подходящим IP (диапазоном IP)'; +$txt['no_messages_from_ip'] = 'Не найдены сообщения с указанного IP (диапазона IP)'; +$txt['none'] = 'Ни один'; +$txt['own_profile_confirm'] = 'Вы действительно хотите удалить ваш собственный аккаунт?'; +$txt['view_ips_by'] = 'Посмотреть IP адреса использованные'; + +$txt['avatar_will_upload'] = 'Я загружу свою картинку'; + +$txt['activate_reactivate_title'] = 'С возвращением'; +$txt['activate_reactivate_mail'] = 'Для проверки работы вашего email? Ваш аккаунт был деактивирован. Нажмите на следующую ссылку для активации:'; +$txt['activate_changed_email'] = 'Вы изменили email адрес. Для проверки этого адреса, вам выслан email. Нажмите ссылку для реактивации аккаунта.'; + +$txt[394] = 'Не получается отправить email напоминание.'; +$txt[395] = 'Отправить e-mail'; +$txt[396] = 'чтобы запросить пароль'; +$txt[669] = 'Напоминание пароля'; + +$txt['smf100'] = 'Пользователь/E-mail'; +$txt['smf101'] = 'по User'; +$txt['smf102'] = 'по Email'; + +$txt['reminder_subject'] = 'Новый пароль для ' . $context['forum_name']; +$txt['reminder_mail'] = 'Этот email был выслан, так как функция \'забыт пароль\' была применена для вашего аккаунта. Чтобы изменить пароль, нажмите следующую ссылку'; +$txt['reminder_sent'] = 'Письмо было отправлено на Ваш email адрес. Нажмите ссылку в этом письме, чтобы установить новый пароль.'; +$txt['reminder_set_password'] = 'Установить Пароль'; +$txt['reminder_password_set'] = 'Пароль успешно установлен'; +$txt['reminder_error'] = '%s не правильно ответили на секретный вопрос при попытке изменения забытого пароля.'; + +$txt['registration_not_approved'] = 'Извините, этот аккаунт не был подтвержден. Если Вам надо сменить email адрес, пожалуйста, кликните'; +$txt['registration_not_activated'] = 'Извините, этот аккаунт не был активирован. Если Вам необходимо заново переслать email активации, пожалуйста, кликните'; + +$txt['primary_membergroup'] = 'Основная группа участников'; +$txt['additional_membergroups'] = 'Дополнительные группы участников'; +// Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'. +$txt['additional_membergroups_show'] = '[ показывать дополнительные группы ]'; +$txt['no_primary_membergroup'] = '(нет основополагающей группы)'; +$txt['deadmin_confirm'] = 'Вы уверены, что хотите безвозвратно снять ваш статус администратора??'; + +$txt['account_not_activated'] = 'Аккаунт не активирован'; +$txt['account_activate'] = 'активировать'; + +$txt['show_online'] = 'Показывать остальным ваш online статус?'; + +$txt['return_to_post'] = 'По умолчанию, возвращаться в тему после ответа.'; +$txt['copy_to_outbox'] = 'Сохранять копию каждого Личного Сообщения в исходящих по умолчанию.'; +$txt['popup_messages'] = 'Выводить предупреждение, при получении нового личного сообщения?'; +$txt['recent_posts_at_top'] = 'Показывать новые сообщения сверху.'; +$txt['recent_pms_at_top'] = 'Показывать новые личные сообщения вверху.'; + +$txt['timeformat_easy0'] = '(Настройки по умолчанию)'; +$txt['timeformat_easy1'] = 'Месяц День, Год, ЧЧ:ММ:СС a/pm'; +$txt['timeformat_easy2'] = 'Месяц День, Год, ЧЧ:ММ:СС (по военному.)'; +$txt['timeformat_easy3'] = 'ГГГГ-ММ-ДД, ЧЧ:ММ:СС'; +$txt['timeformat_easy4'] = 'ДД Месяц ГГГГ, ЧЧ:MM:СС'; +$txt['timeformat_easy5'] = 'ДД-MM-ГГГГ, ЧЧ:MM:СС'; + +$txt['rtm8'] = 'Объявление'; + +$txt[732] = 'Показывать описание форумов внутри.'; +$txt['show_children'] = 'Показывать дочерние форумы на каждой странице внутри форума, а не только на первой.'; +$txt['show_no_avatars'] = 'Не показывать аватары других пользователей.'; +$txt['show_no_signatures'] = 'Не показывать подписи других пользователей.'; +$txt['show_no_censored'] = 'Оставлять слова не цензурируемыми.'; +$txt['calendar_start_day'] = 'Первый день в неделе в календаре.'; +$txt['display_quick_reply'] = 'Использовать быстрый ответ на странице темы: '; +$txt['display_quick_reply1'] = 'не показывать'; +$txt['display_quick_reply2'] = 'не показывать по умолчанию'; +$txt['display_quick_reply3'] = 'показывать по умолчанию'; +$txt['display_quick_mod'] = 'Показывать быстрое модерирование на странице сообщения как '; +$txt['display_quick_mod_none'] = 'не показывать.'; +$txt['display_quick_mod_check'] = 'ячейки.'; +$txt['display_quick_mod_image'] = 'иконки.'; + +$txt['whois_title'] = 'Смотреть IP на региональных whois-серверах'; +$txt['whois_apnic'] = 'APNIC (Asia Pacific region)'; +$txt['whois_arin'] = 'ARIN (North America, a portion of the Caribbean and sub-Saharan Africa)'; +$txt['whois_lacnic'] = 'LACNIC (Latin American and Caribbean region)'; +$txt['whois_ripe'] = 'RIPE (Europe, the Middle East and parts of Africa and Asia)'; + +$txt['moderator_why_missing'] = 'почему здесь нет модератора?'; +$txt['username_change'] = 'изменить'; +$txt['username_warning'] = 'Чтобы сменить имена пользователей, форум также должен сменить их пароли, которые будут отправлены пользователю вместе с новым логином.'; + +$txt['showPermissions'] = 'Показать права'; +$txt['showPermissions_given'] = 'Разрешено'; +$txt['showPermissions_denied'] = 'Запрещено'; +$txt['showPermissions_permission'] = 'Право (запрещенные права вычеркнуты)'; +$txt['showPermissions_none_general'] = 'У этого участника нет основных прав.'; +$txt['showPermissions_none_board'] = 'Нет особых прав.'; +$txt['showPermissions_all'] = 'Все права администратора.'; +$txt['showPermissions_select'] = 'Специальные права в разделах'; +$txt['showPermissions_general'] = 'Основные права'; +$txt['showPermissions_global'] = 'Все форумы'; +$txt['showPermissions_all_boards'] = 'Все'; +$txt['showPermissions_all_boards_except'] = 'Все, кроме'; +$txt['showPermissions_boards'] = 'Форумы'; +$txt['showPermissions_boards_denied'] = 'Форумы запрещены'; +$txt['showPermissions_local_only'] = 'Права доступны только локально'; + +$txt['local_time'] = 'Местное время'; +$txt['posts_per_day'] = 'раз в день'; + +$txt['who_change_my_karma'] = 'Кто изменял мой рейтинг?'; +$txt['whom_i_change_karma'] = 'Чей рейтинг менял(а) я?'; +?> diff --git a/Themes/modern/languages/ProfileComments.russian.php b/Themes/modern/languages/ProfileComments.russian.php new file mode 100644 index 0000000..ae97ecc --- /dev/null +++ b/Themes/modern/languages/ProfileComments.russian.php @@ -0,0 +1,54 @@ + \ No newline at end of file diff --git a/Themes/modern/languages/Settings.english.php b/Themes/modern/languages/Settings.english.php new file mode 100644 index 0000000..7310b01 --- /dev/null +++ b/Themes/modern/languages/Settings.english.php @@ -0,0 +1,7 @@ +
    Thanks go to Babylonking and Alienine.'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Settings.russian.php b/Themes/modern/languages/Settings.russian.php new file mode 100644 index 0000000..8790b57 --- /dev/null +++ b/Themes/modern/languages/Settings.russian.php @@ -0,0 +1,7 @@ +
    Thanks go to Babylonking and Alienine.'; + +?> diff --git a/Themes/modern/languages/Stats.english.php b/Themes/modern/languages/Stats.english.php new file mode 100644 index 0000000..1494b1b --- /dev/null +++ b/Themes/modern/languages/Stats.english.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/Themes/modern/languages/Stats.russian.php b/Themes/modern/languages/Stats.russian.php new file mode 100644 index 0000000..62cdb3e --- /dev/null +++ b/Themes/modern/languages/Stats.russian.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/Themes/modern/languages/Themes.english.php b/Themes/modern/languages/Themes.english.php new file mode 100644 index 0000000..315fd83 --- /dev/null +++ b/Themes/modern/languages/Themes.english.php @@ -0,0 +1,89 @@ +On the right, you can modify the settings for your themes.'; + +$txt['theme_allow'] = 'Allow members to select their own themes.'; +$txt['theme_default'] = 'Allow members to select the "Default" theme.'; +$txt['theme_guests'] = 'Overall forum default'; +$txt['theme_select'] = 'choose...'; +$txt['theme_reset'] = 'Reset everyone to'; +$txt['theme_nochange'] = 'No change'; +$txt['theme_forum_default'] = 'Forum Default'; + +$txt['theme_settings'] = 'settings'; +$txt['theme_remove'] = 'remove'; +$txt['theme_remove_confirm'] = 'Are you sure you want to permanently remove this theme?'; + +$txt['theme_install'] = 'Install a New Theme'; +$txt['theme_install_file'] = 'From a file'; +$txt['theme_install_dir'] = 'From a directory on the server'; +$txt['theme_install_error'] = 'That theme directory doesn\'t exist, or doesn\'t contain a theme!'; +$txt['theme_install_write_error'] = 'The Themes directory must be writable to continue!'; +$txt['theme_install_go'] = 'Install!'; +$txt['theme_install_new'] = 'Create a copy of Default named'; +$txt['theme_install_new_confirm'] = 'Install a new theme?'; +$txt['theme_install_writable'] = 'Warning - you cannot create or install a new theme as your themes directory is not currently writable!'; +$txt['theme_installed'] = 'Installed Successfully'; +$txt['theme_installed_message'] = 'was installed successfully.'; + +$txt['theme_latest'] = 'Latest and Greatest Themes'; +$txt['theme_latest_fetch'] = 'Fetching latest themes from www.simplemachines.org...'; + +$txt['theme_pick'] = 'Choose a theme...'; +$txt['theme_preview'] = 'preview »'; +$txt['theme_set'] = 'use this theme'; +$txt['theme_user'] = 'person is using this theme.'; +$txt['theme_users'] = 'people are using this theme.'; + +$txt['theme_edit'] = 'Edit Theme'; +$txt['theme_edit_style'] = 'Modify the style.css file. (colors, fonts, etc.)'; +$txt['theme_edit_index'] = 'Modify the index template. (the main template)'; +$txt['theme_edit_no_save'] = 'This file cannot be saved because it is not writable! Please make sure the following file is 777 or has the proper permissions'; +$txt['theme_edit_save'] = 'Save Changes'; + +$txt['theme_global_description'] = 'This is the default theme, which means your theme will change along with the administrators\' settings and the board you are viewing.'; + +$txt['theme5'] = 'Theme URLs and Configuration'; +$txt['theme6'] = 'Theme Options and Preferences'; +$txt['actual_theme_name'] = 'This theme\'s name: '; +$txt['actual_theme_dir'] = 'This theme\'s directory: '; +$txt['actual_theme_url'] = 'This theme\'s URL: '; +$txt['actual_images_url'] = 'This theme\'s images URL: '; + +$txt['additional_options_collapsable'] = 'Enable collapsable additional post options'; +$txt['allow_no_censored'] = 'Allow users to turn off word censoring?'; +$txt['who_display_viewing'] = 'Show who is viewing the board index and posts'; +$txt['who_display_viewing_off'] = 'Don\'t show'; +$txt['who_display_viewing_numbers'] = 'Show only numbers'; +$txt['who_display_viewing_names'] = 'Show member names'; +$txt['smf93'] = 'Disable recent posts'; +$txt['smf94'] = 'Enable single post'; +$txt['smf95'] = 'Enable multiple posts'; +$txt['smf105'] = 'Enable inline links'; +$txt['smf106'] = 'Enabling this will cause your current location to be drawn in a single line, as opposed to in a tree-like manner.'; +$txt['smf200'] = 'Enable SP1 style statistics on board index'; +$txt[382] = 'Show latest member on board index'; +$txt[383] = 'Show last modification date on modified posts'; +$txt[384] = 'Show user avatars in message view'; +$txt[385] = 'Show personal text in message view'; +$txt[386] = 'Show gender images in message view'; +$txt[387] = 'Show news fader on board index'; +$txt[510] = 'Show members list bar on board index?'; +$txt[522] = 'Show current position in forum as link instead of text?'; +$txt[523] = 'Show view profile button under post?'; +$txt[618] = 'Enable and show \'Mark as Read\' buttons?'; +$txt['number_recent_posts'] = 'Number of recent posts to display on board index:'; +$txt['number_recent_posts_desc'] = 'To disable the recent posts bar set this value to zero.'; +$txt['hide_post_group'] = 'Hide post group titles for grouped members?'; +$txt['hide_post_group_desc'] = 'Enabling this will not display a members post group title on the message view if they are assigned to a non-post based group.'; + +$txt['theme_options_reset_link'] = 'Reset member specific options for all members.'; +$txt['theme_options_reset'] = 'Resetting options for everyone. To change an option, first check the box to the left of it. This signifies that, for all members, this option should be changed. Next, specify what you want the option to be. If the first checkbox is not checked, the option will be left as it is for each member.'; +$txt['theme_options_defaults_link'] = 'Change the default member specific options.'; +$txt['theme_options_defaults'] = 'These are the default values for some member specific settings. Changing these will only affect new members and guests.'; +$txt['theme_options_title'] = 'Change or reset default options'; +$txt['theme_settings_link'] = 'Back to this theme\'s general settings. (save first!)'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Themes.russian.php b/Themes/modern/languages/Themes.russian.php new file mode 100644 index 0000000..b4013dd --- /dev/null +++ b/Themes/modern/languages/Themes.russian.php @@ -0,0 +1,89 @@ +Справа, Вы можете изменить настройки для Ваших тем.'; + +$txt['theme_allow'] = 'Позволить участникам выбирать их собственные темы.'; +$txt['theme_default'] = 'Позволить участникам выбирать тему "По умолчанию".'; +$txt['theme_guests'] = 'Вид форума по дефолту'; +$txt['theme_select'] = 'выбрать...'; +$txt['theme_reset'] = 'Изменить всем на'; +$txt['theme_nochange'] = 'Не менять'; +$txt['theme_forum_default'] = 'Форум По Умолчанию'; + +$txt['theme_settings'] = 'настройки'; +$txt['theme_remove'] = 'убрать'; +$txt['theme_remove_confirm'] = 'Вы уверены, что хотите навсегда убрать эту тему?'; + +$txt['theme_install'] = 'Установить Новую Тему'; +$txt['theme_install_file'] = 'Из файла'; +$txt['theme_install_dir'] = 'Из директории на сервере'; +$txt['theme_install_error'] = 'Эта директория темы не существует или не содержит тему!'; +$txt['theme_install_write_error'] = 'Директория темы должна быть записываема для продолжения!'; +$txt['theme_install_go'] = 'Установитьl!'; +$txt['theme_install_new'] = 'Создать копию темы по умолчанию и назвать ее'; +$txt['theme_install_new_confirm'] = 'Установить новую тему?'; +$txt['theme_install_writable'] = 'Внимание - Вы не можете создать или установить новую тему, так как Ваша директория для тем не записываема!'; +$txt['theme_installed'] = 'Успешно Установлена'; +$txt['theme_installed_message'] = 'была успешно установлена.'; + +$txt['theme_latest'] = 'Последние и Лучшие Темы'; +$txt['theme_latest_fetch'] = 'Заманиваем последние темы с www.simplemachines.org...'; + +$txt['theme_pick'] = 'Выбрать тему...'; +$txt['theme_preview'] = 'просмотр »'; +$txt['theme_set'] = 'использовать эту тему'; +$txt['theme_user'] = 'человек использует эту тему.'; +$txt['theme_users'] = 'людей использует эту тему.'; + +$txt['theme_edit'] = 'Редактировать Тему'; +$txt['theme_edit_style'] = 'Измените файл style.css. (цвета, шрифты и т.д.)'; +$txt['theme_edit_index'] = 'Измените шаблон главной страницы. (главный шаблон)'; +$txt['theme_edit_no_save'] = 'Этот файл не может быть сохранен, так как он не записываемый! Пожалуйста, убедитесь, что следующий файл CHMOD 777 или имеет соответствующие возможности'; +$txt['theme_edit_save'] = 'Сохранить Изменения'; + +$txt['theme_global_description'] = 'Это тема по умолчанию, это значит, что тема будет изменяться вместе с настройками администратора и форумом, который Вы смотрите.'; + +$txt['theme5'] = 'URLы Темы и Конфигурация'; +$txt['theme6'] = 'Опции и Предпочтения Темы'; +$txt['actual_theme_name'] = 'Название этой темы: '; +$txt['actual_theme_dir'] = 'Директория этой темы: '; +$txt['actual_theme_url'] = 'URL этой темы: '; +$txt['actual_images_url'] = 'URL картинок этой темы: '; + +$txt['additional_options_collapsable'] = 'Включить разделяющиеся дополнительные опции сообщения'; +$txt['allow_no_censored'] = 'Позволять пользователям отключать цензуру слов?'; +$txt['who_display_viewing'] = 'Показывать, кто смотрит страницу форума и сообщения'; +$txt['who_display_viewing_off'] = 'Не показывать'; +$txt['who_display_viewing_numbers'] = 'Показывать только количество'; +$txt['who_display_viewing_names'] = 'Показывать имена участников'; +$txt['smf93'] = 'Отключить недавние сообщения'; +$txt['smf94'] = 'Включить одиночное сообщение'; +$txt['smf95'] = 'Включить множественные сообщения'; +$txt['smf105'] = 'Включить однострочные ссылки'; +$txt['smf106'] = 'Включив эту опцию, Ваше текущее положение будет показываться в одну линию, вместо древовидной структуры.'; +$txt['smf200'] = 'Включить стиль SP1 статистики на странице форума'; +$txt[382] = 'Показывать последних участников на странице форума'; +$txt[383] = 'Показывать последнюю дату изменения в измененных сообщениях'; +$txt[384] = 'Показывать аватары пользователей при просмотре сообщений'; +$txt[385] = 'Показывать личный текст при просмотре сообщений'; +$txt[386] = 'Показывать пол при просмотре сообщений'; +$txt[387] = 'Показывать новостную панель на главной странице форума'; +$txt[510] = 'Показывать бар списка пользователей на главной странице форума?'; +$txt[522] = 'Показывать текущую позицию на форуме как ссылку, вместо текста?'; +$txt[523] = 'Показывать кнопку просмотра профиля под сообщением?'; +$txt[618] = 'Включить и отображать \'Отметить как Прочтенное\' кнопки?'; +$txt['number_recent_posts'] = 'Количество недавних сообщений, отображаемых на главной странице форума:'; +$txt['number_recent_posts_desc'] = 'Чтобы отключить бар недавних сообщений, установите это значение на ноль.'; +$txt['hide_post_group'] = 'Скрывать групповые титулы для участников групп?'; +$txt['hide_post_group_desc'] = 'Включив это, не будет отображаться групповой титул в сообщениях участников при просмотре сообщения, если они прикреплены к группе не зависящей от количества сообщений.'; + +$txt['theme_options_reset_link'] = 'Сбросить специальные опции участника для всех участников.'; +$txt['theme_options_reset'] = 'Сбрасываются опции для всех. Для изменения опции, сначала проверьте опции справа. Это обозначает, что для всех данная опция должна быть изменена. Потом, выберите, какой должна быть опция. Если первая ячейка не отмечена, опция останется, той же для всех участников.'; +$txt['theme_options_defaults_link'] = 'Измените первоначальные специальные опции участника.'; +$txt['theme_options_defaults'] = 'Это значения по умолчанию для некоторых специальных настроек участника. Эти изменения затронут только новых пользователей и гостей.'; +$txt['theme_options_title'] = 'Измените или сбросьте значения по умолчанию'; +$txt['theme_settings_link'] = 'Назад в основные настройки этой темы. (сохраните сперва!)'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Who.english.php b/Themes/modern/languages/Who.english.php new file mode 100644 index 0000000..d1c09dc --- /dev/null +++ b/Themes/modern/languages/Who.english.php @@ -0,0 +1,102 @@ +Nothing, or nothing you can see...'; +$txt['who_unknown'] = 'Unknown Action'; +$txt['who_user'] = 'User'; +$txt['who_time'] = 'Time'; +$txt['who_action'] = 'Action'; + +$txt['whoall_activate'] = 'Activating their account.'; +$txt['whoall_help'] = 'Viewing the help page.'; +$txt['whoall_helpadmin'] = 'Viewing the admin help pages.'; +$txt['whoall_pm'] = 'Viewing their messages.'; +$txt['whoall_login'] = 'Logging into the forum.'; +$txt['whoall_login2'] = 'Logging into the forum.'; +$txt['whoall_logout'] = 'Logging out of the forum.'; +$txt['whoall_markasread'] = 'Marking topics read.'; +$txt['whoall_news'] = 'Viewing the news.'; +$txt['whoall_notify'] = 'Changing their notification settings.'; +$txt['whoall_notifyboard'] = 'Changing their notification settings.'; +$txt['whoall_recent'] = 'Viewing a list of recent topics.'; +$txt['whoall_register'] = 'Registering for an account on the forum.'; +$txt['whoall_register2'] = 'Registering for an account on the forum.'; +$txt['whoall_reminder'] = 'Requesting a password reminder.'; +$txt['whoall_repottm'] = 'Reporting a topic to a moderator.'; +$txt['whoall_spellcheck'] = 'Using the spellchecker'; +$txt['whoall_unread'] = 'Viewing unread topics since their last visit.'; +$txt['whoall_unreadreplies'] = 'Viewing unread replies since their last visit.'; +$txt['whoall_who'] = 'Viewing Who\'s Online.'; +$txt['whoall_.xml'] = 'Viewing an XML feed.'; + +$txt['whoadmin_viewkarma'] = 'Viewing Karmachange Description log.'; +$txt['whoall_modifykarma'] = 'Changing karma.'; + +$txt['whoall_googlemap'] = 'Viewing the Member Map.'; +$txt['whoall_.kml'] = 'Viewing the Google Earth Feed.'; + +$txt['whoall_collapse_collapse'] = 'Collapsing a category.'; +$txt['whoall_collapse_expand'] = 'Expanding a category.'; +$txt['whoall_pm_removeall'] = 'Removing all their messages.'; +$txt['whoall_pm_send'] = 'Sending a message.'; +$txt['whoall_pm_send2'] = 'Sending a message.'; + +$txt['whotopic_dlattach'] = 'Viewing an attachment.'; +$txt['whotopic_editpoll'] = 'Editing the poll in "%s".'; +$txt['whotopic_mergetopics'] = 'Merging the topic "%s" with another topic.'; +$txt['whotopic_movetopic'] = 'Moving the topic "%s" to another board.'; +$txt['whotopic_post'] = 'Posting in %s.'; +$txt['whotopic_post2'] = 'Posting in %s.'; +$txt['whotopic_printpage'] = 'Printing the topic "%s".'; +$txt['whotopic_splittopics'] = 'Splitting the topic "%s" into two topics.'; +$txt['whotopic_vote'] = 'Voting in %s.'; + +$txt['whopost_quotefast'] = 'Quoting a post from "%s".'; + +$txt['whoadmin_detailedversion'] = 'Doing a detailed version check.'; +$txt['whoadmin_dumpdb'] = 'Backing up the database to file.'; +$txt['whoadmin_editagreement'] = 'Editing the registration agreement.'; +$txt['whoadmin_modifyModSettings'] = 'Editing forum features and options.'; +$txt['whoadmin_modifyModSettings2'] = 'Editing forum features and options.'; +$txt['whoadmin_modlog'] = 'Viewing the moderator log.'; +$txt['whoadmin_modsettings'] = 'Editing the forum settings.'; +$txt['whoadmin_packageget'] = 'Getting packages.'; +$txt['whoadmin_packages'] = 'Viewing the package manager.'; +$txt['whoadmin_permissions'] = 'Editing the forum permissions.'; +$txt['whoadmin_pgadd'] = 'Adding a package.'; +$txt['whoadmin_pgbrowse'] = 'Browsing the package server.'; +$txt['whoadmin_pgdownload'] = 'Downloading a package.'; +$txt['whoadmin_pgremove'] = 'Removing a package.'; +$txt['whoadmin_theme'] = 'Editing the theme settings.'; +$txt['whoadmin_trackip'] = 'Tracking an IP address.'; + +$txt['whoallow_manageboards'] = 'Editing the board and category settings.'; +$txt['whoallow_admin'] = 'Viewing the admin page.'; +$txt['whoallow_ban'] = 'Editing the ban list.'; +$txt['whoallow_boardrecount'] = 'Recounting the forum totals.'; +$txt['whoallow_calendar'] = 'Viewing the calendar.'; +$txt['whoallow_editnews'] = 'Editing the news.'; +$txt['whoallow_mailing'] = 'Sending a forum email.'; +$txt['whoallow_maintain'] = 'Performing routine forum maintenance.'; +$txt['whoallow_manageattachments'] = 'Managing the attachments.'; +$txt['whoallow_mlist'] = 'Viewing the memberlist.'; +$txt['whoallow_optimizetables'] = 'Optimizing the database tables.'; +$txt['whoallow_repairboards'] = 'Repairing the database tables.'; +$txt['whoallow_search'] = 'Searching the forum.'; +$txt['whoallow_search2'] = 'Viewing the results of a search.'; +$txt['whoallow_sendtopic'] = 'Sending a topic to a friend.'; +$txt['whoallow_setcensor'] = 'Editing the censor text.'; +$txt['whoallow_setreserve'] = 'Editing the reserved names.'; +$txt['whoallow_stats'] = 'Viewing the forum stats.'; +$txt['whoallow_viewErrorLog'] = 'Viewing the error log.'; +$txt['whoallow_viewmembers'] = 'Viewing a list of members.'; + +$txt['who_topic'] = 'Viewing the topic %s.'; +$txt['who_board'] = 'Viewing the board %s.'; +$txt['who_index'] = 'Viewing the board index of ' . $context['forum_name'] . '.'; +$txt['who_viewprofile'] = 'Viewing %s\'s profile.'; +$txt['who_profile'] = 'Editing the profile of %s.'; +$txt['who_post'] = 'Posting a new topic in %s.'; +$txt['who_poll'] = 'Posting a new poll in %s.'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/Who.russian.php b/Themes/modern/languages/Who.russian.php new file mode 100644 index 0000000..f1bbb13 --- /dev/null +++ b/Themes/modern/languages/Who.russian.php @@ -0,0 +1,101 @@ +Ничего, или ничего что Вы можете видеть...'; +$txt['who_unknown'] = 'Неизвестное Действие'; +$txt['who_user'] = 'Пользователь'; +$txt['who_time'] = 'Время'; +$txt['who_action'] = 'Действие'; + +$txt['whoall_activate'] = 'Активирует свой аккаунт.'; +$txt['whoall_help'] = 'Смотрит страницу помощи.'; +$txt['whoall_helpadmin'] = 'Смотрит страницу помощи администрирования.'; +$txt['whoall_pm'] = 'Смотрит свои личные сообщения.'; +$txt['whoall_login'] = 'Входит на форум.'; +$txt['whoall_login2'] = 'Входит на форум.'; +$txt['whoall_logout'] = 'Выходит с форума.'; +$txt['whoall_markasread'] = 'Помечает темы как прочитанные.'; +$txt['whoall_news'] = 'Смотрит новости.'; +$txt['whoall_notify'] = 'Изменяет свои настройки извещений.'; +$txt['whoall_notifyboard'] = 'Изменяет свои настройки извещений.'; +$txt['whoall_recent'] = 'Смотрит список недавних сообщений.'; +$txt['whoall_register'] = 'Регистрирует аккаунт на форуме.'; +$txt['whoall_register2'] = 'Регистрирует аккаунт на форуме.'; +$txt['whoall_reminder'] = 'Запрашивает восстановление пароля.'; +$txt['whoall_repottm'] = 'Сообщает о теме модератору.'; +$txt['whoall_spellcheck'] = 'Проверяет орфографию'; +$txt['whoall_unread'] = 'Смотрит нечитанные темы с даты последнего посещения.'; +$txt['whoall_unreadreplies'] = 'Смотрит нечитанные ответы с даты последнего посещения.'; +$txt['whoall_who'] = 'Смотрит Кто Online.'; +$txt['whoall_.xml'] = 'Смотрит XML данные.'; + +$txt['whoall_collapse_collapse'] = 'Разбивает категорию.'; +$txt['whoall_collapse_expand'] = 'Расширяет категорию.'; +$txt['whoall_pm_removeall'] = 'Удаляет все свои сообщения.'; +$txt['whoall_pm_send'] = 'Отправляет личное сообщение.'; +$txt['whoall_pm_send2'] = 'Отправляет личное сообщение.'; + +$txt['whotopic_dlattach'] = 'Смотрит вложение.'; +$txt['whotopic_editpoll'] = 'Редактирует опрос в "%s".'; +$txt['whotopic_mergetopics'] = 'Соединяет тему "%s" с другой темой.'; +$txt['whotopic_movetopic'] = 'Перемещает тему "%s" на другой форум.'; +$txt['whotopic_post'] = 'Пишет сообщение в %s.'; +$txt['whotopic_post2'] = 'Пишет сообщение в %s.'; +$txt['whotopic_printpage'] = 'Печатает тему "%s".'; +$txt['whotopic_splittopics'] = 'Разделяет тему "%s" на две темы.'; +$txt['whotopic_vote'] = 'Голосует в %s.'; + +$txt['whopost_quotefast'] = 'Цитирует сообщение из "%s".'; + +$txt['whoadmin_detailedversion'] = 'Делает детальную проверку версии.'; +$txt['whoadmin_dumpdb'] = 'Делает бекап Базы Данных в файл.'; +$txt['whoadmin_editagreement'] = 'Редактирует регистрационное соглашение.'; +$txt['whoadmin_modifyModSettings'] = 'Редактирует настройки и опции форума.'; +$txt['whoadmin_modifyModSettings2'] = 'Редактирует настройки и опции форума.'; +$txt['whoadmin_modlog'] = 'Просматривает лог модерирования.'; +$txt['whoadmin_modsettings'] = 'Редактирует настройки форума.'; +$txt['whoadmin_packageget'] = 'Получает пакеты.'; +$txt['whoadmin_packages'] = 'Смотрит менеджер пакетов.'; +$txt['whoadmin_permissions'] = 'Редактирует права на форума.'; +$txt['whoadmin_pgadd'] = 'Добавляет пакет.'; +$txt['whoadmin_pgbrowse'] = 'Просматривает сервер пакетов.'; +$txt['whoadmin_pgdownload'] = 'Загружает пакет.'; +$txt['whoadmin_pgremove'] = 'Удаляет пакет.'; +$txt['whoadmin_theme'] = 'Редактирует настройки темы.'; +$txt['whoadmin_trackip'] = 'Отслеживает IP адрес.'; + +$txt['whoallow_manageboards'] = 'Редактирует настройки форума и категорий.'; +$txt['whoallow_admin'] = 'Смотрит страницу администрирования.'; +$txt['whoallow_ban'] = 'Редактирует список бана.'; +$txt['whoallow_boardrecount'] = 'Пересчитывает данные форума.'; +$txt['whoallow_calendar'] = 'Смотрит календарь.'; +$txt['whoallow_editnews'] = 'Редактирует новости.'; +$txt['whoallow_mailing'] = 'Отправляет email с форума.'; +$txt['whoallow_maintain'] = 'Выполняет рутинную техподдержку.'; +$txt['whoallow_manageattachments'] = 'Управляет вложениями.'; +$txt['whoallow_mlist'] = 'Смотрит список участников.'; +$txt['whoallow_optimizetables'] = 'Оптимизирует таблицы базы данных.'; +$txt['whoallow_repairboards'] = 'Чинит таблицы базы данных.'; +$txt['whoallow_search'] = 'Ищет на форуме.'; +$txt['whoallow_search2'] = 'Смотрит результаты поиска.'; +$txt['whoallow_sendtopic'] = 'Отправляет тему другу.'; +$txt['whoallow_setcensor'] = 'Редактирует текст цензуры.'; +$txt['whoallow_setreserve'] = 'Редактирует зарезервированные имена.'; +$txt['whoallow_stats'] = 'Смотрит статистику форума.'; +$txt['whoallow_viewErrorLog'] = 'Смотрит лог ошибок.'; +$txt['whoallow_viewmembers'] = 'Смотрит список участников.'; + +$txt['who_topic'] = 'Смотрит тему %s.'; +$txt['who_board'] = 'Смотрит форум %s.'; +$txt['who_index'] = 'Смотрит главную страницу форума ' . $context['forum_name'] . '.'; +$txt['who_viewprofile'] = 'Смотрит профиль участника %s.'; +$txt['who_profile'] = 'Редактирует профиль %s.'; +$txt['who_post'] = 'Создает новую тему в разделе %s.'; +$txt['who_poll'] = 'Создает новый опрос в разделе %s.'; + +$txt['whoall_googlemap'] = 'Viewing the Member Map.'; + +$txt['whoadmin_viewkarma'] = 'viewing karmachange description log.'; +$txt['whoall_modifykarma'] = 'changing karma.'; + +?> diff --git a/Themes/modern/languages/Wireless.english.php b/Themes/modern/languages/Wireless.english.php new file mode 100644 index 0000000..cf0708e --- /dev/null +++ b/Themes/modern/languages/Wireless.english.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/Themes/modern/languages/Wireless.russian.php b/Themes/modern/languages/Wireless.russian.php new file mode 100644 index 0000000..8cd0d02 --- /dev/null +++ b/Themes/modern/languages/Wireless.russian.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/Themes/modern/languages/index.english.php b/Themes/modern/languages/index.english.php new file mode 100644 index 0000000..cd1a773 --- /dev/null +++ b/Themes/modern/languages/index.english.php @@ -0,0 +1,647 @@ + 'January'. (or translated, of course.) +$months = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); +$months_short = array(1 => 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); + +$txt['newmessages0'] = 'is new'; +$txt['newmessages1'] = 'are new'; +$txt['newmessages3'] = 'New'; +$txt['newmessages4'] = ','; + +$txt[2] = 'Admin'; + +$txt[10] = 'Save'; + +$txt[17] = 'Modify'; +$txt[18] = $context['forum_name'] . ' - Index'; +$txt[19] = 'Members'; +$txt[20] = 'Board name'; +$txt[21] = 'Posts'; +$txt[22] = 'Last post'; + +$txt[24] = '(No subject)'; +$txt[26] = 'Posts'; +$txt[27] = 'View Profile'; +$txt[28] = 'Guest'; +$txt[29] = 'Author'; +$txt[30] = 'on'; +$txt[31] = 'Remove'; +$txt[33] = 'Start new topic'; + +$txt[34] = 'Login'; +$txt[35] = 'Username'; +$txt[36] = 'Password'; + +$txt[40] = 'That username does not exist.'; + +$txt[62] = 'Board Moderator'; +$txt[63] = 'Remove Topic'; +$txt[64] = 'Topics'; +$txt[66] = 'Modify message'; +$txt[68] = 'Name'; +$txt[69] = 'Email'; +$txt[70] = 'Subject'; +$txt[72] = 'Message'; + +$txt[79] = 'Edit Profile'; + +$txt[81] = 'Choose password'; +$txt[82] = 'Verify password'; +$txt[87] = 'Position'; + +$txt[92] = 'View the profile of'; +$txt[94] = 'Total'; +$txt[95] = 'Posts'; +$txt[96] = 'Website'; +$txt[97] = 'Register'; + +$txt[101] = 'Message Index'; +$txt[102] = 'News'; +$txt[103] = 'Home'; + +$txt[104] = 'Lock/Unlock Topic'; +$txt[105] = 'Post'; +$txt[106] = 'An Error Has Occurred!'; +$txt[107] = 'at'; +$txt[108] = 'Logout'; +$txt[109] = 'Started by'; +$txt[110] = 'Replies'; +$txt[111] = 'Last post'; +$txt[114] = 'Administration Login'; +$txt[118] = 'Topic'; +$txt[119] = 'Help'; +$txt[121] = 'Remove message'; +$txt[125] = 'Notify'; +$txt[126] = 'Do you want a notification email if someone replies to this topic?'; +$txt[130] = "Regards,\nThe " . $context['forum_name'] . ' Team.'; +$txt[131] = 'Notify of replies'; +$txt[132] = 'Move Topic'; +$txt[133] = 'Move to'; +$txt[139] = 'Pages'; +$txt[140] = 'Users active in past ' . $modSettings['lastActive'] . ' minutes'; +$txt[144] = 'Personal Messages'; +$txt[145] = 'Reply with quote'; +$txt[146] = 'Reply'; + +$txt[151] = 'No messages...'; +$txt[152] = 'you have'; +$txt[153] = 'messages'; +$txt[154] = 'Remove this message'; + +$txt[158] = 'Users Online'; +$txt[159] = 'Personal Message'; +$txt[160] = 'Jump to'; +$txt[161] = 'go'; +$txt[162] = 'Are you sure you want to remove this topic?'; +$txt[163] = 'Yes'; +$txt[164] = 'No'; + +$txt[166] = 'Search Results'; +$txt[167] = 'End of results'; +$txt[170] = 'Sorry, no matches were found'; +$txt[176] = 'on'; + +$txt[182] = 'Search'; +$txt[183] = 'Set Search Parameters'; +$txt[189] = 'Choose a board to search in, or search all'; +$txt[190] = 'All'; + +$txt[193] = 'Back'; +$txt[194] = 'reminder'; +$txt[195] = 'Topic started by'; +$txt[196] = 'Title'; +$txt[197] = 'Post by'; +$txt[200] = 'Searchable list of all registered members.'; +$txt[201] = 'Please welcome'; +$txt[208] = 'Administration Center'; +$txt[209] = 'I\'m a llama!'; +$txt[211] = 'Last Edit'; +$txt[212] = 'Would you like to deactivate Notification on this topic?'; + +$txt[214] = 'Recent Posts'; + +$txt[227] = 'Location'; +$txt[231] = 'Gender'; +$txt[233] = 'Date Registered'; + +$txt[234] = 'View the 10 most recent posts on the forum.'; +$txt[235] = 'is the most recently updated topic'; +$txt[236] = 'Return'; +$txt[237] = 'to the board index.'; + +$txt[238] = 'Male'; +$txt[239] = 'Female'; + +$txt[240] = 'Invalid character used in Username.'; + +$txt['welcome_guest'] = 'Welcome, ' . $txt[28] . '. Please login or register.'; +$txt['welcome_guest_activate'] = '
    Did you miss your activation email?'; +$txt['hello_member'] = 'Hey,'; +$txt['hello_guest'] = 'Welcome,'; +$txt[247] = 'Hey,'; +$txt[248] = 'Welcome,'; +$txt[249] = 'Please'; +$txt[250] = 'Back'; +$txt[251] = 'Please select a destination'; + +$txt[279] = 'Posted by'; + +$txt[287] = 'Smiley'; +$txt[288] = 'Angry'; +$txt[289] = 'Cheesy'; +$txt[290] = 'Laugh'; +$txt[291] = 'Sad'; +$txt[292] = 'Wink'; +$txt[293] = 'Grin'; +$txt[294] = 'Shocked'; +$txt[295] = 'Cool'; +$txt[296] = 'Huh'; +$txt[450] = 'Roll Eyes'; +$txt[451] = 'Tongue'; +$txt[526] = 'Embarrassed'; +$txt[527] = 'Lips sealed'; +$txt[528] = 'Undecided'; +$txt[529] = 'Kiss'; +$txt[530] = 'Cry'; + +$txt[298] = 'Moderator'; +$txt[299] = 'Moderators'; + +$txt[300] = 'Mark Topics as Read for this Board'; +$txt[301] = 'Views'; +$txt[302] = 'New'; + +$txt[303] = 'View All Users'; +$txt[305] = 'View'; +$txt[307] = 'Email'; + +$txt[308] = 'Viewing Members'; +$txt[309] = 'of'; +$txt[310] = 'total members'; +$txt[311] = 'to'; +$txt[315] = 'Forgot your password?'; + +$txt[317] = 'Date'; +$txt[318] = 'From'; +$txt[319] = 'Subject'; +$txt[322] = 'Check for new messages'; +$txt[324] = 'To'; + +$txt[330] = 'Topics'; +$txt[331] = 'Members'; +$txt[332] = 'Members List'; +$txt[333] = 'New Posts'; +$txt[334] = 'No New Posts'; + +$txt['sendtopic_send'] = 'Send'; +$txt[343] = 'Match all words'; +$txt[344] = 'Match any words'; + +$txt[371] = 'Time Offset'; +$txt[377] = 'or'; + +$txt[398] = 'Sorry, no matches were found'; + +$txt[418] = 'Notification'; + +$txt[430] = 'Sorry %s, you are banned from using this forum!'; + +$txt[452] = 'Mark ALL messages as read'; + +$txt[454] = 'Hot Topic (More than ' . $modSettings['hotTopicPosts'] . ' Replies)'; +$txt[455] = 'Very Hot Topic (More than ' . $modSettings['hotTopicVeryPosts'] . ' Replies)'; +$txt[456] = 'Locked Topic'; +$txt[457] = 'Normal Topic'; +$txt['participation_caption'] = 'Topic you have posted in'; + +$txt[462] = 'GO'; + +$txt[465] = 'Print'; +$txt[467] = 'Profile'; +$txt[468] = 'Topic Summary'; +$txt[470] = 'N/A'; +$txt[471] = 'message'; +$txt[473] = 'This name is already in use by another member.'; + +$txt[488] = 'Total Members'; +$txt[489] = 'Total Posts'; +$txt[490] = 'Total Topics'; + +$txt[497] = 'Minutes to stay logged in'; + +$txt[507] = 'Preview'; +$txt[508] = 'Always stay logged in'; + +$txt[511] = 'Logged'; +$txt[512] = 'IP'; + +$txt[513] = 'ICQ'; +$txt[515] = 'WWW'; + +$txt[525] = 'by'; + +$txt[578] = 'hours'; +$txt[579] = 'days'; + +$txt[581] = ', our newest member.'; + +$txt[582] = 'Search for'; +$txt[583] = 'by user'; + +$txt[603] = 'AIM'; +// In this string, please use +'s for spaces. +$txt['aim_default_message'] = 'Hi.+Are+you+there?'; +$txt[604] = 'YIM'; + +$txt[616] = 'Remember, this forum is in \'Maintenance Mode\'.'; + +$txt[641] = 'Read'; +$txt[642] = 'times'; + +$txt[645] = 'Forum Stats'; +$txt[656] = 'Latest Member'; +$txt[658] = 'Total Categories'; +$txt[659] = 'Latest Post'; + +$txt[660] = 'You\'ve got'; +$txt[661] = 'Click'; +$txt[662] = 'here'; +$txt[663] = 'to view them.'; + +$txt[665] = 'Total Boards'; + +$txt[668] = 'Print Page'; + +$txt[679] = 'This must be a valid email address.'; + +$txt[683] = 'I am a geek!!'; +$txt[685] = $context['forum_name'] . ' - Info Center'; + +$txt[707] = 'Send this topic'; + +$txt['sendtopic_title'] = 'Send the topic "%s" to a friend.'; +$txt['sendtopic_dear'] = 'Dear %s,'; +$txt['sendtopic_this_topic'] = 'I want you to check out "%s" on ' . $context['forum_name'] . '. To view it, please click this link'; +$txt['sendtopic_thanks'] = 'Thanks'; +$txt['sendtopic_sender_name'] = 'Your name'; +$txt['sendtopic_sender_email'] = 'Your email address'; +$txt['sendtopic_receiver_name'] = 'Recipient\'s name'; +$txt['sendtopic_receiver_email'] = 'Recipient\'s email address'; +$txt['sendtopic_comment'] = 'Add a comment'; +$txt['sendtopic2'] = 'A comment has also been added regarding this topic'; + +$txt[721] = 'Hide email address from public?'; + +$txt[737] = 'Check all'; + +$txt[1001] = 'Database Error'; +$txt[1002] = 'Please try again. If you come back to this error screen, report the error to an administrator.'; +$txt[1003] = 'File'; +$txt[1004] = 'Line'; +$txt[1005] = 'SMF has detected and automatically tried to repair an error in your database. If you continue to have problems, or continue to receive these emails, please contact your host.'; +$txt['database_error_versions'] = 'Note: It appears that your database may require an upgrade. Your forum files are currently at version ' . $forum_version . ', whereas your database is at version SMF ' . $modSettings['smfVersion'] . '. It is recommended that you execute the latest version of upgrade.php.'; +$txt['template_parse_error'] = 'Template Parse Error!'; +$txt['template_parse_error_message'] = 'It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

    You can also try refreshing this page.'; +$txt['template_parse_error_details'] = 'There was a problem loading the %1$s template or language file. Please check the syntax and try again - remember, single quotes (\') often have to be escaped with a slash (\\). To see more specific error information from PHP, try accessing the file directly.

    You may want to try to refresh this page or use the default theme.'; + +$txt['smf10'] = 'Today at '; +$txt['smf10b'] = 'Yesterday at '; +$txt['smf20'] = 'Post new poll'; +$txt['smf21'] = 'Question'; +$txt['smf23'] = 'Submit Vote'; +$txt['smf24'] = 'Total Votes'; +$txt['smf25'] = 'shortcuts: hit alt+s to submit/post or alt+p to preview'; +$txt['smf29'] = 'View results.'; +$txt['smf30'] = 'Lock Voting'; +$txt['smf30b'] = 'Unlock Voting'; +$txt['smf39'] = 'Edit Poll'; +$txt['smf43'] = 'Poll'; +$txt['smf47'] = '1 Day'; +$txt['smf48'] = '1 Week'; +$txt['smf49'] = '1 Month'; +$txt['smf50'] = 'Forever'; +$txt['smf52'] = 'Login with username, password and session length'; +$txt['smf53'] = '1 Hour'; +$txt['smf56'] = 'MOVED'; +$txt['smf57'] = 'Please enter a brief description as to
    why this topic is being moved.'; +$txt['smf60'] = 'Sorry, you don\'t have enough posts to modify karma - you need at least '; +$txt['smf62'] = 'Sorry, you can\'t repeat a karma action without waiting '; +$txt['smf82'] = 'Board'; +$txt['smf88'] = 'in'; +$txt['smf96'] = 'Sticky Topic'; + +$txt['smf138'] = 'Delete'; + +$txt['smf199'] = 'Your Personal Messages'; + +$txt['smf211'] = 'KB'; + +$txt['smf223'] = '[More Stats]'; + +$txt['smf238'] = 'Code'; +$txt['smf239'] = 'Quote from'; +$txt['smf240'] = 'Quote'; + +$txt['smf251'] = 'Split Topic'; +$txt['smf252'] = 'Merge Topics'; +$txt['smf252lnk'] = 'Link Topics'; +$txt['smf254'] = 'Subject For New Topic'; +$txt['smf255'] = 'Only split this post.'; +$txt['smf256'] = 'Split topic after and including this post.'; +$txt['smf257'] = 'Select posts to split.'; +$txt['smf258'] = 'New Topic'; +$txt['smf259'] = 'Topic successfully split into two topics.'; +$txt['smf260'] = 'Origin Topic'; +$txt['smf261'] = 'Please select which posts you wish to split.'; +$txt['smf264'] = 'Topics successfully merged.'; +$txt['smf265'] = 'Newly Merged Topic'; +$txt['smf266'] = 'Topic to be merged'; +$txt['smf267'] = 'Target board'; +$txt['smf269'] = 'Target topic'; +$txt['smf274'] = 'Are you sure you want to merge'; +$txt['smf275'] = 'with'; +$txt['smf276'] = 'This function will merge the messages of two topics into one topic. The messages will be sorted according to the time of posting. Therefore the earliest posted message will be the first message of the merged topic.'; + +$txt['smf277'] = 'Set topic sticky'; +$txt['smf278'] = 'Set topic non-sticky'; +$txt['smf279'] = 'Lock topic'; +$txt['smf280'] = 'Unlock topic'; + +$txt['smf298'] = 'Advanced search'; + +$txt['smf299'] = 'MAJOR SECURITY RISK:'; +$txt['smf300'] = 'You have not removed '; + +$txt['smf301'] = 'Page created in '; +$txt['smf302'] = ' seconds with '; +$txt['smf302b'] = ' queries.'; + +$txt['smf315'] = 'Use this function to inform the moderators and administrators of an abusive or wrongly posted message.
    Please note that your email address will be revealed to the moderators if you use this.'; + +$txt['online2'] = 'Online'; +$txt['online3'] = 'Offline'; +$txt['online4'] = 'Personal Message (Online)'; +$txt['online5'] = 'Personal Message (Offline)'; +$txt['online8'] = 'Status'; + +$txt['topbottom4'] = 'Go Up'; +$txt['topbottom5'] = 'Go Down'; + +$forum_copyright = $context['forum_name'] . ' | Powered by ' . $forum_version . '.
    +© 2001-2005, Lewis Media. All Rights Reserved.'; + +$txt['calendar3'] = 'Birthdays:'; +$txt['calendar4'] = 'Events:'; +$txt['calendar3b'] = 'Upcoming Birthdays:'; +$txt['calendar4b'] = 'Upcoming Events:'; +$txt['calendar5'] = ''; // Prompt for holidays in the calendar, leave blank to just display the holiday's name. +$txt['calendar9'] = 'Month:'; +$txt['calendar10'] = 'Year:'; +$txt['calendar11'] = 'Day:'; +$txt['calendar12'] = 'Event Title:'; +$txt['calendar13'] = 'Post In:'; +$txt['calendar20'] = 'Edit Event'; +$txt['calendar21'] = 'Delete this event?'; +$txt['calendar22'] = 'Delete Event'; +$txt['calendar23'] = 'Post Event'; +$txt['calendar24'] = 'Calendar'; +$txt['calendar37'] = 'Link to Calendar'; +$txt['calendar43'] = 'Link Event'; +$txt['calendar47'] = 'Upcoming Calendar'; +$txt['calendar47b'] = 'Today\'s Calendar'; +$txt['calendar51'] = 'Week'; +$txt['calendar54'] = 'Number of Days:'; +$txt['calendar_how_edit'] = 'how do you edit these events?'; + +$txt['moveTopic1'] = 'Post a redirection topic'; +$txt['moveTopic2'] = 'Change the topic\'s subject'; +$txt['moveTopic3'] = 'New subject'; +$txt['moveTopic4'] = 'Change every message\'s subject'; + +$txt['theme_template_error'] = 'Unable to load the \'%s\' template.'; +$txt['theme_language_error'] = 'Unable to load the \'%s\' language file.'; + +$txt['parent_boards'] = 'Child Boards'; + +$txt['smtp_no_connect'] = 'Could not connect to SMTP host'; +$txt['smtp_bad_response'] = 'Couldn\'t get mail server response codes'; +$txt['smtp_error'] = 'Ran into problems sending Mail. Error: '; +$txt['mail_send_unable'] = 'Unable to send mail to the email address \'%s\''; + +$txt['mlist_search'] = 'Search for users'; +$txt['mlist_search2'] = 'Search again'; +$txt['mlist_search_email'] = 'Search by email address'; +$txt['mlist_search_messenger'] = 'Search by messenger nickname'; +$txt['mlist_search_group'] = 'Search by position'; +$txt['mlist_search_name'] = 'Search by name'; +$txt['mlist_search_website'] = 'Search by website'; +$txt['mlist_search_results'] = 'Search results for'; + +$txt['attach_downloaded'] = 'downloaded'; +$txt['attach_viewed'] = 'viewed'; +$txt['attach_times'] = 'times'; + +$txt['MSN'] = 'MSN'; + +$txt['never'] = 'Never'; + +$txt['hostname'] = 'Hostname'; +$txt['you_are_post_banned'] = 'Sorry %s, you are banned from posting or sending personal messages on this forum.'; +$txt['ban_reason'] = 'Reason'; + +$txt['tables_optimized'] = 'Database tables optimized'; + +$txt['add_poll'] = 'Add poll'; +$txt['poll_options6'] = 'You may only select up to %s options.'; +$txt['poll_remove'] = 'Remove Poll'; +$txt['poll_remove_warn'] = 'Are you sure you want to remove this poll from the topic?'; +$txt['poll_results_expire'] = 'Results will be shown when voting has closed'; +$txt['poll_expires_on'] = 'Voting closes'; +$txt['poll_expired_on'] = 'Voting closed'; +$txt['poll_change_vote'] = 'Remove Vote'; + +$txt['quick_mod_remove'] = 'Remove selected'; +$txt['quick_mod_lock'] = 'Lock selected'; +$txt['quick_mod_sticky'] = 'Sticky selected'; +$txt['quick_mod_move'] = 'Move selected to'; +$txt['quick_mod_merge'] = 'Merge selected'; +$txt['quick_mod_go'] = 'Go!'; +$txt['quickmod_confirm'] = 'Are you sure you want to do this?'; + +$txt['spell_check'] = 'Spell Check'; + +$txt['quick_reply_1'] = 'Quick Reply'; +$txt['quick_reply_2'] = 'With a Quick-Reply you can use bulletin board code and smileys as you would in a normal post, but much more conveniently.'; +$txt['quick_reply_warning'] = 'Warning: this topic is currently locked!
    Only admins and moderators can reply.'; + +$txt['notification_enable_board'] = 'Are you sure you wish to enable notification of new topics for this board?'; +$txt['notification_disable_board'] = 'Are you sure you wish to disable notification of new topics for this board?'; +$txt['notification_enable_topic'] = 'Are you sure you wish to enable notification of new replies for this topic?'; +$txt['notification_disable_topic'] = 'Are you sure you wish to disable notification of new replies for this topic?'; + +$txt['rtm1'] = 'Report to moderator'; + +$txt['unread_topics_visit'] = 'Recent Unread Topics'; +$txt['unread_topics_visit_none'] = 'No unread topics found since your last visit. Click here to try all unread topics.'; +$txt['unread_topics_all'] = 'All Unread Topics'; +$txt['unread_replies'] = 'Updated Topics'; + +$txt['who_title'] = 'Who\'s Online'; +$txt['who_and'] = ' and '; +$txt['who_viewing_topic'] = ' are viewing this topic.'; +$txt['who_viewing_board'] = ' are viewing this board.'; +$txt['who_member'] = 'Member'; + +$txt['powered_by_php'] = 'Powered by PHP'; +$txt['powered_by_mysql'] = 'Powered by MySQL'; +$txt['valid_html'] = 'Valid HTML 4.01!'; +$txt['valid_xhtml'] = 'Valid XHTML 1.0!'; +$txt['valid_css'] = 'Valid CSS!'; + +$txt['guest'] = 'Guest'; +$txt['guests'] = 'Guests'; +$txt['user'] = 'User'; +$txt['users'] = 'Users'; +$txt['hidden'] = 'Hidden'; + +$txt['merge_select_target_board'] = 'Select the target board of the merged topic'; +$txt['merge_select_poll'] = 'Select which poll the merged topic should have'; +$txt['merge_topic_list'] = 'Select topics to be merged'; +$txt['merge_select_subject'] = 'Select subject of merged topic'; +$txt['merge_custom_subject'] = 'Custom subject'; +$txt['merge_enforce_subject'] = 'Change the subject of all the messages'; +$txt['merge_include_notifications'] = 'Include notifications?'; +$txt['merge_check'] = 'Merge?'; +$txt['merge_no_poll'] = 'No poll'; + +$txt['response_prefix'] = 'Re: '; +$txt['current_icon'] = 'Current Icon'; + +$txt['smileys_current'] = 'Current Smiley Set'; +$txt['smileys_none'] = 'No Smileys'; + +$txt['search_results'] = 'Search Results'; +$txt['search_post_age'] = 'Message age'; +$txt['search_between'] = 'Between'; +$txt['search_and'] = 'and'; +$txt['search_options'] = 'Options'; +$txt['search_show_complete_messages'] = 'Show results as messages'; +$txt['search_subject_only'] = 'Topic subjects only'; +$txt['search_relevance'] = 'Relevance'; +$txt['search_matches'] = 'Matches'; +$txt['search_no_results'] = 'No results found'; +$txt['search_date_posted'] = 'Date Posted'; +$txt['search_order'] = 'Search order'; +$txt['search_orderby_relevant_first'] = 'Most relevant results first'; +$txt['search_orderby_large_first'] = 'Largest topics first'; +$txt['search_orderby_small_first'] = 'Smallest topics first'; +$txt['search_orderby_recent_first'] = 'Most recent topics first'; +$txt['search_orderby_old_first'] = 'Oldest topics first'; + +$txt['totalTimeLogged1'] = 'Total time logged in: '; +$txt['totalTimeLogged2'] = ' days, '; +$txt['totalTimeLogged3'] = ' hours and '; +$txt['totalTimeLogged4'] = ' minutes.'; +$txt['totalTimeLogged5'] = 'd '; +$txt['totalTimeLogged6'] = 'h '; +$txt['totalTimeLogged7'] = 'm'; + +$txt['approve_thereis'] = 'There is'; +$txt['approve_thereare'] = 'There are'; +$txt['approve_member'] = 'one member'; +$txt['approve_members'] = 'members'; +$txt['approve_members_waiting'] = 'awaiting approval.'; + +$txt['notifyboard_turnon'] = 'Do you want a notification email when someone posts a new topic in this board?'; +$txt['notifyboard_turnoff'] = 'Are you sure you do not want to receive new topic notifications for this board?'; + +$txt['activate_code'] = 'Your activation code is'; + +$txt['find_members'] = 'Find Members'; +$txt['find_username'] = 'Name, username, or email address'; +$txt['find_wildcards'] = 'Allowed Wildcards: *, ?'; +$txt['find_no_results'] = 'No results found'; +$txt['find_results'] = 'Results'; +$txt['find_close'] = 'Close'; + +$txt['unread_since_visit'] = 'Show unread posts since last visit.'; +$txt['show_unread_replies'] = 'Show new replies to your posts.'; + +$txt['change_color'] = 'Change Color'; + +$txt['quickmod_delete_selected'] = 'Delete Selected'; + +// In this string, don't use entities. (&, etc.) +$txt['show_personal_messages'] = 'You have received one or more new personal messages.\\nView them now (in a new window)?'; + +$txt['previous_next_back'] = '« previous'; +$txt['previous_next_forward'] = 'next »'; + +$txt['movetopic_auto_board'] = '[BOARD]'; +$txt['movetopic_auto_topic'] = '[TOPIC LINK]'; +$txt['movetopic_default'] = 'This topic has been moved to ' . $txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic']; + +$txt['upshrink_description'] = 'Shrink or expand the header.'; + +$txt['mark_unread'] = 'Mark unread'; + +$txt['ssi_not_direct'] = 'Please don\'t access SSI.php by URL directly; you may want to use the path (%s) or add ?ssi_function=something.'; + +//Karma Description Mod (Модификация просмотра кармы) +$txt['karmaview'] = 'Karma Change Log'; /*Просмотр изменения репутации пользователей*/ +$txt['whykarmamod'] = 'Karma change'; /*Изменение репутации*/ +$txt['Description'] = 'No Description'; /*Нет описания*/ +$txt['karmamoder'] = 'Reason for changing the karma of this user'; /*Пожалуйста, напишите за что вы изменяете карму этому пользователю*/ +$txt['karmarequare'] = '(Required field)'; /*Обязательно для заполнения*/ +$txt['karmawho'] = 'Who'; /*Кто*/ +$txt['karmawhos'] = 'Whom'; /*Кому*/ +$txt['karmawhat'] = 'What (+/-)'; /*Что*/ +$txt['karmadesc'] = 'For What'; /*За что*/ +$txt['karmatime'] = 'When'; /*Когда*/ +$txt['karmanumb'] = 'Values: '; /*Всего значений*/ +$txt['statkarma'] = '[Karma Stats]'; /*Статистика кармы*/ +$txt['viewkarma_title'] = 'Karma Change Description'; /*Изменение кармы*/ +$txt['deletekarma'] = 'Delete'; /*Удалить*/ +$txt['clearkarma'] = 'Clear'; /*Очистить*/ +$txt['nextver'] = 'In next mod version'; +$txt['karma_delete_confirm'] = 'Are you sure you want to delete this record?'; /*Вы уверены что хотите удалить эту запись?*/ +$txt['karma_back'] = '< Back'; //Назад +$txt['karma_continue'] = 'Continue >'; //Продолжить +$txt['karmadescappl'] = ' (Applaud)'; //Прибавить +$txt['karmadescsmi'] = ' (Smite)'; //Убавить +$txt['karmawhere'] = 'Where'; +$txt['karmawhereurl'] = 'In topic'; +$txt['karmawhereurl2'] = 'In PM'; +$txt['karma_delete'] = 'Delete'; +$txt['sure_about_karma_remove'] = 'Are you sure you want to delete this record?'; +$txt['karma_stat'] = 'Karma Statistic'; +$txt['karma_top_applaud'] = 'Top 5 applauded users'; +$txt['karma_top_smite'] = 'Top 5 smited users'; +$txt['karma_other_stat'] = 'General Statistics'; +$txt['karma_max_appl'] = 'User MAX applauding other users'; +$txt['karma_max_smit'] = 'User MAX smiting other users'; +$txt['karma_today'] = 'Karma points today'; +$txt['karma_today_plus'] = 'Today "+"'; +$txt['karma_today_minus'] = 'Today "-"'; + +?> \ No newline at end of file diff --git a/Themes/modern/languages/index.russian.php b/Themes/modern/languages/index.russian.php new file mode 100644 index 0000000..dc5cd51 --- /dev/null +++ b/Themes/modern/languages/index.russian.php @@ -0,0 +1,648 @@ + 'January'. (or translated, of course.) +$months = array(1 => 'января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'); +$months_short = array(1 => 'Янв.', 'Фев.', 'Март', 'Апр.', 'Май', 'Июнь', 'Июль', 'Авг.', 'Сен.', 'Окт.', 'Нов.', 'Дек.'); + +$txt['newmessages0'] = 'новое'; +$txt['newmessages1'] = 'новых'; +$txt['newmessages3'] = 'новых'; +$txt['newmessages4'] = ','; + +$txt[2] = 'Админ'; + +$txt[10] = 'Сохранить'; + +$txt[17] = 'Изменить'; +$txt[18] = $context['forum_name'] . ' - форум'; +$txt[19] = 'участников'; +$txt[20] = 'Название форума'; +$txt[21] = 'Сообщения'; +$txt[22] = 'Последнее сообщение'; + +$txt[24] = '(отсутствует)'; +$txt[26] = 'Cообщений'; +$txt[27] = 'Профиль'; +$txt[28] = 'гость'; +$txt[29] = 'автор'; +$txt[30] = 'было'; +$txt[31] = 'Удалить'; +$txt[33] = 'Новая тема'; + +$txt[34] = 'Войти'; +$txt[35] = 'Имя'; +$txt[36] = 'Пароль'; + +$txt[40] = 'Такого участника на форуме не существует.'; + +$txt[62] = 'Модератор'; +$txt[63] = 'Удалить тему'; +$txt[64] = 'темах'; +$txt[66] = 'Править'; +$txt[68] = 'Отображаемое имя'; +$txt[69] = 'E-mail'; +$txt[70] = 'Тема'; +$txt[72] = 'Сообщение'; + +$txt[79] = 'Редактировать профиль'; + +$txt[81] = 'Выбрать пароль'; +$txt[82] = 'Подтвердить пароль'; +$txt[87] = 'Статус'; + +$txt[92] = 'Просмотр профиля'; +$txt[94] = 'Всего'; +$txt[95] = 'Сообщений'; +$txt[96] = 'Сайт'; +$txt[97] = 'зарегистрируйтесь'; + +$txt[101] = 'Список тем'; +$txt[102] = 'Новости'; +$txt[103] = 'Начало'; + +$txt[104] = 'закрыть/открыть тему'; +$txt[105] = 'Отправить'; +$txt[106] = 'Ошибка!'; +$txt[107] = 'в'; +$txt[108] = 'Выйти'; +$txt[109] = 'Автор'; +$txt[110] = 'Сообщений'; +$txt[111] = 'Обновление'; +$txt[114] = 'Вход для администратора'; +$txt[118] = 'Тема'; +$txt[119] = 'Помощь'; +$txt[121] = 'Удалить сообщение'; +$txt[125] = 'Извещать об ответе'; +$txt[126] = 'Вы хотите получать извещения при получении ответа на это сообщение? '; +$txt[130] = 'С наилучшими пожеланиями, от '. $context['forum_name'] . ' форума.'; +$txt[131] = 'Уведомление об ответе'; +$txt[132] = 'Переместить тему'; +$txt[133] = 'Переместить в'; +$txt[139] = 'Страницы'; +$txt[140] = 'Активные пользователи за последние ' . $modSettings['lastActive'] . ' минут'; +$txt[144] = 'Личные Сообщения'; +$txt[145] = 'Цитировать'; +$txt[146] = ' Ответить'; + +$txt[151] = 'Нет сообщений...'; +$txt[152] = 'личных сообщений'; +$txt[153] = 'всего '; +$txt[154] = ' Удалить сообщение'; + +$txt[158] = 'Сейчас на сайте'; +$txt[159] = 'Личное Сообщение'; +$txt[160] = 'Перейти в раздел'; +$txt[161] = 'Вперёд'; +$txt[162] = 'Вы уверены в том, что хотите удалить эту тему?'; +$txt[163] = 'Да'; +$txt[164] = 'Нет'; + +$txt[166] = 'Результаты поиска'; +$txt[167] = 'Всё'; +$txt[170] = 'Ничего не найдено'; +$txt[176] = 'на'; + +$txt[182] = 'Поиск'; +$txt[183] = 'Выбрать параметры поиска'; +$txt[189] = 'Искать в форумах'; +$txt[190] = 'все'; + +$txt[193] = 'Назад '; +$txt[194] = 'напомнить'; +$txt[195] = 'Автор'; +$txt[196] = 'Название'; +$txt[197] = 'Ответил'; +$txt[200] = 'Список участников.'; +$txt[201] = 'Добро Пожаловать!'; +$txt[208] = 'Панель администрирования'; +$txt[209] = 'Я новичок!'; +$txt[211] = 'Последняя правка'; +$txt[212] = 'Отключить извещения по этой теме? '; + +$txt[214] = 'Последние сообщения'; + +$txt[227] = 'Место жительства'; +$txt[231] = 'Пол'; +$txt[233] = 'Дата Регистрации'; + +$txt[234] = 'Последние 10 сообщений на форуме.'; +$txt[235] = 'самая популярная тема'; +$txt[236] = 'Назад'; +$txt[237] = 'на главную страницу'; + +$txt[238] = 'Муж.'; +$txt[239] = 'Жен.'; + +$txt[240] = 'Использован недопустимый символ в имени пользователя. '; + +$txt['welcome_guest'] = ' Добро Пожаловать, ' . $txt[28] . '. Пожалуйста войдите или зарегистрируйтесь, если хотите стать полноправным участником форума.'; +$txt['welcome_guest_activate'] = '
    Не получили активационное письмо?'; +$txt['hello_member'] = 'Привет,'; +$txt['hello_guest'] = 'Добро пожаловать,'; +$txt[247] = 'Привет,'; +$txt[248] = 'Добро пожаловать,'; +$txt[249] = 'пожалуйста'; +$txt[250] = 'назад'; +$txt[251] = 'Укажите куда перейти'; + +$txt[279] = 'Отправлено'; + +$txt[287] = 'Улыбка'; +$txt[288] = 'Злость'; +$txt[289] = 'Плохой'; +$txt[290] = 'Смех'; +$txt[291] = 'Грустный'; +$txt[292] = 'Подмигивающий'; +$txt[293] = 'Усмешка'; +$txt[294] = 'шокирован'; +$txt[295] = 'круто'; +$txt[296] = 'хех'; +$txt[450] = 'глазки кверху'; +$txt[451] = 'язык'; +$txt[526] = 'обеспокоенный'; +$txt[527] = 'рот на замке'; +$txt[528] = 'в замешательстве'; +$txt[529] = 'поцелуй'; +$txt[530] = 'плач'; + +$txt[298] = 'Модератор'; +$txt[299] = 'Модераторы'; + +$txt[300] = 'Отметить темы как прочитанные'; +$txt[301] = 'Просмотров'; +$txt[302] = 'новый'; + +$txt[303] = 'Просмотр участников'; +$txt[305] = 'Просмотр'; +$txt[307] = 'E-mail'; + +$txt[308] = 'Просмотр участников с'; +$txt[309] = 'всех'; +$txt[310] = 'участников'; +$txt[311] = 'по'; +$txt[315] = 'Забыли пароль?'; + +$txt[317] = 'Дата'; +$txt[318] = 'от'; +$txt[319] = 'Тема'; +$txt[322] = 'Обновить'; +$txt[324] = 'в'; + +$txt[330] = 'Темах'; +$txt[331] = 'Участники'; +$txt[332] = 'Список участников'; +$txt[333] = 'Новые сообщения'; +$txt[334] = 'Нет новых сообщений'; + +$txt['sendtopic_send'] = 'Отправить'; +$txt[343] = 'По фразе целиком'; +$txt[344] = 'По любому из слов'; + +$txt[371] = 'Коррекция временной зоны'; +$txt[377] = 'или'; + +$txt[398] = 'Ничего не найдено'; + +$txt[418] = 'Предупреждение'; + +$txt[430] = 'Извините %s, Вам запрещено посещать этот форум!'; + +$txt[452] = 'Отметить все сообщения как прочитанные'; + +$txt[454] = 'Горячая тема (более ' . $modSettings['hotTopicPosts'] . ' сообщений)'; +$txt[455] = 'Очень горячая тема (более ' . $modSettings['hotTopicVeryPosts'] . ' сообщений)'; +$txt[456] = 'Закрытая тема'; +$txt[457] = 'Открытая тема'; +$txt['participation_caption'] = 'В теме есть Ваши соощения'; + +$txt[462] = 'Вперёд'; + +$txt[465] = 'Печать'; +$txt[467] = 'Профиль'; +$txt[468] = 'Всего тем'; +$txt[470] = 'N/A'; +$txt[471] = 'сообщение'; +$txt[473] = 'Это имя уже занято другим участником.'; + +$txt[488] = 'Всего участников'; +$txt[489] = 'Всего сообщений'; +$txt[490] = 'Всего тем'; + +$txt[497] = 'Продолжительность сессии (в минутах)'; + +$txt[507] = 'Предварительный просмотр'; +$txt[508] = 'Запомнить'; + +$txt[511] = 'Авторизирован'; +$txt[512] = 'IP'; + +$txt[513] = 'ICQ'; +$txt[515] = 'WWW'; + +$txt[525] = 'от'; + +$txt[578] = 'часов'; +$txt[579] = 'дней'; + +$txt[581] = ', наш новый участник.'; + +$txt[582] = 'Искать'; +$txt[583] = 'От пользователя'; + +$txt[603] = 'AIM'; +// In this string, please use +'s for spaces. +$txt['aim_default_message'] = 'Привет+Ты+сейчас+здесь?'; +$txt[604] = 'YIM'; + +$txt[616] = 'Помните, этот форум находится в \'режиме обслуживания\'.'; + +$txt[641] = 'прочитано'; +$txt[642] = 'раз'; + +$txt[645] = 'Статистика форума'; +$txt[656] = 'Последний участник'; +$txt[658] = 'Всего категорий'; +$txt[659] = 'Последнее сообщение'; + +$txt[660] = 'Вы получили'; +$txt[661] = 'Кликните'; +$txt[662] = 'здесь'; +$txt[663] = 'чтобы прочитать их.'; + +$txt[665] = 'Всего форумов'; + +$txt[668] = 'Печать страницы'; + +$txt[679] = 'Адрес e-mail должен быть действующим.'; + +$txt[683] = 'Вот такой я!!'; +$txt[685] = $context['forum_name'] . ' - Информационный центр'; + +$txt[707] = 'Отправить'; + +$txt['sendtopic_title'] = 'Сообщить о теме "%s" другу.'; +$txt['sendtopic_dear'] = 'Привет %s,'; +$txt['sendtopic_this_topic'] = 'Советую заглянуть на "%s" на форуме ' . $context['forum_name'] . '. Для просмотра нужно пройти по ссылке'; +$txt['sendtopic_thanks'] = 'Спасибо'; +$txt['sendtopic_sender_name'] = 'Ваше имя'; +$txt['sendtopic_sender_email'] = 'Ваш e-mail'; +$txt['sendtopic_receiver_name'] = 'Имя Вашего друга'; +$txt['sendtopic_receiver_email'] = 'e-mail друга'; +$txt['sendtopic_comment'] = 'Добавить комментарий'; +$txt['sendtopic2'] = 'Комментарий добавлен'; + +$txt[721] = 'Скрыть Ваш e-mail от других участников?'; + +$txt[737] = 'Проверить всё'; + +$txt[1001] = 'Ошибка в базе данных'; +$txt[1002] = 'Пожалуйста, попробуйте снова. При повторной ошибке свяжитесь с администратором форума.'; +$txt[1003] = 'Файл'; +$txt[1004] = 'строка'; +$txt[1005] = 'SMF-форум обнаружил и автоматически исправил ошибку в Вашей базе данных. Если у Вас всё равно возникают проблемы, обратитесь к вашей хостинговой компании.'; +$txt['database_error_versions'] = ' Вероятно, что ваша база данных требует модернизации. Ваши файлы форума - в настоящее время в версии ' . $forum_version . ', тогда как ваша база данных - в версии SMF-форума' . $modSettings['smfVersion'] . '. Рекомендуется, чтобы Вы выполнили последнюю версию upgrade.php.'; +$txt['template_parse_error'] = 'Ошибка в шаблоне!'; +$txt['template_parse_error_message'] = 'Вероятно произошли какие-то сбои в системе шаблонов форума. Эта проблема должна быть временной, поэтому, пожалуйста, вернитесь позже и попробуйте еще раз. Если Вы снова увидите это сообщение, пожалуйста войдите в контакт с администратором.

    Так же попробуйте перезагрузить страницу.'; +$txt['template_parse_error_details'] = 'Проблема с %1$s шаблоном или с языковым файлом. Пожалуйста, проверьте синтаксис и попробуйте ещё раз - помните, что одинарные кавычки (\') нельзя ставить после слэша(\\). Подробности о синтаксисе PHP здесь.

    Попробуйте снова перезагрузить страницу или использовать предустановленные по умолчанию шаблоны.'; + +$txt['smf10'] = ' сегодня в '; +$txt['smf10b'] = 'вчера в '; +$txt['smf20'] = 'Новый опрос'; +$txt['smf21'] = 'Вопрос'; +$txt['smf23'] = 'Голосовать'; +$txt['smf24'] = 'Всего голосов'; +$txt['smf25'] = 'Для быстроты: нажмите клавиши alt+s для подключения или alt+p для предварительного просмотра'; +$txt['smf29'] = 'Просмотр результатов.'; +$txt['smf30'] = 'Закрыть опрос'; +$txt['smf30b'] = 'Открыть опрос'; +$txt['smf39'] = ' Редактировать опрос'; +$txt['smf43'] = 'Опрос'; +$txt['smf47'] = '1 день'; +$txt['smf48'] = '1 неделя'; +$txt['smf49'] = '1 месяц'; +$txt['smf50'] = 'Постоянно'; +$txt['smf52'] = 'Войти'; +$txt['smf53'] = '1 час'; +$txt['smf56'] = 'ПЕРЕМЕЩЕНО'; +$txt['smf57'] = 'Пожалуйста, введите пояснение
    почему эта тема была перемещена.'; +$txt['smf60'] = 'Извините, у Вас недостаточно сообщений для изменения репутации - должно быть, по крайней мере '; +$txt['smf62'] = 'Извините, необходимо немного подождать, а затем повторить действие.'; +$txt['smf82'] = 'Форум (раздел)'; +$txt['smf88'] = 'в'; +$txt['smf96'] = 'Важная тема'; + +$txt['smf138'] = 'Удалить'; + +$txt['smf199'] = 'Ваши личные сообщения'; + +$txt['smf211'] = 'KB'; + +$txt['smf223'] = '[Подробная статистика]'; + +$txt['smf238'] = 'код'; +$txt['smf239'] = 'Цитата'; +$txt['smf240'] = 'Цитата'; + +$txt['smf251'] = 'Разбить тему'; +$txt['smf252'] = 'Объединить темы'; +$txt['smf252lnk'] = 'Ob\'dinit\' temy'; +$txt['smf254'] = 'Описание новой темы'; +$txt['smf255'] = 'Разбить только это сообщение.'; +$txt['smf256'] = 'Разбить тему и переместить это сообщение, и сообщения после него.'; +$txt['smf257'] = 'Выбрать сообщения для разделения.'; +$txt['smf258'] = 'Новая тема'; +$txt['smf259'] = 'Тема успешно разбита на две.'; +$txt['smf260'] = 'Первоначальная тема'; +$txt['smf261'] = 'Пожалуйста, выберите сообщения, которые вы хотите объединить. '; +$txt['smf264'] = ' Темы объединены успешно.'; +$txt['smf265'] = ' Новая объединённая тема'; +$txt['smf266'] = 'Объединённая тема'; +$txt['smf267'] = 'Место на разделе'; +$txt['smf269'] = 'Результирующая тема'; +$txt['smf274'] = ' Вы уверены, что хотите объединить'; +$txt['smf275'] = 'с'; +$txt['smf276'] = 'Эта функция объединяет две темы в одну. Сообщения будут рассортированы по дате. Самое раннее сообщение будет первым в объединённом топике.'; + +$txt['smf277'] = 'Сделать тему важной'; +$txt['smf278'] = 'Снять с темы статус важной'; +$txt['smf279'] = 'Закрыть тему'; +$txt['smf280'] = 'Открыть тему'; + +$txt['smf298'] = 'Расширенный поиск'; + +$txt['smf299'] = 'Большой риск в обеспечении безопасности:'; +$txt['smf300'] = 'Вы не удалили '; + +$txt['smf301'] = 'Страница сгенерирована за'; +$txt['smf302'] = 'секунд'; +$txt['smf302b'] = ' запросы.'; + +$txt['smf315'] = 'Используйте эту функцию для уведомления модераторов и администраторов в случае появления оскорбительных или неправильных сообщений на форуме.
    Учтите, что Ваш e-mail станет в таком случае известен модераторам сайта.'; + +$txt['online2'] = 'Online'; +$txt['online3'] = 'Offline'; +$txt['online4'] = 'PM'; +$txt['online5'] = 'PM'; +$txt['online8'] = 'Присутствие'; + +$txt['topbottom4'] = 'Вверх'; +$txt['topbottom5'] = 'Вниз'; + +$forum_copyright = $context['forum_name'] . ' | Powered by ' . $forum_version . '.
    +© 2001-2005, Lewis Media. All Rights Reserved.'; + +$txt['calendar3'] = 'Дни рождения:'; +$txt['calendar4'] = 'События:'; +$txt['calendar3b'] = 'Ближайшие Дни Рождения:'; +$txt['calendar4b'] = 'Ближайшие события:'; +$txt['calendar5'] = ''; // Prompt for holidays in the calendar, leave blank to just display the holiday's name. +$txt['calendar9'] = 'Месяц:'; +$txt['calendar10'] = 'Год:'; +$txt['calendar11'] = 'День:'; +$txt['calendar12'] = 'Название события:'; +$txt['calendar13'] = 'Отправить в:'; +$txt['calendar20'] = 'Редактировать событие'; +$txt['calendar21'] = 'Удалить это событие?'; +$txt['calendar22'] = 'Удалить событие'; +$txt['calendar23'] = 'Создать событие'; +$txt['calendar24'] = 'Календарь'; +$txt['calendar37'] = 'Ссылка на календарь'; +$txt['calendar43'] = 'Ссылка на событие'; +$txt['calendar47'] = 'Календарь предстоящих событий'; +$txt['calendar47b'] = 'Сегодняшний календарь'; +$txt['calendar51'] = 'Неделя'; +$txt['calendar54'] = 'Число дней:'; +$txt['calendar_how_edit'] = 'как отредактировать это событие?'; + +$txt['moveTopic1'] = 'Объявите тему перенесённого топика'; +$txt['moveTopic2'] = 'Изменить тему'; +$txt['moveTopic3'] = 'Новая тема'; +$txt['moveTopic4'] = 'Изменить тему всех сообщений'; + +$txt['theme_template_error'] = 'Необходимо загрузить \'%s\' шаблон.'; +$txt['theme_language_error'] = 'Необходима загрузка \'%s\' языкового файла.'; + +$txt['parent_boards'] = 'Подраздел'; + +$txt['smtp_no_connect'] = 'Нет соединения с SMTP хостом'; +$txt['smtp_bad_response'] = 'Не получены коды поддержки mail-сервера'; +$txt['smtp_error'] = 'Проблема с отправкой e-mail. Ошибка: '; +$txt['mail_send_unable'] = 'Не удалось отправить письмо на почтовый адрес \'%s\''; + +$txt['mlist_search'] = 'Поиск участников'; +$txt['mlist_search2'] = 'Повторный поиск'; +$txt['mlist_search_email'] = 'Искать по Еmail'; +$txt['mlist_search_messenger'] = 'Искать по нику отправителя'; +$txt['mlist_search_group'] = 'Искать по положению'; +$txt['mlist_search_name'] = 'Искать по имени'; +$txt['mlist_search_website'] = 'Искать по адресу сайта'; +$txt['mlist_search_results'] = 'Искать результаты для'; + +$txt['attach_downloaded'] = 'загружено'; +$txt['attach_viewed'] = 'просмотрено'; +$txt['attach_times'] = 'раз'; + +$txt['MSN'] = 'MSN'; + +$txt['never'] = 'Никогда'; + +$txt['hostname'] = 'Hostname'; +$txt['you_are_post_banned'] = 'Извините %s, вы забанены.'; +$txt['ban_reason'] = 'Причина'; + +$txt['tables_optimized'] = 'Таблицы базы данных оптимизированы'; + +$txt['add_poll'] = 'Новый опрос'; +$txt['poll_options6'] = 'Вы можете выбрать %s опций.'; +$txt['poll_remove'] = 'Удалить опрос'; +$txt['poll_remove_warn'] = 'Вы уверены в том, что хотите удалить опрос из данной темы?'; +$txt['poll_results_expire'] = 'Результаты будут показаны только после окончания опроса'; +$txt['poll_expires_on'] = 'Закрытие опроса'; +$txt['poll_expired_on'] = 'Опрос закрыт'; +$txt['poll_change_vote'] = 'Проголосовать заново'; + +$txt['quick_mod_remove'] = 'Удалить выбранные'; +$txt['quick_mod_lock'] = 'Закрыть выбранные'; +$txt['quick_mod_sticky'] = 'Разделить выбранные'; +$txt['quick_mod_move'] = 'Переместить выбранные'; +$txt['quick_mod_merge'] = 'Объединить выбранное'; +$txt['quick_mod_go'] = 'Go!'; +$txt['quickmod_confirm'] = 'Вы уверены?'; + +$txt['spell_check'] = 'Проверка правописания'; + +$txt['quick_reply_1'] = 'Быстрый ответ'; +$txt['quick_reply_2'] = 'Вместе с формой быстрого ответа вы можете пользоваться обычными кодами и смайликами, и это будет гораздо быстрее и удобнее.'; +$txt['quick_reply_warning'] = 'Внимание: эта тема закрыта!
    Отвечать могут только администраторы и модераторы форума.'; + +$txt['notification_enable_board'] = 'Вы уверены, что хотите получать уведомления при создании новых тем в данном разделе форума?'; +$txt['notification_disable_board'] = 'Отключить уведомление?'; +$txt['notification_enable_topic'] = 'Вы уверены, что хотите получать уведомления о новых сообщениях в этой теме?'; +$txt['notification_disable_topic'] = 'Отключить уведомление?'; + +$txt['rtm1'] = 'Сообщить модератору'; + +$txt['unread_topics_visit'] = 'Непрочитанные темы'; +$txt['unread_topics_visit_none'] = 'Нет непрочитанных тем с момента вашего последнего посещения. Все непрочитанные темы..'; +$txt['unread_topics_all'] = 'Непрочитанные темы'; +$txt['unread_replies'] = 'Обновлённые темы'; + +$txt['who_title'] = 'Кто Online'; +$txt['who_and'] = ' и '; +$txt['who_viewing_topic'] = 'Эту тему сейчас просмaтривают '; +$txt['who_viewing_board'] = 'Этот форум сейчас просматривают '; +$txt['who_member'] = 'Участник'; + +$txt['powered_by_php'] = 'Powered by PHP'; +$txt['powered_by_mysql'] = 'Powered by MySQL'; +$txt['valid_html'] = 'Valid HTML 4.01!'; +$txt['valid_xhtml'] = 'Valid XHTML 1.0!'; +$txt['valid_css'] = 'Valid CSS!'; + +$txt['guest'] = 'Гость'; +$txt['guests'] = 'Гостей'; +$txt['user'] = 'Участник'; +$txt['users'] = 'Участников'; +$txt['hidden'] = 'Скрыты'; + +$txt['merge_select_target_board'] = 'Выбрать место для объединённой темы'; +$txt['merge_select_poll'] = 'Выбрать какой опрос должен быть в объединённой теме'; +$txt['merge_topic_list'] = 'Выбрать темы для объединения'; +$txt['merge_select_subject'] = 'Название объединённой темы '; +$txt['merge_custom_subject'] = 'Управление темой'; +$txt['merge_enforce_subject'] = ' Изменить тему во всех сообщениях'; +$txt['merge_include_notifications'] = 'Включить уведомление?'; +$txt['merge_check'] = 'Объединить?'; +$txt['merge_no_poll'] = 'Нет опроса'; + +$txt['response_prefix'] = 'Re: '; +$txt['current_icon'] = 'Иконка'; + +$txt['smileys_current'] = 'Набор смайликов'; +$txt['smileys_none'] = 'Нет смайликов'; + +$txt['search_results'] = 'Результаты поиска'; +$txt['search_post_age'] = 'Возраст сообщения'; +$txt['search_between'] = 'между'; +$txt['search_and'] = 'и'; +$txt['search_options'] = 'Опции'; +$txt['search_show_complete_messages'] = 'Отображать результаты в виде сообщений'; +$txt['search_subject_only'] = 'Только темы'; +$txt['search_relevance'] = 'Релевантность'; +$txt['search_matches'] = 'Результатов'; +$txt['search_no_results'] = 'Ничего не найдено'; +$txt['search_date_posted'] = 'Дата сообщения'; +$txt['search_order'] = 'Упорядочить сообщения по'; +$txt['search_orderby_relevant_first'] = 'релевантности'; +$txt['search_orderby_large_first'] = 'по величине топиков (прямой порядок расположения)'; +$txt['search_orderby_small_first'] = 'по величине топиков (обратный порядок расположения)по самым маленьким топикам'; +$txt['search_orderby_recent_first'] = 'по дате (прямой порядок расположения)'; +$txt['search_orderby_old_first'] = 'по дате (обратный порядок расположения)'; + +$txt['totalTimeLogged1'] = 'Общее время нахождения на форуме: '; +$txt['totalTimeLogged2'] = ' дн, '; +$txt['totalTimeLogged3'] = ' ч. и '; +$txt['totalTimeLogged4'] = ' мин.'; +$txt['totalTimeLogged5'] = 'д '; +$txt['totalTimeLogged6'] = 'ч '; +$txt['totalTimeLogged7'] = 'м'; + +$txt['approve_thereis'] = 'Находится'; +$txt['approve_thereare'] = 'Находятся'; +$txt['approve_member'] = 'один участник'; +$txt['approve_members'] = 'участников'; +$txt['approve_members_waiting'] = 'ждут разрешения.'; + +$txt['notifyboard_turnon'] = 'Вы хотите получать уведомления о размещении новых тем?'; +$txt['notifyboard_turnoff'] = 'Вы уверены, что не хотите получать уведомления о размещении новых тем?'; + +$txt['activate_code'] = 'Ваш код для активации'; + +$txt['find_members'] = 'Поиск участников'; +$txt['find_username'] = 'Имя, ник или e-mail'; +$txt['find_wildcards'] = 'Разрешены символы: *, ?'; +$txt['find_no_results'] = 'Ничего не найдено'; +$txt['find_results'] = 'Результаты'; +$txt['find_close'] = 'Закрыть'; + +$txt['unread_since_visit'] = 'Показать непрочитанные сообщения с последнего посещения.'; +$txt['show_unread_replies'] = 'Показать новые ответы на ваши сообщения.'; + +$txt['change_color'] = 'Изменить цвет'; + +$txt['quickmod_delete_selected'] = 'Удалить выбранные'; + +// In this string, don't use entities. (&, etc.) +$txt['show_personal_messages'] = 'Вы получили одно или несколько личных сообщений\\ Хотите прочитать (в новом окне)?'; + +$txt['previous_next_back'] = '< предыдущая'; +$txt['previous_next_forward'] = 'следующая >'; + +$txt['movetopic_auto_board'] = '[Раздел форума ]'; +$txt['movetopic_auto_topic'] = '[Ссылка на тему]'; +$txt['movetopic_default'] = 'Тема перенесена в ' . $txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic']; + +$txt['upshrink_description'] = 'Изменить длину заголовка.'; + +$txt['mark_unread'] = 'Пометить прочитанными'; + +$txt['ssi_not_direct'] = 'Не обращайтесь к файлу SSI.php по адресу напрямую; Вы можете использовать путь (%s) или добавить ?ssi_function=something.'; + +//Karma Description Mod (Модификация просмотра кармы) +$txt['karmaview'] = 'Просмотр изменения рейтинга пользователей'; +$txt['whykarmamod'] = 'Изменение рейтинга'; +$txt['Description'] = 'Нет описания'; +$txt['karmamoder'] = 'Пожалуйста, напишите за что вы изменяете рейтинг этому пользователю'; +$txt['karmarequare'] = '(Обязательно для заполнения)'; +$txt['karmawho'] = 'Кто'; +$txt['karmawhos'] = 'Кому'; +$txt['karmawhat'] = '(+/-)'; +$txt['karmadesc'] = 'За что'; +$txt['karmatime'] = 'Когда'; +$txt['karmanumb'] = 'Всего значений:'; +$txt['statkarma'] = '[Karma Stats]'; /*Статистика кармы*/ +$txt['viewkarma_title'] = 'Рейтинг пользователя'; /*Изменение кармы*/ +$txt['deletekarma'] = 'Удалить'; +$txt['clearkarma'] = 'Очистить'; +$txt['nextver'] = 'In next mod version'; +$txt['karma_delete_confirm'] = 'Вы уверены что хотите удалить эту запись?'; +$txt['karma_back'] = '< Назад'; +$txt['karma_continue'] = 'Продолжить >'; +$txt['karmadescappl'] = ' (+)'; //Прибавить +$txt['karmadescsmi'] = ' (-)'; //Убавить +$txt['karmawhere'] = 'Где'; +$txt['karmawhereurl'] = 'В теме'; +$txt['karmawhereurl2'] = 'В личном сообщении'; +$txt['karma_delete'] = 'Удалить'; +$txt['sure_about_karma_remove'] = 'Удалить эта запись?'; +$txt['karma_stat'] = 'Статистика'; +$txt['karma_top_applaud'] = 'Больше всего плюсов'; +$txt['karma_top_smite'] = 'Больше всего минусов'; +$txt['karma_other_stat'] = 'Общая статистика'; +$txt['karma_max_appl'] = 'Больше всех плюсов поставил'; +$txt['karma_max_smit'] = 'Больше всех минусов поставил'; +$txt['karma_today'] = 'Всего рейтингов сегодня'; +$txt['karma_today_plus'] = 'Плюсов'; +$txt['karma_today_minus'] = 'Минусов'; + +$txt['post_no'] = 'Сообщение #' +?> diff --git a/Themes/modern/license.txt b/Themes/modern/license.txt new file mode 100644 index 0000000..2bf90ec --- /dev/null +++ b/Themes/modern/license.txt @@ -0,0 +1,73 @@ +Definitions +----------------------------------------------------------------------------- +i. This Package is defined as all of the files within any archive file or any +group of files released in conjunction by Simple Machines, Lewis Media, or a +derived or modified work based on such files. + +ii. A Modification, or a Mod, is defined as instructions, to be performed +manually or in an automated manner, that alter any part of this Package. + +iii. A Modified Package is defined as this Package or a derivative of it with +one or more Modification applied to it. + +iv. Distribution is defined as allowing one or more other people to in any +way download or receive a copy of this Package, a Modified Package, or a +derivative of this Package. + +v. The Software is defined as an installed copy of this Package, a Modified +Package, or a derivative of this Package. + +vi. The Simple Machines Website is defined as http://www.simplemachines.org/. + +Agreement +----------------------------------------------------------------------------- +1. Permission is hereby granted to use, copy, modify and/or distribute this +Package, provided that: + a. All copyright notices within source files and as generated by the +Software as output are retained, unchanged. + b. Any Distribution of this Package, whether as a Modified Package or +not, includes this file and is released under the terms of this Agreement. +This clause is not dependent upon any measure of changes made to this +Package. + c. This Package, Modified Packages, and derivative works may not be +sold or released under any paid license. Copying fees for the transport of +this Package, support fees for installation or other services, and hosting +fees for hosting the Software may, however, be imposed. + d. Any Distribution of this Package, whether as a Modified Package +or not, requires express written consent from Lewis Media. + +2. You may make Modifications to this Package or a derivative of it, and +distribute your Modifications in a form that is separate from the Package, +such as patches. The following restrictions apply to Modifications: + a. A Modification must not alter or remove any copyright notices in +the Software or Package, generated or otherwise. + b. When a Modification to the Package is released, a non-exclusive +royalty-free right is granted to Lewis Media to distribute the Modification +in future versions of the Package provided such versions remain available +under the terms of this Agreement in addition to any other license(s) of the +initial developer. + c. Any Distribution of a Modified Package or derivative requires +express written consent from Lewis Media. + +3. Permission is hereby also granted to distribute programs which depend on +this Package, provided that you do not distribute any Modified Package +without express written consent. + +4. Lewis Media reserves the right to change the terms of this Agreement at +any time, although those changes are not retroactive to past releases. +Changes to this document will be announced via email using the Simple +Machines email notification list. Failure to receive notification of a change +does not make those changes invalid. A current copy of this Agreement can be +found on the Simple Machines Website. + +5. This Agreement will terminate automatically if you fail to comply with the +limitations described herein. Upon termination, you must destroy all copies +of this Package, the Software, and any derivatives within 48 hours. + +----------------------------------------------------------------------------- +THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY WARRANTY. ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY +OUT OF THE USE OR MISUSE OF THIS PACKAGE. \ No newline at end of file diff --git a/Themes/modern/minmax.js b/Themes/modern/minmax.js new file mode 100644 index 0000000..3d4c7d6 --- /dev/null +++ b/Themes/modern/minmax.js @@ -0,0 +1,145 @@ +// minmax.js: make IE5+/Win support CSS min/max-width/height +// version 1.0, 08-Aug-2003 +// written by Andrew Clover , use freely + +/*@cc_on +@if (@_win32 && @_jscript_version>4) + +var minmax_elements; + +minmax_props= new Array( + new Array('max-height','maxHeight') +); + +// Binding. Called on all new elements. If , initialise; check all +// elements for minmax properties + +function minmax_bind(el) { + + var i, em, ms; + var st= el.style, cs= el.currentStyle; + + if (minmax_elements==window.undefined) { + // initialise when body element has turned up, but only on IE + if (!document.body || !document.body.currentStyle) return; + minmax_elements= new Array(); + window.attachEvent('onresize', minmax_delayout); + // make font size listener + em= document.createElement('div'); + em.setAttribute('id', 'minmax_em'); + em.style.position= 'absolute'; em.style.visibility= 'hidden'; + em.style.fontSize= 'xx-large'; em.style.height= '5em'; + em.style.top='-5em'; em.style.left= '0'; + if (em.style.setExpression) { + em.style.setExpression('width', 'minmax_checkFont()'); + document.body.insertBefore(em, document.body.firstChild); + } + } + + //if(el.class!="signature") return; + + // transform hyphenated properties the browser has not caught to camelCase + for (i= minmax_props.length; i-->0;) + if (cs[minmax_props[i][0]]) + st[minmax_props[i][1]]= cs[minmax_props[i][0]]; + // add element with properties to list, store optimal size values + for (i= minmax_props.length; i-->0;) { + ms= cs[minmax_props[i][1]]; + if (ms && ms!='auto' && ms!='none' && ms!='0' && ms!='') { + st.minmaxWidth= cs.width; st.minmaxHeight= cs.height; + minmax_elements[minmax_elements.length]= el; + // will need a layout later + minmax_delayout(); + break; + } } +} + +// check for font size changes + +var minmax_fontsize= 0; +function minmax_checkFont() { + var fs= document.getElementById('minmax_em').offsetHeight; + if (minmax_fontsize!=fs && minmax_fontsize!=0) + minmax_delayout(); + minmax_fontsize= fs; + return '5em'; +} + +// Layout. Called after window and font size-change. Go through elements we +// picked out earlier and set their size to the minimum, maximum and optimum, +// choosing whichever is appropriate + +// Request re-layout at next available moment +var minmax_delaying= false; +function minmax_delayout() { + if (minmax_delaying) return; + minmax_delaying= true; + window.setTimeout(minmax_layout, 0); +} + +function minmax_stopdelaying() { + minmax_delaying= false; +} + +function minmax_layout() { + window.setTimeout(minmax_stopdelaying, 100); + var i, el, st, cs, optimal, inrange; + for (i= minmax_elements.length; i-->0;) { + el= minmax_elements[i]; st= el.style; cs= el.currentStyle; + + // horizontal size bounding + st.width= st.minmaxWidth; optimal= el.offsetWidth; + inrange= true; + if (inrange && cs.minWidth && cs.minWidth!='0' && cs.minWidth!='auto' && cs.minWidth!='') { + st.width= cs.minWidth; + inrange= (el.offsetWidthoptimal); + } + if (inrange) st.width= st.minmaxWidth; + + // vertical size bounding + st.height= st.minmaxHeight; optimal= el.offsetHeight; + inrange= true; + if (inrange && cs.minHeight && cs.minHeight!='0' && cs.minHeight!='auto' && cs.minHeight!='') { + st.height= cs.minHeight; + inrange= (el.offsetHeightoptimal); + } + if (inrange) st.height= st.minmaxHeight; + } +} + +// Scanning. Check document every so often until it has finished loading. Do +// nothing until arrives, then call main init. Pass any new elements +// found on each scan to be bound + +var minmax_SCANDELAY= 1500; + +function minmax_scan() { + var el; + for (var i= 0; i'; + break; + + // 2 is an attribute. + + // Just some text.. + case 3: + str += node.nodeValue; + break; + + // A CDATA section. + case 4: + str += ''; + break; + + // Entity reference.. + case 5: + str += '&' + node.nodeName + ';'; + break; + + // 6 is an actual entity, 7 is a PI. + + // Comment. + case 8: + str += ''; + break; + } + + return str; +} + +// Checks for variable in theArray. +function in_array(variable, theArray) +{ + return $.inArray(variable, theArray); +} + +// Find a specific radio button in its group and select it. +function selectRadioByName(radioGroup, name) +{ + for (var i = 0; i < radioGroup.length; i++) + { + if (radioGroup[i].value == name) + return radioGroup[i].checked = true; + } + + return false; +} + +// Invert all checkboxes at once by clicking a single checkbox. +function invertAll(headerfield, checkform, mask) +{ + for (var i = 0; i < checkform.length; i++) + { + if (typeof(mask) != "undefined" && checkform[i].name.substr(0, mask.length) != mask) + continue; + + if (!checkform[i].disabled) + checkform[i].checked = headerfield.checked; + } +} +function emoticon(text) +{ + replaceText(text, document.postmodify.message); +} + +function getMsgInfo(_name, _topic_id, _msg_id, _date) { + quote_name=_name; + quote_topic_id=_topic_id; + quote_msg_id=_msg_id; + quote_date=_date; +} + +function quoteSelection() { + var txt = ''; + if (document.getSelection) { + txt = document.getSelection(); + } + else if (window.getSelection) { + txt = window.getSelection(); + } + else if (document.selection) { + txt = document.selection.createRange().text; + } + + if (txt) { + // Add tags around selection + emoticon('[quote author='+quote_name+' link=topic='+quote_topic_id+'.msg'+quote_msg_id+'#msg'+quote_msg_id+' date='+quote_date+']' + txt+ '[/quote]\n'); + txt = ''; + return; + }else{ + alert("Сначала надо выделить текст"); + } +} + +function shrinkHeader(mode) +{ + if (is_guest == "") { + $.get("index.php?action=jsoption;var=collapse_header;val=" + (mode ? 1 : 0) + ";sesc=" + sesc + ";" + (new Date().getTime())); + } else { + document.cookie = "upshrink=" + (mode ? 1 : 0); + } + + $("#upshrink").attr("src", smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif")); + + $("#upshrinkHeader").toggleClass("hidden"); + + current_header = mode; + +} + +function swapOptions() +{ + document.getElementById("quickReplyExpand").src = smf_images_url + "/" + (currentSwap ? "collapse.gif" : "expand.gif"); + document.getElementById("quickReplyOptions").style.display = currentSwap ? "" : "none"; + + currentSwap = !currentSwap; +} + +setTimeout("fetchSession();", 60000); +function fetchSession() +{ + $.get(smf_script_url + "?action=jsoption;sesc=" +sesc +";" + (new Date().getTime())); + setTimeout("fetchSession();", 60000); +} + +function doQuote(messageid) +{ + if (currentSwap) + window.location.href = "http://rock.ru/forum/index.php?action=post;quote=" + messageid + ";topic=22901.40;sesc=" + sesc; + else + { + window.open("http://rock.ru/forum/index.php?action=quotefast;quote=" + messageid + ";sesc=" + sesc, "quote", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,top=40,left=40,width=240,height=90,resizable=no;"); + if (navigator.appName == "Microsoft Internet Explorer") + window.location.hash = "quickreply"; + else + window.location.hash = "#quickreply"; + } +} + +var smileys = [ +[ +[":cry:","12.gif",":cry:"], + [":rage:","13.gif",":rage:"], + [":B","14.gif",":B"], + [":roll:","15.gif",":roll:"], + [":ooi:","5.gif",":ooi:"], + [":wink:","16.gif",":wink:"], + [":yes:","17.gif",":yes:"], + [":bot:","18.gif",":bot:"], + [":ir:","9.gif","I roll!"], + [":z)","19.gif",":z)"], + [":arrow:","20.gif",":arrow:"], + [":vip:","21.gif",":vip:"], + [":Heppy:","22.gif",":Heppy:"], + [":think:","23.gif",":think:"], + [":bye:","24.gif",":bye:"], + [":roul:","25.gif",":roul:"], + [":pst:","26.gif",":pst:"]], + [ + [":o","27.gif",":o"], + [":closed:","28.gif",":closed:"], + [":cens:","29.gif",":cens:"], + [":tani:","30.gif",":tani:"], + [":appl:","31.gif",":appl:"], + [":idnk:","32.gif",":idnk:"], + [":sing:","33.gif",":sing:"], + [":shock:","34.gif",":shock:"], + [":res:","36.gif",":res:"], + [":alc:","37.gif",":alc:"], + [":lam:","38.gif",":lam:"], + [":box:","39.gif",":box:"], + [":tom:","40.gif",":tom:"], + [":lol:","41.gif",":lol:"], + [":vill:","42.gif",":vill:"]], + [ + [":idea:","43.gif",":idea:"], + [":E","45.gif",":E"], + [":horns:","47.gif",":horns:"], + [":poz:","49.gif",":poz:"], + [":meg:","51.gif",":meg:"], + [":dj:","52.gif",":dj:"], + [":rul:","53.gif",":rul:"], + [":sp:","55.gif",":sp:"], + [":stapp:","56.gif","Storm of applause"], + [":heart:","58.gif","Heart"], + [":kiss:","59.gif","Kiss"]], + [ + [":spam:","60.gif","Spam"], + [":party:","61.gif","Party"], + [":ser:","62.gif","Song"], + [":eam:","63.gif","Dream"], + [":gift:","64.gif","Gift"], + [":adore:","65.gif","I adore"], + [":pie:","66.gif","Pie"], + [":egg:","67.gif","Egg"], + [":cnrt:","68.gif","Concert"], + [":oftop:","69.gif","Off Topic"], + [":foo:","70.gif","Football"], + [":mob:","71.gif","Cellular"], + [":hoo:","72.gif","Not hooligan"], + [":tog:","73.gif","Together"], + [":pnk:","74.gif","Pancake"], + [":pati:","75.gif","Party Time"]], + [ + [":-({|=:","76.gif","I here"], + [":haaw:","77.gif","Head about a wall"], + [":angel:","78.gif","Angel"], + [":kil:","79.gif","killer"], + [":died:","80.gif","Cemetery"], + [":cof:","81.gif","Coffee"], + [":fruit:","82.gif","Forbidden fruit"], + [":tease:","83.gif","To tease"], + [":evil:","84.gif","Devil"], + [":exc:","85.gif","Excellently"], + [":niah:","86.gif","Not I, and he"], + [":Head:","87.gif","Studio"], + [":gl:","88.gif","girl"], + [":granat:","89.gif","Pomegranate"], + [":gans:","90.gif","Gangster"], + [":user:","91.gif","User"]], + [ + [":ny:","92.gif","New year"], + [":mvol:","93.gif","Megavolt"], + [":boat:","94.gif","In a boat"], + [":phone:","95.gif","Phone"], + [":cop:","96.gif","Cop"], + [":smok:","97.gif","Smoking"], + [":bic:","98.gif","Bicycle"], + [":ban:","99.gif","Ban?"], + [":bar:","100.gif",":bar:"]]]; +var smileyPopupWindow; + +function moreSmileys() +{ + var row, i; + + if (smileyPopupWindow) + smileyPopupWindow.close(); + + smileyPopupWindow = window.open("", "add_smileys", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=480,height=220,resizable=yes"); + smileyPopupWindow.document.write('\n'); + smileyPopupWindow.document.write('\n\t\n\t\tДополнительные смайлики\n\t\t\n\t'); + smileyPopupWindow.document.write('\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
    Выбрать смайлик
    '); + + for (row = 0; row < smileys.length; row++) + { + for (i = 0; i < smileys[row].length; i++) + { + smileys[row][i][2] = smileys[row][i][2].replace(/"/g, '"'); + smileyPopupWindow.document.write('' + smileys[row][i][2] + ' '); + } + smileyPopupWindow.document.write("
    "); + } + + smileyPopupWindow.document.write('
    Закрыть окно
    \n\t\n'); + smileyPopupWindow.document.close(); +} + +yandex_partner_id = 18555; +yandex_site_bg_color = '3A3A3A'; +yandex_stat_id = 1; +yandex_site_charset = 'utf-8'; +yandex_ad_format = 'direct'; +yandex_font_size = 1; +yandex_direct_type = 'horizontal'; +yandex_direct_border_type = 'ad'; +yandex_direct_limit = 4; +yandex_direct_header_bg_color = 'FBE5C0'; +yandex_direct_bg_color = '3A3A3A'; +yandex_direct_border_color = 'FBE5C0'; +yandex_direct_title_color = 'CFCECE'; +yandex_direct_url_color = 'FFC246'; +yandex_direct_all_color = 'FFC246'; +yandex_direct_text_color = 'CACACA'; +yandex_direct_hover_color = 'FFC246'; +yandex_direct_favicon = false; diff --git a/Themes/modern/script.js.cp1251 b/Themes/modern/script.js.cp1251 new file mode 100644 index 0000000..9ba7d71 --- /dev/null +++ b/Themes/modern/script.js.cp1251 @@ -0,0 +1,307 @@ +var smf_formSubmitted = false; +var quote_name=''; +var quote_topic_id=''; +var quote_msg_id=''; +var quote_date=0; + +// Define document.getElementById for Internet Explorer 4. +if (typeof(document.getElementById) == "undefined") + document.getElementById = function (id) + { + // Just return the corresponding index of all. + return document.all[id]; + } + +// Open a new window in a smaller popup. +function reqWin(desktopURL, alternateWidth, alternateHeight) +{ + window.open(desktopURL, 'requested_popup', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=' + (alternateWidth ? alternateWidth : 480) + ',height=' + (alternateHeight ? alternateHeight : 220) + ',resizable=no'); + + // Return false so the click won't follow the link ;). + return false; +} + +// Remember the current position. +function storeCaret(text) +{ + // Only bother if it will be useful. + if (typeof(text.createTextRange) != 'undefined') + text.caretPos = document.selection.createRange().duplicate(); +} + +// Replaces the currently selected text with the passed text. +function replaceText(text, textarea) +{ + // Attempt to create a text range (IE). + if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange) + { + var caretPos = textarea.caretPos; + + caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; + caretPos.select(); + } + // Mozilla text range replace. + else if (typeof(textarea.selectionStart) != "undefined") + { + var begin = textarea.value.substr(0, textarea.selectionStart); + var end = textarea.value.substr(textarea.selectionEnd); + var scrollPos = textarea.scrollTop; + + textarea.value = begin + text + end; + + if (textarea.setSelectionRange) + { + textarea.focus(); + textarea.setSelectionRange(begin.length + text.length, begin.length + text.length); + } + textarea.scrollTop = scrollPos; + } + // Just put it on the end. + else + { + textarea.value += text; + textarea.focus(textarea.value.length - 1); + } +} + +// Surrounds the selected text with text1 and text2. +function surroundText(text1, text2, textarea) +{ + // Can a text range be created? + if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange) + { + var caretPos = textarea.caretPos; + + caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text1 + caretPos.text + text2 + ' ' : text1 + caretPos.text + text2; + caretPos.select(); + } + // Mozilla text range wrap. + else if (typeof(textarea.selectionStart) != "undefined") + { + var begin = textarea.value.substr(0, textarea.selectionStart); + var selection = textarea.value.substr(textarea.selectionStart, textarea.selectionEnd - textarea.selectionStart); + var end = textarea.value.substr(textarea.selectionEnd); + var newCursorPos = textarea.selectionStart; + var scrollPos = textarea.scrollTop; + + textarea.value = begin + text1 + selection + text2 + end; + + if (textarea.setSelectionRange) + { + if (selection.length == 0) + textarea.setSelectionRange(newCursorPos + text1.length, newCursorPos + text1.length); + else + textarea.setSelectionRange(newCursorPos, newCursorPos + text1.length + selection.length + text2.length); + textarea.focus(); + } + textarea.scrollTop = scrollPos; + } + // Just put them on the end, then. + else + { + textarea.value += text1 + text2; + textarea.focus(textarea.value.length - 1); + } +} + +// Checks if the passed input's value is nothing. +function isEmptyText(theField) +{ + // Copy the value so changes can be made.. + var theValue = theField.value; + + // Strip whitespace off the left side. + while (theValue.length > 0 && (theValue.charAt(0) == ' ' || theValue.charAt(0) == '\t')) + theValue = theValue.substring(1, theValue.length); + // Strip whitespace off the right side. + while (theValue.length > 0 && (theValue.charAt(theValue.length - 1) == ' ' || theValue.charAt(theValue.length - 1) == '\t')) + theValue = theValue.substring(0, theValue.length - 1); + + if (theValue == '') + return true; + else + return false; +} + +// Only allow form submission ONCE. +function submitonce(theform) +{ + smf_formSubmitted = true; +} +function submitThisOnce(item) +{ + // Hateful, hateful fix for Safari 1.3 beta. + if (navigator.userAgent.indexOf('AppleWebKit') != -1) + return !smf_formSubmitted; + + for (var i = 0; i < item.form.length; i++) + if (typeof(item.form[i]) != "undefined" && item.form[i].tagName.toLowerCase() == "textarea") + item.form[i].readOnly = true; + + return !smf_formSubmitted; +} + +// Set the "inside" HTML of an element. +function setInnerHTML(element, toValue) +{ + // IE has this built in... + if (typeof(element.innerHTML) != 'undefined') + element.innerHTML = toValue; + else + { + var range = document.createRange(); + range.selectNodeContents(element); + range.deleteContents(); + element.appendChild(range.createContextualFragment(toValue)); + } +} + +// Set the "outer" HTML of an element. +function setOuterHTML(element, toValue) +{ + if (typeof(element.outerHTML) != 'undefined') + element.outerHTML = toValue; + else + { + var range = document.createRange(); + range.setStartBefore(element); + element.parentNode.replaceChild(range.createContextualFragment(toValue), element); + } +} + +// Get the inner HTML of an element. +function getInnerHTML(element) +{ + if (typeof(element.innerHTML) != 'undefined') + return element.innerHTML; + else + { + var returnStr = ''; + for (var i = 0; i < element.childNodes.length; i++) + returnStr += getOuterHTML(element.childNodes[i]); + + return returnStr; + } +} + +function getOuterHTML(node) +{ + if (typeof(node.outerHTML) != 'undefined') + return node.outerHTML; + + var str = ''; + + switch (node.nodeType) + { + // An element. + case 1: + str += '<' + node.nodeName; + + for (var i = 0; i < node.attributes.length; i++) + { + if (node.attributes[i].nodeValue != null) + str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"'; + } + + if (node.childNodes.length == 0 && in_array(node.nodeName.toLowerCase(), ['hr', 'input', 'img', 'link', 'meta', 'br'])) + str += ' />'; + else + str += '>' + getInnerHTML(node) + ''; + break; + + // 2 is an attribute. + + // Just some text.. + case 3: + str += node.nodeValue; + break; + + // A CDATA section. + case 4: + str += ''; + break; + + // Entity reference.. + case 5: + str += '&' + node.nodeName + ';'; + break; + + // 6 is an actual entity, 7 is a PI. + + // Comment. + case 8: + str += ''; + break; + } + + return str; +} + +// Checks for variable in theArray. +function in_array(variable, theArray) +{ + for (var i = 0; i < theArray.length; i++) + { + if (theArray[i] == variable) + return true; + } + return false; +} + +// Find a specific radio button in its group and select it. +function selectRadioByName(radioGroup, name) +{ + for (var i = 0; i < radioGroup.length; i++) + { + if (radioGroup[i].value == name) + return radioGroup[i].checked = true; + } + + return false; +} + +// Invert all checkboxes at once by clicking a single checkbox. +function invertAll(headerfield, checkform, mask) +{ + for (var i = 0; i < checkform.length; i++) + { + if (typeof(mask) != "undefined" && checkform[i].name.substr(0, mask.length) != mask) + continue; + + if (!checkform[i].disabled) + checkform[i].checked = headerfield.checked; + } +} +function emoticon(text) +{ + replaceText(text, document.postmodify.message); +} + +function getMsgInfo(_name, _topic_id, _msg_id, _date) { + quote_name=_name; + quote_topic_id=_topic_id; + quote_msg_id=_msg_id; + quote_date=_date; +} + +function quoteSelection() { + var txt = ''; + if (window.getSelection) { + txt = window.getSelection(); + } + else if (document.getSelection) { + txt = document.getSelection(); + } + else if (document.selection) { + txt = document.selection.createRange().text; + } + + if (txt) { + // Add tags around selection + emoticon('[quote author='+quote_name+' link=topic='+quote_topic_id+'.msg'+quote_msg_id+'#msg'+quote_msg_id+' date='+quote_date+']' + txt+ '[/quote]\n'); + txt = ''; + return; + }else{ + alert(" "); + } +} diff --git a/Themes/modern/script.js.old b/Themes/modern/script.js.old new file mode 100644 index 0000000..e6c33da --- /dev/null +++ b/Themes/modern/script.js.old @@ -0,0 +1,473 @@ +var smf_formSubmitted = false; +var quote_name=''; +var quote_topic_id=''; +var quote_msg_id=''; +var quote_date=0; + +// Define document.getElementById for Internet Explorer 4. +if (typeof(document.getElementById) == "undefined") + document.getElementById = function (id) + { + // Just return the corresponding index of all. + return document.all[id]; + } + +// Open a new window in a smaller popup. +function reqWin(desktopURL, alternateWidth, alternateHeight) +{ + window.open(desktopURL, 'requested_popup', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=' + (alternateWidth ? alternateWidth : 480) + ',height=' + (alternateHeight ? alternateHeight : 220) + ',resizable=no'); + + // Return false so the click won't follow the link ;). + return false; +} + +// Remember the current position. +function storeCaret(text) +{ + // Only bother if it will be useful. + if (typeof(text.createTextRange) != 'undefined') + text.caretPos = document.selection.createRange().duplicate(); +} + +// Replaces the currently selected text with the passed text. +function replaceText(text, textarea) +{ + // Attempt to create a text range (IE). + if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange) + { + var caretPos = textarea.caretPos; + + caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; + caretPos.select(); + } + // Mozilla text range replace. + else if (typeof(textarea.selectionStart) != "undefined") + { + var begin = textarea.value.substr(0, textarea.selectionStart); + var end = textarea.value.substr(textarea.selectionEnd); + var scrollPos = textarea.scrollTop; + + textarea.value = begin + text + end; + + if (textarea.setSelectionRange) + { + textarea.focus(); + textarea.setSelectionRange(begin.length + text.length, begin.length + text.length); + } + textarea.scrollTop = scrollPos; + } + // Just put it on the end. + else + { + textarea.value += text; + textarea.focus(textarea.value.length - 1); + } +} + +// Surrounds the selected text with text1 and text2. +function surroundText(text1, text2, textarea) +{ + // Can a text range be created? + if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange) + { + var caretPos = textarea.caretPos; + + caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text1 + caretPos.text + text2 + ' ' : text1 + caretPos.text + text2; + caretPos.select(); + } + // Mozilla text range wrap. + else if (typeof(textarea.selectionStart) != "undefined") + { + var begin = textarea.value.substr(0, textarea.selectionStart); + var selection = textarea.value.substr(textarea.selectionStart, textarea.selectionEnd - textarea.selectionStart); + var end = textarea.value.substr(textarea.selectionEnd); + var newCursorPos = textarea.selectionStart; + var scrollPos = textarea.scrollTop; + + textarea.value = begin + text1 + selection + text2 + end; + + if (textarea.setSelectionRange) + { + if (selection.length == 0) + textarea.setSelectionRange(newCursorPos + text1.length, newCursorPos + text1.length); + else + textarea.setSelectionRange(newCursorPos, newCursorPos + text1.length + selection.length + text2.length); + textarea.focus(); + } + textarea.scrollTop = scrollPos; + } + // Just put them on the end, then. + else + { + textarea.value += text1 + text2; + textarea.focus(textarea.value.length - 1); + } +} + +// Checks if the passed input's value is nothing. +function isEmptyText(theField) +{ + // Copy the value so changes can be made.. + var theValue = theField.value; + + // Strip whitespace off the left side. + while (theValue.length > 0 && (theValue.charAt(0) == ' ' || theValue.charAt(0) == '\t')) + theValue = theValue.substring(1, theValue.length); + // Strip whitespace off the right side. + while (theValue.length > 0 && (theValue.charAt(theValue.length - 1) == ' ' || theValue.charAt(theValue.length - 1) == '\t')) + theValue = theValue.substring(0, theValue.length - 1); + + if (theValue == '') + return true; + else + return false; +} + +// Only allow form submission ONCE. +function submitonce(theform) +{ + smf_formSubmitted = true; +} +function submitThisOnce(item) +{ + // Hateful, hateful fix for Safari 1.3 beta. + if (navigator.userAgent.indexOf('AppleWebKit') != -1) + return !smf_formSubmitted; + + for (var i = 0; i < item.form.length; i++) + if (typeof(item.form[i]) != "undefined" && item.form[i].tagName.toLowerCase() == "textarea") + item.form[i].readOnly = true; + + return !smf_formSubmitted; +} + +// Set the "inside" HTML of an element. +function setInnerHTML(element, toValue) +{ + // IE has this built in... + if (typeof(element.innerHTML) != 'undefined') + element.innerHTML = toValue; + else + { + var range = document.createRange(); + range.selectNodeContents(element); + range.deleteContents(); + element.appendChild(range.createContextualFragment(toValue)); + } +} + +// Set the "outer" HTML of an element. +function setOuterHTML(element, toValue) +{ + if (typeof(element.outerHTML) != 'undefined') + element.outerHTML = toValue; + else + { + var range = document.createRange(); + range.setStartBefore(element); + element.parentNode.replaceChild(range.createContextualFragment(toValue), element); + } +} + +// Get the inner HTML of an element. +function getInnerHTML(element) +{ + if (typeof(element.innerHTML) != 'undefined') + return element.innerHTML; + else + { + var returnStr = ''; + for (var i = 0; i < element.childNodes.length; i++) + returnStr += getOuterHTML(element.childNodes[i]); + + return returnStr; + } +} + +function getOuterHTML(node) +{ + if (typeof(node.outerHTML) != 'undefined') + return node.outerHTML; + + var str = ''; + + switch (node.nodeType) + { + // An element. + case 1: + str += '<' + node.nodeName; + + for (var i = 0; i < node.attributes.length; i++) + { + if (node.attributes[i].nodeValue != null) + str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"'; + } + + if (node.childNodes.length == 0 && in_array(node.nodeName.toLowerCase(), ['hr', 'input', 'img', 'link', 'meta', 'br'])) + str += ' />'; + else + str += '>' + getInnerHTML(node) + ''; + break; + + // 2 is an attribute. + + // Just some text.. + case 3: + str += node.nodeValue; + break; + + // A CDATA section. + case 4: + str += ''; + break; + + // Entity reference.. + case 5: + str += '&' + node.nodeName + ';'; + break; + + // 6 is an actual entity, 7 is a PI. + + // Comment. + case 8: + str += ''; + break; + } + + return str; +} + +// Checks for variable in theArray. +function in_array(variable, theArray) +{ + for (var i = 0; i < theArray.length; i++) + { + if (theArray[i] == variable) + return true; + } + return false; +} + +// Find a specific radio button in its group and select it. +function selectRadioByName(radioGroup, name) +{ + for (var i = 0; i < radioGroup.length; i++) + { + if (radioGroup[i].value == name) + return radioGroup[i].checked = true; + } + + return false; +} + +// Invert all checkboxes at once by clicking a single checkbox. +function invertAll(headerfield, checkform, mask) +{ + for (var i = 0; i < checkform.length; i++) + { + if (typeof(mask) != "undefined" && checkform[i].name.substr(0, mask.length) != mask) + continue; + + if (!checkform[i].disabled) + checkform[i].checked = headerfield.checked; + } +} +function emoticon(text) +{ + replaceText(text, document.postmodify.message); +} + +function getMsgInfo(_name, _topic_id, _msg_id, _date) { + quote_name=_name; + quote_topic_id=_topic_id; + quote_msg_id=_msg_id; + quote_date=_date; +} + +function quoteSelection() { + var txt = ''; + if (document.getSelection) { + txt = document.getSelection(); + } + else if (window.getSelection) { + txt = window.getSelection(); + } + else if (document.selection) { + txt = document.selection.createRange().text; + } + + if (txt) { + // Add tags around selection + emoticon('[quote author='+quote_name+' link=topic='+quote_topic_id+'.msg'+quote_msg_id+'#msg'+quote_msg_id+' date='+quote_date+']' + txt+ '[/quote]\n'); + txt = ''; + return; + }else{ + alert("Сначала надо выделить текст"); + } +} + +function shrinkHeader(mode) +{ + if (is_guest == "") { +// document.getElementById("upshrinkTemp").src = "http://rock.ru/forum/index.php?action=jsoption;var=collapse_header;val=" + (mode ? 1 : 0) + ";sesc=" + sesc + ";" + (new Date().getTime()); + $.get("index.php?action=jsoption;var=collapse_header;val=" + (mode ? 1 : 0) + ";sesc=" + sesc + ";" + (new Date().getTime())); + } else { + document.cookie = "upshrink=" + (mode ? 1 : 0); + } + + $("#upshrink").attr("src", smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif")); + + $("#upshrinkHeader").toggleClass("hidden"); + + current_header = mode; + +} + +function swapOptions() +{ + document.getElementById("quickReplyExpand").src = smf_images_url + "/" + (currentSwap ? "collapse.gif" : "expand.gif"); + document.getElementById("quickReplyOptions").style.display = currentSwap ? "" : "none"; + + currentSwap = !currentSwap; +} + +setTimeout("fetchSession();", 600000); +function fetchSession() +{ + document.getElementById("fetchSessionTemp").src = smf_script_url + "?action=jsoption;sesc=" +sesc +";" + (new Date().getTime()); + setTimeout("fetchSession();", 600000); +} + +function doQuote(messageid) +{ + if (currentSwap) + window.location.href = "http://rock.ru/forum/index.php?action=post;quote=" + messageid + ";topic=22901.40;sesc=" + sesc; + else + { + window.open("http://rock.ru/forum/index.php?action=quotefast;quote=" + messageid + ";sesc=" + sesc, "quote", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,top=40,left=40,width=240,height=90,resizable=no;"); + if (navigator.appName == "Microsoft Internet Explorer") + window.location.hash = "quickreply"; + else + window.location.hash = "#quickreply"; + } +} + +var smileys = [ +[ +[":cry:","12.gif",":cry:"], + [":rage:","13.gif",":rage:"], + [":B","14.gif",":B"], + [":roll:","15.gif",":roll:"], + [":ooi:","5.gif",":ooi:"], + [":wink:","16.gif",":wink:"], + [":yes:","17.gif",":yes:"], + [":bot:","18.gif",":bot:"], + [":ir:","9.gif","I roll!"], + [":z)","19.gif",":z)"], + [":arrow:","20.gif",":arrow:"], + [":vip:","21.gif",":vip:"], + [":Heppy:","22.gif",":Heppy:"], + [":think:","23.gif",":think:"], + [":bye:","24.gif",":bye:"], + [":roul:","25.gif",":roul:"], + [":pst:","26.gif",":pst:"]], + [ + [":o","27.gif",":o"], + [":closed:","28.gif",":closed:"], + [":cens:","29.gif",":cens:"], + [":tani:","30.gif",":tani:"], + [":appl:","31.gif",":appl:"], + [":idnk:","32.gif",":idnk:"], + [":sing:","33.gif",":sing:"], + [":shock:","34.gif",":shock:"], + [":res:","36.gif",":res:"], + [":alc:","37.gif",":alc:"], + [":lam:","38.gif",":lam:"], + [":box:","39.gif",":box:"], + [":tom:","40.gif",":tom:"], + [":lol:","41.gif",":lol:"], + [":vill:","42.gif",":vill:"]], + [ + [":idea:","43.gif",":idea:"], + [":E","45.gif",":E"], + [":horns:","47.gif",":horns:"], + [":poz:","49.gif",":poz:"], + [":meg:","51.gif",":meg:"], + [":dj:","52.gif",":dj:"], + [":rul:","53.gif",":rul:"], + [":sp:","55.gif",":sp:"], + [":stapp:","56.gif","Storm of applause"], + [":heart:","58.gif","Heart"], + [":kiss:","59.gif","Kiss"]], + [ + [":spam:","60.gif","Spam"], + [":party:","61.gif","Party"], + [":ser:","62.gif","Song"], + [":eam:","63.gif","Dream"], + [":gift:","64.gif","Gift"], + [":adore:","65.gif","I adore"], + [":pie:","66.gif","Pie"], + [":egg:","67.gif","Egg"], + [":cnrt:","68.gif","Concert"], + [":oftop:","69.gif","Off Topic"], + [":foo:","70.gif","Football"], + [":mob:","71.gif","Cellular"], + [":hoo:","72.gif","Not hooligan"], + [":tog:","73.gif","Together"], + [":pnk:","74.gif","Pancake"], + [":pati:","75.gif","Party Time"]], + [ + [":-({|=:","76.gif","I here"], + [":haaw:","77.gif","Head about a wall"], + [":angel:","78.gif","Angel"], + [":kil:","79.gif","killer"], + [":died:","80.gif","Cemetery"], + [":cof:","81.gif","Coffee"], + [":fruit:","82.gif","Forbidden fruit"], + [":tease:","83.gif","To tease"], + [":evil:","84.gif","Devil"], + [":exc:","85.gif","Excellently"], + [":niah:","86.gif","Not I, and he"], + [":Head:","87.gif","Studio"], + [":gl:","88.gif","girl"], + [":granat:","89.gif","Pomegranate"], + [":gans:","90.gif","Gangster"], + [":user:","91.gif","User"]], + [ + [":ny:","92.gif","New year"], + [":mvol:","93.gif","Megavolt"], + [":boat:","94.gif","In a boat"], + [":phone:","95.gif","Phone"], + [":cop:","96.gif","Cop"], + [":smok:","97.gif","Smoking"], + [":bic:","98.gif","Bicycle"], + [":ban:","99.gif","Ban?"], + [":bar:","100.gif",":bar:"]]]; +var smileyPopupWindow; + +function moreSmileys() +{ + var row, i; + + if (smileyPopupWindow) + smileyPopupWindow.close(); + + smileyPopupWindow = window.open("", "add_smileys", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=480,height=220,resizable=yes"); + smileyPopupWindow.document.write('\n'); + smileyPopupWindow.document.write('\n\t\n\t\tДополнительные смайлики\n\t\t\n\t'); + smileyPopupWindow.document.write('\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
    Выбрать смайлик
    '); + + for (row = 0; row < smileys.length; row++) + { + for (i = 0; i < smileys[row].length; i++) + { + smileys[row][i][2] = smileys[row][i][2].replace(/"/g, '"'); + smileyPopupWindow.document.write('' + smileys[row][i][2] + ' '); + } + smileyPopupWindow.document.write("
    "); + } + + smileyPopupWindow.document.write('
    Закрыть окно
    \n\t\n'); + smileyPopupWindow.document.close(); +} + diff --git a/Themes/modern/spellcheck.js b/Themes/modern/spellcheck.js new file mode 100644 index 0000000..fb3b70d --- /dev/null +++ b/Themes/modern/spellcheck.js @@ -0,0 +1,269 @@ +// Public functions -------------------------------- + +// spellCheck - spell check a field +function spellCheck(formName, fieldName, spelltext) +{ + var spellform = document.forms['spell_form']; + + spellform.spell_formname.value = formName; + spellform.spell_fieldname.value = fieldName; + spellform.spellstring.value = document.forms[formName][fieldName].value; + + openSpellWin(640, 480); + spellform.submit(); + + return true; +} + +// Private functions ------------------------------- + +// globals +var wordindex = -1, offsetindex = 0; +var ignoredWords = []; + +// misspelled word object +function misp(word, start, end, suggestions) +{ + // The word, start index, end index, and array of suggestions. + this.word = word; + this.start = start; + this.end = end; + this.suggestions = suggestions; +} + +// replace the word in the misps array at the "wordindex" index. The +// misps array is generated by a PHP script after the string to be spell +// checked is evaluated with pspell +function replaceWord() +{ + var frm = document.fm1; + var strstart = ''; + var strend; + + // if this isn't the beginning of the string then get all of the string + // that is before the word we are replacing + if (misps[wordindex].start != 0) + strstart = mispstr.slice(0, misps[wordindex].start + offsetindex); + + // get the end of the string after the word we are replacing + strend = mispstr.slice(misps[wordindex].end + 1 + offsetindex); + + // rebuild the string with the new word + mispstr = strstart + frm.changeto.value + strend; + + // update offsetindex to compensate for replacing a word with a word + // of a different length. + offsetindex += frm.changeto.value.length - misps[wordindex].word.length; + + // update the word so future replaceAll calls don't change it + misps[wordindex].word = frm.changeto.value; + + nextWord(false); +} + +// replaces all instances of currently selected word with contents chosen by user. +// note: currently only replaces words after highlighted word. I think we can re-index +// all words at replacement or ignore time to have it wrap to the beginning if we want +// to. +function replaceAll() +{ + var frm = document.fm1; + var strstart = ''; + var strend; + var idx; + var origword; + var localoffsetindex = offsetindex; + + origword = misps[wordindex].word; + + // reindex everything past the current word + for (idx = wordindex; idx < misps.length; idx++) + { + misps[idx].start += localoffsetindex; + misps[idx].end += localoffsetindex; + } + + localoffsetindex = 0; + + for (idx = 0; idx < misps.length; idx++) + { + if (misps[idx].word == origword) + { + if (misps[idx].start != 0) + strstart = mispstr.slice(0, misps[idx].start + localoffsetindex); + + // get the end of the string after the word we are replacing + strend = mispstr.slice(misps[idx].end + 1 + localoffsetindex); + + // rebuild the string with the new word + mispstr = strstart + frm.changeto.value + strend; + + // update offsetindex to compensate for replacing a word with a word + // of a different length. + localoffsetindex += frm.changeto.value.length - misps[idx].word.length; + } + + // we have to re-index everything after replacements + misps[idx].start += localoffsetindex; + misps[idx].end += localoffsetindex; + } + + // add the word to the ignore array + ignoredWords[origword] = true; + + // reset offsetindex since we reindexed + offsetindex = 0; + + nextWord(false); +} + +// highlight the word that was selected using the nextWord function +function highlightWord() +{ + var strstart = ''; + var strend; + + // if this isn't the beginning of the string then get all of the string + // that is before the word we are replacing + + if (misps[wordindex].start != 0) + strstart = mispstr.slice(0, misps[wordindex].start + offsetindex); + + // get the end of the string after the word we are replacing + + strend = mispstr.slice(misps[wordindex].end + 1 + offsetindex); + + // rebuild the string with a span wrapped around the misspelled word + // so we can highlight it in the div the user is viewing the string in + + var divptr, newValue; + divptr = document.getElementById("spellview"); + + newValue = un_htmlspecialchars(strstart) + '' + misps[wordindex].word + '' + un_htmlspecialchars(strend); + setInnerHTML(divptr, newValue.replace(/_\|_/g, '
    ')); + + var spellview_height = typeof(document.getElementById("spellview").currentStyle) != "undefined" ? parseInt(document.getElementById("spellview").currentStyle.height) : document.getElementById("spellview").offsetHeight; + var word_position = document.getElementById("h1").offsetTop; + var current_position = document.getElementById("spellview").scrollTop; + + // The spellview is not tall enough! Scroll down! + if (spellview_height <= (word_position + current_position)) + document.getElementById("spellview").scrollTop = word_position + current_position - spellview_height + 32; +} + +// Called by onLoad handler to start the process of evaluating misspelled words. +function startsp() +{ + nextWord(false); +} + +function getCorrectedText() +{ + return mispstr; +} + +// Display the next misspelled word to the user and populate the suggested spellings box. +function nextWord(ignoreall) +{ + var frm = document.fm1; + var sug = document.fm1.suggestions; + var sugidx = 0; + var newopt; + var isselected = 0; + + // Push ignored word onto ignoredWords array. + if (ignoreall) + ignoredWords[misps[wordindex].word] = true; + + // update the index of all words we have processed + // This must be done to accomodate the replaceAll function. + if (wordindex >= 0) + { + misps[wordindex].start += offsetindex; + misps[wordindex].end += offsetindex; + } + + // increment the counter for the array of misspelled words + wordindex++; + + // draw it and quit if there are no more misspelled words to evaluate + if (misps.length <= wordindex) + { + var divptr; + divptr = document.getElementById("spellview"); + setInnerHTML(divptr, un_htmlspecialchars(mispstr).replace(/_\|_/g, "
    ")); + + clearBox(sug); + alert(txt['done']); + frm.change.disabled = true; + frm.changeall.disabled = true; + frm.ignore.disabled = true; + frm.ignoreall.disabled = true; + + // put line feeds back + mispstr = mispstr.replace(/_\|_/g, "\n"); + + // get a handle to the field we need to re-populate + window.opener.document.forms[spell_formname][spell_fieldname].value = mispstr; + window.close(); + return true; + } + + // check to see if word is supposed to be ignored + if (typeof(ignoredWords[misps[wordindex].word]) != "undefined") + { + nextWord(false); + return false; + } + + // clear out the suggestions box + clearBox(sug); + + // re-populate the suggestions box if there are any suggested spellings for the word + if (misps[wordindex].suggestions.length) + { + for (sugidx = 0; sugidx < misps[wordindex].suggestions.length; sugidx++) + { + if (sugidx == 0) + isselected = 1; + else + isselected = 0; + newopt = new Option(misps[wordindex].suggestions[sugidx], misps[wordindex].suggestions[sugidx], 0, isselected); + sug.options[sugidx] = newopt; + + if (isselected) + { + frm.changeto.value = misps[wordindex].suggestions[sugidx]; + frm.changeto.select(); + } + } + } + highlightWord(); + + return false; +} + +function un_htmlspecialchars(thetext) +{ + thetext = thetext.replace(/\/g, ">"); + thetext = thetext.replace(/\n/g, "
    "); + thetext = thetext.replace(/\ \ /g, "  "); + + return thetext; +} + +// remove all items from the suggested spelling box +function clearBox(box) +{ + var length = box.length; + + // delete old options -- remember that select boxes automatically re-index + for (var i = 0; i < length; i++) + box.options[0] = null; +} + +function openSpellWin(width, height) +{ + window.open("", "spellWindow", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + width + ",height=" + height); +} \ No newline at end of file diff --git a/Themes/modern/style.css b/Themes/modern/style.css new file mode 100644 index 0000000..1bc72b6 --- /dev/null +++ b/Themes/modern/style.css @@ -0,0 +1,307 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #FFC246; + text-decoration: underline; +} +a:hover +{ + color: #FFFFFF; + text-decoration: underline; +} + +.karma, .karma:link, .karma:visited +{ + font-size: 11px; + color: #D2D2D2; + text-decoration: none; +} + +.header, .header:link, .header:visited +{ + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + font-size: 11px; + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +a.nav:hover, a.karma:hover +{ + text-decoration: underline; +} + +.mapProfile {color: black;} + +a.mapProfile {color: blue;} + + +/* Tables should show empty cells. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Tahoma in black. */ +body, td +{ + color: #C5C9CF; + font-size: small; + font-family: Tahoma, arial, helvetica, sans-serif; +} + +/* The main body of the entire forum. */ +body +{ + background-color: #434343; + margin: 0px; + padding: 0px; + width: 100%; + text-align: center; +} + +#wrapper +{ + text-align: left; + margin: auto; +/* width: 90%;*/ + min-width: 700px; + max-width: 1000px; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea, button +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 13px; + font-weight: normal; + padding: 2px; +} + +/* All input elements that are checkboxes or radio buttons. */ +input.check +{ +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 11px; + font-weight: normal; + padding: 0px; +} + +/* Standard horizontal rule.. ([hr], etc.) */ +hr, .hrcolor +{ + height: 1px; + border: 0; + color: #000000; + background-color: #000000; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #F6F6F6; + background-color: #5C5C5C; + border: 1px solid #000000; + margin: 1px; + padding: 1px; +/* font-size: x-small;*/ +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid #000000; + padding: 1px; + font-family: "courier new", helvetica, "times new roman", sans-serif; +/* font-size: x-small;*/ + width: 99%; + margin: 1px auto 1px auto; + white-space: nowrap; + overflow: auto; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #c5c9cf; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help +{ + cursor: help; +} + +/* /me uses this a lot. (emote, try typing /me in a post.) */ +.meaction +{ + color: red; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 96%; +} + +/* Highlighted text - such as search results ;). */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds for posts, and several other sections of the forum. */ +.windowbg +{ + color: #C5C9CF; + background-color: #4D4D4D; +} +.windowbg2 +{ + color: #C5C9CF; + background-color: #575757; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature +{ +overflow: hidden; +width: 100%; +padding-bottom: 3px; +max-height: 70px; +height:expression(this.offsetHeight>70 ? "70px" : "auto"); +} + +/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + color: white; + font-style: normal; + text-decoration: none; + background-color: #313131; +} +.titlebg a:hover +{ + color: #dfdfdf; +} + +.catbg, .catbg2 +{ + font-weight: bold; + background-color: #384658; + color: #ffffff; +} + +/* This is used for tables that have a grid/border background color (such as the topic listing.) */ +.bordercolor +{ + background-color: #313131; +} + +/* This is used on tables that should just have a border around them. */ +.tborder +{ + border: 0px solid #313131; + background-color: #313131; + padding: 0px; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext +{ + font-size: x-small; + font-family: Tahoma, arial, helvetica, sans-serif; +} +.normaltext +{ +/* font-size: small;*/ +} +.largetext +{ + font-size: large; +} + +/* This is the white header area where the title, menu bars, and header boxes are. */ +#headerarea +{ + background-color: #434343; + border-bottom: 1px solid black; +} +/* This is the main area of the forum, the part that's gray. */ +/*#bodyarea +{ + background-color: #3F3F3F; +}*/ +/* And this is the bottom, where the copyright is, etc. */ +#footerarea +{ + color: black; + background-color: #3F3F3F; + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +/* This is for the special header boxes on the top (user info, key stats, news box.) */ +.headertitles +{ + background-color: #434343; + border: 1px solid #434343; +} +.headerbodies +{ + border: 1px solid #000000; + background-color: #575757; + background-repeat: repeat-x; + background-position: bottom; +} +.online { + color: lightgreen; + font-weight: bold; + font-family: Tahoma, arial, helvetica, sans-serif; + font-size: x-small; +} +.penalty { + color: white; + font-size: small; + font-weight: bold; +} +.ban { + background-color: red; +} +.read-only { + background-color: orange; +} +.warning { + background-color: green; +} + +.b { + font-weight: bold; +} +.i { + font-style: italic; +} diff --git a/Themes/modern/style.css.backup b/Themes/modern/style.css.backup new file mode 100644 index 0000000..a7d8500 --- /dev/null +++ b/Themes/modern/style.css.backup @@ -0,0 +1,291 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #FFC246; + text-decoration: underline; +} +a:hover +{ + color: #FFFFFF; + text-decoration: underline; +} + +.karma, .karma:link, .karma:visited +{ + font-size: 11px; + color: #D2D2D2; + text-decoration: none; +} + +.header, .header:link, .header:visited +{ + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + font-size: 11px; + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +a.nav:hover, a.karma:hover +{ + text-decoration: underline; +} + +.mapProfile {color: black;} + +a.mapProfile {color: blue;} + + +/* Tables should show empty cells. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Tahoma in black. */ +body, td +{ + color: #C5C9CF; + font-size: small; + font-family: Tahoma, arial, helvetica, sans-serif; +} + +/* The main body of the entire forum. */ +body +{ + background-color: #434343; + margin: 0px; + padding: 0px; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea, button +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 13px; + font-weight: normal; + padding: 2px; +} + +/* All input elements that are checkboxes or radio buttons. */ +input.check +{ +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 11px; + font-weight: normal; + padding: 0px; +} + +/* Standard horizontal rule.. ([hr], etc.) */ +hr, .hrcolor +{ + height: 1px; + border: 0; + color: #000000; + background-color: #000000; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #F6F6F6; + background-color: #5C5C5C; + border: 1px solid #000000; + margin: 1px; + padding: 1px; +/* font-size: x-small;*/ +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid #000000; + padding: 1px; + font-family: "courier new", helvetica, "times new roman", sans-serif; +/* font-size: x-small;*/ + width: 99%; + margin: 1px auto 1px auto; + white-space: nowrap; + overflow: auto; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #c5c9cf; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help +{ + cursor: help; +} + +/* /me uses this a lot. (emote, try typing /me in a post.) */ +.meaction +{ + color: red; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 96%; +} + +/* Highlighted text - such as search results ;). */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds for posts, and several other sections of the forum. */ +.windowbg +{ + color: #C5C9CF; + background-color: #4D4D4D; +} +.windowbg2 +{ + color: #C5C9CF; + background-color: #575757; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature +{ +overflow: hidden; +width: 100%; +padding-bottom: 3px; +max-height: 70px; +height:expression(this.offsetHeight>70 ? "70px" : "auto"); +} + +/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + color: white; + font-style: normal; + text-decoration: none; + background-color: #313131; +} +.titlebg a:hover +{ + color: #dfdfdf; +} + +.catbg, .catbg2 +{ + font-weight: bold; + background-color: #384658; + color: #ffffff; +} + +/* This is used for tables that have a grid/border background color (such as the topic listing.) */ +.bordercolor +{ + background-color: #313131; +} + +/* This is used on tables that should just have a border around them. */ +.tborder +{ + border: 0px solid #313131; + background-color: #313131; + padding: 0px; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext +{ + font-size: x-small; + font-family: Tahoma, arial, helvetica, sans-serif; +} +.normaltext +{ +/* font-size: small;*/ +} +.largetext +{ + font-size: large; +} + +/* This is the white header area where the title, menu bars, and header boxes are. */ +#headerarea +{ + background-color: #434343; + border-bottom: 1px solid black; +} +/* This is the main area of the forum, the part that's gray. */ +#bodyarea +{ + background-color: #3F3F3F; +} +/* And this is the bottom, where the copyright is, etc. */ +#footerarea +{ + color: black; + background-color: #3F3F3F; + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +/* This is for the special header boxes on the top (user info, key stats, news box.) */ +.headertitles +{ + background-color: #434343; + border: 1px solid #434343; +} +.headerbodies +{ + border: 1px solid #000000; + background-color: #575757; + background-repeat: repeat-x; + background-position: bottom; +} +.online { + background-color: green; + color: white; + font-weight: bold; + font-family: Tahoma, arial, helvetica, sans-serif; + font-size: x-small; +} +.penalty { + color: white; + font-size: small; + font-weight: bold; +} +.ban { + background-color: red; +} +.read-only { + background-color: orange; +} +.warning { + background-color: green; +} + diff --git a/Themes/modern/style.fixed.css b/Themes/modern/style.fixed.css new file mode 100644 index 0000000..b99c926 --- /dev/null +++ b/Themes/modern/style.fixed.css @@ -0,0 +1,310 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #FFC246; + text-decoration: underline; +} +a:hover +{ + color: #FFFFFF; + text-decoration: underline; +} + +.karma, .karma:link, .karma:visited +{ + font-size: 11px; + color: #D2D2D2; + text-decoration: none; +} + +.header, .header:link, .header:visited +{ + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + font-size: 11px; + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +a.nav:hover, a.karma:hover +{ + text-decoration: underline; +} + +.mapProfile {color: black;} + +a.mapProfile {color: blue;} + + +/* Tables should show empty cells. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Tahoma in black. */ +body, td +{ + color: #C5C9CF; + font-size: small; + font-family: Tahoma, arial, helvetica, sans-serif; +} + +/* The main body of the entire forum. */ +body +{ + background-color: #434343; + margin: 0px; + padding: 0px; + width: 100%; + text-align: center; +} + +#wrapper +{ + text-align: left; + margin: auto; +/* width: 90%;*/ + min-width: 700px; + max-width: 1000px; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea, button +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 13px; + font-weight: normal; + padding: 2px; +} + +/* All input elements that are checkboxes or radio buttons. */ +input.check +{ +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 11px; + font-weight: normal; + padding: 0px; +} + +/* Standard horizontal rule.. ([hr], etc.) */ +hr, .hrcolor +{ + height: 1px; + border: 0; + color: #000000; + background-color: #000000; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #F6F6F6; + background-color: #5C5C5C; + border: 1px solid #000000; + margin: 1px; + padding: 1px; +/* font-size: x-small;*/ +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid #000000; + padding: 1px; + font-family: "courier new", helvetica, "times new roman", sans-serif; +/* font-size: x-small;*/ + width: 99%; + margin: 1px auto 1px auto; + white-space: nowrap; + overflow: auto; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #c5c9cf; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help +{ + cursor: help; +} + +/* /me uses this a lot. (emote, try typing /me in a post.) */ +.meaction +{ + color: red; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 96%; +} + +/* Highlighted text - such as search results ;). */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds for posts, and several other sections of the forum. */ +.windowbg +{ + color: #C5C9CF; + background-color: #4D4D4D; +} +.windowbg2 +{ + color: #C5C9CF; + background-color: #575757; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature +{ +overflow: hidden; +width: 100%; +padding-bottom: 3px; +max-height: 70px; +height:expression(this.offsetHeight>70 ? "70px" : "auto"); +} + +/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + color: white; + font-style: normal; + text-decoration: none; + background-color: #313131; +} +.titlebg a:hover +{ + color: #dfdfdf; +} + +.catbg, .catbg2 +{ + font-weight: bold; + background-color: #384658; + color: #ffffff; +} + +/* This is used for tables that have a grid/border background color (such as the topic listing.) */ +.bordercolor +{ + background-color: #313131; +} + +/* This is used on tables that should just have a border around them. */ +.tborder +{ + border: 0px solid #313131; + background-color: #313131; + padding: 0px; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext +{ + font-size: x-small; + font-family: Tahoma, arial, helvetica, sans-serif; +} +.normaltext +{ +/* font-size: small;*/ +} +.largetext +{ + font-size: large; +} + +/* This is the white header area where the title, menu bars, and header boxes are. */ +#headerarea +{ + background-color: #434343; + border-bottom: 1px solid black; +} +/* This is the main area of the forum, the part that's gray. */ +/*#bodyarea +{ + background-color: #3F3F3F; +}*/ +/* And this is the bottom, where the copyright is, etc. */ +#footerarea +{ + color: black; + background-color: #3F3F3F; + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +/* This is for the special header boxes on the top (user info, key stats, news box.) */ +.headertitles +{ + background-color: #434343; + border: 1px solid #434343; +} +.headerbodies +{ + border: 1px solid #000000; + background-color: #575757; + background-repeat: repeat-x; + background-position: bottom; +} +.online { + color: lightgreen; + font-weight: bold; + font-family: Tahoma, arial, helvetica, sans-serif; + font-size: x-small; +} +.penalty { + color: white; + font-size: small; + font-weight: bold; +} +.ban { + background-color: red; +} +.read-only { + background-color: orange; +} +.warning { + background-color: green; +} + +.b { + font-weight: bold; +} +.i { + font-style: italic; +} +.hidden { + display: none; +} diff --git a/Themes/modern/style.liquid.css b/Themes/modern/style.liquid.css new file mode 100644 index 0000000..70377d7 --- /dev/null +++ b/Themes/modern/style.liquid.css @@ -0,0 +1,300 @@ +/* Normal, standard links. */ +a:link, a:visited +{ + color: #FFC246; + text-decoration: underline; +} +a:hover +{ + color: #FFFFFF; + text-decoration: underline; +} + +.karma, .karma:link, .karma:visited +{ + font-size: 11px; + color: #D2D2D2; + text-decoration: none; +} + +.header, .header:link, .header:visited +{ + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +/* Navigation links - for the link tree. */ +.nav, .nav:link, .nav:visited +{ + font-size: 11px; + color: #D2D2D2; + font-weight: bold; + text-decoration: none; +} +a.nav:hover, a.karma:hover +{ + text-decoration: underline; +} + +.mapProfile {color: black;} + +a.mapProfile {color: blue;} + + +/* Tables should show empty cells. */ +table +{ + empty-cells: show; +} + +/* By default (td, body..) use Tahoma in black. */ +body, td +{ + color: #C5C9CF; + font-size: small; + font-family: Tahoma, arial, helvetica, sans-serif; +} + +/* The main body of the entire forum. */ +body +{ + background-color: #434343; + margin: 0px; + padding: 0px; + width: 100%; +} + +/* Input boxes - just a bit smaller than normal so they align well. */ +input, textarea, button +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 13px; + font-weight: normal; + padding: 2px; +} + +/* All input elements that are checkboxes or radio buttons. */ +input.check +{ +} + +/* Selects are a bit smaller, because it makes them look even better 8). */ +select +{ + background-color: #6E6E6E; + border: solid 1px #000000; + color: #d4d4d4; + font-family: Verdana, Arial; + font-size: 11px; + font-weight: normal; + padding: 0px; +} + +/* Standard horizontal rule.. ([hr], etc.) */ +hr, .hrcolor +{ + height: 1px; + border: 0; + color: #000000; + background-color: #000000; +} + +/* A quote, perhaps from another post. */ +.quote +{ + color: #F6F6F6; + background-color: #5C5C5C; + border: 1px solid #000000; + margin: 1px; + padding: 1px; +/* font-size: x-small;*/ +} + +/* A code block - maybe even PHP ;). */ +.code +{ + color: #000000; + background-color: #cccccc; + border: 1px solid #000000; + padding: 1px; + font-family: "courier new", helvetica, "times new roman", sans-serif; +/* font-size: x-small;*/ + width: 99%; + margin: 1px auto 1px auto; + white-space: nowrap; + overflow: auto; +} + +/* The "Quote:" and "Code:" header parts... */ +.quoteheader, .codeheader +{ + color: #c5c9cf; + text-decoration: none; + font-style: normal; + font-weight: bold; + font-size: x-small; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help +{ + cursor: help; +} + +/* /me uses this a lot. (emote, try typing /me in a post.) */ +.meaction +{ + color: red; +} + +/* The main post box - this makes it as wide as possible. */ +.editor +{ + width: 96%; +} + +/* Highlighted text - such as search results ;). */ +.highlight +{ + background-color: yellow; + font-weight: bold; + color: black; +} + +/* Alternating backgrounds for posts, and several other sections of the forum. */ +.windowbg +{ + color: #C5C9CF; + background-color: #4D4D4D; +} +.windowbg2 +{ + color: #C5C9CF; + background-color: #575757; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature +{ +overflow: hidden; +width: 100%; +padding-bottom: 3px; +max-height: 70px; +height:expression(this.offsetHeight>70 ? "70px" : "auto"); +} + +/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */ +.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited +{ + color: white; + font-style: normal; + text-decoration: none; + background-color: #313131; +} +.titlebg a:hover +{ + color: #dfdfdf; +} + +.catbg, .catbg2 +{ + font-weight: bold; + background-color: #384658; + color: #ffffff; +} + +/* This is used for tables that have a grid/border background color (such as the topic listing.) */ +.bordercolor +{ + background-color: #313131; +} + +/* This is used on tables that should just have a border around them. */ +.tborder +{ + border: 0px solid #313131; + background-color: #313131; + padding: 0px; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext +{ + font-size: x-small; + font-family: Tahoma, arial, helvetica, sans-serif; +} +.normaltext +{ +/* font-size: small;*/ +} +.largetext +{ + font-size: large; +} + +/* This is the white header area where the title, menu bars, and header boxes are. */ +#headerarea +{ + background-color: #434343; + border-bottom: 1px solid black; +} +/* This is the main area of the forum, the part that's gray. */ +/*#bodyarea +{ + background-color: #3F3F3F; +}*/ +/* And this is the bottom, where the copyright is, etc. */ +#footerarea +{ + color: black; + background-color: #3F3F3F; + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +/* This is for the special header boxes on the top (user info, key stats, news box.) */ +.headertitles +{ + background-color: #434343; + border: 1px solid #434343; +} +.headerbodies +{ + border: 1px solid #000000; + background-color: #575757; + background-repeat: repeat-x; + background-position: bottom; +} +.online { + color: lightgreen; + font-weight: bold; + font-family: Tahoma, arial, helvetica, sans-serif; + font-size: x-small; +} +.penalty { + color: white; + font-size: small; + font-weight: bold; +} +.ban { + background-color: red; +} +.read-only { + background-color: orange; +} +.warning { + background-color: green; +} + +.b { + font-weight: bold; +} +.i { + font-style: italic; +} +.hidden { + display: none; +} diff --git a/Themes/modern/wireless.css b/Themes/modern/wireless.css new file mode 100644 index 0000000..81ad3a6 --- /dev/null +++ b/Themes/modern/wireless.css @@ -0,0 +1,34 @@ +.catbg, tr.catbg td +{ + background-color: #6d92aa; + color: #ffffff; +} + +.titlebg, .titlebg a, .titlebg a:link, .titlebg a:visited +{ + background-color: #b6dbff; + color: #000000; + text-decoration: none; +} + +.windowbg, tr.windowbg td +{ + background-color: #ffffff; + color: #000000; +} +.windowbg2, tr.windowbg2 td +{ + background-color: #c0c0c0; + color: #000000; +} + +.new, a:link.new, a:visited.new +{ + background-color: #2f2fc0; + color: #ffffff; +} + +.updated +{ + color: #ff0000; +} \ No newline at end of file diff --git a/attachments b/attachments new file mode 120000 index 0000000..4a7a820 --- /dev/null +++ b/attachments @@ -0,0 +1 @@ +/var/www/img.rock.ru/forum/attachments \ No newline at end of file diff --git a/avatars b/avatars new file mode 120000 index 0000000..30d89e8 --- /dev/null +++ b/avatars @@ -0,0 +1 @@ +/var/www/img.rock.ru/forum/avatars \ No newline at end of file diff --git a/avatars.dat b/avatars.dat new file mode 100644 index 0000000..70d3220 --- /dev/null +++ b/avatars.dat @@ -0,0 +1 @@ +a:1085:{i:0;s:51:"/usr/local/www/rock/forum/attachments/avatar_10.jpg";i:1;s:54:"/usr/local/www/rock/forum/attachments/avatar_10005.png";i:2;s:54:"/usr/local/www/rock/forum/attachments/avatar_10008.jpg";i:3;s:54:"/usr/local/www/rock/forum/attachments/avatar_10012.jpg";i:4;s:54:"/usr/local/www/rock/forum/attachments/avatar_10040.gif";i:5;s:54:"/usr/local/www/rock/forum/attachments/avatar_10057.png";i:6;s:54:"/usr/local/www/rock/forum/attachments/avatar_10060.png";i:7;s:54:"/usr/local/www/rock/forum/attachments/avatar_10069.png";i:8;s:54:"/usr/local/www/rock/forum/attachments/avatar_10070.jpg";i:9;s:54:"/usr/local/www/rock/forum/attachments/avatar_10080.jpg";i:10;s:54:"/usr/local/www/rock/forum/attachments/avatar_10092.png";i:11;s:54:"/usr/local/www/rock/forum/attachments/avatar_10096.gif";i:12;s:54:"/usr/local/www/rock/forum/attachments/avatar_10117.jpg";i:13;s:54:"/usr/local/www/rock/forum/attachments/avatar_10123.png";i:14;s:53:"/usr/local/www/rock/forum/attachments/avatar_1013.png";i:15;s:54:"/usr/local/www/rock/forum/attachments/avatar_10130.png";i:16;s:54:"/usr/local/www/rock/forum/attachments/avatar_10136.png";i:17;s:54:"/usr/local/www/rock/forum/attachments/avatar_10140.png";i:18;s:54:"/usr/local/www/rock/forum/attachments/avatar_10157.png";i:19;s:54:"/usr/local/www/rock/forum/attachments/avatar_10174.jpg";i:20;s:54:"/usr/local/www/rock/forum/attachments/avatar_10202.png";i:21;s:54:"/usr/local/www/rock/forum/attachments/avatar_10216.png";i:22;s:54:"/usr/local/www/rock/forum/attachments/avatar_10244.png";i:23;s:54:"/usr/local/www/rock/forum/attachments/avatar_10260.gif";i:24;s:54:"/usr/local/www/rock/forum/attachments/avatar_10285.png";i:25;s:54:"/usr/local/www/rock/forum/attachments/avatar_10288.gif";i:26;s:54:"/usr/local/www/rock/forum/attachments/avatar_10289.png";i:27;s:54:"/usr/local/www/rock/forum/attachments/avatar_10291.gif";i:28;s:54:"/usr/local/www/rock/forum/attachments/avatar_10302.png";i:29;s:53:"/usr/local/www/rock/forum/attachments/avatar_1031.gif";i:30;s:54:"/usr/local/www/rock/forum/attachments/avatar_10312.gif";i:31;s:54:"/usr/local/www/rock/forum/attachments/avatar_10318.png";i:32;s:54:"/usr/local/www/rock/forum/attachments/avatar_10319.png";i:33;s:54:"/usr/local/www/rock/forum/attachments/avatar_10323.png";i:34;s:54:"/usr/local/www/rock/forum/attachments/avatar_10328.png";i:35;s:54:"/usr/local/www/rock/forum/attachments/avatar_10332.png";i:36;s:54:"/usr/local/www/rock/forum/attachments/avatar_10365.png";i:37;s:54:"/usr/local/www/rock/forum/attachments/avatar_10370.png";i:38;s:54:"/usr/local/www/rock/forum/attachments/avatar_10395.jpg";i:39;s:54:"/usr/local/www/rock/forum/attachments/avatar_10399.jpg";i:40;s:54:"/usr/local/www/rock/forum/attachments/avatar_10407.gif";i:41;s:54:"/usr/local/www/rock/forum/attachments/avatar_10415.png";i:42;s:54:"/usr/local/www/rock/forum/attachments/avatar_10417.png";i:43;s:54:"/usr/local/www/rock/forum/attachments/avatar_10435.png";i:44;s:54:"/usr/local/www/rock/forum/attachments/avatar_10436.png";i:45;s:54:"/usr/local/www/rock/forum/attachments/avatar_10444.jpg";i:46;s:54:"/usr/local/www/rock/forum/attachments/avatar_10461.jpg";i:47;s:54:"/usr/local/www/rock/forum/attachments/avatar_10464.png";i:48;s:54:"/usr/local/www/rock/forum/attachments/avatar_10483.png";i:49;s:54:"/usr/local/www/rock/forum/attachments/avatar_10487.jpg";i:50;s:54:"/usr/local/www/rock/forum/attachments/avatar_10501.png";i:51;s:54:"/usr/local/www/rock/forum/attachments/avatar_10505.gif";i:52;s:54:"/usr/local/www/rock/forum/attachments/avatar_10508.png";i:53;s:54:"/usr/local/www/rock/forum/attachments/avatar_10519.jpg";i:54;s:54:"/usr/local/www/rock/forum/attachments/avatar_10520.png";i:55;s:54:"/usr/local/www/rock/forum/attachments/avatar_10525.gif";i:56;s:54:"/usr/local/www/rock/forum/attachments/avatar_10552.png";i:57;s:54:"/usr/local/www/rock/forum/attachments/avatar_10560.png";i:58;s:54:"/usr/local/www/rock/forum/attachments/avatar_10569.png";i:59;s:54:"/usr/local/www/rock/forum/attachments/avatar_10587.gif";i:60;s:54:"/usr/local/www/rock/forum/attachments/avatar_10614.png";i:61;s:54:"/usr/local/www/rock/forum/attachments/avatar_10615.png";i:62;s:54:"/usr/local/www/rock/forum/attachments/avatar_10621.png";i:63;s:54:"/usr/local/www/rock/forum/attachments/avatar_10628.png";i:64;s:54:"/usr/local/www/rock/forum/attachments/avatar_10637.gif";i:65;s:54:"/usr/local/www/rock/forum/attachments/avatar_10639.gif";i:66;s:54:"/usr/local/www/rock/forum/attachments/avatar_10640.png";i:67;s:54:"/usr/local/www/rock/forum/attachments/avatar_10652.gif";i:68;s:54:"/usr/local/www/rock/forum/attachments/avatar_10663.bmp";i:69;s:54:"/usr/local/www/rock/forum/attachments/avatar_10672.png";i:70;s:54:"/usr/local/www/rock/forum/attachments/avatar_10682.png";i:71;s:54:"/usr/local/www/rock/forum/attachments/avatar_10686.png";i:72;s:54:"/usr/local/www/rock/forum/attachments/avatar_10696.jpg";i:73;s:54:"/usr/local/www/rock/forum/attachments/avatar_10719.jpg";i:74;s:54:"/usr/local/www/rock/forum/attachments/avatar_10740.png";i:75;s:54:"/usr/local/www/rock/forum/attachments/avatar_10742.png";i:76;s:54:"/usr/local/www/rock/forum/attachments/avatar_10754.jpg";i:77;s:54:"/usr/local/www/rock/forum/attachments/avatar_10760.png";i:78;s:54:"/usr/local/www/rock/forum/attachments/avatar_10771.jpg";i:79;s:54:"/usr/local/www/rock/forum/attachments/avatar_10777.jpg";i:80;s:54:"/usr/local/www/rock/forum/attachments/avatar_10779.jpg";i:81;s:54:"/usr/local/www/rock/forum/attachments/avatar_10793.png";i:82;s:54:"/usr/local/www/rock/forum/attachments/avatar_10797.gif";i:83;s:54:"/usr/local/www/rock/forum/attachments/avatar_10801.gif";i:84;s:54:"/usr/local/www/rock/forum/attachments/avatar_10806.png";i:85;s:54:"/usr/local/www/rock/forum/attachments/avatar_10823.png";i:86;s:54:"/usr/local/www/rock/forum/attachments/avatar_10830.png";i:87;s:54:"/usr/local/www/rock/forum/attachments/avatar_10836.png";i:88;s:54:"/usr/local/www/rock/forum/attachments/avatar_10841.png";i:89;s:54:"/usr/local/www/rock/forum/attachments/avatar_10844.png";i:90;s:54:"/usr/local/www/rock/forum/attachments/avatar_10854.jpg";i:91;s:54:"/usr/local/www/rock/forum/attachments/avatar_10856.jpg";i:92;s:54:"/usr/local/www/rock/forum/attachments/avatar_10861.jpg";i:93;s:54:"/usr/local/www/rock/forum/attachments/avatar_10880.png";i:94;s:54:"/usr/local/www/rock/forum/attachments/avatar_10884.jpg";i:95;s:54:"/usr/local/www/rock/forum/attachments/avatar_10887.png";i:96;s:54:"/usr/local/www/rock/forum/attachments/avatar_10889.jpg";i:97;s:54:"/usr/local/www/rock/forum/attachments/avatar_10933.png";i:98;s:54:"/usr/local/www/rock/forum/attachments/avatar_10967.jpg";i:99;s:54:"/usr/local/www/rock/forum/attachments/avatar_10989.jpg";i:100;s:54:"/usr/local/www/rock/forum/attachments/avatar_10996.png";i:101;s:51:"/usr/local/www/rock/forum/attachments/avatar_11.gif";i:102;s:51:"/usr/local/www/rock/forum/attachments/avatar_11.jpg";i:103;s:54:"/usr/local/www/rock/forum/attachments/avatar_11014.jpg";i:104;s:54:"/usr/local/www/rock/forum/attachments/avatar_11018.png";i:105;s:54:"/usr/local/www/rock/forum/attachments/avatar_11032.png";i:106;s:54:"/usr/local/www/rock/forum/attachments/avatar_11056.jpg";i:107;s:54:"/usr/local/www/rock/forum/attachments/avatar_11057.jpg";i:108;s:54:"/usr/local/www/rock/forum/attachments/avatar_11066.jpg";i:109;s:54:"/usr/local/www/rock/forum/attachments/avatar_11114.png";i:110;s:54:"/usr/local/www/rock/forum/attachments/avatar_11118.png";i:111;s:54:"/usr/local/www/rock/forum/attachments/avatar_11124.jpg";i:112;s:54:"/usr/local/www/rock/forum/attachments/avatar_11147.gif";i:113;s:54:"/usr/local/www/rock/forum/attachments/avatar_11165.png";i:114;s:54:"/usr/local/www/rock/forum/attachments/avatar_11215.png";i:115;s:54:"/usr/local/www/rock/forum/attachments/avatar_11223.png";i:116;s:54:"/usr/local/www/rock/forum/attachments/avatar_11231.png";i:117;s:54:"/usr/local/www/rock/forum/attachments/avatar_11237.png";i:118;s:54:"/usr/local/www/rock/forum/attachments/avatar_11264.jpg";i:119;s:54:"/usr/local/www/rock/forum/attachments/avatar_11270.png";i:120;s:53:"/usr/local/www/rock/forum/attachments/avatar_1128.png";i:121;s:54:"/usr/local/www/rock/forum/attachments/avatar_11285.jpg";i:122;s:54:"/usr/local/www/rock/forum/attachments/avatar_11298.png";i:123;s:54:"/usr/local/www/rock/forum/attachments/avatar_11319.png";i:124;s:54:"/usr/local/www/rock/forum/attachments/avatar_11330.png";i:125;s:54:"/usr/local/www/rock/forum/attachments/avatar_11333.png";i:126;s:54:"/usr/local/www/rock/forum/attachments/avatar_11344.jpg";i:127;s:54:"/usr/local/www/rock/forum/attachments/avatar_11354.gif";i:128;s:54:"/usr/local/www/rock/forum/attachments/avatar_11358.jpg";i:129;s:54:"/usr/local/www/rock/forum/attachments/avatar_11366.png";i:130;s:54:"/usr/local/www/rock/forum/attachments/avatar_11370.bmp";i:131;s:54:"/usr/local/www/rock/forum/attachments/avatar_11373.png";i:132;s:54:"/usr/local/www/rock/forum/attachments/avatar_11386.gif";i:133;s:54:"/usr/local/www/rock/forum/attachments/avatar_11388.jpg";i:134;s:54:"/usr/local/www/rock/forum/attachments/avatar_11414.png";i:135;s:54:"/usr/local/www/rock/forum/attachments/avatar_11417.png";i:136;s:54:"/usr/local/www/rock/forum/attachments/avatar_11420.png";i:137;s:54:"/usr/local/www/rock/forum/attachments/avatar_11421.jpg";i:138;s:54:"/usr/local/www/rock/forum/attachments/avatar_11433.png";i:139;s:54:"/usr/local/www/rock/forum/attachments/avatar_11437.png";i:140;s:54:"/usr/local/www/rock/forum/attachments/avatar_11439.jpg";i:141;s:54:"/usr/local/www/rock/forum/attachments/avatar_11443.png";i:142;s:54:"/usr/local/www/rock/forum/attachments/avatar_11446.png";i:143;s:54:"/usr/local/www/rock/forum/attachments/avatar_11451.png";i:144;s:54:"/usr/local/www/rock/forum/attachments/avatar_11452.png";i:145;s:54:"/usr/local/www/rock/forum/attachments/avatar_11496.png";i:146;s:54:"/usr/local/www/rock/forum/attachments/avatar_11512.png";i:147;s:54:"/usr/local/www/rock/forum/attachments/avatar_11521.png";i:148;s:54:"/usr/local/www/rock/forum/attachments/avatar_11522.jpg";i:149;s:54:"/usr/local/www/rock/forum/attachments/avatar_11535.png";i:150;s:54:"/usr/local/www/rock/forum/attachments/avatar_11546.png";i:151;s:54:"/usr/local/www/rock/forum/attachments/avatar_11575.png";i:152;s:54:"/usr/local/www/rock/forum/attachments/avatar_11577.gif";i:153;s:54:"/usr/local/www/rock/forum/attachments/avatar_11586.gif";i:154;s:54:"/usr/local/www/rock/forum/attachments/avatar_11615.png";i:155;s:54:"/usr/local/www/rock/forum/attachments/avatar_11620.png";i:156;s:54:"/usr/local/www/rock/forum/attachments/avatar_11624.jpg";i:157;s:54:"/usr/local/www/rock/forum/attachments/avatar_11631.png";i:158;s:54:"/usr/local/www/rock/forum/attachments/avatar_11642.jpg";i:159;s:54:"/usr/local/www/rock/forum/attachments/avatar_11655.gif";i:160;s:54:"/usr/local/www/rock/forum/attachments/avatar_11679.gif";i:161;s:54:"/usr/local/www/rock/forum/attachments/avatar_11686.jpg";i:162;s:54:"/usr/local/www/rock/forum/attachments/avatar_11704.gif";i:163;s:54:"/usr/local/www/rock/forum/attachments/avatar_11750.png";i:164;s:54:"/usr/local/www/rock/forum/attachments/avatar_11766.png";i:165;s:54:"/usr/local/www/rock/forum/attachments/avatar_11778.gif";i:166;s:54:"/usr/local/www/rock/forum/attachments/avatar_11788.png";i:167;s:54:"/usr/local/www/rock/forum/attachments/avatar_11793.jpg";i:168;s:54:"/usr/local/www/rock/forum/attachments/avatar_11794.jpg";i:169;s:54:"/usr/local/www/rock/forum/attachments/avatar_11823.gif";i:170;s:54:"/usr/local/www/rock/forum/attachments/avatar_11825.png";i:171;s:54:"/usr/local/www/rock/forum/attachments/avatar_11827.gif";i:172;s:54:"/usr/local/www/rock/forum/attachments/avatar_11832.png";i:173;s:54:"/usr/local/www/rock/forum/attachments/avatar_11834.png";i:174;s:54:"/usr/local/www/rock/forum/attachments/avatar_11839.png";i:175;s:54:"/usr/local/www/rock/forum/attachments/avatar_11864.png";i:176;s:54:"/usr/local/www/rock/forum/attachments/avatar_11865.png";i:177;s:54:"/usr/local/www/rock/forum/attachments/avatar_11880.jpg";i:178;s:54:"/usr/local/www/rock/forum/attachments/avatar_11921.png";i:179;s:54:"/usr/local/www/rock/forum/attachments/avatar_11922.png";i:180;s:54:"/usr/local/www/rock/forum/attachments/avatar_11929.gif";i:181;s:54:"/usr/local/www/rock/forum/attachments/avatar_11943.png";i:182;s:54:"/usr/local/www/rock/forum/attachments/avatar_11951.jpg";i:183;s:54:"/usr/local/www/rock/forum/attachments/avatar_11971.png";i:184;s:54:"/usr/local/www/rock/forum/attachments/avatar_11977.jpg";i:185;s:54:"/usr/local/www/rock/forum/attachments/avatar_11994.png";i:186;s:54:"/usr/local/www/rock/forum/attachments/avatar_12025.png";i:187;s:54:"/usr/local/www/rock/forum/attachments/avatar_12045.png";i:188;s:54:"/usr/local/www/rock/forum/attachments/avatar_12076.png";i:189;s:54:"/usr/local/www/rock/forum/attachments/avatar_12087.png";i:190;s:54:"/usr/local/www/rock/forum/attachments/avatar_12127.png";i:191;s:54:"/usr/local/www/rock/forum/attachments/avatar_12140.png";i:192;s:54:"/usr/local/www/rock/forum/attachments/avatar_12145.jpg";i:193;s:54:"/usr/local/www/rock/forum/attachments/avatar_12161.jpg";i:194;s:54:"/usr/local/www/rock/forum/attachments/avatar_12192.png";i:195;s:54:"/usr/local/www/rock/forum/attachments/avatar_12198.png";i:196;s:54:"/usr/local/www/rock/forum/attachments/avatar_12310.png";i:197;s:54:"/usr/local/www/rock/forum/attachments/avatar_12346.png";i:198;s:54:"/usr/local/www/rock/forum/attachments/avatar_12349.gif";i:199;s:54:"/usr/local/www/rock/forum/attachments/avatar_12354.png";i:200;s:54:"/usr/local/www/rock/forum/attachments/avatar_12371.gif";i:201;s:54:"/usr/local/www/rock/forum/attachments/avatar_12402.jpg";i:202;s:54:"/usr/local/www/rock/forum/attachments/avatar_12415.png";i:203;s:54:"/usr/local/www/rock/forum/attachments/avatar_12423.png";i:204;s:54:"/usr/local/www/rock/forum/attachments/avatar_12444.png";i:205;s:54:"/usr/local/www/rock/forum/attachments/avatar_12445.png";i:206;s:53:"/usr/local/www/rock/forum/attachments/avatar_1245.png";i:207;s:54:"/usr/local/www/rock/forum/attachments/avatar_12466.jpg";i:208;s:54:"/usr/local/www/rock/forum/attachments/avatar_12513.png";i:209;s:54:"/usr/local/www/rock/forum/attachments/avatar_12592.png";i:210;s:54:"/usr/local/www/rock/forum/attachments/avatar_12601.gif";i:211;s:54:"/usr/local/www/rock/forum/attachments/avatar_12603.jpg";i:212;s:54:"/usr/local/www/rock/forum/attachments/avatar_12618.jpg";i:213;s:54:"/usr/local/www/rock/forum/attachments/avatar_12628.jpg";i:214;s:54:"/usr/local/www/rock/forum/attachments/avatar_12652.png";i:215;s:54:"/usr/local/www/rock/forum/attachments/avatar_12656.jpg";i:216;s:54:"/usr/local/www/rock/forum/attachments/avatar_12667.jpg";i:217;s:54:"/usr/local/www/rock/forum/attachments/avatar_12697.jpg";i:218;s:54:"/usr/local/www/rock/forum/attachments/avatar_12701.gif";i:219;s:54:"/usr/local/www/rock/forum/attachments/avatar_12704.jpg";i:220;s:54:"/usr/local/www/rock/forum/attachments/avatar_12715.gif";i:221;s:54:"/usr/local/www/rock/forum/attachments/avatar_12721.png";i:222;s:54:"/usr/local/www/rock/forum/attachments/avatar_12741.png";i:223;s:54:"/usr/local/www/rock/forum/attachments/avatar_12762.png";i:224;s:54:"/usr/local/www/rock/forum/attachments/avatar_12764.png";i:225;s:54:"/usr/local/www/rock/forum/attachments/avatar_12783.png";i:226;s:54:"/usr/local/www/rock/forum/attachments/avatar_12802.png";i:227;s:54:"/usr/local/www/rock/forum/attachments/avatar_12809.png";i:228;s:54:"/usr/local/www/rock/forum/attachments/avatar_12813.png";i:229;s:54:"/usr/local/www/rock/forum/attachments/avatar_12902.jpg";i:230;s:54:"/usr/local/www/rock/forum/attachments/avatar_12906.jpg";i:231;s:54:"/usr/local/www/rock/forum/attachments/avatar_12921.png";i:232;s:54:"/usr/local/www/rock/forum/attachments/avatar_12966.png";i:233;s:54:"/usr/local/www/rock/forum/attachments/avatar_13052.png";i:234;s:54:"/usr/local/www/rock/forum/attachments/avatar_13075.png";i:235;s:54:"/usr/local/www/rock/forum/attachments/avatar_13082.png";i:236;s:54:"/usr/local/www/rock/forum/attachments/avatar_13103.jpg";i:237;s:54:"/usr/local/www/rock/forum/attachments/avatar_13237.png";i:238;s:54:"/usr/local/www/rock/forum/attachments/avatar_13405.png";i:239;s:54:"/usr/local/www/rock/forum/attachments/avatar_13566.jpg";i:240;s:54:"/usr/local/www/rock/forum/attachments/avatar_13581.jpg";i:241;s:54:"/usr/local/www/rock/forum/attachments/avatar_13586.png";i:242;s:54:"/usr/local/www/rock/forum/attachments/avatar_13594.png";i:243;s:54:"/usr/local/www/rock/forum/attachments/avatar_13605.png";i:244;s:54:"/usr/local/www/rock/forum/attachments/avatar_13625.gif";i:245;s:54:"/usr/local/www/rock/forum/attachments/avatar_13630.png";i:246;s:54:"/usr/local/www/rock/forum/attachments/avatar_13641.jpg";i:247;s:54:"/usr/local/www/rock/forum/attachments/avatar_13656.png";i:248;s:53:"/usr/local/www/rock/forum/attachments/avatar_1366.jpg";i:249;s:54:"/usr/local/www/rock/forum/attachments/avatar_13678.png";i:250;s:54:"/usr/local/www/rock/forum/attachments/avatar_13684.png";i:251;s:54:"/usr/local/www/rock/forum/attachments/avatar_13685.gif";i:252;s:54:"/usr/local/www/rock/forum/attachments/avatar_13702.png";i:253;s:54:"/usr/local/www/rock/forum/attachments/avatar_13705.png";i:254;s:54:"/usr/local/www/rock/forum/attachments/avatar_13758.jpg";i:255;s:54:"/usr/local/www/rock/forum/attachments/avatar_13759.png";i:256;s:54:"/usr/local/www/rock/forum/attachments/avatar_13761.jpg";i:257;s:54:"/usr/local/www/rock/forum/attachments/avatar_13786.png";i:258;s:54:"/usr/local/www/rock/forum/attachments/avatar_13800.gif";i:259;s:54:"/usr/local/www/rock/forum/attachments/avatar_13826.jpg";i:260;s:54:"/usr/local/www/rock/forum/attachments/avatar_13860.png";i:261;s:54:"/usr/local/www/rock/forum/attachments/avatar_13868.png";i:262;s:54:"/usr/local/www/rock/forum/attachments/avatar_13897.png";i:263;s:54:"/usr/local/www/rock/forum/attachments/avatar_13902.png";i:264;s:54:"/usr/local/www/rock/forum/attachments/avatar_13904.png";i:265;s:54:"/usr/local/www/rock/forum/attachments/avatar_13918.gif";i:266;s:54:"/usr/local/www/rock/forum/attachments/avatar_13920.png";i:267;s:54:"/usr/local/www/rock/forum/attachments/avatar_13934.jpg";i:268;s:54:"/usr/local/www/rock/forum/attachments/avatar_13964.png";i:269;s:54:"/usr/local/www/rock/forum/attachments/avatar_13971.png";i:270;s:54:"/usr/local/www/rock/forum/attachments/avatar_13990.png";i:271;s:54:"/usr/local/www/rock/forum/attachments/avatar_14043.png";i:272;s:54:"/usr/local/www/rock/forum/attachments/avatar_14051.png";i:273;s:54:"/usr/local/www/rock/forum/attachments/avatar_14084.jpg";i:274;s:54:"/usr/local/www/rock/forum/attachments/avatar_14085.gif";i:275;s:54:"/usr/local/www/rock/forum/attachments/avatar_14095.jpg";i:276;s:54:"/usr/local/www/rock/forum/attachments/avatar_14101.gif";i:277;s:53:"/usr/local/www/rock/forum/attachments/avatar_1412.jpg";i:278;s:54:"/usr/local/www/rock/forum/attachments/avatar_14153.png";i:279;s:54:"/usr/local/www/rock/forum/attachments/avatar_14207.png";i:280;s:54:"/usr/local/www/rock/forum/attachments/avatar_14227.png";i:281;s:53:"/usr/local/www/rock/forum/attachments/avatar_1428.jpg";i:282;s:53:"/usr/local/www/rock/forum/attachments/avatar_1480.gif";i:283;s:54:"/usr/local/www/rock/forum/attachments/avatar_14806.png";i:284;s:54:"/usr/local/www/rock/forum/attachments/avatar_15006.png";i:285;s:54:"/usr/local/www/rock/forum/attachments/avatar_15072.jpg";i:286;s:54:"/usr/local/www/rock/forum/attachments/avatar_15124.png";i:287;s:54:"/usr/local/www/rock/forum/attachments/avatar_15130.png";i:288;s:54:"/usr/local/www/rock/forum/attachments/avatar_15132.png";i:289;s:54:"/usr/local/www/rock/forum/attachments/avatar_15201.png";i:290;s:54:"/usr/local/www/rock/forum/attachments/avatar_15202.gif";i:291;s:54:"/usr/local/www/rock/forum/attachments/avatar_15244.png";i:292;s:54:"/usr/local/www/rock/forum/attachments/avatar_15303.png";i:293;s:54:"/usr/local/www/rock/forum/attachments/avatar_15325.png";i:294;s:54:"/usr/local/www/rock/forum/attachments/avatar_15355.png";i:295;s:54:"/usr/local/www/rock/forum/attachments/avatar_15367.png";i:296;s:54:"/usr/local/www/rock/forum/attachments/avatar_15471.png";i:297;s:54:"/usr/local/www/rock/forum/attachments/avatar_15495.png";i:298;s:54:"/usr/local/www/rock/forum/attachments/avatar_15501.png";i:299;s:54:"/usr/local/www/rock/forum/attachments/avatar_15505.jpg";i:300;s:54:"/usr/local/www/rock/forum/attachments/avatar_15532.png";i:301;s:54:"/usr/local/www/rock/forum/attachments/avatar_15588.jpg";i:302;s:54:"/usr/local/www/rock/forum/attachments/avatar_15593.png";i:303;s:54:"/usr/local/www/rock/forum/attachments/avatar_15601.png";i:304;s:54:"/usr/local/www/rock/forum/attachments/avatar_15607.jpg";i:305;s:54:"/usr/local/www/rock/forum/attachments/avatar_15609.png";i:306;s:54:"/usr/local/www/rock/forum/attachments/avatar_15628.jpg";i:307;s:54:"/usr/local/www/rock/forum/attachments/avatar_15635.png";i:308;s:54:"/usr/local/www/rock/forum/attachments/avatar_15651.png";i:309;s:54:"/usr/local/www/rock/forum/attachments/avatar_15682.png";i:310;s:54:"/usr/local/www/rock/forum/attachments/avatar_15686.png";i:311;s:54:"/usr/local/www/rock/forum/attachments/avatar_15687.png";i:312;s:54:"/usr/local/www/rock/forum/attachments/avatar_15698.gif";i:313;s:54:"/usr/local/www/rock/forum/attachments/avatar_15704.png";i:314;s:54:"/usr/local/www/rock/forum/attachments/avatar_15708.jpg";i:315;s:54:"/usr/local/www/rock/forum/attachments/avatar_15729.png";i:316;s:54:"/usr/local/www/rock/forum/attachments/avatar_15743.jpg";i:317;s:54:"/usr/local/www/rock/forum/attachments/avatar_15833.png";i:318;s:54:"/usr/local/www/rock/forum/attachments/avatar_15852.jpg";i:319;s:54:"/usr/local/www/rock/forum/attachments/avatar_15856.png";i:320;s:54:"/usr/local/www/rock/forum/attachments/avatar_15868.png";i:321;s:54:"/usr/local/www/rock/forum/attachments/avatar_15870.jpg";i:322;s:54:"/usr/local/www/rock/forum/attachments/avatar_15890.png";i:323;s:54:"/usr/local/www/rock/forum/attachments/avatar_15907.png";i:324;s:54:"/usr/local/www/rock/forum/attachments/avatar_15935.gif";i:325;s:54:"/usr/local/www/rock/forum/attachments/avatar_15939.gif";i:326;s:54:"/usr/local/www/rock/forum/attachments/avatar_15940.png";i:327;s:54:"/usr/local/www/rock/forum/attachments/avatar_15942.png";i:328;s:54:"/usr/local/www/rock/forum/attachments/avatar_15960.png";i:329;s:54:"/usr/local/www/rock/forum/attachments/avatar_16015.png";i:330;s:54:"/usr/local/www/rock/forum/attachments/avatar_16019.png";i:331;s:54:"/usr/local/www/rock/forum/attachments/avatar_16078.jpg";i:332;s:53:"/usr/local/www/rock/forum/attachments/avatar_1608.png";i:333;s:53:"/usr/local/www/rock/forum/attachments/avatar_1610.gif";i:334;s:54:"/usr/local/www/rock/forum/attachments/avatar_16196.png";i:335;s:53:"/usr/local/www/rock/forum/attachments/avatar_1621.png";i:336;s:54:"/usr/local/www/rock/forum/attachments/avatar_16257.png";i:337;s:54:"/usr/local/www/rock/forum/attachments/avatar_16381.png";i:338;s:54:"/usr/local/www/rock/forum/attachments/avatar_16404.png";i:339;s:54:"/usr/local/www/rock/forum/attachments/avatar_16412.jpg";i:340;s:54:"/usr/local/www/rock/forum/attachments/avatar_16442.png";i:341;s:54:"/usr/local/www/rock/forum/attachments/avatar_16462.png";i:342;s:54:"/usr/local/www/rock/forum/attachments/avatar_16483.png";i:343;s:54:"/usr/local/www/rock/forum/attachments/avatar_16495.png";i:344;s:54:"/usr/local/www/rock/forum/attachments/avatar_16529.png";i:345;s:54:"/usr/local/www/rock/forum/attachments/avatar_16549.jpg";i:346;s:54:"/usr/local/www/rock/forum/attachments/avatar_16674.png";i:347;s:54:"/usr/local/www/rock/forum/attachments/avatar_16678.png";i:348;s:54:"/usr/local/www/rock/forum/attachments/avatar_16722.gif";i:349;s:54:"/usr/local/www/rock/forum/attachments/avatar_16757.png";i:350;s:54:"/usr/local/www/rock/forum/attachments/avatar_16799.png";i:351;s:54:"/usr/local/www/rock/forum/attachments/avatar_16806.png";i:352;s:54:"/usr/local/www/rock/forum/attachments/avatar_16808.png";i:353;s:53:"/usr/local/www/rock/forum/attachments/avatar_1687.png";i:354;s:54:"/usr/local/www/rock/forum/attachments/avatar_16943.png";i:355;s:54:"/usr/local/www/rock/forum/attachments/avatar_16982.gif";i:356;s:54:"/usr/local/www/rock/forum/attachments/avatar_16985.png";i:357;s:54:"/usr/local/www/rock/forum/attachments/avatar_17015.png";i:358;s:54:"/usr/local/www/rock/forum/attachments/avatar_17042.png";i:359;s:54:"/usr/local/www/rock/forum/attachments/avatar_17154.png";i:360;s:54:"/usr/local/www/rock/forum/attachments/avatar_17166.jpg";i:361;s:54:"/usr/local/www/rock/forum/attachments/avatar_17205.png";i:362;s:54:"/usr/local/www/rock/forum/attachments/avatar_17214.png";i:363;s:54:"/usr/local/www/rock/forum/attachments/avatar_17227.jpg";i:364;s:53:"/usr/local/www/rock/forum/attachments/avatar_1723.png";i:365;s:54:"/usr/local/www/rock/forum/attachments/avatar_17250.png";i:366;s:53:"/usr/local/www/rock/forum/attachments/avatar_1730.gif";i:367;s:54:"/usr/local/www/rock/forum/attachments/avatar_17321.png";i:368;s:54:"/usr/local/www/rock/forum/attachments/avatar_17356.png";i:369;s:54:"/usr/local/www/rock/forum/attachments/avatar_17365.gif";i:370;s:54:"/usr/local/www/rock/forum/attachments/avatar_17437.png";i:371;s:53:"/usr/local/www/rock/forum/attachments/avatar_1752.jpg";i:372;s:54:"/usr/local/www/rock/forum/attachments/avatar_17537.gif";i:373;s:53:"/usr/local/www/rock/forum/attachments/avatar_1760.png";i:374;s:54:"/usr/local/www/rock/forum/attachments/avatar_17627.png";i:375;s:54:"/usr/local/www/rock/forum/attachments/avatar_17633.png";i:376;s:54:"/usr/local/www/rock/forum/attachments/avatar_17672.png";i:377;s:54:"/usr/local/www/rock/forum/attachments/avatar_17699.png";i:378;s:54:"/usr/local/www/rock/forum/attachments/avatar_17710.png";i:379;s:54:"/usr/local/www/rock/forum/attachments/avatar_17745.png";i:380;s:53:"/usr/local/www/rock/forum/attachments/avatar_1775.png";i:381;s:54:"/usr/local/www/rock/forum/attachments/avatar_17794.png";i:382;s:54:"/usr/local/www/rock/forum/attachments/avatar_17812.png";i:383;s:54:"/usr/local/www/rock/forum/attachments/avatar_17854.png";i:384;s:54:"/usr/local/www/rock/forum/attachments/avatar_17887.png";i:385;s:54:"/usr/local/www/rock/forum/attachments/avatar_17892.png";i:386;s:54:"/usr/local/www/rock/forum/attachments/avatar_17914.jpg";i:387;s:54:"/usr/local/www/rock/forum/attachments/avatar_18008.png";i:388;s:54:"/usr/local/www/rock/forum/attachments/avatar_18016.png";i:389;s:53:"/usr/local/www/rock/forum/attachments/avatar_1818.jpg";i:390;s:54:"/usr/local/www/rock/forum/attachments/avatar_18190.png";i:391;s:54:"/usr/local/www/rock/forum/attachments/avatar_18224.gif";i:392;s:54:"/usr/local/www/rock/forum/attachments/avatar_18254.jpg";i:393;s:54:"/usr/local/www/rock/forum/attachments/avatar_18325.png";i:394;s:54:"/usr/local/www/rock/forum/attachments/avatar_18418.png";i:395;s:54:"/usr/local/www/rock/forum/attachments/avatar_18443.png";i:396;s:53:"/usr/local/www/rock/forum/attachments/avatar_1851.jpg";i:397;s:54:"/usr/local/www/rock/forum/attachments/avatar_18542.jpg";i:398;s:54:"/usr/local/www/rock/forum/attachments/avatar_18760.png";i:399;s:54:"/usr/local/www/rock/forum/attachments/avatar_18792.png";i:400;s:53:"/usr/local/www/rock/forum/attachments/avatar_1882.png";i:401;s:54:"/usr/local/www/rock/forum/attachments/avatar_18862.png";i:402;s:54:"/usr/local/www/rock/forum/attachments/avatar_19162.png";i:403;s:54:"/usr/local/www/rock/forum/attachments/avatar_19206.png";i:404;s:54:"/usr/local/www/rock/forum/attachments/avatar_19210.jpg";i:405;s:54:"/usr/local/www/rock/forum/attachments/avatar_19224.png";i:406;s:54:"/usr/local/www/rock/forum/attachments/avatar_19280.png";i:407;s:54:"/usr/local/www/rock/forum/attachments/avatar_19286.gif";i:408;s:54:"/usr/local/www/rock/forum/attachments/avatar_19512.png";i:409;s:54:"/usr/local/www/rock/forum/attachments/avatar_19538.png";i:410;s:53:"/usr/local/www/rock/forum/attachments/avatar_1954.jpg";i:411;s:54:"/usr/local/www/rock/forum/attachments/avatar_19573.png";i:412;s:54:"/usr/local/www/rock/forum/attachments/avatar_19585.gif";i:413;s:54:"/usr/local/www/rock/forum/attachments/avatar_19640.png";i:414;s:54:"/usr/local/www/rock/forum/attachments/avatar_19647.gif";i:415;s:54:"/usr/local/www/rock/forum/attachments/avatar_19666.png";i:416;s:54:"/usr/local/www/rock/forum/attachments/avatar_19669.jpg";i:417;s:54:"/usr/local/www/rock/forum/attachments/avatar_19806.png";i:418;s:54:"/usr/local/www/rock/forum/attachments/avatar_19880.png";i:419;s:54:"/usr/local/www/rock/forum/attachments/avatar_19888.png";i:420;s:54:"/usr/local/www/rock/forum/attachments/avatar_19950.png";i:421;s:54:"/usr/local/www/rock/forum/attachments/avatar_19960.png";i:422;s:54:"/usr/local/www/rock/forum/attachments/avatar_20002.png";i:423;s:54:"/usr/local/www/rock/forum/attachments/avatar_20003.gif";i:424;s:54:"/usr/local/www/rock/forum/attachments/avatar_20164.png";i:425;s:54:"/usr/local/www/rock/forum/attachments/avatar_20213.gif";i:426;s:54:"/usr/local/www/rock/forum/attachments/avatar_20251.png";i:427;s:54:"/usr/local/www/rock/forum/attachments/avatar_20277.png";i:428;s:53:"/usr/local/www/rock/forum/attachments/avatar_2028.gif";i:429;s:54:"/usr/local/www/rock/forum/attachments/avatar_20361.png";i:430;s:54:"/usr/local/www/rock/forum/attachments/avatar_20371.png";i:431;s:54:"/usr/local/www/rock/forum/attachments/avatar_20375.png";i:432;s:54:"/usr/local/www/rock/forum/attachments/avatar_20408.png";i:433;s:54:"/usr/local/www/rock/forum/attachments/avatar_20527.png";i:434;s:54:"/usr/local/www/rock/forum/attachments/avatar_20556.png";i:435;s:52:"/usr/local/www/rock/forum/attachments/avatar_206.jpg";i:436;s:54:"/usr/local/www/rock/forum/attachments/avatar_20619.jpg";i:437;s:54:"/usr/local/www/rock/forum/attachments/avatar_20723.png";i:438;s:54:"/usr/local/www/rock/forum/attachments/avatar_20791.jpg";i:439;s:54:"/usr/local/www/rock/forum/attachments/avatar_20826.png";i:440;s:53:"/usr/local/www/rock/forum/attachments/avatar_2095.jpg";i:441;s:54:"/usr/local/www/rock/forum/attachments/avatar_21064.jpg";i:442;s:54:"/usr/local/www/rock/forum/attachments/avatar_21092.png";i:443;s:54:"/usr/local/www/rock/forum/attachments/avatar_21099.png";i:444;s:53:"/usr/local/www/rock/forum/attachments/avatar_2114.gif";i:445;s:54:"/usr/local/www/rock/forum/attachments/avatar_21218.jpg";i:446;s:54:"/usr/local/www/rock/forum/attachments/avatar_21271.jpg";i:447;s:54:"/usr/local/www/rock/forum/attachments/avatar_21295.png";i:448;s:54:"/usr/local/www/rock/forum/attachments/avatar_21315.png";i:449;s:54:"/usr/local/www/rock/forum/attachments/avatar_21346.gif";i:450;s:54:"/usr/local/www/rock/forum/attachments/avatar_21411.png";i:451;s:53:"/usr/local/www/rock/forum/attachments/avatar_2142.gif";i:452;s:54:"/usr/local/www/rock/forum/attachments/avatar_21493.jpg";i:453;s:54:"/usr/local/www/rock/forum/attachments/avatar_21526.png";i:454;s:54:"/usr/local/www/rock/forum/attachments/avatar_21594.png";i:455;s:53:"/usr/local/www/rock/forum/attachments/avatar_2372.jpg";i:456;s:53:"/usr/local/www/rock/forum/attachments/avatar_2402.jpg";i:457;s:52:"/usr/local/www/rock/forum/attachments/avatar_256.png";i:458;s:53:"/usr/local/www/rock/forum/attachments/avatar_2563.gif";i:459;s:53:"/usr/local/www/rock/forum/attachments/avatar_2565.gif";i:460;s:52:"/usr/local/www/rock/forum/attachments/avatar_261.png";i:461;s:53:"/usr/local/www/rock/forum/attachments/avatar_2610.jpg";i:462;s:53:"/usr/local/www/rock/forum/attachments/avatar_2668.gif";i:463;s:53:"/usr/local/www/rock/forum/attachments/avatar_2681.png";i:464;s:53:"/usr/local/www/rock/forum/attachments/avatar_2745.jpg";i:465;s:53:"/usr/local/www/rock/forum/attachments/avatar_2779.jpg";i:466;s:53:"/usr/local/www/rock/forum/attachments/avatar_2782.gif";i:467;s:53:"/usr/local/www/rock/forum/attachments/avatar_2843.png";i:468;s:53:"/usr/local/www/rock/forum/attachments/avatar_2848.jpg";i:469;s:53:"/usr/local/www/rock/forum/attachments/avatar_2859.gif";i:470;s:53:"/usr/local/www/rock/forum/attachments/avatar_2979.jpg";i:471;s:53:"/usr/local/www/rock/forum/attachments/avatar_2980.png";i:472;s:53:"/usr/local/www/rock/forum/attachments/avatar_3025.png";i:473;s:53:"/usr/local/www/rock/forum/attachments/avatar_3123.jpg";i:474;s:52:"/usr/local/www/rock/forum/attachments/avatar_317.jpg";i:475;s:53:"/usr/local/www/rock/forum/attachments/avatar_3191.jpg";i:476;s:53:"/usr/local/www/rock/forum/attachments/avatar_3212.gif";i:477;s:53:"/usr/local/www/rock/forum/attachments/avatar_3498.jpg";i:478;s:52:"/usr/local/www/rock/forum/attachments/avatar_365.jpg";i:479;s:52:"/usr/local/www/rock/forum/attachments/avatar_373.jpg";i:480;s:53:"/usr/local/www/rock/forum/attachments/avatar_3862.jpg";i:481;s:53:"/usr/local/www/rock/forum/attachments/avatar_3893.jpg";i:482;s:53:"/usr/local/www/rock/forum/attachments/avatar_3896.jpg";i:483;s:53:"/usr/local/www/rock/forum/attachments/avatar_3897.gif";i:484;s:53:"/usr/local/www/rock/forum/attachments/avatar_3900.png";i:485;s:53:"/usr/local/www/rock/forum/attachments/avatar_3909.jpg";i:486;s:53:"/usr/local/www/rock/forum/attachments/avatar_3911.png";i:487;s:53:"/usr/local/www/rock/forum/attachments/avatar_3914.png";i:488;s:53:"/usr/local/www/rock/forum/attachments/avatar_3917.png";i:489;s:53:"/usr/local/www/rock/forum/attachments/avatar_3918.png";i:490;s:53:"/usr/local/www/rock/forum/attachments/avatar_3919.jpg";i:491;s:53:"/usr/local/www/rock/forum/attachments/avatar_3921.jpg";i:492;s:53:"/usr/local/www/rock/forum/attachments/avatar_3923.gif";i:493;s:53:"/usr/local/www/rock/forum/attachments/avatar_3925.png";i:494;s:53:"/usr/local/www/rock/forum/attachments/avatar_3930.jpg";i:495;s:53:"/usr/local/www/rock/forum/attachments/avatar_3933.jpg";i:496;s:53:"/usr/local/www/rock/forum/attachments/avatar_3939.jpg";i:497;s:53:"/usr/local/www/rock/forum/attachments/avatar_3942.gif";i:498;s:53:"/usr/local/www/rock/forum/attachments/avatar_3945.png";i:499;s:53:"/usr/local/www/rock/forum/attachments/avatar_3950.png";i:500;s:53:"/usr/local/www/rock/forum/attachments/avatar_3952.gif";i:501;s:53:"/usr/local/www/rock/forum/attachments/avatar_3959.png";i:502;s:53:"/usr/local/www/rock/forum/attachments/avatar_3961.jpg";i:503;s:53:"/usr/local/www/rock/forum/attachments/avatar_3962.png";i:504;s:53:"/usr/local/www/rock/forum/attachments/avatar_3964.gif";i:505;s:53:"/usr/local/www/rock/forum/attachments/avatar_3973.png";i:506;s:53:"/usr/local/www/rock/forum/attachments/avatar_3978.gif";i:507;s:53:"/usr/local/www/rock/forum/attachments/avatar_3987.png";i:508;s:53:"/usr/local/www/rock/forum/attachments/avatar_3989.png";i:509;s:53:"/usr/local/www/rock/forum/attachments/avatar_3991.jpg";i:510;s:50:"/usr/local/www/rock/forum/attachments/avatar_4.jpg";i:511;s:53:"/usr/local/www/rock/forum/attachments/avatar_4045.jpg";i:512;s:53:"/usr/local/www/rock/forum/attachments/avatar_4050.jpg";i:513;s:53:"/usr/local/www/rock/forum/attachments/avatar_4052.gif";i:514;s:53:"/usr/local/www/rock/forum/attachments/avatar_4058.jpg";i:515;s:53:"/usr/local/www/rock/forum/attachments/avatar_4082.gif";i:516;s:53:"/usr/local/www/rock/forum/attachments/avatar_4116.gif";i:517;s:53:"/usr/local/www/rock/forum/attachments/avatar_4135.jpg";i:518;s:53:"/usr/local/www/rock/forum/attachments/avatar_4138.png";i:519;s:53:"/usr/local/www/rock/forum/attachments/avatar_4157.gif";i:520;s:53:"/usr/local/www/rock/forum/attachments/avatar_4177.jpg";i:521;s:52:"/usr/local/www/rock/forum/attachments/avatar_418.jpg";i:522;s:53:"/usr/local/www/rock/forum/attachments/avatar_4181.gif";i:523;s:53:"/usr/local/www/rock/forum/attachments/avatar_4189.png";i:524;s:53:"/usr/local/www/rock/forum/attachments/avatar_4217.png";i:525;s:53:"/usr/local/www/rock/forum/attachments/avatar_4238.png";i:526;s:53:"/usr/local/www/rock/forum/attachments/avatar_4248.gif";i:527;s:53:"/usr/local/www/rock/forum/attachments/avatar_4256.png";i:528;s:52:"/usr/local/www/rock/forum/attachments/avatar_426.jpg";i:529;s:53:"/usr/local/www/rock/forum/attachments/avatar_4277.png";i:530;s:53:"/usr/local/www/rock/forum/attachments/avatar_4302.jpg";i:531;s:53:"/usr/local/www/rock/forum/attachments/avatar_4327.png";i:532;s:53:"/usr/local/www/rock/forum/attachments/avatar_4334.png";i:533;s:53:"/usr/local/www/rock/forum/attachments/avatar_4347.png";i:534;s:53:"/usr/local/www/rock/forum/attachments/avatar_4361.jpg";i:535;s:53:"/usr/local/www/rock/forum/attachments/avatar_4379.jpg";i:536;s:53:"/usr/local/www/rock/forum/attachments/avatar_4383.jpg";i:537;s:53:"/usr/local/www/rock/forum/attachments/avatar_4393.png";i:538;s:53:"/usr/local/www/rock/forum/attachments/avatar_4396.gif";i:539;s:53:"/usr/local/www/rock/forum/attachments/avatar_4415.png";i:540;s:53:"/usr/local/www/rock/forum/attachments/avatar_4421.jpg";i:541;s:53:"/usr/local/www/rock/forum/attachments/avatar_4463.png";i:542;s:53:"/usr/local/www/rock/forum/attachments/avatar_4467.png";i:543;s:53:"/usr/local/www/rock/forum/attachments/avatar_4472.png";i:544;s:53:"/usr/local/www/rock/forum/attachments/avatar_4488.jpg";i:545;s:53:"/usr/local/www/rock/forum/attachments/avatar_4505.jpg";i:546;s:53:"/usr/local/www/rock/forum/attachments/avatar_4517.gif";i:547;s:53:"/usr/local/www/rock/forum/attachments/avatar_4536.jpg";i:548;s:53:"/usr/local/www/rock/forum/attachments/avatar_4537.jpg";i:549;s:53:"/usr/local/www/rock/forum/attachments/avatar_4542.jpg";i:550;s:53:"/usr/local/www/rock/forum/attachments/avatar_4551.jpg";i:551;s:53:"/usr/local/www/rock/forum/attachments/avatar_4563.png";i:552;s:52:"/usr/local/www/rock/forum/attachments/avatar_458.png";i:553;s:53:"/usr/local/www/rock/forum/attachments/avatar_4594.jpg";i:554;s:53:"/usr/local/www/rock/forum/attachments/avatar_4609.jpg";i:555;s:53:"/usr/local/www/rock/forum/attachments/avatar_4691.jpg";i:556;s:53:"/usr/local/www/rock/forum/attachments/avatar_4694.gif";i:557;s:53:"/usr/local/www/rock/forum/attachments/avatar_4710.png";i:558;s:53:"/usr/local/www/rock/forum/attachments/avatar_4756.png";i:559;s:53:"/usr/local/www/rock/forum/attachments/avatar_4759.png";i:560;s:53:"/usr/local/www/rock/forum/attachments/avatar_4797.jpg";i:561;s:53:"/usr/local/www/rock/forum/attachments/avatar_4805.gif";i:562;s:53:"/usr/local/www/rock/forum/attachments/avatar_4822.jpg";i:563;s:53:"/usr/local/www/rock/forum/attachments/avatar_4834.gif";i:564;s:53:"/usr/local/www/rock/forum/attachments/avatar_4844.jpg";i:565;s:53:"/usr/local/www/rock/forum/attachments/avatar_4864.png";i:566;s:53:"/usr/local/www/rock/forum/attachments/avatar_4868.jpg";i:567;s:53:"/usr/local/www/rock/forum/attachments/avatar_4879.png";i:568;s:53:"/usr/local/www/rock/forum/attachments/avatar_4898.jpg";i:569;s:53:"/usr/local/www/rock/forum/attachments/avatar_4900.jpg";i:570;s:53:"/usr/local/www/rock/forum/attachments/avatar_4918.png";i:571;s:53:"/usr/local/www/rock/forum/attachments/avatar_4931.png";i:572;s:53:"/usr/local/www/rock/forum/attachments/avatar_4934.jpg";i:573;s:53:"/usr/local/www/rock/forum/attachments/avatar_4962.jpg";i:574;s:53:"/usr/local/www/rock/forum/attachments/avatar_4973.png";i:575;s:53:"/usr/local/www/rock/forum/attachments/avatar_4974.png";i:576;s:53:"/usr/local/www/rock/forum/attachments/avatar_4979.png";i:577;s:53:"/usr/local/www/rock/forum/attachments/avatar_4993.gif";i:578;s:53:"/usr/local/www/rock/forum/attachments/avatar_4996.jpg";i:579;s:50:"/usr/local/www/rock/forum/attachments/avatar_5.gif";i:580;s:53:"/usr/local/www/rock/forum/attachments/avatar_5006.gif";i:581;s:53:"/usr/local/www/rock/forum/attachments/avatar_5008.jpg";i:582;s:52:"/usr/local/www/rock/forum/attachments/avatar_501.png";i:583;s:53:"/usr/local/www/rock/forum/attachments/avatar_5012.gif";i:584;s:53:"/usr/local/www/rock/forum/attachments/avatar_5029.jpg";i:585;s:53:"/usr/local/www/rock/forum/attachments/avatar_5038.png";i:586;s:53:"/usr/local/www/rock/forum/attachments/avatar_5040.png";i:587;s:53:"/usr/local/www/rock/forum/attachments/avatar_5048.gif";i:588;s:53:"/usr/local/www/rock/forum/attachments/avatar_5048.jpg";i:589;s:53:"/usr/local/www/rock/forum/attachments/avatar_5050.gif";i:590;s:53:"/usr/local/www/rock/forum/attachments/avatar_5051.png";i:591;s:53:"/usr/local/www/rock/forum/attachments/avatar_5118.png";i:592;s:53:"/usr/local/www/rock/forum/attachments/avatar_5133.jpg";i:593;s:53:"/usr/local/www/rock/forum/attachments/avatar_5150.png";i:594;s:53:"/usr/local/www/rock/forum/attachments/avatar_5168.png";i:595;s:53:"/usr/local/www/rock/forum/attachments/avatar_5188.jpg";i:596;s:53:"/usr/local/www/rock/forum/attachments/avatar_5206.png";i:597;s:53:"/usr/local/www/rock/forum/attachments/avatar_5209.png";i:598;s:53:"/usr/local/www/rock/forum/attachments/avatar_5234.jpg";i:599;s:53:"/usr/local/www/rock/forum/attachments/avatar_5236.gif";i:600;s:53:"/usr/local/www/rock/forum/attachments/avatar_5239.jpg";i:601;s:53:"/usr/local/www/rock/forum/attachments/avatar_5288.png";i:602;s:53:"/usr/local/www/rock/forum/attachments/avatar_5323.gif";i:603;s:53:"/usr/local/www/rock/forum/attachments/avatar_5341.png";i:604;s:53:"/usr/local/www/rock/forum/attachments/avatar_5346.png";i:605;s:52:"/usr/local/www/rock/forum/attachments/avatar_536.png";i:606;s:53:"/usr/local/www/rock/forum/attachments/avatar_5388.png";i:607;s:52:"/usr/local/www/rock/forum/attachments/avatar_541.png";i:608;s:53:"/usr/local/www/rock/forum/attachments/avatar_5415.jpg";i:609;s:53:"/usr/local/www/rock/forum/attachments/avatar_5418.gif";i:610;s:53:"/usr/local/www/rock/forum/attachments/avatar_5424.jpg";i:611;s:53:"/usr/local/www/rock/forum/attachments/avatar_5460.jpg";i:612;s:53:"/usr/local/www/rock/forum/attachments/avatar_5461.jpg";i:613;s:53:"/usr/local/www/rock/forum/attachments/avatar_5479.jpg";i:614;s:53:"/usr/local/www/rock/forum/attachments/avatar_5487.jpg";i:615;s:53:"/usr/local/www/rock/forum/attachments/avatar_5488.png";i:616;s:53:"/usr/local/www/rock/forum/attachments/avatar_5492.jpg";i:617;s:53:"/usr/local/www/rock/forum/attachments/avatar_5494.gif";i:618;s:53:"/usr/local/www/rock/forum/attachments/avatar_5498.jpg";i:619;s:53:"/usr/local/www/rock/forum/attachments/avatar_5513.gif";i:620;s:53:"/usr/local/www/rock/forum/attachments/avatar_5545.png";i:621;s:53:"/usr/local/www/rock/forum/attachments/avatar_5608.jpg";i:622;s:53:"/usr/local/www/rock/forum/attachments/avatar_5614.gif";i:623;s:53:"/usr/local/www/rock/forum/attachments/avatar_5631.png";i:624;s:53:"/usr/local/www/rock/forum/attachments/avatar_5637.gif";i:625;s:53:"/usr/local/www/rock/forum/attachments/avatar_5639.png";i:626;s:53:"/usr/local/www/rock/forum/attachments/avatar_5643.jpg";i:627;s:53:"/usr/local/www/rock/forum/attachments/avatar_5646.png";i:628;s:53:"/usr/local/www/rock/forum/attachments/avatar_5689.png";i:629;s:53:"/usr/local/www/rock/forum/attachments/avatar_5733.gif";i:630;s:53:"/usr/local/www/rock/forum/attachments/avatar_5737.png";i:631;s:53:"/usr/local/www/rock/forum/attachments/avatar_5753.jpg";i:632;s:53:"/usr/local/www/rock/forum/attachments/avatar_5796.jpg";i:633;s:53:"/usr/local/www/rock/forum/attachments/avatar_5819.gif";i:634;s:53:"/usr/local/www/rock/forum/attachments/avatar_5847.jpg";i:635;s:53:"/usr/local/www/rock/forum/attachments/avatar_5859.jpg";i:636;s:53:"/usr/local/www/rock/forum/attachments/avatar_5882.jpg";i:637;s:53:"/usr/local/www/rock/forum/attachments/avatar_5898.gif";i:638;s:53:"/usr/local/www/rock/forum/attachments/avatar_5912.png";i:639;s:53:"/usr/local/www/rock/forum/attachments/avatar_5918.png";i:640;s:53:"/usr/local/www/rock/forum/attachments/avatar_5928.jpg";i:641;s:53:"/usr/local/www/rock/forum/attachments/avatar_5931.jpg";i:642;s:53:"/usr/local/www/rock/forum/attachments/avatar_5932.png";i:643;s:53:"/usr/local/www/rock/forum/attachments/avatar_5935.gif";i:644;s:53:"/usr/local/www/rock/forum/attachments/avatar_5936.jpg";i:645;s:53:"/usr/local/www/rock/forum/attachments/avatar_5991.png";i:646;s:50:"/usr/local/www/rock/forum/attachments/avatar_6.gif";i:647;s:50:"/usr/local/www/rock/forum/attachments/avatar_6.jpg";i:648;s:53:"/usr/local/www/rock/forum/attachments/avatar_6006.png";i:649;s:53:"/usr/local/www/rock/forum/attachments/avatar_6013.png";i:650;s:53:"/usr/local/www/rock/forum/attachments/avatar_6026.jpg";i:651;s:53:"/usr/local/www/rock/forum/attachments/avatar_6050.gif";i:652;s:53:"/usr/local/www/rock/forum/attachments/avatar_6083.jpg";i:653;s:53:"/usr/local/www/rock/forum/attachments/avatar_6090.png";i:654;s:53:"/usr/local/www/rock/forum/attachments/avatar_6102.png";i:655;s:53:"/usr/local/www/rock/forum/attachments/avatar_6105.png";i:656;s:53:"/usr/local/www/rock/forum/attachments/avatar_6125.gif";i:657;s:53:"/usr/local/www/rock/forum/attachments/avatar_6129.png";i:658;s:53:"/usr/local/www/rock/forum/attachments/avatar_6134.png";i:659;s:53:"/usr/local/www/rock/forum/attachments/avatar_6136.jpg";i:660;s:53:"/usr/local/www/rock/forum/attachments/avatar_6158.png";i:661;s:53:"/usr/local/www/rock/forum/attachments/avatar_6177.png";i:662;s:53:"/usr/local/www/rock/forum/attachments/avatar_6182.jpg";i:663;s:53:"/usr/local/www/rock/forum/attachments/avatar_6185.png";i:664;s:53:"/usr/local/www/rock/forum/attachments/avatar_6187.png";i:665;s:53:"/usr/local/www/rock/forum/attachments/avatar_6190.gif";i:666;s:53:"/usr/local/www/rock/forum/attachments/avatar_6200.png";i:667;s:53:"/usr/local/www/rock/forum/attachments/avatar_6209.png";i:668;s:53:"/usr/local/www/rock/forum/attachments/avatar_6213.png";i:669;s:53:"/usr/local/www/rock/forum/attachments/avatar_6221.png";i:670;s:53:"/usr/local/www/rock/forum/attachments/avatar_6224.png";i:671;s:53:"/usr/local/www/rock/forum/attachments/avatar_6234.png";i:672;s:53:"/usr/local/www/rock/forum/attachments/avatar_6238.jpg";i:673;s:53:"/usr/local/www/rock/forum/attachments/avatar_6248.gif";i:674;s:53:"/usr/local/www/rock/forum/attachments/avatar_6255.jpg";i:675;s:53:"/usr/local/www/rock/forum/attachments/avatar_6262.png";i:676;s:53:"/usr/local/www/rock/forum/attachments/avatar_6275.png";i:677;s:53:"/usr/local/www/rock/forum/attachments/avatar_6279.png";i:678;s:53:"/usr/local/www/rock/forum/attachments/avatar_6291.png";i:679;s:53:"/usr/local/www/rock/forum/attachments/avatar_6296.png";i:680;s:53:"/usr/local/www/rock/forum/attachments/avatar_6301.png";i:681;s:53:"/usr/local/www/rock/forum/attachments/avatar_6333.png";i:682;s:53:"/usr/local/www/rock/forum/attachments/avatar_6345.png";i:683;s:53:"/usr/local/www/rock/forum/attachments/avatar_6351.png";i:684;s:53:"/usr/local/www/rock/forum/attachments/avatar_6377.jpg";i:685;s:53:"/usr/local/www/rock/forum/attachments/avatar_6391.jpg";i:686;s:53:"/usr/local/www/rock/forum/attachments/avatar_6399.gif";i:687;s:52:"/usr/local/www/rock/forum/attachments/avatar_640.jpg";i:688;s:53:"/usr/local/www/rock/forum/attachments/avatar_6413.gif";i:689;s:53:"/usr/local/www/rock/forum/attachments/avatar_6416.gif";i:690;s:53:"/usr/local/www/rock/forum/attachments/avatar_6445.gif";i:691;s:53:"/usr/local/www/rock/forum/attachments/avatar_6454.jpg";i:692;s:53:"/usr/local/www/rock/forum/attachments/avatar_6461.gif";i:693;s:53:"/usr/local/www/rock/forum/attachments/avatar_6525.png";i:694;s:53:"/usr/local/www/rock/forum/attachments/avatar_6540.png";i:695;s:53:"/usr/local/www/rock/forum/attachments/avatar_6543.png";i:696;s:53:"/usr/local/www/rock/forum/attachments/avatar_6551.jpg";i:697;s:53:"/usr/local/www/rock/forum/attachments/avatar_6575.png";i:698;s:53:"/usr/local/www/rock/forum/attachments/avatar_6617.png";i:699;s:52:"/usr/local/www/rock/forum/attachments/avatar_664.jpg";i:700;s:53:"/usr/local/www/rock/forum/attachments/avatar_6643.png";i:701;s:53:"/usr/local/www/rock/forum/attachments/avatar_6650.png";i:702;s:53:"/usr/local/www/rock/forum/attachments/avatar_6653.gif";i:703;s:53:"/usr/local/www/rock/forum/attachments/avatar_6662.jpg";i:704;s:53:"/usr/local/www/rock/forum/attachments/avatar_6694.png";i:705;s:53:"/usr/local/www/rock/forum/attachments/avatar_6737.png";i:706;s:53:"/usr/local/www/rock/forum/attachments/avatar_6747.png";i:707;s:53:"/usr/local/www/rock/forum/attachments/avatar_6750.png";i:708;s:53:"/usr/local/www/rock/forum/attachments/avatar_6761.png";i:709;s:53:"/usr/local/www/rock/forum/attachments/avatar_6770.png";i:710;s:53:"/usr/local/www/rock/forum/attachments/avatar_6773.jpg";i:711;s:53:"/usr/local/www/rock/forum/attachments/avatar_6776.png";i:712;s:53:"/usr/local/www/rock/forum/attachments/avatar_6806.png";i:713;s:53:"/usr/local/www/rock/forum/attachments/avatar_6824.png";i:714;s:53:"/usr/local/www/rock/forum/attachments/avatar_6846.png";i:715;s:53:"/usr/local/www/rock/forum/attachments/avatar_6860.jpg";i:716;s:53:"/usr/local/www/rock/forum/attachments/avatar_6897.jpg";i:717;s:53:"/usr/local/www/rock/forum/attachments/avatar_6910.jpg";i:718;s:53:"/usr/local/www/rock/forum/attachments/avatar_6916.png";i:719;s:53:"/usr/local/www/rock/forum/attachments/avatar_6922.jpg";i:720;s:53:"/usr/local/www/rock/forum/attachments/avatar_6924.gif";i:721;s:53:"/usr/local/www/rock/forum/attachments/avatar_6929.gif";i:722;s:53:"/usr/local/www/rock/forum/attachments/avatar_6933.gif";i:723;s:53:"/usr/local/www/rock/forum/attachments/avatar_6943.gif";i:724;s:53:"/usr/local/www/rock/forum/attachments/avatar_6951.png";i:725;s:53:"/usr/local/www/rock/forum/attachments/avatar_6957.jpg";i:726;s:53:"/usr/local/www/rock/forum/attachments/avatar_6967.png";i:727;s:53:"/usr/local/www/rock/forum/attachments/avatar_6993.jpg";i:728;s:53:"/usr/local/www/rock/forum/attachments/avatar_6996.jpg";i:729;s:53:"/usr/local/www/rock/forum/attachments/avatar_6999.gif";i:730;s:50:"/usr/local/www/rock/forum/attachments/avatar_7.gif";i:731;s:50:"/usr/local/www/rock/forum/attachments/avatar_7.jpg";i:732;s:53:"/usr/local/www/rock/forum/attachments/avatar_7024.gif";i:733;s:53:"/usr/local/www/rock/forum/attachments/avatar_7027.jpg";i:734;s:53:"/usr/local/www/rock/forum/attachments/avatar_7042.gif";i:735;s:53:"/usr/local/www/rock/forum/attachments/avatar_7057.png";i:736;s:53:"/usr/local/www/rock/forum/attachments/avatar_7064.png";i:737;s:53:"/usr/local/www/rock/forum/attachments/avatar_7078.png";i:738;s:53:"/usr/local/www/rock/forum/attachments/avatar_7098.gif";i:739;s:53:"/usr/local/www/rock/forum/attachments/avatar_7101.gif";i:740;s:53:"/usr/local/www/rock/forum/attachments/avatar_7102.png";i:741;s:53:"/usr/local/www/rock/forum/attachments/avatar_7103.png";i:742;s:52:"/usr/local/www/rock/forum/attachments/avatar_711.png";i:743;s:53:"/usr/local/www/rock/forum/attachments/avatar_7115.png";i:744;s:53:"/usr/local/www/rock/forum/attachments/avatar_7126.png";i:745;s:53:"/usr/local/www/rock/forum/attachments/avatar_7131.gif";i:746;s:53:"/usr/local/www/rock/forum/attachments/avatar_7182.png";i:747;s:53:"/usr/local/www/rock/forum/attachments/avatar_7185.png";i:748;s:53:"/usr/local/www/rock/forum/attachments/avatar_7203.png";i:749;s:53:"/usr/local/www/rock/forum/attachments/avatar_7206.jpg";i:750;s:53:"/usr/local/www/rock/forum/attachments/avatar_7216.gif";i:751;s:53:"/usr/local/www/rock/forum/attachments/avatar_7235.png";i:752;s:53:"/usr/local/www/rock/forum/attachments/avatar_7238.jpg";i:753;s:53:"/usr/local/www/rock/forum/attachments/avatar_7254.gif";i:754;s:53:"/usr/local/www/rock/forum/attachments/avatar_7282.png";i:755;s:53:"/usr/local/www/rock/forum/attachments/avatar_7284.gif";i:756;s:53:"/usr/local/www/rock/forum/attachments/avatar_7294.png";i:757;s:53:"/usr/local/www/rock/forum/attachments/avatar_7311.png";i:758;s:53:"/usr/local/www/rock/forum/attachments/avatar_7329.jpg";i:759;s:53:"/usr/local/www/rock/forum/attachments/avatar_7340.png";i:760;s:53:"/usr/local/www/rock/forum/attachments/avatar_7350.jpg";i:761;s:53:"/usr/local/www/rock/forum/attachments/avatar_7354.png";i:762;s:53:"/usr/local/www/rock/forum/attachments/avatar_7363.png";i:763;s:53:"/usr/local/www/rock/forum/attachments/avatar_7364.jpg";i:764;s:53:"/usr/local/www/rock/forum/attachments/avatar_7369.png";i:765;s:53:"/usr/local/www/rock/forum/attachments/avatar_7370.gif";i:766;s:53:"/usr/local/www/rock/forum/attachments/avatar_7374.jpg";i:767;s:53:"/usr/local/www/rock/forum/attachments/avatar_7383.png";i:768;s:53:"/usr/local/www/rock/forum/attachments/avatar_7388.png";i:769;s:53:"/usr/local/www/rock/forum/attachments/avatar_7390.png";i:770;s:53:"/usr/local/www/rock/forum/attachments/avatar_7393.png";i:771;s:53:"/usr/local/www/rock/forum/attachments/avatar_7395.gif";i:772;s:53:"/usr/local/www/rock/forum/attachments/avatar_7411.gif";i:773;s:53:"/usr/local/www/rock/forum/attachments/avatar_7418.gif";i:774;s:53:"/usr/local/www/rock/forum/attachments/avatar_7421.png";i:775;s:53:"/usr/local/www/rock/forum/attachments/avatar_7429.png";i:776;s:53:"/usr/local/www/rock/forum/attachments/avatar_7436.jpg";i:777;s:53:"/usr/local/www/rock/forum/attachments/avatar_7448.png";i:778;s:53:"/usr/local/www/rock/forum/attachments/avatar_7453.png";i:779;s:53:"/usr/local/www/rock/forum/attachments/avatar_7483.jpg";i:780;s:53:"/usr/local/www/rock/forum/attachments/avatar_7484.png";i:781;s:53:"/usr/local/www/rock/forum/attachments/avatar_7489.png";i:782;s:53:"/usr/local/www/rock/forum/attachments/avatar_7491.png";i:783;s:53:"/usr/local/www/rock/forum/attachments/avatar_7494.png";i:784;s:53:"/usr/local/www/rock/forum/attachments/avatar_7501.jpg";i:785;s:53:"/usr/local/www/rock/forum/attachments/avatar_7504.gif";i:786;s:53:"/usr/local/www/rock/forum/attachments/avatar_7512.png";i:787;s:53:"/usr/local/www/rock/forum/attachments/avatar_7524.png";i:788;s:53:"/usr/local/www/rock/forum/attachments/avatar_7526.png";i:789;s:53:"/usr/local/www/rock/forum/attachments/avatar_7531.gif";i:790;s:53:"/usr/local/www/rock/forum/attachments/avatar_7535.png";i:791;s:53:"/usr/local/www/rock/forum/attachments/avatar_7536.jpg";i:792;s:53:"/usr/local/www/rock/forum/attachments/avatar_7539.gif";i:793;s:53:"/usr/local/www/rock/forum/attachments/avatar_7543.png";i:794;s:53:"/usr/local/www/rock/forum/attachments/avatar_7548.gif";i:795;s:53:"/usr/local/www/rock/forum/attachments/avatar_7560.png";i:796;s:53:"/usr/local/www/rock/forum/attachments/avatar_7562.png";i:797;s:53:"/usr/local/www/rock/forum/attachments/avatar_7569.jpg";i:798;s:53:"/usr/local/www/rock/forum/attachments/avatar_7574.png";i:799;s:53:"/usr/local/www/rock/forum/attachments/avatar_7586.png";i:800;s:53:"/usr/local/www/rock/forum/attachments/avatar_7589.gif";i:801;s:53:"/usr/local/www/rock/forum/attachments/avatar_7596.png";i:802;s:53:"/usr/local/www/rock/forum/attachments/avatar_7613.png";i:803;s:53:"/usr/local/www/rock/forum/attachments/avatar_7620.png";i:804;s:53:"/usr/local/www/rock/forum/attachments/avatar_7627.png";i:805;s:53:"/usr/local/www/rock/forum/attachments/avatar_7637.gif";i:806;s:53:"/usr/local/www/rock/forum/attachments/avatar_7652.gif";i:807;s:53:"/usr/local/www/rock/forum/attachments/avatar_7670.gif";i:808;s:53:"/usr/local/www/rock/forum/attachments/avatar_7676.png";i:809;s:53:"/usr/local/www/rock/forum/attachments/avatar_7693.jpg";i:810;s:53:"/usr/local/www/rock/forum/attachments/avatar_7694.gif";i:811;s:53:"/usr/local/www/rock/forum/attachments/avatar_7701.jpg";i:812;s:53:"/usr/local/www/rock/forum/attachments/avatar_7718.png";i:813;s:53:"/usr/local/www/rock/forum/attachments/avatar_7723.gif";i:814;s:53:"/usr/local/www/rock/forum/attachments/avatar_7728.png";i:815;s:53:"/usr/local/www/rock/forum/attachments/avatar_7729.jpg";i:816;s:53:"/usr/local/www/rock/forum/attachments/avatar_7730.gif";i:817;s:53:"/usr/local/www/rock/forum/attachments/avatar_7735.png";i:818;s:53:"/usr/local/www/rock/forum/attachments/avatar_7736.png";i:819;s:53:"/usr/local/www/rock/forum/attachments/avatar_7739.gif";i:820;s:53:"/usr/local/www/rock/forum/attachments/avatar_7746.gif";i:821;s:53:"/usr/local/www/rock/forum/attachments/avatar_7750.png";i:822;s:53:"/usr/local/www/rock/forum/attachments/avatar_7755.png";i:823;s:53:"/usr/local/www/rock/forum/attachments/avatar_7756.png";i:824;s:53:"/usr/local/www/rock/forum/attachments/avatar_7760.png";i:825;s:53:"/usr/local/www/rock/forum/attachments/avatar_7764.gif";i:826;s:53:"/usr/local/www/rock/forum/attachments/avatar_7769.gif";i:827;s:53:"/usr/local/www/rock/forum/attachments/avatar_7777.png";i:828;s:53:"/usr/local/www/rock/forum/attachments/avatar_7810.jpg";i:829;s:53:"/usr/local/www/rock/forum/attachments/avatar_7811.gif";i:830;s:53:"/usr/local/www/rock/forum/attachments/avatar_7817.png";i:831;s:53:"/usr/local/www/rock/forum/attachments/avatar_7821.gif";i:832;s:53:"/usr/local/www/rock/forum/attachments/avatar_7822.gif";i:833;s:53:"/usr/local/www/rock/forum/attachments/avatar_7823.jpg";i:834;s:53:"/usr/local/www/rock/forum/attachments/avatar_7827.png";i:835;s:53:"/usr/local/www/rock/forum/attachments/avatar_7832.jpg";i:836;s:53:"/usr/local/www/rock/forum/attachments/avatar_7837.png";i:837;s:53:"/usr/local/www/rock/forum/attachments/avatar_7857.gif";i:838;s:53:"/usr/local/www/rock/forum/attachments/avatar_7860.png";i:839;s:53:"/usr/local/www/rock/forum/attachments/avatar_7867.jpg";i:840;s:53:"/usr/local/www/rock/forum/attachments/avatar_7869.jpg";i:841;s:53:"/usr/local/www/rock/forum/attachments/avatar_7875.png";i:842;s:53:"/usr/local/www/rock/forum/attachments/avatar_7876.jpg";i:843;s:53:"/usr/local/www/rock/forum/attachments/avatar_7885.png";i:844;s:53:"/usr/local/www/rock/forum/attachments/avatar_7899.jpg";i:845;s:53:"/usr/local/www/rock/forum/attachments/avatar_7900.jpg";i:846;s:53:"/usr/local/www/rock/forum/attachments/avatar_7903.gif";i:847;s:53:"/usr/local/www/rock/forum/attachments/avatar_7915.gif";i:848;s:53:"/usr/local/www/rock/forum/attachments/avatar_7931.png";i:849;s:53:"/usr/local/www/rock/forum/attachments/avatar_7940.png";i:850;s:53:"/usr/local/www/rock/forum/attachments/avatar_7941.jpg";i:851;s:53:"/usr/local/www/rock/forum/attachments/avatar_7942.gif";i:852;s:53:"/usr/local/www/rock/forum/attachments/avatar_7946.png";i:853;s:53:"/usr/local/www/rock/forum/attachments/avatar_7947.png";i:854;s:53:"/usr/local/www/rock/forum/attachments/avatar_7954.png";i:855;s:53:"/usr/local/www/rock/forum/attachments/avatar_7969.jpg";i:856;s:53:"/usr/local/www/rock/forum/attachments/avatar_7970.jpg";i:857;s:53:"/usr/local/www/rock/forum/attachments/avatar_7971.gif";i:858;s:53:"/usr/local/www/rock/forum/attachments/avatar_7976.jpg";i:859;s:52:"/usr/local/www/rock/forum/attachments/avatar_798.jpg";i:860;s:53:"/usr/local/www/rock/forum/attachments/avatar_7980.png";i:861;s:53:"/usr/local/www/rock/forum/attachments/avatar_7984.png";i:862;s:53:"/usr/local/www/rock/forum/attachments/avatar_8003.jpg";i:863;s:53:"/usr/local/www/rock/forum/attachments/avatar_8004.jpg";i:864;s:53:"/usr/local/www/rock/forum/attachments/avatar_8007.png";i:865;s:53:"/usr/local/www/rock/forum/attachments/avatar_8014.gif";i:866;s:53:"/usr/local/www/rock/forum/attachments/avatar_8032.jpg";i:867;s:53:"/usr/local/www/rock/forum/attachments/avatar_8035.png";i:868;s:53:"/usr/local/www/rock/forum/attachments/avatar_8055.png";i:869;s:53:"/usr/local/www/rock/forum/attachments/avatar_8060.png";i:870;s:53:"/usr/local/www/rock/forum/attachments/avatar_8064.png";i:871;s:53:"/usr/local/www/rock/forum/attachments/avatar_8068.jpg";i:872;s:53:"/usr/local/www/rock/forum/attachments/avatar_8072.png";i:873;s:52:"/usr/local/www/rock/forum/attachments/avatar_808.png";i:874;s:53:"/usr/local/www/rock/forum/attachments/avatar_8082.jpg";i:875;s:53:"/usr/local/www/rock/forum/attachments/avatar_8083.png";i:876;s:53:"/usr/local/www/rock/forum/attachments/avatar_8085.png";i:877;s:53:"/usr/local/www/rock/forum/attachments/avatar_8102.gif";i:878;s:53:"/usr/local/www/rock/forum/attachments/avatar_8105.jpg";i:879;s:53:"/usr/local/www/rock/forum/attachments/avatar_8111.png";i:880;s:53:"/usr/local/www/rock/forum/attachments/avatar_8113.gif";i:881;s:53:"/usr/local/www/rock/forum/attachments/avatar_8128.gif";i:882;s:53:"/usr/local/www/rock/forum/attachments/avatar_8130.png";i:883;s:53:"/usr/local/www/rock/forum/attachments/avatar_8157.gif";i:884;s:53:"/usr/local/www/rock/forum/attachments/avatar_8167.png";i:885;s:53:"/usr/local/www/rock/forum/attachments/avatar_8170.png";i:886;s:53:"/usr/local/www/rock/forum/attachments/avatar_8173.png";i:887;s:53:"/usr/local/www/rock/forum/attachments/avatar_8178.jpg";i:888;s:53:"/usr/local/www/rock/forum/attachments/avatar_8186.png";i:889;s:53:"/usr/local/www/rock/forum/attachments/avatar_8189.gif";i:890;s:53:"/usr/local/www/rock/forum/attachments/avatar_8192.gif";i:891;s:53:"/usr/local/www/rock/forum/attachments/avatar_8198.png";i:892;s:53:"/usr/local/www/rock/forum/attachments/avatar_8205.png";i:893;s:53:"/usr/local/www/rock/forum/attachments/avatar_8220.gif";i:894;s:53:"/usr/local/www/rock/forum/attachments/avatar_8270.jpg";i:895;s:53:"/usr/local/www/rock/forum/attachments/avatar_8289.png";i:896;s:53:"/usr/local/www/rock/forum/attachments/avatar_8290.png";i:897;s:53:"/usr/local/www/rock/forum/attachments/avatar_8296.jpg";i:898;s:53:"/usr/local/www/rock/forum/attachments/avatar_8300.jpg";i:899;s:53:"/usr/local/www/rock/forum/attachments/avatar_8312.jpg";i:900;s:53:"/usr/local/www/rock/forum/attachments/avatar_8317.png";i:901;s:53:"/usr/local/www/rock/forum/attachments/avatar_8321.png";i:902;s:53:"/usr/local/www/rock/forum/attachments/avatar_8323.gif";i:903;s:53:"/usr/local/www/rock/forum/attachments/avatar_8326.gif";i:904;s:53:"/usr/local/www/rock/forum/attachments/avatar_8328.png";i:905;s:53:"/usr/local/www/rock/forum/attachments/avatar_8329.png";i:906;s:53:"/usr/local/www/rock/forum/attachments/avatar_8334.png";i:907;s:53:"/usr/local/www/rock/forum/attachments/avatar_8357.gif";i:908;s:53:"/usr/local/www/rock/forum/attachments/avatar_8359.png";i:909;s:53:"/usr/local/www/rock/forum/attachments/avatar_8360.png";i:910;s:53:"/usr/local/www/rock/forum/attachments/avatar_8366.png";i:911;s:53:"/usr/local/www/rock/forum/attachments/avatar_8370.png";i:912;s:53:"/usr/local/www/rock/forum/attachments/avatar_8390.png";i:913;s:53:"/usr/local/www/rock/forum/attachments/avatar_8399.png";i:914;s:53:"/usr/local/www/rock/forum/attachments/avatar_8419.png";i:915;s:53:"/usr/local/www/rock/forum/attachments/avatar_8423.png";i:916;s:53:"/usr/local/www/rock/forum/attachments/avatar_8430.jpg";i:917;s:53:"/usr/local/www/rock/forum/attachments/avatar_8439.png";i:918;s:53:"/usr/local/www/rock/forum/attachments/avatar_8446.png";i:919;s:53:"/usr/local/www/rock/forum/attachments/avatar_8458.jpg";i:920;s:53:"/usr/local/www/rock/forum/attachments/avatar_8508.png";i:921;s:53:"/usr/local/www/rock/forum/attachments/avatar_8518.png";i:922;s:53:"/usr/local/www/rock/forum/attachments/avatar_8519.png";i:923;s:53:"/usr/local/www/rock/forum/attachments/avatar_8520.png";i:924;s:53:"/usr/local/www/rock/forum/attachments/avatar_8524.png";i:925;s:53:"/usr/local/www/rock/forum/attachments/avatar_8525.png";i:926;s:53:"/usr/local/www/rock/forum/attachments/avatar_8542.png";i:927;s:53:"/usr/local/www/rock/forum/attachments/avatar_8543.jpg";i:928;s:53:"/usr/local/www/rock/forum/attachments/avatar_8544.png";i:929;s:53:"/usr/local/www/rock/forum/attachments/avatar_8549.png";i:930;s:52:"/usr/local/www/rock/forum/attachments/avatar_857.gif";i:931;s:52:"/usr/local/www/rock/forum/attachments/avatar_857.jpg";i:932;s:53:"/usr/local/www/rock/forum/attachments/avatar_8577.jpg";i:933;s:53:"/usr/local/www/rock/forum/attachments/avatar_8581.jpg";i:934;s:53:"/usr/local/www/rock/forum/attachments/avatar_8591.png";i:935;s:53:"/usr/local/www/rock/forum/attachments/avatar_8607.png";i:936;s:53:"/usr/local/www/rock/forum/attachments/avatar_8617.gif";i:937;s:53:"/usr/local/www/rock/forum/attachments/avatar_8622.png";i:938;s:53:"/usr/local/www/rock/forum/attachments/avatar_8637.png";i:939;s:53:"/usr/local/www/rock/forum/attachments/avatar_8649.jpg";i:940;s:53:"/usr/local/www/rock/forum/attachments/avatar_8650.jpg";i:941;s:53:"/usr/local/www/rock/forum/attachments/avatar_8671.png";i:942;s:53:"/usr/local/www/rock/forum/attachments/avatar_8690.png";i:943;s:53:"/usr/local/www/rock/forum/attachments/avatar_8697.png";i:944;s:53:"/usr/local/www/rock/forum/attachments/avatar_8699.png";i:945;s:53:"/usr/local/www/rock/forum/attachments/avatar_8702.gif";i:946;s:53:"/usr/local/www/rock/forum/attachments/avatar_8703.png";i:947;s:53:"/usr/local/www/rock/forum/attachments/avatar_8705.png";i:948;s:53:"/usr/local/www/rock/forum/attachments/avatar_8723.png";i:949;s:53:"/usr/local/www/rock/forum/attachments/avatar_8724.gif";i:950;s:53:"/usr/local/www/rock/forum/attachments/avatar_8733.png";i:951;s:53:"/usr/local/www/rock/forum/attachments/avatar_8769.png";i:952;s:53:"/usr/local/www/rock/forum/attachments/avatar_8796.jpg";i:953;s:53:"/usr/local/www/rock/forum/attachments/avatar_8798.png";i:954;s:53:"/usr/local/www/rock/forum/attachments/avatar_8802.png";i:955;s:53:"/usr/local/www/rock/forum/attachments/avatar_8807.png";i:956;s:53:"/usr/local/www/rock/forum/attachments/avatar_8812.jpg";i:957;s:53:"/usr/local/www/rock/forum/attachments/avatar_8813.png";i:958;s:53:"/usr/local/www/rock/forum/attachments/avatar_8814.gif";i:959;s:53:"/usr/local/www/rock/forum/attachments/avatar_8817.png";i:960;s:53:"/usr/local/www/rock/forum/attachments/avatar_8827.jpg";i:961;s:53:"/usr/local/www/rock/forum/attachments/avatar_8837.png";i:962;s:52:"/usr/local/www/rock/forum/attachments/avatar_884.png";i:963;s:53:"/usr/local/www/rock/forum/attachments/avatar_8847.png";i:964;s:53:"/usr/local/www/rock/forum/attachments/avatar_8850.png";i:965;s:53:"/usr/local/www/rock/forum/attachments/avatar_8863.gif";i:966;s:53:"/usr/local/www/rock/forum/attachments/avatar_8867.gif";i:967;s:53:"/usr/local/www/rock/forum/attachments/avatar_8871.png";i:968;s:53:"/usr/local/www/rock/forum/attachments/avatar_8888.png";i:969;s:53:"/usr/local/www/rock/forum/attachments/avatar_8900.png";i:970;s:53:"/usr/local/www/rock/forum/attachments/avatar_8901.png";i:971;s:53:"/usr/local/www/rock/forum/attachments/avatar_8916.png";i:972;s:53:"/usr/local/www/rock/forum/attachments/avatar_8926.gif";i:973;s:53:"/usr/local/www/rock/forum/attachments/avatar_8935.gif";i:974;s:53:"/usr/local/www/rock/forum/attachments/avatar_8940.jpg";i:975;s:53:"/usr/local/www/rock/forum/attachments/avatar_8948.jpg";i:976;s:53:"/usr/local/www/rock/forum/attachments/avatar_8960.png";i:977;s:53:"/usr/local/www/rock/forum/attachments/avatar_8969.png";i:978;s:53:"/usr/local/www/rock/forum/attachments/avatar_8970.gif";i:979;s:53:"/usr/local/www/rock/forum/attachments/avatar_8974.jpg";i:980;s:53:"/usr/local/www/rock/forum/attachments/avatar_8995.png";i:981;s:53:"/usr/local/www/rock/forum/attachments/avatar_9014.png";i:982;s:53:"/usr/local/www/rock/forum/attachments/avatar_9015.gif";i:983;s:53:"/usr/local/www/rock/forum/attachments/avatar_9016.png";i:984;s:53:"/usr/local/www/rock/forum/attachments/avatar_9017.png";i:985;s:53:"/usr/local/www/rock/forum/attachments/avatar_9027.png";i:986;s:53:"/usr/local/www/rock/forum/attachments/avatar_9031.jpg";i:987;s:53:"/usr/local/www/rock/forum/attachments/avatar_9040.png";i:988;s:53:"/usr/local/www/rock/forum/attachments/avatar_9042.png";i:989;s:53:"/usr/local/www/rock/forum/attachments/avatar_9044.png";i:990;s:53:"/usr/local/www/rock/forum/attachments/avatar_9048.gif";i:991;s:53:"/usr/local/www/rock/forum/attachments/avatar_9050.png";i:992;s:53:"/usr/local/www/rock/forum/attachments/avatar_9053.png";i:993;s:53:"/usr/local/www/rock/forum/attachments/avatar_9062.png";i:994;s:53:"/usr/local/www/rock/forum/attachments/avatar_9074.jpg";i:995;s:53:"/usr/local/www/rock/forum/attachments/avatar_9101.png";i:996;s:53:"/usr/local/www/rock/forum/attachments/avatar_9105.gif";i:997;s:53:"/usr/local/www/rock/forum/attachments/avatar_9106.png";i:998;s:53:"/usr/local/www/rock/forum/attachments/avatar_9122.png";i:999;s:53:"/usr/local/www/rock/forum/attachments/avatar_9132.png";i:1000;s:53:"/usr/local/www/rock/forum/attachments/avatar_9138.jpg";i:1001;s:53:"/usr/local/www/rock/forum/attachments/avatar_9145.png";i:1002;s:53:"/usr/local/www/rock/forum/attachments/avatar_9147.png";i:1003;s:53:"/usr/local/www/rock/forum/attachments/avatar_9149.png";i:1004;s:53:"/usr/local/www/rock/forum/attachments/avatar_9154.png";i:1005;s:53:"/usr/local/www/rock/forum/attachments/avatar_9155.png";i:1006;s:53:"/usr/local/www/rock/forum/attachments/avatar_9168.jpg";i:1007;s:53:"/usr/local/www/rock/forum/attachments/avatar_9175.jpg";i:1008;s:53:"/usr/local/www/rock/forum/attachments/avatar_9179.png";i:1009;s:53:"/usr/local/www/rock/forum/attachments/avatar_9187.jpg";i:1010;s:53:"/usr/local/www/rock/forum/attachments/avatar_9191.png";i:1011;s:53:"/usr/local/www/rock/forum/attachments/avatar_9217.png";i:1012;s:53:"/usr/local/www/rock/forum/attachments/avatar_9218.png";i:1013;s:53:"/usr/local/www/rock/forum/attachments/avatar_9221.png";i:1014;s:53:"/usr/local/www/rock/forum/attachments/avatar_9222.gif";i:1015;s:53:"/usr/local/www/rock/forum/attachments/avatar_9241.gif";i:1016;s:53:"/usr/local/www/rock/forum/attachments/avatar_9253.jpg";i:1017;s:53:"/usr/local/www/rock/forum/attachments/avatar_9262.png";i:1018;s:53:"/usr/local/www/rock/forum/attachments/avatar_9263.jpg";i:1019;s:53:"/usr/local/www/rock/forum/attachments/avatar_9264.jpg";i:1020;s:53:"/usr/local/www/rock/forum/attachments/avatar_9271.png";i:1021;s:53:"/usr/local/www/rock/forum/attachments/avatar_9286.png";i:1022;s:53:"/usr/local/www/rock/forum/attachments/avatar_9297.png";i:1023;s:53:"/usr/local/www/rock/forum/attachments/avatar_9301.png";i:1024;s:53:"/usr/local/www/rock/forum/attachments/avatar_9313.gif";i:1025;s:53:"/usr/local/www/rock/forum/attachments/avatar_9321.jpg";i:1026;s:53:"/usr/local/www/rock/forum/attachments/avatar_9327.jpg";i:1027;s:53:"/usr/local/www/rock/forum/attachments/avatar_9333.png";i:1028;s:53:"/usr/local/www/rock/forum/attachments/avatar_9336.gif";i:1029;s:53:"/usr/local/www/rock/forum/attachments/avatar_9355.png";i:1030;s:53:"/usr/local/www/rock/forum/attachments/avatar_9371.gif";i:1031;s:53:"/usr/local/www/rock/forum/attachments/avatar_9377.png";i:1032;s:53:"/usr/local/www/rock/forum/attachments/avatar_9398.png";i:1033;s:53:"/usr/local/www/rock/forum/attachments/avatar_9403.png";i:1034;s:53:"/usr/local/www/rock/forum/attachments/avatar_9405.png";i:1035;s:53:"/usr/local/www/rock/forum/attachments/avatar_9407.png";i:1036;s:52:"/usr/local/www/rock/forum/attachments/avatar_942.gif";i:1037;s:53:"/usr/local/www/rock/forum/attachments/avatar_9430.jpg";i:1038;s:53:"/usr/local/www/rock/forum/attachments/avatar_9440.jpg";i:1039;s:53:"/usr/local/www/rock/forum/attachments/avatar_9472.jpg";i:1040;s:53:"/usr/local/www/rock/forum/attachments/avatar_9481.png";i:1041;s:53:"/usr/local/www/rock/forum/attachments/avatar_9530.png";i:1042;s:53:"/usr/local/www/rock/forum/attachments/avatar_9532.png";i:1043;s:53:"/usr/local/www/rock/forum/attachments/avatar_9555.png";i:1044;s:53:"/usr/local/www/rock/forum/attachments/avatar_9559.gif";i:1045;s:53:"/usr/local/www/rock/forum/attachments/avatar_9560.png";i:1046;s:53:"/usr/local/www/rock/forum/attachments/avatar_9561.bmp";i:1047;s:53:"/usr/local/www/rock/forum/attachments/avatar_9566.jpg";i:1048;s:53:"/usr/local/www/rock/forum/attachments/avatar_9603.png";i:1049;s:53:"/usr/local/www/rock/forum/attachments/avatar_9610.png";i:1050;s:53:"/usr/local/www/rock/forum/attachments/avatar_9614.png";i:1051;s:53:"/usr/local/www/rock/forum/attachments/avatar_9624.jpg";i:1052;s:53:"/usr/local/www/rock/forum/attachments/avatar_9631.png";i:1053;s:53:"/usr/local/www/rock/forum/attachments/avatar_9639.gif";i:1054;s:53:"/usr/local/www/rock/forum/attachments/avatar_9658.png";i:1055;s:53:"/usr/local/www/rock/forum/attachments/avatar_9663.png";i:1056;s:53:"/usr/local/www/rock/forum/attachments/avatar_9687.gif";i:1057;s:53:"/usr/local/www/rock/forum/attachments/avatar_9692.gif";i:1058;s:53:"/usr/local/www/rock/forum/attachments/avatar_9693.png";i:1059;s:53:"/usr/local/www/rock/forum/attachments/avatar_9703.png";i:1060;s:53:"/usr/local/www/rock/forum/attachments/avatar_9706.png";i:1061;s:53:"/usr/local/www/rock/forum/attachments/avatar_9711.png";i:1062;s:53:"/usr/local/www/rock/forum/attachments/avatar_9716.png";i:1063;s:53:"/usr/local/www/rock/forum/attachments/avatar_9719.png";i:1064;s:53:"/usr/local/www/rock/forum/attachments/avatar_9720.jpg";i:1065;s:53:"/usr/local/www/rock/forum/attachments/avatar_9722.png";i:1066;s:52:"/usr/local/www/rock/forum/attachments/avatar_974.png";i:1067;s:53:"/usr/local/www/rock/forum/attachments/avatar_9750.jpg";i:1068;s:53:"/usr/local/www/rock/forum/attachments/avatar_9758.jpg";i:1069;s:53:"/usr/local/www/rock/forum/attachments/avatar_9772.png";i:1070;s:53:"/usr/local/www/rock/forum/attachments/avatar_9799.png";i:1071;s:53:"/usr/local/www/rock/forum/attachments/avatar_9846.gif";i:1072;s:53:"/usr/local/www/rock/forum/attachments/avatar_9871.png";i:1073;s:53:"/usr/local/www/rock/forum/attachments/avatar_9872.gif";i:1074;s:53:"/usr/local/www/rock/forum/attachments/avatar_9900.png";i:1075;s:53:"/usr/local/www/rock/forum/attachments/avatar_9906.png";i:1076;s:53:"/usr/local/www/rock/forum/attachments/avatar_9922.png";i:1077;s:53:"/usr/local/www/rock/forum/attachments/avatar_9923.jpg";i:1078;s:53:"/usr/local/www/rock/forum/attachments/avatar_9924.png";i:1079;s:53:"/usr/local/www/rock/forum/attachments/avatar_9926.png";i:1080;s:53:"/usr/local/www/rock/forum/attachments/avatar_9956.gif";i:1081;s:53:"/usr/local/www/rock/forum/attachments/avatar_9972.png";i:1082;s:53:"/usr/local/www/rock/forum/attachments/avatar_9980.png";i:1083;s:53:"/usr/local/www/rock/forum/attachments/avatar_9996.gif";i:1084;s:53:"/usr/local/www/rock/forum/attachments/avatar_9998.jpg";} \ No newline at end of file diff --git a/captcha/SFWill.ttf b/captcha/SFWill.ttf new file mode 100644 index 0000000..901fd34 Binary files /dev/null and b/captcha/SFWill.ttf differ diff --git a/captcha/arial-base.ttf b/captcha/arial-base.ttf new file mode 100644 index 0000000..76e55be Binary files /dev/null and b/captcha/arial-base.ttf differ diff --git a/captcha/captcha.php b/captcha/captcha.php new file mode 100644 index 0000000..c083c4f --- /dev/null +++ b/captcha/captcha.php @@ -0,0 +1,72 @@ + "C:/program files/apache group/apache2/htdocs/smf_captcha/captcha/temp/", + //'tempfolderURL' => "http://localhost/smf_captcha/captcha/temp/", + //'TTF_folder' => "C:/program files/apache group/apache2/htdocs/smf_captcha/captcha/", + + 'tempfolder' => "{$boarddir}/captcha/temp/", + 'tempfolderURL' => "{$boardurl}/captcha/temp/", + 'TTF_folder' => "{$boarddir}/captcha/", + + // mixed (array or string): basename(s) of TrueType-Fontfiles + //'TTF_RANGE' => array('COMIC.TTF','JACOBITE.TTF','LYDIAN.TTF','MREARL.TTF','RUBBERSTAMP.TTF','ZINJARON.TTF'), + 'TTF_RANGE' => array('arial-base.ttf', 'SFWill.ttf'), + + 'chars' => $modSettings['captchaChars'], // integer: number of chars to use for ID + 'minsize' => $modSettings['captchaMinSize'], // integer: minimal size of chars + 'maxsize' => $modSettings['captchaMaxSize'], // integer: maximal size of chars + 'maxrotation' => $modSettings['captchaMaxRotate'], // integer: define the maximal angle for char-rotation, good results are between 0 and 30 + + 'noise' => (isset($modSettings['captchaNoise']) ? TRUE : FALSE), // boolean: TRUE = noisy chars | FALSE = grid + 'websafecolors' => (isset($modSettings['captchaWebSafeColours']) ? TRUE : FALSE), // boolean + //'refreshlink' => FALSE, // boolean - not used in SMF CAPTCHA + 'lang' => 'en', // Only 'en' supported in SMF CAPTCHA + 'maxtry' => 3, // integer: [1-9] + + 'badguys_url' => $modSettings['captchaBadGuysURL'], // string: URL + 'secretstring' => 'The secret string for SMF CAPTCHAs (I changed it!)', + 'secretposition' => 21, // integer: [1-32] + + //'debug' => TRUE, + 'debug' => FALSE, + + + 'counter_filename' => '', // string: absolute filename for textfile which stores current counter-value. Needs read- & write-access! + 'prefix' => 'smf_captcha_', // string: prefix for the captcha-images, is needed to identify the files in shared tempfolders + 'collect_garbage_after' => 20, // integer: the garbage-collector run once after this number of script-calls + 'maxlifetime' => 60 // integer: only imagefiles which are older than this amount of seconds will be deleted + +); + +$context['captchaObj'] = new hn_captcha_X1($CAPTCHA_INIT); +if ($context['captchaObj']->garbage_collector_error) + die("An ERROR has occured with the CAPTCHA garbage collection!
    Please notify the webmaster.

    "); + +function show_captcha() { + global $context; + + return $context['captchaObj']->display_form(); +} +?> diff --git a/captcha/hn_captcha.class.php b/captcha/hn_captcha.class.php new file mode 100644 index 0000000..9fd6a57 --- /dev/null +++ b/captcha/hn_captcha.class.php @@ -0,0 +1,757 @@ +gd_version = $this->get_gd_version(); + if($this->gd_version == 0) die("There is no GD-Library-Support enabled. The Captcha-Class cannot be used!"); + if($this->debug) echo "\n
    -Captcha-Debug: The available GD-Library has major version ".$this->gd_version; + + + // Hackprevention + if( + (isset($_GET['maxtry']) || isset($_POST['maxtry']) || isset($_COOKIE['maxtry'])) + || + (isset($_GET['debug']) || isset($_POST['debug']) || isset($_COOKIE['debug'])) + || + (isset($_GET['captcharefresh']) || isset($_COOKIE['captcharefresh'])) + || + (isset($_POST['captcharefresh']) && isset($_POST['private_key'])) + ) + { + if($this->debug) echo "\n
    -Captcha-Debug: Buuh. You are a bad guy!"; + if(isset($this->badguys_url) && !headers_sent()) header('location: '.$this->badguys_url); + else die('Sorry.'); + } + + + // extracts config array + if(is_array($config)) + { + if($secure && strcmp('4.2.0', phpversion()) < 0) + { + if($this->debug) echo "\n
    -Captcha-Debug: Extracts Config-Array in secure-mode!"; + $valid = get_class_vars(get_class($this)); + foreach($config as $k=>$v) + { + if(array_key_exists($k,$valid)) $this->$k = $v; + } + } + else + { + if($this->debug) echo "\n
    -Captcha-Debug: Extracts Config-Array in unsecure-mode!"; + foreach($config as $k=>$v) $this->$k = $v; + } + } + + + // check vars for maxtry, secretposition and min-max-size + $this->maxtry = ($this->maxtry > 9 || $this->maxtry < 1) ? 3 : $this->maxtry; + $this->secretposition = ($this->secretposition > 32 || $this->secretposition < 1) ? $this->maxtry : $this->secretposition; + if($this->minsize > $this->maxsize) + { + $temp = $this->minsize; + $this->minsize = $this->maxsize; + $this->maxsize = $temp; + if($this->debug) echo "
    -Captcha-Debug: Arrghh! What do you think I mean with min and max? Switch minsize with maxsize."; + } + + + // check TrueTypeFonts + if(is_array($this->TTF_RANGE)) + { + if($this->debug) echo "\n
    -Captcha-Debug: Check given TrueType-Array! (".count($this->TTF_RANGE).")"; + $temp = array(); + foreach($this->TTF_RANGE as $k=>$v) + { + if(is_readable($this->TTF_folder.$v)) $temp[] = $v; + } + $this->TTF_RANGE = $temp; + if($this->debug) echo "\n
    -Captcha-Debug: Valid TrueType-files: (".count($this->TTF_RANGE).")"; + if(count($this->TTF_RANGE) < 1) die('No Truetypefont available for the CaptchaClass.'); + } + else + { + if($this->debug) echo "\n
    -Captcha-Debug: Check given TrueType-File! (".$this->TTF_RANGE.")"; + if(!is_readable($this->TTF_folder.$this->TTF_RANGE)) die('No Truetypefont available for the CaptchaClass.'); + } + + // select first TrueTypeFont + $this->change_TTF(); + if($this->debug) echo "\n
    -Captcha-Debug: Set current TrueType-File: (".$this->TTF_file.")"; + + + // get number of noise-chars for background if is enabled + $this->nb_noise = $this->noise ? ($this->chars * $this->noisefactor) : 0; + if($this->debug) echo "\n
    -Captcha-Debug: Set number of noise characters to: (".$this->nb_noise.")"; + + + // set dimension of image + $this->lx = ($this->chars + 1) * (int)(($this->maxsize + $this->minsize) / 1.5); + $this->ly = (int)(2.4 * $this->maxsize); + if($this->debug) echo "\n
    -Captcha-Debug: Set image dimension to: (".$this->lx." x ".$this->ly.")"; + + + // set all messages + // (if you add a new language, you also want to add a line to the function "notvalid_msg()" at the end of the class!) + $this->messages = array( + 'en'=>array( + 'msg1'=>'Введите '.$this->chars.' символов (цифры от 0 до 9 и буквы от A до F)', + 'msg2'=>'Oh no, I cannot read this. Please, generate a ', + 'buttontext'=>'submit', + 'refreshbuttontext'=>'new ID' + ) + ); + $this->msg1 = $this->messages[$this->lang]['msg1']; + $this->msg2 = $this->messages[$this->lang]['msg2']; + $this->buttontext = $this->messages[$this->lang]['buttontext']; + $this->refreshbuttontext = $this->messages[$this->lang]['refreshbuttontext']; + if($this->debug) echo "\n
    -Captcha-Debug: Set messages to language: (".$this->lang.")"; + + + // keep params from original GET-request + // (if you use POST or COOKIES, you have to implement it yourself, sorry.) + $this->QUERY_STRING = strlen(trim($_SERVER['QUERY_STRING'])) > 0 ? '?'.strip_tags($_SERVER['QUERY_STRING']) : ''; + $refresh = $_SERVER['PHP_SELF'].$this->QUERY_STRING; + if($this->debug) echo "\n
    -Captcha-Debug: Keep this params from original GET-request: (".$this->QUERY_STRING.")"; + + + // check Postvars + if(isset($_POST['public_key'])) $this->public_K = substr(strip_tags($_POST['public_key']),0,$this->chars); + if(isset($_POST['private_key'])) $this->private_K = substr(strip_tags($_POST['private_key']),0,$this->chars); + $this->current_try = isset($_POST['hncaptcha']) ? $this->get_try() : 0; + if(!isset($_POST['captcharefresh'])) $this->current_try++; + if($this->debug) echo "\n
    -Captcha-Debug: Check POST-vars, current try is: (".$this->current_try.")"; + + + // generate Keys + $this->key = md5($this->secretstring); + $this->public_key = substr(md5(uniqid(rand(),true)), 0, $this->chars); + if($this->debug) echo "\n
    -Captcha-Debug: Generate Keys, public key is: (".$this->public_key.")"; + + } + + + + //////////////////////////////// + // + // PUBLIC METHODS + // + + /** + * + * @shortdesc displays a complete form with captcha-picture + * @public + * @type void + * @return HTML-Output + * + **/ + //This function was edited quite a lot by Daniel15, to fit in with SMF. + function display_form() + { + $try = $this->get_try(FALSE); + if($this->debug) echo "\n
    -Captcha-Debug: Generate a string which contains current try: ($try)"; + //$s .= '
    '."\n"; + $s = ''."\n"; + //$s .= '

    '.$this->notvalid_msg().'

    '; + $s .= $this->display_captcha()."
    "; + $s .= $this->msg1."
    "; + $s .= ''; + + //$s .= ''."

    \n"; + //$s .= '
    '."\n"; + + if($this->debug) echo "\n
    -Captcha-Debug: Output Form with captcha-image.

    "; + return $s; + } + + + /** + * + * @shortdesc validates POST-vars and return result + * @public + * @type integer + * @return 0 = first call | 1 = valid submit | 2 = not valid | 3 = not valid and has reached maximum try's + * + **/ + function validate_submit() + { + if($this->check_captcha($this->public_K,$this->private_K)) + { + if($this->debug) echo "\n
    -Captcha-Debug: Validating submitted form returns: (1)"; + return 1; + } + else + { + if($this->current_try > $this->maxtry) + { + if($this->debug) echo "\n
    -Captcha-Debug: Validating submitted form returns: (3)"; + return 3; + } + elseif($this->current_try > 0) + { + if($this->debug) echo "\n
    -Captcha-Debug: Validating submitted form returns: (2)"; + return 2; + } + else + { + if($this->debug) echo "\n
    -Captcha-Debug: Validating submitted form returns: (0)"; + return 0; + } + } + } + + + + //////////////////////////////// + // + // PRIVATE METHODS + // + + /** @private **/ + function display_captcha($onlyTheImage=FALSE) + { + $this->make_captcha(); + $is = getimagesize($this->get_filename()); + if($onlyTheImage) return "\n".'This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)'."\n"; + else return $this->public_key_input()."\n".'This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)'."\n"; + } + + /** @private **/ + function public_key_input() + { + return ''; + } + + /** @private **/ + function make_captcha() + { + $private_key = $this->generate_private(); + if($this->debug) echo "\n
    -Captcha-Debug: Generate private key: ($private_key)"; + + // create Image and set the apropriate function depending on GD-Version & websafecolor-value + if($this->gd_version >= 2 && !$this->websafecolors) + { + $func1 = 'imagecreatetruecolor'; + $func2 = 'imagecolorallocate'; + } + else + { + $func1 = 'imageCreate'; + $func2 = 'imagecolorclosest'; + } + $image = $func1($this->lx,$this->ly); + if($this->debug) echo "\n
    -Captcha-Debug: Generate ImageStream with: ($func1())"; + if($this->debug) echo "\n
    -Captcha-Debug: For colordefinitions we use: ($func2())"; + + + // Set Backgroundcolor + $this->random_color(224, 255); + $back = @imagecolorallocate($image, $this->r, $this->g, $this->b); + @ImageFilledRectangle($image,0,0,$this->lx,$this->ly,$back); + if($this->debug) echo "\n
    -Captcha-Debug: We allocate one color for Background: (".$this->r."-".$this->g."-".$this->b.")"; + + // allocates the 216 websafe color palette to the image + if($this->gd_version < 2 || $this->websafecolors) $this->makeWebsafeColors($image); + + + // fill with noise or grid + if($this->nb_noise > 0) + { + // random characters in background with random position, angle, color + if($this->debug) echo "\n
    -Captcha-Debug: Fill background with noise: (".$this->nb_noise.")"; + for($i=0; $i < $this->nb_noise; $i++) + { + $size = rand((int)($this->minsize /2.3 ), (int)($this->maxsize / 1.7)); + $angle = rand(0, 360); + $x = rand(0, $this->lx); + $y = rand(0, (int)($this->ly - ($size / 5))); + $this->random_color(160, 224); + $color = $func2($image, $this->r, $this->g, $this->b); + $text = chr(rand(45,250)); + @ImageTTFText($image, $size, $angle, $x, $y, $color, $this->change_TTF(), $text); + } + } + else + { + // generate grid + if($this->debug) echo "\n
    -Captcha-Debug: Fill background with x-gridlines: (".(int)($this->lx / (int)($this->minsize / 1.5)).")"; + for($i=0; $i < $this->lx; $i += (int)($this->minsize / 1.5)) + { + $this->random_color(160, 224); + $color = $func2($image, $this->r, $this->g, $this->b); + @imageline($image, $i, 0, $i, $this->ly, $color); + } + if($this->debug) echo "\n
    -Captcha-Debug: Fill background with y-gridlines: (".(int)($this->ly / (int)(($this->minsize / 1.8))).")"; + for($i=0 ; $i < $this->ly; $i += (int)($this->minsize / 1.8)) + { + $this->random_color(160, 224); + $color = $func2($image, $this->r, $this->g, $this->b); + @imageline($image, 0, $i, $this->lx, $i, $color); + } + } + + // generate Text + if($this->debug) echo "\n
    -Captcha-Debug: Fill forground with chars and shadows: (".$this->chars.")"; + for($i=0, $x = intval(rand($this->minsize,$this->maxsize)); $i < $this->chars; $i++) + { + $text = strtoupper(substr($private_key, $i, 1)); + $angle = intval(rand(($this->maxrotation * -1), $this->maxrotation)); + $size = intval(rand($this->minsize, $this->maxsize)); + $y = intval(rand((int)($size * 1.5), (int)($this->ly - ($size / 7)))); + $this->random_color(0, 127); + $color = $func2($image, $this->r, $this->g, $this->b); + $this->random_color(0, 127); + $shadow = $func2($image, $this->r + 127, $this->g + 127, $this->b + 127); + @ImageTTFText($image, $size, $angle, $x + (int)($size / 15), $y, $shadow, $this->change_TTF(), $text); + @ImageTTFText($image, $size, $angle, $x, $y - (int)($size / 15), $color, $this->TTF_file, $text); + $x += (int)($size + ($this->minsize / 5)); + } + @ImageJPEG($image, $this->get_filename(), $this->jpegquality); + $res = file_exists($this->get_filename()); + if($this->debug) echo "\n
    -Captcha-Debug: Safe Image with quality [".$this->jpegquality."] as (".$this->get_filename().") returns: (".($res ? 'TRUE' : 'FALSE').")"; + @ImageDestroy($image); + if($this->debug) echo "\n
    -Captcha-Debug: Destroy Imagestream."; + if(!$res) die('Unable to safe captcha-image.'); + } + + /** @private **/ + function makeWebsafeColors(&$image) + { + //$a = array(); + for($r = 0; $r <= 255; $r += 51) + { + for($g = 0; $g <= 255; $g += 51) + { + for($b = 0; $b <= 255; $b += 51) + { + $color = imagecolorallocate($image, $r, $g, $b); + //$a[$color] = array('r'=>$r,'g'=>$g,'b'=>$b); + } + } + } + if($this->debug) echo "\n
    -Captcha-Debug: Allocate 216 websafe colors to image: (".imagecolorstotal($image).")"; + //return $a; + } + + /** @private **/ + function random_color($min,$max) + { + $this->r = intval(rand($min,$max)); + $this->g = intval(rand($min,$max)); + $this->b = intval(rand($min,$max)); + //echo " (".$this->r."-".$this->g."-".$this->b.") "; + } + + /** @private **/ + function change_TTF() + { + if(is_array($this->TTF_RANGE)) + { + $key = array_rand($this->TTF_RANGE); + $this->TTF_file = $this->TTF_folder.$this->TTF_RANGE[$key]; + } + else + { + $this->TTF_file = $this->TTF_folder.$this->TTF_RANGE; + } + return $this->TTF_file; + } + + /** @private **/ + function check_captcha($public,$private) + { + // when check, destroy picture on disk + if(file_exists($this->get_filename($public))) + { + $res = @unlink($this->get_filename($public)) ? 'TRUE' : 'FALSE'; + if($this->debug) echo "\n
    -Captcha-Debug: Delete image (".$this->get_filename($public).") returns: ($res)"; + } + $res = (strtolower($private)==strtolower($this->generate_private($public))) ? 'TRUE' : 'FALSE'; + if($this->debug) echo "\n
    -Captcha-Debug: Comparing public with private key returns: ($res)"; + return $res == 'TRUE' ? TRUE : FALSE; + } + + /** @private **/ + function get_filename($public="") + { + if($public=="") $public=$this->public_key; + return $this->tempfolder.$public.".jpg"; + } + + /** @private **/ + function get_filename_url($public="") + { + if($public=="") $public = $this->public_key; + //return str_replace($_SERVER['DOCUMENT_ROOT'],'',$this->tempfolder).$public.".jpg"; + return $this->tempfolderURL.$public; + } + + /** @private **/ + function get_try($in=TRUE) + { + $s = array(); + for($i = 1; $i <= $this->maxtry; $i++) $s[$i] = $i; + + if($in) + { + return (int)substr(strip_tags($_POST['hncaptcha']),($this->secretposition -1),1); + } + else + { + $a = ""; + $b = ""; + for($i = 1; $i < $this->secretposition; $i++) + { + $a .= $s[intval(rand(1,$this->maxtry))]; + } + for($i = 0; $i < (32 - $this->secretposition); $i++) + { + $b .= $s[intval(rand(1,$this->maxtry))]; + } + return $a.$this->current_try.$b; + } + } + + /** @private **/ + function get_gd_version() + { + static $gd_version_number = null; + if($gd_version_number === null) + { + ob_start(); + phpinfo(8); + $module_info = ob_get_contents(); + ob_end_clean(); + if(preg_match("/\bgd\s+version\b[^\d\n\r]+?([\d\.]+)/i", $module_info, $matches)) + { + $gd_version_number = $matches[1]; + } + else + { + $gd_version_number = 0; + } + } + return $gd_version_number; + } + + /** @private **/ + function generate_private($public="") + { + if($public=="") $public = $this->public_key; + $key = substr(md5($this->key.$public), 16 - $this->chars / 2, $this->chars); + return $key; + } + + /** + * + * @shortdesc returns a message if the form validation has failed + * @private + * @type string + * @return string message or blankline as placeholder + * + **/ + function notvalid_msg() + { + // blank line for all languages + if($this->current_try == 1) return ' 
     '; + + // invalid try's: en + if($this->lang == "en" && $this->current_try > 2 && $this->refreshlink) return 'No valid entry. Please try again:
    Tipp: If you cannot identify the chars, you can generate a new image!'; + if($this->lang == "en" && $this->current_try >= 2) return 'No valid entry. Please try again:
     '; + } + + +} // END CLASS hn_CAPTCHA + +?> diff --git a/captcha/hn_captcha.class.x1.php b/captcha/hn_captcha.class.x1.php new file mode 100644 index 0000000..b8463a8 --- /dev/null +++ b/captcha/hn_captcha.class.x1.php @@ -0,0 +1,308 @@ +garbage_collector_error to TRUE. + * You can check this in your scripts and if is TRUE, you might execute + * an email-notification or something else. + * + * + * @shortdesc Class that adds a garbage-collector to the class hn_captcha + * @public + * @author Horst Nogajski, (mail: horst@nogajski.de) + * @version 1.0 + * @date 2004-April-19 + * + **/ +class hn_captcha_X1 extends hn_captcha +{ + + //////////////////////////////// + // + // PUBLIC PARAMS + // + + /** + * @shortdesc You optionally can specify an absolute filename for the counter. If is not specified, the class use the tempfolder and the default_basename. + * @public + * @type string + * + **/ + var $counter_filename = ''; + + /** + * @shortdesc This is used as prefix for the picture filenames, so we can identify them also if we share the tempfolder with other programs. + * @public + * @type string + * + **/ + var $prefix = 'hn_captcha_'; + + /** + * @shortdesc The garbage-collector will started once when the class was called that number times. + * @public + * @type integer + * + **/ + var $collect_garbage_after = 100; + + /** + * @shortdesc Only trash files which are older than this number of seconds. + * @public + * @type integer + * + **/ + var $maxlifetime = 600; + + /** + * @shortdesc This becomes TRUE if the counter doesn't work or if trashfiles couldn't be deleted. + * @public + * @type boolean + * + **/ + var $garbage_collector_error = FALSE; + + + + //////////////////////////////// + // + // PRIVATE PARAMS + // + + /** @private **/ + var $counter_fn_default_basename = 'hn_captcha_counter.txt'; + + + + + //////////////////////////////// + // + // CONSTRUCTOR + // + + /** + * @shortdesc This calls the constructor of main-class for extracting the config array and generating all needed params. Additionally it control the garbage-collector. + * @public + * @type void + * @return nothing + * + **/ + function hn_captcha_X1($config,$secure=TRUE) + { + // Call Constructor of main-class + $this->hn_captcha($config,$secure); + + + // specify counter-filename + if($this->counter_filename == '') $this->counter_filename = $this->tempfolder.$this->counter_fn_default_basename; + if($this->debug) echo "\n
    -Captcha-Debug: The counterfilename is (".$this->counter_filename.")"; + + + // retrieve last counter-value + $test = $this->txt_counter($this->counter_filename); + + // set and retrieve current counter-value + $counter = $this->txt_counter($this->counter_filename,TRUE); + + + // check if counter works correct + if(($counter !== FALSE) && ($counter - $test == 1)) + { + // Counter works perfect, =:) + if($this->debug) echo "\n
    -Captcha-Debug: Current counter-value is ($counter). Garbage-collector should start at (".$this->collect_garbage_after.")"; + + // check if garbage-collector should run + if($counter >= $this->collect_garbage_after) + { + // Reset counter + if($this->debug) echo "\n
    -Captcha-Debug: Reset the counter-value. (0)"; + $this->txt_counter($this->counter_filename,TRUE,0); + + // start garbage-collector + $this->garbage_collector_error = $this->collect_garbage() ? FALSE : TRUE; + if($this->debug && $this->garbage_collector_error) echo "\n
    -Captcha-Debug: ERROR! SOME TRASHFILES COULD NOT BE DELETED! (Set the garbage_collector_error to TRUE)"; + } + + } + else + { + // Counter-ERROR! + if($this->debug) echo "\n
    -Captcha-Debug: ERROR! NO COUNTER-VALUE AVAILABLE! (Set the garbage_collector_error to TRUE)"; + $this->garbage_collector_error = TRUE; + } + } + + + //////////////////////////////// + // + // PRIVATE METHODS + // + + + /** + * @shortdesc Store/Retrieve a counter-value in/from a textfile. Optionally count it up or store a (as third param) specified value. + * @private + * @type integer + * @return counter-value + * + **/ + function txt_counter($filename,$add=FALSE,$fixvalue=FALSE) + { + if(is_file($filename) ? TRUE : touch($filename)) + { + if(is_readable($filename) && is_writable($filename)) + { + $fp = @fopen($filename, "r"); + if($fp) + { + $counter = (int)trim(fgets($fp)); + fclose($fp); + + if($add) + { + if($fixvalue !== FALSE) + { + $counter = (int)$fixvalue; + } + else + { + $counter++; + } + $fp = @fopen($filename, "w"); + if($fp) + { + fputs($fp,$counter); + fclose($fp); + return $counter; + } + else return FALSE; + } + else + { + return $counter; + } + } + else return FALSE; + } + else return FALSE; + } + else return FALSE; + } + + + /** + * @shortdesc Scanns the tempfolder for jpeg-files with nameprefix used by the class and trash them if they are older than maxlifetime. + * @private + * + **/ + function collect_garbage() + { + $OK = FALSE; + $captchas = 0; + $trashed = 0; + if($handle = @opendir($this->tempfolder)) + { + $OK = TRUE; + while(false !== ($file = readdir($handle))) + { + if(!is_file($this->tempfolder.$file)) continue; + // check for name-prefix, extension and filetime + if(substr($file,0,strlen($this->prefix)) == $this->prefix) + { + if(strrchr($file, ".") == ".jpg") + { + $captchas++; + if((time() - filemtime($this->tempfolder.$file)) >= $this->maxlifetime) + { + $trashed++; + $res = @unlink($this->tempfolder.$file); + if(!$res) $OK = FALSE; + } + } + } + } + closedir($handle); + } + if($this->debug) echo "\n
    -Captcha-Debug: There are ($captchas) captcha-images in tempfolder, where ($trashed) are seems to be lost."; + return $OK; + } + + + /** @private **/ + function get_filename($public="") + { + if($public=="") $public = $this->public_key; + return $this->tempfolder.$this->prefix.$public.".jpg"; + } + + + /** @private **/ + function get_filename_url($public="") + { + if($public=="") $public = $this->public_key; + //return str_replace($_SERVER['DOCUMENT_ROOT'],'',$this->tempfolder).$this->prefix.$public.".jpg"; + return $this->tempfolderURL.$this->prefix.$public.".jpg"; //Edited by Daniel15 + } + + +} // END CLASS hn_CAPTCHA_X1 + +?> \ No newline at end of file diff --git a/captcha/temp/hn_captcha_counter.txt b/captcha/temp/hn_captcha_counter.txt new file mode 100644 index 0000000..da2d398 --- /dev/null +++ b/captcha/temp/hn_captcha_counter.txt @@ -0,0 +1 @@ +14 \ No newline at end of file diff --git a/captcha/temp/smf_captcha_121ae.jpg b/captcha/temp/smf_captcha_121ae.jpg new file mode 100644 index 0000000..be20317 Binary files /dev/null and b/captcha/temp/smf_captcha_121ae.jpg differ diff --git a/captcha/temp/smf_captcha_3cdda.jpg b/captcha/temp/smf_captcha_3cdda.jpg new file mode 100644 index 0000000..4626c93 Binary files /dev/null and b/captcha/temp/smf_captcha_3cdda.jpg differ diff --git a/captcha/temp/smf_captcha_49462.jpg b/captcha/temp/smf_captcha_49462.jpg new file mode 100644 index 0000000..1a201df Binary files /dev/null and b/captcha/temp/smf_captcha_49462.jpg differ diff --git a/captcha/temp/smf_captcha_edf95.jpg b/captcha/temp/smf_captcha_edf95.jpg new file mode 100644 index 0000000..d604874 Binary files /dev/null and b/captcha/temp/smf_captcha_edf95.jpg differ diff --git a/eacontrol.php b/eacontrol.php new file mode 100644 index 0000000..795dffe --- /dev/null +++ b/eacontrol.php @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + +
    ">Filename ">MTime ">Size ">Reloads ">Hits 
    KB ()
    + + + + + + + + + + + + + + + + +
    NameCreatedSizettl
    KB
    + + + + + eAccelerator control panel + + + + + + + + + + +

    eAccelerator control panel

    + + +

    Information

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Caching enabled
    Optimizer enabled
    Memory usage% + (MB/ + MB)
    Free memoryMB
    Cached scripts
    Removed scripts
    Cached keys
    + + + +

    Actions

    +
    + + + + + + + + + + + + + + + + + + + + + +
    Caching
    Optimizer
    Clear cache
    Clean cache
    Purge cache
    +
    + + +

    Cached scripts

    + + +

    Removed scripts

    + + +Cached keys"; + create_key_table(eaccelerator_list_keys()); +} +?> + + +

    + + +
    + eA logo + Created by the eAccelerator team, http://eaccelerator.net

    + eAccelerator [shm: sem:]
    + PHP [ZE ]
    + Using on
    +
    + + + + + diff --git a/es_ver.htm b/es_ver.htm new file mode 100644 index 0000000..99f36f8 --- /dev/null +++ b/es_ver.htm @@ -0,0 +1,3 @@ + +DOMAIN VERIFICATION PAGE + diff --git a/get_avatars.php b/get_avatars.php new file mode 100644 index 0000000..6981f02 --- /dev/null +++ b/get_avatars.php @@ -0,0 +1,3 @@ + array('Source-File.php', 'FunctionToCall'), + + Then, you can access the FunctionToCall() function from Source-File.php + with the URL index.php?action=action-in-url. Relatively simple, no? +*/ +header("Preved: Krosavcheg!"); +$forum_version = 'SMF 1.0.8'; + +// Get everything started up... +define('SMF', 1); +@set_magic_quotes_runtime(0); +error_reporting(E_ALL); +$time_start = microtime(); + +// Load the settings... +require_once(dirname(__FILE__) . '/Settings.php'); + +// Just in case something happens to Settings.php, let's try to at least load an error screen. +if (!isset($sourcedir)) + $sourcedir = dirname(__FILE__) . '/Sources'; + +// And important includes. +require_once($sourcedir . '/QueryString.php'); +require_once($sourcedir . '/Subs.php'); +require_once($sourcedir . '/Errors.php'); +require_once($sourcedir . '/Load.php'); +require_once($sourcedir . '/Security.php'); + +// If $maintenance is set specifically to 2, then we're upgrading or something. +if ($maintenance == 2) + db_fatal_error(); + +// Connect to the MySQL database. +if (empty($db_persist)) + $db_connection = @mysql_connect($db_server, $db_user, $db_passwd); +else + $db_connection = @mysql_pconnect($db_server, $db_user, $db_passwd); + +// Show an error if the connection couldn't be made. +if (!$db_connection || !@mysql_select_db($db_name, $db_connection)) + db_fatal_error(); + +// +mysql_query("SET NAMES 'utf8'"); +setlocale(LC_ALL,"ru_RU.UTF-8"); +mb_internal_encoding("UTF-8"); +mb_regex_encoding("UTF-8"); + +// Load the settings from the settings table, and perform operations like optimizing. +reloadSettings(); +// Clean the request variables, add slashes, etc. +cleanRequest(); +$context = array(); + +// Determine if this is should be using WAP, WAP2, or imode. +define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode'])); + +// Some settings and headers are different for wireless protocols. +if (WIRELESS) +{ + define('WIRELESS_PROTOCOL', isset($_REQUEST['wap']) ? 'wap' : (isset($_REQUEST['wap2']) ? 'wap2' : (isset($_REQUEST['imode']) ? 'imode' : ''))); + + // Some cellphones can't handle output compression... + $modSettings['enableCompressedOutput'] = '0'; + $modSettings['defaultMaxMessages'] = 5; + $modSettings['defaultMaxTopics'] = 9; + + // Wireless protocol header. + if (WIRELESS_PROTOCOL == 'wap') + header('Content-Type: text/vnd.wap.wml'); +} + +// Check if compressed output is enabled, supported, and not already being done. +if (!empty($modSettings['enableCompressedOutput']) && !headers_sent() && ob_get_length() == 0) +{ + // If zlib is being used, turn off output compression. + if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler') + $modSettings['enableCompressedOutput'] = '0'; + else + ob_start('ob_gzhandler'); +} +// This makes it so headers can be sent! +if (empty($modSettings['enableCompressedOutput'])) + ob_start(); + +// Register an error handler. +set_error_handler('error_handler'); + +// Start the session. (assuming it hasn't already been.) +loadSession(); + +// There's a strange bug in PHP 4.1.2 which makes $_SESSION not work unless you do this... +if (@version_compare(PHP_VERSION, '4.2.0') == -1) + $HTTP_SESSION_VARS['php_412_bugfix'] = true; + +// What function shall we execute? (done like this for memory's sake.) +call_user_func(smf_main()); + +// Call obExit specially; we're coming from the main area ;). +obExit(null, null, true); + +// The main controlling function. +function smf_main() +{ + global $modSettings, $settings, $user_info, $board, $topic, $maintenance, $sourcedir; + + // Load the user's cookie (or set as guest) and load their settings. + loadUserSettings(); + + // Load the current board's information. + loadBoard(); + + // Load the current theme. (note that ?theme=1 will also work, may be used for guest theming.) + loadTheme(); + + // Check if the user should be disallowed access. + is_not_banned(); + + // Load the current user's permissions. + loadPermissions(); + + // Do some logging if this is not an attachment/avatar or the setting of an option. + if (empty($_REQUEST['action']) || !in_array($_REQUEST['action'], array('dlattach', 'jsoption'))) + { + // Log this user as online. + writeLog(); + // Check if time to run visual warning update + if ($modSettings['autoWarningTime'] < time()) + autoWarn(); + + // Track forum statistics and hits...? + if (!empty($modSettings['hitStats'])) + trackStats(array('hits' => '+')); + } + + // Is the forum in maintenance mode? (doesn't apply to administrators.) + if (!empty($maintenance) && !allowedTo('admin_forum')) + { + // You can only login.... otherwise, you're getting the "maintenance mode" display. + if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'login2') + { + require_once($sourcedir . '/LogInOut.php'); + return 'Login2'; + } + // Don't even try it, sonny. + else + { + require_once($sourcedir . '/Subs-Auth.php'); + return 'InMaintenance'; + } + } + // If guest access is off, a guest can only do one of the very few following actions. + elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', '.xml')))) + { + require_once($sourcedir . '/Subs-Auth.php'); + return 'KickGuest'; + } + elseif (empty($_REQUEST['action'])) + { + // Action and board are both empty... BoardIndex! + if (empty($board) && empty($topic)) + { + require_once($sourcedir . '/BoardIndex.php'); + return 'BoardIndex'; + } + // Topic is empty, and action is empty.... MessageIndex! + elseif (empty($topic)) + { + require_once($sourcedir . '/MessageIndex.php'); + return 'MessageIndex'; + } + // Board is not empty... topic is not empty... action is empty.. Display! + else + { + require_once($sourcedir . '/Subs-Post.php'); + require_once($sourcedir . '/Display.php'); + return 'Display'; + } + } + + // Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function). + $actionArray = array( + 'activate' => array('Register.php', 'Activate'), + 'admin' => array('Admin.php', 'Admin'), + 'announce' => array('Post.php', 'AnnounceTopic'), + 'ban' => array('ManageMembers.php', 'Ban'), + 'boardrecount' => array('Admin.php', 'AdminBoardRecount'), + 'calendar' => array('Calendar.php', 'CalendarMain'), + 'collapse' => array('Subs-Boards.php', 'CollapseCategory'), + 'comment' => array('ProfileComments.php', 'CommentsMain'), + 'comment' => array('ProfileComments.php', 'CommentsMain'), + 'deletemsg' => array('RemoveTopic.php', 'DeleteMessage'), + 'detailedversion' => array('Admin.php', 'VersionDetail'), + 'display' => array('Display.php', 'Display'), + 'dlattach' => array('Display.php', 'Download'), + 'dumpdb' => array('DumpDatabase.php', 'DumpDatabase2'), + 'editagreement' => array('Admin.php', 'EditAgreement'), + 'editnews' => array('Admin.php', 'EditNews'), + 'editpoll' => array('Poll.php', 'EditPoll'), + 'editpoll2' => array('Poll.php', 'EditPoll2'), + 'findmember' => array('Subs-Auth.php', 'JSMembers'), + 'help' => array('Help.php', 'ShowHelp'), + 'helpadmin' => array('Help.php', 'ShowAdminHelp'), + 'im' => array('InstantMessage.php', 'MessageMain'), + 'jsoption' => array('Themes.php', 'SetJavaScript'), + 'lock' => array('LockTopic.php', 'LockTopic'), + 'lockVoting' => array('Poll.php', 'LockVoting'), + 'login' => array('LogInOut.php', 'Login'), + 'login2' => array('LogInOut.php', 'Login2'), + 'logout' => array('LogInOut.php', 'Logout'), + 'mailing' => array('ManageMembers.php', 'MailingList'), + 'maintain' => array('Admin.php', 'Maintenance'), + 'manageattachments' => array('ManageAttachments.php', 'ManageAttachments'), + 'manageboards' => array('ManageBoards.php', 'ManageBoards'), + 'markasread' => array('Subs-Boards.php', 'MarkRead'), + 'membergroups' => array('ManageMembers.php', 'ModifyMembergroups'), + + 'googlemap' => array('GoogleMap.php', 'Map'), + 'mergetopics' => array('SplitTopics.php', 'MergeTopics'), + 'linktopics' => array('SplitTopics.php', 'LinkTopics'), + 'mlist' => array('Memberlist.php', 'Memberlist'), + 'modifycat' => array('ManageBoards.php', 'ModifyCat'), + 'modifykarma' => array('Karma.php', 'ModifyKarma'), + +'viewkarma' => array('Viewkarma.php', 'ViewKarma'), +'ownkarma' => array('Viewkarma.php', 'OwnKarma'), +'otherkarma' => array('Viewkarma.php', 'OtherKarma'), + 'modifyModSettings' => array('ModSettings.php', 'ModifyModSettings'), + 'modifyModSettings2' => array('ModSettings.php', 'ModifyModSettings2'), + 'modlog' => array('Modlog.php', 'ViewModlog'), + 'modlog2' => array('Modlog.php', 'ViewModlog2'), + 'modsettings' => array('Admin.php', 'ModifySettings'), + 'modsettings2' => array('Admin.php', 'ModifySettings2'), + 'movetopic' => array('MoveTopic.php', 'MoveTopic'), + 'movetopic2' => array('MoveTopic.php', 'MoveTopic2'), + 'notify' => array('Notify.php', 'Notify'), + 'notifyboard' => array('Notify.php', 'BoardNotify'), + 'optimizetables' => array('Admin.php', 'OptimizeTables'), + 'packageget' => array('PackageGet.php', 'PackageGet'), + 'packages' => array('Packages.php', 'Packages'), + 'permissions' => array('ManagePermissions.php', 'ModifyPermissions'), + 'pgadd' => array('PackageGet.php', 'PackageServerAdd'), + 'pgremove' => array('PackageGet.php', 'PackageServerRemove'), + 'pgbrowse' => array('PackageGet.php', 'PackageGBrowse'), + 'pgdownload' => array('PackageGet.php', 'PackageDownload'), + 'pgupload' => array('PackageGet.php', 'PackageUpload'), + 'pm' => array('InstantMessage.php', 'MessageMain'), + 'post' => array('Post.php', 'Post'), + 'post2' => array('Post.php', 'Post2'), + 'printpage' => array('Printpage.php', 'PrintTopic'), + 'profile' => array('Profile.php', 'ModifyProfile'), + 'profile2' => array('Profile.php', 'ModifyProfile2'), + 'qsearch' => array('Newsearch.php', 'QuickSearch'), + 'quotefast' => array('Post.php', 'QuoteFast'), + 'quickmod' => array('Subs-Boards.php', 'QuickModeration'), + 'quickmod2' => array('Subs-Boards.php', 'QuickModeration2'), + 'recent' => array('Recent.php', 'RecentPosts'), + 'regcenter' => array('Register.php', 'RegCenter'), + 'register' => array('Register.php', 'Register'), + 'register2' => array('Register.php', 'Register2'), + 'reminder' => array('Reminder.php', 'RemindMe'), + 'removetopic2' => array('RemoveTopic.php', 'RemoveTopic2'), + 'removeoldtopics2' => array('RemoveTopic.php', 'RemoveOldTopics2'), + 'removepoll' => array('Poll.php', 'RemovePoll'), + 'repairboards' => array('RepairBoards.php', 'RepairBoards'), + 'reporttm' => array('SendTopic.php', 'ReportToModerator'), + 'newsearch' => array('Newsearch.php', 'PlushSearch1'), + 'newsearch2' => array('Newsearch.php', 'PlushSearch2'), + 'search' => array('Search.php', 'PlushSearch1'), + 'search2' => array('Search.php', 'PlushSearch2'), + 'sendtopic' => array('SendTopic.php', 'SendTopic'), + 'setcensor' => array('Admin.php', 'SetCensor'), + 'setcensor2' => array('Admin.php', 'SetCensor2'), + 'setreserve' => array('ManageMembers.php', 'SetReserve'), + 'setreserve2' => array('ManageMembers.php', 'SetReserve2'), + 'smileys' => array('ManageSmileys.php', 'ManageSmileys'), + 'spellcheck' => array('Subs-Post.php', 'SpellCheck'), + 'splittopics' => array('SplitTopics.php', 'SplitTopics'), + 'stats' => array('Stats.php', 'DisplayStats'), + 'sticky' => array('LockTopic.php', 'Sticky'), + 'firststicky' => array('LockTopic.php', 'FirstSticky'), + 'theme' => array('Themes.php', 'ThemesMain'), + 'trackip' => array('ManageMembers.php', 'trackIP'), + 'about:mozilla' => array('Karma.php', 'BookOfUnknown'), + 'about:unknown' => array('Karma.php', 'BookOfUnknown'), + 'unread' => array('Recent.php', 'UnreadTopics'), + 'unreadreplies' => array('Recent.php', 'UnreadTopics'), + 'viewErrorLog' => array('Errors.php', 'ViewErrorLog'), + 'viewmembers' => array('ManageMembers.php', 'ViewMembers'), + 'viewprofile' => array('Profile.php', 'ModifyProfile'), + 'vote' => array('Poll.php', 'Vote'), + 'viewquery' => array('ViewQuery.php', 'ViewQuery'), + 'warnadd' => array('VisualWarning.php', 'AddWarning'), + 'warnadd2' => array('VisualWarning.php', 'AddWarning2'), + 'warnlist' => array('VisualWarning.php', 'ListWarnings'), + 'warnlist2' => array('VisualWarning.php', 'ListWarnings2'), + 'warnpmman' => array('VisualWarning.php', 'Manager'), + 'warnpmman2' => array('VisualWarning.php', 'Manager2'), + 'who' => array('Who.php', 'Who'), + '.kml' => array('GoogleMap.php', 'ShowKML'), + '.xml' => array('News.php', 'ShowXmlFeed'), + 'page' => array('Page.php', 'main'), + 'moresmilies' => array('MoreSmilies.php', 'main'), + ); + + // Get the function and file to include - if it's not there, do the board index. + if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']])) + { + // Catch the action with the theme? + if (!empty($settings['catch_action'])) + { + require_once($sourcedir . '/Themes.php'); + return 'WrapAction'; + } + + // Fall through to the board index then... + require_once($sourcedir . '/BoardIndex.php'); + return 'BoardIndex'; + } + + // Otherwise, it was set - so let's go to that action. + require_once($sourcedir . '/' . $actionArray[$_REQUEST['action']][0]); + return $actionArray[$_REQUEST['action']][1]; +} + +?> diff --git a/index.php~ b/index.php~ new file mode 100644 index 0000000..304d7c9 --- /dev/null +++ b/index.php~ @@ -0,0 +1,355 @@ + array('Source-File.php', 'FunctionToCall'), + + Then, you can access the FunctionToCall() function from Source-File.php + with the URL index.php?action=action-in-url. Relatively simple, no? +*/ +header("Preved: Krosavcheg!"); +$forum_version = 'SMF 1.0.8'; + +// Get everything started up... +define('SMF', 1); +@set_magic_quotes_runtime(0); +error_reporting(E_ALL); +$time_start = microtime(); + +// Load the settings... +require_once(dirname(__FILE__) . '/Settings.php'); + +// Just in case something happens to Settings.php, let's try to at least load an error screen. +if (!isset($sourcedir)) + $sourcedir = dirname(__FILE__) . '/Sources'; + +// And important includes. +require_once($sourcedir . '/QueryString.php'); +require_once($sourcedir . '/Subs.php'); +require_once($sourcedir . '/Errors.php'); +require_once($sourcedir . '/Load.php'); +require_once($sourcedir . '/Security.php'); + +// If $maintenance is set specifically to 2, then we're upgrading or something. +if ($maintenance == 2) + db_fatal_error(); + +// Connect to the MySQL database. +if (empty($db_persist)) + $db_connection = @mysql_connect($db_server, $db_user, $db_passwd); +else + $db_connection = @mysql_pconnect($db_server, $db_user, $db_passwd); + +// Show an error if the connection couldn't be made. +if (!$db_connection || !@mysql_select_db($db_name, $db_connection)) + db_fatal_error(); + +// +mysql_query("SET NAMES 'utf8'"); +setlocale(LC_ALL,"ru_RU.UTF-8"); +mb_internal_encoding("UTF-8"); +mb_regex_encoding("UTF-8"); + +// Load the settings from the settings table, and perform operations like optimizing. +reloadSettings(); +// Clean the request variables, add slashes, etc. +cleanRequest(); +$context = array(); + +// Determine if this is should be using WAP, WAP2, or imode. +define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode'])); + +// Some settings and headers are different for wireless protocols. +if (WIRELESS) +{ + define('WIRELESS_PROTOCOL', isset($_REQUEST['wap']) ? 'wap' : (isset($_REQUEST['wap2']) ? 'wap2' : (isset($_REQUEST['imode']) ? 'imode' : ''))); + + // Some cellphones can't handle output compression... + $modSettings['enableCompressedOutput'] = '0'; + $modSettings['defaultMaxMessages'] = 5; + $modSettings['defaultMaxTopics'] = 9; + + // Wireless protocol header. + if (WIRELESS_PROTOCOL == 'wap') + header('Content-Type: text/vnd.wap.wml'); +} + +// Check if compressed output is enabled, supported, and not already being done. +if (!empty($modSettings['enableCompressedOutput']) && !headers_sent() && ob_get_length() == 0) +{ + // If zlib is being used, turn off output compression. + if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler') + $modSettings['enableCompressedOutput'] = '0'; + else + ob_start('ob_gzhandler'); +} +// This makes it so headers can be sent! +if (empty($modSettings['enableCompressedOutput'])) + ob_start(); + +// Register an error handler. +set_error_handler('error_handler'); + +// Start the session. (assuming it hasn't already been.) +loadSession(); + +// There's a strange bug in PHP 4.1.2 which makes $_SESSION not work unless you do this... +if (@version_compare(PHP_VERSION, '4.2.0') == -1) + $HTTP_SESSION_VARS['php_412_bugfix'] = true; + +// What function shall we execute? (done like this for memory's sake.) +call_user_func(smf_main()); + +// Call obExit specially; we're coming from the main area ;). +obExit(null, null, true); + +// The main controlling function. +function smf_main() +{ + global $modSettings, $settings, $user_info, $board, $topic, $maintenance, $sourcedir; + + // Load the user's cookie (or set as guest) and load their settings. + loadUserSettings(); + + // Load the current board's information. + loadBoard(); + + // Load the current theme. (note that ?theme=1 will also work, may be used for guest theming.) + loadTheme(); + + // Check if the user should be disallowed access. + is_not_banned(); + + // Load the current user's permissions. + loadPermissions(); + + // Do some logging if this is not an attachment/avatar or the setting of an option. + if (empty($_REQUEST['action']) || !in_array($_REQUEST['action'], array('dlattach', 'jsoption'))) + { + // Log this user as online. + writeLog(); + // Check if time to run visual warning update + if ($modSettings['autoWarningTime'] < time()) + autoWarn(); + + // Track forum statistics and hits...? + if (!empty($modSettings['hitStats'])) + trackStats(array('hits' => '+')); + } + + // Is the forum in maintenance mode? (doesn't apply to administrators.) + if (!empty($maintenance) && !allowedTo('admin_forum')) + { + // You can only login.... otherwise, you're getting the "maintenance mode" display. + if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'login2') + { + require_once($sourcedir . '/LogInOut.php'); + return 'Login2'; + } + // Don't even try it, sonny. + else + { + require_once($sourcedir . '/Subs-Auth.php'); + return 'InMaintenance'; + } + } + // If guest access is off, a guest can only do one of the very few following actions. + elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', '.xml')))) + { + require_once($sourcedir . '/Subs-Auth.php'); + return 'KickGuest'; + } + elseif (empty($_REQUEST['action'])) + { + // Action and board are both empty... BoardIndex! + if (empty($board) && empty($topic)) + { + require_once($sourcedir . '/BoardIndex.php'); + return 'BoardIndex'; + } + // Topic is empty, and action is empty.... MessageIndex! + elseif (empty($topic)) + { + require_once($sourcedir . '/MessageIndex.php'); + return 'MessageIndex'; + } + // Board is not empty... topic is not empty... action is empty.. Display! + else + { + require_once($sourcedir . '/Subs-Post.php'); + require_once($sourcedir . '/Display.php'); + return 'Display'; + } + } + + // Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function). + $actionArray = array( + 'activate' => array('Register.php', 'Activate'), + 'admin' => array('Admin.php', 'Admin'), + 'announce' => array('Post.php', 'AnnounceTopic'), + 'ban' => array('ManageMembers.php', 'Ban'), + 'boardrecount' => array('Admin.php', 'AdminBoardRecount'), + 'calendar' => array('Calendar.php', 'CalendarMain'), + 'collapse' => array('Subs-Boards.php', 'CollapseCategory'), + 'comment' => array('ProfileComments.php', 'CommentsMain'), + 'comment' => array('ProfileComments.php', 'CommentsMain'), + 'comment' => array('ProfileComments.php', 'CommentsMain'), + 'deletemsg' => array('RemoveTopic.php', 'DeleteMessage'), + 'detailedversion' => array('Admin.php', 'VersionDetail'), + 'display' => array('Display.php', 'Display'), + 'dlattach' => array('Display.php', 'Download'), + 'dumpdb' => array('DumpDatabase.php', 'DumpDatabase2'), + 'editagreement' => array('Admin.php', 'EditAgreement'), + 'editnews' => array('Admin.php', 'EditNews'), + 'editpoll' => array('Poll.php', 'EditPoll'), + 'editpoll2' => array('Poll.php', 'EditPoll2'), + 'findmember' => array('Subs-Auth.php', 'JSMembers'), + 'help' => array('Help.php', 'ShowHelp'), + 'helpadmin' => array('Help.php', 'ShowAdminHelp'), + 'im' => array('InstantMessage.php', 'MessageMain'), + 'jsoption' => array('Themes.php', 'SetJavaScript'), + 'lock' => array('LockTopic.php', 'LockTopic'), + 'lockVoting' => array('Poll.php', 'LockVoting'), + 'login' => array('LogInOut.php', 'Login'), + 'login2' => array('LogInOut.php', 'Login2'), + 'logout' => array('LogInOut.php', 'Logout'), + 'mailing' => array('ManageMembers.php', 'MailingList'), + 'maintain' => array('Admin.php', 'Maintenance'), + 'manageattachments' => array('ManageAttachments.php', 'ManageAttachments'), + 'manageboards' => array('ManageBoards.php', 'ManageBoards'), + 'markasread' => array('Subs-Boards.php', 'MarkRead'), + 'membergroups' => array('ManageMembers.php', 'ModifyMembergroups'), + + 'googlemap' => array('GoogleMap.php', 'Map'), + 'mergetopics' => array('SplitTopics.php', 'MergeTopics'), + 'linktopics' => array('SplitTopics.php', 'LinkTopics'), + 'mlist' => array('Memberlist.php', 'Memberlist'), + 'modifycat' => array('ManageBoards.php', 'ModifyCat'), + 'modifykarma' => array('Karma.php', 'ModifyKarma'), + +'viewkarma' => array('Viewkarma.php', 'ViewKarma'), +'ownkarma' => array('Viewkarma.php', 'OwnKarma'), +'otherkarma' => array('Viewkarma.php', 'OtherKarma'), + 'modifyModSettings' => array('ModSettings.php', 'ModifyModSettings'), + 'modifyModSettings2' => array('ModSettings.php', 'ModifyModSettings2'), + 'modlog' => array('Modlog.php', 'ViewModlog'), + 'modlog2' => array('Modlog.php', 'ViewModlog2'), + 'modsettings' => array('Admin.php', 'ModifySettings'), + 'modsettings2' => array('Admin.php', 'ModifySettings2'), + 'movetopic' => array('MoveTopic.php', 'MoveTopic'), + 'movetopic2' => array('MoveTopic.php', 'MoveTopic2'), + 'notify' => array('Notify.php', 'Notify'), + 'notifyboard' => array('Notify.php', 'BoardNotify'), + 'optimizetables' => array('Admin.php', 'OptimizeTables'), + 'packageget' => array('PackageGet.php', 'PackageGet'), + 'packages' => array('Packages.php', 'Packages'), + 'permissions' => array('ManagePermissions.php', 'ModifyPermissions'), + 'pgadd' => array('PackageGet.php', 'PackageServerAdd'), + 'pgremove' => array('PackageGet.php', 'PackageServerRemove'), + 'pgbrowse' => array('PackageGet.php', 'PackageGBrowse'), + 'pgdownload' => array('PackageGet.php', 'PackageDownload'), + 'pgupload' => array('PackageGet.php', 'PackageUpload'), + 'pm' => array('InstantMessage.php', 'MessageMain'), + 'post' => array('Post.php', 'Post'), + 'post2' => array('Post.php', 'Post2'), + 'printpage' => array('Printpage.php', 'PrintTopic'), + 'profile' => array('Profile.php', 'ModifyProfile'), + 'profile2' => array('Profile.php', 'ModifyProfile2'), + 'qsearch' => array('Newsearch.php', 'QuickSearch'), + 'quotefast' => array('Post.php', 'QuoteFast'), + 'quickmod' => array('Subs-Boards.php', 'QuickModeration'), + 'quickmod2' => array('Subs-Boards.php', 'QuickModeration2'), + 'recent' => array('Recent.php', 'RecentPosts'), + 'regcenter' => array('Register.php', 'RegCenter'), + 'register' => array('Register.php', 'Register'), + 'register2' => array('Register.php', 'Register2'), + 'reminder' => array('Reminder.php', 'RemindMe'), + 'removetopic2' => array('RemoveTopic.php', 'RemoveTopic2'), + 'removeoldtopics2' => array('RemoveTopic.php', 'RemoveOldTopics2'), + 'removepoll' => array('Poll.php', 'RemovePoll'), + 'repairboards' => array('RepairBoards.php', 'RepairBoards'), + 'reporttm' => array('SendTopic.php', 'ReportToModerator'), + 'newsearch' => array('Newsearch.php', 'PlushSearch1'), + 'newsearch2' => array('Newsearch.php', 'PlushSearch2'), + 'search' => array('Search.php', 'PlushSearch1'), + 'search2' => array('Search.php', 'PlushSearch2'), + 'sendtopic' => array('SendTopic.php', 'SendTopic'), + 'setcensor' => array('Admin.php', 'SetCensor'), + 'setcensor2' => array('Admin.php', 'SetCensor2'), + 'setreserve' => array('ManageMembers.php', 'SetReserve'), + 'setreserve2' => array('ManageMembers.php', 'SetReserve2'), + 'smileys' => array('ManageSmileys.php', 'ManageSmileys'), + 'spellcheck' => array('Subs-Post.php', 'SpellCheck'), + 'splittopics' => array('SplitTopics.php', 'SplitTopics'), + 'stats' => array('Stats.php', 'DisplayStats'), + 'sticky' => array('LockTopic.php', 'Sticky'), + 'firststicky' => array('LockTopic.php', 'FirstSticky'), + 'theme' => array('Themes.php', 'ThemesMain'), + 'trackip' => array('ManageMembers.php', 'trackIP'), + 'about:mozilla' => array('Karma.php', 'BookOfUnknown'), + 'about:unknown' => array('Karma.php', 'BookOfUnknown'), + 'unread' => array('Recent.php', 'UnreadTopics'), + 'unreadreplies' => array('Recent.php', 'UnreadTopics'), + 'viewErrorLog' => array('Errors.php', 'ViewErrorLog'), + 'viewmembers' => array('ManageMembers.php', 'ViewMembers'), + 'viewprofile' => array('Profile.php', 'ModifyProfile'), + 'vote' => array('Poll.php', 'Vote'), + 'viewquery' => array('ViewQuery.php', 'ViewQuery'), + 'warnadd' => array('VisualWarning.php', 'AddWarning'), + 'warnadd2' => array('VisualWarning.php', 'AddWarning2'), + 'warnlist' => array('VisualWarning.php', 'ListWarnings'), + 'warnlist2' => array('VisualWarning.php', 'ListWarnings2'), + 'warnpmman' => array('VisualWarning.php', 'Manager'), + 'warnpmman2' => array('VisualWarning.php', 'Manager2'), + 'who' => array('Who.php', 'Who'), + '.kml' => array('GoogleMap.php', 'ShowKML'), + '.xml' => array('News.php', 'ShowXmlFeed'), + 'page' => array('Page.php', 'main'), + 'moresmilies' => array('MoreSmilies.php', 'main'), + ); + + // Get the function and file to include - if it's not there, do the board index. + if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']])) + { + // Catch the action with the theme? + if (!empty($settings['catch_action'])) + { + require_once($sourcedir . '/Themes.php'); + return 'WrapAction'; + } + + // Fall through to the board index then... + require_once($sourcedir . '/BoardIndex.php'); + return 'BoardIndex'; + } + + // Otherwise, it was set - so let's go to that action. + require_once($sourcedir . '/' . $actionArray[$_REQUEST['action']][0]); + return $actionArray[$_REQUEST['action']][1]; +} + +?> diff --git a/jquery.js b/jquery.js new file mode 100644 index 0000000..0c7294c --- /dev/null +++ b/jquery.js @@ -0,0 +1,152 @@ +/*! + * jQuery JavaScript Library v1.4.1 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Jan 25 19:43:33 2010 -0500 + */ +(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f, +a.currentTarget);m=0;for(s=i.length;m)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent, +va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]], +[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a, +this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this, +a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice}; +c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
    a";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support= +{leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null}; +b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="";a=r.createDocumentFragment();a.appendChild(d.firstChild); +c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props= +{"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true, +{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this, +a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d); +return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]|| +a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m= +c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| +{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); +f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText= +""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j= +function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a, +d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+ +s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a, +"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d, +b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b, +d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), +fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| +d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b= +0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true}; +c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b= +a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!== +"form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this, +"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"|| +d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a= +a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this, +f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, +b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g|| +typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u= +l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&& +y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&& +"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true); +return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"=== +g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2=== +0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return hk[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k= +0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="? +k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g}; +try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id"); +return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href", +2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="

    ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="
    ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length=== +0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[], +l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var i=d;i0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e +-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(), +a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")}, +nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e): +e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!== +b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/"},F={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "], +col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
    ","
    "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)}, +wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length? +d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, +false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&& +!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/~i', '', $text); + $text = preg_replace('~]*[^/]?' . '>.*?~i', '', $text); + $text = preg_replace('~\\<\\!--.*?-->~i', '', $text); + $text = preg_replace('~\\<\\!\\[CDATA\\[.*?\\]\\]\\>~i', '', $text); + + // Do the smileys ultra first! + preg_match_all('~]*?id="*smiley_\d+_([^<>]+?)[\s"/>]\s*[^<>]*?/*>(?:\s)?~i', $text, $matches); + if (!empty($matches[0])) + { + // Easy if it's not custom. + if (empty($modSettings['smiley_enable'])) + { + $smileysfrom = array('>:D', ':D', '::)', '>:(', ':)', ';)', ';D', ':(', ':o', '8)', ':P', '???', ':-[', ':-X', ':-*', ':\'(', ':-\\', '^-^', 'O0', 'C:-)', '0:)'); + $smileysto = array('evil.gif', 'cheesy.gif', 'rolleyes.gif', 'angry.gif', 'smiley.gif', 'wink.gif', 'grin.gif', 'sad.gif', 'shocked.gif', 'cool.gif', 'tongue.gif', 'huh.gif', 'embarrassed.gif', 'lipsrsealed.gif', 'kiss.gif', 'cry.gif', 'undecided.gif', 'azn.gif', 'afro.gif', 'police.gif', 'angel.gif'); + + foreach ($matches[1] as $k => $file) + { + $found = array_search($file, $smileysto); + // Note the weirdness here is to stop double spaces between smileys. + if ($found) + $matches[1][$k] = '-[]-smf_smily_start#|#' . htmlspecialchars($smileysfrom[$found]) . '-[]-smf_smily_end#|#'; + else + $matches[1][$k] = ''; + } + } + else + { + // Load all the smileys. + $names = array(); + foreach ($matches[1] as $file) + $names[] = $file; + $names = array_unique($names); + + if (!empty($names)) + { + $request = $mobdb->query(' + SELECT code, filename + FROM {db_prefix}smileys + WHERE filename IN ({array_string:smiley_filenames})', + array( + 'smiley_filenames' => $names, + ) + ); + $mappings = array(); + while ($row = $mobdb->fetch_assoc()) + $mappings[$row['filename']] = htmlspecialchars($row['code']); + $mobdb->free_result(); + + foreach ($matches[1] as $k => $file) + if (isset($mappings[$file])) + $matches[1][$k] = '-[]-smf_smily_start#|#' . $mappings[$file] . '-[]-smf_smily_end#|#'; + } + } + + // Replace the tags! + $text = str_replace($matches[0], $matches[1], $text); + + // Now sort out spaces + $text = str_replace(array('-[]-smf_smily_end#|#-[]-smf_smily_start#|#', '-[]-smf_smily_end#|#', '-[]-smf_smily_start#|#'), ' ', $text); + } + + // Only try to buy more time if the client didn't quit. + if (connection_aborted() && $context['server']['is_apache']) + @apache_reset_timeout(); + + $parts = preg_split('~(<[A-Za-z]+\s*[^<>]*?style="?[^<>"]+"?[^<>]*?(?:/?)>|)~', $text, -1, PREG_SPLIT_DELIM_CAPTURE); + $replacement = ''; + $stack = array(); + + foreach ($parts as $part) + { + if (preg_match('~(<([A-Za-z]+)\s*[^<>]*?)style="?([^<>"]+)"?([^<>]*?(/?)>)~', $part, $matches) === 1) + { + // If it's being closed instantly, we can't deal with it...yet. + if ($matches[5] === '/') + continue; + else + { + // Get an array of styles that apply to this element. (The strtr is there to combat HTML generated by Word.) + $styles = explode(';', strtr($matches[3], array('"' => ''))); + $curElement = $matches[2]; + $precedingStyle = $matches[1]; + $afterStyle = $matches[4]; + $curCloseTags = ''; + $extra_attr = ''; + + foreach ($styles as $type_value_pair) + { + // Remove spaces and convert uppercase letters. + $clean_type_value_pair = strtolower(strtr(trim($type_value_pair), '=', ':')); + + // Something like 'font-weight: bold' is expected here. + if (strpos($clean_type_value_pair, ':') === false) + continue; + + // Capture the elements of a single style item (e.g. 'font-weight' and 'bold'). + list ($style_type, $style_value) = explode(':', $type_value_pair); + + $style_value = trim($style_value); + + switch (trim($style_type)) + { + case 'font-weight': + if ($style_value === 'bold') + { + $curCloseTags .= '[/b]'; + $replacement .= '[b]'; + } + break; + + case 'text-decoration': + if ($style_value == 'underline') + { + $curCloseTags .= '[/u]'; + $replacement .= '[u]'; + } + elseif ($style_value == 'line-through') + { + $curCloseTags .= '[/s]'; + $replacement .= '[s]'; + } + break; + + case 'text-align': + if ($style_value == 'left') + { + $curCloseTags .= '[/left]'; + $replacement .= '[left]'; + } + elseif ($style_value == 'center') + { + $curCloseTags .= '[/center]'; + $replacement .= '[center]'; + } + elseif ($style_value == 'right') + { + $curCloseTags .= '[/right]'; + $replacement .= '[right]'; + } + break; + + case 'font-style': + if ($style_value == 'italic') + { + $curCloseTags .= '[/i]'; + $replacement .= '[i]'; + } + break; + + case 'color': + $curCloseTags .= '[/color]'; + $replacement .= '[color=' . $style_value . ']'; + break; + + case 'font-size': + // Sometimes people put decimals where decimals should not be. + if (preg_match('~(\d)+\.\d+(p[xt])~i', $style_value, $matches) === 1) + $style_value = $matches[1] . $matches[2]; + + $curCloseTags .= '[/size]'; + $replacement .= '[size=' . $style_value . ']'; + break; + + case 'font-family': + // Only get the first freaking font if there's a list! + if (strpos($style_value, ',') !== false) + $style_value = substr($style_value, 0, strpos($style_value, ',')); + + $curCloseTags .= '[/font]'; + $replacement .= '[font=' . strtr($style_value, array("'" => '')) . ']'; + break; + + // This is a hack for images with dimensions embedded. + case 'width': + case 'height': + if (preg_match('~[1-9]\d*~i', $style_value, $dimension) === 1) + $extra_attr .= ' ' . $style_type . '="' . $dimension[0] . '"'; + break; + + case 'list-style-type': + if (preg_match('~none|disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman|lower-alpha|upper-alpha|lower-greek|lower-latin|upper-latin|hebrew|armenian|georgian|cjk-ideographic|hiragana|katakana|hiragana-iroha|katakana-iroha~i', $style_value, $listType) === 1) + $extra_attr .= ' listtype="' . $listType[0] . '"'; + break; + } + } + + // If there's something that still needs closing, push it to the stack. + if (!empty($curCloseTags)) + array_push($stack, array( + 'element' => strtolower($curElement), + 'closeTags' => $curCloseTags + ) + ); + elseif (!empty($extra_attr)) + $replacement .= $precedingStyle . $extra_attr . $afterStyle; + } + } + + elseif (preg_match('~~', $part, $matches) === 1) + { + // Is this the element that we've been waiting for to be closed? + if (!empty($stack) && strtolower($matches[1]) === $stack[count($stack) - 1]['element']) + { + $byebyeTag = array_pop($stack); + $replacement .= $byebyeTag['closeTags']; + } + + // Must've been something else. + else + $replacement .= $part; + } + // In all other cases, just add the part to the replacement. + else + $replacement .= $part; + } + + // Now put back the replacement in the text. + $text = $replacement; + + // We are not finished yet, request more time. + if (connection_aborted() && $context['server']['is_apache']) + @apache_reset_timeout(); + + // Let's pull out any legacy alignments. + while (preg_match('~<([A-Za-z]+)\s+[^<>]*?(align="*(left|center|right)"*)[^<>]*?(/?)>~i', $text, $matches) === 1) + { + // Find the position in the text of this tag over again. + $start_pos = strpos($text, $matches[0]); + if ($start_pos === false) + break; + + // End tag? + if ($matches[4] != '/' && strpos($text, '', $start_pos) !== false) + { + $end_length = strlen(''); + $end_pos = strpos($text, '', $start_pos); + + // Remove the align from that tag so it's never checked again. + $tag = substr($text, $start_pos, strlen($matches[0])); + $content = substr($text, $start_pos + strlen($matches[0]), $end_pos - $start_pos - strlen($matches[0])); + $tag = str_replace($matches[2], '', $tag); + + // Put the tags back into the body. + $text = substr($text, 0, $start_pos) . $tag . '[' . $matches[3] . ']' . $content . '[/' . $matches[3] . ']' . substr($text, $end_pos); + } + else + { + // Just get rid of this evil tag. + $text = substr($text, 0, $start_pos) . substr($text, $start_pos + strlen($matches[0])); + } + } + + // Let's do some special stuff for fonts - cause we all love fonts. + while (preg_match('~]*)>~i', $text, $matches) === 1) + { + // Find the position of this again. + $start_pos = strpos($text, $matches[0]); + $end_pos = false; + if ($start_pos === false) + break; + + // This must have an end tag - and we must find the right one. + $lower_text = strtolower($text); + + $start_pos_test = $start_pos + 4; + // How many starting tags must we find closing ones for first? + $start_font_tag_stack = 0; + while ($start_pos_test < strlen($text)) + { + // Where is the next starting font? + $next_start_pos = strpos($lower_text, '', $start_pos_test); + + // Did we past another starting tag before an end one? + if ($next_start_pos !== false && $next_start_pos < $next_end_pos) + { + $start_font_tag_stack++; + $start_pos_test = $next_start_pos + 4; + } + // Otherwise we have an end tag but not the right one? + elseif ($start_font_tag_stack) + { + $start_font_tag_stack--; + $start_pos_test = $next_end_pos + 4; + } + // Otherwise we're there! + else + { + $end_pos = $next_end_pos; + break; + } + } + if ($end_pos === false) + break; + + // Now work out what the attributes are. + $attribs = fetchTagAttributes($matches[1]); + $tags = array(); + foreach ($attribs as $s => $v) + { + if ($s == 'size') + $tags[] = array('[size=' . (int) trim($v) . ']', '[/size]'); + elseif ($s == 'face') + $tags[] = array('[font=' . trim(strtolower($v)) . ']', '[/font]'); + elseif ($s == 'color') + $tags[] = array('[color=' . trim(strtolower($v)) . ']', '[/color]'); + } + + // As before add in our tags. + $before = $after = ''; + foreach ($tags as $tag) + { + $before .= $tag[0]; + if (isset($tag[1])) + $after = $tag[1] . $after; + } + + // Remove the tag so it's never checked again. + $content = substr($text, $start_pos + strlen($matches[0]), $end_pos - $start_pos - strlen($matches[0])); + + // Put the tags back into the body. + $text = substr($text, 0, $start_pos) . $before . $content . $after . substr($text, $end_pos + 7); + } + + // Almost there, just a little more time. + if (connection_aborted() && $context['server']['is_apache']) + @apache_reset_timeout(); + + if (count($parts = preg_split('~<(/?)(li|ol|ul)([^>]*)>~i', $text, null, PREG_SPLIT_DELIM_CAPTURE)) > 1) + { + // A toggle that dermines whether we're directly under a
      or
        . + $inList = false; + + // Keep track of the number of nested list levels. + $listDepth = 0; + + // Map what we can expect from the HTML to what is supported by SMF. + $listTypeMapping = array( + '1' => 'decimal', + 'A' => 'upper-alpha', + 'a' => 'lower-alpha', + 'I' => 'upper-roman', + 'i' => 'lower-roman', + 'disc' => 'disc', + 'square' => 'square', + 'circle' => 'circle', + ); + + // $i: text, $i + 1: '/', $i + 2: tag, $i + 3: tail. + for ($i = 0, $numParts = count($parts) - 1; $i < $numParts; $i += 4) + { + $tag = strtolower($parts[$i + 2]); + $isOpeningTag = $parts[$i + 1] === ''; + + if ($isOpeningTag) + { + switch ($tag) + { + case 'ol': + case 'ul': + + // We have a problem, we're already in a list. + if ($inList) + { + // Inject a list opener, we'll deal with the ol/ul next loop. + array_splice($parts, $i, 0, array( + '', + '', + str_repeat("\t", $listDepth) . '[li]', + '', + )); + $numParts = count($parts) - 1; + + // The inlist status changes a bit. + $inList = false; + } + + // Just starting a new list. + else + { + $inList = true; + + if ($tag === 'ol') + $listType = 'decimal'; + elseif (preg_match('~type="?(' . implode('|', array_keys($listTypeMapping)) . ')"?~', $parts[$i + 3], $match) === 1) + $listType = $listTypeMapping[$match[1]]; + else + $listType = null; + + $listDepth++; + + $parts[$i + 2] = '[list' . ($listType === null ? '' : ' type=' . $listType) . ']' . "\n"; + $parts[$i + 3] = ''; + } + break; + + case 'li': + + // This is how it should be: a list item inside the list. + if ($inList) + { + $parts[$i + 2] = str_repeat("\t", $listDepth) . '[li]'; + $parts[$i + 3] = ''; + + // Within a list item, it's almost as if you're outside. + $inList = false; + } + + // The li is no direct child of a list. + else + { + // We are apparently in a list item. + if ($listDepth > 0) + { + $parts[$i + 2] = '[/li]' . "\n" . str_repeat("\t", $listDepth) . '[li]'; + $parts[$i + 3] = ''; + } + + // We're not even near a list. + else + { + // Quickly create a list with an item. + $listDepth++; + + $parts[$i + 2] = '[list]' . "\n\t" . '[li]'; + $parts[$i + 3] = ''; + } + } + + break; + } + } + + // Handle all the closing tags. + else + { + switch ($tag) + { + case 'ol': + case 'ul': + + // As we expected it, closing the list while we're in it. + if ($inList) + { + $inList = false; + + $listDepth--; + + $parts[$i + 1] = ''; + $parts[$i + 2] = str_repeat("\t", $listDepth) . '[/list]'; + $parts[$i + 3] = ''; + } + + else + { + // We're in a list item. + if ($listDepth > 0) + { + // Inject closure for this list item first. + // The content of $parts[$i] is left as is! + array_splice($parts, $i + 1, 0, array( + '', // $i + 1 + '[/li]' . "\n", // $i + 2 + '', // $i + 3 + '', // $i + 4 + )); + $numParts = count($parts) - 1; + + // Now that we've closed the li, we're in list space. + $inList = true; + } + + // We're not even in a list, ignore + else + { + $parts[$i + 1] = ''; + $parts[$i + 2] = ''; + $parts[$i + 3] = ''; + } + } + break; + + case 'li': + + if ($inList) + { + // There's no use for a after
          or
            , ignore. + $parts[$i + 1] = ''; + $parts[$i + 2] = ''; + $parts[$i + 3] = ''; + } + + else + { + // Remove the trailing breaks from the list item. + $parts[$i] = preg_replace('~\s*\s*$~', '', $parts[$i]); + $parts[$i + 1] = ''; + $parts[$i + 2] = '[/li]' . "\n"; + $parts[$i + 3] = ''; + + // And we're back in the [list] space. + $inList = true; + } + + break; + } + } + + // If we're in the [list] space, no content is allowed. + if ($inList && trim(preg_replace('~\s*\s*~', '', $parts[$i + 4])) !== '') + { + // Fix it by injecting an extra list item. + array_splice($parts, $i + 4, 0, array( + '', // No content. + '', // Opening tag. + 'li', // It's a
          • . + '', // No tail. + )); + $numParts = count($parts) - 1; + } + } + + $text = implode('', $parts); + + if ($inList) + { + $listDepth--; + $text .= str_repeat("\t", $listDepth) . '[/list]'; + } + + for ($i = $listDepth; $i > 0; $i--) + $text .= '[/li]' . "\n" . str_repeat("\t", $i - 1) . '[/list]'; + + } + + // I love my own image... + while (preg_match('~]*)/*>~i', $text, $matches) === 1) + { + // Find the position of the image. + $start_pos = strpos($text, $matches[0]); + if ($start_pos === false) + break; + $end_pos = $start_pos + strlen($matches[0]); + + $params = ''; + $had_params = array(); + $src = ''; + + $attrs = fetchTagAttributes($matches[1]); + foreach ($attrs as $attrib => $value) + { + if (in_array($attrib, array('width', 'height'))) + $params .= ' ' . $attrib . '=' . (int) $value; + elseif ($attrib == 'alt' && trim($value) != '') + $params .= ' alt=' . trim($value); + elseif ($attrib == 'src') + $src = trim($value); + } + + $tag = ''; + if (!empty($src)) + { + // Attempt to fix the path in case it's not present. + if (preg_match('~^https?://~i', $src) === 0 && is_array($parsedURL = parse_url($scripturl)) && isset($parsedURL['host'])) + { + $baseURL = (isset($parsedURL['scheme']) ? $parsedURL['scheme'] : 'http') . '://' . $parsedURL['host'] . (empty($parsedURL['port']) ? '' : ':' . $parsedURL['port']); + + if (substr($src, 0, 1) === '/') + $src = $baseURL . $src; + else + $src = $baseURL . (empty($parsedURL['path']) ? '/' : preg_replace('~/(?:index\\.php)?$~', '', $parsedURL['path'])) . '/' . $src; + } + + $tag = '[img' . $params . ']' . $src . '[/img]'; + } + + // Replace the tag + $text = substr($text, 0, $start_pos) . $tag . substr($text, $end_pos); + } + + // The final bits are the easy ones - tags which map to tags which map to tags - etc etc. + $tags = array( + '~~i' => '[b]', + '~~i' => '[/b]', + '~~i' => '[i]', + '~~i' => '[/i]', + '~~i' => '[u]', + '~~i' => '[/u]', + '~~i' => '[b]', + '~~i' => '[/b]', + '~~i' => '[i]', + '~~i' => '[/i]', + '~~i' => "[s]", + '~~i' => "[/s]", + '~~i' => '[s]', + '~~i' => '[/s]', + '~~i' => '[s]', + '~~i' => '[/s]', + '~~i' => '[center]', + '~~i' => '[/center]', + '~~i' => '[pre]', + '~~i' => '[/pre]', + '~~i' => '[sub]', + '~~i' => '[/sub]', + '~~i' => '[sup]', + '~~i' => '[/sup]', + '~~i' => '[tt]', + '~~i' => '[/tt]', + '~~i' => '[table]', + '~~i' => '[/table]', + '~~i' => '[tr]', + '~~i' => '[/tr]', + '~<(td|th)\s[^<>]*?colspan="?(\d{1,2})"?.*?' . '>~ie' => 'str_repeat(\'[td][/td]\', $2 - 1) . \'[td]\'', + '~<(td|th)(\s(.)*?)*?' . '>~i' => '[td]', + '~~i' => '[/td]', + '~]*?)?' . '>~i' => "\n", + '~]*>(\n)?~i' => "[hr]\n$1", + '~(\n)?\\[hr\\]~i' => "\n[hr]", + '~^\n\\[hr\\]~i' => "[hr]", + '~~i' => "<blockquote>", + '~~i' => "</blockquote>", + '~~i' => "<ins>", + '~~i' => "</ins>", + ); + $text = preg_replace(array_keys($tags), array_values($tags), $text); + + // Please give us just a little more time. + if (connection_aborted() && $context['server']['is_apache']) + @apache_reset_timeout(); + + // What about URL's - the pain in the ass of the tag world. + while (preg_match('~]*)>([^<>]*)~i', $text, $matches) === 1) + { + // Find the position of the URL. + $start_pos = strpos($text, $matches[0]); + if ($start_pos === false) + break; + $end_pos = $start_pos + strlen($matches[0]); + + $tag_type = 'url'; + $href = ''; + + $attrs = fetchTagAttributes($matches[1]); + foreach ($attrs as $attrib => $value) + { + if ($attrib == 'href') + { + $href = trim($value); + + // Are we dealing with an FTP link? + if (preg_match('~^ftps?://~', $href) === 1) + $tag_type = 'ftp'; + + // Or is this a link to an email address? + elseif (substr($href, 0, 7) == 'mailto:') + { + $tag_type = 'email'; + $href = substr($href, 7); + } + + // No http(s), so attempt to fix this potential relative URL. + elseif (preg_match('~^https?://~i', $href) === 0 && is_array($parsedURL = parse_url($scripturl)) && isset($parsedURL['host'])) + { + $baseURL = (isset($parsedURL['scheme']) ? $parsedURL['scheme'] : 'http') . '://' . $parsedURL['host'] . (empty($parsedURL['port']) ? '' : ':' . $parsedURL['port']); + + if (substr($href, 0, 1) === '/') + $href = $baseURL . $href; + else + $href = $baseURL . (empty($parsedURL['path']) ? '/' : preg_replace('~/(?:index\\.php)?$~', '', $parsedURL['path'])) . '/' . $href; + } + } + + // External URL? + if ($attrib == 'target' && $tag_type == 'url') + { + if (trim($value) == '_blank') + $tag_type == 'iurl'; + } + } + + $tag = ''; + if ($href != '') + { + if ($matches[2] == $href) + $tag = '[' . $tag_type . ']' . $href . '[/' . $tag_type . ']'; + else + $tag = '[' . $tag_type . '=' . $href . ']' . $matches[2] . '[/' . $tag_type . ']'; + } + + // Replace the tag + $text = substr($text, 0, $start_pos) . $tag . substr($text, $end_pos); + } + + $text = strip_tags($text); + + // Some tags often end up as just dummy tags - remove those. + $text = preg_replace('~\[[bisu]\]\s*\[/[bisu]\]~', '', $text); + + // Fix up entities. + $text = preg_replace('~&~i', '&#38;', $text); + + $text = mob_legalise_bbc($text); + + return $text; +} +function mob_legalise_bbc($text) +{ + global $modSettings; + + // Don't care about the texts that are too short. + if (strlen($text) < 3) + return $text; + + // We are going to cycle through the BBC and keep track of tags as they arise - in order. If get to a block level tag we're going to make sure it's not in a non-block level tag! + // This will keep the order of tags that are open. + $current_tags = array(); + + // This will quickly let us see if the tag is active. + $active_tags = array(); + + // A list of tags that's disabled by the admin. + $disabled = empty($modSettings['disabledBBC']) ? array() : array_flip(explode(',', strtolower($modSettings['disabledBBC']))); + + // Add flash if it's disabled as embedded tag. + if (empty($modSettings['enableEmbeddedFlash'])) + $disabled['flash'] = true; + + // Get a list of all the tags that are not disabled. + $all_tags = parse_bbc(false); + $valid_tags = array(); + $self_closing_tags = array(); + foreach ($all_tags as $tag) + { + if (!isset($disabled[$tag['tag']])) + $valid_tags[$tag['tag']] = !empty($tag['block_level']); + if (isset($tag['type']) && $tag['type'] == 'closed') + $self_closing_tags[] = $tag['tag']; + } + + // Don't worry if we're in a code/nobbc. + $in_code_nobbc = false; + + // Right - we're going to start by going through the whole lot to make sure we don't have align stuff crossed as this happens load and is stupid! + $align_tags = array('left', 'center', 'right', 'pre'); + + // Remove those align tags that are not valid. + $align_tags = array_intersect($align_tags, array_keys($valid_tags)); + + // These keep track of where we are! + if (!empty($align_tags) && count($matches = preg_split('~(\\[/?(?:' . implode('|', $align_tags) . ')\\])~', $text, -1, PREG_SPLIT_DELIM_CAPTURE)) > 1) + { + // The first one is never a tag. + $isTag = false; + + // By default we're not inside a tag too. + $insideTag = null; + + foreach ($matches as $i => $match) + { + // We're only interested in tags, not text. + if ($isTag) + { + $isClosingTag = substr($match, 1, 1) === '/'; + $tagName = substr($match, $isClosingTag ? 2 : 1, -1); + + // We're closing the exact same tag that we opened. + if ($isClosingTag && $insideTag === $tagName) + $insideTag = null; + + // We're opening a tag and we're not yet inside one either + elseif (!$isClosingTag && $insideTag === null) + $insideTag = $tagName; + + // In all other cases, this tag must be invalid + else + unset($matches[$i]); + } + + // The next one is gonna be the other one. + $isTag = !$isTag; + } + + // We're still inside a tag and had no chance for closure? + if ($insideTag !== null) + $matches[] = '[/' . $insideTag . ']'; + + // And a complete text string again. + $text = implode('', $matches); + } + + // Quickly remove any tags which are back to back. + $backToBackPattern = '~\\[(' . implode('|', array_diff(array_keys($valid_tags), array('td'))) . ')[^<>\\[\\]]*\\]\s*\\[/\\1\\]~'; + $lastlen = 0; + while (strlen($text) !== $lastlen) + $lastlen = strlen($text = preg_replace($backToBackPattern, '', $text)); + + // Need to sort the tags my name length. + //uksort($valid_tags, 'sort_array_length'); + + // These inline tags can compete with each other regarding style. + $competing_tags = array( + 'color', + 'size', + ); + + // In case things changed above set these back to normal. + $in_code_nobbc = false; + $new_text_offset = 0; + + // These keep track of where we are! + if (count($parts = preg_split(sprintf('~(\\[)(/?)(%1$s)((?:[\\s=][^\\]]*)?\\])~', implode('|', array_keys($valid_tags))), $text, -1, PREG_SPLIT_DELIM_CAPTURE)) > 1) + { + // Start with just text. + $isTag = false; + + // Start outside [nobbc] or [code] blocks. + $inCode = false; + $inNoBbc = false; + + // A buffer containing all opened inline elements. + $inlineElements = array(); + + // A buffer containing all opened block elements. + $blockElements = array(); + + // A buffer containing the opened inline elements that might compete. + $competingElements = array(); + + // $i: text, $i + 1: '[', $i + 2: '/', $i + 3: tag, $i + 4: tag tail. + for ($i = 0, $n = count($parts) - 1; $i < $n; $i += 5) + { + $tag = $parts[$i + 3]; + $isOpeningTag = $parts[$i + 2] === ''; + $isClosingTag = $parts[$i + 2] === '/'; + $isBlockLevelTag = isset($valid_tags[$tag]) && $valid_tags[$tag] && !in_array($tag, $self_closing_tags); + $isCompetingTag = in_array($tag, $competing_tags); + + // Check if this might be one of those cleaned out tags. + if ($tag === '') + continue; + + // Special case: inside [code] blocks any code is left untouched. + elseif ($tag === 'code') + { + // We're inside a code block and closing it. + if ($inCode && $isClosingTag) + { + $inCode = false; + + // Reopen tags that were closed before the code block. + if (!empty($inlineElements)) + $parts[$i + 4] .= '[' . implode('][', array_keys($inlineElements)) . ']'; + } + + // We're outside a coding and nobbc block and opening it. + elseif (!$inCode && !$inNoBbc && $isOpeningTag) + { + // If there are still inline elements left open, close them now. + if (!empty($inlineElements)) + { + $parts[$i] .= '[/' . implode('][/', array_reverse($inlineElements)) . ']'; + //$inlineElements = array(); + } + + $inCode = true; + } + + // Nothing further to do. + continue; + } + + // Special case: inside [nobbc] blocks any BBC is left untouched. + elseif ($tag === 'nobbc') + { + // We're inside a nobbc block and closing it. + if ($inNoBbc && $isClosingTag) + { + $inNoBbc = false; + + // Some inline elements might've been closed that need reopening. + if (!empty($inlineElements)) + $parts[$i + 4] .= '[' . implode('][', array_keys($inlineElements)) . ']'; + } + + // We're outside a nobbc and coding block and opening it. + elseif (!$inNoBbc && !$inCode && $isOpeningTag) + { + // Can't have inline elements still opened. + if (!empty($inlineElements)) + { + $parts[$i] .= '[/' . implode('][/', array_reverse($inlineElements)) . ']'; + //$inlineElements = array(); + } + + $inNoBbc = true; + } + + continue; + } + + // So, we're inside one of the special blocks: ignore any tag. + elseif ($inCode || $inNoBbc) + continue; + + // We're dealing with an opening tag. + if ($isOpeningTag) + { + // Everyting inside the square brackets of the opening tag. + $elementContent = $parts[$i + 3] . substr($parts[$i + 4], 0, -1); + + // A block level opening tag. + if ($isBlockLevelTag) + { + // Are there inline elements still open? + if (!empty($inlineElements)) + { + // Close all the inline tags, a block tag is coming... + $parts[$i] .= '[/' . implode('][/', array_reverse($inlineElements)) . ']'; + + // Now open them again, we're inside the block tag now. + $parts[$i + 5] = '[' . implode('][', array_keys($inlineElements)) . ']' . $parts[$i + 5]; + } + + $blockElements[] = $tag; + } + + // Inline opening tag. + elseif (!in_array($tag, $self_closing_tags)) + { + // Can't have two opening elements with the same contents! + if (isset($inlineElements[$elementContent])) + { + // Get rid of this tag. + $parts[$i + 1] = $parts[$i + 2] = $parts[$i + 3] = $parts[$i + 4] = ''; + + // Now try to find the corresponding closing tag. + $curLevel = 1; + for ($j = $i + 5, $m = count($parts) - 1; $j < $m; $j += 5) + { + // Find the tags with the same tagname + if ($parts[$j + 3] === $tag) + { + // If it's an opening tag, increase the level. + if ($parts[$j + 2] === '') + $curLevel++; + + // A closing tag, decrease the level. + else + { + $curLevel--; + + // Gotcha! Clean out this closing tag gone rogue. + if ($curLevel === 0) + { + $parts[$j + 1] = $parts[$j + 2] = $parts[$j + 3] = $parts[$j + 4] = ''; + break; + } + } + } + } + } + + // Otherwise, add this one to the list. + else + { + if ($isCompetingTag) + { + if (!isset($competingElements[$tag])) + $competingElements[$tag] = array(); + + $competingElements[$tag][] = $parts[$i + 4]; + + if (count($competingElements[$tag]) > 1) + $parts[$i] .= '[/' . $tag . ']'; + } + + $inlineElements[$elementContent] = $tag; + } + } + + } + + // Closing tag. + else + { + // Closing the block tag. + if ($isBlockLevelTag) + { + // Close the elements that should've been closed by closing this tag. + if (!empty($blockElements)) + { + $addClosingTags = array(); + while ($element = array_pop($blockElements)) + { + if ($element === $tag) + break; + + // Still a block tag was open not equal to this tag. + $addClosingTags[] = $element['type']; + } + + if (!empty($addClosingTags)) + $parts[$i + 1] = '[/' . implode('][/', array_reverse($addClosingTags)) . ']' . $parts[$i + 1]; + + // Apparently the closing tag was not found on the stack. + if (!is_string($element) || $element !== $tag) + { + // Get rid of this particular closing tag, it was never opened. + $parts[$i + 1] = substr($parts[$i + 1], 0, -1); + $parts[$i + 2] = $parts[$i + 3] = $parts[$i + 4] = ''; + continue; + } + } + else + { + // Get rid of this closing tag! + $parts[$i + 1] = $parts[$i + 2] = $parts[$i + 3] = $parts[$i + 4] = ''; + continue; + } + + // Inline elements are still left opened? + if (!empty($inlineElements)) + { + // Close them first.. + $parts[$i] .= '[/' . implode('][/', array_reverse($inlineElements)) . ']'; + + // Then reopen them. + $parts[$i + 5] = '[' . implode('][', array_keys($inlineElements)) . ']' . $parts[$i + 5]; + } + } + // Inline tag. + else + { + // Are we expecting this tag to end? + if (in_array($tag, $inlineElements)) + { + foreach (array_reverse($inlineElements, true) as $tagContentToBeClosed => $tagToBeClosed) + { + // Closing it one way or the other. + unset($inlineElements[$tagContentToBeClosed]); + + // Was this the tag we were looking for? + if ($tagToBeClosed === $tag) + break; + + // Nope, close it and look further! + else + $parts[$i] .= '[/' . $tagToBeClosed . ']'; + } + + if ($isCompetingTag && !empty($competingElements[$tag])) + { + array_pop($competingElements[$tag]); + + if (count($competingElements[$tag]) > 0) + $parts[$i + 5] = '[' . $tag . $competingElements[$tag][count($competingElements[$tag]) - 1] . $parts[$i + 5]; + } + } + + // Unexpected closing tag, ex-ter-mi-nate. + else + $parts[$i + 1] = $parts[$i + 2] = $parts[$i + 3] = $parts[$i + 4] = ''; + } + } + } + + // Close the code tags. + if ($inCode) + $parts[$i] .= '[/code]'; + + // The same for nobbc tags. + elseif ($inNoBbc) + $parts[$i] .= '[/nobbc]'; + + // Still inline tags left unclosed? Close them now, better late than never. + elseif (!empty($inlineElements)) + $parts[$i] .= '[/' . implode('][/', array_reverse($inlineElements)) . ']'; + + // Now close the block elements. + if (!empty($blockElements)) + $parts[$i] .= '[/' . implode('][/', array_reverse($blockElements)) . ']'; + + $text = implode('', $parts); + } + + // Final clean up of back to back tags. + $lastlen = 0; + while (strlen($text) !== $lastlen) + $lastlen = strlen($text = preg_replace($backToBackPattern, '', $text)); + + return $text; +} + +// Strtolower for arrah walk +function array_strtolower($value, $key) +{ + return strtolower($value); +} + +// Gets the current online members +function getMembersOnline() +{ + global $mobdb, $user_info, $scripturl, $modSettings, $txt; + + $return = array(); + + // Load the users online right now. + $result = $mobdb->query(' + SELECT + lo.ID_MEMBER AS id_member, lo.logTime AS log_time, mem.realName AS real_name, mem.memberName AS member_name, mem.showOnline AS show_online, lo.session, lo.url, + mg.onlineColor AS online_color, mg.ID_GROUP AS id_group, mg.groupName AS group_name, mem.avatar as avatar, IFNULL(a.ID_ATTACH, 0) AS id_attach, a.filename, a.attachmentType AS attachment_type + FROM {db_prefix}log_online AS lo + LEFT JOIN {db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER) + LEFT JOIN {db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER) + LEFT JOIN {db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))', + array() + ); + + $return['users_online'] = array(); + $return['list_users_online'] = array(); + $return['online_groups'] = array(); + $return['num_guests'] = 0; + $return['num_buddies'] = 0; + $return['num_users_hidden'] = 0; + + $return['show_buddies'] = !empty($user_info['buddies']); + + $url_data = array(); + while ($row = $mobdb->fetch_assoc()) + { + if (empty($row['real_name'])) + { + $return['num_guests']++; + continue; + } + elseif (empty($row['show_online']) && !allowedTo('moderate_forum')) + { + $return['num_users_hidden']++; + continue; + } + + $is_buddy = in_array($row['id_member'], $user_info['buddies']); + + $return['users_online'][$row['session']] = array( + 'id' => $row['id_member'], + 'username' => $row['member_name'], + 'name' => $row['real_name'], + 'group' => $row['id_group'], + 'is_buddy' => $is_buddy, + 'hidden' => empty($row['show_online']), + 'avatar' => str_replace(' ', '%20', $row['avatar'] == '' ? ($row['id_attach'] > 0 ? (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])), + ); + + $url_data[$row['session']] = array($row['url'], $row['id_member']); + } + $mobdb->free_result(); + + $url_data = determineActions($url_data); + + foreach ($return['users_online'] as $i => $member) + { + $return['users_online'][$i]['action'] = isset($url_data[$i]) ? $url_data[$i] : $txt['who_hidden']; + } + + return $return; +} + +function log_it($log_data, $is_begin = false) +{ + $log_file = './log/'.date('Ymd_H').'.log'; + + if ($is_begin) + { + global $user; + $method_name = $log_data; + $log_data = "\nSTART ======================================== $method_name\n"; + $log_data .= "TIME: ".date('Y-m-d H:i:s')."\n"; + $log_data .= "USER ID: ".$user->data['user_id']."\n"; + $log_data .= "USER NAME: ".$user->data['username']."\n"; + $log_data .= "PARAMETER:\n"; + } + + file_put_contents($log_file, print_r($log_data, true), FILE_APPEND); +} + +if (!function_exists('htmlspecialchars_decode')) +{ + function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT) + { + return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style))); + } +} + +function utf8ToAscii($c){ + global $context; + + if (strtolower($context['character_set']) == 'utf-8') + return $c; + + $len = strlen($c); + $a = 0; + $scill = ''; + while ($a < $len){ + $ud = 0; + if (ord($c{$a})>=0 && ord($c{$a})<=127){ + //$ud = ord($c{$a}); + $scill .= $c{$a}; + $a += 1; + continue; + }else if (ord($c{$a})>=192 && ord($c{$a})<=223){ + $ud = (ord($c{$a})-192)*64 + (ord($c{$a+1})-128); + $a += 2; + }else if (ord($c{$a})>=224 && ord($c{$a})<=239){ + $ud = (ord($c{$a})-224)*4096 + (ord($c{$a+1})-128)*64 + (ord($c{$a+2})-128); + $a += 3; + }else if (ord($c{$a})>=240 && ord($c{$a})<=247){ + $ud = (ord($c{$a})-240)*262144 + (ord($c{$a+1})-128)*4096 + (ord($c{$a+2})-128)*64 + (ord($c{$a+3})-128); + $a += 4; + }else if (ord($c{$a})>=248 && ord($c{$a})<=251){ + $ud = (ord($c{$a})-248)*16777216 + (ord($c{$a+1})-128)*262144 + (ord($c{$a+2})-128)*4096 + (ord($c{$a+3})-128)*64 + (ord($c{$a+4})-128); + $a += 5; + }else if (ord($c{$a})>=252 && ord($c{$a})<=253){ + $ud = (ord($c{$a})-252)*1073741824 + (ord($c{$a+1})-128)*16777216 + (ord($c{$a+2})-128)*262144 + (ord($c{$a+3})-128)*4096 + (ord($c{$a+4})-128)*64 + (ord($c{$a+5})-128); + $a += 6; + }else if (ord($c{$a})>=254 && ord($c{$a})<=255){ //error + $ud = false; + } + $scill .= "&#$ud;"; + } + return $scill; +} + +function unescape_htmlentitles($str) +{ + global $context; + + if (function_exists('mb_convert_encoding')) { + $str = @mb_convert_encoding($str, 'UTF-8', $context['character_set']); + } elseif (function_exists('iconv')) { + $str = iconv($context['character_set'], 'utf-8', $str); + } + + preg_match_all("/(?:%u.{4})|.{4};|&#\d+;|.+|\\r|\\n/U",$str,$r); + $ar = $r[0]; + + foreach($ar as $k=>$v) { + if(substr($v,0,2) == "&#") { + $ar[$k] =@html_entity_decode($v,ENT_QUOTES, 'UTF-8'); + } + } + + return join("",$ar); +} + +function escape_latin_code($str, $target_encoding){ + preg_match_all("/&#\d+;|&\w+;|.+|\\r|\\n/U", $str, $r); + $ar = $r[0]; + + foreach($ar as $k=>$v) { + if(substr($v,0,2) != "&#" && substr($v,0,1) == "&") { + $ar[$k] =@html_entity_decode($v,ENT_QUOTES,$target_encoding); + } + } + return join("", $ar); +} + +function mobi_unescape_html($str) +{ + $str = strip_tags($str); + $str = str_replace(array(' ','<', '>', '"', '&', ), array(' ','<', '>', '"', '&', ), $str); + + // add for bbcode + $search = array( + '#\[(tpt-b)\](.*?)\[/tpt-b\]#si', + '#\[(tpt-u)\](.*?)\[/tpt-u\]#si', + '#\[(tpt-i)\](.*?)\[/tpt-i\]#si', + '#\[tpt-color=(.*?)\](.*?)\[/tpt-color\]#si', + ); + + if (isset($GLOBALS['return_html']) && $GLOBALS['return_html'] && $GLOBALS['return_html'] != 'false') { + $replace = array( + '$2', + '$2', + '$2', + '$2', + ); + $str = str_replace("\n", '
            ', $str); + } else { + $replace = '$2'; + } + + $str = preg_replace($search, $replace, $str); + + //&, " (when ENT_NOQUOTES is not set), ' (when ENT_QUOTES is set), < and > + /* + $str = htmlspecialchars_decode($str); + $str = str_replace(array(' ',), array(' '), $str); + */ + $str = unescape_htmlentitles($str); + + $str = escape_latin_code($str ,'UTF-8'); + + return $str; +} + +function determineActions($urls) +{ + global $txt, $db_prefix, $user_info, $ID_MEMBER, $modSettings; + + if (!allowedTo('who_view')) + return array(); + loadLanguage('Who'); + + // Actions that require a specific permission level. + $allowedActions = array( + 'admin' => array('moderate_forum', 'manage_membergroups', 'manage_bans', 'admin_forum', 'manage_permissions', 'send_mail', 'manage_attachments', 'manage_smileys', 'manage_boards', 'edit_news'), + 'ban' => array('manage_bans'), + 'boardrecount' => array('admin_forum'), + 'calendar' => array('calendar_view'), + 'editnews' => array('edit_news'), + 'mailing' => array('send_mail'), + 'maintain' => array('admin_forum'), + 'manageattachments' => array('manage_attachments'), + 'manageboards' => array('manage_boards'), + 'mlist' => array('view_mlist'), + 'optimizetables' => array('admin_forum'), + 'repairboards' => array('admin_forum'), + 'search' => array('search_posts'), + 'search2' => array('search_posts'), + 'setcensor' => array('moderate_forum'), + 'setreserve' => array('moderate_forum'), + 'stats' => array('view_stats'), + 'viewErrorLog' => array('admin_forum'), + 'viewmembers' => array('moderate_forum'), + ); + + if (!is_array($urls)) + $url_list = array(array($urls, $ID_MEMBER)); + else + $url_list = $urls; + + // These are done to later query these in large chunks. (instead of one by one.) + $topic_ids = array(); + $profile_ids = array(); + $board_ids = array(); + + $data = array(); + foreach ($url_list as $k => $url) + { + // Get the request parameters.. + $actions = @unserialize($url[0]); + if ($actions === false) + continue; + + // Check if there was no action or the action is display. + if (!isset($actions['action']) || $actions['action'] == 'display') + { + // It's a topic! Must be! + if (isset($actions['topic'])) + { + // Assume they can't view it, and queue it up for later. + $data[$k] = $txt['who_hidden']; + $topic_ids[(int) $actions['topic']][$k] = $txt['who_topic']; + } + // It's a board! + elseif (isset($actions['board'])) + { + // Hide first, show later. + $data[$k] = $txt['who_hidden']; + $board_ids[$actions['board']][$k] = $txt['who_board']; + } + // It's the board index!! It must be! + else + { + $data[$k] = $txt['who_index']; + // ...or maybe it's just integrated into another system... + if (isset($modSettings['integrate_whos_online']) && function_exists($modSettings['integrate_whos_online'])) + $data[$k] = $modSettings['integrate_whos_online']($actions); + } + } + // Probably an error or some goon? + elseif ($actions['action'] == '') + $data[$k] = $txt['who_index']; + + // Some other normal action...? + else + { + // Viewing/editing a profile. + if ($actions['action'] == 'profile' || $actions['action'] == 'profile2') + { + // Whose? Their own? + if (empty($actions['u'])) + $actions['u'] = $url[1]; + + $data[$k] = $txt['who_hidden']; + $profile_ids[(int) $actions['u']][$k] = $actions['action'] == 'profile' ? $txt['who_viewprofile'] : $txt['who_profile']; + } + elseif (($actions['action'] == 'post' || $actions['action'] == 'post2') && empty($actions['topic']) && isset($actions['board'])) + { + $data[$k] = $txt['who_hidden']; + $board_ids[(int) $actions['board']][$k] = isset($actions['poll']) ? $txt['who_poll'] : $txt['who_post']; + } + // A subaction anyone can view... if the language string is there, show it. + elseif (isset($actions['sa']) && isset($txt['whoall_' . $actions['action'] . '_' . $actions['sa']])) + $data[$k] = $txt['whoall_' . $actions['action'] . '_' . $actions['sa']]; + // An action any old fellow can look at. (if ['whoall_' . $action] exists, we know everyone can see it.) + elseif (isset($txt['whoall_' . $actions['action']])) + $data[$k] = $txt['whoall_' . $actions['action']]; + // Viewable if and only if they can see the board... + elseif (isset($txt['whotopic_' . $actions['action']])) + { + // Find out what topic they are accessing. + $topic = (int) (isset($actions['topic']) ? $actions['topic'] : (isset($actions['from']) ? $actions['from'] : 0)); + + $data[$k] = $txt['who_hidden']; + $topic_ids[$topic][$k] = $txt['whotopic_' . $actions['action']]; + } + elseif (isset($txt['whopost_' . $actions['action']])) + { + // Find out what message they are accessing. + $msgid = (int) (isset($actions['msg']) ? $actions['msg'] : (isset($actions['quote']) ? $actions['quote'] : 0)); + + $result = db_query(" + SELECT m.ID_TOPIC, m.subject + FROM ({$db_prefix}boards AS b, {$db_prefix}messages AS m) + WHERE $user_info[query_see_board] + AND m.ID_MSG = $msgid + AND m.ID_BOARD = b.ID_BOARD + LIMIT 1", __FILE__, __LINE__); + list ($ID_TOPIC, $subject) = mysql_fetch_row($result); + $data[$k] = sprintf($txt['whopost_' . $actions['action']], $ID_TOPIC, $subject); + mysql_free_result($result); + + if (empty($ID_TOPIC)) + $data[$k] = $txt['who_hidden']; + } + // Viewable only by administrators.. (if it starts with whoadmin, it's admin only!) + elseif (allowedTo('moderate_forum') && isset($txt['whoadmin_' . $actions['action']])) + $data[$k] = $txt['whoadmin_' . $actions['action']]; + // Viewable by permission level. + elseif (isset($allowedActions[$actions['action']])) + { + if (allowedTo($allowedActions[$actions['action']])) + $data[$k] = $txt['whoallow_' . $actions['action']]; + else + $data[$k] = $txt['who_hidden']; + } + // Unlisted or unknown action. + else + $data[$k] = $txt['who_unknown']; + } + } + + // Load topic names. + if (!empty($topic_ids)) + { + $result = db_query(" + SELECT t.ID_TOPIC, m.subject + FROM ({$db_prefix}boards AS b, {$db_prefix}topics AS t, {$db_prefix}messages AS m) + WHERE $user_info[query_see_board] + AND t.ID_TOPIC IN (" . implode(', ', array_keys($topic_ids)) . ") + AND t.ID_BOARD = b.ID_BOARD + AND m.ID_MSG = t.ID_FIRST_MSG + LIMIT " . count($topic_ids), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + // Show the topic's subject for each of the actions. + foreach ($topic_ids[$row['ID_TOPIC']] as $k => $session_text) + $data[$k] = sprintf($session_text, $row['ID_TOPIC'], censorText($row['subject'])); + } + mysql_free_result($result); + } + + // Load board names. + if (!empty($board_ids)) + { + $result = db_query(" + SELECT b.ID_BOARD, b.name + FROM {$db_prefix}boards AS b + WHERE $user_info[query_see_board] + AND b.ID_BOARD IN (" . implode(', ', array_keys($board_ids)) . ") + LIMIT " . count($board_ids), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + // Put the board name into the string for each member... + foreach ($board_ids[$row['ID_BOARD']] as $k => $session_text) + $data[$k] = sprintf($session_text, $row['ID_BOARD'], $row['name']); + } + mysql_free_result($result); + } + + // Load member names for the profile. + if (!empty($profile_ids) && (allowedTo('profile_view_any') || allowedTo('profile_view_own'))) + { + $result = db_query(" + SELECT ID_MEMBER, realName + FROM {$db_prefix}members + WHERE ID_MEMBER IN (" . implode(', ', array_keys($profile_ids)) . ") + LIMIT " . count($profile_ids), __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($result)) + { + // If they aren't allowed to view this person's profile, skip it. + if (!allowedTo('profile_view_any') && $ID_MEMBER != $row['ID_MEMBER']) + continue; + + // Set their action on each - session/text to sprintf. + foreach ($profile_ids[$row['ID_MEMBER']] as $k => $session_text) + $data[$k] = sprintf($session_text, $row['ID_MEMBER'], $row['realName']); + } + mysql_free_result($result); + } + + if (!is_array($urls)) + return isset($data[0]) ? $data[0] : false; + else + return $data; +} + +function get_board_icon($board_id) +{ + global $boardurl; + + $icon_path = 'forum_icons/'; + + if (file_exists($icon_path.$board_id.'.png')) + return $boardurl.'/mobiquo/'.$icon_path.$board_id.'.png'; + elseif (file_exists($icon_path.$board_id.'.jpg')) + return $boardurl.'/mobiquo/'.$icon_path.$board_id.'.jpg'; + elseif (file_exists($icon_path.'default.png')) + return $boardurl.'/mobiquo/'.$icon_path.'default.png'; + elseif (file_exists($icon_path.'default.jpg')) + return $boardurl.'/mobiquo/'.$icon_path.'default.jpg'; + + return ''; +} + +?> \ No newline at end of file diff --git a/mobiquo/config/config.php b/mobiquo/config/config.php new file mode 100644 index 0000000..f0839eb --- /dev/null +++ b/mobiquo/config/config.php @@ -0,0 +1,55 @@ + + + + Redirecting... + + + + diff --git a/mobiquo/forum_icons/index.html b/mobiquo/forum_icons/index.html new file mode 100644 index 0000000..7fa16b8 --- /dev/null +++ b/mobiquo/forum_icons/index.html @@ -0,0 +1,8 @@ + + + + Redirecting... + + + + diff --git a/mobiquo/index.html b/mobiquo/index.html new file mode 100644 index 0000000..7fa16b8 --- /dev/null +++ b/mobiquo/index.html @@ -0,0 +1,8 @@ + + + + Redirecting... + + + + diff --git a/mobiquo/mobiquo.php b/mobiquo/mobiquo.php new file mode 100644 index 0000000..c25a8ba --- /dev/null +++ b/mobiquo/mobiquo.php @@ -0,0 +1,68 @@ + diff --git a/mobiquo/tapatalkdetect.js b/mobiquo/tapatalkdetect.js new file mode 100644 index 0000000..5598077 --- /dev/null +++ b/mobiquo/tapatalkdetect.js @@ -0,0 +1,40 @@ + +function detectTapatalk() { + if (document.cookie.indexOf("tapatalk_redirect=false") < 0) { + if (!navigator.userAgent.match(/Opera/i)) { + if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { + if (confirm("This forum is iPhone Native! Click OK to learn more about Tapatalk for iPhone.")) { + document.cookie = "tapatalk_redirect=false"; + window.location = "http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=307880732&mt=8"; + } else { + setTapatalkCookies(); + } + } else if(navigator.userAgent.match(/android/i)) { + if (confirm("This forum is Android Native! Click OK to learn more about Tapatalk for Android.")) { + document.cookie = "tapatalk_redirect=false"; + window.location = "market://search?q=pname:com.quoord.tapatalkpro.activity"; + } else { + setTapatalkCookies(); + } + } else if((navigator.userAgent.match(/Symbian/i)) || (navigator.userAgent.match(/Nokia/i))) { + if (confirm("This forum is Nokia Native! Click OK to learn more about Tapatalk for Nokia.")) { + document.cookie = "tapatalk_redirect=false"; + window.location = "http://store.ovi.com/content/22647?clickSource=browse&contentArea=applications"; + } else { + setTapatalkCookies(); + } + } + + } + } +} + +function setTapatalkCookies() { + var date = new Date(); + var days = 60; + date.setTime(date.getTime()+(days*24*60*60*1000)); + var expires = "; expires="+ date.toGMTString(); + document.cookie = "tapatalk_redirect=false" + expires; +} + +detectTapatalk(); diff --git a/qsearch.html b/qsearch.html new file mode 100644 index 0000000..d1145f4 --- /dev/null +++ b/qsearch.html @@ -0,0 +1,807 @@ + + + + + + + + + + + + + + + + www.rock.ru - форум + + + + + + + + +
            + +
            + + + + + + + + + + +
            + На главную страница форума + + Главная - Новости - Тексты песен - Рецензии - Чат - Mp3 - Хостинг для картинок - Блог
            + +
            +
            +
            +
            +
            + + +
            + Привет, rusty_angel, личных сообщений 1704 всего , 1 новое. +
            Общее время нахождения на форуме: 110 дн, 10 ч. и 35 мин.
            + Показать непрочитанные сообщения с последнего посещения.
            + Показать новые ответы на ваши сообщения.
            + + 2 Январь 2011, 20:00 +
            + Вид форума: широкий узкий + +
            +
            +
            + +
            + +   +   + Расширенный поиск +
            + +
            + + * + Начало + Помощь + Поиск + Админ + Редактировать профиль + Календарь + Выйти +
            + + + +
            + + + + + +
            www.rock.ru +
            +
            + + + + + + + + +
            Новости
            + + + + +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            + - + Музыкальные форумы + +
            Новые сообщения + Классический рок и его последователи
            + Хард рок, хард'н'хэви, рок'н'ролл, блюз-рок, блюз, фолк-рок, классический панк, пост панк - нью вэйв, рэггей, гранж и пост гранж, классическая альтернатива, арт - прог рок + + +
            + Re: 20 ваших любимых аль... (Heavy Metal Thompson) сегодня в 20:00 +
            Новые сообщения + Metal
            + Классический метал, NWOBHM, трэш, дэт, блэк, пауэр + + +
            + Re: DIAMOND HEAD (Heavy Metal Thompson) сегодня в 19:51 +
            Новые сообщения + Русский рок
            + Топик наших рок-групп... + +
            + Re: Лучший альбом 1993 г... (Keith) сегодня в 19:43 +
            Новые сообщения + Другая музыка
            + Всё, что не вписывается в предыдущие разделы: "новые" стили, музыка, относящаяся к року косвенно, и совсем не относящаяся + + +
            + Re: Mylene Farmer (Heavy Metal Thompson) сегодня в 17:34 +
            Новые сообщения + О музыке в целом
            + Разговоры о музыке без привязки к конкретным исполнителям и стилям +
            + Re: Аудио и Видео кассет... (Michalitch) сегодня в 19:52 +
            Новые сообщения + Музыкантам
            + Обсуждаем, кто что как на чём играет + +
            + Re: Для барабанщиков. (IrOn Whiplash Man) 28 Декабрь 2010, 10:03 +
            Новые сообщения + + Поиск музыки
            + Обмен записями, поиск раритетов… +
            + Альбомы 2010 года. Часть... (smelllike) сегодня в 12:21 +
            +
            +
            + + + + + + + + + + + + + + + + +
            + - + Легендарные Форумы +
            Новые сообщения + Judas Priest
            + Они проложили мостик между хард-роком 70 и хэви-металлом 80 +
            + Re: Флейм - здесь можно ... (The Painkiller) сегодня в 18:45 +
            Новые сообщения + Black Sabbath
            + Крёстные отцы хэви-метал... +
            + Re: Любимый вокалист BS (Вундер) сегодня в 19:45 +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + +
            + - + Оффлайн +
            Нет новых сообщений + Концерты
            + Анонсы предстоящих концертов и отчёты о прошедших + +
            + Re: Joe Lynn Turner в Пи... (Crimson_Kiss) вчера в 20:07 +
            Нет новых сообщений + Встречи и поездки
            + Хотите потрепаться в реале за кружечкой пива или чашечкой кофе? Или собираетесь куда-нибудь, но не знаете, где остановиться, или не можете определиться с маршрутом? Всё это обсуждаем тут +
            + Re: Москва. Зима 2010-20... (Brain Damage) сегодня в 19:38 +
            Нет новых сообщений + Репетиционные базы и студии
            + +
            + Re: Репетиционная база -... (dimanback) 16 Декабрь 2010, 12:03 +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            + - + Оффтопик +
            Новые сообщения + Культура и искусство
            + Не только же музыку нам здесь обсуждать! + +
            + + Re: Философия и философы... (The Metallian) сегодня в 19:57 +
            Нет новых сообщений + Политика и история
            + Для политически озабоченных +
            + Re: Политика (Brain Damage) 25 Декабрь 2010, 00:19 +
            Новые сообщения + Спорт
            + Болейте на здоровье. +
            + Re: Футбол (Tank#13) сегодня в 19:12 +
            Нет новых сообщений + Lifestyle
            + О нас любимых. Что любим, чем живём, как убиваем время... +
            + Re: Чад кутежа, или прик... (Skywalker) сегодня в 19:00 +
            Нет новых сообщений + Курилка
            + О чём угодно, как угодно, но всё-таки в рамках правил и элементарных приличий. +
            + Re: Что слушаем? — 2 (Maybe) сегодня в 19:43 +
            Новые сообщения + Игры и конкурсы
            + Убиваем время :) +
            + Re: Игра: ассоциации на ... (Halford) сегодня в 13:56 +
            Новые сообщения + Священные войны
            + Делаем вид, что выясняем, кто лучше, Deep Purple, Led Zeppelin или Black Sabbath. Или сравниваем Уайлда с Роудсом. Или... +
            + Re: Guns N' Roses или Ni... (betesha) сегодня в 19:59 +
            Нет новых сообщений + Флуд-Клуб
            + +
            + Re: Футболки (djay) 19 Ноябрь 2010, 13:22 +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            + - + Проект www.rock.ru +
            Нет новых сообщений + Объявления и новости проекта
            + +
            + Re: Новая возможность: в... (rusty_angel) 11 Июнь 2010, 09:09 +
            Нет новых сообщений + Жалобная книга
            + Если что-то не работает или должно работать, по вашему мнению, иначе, чем оно работает, пишите сюда. +
            + Re: Предложение: сортиро... (Brain Damage) 31 Декабрь 2010, 01:08 +
            Нет новых сообщений + Помощь проекту и сотрудничество
            + Если вы думаете, что можете нам чем-то помочь или вам есть что нам предложить. +Тут же можно найти списки того, что мы с удовольствием бы приняли от вас. +
            + Re: Ищу людей! Нужны пер... (Poline) 22 Октябрь 2010, 17:49 +
            Нет новых сообщений + Не для всех
            + Приватный форум для администрации + +
            + Re: Кто, За Что И На Ско... (fantom) 31 Декабрь 2010, 13:31 +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            + - + Разное +
            Нет новых сообщений + Объявления
            + Объявления - сюда :-) +
            + Re: GodOf@Rock.com (GodOfRock) 29 Декабрь 2010, 18:52 +
            Нет новых сообщений + Топики молодых Рок-групп
            + Поверьте, они нуждаются в Вашей поддержке! +
            + Re: Uncle Boo [garage / ... (rusty_angel) сегодня в 19:05 +
            Нет новых сообщений + Вопросы, Вопросы, Вопросы...
            + Если у вас есть вопросы по тем или иным исполнителям, то вам сюда! Возможно кто-нибудь знает на них ответы! + +
            + Re: помогите найти книгу... (Keith) сегодня в 19:10 +
            Новые сообщения + Выставка достижений
            + Здесь можно прорекламировать свой сайт и получить отзыв о нем! +
            + Re: Вам нравится вокал В... (papashura) сегодня в 12:43 +
            Новые сообщения + Архив
            + Сюда попадают все закрытые темы +
            + Re: С праздником, друзья... (Rondo) сегодня в 18:46 +
            +
            +
            + + + + +
            + Новые сообщения + Нет новых сообщений + + + Отметить все сообщения как прочитанные +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            www.rock.ru - Информационный центр
            Последние сообщения
            + + Последние сообщения + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            [Опросы]Re: 20 ваших любимых альбомов. от Heavy Metal Thompson сегодня в 20:00
            [Священные войны]Re: Guns N' Roses или Nirvana? от betesha сегодня в 19:59
            [Культура и искусство]Re: Философия и философы - выбираем! от The Metallian сегодня в 19:57
            [Prog/Art/Avant-garde/Fusion]Re: Frank Zappa & The Mothers 0f Invention от Вундер сегодня в 19:56
            [Опросы]Re: Queen "Sheer Heart Attack" от Heavy Metal Thompson сегодня в 19:55
            [О музыке в целом]Re: Аудио и Видео кассеты от Michalitch сегодня в 19:52
            [Heavy/Power/Speed/Glam]Re: DIAMOND HEAD от Heavy Metal Thompson сегодня в 19:51
            [Культура и искусство]Re: Философия и философы - выбираем! от The Metallian сегодня в 19:50
            [Культура и искусство]Re: Философия и философы - выбираем! от Вундер сегодня в 19:48
            [Культура и искусство]Re: Философия и философы - выбираем! от Dmitry Dumin сегодня в 19:46
            +
            Календарь предстоящих событий
            + + Календарь + + + Ближайшие Дни Рождения: + Fares (46), + Starshade (24), + dobradushny (26), + Gary (27), + САНЧО (23), + trooper (38), + Лестат (21), + Mad_Phoenix (24), + Cthulhu (18), + AlcoMan (21), + Tank#13 (23), + arseniakisa (26), + Hot Rockin (27), + Coda (20), + Angel Of Fate (20), + Pixiebass (20), + Showreel (23), + mcgo (2010)
            + +
            +
            Участники
            + + + Список участников + + Список участников +
            Список участников.
            +
            Статистика форума
            + + Статистика форума + + + + +
            +
            Всего тем: 13783
            Всего сообщений: 1676051
            + Последнее сообщение: "Re: 20 ваших любимых аль..." ( сегодня в 20:00)
            + + Последние 10 сообщений на форуме.
            + [Подробная статистика] +
            + Всего участников: 11108
            + Последний участник: Melomanus
            + + Ваши личные сообщения: 1704 новых: 1 +
            +
            Сейчас на сайте
            + + Сейчас на сайте + + 26 Гостей, 19 Участников
            + + + Активные пользователи за последние 5 минут:
            13-й тит, betesha, demonizer, DimASS, dreamer-K, DrJekyll, Foma, Heavy Metal Thompson, Keith, Master of Reality, Maybe, Metal Church, MJ Stayl, rusty_angel, Skywalker, The Metallian, Вундер, Помочь?, ‡Дмитрий‡, Googlebot, MSNBot, Yahoo! Slurp, Yandex +
            + +
            +
            + +
            + + + + + + + +
            + + www.rock.ru | Powered by SMF 1.0.8.
            +© 2001-2005, Lewis Media. All Rights Reserved. +
            +
            +
            + + +
            + Rambler's Top100 + + Rambler's Top100 + MusicCounter + +
            +
            + + + diff --git a/rand_avatar.php b/rand_avatar.php new file mode 100644 index 0000000..727f2aa --- /dev/null +++ b/rand_avatar.php @@ -0,0 +1,11 @@ + 6) { + $avatar = "/usr/local/www/rock/forum/attachments/avatar_6190.gif"; +} else { + $avatar = $avatars[rand(0,1084)]; +} +$size = getimagesize($avatar); +header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); +header("Content-type: {$size['mime']}"); +readfile($avatar); diff --git a/sitemap.php b/sitemap.php new file mode 100644 index 0000000..b5a4850 --- /dev/null +++ b/sitemap.php @@ -0,0 +1,20 @@ +'."\n"; +?> + + + + http://rock.ru/forum/index.php?topic= + daily + + + diff --git a/smiles-static.html b/smiles-static.html new file mode 100644 index 0000000..1798e49 --- /dev/null +++ b/smiles-static.html @@ -0,0 +1,16 @@ + + + + Дополнительные смайлики + + + + + + + + + +
            Выбрать смайлик
            :cry: :rage: :B :roll: :ooi: :wink: :yes: :bot: I roll! :z) :arrow: :vip: :Heppy: :think: :bye: :roul: :pst:
            :o :closed: :cens: :tani: :appl: :idnk: :sing: :shock: :res: :alc: :lam: :box: :tom: :lol: :vill:
            :idea: :E :horns: :poz: :meg: :dj: :rul: :sp: Storm of applause Heart Kiss
            Spam Party Song Dream Gift I adore Pie Egg Concert Off Topic Football Cellular Not hooligan Together Pancake Party Time
            I here Head about a wall Angel killer Cemetery Coffee Forbidden fruit To tease Devil Excellently Not I, and he Studio girl Pomegranate Gangster User
            New year Megavolt In a boat Phone Cop Smoking Bicycle Ban? :bar:
            Закрыть окно
            + + diff --git a/sphinx/index.php b/sphinx/index.php new file mode 100644 index 0000000..07524b1 --- /dev/null +++ b/sphinx/index.php @@ -0,0 +1,79 @@ + + +Тестируем поиск + + +
            + + +
            +SetServer( "localhost", 9312 ); + $cl->SetMatchMode( SPH_MATCH_EXTENDED2 ); +# $cl->SetSortMode( SPH_SORT_RELEVANCE ); + //$cl->SetGroupBy ( "ID_TOPIC", SPH_GROUPBY_ATTR, '@weight DESC'); +// $cl->SetFieldWeights(array('subject'=>10, 'body'=>1)); +# $cl->SetSelect( 'id AS ID_MSG'); + $cl->SetLimits(0, 20); +# $cl->SetFilter( 'model', array( 3 ) ); + $cl->SetArrayResult( true ); + + $q = $cl->EscapeString ($_GET['s']); + $result = $cl->Query( "\"$q\"", 'rt_posts' ); + + $msgs = array(); + $subjects = array(); + $bodies = array(); + + if ( $result === false ) { + echo "Query failed: " . $cl->GetLastError() . ".\n"; + } + else { + if ( $cl->GetLastWarning() ) { + echo "WARNING: " . $cl->GetLastWarning() . " +"; + } + + if ( ! empty($result["matches"]) ) { + foreach ( $result["matches"] as $doc => $docinfo ) { + $msgs[] = $docinfo['id']; + } + mysql_connect("localhost","root","Id0nTkN0w"); + mysql_select_db("rock"); + $res = mysql_query("SELECT ID_TOPIC, subject, body, ID_MSG from smf_messages WHERE ID_MSG IN (".implode(',',$msgs).");"); + $msgs = array(); + while ($msg = mysql_fetch_object($res)) { + if (! $msg) continue; + $subjects[] = $msg->subject; + parsecode($msg->body); + $bodies[] = $msg->body; + $topics[] = $msg->ID_TOPIC; + $msgs[] = $msg->ID_MSG; + } + $res2 = $cl->BuildExcerpts($subjects,'topics',$q); + $res3 = $cl->BuildExcerpts($bodies,'topics',$q, array("html_strip_mode" => "strip")); + foreach($topics as $key=>$topic) { + echo '', + $res2[$key],"
            \n"; + echo '', $res3[$key],"\n
            \n
            \n"; + } + + } + } +} +?> + + diff --git a/sphinx/sphinxapi.php b/sphinx/sphinxapi.php new file mode 100644 index 0000000..c623d44 --- /dev/null +++ b/sphinx/sphinxapi.php @@ -0,0 +1,1626 @@ +=8 ) + { + $v = (int)$v; + return pack ( "NN", $v>>32, $v&0xFFFFFFFF ); + } + + // x32, int + if ( is_int($v) ) + return pack ( "NN", $v < 0 ? -1 : 0, $v ); + + // x32, bcmath + if ( function_exists("bcmul") ) + { + if ( bccomp ( $v, 0 ) == -1 ) + $v = bcadd ( "18446744073709551616", $v ); + $h = bcdiv ( $v, "4294967296", 0 ); + $l = bcmod ( $v, "4294967296" ); + return pack ( "NN", (float)$h, (float)$l ); // conversion to float is intentional; int would lose 31st bit + } + + // x32, no-bcmath + $p = max(0, strlen($v) - 13); + $lo = abs((float)substr($v, $p)); + $hi = abs((float)substr($v, 0, $p)); + + $m = $lo + $hi*1316134912.0; // (10 ^ 13) % (1 << 32) = 1316134912 + $q = floor($m/4294967296.0); + $l = $m - ($q*4294967296.0); + $h = $hi*2328.0 + $q; // (10 ^ 13) / (1 << 32) = 2328 + + if ( $v<0 ) + { + if ( $l==0 ) + $h = 4294967296.0 - $h; + else + { + $h = 4294967295.0 - $h; + $l = 4294967296.0 - $l; + } + } + return pack ( "NN", $h, $l ); +} + +/// pack 64-bit unsigned +function sphPackU64 ( $v ) +{ + assert ( is_numeric($v) ); + + // x64 + if ( PHP_INT_SIZE>=8 ) + { + assert ( $v>=0 ); + + // x64, int + if ( is_int($v) ) + return pack ( "NN", $v>>32, $v&0xFFFFFFFF ); + + // x64, bcmath + if ( function_exists("bcmul") ) + { + $h = bcdiv ( $v, 4294967296, 0 ); + $l = bcmod ( $v, 4294967296 ); + return pack ( "NN", $h, $l ); + } + + // x64, no-bcmath + $p = max ( 0, strlen($v) - 13 ); + $lo = (int)substr ( $v, $p ); + $hi = (int)substr ( $v, 0, $p ); + + $m = $lo + $hi*1316134912; + $l = $m % 4294967296; + $h = $hi*2328 + (int)($m/4294967296); + + return pack ( "NN", $h, $l ); + } + + // x32, int + if ( is_int($v) ) + return pack ( "NN", 0, $v ); + + // x32, bcmath + if ( function_exists("bcmul") ) + { + $h = bcdiv ( $v, "4294967296", 0 ); + $l = bcmod ( $v, "4294967296" ); + return pack ( "NN", (float)$h, (float)$l ); // conversion to float is intentional; int would lose 31st bit + } + + // x32, no-bcmath + $p = max(0, strlen($v) - 13); + $lo = (float)substr($v, $p); + $hi = (float)substr($v, 0, $p); + + $m = $lo + $hi*1316134912.0; + $q = floor($m / 4294967296.0); + $l = $m - ($q * 4294967296.0); + $h = $hi*2328.0 + $q; + + return pack ( "NN", $h, $l ); +} + +// unpack 64-bit unsigned +function sphUnpackU64 ( $v ) +{ + list ( $hi, $lo ) = array_values ( unpack ( "N*N*", $v ) ); + + if ( PHP_INT_SIZE>=8 ) + { + if ( $hi<0 ) $hi += (1<<32); // because php 5.2.2 to 5.2.5 is totally fucked up again + if ( $lo<0 ) $lo += (1<<32); + + // x64, int + if ( $hi<=2147483647 ) + return ($hi<<32) + $lo; + + // x64, bcmath + if ( function_exists("bcmul") ) + return bcadd ( $lo, bcmul ( $hi, "4294967296" ) ); + + // x64, no-bcmath + $C = 100000; + $h = ((int)($hi / $C) << 32) + (int)($lo / $C); + $l = (($hi % $C) << 32) + ($lo % $C); + if ( $l>$C ) + { + $h += (int)($l / $C); + $l = $l % $C; + } + + if ( $h==0 ) + return $l; + return sprintf ( "%d%05d", $h, $l ); + } + + // x32, int + if ( $hi==0 ) + { + if ( $lo>0 ) + return $lo; + return sprintf ( "%u", $lo ); + } + + $hi = sprintf ( "%u", $hi ); + $lo = sprintf ( "%u", $lo ); + + // x32, bcmath + if ( function_exists("bcmul") ) + return bcadd ( $lo, bcmul ( $hi, "4294967296" ) ); + + // x32, no-bcmath + $hi = (float)$hi; + $lo = (float)$lo; + + $q = floor($hi/10000000.0); + $r = $hi - $q*10000000.0; + $m = $lo + $r*4967296.0; + $mq = floor($m/10000000.0); + $l = $m - $mq*10000000.0; + $h = $q*4294967296.0 + $r*429.0 + $mq; + + $h = sprintf ( "%.0f", $h ); + $l = sprintf ( "%07.0f", $l ); + if ( $h=="0" ) + return sprintf( "%.0f", (float)$l ); + return $h . $l; +} + +// unpack 64-bit signed +function sphUnpackI64 ( $v ) +{ + list ( $hi, $lo ) = array_values ( unpack ( "N*N*", $v ) ); + + // x64 + if ( PHP_INT_SIZE>=8 ) + { + if ( $hi<0 ) $hi += (1<<32); // because php 5.2.2 to 5.2.5 is totally fucked up again + if ( $lo<0 ) $lo += (1<<32); + + return ($hi<<32) + $lo; + } + + // x32, int + if ( $hi==0 ) + { + if ( $lo>0 ) + return $lo; + return sprintf ( "%u", $lo ); + } + // x32, int + elseif ( $hi==-1 ) + { + if ( $lo<0 ) + return $lo; + return sprintf ( "%.0f", $lo - 4294967296.0 ); + } + + $neg = ""; + $c = 0; + if ( $hi<0 ) + { + $hi = ~$hi; + $lo = ~$lo; + $c = 1; + $neg = "-"; + } + + $hi = sprintf ( "%u", $hi ); + $lo = sprintf ( "%u", $lo ); + + // x32, bcmath + if ( function_exists("bcmul") ) + return $neg . bcadd ( bcadd ( $lo, bcmul ( $hi, "4294967296" ) ), $c ); + + // x32, no-bcmath + $hi = (float)$hi; + $lo = (float)$lo; + + $q = floor($hi/10000000.0); + $r = $hi - $q*10000000.0; + $m = $lo + $r*4967296.0; + $mq = floor($m/10000000.0); + $l = $m - $mq*10000000.0 + $c; + $h = $q*4294967296.0 + $r*429.0 + $mq; + if ( $l==10000000 ) + { + $l = 0; + $h += 1; + } + + $h = sprintf ( "%.0f", $h ); + $l = sprintf ( "%07.0f", $l ); + if ( $h=="0" ) + return $neg . sprintf( "%.0f", (float)$l ); + return $neg . $h . $l; +} + + +function sphFixUint ( $value ) +{ + if ( PHP_INT_SIZE>=8 ) + { + // x64 route, workaround broken unpack() in 5.2.2+ + if ( $value<0 ) $value += (1<<32); + return $value; + } + else + { + // x32 route, workaround php signed/unsigned braindamage + return sprintf ( "%u", $value ); + } +} + + +/// sphinx searchd client class +class SphinxClient +{ + var $_host; ///< searchd host (default is "localhost") + var $_port; ///< searchd port (default is 9312) + var $_offset; ///< how many records to seek from result-set start (default is 0) + var $_limit; ///< how many records to return from result-set starting at offset (default is 20) + var $_mode; ///< query matching mode (default is SPH_MATCH_ALL) + var $_weights; ///< per-field weights (default is 1 for all fields) + var $_sort; ///< match sorting mode (default is SPH_SORT_RELEVANCE) + var $_sortby; ///< attribute to sort by (defualt is "") + var $_min_id; ///< min ID to match (default is 0, which means no limit) + var $_max_id; ///< max ID to match (default is 0, which means no limit) + var $_filters; ///< search filters + var $_groupby; ///< group-by attribute name + var $_groupfunc; ///< group-by function (to pre-process group-by attribute value with) + var $_groupsort; ///< group-by sorting clause (to sort groups in result set with) + var $_groupdistinct;///< group-by count-distinct attribute + var $_maxmatches; ///< max matches to retrieve + var $_cutoff; ///< cutoff to stop searching at (default is 0) + var $_retrycount; ///< distributed retries count + var $_retrydelay; ///< distributed retries delay + var $_anchor; ///< geographical anchor point + var $_indexweights; ///< per-index weights + var $_ranker; ///< ranking mode (default is SPH_RANK_PROXIMITY_BM25) + var $_maxquerytime; ///< max query time, milliseconds (default is 0, do not limit) + var $_fieldweights; ///< per-field-name weights + var $_overrides; ///< per-query attribute values overrides + var $_select; ///< select-list (attributes or expressions, with optional aliases) + + var $_error; ///< last error message + var $_warning; ///< last warning message + var $_connerror; ///< connection error vs remote error flag + + var $_reqs; ///< requests array for multi-query + var $_mbenc; ///< stored mbstring encoding + var $_arrayresult; ///< whether $result["matches"] should be a hash or an array + var $_timeout; ///< connect timeout + + ///////////////////////////////////////////////////////////////////////////// + // common stuff + ///////////////////////////////////////////////////////////////////////////// + + /// create a new client object and fill defaults + function SphinxClient () + { + // per-client-object settings + $this->_host = "localhost"; + $this->_port = 9312; + $this->_path = false; + $this->_socket = false; + + // per-query settings + $this->_offset = 0; + $this->_limit = 20; + $this->_mode = SPH_MATCH_ALL; + $this->_weights = array (); + $this->_sort = SPH_SORT_RELEVANCE; + $this->_sortby = ""; + $this->_min_id = 0; + $this->_max_id = 0; + $this->_filters = array (); + $this->_groupby = ""; + $this->_groupfunc = SPH_GROUPBY_DAY; + $this->_groupsort = "@group desc"; + $this->_groupdistinct= ""; + $this->_maxmatches = 1000; + $this->_cutoff = 0; + $this->_retrycount = 0; + $this->_retrydelay = 0; + $this->_anchor = array (); + $this->_indexweights= array (); + $this->_ranker = SPH_RANK_PROXIMITY_BM25; + $this->_maxquerytime= 0; + $this->_fieldweights= array(); + $this->_overrides = array(); + $this->_select = "*"; + + $this->_error = ""; // per-reply fields (for single-query case) + $this->_warning = ""; + $this->_connerror = false; + + $this->_reqs = array (); // requests storage (for multi-query case) + $this->_mbenc = ""; + $this->_arrayresult = false; + $this->_timeout = 0; + } + + function __destruct() + { + if ( $this->_socket !== false ) + fclose ( $this->_socket ); + } + + /// get last error message (string) + function GetLastError () + { + return $this->_error; + } + + /// get last warning message (string) + function GetLastWarning () + { + return $this->_warning; + } + + /// get last error flag (to tell network connection errors from searchd errors or broken responses) + function IsConnectError() + { + return $this->_connerror; + } + + /// set searchd host name (string) and port (integer) + function SetServer ( $host, $port = 0 ) + { + assert ( is_string($host) ); + if ( $host[0] == '/') + { + $this->_path = 'unix://' . $host; + return; + } + if ( substr ( $host, 0, 7 )=="unix://" ) + { + $this->_path = $host; + return; + } + + assert ( is_int($port) ); + $this->_host = $host; + $this->_port = $port; + $this->_path = ''; + + } + + /// set server connection timeout (0 to remove) + function SetConnectTimeout ( $timeout ) + { + assert ( is_numeric($timeout) ); + $this->_timeout = $timeout; + } + + + function _Send ( $handle, $data, $length ) + { + if ( feof($handle) || fwrite ( $handle, $data, $length ) !== $length ) + { + $this->_error = 'connection unexpectedly closed (timed out?)'; + $this->_connerror = true; + return false; + } + return true; + } + + ///////////////////////////////////////////////////////////////////////////// + + /// enter mbstring workaround mode + function _MBPush () + { + $this->_mbenc = ""; + if ( ini_get ( "mbstring.func_overload" ) & 2 ) + { + $this->_mbenc = mb_internal_encoding(); + mb_internal_encoding ( "latin1" ); + } + } + + /// leave mbstring workaround mode + function _MBPop () + { + if ( $this->_mbenc ) + mb_internal_encoding ( $this->_mbenc ); + } + + /// connect to searchd server + function _Connect () + { + if ( $this->_socket!==false ) + { + // we are in persistent connection mode, so we have a socket + // however, need to check whether it's still alive + if ( !@feof ( $this->_socket ) ) + return $this->_socket; + + // force reopen + $this->_socket = false; + } + + $errno = 0; + $errstr = ""; + $this->_connerror = false; + + if ( $this->_path ) + { + $host = $this->_path; + $port = 0; + } + else + { + $host = $this->_host; + $port = $this->_port; + } + + if ( $this->_timeout<=0 ) + $fp = @fsockopen ( $host, $port, $errno, $errstr ); + else + $fp = @fsockopen ( $host, $port, $errno, $errstr, $this->_timeout ); + + if ( !$fp ) + { + if ( $this->_path ) + $location = $this->_path; + else + $location = "{$this->_host}:{$this->_port}"; + + $errstr = trim ( $errstr ); + $this->_error = "connection to $location failed (errno=$errno, msg=$errstr)"; + $this->_connerror = true; + return false; + } + + // send my version + // this is a subtle part. we must do it before (!) reading back from searchd. + // because otherwise under some conditions (reported on FreeBSD for instance) + // TCP stack could throttle write-write-read pattern because of Nagle. + if ( !$this->_Send ( $fp, pack ( "N", 1 ), 4 ) ) + { + fclose ( $fp ); + $this->_error = "failed to send client protocol version"; + return false; + } + + // check version + list(,$v) = unpack ( "N*", fread ( $fp, 4 ) ); + $v = (int)$v; + if ( $v<1 ) + { + fclose ( $fp ); + $this->_error = "expected searchd protocol version 1+, got version '$v'"; + return false; + } + + return $fp; + } + + /// get and check response packet from searchd server + function _GetResponse ( $fp, $client_ver ) + { + $response = ""; + $len = 0; + + $header = fread ( $fp, 8 ); + if ( strlen($header)==8 ) + { + list ( $status, $ver, $len ) = array_values ( unpack ( "n2a/Nb", $header ) ); + $left = $len; + while ( $left>0 && !feof($fp) ) + { + $chunk = fread ( $fp, $left ); + if ( $chunk ) + { + $response .= $chunk; + $left -= strlen($chunk); + } + } + } + if ( $this->_socket === false ) + fclose ( $fp ); + + // check response + $read = strlen ( $response ); + if ( !$response || $read!=$len ) + { + $this->_error = $len + ? "failed to read searchd response (status=$status, ver=$ver, len=$len, read=$read)" + : "received zero-sized searchd response"; + return false; + } + + // check status + if ( $status==SEARCHD_WARNING ) + { + list(,$wlen) = unpack ( "N*", substr ( $response, 0, 4 ) ); + $this->_warning = substr ( $response, 4, $wlen ); + return substr ( $response, 4+$wlen ); + } + if ( $status==SEARCHD_ERROR ) + { + $this->_error = "searchd error: " . substr ( $response, 4 ); + return false; + } + if ( $status==SEARCHD_RETRY ) + { + $this->_error = "temporary searchd error: " . substr ( $response, 4 ); + return false; + } + if ( $status!=SEARCHD_OK ) + { + $this->_error = "unknown status code '$status'"; + return false; + } + + // check version + if ( $ver<$client_ver ) + { + $this->_warning = sprintf ( "searchd command v.%d.%d older than client's v.%d.%d, some options might not work", + $ver>>8, $ver&0xff, $client_ver>>8, $client_ver&0xff ); + } + + return $response; + } + + ///////////////////////////////////////////////////////////////////////////// + // searching + ///////////////////////////////////////////////////////////////////////////// + + /// set offset and count into result set, + /// and optionally set max-matches and cutoff limits + function SetLimits ( $offset, $limit, $max=0, $cutoff=0 ) + { + assert ( is_int($offset) ); + assert ( is_int($limit) ); + assert ( $offset>=0 ); + assert ( $limit>0 ); + assert ( $max>=0 ); + $this->_offset = $offset; + $this->_limit = $limit; + if ( $max>0 ) + $this->_maxmatches = $max; + if ( $cutoff>0 ) + $this->_cutoff = $cutoff; + } + + /// set maximum query time, in milliseconds, per-index + /// integer, 0 means "do not limit" + function SetMaxQueryTime ( $max ) + { + assert ( is_int($max) ); + assert ( $max>=0 ); + $this->_maxquerytime = $max; + } + + /// set matching mode + function SetMatchMode ( $mode ) + { + assert ( $mode==SPH_MATCH_ALL + || $mode==SPH_MATCH_ANY + || $mode==SPH_MATCH_PHRASE + || $mode==SPH_MATCH_BOOLEAN + || $mode==SPH_MATCH_EXTENDED + || $mode==SPH_MATCH_FULLSCAN + || $mode==SPH_MATCH_EXTENDED2 ); + $this->_mode = $mode; + } + + /// set ranking mode + function SetRankingMode ( $ranker ) + { + assert ( $ranker==SPH_RANK_PROXIMITY_BM25 + || $ranker==SPH_RANK_BM25 + || $ranker==SPH_RANK_NONE + || $ranker==SPH_RANK_WORDCOUNT + || $ranker==SPH_RANK_PROXIMITY ); + $this->_ranker = $ranker; + } + + /// set matches sorting mode + function SetSortMode ( $mode, $sortby="" ) + { + assert ( + $mode==SPH_SORT_RELEVANCE || + $mode==SPH_SORT_ATTR_DESC || + $mode==SPH_SORT_ATTR_ASC || + $mode==SPH_SORT_TIME_SEGMENTS || + $mode==SPH_SORT_EXTENDED || + $mode==SPH_SORT_EXPR ); + assert ( is_string($sortby) ); + assert ( $mode==SPH_SORT_RELEVANCE || strlen($sortby)>0 ); + + $this->_sort = $mode; + $this->_sortby = $sortby; + } + + /// bind per-field weights by order + /// DEPRECATED; use SetFieldWeights() instead + function SetWeights ( $weights ) + { + assert ( is_array($weights) ); + foreach ( $weights as $weight ) + assert ( is_int($weight) ); + + $this->_weights = $weights; + } + + /// bind per-field weights by name + function SetFieldWeights ( $weights ) + { + assert ( is_array($weights) ); + foreach ( $weights as $name=>$weight ) + { + assert ( is_string($name) ); + assert ( is_int($weight) ); + } + $this->_fieldweights = $weights; + } + + /// bind per-index weights by name + function SetIndexWeights ( $weights ) + { + assert ( is_array($weights) ); + foreach ( $weights as $index=>$weight ) + { + assert ( is_string($index) ); + assert ( is_int($weight) ); + } + $this->_indexweights = $weights; + } + + /// set IDs range to match + /// only match records if document ID is beetwen $min and $max (inclusive) + function SetIDRange ( $min, $max ) + { + assert ( is_numeric($min) ); + assert ( is_numeric($max) ); + assert ( $min<=$max ); + $this->_min_id = $min; + $this->_max_id = $max; + } + + /// set values set filter + /// only match records where $attribute value is in given set + function SetFilter ( $attribute, $values, $exclude=false ) + { + assert ( is_string($attribute) ); + assert ( is_array($values) ); + assert ( count($values) ); + + if ( is_array($values) && count($values) ) + { + foreach ( $values as $value ) + assert ( is_numeric($value) ); + + $this->_filters[] = array ( "type"=>SPH_FILTER_VALUES, "attr"=>$attribute, "exclude"=>$exclude, "values"=>$values ); + } + } + + /// set range filter + /// only match records if $attribute value is beetwen $min and $max (inclusive) + function SetFilterRange ( $attribute, $min, $max, $exclude=false ) + { + assert ( is_string($attribute) ); + assert ( is_numeric($min) ); + assert ( is_numeric($max) ); + assert ( $min<=$max ); + + $this->_filters[] = array ( "type"=>SPH_FILTER_RANGE, "attr"=>$attribute, "exclude"=>$exclude, "min"=>$min, "max"=>$max ); + } + + /// set float range filter + /// only match records if $attribute value is beetwen $min and $max (inclusive) + function SetFilterFloatRange ( $attribute, $min, $max, $exclude=false ) + { + assert ( is_string($attribute) ); + assert ( is_float($min) ); + assert ( is_float($max) ); + assert ( $min<=$max ); + + $this->_filters[] = array ( "type"=>SPH_FILTER_FLOATRANGE, "attr"=>$attribute, "exclude"=>$exclude, "min"=>$min, "max"=>$max ); + } + + /// setup anchor point for geosphere distance calculations + /// required to use @geodist in filters and sorting + /// latitude and longitude must be in radians + function SetGeoAnchor ( $attrlat, $attrlong, $lat, $long ) + { + assert ( is_string($attrlat) ); + assert ( is_string($attrlong) ); + assert ( is_float($lat) ); + assert ( is_float($long) ); + + $this->_anchor = array ( "attrlat"=>$attrlat, "attrlong"=>$attrlong, "lat"=>$lat, "long"=>$long ); + } + + /// set grouping attribute and function + function SetGroupBy ( $attribute, $func, $groupsort="@group desc" ) + { + assert ( is_string($attribute) ); + assert ( is_string($groupsort) ); + assert ( $func==SPH_GROUPBY_DAY + || $func==SPH_GROUPBY_WEEK + || $func==SPH_GROUPBY_MONTH + || $func==SPH_GROUPBY_YEAR + || $func==SPH_GROUPBY_ATTR + || $func==SPH_GROUPBY_ATTRPAIR ); + + $this->_groupby = $attribute; + $this->_groupfunc = $func; + $this->_groupsort = $groupsort; + } + + /// set count-distinct attribute for group-by queries + function SetGroupDistinct ( $attribute ) + { + assert ( is_string($attribute) ); + $this->_groupdistinct = $attribute; + } + + /// set distributed retries count and delay + function SetRetries ( $count, $delay=0 ) + { + assert ( is_int($count) && $count>=0 ); + assert ( is_int($delay) && $delay>=0 ); + $this->_retrycount = $count; + $this->_retrydelay = $delay; + } + + /// set result set format (hash or array; hash by default) + /// PHP specific; needed for group-by-MVA result sets that may contain duplicate IDs + function SetArrayResult ( $arrayresult ) + { + assert ( is_bool($arrayresult) ); + $this->_arrayresult = $arrayresult; + } + + /// set attribute values override + /// there can be only one override per attribute + /// $values must be a hash that maps document IDs to attribute values + function SetOverride ( $attrname, $attrtype, $values ) + { + assert ( is_string ( $attrname ) ); + assert ( in_array ( $attrtype, array ( SPH_ATTR_INTEGER, SPH_ATTR_TIMESTAMP, SPH_ATTR_BOOL, SPH_ATTR_FLOAT, SPH_ATTR_BIGINT ) ) ); + assert ( is_array ( $values ) ); + + $this->_overrides[$attrname] = array ( "attr"=>$attrname, "type"=>$attrtype, "values"=>$values ); + } + + /// set select-list (attributes or expressions), SQL-like syntax + function SetSelect ( $select ) + { + assert ( is_string ( $select ) ); + $this->_select = $select; + } + + ////////////////////////////////////////////////////////////////////////////// + + /// clear all filters (for multi-queries) + function ResetFilters () + { + $this->_filters = array(); + $this->_anchor = array(); + } + + /// clear groupby settings (for multi-queries) + function ResetGroupBy () + { + $this->_groupby = ""; + $this->_groupfunc = SPH_GROUPBY_DAY; + $this->_groupsort = "@group desc"; + $this->_groupdistinct= ""; + } + + /// clear all attribute value overrides (for multi-queries) + function ResetOverrides () + { + $this->_overrides = array (); + } + + ////////////////////////////////////////////////////////////////////////////// + + /// connect to searchd server, run given search query through given indexes, + /// and return the search results + function Query ( $query, $index="*", $comment="" ) + { + assert ( empty($this->_reqs) ); + + $this->AddQuery ( $query, $index, $comment ); + $results = $this->RunQueries (); + $this->_reqs = array (); // just in case it failed too early + + if ( !is_array($results) ) + return false; // probably network error; error message should be already filled + + $this->_error = $results[0]["error"]; + $this->_warning = $results[0]["warning"]; + if ( $results[0]["status"]==SEARCHD_ERROR ) + return false; + else + return $results[0]; + } + + /// helper to pack floats in network byte order + function _PackFloat ( $f ) + { + $t1 = pack ( "f", $f ); // machine order + list(,$t2) = unpack ( "L*", $t1 ); // int in machine order + return pack ( "N", $t2 ); + } + + /// add query to multi-query batch + /// returns index into results array from RunQueries() call + function AddQuery ( $query, $index="*", $comment="" ) + { + // mbstring workaround + $this->_MBPush (); + + // build request + $req = pack ( "NNNNN", $this->_offset, $this->_limit, $this->_mode, $this->_ranker, $this->_sort ); // mode and limits + $req .= pack ( "N", strlen($this->_sortby) ) . $this->_sortby; + $req .= pack ( "N", strlen($query) ) . $query; // query itself + $req .= pack ( "N", count($this->_weights) ); // weights + foreach ( $this->_weights as $weight ) + $req .= pack ( "N", (int)$weight ); + $req .= pack ( "N", strlen($index) ) . $index; // indexes + $req .= pack ( "N", 1 ); // id64 range marker + $req .= sphPackU64 ( $this->_min_id ) . sphPackU64 ( $this->_max_id ); // id64 range + + // filters + $req .= pack ( "N", count($this->_filters) ); + foreach ( $this->_filters as $filter ) + { + $req .= pack ( "N", strlen($filter["attr"]) ) . $filter["attr"]; + $req .= pack ( "N", $filter["type"] ); + switch ( $filter["type"] ) + { + case SPH_FILTER_VALUES: + $req .= pack ( "N", count($filter["values"]) ); + foreach ( $filter["values"] as $value ) + $req .= sphPackI64 ( $value ); + break; + + case SPH_FILTER_RANGE: + $req .= sphPackI64 ( $filter["min"] ) . sphPackI64 ( $filter["max"] ); + break; + + case SPH_FILTER_FLOATRANGE: + $req .= $this->_PackFloat ( $filter["min"] ) . $this->_PackFloat ( $filter["max"] ); + break; + + default: + assert ( 0 && "internal error: unhandled filter type" ); + } + $req .= pack ( "N", $filter["exclude"] ); + } + + // group-by clause, max-matches count, group-sort clause, cutoff count + $req .= pack ( "NN", $this->_groupfunc, strlen($this->_groupby) ) . $this->_groupby; + $req .= pack ( "N", $this->_maxmatches ); + $req .= pack ( "N", strlen($this->_groupsort) ) . $this->_groupsort; + $req .= pack ( "NNN", $this->_cutoff, $this->_retrycount, $this->_retrydelay ); + $req .= pack ( "N", strlen($this->_groupdistinct) ) . $this->_groupdistinct; + + // anchor point + if ( empty($this->_anchor) ) + { + $req .= pack ( "N", 0 ); + } else + { + $a =& $this->_anchor; + $req .= pack ( "N", 1 ); + $req .= pack ( "N", strlen($a["attrlat"]) ) . $a["attrlat"]; + $req .= pack ( "N", strlen($a["attrlong"]) ) . $a["attrlong"]; + $req .= $this->_PackFloat ( $a["lat"] ) . $this->_PackFloat ( $a["long"] ); + } + + // per-index weights + $req .= pack ( "N", count($this->_indexweights) ); + foreach ( $this->_indexweights as $idx=>$weight ) + $req .= pack ( "N", strlen($idx) ) . $idx . pack ( "N", $weight ); + + // max query time + $req .= pack ( "N", $this->_maxquerytime ); + + // per-field weights + $req .= pack ( "N", count($this->_fieldweights) ); + foreach ( $this->_fieldweights as $field=>$weight ) + $req .= pack ( "N", strlen($field) ) . $field . pack ( "N", $weight ); + + // comment + $req .= pack ( "N", strlen($comment) ) . $comment; + + // attribute overrides + $req .= pack ( "N", count($this->_overrides) ); + foreach ( $this->_overrides as $key => $entry ) + { + $req .= pack ( "N", strlen($entry["attr"]) ) . $entry["attr"]; + $req .= pack ( "NN", $entry["type"], count($entry["values"]) ); + foreach ( $entry["values"] as $id=>$val ) + { + assert ( is_numeric($id) ); + assert ( is_numeric($val) ); + + $req .= sphPackU64 ( $id ); + switch ( $entry["type"] ) + { + case SPH_ATTR_FLOAT: $req .= $this->_PackFloat ( $val ); break; + case SPH_ATTR_BIGINT: $req .= sphPackI64 ( $val ); break; + default: $req .= pack ( "N", $val ); break; + } + } + } + + // select-list + $req .= pack ( "N", strlen($this->_select) ) . $this->_select; + + // mbstring workaround + $this->_MBPop (); + + // store request to requests array + $this->_reqs[] = $req; + return count($this->_reqs)-1; + } + + /// connect to searchd, run queries batch, and return an array of result sets + function RunQueries () + { + if ( empty($this->_reqs) ) + { + $this->_error = "no queries defined, issue AddQuery() first"; + return false; + } + + // mbstring workaround + $this->_MBPush (); + + if (!( $fp = $this->_Connect() )) + { + $this->_MBPop (); + return false; + } + + // send query, get response + $nreqs = count($this->_reqs); + $req = join ( "", $this->_reqs ); + $len = 4+strlen($req); + $req = pack ( "nnNN", SEARCHD_COMMAND_SEARCH, VER_COMMAND_SEARCH, $len, $nreqs ) . $req; // add header + + if ( !( $this->_Send ( $fp, $req, $len+8 ) ) || + !( $response = $this->_GetResponse ( $fp, VER_COMMAND_SEARCH ) ) ) + { + $this->_MBPop (); + return false; + } + + // query sent ok; we can reset reqs now + $this->_reqs = array (); + + // parse and return response + return $this->_ParseSearchResponse ( $response, $nreqs ); + } + + /// parse and return search query (or queries) response + function _ParseSearchResponse ( $response, $nreqs ) + { + $p = 0; // current position + $max = strlen($response); // max position for checks, to protect against broken responses + + $results = array (); + for ( $ires=0; $ires<$nreqs && $p<$max; $ires++ ) + { + $results[] = array(); + $result =& $results[$ires]; + + $result["error"] = ""; + $result["warning"] = ""; + + // extract status + list(,$status) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $result["status"] = $status; + if ( $status!=SEARCHD_OK ) + { + list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $message = substr ( $response, $p, $len ); $p += $len; + + if ( $status==SEARCHD_WARNING ) + { + $result["warning"] = $message; + } else + { + $result["error"] = $message; + continue; + } + } + + // read schema + $fields = array (); + $attrs = array (); + + list(,$nfields) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + while ( $nfields-->0 && $p<$max ) + { + list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $fields[] = substr ( $response, $p, $len ); $p += $len; + } + $result["fields"] = $fields; + + list(,$nattrs) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + while ( $nattrs-->0 && $p<$max ) + { + list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $attr = substr ( $response, $p, $len ); $p += $len; + list(,$type) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $attrs[$attr] = $type; + } + $result["attrs"] = $attrs; + + // read match count + list(,$count) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + list(,$id64) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + + // read matches + $idx = -1; + while ( $count-->0 && $p<$max ) + { + // index into result array + $idx++; + + // parse document id and weight + if ( $id64 ) + { + $doc = sphUnpackU64 ( substr ( $response, $p, 8 ) ); $p += 8; + list(,$weight) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + } + else + { + list ( $doc, $weight ) = array_values ( unpack ( "N*N*", + substr ( $response, $p, 8 ) ) ); + $p += 8; + $doc = sphFixUint($doc); + } + $weight = sprintf ( "%u", $weight ); + + // create match entry + if ( $this->_arrayresult ) + $result["matches"][$idx] = array ( "id"=>$doc, "weight"=>$weight ); + else + $result["matches"][$doc]["weight"] = $weight; + + // parse and create attributes + $attrvals = array (); + foreach ( $attrs as $attr=>$type ) + { + // handle 64bit ints + if ( $type==SPH_ATTR_BIGINT ) + { + $attrvals[$attr] = sphUnpackI64 ( substr ( $response, $p, 8 ) ); $p += 8; + continue; + } + + // handle floats + if ( $type==SPH_ATTR_FLOAT ) + { + list(,$uval) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + list(,$fval) = unpack ( "f*", pack ( "L", $uval ) ); + $attrvals[$attr] = $fval; + continue; + } + + // handle everything else as unsigned ints + list(,$val) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + if ( $type & SPH_ATTR_MULTI ) + { + $attrvals[$attr] = array (); + $nvalues = $val; + while ( $nvalues-->0 && $p<$max ) + { + list(,$val) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $attrvals[$attr][] = sphFixUint($val); + } + } else + { + $attrvals[$attr] = sphFixUint($val); + } + } + + if ( $this->_arrayresult ) + $result["matches"][$idx]["attrs"] = $attrvals; + else + $result["matches"][$doc]["attrs"] = $attrvals; + } + + list ( $total, $total_found, $msecs, $words ) = + array_values ( unpack ( "N*N*N*N*", substr ( $response, $p, 16 ) ) ); + $result["total"] = sprintf ( "%u", $total ); + $result["total_found"] = sprintf ( "%u", $total_found ); + $result["time"] = sprintf ( "%.3f", $msecs/1000 ); + $p += 16; + + while ( $words-->0 && $p<$max ) + { + list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $word = substr ( $response, $p, $len ); $p += $len; + list ( $docs, $hits ) = array_values ( unpack ( "N*N*", substr ( $response, $p, 8 ) ) ); $p += 8; + $result["words"][$word] = array ( + "docs"=>sprintf ( "%u", $docs ), + "hits"=>sprintf ( "%u", $hits ) ); + } + } + + $this->_MBPop (); + return $results; + } + + ///////////////////////////////////////////////////////////////////////////// + // excerpts generation + ///////////////////////////////////////////////////////////////////////////// + + /// connect to searchd server, and generate exceprts (snippets) + /// of given documents for given query. returns false on failure, + /// an array of snippets on success + function BuildExcerpts ( $docs, $index, $words, $opts=array() ) + { + assert ( is_array($docs) ); + assert ( is_string($index) ); + assert ( is_string($words) ); + assert ( is_array($opts) ); + + $this->_MBPush (); + + if (!( $fp = $this->_Connect() )) + { + $this->_MBPop(); + return false; + } + + ///////////////// + // fixup options + ///////////////// + + if ( !isset($opts["before_match"]) ) $opts["before_match"] = ""; + if ( !isset($opts["after_match"]) ) $opts["after_match"] = ""; + if ( !isset($opts["chunk_separator"]) ) $opts["chunk_separator"] = " ... "; + if ( !isset($opts["limit"]) ) $opts["limit"] = 256; + if ( !isset($opts["around"]) ) $opts["around"] = 5; + if ( !isset($opts["exact_phrase"]) ) $opts["exact_phrase"] = false; + if ( !isset($opts["single_passage"]) ) $opts["single_passage"] = false; + if ( !isset($opts["use_boundaries"]) ) $opts["use_boundaries"] = false; + if ( !isset($opts["weight_order"]) ) $opts["weight_order"] = false; + + ///////////////// + // build request + ///////////////// + + // v.1.0 req + $flags = 1; // remove spaces + if ( $opts["exact_phrase"] ) $flags |= 2; + if ( $opts["single_passage"] ) $flags |= 4; + if ( $opts["use_boundaries"] ) $flags |= 8; + if ( $opts["weight_order"] ) $flags |= 16; + $req = pack ( "NN", 0, $flags ); // mode=0, flags=$flags + $req .= pack ( "N", strlen($index) ) . $index; // req index + $req .= pack ( "N", strlen($words) ) . $words; // req words + + // options + $req .= pack ( "N", strlen($opts["before_match"]) ) . $opts["before_match"]; + $req .= pack ( "N", strlen($opts["after_match"]) ) . $opts["after_match"]; + $req .= pack ( "N", strlen($opts["chunk_separator"]) ) . $opts["chunk_separator"]; + $req .= pack ( "N", (int)$opts["limit"] ); + $req .= pack ( "N", (int)$opts["around"] ); + + // documents + $req .= pack ( "N", count($docs) ); + foreach ( $docs as $doc ) + { + assert ( is_string($doc) ); + $req .= pack ( "N", strlen($doc) ) . $doc; + } + + //////////////////////////// + // send query, get response + //////////////////////////// + + $len = strlen($req); + $req = pack ( "nnN", SEARCHD_COMMAND_EXCERPT, VER_COMMAND_EXCERPT, $len ) . $req; // add header + if ( !( $this->_Send ( $fp, $req, $len+8 ) ) || + !( $response = $this->_GetResponse ( $fp, VER_COMMAND_EXCERPT ) ) ) + { + $this->_MBPop (); + return false; + } + + ////////////////// + // parse response + ////////////////// + + $pos = 0; + $res = array (); + $rlen = strlen($response); + for ( $i=0; $i $rlen ) + { + $this->_error = "incomplete reply"; + $this->_MBPop (); + return false; + } + $res[] = $len ? substr ( $response, $pos, $len ) : ""; + $pos += $len; + } + + $this->_MBPop (); + return $res; + } + + + ///////////////////////////////////////////////////////////////////////////// + // keyword generation + ///////////////////////////////////////////////////////////////////////////// + + /// connect to searchd server, and generate keyword list for a given query + /// returns false on failure, + /// an array of words on success + function BuildKeywords ( $query, $index, $hits ) + { + assert ( is_string($query) ); + assert ( is_string($index) ); + assert ( is_bool($hits) ); + + $this->_MBPush (); + + if (!( $fp = $this->_Connect() )) + { + $this->_MBPop(); + return false; + } + + ///////////////// + // build request + ///////////////// + + // v.1.0 req + $req = pack ( "N", strlen($query) ) . $query; // req query + $req .= pack ( "N", strlen($index) ) . $index; // req index + $req .= pack ( "N", (int)$hits ); + + //////////////////////////// + // send query, get response + //////////////////////////// + + $len = strlen($req); + $req = pack ( "nnN", SEARCHD_COMMAND_KEYWORDS, VER_COMMAND_KEYWORDS, $len ) . $req; // add header + if ( !( $this->_Send ( $fp, $req, $len+8 ) ) || + !( $response = $this->_GetResponse ( $fp, VER_COMMAND_KEYWORDS ) ) ) + { + $this->_MBPop (); + return false; + } + + ////////////////// + // parse response + ////////////////// + + $pos = 0; + $res = array (); + $rlen = strlen($response); + list(,$nwords) = unpack ( "N*", substr ( $response, $pos, 4 ) ); + $pos += 4; + for ( $i=0; $i<$nwords; $i++ ) + { + list(,$len) = unpack ( "N*", substr ( $response, $pos, 4 ) ); $pos += 4; + $tokenized = $len ? substr ( $response, $pos, $len ) : ""; + $pos += $len; + + list(,$len) = unpack ( "N*", substr ( $response, $pos, 4 ) ); $pos += 4; + $normalized = $len ? substr ( $response, $pos, $len ) : ""; + $pos += $len; + + $res[] = array ( "tokenized"=>$tokenized, "normalized"=>$normalized ); + + if ( $hits ) + { + list($ndocs,$nhits) = array_values ( unpack ( "N*N*", substr ( $response, $pos, 8 ) ) ); + $pos += 8; + $res [$i]["docs"] = $ndocs; + $res [$i]["hits"] = $nhits; + } + + if ( $pos > $rlen ) + { + $this->_error = "incomplete reply"; + $this->_MBPop (); + return false; + } + } + + $this->_MBPop (); + return $res; + } + + function EscapeString ( $string ) + { + $from = array ( '\\', '(',')','|','-','!','@','~','"','&', '/', '^', '$', '=' ); + $to = array ( '\\\\', '\(','\)','\|','\-','\!','\@','\~','\"', '\&', '\/', '\^', '\$', '\=' ); + + return str_replace ( $from, $to, $string ); + } + + ///////////////////////////////////////////////////////////////////////////// + // attribute updates + ///////////////////////////////////////////////////////////////////////////// + + /// batch update given attributes in given rows in given indexes + /// returns amount of updated documents (0 or more) on success, or -1 on failure + function UpdateAttributes ( $index, $attrs, $values, $mva=false ) + { + // verify everything + assert ( is_string($index) ); + assert ( is_bool($mva) ); + + assert ( is_array($attrs) ); + foreach ( $attrs as $attr ) + assert ( is_string($attr) ); + + assert ( is_array($values) ); + foreach ( $values as $id=>$entry ) + { + assert ( is_numeric($id) ); + assert ( is_array($entry) ); + assert ( count($entry)==count($attrs) ); + foreach ( $entry as $v ) + { + if ( $mva ) + { + assert ( is_array($v) ); + foreach ( $v as $vv ) + assert ( is_int($vv) ); + } else + assert ( is_int($v) ); + } + } + + // build request + $req = pack ( "N", strlen($index) ) . $index; + + $req .= pack ( "N", count($attrs) ); + foreach ( $attrs as $attr ) + { + $req .= pack ( "N", strlen($attr) ) . $attr; + $req .= pack ( "N", $mva ? 1 : 0 ); + } + + $req .= pack ( "N", count($values) ); + foreach ( $values as $id=>$entry ) + { + $req .= sphPackU64 ( $id ); + foreach ( $entry as $v ) + { + $req .= pack ( "N", $mva ? count($v) : $v ); + if ( $mva ) + foreach ( $v as $vv ) + $req .= pack ( "N", $vv ); + } + } + + // connect, send query, get response + if (!( $fp = $this->_Connect() )) + return -1; + + $len = strlen($req); + $req = pack ( "nnN", SEARCHD_COMMAND_UPDATE, VER_COMMAND_UPDATE, $len ) . $req; // add header + if ( !$this->_Send ( $fp, $req, $len+8 ) ) + return -1; + + if (!( $response = $this->_GetResponse ( $fp, VER_COMMAND_UPDATE ) )) + return -1; + + // parse response + list(,$updated) = unpack ( "N*", substr ( $response, 0, 4 ) ); + return $updated; + } + + ///////////////////////////////////////////////////////////////////////////// + // persistent connections + ///////////////////////////////////////////////////////////////////////////// + + function Open() + { + if ( $this->_socket !== false ) + { + $this->_error = 'already connected'; + return false; + } + if ( !$fp = $this->_Connect() ) + return false; + + // command, command version = 0, body length = 4, body = 1 + $req = pack ( "nnNN", SEARCHD_COMMAND_PERSIST, 0, 4, 1 ); + if ( !$this->_Send ( $fp, $req, 12 ) ) + return false; + + $this->_socket = $fp; + return true; + } + + function Close() + { + if ( $this->_socket === false ) + { + $this->_error = 'not connected'; + return false; + } + + fclose ( $this->_socket ); + $this->_socket = false; + + return true; + } + + ////////////////////////////////////////////////////////////////////////// + // status + ////////////////////////////////////////////////////////////////////////// + + function Status () + { + $this->_MBPush (); + if (!( $fp = $this->_Connect() )) + { + $this->_MBPop(); + return false; + } + + $req = pack ( "nnNN", SEARCHD_COMMAND_STATUS, VER_COMMAND_STATUS, 4, 1 ); // len=4, body=1 + if ( !( $this->_Send ( $fp, $req, 12 ) ) || + !( $response = $this->_GetResponse ( $fp, VER_COMMAND_STATUS ) ) ) + { + $this->_MBPop (); + return false; + } + + $res = substr ( $response, 4 ); // just ignore length, error handling, etc + $p = 0; + list ( $rows, $cols ) = array_values ( unpack ( "N*N*", substr ( $response, $p, 8 ) ) ); $p += 8; + + $res = array(); + for ( $i=0; $i<$rows; $i++ ) + for ( $j=0; $j<$cols; $j++ ) + { + list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $res[$i][] = substr ( $response, $p, $len ); $p += $len; + } + + $this->_MBPop (); + return $res; + } +} + +// +// $Id: sphinxapi.php 2055 2009-11-06 23:09:58Z shodan $ +// diff --git a/ssi_examples.php b/ssi_examples.php new file mode 100644 index 0000000..b652178 --- /dev/null +++ b/ssi_examples.php @@ -0,0 +1,185 @@ + + + + << :: SMF SSI.php 1.0 :: >> + '; + + if ($context['browser']['needs_size_fix']) + echo ' + '; + +?> + + +

            SMF SSI.php Functions

            + Current Version 1.0
            +
            + This file is used to demonstrate the capabilities of SSI.php using PHP include functions.
            + The examples show the include tag, then the results of it. Examples are separated by horizontal rules.
            + +
            + +
            + To use SSI.php in your page add at the very top of your page before the <html> tag on line 1:
            +
            + <?php require(""); ?> +
            +
            + +
            + +

            Recent Topics Function: <?php ssi_recentTopics(); ?>

            + + +
            + +

            Recent Posts Function: <?php ssi_recentPosts(); ?>

            + + +
            + +

            Recent Poll Function: <?php ssi_recentPoll(); ?>

            + + +
            + +

            Top Boards Function: <?php ssi_topBoards(); ?>

            + + +
            + +

            Top Topics by View Function: <?php ssi_topTopicsViews(); ?>

            + + +
            + +

            Top Topics by Replies Function: <?php ssi_topTopicsReplies(); ?>

            + + +
            + +

            Top Poll Function: <?php ssi_topPoll(); ?>

            + + +
            + +

            Top Poster Function: <?php ssi_topPoster(); ?>

            + + +
            + +

            Topic's Poll Function: <?php ssi_showPoll($topic); ?>

            + + +
            + +

            Latest Member Function: <?php ssi_latestMember(); ?>

            + + +
            + +

            Board Stats: <?php ssi_boardStats(); ?>

            + + +
            + +

            Who's Online Function: <?php ssi_whosOnline(); ?>

            + + +
            + +

            Log Online Presence + Who's Online Function: <?php ssi_logOnline(); ?>

            + + +
            + +

            Welcome Function: <?php ssi_welcome(); ?>

            + + +
            + +

            News Function: <?php ssi_news(); ?>

            + + +
            + +

            Board News Function: <?php ssi_boardNews(); ?>

            + + +
            + +

            Menubar Function: <?php ssi_menubar(); ?>

            + + +
            + +

            Quick Search Function: <?php ssi_quickSearch(); ?>

            + + +
            + +

            Login Function: <?php ssi_login(); ?>

            + + +
            + +

            Log Out Function: <?php ssi_logout(); ?>

            + + +
            + +

            Today's Birthdays Function: <?php ssi_todaysBirthdays(); ?>

            + + +
            + +

            Today's Holidays Function: <?php ssi_todaysHolidays(); ?>

            + + +
            + +

            Today's Events Function: <?php ssi_todaysEvents(); ?>

            + + +
            + +

            Today's Calendar Function: <?php ssi_todaysCalendar(); ?>

            + + +
            + +

            Recent Calendar Events Function: <?php ssi_recentEvents(); ?>

            + + +
            + +

            Some notes on usage

            + All the functions have an output method parameter. This can either be "echo" (the default) or "array".
            + If it is "echo", the function will act normally - otherwise, it will return an array containing information about the requested task.
            + For example, it might return a list of topics for ssi_recentTopics.
            +
            + This functionality can be used to allow you to present the information in any way you wish. + +
            + +
            +
            + + '; + ?> + *ssi_examples.php last modified on + + + \ No newline at end of file diff --git a/ssi_examples.shtml b/ssi_examples.shtml new file mode 100644 index 0000000..3231818 --- /dev/null +++ b/ssi_examples.shtml @@ -0,0 +1,147 @@ + + + + << :: SMF SSI.php 1.0 :: >> + + +

            SMF SSI.php Functions

            + Current Version 1.0
            +
            + This file is used to demonstrate the capabilities of SSI.php using SHTML include functions.
            + The examples the include tag, then the results of it. Examples are separated by horizontal rules.
            + +
            + +

            Recent Topics Function: <!--#include virtual="./SSI.php?ssi_function=recentTopics" -->

            + + +
            + +

            Recent Posts Function: <!--#include virtual="./SSI.php?ssi_function=recentPosts" -->

            + + +
            + +

            Recent Poll Function: <!--#include virtual="./SSI.php?ssi_function=recentPoll" -->

            + + +
            + +

            Top Boards Function: <!--#include virtual="./SSI.php?ssi_function=topBoards" -->

            + + +
            + +

            Top Topics by View Function: <!--#include virtual="./SSI.php?ssi_function=topTopicsViews" -->

            + + +
            + +

            Top Topics by Replies Function: <!--#include virtual="./SSI.php?ssi_function=topTopicsReplies" -->

            + + +
            + +

            Top Poll Function: <!--#include virtual="./SSI.php?ssi_function=topPoll" -->

            + + +
            + +

            Top Poster Function: <!--#include virtual="./SSI.php?ssi_function=topPoster" -->

            + + +
            + +

            Topic's Poll Function: <!--#include virtual="./SSI.php?ssi_function=showPoll;ssi_topic=##" -->

            + + +
            + +

            Latest Member Function: <!--#include virtual="./SSI.php?ssi_function=latestMember" -->

            + + +
            + +

            Board Stats: <!--#include virtual="./SSI.php?ssi_function=boardStats" -->

            + + +
            + +

            Who's Online Function: <!--#include virtual="./SSI.php?ssi_function=whosOnline" -->

            + + +
            + +

            Log Online Presence + Who's Online Function: <!--#include virtual="./SSI.php?ssi_function=logOnline" -->

            + + +
            + +

            Welcome Function: <!--#include virtual="./SSI.php?ssi_function=welcome" -->

            + + +
            + +

            News Function: <!--#include virtual="./SSI.php?ssi_function=news" -->

            + + +
            + +

            Board News Function: <!--#include virtual="./SSI.php?ssi_function=boardNews" -->

            + + +
            + +

            Menubar Function: <!--#include virtual="./SSI.php?ssi_function=menubar" -->

            + + +
            + +

            Quick Search Function: <!--#include virtual="./SSI.php?ssi_function=quickSearch" -->

            + + +
            + +

            Login Function: <!--#include virtual="./SSI.php?ssi_function=login" -->

            + + +
            + +

            Log Out Function: <!--#include virtual="./SSI.php?ssi_function=logout" -->

            + + +
            + +

            Today's Birthdays Function: <!--#include virtual="./SSI.php?ssi_function=todaysBirthdays" -->

            + + +
            + +

            Today's Holidays Function: <!--#include virtual="./SSI.php?ssi_function=todaysHolidays" -->

            + + +
            + +

            Today's Events Function: <!--#include virtual="./SSI.php?ssi_function=todaysEvents" -->

            + + +
            + +

            Today's Calendar Function: <!--#include virtual="./SSI.php?ssi_function=todaysCalendar" -->

            + + +
            + +

            Recent Calendar Events Function: <!--#include virtual="./SSI.php?ssi_function=recentEvents" -->

            + + +
            + +
            +
            + + *ssi_examples.shtml last modified on + + + + \ No newline at end of file diff --git a/test.html b/test.html new file mode 100644 index 0000000..f2f88ca --- /dev/null +++ b/test.html @@ -0,0 +1,1641 @@ + + + + + + + + + + + + + + + + Как вы начинаете свое утро? + + + + + + + + + + + + + + + + +
            + +
            + + + + + + + + + +
            + На главную страница форума + + Главная - Новости - Тексты песен - Рецензии - Чат - Mp3 - Хостинг для картинок - Блог
            + +
            + +
            +
            +
            +
            + + +
            + Привет, rusty_angel, личных сообщений 1094 всего , 0 новых. +
            Общее время нахождения на форуме: 86 дн, 4 ч. и 49 мин.
            + Показать непрочитанные сообщения с последнего посещения.
            + Показать новые ответы на ваши сообщения.
            + + 11 Февраль 2010, 00:09:14 +
            +
            + +
            + Поиск:   +   + Расширенный поиск + + +
            + +
            + + * + Начало + Помощь + Поиск + Админ + Редактировать профиль + Календарь + Выйти + +
            + + ', + 'after' => '', + 'require_parents' => array('table'), + 'require_children' => array('td'), + 'trim' => 'both', + 'block_level' => true, + 'disabled_before' => '', + 'disabled_after' => '', + ), + array( + 'tag' => 'td', + 'before' => '', + 'require_parents' => array('tr'), + 'trim' => 'outside', + 'block_level' => true, + 'disabled_before' => '', + 'disabled_after' => '', + ), + array( + 'tag' => 'url', + 'type' => 'unparsed_content', + 'content' => '$1', + 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'
            \' => \'\'));'), + ), + array( + 'tag' => 'url', + 'type' => 'unparsed_equals', + 'before' => '', + 'after' => '', + 'disallow_children' => array('email', 'ftp', 'url', 'iurl'), + 'disabled_after' => ' ($1)', + ), + array( + 'tag' => 'u', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'white', + 'before' => '', + 'after' => '', + ), + ); + + // This is mainly for the bbc manager, so it's easy to add tags above. Custom BBC should be added above this line. + if ($message === false) + return $codes; + + // So the parser won't skip them. + $itemcodes = array( + '*' => '', + '@' => 'disc', + '+' => 'square', + 'x' => 'square', + '#' => 'square', + 'o' => 'circle', + 'O' => 'circle', + '0' => 'circle', + ); + if (!isset($disabled['li']) && !isset($disabled['list'])) + { + foreach ($itemcodes as $c => $dummy) + $bbc_codes[$c] = array(); + } + + // Inside these tags autolink is not recommendable. + $no_autolink_tags = array( + 'url', + 'iurl', + 'ftp', + 'email', + ); + + // Shhhh! + if (!isset($disabled['color'])) + { + $codes[] = array( + 'tag' => 'chrissy', + 'before' => '', + 'after' => ' :-*', + ); + $codes[] = array( + 'tag' => 'kissy', + 'before' => '', + 'after' => ' :-*', + ); + } + + foreach ($codes as $c) + $bbc_codes[substr($c['tag'], 0, 1)][] = $c; + $codes = null; + } + + // Shall we take the time to cache this? + if ($cache_id != '' && !empty($modSettings['cache_enable']) && (($modSettings['cache_enable'] >= 2 && strlen($message) > 1000) || strlen($message) > 2400)) + { + // It's likely this will change if the message is modified. + $cache_key = 'parse:' . $cache_id . '-' . md5(md5($message) . '-' . $smileys . (empty($disabled) ? '' : implode(',', array_keys($disabled))) . serialize($context['browser']) . $txt['lang_locale'] . $user_info['time_offset'] . $user_info['time_format']); + + if (($temp = cache_get_data($cache_key, 240)) != null) + return $temp; + + $cache_t = microtime(); + } + + if ($smileys === 'print') + { + // [glow], [shadow], and [move] can't really be printed. + $disabled['glow'] = true; + $disabled['shadow'] = true; + $disabled['move'] = true; + + // Colors can't well be displayed... supposed to be black and white. + $disabled['color'] = true; + $disabled['black'] = true; + $disabled['blue'] = true; + $disabled['white'] = true; + $disabled['red'] = true; + $disabled['green'] = true; + $disabled['me'] = true; + + // Color coding doesn't make sense. + $disabled['php'] = true; + + // Links are useless on paper... just show the link. + $disabled['ftp'] = true; + $disabled['url'] = true; + $disabled['iurl'] = true; + $disabled['email'] = true; + $disabled['flash'] = true; + + // !!! Change maybe? + if (!isset($_GET['images'])) + $disabled['img'] = true; + + // !!! Interface/setting to add more? + } + + $open_tags = array(); + $message = strtr($message, array("\n" => '
            ')); + + // The non-breaking-space looks a bit different each time. + $non_breaking_space = $context['utf8'] ? ($context['server']['complex_preg_chars'] ? '\x{C2A0}' : chr(0xC2) . chr(0xA0)) : '\xA0'; + + $pos = -1; + while ($pos !== false) + { + $last_pos = isset($last_pos) ? max($pos, $last_pos) : $pos; + $pos = strpos($message, '[', $pos + 1); + + // Failsafe. + if ($pos === false || $last_pos > $pos) + $pos = strlen($message) + 1; + + // Can't have a one letter smiley, URL, or email! (sorry.) + if ($last_pos < $pos - 1) + { + // We want to eat one less, and one more, character (for smileys.) + $last_pos = max($last_pos - 1, 0); + $data = substr($message, $last_pos, $pos - $last_pos + 1); + + // Take care of some HTML! + if (!empty($modSettings['enablePostHTML']) && strpos($data, '<') !== false) + { + $data = preg_replace('~<a\s+href=(?:")?((?:http://|ftp://|https://|ftps://|mailto:).+?)(?:")?>~i', '[url=$1]', $data); + $data = preg_replace('~</a>~i', '[/url]', $data); + + //
            should be empty. + $empty_tags = array('br', 'hr'); + foreach ($empty_tags as $tag) + $data = str_replace(array('<' . $tag . '>', '<' . $tag . '/>', '<' . $tag . ' />'), '[' . $tag . ' /]', $data); + + // b, u, i, s, pre... basic tags. + $closable_tags = array('b', 'u', 'i', 's', 'em', 'ins', 'del', 'pre', 'blockquote'); + foreach ($closable_tags as $tag) + { + $diff = substr_count($data, '<' . $tag . '>') - substr_count($data, '</' . $tag . '>'); + $data = strtr($data, array('<' . $tag . '>' => '<' . $tag . '>', '</' . $tag . '>' => '')); + + if ($diff > 0) + $data .= str_repeat('', $diff); + } + + // Do - with security... action= -> action-. + preg_match_all('~<img\s+src=(?:")?((?:http://|ftp://|https://|ftps://).+?)(?:")?(?:\s+alt=(?:")?(.*?)(?:")?)?(?:\s?/)?>~i', $data, $matches, PREG_PATTERN_ORDER); + if (!empty($matches[0])) + { + $replaces = array(); + foreach ($matches[1] as $match => $imgtag) + { + // No alt? + if (!isset($matches[2][$match])) + $matches[2][$match] = ''; + + // Remove action= from the URL - no funny business, now. + if (preg_match('~action(=|%3d)(?!dlattach)~i', $imgtag) != 0) + $imgtag = preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag); + + // Check if the image is larger than allowed. + if (!empty($modSettings['max_image_width']) && !empty($modSettings['max_image_height'])) + { + list ($width, $height) = url_image_size($imgtag); + + if (!empty($modSettings['max_image_width']) && $width > $modSettings['max_image_width']) + { + $height = (int) (($modSettings['max_image_width'] * $height) / $width); + $width = $modSettings['max_image_width']; + } + + if (!empty($modSettings['max_image_height']) && $height > $modSettings['max_image_height']) + { + $width = (int) (($modSettings['max_image_height'] * $width) / $height); + $height = $modSettings['max_image_height']; + } + + // Set the new image tag. + $replaces[$matches[0][$match]] = '' . $matches[2][$match] . ''; + } + else + $replaces[$matches[0][$match]] = '' . $matches[2][$match] . ''; + } + + $data = strtr($data, $replaces); + } + } + + if (!empty($modSettings['autoLinkUrls'])) + { + // Are we inside tags that should be auto linked? + $no_autolink_area = false; + if (!empty($open_tags)) + { + foreach ($open_tags as $open_tag) + if (in_array($open_tag['tag'], $no_autolink_tags)) + $no_autolink_area = true; + } + + // Don't go backwards. + //!!! Don't think is the real solution.... + $lastAutoPos = isset($lastAutoPos) ? $lastAutoPos : 0; + if ($pos < $lastAutoPos) + $no_autolink_area = true; + $lastAutoPos = $pos; + + if (!$no_autolink_area) + { + // Parse any URLs.... have to get rid of the @ problems some things cause... stupid email addresses. + if (!isset($disabled['url']) && (strpos($data, '://') !== false || strpos($data, 'www.') !== false)) + { + // Switch out quotes really quick because they can cause problems. + $data = strtr($data, array(''' => '\'', ' ' => $context['utf8'] ? "\xC2\xA0" : "\xA0", '"' => '>">', '"' => '<"<', '<' => '\.(;\'"]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i', '~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'), array('[url]$1[/url]', '[url=http://$1]$1[/url]'), $data); + $data = strtr($data, array('\'' => ''', $context['utf8'] ? "\xC2\xA0" : "\xA0" => ' ', '>">' => '"', '<"<' => '"', ' '<')); + } + + // Next, emails... + if (!isset($disabled['email']) && strpos($data, '@') !== false) + { + $data = preg_replace('~(?<=[\?\s' . $non_breaking_space . '\[\]()*\\\;>]|^)([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?,\s' . $non_breaking_space . '\[\]()*\\\]|$|
            | |>|<|"|'|\.(?:\.|;| |\s|$|
            ))~' . ($context['utf8'] ? 'u' : ''), '[email]$1[/email]', $data); + $data = preg_replace('~(?<=
            )([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?\.,;\s' . $non_breaking_space . '\[\]()*\\\]|$|
            | |>|<|"|')~' . ($context['utf8'] ? 'u' : ''), '[email]$1[/email]', $data); + } + } + } + + $data = strtr($data, array("\t" => '   ')); + + if (!empty($modSettings['fixLongWords']) && $modSettings['fixLongWords'] > 5) + { + // This is SADLY and INCREDIBLY browser dependent. + if ($context['browser']['is_gecko'] || $context['browser']['is_konqueror']) + $breaker = ' '; + // Opera... + elseif ($context['browser']['is_opera']) + $breaker = ' '; + // Internet Explorer... + else + $breaker = ' '; + + // PCRE will not be happy if we don't give it a short. + $modSettings['fixLongWords'] = (int) min(65535, $modSettings['fixLongWords']); + + // The idea is, find words xx long, and then replace them with xx + space + more. + if (strlen($data) > $modSettings['fixLongWords']) + { + // This is done in a roundabout way because $breaker has "long words" :P. + $data = strtr($data, array($breaker => '< >', ' ' => $context['utf8'] ? "\xC2\xA0" : "\xA0")); + $data = preg_replace( + '~(?<=[>;:!? ' . $non_breaking_space . '\]()]|^)([\w\.]{' . $modSettings['fixLongWords'] . ',})~e' . ($context['utf8'] ? 'u' : ''), + "preg_replace('/(.{" . ($modSettings['fixLongWords'] - 1) . '})/' . ($context['utf8'] ? 'u' : '') . "', '\\\$1< >', '\$1')", + $data); + $data = strtr($data, array('< >' => $breaker, $context['utf8'] ? "\xC2\xA0" : "\xA0" => ' ')); + } + } + + // Do any smileys! + if ($smileys === true) + parsesmileys($data); + + // If it wasn't changed, no copying or other boring stuff has to happen! + if ($data != substr($message, $last_pos, $pos - $last_pos + 1)) + { + $message = substr($message, 0, $last_pos) . $data . substr($message, $pos + 1); + + // Since we changed it, look again incase we added or removed a tag. But we don't want to skip any. + $old_pos = strlen($data) + $last_pos - 1; + $pos = strpos($message, '[', $last_pos); + $pos = $pos === false ? $old_pos : min($pos, $old_pos); + } + } + + // Are we there yet? Are we there yet? + if ($pos >= strlen($message) - 1) + break; + + $tags = strtolower(substr($message, $pos + 1, 1)); + + if ($tags == '/' && !empty($open_tags)) + { + $pos2 = strpos($message, ']', $pos + 1); + if ($pos2 == $pos + 2) + continue; + $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); + + $to_close = array(); + $block_level = null; + do + { + $tag = array_pop($open_tags); + if (!$tag) + break; + + if (!empty($tag['block_level'])) + { + // Only find out if we need to. + if ($block_level === false) + { + array_push($open_tags, $tag); + break; + } + + // The idea is, if we are LOOKING for a block level tag, we can close them on the way. + if (strlen($look_for) > 0 && isset($bbc_codes[$look_for{0}])) + { + foreach ($bbc_codes[$look_for{0}] as $temp) + if ($temp['tag'] == $look_for) + { + $block_level = !empty($temp['block_level']); + break; + } + } + + if ($block_level !== true) + { + $block_level = false; + array_push($open_tags, $tag); + break; + } + } + + $to_close[] = $tag; + } + while ($tag['tag'] != $look_for); + + // Did we just eat through everything and not find it? + if ((empty($open_tags) && (empty($tag) || $tag['tag'] != $look_for))) + { + $open_tags = $to_close; + continue; + } + elseif (!empty($to_close) && $tag['tag'] != $look_for) + { + if ($block_level === null && isset($look_for{0}, $bbc_codes[$look_for{0}])) + { + foreach ($bbc_codes[$look_for{0}] as $temp) + if ($temp['tag'] == $look_for) + { + $block_level = !empty($temp['block_level']); + break; + } + } + + // We're not looking for a block level tag (or maybe even a tag that exists...) + if (!$block_level) + { + foreach ($to_close as $tag) + array_push($open_tags, $tag); + continue; + } + } + + foreach ($to_close as $tag) + { + $message = substr($message, 0, $pos) . $tag['after'] . substr($message, $pos2 + 1); + $pos += strlen($tag['after']); + $pos2 = $pos - 1; + + // See the comment at the end of the big loop - just eating whitespace ;). + if (!empty($tag['block_level']) && substr($message, $pos, 6) == '
            ') + $message = substr($message, 0, $pos) . substr($message, $pos + 6); + if (!empty($tag['trim']) && $tag['trim'] != 'inside' && preg_match('~(
            | |\s)*~', substr($message, $pos), $matches) != 0) + $message = substr($message, 0, $pos) . substr($message, $pos + strlen($matches[0])); + } + + if (!empty($to_close)) + { + $to_close = array(); + $pos--; + } + + continue; + } + + // No tags for this character, so just keep going (fastest possible course.) + if (!isset($bbc_codes[$tags])) + continue; + + $inside = empty($open_tags) ? null : $open_tags[count($open_tags) - 1]; + $tag = null; + foreach ($bbc_codes[$tags] as $possible) + { + // Not a match? + if (strtolower(substr($message, $pos + 1, strlen($possible['tag']))) != $possible['tag']) + continue; + + $next_c = substr($message, $pos + 1 + strlen($possible['tag']), 1); + + // A test validation? + if (isset($possible['test']) && preg_match('~^' . $possible['test'] . '~', substr($message, $pos + 1 + strlen($possible['tag']) + 1)) == 0) + continue; + // Do we want parameters? + elseif (!empty($possible['parameters'])) + { + if ($next_c != ' ') + continue; + } + elseif (isset($possible['type'])) + { + // Do we need an equal sign? + if (in_array($possible['type'], array('unparsed_equals', 'unparsed_commas', 'unparsed_commas_content', 'unparsed_equals_content', 'parsed_equals')) && $next_c != '=') + continue; + // Maybe we just want a /... + if ($possible['type'] == 'closed' && $next_c != ']' && substr($message, $pos + 1 + strlen($possible['tag']), 2) != '/]' && substr($message, $pos + 1 + strlen($possible['tag']), 3) != ' /]') + continue; + // An immediate ]? + if ($possible['type'] == 'unparsed_content' && $next_c != ']') + continue; + } + // No type means 'parsed_content', which demands an immediate ] without parameters! + elseif ($next_c != ']') + continue; + + // Check allowed tree? + if (isset($possible['require_parents']) && ($inside === null || !in_array($inside['tag'], $possible['require_parents']))) + continue; + elseif (isset($inside['require_children']) && !in_array($possible['tag'], $inside['require_children'])) + continue; + // If this is in the list of disallowed child tags, don't parse it. + elseif (isset($inside['disallow_children']) && in_array($possible['tag'], $inside['disallow_children'])) + continue; + + $pos1 = $pos + 1 + strlen($possible['tag']) + 1; + + // This is long, but it makes things much easier and cleaner. + if (!empty($possible['parameters'])) + { + $preg = array(); + foreach ($possible['parameters'] as $p => $info) + $preg[] = '(\s+' . $p . '=' . (empty($info['quoted']) ? '' : '"') . (isset($info['match']) ? $info['match'] : '(.+?)') . (empty($info['quoted']) ? '' : '"') . ')' . (empty($info['optional']) ? '' : '?'); + + // Okay, this may look ugly and it is, but it's not going to happen much and it is the best way of allowing any order of parameters but still parsing them right. + $match = false; + $orders = permute($preg); + foreach ($orders as $p) + if (preg_match('~^' . implode('', $p) . '\]~i', substr($message, $pos1 - 1), $matches) != 0) + { + $match = true; + break; + } + + // Didn't match our parameter list, try the next possible. + if (!$match) + continue; + + $params = array(); + for ($i = 1, $n = count($matches); $i < $n; $i += 2) + { + $key = strtok(ltrim($matches[$i]), '='); + if (isset($possible['parameters'][$key]['value'])) + $params['{' . $key . '}'] = strtr($possible['parameters'][$key]['value'], array('$1' => $matches[$i + 1])); + elseif (isset($possible['parameters'][$key]['validate'])) + $params['{' . $key . '}'] = $possible['parameters'][$key]['validate']($matches[$i + 1]); + else + $params['{' . $key . '}'] = $matches[$i + 1]; + + // Just to make sure: replace any $ or { so they can't interpolate wrongly. + $params['{' . $key . '}'] = strtr($params['{' . $key . '}'], array('$' => '$', '{' => '{')); + } + + foreach ($possible['parameters'] as $p => $info) + { + if (!isset($params['{' . $p . '}'])) + $params['{' . $p . '}'] = ''; + } + + $tag = $possible; + + // Put the parameters into the string. + if (isset($tag['before'])) + $tag['before'] = strtr($tag['before'], $params); + if (isset($tag['after'])) + $tag['after'] = strtr($tag['after'], $params); + if (isset($tag['content'])) + $tag['content'] = strtr($tag['content'], $params); + + $pos1 += strlen($matches[0]) - 1; + } + else + $tag = $possible; + break; + } + + // Item codes are complicated buggers... they are implicit [li]s and can make [list]s! + if ($smileys !== false && $tag === null && isset($itemcodes[substr($message, $pos + 1, 1)]) && substr($message, $pos + 2, 1) == ']' && !isset($disabled['list']) && !isset($disabled['li'])) + { + if (substr($message, $pos + 1, 1) == '0' && !in_array(substr($message, $pos - 1, 1), array(';', ' ', "\t", '>'))) + continue; + $tag = $itemcodes[substr($message, $pos + 1, 1)]; + + // First let's set up the tree: it needs to be in a list, or after an li. + if ($inside === null || ($inside['tag'] != 'list' && $inside['tag'] != 'li')) + { + $open_tags[] = array( + 'tag' => 'list', + 'after' => '', + 'block_level' => true, + 'require_children' => array('li'), + 'disallow_children' => isset($inside['disallow_children']) ? $inside['disallow_children'] : null, + ); + $code = '
              '; + } + // We're in a list item already: another itemcode? Close it first. + elseif ($inside['tag'] == 'li') + { + array_pop($open_tags); + $code = ''; + } + else + $code = ''; + + // Now we open a new tag. + $open_tags[] = array( + 'tag' => 'li', + 'after' => '', + 'trim' => 'outside', + 'block_level' => true, + 'disallow_children' => isset($inside['disallow_children']) ? $inside['disallow_children'] : null, + ); + + // First, open the tag... + $code .= ''; + $message = substr($message, 0, $pos) . $code . substr($message, $pos + 3); + $pos += strlen($code) - 1; + + // Next, find the next break (if any.) If there's more itemcode after it, keep it going - otherwise close! + $pos2 = strpos($message, '
              ', $pos); + $pos3 = strpos($message, '[/', $pos); + if ($pos2 !== false && ($pos2 <= $pos3 || $pos3 === false)) + { + preg_match('~^(
              | |\s|\[)+~', substr($message, $pos2 + 6), $matches); + $message = substr($message, 0, $pos2) . (!empty($matches[0]) && substr($matches[0], -1) == '[' ? '[/li]' : '[/li][/list]') . substr($message, $pos2); + + $open_tags[count($open_tags) - 2]['after'] = '
            '; + } + // Tell the [list] that it needs to close specially. + else + { + // Move the li over, because we're not sure what we'll hit. + $open_tags[count($open_tags) - 1]['after'] = ''; + $open_tags[count($open_tags) - 2]['after'] = ''; + } + + continue; + } + + // Implicitly close lists and tables if something other than what's required is in them. This is needed for itemcode. + if ($tag === null && $inside !== null && !empty($inside['require_children'])) + { + array_pop($open_tags); + + $message = substr($message, 0, $pos) . $inside['after'] . substr($message, $pos); + $pos += strlen($inside['after']) - 1; + } + + // No tag? Keep looking, then. Silly people using brackets without actual tags. + if ($tag === null) + continue; + + // Propagate the list to the child (so wrapping the disallowed tag won't work either.) + if (isset($inside['disallow_children'])) + $tag['disallow_children'] = isset($tag['disallow_children']) ? array_unique(array_merge($tag['disallow_children'], $inside['disallow_children'])) : $inside['disallow_children']; + + // Is this tag disabled? + if (isset($disabled[$tag['tag']])) + { + if (!isset($tag['disabled_before']) && !isset($tag['disabled_after']) && !isset($tag['disabled_content'])) + { + $tag['before'] = !empty($tag['block_level']) ? '
            ' : ''; + $tag['after'] = !empty($tag['block_level']) ? '
            ' : ''; + $tag['content'] = isset($tag['type']) && $tag['type'] == 'closed' ? '' : (!empty($tag['block_level']) ? '
            $1
            ' : '$1'); + } + elseif (isset($tag['disabled_before']) || isset($tag['disabled_after'])) + { + $tag['before'] = isset($tag['disabled_before']) ? $tag['disabled_before'] : (!empty($tag['block_level']) ? '
            ' : ''); + $tag['after'] = isset($tag['disabled_after']) ? $tag['disabled_after'] : (!empty($tag['block_level']) ? '
            ' : ''); + } + else + $tag['content'] = $tag['disabled_content']; + } + + // The only special case is 'html', which doesn't need to close things. + if (!empty($tag['block_level']) && $tag['tag'] != 'html' && empty($inside['block_level'])) + { + $n = count($open_tags) - 1; + while (empty($open_tags[$n]['block_level']) && $n >= 0) + $n--; + + // Close all the non block level tags so this tag isn't surrounded by them. + for ($i = count($open_tags) - 1; $i > $n; $i--) + { + $message = substr($message, 0, $pos) . $open_tags[$i]['after'] . substr($message, $pos); + $pos += strlen($open_tags[$i]['after']); + $pos1 += strlen($open_tags[$i]['after']); + + // Trim or eat trailing stuff... see comment at the end of the big loop. + if (!empty($open_tags[$i]['block_level']) && substr($message, $pos, 6) == '
            ') + $message = substr($message, 0, $pos) . substr($message, $pos + 6); + if (!empty($open_tags[$i]['trim']) && $tag['trim'] != 'inside' && preg_match('~(
            | |\s)*~', substr($message, $pos), $matches) != 0) + $message = substr($message, 0, $pos) . substr($message, $pos + strlen($matches[0])); + + array_pop($open_tags); + } + } + + // No type means 'parsed_content'. + if (!isset($tag['type'])) + { + // !!! Check for end tag first, so people can say "I like that [i] tag"? + $open_tags[] = $tag; + $message = substr($message, 0, $pos) . $tag['before'] . substr($message, $pos1); + $pos += strlen($tag['before']) - 1; + } + // Don't parse the content, just skip it. + elseif ($tag['type'] == 'unparsed_content') + { + $pos2 = stripos($message, '[/' . substr($message, $pos + 1, strlen($tag['tag'])) . ']', $pos1); + if ($pos2 === false) + continue; + + $data = substr($message, $pos1, $pos2 - $pos1); + + if (!empty($tag['block_level']) && substr($data, 0, 6) == '
            ') + $data = substr($data, 6); + + if (isset($tag['validate'])) + $tag['validate']($tag, $data, $disabled); + + $code = strtr($tag['content'], array('$1' => $data)); + $message = substr($message, 0, $pos) . $code . substr($message, $pos2 + 3 + strlen($tag['tag'])); + $pos += strlen($code) - 1; + } + // Don't parse the content, just skip it. + elseif ($tag['type'] == 'unparsed_equals_content') + { + // The value may be quoted for some tags - check. + if (isset($tag['quoted'])) + { + $quoted = substr($message, $pos1, 6) == '"'; + if ($tag['quoted'] != 'optional' && !$quoted) + continue; + + if ($quoted) + $pos1 += 6; + } + else + $quoted = false; + + $pos2 = strpos($message, $quoted == false ? ']' : '"]', $pos1); + if ($pos2 === false) + continue; + $pos3 = stripos($message, '[/' . substr($message, $pos + 1, strlen($tag['tag'])) . ']', $pos2); + if ($pos3 === false) + continue; + + $data = array( + substr($message, $pos2 + ($quoted == false ? 1 : 7), $pos3 - ($pos2 + ($quoted == false ? 1 : 7))), + substr($message, $pos1, $pos2 - $pos1) + ); + + if (!empty($tag['block_level']) && substr($data[0], 0, 6) == '
            ') + $data[0] = substr($data[0], 6); + + // Validation for my parking, please! + if (isset($tag['validate'])) + $tag['validate']($tag, $data, $disabled); + + $code = strtr($tag['content'], array('$1' => $data[0], '$2' => $data[1])); + $message = substr($message, 0, $pos) . $code . substr($message, $pos3 + 3 + strlen($tag['tag'])); + $pos += strlen($code) - 1; + } + // A closed tag, with no content or value. + elseif ($tag['type'] == 'closed') + { + $pos2 = strpos($message, ']', $pos); + $message = substr($message, 0, $pos) . $tag['content'] . substr($message, $pos2 + 1); + $pos += strlen($tag['content']) - 1; + } + // This one is sorta ugly... :/. Unforunately, it's needed for flash. + elseif ($tag['type'] == 'unparsed_commas_content') + { + $pos2 = strpos($message, ']', $pos1); + if ($pos2 === false) + continue; + $pos3 = stripos($message, '[/' . substr($message, $pos + 1, strlen($tag['tag'])) . ']', $pos2); + if ($pos3 === false) + continue; + + // We want $1 to be the content, and the rest to be csv. + $data = explode(',', ',' . substr($message, $pos1, $pos2 - $pos1)); + $data[0] = substr($message, $pos2 + 1, $pos3 - $pos2 - 1); + + if (isset($tag['validate'])) + $tag['validate']($tag, $data, $disabled); + + $code = $tag['content']; + foreach ($data as $k => $d) + $code = strtr($code, array('$' . ($k + 1) => trim($d))); + $message = substr($message, 0, $pos) . $code . substr($message, $pos3 + 3 + strlen($tag['tag'])); + $pos += strlen($code) - 1; + } + // This has parsed content, and a csv value which is unparsed. + elseif ($tag['type'] == 'unparsed_commas') + { + $pos2 = strpos($message, ']', $pos1); + if ($pos2 === false) + continue; + + $data = explode(',', substr($message, $pos1, $pos2 - $pos1)); + + if (isset($tag['validate'])) + $tag['validate']($tag, $data, $disabled); + + // Fix after, for disabled code mainly. + foreach ($data as $k => $d) + $tag['after'] = strtr($tag['after'], array('$' . ($k + 1) => trim($d))); + + $open_tags[] = $tag; + + // Replace them out, $1, $2, $3, $4, etc. + $code = $tag['before']; + foreach ($data as $k => $d) + $code = strtr($code, array('$' . ($k + 1) => trim($d))); + $message = substr($message, 0, $pos) . $code . substr($message, $pos2 + 1); + $pos += strlen($code) - 1; + } + // A tag set to a value, parsed or not. + elseif ($tag['type'] == 'unparsed_equals' || $tag['type'] == 'parsed_equals') + { + // The value may be quoted for some tags - check. + if (isset($tag['quoted'])) + { + $quoted = substr($message, $pos1, 6) == '"'; + if ($tag['quoted'] != 'optional' && !$quoted) + continue; + + if ($quoted) + $pos1 += 6; + } + else + $quoted = false; + + $pos2 = strpos($message, $quoted == false ? ']' : '"]', $pos1); + if ($pos2 === false) + continue; + + $data = substr($message, $pos1, $pos2 - $pos1); + + // Validation for my parking, please! + if (isset($tag['validate'])) + $tag['validate']($tag, $data, $disabled); + + // For parsed content, we must recurse to avoid security problems. + if ($tag['type'] != 'unparsed_equals') + $data = parse_bbc($data); + + $tag['after'] = strtr($tag['after'], array('$1' => $data)); + + $open_tags[] = $tag; + + $code = strtr($tag['before'], array('$1' => $data)); + $message = substr($message, 0, $pos) . $code . substr($message, $pos2 + ($quoted == false ? 1 : 7)); + $pos += strlen($code) - 1; + } + + // If this is block level, eat any breaks after it. + if (!empty($tag['block_level']) && substr($message, $pos + 1, 6) == '
            ') + $message = substr($message, 0, $pos + 1) . substr($message, $pos + 7); + + // Are we trimming outside this tag? + if (!empty($tag['trim']) && $tag['trim'] != 'outside' && preg_match('~(
            | |\s)*~', substr($message, $pos + 1), $matches) != 0) + $message = substr($message, 0, $pos + 1) . substr($message, $pos + 1 + strlen($matches[0])); + } + + // Close any remaining tags. + while ($tag = array_pop($open_tags)) + $message .= $tag['after']; + + if (substr($message, 0, 1) == ' ') + $message = ' ' . substr($message, 1); + + // Cleanup whitespace. + $message = strtr($message, array(' ' => '  ', "\r" => '', "\n" => '
            ', '
            ' => '
             ', ' ' => "\n")); + + // Cache the output if it took some time... + if (isset($cache_key, $cache_t) && array_sum(explode(' ', microtime())) - array_sum(explode(' ', $cache_t)) > 0.05) + cache_put_data($cache_key, $message, 240); + + return $message; +} + +// Parse smileys in the passed message. +function parsesmileys(&$message) +{ + global $modSettings, $db_prefix, $txt, $user_info, $context; + static $smileyfromcache = array(), $smileytocache = array(); + + // No smiley set at all?! + if ($user_info['smiley_set'] == 'none') + return; + + // If the smiley array hasn't been set, do it now. + if (empty($smileyfromcache)) + { + // Use the default smileys if it is disabled. (better for "portability" of smileys.) + if (empty($modSettings['smiley_enable'])) + { + $smileysfrom = array('>:D', ':D', '::)', '>:(', ':)', ';)', ';D', ':(', ':o', '8)', ':P', '???', ':-[', ':-X', ':-*', ':\'(', ':-\\', '^-^', 'O0', 'C:-)', '0:)'); + $smileysto = array('evil.gif', 'cheesy.gif', 'rolleyes.gif', 'angry.gif', 'smiley.gif', 'wink.gif', 'grin.gif', 'sad.gif', 'shocked.gif', 'cool.gif', 'tongue.gif', 'huh.gif', 'embarrassed.gif', 'lipsrsealed.gif', 'kiss.gif', 'cry.gif', 'undecided.gif', 'azn.gif', 'afro.gif', 'police.gif', 'angel.gif'); + $smileysdescs = array('', $txt[289], $txt[450], $txt[288], $txt[287], $txt[292], $txt[293], $txt[291], $txt[294], $txt[295], $txt[451], $txt[296], $txt[526], $txt[527], $txt[529], $txt[530], $txt[528], '', '', '', ''); + } + else + { + // Load the smileys in reverse order by length so they don't get parsed wrong. + if (($temp = cache_get_data('parsing_smileys', 480)) == null) + { + $result = db_query(" + SELECT code, filename, description + FROM {$db_prefix}smileys", __FILE__, __LINE__); + $smileysfrom = array(); + $smileysto = array(); + $smileysdescs = array(); + while ($row = mysql_fetch_assoc($result)) + { + $smileysfrom[] = $row['code']; + $smileysto[] = $row['filename']; + $smileysdescs[] = $row['description']; + } + mysql_free_result($result); + + cache_put_data('parsing_smileys', array($smileysfrom, $smileysto, $smileysdescs), 480); + } + else + list ($smileysfrom, $smileysto, $smileysdescs) = $temp; + } + + // The non-breaking-space is a complex thing... + $non_breaking_space = $context['utf8'] ? ($context['server']['complex_preg_chars'] ? '\x{A0}' : pack('C*', 0xC2, 0xA0)) : '\xA0'; + + // This smiley regex makes sure it doesn't parse smileys within code tags (so [url=mailto:David@bla.com] doesn't parse the :D smiley) + for ($i = 0, $n = count($smileysfrom); $i < $n; $i++) + { + $smileyfromcache[] = '/(?<=[>:\?\.\s' . $non_breaking_space . '[\]()*\\\;]|^)(' . preg_quote($smileysfrom[$i], '/') . '|' . preg_quote(htmlspecialchars($smileysfrom[$i], ENT_QUOTES), '/') . ')(?=[^[:alpha:]0-9]|$)/' . ($context['utf8'] ? 'u' : ''); + // Escape a bunch of smiley-related characters in the description so it doesn't get a double dose :P. + $smileytocache[] = '' . strtr(htmlspecialchars($smileysdescs[$i]), array(':' => ':', '(' => '(', ')' => ')', '$' => '$', '[' => '[')) . ''; + } + } + + // Replace away! + // !!! There must be a way to speed this up. + $message = preg_replace($smileyfromcache, $smileytocache, $message); +} + +// Highlight any code... +function highlight_php_code($code) +{ + global $context; + + // Remove special characters. + $code = un_htmlspecialchars(strtr($code, array('
            ' => "\n", "\t" => 'SMF_TAB();', '[' => '['))); + + $oldlevel = error_reporting(0); + + // It's easier in 4.2.x+. + if (@version_compare(PHP_VERSION, '4.2.0') == -1) + { + ob_start(); + @highlight_string($code); + $buffer = str_replace(array("\n", "\r"), '', ob_get_contents()); + ob_end_clean(); + } + else + $buffer = str_replace(array("\n", "\r"), '', @highlight_string($code, true)); + + error_reporting($oldlevel); + + // Yes, I know this is kludging it, but this is the best way to preserve tabs from PHP :P. + $buffer = preg_replace('~SMF_TAB(<(font color|span style)="[^"]*?">)?\(\);~', "
            \t
            ", $buffer); + + return strtr($buffer, array('\'' => ''', '' => '', '' => '')); +} + + +?>DoExport(); +} +else { + $CanWrite = TestWrite(); + ViewForm(array('Supported' => $Supported, 'CanWrite' => $CanWrite)); +} + +/** + * Write out a value passed as bytes to its most readable format. + */ +function FormatMemorySize($Bytes, $Precision = 1) { + $Units = array('B', 'K', 'M', 'G', 'T'); + + $Bytes = max((int)$Bytes, 0); + $Pow = floor(($Bytes ? log($Bytes) : 0) / log(1024)); + $Pow = min($Pow, count($Units) - 1); + + $Bytes /= pow(1024, $Pow); + + $Result = round($Bytes, $Precision).$Units[$Pow]; + return $Result; +} + +/** + * Test filesystem permissions + */ +function TestWrite() { + // Create file + $file = 'vanilla2test.txt'; + @touch($file); + if(is_writable($file)) { + @unlink($file); + return true; + } + else return false; +} +?> diff --git a/viewforum.php b/viewforum.php new file mode 100644 index 0000000..6ddaa49 --- /dev/null +++ b/viewforum.php @@ -0,0 +1,4 @@ + diff --git a/viewtopic.php b/viewtopic.php new file mode 100644 index 0000000..6ddaa49 --- /dev/null +++ b/viewtopic.php @@ -0,0 +1,4 @@ + diff --git a/yarss.php b/yarss.php new file mode 100644 index 0000000..d830a43 --- /dev/null +++ b/yarss.php @@ -0,0 +1,472 @@ + isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false, + 'is_apache' => isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false, + 'is_cgi' => isset($_SERVER['SERVER_SOFTWARE']) && strpos(php_sapi_name(), 'cgi') !== false, + 'is_windows' => stristr(PHP_OS, 'WIN') !== false, + 'iso_case_folding' => ord(strtolower(chr(138))) === 154, + 'complex_preg_chars' => @version_compare(PHP_VERSION, '4.3.3') != -1, + ); + + // A bug in some versions of IIS under CGI (older ones) makes cookie setting not work with Location: headers. + $context['server']['needs_login_fix'] = $context['server']['is_cgi']; + + // The following determines the user agent (browser) as best it can. + $context['browser'] = array( + 'is_opera' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false, + 'is_opera6' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera 6') !== false, + 'is_opera7' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera 7') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera/7') !== false, + 'is_opera8' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera 8') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera/8') !== false, + 'is_opera9' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera 9') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera/9') !== false, + 'is_ie4' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 4') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'WebTV') === false, + 'is_safari' => strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== false, + 'is_mac_ie' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false, + 'is_web_tv' => strpos($_SERVER['HTTP_USER_AGENT'], 'WebTV') !== false, + 'is_konqueror' => strpos($_SERVER['HTTP_USER_AGENT'], 'Konqueror') !== false, + 'is_firefox' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false, + 'is_firefox1' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox/1.') !== false, + 'is_firefox2' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox/2.') !== false, + 'is_iphone' => strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false, + ); + + $context['browser']['is_gecko'] = strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false && !$context['browser']['is_safari'] && !$context['browser']['is_konqueror']; + + // Internet Explorer 5 and 6 are often "emulated". + $context['browser']['is_ie7'] = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false && !$context['browser']['is_opera'] && !$context['browser']['is_gecko'] && !$context['browser']['is_web_tv']; + $context['browser']['is_ie6'] = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false && !$context['browser']['is_opera'] && !$context['browser']['is_gecko'] && !$context['browser']['is_web_tv']; + $context['browser']['is_ie5.5'] = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.5') !== false && !$context['browser']['is_opera'] && !$context['browser']['is_gecko'] && !$context['browser']['is_web_tv']; + $context['browser']['is_ie5'] = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.0') !== false && !$context['browser']['is_opera'] && !$context['browser']['is_gecko'] && !$context['browser']['is_web_tv']; + + $context['browser']['is_ie'] = $context['browser']['is_ie4'] || $context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] || $context['browser']['is_ie6'] || $context['browser']['is_ie7']; + $context['browser']['needs_size_fix'] = ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] || $context['browser']['is_ie4'] || $context['browser']['is_opera6']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') === false; + + // This isn't meant to be reliable, it's just meant to catch most bots to prevent PHPSESSID from showing up. + $context['browser']['possibly_robot'] = !empty($user_info['possibly_robot']); +} + +define('SMF', 'YARSS'); + +// We're going to want a few globals... these are all set later. +global $context, $modSettings; + +// Get the forum's settings for database and file paths. +require_once(dirname(__FILE__) . '/Settings.php'); + +$ssi_error_reporting = error_reporting(E_ALL); + +// Don't do john didley if the forum's been shut down competely. +if ($maintenance == 2 && (!isset($ssi_maintenance_off) || $ssi_maintenance_off !== true)) + die($mmessage); + +// Fix for using the current directory as a path. +if (substr($sourcedir, 0, 1) == '.' && substr($sourcedir, 1, 1) != '.') + $sourcedir = dirname(__FILE__) . substr($sourcedir, 1); + +// Load the important includes. +require_once($sourcedir . '/QueryString.php'); +require_once($sourcedir . '/Subs.php'); +require_once($sourcedir . '/Errors.php'); +require_once($sourcedir . '/Load.php'); +require_once($sourcedir . '/Security.php'); + +if (@version_compare(PHP_VERSION, '4.2.3') != 1) + require_once($sourcedir . '/Subs-Compat.php'); + +// Connect to the MySQL database. +if (empty($db_persist)) + $db_connection = @mysql_connect($db_server, $db_user, $db_passwd); +else + $db_connection = @mysql_pconnect($db_server, $db_user, $db_passwd); +if ($db_connection === false) + return false; + +// Add the database onto the prefix to avoid conflicts with other scripts. +/*if (strpos($db_prefix, '.') === false) + $db_prefix = is_numeric(substr($db_prefix, 0, 1)) ? $db_name . '.' . $db_prefix : '`' . $db_name . '`.' . $db_prefix; +else*/ + @mysql_select_db($db_name, $db_connection); + +// Load installed 'Mods' settings. +reloadSettings(); +// Clean the request variables. +cleanRequest(); + +// Seed the random generator? +#if (empty($modSettings['rand_seed']) || mt_rand(1, 250) == 69) +# smf_seed_generator(); + +// Check on any hacking attempts. +if (isset($_REQUEST['GLOBALS']) || isset($_COOKIE['GLOBALS'])) + die('Hacking attempt...'); +elseif (isset($_REQUEST['ssi_theme']) && (int) $_REQUEST['ssi_theme'] == (int) $ssi_theme) + die('Hacking attempt...'); +elseif (isset($_COOKIE['ssi_theme']) && (int) $_COOKIE['ssi_theme'] == (int) $ssi_theme) + die('Hacking attempt...'); +elseif (isset($_REQUEST['ssi_layers'])) +{ + if ((@get_magic_quotes_gpc() ? addslashes($_REQUEST['ssi_layers']) : $_REQUEST['ssi_layers']) == htmlspecialchars($ssi_layers)) + die('Hacking attempt...'); +} +if (isset($_REQUEST['context'])) + die('Hacking attempt...'); + +// Make sure wireless is always off. +define('WIRELESS', false); + +// Primarily, this is to fix the URLs... +ob_start('ob_sessrewrite'); + +$mode = @$_GET['mode']; +if ($mode == 'comments') { + header ("Status: 404 Not Found"); + die; +} +$forum = (int)@$_GET['forum']; +$topic = (int)@$_GET['topic']; +$post = (int)@$_GET['post']; + +$characterSet = 'UTF-8'; +// список всех RSS в opml (yarss.php?mode=opml) +if ($mode == 'opml') { + + header('Content-Type: text/xml; charset=' . $characterSet); + + $request = db_query(' + SELECT ID_BOARD, name + FROM ' . $db_prefix . 'boards + ' . ($botAccess ? 'WHERE (FIND_IN_SET(-1, memberGroups))' : '') . ' + ORDER BY boardOrder', + __FILE__, __LINE__ + ); + + echo '' . "\n" + . '' . "\n" + . 'Ya.rss opml file' . "\n" + . '' . "\n" + . '' . "\n"; + + while ($row = mysql_fetch_assoc($request)) { + echo '' . "\n"; + } + + echo '' . "\n" + . ''; +} + +elseif (empty($mode) AND ! empty($topic)) { + // Проверяем, можно ли выдавать RSS из этого форума + $request = db_query(' + SELECT b.name as bname, b.memberGroups, m.subject as name + FROM ' . $db_prefix . 'boards b, ' . $db_prefix . 'topics t, ' . $db_prefix . 'messages m + WHERE t.ID_TOPIC = ' . $topic . ' + AND t.ID_FIRST_MSG = m.ID_MSG + ORDER BY boardOrder', + __FILE__, __LINE__ + ); + $row = mysql_fetch_assoc($request); + + if (empty($row['name'])) { + header('HTTP/1.0 404 Not Found'); + echo 'Эта тема не существует.'; + } else { + if ($botAccess) { + $arMemberGroups = explode(',', $row['memberGroups']); + + if (!in_array('-1', $arMemberGroups)) { + header('HTTP/1.0 404 Not Found'); + echo 'Эта тема не выдается в виде RSS.'; + exit; + } + + unset($arMemberGroups); + } + + // шапка RSS + $xml = '' . "\n" + . '' . "\n" + . '' . "\n" + . '' . htmlspecialchars($row['name']) . ' — www.rock.ru' . "\n" + . '' . $boardurl . 'index.php?topic=' . $topic . '.new;boardseen#new' . "\n" + . '' . htmlspecialchars($row['name']) . ' — Российский рок-портал www.rock.ru' . "\n" + . 'ru' . "\n" + . 'rock@rock.ru (Aleksei Miheev)' . "\n"; + + // магический mysql-запрос, который все делает + + if (! empty ($post)) { + $and_where = 'AND mes.ID_MSG < "' . $post . '"'; + } else { + $and_where = ''; + } + $order = 'mes.ID_MSG DESC'; + + $request = db_query(' + SELECT mes.*, mem.realName as memberName + FROM ' . $db_prefix . 'messages mes, ' . $db_prefix . 'members mem + WHERE mes.ID_MEMBER = mem.ID_MEMBER + AND mes.ID_TOPIC = "' . $topic . '" ' . $and_where .' + + ORDER BY ' . $order . ' LIMIT ' . $limit, + __FILE__, __LINE__ + ); + + // для листалки + $paginationPost = 0; + $paginationTopic = 0; + + // -ы + if (mysql_num_rows($request) > 0) { + $modif = false; + + loadServerAndBrowser(); + + while ($row = mysql_fetch_assoc($request)) { + $paginationPost = $row['ID_MSG']; + + parsecode($row['body']); + $body = $row['body']; + //$body = html_entity_decode($body); + //$body = nl2br($body); + //$body = preg_replace('/[\x00-\x08\x0B-\x0C\x0E-\x19]/', '', $body); + + $xml .= '' . "\n" + . '' . htmlspecialchars($row['subject']). '' . "\n"; + + $xml .= '' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '' . "\n"; + + $xml .= '' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '' . "\n"; + + $xml .= '' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '' . "\n" + . '' . htmlspecialchars ($body) . '' . "\n" + . '' . (date('r', $row['posterTime'])) . '' . "\n" +# . '' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '' . "\n" + . '' . htmlspecialchars($row['memberName']) . '' . "\n" + . '' . "\n"; + + if ($modif == false) { + $modif = true; + header('Last-Modified: ' . gmdate("D, d M Y H:i:s", $row['posterTime']) . ' GMT'); # дата самого свежего сообщения + } + + } + } + + // листалка назад, если это не последняя страница + if ($post != $paginationPost) { + $xml .= '' . $boardurl . '/yarss.php?topic=' . $topic . '&post=' . $paginationPost . '' . "\n"; + } + + $xml .= ''; + + header('Content-Type: text/xml; charset=' . $characterSet); + echo $xml; + } +} +// список всех RSS по умолчанию (yarss.php без параметров) +elseif (empty($forum)) { + + + header('Content-Type: text/html; charset=' . $characterSet); + + $request = db_query(' + SELECT ID_BOARD, name, numTopics, numPosts + FROM ' . $db_prefix . 'boards + ' . ($botAccess ? 'WHERE (FIND_IN_SET(-1, memberGroups))' : '') . ' + ORDER BY boardOrder', + __FILE__, __LINE__ + ); + + echo '' . 'Список разрешенных к индексации форумов в RSS' . ': (opml)'; + + while ($row = mysql_fetch_assoc($request)) { + echo '

            ' . $row['name'] . ' ' . $row['numTopics'] . '/' . $row['numPosts']; + echo '

            '; + } + + if ($botAccess) { + echo '

            Внимание: В RSS выдаются только те форумы, в которых разрешено индексирование ("Характеристики и настройки" -> "Поисковые системы" -> "Настройки", "Назначить группу для пауков").

            '; + } + + echo '

            Теперь вы можете добавить желаемые потоки в Яндекс.Поиск по блогам.

            '; + + echo ''; +} + +else { + // Проверяем, можно ли выдавать RSS из этого форума + $request = db_query(' + SELECT name, memberGroups + FROM ' . $db_prefix . 'boards + WHERE ID_BOARD = ' . $forum . ' + ORDER BY boardOrder', + __FILE__, __LINE__ + ); + $row = mysql_fetch_assoc($request); + + if (empty($row['name'])) { + header('HTTP/1.0 404 Not Found'); + echo 'Этот форум не существует.'; + } + else { + if ($botAccess) { + $arMemberGroups = explode(',', $row['memberGroups']); + + if (!in_array('-1', $arMemberGroups)) { + header('HTTP/1.0 404 Not Found'); + echo 'Этот форум не выдается в виде RSS.'; + exit; + } + + unset($arMemberGroups); + } + + // шапка RSS + $xml = '' . "\n" + . '' . "\n" + . '' . "\n" + . '' . htmlspecialchars($row['name']) . ' — www.rock.ru' . "\n" + . '' . $boardurl . '' . "\n" + . '' . htmlspecialchars($row['name']) . ' — Российский рок-портал www.rock.ru' . "\n" + . 'ru' . "\n" + . 'rock@rock.ru(Aleksei "rusty_angel" Miheev)' . "\n" + . 'Ya:Rss ' . $version . '' . "\n"; + + // магический mysql-запрос, который все делает + + $where1 = ''; + $where2 = ''; + $order = 'tps.ID_TOPIC DESC, mes.ID_MSG DESC'; + +# if (empty($mode)) { # только первые посты/остальные посты + $where1 = '='; +# } +# else { +# $where1 = '<>'; +# $order = 'mes.ID_MSG DESC'; +# } + if ($topic != 0) { # листалка по тредам + $where2 = 'AND tps.ID_TOPIC < "' . $topic . '"'; + $order = 'tps.ID_TOPIC DESC'; + } +# if ($post != 0 && $mode == 'comments') { # листалка по постам +# $where2 = 'AND mes.ID_MSG < "' . $post . '"'; +# $order = 'mes.ID_MSG DESC'; +# } + + $request = db_query(' + SELECT tps.*, mes.*, mem.realName AS memberName + FROM ' . $db_prefix . 'topics tps, ' . $db_prefix . 'messages mes, ' . $db_prefix . 'members mem + WHERE mes.ID_MEMBER = mem.ID_MEMBER + AND tps.ID_FIRST_MSG ' . $where1 . ' mes.ID_MSG + AND mes.ID_TOPIC = tps.ID_TOPIC + AND tps.ID_BOARD = "' . $forum . '" ' . $where2 . ' + + ORDER BY ' . $order . ' LIMIT ' . $limit, + __FILE__, __LINE__ + ); + + // для листалки + $paginationPost = 0; + $paginationTopic = 0; + + // -ы + if (mysql_num_rows($request) > 0) { + $modif = false; + + loadServerAndBrowser(); + + while ($row = mysql_fetch_assoc($request)) { + $paginationPost = $row['ID_MSG']; + $paginationTopic = $row['ID_TOPIC']; + + parsecode($row['body']); + $body = $row['body']; + //$body = html_entity_decode($body); + //$body = nl2br($body); + //$body = preg_replace('/[\x00-\x08\x0B-\x0C\x0E-\x19]/', '', $body); + + $xml .= '' . "\n" + . '' . htmlspecialchars($row['subject'], ENT_QUOTES, 'UTF-8', false). '' . "\n"; + +# if ($mode != 'comments') { + $xml .= '' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '' . "\n"; + $xml .= '' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '' . "\n"; +# } +# else { +# $xml .= '' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '' . "\n"; +# $xml .= '' .$scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '' . "\n"; +# } + +# if ($mode == 'comments') { +# $xml .= '' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '' . "\n"; +# } + +# $xml .= '' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '' . "\n" + $xml .= '' . htmlspecialchars ($body) . '' . "\n" + . '' . (date('r', $row['posterTime'])) . '' . "\n" +# . '' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '' . "\n" + . '' . $row['memberName'] . '' . "\n" + . '' . "\n"; + + if ($modif == false) { + $modif = true; + header('Last-Modified: ' . gmdate("D, d M Y H:i:s", $row['posterTime']) . ' GMT'); # дата самого свежего сообщения + } + + } + } + + // листалка назад, если это не последняя страница + if ($post != $paginationPost && !empty($paginationTopic)) { +# if ($mode != 'comments') { + $xml .= '' . $boardurl . '/yarss.php?forum=' . $forum . '&topic=' . $paginationTopic . '' . "\n"; +# } +# else { +# $xml .= '' . $boardurl . '/yarss.php?forum=' . $forum . '&post=' . $paginationPost . '&mode=' . $mode . '' . "\n"; +# } + } + + // ссылка на фид с комментами +# if ($mode != 'comments') { +# $xml .= '' . $boardurl . '/yarss.php?forum=' . $forum . '&mode=comments'; +# } + + $xml .= ''; + + header('Content-Type: text/xml; charset=' . $characterSet); + echo $xml; + } +} +?>
            + + + + + + + + +
            www.rock.ru  |  Оффтопик  |  Курилка + < предыдущая следующая > +
            + + + + + +
            + +

            Как вы начинаете свое утро?

            + Модераторы: fantom, Brain Damage, THE STRANGER, papashura +
            + + + + + + + + + +
            + Опрос +
            Вопрос: + Во сколько вы встаёте с постели с утра в будние дни +
            + + + + + + + + +
            + 5.00 - 5.29
            + 5.30 - 5.59
            + + 6.00 - 6.29
            + 6.30 - 6.59
            + 7.00 - 7.29
            + 7.30 - 7.59
            + 8.00 - 8.29
            + + 8.30 - 8.59
            + 9.00 - 9.29
            + 9.30 - 9.59
            + 10.00 - 10.29
            + 10.30 - 11.00
            + +
            + Просмотр результатов.
            + Закрыть опрос
            + Редактировать опрос +
            + +
            +
            + + + + + +
            + + + + + +
            + Страницы: 1 ... 3 4 [5]  все Вниз + +  Ответить Уведомление об ответе Пометить прочитанными Отправить Печать
            +
            + +
            + + + + + + + + + + + + + + + + + + + + +
            + + +
            + + + + + + + + +
            + Муж. + K1RR + +
            + Модератор
            +
            + no liv til' liv

            + + Профиль - PM + +
            Рейтинг:   + + [ 767 ] -
            +
            сообщений: 5 022 +
            +
            +
            + + + + +
            + Сообщение #80 было: вчера в 11:25 + Цитировать + Править + + Удалить сообщение + Raise Warning Level + Разбить тему + +
            +
            +
            Цитата (Awake вчера в 11:13)
            Цитата (K1RR вчера в 00:18)
            жавороночек нда... в 8 у жаворонков уже предобеденное время, а ты только встаешь.
            уж не дерзишь ли ты дядьке?
            Не посмел бы.


            А не прилепить ли нам голосовалку кто во сколько встает по утрам? Интересно даже какое распредление будет... не думал что многие около 6 встают.
            + +
            + + + + + +
            +
            + + « Последняя правка: вчера в 16:09 от K1RR » + + На сайт  + Быстрая цитата  + + Сообщить модератору   + 188.162.72.244 (?) +
            +
            + + +
            +
            +
            + + + + + +
            + + + + + + + + + +
            + Муж. + K1RR +
            + Модератор
            + +
            + no liv til' liv

            + + Профиль - PM +
            Рейтинг:   + + + [ 767 ] -
            +
            сообщений: 5 022 +
            +
            +
            + + + +
            + + Сообщение #81 было: вчера в 11:26 + Цитировать + Править + Удалить сообщение + Raise Warning Level + + Разбить тему + +
            +
            +
            Цитата
            А не прилепить ли нам голосовалку кто во сколько встает по утрам? Интересно даже какое распредление будет... не думал что многие около 6 встают.
            Похоже, только модераторам - я думал в первый пост можно, но нет.
            +
            + + + + + + +
            +
            + + На сайт  + Быстрая цитата  + Сообщить модератору   + 188.162.72.244 (?) + +
            +
            + +
            +
            +
            + + + +
            + + + + + + + + + +
            + + Муж. + Гнус Быдляев +

            +

            + Профиль - PM +
            Рейтинг:   + + + [ 663 ] -
            +
            сообщений: 8 605 +
            +
            +
            + + + +
            + + Сообщение #82 было: вчера в 11:29 + Цитировать + Править + Удалить сообщение + Raise Warning Level + + Разбить тему + +
            +
            +
            подъем в 7:50, умывание, чай, зубы, выход в 8:15
            +
            + + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 195.162.33.117 (?) +
            +
            +
            +
            +
            +
            + + + +
            + + + + + + + + + +
            + Муж. + Invizible Man + +
            + Модератор
            +
            + A Taste of Honey

            + + Профиль - PM +
            Рейтинг:   + + + [ 1873 ] -
            +
            сообщений: 4 550 +
            +
            +
            + + + +
            + + Сообщение #83 было: вчера в 12:02 + Цитировать + Править + Удалить сообщение + Raise Warning Level + + Разбить тему + +
            +
            +
            нати, c другой стороны
            +
            + + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 195.16.52.106 (?) +
            +
            +
            Все притворялись, что у них есть нечто в кармане, и ни один даже не пытался притвориться, что у него есть нечто в голове (с) М.Е. Салтыков-Щедрин
            +
            +
            + +
            + + + + +
            + + + + + + + + +
            + Муж. + isayeff + +

            +
            + Standartenführer

            + + Профиль - PM +
            Рейтинг:   + + + [ 687 ] -
            +
            сообщений: 4 567 +
            +
            +
            + + + +
            + + Сообщение #84 было: вчера в 12:05 + Цитировать + Править + Удалить сообщение + Raise Warning Level + + Разбить тему + +
            +
            +
            Цитата (нати вчера в 11:20)
            кстати, Invizible Man, где ЖО?
            в Галатасарае.
            + +
            + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 95.221.182.81 (?) + +
            +
            + +
            +
            +
            + + + +
            + + + + + + + + +
            + + Муж. + Brain Damage +
            + Moderator
            +
            + медведь в очках

            + + Профиль - PM + +
            Рейтинг:   + + [ 670 ] -
            +
            сообщений: 5 769 +
            +
            +
            + + + + +
            + Сообщение #85 было: вчера в 15:24 + Цитировать + Править + + Удалить сообщение + Raise Warning Level + Разбить тему + +
            +
            +
            Цитата (K1RR вчера в 11:26)
            Похоже, только модераторам - я думал в первый пост можно, но нет.

            Должно быть.

            Ладно, сделаю сам.
            + +
            + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 78.36.109.72 (?) + +
            +
            +
            And that one looks Jewish... and that one's a coon! Who let all this riff raff into the room?
            +
            + +
            +
            + + + + +
            + + + + + + + + + +
            + Муж. + Invizible Man +
            + Модератор
            +
            + A Taste of Honey

            + + Профиль - PM + +
            Рейтинг:   + + [ 1873 ] -
            +
            сообщений: 4 550 +
            +
            +
            + + + + +
            + Сообщение #86 было: вчера в 15:53 + Цитировать + Править + + Удалить сообщение + Raise Warning Level + Разбить тему + +
            +
            +
            В 8.00
            + +
            + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 195.16.52.106 (?) + +
            +
            +
            Все притворялись, что у них есть нечто в кармане, и ни один даже не пытался притвориться, что у него есть нечто в голове (с) М.Е. Салтыков-Щедрин
            +
            +
            +
            + + + +
            + + + + + + + + +
            + + Жен. + Maybe +
            + + Предупреждение

            +
            + I don't give a damn

            + + + Профиль - PM +
            Рейтинг:   + + [ 294 ] -
            +
            сообщений: 3 240 +
            + +
            +
            + + + + +
            + Сообщение #87 было: вчера в 15:54 + Цитировать + Править + Удалить сообщение + Raise Warning Level + Разбить тему + +
            + +
            +
            7.30 - 7.59
            +
            + + + + + +
            + +
            + + На сайт  + Быстрая цитата  + Сообщить модератору   + + 95.54.19.181 (?) +
            +
            +
            "We are just a moment in time,
            A blink of an eye,
            A dream for the blind,
            Visions from a dying brain,
            I hope you don't understand "-Anathema "Shroud Of False"
            + +
            +
            +
            + + + + +
            + + + + + + + + +
            + Муж. + Enemy +


            + Online - + Профиль - PM + +
            Рейтинг:   + + [ 683 ] -
            +
            сообщений: 3 395 +
            +
            +
            + + + + +
            + Сообщение #88 было: вчера в 16:03 + Цитировать + Править + + Удалить сообщение + Raise Warning Level + Разбить тему + +
            +
            +
            6.00-6.29
            + +
            + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 91.201.181.54 (?) + +
            +
            +
            Здесь могла быть сигнатура Red!`a
            +
            + +
            +
            + + + +
            + + + + + + + + + +
            + Муж. + dimanback +

            +
            + Праздник к нам пришел!

            + + Профиль - PM + +
            Рейтинг:   + + [ 149 ] -
            +
            сообщений: 1 433 +
            +
            +
            + + + + +
            + Сообщение #89 было: вчера в 16:08 + Цитировать + Править + + Удалить сообщение + Raise Warning Level + Разбить тему + +
            +
            +
            6.30 - 6.59
            + +
            + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 79.173.124.139 (?) + +
            +
            +
            +
            + + + + +
            + + + + + + + + +
            + Муж. + Master of Reality +
            + + + Предупреждение

            +

            + Online - + Профиль - PM + +
            Рейтинг:   + + [ 65391 ] -
            +
            сообщений: 11 013 +
            +
            +
            + + + + +
            + Сообщение #90 было: вчера в 16:16 + Цитировать + Править + + Удалить сообщение + Raise Warning Level + Разбить тему + +
            +
            +
            Цитата (Awake вчера в 11:13)
            вот они - российские школьники...
            К счастью, я уже не школота.
            + +
            + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 62.122.208.181 (?) + +
            +
            +
            +
            +
            + +
            + + + +
            + + + + + + + + +
            + Муж. + Master of Reality + +
            + + Предупреждение

            +

            + Online - + Профиль - PM + +
            Рейтинг:   + + [ 65391 ] -
            +
            сообщений: 11 013 +
            +
            +
            + + + + +
            + Сообщение #91 было: вчера в 16:16 + Цитировать + Править + + Удалить сообщение + Raise Warning Level + Разбить тему + +
            +
            +
            В первый раз в 8.00-8.29, во второй как получится.
            + +
            + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 62.122.208.181 (?) + +
            +
            +
            +
            +
            + +
            + + + +
            + + + + + + + + + +
            + Жен. + Moreen + +

            +

            + Профиль - PM +
            Рейтинг:   + + [ 570 ] -
            + +
            сообщений: 1 833 +
            +
            +
            + + + + +
            + Сообщение #92 было: вчера в 22:33 + Цитировать + Править + Удалить сообщение + Raise Warning Level + Разбить тему + +
            + +
            +
            Встаю в 6:50. Но часто опять ложусь в 8:00 и до 10:30 еще дрыхну! :) Никак не избавлюсь от этой дурной привычки. Хочу работу утреннюю. Иначе меня не заставить вставать рано.
            +
            + + + + + + +
            +
            + + На сайт  + Быстрая цитата  + + Сообщить модератору   + 81.23.190.33 (?) +
            +
            +
            +
            + + + +
            + + + + + + + + + +
            + Муж. + IRON PRIEST +
            + + Предупреждение

            +
            + + я хочу поиграть с тобой в одну игру...

            + + Профиль - PM +
            Рейтинг:   + + [ 978 ] -
            + +
            сообщений: 4 350 +
            +
            +
            + + + + +
            + Сообщение #93 было: вчера в 22:36 + Цитировать + Править + Удалить сообщение + Raise Warning Level + Разбить тему + +
            + +
            +
            в 7 и не только в будние

            єто если не пить
            +
            + + + + + +
            + +
            + + На сайт  + Быстрая цитата  + Сообщить модератору   + + 213.154.214.93 (?) +
            +
            +
            ___|____|____|____|____|__|
            _|____|__бицца_|____|____|
            ___|____| галавой |____|____|
            _|____|___|сюда|____|____|
            ___|____|_____|____|____|__|

            мы выиграли засунув пальцы в нос, мы проиграли засунув пальцы в зад
            + +
            +
            +
            + + + + +
            + + + + + + + + + + +
            + Жен. + Maybe +
            + + Предупреждение

            + +
            + I don't give a damn

            + + Профиль - PM +
            Рейтинг:   + + [ 294 ] -
            + +
            сообщений: 3 240 +
            +
            +
            + + + + +
            + Сообщение #94 было: вчера в 22:37 + Цитировать + Править + Удалить сообщение + Raise Warning Level + Разбить тему + +
            + +
            +
            Цитата (Moreen вчера в 22:33)
            Встаю в 6:50. Но часто опять ложусь в 8:00 и до 10:30 еще дрыхну!
            бывает. Как-то решила поспать десять минут поспать после будильника. Только потом проспала первые три урока :oops:
            +
            + + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 95.54.19.26 (?) +
            +
            +
            "We are just a moment in time,
            A blink of an eye,
            A dream for the blind,
            Visions from a dying brain,
            I hope you don't understand "-Anathema "Shroud Of False"
            +
            +
            +
            + + + +
            + + + + + + + + + + +
            + Nutty Agda +

            +
            + It's Tragic Magic

            + + Online - + Профиль - PM + +
            Рейтинг:   + + [ 556 ] -
            +
            сообщений: 2 430 +
            +
            +
            + + + + +
            + Сообщение #95 было: вчера в 23:56 + Цитировать + Править + + Удалить сообщение + Raise Warning Level + Разбить тему + +
            +
            +
            *Во сколько вы встаёте с постели с утра в будние дни*
            I roll! I roll! I roll!  :tani: :horns: Head about a wall
            + +
            + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 93.157.232.22 (?) + +
            +
            +
            Fishes can't fly, fishes can't fly,
            Fishes can't and neither can I, neither can I... (c) PH

            110 1:0
            +
            +
            +
            + + + + +
            + + + + + + + + + +
            + Жен. + Tuisku +

            +

            + Online - + Профиль - PM + +
            Рейтинг:   + + [ 74 ] -
            +
            сообщений: 242 +
            +
            +
            + + + + +
            + Сообщение #96 было: сегодня в 00:06 + Цитировать + + Править + Удалить сообщение + Raise Warning Level + Разбить тему + +
            +
            +
            Цитата (Aeacos 09 Февраль 2010, 20:08:04)
            Люблю я хорошо позавтракать. Самое важное для меня.
            Одобрямс) Люблю очень плотно позавтракать.
            + +
            + + + + + +
            +
            + + + На сайт  + Быстрая цитата  + Сообщить модератору   + 193.109.70.74 (?) + +
            +
            +
            " Главное не переусердствовать, чтобы пафосный человек не выпал в астрал."
            +
            +
            +
            + + + + + + + +
            + + + + + + +
            + Страницы: 1 ... 3 4 [5]  все Вверх + +  Ответить Уведомление об ответе Пометить прочитанными Отправить Печать  +
            +
            + + + + + + + +
            www.rock.ru  |  Оффтопик  |  Курилка | Тема: Как вы начинаете свое утро? < предыдущая следующая >
            +
            Переместить тему Удалить тему Закрыть тему Сделать тему важной Объединить темы Ob'dinit' temy Удалить опрос Ссылка на календарь Прикрепить первый пост ко всей теме
            + +
            +
            Эту тему сейчас просмaтривают rusty_angel и 0 Гостей
            + +
            +
            + Перейти в раздел: +   + +
            + +
            +
            + + + + + + + + + +
            + Быстрый ответ
            + :D + :) + :( + :heap: + :ooi: + So-so + It is surprised + Again + + I roll! + :oops: + [ещё...] + + + + + + +
            + +
            + + + + + + + +
            + В колонках: Что вы сейчас слушаете? [заполнять необязательно]

            + + + + + + +
            +
            +
            + +
            + + + + + +
            + + www.rock.ru | Powered by SMF 1.0.8.
            +© 2001-2005, Lewis Media. All Rights Reserved. +
            + +
            +
            +

            + +
            + Rock Top 100 + Rambler's Top100 + Rambler's Top100 + + MusicCounter +
            + + + + diff --git a/vanilla2export.php b/vanilla2export.php new file mode 100644 index 0000000..391f3f2 --- /dev/null +++ b/vanilla2export.php @@ -0,0 +1,4069 @@ + + +. + * Contact Vanilla Forums Inc. at support [at] vanillaforums [dot] com + * + * @package VanillaPorter + */ + +if(defined('DEBUG')) + error_reporting(E_ALL); +else + error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR); +ini_set('display_errors', 'on'); +ini_set('track_errors', 1); + +$e = new SMF(); +$e->DoExport(); + +die ("OK"); + +function url_image_size($url) +{ + global $sourcedir; + + $t = microtime(); + + // Get the host to pester... + preg_match('~^\w+://(.+?)/(.*)$~', $url, $match); + + // Can't figure it out, just try the image size. + if ($url == '' || $url == 'http://' || $url == 'https://') + return false; + elseif (!isset($match[1])) + $size = @getimagesize($url); + else + { + // Try to connect to the server... give it half a second. + $temp = 0; + $fp = @fsockopen($match[1], 80, $temp, $temp, 0.5); + + // Successful? Continue... + if ($fp != false) + { + // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) + fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'User-Agent: PHP/SMF' . "\r\n" . 'Connection: close' . "\r\n\r\n"); + + // Read in the HTTP/1.1 or whatever. + $test = substr(fgets($fp, 11), -1); + fclose($fp); + + // See if it returned a 404/403 or something. + if ($test < 4) + { + $size = @getimagesize($url); + + // This probably means allow_url_fopen is off, let's try GD. + if ($size === false && function_exists('imagecreatefromstring')) + { + include_once($sourcedir . '/Subs-Package.php'); + + // It's going to hate us for doing this, but another request... + $image = @imagecreatefromstring(fetch_web_data($url)); + if ($image !== false) + { + $size = array(imagesx($image), imagesy($image)); + imagedestroy($image); + } + } + } + } + } + + // If we didn't get it, we failed. + if (!isset($size)) + $size = false; + + // // Didn't work. + return $size; +} + +global $Supported; + +/** @var array Supported forum packages: classname => array(name, prefix) */ +$Supported = array( + 'vanilla1' => array('name'=> 'Vanilla 1.*', 'prefix'=>'LUM_'), + 'vbulletin' => array('name'=>'vBulletin 3.*', 'prefix'=>'vb_'), + 'phpbb' => array('name'=>'phpBB 3.*', 'prefix' => 'phpbb_'), + 'bbPress' => array('name'=>'bbPress 1.*', 'prefx' => 'bb_'), + 'SMF' => array('name'=>'SMF 1.*', 'prefx' => 'smf_') +); + +// Support Files + +/* Contents included from class.exportmodel.php */ +?> array( + 'ActivityUserID' => 'int', + 'RegardingUserID' => 'int', + 'Story' => 'text', + 'InsertUserID' => 'int', + 'DateInserted' => 'datetime'), + 'Category' => array( + 'CategoryID' => 'int', + 'Name' => 'varchar(30)', + 'Description' => 'varchar(250)', + 'ParentCategoryID' => 'int', + 'DateInserted' => 'datetime', + 'InsertUserID' => 'int', + 'DateUpdated' => 'datetime', + 'UpdateUserID' => 'int', + 'Sort' => 'int'), + 'Comment' => array( + 'CommentID' => 'int', + 'DiscussionID' => 'int', + 'DateInserted' => 'datetime', + 'InsertUserID' => 'int', + 'DateUpdated' => 'datetime', + 'UpdateUserID' => 'int', + 'Format' => 'varchar(20)', + 'Body' => 'text', + 'Score' => 'float'), + 'Conversation' => array( + 'ConversationID' => 'int', + 'FirstMessageID' => 'int', + 'DateInserted' => 'datetime', + 'InsertUserID' => 'int', + 'DateUpdated' => 'datetime', + 'UpdateUserID' => 'int'), + 'ConversationMessage' => array( + 'MessageID' => 'int', + 'ConversationID' => 'int', + 'Body' => 'text', + 'InsertUserID' => 'int', + 'DateInserted' => 'datetime'), + 'Discussion' => array( + 'DiscussionID' => 'int', + 'Name' => 'varchar(100)', + 'Body' => 'text', + 'Format' => 'varchar(20)', + 'CategoryID' => 'int', + 'DateInserted' => 'datetime', + 'InsertUserID' => 'int', + 'DateUpdated' => 'datetime', + 'UpdateUserID' => 'int', + 'DateLastComment' => 'datetime', + 'CountComments' => 'int', + 'Score' => 'float', + 'Closed' => 'tinyint', + 'Announce' => 'tinyint', + 'Sink' => 'tinyint'), + 'Role' => array( + 'RoleID' => 'int', + 'Name' => 'varchar(100)', + 'Description' => 'varchar(200)', + 'CanSession' => 'tinyint'), + 'User' => array( + 'UserID' => 'int', + 'Name' => 'varchar(20)', + 'Email' => 'varchar(200)', + 'Password' => 'varbinary(34)', + //'Gender' => array('m', 'f'), + 'Score' => 'float', + 'InviteUserID' => 'int', + 'HourOffset' => 'int', + 'CountDiscussions' => 'int', + 'CountComments' => 'int', + 'Photo' => 'varchar(255)', + 'DateOfBirth' => 'datetime', + 'DateFirstVisit' => 'datetime', + 'DateLastActive' => 'datetime', + 'DateInserted' => 'datetime', + 'DateUpdated' => 'datetime'), + 'UserConversation' => array( + 'UserID' => 'int', + 'ConversationID' => 'int', + 'LastMessageID' => 'int'), + 'UserDiscussion' => array( + 'UserID' => 'int', + 'DiscussionID' => 'int', + 'Bookmarked' => 'tinyint', + 'DateLastViewed' => 'datetime', + 'CountComments' => 'int'), + 'UserMeta' => array( + 'UserID' => 'int', + 'Name' => 'varchar(255)', + 'Value' => 'text'), + 'UserRole' => array( + 'UserID' => 'int', + 'RoleID' => 'int') + ); + + /** + * @var bool Whether or not to use compression when creating the file. + */ + protected $_UseCompression = TRUE; + + protected $_Username; + + /** + * + * @var bool Whether or not to stream the export the the output rather than save a file. + */ + public $UseStreaming = FALSE; + + + /** + * Create the export file and begin the export. + * @param string $Path The path to the export file. + * @param string $Source The source program that created the export. This may be used by the import routine to do additional processing. + */ + public function BeginExport($Path = '', $Source = '', $Header = array()) { + $this->Comments = array(); + $this->BeginTime = microtime(TRUE); + + if($Path) + $this->Path = $Path; + if(!$this->Path) + $this->Path = 'export_'.($this->FilenamePrefix ? $this->FilenamePrefix.'_' : '').date('Y-m-d_His').'.txt'.($this->UseCompression() ? '.gz' : ''); + + $fp = $this->_OpenFile(); + + fwrite($fp, 'Vanilla Export: '.$this->Version()); + if($Source) + fwrite($fp, self::DELIM.' Source: '.$Source); + foreach ($Header as $Key => $Value) { + fwrite($fp, self::DELIM." $Key: $Value"); + } + fwrite($fp, self::NEWLINE.self::NEWLINE); + $this->Comment('Export Started: '.date('Y-m-d H:i:s')); + } + + /** + * Write a comment to the export file. + * @param string $Message The message to write. + * @param bool $Echo Whether or not to echo the message in addition to writing it to the file. + */ + public function Comment($Message, $Echo = TRUE) { + fwrite($this->_File, self::COMMENT.' '.str_replace(self::NEWLINE, self::NEWLINE.self::COMMENT.' ', $Message).self::NEWLINE); + if($Echo) + $this->Comments[] = $Message; + } + + /** + * End the export and close the export file. This method must be called if BeginExport() has been called or else the export file will not be closed. + */ + public function EndExport() { + $this->EndTime = microtime(TRUE); + $this->TotalTime = $this->EndTime - $this->BeginTime; + + $this->Comment('Export Completed: '.date('Y-m-d H:i:s')); + $this->Comment(sprintf('Elapsed Time: %s', self::FormatElapsed($this->TotalTime))); + + if($this->UseStreaming) { + //ob_flush(); + } else { + if($this->UseCompression() && function_exists('gzopen')) + gzclose($this->_File); + else + fclose($this->_File); + } + } + + /** + * Export a table to the export file. + * @param string $TableName the name of the table to export. This must correspond to one of the accepted Vanilla tables. + * @param mixed $Query The query that will fetch the data for the export this can be one of the following: + * - String: Represents a string of SQL to execute. + * - PDOStatement: Represents an already executed query result set. + * - Array: Represents an array of associative arrays or objects containing the data in the export. + * @param array $Mappings Specifies mappings, if any, between the source and the export where the keys represent the source columns and the values represent Vanilla columns. + * - If you specify a Vanilla column then it must be in the export structure contained in this class. + * - If you specify a MySQL type then the column will be added. + * - If you specify an array you can have the following keys: Column, and Type where Column represents the new column name and Type represents the MySQL type. + * For a list of the export tables and columns see $this->Structure(). + */ + public function ExportTable($TableName, $Query, $Mappings = array()) { + $BeginTime = microtime(TRUE); + + $RowCount = $this->_ExportTable($TableName, $Query, $Mappings); + + $EndTime = microtime(TRUE); + $Elapsed = self::FormatElapsed($BeginTime, $EndTime); + $this->Comment("Exported Table: $TableName ($RowCount rows, $Elapsed)"); + fwrite($this->_File, self::NEWLINE); + } + + protected function _ExportTable($TableName, $Query, $Mappings = array()) { + $fp = $this->_File; + + // Make sure the table is valid for export. + if (!array_key_exists($TableName, $this->_Structures)) { + $this->Comment("Error: $TableName is not a valid export." + ." The valid tables for export are ". implode(", ", array_keys($this->_Structures))); + fwrite($fp, self::NEWLINE); + return; + } + $Structure = $this->_Structures[$TableName]; + + // Set the search and replace to escape strings. + $EscapeSearch = array(self::ESCAPE, self::DELIM, self::NEWLINE, self::QUOTE); // escape must go first + $EscapeReplace = array(self::ESCAPE.self::ESCAPE, self::ESCAPE.self::DELIM, self::ESCAPE.self::NEWLINE, self::ESCAPE.self::QUOTE); + + $LastID = 0; + $IDName = 'NOTSET'; + $FirstQuery = TRUE; + + // Get the filters from the mappings. + $Filters = array(); + foreach ($Mappings as $Column => $Mapping) { + if (is_array($Mapping) &&isset($Mapping['Column']) && isset($Mapping['Filter'])) { + $Filters[$Mapping['Column']] = $Mapping['Filter']; + } + } + + $Data = $this->Query($Query, $IDName, $LastID, $this->_Limit); + $Mb = function_exists('mb_detect_encoding'); + + // Loop through the data and write it to the file. + $RowCount = 0; + if ($Data !== FALSE) { + while (($Row = mysql_fetch_assoc($Data)) !== FALSE) { + $Row = (array)$Row; // export%202010-05-06%20210937.txt + $RowCount++; + if($FirstQuery) { + // Start with the table name. + fwrite($fp, 'Table: '.$TableName.self::NEWLINE); + + // Get the export structure. + $ExportStructure = $this->GetExportStructure($Row, $Structure, $Mappings); + + // Build and write the table header. + $TableHeader = $this->_GetTableHeader($ExportStructure, $Structure); + + fwrite($fp, $TableHeader.self::NEWLINE); + + $Mappings = array_flip($Mappings); + + $FirstQuery = FALSE; + } + + $First = TRUE; + + // Loop through the columns in the export structure and grab their values from the row. + $ExRow = array(); + foreach ($ExportStructure as $Field => $Type) { + // Get the value of the export. + if (array_key_exists($Field, $Row)) { + // The column has an exact match in the export. + $Value = $Row[$Field]; + } elseif (array_key_exists($Field, $Mappings)) { + // The column is mapped. + $Value = $Row[$Mappings[$Field]]; + } else { + $Value = NULL; + } + // Format the value for writing. + if (is_null($Value)) { + $Value = self::NULL; + } elseif (is_numeric($Value)) { + // Do nothing, formats as is. + } elseif (is_string($Value)) { + + // Check to see if there is a callback filter. + if (isset($Filters[$Field])) { + $Value = call_user_func($Filters[$Field], $Value, $Field, $Row); + } else { + if($Mb && mb_detect_encoding($Value) != 'UTF-8') + $Value = utf8_encode($Value); + } + + $Value = str_replace(array("\r\n", "\r"), array(self::NEWLINE, self::NEWLINE), $Value); + $Value = self::QUOTE + .str_replace($EscapeSearch, $EscapeReplace, $Value) + .self::QUOTE; + } elseif (is_bool($Value)) { + $Value = $Value ? 1 : 0; + } else { + // Unknown format. + $Value = self::NULL; + } + + $ExRow[] = $Value; + } + // Write the data. + fwrite($fp, implode(self::DELIM, $ExRow)); + // End the record. + fwrite($fp, self::NEWLINE); + } + } + if($Data !== FALSE) + mysql_free_result($Data); + unset($Data); + + // Write an empty line to signify the end of the table. + fwrite($fp, self::NEWLINE); + mysql_close(); + + return $RowCount; + } + + static function FormatElapsed($Start, $End = NULL) { + if($End === NULL) + $Elapsed = $Start; + else + $Elapsed = $End - $Start; + + $m = floor($Elapsed / 60); + $s = $Elapsed - $m * 60; + $Result = sprintf('%02d:%05.2f', $m, $s); + + return $Result; + } + + public function GetCharacterSet($Table) { + // First get the collation for the database. + $Data = $this->Query("show table status like ':_{$Table}';"); + if (!$Data) + return FALSE; + if ($StatusRow = mysql_fetch_assoc($Data)) + $Collation = $StatusRow['Collation']; + else + return FALSE; + + // Grab the character set from the database. + $Data = $this->Query("show collation like '$Collation'"); + if (!$Data) + return $False; + if ($CollationRow = mysql_fetch_assoc($Data)) { + $CharacterSet = $CollationRow['Charset']; + return $CharacterSet; + } + return FALSE; + } + + public function GetDatabasePrefixes() { + // Grab all of the tables. + $Data = $this->Query('show tables'); + if ($Data === FALSE) + return array(); + + // Get the names in an array for easier parsing. + $Tables = array(); + while (($Row = mysql_fetch_array($Data, MYSQL_NUM)) !== FALSE) { + $Tables[] = $Row[0]; + } + sort($Tables); + + $Prefixes = array(); + + // Loop through each table and get it's prefixes. + foreach ($Tables as $Table) { + $PxFound = FALSE; + foreach ($Prefixes as $PxIndex => $Px) { + $NewPx = $this->_GetPrefix($Table, $Px); + if (strlen($NewPx) > 0) { + $PxFound = TRUE; + if ($NewPx != $Px) { + $Prefixes[$PxIndex] = $NewPx; + } + break; + } + } + if (!$PxFound) { + $Prefixes[] = $Table; + } + } + return $Prefixes; + } + + protected function _GetPrefix($A, $B) { + $Length = min(strlen($A), strlen($B)); + $Prefix = ''; + + for ($i = 0; $i < $Length; $i++) { + if ($A[$i] == $B[$i]) + $Prefix .= $A[$i]; + else + break; + } + return $Prefix; + } + + public function GetExportStructure($Row, $Structure, &$Mappings) { + $ExportStructure = array(); + // See what columns from the structure are in + + // See what columns to add to the end of the structure. + foreach($Row as $Column => $X) { + if(array_key_exists($Column, $Mappings)) { + $Mapping = $Mappings[$Column]; + if(is_string($Mapping)) { + if(array_key_exists($Mapping, $Structure)) { + // This an existing column. + $DestColumn = $Mapping; + $DestType = $Structure[$DestColumn]; + } else { + // This is a created column. + $DestColumn = $Column; + $DestType = $Mapping; + } + } elseif(is_array($Mapping)) { + $DestColumn = $Mapping['Column']; + if (isset($Mapping['Type'])) + $DestType = $Mapping['Type']; + elseif(isset($Structure[$DestColumn])) + $DestType = $Structure[$DestColumn]; + else + $DestType = 'varchar(255)'; + $Mappings[$Column] = $DestColumn; + } + } elseif(array_key_exists($Column, $Structure)) { + $DestColumn = $Column; + $DestType = $Structure[$Column]; + } else { + $DestColumn = ''; + $DestType = ''; + } + + // Check to see if we have to add the column to the export structure. + if($DestColumn && !array_key_exists($DestColumn, $ExportStructure)) { + // TODO: Make sure $DestType is a valid MySQL type. + $ExportStructure[$DestColumn] = $DestType; + } + } + return $ExportStructure; + } + + protected function _GetTableHeader($Structure, $GlobalStructure) { + $TableHeader = ''; + + foreach($Structure as $Column => $Type) { + if(strlen($TableHeader) > 0) + $TableHeader .= self::DELIM; + if(array_key_exists($Column, $GlobalStructure)) { + $TableHeader .= $Column; + } else { + $TableHeader .= $Column.':'.$Type; + } + } + return $TableHeader; + } + + /** + * Decode the HTML out of a value. + */ + public function HTMLDecoder($Value) { + return html_entity_decode($Value, ENT_COMPAT, 'UTF-8'); + } + + /** + * vBulletin needs some fields decoded and it won't hurt the others. + */ +// public function HTMLDecoder($Table, $Field, $Value) { +// if(($Table == 'Category' || $Table == 'Discussion') && $Field == 'Name') +// return html_entity_decode($Value); +// else +// return $Value; +// } + + + protected function _OpenFile() { + if($this->UseStreaming) { + /** Setup the output to stream the file. */ + + // required for IE, otherwise Content-Disposition may be ignored + if(ini_get('zlib.output_compression')) + ini_set('zlib.output_compression', 'Off'); + + @ob_end_clean(); + + + $fp = fopen('php://output', 'ab'); + header("Content-Disposition: attachment; filename=\"{$this->Path}\""); + header('Content-Type: text/plain'); + header("Content-Transfer-Encoding: binary"); + header('Accept-Ranges: bytes'); + header("Cache-control: private"); + header('Pragma: private'); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + } else { + $this->Path = str_replace(' ', '_', $this->Path); + if($this->UseCompression()) + $fp = gzopen($this->Path, 'wb'); + else + $fp = fopen($this->Path, 'wb'); + } + $this->_File = $fp; + return $fp; + } + + /** Execute a SQL query on the current connection. + * + * @param string $Query The sql to execute. + * @return resource The query cursor. + */ + public function Query($Query, $Buffer = FALSE) { + if (isset($this->_LastResult) && is_resource($this->_LastResult)) + mysql_free_result($this->_LastResult); + $Query = str_replace(':_', $this->Prefix, $Query); // replace prefix. + + $Connection = mysql_connect($this->_Host, $this->_Username, $this->_Password); + mysql_select_db($this->_DbName); + mysql_query("set names {$this->CharacterSet}"); + if ($Buffer) + $Result = mysql_query($Query, $Connection); + else { + $Result = mysql_unbuffered_query($Query, $Connection); + if (is_resource($Result)) + $this->_LastResult = $Result; + } + + if ($Result === FALSE) { + trigger_error(mysql_error($Connection)); + } + + return $Result; + } + + public function SetConnection($Host = NULL, $Username = NULL, $Password = NULL, $DbName = NULL) { + $this->_Host = $Host; + $this->_Username = $Username; + $this->_Password = $Password; + $this->_DbName = $DbName; + } + + /** + * Returns an array of all the expected export tables and expected columns in the exports. + * When exporting tables using ExportTable() all of the columns in this structure will always be exported in the order here, regardless of how their order in the query. + * @return array + * @see vnExport::ExportTable() + */ + public function Structures() { + return $this->_Structures; + } + + /** + * Whether or not to use compression on the output file. + * @param bool $Value The value to set or NULL to just return the value. + * @return bool + */ + public function UseCompression($Value = NULL) { + if($Value !== NULL) + $this->_UseCompression = $Value; + + return $this->_UseCompression && !$this->UseStreaming && function_exists('gzopen'); + } + + /** + * Returns the version of export file that will be created with this export. + * The version is used when importing to determine the format of this file. + * @return string + */ + public function Version() { + return VERSION; + } + + /** + * Checks whether or not a table and columns exist in the database. + * + * @param string $Table The name of the table to check. + * @param array $Columns An array of column names to check. + * @return bool|array The method will return one of the following + * - true: If table and all of the columns exist. + * - false: If the table does not exist. + * - array: The names of the missing columns if one or more columns don't exist. + */ + public function Exists($Table, $Columns = array()) { + $Desc = $this->Query('describe :_'.$Table); + if ($Desc === false) + return false; + + if (count($Columns) == 0) + return true; + + $Cols = array(); + $Missing = array(); + while (($TD = mysql_fetch_assoc($Desc)) !== false) { + $Cols[] = $TD['Field']; + } + foreach ($Columns as $Column) { + if (!in_array($Column, $Cols)) + $Missing[] = $Column; + } + mysql_free_result($Desc); + return count($Missing) == 0 ? true : $Missing; + } + + /** + * Checks all required source tables are present + */ + public function VerifySource($RequiredTables) { + $MissingTables = false; + $CountMissingTables = 0; + $MissingColumns = array(); + + foreach($RequiredTables as $ReqTable => $ReqColumns) { + $TableDescriptions = $this->Query('describe :_'.$ReqTable); + //echo 'describe '.$Prefix.$ReqTable; + if($TableDescriptions === false) { // Table doesn't exist + $CountMissingTables++; + if($MissingTables !== false) + $MissingTables .= ', '.$ReqTable; + else + $MissingTables = $ReqTable; + } + else { + // Build array of columns in this table + $PresentColumns = array(); + while (($TD = mysql_fetch_assoc($TableDescriptions)) !== false) { + $PresentColumns[] = $TD['Field']; + } + // Compare with required columns + foreach($ReqColumns as $ReqCol) { + if(!in_array($ReqCol, $PresentColumns)) + $MissingColumns[$ReqTable][] = $ReqCol; + } + + mysql_free_result($TableDescriptions); + } + } + + // Return results + if($MissingTables === false) { + if(count($MissingColumns) > 0) { + $Result = array(); + + // Build a string of missing columns. + foreach ($MissingColumns as $Table => $Columns) { + $Result[] = "The $Table table is missing the following column(s): ".implode(', ', $Columns); + } + return implode("
            \n", $Result); + } + else return true; // Nothing missing! + } + elseif($CountMissingTables == count($RequiredTables)) { + $Result = 'The required tables are not present in the database. Make sure you entered the correct database name and prefix and try again.'; + + // Guess the prefixes to notify the user. + $Prefixes = $this->GetDatabasePrefixes(); + if (count($Prefixes) == 1) + $Result .= ' Based on the database you provided, your database prefix is probably '.implode(', ', $Prefixes); + elseif (count($Prefixes) > 0) + $Result .= ' Based on the database you provided, your database prefix is probably one of the following: '.implode(', ', $Prefixes); + + return $Result; + } + else { + return 'Missing required database tables: '.$MissingTables; + } + } +} +?>'; + ?> + + + + Vanilla Porter - Forum Export Tool + + + + +
            +
            +
            +

            + Vanilla +

            Vanilla Porter Version

            +

            +
            + +
            +
            + + +
            +
              +
            • +
            +
            + + +
            + Welcome to the Vanilla Porter. + This application will export your existing forum data to the Vanilla 2 import format. + If you want more information on how to use this application go to + http://vanillaforums.com/blog/help-topics/importing-data. +
            +
            + +
            + +
            +
              +
            • +
            +
            + +
              +
            • + + +
            • +
            • + + +
            • +
            • + + +
            • +
            • + + +
            • +
            • + + +
            • +
            • + + +
            • + +
            • + +
            • + +
            +
            + +
            +
            +
            + + + "; + foreach($Msgs as $Msg) { + echo "

            $Msg

            \n"; + } + echo ""; + if($Path) + echo "Download $Path"; + } + PageFooter(); +} + +function GetValue($Key, $Collection = NULL, $Default = '') { + if(!$Collection) + $Collection = $_POST; + if(array_key_exists($Key, $Collection)) + return $Collection[$Key]; + return $Default; +} +?>HandleInfoForm(); + } + + /** + * Logic for export process + */ + public function DoExport() { + global $Supported; + + // Test connection + $Msg = $this->TestDatabase(); + if($Msg === true) { + // Create db object + $Ex = new ExportModel; + $Ex->SetConnection($this->DbInfo['dbhost'], $this->DbInfo['dbuser'], $this->DbInfo['dbpass'], $this->DbInfo['dbname']); + $Ex->Prefix = $this->DbInfo['prefix']; + $Ex->UseStreaming = $this->UseStreaming; + // Test src tables' existence structure + $Msg = $Ex->VerifySource($this->SourceTables); + if($Msg === true) { + // Good src tables - Start dump + $Ex->UseCompression(TRUE); + $Ex->FilenamePrefix = $this->DbInfo['dbname']; + set_time_limit(60*60); + $this->ForumExport($Ex); + + // Write the results. + if($Ex->UseStreaming) + exit; + else + ViewExportResult($Ex->Comments, 'Info', $Ex->Path); + } + else + ViewForm(array('Supported' => $Supported, 'Msg' => $Msg, 'Info' => $this->DbInfo)); // Back to form with error + } + else + ViewForm(array('Supported' => $Supported, 'Msg' => $Msg, 'Info' => $this->DbInfo)); // Back to form with error + } + + /** + * User submitted db connection info + */ + public function HandleInfoForm() { + $this->DbInfo = array( + 'dbhost' => 'localhost', + 'dbuser' => 'root', + 'dbpass' => 'Id0nTkN0w', + 'dbname' => 'rock', + 'type' => 'SMF', + 'prefix' => 'smf_'); + $this->UseStreaming = FALSE; + } + + /** + * Test database connection info + */ + public function TestDatabase() { + // Connection + if($C = @mysql_connect($this->DbInfo['dbhost'], $this->DbInfo['dbuser'], $this->DbInfo['dbpass'])) { + // Database + if(mysql_select_db($this->DbInfo['dbname'], $C)) { + mysql_close($C); + return true; + } + else { + mysql_close($C); + return 'Could not find database “'.$this->DbInfo['dbname'].'”.'; + } + } + else + return 'Could not connect to '.$this->DbInfo['dbhost'].' as '.$this->DbInfo['dbuser'].' with given password.'; + } +} +?> columns */ + public $SourceTables = array( + 'User'=> array('UserID', 'Name', 'Password', 'Email', 'CountComments'), + 'Role'=> array('RoleID', 'Name', 'Description'), + 'Category'=> array('CategoryID', 'Name', 'Description'), + 'Discussion'=> array('DiscussionID', 'Name', 'CategoryID', 'DateCreated', 'AuthUserID', 'DateLastActive', 'Closed', 'Sticky', 'CountComments', 'Sink', 'LastUserID'), + 'Comment'=> array('CommentID', 'DiscussionID', 'AuthUserID', 'DateCreated', 'EditUserID', 'DateEdited', 'Body') + ); + + /** + * Forum-specific export format + * @todo Project file size / export time and possibly break into multiple files + * + */ + protected function ForumExport($Ex) { + // Get the characterset for the comments. + $CharacterSet = $Ex->GetCharacterSet('Comment'); + if ($CharacterSet) + $Ex->CharacterSet = $CharacterSet; + + // Begin + $Ex->BeginExport('', 'Vanilla 1.*'); + + // Users + $User_Map = array( + 'UserID'=>'UserID', + 'Name'=>'Name', + 'Password'=>'Password', + 'Email'=>'Email', + 'Icon'=>'Photo', + 'CountComments'=>'CountComments' + ); + $Ex->ExportTable('User', "SELECT * FROM :_User", $User_Map); // ":_" will be replaced by database prefix + + // Roles + /* + 'RoleID' => 'int', + 'Name' => 'varchar(100)', + 'Description' => 'varchar(200)' + */ + $Role_Map = array( + 'RoleID'=>'RoleID', + 'Name'=>'Name', + 'Description'=>'Description' + ); + $Ex->ExportTable('Role', 'select * from :_Role', $Role_Map); + + // UserRoles + /* + 'UserID' => 'int', + 'RoleID' => 'int' + */ + $UserRole_Map = array( + 'UserID' => 'UserID', + 'RoleID'=> 'RoleID' + ); + $Ex->ExportTable('UserRole', 'select UserID, RoleID from :_User', $UserRole_Map); + + // Categories + /* + 'CategoryID' => 'int', + 'Name' => 'varchar(30)', + 'Description' => 'varchar(250)', + 'ParentCategoryID' => 'int', + 'DateInserted' => 'datetime', + 'InsertUserID' => 'int', + 'DateUpdated' => 'datetime', + 'UpdateUserID' => 'int' + */ + $Category_Map = array( + 'CategoryID' => 'CategoryID', + 'Name' => 'Name', + 'Description'=> 'Description' + ); + $Ex->ExportTable('Category', "select CategoryID, Name, Description from :_Category", $Category_Map); + + // Discussions + /* + 'DiscussionID' => 'int', + 'Name' => 'varchar(100)', + 'CategoryID' => 'int', + 'Body' => 'text', + 'Format' => 'varchar(20)', + 'DateInserted' => 'datetime', + 'InsertUserID' => 'int', + 'DateUpdated' => 'datetime', + 'UpdateUserID' => 'int', + 'Score' => 'float', + 'Announce' => 'tinyint', + 'Closed' => 'tinyint' + */ + $Discussion_Map = array( + 'DiscussionID' => 'DiscussionID', + 'Name' => 'Name', + 'CategoryID'=> 'CategoryID', + 'DateCreated'=>'DateInserted', + 'DateCreated2'=>'DateUpdated', + 'AuthUserID'=>'InsertUserID', + 'DateLastActive'=>'DateLastComment', + 'AuthUserID2'=>'UpdateUserID', + 'Closed'=>'Closed', + 'Sticky'=>'Announce', + 'CountComments'=>'CountComments', + 'Sink'=>'Sink', + 'LastUserID'=>'LastCommentUserID' + ); + $Ex->ExportTable('Discussion', + "SELECT d.*, + d.LastUserID as LastCommentUserID, + d.DateCreated as DateCreated2, d.AuthUserID as AuthUserID2 + FROM :_Discussion d + WHERE coalesce(d.WhisperUserID, 0) = 0", $Discussion_Map); + + // Comments + /* + 'CommentID' => 'int', + 'DiscussionID' => 'int', + 'DateInserted' => 'datetime', + 'InsertUserID' => 'int', + 'DateUpdated' => 'datetime', + 'UpdateUserID' => 'int', + 'Format' => 'varchar(20)', + 'Body' => 'text', + 'Score' => 'float' + */ + $Comment_Map = array( + 'CommentID' => 'CommentID', + 'DiscussionID' => 'DiscussionID', + 'AuthUserID' => 'InsertUserID', + 'DateCreated' => 'DateInserted', + 'EditUserID' => 'UpdateUserID', + 'DateEdited' => 'DateUpdated', + 'Body' => 'Body', + 'FormatType' => 'Format' + ); + $Ex->ExportTable('Comment', " + SELECT + c.* + FROM :_Comment c + JOIN :_Discussion d + ON c.DiscussionID = d.DiscussionID + WHERE coalesce(d.WhisperUserID, 0) = 0 + AND coalesce(c.WhisperUserID, 0) = 0", $Comment_Map); + + $Ex->ExportTable('UserDiscussion', " + SELECT + w.UserID, + w.DiscussionID, + w.CountComments, + w.LastViewed as DateLastViewed, + case when b.UserID is not null then 1 else 0 end AS Bookmarked + FROM :_UserDiscussionWatch w + LEFT JOIN :_UserBookmark b + ON w.DiscussionID = b.DiscussionID AND w.UserID = b.UserID"); + + // Conversations + + // Create a mapping table for conversations. + // This cannot be a temporary table because of some of the union selects it is used in below. + $Ex->Query("create table LUM_V1Conversation (ConversationID int auto_increment primary key, DiscussionID int, UserID1 int, UserID2 int, DateCreated datetime, EditUserID int, DateEdited datetime)"); + + $Ex->Query("insert LUM_V1Conversation (DiscussionID, UserID1, UserID2, DateCreated, EditUserID, DateEdited) + select + DiscussionID, + AuthUserID as UserID1, + WhisperUserID as UserID2, + min(DateCreated), + max(EditUserID), + max(DateEdited) + from LUM_Comment + where coalesce(WhisperUserID, 0) <> 0 + group by DiscussionID, AuthUserID, WhisperUserID + + union + + select + DiscussionID, + AuthUserID as UserID1, + WhisperUserID as UserID2, + DateCreated, + WhisperFromLastUserID, + DateLastWhisper + from LUM_Discussion + where coalesce(WhisperUserID, 0) <> 0"); + + // Delete redundant conversations. + $Ex->Query("create index ix_V1UserID1 on LUM_V1Conversation (DiscussionID, UserID1)"); // for speed + $Ex->Query("delete t.* + from LUM_V1Conversation t + inner join LUM_Comment c + on c.DiscussionID = t.DiscussionID + and c.AuthUserID = t.UserID2 + and c.WhisperUserID = t.UserID1 + and c.AuthUserID < c.WhisperUserID"); + + + $Conversation_Map = array( + 'UserID1' => 'InsertUserID', + 'DateCreated' => 'DateInserted', + 'EditUserID' => 'UpdateUserID', + 'DateEdited' => 'DateUpdated' + ); + $Ex->ExportTable('Conversation', "select * from :_V1Conversation", $Conversation_Map); + + // ConversationMessage + /* + 'MessageID' => 'int', + 'ConversationID' => 'int', + 'Body' => 'text', + 'InsertUserID' => 'int', + 'DateInserted' => 'datetime' + */ + $ConversationMessage_Map = array( + 'CommentID' => 'MessageID', + 'DiscussionID' => 'ConversationID', + 'Body' => 'Body', + 'AuthUserID' => 'InsertUserID', + 'DateCreated' => 'DateInserted' + ); + $Ex->ExportTable('ConversationMessage', " + select c.CommentID, t.ConversationID, c.AuthUserID, c.DateCreated, c.Body + from LUM_Comment c + join LUM_V1Conversation t + on t.DiscussionID = c.DiscussionID + and c.WhisperUserID in (t.UserID1, t.UserID2) + and c.AuthUserID in (t.UserID1, t.UserID2) + where c.WhisperUserID > 0 + + union + + select c.CommentID, t.ConversationID, c.AuthUserID, c.DateCreated, c.Body + from LUM_Comment c + join LUM_Discussion d + on c.DiscussionID = d.DiscussionID + join LUM_V1Conversation t + on t.DiscussionID = d.DiscussionID + and d.WhisperUserID in (t.UserID1, t.UserID2) + and d.AuthUserID in (t.UserID1, t.UserID2) + where d.WhisperUserID > 0", $ConversationMessage_Map); + + // UserConversation + /* + 'UserID' => 'int', + 'ConversationID' => 'int', + 'LastMessageID' => 'int' + */ + $UserConversation_Map = array( + 'UserID' => 'UserID', + 'ConversationID' => 'ConversationID' + ); + $Ex->ExportTable('UserConversation', + "select UserID1 as UserID, ConversationID + from LUM_V1Conversation + + union + + select UserID2 as UserID, ConversationID + from LUM_V1Conversation", $UserConversation_Map); + + $Ex->Query("drop table :_V1Conversation"); + + // End + $Ex->EndExport(); + } + +} +?> + columns */ + protected $SourceTables = array( + 'user' => array('userid','username','password','email','referrerid','timezoneoffset','posts','salt', + 'birthday_search','joindate','lastvisit','lastactivity','membergroupids','usergroupid', + 'usertitle', 'homepage', 'aim', 'icq', 'yahoo', 'msn', 'skype', 'styleid', 'avatarid'), + 'usergroup'=> array('usergroupid','title','description'), + 'userfield' => array('userid'), + 'phrase' => array('varname','text','product','fieldname','varname'), + 'thread' => array('threadid','forumid','postuserid','title','open','sticky','dateline','lastpost'), + 'deletionlog' => array('type','primaryid'), + 'post' => array('postid','threadid','pagetext','userid','dateline'), + 'forum' => array('forumid','description','displayorder','title','description','displayorder'), + 'subscribethread' => array('userid','threadid') + ); + + /** + * Forum-specific export format + * @todo Project file size / export time and possibly break into multiple files + */ + protected function ForumExport($Ex) { + // Begin + $Ex->BeginExport('', 'vBulletin 3.*'); + + // Users + $User_Map = array( + 'userid'=>'UserID', + 'username'=>'Name', + 'password2'=>'Password', + 'email'=>'Email', + 'referrerid'=>'InviteUserID', + 'timezoneoffset'=>'HourOffset', + //'posts'=>'CountComments', + 'salt'=>'char(3)', + 'photopath'=>'Photo' + ); + $Ex->ExportTable('User', "select *, + concat(`password`, salt) as password2, + concat('avatar', userid, '_', avatarid, '.gif') as photopath, + DATE_FORMAT(birthday_search,GET_FORMAT(DATE,'ISO')) as DateOfBirth, + FROM_UNIXTIME(joindate) as DateFirstVisit, + FROM_UNIXTIME(lastvisit) as DateLastActive, + FROM_UNIXTIME(joindate) as DateInserted, + FROM_UNIXTIME(lastactivity) as DateUpdated + from :_user", $User_Map); // ":_" will be replace by database prefix + + // Roles + $Role_Map = array( + 'usergroupid'=>'RoleID', + 'title'=>'Name', + 'description'=>'Description' + ); + $Ex->ExportTable('Role', 'select * from :_usergroup', $Role_Map); + + // UserRoles + $UserRole_Map = array( + 'userid'=>'UserID', + 'usergroupid'=>'RoleID' + ); + $Ex->Query("CREATE TEMPORARY TABLE VbulletinRoles (userid INT UNSIGNED NOT NULL, usergroupid INT UNSIGNED NOT NULL)"); + # Put primary groups into tmp table + $Ex->Query("insert into VbulletinRoles (userid, usergroupid) select userid, usergroupid from :_user"); + # Put stupid CSV column into tmp table + $SecondaryRoles = $Ex->Query("select userid, usergroupid, membergroupids from :_user", TRUE); + if (is_resource($SecondaryRoles)) { + while (($Row = @mysql_fetch_assoc($SecondaryRoles)) !== false) { + if($Row['membergroupids']!='') { + $Groups = explode(',',$Row['membergroupids']); + foreach($Groups as $GroupID) { + $Ex->Query("insert into VbulletinRoles (userid, usergroupid) values({$Row['userid']},{$GroupID})", TRUE); + } + } + } + } + # Export from our tmp table and drop + $Ex->ExportTable('UserRole', 'select distinct userid, usergroupid from VbulletinRoles', $UserRole_Map); + $Ex->Query("DROP TABLE IF EXISTS VbulletinRoles"); + + // UserMeta + $Ex->Query("CREATE TEMPORARY TABLE VbulletinUserMeta (`UserID` INT NOT NULL ,`MetaKey` VARCHAR( 64 ) NOT NULL ,`MetaValue` VARCHAR( 255 ) NOT NULL)"); + # Standard vB user data + $UserFields = array('usertitle', 'homepage', 'aim', 'icq', 'yahoo', 'msn', 'skype', 'styleid'); + foreach($UserFields as $Field) + $Ex->Query("insert into VbulletinUserMeta (UserID, MetaKey, MetaValue) select userid, '$Field.', $Field from :_user where $Field !=''"); + # Dynamic vB user data (userfield) + $ProfileFields = $Ex->Query("select varname, text from :_phrase where product='vbulletin' and fieldname='cprofilefield' and varname like 'field%_title'"); + if (is_resource($ProfileFields)) { + while (($Field = @mysql_fetch_assoc($ProfileFields)) !== false) { + //foreach ($ProfileFields as $Field) { + $VbulletinField = str_replace('_title','',$Field['varname']); + $MetaKey = preg_replace('/[^0-9a-z_-]/','',strtolower($Field['text'])); + $Ex->Query("insert into VbulletinUserMeta (UserID, MetaKey, MetaValue) + select userid, '".$MetaKey."', ".$VbulletinField." from :_userfield where ".$VbulletinField."!=''"); + } + } + # Export from our tmp table and drop + $Ex->ExportTable('UserMeta', 'select UserID, MetaKey as Name, MetaValue as Value from VbulletinUserMeta'); + $Ex->Query("DROP TABLE IF EXISTS VbulletinUserMeta"); + + // Categories + $Category_Map = array( + 'forumid'=>'CategoryID', + 'description'=>'Description', + 'Name'=>array('Column'=>'Name','Filter'=>array($Ex, 'HTMLDecoder')), + 'displayorder'=>array('Column'=>'Sort', 'Type'=>'int') + ); + $Ex->ExportTable('Category', "select forumid, left(title,30) as Name, description, displayorder + from :_forum where threadcount > 0", $Category_Map); + + // Discussions + $Discussion_Map = array( + 'threadid'=>'DiscussionID', + 'forumid'=>'CategoryID', + 'postuserid'=>'InsertUserID', + 'postuserid2'=>'UpdateUserID', + 'title'=>array('Column'=>'Name','Filter'=>array($Ex, 'HTMLDecoder')), + 'Format'=>'Format' + ); + $Ex->ExportTable('Discussion', "select t.*, + t.postuserid as postuserid2, + p.pagetext as Body, + 'BBCode' as Format, + replycount+1 as CountComments, + convert(ABS(open-1),char(1)) as Closed, + convert(sticky,char(1)) as Announce, + FROM_UNIXTIME(t.dateline) as DateInserted, + FROM_UNIXTIME(lastpost) as DateUpdated, + FROM_UNIXTIME(lastpost) as DateLastComment + from :_thread t + left join :_deletionlog d ON (d.type='thread' AND d.primaryid=t.threadid) + left join :_post p ON p.postid = t.firstpostid + where d.primaryid IS NULL", $Discussion_Map); + + // Comments + $Comment_Map = array( + 'postid' => 'CommentID', + 'threadid' => 'DiscussionID', + 'pagetext' => 'Body', + 'Format' => 'Format' + ); + $Ex->ExportTable('Comment', "select p.*, + 'BBCode' as Format, + p.userid as InsertUserID, + p.userid as UpdateUserID, + FROM_UNIXTIME(p.dateline) as DateInserted, + FROM_UNIXTIME(p.dateline) as DateUpdated + from :_post p + inner join :_thread t ON p.threadid = t.threadid + left join :_deletionlog d ON (d.type='post' AND d.primaryid=p.postid) + where p.postid <> t.firstpostid and d.primaryid IS NULL", $Comment_Map); + + // UserDiscussion + $UserDiscussion_Map = array( + 'DateLastViewed' => 'datetime'); + $Ex->ExportTable('UserDiscussion', "select + tr.userid as UserID, + tr.threadid as DiscussionID, + FROM_UNIXTIME(tr.readtime) as DateLastViewed, + case when st.threadid is not null then 1 else 0 end as Bookmarked + from :_threadread tr + left join :_subscribethread st on tr.userid = st.userid and tr.threadid = st.threadid"); + + // Activity (3.8+) + $Activity_Map = array( + 'postuserid'=>'ActivityUserID', + 'userid'=>'RegardingUserID', + 'pagetext'=>'Story', + 'postuserid'=>'InsertUserID' + ); + $Tables = $Ex->Query("show tables like ':_visitormessage'"); + if (mysql_fetch_assoc($Tables) !== FALSE) { # Table is present + $Ex->ExportTable('Activity', "select *, + FROM_UNIXTIME(dateline) as DateInserted + from :_visitormessage + where state='visible'", $Activity_Map); + } + + // End + $Ex->EndExport(); + } + +} +?> columns */ + protected $SourceTables = array( + 'users' => array('user_id', 'username', 'user_password', 'user_email', 'user_timezone', 'user_posts', 'user_regdate', + 'user_lastvisit', 'user_regdate'), + 'groups' => array('group_id', 'group_name', 'group_desc'), + 'user_group' => array('user_id', 'group_id'), + 'forums' => array('forum_id', 'forum_name', 'forum_desc', 'left_id', 'parent_id'), + 'topics' => array('topic_id', 'forum_id', 'topic_poster', 'topic_title', 'topic_views', 'topic_first_post_id', + 'topic_replies', 'topic_status', 'topic_type', 'topic_time', 'topic_last_post_time', 'topic_last_post_time'), + 'posts' => array('post_id', 'topic_id', 'post_text', 'poster_id', 'post_edit_user', 'post_time', 'post_edit_time'), + 'bookmarks' => array('user_id', 'topic_id') + ); + + /** + * Forum-specific export format. + * @param ExportModel $Ex + */ + protected function ForumExport($Ex) { + // Begin + $Ex->BeginExport('', 'phpBB 3.*', array('HashMethod' => 'phpBB')); + + // Users + $User_Map = array( + 'user_id'=>'UserID', + 'username'=>'Name', + 'user_password'=>'Password', + 'user_email'=>'Email', + 'user_timezone'=>'HourOffset', + 'user_posts'=>array('Column' => 'CountComments', 'Type' => 'int') + ); + $Ex->ExportTable('User', "select *, + FROM_UNIXTIME(nullif(user_regdate, 0)) as DateFirstVisit, + FROM_UNIXTIME(nullif(user_lastvisit, 0)) as DateLastActive, + FROM_UNIXTIME(nullif(user_regdate, 0)) as DateInserted + from :_users", $User_Map); // ":_" will be replace by database prefix + + + // Roles + $Role_Map = array( + 'group_id'=>'RoleID', + 'group_name'=>'Name', + 'group_desc'=>'Description' + ); + $Ex->ExportTable('Role', 'select * from :_groups', $Role_Map); + + + // UserRoles + $UserRole_Map = array( + 'user_id'=>'UserID', + 'group_id'=>'RoleID' + ); + $Ex->ExportTable('UserRole', 'select user_id, group_id from :_users + union + select user_id, group_id from :_user_group', $UserRole_Map); + + // Categories + $Category_Map = array( + 'forum_id'=>'CategoryID', + 'forum_name'=>'Name', + 'forum_desc'=>'Description', + 'left_id'=>'Sort' + ); + $Ex->ExportTable('Category', "select *, + nullif(parent_id,0) as ParentCategoryID + from :_forums", $Category_Map); + + + // Discussions + $Discussion_Map = array( + 'topic_id'=>'DiscussionID', + 'forum_id'=>'CategoryID', + 'topic_poster'=>'InsertUserID', + 'topic_title'=>'Name', + 'Format'=>'Format', + 'topic_views'=>'CountViews', + 'topic_first_post_id'=>array('Column'=>'FirstCommentID','Type'=>'int') + ); + $Ex->ExportTable('Discussion', "select t.*, + 'BBCode' as Format, + topic_replies+1 as CountComments, + case t.topic_status when 1 then 1 else 0 end as Closed, + case t.topic_type when 1 then 1 else 0 end as Announce, + FROM_UNIXTIME(t.topic_time) as DateInserted, + FROM_UNIXTIME(t.topic_last_post_time) as DateUpdated, + FROM_UNIXTIME(t.topic_last_post_time) as DateLastComment + from :_topics t", $Discussion_Map); + + // Comments + $Comment_Map = array( + 'post_id' => 'CommentID', + 'topic_id' => 'DiscussionID', + 'post_text' => array('Column'=>'Body','Filter'=>array($this, 'RemoveBBCodeUIDs')), + 'Format' => 'Format', + 'poster_id' => 'InsertUserID', + 'post_edit_user' => 'UpdateUserID' + ); + $Ex->ExportTable('Comment', "select p.*, + 'BBCode' as Format, + FROM_UNIXTIME(p.post_time) as DateInserted, + FROM_UNIXTIME(nullif(p.post_edit_time,0)) as DateUpdated + from :_posts p", $Comment_Map); + + // UserDiscussion + $UserDiscussion_Map = array( + 'user_id' => 'UserID', + 'topic_id' => 'DiscussionID'); + $Ex->ExportTable('UserDiscussion', "select b.*, + 1 as Bookmarked + from :_bookmarks b", $UserDiscussion_Map); + + // End + $Ex->EndExport(); + } + + public function RemoveBBCodeUIDs($Value, $Field, $Row) { + $UID = $Row['bbcode_uid']; + return str_replace(':'.$UID, '', $Value); + } +} +?> columns */ + protected $SourceTables = array( + 'forums' => array(), + 'posts' => array(), + 'topics' => array(), + 'users' => array('ID', 'user_nicename', 'user_pass', 'user_email', 'user_registered'), + 'meta' => array() + ); + + /** + * Forum-specific export format. + * @param ExportModel $Ex + */ + protected function ForumExport($Ex) { + // Begin + $Ex->BeginExport('', 'bbPress 1.*', array('HashMethod' => 'Vanilla')); + + // Users + $User_Map = array( + 'ID'=>'UserID', + 'user_nicename'=>'Name', + 'user_pass'=>'Password', + 'user_email'=>'Email', + 'user_registered'=>'DateInserted' + ); + $Ex->ExportTable('User', "select * from :_users", $User_Map); // ":_" will be replace by database prefix + + // Roles + $Ex->ExportTable('Role', + "select 1 as RoleID, 'Guest' as Name + union select 2, 'Key Master' + union select 3, 'Administrator' + union select 4, 'Moderator' + union select 5, 'Member' + union select 6, 'Inactive' + union select 7, 'Blocked'"); + + + // UserRoles + $UserRole_Map = array( + 'user_id'=>'UserID' + ); + $Ex->ExportTable('UserRole', + "select distinct + user_id, + case when locate('keymaster', meta_value) <> 0 then 2 + when locate('administrator', meta_value) <> 0 then 3 + when locate('moderator', meta_value) <> 0 then 4 + when locate('member', meta_value) <> 0 then 5 + when locate('inactive', meta_value) <> 0 then 6 + when locate('blocked', meta_value) <> 0 then 7 + else 1 end as RoleID + from :_usermeta + where meta_key = 'bb_capabilities'", $UserRole_Map); + + // Categories + $Category_Map = array( + 'forum_id'=>'CategoryID', + 'forum_name'=>'Name', + 'forum_desc'=>'Description', + 'form_slug'=>'UrlCode', + 'left_order'=>'Sort' + ); + $Ex->ExportTable('Category', "select *, + nullif(forum_parent,0) as ParentCategoryID + from :_forums", $Category_Map); + + + // Discussions + $Discussion_Map = array( + 'topic_id'=>'DiscussionID', + 'forum_id'=>'CategoryID', + 'topic_poster'=>'InsertUserID', + 'topic_title'=>'Name', + 'Format'=>'Format', + 'topic_start_time'=>'DateInserted', + 'topic_sticky'=>'Announce' + ); + $Ex->ExportTable('Discussion', "select t.*, + 'Html' as Format, + case t.topic_open when 0 then 1 else 0 end as Closed + from :_topics t", $Discussion_Map); + + // Comments + $Comment_Map = array( + 'post_id' => 'CommentID', + 'topic_id' => 'DiscussionID', + 'post_text' => 'Body', + 'Format' => 'Format', + 'Body' => array('Column'=>'Body','Filter'=>'bbPressTrim'), + 'poster_id' => 'InsertUserID', + 'post_time' => 'DateInserted' + ); + $Ex->ExportTable('Comment', "select p.*, + 'Html' as Format + from :_posts p", $Comment_Map); + + // Conversations. + + // The export is different depending on the table layout. + $PM = $Ex->Exists('bbpm', array('ID', 'pm_title', 'pm_from', 'pm_to', 'pm_text', 'sent_on', 'pm_thread')); + $ConversationVersion = ''; + + if ($PM === TRUE) { + // This is from an old version of the plugin. + $ConversationVersion = 'old'; + } elseif (is_array($PM) && count(array_intersect(array('ID', 'pm_from', 'pm_text', 'sent_on', 'pm_thread'), $PM)) == 0) { + // This is from a newer version of the plugin. + $ConversationVersion = 'new'; + } + + if ($ConversationVersion) { + // Conversation. + $Conv_Map = array( + 'pm_thread' => 'ConversationID', + 'pm_from' => 'InsertUserID' + ); + $Ex->ExportTable('Conversation', + "select *, from_unixtime(sent_on) as DateInserted + from :_bbpm + where thread_depth = 0", $Conv_Map); + + // ConversationMessage. + $ConvMessage_Map = array( + 'ID' => 'MessageID', + 'pm_thread' => 'ConversationID', + 'pm_from' => 'InsertUserID', + 'pm_text' => array('Column'=>'Body','Filter'=>'bbPressTrim') + ); + $Ex->ExportTable('ConversationMessage', + 'select *, from_unixtime(sent_on) as DateInserted + from :_bbpm', $ConvMessage_Map); + + // UserConversation. + $Ex->Query("create temporary table bbpmto (UserID int, ConversationID int)"); + + if ($ConversationVersion == 'new') { + $To = $Ex->Query("select object_id, meta_value from bb_meta where object_type = 'bbpm_thread' and meta_key = 'to'", TRUE); + if (is_resource($To)) { + while (($Row = @mysql_fetch_assoc($To)) !== false) { + $Thread = $Row['object_id']; + $Tos = explode(',', trim($Row['meta_value'], ',')); + $ToIns = ''; + foreach ($Tos as $ToID) { + $ToIns .= "($ToID,$Thread),"; + } + $ToIns = trim($ToIns, ','); + + $Ex->Query("insert bbpmto (UserID, ConversationID) values $ToIns", TRUE); + } + mysql_free_result($To); + + $Ex->ExportTable('UserConversation', 'select * from bbpmto'); + } + } else { + $ConUser_Map = array( + 'pm_thread' => 'ConversationID', + 'pm_from' => 'UserID' + ); + $Ex->ExportTable('UserConversation', + 'select distinct + pm_thread, + pm_from, + del_sender as Deleted + from bb_bbpm + + union + + select distinct + pm_thread, + pm_to, + del_reciever + from bb_bbpm', $ConUser_Map); + } + } + + + + + + + // End + $Ex->EndExport(); + } +} + +function bbPressTrim($Text) { + return rtrim(bb_code_trick_reverse($Text)); +} + +function bb_code_trick_reverse( $text ) { + $text = preg_replace_callback("!(
            |)(.*?)(
            |)!s", 'bb_decodeit', $text); + $text = str_replace(array('

            ', '
            '), '', $text); + $text = str_replace('

            ', "\n", $text); + $text = str_replace('', '
            ', $text); + $text = str_replace('', '

            ', $text); + $text = str_replace('', '

            ', $text); + return $text; +} + +function bb_decodeit( $matches ) { + $text = $matches[2]; + $trans_table = array_flip(get_html_translation_table(HTML_ENTITIES)); + $text = strtr($text, $trans_table); + $text = str_replace('
            ', '', $text); + $text = str_replace('

            ', '', $text); + $text = str_replace('

            ', '
            ', $text); + $text = str_replace(array('&','&'), '&', $text); + $text = str_replace(''', "'", $text); + if ( '
            ' == $matches[1] )
            +		$text = "\n$text\n";
            +	return "`$text`";
            +}
            +?> columns */
            +   protected $SourceTables = array(
            +      'boards' => array(),
            +      'messages' => array(),
            +      'instant_messages' => array(),
            +	  'im_recipients' => array(),
            +	  'categories' => array('ID_CAT', 'name', 'catOrder'),
            +	  'membergroups' => array(),
            +      'members' => array('ID_MEMBER', 'memberName', 'passwd', 'emailAddress', 'dateRegistered')
            +   );
            +   
            +   /**
            +    * Forum-specific export format.
            +    * @param ExportModel $Ex
            +    */
            +   protected function ForumExport($Ex) {
            +      // Begin
            +      $Ex->BeginExport('', 'SMF 1.*', array('HashMethod' => 'reset'));
            +
            +      // Users
            +      $User_Map = array(
            +         'ID_MEMBER'=>'UserID',
            +         'memberName'=>'Name',
            +         'password'=>'Password', // concat(`passwd`, `passwordSalt`) as `password`
            +         'emailAddress'=>'Email',
            +         'DateInserted'=>'DateInserted',
            +		 'timeOffset'=>'HourOffset',
            +         'posts'=>'CountComments',
            +         'avatar'=>'Photo',
            +         'birthdate'=>'DateOfBirth',
            +         'DateFirstVisit'=>'DateFirstVisit',
            +         'DateLastActive'=>'DateLastActive',
            +         'DateUpdated'=>'DateUpdated'
            +      );
            +      $Ex->ExportTable('User', "
            +	  select *,
            +             from_unixtime(dateRegistered) as DateInserted,
            +			 from_unixtime(dateRegistered) as DateFirstVisit,
            +			 from_unixtime(lastLogin) as DateLastActive,
            +			 from_unixtime(lastLogin) as DateUpdated,
            +			 concat(`passwd`, `passwordSalt`) as `password`
            +	  from :_members", $User_Map);
            +
            +      // Roles
            +      $Role_Map = array(
            +         'ID_GROUP'=>'RoleID',
            +         'groupName'=>'Name'
            +      );
            +      $Ex->ExportTable('Role', "select * from :_membergroups", $Role_Map);
            +
            +      // UserRoles
            +      $UserRole_Map = array(
            +         'ID_MEMBER'=>'UserID',
            +		 'ID_GROUP'=>'RoleID'
            +      );
            +      $Ex->ExportTable('UserRole', "select * from :_members", $UserRole_Map);
            +	  
            +      // Categories
            +      $Ex->ExportTable('Category',
            +	  "
            +	  
            +      select
            +        (`ID_CAT` + 1000000) as `CategoryID`,
            +        `name` as `Name`,
            +		'' as `Description`,
            +		null as `ParentCategoryID`,
            +        `catOrder` as `Sort`
            +      from :_categories
            +	  
            +	  union
            +	  
            +      select
            +        `ID_BOARD` as `CategoryID`,
            +        `name` as `Name`,
            +		`description` as `Description`,
            +		(CASE WHEN `ID_PARENT` = 0 THEN (`ID_CAT` + 1000000) ELSE `ID_PARENT` END) as `ParentCategoryID`,
            +        `boardOrder` as `Sort`
            +      from :_boards
            +	  
            +	  ");
            +	  
            +      // Discussions
            +      $Discussion_Map = array(
            +         'ID_TOPIC' => 'DiscussionID', 
            +         'subject' => array('Column'=>'Name','Filter'=>'bb2html'),
            +		 'body' => array('Column'=>'Body','Filter'=>'bb2html'),
            +		 'Format'=>'Format',
            +         'ID_BOARD'=> 'CategoryID',
            +         'DateInserted'=>'DateInserted',
            +         'DateUpdated'=>'DateUpdated',
            +         'ID_MEMBER'=>'InsertUserID',
            +         'DateLastComment'=>'DateLastComment',
            +         'UpdateUserID'=>'UpdateUserID',
            +         'locked'=>'Closed',
            +         'isSticky'=>'Announce',
            +         'CountComments'=>'CountComments',
            +		 'numViews'=>'CountViews',
            +         'LastCommentUserID'=>'LastCommentUserID',
            +		 'ID_LAST_MSG'=>'LastCommentID'
            +      );
            +      $Ex->ExportTable('Discussion', "
            +	  select t.*,
            +	     (t.numReplies + 1) as CountComments,
            +	         m.subject,
            +			 m.body,
            +			 from_unixtime(m.posterTime) as DateInserted,
            +			 from_unixtime(m.modifiedTime) as DateUpdated,
            +			 m.ID_MEMBER,
            +			 from_unixtime(m_end.posterTime) AS DateLastComment,
            +			 m_end.ID_MEMBER AS UpdateUserID,
            +			 m_end.ID_MEMBER AS LastCommentUserID,
            +			 'Html' as Format
            +         from :_topics t
            +		 join :_messages as m on t.ID_FIRST_MSG = m.ID_MSG
            +		 join :_messages as m_end on t.ID_LAST_MSG = m_end.ID_MSG
            +		 
            +		 -- where t.spam = 0 AND m.spam = 0;
            +		 
            +		 ", $Discussion_Map);
            +
            +      // Comments
            +      $Comment_Map = array(
            +         'ID_MSG' => 'CommentID',
            +         'ID_TOPIC' => 'DiscussionID',
            +		 'Format' => 'Format',
            +         'body' => array('Column'=>'Body','Filter'=>'bb2html'),
            +         'ID_MEMBER' => 'InsertUserID',
            +         'DateInserted' => 'DateInserted'
            +      );
            +      $Ex->ExportTable('Comment', "select m.*, from_unixtime(m.posterTime) AS DateInserted,
            +				'Html' as Format
            +         from :_messages m
            +		 join :_topics t on m.ID_TOPIC = t.ID_TOPIC
            +		 where m.ID_MSG <> t.ID_FIRST_MSG;
            +         ", $Comment_Map);
            +
            +	 // Conversation.
            +	 $Conv_Map = array(
            +		'ID_PM' => 'ConversationID',
            +		'ID_MEMBER_FROM' => 'InsertUserID',
            +		'DateInserted' => 'DateInserted'
            +	 );
            +	 $Ex->ExportTable('Conversation',
            +		"select *, from_unixtime(msgtime) as DateInserted
            +		from :_personal_messages
            +		where deletedBySender = 0", $Conv_Map);
            +
            +	 // ConversationMessage.
            +	 $ConvMessage_Map = array(
            +		'MessageID' => 'MessageID',
            +		'ConversationID' => 'ConversationID',
            +		'DateInserted' => 'DateInserted',
            +		'ID_MEMBER_FROM' => 'InsertUserID',
            +		'body' => array('Column'=>'Body','Filter'=>'bb2html')
            +	 );
            +	 $Ex->ExportTable('ConversationMessage',
            +		"select *, ID_PM AS MessageID, ID_PM AS ConversationID, from_unixtime(msgtime) as DateInserted
            +		from :_personal_messages
            +		where deletedBySender = 0", $ConvMessage_Map);
            +
            +	 // UserConversation.
            +	 $UserConv_Map = array(
            +		'ID_MEMBER' => 'UserID',
            +		'ConversationID' => 'ConversationID',
            +		'LastMessageID' => 'LastMessageID'
            +	 );
            +	 $Ex->ExportTable('UserConversation',
            +		"select *, ID_PM AS LastMessageID, ID_PM AS ConversationID
            +		from :_pm_recipients
            +		where deletedBySender = 0", $UserConv_Map);
            +
            +      // End
            +      $Ex->EndExport();
            +   }
            +}
            +
            +function bb2html($text)
            +{
            +  global $txt, $scripturl, $context, $modSettings, $user_info;
            +
            +  $user_info['time_format'] = '%Y-%m-%d';
            +
            +  // A bit of language stuff used by the parser
            +  $txt['lang_character_set'] = 'utf8';
            +  $txt['smf238'] = 'Code';
            +  $txt['smf239'] = 'Quote from';
            +  $txt['smf240'] = 'Quote';
            +  $txt[176] = 'on';
            +  $txt['lang_locale'] = 'en';
            +  $txt[287] = 'Smiley';
            +  $txt[288] = 'Angry';
            +  $txt[289] = 'Cheesy';
            +  $txt[290] = 'Laugh';
            +  $txt[291] = 'Sad';
            +  $txt[292] = 'Wink';
            +  $txt[293] = 'Grin';
            +  $txt[294] = 'Shocked';
            +  $txt[295] = 'Cool';
            +  $txt[296] = 'Huh';
            +  $txt[450] = 'Roll Eyes';
            +  $txt[451] = 'Tongue';
            +  $txt[526] = 'Embarrassed';
            +  $txt[527] = 'Lips sealed';
            +  $txt[528] = 'Undecided';
            +  $txt[529] = 'Kiss';
            +  $txt[530] = 'Cry';
            +
            +  // URL stuff
            +  $scripturl = dirname($_SERVER['REQUEST_URI']); // TODO: make sure this is right
            +  
            +  // some settings
            +  $modSettings['enableBBC'] = true;
            +  $modSettings['enablePostHTML'] = true;
            +  $modSettings['max_image_width'] = 500;
            +  $modSettings['max_image_height'] = 500;
            +  $modSettings['autoLinkUrls'] = false;
            +  $modSettings['fixLongWords'] = false;
            +
            +  return parse_bbc($text, false);
            +}
            +
            +// Format a time to make it look purdy.
            +function timeformat($logTime, $show_today = true)
            +{
            +  global $user_info, $txt, $db_prefix, $modSettings, $func;
            +
            +  // Offset the time.
            +  $time = $logTime + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600;
            +
            +  // We can't have a negative date (on Windows, at least.)
            +  if ($time < 0)
            +    $time = 0;
            +
            +  // Today and Yesterday?
            +  if ($modSettings['todayMod'] >= 1 && $show_today === true)
            +  {
            +    // Get the current time.
            +    $nowtime = forum_time();
            +
            +    $then = @getdate($time);
            +    $now = @getdate($nowtime);
            +
            +    // Try to make something of a time format string...
            +    $s = strpos($user_info['time_format'], '%S') === false ? '' : ':%S';
            +    if (strpos($user_info['time_format'], '%H') === false && strpos($user_info['time_format'], '%T') === false)
            +      $today_fmt = '%I:%M' . $s . ' %p';
            +    else
            +      $today_fmt = '%H:%M' . $s;
            +
            +    // Same day of the year, same year.... Today!
            +    if ($then['yday'] == $now['yday'] && $then['year'] == $now['year'])
            +      return $txt['smf10'] . timeformat($logTime, $today_fmt);
            +
            +    // Day-of-year is one less and same year, or it's the first of the year and that's the last of the year...
            +    if ($modSettings['todayMod'] == '2' && (($then['yday'] == $now['yday'] - 1 && $then['year'] == $now['year']) || ($now['yday'] == 0 && $then['year'] == $now['year'] - 1) && $then['mon'] == 12 && $then['mday'] == 31))
            +      return $txt['smf10b'] . timeformat($logTime, $today_fmt);
            +  }
            +
            +  $str = !is_bool($show_today) ? $show_today : $user_info['time_format'];
            +
            +  if (setlocale(LC_TIME, $txt['lang_locale']))
            +  {
            +    foreach (array('%a', '%A', '%b', '%B') as $token)
            +      if (strpos($str, $token) !== false)
            +        $str = str_replace($token, $func['ucwords'](strftime($token, $time)), $str);
            +  }
            +  else
            +  {
            +    // Do-it-yourself time localization.  Fun.
            +    foreach (array('%a' => 'days_short', '%A' => 'days', '%b' => 'months_short', '%B' => 'months') as $token => $text_label)
            +      if (strpos($str, $token) !== false)
            +        $str = str_replace($token, $txt[$text_label][(int) strftime($token === '%a' || $token === '%A' ? '%w' : '%m', $time)], $str);
            +    if (strpos($str, '%p'))
            +      $str = str_replace('%p', (strftime('%H', $time) < 12 ? 'am' : 'pm'), $str);
            +  }
            +
            +  // Format any other characters..
            +  return strftime($str, $time);
            +}
            +
            +// Removes special entities from strings.  Compatibility...
            +function un_htmlspecialchars($string)
            +{
            +  return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES)) + array(''' => '\'', ' ' => ' '));
            +}
            +
            +// This gets all possible permutations of an array.
            +function permute($array)
            +{
            +  $orders = array($array);
            +
            +  $n = count($array);
            +  $p = range(0, $n);
            +  for ($i = 1; $i < $n; null)
            +  {
            +    $p[$i]--;
            +    $j = $i % 2 != 0 ? $p[$i] : 0;
            +
            +    $temp = $array[$i];
            +    $array[$i] = $array[$j];
            +    $array[$j] = $temp;
            +
            +    for ($i = 1; $p[$i] == 0; $i++)
            +      $p[$i] = 1;
            +
            +    $orders[] = $array;
            +  }
            +
            +  return $orders;
            +}
            +
            +// Parse bulletin board code in a string, as well as smileys optionally.
            +function parse_bbc($message, $smileys = true, $cache_id = '')
            +{
            +  global $txt, $scripturl, $context, $modSettings, $user_info;
            +  static $bbc_codes = array(), $itemcodes = array(), $no_autolink_tags = array();
            +  static $disabled;
            +
            +  // Never show smileys for wireless clients.  More bytes, can't see it anyway :P.
            +  if (WIRELESS)
            +    $smileys = false;
            +  elseif ($smileys !== null && ($smileys == '1' || $smileys == '0'))
            +    $smileys = (bool) $smileys;
            +
            +  if (empty($modSettings['enableBBC']) && $message !== false)
            +  {
            +    if ($smileys === true)
            +      parsesmileys($message);
            +
            +    return $message;
            +  }
            +
            +  // Just in case it wasn't determined yet whether UTF-8 is enabled.
            +  if (!isset($context['utf8']))
            +    $context['utf8'] = (empty($modSettings['global_character_set']) ? $txt['lang_character_set'] : $modSettings['global_character_set']) === 'UTF-8';
            +
            +  // Sift out the bbc for a performance improvement.
            +  if (empty($bbc_codes) || $message === false)
            +  {
            +    if (!empty($modSettings['disabledBBC']))
            +    {
            +      $temp = explode(',', strtolower($modSettings['disabledBBC']));
            +
            +      foreach ($temp as $tag)
            +        $disabled[trim($tag)] = true;
            +    }
            +
            +    if (empty($modSettings['enableEmbeddedFlash']))
            +      $disabled['flash'] = true;
            +
            +    /* The following bbc are formatted as an array, with keys as follows:
            +
            +      tag: the tag's name - should be lowercase!
            +
            +      type: one of...
            +        - (missing): [tag]parsed content[/tag]
            +        - unparsed_equals: [tag=xyz]parsed content[/tag]
            +        - parsed_equals: [tag=parsed data]parsed content[/tag]
            +        - unparsed_content: [tag]unparsed content[/tag]
            +        - closed: [tag], [tag/], [tag /]
            +        - unparsed_commas: [tag=1,2,3]parsed content[/tag]
            +        - unparsed_commas_content: [tag=1,2,3]unparsed content[/tag]
            +        - unparsed_equals_content: [tag=...]unparsed content[/tag]
            +
            +      parameters: an optional array of parameters, for the form
            +        [tag abc=123]content[/tag].  The array is an associative array
            +        where the keys are the parameter names, and the values are an
            +        array which may contain the following:
            +        - match: a regular expression to validate and match the value.
            +        - quoted: true if the value should be quoted.
            +        - validate: callback to evaluate on the data, which is $data.
            +        - value: a string in which to replace $1 with the data.
            +          either it or validate may be used, not both.
            +        - optional: true if the parameter is optional.
            +
            +      test: a regular expression to test immediately after the tag's
            +        '=', ' ' or ']'.  Typically, should have a \] at the end.
            +        Optional.
            +
            +      content: only available for unparsed_content, closed,
            +        unparsed_commas_content, and unparsed_equals_content.
            +        $1 is replaced with the content of  the tag.  Parameters
            +        are repalced in the form {param}.  For unparsed_commas_content,
            +        $2, $3, ..., $n are replaced.
            +
            +      before: only when content is not used, to go before any
            +        content.  For unparsed_equals, $1 is replaced with the value.
            +        For unparsed_commas, $1, $2, ..., $n are replaced.
            +
            +      after: similar to before in every way, except that it is used
            +        when the tag is closed.
            +
            +      disabled_content: used in place of content when the tag is
            +        disabled.  For closed, default is '', otherwise it is '$1' if
            +        block_level is false, '
            $1
            ' elsewise. + + disabled_before: used in place of before when disabled. Defaults + to '
            ' if block_level, '' if not. + + disabled_after: used in place of after when disabled. Defaults + to '
            ' if block_level, '' if not. + + block_level: set to true the tag is a "block level" tag, similar + to HTML. Block level tags cannot be nested inside tags that are + not block level, and will not be implicitly closed as easily. + One break following a block level tag may also be removed. + + trim: if set, and 'inside' whitespace after the begin tag will be + removed. If set to 'outside', whitespace after the end tag will + meet the same fate. + + validate: except when type is missing or 'closed', a callback to + validate the data as $data. Depending on the tag's type, $data + may be a string or an array of strings (corresponding to the + replacement.) + + quoted: when type is 'unparsed_equals' or 'parsed_equals' only, + may be not set, 'optional', or 'required' corresponding to if + the content may be quoted. This allows the parser to read + [tag="abc]def[esdf]"] properly. + + require_parents: an array of tag names, or not set. If set, the + enclosing tag *must* be one of the listed tags, or parsing won't + occur. + + require_children: similar to require_parents, if set children + won't be parsed if they are not in the list. + + disallow_children: similar to, but very different from, + require_children, if it is set the listed tags will not be + parsed inside the tag. + */ + + $codes = array( + array( + 'tag' => 'abbr', + 'type' => 'unparsed_equals', + 'before' => '', + 'after' => '', + 'quoted' => 'optional', + 'disabled_after' => ' ($1)', + ), + array( + 'tag' => 'acronym', + 'type' => 'unparsed_equals', + 'before' => '', + 'after' => '', + 'quoted' => 'optional', + 'disabled_after' => ' ($1)', + ), + array( + 'tag' => 'anchor', + 'type' => 'unparsed_equals', + 'test' => '[#]?([A-Za-z][A-Za-z0-9_\-]*)\]', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'b', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'black', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'blue', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'br', + 'type' => 'closed', + 'content' => '
            ', + ), + array( + 'tag' => 'code', + 'type' => 'unparsed_content', + 'content' => '
            ' . $txt['smf238'] . ':
            ' . ($context['browser']['is_gecko'] ? '
            $1
            ' : '$1') . '
            ', + // !!! Maybe this can be simplified? + 'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', ' + global $context; + + if (!isset($disabled[\'code\'])) + { + $php_parts = preg_split(\'~(<\?php|\?>)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE); + + for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++) + { + // Do PHP code coloring? + if ($php_parts[$php_i] != \'<?php\') + continue; + + $php_string = \'\'; + while ($php_i + 1 < count($php_parts) && $php_parts[$php_i] != \'?>\') + { + $php_string .= $php_parts[$php_i]; + $php_parts[$php_i++] = \'\'; + } + $php_parts[$php_i] = highlight_php_code($php_string . $php_parts[$php_i]); + } + + // Fix the PHP code stuff... + $data = str_replace("
            \t
            ", "\t", implode(\'\', $php_parts)); + + // Older browsers are annoying, aren\'t they? + if ($context[\'browser\'][\'is_ie4\'] || $context[\'browser\'][\'is_ie5\'] || $context[\'browser\'][\'is_ie5.5\']) + $data = str_replace("\t", "
            \t
            ", $data); + elseif (!$context[\'browser\'][\'is_gecko\']) + $data = str_replace("\t", "\t", $data); + }'), + 'block_level' => true, + ), + array( + 'tag' => 'code', + 'type' => 'unparsed_equals_content', + 'content' => '
            ' . $txt['smf238'] . ': ($2)
            ' . ($context['browser']['is_gecko'] ? '
            $1
            ' : '$1') . '
            ', + // !!! Maybe this can be simplified? + 'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', ' + global $context; + + if (!isset($disabled[\'code\'])) + { + $php_parts = preg_split(\'~(<\?php|\?>)~\', $data[0], -1, PREG_SPLIT_DELIM_CAPTURE); + + for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++) + { + // Do PHP code coloring? + if ($php_parts[$php_i] != \'<?php\') + continue; + + $php_string = \'\'; + while ($php_i + 1 < count($php_parts) && $php_parts[$php_i] != \'?>\') + { + $php_string .= $php_parts[$php_i]; + $php_parts[$php_i++] = \'\'; + } + $php_parts[$php_i] = highlight_php_code($php_string . $php_parts[$php_i]); + } + + // Fix the PHP code stuff... + $data[0] = str_replace("
            \t
            ", "\t", implode(\'\', $php_parts)); + + // Older browsers are annoying, aren\'t they? + if ($context[\'browser\'][\'is_ie4\'] || $context[\'browser\'][\'is_ie5\'] || $context[\'browser\'][\'is_ie5.5\']) + $data = str_replace("\t", "
            \t
            ", $data); + elseif (!$context[\'browser\'][\'is_gecko\']) + $data = str_replace("\t", "\t", $data); + }'), + 'block_level' => true, + ), + array( + 'tag' => 'center', + 'before' => '
            ', + 'after' => '
            ', + 'block_level' => true, + ), + array( + 'tag' => 'color', + 'type' => 'unparsed_equals', + 'test' => '(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[A-Za-z]{1,12})\]', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'email', + 'type' => 'unparsed_content', + 'content' => '$1', + // !!! Should this respect guest_hideContacts? + 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'
            \' => \'\'));'), + ), + array( + 'tag' => 'email', + 'type' => 'unparsed_equals', + 'before' => '', + 'after' => '', + // !!! Should this respect guest_hideContacts? + 'disallow_children' => array('email', 'ftp', 'url', 'iurl'), + 'disabled_after' => ' ($1)', + ), + array( + 'tag' => 'ftp', + 'type' => 'unparsed_content', + 'content' => '$1', + 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'
            \' => \'\'));'), + ), + array( + 'tag' => 'ftp', + 'type' => 'unparsed_equals', + 'before' => '', + 'after' => '', + 'disallow_children' => array('email', 'ftp', 'url', 'iurl'), + 'disabled_after' => ' ($1)', + ), + array( + 'tag' => 'font', + 'type' => 'unparsed_equals', + 'test' => '[A-Za-z0-9_,\-\s]+?\]', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'flash', + 'type' => 'unparsed_commas_content', + 'test' => '\d+,\d+\]', + 'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<a href="$1" target="_blank">$1</a>' : '<a href="$1" target="_blank">$1</a>'), + 'validate' => create_function('&$tag, &$data, $disabled', ' + if (isset($disabled[\'url\'])) + $tag[\'content\'] = \'$1\';'), + 'disabled_content' => '$1', + ), + array( + 'tag' => 'green', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'glow', + 'type' => 'unparsed_commas', + 'test' => '[#0-9a-zA-Z\-]{3,12},([012]\d{1,2}|\d{1,2})(,[^]]+)?\]', + 'before' => $context['browser']['is_ie'] ? '
            ' : '', + 'after' => $context['browser']['is_ie'] ? '
            ' : '
            ', + ), + array( + 'tag' => 'hr', + 'type' => 'closed', + 'content' => '
            ', + 'block_level' => true, + ), + array( + 'tag' => 'html', + 'type' => 'unparsed_content', + 'content' => '$1', + 'block_level' => true, + 'disabled_content' => '$1', + ), + array( + 'tag' => 'img', + 'type' => 'unparsed_content', + 'parameters' => array( + 'alt' => array('optional' => true), + 'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'), + 'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'), + ), + 'content' => '{alt}', + 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'
            \' => \'\'));'), + 'disabled_content' => '($1)', + ), + array( + 'tag' => 'img', + 'type' => 'unparsed_content', + 'content' => '', + 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'
            \' => \'\'));'), + 'disabled_content' => '($1)', + ), + array( + 'tag' => 'i', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'iurl', + 'type' => 'unparsed_content', + 'content' => '$1', + 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'
            \' => \'\'));'), + ), + array( + 'tag' => 'iurl', + 'type' => 'unparsed_equals', + 'before' => '', + 'after' => '', + 'validate' => create_function('&$tag, &$data, $disabled', ' + if (substr($data, 0, 1) == \'#\') + $data = \'#post_\' . substr($data, 1);'), + 'disallow_children' => array('email', 'ftp', 'url', 'iurl'), + 'disabled_after' => ' ($1)', + ), + array( + 'tag' => 'li', + 'before' => '
          • ', + 'after' => '
          • ', + 'trim' => 'outside', + 'require_parents' => array('list'), + 'block_level' => true, + 'disabled_before' => '', + 'disabled_after' => '
            ', + ), + array( + 'tag' => 'list', + 'before' => '
              ', + 'after' => '
            ', + 'trim' => 'inside', + 'require_children' => array('li'), + 'block_level' => true, + ), + array( + 'tag' => 'list', + 'parameters' => array( + 'type' => array('match' => '(none|disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman|lower-alpha|upper-alpha|lower-greek|lower-latin|upper-latin|hebrew|armenian|georgian|cjk-ideographic|hiragana|katakana|hiragana-iroha|katakana-iroha)'), + ), + 'before' => '
              ', + 'after' => '
            ', + 'trim' => 'inside', + 'require_children' => array('li'), + 'block_level' => true, + ), + array( + 'tag' => 'left', + 'before' => '
            ', + 'after' => '
            ', + 'block_level' => true, + ), + array( + 'tag' => 'ltr', + 'before' => '
            ', + 'after' => '
            ', + 'block_level' => true, + ), + array( + 'tag' => 'me', + 'type' => 'unparsed_equals', + 'before' => '
            * $1 ', + 'after' => '
            ', + 'quoted' => 'optional', + 'block_level' => true, + 'disabled_before' => '/me ', + 'disabled_after' => '
            ', + ), + array( + 'tag' => 'move', + 'before' => '', + 'after' => '', + 'block_level' => true, + ), + array( + 'tag' => 'nobbc', + 'type' => 'unparsed_content', + 'content' => '$1', + ), + array( + 'tag' => 'pre', + 'before' => '
            ',
            +        'after' => '
            ', + ), + array( + 'tag' => 'php', + 'type' => 'unparsed_content', + 'content' => '
            $1
            ', + 'validate' => isset($disabled['php']) ? null : create_function('&$tag, &$data, $disabled', ' + if (!isset($disabled[\'php\'])) + { + $add_begin = substr(trim($data), 0, 5) != \'<?\'; + $data = highlight_php_code($add_begin ? \'<?php \' . $data . \'?>\' : $data); + if ($add_begin) + $data = preg_replace(array(\'~^(.+?)<\?.{0,40}?php( |\s)~\', \'~\?>((?:)*)$~\'), \'$1\', $data, 2); + }'), + 'block_level' => true, + 'disabled_content' => '$1', + ), + array( + 'tag' => 'quote', + 'before' => '
            ' . $txt['smf240'] . '
            ', + 'after' => '
            ', + 'block_level' => true, + ), + array( + 'tag' => 'quote', + 'parameters' => array( + 'author' => array('match' => '(.{1,192}?)', 'quoted' => true, 'validate' => 'parse_bbc'), + ), + 'before' => '
            ' . $txt['smf239'] . ': {author}
            ', + 'after' => '
            ', + 'block_level' => true, + ), + array( + 'tag' => 'quote', + 'type' => 'parsed_equals', + 'before' => '
            ' . $txt['smf239'] . ': $1
            ', + 'after' => '
            ', + 'quoted' => 'optional', + 'block_level' => true, + ), + array( + 'tag' => 'quote', + 'parameters' => array( + 'author' => array('match' => '([^<>]{1,192}?)'), + 'link' => array('match' => '(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?|action=profile;u=\d+)'), + 'date' => array('match' => '(\d+)', 'validate' => 'timeformat'), + ), + 'before' => '
            ', + 'after' => '
            ', + 'block_level' => true, + ), + array( + 'tag' => 'quote', + 'parameters' => array( + 'author' => array('match' => '(.{1,192}?)', 'validate' => 'parse_bbc'), + ), + 'before' => '
            ' . $txt['smf239'] . ': {author}
            ', + 'after' => '
            ', + 'block_level' => true, + ), + array( + 'tag' => 'right', + 'before' => '
            ', + 'after' => '
            ', + 'block_level' => true, + ), + array( + 'tag' => 'red', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'rtl', + 'before' => '
            ', + 'after' => '
            ', + 'block_level' => true, + ), + array( + 'tag' => 's', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'size', + 'type' => 'unparsed_equals', + 'test' => '([1-9][\d]?p[xt]|(?:x-)?small(?:er)?|(?:x-)?large[r]?)\]', + // !!! line-height + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'size', + 'type' => 'unparsed_equals', + 'test' => '[1-9]\]', + // !!! line-height + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'sub', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'sup', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'shadow', + 'type' => 'unparsed_commas', + 'test' => '[#0-9a-zA-Z\-]{3,12},(left|right|top|bottom|[0123]\d{0,2})\]', + 'before' => $context['browser']['is_ie'] ? '' : '', + 'after' => '', + 'validate' => $context['browser']['is_ie'] ? create_function('&$tag, &$data, $disabled', ' + if ($data[1] == \'left\') + $data[1] = 270; + elseif ($data[1] == \'right\') + $data[1] = 90; + elseif ($data[1] == \'top\') + $data[1] = 0; + elseif ($data[1] == \'bottom\') + $data[1] = 180; + else + $data[1] = (int) $data[1];') : create_function('&$tag, &$data, $disabled', ' + if ($data[1] == \'top\' || (is_numeric($data[1]) && $data[1] < 50)) + return \'0 -2px\'; + elseif ($data[1] == \'right\' || (is_numeric($data[1]) && $data[1] < 100)) + return \'2px 0\'; + elseif ($data[1] == \'bottom\' || (is_numeric($data[1]) && $data[1] < 190)) + return \'0 2px\'; + elseif ($data[1] == \'left\' || (is_numeric($data[1]) && $data[1] < 280)) + return \'-2px 0\'; + else + return \'0 0\';'), + ), + array( + 'tag' => 'time', + 'type' => 'unparsed_content', + 'content' => '$1', + 'validate' => create_function('&$tag, &$data, $disabled', ' + if (is_numeric($data)) + $data = timeformat($data); + else + $tag[\'content\'] = \'[time]$1[/time]\';'), + ), + array( + 'tag' => 'tt', + 'before' => '', + 'after' => '', + ), + array( + 'tag' => 'table', + 'before' => '', + 'after' => '
            ', + 'trim' => 'inside', + 'require_children' => array('tr'), + 'block_level' => true, + ), + array( + 'tag' => 'tr', + 'before' => '
            ', + 'after' => '