How to work with Sqlite and CMSMS 1.02
Re: How to work with Sqlite and CMSMS 1.02
Ok but - the Module Search Writer must do something do let it run with sqlite. he can use adodb in the meantime to test.
Re: How to work with Sqlite and CMSMS 1.02
It must be something in the functions GetRow and GetCol with adodb lite, here hangs the installation.
Re: How to work with Sqlite and CMSMS 1.02
I was trying to follow these instructions and ran into some problems with stylesheets. It seems the file stylesheet.php was coded to not use ADOdb. I modified it to support SQLite.
I added that code between
and
Code: Select all
else if($config['dbms'] == 'sqlite'){
$db = sqlite_open($config['db_hostname']);
sqlite_exec($db,'PRAGMA short_column_names = 1;');
if ($name != '')
$sql="SELECT css_text, css_name FROM ".$config['db_prefix']."css WHERE css_name = '" . sqlite_escape_string($name) . "'";
else
$sql="SELECT c.css_text, c.css_id, c.css_name FROM ".$config['db_prefix']."css c,".$config['db_prefix']."css_assoc ac WHERE ac.assoc_type='template' AND ac.assoc_to_id = $templateid AND ac.assoc_css_id = c.css_id AND c.media_type = '" . sqlite_escape_string($mediatype) . "' ORDER BY ac.create_date";
$result=sqlite_array_query($db,$sql,SQLITE_ASSOC);
foreach($result as $row)
{
$css .= "/* Start of CMSMS style sheet '{$row['css_name']}' */\n{$row['css_text']}\n/* End of '{$row['css_name']}' */\n\n";
}
}
Code: Select all
if ($config['dbms'] == 'mysqli' || $config['dbms'] == 'mysql')
{
...
}
Code: Select all
else
Re: How to work with Sqlite and CMSMS 1.02
Another small addition. If you would like to use the Calender module(and maybe others, a quick search shows Kalender needs this,too), you need to change the following in include.php
change(about line 148)
to
These modifications will allow you to add events.
change(about line 148)
Code: Select all
if (!isset($DONT_LOAD_DB))
{
$db =& $gCms->GetDB();
}
Code: Select all
if (!isset($DONT_LOAD_DB))
{
$db =& $gCms->GetDB();
if($config['dbms'] == 'sqlite'){
sqlite_create_function($db->_connectionID,'now','time',0);
}
}
Re: How to work with Sqlite and CMSMS 1.02
Added that to SVN too, eventhough modules shouldn't use the now() function, but should use $db->DBTimeStamp(); instead.brady wrote: Another small addition.