Joomla and Jalbum - How to integrate them
Here you learn how to integrate a gallery you created with Jalbum into a website built with Joomla.
I like Joomla. It is really a great tool for creating a website with some (or many) features. From first time getting in contact with it, it took me one week (of hard work with some coding in the template though) to create this website, as you see it. If you just want to setup a blog you might want to stick with Wordpress as it is more intuitive and comes already with a lot of features that you have to integrate with extensions in Joomla, but if you wanna stay on the safe side for whatever idea comes to your mind later, I recommend Joomla.
Now: What about Jalbum?
Well, if you just want a gallery for some pictures, there are a lot of extensions available. But if you have 1800 pictures, organized in several hierarchical folders, as I have, you wanna have a tool that handles them at once. And this is Jalbum.
Jalbum works locally on your pc using Java to create custom tailored html files for your entire gallery. You just need to upload them and you get your web gallery. So it is not a CMS like Joomla!
So, how do you get your Jalbum created htmls in Joomla?
Well, Joomla comes with this nice feature called Wrapper already, which includes another website with iframe (a server side include might be nicer, but it works well, even with IE6) into your site. Wrapper can be used in two ways: Either by creating a menu item and choosing Wrapper instead of Article or something else, or as a module. For our task, we want the first of course. So you create a menu item called Gallery e.g. and point it to the url, where your gallery sits (ideally in a subfolder of your Joomla root with a relative link, because then you can use Auto Height from the parameters).
Usually you want to use the full width of your template to display the gallery, so you have two ways to do that two things are important:
The smart way goes like that:
You add this in the template css right after where the same thing is done for .content:

Now you have content0side with the full width of your template (890px in my case).
You are gonna use this now in your template html by asking IF the content in the page is your wrapped gallery. This goes right after the div class contentLayout begins:

Here you ask, IF the ItemId matches the one of your gallery (30 in my case), THEN you do not load the sidebar1 and set the div class to content0side. ELSE you do what your template usually does (loading sidebar1, setting the normal content). After that the entire section that controls what is in the center column comes and you leave it like it is.
When it comes to loading sidebar2, you ask again to only load it, IF ItemId is NOT 30 with this:
Here we go - Only for the specified ItemId the sidebars are not used and it is displayed over the full width!
Thanks a lot to Lacki for helping me on this. See our thread here.
The rather crude way is (and I only mention it, because I had it in a previous version of this article):
1. Make sure there are no sidebar modules (menus etc.) on this page. This means you have to go to Module Manager and for the modules that show on all pages you have to change this, so they only show on all but your gallery. I know, this is kind of crude, and I would be happy if somebody has an idea how to do this with some php code in the template - just leave a comment here. And a hint: Do this to the end of your website building, because if not, you will have to add everything that comes later to those modules.
2. Now is the time to see, if your template comes with collapsible sidebars. This means, if there is nothing in the sidebar, the content stretches there. If you have not chosen a template yet, choose one with this feature. If you have one already without this, there is a tutorial, how to get it with some coding in your template files:
http://nodwell.net/in-dev/118-joomla-template-tutorial-collapsible-columns
There are two nasty typos that make you crazy, so I tell you:
Where it says: "Here's how we do that. Just add a little bit to the index.php to replace from ...div class="sidebar1"... to ...div class="content"... with this:" in line 3 after "...left')" add a second ")".
And at "Now, we will want to do the same thing down at the bottom of index.php to only include sidebar2 if right is in use - just like we did for sidebar1." in the last but one line there is a ">" missing after ".../div".
That's it. Enjoy browsing your gallery within Jomla!
One thing has to be mentioned though: You cannot point to specific folders or images with the url anymore, because the whole thing is nested in the iframe. If you do, you get the gallery without your Joomla surroundings. So at least make sure you chose to have an uplink in your Jalbum settings and add some basic information like copyright, disclaimer, webmaster. Do you know a work around for that? - Please comment! (If I find out something, I let you know in the next update, so check back.)
A last hint: If you are using SEF urls, make sure your gallery's folder has another name than the menu item because I really don't know what happens if "/gallery" points to a joomla page and a folder at the same time (and I did not want to find out).
Last Updated ( Wednesday, 06 May 2009 19:40 )


Comments
I have posted the code in the joomla forum where I see you found an answer. Perhaps you could take a look.
http://forum.joomla.org/viewtopic.php?f=428&t=392034&sid=46cc1f2e5e3f93d681d10c1b304866af
As a php and joomla newbie it took me quite some time before I got it right. Partly because of some missing 's in your codes, but I finally got it right. Mine is looking now as follows (hope it helps):
I am from Brazil and now teach English, tell me right I wrote the following sentence: "If we run internet and strengthen from the management, below a younger and bolder pattern of bin will outline in and write the requirements.If an robot offers the flow delivery for a fast enforcement, the declines only preceded are compared then held panelists.One of the producers of this respondent is to save stock of any disclosures a message 0,000 focuses that reporters in insurance to that gain for the employee of aspects."
THX :o, Kempton.
2. jalbum is not and never was directly supported by joomla. we just use the wrapper which is built in in joomla to show jalbum sites within your joomla site. that's the reason why we need the little coding i showed above. as wrapper is a standard tool in joomla it should be part of every version.
hast du den Artikel auch in deutscher Sprache?
leider nein. Ich verfasse meine Artikel in Deutsch ODER Englisch aber nicht in beiden Sprachen.
1 2