Including user name in block-random

adegutis

Joined: 2004-09-10
Posts: 34
Posted: Wed, 2005-06-08 14:00

Can someone help me with the code necessary to include the photo owner's name in the random-block in Gallery v1.5?

Thanks
Al

 
khsjr1970

Joined: 2004-04-24
Posts: 271
Posted: Thu, 2005-06-09 22:38

maybe adding this thread to the random block forum rather then the customization forum will get better results ?

it was a tad further down the list then here.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-06-09 23:06

moved

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-06-09 23:23
  		$owner = $album->getOwner($index);
                echo _("Owner:") . ' '. showOwner($owner);
 
adegutis

Joined: 2004-09-10
Posts: 34
Posted: Fri, 2005-06-17 15:19

That displays the album owner's name. Is it possible to display the Photo owner's name?

Thanks
Al

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2005-06-18 02:30
$owner=$gallery->album->getItemOwnerById($id);
echo _("Owner:") . ' '. showOwner($owner);

or

$owner=$gallery->album->getItemOwnerById($index);
echo _("Owner:") . ' '. showOwner($owner);

I hope? :oops:

 
adegutis

Joined: 2004-09-10
Posts: 34
Posted: Thu, 2005-07-07 13:21

I finally got around to trying your suggestions but it returns:

Fatal error: Call to a member function on a non-object in
random-block.php on line 102

which is the first line of additional code.

Any ideas?
Thanks