Пример #1
0
						printf(__('Posted in %s', 'xpress'), get_the_category_list(', '));
						echo ' | ';
						edit_post_link(__('Edit', 'xpress'), '', ' | ');
						comments_popup_link(__('No Comments »', 'xpress'), __('1 Comment »', 'xpress'), __('% Comments »', 'xpress'), '', __('Comments Closed', 'xpress') );
					?>
					</div>
				</div>

			<?php endwhile; ?>
				
			<div class="xpress-navi-bar">
				<?php if(function_exists('wp_pagenavi')) : ?>			
					<div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div>
				<?php else : ?>
					<div class="alignleft"><?php xpress_left_arrow_posts_link('echo=1'); ?></div>
					<div class="alignright"><?php xpress_right_arrow_posts_link('echo=1'); ?></div>
				<?php endif; ?>
			</div>
				
		<?php else : ?>

			<h2 class="center"><?php _e('Not Found', 'xpress'); ?></h2>
			<p class="center"><?php _e('Sorry, but you are looking for something that isn&#8217;t here.', 'xpress'); ?></p>
			<?php include (get_template_directory() . "/searchform.php"); ?>

		<?php endif; ?>
	</div>
</div>
<?php if(xpress_is_theme_sidebar_disp()) get_sidebar(); ?>

<?php get_footer(); ?>
Пример #2
0
    if (function_exists('wp_pagenavi')) {
        ?>
			
					<div class="xpress_pagenavi"><?php 
        wp_pagenavi();
        ?>
</div>
				<?php 
    } else {
        ?>
					<div class="alignleft"><?php 
        xpress_left_arrow_posts_link('echo=1');
        ?>
</div>
					<div class="alignright"><?php 
        xpress_right_arrow_posts_link('echo=1');
        ?>
</div>
				<?php 
    }
    ?>
			</div>
				
		<?php 
} else {
    ?>
			<p><?php 
    _e('Sorry, no posts matched your criteria.', 'xpress');
    ?>
</p>
		<?php 
Пример #3
0
function xpress_render($contents)
{
    global $xoops_config;
    global $xoopsUser, $xoopsTpl, $xpress_config, $xoopsModule, $xoopsLogger, $xoopsConfig;
    //for XOOPS
    require_once ABSPATH . '/include/xpress_breadcrumbs.php';
    $xoops_breadcrumbs = get_breadcrumbs();
    xpress_remake_global_for_permlink();
    $mydirname = basename(dirname(dirname(__FILE__)));
    include $xoops_config->xoops_root_path . "/header.php";
    $xoopsTpl->assign('xoops_breadcrumbs', $xoops_breadcrumbs);
    $xoopsTpl->assign('xoops_module_header', get_xpress_module_header($contents));
    $page_title = $GLOBALS["xoopsModule"]->getVar("name") . ' &raquo;' . get_xpress_title($contents);
    $xoopsTpl->assign('xoops_pagetitle', $page_title);
    $xoops_keywords = $xoopsTpl->get_template_vars('xoops_meta_keywords');
    $wp_keyword = get_xpress_meta_name('keywords', $contents);
    switch ($xpress_config->meta_keyword_type) {
        case 'xoops':
            break;
        case 'wordpress':
            if (!empty($wp_keyword)) {
                $xoopsTpl->assign('xoops_meta_keywords', $wp_keyword);
            }
            break;
        case 'wordpress_xoops':
            if (!empty($wp_keyword)) {
                if (!empty($xoops_keywords)) {
                    $keywords = $wp_keyword . ', ' . $xoops_keywords;
                } else {
                    $keywords = $wp_keyword;
                }
                $xoopsTpl->assign('xoops_meta_keywords', $keywords);
            }
            break;
        default:
    }
    $xoops_description = $xoopsTpl->get_template_vars('xoops_meta_description');
    $wp_description = get_xpress_meta_name('description', $contents);
    switch ($xpress_config->meta_description_type) {
        case 'xoops':
            break;
        case 'wordpress':
            if (!empty($wp_description)) {
                $xoopsTpl->assign('xoops_meta_description', $wp_description);
            }
            break;
        case 'wordpress_xoops':
            if (!empty($wp_description)) {
                if (!empty($xoops_description)) {
                    $description = $wp_description . ' ' . $xoops_description;
                } else {
                    $description = $wp_description;
                }
                $xoopsTpl->assign('xoops_meta_description', $description);
            }
            break;
        default:
    }
    $wp_robots = get_xpress_meta_name('robots', $contents);
    switch ($xpress_config->meta_robot_type) {
        case 'xoops':
            break;
        case 'wordpress':
            if (!empty($wp_robots)) {
                $xoopsTpl->assign('xoops_meta_robots', $wp_robots);
            }
            break;
        default:
    }
    if (empty($contents)) {
        $template_name = get_option('template');
        $xpress_data['body_contents'] = "<p>Themes \"{$template_name}\" is broken or doesn't exist. </p><p>Please choose the right theme from the admin page of wordpress.</p>";
    } else {
        $xpress_data['body_contents'] = get_body($contents);
    }
    // used $GLOBALS. becose xpress_left_arrow_post_link() and xpress_right_arrow_post_link() is other loop in this position
    $xpress_data['left_post_link'] = @$GLOBALS['left_arrow_post_link'];
    $xpress_data['right_post_link'] = @$GLOBALS['right_arrow_post_link'];
    $xpress_data['left_posts_link'] = str_replace('&laquo;', '', xpress_left_arrow_posts_link('echo=0'));
    $xpress_data['right_posts_link'] = str_replace('&raquo;', '', xpress_right_arrow_posts_link('echo=0'));
    $xpress_data['now_user_level'] = xpress_now_user_level('echo=0');
    //If notification_select.php is not executed in CMS other than XCL, the selector of in-line is not displayed.
    if (is_object($xoopsModule) && $xoopsModule->getVar('hasnotification') == 1 && is_object($xoopsUser)) {
        require_once $xoops_config->xoops_root_path . '/include/notification_select.php';
    }
    $xoopsTpl->assign('xpress', $xpress_data);
    $templates_file = 'db:' . $mydirname . '_index.html';
    echo $xoopsTpl->fetch($templates_file);
    include $xoops_config->xoops_root_path . '/footer.php';
}