BlogSphere - Feature Request: Add Recent Comment Block.
Add Recent Comment Block.
I, customizing HotBlogs function, have mounted recent comment function.
Coz HotBlogs function use frequency to be low, customization simplicity.
The way:
1. I increased the number of displays of Hotblog Block to 20 on D6.SideBlocks Subform.
@Do(x1 := @DbColumn("Notes" : "NoCache"; ""; "HotBlogs"; 2);
x2 := @GetProfileField("BlogConfig";"Block_HotBlogs_Count");
x3 := @Subset(x1;20);
@If(x1 = "";"No Hot Blogs";x3)
2.I changed @formula of 2nd column on HotBlogs view.
numVal := 12;
strTextSource:=@Text(body);
@While(@Contains(strTextSource; "<");
leftStr := @Left(strTextSource;"<");
rightStr := @Right(strTextSource;">");
strTextSource := @Trim(leftStr + rightStr)
);
numLen := @Length(@Text(strTextSource));
strText := @If(numLen = 0; "(no comments...)" ;
numLen > numVal; @Left(strTextSource; numVal) + "...";
strTextSource);
HTML := "<span class=\"small\">" + @Text(Storydate;"D2S0")+" "+
"<a href=\""+HTTP_Referer+"\" >" +strText + "</a></span><br>";
HTML
Taken Actions by OwnersNo actions have been taken yet.Documents