DotnetKicks on CommunityServer.org [in 24 seconds]

Published Monday, December 31, 2007 1:10 AM

i didn't do this the right way i didn't go through documentation or consult with forums, i just wanted to do this the quick and easy way, what i do is i keep a sepparate theme for my blog sepparate from other bloggers so i can change whatever i like without hurting anyone's blogs

so what i really did is i edited to theme pages to show the dotnetkicks button

first the post.aspx page

<csblog:weblogpostdata Property="FormattedBody" IncrementViewCount="true" 
    runat="server" />       
    <p>&nbsp;</p>
<%
   1: Response.Write(String.Format
   2:  ("<a href=\"http://www.dotnetkicks.com/kick/?url=http://{0}\">" +
   3:     "<img src=\"http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://{0}\" border=\"0\" /></a>"
   4: , "aspxwizard.net" + CurrentWeblogPost.ViewPostURL));
%>

i went scanning for the tag that would render the body of the post and then added the raw <%%> block with a response.write that would display the URL, and it just worked :D

 

then i wanted to display the same button on the postlist.aspx ,and i did the same thing i looked for the tag that would render the body and added it like this

<CSBlog:WeblogPostData Property="FormattedBody" runat="server" />
 
<script language="javascript">
   1:  
   2:     var link = 'http://aspxwizard.net<CSBlog:WeblogPostData Property="ViewPostURL" runat="server" />';
   3:     document.write ('<p>&nbsp;</p><a href="http://www.dotnetkicks.com/kick/?url=' + link + '"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=' + link + '" border="0" /></a>')
</script>

 

this time i didn't know how to obtain the currentweblogpost instance so i introduced this post still rugged, but works fine and it took me 24 seconds :D

if u manage to do a better solution refer to this post URL and i'll create a track back for u and implement ur method :D

 

Update : this would also work for any other community button on community server blogs just user a different HTML like DIGG's code instead of dotnetkicks code

 

Filed under: ,

Comments

# DotNetKicks.com said on Monday, December 31, 2007 1:12 AM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Leave a Comment

(required) 
(required) 
(optional)
(required)