Cannot redeclare fs_copy() in modules/gallery/platform/fs_un

pushback

Joined: 2002-09-11
Posts: 94
Posted: Sat, 2002-10-12 08:31

Any ideas folks?

Thanks

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Sat, 2002-10-12 16:03

Hi,

more Detail please!

Joerg

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Sun, 2002-10-13 01:21

Sure... the picture shows up ok but when you click on it you get that error message.

Demo on http://www.consumerline.us

Thanks!

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Sun, 2002-10-13 09:07

Hi,

ok, let's see if I can help you. First we should get on the same codebase. A couple of weeks ago I modified the block to fit better in the postnuke environment. My version is a native postnuke block. You can download it <!-- BBCode Start --><A HREF="http://www.holzapfel-online.de/modules.php?op=modload&amp;name=Downloads&amp;file=index&amp;req=getit&amp;lid=6" TARGET="_blank">here</A><!-- BBCode End -->.

Try to use this one. If the error occures again, please contact me and we will try to fix it together.

Joerg

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Sun, 2002-10-13 15:33

Cool!

I will grab it later today and try it.

Thanks!

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Tue, 2002-10-15 09:05

I get the same error whether I put in in modules/gallery/pnblocks or includes/blocks.

This is maddening! I have tried it on two different sites, http://www.consumerline.us and http://www.livermore.bz. In both cases I get

Fatal error: Cannot redeclare fs_copy() in /home/jek/www/livermore/modules/gallery/platform/fs_unix.php on line 22

Doesn't a redeclare error indicate it is trying to load the same callable function twice? Could I have a stray file left over after an upgrade? when I grep for the function I get:

athena[root]:/home/jek/www/livermore/gallery-> grep fs_copy -r *
ChangeLog: * Fixed bug #459471 where you get "Cannot redeclare fs_copy()"
classes/Album.php: fs_copy($file, "$dir/$name.$tag");
classes/AlbumItem.php: fs_copy($gallery->app->movieThumbnail, "$dir/$name.thumb.jpg");
platform/fs_unix.php:function fs_copy($source, $dest) {
platform/fs_win32.php:function fs_copy($source, $dest) {
util.php: fs_copy($out, $dest);
util.php: fs_copy($out, $dest);
util.php: fs_copy($out, $dest);

Is this correct?

Thanks again for your help.

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Tue, 2002-10-15 15:48

Hi,

I think I found the cause of this error. It occures, when you display the block and other parts of the gallery at the same time.

I've veryfied that on my page. I use the random block on the right side as a right block. When the gallery is displayed as a module all right blocks disappear. So, there is no problem. When I make the random block a left block (which not disappear, when displaying a module) I get the same error.

I'll try to find a work around on that. I'll publish when I found one here in the forum.

Jörg

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Wed, 2002-10-16 00:00

WoW! Thanks for pointing that out! I have been banging my head against the wall! I would prefer to show the block on the left side but for now, showing it on the right is a perfectly acceptable workaround!

I am running your blovk now on http://www.livermore.bz

Thanks again.

John

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Wed, 2002-10-16 16:48

Hi,

I think I fixed the "cannot redeclare"-error. Everybody can download the fixed version 0.41 <!-- BBCode Start --><A HREF="http://www.holzapfel-online.de/modules.php?op=modload&amp;name=Downloads&amp;file=index&amp;req=getit&amp;lid=8" TARGET="_blank">here</A><!-- BBCode End -->.

Please give me some feedback, if everything is ok now. :roll:

Joerg

 
sunhawk

Joined: 2002-10-17
Posts: 1
Posted: Thu, 2002-10-17 09:25

works very well now - both left and right.

Thank you Joerg

 
spadver
spadver's picture

Joined: 2002-08-31
Posts: 2
Posted: Fri, 2002-10-18 17:00
Quote:
Hi,

I think I fixed the "cannot redeclare"-error. Everybody can download the fixed version 0.41 <!-- BBCode Start --><A HREF="http://www.holzapfel-online.de/modules.php?op=modload&amp;name=Downloads&amp;file=index&amp;req=getit&amp;lid=8" TARGET="_blank">here</A><!-- BBCode End -->.

Please give me some feedback, if everything is ok now. :roll:

Joerg

YES!!! YES!!! YES!!!

I've got the same problem. Left random block.

And it is working now!
And count is working well.
:smile: :wink:

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Wed, 2002-10-23 17:25

Thanks Buddy! I will give it a try but from the sound of the others it sounds like you licked it!

Feel like taking on a feature request?

How about allowing the admin to set the width of the random block? As it stands now it takes the actual thumbnail. That works fine if you use the default thumbnail size of width=150. I have found that thumbnails of width=225 work much better in the album and makes much better use of the space in the thumbnail display page, however, when I have thumbnails of width=225 they show up in the random block as 225 as well making the sidebar too wide.

Have you ever read the book "If You Give a Mouse a Cookie"? :wink:

Thanks again!

John

http://www.livermore.bz

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Wed, 2002-10-23 20:20

Hi,

no problem. If you look in the config dialog of the block. You will notice that you can set width, you should even turn on aspect and resize and i hope it will work! Set the width to the value you want and height to zero. Then turn on aspect and resize and it should work.

In germany we say: If you reach someone the small finger he will take the whole hand! :lol:

Joerg

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Fri, 2002-10-25 06:49

Excellent! It is not working. Is my syntax proper?

// Thumbwitdh
// $tmbwidth = $vars['tmbwidth'];
$tmbwidth = "150";
// Thumbheight
// $tmbheight = $vars['tmbheight'];
$tmbheight = "0";
// Save aspect ratio
$svaspect = TRUE;
// $svaspect = $vars['svaspect'];
// Don't do any resize
$uresize = $vars['uresize'];
$row['content'] = "";

Thanks again!

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Fri, 2002-10-25 09:18

Hi,

why do you not use the block config in the admin menu of postnuke? Normaly you don't have to change anything in the source.

Joerg

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Sat, 2002-10-26 01:56

You make a good point! I had no idea it was there!

In any case, it is working now! Thanks buddy!

John

http://www.livermore.bz

Come see my pictures! :wink:

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Sat, 2002-10-26 22:32

OK, this is working well now. Thanks very much. There is now, however, one minor hitch!

Given an album that looks like this:

GALLERY
|------|-------------------|
PIC1 PIC2 ALBUM1-HIGHLIGHT=PIC4
|
|--------|--------|------|
PIC3 PIC4 PIC5 PIC6

(of course the html compressed out all the spaces but you get the idea)

Where there are six pictures, in this case PIC4 will show up twice as if it is a seventh picture because it is highlighted.

This, in itself, is no big deal, except it seems that when the ALBUM1-HIGHLIGHT=PIC4 is selected, clicking on it gives an error, whereas when PIC4 is selected, no error.

Here is the error that is generated:

Fatal error: Call to a member function on a non-object in /home/jek/www/livermore/modules/gallery/view_photo.php on line 70

In any case, joerg, thanks for taking ownership of this block. You are doing all of us a great service!

John

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Sun, 2002-10-27 10:24

Hi John,

thanks for the report. I'll try to filter out that the script is using the highlight-pictures. I think if I filter the highlights we'll get no error.

John, it would be nice if you could open a new thread on things which have not directly to do with the redeclare thing. Cause this one is gettin to big and it's hard to find your message in this thread if someone has the same problem.

Joerg

PS: John, visited your site. Nice one! :wink:

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Sun, 2002-10-27 14:10

Hi John,

could you please post me the URL which causes the error? Rightklick the random picture and copy the link, then post it here. Thank you.

Joerg

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Sun, 2002-10-27 15:36

Hi John,

it's me again! :grin:

I think I got that bug. Please try the <!-- BBCode Start --><A HREF="http://www.holzapfel-online.de/modules.php?op=modload&amp;name=Downloads&amp;file=index&amp;req=getit&amp;lid=9" TARGET="_blank">latest beta</A><!-- BBCode End --> and tell me if it's gone!

Joerg

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Sun, 2002-10-27 17:14

Starting a New Thread.

Quote:
Hi John,

it's me again! :grin:

I think I got that bug. Please try the <!-- BBCode Start --><A HREF="http://www.holzapfel-online.de/modules.php?op=modload&amp;name=Downloads&amp;file=index&amp;req=getit&amp;lid=9" TARGET="_blank">latest beta</A><!-- BBCode End --> and tell me if it's gone!

Joerg

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Tue, 2002-10-29 21:07

OK, it is runnning as of about an hour ago on http://www.livermore.bz

I'll keep an eye on it. Thanks!

John

 
gdesanto

Joined: 2002-10-04
Posts: 8
Posted: Fri, 2002-11-15 01:30

- removed

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Thu, 2002-12-12 06:32

We're back!

This same error shows up, once again! It occurs on PostNuke .72 under admin/Mail Users.

It also when users select the Classifieds option off the Feature List on my site. The Classifieds I am using is PN_zclassifieds 1.1 and is available for download here:

http://dualtech.phpnet.org/lourmarin_info/index.php?name=PN_zClassifieds

It's a very nice classifieds module--I hope I don't have to give it up to show pictures!

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Thu, 2002-12-12 17:54

Hi pushback,

I know that problem. But it's not easy to be fixed. The problem is that gallery uses the same function name as the adminmail users-module in PN. The only way to work around this problem ist to not display the random block or every other part of the gallery during using the adminmail users-module. The problem can only be fixed by changing either gallery or PN source.

Let's wait on G2 maybe we get rid of the problem there.

Joerg

 
pushback

Joined: 2002-09-11
Posts: 94
Posted: Sun, 2002-12-15 01:31

Yep--that has been my workaround for the mailing (kinda like the Enterprise has to drop shields in order to beam down the away teams) --and that was fine, but now there is a very cool classifieds module out that I would like to use. Any idea why it is failing with PN_zclassifieds (URL above)?