RMJCS Logo
 

Find Skin and Container Usage

 
 

If you want to have a theme clean up to remove unused skins and containers then you have to remove all references to them first. The simplest way to find out what skins and containers are in use is to query the database. Once all page and module references have been removed the trashcan icon should appear next to the skin/container in the Host | Extensions page allowing you to uninstall.

It's worth manually checking the ...\Portals\...\Skins and \Containers file system folders afterwards to remove any stray files that might have been left behind.

The SQL script here returns the contents of the main skin definition tables as well as usage counts for specifically referenced skins and containers. 

If you see references to items that you want to uninstall then start digging into the table in question with a WHERE clause to filter SkinSrc, ContainerSrc etc.

 
     
 

Find Skin and Container Usage Script

 
 
-- Skin Info

select * from dbo.Skins
select * from dbo.SkinPackages

-- Skin Usage

select 'Host' ,SettingValue, count(*) from dbo.HostSettings where SettingName like 'Default%Skin'
group by SettingValue

select 'Portal', SettingValue, count(*) from dbo.PortalSettings where SettingName like 'Default%Skin'
group by SettingValue

select 'Page', SkinSrc, count(*) from dbo.Tabs
group by SkinSrc

-- Container Usage

select 'Host', SettingValue, count(*) from dbo.HostSettings where SettingName like 'Default%Container'
group by SettingValue

select 'Portal', SettingValue, count(*) from dbo.PortalSettings where SettingName like 'Default%Container'
group by SettingValue

select 'Page', ContainerSrc, count(*) from dbo.Tabs
group by ContainerSrc

select 'Module', ContainerSrc, count(*) from dbo.TabModules
group by ContainerSrc
 
     
 

RMJCS Syntax Highlighter

 
 
 
     
Copyright 2007-2018 RMJCS