Skip to content

Commit

Permalink
Merge branch 'overint-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
cydrobolt committed Sep 16, 2016
2 parents 4511499 + 8002fd3 commit f125665
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,32 @@
[![Builds status](https://travis-ci.org/cydrobolt/polr.svg)](https://travis-ci.org/cydrobolt/polr)
[![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://polr.readthedocs.org/en/latest/)

Polr is an open-source link shortening web application designed to operate at a brisk pace while offering a full-featured experience. It allows you to host your own URL shortener, to brand your URLs, and to gain control over your data. Polr is especially easy to use, and provides a modern, themable feel.
Polr is an intrepid, self-hostable open-source link shortening web application with a robust API. It allows you to host your own URL shortener, to brand your URLs, and to gain control over your data. Polr is especially easy to use, and provides a modern, themable feel.

[Getting Started](http://docs.polr.me/en/latest/user-guide/installation/) - [API Documentation](http://docs.polr.me/en/latest/developer-guide/api/) - [Contributing](https://github.com/cydrobolt/polr/blob/master/CONTRIBUTING.md) - [Bugs](https://github.com/cydrobolt/polr/issues) - [IRC](http://webchat.freenode.net/?channels=#polr)
[Getting Started](http://docs.polr.me/en/latest/user-guide/installation/) - [API Documentation](http://docs.polr.me/en/latest/developer-guide/api/) - [Contributing](https://github.com/cydrobolt/polr/blob/master/.github/CONTRIBUTING.md) - [Bugs](https://github.com/cydrobolt/polr/issues) - [IRC](http://webchat.freenode.net/?channels=#polr)

### Upgrading from 1.x
### Quickstart

**Please do not attempt to upgrade directly to 2.x.**

Polr 1.x currently cannot be upgraded to 2.x automatically. There are breaking changes in the API, configuration files, and database structure. A migration will be provided once 2.0 stable is officially released. In the meantime, it is okay to upgrade between different versions in the 1.x arch, which do not have breaking changes.


#### Quickstart

Polr is written in PHP and Laravel, using MySQL as its primary database.
Polr is written in PHP and Lumen, using MySQL as its primary database.

- To get started with Polr on your server, check out the [installation guide](http://docs.polr.me/en/latest/user-guide/installation/). You can clone this repository, or download a [release](https://github.com/cydrobolt/polr/releases).
- To get started with the Polr API, check out the [API guide](http://docs.polr.me/en/latest/developer-guide/api/).


_Installation TL;DR: clone or download this repository, set document root to `public/`, MySQL create database, go to `yoursite.com/setup`_
Installation TL;DR: clone or download this repository, set document root to `public/`, create MySQL database, go to `yoursite.com/setup` and follow instructions.

### Demo

To test out the demo, head to [demo.polr.me](http://demo.polr.me) and use the following credentials:

#### Demo
- Username: `demo-admin`
- Password: `demo-admin`

Polr operates a demo instance at [demo.polr.me](http://demo.polr.me). You can use the demo instance to develop your API implementation, try out the admin panel, or simply experience the app without needing to install it on your own servers. The demo instance may be periodically reset, so please do not use the demo as a production URL shortener.
### Upgrading Polr

Admin username: demo-admin (password is same as username)
Please do not attempt to upgrade directly to 2.x.

Normal user username: demo-user (password is same as username)
Polr 1.x currently cannot be upgraded to 2.x automatically. There are breaking changes in the API, configuration files, and database structure. It is safe to upgrade between different versions in the 1.x arch, which do not have breaking changes. Always backup your database and configuration files before upgrading Polr.

#### Browser Extensions

Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public function displayAdminPage(Request $request) {
$admin_links = null;

if ($this->currIsAdmin()) {
$admin_users = User::paginate(15);
$admin_links = Link::paginate(15);
$admin_users = User::paginate(15, ['*'], 'users_page');
$admin_links = Link::paginate(15, ['*'], 'admin_links_page');
}

$user = UserHelper::getUserByUsername($username);
Expand All @@ -36,7 +36,7 @@ public function displayAdminPage(Request $request) {
}

$user_links = Link::where('creator', $username)
->paginate(15);
->paginate(15, ['*'], 'links_page');

return view('admin', [
'role' => $role,
Expand Down
3 changes: 1 addition & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
![Polr Logo](logo.png)

[![GitHub license](https://img.shields.io/badge/license-GPLv2%2B-blue.svg)](about/license)
[![2.0 status](https://img.shields.io/badge/beta-2.0-yellow.svg)](https://github.com/cydrobolt/polr/tree/2.0-dev)
[![GitHub release](https://img.shields.io/badge/stable-1.5.1-blue.svg)](https://github.com/cydrobolt/polr/releases)
[![GitHub release](https://img.shields.io/badge/stable-2.0.0-blue.svg)](https://github.com/cydrobolt/polr/releases)

Polr is a beautiful, modern, lightweight, and minimalist open-source URL shortening application. It allows you to host your own URL shortener, to brand your URLs, and to gain control over your data. Polr is especially easy to use, and provides a modern, themable interface.
2 changes: 1 addition & 1 deletion resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<form method='POST' action='/shorten' role='form'>
<input type='url' autocomplete='off'
class='form-control long-link-input' placeholder='http://' value='http://' name='link-url' />
class='form-control long-link-input' placeholder='http://' name='link-url' />

<div class='row' id='options'>
<p>Customize link</p>
Expand Down

0 comments on commit f125665

Please sign in to comment.