'category_id', 'visible_categories' => 'category_id', 'visible_images' => 'id' ), 'WHERE' ).' AND added_by = \''.$user['id'].'\' ;'; $result = pwg_query($query); $row = pwg_db_fetch_assoc($result); $nbp=count(array_from_query($query, 'id')); if (!is_a_guest() and !empty($row)) { $menu = & $menu_ref_arr[0]; if (($block = $menu->get_block('mbSpecials')) != null) { load_language('plugin.lang', SMP_PATH); $position = (isset($conf['SMP_position']) and is_numeric($conf['SMP_position'])) ? $conf['SMP_position'] : count($block->data)+1; array_splice($block->data, $position-1, 0, array('see_my_photos' => array( 'URL' => make_index_url(array('section' => 'see_my_photos')), 'TITLE' => l10n('My photos'), 'NAME' => l10n('My photos').' ('.$nbp.')', ) ) ); } } } function section_init_SMP() { global $tokens; if (in_array('see_my_photos', $tokens)) include(SMP_PATH . 'pagessmp.php'); } ?>