protected void DisplayTrends() { TrendsList trendsList = new TrendsCommand().GetTrends(); if (trendsList != null && trendsList.Count() > 0) { foreach (TrendItem trendItem in trendsList) { DisplayTrend(trendItem); } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["topic"] == null || Request.QueryString["topic"].Length == 0) { Query = ConfigService.GetConfig(ConfigKeys.THEINTERNETBUZZ_SEARCH_DEFAULT_QUERY, ""); } else { Query = Request.QueryString["topic"]; TrendsList trendsList = new TrendsCommand().GetTrends(); if (trendsList != null && trendsList.Count() > 0) { IsTrend = trendsList.IsTrend(Query); } if (!IsTrend) { TrendsList yearlyTrendsList = new YearlyTrendsCommand().GetTrends(); if (yearlyTrendsList != null && yearlyTrendsList.Count() > 0) { IsTrend = yearlyTrendsList.IsTrend(Query); } } } headHtml.Title = "The Internet Buzz | Topic | " + Query; headHtml.Description = "Facts, news, buzz and informations about " + Query + " from TheInternetBuzz, the real-time Internet Buzz engine."; headHtml.Keywords = Query; headHtml.RobotIndexing = IsTrend; titleHtml.Title = HttpUtility.HtmlEncode(Query); toolbarHtml.DefaultSearchValue = HttpUtility.HtmlEncode(Query); topicHtml.Query = Query; topicHtml.DisplayQuery = HttpUtility.HtmlEncode(Query); topicHtml.TrackSection = "topic"; topicHtml.TrackTopic = Query; explanationHtml.Query = Query; explanationHtml.DisplayQuery = HttpUtility.HtmlEncode(Query); explanationHtml.TrackerCategory = "topic"; explanationHtml.TrackerAction = "comment"; explanationHtml.TrackerLabel = Query; int pageMax = ConfigService.GetConfig(ConfigKeys.THEINTERNETBUZZ_SEARCH_COUNT_PER_PAGE_PER_PROVIDER, 8); tweetsResultsHtml.SearchCommand = new SearchCommand(SearchTypeEnum.Tweet, Query, 1, pageMax); tweetsResultsHtml.DisplayDate = true; tweetsResultsHtml.DisplaySource = false; tweetsResultsHtml.DisplayURL = true; tweetsResultsHtml.DisplayImageURL = true; tweetsResultsHtml.DisplayPagination = false; ; tweetsResultsHtml.TrackSection = "topic"; tweetsResultsHtml.TrackTopic = Query; //webResultsHtml.SearchCommand = new SearchCommand(SearchTypeEnum.Web, Query, 1, pageMax); //webResultsHtml.DisplayDate = false; //webResultsHtml.DisplaySource = true; //webResultsHtml.DisplayURL = true; //webResultsHtml.DisplayPagination = false; ; //webResultsHtml.TrackSection = "topic"; //webResultsHtml.TrackTopic = Query; //newsResultsHtml.SearchCommand = new SearchCommand(SearchTypeEnum.News, Query, 1, pageMax); //newsResultsHtml.DisplayDate = true; //newsResultsHtml.DisplaySource = true; //newsResultsHtml.DisplayPagination = false; ; //newsResultsHtml.TrackSection = "topic"; //newsResultsHtml.TrackTopic = Query; MP3Html.Query = Query; buzzListHtml.Title = "Buzzing Now"; buzzListHtml.MaximumWeight = 5; buzzListHtml.MimimumWeight = 5; buzzListHtml.TrendsCommand = new TrendsCommand(); trackerHtml.TrackerCategory = "topic"; trackerHtml.TrackerAction = "view"; trackerHtml.TrackerLabel = Query; videoHtml.VideoCommand = new VideoSearchCommand(Query); googleAd0Html.Visible = IsTrend; googleAd1Html.Visible = IsTrend; googleAd2Html.Visible = IsTrend; }