Adding new fields under 'Album Info'

iankearns

Joined: 2011-12-19
Posts: 14
Posted: Mon, 2011-12-19 14:43

Hi there

Our charity is happily using Gallery 3.0.2 however I want to make a small change and I wonder if someone can advise as my skills do not extend to PHP etc?

When viewing a photo, I wish to add another section under the 'Album Info' which is displayed on the right-hand side of the image. I wish to include information to whom the copyright of the image belongs to and should anyone wish to use the image then who they accredit the image rights to.

If anyone can help then I would be very grateful

regards and best wishes

Ian

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2011-12-19 15:05

Does this 'copyright' info come from the image or is it just some text that you want to add?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
iankearns

Joined: 2011-12-19
Posts: 14
Posted: Mon, 2011-12-19 16:10

Hi Dave

It is simply some text that I wish to add. The accreditation may likely differ to that of the copyright especially if the image has been 'donated' to our charity.

regards

Ian

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2011-12-19 17:45

Edit modules/info/views/info_block.html.php with a text editor.
Change

  <?  endforeach; ?>
</ul>

to

  <?  endforeach; ?>
  <li>
    <strong class="caption">Copyright:</strong> all rights reserved for these items.
  </li>
</ul>

Edit as you need. Do you need it translatable as well?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2011-12-19 17:46

More code could be added to have different text for albums versus items.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
iankearns

Joined: 2011-12-19
Posts: 14
Posted: Mon, 2011-12-19 18:20

Thanks for the reply.

Would it be possible to enable it so the field could be different on a per album basis?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2011-12-19 19:32

You could do a bunch of if() statements checking album names or album owner or I think the custom fields module might be a better option.

Dave

____________________________________________
Blog & G2 || floridave - Gallery Team

 
iankearns

Joined: 2011-12-19
Posts: 14
Posted: Mon, 2011-12-19 20:06

Custom fields sounds like a plan. Do they install in the same as other CMS like Joomla?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2011-12-19 21:00

http://codex.gallery2.org/Gallery3:Modules:custom_fields
If the directions are not detailed enough, please be specific with your question.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team