├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── Support_question.md │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md ├── config.yml ├── dependabot.yml └── stale.yml ├── .gitignore ├── LICENSE.md ├── README.md └── yaf_dnn ├── App_LocalResources ├── YafDnnModule.ascx.de-DE.resx ├── YafDnnModule.ascx.resx ├── YafDnnModuleEdit.ascx.de-DE.resx ├── YafDnnModuleEdit.ascx.resx ├── YafDnnModuleImport.ascx.de-DE.resx ├── YafDnnModuleImport.ascx.resx ├── YafDnnWhatsNew.ascx.de-DE.resx ├── YafDnnWhatsNew.ascx.resx ├── YafDnnWhatsNewSettings.ascx.de-DE.resx └── YafDnnWhatsNewSettings.ascx.resx ├── BuildModule.bat ├── BuildScripts ├── MSBuild.Community.Tasks.Targets ├── MSBuild.ExtensionPack.Tasks.Targets └── ModulePackage.targets ├── Components ├── Controllers │ ├── DataController.cs │ └── UpgradeController.cs ├── Integration │ ├── AspNetRoleManager.cs │ ├── AspNetRolesHelper.cs │ ├── AspNetUserManager.cs │ ├── AspNetUsersHelper.cs │ ├── Journal.cs │ ├── RoleStore.cs │ ├── SendMail.cs │ ├── Sitemap.cs │ └── UserStore.cs ├── Modules │ └── DnnServicesModule.cs ├── Rewriter │ └── DotNetNukeUrlBuilder.cs ├── Tasks │ └── YafDnnImportScheduler.cs ├── Utils │ ├── RoleSyncronizer.cs │ ├── UserComparer.cs │ └── UserImporter.cs ├── WebAPI │ ├── AlbumController.cs │ ├── AttachmentController.cs │ ├── ForumController.cs │ ├── MultiQuoteController.cs │ ├── NotifyController.cs │ ├── RouteMapper.cs │ ├── SearchController.cs │ ├── TagsController.cs │ ├── ThankYouController.cs │ ├── TopicController.cs │ └── UserController.cs └── YAFTaskModule.cs ├── Extensions └── AspNetUsersExtensions.cs ├── GlobalUsings.cs ├── Installation ├── 02.30.005901.txt ├── 03.00.006100.sql ├── 03.14.006108.txt ├── 03.22.006130.txt ├── License.html ├── ReadMe.html ├── Uninstall.SqlDataProvider ├── YAF.DotNetNuke.Module.dnn └── yaf.svg ├── Models ├── Roles.cs └── UserRoles.cs ├── Properties └── AssemblyInfo.cs ├── YAF.DNN.Module.csproj ├── YAF.DNN.Module.slnx ├── YafDnnModule.ascx ├── YafDnnModule.ascx.cs ├── YafDnnModule.ascx.designer.cs ├── YafDnnModuleEdit.ascx ├── YafDnnModuleEdit.ascx.cs ├── YafDnnModuleEdit.ascx.designer.cs ├── YafDnnModuleImport.ascx ├── YafDnnModuleImport.ascx.cs ├── YafDnnModuleImport.ascx.designer.cs ├── YafDnnWhatsNew.ascx ├── YafDnnWhatsNew.ascx.cs ├── YafDnnWhatsNew.ascx.designer.cs ├── YafDnnWhatsNewSettings.ascx ├── YafDnnWhatsNewSettings.ascx.cs ├── YafDnnWhatsNewSettings.ascx.designer.cs ├── YetAnotherForum.NET.snk └── packages └── repositories.config /.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 | -------------------------------------------------------------------------------- /.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/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 | -------------------------------------------------------------------------------- /.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 -------------------------------------------------------------------------------- /.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/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! -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## YAFNET 3 | ################# 4 | 5 | # ignore the required YAFNET source directory 6 | yafsrc/ 7 | yaf_dnn/packages/ 8 | 9 | ################# 10 | ## Eclipse 11 | ################# 12 | 13 | *.pydevproject 14 | .project 15 | .metadata 16 | bin/ 17 | tmp/ 18 | *.tmp 19 | *.bak 20 | *.swp 21 | *~.nib 22 | local.properties 23 | .classpath 24 | .settings/ 25 | .loadpath 26 | 27 | # External tool builders 28 | .externalToolBuilders/ 29 | 30 | # Locally stored "Eclipse launch configurations" 31 | *.launch 32 | 33 | # CDT-specific 34 | .cproject 35 | 36 | # PDT-specific 37 | .buildpath 38 | 39 | 40 | ################# 41 | ## Visual Studio 42 | ################# 43 | 44 | ## Ignore Visual Studio temporary files, build results, and 45 | ## files generated by popular Visual Studio add-ons. 46 | 47 | # 2015 48 | .vs/ 49 | 50 | # User-specific files 51 | *.suo 52 | *.user 53 | *.sln.docstates 54 | 55 | # Build results 56 | 57 | [Dd]ebug/ 58 | [Rr]elease/ 59 | x64/ 60 | build/ 61 | [Bb]in/ 62 | [Oo]bj/ 63 | 64 | # MSTest test Results 65 | [Tt]est[Rr]esult*/ 66 | [Bb]uild[Ll]og.* 67 | 68 | *_i.c 69 | *_p.c 70 | *.ilk 71 | *.meta 72 | *.obj 73 | *.pch 74 | *.pdb 75 | *.pgc 76 | *.pgd 77 | *.rsp 78 | *.sbr 79 | *.tlb 80 | *.tli 81 | *.tlh 82 | *.tmp 83 | *.tmp_proj 84 | *.log 85 | *.vspscc 86 | *.vssscc 87 | .builds 88 | *.pidb 89 | *.log 90 | *.scc 91 | 92 | # Visual C++ cache files 93 | ipch/ 94 | *.aps 95 | *.ncb 96 | *.opensdf 97 | *.sdf 98 | *.cachefile 99 | 100 | # Visual Studio profiler 101 | *.psess 102 | *.vsp 103 | *.vspx 104 | 105 | # Guidance Automation Toolkit 106 | *.gpState 107 | 108 | # ReSharper is a .NET coding add-in 109 | _ReSharper*/ 110 | *.[Rr]e[Ss]harper 111 | 112 | # TeamCity is a build add-in 113 | _TeamCity* 114 | 115 | # DotCover is a Code Coverage Tool 116 | *.dotCover 117 | 118 | # NCrunch 119 | *.ncrunch* 120 | .*crunch*.local.xml 121 | 122 | # Installshield output folder 123 | [Ee]xpress/ 124 | 125 | # DocProject is a documentation generator add-in 126 | DocProject/buildhelp/ 127 | DocProject/Help/*.HxT 128 | DocProject/Help/*.HxC 129 | DocProject/Help/*.hhc 130 | DocProject/Help/*.hhk 131 | DocProject/Help/*.hhp 132 | DocProject/Help/Html2 133 | DocProject/Help/html 134 | 135 | # Click-Once directory 136 | publish/ 137 | 138 | # Publish Web Output 139 | *.Publish.xml 140 | *.pubxml 141 | 142 | # NuGet Packages Directory 143 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 144 | #packages/ 145 | 146 | # Windows Azure Build Output 147 | csx 148 | *.build.csdef 149 | 150 | # Windows Store app package directory 151 | AppPackages/ 152 | 153 | # Others 154 | sql/ 155 | *.Cache 156 | ClientBin/ 157 | [Ss]tyle[Cc]op.* 158 | ~$* 159 | *~ 160 | *.dbmdl 161 | *.[Pp]ublish.xml 162 | *.pfx 163 | *.publishsettings 164 | 165 | # RIA/Silverlight projects 166 | Generated_Code/ 167 | 168 | # Backup & report files from converting an old project file to a newer 169 | # Visual Studio version. Backup files are not needed, because we have git ;-) 170 | _UpgradeReport_Files/ 171 | Backup*/ 172 | UpgradeLog*.XML 173 | UpgradeLog*.htm 174 | 175 | # SQL Server files 176 | App_Data/*.mdf 177 | App_Data/*.ldf 178 | 179 | ############# 180 | ## Windows detritus 181 | ############# 182 | 183 | # Windows image file caches 184 | Thumbs.db 185 | ehthumbs.db 186 | 187 | # Folder config file 188 | Desktop.ini 189 | 190 | # Recycle Bin used on file shares 191 | $RECYCLE.BIN/ 192 | 193 | # Mac crap 194 | .DS_Store 195 | 196 | 197 | ############# 198 | ## Python 199 | ############# 200 | 201 | *.py[co] 202 | 203 | # Packages 204 | *.egg 205 | *.egg-info 206 | dist/ 207 | build/ 208 | eggs/ 209 | parts/ 210 | var/ 211 | sdist/ 212 | develop-eggs/ 213 | .installed.cfg 214 | 215 | # Installer logs 216 | pip-log.txt 217 | 218 | # Unit test / coverage reports 219 | .coverage 220 | .tox 221 | 222 | #Translations 223 | *.mo 224 | 225 | #Mr Developer 226 | .mr.developer.cfg 227 | yaf_dnn/packages/Dnn.Platform.8.0.0/Dnn.Platform.8.0.0.nupkg 228 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![YAFLogo](https://raw.githubusercontent.com/YAFNET/YAFNET/master/yafsrc/YetAnotherForum.NET/wwwroot/images/Logos/YAFLogo.svg) 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 | ![license](https://img.shields.io/github/license/yafnet/yafnet) 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 09.13.03 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 | ![mainscreen](https://yetanotherforum.net/images/main.png) 20 | 21 | ![forumsscreen](https://yetanotherforum.net/images/forum.png) 22 | 23 | ![topicsscreen](https://yetanotherforum.net/images/topic.png) 24 | 25 | Admin Control Panel 26 | ![adminpanel](https://yetanotherforum.net/images/admin.png) 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 | ![whatsnew](http://www.watchersnet.de/Portals/0/screenshots/dnn/ScreenshotYafLatestPosts.jpg) 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/App_LocalResources/YafDnnModule.ascx.de-DE.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | DNN-YAF Einstellungen bearbeiten 122 | 123 | 124 | DNN Benutzer Import 125 | 126 | -------------------------------------------------------------------------------- /yaf_dnn/App_LocalResources/YafDnnModule.ascx.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Edit DNN-YAF Settings 122 | 123 | 124 | DNN User Importer 125 | 126 | -------------------------------------------------------------------------------- /yaf_dnn/App_LocalResources/YafDnnModuleImport.ascx.de-DE.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | <- Zurück 122 | 123 | 124 | DNN Users in YAF importieren 125 | 126 | 127 | Yaf Benutzer Importer Zeitplan löschen 128 | 129 | 130 | Import ausführen 131 | 132 | 133 | Yaf Benutzer Importer Zeitplan installieren 134 | 135 | 136 | YAF Zeitplandienst Importer 137 | 138 | 139 | Sync Benutzer & Gruppen 140 | 141 | 142 | , Gruppen sind bereits syncronisiert! 143 | 144 | 145 | , aber alle Gruppen wurden syncronisiert! 146 | 147 | 148 | Yaf Benutzer Importer Zeitplan aktualisieren 149 | 150 | 151 | {0} Benutzer Importiert 152 | 153 | 154 | Option zum Installieren oder Entfernen des YAF Zeitplandienst zum autom. Benutzer & Gruppen syncronisieren. 155 | 156 | 157 | Alle Benutzer von diesem Portal importieren und Gruppen syncronisieren. 158 | 159 | -------------------------------------------------------------------------------- /yaf_dnn/App_LocalResources/YafDnnModuleImport.ascx.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | <- Go Back 122 | 123 | 124 | Import DNN Users to YAF 125 | 126 | 127 | Delete Yaf User Importer Schedule 128 | 129 | 130 | Import Now 131 | 132 | 133 | Install Yaf User Importer Schedule 134 | 135 | 136 | YAF Import Scheduler 137 | 138 | 139 | Import Users/Sync Roles 140 | 141 | 142 | , Roles already syncronized! 143 | 144 | 145 | , but all Roles are syncronized! 146 | 147 | 148 | Update Yaf User Importer Schedule 149 | 150 | 151 | {0} User(s) Imported 152 | 153 | 154 | Option to install or remove the YAF Scheduler for automatic User syncronization. 155 | 156 | 157 | Import all Users of your Portal and also syncronize Roles. 158 | 159 | -------------------------------------------------------------------------------- /yaf_dnn/App_LocalResources/YafDnnWhatsNew.ascx.de-DE.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Das Modul zeigt die Letzten Beiträge vom YetAnotherForum.Net Modul 122 | 123 | 124 | Gehen zum Letzten Beitrag 125 | 126 | 127 | Das Modul muss zunächst in den Modul Einstellungen konfiguriert werden. 128 | 129 | 130 | Es gibt derzeit keine Beiträge im Forum. 131 | 132 | -------------------------------------------------------------------------------- /yaf_dnn/App_LocalResources/YafDnnWhatsNew.ascx.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | This Module Shows the Latest Posts of a YetanotherForum.Net Module 122 | 123 | 124 | Go to last post 125 | 126 | 127 | Module needs to be configured in the Module Settings. 128 | 129 | 130 | Currently the Forum doesnt contain any Messages. 131 | 132 | -------------------------------------------------------------------------------- /yaf_dnn/App_LocalResources/YafDnnWhatsNewSettings.ascx.de-DE.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | YAF.WhatsNew Einstellungen 122 | 123 | 124 | Define the Number of how many Posts should been displayed. 125 | 126 | 127 | Max. Beiträge 128 | 129 | 130 | Wähelen Sie die Modul Instanz die Sie verwenden möchten. 131 | 132 | 133 | Select the YAF Page 134 | 135 | 136 | Hier definieren Sie welche Modul Instanz verwendet werden soll. Sie können außerdem bestimmen wie viele Beiträge angezeigt werden sollen. 137 | 138 | 139 | Passen Sie die Vorlage für den Fuß an. 140 | 141 | 142 | Html Fuß Vorlage 143 | 144 | 145 | Passen Sie die Vorlage für den Kopf an. 146 | 147 | 148 | Html Kopf Vorlage 149 | 150 | 151 | Passen Sie die Vorlage für das Element an. 152 | 153 | 154 | Html Element Vorlage 155 | 156 | 157 | The default Sort order for the Posts 158 | 159 | 160 | Sortierreinfolge 161 | 162 | -------------------------------------------------------------------------------- /yaf_dnn/App_LocalResources/YafDnnWhatsNewSettings.ascx.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | YAF.WhatsNew Settings 122 | 123 | 124 | Define the Number of how many Posts should been displayed. 125 | 126 | 127 | Max. Posts 128 | 129 | 130 | Select the Module Instance you want to use. 131 | 132 | 133 | Select the YAF Module Instance 134 | 135 | 136 | Here you have to define which YAF Module Instance you want to use. You can also define How many Posts should be displayed. 137 | 138 | 139 | Customize the template for the footer. 140 | 141 | 142 | Html Footer Template 143 | 144 | 145 | Customize the template for the header. 146 | 147 | 148 | Html Header Template 149 | 150 | 151 | Customize the template for the item. 152 | 153 | 154 | Html Item Template 155 | 156 | 157 | The default Sort order for the Posts 158 | 159 | 160 | Sort Order 161 | 162 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /yaf_dnn/BuildScripts/MSBuild.Community.Tasks.Targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(MSBuildProjectDirectory)\BuildScripts 7 | $(MSBuildProjectDirectory)\..\..\bin 8 | $(SolutionDir)packages\MSBuildTasks.1.5.0.235\tools\MSBuild.Community.Tasks.dll 9 | 10 | 11 | 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 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /yaf_dnn/Components/Controllers/DataController.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/1996f5f6efd6a366736b3fdcd8b8fd2dcfb0f437/yaf_dnn/Components/Controllers/DataController.cs -------------------------------------------------------------------------------- /yaf_dnn/Components/Controllers/UpgradeController.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/1996f5f6efd6a366736b3fdcd8b8fd2dcfb0f437/yaf_dnn/Components/Controllers/UpgradeController.cs -------------------------------------------------------------------------------- /yaf_dnn/Components/Integration/AspNetRoleManager.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 | * 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 | namespace YAF.DotNetNuke.Components.Integration; 26 | 27 | using System.Collections.Generic; 28 | 29 | /// 30 | /// The asp net role manager. 31 | /// 32 | [ExportService(ServiceLifetimeScope.Singleton)] 33 | public class AspNetRoleManager : RoleManager, IAspNetRoleManager 34 | { 35 | /// 36 | /// Initializes a new instance of the class. 37 | /// 38 | /// 39 | /// The store. 40 | /// 41 | public AspNetRoleManager(IRoleStore store) 42 | : base(store) 43 | { 44 | } 45 | 46 | /// 47 | /// The roles. 48 | /// 49 | public virtual IQueryable AspNetRoles => base.Roles; 50 | 51 | /// 52 | /// The get roles. 53 | /// 54 | /// 55 | /// The user. 56 | /// 57 | /// 58 | /// The . 59 | /// 60 | public IList GetRoles(AspNetUsers user) 61 | { 62 | var roles = BoardContext.Current.GetRepository().Get(r => r.UserID == user.Id.ToType()) 63 | .Select(r => r.RoleID).ToArray(); 64 | 65 | var roleNames = BoardContext.Current.GetRepository().GetAll().Where(r => roles.Contains(r.Id)) 66 | .Select(r => r.Name).ToList(); 67 | 68 | return Task.FromResult>(roleNames).Result; 69 | } 70 | 71 | /// 72 | /// The find by name. 73 | /// 74 | /// 75 | /// The role name. 76 | /// 77 | /// 78 | /// The . 79 | /// 80 | public AspNetRoles FindByName(string roleName) 81 | { 82 | return this.FindByNameAsync(roleName).Result; 83 | } 84 | 85 | /// 86 | /// Create a role 87 | /// 88 | /// 89 | /// The role. 90 | /// 91 | /// 92 | /// The . 93 | /// 94 | public IdentityResult Create( 95 | AspNetRoles role) 96 | { 97 | return this.CreateAsync(role).Result; 98 | } 99 | 100 | /// 101 | /// Delete a role 102 | /// 103 | /// 104 | /// The role. 105 | /// 106 | /// 107 | /// The . 108 | /// 109 | public IdentityResult Delete( 110 | AspNetRoles role) 111 | { 112 | return this.DeleteAsync(role).Result; 113 | } 114 | 115 | /// 116 | /// Returns true if the role exists 117 | /// 118 | /// 119 | /// The role Name. 120 | /// 121 | /// 122 | /// The . 123 | /// 124 | public bool RoleExists( 125 | string roleName) 126 | { 127 | return this.RoleExistsAsync(roleName).Result; 128 | } 129 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/Integration/RoleStore.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 | /// 28 | /// The role store. 29 | /// 30 | [ExportService(ServiceLifetimeScope.Singleton)] 31 | public class RoleStore : IQueryableRoleStore, 32 | IHaveServiceLocator 33 | { 34 | /// 35 | /// Initializes a new instance of the class. 36 | /// 37 | /// 38 | /// The service locator. 39 | /// 40 | public RoleStore(IServiceLocator serviceLocator) 41 | { 42 | this.ServiceLocator = serviceLocator; 43 | } 44 | 45 | /// 46 | /// Gets the service locator. 47 | /// 48 | public IServiceLocator ServiceLocator { get; } 49 | 50 | /// 51 | /// The roles. 52 | /// 53 | public virtual IQueryable Roles => this.GetRepository().GetAll().AsQueryable(); 54 | 55 | /// 56 | /// The create async. 57 | /// 58 | /// 59 | /// The role. 60 | /// 61 | /// 62 | /// The . 63 | /// 64 | public virtual Task CreateAsync(AspNetRoles role) 65 | { 66 | return Task.FromResult(0); 67 | } 68 | 69 | /// 70 | /// The delete async. 71 | /// 72 | /// 73 | /// The role. 74 | /// 75 | /// 76 | /// The . 77 | /// 78 | public virtual Task DeleteAsync(AspNetRoles role) 79 | { 80 | return Task.FromResult(0); 81 | } 82 | 83 | /// 84 | /// The find by id async. 85 | /// 86 | /// 87 | /// The role id. 88 | /// 89 | /// 90 | /// The . 91 | /// 92 | public virtual Task FindByIdAsync(string roleId) 93 | { 94 | return Task.FromResult(this.GetRepository().GetSingle(r => r.Id == roleId)); 95 | } 96 | 97 | /// 98 | /// The find by name async. 99 | /// 100 | /// 101 | /// The role name. 102 | /// 103 | /// 104 | /// The . 105 | /// 106 | public virtual Task FindByNameAsync(string roleName) 107 | { 108 | return Task.FromResult(this.GetRepository().GetSingle(r => r.Name == roleName)); 109 | } 110 | 111 | /// 112 | /// The update async. 113 | /// 114 | /// 115 | /// The role. 116 | /// 117 | /// 118 | /// The . 119 | /// 120 | public virtual Task UpdateAsync(AspNetRoles role) 121 | { 122 | return Task.FromResult(0); 123 | } 124 | 125 | /// 126 | /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. 127 | /// 128 | public void Dispose() 129 | { 130 | Dispose(true); 131 | GC.SuppressFinalize(this); 132 | } 133 | 134 | /// 135 | /// Releases unmanaged and - optionally - managed resources. 136 | /// 137 | /// true to release both managed and unmanaged resources; false to release only unmanaged resources. 138 | protected virtual void Dispose(bool disposing) 139 | { 140 | // Cleanup 141 | } 142 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/Integration/SendMail.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 | using System.Net.Mail; 29 | 30 | using global::DotNetNuke.Collections; 31 | using global::DotNetNuke.Entities.Host; 32 | using global::DotNetNuke.Services.Mail; 33 | 34 | using MailPriority = global::DotNetNuke.Services.Mail.MailPriority; 35 | 36 | /// 37 | /// Functions to send email via SMTP 38 | /// 39 | [ExportService(ServiceLifetimeScope.Singleton)] 40 | public class SendMail : IMailService, IHaveServiceLocator 41 | { 42 | /// 43 | /// Gets the service locator. 44 | /// 45 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator; 46 | 47 | /// 48 | /// Creates an SMTP Client and sends a MailMessage. 49 | /// 50 | /// 51 | /// The message. 52 | /// 53 | public void Send(MailMessage mailMessage) 54 | { 55 | var body = string.Empty; 56 | 57 | var mailIsHtml = false; 58 | 59 | if (mailMessage.AlternateViews.Count > 0) 60 | { 61 | var altView = mailMessage.AlternateViews[mailMessage.AlternateViews.Count > 1 ? 1 : 0]; 62 | 63 | mailIsHtml = altView.ContentType.MediaType.Equals("text/html"); 64 | 65 | using var reader = new StreamReader(altView.ContentStream); 66 | 67 | body = reader.ReadToEnd(); 68 | } 69 | 70 | string fromAddress; 71 | 72 | try 73 | { 74 | fromAddress = BoardContext.Current.BoardSettings.ForumEmail; 75 | } 76 | catch (Exception) 77 | { 78 | fromAddress = mailMessage.From.Address; 79 | } 80 | 81 | Mail.SendMail( 82 | fromAddress, 83 | mailMessage.To.ToString(), 84 | string.Empty, 85 | string.Empty, 86 | MailPriority.Normal, 87 | mailMessage.Subject, 88 | mailIsHtml ? MailFormat.Html : MailFormat.Text, 89 | mailMessage.BodyEncoding, 90 | body, 91 | string.Empty, 92 | Host.SMTPServer, 93 | Host.SMTPAuthentication, 94 | Host.SMTPUsername, 95 | Host.SMTPPassword); 96 | } 97 | 98 | /// 99 | /// Sends all MailMessages via the SMTP Client. Doesn't handle any exceptions. 100 | /// 101 | /// The messages. 102 | public void SendAll(IEnumerable messages) 103 | { 104 | var mailMessages = messages as IList ?? [.. messages]; 105 | 106 | mailMessages.ForEach( 107 | mailMessage => 108 | { 109 | try 110 | { 111 | // send the message... 112 | this.Send(mailMessage); 113 | } 114 | catch (Exception ex) 115 | { 116 | this.Get().Log("Mail Error", EventLogTypes.Error, null, null, ex); 117 | } 118 | }); 119 | } 120 | } -------------------------------------------------------------------------------- /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/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/Components/Tasks/YafDnnImportScheduler.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; 26 | 27 | /// 28 | /// The YAF DNN import scheduler. 29 | /// 30 | public class YafDnnImportScheduler : SchedulerClient 31 | { 32 | /// 33 | /// The info. 34 | /// 35 | private string info = string.Empty; 36 | 37 | /// 38 | /// Initializes a new instance of the class. 39 | /// 40 | /// 41 | /// The schedule history item. 42 | /// 43 | public YafDnnImportScheduler(ScheduleHistoryItem scheduleHistoryItem) 44 | { 45 | this.ScheduleHistoryItem = scheduleHistoryItem; 46 | } 47 | 48 | /// 49 | /// The do work. 50 | /// 51 | public override void DoWork() 52 | { 53 | try 54 | { 55 | this.GetSettings(); 56 | 57 | // report success to the scheduler framework 58 | this.ScheduleHistoryItem.Succeeded = true; 59 | 60 | this.ScheduleHistoryItem.AddLogNote(this.info); 61 | } 62 | catch (Exception exc) 63 | { 64 | this.ScheduleHistoryItem.Succeeded = false; 65 | this.ScheduleHistoryItem.AddLogNote($"EXCEPTION: {exc}"); 66 | this.Errored(ref exc); 67 | 68 | Exceptions.LogException(exc); 69 | } 70 | } 71 | 72 | /// 73 | /// Gets the settings. 74 | /// 75 | private void GetSettings() 76 | { 77 | var settings = new DataSet(); 78 | 79 | var filePath = $"{HttpRuntime.AppDomainAppPath}App_Data/YafImports.xml"; 80 | 81 | try 82 | { 83 | settings.ReadXml(filePath); 84 | } 85 | catch (Exception) 86 | { 87 | var file = new FileStream(filePath, FileMode.Create); 88 | var sw = new StreamWriter(file); 89 | 90 | sw.WriteLine(""); 91 | sw.WriteLine(""); 92 | sw.WriteLine(""); 93 | sw.WriteLine(""); 94 | 95 | sw.Close(); 96 | file.Close(); 97 | 98 | settings.ReadXml(filePath); 99 | } 100 | 101 | var boards = BoardContext.Current != null 102 | ? BoardContext.Current.GetRepository().GetAll() 103 | : BoardContext.Current.GetRepository().GetAll().Select(b => new Board { ID = b.ID }).ToList(); 104 | 105 | settings.Tables[0].Rows.Cast().ForEach(dataRow => 106 | { 107 | var boardId = dataRow["BoardId"].ToType(); 108 | var portalId = dataRow["PortalId"].ToType(); 109 | 110 | // check if board exist 111 | if (boards.Exists(b => b.ID.Equals(boardId))) 112 | { 113 | UserImporter.ImportUsers(boardId, portalId, out this.info); 114 | } 115 | }); 116 | } 117 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/Utils/RoleSyncronizer.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 | using System.Collections.Generic; 28 | 29 | /// 30 | /// YAF DNN Profile Synchronization 31 | /// 32 | public class RoleSyncronizer : PortalModuleBase 33 | { 34 | /// 35 | /// Synchronizes the user roles. 36 | /// 37 | /// The board id. 38 | /// The portal id. 39 | /// The YAF user id. 40 | /// The DNN user info. 41 | /// 42 | /// Returns if the Roles where synced or not 43 | /// 44 | public static bool SynchronizeUserRoles(int boardId, int portalId, int yafUserId, UserInfo dnnUserInfo) 45 | { 46 | // Make sure are roles exist 47 | ImportDnnRoles(boardId, dnnUserInfo.Roles); 48 | 49 | var yafUserRoles = DataController.GetYafUserRoles(yafUserId); 50 | 51 | var yafBoardRoles = BoardContext.Current.GetRepository().List(boardId: boardId); 52 | 53 | var rolesChanged = false; 54 | 55 | // add yaf only roles to yaf 56 | foreach (var boardRole in yafBoardRoles) 57 | { 58 | var roleFlags = new GroupFlags(boardRole.Flags); 59 | 60 | var role = new RoleInfo 61 | { 62 | RoleName = boardRole.Name, 63 | RoleID = boardRole.ID 64 | }; 65 | 66 | if (roleFlags.IsGuest) 67 | { 68 | continue; 69 | } 70 | 71 | if (roleFlags.IsStart) 72 | { 73 | if (yafUserRoles.Exists(existRole => existRole.RoleName.Equals(role.RoleName))) 74 | { 75 | continue; 76 | } 77 | 78 | UpdateUserRole(role, yafUserId, true); 79 | 80 | rolesChanged = true; 81 | } 82 | else 83 | { 84 | // ADD dnn super user manually to the administrator role 85 | if (role.RoleName.Equals("Administrators") && dnnUserInfo.IsSuperUser && !yafUserRoles.Exists(existRole => existRole.RoleName.Equals(role.RoleName))) 86 | { 87 | UpdateUserRole(role, yafUserId, true); 88 | } 89 | 90 | if (!dnnUserInfo.Roles.Exists(dnnRole => dnnRole.Equals(boardRole.Name))) 91 | { 92 | continue; 93 | } 94 | 95 | if (yafUserRoles.Exists(existRole => existRole.RoleName.Equals(role.RoleName))) 96 | { 97 | continue; 98 | } 99 | 100 | UpdateUserRole(role, yafUserId, true); 101 | 102 | rolesChanged = true; 103 | } 104 | } 105 | 106 | var roleController = new RoleController(); 107 | 108 | // Remove user from dnn role if no longer included 109 | foreach ( 110 | var role in 111 | roleController.GetRoles(portalId) 112 | .Where( 113 | role => 114 | !dnnUserInfo.Roles.Exists(existRole => existRole.Equals(role.RoleName)) 115 | && yafUserRoles.Exists(existRole => existRole.RoleName.Equals(role.RoleName)))) 116 | { 117 | UpdateUserRole(role, yafUserId, false); 118 | 119 | rolesChanged = true; 120 | } 121 | 122 | // empty out access table 123 | if (!rolesChanged || BoardContext.Current is null) 124 | { 125 | return rolesChanged; 126 | } 127 | 128 | BoardContext.Current.GetRepository().DeleteAll(); 129 | BoardContext.Current.GetRepository().DeleteAll(); 130 | 131 | return true; 132 | } 133 | 134 | /// 135 | /// Checks if the exists, in YAF, the user is in 136 | /// 137 | /// The board id. 138 | /// The . 139 | public static void ImportDnnRoles(int boardId, string[] roles) 140 | { 141 | var yafBoardRoles = DataController.GetYafBoardRoles(boardId); 142 | 143 | var yafBoardAccessMasks = DataController.GetYafBoardAccessMasks(boardId); 144 | 145 | // Check If Dnn Roles Exists in Yaf 146 | (from role in roles 147 | where role.IsSet() 148 | let any = yafBoardRoles.Exists(yafRole => yafRole.RoleName.Equals(role)) 149 | where !any 150 | select role).ForEach(role => CreateYafRole(role, boardId, yafBoardAccessMasks)); 151 | } 152 | 153 | /// 154 | /// Creates the YAF role. 155 | /// 156 | /// Name of the role. 157 | /// The board id. 158 | /// The YAF board access masks. 159 | /// 160 | /// Returns the Role id of the created Role 161 | /// 162 | public static long CreateYafRole(string roleName, int boardId, List yafBoardAccessMasks) 163 | { 164 | int accessMaskId; 165 | 166 | try 167 | { 168 | // Give the default DNN Roles Member Access, unknown roles get "No Access Mask" 169 | accessMaskId = roleName.Equals("Registered Users") || roleName.Equals("Subscribers") 170 | ? yafBoardAccessMasks.Find(mask => mask.RoleName.Equals("Member Access")).RoleID 171 | : yafBoardAccessMasks.Find(mask => mask.RoleName.Equals("No Access Mask")).RoleID; 172 | } 173 | catch (Exception) 174 | { 175 | accessMaskId = yafBoardAccessMasks.Find(mask => mask.RoleGroupID.Equals(0)).RoleID; 176 | } 177 | 178 | var groupFlags = new GroupFlags(); 179 | 180 | // Role exists in membership but not in yaf itself simply add it to yaf 181 | return BoardContext.Current.GetRepository().Save( 182 | null, 183 | boardId, 184 | roleName, 185 | groupFlags, 186 | accessMaskId, 187 | 0, 188 | null, 189 | 100, 190 | null, 191 | 0, 192 | null, 193 | 0, 194 | 0); 195 | } 196 | 197 | /// 198 | /// Updates the user . 199 | /// 200 | /// 201 | /// The . 202 | /// 203 | /// 204 | /// The YAF user id. 205 | /// 206 | /// 207 | /// if set to true [add role]. 208 | /// 209 | public static void UpdateUserRole(RoleInfo role, int yafUserId, bool addRole) 210 | { 211 | // save user in role 212 | BoardContext.Current.GetRepository().AddOrRemove(yafUserId, role.RoleID, addRole); 213 | } 214 | } -------------------------------------------------------------------------------- /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/Components/Utils/UserImporter.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 | using global::DotNetNuke.Common.Utilities; 28 | 29 | /// 30 | /// YAF User Importer 31 | /// 32 | public class UserImporter 33 | { 34 | /// 35 | /// Imports the users. 36 | /// 37 | /// The board id. 38 | /// The portal id. 39 | /// The information text. 40 | /// 41 | /// Returns the Number of Users that where imported 42 | /// 43 | public static int ImportUsers(int boardId, int portalId, out string info) 44 | { 45 | var newUserCount = 0; 46 | 47 | var users = UserController.GetUsers(portalId); 48 | 49 | // Inject SU here 50 | users.AddRange(UserController.GetUsers(false, true, Null.NullInteger)); 51 | 52 | users.Sort(new UserComparer()); 53 | 54 | // Load Yaf Board Settings if needed 55 | var boardSettings = BoardContext.Current is null 56 | ? BoardContext.Current.Get().LoadBoardSettings(boardId, null) 57 | : BoardContext.Current.Get(); 58 | 59 | var rolesChanged = false; 60 | 61 | try 62 | { 63 | users.Cast().ForEach( 64 | dnnUserInfo => 65 | { 66 | var yafUser = BoardContext.Current.GetRepository() 67 | .GetUserByProviderKey(boardId, dnnUserInfo.UserID.ToString()); 68 | 69 | if (yafUser != null) 70 | { 71 | rolesChanged = RoleSyncronizer.SynchronizeUserRoles( 72 | boardId, 73 | portalId, 74 | yafUser.ID, 75 | dnnUserInfo); 76 | 77 | // super admin check... 78 | if (dnnUserInfo.IsSuperUser) 79 | { 80 | SetYafHostUser(yafUser.ID, boardId); 81 | } 82 | } 83 | else 84 | { 85 | // Update UserID fom YAF < 3 86 | yafUser = BoardContext.Current.GetRepository().GetSingle( 87 | u => u.Name == dnnUserInfo.Username && u.Email == dnnUserInfo.Email); 88 | 89 | if (yafUser != null) 90 | { 91 | // update provider Key 92 | BoardContext.Current.GetRepository().UpdateOnly( 93 | () => new User { ProviderUserKey = dnnUserInfo.UserID.ToString() }, 94 | u => u.ID == yafUser.ID); 95 | 96 | rolesChanged = RoleSyncronizer.SynchronizeUserRoles( 97 | boardId, 98 | portalId, 99 | yafUser.ID, 100 | dnnUserInfo); 101 | } 102 | else 103 | { 104 | // Create user if Not Exist 105 | CreateYafUser(dnnUserInfo, boardId, portalId, boardSettings); 106 | newUserCount++; 107 | } 108 | } 109 | }); 110 | 111 | BoardContext.Current.Get().Clear(); 112 | 113 | DataCache.ClearCache(); 114 | } 115 | catch (Exception ex) 116 | { 117 | Exceptions.LogException(ex); 118 | } 119 | 120 | info = 121 | $"{newUserCount} User(s) Imported, all user profiles are synchronized{(rolesChanged ? ", but all User Roles are synchronized!" : ", User Roles already synchronized!")}"; 122 | 123 | return newUserCount; 124 | } 125 | 126 | /// 127 | /// Creates the YAF user. 128 | /// 129 | /// The DNN user info. 130 | /// The board ID. 131 | /// The portal identifier. 132 | /// The board settings. 133 | /// 134 | /// Returns the User ID of the new User 135 | /// 136 | public static int CreateYafUser( 137 | UserInfo dnnUserInfo, 138 | int boardId, 139 | int portalId, 140 | BoardSettings boardSettings) 141 | { 142 | // create the user in the YAF DB so profile can gets created... 143 | var yafUserId = BoardContext.Current.Get().CreateForumUser( 144 | dnnUserInfo.ToAspNetUsers(), 145 | dnnUserInfo.DisplayName, 146 | boardId); 147 | 148 | if (yafUserId is null) 149 | { 150 | return 0; 151 | } 152 | 153 | var autoWatchTopicsEnabled = 154 | boardSettings.DefaultNotificationSetting.Equals(UserNotificationSetting.TopicsIPostToOrSubscribeTo); 155 | 156 | // save notification Settings 157 | BoardContext.Current.GetRepository().SaveNotification( 158 | yafUserId.Value, 159 | true, 160 | autoWatchTopicsEnabled, 161 | boardSettings.DefaultNotificationSetting.ToInt(), 162 | boardSettings.DefaultSendDigestEmail); 163 | 164 | RoleSyncronizer.SynchronizeUserRoles(boardId, portalId, yafUserId.ToType(), dnnUserInfo); 165 | 166 | return yafUserId.ToType(); 167 | } 168 | 169 | /// 170 | /// Set the User as Host user if not already 171 | /// 172 | /// The YAF user id. 173 | /// The board id. 174 | public static void SetYafHostUser(int yafUserId, int boardId) 175 | { 176 | // get this user information... 177 | var userInfo = BoardContext.Current.GetRepository().GetById(yafUserId); 178 | 179 | if (userInfo is null) 180 | { 181 | return; 182 | } 183 | 184 | if (userInfo.UserFlags.IsHostAdmin) 185 | { 186 | return; 187 | } 188 | 189 | // fix the IsHostAdmin flag... 190 | var userFlags = new UserFlags(userInfo.Flags) { IsHostAdmin = true }; 191 | 192 | // update... 193 | BoardContext.Current.GetRepository().AdminSave( 194 | boardId, 195 | yafUserId, 196 | userFlags.BitValue, 197 | userInfo.RankID); 198 | } 199 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/WebAPI/AlbumController.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 | using System.Collections.Generic; 28 | 29 | /// 30 | /// The YAF Album controller. 31 | /// 32 | public class AlbumController : DnnApiController, IHaveServiceLocator 33 | { 34 | /// 35 | /// Gets ServiceLocator. 36 | /// 37 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator; 38 | 39 | /// 40 | /// Change the album title. 41 | /// 42 | [DnnAuthorize] 43 | [HttpPost] 44 | public IHttpActionResult ChangeAlbumTitle() 45 | { 46 | var imageId = this.Get().Form["id"].ToType(); 47 | var newCaption = HttpUtility.HtmlEncode(this.Get().Form["value"].Trim()); 48 | 49 | if (newCaption.Equals(this.Get().GetText("ALBUM_CHANGE_TITLE"))) 50 | { 51 | return this.Ok(); 52 | } 53 | 54 | this.Get().ChangeAlbumTitle(imageId, newCaption); 55 | 56 | return this.Ok(); 57 | } 58 | 59 | /// 60 | /// Change the album image caption. 61 | /// 62 | [DnnAuthorize] 63 | [HttpPost] 64 | public IHttpActionResult ChangeImageCaption() 65 | { 66 | var imageId = this.Get().Form["id"].ToType(); 67 | var newCaption = HttpUtility.HtmlEncode(this.Get().Form["value"].Trim()); 68 | 69 | if (newCaption.Equals(this.Get().GetText("ALBUM_IMAGE_CHANGE_CAPTION")) 70 | || newCaption.Equals(this.Get().GetText("ALBUM_IMAGE_CHANGE_CAPTION2"))) 71 | { 72 | return this.Ok(); 73 | } 74 | 75 | this.Get().ChangeImageCaption(imageId, newCaption); 76 | 77 | return this.Ok(); 78 | } 79 | 80 | /// 81 | /// Gets the paged album images 82 | /// 83 | /// 84 | /// The paged Results. 85 | /// 86 | /// 87 | /// Returns the Attachment List as Grid Data Set 88 | /// 89 | [DnnAuthorize] 90 | [HttpPost] 91 | public IHttpActionResult GetAlbumImages(PagedResults pagedResults) 92 | { 93 | var userId = BoardContext.Current.PageUserID; 94 | var pageSize = pagedResults.PageSize; 95 | var pageNumber = pagedResults.PageNumber; 96 | 97 | var albumImages = this.GetRepository().GetUserAlbumImagesPaged( 98 | userId, 99 | pageNumber, 100 | pageSize); 101 | 102 | var images = new List(); 103 | 104 | albumImages.ForEach( 105 | image => 106 | { 107 | var url = $"{BoardInfo.ForumClientFileRoot}resource.ashx?imgprv={image.ID}"; 108 | 109 | var attachment = new AttachmentItem 110 | { 111 | FileName = image.FileName, 112 | OnClick = $"setStyle('albumimg', '{image.ID}')", 113 | IconImage = 114 | $"""{(image.Caption.IsSet() ? image.Caption : image.FileName)}""", 115 | DataURL = url 116 | }; 117 | 118 | images.Add(attachment); 119 | }); 120 | 121 | return this.Ok( 122 | new GridDataSet 123 | { 124 | PageNumber = pageNumber, 125 | TotalRecords = 126 | albumImages.Any() 127 | ? this.GetRepository().GetUserAlbumImageCount(userId) 128 | : 0, 129 | PageSize = pageSize, 130 | AttachmentList = images 131 | }); 132 | } 133 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/WebAPI/AttachmentController.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 | using System.Collections.Generic; 28 | 29 | /// 30 | /// The YAF Attachment controller. 31 | /// 32 | public class AttachmentController : DnnApiController, IHaveServiceLocator 33 | { 34 | /// 35 | /// Gets ServiceLocator. 36 | /// 37 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator; 38 | 39 | /// 40 | /// Gets the paged attachments. 41 | /// 42 | /// 43 | /// The paged Results. 44 | /// 45 | /// 46 | /// Returns the Attachment List as Grid Data Set 47 | /// 48 | [DnnAuthorize] 49 | [HttpPost] 50 | public IHttpActionResult GetAttachments([FromBody] PagedResults pagedResults) 51 | { 52 | var userId = BoardContext.Current.PageUserID; 53 | var pageSize = pagedResults.PageSize; 54 | var pageNumber = pagedResults.PageNumber; 55 | 56 | var attachments = this.GetRepository().GetPaged( 57 | a => a.UserID == userId, 58 | pageNumber, 59 | pageSize); 60 | 61 | var attachmentItems = new List(); 62 | 63 | attachments.ForEach( 64 | attach => 65 | { 66 | var url = 67 | $"{BoardInfo.ForumClientFileRoot}resource.ashx?i={attach.ID}&editor=true"; 68 | 69 | var description = $"{attach.FileName} ({attach.Bytes / 1024} kb)"; 70 | 71 | var iconImage = attach.FileName.IsImageName() 72 | ? $"""{description}""" 73 | : ""; 74 | 75 | var attachment = new AttachmentItem 76 | { 77 | FileName = attach.FileName, 78 | OnClick = $"insertAttachment('{attach.ID}', '{url}')", 79 | IconImage = $@"{iconImage}{description}" 80 | }; 81 | 82 | if (attach.FileName.IsImageName()) 83 | { 84 | attachment.DataURL = url; 85 | } 86 | 87 | attachmentItems.Add(attachment); 88 | }); 89 | 90 | return this.Ok( 91 | new GridDataSet 92 | { 93 | PageNumber = pageNumber, 94 | TotalRecords = 95 | attachments.Any() 96 | ? this.GetRepository().Count(a => a.UserID == userId) 97 | .ToType() 98 | : 0, 99 | PageSize = pageSize, 100 | AttachmentList = attachmentItems 101 | }); 102 | } 103 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/WebAPI/ForumController.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 | using System.Collections.Generic; 28 | 29 | /// 30 | /// The YAF Forum controller. 31 | /// 32 | public class ForumController : DnnApiController, IHaveServiceLocator 33 | { 34 | /// 35 | /// Gets ServiceLocator. 36 | /// 37 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator; 38 | 39 | /// 40 | /// Gets the topics by forum. 41 | /// 42 | /// 43 | /// The search Topic. 44 | /// 45 | /// 46 | /// The . 47 | /// 48 | [HttpPost] 49 | [DnnAuthorize] 50 | public IHttpActionResult GetForums(SearchTopic searchTopic) 51 | { 52 | if (searchTopic.SearchTerm.IsSet()) 53 | { 54 | var forums = this.GetRepository().ListAllSorted( 55 | BoardContext.Current.PageBoardID, 56 | BoardContext.Current.PageUserID, 57 | searchTopic.SearchTerm.ToLower()); 58 | 59 | var pagedForums = new SelectPagedGroupOptions { Total = forums.Count, Results = forums }; 60 | 61 | return this.Ok(pagedForums); 62 | } 63 | else 64 | { 65 | var forums = this.GetRepository().ListAllSorted( 66 | BoardContext.Current.PageBoardID, 67 | BoardContext.Current.PageUserID, 68 | searchTopic.Page, 69 | 20, 70 | out var pager); 71 | 72 | if (searchTopic.AllForumsOption) 73 | { 74 | forums.Insert( 75 | 0, 76 | new SelectGroup 77 | { 78 | text = BoardContext.Current.Get().GetText("ALL_CATEGORIES"), 79 | children = 80 | [ 81 | new() 82 | { 83 | id = "0", 84 | text = BoardContext.Current.Get() 85 | .GetText("ALL_FORUMS") 86 | } 87 | ] 88 | }); 89 | } 90 | 91 | var pagedForums = new SelectPagedGroupOptions 92 | { 93 | Total = forums.Any() ? pager.Count : 0, 94 | Results = forums 95 | }; 96 | 97 | return this.Ok(pagedForums); 98 | } 99 | } 100 | 101 | /// 102 | /// Get Forum 103 | /// 104 | /// 105 | /// The forum id. 106 | /// 107 | /// 108 | /// The . 109 | /// 110 | [HttpPost] 111 | [DnnAuthorize] 112 | public IHttpActionResult GetForum([FromBody] int forumId) 113 | { 114 | var forums = new List(); 115 | 116 | if (forumId.Equals(0)) 117 | { 118 | forums.Insert( 119 | 0, 120 | new SelectGroup 121 | { 122 | text = BoardContext.Current.Get().GetText("ALL_CATEGORIES"), 123 | children = 124 | [ 125 | new() 126 | { 127 | id = "0", 128 | text = BoardContext.Current.Get() 129 | .GetText("ALL_FORUMS") 130 | } 131 | ] 132 | }); 133 | } 134 | else 135 | { 136 | forums = this.GetRepository().ListAllSorted( 137 | BoardContext.Current.PageBoardID, 138 | BoardContext.Current.PageUserID, 139 | forumId); 140 | } 141 | 142 | var pagedForums = new SelectPagedGroupOptions { Total = forums.Count, Results = forums }; 143 | 144 | return this.Ok(pagedForums); 145 | } 146 | } -------------------------------------------------------------------------------- /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/WebAPI/NotifyController.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 | using System.Collections.Generic; 28 | using System.Web.UI.WebControls; 29 | 30 | /// 31 | /// The Notifications controller. 32 | /// 33 | public class NotifyController : DnnApiController, IHaveServiceLocator 34 | { 35 | /// 36 | /// Gets ServiceLocator. 37 | /// 38 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator; 39 | 40 | /// 41 | /// Gets the paged attachments. 42 | /// 43 | /// 44 | /// The paged Results. 45 | /// 46 | /// 47 | /// Returns the Attachment List as Grid Data Set 48 | /// 49 | [DnnAuthorize] 50 | [HttpPost] 51 | public IHttpActionResult GetNotifications(PagedResults pagedResults) 52 | { 53 | var userId = pagedResults.UserId; 54 | var pageSize = pagedResults.PageSize; 55 | var pageNumber = pagedResults.PageNumber; 56 | 57 | var activities = this.GetRepository().GetPaged( 58 | a => a.UserID == userId && a.FromUserID.HasValue && a.Notification, 59 | pageNumber, 60 | pageSize); 61 | 62 | var attachmentItems = new List(); 63 | 64 | activities.ForEach( 65 | activity => 66 | { 67 | if (!activity.TopicID.HasValue || !activity.FromUserID.HasValue || !activity.MessageID.HasValue) 68 | { 69 | return; 70 | } 71 | 72 | var messageHolder = new PlaceHolder(); 73 | var iconLabel = new Label { CssClass = "fa-stack" }; 74 | 75 | var message = string.Empty; 76 | var icon = string.Empty; 77 | 78 | var topic = this.GetRepository().GetById(activity.TopicID.Value); 79 | 80 | var topicLink = new HyperLink 81 | { 82 | NavigateUrl = 83 | BoardContext.Current.Get().GetLink( 84 | ForumPages.Posts, 85 | new { m = activity.MessageID.Value, name = topic.TopicName }), 86 | Text = 87 | $"""{this.GetRepository().GetById(activity.TopicID.Value).TopicName}""" 88 | }; 89 | 90 | var name = this.Get().GetNameById(activity.FromUserID.Value); 91 | 92 | if (activity.ActivityFlags.ReceivedThanks) 93 | { 94 | icon = "heart"; 95 | message = this.Get().GetTextFormatted( 96 | "RECEIVED_THANKS_MSG", 97 | name, 98 | topicLink.RenderToString()); 99 | } 100 | 101 | if (activity.ActivityFlags.WasMentioned) 102 | { 103 | icon = "at"; 104 | message = this.Get().GetTextFormatted( 105 | "WAS_MENTIONED_MSG", 106 | name, 107 | topicLink.RenderToString()); 108 | } 109 | 110 | if (activity.ActivityFlags.WasQuoted) 111 | { 112 | icon = "quote-left"; 113 | message = this.Get().GetTextFormatted( 114 | "WAS_QUOTED_MSG", 115 | name, 116 | topicLink.RenderToString()); 117 | } 118 | 119 | if (activity.ActivityFlags.WatchForumReply) 120 | { 121 | icon = "comments"; 122 | message = this.Get().GetTextFormatted( 123 | "WATCH_FORUM_MSG", 124 | name, 125 | topicLink.RenderToString()); 126 | } 127 | 128 | if (activity.ActivityFlags.WatchTopicReply) 129 | { 130 | icon = "comment"; 131 | message = this.Get().GetTextFormatted( 132 | "WATCH_TOPIC_MSG", 133 | name, 134 | topicLink.RenderToString()); 135 | } 136 | 137 | var notify = activity.Notification ? "text-success" : "text-secondary"; 138 | 139 | iconLabel.Text = $""" 140 | 141 | """; 142 | 143 | messageHolder.Controls.Add(iconLabel); 144 | 145 | messageHolder.Controls.Add(new Literal { Text = message }); 146 | 147 | var attachment = new AttachmentItem 148 | { 149 | FileName = messageHolder.RenderToString() 150 | }; 151 | 152 | attachmentItems.Add(attachment); 153 | }); 154 | 155 | return this.Ok( 156 | new GridDataSet 157 | { 158 | PageNumber = pageNumber, 159 | TotalRecords = 160 | activities.Any() 161 | ? this.GetRepository().Count(a => a.UserID == userId && a.FromUserID.HasValue && a.Notification) 162 | .ToType() 163 | : 0, 164 | PageSize = pageSize, 165 | AttachmentList = attachmentItems 166 | }); 167 | } 168 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/WebAPI/RouteMapper.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 | using System.Web.Http.WebHost; 28 | using System.Web.Routing; 29 | using System.Web.SessionState; 30 | 31 | /// 32 | /// The route mapper. 33 | /// 34 | public class RouteMapper : IServiceRouteMapper 35 | { 36 | /// 37 | /// The register routes. 38 | /// 39 | /// 40 | /// The map route manager. 41 | /// 42 | public void RegisterRoutes(IMapRoute mapRouteManager) 43 | { 44 | var routeFavorite = mapRouteManager.MapHttpRoute( 45 | "YetAnotherForumDotNet", 46 | "favorite", 47 | "{controller}/{action}/{id}", 48 | new { action = RouteParameter.Optional, id = RouteParameter.Optional }, 49 | ["YAF.DotNetNuke.Components.WebAPI"]); 50 | 51 | routeFavorite.ForEach(r => r.RouteHandler = new SessionBasedControllerRouteHandler()); 52 | 53 | var route = mapRouteManager.MapHttpRoute( 54 | "YetAnotherForumDotNet", 55 | "default", 56 | "{controller}/{action}", 57 | ["YAF.DotNetNuke.Components.WebAPI"]); 58 | 59 | route.ForEach(r => r.RouteHandler = new SessionBasedControllerRouteHandler()); 60 | } 61 | 62 | /// 63 | /// The session based controller handler. 64 | /// 65 | public class SessionBasedControllerHandler : HttpControllerHandler, IRequiresSessionState 66 | { 67 | /// 68 | /// Initializes a new instance of the class. 69 | /// 70 | /// 71 | /// The route data. 72 | /// 73 | public SessionBasedControllerHandler(RouteData routeData) : base(routeData) 74 | { 75 | } 76 | } 77 | 78 | /// 79 | /// The session based controller route handler. 80 | /// 81 | public class SessionBasedControllerRouteHandler : HttpControllerRouteHandler 82 | { 83 | /// 84 | /// The get http handler. 85 | /// 86 | /// 87 | /// The request context. 88 | /// 89 | /// 90 | /// The . 91 | /// 92 | protected override IHttpHandler GetHttpHandler(RequestContext requestContext) 93 | { 94 | return new SessionBasedControllerHandler(requestContext.RouteData); 95 | } 96 | } 97 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/WebAPI/SearchController.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 Search controller. 29 | /// 30 | public class SearchController : DnnApiController, IHaveServiceLocator 31 | { 32 | /// 33 | /// Gets ServiceLocator. 34 | /// 35 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator; 36 | 37 | /// 38 | /// Get similar topic titles 39 | /// 40 | /// 41 | /// The search Topic. 42 | /// 43 | /// 44 | /// Returns the search Results. 45 | /// 46 | [HttpPost] 47 | [AllowAnonymous] 48 | public IHttpActionResult GetSimilarTitles([FromBody] SearchTopic searchTopic) 49 | { 50 | var results = this.Get().SearchSimilar( 51 | string.Empty, 52 | searchTopic.SearchTerm, 53 | "Topic"); 54 | 55 | if (results is null) 56 | { 57 | return this.Ok( 58 | new SearchGridDataSet 59 | { 60 | PageNumber = 0, 61 | TotalRecords = 0, 62 | PageSize = 0 63 | }); 64 | } 65 | 66 | return this.Ok( 67 | new SearchGridDataSet 68 | { 69 | PageNumber = 1, TotalRecords = results.Count, PageSize = 20, SearchResults = results 70 | }); 71 | } 72 | 73 | /// 74 | /// Gets the search results. 75 | /// 76 | /// 77 | /// The search Topic. 78 | /// 79 | /// 80 | /// Returns the search Results. 81 | /// 82 | [HttpPost] 83 | [AllowAnonymous] 84 | public IHttpActionResult GetSearchResults([FromBody] SearchTopic searchTopic) 85 | { 86 | var results = this.Get().SearchPaged( 87 | out var totalHits, 88 | searchTopic.ForumId, 89 | searchTopic.SearchTerm, 90 | searchTopic.Page, 91 | searchTopic.PageSize); 92 | 93 | return this.Ok( 94 | new SearchGridDataSet 95 | { 96 | PageNumber = searchTopic.Page, 97 | TotalRecords = totalHits, 98 | PageSize = searchTopic.PageSize, 99 | SearchResults = results 100 | }); 101 | } 102 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/WebAPI/TagsController.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 Tags controller. 29 | /// 30 | [RoutePrefix("api")] 31 | public class TagsController : DnnApiController, IHaveServiceLocator 32 | { 33 | /// 34 | /// Gets ServiceLocator. 35 | /// 36 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator; 37 | 38 | /// 39 | /// Get all tags by Board Id 40 | /// 41 | /// 42 | /// The search Topic. 43 | /// 44 | /// 45 | /// Returns list of all tags. 46 | /// 47 | [DnnAuthorize] 48 | [HttpPost] 49 | public IHttpActionResult GetBoardTags(SearchTopic searchTopic) 50 | { 51 | var tags = this.Get().GetOrSet( 52 | $"Tags_{BoardContext.Current.PageBoardID}", 53 | () => this.GetRepository().GetByBoardId(), 54 | TimeSpan.FromMinutes(5)); 55 | 56 | if (searchTopic.SearchTerm.IsSet()) 57 | { 58 | var tagsList = tags 59 | .Where(tag => tag.TagName.ToLower().Contains(searchTopic.SearchTerm.ToLower())) 60 | .Select( 61 | tag => new SelectOptions 62 | { 63 | text = tag.TagName, 64 | id = tag.ID.ToString() 65 | }).ToList(); 66 | 67 | var pagedTags = new SelectPagedOptions { Total = 0, Results = tagsList }; 68 | 69 | return this.Ok(pagedTags); 70 | } 71 | else 72 | { 73 | var pager = new Paging { CurrentPageIndex = searchTopic.Page, PageSize = 20 }; 74 | 75 | var tagsPaged = tags.GetPaged(pager); 76 | var tagsList = (from Tag tag in tagsPaged 77 | select new SelectOptions 78 | { 79 | text = tag.TagName, 80 | id = tag.ID.ToString() 81 | }).ToList(); 82 | 83 | var pagedTags = new SelectPagedOptions 84 | { 85 | Total = tagsList.Any() ? tags.Count : 0, 86 | Results = tagsList 87 | }; 88 | 89 | return this.Ok(pagedTags); 90 | } 91 | } 92 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/WebAPI/ThankYouController.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 ThankYou controller. 29 | /// 30 | public class ThankYouController : DnnApiController, IHaveServiceLocator 31 | { 32 | /// 33 | /// Gets ServiceLocator. 34 | /// 35 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator; 36 | 37 | /// 38 | /// Add Thanks to post 39 | /// 40 | /// 41 | /// The message Id. 42 | /// 43 | /// 44 | /// Returns ThankYou Info 45 | /// 46 | [DnnAuthorize] 47 | [HttpPost] 48 | public IHttpActionResult GetThanks(int id) 49 | { 50 | var membershipUser = this.Get().GetUser(); 51 | 52 | if (membershipUser is null) 53 | { 54 | return this.NotFound(); 55 | } 56 | 57 | var message = this.GetRepository().GetById(id); 58 | 59 | var userName = this.Get().GetNameById(message.UserID); 60 | 61 | // if the user is empty, return a null object... 62 | return userName.IsNotSet() 63 | ? this.NotFound() 64 | : this.Ok( 65 | this.Get().GetThankYou( 66 | new UnicodeEncoder().XSSEncode(userName), 67 | "BUTTON_THANKSDELETE", 68 | "BUTTON_THANKSDELETE_TT", 69 | id)); 70 | } 71 | 72 | /// 73 | /// Add Thanks to post 74 | /// 75 | /// 76 | /// The message Id. 77 | /// 78 | /// 79 | /// Returns ThankYou Info 80 | /// 81 | [DnnAuthorize] 82 | [HttpPost] 83 | public IHttpActionResult AddThanks(int id) 84 | { 85 | var membershipUser = BoardContext.Current.Get().GetUser(); 86 | 87 | if (membershipUser is null) 88 | { 89 | return this.NotFound(); 90 | } 91 | 92 | var fromUser = BoardContext.Current.Get() 93 | .GetUserFromProviderUserKey(membershipUser.Id); 94 | 95 | var message = this.GetRepository().GetById(id); 96 | 97 | var userName = this.Get().GetNameById(message.UserID); 98 | 99 | this.GetRepository().AddMessageThanks(fromUser.ID, message.UserID, id); 100 | 101 | this.Get().AddThanksReceivedToStream(message.UserID, message.TopicID, id, fromUser.ID); 102 | this.Get().AddThanksGivenToStream(fromUser.ID, message.TopicID, id, message.UserID); 103 | 104 | // if the user is empty, return a null object... 105 | return userName.IsNotSet() 106 | ? this.NotFound() 107 | : this.Ok( 108 | this.Get().CreateThankYou( 109 | new UnicodeEncoder().XSSEncode(userName), 110 | "BUTTON_THANKSDELETE", 111 | "BUTTON_THANKSDELETE_TT", 112 | id)); 113 | } 114 | 115 | /// 116 | /// This method is called asynchronously when the user clicks on "Remove Thank" button. 117 | /// 118 | /// 119 | /// The message Id. 120 | /// 121 | /// 122 | /// Returns ThankYou Info 123 | /// 124 | [DnnAuthorize] 125 | [HttpPost] 126 | public IHttpActionResult RemoveThanks(int id) 127 | { 128 | var message = this.GetRepository().GetById(id); 129 | 130 | var userName = this.Get().GetNameById(message.UserID); 131 | 132 | this.GetRepository().RemoveMessageThanks( 133 | BoardContext.Current.PageUserID, 134 | id); 135 | 136 | this.GetRepository().Delete(a => a.MessageID == id && (a.Flags == 1024 || a.Flags == 2048)); 137 | 138 | return this.Ok(this.Get().CreateThankYou(userName, "BUTTON_THANKS", "BUTTON_THANKS_TT", id)); 139 | } 140 | } -------------------------------------------------------------------------------- /yaf_dnn/Components/WebAPI/TopicController.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 Topic controller. 29 | /// 30 | public class TopicController : DnnApiController, IHaveServiceLocator 31 | { 32 | /// 33 | /// Gets ServiceLocator. 34 | /// 35 | public IServiceLocator ServiceLocator => BoardContext.Current.ServiceLocator; 36 | 37 | /// 38 | /// Gets the topics by forum. 39 | /// 40 | /// 41 | /// The search Topic. 42 | /// 43 | /// 44 | /// The . 45 | /// 46 | [HttpPost] 47 | [DnnAuthorize] 48 | public IHttpActionResult GetTopics([FromBody] SearchTopic searchTopic) 49 | { 50 | if (!BoardContext.Current.IsAdmin && !BoardContext.Current.IsForumModerator) 51 | { 52 | return this.NotFound(); 53 | } 54 | 55 | if (searchTopic.SearchTerm.IsSet()) 56 | { 57 | var topics = this.Get().GetOrSet( 58 | $"TopicsList_{searchTopic.ForumId}", 59 | () => this.GetRepository().Get(t => t.ForumID == searchTopic.ForumId), 60 | TimeSpan.FromMinutes(5)); 61 | 62 | topics.RemoveAll(t => t.ID == searchTopic.TopicId); 63 | 64 | var topicsList = topics 65 | .Where(topic => topic.TopicName.ToLower().Contains(searchTopic.SearchTerm.ToLower())) 66 | .Select( 67 | topic => new SelectOptions 68 | { 69 | text = topic.TopicName, 70 | id = topic.ID.ToString() 71 | }).ToList(); 72 | 73 | var pagedTopics = new SelectPagedOptions { Total = 0, Results = topicsList }; 74 | 75 | return this.Ok(pagedTopics); 76 | } 77 | else 78 | { 79 | var topics = this.GetRepository().ListPaged( 80 | searchTopic.ForumId, 81 | BoardContext.Current.PageUserID, 82 | DateTimeHelper.SqlDbMinTime(), 83 | searchTopic.Page, 84 | 15, 85 | false); 86 | 87 | topics.RemoveAll(t => t.TopicID == searchTopic.TopicId); 88 | 89 | var topicsList = (from PagedTopic topic in topics 90 | select new SelectOptions 91 | { 92 | text = topic.Subject, 93 | id = topic.TopicID.ToString() 94 | }).ToList(); 95 | 96 | var pagedTopics = new SelectPagedOptions 97 | { 98 | Total = topics.Any() ? topics.FirstOrDefault().TotalRows : 0, 99 | Results = topicsList 100 | }; 101 | 102 | return this.Ok(pagedTopics); 103 | } 104 | } 105 | } -------------------------------------------------------------------------------- /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/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/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 | } -------------------------------------------------------------------------------- /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/Installation/02.30.005901.txt: -------------------------------------------------------------------------------- 1 | DesktopModules\YetAnotherForumDotNet\Content\ceebox\cee-next-btn.gif 2 | DesktopModules\YetAnotherForumDotNet\Content\ceebox\cee-prev-btn.gif 3 | DesktopModules\YetAnotherForumDotNet\Content\ceebox\loader.gif 4 | DesktopModules\YetAnotherForumDotNet\Content\ceebox\cee-close-btn.png 5 | DesktopModules\YetAnotherForumDotNet\Content\ceebox\cee-next-btn.png 6 | DesktopModules\YetAnotherForumDotNet\Content\ceebox\cee-prev-btn.png 7 | DesktopModules\YetAnotherForumDotNet\Content\ceebox\ 8 | 9 | DesktopModules\YetAnotherForumDotNet\Content\css\select2.css 10 | DesktopModules\YetAnotherForumDotNet\Content\css\select2.min.css 11 | DesktopModules\YetAnotherForumDotNet\Content\css\ 12 | 13 | DesktopModules\YetAnotherForumDotNet\Content\icons\ 14 | DesktopModules\YetAnotherForumDotNet\Content\images\flags\ 15 | DesktopModules\YetAnotherForumDotNet\Content\images\fonts\ 16 | 17 | DesktopModules\YetAnotherForumDotNet\Content\images\asc.gif 18 | DesktopModules\YetAnotherForumDotNet\Content\images\bg.gif 19 | DesktopModules\YetAnotherForumDotNet\Content\images\desc.gif 20 | DesktopModules\YetAnotherForumDotNet\Content\images\loader.gif 21 | DesktopModules\YetAnotherForumDotNet\Content\images\progressbar.gif 22 | DesktopModules\YetAnotherForumDotNet\Content\images\closelabel.png 23 | DesktopModules\YetAnotherForumDotNet\Content\images\HiddenWarnDescription.png 24 | 25 | DesktopModules\YetAnotherForumDotNet\Content\bootstrap-forum.min.css 26 | 27 | DesktopModules\YetAnotherForumDotNet\themes\ 28 | DesktopModules\YetAnotherForumDotNet\languages\admin\ 29 | DesktopModules\YetAnotherForumDotNet\languages\help\ 30 | DesktopModules\YetAnotherForumDotNet\languages\install\ 31 | 32 | DesktopModules\YetAnotherForumDotNet\controls\AttachmentsUploadDialog.ascx 33 | DesktopModules\YetAnotherForumDotNet\controls\DialogBox.ascx 34 | DesktopModules\YetAnotherForumDotNet\controls\LoginBox.ascx 35 | DesktopModules\YetAnotherForumDotNet\controls\ShoutBox.ascx 36 | 37 | DesktopModules\YetAnotherForumDotNet\Images\emoticons\ 38 | DesktopModules\YetAnotherForumDotNet\Images\document.png 39 | DesktopModules\YetAnotherForumDotNet\Images\folder.gif 40 | DesktopModules\YetAnotherForumDotNet\Images\noavatar.gif 41 | DesktopModules\YetAnotherForumDotNet\Images\YafLogo.png 42 | DesktopModules\YetAnotherForumDotNet\Images\YafLogoSmall.png 43 | 44 | DesktopModules\YetAnotherForumDotNet\install\TopicStatusList.xml 45 | 46 | DesktopModules\YetAnotherForumDotNet\pages\admin\bannedemail_edit.ascx 47 | DesktopModules\YetAnotherForumDotNet\pages\admin\bannedemail_import.ascx 48 | DesktopModules\YetAnotherForumDotNet\pages\admin\bannedip_edit.ascx 49 | DesktopModules\YetAnotherForumDotNet\pages\admin\bannedip_import.ascx 50 | DesktopModules\YetAnotherForumDotNet\pages\admin\bannedname_edit.ascx 51 | DesktopModules\YetAnotherForumDotNet\pages\admin\bannedname_import.ascx 52 | DesktopModules\YetAnotherForumDotNet\pages\admin\bbcode_import.ascx 53 | DesktopModules\YetAnotherForumDotNet\pages\admin\editnntpforum.ascx 54 | DesktopModules\YetAnotherForumDotNet\pages\admin\editnntpserver.ascx 55 | DesktopModules\YetAnotherForumDotNet\pages\admin\eventloggroupaccess.ascx 56 | DesktopModules\YetAnotherForumDotNet\pages\admin\eventloggroups.ascx 57 | DesktopModules\YetAnotherForumDotNet\pages\admin\extensions_edit.ascx 58 | DesktopModules\YetAnotherForumDotNet\pages\admin\extensions_import.ascx 59 | DesktopModules\YetAnotherForumDotNet\pages\admin\replacewords_edit.ascx 60 | DesktopModules\YetAnotherForumDotNet\pages\admin\replacewords_import.ascx 61 | DesktopModules\YetAnotherForumDotNet\pages\admin\smilies.ascx 62 | DesktopModules\YetAnotherForumDotNet\pages\admin\smilies_edit.ascx 63 | DesktopModules\YetAnotherForumDotNet\pages\admin\smilies_import.ascx 64 | DesktopModules\YetAnotherForumDotNet\pages\admin\spamwords_edit.ascx 65 | DesktopModules\YetAnotherForumDotNet\pages\admin\spamwords_import.ascx 66 | DesktopModules\YetAnotherForumDotNet\pages\admin\test_data.ascx 67 | DesktopModules\YetAnotherForumDotNet\pages\admin\topicstatus.ascx 68 | DesktopModules\YetAnotherForumDotNet\pages\admin\topicstatus_edit.ascx 69 | DesktopModules\YetAnotherForumDotNet\pages\admin\topicstatus_import.ascx 70 | DesktopModules\YetAnotherForumDotNet\pages\admin\users_import.ascx 71 | 72 | DesktopModules\YetAnotherForumDotNet\pages\im_aim.ascx 73 | DesktopModules\YetAnotherForumDotNet\pages\im_icq.ascx 74 | DesktopModules\YetAnotherForumDotNet\pages\im_msn.ascx 75 | DesktopModules\YetAnotherForumDotNet\pages\im_skype.ascx 76 | DesktopModules\YetAnotherForumDotNet\pages\im_yim.ascx 77 | DesktopModules\YetAnotherForumDotNet\pages\im_shoutbox.ascx 78 | DesktopModules\YetAnotherForumDotNet\pages\im_showsmilies.ascx 79 | 80 | DesktopModules\YetAnotherForumDotNet\YafAjax.asmx 81 | DesktopModules\YetAnotherForumDotNet\popup.aspx 82 | DesktopModules\YetAnotherForumDotNet\yaf.png 83 | DesktopModules\YetAnotherForumDotNet\forumlogo.jpg 84 | 85 | DesktopModules\YetAnotherForumDotNet\scripts\cookiealert-standalone.js 86 | DesktopModules\YetAnotherForumDotNet\scripts\jquery.pagemethod.readme.txt 87 | DesktopModules\YetAnotherForumDotNet\scripts\cookiealert-standalone.js 88 | DesktopModules\YetAnotherForumDotNet\scripts\jquery.ui.datepicker-farsi.min.js 89 | DesktopModules\YetAnotherForumDotNet\scripts\jquery-2.2.4.intellisense.js 90 | DesktopModules\YetAnotherForumDotNet\scripts\jquery-2.2.4.js 91 | DesktopModules\YetAnotherForumDotNet\scripts\jquery-2.2.4.min.js 92 | DesktopModules\YetAnotherForumDotNet\scripts\jquery-ui-1.12.1.js 93 | DesktopModules\YetAnotherForumDotNet\scripts\jquery-ui-1.12.1.min.js 94 | DesktopModules\YetAnotherForumDotNet\scripts\jquery-ui-i18n.min.js 95 | 96 | DesktopModules\YetAnotherForumDotNet\scripts\i18n\ -------------------------------------------------------------------------------- /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/Installation/03.22.006130.txt: -------------------------------------------------------------------------------- 1 | DesktopModules\YAF.WhatsNew\jquery.ForumExtensionsDnn.min.js 2 | DesktopModules\YetAnotherForumDotNet\Content\images\error.svg 3 | DesktopModules\YetAnotherForumDotNet\Content\images\play-pause.svg 4 | DesktopModules\YetAnotherForumDotNet\Content\images\spacer.gif 5 | DesktopModules\YetAnotherForumDotNet\Content\images\jquery.fileupload.comb.css 6 | DesktopModules\YetAnotherForumDotNet\Content\images\jquery.fileupload.comb.min.css 7 | DesktopModules\YetAnotherForumDotNet\install\custom\ 8 | DesktopModules\YetAnotherForumDotNet\install\mssql\ 9 | DesktopModules\YetAnotherForumDotNet\languages\*.xml 10 | DesktopModules\YetAnotherForumDotNet\Resources\EmailTemplate.html 11 | DesktopModules\YetAnotherForumDotNet\Resources\ProviderExceptions.xml 12 | DesktopModules\YetAnotherForumDotNet\Scripts\ckeditor\ 13 | DesktopModules\YetAnotherForumDotNet\Scripts\jquery.fileupload.comb.min.js 14 | DesktopModules\YetAnotherForumDotNet\Scripts\jquery.ForumAdminExtensionsDnn.min.js 15 | DesktopModules\YetAnotherForumDotNet\Scripts\jquery.ForumExtensionsDnn.min.js 16 | DesktopModules\YetAnotherForumDotNet\Scripts\jquery.netStack.js 17 | DesktopModules\YetAnotherForumDotNet\Scripts\jquery-3.6.1.js 18 | DesktopModules\YetAnotherForumDotNet\Scripts\jquery-3.6.1.min.js 19 | DesktopModules\YetAnotherForumDotNet\digest.aspx -------------------------------------------------------------------------------- /yaf_dnn/Installation/yaf.svg: -------------------------------------------------------------------------------- 1 | YAFLogo -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /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/YAF.DNN.Module.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 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 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /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/YafDnnModule.ascx.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // 5 | // Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn 6 | // der Code neu generiert wird. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace YAF.DotNetNuke 11 | { 12 | 13 | 14 | public partial class YafDnnModule 15 | { 16 | 17 | /// 18 | /// pnlModuleContent-Steuerelement. 19 | /// 20 | /// 21 | /// Automatisch generiertes Feld. 22 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 23 | /// 24 | protected global::System.Web.UI.WebControls.Panel pnlModuleContent; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /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 |
21 | 24 |

25 | 26 | <%= this.LocalizeString("CreateOrSelect")%> 27 | 28 |

29 |
30 |
31 | 32 |   33 |
34 |
35 |
36 | 37 | 38 | 39 |
40 |
41 | 42 |
43 | 44 | 46 |   47 | 48 |
<%= this.LocalizeString("NoteAF")%>
49 |
50 |
51 |
52 |

53 | <%= this.LocalizeString("OtherSettings")%> 54 |

55 |
56 |
57 | 58 | 59 |
60 |
61 | 62 | 63 |
64 |
65 |
66 |
    67 |
  • 68 | 69 |
  • 70 |
  • 71 | 72 |
  • 73 |
-------------------------------------------------------------------------------- /yaf_dnn/YafDnnModuleEdit.ascx.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // 5 | // Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn 6 | // der Code neu generiert wird. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace YAF.DotNetNuke 11 | { 12 | 13 | 14 | public partial class YafDnnModuleEdit 15 | { 16 | 17 | /// 18 | /// BoardName-Steuerelement. 19 | /// 20 | /// 21 | /// Automatisch generiertes Feld. 22 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 23 | /// 24 | protected global::System.Web.UI.UserControl BoardName; 25 | 26 | /// 27 | /// BoardID-Steuerelement. 28 | /// 29 | /// 30 | /// Automatisch generiertes Feld. 31 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 32 | /// 33 | protected global::System.Web.UI.WebControls.DropDownList BoardID; 34 | 35 | /// 36 | /// NewBoard-Steuerelement. 37 | /// 38 | /// 39 | /// Automatisch generiertes Feld. 40 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 41 | /// 42 | protected global::System.Web.UI.UserControl NewBoard; 43 | 44 | /// 45 | /// NewBoardName-Steuerelement. 46 | /// 47 | /// 48 | /// Automatisch generiertes Feld. 49 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 50 | /// 51 | protected global::System.Web.UI.WebControls.TextBox NewBoardName; 52 | 53 | /// 54 | /// create-Steuerelement. 55 | /// 56 | /// 57 | /// Automatisch generiertes Feld. 58 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 59 | /// 60 | protected global::System.Web.UI.WebControls.LinkButton create; 61 | 62 | /// 63 | /// ActiveForumsPlaceHolder-Steuerelement. 64 | /// 65 | /// 66 | /// Automatisch generiertes Feld. 67 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 68 | /// 69 | protected global::System.Web.UI.WebControls.PlaceHolder ActiveForumsPlaceHolder; 70 | 71 | /// 72 | /// ActiveForumsImport-Steuerelement. 73 | /// 74 | /// 75 | /// Automatisch generiertes Feld. 76 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 77 | /// 78 | protected global::System.Web.UI.UserControl ActiveForumsImport; 79 | 80 | /// 81 | /// ActiveForums-Steuerelement. 82 | /// 83 | /// 84 | /// Automatisch generiertes Feld. 85 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 86 | /// 87 | protected global::System.Web.UI.WebControls.DropDownList ActiveForums; 88 | 89 | /// 90 | /// ImportForums-Steuerelement. 91 | /// 92 | /// 93 | /// Automatisch generiertes Feld. 94 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 95 | /// 96 | protected global::System.Web.UI.WebControls.LinkButton ImportForums; 97 | 98 | /// 99 | /// RemoveTabNameLabel-Steuerelement. 100 | /// 101 | /// 102 | /// Automatisch generiertes Feld. 103 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 104 | /// 105 | protected global::System.Web.UI.UserControl RemoveTabNameLabel; 106 | 107 | /// 108 | /// RemoveTabName-Steuerelement. 109 | /// 110 | /// 111 | /// Automatisch generiertes Feld. 112 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 113 | /// 114 | protected global::System.Web.UI.WebControls.DropDownList RemoveTabName; 115 | 116 | /// 117 | /// InheritLanguage-Steuerelement. 118 | /// 119 | /// 120 | /// Automatisch generiertes Feld. 121 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 122 | /// 123 | protected global::System.Web.UI.UserControl InheritLanguage; 124 | 125 | /// 126 | /// InheritDnnLanguage-Steuerelement. 127 | /// 128 | /// 129 | /// Automatisch generiertes Feld. 130 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 131 | /// 132 | protected global::System.Web.UI.WebControls.CheckBox InheritDnnLanguage; 133 | 134 | /// 135 | /// update-Steuerelement. 136 | /// 137 | /// 138 | /// Automatisch generiertes Feld. 139 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 140 | /// 141 | protected global::System.Web.UI.WebControls.LinkButton update; 142 | 143 | /// 144 | /// cancel-Steuerelement. 145 | /// 146 | /// 147 | /// Automatisch generiertes Feld. 148 | /// Zum Ändern Felddeklaration aus der Designerdatei in eine Code-Behind-Datei verschieben. 149 | /// 150 | protected global::System.Web.UI.WebControls.LinkButton cancel; 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /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/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/YafDnnWhatsNew.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="YAF.DotNetNuke.YafDnnWhatsNew" AutoEventWireup="true" CodeBehind="YafDnnWhatsNew.ascx.cs" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /yaf_dnn/YafDnnWhatsNew.ascx.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/1996f5f6efd6a366736b3fdcd8b8fd2dcfb0f437/yaf_dnn/YafDnnWhatsNew.ascx.cs -------------------------------------------------------------------------------- /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/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/YafDnnWhatsNewSettings.ascx.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/1996f5f6efd6a366736b3fdcd8b8fd2dcfb0f437/yaf_dnn/YafDnnWhatsNewSettings.ascx.cs -------------------------------------------------------------------------------- /yaf_dnn/YafDnnWhatsNewSettings.ascx.designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/1996f5f6efd6a366736b3fdcd8b8fd2dcfb0f437/yaf_dnn/YafDnnWhatsNewSettings.ascx.designer.cs -------------------------------------------------------------------------------- /yaf_dnn/YetAnotherForum.NET.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YAFNET/YAFNET-DNN/1996f5f6efd6a366736b3fdcd8b8fd2dcfb0f437/yaf_dnn/YetAnotherForum.NET.snk -------------------------------------------------------------------------------- /yaf_dnn/packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | --------------------------------------------------------------------------------