|
1 | | -# Topic-Editor |
| 1 | +# OnTopic Editor for Web Forms |
| 2 | +The **OnTopic-Editor-WebForms** is the legacy implementation of the **OnTopic Editor** for Microsoft's **ASP.NET Web Forms** framework. |
| 3 | + |
| 4 | +> _Important:_ This project is considered obsolete, and no longer supported by Ignia. It is provided exclusively for reference. Existing implementations and new customers should upgrade to **[OnTopic-Editor-AspNetCore](https://github.com/OnTopicCMS/OnTopic-Editor-AspNetCore)**, which is built on Microsoft's **ASP.NET Core 3.1**. |
| 5 | +
|
| 6 | +## Installation |
| 7 | + |
| 8 | + |
| 9 | +### Dependencies |
| 10 | +Unlike more recent versions of the editor, the Web Forms version does not incorporate package management for downloading client-side dependencies, nor is it itself distributed as a package. To install the application, the following must be done: |
| 11 | + |
| 12 | +#### Scripts |
| 13 | +Client-side scripts must be downloaded and placed in the appropriate `/OnTopic.Editor.Web/Common/Scripts/Vendor` folders: |
| 14 | + |
| 15 | +* `/Bootstrap`: [Twitter Bootstrap](https://getbootstrap.com/docs/3.4/) 3.x |
| 16 | +* `/ExtJs`: [Sencha ExtJS](https://www.sencha.com/products/extjs/) 3.x |
| 17 | +* `/jQueryUI`: [jQuery UI](https://jqueryui.com/) 1+ |
| 18 | +* `/PaperCut`: [PaperCut's Are You Sure?](https://plugins.jquery.com/are-you-sure/) 1+ |
| 19 | +* `/TokenInput`: [James Smith's TokenInput](https://loopj.com/jquery-tokeninput/) 1.7 |
| 20 | +* `/TrentRichardson`: [Trent Richardson's jQuery Timepicker Addon](https://github.com/trentrichardson/jQuery-Timepicker-Addon) 1.6.x |
| 21 | + |
| 22 | +#### Libraries |
| 23 | +There are a few dependencies that were previously distributed as a loose collection of proprietary scripts that need to be placed in the `/OnTopic.Editor.Web.Host/Common/Global` folder. These can be provided by [Ignia](http://www.ignia.com) upon request. |
| 24 | + |
| 25 | +* `/Common/Global/Client.Scripts/FormatPhone.js` |
| 26 | +* `/Common/Global/Client.Scripts/ClientValidation.js` |
| 27 | +* `/Common/Global/Controls/ClientValidation.ascx` |
| 28 | +* `/Common/Global/CS.Functions/AddAttributeToFields.aspx` |
| 29 | + |
| 30 | +### Host Site |
| 31 | +Once all of the dependencies are procured, the contents of the `OnTopic.Editor.Web` folder should be copied to the appropriate location in your host site. By convention, Ignia has traditionally placed this in the `/!Admin/Topics` directory, but the location is not fixed. |
| 32 | + |
| 33 | +#### Configuration |
| 34 | +For a configuration example, see the [`OnTopic.Editor.Web.Host`](OnTopic.Editor.Web.Host) project. It includes the absolute bare minimum configuration required to host the editor. This includes: |
| 35 | + |
| 36 | +* [`web.config`](OnTopic.Editor.Web.Host/Web.config) |
| 37 | + * `connectionString` named `OnTopic` |
| 38 | + * `pageBaseType` set to `TopicPage` |
| 39 | + * Reference to the `OnTopic` namespaces |
| 40 | + * Configuration of the **C#** compiler |
| 41 | + * Inclusion of the **.NET Standard 2.0** assembly |
| 42 | +* [`packages.config`](OnTopic.Editor.Web.Host/packages.config) |
| 43 | + * Declaring **OnTopic** dependencies, such as `OnTopic`, `OnTopic.Web`, `OnTopic.Data.Sql`, &c. |
| 44 | +* [`global.asax.cs`](OnTopic.Editor.Web.Host/global.asax.cs) |
| 45 | + * Override `TopicFactory.TypeLookupService` with `WebFormsTopicLookupService` |
| 46 | + * Configure the `TopicRepository.DataProvider` |
| 47 | + * Ignore routes going to `{resource}.axd/{*pathInfo}` |
| 48 | + |
| 49 | +#### Visual Studio |
| 50 | +If you are trying to get the `OnTopic.Editor.Web.Host` site working in **Visual Studio**, you'll want to setup a virtual directory from `OnTopic.Editor.Web.Host` to `Ontopic.Editor.Web`. This can be done in your local copy of `.vs/config/applicationHost.config` by adding a `<virtualDirectory />` element to the corresponding `<site />`. For example: |
| 51 | +``` |
| 52 | +<configuration> |
| 53 | + <system.applicationHost> |
| 54 | + <sites> |
| 55 | + <site name="OnTopic.Editor.Web.Host" id="3"> |
| 56 | + <application path="/" applicationPool="Clr4IntegratedAppPool"> |
| 57 | + <virtualDirectory path="/" physicalPath="C:\Code\OnTopic-Editor-WebForms\OnTopic.Editor.Web.Host" /> |
| 58 | + <virtualDirectory path="/!Admin/Topics" physicalPath="C:\Code\OnTopic-Editor-WebForms\OnTopic.Editor.Web" /> |
| 59 | + </application> |
| 60 | + <bindings> |
| 61 | + <binding protocol="http" bindingInformation="*:63857:localhost" /> |
| 62 | + </bindings> |
| 63 | + </site> |
| 64 | + </sites> |
| 65 | + </system.applicationHost> |
| 66 | +</configuration> |
| 67 | +``` |
| 68 | + |
| 69 | +> _Note:_ The path does not need to be setup to `/!Admin/Topics`, though that's the convention Ignia has traditionally used for this version of the editor. |
0 commit comments