mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Implement Titles
and while doing so... - decrypted listview.templates - achievemnts, quests, titles - removed ancient hacks for Opera from JS wich prevented capturing of some Key/Mouse-Events in Opera Pease note, that the CharTitles.dbc alone doesn't provide enough data to generate these pages. The script to generate ?_titles and ?_sourceStrings will be provided soon [TM]
This commit is contained in:
71
includes/class.community.php
Normal file
71
includes/class.community.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
/************
|
||||
* get Community Content
|
||||
************/
|
||||
|
||||
class CommunityContent
|
||||
{
|
||||
/* todo: administration of content */
|
||||
|
||||
private function getComments($type, $typeId)
|
||||
{
|
||||
// comments
|
||||
return array();
|
||||
}
|
||||
|
||||
private function getVideos($type, $typeId)
|
||||
{
|
||||
return DB::Aowow()->Query("
|
||||
SELECT
|
||||
v.Id,
|
||||
a.displayName AS user,
|
||||
v.date,
|
||||
v.videoId,
|
||||
v.caption,
|
||||
IF(v.status & 0x4, 1, 0) AS 'sticky'
|
||||
FROM
|
||||
?_videos v,
|
||||
?_account a
|
||||
WHERE
|
||||
v.type = ? AND v.typeId = ? AND v.status & 0x2",
|
||||
$type,
|
||||
$typeId
|
||||
);
|
||||
}
|
||||
|
||||
private function getScreenshots($type, $typeId)
|
||||
{
|
||||
return DB::Aowow()->Query("
|
||||
SELECT
|
||||
s.Id,
|
||||
a.displayName AS user,
|
||||
s.date,
|
||||
s.width,
|
||||
s.height,
|
||||
s.caption,
|
||||
IF(s.status & 0x4, 1, 0) AS 'sticky'
|
||||
FROM
|
||||
?_screenshots s,
|
||||
?_account a
|
||||
WHERE
|
||||
s.type = ? AND s.typeId = ? AND s.status & 0x2",
|
||||
$type,
|
||||
$typeId
|
||||
);
|
||||
}
|
||||
|
||||
public function getAll($type, $typeId)
|
||||
{
|
||||
return array(
|
||||
'vi' => self::getVideos($type, $typeId),
|
||||
'sc' => self::getScreenshots($type, $typeId),
|
||||
'co' => self::getComments($type, $typeId)
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user