A few questions

zake

Joined: 2002-10-20
Posts: 6
Posted: Sun, 2002-10-20 10:32

I would add/change the following to gallery:

1. New nested album should be at posistion 1.

2. A feature that sends mail to my friends when I add a new album.

Has anyone done this or know how to do these changes?

Kristjan

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Mon, 2002-10-21 01:52

1. New nested album should be at posistion

Try the "<!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpWiki&amp;file=index&amp;pagename=Gallery%20sorting%20tweak" TARGET="_blank">Gallery sorting tweak</A><!-- BBCode End -->" to add to the front.

2. A feature that sends mail to my friends when I add a new album.

Try <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpWiki&amp;file=index&amp;pagename=Send%20me%20an%20email%20when%20something%20is%20uploaded%20to%20my%20gallery" TARGET="_blank">Send me an email when something is uploaded to my gallery</A><!-- BBCode End -->

Tons more tweaks always located at: <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpWiki&amp;file=index&amp;pagename=Gallery%20User%20Guide" TARGET="_blank">User Guide > Advanced Administration > Customizing</A><!-- BBCode End -->

Beckett (beck@beckettmw.com)

 
zake

Joined: 2002-10-20
Posts: 6
Posted: Mon, 2002-10-21 11:55

1. The gallery sorting tweak seems to apply only to images, not albums (and sub-albums).

2. In do_command.php, under " else if (!strcmp($cmd, "new-album")) " I added

mail("someone@somecom.com","new album added");

This sends a mail whenever I add a new album. I would like to add album information in the mail, like title and such. Where can I get this info?

Kristjan

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Mon, 2002-10-21 18:05

$gallery->album->fields['title'] will give you the current album's title.
$gallery->album->fields['description'] gives the album's description.
You can look where you were in do_command.php for more fields.

Something to think about... if you send this right after you create a new album, the default values will be sent, such as "Untitled" and "No Description" for the above two, which isn't too exciting for the receiver of the e-mail. So you might have to think a bit harder about when it is exactly that should generate the e-mail. Suppose someone adds a new album, but doesn't put anything into it until a week later?

-Beckett (beck@beckettmw.com)