Giter Club home page Giter Club logo

eecs341-cms's People

Contributors

gundermanc avatar kaz14 avatar

Watchers

 avatar  avatar  avatar

eecs341-cms's Issues

inc/application.php - Application Logic Layer Wrappers

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.

Page Edit/Create page

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.

Homepage

Perhaps a homepage for the website. Should be automatically owned by the administrator and undeletable.

Expert Status - Requires Page References

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.

Changes Approval Page

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.

database - Pages Table

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 stored as deltas rather than diffs.

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.

Keyword List Page

Page prints out alphabetized, paged list of keywords. Clicking a keyword will search for all pages with that keyword.

Database ON DELETE Constraints

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.

Base User profile page

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.

Global Page Theme and Site Beautification

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.

database.php - Changes Table

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).

Advanced Search Features

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).

Base Search Feature

The basic initial search feature.

Requires:

  • Search box: Possibly on every page at the top, but could also simply be put on it's own page.
  • Search results page: Also has search box, as well as a page separated list of results. Results
    should have a page title, author name, and rating, and possibly more.
  • Ability to search based on words in page name or keywords. Not too advanced yet.

Page View Page

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.

Page References

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.

sql error while searching

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)

Update page with text "I'm so interesting."

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

database.php - Views Table

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.

Non-sequential page changes post redundant adds.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.