Setting Up Gallery 2 and Lightbox JS

I have done some research on integrating Lightbox 2 for my Gallery 2 set up.  I come across the tutorial on Gallery’s website but it over-complicates thing a little.  Although their instruction is the proper way to do the integration, an average person is going to have a hard time to follow their instruction.  You have to hack the code anyway, why not following an easier hack.  Here is my little instruction:

  • Download and extract lightbox in your web root folder assuming all necessary files are extracted under the /lightbox directory.
  • Modify theme.tpl (/themes/<your theme>/templates/local/theme.tpl) by including lightbox right before </head>.  It should look something like this:
  • <link rel="stylesheet" type="text/css" href="/lightbox/css/lightbox.css"/>
    <link rel="stylesheet" type="text/css" href="/lightbox/css/lightbox.css"/> <script type="text/javascript" src="/lightbox/js/prototype.js"></script> <script type="text/javascript" src="/lightbox/js/lightbox.js"></script> <script type="text/javascript" src="/lightbox/js/scriptaculous.js?load=effects,builder"></script> {* end stylesheet and javascript for Lightbox JS *} </head>
  • Modify album.tpl (/themes/<your theme>/templates/local/album.tpl) by adding “rel=lightbox[photos]” to each photo.  It should look something like this:
    <a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$child.id`"}"
    title="{$child.title|markup}"
    pageLink="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}"
    rel="lightbox[photos]" >
  • Note that there may be multiple places where you need to modify depending on your theme.  You may want to search for keywords such as “child.id” that’s within the anchor tag (“<a href=…”).
  • Also note that if the /thems/<your theme>/templates/local directory does not exist, you will have to create it and copy both theme.tpl and album.tpl over.

Voila! Your Lightbox integration is done.

54 Responses to “Setting Up Gallery 2 and Lightbox JS”

  1. 0AchFrNet Says:

    Acheter Propecia propecia.e-monsite.com en France

  2. Rainbowdo33o Says:

    http://www.automaxplus.pl/2015/12/15/wybor-butli
    Purchasing a new or used vehicle could be a difficult approach if you do not know what you will be performing. By teaching yourself about car buying before you go to the car dealership, you possibly can make issues much easier for yourself. The following tips can help your upcoming buying vacation be pleasant.

    Constantly provide a auto mechanic alongside when shopping for a brand new vehicle. Auto retailers are popular for marketing lemons and you may not wish to be their next sufferer. Whenever you can not get a auto mechanic to consider cars along with you, at least make certain you have him evaluate your last choice prior to buying it.

    Know your limitations. Before you begin purchasing for your forthcoming car or vehicle, determine how much you can afford to pay, and follow it. Don’t forget about to include interest in your estimations. You are likely to pay out close to twenty percent as a payment in advance at the same time, so be prepared.

    Prior to going to a car dealership, know which kind of car you would like. Study all you possibilities before purchasing so that you can figure out what works well with your finances and household needs. Seek information to discover how much you should pay for a potential auto.

    Before you sign any contract make time to study each and every line, for example the small print. If you have nearly anything listed that you do not understand, do not signal before you have an respond to which you recognize. Unsavory salesmen may use a binding agreement to put a lot of charges that have been not reviewed.

    In the event you keep the preceding suggestions at heart the very next time that you go purchasing a vehicle, you may be more prone to get a better deal. Purchasing a car lacks to be a headaches. Only use the ideas using this write-up and you can obtain the auto you need with a very good price.

  3. benjaminee60 Says:

    Gay porn website
    http://gayfiles.xblog.in/?info-raymundo
    gay texting gay wedding cards meet gays gay images gays online

  4. Jamespef Says:

    как носить джинсы с ботинками женщинам фото – модные цвета лака для ногтей в 2017 году, какой увлажнитель воздуха выбрать для квартиры.

Leave a Reply