1
tedsmith
WF-Channel - Making 'Page Content' Accept More Data
  • 2005/8/20 13:11

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Hi dudes

WF-Channel...the 'Page Content' textarea in the 'Create Document' section will allow you to put html in there and render it as a page. No problem. There's also the option to import the data into the database for faster access (and searching capabilities).

I want to add it to the database, but I have a massive html document that I'm trying to import into the database. However, it seems to have a maximum limit and it loses some of the html so the page doesn't render properly.

I've tried to figure out if I can make it bigger so it will accept more data. Using phpMyAdmin I've worked out that the data filed is 'Page' of type 'text'. Looked on the MySQL website and it says that the maximum size of a text and BLOB object is as follows :

" The maximum size of a BLOB or TEXT object is determined by its type, but the largest value you actually can transmit between the client and server is determined by the amount of available memory and the size of the communications buffers. You can change the message buffer size by changing the value of the max_allowed_packet variable, but you must do so for both the server and your client program. For example, both MySQL and mysqldump allow you to change the client-side max_allowed_packet value."

Is there any way I can make it bigger?

Thanks

Ted

2
tedsmith
Re: WF-Channel - Making 'Page Content' Accept More Data
  • 2005/8/20 16:52

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Sussed it out.

The 'Text' MySQL data type only allows 65535 characters. This is why I was having problems.

But there are others you can choose from :

MEDIUMTEXT A string with a maximum length of 16777215 characters.
MEDIUMBLOB A string with a maximum length of 16777215 characters.
LONGTEXT A string with a maximum length of 4294967295 characters.

So I changed the 'Page' field of the wfs-channel table from 'text' to 'longtext' so I can have up to 4294967295 characters, and bash! It worked! Now I've got my html file imported into the actual database and is searchable too!

Starting to get the hang of this MySQL business now! Mind you, it's been over a year of using XOOPS so I should by now I guess.

Cheers

Ted

3
Mithrandir
Re: WF-Channel - Making Page Content Accept More Data

Well, we do pride ourselves that database, HTML and PHP knowledge is (almost) not needed to build a website so a year without exploring the column types in MySQL is not so bad

Looking forward to seeing what you come up with.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

4
tedsmith
Re: WF-Channel - Making Page Content Accept More Data
  • 2005/8/20 23:41

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Yes indeed Mith - such is the beauty of Xoops! Just don't hold your breath with any development stuff - I a slow learner!

Login

Who's Online

233 user(s) are online (72 user(s) are browsing Support Forums)


Members: 0


Guests: 233


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits