Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
1 registered (Gizmo), 35 Guests and 15 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/07/07
Posts: 4
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 14
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 2 of 2 < 1 2
Topic Options
#184282 - 05/15/07 10:42 AM Re: Problem importing categories from UBB.Classic [Re: Shane]
Ian Spence Offline
Registered: 06/04/06
Posts: 255
Try doing the following in /libs/mysql.inc.php

Find: (Line 334)

 Code:
		if (defined('ADMINISTRATORS')) {
			global $admin;
			$admin->error($show_error);
		}
		else {
			$html -> not_right_bare($show_error);
		}


Change to

 Code:
		if (defined('ADMINISTRATORS')) {
			global $admin;
			$admin->error($show_error);
		} else if (defined('IS_IMPORT')) {
			echo $show_error;
		}
		else {
			$html -> not_right_bare($show_error);
		}


Now, at the top of classic_import.php, add

 Code:
define('IS_IMPORT', true);


This is obviously a kludge, but this should work. (If it doesn't, you just need to add more code various places)

Rick, I'm gonna send you my rewritten version of mysql.inc.php that handles this cleaner
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#184299 - 05/15/07 04:25 PM Re: Problem importing categories from UBB.Classic [Re: Ian Spence]
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
That helps SOOOO much, thank you!

Now I know what my next problem is: "Data too long for column 'POST_BODY' at row 1"

I found the spot to insert the line of code, but I don't know PHP. Can anyone translate this code to PHP for me? (I've done a mockup in VB/C)

if (Len($raw_post) > MAX_POST_LENGTH) {
$raw_post = Left($raw_post, MAX_POST_LENGTH)
}

Also, I don't know what the maximum posting length is. I examined the field with PHPMyAdmin, but it didn't seem to show a maximum length for the field. As the field is of type 'text', I'm actually surprised that there's a length limitation at all.

Thanks in advance,

Shane
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
#184300 - 05/15/07 04:54 PM Re: Problem importing categories from UBB.Classic [Re: Shane]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
If you have a lot of long posts, you can change the length of the POST_BODY and POST_DEFAULT_BODY fields to hold a longer value. By default, text fields will hold 65,535 characters.

If you want to allow more, you can alter the database with the following SQL command:

alter table ubbt_POSTS change POST_BODY mediumtext, change POST_DEFAULT_BODY mediumtext
Top
#184302 - 05/15/07 05:47 PM Re: Problem importing categories from UBB.Classic [Re: Rick]
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
Thanks, I edited the createtable.php script and started fresh; it's importing now.
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
Page 2 of 2 < 1 2



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10489 Members
36 Forums
33841 Topics
181707 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image