help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

ForumModule installation

 

After installing ForumModule into your template-project you will be able to create, deploy and administrate forums in your AxCMS.net based website.

The following steps are required to install the ForumModule to your project:

  1. Copy ForumModule files
  2. Launch needed SQL scripts
  3. Create ForumModule categories
  4. Add needed configuration strings to your .config files
  5. Configure your CmsSite.xml
  6. Add ForumModule menu items to your Management System TopMenu
  7. Add references to ForumModule dll's in your template project
  8. Add CSS for forum to your project
  9. Configure the MailTemplate for ForumModule subscription
  10. Start the AxCMS.Service if it isn't started yet

Step 1: Copy ForumModule files

Move the files from your ForumModule release directory to the following folders of your AxCMS.net - based project.

Keep in mind that the actual folder names in your project are likely to have different last part of name than  "_Sample".
For example, the folder from picture
"AxCMSweb_Sample" will be named "AxCMSweb_<your project name>" in your project and so on for other folders.

Step 2: Launch needed SQL scripts

The release folder DB/ Create contains scripts

  • CMS/ CMS.Init.sql
  • CMS/ CMS.Tables.sql
  • Live/ Live.Init.sql
  • Live/ Live.Tables.sql

Please run scripts from the CMS folder in MS database of your project
and scripts from Live folder in LS database of your project.

Step 3: Create ForumModule categories

  • Create Forum category under the SpecialPermissions for LS category in your MS system.
    It is important that it is located under SpecialPermissions for LS for forum rights to function property.
    Please write down ID of Forum category, it will be needed later when editing config files.
  • Under Forum category you can create sub forums you want to have on your site.
  • Under each sub forum create threads you want them to have.
  • After you're finished adding sub forums and threads, publish the Forum category

 

In the example to the right we have created a Forum category with sub forum named "Allgemeines" with some threads.

This is how it will look like in Live System later on:

 Step 4: Add needed configuration strings to your .config files

Live-System:

In <appSettings>:

The node to define boards for Forum. It is a category which must be created and published. Value should be the ID of Forum category you created in MS in Step 3

<add key="ForumBoardID" value="..."/>  

Make sure you set your smtp server address so forum module can send out mail to subscribers propertly

<add key="SmtpServer" value="smtp.yoursserver.com" />

The email address where mail should be sent to for new entries in forum

<add key="ForumEmail" value="name@company.com" />  

Standard address

<add key="SystemEmail" value="name@company.com" /> 

 

Management-System:

In <configSections>:

<section 
                name="ForumService"
                type="Axinom.AECMS.Gateway.GatewayConfiguration, AxCMS.BL"
/> 

In <appSettings>:

The same ID like in web.config in Live-system

<add key="ForumBoardID" value="..."/>  

In <configuration>:

Make sure to replace the "_Sample" in the URL with "_<YourProjectName>"

<ForumService type="WebService">
<Url>http://localhost/AxCMSPublishService_Sample/ForumWebService.asmx</Url>
<Timeout>30</Timeout>
<Username>Administrator</Username>
<Password>Administrator1</Password>
<UseWSE>true</UseWSE>
</ForumService>

 
Publish-Service:

Make sure that you have this string in your publish config file present and uncommented

<webServices>
    <soapServerProtocolFactory  type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</webServices>


Also, it is important that after enabling this string you set all <UseWSE> of all your services to "true".

Step 5: Configure your CmsSite.xml

Open the CmsSite.xml of your project and add the following strings there:

In <ElementTemplateDefinitions>

Define the dynamic element for ForumModule

<ElementTemplateDefinition axid="ForumControl" description="Forum"><Behaviour>Dynamic</Behaviour><IsCompiled>false</IsCompiled><File>DynamicControls/Forum/ForumControl.ascx</File><Description>Forum</Description><TagPrefix>ForumModule</TagPrefix><TagName>Forum</TagName><Namespace /><Editor>~/templates/DynamicControls/Forum/ForumControlEditor.ascx</Editor>
<Parameters>
<Parameter>ShownForum</Parameter>
<Parameter>SendMail</Parameter>
<Parameter>AnonymousUserID</Parameter>
</Parameters>
</ElementTemplateDefinition>

Then, insert this element into the <ElementsTemplates> of the placeholders you want to be able to add Forum Control to:

<PlaceholderDefinition axid="basePlaceholder" description="base placeholder">
<ContentRules>
. . .
</ContentRules>
<ElementTemplates>
. . .
<ElementTemplate axid="ForumControl" atLeast="0" atMost="10" />
. . .
</ElementTemplates>
. . .
</PlaceholderDefinition>

Step 6: Add ForumModule menu items to your Management System TopMenu

For the management of userrights and topics, add 2 hyperlinks to the  customizable control of TopMenu e.g. forumUserHyperLink and topicHyperLink.

As NavigateUrl for the forumUserHyperLink use

Extras/ForumUserOverview.aspx

As NavigateUrl for the topicHyperLink use

Extras/TopicOverview.aspx


If you need help customizing the top TopMenu, please refer to the following pages:

http://en.help.axcms.net/en_help_cms_dev_devel_topmenu.AxCMS?ActiveID=6061

http://en.help.axcms.net/en_help_cms_dev_devel_topmenu_step_by_step.AxCMS?ActiveID=6150

Step 7: Add references to ForumModule dll's in your template project

Add references to the ForumModule.BL.dll to these projects in your solution:

  • AxCMSTemplates_<YourProjectName>
  • Extras
  • <YourProjectName>.BL

Also, add reference to Microsoft.Web.Services3 to your Extras project
( If you don't have this reference, check if you have WSE3 installed )

Step 8: Add CSS for forum to your project

If needed, change colors etc in style sheet the way you like it.
Take the forum.css  and reference it in your base css file like this:

@import url("Forum.css");

or include it directly in your forum template.

Step 9: Configure the MailTemplate for ForumModule subscription

In Extras/ MailTemplates create a new MailTemplate to be used for sending notification mail to subscribers.

 Edit the mail template content to add message text like in this example:

        Hello {[FullName]}, 
        the topic you subscribed to
        {[UpdatedURL]}
        was updated
        {[MessageAuthor]}wrote:
        {[MessageText]}
         
        {[UploadedFiles]}
 
        Forum support team



You can edit this message as you want, but keep the braced {[macro]} tags inside the text so subscription mail processor will insert the personalized message parts inside the mailtemplate.

After saving the content, attach the MailTemplate for Forum category to the mail template.

Step 10: Start the AxCMS.Service if it isn't started yet

Go to the AxCMS.Service directory in your project and click register.bat

Then open the windows services manager either by going to Control Panel/ Administrative Tools/ Services
or by typing "Services.msc" in Windows Run and pressing Enter.

Find AxCMS_Service in the services list and make sure it's status is Started, if it's not, right-click it and select Start from context menu.