Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
--deletes in Document | |
--at this point all associated media files are deleted | |
delete from umbracoDomains where id in (select id from umbracoNode where path like '%-20%' and id!=-20); | |
delete from cmsDocument where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20); | |
--deletes in Content | |
delete from cmsPropertyData where contentNodeId in (select id from umbracoNode where path like '%-20%' and id!=-20); | |
delete from cmsPreviewXml where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20); | |
delete from cmsContentVersion where ContentId in (select id from umbracoNode where path like '%-20%' and id!=-20); | |
delete from cmsContentXml where NodeId in (select id from umbracoNode where path like '%-20%' and id!=-20); |
-moz-appearance
to none
. This will "reset" the styling of the element;text-indent
to 0.01px
. This will "push" the text a tiny bit[1] to the right;public class ContextHelpers | |
{ | |
public static UmbracoContext EnsureUmbracoContext() { | |
if (UmbracoContext.Current != null) | |
{ | |
return UmbracoContext.Current; | |
} | |
var httpContext = new HttpContextWrapper(HttpContext.Current ?? new HttpContext(new SimpleWorkerRequest("temp.aspx", "", new StringWriter()))); | |
-- Umbraco Clear Old Document Versions To Decrease Database Size And Improve Performance | |
-- http://borism.net/2008/12/16/fixing-a-large-cmspropertydata-table-in-umbraco/ | |
DECLARE @createdDate Datetime = DATEADD(m, -1, getdate()) | |
-- dump logs | |
-- TRUNCATE TABLE umbracolog -- faster if log table is very big and you don't need anything | |
DELETE FROM umbracolog WHERE Datestamp < @createdDate | |
-- clean up old versions | |
DELETE FROM cmsPropertyData WHERE |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Umbraco.Core; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Models.PublishedContent; | |
using Umbraco.Core.PropertyEditors; | |
using Umbraco.Core.Strings; | |
using Umbraco.Web.Composing; |
By using my Skybrud.Umbraco.GridData package (which introduces a strongly typed model for the Grid), indexing the new Grid in Umbraco 7.2 is quite easy.
At Skybrud.dk we typically create a class named ExamineIndexer
that takes care of the Examine related events. This class should be initalized during Umbraco startup like this:
using Umbraco.Core;
namespace FanoeTest {
public class Startup : ApplicationEventHandler {