Random block when you have more than one gallery.

Imoq
Imoq's picture

Joined: 2004-09-08
Posts: 25
Posted: Mon, 2004-11-15 17:04

PostNuke 0.750
gallery 1.4.4 embbeded.

I had to split my gallery into six "smaller" ones, since the main gallery had more than 20,000 pictures and with a few visitors it started to be slow as hell. So, after splitting it, it seems to be a lot better now.

However, I can't use the random-block anymore, since when I activate it, it complains that some functions are already defined and I think that is because there are several copies of the galleries. It probably is a PostNuke specific stuff, but I wonder if somebody knows how to bypass it.

Thank you all for your help.

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Mon, 2004-11-15 21:08

Make sure that you're including the random block using http://, and not /path/to/file ... if you use a path, then you will see the duplicate warnings. If you include via http, you won't.

 
Imoq
Imoq's picture

Joined: 2004-09-08
Posts: 25
Posted: Mon, 2004-11-15 22:22

Interesting...

I am adding it via Admin -> Blocks -> New Block -> gallery/gallery Random Picture

How should I add it, instead? For your answer, I bet i should add a PHP block, probably, but I wouldn't know further than that.

Thanks for your answer :)

 
Imoq
Imoq's picture

Joined: 2004-09-08
Posts: 25
Posted: Mon, 2004-11-15 22:42

I did the following:

Admin -> Blocks -> New Block -> Core/PHP Script

and then just added in Content:

include('http://www.misite.com/modules.php?op=modload&name=gallery&file=index&include=block-random.php');

But it doesn't display anything :(

What is the right way to do it?

Thank you! :)

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Mon, 2004-11-15 22:52
Quote:
Not Found
The requested URL /modules.php was not found on this server.

 
Imoq
Imoq's picture

Joined: 2004-09-08
Posts: 25
Posted: Mon, 2004-11-15 23:01

Nevermind, it was my mistake.

I didn't have a high enough memory_limit value in my php.ini. I had to raise it up to 40M (!) sot the random picture would work.

Thank you, signe :)

 
Imoq
Imoq's picture

Joined: 2004-09-08
Posts: 25
Posted: Mon, 2004-11-15 23:02
signe wrote:
Quote:
Not Found
The requested URL /modules.php was not found on this server.

Oh, sorry, "misite.com" isn't my real site, I just had to hid the name because there are some "adult pictures" in the actual site and I didn't want an underage for mistake could see those.

Thanks for your help, anyway :)