I see there are some more complex mods to get additional attributes / content areas per page, but I needed something simple. This just adds a second content area to each page. Here's what I did:
1. MYSQL (Run this to alter the table):
mysql> alter table etomite_site_content add content1 mediumtext;
2. Edit manager/actions/dynamic/mutate_content.dynamic.action.php
At line 565 (after </div>):
<!--JR HACK -->
<div class="sectionHeader"><img src='media/images/misc/dot.gif' alt="." /> <?php echo "Extra Content Area"; ?></div><div class="sectionBody">
<textarea rows=15 cols=60 name=content1><? echo htmlspecialchars($content['content1']); ?></textarea>
</div>
<!--END JR HACK-->
3. Edit manager/processors/save_content.processor.php
around line 9 add:
// JR HACK
$content1 = addslashes($_POST['content1']);
// END JR HACK
around line 167 modify the SQL statement like so:
$sql = "INSERT INTO $dbase.".$table_prefix."site_content(content, content1, pagetitle, longtitle, type, description, alias, isfolder, richtext, published, parent, template, menuindex, searchable, cacheable, createdby, createdon, editedby, editedon, pub_date, unpub_date, contentType)
VALUES('".$content."','".$content1."', '".$pagetitle."', '".$longtitle."', '".$type."', '".$description."', '".$alias."', '".$isfolder."', '".$richtext."', '".$published."', '".$parent."', '".$template."', '".$menuindex."', '".$searchable."', '".$cacheable."', ".$_SESSION['internalKey'].", ".time().", ".$_SESSION['internalKey'].", ".time().", $pub_date, $unpub_date, '$contentType')";
Around line 270 modify the SQL statement like so:
$sql = "UPDATE $dbase.".$table_prefix."site_content SET content1='$content1', content='$content', pagetitle='$pagetitle', longtitle='$longtitle', type='$type', description='$description', alias='$alias',
isfolder=$isfolder, richtext=$richtext, published=$published, pub_date=$pub_date, unpub_date=$unpub_date, parent=$parent, template=$template, menuindex='$menuindex',
searchable=$searchable, cacheable=$cacheable, editedby=".$_SESSION['internalKey'].", editedon=".time().", contentType='$contentType' WHERE id=$id;";
4. Edit templates and pages
Now you will see an extra (plain textarea) box when editing a page. In your "templates", refer to this as [*content1*] and it will display. I didn't make it use the rich text editor, but I suppose you could easy enough if you wanted.
Hope this makes sense, and is helpful to someone. Solved my problem easy enough!
-Jim
Edited by jimr451, 08 November 2005 - 08:09 PM.












