/* echo ''; echo ''; echo ''; */ } function theme_output_rss_link() { echo ''; } function theme_output_body_start() { global $xoopsUser; $additional_style = $xoopsUser ? '#bottom_buttons { display: none; }' : ''; echo ''; echo '
'; } function theme_output_top_block() { if (!rc_get_option('light_page')) { $extra = $_SERVER['HTTPS'] ? 'style="background-color:#B8FFB8; !important"' : ''; echo '
'; echo ''; echo ''; echo ''; echo '
Наши проекты: 3D печать и услуги : Wiki : Сувениры : Walkarounds : ВНИМАНИЕ: Сайт пока работает в тестовом режиме после переезда! Что-то может работать не так как ожидается, проверяем...
'; echo '
'; } } function theme_output_logo_block() { global $meta; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'; } function theme_output_login_block() { global $xoopsUser; if (!$xoopsUser && !rc_get_option('light_page')) { echo '
'; echo 'Войти'; echo 'Регистрация'; echo '
'; } } function theme_output_announcements() { global $xoopsUser; echo '
'; if ($xoopsUser && !rc_get_option('light_page')) { if (rand(0, 1)) { echo '
Правила всего форума, фарцовки | Вопросы новичков
'; } else { echo '
' . rc_get_upload_button() . '
'; } } } function theme_output_search() { if (!rc_get_option('light_page')) { echo '
'; } echo '
'; } function theme_output_menu() { global $api, $xoopsUser; $menu_file = 'menu2'; require_once(XOOPS_ROOT_PATH . '/themes/scalemodels/' . $menu_file . '.php'); } function theme_output_banners() { if (RC_SHOW_ADVERT && rc_get_option('show_banners_top')) { global $api, $xoopsUser; if (substr_count($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'ru-RU')) { $html = '
' . theme_get_banners_block(8, true) . '
'; } if (!$api->client->isMobile()) { echo '
' . $html . '
'; } } } // -------------------------------------------------------------------------------------- function theme_get_important_banners($number = false) { global $db; $dir = 'news'; $static = array( 11968 => '', # 12099 => '', #12391 => '', ); if (!$number) { $number = 7; } $html = '
'; $keys = array_keys($static); $sql = 'SELECT storyid, title, hometext FROM ' . $db->prefix('stories') . ' WHERE storyid IN(' . implode(', ', $keys) . ')'; $rows = $db->fetchAllAssoc($sql, 3600, 'top_news_'); if (!is_array($rows) || !count($rows)) { return ''; } shuffle($rows); $rows = array_slice($rows, 0, $number); foreach ($rows as $row) { $html .= '
'; } return $html . '
'; } // -------------------------------------------------------------------------------------- function theme_get_banners_block($number = 7, $force = false) { global $xoopsModule; $result = ''; $skip = false; if (!$force) { $filename = substr($_SERVER['SCRIPT_FILENAME'], strlen(XOOPS_ROOT_PATH)); if ($xoopsModule) { $module = $xoopsModule->dirname(); if ($module == 'myarticles' && $filename == '/modules/myarticles/article.php') { $skip = true; } elseif ($module == 'calendar' && $filename == '/modules/calendar/index.php') { $skip = true; } } if ($filename == '/tags.php') { $skip = true; } } if (!$skip) { ob_start(); showbanner("b120-new", $number); $result = ob_get_clean(); } return $result; } // -------------------------------------------------------------------------------------- /** * This is everything that appears right after any center stuff. * * themeheader * center stuff * themefooter * @param unknown_type $show_rblock * @param unknown_type $footer */ function themefooter($show_rblock = 0, $footer = '') { global $xoopsUser, $xoopsModule, $api; if (_TH_IS_NEED_BLOCKS) { echo ""; make_sidebar("right"); echo ""; } echo '
'; if (!rc_get_option('light_page')) { theme_handle_bottom_banners(); theme_handle_bottom_menu(); } rc_dbg(""); if ($xoopsModule) { theme_handle_module_specific_content(); } theme_handle_yandex_direct(); echo '
'; echo '
' . $footer . '
'; if (!rc_get_option('light_page')) { echo file_get_contents(XOOPS_ROOT_PATH . '/themes/scalemodels/footer.tpl'); } rc_show_footer_counters(); echo rc_get_deferred_js_html(); } function theme_handle_bottom_banners() { global $xoopsUser, $meta; if (rc_get_option('show_banners_bottom')) { $banners = theme_get_banners_block(); if ($banners) { echo '
' . theme_get_banners_block() . '
'; } } } function theme_handle_bottom_menu() { echo "
наверх " . _TH_INDEX . " " . th_mod_link("news/", _TH_NEWS) . " " . th_mod_link("myarticles/", _TH_ARTICLES . '/' . _TH_GALERY) . " " . th_mod_link("photo/viewcat_cid_1.html", _TH_WALKAROUNDS) . " " . th_mod_link("mydownloads/", _TH_FILES) . " " . th_mod_link("mylinks/", _TH_LINKS) . " " . th_mod_link("xoopsfaq/", 'FAQ') . " " . th_link("wiki/", "WIKI") . " " . th_mod_link("forum/", _TH_FORUM) . " " . th_mod_link("contact/index.php?op=policy", _TH_ABOUT) . " " . th_link("sitemap.php", "КАРТА САЙТА") . "
"; } function theme_handle_module_specific_content() { global $xoopsModule, $xoopsUser, $api; $module = $xoopsModule->dirname(); if ($module == 'forum') { theme_handle_forum_content(); } } function theme_handle_forum_content() { global $forum_id; $tokens = explode('/', $_SERVER["SCRIPT_NAME"]); if ($tokens[3] == 'viewtopic.php') { global $phpbbPostsOnPage; // Закомментированная логика для viewtopic.php } elseif ($tokens[3] == 'privmsg.php') { if ($_GET['mode'] == 'read') { echo theme_show_rtb('personal-message'); } } } function theme_handle_yandex_direct() { if (is_array($GLOBALS['yandex_direct'])) { foreach ($GLOBALS['yandex_direct'] as $id => $html) { echo $html; } } } // --------------------------------------------------------------------------------------// /** * Controls the look of your left blocks. * * @param String $title * @param unknown_type $content */ function themesidebox_left($title = '', $content) { $rem_header = htmlspecialchars(strip_tags($title), ENT_QUOTES); rc_dbg(""); echo "
» $title
$content
"; rc_dbg(""); } // --------------------------------------------------------------------------------------// /** * Controls the look of your right blocks. * * @param String $title * @param unknown_type $content */ function themesidebox_right($title = '', $content) { $rem_header = htmlspecialchars(strip_tags($title), ENT_QUOTES); rc_dbg(""); echo "
» $title
$content
"; rc_dbg(""); } // --------------------------------------------------------------------------------------// /** * Controls the look of your left-center blocks. * * @param unknown_type $title * @param unknown_type $content */ function themecenterbox_left($title = '', $content) { echo "
» $title
$content
"; } // --------------------------------------------------------------------------------------// /** * Controls the look of your center-center blocks. * * @param unknown_type $title * @param unknown_type $content */ function themecenterbox_center($title = '', $content) { echo '
» ' . $title . '
' . $content . '
'; } // --------------------------------------------------------------------------------------// /** * Controls the look of your right-center blocks. * * @param unknown_type $title * @param unknown_type $content */ function themecenterbox_right($title = '', $content) { echo "
» $title
$content
"; } // --------------------------------------------------------------------------------------// /** * This function formats the stories on your homepage * * @param unknown_type $poster * @param unknown_type $time * @param String $title * @param unknown_type $counter * @param unknown_type $thetext * @param unknown_type $timglink * @param unknown_type $adminlink * @param unknown_type $morelink */ function themenews($poster, $time, $title, $counter, $thetext, $timglink, $adminlink, $morelink = '', $tags = '', $cid = 0, $category = '') { global $context_count, $xoopsUser; $rem_header = htmlspecialchars(strip_tags($title), ENT_QUOTES); rc_dbg(""); echo "

$title

" . _TH_POSTEDBY . " $poster " . _TH_ON . "$time ( $counter " . _TH_READS . ") $morelink
$timglink $thetext"; if (!empty($tags)) { // @todo tags already a html string //$tags = explode(', ', $tags); echo '
' . _CORE_TPL_TAGS . ": " . $tags . '
'; } echo "
" . $category . "
$adminlink
"; rc_dbg(""); } // --------------------------------------------------------------------------------------// /** * Controls the look of various center blocks, * like when you preview posts in the forum & news. * * @param unknown_type $title * @param unknown_type $content */ function themecenterposts($title = '', $content) { echo "
$title
$content
"; } // --------------------------------------------------------------------------------------// /** * Used for displaying thread content for comments in various modules. * * @param unknown_type $subject * @param unknown_type $text * @param unknown_type $color_number * @param unknown_type $subject_image * @param unknown_type $post_date * @param unknown_type $ip_image * @param unknown_type $reply_image * @param unknown_type $edit_image * @param unknown_type $delete_image * @param unknown_type $username * @param unknown_type $rank_title * @param unknown_type $rank_image * @param unknown_type $avatar_image * @param unknown_type $reg_date * @param unknown_type $posts * @param unknown_type $user_from * @param unknown_type $online_image * @param unknown_type $profile_image * @param unknown_type $pm_image * @param unknown_type $email_image * @param unknown_type $www_image * @param unknown_type $icq_image * @param unknown_type $aim_image * @param unknown_type $yim_image * @param unknown_type $msnm_image */ function theme_post( $subject, $text, $color_number = '', $subject_image = '', $post_date = '', $ip_image = '', $reply_image = '', $edit_image = '', $delete_image = '', $username = '', $rank_title = '', $rank_image = '', $avatar_image = '', $reg_date = '', $posts = '', $user_from = '', $online_image = '', $profile_image = '', $pm_image = '', $email_image = '', $www_image = '', $icq_image = '', $aim_image = '', $yim_image = '', $msnm_image = '' ) { global $xoopsUser; if ($color_number == 1) { $bg1 = 'bg1'; $bg2 = 'bg3'; } else { $bg1 = 'bg3'; $bg2 = 'bg1'; } ?>