Commit 27f203c7 authored by Philipp's avatar Philipp

initial import

parents
See http://stimpyrama.org/software/ghs for more detailed instructions
Prequisites
1. Menalto Gallery 3 installation (http://gallery.menalto.com)
2. G3 Module: REST API (included but deactivated by default)
3. G3 Module: RSS (optional - included but deactivated by default)
4. HighslideJS library (not included - see below)
Installation
1. download the latest Highslide zip package
from http://highslide.com/download.php and copy its contents
to data/include/highslide/ (so the file highslide-full.packed.js will
be at data/include/highslide/highslide-full.packed.js)
2. move the example config from data/include/config.default.inc.php
to data/include/config.inc.php and edit its contents
3. done.
=============================================================================
G3FrontendHS v0.3 beta
(C) 2011 by P. Giebel (http://www.amb-net.de)
=============================================================================
This software is licensed under GPL v3 (http://www.gnu.org/licenses/gpl.html)
!!! THIS NEEDS MORE TEXT !!!
This is really early beta! So expect your dog to blow up and don't blame me!
G3FrontendHS is the glue between Menaltos Gallery 3 and HighslideJS: It
combines the completeness of Menalto Gallery with the beautyness of
Highslide by adding a new Frontend using a lot of Javascript...
This is done (mostly) via the REST API coming with Gallery3.
Due to its license, HighslideJS could not be included with this package,
so you need to download and add it yourself. It's free for private users
and cheap for commercial usage...
The background image used by default is made by designerfield.com
Please read INSTALL for further installation instructions.
#subalbums li {
width: 133px;
height: 180px;
}
#subalbums li a {
width: 133px;
height: 180px;
display: block;
overflow: hidden;
position: relative;
}
#subalbums li a img {
opacity: .8;
height: 133px;
}
#subalbums li a:hover img {
opacity: 1;
}
#subalbums span span span {
padding-top: 10px;
display: block;
}
#subalbums li a span span.tag {
font-size: 8pt;
color: #f00;
width: 24px;
height: 24px;
line-height: 24px;
display: block;
position: absolute;
top: 5px;
right: 5px;
background-position: 0 0;
}
#subalbums li a span span.hot {
background: transparent url(../pix/icon_hot.png) no-repeat;
}
#subalbums li a span span.new {
background: transparent url(../pix/icon_new.png) no-repeat;
}
#subalbums li a:hover span span.tag {
background-position: 0 -24px;
opacity: .8;
}
body {
font-size: 10pt;
color: #000000;
font-family: 'Trebuchet MS',Arial,sans-serif;
background: #000 url(../pix/bg.jpg) no-repeat;
background-position: top center;
background-attachment: scroll;
margin: 0;
padding: 20px;
}
html {
margin: 0;
padding: 0;
}
#fw_content {
width: 100%;
max-width: 100%;
}
#fw_content div {
background: transparent;
border: 0!important;
box-shadow: none!important;
}
#title {
display: block;
margin: 5px 0 15px 0;
}
This diff is collapsed.
#subalbums li {
width: 133px;
height: 133px;
}
#subalbums li a {
width: 133px;
height: 133px;
display: block;
background-repeat: no-repeat;
background-position: center;
overflow: hidden;
opacity: .8;
}
#subalbums li a:hover {
opacity: 1;
}
#subalbums li a > span {
display: table;
position: static;
}
#subalbums li a span {
height: 100%;
width: 133px;
position: relative;
}
#subalbums li a span > span {
display: table-cell;
position: static;
vertical-align: middle;
}
#subalbums li a span span {
top: 50%;
}
#subalbums li a span span.tag {
font-size: 8pt;
color: #f00;
width: 24px;
height: 24px;
line-height: 24px;
display: block;
position: absolute;
top: 5px;
right: 5px;
background-position: 0 0;
}
#subalbums li a span span.hot {
background: transparent url(../pix/icon_hot.png) no-repeat;
}
#subalbums li a span span.new {
background: transparent url(../pix/icon_new.png) no-repeat;
}
#subalbums li a:hover span span.tag {
background-position: 0 -24px;
opacity: .8;
}
#subalbums li a span span span {
position: relative;
color: #fff;
font-size: 12pt;
font-weight: bold;
text-shadow: 0px 0px 5px #000;
top: 0;
background-image : url(');
top: -50%;
}
#subalbums li a span span span {
top: 0\0/IE8+9; /* IE8+9 */
}
#subalbums li a:hover span span span {
opacity: .3;
}
#fw_content {
max-width: 960px;
min-width: 680px;
margin-left: auto;
margin-right: auto;
background: transparent;
}
#fw_content div {
width: 100%;
border: 1px solid #fff;
border-radius: 5px;
background-color: #fff;
box-shadow: 0 0 15px #666;
margin-bottom: 20px;
}
#fw_content div div {
border: 0;
box-shadow: none;
border-radius: 0;
margin: 0;
width: auto;
padding: 10px;
text-align: left;
background-color: transparent;
}
#fw_content div div div {
padding: 0;
}
.big {
font-size: 30pt;
font-weight: bold;
}
#fw_head {
}
#fw_head div, #fw_footer div {
text-align: center!important;
background: transparent!important;
}
#fw_head div {
}
#fw_head img {
vertical-align: middle;
margin-left: 30px;
}
#fw_body {
min-height: 250px;
}
#fw_footer img {
vertical-align: middle;
}
#title {
padding: 0;
margin: 0;
font-size: 16pt;
font-weight: bold;
}
.thumblist {
list-style: none;
padding: 0;
margin: 0;
}
#subalbums {
display: none;
}
#subalbums li {
float: left;
padding: 10px;
margin: 10px;
border: 1px solid #ccc;
border-radius: 3px;
box-shadow: 0 0 6px #aaa;
background-color: #f8f8f8;
}
#subalbums li:hover {
border: 1px solid #999;
box-shadow: 0 0 3px #aaa;
background-color: #f2f2f2;
}
#subalbums li a {
text-align: center;
}
#subalbums li a:hover {
}
#images {
display: none;
}
#images li {
float: left;
width: 200px;
height: 200px;
border: 1px solid #ccc;
padding: 1px;
margin: 10px;
text-align: center;
}
#images li a {
}
.highslide-caption img {
float: right;
}
#hsslide {
height: 430px!important;
width: 640px!important;
margin-left: auto!important;
margin-right: auto!important;
text-align: center!important;
}
#latest {
margin-left: auto;
margin-right: auto;
padding: 0;
}
#latest li {
display: none;
}
#breadcrumbs {
border-bottom: 1px solid #000;
}
a, a:visited {
color: #000;
text-decoration: none;
font-weight: bold;
}
a:hover, a:visited:hover {
color: #c00;
}
.clr {
clear: both;
}
.tiny {
height: 1px;
font-size: 1px;
margin: 0;
padding: 0;
overflow: hidden;
}
.head {
font-size: 14pt;
font-weight: bold;
}
.green {
color: #0a0;
}
.red {
color: #a00;
}
.grey {
color: #aaa!important;
}
.grey:hover {
color: #000!important;
}
.bold {
font-weight: bold;
}
.italic {
font-style: italic;
}
.right {
text-align: right;
}
th {
background-color: #ccc;
color: #fff;
font-weight: bold;
}
.odd {
background-color: #eee;
}
#hsslide-container {
width: 640px!important;
height: 450px;
margin-left: auto;
margin-right: auto;
}
img {
border: 0;
}
/* ** The place for your style modifications **
Modify this file to satisfy your needs and
rename it to "user.css"
*/
body {
color: #ccc;
}
#fw_content div {
background-color: #222;
}
a, a:visited {
color: #fff;
}
To add some information about yourself edit this file:
<p style="border: 1px solid #999; background-color: #eee; font-style: italic; padding: 10PX; width: 300px; margin: 10px 0 10px 20px;">
data/include/aboutme.inc.html
</p>
All HTML allowed..
<p>If you don't want an about me site, simply delete that file...</p>
<?php
// DO NOT EDIT!!! ---------------------------------------------------
if ( TOKEN != 'qcZ5Z{OX(1=kwYYrpsogpppd87]LOU7GAccFjc)Cp{v/0vZ' ) die( "no direct access!" );
// ------------------------------------------------------------------
// URL to your gallery3 installation (eg http://example.com/gallery3)
define( 'G3URL', 'http://example.com/gallery3' );
// Your G3 REST API Key (eg 112233445566778899aabbccddeeff00)
define( 'G3KEY', '112233445566778899aabbccddeeff00' );
// Does your gallery installation use mod_rewrite?
// (is there an index.php in your g3-urls? - true/false)
define( G3REWRITE, false );
// language (eg 'en'/'de')
define( 'LANG', 'en' );
// Title of your ghs installation (eg John Does precious moments)
define( 'TITLE', 'John Does precious moments' );
// Show Titlebox? (first box on site - true/false)
define( 'TITLEBOX', true );
// Introtext to display on every gallery page (eg for licenses)
// unset for not displaying any introtext...
define( 'INTRO', '<a rel="license" href="http://creativecommons.org/licenses/by-nd/3.0/" target="_blank"><img alt="Creative Commons Lizenzvertrag" style="border-width:0; float: right;" src="http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png" /></a>All photos on this page are property of John Doe and licensed unter Creative Commons License BY-NC-ND<br />No commercial usage, private usage only unchanged an with link to this gallery');
// Where to show category titles: 'below' or 'inside' thumbnails?
define( 'TITLEPOS', 'inside' );
// EmbeddMode disables background and boxes for easy
// integration via iframe
define( 'EMBEDD', false );
// Number of views for an album to be "hot" (0 to disable)
define( 'AHOT', 1500 );
// Number of days for an album to be "new" (0 to disable)
define( 'ANEW', 14 );
?>
<?php
if ( TOKEN != 'qcZ5Z{OX(1=kwYYrpsogpppd87]LOU7GAccFjc)Cp{v/0vZ' ) die( "no direct access!" );
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2011 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
include("Mail.php");
include("Mail/mime.php");
include("HTTP/Request.php");
class Gallery3 {
var $url;
var $token;
var $data;
var $file;
protected $original_entity;
/**
* Connect to a remote Gallery3 instance
*
* @param string Gallery 3 API url, eg http://example.com/gallery3/index.php/rest
* @param string username
* @param string password
* @return string authentication token
*/
static function login($url, $user, $pass) {
$response = Gallery3_Helper::request(
"post", $url, null, array("user" => $user, "password" => $pass));
return $response;
}
/**
* Construct a new Gallery3 instance associated with a remote resource
* @param string remote url
* @param string authentication token
* @return object Gallery3
*/
static function factory($url=null, $token=null) {
$obj = new Gallery3();
$obj->token = $token;
$obj->url = $url;
if ($url && $token) {
$obj->load();
}
return $obj;
}
/**
* Constructor.
*/
public function __construct() {
$this->data = new stdClass();
$this->token = null;
$this->url = null;
}
/**
* Set a value on the remote resource's entity. You must call save for it to take effect.
*
* @param string key
* @param string value
* @return object Gallery3
* @chainable
*/
public function set($key, $value) {
$this->data->entity->$key = $value;
return $this;
}
/**
* Replace the members for the remote resource
*
* @param array members
* @return object Gallery3
* @chainable
*/
public function set_members($members) {
$this->data->members = $members;
return $this;
}
/**
* Attach a file to the remote resource.
*
* @param string path to a local file (eg: /tmp/foo.jpg)
* @return object Gallery3
*/
public function set_file($file) {
$this->file = $file;
return $this;
}
/**
* Save any local changes made to this resource. If this is an existing resource, we'll return
* the resource itself. If we're creating a new resource, return the newly created resource.
*
* @return object Gallery3
*/
public function create($url, $token) {
if (!is_string($url)) {
throw new Gallery3_Exception("Invalid url: " . var_export($url));
}
$response = Gallery3_Helper::request(
"post", $url, $token, array("entity" => $this->data->entity), $this->file);
$this->url = $response->url;
$this->token = $token;
return $this->load();
}
/**
* Save any local changes made to this resource. If this is an existing resource, we'll return
* the resource itself. If we're creating a new resource, return the newly created resource.
*
* @return object Gallery3
*/
public function save() {
$data = array();
$data["entity"] = array_diff((array)$this->data->entity, $this->original_entity);
if (isset($this->data->members)) {
$data["members"] = $this->data->members;
}
if ($this->file) {
$response = Gallery3_Helper::request("put", $this->url, $this->token, $data, $this->file);
} else {
$response = Gallery3_Helper::request("put", $this->url, $this->token, $data);
}
return $this->load();
}
/**
* Delete the remote resource.
*
* @return object Gallery3
*/
public function delete() {
Gallery3_Helper::request("delete", $this->url, $this->token);
$this->data = array();
$this->url = null;
return $this;
}
/**
* Reload the resource from a given url. This is useful after the remote resource has been
* modified.
*
* @return object Gallery3
*/
public function loa