sdnumber;
$query = 'INSERT INTO '.sql_table('skin')." VALUES (" . $skinid . ", 'imagepopup', '\r\n
\r\n <%imagetext%>\r\n \r\n\r\n\r\n <%image%>\r\n\r\n');";
upgrade_query("Adding 'imagepopup' skinparts",$query);
// 7. add POPUP_CODE, MEDIA_CODE, IMAGE_CODE to ALL templates
$query = 'SELECT tdnumber FROM '.sql_table('template_desc');
$res = sql_query($query); // get all template ids
while ($obj = mysql_fetch_object($res)) {
$tid = $obj->tdnumber; // template id
$query = 'INSERT INTO '.sql_table('template')." VALUES ($tid, 'POPUP_CODE', '<%popuplink%>');";
$query2 = 'INSERT INTO '.sql_table('template')." VALUES ($tid, 'MEDIA_CODE', '<%media%>');";
$query3 = 'INSERT INTO '.sql_table('template')." VALUES ($tid, 'IMAGE_CODE', '<%image%>');";
upgrade_query("Adding popupcode to template $tid",$query);
upgrade_query("Adding mediacode to template $tid",$query2);
upgrade_query("Adding imagecode to template $tid",$query3);
}
// 8. add cip to nucleus_comment
if(0==$upgrade_failures && !upgrade_checkIfColumnExists('comment', 'cip')){
$query = 'ALTER TABLE '.sql_table('comment')
. " ADD cip varchar(15) NOT NULL default ''";
upgrade_query("Adding IP attribute to comments",$query);
}else{
echo "Adding IP attribute to comments ... NOT EXECUTED\nErrors occurred during upgrade process.
";
}
}
?>