31 Commits

Author SHA1 Message Date
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
Ian
b2b415a5a0 fixed explode 2cd param to string 2013-01-24 18:01:27 +01:00
Ian
a3061f3ab5 Update include/serendipity_smarty_class.inc.php
added smarty BC function get_template_vars()

relies on some additional plugins like serendipity_event_autotitle.php, serendipity_event_multilingual, serendipity_event_sidebarhider, serendipity_event_downloadmanager, serendipity_event_microformats and possibly also more plugins by custom developers.
2013-01-24 15:50:21 +01:00
Ian
76b3a1ae71 Update include/serendipity_smarty_class.inc.php
re-added prev removed disabled config switch
2013-01-21 17:08:06 +01:00
Garvin Hicking
53ea38aa3c Port from master 2013-01-21 10:06:09 +01:00
Ian
4d9fa16b1e re-added 2.0 Smartification needs, which got lost by up-port 2012-06-13 16:17:11 +02:00
Garvin Hicking
f12f53aaab Damn, why does cherry picking not work? 2012-06-12 20:51:57 +02:00
Ian
d3e3ef3516 removed now obsolet internal function allowments 2012-06-01 14:57:56 +02:00
Ian
f9d2eaade9 better OR 2012-03-27 13:33:00 +02:00
Ian
9065abdb98 smartify installer without fail ... :D 2012-03-27 13:00:37 +02:00
onli
38104f37e2 smartified plugins.nc.php 2012-03-02 15:39:58 +01:00
Ian
7e41ce666e (experimental) extended Smarty_Security's allowed php_functions array (backend entries.inc.tpl) 2012-02-20 10:31:38 +01:00
Ian
82481fc1cf added nl2br to smarty allowed php modifiers 2012-01-03 14:14:14 +01:00
Ian
4db3a08f19 corrected note typos and changed trigger_errors error LEVEL
back to Warning as before, which still is halted by the smarty error handler
2011-12-25 15:24:08 +01:00
Garvin Hicking
933c63c904 Allow plugins to use fetch() call without the need to do any weird security_settings[INCLUDE_ALL] redirections 2011-12-22 12:16:34 +01:00
Garvin Hicking
59211ce36e Magic __set method to react to $serendipity['smarty']->security = false; which is the documented way in a template's config.inc.php to disable security in past s9y versions 2011-12-21 17:21:05 +01:00
Ian
7d9bf2e6c2 some doc cleanup in serendipity_smarty class 2011-12-05 13:12:17 +01:00
Ian
0682560ad8 last modified and doc header for last commit 2011-12-04 17:38:29 +01:00
Ian
747f9b207a enhanced get smarty object by instance function 2011-12-04 17:25:59 +01:00
Ian
b0377ef865 smarty compile dir - better exeption handler 2011-12-02 16:23:16 +01:00
Ian
7e0cdf30af throw exeption instead of die() 2011-12-01 15:53:10 +01:00
Ian
b84a8ccb53 date & tabs to spaces 2011-12-01 11:09:09 +01:00
Ian
dea13b461e some more caching docs in smarty class 2011-11-30 18:48:40 +01:00
Ian
b2affab6b8 Merge remote-tracking branch 'origin/master'
Conflicts:
	include/serendipity_smarty_class.inc.php
2011-11-30 18:43:25 +01:00
Ian
ebb8777932 some more caching docs in smarty clas 2011-11-30 18:40:28 +01:00
Ian
7fce1e47d8 S9y Smarty class: some more caching docs 2011-11-30 17:19:24 +01:00
Ian
436cc20a0b comment todo added 2011-11-28 12:31:09 +01:00
Ian
83185e6f28 experimental smarty class - some cleanup and noting 2011-11-28 11:33:53 +01:00
Garvin Hicking
2749dc54ad Smarty3 2011-11-24 12:16:02 +01:00
Garvin Hicking
23e5de77b7 merge Smarty3 by ophian 2011-11-24 12:14:03 +01:00