本文整理汇总了PHP中media_searchlist函数的典型用法代码示例。如果您正苦于以下问题:PHP media_searchlist函数的具体用法?PHP media_searchlist怎么用?PHP media_searchlist使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了media_searchlist函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tpl_mediaContent
/**
* prints the "main content" in the mediamanger popup
*
* Depending on the user's actions this may be a list of
* files in a namespace, the meta editing dialog or
* a message of referencing pages
*
* Only allowed in mediamanager.php
*
* @triggers MEDIAMANAGER_CONTENT_OUTPUT
* @param bool $fromajax - set true when calling this function via ajax
* @author Andreas Gohr <andi@splitbrain.org>
*/
function tpl_mediaContent($fromajax = false)
{
global $IMG;
global $AUTH;
global $INUSE;
global $NS;
global $JUMPTO;
global $INPUT;
$do = $INPUT->extract('do')->str('do');
if (in_array($do, array('save', 'cancel'))) {
$do = '';
}
if (!$do) {
if ($INPUT->bool('edit')) {
$do = 'metaform';
} elseif (is_array($INUSE)) {
$do = 'filesinuse';
} else {
$do = 'filelist';
}
}
// output the content pane, wrapped in an event.
if (!$fromajax) {
ptln('<div id="media__content">');
}
$data = array('do' => $do);
$evt = new Doku_Event('MEDIAMANAGER_CONTENT_OUTPUT', $data);
if ($evt->advise_before()) {
$do = $data['do'];
if ($do == 'filesinuse') {
media_filesinuse($INUSE, $IMG);
} elseif ($do == 'filelist') {
media_filelist($NS, $AUTH, $JUMPTO);
} elseif ($do == 'searchlist') {
media_searchlist($INPUT->str('q'), $NS, $AUTH);
} else {
msg('Unknown action ' . hsc($do), -1);
}
}
$evt->advise_after();
unset($evt);
if (!$fromajax) {
ptln('</div>');
}
}
示例2: media_tab_search
/**
* Prints tab that displays search form
*
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_tab_search($ns, $auth = null)
{
global $lang;
$do = $_REQUEST['mediado'];
$query = $_REQUEST['q'];
if (!$query) {
$query = '';
}
echo '<div class="search">' . NL;
media_searchform($ns, $query, true);
if ($do == 'searchlist' || $query) {
media_searchlist($query, $ns, $auth, true, _media_get_sort_type());
}
echo '</div>' . NL;
}
示例3: media_tab_search
/**
* Prints tab that displays search form
*
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_tab_search($ns, $auth = null)
{
global $INPUT;
$do = $INPUT->str('mediado');
$query = $INPUT->str('q');
echo '<div class="search">' . NL;
media_searchform($ns, $query, true);
if ($do == 'searchlist' || $query) {
media_searchlist($query, $ns, $auth, true, _media_get_sort_type());
}
echo '</div>' . NL;
}
示例4: ajax_mediasearchlist
/**
* Return list of search result for the Mediamanager
*
* @author Tobias Sarnowski <sarnowski@cosmocode.de>
*/
function ajax_mediasearchlist()
{
global $conf;
require_once DOKU_INC . 'inc/media.php';
media_searchlist($_POST['ns']);
}