Search found 90 matches

by javiexin
Wed Aug 05, 2015 8:45 am
Forum: [3.x] Discussion
Topic: Proposal: new JS functionality to add for extensions
Replies: 17
Views: 28365

Re: Proposal: new JS functionality to add for extensions

VSE wrote: Wed Aug 05, 2015 3:22 am You can not replace a core template file from an extension.
Thanks, that is clear. Not what brunoais said though, but I understand.
Thanks again,
-javiexin

EDIT: No wonder I didn't see these events before, they are new in 3.1.6 (although the commit says 3.1.5)!
by javiexin
Wed Aug 05, 2015 1:16 am
Forum: [3.x] Discussion
Topic: Proposal: new JS functionality to add for extensions
Replies: 17
Views: 28365

Re: Proposal: new JS functionality to add for extensions

Thanks a lot, this is a good alternative for this case. If we use those events, then probably the better solution would be setting the S_SHOW_POLL_BOX template var to false, replace it with a custom template var (say S_MY_SHOW_POLL_BOX) and use the posting_layout_include_panel_body and posting_edito...
by javiexin
Tue Aug 04, 2015 10:13 pm
Forum: General Development Discussion
Topic: Notification error on Area51
Replies: 10
Views: 25090

Notification error on Area51

Hi, I don't know where to post this, so I am doing here, just so you tell me where to put it. I have the following situation: 1) I have a notification in my received notifications, it is active, so the number of active notifications shows as "1" . I open the notifications dropdown and mark...
by javiexin
Tue Aug 04, 2015 11:21 am
Forum: [3.x] Discussion
Topic: Proposal: new JS functionality to add for extensions
Replies: 17
Views: 28365

Re: Proposal: new JS functionality to add for extensions

You may also replace the HTML files completely in your extension. How do I do that? I have tried putting a file named the same as the template to be overridden in the extension styles/prosilver/template folder, but that does not load as expected, so I guess there is something I am missing. For the ...
by javiexin
Mon Aug 03, 2015 8:19 am
Forum: [3.x] Discussion
Topic: Proposal: new JS functionality to add for extensions
Replies: 17
Views: 28365

Re: Proposal: new JS functionality to add for extensions

Trying to handle this using Javascript is the wrong approach. But the only viable one right now... It will be handled in the future using PHP and Twig. This is very good news. For now, ext authors must use CSS and as a last resort JS to modify the DOM, Precisely: CSS cannot be used to move things i...
by javiexin
Wed Jul 29, 2015 10:54 pm
Forum: [3.x] Discussion
Topic: Proposal: new JS functionality to add for extensions
Replies: 17
Views: 28365

Re: Proposal: new JS functionality to add for extensions

This would be an interesting alternative. However, I would argue that it is much more complex than using JS: it almost would require a parser to do some small modifications, while in JS, the use of element selectors helps a lot, as you want to act at that level (vs the "string" level that ...
by javiexin
Sun Jul 26, 2015 12:43 am
Forum: [3.x] Discussion
Topic: Proposal: new JS functionality to add for extensions
Replies: 17
Views: 28365

Re: Proposal: new JS functionality to add for extensions

Possibly, but only on very slow connections or systems. Otherwise, it should be almost unnoticeable. The new code is hidden to begin with, and only shown after being moved to the right location. And while the existing components might have appeared before being replaced, there could be some kind of ...
by javiexin
Sat Jul 25, 2015 4:16 pm
Forum: [3.x] Discussion
Topic: Proposal: new JS functionality to add for extensions
Replies: 17
Views: 28365

Re: Proposal: new JS functionality to add for extensions

BUT! You may also replace the HTML files completely in your extension. The problem there, though... The unit is the file... But that defeats the whole purpose of extensions and events, to prevent against problems with future code changes... and to allow for multiple extensions to coexist. The examp...
by javiexin
Fri Jul 24, 2015 4:16 pm
Forum: [3.x] Discussion
Topic: Proposal: new JS functionality to add for extensions
Replies: 17
Views: 28365

Proposal: new JS functionality to add for extensions

Hello, I would like to propose a new functionality to facilitate the work from extension developers. Given the current inflexibility of the Template Event mechanism, that only allows to ADD HTML code at certain points, but does not allow to replace or otherwise modify the existing code, extension de...
by javiexin
Sun Jul 12, 2015 11:44 pm
Forum: [3.x] Discussion
Topic: Using template event files in styles
Replies: 5
Views: 12293

Re: Using template event files in styles

Wouldn't this be as simple as creating a new extension directory, a new composer.json file, enable it as an extension, and there you go: just put whatever template events you want to customize in the styles folder of that "empty" extension... I might have left some minor detail (maybe crea...