Latest Images / Most Viewed Hack

bificypdog

Joined: 2004-03-15
Posts: 26
Posted: Tue, 2004-06-08 18:28

OK. I turned it off.

By the way. The debug-mode is working. But for what must I search?
My ISP (german www.1and1.com) has a very short time-out. (simple shared-webhosting)

There was another user in this thread who has had the same problem.

Any idea?

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Tue, 2004-06-08 21:05

It looks as though there's a photo in the ul_2004_05_irland album that's causing the problem. I've added more debug to try and diagnose it. Download the latest version (2.01) from here and specify debug=3

Regards,

Jeremy

www.tearoom.me.uk

 
bificypdog

Joined: 2004-03-15
Posts: 26
Posted: Tue, 2004-06-08 21:13

Thanks Jeremy for your help.
I have replaced stats.php (only this file).
Debug-Mode 3 is activated ;-)

I have rebuilded the thumbnails, too.

 
bificypdog

Joined: 2004-03-15
Posts: 26
Posted: Tue, 2004-06-08 21:32

Wow. A lot of work.
I have deleted pretty much pics.
I deleted those pics where the debug-script stops.

And now:

Fatal error: out of dynamic memory in yy_create_buffer() in /homepages/30/*********/htdocs/domain2/modules/gallery/util.php on line 1032

Line 1022-1033 from my util.php
----------------------------------------

function getImagePath($name, $skinname='') {
	global $gallery;

	if (!$skinname) {
		$skinname = $gallery->app->skinname;
	}

	if (isset($gallery->app->photoAlbumURL)) {
		$base = $gallery->app->photoAlbumURL;
	} else {
		$base = '.';
	}
 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Tue, 2004-06-08 22:18

bificypdog - there's a possibility that one of the photos was corrupt in some way. I would be interested to see the debug output before you deleted the photos.

You now appear to have a memory problem. If I try using stats.php without postnuke - see http://www.carsten-volmer.de/modules/gallery/stats.php?type=views then it works great. If memory is the problem then this can be explained because postnuke will itself be using memory which when added to what stats.php needs, is enough to go over the limit. Taking postnuke out means that less memory is needed and it works ok. I suggest increasing the memory limit - at the moment that is set to 40M. See my response to priest above for details about using ini_set to increase the memory.

Regards,

Jeremy

www.tearoom.me.uk

 
waffull
waffull's picture

Joined: 2002-09-07
Posts: 115
Posted: Wed, 2004-06-09 03:02

I did a quick search but didn't come up with anything, so I'm going to ask...

I just downloaded your stats package and when i run it, no matter what type I use, I get:

Upload Date: 01/06/2004
Viewed:
Fatal error: Call to undefined function: pluralize_n() in f:\apache2\htdocs\gallery\stats.php on line 1722

I'm on a win2k server with Apache running.
I'm running Gallary 1.4.4-cvs-b165

http://waffull.com

http://waffull.com/gallery/stats.php?type=date

Your help is greatly appreciated. This looks like an awsome addon.. Thank you for all your hard work!!!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2004-06-09 03:19

schauber,
You are using 1.4.4 beta? The API has changed yet again. I think there is one location in stats.php where you need to change pluralize_n to pluralize_n2
then look for echo error_format(sprintfand change to echo gallery_error(sprintf
See if that works and if it does not post back. I just removed my 1.4.4 test gallery :roll:

Dave

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Wed, 2004-06-09 04:18
myriagon wrote:
bificypdog - there's a possibility that one of the photos was corrupt in some way. I would be interested to see the debug output before you deleted the photos.

Thinking about this again I don't think the above is correct. I suspect what was happening before you deleted some photos was that it was exhausting the available memory earlier. This happened in code where there was no friendly error message. After deleting the photos it now successfully gets through that code, only to run out of memory later when it attempts to display the results.

Regards,

Jeremy

www.tearoom.me.uk

 
kai_tom

Joined: 2004-04-08
Posts: 347
Posted: Wed, 2004-06-09 11:29

Hi,

is it possible to show oldest Photos first, sorted by date or cdate?

Thanks
Kai

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Wed, 2004-06-09 12:34

Kai,

I wondered when someone would ask that question. I've thought about doing oldest already but no one asked for it so currently it's not supported. The code changes required should be fairly straightforward so when I get some time I will add oldest.

Regards,

Jeremy

 
waffull
waffull's picture

Joined: 2002-09-07
Posts: 115
Posted: Wed, 2004-06-09 13:55

Dave,
Thank you, that worked perfectly.

httpe://waffull.com/gallery/stats.php

Appreciate your help!!

Marc

floridave wrote:
schauber,
You are using 1.4.4 beta? The API has changed yet again. I think there is one location in stats.php where you need to change pluralize_n to pluralize_n2
then look for echo error_format(sprintfand change to echo gallery_error(sprintf
See if that works and if it does not post back. I just removed my 1.4.4 test gallery :roll:

Dave

 
Shadow_Wolf
Shadow_Wolf's picture

Joined: 2004-04-03
Posts: 181
Posted: Sun, 2004-06-20 08:24

Is there a way to exclude certain Albums and/or Sub-Albums?

 
tenaki

Joined: 2003-04-08
Posts: 106
Posted: Sun, 2004-06-20 11:46

Can I just check (linited knowledge here) Can I upload the stats.tar add say views to it and point my browser at it and it will work?

If OK I can upload all the rest and NOT interfere with the existing gallery code is that about right I only really want latest and most viewed

 
itcheg

Joined: 2003-11-30
Posts: 87
Posted: Sun, 2004-06-20 13:20

Thanks for a great hack.

Don't know if I'm missing something but at least for me if you click next after your at page 10 it will go to 11 (as indicative in the URL) but it still says page numbers 1 through 10 (as opposed to 11-20).

Another issue is that gallery reports that I have 1572, while when I use stats.php hack it only says 1557.

This hack should definitely be a standard Gallery feature, Keep up the great work.

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Wed, 2004-06-23 22:10

Shadow_Wolf - there's no way at the moment to exclude certain albums or sub-albums. It could be done with a simple hardcoded hack. The following would exclude Album1 and Album2...

Search for:

      if (isset($album))
      {
         if ( $showNestedAlbums )
          .....

change to:

      if ( "Album1" == $statsAlbum->fields['name'] ||
           "Album2" == $statsAlbum->fields['name'] )
         continue;

      if (isset($album))
      {
         if ( $showNestedAlbums )
          .....

Regards,

Jeremy

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Wed, 2004-06-23 22:21
tenaki wrote:
Can I just check (linited knowledge here) Can I upload the stats.tar add say views to it and point my browser at it and it will work?

Yes it should.

tenaki wrote:
If OK I can upload all the rest and NOT interfere with the existing gallery code is that about right I only really want latest and most viewed

stats does NOT interfere with the existing gallery code. You can safely extract the files from the tar and they should have no effect on the existing gallery files. There are two gallery patches for voting but you can ignore those if you don't want to change the way voting works.

Regards,

Jeremy

www.tearoom.me.uk

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Wed, 2004-06-23 22:37

There's a new version of stats (2.02) here This includes support for reversing the sort order so that rather than displaying the latest first, stats can now display the oldest first. All stats types can be reversed except for random. Search for $reverseOrder in the readme for more details. Thanks Kai for suggesting this.

I have also fixed an issue with hidden albums being included incorrectly. Now albums that are hidden will not be displayed unless the user is admin.

This version of stats will not work with the 1.4.4 beta yet. Checkout floridave's reply above to get stats working with 1.4.4 beta.

Regards,

Jeremy

www.tearoom.me.uk

 
kai_tom

Joined: 2004-04-08
Posts: 347
Posted: Fri, 2004-06-25 10:17
myriagon wrote:
There's a new version of stats (2.02) here This includes support for reversing the sort order so that rather than displaying the latest first, stats can now display the oldest first. All stats types can be reversed except for random. Search for $reverseOrder in the readme for more details. Thanks Kai for suggesting this.

Jeremy,

thank you for implementing my suggestion in your script. :D

Kai

 
tenaki

Joined: 2003-04-08
Posts: 106
Posted: Fri, 2004-06-25 20:55

And thanks for answering my question as well. It's much appreciated

 
samlewit

Joined: 2002-10-12
Posts: 37
Posted: Sat, 2004-06-26 22:02

Hey thanks for the easiest mod I've ever used! Really gracefully done. Excellent.

I am having a teeny problem though. When I list stats by viewed, the first is 157, then 1422 and downward from there. Could it be that the 157 is corrupted or something?

Actually, as I look at it again indepth, the numbers are all over the place. It goes up and down within a group. Maybe I missed a fix for it here?

The path is www.bayarearailfan.org/gallery/stats.php?type=viewed

Thanks
Sam

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Sat, 2004-06-26 22:27

Sam - the reason for it being all over the place is that you need to use "views", not "viewed". I've just tried http://www.bayarearailfan.org/gallery/stats.php?type=views and it works ok. BTW if you haven't already tried it have a go with the latest comments type like this

Regards,

Jeremy

www.tearoom.me.uk

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2004-07-02 03:03

I have been testing out GalleryV1.4.4 and stats.phpV2.02 and have discovered that the frame around the images is not the correct height.
Gallery V1.4.4 fixes a issue where the height of a frame can't be a percentage (html compliance as well as fixing a Safari issue).-- From inline_imagewrap.inc,v 1.28

Quote:
// Safari/Opera ignore height="100%" for table, but this ensures HTML
// standards, so do it for all browsers
$hLL = $imageHeight - $heightLLT - $heightLLB;
$hRR = $imageHeight - $heightRRT - $heightRRB;

The value ($gallery->html_wrap['imageWidth'] & $gallery->html_wrap['imageHeight']) that stats.php sent the inline_gallerythumb.frame and ultimately inline_imagewrap.inc where not correct because it uses a scaled image of the thumb.

I think I have a work around for this:
in stats.php
Look for

                           $iHeight = 100;
                           /*begin backwards compatibility */

and remove the next 2 lines:

$gallery->html_wrap['imageWidth'] = $iWidth;
$gallery->html_wrap['imageHeight'] = $iHeight;

skip this line $gallery->html_wrap['imageTag'] = $statsAlbum->getThumbnailTag($photoIndex, $thumbSize); and add:

						   $imgTag = $gallery->html_wrap['imageTag'];
						   $gallery->html_wrap['imageWidth'] = widthValue($imgTag);
						   $gallery->html_wrap['imageHeight'] = heightValue($imgTag);

Then further down find where the functions are:
<?php
/*
* Functions
*/
and add these to new functions:

function heightValue($str)
{
$start = 'height="';
$end = '"  border';
$lenStr= strpos($str,$end) -strpos($str, $start);
return substr(substr($str, strpos($str,$start), $lenStr), 8); 
}
function widthValue($str)
{
$start = 'width="';
$end = '" height=';
$lenStr= strpos($str,$end) -strpos($str, $start);
return substr(substr($str, strpos($str,$start), $lenStr), 7); 
}

The last 2 functions strip out the proper values of the height and width from the image tag that is sent to the inline_imagewrap.inc.

I don't think that the width needed to be fiddled with but I did it anyway.

see it in action on my V1.4.4 test gallery:
http://langleycom.com/g1/stats.php?type=date

 
carmosin

Joined: 2003-11-18
Posts: 15
Posted: Sun, 2004-07-04 15:46

Stats.php works fine when stand alone. When I try this: http://server/modules.php?op=modload&name=gallery&file=index&include=stats.php?type=cdate
all I get is a blank page. I have also tried this: http://server/modules.php?op=modload&name=gallery&file=index&include=cdate.php where cdate is stats.php with the variable $type set to cdate within the script. This works well, so I assume this is not a problem with memory,

What to try next?

Kind Regards

/Jenny

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Sun, 2004-07-04 16:03

floridave - thanks for looking into the problem with frame height and the latest Gallery code. I will try to add it next time I do a release.

Jenny - try changing the final "?" to a "&" - eg. http://server/modules.php?op=modload&name=gallery&file=index&include=stats.php&type=cdate

itcheg - I knew about page 10 not going to 11... I didn't think anyone would ever get that far but as you've raised it, I will try and fix it for the next release. For the other issue you raised...

Quote:
Another issue is that gallery reports that I have 1572, while when I use stats.php hack it only says 1557.

This is caused by gallery reporting the number of images + albums while stats reports the number of images.

Regards,

Jeremy

www.tearoom.me.uk

 
carmosin

Joined: 2003-11-18
Posts: 15
Posted: Sun, 2004-07-04 17:07
myriagon wrote:
Jenny - try changing the final "?" to a "&" - eg. http://server/modules.php?op=modload&name=gallery&file=index&include=stats.php&type=cdate

Thank you so much, that worked.

/Jenny

 
Shadow_Wolf
Shadow_Wolf's picture

Joined: 2004-04-03
Posts: 181
Posted: Fri, 2004-07-09 02:39
Quote:
Shadow_Wolf - there's no way at the moment to exclude certain albums or sub-albums. It could be done with a simple hardcoded hack. The following would exclude Album1 and Album2...

Search for:

Code:
if (isset($album))
{
if ( $showNestedAlbums )
.....

change to:

Code:

if ( "Album1" == $statsAlbum->fields['name'] ||
"Album2" == $statsAlbum->fields['name'] )
continue;

if (isset($album))
{
if ( $showNestedAlbums )
.....

Regards,

Jeremy

That is great. Thank you. I just have one question, when an album isn't a album number is actually named like Out-of-Order, do I put that where it says "Album 1"?

What controls that way that the stats.php display things? Is that controlled in stats.php or does it call upon the header/footer that the gallery uses? The reason I'm asking is because I want to use the random image but I want a smaller area for it to place in a certain spot on the website. If you go here you can see what I mean, I would like to cut it in half basically so it takes up less space.
http://www.protoculturex.com/artgallery/stats.php?type=random&total=1

 
Moritz-

Joined: 2004-07-08
Posts: 3
Posted: Fri, 2004-07-09 11:16

myriagon,

Is it possible for you to make something like a monthly reset of views, and that the pictures that got the most views in that month get written to an .html file, so that all the best views of each month are stored?

Greetings

 
itcheg

Joined: 2003-11-30
Posts: 87
Posted: Sun, 2004-07-11 08:53

In gallery ver 1.4.4 RC1 stats.php seems not to like the showview function it complains that it can't get the views

Fatal error: Call to undefined function: pluralize_n()

I don't know much php but I commented out the showview function and it works (except for the views function of course)

[edit] A quick look in the ChangeLog for gallery v1.4.4-RC2 reveald in 1.4.4-cvs-b112 "* Change: Complete replace of pluralize_n with n2" so I changed the stats.php code

if ( $showViews &&
              !($statsAlbum->fields["display_clicks"] == "no") && 
              !$gallery->session->offline)
         {

            echo "<tr><td width=\"105\"><span class=\"fineprint\">Viewed:</span></td>";
            echo "<td><span class=\"fineprint\">";
            echo pluralize_n($statsAlbum->getItemClicks($photoIndex), "1 time", "times" , "0 times");
            echo "</span></td></tr>";
         }

where pluralzie_n should be pluralize_n2

(I don't know if this is right, don't know much php but it now seems to work fine) [/edit]

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2004-07-11 16:40
 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Sun, 2004-07-11 21:57

There's a new version of stats (2.03) here This supports Gallery 1.4.4rc1 and includes floridave's workaround for the image height issues. Thanks floridave for that.

Moritz - I like the idea of showing stats by month. I might do something if I get some time. A quick workaround could be to save the html generated by stats using IE or whatever each month, then use the admin option to reset the views counter for each album.

Shadow_Wolf

Quote:
That is great. Thank you. I just have one question, when an album isn't a album number is actually named like Out-of-Order, do I put that where it says "Album 1"?

Yes use Out-of-Order or whatever the album name is - I used Album1 as an example. I'm not exactly clear what you mean by your second question but stats uses stats.header.default (or stats.header) and stats.footer.default (or stats.footer). These inturn include wrapper.header and wrapper.footer.

Regards,

Jeremy

www.tearoom.me.uk

 
Moritz-

Joined: 2004-07-08
Posts: 3
Posted: Tue, 2004-07-13 08:34
myriagon wrote:
Moritz - I like the idea of showing stats by month. I might do something if I get some time. A quick workaround could be to save the html generated by stats using IE or whatever each month, then use the admin option to reset the views counter for each album.

Great, this is exactly what i mean, i guess you will make loads of users happy, if you can find the time and enthousiasm at least!
I could help a little generating the stats and stuff, but i have too few time to catch up how the whole gallery thing works with its unlimited variables :).

Regards

Moritz

 
carmosin

Joined: 2003-11-18
Posts: 15
Posted: Tue, 2004-07-13 11:13

Hi,

I have installed the latest stats.php and Gallery v1.4.5-cvs-b13. I am using Postnuke.

When accessing stats.php through standalone gallery, everything works fine, but when I try to access it through postnuke it says:

Fatal error: Failed opening required './stats.config.default.php' (include_path='.:/usr/share/pear') in /var/www/html/modules/gallery/stats.php on line 73

Is this a known problem, and if so, what am I doing wrong?

/Jenny

 
kai_tom

Joined: 2004-04-08
Posts: 347
Posted: Tue, 2004-07-13 19:59

Hi,

i have the same problem with my Gallery 1.4.4-RC1 embedded in Mambo.

I have removed the ./ in line 62 in stats.php

$GALLERY_BASEDIR = './';
to
$GALLERY_BASEDIR = '';

Now stats.php works again

Kai

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Tue, 2004-07-13 20:42

It seems that GALLERY_BASEDIR has become GALLERY_BASE in the latest version of Gallery. :(

kai_tom's workaround should do for now. I will change stats sometime soon.

Jeremy

www.tearoom.me.uk

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Thu, 2004-07-15 09:41

Hello,

the global $GALLERY_BASEDIR is completely gone and not needed or used at any place in Gallery.

In some functions there is a locale var called $GALLERY_BASE. But its only used in that function.

We have a constant GALLERY_BASE bu its not replacement in any way.
See getGalleryPaths() in util.php.

Jens

@Jeremy: we would like to integrate your stats.php into official code for Gallery 1.4.5.
I am responsible for this task and will contact you soon.

 
Raven69
Raven69's picture

Joined: 2004-01-16
Posts: 24
Posted: Fri, 2004-07-16 11:24
Tim_j wrote:
...
@Jeremy: we would like to integrate your stats.php into official code for Gallery 1.4.5.
I am responsible for this task and will contact you soon.

@Jeremy: You did (and hopefully will continue doing so) an excellent job.
I like your STATS mod and am looking forwarding finding it integrated into one of the next versions.

Congratulations again

RaVen

 
bificypdog

Joined: 2004-03-15
Posts: 26
Posted: Fri, 2004-07-16 15:39

Gallery v1.4.3-pl2

Embedded-Postnuke-Link:

modules.php??et_albumName=&op=modload&name=gallery&file=index&include=stats.php&type=comments

OR SAME with the Directlink

modules/gallery/stats.php&type=comments

Following error on the screen:

if ( !$reverseOrder ) echo " Latest Comments"; else echo " Oldest Comments"; } else if ( $type == "random" ) { echo " Random Images"; } ?>

Another example:
...stats.php&type=date

if ( !$reverseOrder ) echo " Latest Comments"; else echo " Oldest Comments"; } else if ( $type == "random" ) { echo " Random Images"; } ?> 

These errors are printed at the header of the page. Above the pictures.

Any idea?

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Fri, 2004-07-16 16:35

bificypdog - what has changed since it last worked and what is the url of your website so I can see it for myself?

Regards,

Jeremy

www.tearoom.me.uk

 
Herr.Vorragend
Herr.Vorragend's picture

Joined: 2004-07-16
Posts: 120
Posted: Fri, 2004-07-16 16:55

STOP SEARCHING

I have redownloaded the package and extract it with power archiver.
The other file was extracted with winrar. I think that was the problem.
I haven't changed the sourcecode before, so it must be winrar.
Now, everthing is fine. Thanx.

-------------

Same problem here:

With Postnuke:
CHANGED/modules.php?set_albumName=&op=modload&name=gallery&file=index&include=stats.php&type=date

Without Postnuke:
CHANGED/modules/gallery/stats.php?latest

I have done no changes. Only updated stats.php from 2.00 to 2.03

 
Herr.Vorragend
Herr.Vorragend's picture

Joined: 2004-07-16
Posts: 120
Posted: Fri, 2004-07-16 17:06

one more question: ;-)

Is it possible to localize "stats" in the future?
I will help you with the german translation (it is much more better than my englisch) ,-)

 
Raven69
Raven69's picture

Joined: 2004-01-16
Posts: 24
Posted: Fri, 2004-07-16 17:24

if necessary, I will support you with german translation, too.

Greetz from Vienna, Austria, EUROPE :wink:

RaVen

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Fri, 2004-07-16 22:16

Thanks guys for all your support :)

Jens is looking to get stats into Gallery. As he's the team lead for the translation team it's probably best if I let him arrange the localizing - particular as my language skills are limited to basic French and I've never localized php code before.

Regards,

Jeremy

www.tearoom.me.uk

 
Ultima

Joined: 2004-07-19
Posts: 12
Posted: Wed, 2004-07-21 04:44

How do I use the script to get JUST the thumbnail, caption and comment? I want to embed this on the main page of gallery.

 
Ultima

Joined: 2004-07-19
Posts: 12
Posted: Wed, 2004-07-21 15:57
Ultima wrote:
How do I use the script to get JUST the thumbnail, caption and comment? I want to embed this on the main page of gallery.

I got something working using your script and the random block generator. I didn't modify header/footer because I didn't want it on EVERY page, only the front page. You guys can see what I did at my gallery, and give me any suggestions on how to improve the look, etc... :) I've noticed that sometimes the random block generator doesn't work.. the image just doesn't appear.

 
Herr.Vorragend
Herr.Vorragend's picture

Joined: 2004-07-16
Posts: 120
Posted: Fri, 2004-07-30 12:05

Hi,

I have embedded gallery into postnuke.
No I receive an error after updating to 1.4.4 final.

http://www.domain.de/modules.php?set_albumName=&op=modload&name=gallery&file=index&include=stats.php

Warning: main(./stats.config.default.php) [function.main]: failed to create stream: Datei oder Verzeichnis nicht gefunden in /www/htdocs/xxxxx/modules/gallery/stats.php on line 73

Fatal error: main() [function.main]: Failed opening required './stats.config.default.php' (include_path='.:..') in /www/htdocs/xxxxx/modules/gallery/stats.php on line 73

http://www.domain.de/modules/gallery/stats.php works

Any idea?

--------------------------------------

Changing line 62 from

$GALLERY_BASEDIR = './';
to
$GALLERY_BASEDIR = '';

prints another error:

Quote:
Warning: main() [function.main]: open_basedir restriction in effect. File(../stats.config.default.php) is not within the allowed path(s): (/www/htdocs/xxxxxx/) in /www/htdocs/xxxxxx/modules/gallery/stats.php on line 73

Warning: main(stats.config.default.php) [function.main]: failed to create stream: Die Operation ist nicht erlaubt in /www/htdocs/xxxxxx/modules/gallery/stats.php on line 73

Fatal error: main() [function.main]: Failed opening required 'stats.config.default.php' (include_path='.:..') in /www/htdocs/xxxxxx/modules/gallery/stats.php on line 73

 
Herr.Vorragend
Herr.Vorragend's picture

Joined: 2004-07-16
Posts: 120
Posted: Mon, 2004-08-02 13:27

Other question:
Is the current version of stats.php (2.03) working with gallery 1.4.4 ?
Or will there be a newer release in the future?

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Mon, 2004-08-02 13:50

Sorry for not replying earlier - I've been very busy recently.

The fatal error that you are getting appears to be because stats cannot open its default configuration file (stats.config.default.php). That would suggest that the current working directory is not the same as the gallery directory. I don't know very much about postnuke but one thing you could try is editing line 73 of stats.php to hardcode the path to stats.config.default.php - that's not ideal and you might get other path type problems too but it would at least prove the theory.

As for the other question about 1.4.4, the latest version of stats worked with the 1.4.4 rc. If it doesn't work with the final version then please reply and I will get it fixed.

Regards,

Jeremy

www.tearoom.me.uk

 
Herr.Vorragend
Herr.Vorragend's picture

Joined: 2004-07-16
Posts: 120
Posted: Mon, 2004-08-02 15:19

Gallery is installed in \modules\gallery.
So there are stats.php and the config-file, too.

I changed the line 73 as following:
/www/htdocs/xxxxx/modules/gallery/

And now it is working.

Thank you very much Jeremy.

 
scoobidoobidooooo
scoobidoobidooooo's picture

Joined: 2003-11-06
Posts: 12
Posted: Thu, 2004-08-12 15:45

Hey, I recently updated the gallery to version 1.4.4 and I downloaded the last stats.tar.gz and installed it. I seems to work correctly except that I can't show the pictures in a 3*3 array like before. Now all the pictures are in only one column. I tried to change $numRows and $numCols but it didn't do any changes.

Thanks for your help :)

Stephane

 
Triumph-design

Joined: 2004-08-14
Posts: 2
Posted: Sat, 2004-08-14 11:41

Heya!

Great hack, works fine for me, though i have some serious problems.

When i open my website it shows the 3 latest photo's

I include stats.php and i edited stats.php with the line

$type = "date"; so that wouldn't gave the variable "type" away.

This way i could include stats.php in my code.
But my navigation goes like this:

http://website/?page=home

When i navigate i get an error in my stats.php:

Error: Cache update required. [Update]

How can i stop that ?

to see my problem visit http://213.84.84.88/rch4n/ (webserver which is up 24/7)

well i hope to hear from you