Latest Images / Most Viewed Hack

Triumph-design

Joined: 2004-08-14
Posts: 2
Posted: Sat, 2004-08-14 12:17

LoL i already know what the problem was! :D

Appearently stats.php didn't like my ?page variable

because of the lines:

$uid = $gallery->user->getUid();
if ( !isset($pagee) )
{
$pagee = 1;
}

i changed every $page into $pagee andd now it works fine :D

 
Jerichos

Joined: 2004-09-09
Posts: 1
Posted: Thu, 2004-09-09 15:31

Does anyone use this hack with phpBB?
As I just tried to get this running, I got only the normal stats-header but the wrapper_header is missing as you can see here ->

embedded in phpBB:
http://www.d7userforum.de/phpBB2/modules.php?op=modload&name=gallery&file=stats&type=date

standalone:
http://www.d7userforum.de/phpBB2/modules/gallery/stats.php?type=date

normal view of gallery:
http://www.d7userforum.de/phpBB2/modules.php?op=modload&name=gallery&file=index

Any ideas what is missing?

Also I had to chance this part:

if (!isset($GALLERY_BASEDIR))
{
   $GALLERY_BASEDIR = './';
}
require_once(dirname(__FILE__) . '/init.php');

to

if (!isset($GALLERY_BASEDIR))
{
   $GALLERY_BASEDIR = '/xxxxx/www/phpBB2/modules/gallery/';
}
require_once(dirname(__FILE__) . '/init.php');
 
HaZMaT76

Joined: 2004-08-25
Posts: 14
Posted: Thu, 2004-09-16 20:47

does anyone know, after reading this post, how i can post the gallery stats on my home page (mambo) i want to show the total number of images and albums and i want to use it via an include, any help would be welcome!

 
Herr.Vorragend
Herr.Vorragend's picture

Joined: 2004-07-16
Posts: 120
Posted: Thu, 2004-09-23 22:16

Fatal error: Cannot redeclare readcache() (previously declared in /www/htdocs/xxxxxx/modules/gallery/stats.php:1255) in /www/htdocs/xxxxxx/modules/gallery/pnblocks/gallery_random.php on line 488

I am using gallery embedded in postnuke 7.50.
I am using a xanthia-theme.
This error does not appear, if I use a non-xanthia-theme (e.g. a theme called "ExtraLite").

Stand-alone-gallery works.

Any idea?

 
HaZMaT76

Joined: 2004-08-25
Posts: 14
Posted: Fri, 2004-09-24 07:38

i stripped the stats.php page to a minimum and put that as an include in my stats module in mambo. i am sure you can do this with any cms package. anyone wanting the edited stats.php file that only shows the amount of photo's and albums (as can be seen on www.digitalfrontier.nl - top right hand corner) can send me a PM.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2004-09-24 13:36

Herr.Vorragend,
stats.php and gallery_random.php both have a function called readcache

What you can do is change the name of the function in stats.php to a new name say readStatsCache and change the references to it in the source as well.

So where it says
function readCache( $cacheFilename, $start, $numPhotos )
change to function readStatsCache( $cacheFilename, $start, $numPhotos )

and where it is used find:

if ( $useCache )
{
   readCache($cacheFilename, $startPhoto, $photosPerPage );

and change to

if ( $useCache )
{
   readCache($cacheFilename, $startPhoto, $photosPerPage );

Or don't use the two modules at the same time.

A better way would be to change the stats.php code to use the gallery readcache function.

I don't have a cms to test but this should work

Dave

 
Herr.Vorragend
Herr.Vorragend's picture

Joined: 2004-07-16
Posts: 120
Posted: Sat, 2004-09-25 15:35

@FloridaDave:
Thanks for your solution. It works.

But now it appears a new (old) error:

Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 65537 bytes) in /www/htdocs/xxxxxx/modules/gallery/util.php on line 372
Quote:
max_execution_time = 30
memory_limit = 20M
post_max_size = 8M
upload_max_filesize = 20M

What to do?

3400 pics
PHP 4.3.8
Apache/1.3.27
Provider: www.all-inkl.com

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2004-09-25 15:51

Herr.Vorragend,
With 3400 pictures you might have a tough time running the two together.
FAQ Gallery:c.16

 
Herr.Vorragend
Herr.Vorragend's picture

Joined: 2004-07-16
Posts: 120
Posted: Sun, 2004-09-26 14:06

@FloridaDave.
Thanks again.
I changed my .htaccess.

Quote:
php_value memory_limit 32000000

Now it works. But is this a normal value? What about the other gallery-users?

 
slo-foto

Joined: 2003-08-12
Posts: 8
Posted: Thu, 2004-10-07 12:39

I have last version of gallery and when I run stats.php everytime shows same pictures.

http://www.slo-foto.com/gallery/stats.php?type=date&album=new

Can anyone help me ?

Regards,

Marjan

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2004-10-07 13:30

slo-foto,
you have 1.4.5-cvs-b219 stats.php has not been updated for this version yet. I will look at it after work today if this does not work:
look for require_once(dirname(__FILE__) . '/init.php'); and add

// added list to get the url variables from the url
list($type, $sca, $sal, $sde, $scd, $sud, $svi, $svo, $sra, $sco, $sac, $sav, $sao, $sgr, $rev, $ppp, $rows, $cols, $total, $ty, $tm, $td, $showGrid) = getRequestVar(array('type', 'sca', 'sal', 'sde', 'scd', 'sud', 'svi', 'svo', 'sra', 'sco', 'sac', 'sav', 'sao', 'sgr', 'rev', 'ppp', 'rows', 'cols', 'total', 'ty', 'tm', 'td', 'showGrid'));

Dave

 
slo-foto

Joined: 2003-08-12
Posts: 8
Posted: Thu, 2004-10-07 18:45

Thanks. Some things work better, but some not....when I try "random" it's ok. When I try "comments" show ok last comments, but when I try to go to next page ("page2") I see only first page, etc.

Sorry for my English.

Regards,

Marjan

floridave wrote:
slo-foto,
you have 1.4.5-cvs-b219 stats.php has not been updated for this version yet. I will look at it after work today if this does not work:
look for require_once(dirname(__FILE__) . '/init.php'); and add

// added list to get the url variables from the url
list($type, $sca, $sal, $sde, $scd, $sud, $svi, $svo, $sra, $sco, $sac, $sav, $sao, $sgr, $rev, $ppp, $rows, $cols, $total, $ty, $tm, $td, $showGrid) = getRequestVar(array('type', 'sca', 'sal', 'sde', 'scd', 'sud', 'svi', 'svo', 'sra', 'sco', 'sac', 'sav', 'sao', 'sgr', 'rev', 'ppp', 'rows', 'cols', 'total', 'ty', 'tm', 'td', 'showGrid'));

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2004-10-08 00:05

try this on your "bleeding edge" version:

// added list to get the url variables from the url 
list($debug, $page, $type, $sca, $sal, $sde, $scd, $sud, $svi, $svo, $sra, $sco, $sac, $sav, $sao, $sgr, $rev, $ppp, $rows, $cols, $total, $ty, $tm, $td, $showGrid) = getRequestVar(array('debug', 'page', 'type', 'sca', 'sal', 'sde', 'scd', 'sud', 'svi', 'svo', 'sra', 'sco', 'sac', 'sav', 'sao', 'sgr', 'rev', 'ppp', 'rows', 'cols', 'total', 'ty', 'tm', 'td', 'showGrid'));
 
slo-foto

Joined: 2003-08-12
Posts: 8
Posted: Fri, 2004-10-08 05:21

floridave: THANKS! Now work.

Regards,

Marjan

 
slo-foto

Joined: 2003-08-12
Posts: 8
Posted: Fri, 2004-10-08 05:37

floridave: THANKS! Now work.

Regards,

Marjan

 
Haplo
Haplo's picture

Joined: 2004-03-29
Posts: 82
Posted: Sun, 2004-10-17 20:32

about time i upgraded to latest stats ;)

...love the idea of caching

problem is the cache is not making the pages load faster :( ...and the time cache is created the load time is doubled...

there must be something really slowing things down...

btw, why the need to write ALL pics to file when i want to cache for example the 10 latest?

date
ap 1500 pics
apache
gallery 1.4.4

 
Haplo
Haplo's picture

Joined: 2004-03-29
Posts: 82
Posted: Sun, 2004-10-17 21:20

ok

this is the code passage that takes ALL time:

// Retrieve all albums and store in list array.
// This can be done using new AlbumDB() but this doesn't work
// on all hosts.
$numTopAlbums = $albumDB->numAlbums($gallery->user);

for ($i = 1; $i<=$numTopAlbums; $i++)
{
   $topAlbum = $albumDB->getAlbum($gallery->user, $i);
   $list[] = $topAlbum;
   recurseAlbums( $topAlbum );
}

shouldn't this only be called when cache isn't available or when cache is created?

since this population takes ALL time, THIS data should be cached ;)

 
Haplo
Haplo's picture

Joined: 2004-03-29
Posts: 82
Posted: Wed, 2004-10-20 19:43

no comment?

does this meean the cache is actually speeding things up on your sites...

i removed the cache code altogether (for testing) and found the load time were not altetered at all ;)

 
Haplo
Haplo's picture

Joined: 2004-03-29
Posts: 82
Posted: Thu, 2004-10-21 18:48

nevermind...here's a quick fix

problem was the $list array was HUGE for large Galleries and took several secs to generate...and this is not required once a cache exists...

Also, as soon as a cache exists you only have to allocate a few albums, reading from top of the cache file...

Here's the fix

FIND AND DELETE

// Retrieve all albums and store in list array.
// This can be done using new AlbumDB() but this doesn't work
// on all hosts.
$numTopAlbums = $albumDB->numAlbums($gallery->user);
for ($i = 1; $i<=$numTopAlbums; $i++)
{
   $topAlbum = $albumDB->getAlbum($gallery->user, $i);
   $list[] = $topAlbum;
   recurseAlbums( $topAlbum );
}

$numAlbums = count($list);
if ($debug)
{
   echo "Number Albums = ". $numAlbums . "<br>";
}

FIND

if ( !$useCache )
{

AFTER ADD

// Retrieve all albums and store in list array.
// This can be done using new AlbumDB() but this doesn't work
// on all hosts.
$numTopAlbums = $albumDB->numAlbums($gallery->user);
for ($i = 1; $i<=$numTopAlbums; $i++)
{
   $topAlbum = $albumDB->getAlbum($gallery->user, $i);
   $list[] = $topAlbum;
   recurseAlbums( $topAlbum );
}

$numAlbums = count($list);
if ($debug)
{
   echo "Number Albums = ". $numAlbums . "<br>";
}

FIND

if ( $showGrid )
{
   $imageCellWidth = floor(100 / $numCols) . "%";
   $statsAlbums = array();
   $photoInfos  = array();
   $numPhotos = 0;
   for ($j = $startPhoto; $j < $totalPhotosToDisplay && $j < $startPhoto + $photosPerPage; ++$j) 
   {

AFTER ADD

      $photoInfo = $arrPhotos[$j];

      $childAlbumName = $photoInfo['albumName'];
      $childAlbum = new Album();
      $childAlbum->load($childAlbumName);
	  
      $statsAlbums[$numPhotos] = $childAlbum;
      $photoInfos[$numPhotos]  = $photoInfo;
      ++$numPhotos;

/*

FIND

      if (!$foundAlbum)
         $cacheReloadRequired = true;

AFTER ADD

*/

FIND

   for ( $j = $startPhoto + $numPhotos; $j < $totalPhotosToDisplay && $j < $startPhoto + $photosPerPage; ++$j)
   {
      $statsAlbums[$j] = NULL;
   }

REPLACE WITH

/*
   for ( $j = $startPhoto + $numPhotos; $j < $totalPhotosToDisplay && $j < $startPhoto + $photosPerPage; ++$j)
   {
      $statsAlbums[$j] = NULL;
   }
*/

FIND

        $photoInfo = $arrPhotos[$j];
         for ( $i = 0; $i < $numAlbums; ++$i )
         {
            if ( !strcmp($photoInfo['albumName'], $list[$i]->fields['name']) )
            {
               $statsAlbum = $list[$i];
               break;
            }
         }

REPLACE WITH

      	$photoInfo = $arrPhotos[$j];

      	$childAlbumName = $photoInfo['albumName'];
      	$childAlbum = new Album();
      	$childAlbum->load($childAlbumName);
	  
      	$statsAlbum = $childAlbum;

		/*
         $photoInfo = $arrPhotos[$j];
         for ( $i = 0; $i < $numAlbums; ++$i )
         {
            if ( !strcmp($photoInfo['albumName'], $list[$i]->fields['name']) )
            {
               $statsAlbum = $list[$i];
               break;
            }
         }
		*/
 
giorgos
giorgos's picture

Joined: 2002-08-19
Posts: 115
Posted: Mon, 2004-11-08 23:42

Haplo,

brilliant. works fine. from 18 seconds (cashe enabled) to 0.8 (with your modifications). This is a real performance improvement.

only issue is that when the 'refreshcache' url variable is used it takes almost for ever. (275 seconds)!!!!. That's why I 'm using now refresh cache every 24 hours.

Any idea why is this occuring?

Thank you

Giorgos

 
arwenoid

Joined: 2004-11-22
Posts: 4
Posted: Mon, 2004-11-22 22:22

I'm having a weird problem when I try to run this script. In fact, I've never quite seen this particular behaviour before...

I go to where I've uploaded the script:

http://snapshots.arwen.org/stats.php

(Gallery itself is here: http://snapshots.arwen.org/)

...and, nothing happens. Well, in Firefox, nothing happens. In IE, it gives me the default "Cannot find server" nonsense.

I'm perplexed. Not being a programmer, I don't even know where to begin. I don't have access to my error logs, although I've requested them -- hopefully, they'll show something useful.

In the meantime... any ideas?

Thanks,
Donna

 
decomike

Joined: 2004-11-25
Posts: 13
Posted: Sun, 2005-01-02 11:07

I'm running Gallery 1.5-cvs and use stats version 2.03. Added the line

list($debug, $page, $type, $sca, $sal, $sde, $scd, $sud, $svi, $svo, $sra, $sco, $sac, $sav, $sao, $sgr, $rev, $ppp, $rows, $cols, $total, $ty, $tm, $td, $showGrid) = getRequestVar(array('debug', 'page', 'type', 'sca', 'sal', 'sde', 'scd', 'sud', 'svi', 'svo', 'sra', 'sco', 'sac', 'sav', 'sao', 'sgr', 'rev', 'ppp', 'rows', 'cols', 'total', 'ty', 'tm', 'td', 'showGrid'));

Most is working now but if i call "Latest shots" (cdata) i get "Capture Date: //00". Anyone got the solution for this problem?

http://www.duikfoto.com/site

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2005-01-02 18:10

Are you using myriagon version or are you usng the version that comes with V1.5-cvs? If you are using the one with V1.5-cvs then I suggest you start a new thread.

Try adding $cdate to the list and cdate to the array like all the others.

 
dbmathis

Joined: 2003-12-10
Posts: 52
Posted: Sat, 2005-01-15 16:26

I am running a postnuke site.

Is there any way to embed this awesome addon into postnuke?

 
fluor

Joined: 2003-12-01
Posts: 68
Posted: Sun, 2005-01-16 02:03

myriagon. excellent!!!
i cannot understand why gallery doesnt use this? e.g. a small table at left with clickable last images.. well well.

 
dbmathis

Joined: 2003-12-10
Posts: 52
Posted: Sun, 2005-01-16 04:19

? What?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2005-01-16 06:29

Version 1.5 will have this. It is only slighly different. test the latest bleeding edge version.

Dave

 
dbmathis

Joined: 2003-12-10
Posts: 52
Posted: Sun, 2005-01-16 15:07

Hello? There is a way to make this addon embed into postnuke?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2005-01-17 02:45

dbmathis,
I know the thread is 22 pages long but I have read them all..... Yes it can be done:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=86408#86408
and the next couple of posts.
Try links like:
modules.php?set_albumName=&op=modload&name=gallery&file=index&include=stats.php&type=views

 
dbmathis

Joined: 2003-12-10
Posts: 52
Posted: Tue, 2005-01-18 01:48

I have read and I don't understand? I can't get it embedded in postnuke .750?

http://www.themathisfamily.com

user: Guest
pass: redpass

I have the links on the left hand side.

How do i get this embedded in postnuke?

Any help is appreciated.

dbmathis

 
dbmathis

Joined: 2003-12-10
Posts: 52
Posted: Tue, 2005-01-18 02:33

I figured it out. I had error reporting turned offf in my php.ini file for security purposes and could not figure out why i was getting a blank screen :) instead of errors..

My basedir in stats.php was set wrong for the config file.

Thanks guys and gals.

 
scoobidoobidooooo
scoobidoobidooooo's picture

Joined: 2003-11-06
Posts: 12
Posted: Fri, 2005-01-28 11:24

Hey,

I upgraded the gallery and tupgraded the stats.php too (it looks like that it's the same file). But I got an error saying:

Fatal error: Call to undefined function: getitemsvotes() in /var/www/html/gallery/stats.php on line 372

Thanks for your help,

Stéphane

edit to say: don't be stupid like me, re-apply the patches :roll:

 
JonHurtt

Joined: 2005-01-05
Posts: 8
Posted: Fri, 2005-01-28 23:22

myriagon,

i noticed on your website when you viewed a picture there was a link at the bottom to vote for the pictures and the vote information. Can you give me some hints on how you did this?

thanks and great job very impressive.

 
JonHurtt

Joined: 2005-01-05
Posts: 8
Posted: Thu, 2005-02-03 00:20

^^does anyone know? :wink:

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-02-03 01:09

JonHurtt,

Quote:
Voting
------
Code patches have been included to implement voting in a more intuitive
way than the standard voting that comes with Gallery.

You can see it working at www.tearoom.me.uk/stats?type=votes

This more intuitive voting allows a user to vote for an image or images.
stats.php can show the images that have the most votes by using:

stats?type=votes

stats.php can also provide a link next to the image to allow a
user to make a vote.

To implement this voting on your site, first and this is VERY IMPORTANT,
backup your gallery directory and albums directory. Then using telnet or ssh,
change to the gallery/classes directory and run:

patch -p0 < AlbumItemVote.patch
patch -p0 < AlbumVote.patch

Now you can set the variables at the top of stats.php to turn the voting on:

$showVotes = 1;
$showAddVote = 1;

To test voting, click on one of the vote links in stats.php which will confirm
your vote has been accepted and the vote count should be incremented by 1

 
JonHurtt

Joined: 2005-01-05
Posts: 8
Posted: Thu, 2005-02-03 01:24

floridave,

Thanks for the resposne but I must of not been clear about my problem. I have the voting up and running so if i call:
stats.php?type=votes
and then procede to [add a vote]

it works fine. I am trying to get the same effect with the add vote button but in the situation if someone is at the gallery main album page and clicks on the album and then a picture I want them to be able to click add vote there and so they dont have to view the top voted pictures or the latest images just to vote for an image but they can find an image in the gallery themseleves and vote that way.

for example at
http://www.tearoom.me.uk/gallery/view_photo.php?set_albumName=landscapes&id=skye
there is a link at the bottom to vote for the image this is what i am trying to achieve. Thanks for the response and i hope you can help me futher

 
JonHurtt

Joined: 2005-01-05
Posts: 8
Posted: Thu, 2005-02-03 01:52

so i have found out where to place the link... i just need the code to generate the link... i think i might have figured it out but

what are the variable names for the albums name, pic name and link?

that should put me on my way... i am also going to get it work embedded in PostNuke

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-02-03 06:08

JonHurtt,

verify that you have this in util.php

function simpleVoteLink() {
	global $gallery;
	$urlargs['set_albumName'] = $gallery->album->fields['name'];
	$urlargs['id'] = $gallery->album->getPhotoId($GLOBALS['index']);
	$urlargs['url'] = urlencode(makeAlbumUrl($gallery->session->albumName,($gallery->album->getPhotoId($GLOBALS['index']))));
	$buf  = "\n".
		"&amp;&amp;<span class=\"editlink\">" .
		"<a href=\"" . makeGalleryUrl("vote.php", $urlargs) . "\">" .
		"[add vote]</a>\n" .
		"</span>\n";
	    echo $buf;
	}

then in view_photo.php add this

/*
** Block for Voting
*/

	echo "Votes: ";
	echo $gallery->album->getItemSVotes($index);
	echo "<br>";
	simpleVoteLink();

just above

if ( canVote()) {
	echo "\n<!-- Voting pulldown -->\n";

You could put it insdie the if (canVote()) check but you will endup with two different styles of voting. It is up to you on the placement and formatting.

Dave

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Thu, 2005-02-03 20:08

Thanks Dave for all your help on this thread.

Jon - My Gallery implementation was heavily modded to add a new voting type "simple". I can select this type in admin mode in the same way that you can select "rank" or "critique" voting IIRC. My code is still based on an old Gallery version so the code may not look exactly as it is now. Anyway FWIW here's how my view_photo.php looks now:

if ( canVote() )
{
       echo makeFormIntro("view_photo.php", array("name" => "vote_form",
                                       "method" => "POST"));
   ?>
   <script language="javascript1.2" type="text/JavaScript">
 function chooseOnlyOne(i, form_pos, scale)
 {
   for(var j=0;j<scale;j++)
     {
         if(j != i)
           {
               eval("document.vote_form['votes["+j+"]'].checked=false");
           }
    }
    document.vote_form.submit("Vote");
 }
   </script>
       <?php
       print "<input type=hidden name=id value=$id>";
       addPolling("item.$id", -1, true, $index, $id);
       print '</form>';
}
if (  $gallery->album->getPollType() == "simple" &&
      $gallery->album->getItemSVotes($index) > 0 )
{
     echo "<span class=\"modcaption\">Votes: ". $gallery->album->getItemSVotes($index)."</span>";
}

I had to change the call to addPolling() to pass extra data in - not nice...

The code in my util.php to support this is:

function addPolling ($id, $form_pos=-1, $immediate=true, $index=-1, $realid=-1)
{
        global $gallery;

        if ( $gallery->album->getPollType() == "simple" && !$immediate )
        {
                return;
        }
        if ( !canVote())
        {
                return;
        }
        if (isset($gallery->album->fields["votes"][$id][getVotingID()])) {
                $current_vote =
                        $gallery->album->fields["votes"][$id][getVotingID()];
        } else {
                $current_vote = -1;
        }
        $nv_pairs=$gallery->album->getVoteNVPairs();
        if ( $gallery->album->getPollType() == "simple" )
        {
                if ( !$gallery->session->votedForItem[$gallery->session->albumName][$realid])

                {
                        $urlargs['set_albumName'] = $gallery->session->albumName;
                        $urlargs['id'] = $realid;
                        $urlargs['url'] = urlencode(makeGalleryUrl("view_photo.php", $urlargs));
                        echo "<a href=\"" . makeGalleryUrl("vote.php", $urlargs) . "\">";
                        print $gallery->album->getPollHint();
                        echo "</a><br>";
                }
        }
        else
        {
                print $gallery->album->getPollHint();
        }
        if ($gallery->album->getPollScale() == 1 && $gallery->album->getPollType() == "critique")
        {
...etc.....

I must admit that I wasn't very happy with this code and what I had to do to workaround the existing code. You might be better off following Dave's more straightforward approach.

Jeremy

 
JonHurtt

Joined: 2005-01-05
Posts: 8
Posted: Thu, 2005-02-03 20:08

thanks... took dave's way and it works wonders... just have to make it work with PostNuke thanks guys and good work. 8)

 
henkbos

Joined: 2003-07-17
Posts: 36
Posted: Tue, 2005-02-15 14:53

Hi,

Great piece of code and it works fine.

I have it (alomst) running on my nuke site (uae-photo.com). To make it visible in the modules, I created a new folder and placed the php files in there, changed the reference to $GALLERY_BASEDIR, which now points to my gallery. So far so good.

However the appearance is not like it is embedded, but like the standard gallery page. Which (line of) code do I need to change to make it look embedded, like my gallery is?

Another question: no matter which variable I change the appearance remains the same. Which variables do I need to change to get the same pictures selected as shown in this link

Appreciate the input.

Henk

 
marandb

Joined: 2005-02-22
Posts: 1
Posted: Tue, 2005-02-22 07:12

Hola,
I would first like to say that this mod is awesome. It will be a great addition to my site. (When I get it to work :D )

That said, I am having some problems though.

I am running PHPNuke 7.5, Gallery 1.156.2.5 & Stats 2.03.

1) My first problem is that I cannot change the configuration of the stats mod w/o modifying the default file. Adding & modifying the stats.config.php changes nothing. (This doesn't but me much, but everything says dont change this file.

2) My biggest problem is that no matter what function I call, the pic order is always the same! I have tried changing everything. This is common for calling through PHPNuke & the standalone gallery.

3) The rows / columns settings don't seem to change anything. This would be very nice to have.

I am sure there are other issues but these are what I have noticed up front. All in all it doesn't seem like any / many of the functions are being accessed right.

PHPNuke Gallery Main
http://www.minifigcustomizationnetwork.com/modules.php?name=gallery

PHPNuke Gallery Stats
http://www.minifigcustomizationnetwork.com/modules.php?op=modload&name=gallery&file=index&include=stats.php&type=views

Standalone Gallery Stats
http://www.minifigcustomizationnetwork.com/modules/gallery/stats.php&type=views

MODIFICATIONS I HAVE MADE:
Adding to index.php

                       "stats.php", 
                       "stats.php?type=views", 
                       "stats.php?type=date", 
                       "stats.php?type=comments", 
                       "stats.php?type=ratings", 
                       "stats.php?type=random",

Deleting the "./" from (Doesn't work w/o deleting it or changing to path to gallery - Both do the same thing)
$GALLERY_BASEDIR = '';

Changing a few settings in stats.config.default.php (Because as stated changing stats.config.php does nothing) Using the default file does not change my predicament.

Minor asthetic changes to albums.php, view_album.php & view_photo.php. (Again, restoring the default files does nothing)

Well, there we go. Thanks in advance to ANY help that anyone can provide. :D

-- Marand B.

 
tstockma

Joined: 2005-02-21
Posts: 12
Posted: Tue, 2005-02-22 22:23

I'm installing Gallery on my Geeklog-driven site, and would love to try this mod, it sounds great.

Unfortunately I can't get to the tearoom web site at all, maybe it's down temporarily...all I see is the top-level directory tree, and going directly for the download is "not found".

So is there an alternate download site, or does anyone have the most recent stable tarball you could send?

Thanks for any help!

Tom in Colorado Springs, Colorado, USA

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Wed, 2005-02-23 19:47

Most of the tearoom website is back now. I've had to restore from backup as some script kiddie ran a script that deleted lots of files on my ISPs server including the gallery directories... :(

 
tstockma

Joined: 2005-02-21
Posts: 12
Posted: Wed, 2005-02-23 20:41

Oh man, that sucks! Sorry to hear it, sounds like the recovery has been painful...

I'm still not getting your index page or the download. I'm using the links given at the very start of this thread, maybe there's newer links? Or maybe there's some server caching the pages between here (Colorado, USA) and your server that hasn't flushed yet.

www.tearoom.me.uk - shows files & dirs in the top-level web directory
www.tearoom.me.uk/stats.tar.gz - gets 404 not found

I'll simply be patient, I'll check back either late tonight or tomorrow morning, these are USA "mountain zone" times.

Again, sorry about your loss there...

Tom

 
myriagon

Joined: 2004-01-22
Posts: 130
Posted: Wed, 2005-02-23 22:16

Ok - stats.tar.gz is back in its normal place. The recovery has not been too bad as I do have good backups. If I could do it myself the site would have been back days ago but unfortunately the ISP has to restore the files which takes time.

 
tstockma

Joined: 2005-02-21
Posts: 12
Posted: Thu, 2005-02-24 08:32

Hi, I hope this isn't something I'm not supposed to ask because I'm trying to do something embedded in another CMS...I'm using Gallery inside GeekLog, a fairly standard PHP CMS web application.

Love Gallery! Love this plugin!

However, I'm trying to use it to display 3 random photos inside a right-column set of block items. I've following the readme's instructions to call it with ?type=random&sca=0&sal=0&sde=0&sco=0... and all the rest of the options available on the URL call, ending with 120-pixels 3-photos 3-max-photos 3-rows 1-col.

(I could set all these in the config file, but that'd prevent other full-page calls to gallery/stats.php.)

That above call gets the thumbnails just fine, but stats.php "wraps" itself within the Gallery HTML, and I want just the 3 images.

Can stats be used to only output the 3 photo thumbnails, nothing else (without extensive customizaation)? Or am I really using the wrong mod to get a column of 3 thumbnails?

Maybe what I really want is instead of calling stats.php, to dissect the code and figure out what proc call it makes when it's ready to output the thumbnails...any hints appreciated.

Thanks for any help! Tom

 
Tresk
Tresk's picture

Joined: 2004-12-24
Posts: 13
Posted: Wed, 2005-03-23 19:58

can i use this hack with IIS??
or are they some other hack i can use to get the same functions?

(dont have time to read 24 pages to fínd out)

//Danne

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2005-03-23 20:10
Tresk wrote:
(dont have time to read 24 pages to fínd out)

It should. I doubt that there is any issues.....read the first post and try it out. It is very simple. and there is a README with the script.

Dave

 
Tresk
Tresk's picture

Joined: 2004-12-24
Posts: 13
Posted: Wed, 2005-03-23 21:06

ok...Thx

i'll try it :)