Ignore:
Timestamp:
02/20/10 11:29:15 (3 years ago)
Author:
nick_ramsay
Message:

[TRUNK] Hotaru 1.1 - run install/upgrade.php and upgrade the plugins by turning them off and back on again. Details in forum soon.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/content/plugins/categories/categories.php

    r1108 r1190  
    33 * name: Categories 
    44 * description: Enables categories for posts 
    5  * version: 1.2 
     5 * version: 1.3 
    66 * folder: categories 
    77 * class: Categories 
    88 * type: categories 
    99 * requires: sb_base 0.1, submit 1.9, category_manager 0.7 
    10  * hooks: sb_base_theme_index_top, header_include, pagehandling_getpagename, sb_base_functions_preparelist, sb_base_show_post_author_date, header_end, breadcrumbs 
     10 * hooks: sb_base_theme_index_top, header_include, pagehandling_getpagename, sb_base_functions_preparelist, sb_base_show_post_author_date, header_end, breadcrumbs, header_meta 
    1111 * author: Nick Ramsay 
    1212 * authorurl: http://hotarucms.org/member.php?1-Nick 
     
    146146     
    147147    /** 
     148     * Also changes meta when browsing a category page 
     149     */ 
     150    public function header_meta($h) 
     151    {     
     152        if ($h->subPage == 'category') 
     153        {  
     154            $cat_meta = $h->getCatMeta($h->vars['category_id']); 
     155             
     156            if ($cat_meta->category_desc) { 
     157                echo '<meta name="description" content="' . urldecode($cat_meta->category_desc) . '" />' . "\n"; 
     158            } else { 
     159                echo '<meta name="description" content="' . $h->lang['header_meta_description'] . '" />' . "\n";  // default meta tags 
     160            } 
     161             
     162            if ($cat_meta->category_keywords) { 
     163                echo '<meta name="keywords" content="' . urldecode($cat_meta->category_keywords) . '" />' . "\n"; 
     164            } else { 
     165                echo '<meta name="description" content="' . $h->lang['header_meta_keywords'] . '" />' . "\n";  // default meta tags 
     166            } 
     167 
     168            return true; 
     169        } 
     170    } 
     171     
     172     
     173    /** 
    148174     * Read category settings 
    149175     */ 
Note: See TracChangeset for help on using the changeset viewer.