Return to "ValueApps - Collaboration"

Embedding the Photo Gallery in your Weblog


 
The topic of this article is not supported by our customer support department, however for your convenience we are providing this material to assist you in troubleshooting potential issues related to this topic.

OpenSourceHost provides the popular WPG2 plugin for the Weblog ValueApp to allow integration of the Gallery ValueApp right in to the style of your Weblog. With the WPG2 plugin, your Gallery images will appear inside of your Weblog theme and Weblog pages, giving you the ability to seamlessly display images from your photo gallery to your weblog viewers.

Activating the Embedded Gallery Plugin

To embed your Gallery into your Weblog design, you must first verify that you have installed the Weblog, Gallery, PHP, MySQL, and GraphicsMagick ValueApps. These packages can be installed by clicking the Install & Manage link on the left side of your VDS Manager.

To begin, simply log in to the Weblog administration area; you can log directly in by going to:
http://www.yoursitedomain.com/blog/wp-admin/
and entering the username ‘admin’ along with the password that you selected when Weblog was installed.

Once logged in, click on the Plugins tab at the top of the screen, then click Activate next to the WPG2 plugin in the list of available plugins. This will install and enable the embedded gallery on your website. You can verify that the WPG2 plugin is installed successfully by clicking on the WPG2 tab at the top of the screen; if no red error messages are shown, then you may begin using the embedded Gallery inside of your Weblog. If you do see red error messages, please submit a support ticket at https://my.opensourcehost.com/cm.html?stage=STSSubmitTicket so that our technicians can inspect your Weblog and Gallery configuration.

Integrating the Embedded Gallery into your Weblog

You can view the embedded Gallery by going to:
http://www.yoursitedomain.com/wp-gallery2.php
You may link to this URL or add it to your links section of your Blog sidebar by using the Links tab at the top of your Weblog admin area.

To improve the appearance of your embedded Gallery page, you may want to change the theme that is in use inside of the Gallery ValueApp; the “Syrix” and “WeblogEmbedded” themes are recommend for best results. You can change the theme in use on your Gallery by visiting the gallery at http://www.yoursitedomain.com/gallery; just click Site Admin in the top right and log in with the username ‘admin’ and the password you selected when installing your Gallery ValueApp. Now, click on Themes on the left side, and use the “Default Theme” drop-down to select a new theme. Please note that the theme you select will be displayed when accessing the gallery via the regular http://www.yoursitedomain.com/gallery/ URL as well as the gallery embedded in your Weblog, so you may want to select a theme that looks good in both locations.

The WPG2 plugin also provides a function that you can use to insert a small image preview into the sidebar of your weblog theme. If you are using one of the Custom Header themes provided by OpenSourceHost, this function is already installed. Users of the Wordpress-default themes, or third-party themes that you have installed yourself, will need to include the sidebar block in the code of the theme. You can modify the code for the theme that you are using by going to the Presentation tab at the top of the Weblog admin area, then click on the Theme Editor sub-tab. From here, select the “Sidebar” file to edit, and integrate the following code into your sidebar design:

<? if (function_exists(‘g2_sidebarimageblock’)) { ?>
<li><a href=“wp-gallery2.php”><h2>Photo Gallerylt;/h2></a>
<div align=“center”><?php print g2_sidebarimageblock(); ?></li>
<? } ?>

This code may need to be modified to match the style of your theme, but after saving your changes and refreshing your weblog page you will notice a new image block that appears in the sidebar.

Updating WPG2 Settings

Advanced users can modify the WPG2 settings and customize the behavior of the WPG2 plugin to better match custom themes or complex weblog setups. The following sub-tabs are available under the WPG2 section of the Weblog admin area:

  • WPG sub-tab: This tab allows you to modify where the WPG2 plugin attempts to locate your Gallery install. These settings should only be changed if you have moved or installed your own copy of Gallery2 and would like to embed it in your weblog.
  • Embedded Page Options sub-tab: This area allows you to edit the HTML that wraps the embedded Gallery output when visiting http://www.yoursitedomain.com/blog/wp-gallery2.php. You can use this section to modify the CSS style applied to your Gallery, which allows you to better integrate the gallery into your custom Weblog design.
  • Blog Images sub-tab: This section allows you to customize the display of images that are added to your blog posts directly from your photo gallery.
  • Sidebar Options and Sitebar Block Options sub-tabs: These two sections allow you to customize what type of images are displayed in the sidebar block on your Weblog (if you have added the appropriate PHP code listed above to your Weblog theme). These options include selecting what information should be displayed along side the thumbnail in the sidebar, the size of the thumbnail, and what images should be displayed – for example, you can select to display a random image, or your most recently uploaded image.

If you have any questions about customizing the WPG2 plugin or integration in to your custom Weblog theme, please submit a support ticket at https://my.opensourcehost.com/cm.html?stage=STSSubmitTicket.