本文整理汇总了PHP中exist_plugin_convert函数的典型用法代码示例。如果您正苦于以下问题:PHP exist_plugin_convert函数的具体用法?PHP exist_plugin_convert怎么用?PHP exist_plugin_convert使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了exist_plugin_convert函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: plugin_monobook_popular_convert
/**
* @author lunt
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GPL 2
* @version $Id: monobook_popular.inc.php 196 2007-07-01 07:07:11Z lunt $
*/
function plugin_monobook_popular_convert()
{
if (!exist_plugin_convert('popular')) {
return;
}
$args = func_get_args();
return str_replace('<div>', '<div class="menubox">', call_user_func_array('plugin_popular_convert', $args));
}
示例2: plugin_monobook_recent_convert
/**
* @author lunt
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GPL 2
* @version $Id: monobook_recent.inc.php 196 2007-07-01 07:07:11Z lunt $
*/
function plugin_monobook_recent_convert()
{
if (!exist_plugin_convert('recent')) {
return;
}
$args = func_get_args();
return str_replace('<div>', '<div class="monobook_recent">', call_user_func_array('plugin_recent_convert', $args));
}
示例3: plugin_monobook_search_convert
/**
* @author lunt
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GPL 2
* @version $Id: monobook_search.inc.php 214 2007-07-24 11:16:00Z lunt $
*/
function plugin_monobook_search_convert()
{
if (!exist_plugin_convert('search')) {
return;
}
$str = explode("\n", plugin_search_convert());
$str = preg_grep('/value="OR"|\\<label for\\="|encode_hint/', $str, PREG_GREP_INVERT);
$str = str_replace(array('type="radio"', 'type="text"', 'type="submit"'), array('type="hidden"', 'class="searchInput" type="text"', 'class="searchButton" type="submit"'), $str);
return "<div class=\"monobook_search\">\n" . implode("\n", $str) . "\n</div>";
}
示例4: plugin_whiteflow_popular_convert
/**
* @author sonots
*
* based on
*
* @author lunt
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GPL 2
* @version $Id: monobook_popular.inc.php 196 2007-07-01 07:07:11Z lunt $
*/
function plugin_whiteflow_popular_convert()
{
if (!exist_plugin_convert('popular')) {
return;
}
$args = func_get_args();
$ret = call_user_func_array('plugin_popular_convert', $args);
$ret = str_replace('<div>', '<div class="popular_list">', $ret);
$ret = preg_replace('/<ul[^>]*>/', '<ol>', $ret);
$ret = str_replace('</ul>', '</ol>', $ret);
return $ret;
}
示例5: plugin_gcounter_convert
function plugin_gcounter_convert()
{
if (!exist_plugin_convert('counter')) {
return '<p>gcounter(): counter plugin does not exist.</p>';
}
if (plugin_gcounter_init_gcounter() === FALSE) {
return '<p>gcounter(): failed to create gcounter log file.</p>';
}
global $vars;
$tmp = $vars['page'];
$vars['page'] = PLUGIN_GCOUNTER_PAGE;
$args = func_get_args();
$body = do_plugin_convert('counter', csv_implode(',', $args));
$vars['page'] = $tmp;
return $body;
}
示例6: plugin_rename_get_files
function plugin_rename_get_files($pages)
{
global $log;
$files = array();
$dirs = array(BACKUP_DIR, DIFF_DIR, DATA_DIR);
if (exist_plugin_convert('attach')) {
$dirs[] = UPLOAD_DIR;
}
if (exist_plugin_convert('counter')) {
$dirs[] = COUNTER_DIR;
}
foreach (array('update', 'download', 'browse') as $log_subdir) {
if ($log[$log_subdir]['use']) {
$dirs[] = LOG_DIR . $log_subdir . '/';
}
}
// and more ...
$matches = array();
foreach ($dirs as $path) {
$dir = opendir($path);
if (!$dir) {
continue;
}
// TODO: !== FALSE or die()?
while (($file = readdir($dir)) !== FALSE) {
if ($file == '.' || $file == '..') {
continue;
}
foreach ($pages as $from => $to) {
// TODO: preg_quote()?
$pattern = '/^' . str_replace('/', '\\/', $from) . '([._].+)$/';
if (preg_match($pattern, $file, $matches)) {
$newfile = $to . $matches[1];
$files[$from][$path . $file] = $path . $newfile;
}
}
}
}
return $files;
}
示例7: do_plugin_convert
?>
. HTML convert time: <?php
echo $taketime;
?>
sec.</p>
<address>
Copyright© 2009 <a href="http://www.kazuwaya.jp">kazuwaya.jp</a>
</address>
-->
<!-- /footer --></div>
<p id="goToTop"><a href="#platform"><img src="common/images/img-gototop.gif" width="40" height="24" alt="TOP" /></a></p>
<!-- /platform --></div>
<div id="platformF">
<div id="floatNewPage">
<?php
if (exist_plugin_convert('newpage')) {
echo do_plugin_convert('newpage');
}
?>
<!--
<?php
if (exist_plugin_convert('newpage_subdir')) {
echo do_plugin_convert('newpage_subdir');
}
?>
-->
<!-- /floatNewPage --></div>
<!-- /platformF --></div>
<script type="text/javascript" src="common/js/import.js"></script>
</body>
</html>
示例8: plugin_rename_get_files
function plugin_rename_get_files($pages)
{
$files = array();
$dirs = array(BACKUP_DIR, DIFF_DIR, DATA_DIR);
if (exist_plugin_convert('attach')) {
$dirs[] = UPLOAD_DIR;
}
if (exist_plugin_convert('counter')) {
$dirs[] = COUNTER_DIR;
}
if (exist_plugin('qblog')) {
$dirs[] = CACHEQBLOG_DIR;
}
// and more ...
$matches = array();
foreach ($dirs as $path) {
$dir = opendir($path);
if (!$dir) {
continue;
}
while ($file = readdir($dir)) {
if ($file == '.' || $file == '..') {
continue;
}
foreach ($pages as $from => $to) {
$pattern = '/^' . str_replace('/', '\\/', $from) . '([._].+)$/';
if (!preg_match($pattern, $file, $matches)) {
continue;
}
$newfile = $to . $matches[1];
$files[$from][$path . $file] = $path . $newfile;
}
}
}
return $files;
}
示例9: protect_body
function protect_body($plugin)
{
global $auth_api, $protect;
$body = '';
if ($plugin === 'login') {
$plugin = '';
}
$wiki = WikiFactory::Wiki($protect);
if ($wiki->isReadable() && empty($plugin)) {
$body .= $wiki->render();
} else {
$plugin = empty($plugin) ? 'login' : $plugin;
if (exist_plugin_convert($plugin)) {
$body .= do_plugin_convert($plugin);
}
}
if (empty($body)) {
if (PLUGIN_PROTECT_MUST_PAGE) {
die('The attestation setting is not done.');
}
die;
}
return $body;
}
示例10: array
function &Factory_Div(&$root, $text)
{
$matches = array();
// Seems block plugin?
if (PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK) {
// Usual code
if (preg_match('/^\\#([^\\(]+)(?:\\((.*)\\))?/', $text, $matches) && exist_plugin_convert($matches[1])) {
$ret =& new Div($matches);
return $ret;
//return new Div($matches);
}
} else {
// Hack code
if (preg_match('/^#([^\\(\\{]+)(?:\\(([^\\r]*)\\))?(\\{*)/', $text, $matches) && exist_plugin_convert($matches[1])) {
$len = strlen($matches[3]);
$body = array();
if ($len == 0) {
$ret =& new Div($matches);
// Seems legacy block plugin
return $ret;
//return new Div($matches); // Seems legacy block plugin
} else {
if (preg_match('/\\{{' . $len . '}\\s*\\r(.*)\\r\\}{' . $len . '}/', $text, $body)) {
$matches[2] .= "\r" . $body[1] . "\r";
$ret =& new Div($matches);
return $ret;
//return new Div($matches); // Seems multiline-enabled block plugin
}
}
}
}
$ret =& new Paragraph($text);
return $ret;
//return new Paragraph($text);
}
示例11:
</div><!-- END id:summary -->
<?php
if ($wikinote->is_effect()) {
echo '</div>';
}
?>
<!-- END id:wrap_body -->
</div><!-- END id:content -->
</div><!-- END id:wrap_content -->
</div><!-- END id:main -->
<!-- Menubar ========================================================== -->
<?php
if (exist_plugin_convert('menu') && do_plugin_convert('menu') != '') {
?>
<div id="wrap_menubar"><!-- BEGIN id:wrap_menubar -->
<div id="menubar">
<?php
echo do_plugin_convert('menu');
?>
</div><!-- END id:menubar -->
</div><!-- END id:wrap_menubar -->
<?php
}
?>
<!-- Footer ========================================================== -->
<div id="wrap_footer"><!-- BEGIN id:wrap_footer -->
<div id="footer"><!-- BEGIN id:footer -->
示例12:
<link rel="stylesheet" type="text/css" media="screen" href="<?php
echo SKIN_URI;
?>
andreas01/andreas01.css" />
<link rel="stylesheet" type="text/css" media="print" href="<?php
echo SKIN_URI;
?>
andreas01/andreas01.print.css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php
echo $_LINK['rss'];
?>
" />
<script type="text/javascript">
<!--
<?php
if (exist_plugin_convert('js_init')) {
echo do_plugin_convert('js_init');
}
?>
// -->
</script>
<script type="text/javascript" src="<?php
echo SKIN_URI . 'lang/' . $language;
?>
.js"></script>
<script type="text/javascript" src="<?php
echo SKIN_URI;
?>
default.js"></script>
<script type="text/javascript" src="<?php
echo SKIN_URI;
示例13: str_replace
$site_navigator2 = str_replace($ptn, $ptn . ' class="focus"', convert_html($vars['msg']));
if (trim($site_navigator2) !== '') {
$site_navigator2 = '<div class="preview_highlight">' . $site_navigator2 . '</div>';
}
} else {
$site_navigator2 = str_replace($ptn, $ptn . ' class="focus"', do_plugin_convert('nav2'));
}
$qt->setv('site_navigator2_is_empty', trim($site_navigator2) === '');
if (!$qt->getv('SiteNavigator2InsertMark')) {
$site_navigator2 = "\n<!-- SITENAVIGATOR2 CONTENTS START -->\n" . $site_navigator2 . "\n<!-- SITENAVIGATOR2 CONTENTS END -->\n";
$qt->setv('SiteNavigator2InsertMark', true);
}
$qt->setv('site_navigator2', $site_navigator2);
unset($vars['page_alt']);
}
if (exist_plugin_convert('header')) {
$ptn = '"' . $script . '?' . rawurlencode($vars['page']) . '"';
$vars['page_alt'] = 'SiteHeader';
//swfuの制御のため
//プレビューならクラスを付ける
if ($vars['preview'] && $vars['page'] == 'SiteHeader') {
$site_header = convert_html($vars['msg']);
if (trim($site_header) !== '') {
$site_header = '<div class="preview_highlight">' . $site_header . '</div>';
}
} else {
$site_header = do_plugin_convert('header');
}
$qt->setv('site_header_is_empty', trim($site_header) === '');
if (!$qt->getv('SiteHeaderInsertMark')) {
$site_header = "\n<!-- SITEHEADER CONTENTS START -->\n" . $site_header . "\n<!-- SITEHEADER CONTENTS END -->\n";
示例14:
} else {
$_menu = $menu;
}
echo $_menu;
?>
</div>
</div>
<!-- END #content > #menu -->
</div>
<!-- END #content -->
<!-- START #footer -->
<?php
if (exist_plugin_convert('footarea') && do_plugin_convert('footarea') != '') {
echo '<div id="footer">' . "\n";
echo do_plugin_convert('footarea');
echo '</div>' . "\n";
} else {
// or In this skin
?>
<div id="footer">
<ul id="signature">
<li class="inquiry"><a href="<?php
echo get_script_uri();
?>
?">サイトについて</a></li>
<li class="inquiry"><a href="<?php
echo get_script_uri();
?>
示例15: arg_check
case 'pink-border':
case 'rectangle':
case 'russet':
case 'smoking_black':
case 'zef':
$sidebar = 'another';
// Show as an another page below
break;
}
// 'none': Show no sidebar
}
// Check menu (sidebar) is ready and $menubar is there
if ($sidebar == 'none') {
$menu = FALSE;
} else {
$menu = arg_check('read') && is_page($GLOBALS['menubar']) && exist_plugin_convert('menu');
if ($menu) {
$menu_body = preg_replace('#<h2 ([^>]*)>(.*?)</h2>#', '<h3 $1><span class="sanchor"></span> $2</h3>', do_plugin_convert('menu'));
}
}
// ------------------------------------------------------------
// Code continuing ...
$lang =& $_LANG['skin'];
$link =& $_LINK;
$image =& $_IMAGE['skin'];
$rw = !PKWK_READONLY;
// Decide charset for CSS
$css_charset = 'iso-8859-1';
switch (UI_LANG) {
case 'ja':
$css_charset = 'Shift_JIS';