Standalone

Agatka
Agatka's picture

Joined: 2002-10-19
Posts: 140
Posted: Thu, 2002-12-12 02:07

I have tried installing the script and it gives me the following error

Fatal error: Failed opening required 'modules/gallery/init.php' (include_path='') in /home/agatka/public_html/gallery/pnblocks/gallery_random.php on line 63

That's when my gallery is in a gallery folder but when I have it installed on a subdomain then I don't get anything :sad: Page not found.

Line 63
require_once($GALLERY_BASEDIR . "init.php");

But I am most interested installing it on the subdomain galeria.agatka.net.

Any help?

Thanks

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Thu, 2002-12-12 18:10

Hi,

the block you use is the one for postnuke integration. It is not for use as on a stand alone gallery installation (seems that you're not using PN). <!-- BBCode Start --><A HREF="http://gallery.sourceforge.net/docs.php?artid=23" TARGET="_blank">Here</A><!-- BBCode End --> you can get a version for a stand alone gallery!

Joerg

 
Agatka
Agatka's picture

Joined: 2002-10-19
Posts: 140
Posted: Sat, 2002-12-14 03:47

Guess I didn't read the entire thing, but now I got it to work but only the first time.

When I go to the block-random.php now I get the following error:

Warning: rand() expects parameter 2 to be long, string given in /home/agatka/public_html/galeria/block-random.php on line 138
ERROR: requested index [] out of bounds [5]
Fatal error: Call to a member function on a non-object in /home/agatka/public_html/galeria/classes/Album.php on line 570

Have no idea what it is. Can anyone help me?

Thanks

 
Agatka
Agatka's picture

Joined: 2002-10-19
Posts: 140
Posted: Wed, 2002-12-18 18:40

Just as a reminder ... that I still can't figure this out and am looking for help.

Thanks :smile:

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Sat, 2002-12-21 22:06

<!-- BBCode Start --><IMG SRC="http://www.beckettmw.com/images/rudolph.png"><!-- BBCode End -->

Hmm. That's strange.
First, make sure you've deleted albums/block-random.cache, then try reloading the page. Remember, you don't want to call the file itself. Make sure it's embedded in another PHP file.

I also found that I needed to set the $GALLERY_BASEDIR variable to the full path to my gallery immediately before calling block-random.php.

If you're still getting the problem, can you post the code you're using to include the file?

Thanks, and happy holidays,
-Beckett

 
sdimbert
sdimbert's picture

Joined: 2002-09-06
Posts: 17
Posted: Mon, 2002-12-23 17:38

I've got the Random_Block installed in my PostNuke site and I'm getting a similar error:

Quote:
Warning: rand() expects parameter 2 to be long, string given in /home/biavorg/public_html/modules/gallery/block-random.php on line 138
ERROR: requested index [] out of bounds [7]
Fatal error: Call to a member function on a non-object in /home/biavorg/public_html/modules/gallery/classes/Album.php on line 642

When I delete albums/block-random.cache, the block works fine. One time. Then I get the above error again. :sad:

The site is at http://www.biav.org/index.php

At first, the block didn't work at all, because I created it with an HTML Block. This time I used a PHP Block and it worked... sort of.

Any ideas, anyone?

 
sdimbert
sdimbert's picture

Joined: 2002-09-06
Posts: 17
Posted: Wed, 2002-12-25 07:35

Hello?

Anyone here?

 
dodofreak
dodofreak's picture

Joined: 2002-12-09
Posts: 75
Posted: Thu, 2002-12-26 17:03

I was able to run Random Block -- though I was having some intermittent problems with the cache file.

Within postnuke you should be creating the block with the gallery-random photo block category. Not HTML or php. I'm not sure if I understood with what you said, but let us know if you did create it with the correct block type.

Other than that, I'm not sure what else is wrong with the rand() function.

 
Agatka
Agatka's picture

Joined: 2002-10-19
Posts: 140
Posted: Thu, 2002-12-26 19:40

Hello everyone, I hope you had wonderfull time this holiday.

Beckett, I am getting the same error no matter how I include the file in my website. I've tried the php include and iframe and same thing.

When I changedthe base direcotry to the full path I am getting different error:

Fatal error: Call to undefined function: fs_file_exists() in /home/agatka/public_html/galeria/block-random.php on line 55

So really I don't know what to do with this.

Thanks

 
levigator

Joined: 2002-11-11
Posts: 6
Posted: Tue, 2003-02-18 00:29

I am getting a similar problem, here is my error message:

Quote:
Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0

Fatal error: Call to undefined function: fs_file_exists() in /home/flowbot/public_html/gallery/block-random.php on line 55

I'm using this line to call the script:

<?php include ("gallery/block-random.php"); ?>

and here's a link to the live page I am calling from:

http://www.flowbots.com/r-index.php

thx in advance!

 
levigator

Joined: 2002-11-11
Posts: 6
Posted: Thu, 2003-02-20 20:35

OK, from another thread joerg suggested using the newest init.php from the gallery cvs, so i did and both of the above errors went away. but now i've got a new one:

Quote:
Fatal error: Call to undefined function: checkifonlineoroffline() in /home/bort/public_html/printsite/html/modules/gallery/init.php on line 101

i get the same error in a postnuke block and in a stand alone instance.

 
Sir_Psycho

Joined: 2003-02-19
Posts: 3
Posted: Sat, 2003-02-22 13:55

Hi,

I had the same problem and it's really easy to fix

levigator: just uncomment the line at 101 and do this

Open block-random.php and change:

<!-- 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>function choosePhoto($album) {
global $cache;

$count = $cache[$album->fields["name"]];
if ($count == 0) {
// Shouldn't happen
return null;
} else if ($count == 1) {
$choose = 1;
} else {
$choose = rand(1,$count);

$wrap = 0;
if ($album->isHidden($choose)) {
$choose++;
if ($choose > $album->numPhotos(1)) {
$choose = 1;
$wrap++;

if ($wrap = 2) {
return null;
}
}
}
}

return $choose;
}</TD></TR></TABLE><!-- BBCode End -->

to:

<!-- 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>function choosePhoto($album) {
global $cache;

$count = $cache[$album->fields["name"]];
if ($count == 0) {
// Shouldn't happen
return null;
} else if ($count == 1) {
$choose = 1;
} else {
settype($count,"integer");
$choose = rand(1,$count);

$wrap = 0;
if ($album->isHidden($choose)) {
$choose++;
if ($choose > $album->numPhotos(1)) {
$choose = 1;
$wrap++;

if ($wrap = 2) {
return null;
}
}
}
}

return $choose;
}</TD></TR></TABLE><!-- BBCode End -->

And it should be fixed :smile:

 
levigator

Joined: 2002-11-11
Posts: 6
Posted: Sat, 2003-02-22 22:23

Thanks for the tip. I tried what you said, but now I get the following error. I should say that line 101 wasn't not commented so I took it out of use by commenting it.

Quote:
Warning: session_write_close() [function.session-write-close]: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in /home/bort/public_html/printsite/html/modules.php on line 69

any ideas? i'm using 1.3.1, maybe I should upgrade to 1.3.3?

 
Sir_Psycho

Joined: 2003-02-19
Posts: 3
Posted: Sun, 2003-02-23 16:41

you may try that, think it should work (or just upload your original init.php)

 
zorinena

Joined: 2003-03-28
Posts: 15
Posted: Sat, 2003-07-12 19:14

I have been trying to use all the solutions posting on the forum to get my random and resizing work.
I use a standalone system.
I wanted to use full photos as my thumbnails size was 100 and at my random size was 500 by 300 , so resizng the same would blur the images.
I then changed

echo "<center>"
."<a href=" .makeAlbumUrl($album->fields["name"], $id) ." $targetAttr>"
.$album->getThumbnailTag($index,$size)
."</a>";

-------------------------------------------------------------
to
-------------------------------------------------------------
echo "<center>"
."<a href=" .makeAlbumUrl($album->fields["name"], $id) ." $targetAttr>"
.$album->getPhotoTag($index,$size)
."</a>";

although i do get the images but the sizes are way too big.
Is there a way i can resize the whole image and not just the thumbnail

Thanks
Zor

Oh and the website url is

http://jitu.net/index2.php

 
zorinena

Joined: 2003-03-28
Posts: 15
Posted: Sat, 2003-07-12 19:15

I have been trying to use all the solutions posting on the forum to get my random and resizing work.
I use a standalone system.
I wanted to use full photos as my thumbnails size was 100 and at my random size was 500 by 300 , so resizng the same would blur the images.
I then changed

echo "<center>"
."<a href=" .makeAlbumUrl($album->fields["name"], $id) ." $targetAttr>"
.$album->getThumbnailTag($index,$size)
."</a>";

-------------------------------------------------------------
to
-------------------------------------------------------------
echo "<center>"
."<a href=" .makeAlbumUrl($album->fields["name"], $id) ." $targetAttr>"
.$album->getPhotoTag($index,$size)
."</a>";

although i do get the images but the sizes are way too big.
Is there a way i can resize the whole image and not just the thumbnail

Thanks
Zor

Oh and the website url is

http://jitu.net/index2.php

 
zorinena

Joined: 2003-03-28
Posts: 15
Posted: Tue, 2003-07-15 02:59
zorinena wrote:
I have been trying to use all the solutions posting on the forum to get my random and resizing work.
I use a standalone system.
I wanted to use full photos as my thumbnails size was 100 and at my random size was 500 by 300 , so resizng the same would blur the images.
I then changed

echo "<center>"
."<a href=" .makeAlbumUrl($album->fields["name"], $id) ." $targetAttr>"
.$album->getThumbnailTag($index,$size)
."</a>";

-------------------------------------------------------------
to
-------------------------------------------------------------
echo "<center>"
."<a href=" .makeAlbumUrl($album->fields["name"], $id) ." $targetAttr>"
.$album->getPhotoTag($index,$size)
."</a>";

although i do get the images but the sizes are way too big.
Is there a way i can resize the whole image and not just the thumbnail

Thanks
Zor

Oh and the website url is

http://jitu.net/index2.php

Please ppl some can help me ..
i cannot figure this out
Thanks

Zor

 
medic119

Joined: 2003-03-05
Posts: 14
Posted: Wed, 2003-07-16 03:14

Would someone please post a good link to standalone Block-random?

 
clezi

Joined: 2003-10-07
Posts: 2
Posted: Tue, 2003-10-07 06:31

I found this site...it worked great for me.

http://www.barcahall.com/gallery-block-random.html