function plugin_ls2_convert() { global $script, $vars, $_ls2_msg_title; $params = array('link' => FALSE, 'title' => FALSE, 'include' => FALSE, 'reverse' => FALSE, 'compact' => PLUGIN_LS2_LIST_COMPACT, '_args' => array(), '_done' => FALSE); $args = array(); $prefix = ''; if (func_num_args()) { $args = func_get_args(); $prefix = array_shift($args); } if ($prefix == '') { $prefix = strip_bracket($vars['page']) . '/'; } foreach ($args as $arg) { plugin_ls2_check_arg($arg, $params); } $title = !empty($params['_args']) ? join(',', $params['_args']) : str_replace('$1', htmlsc($prefix), $_ls2_msg_title); // Auto if (!$params['link']) { return plugin_ls2_show_lists($prefix, $params); } $tmp = array(); $tmp[] = 'plugin=ls2&prefix=' . rawurlencode($prefix); if (isset($params['title'])) { $tmp[] = 'title=1'; } if (isset($params['include'])) { $tmp[] = 'include=1'; } return '<p><a href="' . $script . '?' . join('&', $tmp) . '">' . $title . '</a></p>' . "\n"; }
function plugin_ls2_convert() { global $vars; if (!isset($vars['page'])) { return ''; } $params = array('link' => FALSE, 'title' => FALSE, 'include' => FALSE, 'reverse' => FALSE, 'compact' => PLUGIN_LS2_LIST_COMPACT, '_args' => array(), '_done' => FALSE); $args = func_get_args(); $prefix = ''; if (!empty($args)) { $prefix = array_shift($args); } if ($prefix == '') { $prefix = strip_bracket($vars['page']) . '/'; } foreach ($args as $arg) { plugin_ls2_check_arg($arg, $params); } $title = !empty($params['_args']) ? join(',', $params['_args']) : str_replace('$1', htmlsc($prefix), T_("List of pages which begin with ' \$1'")); // Auto if (!$params['link']) { return '<div class="list_pages">' . plugin_ls2_show_lists($prefix, $params) . '</div>'; } $tmp = array(); if (isset($params['title'])) { $tmp[] = 'title=1'; } if (isset($params['include'])) { $tmp[] = 'include=1'; } return '<p><a href="' . get_cmd_uri('ls2', $prefix) . join('&', $tmp) . '">' . $title . '</a></p>' . "\n"; }
function plugin_ls2_convert() { global $script, $vars; $qm = get_qm(); $qt = get_qt(); //---- キャッシュのための処理を登録 ----- if ($qt->create_cache) { $args = func_get_args(); return $qt->get_dynamic_plugin_mark(__FUNCTION__, $args); } //------------------------------------ $params = array('link' => FALSE, 'title' => FALSE, 'include' => FALSE, 'reverse' => FALSE, 'compact' => PLUGIN_LS2_LIST_COMPACT, '_args' => array(), '_done' => FALSE); $args = array(); $prefix = ''; if (func_num_args()) { $args = func_get_args(); $prefix = array_shift($args); } if ($prefix == '') { $prefix = strip_bracket($vars['page']) . '/'; } array_walk($args, 'plugin_ls2_check_arg', $params); $title = !empty($params['_args']) ? join(',', $params['_args']) : str_replace('$1', htmlspecialchars($prefix), $qm->m['plg_ls2']['title']); // Auto if (!$params['link']) { return plugin_ls2_show_lists($prefix, $params); } $tmp = array(); $tmp[] = 'plugin=ls2&prefix=' . rawurlencode($prefix); if (isset($params['title'])) { $tmp[] = 'title=1'; } if (isset($params['include'])) { $tmp[] = 'include=1'; } return '<p><a href="' . $script . '?' . join('&', $tmp) . '">' . $title . '</a></p>' . "\n"; }