Changeset 682 for trunk/common

Show
Ignore:
Timestamp:
10/09/07 22:01:48 (15 months ago)
Author:
michiel
Message:

introduce setting to show category icons for posts.
Defaults to off.
Closes #106

Location:
trunk/common
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/common/mvblog.php

    r657 r682  
    245245                                                                $categories = explode(",", $row["categories_ids"]); 
    246246                                                                foreach ($categories as $v) { 
    247                                                                         if (array_key_exists($v, $this->categories) && $this->categories[$v]["icon"]) 
     247                                                                        if (array_key_exists($v, $this->categories) && $this->categories[$v]["icon"] && $this->settings["show_cat_icons"]) 
    248248                                                                                echo "<img src=\"images/categories/".$this->categories[$v]["icon"]."\" title=\"".htmlspecialchars($this->categories[$v]["name"])."\" alt=\"".htmlspecialchars($this->categories[$v]["name"])."\" class=\"category_icon\" />&nbsp;"; 
    249249                                                                        elseif (array_key_exists($v, $this->categories)) 
  • trunk/common/mvblog_admin.php

    r657 r682  
    17741774                                                </td> 
    17751775                                        </tr><tr> 
     1776                                                <td><?php echo gettext("show category icons"); ?></td> 
     1777                                                <td> 
     1778                                                        <select name="settings[show_cat_icons]"> 
     1779                                                                <option value="0"><?php echo gettext("no"); ?></option> 
     1780                                                                <option value="1"<?php if ($settings["show_cat_icons"] == 1) echo " SELECTED"; ?>><?php echo gettext("yes"); ?></option> 
     1781                                                        </select> 
     1782                                                </td> 
     1783                                        </tr><tr> 
    17761784                                                <td colspan="2">&nbsp;</td> 
    17771785                                        </tr><tr> 
  • trunk/common/mvblog_common.php

    r678 r682  
    407407                $settings["allowanoncomments"] = 0; 
    408408                $settings["dbversion"]         = 0; 
     409                $settings["show_cat_icons"]    = 0; 
    409410 
    410411                while ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) {