Random Block Not Working with 1.4.3

sumc

Joined: 2004-03-06
Posts: 13
Posted: Tue, 2004-03-30 14:31

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

doesnt work with 1.4.3 it worked with .2!

any ideas. .fixers. .code mods?

 
grnjelloman

Joined: 2003-01-06
Posts: 44
Posted: Wed, 2004-03-31 00:30

Been working with the latest versions of everything lately...

Latest version of Gallery (1.4.3b151)
Latest version of random block (0.55) (Jorge's Version found here)
The latest version of Random block does not work straight out of the box for 1.4.3.

A single line just needs to be add to the random.php file for it to work(thanks to Beckett for pointing me in the right direction on this one..)
At the very top of the random.php there are a few globals defined...

global $GALLERY_NO_SESSIONS;
global $GALLERY_BASEDIR;
global $GALLERY_EMBEDDED_INSIDE;

/* ADD the following line: */

global $GALLERY_EMBEDDED_INSIDE_TYPE;

-----end of ADD

At the top of the random.php file there are some defines...

$GALLERY_MODULENAME = "gallery"; //Change this to your module name
$GALLERY_BASEDIR = "modules/$GALLERY_MODULENAME/";
$GALLERY_EMBEDDED_INSIDE = "postnuke";
$GALLERY_NO_SESSIONS = true;

/* ADD THE NEXT LINE */
$GALLERY_EMBEDDED_INSIDE_TYPE = "postnuke";

---- end of add

Evidently the case statement that defines alot of things for user access keys off of the $GALLERY_EMBEDDED_INSIDE_TYPE variable. Which wasn't getting set.

Hope this helps out any that are having problems with the new RC that just came out...

 
matsinet

Joined: 2002-07-24
Posts: 16
Posted: Wed, 2004-03-31 03:21

Worked just like you said it would. :D
Thanks for the solution.

 
matsinet

Joined: 2002-07-24
Posts: 16
Posted: Wed, 2004-03-31 05:29

One Thing I did notice with the new block was that the link for the album and the link to the image are built as if Gallery was running as stand-alone.

Here is a example:
http://www.mydomain.com/modules/gallery/view_photo.php?set_albumName=albumname&id=picid
Instead of using this format:
http://www.mydomain.com/modules.php?set_albumName=albumname&id=picid&op=modload&name=gallery&file=index&include=view_photo.php

This makes gallery jump out of PN when you click on one of these links.

Any ideas?

 
sumc

Joined: 2004-03-06
Posts: 13
Posted: Wed, 2004-03-31 09:01

cheers for replying,

thing is im using the random block by Bharat (and its standalone not ina nuke environment)

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

 
grnjelloman

Joined: 2003-01-06
Posts: 44
Posted: Thu, 2004-04-01 02:16

Good catch.. I hadn't even tried it... I'll look into it.. Although the original maker of the random block that I and matsinet are using might have a solution before I do..

 
grnjelloman

Joined: 2003-01-06
Posts: 44
Posted: Thu, 2004-04-01 03:21

Ok I've found a solution... its not as pretty and the devs of gallery might not like it so much.. So I'm waiting for confirmation from them before I post a fix...

 
MethodX

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

Please post the fix... I don't want my users jumping out of PN because the permissions of Gallery within PN are different then Gallery in standalone... and it will confuse the shit out of them.

 
MethodX

Joined: 2004-04-01
Posts: 7
Posted: Thu, 2004-04-01 09:01

Temporarily, I have just figured out a way to remove the links altogether... but I'd like to have them back and using the embedded URL's

 
grnjelloman

Joined: 2003-01-06
Posts: 44
Posted: Thu, 2004-04-01 15:00

All fixes have been moved to my first post in this thread !!!!!

 
Zabo

Joined: 2004-04-01
Posts: 5
Posted: Thu, 2004-04-01 15:28

Have the same problem, have made the change in the code, have deleted
the file block-random.cache, but still the same problem.

You can check it here.
http://palmspringscam.com

Thank You

 
Zabo

Joined: 2004-04-01
Posts: 5
Posted: Thu, 2004-04-01 16:00

One more problem after using the hack in util.php, even in postnuke makes gallery jump out of PN when you click fom menu.

Any ideas?

 
grnjelloman

Joined: 2003-01-06
Posts: 44
Posted: Fri, 2004-04-02 00:19

I went to your site Zabo and did not see the second problem when choosing gallery from the menu(that is unless you changed it back when it wasn't working properly).

What version of the random block are you using? are you using the most recent version? And is it from http://holzapfel-online.de/modules.php?op=modload&name=Downloads&file=index&req=viewsdownload&sid=4 ?

 
Zabo

Joined: 2004-04-01
Posts: 5
Posted: Fri, 2004-04-02 01:01

I am using the last version taken from holzapfel-online.de . I have changed it back
to the old version. Is it working for you? I am confused?
Thank You

 
Zabo

Joined: 2004-04-01
Posts: 5
Posted: Fri, 2004-04-02 01:07

Thanks a lot get it working now.

 
grnjelloman

Joined: 2003-01-06
Posts: 44
Posted: Fri, 2004-04-02 01:20

Hmm i'm seeing your link problem with the random block.. but I'm not seeing your problem regarding the gallery link from the menu...

And yes I have the latest version of random block and gallery running and working well at http://jellohaven.dyndns.org

 
grnjelloman

Joined: 2003-01-06
Posts: 44
Posted: Fri, 2004-04-02 04:06

Okies I take it all back.. I'm seeing both your problems now after upgrading to the latest RC... I'm editing my original fix in util.php to work around the problem... Please follow the fixes earlier in this post... The fixes I posted earlier are much better fixes cause they change just the random.php file and do not change any of the original gallery files.. thus making any upgrading in the future easier to make.

Hopefully Jorge will see these fixes and be able to incorporate them into his original file on his website so others in the future won't have to worry about making the changes...

 
MethodX

Joined: 2004-04-01
Posts: 7
Posted: Fri, 2004-04-02 06:59

Thanks man.. Just to reiterate... there are TWO lines you need to add to random.php or gallery_random.php in order to make it work correctly.

Those fixes worked great! It was amazing how much misinformation is floating around... it took me a few hours to track down these fixes for the latest version of gallery/postnuke/random block.

And FYI.. the Moderators should STICKY this...

http://www.ej257.com

 
sumc

Joined: 2004-03-06
Posts: 13
Posted: Fri, 2004-04-02 11:36

unless i am really dumb in the version of random block i am usiong (linked to twice)

there are not some of the lines of code that you refer to; so the fix does not seem to work!

guess we using a different random block!

 
matsinet

Joined: 2002-07-24
Posts: 16
Posted: Fri, 2004-04-02 12:48

Thanks grnjelloman, added the other line and everything is working great.

 
Zabo

Joined: 2004-04-01
Posts: 5
Posted: Fri, 2004-04-02 15:26

Thanks grnjelloman good work, it works great for me!

 
grnjelloman

Joined: 2003-01-06
Posts: 44
Posted: Fri, 2004-04-02 18:30

Sorry Sumc.. the fixes I posted are for the postnuke version of of the random block that was originally written by Joerg. The version you are running was written by Bharat... I'll try and take a look at the one you are using and work on a fix for you.

Also if you could give me an error or a link to your website so that I can see what kind of error it is giving, would be very helpful.

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Mon, 2004-04-05 16:14
grnjelloman wrote:
Hopefully Jorge will see these fixes and be able to incorporate them into his original file on his website so others in the future won't have to worry about making the changes...

I incorporated grnjellomans changes into V.55 which is now V.55a and the actual V.60 alpha which is now V.60a alpha. Sorry for delay, I was on vacation.

Thanks to grnjelloman for helping out.

Joerg

 
bificypdog

Joined: 2004-03-15
Posts: 26
Posted: Mon, 2004-04-05 19:46

ENG:
Where to download the v.60a ?

DEU:
Wo kann ich die Version v.60a herunterladen, joerg?

 
sumc

Joined: 2004-03-06
Posts: 13
Posted: Mon, 2004-04-05 20:24
grnjelloman wrote:
Also if you could give me an error or a link to your website so that I can see what kind of error it is giving, would be very helpful.

it was on www.sumc.co.uk (though now removed)

It gave no error; just a blank box in the iframe (with a spae dimension as if a pic was there but youcouldnt see it!)

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Tue, 2004-04-06 16:42
bificypdog wrote:
ENG:
Where to download the v.60a ?

DEU:
Wo kann ich die Version v.60a herunterladen, joerg?

Damit die Anderen auch etwas davon haben, natürlich in Englisch.

The actual alpha (Thats always the version which is displayed on my website!) you can get here.

But remember it's only an alpha. Which may contain bugs. Read Changelog (in Source of random.php) and readme to be informed about the latest additions and changes.

Joerg

 
gessi

Joined: 2002-10-01
Posts: 35
Posted: Thu, 2004-04-08 16:07

I get the following error message when I want to add a new block:
"Fatal error: Cannot redeclare tmbdrawborder() in /home/sparkasse-deggendorf.de/nuke/modules/gallery/pnblocks/gallery_random.php on line 397
"

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Thu, 2004-04-08 16:19
gessi wrote:
I get the following error message when I want to add a new block:
"Fatal error: Cannot redeclare tmbdrawborder() in /home/sparkasse-deggendorf.de/nuke/modules/gallery/pnblocks/gallery_random.php on line 397
"

Which Version do you use? 0.55a?

Joerg

 
gessi

Joined: 2002-10-01
Posts: 35
Posted: Tue, 2004-04-13 13:11

Yes! 0.55a!

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Tue, 2004-04-13 15:27
gessi wrote:
Yes! 0.55a!

Maybe there is an extension of PostNuke, which you installed, that is using the same function name "tmbdrawborder" which I used in my block or do you want to display more than one instance of the block?

 
gessi

Joined: 2002-10-01
Posts: 35
Posted: Wed, 2004-04-14 11:44

No! I only want to display one instance of your block!

 
gessi

Joined: 2002-10-01
Posts: 35
Posted: Wed, 2004-04-14 12:07

I fixed the problem now!
I forgot to remove completely my old pnblocks directory.
The old block was called "random.php" an the new one is now called "gallery_random.php".
So I had 2 blocks installed and the old one made problems.
After deleting the old one the new on is working now!

 
linedoggy

Joined: 2002-12-12
Posts: 19
Posted: Mon, 2004-04-19 15:55

I can no longer create any block under pn726 using Windows 2000 server with apache 2.0.48, php434. whenever I try to create a new block I get a blank white screen. When i re-install my older gallery Gallery the problem goes away. The problem only appears under .2 and .3. I've downloaded the fix on random and and followed the instructions and still have a problem creating a new block. Please help, thanks forany help.

 
matsinet

Joined: 2002-07-24
Posts: 16
Posted: Tue, 2004-04-20 12:05

Try removing your cache file out of the albums folder. I had the some problem at one point and I believe that is what fixed it.

 
martin_bissig

Joined: 2004-04-18
Posts: 13
Posted: Tue, 2004-04-20 20:06

I'm also looking for a fix for random_block from

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

for version 1.4.3

any help is appreciated

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Thu, 2004-04-22 20:50

I have had the same results and thus going back to 1.4.2. :-? Seems too much has changed between 2 and 3. However 1.4.3 does run nice without our blocks!

 
Spitfire

Joined: 2004-10-27
Posts: 26
Posted: Sun, 2006-11-26 05:29

I found a random image program that works with Gallery v1.5.5-pl1 and PostNuke 7.6.2 but it does show an error at the bottom of the browser. Was wondering if someone chould fix the small error so its availbe for everyone who uses the latest PostNuke. Here is the working script that I use at http://www.msmcs.net in the right top side of the my site... http://www.msmcs.net/downloads/

[img:b8340e0e63]http://msmcs.net/sigs/spitfire.gif[/img:b8340e0e63]