How to use the block pncpg-random.php? How to use the block pncpg-random.php?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

How to use the block pncpg-random.php?

Started by lkcn, November 03, 2003, 08:08:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lkcn

I've installed CPG1.2 and pnCPG1.5.

I put the file in includes/blocks, then when I tried to add a new block, I got the following error.

QuoteFatal error: Cannot redeclare blocks_pncpg_display() (previously declared in /home/chinatra/public_html/post/includes/blocks/pncpg-random.php:17) in /home/chinatra/public_html/post/modules/pnCPG/pnblocks/pncpg-random.php on line 17

casNuy

Remove the block from the includes/block directory. It belongs only within the pnblocks directory of pnCPG.

You will the not have the error and the block will show up in the blocklist.

Cas

lkcn

I have got it worked as the way you suggested. Thanks!

I found the 'Last updated picture' has the problem that it won't lead to the correct image.

Anyway I only show a random image with javascript disabled. But sometimes it will show a blank image. When clicked, it leads to coppermine with the error message "The selected album/picture does not exist !" What could be the reason? Thanks.

lkcn

Sometimes the random image shown correctly, but when click the thumbnail, it leads to a error message "The selected album/picture does not exist !"

Link:
http://chinatraveltalk.com

casNuy

Checking that site out, i only get that message (as guest).
does this also occur with the java-script enabled ?
Have you setup specific permissions within Coppermine ?

Cas

lkcn

It is the same when javascript is enabled.

There are user galleries, some of which have viewing restriction. It appears that some photos in private albums turn up on the random block.

There are also admin uploaded public photos.

Errors happened in either case.

casNuy

you can restrict the photos just to the photos in the categories (admin section of block), does that help ?

Cas

lkcn

I've set 'Exclude user galleris' as y, but that didn't help.

lkcn

I've solved the problem by re-installing coppermine and pnCPG1.5.

Now I have the problem that thumbnails from the private albums (album set to be viewed by Me only) are displayed in the random picture block, although clicking that thumbnail leads to a error message saying album not found.

casNuy

In this version (as stated in the readme, if i am coirrect) not all permissions are obeyed properly. The only way to avoid this, is to set "Exclude user galleries" to "y".

Cas

Gloub

Is there a way to restrict the folders/albums using pncpg-random ? ie I don't want some folders to be used for the random photos.

Thanks

casNuy

Not at this moment in time, will see if I can build it in.

Cas

Gloub

Thanks that would be most useful.

Let me know if you need a tester.

Gloub