Tag: seo
Got around to changing my journal's style. I'd gotten used to the Forest Green theme, which is based on the Bloggish layout, but in it only 470 pixels are allotted for the content, which is clearly not enough to comfortably place photos and read the friends feed.
I dug into Custom CSS and changed the size of the text field to 640 in width, and also increased the width of the sidebar, making the overall content width 1000. At the same time I bumped up the font sizes by a couple of points, since pixels on monitors keep getting smaller. For search engine optimization I moved the sidebar to the right, so the entry's content comes first and gets indexed, only it looks somewhat unusual, I'll have to move it back to the left and do an SEO layout; on my own site I managed to do this, and it'll work out in the blog too, a pity I don't know CSS well.
After changing the width of the main blocks, the blog's header turned out ugly, with a narrow image in it. I decided to put a more eye-pleasing picture in the header; a part of a photo of a white lion, which I mentioned here, worked well for this. After replacing the header, a change to the blog's color scheme followed; I picked the new colors with the eyedropper from the header. I didn't completely abandon the old greenish ones — I used them for the link colors. I decided not to change the background image either — it doesn't get in the way much and an alternative hasn't come to mind yet.
On the Joomla! sites I build, I use the JoomGallery component — even though it's not MVC, it's quite feature-rich, easy to configure, and works well. Until recently, I couldn't get SEF URLs working for the gallery.
Because of this, I used the gallery on sites without pretty links, and there was no need to optimize the gallery anyway — the main emphasis was always placed on the texts. During the week I found some free time and was in the mood to figure out router.php. In the end, I changed the logic for finding the matching category in the address a bit: I made it read from the database the whole list of category or photo names that match, then transliterated each name and compared it to the one I needed, and that way I could determine the right category or photo IDs. For this I wrote an additional function and added it after the modified database queries — yes, such a script consumes a bit more resources and takes longer to run, but for Joomla that's not a problem, if you compare it with the voraciousness of the core and the rest of the stuff.
When I copied the resulting router.php to a multilingual site running JoomFish, another problem turned up. The database queries already returned translated category and photo names, so they couldn't be matched against the names from the links. But this was solved easily. Since JoomFish overrides the database-access methods, in the script itself I added arguments to the queries of these methods indicating that translation isn't needed, and in the end everything worked. It may not be pretty that on the English version of the site the paths contain Russian transliterated names, but it's unlikely this can be fixed easily, plus in the other components with paths it's the same way.
You can download the new router.php for JoomGallery via this link. The script's code isn't perfect, but it works.
You can see the results of its work here: http://mebelok.com.ua/gallery (the first site I tested it on; since the photo names repeat, I added the ID to the addresses, so the matching photos are looked up not by name); http://bizukov.org.ua/ru/photo (a multilingual site, the IDs aren't output to the photo addresses, so you can fully verify how it works).