Category Archives: NextGen Gallery

NextGen Gallery Image Object

The following is a print out of the $image object used in galleries:

Note: [*caption] * added because ‘caption’ seems to be a reserved word

 HTML |  copy code |? 
01
nggImage Object ( 
02
[errmsg] => 
03
[error] => 
04
[imageURL] => http://yoursite.com/wp-content/gallery/logos/wd-logo.jpg 
05
[thumbURL] => http://yoursite.com/wp-content/gallery/logos/thumbs/thumbs_wd-logo.jpg 
06
[imagePath] => /home/username/public_html/wp-content/gallery/logos/wd-logo.jpg 
07
[thumbPath] => /home/username/public_html/wp-content/gallery/logos/thumbs/thumbs_wd-logo.jpg 
08
[href] => 
09
[thumbPrefix] => thumbs_ 
10
[thumbFolder] => /thumbs/ 
11
[galleryid] => 7 
12
[pid] => 101 
13
[filename] => wd-logo.jpg 
14
[description] => 
15
[alttext] => letter head 1 
16
[imagedate] => 2013-02-13 01:09:14 
17
[exclude] => 0 
18
[thumbcode] => 
19
[name] => logos 
20
[path] => wp-content/gallery/logos
21
[title] =>Logos
22
[pageid] => 0 
23
[previewpic] => 101 
24
[permalink] => 
25
[image_slug] => wd-logo 
26
[post_id] => 0 
27
[sortorder] => 0 
28
[meta_data] =>  Array ( 
29
    [0] => 
30
    [aperture] => 
31
    [credit] => 
32
    [camera] => 
33
    [*caption] => 
34
    [created_timestamp] =>  
35
    [copyright] => 
36
    [focal_length] => 
37
    [iso] => 
38
    [shutter_speed] => 
39
    [flash] => 
40
    [title] => letter head 1 
41
    [keywords] => 
42
    [width] => 800 
43
    [height] => 244 
44
    [saved] => 1 
45
    [thumbnail] => Array( 
46
        [width] => 150 
47
        [height] => 150 
48
    ) 
49
) 
50
[gid] => 7 
51
[slug] => logos 
52
[galdesc] => 
53
[author] => 1 
54
[imageHTML] =>
55
[hidden] => 
56
[style] => 
57
[pidlink] => /directory/?pid=101 
58
[url] => http://yoursite.com/wp-content/gallery/logos/wd-logo.jpg 
59
[thumbnailURL] => http://yoursite.com/wp-content/gallery/logos/thumbs/thumbs_wd-logo.jpg 
60
[size] => width="150" height="150" 
61
 =>   
62
[ngg_custom_fields] => Array ( ) ) 
63

Posted in NextGen Gallery, Plugins, Wordpress 3 | 1 Comment

Nextgen Custom Fields in Template

Use Nextgen Custom Fields data in the template files.

Image data:

 PHP |  copy code |? 
1
echo $image->ngg_custom_fields["Your Field Name Here"];

Gallery data:

 PHP |  copy code |? 
1
echo nggcf_get_gallery_field($gallery->ID, "My Gallery Field 
2
Name Here");

Posted in NextGen Gallery | Leave a comment

NextGen Gallery Template Files

Template files can be saved in /wp-content/themes/YOUR-THEME/nggallery and called in the short tag parameters.

 HTML |  copy code |? 
1
[nggallery  id=1 template=niceone]

This will use template file gallery-niceone.php in your theme folder.

It will default to gallery.php if template file is not found.

Similarly for albums and image browsers:

 HTML |  copy code |? 
1
[album id=3 template=coolone]

 HTML |  copy code |? 
1
[imagebrowser id=6 template=bigwindow]

Posted in NextGen Gallery, Wordpress 3 | Leave a comment

NextGen Gallery Admin Styles

For example, to style table column widths in the gallery admin page edit

 HTML |  copy code |? 
1
wp-content/plugins/nextgen-gallery/admin/css/nggadmin.css

Download copy to local in case of plugin upgrade

Posted in NextGen Gallery, Plugins, Wordpress 3 | Leave a comment

NextGen Gallery Short Tags

Gallery
[nggallery id=x]

Slideshow
[slideshow id=x w=width h=height]

Album
[album id=x template=extend/compact]

Single Image
[singlepic id=x w=width h=height float=left/right]

Image Browser
[imagebrowser id=x]

Posted in NextGen Gallery | Leave a comment