Hi guys,
i am trying to create a search button that will retun results contained only in the current album (and its sub albums).
I use this variable of the printSearchForm function:
`array $album_list: optional array of albums to search`
I try to create my array (I'm a zero in php, I only use AS3 ...)
But I don't know what to give to the fuction ( album id, name ?) and how to give it (php syntax, ZP ignorance ...)
See my last attempt
` <div id="jump-search" class="clearfix">
<?php
$album_list = getAllSubAlbumIDs(); // THIS IS THE CRITICAL LINE !!!
?>
<?php if (getOption('Allow_search')) { printSearchForm( '','searchform','',gettext('SEARCH'),"$_zp_themeroot/images/search-drop.png",NULL,$album_list ); } ?>
<?php if (function_exists('printAlbumMenu')) { printAlbumMenu('jump'); } ?>
</div>`
Thanks for your help !
bye
Comments
Please do note, however, that `printSearchForm()` will be changing in the next release. After 1.3.2, the format of `$album_list` will change to be a multi-dimensional array, so you should pass the list in the form of:
`array('albums' => $album_list);`
So how can I create the $album_list array to contain the name of the current album and its subalums ?
`
$album_list = $_zp_current_album->getAlbums();
$album_list[] = $_zp_current_album->name;
if (getOption('Allow_search')) { printSearchForm( '','searchform','',gettext('SEARCH'),"$_zp_themeroot/images/search-drop.png",NULL,$album_list ); }
`