gundermanc / eecs341-cms Goto Github PK
View Code? Open in Web Editor NEWA PHP content management system for EECS 341 Databases class.
A PHP content management system for EECS 341 Databases class.
Wrapper functions that go around the database.php functions for doing common actions. These perform application level error checking, such as, insertPage(...) .. can I insert a page for another user? Am I root user? No, deny access. Unlike databases.php, which simply performs SQL queries with no application logic.
Ideally, all actions done in each page should be 1 to 4 lines in length, with most of the actual logic residing in this file instead.
Allows for the creation or editing of a page's text. Text format is still as of yet to be decided. May be HTML, markdown, or just plain text.
If user is the author, he or she can change the title, the associated keywords, or approve or deny Changes submitted by other users. Approval will be separate page.
If user is not the author, he or she can ONLY edit the text. Submit button should contain cue to indicate that edit is a "pull request" of sorts, not immediate.
Implement the creation and access of Keywords in the database.
Perhaps a homepage for the website. Should be automatically owned by the administrator and undeletable.
Mark original authors of Pages that are referred to a lot by other pages as "Expert" in their field "keyword." This should be displayed on their profile page.
We need some compound queries and this would be a great change to use some.
Generates list of Changes submitted by users for approval. This page is only available to an original author of a page. Author can see who submitted the changes or click on the change for a diff of what exactly changed.
Changes are approved by clicking the approve button next to each item in the list, or a deny button to can them.
Interacts with Diff algorithm. Talk to Christian for more info.
Algorithms for performing the diffs of new changes against old pages, storing the diffs, and caching the finished product for quick page viewing and loading.
SQL queries for the Users table in the database.
The database.php class contains all SQL queries and maintains a connection to the database. There should ideally be one member function for each SQL query needed by the application and handling for SQL errors and the data type necessary constraints.
Page should have an owner and a creation date.
Document changes are currently stored as diffs of the ENTIRE document rather than as deltas (diffs contain all text, plus insertions and deletions, deltas are tiny lists of n deletions at index x, and o insertions at index y). This is kind of redundant and a waste of space.
I know how to implement this in terms of deltas, but it involves resolving the structure of the tree of the revision history for it to work properly. Probably not worth the time since this assignment is for demonstrating our proper use of databases, not diffing algorithms.
Page prints out alphabetized, paged list of keywords. Clicking a keyword will search for all pages with that keyword.
Test to ensure that database maintains integrity upon deletion. As of the moment, you can't delete a user that owns a table until he/she deletes it first.
Must come up with way to pass on ownership.
Basic user profile page. Ability to see username, date joined, and recently viewed content, recent pages created, and recent edits. Recent page views will be rendered as a page title (maybe author, not really neccesary), page rating, THIS user's rating of that page, and any comments this user made on that page. Basically a "news feed" of this user's interactions with the community.
HTML, CSS, and whatever PHP magic is necessary to result in a consistent beautiful experience across all pages in the app.
Also, page header with links to commonly used pages and search box.
Implement in database.php the SQL level support for storing changes. Each change must have a date it submitted, a VARCHAR containing the diffed addition to the page, a boolean "approved" value, and must correspond to a specific user and page.
PRIMARY KEY has to be either an "id" AUTO_INCREMENT integer, or (user, page_id, date).
Builds on Base Search Feature to provide sorting of search results by page rating and number of views as well as references to that page (if implemented).
Supports searching by username, keywords, individual words in the title, and perhaps some text in the document, if possible (this will probably be expensive without some form of caching though).
Add "most contributed topics" section to user Profile page.
Webpage for signing up for an account.
The basic initial search feature.
Requires:
See how many people have viewed you
You don't have to specify a username/password to register for an account.
PHP page for viewing a content page. Should read the cached page from disk and display on screen along with it's rating and any comments. If a user is logged in, should have a button for rating the page or commenting on it.
Users can delete ONLY their own comments.
STRETCH GOAL:
Page owner can delete ANY comments.
There is an diff to html function somewhere in diff_merge_patch we can use.
Basically just runs the new Database(true); call to install the DB schemas. Only run once and should be deleted.
Implement the SQL level ability to refer to another page. Will probably require implementation of a References table.
Also, modify Pages view Page to support displaying references from one page to another.
when searching by title and author, you get an error:
Error occurred processing SQL statement 'SELECT (id, title, user, created_date) FROM Pages WHERE title LIKE 'yolo' AND user LIKE '%'': Operand should contain 1 column(s)
Shows a chronological list of changes made by users. Click an entry to see a diff.
Support a markdown language for formatting pages and auto-remove HTML tags to prevent XSS and security holes.
A good one would be Orgile org-mode parser for PHP: https://github.com/mashdot/orgile/tree/master/www/site/orgile
Stretch goal.
Complete a public facing login and logout page and system for storing the current session.
Unable to update View record. Invalid username 'chris'or page id '1'.
Also happens when commenting. We broke something.
Error occurred processing SQL statement 'UPDATE Pages SET cached_data='Im so interestingIm so interesting.I'm so interesting.' WHERE id=2': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'm so interesting.' WHERE id=2' at line 1
Unable to update View record. Invalid username 'chris'or page id '1'.
Implement Views mechanism at SQL level in database.php. Should support the ability to register the viewing of an article by a person and allows the leaving of a comment and a rating.
Constraints: a person may only comment and rate once, but they can change their rating and comment.
May require splitting this feature up into separate Views and Ratings tables.
Merging non-sequential pages results in duplicate insertions. Git usually handles these with merge conflicts, but our algorithm doesn't allow this. For time's sake, should probably just prompt user to review merged document and finalize.
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.