Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
/ imagerie Public archive

Imagerie is a small lightweight package intended to provide a free alternative to Gyazo Ninja

Notifications You must be signed in to change notification settings

chyyran/imagerie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Imagerie

Imagerie is a small lightweight PHP package intended to provide a free alternative to Gyazo Ninja.

Features

  • HTML5 compliant1
  • CSS3 Shadows
  • A password protected gallery that allows you to manage pictures
  • Database-less
  • For use with custom Gyazo builds
  • Clean minimalistic design
  • Facebook OpenGraph tags

1OpenGraph tags on the image display page (display.php) are not recognized as standards by W3C and therefore render the webpage invalid with that one error

Requirements

  • A up to date HTML5 and CSS3 compliant browser (IE 8 and above, as well as Chrome, Firefox and Safari should be fine)
  • Apache or another webserver2
  • A custom build of Gyazo that uploads to said webserver
  • PHP
  • PHP-GD for OpenGraph and resizing

2There are .htaccess files that are required for the script to work properly. There is an nginx version of the main rewrite .htaccess supplied, but it was created from an online converter. It may require edits. For all other webservers, you will have to create your own rewrite rules

Script Contents

  • index.php simply points to the gallery web page
  • gallery.php is the gallery web page where you can manage your images
  • display.php displays a single image like how Gyazo normally shows images
  • thumb.php generates thumbnails and resizes images. It is a copy of the TimThumb script.
  • gyazo.php is a script Gyazo calls to upload images. The package is configured to use the ./uploads/ directory to store uploaded images. This can be changed by replacing all instances of uploads/ in the script with your directory name.
  • trash.php is called when a image is to be deleted. It moves the image into the ./dump/ directory, where it will be unable to be accessed, and can be removed or restored manually.

Installation and Usage

First, upload all the files in the webserver directory to your website root, including the folder structure. I recommend you set up a VirtualHost subdomain if using Apache. For security, you may rename gyazo.php. Remember what you named it later.

Change the $password variable in gallery.php to something else other than the default password. This is used to login to the gallery. Now, compile a custom version of Gyazo that uploads to your webserver. Submodules containing Gyazo source code for Windows, OSX, and linux can be found under the gyazo folder in this repository.

Windows

Replace gyazo.com in Line 794 of gyazowin.cpp with your (sub)domain name. Replace /upload.cgi in Line 795 with /gyazo.php, or whatever you named it in the step beforehand.

Compile with Visual Studio 2008.

Mac

Replace gyazo.com in Line 50 of script with your (sub)domain name. Replace /upload.cgi in Line 51 with /gyazo.php, or whatever you named it in the step beforehand.

Turn off code signing in Xcode if you do not have a certificate.

Compile with Xcode

Linux

Replace gyazo.com in Line 37 of gyazo with your (sub)domain name. Replace /upload.cgi in Line 38 with /gyazo.php, or whatever you named it in the step beforehand.

ruby ./gyazo

Usage

To get the raw image, add raw as a GET parameter to the display page. Adding w or h as a GET parameter to the display page will scale accordingly, for example

http://images.punyman.com/uploads/c55e9bc50bbc2eacf700.png?raw&w=240&h=240 will yield Imagerie demo

This also works without raw, for example see here for a demo.

Feel free to change the CSS to your liking.

thumb.php and trash.php should not be called directly.

About

Imagerie is a small lightweight package intended to provide a free alternative to Gyazo Ninja

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published