Adding "Popular Tags" tag cloud to the home page

This post has 21 Replies | 4 Followers

Not Ranked
Posts 2
Points 70
bgraham Posted: Mon, Jul 24 2006 8:38 AM

I'd like to add the "Popular Tags" element to our site's home page.  I would probably only want the popular blog tags, but the popular forum tags may be useful as well (once our forums actually become popular).

I've tried inserting the tag cloud into a few controls that I thought could handle it, but to no avail.  Any help is truly appreciated.

Not Ranked
Posts 2
Points 70
bgraham replied on Mon, Jul 24 2006 8:49 AM

In the \web\themes\default\masters\Master.ascx add this line near the top (where all the other namespace registration is):

<%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %>

Then, add the following section (copied straight out of \web\themes\default\skins\blogs\skin-aggregatecolumn.ascx file which normally generates the tag cloud):

<div class="CommonSidebarArea">
 <h4 class="CommonSidebarHeader">
  <cs:ResourceControl ResourceName="PopularTags" runat="server" />
 </h4>
  <div class="CommonSidebarContent">
   <CS:TagCloud ApplicationType="weblog" TagCloudCssClasses="CommonTag6,CommonTag5,CommonTag4,CommonTag3,CommonTag2,CommonTag1" runat="server" id="TagCloud" MaximumNumberOfTags="25" ShowTagCounts="false" IgnoreFilterTags="true" CssClass="CommonSidebarTagCloud" />
  </div>
  <div class="CommonSidebarFooter">
   <a href="<%=SiteUrls.Instance().TagsHome %>"><cs:ResourceControl ResourceName="ViewAllTags" runat="server" /></a>
  </div>
</div>

As you can see, this one has a parameter of ApplicationType="weblog", meaning it pulls the popular tags for blog entries.  It can be changed to ApplicationType="forum" to pull the forum tags instead.  I don't think you can aggregate the two, but perhaps you can.

  • | Post Points: 65
Top 10 Contributor
Posts 3,424
Points 65,735
CS Developers
Ben Tiedt replied on Fri, Jul 28 2006 12:44 PM

Just to follow up, the CS:TagCloud control supports filtering by

1.  ApplicationType -- but just one.  Such as: forum, weblog, gallery, filegallery

2.  Groups -- this can be one or more GroupIDs, seperated by commas (this can be a group from any application)

** OR **

3.  Sections -- this can be one or more SectionIDs, seperated by commas (a section is a blog, forum, folder, or gallery)

Additionally, this control can be filtered by one or more tags (via the FilterByTags property... tags seperated by commas) -- when specified, only tags containing posts also including *all* of the FilterByTags will be displayed.

For individual blogs, galleries, and file folders, there are application-specific versions of the TagCloud control.  These controls automatically report on the *current* blog, gallery, or file folder.

Ben Tiedt's Blog

  • | Post Points: 35
Not Ranked
Posts 4
Points 80
leigo replied on Sat, Jul 29 2006 9:35 PM

I'm new to CS, but I love it already.

I was trying to make this work but...

1.  <%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %> is already in that file. Should I add it again?

2. Where (filename, exact location) do i add the next set of code?

  • | Post Points: 20
Top 10 Contributor
Posts 2,527
Points 28,845
MVPs
Partners
  1. No. You can only register a tag prefix once on a page.
  2. The previous post was referring to default.aspx. I can't tell you where to add it, because I don't know where you want it to show up. Trial and error is the way to go... Wink

Four Roads

  • | Post Points: 20
Not Ranked
Posts 4
Points 80
leigo replied on Sun, Jul 30 2006 1:12 AM

I'm really really new to the language too. So I've tried to copy and paste that code into random places in my default.aspx file. But I keep getting errors. Could anyone post a sample of where to place this? Thank you!

 

Also, is there something I should read to get to know the aspx language? Or at least, I think I'm needing to define a contentpart.

 

How about a way to see other people's default.aspx file when I visit their site? 

  • | Post Points: 20
Top 10 Contributor
Posts 3,424
Points 65,735
CS Developers
Ben Tiedt replied on Mon, Jul 31 2006 9:56 AM

 

1.  This mark-up requires CS2.1 -- are you using an earlier version of community server?  In CS2.1, the mark-up (without the tag registration) can be placed anywhere in the default.aspx page -- but placing it before or after any <div class="CommonSidebarArea">...</div> would be best.

2.  You should be able to get a book to help you learn ASP.NET at your local bookstore (or Amazon.com)

3.  Source code cannot be viewed by visiting a site using ASP.NET -- you will see the result of the code's execution.

Ben Tiedt's Blog

  • | Post Points: 20
Not Ranked
Posts 4
Points 80
leigo replied on Mon, Jul 31 2006 11:27 AM
Thank you for your great knowledge. I am on godaddy.com, so my version is still 2.0.Is there any way to update to 2.1 on godaddy? I am definately considering moving to aspnix.com server once my account is up at godaddy.
  • | Post Points: 20
Top 10 Contributor
Posts 3,424
Points 65,735
CS Developers
Ben Tiedt replied on Mon, Jul 31 2006 11:31 AM
If you have access to the CS files and database, you should be able to update using the web installer -- if not, you'll need to talk to godaddy.  If you didn't install CS yourself, my guess is that you don't have access to the database and CS files.

Ben Tiedt's Blog

  • | Post Points: 20
Not Ranked
Posts 4
Points 80
leigo replied on Mon, Jul 31 2006 8:19 PM
actually i do have access to them. Thanks to someone who posted the link to Web Explorer Lite. It actually works, and is very simple to set up (like 2 steps). Also FREE. So if you let godaddy install CS for you, you can see those files again with this. I will try updating my CS. Thanks again!
  • | Post Points: 20
Not Ranked
Posts 24
Points 540
diegov99 replied on Wed, Aug 16 2006 12:00 PM
I have a site with multiple users, multiple blogs, multiple galleries - how do I show a cumulative tag cloud? That is, with tags pointing to different people's blogs and pictures? Please let me know. Thank You.
Not Ranked
Posts 24
Points 540
diegov99 replied on Wed, Aug 16 2006 12:02 PM
Nevermind. I just realized that if you remove the ApplicationType (leave it blank) that you get all tags - is this correct? Thank You.
  • | Post Points: 20
Top 10 Contributor
Posts 3,424
Points 65,735
CS Developers
Ben Tiedt replied on Wed, Aug 16 2006 12:22 PM
Correct.  If you don't specify a filter, the TagCloud will show tags for the entire site.

Ben Tiedt's Blog

  • | Post Points: 5
Not Ranked
Posts 4
Points 35

Hi Leigo,

I also have a hosting account with GoDaddy and installed CS 2.0 using the Hosting Control Panel. However the installation creates a virtual directory which I am unable to access through FTP.

 In your post you mentioned that you used WebLite to be able to have access to the CS folders and files. How did you do that?

Would appreciate any help.

Stormwild
 

  • | Post Points: 20
Not Ranked
Posts 2
Points 40

Same here.  I have gotten to this point, trying to change the headerlogo on CS and having a GoDaddy hosting account with only a virtual directory, I have now installed WebExplorerLite.  It works.  But, I still cannot find the CS folder(s)/file(s) which would allow me to change the logo.  Any help would be appreciated.

 Thnx

  • | Post Points: 20
Page 1 of 2 (22 items) 1 2 Next > | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com