limit random block to one sub-album not viewable by public

WebMistressVenus
WebMistressVenus's picture

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?

 
vguile

Joined: 2003-02-17
Posts: 7
Posted: Fri, 2003-03-21 16:36

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.

 
vguile

Joined: 2003-02-17
Posts: 7
Posted: Fri, 2003-03-21 16:39

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.

 
WebMistressVenus
WebMistressVenus's picture

Joined: 2003-03-01
Posts: 16
Posted: Tue, 2003-03-25 23:14

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???

 
vguile

Joined: 2003-02-17
Posts: 7
Posted: Fri, 2003-03-28 19:34

I'm using the PostNuke module. I'll download the standalone and see if I can find the equivalent . . .

 
vguile

Joined: 2003-02-17
Posts: 7
Posted: Fri, 2003-03-28 19:56

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).