Difference between revisions of "Gallery"

From YobiWiki
Jump to navigation Jump to search
m (restitution de la dernière modification de PhilippeTeuwen)
Line 1: Line 1:
  +
RVUwVL [url=http://viptop100.info]viptop100[/url]
==Install==
 
  +
[url=http://viptop100.info/map.htm]viptop100 map[/url]
===On sql vserver===
 
mysqladmin -uroot -p create gallery2
 
mysql gallery2 -uroot -p -e"GRANT ALL ON gallery2.* TO admin_gallery2@public.teuwen.org IDENTIFIED BY 'gal_long_pwd'"
 
 
===On public vserver===
 
apt-get install gallery2
 
sql host: sql.teuwen.org
 
admin user to create dbs: admin_gallery2 / gal_long_pwd
 
/etc/gallery2/apache.conf: uncomment first line alias /gallery2 OR create vhosts as suggested in the last lines but don't do both at the same time.
 
 
If you use virtual hosts
 
mv /etc/apache2/conf.d/gallery2 /etc/apache2/sites-available/
 
ln -s /etc/apache2/sites-available/gallery2 /etc/apache2/sites-enabled
 
Otherwise this gallery virtualhost will be the one by default
 
 
apt-get install locales
 
activate locales you want for gallery, in their ISO form, not UTF8
 
 
apt-get install dcraw jhead zip unzip libjpeg-progs php4-gd ffmpeg imagemagick
 
/etc/init.d/apache2 reload
 
 
Be sure both hosts know each other via e.g. /etc/hosts
 
 
 
create /usr/share/gallery2/.htaccess with
 
php_value memory_limit 64M
 
 
Prepare directory for the albums
 
mkdir /home/gallery2
 
chown www-data:www-data /home/gallery2
 
 
Go to public.teuwen.org/gallery2
 
<br>Choose Mysql with transactions and give the credentials
 
   
 
==Gallery migration==
 
==Gallery migration==

Revision as of 10:41, 7 December 2007

RVUwVL [url=http://viptop100.info]viptop100[/url] [url=http://viptop100.info/map.htm]viptop100 map[/url]

Gallery migration

Once you have migrated your Gallery1 to Gallery2 with the migration module

Enable URL Redirection under Apache webserver:

Ensure the mod_rewrite Apache module is enabled:
a2enmod rewrite
/etc/init.d/apache2 force-reload
  • Enable the module URL Rewrite in Gallery2
  • URL Rewrite administration -> Rules -> Migration -> activate
  • If you have troubles with url rewrite, especially if you touched the directory structure or established vhosts, deinstall completely the URL Rewrite module and reinstall it.

PG Theme

Jpegtran

Gallery1 used to use jpegtran to rotate automatically imported images in a lossless fashion.
Gallery2 doesn't :-(

You can install the module jpegtran for Gallery2

  • Uncompress it in /usr/share/gallery2/modules
  • Install it and activate it under the administration view of Gallery2
  • Install jpegtran (libjpeg-progs under Debian)
  • Test it under the administration view of Gallery2, there is a new jpegtran shortcut in the graph tools menu

Now this module does not automates anything when importing images but at least when you rotate manually a picture, it'll use jpegtran instead of the fat slow lossy ImageMagick rotation.

For rotations when importing, I do it with gthumb:

  • select all images (including those already with the correct orientation, don't bother selectiong only those to be rotated ;-) )
  • Tools -> Rotate Images -> + Adjust photo orientation + Apply to all images -> Apply