Index: skinr.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr.info,v
retrieving revision 1.4
diff -u -p -r1.4 skinr.info
--- skinr.info	16 Oct 2010 22:22:17 -0000	1.4
+++ skinr.info	19 Oct 2010 04:49:11 -0000
@@ -4,6 +4,7 @@ name = Skinr
 description = Provides a way to define and/or skin bits of Drupal output from the UI.
 package = Skinr
 core = 7.x
+dependencies[] = ctools
 
 files[] = skinr.module
 files[] = skinr.handlers.inc
@@ -14,3 +15,5 @@ files[] = modules/panels.skinr.inc
 files[] = modules/skinr.skinr.inc
 files[] = modules/views.skinr.inc
 files[] = tests/skinr.test
+
+
Index: skinr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr.module,v
retrieving revision 1.28
diff -u -p -r1.28 skinr.module
--- skinr.module	15 Oct 2010 07:06:17 -0000	1.28
+++ skinr.module	19 Oct 2010 04:49:12 -0000
@@ -1,6 +1,44 @@
 <?php
 // $Id: skinr.module,v 1.28 2010/10/15 07:06:17 jgirlygirl Exp $
 
+define('SKINR_MINIMUM_VERSION', 2);
+define('SKINR_VERSION', 2);
+
+// -----------------------------------------------------------------------
+// CTools hook implementations. I'm leaving it at the top for now, I'm lazy :-)
+
+function skinr_include_api() {
+  ctools_include('plugins');
+  return ctools_plugin_api_include('skinr', 'skins', SKINR_MINIMUM_VERSION, SKINR_VERSION);
+}
+
+// @todo: When this is done, we should probably also move the handlers to a ctools plugins
+function skinr_ctools_plugin_type() {
+  return array(
+    'skins' => array(
+      'load themes' => TRUE, // Allow themes to also contains skins plugins
+      'cache' => TRUE,
+    ),
+  );
+}
+
+// @todo: We need to be able to filter this
+// @todo: provide an alter
+function skinr_get_skins() {
+  ctools_include('plugins');
+  return ctools_get_plugins('skinr', 'skins');
+}
+
+function skinr_ctools_plugin_directory($owner, $plugin_type) {
+  if ($owner == 'skinr') {
+    return 'plugins/' . $plugin_type;
+  }
+}
+
+// -----------------------------------------------------------------------
+// End of CTools hook implementations.
+
+
 /**
  * Implementation of hook_help().
  */
@@ -1130,4 +1168,5 @@ function skinr_handler($type, $op, $hand
         return $handler($op, $a3, $a4);
     }
   }
-}
\ No newline at end of file
+}
+
Index: skinr_ui.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr_ui.admin.inc,v
retrieving revision 1.14
diff -u -p -r1.14 skinr_ui.admin.inc
--- skinr_ui.admin.inc	14 Oct 2010 23:09:30 -0000	1.14
+++ skinr_ui.admin.inc	19 Oct 2010 04:49:12 -0000
@@ -465,8 +465,26 @@ function skinr_ui_settings_validate(&$fo
  */
 function skinr_ui_admin_skinsets($form, $form_state) {
   $form = array();
-
-  $skinsets = skinr_rebuild_skinset_data();
+  
+  // This is a horrible hack, Not even a solution to anything
+  // I'm just trying to get the plugins skins to load in the listing page
+  // @TODO: MAKE THIS WORK ;-)
+  $skinset = skinr_get_skins(); //skinr_rebuild_skinset_data();
+  $skinsets = array();
+  
+  //dsm($skinset);
+  // Formated it so the rest of the function likes it.
+  // @TODO: FIX THIS
+  // @TODO: THe format of the exported $plugin array in skinr.skins.inc needs to be fixed
+  // we should be able to set that up so it can be pretty straight forward
+  // then we just need to rewrite all these function to get the correct values
+  foreach ($skinset as $skin) {
+    $key = $skin['key'];
+    $load_skin['info'] = $skin;
+    $skinsets[$key] = $load_skin = (object) $load_skin;
+    $skinsets[$key]->status = $load_skin->info['status'];
+    $skinsets[$key]->name = $load_skin->info['name'];
+  }
 
   uasort($skinsets, 'skinr_ui_sort_by_info_name');
 
@@ -475,6 +493,7 @@ function skinr_ui_admin_skinsets($form, 
   
   // Iterate through each of the skinsets.
   foreach ($skinsets as $name => $skinset) {
+    
     $extra = array();
     $extra['enabled'] = (bool) $skinset->status;
 
Index: skinr_ui.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr_ui.info,v
retrieving revision 1.2
diff -u -p -r1.2 skinr_ui.info
--- skinr_ui.info	25 Feb 2010 01:17:00 -0000	1.2
+++ skinr_ui.info	19 Oct 2010 04:49:12 -0000
@@ -12,4 +12,4 @@ files[] = skinr_ui.module
 files[] = skinr_ui.admin.inc
 files[] = skinr_ui.rules.inc
 
-configure = admin/appearance/skinr
\ No newline at end of file
+configure = admin/appearance/skinr
