Hi everyone,
I need to slightly change the album.php page for a specific album (to add the description of the present image.)
I know that a theme can be affected to this album, but as this theme is barely the same as the current theme, it seems a bit heavy to duplicate it, just for a tiny modification. (Later improvements of the theme will have to be done twice etc ... boring.)
I haven't found in zp any equivalent of the child theme feature (wordpress) so I wonder if there is a more elegant way to get the job done.
Thank's for any advice !
Comments
Meanwhile you will have to do this using the object model directly (see the tutorial for that and if you haven't already the theming tutorial as well). Check for the album name with a if/else or a switch() clause and then do your special stuff.
Well, I'm going to wait for the next version. The plugin you mention sounds great ...
(which one by the way ? ... in one month ? in six ? ... when should it be expected approximately ?)
... but as I'm writing these words I think "try to do the php trick yourself ... don't be such a lazy slug ..."
Being a little less stupid every day is good.
Well, let's go. Testing the name of the current album does not sound too difficult.
But testing if it is contained by an album named "shop" for example ... I don't know which function I could use ...
Any clue ?
Thanks and bye ...
(Of course, this is only a projection.)
`
$foldernames = explode('/',$_zp_current_album->name);
if (array_search('shop',$foldernames) !== false)) {there is 'shop' somewhere in the album name;}
`
Waou ! ... 1.4.0 is near !
...
in the mean time, I found :
`
<?php
$url = $_zp_current_album->getAlbumLink( );
$pos = strpos($url, "shop");
if ($pos)
{
?>
*you're in shop*
<?php
}
?>
`
... which proves that even a total zero in php can move its little ass and find a solution ... (by the way it seems to work ...)
As you guess I don't do this to display *you're in shop* ...
but instead, the description of the current image (we are in album.php)
The next code (from image.php) does not work in album.php :
`
... and here ... I have no clue ...
Thanks !!
For the `printImageDesc()` , I use it with the zpgalleriffic theme, in between the image and the thumbs.
Do you know if there is a way to make the image display be identified as a "current image" ?
I guess it's a specific zpgalleriffic problem ... isn't it ?
Suddently I get pessimistic ... ( ....
Otherwise, maybe the theme author will step in and help.
Thanks for for your constantly excellent support ...