PHP Classes
elePHPant
Icontem

Noter: Create and manage notes shared between users

Recommend this page to a friend!
  Info   View files Example   View files View files (22)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-07-16 (2 months ago) RSS 2.0 feedStarStarStarStar 70%Total: 137 This week: 1All time: 8,503 This week: 616Up
Version License PHP version Categories
noter 1.0.8GNU General Publi...5.4PHP 5, Content management
Description Author

This package can be used to create and manage notes shared between users.

It can perform several types of operations requested by logged users on notes stored on SQLite database.

Currently each user can add, update, delete and search for stored notes.

Innovation Award
PHP Programming Innovation award nominee
September 2016
Number 9


Prize: One downloadable copy of Komodo IDE
Many teams need to collaborate sharing information between members.

There are many applications on the Web that can be used for this purpose. However, they require that the teams send information over the Internet to be stored in the infrastructure of a different company.

This package implements a simple notes sharing system that can be implemented on a intranet, so no information is sent to outside the company network.

Manuel Lemos
  Performance   Level  
Name: Martin Latter is available for providing paid consulting. Contact Martin Latter .
Classes: 5 packages by
Country: United Kingdom United Kingdom
Age: ???
All time rank: 201888 in United Kingdom United Kingdom
Week rank: 327 Up10 in United Kingdom United Kingdom Up
Innovation award
Innovation award
Nominee: 3x

Details

Noter

Note sharing on an internal network.

[1]: https://tinram.github.io/images/noter.png ![noter][1]

Purpose

Share notes and code on a home / internal network without awkward PC connections or Internet transfer obstructing.

Quickly post and view notes on the same network e.g. save a note from a Linux PC and read on a Windows PC, without needing to invoke WinSCP or use network sharing such as Samba or NFS.

The focus is simplicity - browser display and search, with a log-in to add, edit, and delete notes.

The log-in offers basic protection from unauthorised tampering via password obfuscation and session timeout. Noter was created for an isolated network where plain text transfer and viewing is acceptable, and without determined adversaries. Noter is NOT suitable for storing sensitive data.

A single SQLite database file facilitates easy backup, transfer, and source control of data.

A Raspberry Pi, with Apache and PHP installed, could make an ideal low-powered always-on host for Noter.

Requirements

A PHP server with the following modules enabled:

PHP 7.0+

  • sqlite3

PHP 5.4+

  • php5-sqlite
  • openssl

Setup

Unzip or git clone the Noter files into the chosen web server directory.

(XAMPP and WAMP are suitable servers for Windows.)

For the following example on a Linux machine, the chosen directory is called noter/

In the terminal:

cd to the web directory (usually /var/www/html/).

Prefix sudo to the following commands as necessary:

chown -R <username>:www-data noter/ # Debian-based, username as owner allows file editing
(chown -R <username>:apache noter/ # CentOS)

chown www-data noter/log/badlog.txt

chmod 600 noter/log/badlog.txt

Very important for the SQLite file operation (needs to be actioned on the directory itself):

chown -R www-data noter/db/

Check the configuration file constants: noter/config/config.php

Only the timezone, session constants, and CONFIG_NUM_NOTES_DISPLAYED are of immediate interest, unless you wish to revise the SQLite database schema.

Change the users and passwords in the editing log-in gateway (classes/login.class.php). The default usernames (USER1 and USER2) are martin and alison, and both passwords are P@55w0rd. More users can be easily added (at the top of the file and in validateForm()).

Passwords are stored as SHA-256 hashes. $USER1_PASS etc can be replaced with a hash generated from a website service or by running one of the following commands in a terminal and copying the output hash:

Bash

echo -n 'PASSWORD' | sha256sum

PHP

php -r "echo hash('sha256', 'PASSWORD');"

Python

python -c "import hashlib;print(hashlib.sha256('PASSWORD'.encode()).hexdigest())"

python3 -c "import hashlib;print(hashlib.sha256('PASSWORD'.encode()).hexdigest())"

Manually Create the SQLite Database

Noter includes an initial SQLite database: db/noter.sqlite3

However, where GitHub importing does not permit binary files and the noter.sqlite3 file is consequently missing, the file will need to be created manually -

In a terminal:

cd db/
sudo sqlite3 noter.sqlite3
.read noter_schema_data.sql
.exit
sudo chown www-data:www-data noter.sqlite3

Viewing and Searching

http://localhost/noter

http://IP.add.re.ss/noter

or better, configure an Apache vhost:

noter

Adding and Editing

http://localhost/noter/edit

or if Apache rewrite is disabled:

http://localhost/noter/edit.php

Upon logging-in through this page, notes can be added, updated, or deleted.

<pre>...</pre> and <code>...</code> tags can be used to highlight code snippets.

<pre>...</pre> preserves whitespace (both spaces and copy/pasted tabs).

<code>...</code> does not preserve whitespace.

Most types of link references will be automatically converted into HTML links upon note addition (but not on note updating).

Other Files

The SQLite database schema is available at db/noter\_schema.sql

The SQLite database schema and initial data is available at db/noter\_schema\_data.sql

Unsuccessful log-in attempts are recorded in log/badlog.txt

Credits

  • Angel Marin and Paul Johnston for the JavaScript SHA-256 hash function.
  • Andrew Ellis for the link regex.

Miscellaneous

Noter was originally created as a second language flashcard viewer (to which it can be easily reverted).

Noter was never coded for elegance, merely to do a simple job in minimal code. It's like my car: looks a wreck, runs quite well.

License

Noter is released under the GPL v.3.

  Files folder image Files  
File Role Description
Files folder imageclasses (4 files)
Files folder imageconfig (1 file)
Files folder imagecss (1 file)
Files folder imagedb (2 files)
Files folder imageincludes (2 files)
Files folder imagejs (2 files)
Files folder imagelog (1 file)
Accessible without login Plain text file .htaccess Data Auxiliary data
Accessible without login Plain text file add.php Example Example script
Accessible without login Plain text file delete.php Example Example script
Accessible without login Plain text file edit.php Example Example script
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file menu.php Aux. Auxiliary script
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file update.php Example Example script

  Files folder image Files  /  classes  
File Role Description
  Plain text file helpers.class.php Class Class source
  Plain text file login.class.php Class Class source
  Plain text file sqlite.class.php Class Class source
  Plain text file sqlitefunc.class.php Class Class source

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file config.php Aux. Auxiliary script

  Files folder image Files  /  css  
File Role Description
  Accessible without login Plain text file noter.css Data Auxiliary data

  Files folder image Files  /  db  
File Role Description
  Accessible without login Plain text file noter_schema.sql Data Auxiliary data
  Accessible without login Plain text file noter_schema_data.sql Data Auxiliary data

  Files folder image Files  /  includes  
File Role Description
  Accessible without login Plain text file foot.php Aux. Auxiliary script
  Accessible without login Plain text file head.php Aux. Auxiliary script

  Files folder image Files  /  js  
File Role Description
  Accessible without login Plain text file common.js Data Auxiliary data
  Accessible without login Plain text file edit.js Data Auxiliary data

  Files folder image Files  /  log  
File Role Description
  Accessible without login Plain text file badlog.txt Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%
Total:137
This week:1
All time:8,503
This week:616Up
 User Ratings  
 
 All time
Utility:91%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:91%StarStarStarStarStar
Tests:-
Videos:-
Overall:70%StarStarStarStar
Rank:325