XPressME Ver.' . sprintf('%.2f %s',$xoopsModule->getInfo('version'),$xoopsModule->getInfo('codename')) .'';
if (strstr($wp_version,'ME')){
$ret .= '(included WordPress ' . $wp_version . ')';
} else {
$ret .= '(included WordPress ' . $wp_version . ')';
}
if (empty($show))
return $ret;
else
echo $ret;
}
function xpress_convert_time($show = false)
{
$ret = timer_stop(0) .'sec. ';
if (empty($show))
return $ret;
else
echo $ret;
}
function xpress_is_theme_sidebar_disp(){
$config = new XPressME_Class();
return $config->is_theme_sidebar_disp;
}
function xpress_left_arrow_post_link($show = false)
{
$config = new XPressME_Class();
$ret = '';
if($config->is_left_postnavi_old){
$link_title = $config->old_post_link_text;
ob_start();
if ($config->is_postnavi_title_disp)
previous_post_link('« %link');
else
previous_post_link('« %link',$link_title);
$ret = ob_get_contents();
ob_end_clean();
} else {
$link_title = $config->newer_post_link_text;
ob_start();
if ($config->is_postnavi_title_disp)
next_post_link('« %link');
else
next_post_link('« %link',$link_title);
$ret = ob_get_contents();
ob_end_clean();
}
if ($config->is_postnavi_title_disp){
$on_mouse_show = $link_title;
} else {
if($config->is_left_postnavi_old){
ob_start();
previous_post_link('%link');
$on_mouse_show = ob_get_contents();
ob_end_clean();
} else {
ob_start();
next_post_link('%link');
$on_mouse_show = ob_get_contents();
ob_end_clean();
}
$pattern = "]*?>(.*)<\/a>";
preg_match("/".$pattern."/s", $on_mouse_show, $body_matches);
$on_mouse_show = $body_matches[1];
}
$ret = str_replace('">','" title="'.$on_mouse_show . '">' , $ret);
if (empty($show))
return $ret;
else
echo $ret;
}
function xpress_right_arrow_post_link($show = false)
{
$config = new XPressME_Class();
$ret = '';
if($config->is_left_postnavi_old){
$link_title = $config->newer_post_link_text;
ob_start();
if ($config->is_postnavi_title_disp)
next_post_link('%link »');
else
next_post_link('%link »',$link_title);
$ret = ob_get_contents();
ob_end_clean();
} else {
$link_title = $config->old_post_link_text;
ob_start();
if ($config->is_postnavi_title_disp)
previous_post_link('%link »');
else
previous_post_link('%link »',$link_title);
$ret = ob_get_contents();
ob_end_clean();
}
if ($config->is_postnavi_title_disp){
$on_mouse_show = $link_title;
} else {
if($config->is_left_postnavi_old){
ob_start();
next_post_link('%link');
$on_mouse_show = ob_get_contents();
ob_end_clean();
} else {
ob_start();
previous_post_link('%link');
$on_mouse_show = ob_get_contents();
ob_end_clean();
}
$pattern = "]*?>(.*)<\/a>";
preg_match("/".$pattern."/s", $on_mouse_show, $body_matches);
$on_mouse_show = $body_matches[1];
}
$ret = str_replace('">','" title="'.$on_mouse_show . '">' , $ret);
if (empty($show))
return $ret;
else
echo $ret;
}
?>