Suggestion: allow placing CSS file in upgrade-safe location

Added by Alvaro Degives-Mas 5 months ago

I have a few relatively minor but "important" CSS tweaks set in the SLP stylesheets, which upon upgrading the SLP plugin are lost. Just for example, I've taken out all "text-align:justified" and "font-family" declarations to let the theme set them. Maybe it's a good idea to check for the presence of that stylesheet i.e. a file by that same name in - for example - the theme folder in use, and if that file is found to use that instead of the default one. Alternatively, to provide for setting a DB value in the SLP settings where the location of that same file can be indicated (either method makes sense and has pros and cons; the former is arguably faster as it won't need a DB query, the latter is theme independent and also affords protection from changing the theme in use).


Replies (7)

RE: Suggestion: allow placing CSS file in upgrade-safe location - Added by Lance Cleveland 5 months ago

Good idea.

We actually have a mechanism for doing "themes", which includes the ability to upload custom themes, in the WPCSL framework we wrote for our WordPress Plugins. Unfortunately we've not had the time to implement & test this for the upcoming v2.2 release. It is on the plan for a future update, just not sure when.

RE: Suggestion: allow placing CSS file in upgrade-safe location - Added by Alvaro Degives-Mas 5 months ago

Thanks. Another suggestion: use that "custom" location also for the "starting image" which in the current, brand spanking new v2.2.3 is stored inside the plugin folder as well (i.e. you have to upload that image upon every plugin update/upgrade). I have tried relative folder locations for that starting image, and absolute locations (i.e. with http:// prepended) but it stubbornly attaches the location to the plugin folder; that's fine but it's not an upgrade safe location.

As a side note (I don't want to open a separate topic) the plugin loading / upgraded from the WordPress repository installs in the "store-locator-plus-le" location. I'm not sure what the exact significance of that is but it does cause the plugin to deactivate (because the plugin is placed in a different location than the prior folder/directory named "store-locator-plus". Just mentioning it!

RE: Suggestion: allow placing CSS file in upgrade-safe location - Added by Alvaro Degives-Mas 5 months ago

Correction: the WordPress Extend (i.e. "WP plugin repository") version creates a "store-locator-le" plugin folder. In fact, the main plugin file itself is named "store-locator-le.php" so that's what's causing the plugin to deactivate upon upgrade to 2.2.3 (not a serious problem as fortunately the database data is loaded correctly, but it has to be manually activated nonetheless, just as a heads up for the unsuspecting admin!)

RE: Suggestion: allow placing CSS file in upgrade-safe location - Added by Alvaro Degives-Mas 5 months ago

Please ignore both my above posts.

The new plugin version (v.2.2.3) supports the custom, upgrade-safe location.

I found my problem was caused by legacy content in the wp-content/uploads/sl-uploads folder. I completely uninstalled it and cleared out the WP options table of any sl- and csl- entries, then reinstalled from scratch and now the plugin is behaving as intended. Including the customized CSS. Thanks!

(PS: the location of the plugin indeed is the "store-locator-le" folder but that is functionally completely transparent, the sole exception is one has to reactivate it, if upgrading from earlier version. No impact on function though, and it causes no loss of previously entered locations data either.)

RE: Suggestion: allow placing CSS file in upgrade-safe location - Added by Lance Cleveland 5 months ago

The correct folder is store-locator-le with the main file named store-locator-le.php.

You should deactivate & delete any prior plus editions that are installed.

Using the store-locator-le nomenclature allows us to publish updates via the WordPress directory. This ensures plugin update notifications come in via the WordPress network & that you can simply click "upgrade" to install the new release. A bit easier than the manual process plus edition users went through before.

Now we just keep our fingers crossed the the WordPress czars keep our listing active now that we offer a premium add-on pack option. The plugin is fully functional without the add-on pack, you just don't get some of the "coolness" that comes in the Plus Pack add-on.

RE: Suggestion: allow placing CSS file in upgrade-safe location - Added by Alvaro Degives-Mas 5 months ago

I'm a bit confused about the location of the custom CSS files. According to the documentation, the admin.css and csl-slplus.css files should go here:

/wp-content/uploads/sl-uploads/custom-css/

However, looking at the website I see calls looking for them in:

/wp-content/uploads/sl-uploads/custom-css/core/css

Should they be in both? If so that might be easily overlooked by users. If not I suppose there's some lingering path problem.

RE: Suggestion: allow placing CSS file in upgrade-safe location - Added by Lance Cleveland 3 months ago

2.4 beta is available from the file download section here. It may solve some of your problems.

There are 2 new features in the release that are only available to people that purchase the 2.4 upgrade pack. The 2.4 upgrade will appear on the general settings page when we launch the final release of 2.4 on WordPress. The upgrade fee for the new features will be set at $1.

The new paid upgrade pack features include:

  • Custom Themes - you can now create customized CSS files and automatically selected them from the display settings. Upgrades/patches will not overwrite your custom CSS files. We've created a simple dark listing theme and will add more advanced custom themes on future builds.
  • Center The Map - you will be able to choose ANY ADDRESS as the default location on which the map will center.

Details on both features are noted in the documentation:
http://redmine.cybersprocket.com/projects/mc-closeststore/wiki

(1-7/7)