New Feature In The Works For Etomite 0.6.1.4
May 8, 2007 – 9:27 am by Ralph DahlgrenSure enough, just when I thought that we might get to a point where the code base would arrive at a maintenance only state it ends up with more features. Yep, that’s right, more features. Let’s see if I can list them all. Probably not off the top of my head, anyway.
Todays addition was adding a feature that allows flagging documents to either allow or disallow some of the most used API functions (getAllChildren, getActiveChildren, getDocuments) from including them in query results. The new column which was added to the site_content table is named showinmenu which, oddly enough, is somewhat self-explanatory. This also entailed modifications to several of the manager modules and the main index.php parser file. I also created a small script in the install directory which, when run, will add the new data column into the database. The default setting is to have all documents gathered by queries from the functions mentioned above. Unchecking the checkbox on the Publishing tab of the document management panel will cause these functions to ignore that particular document when a query is performed. There is, however, an override parameter that can be sent in a function call. Sending $showhidden=true in the function call will cause all documents to be included regardless of their showinmenu setting.
Another new item that has been added into the [0614] release is the addition of the object mode to the fetchRow() API function. The available modes for this function are now fetchRow($result, $mode=”[{'assoc'}, 'num', 'both', 'object']“) which allows for more OOP styled programming. Here is an example:
$rs = $etomite->getintTableRows(
$fields="*",
$from="blog",
$where="`id`={$etomite->documentIdentifier}",
$sort="date",
$dir="DESC",
$limit="",
$push=true,
$addPrefix=true);
if($rs)
{
while($row = $etomite->fetchRow($rs, $mode="object"))
{
$output .= "{$row->title}";
}
}
return $output;
TO BE CONTINUED