本文整理汇总了PHP中Lang::game方法的典型用法代码示例。如果您正苦于以下问题:PHP Lang::game方法的具体用法?PHP Lang::game怎么用?PHP Lang::game使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lang
的用法示例。
在下文中一共展示了Lang::game方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderTooltip
public function renderTooltip()
{
if (!$this->curTpl) {
return array();
}
$x = '<table><tr><td>';
$x .= '<span class="q' . $this->getField('quality') . '">' . Util::jsEscape($this->getField('name', true)) . '</span><br />';
$nClasses = 0;
if ($_ = $this->getField('classMask')) {
$cl = Lang::getClassString($_, $__, $nClasses);
$x .= Util::ucFirst($nClasses > 1 ? Lang::game('classes') : Lang::game('class')) . Lang::main('colon') . $cl . '<br />';
}
if ($_ = $this->getField('contentGroup')) {
$x .= Util::jsEscape(Lang::itemset('notes', $_)) . ($this->getField('heroic') ? ' <i class="q2">(' . Lang::item('heroic') . ')</i>' : '') . '<br />';
}
if (!$nClasses || !$this->getField('contentGroup')) {
$x .= Lang::itemset('types', $this->getField('type')) . '<br />';
}
if ($bonuses = $this->getBonuses()) {
$x .= '<span>';
foreach ($bonuses as $b) {
$x .= '<br /><span class=\\"q13\\">' . $b['bonus'] . ' ' . Lang::itemset('_pieces') . Lang::main('colon') . '</span>' . Util::jsEscape($b['desc']);
}
$x .= '</span>';
}
$x .= '</td></tr></table>';
return $x;
}
示例2: generateTitle
protected function generateTitle()
{
array_unshift($this->title, Util::ucFirst(Lang::game('pets')));
if ($this->category) {
array_unshift($this->title, Lang::pet('cat', $this->category[0]));
}
}
示例3: generateTitle
protected function generateTitle()
{
array_unshift($this->title, Util::ucFirst(Lang::game('achievements')));
if ($this->category) {
$catrow = DB::Aowow()->SelectRow('SELECT * FROM ?_achievementcategory WHERE id = ?d', end($this->category));
array_unshift($this->title, Util::localizedString($catrow, 'name'));
}
}
示例4: __construct
public function __construct($pageCall, $pageParam)
{
$this->filterObj = new CreatureListFilter();
$this->getCategoryFromUrl($pageParam);
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::game('npcs'));
$this->subCat = $pageParam ? '=' . $pageParam : '';
}
示例5: __construct
public function __construct($pageCall, $pageParam)
{
$this->filterObj = new EnchantmentListFilter();
$this->getCategoryFromUrl($pageParam);
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::game('enchantments'));
$this->subCat = $pageParam !== null ? '=' . $pageParam : '';
}
示例6: generateTitle
protected function generateTitle()
{
array_unshift($this->title, $this->name);
$form = $this->filterObj->getForm('form');
if (isset($form['cl'])) {
array_unshift($this->title, Lang::game('cl', $form['cl']));
}
}
示例7: __construct
public function __construct($pageCall, $pageParam)
{
$this->validCats = Util::$questClasses;
// needs reviewing (not allowed to set this as default)
$this->filterObj = new QuestListFilter();
$this->getCategoryFromUrl($pageParam);
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::game('quests'));
$this->subCat = $pageParam ? '=' . $pageParam : '';
}
示例8: generateContent
protected function generateContent()
{
/***********/
/* Infobox */
/***********/
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
if ($this->subject->getField('side') == SIDE_ALLIANCE) {
$infobox[] = Lang::main('side') . Lang::main('colon') . '[span class=icon-alliance]' . Lang::game('si', SIDE_ALLIANCE) . '[/span]';
} else {
if ($this->subject->getField('side') == SIDE_HORDE) {
$infobox[] = Lang::main('side') . Lang::main('colon') . '[span class=icon-horde]' . Lang::game('si', SIDE_HORDE) . '[/span]';
} else {
$infobox[] = Lang::main('side') . Lang::main('colon') . Lang::game('si', SIDE_BOTH);
}
}
if ($g = $this->subject->getField('gender')) {
$infobox[] = Lang::main('gender') . Lang::main('colon') . '[span class=icon-' . ($g == 2 ? 'female' : 'male') . ']' . Lang::main('sex', $g) . '[/span]';
}
if ($eId = $this->subject->getField('eventId')) {
$this->extendGlobalIds(TYPE_WORLDEVENT, $eId);
$infobox[] = Lang::game('eventShort') . Lang::main('colon') . '[event=' . $eId . ']';
}
/****************/
/* Main Content */
/****************/
$this->infobox = $infobox ? '[ul][li]' . implode('[/li][li]', $infobox) . '[/li][/ul]' : null;
$this->expansion = Util::$expansionString[$this->subject->getField('expansion')];
$this->redButtons = array(BUTTON_WOWHEAD => true, BUTTON_LINKS => ['name' => $this->nameFixed]);
// factionchange-equivalent
if ($pendant = DB::World()->selectCell('SELECT IF(horde_id = ?d, alliance_id, -horde_id) FROM player_factionchange_titles WHERE alliance_id = ?d OR horde_id = ?d', $this->typeId, $this->typeId, $this->typeId)) {
$altTitle = new TitleList(array(['id', abs($pendant)]));
if (!$altTitle->error) {
$this->transfer = sprintf(Lang::title('_transfer'), $altTitle->id, $altTitle->getHtmlizedName(), $pendant > 0 ? 'alliance' : 'horde', $pendant > 0 ? Lang::game('si', 1) : Lang::game('si', 2));
}
}
/**************/
/* Extra Tabs */
/**************/
// tab: quest source
$quests = new QuestList(array(['rewardTitleId', $this->typeId]));
if (!$quests->error) {
$this->extendGlobalData($quests->getJSGlobals(GLOBALINFO_REWARDS));
$this->lvTabs[] = ['quest', array('data' => array_values($quests->getListviewData()), 'id' => 'reward-from-quest', 'name' => '$LANG.tab_rewardfrom', 'hiddenCols' => ['experience', 'money'], 'visibleCols' => ['category'])];
}
// tab: achievement source
if ($aIds = DB::World()->selectCol('SELECT entry FROM achievement_reward WHERE title_A = ?d OR title_H = ?d', $this->typeId, $this->typeId)) {
$acvs = new AchievementList(array(['id', $aIds]));
if (!$acvs->error) {
$this->extendGlobalData($acvs->getJSGlobals());
$this->lvTabs[] = ['achievement', array('data' => array_values($acvs->getListviewData()), 'id' => 'reward-from-achievement', 'name' => '$LANG.tab_rewardfrom', 'visibleCols' => ['category'], 'sort' => ['reqlevel', 'name'])];
}
}
// tab: criteria of (to be added by TC)
}
示例9: generateContent
protected function generateContent()
{
$tabData = array('data' => [], 'name' => Util::ucFirst(Lang::game('enchantments')));
$conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE)) {
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
}
if ($_ = $this->filterObj->getConditions()) {
$conditions[] = $_;
}
$ench = new EnchantmentList($conditions);
$tabData['data'] = array_values($ench->getListviewData());
$this->extendGlobalData($ench->getJSGlobals());
// recreate form selection
$this->filter = array_merge($this->filterObj->getForm('form'), $this->filter);
$this->filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
$this->filter['fi'] = $this->filterObj->getForm();
$xCols = $this->filterObj->getForm('extraCols', true);
foreach (Util::$itemFilter as $fiId => $str) {
if (array_column($tabData['data'], $str)) {
$xCols[] = $fiId;
}
}
if (array_column($tabData['data'], 'dmg')) {
$xCols[] = 34;
}
if ($xCols) {
$this->filter['fi']['extraCols'] = "fi_extraCols = " . Util::toJSON(array_values(array_unique($xCols))) . ";";
}
if (!empty($this->filter['fi']['extraCols'])) {
$tabData['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
}
if ($ench->getMatches() > CFG_SQL_LIMIT_DEFAULT) {
$tabData['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_enchantmentsfound', $ench->getMatches(), CFG_SQL_LIMIT_DEFAULT);
$tabData['_truncated'] = 1;
}
if (array_filter(array_column($tabData['data'], 'spells'))) {
$tabData['visibleCols'] = ['trigger'];
}
if (!$ench->hasSetFields(['skillLine'])) {
$tabData['hiddenCols'] = ['skill'];
}
if ($this->filterObj->error) {
$tabData['_errors'] = '$1';
}
$this->lvTabs[] = ['enchantment', $tabData, 'enchantment'];
}
示例10: renderTooltip
public function renderTooltip($interactive = false)
{
if (!$this->curTpl) {
return [];
}
$x = '<table>';
$x .= '<tr><td><b class="q">' . $this->getField('name') . '</b></td></tr>';
if ($g = $this->getField('name')) {
$x .= '<tr><td><' . $g . '> (' . $this->getField('guildrank') . ')</td></tr>';
} else {
if ($d = $this->getField('description')) {
$x .= '<tr><td>' . $d . '</td></tr>';
}
}
$x .= '<tr><td>' . Lang::game('level') . ' ' . $this->getField('level') . ' ' . Lang::game('ra', $this->curTpl['race']) . ' ' . Lang::game('cl', $this->curTpl['classs']) . '</td></tr>';
$x .= '</table>';
return $x;
}
示例11: renderTooltip
public function renderTooltip()
{
if (!$this->curTpl) {
return null;
}
$level = '??';
$type = $this->curTpl['type'];
$row3 = [Lang::game('level')];
$fam = $this->curTpl['family'];
if (!($this->curTpl['typeFlags'] & 0x4)) {
$level = $this->curTpl['minLevel'];
if ($level != $this->curTpl['maxLevel']) {
$level .= ' - ' . $this->curTpl['maxLevel'];
}
} else {
$level = '??';
}
$row3[] = $level;
if ($type) {
$row3[] = Lang::game('ct', $type);
}
if ($_ = Lang::npc('rank', $this->curTpl['rank'])) {
$row3[] = '(' . $_ . ')';
}
$x = '<table>';
$x .= '<tr><td><b class="q">' . $this->getField('name', true) . '</b></td></tr>';
if ($sn = $this->getField('subname', true)) {
$x .= '<tr><td>' . $sn . '</td></tr>';
}
$x .= '<tr><td>' . implode(' ', $row3) . '</td></tr>';
if ($type == 1 && $fam) {
// 1: Beast
$x .= '<tr><td>' . Lang::game('fa', $fam) . '</td></tr>';
}
$fac = new FactionList(array([['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0], ['id', (int) $this->getField('factionId')]));
if (!$fac->error) {
$x .= '<tr><td>' . $fac->getField('name', true) . '</td></tr>';
}
$x .= '</table>';
return $x;
}
示例12: foreach
</h1>
<table>
<tr>
<td>User: </td>
<td colspan="2"><input type="text" id="usermanage" size="23"></td>
<td>» <a href="#" onClick="ss_ManageUser()">Search by User</a></td>
</tr>
<tr>
<td>Page: </td>
<td>
<select id="pagetype">
<?php
foreach (Util::$typeStrings as $i => $str) {
if (Lang::game($str)) {
echo " <option value=\"" . $i . "\">" . Util::ucFirst(Lang::game($str)) . "</option>\n";
}
}
?>
</select>
</td>
<td>#<input type="number" size="5" id="pagetypeid"></td>
<td>» <a href="#" onClick="ss_Manage(null, $('#pagetype').val(), $('#pagetypeid').val())">Search by Page</a></td>
</tr>
</table>
<hr />
<table style="width:100%;">
<thead><tr><th style="width:135px;"><div>Menu</div></th><th style="width:400px;">Pages</th><th>Screenshots: <span id="screenshotTotal"></span></th></tr></thead>
<tbody><tr>
<td id="menu-container" style="vertical-align: top;">
<div id="show-all-pages"><?php
示例13: function
return $WH.strcmp(a.preview.replace(/%\d?\$?s/g, ''), b.preview.replace(/%\d?\$?s/g, ''));
},
getVisibleText: function(emote) {
return emote.preview.replace(/%\d?\$?s/g, '');
}
}
],
getItemLink: function(emote) {
return '?emote=' + emote.id;
}
}
new Listview({
template:'emote',
<?php
echo !isset($params['id']) ? "id:'emote'," : null;
echo !isset($params['name']) ? "name:'" . Util::ucFirst(Lang::game('emotes')) . "'," : null;
echo !isset($params['parent']) ? "parent:'lv-generic'," : null;
foreach ($params as $k => $v) {
if ($v[0] == '$') {
echo $k . ':' . substr($v, 1) . ',';
} elseif ($v) {
echo $k . ":'" . $v . "',";
}
}
?>
data:<?php
echo json_encode(array_values($data), JSON_NUMERIC_CHECK);
?>
});
示例14: isset
/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" <?php
echo isset($f['maxrl']) ? 'value="' . $f['maxrl'] . '" ' : null;
?>
/></td>
</tr></table>
</td>
</tr>
<tr>
<td class="padded"><?php
echo Lang::main('side') . Lang::main('colon');
?>
</td>
<td class="padded" colspan="3"> <select name="si">
<option></option>
<?php
foreach (Lang::game('si') as $i => $str) {
echo ' <option value="' . $i . '"' . (isset($f['si']) && $i == $f['si'] ? ' selected' : null) . '>' . $str . "</option>\n";
}
?>
</select></td>
</tr>
</table>
<div id="fi_criteria" class="padded criteria"><div></div></div><div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php
echo Lang::main('addFilter');
?>
</a></div>
<div class="padded2 clear">
<div style="float: right"><?php
echo Lang::main('refineSearch');
?>
示例15: __construct
public function __construct($pageCall, $pageParam)
{
$this->getCategoryFromUrl($pageParam);
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::game('skills'));
}