This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- manually add this in to your DNN instance's web.config --> | |
<!-- Desc: for tools or services that expect sitemap.xml instead of .aspx, | |
this will deliver the results of DNN's sitemap.aspx AS the expected XML file in the root | |
--> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="XML sitemap from sitemap.aspx" stopProcessing="true"> | |
<match url=".+" /> | |
<conditions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- other stuff --> | |
</system.web> | |
<runtime> | |
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | |
<!-- other stuff --> | |
<dependentAssembly> | |
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> | |
<bindingRedirect oldVersion="0.0.0.0-32767.32767.32767.32767" newVersion="10.0.0.0" /> | |
</dependentAssembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"host": "___HOST_NAME___", | |
"username": "___USER_NAME___", | |
"password": "___PASSWORD___", | |
"name": "AccuTheme", | |
"context": "./app", | |
"protocol": "ftp", | |
"port": 21, | |
"secure": true, | |
"secureOptions": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@functions { | |
// Turn any text or title in to a URL Slug | |
// original = https://stackoverflow.com/questions/2920744/url-slugify-algorithm-in-c | |
// .ToSlug("My Title=Heading - &*(-) end-") >> "my-titleheading-end" | |
public string ToSlug(string phrase) | |
{ | |
byte[] bytes = System.Text.Encoding.GetEncoding("Cyrillic").GetBytes(phrase); | |
string str = System.Text.Encoding.ASCII.GetString(bytes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* DNN 8.x 9.x | |
Note: stored in SQL dbo.[]HostSettings as AUM_KeepInQueryStringRegex | |
Settings, SEO, URL Management, Expressions | |
Keep in Querystring Regular Expression | |
Default | |
/nomo/\d+|/runningDefault/[^/]+|/popup/(?:true|false)|/(?:page|category|sort|tags)/[^/]+|tou/[^/]+|(/utm[^/]+/[^/]+)+ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@* common ASL functions that help or simplyfy things in 2sxc | |
usage from another Razor script: | |
// get library of helpful functions/commands | |
var lib = CreateInstance("_Helpers--Basic.cshtml"); | |
// then call them with @lib.ConvertLineBreaks(myString) | |
*@ | |
@using System.Text.RegularExpressions -- used by ToSlug() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@* >>> put me in your /App_Code folder | |
Changes and updates: | |
- combined all previous versions in to this one 20200721 JRF | |
- added ThemePath() and ThemeCssPath() 20200720 JRF | |
- added Razor.Blade (dependency) and misc cleanups, self-docs 202004 JRF | |
- added initial Polymorph and business rules 20200102 JRF | |
- added to project and renamed to razor-kit.cshtml 20190313 JRF | |
- added GetIpFromHostname(); resolve a DNS entry (FQDN) | |
- added GetIpAddress() of the website visitor | |
- New 20181015 JRF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%-- THIS IS THE VB.NET VERSION | |
>> unfortunately it does not stay in sync with the C# version, so its probably better to | |
>> use this as a reference for the VB code and use the actual output from the C# version | |
For older templates, works best if included before closing DIV in main footer section of _footer.ascx like this | |
<!-- #include virtual="__debug-vb.ascx" --> | |
--%> | |
<% If GetIpAddress() = "192.241.63.162" Then %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%-- THIS IS THE C# CSharp .NET VERSION | |
NOTES: | |
- the way we get the Skin name is "janky" ;) | |
- uses Bootstrap (next version won't?) | |
How to use: | |
1. Save this file in your theme folder, usually includes/__debug.ascx | |
2. Update the IPs; add the WAN IP(s) for your location(s) | |
3. Update the Bootstrap version manually | |
4. Either in includes/_footer.ascx (or Home.ascx), before closing DIV in main <footer> section add this |
OlderNewer