diff options
-rw-r--r-- | data/docs/1 | 125 | ||||
-rw-r--r-- | data/docs/2 | 108 | ||||
-rw-r--r-- | data/docs/3 | 48 | ||||
-rw-r--r-- | data/docs/4 | 26 | ||||
-rw-r--r-- | data/docs/5 | 41 | ||||
-rw-r--r-- | data/docs/6 | 74 | ||||
-rw-r--r-- | data/docs/7 | 37 | ||||
-rw-r--r-- | data/docs/index | 10 | ||||
-rw-r--r-- | data/docs/notfinished | 3 | ||||
-rw-r--r-- | data/tpl/defs.pl | 20 | ||||
-rw-r--r-- | data/tpl/docs | 296 | ||||
-rw-r--r-- | data/tpl/error | 53 | ||||
-rw-r--r-- | data/tpl/main | 145 | ||||
-rw-r--r-- | data/tpl/page | 140 | ||||
-rw-r--r-- | data/tpl/vnpage_rel | 10 | ||||
-rw-r--r-- | lib/ChangeLog | 13 | ||||
-rw-r--r-- | lib/Multi/IRC.pm | 20 | ||||
-rw-r--r-- | lib/Multi/RG.pm | 4 | ||||
-rw-r--r-- | lib/Multi/Sitemap.pm | 8 | ||||
-rw-r--r-- | lib/VNDB.pm | 7 | ||||
-rw-r--r-- | lib/VNDB/HomePages.pm | 34 | ||||
-rw-r--r-- | lib/VNDB/Util/DB.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Util/Response.pm | 34 | ||||
-rw-r--r-- | static/files/16x14.png | bin | 0 -> 2397 bytes | |||
-rw-r--r-- | static/files/platforms.png | bin | 2353 -> 0 bytes | |||
-rw-r--r-- | static/files/style.css | 59 |
26 files changed, 737 insertions, 580 deletions
diff --git a/data/docs/1 b/data/docs/1 new file mode 100644 index 00000000..43bb0a1d --- /dev/null +++ b/data/docs/1 @@ -0,0 +1,125 @@ +:TITLE:Categories +:INC:index + + +:SUB:Elements +<p> + ...own interpretation for now... (Should be documented at some time, too) +</p> + + +:SUB:Gameplay +<p> + This category is used to describe the gameplay or game engine. +</p> +<dl> + <dt>Visual Novel</dt><dd> + All games where the text is overlaid on the background and there is no special + dialog-box fall under this category. Can be abbreviated as VN or NVL. + </dd><dt>Adventure</dt><dd> + This is the opposite of the <i>Visual Novel</i> category: The text is presented + in a special window, usually at the bottom of the screen. In some (rare) cases + a game will switch between both styles, for these games both the <i>Visual Novel</i> + and <i>Adventure</i> categories should be selected. Can be abbreviated as ADV or AVG. + </dd><dt>Action</dt><dd> + This category indicates that the game includes a gameplay that challenges the + player's speed, dexterity and reaction time. Common examples are fighting games, + puzzles that should be solved within a short time limit, and shooter games. + </dd><dt>RPG</dt><dd> + Abbreviation for Role Playing Game. An RPG is a game in which you assume the + role of a character introduced to a vast world to be explored. Games typically + place emphasis on gaining equipment and experience points through fighting enemies + in order to advance through different levels. + </dd><dt>Strategy</dt><dd> + A strategy game is one that challenges the player to think critically in order + to achieve victory. + </dd><dt>Simulation</dt><dd> + A simulation game attempts to recreate aspects of reality and puts the player in + control. + </dd> +</dl> + + +:SUB:Plot +<p> + Indicates the plot type of a game. There are only two options: <i>Branching</i> and + <i>Linear</i>. +</p> +<dl> + <dt>Linear</d><dd> + A game with a linear plot has a static story; it is not possible to get different paths + or endings. Many games in this category do not prompt the player with choices and simply + tell the story as it is. This is, however, not a rule: it is also possible for a game + to provide choises, but they have no influence on the story itself. (e.g. + <a href="/v3">Utawarerumono</a>) + </dd><dt>Branching</dt><dd> + A game with a branching plot has a story whose path is directly affected by choices + made by the player during the game. These different paths are sometimes referred to + as "arcs" when they pertain to the stories of different female characters within a game. + </dd> +</dl> + + +:SUB:Time +<p> + Indicates the time period in which the story has been set. +</p> +<dl> + <dt>Future</dt><dd> + The game is set in a time beyond that of our own. Games may incorperate elements of + future technologies or events yet-to-come. + </dd><dt>Present</dt><dd> + The game is set in the current day. + </dd><dt>Past</dt><dd> + The game is set in a time before our own. Games may or may not adhere to historic fact. + </dd> +</dl> + + +:SUB:Place +<p> + Indicates the place in which the story is told. +</p> +<dl> + <dt>Earth</dt><dd> + The game takes place on our own planet. + </dd><dt>Fantasy World</dt><dd> + The game takes place on another world. The game's environment could be similar + to that of our own with a few significant changes, but it could also be + radically different. + </dd><dt>Space</dt><dd> + The game takes place in the vacuum of space between celestial bodies. For example, + this category can be used to define games where the characters may inhabit + spaceships that journey across the universe. + </dd> +</dl> + + +:SUB:Sexual content +<p> + Indicates the types of sexual content that the game contains. +</p> +<dl> + <dt>Sexual content</dt><dd> + This is a generic category to indicate the presence of any sexual content in the + game. If there is any such content, this category should be selected. + </dd><dt>Bestiality</dt><dd> + Sexual activity between characters and animals.<br /> + <i>No catgirls, I guess?</i> + </dd><dt>Incest</dt><dd> + Sexual activity between members of the same family. Most of the time under the + justification of participants not blood related (step-sister etc.). + </dd><dt>Lolicon</dt><dd> + The usage of female characters with childlike features in sexual situations. + </dd><dt>Shotacon</dt><dd> + The usage of male characters with childlike features in sexual situations. + </dd><dt>Yaoi</dt><dd> + Sexual content depicting activity between males. + </dd><dt>Yuri</dt><dd> + Sexual content depicting activity between females. + </dd><dt>Rape</dt><dd> + Situation in which a character is made to engage in sexual activities against + their will. + </dd> +</dl> + diff --git a/data/docs/2 b/data/docs/2 new file mode 100644 index 00000000..6a11adaf --- /dev/null +++ b/data/docs/2 @@ -0,0 +1,108 @@ +:TITLE:Adding/Editing a Visual Novel +:INC:notfinished +:INC:index + +:SUB:General guidelines +<p> + Blahblah about what we define as VN... +</p> + + +:SUB:General info +<dl> + <dt>*Title</dt><dd> + The title of the visual novel as it is known to the English speaking audience. If + there is no English version of the game available, you should either specify the + romanized (recommended) or translated (not recommended) version of the original + title. + </dd><dt>Aliases</dt><dd> + Visual novels can be known under several names, use this field to add any aliases + and acronyms used around the net. Official titles of releases should not be added + here, as these are already listed in the releases. + </dd><dt>*Description</dt><dd> + Short description of the main story. + </dd><dt>Length</dt><dd> + Very rough estimate of the time required to finish all endings of the visual novel. + To determine the length of a game, it's often better to ignore this time indication + and instead compare it with other games you've played. It's all relative, after all. + </dd><dt>External links</dt><dd> + Links to external resources about this visual novel. To get the URLs, go to the + sites (<a href="http://en.wikipedia.org/">Wikipedia</a>, <a href="http://visual-novels.net/"> + Visual-novels.net</a> and <a href="http://cisvisual.net/">CISVisual.net</a>), + search for a page about the game, and determine the ID or name of that page to fill + out in the text boxes. Do not specify the full URL, we only need a small part of + it! + </dd><dt>Related anime</dt><dd> + Some visual novels (e.g. <a href="/v4">Clannad</a> and <a href="/v3">Utawarerumono</a>) + have anime adaptions, and some visual novels were adapted from an anime series. Use + this field to specify these related anime for the visual novel.<br /> + Anime should be specified using <a href="http://anidb.net/">AniDB</a> IDs. To add an + anime, just search for it on AniDB and add the numeric ID of the entry (found in the + <i>aid=xxx</i> part of the URL) to the edit field. Multiple IDs should be seperated + with a whitespace.<br /> + If the visual novel already has a relation with an other visual novel, and both games + have an anime adaption, the same anime does not have to be added to both games. For + example, <a href="/v264">Da Capo</a> has two anime adaptions + (<a href="http://anidb.net/a837">837</a>, <a href="http://anidb.net/a2832">2832</a>), + and <a href="/v266">Da Capo II</a> as well. (<a href="http://anidb.net/a5419">5419</a>, + <a href="http://anidb.net/a5652">5652</a>) But the relations for Da Capo II do not + have to be added to Da Capo and vice versa - the internal visual novel relations will + take care of that.<br /> + After submitting a new AniDB ID, VNDB will automatically fetch information about the + anime and will present that on the site. This action can take a few minuts to - in the + worst case - hours. In that time you will see the ID of the anime, but not the title + and links to AnimeNFO and Anime News Network. It is not possible to manually add this + information, this will be fetched automatically! + </dd> +</dl> + + +:SUB:Categories +<p> + It is possible to select relevant categories for visual novels, where the relevance + can be ranked using a number from 0 to 3, where 0 indicates the category does not + apply at all, and 3 means that the category is very dominant in the game.<br /> + See <a href="/d1">Categories</a> for descriptions about each category.<br /> + Just as with the <i>Length</i> field, this information is very subjective. Just + use the category descriptions and common sense to determine which categories to + select and what relevance to apply. +</p> + + +:SUB:Image +<p> + <i>General image guidelines and when to use the NSFW warning</i> +</p> + + +:SUB:Relations +<p> + <i>When to add relation, and document direct and reverse relations</i><br /> + <i>(Stolen from AniDB, needs some rewriting)</i> +</p> +<dl> + <dt>Sequel</dt><dd> + Continuation of the story. <=><i>Prequel</i>. + </dd><dt>Prequel</dt><dd> + The story happens before the original story.<=><i>Sequel</i>. + </dd><dt>Same setting</dt><dd> + Same universe/world/reality/timeline, completely different characters. + </dd><dt>Alternative setting</dt><dd> + Same characters, different universe/world/reality/timeline. + </dd><dt>Alternative version</dt><dd> + Same setting, same characters, story is told differently. + </dd><dt>Same characters</dt><dd> + Shares one or more characters, story is unrelated. + </dd><dt>Side story</dt><dd> + Takes place sometime during the parent storyline. <=><i>Parent story</i> + </dd><dt>Parent story</dt><dd> + .. <=><i>Side story</i>. + </dd><dt>Summary</dt><dd> + Summarizes full story, may contain additional stuff. <=><i>Full story</i>. + </dd><dt>Full story</dt><dd> + Full version of the summarized story. <=><i>Summary</i>. + </dd><dt>Other</dt><dd> + .. + </dd> +</dl> + diff --git a/data/docs/3 b/data/docs/3 new file mode 100644 index 00000000..5f5b164c --- /dev/null +++ b/data/docs/3 @@ -0,0 +1,48 @@ +:TITLE:Adding/Editing a Release +:INC:notfinished +:INC:index + +<p> + <i>When to add a release (stuff about NOT adding fandisks, OSTs, etc)</i> +</p> + + +:SUB:General info +<dl> + <dt>*Type</dt><dd> + .. + </dd><dt>*Title (romaji)</dt><dd> + .. + </dd><dt>Original title</dt><dd> + .. + </dd><dt>*Language</dt><dd> + .. + </dd><dt>Official website</dt><dd> + .. + </dd><dt>Release date</dt><dd> + .. + </dd><dt>Age rating</dt><dd> + .. + </dd><dt>Notes</dt><dd> + .. + </dd> +</dl> + + +:SUB:Platforms & Media +<dl> + <dt>Platforms</dt><dd> + .. + </dd><dt>Media</dt><dd> + .. + </dd> +</dl> + + +:SUB:Producers +.. + + +:SUB:Visual novel relations +.. + diff --git a/data/docs/4 b/data/docs/4 new file mode 100644 index 00000000..51733c6a --- /dev/null +++ b/data/docs/4 @@ -0,0 +1,26 @@ +:TITLE:Adding/Editing a Producer +:INC:notfinished +:INC:index + +<p> + <i>When to add a producer and what to do with producer relations...</i> +</p> + + +:SUB:General info +<dl> + <dt>*Type</dt><dd> + .. + </dd><dt>*Name (romaji)</dt><dd> + .. + </dd><dt>Original name</dt><dd> + .. + </dd><dt>*Primary language</dt><dd> + .. + </dd><dt>Website</dt><dd> + .. + </dd><dt>Description</dt><dd> + .. + </dd> +</dl> + diff --git a/data/docs/5 b/data/docs/5 new file mode 100644 index 00000000..12456b38 --- /dev/null +++ b/data/docs/5 @@ -0,0 +1,41 @@ +:TITLE:General guidelines +:INC:notfinished +:INC:index + + +:SUB:Romanization +<p> + The main audience of VNDB are the English speaking fans of visual novels. In + creating the database, we assume the intended audience can't read or recognise + anything not written in the roman script. Therefore, romanization is applied + to many fields in the database: The main title of visual novels, releases and + producers should all be properly romanized if they arent in roman script + already.<br /> + To keep the database consistent, we have decided to use + <a href="http://en.wikipedia.org/wiki/Hepburn_romanization">Hepburn romanization</a> + for all fields. This is also consistent with + <a href="http://wiki.anidb.net/w/Romanisation">AniDBs romanization</a>. +</p> + + +:SUB:Capitalization +<p> + Some Japanese producers use titles for their games that are already in the roman + alphabet. However - as the disctinction in uppercase and lowercase characters + does not exist in Japanese - these titles are often entirely in uppercase or + lowercase. If there is no real reason for this choise of capitalization, these + titles and names should be properly converted to normal English capitalization + (as described <a href="http://en.wikipedia.org/wiki/Capitalization">on + Wikipedia</a>) for titles and names before being entered in the database. +</p> + + +:SUB:...and more! +<p> +Misc documentation:<br /> +- Edit summary<br /> +- Quoting sources in descriptions<br /> +- Piracy<br /> +- Spoilers<br /> +</p> + diff --git a/data/docs/6 b/data/docs/6 new file mode 100644 index 00000000..f3c3a1c1 --- /dev/null +++ b/data/docs/6 @@ -0,0 +1,74 @@ +:TITLE:Frequently Asked Questions +:INC:index + + +:SUB:What is a Visual Novel? +<p> + A visual novel can be seen as a combination of a novel and a computer game: + they're computer games with a large text based storyline and only little + interaction of the player. A typical visual novel consists of text over + an anime-style background image and is accompanied by background music. + Throughout the game, the player usually has to answer a few questions which will + have an effect on the story, thus playing a visual novel a second time while + giving other answers may result in an entirely different plot.<br /> + <br /> + For more information see <a href="http://en.wikipedia.org/wiki/Visual_Novel"> + the Wikipedia article on visual novels</a> or the description on + <a href="http://visual-novels.net/vn/index.php?option=com_content&task=view&id=259&Itemid=47">Visual-Novels.net</a>. + To get a general idea of the genre, try one of the free short visual novels from + <a href="http://at2006.haeleth.net/release.php">al|together 2006</a>. +</p> + + +:SUB:How about Eroge, H-Games and Dating Sims? +<p> + An eroge or H-game is basically any Japanese game that features sexual + content. Many visual novels are eroge and many eroge are visual novels, + but this is not a rule. The definition of dating sim is a bit more vague, + but it's usually the same as a visual novel, except that a dating sim + generally uses a gameplay based on statistics.<br /> + <br /> + There are no strict bounds to the definition of "visual novel", most + eroge and dating sims include elements of visual novels, but may - + strictly speaking - not be visual novels themselves. As VNDB aims to + be comprehensive, we simply accept any game that contains elements of a + visual novel and is produced by a Japanese or Japan-related company or + doujin cicle. +</p> + + +:SUB:Why a Visual Novel Database? +<p> + The internet is large, very large, but the number of English resources + related to visual novels is only very limited. VNDB attempts to collect + and present as much information as possible that would otherwise be very + hard to find for the English speaking audience. This way fans can easily + keep track of new releases and localizations of their favorite games, + while not having to browse numerous of indistinct Japanese websites. +</p> + + +:SUB:How can I help VNDB? +</p> + There are many ways to contribute to VNDB. First of all you can freely + edit all information found on this website, so if you find any errors + just click the "edit" link on the top right of the page. You can also + add new information (visual novels, producers, releases) to the database, + though please search the database before you do in order to prevent + duplicate pages.<br /> + <br /> + To discuss about new features or to help the development of the website + itself, feel free to browse the <a href="http://forum.vndb.org/">forums</a> + or join us on IRC at <a href="irc://irc.synirc.net/vndb">#vndb @ irc.synirc.net</a>. + If you aren't used to IRC or are just to lazy to install a client, you can + still join the chat using <a href="http://cgiirc.synirc.net/">the Webchat</a>. + Just choose a nickname, specify #vndb as channel and hit Login! +</p> + + +:SUB:Where can I download the Visual Novels? +<p> + Not here. We do not provide downloads nor links to resources that encourage + the illegal spreading of visual novels. +</p> + diff --git a/data/docs/7 b/data/docs/7 new file mode 100644 index 00000000..8064a44d --- /dev/null +++ b/data/docs/7 @@ -0,0 +1,37 @@ +:TITLE:About us +:INC:index + +:SUB:Goal +<p> + .. +</p> + + +:SUB:History +<p> + yeah, interesting... +</p> + + +:SUB:Staff +<dl> + <dt><a href="/u2">yorhel</a></dt><dd> + Also known as Ayo on IRC. + </dd><dt><a href="/u4" class="retired">hillie</a><dt><dd> + (retired) + </dd> +</dl> + + +:SUB:Thanks +<p> + .. +</p> +<dl> + <dt><a href="/u18">rasqual</a></dt><dd> + .. + </dd><dt><a href="/u51">echomateria</a></dt><dd> + .. + </dd> +</dl> + diff --git a/data/docs/index b/data/docs/index new file mode 100644 index 00000000..8eb7ed6c --- /dev/null +++ b/data/docs/index @@ -0,0 +1,10 @@ +<ul class="index"> + <li><b>Documentation index</b></li> + <li><a href="/d6">FAQ</a></li> + <li><a href="/d1">Categories</a></li> + <li><a href="/d5">General guidelines</a></li> + <li><a href="/d2">Visual Novels</a></li> + <li><a href="/d3">Releases</a></li> + <li><a href="/d4">Producers</a></li> + <li><a href="/d7">About us</a></li> +</ul> diff --git a/data/docs/notfinished b/data/docs/notfinished new file mode 100644 index 00000000..dcf0e4b5 --- /dev/null +++ b/data/docs/notfinished @@ -0,0 +1,3 @@ +<span class="warning"> + This page is not yet finished! +</span> diff --git a/data/tpl/defs.pl b/data/tpl/defs.pl index c482478a..e993fb58 100644 --- a/data/tpl/defs.pl +++ b/data/tpl/defs.pl @@ -180,13 +180,21 @@ sub ttabs { # [vrp], obj, sel sprintf('<a href="/%%s/hide"%s>%s</a>', $t eq 'v' ? ' id="vhide"' : '', $$o{hidden} ? 'unhide' : 'hide') ) : (), !$$o{locked} || ($p{Authedit} && $p{Authlock}) ? - ($s eq 'edit' ? 'edit' : '<a href="/%s/edit" '.($t eq 'v' || $t eq 'r' ? 'class="dropdown" rel="nofollow editDD"':'').'>edit</a>') : (), + ($s eq 'edit' ? 'edit' : '<a href="'.($p{Authedit}?'/%s/edit':'/u/register?n=1').'" '.($t eq 'v' || $t eq 'r' ? 'class="dropdown" rel="nofollow editDD"':'').'>edit</a>') : (), $p{Authhist} ? ($s eq 'hist' ? 'history' : '<a href="/%s/hist">history</a>') : (), ); return '<p class="mod">< '.join(' - ', map { sprintf $_, $t.$$o{id} } @act).' ></p>'.( - $t eq 'v' ? qq| + !$p{Authedit} ? qq| +<div id="editDD" class="dropdown"> + <ul> + <li><b>Not logged in</b></li> + <li><a href="/u/login">Login</a></li> + <li><a href="/u/register">Register</a></li> + </ul> +</div> + | : $t eq 'v' ? qq| <div id="editDD" class="dropdown"> <ul> <li><a href="/v$$o{id}/edit" rel="nofollow">Edit all</a></li> @@ -250,11 +258,9 @@ my %pagetitles = ( hist => sub { return !$p{hist}{id} || !$p{hist}{type} ? 'Recent changes' : $p{hist}{type} eq 'u' ? 'Recent changes by '.$p{hist}{title} : 'Edit history of '.$p{hist}{title}; }, - docs => sub { - return ( - 'Categories', 'Adding/editing a visual novel', 'Adding/editing a release', - 'Adding/editing a producer', 'General guidelines', 'Error parsing form', - )[$p{docs}{p}-1]||'' } + docs => sub { $p{docs}{title} }, + error => sub { + $p{error}{err} eq 'notfound' ? '404 Page Not Found' : 'Error Parsing Form' }, ); sub gettitle{$p{$_}&&($p{PageTitle}=ref($pagetitles{$_}) eq 'CODE' ? &{$pagetitles{$_}} : $pagetitles{$_}) for (keys%pagetitles);} diff --git a/data/tpl/docs b/data/tpl/docs index 1ca812c2..6aeefe81 100644 --- a/data/tpl/docs +++ b/data/tpl/docs @@ -1,298 +1,4 @@ -[[ if(0) { ]] -<p class="mod">< <a href="/d1">categories</a> - <a href="/d2">visual novels</a> - <a href="/d3">releases</a> - <a href="/d4">producers</a> - <a href="/d5">general guidelines</a> ></p> -[[ } ]] <h2>[[: $p{PageTitle} ]]</h2> <div id="dpage"> - -[[ # C A T E G O R I E S - if($d{p} == 1) { ]] - -<h3>Elements</h3> -<p> - ...own interpretation for now... (Should be documented at some time, too) -</p> - - -<h3>Gameplay</h3> -<p> - This category is used to describe the gameplay or game engine. -</p> -<dl> - <dt>Visual Novel</dt><dd> - All games where the text is overlaid on the background and there is no special - dialog-box fall under this category. Can be abbreviated as VN or NVL. - </dd><dt>Adventure</dt><dd> - This is the opposite of the <i>Visual Novel</i> category: The text is presented - in a special window, usually at the bottom of the screen. In some (rare) cases - a game will switch between both styles, for these games both the <i>Visual Novel</i> - and <i>Adventure</i> categories should be selected. Can be abbreviated as ADV or AVG. - </dd><dt>Action</dt><dd> - This category indicates that the game includes a gameplay that challenges the - player's speed, dexterity and reaction time. Common examples are fighting games, - puzzles that should be solved within a short time limit, and shooter games. - </dd><dt>RPG</dt><dd> - Abbreviation for Role Playing Game. An RPG is a game in which you assume the - role of a character introduced to a vast world to be explored. Games typically - place emphasis on gaining equipment and experience points through fighting enemies - in order to advance through different levels. - </dd><dt>Strategy</dt><dd> - A strategy game is one that challenges the player to think critically in order - to achieve victory. - </dd><dt>Simulation</dt><dd> - A simulation game attempts to recreate aspects of reality and puts the player in - control. - </dd> -</dl> - -<h3>Plot</h3> -<p> - Indicates the plot type of a game. There are only two options: <i>Branching</i> and - <i>Linear</i>. -</p> -<dl> - <dt>Linear</d><dd> - A game with a linear plot has a static story; it is not possible to get different paths - or endings. Many games in this category do not prompt the player with choices and simply - tell the story as it is. This is, however, not a rule: it is also possible for a game - to provide choises, but they have no influence on the story itself. (e.g. - <a href="/v3">Utawarerumono</a>) - </dd><dt>Branching</dt><dd> - A game with a branching plot has a story whose path is directly affected by choices - made by the player during the game. These different paths are sometimes referred to - as "arcs" when they pertain to the stories of different female characters within a game. - </dd> -</dl> - -<h3>Time</h3> -<p> - Indicates the time period in which the story has been set. -</p> -<dl> - <dt>Future</dt><dd> - The game is set in a time beyond that of our own. Games may incorperate elements of - future technologies or events yet-to-come. - </dd><dt>Present</dt><dd> - The game is set in the current day. - </dd><dt>Past</dt><dd> - The game is set in a time before our own. Games may or may not adhere to historic fact. - </dd> -</dl> - -<h3>Place</h3> -<p> - Indicates the place in which the story is told. -</p> -<dl> - <dt>Earth</dt><dd> - The game takes place on our own planet. - </dd><dt>Fantasy World</dt><dd> - The game takes place on another world. The game's environment could be similar - to that of our own with a few significant changes, but it could also be - radically different. - </dd><dt>Space</dt><dd> - The game takes place in the vacuum of space between celestial bodies. For example, - this category can be used to define games where the characters may inhabit - spaceships that journey across the universe. - </dd> -</dl> - -<h3>Sexual content</h3> -<p> - Indicates the types of sexual content that the game contains. -</p> -<dl> - <dt>Sexual content</dt><dd> - This is a generic category to indicate the presence of any sexual content in the - game. If there is any such content, this category should be selected. - </dd><dt>Bestiality</dt><dd> - Sexual activity between characters and animals.<br /> - <i>No catgirls, I guess?</i> - </dd><dt>Incest</dt><dd> - Sexual activity between members of the same family. Most of the time under the - justification of participants not blood related (step-sister etc.). - </dd><dt>Lolicon</dt><dd> - The usage of female characters with childlike features in sexual situations. - </dd><dt>Shotacon</dt><dd> - The usage of male characters with childlike features in sexual situations. - </dd><dt>Yaoi</dt><dd> - Sexual content depicting activity between males. - </dd><dt>Yuri</dt><dd> - Sexual content depicting activity between females. - </dd><dt>Rape</dt><dd> - Situation in which a character is made to engage in sexual activities against - their will. - </dd> -</dl> - - - - -[[ } # V I S U A L N O V E L A D D / E D I T - if($d{p} == 2) { ]] - -<p> - Blahblah about what we define as VN? Or should that be in <a href="/d5">General guidelines</a>? -</p> - -<h3>General info</h3> -<dl> - <dt>*Title</dt><dd> - .. - </dd><dt>Aliases</dt><dd> - .. - </dd><dt>*Description</dt><dd> - .. - </dd><dt>Length</dt><dd> - .. - </dd><dt>External links</dt><dd> - .. - </dd> -</dl> - -<h3>Categories</h3> -<p> - See <a href="/d1">Categories</a>. -</p> - -<h3>Image</h3> -<p> - <i>General image guidelines and when to use the NSFW warning</i> -</p> - -<h3>Relations</h3> -<p> - <i>When to add relation, and document direct and reverse relations</i><br /> - <i>(Stolen from AniDB, needs some rewriting)</i> -</p> -<dl> - <dt>Sequel</dt><dd> - Continuation of the story. <=><i>Prequel</i>. - </dd><dt>Prequel</dt><dd> - The story happens before the original story.<=><i>Sequel</i>. - </dd><dt>Same setting</dt><dd> - Same universe/world/reality/timeline, completely different characters. - </dd><dt>Alternative setting</dt><dd> - Same characters, different universe/world/reality/timeline. - </dd><dt>Alternative version</dt><dd> - Same setting, same characters, story is told differently. - </dd><dt>Same characters</dt><dd> - Shares one or more characters, story is unrelated. - </dd><dt>Side story</dt><dd> - Takes place sometime during the parent storyline. <=><i>Parent story</i> - </dd><dt>Parent story</dt><dd> - .. <=><i>Side story</i>. - </dd><dt>Summary</dt><dd> - Summarizes full story, may contain additional stuff. <=><i>Full story</i>. - </dd><dt>Full story</dt><dd> - Full version of the summarized story. <=><i>Summary</i>. - </dd><dt>Other</dt><dd> - .. - </dd> -</dl> - - - - - - -[[ } # R E L E A S E A D D / E D I T - if($d{p} == 3) { ]] - -<p> - <i>When to add a release</i> -</p> - -<h3>General info</h3> -<dl> - <dt>*Type</dt><dd> - .. - </dd><dt>*Title (romaji)</dt><dd> - .. - </dd><dt>Original title</dt><dd> - .. - </dd><dt>*Language</dt><dd> - .. - </dd><dt>Official website</dt><dd> - .. - </dd><dt>Release date</dt><dd> - .. - </dd><dt>Age rating</dt><dd> - .. - </dd><dt>Notes</dt><dd> - .. - </dd> -</dl> - -<h3>Platforms & Media</h3> -<dl> - <dt>Platforms</dt><dd> - .. - </dd><dt>Media</dt><dd> - .. - </dd> -</dl> - -<h3>Producers</h3> -.. - -<h3>Visual novel relations</h3> -.. - - - - - - -[[ } # P R O D U C E R A D D / E D I T - if($d{p} == 4) { ]] - -<p> - <i>When to add a producer and what to do with producer relations...</i> -</p> - -<h3>General info</h3> -<dl> - <dt>*Type</dt><dd> - .. - </dd><dt>*Name (romaji)</dt><dd> - .. - </dd><dt>Original name</dt><dd> - .. - </dd><dt>*Primary language</dt><dd> - .. - </dd><dt>Website</dt><dd> - .. - </dd><dt>Description</dt><dd> - .. - </dd> -</dl> - - - - -[[ } # G E N E R A L G U I D E L I N E S - if($d{p} == 5) { ]] - - -Misc documentation:<br /> -- Romanisation and capitalization (http://wiki.anidb.net/w/Romanisation)<br /> -- What to do with fandisks<br /> -- Edit summary<br /> -- Quoting sources in descriptions<br /> -- Piracy<br /> -- Spoilers<br /> - - - - -[[ } # N O S P A M M E S S A G E - if($d{p} == 6) { ]] - -<span class="warning"> - <b>Error:</b> The form could not be sent, please make sure you have Javascript - enabled in your browser! -</span> - - -[[ } ]] +[[= $d{content} ]] </div> diff --git a/data/tpl/error b/data/tpl/error index 76bd9462..995293d1 100644 --- a/data/tpl/error +++ b/data/tpl/error @@ -1,45 +1,10 @@ -<head> - <title> - [[ if($X->{error}->{code} == 1) { ]]VNDB offline - [[ } else { ]] ERROR: [[= $X->{error}->{code} ]][[ } ]] - </title> - - <meta name="Robots" content="index, follow" /> - <link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" /> +<h2>[[: $p{PageTitle} ]]</h2> +[[ if($d{err} eq 'notfound') { ]] + The page you were looking for could not be found! - <style type="text/css"> - body { background-color: #e0e0e0; padding: 0px; text-align: center; font-family: "Arial", Sans-serif; font-size: 11px; line-height: 16px; font-weight: normal; color: #242424; } - #wrapper { margin: 0px auto; margin-bottom: 20px; background-color: #fff; text-align: center; width: 672px; border: 1px solid #b8b8b8; } - #pre { background-color: #fff; text-align: left; padding: 0px 10px 5px 10px; margin: 5px 5px 5px 5px; border: 1px solid #e9e9e9; } - p { font-size: 11px; color: #242424; text-align: justify; padding-left: 17px; padding-right: 17px; } - h1 { font-size: 16px; font-weight: bold; color: #242424; padding-left: 17px; } - a { color: #33659E; text-decoration: none; } - a:hover { text-decoration: underline; } - img { border: 0; margin: 0; padding: 0; } - [[ if($X->{error}->{code} == 500) { ]] - #wrapper { width: 530px; } - [[ } ]] - </style> -</head> -<body> - <div id="wrapper"> - <div id="pre"> - [[ if($X->{error}->{code} > 300 && $X->{error}->{code} < 310) { ]] - <h1>Moved</h1> - <p> - Check <a href="[[% $X->{error}->{url} ]]">[[: $X->{error}->{url} ]]</a> for the new location. - </p> - [[ } elsif($X->{error}->{code} == 401) { ]] - <h1>Login required</h1> - <p> - <a href="/">Please login</a> - </p> - [[ } elsif($X->{error}->{code} == 1) { ]] - <h1>VNDB offline</h1> - <p> - [[: $X->{error}->{msg} ]] - </p> - [[ } ]] - </div> - </div> -</body> +[[ } elsif($d{err} eq 'formerr') { ]] +<span class="warning"> + <b>Error:</b> The form could not be sent, please make sure you have Javascript + enabled in your browser! +</span> +[[ } ]] diff --git a/data/tpl/main b/data/tpl/main index d52a576a..cbac2729 100644 --- a/data/tpl/main +++ b/data/tpl/main @@ -1,14 +1,149 @@ [[+ defs.pl ]] +[[ %p = %{$X->{page}}; gettitle(); ]] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - --[[ if($X->{error}) { ]] - [[+ error ]] -[[ } if($X->{page}) { %p = %{$X->{page}}; gettitle(); ]] - [[+ page ]] + +<head> + <title>[[: $p{PageTitle} ]]- :: VNDB</title> + <link href="[[: $p{st} ]]/files/style.css?[[= $VNDB::VERSION ]]" rel="stylesheet" type="text/css" media="screen" /> + <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> +[[ if($p{redit} || $p{vnedit}) { ]]- + <script src="[[: $p{st} ]]/files/dyna.js?[[= $VNDB::VERSION ]]" type="text/javascript"></script> +[[ } ]]- + <script src="[[: $p{st} ]]/files/def.js?[[= $VNDB::VERSION ]]" type="text/javascript"></script> +[[ if($p{devshit}) { ]]- + <meta name="robots" content="noindex, nofollow" /> +[[ } elsif($p{userlist} || $p{userpage} || $p{myvotes} || $p{vnlist} || $p{hist} || ($p{vnpage} && $p{vnpage}{page} eq 'stats') + || grep { $p{$_} && $p{$_}{change} } qw|vnpage ppage rpage|) { ]]- + <meta name="robots" content="noindex, follow" /> +[[ }]]- + +[[if($p{hist}){ ]] + <link rel="alternate" type="application/rss+xml" title="Recent changes" href=" + [[= (!$p{hist}{type}?'/hist':'/'.$p{hist}{type}.$p{hist}{id}.'/hist').'/rss'.(!$p{hist}{type}?'?t='.$p{hist}{selt}.';e='.$p{hist}{sele}:$p{hist}{type} eq 'v' && $p{hist}{seli} ? '?i=1':'') ]]" /> +[[ } ]]- +</head> + +<body> +<div id="header"> + <form id="search" method="get" action="/v/search"> + <fieldset> + <legend>Search</legend> + <input id="searchfield" type="text" name="q" value="[[: $p{searchquery} || 'search' ]]"[[= !$p{searchquery} ? ' style="color: #999"': '' ]]- /> + <input id="searchsubmit" type="submit" value="Search" /> + </fieldset> + </form> + <h1><a href="/">vndb.org</a> / #vndb @ irc.synirc.net <a href="http://vndb.org/"> + [[ if($p{devshit}) { ]]<b style="color: red">The VNDB.org Testing Grounds</b>[[ } else { ]]<b>The Visual Novel Database</b>[[ } ]]</a></h1> +</div> + + +<div id="page"> + +<div id="content"> +[[ # = noindex-tag (see above) ]] +[[ if($p{home}) { %d = %{$p{home}}; ]] [[+ home ]][[ } ]] +[[ if($p{userlogin}) { %d = %{$p{userlogin}}; ]] [[+ userlogin ]][[ } ]] +[[ if($p{userreg}) { %d = %{$p{userreg}}; ]] [[+ userreg ]][[ } ]] +[[ if($p{userpass}) { %d = %{$p{userpass}}; ]] [[+ userpass ]][[ } ]] +[[ if($p{useredit}) { %d = %{$p{useredit}}; ]] [[+ useredit ]][[ } ]] +[[ if($p{userlist}) { %d = %{$p{userlist}}; ]] [[+ userlist ]][[ }# ]] +[[ if($p{userpage}) { %d = %{$p{userpage}}; ]] [[+ userpage ]][[ }# ]] +[[ if($p{vnpage}) { %d = %{$p{vnpage}}; ]] [[+ vnpage ]][[ } ]] +[[ if($p{vnedit}) { %d = %{$p{vnedit}}; ]] [[+ vnedit ]][[ } ]] +[[ if($p{redit}) { %d = %{$p{redit}}; ]] [[+ redit ]][[ } ]] +[[ if($p{vnbrowse}) { %d = %{$p{vnbrowse}}; ]] [[+ vnbrowse ]][[ } ]] +[[ if($p{pbrowse}) { %d = %{$p{pbrowse}}; ]] [[+ pbrowse ]][[ } ]] +[[ if($p{pedit}) { %d = %{$p{pedit}}; ]] [[+ pedit ]][[ } ]] +[[ if($p{ppage}) { %d = %{$p{ppage}}; ]] [[+ ppage ]][[ } ]] +[[ if($p{myvotes}) { %d = %{$p{myvotes}}; ]] [[+ myvotes ]][[ }# ]] +[[ if($p{vnlist}) { %d = %{$p{vnlist}}; ]] [[+ vnlist ]][[ }# ]] +[[ if($p{hist}) { %d = %{$p{hist}}; ]] [[+ hist ]][[ }# ]] +[[ if($p{rpage}) { %d = %{$p{rpage}}; ]] [[+ rpage ]][[ } ]] +[[ if($p{docs}) { %d = %{$p{docs}}; ]] [[+ docs ]][[ } ]] +[[ if($p{error}) { %d = %{$p{error}}; ]] [[+ error ]][[ } ]] +</div> + + +<div id="side"><div><div> + + <h2>Menu</h2> + <ul> + <li><a href="/">Home</a></li> + <li><a href="/v">Visual Novels</a></li> + <li><a href="/p">Producers</a></li> + <li><a href="/v/cat">Categories</a></li> + <li><a href="/u/list">Users</a></li> + <li><a href="/hist">Recent changes</a></li> + <li><a href="/d6">FAQ</a></li> + <li><a href="http://forum.vndb.org/">Forum</a></li> + </ul> + +-[[ if(!$p{AuthLoggedin}) { ]]- + <h2>Login</h2> + <form method="post" action="/nospam?/u/login" id="loginform"> + <fieldset> + <legend>Login</legend> + <input type="text" id="usrname" name="username" /> + <input type="password" id="usrpass" name="userpass" /> + <input type="submit" value="Login" /> + </fieldset> + </form> + <p> + <a href="/u/register">register</a> or <a href="/u/newpass">forgot password?</a> + </p> +[[ } else { ]]- + <h2>User menu</h2> + <ul> + <li>[[: $p{AuthUsername} ]]- ([[: $p{AuthRankname} ]])</li> + <li><a href="/u[[= $p{AuthId} ]]/edit">My profile</a></li> + <li><a href="/u[[= $p{AuthId} ]]/votes">My votes</a></li> + <li><a href="/u[[= $p{AuthId} ]]/list">My visual novel list</a></li> + <li><a href="/u[[= $p{AuthId} ]]/hist">My recent changes</a></li> + [[ if($p{Authedit}) { ]]- + <li> </li> + <li><a href="/v/new">Add visual novel</a></li> + <li><a href="/p/add">Add producer</a></li> + [[ } ]] + <li> </li> + <li><a href="/u/logout">Logout</a></li> + </ul> +[[ } ]]- + +-[[ #</div></div><div><div> ]] + <h2>Statistics</h2> + <ul> + <li><b>[[= $p{Statvn}||0 ]]</b> visual novels</li> + <li><b>[[= $p{Statproducers}||0 ]]</b> producers</li> + <li><b>[[= $p{Statreleases}||0 ]]</b> releases</li> + <li><b>[[= $p{Statvotes}||0 ]]</b> votes</li> + <li><b>[[= $p{Statusers}||0 ]]</b> users</li> + </ul> +[[ if(0) { ]] <h2>Most popular</h2> + <ul>[[ for (@{$p{popular}}) { ]]- + <li><a href="/v[[: $_->{id} ]]" title="[[: $_->{title} ]]">[[: length($_->{title})>30 ? (substr($_->{title}, 0, 27).'...') : $_->{title} ]]</a></li>[[ } ]]- + <li class="more"><a href="/v/all?s=votes&o=d">More...</a></li> + </ul>[[ } ]]- +</div></div></div> + +</div> + +<div id="footer"> + <p> + vndb v[[: $VNDB::VERSION ]]- | + <a href="mailto:contact@vndb.org">contact@vndb.org</a> | + designed by <a href="http://www.freecsstemplates.org/">free css templates</a>. + </p> +</div> + +-[[ if(0 && $p{devshit}) { ]]- + <pre id="debug">SQL Queries used:<br /> +[[= $p{devshit} ]] +</pre> [[ } ]]- +</body> </html> diff --git a/data/tpl/page b/data/tpl/page deleted file mode 100644 index e6ce9e99..00000000 --- a/data/tpl/page +++ /dev/null @@ -1,140 +0,0 @@ -<head> - <title>[[: $p{PageTitle} ]]- :: VNDB</title> - <link href="[[: $p{st} ]]/files/style.css?[[= $VNDB::VERSION ]]" rel="stylesheet" type="text/css" media="screen" /> - <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> -[[ if($p{redit} || $p{vnedit}) { ]]- - <script src="[[: $p{st} ]]/files/dyna.js?[[= $VNDB::VERSION ]]" type="text/javascript"></script> -[[ } ]]- - <script src="[[: $p{st} ]]/files/def.js?[[= $VNDB::VERSION ]]" type="text/javascript"></script> -[[ if($p{devshit}) { ]]- - <meta name="robots" content="noindex, nofollow" /> -[[ } elsif($p{userlist} || $p{userpage} || $p{myvotes} || $p{vnlist} || $p{hist} || ($p{vnpage} && $p{vnpage}{page} eq 'stats') - || grep { $p{$_} && $p{$_}{change} } qw|vnpage ppage rpage|) { ]]- - <meta name="robots" content="noindex, follow" /> -[[ }]]- - -[[if($p{hist}){ ]] - <link rel="alternate" type="application/rss+xml" title="Recent changes" href=" - [[= (!$p{hist}{type}?'/hist':'/'.$p{hist}{type}.$p{hist}{id}.'/hist').'/rss'.(!$p{hist}{type}?'?t='.$p{hist}{selt}.';e='.$p{hist}{sele}:$p{hist}{type} eq 'v' && $p{hist}{seli} ? '?i=1':'') ]]" /> -[[ } ]]- -</head> - -<body> -<div id="header"> - <form id="search" method="get" action="/v/search"> - <fieldset> - <legend>Search</legend> - <input id="searchfield" type="text" name="q" value="[[: $p{searchquery} || 'search' ]]"[[= !$p{searchquery} ? ' style="color: #999"': '' ]]- /> - <input id="searchsubmit" type="submit" value="Search" /> - </fieldset> - </form> - <h1><a href="/">vndb.org</a> / #vndb @ irc.synirc.net <a href="http://vndb.org/"> - [[ if($p{devshit}) { ]]<b style="color: red">The VNDB.org Testing Grounds</b>[[ } else { ]]<b>The Visual Novel Database</b>[[ } ]]</a></h1> -</div> - - -<div id="page"> - -<div id="content"> -[[ # = noindex-tag (see above) ]] -[[ if($p{home}) { %d = %{$p{home}}; ]] [[+ home ]][[ } ]] -[[ if($p{faq}) { %d = %{$p{faq}}; ]] [[+ faq ]][[ } ]] -[[ if($p{userlogin}) { %d = %{$p{userlogin}}; ]] [[+ userlogin ]][[ } ]] -[[ if($p{userreg}) { %d = %{$p{userreg}}; ]] [[+ userreg ]][[ } ]] -[[ if($p{userpass}) { %d = %{$p{userpass}}; ]] [[+ userpass ]][[ } ]] -[[ if($p{useredit}) { %d = %{$p{useredit}}; ]] [[+ useredit ]][[ } ]] -[[ if($p{userlist}) { %d = %{$p{userlist}}; ]] [[+ userlist ]][[ }# ]] -[[ if($p{userpage}) { %d = %{$p{userpage}}; ]] [[+ userpage ]][[ }# ]] -[[ if($p{vnpage}) { %d = %{$p{vnpage}}; ]] [[+ vnpage ]][[ } ]] -[[ if($p{vnedit}) { %d = %{$p{vnedit}}; ]] [[+ vnedit ]][[ } ]] -[[ if($p{redit}) { %d = %{$p{redit}}; ]] [[+ redit ]][[ } ]] -[[ if($p{vnbrowse}) { %d = %{$p{vnbrowse}}; ]] [[+ vnbrowse ]][[ } ]] -[[ if($p{pbrowse}) { %d = %{$p{pbrowse}}; ]] [[+ pbrowse ]][[ } ]] -[[ if($p{pedit}) { %d = %{$p{pedit}}; ]] [[+ pedit ]][[ } ]] -[[ if($p{ppage}) { %d = %{$p{ppage}}; ]] [[+ ppage ]][[ } ]] -[[ if($p{myvotes}) { %d = %{$p{myvotes}}; ]] [[+ myvotes ]][[ }# ]] -[[ if($p{vnlist}) { %d = %{$p{vnlist}}; ]] [[+ vnlist ]][[ }# ]] -[[ if($p{hist}) { %d = %{$p{hist}}; ]] [[+ hist ]][[ }# ]] -[[ if($p{rpage}) { %d = %{$p{rpage}}; ]] [[+ rpage ]][[ } ]] -[[ if($p{docs}) { %d = %{$p{docs}}; ]] [[+ docs ]][[ } ]] -</div> - - -<div id="side"><div><div> - - <h2>Menu</h2> - <ul> - <li><a href="/">Home</a></li> - <li><a href="/v">Visual Novels</a></li> - <li><a href="/p">Producers</a></li> - <li><a href="/v/cat">Categories</a></li> - <li><a href="/u/list">Users</a></li> - <li><a href="/hist">Recent changes</a></li> - <li><a href="/faq">FAQ</a></li> - <li><a href="http://forum.vndb.org/">Forum</a></li> - </ul> - --[[ if(!$p{AuthLoggedin}) { ]]- - <h2>Login</h2> - <form method="post" action="/nospam?/u/login" id="loginform"> - <fieldset> - <legend>Login</legend> - <input type="text" id="usrname" name="username" /> - <input type="password" id="usrpass" name="userpass" /> - <input type="submit" value="Login" /> - </fieldset> - </form> - <p> - <a href="/u/register">register</a> or <a href="/u/newpass">forgot password?</a> - </p> -[[ } else { ]]- - <h2>User menu</h2> - <ul> - <li>[[: $p{AuthUsername} ]]- ([[: $p{AuthRankname} ]])</li> - <li><a href="/u[[= $p{AuthId} ]]/edit">My profile</a></li> - <li><a href="/u[[= $p{AuthId} ]]/votes">My votes</a></li> - <li><a href="/u[[= $p{AuthId} ]]/list">My visual novel list</a></li> - <li><a href="/u[[= $p{AuthId} ]]/hist">My recent changes</a></li> - [[ if($p{Authedit}) { ]]- - <li> </li> - <li><a href="/v/new">Add visual novel</a></li> - <li><a href="/p/add">Add producer</a></li> - [[ } ]] - <li> </li> - <li><a href="/u/logout">Logout</a></li> - </ul> -[[ } ]]- - --[[ #</div></div><div><div> ]] - <h2>Statistics</h2> - <ul> - <li><b>[[= $p{Statvn}||0 ]]</b> visual novels</li> - <li><b>[[= $p{Statproducers}||0 ]]</b> producers</li> - <li><b>[[= $p{Statreleases}||0 ]]</b> releases</li> - <li><b>[[= $p{Statvotes}||0 ]]</b> votes</li> - <li><b>[[= $p{Statusers}||0 ]]</b> users</li> - </ul> -[[ if(0) { ]] <h2>Most popular</h2> - <ul>[[ for (@{$p{popular}}) { ]]- - <li><a href="/v[[: $_->{id} ]]" title="[[: $_->{title} ]]">[[: length($_->{title})>30 ? (substr($_->{title}, 0, 27).'...') : $_->{title} ]]</a></li>[[ } ]]- - <li class="more"><a href="/v/all?s=votes&o=d">More...</a></li> - </ul>[[ } ]]- -</div></div></div> - -</div> - -<div id="footer"> - <p> - vndb v[[: $VNDB::VERSION ]]- | - <a href="mailto:contact@vndb.org">contact@vndb.org</a> | - designed by <a href="http://www.freecsstemplates.org/">free css templates</a>. - </p> -</div> - --[[ if(0 && $p{devshit}) { ]]- - <pre id="debug">SQL Queries used:<br /> -[[= $p{devshit} ]] -</pre> -[[ } ]]- - -</body> diff --git a/data/tpl/vnpage_rel b/data/tpl/vnpage_rel index f0edc35d..ea5c5235 100644 --- a/data/tpl/vnpage_rel +++ b/data/tpl/vnpage_rel @@ -29,10 +29,12 @@ <tr> <td class="tc1">[[= datestr($_->{released}) ]]</td> <td class="tc2">[[= $_->{minage}<0 ? '' : $VNDB::VRAGES->{$_->{minage}} ]]</td> - <td class="tc3">[[= join('', map { $_ ne 'oth' ? '<acronym class="plat '.$_.'" title="'._hchar($VNDB::PLAT->{$_}).'"> </acronym>' : () } sort @{$_->{platforms}}) ]]</td> - <td class="tc4"><acronym title="[[= $VNDB::RTYP->[$_->{type}] ]]- release">[[= lc substr($VNDB::RTYP->[$_->{type}],0,1) ]]</acronym></td> - <td class="tc5"><a href="/r[[= $_->{id} ]]" title="[[: $_->{original} || $_->{title} ]]">[[: shorten $_->{title},60 ]]</a></td> - <td class="tc7">[[ if($_->{website}) { ]]<a href="[[: $_->{website} ]]" class="plat ext" title="WWW"> </a>[[ } ]]</td> + <td class="tc3"> + [[= join('', map { $_ ne 'oth' ? '<acronym class="plat '.$_.'" title="'._hchar($VNDB::PLAT->{$_}).'"> </acronym>' : () } sort @{$_->{platforms}}) ]] + <acronym title="[[= $VNDB::RTYP->[$_->{type}] ]]- release" class="plat -[[= lc substr($VNDB::RTYP->[$_->{type}],0,3) ]]"> </acronym> + </td> + <td class="tc4"><a href="/r[[= $_->{id} ]]" title="[[: $_->{original} || $_->{title} ]]">[[: shorten $_->{title},60 ]]</a></td> + <td class="tc5">[[ if($_->{website}) { ]]<a href="[[: $_->{website} ]]" class="plat ext" title="WWW"> </a>[[ } ]]</td> </tr> [[ } ]]- [[ } ]]- diff --git a/lib/ChangeLog b/lib/ChangeLog index 3e325ccd..5cc2c5a4 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -10,14 +10,19 @@ TODO: uploaded or not + Use AniDB's daily title dump and implement a search feature to add anime relations without having to visit AniDB. + + Clear up style.css (or wait until the new layout is ready...) 1.15 - ? - Relation graph now also updated on VN title change - Anime relations - - [js] Position of the dropdown box is now relative to the link element, not - the cursor - - Used inline-block instead of block for icon image sprites (to avoid stupid - float hacks) + - [js] Position of the dropdown box is now relative to the link element + - Used inline-block for icon image sprites (to avoid stupid float hacks) + - Used icons to indicate the release status type on VN pages + - Give a 'not logged in' dropdown edit box when the user isn't logged in + - Fixed the redirects for old URLs + - Designed a better system to handle documentation + - Created a centralised system for site errors within the same layout + - Wrote some more documentation 1.14 - 2008-04-26 - Removed the ID gap prevention method diff --git a/lib/Multi/IRC.pm b/lib/Multi/IRC.pm index 4643a8fb..b8f6d44b 100644 --- a/lib/Multi/IRC.pm +++ b/lib/Multi/IRC.pm @@ -157,23 +157,3 @@ sub shutdown { 1; - -__END__ - -# debug -sub _default { - my($event,$args) = @_[ ARG0 .. $#_ ]; - my $arg_number = 0; - for (@$args) { - print " ARG$arg_number = "; - if ( ref($_) eq 'ARRAY' ) { - print "$_ = [", join ( ", ", @$_ ), "]\n"; - } - else { - print "'".($_||'')."'\n"; - } - $arg_number++; - } - return 0; -} - diff --git a/lib/Multi/RG.pm b/lib/Multi/RG.pm index 4931ef96..b32fedba 100644 --- a/lib/Multi/RG.pm +++ b/lib/Multi/RG.pm @@ -34,8 +34,8 @@ sub _start { $_[KERNEL]->alias_set('rg'); $_[KERNEL]->call(core => register => qr/^relgraph ((?:[0-9]+)(?:\s+[0-9]+)*|all)$/, 'cmd_relgraph'); - # regenerate all relation graphs twice a month (every 1st and 15nd day at 03:00) - $_[KERNEL]->post(core => addcron => '0 3 1,15 * *', 'relgraph all'); + # regenerate all relation graphs once a month + $_[KERNEL]->post(core => addcron => '0 3 1 * *', 'relgraph all'); } diff --git a/lib/Multi/Sitemap.pm b/lib/Multi/Sitemap.pm index 24981910..991244fd 100644 --- a/lib/Multi/Sitemap.pm +++ b/lib/Multi/Sitemap.pm @@ -88,8 +88,8 @@ sub vnpages { |); $q->execute; while(local $_ = $q->fetchrow_arrayref) { - $_[KERNEL]->call(sitemap => addurl => 'v/'.$_->[0], 'w', $_->[1], 0.7); - $_[KERNEL]->call(sitemap => addurl => 'v/'.$_->[0].'/rg', 'w', $_->[1], 0.7) if $_->[2]; + $_[KERNEL]->call(sitemap => addurl => 'v'.$_->[0], 'w', $_->[1], 0.7); + $_[KERNEL]->call(sitemap => addurl => 'v'.$_->[0].'/rg', 'w', $_->[1], 0.7) if $_->[2]; } $_[KERNEL]->yield('releasepages'); @@ -107,7 +107,7 @@ sub releasepages { |); $q->execute; while(local $_ = $q->fetchrow_arrayref) { - $_[KERNEL]->call(sitemap => addurl => 'r/'.$_->[0], 'w', $_->[1], 0.3); + $_[KERNEL]->call(sitemap => addurl => 'r'.$_->[0], 'w', $_->[1], 0.3); } $_[KERNEL]->yield('producerpages'); @@ -125,7 +125,7 @@ sub producerpages { |); $q->execute; while(local $_ = $q->fetchrow_arrayref) { - $_[KERNEL]->call(sitemap => addurl => 'p/'.$_->[0], 'w', $_->[1]); + $_[KERNEL]->call(sitemap => addurl => 'p'.$_->[0], 'w', $_->[1]); } $_[KERNEL]->yield('finish'); diff --git a/lib/VNDB.pm b/lib/VNDB.pm index ffec7881..2632a358 100644 --- a/lib/VNDB.pm +++ b/lib/VNDB.pm @@ -30,6 +30,7 @@ our %VNDBopts = ( ], imgpath => '/www/vndb/static/cv', mappath => '/www/vndb/data/rg', + docpath => '/www/vndb/data/docs', ); $VNDBopts{ranks}[0][1] = { (map{$_,1} map { keys %{$VNDBopts{ranks}[$_]} } 1..5) }; @@ -52,9 +53,8 @@ use VNDB::VN; my %VNDBuris = ( # wildcards: * -> (.+), + -> ([0-9]+) '/' => sub { shift->HomePage }, - faq => sub { shift->FAQ }, 'd+' => sub { shift->DocPage(shift) }, - nospam => sub { shift->DocPage(6) }, + nospam => sub { shift->ResAddTpl(error => { err => 'formerr' }) }, hist => {'*'=> sub { shift->History(undef, undef, $_[1]) } }, # users u => { @@ -127,6 +127,7 @@ my %VNDBuris = ( # wildcards: * -> (.+), + -> ([0-9]+) # provide redirects for old URIs my %OLDuris = ( + faq => sub { shift->ResRedirect('/d6', 'perm') }, vn => { rss => sub { shift->ResRedirect('/hist/rss?t=v&e=1', 'perm') }, '*' => sub { shift->ResRedirect('/v/'.$_[1], 'perm') }, @@ -194,7 +195,7 @@ sub checkuri { my @ouri = @uri; # items in @uri can be modified by uri2page $self->uri2page(\%VNDBuris, \@uri, 0); $self->uri2page(\%OLDuris, \@ouri, 0) # provide redirects for old uris - if $self->{_Res}->{whattouse} == 4 && $self->{_Res}->{rc} == 404; + if $self->{_Res}->{code} == 404; } diff --git a/lib/VNDB/HomePages.pm b/lib/VNDB/HomePages.pm index eb0f9e0b..0e99f517 100644 --- a/lib/VNDB/HomePages.pm +++ b/lib/VNDB/HomePages.pm @@ -7,7 +7,7 @@ use Exporter 'import'; use vars ('$VERSION', '@EXPORT'); $VERSION = $VNDB::VERSION; -@EXPORT = qw| HomePage FAQ DocPage History HistRevert HistDelete |; +@EXPORT = qw| HomePage DocPage History HistRevert HistDelete |; sub HomePage { @@ -31,12 +31,34 @@ sub HomePage { } -sub FAQ { - shift->ResAddTpl(faq => {}); -} - sub DocPage { - shift->ResAddTpl(docs => { p => shift }); + my($s,$p) = @_; + + open my $F, '<', sprintf('%s/%d', $s->{docpath}, $p) or return $s->ResNotFound(); + my @c = <$F>; + close $F; + + (my $title = shift @c) =~ s/^:TITLE://; + chomp $title; + + my $sec = 0; + for (@c) { + s{^:SUB:(.+)\r?\n$}{ + $sec++; + qq|<h3><a href="#$sec" name="$sec">$sec. $1</a></h3>\n| + }eg; + s{^:INC:(.+)\r?\n$}{ + open $F, '<', sprintf('%s/%s', $s->{docpath}, $1) or die $!; + my $ii = join('', <$F>); + close $F; + $ii; + }eg; + } + + $s->ResAddTpl(docs => { + title => $title, + content => join('', @c), + }); } diff --git a/lib/VNDB/Util/DB.pm b/lib/VNDB/Util/DB.pm index f10f7b67..e5eba14f 100644 --- a/lib/VNDB/Util/DB.pm +++ b/lib/VNDB/Util/DB.pm @@ -1274,7 +1274,7 @@ sub qs { # ISO SQL2-quoting, with some PgSQL-specific stuff # depends on the standard_conforming_strings configuration option of PgSQL, # while E'' will always behave the same regardless of the server configuration. for (@r) { - (!defined $_ or $_ eq '_NULL_') && ($_ = 'NULL') && next; + (!defined $_ or $_ eq '_NULL_') && next; s/'/''/g; s/\\/\\\\/g; $_ = "E'$_'"; diff --git a/lib/VNDB/Util/Response.pm b/lib/VNDB/Util/Response.pm index 619429ae..8d3f33b8 100644 --- a/lib/VNDB/Util/Response.pm +++ b/lib/VNDB/Util/Response.pm @@ -13,7 +13,7 @@ require bytes; use vars ('$VERSION', '@EXPORT'); $VERSION = $NTL::VERSION; -@EXPORT = qw| ResRedirect ResNotFound ResDown ResDenied ResFile +@EXPORT = qw| ResRedirect ResNotFound ResDenied ResFile ResForceBody ResSetContentType ResAddHeader ResAddTpl ResAddDefaultStuff ResStartXML ResGetXML ResGetBody ResGet ResGetCGI ResSetModPerl |; @@ -31,7 +31,6 @@ sub new { xmlobj => undef, xmldata => undef, whattouse => 1, - rc => 0, }, $type; return $me; @@ -54,40 +53,23 @@ sub ResRedirect { my $code = !$type ? 301 : $type eq 'temp' ? 307 : $type eq 'post' ? 303 : 301; + $info->{body} = 'Redirecting...'; $info->{code} = $code; - $info->{tpl} = { - error => { - url => $url, - code => $code, - } - }; $info->{headers} = [ 'Location', "$self->{root_url}$url" ]; $info->{contenttype} = 'text/html; charset=UTF-8'; - $info->{whattouse} = 2; + $info->{whattouse} = 1; } sub ResNotFound { my $s = shift; my $i = $s->{_Res}; $i->{code} = 404; - $i->{whattouse} = 4; - push @{$i->{headers}}, 'X-Sendfile' => '/www/vndb/www/files/notfound.html'; -} - -sub ResDown { - my $self = shift; - my $msg = shift || ''; - my $info = $self->{_Res} || $self; - - $info->{code} = 200; - $info->{tpl} = { - error => { - code => 1, - msg => $msg, # specifies which message should be displayed - } + $i->{whattouse} = 2; + $i->{tpl} = { + page => { error => { + err => 'notfound' + }}, }; - $info->{contenttype} = 'text/html; charset=UTF-8'; - $info->{whattouse} = 2; } sub ResDenied { diff --git a/static/files/16x14.png b/static/files/16x14.png Binary files differnew file mode 100644 index 00000000..1cf35c08 --- /dev/null +++ b/static/files/16x14.png diff --git a/static/files/platforms.png b/static/files/platforms.png Binary files differdeleted file mode 100644 index 66951fe2..00000000 --- a/static/files/platforms.png +++ /dev/null diff --git a/static/files/style.css b/static/files/style.css index 6a8ab4fb..4b5c8d29 100644 --- a/static/files/style.css +++ b/static/files/style.css @@ -450,7 +450,9 @@ img.right { margin: 0; } + /* producer search */ + form#psearch { display: block; margin: 10px 0 20px 210px; @@ -472,6 +474,8 @@ h3.home { } +/* edit links and stuff */ + p.mod { float: right; color: #999; @@ -512,13 +516,13 @@ div.dropdown a:hover { } +/* paragraph markups... */ + p#relations { margin: 20px 0 0 0; width: 100%; text-align: center; } - - p.desc { padding: 0 10px 0 10px; } @@ -535,7 +539,9 @@ b.mod, a.mod { color: #f00; } -/* CATEGORIES */ + +/* categories */ + ul#cat { margin: 0; padding: 0; @@ -577,6 +583,13 @@ form ul#cat li li b { width: 13px; font-weight: bold; } form ul#cat li li a { color: #000; text-decoration: none; display: block; width: 160px; } ul#cat li li.inc { background-position: 0px -16px; color: #090; } ul#cat li li.exc { background-position: 0px -33px; color: #900; } +i.crgn0 { font-style: normal; } +i.crgn1 { font-style: normal; color: #bbb; } +i.crgn2 { font-style: normal; } +i.crgn3 { font-style: normal; font-weight: bold; } + + +/* language filter */ div#lfilter { clear: left; @@ -590,14 +603,15 @@ div#lfilter label { width: 90px; } -i.crgn0 { font-style: normal; } -i.crgn1 { font-style: normal; color: #bbb; } -i.crgn2 { font-style: normal; } -i.crgn3 { font-style: normal; font-weight: bold; } /* DOCUMENTATION PAGES */ -#dpage h3 { margin-top: 20px; } +#dpage h3 { margin-top: 25px; } +#dpage h3 a { color: #203C36; text-decoration: none; } #dpage dd { padding-bottom: 5px; margin-left: 70px; } +#dpage ul.index { display: block; float: right; width: 150px; padding: 2px; margin: 0 0 10px 5px; background-color: #f1f1f1; border: 1px solid #ccc; } +#dpage ul.index li { list-style-type: none; } +#dpage ul.index li a { margin: 0 0 0 10px; } +#dpage .retired { text-decoration: line-through; } @@ -638,16 +652,14 @@ acronym.date { } b.future { font-weight: normal; color: #900; } -table td { vertical-align: top; } -table { width: 100%; border-collapse: collapse; } -thead tr td { font-weight: bold; } -thead tr td a { text-decoration: none; } + +/* 16x14 image sprites */ .plat { - background: url(/files/platforms.png) no-repeat; + background: url(/files/16x14.png) no-repeat; width: 16px; height: 14px; - margin: 0 5px 0 0; + margin: 0 2px 0 0; overflow: hidden; display:-moz-inline-stack; display: inline-block; @@ -655,6 +667,7 @@ thead tr td a { text-decoration: none; } border: 0; text-decoration: none; } +acronym.plat { cursor: default; } .plat.oth { background: none; } .plat.dc { background-position: 0px 0px; } .plat.lin { background-position: 0px -14px; } @@ -662,16 +675,25 @@ thead tr td a { text-decoration: none; } .plat.ps2 { background-position: 0px -42px; } .plat.sfc { background-position: 0px -56px; } .plat.gba { background-position: 0px -70px; } -.plat.wii { background-position: 0px -84px; } +.plat.ext { background-position: 0px -84px; } +.plat.par { background-position: 0px -98px; } .plat.dvd { background-position: -16px 0px; } .plat.mac { background-position: -16px -14px; } .plat.ps { background-position: -16px -28px; } .plat.psp { background-position: -16px -42px; } .plat.win { background-position: -16px -56px; } -.plat.ext { background-position: -16px -70px; } +.plat.wii { background-position: -16px -70px; } +.plat.tri { background-position: -16px -84px; } +.plat.com { background-position: -16px -98px; } +.plat.par, .plat.tri, .plat.com { width: 11px; } +/* tables */ +table td { vertical-align: top; } +table { width: 100%; border-collapse: collapse; } +thead tr td { font-weight: bold; } +thead tr td a { text-decoration: none; } #content table input { width: 13px; height: 13px; @@ -711,9 +733,8 @@ b.diff_del { font-weight: normal; background-color: #fcc; } #tre .tc1 { width: 75px; padding-left: 10px; } #tre .tc2 { width: 60px; text-align: center; } -#tre .tc3 { width: 55px; margin: 0; padding: 0; white-space: nowrap; text-align: right } -#tre .tc4 { width: 10px; text-align: right; padding-right:3px; } -#tre .tc7 { width: 16px; margin: 0; padding: 0; white-space: nowrap; } +#tre .tc3, #tre .tc5 { width: 16px; margin: 0; padding: 0; white-space: nowrap; text-align: right } +#tre .tc3 { width: 60px; } #debug { border-top: 1px solid #ffb4b4; |