Codiad/Codiad — pull request #703 by nerodark (2014-09-01 23:45:43+00:00)
Title: Add custom management for data files through custom functions

this is what i've came up to for #696

here is an example of the beginning of my customauth.php:

function getData($type, $file) {
$project_data = $_SESSION["project_data"];
$project_name = $project_data["project_name"];
$project_path = $project_data["project_path"];
$startup_file = $project_data["startup_file"];
$replacements = array(
"%PROJECTNAME%" => $project_name,
"%PROJECTPATH%" => $project_path,
"%STARTUPFILE%" => "$project_path/$startup_file"
);
$json = getJSON($file, "", false);
$json = json_encode($json);
$json = str_replace(array_keys($replacements), $replacements, $json);
$json = json_decode($json, true);
return $json;
}
function saveData($type, $file, $data) {
return;
}

you can store/retrieve data from anywhere to anywhere but for my case i'm still using the default behaviour
and now with this, i have nothing to whine about, everything works perfectly.