The MU forums have moved to WordPress.org

Installation sql - where to edit this? (5 posts)

  1. denzel2364
    Member
    Posted 14 years ago #

    Hi there,

    When a user registers a blog is created with default info, a single post page etc.

    Where can i edit the installation SQL to an extra page to the site?

  2. denzel2364
    Member
    Posted 14 years ago #

    :-(

  3. SteveAtty
    Member
    Posted 14 years ago #

    I think it might be the upgrade script but I'm not sure - I'm sure its been discussed before on here. Have you tried searching for it?

  4. denzel2364
    Member
    Posted 14 years ago #

    oh my, indeed i have for over a week and a half.

    I thought of an easier solution.

    I have cretaed mysql script for adding pages.

    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    
    <strong>//NEED TO ADD CONNECTION TO MYSQL DATABASE</strong>
    -- Database: <code>xxx</code>
    //end
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table <code>wp_1_posts</code><?php link_to the users dbtable?>
    
    --
    
    CREATE TABLE IF NOT EXISTS <code>wp_1_posts</code><strong><?php link_to the users dbtable?></strong> (
      <code>ID</code> bigint(20) unsigned NOT NULL auto_increment,
      <code>post_author</code> bigint(20) unsigned NOT NULL default '0',
      <code>post_date</code> datetime NOT NULL default '0000-00-00 00:00:00',
      <code>post_date_gmt</code> datetime NOT NULL default '0000-00-00 00:00:00',
      <code>post_content</code> longtext NOT NULL,
      <code>post_title</code> text NOT NULL,
      <code>post_excerpt</code> text NOT NULL,
      <code>post_status</code> varchar(20) NOT NULL default 'publish',
      <code>comment_status</code> varchar(20) NOT NULL default 'open',
      <code>ping_status</code> varchar(20) NOT NULL default 'open',
      <code>post_password</code> varchar(20) NOT NULL default '',
      <code>post_name</code> varchar(200) NOT NULL default '',
      <code>to_ping</code> text NOT NULL,
      <code>pinged</code> text NOT NULL,
      <code>post_modified</code> datetime NOT NULL default '0000-00-00 00:00:00',
      <code>post_modified_gmt</code> datetime NOT NULL default '0000-00-00 00:00:00',
      <code>post_content_filtered</code> text NOT NULL,
      <code>post_parent</code> bigint(20) unsigned NOT NULL default '0',
      <code>guid</code> varchar(255) NOT NULL default '',
      <code>menu_order</code> int(11) NOT NULL default '0',
      <code>post_type</code> varchar(20) NOT NULL default 'post',
      <code>post_mime_type</code> varchar(100) NOT NULL default '',
      <code>comment_count</code> bigint(20) NOT NULL default '0',
      PRIMARY KEY  (<code>ID</code>),
      KEY <code>post_name</code> (<code>post_name</code>),
      KEY <code>type_status_date</code> (<code>post_type</code>,<code>post_status</code>,<code>post_date</code>,<code>ID</code>),
      KEY <code>post_parent</code> (<code>post_parent</code>)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
    
    --
    -- Dumping data for table <code>wp_1_posts</code><?php link_to the users dbtable?>
    --
    
    INSERT INTO <code>wp_1_posts</code><strong><?php link_to the users dbtable?></strong> (<code>ID</code>, <code>post_author</code>, <code>post_date</code>, <code>post_date_gmt</code>, <code>post_content</code>, <code>post_title</code>, <code>post_excerpt</code>, <code>post_status</code>, <code>comment_status</code>, <code>ping_status</code>, <code>post_password</code>, <code>post_name</code>, <code>to_ping</code>, <code>pinged</code>, <code>post_modified</code>, <code>post_modified_gmt</code>, <code>post_content_filtered</code>, <code>post_parent</code>, <code>guid</code>, <code>menu_order</code>, <code>post_type</code>, <code>post_mime_type</code>, <code>comment_count</code>) VALUES
    (1, 1, '2010-01-17 16:24:36', '2010-01-17 16:24:36', 'Welcome to <a href="http://mymodelweb.com/">Mymodelweb.com</a>. This is your first post. Edit or delete it, then start blogging!', 'Hello world!', '', 'publish', 'open', 'open', '', 'hello-world', '', '', '2010-01-17 16:24:36', '2010-01-17 16:24:36', '', 0, '', 0, 'page', '', 1);
  5. denzel2364
    Member
    Posted 14 years ago #

    However, i have added <php > markup tags where i need some help for the following:

    - NEED TO ADD CONNECTION TO MYSQL DATABASE to perform this sql.
    - Because this is wordpress MU, the user's own table needs to be selected rather than the 'wp_1_posts'. How can this be done?

    And how do you suggest when this is performed. I had the idea when a user comes back to the site after registering, they would have to press a button to run this script

    Please help guys. im learning Lol

About this Topic

  • Started 14 years ago by denzel2364
  • Latest reply from denzel2364