mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- implemented comments (in general and as preview on account page & latest comments)
- partially implemented site reputation (required to grant privileges to comments) - reworked 'home'-page (the news-box is now as configurable as you want) - removed some ancient compatibility-code for IE67 (srsly, its 2014!) - dropped associated stylesheets, reviewed the rest - split some user-restrictions to trigger on insufficient siteRep - added text-page: Markup-Guide - implemented new class to handle Markup - bugfixes [TM] - also you will need to reapply the db-dumps (you may want do save account*, news, reports, ..)
This commit is contained in:
50
includes/markup.class.php
Normal file
50
includes/markup.class.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('invalid access');
|
||||
|
||||
/*
|
||||
this is just a skeleton for now
|
||||
at some point i'll need to (at least rudamentary) parse
|
||||
back and forth between markup and html
|
||||
*/
|
||||
|
||||
class Markup
|
||||
{
|
||||
private $text = '';
|
||||
private $jsGlobals = [];
|
||||
|
||||
public function __construct($text)
|
||||
{
|
||||
$this->text = $text;
|
||||
}
|
||||
|
||||
public function parseGlobalsFromText(&$jsg = [])
|
||||
{
|
||||
if (preg_match_all('/(?<!\\\\)\[(npc|object|item|itemset|quest|spell|zone|faction|pet|achievement|statistic|title|event|class|race|skill|currency)=(\d+)[^\]]*\]/i', $this->text, $matches, PREG_SET_ORDER))
|
||||
{
|
||||
foreach ($matches as $match)
|
||||
{
|
||||
if ($match[1] == 'statistic')
|
||||
$match[1] = 'achievement';
|
||||
|
||||
if ($type = array_search($match[1], Util::$typeStrings))
|
||||
$this->jsGlobals[$type][$match[2]] = $match[2];
|
||||
}
|
||||
}
|
||||
|
||||
Util::mergeJsGlobals($jsg, $this->jsGlobals);
|
||||
|
||||
return $this->jsGlobals;
|
||||
}
|
||||
|
||||
public function fromHtml()
|
||||
{
|
||||
}
|
||||
|
||||
public function toHtml()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user