* {@inheritDoc}
*/
@Override
- public String format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public String format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
if (parameters.isEmpty()) {
return webInterface.getL10n().getString(String.valueOf(data));
}
int parameterIndex = 0;
while (parameters.containsKey(String.valueOf(parameterIndex))) {
Object value = parameters.get(String.valueOf(parameterIndex));
- if (((String) value).startsWith("=")) {
- value = ((String) value).substring(1);
- } else {
- value = templateContext.get((String) value);
- }
parameterValues.add(value);
++parameterIndex;
}
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
return String.valueOf(data).replaceAll("[^a-zA-Z0-9-]", "_");
}
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
Image image = null;
if (data instanceof String) {
image = core.getImage((String) data, false);
if (image == null) {
return null;
}
- String imageClass = parameters.get("class");
+ String imageClass = String.valueOf(parameters.get("class"));
int maxWidth = Numbers.safeParseInteger(parameters.get("max-width"), Integer.MAX_VALUE);
int maxHeight = Numbers.safeParseInteger(parameters.get("max-height"), Integer.MAX_VALUE);
String mode = String.valueOf(parameters.get("mode"));
- String title = parameters.get("title");
- if ((title != null) && title.startsWith("=")) {
- title = String.valueOf(templateContext.get(title.substring(1)));
- }
+ String title = String.valueOf(parameters.get("title"));
TemplateContext linkTemplateContext = templateContextFactory.createTemplateContext();
linkTemplateContext.set("class", imageClass);
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
StringBuilder javascriptString = new StringBuilder();
javascriptString.append('"');
for (char c : String.valueOf(data).toCharArray()) {
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
String text = String.valueOf(data);
- int length = Numbers.safeParseInteger(parameters.get("length"), Numbers.safeParseInteger(templateContext.get(parameters.get("length")), -1));
- int cutOffLength = Numbers.safeParseInteger(parameters.get("cut-off-length"), Numbers.safeParseInteger(templateContext.get(parameters.get("cut-off-length")), length));
- String soneKey = parameters.get("sone");
- if (soneKey == null) {
- soneKey = "sone";
- }
- Sone sone = (Sone) templateContext.get(soneKey);
- if (sone == null) {
- sone = core.getSone(soneKey, false);
+ int length = Numbers.safeParseInteger(parameters.get("length"), Numbers.safeParseInteger(templateContext.get(String.valueOf(parameters.get("length"))), -1));
+ int cutOffLength = Numbers.safeParseInteger(parameters.get("cut-off-length"), Numbers.safeParseInteger(templateContext.get(String.valueOf(parameters.get("cut-off-length"))), length));
+ Object sone = parameters.get("sone");
+ if (sone instanceof String) {
+ sone = core.getSone((String) sone, false);
}
FreenetRequest request = (FreenetRequest) templateContext.get("request");
- SoneTextParserContext context = new SoneTextParserContext(request, sone);
+ SoneTextParserContext context = new SoneTextParserContext(request, (Sone) sone);
StringWriter parsedTextWriter = new StringWriter();
try {
Iterable<Part> parts = soneTextParser.parse(context, new StringReader(text));
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
@SuppressWarnings("unchecked")
List<PostReply> allReplies = (List<PostReply>) data;
Map<Post, Set<Sone>> postSones = new HashMap<Post, Set<Sone>>();
/**
* This filter expects a {@link FreenetRequest} as input and outputs a
* {@link URI} that is modified by the parameters. The name of the parameter is
- * handed in as “name”, the value may either be stored in “value”, or in a
- * template variable whose key is stored in “key”.
+ * handed in as “name”, the new value is stored in “value”.
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
FreenetRequest request = (FreenetRequest) data;
- String name = parameters.get("name");
- String nameKey = parameters.get("nameKey");
- if (nameKey != null) {
- name = String.valueOf(templateContext.get(nameKey));
- }
- String key = parameters.get("key");
- String value = null;
- if (key != null) {
- value = String.valueOf(templateContext.get(key));
- }
- if (value == null) {
- value = parameters.get("value");
- }
- if (value == null) {
- return request.getUri();
- }
+ String name = String.valueOf(parameters.get("name"));
+ String value = String.valueOf(parameters.get("value"));
Map<String, String> values = new HashMap<String, String>();
Collection<String> parameterNames = request.getHttpRequest().getParameterNames();
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
- String startString = parameters.get("start");
- String lengthString = parameters.get("length");
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
+ String startString = String.valueOf(parameters.get("start"));
+ String lengthString = String.valueOf(parameters.get("length"));
int start = 0;
try {
start = Integer.parseInt(startString);
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
if (!(data instanceof Collection<?>)) {
return data;
}
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
if (data instanceof Long) {
if ((Long) data == 0) {
return l10nHandler.getString(unknownKey);
String description = request.getHttpRequest().getParam("description").trim();
image.setTitle(title).setDescription(TextFilter.filter(request.getHttpRequest().getHeader("host"), description));
webInterface.getCore().touchConfiguration();
- return createSuccessJsonObject().put("imageId", image.getId()).put("title", image.getTitle()).put("description", image.getDescription()).put("parsedDescription", (String) parserFilter.format(new TemplateContext(), image.getDescription(), new MapBuilder<String, String>().put("sone", image.getSone().getId()).get()));
+ return createSuccessJsonObject().put("imageId", image.getId()).put("title", image.getTitle()).put("description", image.getDescription()).put("parsedDescription", (String) parserFilter.format(new TemplateContext(), image.getDescription(), new MapBuilder<String, Object>().put("sone", image.getSone()).get()));
}
}
<p>Sone – The Freenet Social Network Plugin, Version <% version|html>, © 2010–2012 by David ‘Bombe’ Roden.</p>
<p>
- <%= Page.About.Flattr.Description|l10n|html|replace needle="{link}" replacement='<a href="/?_CHECKED_HTTP_=https://www.flattr.com/" title="Flattr Homepage" target="_blank">'|replace needle="{/link}" replacement='</a>'>
+ <%= Page.About.Flattr.Description|l10n|html|replace needle=="{link}" replacement=='<a href="/?_CHECKED_HTTP_=https://www.flattr.com/" title="Flattr Homepage" target="_blank">'|replace needle=="{/link}" replacement=='</a>'>
</p>
<h2><%= Page.About.Homepage.Title|l10n|html></h2>
<p>
- <%= Page.About.Homepage.Description|l10n|html|replace needle="{link}" replacement='<a href="/USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/49/">'|replace needle="{/link}" replacement='</a>'>
+ <%= Page.About.Homepage.Description|l10n|html|replace needle=="{link}" replacement=='<a href="/USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/49/">'|replace needle=="{/link}" replacement=='</a>'>
</p>
<h2><%= Page.About.License.Title|l10n|html></h2>
<h1><%= Page.Bookmarks.Page.Title|l10n|html></h1>
<div id="posts">
- <%= page|store key=pageParameter>
- <%include include/pagination.html>
+ <%include include/pagination.html pageParameter==page>
<%foreach posts post>
<%include include/viewPost.html>
<%/foreach>
- <%include include/pagination.html>
+ <%include include/pagination.html pageParameter==page>
<%if postsNotLoaded>
- <p><%= Page.Bookmarks.Text.PostsNotLoaded|l10n|html|replace needle='{link}' replacement='<a href="unbookmark.html?post=allNotLoaded">'|replace needle='{/link}' replacement='</a>'></p>
+ <p><%= Page.Bookmarks.Text.PostsNotLoaded|l10n|html|replace needle=='{link}' replacement=='<a href="unbookmark.html?post=allNotLoaded">'|replace needle=='{/link}' replacement=='</a>'></p>
<%elseif posts.empty>
<p><%= Page.Bookmarks.Text.NoBookmarks|l10n|html></p>
<%/if>
<h1><%= Page.DeleteAlbum.Page.Title|l10n|html></h1>
- <p><%= Page.DeleteAlbum.Text.AlbumWillBeGone|l10n|replace needle="{title}" replacementKey=album.title|html></p>
+ <p><%= Page.DeleteAlbum.Text.AlbumWillBeGone|l10n|replace needle=="{title}" replacementKey==album.title|html></p>
<form method="post">
<input type="hidden" name="formPassword" value="<% formPassword|html>" />
<h1><%= Page.DeleteImage.Page.Title|l10n|html></h1>
- <p><%= Page.DeleteImage.Text.ImageWillBeGone|l10n|replace needle="{image}" replacementKey=image.title|replace needle="{album}" replacementKey=image.album.title|html></p>
+ <p><%= Page.DeleteImage.Text.ImageWillBeGone|l10n|replace needle=="{image}" replacement=image.title|replace needle=="{album}" replacement=image.album.title|html></p>
<form method="post">
<input type="hidden" name="formPassword" value="<% formPassword|html>" />
<%include include/head.html>
- <h1><%= Page.DeleteSone.Page.Title|l10n|replace needle="{sone}" replacementKey=currentSone.name|html></h1>
+ <h1><%= Page.DeleteSone.Page.Title|l10n|replace needle=="{sone}" replacement=currentSone.name|html></h1>
<p><%= Page.DeleteSone.Page.Description|l10n|html></p>
<%foreach currentSone.allImages image>
<li>
<input type="radio" name="avatar-id" value="<%image.id|html>"<%if avatar-id|match key=image.id> checked="checked"<%/if>/>
- <div class="post-avatar"><% image|image-link max-width=48 max-height=48 mode=enlarge title==image.title></div>
+ <div class="post-avatar"><% image|image-link max-width==48 max-height==48 mode==enlarge title=image.title></div>
</li>
<%/foreach>
</ul>
<h2><%= Page.EditProfile.Fields.AddField.Title|l10n|html></h2>
<%if duplicateFieldName>
- <p><%= Page.EditProfile.Error.DuplicateFieldName|l10n|replace needle="{fieldName}" replacementKey="fieldName"|html></p>
+ <p><%= Page.EditProfile.Error.DuplicateFieldName|l10n|replace needle=="{fieldName}" replacement=fieldName|html></p>
<%/if>
<div id="new-field">
</script>
<%/if>
- <h1 class="backlink"><%= Page.ImageBrowser.Album.Title|l10n|replace needle='{album}' replacementKey=album.title|html></h1>
+ <h1 class="backlink"><%= Page.ImageBrowser.Album.Title|l10n|replace needle=='{album}' replacement=album.title|html></h1>
<div class="backlinks">
<div class="backlink"><a href="imageBrowser.html?mode=gallery"><%= Page.ImageBrowser.Link.All|l10n|html></a></div>
<select name="album-image">
<option disabled="disabled"><%= Page.ImageBrowser.Album.AlbumImage.Choose|l10n|html></option>
<%foreach album.images image>
- <option value="<% image.id|html>"<%if album.albumImage.id|match key=image.id> selected="selected"<%/if>><% image.title|html></option>
+ <option value="<% image.id|html>"<%if album.albumImage.id|match value=image.id> selected="selected"<%/if>><% image.title|html></option>
<%/foreach>
</select>
</div>
<%foreach album.images image>
<%first><h2><%= Page.ImageBrowser.Header.Images|l10n|html></h2><%/first>
- <%if loop.count|mod divisor=3><div class="image-row"><%/if>
+ <%if loop.count|mod divisor==3><div class="image-row"><%/if>
<div id="image-<% image.id|html>" class="image">
<div class="image-id hidden"><% image.id|html></div>
<div class="image-container">
- <a href="imageBrowser.html?image=<%image.id|html>"><% image|image-link max-width=250 max-height=250 mode=enlarge title==image.title></a>
+ <a href="imageBrowser.html?image=<%image.id|html>"><% image|image-link max-width==250 max-height==250 mode==enlarge title=image.title></a>
</div>
<div class="show-data">
<div class="image-title"><% image.title|html></div>
</form>
<%/if>
</div>
- <%= false|store key=endRow>
- <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
- <%last><%= true|store key=endRow><%/last>
+ <%= false|store key==endRow>
+ <%if loop.count|mod divisor==3 offset==1><%= true|store key==endRow><%/if>
+ <%last><%= true|store key==endRow><%/last>
<%if endRow></div><%/if>
<%/foreach>
<div class="single-image">
<%ifnull !image.key>
- <a href="/<%image.key|html>"><% image|image-link max-width=640 max-height=480></a>
+ <a href="/<%image.key|html>"><% image|image-link max-width==640 max-height==480></a>
<%else>
- <a href="imageBrowser.html?image=<%image.id|html>"><% image|image-link max-width=640 max-height=480></a>
+ <a href="imageBrowser.html?image=<%image.id|html>"><% image|image-link max-width==640 max-height==480></a>
<%/if>
</div>
<%else>
- <h1><%= Page.ImageBrowser.Sone.Title|l10n|replace needle='{sone}' replacementKey=sone.niceName|html></h1>
+ <h1><%= Page.ImageBrowser.Sone.Title|l10n|replace needle=='{sone}' replacement=sone.niceName|html></h1>
<div class="backlinks">
<div class="backlink"><a href="imageBrowser.html?mode=gallery"><%= Page.ImageBrowser.Link.All|l10n|html></a></div>
<%ifnull album.albumImage>
<img src="images/unknown-image-0.png" width="333" height="250" alt="<% album.title|html> (<%album.sone.niceName|html>)" title="<% album.title|html> (<%album.sone.niceName|html>)" style="position: relative; top: 0px; left: -41px;" />
<%else><!-- TODO -->
- <% album.albumImage|image-link max-width=250 max-height=250 mode=enlarge title==album.title>
+ <% album.albumImage|image-link max-width==250 max-height==250 mode==enlarge title=album.title>
<%/if>
</a>
</div>
<div class="album-description"><% album.description|parse sone=album.sone></div>
</div>
</div>
- <%= false|store key=endRow>
- <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
- <%last><%= true|store key=endRow><%/last>
+ <%= false|store key==endRow>
+ <%if loop.count|mod divisor==3 offset==1><%= true|store key==endRow><%/if>
+ <%last><%= true|store key==endRow><%/last>
<%if endRow>
</div>
<%include include/pagination.html pagination=albumPagination pageParameter=="page">
<%foreach albums album>
<%first><h2><%= Page.ImageBrowser.Header.Albums|l10n|html></h2><%/first>
- <%if loop.count|mod divisor=3><div class="album-row"><%/if>
+ <%if loop.count|mod divisor==3><div class="album-row"><%/if>
<div id="album-<% album.id|html>" class="album">
<div class="album-id hidden"><% album.id|html></div>
<div class="album-container">
<%ifnull album.albumImage>
<img src="images/unknown-image-0.png" width="333" height="250" alt="<% album.title|html>" title="<% album.title|html>" style="position: relative; top: 0px; left: -41px;" />
<%else><!-- TODO -->
- <% album.albumImage|image-link max-width=250 max-height=250 mode=enlarge title==album.title>
+ <% album.albumImage|image-link max-width==250 max-height==250 mode==enlarge title=album.title>
<%/if>
</a>
</div>
</form>
<%/if>
</div>
- <%= false|store key=endRow>
- <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
- <%last><%= true|store key=endRow><%/last>
+ <%= false|store key==endRow>
+ <%if loop.count|mod divisor==3 offset==1><%= true|store key==endRow><%/if>
+ <%last><%= true|store key==endRow><%/last>
<%if endRow></div><%/if>
<%/foreach>
<%if !identitiesWithoutSone.empty>
<h1><%= Page.Login.CreateSone.Title|l10n|html></h1>
- <p><%= View.CreateSone.Text.WotIdentityRequired|l10n|html|replace needle="{link}" replacement='<a href="/WebOfTrust/">'|replace needle="{/link}" replacement='</a>'></p>
+ <p><%= View.CreateSone.Text.WotIdentityRequired|l10n|html|replace needle=="{link}" replacement=='<a href="/WebOfTrust/">'|replace needle=="{/link}" replacement=='</a>'></p>
<form id="create-sone" action="createSone.html" method="post">
<input type="hidden" name="formPassword" value="<% formPassword|html>" />
</form>
<%else>
<%if !sones.empty>
- <p><%= View.CreateSone.Text.NoNonSoneIdentities|l10n|html|replace needle="{link}" replacement='<a href="/WebOfTrust/OwnIdentities">'|replace needle="{/link}" replacement="</a>"></p>
+ <p><%= View.CreateSone.Text.NoNonSoneIdentities|l10n|html|replace needle=="{link}" replacement=='<a href="/WebOfTrust/OwnIdentities">'|replace needle=="{/link}" replacement=="</a>"></p>
<%else>
- <p><%= View.CreateSone.Text.NoIdentities|l10n|html|replace needle="{link}" replacement='<a href="/WebOfTrust/OwnIdentities">'|replace needle="{/link}" replacement="</a>"></p>
+ <p><%= View.CreateSone.Text.NoIdentities|l10n|html|replace needle=="{link}" replacement=='<a href="/WebOfTrust/OwnIdentities">'|replace needle=="{/link}" replacement=="</a>"></p>
<%/if>
<%/if>
<a class="picture" href="index.html">
<%ifnull !currentSone>
<%ifnull !currentSone.profile.avatar>
- <%currentSone.profile.avatar|image-link max-width=80 max-height=80 mode=enlarge title="Profile Avatar">
+ <%currentSone.profile.avatar|image-link max-width==80 max-height==80 mode==enlarge title=="Profile Avatar">
<%else>
<img src="/WebOfTrust/GetIdenticon?identity=<% currentSone.id|html>&width=80&height=80" width="80" height="80" alt="Profile Avatar" />
<%/if>
</div>
<%ifnull ! currentSone>
<div id="home-sone">
- <% currentSone|store key=sone>
- <%include include/viewSone.html>
+ <%include include/viewSone.html sone=currentSone>
</div>
<%/if>
<form id="search" action="search.html" method="get">
<%if pagination.necessary>
<div class="navigation <%paginationName|html>">
- <div class="first"><%if ! pagination.first><a href="<% request|change nameKey=pageParameter value=0>">«</a><%else><span>«</span><%/if></div>
- <div class="previous"><%if ! pagination.first><a href="<% request|change nameKey=pageParameter key=pagination.previousPage>">‹</a><%else><span>‹</span><%/if></div>
+ <div class="first"><%if ! pagination.first><a href="<% request|change name=pageParameter value==0>">«</a><%else><span>«</span><%/if></div>
+ <div class="previous"><%if ! pagination.first><a href="<% request|change name=pageParameter value=pagination.previousPage>">‹</a><%else><span>‹</span><%/if></div>
<div class="current-page"><% pagination.pageNumber></div>
<div class="total-pages"><% pagination.pageCount></div>
- <div class="last"><%if ! pagination.last><a href="<% request|change nameKey=pageParameter key=pagination.lastPage>">»</a><%else><span>»</span><%/if></div>
- <div class="next"><%if ! pagination.last><a href="<% request|change nameKey=pageParameter key=pagination.nextPage>">›</a><%else><span>›</span><%/if></div>
+ <div class="last"><%if ! pagination.last><a href="<% request|change name=pageParameter value=pagination.lastPage>">»</a><%else><span>»</span><%/if></div>
+ <div class="next"><%if ! pagination.last><a href="<% request|change name=pageParameter value=pagination.nextPage>">›</a><%else><span>›</span><%/if></div>
</div>
<%/if>
<div class="sone-menu-id hidden"><%sone.id|html></div>
<div class="avatar menu-avatar">
<%ifnull !sone.profile.avatar>
- <%sone.profile.avatar|image-link max-width=64 max-height=64 mode=enlarge title==sone.niceName>
+ <%sone.profile.avatar|image-link max-width==64 max-height==64 mode==enlarge title=sone.niceName>
<%else>
<img src="/WebOfTrust/GetIdenticon?identity=<%sone.id|html>&width=64&height=64" width="64" height="64" alt="Avatar Image" />
<%/if>
<div class="inner-menu">
<div>
<a class="author" href="viewSone.html?sone=<%sone.id|html>"><%sone.niceName|html></a>
- (<%= View.Sone.Stats.Posts|l10n 0=sone.posts.size>, <%= View.Sone.Stats.Replies|l10n 0=sone.replies.size><%if ! sone.allImages.size|match value=0>, <%= View.Sone.Stats.Images|l10n 0=sone.allImages.size><%/if>)
+ (<%= View.Sone.Stats.Posts|l10n 0=sone.posts.size>, <%= View.Sone.Stats.Replies|l10n 0=sone.replies.size><%if ! sone.allImages.size|match value==0>, <%= View.Sone.Stats.Images|l10n 0=sone.allImages.size><%/if>)
</div>
<div><a href="/WebOfTrust/ShowIdentity?id=<%sone.id|html>">» <% =View.Post.WebOfTrustLink|l10n|html></a></div>
<%foreach sone.albums album>
<div class="avatar post-avatar" >
<%if post.loaded>
<%ifnull !post.sone.profile.avatar>
- <%post.sone.profile.avatar|image-link max-width=48 max-height=48 mode=enlarge title="Avatar Image">
+ <%post.sone.profile.avatar|image-link max-width==48 max-height==48 mode==enlarge title=="Avatar Image">
<%else>
<img src="/WebOfTrust/GetIdenticon?identity=<% post.sone.id|html>&width=48&height=48" width="48" height="48" alt="Avatar Image" />
<%/if>
<div class="recipient profile-link"><a href="viewSone.html?sone=<% post.recipient.id|html>"><% post.recipient.niceName|html></a></div>
<%/if>
<%/if>
- <% post.text|html|store key=originalText text=true>
- <% post.text|parse sone=post.sone|store key=parsedText text=true>
- <% post.text|parse sone=post.sone length=core.preferences.charactersPerPost cut-off-length=core.preferences.postCutOffLength|store key=shortText text=true>
+ <% post.text|html|store key==originalText text==true>
+ <% post.text|parse sone=post.sone|store key==parsedText text==true>
+ <% post.text|parse sone=post.sone length=core.preferences.charactersPerPost cut-off-length=core.preferences.postCutOffLength|store key==shortText text==true>
<div class="post-text raw-text<%if !raw> hidden<%/if>"><% originalText></div>
<div class="post-text text<%if raw> hidden<%/if><%if !shortText|match key=parsedText> hidden<%/if>"><% parsedText></div>
<div class="post-text short-text<%if raw> hidden<%/if><%if shortText|match key=parsedText> hidden<%/if>"><% shortText></div>
- <%if !shortText|match key=parsedText><%if !raw><a class="expand-post-text" href="viewPost.html?post=<% post.id|html>&raw=true"><%= View.Post.ShowMore|l10n|html></a><%/if><%/if>
- <%if !shortText|match key=parsedText><%if !raw><a class="shrink-post-text hidden"><%= View.Post.ShowLess|l10n|html></a><%/if><%/if>
+ <%if !shortText|match value=parsedText><%if !raw><a class="expand-post-text" href="viewPost.html?post=<% post.id|html>&raw=true"><%= View.Post.ShowMore|l10n|html></a><%/if><%/if>
+ <%if !shortText|match value=parsedText><%if !raw><a class="shrink-post-text hidden"><%= View.Post.ShowLess|l10n|html></a><%/if><%/if>
</div>
<div class="post-status-line status-line<%if !post.loaded> hidden<%/if>">
<div class="bookmarks">
</form>
</div>
<span class='separator'>·</span>
- <div class="time"><a href="viewPost.html?post=<% post.id|html>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
+ <div class="time"><a href="viewPost.html?post=<% post.id|html>"><% post.time|date format=="MMM d, yyyy, HH:mm:ss"></a></div>
<span class='separator'>·</span>
<div class="permalink permalink-post"><a href="post://<%post.id|html>">[<%= View.Post.Permalink|l10n|html>]</a></div>
<span class='separator'>·</span>
<div class="permalink permalink-author"><a href="sone://<%post.sone.id|html>">[<%= View.Post.PermalinkAuthor|l10n|html>]</a></div>
- <%if ! originalText|match key=parsedText>
+ <%if ! originalText|match value=parsedText>
<span class='separator'>·</span>
<div class="show-source"><a href="viewPost.html?post=<% post.id|html>&raw=<%if raw>false<%else>true<%/if>"><%= View.Post.ShowSource|l10n|html></a></div>
<%/if>
- <div class="likes<%if post.likes.size|match value=0> hidden<%/if>">
+ <div class="likes<%if post.likes.size|match value==0> hidden<%/if>">
<span class='separator'>·</span>
<span title="<% post.likes.soneNames|html>">↑<span class="like-count"><% post.likes.size></span></span>
</div>
<%include include/soneMenu.html class=="sone-reply-menu" sone=reply.sone>
<div class="avatar reply-avatar">
<%ifnull !reply.sone.profile.avatar>
- <% reply.sone.profile.avatar|image-link max-width=36 max-height=36 mode=enlarge title="Avatar Image">
+ <% reply.sone.profile.avatar|image-link max-width==36 max-height==36 mode==enlarge title=="Avatar Image">
<%else>
<img src="/WebOfTrust/GetIdenticon?identity=<% reply.sone.id|html>&width=36&height=36" width="36" height="36" alt="Avatar Image" />
<%/if>
<div class="inner-part">
<div>
<div class="author profile-link"><a href="viewSone.html?sone=<% reply.sone.id|html>"><% reply.sone.niceName|html></a></div>
- <% reply.text|html|store key=originalText text=true>
- <% reply.text|parse sone=reply.sone|store key=parsedText text=true>
- <% reply.text|parse sone=reply.sone length=core.preferences.charactersPerPost cut-off-length=core.preferences.postCutOffLength|store key=shortText text=true>
+ <% reply.text|html|store key==originalText text==true>
+ <% reply.text|parse sone=reply.sone|store key==parsedText text==true>
+ <% reply.text|parse sone=reply.sone length=core.preferences.charactersPerPost cut-off-length=core.preferences.postCutOffLength|store key==shortText text==true>
<div class="reply-text raw-text<%if !raw> hidden<%/if>"><% originalText></div>
<div class="reply-text text<%if raw> hidden<%/if><%if !shortText|match key=parsedText> hidden<%/if>"><% parsedText></div>
<div class="reply-text short-text<%if raw> hidden<%/if><%if shortText|match key=parsedText> hidden<%/if>"><% shortText></div>
- <%if !shortText|match key=parsedText><%if !raw><a class="expand-reply-text" href="viewPost.html?post=<% reply.post.id|html>&raw=true"><%= View.Post.ShowMore|l10n|html></a><%/if><%/if>
- <%if !shortText|match key=parsedText><%if !raw><a class="shrink-reply-text hidden"><%= View.Post.ShowLess|l10n|html></a><%/if><%/if>
+ <%if !shortText|match value=parsedText><%if !raw><a class="expand-reply-text" href="viewPost.html?post=<% reply.post.id|html>&raw=true"><%= View.Post.ShowMore|l10n|html></a><%/if><%/if>
+ <%if !shortText|match value=parsedText><%if !raw><a class="shrink-reply-text hidden"><%= View.Post.ShowLess|l10n|html></a><%/if><%/if>
</div>
<div class="reply-status-line status-line">
- <div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
+ <div class="time"><% reply.time|date format=="MMM d, yyyy, HH:mm:ss"></div>
<span class='separator'>·</span>
<div class="permalink permalink-author"><a href="sone://<%reply.sone.id|html>">[<%= View.Post.PermalinkAuthor|l10n|html>]</a></div>
- <%if ! originalText|match key=parsedText>
+ <%if ! originalText|match value=parsedText>
<span class='separator'>·</span>
<div class="show-reply-source"><a href="viewPost.html?post=<% post.id|html>&raw=<%if raw>false<%else>true<%/if>"><%= View.Post.ShowSource|l10n|html></a></div>
<%/if>
- <div class="likes<%if reply.likes.size|match value=0> hidden<%/if>">
+ <div class="likes<%if reply.likes.size|match value==0> hidden<%/if>">
<span class='separator'>·</span>
<span title="<% reply.likes.soneNames|html>">↑<span class="like-count"><% reply.likes.size></span></span>
</div>
<div class="download-marker" title="<%= View.Sone.Status.Downloading|l10n|html>">⬊</div>
<div class="insert-marker" title="<%= View.Sone.Status.Inserting|l10n|html>">⬈</div>
<div class="idle-marker" title="<%= View.Sone.Status.Idle|l10n|html>">✔</div>
- <div class="last-update"><%= View.Sone.Label.LastUpdate|l10n|html> <span class="time" title="<% sone.time|unknown|date format="MMM d, yyyy, HH:mm:ss">"><%sone.lastUpdatedText|html></span></div>
+ <div class="last-update"><%= View.Sone.Label.LastUpdate|l10n|html> <span class="time" title="<% sone.time|unknown|date format=="MMM d, yyyy, HH:mm:ss">"><%sone.lastUpdatedText|html></span></div>
<div>
<div class="profile-link"><a href="viewSone.html?sone=<% sone.id|html>" title="<% sone.requestUri|html>"><% sone.niceName|html></a></div>
- <div class="sone-stats">(<%= View.Sone.Stats.Posts|l10n 0=sone.posts.size>, <%= View.Sone.Stats.Replies|l10n 0=sone.replies.size><%if ! sone.allImages.size|match value=0>, <%= View.Sone.Stats.Images|l10n 0=sone.allImages.size><%/if>)</div>
+ <div class="sone-stats">(<%= View.Sone.Stats.Posts|l10n 0=sone.posts.size>, <%= View.Sone.Stats.Replies|l10n 0=sone.replies.size><%if ! sone.allImages.size|match value==0>, <%= View.Sone.Stats.Images|l10n 0=sone.allImages.size><%/if>)</div>
</div>
- <div class="short-request-uri"><% sone.requestUri|substring start=4 length=43|html></div>
+ <div class="short-request-uri"><% sone.requestUri|substring start==4 length==43|html></div>
<div class="hidden"><% sone.blacklisted></div>
<%if sone.local>
<form class="lock<%if sone.locked> hidden<%/if>" action="lockSone.html" method="post">
<%include include/updateStatus.html>
<div id="posts">
- <%= page|store key=pageParameter>
- <%include include/pagination.html paginationName==pagination-index>
+ <%include include/pagination.html pageParameter==page paginationName==pagination-index>
<%foreach pagination.items post>
<%include include/viewPost.html>
<%foreachelse>
<div><%= Page.Index.PostList.Text.NoPostYet|l10n|html></div>
<%/foreach>
- <%include include/pagination.html>
+ <%include include/pagination.html pageParameter==page>
</div>
<%include include/tail.html>
<h1><%= Page.Invalid.Page.Title|l10n|html></h1>
<%foreach messages message>
- <%if message|substring start=0 length=1|match value='!'>
- <p class="error"><% message|substring start=1|parse></p>
+ <%if message|substring start==0 length==1|match value=='!'>
+ <p class="error"><% message|substring start==1|parse></p>
<%else>
<p><% message|parse></p>
<%/if>
<%foreachelse>
- <p><%= Page.Invalid.Text|l10n|html|replace needle="{link}" replacement='<a href="index.html">'|replace needle="{/link}" replacement='</a>'></p>
+ <p><%= Page.Invalid.Text|l10n|html|replace needle=="{link}" replacement=='<a href="index.html">'|replace needle=="{/link}" replacement=='</a>'></p>
<%/foreach>
<%include include/tail.html>
<div>
<%= Page.KnownSones.Label.Sort|l10n|html>
<select name="sort">
- <option value="name"<%if sort|match value="name"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.Name|l10n|html></option>
- <option value="activity"<%if sort|match value="activity"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.LastActivity|l10n|html></option>
- <option value="posts"<%if sort|match value="posts"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.Posts|l10n|html></option>
- <option value="images"<%if sort|match value="images"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.Images|l10n|html></option>
+ <option value="name"<%if sort|match value=="name"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.Name|l10n|html></option>
+ <option value="activity"<%if sort|match value=="activity"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.LastActivity|l10n|html></option>
+ <option value="posts"<%if sort|match value=="posts"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.Posts|l10n|html></option>
+ <option value="images"<%if sort|match value=="images"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.Images|l10n|html></option>
</select>
<select name="order">
- <option value="asc"<%if order|match value="asc"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Order.Ascending|l10n|html></option>
- <option value="desc"<%if order|match value="desc"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Order.Descending|l10n|html></option>
+ <option value="asc"<%if order|match value=="asc"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Order.Ascending|l10n|html></option>
+ <option value="desc"<%if order|match value=="desc"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Order.Descending|l10n|html></option>
</select>
</div>
<%ifnull !currentSone>
<select name="filter">
<option value="none"></option>
<%ifnull !currentSone>
- <option value="followed"<%if filter|match value="followed"> selected="selected"<%/if>><%= Page.KnownSones.Filter.Followed|l10n|html></option>
- <option value="not-followed"<%if filter|match value="not-followed"> selected="selected"<%/if>><%= Page.KnownSones.Filter.NotFollowed|l10n|html></option>
+ <option value="followed"<%if filter|match value=="followed"> selected="selected"<%/if>><%= Page.KnownSones.Filter.Followed|l10n|html></option>
+ <option value="not-followed"<%if filter|match value=="not-followed"> selected="selected"<%/if>><%= Page.KnownSones.Filter.NotFollowed|l10n|html></option>
<%/if>
- <option value="new"<%if filter|match value="new"> selected="selected"<%/if>><%= Page.KnownSones.Filter.New|l10n|html></option>
- <option value="not-new"<%if filter|match value="not-new"> selected="selected"<%/if>><%= Page.KnownSones.Filter.NotNew|l10n|html></option>
+ <option value="new"<%if filter|match value=="new"> selected="selected"<%/if>><%= Page.KnownSones.Filter.New|l10n|html></option>
+ <option value="not-new"<%if filter|match value=="not-new"> selected="selected"<%/if>><%= Page.KnownSones.Filter.NotNew|l10n|html></option>
</select>
</div>
<%/if>
<%/if>
<div id="known-sones">
- <%= page|store key=pageParameter>
- <%include include/pagination.html>
+ <%include include/pagination.html pageParameter==page>
<%foreach pagination.items sone>
<%include include/viewSone.html>
<%foreachelse>
<div><%= Page.KnownSones.Text.NoKnownSones|l10n|html></div>
<%/foreach>
- <%include include/pagination.html>
+ <%include include/pagination.html pageParameter==page>
</div>
<%include include/tail.html>
<%include include/updateStatus.html>
<div id="posts">
- <%= page|store key=pageParameter>
- <%include include/pagination.html paginationName==pagination-index>
+ <%include include/pagination.html pageParameter==page paginationName==pagination-index>
<%foreach pagination.items post>
<%include include/viewPost.html>
<%foreachelse>
<div><%= Page.New.NothingNew|l10n|html></div>
<%/foreach>
- <%include include/pagination.html>
+ <%include include/pagination.html pageParameter==page>
</div>
<%include include/tail.html>
-<div class="text"><%= Notification.NewVersion.Text|l10n|replace needle="{version}" replacementKey=latestVersion|replace needle="{edition}" replacementKey=latestEdition|parse sone="nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI"></div>
+<div class="text"><%= Notification.NewVersion.Text|l10n|replace needle=="{version}" replacement=latestVersion|replace needle=="{edition}" replacement=latestEdition|parse sone=="nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI"></div>
-<%if soneStatus|match value="inserting">
+<%if soneStatus|match value=="inserting">
Your Sone <a href="viewSone.html?sone=<%insertSone.id|html>"><%insertSone.niceName|html></a> is now being inserted.
-<%elseif soneStatus|match value="inserted">
+<%elseif soneStatus|match value=="inserted">
Your Sone <a href="viewSone.html?sone=<%insertSone.id|html>"><%insertSone.niceName|html></a> has been inserted in <%= Notification.SoneInsert.Duration|l10n 0=insertDuration>.
-<%elseif soneStatus|match value="insert-aborted">
+<%elseif soneStatus|match value=="insert-aborted">
Inserting your Sone <a href="viewSone.html?sone=<%insertSone.id|html>"><%insertSone.niceName|html></a> has failed.
<%/if>
\ No newline at end of file
<div class="text">
<%= Page.WotPluginMissing.Text.WotRequired|l10n|html>
- <%= Page.WotPluginMissing.Text.LoadPlugin|l10n|html|replace needle="{link}" replacement='<a href="/plugins/">'|replace needle="{/link}" replacement='</a>'>
+ <%= Page.WotPluginMissing.Text.LoadPlugin|l10n|html|replace needle=="{link}" replacement=='<a href="/plugins/">'|replace needle=="{/link}" replacement=='</a>'>
</div>
<h2><%= Page.Options.Section.SoneSpecificOptions.Title|l10n|html></h2>
<%ifnull currentSone>
- <p><%= Page.Options.Section.SoneSpecificOptions.NotLoggedIn|l10n|html|replace needle="{link}" replacement='<a href="login.html">'|replace needle="{/link}" replacement='</a>'></p>
+ <p><%= Page.Options.Section.SoneSpecificOptions.NotLoggedIn|l10n|html|replace needle=="{link}" replacement=='<a href="login.html">'|replace needle=="{/link}" replacement=='</a>'></p>
<%else>
<p><%= Page.Options.Section.SoneSpecificOptions.LoggedIn|l10n|html></p>
<%/if>
<h2><%= Page.Options.Section.AvatarOptions.Title|l10n|html></h2>
<p><%= Page.Options.Option.ShowAvatars.Description|l10n|html></p>
-
+
<ul>
<li>
- <input type="radio" name="show-custom-avatars" value="NEVER"<%if show-custom-avatars|match value=NEVER> checked="checked"<%/if>/>
+ <input type="radio" name="show-custom-avatars" value="NEVER"<%if show-custom-avatars|match value==NEVER> checked="checked"<%/if>/>
<%=Page.Options.Option.ShowAvatars.Never.Description|l10n|html>
</li>
<li>
- <input type="radio" name="show-custom-avatars" value="FOLLOWED"<%if show-custom-avatars|match value=FOLLOWED> checked="checked"<%/if>/>
+ <input type="radio" name="show-custom-avatars" value="FOLLOWED"<%if show-custom-avatars|match value==FOLLOWED> checked="checked"<%/if>/>
<%=Page.Options.Option.ShowAvatars.Followed.Description|l10n|html>
</li>
<li>
- <input type="radio" name="show-custom-avatars" value="MANUALLY_TRUSTED"<%if show-custom-avatars|match value=MANUALLY_TRUSTED> checked="checked"<%/if>/>
+ <input type="radio" name="show-custom-avatars" value="MANUALLY_TRUSTED"<%if show-custom-avatars|match value==MANUALLY_TRUSTED> checked="checked"<%/if>/>
<%=Page.Options.Option.ShowAvatars.ManuallyTrusted.Description|l10n|html>
</li>
<li>
- <input type="radio" name="show-custom-avatars" value="TRUSTED"<%if show-custom-avatars|match value=TRUSTED> checked="checked"<%/if>/>
+ <input type="radio" name="show-custom-avatars" value="TRUSTED"<%if show-custom-avatars|match value==TRUSTED> checked="checked"<%/if>/>
<%=Page.Options.Option.ShowAvatars.Trusted.Description|l10n|html>
</li>
<li>
- <input type="radio" name="show-custom-avatars" value="ALWAYS"<%if show-custom-avatars|match value=ALWAYS> checked="checked"<%/if>/>
+ <input type="radio" name="show-custom-avatars" value="ALWAYS"<%if show-custom-avatars|match value==ALWAYS> checked="checked"<%/if>/>
<%=Page.Options.Option.ShowAvatars.Always.Description|l10n|html>
</li>
</ul>
<p><input type="checkbox" name="fcp-interface-active"<%if fcp-interface-active> checked="checked"<%/if> /> <%= Page.Options.Option.FcpInterfaceActive.Description|l10n|html></p>
<p>
- <%= Page.Options.Option.FcpFullAccessRequired.Description|l10n|html|replace needle="{link}" replacement='<a href="/config/fcp">'|replace needle="{/link}" replacement='</a>'>
+ <%= Page.Options.Option.FcpFullAccessRequired.Description|l10n|html|replace needle=="{link}" replacement=='<a href="/config/fcp">'|replace needle=="{/link}" replacement=='</a>'>
<select name="fcp-full-access-required">
- <option value="0"<%if fcp-full-access-required|match value="0"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.No|l10n|html></option>
- <option value="1"<%if fcp-full-access-required|match value="1"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.Writing|l10n|html></option>
- <option value="2"<%if fcp-full-access-required|match value="2"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.Always|l10n|html></option>
+ <option value="0"<%if fcp-full-access-required|match value=="0"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.No|l10n|html></option>
+ <option value="1"<%if fcp-full-access-required|match value=="1"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.Writing|l10n|html></option>
+ <option value="2"<%if fcp-full-access-required|match value=="2"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.Always|l10n|html></option>
</select>
</p>
<h2><%= Page.Options.Section.Cleaning.Title|l10n|html></h2>
- <p><%= Page.Options.Option.ClearOnNextRestart.Description|l10n|html|replace needle="{strong}" replacement="<strong>"|replace needle="{/strong}" replacement="</strong>"></p>
+ <p><%= Page.Options.Option.ClearOnNextRestart.Description|l10n|html|replace needle=="{strong}" replacement=="<strong>"|replace needle=="{/strong}" replacement=="</strong>"></p>
<p><select name="clear-on-next-restart"><option disabled="disabled"><%= WebInterface.SelectBox.Choose|l10n|html></option><option value="true"<%if clear-on-next-restart> selected="selected"<%/if>><%= WebInterface.SelectBox.Yes|l10n|html></option><option value="false"<%if ! clear-on-next-restart> selected="selected"<%/if>><%= WebInterface.SelectBox.No|l10n|html></option></select>
- <p><%= Page.Options.Option.ReallyClearOnNextRestart.Description|l10n|html|replace needle="{strong}" replacement="<strong>"|replace needle="{/strong}" replacement="</strong>"></p>
+ <p><%= Page.Options.Option.ReallyClearOnNextRestart.Description|l10n|html|replace needle=="{strong}" replacement=="<strong>"|replace needle=="{/strong}" replacement=="</strong>"></p>
<p><select name="really-clear-on-next-restart"><option disabled="disabled"><%= WebInterface.SelectBox.Choose|l10n|html></option><option value="true"<%if really-clear-on-next-restart> selected="selected"<%/if>><%= WebInterface.SelectBox.Yes|l10n|html></option><option value="false"<%if ! really-clear-on-next-restart> selected="selected"<%/if>><%= WebInterface.SelectBox.No|l10n|html></option></select>
<p><button type="submit"><%= Page.Options.Button.Save|l10n|html></button></p>
<p><%= Page.ViewPost.Text.UnknownPost|l10n|html></p>
<%else>
- <h1><%= Page.ViewPost.Page.Title|l10n|replace needle="{sone}" replacementKey=post.sone.niceName|html></h1>
+ <h1><%= Page.ViewPost.Page.Title|l10n|replace needle=="{sone}" replacement=post.sone.niceName|html></h1>
<%include include/viewPost.html>
<%/if>
<h1><%= Page.ViewSone.Page.TitleWithoutSone|l10n|html></h1>
<p>
- <%= Page.ViewSone.NoSone.Description|l10n|replace needle="{sone}" replacementKey=soneId|html>
+ <%= Page.ViewSone.NoSone.Description|l10n|replace needle=="{sone}" replacement=soneId|html>
<a href="/WebOfTrust/ShowIdentity?id=<% sone.id|html>"><%= Page.ViewSone.Profile.Name.WoTLink|l10n|html></a>
</p>
<%/if>
<%/if>
- <h1><%= Page.ViewSone.PostList.Title|l10n|replace needle="{sone}" replacementKey=sone.niceName|html></h1>
+ <h1><%= Page.ViewSone.PostList.Title|l10n|replace needle=="{sone}" replacement=sone.niceName|html></h1>
<%foreach posts post>
<%first>
<%foreach repliedPosts post>
<%first>
- <h2><%= Page.ViewSone.Replies.Title|l10n|html|replace needle="{sone}" replacementKey=sone.niceName></h2>
+ <h2><%= Page.ViewSone.Replies.Title|l10n|html|replace needle=="{sone}" replacement=sone.niceName></h2>
<div id="replied-posts">
<%include include/pagination.html pagination=repliedPostPagination pageParameter==repliedPostPage paginationName==reply-navigation>
<%/first>