PHP开源问答系统 LampCMS

jopen 12年前

PHP开源问答系统 LampCMS

LampCMS 是一款类似 Stack Overflow 的服务于开发人员的问答系统(Q&A program), 深度整合了非死book,推ter等的APIs.

LampCMS 官方的支持平台用的就是自家的 LampCMS.

LampCMS 的源代码托管在 github 上, 以 LGPL 发布.

值得称道的是 LampCMS 使用面向对象PHP写成, 极大地方便二次开发者对系统功能进行扩展和维护.
另外 LampCMS 的后台数据库使用的是一款非常有名的开源的 NoSQL 数据库 MongoDB.

无论你是学生还是开发者, 你都应该关注一下 LampCMS .

以下是它的主要特性:

  • Uses MongoDB as the main database storage. It can scale to very large size, capable of working with tens or even hundreds of millions or records, spanning dozens of servers

  • Capable of handling very high-load websites, easily serving thousands of simultaneous requests

  • Multiple sites can run off a single installation of the program.
    Every new site just needs its own !config.ini file and own templates set and own .css file. All classes can be reused amount multiple sites!

  • Ajax based forms and many other features use Ajax

  • Best support for UTF-8 Charset you will find in any php based app. Every incoming string is validated and if necessary converted to valid UTF-8 charset. Data is stored in DB in UTF-8, searches performed in UTF-8, all forms on this site have special instructions for browser to send data in utf-8 encoding. Tags are allowed to be any word in any language, tag can even contain special chars and symbols

  • Abstract layer for plugging in any type of search engine from Lucene to Sphinx to any other search. Default is to use MySQL as search provider. This is very easy to setup and requires only one MySQL table. But MySQL is not actually required for this site, its optional and only for search feature

  • All important forms use unique tokens to prevent CSRF attacks

  • Password stored as sha256 + salt for extra security

  • Cookie-based authentication ("Remember me" feature) used SHA256 salted values for extra security

  • Our own super-lightweight php templating engine

  • Extremely fast page rendering. On a 20,000 Questions site typical page with Question with 3 answers and 20 "Related Questions" links usually renders in about 35-75 milliseconds, depending on server load (Including database calls and php execution) (* With APC Cache)

  • A page with 20 Recent Questions and 30 Recent Tags, and pagination links usually renderes in under 1/4 of a second (* With APC Cache)

  • Clean SEO-Friendly URLs

  • Auto-complete widget for search and for automatically similar question titles as user type in a new question

  • For programming-related Q&A Sites there is an optional support for code editor and code highlighter that supports all of the popular programming languages as well as CSS and HTML code highlighting (this feature can be turned on and off from config file)

  • Support for very simple way to add 油Tube video to Question and Answer by just clicking "油Tube" button and entering url of 油Tube video.
    Program will use 油Tube API to get thumbnail of video and will create all the necessary code for adding video to your site (this feature can be turned on and off from config file)

  • Support for external authentication via 推ter (login with 推ter)

  • Support for external authentication via 非死book (login with 非死book)

  • Support for external authentication via LinkedIn coming soon

  • Support for external authentication via Google FriendConnect, which allows to sign in
    with Google account, AOL, Yahoo, OpenID

  • Question and Answers can also be posted to 非死book, 推ter, Tumblr and Blogger all at the same time, using post-processing feature that does not slow down the page load at all - all API calls are made after the page loaded and browser connection is closed.
    User are rewarded with reputation points for posting content to external sites (推ter, Tumblr, 非死book, Blogger)

  • When external authentication is used, the system will still ask to provide an email address

  • Email address validation via account activation email with a special link

  • Ability to create own account without using external authentication.

  • User can upload own avatar which will be auto resized and converted into square size.

  • User can edit own profile and enter own website, description.

  • Members can follow other members just like on 推ter

  • Members can follow questions they are interested in monitoring

  • Members can follow interesting tags

  • Automatic email notification of activities in followed items (like when new question is added and contains followed tag)

  • Admin can create Sticky posts that always stay on top of the list

  • Dot folders feature to indicate threads that you posted in

  • Visually indicate questions you following on the questions list pages

  • Browser-based storage to keep track of read/unread items and visually indicate when a question contain new answer or comment - something that you have not already read

  • Personalization feature to highlight questions with tags you follow, and to display your followed tags on top of recent tags list

  • Flexible Access control list (ACL) with group inheritances (based on Zend_ACL) as well as reputation based access permissions

  • Automatic lockout after multiple failed login attempts

  • Detection of password hack or cookie authentication hack attempts with automatic lockout of offending IP and notification of admin

  • Intelligent Views counter - counts one view per Question per User or per IP if user not logged in

  • Editing of existing Questions and Answers

  • Deleting of Questions and Answers by Question owner or moderator

  • Moderators can Close question, Question owner can request Question to be closed. Once closed, no more answers are accepted

  • Keeps track of per-Tag statistics including count of questions with a specific tag

  • Keeps track of all Unanswered Questions and Unanswered tags

  • Keep track of Recent tags with the timestamp of latest question added with tag

  • Keeps track of Related Tags

  • Users can report inapropriate content to moderators

  • Spam fighting tools with ip and country banning

  • Flood check - limit numer of posts user can make in pre-defined number of minutes (configurable setting)

  • Duplicate Question check - prevents user submitting the same question twice by keeping unique per-question hash

  • Admin can easity change user's group or delete or ban user

  • Admin can ban user at the same time when deleting a Question or Answer

  • One-Click mass deletion of all posts made by spammer

  • Ip-Based Geo Location stored with posts, can use to plot items on Google Map

  • Ability to turn on/off display of page rendering time

  • Support for styling – can create and upload set of templates plus css file to create brand new theme.

  • Support for mobile browser – just create set of templates + css file suitable for mobile browser

  • Fast, easy to use templating engine with no php logic inside template. A web designer can create templates without knowledge of php.

  • User can vote questions and unswers up/down, can also un-vote (cancel vote). Votes increase/decrease reputations on question/answer posters.

  • Asker can accept an answer as 'best answer', can also change their mind if a better answer has been added after the one already been accepted.

  • Reputation calculation is intelligent enough not to count points when user votes for own question or accepts own answer

  • User is rewarded with extra points for accepting answers. This encourages to always try to accept one answer as Best answer

  • Module to create xml sitemaps (daily) and automatically submit new sitemaps to Google, Bing and Yahoo

  • The program is written in good object oriented manner using MVC pattern, easy to understand, easy to write new classes or extend existing classes.

  • The system uses Event model where events are posted at some interesting point of the program, for example onBeforeNewQuestion, onNewQuestion, onNewUser, etc. Custom observer class can be written to listen to any of the events and modify the objects passed to observer. Observer can also cancel event or throw a custom exception. This makes it very easy to write custom module without the need to touch the core classes. All custom observers extend LampcmsObserver class, which automatically has the Registry object. Registry object keeps references to all important objects like Mongo database driver, current Viewer object, settings

  • Solid support for Unicode utf-8 format.

  • Using cache headers (etag and last-modified) to make browser cache questions pages

  • Rich text editor

项目主页:http://www.open-open.com/lib/view/home/1343303681599