Forum Index >  glFusion >  glFusion Add-on, Plugin Support New Topic Post Reply
 Static Page Length
   |  Printable Version
By: Anonymous: Jack ()  Feb 25 2009 07:57 am (Read 595 times)  
Anonymous: Jack

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


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

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

Forum Admin
Admin

Group Comfort
Level:
: +110

Registered: 10/21/05
Posts: 6258
Location: The Great State of
Texas

Profile      
  Quote
By: Anonymous: Jack ()  Feb 25 2009 09:39 am  
Anonymous: Jack

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

Thanks again!


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

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:

http://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

Forum Admin
Admin

Group Comfort
Level:
: +110

Registered: 10/21/05
Posts: 6258
Location: The Great State of
Texas

Profile      
  Quote
By: Anonymous: Jack ()  Feb 25 2009 09:56 am  
Anonymous: Jack

LIKE MAGIC!

Thank You!


       
  Quote
New Topic Post Reply


 All times are CDT. The time is now 08:11 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
View Anonymous Posts 
Able to Post 
HTML Allowed 
Censored Content