PmWiki | Skins? | Photo Gallery-Talk

« Return to PhotoGallery

Summary: Talk page for PhotoGallery.
Maintainer: DaveG
Categories: Skins

Use this page to report issues, ask questions, or make suggestions for future improvements. If you-d like to leave a quick thank you, or would like to leave a rating, please do that on the ratings page.

In order to keep things readable please:

Download link broken

25-Aug-2010 The download link to does not work.

DaveG 25-Aug-2010: Updated links in install instructions.

Scaling album thumbnail

SteP 30-May-2009: Very nice skin, Dave, the overall triad pmGallery, Gallery and PhotoGallery is very nice. Thank you. In my tests some album thumbnails look squeezed up vertically, you can see it also in the Moon album thumbnail on How can I get the correct proportions for all album thumbnails?

DaveG 30-May-2009: By squeezed vertically I think you're talking about the vertical staggering of the thumbnails. Very odd -- that wasn't there when I deployed it, and I haven't changed it since. It seems to be adding a top margin. clearly a bug -- I'll take look.

SteP 31-May-2009: I don't know about the vertical staggering, I was referring to the thumbnail being scaled unproportionally. Look at the moon thumbnail and notice that it's too narrow, compare it with the actual picture. I think skin.css needs changing, I commented out one line to work-around this issue:

  .album .thumb img {
	/*width: 85px;*/
	height: 85px;

but it's a quick fix, because this way the right margins of multiple album thumbnails may not align vertically. Possibly the 85x85 box should be a container for a centered thumbnail?

DaveG 1-Jun-2009: Ah, sorry, I mis-read your initial post, and didn't realize you meant the main album cover (you did say that though). Actually the effect you see is by design -- I wanted everything on the main page to be the same size, which means some aren't proportional. I'll make a note of the feature request, but to be honest I think I prefer the equal size -- perhaps I'll add parameter for proportional or static sizing on albums.

SteP 2-Jun-2009: Come to think of it, I agree with your preference for the equal size. Perhaps the recipe page should state that main album cover thumbs should be square for best results (and 85x85 px for no dumbscaling). Also it would be nice if (:album:) supported attached images, so an author could upload Attach: album covers.

DaveG 2-Jun-2009: Page updated. Actually you should be able to use images attached and uploaded by simply using the image URL as the album cover -- untested, but that should work.

SteP 5-Jun-2009: Yes, using the attached image URL as the album cover works fine. But I prefer to rely on PmWiki to resolve where that attached image is stored. So here's a mini recipe to do just that - EemeliAro wrote the php code in response to a message I posted. Add this code to your local config:

$MarkupExpr['attachurl'] = 'ME_attachurl($pagename,$args[0])';
function ME_attachurl( $pagename, $path ) {
  global $UploadFileFmt, $UploadUrlFmt,
    $UploadPrefixFmt, $EnableDirectDownload;
  if (preg_match('!^(.*)/([^/]+)$!', $path, $match)) {
    $pagename = MakePageName($pagename, $match[1]);
    $path = $match[2];
  $upname = MakeUploadName($pagename,$path);
  return PUE(FmtPageName(IsEnabled($EnableDirectDownload, 1)
      ? "$UploadUrlFmt$UploadPrefixFmt/$upname"
      : "{\$PageUrl}?action=download&upname=$upname",

then attach all cover images to a separate page, for instance Album.Album-covers, upload the images, and use the uploaded images as album covers in your main album page, i.e., Album.Album, as shown in the following example:
page Album.Album-covers


page Album.Album

(:comment attach cover images to page Album-covers:)
(:album link="Album1" thumb="{(attachurl Album-covers/cover1.jpg)}" title="title1" desc="description":)
(:album link="Album2" thumb="{(attachurl Album-covers/cover2.jpg)}" title="title2" desc="description":)

Homepage link

Reazul Hasan?, 4-Feb-2009: Dave, I also think there is another issue with the skin. If you go to my site and click on the title it takes you to pmwiki.php but if you click "create reazulhasan.home" it takes you to a page that already has text in it. In other words pmwiki.php is not redirecting to the default group.

DaveG 4-Feb-2009: Not quite sure I understand you. Clicking the "Out of Focus" main header takes me to the homepage. Clicking the first link in the breadcrumb labeled "reazulhasan" takes me to Reazulhasan.Home which has your contact info. The way I envisioned the breadcrumb links being used was to navigate through the galleries. Thus, clicking the "reazulhasan" link would redirect to the main gallery. So, on my site, in config.php, I've set the following, to ensure that when the main title is clicked, we end up on Home/Gallery as well:

   And then populated Home/Gallery with the code to produce the album covers.

Where are the Login/Logout Links?

Reazul Hasan, 2-Feb-2009: This is a very neat layout and something I was looking for. However, after installing the skin I am unable to find an edit or login link. I can edit files by manually modifying the address bar to get into edit mode. It would be convenient to have an edit link or a login link to edit the page. Am I doing something wrong?

DaveG 2-Feb-2009: There should be a login link in the bottom right if you are not logged in. If you're logged in you'll see the 'action' bar with Edit, View, etc.

Reazul Hasan, 3-Feb-2009: I don't see the login link (you seem to have it in your picture). I don't see the action bar with Edit, View, etc. either. You can check it out for yourself by visiting my site.. Maybe there is some setting in config.php that I am missing?

DaveG 3-Feb-2009: Interesting. The template uses (:if ( !auth edit ) :) to determine whether to show the login link. Things to check might be:
  1. What version of PmWiki are you using. Not sure this will make a different, but it might.
  2. Do you have some other authentication cookbook enabled? I wrote the skin with the default authentication mechanism in place, so other cookbooks might not work the same way. Let me know, and it should be possible to work with the Cookbook.
  3. It's possible you're already logged in, and it's trying to show the action page. Can you check that either {$Group}.PageActions exists, or that {$SiteGroup}.PageActions exists. If one or the other isn't in wiki.d, then Site.PageActions should be in wikilib.d (it is on a standard install). The best way to check is to add those page names to your main url -- that way we can see if any rewrite rules or privileges might be preventing PmWiki from seeing the page.

Reazul Hasan, 3-Feb-2009: Dave, thanks for keeping up with this. I am using the version 2.1.27 of PmWiki. I think it's quite up to date. I do not have any other cookbook enabled other than Galleria and pmgallery as per the requirements of photogallery. Now I am logged in and it might be trying to show the action page. I don't have any PageAction files in wiki.d but I do have a Site.PageActions page in wikilib.d. When I put it in my URL it does show up.

DaveG, 4-Feb-2009: Okay, I think the problem is your version. If you check the source HTML produced at your site, you'll see down the bottom that the <!--markup: directive used in the skin to show the login link is not being processed; ie, the code is still in the source file, unparsed. I don't see anything in the release notes to indicate that there was a change between 2.1.27 and 2.2.0 that would do this, but that's my guess.

J. Photographer, 8-Dec-2010: Dave, I'm using 2.2.17 of the Photogallery skin and would like to modify the credits at the bottom of the template to better flow with my website. Looking at the source code, the credits and links are the last bit of parsed php. Can you direct me to the file and location of the credits?

Talk page for PhotoGallery (users).

Original design adapted by David Gilbert, powered by PmWiki