I notice that the Floatrix theme 1.0.6 seems to have a few issues.
- the doctype requires a xmlns="http://www.w3.org/1999/xhtml" on the root element, as in in: <html xmlns="http://www.w3.org/1999/xhtml">
- the code for the sidebar incorrectly puts block-level elements (<div>s) inside an inline element (the <a>). This is easy enough to work around, by making those <div>s into <span>s, and giving them a display: block in CSS
- there's quite a bit of invalid code in the CSS
I'd like to amend theme.tpl so that the sidebar is only available to logged-in users - how could I do this?
Finally, I haven't worked out how to put PHP into a .tpl file - is this possible?
Thanks,
Daniele
Posts: 16504
That's fixed in the next version 1.0.7 that will be released with G2 2.3 next week.
For the other 2 points, please feel free to fix them and post your fixes here. I would install 2.3 next week and work of off 1.0.7 though since there are a few minor changes.
For the sidebar, add the bolded part
To add php code to smarty templates you can use the PHP tags
{php}
your php code here
{/php}
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 4
Thanks for such a quick reply. I'll post any fixes here once I'm satisfied they work as expected.
Daniele
Posts: 4
Here's another query about this theme.
Is it possible to have the description:
appear when the child is an album, but not when it's a photo?
Or similarly, independently control summaries for child albums and photos?
Thanks,
Daniele
Posts: 16504
Yes, take a look at album.tpl and find a line of code in there that says
for an example of how to decide if an item is an album.
Here's an example of how the class names are chosen for the thumbnails:
<div class="{if $child.canContainChildren}giAlbumCell gcBackground1{else}giItemCell{/if}"
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 4
Thank you once again - I hope you aren't getting sick of these...
Next question:
Is there some way I can make this generate only a previous and next, and not a first and last?
Daniele
Posts: 16504
It's much easier when you can point someone in a direction instead of having to spell everything out for them ;) Do no I don't mind you asking at all ;)
For the first/previous, there are a couple of ways you can go about that. If you look at the source of the page you'll actually see that is wrapped in a div with the class name first-and-previous so you can just choose to hide that with css or you can do some hacking on /modules/core/templates/blocks/Navigator.tpl
If you are using version 2.3 or when you upgrade to 2.3 you can actually store your modified core template changes like those to Navigator.tpl with your custom theme so everything can be wrapped in a nice little package instead of having to modify files all over G2.
See "Use a theme override" on this page: http://codex.gallery2.org/Gallery2:Editing_Templates
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here