thebeloved
2009-11-11T10:04:58Z
I wonder if is possible to display in a page only the Active Discussion panel, for example to place it in an iframe on another portal or website.

I search the forum to find a solution, but any of the suggestion i found are useful, maybe because they refer to old version of YAF.

Any suggestion will be really appreciated. Thanks.
Gianni Mantellini
Napulevola Vice-CEO
http://www.napulevola.it/ 
Sponsor
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2009-11-11T10:11:34Z
RSS feed for Active Discussions?
thebeloved
2009-11-12T11:39:38Z
bbobb wrote:

RSS feed for Active Discussions?



Is there a possibility to retrieve the active discussions via RSS feed?
Gianni Mantellini
Napulevola Vice-CEO
http://www.napulevola.it/ 
herman_herman
2009-11-12T13:43:48Z
Yes.Just go to Active discussion page and Use the RSS Feed link.For example for this forum it is: http://forum.yetanotherf..._rsstopic.aspx?pg=active 
chriscoe71
2009-11-12T14:40:10Z
thebeloved wrote:

I wonder if is possible to display in a page only the Active Discussion panel, for example to place it in an iframe on another portal or website.

I search the forum to find a solution, but any of the suggestion i found are useful, maybe because they refer to old version of YAF.

Any suggestion will be really appreciated. Thanks.



Are you referring to the Active Discussions table on the main page (Latest Posts) or the Active Topics page, which can be reach by clicking on "Active Topics" in the top toolbar?
thebeloved
2009-11-14T06:43:01Z
chriscoe71 wrote:


Are you referring to the Active Discussions table on the main page (Latest Posts) or the Active Topics page, which can be reach by clicking on "Active Topics" in the top toolbar?



I'm referring to the Active Discussions table on main page. I tought to show only this table in another website to easily track the latest posts. I tried to see a bit the code to find what user control can do this, but unfortunately i'm not so much skilled about programming, and YAF is a large project.
Gianni Mantellini
Napulevola Vice-CEO
http://www.napulevola.it/ 
chriscoe71
2009-11-15T00:53:31Z
You could expose the data that is returned from the topic_latest stored procedure using a Web Service and then consume it on any site.

Because the user would not be authenticated on the other site, the example below has the guest account hardcoded so that only topics that a Guest can view will be returned.

Add this to YafWebService.asmx


      [WebMethod( Description = "Return Active Discussions Topics for Guest Users", EnableSession = false )]
   public DataTable GetActiveDiscussions(string token, int PageBoardID, int ActiveDiscussionsCount)
    {
        // validate token...
        if (token != YafContext.Current.BoardSettings.WebServiceToken)
        {
            throw new Exception("Invalid Secure Web Service Token: Operation Failed");
        }
        DataTable activeTopics = YAF.Classes.Data.DB.topic_latest(PageBoardID, ActiveDiscussionsCount, 1);

        return activeTopics;
    }


You could copy the code from the Controls/ForumActiveDiscussion.ascx and alter it to consume the data from the web service if you want the same look/feel.

Hope that helps.
thebeloved
2009-11-15T06:56:36Z
chriscoe71 wrote:

You could expose the data that is returned from the topic_latest stored procedure using a Web Service and then consume it on any site.

Because the user would not be authenticated on the other site, the example below has the guest account hardcoded so that only topics that a Guest can view will be returned.

Add this to YafWebService.asmx


      [WebMethod( Description = "Return Active Discussions Topics for Guest Users", EnableSession = false )]
   public DataTable GetActiveDiscussions(string token, int PageBoardID, int ActiveDiscussionsCount)
    {
        // validate token...
        if (token != YafContext.Current.BoardSettings.WebServiceToken)
        {
            throw new Exception("Invalid Secure Web Service Token: Operation Failed");
        }
        DataTable activeTopics = YAF.Classes.Data.DB.topic_latest(PageBoardID, ActiveDiscussionsCount, 1);

        return activeTopics;
    }


You could copy the code from the Controls/ForumActiveDiscussion.ascx and alter it to consume the data from the web service if you want the same look/feel.

Hope that helps.



Thanks in advance for Your help! I'll try it soon on my website. I'll let You know, ciao!
Gianni Mantellini
Napulevola Vice-CEO
http://www.napulevola.it/ 
herman_herman
2009-11-15T10:11:10Z
Hey thebeloved,
Nice to see a FS fan use YAF as his forum.Happy landings.
thebeloved
2009-11-17T05:42:20Z
herman_herman wrote:

Hey thebeloved,
Nice to see a FS fan use YAF as his forum.Happy landings.



Thanks herman_herman!

as we told: Blue Skies to all the YAF dev group for his great work!!! :-d


Gianni Mantellini
Napulevola Vice-CEO
http://www.napulevola.it/ 

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved