Updated README.md + added SQL structure

This commit is contained in:
pikami 2016-06-16 16:18:16 +00:00
parent e9ccb5c919
commit 8690bd730c
2 changed files with 133 additions and 3 deletions

View File

@ -1,8 +1,30 @@
# Palm-paste # Palm-paste
This is a script of a site where you can share text and code snippets. Palm-paste is an Open-Source PHP script of a site where you can share text and code snippets.
It's not finished so don't use it yet! It's extremely easy to use!
It has syntax highlight, ability to post public/unlisted/private pastes and many more cool features.
It's in active development so stay tuned for updates.
Also if you have any ideas you can contact me on twitter, I'm @pik4mi
If you have any issues, file them here https://github.com/pikami/palm-paste/issues
## Things used to make this #Note
Original development environment is Apache 2.4 + PHP5.6 + MySQL.
Should work with Nginx and any PDO-compatible database.
#Install
For the purposes of this guide, we won't cover setting up Apache, PHP, MySQL, or Nginx.
So we'll just assume you already have them all running well.
1. Download palm-paste from https://github.com/pikami/palm-paste/tags
2. Create a user and database for palm-paste
3. Take the 'palm-paste.sql' and import it to your database.
4. Edit configuration settings in config/config.php
5. Done!
* To ensure that pastes with an expiration set get cleaned up, define the cron key in the config and set up a cronjob, for example:
* `*/5 * * * * curl --silent http://your-site.com/palm-paste/cronjob.php?key=[key]`
* If you can't have cronjobs or your just to lazy - Don't wory, the pastes will expire if a user tries to view them after expiration time is over.
# Things used to make this
- Bootstrap (v3.3.6) Link: http://getbootstrap.com/ - Bootstrap (v3.3.6) Link: http://getbootstrap.com/
- JQuery (v1.12.0) Link: https://jquery.com/ - JQuery (v1.12.0) Link: https://jquery.com/
- Dynatable (v0.3.1) Link: https://www.dynatable.com/ - Dynatable (v0.3.1) Link: https://www.dynatable.com/

108
palm-paste.sql Normal file
View File

@ -0,0 +1,108 @@
-- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2016 m. Bir 16 d. 15:47
-- Server version: 5.5.44-0+deb8u1
-- PHP Version: 5.6.20-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `palm-paste`
--
-- --------------------------------------------------------
--
-- Sukurta duomenų struktūra lentelei `pastes`
--
CREATE TABLE IF NOT EXISTS `pastes` (
`id` int(11) NOT NULL,
`uid` text NOT NULL,
`title` text NOT NULL,
`text` text NOT NULL,
`created` int(10) unsigned NOT NULL DEFAULT '0',
`expire` int(10) NOT NULL DEFAULT '0',
`exposure` int(11) NOT NULL DEFAULT '0',
`owner` int(11) NOT NULL DEFAULT '0',
`highlight` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Sukurta duomenų struktūra lentelei `sessions`
--
CREATE TABLE IF NOT EXISTS `sessions` (
`id` int(11) NOT NULL,
`skey` text NOT NULL,
`uid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Sukurta duomenų struktūra lentelei `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL,
`user` text NOT NULL,
`password` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `pastes`
--
ALTER TABLE `pastes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `pastes`
--
ALTER TABLE `pastes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `sessions`
--
ALTER TABLE `sessions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;