limit random block to one sub-album not viewable by public
WebMistressVenus
Joined: 2003-03-01
Posts: 16 |
Posted: Thu, 2003-03-20 19:00 |
I'd like to limit random block to one sub-album not viewable by the public how do I do this? |
|
Posts: 7
Try this:
Around line 323, find the function chooseAlbum() and underneath it add:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
$album = new Album();
$album->load('YourAlbumName');
return $album;
</TD></TR></TABLE><!-- BBCode End -->
And replace "YourAlbumName" with the name of your album. This is the name used in the url, not the title.
Posts: 7
By the way, I tested this and it works, but I didn't test the permissions. I don't know what will happen if the person who is logged in doesn't have permissions to view the album.
Posts: 16
hi, I don't have 323 lines on my random block - I use the stand alone which has only 198 lines, what are you using???
Posts: 7
I'm using the PostNuke module. I'll download the standalone and see if I can find the equivalent . . .
Posts: 7
Where is the standalone version? I can't find if ?!?!
In any case, look for the chooseAlbum() function and add the lines after that (assuming the standalone version has this function).