PDA

View Full Version : Importing Forum Descriptions Problems



Parker Clack
Sat 6th May '00, 8:55am
When I import the forum from UBB the descriptions for the particular forum are limited to the amount of text that can be used in the textarea box so it stops and doesn't put in all the description.

Can this be increased?

Parker

Parker Clack
Sat 3rd Jun '00, 3:32am
I just got 1.1.2 and I am still having trouble with the forum discriptions. If they are over a certain length in size the script will chop them off.

Any way to not limit the size of the amount of information that we can put in forum discriptions?

Parker

[Edited by Parker Clack on 06-03-2000 at 04:26 PM]

bira
Sat 3rd Jun '00, 5:55am
there are a few fields that whose max character lengh is predefined. So far I've noticed that for the forum description and for announcement titles.

I'm not very familiar with MySQL but I think that limit for those values was set when the tables were created. That doesn't go to say that it's not reversable, just that it's something that needs be changed in MySQL rather than in a template or the php code.

Then again, I might also be wrong :)

I hope that in the future versions the limit will be determined by the admins of the BB. If we want very long description for our forums and long titles for our announcements then it should be our right. :)

Freddie Bingham
Sat 3rd Jun '00, 8:41am
bira is right

Looking at the database schema I see that the Announcment title is set to 50chars max and forum description is set at 250 chars max. These two fields are defined as character fields meaning they are to have a defined limit. You could change them to string fields to allow (within reason of course) unlimited length. You would need to ask John why he has set them at such but the following code executed by opening the file in your browser would change the Forum Description to a string field allowing you more space. It is untested and I would advise you to consult with John before changing it.

modifyforum.php

<?php
require("global.php");
$DB_site->query("ALTER TABLE forum
CHANGE description description mediumtext NULL");
?>

Parker Clack
Sat 3rd Jun '00, 1:49pm
rangersfan:

Thanks. I will wait for John to say what he would recommend. I am going to see if he changes this in a future version of the script anyway.

Parker

John
Mon 5th Jun '00, 7:00am
bira was pretty much right except for a small SQL thing:



<?php
require("global.php");
$DB_site->query("ALTER TABLE forum
CHANGE description description MEDIUMTEXT NOT NULL");
$DB_site->query("ALTER TABLE announcement
CHANGE title title CHAR(100) NOT NULL");
?>


(Edit - corrected mistake in code. Thanks guys!)

John

bira
Mon 5th Jun '00, 7:39am
woaaa, not bad for a girl who doesn't have a single clue about SQL, heh. (note to self: call your maths teacher and tell her she was useful with *something*) :)

John, so we just run this small script you quoted?

John
Mon 5th Jun '00, 7:49am
Yup. Well done bira :)

bira
Mon 5th Jun '00, 9:23am
I get the following error when I try to run your suggested script (which I named fix.php):



Database error in vBulletin: Invalid SQL: ALTER TABLE announcement
CHANGE title CHAR(100) NOT NULL
mysql error: You have an error in your SQL syntax near 'CHAR(100) NOT NULL' at line 2
mysql error number: 1064
Date: Monday 05th of June 2000 05:16:08 PM
Script: /bb/fix.php
Referer:

Freddie Bingham
Mon 5th Jun '00, 9:52am
try:

<?php
require("global.php");
$DB_site->query("ALTER TABLE forum
CHANGE description description MEDIUMTEXT NOT NULL");
$DB_site->query("ALTER TABLE announcement
CHANGE title VARCHAR(100) NOT NULL");
?>

bira
Mon 5th Jun '00, 9:57am
no help, rangersfan:

Database error in vBulletin: Invalid SQL: ALTER TABLE announcement
CHANGE title VARCHAR(100) NOT NULL
mysql error: You have an error in your SQL syntax near 'VARCHAR(100) NOT NULL' at line 2
mysql error number: 1064
Date: Monday 05th of June 2000 05:52:52 PM
Script: /bb/fix.php
Referer:

Freddie Bingham
Mon 5th Jun '00, 9:59am
Oh I see the problem try this:

<?php
require("global.php");
$DB_site->query("ALTER TABLE forum
CHANGE description description MEDIUMTEXT NOT NULL");
$DB_site->query("ALTER TABLE announcement
CHANGE title title VARCHAR(100) NOT NULL");
?>

Parker Clack
Mon 5th Jun '00, 10:07am
rangersfan:

That did it. Thanks so much to both you and John for this.

Parker

bira
Mon 5th Jun '00, 10:09am
worked like a charm :)

Thanks!