I have php-nuke 7.4 and Gallery v1.4.4-pl2 and try the
block-NG-NewestPhoto.php for 1.4.3 pl2
I am logged in and I acces the gallerymodule i get this error message in the block:
Fatal error: Cannot redeclare editfield() (previously declared in h:\appserv\www\site\modules\gallery\util.php:27) in H:\appserv\www\site\modules\gallery\util.php on line 27
line 27:
function editField($album, $field, $link=null) {
(This is what I got:
Module gallery with permission that only logged in members has access to the gallery module.
Then I have Album1 with 2 sub albums. Album1 has no photos in it at all. )
Someone has any solution?
Posts: 2322
You can't simply include the random block. You MUST include it via http, or you will see this issue.
See the sticky post for instructions.
Posts: 6
I have made a new block and write this
include("http://127.0.0.1/site/modules.php?op=modload&name=gallery&file=index&include=block-random.php");
But I only see this text in the block and no photo.
When I open this in Internet explorer, It shows me the right photo and albumname/link.
http://127.0.0.1/site/modules.php?op=modload&name=gallery&file=index&include=block-random.php
What should I do to get it work in the block?
Posts: 2322
Beridox, did you create a text block, or a php block?
It needs to be a PHP block.
Posts: 6
Were do I choose that?
This is what I do (it’s in Swedish but I hope you will see anyway)
And I create the block. Were do I see what kind of block it is?
Thanks for helping me.
[img]http://www.algonet.se/~anneli_h/if/block1.jpg[/img]
Posts: 6
Now I made a block-test.php file and put it in the block folder:
and i create a new block and choose this one, but the block take foreverer to make and then i cant acces the page at all.
Is it this way to do it?
And it look like this:
<?php
if (eregi("block-test.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
include("http://127.0.0.1/site/modules.php?op=modload&name=gallery&file=index&include=block-
random.php");
?>
and i get this error code in the block:
Fatal error: Maximum execution time of 30 seconds exceeded in http://127.0.0.1/site/modules.php?op=modload&name=gallery&file=index&include=block-random.php on line 10
Posts: 6
Ok one more try.
I created a block-test.php file and put it in blocks folder.
Created a block called Galleri and choose the block-test.php
It look like this:
<?php
include("http://127.0.0.1/site/modules.php?op=modload&name=gallery&file=index&include=block-random.php");
?>
And this is what it shows me:
[img]http://www.algonet.se/~anneli_h/if/block2.jpg[/img]
In the right block (Galleri) it says "No content in this block"
and over that in the forums block the block-test.php is showing.
I need more help :/