diff --git a/template/brb.tpl b/template/brb.tpl deleted file mode 100644 index e3a0239d..00000000 --- a/template/brb.tpl +++ /dev/null @@ -1,14 +0,0 @@ - - - -{include file='head.tpl'} - - -
-
-

Maintenance

-
-
We will be back soon..ish!
-
- - diff --git a/template/bricks/announcement.tpl b/template/bricks/announcement.tpl deleted file mode 100644 index 03ad7877..00000000 --- a/template/bricks/announcement.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{strip} - {math equation="abs(x)" x=$an.id assign="pId"} -{/strip} -
- diff --git a/template/bricks/announcement.tpl.php b/template/bricks/announcement.tpl.php new file mode 100644 index 00000000..41edd4c8 --- /dev/null +++ b/template/bricks/announcement.tpl.php @@ -0,0 +1,18 @@ +announcements as $_): +?> +
+ + \ No newline at end of file diff --git a/template/bricks/article.tpl b/template/bricks/article.tpl deleted file mode 100644 index 6ea9831e..00000000 --- a/template/bricks/article.tpl +++ /dev/null @@ -1,14 +0,0 @@ -{if !empty($article)} -
- - -
-{/if} \ No newline at end of file diff --git a/template/bricks/article.tpl.php b/template/bricks/article.tpl.php new file mode 100644 index 00000000..114e5fcf --- /dev/null +++ b/template/bricks/article.tpl.php @@ -0,0 +1,19 @@ +article)): +?> +
+ +
+ diff --git a/template/bricks/book.tpl b/template/bricks/book.tpl deleted file mode 100644 index 59173e26..00000000 --- a/template/bricks/book.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{if !empty($pageText)} -
-

{$lang.content}

- -
- - -{/if} diff --git a/template/bricks/book.tpl.php b/template/bricks/book.tpl.php new file mode 100644 index 00000000..fb7b23bc --- /dev/null +++ b/template/bricks/book.tpl.php @@ -0,0 +1,13 @@ +pageText)): +?> +
+

+ +
+ + diff --git a/template/bricks/community.tpl b/template/bricks/community.tpl deleted file mode 100644 index 7f40c9b6..00000000 --- a/template/bricks/community.tpl +++ /dev/null @@ -1,68 +0,0 @@ - {strip} -var lv_comments = [ -{foreach name=forCo from=$community.co key=number item=co} - {ldelim} - number:{$co.number}, - user:'{$co.user}', - body:'{$co.body|escape:"javascript"}', - date:'{$co.date|date_format:"%Y/%m/%d %H:%M:%S"}', - {if $co.roles!=0} - roles:{$co.roles}, - {/if} - {if $co.indent!=0} - indent:{$co.indent}, - {/if} - rating:{$co.rating}, - replyTo:{$co.replyto}, - purged:{$co.purged}, - deleted:0, - raters:[{foreach name=foo2 key=id from=$co.raters item=rater}[{$rater.userid},{$rater.rate}]{if $smarty.foreach.foo2.last}{else},{/if}{/foreach}], - id:{$co.id} - - ,sticky:{$co.sticky} - ,userRating:{$co.userRating} - {rdelim} - {if $smarty.foreach.forCo.last}{else},{/if} -{/foreach} -]; -{/strip} - {strip} -var lv_screenshots = [ -{foreach name=forSc from=$community.sc key=number item=sc} - {ldelim} - id:{$sc.id}, - user:'{$sc.user}', - date:'{$sc.date|date_format:"%Y/%m/%d %H:%M:%S"}', - width:{$sc.width}, - height:{$sc.height}, - type:{$type}, - typeId:{$typeId}, - {if isset($sc.sticky)} - sticky:{$sc.sticky}, - {/if} - caption:'{$sc.caption|escape:"javascript"}' - {rdelim} - {if $smarty.foreach.forSc.last}{else},{/if} -{/foreach} -]; -{/strip} - {strip} -var lv_videos = [ -{foreach name=forVi from=$community.vi key=number item=vi} - {ldelim} - id:{$vi.id}, - user:'{$vi.user}', - date:'{$vi.date|date_format:"%Y/%m/%d %H:%M:%S"}', - videoType:1, {* there is only youtube *} - videoId:'{$vi.videoId}', - type:{$type}, - typeId:{$typeId}, - {if isset($vi.sticky)} - sticky:{$vi.sticky}, - {/if} - caption:'{$vi.caption|escape:"javascript"}' - {rdelim} - {if $smarty.foreach.forVi.last}{else},{/if} -{/foreach} -]; -{/strip} diff --git a/template/bricks/community.tpl.php b/template/bricks/community.tpl.php new file mode 100644 index 00000000..00db659a --- /dev/null +++ b/template/bricks/community.tpl.php @@ -0,0 +1,3 @@ +var lv_comments = community['co'], JSON_NUMERIC_CHECK); ?>; +var lv_screenshots = community['sc'], JSON_NUMERIC_CHECK); ?>; +var lv_videos = community['vi'], JSON_NUMERIC_CHECK); ?>; diff --git a/template/bricks/contrib_0.tpl b/template/bricks/contrib_0.tpl.php similarity index 82% rename from template/bricks/contrib_0.tpl rename to template/bricks/contrib_0.tpl.php index 8c001a07..a16642b5 100644 --- a/template/bricks/contrib_0.tpl +++ b/template/bricks/contrib_0.tpl.php @@ -1,4 +1,6 @@ -{if $user.id > 0} + 0): +?> -{else} + -{/if} + diff --git a/template/bricks/contrib_2.tpl b/template/bricks/contrib_2.tpl.php similarity index 83% rename from template/bricks/contrib_2.tpl rename to template/bricks/contrib_2.tpl.php index 82580e5b..606ef448 100644 --- a/template/bricks/contrib_2.tpl +++ b/template/bricks/contrib_2.tpl.php @@ -1,4 +1,6 @@ -{if $user.id > 0} + 0): +?> -{else} + -{/if} + diff --git a/template/bricks/contrib_3.tpl b/template/bricks/contrib_3.tpl.php similarity index 81% rename from template/bricks/contrib_3.tpl rename to template/bricks/contrib_3.tpl.php index 861682e2..dc39b61f 100644 --- a/template/bricks/contrib_3.tpl +++ b/template/bricks/contrib_3.tpl.php @@ -1,22 +1,24 @@ -{if $user.id > 0} + 0): +?> -{else} + -{/if} + diff --git a/template/bricks/contrib_6.tpl b/template/bricks/contrib_6.tpl.php similarity index 81% rename from template/bricks/contrib_6.tpl rename to template/bricks/contrib_6.tpl.php index 34c4bfb5..36ffc7e4 100644 --- a/template/bricks/contrib_6.tpl +++ b/template/bricks/contrib_6.tpl.php @@ -1,5 +1,7 @@ -{if $user.id > 0} - @@ -10,7 +12,7 @@ diff --git a/template/bricks/head.tpl.php b/template/bricks/head.tpl.php new file mode 100644 index 00000000..e47123d7 --- /dev/null +++ b/template/bricks/head.tpl.php @@ -0,0 +1,49 @@ + <?php echo htmlentities(implode(' - ', $this->title)); ?> + + + + + + + + + + +css as $css): + if (!empty($css['string'])): + echo '\n"; + elseif (!empty($css['path'])): + echo (!empty($css['ieCond']) ? '' : null); + endif; +endforeach; +?> + + + + + + + +js as $js): + if (!empty($js)): + echo '\n"; + endif; +endforeach; +?> + diff --git a/template/bricks/headIcons.tpl b/template/bricks/headIcons.tpl deleted file mode 100644 index 632d3882..00000000 --- a/template/bricks/headIcons.tpl +++ /dev/null @@ -1,10 +0,0 @@ -{if !empty($headIcons)} - {foreach from=$headIcons key='k' item='v'} -
- {/foreach} - -{/if} \ No newline at end of file diff --git a/template/bricks/headIcons.tpl.php b/template/bricks/headIcons.tpl.php new file mode 100644 index 00000000..e65dcf85 --- /dev/null +++ b/template/bricks/headIcons.tpl.php @@ -0,0 +1,12 @@ +headIcons as $k => $v): + echo '
\n"; +endforeach; +?> + diff --git a/template/header.tpl b/template/bricks/header.tpl.php similarity index 73% rename from template/header.tpl rename to template/bricks/header.tpl.php index 465da439..6f95665c 100644 --- a/template/header.tpl +++ b/template/bricks/header.tpl.php @@ -1,7 +1,7 @@ -{include file='head.tpl'} +brick('head'); ?> @@ -11,14 +11,14 @@
-{include file="bricks/headerMenu.tpl"} +brick('headerMenu'); ?>
@@ -30,10 +30,12 @@
- {strip}{/strip} +jsGlobals as $glob): + $this->gBrick($glob[0], ['vars' => $glob[1], 'extra' => $glob[2]]); +endforeach; +?> + diff --git a/template/bricks/headerMenu.tpl b/template/bricks/headerMenu.tpl deleted file mode 100644 index 21b1dc85..00000000 --- a/template/bricks/headerMenu.tpl +++ /dev/null @@ -1,4 +0,0 @@ -{if $user.id}{$lang.userProfiles}|{$user.name}{else}{$lang.signIn}{/if} -|{$lang.feedback} -|{$lang.language} - diff --git a/template/bricks/headerMenu.tpl.php b/template/bricks/headerMenu.tpl.php new file mode 100644 index 00000000..19120c50 --- /dev/null +++ b/template/bricks/headerMenu.tpl.php @@ -0,0 +1,10 @@ +'.Lang::$main['userProfiles'].'|'.User::$displayName.''; +else: + echo ''.Lang::$main['signIn'].''; +endif; +?> +| +| + diff --git a/template/bricks/infobox.tpl b/template/bricks/infobox.tpl deleted file mode 100644 index f8509696..00000000 --- a/template/bricks/infobox.tpl +++ /dev/null @@ -1,26 +0,0 @@ - -{if !empty($infobox)} - - -{/if} -{if !empty($series)} - {foreach from=$series item=s} - {include file="bricks/series.tpl" list=$s[0] listTitle=$s[1]} - {/foreach} -{/if} - - -{if $user.id > 0} - - -{/if} -
{$lang.quickFacts}
{$lang.screenshots}
{$lang.videos}
- -{if $user.id > 0} - -{/if} -{if !empty($infobox)} - -{/if} \ No newline at end of file diff --git a/template/bricks/infobox.tpl.php b/template/bricks/infobox.tpl.php new file mode 100644 index 00000000..de2a4b50 --- /dev/null +++ b/template/bricks/infobox.tpl.php @@ -0,0 +1,30 @@ + +infobox)): +?> + + +series)): + foreach ($this->series as $s): + $this->brick('series', ['list' => $s[0], 'listTitle' => $s[1]]); + endforeach; +endif; +?> + + + + +
+ + +infobox)): +?> + + diff --git a/template/bricks/mapper.tpl b/template/bricks/mapper.tpl deleted file mode 100644 index 6e184373..00000000 --- a/template/bricks/mapper.tpl +++ /dev/null @@ -1,35 +0,0 @@ -{if !empty($map) && isset($map.data)} - {if $map.data.zone < 0} -
- {if isset($map.som)} -
- {/if} -
-
-
- {else} -
- {if isset($map.som)} -
- {/if} - {if isset($map.mapperData)} -
{$lang.foundIn} {$map.mapSelector}.
- {/if} -
-
- {/if} - - -{/if} diff --git a/template/bricks/mapper.tpl.php b/template/bricks/mapper.tpl.php new file mode 100644 index 00000000..1ac59b5e --- /dev/null +++ b/template/bricks/mapper.tpl.php @@ -0,0 +1,39 @@ +map['data'])): + if ($this->map['data']['zone'] < 0): +?> +
+map['som'])): ?> +
+ +
+
+
+ +
+map['som'])): ?> +
+map['mapperData'])): +?> +
map['mapSelector']; ?>.
+ +
+
+ + + + diff --git a/template/bricks/reagentList.tpl b/template/bricks/reagentList.tpl deleted file mode 100644 index 032e040e..00000000 --- a/template/bricks/reagentList.tpl +++ /dev/null @@ -1,191 +0,0 @@ -

{$lang.reagents}

- -{if $enhanced} - - -{/if} - - -{if $enhanced} - - - - -{/if} -{foreach from=$reagents key='k' item='itr'} - {strip} - - -{if !empty($itr.final) && $enhanced} -
 
-{elseif $enhanced} -
 
-{/if} - {$itr.name}{if $itr.qty > 1} ({$itr.qty}){/if} - -
{/strip} -{/foreach} -
- - -
- - - -
diff --git a/template/bricks/reagentList.tpl.php b/template/bricks/reagentList.tpl.php new file mode 100644 index 00000000..575ac899 --- /dev/null +++ b/template/bricks/reagentList.tpl.php @@ -0,0 +1,201 @@ +

+ +reagents['enhanced']): +?> + + + + + +reagents['enhanced']): +?> + + + + +reagents['data'] as $k => $itr): + echo '' . + 'reagents['enhanced']): + echo '
 
'; + elseif ($this->reagents['enhanced']): + echo '
 
'; + endif; + + echo ''.$itr['name'].''.($itr['qty'] > 1 ? ' ('.$itr['qty'].')' : null)."
\n"; +endforeach; +?> +
+ + +
+ + + +
diff --git a/template/bricks/redButtons.tpl b/template/bricks/redButtons.tpl deleted file mode 100644 index 8c03ad7a..00000000 --- a/template/bricks/redButtons.tpl +++ /dev/null @@ -1,59 +0,0 @@ -{if isset($redButtons[$smarty.const.BUTTON_WOWHEAD])} - {assign var='b' value=$redButtons[$smarty.const.BUTTON_WOWHEAD]} - {if $b} - WowheadWowhead - {else} - WowheadWowhead - {/if} -{/if} -{if isset($redButtons[$smarty.const.BUTTON_LINKS])} - {assign var='b' value=$redButtons[$smarty.const.BUTTON_LINKS]} - {if $b} - {$lang.links}{$lang.links} - {else} - {$lang.links}{$lang.links} - {/if} -{/if} -{if isset($redButtons[$smarty.const.BUTTON_VIEW3D])} - {assign var='b' value=$redButtons[$smarty.const.BUTTON_VIEW3D]} - {if $b} - {$lang.view3D}{$lang.view3D} - {else} - {$lang.view3D}{$lang.view3D} - {/if} -{/if} -{if isset($redButtons[$smarty.const.BUTTON_COMPARE])} - {assign var='b' value=$redButtons[$smarty.const.BUTTON_COMPARE]} - {if $b} - {$lang.compare}{$lang.compare} - {else} - {$lang.compare}{$lang.compare} - {/if} -{/if} -{if isset($redButtons[$smarty.const.BUTTON_UPGRADE])} - {assign var='b' value=$redButtons[$smarty.const.BUTTON_UPGRADE]} - {if $b} - {$lang.findUpgrades}{$lang.findUpgrades} - {else} - {$lang.findUpgrades}{$lang.findUpgrades} - {/if} -{/if} -{if isset($redButtons[$smarty.const.BUTTON_TALENT])} - {assign var='b' value=$redButtons[$smarty.const.BUTTON_TALENT]} - {if $b} - {if $b.pet}{$lang.petCalc}{else}{$lang.talentCalc}{/if}{if $b.pet}{$lang.petCalc}{else}{$lang.talentCalc}{/if} - {else} - {if $b.pet}{$lang.petCalc}{else}{$lang.talentCalc}{/if}{if $b.pet}{$lang.petCalc}{else}{$lang.talentCalc}{/if} - {/if} -{/if} -{if isset($redButtons[$smarty.const.BUTTON_FORUM])} - {assign var='b' value=$redButtons[$smarty.const.BUTTON_FORUM]} - {if $b} - {$lang.forum}{$lang.forum} - {else} - {$lang.forum}{$lang.forum} - {/if} -{/if} -{if isset($redButtons[$smarty.const.BUTTON_EQUIP])} -
{* content is added by jScript *} -{/if} diff --git a/template/bricks/redButtons.tpl.php b/template/bricks/redButtons.tpl.php new file mode 100644 index 00000000..6e4996bd --- /dev/null +++ b/template/bricks/redButtons.tpl.php @@ -0,0 +1,70 @@ +redButtons[BUTTON_WOWHEAD])): + if ($this->redButtons[BUTTON_WOWHEAD]): + echo 'WowheadWowhead'; + else: + echo 'WowheadWowhead'; + endif; +endif; + +// ingame-links/markdown/ect +if (isset($this->redButtons[BUTTON_LINKS])): + if ($b = $this->redButtons[BUTTON_WOWHEAD]): + echo 'name)."', type: ".$this->type.', typeId: '.$this->typeId.' });">'.Lang::$main['links'].''.Lang::$main['links'].''; + else: + echo ''.Lang::$main['links'].''.Lang::$main['links'].''; + endif; +endif; + +// view in 3D +if (isset($this->redButtons[BUTTON_VIEW3D])): + if ($b = $this->redButtons[BUTTON_VIEW3D]): + echo ''.Lang::$main['view3D'].''.Lang::$main['view3D'].''; + else: + echo ''.Lang::$main['view3D'].''.Lang::$main['view3D'].''; + endif; +endif; + +// item comparison tool +if (isset($this->redButtons[BUTTON_COMPARE])): + if ($b = $this->redButtons[BUTTON_COMPARE]): + echo ''.Lang::$main['compare'].''.Lang::$main['compare'].''; + else: + echo ''.Lang::$main['compare'].''.Lang::$main['compare'].''; + endif; +endif; + +// item upgrade search +if (isset($this->redButtons[BUTTON_UPGRADE])): + if ($b = $this->redButtons[BUTTON_UPGRADE]): + echo ''.Lang::$main['findUpgrades'].''.Lang::$main['findUpgrades'].''; + else: + echo ''.Lang::$main['findUpgrades'].''.Lang::$main['findUpgrades'].''; + endif; +endif; + +// goto: talent calculator +if (isset($this->redButtons[BUTTON_TALENT])): + if ($b = $this->redButtons[BUTTON_TALENT]): + echo ''.($b['pet'] ? Lang::$main['petCalc'] : Lang::$main['talentCalc']).''.($b['pet'] ? Lang::$main['petCalc'] : Lang::$main['talentCalc']).''; + else: + echo '{if $b.pet}'.Lang::$main['petCalc'].'else:'.Lang::$main['talentCalc'].'endif;{if $b.pet}'.Lang::$main['petCalc'].'else:'.Lang::$main['talentCalc'].'endif;'; + endif; +endif; + +// goto: (sub-)forum +if (isset($this->redButtons[BUTTON_FORUM])): + if ($b = $this->redButtons[BUTTON_FORUM]): + echo ''.Lang::$main['forum'].''.Lang::$main['forum'].''; + else: + echo ''.Lang::$main['forum'].''.Lang::$main['forum'].''; + endif; +endif; + +// equip item on pinned character +if (isset($this->redButtons[BUTTON_EQUIP])): + echo '
'; /* content is added by jScript */ +endif; diff --git a/template/bricks/rewards.tpl b/template/bricks/rewards.tpl deleted file mode 100644 index bbd1b018..00000000 --- a/template/bricks/rewards.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{if $rewTitle} - {$rewTitle}{$lang.colon} - {if isset($extra)}{$extra}{/if} - -{/if} -{if $rewData} -
- - - {foreach from=$rewData item=i key=k} - - {if $k%2} - - {/if} - - {/foreach} - {if count($rewData)%2} - - {/if} - -
{$i.name}
- - -{/if} \ No newline at end of file diff --git a/template/bricks/rewards.tpl.php b/template/bricks/rewards.tpl.php new file mode 100644 index 00000000..3ca9aaeb --- /dev/null +++ b/template/bricks/rewards.tpl.php @@ -0,0 +1,34 @@ +rewards['title']): + echo $this->rewards['title'].Lang::$main['colon'].(isset($this->rewards['extra']) ? $this->rewards['extra'] : null); +endif; +if ($this->rewards['data']): +?> +
+ + +rewards['data'] as $k => $i): + echo '\n"; + echo $k % 2 ? '' : null; + endforeach; + + if (count($this->rewards['data']) % 2): + echo ''; + endif; +?> + +
'.$i['name']."
+ + + \ No newline at end of file diff --git a/template/bricks/series.tpl b/template/bricks/series.tpl deleted file mode 100644 index f5093f5b..00000000 --- a/template/bricks/series.tpl +++ /dev/null @@ -1,23 +0,0 @@ - {if !empty($listTitle)}{$listTitle}{else}{$lang.series}{/if} - -
- -{foreach from=$list key='idx' item='itr'} - - - - -{/foreach} -
{$idx+1}.
- {foreach name=itemItr from=$itr item='i'} - {if $i.side == 1}{elseif $i.side == 2}{/if} - {if ($i.typeId == $typeId)} - {$i.name} - {else} - {$i.name} - {/if} - {if $i.side != 3}{/if} - {if $smarty.foreach.itemItr.last}{else}
{/if} - {/foreach} -
- diff --git a/template/bricks/series.tpl.php b/template/bricks/series.tpl.php new file mode 100644 index 00000000..10f4aa3f --- /dev/null +++ b/template/bricks/series.tpl.php @@ -0,0 +1,29 @@ + + +
+ + $itr): + echo '\n"; +endforeach; +?> +
'.($idx + 1).'
'; + + $end = array_pop(array_keys($itr)); + foreach ($itr as $k => $i): // itemItr + switch ($i['side']): + case 1: $wrap = '%s'; break; + case 2: $wrap = '%s'; break; + default: $wrap = '%s'; break; + endswitch; + + if ($i['typeId'] == $this->typeId): + echo sprintf($wrap, ''.$i['name'].''); + else: + echo sprintf($wrap, ''.$i['name'].''); + endif; + + echo $end == $k ? null : '
'; + endforeach; + echo "
+ diff --git a/template/bricks/tabsRelated.tpl b/template/bricks/tabsRelated.tpl deleted file mode 100644 index 3faa2bdf..00000000 --- a/template/bricks/tabsRelated.tpl +++ /dev/null @@ -1,16 +0,0 @@ -
-
- - diff --git a/template/bricks/tabsRelated.tpl.php b/template/bricks/tabsRelated.tpl.php new file mode 100644 index 00000000..9f04366f --- /dev/null +++ b/template/bricks/tabsRelated.tpl.php @@ -0,0 +1,18 @@ +
+
+ + diff --git a/template/bricks/tooltip.tpl b/template/bricks/tooltip.tpl deleted file mode 100644 index a9c97c88..00000000 --- a/template/bricks/tooltip.tpl +++ /dev/null @@ -1,28 +0,0 @@ -
-
-
-
-
- -{if !empty($jsGlobals[6][2].buff)} {* not set with items *} -

{$lang._aura}

-
-{/if} - - diff --git a/template/bricks/tooltip.tpl.php b/template/bricks/tooltip.tpl.php new file mode 100644 index 00000000..b77ffd16 --- /dev/null +++ b/template/bricks/tooltip.tpl.php @@ -0,0 +1,28 @@ +
+
+
+
+
+ +jsGlobals[6][2]['buff'])): /* not set with items */ ?> +

+
+ + + diff --git a/template/detail-page-generic.tpl b/template/detail-page-generic.tpl deleted file mode 100644 index 82167960..00000000 --- a/template/detail-page-generic.tpl +++ /dev/null @@ -1,59 +0,0 @@ -{include file='header.tpl'} - -
-
-
- -{if !empty($announcements)} - {foreach from=$announcements item=item} - {include file='bricks/announcement.tpl' an=$item} - {/foreach} -{/if} - - - -{include file='bricks/infobox.tpl'} - -
-{include file='bricks/headIcons.tpl'} - -{include file='bricks/redButtons.tpl'} - - {$name}{else}>{$name}{/if} - -{include file='bricks/article.tpl'} - -{include file='bricks/mapper.tpl'} - -{if isset($extraText)} -
- - -
-{/if} - -{if isset($unavailable)} -
- {$lang._unavailable} -{/if} - -

{$lang.related}

-
- -{include file='bricks/tabsRelated.tpl' tabs=$lvData} - -{include file='bricks/contribute.tpl'} - -
-
- -{include file='footer.tpl'} diff --git a/template/globals/achievement.tpl b/template/globals/achievement.tpl deleted file mode 100644 index e815dc1a..00000000 --- a/template/globals/achievement.tpl +++ /dev/null @@ -1,9 +0,0 @@ -var _ = g_achievements; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}', - icon:'{$item.icon|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/achievement.tpl.php b/template/globals/achievement.tpl.php new file mode 100644 index 00000000..ee921847 --- /dev/null +++ b/template/globals/achievement.tpl.php @@ -0,0 +1,9 @@ +var _ = g_achievements; + $data): + echo '_['.$id.']={' . + 'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' . + 'icon:\''.Util::jsEscape($data['icon']).'\'' . + '};'; +endforeach; +?> diff --git a/template/globals/class.tpl b/template/globals/class.tpl deleted file mode 100644 index 98612d9f..00000000 --- a/template/globals/class.tpl +++ /dev/null @@ -1,8 +0,0 @@ -var _ = g_classes; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/class.tpl.php b/template/globals/class.tpl.php new file mode 100644 index 00000000..b7a61c4b --- /dev/null +++ b/template/globals/class.tpl.php @@ -0,0 +1,7 @@ +var _ = g_classes; +{strip} + $data): + echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; +endforeach; +?> diff --git a/template/globals/creature.tpl b/template/globals/creature.tpl deleted file mode 100644 index e7317440..00000000 --- a/template/globals/creature.tpl +++ /dev/null @@ -1,8 +0,0 @@ -var _ = g_npcs; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/creature.tpl.php b/template/globals/creature.tpl.php new file mode 100644 index 00000000..25881314 --- /dev/null +++ b/template/globals/creature.tpl.php @@ -0,0 +1,7 @@ +var _ = g_npcs; +{strip} + $data): + echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; +endforeach; +?> diff --git a/template/globals/currency.tpl b/template/globals/currency.tpl deleted file mode 100644 index 74764508..00000000 --- a/template/globals/currency.tpl +++ /dev/null @@ -1,9 +0,0 @@ -var _ = g_gatheredcurrencies; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}', - icon:{$item.icon|@json_encode} - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/currency.tpl.php b/template/globals/currency.tpl.php new file mode 100644 index 00000000..c1716a94 --- /dev/null +++ b/template/globals/currency.tpl.php @@ -0,0 +1,9 @@ +var _ = g_gatheredcurrencies; + $data): + echo '_['.$id.']={' . + 'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' . + 'icon:'.json_encode($data['icon'], JSON_NUMERIC_CHECK) . + '};'; +endforeach; +?> diff --git a/template/globals/event.tpl b/template/globals/event.tpl deleted file mode 100644 index 649254ef..00000000 --- a/template/globals/event.tpl +++ /dev/null @@ -1,9 +0,0 @@ -var _ = g_holidays; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}', - icon:'{$item.icon|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/event.tpl.php b/template/globals/event.tpl.php new file mode 100644 index 00000000..bbaffbb5 --- /dev/null +++ b/template/globals/event.tpl.php @@ -0,0 +1,10 @@ +var _ = g_holidays; +{strip} + $data): + echo '_['.$id.']={' . + 'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' . + 'icon:\''.Util::jsEscape($data['icon']).'\'' . + '};'; +endforeach; +?> diff --git a/template/globals/faction.tpl b/template/globals/faction.tpl deleted file mode 100644 index 03875f7c..00000000 --- a/template/globals/faction.tpl +++ /dev/null @@ -1,8 +0,0 @@ -var _ = g_factions; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/faction.tpl.php b/template/globals/faction.tpl.php new file mode 100644 index 00000000..a378779a --- /dev/null +++ b/template/globals/faction.tpl.php @@ -0,0 +1,7 @@ +var _ = g_factions; +{strip} + $data): + echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; +endforeach; +?> diff --git a/template/globals/item.tpl b/template/globals/item.tpl deleted file mode 100644 index f3ae7426..00000000 --- a/template/globals/item.tpl +++ /dev/null @@ -1,16 +0,0 @@ -var _ = g_items; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}', - icon:'{$item.icon|escape:"javascript"}' - {if isset($item.quality)}, quality:'{$item.quality}'{/if} - {rdelim}; -{/foreach} - -{if $extra} - _[{$extra.id}].tooltip_{$user.language} = '{$extra.tooltip}'; - _[{$extra.id}].spells_{$user.language} = {$extra.spells|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}; -{/if} - -{/strip} diff --git a/template/globals/item.tpl.php b/template/globals/item.tpl.php new file mode 100644 index 00000000..8335a9e0 --- /dev/null +++ b/template/globals/item.tpl.php @@ -0,0 +1,15 @@ +var _ = g_items; + $data): + echo '_['.$id.']={' . + 'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' . + 'icon:\''.Util::jsEscape($data['icon']).'\'' . + (isset($data['quality']) ? ', quality:\''.$data['quality'].'\'' : null) . + '};'; +endforeach; + +if ($extra): + echo '_['.$extra['id'].'].tooltip_'.User::$localeString.' = \''.$extra['tooltip'].'\''; + echo '_['.$extra['id'].'].spells_'.User::$localeString.' = {'.json_encode($extra['spells'], JSON_NUMERIC_CHECK).'};'; +endif; +?> diff --git a/template/globals/object.tpl b/template/globals/object.tpl deleted file mode 100644 index 79565df6..00000000 --- a/template/globals/object.tpl +++ /dev/null @@ -1,8 +0,0 @@ -var _ = g_objects; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/object.tpl.php b/template/globals/object.tpl.php new file mode 100644 index 00000000..40e64cbb --- /dev/null +++ b/template/globals/object.tpl.php @@ -0,0 +1,6 @@ +var _ = g_objects; + $data): + echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; +endforeach; +?> diff --git a/template/globals/pet.tpl b/template/globals/pet.tpl deleted file mode 100644 index 0a757332..00000000 --- a/template/globals/pet.tpl +++ /dev/null @@ -1,8 +0,0 @@ -var _ = g_pets; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - icon:'{$item.icon|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/pet.tpl.php b/template/globals/pet.tpl.php new file mode 100644 index 00000000..f54c993b --- /dev/null +++ b/template/globals/pet.tpl.php @@ -0,0 +1,6 @@ +var _ = g_pets; + $data): + echo '_['.$id.']={icon:\''.Util::jsEscape($data['icon']).'\'};'; +endforeach; +?> diff --git a/template/globals/quest.tpl b/template/globals/quest.tpl deleted file mode 100644 index 8b24f8aa..00000000 --- a/template/globals/quest.tpl +++ /dev/null @@ -1,8 +0,0 @@ -var _ = g_quests; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/quest.tpl.php b/template/globals/quest.tpl.php new file mode 100644 index 00000000..b690c680 --- /dev/null +++ b/template/globals/quest.tpl.php @@ -0,0 +1,6 @@ +var _ = g_quests; + $data): + echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; +endforeach; +?> diff --git a/template/globals/race.tpl b/template/globals/race.tpl deleted file mode 100644 index 3bb9a662..00000000 --- a/template/globals/race.tpl +++ /dev/null @@ -1,8 +0,0 @@ -var _ = g_races; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/race.tpl.php b/template/globals/race.tpl.php new file mode 100644 index 00000000..31a1553f --- /dev/null +++ b/template/globals/race.tpl.php @@ -0,0 +1,6 @@ +var _ = g_races; + $data): + echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; +endforeach; +?> diff --git a/template/globals/skill.tpl b/template/globals/skill.tpl deleted file mode 100644 index 6785cb3f..00000000 --- a/template/globals/skill.tpl +++ /dev/null @@ -1,9 +0,0 @@ -var _ = g_skills; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}', - icon:'{$item.icon|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/skill.tpl.php b/template/globals/skill.tpl.php new file mode 100644 index 00000000..24596caa --- /dev/null +++ b/template/globals/skill.tpl.php @@ -0,0 +1,9 @@ +var _ = g_skills; + $data): + echo '_['.$id.']={' . + 'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' . + 'icon:\''.Util::jsEscape($data['icon']).'\'' . + '};'; +endforeach; +?> diff --git a/template/globals/spell.tpl b/template/globals/spell.tpl deleted file mode 100644 index 713a4ec6..00000000 --- a/template/globals/spell.tpl +++ /dev/null @@ -1,17 +0,0 @@ -var _ = g_spells; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}', - icon:'{$item.icon|escape:"javascript"}' - {rdelim}; -{/foreach} - -{if $extra} - _[{$extra.id}].tooltip_{$user.language} = '{$extra.tooltip}'; - _[{$extra.id}].buff_{$user.language} = '{$extra.buff}'; - _[{$extra.id}].spells_{$user.language} = {$extra.spells|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}; - _[{$extra.id}].buffspells_{$user.language} = {$extra.buffspells|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}; -{/if} - -{/strip} diff --git a/template/globals/spell.tpl.php b/template/globals/spell.tpl.php new file mode 100644 index 00000000..f4d9e3c3 --- /dev/null +++ b/template/globals/spell.tpl.php @@ -0,0 +1,16 @@ +var _ = g_spells; + $data): + echo '_['.$id.']={' . + 'name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\',' . + 'icon:\''.Util::jsEscape($data['icon']).'\'' . + '};'; +endforeach; + +if ($extra): + echo '_['.$extra['id'].'].tooltip_'.User::$localeString.' = \''.$extra['tooltip'].'\''; + echo '_['.$extra['id'].'].buff_'.User::$localeString.' = \''.$extra['buff'].'\''; + echo '_['.$extra['id'].'].spells_'.User::$localeString.' = {'.json_encode($extra['spells'], JSON_NUMERIC_CHECK).'};'; + echo '_['.$extra['id'].'].buffspells_'.User::$localeString.' = {'.json_encode($extra['buffspells'], JSON_NUMERIC_CHECK).'};'; +endif; +?> diff --git a/template/globals/title.tpl b/template/globals/title.tpl deleted file mode 100644 index 4ca93833..00000000 --- a/template/globals/title.tpl +++ /dev/null @@ -1,9 +0,0 @@ -var _ = g_titles; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}' - {if isset($item.namefemale)}, namefemale_{$user.language}:'{$item.namefemale|escape:"javascript"}'{/if} - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/title.tpl.php b/template/globals/title.tpl.php new file mode 100644 index 00000000..1a731889 --- /dev/null +++ b/template/globals/title.tpl.php @@ -0,0 +1,10 @@ +var _ = g_titles; + $data): + echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\''; + if (isset($data['namefemale'])): + echo ', namefemale_'.User::$localeString.':\''.Util::jsEscape($data['namefemale']).'\''; + endif; + echo '};' +endforeach; +?> diff --git a/template/globals/zone.tpl b/template/globals/zone.tpl deleted file mode 100644 index eaf93532..00000000 --- a/template/globals/zone.tpl +++ /dev/null @@ -1,8 +0,0 @@ -var _ = g_gatheredzones; -{strip} -{foreach from=$data key=id item=item} - _[{$id}]={ldelim} - name_{$user.language}:'{$item.name|escape:"javascript"}' - {rdelim}; -{/foreach} -{/strip} diff --git a/template/globals/zone.tpl.php b/template/globals/zone.tpl.php new file mode 100644 index 00000000..24f9d72e --- /dev/null +++ b/template/globals/zone.tpl.php @@ -0,0 +1,6 @@ +var _ = g_gatheredzones; + $data): + echo '_['.$id.']={name_'.User::$localeString.':\''.Util::jsEscape($data['name']).'\'};'; +endforeach; +?> diff --git a/template/head.tpl b/template/head.tpl deleted file mode 100644 index 42e90806..00000000 --- a/template/head.tpl +++ /dev/null @@ -1,50 +0,0 @@ - {if $title}{$title|escape:"html"} - {/if}{$appName} - - - - - - - - - - -{foreach from=$reqCSS item=css} -{if !empty($css.string)} - -{elseif !empty($css.path)} - {if !empty($css.ieCond)}{/if} -{/if} -{/foreach} - - - - - - - -{foreach from=$reqJS item=file}{if !empty($file)} - -{/if}{/foreach} - diff --git a/template/list-page-generic.tpl b/template/list-page-generic.tpl deleted file mode 100644 index 03f46276..00000000 --- a/template/list-page-generic.tpl +++ /dev/null @@ -1,54 +0,0 @@ -{include file='header.tpl'} - -
-
-
- -{if !empty($announcements)} - {foreach from=$announcements item=item} - {include file='bricks/announcement.tpl' an=$item} - {/foreach} -{/if} - - {include file='bricks/mapper.tpl'} - - - -{if !empty($name) || !empty($h1Links)} -
-{if !empty($h1Links)} - -{/if} -{if !empty($name)} -

{$name}

-{/if} -
-{/if} - -{if !empty($lvData)} - {if count($lvData) > 1} -
- {/if} -
- -
-{/if} - -
-
- -{include file='footer.tpl'} diff --git a/template/listviews/achievement.tpl b/template/listviews/achievement.tpl deleted file mode 100644 index 9094519a..00000000 --- a/template/listviews/achievement.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'achievement', - {if !isset($params.id)}id:'achievements',{/if} - {if !isset($params.name)}name:LANG.tab_achievements,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/achievement.tpl.php b/template/listviews/achievement.tpl.php new file mode 100644 index 00000000..e159e554 --- /dev/null +++ b/template/listviews/achievement.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'achievement', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/calendar.tpl b/template/listviews/calendar.tpl deleted file mode 100644 index ab149b0a..00000000 --- a/template/listviews/calendar.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'holidaycal', - {if !isset($params.id)}id:'calendar',{/if} - {if !isset($params.name)}name:LANG.tab_calendar,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/calendar.tpl.php b/template/listviews/calendar.tpl.php new file mode 100644 index 00000000..cd59acf0 --- /dev/null +++ b/template/listviews/calendar.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'holidaycal', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/character.tpl b/template/listviews/character.tpl.php similarity index 94% rename from template/listviews/character.tpl rename to template/listviews/character.tpl.php index 229f5fb1..796805ac 100644 --- a/template/listviews/character.tpl +++ b/template/listviews/character.tpl.php @@ -1,6 +1,5 @@ -{strip} us_addCharactersTab([ - {ldelim} + { id:763, "name":"Lilywhite", "achievementpoints":"0", @@ -23,6 +22,6 @@ "talentspec":0, "published":1, "pinned":0 - {rdelim} + } ]); {/strip} \ No newline at end of file diff --git a/template/listviews/class.tpl b/template/listviews/class.tpl deleted file mode 100644 index d03b3cc1..00000000 --- a/template/listviews/class.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'classs', - {if !isset($params.id)}id:'classes',{/if} - {if !isset($params.name)}name:LANG.tab_classes,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/class.tpl.php b/template/listviews/class.tpl.php new file mode 100644 index 00000000..5fcf097d --- /dev/null +++ b/template/listviews/class.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'classs', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/commentpreview.tpl b/template/listviews/commentpreview.tpl deleted file mode 100644 index 5baaa00c..00000000 --- a/template/listviews/commentpreview.tpl +++ /dev/null @@ -1,30 +0,0 @@ -{strip} - new Listview({ldelim} - template: 'commentpreview', - id: 'comments', - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data: [ - {foreach name=i from=$data item=curr} - {ldelim} - id:{$curr.id}, - user:'{$curr.user|escape:"javascript"}', - date:'{$curr.date|date_format:"%Y/%m/%d %H:%M:%S"}', - preview:'{$curr.preview|escape:"javascript"}', - subject:'{$curr.subject|escape:"javascript"}', - rating: {$curr.rating}, - deleted:{$curr.deleted}, - type:{$curr.type}, - typeId:{$curr.typeId} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/commentpreview.tpl.php b/template/listviews/commentpreview.tpl.php new file mode 100644 index 00000000..face391e --- /dev/null +++ b/template/listviews/commentpreview.tpl.php @@ -0,0 +1,29 @@ +new Listview({ + template:'commentpreview', + id: 'comments', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +/* data: +{ + id:{$curr.id}, + user:'{$curr.user|escape:"javascript"}', + date:'{$curr.date|date_format:"%Y/%m/%d %H:%M:%S"}', + preview:'{$curr.preview|escape:"javascript"}', + subject:'{$curr.subject|escape:"javascript"}', + rating: {$curr.rating}, + deleted:{$curr.deleted}, + type:{$curr.type}, + typeId:{$curr.typeId} +} +*/ +?> + data: +}); diff --git a/template/listviews/creature.tpl b/template/listviews/creature.tpl deleted file mode 100644 index 73473e08..00000000 --- a/template/listviews/creature.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'npc', - {if !isset($params.id)}id:'npcs',{/if} - {if !isset($params.name)}name:LANG.tab_npcs,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach name=params from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ]{rdelim} - ); -{/strip} diff --git a/template/listviews/creature.tpl.php b/template/listviews/creature.tpl.php new file mode 100644 index 00000000..635e3b32 --- /dev/null +++ b/template/listviews/creature.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'npc', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/currency.tpl b/template/listviews/currency.tpl deleted file mode 100644 index b8596923..00000000 --- a/template/listviews/currency.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'currency', - {if !isset($params.id)}id:'currencies',{/if} - {if !isset($params.name)}name:LANG.tab_currencies,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/currency.tpl.php b/template/listviews/currency.tpl.php new file mode 100644 index 00000000..7978f029 --- /dev/null +++ b/template/listviews/currency.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'currency', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/event.tpl b/template/listviews/event.tpl deleted file mode 100644 index e7a2745b..00000000 --- a/template/listviews/event.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'holiday', - {if !isset($params.id)}id:'holidays',{/if} - {if !isset($params.name)}name:LANG.tab_holidays,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/event.tpl.php b/template/listviews/event.tpl.php new file mode 100644 index 00000000..ad03720a --- /dev/null +++ b/template/listviews/event.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'holiday', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/faction.tpl b/template/listviews/faction.tpl deleted file mode 100644 index 4d14e1d3..00000000 --- a/template/listviews/faction.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'faction', - {if !isset($params.id)}id:'factions',{/if} - {if !isset($params.name)}name:LANG.tab_factions,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/faction.tpl.php b/template/listviews/faction.tpl.php new file mode 100644 index 00000000..5faaacf6 --- /dev/null +++ b/template/listviews/faction.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'faction', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/genericmodel.tpl b/template/listviews/genericmodel.tpl deleted file mode 100644 index 488c7419..00000000 --- a/template/listviews/genericmodel.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{strip} - new Listview({ldelim} - template:'genericmodel', - {if !isset($params.id)}id:'same-model-as',{/if} - {if !isset($params.name)}name:LANG.tab_samemodelas,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {* genericlinktype: 'item|object', *} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/genericmodel.tpl.php b/template/listviews/genericmodel.tpl.php new file mode 100644 index 00000000..558a537c --- /dev/null +++ b/template/listviews/genericmodel.tpl.php @@ -0,0 +1,18 @@ +new Listview({ + template:'genericmodel', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/item.tpl b/template/listviews/item.tpl deleted file mode 100644 index 502430e7..00000000 --- a/template/listviews/item.tpl +++ /dev/null @@ -1,84 +0,0 @@ -{if !empty($tab.showRep)} -var _ = [ - {ldelim} - id: 'standing', - after: 'reqlevel', - name: LANG.standing, - width: '12%', - value: 'standing', - type: 'text', - getValue: function(item) - {ldelim} - return g_reputation_standings[item.standing]; - {rdelim}, - compute: function(item, td) - {ldelim} - return g_reputation_standings[item.standing]; - {rdelim} - {rdelim} -]; -{/if} - -{strip} - new Listview({ldelim} - template:'item', - {if !isset($params.id)}id:'items',{/if} - {if !isset($params.name)}name:LANG.tab_items,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} - -{* 4.3 loot-example - - template: 'item', - id: 'drops', - name: LANG.tab_drops, - tabs: tabsRelated, - parent: 'lkljbjkb574', - extraCols: [Listview.extraCols.count, Listview.extraCols.percent], - sort:['-percent', 'name'], - _totalCount: 448092, /* total # creature killed/looted */ - computeDataFunc: Listview.funcBox.initLootTable, - onAfterCreate: Listview.funcBox.addModeIndicator, - data: [ - { - "classs":15, /* Tab Type */ - "commondrop":true, /* loot filtered as "not noteworthy" */ - "id":25445, - "level":1, - "name":"7Wretched Ichor", - "slot":0, - "source":[2], /* 1: crafted; 2:zonedrop; 3:pvp; 4:quest; 5: Vendors; 6:Trainer; 7:Discovery; 8:Redemption; 9: Talent; 10:Starter; 11: Event; 12:Achievement; */ - "sourcemore":[{"z":3520}], /* z: zone... */ - "subclass":0, /* Tab:Type */ - modes:{ - "mode":4, /* &1: heroic; &4: noteworthy(?); &8: reg10; &16: reg25; &32: hc10; &64: hc25; &128: RaidFinder */ - "4":{"count":363318,"outof":448092} /* calculate pct chance */ - }, - count:363318, - stack:[1,1], /* [min, max] */ - pctstack:'{1: 50.0123, 2: 49.9877}' /* {dropCount: relChanceForThisStack} */ - } - ] -}); -*} \ No newline at end of file diff --git a/template/listviews/item.tpl.php b/template/listviews/item.tpl.php new file mode 100644 index 00000000..c1334084 --- /dev/null +++ b/template/listviews/item.tpl.php @@ -0,0 +1,78 @@ + +var _ = [ + { + id: 'standing', + after: 'reqlevel', + name: LANG.standing, + width: '12%', + value: 'standing', + type: 'text', + getValue: function(item) + { + return g_reputation_standings[item.standing]; + }, + compute: function(item, td) + { + return g_reputation_standings[item.standing]; + } + } +]; + + +new Listview({ + template:'item', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); + + \ No newline at end of file diff --git a/template/listviews/itemset.tpl b/template/listviews/itemset.tpl deleted file mode 100644 index e649f1c7..00000000 --- a/template/listviews/itemset.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{strip} - new Listview({ldelim} - template:'itemset', - {if !isset($params.id)}id:'itemsets',{/if} - {if !isset($params.name)}name:LANG.tab_itemsets,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id' && $name != 'name' && $name != 'quality'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - name:'{$curr.quality}{$curr.name|escape:"quotes"}', - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/itemset.tpl.php b/template/listviews/itemset.tpl.php new file mode 100644 index 00000000..5e1a9c48 --- /dev/null +++ b/template/listviews/itemset.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'itemset', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/model.tpl b/template/listviews/model.tpl deleted file mode 100644 index 9c807795..00000000 --- a/template/listviews/model.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'model', - {if !isset($params.id)}id:'gallery',{/if} - {if !isset($params.name)}name:LANG.tab_gallery,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'count'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - count:{$curr.count} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/model.tpl.php b/template/listviews/model.tpl.php new file mode 100644 index 00000000..da068aa1 --- /dev/null +++ b/template/listviews/model.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'model', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/object.tpl b/template/listviews/object.tpl deleted file mode 100644 index 2f637b39..00000000 --- a/template/listviews/object.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'object', - {if !isset($params.id)}id:'objects',{/if} - {if !isset($params.name)}name:LANG.tab_objects,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/object.tpl.php b/template/listviews/object.tpl.php new file mode 100644 index 00000000..e65ccd41 --- /dev/null +++ b/template/listviews/object.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'object', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/pet.tpl b/template/listviews/pet.tpl deleted file mode 100644 index 0ded40bd..00000000 --- a/template/listviews/pet.tpl +++ /dev/null @@ -1,46 +0,0 @@ -var _ = function(family) -{ldelim} - family.foodCount = 0; - for(var food in g_pet_foods) - {ldelim} - if(family.diet & food) - family.foodCount++; - {rdelim} - - family.spellCount = 0; - - for(var i = 0, len = family.spells.length; i < len; ++i) - {ldelim} - if(family.spells[i]) - family.spellCount++; - {rdelim} -{rdelim}; -{strip} - new Listview({ldelim} - template:'pet', - computeDataFunc: _, - {if !isset($params.id)}id:'hunter-pets',{/if} - {if !isset($params.name)}name:LANG.tab_pets,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/pet.tpl.php b/template/listviews/pet.tpl.php new file mode 100644 index 00000000..eb643a3d --- /dev/null +++ b/template/listviews/pet.tpl.php @@ -0,0 +1,36 @@ +var _ = function(family) +{ + family.foodCount = 0; + for(var food in g_pet_foods) + { + if(family.diet & food) + family.foodCount++; + } + + family.spellCount = 0; + + for(var i = 0, len = family.spells.length; i < len; ++i) + { + if(family.spells[i]) + family.spellCount++; + } +}; + +new Listview({ + template:'pet', + computeDataFunc: _, + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/profile.tpl b/template/listviews/profile.tpl deleted file mode 100644 index 1ed2db3b..00000000 --- a/template/listviews/profile.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{strip} - new Listview({ldelim} - template:'profile', - {if !isset($params.id)}id:'profiles',{/if} - {if !isset($params.name)}name:LANG.tab_profiles,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - id:{$curr.id}, - name:'{$curr.name|escape:"javascript"}', - race:{$curr.race}, - classs:{$curr.class}, - gender:{$curr.gender}, - level:{$curr.level}, - faction:{$curr.faction}, - talenttree1:{$curr.tree[0]}, - talenttree2:{$curr.tree[1]}, - talenttree3:{$curr.tree[2]}, - talentspec:{$curr.spec}, - achievementpoints:{$curr.acvPts}, - guild:'{$curr.guildName|escape:"javascript"}', {* 0 if none *} - guildrank:{$curr.guildRank}, - {if isset($curr.description)} - description:'{$curr.description|escape:"javascript"}', - {/if} - {if isset($curr.icon)} - icon:'{$curr.icon|escape:"javascript"}', - {/if} - {if isset($curr.published)} - published:1, - {/if} - {if isset($curr.pinned)} - pinned:1, - {/if} - {if isset($curr.deleted)} - deleted:1, - {/if} - realm:'{$curr.realmInternal|escape:"javascript"}', - realmname:'{$curr.realmName|escape:"javascript"}', - battlegroup:'{$curr.bgInternal|escape:"javascript"}', - battlegroupname:'{$curr.bgName|escape:"javascript"}', - region:'{$curr.region|escape:"javascript"}' - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} \ No newline at end of file diff --git a/template/listviews/profile.tpl.php b/template/listviews/profile.tpl.php new file mode 100644 index 00000000..0d27900d --- /dev/null +++ b/template/listviews/profile.tpl.php @@ -0,0 +1,58 @@ +new Listview({ + template:'profile', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); + + +var _ = [ + { + id: 'reputation', + after: 'rewards', + name: LANG.rep, + tooltip: LANG.tooltip_repgain, + width: '8%', + value: 'reputation' + } +]; + + +new Listview({ + template:'quest', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/race.tpl b/template/listviews/race.tpl deleted file mode 100644 index 2e06a869..00000000 --- a/template/listviews/race.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'race', - {if !isset($params.id)}id:'races',{/if} - {if !isset($params.name)}name:LANG.tab_races,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/race.tpl.php b/template/listviews/race.tpl.php new file mode 100644 index 00000000..6be7df45 --- /dev/null +++ b/template/listviews/race.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'race', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/screenshot.tpl b/template/listviews/screenshot.tpl deleted file mode 100644 index 09ff4481..00000000 --- a/template/listviews/screenshot.tpl +++ /dev/null @@ -1,30 +0,0 @@ -{strip} - new Listview({ldelim} - template: 'screenshot', - id: 'screenshots', - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data: [ - {foreach name=i from=$data item=curr} - {ldelim} - id:{$curr.id}, - user:'{$curr.user|escape:"javascript"}', - date:'{$curr.date|date_format:"%Y/%m/%d %H:%M:%S"}', - caption:'{$curr.caption|escape:"javascript"}', - subject:'{$curr.subject|escape:"javascript"}', - width:{$curr.width}, - height:{$curr.height}, - type:{$curr.type}, - typeId:{$curr.typeId} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/screenshot.tpl.php b/template/listviews/screenshot.tpl.php new file mode 100644 index 00000000..2254c94d --- /dev/null +++ b/template/listviews/screenshot.tpl.php @@ -0,0 +1,16 @@ +new Listview({ + template:'screenshot', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/skill.tpl b/template/listviews/skill.tpl deleted file mode 100644 index 3ce89689..00000000 --- a/template/listviews/skill.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'skill', - {if !isset($params.id)}id:'skills',{/if} - {if !isset($params.name)}name:LANG.tab_skills,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/skill.tpl.php b/template/listviews/skill.tpl.php new file mode 100644 index 00000000..efaf3dd7 --- /dev/null +++ b/template/listviews/skill.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'skill', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/spell.tpl b/template/listviews/spell.tpl deleted file mode 100644 index d7a83b71..00000000 --- a/template/listviews/spell.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{strip} - new Listview({ldelim} - template:'spell', - {if !isset($params.id)}id:'spells',{/if} - {if !isset($params.name)}name:LANG.tab_spells,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id' && $name != 'name' && $name != 'quality'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - name:'{$curr.quality}{$curr.name|escape:"javascript"}', - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/spell.tpl.php b/template/listviews/spell.tpl.php new file mode 100644 index 00000000..42bb32a4 --- /dev/null +++ b/template/listviews/spell.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'spell', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/title.tpl b/template/listviews/title.tpl deleted file mode 100644 index 9f1404d3..00000000 --- a/template/listviews/title.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'title', - {if !isset($params.id)}id:'titles',{/if} - {if !isset($params.name)}name:LANG.tab_titles,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/title.tpl.php b/template/listviews/title.tpl.php new file mode 100644 index 00000000..7a33f7a5 --- /dev/null +++ b/template/listviews/title.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'title', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/video.tpl b/template/listviews/video.tpl deleted file mode 100644 index ffd510c0..00000000 --- a/template/listviews/video.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{strip} - new Listview({ldelim} - template: 'video', - id: 'videos', - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data: [ - {foreach name=i from=$data item=curr} - {ldelim} - id:{$vi.id}, - user:'{$vi.user}', - date:'{$vi.date|date_format:"%Y/%m/%d %H:%M:%S"}', - videoType:1, {* there is only youtube *} - videoId:'{$vi.videoId}', - type:{$page.type}, - typeId:{$page.typeId}, - {if isset($vi.sticky)} - sticky:{$vi.sticky}, - {/if} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} - diff --git a/template/listviews/video.tpl.php b/template/listviews/video.tpl.php new file mode 100644 index 00000000..4f378a47 --- /dev/null +++ b/template/listviews/video.tpl.php @@ -0,0 +1,16 @@ +new Listview({ + template:'video', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/listviews/zone.tpl b/template/listviews/zone.tpl deleted file mode 100644 index 3c39d486..00000000 --- a/template/listviews/zone.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{strip} - new Listview({ldelim} - template:'zone', - {if !isset($params.id)}id:'zones',{/if} - {if !isset($params.name)}name:LANG.tab_zones,{/if} - {if !isset($params.parent)}parent:'lv-generic',{/if} - {foreach from=$params key=k item=v} - {if $v[0] == '$'} - {$k}:{$v|substr:1}, - {else if $v} - {$k}:'{$v}', - {/if} - {/foreach} - data:[ - {foreach name=i from=$data item=curr} - {ldelim} - {foreach from=$curr key='name' item=val} - {if $name != 'id'} - {$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK}, - {/if} - {/foreach} - id:{$curr.id} - {rdelim} - {if $smarty.foreach.i.last}{else},{/if} - {/foreach} - ] - {rdelim}); -{/strip} diff --git a/template/listviews/zone.tpl.php b/template/listviews/zone.tpl.php new file mode 100644 index 00000000..cd0b726e --- /dev/null +++ b/template/listviews/zone.tpl.php @@ -0,0 +1,17 @@ +new Listview({ + template:'zone', + $v): + if ($v[0] == '$'): + echo $k.':'.substr($v, 1).','; + elseif ($v): + echo $k.":'".$v."',"; + endif; + endforeach; +?> + data: +}); diff --git a/template/achievement.tpl b/template/pages/achievement.tpl similarity index 100% rename from template/achievement.tpl rename to template/pages/achievement.tpl diff --git a/template/achievements.tpl b/template/pages/achievements.tpl similarity index 100% rename from template/achievements.tpl rename to template/pages/achievements.tpl diff --git a/template/compare.tpl b/template/pages/compare.tpl similarity index 100% rename from template/compare.tpl rename to template/pages/compare.tpl diff --git a/template/pages/dashboard.tpl b/template/pages/dashboard.tpl new file mode 100644 index 00000000..b6fc9f48 --- /dev/null +++ b/template/pages/dashboard.tpl @@ -0,0 +1,132 @@ +{include file='header.tpl'} + +
+
+
+ {if !empty($announcements)} + {foreach from=$announcements item=item} + {include file='bricks/announcement.tpl' an=$item} + {/foreach} + {/if} + + + + +
{$lang.quickFacts}
+
+
+
    +
  • {$lang.login}: {$user.login}
  • +
  • {$lang.joinDate}{$lang.colon}{'Y/m/d'|date:$user.joinDate}
  • +
  • {$lang.lastLogin}{$lang.colon}{'Y/m/d'|date:$user.lastLogin}
  • +
  • {$lang.userGroups}{$lang.colon}{$user.roles}
  • +
  • {$lang.email}: {$user.email}
  • +
  • {$lang.lastIP}: {$user.lastIP}
  • + +
+
+ +
+ +

{$lang.myAccount}

+{* BANNED POPUP *} +{if !empty($user.banned)} +
+

[Account banned]

+
    +
  • [banner]: {$user.bannedBy}
  • +
  • [end]: {$user.unbanDate}
  • +
  • [reason]{$lang.colon}{if isset($user.banReason)}{$user.banReason}{else}[none given.]{/if}
  • +
+
+{/if} + {$lang.editAccount} + + + +{* USER-PROFILE EDITING *} + +

{$lang.publicDesc}

+
{$lang.Your_description_has_been_updated_successfully}.
+ +
+ {$lang.viewPublicDesc|sprintf:$user.name}. +
+
+ +
+ +
+{* CLAIM CHARACTERS *} +

[Select Character]

+{strip} + +{if $user.chars} + + {foreach from=$user.chars item=c} + + + + + {/foreach} +
+ {if $c.this} + {$c.name} + {else} + {$c.name} + {/if} +   + {if $c.guild} + <{$c.guild|escape:"html"}> + {/if} +  — {$c.text} +
+{else} + [no characters on ths account] +{/if} +
+ +{/strip} +{* CHANGE PASSWORD / EMAIL / DISPLAYNAME / AVATAR * } +

{$lang.Change_password}

+
+ +{if isset($cpmsg)} +
{$cpmsg.msg}
+{/if} + + + + + +
{$lang.Current_password}{$lang.colon}
{$lang.New_password}{$lang.colon}
{$lang.Confirm_new_password}{$lang.colon}
+
+
+ +
+ +
+ +
+
+{include file='footer.tpl'} \ No newline at end of file diff --git a/template/pages/detail-page-generic.tpl.php b/template/pages/detail-page-generic.tpl.php new file mode 100644 index 00000000..5d97f787 --- /dev/null +++ b/template/pages/detail-page-generic.tpl.php @@ -0,0 +1,66 @@ +brick('header'); ?> + +
+
+
+ +brick('announcement'); ?> + + + +brick('infobox'); ?> + +
+brick('headIcons'); + + $this->brick('redButtons'); +?> + + expansion) ? 'class="h1-icon">'.$this->name.'' : '>'.$this->name; ?> + +brick('article'); + + $this->brick('mapper'); + +if (isset($this->extraText)): +?> +
+ + +
+unavailable)): +?> +
+ + +

+
+ +brick('tabsRelated'); + + $this->brick('contribute'); +?> + +
+
+ +brick('footer'); ?> diff --git a/template/pages/guilds.tpl b/template/pages/guilds.tpl new file mode 100644 index 00000000..c7fe571c --- /dev/null +++ b/template/pages/guilds.tpl @@ -0,0 +1,77 @@ +{include file='header.tpl'} + +
+
+
+{if !empty($announcements)} + {foreach from=$announcements item=item} + {include file='bricks/announcement.tpl' an=$item} + {/foreach} +{/if} + + + +
+
+ + + + + + + + + + + + + + + + + +
{$lang.name}{$lang.colon} + + + + +
  
+
Region{$lang.colon}     Realm{$lang.colon} 
{$lang.side}{$lang.colon}     Level{$lang.colon}  -
+ +
+ +
+
{$lang.refineSearch}
+ +
+
+
+ + + +
+ + +
+
+
+ +{include file='footer.tpl'} diff --git a/template/item.tpl b/template/pages/item.tpl similarity index 100% rename from template/item.tpl rename to template/pages/item.tpl diff --git a/template/items.tpl b/template/pages/items.tpl similarity index 100% rename from template/items.tpl rename to template/pages/items.tpl diff --git a/template/itemset.tpl b/template/pages/itemset.tpl similarity index 100% rename from template/itemset.tpl rename to template/pages/itemset.tpl diff --git a/template/itemsets.tpl b/template/pages/itemsets.tpl similarity index 100% rename from template/itemsets.tpl rename to template/pages/itemsets.tpl diff --git a/template/pages/list-page-generic.tpl.php b/template/pages/list-page-generic.tpl.php new file mode 100644 index 00000000..d0d0054d --- /dev/null +++ b/template/pages/list-page-generic.tpl.php @@ -0,0 +1,55 @@ +brick('header'); ?> + +
+
+
+ +brick('announcement'); + + $this->brick('mapper'); +?> + + + +name) || !empty($this->h1Links)): + echo '
' . + (!empty($this->h1Links) ? '' : null) . + (!empty($this->name) ? '

'.$this->name.'

' : null) . + '
'; +endif; + +if (!empty($this->lvData)): + if (count($this->lvData) > 1): + echo '
'; + endif; +?> +
+ +
+ +
+
+ +brick('footer'); ?> diff --git a/template/main.tpl b/template/pages/main.tpl.php similarity index 75% rename from template/main.tpl rename to template/pages/main.tpl.php index 4aaa282b..7bd690bc 100644 --- a/template/main.tpl +++ b/template/pages/main.tpl.php @@ -1,28 +1,22 @@ - {include file='head.tpl'} +brick('head'); ?>
-{if !empty($announcements)} - {foreach from=$announcements item=item} - {include file='bricks/announcement.tpl' an=$item} - {/foreach} -{/if} +brick('announcements'); ?> -{if isset($news)} +news)): +?>
    -{foreach from=$news item=item} -
  • {$item.text}
  • -{/foreach} +news as $item): + echo '
  • '.$item['text']."
  • \n"; + endforeach; +?>
-{/if} +
- + \ No newline at end of file diff --git a/template/pages/maintenance.tpl.php b/template/pages/maintenance.tpl.php new file mode 100644 index 00000000..9249438e --- /dev/null +++ b/template/pages/maintenance.tpl.php @@ -0,0 +1,21 @@ + + + + + + Maintenance + + + + +
+
The website is currently closed for maintenance.
+

It will take a few minutes...

+
+ + diff --git a/template/maps.tpl b/template/pages/maps.tpl similarity index 100% rename from template/maps.tpl rename to template/pages/maps.tpl diff --git a/template/npc.tpl b/template/pages/npc.tpl similarity index 100% rename from template/npc.tpl rename to template/pages/npc.tpl diff --git a/template/npcs.tpl b/template/pages/npcs.tpl similarity index 100% rename from template/npcs.tpl rename to template/pages/npcs.tpl diff --git a/template/object.tpl b/template/pages/object.tpl similarity index 100% rename from template/object.tpl rename to template/pages/object.tpl diff --git a/template/objects.tpl b/template/pages/objects.tpl similarity index 100% rename from template/objects.tpl rename to template/pages/objects.tpl diff --git a/template/profile.tpl b/template/pages/profile.tpl similarity index 100% rename from template/profile.tpl rename to template/pages/profile.tpl diff --git a/template/profiles.tpl b/template/pages/profiles.tpl similarity index 100% rename from template/profiles.tpl rename to template/pages/profiles.tpl diff --git a/template/quest.tpl b/template/pages/quest.tpl similarity index 100% rename from template/quest.tpl rename to template/pages/quest.tpl diff --git a/template/quests.tpl b/template/pages/quests.tpl similarity index 100% rename from template/quests.tpl rename to template/pages/quests.tpl diff --git a/template/pages/recoverPass.tpl b/template/pages/recoverPass.tpl new file mode 100644 index 00000000..8f01354e --- /dev/null +++ b/template/pages/recoverPass.tpl @@ -0,0 +1,32 @@ +{include file='header.tpl'} + +
+
+
+
+ +
+
+

[Password Reset: Step 1 of 2]

+
+ +
+ [Email address]{$lang.colon} +
+ +
+
+ + +
+ +
+
+ + +
+
+ +
+ +{include file='footer.tpl'} diff --git a/template/pages/recoverUser.tpl b/template/pages/recoverUser.tpl new file mode 100644 index 00000000..1fce5a46 --- /dev/null +++ b/template/pages/recoverUser.tpl @@ -0,0 +1,31 @@ +{include file='header.tpl'} + +
+
+
+
+ +
+
+

[Username Request]

+
+ +
+ [Email address]{$lang.colon} +
+ +
+
+ + +
+ +
+
+ + +
+
+
+ +{include file='footer.tpl'} diff --git a/template/search.tpl b/template/pages/search.tpl similarity index 100% rename from template/search.tpl rename to template/pages/search.tpl diff --git a/template/signin.tpl b/template/pages/signin.tpl similarity index 100% rename from template/signin.tpl rename to template/pages/signin.tpl diff --git a/template/signup.tpl b/template/pages/signup.tpl similarity index 100% rename from template/signup.tpl rename to template/pages/signup.tpl diff --git a/template/spell.tpl b/template/pages/spell.tpl similarity index 100% rename from template/spell.tpl rename to template/pages/spell.tpl diff --git a/template/spells.tpl b/template/pages/spells.tpl similarity index 100% rename from template/spells.tpl rename to template/pages/spells.tpl diff --git a/template/talent.tpl b/template/pages/talent.tpl similarity index 100% rename from template/talent.tpl rename to template/pages/talent.tpl diff --git a/template/pages/text-page-generic.tpl.php b/template/pages/text-page-generic.tpl.php new file mode 100644 index 00000000..5225ec9c --- /dev/null +++ b/template/pages/text-page-generic.tpl.php @@ -0,0 +1,50 @@ +brick('header'); ?> + +
+
+
+ +brick('announcements'); + +if (isset($this->subject)): +?> +
+ +
+

subject).' #'.$this->typeId; ?>

+
subject); ?>
+ + + +
+

name; ?>

+ +brick('article'); + +if (isset($this->extraText)): +?> +
+ + +
+ +
+
+
+ +brick('footer'); ?> diff --git a/template/pages/zone.tpl b/template/pages/zone.tpl new file mode 100644 index 00000000..72882eaa --- /dev/null +++ b/template/pages/zone.tpl @@ -0,0 +1,89 @@ +{include file='header.tpl'} + +
+ +
+
+ + + +
+ + WowheadWowhead +

{$zone.name}

+ +{include file='bricks/article.tpl'} + +{if $zone.position} +
+{strip} + + {foreach from=$zone.position item=zoneitem name=zoneitem} + + {if isset($point.r.h) or isset($point.r.m) or isset($point.r.s) or isset($point.events)} +
+ {$lang.respawn}: + {if isset($point.r.h)} {$point.r.h}{$lang.abbrHour}{/if} + {if isset($point.r.m)} {$point.r.m}{$lang.abbrMinute}{/if} + {if isset($point.r.s)} {$point.r.s}{$lang.abbrSecond}{/if} + {if isset($point.events)}
{$point.events|escape:"quotes"}{/if} +
+
+ {/if}', + {if isset($point.url)}url:'{$point.url|escape:"quotes"}',{/if} + type:'{$point.type}' + {rdelim}] + {if !$smarty.foreach.point.last},{/if} + {/foreach} + ] + {/if} + {rdelim}); + g_setSelectedLink(this, 'mapper'); return false" onmousedown="return false"> + {$zoneitem.name}
{if $zoneitem.population > 1} ({$zoneitem.population}){/if}{if $smarty.foreach.zoneitem.last}{else}, {/if} + {/foreach} +
+{/strip} +
+
+ + +{/if} +{if isset($zone.parentname) and isset($zone.parent)} +
+
{$lang.zonePartOf} {$zone.parentname}.
+{/if} +

{$lang.related}

+
+ +{include file='bricks/tabsRelated.tpl' tabs=$lvData.relTabs} + +{include file='bricks/contribute.tpl'} + +
+
+
+ +{include file='footer.tpl'} \ No newline at end of file diff --git a/template/text-page-generic.tpl b/template/text-page-generic.tpl deleted file mode 100644 index 4970ca8e..00000000 --- a/template/text-page-generic.tpl +++ /dev/null @@ -1,48 +0,0 @@ -{include file='header.tpl'} - -
-
-
- -{if !empty($announcements)} - {foreach from=$announcements item=item} - {include file='bricks/announcement.tpl' an=$item} - {/foreach} -{/if} - -{if isset($notFound)} -
- -
-

{$typeStr} #{$typeId}

-
{$notFound}
-{else} - - -
-

{$name}

- - {include file='bricks/article.tpl'} - - {if isset($extraText)} -
- - -
- {/if} -{/if} -
-
-
- -{include file='footer.tpl'}