| 1 | <?php
|
|---|
| 2 |
|
|---|
| 3 | function xpress_credit($show = false)
|
|---|
| 4 | {
|
|---|
| 5 | global $xoopsModule,$wp_version;
|
|---|
| 6 |
|
|---|
| 7 | $ret = '<a href="http://www.toemon.com"'. " target='_blank'" . '>XPressME Ver.' . sprintf('%.2f %s',$xoopsModule->getInfo('version'),$xoopsModule->getInfo('codename')) .'</a>';
|
|---|
| 8 | if (strstr($wp_version,'ME')){
|
|---|
| 9 | $ret .= '(included <a href="http://wpme.sourceforge.jp/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)';
|
|---|
| 10 | } else {
|
|---|
| 11 | $ret .= '(included <a href="http://ja.wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)';
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | if (empty($show))
|
|---|
| 15 | return $ret;
|
|---|
| 16 | else
|
|---|
| 17 | echo $ret;
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | function xpress_convert_time($show = false)
|
|---|
| 21 | {
|
|---|
| 22 | $ret = timer_stop(0) .'sec. ';
|
|---|
| 23 | if (empty($show))
|
|---|
| 24 | return $ret;
|
|---|
| 25 | else
|
|---|
| 26 | echo $ret;
|
|---|
| 27 | }
|
|---|
| 28 |
|
|---|
| 29 | function xpress_is_theme_sidebar_disp(){
|
|---|
| 30 | $config = new XPressME_Class();
|
|---|
| 31 | return $config->is_theme_sidebar_disp;
|
|---|
| 32 | }
|
|---|
| 33 |
|
|---|
| 34 | function xpress_left_arrow_post_link($show = false)
|
|---|
| 35 | {
|
|---|
| 36 | $config = new XPressME_Class();
|
|---|
| 37 | $ret = '';
|
|---|
| 38 |
|
|---|
| 39 | if($config->is_left_postnavi_old){
|
|---|
| 40 | $link_title = $config->old_post_link_text;
|
|---|
| 41 | ob_start();
|
|---|
| 42 | if ($config->is_postnavi_title_disp)
|
|---|
| 43 | previous_post_link('« %link');
|
|---|
| 44 | else
|
|---|
| 45 | previous_post_link('« %link',$link_title);
|
|---|
| 46 | $ret = ob_get_contents();
|
|---|
| 47 | ob_end_clean();
|
|---|
| 48 | } else {
|
|---|
| 49 | $link_title = $config->newer_post_link_text;
|
|---|
| 50 | ob_start();
|
|---|
| 51 | if ($config->is_postnavi_title_disp)
|
|---|
| 52 | next_post_link('« %link');
|
|---|
| 53 | else
|
|---|
| 54 | next_post_link('« %link',$link_title);
|
|---|
| 55 | $ret = ob_get_contents();
|
|---|
| 56 | ob_end_clean();
|
|---|
| 57 | }
|
|---|
| 58 | $ret = str_replace('">','" title="'.$link_title . '">' , $ret);
|
|---|
| 59 |
|
|---|
| 60 | if (empty($show))
|
|---|
| 61 | return $ret;
|
|---|
| 62 | else
|
|---|
| 63 | echo $ret;
|
|---|
| 64 | }
|
|---|
| 65 |
|
|---|
| 66 | function xpress_right_arrow_post_link($show = false)
|
|---|
| 67 | {
|
|---|
| 68 | $config = new XPressME_Class();
|
|---|
| 69 | $ret = '';
|
|---|
| 70 |
|
|---|
| 71 | if($config->is_left_postnavi_old){
|
|---|
| 72 | $link_title = $config->newer_post_link_text;
|
|---|
| 73 | ob_start();
|
|---|
| 74 | if ($config->is_postnavi_title_disp)
|
|---|
| 75 | next_post_link('%link »');
|
|---|
| 76 | else
|
|---|
| 77 | next_post_link('%link »',$link_title);
|
|---|
| 78 | $ret = ob_get_contents();
|
|---|
| 79 | ob_end_clean();
|
|---|
| 80 | } else {
|
|---|
| 81 | $link_title = $config->old_post_link_text;
|
|---|
| 82 | ob_start();
|
|---|
| 83 | if ($config->is_postnavi_title_disp)
|
|---|
| 84 | previous_post_link('%link »');
|
|---|
| 85 | else
|
|---|
| 86 | previous_post_link('%link »',$link_title);
|
|---|
| 87 | $ret = ob_get_contents();
|
|---|
| 88 | ob_end_clean();
|
|---|
| 89 | }
|
|---|
| 90 | $ret = str_replace('">','" title="'.$link_title . '">' , $ret);
|
|---|
| 91 |
|
|---|
| 92 | if (empty($show))
|
|---|
| 93 | return $ret;
|
|---|
| 94 | else
|
|---|
| 95 | echo $ret;
|
|---|
| 96 | }
|
|---|
| 97 | ?> |
|---|