Simple Machines Community Forum

SMF Development => Feature Requests => Topic started by: lurkalot on November 09, 2013, 03:48:03 PM

Title: Deleted files function for themes
Post by: lurkalot on November 09, 2013, 03:48:03 PM
Add a theme, you upload and install the theme, no problem.  Then you decide you no longer want that theme and try another, (or you decide to try out a few different themes)  so you click the so called "Remove" link.  Now the remove link only actually un-installs the theme from SMF, but it leaves loads of files sitting on your server.

Can we please have a delete files function in the theme manager, the same as we do in the package manager?

We touched on this a while back, not sure if it was ever considered. http://www.simplemachines.org/community/index.php?topic=473844.0
Title: Re: Deleted files function for themes
Post by: Suki on November 09, 2013, 03:50:52 PM
I recently did some minor tweaks here and there regarding theme installs and I did thought about handling true removal, if enough people agree on this them I'll add it.
Title: Re: Deleted files function for themes
Post by: lurkalot on November 10, 2013, 05:30:47 AM
Quote from: Suki on November 09, 2013, 03:50:52 PM
I recently did some minor tweaks here and there regarding theme installs and I did thought about handling true removal, if enough people agree on this them I'll add it.

Thank you Suki.  I hope some other members chip in then.  Over 230 views but no comments, surely it can't be just me who wants this as a core feature.  :)
Title: Re: Deleted files function for themes
Post by: Kindred on November 10, 2013, 04:53:59 PM
hmmmm...   this could lead to a lot of trouble.

If you remove a theme (from the SMF admin) you may want to add it back eventually -- or recover some files from that directory -- but remve it from the available themes on the site.

I think that, perhaps, a warning/notice that the remove button does not delete the actual custom theme directory and files might be a more appropriate thing
Title: Re: Deleted files function for themes
Post by: Suki on November 10, 2013, 05:20:12 PM
Yep, when I was doing the update/replace feature I did thought about making a copy of said theme and move it somewhere else or just leave it there with a different name something like theme_copy/

Of course we could rename the whole feature, instead of calling it remove we could call it disable/enable and also have a remove option, if the user really wants to remove it.
Title: Re: Deleted files function for themes
Post by: Kindred on November 10, 2013, 05:31:09 PM
that's not a bad, idea, Suki
Title: Re: Deleted files function for themes
Post by: Suki on November 10, 2013, 05:48:55 PM
Yeah, just thinking how would be handled, perhaps another variable/value disable/1 or 0 besides renaming its dir.
Title: Re: Deleted files function for themes
Post by: Chalky on November 10, 2013, 06:13:11 PM
How about an option in Forum Maintenance to delete selected unused theme files?  That way deletion wouldn't be done by mistake.
Title: Re: Deleted files function for themes
Post by: Illori on November 10, 2013, 06:15:38 PM
i dont think it would be done by mistake in the first place. i think people should understand what the X does, and there is a popup to agree to deleting the theme.
Title: Re: Deleted files function for themes
Post by: lurkalot on November 10, 2013, 06:21:54 PM
Quote from: Suki on November 10, 2013, 05:20:12 PM

Of course we could rename the whole feature, instead of calling it remove we could call it disable/enable and also have a remove option, if the user really wants to remove it.

I didn't explain properly in my first post, sorry.   But that is exactly what I wanted.  So it works like the package manager, it has a install / Un-install, and a additional delete files option.
Title: Re: Deleted files function for themes
Post by: Suki on November 18, 2013, 03:04:20 PM
OK I just finished making some changes to how themes are installed, basically themes will have the same install tag that mods do and it won't be possible to install a 1.1.x or 2.0 theme anymore, it is also possible for themers to use the version tag and if the user install a new version the same theme will be updated and a bunch of other minor things but anyway I'm now working on this.

I'm basically thinking on a new var/value entry, var enable and value either 1 or 0, the theme list will have a disable/enable link along with the current delete link. Disabling just sets the var to 0, deleting remove the theme from both the DB and its dir.

I'm also thinking on adding some more info about each theme and not just the paths and urls so some suggestions are more than welcome.
Title: Re: Deleted files function for themes
Post by: Illori on November 18, 2013, 03:08:38 PM
currently in 2.1 the folder for the "stars" has been moved to "Themes/{theme}/images/membericons/"

maybe could be useful to allow that folder to be user defined or per theme defined to where they want it?
Title: Re: Deleted files function for themes
Post by: Arantor on November 18, 2013, 03:09:33 PM
Does it really need to be per theme?
Title: Re: Deleted files function for themes
Post by: Illori on November 18, 2013, 03:11:41 PM
well there are some people that may want different badges to match their theme where others may have some that work with all themes.

maybe an option to have it per theme or overall for all themes?
Title: Re: Deleted files function for themes
Post by: Arantor on November 18, 2013, 03:15:12 PM
I'd be highly surprised if that's the case.
Title: Re: Deleted files function for themes
Post by: Illori on November 18, 2013, 03:17:39 PM
it may be rare, but i could see someone complaining if the option per theme did not exist.
Title: Re: Deleted files function for themes
Post by: Arantor on November 18, 2013, 03:18:07 PM
I see more complaints about it being confusing to set up.
Title: Re: Deleted files function for themes
Post by: Illori on November 18, 2013, 03:19:30 PM
oh sure, it is.
Title: Re: Deleted files function for themes
Post by: Arantor on November 18, 2013, 03:21:58 PM
The thing is I'd rather keep it simple ;)
Title: Re: Deleted files function for themes
Post by: Kindred on November 18, 2013, 03:22:42 PM
Ilori...
They can already do badges per theme...
Just use the same file name for the "star" file in each theme's images directory
Title: Re: Deleted files function for themes
Post by: Illori on November 18, 2013, 03:24:02 PM
i know they can, they actually have to. the idea here is maybe have an option to do one set for all themes.
Title: Re: Deleted files function for themes
Post by: Arantor on November 18, 2013, 03:24:26 PM
Yeah but I think we're getting to the realms of pulling it out of the themes directory and have a single master folder rather than having to go through and adding it to every theme's folder...

(and I'd rather not have it be optional, fewer options is better)
Title: Re: Deleted files function for themes
Post by: Illori on November 18, 2013, 03:26:37 PM
sounds good to me, let a mod author make it per theme again.