[2.0] Smartifying the backend

Mark threads with "[2.0]" for discussions about features in the longer-term future, "[1.6]" is for short-term. This is not the place for general discussions or plugin or template requests. Only features that are approved to happen by the core team should be listed here for better structuring.
User avatar
onli
Regular
Posts: 2190
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: [2.0] Smartifying the backend

Post by onli » Tue Apr 10, 2012 11:50 pm

yellowled wrote:Also, I'm kind of fed up with installing over and over again.
Understandable. It's great you discovered all those bugs in the smarty-rewrite. Thank you very much so far.
yellowled wrote:Yes, but this is why we're doing all this in the first place, isn't it?
In fact, I think: no. This is a seperate issue which has nothing to do with the smarty-port and belongs in its own thread (and all the bugs we fixed so far were completely unrelated).
Maybe you could start a new thread for that issue from Garvins last response on, like suggested before? Or Garvin, could you? One of you should have the rights to move those posts.

User avatar
yellowled
Regular
Posts: 6990
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] Smartifying the backend

Post by yellowled » Wed Apr 11, 2012 4:47 am

onli wrote:Maybe you could start a new thread for that issue from Garvins last response on, like suggested before? Or Garvin, could you? One of you should have the rights to move those posts.
If so, we should really start a new thread. Moving more than one post is not going to make this thread more readable IMHO, especially since some posts are very mixed. Sorry for that, but I initially considered this to be an issue presented by the rewrite.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] Smartifying the backend

Post by Timbalu » Wed Apr 11, 2012 10:01 am

I always assumed this was clear to you, that this uberspace issue had nothing to do with the smartification, as also happens in 1.6. Maybe this htaccess rule is the one to go.

To return to the upgrader... with a small typo fix (commited) this is now running without any problems.
I just ran an upgrade from 1.6 to 2.0-Alpha1 without any smartification errors, nor others.

What about further function_* plugins and image markup replacements?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 6990
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] Smartifying the backend

Post by yellowled » Wed Apr 11, 2012 10:18 am

Timbalu wrote:I always assumed this was clear to you
Obviously not. :mrgreen:
Timbalu wrote:What about further function_* plugins and image markup replacements?
What about them?

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] Smartifying the backend

Post by Timbalu » Wed Apr 11, 2012 10:28 am

Is that done by you and your helpers?
Or do we need to smartify (or at least make them workable for you) them to push things forward? :wink:
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
garvinhicking
Core Developer
Posts: 30014
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] Smartifying the backend

Post by garvinhicking » Wed Apr 11, 2012 11:03 am

Hi!

I cut the Ubernauten-Subdomainstuff into a seperate thread in "Installation".

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
yellowled
Regular
Posts: 6990
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] Smartifying the backend

Post by yellowled » Wed Apr 11, 2012 1:35 pm

Timbalu wrote:Is that done by you and your helpers?
Helper. We lost some helpers along the way.

We are going to need more help, especially with the media database. Then again, we already considered replacing the media db altogether, so I think it's best to leave it alone at the moment.

Other than that, the backend .tpl files are almost done, I only need to "backport" all the stuff we figured out in this thread, and quite frankly, I need a break from this right now.

Basically, the idea was to style the backend and present it to you guys before we go any further, but through all the hassle with the uberspace setup, this has stalled. We can probably do the styling without a demo blog, but it would've been nicer to have one.

So for the time being, just have some patience, please.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] Smartifying the backend

Post by Timbalu » Wed Apr 11, 2012 2:14 pm

It was just an offer for further help, no hurry! :wink: Take your break!

I was a little worried, if this gets out of sight, I might loose track, remembering some issues still to check and solve. I'll note them here. Maybe Garvin also finds some time to check it in the meantime... Please, Malte, everybody, add to this list:
  • Malte and I were not always sure we got all these needed hooks placed as {serendipity_hookPlugin hook="xxx" hookAll="true"} or as $ob_get_var into the new tpls. This has to get investigated (Garvin?).
  • What about the need for new markup in the importers files?
  • Rewrite some admin files to support some Selects as functions, to avoid redundancies, since we could use them in plugins, like the dashboard (see my PoC, in entries and comments) a.s.o.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
garvinhicking
Core Developer
Posts: 30014
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] Smartifying the backend

Post by garvinhicking » Wed Apr 11, 2012 3:07 pm

Hi!
  • Malte and I were not always sure we got all these needed hooks placed as {serendipity_hookPlugin hook="xxx" hookAll="true"} or as $ob_get_var into the new tpls. This has to get investigated (Garvin?).
Do you have specific examples, I'm not sure I understand.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] Smartifying the backend

Post by Timbalu » Wed Apr 11, 2012 3:44 pm

No sorry. No specific examples.
But I was talking about all files that got smartified in /include/admin/*.php.
Some of them had serendipity_plugin_api::hook_event() lines. If I remember correct, we smartified (to tpl) the ones being very clear, others just by $smartyvar = ob_get_content(). I have in mind there were some left remaining as is, while not really knowing what kind of content hooks-in, needing to appear into a specific line of markup...

Two examples, hopefully not one pointing you into the wrong direction, possibly like serendipity_plugin_api::hook_event('backend_entry_iframe', $use_legacy); in
https://github.com/s9y/Serendipity/blob ... c.php#L244 or serendipity_plugin_api::hook_event('backend_http_request', $options, 'image'); in
https://github.com/s9y/Serendipity/blob ... c.php#L204 (this file has lots of them, please follow down)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
garvinhicking
Core Developer
Posts: 30014
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] Smartifying the backend

Post by garvinhicking » Wed Apr 11, 2012 7:20 pm

Hi!

Ah! I see. The two instances you mention are perfectly fine.

We only need to pay attention that if a backend plugin API hook is meant to emit HTML code, that it's put within the .tpl file; and if it's meant to modify object or other variable data, it stays in the PHP scope. In the mentioned case, that was fulfilled.

If you or onli remember which hooks you were not sure with or that were left, please let me know and I'll try to look these up specifically. Usually I simply grep the event hook name in the additional_plugins module and see how it's used, and then see if that usage is still possible.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] Smartifying the backend

Post by Timbalu » Thu Apr 12, 2012 2:17 pm

Hmmm, I knew it would come back as a bumerang ... ;-)
What about images.inc.php#L373 ?
If you or onli remember which hooks you were not sure with or that were left, please let me know
I don't really remember them and I'd possibly say, all which are left to stay as they were... Personally I am not sure I could decide in each case clear enough, which one is worth to get investigated...

Therefore I think it would be much easier if you could just grep all "serendipity_plugin_api::hook_event" in the admins dir php files and see if there are some missing to get pushed to the tpls somehow....
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
garvinhicking
Core Developer
Posts: 30014
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] Smartifying the backend

Post by garvinhicking » Thu Apr 12, 2012 3:47 pm

Hi!

OK; I'll try to check this once I check the whole smartification code (which I haven't had the chance to, yet).

What I saw right now, instead of:

Code: Select all

$data['print_ERROR_NO_DIRECTORY'] = sprintf(ERROR_NO_DIRECTORY, $new_dir);
wouldn't it be clearer to assign $new_dir to a smarty variable and do the whole sprintf with the language constants inside the .tpl ?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
onli
Regular
Posts: 2190
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: [2.0] Smartifying the backend

Post by onli » Thu Apr 12, 2012 4:03 pm

garvinhicking wrote: What I saw right now, instead of:

Code: Select all

$data['print_ERROR_NO_DIRECTORY'] = sprintf(ERROR_NO_DIRECTORY, $new_dir);
wouldn't it be clearer to assign $new_dir to a smarty variable and do the whole sprintf with the language constants inside the .tpl ?
Yes. That should be done inside the tpl (and it should already be that way in some .tpls).

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] Smartifying the backend

Post by Timbalu » Thu Apr 12, 2012 4:19 pm

Well YES from a certain point of view, NO while having some other sprintf()'s using internal functions...
That is why I decided in my smartified files to stick with $data['print_CONSTANTNAME'], which I thought to be faster delivering already parsed notes, as this is not a public backend. In the tpl this is clear while using this $print_* var.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Locked