Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Forum: Fixing WordPress
    In reply to: Restore Nightmare

    Start copy-pasting ??

    Forum: Fixing WordPress
    In reply to: Restore Nightmare

    A structurizes file is where you can see the different sections, divided by —- lines and other clear characters, where every new command is a new line. For example my file starts like this in WordPad:

    # WordPress MySQL database backup
    #
    # Generated: Tuesday 16. May 2006 12:27 CEST
    # Hostname: localhost
    # Database: xxxxxxxx
    # ——————————————————–
    # ——————————————————–
    # Table: wp_categories
    # ——————————————————–

    #
    # Delete any existing table wp_categories
    #

    DROP TABLE IF EXISTS wp_categories;

    #
    # Table structure of table wp_categories
    #

    CREATE TABLE wp_categories (
    cat_ID bigint(20) NOT NULL auto_increment,
    cat_name varchar(55) NOT NULL default ”,
    category_nicename varchar(200) NOT NULL default ”,
    category_description longtext NOT NULL,
    category_parent bigint(20) NOT NULL default ‘0’,
    category_count bigint(20) NOT NULL default ‘0’,
    PRIMARY KEY (cat_ID),
    KEY category_nicename (category_nicename)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;

    #
    # Data contents of table wp_categories
    #

    that’s a decent structure. Then you have lines that start with INSERT INTO, followed by the place they belong to. (categories, comments, …)

    Forum: Fixing WordPress
    In reply to: Restore Nightmare

    I just had to restore my db as well. It’s pretty easy

    Just extract the .sql file to your desktop, right-click and open in (in WinXp) with Wordpad (comes standard with windows)

    You’ll see a decent structurized file compared with the notepad version (which is too cluttered)

    Go to PHPMyAdmin, log in to your db, click the SQL button

    and start pasting it in smaller sections. (max upload to MySQL is 2MB, browsers don’t support more, hence the time-out message you got)

    Paste all the categories first, then check if they are created. Next you start by selecting a chunk of lines. Make sure you respect the code, and that you select everything of a selected line. I did it per 200 lines (more or less)

    Repeat until you’re at the end of the .sql file.

    It took me 20 minutes.

    Good luck

    Thread Starter coolzor

    (@coolzor)

    Okay, I’m a bit further down the road. I created extra fields in PHPMyAdmin, on the SQL server.

    For every category I wanted to add in the profile, a new field in the existing table wp_users.

    In profile.php I call the fields, they appear. So far so good. (see previous post)

    in registration-functions.php I added:

    update_usermeta( $user_id, ‘street’, $user_address );

    and so on… to the list of existing update_usermeta that already was there.

    In that same file, a bit higher there’s an ‘if ( $update )’ section where I added:

    user_address = ‘$user_address’ (and so on) before the WHERE ID = ‘$ID'”;

    same file a bit below the previous rules I added it again where it says: $query = “INSERT INTO $wpdb->users

    I added user_address and so on for every desired field

    Then I also added to the VALUES section: ‘$user_address’ and so on for every desired field

    In the file template-functions-author.php I added functions to call all fields created:

    function get_the_author_address() {
    global $authordata;
    return $authordata->user_address;
    }

    function the_author_address() {
    echo get_the_author_address();
    }

    and repeated that for every desired field.

    It still doesn’t save the data I enter in the fields. What am I missing?

    Anyone?

    Forum: Plugins
    In reply to: User Profiles

    Sorry for the second post, I know it’s not done, but I also wanted to know what exactly you had to change in the wp-admin login…

    Thanks again.

    Forum: Plugins
    In reply to: User Profiles

    @phunky; your code seems to work, I can copy it and paste it in a text file. Saving it as a php file I can upload it to the plugin section and it’s recognized.

    Then I created a blank page and made a template which included the <?php pky_userProfile();?> you provided and yes, it shows my current data. Now if I want to click ‘ammend’, it doesn’t load anything, it just refreshed the page. Also, how can I make it to display users instead of always me (admin)? And where can I actually change my data?

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)