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


PHP WoW::GetUrl方法代码示例

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


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

示例1: switch

?>
')});
//]]></script>

<?php 
echo WoW_Template::GetJSForPage();
switch (WoW_Template::GetPageIndex()) {
    case 'item':
    case 'items':
        echo sprintf('<script type="text/javascript" src="%sdata=weight-presets.zones"></script>', WoW::GetUrl());
        break;
    case 'talent':
        echo sprintf('<script type="text/javascript" src="%sdata=glyphs"></script>', WoW::GetUrl(), WoW_Locale::GetLocaleID());
        break;
    case 'npc':
        echo sprintf('<script type="text/javascript" src="%sdata=zones"></script>', WoW::GetUrl(), WoW_Locale::GetLocaleID());
        break;
    case 'search':
        echo sprintf('<script type="text/javascript" src="%sdata=realms.weight-presets"></script>', WoW::GetUrl(), WoW_Locale::GetLocaleID());
        break;
}
?>

<script type="text/javascript" src="<?php 
echo WoW::GetUrl();
?>
data=user"></script>

</head>

开发者ID:Kheros,项目名称:wowhead,代码行数:29,代码来源:wowhead_block_header.php

示例2: sprintf

    if ($listView != null) {
        echo sprintf('new Listview({template: \'spell\', id: \'abilities\', name: LANG.tab_abilities, tabs: tabsRelated, parent: \'lkljbjkb574\', visibleCols: [\'schools\'], hiddenCols: [\'reagents\', \'skill\'], computeDataFunc: Listview.funcBox.initModeFilter, onAfterCreate: Listview.funcBox.addModeIndicator, data: [%s]});', $listView);
    }
}
if (is_array($npc['npcs'])) {
    $npcs_count = count($npc['npcs']);
    $current = 1;
    $listView = '';
    foreach ($npc['npcs'] as $creature) {
        $listView .= sprintf('{"classification":%d,"id":%d,"location":[%d],"maxlevel":%d,"minlevel":%d,"name":"%s","react":[-1,-1],"type":%d,skin:\'\'}', $creature['rank'], $creature['entry'], $creature['zone_info']['areaID'], $creature['minlevel'], $creature['maxlevel'], str_replace('"', '\\"', $creature['name']), $creature['type']);
        if ($current < $npcs_count) {
            $listView .= ',';
        }
        ++$current;
    }
    echo sprintf('new Listview({template: \'npc\', id: \'same-model-as\', name: LANG.tab_samemodelas, tabs: tabsRelated, parent: \'lkljbjkb574\', visibleCols: [\'skin\'], note: $WH.sprintf(LANG.lvnote_filterresults, \'%s/npcs?filter=cr=34;crs=0;crv=692\'), data: [%s]});', WoW::GetUrl(), $listView);
}
?>


//new Listview({template: 'quest', id: 'objective-of', name: LANG.tab_objectiveof, tabs: tabsRelated, parent: 'lkljbjkb574', data: [{"category":1337,"category2":2,"id":27677,"level":40,"money":20000,"name":"Archaedas, The Ancient Stone Watcher","reqlevel":35,"side":1,"type":81,"wflags":96,"xp":3250},{"category":1337,"category2":2,"id":27680,"level":40,"money":20000,"name":"Archaedas, The Ancient Stone Watcher","reqlevel":35,"side":2,"type":81,"wflags":96,"xp":3250}]});
//new Listview({template: 'quest', id: 'starts', name: LANG.tab_starts, tabs: tabsRelated, parent: 'lkljbjkb574', data: [{"category":1337,"category2":2,"id":27677,"level":40,"money":20000,"name":"Archaedas, The Ancient Stone Watcher","reqlevel":35,"side":1,"type":81,"wflags":96,"xp":3250},{"category":1337,"category2":2,"id":27680,"level":40,"money":20000,"name":"Archaedas, The Ancient Stone Watcher","reqlevel":35,"side":2,"type":81,"wflags":96,"xp":3250}]});
new Listview({template: 'comment', id: 'comments', name: LANG.tab_comments, tabs: tabsRelated, parent: 'lkljbjkb574', data: lv_comments0});
if(lv_links.length)
	new Listview({template: 'relatedlinks', id: 'links', name: LANG.tab_whatlinkshere, tabs: tabsRelated, parent: 'lkljbjkb574', data: lv_links});
new Listview({template: 'screenshot', id: 'screenshots', name: LANG.tab_screenshots, tabs: tabsRelated, parent: 'lkljbjkb574', data: lv_screenshots});
if(lv_videos.length || (g_user && g_user.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO)))
	new Listview({template: 'video', id: 'videos', name: LANG.tab_videos, tabs: tabsRelated, parent: 'lkljbjkb574', data: lv_videos});
tabsRelated.flush();
//]]></script>
开发者ID:Kheros,项目名称:wowhead,代码行数:30,代码来源:wowhead_content_npc.php


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