1
0
Commit Graph

60 Commits

Author SHA1 Message Date
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
a815b217b8 Introduce js_backend hook
Will help when JS shall only be emitted in the frontend/backend, as with the CSS
2014-05-11 23:57:19 +02:00
Ian
ab1230f5e1 minor - translate internal coding notes 2014-03-14 09:48:37 +01:00
b512c16c7d Patch for APC compatibility, relative paths are bad for stat=0 config.
Thanks to absynth.
2013-12-16 23:24:56 +01:00
a654b13a9a Complete include_once usage, romove constants 2013-06-22 12:32:54 +02:00
cbe07715fd use include_once 2013-06-21 18:11:03 +02:00
be3d4d1d74 Add plugin-hook "js"
Use $link_head_script in a smarty-template to emit the path to the generated virtual javascript file
2013-06-15 16:14:14 +02:00
347311e78d rely on smarty-init-css also in the backend 2013-06-15 15:40:42 +02:00
0044e210ae Remove layout.php remains 2013-06-15 15:29:54 +02:00
5f565184c1 Dont call smarty->getconfigDir twice 2013-05-31 23:22:25 +02:00
615a1300ec only include config if exists, fixes installer 2013-05-30 20:55:20 +02:00
d566e54dfe smarty_show: use fetch, for better control 2013-05-28 17:34:24 +02:00
c9e0f26fd0 cleanup of serendipity_smart_show 2013-05-28 11:53:35 +02:00
5ec7481030 Port of patch #16 to 2.0 2013-05-06 09:47:19 +02:00
e1526d87b8 added serendipity_smart_show-function to core, as it was used in multiple places like plugins and templates 2013-03-06 14:52:36 +01:00
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
f1b3e3b241 backport 2012-06-13 15:22:57 +02:00
e72c90a69d Merged branch 'master' into 2.0 (compatibility fixes) 2012-06-13 15:12:35 +02:00
1f9630b394 Compatibility fixes. 2012-06-13 14:24:45 +02:00
d7ef7a7a04 port everything so that 2.0 and 1.7 have the same features 2012-06-12 19:39:11 +02:00
ba4b629816 ISO-8859-1 fallback patch so that my blog works ;) 2012-05-25 10:14:47 +02: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
Ian
fd0f634621 convert all $smarty->trigger_error() to native trigger_error()
with E_USER_ERROR set and
initialize the smarty object by instance
as always cleanup some tabs
2011-12-04 17:52:37 +01:00
2749dc54ad Smarty3 2011-11-24 12:16:02 +01:00
c292badf30 * Added new serendipity['defaultBaseURL'] variable that makes sure
that the baseURL is not overriden when configuring serendipity
      with a possibly autodetected currentl URL. Patch by Manko10.
2011-09-28 12:03:28 +00:00
13ff56ad4a proper logic 2011-01-08 22:33:12 +00:00
334e7a9ba6 smarty3 prep 2011-01-07 10:21:02 +00:00
fd480a58d4 smarty3 compat 2011-01-06 17:46:43 +00:00
8420699997 template and plugin option groups, experimental 2011-01-03 09:11:17 +00:00
b448739802 Add new parameter "empty" to {serendipity_showPlugin} 2010-12-31 18:00:43 +00:00
e46563693c missing commit 2010-12-21 19:41:19 +00:00
afc4c997d3 Allow to pass 'template' variable to serendipity_showPlugin 2010-11-29 16:53:25 +00:00
f9fa8503f0 (experimental) global theme options 2010-08-24 08:45:09 +00:00
a7b27ff06a tweak to support multiple engine: in info.txt of templates 2010-08-23 19:06:17 +00:00
c12f676940 just to be sure 2010-08-20 12:57:45 +00:00
3a77f13428 * PHP 5.3.0 compatibility without E_WARNING triggers (garvinhicking) 2009-08-21 08:52:50 +00:00
f2dee79592 fix parse error 2009-07-03 11:58:50 +00:00
29601b1869 * no longer use htmlspecialchars() on the blog's title and sub-
title, to allow for custom HTML code to appear and unify
      only letting Smarty do the escaping (garvinhicking,falk)
2009-07-03 06:08:08 +00:00
daab40640e Better regexp for detecting quotes in 'entryprops' parameter 2009-02-26 10:30:20 +00:00
830e79d87f add debug possibility 2009-02-26 10:26:35 +00:00
66f94e7d1a add the same capability to trackbacks 2008-12-12 15:50:58 +00:00
0a7a26b67d * Added more parameters to {serendipity_printComments} function:
"block" (smarty block variable name),
      "template" (smarty template file to render)
      [1.4-beta2]
2008-12-12 10:58:56 +00:00
f8393caa02 expose hide_category parameter to fetchPrintEntires 2008-06-27 10:44:14 +00:00
1dbde90720 Hide version number in rss feeds 2008-03-26 11:31:52 +00:00
96ee4ced98 Use language constant NOT_FOUND 2008-03-19 11:33:28 +00:00
efd63e33f6 Add function to allow Smarty to retrieve image dimensions 2008-03-19 11:32:13 +00:00
9182557da7 Add 'template' option 2008-02-21 09:42:50 +00:00
4227ee1038 Added hooks to trackback listing in order to let plugins change it (the avatar plugin in example) 2007-12-22 18:49:03 +00:00
83205fb019 Add new "joinown" and "entryprops" parameters to
{serendipity_fetchPrintEntries}
2007-11-29 12:27:50 +00:00
cb75ef15ce Allow variying template 'okey' 2007-08-21 10:25:57 +00:00