Search Results for 'vote'
-
Search Results
-
Topic: DB ERROR
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id = 475 AND c.cat_id = i.cat_id ORDER BY image_name ASC LIMIT 0, 12
Unknown column ‘i.user_id’ in ‘on clause’
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/britney/includes/db_mysql.php on line 116
how do I fix this.
Topic: Punbb -> BBPress
I took Bruno Torres’ converter script as a foundation, and re-wrote it to work with the Punbb database architecture. Also, added in a tiny bit of string clean up, since Punbb allows foreign characters in the username field, and BBPress does not.
Here’s the code to look at:
http://utopian.net/code/punbb-importer.phps
And in a handy .zip for download:
http://utopian.net/code/punbb-importer.zip
A few important notes, since this is NOT at all pretty –
1) It uses a lot of memory, so make sure PHP has access to at least 16mb in php.ini. If I had more than 20 minutes to devote to this, I’d look into that and try to improve it, but hey.
2) If you’re importing a lot of data, you may need to split up the resultant sql file into smaller files less than 2mb in size. Add this to the list of things I would automate if I needed to use this script more than once.
3) I am using BBPress integrated with WPMU and included lines for importing into the WordPress user tables. After I noted and fixed the problem converting Punbb’s lax, apostrophe-laden usernames to nice and sanitary WP-friendly ones, the script ran like a charm. Seriously, if I’d known it would be this easy I would have done this six months ago.
4) The forum-parent to forum relationship imported correctly into the database, but displayed a little funny, so I manually re-ordered the forum items in the database and massaged the template a little bit to recognize forum parents a little bit differently, more PunBB style.
5) A clean WPMU and BBPress install is ideal, but I already had ten existing WP users, half of whom had a user account in the PunBB data I was merging. For such a small data set, it was very easy to manually correct this by deleting the PunBB users and making sure that the imported topics and posts for those users pointed to their current id.
Hopefully this will be a good start for those of us looking to move existing PunBB forums to BBPress & WordPress. Good luck, and let me know if you use it!