Announcement

#1 2020-09-22 17:46:35

Seeker
Member
2020-09-15
17

Edit Public Menu / Directory Permissions

Hi folks,

I'm wondering a couple things.

1) How do I edit the Public menu. I'd like to remove the "Calendar" link.

2) Which directories require "write" I'm assuming "uploads" and "plugins" are there any others?

Piwigo version: 2.10.2
PHP version: 7.3
MySQL version: MariaDB version 10.3.23
Piwigo URL: http://localhost

Offline

 

#2 2020-09-22 20:58:21

erAck
Only trying to help
2015-09-06
2035

Re: Edit Public Menu / Directory Permissions

1) Untested but should work: in include/menubar.inc.php line 228 find

    $block->data['calendar'] =
      array(
        'URL' =>
          make_index_url(
            array(
              'chronology_field' => ($conf['calendar_datefield']=='date_available'
                                      ? 'posted' : 'created'),
               'chronology_style'=> 'monthly',
               'chronology_view' => 'calendar'
            )
          ),
        'TITLE' => l10n('display each day with photos, month per month'),
        'NAME' => l10n('Calendar'),
        'REL'=> 'rel="nofollow"'
      );

and comment that entire assignment out, i.e. place /* before the block and */ after the block. The change will get overwritten by an update so you'll have to redo it.

2) The _data directory and its subdirectories also need to be writable for the web server user. Some extensions write to the local directory. And of course the entire tree for upgrades. The plugins/ directory IMHO needs to be writable only for updates.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2020-09-22 21:20:20

Seeker
Member
2020-09-15
17

Re: Edit Public Menu / Directory Permissions

Many thanks!

Cheers

Offline

 

#4 2020-09-22 23:05:30

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: Edit Public Menu / Directory Permissions

Hi :-)

personal plugin

add_event_handler('blockmanager_apply' , 'remove_item_menu', EVENT_HANDLER_PRIORITY_NEUTRAL+10);
function remove_item_menu($menu_ref_arr){
  if (($block = $menu_ref_arr[0]->get_block('mbSpecials')) != null){
    unset($block->data['calendar']);
  }
}


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Online

 

#5 2020-09-22 23:18:08

Seeker
Member
2020-09-15
17

Re: Edit Public Menu / Directory Permissions

Awesome. Many thanks!

Offline

 

Board footer

Powered by FluxBB

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