Page 1 of 8 123 ... LastLast
Results 1 to 10 of 79

Thread: Pligg Importer 0.8

  1. #1
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,860
    Blog Entries
    88
    Thanks
    483
    Thanked 809 Times in 528 Posts

    Default Pligg Importer 0.8

    Pligg Importer
    Version: 0.8
    Author: Nick Ramsay
    Created: 2009/08
    Last Updated:
    2010/06/04
    Tested on: Hotaru 1.0.0 ~ 1.3.0
    Plugins Required: None
    Plug & Play: Yes, but needs some preparation (see instructions)
    Supported: No

    This plugin no longer works with the latest versions of phpMyAdmin. Please use the Pligg2Hotaru plugin instead.

    Description
    Import a Pligg or SWCMS database into Hotaru CMS. Version 0.8 imports the following tables: Links, Comments, Users, Categories, Tags and Votes. It doesn't import favorites, messages or friend data, so if those are important to you, you might want to wait a while before using this plugin.

    Instructions
    1. Export these tables as non-zipped XML files from your Pligg database: categories, comments, links, users, tags and votes.
    2. If you have access to php.ini, check that upload_max_filesize is greater than the largest XML file you exported. Contact your webhost for help.
    3. Give the Uploads folder in /content/plugins/pligg_importer/ is writable (chmod 777 in FTP).
    4. Create an account with the same login, email and password your god or admin user had on your Pligg site. This ensures you are still logged in as an administrator even after you overwrite the current users table during the import. (See this comment about changing the username "god" to a four character name)
    5. Click Pligg Importer in the Admin sidebar and when ready, click "Import a Pligg Database" and follow the steps.

    Note: Depending on the size of your Pligg database, importing each file can take a long time. This isn't a straight import. Almost every aspect of your Pligg database is changed. For example, all users will get a new id number, so every table that has a user_id field needs updating with this new id. The same goes for link ids, category ids etc. Your server's CPU/database will be pushed to its limits! If you are coming from SWCMS, consider using the SWCMS DB Cleanup module before importing your site.

    Help Needed
    This plugin has been developed using a Social Web CMS database, which is almost identical to Pligg 0.9.9.5. If you have a non-empty Pligg 1.0 database and can test it with this plugin, that would be greatly appreciated.

    Revision History
    v.0.8 2010/01/03 - Nick - Updates for compatibility with Hotaru 1.0
    v.0.7 2009/11/22 - Nick - Bug fixes for illegal offset warnings
    v.0.6 2009/11/01 - Nick - Updated to copy a user's IP address from Pligg to Hotaru
    v.0.5 2009/10/17 - Nick - Renamed CSS 'next' as 'pliggimp_next' to avoid clashes
    v.0.4 2009/10/08 - Nick - Updates for compatibility with Hotaru 0.7
    v.0.3 2009/10/01 - Nick - Updates for compatibility with Hotaru 0.6
    v.0.2 2009/08/28 - Nick - Added Comments and changed "Character Cleaner"
    v.0.1 2009/08/16 - Nick - Released first version

    Please click "Rate Thread" and give this plugin a rating. Thank you.

    Attached Thumbnails Attached Thumbnails pligg_importer.png  
    Attached Files Attached Files
    Last edited by Nick; 11-04-2009 at 12:01 PM. Reason: Added link to SWCMS DB Cleanup module

  2. Thanked by:


  3. #2
    Member
    Join Date
    Sep 2009
    Posts
    66
    Thanks
    53
    Thanked 6 Times in 6 Posts

    Default

    Should this be renamed Pligg / SWCMS Importer?

  4. #3
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,860
    Blog Entries
    88
    Thanks
    483
    Thanked 809 Times in 528 Posts

    Default

    It works with SWCMS at the moment, but we've got to keep upgrading it to match any changes at Pligg. It would probably be safer to copy this now and rename it SWCMS Importer.

  5. #4
    Senior Member
    Join Date
    Sep 2009
    Posts
    445
    Thanks
    166
    Thanked 56 Times in 43 Posts

    Default

    Your server's CPU/database will be pushed to its limits!
    Nick, it's just like you mentioned. I just couldn't go ahead with importing the links (5,900 rows) and comments tables (131,540 rows!). I kept on getting a time-out error. I guess it's time to archive a portion of the site. Any tips on going about archiving a portion of an existing swcms/pligg site would be really helpful - but then that'd be going off-topic

  6. #5
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,860
    Blog Entries
    88
    Thanks
    483
    Thanked 809 Times in 528 Posts

    Default

    If I were you, I'd set up Hotaru on your computer with WAMP or XAMPP. That way you can edit your php.ini file yourself. Find upload_max_filesize and change it to something big like 50M. There are also timeout options (which I haven't tried): mysql.connect_timeout, mssql.timeout, default_socket_timeout.

    If you can do import your site on your own computer, then you can export the results as regular zipped SQL files and import those to Hotaru on your server.

  7. #6
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,860
    Blog Entries
    88
    Thanks
    483
    Thanked 809 Times in 528 Posts

    Default

    Also, you can increase the amount of memory allowed for PHP in the php.ini file. Change memory_limit to something bigger, e.g. 128M.

    Finally, if the XML file you are trying to upload is bigger than 30MB, the Pligg Importer plugin won't accept it. You can change that by opening /content/plugins/pligg_importer/pligg_importer.php and changing this line (approx. line 257 in the save_uploaded_file function):

    PHP Code:
          // EDIT THIS TO INCREASE FILE SIZE LIMIT
            
    $size_limit 31457280// 30MB 

  8. Thanked by:


  9. #7
    Senior Member
    Join Date
    Sep 2009
    Posts
    445
    Thanks
    166
    Thanked 56 Times in 43 Posts

    Default

    Thanks nick. I'm on shared hosting (godaddy) and looks like I don't have permissions to modify the php.ini file. Bummer!

  10. #8
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,860
    Blog Entries
    88
    Thanks
    483
    Thanked 809 Times in 528 Posts

    Default

    Try the way I suggested. WAMP is surprisingly easy to set up (touch wood). With WAMP, you can do the whole import on your own computer then upload your database to your server when you're finished. That's what I plan to do with JapanSoc.

  11. #9
    Design & Development carlo75's Avatar
    Join Date
    Oct 2009
    Location
    Italy - Perugia
    Posts
    509
    Thanks
    62
    Thanked 105 Times in 58 Posts

    Default

    Nick,
    in instruction you tell to rename username of hotaru admin, to match old user administrator in pligg.

    Now, if the admin user of pligg was the default god, when user change its hotaru admin username, an alert message advise that username must be at least 4 characters. Need to change username admin via phpmyadmin, is it correct?

  12. Thanked by:


  13. #10
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,860
    Blog Entries
    88
    Thanks
    483
    Thanked 809 Times in 528 Posts

    Default

    Ahhh, good catch Carlo. I forgot about that because I renamed my god user a long time ago. Hmm...

    Three options:

    1. Change "user_login" from "god" to something with 4 characters or more in phpMyAdmin in the Pligg/SWCMS users table in the database.

    OR

    2. Change "user_username" to "god" in phpMyAdmin in the Hotaru users table. After importing, change your name to something 4 characters or more from your Account page.

    OR

    3. Export the Pligg/SWCMS users table in XML format, open the file and change "god" to something with 4 characters or more before importing:

    E.g.

    Code:
    <swcms>
      <!-- Table swcms_users -->
        <swcms_users>
            <user_id>1</user_id>
            <user_login>god</user_login>
    I will add these instructions to the plugin when I next update it.

  14. Thanked by:


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Started on a Pligg Importer plugin
    By Nick in forum How-To and Troubleshooting
    Replies: 6
    Last Post: 09-15-2009, 08:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •