bonjour, s'il vous plait pouvez vous m'aider a indiquer la valeur d'une variable par defaut : category=35 , non avec l'url mais directement dans le code par defaut avec !isset

le framework est piwigo-openstreetmap sur github

https://github.com/Piwigo/piwigo-ope...ctions_map.php

exemple de fonctionnement, l'url permet de n'inclure que la categorie familie
https://nissennetz.de/galerie/osmmap...%2Ffamilie&v=2

par avance merci de votre aide.

le code en question pourrait etre

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function osm_get_items($page)
{
    // Limit search by category, by tag, by smartalbum
    $LIMIT_SEARCH="";
    $INNER_JOIN="";
    if (isset($page['section']))
    {
        if ($page['section'] === 'categories' and isset($page['category']) and isset($page['category']['id']) )
        {
            $LIMIT_SEARCH = "FIND_IN_SET(".$page['category']['id'].", c.uppercats) AND ";
            $INNER_JOIN = "INNER JOIN ".CATEGORIES_TABLE." AS c ON ic.category_id = c.id";
        }
        if ($page['section'] === 'tags' and isset($page['tags']) and isset($page['tags'][0]['id']) )
        {
            $items = get_image_ids_for_tags( array_reduce( $page['tags'], 'osm_get_page_tag_id' ) );
            if ( !empty($items) )
            {
                $LIMIT_SEARCH = "ic.image_id IN (".implode(',', $items).") AND ";
            }
        }
        if ($page['section'] === 'tags' and isset($page['category']) and isset($page['category']['id']) )
        {
            $LIMIT_SEARCH = "FIND_IN_SET(".$page['category']['id'].", c.uppercats) AND ";
            $INNER_JOIN = "INNER JOIN ".CATEGORIES_TABLE." AS c ON ic.category_id = c.id";
        }
    }
 
    $forbidden = get_sql_condition_FandF(
        array
        (
            'forbidden_categories' => 'ic.category_id',
            'visible_categories' => 'ic.category_id',
            'visible_images' => 'i.id'
        ),
        "\n AND"
    );