Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: token replacement for topic review when replying #1178

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Dnn.CommunityForums/config/templates/ReplyEditor.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -73,53 +73,53 @@
<table width="100%" style="background-color:#fff;border-top:solid 1px #cdcdcd;" cellspacing="0" cellpadding="4">
[TOPIC]
<tr>
<td valign="top" class="[POSTINFOCSS]" height="100">[POSTINFO]<br />[SPACER:1:125]</td>
<td valign="top" class="[POSTINFOCSS]" height="100">[DCF:TEMPLATE-PROFILEINFO]<br />[SPACER:1:125]</td>
<td valign="top" class="[POSTREPLYCSS]" width="100%">
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td class="afsubrow"><a name="[POSTID]"></a>[POSTDATE]</td>
<td class="afsubrow"><a name="[FORUMPOST:POSTID]"></a>[FORUMPOST:DATECREATED]</td>
<td class="afsubrow" align=right valign=top>

</td>
</tr>
<tr>
<td colspan="2" class="afpostbody">[AF:CONTROL:POLL][BODY]</td>
<td colspan="2" class="afpostbody">[AF:CONTROL:POLL][FORUMPOST:BODY]</td>
</tr>
<tr>
<td colspan="2" class="afpostattach">[ATTACHMENTS]</td>
</tr>
<tr>
<td colspan="2" class="afpostsig">[SIGNATURE]</td>
<td colspan="2" class="afpostsig">[FORUMAUTHOR:SIGNATURE]</td>
</tr>
<tr>
<td colspan="2" class="afposteditdate" align="right">[MODEDITDATE]</td>
<td colspan="2" class="afposteditdate" align="right">[FORUMPOST:MODEDITDATE]</td>
</tr>
</table>
</td>
</tr>
[/TOPIC]
[REPLIES]
<tr>
<td valign="top" class="[POSTINFOCSS]" height="100">[POSTINFO]<br />[SPACER:1:125]</td>
<td valign="top" class="[POSTINFOCSS]" height="100">[DCF:TEMPLATE-PROFILEINFO]<br />[SPACER:1:125]</td>
<td valign="top" class="[POSTREPLYCSS]" width="100%">
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td class="afsubrow"><a name="[POSTID]"></a>[POSTDATE]</td>
<td class="afsubrow"><a name="[FORUMPOST:POSTID]"></a>[FORUMPOST:DATECREATED]</td>
<td class="afsubrow" align="right">

</td>
</tr>
<tr>
<td colspan="2" class="afpostbody">[BODY]</td>
<td colspan="2" class="afpostbody">[FORUMPOST:BODY]</td>
</tr>
<tr>
<td colspan="2" class="afpostattach">[ATTACHMENTS]</td>
</tr>
<tr>
<td colspan="2" class="afpostsig">[SIGNATURE]</td>
<td colspan="2" class="afpostsig">[FORUMAUTHOR:SIGNATURE]</td>
</tr>
<tr>
<td colspan="2" class="afposteditdate" align="right">[MODEDITDATE]</td>
<td colspan="2" class="afposteditdate" align="right">[FORUMPOST:MODEDITDATE]</td>
</tr>
</table>
</td>
Expand Down
6 changes: 6 additions & 0 deletions Dnn.CommunityForums/controls/af_post.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,12 @@ private void PrepareReply()
this.ctlForm.EditorMode = Modules.ActiveForums.Controls.SubmitForm.EditorModes.Reply;

string template = TemplateCache.GetCachedTemplate(this.ForumModuleId, "ReplyEditor", this.fi.FeatureSettings.ReplyFormId);

#region "Backward compatilbility -- remove in v10.00.00"
template = DotNetNuke.Modules.ActiveForums.Services.Tokens.TokenReplacer.MapLegacyAuthorTokenSynonyms(new StringBuilder(template), this.PortalSettings, this.MainSettings, this.ForumUser.UserInfo?.Profile?.PreferredLocale).ToString();
template = DotNetNuke.Modules.ActiveForums.Services.Tokens.TokenReplacer.MapLegacyPostTokenSynonyms(new StringBuilder(template), this.PortalSettings, this.ForumUser.UserInfo?.Profile?.PreferredLocale).ToString();
#endregion "Backward compatilbility -- remove in v10.00.00"

if (this.isEdit)
{
template = template.Replace("[RESX:ReplyToTopic]", "[RESX:EditingExistingReply]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,53 +73,53 @@
<table width="100%" style="background-color:#fff;border-top:solid 1px #cdcdcd;" cellspacing="0" cellpadding="4">
[TOPIC]
<tr>
<td valign="top" class="[POSTINFOCSS]" height="100">[POSTINFO]<br />[SPACER:1:125]</td>
<td valign="top" class="[POSTINFOCSS]" height="100">[DCF:TEMPLATE-PROFILEINFO]<br />[SPACER:1:125]</td>
<td valign="top" class="[POSTREPLYCSS]" width="100%">
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td class="afsubrow"><a name="[POSTID]"></a>[POSTDATE]</td>
<td class="afsubrow"><a name="[FORUMPOST:POSTID]"></a>[FORUMPOST:DATECREATED]</td>
<td class="afsubrow" align=right valign=top>

</td>
</tr>
<tr>
<td colspan="2" class="afpostbody">[AF:CONTROL:POLL][BODY]</td>
<td colspan="2" class="afpostbody">[AF:CONTROL:POLL][FORUMPOST:BODY]</td>
</tr>
<tr>
<td colspan="2" class="afpostattach">[ATTACHMENTS]</td>
</tr>
<tr>
<td colspan="2" class="afpostsig">[SIGNATURE]</td>
<td colspan="2" class="afpostsig">[FORUMAUTHOR:SIGNATURE]</td>
</tr>
<tr>
<td colspan="2" class="afposteditdate" align="right">[MODEDITDATE]</td>
<td colspan="2" class="afposteditdate" align="right">[FORUMPOST:MODEDITDATE]</td>
</tr>
</table>
</td>
</tr>
[/TOPIC]
[REPLIES]
<tr>
<td valign="top" class="[POSTINFOCSS]" height="100">[POSTINFO]<br />[SPACER:1:125]</td>
<td valign="top" class="[POSTINFOCSS]" height="100">[DCF:TEMPLATE-PROFILEINFO]<br />[SPACER:1:125]</td>
<td valign="top" class="[POSTREPLYCSS]" width="100%">
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td class="afsubrow"><a name="[POSTID]"></a>[POSTDATE]</td>
<td class="afsubrow"><a name="[FORUMPOST:POSTID]"></a>[FORUMPOST:DATECREATED]</td>
<td class="afsubrow" align="right">

</td>
</tr>
<tr>
<td colspan="2" class="afpostbody">[BODY]</td>
<td colspan="2" class="afpostbody">[FORUMPOST:BODY]</td>
</tr>
<tr>
<td colspan="2" class="afpostattach">[ATTACHMENTS]</td>
</tr>
<tr>
<td colspan="2" class="afpostsig">[SIGNATURE]</td>
<td colspan="2" class="afpostsig">[FORUMAUTHOR:SIGNATURE]</td>
</tr>
<tr>
<td colspan="2" class="afposteditdate" align="right">[MODEDITDATE]</td>
<td colspan="2" class="afposteditdate" align="right">[FORUMPOST:MODEDITDATE]</td>
</tr>
</table>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@


<div class="dcf-topic-info bg-light px-3 pb-2 mb-2 mb-md-0">
[POSTINFO]
[DCF:TEMPLATE-PROFILEINFO]
</div>

<div class="dcf-topic-content px-3">
Expand Down Expand Up @@ -111,7 +111,7 @@
<div class="d-flex flex-wrap">

<div class="dcf-topic-info bg-light px-3 pb-2 mb-2 mb-md-0">
[POSTINFO]
[DCF:TEMPLATE-PROFILEINFO]
</div>

<div class="dcf-topic-content px-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<div class="dcf-cols">
<div class="dcf-col-25">
<div class="dcf-topic-info">
[POSTINFO]
[DCF:TEMPLATE-PROFILEINFO]
</div>
</div>
<div class="dcf-col-75">
Expand Down Expand Up @@ -118,7 +118,7 @@
<div class="dcf-cols">
<div class="dcf-col-25">
<div class="dcf-topic-info">
[POSTINFO]
[DCF:TEMPLATE-PROFILEINFO]
</div>
</div>
<div class="dcf-col-75">
Expand Down