hmmm.... strangely, if I erase " or }, page works fine, but records are not written in other database - I think, plugin is automaticly disabled if there is such error...
Second table is on same server, but in other database, separated...
I don’t have any other ideas, so if anybody come up with idea, pls tell me
Plugin works fine, except that configuration page is opened when I save document.
Here is the latest script
------------>
$kopiraj = $_POST[’tvkopiraj_novico’]; / This is TV with options yes or no
if ($kopiraj == ’yes’) {
$link = mysql_connect("$server", "$dbase", "$pass") or die(mysql_error());
mysql_select_db("$dbase", $link);
$type = "document;
$contentType = "text/html";
$pagetitle = $_POST[’pagetitle’];
$longtitle = $_POST[’longtitle’];
$description = $_POST[’description’];
$alias = $_POST[’alias’];
$link_attributes = $_POST[’link_attributes’];
$published = $_POST[’published’];
$pub_date = $_POST[’pub_date’];
$unpub_date = $_POST[’unpub_date’];
$parent = $_POST[’parent’];
$isfolder = $_POST[’isfolder’];
$introtext = $_POST[’introtext’];
$content = $_POST[’ta’];
$richtext = $_POST[’richtext’];
$template = ’16’; //id določi sam - configure manualy
$menuindex = $_POST[’menuindex’];
$searchable = $_POST[’searchable’];
$cachable = $_POST[’cachable’];
$createdby = $_POST[’createdby’];
$createdon = $_POST[’createdon’];
$editedby = $_POST[’editedby’];
$editedon = $_POST[’editedon’];
$deleted = $_POST[’deleted’];
$deletedon = $_POST[’deletedon’];
$deletedby = $_POST[’deletedby’];
$publishedon = $_POST[’publishedon’];
$publishedby = $_POST[’publishedby’];
$menutitle = $_POST[’menutitle’];
$donthit = $_POST[’donthit’];
$haskeywords = $_POST[’haskeywords’];
$hasmetatags = $_POST[’hasmetatags’];
$privateweb = $_POST[’privateweb’];
$privatemgr = $_POST[’privatemgr’];
$content_dispo = $_POST[’content_dispo’];
$hidemenu = $_POST[’hidemenu’];
$sql_insert = "INSERT INTO modx_site_content (type, contentType, pagetitle, longtitle, description, alias, link_attributes, published, pub_date, unpub_date, parent, isfolder, introtext, content, richtext, template, menuindex, searchable, cacheable, createdby, createdon, editedby, editedon, deleted, deletedon, deletedby, publishedon, publishedby, menutitle, donthit, haskeywords, hasmetatags, privateweb, privatemgr, content_dispo, hidemenu) VALUES (’$type’, ’$contentType’, ’$pagetitle’, ’$longtitle’, ’$description’, ’$alias’, ’$link_attributes’, ’$published’, ’$pub_date’, ’$unpub_date’, ’$parent’, ’$isfolder’, ’$introtext’, ’$content’, ’$richtext’, ’$template’, ’$menuindex’, ’$searchable’, ’$cachable’, ’$createdby’, ’$createdon’, ’$editedby’, ’$editedon’, ’$deleted’, ’$deletedon’, ’$deletedby’, ’$publishedon’, ’$publishedby’, ’$menutitle’, ’$donthit’, ’$haskeywords’, ’$hasmetatags’, ’$privateweb’, ’$privatemgr’, ’$content_dispo’, ’$hidemenu’)";
mysql_query($sql_insert, $link);
mysql_close($link) ;
}
<---------------