TinyPortal
Development => Block Codes => Topic started by: Rus on December 25, 2010, 12:06:04 AM
I found this code in another thread but couldn't find anything about limiting the pics to one album vs all albums. Anyone know how to limit this to one album.
function show_aeva_media_block()
{
global $sourcedir;
// Load the language file
loadLanguage('Aeva');
// Grab the file.
if (file_exists($sourcedir . '/Aeva-Subs.php'))
require_once($sourcedir . '/Aeva-Subs.php');
// If it doesn't exist, tell them this and stop running.
else
{
echo '<b>You don\'t have Aeva installed! Unable to continue!</b>';
return;
}
// Use aeva functions to show the media.
echo aeva_listItems(aeva_getMediaItems(0, 1, 'RAND()'), false, 1);
}
// Run the function.;
show_aeva_media_block();
Have no idea how Aeva works. You'll need to post the code for the function it calls for those of us who don't have that mod to see if it's even possible to do what you're asking.
Post the code from these two functions.
aeva_listItems() and aeva_getMediaItems()
Thanks for the offer. I got a reply on SMF to use this code instead, replacing all of the code above:
global $sourcedir;
loadLanguage('Aeva');
require_once($sourcedir . '/Aeva-Subs.php');
echo aeva_listItems(aeva_getMediaItems(0, 1, 'RAND()', true, array(85)), true, 'center', 0);
Where 85 is the specific album number