XPressME Integration Kit

Trac

Changeset 272


Ignore:
Timestamp:
Jun 9, 2009, 5:37:04 PM (15 years ago)
Author:
toemon
Message:

#130 カスタムテンプレートタグでwp_parse_argsを利用
get_xpress_excerpt_contents()
xpress_the_content()
を除き修正

Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/external/for_wordpress_mu/src/wp-content/themes/xpress_mu_home/footer.php

    r213 r272  
    77                <!-- <?php printf(__('%d queries. %s seconds.', 'xpress'), get_num_queries(), timer_stop(0, 3)); ?> --> 
    88        <!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. --> 
    9                 <div class="xpress_credit"><?php echo xpress_credit(). ' (' . xpress_convert_time() . ')'; ?></div> 
     9                <div class="xpress_credit"><?php echo xpress_credit('echo=0'). ' (' . xpress_convert_time('echo=0&format=' . __('%.3f sec.', 'xpress')) . ')'; ?></div> 
    1010</div> 
    1111</div> 
  • trunk/external/for_wordpress_mu/src/wp-content/themes/xpress_mu_home/header.php

    r237 r272  
    3030        <div id="xpress-header-bar-top"> 
    3131                <div class="xpress-header-title"> 
    32                         <?php  if (xpress_selected_author_id(false)) echo get_avatar(xpress_selected_author_id(false),$size = '32'); ?> 
     32                        <?php  if (xpress_selected_author_id('echo=0')) echo get_avatar(xpress_selected_author_id('echo=0'),$size = '32'); ?> 
    3333                        <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a> 
    3434                </div> 
     
    4242        <div class="xpress-operation-link"> 
    4343                <a href="<?php echo get_option('home'); ?>/"><?php _e('Mein Page','xpress')?></a>  
    44                 <?php if(xpress_is_contributor()) { echo ' | ' ; xpress_post_new_link(__('Post New','xpress')); }?> 
     44                <?php if(xpress_is_contributor()) { echo ' | ' ; xpress_post_new_link('link_title='. __('Post New','xpress'). '&echo=1'); }?> 
    4545        </div> 
    4646</div> 
  • trunk/external/for_wordpress_mu/src/wp-content/themes/xpress_mu_home/index.php

    r213 r272  
    1515                                        <div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div> 
    1616                                <?php else : ?> 
    17                                         <div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div> 
    18                                         <div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div> 
     17                                        <div class="alignleft"><?php xpress_left_arrow_posts_link('echo=1'); ?></div> 
     18                                        <div class="alignright"><?php xpress_right_arrow_posts_link('echo=1'); ?></div> 
    1919                                <?php endif; ?> 
    2020                        </div> 
     
    3838                                                echo ' - '; 
    3939                                                the_author_posts_link(); 
    40                                                 echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')';  
     40                                                echo ' (' . xpress_post_views_count('post_id=' . $post->ID . '&format=' . __('Views :%d', 'xpress'). '&echo=0') . ')';  
    4141                                                echo ' | '; 
    4242                                                // echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | '); 
     
    5555                                        <div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div> 
    5656                                <?php else : ?> 
    57                                         <div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div> 
    58                                         <div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div> 
     57                                        <div class="alignleft"><?php xpress_left_arrow_posts_link('echo=1'); ?></div> 
     58                                        <div class="alignright"><?php xpress_right_arrow_posts_link('echo=1'); ?></div> 
    5959                                <?php endif; ?> 
    6060                        </div> 
  • trunk/external/for_wordpress_mu/src/wp-content/themes/xpress_mu_home/single.php

    r213 r272  
    1313                        <?php while (have_posts()) : the_post(); ?> 
    1414                                <div class="xpress-navi-bar"> 
    15                                         <div class="alignleft"><?php xpress_left_arrow_post_link(true); ?></div> 
    16                                         <div class="alignright"><?php xpress_right_arrow_post_link(true); ?></div> 
     15                                        <div class="alignleft"><?php xpress_left_arrow_post_link('ehoo=1'); ?></div> 
     16                                        <div class="alignright"><?php xpress_right_arrow_post_link('ehoo=1'); ?></div> 
    1717                                </div> 
    1818 
     
    3636                                                        echo ' - '; 
    3737                                                        the_author_posts_link(); 
    38                                                         echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')';  
     38                                                        echo ' (' . xpress_post_views_count('post_id=' . $post->ID . '&format=' . __('Views :%d', 'xpress'). '&echo=0') . ')';  
    3939                                                        echo ' | '; 
    4040                                                        // echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | '); 
     
    4747                                                         
    4848                                        <div id ="xpress-pings-block"> 
    49                                                 <h3><?php xpress_pings_number(__('No Trackback/Pingback', 'xpress'),__('One Trackback/Pingback', 'xpress'),__('% TrackBack/Pingback', 'xpress')) ?></h3> 
     49                                                <h3><?php xpress_pings_number('zero=' . __('No Trackback/Pingback', 'xpress'). '&one='. __('One Trackback/Pingback', 'xpress'). '&more=' . __('% TrackBack/Pingback', 'xpress')) ?></h3> 
    5050                                                <p class="xpress_pings_status"><small> 
    5151                                                <?php 
     
    5757                                                ?> 
    5858                                                </small></p> 
    59                                                 <?php xpress_pings_list(true) ?>                                         
     59                                                <?php xpress_pings_list('echo=1') ?>                                     
    6060                                        </div> 
    6161                                                         
     
    6666                                 
    6767                                <div class="xpress-navi-bar"> 
    68                                         <div class="alignleft"><?php xpress_left_arrow_post_link(true) ?></div> 
    69                                         <div class="alignright"><?php xpress_right_arrow_post_link(true) ?></div> 
     68                                        <div class="alignleft"><?php xpress_left_arrow_post_link('ehoo=1') ?></div> 
     69                                        <div class="alignright"><?php xpress_right_arrow_post_link('ehoo=1') ?></div> 
    7070                                </div> 
    7171 
     
    7777                                        <div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div> 
    7878                                <?php else : ?> 
    79                                         <div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div> 
    80                                         <div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div> 
     79                                        <div class="alignleft"><?php xpress_left_arrow_posts_link('echo=1'); ?></div> 
     80                                        <div class="alignright"><?php xpress_right_arrow_posts_link('echo=1'); ?></div> 
    8181                                <?php endif; ?> 
    8282                        </div> 
  • trunk/xpressme_integration_kit/include/xpress_render.php

    r232 r272  
    208208        $xpress_data['left_post_link'] = $GLOBALS['left_arrow_post_link']; 
    209209        $xpress_data['right_post_link'] = $GLOBALS['right_arrow_post_link']; 
    210         $xpress_data['left_posts_link'] =  str_replace('&laquo;','',xpress_left_arrow_posts_link(false)); 
    211         $xpress_data['right_posts_link'] = str_replace('&raquo;','',xpress_right_arrow_posts_link(false)); 
    212         $xpress_data['now_user_level'] = xpress_now_user_level(false); 
     210        $xpress_data['left_posts_link'] =  str_replace('&laquo;','',xpress_left_arrow_posts_link('echo=0')); 
     211        $xpress_data['right_posts_link'] = str_replace('&raquo;','',xpress_right_arrow_posts_link('echo=0')); 
     212        $xpress_data['now_user_level'] = xpress_now_user_level('echo=0'); 
    213213 
    214214        $xoopsTpl->assign('xpress', $xpress_data); 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php

    r262 r272  
    11<?php 
    2 function xpress_the_title($show = true) 
    3 { 
     2function xpress_the_title($args = '') 
     3{ 
     4        $defaults = array( 
     5                'echo' => 1 
     6        ); 
     7        $r = wp_parse_args( $args, $defaults ); 
     8 
     9        extract( $r ); 
     10 
    411        $output = '<div class ="xpress-post-header">' . "\n"; 
    512         
     
    3441        $output .= '</div>' . "\n"; 
    3542         
    36         if (empty($show)) 
    37                 return $output; 
    38         else 
    39                 echo $output; 
     43        if ($echo) 
     44                echo $output; 
     45        else 
     46                return $output; 
    4047 
    4148} 
     
    5360} 
    5461 
    55 function xpress_selected_author($show=true ) { 
     62function xpress_selected_author($args ='' ) { 
     63        $defaults = array( 
     64                'echo' => 1 
     65        ); 
     66        $r = wp_parse_args( $args, $defaults ); 
     67 
     68        extract( $r ); 
     69 
    5670        $output = ''; 
    5771        $author_cookie = get_xpress_dir_name() . "_select_author" ; 
     
    6175                $output = $user_info->display_name; 
    6276        } 
    63         if (empty($show)) 
    64                 return $output; 
    65         else 
    66                 echo $output; 
     77        if ($echo) 
     78                echo $output; 
     79        else 
     80                return $output; 
    6781                 
    6882} 
    69 function xpress_selected_author_id($show=true ) { 
     83function xpress_selected_author_id($args ='' ) { 
     84        $defaults = array( 
     85                'echo' => 1 
     86        ); 
     87        $r = wp_parse_args( $args, $defaults ); 
     88 
     89        extract( $r ); 
    7090        $output = ''; 
    7191        $author_cookie = get_xpress_dir_name() . "_select_author" ; 
     
    7595                $output = ''; 
    7696        } 
    77         if (empty($show)) 
    78                 return $output; 
    79         else 
    80                 echo $output; 
    81                  
    82 } 
    83  
    84 function xpress_now_user_level($show=true ) { 
     97        if ($echo) 
     98                echo $output; 
     99        else 
     100                return $output;          
     101} 
     102 
     103function xpress_now_user_level($args ='' ) { 
    85104        global $current_user; 
     105        $defaults = array( 
     106                'echo' => 1 
     107        ); 
     108        $r = wp_parse_args( $args, $defaults ); 
     109 
     110        extract( $r ); 
     111         
    86112        $output = @$current_user->user_level; 
    87         if (empty($show)) 
    88                 return $output; 
    89         else 
    90                 echo $output;            
    91 } 
    92  
    93  
    94 function xpress_list_pings($trackback, $args, $depth) { 
    95        $GLOBALS['comment'] = $trackback; 
    96         echo '<li id="comment-<?php comment_ID(); ?>">'; 
    97         comment_author_link(); 
    98 } 
    99          
    100 function xpress_credit($show = true) 
     113        if ($echo) 
     114                echo $output; 
     115        else 
     116                return $output; 
     117} 
     118 
     119 
     120         
     121function xpress_credit($args ='') 
    101122{ 
    102123        global $wp_version , $xoops_config; 
     
    105126        } 
    106127         
     128        $defaults = array( 
     129                'echo' => 1 
     130        ); 
     131        $r = wp_parse_args( $args, $defaults ); 
     132 
     133        extract( $r ); 
     134         
    107135        $xpress_version = $xoops_config->module_version; 
    108136        $xpress_codename = $xoops_config->module_codename; 
    109         $ret = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>'; 
     137        $output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>'; 
    110138        if ($xoops_config->is_wpmu) { 
    111                 $ret .= '(included <a href="http://mu.wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress MU ' . $wpmu_version . '</a>)'; 
     139                $output .= '(included <a href="http://mu.wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress MU ' . $wpmu_version . '</a>)'; 
    112140        } else { 
    113141                if (strstr($wp_version,'ME')){ 
    114                         $ret .= '(included <a href="http://wpme.sourceforge.jp/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)'; 
     142                        $output .= '(included <a href="http://wpme.sourceforge.jp/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)'; 
    115143                } else { 
    116                         $ret .= '(included <a href="http://wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)'; 
     144                        $output .= '(included <a href="http://wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)'; 
    117145                } 
    118146        } 
    119         if (empty($show)) 
    120                 return $ret; 
    121         else 
    122                 echo $ret; 
    123 } 
    124  
    125 function xpress_convert_time($show = true) 
    126 { 
    127         $ret =  timer_stop(0) .'sec. '; 
    128         if (empty($show)) 
    129                 return $ret; 
    130         else 
    131                 echo $ret; 
     147        if ($echo) 
     148                echo $output; 
     149        else 
     150                return $output; 
     151} 
     152 
     153function xpress_convert_time($args ='') 
     154{ 
     155        $defaults = array( 
     156                'echo' => 1, 
     157                'format' => '(%.3f sec.)'                
     158        ); 
     159        $r = wp_parse_args( $args, $defaults ); 
     160 
     161        extract( $r ); 
     162         
     163        $output =  sprintf($format,timer_stop(0)); 
     164        if ($echo) 
     165                echo $output; 
     166        else 
     167                return $output; 
    132168} 
    133169 
     
    138174}        
    139175 
    140 function xpress_left_arrow_post_link($show = true) 
     176function xpress_left_arrow_post_link($args ='') 
    141177{ 
    142178        global $xpress_config; 
     179        $defaults = array( 
     180                'echo' => 1 
     181        ); 
     182        $r = wp_parse_args( $args, $defaults ); 
     183 
     184        extract( $r ); 
     185         
    143186        $ret = ''; 
    144187                 
     
    191234                $on_mouse_show = $body_matches[1]; 
    192235        } 
    193         $ret = str_replace('">','" title="'.$on_mouse_show . '">' , $ret); 
    194  
    195         if (empty($show)) 
    196                 return $ret; 
    197         else 
    198                 echo $ret; 
    199 } 
    200  
    201 function xpress_right_arrow_post_link($show = true) 
     236        $output = str_replace('">','" title="'.$on_mouse_show . '">' , $ret); 
     237 
     238        if ($echo) 
     239                echo $output; 
     240        else 
     241                return $output; 
     242} 
     243 
     244function xpress_right_arrow_post_link($args ='') 
    202245{ 
    203246        global $xpress_config; 
     247        $defaults = array( 
     248                'echo' => 1 
     249        ); 
     250        $r = wp_parse_args( $args, $defaults ); 
     251 
     252        extract( $r ); 
     253 
    204254        $ret = '';               
    205255         
     
    252302                $on_mouse_show = $body_matches[1]; 
    253303        } 
    254         $ret = str_replace('">','" title="'.$on_mouse_show . '">' , $ret); 
    255  
    256         if (empty($show)) 
    257                 return $ret; 
    258         else 
    259                 echo $ret;       
     304        $output = str_replace('">','" title="'.$on_mouse_show . '">' , $ret); 
     305 
     306        if ($echo) 
     307                echo $output; 
     308        else 
     309                return $output; 
    260310} 
    261311// page link 
    262 function xpress_left_arrow_posts_link($show = true) 
     312function xpress_left_arrow_posts_link($args ='') 
    263313{ 
    264314        global $xpress_config; 
    265         $ret = ''; 
     315        $defaults = array( 
     316                'echo' => 1 
     317        ); 
     318        $r = wp_parse_args( $args, $defaults ); 
     319 
     320        extract( $r ); 
     321 
     322        $output = ''; 
    266323                 
    267324        if($xpress_config->is_left_page_navi_old){ 
     
    269326                ob_start(); 
    270327                next_posts_link("&laquo; $link_title"); 
    271                 $ret = ob_get_contents(); 
     328                $output = ob_get_contents(); 
    272329                ob_end_clean(); 
    273330        } else { 
     
    275332                ob_start(); 
    276333                previous_posts_link("&laquo; $link_title"); 
    277                 $ret = ob_get_contents(); 
    278                 ob_end_clean(); 
    279         } 
    280  
    281         if (empty($show)) 
    282                 return $ret; 
    283         else 
    284                 echo $ret; 
    285 } 
    286  
    287 function xpress_right_arrow_posts_link($show = true) 
     334                $output = ob_get_contents(); 
     335                ob_end_clean(); 
     336        } 
     337 
     338        if ($echo) 
     339                echo $output; 
     340        else 
     341                return $output; 
     342} 
     343 
     344function xpress_right_arrow_posts_link($args ='') 
    288345{ 
    289346        global $xpress_config; 
    290         $ret = '';               
     347        $defaults = array( 
     348                'echo' => 1 
     349        ); 
     350        $r = wp_parse_args( $args, $defaults ); 
     351 
     352        extract( $r ); 
     353 
     354        $output = '';            
    291355         
    292356        if($xpress_config->is_left_page_navi_old){ 
     
    294358                ob_start(); 
    295359                previous_posts_link("$link_title &raquo;"); 
    296                 $ret = ob_get_contents(); 
     360                $output = ob_get_contents(); 
    297361                ob_end_clean(); 
    298362        } else { 
     
    300364                ob_start(); 
    301365                next_posts_link("$link_title &raquo;"); 
    302                 $ret = ob_get_contents(); 
    303                 ob_end_clean(); 
    304         } 
    305  
    306         if (empty($show)) 
    307                 return $ret; 
    308         else 
    309                 echo $ret;       
     366                $output = ob_get_contents(); 
     367                ob_end_clean(); 
     368        } 
     369 
     370        if ($echo) 
     371                echo $output; 
     372        else 
     373                return $output; 
    310374} 
    311375 
     
    336400// Set and retrieves post views given a post ID or post object.  
    337401// Retrieves post views given a post ID or post object.  
    338 function xpress_post_views_count($post_id=0,$format= '',$show = true) { 
     402function xpress_post_views_count($args ='') { 
    339403        global $xoops_db,$wpdb; 
    340404 
    341405        static $post_cache_views; 
     406 
     407        $defaults = array( 
     408                'post_id' => 0, 
     409                'format'=> __('views :%d','xpressme'), 
     410                'echo' => 1 
     411        ); 
     412        $r = wp_parse_args( $args, $defaults ); 
     413 
     414        extract( $r ); 
    342415 
    343416        if ( empty($post_id) ) { 
     
    361434        if (empty($format)) $format = __('views :%d','xpressme'); 
    362435         
    363         $ret = sprintf($format,$v_count); 
    364  
    365         if ($show) echo $ret; else return $ret; 
     436        $output = sprintf($format,$v_count); 
     437 
     438        if ($echo) 
     439                echo $output; 
     440        else 
     441                return $output; 
    366442} 
    367443 
     
    466542} 
    467543 
    468 function xpress_post_new_link($link_title = 'Post New',$display = true) 
     544function xpress_post_new_link($args ='') 
    469545{ 
    470546        global $xoops_config; 
     547         
     548        $defaults = array( 
     549                'link_title'=> 'Post New', 
     550                'echo' => 1 
     551        ); 
     552        $r = wp_parse_args( $args, $defaults ); 
     553 
     554        extract( $r ); 
     555 
    471556         
    472557        if ($xoops_config->wp_db_version  > 5000){ 
     
    475560                $output = '<a href="'. get_xpress_url() . '/wp-admin/post.php' . '">' . $link_title . '</a>'; 
    476561        }        
    477         if ($display)  
    478                 echo $output; 
    479         else 
    480                 return $output; 
    481 } 
    482  
    483 function xpress_conditional_title($display = true) 
    484 { 
    485         $selected_author = xpress_selected_author(false); 
     562        if ($echo) 
     563                echo $output; 
     564        else 
     565                return $output; 
     566} 
     567 
     568function xpress_conditional_title($args ='') 
     569{ 
     570        $defaults = array( 
     571                'echo' => 1 
     572        ); 
     573        $r = wp_parse_args( $args, $defaults ); 
     574 
     575        extract( $r ); 
     576         
     577        $selected_author = xpress_selected_author('echo=0'); 
    486578         
    487579        $output = __('Main', 'xpressme'); 
     
    507599         
    508600        if (!empty($selected_author)){ 
    509                 $selected_id = xpress_selected_author_id(false); 
     601                $selected_id = xpress_selected_author_id('echo=0'); 
    510602//              $output = get_avatar($selected_id,$size = '32') . sprintf(__('Article of %s', 'xpressme'), $selected_author) . ' - ' . $output; 
    511603                if (empty($output)) 
     
    514606                        $output = sprintf(__('Article of %s', 'xpressme'), $selected_author) . ' - ' . $output; 
    515607        }        
    516         if ($display)  
    517                 echo $output; 
    518         else 
    519                 return $output; 
    520 } 
    521  
    522 function xpress_pings_list($show = true){ 
     608        if ($echo) 
     609                echo $output; 
     610        else 
     611                return $output; 
     612} 
     613 
     614function xpress_pings_list($args =''){ 
     615        $defaults = array( 
     616                'echo' => 1 
     617        ); 
     618        $r = wp_parse_args( $args, $defaults ); 
     619 
     620        extract( $r ); 
    523621         
    524622        $trackbacks = xpress_get_pings(); 
     
    539637        } 
    540638         
    541         if ($show) echo $output; else return $output; 
    542 } 
    543  
    544 function xpress_pings_number( $zero = false, $one = false, $more = false, $deprecated = '' ) { 
     639        if ($echo) 
     640                echo $output; 
     641        else 
     642                return $output; 
     643} 
     644 
     645function xpress_pings_number( $args ='' ) { 
     646        $defaults = array( 
     647                'zero' => __('No Trackback/Pingback', 'xpressme'), 
     648                'one' => __('One Trackback/Pingback', 'xpressme'), 
     649                'more' => __('% TrackBack/Pingback', 'xpressme'), 
     650                'deprecated' => '', 
     651                'echo' => 1 
     652        ); 
     653        $r = wp_parse_args( $args, $defaults ); 
     654 
     655        extract( $r ); 
     656 
    545657        $pings = xpress_get_pings(); 
    546658        if (empty($pings)){ 
     
    550662        } 
    551663        if ( $number > 1 ) 
    552                 $output = str_replace('%', number_format_i18n($number), ( false === $more ) ? __('% TrackBack/Pingback', 'xpressme') : $more); 
     664                $output = str_replace('%', number_format_i18n($number), $more); 
    553665        elseif ( $number == 0 ) 
    554                 $output = ( false === $zero ) ? __('No Trackback/Pingback', 'xpressme') : $zero; 
     666                $output = $zero; 
    555667        else // must be one 
    556                 $output = ( false === $one ) ? __('One Trackback/Pingback', 'xpressme') : $one; 
    557  
    558         echo $output; 
     668                $output = $one; 
     669 
     670        if ($echo) 
     671                echo $output; 
     672        else 
     673                return $output; 
    559674} 
    560675 
     
    608723} 
    609724 
    610 function xpress_get_calendar($sun_color = '#DB0000' ,$sat_color = '#004D99' ,$initial = true) { 
     725function xpress_get_calendar($args = '') { 
    611726        global $wpdb, $m, $monthnum, $year, $wp_locale, $posts , $xoops_config; 
    612727 
     728        $defaults = array( 
     729                sun_color => '#DB0000', 
     730                sat_color => '#004D99', 
     731                initial => true 
     732        ); 
     733        $r = wp_parse_args( $args, $defaults ); 
     734 
     735        extract( $r ); 
    613736        if ($xoops_config->is_wp20){ 
    614737                ob_start(); 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp20.php

    r271 r272  
    262262} 
    263263 
    264 // ADD WP 2.2.0 
    265 function wp_parse_args( $args, $defaults = '' ) { 
    266         if ( is_object( $args ) ) 
    267                 $r = get_object_vars( $args ); 
    268         elseif ( is_array( $args ) ) 
    269                 $r =& $args; 
    270         else 
    271                 wp_parse_str( $args, $r ); 
    272  
    273         if ( is_array( $defaults ) ) 
    274                 return array_merge( $defaults, $r ); 
    275         return $r; 
    276 } 
    277  
    278 // ADD WP 2.2.1 
    279 function wp_parse_str( $string, &$array ) { 
    280         parse_str( $string, $array ); 
    281         if ( get_magic_quotes_gpc() ) 
    282                 $array = stripslashes_deep( $array ); 
    283         $array = apply_filters( 'wp_parse_str', $array ); 
    284 } 
    285  
    286264/** 
    287265 * @ignore 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/calender_block_theme.php

    r237 r272  
    99        $mydirpath = get_xpress_dir_path(); 
    1010 
    11         $block['calender'] = xpress_get_calendar($sun_color,$sat_color); 
     11        $block['calender'] = xpress_get_calendar('sun_color=' . $sun_color . '&sat_color=' .$sat_color); 
    1212        return $block ;  
    1313} 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php

    r262 r272  
    2424        $item_no = 0;    
    2525         
    26         $selected_author_id = xpress_selected_author_id(false);  
     26        $selected_author_id = xpress_selected_author_id('echo=0');       
    2727 
    2828        global $wpdb,$wp_query,$xoops_db; 
     
    158158                        $post_modified_date_time = $post_modified_date . ' ' . $post_modified_time ; 
    159159                        $trackback_url = trackback_url(false); 
    160                         $post_viwes = xpress_post_views_count($post_id,__('views: %d','xpress') ,false); 
     160                        $post_viwes = xpress_post_views_count('post_id=' . $post_id . '&format=' . __('Views :%d', 'xpress'). '&echo=0'); 
     161 
    161162//                      if (empty($tags)) $tags = __('Not Tag'); 
    162163 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php

    r262 r272  
    2020        if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 
    2121         
    22         $selected_author_id = xpress_selected_author_id(false);  
     22        $selected_author_id = xpress_selected_author_id('echo=0');       
    2323        if (!empty($selected_author_id)){ 
    2424                $author_where ="author=$selected_author_id&"; 
     
    4545                        ob_end_clean(); 
    4646                         
    47                         $title = xpress_the_title(false); 
     47                        $title = xpress_the_title('echo=0'); 
    4848                         
    4949                        ob_start(); 
     
    132132                                                echo ' - '; 
    133133                                                the_author_posts_link(); 
    134                                                 echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')';  
     134                                                echo ' (' . xpress_post_views_count('post_id=' . $post->ID . '&format=' . __('Views :%d', 'xpress'). '&echo=0') . ')';  
     135                                                 
    135136                                                echo ' | '; 
    136137                                                // echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | '); 
     
    151152                        $post_modified_date_time = $post_modified_date . ' ' . $post_modified_time ; 
    152153                        $trackback_url = trackback_url(false); 
    153                         $post_viwes = xpress_post_views_count($post_id,'views: %d' ,false); 
     154                        $post_viwes = xpress_post_views_count('post_id=' . $post_id . '&format=' . __('Views :%d', 'xpress'). '&echo=0'); 
     155 
    154156//                      if (empty($tags)) $tags = __('Not Tag'); 
    155157 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php

    r262 r272  
    1818        if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 
    1919 
    20         $selected_author_id = xpress_selected_author_id(false);  
     20        $selected_author_id = xpress_selected_author_id('echo=0');       
    2121        if (!empty($selected_author_id)){ 
    2222                $author_where ="author=$selected_author_id&"; 
     
    118118                        $post_modified_date_time = $post_modified_date . ' ' . $post_modified_time ; 
    119119                        $trackback_url = trackback_url(false); 
    120                         $post_viwes = xpress_post_views_count($post_id,'views: %d' ,false); 
     120                        $post_viwes = xpress_post_views_count('post_id=' . $post_id . '&format=' . __('Views :%d', 'xpress'). '&echo=0'); 
     121 
    121122//                      if (empty($tags)) $tags = __('Not Tag'); 
    122123 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/footer.php

    r232 r272  
    77                <!-- <?php printf(__('%d queries. %s seconds.', 'xpress'), get_num_queries(), timer_stop(0, 3)); ?> --> 
    88        <!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. --> 
    9                 <div class="xpress_credit"><?php echo xpress_credit(false). ' (' . xpress_convert_time(false) . ')'; ?></div> 
     9                <div class="xpress_credit"><?php echo xpress_credit('echo=0'). ' (' . xpress_convert_time('echo=0&format=' . __('%.3f sec.', 'xpress')) . ')'; ?></div> 
    1010</div> 
    1111</div> 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/header.php

    r237 r272  
    3030        <div id="xpress-header-bar-top"> 
    3131                <div class="xpress-header-title"> 
    32                         <?php  if (xpress_selected_author_id(false)) echo get_avatar(xpress_selected_author_id(false),$size = '32'); ?> 
     32                        <?php  if (xpress_selected_author_id('echo=0')) echo get_avatar(xpress_selected_author_id('echo=0'),$size = '32'); ?> 
    3333                        <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a> 
    3434                </div> 
     
    4545                <?php endif; ?> 
    4646                <a href="<?php echo get_option('home'); ?>/"><?php _e('Blogs Home','xpress')?></a>  
    47                 <?php if(xpress_is_contributor()) { echo ' | ' ; xpress_post_new_link(__('Post New','xpress')); }?> 
     47                <?php if(xpress_is_contributor()) { echo ' | ' ; xpress_post_new_link('link_title='. __('Post New','xpress'). '&echo=1'); }?> 
    4848        </div> 
    4949</div> 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/index.php

    r252 r272  
    1515                                        <div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div> 
    1616                                <?php else : ?> 
    17                                         <div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div> 
    18                                         <div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div> 
     17                                        <div class="alignleft"><?php xpress_left_arrow_posts_link('echo=1'); ?></div> 
     18                                        <div class="alignright"><?php xpress_right_arrow_posts_link('echo=1'); ?></div> 
    1919                                <?php endif; ?> 
    2020                        </div> 
     
    4242                                                echo ' - '; 
    4343                                                the_author_posts_link(); 
    44                                                 echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')';  
     44                                                echo ' (' . xpress_post_views_count('post_id=' . $post->ID . '&format=' . __('Views :%d', 'xpress'). '&echo=0') . ')';  
    4545                                                echo ' | '; 
    4646                                                // echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | '); 
     
    5959                                        <div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div> 
    6060                                <?php else : ?> 
    61                                         <div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div> 
    62                                         <div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div> 
     61                                        <div class="alignleft"><?php xpress_left_arrow_posts_link('echo=1'); ?></div> 
     62                                        <div class="alignright"><?php xpress_right_arrow_posts_link('echo=1'); ?></div> 
    6363                                <?php endif; ?> 
    6464                        </div> 
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/single.php

    r253 r272  
    1313                        <?php while (have_posts()) : the_post(); ?> 
    1414                                <div class="xpress-navi-bar"> 
    15                                         <div class="alignleft"><?php xpress_left_arrow_post_link(true); ?></div> 
    16                                         <div class="alignright"><?php xpress_right_arrow_post_link(true); ?></div> 
     15                                        <div class="alignleft"><?php xpress_left_arrow_post_link('echo=1'); ?></div> 
     16                                        <div class="alignright"><?php xpress_right_arrow_post_link('echo=1'); ?></div> 
    1717                                </div> 
    1818 
     
    4040                                                        echo ' - '; 
    4141                                                        the_author_posts_link(); 
    42                                                         echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')';  
     42                                                        echo ' (' . xpress_post_views_count('post_id=' . $post->ID . '&format=' . __('Views :%d', 'xpress'). '&echo=0') . ')';  
    4343                                                        echo ' | '; 
    4444                                                        // echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | '); 
     
    5151                                                         
    5252                                        <div id ="xpress-pings-block"> 
    53                                                 <h3><?php xpress_pings_number(__('No Trackback/Pingback', 'xpress'),__('One Trackback/Pingback', 'xpress'),__('% TrackBack/Pingback', 'xpress')) ?></h3> 
     53                                                <h3><?php xpress_pings_number('zero=' . __('No Trackback/Pingback', 'xpress'). '&one='. __('One Trackback/Pingback', 'xpress'). '&more=' . __('% TrackBack/Pingback', 'xpress')) ?></h3> 
    5454                                                <p class="xpress_pings_status"><small> 
    5555                                                <?php 
     
    6161                                                ?> 
    6262                                                </small></p> 
    63                                                 <?php xpress_pings_list(true) ?>                                         
     63                                                <?php xpress_pings_list('echo=1') ?>                                     
    6464                                        </div> 
    6565                                                         
     
    7575                                 
    7676                                <div class="xpress-navi-bar"> 
    77                                         <div class="alignleft"><?php xpress_left_arrow_post_link(true) ?></div> 
    78                                         <div class="alignright"><?php xpress_right_arrow_post_link(true) ?></div> 
     77                                        <div class="alignleft"><?php xpress_left_arrow_post_link('echo=1') ?></div> 
     78                                        <div class="alignright"><?php xpress_right_arrow_post_link('echo=1') ?></div> 
    7979                                </div> 
    8080 
     
    8686                                        <div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div> 
    8787                                <?php else : ?> 
    88                                         <div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div> 
    89                                         <div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div> 
     88                                        <div class="alignleft"><?php xpress_left_arrow_posts_link('echo=1'); ?></div> 
     89                                        <div class="alignright"><?php xpress_right_arrow_posts_link('echo=1'); ?></div> 
    9090                                <?php endif; ?> 
    9191                        </div> 
Note: See TracChangeset for help on using the changeset viewer.