Files
aowow/template/localized/contrib_0.tpl.php
Sarjuuk 226f521439 Template/Endpoints (Base)
* redo page render following the logic of:
      Response ─┬─> TextResponse ─> TextResponseImpl
                └─> TemplateResponse ─> TemplateResponseImpl
    * split up giant files, one per response path
    * caching becomes a trait, implemented where necessary
        * TextResponses (Ajax) can now be cached
    * make use of previously defined php classes for js objects
        * Tabs, Listview, Tooltip, Announcement, Markup, Book, ...
    * \Aowow\Template\PageTemplate is the new class to be cached
    * do not discard error messages generated after vars have been sent to template
      and store in session for display at a later time
    * implement tracking consent management
    * move logic out of template into their respective endpoints
2025-09-25 15:32:18 +02:00

100 lines
4.4 KiB
PHP

<?php
namespace Aowow\Template;
?>
<div id="tab-add-your-comment" style="display: none">
Please keep the following in mind when posting a comment:
<ul>
<li><div>Your comment must be in English or it will be removed.</div></li>
<li><div>Unsure how to post? Check out our <a href="?help=commenting-and-you" target="_blank">handy guide</a>!</div></li>
<li><div>Please post questions on our <a href="?forums">forums</a> for quicker reply.</div></li>
<li><div>You might want to proof-read your comments before posting them.</div></li>
</ul>
<?php
echo $coError ? " <div class=\"pad\"></div>\n <div class=\"msg-failure\">".$coError."</div>\n" : '';
if ($this->user::canComment()):
?>
<form name="addcomment" action="?comment=add&amp;type=<?=$this->type.'&amp;typeid='.$this->typeId; ?>" method="post" onsubmit="return co_validateForm(this)">
<div id="funcbox-generic"></div>
<script type="text/javascript">Listview.funcBox.coEditAppend($('#funcbox-generic'), {body: ''}, 1)</script>
<div class="pad"></div>
<input type="submit" value="Submit"></input>
<?php
else:
?>
<form action="/" method="post">
<div class="comment-edit-body"><textarea class="comment-editbox" rows="10" cols="40" name="commentbody" disabled="disabled"></textarea></div>
<?php
endif;
if (!$this->user::isLoggedIn()):
?>
<small>You are not logged in. Please <a href="?account=signin">log in</a> or <a href="?account=signup">register an account</a> to add your comment.</small>
<?php
endif;
?>
</form>
</div>
<div id="tab-submit-a-screenshot" style="display: none">
Simply browse for your screenshot using the form below.
<ul>
<li><div>In-game screenshots are preferred over model-viewer-generated ones.</div></li>
<li><div>The higher the quality the better!</div></li>
<li><div>Be sure to read the <a href="?help=screenshots-tips-tricks" target="_blank">tips &amp; tricks</a> if you haven't before.</div></li>
</ul>
<?php
echo $ssError ? " <div class=\"pad\"></div>\n <div class=\"msg-failure\">".$ssError."</div>\n" : '';
if ($this->user::canUploadScreenshot()):
?>
<form action="?screenshot=add&<?=$this->type.'.'.$this->typeId; ?>" method="post" enctype="multipart/form-data" onsubmit="return ss_validateForm(this)">
<input type="file" name="screenshotfile" style="width: 35%"/><br />
<div class="pad2"></div>
<input type="submit" value="Submit" />
<div class="pad3"></div>
<small class="q0">Note: Your Screenshot will need to be approved before appearing on the site.</small>
<?php
else:
?>
<form action="/" method="post">
<input type="file" name="screenshotfile" disabled="disabled" /><br />
<?php
endif;
if (!$this->user::isLoggedIn()):
?>
<small>You are not signed in. Please <a href="?account=signin">sign in</a> to submit a screenshot.</small>
<?php
endif;
?>
</form>
</div>
<div id="tab-suggest-a-video" style="display: none">
Simply type the URL of the video in the form below.
<?php
echo $viError ? " <div class=\"pad\"></div>\n <div class=\"msg-failure\">".$viError."</div>\n" : '';
if ($this->user::canSuggestVideo()):
?>
<div class="pad2"></div>
<form action="?video=add&<?=$this->type.'.'.$this->typeId; ?>" method="post" enctype="multipart/form-data" onsubmit="return vi_validateForm(this)">
<input type="text" name="videourl" style="width: 35%" /> <small>Supported: YouTube only</small>
<div class="pad2"></div>
<input type="submit" value="Submit" />
<div class="pad3"></div>
<small class="q0">Note: Your video will need to be approved before appearing on the site.</small>
<?php
else:
?>
<form action="/" method="post">
<input type="text" name="videourl" disabled="disabled" /><br />
<?php
endif;
if (!$this->user::isLoggedIn()):
?>
<small>You are not signed in. Please <a href="?account=signin">sign in</a> to submit a video.</small>
<?php
endif;
?>
</form>
</div>