Packaging a Dashboard theme - with single page overrides etc

Permalink
Hey Guys,
I've put together a theme and some override files to customise the Dashboard of 5.5.1 - it adds a persistent side menu for easier navigation.

I'm trying to figure out how to package it up so i can put it on the marketplace (for free) - but am a bit lost.

I've tried PageTheme to install the dashboard theme - but this will add the theme as a new "Pages theme". To get the dashboard theme to override dashboard default theme, it needs to be in root/themes/dashboard

I also have some other files which slightly change the way the toolbar works, and change some single pages etc to make the theme work correctly, in these directories;
root/css/
root/single_pages/dashboard/
root/elements/
root/tools/

From looking around, the best i can gather is that i need to set the install function of the package file i should just copy the files to these folders? Then i need to implement the uninstall method to delete the files, i'm assuming - which requires the user to have file writing access. like
if (is_writable("./".DIRNAME_PAGES)) {
   copy("./".DIRNAME_PACKAGES."/plus_package/".DIRNAME_PAGES."/login.php", "./".DIRNAME_PAGES."/login.php");
} else {
   throw new Exception(t("Unable to write to '%s' directory.", DIRNAME_PAGES));
}


Does this sound right, and are there any helper functions, or will i need to code line by line each file and folder to copy?

Any help will be greatly appreciated.

Ribeena


---------------------------------------
Reading i've done;
http://www.concrete5.org/community/forums/customizing_c5/overriding...
http://www.concrete5.org/community/forums/customizing_c5/understand...
http://www.concrete5.org/developers/bugs/5-4-1-1/install-single-pag...

 
julia replied on at Permalink Reply
julia
jordanlev replied on at Permalink Reply
jordanlev
ribeena replied on at Permalink Reply 3 Attachments
Hey guys,
Thanks for the information, i've gotten a fair way in, but got stuck again.

I followed the suggestion of using mnkras mobile switcher as a base to start a system for making a dashboard theme switcher. It seems to be working well, and as a happy side affect i also managed to get this package to change the login pages to your choice of default, website theme or dashboard theme.

Once installed, you will get a new option "Dashboard Theme" under Site Settings, where you can choose the login, background gradient, and dashboard theme.

The package will also look for ccm.extend.css in the dhasboard theme's css directory, and add it to any page with a tool bar, so that you can overwrite the toolbar formatting (incase you want to recolour it etc).

Also just added a choice to set the gradient colour of the background as a little bonus.

I've packaged up my dashboard theme to use along with this package, which seems to be working well. Would love some feedback on the two. This set-up seems to have solved most of my issues without resorting to any copying of files, so i am pretty happy.

My biggest issue is i can't find a way to get in "tools/page_controls_menu_js.php" to a package so we can slightly change the behavior of the tool bar (in this case, change the dashboard and edit buttons to have a down arrow). Likewise, while i got login single page to work, i wouldn't get any dashboard single pages to load from the theme directory, and a bit lost on how to override the one it loads.

Anyways let me know what you think, if i should release as is or if there's any coding help with getting dashboard single pages loading from the dashboard theme directories, and implementing the tools file override through a package.

Thanks