jhuesser / bzu-jodel-clone Goto Github PK
View Code? Open in Web Editor NEWThis webapp is a clone of the famous studend app jodel (jodel.com). This is a project for school. Alpha state, not relased yet.
License: GNU General Public License v3.0
This webapp is a clone of the famous studend app jodel (jodel.com). This is a project for school. Alpha state, not relased yet.
License: GNU General Public License v3.0
The method postCall uses an else expression. Else is never necessary and you can simplify the code to work without else.
User can sign in
The method jodelage uses an else expression. Else is never necessary and you can simplify the code to work without else.
Postmanagement is mentioned in user.php, not implemented yet. Project requirement! #14
if($caps['delete_posts'] == true || $caps['change_post_score'] == true || $caps['change_votes'] == true || $caps['edit_posts'] == true){
echo '<a href="#" class="list-group-item list-group-item-action">Postmanagement</a>';
$_SESSION['caps_delete_posts'] = true;
$hascaps = true;
}
colormanagement is mentioned in user.php, not implemented yet. Project requirement! #14
if($caps['add_color'] == true){
echo '<a href="#" class="list-group-item list-group-item-action">Add a color</a>';
$_SESSION['caps_add_color'] = true;
$hascaps = true;
}
Identical code found in 1 other location (mass = 28)
comment the file user.php
Don't load all posts in the first time. Implement something like "Infinite scroll"
vote on posts on main page.
User can post new posts
votemanagement is mentioned in user.php, not implemented yet. Project requirement! #14
if($caps['delete_user_votes'] == true){
echo '<a href="#" class="list-group-item list-group-item-action">Manage Votes</a>';
$_SESSION['caps_delete_user_votes'] = true;
$hascaps = true;
}
sort posts by time, comments, votes
if user adds newline with press of enter, post is not created, so #6 is not quite finished.
user promotion is mentioned in user.php, not implemented yet. Project requirement! #14
if($caps['promote_to_mod'] == true || $caps['promote_to_admin'] == true || $caps['promote_to_superadmin'] == true || $caps['promote_to_user'] == true || $caps['ban'] == true || $caps['delete_users'] == true || $caps['change_karma'] == true ) {
echo '<a href="#" class="list-group-item list-group-item-action">Usermanagement</a>';
$_SESSION['caps_promote_to_mod'] = true;
$hascaps
in users.php the caps a user has are stored in a $_SESSION
value, however, if multiple caps are possible for a single entry, only the first cap is stored in session. example:
if($caps['promote_to_mod'] == true || $caps['promote_to_admin'] == true || $caps['promote_to_superadmin'] == true || $caps['promote_to_user'] == true || $caps['ban'] == true || $caps['delete_users'] == true || $caps['change_karma'] == true ) {
echo '<a href="#" class="list-group-item list-group-item-action">Usermanagement</a>';
$_SESSION['caps_promote_to_mod'] = true; //only first cap
$hascaps = true;
}
Identical code found in 2 other locations (mass = 83)
https://codeclimate.com/github/jhuesser/bzu-jodel-clone/comments.php#issue_58fdbca1dd03a70001000028
Currently the page loads very slow if you open jodels.php or do a vote. We should determine where we have performance issues and correct them.
report abuse to admin / user moderation #12
vote on comments
also vote on OP in comment view
Identical code found in 2 other locations (mass = 83)
https://codeclimate.com/github/jhuesser/bzu-jodel-clone/jodels.php#issue_58f9a46ac04e0b0001000026
Admin notice is mentioned in user.php, not implemented yet. Project requirement! #14
if($caps['create_admin_notice'] == true){
echo '<a href="#" class="list-group-item list-group-item-action">Create admin notice</a>';
$_SESSION['caps_create_admin_notice'] = true;
$hascaps = true;
}
today i noticed, when I'm adding a new color via GUI, it's not added correctly. Here the response of the API:
...
{
"colorID": 21,
"colordesc": "",
"colorhex": ""
}
...
autmatic setu (setup script for example) wich sets up config.php
session_destroy();
Post comments to post and show them
a central config for the whole application, so it's easy to deploy a new instance.
flag posts with bad reputation for user mod #12
If a acolor get's deleted, the primary key in DB is missing, so the random number picker can fail.
change color selection to:
For example jodel.php
contains the following code:
if(isset($_GET['upvotejodel'])){
//....
if(!$voted){
//....
else {
$_SESSION['errorMsg'] = "Already voted";
}
header('Location: https://jodel.domayntec.ch/jodels.php');
}
// ...
/....
f(isset($_SESSION['errorMsg'])) {
?>
<div class="alert alert-danger" role="alert">
<strong>Holy guacamole!</strong> <?php echo $_SESSION['errorMsg'];?>
</div>
So we need to clear the php $_SESSION['errorMsg']
after each time it's displayed, or find another soloutin....
User can sign up with username + passwort
reset of password is mentioned in user.php, not implemented yet. Project requirement! #14
if($caps['reset_paswd'] == true){
echo '<a href="#" class="list-group-item list-group-item-action">Reset user password</a>';
$_SESSION['caps_reset_paswd'] = true;
$hascaps = true;
}
enter correct description in readme.md
The method getCall uses an else expression. Else is never necessary and you can simplify the code to work without else.
Currently everytime header('Location: https://jodel.domayntec.ch/)
is called, the URL is hardcoded, as we can see. Need to change this to the URL specified in config.php
create wiki if needed
Identical code found in 2 other locations (mass = 83)
https://codeclimate.com/github/jhuesser/bzu-jodel-clone/comments.php#issue_58f9a46ac04e0b0001000027
Identical code found in 2 other locations (mass = 83)
https://codeclimate.com/github/jhuesser/bzu-jodel-clone/comments.php#issue_58f9a46ac04e0b0001000028
admin tools in frontend
The method putCall uses an else expression. Else is never necessary and you can simplify the code to work without else.
user with high reputation become mods. they can mod posts reported by other users. #11
The method putCall uses an else expression. Else is never necessary and you can simplify the code to work without else.
Emoijs aren't displayed. maybe a problem of DB or removing special chars?
Identical code found in 1 other location (mass = 28)
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.