Coder Social home page Coder Social logo

ci_pm's Introduction

#Introduction

This is a simple boilerplate for a CodeIgniter private messaging system. It comes with the following functionality:

  • Send messages to multiple users
  • Reply, delete, restore messages
  • Browse messages by status: deleted, unread, not deleted, sent, ...
  • AJAX ready function for auto-completing recipient names
  • ORM like base classes to convert MySQL types to PHP types
  • Sample views to demonstrate usage
  • Database structure and sample content

It is written according to the CI coding guides, but it does not support database prefixes.

#Installation

Grab a fresh CodeIgniter installation and connect it to a MySQL database. Download all ci_pm files and extract them to your "application" CI folder. Be sure to overwrite the "constants.php" file! As next step open the "db.sql" file in the "application" folder and execute its contents in a MySQL db. Delete the file afterwards. Now you should be able to reach the module via ".../index.php/pm".

#Usage

To test the system surf to ".../index.php/pm" on your server. To test the auto-completing of recipient names enter only "Foo" to the recipient field and click "send".

To use the private messaging system with your own application you will want to extend the User_model with your own user authentication system. Therefore you have to replace the "current_id" method in User_model with your own method returning the id of the currently logged in user. Pm_model uses "current_id" to get the user id of the current user.

As next step you will want to replace the views and implement e.g. AJAX calls to auto-complete recipient names or show more of the backend messages to the user. Also you might want to delete the sample contents from the database and implement your own routing.

#Documentation

A full documentation can be found here.

ci_pm's People

Contributors

balint42 avatar

Watchers

James Cloos avatar  avatar

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.