BlogSphere - Feature Request: Translation for Category label + Written By regression fix
While debugging Written By translation, noticed that Category : was not translated.
Added field Conf_Trans_Category to form BlogConfigTrans. Used this field in computed text on subform SubFormDisplayStory as follows:
8<---- code starts
REM {Setup HTML For First Line of Title Block};
REM {C. Brandlehner, 16 Oct 2004: modified GoogleIT, MailIT and PrintIT to replace quotes};
REM {L Berntrop, 2 Aug 2006 readded Written By translation};
dspStoryTitle := @ReplaceSubstring(StoryTitle;"\"";""");
PreLine1 := "<div class=\"StoryTitle\"><span style=\"float:left;\">";
ShowIT := "<script language=\"JavaScript\" type=\"text/javascript\">It('"+dspStoryTitle+"','"+ FullURL + "');</script> ";
TitleHTML := "<a href=\"d6plinks/"+permalink+"\" title=\"PermaLink : "+permalink+"\" target=\"_top\"><img alt=\"PermaLink\" src=\""+plink_Image+"\" border=\"0\"></a> "+StoryTitle+"</span><span style=\"float:right;\">"+ @Text(StoryDate; "D0T1") +"</span>";
PostLine1 := "</div>";
REM {Setup HTML For Second Line Of Title Block};
PreLine2 := @If(ShowAuthor="Yes" | ShowCategory="Yes";"<div class=\"StoryTitle\">";"");
AuthorHTML := "<span style=\"float:left;\">" + @GetProfileField("BlogConfigTrans";"Conf_Trans_WrittenBy") + " " + StoryAuthor + "</span>";
CategoryHTML := "<span style=\"float:right;\">" + @GetProfileField("BlogConfigTrans";"Conf_Trans_Category") + " " +StoryCategory + "</span>";
AuthorHTMLRSS := "<span style=\"float:left;\">Written By : <a href=\"" + ShortURL + "/RSS_StoriesByAuthor?Open&id="+ @Replace(StoryAuthor ;" ";"+")+"\"><script language=\"JavaScript\" type=\"text/javascript\">xmllink();</script>" + "</a> " + StoryAuthor + "</span>";
CategoryHTMLRSS := "<span style=\"float:right;\">Category : <a href=\"" + ShortURL + "/RSS_StoriesByCat?Open&id="+ @URLEncode("Domino"; StoryCategory) +"\"><script language=\"JavaScript\" type=\"text/javascript\">xmllink();</script></a> " +StoryCategory + "</span>";
ShowAuth := @If(ShowAuthor="Yes";@If(ShowAuthorRSS="Yes";AuthorHTMLRSS;AuthorHTML);"");
ShowCat := @If(ShowCategory="Yes";@If(ShowCategoryRSS="Yes";CategoryHTMLRSS;CategoryHTML);"");
PostLine2 := @If(ShowAuthor="Yes" | ShowCategory="Yes";"</div>";"");
REM {Set HTML For Third Line Of Title Block};
PreLine3 := @If(ShowLocation="Yes";"<div class=\"StoryTitle\">";"");
LocationHTML := "<span style=\"float:left;\">Location : " + StoryLocation + "</span>";
ShowLoc := @If(ShowLocation="No"; ""; LocationHTML);
PostLine3 := @If(ShowLocation="Yes";"</div>";"");
REM {Show Admins a Notes Link to open a doc in the Notes Client from the browser };
_NotesLink_Image := "/"+ @WebDbName + "/images/notes_blue.gif";
_NotesLink := "<a href=\"Notes:///"+@ReplaceSubstring(@ReplicaID;":";"") +"/Stories/"+@Text(@DocumentUniqueID)+"\" title=\"Notes-Link: "+Subject +"\"><img src=\""+ _NotesLink_Image +"\" border=\"0\" alt=\"Notes-Link\" height=\"16\" width=\"16\"></a> ";
_NL := @If(@IsMember("[BlogAdmin]";@UserRoles);_NotesLink;"");
HTML := PreLine1 + _NL + ShowIT + TitleHTML + PostLine1 +
PreLine2 + ShowAuth + ShowCat + PostLine2 +
PreLine3 + ShowLoc + PostLine3;
HTML
8<---- code ends
note that this code will also fix the regression previously fixed in 2 beta 6, although in this subform only
Taken Actions by OwnersDocuments