| George J.'s profile“Daily Cycle”PhotosBlogLists | Help |
|
|
6/8/2009 FreeTextBoxWrapper for Community Server v2.1 & v2007 (Refresh)It has been a while, since I have posted something about Community Server. Although I have received quite a lot requests, about refreshing FreeTextboxWrapper for CS v2.1 and CS v2007 controls, to the latest version of FreeTextBox (v6.2.2), in order to work correctly with newer browsers (Safari, Chrome, IE7 & IE8). Well, here they are:
(Last update 15 Jun 2009)
del.icio.us Tags: Community Server, FreeTextBox 11/4/2007 Community Server and Google AdSenseNot many programs have managed to amaze me with their capabilities. Certainly Community Server is one. It is really a nice feeling to know, you can implement what you need on the platform you use. It all started when a site member asked me to provide the ability to host Google AdSense in his blog. The first thing came to my mind was to create new weblog skins in order to implement AdSense banner zones, but as more webloggers were sharing the same skins, it would only confuse them. Part of the service would be to allow each member to customize his ads zone; so except weblog skin creation, I would have to implement new pages for the control panel too. Not quite easy... Then I came up with the idea to implement a CSModule that would allow the display of an AdSense banner in weblogs posts. This idea did not seem wise at the beginning; the users would be able to use the CSModule all over the CS site and flood all posts with ads. Well, I could easy control the use of CSModule by requiring each member to belong to a certain security role I would assign. I haven't been a user of AdSense program, so I asked information about the program in order to implement the AdSense CSModule. I was under the impression, all I would have to implement was a BBCode tag that would include the user's AdSense program code, in order to display ads and credit his account. Learning about the program, I found out, all the customization of the AdSense banner was done through JavaScript code. I was not happy about it, because it would be a potential exploit, as the CSModule would render code a user would provide, inside <script> tags. In order to handle the JavaScript code inside AdSense tags, I used Community Server's build-in functions that strip all the tags from string variables. In order to be sure, all I have left is secure code, I also removed all the lf/cr sequences and split the string buffer using the ";" character; this trick produces an array of JavaScript code lines. It was easy to decide which lines are safe, as I could "approve" lines for rendering, that will include names of the Google AdSense program variables. While I was testing the new developed CSModule, I discovered that, an authorized member could include AdSense tag in a forum's post. It was not the way I wanted CSModule to be used. The CSModule mechanism provides a property that stores the type of CS application is executing CSModule each time, and I had to limit the use of CSModule to render the AdSense code only for the Weblog application. Completing this task, I deployed the assembly to the production server, and provided site members with instructions how to use the AdSense CSModule in their blogs. It was no more than two hours later, I got a message from a member, that he could not use the CSModule, because he would have his AdSense account suspended! There is a policy in Google AdSense program; a user can not display more than 3 AdSense banners in a webpage. I am not sure, if I had read this policy or not, but probably I just ignored it, as it would not help me to implement the CSModule. For sure, the CSModule was working, it was doing was it was designed to do. On each weblog page that renders a list of posts, the CSModule was rendering an AdSense banner for each post; that was definitely a violation of AdSense policy. I must admit, I thought I was completely busted that moment! I had doubts when I decided not to implement new skins for the weblogs and just go with the CSModule implementation. I thought my decision was just wrong. But again, one of my favorite features on Community Server, url re-writing, gave me a push to explore the problem a little more. Community Server is re-writing the url of each request; it has mechanisms that parse each request url, split the address part from query data, and transform them into a new url, using the data in siteurls.config. So, if I could find a way to get the name of the template the url re-writing mechanism was using to transform the request url, I could figure out in which page the CSModule was running and make a decision, to render or not, the AdSense banner. Half of the problem was to find the names of the templates I wanted the AdSense banner to be rendered. These were the pages that a weblog post would appear by its self. The second half of the implementation was to figure out which page had requested CSModule to render. My intention was to check the code Community Server was using to parse the requests, find some functions and use them with the request url, I would get through from CSContext object. I must admit, I spend about half an hour checking code, without having a solution for my task; I was not checking for the obvious: Most of the times all the information processed are stored inside the CSContext object that is created with each request. Why would not the CSContext object include the name of the transformation template? I suppose that something flashed over my head that moment! You probably guessed the answer; I was correct. There is a property in CSContext object that stores the name of the template! As for the implementation, I had to check if the name of the transformation template for the current url existed in the list of the templates I had already found. Using AdSense CSModule is easy, but there are several lines of code the tag requires each time in order to render the AdSense banner. By creating a TextPart that holds the AdSense tag code, and using the TextPart’s tag, adding an AdSense banner to each weblog post is fast! I would post the AdSense CSModule assembly now, but I am packing for Barcelona, to attend TechEd Developers 2007. I have little time to catch the plane to Barcelona and no time to create a package for the AdSense CSModule assembly. If you would like to see the CSModule in action, check this blog (it is Greek, so you probably won’t be able to read it, but you follow the links for each post, and see the AdSense banner on the bottom of each post). I suppose by this time next week, I will have the AdSense CSModule available for everyone to download. 10/4/2007 Community Server 2007.1A few days ago Telligent announced the release of Community Server 2007.1! Although Telligent had announced the "beta" of Community Server 2007 SP3, considering that the changes included in this release was *much* more than just a service pack release. While the release includes many bug fixes, there are also some significant enhancements, particularly around performance and scaling. Upgrade from Community Server 2007 Installers, Demo, and SDK (for new sites) Read the original Telligent announcement. 8/30/2007 Community Server 2007 SP3 (Pre-Release)Telligent announced a BETA release of the third service pack to Community Server 2007. In addtion to links to download one of the pre-release packages, Tellignet has included the list of enhancements and fixes in this service pack below. Service Pack 3 Update (use for upgrades) Installers, Demo, and SDK (all include SP3 BETA) Read the original Telligent announcement Theme Extravaganza ResultsWell, the results are out! If you want to see the themes that won the contest, you should visit the page with the announcements of the winners. Also, you should visit the file library with the participants' submissions, for great themes. A newer version of my submission, The Dark theme, can found here. 8/4/2007 Time to vote for the best Community Server theme!The dead line for submitting themes in Community Server Theme Extravaganza has passed and it's time to vote for the best enty! The voting will be open till August 10th. The submissions are categorized in three tracks:
Personally, I have submitted only a theme in the second track - The Dark theme. It's a pitty I did had enough time to complete a second theme and submit another entry. Good luck to everyone! 7/26/2007 Road Map Update for CS2007 and CS2008Today Telligent published the road map update for CS v2007 and CS v2008. Their plan is to release a CS v2008 beta in the fall and offially release CS v2008 in Q1 2008. In between we can expect one or two extra service packs for CS v2007. The new CS version will have new functionality towards the social networking side of the application. Read the official announcement: Roadmap for Community Server 2008 6/13/2007 Community Server 2007 SP2Today Telligent has released the second service pack to Community Server 2007. You can download it from the store/download center. Note: The download contains the SP1 as well, so if you did not apply the first service pack, you can skip it and move directly to SP2. You can read about, the new features as well as the fixes this release includes in the official Telligent Announcement. 5/13/2007 Community Server MVPs' Cinnabar CSModule Package for CS 2007If you had used CS MVPs Beryl CSModule package, then you will be pleased to know that they have a new package for CS 2007. Keyvan Nayyeri announced the new package which is codenamed Cinnabar, contains ten CSModules and one spam rule for Community Server 2007.
Cinnabar is available on CS MVPs site file gallery. The file consists of binary file as well as source code, configuration samples, data samples and Readme files. 5/7/2007 CS 2007 - Greek (el-gr) Language PackIf you wish to get the Greek language pack for Community Server 2007 you can download it now in my personal web site, or the official CommunityServer.org Downloads section. 5/5/2007 Community Server roadmap revealedScott Watermasysk revealed the roadmap for the upcoming versions of Community Server:
5/1/2007 Community Server 2007 Theming ExtravaganzaScott Watermasysk announced the first public theming contest for Community Server, "Community Server 2007 Theming Extravaganza" (see the link for details, rules, etc). Telligent is looking for the best exportable and custom theme you can create. In each category the first place prize will be a MacBook! There will also be XBox 360 Elites and Amazon gift cards for second and third prizes. Finally, all valid entrants will receive a free Community Server Personal license. Entries are due May 28th 2007, so you better get moving! If you are looking for help in getting started theming 2007, please check out the wiki and ask questions on the forums. We are working on some more documentation but in the mean time, just fire away with any theming questions (although please do NOT ask tech questions on this thread). Let the games begin! 4/17/2007 Community Server v2007 RTWToday Telligent announced the immediate availability of Community Server 2007 – the best version of Community Server yet! There are a number of new improvements, but by far the largest is the new theme system “Chameleon”. Chameleon allows people to change the look-and-feel of Community Server without requiring a degree in Computer Science! There are simple to use what-you-see-is-what-you-get tools to assist you in changing colors, graphics, fonts, and more. Also sharing themes has never been easier – Community Server uses a single-file for exporting or importing all of its theme settings, which means you can quickly share your themes with your friends. You can download and buy Community Server from http://get.communityserver.org CodeHighlight CSModule for CS v2007 RTWIf you found CodeHighlight CSModule for CS v2.1 SP2 useful, and you wish to use it in Community Server 2007, now it has RTW, you can download it here. For more information about the module you can read here. 4/14/2007 CodeHighlight CSModule for CS v2.1 SP2
In order to install the CodeHilight CSModule under Community Server - this CSModule works only with CS v2.1 SP2: Step 1:
<add name="ForumSourceCode" type="CommunityServer.Discussions.Components.SourceCodeModule, CommunityServer.Discussions" />
with the lines
<add name="ForumSourceCode" type="CommunityServer.Discussions.Components.SourceCodeModule, CommunityServer.Discussions" enabled="false" />
<add name="SourceCode" type="CommunityServer.CodeHighlight.CodeHighlighter, CommunityServer.CodeHighlight" />
Step 2:
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="CommunityServer.CodeHighlight.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<CommunityServer.CodeHighlight.Properties.Settings>
<setting name="CodeWrapperHTML" serializeAs="String">
<value><pre style="overflow: scroll; background-color: #f2f2f2;">{0}</pre></value>
</setting>
<setting name="UseLineNumbers" serializeAs="String">
<value>False</value>
</setting>
<setting name="NumberWrapperHTML" serializeAs="String">
<value><table border="0" cellpadding="0" cellspacing="0" style="background-color: #f2f2f2; border: solid 1px #e5e5e5; width: 100%;">
<tr style="vertical-align: top; line-height: normal;">
<td style="width: 40px; text-align: right;">
<pre style="font-family: courier new; font-size: 11px; color: gray; margin: 0px; padding: 2px; border-right: solid 1px #e7e7e7;">{0}</pre></td>
<td>
<pre style="overflow: scroll; margin:0px; padding: 2px; padding-left: 8px;">{1}</pre></td>
</tr>
</table></value>
</setting>
</CommunityServer.CodeHighlight.Properties.Settings>
</applicationSettings>
Customize your installation: Use of [code][/code] tags: In order to make the HTML rendering, the CSModule uses the Highlight library of Thomas Johansen and Christian Nordbakk. Download: CodeHighlight CSModule for CS v2.1 SP2 You are welcome to feedback, 4/11/2007 Community Server 2007, Release Candidate 1Yesterday, Telligent announced the release of Community Server 2007, Release Candidate 1. Rob Howard said that Telligent is still on track to release the final version of Community Server 2007 on April 16th. Download Community Server 2007, Release Candidate 1
Telligent is also offering a free copy of Professional Community Server for the best site that someone publishes using the Release Candidate (share your site here). 3/22/2007 Community Server 2007 Beta 2, available for downloadToday, Rob Howard announced the Beta 2 of the upcoming Community Server 2007. The release date for Community Server 2007 is scheduled for April 16th. The new binaries are available on communityserver.org:
Read more: Community Server 2007, Beta 2 3/19/2007 Poll control in Community Server v2.1Community Server has many nice controls. Poll control is not one of them. It is rather awkward in design and has a bug when displaying the vote one posted: Although it can be redesign to look better - this is how: Path: ~Themes/default/skins <%@ Control Language="C#" %>
<div align="center">
<div align="left" style="width:500">
<p align="left">
<asp:Label CssClass="forumName" id="Topic" runat="server" />
<br />
<asp:Label id="Description" Runat=server>Test</asp:Label>
<br />
<asp:dropdownlist id="VoteOptions" Runat="server" /> <asp:Button id="VoteButton" Runat="server" style="width:100px" />
</p>
<br />
<hr>
<p>
</asp:PlaceHolder Runat="server" id="Results">
<hr>
<asp:PlaceHolder id="VotedFor" runat="server" />
</p>
</div>
</div>
Modified: <%@ control language="C#" %>
<div align="center">
<div align="left" style="width: 500">
<p align="left">
<asp:label cssclass="forumName" id="Topic" runat="server" />
<br />
<asp:label id="Description" runat="server">Test</asp:label>
<br />
<asp:radiobuttonlist id="VoteOptions" runat="server" />
<br />
<asp:button id="VoteButton" runat="server" style="width: 100px" />
</p>
<br />
<hr>
<p>
</asp:placeholder runat="server" id="Results">
<hr>
<asp:placeholder id="VotedFor" runat="server" />
</p>
</div>
</div>
and the neccessary source code changes: //CommunityServerForums20.csproj
//Forums\Controls\PostDisplay\PollPost.cs
//Line 29:
//Originally:
#region Child Controls
//string skinFilename = "Skin-Poll.ascx";
PlaceHolder results;
Button voteButton;
PlaceHolder votedFor;
DropDownList voteOptions;
PollSummary pollSummary;
Label lblTopic;
Label lblDescription;
CSContext csContext = CSContext.Current;
int postID;
Post post;
bool enabled = false;
#endregion
//Modified:
#region Child Controls
//string skinFilename = "Skin-Poll.ascx";
PlaceHolder results;
Button voteButton;
PlaceHolder votedFor;
RadioButtonList voteOptions;
PollSummary pollSummary;
Label lblTopic;
Label lblDescription;
CSContext csContext = CSContext.Current;
int postID;
Post post;
bool enabled = false;
#endregion
//Line 124:
//Originally:
protected override void AttachChildControls()
{
results = FindControl("Results") as PlaceHolder;
lblTopic = FindControl("Topic") as Label;
lblDescription = FindControl("Description") as Label;
voteOptions = FindControl("VoteOptions") as DropDownList;
voteButton = FindControl("VoteButton") as Button;
votedFor = FindControl("VotedFor") as PlaceHolder;
InitializeChildControls();
}
//Modified:
protected override void AttachChildControls()
{
results = FindControl("Results") as PlaceHolder;
lblTopic = FindControl("Topic") as Label;
lblDescription = FindControl("Description") as Label;
voteOptions = FindControl("VoteOptions") as RadioButtonList;
voteButton = FindControl("VoteButton") as Button;
votedFor = FindControl("VotedFor") as PlaceHolder;
InitializeChildControls();
}
//Line 111:
//Originally:
if (pollSummary.HasVoted( csContext.User.UserID ))
{
// Display "<p/><b>You voted for: {0}.</b>"
//
votedFor.Controls.Add( new LiteralControl( string.Format( ResourceManager.GetString( "PostDisplay_PollPost_userChoiceText" ), pollSummary.GetUserVote( csContext.User.UserID )) ) );
Disable();
}
//Modified:
if (pollSummary.HasVoted( csContext.User.UserID ))
{
// Display "<p/><b>You voted for: {0}.</b>"
//
votedFor.Controls.Add( new LiteralControl( string.Format( ResourceManager.GetString( "PostDisplay_PollPost_userChoiceText" ), pollSummary.GetUserVote( csContext.User.UserID ).Answer ) ) );
Disable();
}
And this is the redesigned control: That's it, a better control to use! 2/16/2007 Community Server 2007 Beta 1, availiable for downloadRob Howard announced the availiability of Community Server 2007 first beta.
The original announcement is here. |
|
|