New version of random block for PN

joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Thu, 2004-01-22 19:24

Today I released a new version (0.55) of my modified random block for PN. The actual changes you can read in the read.me-File or in the block source code.

Give it a try. You can get it at here.

Joerg

 
cstenson

Joined: 2003-09-14
Posts: 13
Posted: Fri, 2004-01-30 15:56

Thanks for this wonderfull update! I really was hoping to soon be able to remove the album title and caption from the block without having to go into the source code.

However, I have found an issues that somewhat bugs me. I have my random photo block in a PN environment and it's set to the "Use photo not thumb" feature. It works like a charm until it grabs an album thumb in which case it displays nothing. I get the browser error message, "about:blank."

Any ideas how I can get rid of this? Please let me know and thanks again for the update!

-Stenz

 
kzo

Joined: 2004-02-02
Posts: 9
Posted: Mon, 2004-02-02 18:19

Hey, this is great, thanks for making it. I'm actually using it for a header/news image on my page. I just modified the random selection of the photo so it displays the latest image from a 'front page photo' album that i created. Pretty cool. I was just wondering if you know of an easy way to make it display 2 images side by side? other than just making 2 blocks. Thanks.

 
Shadeaux

Joined: 2003-11-25
Posts: 12
Posted: Wed, 2004-02-04 01:14

Hi, I cant seem to get this to work in stand alone mode.
I don't get a error when i call the script, i simply get a blank webpage.

I think it could be that most of the scripts here assume that the /albums/ dir is within the /gallery/ dir but mine is in the same level ( /path/gallery/ AND /path/albums/ )

Also, i would like for this to display a random Album Highlight instead of an arbitrary image. And for the link from that image to open the Album instead of just the image itself.

Can anyone help me with this? I would be eternally gratefully. =]

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Wed, 2004-02-04 19:52

If you use my version of the block (the one announced above), I have to say that it's only build to run as a block in PostNuke environment. It's not build to run stand alone with gallery. Sorry.

Joerg

 
cstenson

Joined: 2003-09-14
Posts: 13
Posted: Mon, 2004-02-09 04:29

anyone got a soulution to my issue yet?? If there is one, or you need me to give an example of it, please let me know.

stenz

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Wed, 2004-02-11 16:50

cstenson, have you tried Bharat's original random block? It is for standalone or PostNuke. It may not work for PN any longer... well maybe not even standalone for that matter. Photo Block can be used as a Nuke block or standalone, and obeys your permission settings.

 
PaulR

Joined: 2004-02-11
Posts: 11
Posted: Fri, 2004-02-13 20:40

joerg,

Thanks for the great block! Just what I was looking for.

Easy to setup and works very well.

 
PaulR

Joined: 2004-02-11
Posts: 11
Posted: Sun, 2004-02-15 03:59

The one issue I seem to be having is recognition of new albums.

When I installed the random photo block, I only had one album with 33 pictures. Everything seemed to work fine.

Today, I added another album with 76 pictures, but the random block does not pick this up and the new album does not appear in the drop-down list in the block preferences.

Am I doing something wrong?

 
PaulR

Joined: 2004-02-11
Posts: 11
Posted: Sun, 2004-02-15 04:13

No matter what I do (delete and re-add the block), the new album is not listed as a choice from where to pull the images from.

 
PaulR

Joined: 2004-02-11
Posts: 11
Posted: Sun, 2004-02-15 04:21

Looks like I answered my own question.

Good or bad, I dumped the block-random.cache file in my /albums directory and it seemed to do the trick.

Hope I don't miss it.

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Mon, 2004-02-16 20:31

Yes that would do the trick. The cache gets rebuilt by default every 24 hours I think.

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Tue, 2004-02-17 15:24

Maybe I'll supply a switch in the block configuration to rebuild the cache instantly on demand. So that one not have to dump the block-random.cache.

Joerg

 
EnumaElis

Joined: 2004-02-20
Posts: 4
Posted: Fri, 2004-02-20 15:01

I installed your block on my site and i got these messages:

Quote:
Warning: pnvarprepforstore(config/md-config.php): failed to open stream: No such file or directory in /home/aipgreyg/public_html/includes/pnAPI.php on line 793

Warning: pnvarprepforstore(): Failed opening 'config/md-config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aipgreyg/public_html/includes/pnAPI.php on line 793

Warning: pnvarprepforstore(config/md-config.php): failed to open stream: No such file or directory in /home/aipgreyg/public_html/includes/pnAPI.php on line 793

Warning: pnvarprepforstore(): Failed opening 'config/md-config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aipgreyg/public_html/includes/pnAPI.php on line 793

You can see it on www.aipi.info as well. It does it ONLY on the homepage (that is where the block is displayed)

I cannot solve this problem. Any help??

The CMS is MDPro and almost any module/block working with PN works as well with MDPro

Tx

EnumaElis

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Fri, 2004-02-20 16:00

Did you figure out what fixed this error? I don't see this. Do you need to be logged in?

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Sat, 2004-02-21 09:13

@EnumaElis:
I don't know MDPro but my latest version is strictly build after the template-block supplied with PN. It's not completly ready but you can get it here.

If you get the same error, you have to figure out at your own, sorry. Cause I have not the time to test the block on different CMS than PN at the moment.

I hope that helps a bit.

Jörg

 
EnumaElis

Joined: 2004-02-20
Posts: 4
Posted: Sat, 2004-02-21 12:09

These errors (actually they're warnings) appears both for logged and anonymous users and only in the homepage. If I disactivate the block the warnings disappear.

EnumaElis

 
setagllib

Joined: 2003-06-21
Posts: 18
Posted: Fri, 2004-02-27 23:41

Somehow the save aspect ratio doesnt work, am i the only one with this problem?

And when I use the photo instead of thum i get the following error:

Warning: Division by zero in .../gallery/pnblocks/gallery_random.php on line 443

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Sat, 2004-02-28 08:12

@setagllib:

I'll look after it, be patient.

Which Version of the block are you actually using?

Joerg

 
geert.janssen

Joined: 2004-02-05
Posts: 13
Posted: Sun, 2004-02-29 09:53

Hi, by renaming the block-random.cache I receive 'failed to create stream' errors and not pictures showing up. How can I enforce the random block to recreate the cache file instantaneously?

Thanks, G

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Sun, 2004-02-29 10:06
geert.janssen wrote:
Hi, by renaming the block-random.cache I receive 'failed to create stream' errors and not pictures showing up. How can I enforce the random block to recreate the cache file instantaneously?

The best way to force a rebuild instantly is to delete or rename the file. That's what you did! I suppose there is a rights-problem. The web-server must be able to create a file in the album-dir. Which rights do you have on the album-dir?

Joerg

 
geert.janssen

Joined: 2004-02-05
Posts: 13
Posted: Sun, 2004-02-29 10:13

Hi, my album-dir has following rights:

drwxrwxrwx 27 ftp5307 psacln 832 Feb 29 09:51 albums

full access!

G

 
setagllib

Joined: 2003-06-21
Posts: 18
Posted: Tue, 2004-03-02 11:06

When I dump the block-random.cache a new one of zero bytes is made and the block shows no photos at all anymore :(

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Wed, 2004-03-03 22:33

setagllib, then you need to reload your page with the random block. This will cause it to rebuild the cache.

 
matsinet

Joined: 2002-07-24
Posts: 16
Posted: Thu, 2004-03-04 15:46

When I installed this block and then tried to added it, the add blocks page came up blank. Removing the block from the pnblocks directory of gallery fixes the issue with the block page, but I would still like to use the random image block.

I am using postnuke 7.2.6, Random Block .55 and Gallery 1.4.2.

Any help would be appreciated.

 
Lawman-TRG

Joined: 2003-09-02
Posts: 7
Posted: Tue, 2004-03-09 21:25

I get the old 500 server error when I try to install the block. I too am using PN 7.2.6 and Gallery 1.4.2

For some reason it won't work atall on my setup.

Rich

 
matsinet

Joined: 2002-07-24
Posts: 16
Posted: Tue, 2004-03-09 22:28

I deleted my cache file out of the album directory and the block install just fine and no blank screen when I went to add it.

 
discodave

Joined: 2004-02-07
Posts: 4
Posted: Mon, 2004-03-15 07:03

This was exaclty what i have been looking for. Great work here!

 
cstenson

Joined: 2003-09-14
Posts: 13
Posted: Wed, 2004-03-17 18:01

So is there no way to make this script not show album thumbnails and only show the photos within the albums?

 
MethodX

Joined: 2004-04-01
Posts: 7
Posted: Thu, 2004-04-01 08:17

Postnuke 0.7.2.6-Phoenix
Gallery v1.4.3-RC1

It doesn't work. I have never been able to get the random block working. I untarred/gzipped the file and put it in a "pnblocks" directory underneath the gallery directory. I get this error when I try to add a new block:

Fatal error: Call to a member function on a non-object in /home/httpd/mysite/PostNuke-0.726/html/modules/gallery/init.php on line 428

I can't even add a new block... I don't even get to see the list of blocks available... right now I can't add a new block for anything unless I delete gallery_random.php from the pnblocks directory.

What's going on?

Line 428 of said file reads:

$gallery->user = $gallery->userDB->getEverybody();

 
MethodX

Joined: 2004-04-01
Posts: 7
Posted: Thu, 2004-04-01 08:32
 
FellatedOne

Joined: 2003-12-15
Posts: 13
Posted: Wed, 2004-10-13 09:15

I am having almost the opposite problem I guess. I deleted some old albums and block-random is still pulling them up as option to be viewed, just no thumbnail obviously. I deleted my block-random items from the albums driectory, yet it still tries to pull the old albums....

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Wed, 2004-10-13 15:21
FellatedOne wrote:
I am having almost the opposite problem I guess. I deleted some old albums and block-random is still pulling them up as option to be viewed, just no thumbnail obviously. I deleted my block-random items from the albums driectory, yet it still tries to pull the old albums....

Maybe you use the database enabled version. Simply go to the block configuration dialog of PN and edit the random block config. You have to change nothing there just open and close the block random config.

I hope that helps.

Jörg

 
FellatedOne

Joined: 2003-12-15
Posts: 13
Posted: Wed, 2004-10-13 22:16

Sorry... I forgot to mention that I am not using PostNuke or any other portal software for that matter. I am using the StandAlone version.