CMSMS can't remember Language settings and more sh*t
Posted: Mon Dec 05, 2005 10:24 am
Eversince I've used CMSMS, it bugs the hell outta me that it just can't remember language settings. I've set it to Dutch, but after every logout and login, the language is reset to English. When I look at the Preferences, I see that it's set to Dutch, but heck it won't show Dutch language. It used to be fixed when you hit the 'home' button again, but that won't work anymore... What's wrong?
=============
Another thing, I've heavily extended CMSMS, because I wanted to use it for my clients website and he needs to add recipes and restaurants to his website. Therefore I've created some forms for him on separate pages, I've added tables to the MySQL database and now he can add/edit and delete recipes and restaurants. But now the coolstuff comes, I need to make some dbase queries before the added data can be displayed, but Smarty (or Stupidy as I sometimes feel) trips over my queries. I've created a User-Defined tag, with this in it:
saved it as {receptQry} and put that on top of my template. Now when I visit the page, I get a cache: 435344575686784565345#54645 error..... Where, and how can I add my own queries so that I can display my contents that I've added to the database?
=============
Another thing, I've heavily extended CMSMS, because I wanted to use it for my clients website and he needs to add recipes and restaurants to his website. Therefore I've created some forms for him on separate pages, I've added tables to the MySQL database and now he can add/edit and delete recipes and restaurants. But now the coolstuff comes, I need to make some dbase queries before the added data can be displayed, but Smarty (or Stupidy as I sometimes feel) trips over my queries. I've created a User-Defined tag, with this in it:
Code: Select all
$maxRows_echorecept = 1;
$pageNum_echorecept = 0;
if (isset($_GET['pageNum_echorecept'])) {
$pageNum_echorecept = $_GET['pageNum_echorecept'];
}
$startRow_echorecept = $pageNum_echorecept * $maxRows_echorecept;
$colname_echorecept = "-1";
if (isset($_GET['type'])) {
$colname_echorecept = (get_magic_quotes_gpc()) ? $_GET['type'] : addslashes($_GET['type']);
}
mysql_select_db($database_sql, $sql);
$query_echorecept = sprintf("SELECT * FROM addons_recepten WHERE soort = '%s' ORDER BY id ASC", $colname_echorecept);
$query_limit_echorecept = sprintf("%s LIMIT %d, %d", $query_echorecept, $startRow_echorecept, $maxRows_echorecept);
$echorecept = mysql_query($query_limit_echorecept, $sql) or die(mysql_error());
$row_echorecept = mysql_fetch_assoc($echorecept);
if (isset($_GET['totalRows_echorecept'])) {
$totalRows_echorecept = $_GET['totalRows_echorecept'];
} else {
$all_echorecept = mysql_query($query_echorecept);
$totalRows_echorecept = mysql_num_rows($all_echorecept);
}
$totalPages_echorecept = ceil($totalRows_echorecept/$maxRows_echorecept)-1;