├── yaf_dnn
├── YafDnnWhatsNew.ascx.cs
├── YetAnotherForum.NET.snk
├── YafDnnWhatsNewSettings.ascx.cs
├── YafDnnWhatsNewSettings.ascx.designer.cs
├── Components
│ ├── Controllers
│ │ ├── DataController.cs
│ │ └── UpgradeController.cs
│ ├── Modules
│ │ └── DnnServicesModule.cs
│ ├── Utils
│ │ ├── UserComparer.cs
│ │ ├── UserImporter.cs
│ │ └── RoleSyncronizer.cs
│ ├── Integration
│ │ ├── Sitemap.cs
│ │ ├── AspNetRoleManager.cs
│ │ ├── SendMail.cs
│ │ └── RoleStore.cs
│ ├── WebAPI
│ │ ├── UserController.cs
│ │ ├── MultiQuoteController.cs
│ │ ├── TagsController.cs
│ │ ├── RouteMapper.cs
│ │ ├── SearchController.cs
│ │ ├── TopicController.cs
│ │ ├── AttachmentController.cs
│ │ ├── AlbumController.cs
│ │ ├── ThankYouController.cs
│ │ ├── ForumController.cs
│ │ └── NotifyController.cs
│ ├── YAFTaskModule.cs
│ └── Tasks
│ │ └── YafDnnImportScheduler.cs
├── packages
│ └── repositories.config
├── YafDnnModule.ascx
├── YafDnnWhatsNew.ascx
├── BuildScripts
│ ├── MSBuild.ExtensionPack.Tasks.Targets
│ └── MSBuild.Community.Tasks.Targets
├── YafDnnModule.ascx.designer.cs
├── BuildModule.bat
├── YafDnnWhatsNew.ascx.designer.cs
├── YafDnnModuleImport.ascx
├── Installation
│ ├── 03.14.006108.txt
│ ├── yaf.svg
│ ├── 03.29.006137.txt
│ └── 02.30.005901.txt
├── Models
│ ├── Roles.cs
│ └── UserRoles.cs
├── Properties
│ └── AssemblyInfo.cs
├── YafDnnWhatsNewSettings.ascx
├── GlobalUsings.cs
├── Extensions
│ └── AspNetUsersExtensions.cs
├── YafDnnModuleImport.ascx.designer.cs
├── YafDnnModuleEdit.ascx
├── YAF.DNN.Module.slnx
├── YafDnnModuleEdit.ascx.designer.cs
└── App_LocalResources
│ ├── YafDnnModule.ascx.resx
│ ├── YafDnnModule.ascx.de-DE.resx
│ ├── YafDnnWhatsNew.ascx.resx
│ ├── YafDnnWhatsNew.ascx.de-DE.resx
│ ├── YafDnnModuleImport.ascx.resx
│ ├── YafDnnModuleImport.ascx.de-DE.resx
│ ├── YafDnnWhatsNewSettings.ascx.resx
│ └── YafDnnWhatsNewSettings.ascx.de-DE.resx
├── .github
├── ISSUE_TEMPLATE
│ ├── config.yml
│ ├── Support_question.md
│ ├── feature_request.md
│ └── bug_report.md
├── dependabot.yml
├── stale.yml
└── config.yml
├── .gitattributes
├── README.md
└── .gitignore
/yaf_dnn/YafDnnWhatsNew.ascx.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/HEAD/yaf_dnn/YafDnnWhatsNew.ascx.cs
--------------------------------------------------------------------------------
/yaf_dnn/YetAnotherForum.NET.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/HEAD/yaf_dnn/YetAnotherForum.NET.snk
--------------------------------------------------------------------------------
/yaf_dnn/YafDnnWhatsNewSettings.ascx.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/HEAD/yaf_dnn/YafDnnWhatsNewSettings.ascx.cs
--------------------------------------------------------------------------------
/yaf_dnn/YafDnnWhatsNewSettings.ascx.designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/HEAD/yaf_dnn/YafDnnWhatsNewSettings.ascx.designer.cs
--------------------------------------------------------------------------------
/yaf_dnn/Components/Controllers/DataController.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/HEAD/yaf_dnn/Components/Controllers/DataController.cs
--------------------------------------------------------------------------------
/yaf_dnn/Components/Controllers/UpgradeController.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/HEAD/yaf_dnn/Components/Controllers/UpgradeController.cs
--------------------------------------------------------------------------------
/yaf_dnn/packages/repositories.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: YAF.NET Support Forums
4 | url: https://yetanotherforum.net/forum/
5 | about: Get help and see the forum in action
--------------------------------------------------------------------------------
/yaf_dnn/YafDnnModule.ascx:
--------------------------------------------------------------------------------
1 | <%@ Control Language="C#" AutoEventWireup="False" CodeBehind="YafDnnModule.ascx.cs" Inherits="YAF.DotNetNuke.YafDnnModule" %>
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/yaf_dnn/YafDnnWhatsNew.ascx:
--------------------------------------------------------------------------------
1 | <%@ Control Language="C#" Inherits="YAF.DotNetNuke.YafDnnWhatsNew" AutoEventWireup="true" CodeBehind="YafDnnWhatsNew.ascx.cs" %>
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Support_question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "\U0001F917 Support Question"
3 | about: "If you have a question \U0001F4AC, please check out our Support Forums"
4 | title: ''
5 | labels: 'question'
6 | assignees: ''
7 |
8 | ---
9 |
10 | --------------^ Click "Preview" for a nicer view!
11 | We primarily use GitHub as an issue tracker; for usage and support questions, please check out these resources below.
12 | Thanks! 😁.
13 |
14 | ---
15 |
16 | * YAF.NET Support Forums: https://yetanotherforum.net/forum/
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: nuget
9 | directory: "/yaf_dnn/"
10 | schedule:
11 | interval: daily
12 | time: "04:00"
13 | open-pull-requests-limit: 10
14 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/yaf_dnn/BuildScripts/MSBuild.ExtensionPack.Tasks.Targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildProjectDirectory)
5 | $(SolutionDir)packages\MSBuild.Extension.Pack.1.9.1\tools\net40\MSBuild.ExtensionPack.dll
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "\U0001F680 Feature Request"
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: 'idea'
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Number of days of inactivity before an issue becomes stale
2 | daysUntilStale: 60
3 | # Number of days of inactivity before a stale issue is closed
4 | daysUntilClose: 7
5 | # Issues with these labels will never be considered stale
6 | exemptLabels:
7 | - enhancement
8 | # Label to use when marking an issue as stale
9 | staleLabel: wontfix
10 | # Comment to post when marking an issue as stale. Set to `false` to disable
11 | markComment: >
12 | This issue has been automatically marked as stale because it has not had
13 | recent activity. It will be closed if no further activity occurs. Thank you
14 | for your contributions.
15 | # Comment to post when closing a stale issue. Set to `false` to disable
16 | closeComment: false
--------------------------------------------------------------------------------
/yaf_dnn/YafDnnModule.ascx.designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | //
5 | // Changes to this file may cause incorrect behavior and will be lost if
6 | // the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace YAF.DotNetNuke
11 | {
12 |
13 |
14 | public partial class YafDnnModule
15 | {
16 |
17 | ///
18 | /// pnlModuleContent control.
19 | ///
20 | ///
21 | /// Auto-generated field.
22 | /// To modify move field declaration from designer file to code-behind file.
23 | ///
24 | protected global::System.Web.UI.WebControls.Panel pnlModuleContent;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/yaf_dnn/BuildModule.bat:
--------------------------------------------------------------------------------
1 | @SET CONFIGURATION=Release
2 |
3 | dotnet restore YAF.DNN.Module.slnx
4 |
5 | "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -latest -property installationPath > temp.txt
6 | set /p $MSBUILDROOT= temp.txt
10 | Rem lower VS version
11 | Rem set /p $MSBUILDVER= ~\MSBuild\15.0\Bin\MSBuild.exe
18 | Rem VS2019 => ~\MsBuild\Current\Bin\MSBuild.exe
19 | If "%Current%" NEQ "15.0" set Current=Current
20 |
21 | @set $MSBUILDPATH="%$MSBUILDROOT%\MsBuild\%Current%\Bin\MSBuild.exe"
22 |
23 | %$MSBUILDPATH% YAF.DNN.Module.slnx /p:Configuration=Release /t:Build /p:WarningLevel=0;CreateDnnPackages=true /flp1:logfile=errors.txt;errorsonly %1 %2 %3 %4 %5 %6 %7 %8 %9
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "\U0001F41B Bug Report"
3 | about: "If something isn't working as expected \U0001F914."
4 | title: ''
5 | labels: 'Bug'
6 | assignees: 'w8tcha'
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **System (please complete the following information):**
27 | - YAF Version: [e.g. YAF vX.XX.XX]
28 | - .NET Version [e.g. 4.xxx]
29 | - SQL Server [e.g. SQL Server 2012]
30 |
31 | **Affected browser**
32 |
35 | * [ ] Chrome
36 | * [ ] Firefox
37 | * [ ] Safari
38 | * [ ] Edge
39 |
40 | **Additional context**
41 | Add any other context about the problem here.
42 |
--------------------------------------------------------------------------------
/yaf_dnn/YafDnnWhatsNew.ascx.designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | //
5 | // Changes to this file may cause incorrect behavior and will be lost if
6 | // the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace YAF.DotNetNuke {
11 |
12 |
13 | public partial class YafDnnWhatsNew {
14 |
15 | ///
16 | /// LatestPosts control.
17 | ///
18 | ///
19 | /// Auto-generated field.
20 | /// To modify move field declaration from designer file to code-behind file.
21 | ///
22 | protected global::System.Web.UI.WebControls.Repeater LatestPosts;
23 |
24 | ///
25 | /// lInfo control.
26 | ///
27 | ///
28 | /// Auto-generated field.
29 | /// To modify move field declaration from designer file to code-behind file.
30 | ///
31 | protected global::System.Web.UI.WebControls.Label lInfo;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/yaf_dnn/YafDnnModuleImport.ascx:
--------------------------------------------------------------------------------
1 | <%@ Control language="c#" Inherits="YAF.DotNetNuke.YafDnnModuleImport" CodeBehind="YafDnnModuleImport.ascx.cs" AutoEventWireup="False" %>
2 | <%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/yaf_dnn/Installation/03.14.006108.txt:
--------------------------------------------------------------------------------
1 | DesktopModules\YetAnotherForumDotNet\Content\base\
2 | DesktopModules\YetAnotherForumDotNet\Content\black-tie\
3 | DesktopModules\YetAnotherForumDotNet\Content\blitzer\
4 | DesktopModules\YetAnotherForumDotNet\Content\cupertino\
5 | DesktopModules\YetAnotherForumDotNet\Content\dark-hive\
6 | DesktopModules\YetAnotherForumDotNet\Content\dot-luv\
7 | DesktopModules\YetAnotherForumDotNet\Content\eggplant\
8 | DesktopModules\YetAnotherForumDotNet\Content\excite-bike\
9 | DesktopModules\YetAnotherForumDotNet\Content\flick\
10 | DesktopModules\YetAnotherForumDotNet\Content\hot-sneaks\
11 | DesktopModules\YetAnotherForumDotNet\Content\humanity\
12 | DesktopModules\YetAnotherForumDotNet\Content\le-frog\
13 | DesktopModules\YetAnotherForumDotNet\Content\mint-choc\
14 | DesktopModules\YetAnotherForumDotNet\Content\overcast\
15 | DesktopModules\YetAnotherForumDotNet\Content\pepper-grinder\
16 | DesktopModules\YetAnotherForumDotNet\Content\redmond\
17 | DesktopModules\YetAnotherForumDotNet\Content\smoothness\
18 | DesktopModules\YetAnotherForumDotNet\Content\south-street\
19 | DesktopModules\YetAnotherForumDotNet\Content\start\
20 | DesktopModules\YetAnotherForumDotNet\Content\sunny\
21 | DesktopModules\YetAnotherForumDotNet\Content\swanky-purse\
22 | DesktopModules\YetAnotherForumDotNet\Content\trontastic\
23 | DesktopModules\YetAnotherForumDotNet\Content\ui-darkness\
24 | DesktopModules\YetAnotherForumDotNet\Content\ui-lightness\
25 | DesktopModules\YetAnotherForumDotNet\Content\vader\
--------------------------------------------------------------------------------
/yaf_dnn/Models/Roles.cs:
--------------------------------------------------------------------------------
1 | /* Yet Another Forum.NET
2 | * Copyright (C) 2003-2005 Bjørnar Henden
3 | * Copyright (C) 2006-2013 Jaben Cargman
4 | * Copyright (C) 2014-2024 Ingo Herbote
5 | * https://www.yetanotherforum.net/
6 | *
7 | * Licensed to the Apache Software Foundation (ASF) under one
8 | * or more contributor license agreements. See the NOTICE file
9 | * distributed with this work for additional information
10 | * regarding copyright ownership. The ASF licenses this file
11 | * to you under the Apache License, Version 2.0 (the
12 | * "License"); you may not use this file except in compliance
13 | * with the License. You may obtain a copy of the License at
14 |
15 | * https://www.apache.org/licenses/LICENSE-2.0
16 |
17 | * Unless required by applicable law or agreed to in writing,
18 | * software distributed under the License is distributed on an
19 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | * KIND, either express or implied. See the License for the
21 | * specific language governing permissions and limitations
22 | * under the License.
23 | */
24 |
25 | namespace YAF.DotNetNuke.Models;
26 |
27 | ///
28 | /// The asp net roles.
29 | ///
30 | public class Roles : IEntity, IHasId
31 | {
32 | ///
33 | /// Gets or sets the Role ID
34 | ///
35 | [Alias("RoleID")]
36 | public int Id { get; set; }
37 |
38 | ///
39 | /// Gets or sets the Role name
40 | ///
41 | [Alias("RoleName")]
42 | public string Name { get; set; }
43 | }
--------------------------------------------------------------------------------
/.github/config.yml:
--------------------------------------------------------------------------------
1 | # Configuration for request-info - https://github.com/behaviorbot/request-info
2 |
3 | # *OPTIONAL* Comment to reply with
4 | # Can be either a string :
5 | requestInfoReplyComment: >
6 | We would appreciate it if you could provide us with more info about this issue/pr!
7 |
8 | # Or an array:
9 | # requestInfoReplyComment:
10 | # - Ah no! young blade! That was a trifle short!
11 | # - Tell me more !
12 | # - I am sure you can be more effusive
13 |
14 |
15 | # *OPTIONAL* default titles to check against for lack of descriptiveness
16 | # MUST BE ALL LOWERCASE
17 | requestInfoDefaultTitles:
18 | - update readme.md
19 | - updates
20 |
21 | # *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
22 | requestInfoLabelToAdd: needs-more-info
23 |
24 | # *OPTIONAL* Require Issues to contain more information than what is provided in the issue templates
25 | # Will fail if the issue's body is equal to a provided template
26 | checkIssueTemplate: true
27 |
28 | # *OPTIONAL* Require Pull Requests to contain more information than what is provided in the PR template
29 | # Will fail if the pull request's body is equal to the provided template
30 | checkPullRequestTemplate: true
31 |
32 | # *OPTIONAL* Only warn about insufficient information on these events type
33 | # Keys must be lowercase. Valid values are 'issue' and 'pullRequest'
34 | requestInfoOn:
35 | pullRequest: true
36 | issue: true
37 |
38 | newPRWelcomeComment: >
39 | Thanks so much for opening your first PR here!
40 |
41 | newIssueWelcomeComment: >
42 | Thanks for opening this issue, a maintainer will get back to you shortly!
--------------------------------------------------------------------------------
/yaf_dnn/Components/Modules/DnnServicesModule.cs:
--------------------------------------------------------------------------------
1 | /* Yet Another Forum.NET
2 | * Copyright (C) 2003-2005 Bjørnar Henden
3 | * Copyright (C) 2006-2013 Jaben Cargman
4 | * Copyright (C) 2014-2024 Ingo Herbote
5 | * https://www.yetanotherforum.net/
6 | *
7 | * Licensed to the Apache Software Foundation (ASF) under one
8 | * or more contributor license agreements. See the NOTICE file
9 | * distributed with this work for additional information
10 | * regarding copyright ownership. The ASF licenses this file
11 | * to you under the Apache License, Version 2.0 (the
12 | * "License"); you may not use this file except in compliance
13 | * with the License. You may obtain a copy of the License at
14 |
15 | * https://www.apache.org/licenses/LICENSE-2.0
16 |
17 | * Unless required by applicable law or agreed to in writing,
18 | * software distributed under the License is distributed on an
19 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | * KIND, either express or implied. See the License for the
21 | * specific language governing permissions and limitations
22 | * under the License.
23 | */
24 |
25 | namespace YAF.Core.Modules;
26 |
27 | using Autofac;
28 |
29 | ///
30 | /// Registers all Service Modules
31 | ///
32 | public class DnnServicesModule : BaseModule
33 | {
34 | ///
35 | /// Injects Specific DNN Services
36 | ///
37 | /// The container builder.
38 | protected override void Load(ContainerBuilder builder)
39 | {
40 | builder.RegisterType().As().SingleInstance()
41 | .PreserveExistingDefaults();
42 | }
43 | }
--------------------------------------------------------------------------------
/yaf_dnn/Models/UserRoles.cs:
--------------------------------------------------------------------------------
1 | /* Yet Another Forum.NET
2 | * Copyright (C) 2003-2005 Bjørnar Henden
3 | * Copyright (C) 2006-2013 Jaben Cargman
4 | * Copyright (C) 2014-2024 Ingo Herbote
5 | * https://www.yetanotherforum.net/
6 | *
7 | * Licensed to the Apache Software Foundation (ASF) under one
8 | * or more contributor license agreements. See the NOTICE file
9 | * distributed with this work for additional information
10 | * regarding copyright ownership. The ASF licenses this file
11 | * to you under the Apache License, Version 2.0 (the
12 | * "License"); you may not use this file except in compliance
13 | * with the License. You may obtain a copy of the License at
14 |
15 | * https://www.apache.org/licenses/LICENSE-2.0
16 |
17 | * Unless required by applicable law or agreed to in writing,
18 | * software distributed under the License is distributed on an
19 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | * KIND, either express or implied. See the License for the
21 | * specific language governing permissions and limitations
22 | * under the License.
23 | */
24 |
25 | namespace YAF.DotNetNuke.Models;
26 |
27 | ///
28 | /// The asp net user roles.
29 | ///
30 | public class UserRoles : IEntity
31 | {
32 | ///
33 | /// Gets or sets the user role identifier.
34 | ///
35 | /// The user role identifier.
36 | public int UserRoleID { get; set; }
37 |
38 | ///
39 | /// Gets or sets the user identifier.
40 | ///
41 | /// The user identifier.
42 | public int UserID { get; set; }
43 |
44 | ///
45 | /// Gets or sets the role identifier.
46 | ///
47 | /// The role identifier.
48 | public int RoleID { get; set; }
49 | }
--------------------------------------------------------------------------------
/yaf_dnn/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /* Yet Another Forum.NET
2 | * Copyright (C) 2003-2005 Bjørnar Henden
3 | * Copyright (C) 2006-2013 Jaben Cargman
4 | * Copyright (C) 2014-2024 Ingo Herbote
5 | * http://www.yetanotherforum.net/
6 | *
7 | * Licensed to the Apache Software Foundation (ASF) under one
8 | * or more contributor license agreements. See the NOTICE file
9 | * distributed with this work for additional information
10 | * regarding copyright ownership. The ASF licenses this file
11 | * to you under the Apache License, Version 2.0 (the
12 | * "License"); you may not use this file except in compliance
13 | * with the License. You may obtain a copy of the License at
14 |
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 |
17 | * Unless required by applicable law or agreed to in writing,
18 | * software distributed under the License is distributed on an
19 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | * KIND, either express or implied. See the License for the
21 | * specific language governing permissions and limitations
22 | * under the License.
23 | */
24 |
25 | using System.Reflection;
26 | using System.Runtime.InteropServices;
27 |
28 | [assembly: AssemblyTitle("YAF for the DNN Platform")]
29 | [assembly: AssemblyDescription("")]
30 | [assembly: AssemblyConfiguration("")]
31 | [assembly: AssemblyCompany("YetAnotherForum.NET")]
32 | [assembly: AssemblyProduct("YAF for DNN")]
33 | [assembly: AssemblyTrademark("")]
34 | [assembly: AssemblyCulture("")]
35 |
36 | // Setting ComVisible to false makes the types in this assembly not visible
37 | // to COM components. If you need to access a type in this assembly from
38 | // COM, set the ComVisible attribute to true on that type.
39 | [assembly: ComVisible(false)]
40 |
41 | // The following GUID is for the ID of the typelib if this project is exposed to COM
42 | [assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")]
--------------------------------------------------------------------------------
/yaf_dnn/Components/Utils/UserComparer.cs:
--------------------------------------------------------------------------------
1 | /* Yet Another Forum.NET
2 | * Copyright (C) 2003-2005 Bjørnar Henden
3 | * Copyright (C) 2006-2013 Jaben Cargman
4 | * Copyright (C) 2014-2024 Ingo Herbote
5 | * https://www.yetanotherforum.net/
6 | *
7 | * Licensed to the Apache Software Foundation (ASF) under one
8 | * or more contributor license agreements. See the NOTICE file
9 | * distributed with this work for additional information
10 | * regarding copyright ownership. The ASF licenses this file
11 | * to you under the Apache License, Version 2.0 (the
12 | * "License"); you may not use this file except in compliance
13 | * with the License. You may obtain a copy of the License at
14 |
15 | * https://www.apache.org/licenses/LICENSE-2.0
16 |
17 | * Unless required by applicable law or agreed to in writing,
18 | * software distributed under the License is distributed on an
19 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | * KIND, either express or implied. See the License for the
21 | * specific language governing permissions and limitations
22 | * under the License.
23 | */
24 |
25 | namespace YAF.DotNetNuke.Components.Utils;
26 |
27 | ///
28 | /// Sort the User List by UserId
29 | ///
30 | public class UserComparer : IComparer
31 | {
32 | ///
33 | /// Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
34 | ///
35 | /// The x.
36 | /// The y.
37 | ///
38 | /// The compare.
39 | ///
40 | /// Neither nor implements the interface.-or- and are of different types and neither one can handle comparisons with the other.
41 | public int Compare(object x, object y)
42 | {
43 | var comparer = new Comparer(CultureInfo.CurrentCulture);
44 |
45 | return comparer.Compare(((UserInfo)x).UserID, ((UserInfo)y).UserID);
46 | }
47 | }
--------------------------------------------------------------------------------
/yaf_dnn/YafDnnWhatsNewSettings.ascx:
--------------------------------------------------------------------------------
1 | <%@ Control Language="C#" AutoEventWireup="false" Inherits="YAF.DotNetNuke.YafDnnWhatsNewSettings" Codebehind="YafDnnWhatsNewSettings.ascx.cs" %>
2 | <%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/yaf_dnn/GlobalUsings.cs:
--------------------------------------------------------------------------------
1 | // Global using directives
2 |
3 | global using System;
4 | global using System.Collections;
5 | global using System.Data;
6 | global using System.Globalization;
7 | global using System.IO;
8 | global using System.Linq;
9 | global using System.Text;
10 | global using System.Threading.Tasks;
11 | global using System.Web;
12 | global using System.Web.Http;
13 |
14 | global using global::DotNetNuke.Abstractions;
15 | global using global::DotNetNuke.Common;
16 | global using global::DotNetNuke.Data;
17 | global using global::DotNetNuke.Entities.Modules;
18 | global using global::DotNetNuke.Entities.Portals;
19 | global using global::DotNetNuke.Entities.Tabs;
20 | global using global::DotNetNuke.Entities.Users;
21 | global using global::DotNetNuke.Framework.JavaScriptLibraries;
22 | global using global::DotNetNuke.Security.Roles;
23 | global using global::DotNetNuke.Services.Exceptions;
24 | global using global::DotNetNuke.Services.Localization;
25 | global using global::DotNetNuke.Services.Scheduling;
26 | global using global::DotNetNuke.Web.Api;
27 |
28 | global using Microsoft.AspNet.Identity;
29 | global using Microsoft.Extensions.DependencyInjection;
30 |
31 | global using ServiceStack.DataAnnotations;
32 | global using ServiceStack.Model;
33 |
34 | global using YAF.Configuration;
35 | global using YAF.Core.Context;
36 | global using YAF.Core.Data;
37 | global using YAF.Core.Extensions;
38 | global using YAF.Core.Helpers;
39 | global using YAF.Core.Model;
40 | global using YAF.Core.Services;
41 | global using YAF.Core.Utilities.StringUtils;
42 | global using YAF.DotNetNuke.Components.Controllers;
43 | global using YAF.DotNetNuke.Components.Utils;
44 | global using YAF.DotNetNuke.Extensions;
45 | global using YAF.DotNetNuke.Models;
46 | global using YAF.Types.Attributes;
47 | global using YAF.Types.Constants;
48 | global using YAF.Types.Extensions;
49 | global using YAF.Types.Flags;
50 | global using YAF.Types.Interfaces;
51 | global using YAF.Types.Interfaces.Data;
52 | global using YAF.Types.Interfaces.Identity;
53 | global using YAF.Types.Interfaces.Services;
54 | global using YAF.Types.Models;
55 | global using YAF.Types.Models.Identity;
56 | global using YAF.Types.Objects;
57 | global using YAF.Types.Objects.Model;
58 | global using YAF.Web.EventsArgs;
59 | global using YAF.Web.Extensions;
--------------------------------------------------------------------------------
/yaf_dnn/Extensions/AspNetUsersExtensions.cs:
--------------------------------------------------------------------------------
1 | /* Yet Another Forum.NET
2 | * Copyright (C) 2003-2005 Bjørnar Henden
3 | * Copyright (C) 2006-2013 Jaben Cargman
4 | * Copyright (C) 2014-2024 Ingo Herbote
5 | * https://www.yetanotherforum.net/
6 | *
7 | * Licensed to the Apache Software Foundation (ASF) under one
8 | * or more contributor license agreements. See the NOTICE file
9 | * distributed with this work for additional information
10 | * regarding copyright ownership. The ASF licenses this file
11 | * to you under the Apache License, Version 2.0 (the
12 | * "License"); you may not use this file except in compliance
13 | * with the License. You may obtain a copy of the License at
14 |
15 | * https://www.apache.org/licenses/LICENSE-2.0
16 |
17 | * Unless required by applicable law or agreed to in writing,
18 | * software distributed under the License is distributed on an
19 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | * KIND, either express or implied. See the License for the
21 | * specific language governing permissions and limitations
22 | * under the License.
23 | */
24 |
25 | namespace YAF.DotNetNuke.Extensions;
26 |
27 | ///
28 | /// The asp net users extensions.
29 | ///
30 | public static class AspNetUsersExtensions
31 | {
32 | ///
33 | /// Converts UserInfo to AspNetUsers
34 | ///
35 | ///
36 | /// The user info.
37 | ///
38 | ///
39 | /// The .
40 | ///
41 | public static AspNetUsers ToAspNetUsers(this UserInfo userInfo)
42 | {
43 | var user = new AspNetUsers
44 | {
45 | Id = userInfo.UserID.ToString(),
46 | UserName = userInfo.Username,
47 | Email = userInfo.Email,
48 | IsApproved = !userInfo.IsDeleted,
49 | CreateDate = userInfo.CreatedOnDate,
50 | LastPasswordChangedDate = DateTime.Now,
51 | LastLockoutDate = DateTime.MinValue.AddYears(1902),
52 | FailedPasswordAnswerAttemptWindowStart = DateTime.MinValue.AddYears(1902),
53 | FailedPasswordAttemptWindowStart = DateTime.MinValue.AddYears(1902),
54 | Profile_Birthday = DateTime.MinValue.AddYears(1902)
55 | };
56 |
57 | return user;
58 | }
59 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | **YetAnotherForum.NET** (YAF.NET) ASP.NET Open Source Forum solution! The **YAF.NET** project is an international collaboration of like-minded, skilled, and creative individuals who are striving to make **YAF.NET** the most robust and malleable forum solutions available.
4 |
5 | 
6 |
7 | ### Features
8 | [Full Feature List](https://github.com/YAFNET/YAFNET/wiki/YAF.NET-Features).
9 |
10 | ## DNN® (DotNetNuke) Module
11 | This is the DNN Module Version of YetAnotherForum.NET which runs YAF inside a Module (DotNetNuke 10.01.00 or higher).
12 |
13 | An Example Forum running the current Version can be found here
14 |
15 | http://watchersnet.de/Service/Forum.aspx
16 |
17 | ### Screen Shots
18 |
19 | 
20 |
21 | 
22 |
23 | 
24 |
25 | Admin Control Panel
26 | 
27 |
28 | There is also a Second Child Module the *YAF.NET Forums What's New* Module which shows The Latest Posts in a List
29 | 
30 |
31 | ### Getting Started with Development
32 |
33 | This project is dependent upon the parent solution, YAFNET. This requires that the steps you follow be specific.
34 |
35 | 1. Create a local directory for your project o live, such as C:\dev\YAFDev\ (just an example path).
36 | 2. Fork this YAFNET-DNN project into your account and then clone it into the local folder you just created. There should now be a C:\dev\YAFDev\yaf_dnn\ folder, as well as a README and other Git files.
37 | 3. (Optional) Attach an upstream to this YAFNET-DNN project in Git.
38 | 4. Download a copy of the netfx branch of [the YAFNET project](https://github.com/YAFNET/YAFNET), and extract to the main folder. The resulting path should be C:\dev\YAFDev\yafsrc\.
39 | 5. Open and then build the YAFNET solution.
40 | 6. Open and then build the YAFNET-DNN solution.
41 |
42 | Congratulations! You're now ready to begin development.
43 |
44 | ### Support
45 | If you have any questions, please visit the YAF Community Support forum: [https://forum.yetanotherforum.net](https://forum.yetanotherforum.net), or visit the Wiki for More Informations.
46 |
47 |
48 | ## License
49 |
50 | Yet Another Forum.NET is licensed under the Apache 2.0 license.
--------------------------------------------------------------------------------
/yaf_dnn/YafDnnModuleImport.ascx.designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | //
5 | // Changes to this file may cause incorrect behavior and will be lost if
6 | // the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace YAF.DotNetNuke {
11 |
12 |
13 | public partial class YafDnnModuleImport {
14 |
15 | ///
16 | /// lImport control.
17 | ///
18 | ///
19 | /// Auto-generated field.
20 | /// To modify move field declaration from designer file to code-behind file.
21 | ///
22 | protected global::System.Web.UI.UserControl lImport;
23 |
24 | ///
25 | /// btnImportUsers control.
26 | ///
27 | ///
28 | /// Auto-generated field.
29 | /// To modify move field declaration from designer file to code-behind file.
30 | ///
31 | protected global::System.Web.UI.WebControls.LinkButton btnImportUsers;
32 |
33 | ///
34 | /// lInfo control.
35 | ///
36 | ///
37 | /// Auto-generated field.
38 | /// To modify move field declaration from designer file to code-behind file.
39 | ///
40 | protected global::System.Web.UI.WebControls.Label lInfo;
41 |
42 | ///
43 | /// lblAddScheduler control.
44 | ///
45 | ///
46 | /// Auto-generated field.
47 | /// To modify move field declaration from designer file to code-behind file.
48 | ///
49 | protected global::System.Web.UI.UserControl lblAddScheduler;
50 |
51 | ///
52 | /// btnAddScheduler control.
53 | ///
54 | ///
55 | /// Auto-generated field.
56 | /// To modify move field declaration from designer file to code-behind file.
57 | ///
58 | protected global::System.Web.UI.WebControls.LinkButton btnAddScheduler;
59 |
60 | ///
61 | /// Close control.
62 | ///
63 | ///
64 | /// Auto-generated field.
65 | /// To modify move field declaration from designer file to code-behind file.
66 | ///
67 | protected global::System.Web.UI.WebControls.LinkButton Close;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/yaf_dnn/Components/Integration/Sitemap.cs:
--------------------------------------------------------------------------------
1 | /* Yet Another Forum.NET
2 | * Copyright (C) 2003-2005 Bjørnar Henden
3 | * Copyright (C) 2006-2013 Jaben Cargman
4 | * Copyright (C) 2014-2024 Ingo Herbote
5 | * https://www.yetanotherforum.net/
6 | *
7 | * Licensed to the Apache Software Foundation (ASF) under one
8 | * or more contributor license agreements. See the NOTICE file
9 | * distributed with this work for additional information
10 | * regarding copyright ownership. The ASF licenses this file
11 | * to you under the Apache License, Version 2.0 (the
12 | * "License"); you may not use this file except in compliance
13 | * with the License. You may obtain a copy of the License at
14 |
15 | * https://www.apache.org/licenses/LICENSE-2.0
16 |
17 | * Unless required by applicable law or agreed to in writing,
18 | * software distributed under the License is distributed on an
19 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | * KIND, either express or implied. See the License for the
21 | * specific language governing permissions and limitations
22 | * under the License.
23 | */
24 |
25 | namespace YAF.DotNetNuke.Components.Integration;
26 |
27 | using System.Collections.Generic;
28 |
29 | using global::DotNetNuke.Services.Sitemap;
30 |
31 | using DateTime = System.DateTime;
32 |
33 | ///
34 | /// YAF.NET Forum SiteMap Provider
35 | ///
36 | ///
37 | public class Sitemap : SitemapProvider
38 | {
39 | ///
40 | /// Get the Sitemap URLs.
41 | ///
42 | /// The portal id.
43 | /// The portal settings.
44 | /// The version.
45 | ///
46 | /// The List with URLs.
47 | ///
48 | public override List GetUrls(int portalId, PortalSettings ps, string version)
49 | {
50 | var urls = new List();
51 |
52 | if (BoardContext.Current is null)
53 | {
54 | return urls;
55 | }
56 |
57 | var forumList = BoardContext.Current.GetRepository().ListAll(BoardContext.Current.BoardSettings.BoardId);
58 |
59 | urls.AddRange(
60 | forumList.Select(
61 | forum => new SitemapUrl
62 | {
63 | Url = BoardContext.Current.Get().GetForumLink(forum.Item1.ID, forum.Item1.Name),
64 | Priority = (float)0.8,
65 | LastModified = DateTime.Now,
66 | ChangeFrequency = SitemapChangeFrequency.Always
67 | }));
68 |
69 | return urls;
70 | }
71 | }
--------------------------------------------------------------------------------
/yaf_dnn/Installation/yaf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/yaf_dnn/Components/WebAPI/UserController.cs:
--------------------------------------------------------------------------------
1 | /* Yet Another Forum.NET
2 | * Copyright (C) 2003-2005 Bjørnar Henden
3 | * Copyright (C) 2006-2013 Jaben Cargman
4 | * Copyright (C) 2014-2024 Ingo Herbote
5 | * https://www.yetanotherforum.net/
6 | *
7 | * Licensed to the Apache Software Foundation (ASF) under one
8 | * or more contributor license agreements. See the NOTICE file
9 | * distributed with this work for additional information
10 | * regarding copyright ownership. The ASF licenses this file
11 | * to you under the Apache License, Version 2.0 (the
12 | * "License"); you may not use this file except in compliance
13 | * with the License. You may obtain a copy of the License at
14 |
15 | * https://www.apache.org/licenses/LICENSE-2.0
16 |
17 | * Unless required by applicable law or agreed to in writing,
18 | * software distributed under the License is distributed on an
19 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | * KIND, either express or implied. See the License for the
21 | * specific language governing permissions and limitations
22 | * under the License.
23 | */
24 |
25 | namespace YAF.DotNetNuke.Components.WebAPI;
26 |
27 | ///
28 | /// The User controller.
29 | ///
30 | [RoutePrefix("api")]
31 | public class UserController : DnnApiController, IHaveServiceLocator
32 | {
33 | ///
34 | /// Gets ServiceLocator.
35 | ///
36 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator;
37 |
38 | ///
39 | /// Gets all found Users.
40 | ///
41 | ///
42 | /// The search topic.
43 | ///
44 | ///
45 | /// The .
46 | ///
47 | [DnnAuthorize]
48 | [HttpPost]
49 | public IHttpActionResult GetUsers(SearchTopic searchTopic)
50 | {
51 | if (!BoardContext.Current.IsAdmin && !BoardContext.Current.IsForumModerator)
52 | {
53 | return this.NotFound();
54 | }
55 |
56 | var users = this.Get().GetUsersPaged(
57 | BoardContext.Current.PageBoardID,
58 | searchTopic.Page,
59 | 15,
60 | searchTopic.SearchTerm,
61 | null,
62 | null,
63 | false,
64 | null,
65 | null,
66 | false);
67 |
68 | var usersList = (from PagedUser user in users
69 | select new SelectOptions
70 | {
71 | text = BoardContext.Current.BoardSettings.EnableDisplayName
72 | ? user.DisplayName
73 | : user.Name,
74 | id = user.UserID.ToString()
75 | }).ToList();
76 |
77 | var pagedUsers = new SelectPagedOptions
78 | {
79 | Total = users.Any() ? users.FirstOrDefault().TotalRows : 0,
80 | Results = usersList
81 | };
82 |
83 | return this.Ok(pagedUsers);
84 | }
85 | }
--------------------------------------------------------------------------------
/yaf_dnn/Components/WebAPI/MultiQuoteController.cs:
--------------------------------------------------------------------------------
1 | /* Yet Another Forum.NET
2 | * Copyright (C) 2003-2005 Bjørnar Henden
3 | * Copyright (C) 2006-2013 Jaben Cargman
4 | * Copyright (C) 2014-2024 Ingo Herbote
5 | * https://www.yetanotherforum.net/
6 | *
7 | * Licensed to the Apache Software Foundation (ASF) under one
8 | * or more contributor license agreements. See the NOTICE file
9 | * distributed with this work for additional information
10 | * regarding copyright ownership. The ASF licenses this file
11 | * to you under the Apache License, Version 2.0 (the
12 | * "License"); you may not use this file except in compliance
13 | * with the License. You may obtain a copy of the License at
14 |
15 | * https://www.apache.org/licenses/LICENSE-2.0
16 |
17 | * Unless required by applicable law or agreed to in writing,
18 | * software distributed under the License is distributed on an
19 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | * KIND, either express or implied. See the License for the
21 | * specific language governing permissions and limitations
22 | * under the License.
23 | */
24 |
25 | namespace YAF.DotNetNuke.Components.WebAPI;
26 |
27 | ///
28 | /// The YAF MultiQuote Button controller.
29 | ///
30 | public class MultiQuoteController : DnnApiController, IHaveServiceLocator
31 | {
32 | ///
33 | /// Gets ServiceLocator.
34 | ///
35 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator;
36 |
37 | ///
38 | /// Handles the multi quote Button.
39 | ///
40 | ///
41 | /// The quote Button.
42 | ///
43 | ///
44 | /// Returns the Message Id and the Updated CSS Class for the Button
45 | ///
46 | [DnnAuthorize]
47 | [HttpPost]
48 | public IHttpActionResult HandleMultiQuote(MultiQuoteButton quoteButton)
49 | {
50 | var buttonId = quoteButton.ButtonId;
51 | var isMultiQuoteButton = quoteButton.IsMultiQuoteButton;
52 | var messageId = quoteButton.MessageId;
53 | var topicId = quoteButton.TopicId;
54 | var buttonCssClass = quoteButton.ButtonCssClass;
55 |
56 | var yafSession = this.Get();
57 |
58 | var multiQuote = new MultiQuote { MessageID = messageId, TopicID = topicId };
59 |
60 | if (isMultiQuoteButton)
61 | {
62 | if (yafSession.MultiQuoteIds != null)
63 | {
64 | if (!yafSession.MultiQuoteIds.Exists(m => m.MessageID.Equals(messageId)))
65 | {
66 | yafSession.MultiQuoteIds.Add(multiQuote);
67 | }
68 | }
69 | else
70 | {
71 | yafSession.MultiQuoteIds = [multiQuote];
72 | }
73 |
74 | buttonCssClass += " Checked";
75 | }
76 | else
77 | {
78 | if (yafSession.MultiQuoteIds != null
79 | && yafSession.MultiQuoteIds.Exists(m => m.MessageID.Equals(messageId)))
80 | {
81 | yafSession.MultiQuoteIds.Remove(multiQuote);
82 | }
83 |
84 | buttonCssClass = "btn-multiquote custom-control custom-checkbox btn btn-link";
85 | }
86 |
87 | return this.Ok(new ReturnClass { Id = buttonId, NewTitle = buttonCssClass });
88 | }
89 | }
--------------------------------------------------------------------------------
/yaf_dnn/Components/YAFTaskModule.cs:
--------------------------------------------------------------------------------
1 | /* Yet Another Forum.NET
2 | * Copyright (C) 2006-2012 Jaben Cargman
3 | * http://www.yetanotherforum.net/
4 | *
5 | * This program is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU General Public License
7 | * as published by the Free Software Foundation; either version 2
8 | * of the License, or (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program; if not, write to the Free Software
17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 | */
19 |
20 | namespace YAF.DotNetNuke.Components;
21 |
22 | using System.Web;
23 |
24 | using Autofac;
25 |
26 | using YAF.Core;
27 | using YAF.Types.Attributes;
28 | using YAF.Types.EventProxies;
29 | using YAF.Types.Interfaces;
30 | using YAF.Types.Interfaces.Events;
31 |
32 | ///
33 | /// Lifecycle module used to throw events around...
34 | ///
35 | public class YafTaskModule : IHttpModule, IHaveServiceLocator
36 | {
37 | ///
38 | /// The _app instance.
39 | ///
40 | protected HttpApplication AppInstance;
41 |
42 | ///
43 | /// The _module initialized.
44 | ///
45 | protected bool ModuleInitialized;
46 |
47 |
48 | ///
49 | /// The lock object.
50 | ///
51 | protected readonly object lockObject = new();
52 |
53 | ///
54 | /// Gets or sets the logger associated with the object.
55 | ///
56 | [Inject]
57 | public ILoggerService Logger { get; set; }
58 |
59 | [Inject]
60 | public IServiceLocator ServiceLocator { get; set; }
61 |
62 | ///
63 | /// Bootstrapping fun
64 | ///
65 | ///
66 | /// The http application.
67 | ///
68 | public void Init(HttpApplication context)
69 | {
70 | if (this.ModuleInitialized)
71 | {
72 | return;
73 | }
74 |
75 | // create a lock so no other instance can affect the static variable
76 | lock (this.lockObject)
77 | {
78 | if (!this.ModuleInitialized)
79 | {
80 | this.AppInstance = context;
81 |
82 | // set the httpApplication as early as possible...
83 | GlobalContainer.Container.Resolve().Instance =
84 | new HttpApplicationStateWrapper(context.Application);
85 |
86 | GlobalContainer.Container.Resolve().Inject(this);
87 |
88 | this.ModuleInitialized = true;
89 | }
90 | }
91 |
92 | // app init notification...
93 | this.Get().RaiseIssolated(new HttpApplicationInitEvent(this.AppInstance), null);
94 | }
95 |
96 | ///
97 | /// Disposes of the resources (other than memory) used by the module that implements .
98 | ///
99 | void IHttpModule.Dispose()
100 | {
101 | }
102 | }
--------------------------------------------------------------------------------
/yaf_dnn/YafDnnModuleEdit.ascx:
--------------------------------------------------------------------------------
1 | <%@ Control language="c#" Inherits="YAF.DotNetNuke.YafDnnModuleEdit" CodeBehind="YafDnnModuleEdit.ascx.cs" AutoEventWireup="False" %>
2 | <%@ Import Namespace="DotNetNuke.Services.Localization" %>
3 | <%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
4 |
5 |
19 |
20 |