当前位置: 首页>>代码示例>>PHP>>正文


PHP RMUtilities::format_version方法代码示例

本文整理汇总了PHP中RMUtilities::format_version方法的典型用法代码示例。如果您正苦于以下问题:PHP RMUtilities::format_version方法的具体用法?PHP RMUtilities::format_version怎么用?PHP RMUtilities::format_version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RMUtilities的用法示例。


在下文中一共展示了RMUtilities::format_version方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load_modules_page


//.........这里部分代码省略.........
    }
    ob_start();
    ?>
    <div class="rmc_widget_content_reduced rmc_modules_widget">
        <img id="img-load" src="images/loading.gif" style="display: none; margin: 15px auto;" />
        <div id="mods-widget-container">
        <?php 
    for ($i = $start; $i < $end; $i++) {
        ?>
        <?php 
        $mod = $available_mods[$i];
        ?>
        <div class="<?php 
        echo tpl_cycle("even,odd");
        ?>
">
            <a href="modules.php?action=install&amp;dir=<?php 
        echo $mod->getInfo('dirname');
        ?>
" class="rmc_mod_img" style="background: url(<?php 
        echo XOOPS_URL;
        ?>
/modules/<?php 
        echo $mod->getInfo('dirname');
        ?>
/<?php 
        echo $mod->getInfo('image');
        ?>
) no-repeat center;"><span>&nbsp;</span></a>
            <strong><a href="modules.php?action=install&amp;dir=<?php 
        echo $mod->getInfo('dirname');
        ?>
"><?php 
        echo $mod->getInfo('name');
        ?>
</a></strong>
            <span class="rmc_available_options">
                <a href="modules.php?action=install&amp;dir=<?php 
        echo $mod->getInfo('dirname');
        ?>
"><?php 
        _e('Install', 'rmcommon');
        ?>
</a> |
                <a href="javascript:;" onclick="show_module_info('<?php 
        echo $mod->getInfo('dirname');
        ?>
');"><?php 
        _e('More info', 'rmcommon');
        ?>
</a>
            </span>
            <span class="rmc_mod_info" id="mod-<?php 
        echo $mod->getInfo('dirname');
        ?>
">
                <?php 
        _e('Version:', 'rmcommon');
        ?>
 
                <?php 
        if ($mod->getInfo('rmnative')) {
            ?>
                    <?php 
            echo RMUtilities::format_version($mod->getInfo('rmversion'));
            ?>
                <?php 
        } else {
            ?>
                    <?php 
            echo $mod->getInfo('version');
            ?>
                <?php 
        }
        ?>
<br />
                <?php 
        _e('Author:', 'rmcommon');
        ?>
 <?php 
        echo substr(strip_tags($mod->getInfo('author')), 0, 12);
        ?>
            </span>
        </div>
        <input type="hidden" id="token" value="<?php 
        echo $xoopsSecurity->createToken();
        ?>
" />
        <?php 
    }
    ?>
        <?php 
    $nav->display(false);
    ?>
        </div>
    </div>
<?php 
    $ret = ob_get_clean();
    echo $ret;
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:101,代码来源:modules.php

示例2: strtolower

    $mod->assignVars($row);
    $installed_dirs[] = $mod->dirname();
    if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $mod->getVar('dirname') . '/class/' . strtolower($mod->getVar('dirname') . 'controller') . '.php')) {
        include_once XOOPS_ROOT_PATH . '/modules/' . $mod->getVar('dirname') . '/class/' . strtolower($mod->getVar('dirname') . 'controller') . '.php';
        $class = ucfirst($mod->getVar('dirname')) . 'Controller';
        $class = new $class();
        if (method_exists($class, 'get_main_link')) {
            $main_link = $class->get_main_link();
        } else {
            if ($mod->getVar('hasmain')) {
                $main_link = XOOPS_URL . '/modules/' . $mod->dirname();
            } else {
                $main_link = "#";
            }
        }
    } else {
        if ($mod->getVar('hasmain')) {
            $main_link = XOOPS_URL . '/modules/' . $mod->dirname();
        } else {
            $main_link = "#";
        }
    }
    // Admin section
    $admin_link = $mod->getVar('hasadmin') ? XOOPS_URL . '/modules/' . $mod->dirname() . '/' . $mod->getInfo('adminindex') : '';
    $deficon = XOOPS_ROOT_PATH . '/modules/rmcommon/themes/designia/images/modules/' . $mod->dirname() . '.png';
    $modules[] = array('id' => $mod->getVar('mid'), 'name' => $mod->getVar('name'), 'realname' => $mod->getInfo('name'), 'version' => $mod->getInfo('rmnative') ? RMUtilities::format_version($mod->getInfo('rmversion')) : $mod->getInfo('version'), 'description' => $mod->getInfo('description'), 'image' => is_file($deficon) ? str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $deficon) : XOOPS_URL . '/modules/' . $mod->getVar('dirname') . '/' . ($mod->getInfo('icon32') ? $mod->getInfo('icon32') : $mod->getInfo('image')), 'link' => $main_link, 'admin_link' => $admin_link, 'updated' => formatTimestamp($mod->getVar('last_update'), 's'), 'author' => $mod->getInfo('author'), 'author_mail' => $mod->getInfo('authormail'), 'author_web' => $mod->getInfo('authorweb'), 'author_url' => $mod->getInfo('authorurl'), 'license' => $mod->getInfo('license'), 'dirname' => $mod->getInfo('dirname'), 'active' => $mod->getVar('isactive'));
}
// Event for installed modules
$modules = RMEvents::get()->run_event('rmcommon.installed.modules', $modules, $installed_dirs);
//include dirname(dirname(__FILE__)).'/include/modules.php';
//die();
开发者ID:laiello,项目名称:bitcero-modules,代码行数:31,代码来源:modules.php

示例3: rmc_available_mods

function rmc_available_mods()
{
    global $available_mods, $xoopsSecurity;
    $ret['title'] = __('Available Modules', 'rmcommon');
    $ret['icon'] = RMCURL . '/images/modules.png';
    $limit = 10;
    $tpages = ceil(count($available_mods) / $limit);
    $nav = new RMPageNav(count($available_mods), $limit, 1, 3);
    $nav->target_url('javascript:;" onclick="load_page({PAGE_NUM});');
    ob_start();
    $i = 0;
    ?>
	<div class="rmc_widget_content_reduced rmc_modules_widget">
        <img id="img-load" src="images/loading.gif" style="display: none; margin: 15px auto;" />
        <div id="mods-widget-container">
		<?php 
    foreach ($available_mods as $mod) {
        ?>
        <?php 
        if ($i == $limit) {
            break;
        }
        ?>
		<div class="<?php 
        echo tpl_cycle("even,odd");
        ?>
">
			<a href="modules.php?action=install&amp;dir=<?php 
        echo $mod->getInfo('dirname');
        ?>
" class="rmc_mod_img" style="background: url(<?php 
        echo XOOPS_URL;
        ?>
/modules/<?php 
        echo $mod->getInfo('dirname');
        ?>
/<?php 
        echo $mod->getInfo('image');
        ?>
) no-repeat center;"><span>&nbsp;</span></a>
			<strong><a href="modules.php?action=install&amp;dir=<?php 
        echo $mod->getInfo('dirname');
        ?>
"><?php 
        echo $mod->getInfo('name');
        ?>
</a></strong>
			<span class="rmc_available_options">
				<a href="modules.php?action=install&amp;dir=<?php 
        echo $mod->getInfo('dirname');
        ?>
"><?php 
        _e('Install', 'rmcommon');
        ?>
</a> |
				<a href="javascript:;" onclick="show_module_info('<?php 
        echo $mod->getInfo('dirname');
        ?>
');"><?php 
        _e('More info', 'rmcommon');
        ?>
</a>
			</span>
			<span class="rmc_mod_info" id="mod-<?php 
        echo $mod->getInfo('dirname');
        ?>
">
				<?php 
        _e('Version:', 'rmcommon');
        ?>
 
				<?php 
        if ($mod->getInfo('rmnative')) {
            ?>
					<?php 
            echo RMUtilities::format_version($mod->getInfo('rmversion'));
            ?>
				<?php 
        } else {
            ?>
					<?php 
            echo $mod->getInfo('version');
            ?>
				<?php 
        }
        ?>
<br />
				<?php 
        _e('Author:', 'rmcommon');
        ?>
 <?php 
        echo substr(strip_tags($mod->getInfo('author')), 0, 12);
        ?>
			</span>
		</div>
		<?php 
        $i++;
    }
    ?>
        <?php 
//.........这里部分代码省略.........
开发者ID:laiello,项目名称:bitcero-modules,代码行数:101,代码来源:right_widgets.php

示例4: _e

                    <td><strong><?php 
_e('Name:', 'rmcommon');
?>
</strong></td>
                    <td><?php 
echo $module->getInfo('name');
?>
</td>
                </tr>
                <tr class="odd">
                	<td><strong><?php 
_e('Version:', 'rmcommon');
?>
</strong>
                	<td><?php 
echo $module->getInfo('rmnative') ? RMUtilities::format_version($module->getInfo('rmversion')) : $module->getInfo('version');
?>
</td>
                </tr>
                <tr class="even">
                	<td><strong><?php 
_e('Author:', 'rmcommon');
?>
</strong></td>
                	<td>
                		<?php 
if ($module->getInfo('rmnative')) {
    ?>
                		<a href="mailto:<?php 
    echo $module->getInfo('authormail');
    ?>
开发者ID:laiello,项目名称:bitcero-modules,代码行数:31,代码来源:rmc_mod_preinstall.php


注:本文中的RMUtilities::format_version方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。