Cleaned up the code fro rsd and wlwmanifest and ensures wlwmanifest actually returns the results in xml format.

This commit is contained in:
Shannon Deminick
2013-04-06 00:04:23 +06:00
parent f936f8b0dd
commit bf3fa20a53
10 changed files with 70 additions and 109 deletions

View File

@@ -1,11 +1,20 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rsd.aspx.cs" Inherits="umbraco.presentation.umbraco.channels.rsd" %><?xml version="1.0" encoding="UTF-8"?><rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
<?xml version="1.0" encoding="UTF-8" ?>
<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
<%@ Import Namespace="Umbraco.Core.IO" %>
<script runat="server">
protected override void OnInit(EventArgs e)
{
Response.ContentType = "text/xml";
}
</script>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
<service>
<engineName>umbraco</engineName>
<engineLink>http://umbraco.org/</engineLink>
<homePageLink>http://<%=Request.ServerVariables["SERVER_NAME"]%></homePageLink>
<apis>
<api name="MetaWeblog" blogID="1" preferred="true" apiLink="http://<%=Request.ServerVariables["SERVER_NAME"]%><%=umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/channels.aspx" />
<api name="Blogger" blogID="1" preferred="false" apiLink="http://<%=Request.ServerVariables["SERVER_NAME"]%><%=umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/channels.aspx" />
<api name="MetaWeblog" blogID="1" preferred="true" apiLink="http://<%=Request.ServerVariables["SERVER_NAME"]%><%=IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/channels.aspx" />
<api name="Blogger" blogID="1" preferred="false" apiLink="http://<%=Request.ServerVariables["SERVER_NAME"]%><%=IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/channels.aspx" />
</apis>
</service>
</rsd>
</rsd>

View File

@@ -1,11 +1,33 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wlwmanifest.aspx.cs" Inherits="umbraco.presentation.channels.wlwmanifest" %><?xml version="1.0" encoding="utf-8" ?><manifest xmlns="http://schemas.microsoft.com/wlw/manifest/weblog">
<?xml version="1.0" encoding="UTF-8" ?>
<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
<%@ Import Namespace="Umbraco.Core.IO" %>
<%@ Import Namespace="umbraco" %>
<script runat="server">
protected override void OnInit(EventArgs e)
{
Response.ContentType = "text/xml";
}
protected override void OnLoad(EventArgs e)
{
var useXhtml = false;
if (bool.TryParse(GlobalSettings.EditXhtmlMode, out useXhtml) && !useXhtml)
{
xhtml.Text = "no";
}
else
{
xhtml.Text = "yes";
}
}
</script>
<manifest xmlns="http://schemas.microsoft.com/wlw/manifest/weblog">
<weblog>
<imageUrl>http://umbraco.org/images/liveWriterIcon.png</imageUrl>
<watermarkImageUrl>http://umbraco.org/images/liveWriterWatermark.png</watermarkImageUrl>
<homepageLinkText>View your site/weblog</homepageLinkText>
<adminLinkText>Edit your site/weblog</adminLinkText>
<adminUrl>{blog-homepage-url}<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/</adminUrl>
<postEditingUrl>{blog-homepage-url}<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco)%>/actions/editContent.aspx?id={post-id}</postEditingUrl>
<adminUrl>{blog-homepage-url}<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/</adminUrl>
<postEditingUrl>{blog-homepage-url}<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco)%>/actions/editContent.aspx?id={post-id}</postEditingUrl>
</weblog>
<views>
@@ -25,4 +47,5 @@
<supportsAutoUpdate>Yes</supportsAutoUpdate>
<supportsMultipleCategories>Yes</supportsMultipleCategories>
<requiresXHTML><asp:Literal runat="server" id="xhtml"></asp:Literal></requiresXHTML>
</options></manifest>
</options>
</manifest>

View File

@@ -1,6 +1,7 @@
<%@ Page Language="c#" MasterPageFile="../../masterpages/umbracoPage.Master" Title="ShowUmbracoTags"
Codebehind="ShowUmbracoTags.aspx.cs" AutoEventWireup="True"
Inherits="umbraco.cms.presentation.settings.modal.ShowUmbracoTags" %>
<%@ Import Namespace="Umbraco.Core.IO" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
@@ -44,9 +45,9 @@
</td></tr>
<tr><th width="120">MetaBlogApi / Content Channels</th><td>
<code>
&lt;link rel="EditURI" type="application/rsd+xml" href="http://<%=Request.ServerVariables["SERVER_NAME"] %><%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco)%>/channels/rsd.aspx" /&gt;
&lt;link rel="EditURI" type="application/rsd+xml" href="http://<%=Request.ServerVariables["SERVER_NAME"] %><%= IOHelper.ResolveUrl(SystemDirectories.Umbraco)%>/channels/rsd.aspx" /&gt;
<br /><br />
&lt;link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://<%=Request.ServerVariables["SERVER_NAME"] %><%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco)%>/channels/wlwmanifest.aspx" /&gt;
&lt;link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://<%=Request.ServerVariables["SERVER_NAME"] %><%= IOHelper.ResolveUrl(SystemDirectories.Umbraco)%>/channels/wlwmanifest.aspx" /&gt;
</code>
<small>
Insert the above two elements to the head element to gain optimal support for

View File

@@ -342,6 +342,12 @@
<Compile Include="umbraco.presentation\MacroCacheContent.cs" />
<Compile Include="umbraco.presentation\macroCacheRefresh.cs" />
<Compile Include="umbraco.presentation\ScriptingMacroResult.cs" />
<Compile Include="umbraco.presentation\umbraco\channels\wlwmanifest.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\channels\rsd.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\ping.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@@ -642,21 +648,7 @@
<Compile Include="umbraco.presentation\umbraco\channels\MetaWeblog.cs" />
<Compile Include="umbraco.presentation\umbraco\channels\api.cs" />
<Compile Include="umbraco.presentation\umbraco\channels\remixWeblogApi.cs" />
<Compile Include="umbraco.presentation\umbraco\channels\rsd.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
<DependentUpon>rsd.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\channels\rsd.aspx.designer.cs">
<DependentUpon>rsd.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\channels\UmbracoMetaWeblogAPI.cs" />
<Compile Include="umbraco.presentation\umbraco\channels\wlwmanifest.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
<DependentUpon>wlwmanifest.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\channels\wlwmanifest.aspx.designer.cs">
<DependentUpon>wlwmanifest.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\channels\wordApi.cs" />
<Compile Include="umbraco.presentation\umbraco\controls\ContentControl.cs" />
<Compile Include="umbraco.presentation\umbraco\controls\ContentPicker.cs" />
@@ -1892,8 +1884,6 @@
<Content Include="umbraco.presentation\umbraco\actions\editContent.aspx" />
<Content Include="umbraco.presentation\umbraco\actions\preview.aspx" />
<Content Include="umbraco.presentation\umbraco\actions\publish.aspx" />
<Content Include="umbraco.presentation\umbraco\channels\rsd.aspx" />
<Content Include="umbraco.presentation\umbraco\channels\wlwmanifest.aspx" />
<Content Include="umbraco.presentation\umbraco\dialogs\mediaPicker.aspx" />
<Content Include="umbraco.presentation\umbraco\webservices\MacroContainerService.asmx" />
<Content Include="umbraco.presentation\umbraco\developer\Xslt\xsltVisualize.aspx" />
@@ -2049,7 +2039,9 @@
<Content Include="umbraco.presentation\umbraco\settings\EditNodeTypeNew.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\settings\modals\ShowUmbracoTags.aspx" />
<Content Include="umbraco.presentation\umbraco\settings\modals\ShowUmbracoTags.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\settings\stylesheet\editstylesheet.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>

View File

@@ -1,11 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rsd.aspx.cs" Inherits="umbraco.presentation.umbraco.channels.rsd" %><?xml version="1.0" encoding="UTF-8"?><rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
<service>
<engineName>umbraco</engineName>
<engineLink>http://umbraco.org/</engineLink>
<homePageLink>http://<%=Request.ServerVariables["SERVER_NAME"]%></homePageLink>
<apis>
<api name="MetaWeblog" blogID="1" preferred="true" apiLink="http://<%=Request.ServerVariables["SERVER_NAME"]%><%=umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/channels.aspx" />
<api name="Blogger" blogID="1" preferred="false" apiLink="http://<%=Request.ServerVariables["SERVER_NAME"]%><%=umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/channels.aspx" />
</apis>
</service>
</rsd>

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Data;
using System.Configuration;
using System.Collections;
@@ -11,6 +11,7 @@ using System.Web.UI.HtmlControls;
namespace umbraco.presentation.umbraco.channels
{
[Obsolete("This class is no longer used and will be removed from the codebase in future versions")]
public partial class rsd : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)

View File

@@ -1,15 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.umbraco.channels {
public partial class rsd {
}
}

View File

@@ -1,28 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wlwmanifest.aspx.cs" Inherits="umbraco.presentation.channels.wlwmanifest" %><?xml version="1.0" encoding="utf-8" ?><manifest xmlns="http://schemas.microsoft.com/wlw/manifest/weblog">
<weblog>
<imageUrl>http://umbraco.org/images/liveWriterIcon.png</imageUrl>
<watermarkImageUrl>http://umbraco.org/images/liveWriterWatermark.png</watermarkImageUrl>
<homepageLinkText>View your site/weblog</homepageLinkText>
<adminLinkText>Edit your site/weblog</adminLinkText>
<adminUrl>{blog-homepage-url}<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/</adminUrl>
<postEditingUrl>{blog-homepage-url}<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco)%>/actions/editContent.aspx?id={post-id}</postEditingUrl>
</weblog>
<views>
<default>WebLayout</default>
</views>
<options>
<supportsScripts>Yes</supportsScripts>
<supportsEmbeds>Yes</supportsEmbeds>
<supportsHtmlTitles>Yes</supportsHtmlTitles>
<supportsEmptyTitles>No</supportsEmptyTitles>
<maxRecentPosts>100</maxRecentPosts>
<supportsNewCategories>Yes</supportsNewCategories>
<supportsExcerpt>Yes</supportsExcerpt>
<supportsPages>No</supportsPages>
<supportsPageParent>No</supportsPageParent>
<supportsPageOrder>No</supportsPageOrder>
<supportsAutoUpdate>Yes</supportsAutoUpdate>
<supportsMultipleCategories>Yes</supportsMultipleCategories>
<requiresXHTML><asp:Literal runat="server" id="xhtml"></asp:Literal></requiresXHTML>
</options></manifest>

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Data;
using System.Configuration;
using System.Collections;
@@ -11,16 +11,29 @@ using System.Web.UI.HtmlControls;
namespace umbraco.presentation.channels
{
[Obsolete("This class is no longer used and will be removed from the codebase in future versions")]
public partial class wlwmanifest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
bool useXhtml = false;
if (bool.TryParse(GlobalSettings.EditXhtmlMode, out useXhtml) && !useXhtml) {
if (bool.TryParse(GlobalSettings.EditXhtmlMode, out useXhtml) && !useXhtml)
{
xhtml.Text = "no";
} else {
}
else
{
xhtml.Text = "yes";
}
}
/// <summary>
/// xhtml control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal xhtml;
}
}

View File

@@ -1,24 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.channels {
public partial class wlwmanifest {
/// <summary>
/// xhtml control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal xhtml;
}
}