Announcement

#1 2009-09-30 16:45:35

a1000
Member
2009-09-23
19

adding a small icon

Hi folks!

I've got a new idea (=

I would like to add a small icon in this place:

http://img97.imageshack.us/img97/2870/heref.jpg

Which file do I have to edit?

Offline

 

#2 2009-09-30 18:15:18

P@t
Piwigo Team
Nice
2007-06-13
4098

Re: adding a small icon

You can do it with a personnal plugin:

- Install and activate LocalFiles Editor.
- Go to 5th tab (personnal plugin)
- add this code:

add_event_handler('loc_begin_index', 'add_personnal_icon');

function add_personnal_icon()
{
  global $template;

  $code = '<li><a href="http://my_link" title="My title" rel="nofollow"><img src="./path/to/my_icon.png" class="button" alt="My title" /></a></li>';

  $template->concat('PLUGIN_INDEX_ACTIONS', $code);
}

- Save the file.
- Don't forget to install and activate your personnal plugin.

Last edited by P@t (2009-09-30 18:15:42)


P@t

Offline

 

#3 2009-09-30 19:32:17

a1000
Member
2009-09-23
19

Re: adding a small icon

Hi P@t !

Thank you for your reply!

I did everything as you said, but unhappilly, the plugin doesn't show the new image. this is what I wrote:

http://img401.imageshack.us/img401/6043/screenaw.jpg

well, I will try to add a image map to the banner, then.

Thank you again.

Offline

 

#4 2009-09-30 21:31:15

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: adding a small icon

<?php

add_event_handler('loc_....


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#5 2009-10-01 03:52:24

a1000
Member
2009-09-23
19

Re: adding a small icon

Hi VDigital!

I tried again, but it didn't work...

Offline

 

#6 2009-10-01 07:13:19

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: adding a small icon

Sorry ! It normal php syntax, ending line:
...
}
?>

Final version:

<?php
add_event_handler('loc_begin_index', 'add_personnal_icon');

function add_personnal_icon()
{
  global $template;

  $code = '<li><a href="http://my_link" title="My title" rel="nofollow"><img src="./path/to/my_icon.png" class="button" alt="My title" /></a></li>';

  $template->concat('PLUGIN_INDEX_ACTIONS', $code);
}
?>


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact