@@ -55,7 +55,7 @@ public class TopicsView : ForumBase
55
55
private bool isSubscribedForum ;
56
56
private bool useListActions ;
57
57
58
- public string MetaTemplate { get ; set ; } = "[META][TITLE][PORTAL:PORTALNAME] - [TAB:TITLE] - [FORUMGROUP:GROUPNAME] - [FORUM:FORUMNAME][/TITLE][DESCRIPTION][BODY ][/DESCRIPTION][KEYWORDS][VALUE][/KEYWORDS][/META]" ;
58
+ public string MetaTemplate { get ; set ; } = "[META][TITLE][PORTAL:PORTALNAME] - [TAB:TITLE] - [FORUMGROUP:GROUPNAME] - [FORUM:FORUMNAME][/TITLE][DESCRIPTION][FORUM:FORUMDESCRIPTION ][/DESCRIPTION][KEYWORDS][VALUE][/KEYWORDS][/META]" ;
59
59
60
60
public string MetaTitle { get ; set ; } = string . Empty ;
61
61
@@ -229,36 +229,6 @@ protected override void OnLoad(EventArgs e)
229
229
{
230
230
this . MetaTemplate = DotNetNuke . Modules . ActiveForums . Services . Tokens . TokenReplacer . RemoveObsoleteTokens ( new StringBuilder ( this . MetaTemplate ) ) . ToString ( ) ;
231
231
this . MetaTemplate = DotNetNuke . Modules . ActiveForums . Services . Tokens . TokenReplacer . ReplaceForumTokens ( new StringBuilder ( this . MetaTemplate ) , this . ForumInfo , this . PortalSettings , this . MainSettings , new Services . URLNavigator ( ) . NavigationManager ( ) , this . ForumUser , this . TabId , this . ForumUser . CurrentUserType , this . Request . Url , this . Request . RawUrl ) . ToString ( ) ;
232
- this . MetaTemplate = this . MetaTemplate . Replace ( "[TAGS]" , string . Empty ) ;
233
- if ( this . MetaTemplate . Contains ( "[TOPICSUBJECT:" ) )
234
- {
235
- string pattern = "(\\ [TOPICSUBJECT:(.+?)\\ ])" ;
236
- foreach ( Match m in RegexUtils . GetCachedRegex ( pattern , RegexOptions . Compiled & RegexOptions . IgnoreCase , 2 ) . Matches ( this . MetaTemplate ) )
237
- {
238
- this . MetaTemplate = this . MetaTemplate . Replace ( m . Value , string . Empty ) ;
239
- }
240
- }
241
-
242
- this . MetaTemplate = this . MetaTemplate . Replace ( "[TOPICSUBJECT]" , string . Empty ) ;
243
- if ( this . MetaTemplate . Contains ( "[BODY:" ) )
244
- {
245
- string pattern = "(\\ [BODY:(.+?)\\ ])" ;
246
- foreach ( Match m in RegexUtils . GetCachedRegex ( pattern , RegexOptions . Compiled & RegexOptions . IgnoreCase , 2 ) . Matches ( this . MetaTemplate ) )
247
- {
248
- int iLen = Convert . ToInt32 ( m . Groups [ 2 ] . Value ) ;
249
- if ( this . ForumInfo . ForumDesc . Length > iLen )
250
- {
251
- this . MetaTemplate = this . MetaTemplate . Replace ( m . Value , this . ForumInfo . ForumDesc . Substring ( 0 , iLen ) + "..." ) ;
252
- }
253
- else
254
- {
255
- this . MetaTemplate = this . MetaTemplate . Replace ( m . Value , this . ForumInfo . ForumDesc ) ;
256
- }
257
- }
258
- }
259
-
260
- this . MetaTemplate = this . MetaTemplate . Replace ( "[BODY]" , Utilities . StripHTMLTag ( this . ForumInfo . ForumDesc ) ) ;
261
-
262
232
this . MetaTitle = TemplateUtils . GetTemplateSection ( this . MetaTemplate , "[TITLE]" , "[/TITLE]" ) . Replace ( "[TITLE]" , string . Empty ) . Replace ( "[/TITLE]" , string . Empty ) ;
263
233
this . MetaTitle = this . MetaTitle . TruncateAtWord ( SEOConstants . MaxMetaTitleLength ) ;
264
234
this . MetaDescription = TemplateUtils . GetTemplateSection ( this . MetaTemplate , "[DESCRIPTION]" , "[/DESCRIPTION]" ) . Replace ( "[DESCRIPTION]" , string . Empty ) . Replace ( "[/DESCRIPTION]" , string . Empty ) ;
0 commit comments