antville/code/Site/$Site.skin

256 lines
7.9 KiB
Text
Raw Normal View History

<% #href %>
* Refactored code and skins in respect for comprehensive i18n * Refactored and unified remove() methods and calls for greater flexibility as well as reliability * Added option to remove all comments by a user to Comment.remove() method and $Comment#delete skin * Added global #listItemFlag skin as well as listItemFlag_macro() for rendering vertically written text of items in a list view (e.g. closed) * Fixed bug in gettext_macro() and ngettext_macro() causing incorrect whitespace * Refactored timezone and locale handling * Modified automatic translation of untitled links in HopObject.link_macro() * Added honeypot to login and registration forms * Fixed client-side JavaScript to be evaluated when login or registration form is submitted, not only when the submit button is clicked * Removed redundant filter expression from DB mapping of Membership.images collection * Added Membership.content collection * Changed terminology from open to running polls, thus renaming Polls.open_action() method and Polls.open collection * Moved a lot of CSS used in root or administration sections from Site#stylesheet to $Root#stylesheet skin * Added Root.updateDomains() method (most likely already obsolete) * Removed Root.processHref() method (only necessary for very advanced setup) and obsolete comments * Fixed Root.xgettext() method to correctly read UTF-8 encoded data * Fixed Site.deleted_macro() to return the date object for late formatting * Refactored Site.processHref() for more convenient custom domain name mapping * Renamed Skins.advanced_action() method to Skins.all_action() * Removed redundant filter from Stories.comments collection * Removed unnecessary filter from Story.comments collection
2010-01-10 14:40:36 +00:00
<% param.path %>
<% #include %>
document.writeln('<' + 'scr' + 'ipt type="text/javascript"' +
'src="<% param.href %>"></' + 'scr' + 'ipt>');
<% #listItem %>
<tr>
<td class="small" style="text-align: right; vertical-align: baseline; white-space: nowrap;">
<% site.modified short %>
</td>
<td style="vertical-align: baseline; padding-left: 10px;"><% site.title | site.link %></td>
</tr>
<% #create %>
<p class="storyTitle"><% response.title %></p>
<div>
<% gettext "To create a new site you need to fill out the form below." %>
</div>
<div class="small">
<p><% gettext 'The name will be part of the URL of your site. E.g. if you
enter “{0}” as the name your site will be reachable via this url: {1}'
<% example.name %> <% example.href prefix="<br /><code>" suffix=</code> %> %></p>
<p><% gettext "Please note that you cannot change the name after the site was
created." %> <% gettext "The title will appear in the header of every page
of your site. You can change it anytime you want." %></p>
</div>
<p>
<form method="post" action="<% response.action %>">
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="small"><% gettext Name suffix=: %></td>
<td><% site.input name %></td>
</tr>
<tr>
<td class="small"><% gettext Title suffix=: %></td>
<td><% site.input title %></td>
</tr>
<tr>
<td></td>
<td>
<br />
<button type="submit" name="create" value="1"><% gettext Create %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</td>
</tr>
</table>
</form>
</p>
<% #menuExt %>
<script type="text/javascript" defer="defer">
<!--
var win = external.menuArguments;
var url = "<% site.url %>stories/create?content_text=";
var link = escape('<a href="' + win.location.href + '">' +
win.document.title + "</a>: ");
var text = escape(win.document.selection.createRange().text);
win.location.href = url + link + text;
//-->
</script>
<% #menuExtRegistry %>
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Post to <% site.title %>]
@="<% site.url %>menuext"
"contexts"=hex:31
<% #referrers %>
<p class="storyTitle"><% response.title %></p>
<br />
<form action="<% response.action %>" method="get">
<input type="text" name="filter" value="<% request.filter encoding="form" %>"
* Refactored code and skins in respect for comprehensive i18n * Refactored and unified remove() methods and calls for greater flexibility as well as reliability * Added option to remove all comments by a user to Comment.remove() method and $Comment#delete skin * Added global #listItemFlag skin as well as listItemFlag_macro() for rendering vertically written text of items in a list view (e.g. closed) * Fixed bug in gettext_macro() and ngettext_macro() causing incorrect whitespace * Refactored timezone and locale handling * Modified automatic translation of untitled links in HopObject.link_macro() * Added honeypot to login and registration forms * Fixed client-side JavaScript to be evaluated when login or registration form is submitted, not only when the submit button is clicked * Removed redundant filter expression from DB mapping of Membership.images collection * Added Membership.content collection * Changed terminology from open to running polls, thus renaming Polls.open_action() method and Polls.open collection * Moved a lot of CSS used in root or administration sections from Site#stylesheet to $Root#stylesheet skin * Added Root.updateDomains() method (most likely already obsolete) * Removed Root.processHref() method (only necessary for very advanced setup) and obsolete comments * Fixed Root.xgettext() method to correctly read UTF-8 encoded data * Fixed Site.deleted_macro() to return the date object for late formatting * Refactored Site.processHref() for more convenient custom domain name mapping * Renamed Skins.advanced_action() method to Skins.all_action() * Removed redundant filter from Stories.comments collection * Removed unnecessary filter from Story.comments collection
2010-01-10 14:40:36 +00:00
size="30" />
<button type="submit" name="submit" value="1"><% gettext Filter %></button>
<button onclick="document.location='<% site.href referrers %>'; return false;">
<% gettext Reset %></button>
<div class="small">
<input type="checkbox" id="includeSpam" name="includeSpam" value="checked"
<% request.includeSpam prefix='checked="' suffix='"' encoding="form" %> />
* Refactored code and skins in respect for comprehensive i18n * Refactored and unified remove() methods and calls for greater flexibility as well as reliability * Added option to remove all comments by a user to Comment.remove() method and $Comment#delete skin * Added global #listItemFlag skin as well as listItemFlag_macro() for rendering vertically written text of items in a list view (e.g. closed) * Fixed bug in gettext_macro() and ngettext_macro() causing incorrect whitespace * Refactored timezone and locale handling * Modified automatic translation of untitled links in HopObject.link_macro() * Added honeypot to login and registration forms * Fixed client-side JavaScript to be evaluated when login or registration form is submitted, not only when the submit button is clicked * Removed redundant filter expression from DB mapping of Membership.images collection * Added Membership.content collection * Changed terminology from open to running polls, thus renaming Polls.open_action() method and Polls.open collection * Moved a lot of CSS used in root or administration sections from Site#stylesheet to $Root#stylesheet skin * Added Root.updateDomains() method (most likely already obsolete) * Removed Root.processHref() method (only necessary for very advanced setup) and obsolete comments * Fixed Root.xgettext() method to correctly read UTF-8 encoded data * Fixed Site.deleted_macro() to return the date object for late formatting * Refactored Site.processHref() for more convenient custom domain name mapping * Renamed Skins.advanced_action() method to Skins.all_action() * Removed redundant filter from Stories.comments collection * Removed unnecessary filter from Story.comments collection
2010-01-10 14:40:36 +00:00
<label for="includeSpam"><% gettext 'Include Referrer Spam' %></label>
</div>
<br />
<table border="0" cellspacing="0" cellpadding="2">
<tr>
* Refactored code and skins in respect for comprehensive i18n * Refactored and unified remove() methods and calls for greater flexibility as well as reliability * Added option to remove all comments by a user to Comment.remove() method and $Comment#delete skin * Added global #listItemFlag skin as well as listItemFlag_macro() for rendering vertically written text of items in a list view (e.g. closed) * Fixed bug in gettext_macro() and ngettext_macro() causing incorrect whitespace * Refactored timezone and locale handling * Modified automatic translation of untitled links in HopObject.link_macro() * Added honeypot to login and registration forms * Fixed client-side JavaScript to be evaluated when login or registration form is submitted, not only when the submit button is clicked * Removed redundant filter expression from DB mapping of Membership.images collection * Added Membership.content collection * Changed terminology from open to running polls, thus renaming Polls.open_action() method and Polls.open collection * Moved a lot of CSS used in root or administration sections from Site#stylesheet to $Root#stylesheet skin * Added Root.updateDomains() method (most likely already obsolete) * Removed Root.processHref() method (only necessary for very advanced setup) and obsolete comments * Fixed Root.xgettext() method to correctly read UTF-8 encoded data * Fixed Site.deleted_macro() to return the date object for late formatting * Refactored Site.processHref() for more convenient custom domain name mapping * Renamed Skins.advanced_action() method to Skins.all_action() * Removed redundant filter from Stories.comments collection * Removed unnecessary filter from Story.comments collection
2010-01-10 14:40:36 +00:00
<td align="right" class="small"><% gettext Hits %></td>
<td width="10" nowrap="nowrap" rowspan="999"> </td>
<td></td>
* Refactored code and skins in respect for comprehensive i18n * Refactored and unified remove() methods and calls for greater flexibility as well as reliability * Added option to remove all comments by a user to Comment.remove() method and $Comment#delete skin * Added global #listItemFlag skin as well as listItemFlag_macro() for rendering vertically written text of items in a list view (e.g. closed) * Fixed bug in gettext_macro() and ngettext_macro() causing incorrect whitespace * Refactored timezone and locale handling * Modified automatic translation of untitled links in HopObject.link_macro() * Added honeypot to login and registration forms * Fixed client-side JavaScript to be evaluated when login or registration form is submitted, not only when the submit button is clicked * Removed redundant filter expression from DB mapping of Membership.images collection * Added Membership.content collection * Changed terminology from open to running polls, thus renaming Polls.open_action() method and Polls.open collection * Moved a lot of CSS used in root or administration sections from Site#stylesheet to $Root#stylesheet skin * Added Root.updateDomains() method (most likely already obsolete) * Removed Root.processHref() method (only necessary for very advanced setup) and obsolete comments * Fixed Root.xgettext() method to correctly read UTF-8 encoded data * Fixed Site.deleted_macro() to return the date object for late formatting * Refactored Site.processHref() for more convenient custom domain name mapping * Renamed Skins.advanced_action() method to Skins.all_action() * Removed redundant filter from Stories.comments collection * Removed unnecessary filter from Story.comments collection
2010-01-10 14:40:36 +00:00
<td class="small"><% gettext Referrer %></td>
</tr>
<script type="text/javascript">
var referrers = [];
<% site.referrers %>
var query = new Antville.Query();
var spamFilter = new Antville.Filter([<% site.spamfilter %>]);
var searchFilter = new Antville.Filter(query.filter);
var searchEngineFilters = [
new Antville.Filter("http:\/\/.*google.*\?", "q"),
new Antville.Filter("http:\/\/.*search\.msn.*\?", "q"),
new Antville.Filter("http:\/\/.*altavista.*\?", "q"),
new Antville.Filter("http:\/\/.*search\.yahoo.*\?", "p"),
new Antville.Filter("http:\/\/search\.live\.com.*\?", "q")
];
for (var i in referrers) {
var ref = referrers[i];
var text = ref.text;
var isSpam = spamFilter.test(ref.url);
if (isSpam && !query.includeSpam)
continue;
if (query.filter && !searchFilter.test(ref.url))
continue;
var done = false;
for (var e in searchEngineFilters) {
var filter = searchEngineFilters[e];
if (!done && filter.test(ref.url)) {
text = ref.compose(filter.key, "<em>Search request:</em> ");
done = true;
}
}
document.writeln('<tr>');
document.writeln('<td align="right" valign="top">', ref.count, '</td>');
document.write('<td valign="top">');
if ("<% membership.role %>" === "Owner") {
document.write('<input type="checkbox" name="permanent" value="',
ref.url, '" />');
}
document.writeln('</td>');
document.writeln('<td><a href="', ref.url, '"', (isSpam ?
' style="<% value "Small font color" prefix="color: " %>"' : ''),
'>', text, '</a></td>');
document.writeln('</tr>');
}
</script>
<noscript>
<tr>
<td colspan="3">
<% site.skin $Site#noscript %>
</td>
</tr>
</noscript>
</table>
</form>
<% #referrer %>
referrers.push(new Antville.Referrer("<% param.referrer %>",
"<% param.text %>", <% param.requests %>));
<% #noscript %>
<% gettext "To prevent spam abuse referrers and backlinks are displayed
using client-side JavaScript code. Thus, you should enable the option to
execute JavaScript code in your browser. Otherwise you will only see this
information." %>
<% #deleted %>
* Refactored code and skins in respect for comprehensive i18n * Refactored and unified remove() methods and calls for greater flexibility as well as reliability * Added option to remove all comments by a user to Comment.remove() method and $Comment#delete skin * Added global #listItemFlag skin as well as listItemFlag_macro() for rendering vertically written text of items in a list view (e.g. closed) * Fixed bug in gettext_macro() and ngettext_macro() causing incorrect whitespace * Refactored timezone and locale handling * Modified automatic translation of untitled links in HopObject.link_macro() * Added honeypot to login and registration forms * Fixed client-side JavaScript to be evaluated when login or registration form is submitted, not only when the submit button is clicked * Removed redundant filter expression from DB mapping of Membership.images collection * Added Membership.content collection * Changed terminology from open to running polls, thus renaming Polls.open_action() method and Polls.open collection * Moved a lot of CSS used in root or administration sections from Site#stylesheet to $Root#stylesheet skin * Added Root.updateDomains() method (most likely already obsolete) * Removed Root.processHref() method (only necessary for very advanced setup) and obsolete comments * Fixed Root.xgettext() method to correctly read UTF-8 encoded data * Fixed Site.deleted_macro() to return the date object for late formatting * Refactored Site.processHref() for more convenient custom domain name mapping * Renamed Skins.advanced_action() method to Skins.all_action() * Removed redundant filter from Stories.comments collection * Removed unnecessary filter from Story.comments collection
2010-01-10 14:40:36 +00:00
<% gettext "This site is going to be deleted completely and irreversibly after {0}."
<% site.deleted | format long %> %>
<% #export %>
<p class="title">Export Site Data</p><br />
<% param.fileUrl prefix='<p><a href="' suffix=<% param.fileDate
prefix='">Download ZIP file</a> <small>(as of '
suffix=')</small></p><br />' | format short %> %>
<form action="" method="post">
<button type="submit" name="submit" value="export">Start</button>
</form>
<% #edit %>
<p class="storyTitle"><% response.title %></p>
<form id="prefs" method="post" action="<% response.action %>">
<table border="0" cellspacing="0" cellpadding="2">
* Refactored code and skins in respect for comprehensive i18n * Refactored and unified remove() methods and calls for greater flexibility as well as reliability * Added option to remove all comments by a user to Comment.remove() method and $Comment#delete skin * Added global #listItemFlag skin as well as listItemFlag_macro() for rendering vertically written text of items in a list view (e.g. closed) * Fixed bug in gettext_macro() and ngettext_macro() causing incorrect whitespace * Refactored timezone and locale handling * Modified automatic translation of untitled links in HopObject.link_macro() * Added honeypot to login and registration forms * Fixed client-side JavaScript to be evaluated when login or registration form is submitted, not only when the submit button is clicked * Removed redundant filter expression from DB mapping of Membership.images collection * Added Membership.content collection * Changed terminology from open to running polls, thus renaming Polls.open_action() method and Polls.open collection * Moved a lot of CSS used in root or administration sections from Site#stylesheet to $Root#stylesheet skin * Added Root.updateDomains() method (most likely already obsolete) * Removed Root.processHref() method (only necessary for very advanced setup) and obsolete comments * Fixed Root.xgettext() method to correctly read UTF-8 encoded data * Fixed Site.deleted_macro() to return the date object for late formatting * Refactored Site.processHref() for more convenient custom domain name mapping * Renamed Skins.advanced_action() method to Skins.all_action() * Removed redundant filter from Stories.comments collection * Removed unnecessary filter from Story.comments collection
2010-01-10 14:40:36 +00:00
<colgroup>
<col width="150" />
<col width="*" />
</colgroup>
<tr>
<td colspan="2">
<a id="general" name="general"></a>
<strong><% gettext General %></strong>
</td>
</tr>
<tr>
<td class="small"><% gettext Mode suffix=: %></td>
<td><% site.select mode %></td>
</tr>
<tr>
<td class="small"><% gettext Title suffix=: %></td>
<td><% site.input title %></td>
</tr>
<tr>
<td class="small"><% gettext Tagline suffix=: %></td>
<td><% site.input tagline %></td>
</tr>
<tr>
<td class="small"><% gettext Paging suffix=: %></td>
<td><% site.input pageSize size="5" maxlength="2" %>
* Refactored code and skins in respect for comprehensive i18n * Refactored and unified remove() methods and calls for greater flexibility as well as reliability * Added option to remove all comments by a user to Comment.remove() method and $Comment#delete skin * Added global #listItemFlag skin as well as listItemFlag_macro() for rendering vertically written text of items in a list view (e.g. closed) * Fixed bug in gettext_macro() and ngettext_macro() causing incorrect whitespace * Refactored timezone and locale handling * Modified automatic translation of untitled links in HopObject.link_macro() * Added honeypot to login and registration forms * Fixed client-side JavaScript to be evaluated when login or registration form is submitted, not only when the submit button is clicked * Removed redundant filter expression from DB mapping of Membership.images collection * Added Membership.content collection * Changed terminology from open to running polls, thus renaming Polls.open_action() method and Polls.open collection * Moved a lot of CSS used in root or administration sections from Site#stylesheet to $Root#stylesheet skin * Added Root.updateDomains() method (most likely already obsolete) * Removed Root.processHref() method (only necessary for very advanced setup) and obsolete comments * Fixed Root.xgettext() method to correctly read UTF-8 encoded data * Fixed Site.deleted_macro() to return the date object for late formatting * Refactored Site.processHref() for more convenient custom domain name mapping * Renamed Skins.advanced_action() method to Skins.all_action() * Removed redundant filter from Stories.comments collection * Removed unnecessary filter from Story.comments collection
2010-01-10 14:40:36 +00:00
<% site.select pageMode %> <% gettext "per page" %></td>
</tr>
<tr>
<td class="small"><% gettext Comments suffix=: %></td>
<td><% site.checkbox commentMode %>
<label for="commentMode"><% gettext enabled %></label></td>
</tr>
<tr>
<td class="small"><% gettext Archive suffix=: %></td>
<td><% site.checkbox archiveMode %>
<label for="archiveMode"><% gettext enabled %></label></td>
</tr>
<tr>
<td class="small"><% gettext Language suffix=: %></td>
<td><% site.select locale %></td>
</tr>
<tr>
<td class="small"><% gettext "Time Zone" suffix=: %></td>
<td><% site.select timeZone %></td>
</tr>
<tr>
<td class="small"><% gettext "Long Date Format" suffix=: %></td>
<td><% site.select longDateFormat %></td>
</tr>
<tr>
<td class="small"><% gettext "Short Date Format" suffix=: %></td>
<td><% site.select shortDateFormat %></td>
</tr>
<tr>
<td class="small"><% gettext Notifications suffix=: %></td>
<td><% site.select notificationMode %></td>
</td>
</tr>
<tr>
<td class="small" valign="top"><% gettext "Callback Url" suffix=: %></td>
<td><% site.input callbackUrl %><br />
<% site.checkbox callbackMode %>
<label for="callbackMode"><% gettext enabled %><label></td>
</tr>
<tr>
<td colspan="2"><div class="listSeparator"> </div>
<a id="spamfilter" name="spamfilter"></a>
<strong><% gettext "Referrer Spam Filter" %></strong>
</td>
</tr>
<tr>
<td class="small" valign="top"><% gettext "Enter one filter {0}pattern{1} per
line to be applied on every URL in the referrer and backlink lists."
'<a href="http://en.wikipedia.org/wiki/Regular_expression">' </a> %></td>
<td valign="top"><% site.textarea spamfilter cols="30" rows="7" %></td>
</tr>
<tr>
<td></td>
<td><br />
<button type="submit" name="save" value="1"><% gettext Save %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</tr>
</table>
</form>