* distinguish between articles for dbpage and other articles
 * can be served by url instead of arbitrary picked type/typeId-pair
 * save access to article in db (not used yet)
 * serve correct g_pageInfo if on article-page

SiteReputation/Privileges
 * implemented info pages
This commit is contained in:
Sarjuuk
2017-03-19 22:58:51 +01:00
parent 939a3f1e31
commit 5360b09d0f
21 changed files with 554 additions and 111 deletions

View File

@@ -123,6 +123,7 @@ class CommunityContent
case TYPE_CURRENCY: $obj = new CurrencyList($cnd); break;
case TYPE_EMOTE: $obj = new EmoteList($cnd); break;
case TYPE_ENCHANTMENT: $obj = new EnchantmentList($cnd); break;
case TYPE_SOUND: $obj = new SoundList($cnd); break;
default: continue;
}

View File

@@ -118,6 +118,9 @@ switch ($pageCall)
case 'help':
case 'faq':
case 'aboutus':
case 'reputation':
case 'privilege':
case 'privileges':
(new MorePage($pageCall, $pageParam))->display();
break;
case 'latest-additions':

View File

@@ -10,6 +10,7 @@ class Lang
private static $game;
private static $maps;
private static $screenshot;
private static $privileges;
// types
private static $achievement;

View File

@@ -46,12 +46,14 @@ $lang = array(
'forum' => "Forum",
'n_a' => "n. v.",
'siteRep' => "Ruf",
'yourRepHistory'=> "Dein Ruf-Verlauf",
'aboutUs' => "Über Aowow",
'and' => " und ",
'or' => " oder ",
'back' => "Zurück",
'reputationTip' => "Rufpunkte",
'byUserTimeAgo' => 'Von <a href="'.HOST_URL.'/?user=%s">%1$s</a> vor %s',
'help' => "Hilfe",
// filter
'extSearch' => "Erweiterte Suche",
@@ -117,13 +119,6 @@ $lang = array(
'_cpHelp' => "Um loszulegen, folgt einfach den untenstehenden Schritten. Falls Ihr mehr Informationen benötigt, schaut auf unserer ausführlichen <a href=\"?help=profiler\">Hilfeseite</a> nach.",
'_cpFooter' => "Falls Ihr eine genauere Suche möchtet, probiert unsere <a href=\"?profiles\">erweiterten Suchoptionen</a>. Ihr könnt außerdem ein <a href=\"?profile&amp;new\">neues individuelles Profil</a> erstellen.",
// help
'help' => "Hilfe",
'helpTopics' => array(
"Wie man Kommentare schreibt", "Modellviewer", "Screenshots: Tipps & Tricks", "Gewichtung von Werten",
"Talentrechner", "Gegenstandsvergleich", "Profiler", "Markup Guide"
),
// search
'search' => "Suche",
'searchButton' => "Suche",
@@ -143,6 +138,25 @@ $lang = array(
'genericError' => "Ein Fehler trat auf; aktualisiert die Seite und versucht es nochmal. Wenn der Fehler bestehen bleibt, bitte meldet es bei <a href='#contact'>feedback</a>", # LANG.genericerror
'bannedRating' => "Ihr wurdet davon gesperrt, Kommentare zu bewerten.", # LANG.tooltip_banned_rating
'tooManyVotes' => "Ihr habt die tägliche Grenze für erlaubte Bewertungen erreicht. Kommt morgen mal wieder!", # LANG.tooltip_too_many_votes
'moreTitles' => array(
'reputation' => "Benutzerruf",
'whats-new' => "Was gibt's Neues?",
'searchbox' => "Suchbox",
'tooltips' => "Tooltips",
'faq' => "Häufig gestellte Fragen",
'aboutus' => "Was ist AoWoW?",
'searchplugins' => "Such-Plugins",
'privileges' => "Privilegien",
'help' => array(
'commenting-and-you' => "Wie man Kommentare schreibt", 'modelviewer' => "Modellviewer", 'screenshots-tips-tricks' => "Screenshots: Tipps & Tricks",
'stat-weighting' => "Gewichtung von Werten", 'talent-calculator' => "Talentrechner", 'item-comparison' => "Gegenstandsvergleich",
'profiler' => "Profiler", 'markup-guide' => "Markup Guide"
),
'privilege' => array(
)
)
),
'screenshot' => array(
'submission' => "Screenshot-Einsendung",
@@ -501,6 +515,19 @@ $lang = array(
'Azeroth' => "Azeroth",
'CosmicMap' => "Kosmische Karte",
),
'privileges' => array(
'main' => "Auf unserer Seite könnt Ihr <a href=\"?reputation\">Ruf</a> erringen. Hauptsächlich erringt man Ruf dadurch, dass Eure Kommentare positiv bewertet werden.<br><br>Das heißt, Euer Ruf hängt in gewissem Maße davon ab, wie sehr Ihr der Community beiträgt.<br><br>Mit dem Sammeln von Ruf verdient Ihr Euch auch das Vertrauen der Gemeinschaft ein, und Ihr erhält Privilegien. Unten könnt Ihr eine vollständige Liste einsehen.",
'privilege' => "Privileg",
'privileges' => "Privilegien",
'requiredRep' => "Benötigter Ruf",
'_privileges' => array(
null, "Kommentare einsenden", "Webseitenexterne Links einsenden", null,
"Kein CAPTCHA", "Kommentarbewertungen zählen mehr", null, null,
null, "Mehr Wertungsfreiheit", "Kommentare positiv bewerten", "Kommentare negativ bewerten",
"Kommentarantwort einsenden", "Rahmen: Außergewöhnlich", "Rahmen: Selten", "Rahmen: Episch",
"Rahmen: Legendär", "AoWoW Premium"
)
),
'zone' => array(
'notFound' => "Dieses Gebiet existiert nicht.",
'attunement' => ["Einstimmung", "Heroische Einstimmung"],

View File

@@ -41,12 +41,14 @@ $lang = array(
'forum' => "Forum",
'n_a' => "n/a",
'siteRep' => "Reputation",
'yourRepHistory'=> "Your Reputation History",
'aboutUs' => "About us & contact",
'and' => " and ",
'or' => " or ",
'back' => "Back",
'reputationTip' => "Reputation points",
'byUserTimeAgo' => 'By <a href="'.HOST_URL.'/?user=%s">%1$s</a> %s ago',
'help' => "Help",
// filter
'extSearch' => "Extended search",
@@ -112,13 +114,6 @@ $lang = array(
'_cpHelp' => "To get started, just follow the steps below. If you'd like more information, check out our extensive <a href=\"?help=profiler\">help page</a>.",
'_cpFooter' => "If you want a more refined search try out our <a href=\"?profiles\">advanced search</a> options. You can also create a <a href=\"?profile&amp;new\">new custom profile</a>.",
// help
'help' => "Help",
'helpTopics' => array(
"Commenting and You", "Model Viewer", "Screenshots: Tips & Tricks", "Stat Weighting",
"Talent Calculator", "Item Comparison", "Profiler", "Markup Guide"
),
// search
'search' => "Search",
'searchButton' => "Search",
@@ -138,6 +133,25 @@ $lang = array(
'genericError' => "An error has occurred; refresh the page and try again. If the error persists email <a href=\"#contact\">feedback</a>", # LANG.genericerror
'bannedRating' => "You have been banned from rating comments.", # LANG.tooltip_banned_rating
'tooManyVotes' => "You have reached the daily voting cap. Come back tomorrow!", # LANG.tooltip_too_many_votes
'moreTitles' => array(
'reputation' => "Website Reputation",
'whats-new' => "What's New",
'searchbox' => "Search Box",
'tooltips' => "Tooltips",
'faq' => "Frequently Asked Questions",
'aboutus' => "What is AoWoW?",
'searchplugins' => "Search Plugins",
'privileges' => "Privileges",
'help' => array(
'commenting-and-you' => "Commenting and You", 'modelviewer' => "Model Viewer", 'screenshots-tips-tricks' => "Screenshots: Tips & Tricks",
'stat-weighting' => "Stat Weighting", 'talent-calculator' => "Talent Calculator", 'item-comparison' => "Item Comparison",
'profiler' => "Profiler", 'markup-guide' => "Markup Guide"
),
'privilege' => array(
)
)
),
'screenshot' => array(
'submission' => "Screenshot Submission",
@@ -496,6 +510,19 @@ $lang = array(
'Azeroth' => "Azeroth",
'CosmicMap' => "Cosmic Map",
),
'privileges' => array(
'main' => "Here on our Site you can generate <a href=\"?reputation\">reputation</a>. The main way to generate it is to get your comments upvotes.<br><br>So, reputation is a rough measure of how much you contributed to the community.<br><br>As you amass reputation you earn the community's trust and you will be granted with additional privileges. You can find a full list below.",
'privilege' => "Privilege",
'privileges' => "Privileges",
'requiredRep' => "Reputation Required",
'_privileges' => array(
null, "Post comments", "Post external links", null,
"No CAPTCHAs", "Comment votes worth more", null, null,
null, "More votes per day", "Upvote comments", "Downvote comments",
"Post comment replies", "Border: Uncommon", "Border: Rare", "Border: Epic",
"Border: Legendary", "AoWoW Premium"
)
),
'zone' => array(
'notFound' => "This zone doesn't exist.",
'attunement' => ["Attunement", "Heroic attunement"],

View File

@@ -46,12 +46,14 @@ $lang = array(
'forum' => "Foro",
'n_a' => "n/d",
'siteRep' => "Reputación",
'yourRepHistory'=> "Tu Historial de Reputación",
'aboutUs' => "Sobre Aowow",
'and' => " y ",
'or' => " o ",
'back' => "Atrás",
'reputationTip' => "Puntos de reputación",
'byUserTimeAgo' => 'Por <a href="'.HOST_URL.'/?user=%s">%1$s</a> hace %s',
'help' => "Ayuda",
// filter
'extSearch' => "Extender búsqueda",
@@ -117,13 +119,6 @@ $lang = array(
'_cpHelp' => "Para comenzar, sigue los pasos abajo indicados. Si quieres más información, revisa nuestra amplia <a href=\"?help=profiler\">página de ayuda</a>.",
'_cpFooter' => "Si quieres una búsqueda más refinada, prueba con nuestras opciones de <a href=\"?profiles\">búsqueda avanzada</a>. También puedes crear un <a href=\"?profile&amp;new\">perfil nuevo personalizado</a>.",
// help
'help' => "Ayuda",
'helpTopics' => array(
"Los comentarios y tú", "Visualizador de modelos", "Capturas de pantalla: Sugerencias y trucos", "Medición de atributos",
"Calculadora de talentos", "Comparación de objetos", "Perfiles", "Margen de Guia"
),
// search
'search' => "Búsqueda",
'searchButton' => "búsqueda",
@@ -143,6 +138,25 @@ $lang = array(
'genericError' => "Ha ocurrido un error; refresca la página e inténtalo de nuevo. Si el error persiste manda un correo a <a href='#contact'>feedback</a>", # LANG.genericerror
'bannedRating' => "Has sido baneado y no podrás valorar comentarios.", # LANG.tooltip_banned_rating
'tooManyVotes' => "Has alcanzado el límite diario de votos. Vuelve mañana.", # LANG.tooltip_too_many_votes
'moreTitles' => array(
'reputation' => "Reputación de la web",
'whats-new' => "What's New",
'searchbox' => "Caja de búsqueda",
'tooltips' => "Tooltips",
'faq' => "Preguntas frecuentes",
'aboutus' => "[What is AoWoW?]",
'searchplugins' => "Extensiones de búsqueda",
'privileges' => "Privilegios",
'help' => array(
'commenting-and-you' => "Los comentarios y tú", 'modelviewer' => "Visualizador de modelos", 'screenshots-tips-tricks' => "Capturas de pantalla: Sugerencias y trucos",
'stat-weighting' => "Medición de atributos", 'talent-calculator' => "Calculadora de talentos", 'item-comparison' => "Comparación de objetos",
'profiler' => "Perfiles", 'markup-guide' => "Margen de Guia"
),
'privilege' => array(
)
)
),
'screenshot' => array(
'submission' => "Enviar una captura de pantalla",
@@ -502,6 +516,19 @@ $lang = array(
'Azeroth' => "Azeroth",
'CosmicMap' => "Mapa cósmico",
),
'privileges' => array(
'main' => "Aquí, en AoWoW, puedes conseguir <a href=\"?reputation\">reputación</a>. La forma principal de conseguirla es conseguir que tus comentarios sean votados de forma positiva.<br /><br />Así pues, la reputación es algo que mide, más o menos, cúanto has contribuido a la comunidad.<br /><br />Conforme consigues reputación, te ganas la confianza de la comunidad y tendrás privilegios adicionales. Puedes encontrar una lista completa debajo.",
'privilege' => "Privilegio",
'privileges' => "Privilegios",
'requiredRep' => "Reputación requerida",
'_privileges' => array(
null, "Escribir comentarios", "Escribir enlaces externos", null,
"Sin CAPTCHAs", "Los votos de comentario valen más", null, null,
null, "Más votos por día", "Dar una valoración positiva a comentarios", "Dar una valoración negativa a comentarios",
"Escribir respuestas a comentarios", "Borde: Poco Común", "Borde: Raro", "Borde: Épica",
"Borde: Legendaria", "AoWoW Premium"
)
),
'zone' => array(
'notFound' => "Esta zona no existe.",
'attunement' => ["Requisito", "Requisito heroica"],

View File

@@ -46,12 +46,14 @@ $lang = array(
'forum' => "Forum",
'n_a' => "n/d",
'siteRep' => "Réputation",
'yourRepHistory'=> "Votre historique de réputation",
'aboutUs' => "À propos de Aowow",
'and' => " et ",
'or' => " ou ",
'back' => "Redro",
'reputationTip' => "Points de réputation",
'byUserTimeAgo' => 'Par <a href="'.HOST_URL.'/?user=%s">%1$s</a> il y a %s',
'help' => "Aide",
// filter
'extSearch' => "Recherche avancée",
@@ -117,13 +119,6 @@ $lang = array(
'_cpHelp' => "Pour débuter, suivez simplement les étapes ci-dessous. Si vous voulez plus d'information, lisez notre <a href=\"?help=profiler\">page d'aide</a> détaillée.",
'_cpFooter' => "Si vous voulez une recherche plus raffinée, essayez nos options de <a href=\"?profiles\">recherche avancée</a>. Vous pouvez aussi créer un <a href=\"?profile&amp;new\">nouveau profile personnalisé</a>.",
// help
'help' => "Aide",
'helpTopics' => array(
"Le guide du commentaire", "Visionneuse 3D", "Captures d'écran : Trucs et astuces", "Échelles de valeurs",
"Calculateur de talents", "Comparaison d'objets", "Profiler", "Markup Guide"
),
// search
'search' => "Recherche",
'searchButton' => "Rechercher",
@@ -143,6 +138,25 @@ $lang = array(
'genericError' => "Une erreur est survenue; Actualisez la page et essayez à nouveau. Si l'erreur persiste, envoyez un email à <a href='#contact'>feedback</a>", # LANG.genericerror
'bannedRating' => "Vous avez été banni du score des commentaires.", # LANG.tooltip_banned_rating
'tooManyVotes' => "Vous avez voté trop souvent aujourd'hui! Revenez demain.", # LANG.tooltip_too_many_votes
'moreTitles' => array(
'reputation' => "Réputation du site",
'whats-new' => "Quoi de neuf?",
'searchbox' => "Boîte de recherche",
'tooltips' => "Info-bulles",
'faq' => "[Frequently Asked Questions]",
'aboutus' => "[What is AoWoW?]",
'searchplugins' => "Plug-ins de recherche",
'privileges' => "Privilèges",
'help' => array(
'commenting-and-you' => "Le guide du commentaire", 'modelviewer' => "Visionneuse 3D", 'screenshots-tips-tricks' => "Captures d'écran : Trucs et astuces",
'stat-weighting' => "Échelles de valeurs", 'talent-calculator' => "Calculateur de talents", 'item-comparison' => "Comparaison d'objets",
'profiler' => "Profiler", 'markup-guide' => "Markup Guide"
),
'privilege' => array(
)
)
),
'screenshot' => array(
'submission' => "Envoi d'une capture d'écran",
@@ -501,6 +515,19 @@ $lang = array(
'Azeroth' => "Azeroth",
'CosmicMap' => "Carte cosmique",
),
'privileges' => array(
'main' => "Sur AoWoW, vous pouvez accumuler de la <a href=\"?reputation\">réputation</a>. Le principal moyen d'en accumuler est d'avoir un score élevé pour vos commentaires.<br><br>Ainsi, la réputation est une vision sommaire de vos contributions à la communauté.<br><br>En amassant de la réputation, vous gagnez le respect de la communauté et vous obtiendrez certains privilèges. Vous pouvez en trouver la liste complète ci-dessous.",
'privilege' => "Privilège",
'privileges' => "Privilèges",
'requiredRep' => "Réputation Requise",
'_privileges' => array(
null, "Poster des commentaires", "Poster des liens externes", null,
"Pas de CAPTCHA", "Les votes des commentaires ont plus de valeur",null, null,
null, "Plus de votes par jour", "Emettre des votes positifs pour les commentaires", "Donner des votes négatifs aux commentaires",
"Envoyer des réponses aux commentaires","Bordure : Bonne", "Bordure : Rare", "Bordure : Épique",
"Bordure : Légendaire", "AoWoW Premium"
)
),
'zone' => array(
'notFound' => "Cette zone n'existe pas.",
'attunement' => ["Accès", "Accès Héroïque"],

View File

@@ -46,12 +46,14 @@ $lang = array(
'forum' => "Форум",
'n_a' => "нет",
'siteRep' => "Репутация",
'yourRepHistory'=> "История вашей репутации",
'aboutUs' => "О Aowow",
'and' => " и ",
'or' => " или ",
'back' => "Назад",
'reputationTip' => "Очки репутации",
'byUserTimeAgo' => 'От <a href="'.HOST_URL.'/?user=%s">%1s</a> %s назад',
'help' => "Справка",
// filter
'extSearch' => "Расширенный поиск",
@@ -117,13 +119,6 @@ $lang = array(
'_cpHelp' => "Чтобы начать использовать профили персонажей, следуйте инструкциям ниже. Если вам потребуется помощь, вы можете обратиться к <a href=\"?help=profiler\">справке</a>.",
'_cpFooter' => "Если вам нужен более точный поиск, вы можете использовать <a href=\"?profiles\">дополнительные опции</a>. Также, вы можете создать <a href=\"?profile&amp;new\">новый собственный профиль</a>.",
// help
'help' => "Справка",
'helpTopics' => array(
"Комментарии и Вы", "3D просмотр", "Скриншоты: Секреты мастерства", "Значимость характеристик",
"Расчёт талантов", "Сравнение предметов", "Профили персонажей", "Markup Guide"
),
// search
'search' => "Поиск",
'searchButton' => "Поиск",
@@ -143,6 +138,25 @@ $lang = array(
'genericError' => "Произошла ошибка; обновите страницу и попробуйте снова. Если ситуация повторяется, отправьте сообщение на <a href='#contact'>feedback</a>", # LANG.genericerror
'bannedRating' => "Вам была заблокирована возможность оценивать комментарии.", # LANG.tooltip_banned_rating
'tooManyVotes' => "Вы сегодня проголосовали слишком много раз! Вы сможете продолжить завтра.", # LANG.tooltip_too_many_votes
'moreTitles' => array(
'reputation' => "Репутация на сайте",
'whats-new' => "Новости",
'searchbox' => "Окно поиска",
'tooltips' => "Всплывающие подсказки",
'faq' => "[Frequently Asked Questions]",
'aboutus' => "[What is AoWoW?]",
'searchplugins' => "Дополнения для браузеров",
'privileges' => "Привилегии",
'help' => array(
'commenting-and-you' => "Комментарии и Вы", 'modelviewer' => "3D просмотр", 'screenshots-tips-tricks' => "Скриншоты: Секреты мастерства",
'stat-weighting' => "Значимость характеристик", 'talent-calculator' => "Расчёт талантов", 'item-comparison' => "Сравнение предметов",
'profiler' => "Профили персонажей", 'markup-guide' => "Markup Guide"
),
'privilege' => array(
)
)
),
'screenshot' => array(
'submission' => "Добавление изображения",
@@ -501,6 +515,19 @@ $lang = array(
'Azeroth' => "Азерот",
'CosmicMap' => "Звёздная карта",
),
'privileges' => array(
'main' => "Здесь на AoWoW вы можете зарабатывать <a href=\"?reputation\">репутацию</a>. Основной источник получения репутации — увеличение рейтинга ваших комментариев другими пользователями.<br><br>Репутация примерно измеряет количество вашего вклада в сообщество.<br><br>По мере того, как вы зарабатываете репутацию, вы получаете доверие сообщества и особые привилегии. Полный список привилегий расположен ниже.",
'privilege' => "Привилегия",
'privileges' => "Привилегии",
'requiredRep' => "Необходима репутация",
'_privileges' => array(
null, "Оставлять комментарии", "Оставлять внешние ссылки", null,
"Нет CAPTCHA", "Более сильные голоса", null, null,
null, "Больше голосов в день", "Голосовать за комментарии", "Голосовать против комментариев",
"Отвечать на комментарии", "Граница: Необычный", "Граница: Редкий", "Граница: Эпический",
"Граница: Легендарный", "AoWoW Premium"
)
),
'zone' => array(
'notFound' => "Такая местность не существует.",
'attunement' => ["[Attunement]", "[Heroic attunement]"],

View File

@@ -104,6 +104,7 @@ class GenericPage
private $mysql = ['time' => 0, 'count' => 0];
private $headerLogo = '';
private $fullParams = '';
private $lvTemplates = array(
'achievement' => ['template' => 'achievement', 'id' => 'achievements', 'parent' => 'lv-generic', 'data' => [], 'name' => '$LANG.tab_achievements' ],
@@ -136,10 +137,14 @@ class GenericPage
'zone' => ['template' => 'zone', 'id' => 'zones', 'parent' => 'lv-generic', 'data' => [], 'name' => '$LANG.tab_zones' ]
);
public function __construct($pageCall/*, $pageParam */)
public function __construct($pageCall, $pageParam = null)
{
$this->time = microtime(true);
$this->fullParams = $pageCall;
if ($pageParam)
$this->fullParams .= '='.$pageParam;
if (CFG_CACHE_DIR && Util::checkOrCreateDirectory(CFG_CACHE_DIR))
$this->cacheDir = mb_substr(CFG_CACHE_DIR, -1) != '/' ? CFG_CACHE_DIR.'/' : CFG_CACHE_DIR;
@@ -257,11 +262,20 @@ class GenericPage
}
if (isset($this->type) && isset($this->typeId))
{
$this->gPageInfo = array( // varies slightly for special pages like maps, user-dashboard or profiler
'type' => $this->type,
'typeId' => $this->typeId,
'name' => $this->name
);
}
else if (!empty($this->articleUrl))
{
$this->gPageInfo = array(
'articleUrl' => $this->fullParams, // is actually be the url-param
'editAccess' => isset($this->editAccess) ? $this->editAccess : (U_GROUP_ADMIN | U_GROUP_EDITOR | U_GROUP_BUREAU)
);
}
if (!empty($this->path))
$this->pageTemplate['breadcrumb'] = $this->path;
@@ -317,31 +331,57 @@ class GenericPage
private function addArticle() // get article & static infobox (run before processing jsGlobals)
{
if (empty($this->type) || !isset($this->typeId))
return;
$article = DB::Aowow()->selectRow(
'SELECT article, quickInfo, locale FROM ?_articles WHERE type = ?d AND typeId = ?d AND locale = ?d UNION ALL '.
'SELECT article, quickInfo, locale FROM ?_articles WHERE type = ?d AND typeId = ?d AND locale = 0 ORDER BY locale DESC LIMIT 1',
$this->type, $this->typeId, User::$localeId,
$this->type, $this->typeId
$article = [];
if (!empty($this->type) && isset($this->typeId))
{
$article = DB::Aowow()->selectRow('SELECT article, quickInfo, locale, editAccess FROM ?_articles WHERE type = ?d AND typeId = ?d AND locale = ?d UNION ALL SELECT article, quickInfo, locale, editAccess FROM ?_articles WHERE type = ?d AND typeId = ?d AND locale = 0 ORDER BY locale DESC LIMIT 1',
$this->type, $this->typeId, User::$localeId, $this->type, $this->typeId
);
}
else if (!empty($this->articleUrl))
{
$article = DB::Aowow()->selectRow('SELECT article, quickInfo, locale, editAccess FROM ?_articles WHERE url = ? AND locale = ?d UNION ALL SELECT article, quickInfo, locale, editAccess FROM ?_articles WHERE url = ? AND locale = 0 ORDER BY locale DESC LIMIT 1',
$this->articleUrl, User::$localeId, $this->articleUrl
);
}
if ($article)
{
foreach ($article as $text)
(new Markup($text))->parseGlobalsFromText($this->jsgBuffer);
if ($article['article'])
(new Markup($article['article']))->parseGlobalsFromText($this->jsgBuffer);
if ($article['quickInfo'])
(new Markup($article['quickInfo']))->parseGlobalsFromText($this->jsgBuffer);
$this->article = array(
'text' => Util::jsEscape(Util::defStatic($article['article'])),
'params' => []
);
if (!empty($this->type) && isset($this->typeId))
$this->article['params']['dbpage'] = true;
// convert U_GROUP_* to MARKUP.CLASS_* (as seen in js-object Markup)
if($article['editAccess'] & (U_GROUP_ADMIN | U_GROUP_VIP | U_GROUP_DEV))
$this->article['params']['allow'] = '$Markup.CLASS_ADMIN';
else if($article['editAccess'] & U_GROUP_STAFF)
$this->article['params']['allow'] = '$Markup.CLASS_STAFF';
else if($article['editAccess'] & U_GROUP_PREMIUM)
$this->article['params']['allow'] = '$Markup.CLASS_PREMIUM';
else if($article['editAccess'] & U_GROUP_PENDING)
$this->article['params']['allow'] = '$Markup.CLASS_PENDING';
else
$this->article['params']['allow'] = '$Markup.CLASS_USER';
$this->editAccess = $article['editAccess'];
if (empty($this->infobox) && !empty($article['quickInfo']))
$this->infobox = $article['quickInfo'];
if ($article['locale'] != User::$localeId)
$this->article['params'] = ['prepend' => Util::jsEscape('<div class="notice-box"><span class="icon-bubble">'.Lang::main('englishOnly').'</span></div>')];
$this->article['params']['prepend'] = '<div class="notice-box"><span class="icon-bubble">'.Lang::main('englishOnly').'</span></div>';
if (method_exists($this, 'postArticle')) // e.g. update variables in article
$this->postArticle();
}
}
@@ -437,8 +477,7 @@ class GenericPage
{
$this->path = null;
$this->tabId = null;
$this->type = -99; // get error-article
$this->typeId = 0;
$this->articleUrl = 'page-not-found';
$this->title[] = Lang::main('errPageTitle');
$this->name = Lang::main('errPageTitle');

View File

@@ -11,20 +11,22 @@ if (!defined('AOWOW_REVISION'))
class MorePage extends GenericPage
{
protected $tpl = 'list-page-generic';
protected $path = [2];
protected $tabId = 2;
protected $path = [];
protected $tabId = 0;
protected $mode = CACHE_TYPE_NONE;
protected $js = ['swfobject.js'];
private $subPages = [ -13 => ['commenting-and-you', 'modelviewer', 'screenshots-tips-tricks', 'stat-weighting', 'talent-calculator', 'item-comparison', 'profiler', 'markup-guide']];
private $validPages = array( // [type, typeId, name]
'whats-new' => [ -7, 0, "What's New"],
'searchbox' => [-16, 0, 'Search Box'],
'tooltips' => [-10, 0, 'Tooltips'],
'faq' => [ -3, 0, 'Frequently Asked Questions'],
'aboutus' => [ -1, 0, 'What is AoWoW?'],
'searchplugins' => [ -8, 0, 'Search Plugins'],
'help' => [-13, null, '']
private $validPages = array( // [tabId, path[, subPaths]]
'whats-new' => [2, [2, 7]],
'searchbox' => [2, [2, 16]],
'tooltips' => [2, [2, 10]],
'faq' => [2, [2, 3]],
'aboutus' => [2, [2, 0]],
'searchplugins' => [2, [2, 8]],
'help' => [2, [2, 13], ['commenting-and-you', 'modelviewer', 'screenshots-tips-tricks', 'stat-weighting', 'talent-calculator', 'item-comparison', 'profiler', 'markup-guide', 'markup-guide-ext']],
'reputation' => [1, [3, 10]],
'privilege' => [1, [3, 10], [1, 2, 5, 9, 10, 11, 12, 13, 14, 15, 16]],
'privileges' => [1, [3, 10, 0]],
);
public function __construct($pageCall, $subPage)
@@ -34,44 +36,116 @@ class MorePage extends GenericPage
// chack if page is valid
if (isset($this->validPages[$pageCall]))
{
$_ = $this->validPages[$pageCall];
$pageData = $this->validPages[$pageCall];
// check if subpage is valid
if (!isset($_[1]))
$this->tab = $pageData[0];
$this->path = $pageData[1];
if ($subPage && isset($pageData[2]))
{
if (($_[1] = array_search($subPage, $this->subPages[$_[0]])) === false)
$subPath = array_search($subPage, $pageData[2]);
if (!$subPath)
$this->error();
if ($pageCall == 'help') // ye.. hack .. class definitions only allow static values
$_[2] = Lang::main('helpTopics', $_[1]);
if (is_numeric($subPath))
$this->path[] = $subPath;
else
$this->path[] = $subPage;
$this->articleUrl = $subPage;
$this->name = Lang::main('moreTitles', $pageCall, $subPage);
}
else
{
$this->articleUrl = $pageCall;
$this->name = Lang::main('moreTitles', $pageCall);
}
$this->type = $_[0];
$this->typeId = $_[1];
$this->name = $_[2];
$this->gPageInfo = array(
'type' => $this->type,
'typeId' => $this->typeId,
'name' => $this->name
);
}
else
$this->error();
}
protected function generatePath()
protected function generateContent()
{
$this->path[] = abs($this->type);
if ($this->typeId > -1)
$this->path[] = $this->typeId;
if ($this->articleUrl == 'reputation')
$this->handleReputationPage();
else if ($this->articleUrl == 'privileges')
$this->handlePrivilegesPage();
}
protected function postArticle()
{
if ($this->articleUrl == 'reputation')
$this->handleReputationArticle();
}
protected function generatePath() { }
protected function generateTitle()
{
array_unshift($this->title, $this->name);
}
protected function generateContent() {} // its just articles here
private function handleReputationPage()
{
if (!User::$id)
return;
if ($repData = DB::Aowow()->select('SELECT action, amount, date AS \'when\', IF(action IN (3, 4, 5), sourceA, 0) AS param FROM ?_account_reputation WHERE userId = ?d', User::$id))
{
foreach ($repData as &$r)
$r['when'] = date(Util::$dateFormatInternal, $r['when']);
$this->tabsTitle = Lang::main('yourRepHistory');
$this->forceTabs = true;
$this->lvTabs[] = ['reputationhistory', array(
'id' => 'reputation-history',
'name' => '$LANG.reputationhistory',
'data' => $repData
)];
}
}
private function handleReputationArticle()
{
$txt = &$this->article['text'];
$consts = get_defined_constants(true);
foreach ($consts['user'] as $k => $v)
if (strstr($k, 'CFG_REP_'))
$txt = str_replace($k, Lang::nf($v), $txt);
}
private function handlePrivilegesPage()
{
$this->tpl = 'privileges';
$this->privileges = [];
$req2priv = array(
1 => CFG_REP_REQ_COMMENT, // write comments
// 2 => CFG_REP_REQ_XXX, // post external links
// 4 => CFG_REP_REQ_XXX, // no captcha
5 => CFG_REP_REQ_SUPERVOTE, // votes count for more
9 => CFG_REP_REQ_VOTEMORE_BASE, // more votes per day
10 => CFG_REP_REQ_UPVOTE, // can upvote
11 => CFG_REP_REQ_DOWNVOTE, // can downvote
12 => CFG_REP_REQ_COMMENT, // can reply [NYI: grouped with canComment]
// 13 => CFG_REP_REQ_XXX, // avatar border [NYI: checked by js, avatars not in use]
// 14 => CFG_REP_REQ_XXX, // avatar border [NYI: checked by js, avatars not in use]
// 15 => CFG_REP_REQ_XXX, // avatar border [NYI: checked by js, avatars not in use]
// 16 => CFG_REP_REQ_XXX, // avatar border [NYI: checked by js, avatars not in use]
17 => CFG_REP_REQ_PREMIUM // premium status
);
asort($req2priv);
foreach ($req2priv as $id => $val)
$this->privileges[$id] = array(
User::getReputation() >= $val,
Lang::privileges('_privileges', $id),
$val
);
}
}
?>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
ALTER TABLE `aowow_articles`
CHANGE COLUMN `type` `type` SMALLINT(5) NULL DEFAULT NULL FIRST,
CHANGE COLUMN `typeId` `typeId` MEDIUMINT(9) NULL DEFAULT NULL AFTER `type`,
CHANGE COLUMN `locale` `locale` TINYINT(4) UNSIGNED NOT NULL AFTER `typeId`,
ADD COLUMN `url` VARCHAR(50) NULL DEFAULT NULL AFTER `locale`,
ADD COLUMN `editAccess` SMALLINT UNSIGNED NOT NULL DEFAULT '2' AFTER `url`,
ADD UNIQUE INDEX `locale_url` (`locale`, `url`);

View File

@@ -0,0 +1,22 @@
-- sound playlist
UPDATE `aowow_articles` SET `url` = 'sound&playlist' WHERE `type` = 19 AND `typeId` = -1000;
-- not found page
UPDATE `aowow_articles` SET `url` = 'page-not-found' WHERE `type` = -99 AND `typeId` = 0;
-- 'more' pages
UPDATE `aowow_articles` SET `url` = 'aboutus' WHERE `type` = -1 AND `typeId` = 0;
UPDATE `aowow_articles` SET `url` = 'whats-new' WHERE `type` = -7 AND `typeId` = 0;
UPDATE `aowow_articles` SET `url` = 'tooltips' WHERE `type` = -10 AND `typeId` = 0;
UPDATE `aowow_articles` SET `url` = 'searchbox' WHERE `type` = -16 AND `typeId` = 0;
UPDATE `aowow_articles` SET `url` = 'faq' WHERE `type` = -3 AND `typeId` = 0;
UPDATE `aowow_articles` SET `url` = 'searchplugins' WHERE `type` = -8 AND `typeId` = 0;
-- help pages
UPDATE `aowow_articles` SET `url` = 'commenting-and-you' WHERE `type` = -13 AND `typeId` = 0;
UPDATE `aowow_articles` SET `url` = 'modelviewer' WHERE `type` = -13 AND `typeId` = 1;
UPDATE `aowow_articles` SET `url` = 'screenshots-tips-tricks' WHERE `type` = -13 AND `typeId` = 2;
UPDATE `aowow_articles` SET `url` = 'stat-weighting' WHERE `type` = -13 AND `typeId` = 3;
UPDATE `aowow_articles` SET `url` = 'talent-calculator' WHERE `type` = -13 AND `typeId` = 4;
UPDATE `aowow_articles` SET `url` = 'item-comparison' WHERE `type` = -13 AND `typeId` = 5;
UPDATE `aowow_articles` SET `url` = 'profiler' WHERE `type` = -13 AND `typeId` = 6;
UPDATE `aowow_articles` SET `url` = 'markup-guide' WHERE `type` = -13 AND `typeId` = 7;
UPDATE `aowow_articles` SET `type` = NULL, `typeId` = NULL WHERE `url` IS NOT NULL;

View File

@@ -0,0 +1,3 @@
INSERT INTO `aowow_articles` (`locale`, `url`, `editAccess`, `article`, `quickInfo`) VALUES
(0, 'reputation', 2, '[b]Reputation[/b] is a rough measurement of how much you participate in the community--it is earned by convincing your peers that you know what youre talking about. Our community puts just as much work as our developers do into making our site as awesome as it is and reputation is meant as a way for you to track just how much work you\'re putting into us.\r\n\r\nThe primary means of gaining reputation is by posting quality comments on database entries (which are then voted up by other site members) and by general contributions to the site which can include actions like data and screenshot submissions. Whenever you leave a comment on a database entry, your peers can then vote on these comments, and those votes will cause you to gain reputation. You can also earn reputation by voting on other users\' comments and by sending in reports!\r\n\r\nBy being a good-standing and contributing user you will be able to earn both reputation and achievements for many of the same actions!\r\n\r\n[h3]Reputation Gains[/h3]\r\n[div style="max-width:400px"][table class=grid]\r\n[tr][td][url=?account=signup]Registering[/url] an account[/td]\r\n[td align=right class=no-wrap]CFG_REP_REWARD_REGISTER reputation[/td]\r\n[/tr]\r\n[tr][td]Daily visit[/td]\r\n[td align=right class=no-wrap]CFG_REP_REWARD_DAILYVISIT reputation[/td]\r\n[/tr]\r\n[tr][td]Posting a comment[/td]\r\n[td align=right class=no-wrap]CFG_REP_REWARD_COMMENT reputation[/td]\r\n[/tr]\r\n[tr][td]Your comment was voted up (each upvote)[/td]\r\n[td align=right class=no-wrap]CFG_REP_REWARD_UPVOTED reputation[/td]\r\n[/tr]\r\n[tr][td]Submitting a screenshot[/td]\r\n[td align=right class=no-wrap]CFG_REP_REWARD_UPLOAD reputation[/td]\r\n[/tr]\r\n[tr][td]Submitting a guide (approved)[/td]\r\n[td align=right class=no-wrap]CFG_REP_REWARD_ARTICLE reputation[/td]\r\n[/tr]\r\n[tr][td]Filing a report (accepted)[/td]\r\n[td align=right class=no-wrap]CFG_REP_REWARD_GOOD_REPORT reputation[/td]\r\n[/tr]\r\n[/table][/div]\r\n\r\n\r\n[h3]Site Privileges[/h3]\r\nThe higher your reputation level, the more privileges you gain. Earn a high enough reputation to unlock additional rewards, in the form of new privileges around the site!\r\n[pad]\r\n[div style="max-width:400px"][table class=grid]\r\n[tr][td]Post comments[/td]\r\n[td align=right class=no-wrap]CFG_REP_REQ_COMMENT reputation[/td]\r\n[/tr]\r\n[tr][td]Upvote on comments[/td]\r\n[td align=right class=no-wrap]CFG_REP_REQ_UPVOTE reputation[/td]\r\n[/tr]\r\n[tr][td]Downvote on comments[/td]\r\n[td align=right class=no-wrap]CFG_REP_REQ_DOWNVOTE reputation[/td]\r\n[/tr]\r\n[tr][td]More votes per day[/td]\r\n[td align=right class=no-wrap]CFG_REP_REQ_VOTEMORE_BASE reputation[/td]\r\n[/tr]\r\n[tr][td]Comment votes worth more[/td]\r\n[td align=right class=no-wrap]CFG_REP_REQ_SUPERVOTE reputation[/td]\r\n[/tr]\r\n[/table][/div]\r\n[pad]\r\n[url=?privileges]Check out full details on site privileges you can earn![/url]\r\n', NULL);

View File

@@ -3,6 +3,70 @@
overflow: visible;
}
.wsa-tbl {
border-spacing:0
}
.wsa-tbl th {
border-bottom:2px solid #333;
color:#fff;
font-size:15px;
padding:0 0 3px 0;
text-align:left
}
.wsa-tbl td {
padding:0 5px 0 0
}
.wsa-tbl td:last-child {
padding:0
}
.wsa-list {
color:#ccc
}
.wsa-list td {
vertical-align:text-top
}
.wsa-list td {
padding-right:25px
}
.wsa-list td.nopad {
padding-right:0
}
.wsa-list tr {
line-height:20px
}
.wsa-list .checkmark {
padding:0;
width:18px
}
.wsa-check {
background:url(../images/ui/check2.png) no-repeat 0 -11px;
height:20px;
width:15px
}
.wsa-earned {
color:#777
}
.wsa-earned .wsa-check {
background-position:-15px -11px
}
.wsa-earned .wsa-count {
background-color:#aaa;
color:#242424
}
/* Generic - Sprites */
.vote-column .upvote, .vote-column .downvote, .reply-upvote, .reply-downvote, .reply-detach, .reply-delete, .reply-report, .reply-edit {
background: url(../images/ui/sprite3.png);

View File

@@ -923,13 +923,33 @@ var mn_tools = [
[4,"Zufällige Seite","?random"]
]]
];
var mn_reputation = [
[0, "Alle Privilegien anzeigen", "?privileges"],
[, "Privilegien"],
[1, "Kommentare einsenden", "?privilege=1"],
// [2, "Webseitenexterne Links einsenden", "?privilege=2"],
// [4, "Kein CAPTCHA", "?privilege=4"],
[5, "Kommentarbewertungen zählen mehr", "?privilege=5"],
[9, "Mehr Wertungsfreiheit", "?privilege=9"],
[10, "Kommentare positiv bewerten", "?privilege=10"],
[11, "Kommentare negativ bewerten", "?privilege=11"],
[12, "Kommentarantwort einsenden", "?privilege=12"],
// [13, "Rahmen: Außergewöhnlich", "?privilege=13"],
// [14, "Rahmen: Selten", "?privilege=14"],
// [15, "Rahmen: Episch", "?privilege=15"],
// [16, "Rahmen: Legendär", "?privilege=16"],
[17, "AoWoW Premium", "?privilege=17"]
];
var mn_community = [
[3,"Forum","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}],
[7,"Blog","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}],
[4,"IRC-Channel","http://webchat.quakenet.org/",null,{tinyIcon: g_staticUrl + "/images/icons/irc.png"}],
[,"Community"],
[10,"Benutzerruf", "?reputation", mn_reputation],
[11,"Hilfreichste Benutzer", "?top-users"],
[,"Soziales"],
[6,"Facebook-Seite","http://www.facebook.com",null,{tinyIcon: g_staticUrl + "/images/icons/facebook.gif"}],
[5,"Twitter-Seite","http://twitter.com",null,{tinyIcon: g_staticUrl + "/images/icons/twitter.gif"}]
[6,"Facebook-Seite","http://www.facebook.com",null,{tinyIcon: g_staticUrl + "/images/icons/facebook.png"}],
[5,"Twitter-Seite","http://twitter.com",null,{tinyIcon: g_staticUrl + "/images/icons/twitter.png"}]
];
var mn_more = [
[,"Alles über AoWoW"],

View File

@@ -969,13 +969,33 @@ var mn_tools = [
[4,"Random Page","?random"]
]]
];
var mn_reputation = [
[0, "Show All Privileges", "?privileges"],
[, "Privileges"],
[1, "Post comments", "?privilege=1"],
// [2, "Post external links", "?privilege=2"],
// [4, "No CAPTCHAs", "?privilege=4"],
[5, "Comment votes worth more", "?privilege=5"],
[9, "More votes per day", "?privilege=9"],
[10, "Upvote comments", "?privilege=10"],
[11, "Downvote comments", "?privilege=11"],
[12, "Post comment replies", "?privilege=12"],
// [13, "Border: Uncommon", "?privilege=13"],
// [14, "Border: Rare", "?privilege=14"],
// [15, "Border: Epic", "?privilege=15"],
// [16, "Border: Legendary", "?privilege=16"],
[17, "Wowhead Premium", "?privilege=17"]
];
var mn_community = [
[3,"Forum","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}],
[7,"Blog","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}],
[4,"IRC-Channel","http://webchat.quakenet.org/",null,{tinyIcon: g_staticUrl + "/images/icons/irc.png"}],
[,"Community"],
[10, "Site Reputation", "?reputation", mn_reputation],
[11, "Top Users", "?top-users"],
[,"Social"],
[6,"Facebook Page","http://www.facebook.com",null,{tinyIcon: g_staticUrl + "/images/icons/facebook.gif"}],
[5,"Twitter Page","http://twitter.com",null,{tinyIcon: g_staticUrl + "/images/icons/twitter.gif"}]
[6,"Facebook Page","http://www.facebook.com",null,{tinyIcon: g_staticUrl + "/images/icons/facebook.png"}],
[5,"Twitter Page","http://twitter.com",null,{tinyIcon: g_staticUrl + "/images/icons/twitter.png"}]
];
var mn_more = [
[,"All About AoWoW"],

View File

@@ -923,13 +923,33 @@ var mn_tools = [
[4,"Página aleatoria","?random"]
]]
];
var mn_reputation = [
[0, "Mostrar todos los privilegios", "?privileges"],
[, "Privilegios"],
[1, "Escribir comentarios", "?privilege=1"],
// [2, "Escribir enlaces externos", "?privilege=2"],
// [4, "Sin CAPTCHAs", "?privilege=4"],
[5, "Los votos de comentario valen más", "?privilege=5"],
[9, "Más votos por día", "?privilege=9"],
[10, "Dar una valoración positiva a comentarios", "?privilege=10"],
[11, "Dar una valoración negativa a comentarios", "?privilege=11"],
[12, "Escribir respuestas a comentarios", "?privilege=12"],
// [13, "Borde: Poco Común", "?privilege=13"],
// [14, "Borde: Raro", "?privilege=14"],
// [15, "Borde: Épica", "?privilege=15"],
// [16, "Borde: Legendaria", "?privilege=16"],
[17, "AoWoW Premium", "?privilege=17"]
];
var mn_community = [
[3,"Foros","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}],
[7,"Blog","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}],
[4,"Canal de IRC","http://webchat.quakenet.org/",null,{tinyIcon: g_staticUrl + "/images/icons/irc.png"}],
[,"Comunidad"],
[10, "Reputación en la web", "?reputation", mn_reputation],
[11, "Usuarios más populares", "?top-users"],
[,"Social"],
[6,"Página de Facebook","http://facebook.com",null,{tinyIcon: g_staticUrl + "/images/icons/facebook.gif"}],
[5,"Página de Twitter","http://twitter.com",null,{tinyIcon: g_staticUrl + "/images/icons/twitter.gif"}]
[6,"Página de Facebook","http://facebook.com",null,{tinyIcon: g_staticUrl + "/images/icons/facebook.png"}],
[5,"Página de Twitter","http://twitter.com",null,{tinyIcon: g_staticUrl + "/images/icons/twitter.png"}]
];
var mn_more = [
[,"Todo sobre AoWoW"],

View File

@@ -923,13 +923,33 @@ var mn_tools = [
[4,"Page au hasard","?random"]
]]
];
var mn_reputation = [
[0, "Montrer tous les privilèges", "?privileges"],
[, "Privilèges"],
[1, "Poster des commentaires", "?privilege=1"],
// [2, "Poster des liens externes", "?privilege=2"],
// [4, "Pas de CAPTCHA", "?privilege=4"],
[5, "Les votes des commentaires ont plus de valeur", "?privilege=5"],
[9, "Plus de votes par jour", "?privilege=9"],
[10, "Emettre des votes positifs pour les commentaires", "?privilege=10"],
[11, "Donner des votes négatifs aux commentaires", "?privilege=11"],
[12, "Envoyer des réponses aux commentaires", "?privilege=12"],
// [13, "Bordure : Bonne", "?privilege=13"],
// [14, "Bordure : Rare", "?privilege=14"],
// [15, "Bordure : Épique", "?privilege=15"],
// [16, "Bordure : Légendaire", "?privilege=16"],
[17, "AoWoW Premium", "?privilege=17"]
];
var mn_community = [
[3,"Forum","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}],
[7,"Blog","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}],
[4,"Canal IRC","http://webchat.quakenet.org/",null,{tinyIcon: g_staticUrl + "/images/icons/irc.png"}],
[,"Communauté"],
[10, "Réputation du site", "?reputation", mn_reputation],
[11, "Meilleurs Utilisateurs", "?top-users"],
[,"Social"],
[6,"Page Facebook","http://facebook.com",null,{tinyIcon: g_staticUrl + "/images/icons/facebook.gif"}],
[5,"Page Twitter","http://twitter.com",null,{tinyIcon: g_staticUrl + "/images/icons/twitter.gif"}]
[6,"Page Facebook","http://facebook.com",null,{tinyIcon: g_staticUrl + "/images/icons/facebook.png"}],
[5,"Page Twitter","http://twitter.com",null,{tinyIcon: g_staticUrl + "/images/icons/twitter.png"}]
];
var mn_more = [
[,"Tout sur AoWoW"],

View File

@@ -923,13 +923,33 @@ var mn_tools = [
[4,"Случайная страница","?random"]
]]
];
var mn_reputation = [
[0, "Показать все привилегии", "?privileges"],
[, "Привилегии"],
[1, "Оставлять комментарии", "?privilege=1"],
// [2, "Оставлять внешние ссылки", "?privilege=2"],
// [4, "Нет CAPTCHA", "?privilege=4"],
[5, "Более сильные голоса", "?privilege=5"],
[9, "Больше голосов в день", "?privilege=9"],
[10, "Голосовать за комментарии", "?privilege=10"],
[11, "Голосовать против комментариев", "?privilege=11"],
[12, "Отвечать на комментарии", "?privilege=12"],
// [13, "Граница: Необычный", "?privilege=13"],
// [14, "Граница: Редкий", "?privilege=14"],
// [15, "Граница: Эпический", "?privilege=15"],
// [16, "Граница: Легендарный", "?privilege=16"],
[17, "AoWoW Premium", "?privilege=17"]
];
var mn_community = [
[3,"Форум","http://forums.battle.net",null,{tinyIcon: g_staticUrl + "/images/icons/forum.png"}],
[7,"Блог","http://worldpress.com",null,{tinyIcon: g_staticUrl + "/images/icons/blog.png"}],
[4,"Канал IRC","http://webchat.quakenet.org/",null,{tinyIcon: g_staticUrl + "/images/icons/irc.png"}],
[,"Сообщество"],
[10, "Репутация на сайте", "?reputation", mn_reputation],
[11, "Лучшие пользователи", "?top-users"],
[,"Социальные сети"],
[6,"Facebook","http://facebook.com",null,{tinyIcon: g_staticUrl + "/images/icons/facebook.gif"}],
[5,"Twitter","http://twitter.com",null,{tinyIcon: g_staticUrl + "/images/icons/twitter.gif"}]
[6,"Facebook","http://facebook.com",null,{tinyIcon: g_staticUrl + "/images/icons/facebook.png"}],
[5,"Twitter","http://twitter.com",null,{tinyIcon: g_staticUrl + "/images/icons/twitter.png"}]
];
var mn_more = [
[,"О AoWoW"],

View File

@@ -1,18 +1,9 @@
<?php
/* Util::jsEscape gets a bit greedy here */
if (!empty($this->article)):
?>
<div id="article-generic" class="left"></div>
<script type="text/javascript">//<![CDATA[
Markup.printHtml("<?php echo strtr($this->article['text'], ['scr\\"+\\"ipt' => 'scr"+"ipt']); ?>", "article-generic", {
<?php
foreach ($this->article['params'] as $k => $v):
echo $k.': '.($v[0] == '$' ? substr($v, 1) : "'".$v."'").",\n";
endforeach;
?>
allow: Markup.CLASS_ADMIN,
dbpage: true
});
Markup.printHtml("<?=strtr($this->article['text'], ['scr\\"+\\"ipt' => 'scr"+"ipt']);?>", "article-generic", <?=Util::toJSON($this->article['params']);?>);
//]]></script>
<div class="pad2"></div>
<?php