Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Yetanotherforum and C1

$
0
0
Hello!
Im trying to integrate yetanotherforum (Version 1.9.5) into my C1 Master Paged CMS (Version 3.2).
I ve already been reading all Kind of Forum entries and also followed the guide: "http://docs.composite.net/FAQ/Developer?q=How+to+integrate+YetAnotherForum+with+C1%3F#comments"

my actual Status is, that i have now a site in C1, which Redirects to my forumsite.
<f:function name="Composite.Web.Response.Redirect" xmlns:f="http://www.composite.net/ns/function/1.0">
            <f:param name="Url" value="http://localhost:36859/forum/test.aspx" />
</f:function>
this "test.aspx" site has set the "App_data/PageTemplates/Common.master" as MasterPage, and calles the Forum.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" MasterPageFile="~/App_Data/PageTemplates/Common.master" Inherits="Forum_test" %>

<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>
<%@ Import Namespace="Composite" %>
<%@ Import Namespace="Composite.Core.Routing" %>
<%@ Import Namespace="Composite.Data" %>
<%@ Import Namespace="Composite.Core.Configuration" %>
<%@ Import Namespace="Composite.Data.Types" %>
<%@ Import Namespace="System.Globalization" %>
<asp:Content runat="server" ContentPlaceHolderID="phHead">
 
    <meta id="YafMetaScriptingLanguage" http-equiv="Content-Script-Type" runat="server" name="scriptlanguage" content="text/javascript" />
    <meta id="YafMetaStyles" http-equiv="Content-Style-Type" runat="server" name="styles" content="text/css" />
    <meta name="HandheldFriendly" content="true" />
    <meta name="viewport" content="width=device-width,user-scalable=yes" />
    <title></title>
</asp:Content>

<asp:Content runat="server" ContentPlaceHolderID="phContent">
   
    <form id="form1" runat="server" enctype="multipart/form-data">
        <YAF:Forum runat="server" ID="forum" BoardID="1"></YAF:Forum>
    </form>

</asp:Content>
as far as good.. it opens the master, and the Forum still works (except at Login and logout he referes to other page but this is another Story ),
BUT!
It doesnt Display any Content from any function like the "topLinks" or "NavigationMenu" or "Sitemap".

so i think there is any datacontext missing, and i read in many Forums, and then put the following code in the code_behind of my test.aspx
  IDisposable _threadManager;
    DataScope _scope;

    protected override void OnInit(EventArgs e)
    {
        _threadManager = ThreadDataManager.EnsureInitialize();
        _scope = new DataScope(new System.Globalization.CultureInfo("de-AT"));
        
        IEnumerable<IPage> pages = DataFacade.GetData<IPage>();
        IPage currentPage = pages.First(i => i.Title == "Forum");
        //using (DataConnection connection = new DataConnection())
        //{
        //    connection.Update<IPage>(currentPage);
        //    connection.
        //}


       // Response.Write(currentPage.Title.ToString());

        base.OnInit(e);
    }

    protected override void OnUnload(EventArgs e)
    {
        _scope.Dispose();
        _threadManager.Dispose();

        base.OnUnload(e);
 }
   
   
this changed it a Little, because now one function is already working and Displays data, but this function only uses global data from the site! my toplinks, Navigation, sitemap, and footerlinks are still not working, and i figured out they are all using the "GetSitemapXml" function, and this Needs a "currentPage" set.

in Firefox i also get this error:
Error: The parameter is Guid.Empty Parameter name: pageId
C1 Function: Composite.Community.Extranet.LoginStatus
Error details:
One or more errors occurred.
Failed to execute function with local name 'SitemapXml'
The parameter is Guid.Empty Parameter name: pageId
so i suppose the Problem is, that there is no current C1 Page (IPage) set. and because of this the functions dont get data.
How can i solve this?
can i set a c1 page in my external aspx-page? or are there any other ways to solve this?
i would be thankful for every tip which helps me to finish the Integration :)

which will be Long way, cause its only begin :) i also Need integrate the Extranet with this Forum :) which will be next challenge :)

Kind regards

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>