By: Anonymous: Jack ()  Feb 25 2009 07:57 am (Read 668 times)  

Hi,
Is it possible to set the static page length somewhere? I have some lengthy documents that are getting cut off halfway.
Thanks

By: Mark (offline)  Feb 25 2009 08:43 am  

You'll need to modify the database table for static pages. Currently the sp_content field is type TEXT which allows 64K of data. You probably want to change this to MEDIUMTEXT which will give you 16M of data.

If you have access to phpMyAdmin you can run the following SQL to alter the table:

PHP Formatted Code

ALTER TABLE  gl_staticpage CHANGE  sp_content  sp_content MEDIUMTEXT;
 



If you don't have access to phpMyAdmin, let me know and I'll write a quick and dirty little PHP script to take care of it.

Thanks!
Mark


glFusion - Enhanced Content Management

Mark



Group Comfort
Level:
: +112
Registered:: 10/21/05

Posts: 6441
By: Anonymous: Jack ()  Feb 25 2009 09:39 am  

A little PHP script might be easiest - I looked around the Phpmyadmin but I am lost.

Thanks again!

By: Mark (offline)  Feb 25 2009 09:46 am  

No problelm, save the code below in your public_html/ directory (same directory with siteconfig.php). Be sure you are already logged into your site as a root user and then run:

www.yoursitehere.com/sp_expand.php

PHP Formatted Code

<?php
require_once 'lib-common.php';

if (!SEC_inGroup('Root')) {
    // Someone is trying to illegally access this page
    COM_errorLog("Someone has tried to illegally access the sp_expand page.  User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: $REMOTE_ADDR",1);
    $display = COM_siteHeader ('menu', $LANG_ACCESS['accessdenied'])
             . COM_startBlock ($LANG_ACCESS['accessdenied'])
             . $LANG_ACCESS['plugin_access_denied_msg']
             . COM_endBlock ()
             . COM_siteFooter ();
    echo $display;
    exit;
}

DB_query("ALTER TABLE {$_TABLES['staticpage']} CHANGE  sp_content  sp_content MEDIUMTEXT;");

echo COM_siteHeader();
echo 'Static Pages has been expanded to allow 16M per page.';
echo COM_siteFooter();
?>
 



Once you run sp_expand.php, you should then delete it when you are done.

Thanks!
Mark


glFusion - Enhanced Content Management

Mark



Group Comfort
Level:
: +112
Registered:: 10/21/05

Posts: 6441
By: Anonymous: Jack ()  Feb 25 2009 09:56 am  

LIKE MAGIC!

Thank You!

5 posts :: Page 1 of 1
All times are CDT. The time is now 01:51 am.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic w/ New Post Sticky Topic w/ New Post
Locked Topic w/ New Post Locked Topic w/ New Post