WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
$wb_page_data = str_replace('</body>',$dragscript."\n".'</body>', $wb_page_data );
<script type="text/javascript"> $(document).ready(function(){ $(function() { $("#dragableTable ul").sortable({ opacity: 0.6, cursor: 'move', update: function() { var order = $(this).sortable("serialize") + '&action=updateRecordsListings'; $.post("'.WB_URL.'/updateDB.php", order, function(theResponse){ $("#dragableResult").html(theResponse); }); } }); }); });</script>
function setVar( varname, text ) { eval(varname+"=\""+text+"\"");}
<script type="text/javascript">setVar( 'WB_URL', '<?php echo WB_URL; ?>' );</script>
var WB_URL;...$.post( WB_URL+'/update...');
<?php// This makes path to current folder$filepath=str_replace(basename($_SERVER['PHP_SELF']),"",__FILE__);// if you are not sure where you are, you can uncomment this and see..//echo $filepath;// Now we write the code, just like in Droplets$dragscript = '$(document).ready(function(){ '."\n"; $dragscript .= ' $(function() { '."\n";$dragscript .= ' $("#dragableTable ul").sortable({ opacity: 0.6, cursor: \'move\', update: function() { '."\n";$dragscript .= ' var order = $(this).sortable("serialize") + \'&action=updateRecordsListings\'; '."\n";$dragscript .= ' $.post("'.WB_URL.'/updateDB.php", order, function(theResponse){ '."\n";$dragscript .= ' $("#dragableResult").html(theResponse); '."\n";$dragscript .= ' }); '."\n";$dragscript .= ' } '."\n";$dragscript .= ' }); '."\n";$dragscript .= ' }); '."\n";$dragscript .= ' }); '."\n";// Now we set the filename in my case: backend_body.js (I needed this code to be written in JS, so I can getl WB_URL from config.php file )$myFile = $filepath.'/backend_body.js';$fh = fopen($myFile, 'w') or die("can't open file");fwrite($fh, $dragscript);fclose($fh);?>
Well, you have permission to read/write/execute if you are loged in via backend, right ?