Gallery2wiki

Aus TransArte

Wechseln zu: Navigation, Suche
it's done now int works with mediawiki 1.10 and gallery 2.2 !!
in Deutsch: Gallery2wiki_Deutsch

Inhaltsverzeichnis

[bearbeiten] Installation Guide mediawiki1.10 and gallery 2.2

cd webspace
wget http://download.wikimedia.org/mediawiki/1.10/mediawiki-1.10.0.tar.gz
wget http://easynews.dl.sourceforge.net/sourceforge/gallery/gallery-2.2.2-typical.tar.gz
tar -xzf mediawiki-1.10.0.tar.gz
tar -xzf gallery-2.2.2-typical.tar.gz
mv mediawiki-1.10.0.tar.gz mediawiki
chown www-data.users mediawiki -R
chown www-data.users gallery2 -R
cd ./mediawiki/extensions/
wget http://www.transarte.net/mediawiki/extensions/gallery22wiki110_extension.tgz
tar -xzf gallery22wiki110_extension.tgz
chown www-data.users gallery2wiki_extension -R

now we should have all the needed stuff

setup mediawiki and make it work standalone setup gallery2 and make it work standalone

create one or more album folder. Important: It is important to add some new sizes like 240x240 320x320 480x480 and 640x640 (800x800) during the album creation procedure. upload some pics into the different albums. check them.

Important: change into site-Administration (maintenance) of gallery2 and create the preview images


add in /mediawiki/LocalSettings.php at the bottom:

require_once("extensions/gallery2wiki_extension/gallery2wiki.php");

modify the settings in /mediawiki/extensions/gallery2wiki_extension/gallery2wiki.settings.php

//*** settings
$gallerySettings["herepath"] = "/mediawiki/extensions/gallery2wiki_extension/"; // relative path   to this folder;
$gallerySettings["absherepath"] = $_SERVER["DOCUMENT_ROOT"].$gallerySettings["herepath"];
$gallerySettings["FullDomain"] = $_SERVER["HTTP_HOST"];
$gallerySettings["galleryRelPath"] = "/gallery2/";
$gallerySettings["path"] = $_SERVER["DOCUMENT_ROOT"].$gallerySettings["galleryRelPath"];
$gallerySettings["codepath"] = "/var/www/.../web/gallery2/";
$gallerySettings["galleryFullUrl"] =  $gallerySettings["FullDomain"].$gallerySettings["galleryRelPath"]."main.php";


now test

http://www.rechtsberatungen.ch/mediawiki/extensions/gallery2wiki_extension/g2dirgroup.php

there should be no errors and somethin like should apperar. click on one folder to see some pictures. Click on one picture should alert "not in Application" . Log in mediawiki and start editing

now a new button has been installed clicking on this button open as first step on the left the direct entry dialog to insert some pictures. clicking on the topleft logo detach the dialog into a separate window (if the browser allows it)

klicking on one picture should now insert at the cursor position a string

a few tipp: if you need to insert some uploaded pictures, lets say at /images/ you can simply add [ [ Foto:/images/picname.jpg ] ]

to make the image floating left: [ [ foto:161...] ] (the three dots to add another class to the image: [ [ foto:161|320|newclass ] ] or [ [ foto:161||newclass ] ] Therefore add the class in gallery2wiki_extension/css/gallery2wiki.css


[bearbeiten] mediawiki 1.6 and Gallery2 v. 2.1x

today (15.05.2006) i finished testing the new version gallery2wiki. you can download it here: Download

This version has been tested with Mediawiki v1.6x and Gallery2 Ver. 2.1 in a multisite environement. I had my problems migrating to the new version of gallery2 as i made two changes at the same time: Gallery2Beta to Gallery2final and into a multisite version. I got new ID's for my pictures, therefore wiki messed up. So my advice:

  • Backup database and codefolder!!!
  • Make mediawiki and Gallery2 work separately.
  • Add the extension and modify all pathes in the gallery2wiki.settings.php
  • try .../extensions/gallery2wiki_extension/g2dirgroup.php as standalone application
  • go to mediawiki and edit some page. does the new button appear? otherwise check all pathes.

i hope it works on other systmes than mine.

Modifications:

  • path multisite robust
  • I replaced the surrounding div of the images with a span, so you may now insert the images within text and also have several pictures side by side.
  • if client viewers does have javascript disabled the image fallback gracefully


please comment the new version with the installation Installing_gallery2wiki here

[bearbeiten] Intro

Steve

Gallery2wiki is a hack to make Gallery2 a backend for MediaWiki. It is a much more robust solution for managing images than the the built-in image upload feature. Though one might prefer Coppermine or Gallery, Gallery2 seemed to be the best solution.

If any MediaWiki / Gallery2 experts would like to help out, it would be greatly appreciated!

  • MediaWiki hooks work differently than expected
  • Gallery2 explanations needed

Für eine deutsche Version hier klicken

[bearbeiten] Installation

Be aware that this is alpha software - use it at your own risk!

Prerequisites:

We are assuming that you already have a web server running the appropriate versions of the following:

  • Apache: 2.
  • PHP: 4.
  • MySQL: 4.??
  • Gallery: 2.??
  • MediaWiki: 1.??

Intructions:

  1. Download Gallery2.
  2. Install or upgrade
Gallery2 | Window2k3 | Debian
  1. As Admin, install / activate Album Select module
    • Site Admin » Admin Options » Modules » Blocks » Album Select
    • (This is probably already on by default)
  2. Create an sample album | example convention
  1. Download Gallery2wiki (old version for Gallery2beta Download )
    • Changes from time to time, last updated 11.08.05
  2. Extract Gallery2wiki to /mediawiki/extensions/ (where / is the root of your webserver)
    • you should see the folder /mediawiki/extensions/gallery2wiki_extension/
  3. edit /mediawiki/LocalSettings.php and add the following line near the bottom
    • require_once("extensions/gallery2wiki_extension/gallery2wiki.php");


You're done! No custom modifications of Gallery2 or MediaWiki are required!

[bearbeiten] Troubleshooting

This page explains some of the troubles with implementation.

[bearbeiten] User Documentation

To test that Gallery2wiki has been installed correctly follow this tutorial:

  1. Start a new page in your wiki.
  2. On the new page you will notice a new icon located to the right of the other WSYSIWYG edit icons (such as font, bold, link, etc), or below in some browsers.
    • The icon will look like this: .
  3. Click on the magic icon in the editpage and watch the left side.
  4. Click on a folder: opens the folder (the topmost folder goes one up).
  5. Click on a image itself: inserts a string [[Foto:id] in the text area.
  6. On the left border of each thumbnail are icons. They will appear, as you mouse over the thumbnail.
open in a separate Window (popup blockers should allow it )
shows and hide the picture tree
goes one tree up
switch to the gallery2 view of the selected item
goes to the wiki entry of the selected item ( /index.php/Foto:id )
inserts { { :Foto:xxx} } the picture and the wiki text of the item (if written)
insert [ [ Foto : id | size ] ] where size can be modified to the desired default size like 240 or 320
start a selection for grouping images (not yet implemented )

[bearbeiten] Test

You can 'try before you buy' so-to-speak on this 'sandbox' scribble page.

[bearbeiten] Wikatar

Each picture in the gallery has a corresponding entry in MediaWiki, I call it wikatar (wiki+avatar). You don't have to write anything, it just exists and can be used instead of the comment part of the gallery. The advantage is, that you can reuse picture and text on many places with { { : Foto : id } } You will notice a slider on the top, when you are in a wikatar page. There you can see all pictures of the same gallery album. See example here:

wikatar Foto:333

[bearbeiten] Albums

I dropped the idea of an album concept within MediaWiki, as it can manually be done. Just open an empty page and click as many pictures as you want. et voilá : the album.


testing...

[bearbeiten] Image

An inserted image automatically has resizers on the top. You move the mouse above the picture and some kind of tab's appear. Click to change the size. This is done inline with javascript. I'm planning to put some more tab's

[bearbeiten] Developer Documentation

The code is split into several elements:

[bearbeiten] hook mediawiki

gallery2wiki.php attach to the MediaWiki events and start the application if needed.

[bearbeiten] class gallery2wiki

gallery2wiki.class.php is the renderer and glue

[bearbeiten] class g2interface

interfaces to the gallery2core api, and should be replaceable with others in the future. At the moment in gallery2wiki.class.php, as there is a lot of work to do

[bearbeiten] settings

gallery2wiki.settings.php This file must be carefully modified when installing it, as it contains all the paths.

If MediaWiki resides in /mediawiki and gallery2 resides in /gallery2 you may be lucky.

[bearbeiten] Javascript

I really use a lot of javascript. The advantage is that I don't have to modify any code. Just look for anchors like id on a page, include a script and you are set.

I haven't commented the code yet and it is a real mess but it works. After cleaning it should be presentable.

[bearbeiten] Icons

Don't blame me about the icons and design, it can be done later.

[bearbeiten] Using other galleries

Having defined some kind of standards between MediaWiki and a gallery program, there should be a good chance to adopt Coppermine and others too.

[bearbeiten] Misc

[bearbeiten] english

you are invited to correct my written English if need be.

xebblex

ignore_this_link

Persönliche Werkzeuge