XPressME Integration Kit

Trac

Changeset 165


Ignore:
Timestamp:
Apr 8, 2009, 12:45:03 AM (15 years ago)
Author:
toemon
Message:

Bump Ver0.28 #53 最近の記事内容ブロックのデザイン調整

モジュール外にブロックを配置したとき、ブロックCSSとして、テーマ内のstyle.cssとhotdateプラグインのCSSを取り込むようにした。 include/xpress_block_render.php xpress_get_plugin_css()
xpress_defaultのコンテンツ出力と同じ表示を行う all_in_oneタグを追加

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/xpress_block_render.php

    r135 r165  
    7777                        return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/block_style.css'; 
    7878        } 
     79         
     80        function get_stylesheet_url($mydirname) 
     81        { 
     82                global $xoops_config; 
     83                $mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname; 
     84                $select_theme = get_xpress_theme_name($mydirname); 
     85                $style_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/style.css'; 
     86                if (file_exists($style_file)) 
     87                        return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/' . $select_theme . '/style.css'; 
     88                else     
     89                        return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/style.css'; 
     90        } 
     91         
     92        function xpress_get_plugin_css($mydirname = '') 
     93        { 
     94                $this_url = '/modules/'. $mydirname; 
     95                $call_url = $_SERVER['REQUEST_URI']; 
     96                if (!strstr($call_url,$this_url)){                       
     97                        global $xoops_config; 
     98                         
     99                        // Module Main CSS 
     100                        $output = "\n".'<style type="text/css">@import url('.get_stylesheet_url($mydirname).');</style>'; 
     101                         
     102                        // hotDate 
     103                        $output .= "\n".'<style type="text/css">@import url('.$xoops_config->module_url.'/wp-content/plugins/hotDates/hotDates.css);</style>'; 
     104                        return $output;  
     105                }  
     106                return ''; 
     107        } 
    79108 
    80109        function xpress_block_css_set($mydirname = '') 
    81110        { 
    82111                $style_url =  get_block_stylesheet_url($mydirname); 
    83                    
     112                 
    84113                $tplVars =& $GLOBALS['xoopsTpl']->get_template_vars(); 
    85114                $csslink = "\n".'<link rel="stylesheet" type="text/css" media="screen" href="'. $style_url .'" />'; 
     115                // Module Main CSS Plugin Css 
     116                $csslink .= xpress_get_plugin_css($mydirname); 
     117 
    86118                        if(array_key_exists('xoops_block_header', $tplVars)) { 
    87119                                if (!strstr($tplVars['xoops_block_header'],$csslink)) { 
  • trunk/templates/source/recent_posts_content_block.html

    r121 r165  
    2121                <{$content.comment_link}>                               // Displays a link to the comments popup window if comments_popup_script() is used, otherwise it displays a normal link to comments.  
    2222                <{$content.trackback_url}>                              // Displays the trackback URL for the current post. 
     23                <{$content.all_in_one}>                                 // Displays the xpress_default theme render. 
    2324                <{/foreach}>                                                    // End of Loop 
    2425************************* End of usage ************************ *}> 
     
    3031                <ul> 
    3132                <{foreach from=$block.contents item=content}> 
    32                         <li> 
    33                         <{$content.post_title}><br /> 
    34                         <{$content.post_content}><br /> 
    35                         <{$content.post_date_time}><br /> 
    36                         <{$content.post_author}><br /> 
    37                         <{$content.post_category}><br /> 
    38                         <{$content.post_tags}><br /> 
    39                         <{$content.post_views}><br /> 
    40                         <{$content.comment_link}><br /> 
    41                         <{$content.trackback_url}> 
    42                         </li> 
     33                        <{$content.all_in_one}> 
    4334                <{/foreach}> 
    4435                </ul> 
  • trunk/wp-content/plugins/xpressme/include/custom_functions.php

    r164 r165  
    11<?php 
     2function xpress_the_title($show = false) 
     3{ 
     4        $output = '<div class ="xpress-post-header">' . "\n"; 
     5         
     6        if (function_exists('hotDates')) { 
     7                ob_start(); 
     8                        hotDates(); 
     9                        $output .= ob_get_contents(); 
     10                ob_end_clean(); 
     11        } 
     12        $output .= '<div class ="xpress-post-title">' . "\n"; 
     13        $output .= '<h2><a href="'; 
     14        ob_start(); 
     15                the_permalink(); 
     16                $output .= ob_get_contents(); 
     17        ob_end_clean(); 
     18                                                 
     19        $output .= '" rel="bookmark" title="'; 
     20        $output .= sprintf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); 
     21        $output .= '">'; 
     22        ob_start(); 
     23                the_title(); 
     24                $output .= ob_get_contents(); 
     25        ob_end_clean(); 
     26        $output .= '</a></h2>' . "\n"; 
     27        $output .= '</div>' . "\n"; 
     28        $output .= '</div>' . "\n"; 
     29         
     30        if (empty($show)) 
     31                return $output; 
     32        else 
     33                echo $output; 
     34 
     35} 
     36 
    237function xpress_selected_author($show=true ) { 
    338        $output = ''; 
  • trunk/wp-content/themes/xpress_default/blocks/block_style.css

    r137 r165  
    337337 
    338338} 
     339 
     340 
  • trunk/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php

    r157 r165  
    4545                        ob_end_clean(); 
    4646                         
    47                         ob_start(); 
    48                                 the_title(); 
    49                                 $title = ob_get_contents(); 
    50                         ob_end_clean(); 
     47                        $title = xpress_the_title(false); 
    5148                         
    5249                        ob_start(); 
     
    104101                                $comments_popup_link = ob_get_contents(); 
    105102                        ob_end_clean(); 
     103 
     104// all_in_one                    
     105                        ob_start(); 
     106?> 
     107                                <div class="xpress-post" id="post-<?php the_ID(); ?>"> 
     108                                        <div class ="xpress-post-header"> 
     109                                                <?php if (function_exists('hotDates')) { hotDates(); }?> 
     110                                                <div class ="xpress-post-title"> 
     111                                                        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2> 
     112                                                </div> 
     113                                        </div> 
     114                                        <div class="xpress-post-entry"> 
     115<?php 
     116                        if ($excerpt){ 
     117                                $excerpt_length_word = $excerpt_size; 
     118                                $excerpt_length_character = $excerpt_size; 
     119                                $more_link_text = ''; 
     120                                $post_content = get_xpress_excerpt_contents($excerpt_length_word,$excerpt_length_character,$more_link_text); 
     121                        } else { 
     122                                $post_content = xpress_the_content(__('more'),0,'',false);       
     123                        } 
     124                        echo $post_content; 
     125?>                                                       
     126                                        </div> 
     127                                        <div class="xpress-link-pages"><?php wp_link_pages() ?></div> 
     128                                        <div class ="xpress-post-footer"> 
     129<?php 
     130                                                the_time('Y/m/d l'); 
     131                                                echo ' - '; 
     132                                                the_author_posts_link(); 
     133                                                echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')';  
     134                                                echo ' | '; 
     135                                                // echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | '); 
     136                                                printf(__('Posted in %s', 'xpress'), get_the_category_list(', ')); 
     137                                                echo ' | '; 
     138                                                edit_post_link(__('Edit', 'xpress'), '', ' | '); 
     139                                                comments_popup_link(__('No Comments &#187;', 'xpress'), __('1 Comment &#187;', 'xpress'), __('% Comments &#187;', 'xpress'), '', __('Comments Closed', 'xpress') ); 
     140?> 
     141                                        </div> 
     142                                </div> 
     143<?php 
     144                        $all_in_one = ob_get_contents(); 
     145                        ob_end_clean(); 
     146                                                 
    106147                         
    107148                        $post_title = '<a href="' . $permalink . '">' . $title . '</a>'; 
     
    127168                                'post_views'            => $post_viwes, 
    128169                                'comment_link'  => $comments_popup_link , 
    129                                 'trackback_url' => $trackback_url 
     170                                'trackback_url' => $trackback_url , 
     171                                'all_in_one' => $all_in_one 
    130172                        ); 
    131173                         
     
    137179        return $block ; 
    138180} 
     181 
    139182?> 
  • trunk/wp-content/themes/xpress_default/index.php

    r163 r165  
    3030                                        </div> 
    3131                                        <div class="xpress-post-entry"> 
    32                                                 <?php xpress_the_content(__('Read the rest of this entry &raquo;') ); ?> 
     32                                                <?php xpress_the_content(__('Read the rest of this entry &raquo;', 'xpress') ); ?> 
    3333                                        </div> 
    3434                                        <div class="xpress-link-pages"><?php wp_link_pages() ?></div> 
  • trunk/xoops_version.php

    r164 r165  
    3131$modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XPRESS_NAME') ; 
    3232$modversion['description'] = constant( '_MI_XPRESS_DESC'); 
    33 $modversion['version'] = "0.27"; 
     33$modversion['version'] = "0.28"; 
    3434$modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://www.toemon.com) ;"; 
    3535$modversion['author'] = "toemon (http://www.toemon.com)"; 
     
    4040 
    4141// status 
    42 $modversion['codename'] = "r164"; 
     42$modversion['codename'] = "r165"; 
    4343 
    4444// onInstall, onUpdate, onUninstall 
Note: See TracChangeset for help on using the changeset viewer.