Simple Theme [g1]
paour
Joined: 2002-08-14
Posts: 1479 |
Posted: Wed, 2005-08-31 09:29 | |||
Hi, I made a simple theme for G2, which I called G1, because it is simple and kind of reminiscent of G1 in that there is no sidebar and the top of the page is relatively uncluttered. It works well in modern browsers, but it will need help before it works on the likes of IE 6. Feel free to modify it and post it back here. It is public domain.
|
||||
Posts: 4
I am using the latest g2 installation (unpossible)... I installed your theme. It works well on the front end, but now I can't access the site admin! I don't know what to do now. Any suggestions? I need to get there, or I'm in trouble. PLEASE HELP
Posts: 16504
You should still have a Site Admin link in the upper-right corner of your pages. Do you get any error message?
FAQ: What information is required when I ask for help in the forums?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 4
I have the link but after clicking, my page shows no admin options whatsoever! Crazy. I have several gallery installs and tweaked with a lot and I've never seen such a thing. I just want to get back to the admin and dump this theme. The site is
http://brownfilms.com
Posts: 16504
I see you're using an extremely old version of G2, pre B4, probably some nightly shortly after they added the new theme system in. Please upgrade to G2 final release. Backup your data, db and install first!
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 4
Is there a streamlined way to backup the gallery and then reupload after an update?
Posts: 16504
Streamlined? Sot really. Here's what you need to backup. FAQ: How do I backup G2?
If all goes smoothly, as it should, you won't need to restore any files. The backup is just a precaution.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
thank you, a theme that doesn't suck.
Posts: 168
Hi Paour -- Thank you IMMENSELY for this G1 theme which I just installed. I really do prefer G1's interface of NOT having a sidebar which in my view clutters things up too much.
I wonder if you might add a configuration option for choosing the default <<item action>> for a photo page. It's currently 'View Slideshow' but I'd prefer it to be 'Add Comment'. My users love to Add Comments but I'm afraid they won't know to click the <<item action>> dropdown to do so. (By the way, I like your style of placing a default item to the left of the dropdown rather than having the dropdown be 'open' which again can clutter things up.)
Thanks much for all your work.
Gallery version = 2.0.2 core 1.0.0.2
PHP version = 4.4.2-dev apache
Webserver = Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.2-dev FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7g
Database = mysql 4.0.25-standard
Toolkits = ArchiveUpload, Exif, ImageMagick, NetPBM, Gd
Operating system = Linux tnx.opensourcehost.com 2.6.14.2-ts.grl.mh.ht #1 SMP Mon Nov 14 00:12:50 EST 2005 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Posts: 1479
Updated version, compatible with G2.1.
--
Gallery Remote developer
Posts: 168
Hi Paour -- did you mean that you have a version of the G1 theme that will be compatible with a future G2.1 but not with the current 2.0.2? Thanks much for your help.
Posts: 5
awesome theme! I just switched my gallery over to it. This looks ideal for embedding into another page as well..
http://moe-online.us
Posts: 1479
rick7: yes, starting today the daily snapshots and the code in CVS can be considered 2.1 betas and use a different API, which makes it necessary to update themes and modules.
gmoe: thanks for the praise. Let me know if you fix issues with it.
--
Gallery Remote developer
Posts: 168
Thanks, Paour. I'm wondering if this new version addresses my 12/26 note above: a configuration option for choosing the link on the photo page that appears to the left of the <<item action>> dropdown in the upper right. It's currently 'View Slideshow' but I'd like to set it to 'Add Comment'. Thanks.
Posts: 1479
rick7: it doesn't, sorry. You can edit the theme file yourself (it should be easy). If I get some time, I may make this configurable, but don't hold your breath...
--
Gallery Remote developer
Posts: 19
I'm trying to install this in my gallery, and it's giving me a problem when I go to set it as the default. At the top of the page it gives me this message
"Warning: Invalid argument supplied for foreach() in opt/lampp/htdocs/gallery/modules/core/classes/GalleryTheme.class on line 730" (http://img66.imageshack.us/img66/5223/g19da.jpg)
That error stays in the header, and it doesn't seem to change from the 'classic' theme that I am using in the interrim. The text size is also about size 24 font on everything. Any ideas?
Here's my specs if it's helpful:
http://usacomp.zapto.org/gallery/main.php Is my site if that helps.
Posts: 1479
Can you post the couple of lines before and after 730 in that file on your system?
--
Gallery Remote developer
Posts: 19
Yeah, no problem. 730 bolded
/* Unserialize our blocks and preload them if necessary */ $platform = $gallery->getPlatform(); $g2Base = dirname(dirname(dirname(dirname(__FILE__)))); list ($ret, $pluginStatus) = GalleryCoreApi::fetchPluginStatus('module'); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } foreach (array('sidebarBlocks', 'albumBlocks', 'photoBlocks') as $blockKey) { if (!isset($theme['params'][$blockKey])) { continue; } $theme['params'][$blockKey] = unserialize($theme['params'][$blockKey]); $seen = array(); foreach ($theme['params'][$blockKey] as $block) { $seen[$block[0]][] = $block[1]; } foreach ($seen as $key => $blockParams) { list ($module, $file) = explode('.', $key); if (empty($pluginStatus[$module]['active'])) { continue; } $path = "modules/$module/Preloads.inc"; if ($platform->file_exists("$g2Base/$path")) { GalleryCoreApi::relativeRequireOnce($path); $className = "${module}Preloads"; $instance = new $className; $ret = $instance->preload($template, $file, $blockParams); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } } } }
Posts: 1479
I guess you can surround this foreach with an !empty test:
--
Gallery Remote developer
Posts: 19
Well, that seemed to work at first, then it gave me this error (same style and location): "Warning: Division by zero in /opt/lampp/htdocs/gallery/themes/g1/theme.inc on line 107"
/* Add in our extra stuff */ $theme =& $template->getVariableByReference('theme'); $theme['columnWidthPct'] = floor(100 / $params['columns']);
Also giving me this error in the footer, repeated (ie http://img78.imageshack.us/img78/3179/g1s8do.jpg):
"Warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/gallery/modules/core/Callbacks.inc on line 62"
case 'ShouldShowEmergencyEditItemLink': $block['core']['ShouldShowEmergencyEditItemLink'] = false; if (isset($params['permissions']['core_edit'])) { $block['core']['ShouldShowEmergencyEditItemLink'] = true; foreach (array('checkSidebarBlocks' => 'sidebarBlocks', 'checkAlbumBlocks' => 'albumBlocks', 'checkPhotoBlocks' => 'photoBlocks') as $key => $value) { if (!empty($params[$key])) { foreach ($theme['params'][$value] as $entry) { if ($entry[0] == 'core.ItemLinks') { $block['core']['ShouldShowEmergencyEditItemLink'] = false; break 2; } } } } } return GalleryStatus::success();
Thank you so very much for your assistance in this.
Posts: 1479
I think something is wrong with the theme data. Could you disable, then uninstall the theme, then reinstall and enable it again?
--
Gallery Remote developer
Posts: 19
Yeah, I can do that. Gotta run to the bookstore and get some of my books for the semester, so it might be a little later today.
Posts: 19
Actually I found a spot of time around my morning coffee, so I went ahead and did that, and it now appears to be working. The only problem is that the "Warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/gallery/modules/core/Callbacks.inc on line 62" is still there as before.
Posts: 1479
usacomp2k3: can you change the line
if (!empty($params[$key])) {
toif (!empty($params[$key]) && !empty($theme['params'][$value])) {
--
Gallery Remote developer
Posts: 19
That appears to have done the trick. Thank you very much. I love the theme and am glad to be able to use it, now that it's working 8)
Posts: 1479
Glad this fixed the problem. I don't really know what caused this behavior, but slightly more robust code always helps.
--
Gallery Remote developer
Posts: 6
I had exactly the same problem.
To sum up how to fix it:
First edit gallery/modules/core/classes/GalleryTheme.class on line 730
to
Then edit gallery/modules/core/Callbacks.inc on line 62
if (!empty($params[$key])) {
to
if (!empty($params[$key]) && !empty($theme['params'][$value])) {
Posts: 6
I don't see a link to download the g2.1 version of the g1 theme.
The theme workes with core api 7.1 and the thema api 2.2 ?
Posts: 1479
diedvdyk: for some reason the file was no longer showing. It's again available here: http://gallery.menalto.com/node/35498#comment-161035
--
Gallery Remote developer
Posts: 9
How do I make the top gallery to list 1 album thumbnail per row just like the demo page (http://www.paour.com/gallery2/v/photolog) but the albums/sub-albums below are in matrix thumbnail view ?
When I tried to install your theme, the top gallery are viewed in matrix style.
Posts: 19
If you click on edit from the top gallery, and then the theme tab, you should be able to define one row, and then have it just not apply changes to folders beneath it.
Posts: 19
If you click on edit from the top gallery, and then the theme tab, you should be able to define one row, and then have it just not apply changes to folders beneath it.
Posts: 1
For some reason, I can't get the information to go to the right side of the image on the images in the g1 theme.
I am on v2.02 of gallery and really wanted the old g1 format back. I unziped the g1 into the themes directory and installed it. When I select it though, all of the album information goes under the image, not to the right. So I selected all of the options and said to put them on the sidebar, but there is no change. No matter what I select in blocks to show in sidebar, nothing changes on the screen. I have tried selecting all to sidebar and none to sidebar. I have used IE6, Firefox, flushed my cache files, etc, but I cannot get the information to display to the right of the image. I uninstalled g1 and re-installed it also, but no affect.
You can see what I mean at www.pollock-family.org/gallery2.
Any ideas on what I can try?
TIA
Norm
Posts: 168
NPollock -- I'm with you. It was very hard to see that with the arrival of G2 the G1 look was gone which I and many of my viewers loved. After a couple of months with G2 I've eventually learned to genuine appreciate other themes (I think Hybrid is fantastic), but in my heart whenever I see an old G1 album I feel a certain longing for the good ol' days. If I knew more programming, I'd create a theme that looked like the original G1.
From what I've discovered during my experimentations, using the G1 theme as your top-level theme doesn't really give you the G1 top-level look. As you say, the album text displays below the highlight, not at all like the original G1 which has it on the right. If you're making these changes at the top-level album (Gallery's main page), I don't think setting the sidebar options has any effect (though I'm not sure about this). Try using the Classic theme instead. It's actually more similar to the G1 top-level album look, with the summary text on the right. But you still see some things that are unfamiliar, such as the <<album actions>> dropdown, the frame around the highlight, etc.
And whereas with the real G1 you could have a long album summary to the right on that main page, in G2's Classic theme you're limited to 252 characters or something like that. (Though you can have a longer album description on the actual album page.)
I also kind of miss the original Gallery 1.4 green color, which I don't see available in any of the G2 themes.
Yep, these are all painful changes...
Posts: 9
Is it possible to do this programmatically. Something like:
if (top gallery) do this
else do that
Posts: 7
I really like this theme! It's just what I have been looking for. One thing: What file/line do I need to edit if I don't want the "View Slideshow" link? It is there whether or not I activate the Slideshow/Slideshow Applet module.
Thank you so much!
I'm using Gallery 2.0.2
Posts: 1479
tlingit54: you can edit the g1/templates/photo.tpl and g1/templates/album.tpl.
Is anyone interested in collaborating to make the theme more customizable?
--
Gallery Remote developer
Posts: 19
I would, except I know nothing about programming, sorry (nor would I have much time to dedicate to it).
Posts: 19
I just upgraded to 2.1, and the theme won't let me run
Any ideas?
Posts: 8601
the 2.1 compatible version is attached above..
Posts: 11
Great theme! Has this issue been addressed in the latest?
http://gallery.menalto.com/node/36803?highlight=GalleryTheme.class%2Con%2Cline%2C747
Posts: 168
Paour -- a few months ago you asked if anyone is interested in collaborating to make the theme more customizable. I would love to, but I know nothing about Smarty programming. I'm a moderate-level SQL programmer and might be able to pick it up. Could I create the time to do it? Not sure, but possibly. The interest is there; I love a lot of G2 but genuinely miss the display that we had in G1. And I have a few more ideas for G1 that I like to see implemented.
One thing that's been on my mind: an option to NOT display the Date: and Views: under each photo on the album page.
Let's talk.
Posts: 1479
rick7, I'd gladly welcome changes you make to the theme. You have all the pieces in the zip. Feel free to submit patches to me via this thread.
--
Gallery Remote developer
Posts: 4
How do I get the theme to look like yours where the sub-albums are listed?
Mine: http://nmphotonet.temp.powweb.com/gallery
Yours: http://www.paour.com/gallery2/v/photolog
Posts: 1479
That album on my Gallery is using the Classic theme now. I'll update the demo URL, thanks for pointing it out...
--
Gallery Remote developer
Posts: 4
that is the classic theme? how do i get the subalbums to show like that?
Posts: 4
Ah, I see what you mean. Is it hard to get the simplicity of your theme with the album formatting of the Classic theme and merge the two?
An example is my friends Gallery1 theme... http://imagesbyk2.com/gallery/
Posts: 1479
It's not too hard to modify the Classic theme to look like the G1 theme. The reverse would mean adding some of Classic's logic to G1, making it like a super-theme, which is not what the G2 theme intends.
--
Gallery Remote developer
Posts: 4
So in a sense, take the Classic theme and delete all the "rubbish"?
Posts: 168
Can someone suggest how to remove the 'Make Highlight' option that I see is now available beneath each thumbnail? Thanks.