29 Commits

Author SHA1 Message Date
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