Starting from Piwigo 2.2, it is possible to run several photo galleries with the same installation of Piwigo, this is a basic multisite feature and each site has its own $conf['local_dir']
If you use the ./local directory to store your theme/plugin configuration, I suggest to move configuration to the “config” table which does a very good job. If you want to keep configuration in a separate file, don't hard code the “local” directory, use the PWG_LOCAL_DIR constant instead.
path : relative to the “root url” of your gallery
alert("This is a test");
alert("This is a test");
No need to use combine_script, because Piwigo will automatically load jquery.ui.sortable, which automatically requires jquery.ui which automatically requires jquery. It works because jquery.ui.sortable is available in themes/default/js/ui
CSS sprites are a way to reduce the number of HTTP requests made for image resources referenced by your site. Images are combined into one larger image. Instead of performing an HTTP request for each icon of a page, the web browser only performs a single request to get all icons at once. Read more on CSS Sprites: Image Slicing’s Kiss of Death.
1) start the Gimp
2) open themes/default/s26/outline_ff3363.png (with the pink icons)
3) switch to RGB Mode : Image > Mode > RGB
4) in the Toolbox pane, make sure you have the “Rectangle Select Tool” active
5) create a new layer, on top of the background (which includes the icons) and select it
6) open your icon home.png, Select > All (Ctrl+a), Edit > Copy (Ctrl+c)
7) focus on the sprite window
8) Edit > Paste and move the floating selection with the mouse cursor, your home icon must be on top of the default home icon
9) click outside the current selection, the pasted icon will be merged into the “New Layer”
10) reproduce steps 6 to 9 for each icon of the sprite
11) select the “Background” layer in the “Layers” pane (but don't hide the “New Layer”)
12) in the image window, select each icon you have replaced and press “suppr” on your keyboard, this will delete the background, ie the default icon
13) save the file as themes/yourTheme/icon/icons_sprite.png (use option “Merge visible layers” when saving)
Now you have a sprite with all your icons, let's declare it in the theme.css of your theme. Open your theme.css and write:
Open your web browser and check the icons are correctly displayed. If you have problems like alignment, reopen icons_sprite.png, select the icon with the Rectangle Select Tool, Edit>Cut (Ctrl+x), Edit>Paste (Ctrl+v) and move it up/down/right/left with arrows on your keyboard, save file and check in your web browser.
One thing really nice with the new system to display icons is the ability to have a distinct icon for a:hover (when the mouse cursor is on the icon). For this example, I've decided to have my icons grey by default and colored when cursor is over it.
1) copy icons_sprite.png as icons_sprite_hover.png