43 Commits

Author SHA1 Message Date
onli
5013d583f2 Apply PHP8 compat fixes for backend controllers
Taken from https://github.com/s9y/Serendipity/pull/750
2021-05-06 20:45:19 +02:00
klemens
5a95db314a spelling fixes 2017-04-06 22:26:07 +02:00
onli
cdf375623d Require token to change theme (fixes #452) 2017-03-02 12:08:05 +01:00
onli
d9b1baab76 Further improve theme ordering
Stabilizes output of the recommended themes
2016-10-10 18:43:03 +02:00
onli
196c3becb2 Order themes by their shown name 2016-10-10 18:36:44 +02:00
onli
32d0a6bf4f Fix: Don't break backend theme box
If the current theme was not the same as the backend theme, but the
backend theme was part of a recommended theme, then that backend theme
would get accidentally removed from the list of themes and thus nto set
as the current backend theme, breaking the themes menu
2016-04-20 20:47:57 +00:00
onli
cc4e9f953e Introduce recommended section in theme backend
Meant to highlight modern themes for guiding users not to pick the outdated xhtml themes still available via spartacus. See http://board.s9y.org/viewtopic.php?f=5&t=20713
2016-04-14 16:18:16 +02:00
Ian
d93674485d cleaups 2016-03-19 17:18:11 +01:00
garvinhicking
0cce92d4d7 Add ability to preview demo themes in spartacus. 2015-03-16 14:31:34 +01:00
Ian
8da4c647a8 cleanup tabs and whites 2014-11-24 14:17:38 +01:00
onli
92afc37753 Introduce serendipity_specialchars-wrapper for encoding bug (#236)
PHP 5.4 sets UTF-8 as the default for htmlspecialchars, htmlentities and html_entity_decode. The first two will echo an empty string when given a string with umlauts. This commits introduces serendipity_specialchar-wrapper that are meant to be a temporary solution for the s9y-core until PHP 5.6 fixed the bug, so the native charset option of s9y continues to work.
2014-11-23 23:41:08 +01:00
Garvin Hicking
1b37e41e00 Issue #165 - allow to set configuration of children to their parents config, but on their own names.
Global options (navigation) are even carried through so that they use the central part.
This falls back in place rather nicely, I hope it REALLY works. My first tests showed no issues.
2014-05-28 11:48:56 +02:00
Ian
ac1d4a7076 revert part of 7474f78 and fix the order
to prevent wp themes engine yes to be included to array $templates
References #165 7474f78 38204c4
2014-05-21 15:46:15 +02:00
Ian
7474f785e5 removed some jurassic park codes and add wp-theme preview image
References #165
2014-05-21 13:08:13 +02:00
Ian
734217e0da fix 38204c4 2014-05-21 11:25:32 +02:00
Ian
38204c4053 better have logic in php - fixes #165 1 b 2014-05-20 17:45:53 +02:00
Ian
b8e60cd7ef fixes #165 1 a 2014-05-20 17:41:55 +02:00
onli
d1d95aa643 Show backend preview (#151)
This code really should be revamped
2014-05-16 23:40:06 +02:00
Garvin Hicking
dd83225447 This is my proposal on implementing the ability to switch frontend and backend templates independently.
- This introduces a new option "template_backend" that will be set to indicate the backend template, defaults to 2k11.
- The "Engine: xxx" line in info.txt still works, but only for the frontend
- The frontend fallback chain defaults to the old "default" template to ensure that themes will work that have "old-style" HTML output
- The backend fallback chain only falls back to 2k11 and then "default"
- In the future, we will remove templates/default/admin once the mechanism is proven stable

To test this in all cases you can:

- Copy 2k11/ to 2k11-custom, edit info.txt, give it a distinct name. Edit the admin/index.tpl file to add some code to ensure that you will see that template in the backend if you pick it, or adjust the style.css or whatever.
- Copy idea/ to idea-custom, edit info.txt, add a "Engine: 2k11" line. Now you can test how a template would look like that fallsback on 2k11 instead of "default"

Those permutations can be checked and come to my mind:

- Backend: 2k11, Frontend: 2k11
- Backend: 2k11-custom, Frontend: 2k11
- Backend: 2k11, Frontend: 2k11-custom

- Backend: 2k11, Frontend: idea
- Backend: 2k11, Frontend: idea-custom

- Backend: 2k11-custom, Frontend: idea
- Backend: 2k11-custom, Frontend: idea-custom

They seem to work.

Currently the display of backend and frontend theme in templates.inc.tpl takes up some larger space. Maybe it could be prettified somehow, maybe put frontend and backend template next to each other, not beneath each other? Maybe @yellowled has some suggestions.

@onli and @ophian - please have a look at this, since you both also worked on the fallback chains. Please tell me if you have issues with this. We can easily revert, if you see this approach as not workable. This is more a "proof of concept" draft.
2014-05-14 12:58:06 +02:00
onli
99c1f4c87c Fix fallback chain
Engine: default in info.txt will now lead to the template to use template/default as fallback before the default-template (2k11 currently). An approach to fix #130

Also, template_engine is not automatically set to default, as this was implicitly always the case
2014-04-27 20:23:56 +02:00
Garvin Hicking
c5708f746c Added new event hooks for plugin and template installation/update 2013-07-23 09:46:44 +02:00
onli
ea317649ac Use bigger previews in template list
TODO: Generate real previews instead of downscaling the bigger ones, Cleanup inline css
2013-06-23 21:38:23 +02:00
onli
cbe07715fd use include_once 2013-06-21 18:11:03 +02:00
onli
342d8676bf show_plugin_config: use return instead of echo 2013-06-21 12:28:43 +02:00
onli
2911e71bc6 Moved theme-settings to own page 2013-05-30 22:56:40 +02:00
onli
ae74401668 2k11 is default template, included admin-tpls, and made it installable 2013-05-30 22:19:07 +02:00
onli
a56b5382e1 removed TEMPLATE_SWITCH 2013-05-27 21:06:52 +02:00
Ian
1559472ca3 Update include/admin/templates.inc.php
to avoid displaying older template vars in case of a template change like from BP to some other Template, in case of:
- previouses config_groups in templates with a config file and 
- all other other core used vars in case of no config file
This may need further finetuning...
2013-02-05 17:24:39 +01:00
Garvin Hicking
71ee300143 Purge browser cache using a timestamp variable when switching templates.
This should hopefully fix Ian and my problems.
2013-01-28 09:35:34 +01:00
Ian
fb81d6a121 added temporary backend developer template dir switch - Please read:
The smartified code as forked from master to 2.0 being outsourced,
now is to find in /include/admin/tplold, which will still be used as
the default backend template dir.
To switch to the new version, please paste the dirs and files of s9y-admin-tpl
as adviced in the readme and reload, but also add a
```php
	// End of Serendipity configuration file
	// You can place your own special variables after here:

	define('SWITCH_TEMPLATE_VERSION', 'true');

```
to the end of your serendipity_config_local.inc.php.

To switch back to the old smartified files, just set a // to the define().
2012-11-20 14:38:28 +01:00
Ian
ba518b7864 use tpl dir and smarty3 short notation fetch() method 2012-02-17 18:33:10 +01:00
onli
55edda14bf smartifying: template.inc.php, category.inc.php 2012-02-16 20:00:08 +01:00
Garvin Hicking
e8cacdcfdd (backport)
Fix a situation where globally stored template variables do not get preference over local (old) ones
	docs/NEWS
2011-11-03 17:06:14 +01:00
Garvin Hicking
8420699997 template and plugin option groups, experimental 2011-01-03 09:11:17 +00:00
Garvin Hicking
f9fa8503f0 (experimental) global theme options 2010-08-24 08:45:09 +00:00
Don Chambers
c6f02b6efc Corrected typo - span was closed before inline style declared for "unmet requirements". 2009-07-17 21:24:39 +00:00
Garvin Hicking
f75f1be51b Tokenize template configuration 2008-04-16 11:41:29 +00:00
Garvin Hicking
a0d950b320 HTML and images by Don 2007-08-06 10:18:26 +00:00
Garvin Hicking
472432b1b9 Merge patch from Don Chambers for better input classes in admin 2007-07-12 09:40:04 +00:00
Garvin Hicking
af6168f26f Remove debug out 2007-07-02 11:59:27 +00:00
Garvin Hicking
e44a22cf06 Display theme's preview_fullsize.jpg image when existing. 2007-04-03 08:21:34 +00:00
Garvin Hicking
a8562c5783 Add new hooks 2006-10-04 08:16:42 +00:00
Garvin Hicking
80e14346a5 Also support "last X" REST interface 2006-08-02 10:07:34 +00:00