Changeset 569 for team

Show
Ignore:
Timestamp:
08/26/07 22:14:24 (15 months ago)
Author:
michiel
Message:

import work I have done so far.
- added import class to handle the basics
- added wordpress class based on the sqldump I got from fboender.

It will import categories and posts. Work to fix the internal images and hyperlinks is being worked on

Re #37

Location:
team/michiel/import_blogs
Files:
2 added
2 modified

Legend:

Unmodified
Added
Removed
  • team/michiel/import_blogs/admin/index.php

    r481 r569  
    5656                                $_REQUEST["action"] = ""; 
    5757                        switch ($_REQUEST["action"]) { 
    58                                 case "check_login"           : $admin->check_login((array_key_exists("login", $_POST))?$_POST["login"]:"");                        break; 
    59                                 case "logout"                : $admin->logout();                                            break; 
    60                                 case "show_cats"             : $admin->show_cats();                                         break; 
    61                                 case "edit_cat"              : $admin->edit_cat((array_key_exists("id", $_REQUEST))?$_REQUEST["id"]:0);                           break; 
    62                                 case "save_cat"              : $admin->save_cat($_POST["cat"]);                             break; 
    63                                 case "delete_cat"            : $admin->delete_cat($_REQUEST["cat"]["id"]);                  break; 
    64                                 case "show_posts"            : $admin->show_posts((array_key_exists("options", $_REQUEST))?$_REQUEST["options"]:"");                    break; 
    65                                 case "edit_post"             : $admin->edit_post((array_key_exists("id", $_REQUEST))?$_REQUEST["id"]:0);                          break; 
    66                                 case "save_post"             : $admin->save_post($_POST["post"]);                           break; 
    67                                 case "delete_post"           : $admin->delete_post($_REQUEST["post"]["id"]);                break; 
    68                                 case "show_authors"          : $admin->show_authors();                                      break; 
    69                                 case "edit_author"           : $admin->edit_author((array_key_exists("id", $_REQUEST))?$_REQUEST["id"]:0);                        break; 
    70                                 case "save_author"           : $admin->save_author($_POST["author"]);                       break; 
    71                                 case "show_users"            : $admin->show_users();                                        break; 
    72                                 case "edit_user"             : $admin->edit_user((array_key_exists("id", $_REQUEST))?$_REQUEST["id"]:0);                          break; 
    73                                 case "save_user"             : $admin->save_user($_POST["user"]);                           break; 
    74                                 case "delete_inactive_users" : $admin->delete_inactive_users($_POST["select_inactive"]);    break; 
    75                                 case "delete_user"           : $admin->delete_user($_REQUEST["user"]["id"]);                break; 
    76                                 case "show_settings"         : $admin->show_settings();                                     break; 
    77                                 case "save_settings"         : $admin->save_settings($_POST["settings"]); 
    78                                                                $admin->show_settings();                                     break; 
    79                                 case "show_menuitems"        : $admin->show_menuitems();                                    break; 
    80                                 case "save_menuitems"        : $admin->save_menuitems($_POST["link"]);                      break; 
    81                                 case "show_comments"         : $admin->show_comments((array_key_exists("options", $_REQUEST))?$_REQUEST["options"]:"");                 break; 
    82                                 case "delete_comment"        : $admin->delete_comment($_REQUEST["id"]);                     break; 
    83                                 case "recover_comment"       : $admin->recover_comment($_REQUEST["id"]);                    break; 
    84                                 case "show_plugins"          : $admin->show_plugins();                                      break; 
    85                                 case "activate_plugin"       : $admin->_activate_plugin($_REQUEST["plugin"]); 
    86                                                                $admin->show_plugins();                                      break; 
    87                                 case "deactivate_plugin"     : $admin->_deactivate_plugin($_REQUEST["plugin"]); 
    88                                                                $admin->show_plugins();                                      break; 
    89                                 case "config_plugin"         : $admin->configure_plugin($_REQUEST["plugin"]);               break; 
    90                                 case "edit_plugin_setting"   : $admin->edit_plugin_setting($_REQUEST["plugin"], $_REQUEST); break; 
    91                                 case "save_plugin_setting"   : $admin->save_plugin_setting($_REQUEST["plugin"], $_REQUEST); break; 
    92                                 default                      : $admin->show_index();                                        break; 
     58                                case "check_login" :  
     59                                        $admin->check_login((array_key_exists("login", $_POST))?$_POST["login"]:""); 
     60                                        break; 
     61                                case "logout" :  
     62                                        $admin->logout(); 
     63                                        break; 
     64                                case "show_cats" : 
     65                                        $admin->show_cats(); 
     66                                        break; 
     67                                case "edit_cat" : 
     68                                        $admin->edit_cat((array_key_exists("id", $_REQUEST))?$_REQUEST["id"]:0); 
     69                                        break; 
     70                                case "save_cat" : 
     71                                        $admin->save_cat($_POST["cat"]); 
     72                                        break; 
     73                                case "delete_cat" : 
     74                                        $admin->delete_cat($_REQUEST["cat"]["id"]); 
     75                                        break; 
     76                                case "show_posts" : 
     77                                        $admin->show_posts((array_key_exists("options", $_REQUEST))?$_REQUEST["options"]:""); 
     78                                        break; 
     79                                case "edit_post" : 
     80                                        $admin->edit_post((array_key_exists("id", $_REQUEST))?$_REQUEST["id"]:0); 
     81                                        break; 
     82                                case "save_post" : 
     83                                        $admin->save_post($_POST["post"]); 
     84                                        break; 
     85                                case "delete_post" : 
     86                                        $admin->delete_post($_REQUEST["post"]["id"]); 
     87                                        break; 
     88                                case "show_authors" : 
     89                                        $admin->show_authors(); 
     90                                        break; 
     91                                case "edit_author" : 
     92                                        $admin->edit_author((array_key_exists("id", $_REQUEST))?$_REQUEST["id"]:0); 
     93                                        break; 
     94                                case "save_author" : 
     95                                        $admin->save_author($_POST["author"]); 
     96                                        break; 
     97                                case "show_users" : 
     98                                        $admin->show_users(); 
     99                                        break; 
     100                                case "edit_user" : 
     101                                        $admin->edit_user((array_key_exists("id", $_REQUEST))?$_REQUEST["id"]:0); 
     102                                        break; 
     103                                case "save_user" : 
     104                                        $admin->save_user($_POST["user"]); 
     105                                        break; 
     106                                case "delete_inactive_users" : 
     107                                        $admin->delete_inactive_users($_POST["select_inactive"]); 
     108                                        break; 
     109                                case "delete_user" : 
     110                                        $admin->delete_user($_REQUEST["user"]["id"]); 
     111                                        break; 
     112                                case "show_settings" : 
     113                                        $admin->show_settings(); 
     114                                        break; 
     115                                case "save_settings" : 
     116                                        $admin->save_settings($_POST["settings"]); 
     117                                        $admin->show_settings(); 
     118                                        break; 
     119                                case "show_menuitems" : 
     120                                        $admin->show_menuitems(); 
     121                                        break; 
     122                                case "save_menuitems" : 
     123                                        $admin->save_menuitems($_POST["link"]); 
     124                                        break; 
     125                                case "show_comments" : 
     126                                        $admin->show_comments((array_key_exists("options", $_REQUEST))?$_REQUEST["options"]:""); 
     127                                        break; 
     128                                case "delete_comment" : 
     129                                        $admin->delete_comment($_REQUEST["id"]); 
     130                                        break; 
     131                                case "recover_comment" : 
     132                                        $admin->recover_comment($_REQUEST["id"]); 
     133                                        break; 
     134                                case "show_plugins" : 
     135                                        $admin->show_plugins(); 
     136                                        break; 
     137                                case "activate_plugin" : 
     138                                        $admin->_activate_plugin($_REQUEST["plugin"]); 
     139                                        $admin->show_plugins(); 
     140                                        break; 
     141                                case "deactivate_plugin" : 
     142                                        $admin->_deactivate_plugin($_REQUEST["plugin"]); 
     143                                        $admin->show_plugins(); 
     144                                        break; 
     145                                case "config_plugin" : 
     146                                        $admin->configure_plugin($_REQUEST["plugin"]); 
     147                                        break; 
     148                                case "edit_plugin_setting" : 
     149                                        $admin->edit_plugin_setting($_REQUEST["plugin"], $_REQUEST); 
     150                                        break; 
     151                                case "save_plugin_setting" : 
     152                                        $admin->save_plugin_setting($_REQUEST["plugin"], $_REQUEST); 
     153                                        break; 
     154                                case "show_import" : 
     155                                        $admin->show_import(); 
     156                                        break; 
     157                                case "import" : 
     158                                        $admin->import((array_key_exists("type", $_REQUEST))?$_REQUEST["type"]:"", $_REQUEST); 
     159                                        break; 
     160                                default :  
     161                                        $admin->show_index(); 
     162                                        break; 
    93163                        } 
    94164$admin->html_footer(); 
  • team/michiel/import_blogs/common/mvblog_admin.php

    r549 r569  
    325325                                <a class="if_menu_item<?php if ($this->_selected_menuitem == "settings")   { echo "_act"; } ?>" href="./index.php?action=show_settings"><?php echo gettext("Blogsettings"); ?></a>&nbsp; 
    326326                                <a class="if_menu_item<?php if ($this->_selected_menuitem == "menuitems")  { echo "_act"; } ?>" href="./index.php?action=show_menuitems"><?php echo gettext("Menuitems"); ?></a>&nbsp; 
     327                                <a class="if_menu_item<?php if ($this->_selected_menuitem == "import")     { echo "_act"; } ?>" href="./index.php?action=show_import"><?php echo gettext("Import"); ?></a>&nbsp; 
    327328                                <a class="if_menu_item" href="./index.php?action=logout"><?php echo gettext("Logout"); ?></a>&nbsp; 
    328329                        </div> 
     
    16501651        } 
    16511652        /* }}} */ 
     1653        public function show_import() { 
     1654                $import = new MvBlog_import(); 
     1655                $import->show_options(); 
     1656        } 
     1657        public function import($type, $options = array()) { 
     1658                $import = new MvBlog_import(); 
     1659                $import->run_module($type, $options); 
     1660        } 
    16521661} 
    16531662?>