How to hide the "By:____" field in Under Photo Text

bgrantland
bgrantland's picture

Joined: 2012-02-15
Posts: 27
Posted: Sun, 2012-04-29 20:41

I am running Gallery 3.0.2. The theme is Clean Canvas Dark. I have installed a number of modules, including Under Photo Text (version 1) and About This Photo (version 3).

Under each photo I want to display only the title and description fields. Something is automatically adding a field above the title field - "By:" followed by my name. I assume that field indicates who uploaded the photo, but I will be uploading all the photos so it has no meaning and is just confusing because many of the photos are by other people.

How can I turn this off? I went into advanced settings and hid some other fields by putting a 0 in the field, but I can't find a field for this.

Brenda

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2012-04-29 21:04
Quote:
Something is automatically adding a field

the info module. Uninstall it.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2012-04-29 21:08

modules/info/helpers/info_theme.php
remove:

    if ($item->owner) {
      $results .= "<li>";
      if ($item->owner->url) {
        $results .= t("By: <a href=\"%owner_url\">%owner_name</a>",
                      array("owner_name" => $item->owner->display_name(),
                            "owner_url" => $item->owner->url));
      } else {
        $results .= t("By: %owner_name", array("owner_name" => $item->owner->display_name()));
      }
      $results .= "</li>";
    }

or edit as desired.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Sun, 2012-04-29 21:19

Darn, floridave, beat me to it.

 
bgrantland
bgrantland's picture

Joined: 2012-02-15
Posts: 27
Posted: Sun, 2012-04-29 21:31

That was so simple! I deleted that chunk of code and it works perfectly now! Thanks!

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Mon, 2012-04-30 14:52

Maybe an additional request: I'd like to put the owner-info only on the thumbs to the 'big' picture, but not on the album-thumbs. Is there a way to handle this?

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Mon, 2012-04-30 15:24

A I found a solution in the album.html.php in the theme-folder. With if/else
<? if ($child->is_album()): ?>
it works fine :-)

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Mon, 2012-04-30 16:05

Rockbär: You're turning in to quite the expert now! :)

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Mon, 2012-04-30 16:45

Not really ;-) Just "try and error"

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Mon, 2012-04-30 16:47
Rockbär wrote:
Not really ;-) Just "try and error"

Ah, a 'developer' after my own heart then! Alles Gut!

 
chaosdax

Joined: 2005-12-27
Posts: 37
Posted: Fri, 2012-08-10 04:11

Hmm...My main page goes completely white if I remove that block of code. Loads back up fine if I restore the file to the original with the code. Would the info module conflict with a theme where the theme might be expecting it and therefore causing not to load?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2012-08-10 05:47
Quote:
That was so simple! I deleted that chunk of code and it works perfectly now! Thanks!

chaosdax wrote:
My main page goes completely white if I remove that block of code.

Sounds to me like you might be removing more than what was suggested.
Uninstall info module.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
chaosdax

Joined: 2005-12-27
Posts: 37
Posted: Fri, 2012-08-10 06:18

Nope, I only removed exactly the code indicated. I will probably uninstall it, just have to keep it until I fugue out what else I want in the sidebar so it's not empty because I don't actually want to remove the sidebar.