=== WPG2 - WordPress / Gallery2 Integration === Contributors: ozgreg, capt_kirk, Donate link: http://gallery.menalto.com/donate Tags: gallery2, wpg2, photos, photo albums, images, video Requires at least: 2.1.0 Tested up to: 2.2 Stable tag: 2.13 WPG2 is a Wordpress Plug-in that embeds Gallery2 within Wordpress to share photos, videos and any other Gallery2 content seamlessly into Wordpress. == Description == WPG2 is a Wordpress Plug-in that embeds Gallery2 within Wordpress to share photos, videos and any other Gallery2 content seamlessly into the Wordpress Sidebar and Blog entries. Stable versions are WPG2 is 2.0 for wordpress 2.0, released on March 27, 2006 and WPG2 2.13 for Wordpress 2.1 Released in 22nd of May, 2007. In final development version 2.2 which will add new midsized image features (released in Gallery 2.2), lightbox, and widgets support. ###WPG2 Features### * Gallery 2 Images, Videos, Albums (displays the Album Highlight Image) can be displayed in Blog Entries * Random, Recent, Daily, Weekly, Popular Images, Albums can be displayed as image blocks in the Wordpress Sidebar * Management of Gallery2 users, secured by Wordpress User Roles and Capabilities * Automatic logging in of Wordpress Users into Gallery2 * Displaying Gallery2 Output within a Wordpress Page == Installation == ###File Installation### 1. Unzip the files. 2. FTP the contents of the "/wpg2/" directory to a new folder called /wpg2/ (in lowercase) in your WordPress plugins directory, /wordpress/wp-content/plugins/. 3. Move the file "wp-gallery2.php" from the /wpg2/root/ directory to your wordpress root directory, the directory that contains wp-config.php. 4. Activate & Validate the WPG2 plugin (See below). ###Requirements### 1. To use the "WPG2" plugin, you must have Wordpress & Gallery2 installed and properly configured 2. Running at least Wordpress 2.1 and Gallery2 2.1 3. Wordpress & Gallery2 may be on different subdomains but NOT on different servers. 4. Wordpress & Gallery2 should be installed on the same database but can be different databases 5. Only one WordPress Blog tied to one Gallery2 Gallery * Unless you only have one identical user on multiple blogs, tying multiple blogs to one gallery will cause user errors because there is no way to currently distinguish one blog's users from another blog's users within Gallery2. 6. PHP memory limit of 16MB or better. 7. Browser that supports Javascript 8. Gallery2 Imageblock and ImageFrame Plugins installed & Activated. ###Upgrading### NOTE: If you are upgrading from any WPG2 version deactivate WPG2 on the WordPress Plugins Management Panel, prior to upgrading. * If you are upgrading from WPG2 version 1.0, delete all of the files in the wp-content/plugins/wp-gallery2/ directory. * If you are upgrading from WPG2 version 2.0, delete all of the files in the wp-includes/js/tinymce/plugins/g2image/ directory. == Getting Started == ###Activation## Activate WPG2 in the WordPress Plugins Management Panel. ###Validatation### * You will now have a "WPG2" options tab on the main WordPress Admin Menu Bar. * Select it. The first tab is a WPG2 submenu tab. * Enter your Gallery2 URL in the "Auto Configuration of Embedded Paths - Gallery2 URL" text field and press the "Auto Configure" button. This should result in a valid setup. * If you have any errors, follow the directions in the error message to resolve any issues. If you cannot get the auto configuration to work, enter the path information manually in the "Manually Configure/Adjust Embedded Paths" section. Guidance on each field is provided immediately below the field. This will happen in the rare case of using Gallery2 on a different subdomain on a clustered server arrangement where the computer hosting your site has a different IP address than the IP used in the HTTP request. ###Adding Styles to Wordpress Stylesheets### If you want to use the built-in alignment options, you'll need to add these four classes to your CSS. You can also add up to four custom classes to your CSS and add to the Custom Classes options on the WPG2 Image Options admin tab. Custom classes will be available in the alignment selector. `.g2image_normal` `{` `margin: 4px;` `}` `.g2image_float_left` `{` `float: left;` `clear: left;` `margin: 4px;` `}` `.g2image_float_right` `{` `float: right;` `clear: right;` `margin: 4px;` `}` `.g2image_centered` `{` `display: block;` `margin-left: auto;` `margin-right: auto;` `text-align: center;` `}` *Note: The alignment classes only apply to WPG2ID/WPG2 tags and HTML thumbnails, not text links. ###Verify Gallery2 User Account Setup### * Once WPG2 is validated, there will be a "Gallery2 Users" tab under the WordPress "Users" tab. * Verify that all of the users who should have Gallery2 Admin privileges through the embedded page (wp-gallery2.php) are in the list of Gallery2 Admin Users. * Verify that any other users who should be logged in as a Gallery2 user (but not admin) through the embedded page are in the list of WordPress users without Gallery2 admin accounts. * Any Wordpress users who do not have a corresponding Gallery2 account will appear in the list of WordPress users without Gallery2 user accounts. These lists will only appear if there is one or more user in them. * See the online documentation and the WPG2 support forum for more information. ###Additional Language Support### * Version 2.1 shipped with support for English (en) and Chinese Traditional (zh_TW) for the WPG2 admin tabs and English (en), Chinese Traditional (zh_TW), Italian (it), and German (de, and de_DE) for the G2Image popup windows. Check the WPG2 support forum and the G2Image homepage for more translations. * WPG2 Admin Tabs: If you use poEdit to translate /wpg2/locale/wpg2.pot into your language's wpg2-xx.po and wpg2-xx.mo files, you can use them by placing them in the /locale/ folder. They must have the same encoding and name as the WordPress locale file as set by WPLANG in wp-config.php. Example: The WordPress Traditional Chinese localization is encoded in UTF-8 and are named zh_TW.po and zh_TW.mo. The corresponding WPG2 localizations are also in UTF-8 and are named wpg2-zh_TW.po and wpg2-zh_TW.mo. * G2Image Pop-Up Windows: If you translate /g2image/langs/en.js and en.php, you can use them by changing the language setting editor_plugin.js. The main G2Image popup window will automatically use the language defined wp-config.php as WPLANG. The WPG2 and WPG2ID popup windows in the rich-text editor require a change to /g2image/editor_plugin.js. Add your language to the second line with a preceding comma after the "de_DE". For example Russian (ru_RU) is added here: + tinyMCE.importPluginLanguagePack('g2image', 'en, zh_TW, it, de, de_DE, ru_RU'); * Please share your translations by posting them on the WPG2 support forum. == Operation == 1. Images in blog posts: Use the "G2Image" button (if using TinyMCE, the rich-text editor) or the "WPG2" quicktag. tags provide the most flexibility because they will work if you move your images and/or albums around within the Gallery2 album structure. 2. Single images in the sidebar - ` ` ` ` 4. See the online documentation and the WPG2 support forum for more information. == Help == [Codex / Documentation](http://wpg2.galleryembedded.com) [Support Forums](http://wpg2.galleryembedded.com/forums/) [Support FAQ](http://wpg2.galleryembedded.com/index.php?title=Plug-in_FAQ) == Frequently Asked Questions == ####Q:Help! Fatal error: Call to a member function on a non-object in gallery/modules/rewrite/classes/RewriteApi.class#### If you are getting this error during WPG2 and if you have installed Gallery2 via the Fantastico script then you need to deactivate (you may have to activate the module first) the g2 rewrite module via Gallery2 Site Admin Panel. Unfortunately the Fantastico installation script leaves the Gallery2 rewrite module in a partly activated state thus causing this error. ####Q:How come my Validation Page Returns Blank?#### Validation requires a small Javascript to run. If you are running a javascript blocking product (Firefox NoScript or ZoneAlarm etc) then these products block this javascript from executing thus returning a blank validation page. Please make your site as SAFE so this script will run ####Q:How come the embedded page just returns blank?#### Most common cause of this problem is you do not have enough php memory allocated. Gallery2 requires 16MB to run and you can increase the memory allocation by adding the following line to your .htaccess in your wordpress directory `php_value memory_limit 16M` ####Q: Thumbnails return broken images#### If you have the Gallery2 rewrite module turned on then this is generally caused or incomplete / missing Gallery2 URL rewrites. You can try to configure the Gallery2 rewrites or turn them off. ####Q: Getting "do you want to do this" prompts when Validating#### The "do you want to do this" prompts are caused by some kind of Javascript blocker (No Script Plugin for Firefox, ZoneAlarm etc). Personally, I would never recommend installating a JS (javascript) blocker as many many sites need JS to function. Try, turning off your blocker and revalidate.. ####Q: How come I keep on getting "javascript errors" when clicking on write post when using the visual editor#### Unfortunately we really do not have the answer to this, for some hosting environments the g2image plugin just does not play well with Wordpress. You can disable the g2image button/plugin by selecting No G2image TinyMCE Button in the WPG2 plugin G2image Options == Screenshots == [Embedded Album](http://wpg2.galleryembedded.com/index.php?title=WPG2:Screenshots_of_a_Gallery2_Embedded_Page_1) [Gallery2 Main Page](http://wpg2.galleryembedded.com/index.php?title=WPG2:Screenshots_of_a_Gallery2_Embedded_Page_2) [Wordpress Page](http://wpg2.galleryembedded.com/index.php?title=WPG2:Screenshots_of_a_Gallery2_Embedded_Page_3) [Blog Entry](http://wpg2.galleryembedded.com/index.php?title=WPG2:Screenshots_of_a_Gallery2_Embedded_Page_4)