Changeset 646 for trunk

Show
Ignore:
Timestamp:
09/16/07 21:08:11 (14 months ago)
Author:
michiel
Message:

Add 'about' section in admin interface.
Closes #152

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/admin/index.php

    r574 r646  
    9494                                case "edit_plugin_setting"   : $admin->edit_plugin_setting($_REQUEST["plugin"], $_REQUEST); break; 
    9595                                case "save_plugin_setting"   : $admin->save_plugin_setting($_REQUEST["plugin"], $_REQUEST); break; 
     96                                case "show_about"            : $admin->show_about();                                        break; 
    9697                                default                      : $admin->show_index();                                        break; 
    9798                        } 
  • trunk/common/mvblog_admin.php

    r644 r646  
    106106                                $this->_selected_submenuitem = "menuitems"; 
    107107                                break; 
     108                        case "show_about" : 
     109                                $this->_selected_menuitem = "index"; 
     110                                $this->_selected_submenuitem = "about"; 
     111                                break; 
    108112                        default : 
    109113                                $this->_selected_menuitem = "index"; 
     114                                $this->_selected_submenuitem = "index"; 
    110115                                break; 
    111116                        } 
    112                 } else 
     117                } else { 
    113118                        $this->_selected_menuitem = "index"; 
     119                        $this->_selected_submenuitem = "index"; 
     120                } 
    114121        } 
    115122        /* }}} */ 
     
    302309        } 
    303310        /* }}} */ 
     311        /* show_about {{{ */ 
     312        /** 
     313         * Show information about the current version etc. 
     314         */ 
     315        public function show_about() { 
     316                /* gather some info we want to show */ 
     317                $mvblogversion = $this->version; 
     318                if (array_key_exists("dbversion", $this->settings)) 
     319                        $dbversion = $this->settings["dbversion"]; 
     320                else 
     321                        $dbversion = gettext("Unknown"); 
     322                if (array_key_exists("webroot", $this->settings)) 
     323                        $webroot = $this->settings["webroot"]; 
     324                else 
     325                        $webroot = gettext("Unknown"); 
     326                if (is_array($this->active_plugins)) 
     327                        $active_plugins = implode(", ", $this->active_plugins); 
     328                else 
     329                        $active_plugins = gettext("None"); 
     330                ?> 
     331                <p class="first"> 
     332                        <h2>Information about this MvBlog instance</h2> 
     333                        MvBlog version: <?php echo $mvblogversion; ?><br /> 
     334                        Database version: <?php echo $dbversion; ?><br /> 
     335                        Active plugins: <?php echo $active_plugins; ?> <br /> 
     336                </p> 
     337                <p class="first"> 
     338                        MvBlog is created by Michiel van Baak &lt;michiel@mvblog.org&gt;<br /> 
     339                        With the help of Leonieke Aalders, Sofie van Tendeloo en Ferry Boender.<br /> 
     340                        Besides those 3 contributers others have helped as well, but those 3 were there from the beginning<br /> 
     341                        and without them this project would never be this far.<br /><br /> 
     342                        For more information please visit <a href="http://www.mvblog.org">www.mvblog.org</a><br /> 
     343                        For documentation please go to the <a href="http://dev.mvblog.org/wiki/EndUserDocumentation">wiki</a><br /> 
     344                        If you found a bug or need a new feature please report it on <a href="http://dev.mvblog.org">the developement website</a>. 
     345                </p> 
     346                <?php 
     347        } 
     348        /* }}} */ 
    304349        /* show_admin_menu {{{ */ 
    305350        /** 
     
    340385                                        <a class="if_submenu_item<?php if ($this->_selected_submenuitem == "settings")   { echo "_act"; } ?>" href="./index.php?action=show_settings"><?php echo gettext("Settings"); ?></a>&nbsp; 
    341386                                        <a class="if_submenu_item<?php if ($this->_selected_submenuitem == "menuitems")  { echo "_act"; } ?>" href="./index.php?action=show_menuitems"><?php echo gettext("Menuitems"); ?></a>&nbsp; 
     387                                        <?php 
     388                                        break; 
     389                                case "index" : 
     390                                        ?> 
     391                                        <a class="if_submenu_item<?php if ($this->_selected_submenuitem == "index")      { echo "_act"; } ?>" href="./index.php"><?php echo gettext("Main"); ?></a>&nbsp; 
     392                                        <a class="if_submenu_item<?php if ($this->_selected_submenuitem == "about")      { echo "_act"; } ?>" href="./index.php?action=show_about"><?php echo gettext("About"); ?></a>&nbsp; 
    342393                                        <?php 
    343394                                        break;