![]() |
|
General Navigation - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: General Navigation (/thread-2716.html) Pages:
1
2
|
General Navigation - PierreSnugg - 21-04-2008 Hy, i´m new here and i try to figure out how i can realize my theme: A) Start Page
B) Album view So here comes my problem: I wanted this navigation from the startpage (div class=albumdesc) to look exactly he same in the albumview, so the user always can jump directly from the actual album to others without going back to home and than.... Should look like this: Index.php (Navigation): Album 1 case: Album 3 selected (-->go to Image.php) Image.php (Navigation): Album 1 //Pierre you can check here: General Navigation - acrylian - 21-04-2008 I assume you use zenphoto 1.1.5? There is already a function within the zp-core/plugins folder that you could use for your naviagtion. See the file For a random image there is a function http://www.zenphoto.org/documentation/zenphoto/_template-functions.php.html#functionprintRandomImages General Navigation - PierreSnugg - 21-04-2008 Hy Acrylian, what i did was the following: i copied the argument: to my index file and than at one point i wrote the argument. But i get an error that says: Warning: Missing argument 1 for printalbummenu() in /homepages/xx/xxx/xxx/xx/xx/zp-core/plugins/print_album_menu.php on line 63 while my file ends at line 53? did i import the plugin wrongly? General Navigation - PierreSnugg - 21-04-2008 Ah, ok, found my mistake: the "printAlbumMenu" Argument needs some classes to be defined, like: I got it now, thanx a lot! General Navigation - acrylian - 21-04-2008 The classes are not necesssary if you don't want to use any specific, only the both first parameters("list","count") are mandatory. General Navigation - PierreSnugg - 21-04-2008 i tried that redirect function at top of album.php from simmons, but didn´t work. $_zp_current_image->getImageLink instead of: $_zp_current_image->getAlbumLink how can i do that within the print_album_menu.php? General Navigation - PierreSnugg - 21-04-2008 I tried to work on the css style for the menu, but it seems, that it no worky. i wrote: so by default css is menu, and active it has menuactive style. my css: .menu { } .menuactive { And it looks like "menu" tries to catch normal a:hover etc styles do i have to work on this css_id? General Navigation - acrylian - 21-04-2008
To get the first image in an album use this: General Navigation - PierreSnugg - 21-04-2008 ah, where has this "$firstimage = $_zp_current_album->getImages();" to go? and sorry, but what you meen with .menu plus .menu lu and .menu li lu? should i just paste them in my css? the main and sub css part in the printAlbumMenu i get, but this.... sorry, i feel a bit stupid today (maby just´not today...) General Navigation - PierreSnugg - 21-04-2008 i decided to go like this: index.php should be main + menu album. php should be the main file to use. i want to have there the main image and under it the thumbnails that switch the main image above. i also found this description: "I actually wrote a function for that because I needed it too. My PHP isn't all that great, but this works for me: ` function getAlbumFirstImageURL() { global $_zp_current_album, $_zp_current_image; $firstimage = $_zp_current_album->getImage(0); if (in_context(ZP_IMAGE) && $_zp_current_image->getAlbumPage() > 1) { // Link to the page the current image belongs to. return rewrite_path("/" . urlencode($_zp_current_album->name) . "/page/" . $_zp_current_image->getAlbumPage(), "/index.php?album=" . urlencode($_zp_current_album->name) . "&page=" . $_zp_current_image->getAlbumPage()); } else { return rewrite_path("/" . urlencode($_zp_current_album->name) . "/" . urlencode($firstimage->getFileName()), "/index.php?album=" . urlencode($_zp_current_album->name) . "&image=" . urlencode($firstimage->getFileName())); } } Put this in your template-functions.php and use to access it. ` but maybe because this is a newer version of zenphoto it doesn´t work is there something i could use different? General Navigation - acrylian - 21-04-2008 You original idea would work well, we basically use that on our themes page on zenphoto.org. The link you posted only works on image.php. And your new The thing is I was mistaken (happens even to devs...:-)) "$firstimage = $_zp_current_album->getImages();" of course can't work within the menu, that only works in the album loop... printAlbumMenu would have to be extended with a db query to get the first image of all albums. This is not that easy if you don't have the knowledge. Telling you how to do this would basically mean doing it for you and I just don't have the time right now. Your css above does not include any hover setup, so the hover of the general css is taken. You would have to define your own for the menu. Take a look at this theme, the menu is used and styled there: General Navigation - PierreSnugg - 21-04-2008 my index looks like this: ` General Navigation - PierreSnugg - 21-04-2008 and my album: `
General Navigation - PierreSnugg - 21-04-2008 So what would you sa is the best way to do it? i coudn´t find any template to realize this. for me it is the easyest way of to think how such a photo-thing should work. i don´t get the regular way of going from a index to an album and than to the image....maybe zenphoto is the wrong thing? hope not, cause it really looks nice to me! General Navigation - PierreSnugg - 21-04-2008 and as far i see, the problem is the following: case 1: i try to get a loop done in the album.php which allows me to hav thumbnails and the big image, while the thumbnails are looping back to the album.php and changing the actual big image without going to the image.php or case2: jumping directly from index.php to the image.php without showing the album.php correct? the problem in case2 i see is, that my menu is dead, the problem in case 1 is, that i have to write a function that loops the image request from the thumbnails to a big image in the album.php... General Navigation - PierreSnugg - 21-04-2008 and my image.php, where i exactly hav what i want to see: `
General Navigation - acrylian - 21-04-2008 Ok, it was easier so I hacked a little. This modification assumes that you use mod_rewrite and the modrewrite suffix ".php" for you image page:
And voila the menu leads to the first image. General Navigation - PierreSnugg - 21-04-2008 ok, i paste: `// album query
and than there are two .$albumlinkpath.$folder[$top]. statments ` / link either for list or jump menu display
".$strong_start."."]".htmlspecialchars($title[$top])."".$strong_end.$imagecount[$top];
----> i changed to
".$strong_start."."/".$firstimage[$top].".php]".htmlspecialchars($title[$top])."".$strong_end.$imagecount[$top];
---->which gives me an error: General Navigation - PierreSnugg - 21-04-2008 and strange, i tried to the garland theme and also over the first menu point "id='album_menu'" is showing up. could there be a problem with my print_album_menu.php" file or with the sql data base? General Navigation - acrylian - 21-04-2008 The show within the query needs to be set within backticks (can't post theme because the forum uses them for code display). Then it should work. Garland uses it's own older version of the print album menu as far as I remember. |