osoc13 / code9000 Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://summerofcode.be
License: GNU General Public License v3.0
Home Page: http://summerofcode.be
License: GNU General Public License v3.0
As the title says.
$uid = $_SESSION['9K_USERID'];
check on this
Currently, when an error occurs (for instance, when you are not logged in) you are redirected to "/Code9000/login/please login first", which is not optimal.
I propose you replace this by doing this:
In api.php:
else { $_SESSION["msg"] = "Please login first."; $app->redirect('/code9000/login'); }
Check on the page if a message needs to be displayed. If so, show it and empty the session variable (so that upon refresh your message doesn't show again).
if (isset($_SESSION["msg"])){
echo "<ul><li class='danger alert'>" . $_SESSION["loginmsg"] . "</li></ul>";
$_SESSION["msg"] = null;
}
This way messages are handled better than attaching extra text to the URI.
class structure for the objects in javascript
Don't forget to complete your README.md file with installation and other instructions.
Switch to UNIX timestamps
Better coördinates (geoJSON, WKT)
echo int(s)
We still need to find that mascot or funny thing for the 404 page! Suggestions welcome!
We need sample data! It would also be handy if we can get direct data from Ghent officials themselves that we can add.
Test drive the site on code9000.gent.be. Before we can do this we need to put the site live of course!
Check emailaddress on registration for previous account
add token to session and check if this is the same as posted with each form.
This executable should not be inside the repository, everybody needs to install it to test your project. Explain this in the README.
Add it to the .gitinore, and move your composer.phar to a directory in your PATH, so you can execute is with compser
instead of php composer.phar ...
.
Some pages still need styling. (.phtml)
It should also be possible to delete and edit user accounts.
create objects in object classes according to the basic application structure.
Seems to be a problem related to my MAMP setup. Please confirm.
You should be able to create a new user account.
Passwords need to be hashed and salted. (We need to implement security)
It seems that on OS X & Linux the path to connectiondetails.php doesn't seem to be correct.
Warning: include_once(/config/connectiondetails.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/Code9000/utils/connectiondb.php on line 21
Here's some improvements:
We need to add more API calls to api.php.
For example, when you add a comment, JSON is sent to /api/comments, which you can access using:
$app->post('/api/comments/', function () use ($app){
$requestBody = $app->request()->getBody();
// Do things
});
We need to do this for all major data types, and allow additions, edits, deletions and of course getting the data. Data should be returned in JSON.
Note that we need a partially working front-end with AJAX calls to test out the API.
$app->get('/api/cityproposals/:id', function ($id) use ($app) {
$app->response()->header('Content-Type', 'application/json');
$execute = array(":id"=>$id);
$sql = "SELECT c.cityproposal_id, c.name, c.description, c.upvotes, c.downvotes, c.createddate, l.coords
from cityproposals c
inner join locations l on c.location_id = l.location_id
where c.deleteddate IS NULL AND cityproposal_id = :id";
$data = GetDatabaseObj($sql, $execute);
//CHECK IF USER ALREADY VOTED
$uid = $_SESSION['9K_USERID'];
$sqlcheck = "SELECT * FROM
(
SELECT * from users_like_cityproposals uls
where uls.user_id=:user_id and uls.cityproposal_id = :cityproposal_id
UNION
SELECT * from users_dislike_cityproposals uds
WHERE uds.user_id=:user_id and uds.cityproposal_id = :cityproposal_id
) result";
$vars = array('user_id' => $uid, 'cityproposal_id' => $id);
$check = GetDatabaseObj($sqlcheck, $vars);
if (empty($check)) {
$data["voted"] = false;
}else{
$data["voted"] = true;
}
CheckIfEmpty($data, $app);
});
All spottings need to be sorted by popularity. This has to be done inside the Javascript files spots_all.js & spots_user.js where the spottings are inserted into the DOM. (Branch: api)
We need to add API calls to index.php.
For example, when you add pictures using the uploader, JSON is sent to /api/photo, which you can access using:
$app->post('/api/photo', function () use ($app){
$requestBody = $app->request()->getBody();
// Do things
});
We need to do this for all major data types, and allow additions, edits, deletions and of course getting the data. Data should be returned in JSON.
Create a documentation portal to easily browse the api calls that are possible.
Also description of PUT and POST must be detailed.
Please check the deployment documentation that I uploaded and verify if it is good enough, thanks.
The initial database structure needs to be prepared. This includes tables like "projects", "locations", "proposals," "users", "comments", etc
Add basic functionalities like create, delete, move and rotate to the builder.
The database with sample data needs to be deployed to each dev machine
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.