Skip to main content
Topic: IRC (Read 107212 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: IRC

Reply #210

(11:02:19 PM) groundup: Admin search should be done with a call to a method in each controller.
(11:04:27 PM) groundup: public function getAdminSearch() { return array(array(setting, controller, action)); }
(11:20:24 PM) Norv: It is done with a call to a method in each controller
(11:20:54 PM) groundup: Cool, I thought it was done with a central function

(11:46:09 PM) emanuele: what do you think about dropping the "simple" permissions view?
(11:46:39 PM) Norv: I'd like that
(11:46:57 PM) ***Norv is not a fan. I suppose you mean the view where only some are displayed
(11:47:18 PM) emanuele: TBH I don't even know the difference... lol
(11:47:53 PM) emanuele: I always switch to classic every time I install it...it's one of the first things I do :P
(11:48:48 PM) Norv: Same.
(11:49:01 PM) emanuele: That's something that was hanging around in my mind since a while, though it's Arantor's fault if I remembered it now O:-)
(11:49:57 PM) Norv: I think simple view had a few fans, but tbh I remember many weren't.

(11:50:17 PM) groundup: Is there a function that will tell if a list of topics has been seen? (SELECT * FROM log_topics WHERE id_topic IN($topics))
(11:51:48 PM) Norv: groundup: tbh I don't know lol. We have, so far, made them in no order, no intentions to cover something conceptual, only what has come up in practice.
(11:52:23 PM) groundup: I was just looking at the Markasread.controller
(11:52:24 PM) Norv: Which reminds me we probably should get to that too, at least: make sure that each 'entity' has a basic crud.
(11:53:50 PM) Norv: My suggestion is, if you don't find one suitable for you, just make one. If it will prove duplicate lol, then it will be pointed out during review, or we remove it later.
(11:54:32 PM) ***Norv hasn't really dealt with subs, iz still on controllers and stuff
(11:54:59 PM) groundup: Just looking for queries in controller
(11:56:18 PM) groundup: MessageIndex has a bunch
(11:56:37 PM) Norv: Kill.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

 

Re: IRC

Reply #211

(11:57:52 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(11:57:52 PM) elk_core: [Elkarte] eurich opened pull request #405: Minimalist theme (master...defaulttheme)  http://git.io/qjhgCg
(11:57:52 PM) elk_core left the room.

(05/17/2013 12:01:46 AM) groundup: Can't comment on the CSS because I don't read hex colors but nice template changes :)

(12:03:20 AM) emanuele: http://www.simplemachines.org/community/index.php?topic=503880.msg3545579#msg3545579
(12:08:36 AM) Norv1: Ohh.
(12:10:46 AM) ***emanuele is thinking too much in that period... :P
(12:10:48 AM) Norv1: Myep... Something as you say, yes. There was an older brainstorming on permissions UI somewhere, I inclined to something like that.
(12:11:13 AM) Norv1: Although one different page for deny won;t work I think
(12:11:18 AM) Norv1: you need to see it
(12:11:57 AM) Norv1: (unless you meant column?)

(12:14:05 AM) emanuele: I was thinking about two pages, but it may even be a "main switch": assign allow/assign deny
(12:14:23 AM) emanuele: and then clicking on the group show all of them or something like that
(12:14:33 AM) emanuele: (I mean allowed and denied)
(12:17:38 AM) Norv1: What I find interesting in particular is groups selectable on the left. It's unexpected in a way, I suppose, but it would be very handy I think. Compared to going back, selecting another group, blah (and forgetting what it was before - sometimes you want to compare mentally, i.e. to assign the same 3 stuffs or something.)

(12:16:41 AM) groundup: hmm... can someone look in to something for me? // If we want to know who participated in what then load this now. in search.controller.php
(12:16:55 AM) groundup: $participants is not used after that. Any idea what it should be?

(12:18:54 AM) emanuele: Nope, apparently is not used groundup
(12:19:15 AM) groundup: It was definitely used at some point. Not sure what for though.
(12:19:25 AM) emanuele: lol
(12:19:31 AM) emanuele: yes, I can imagine
(12:19:39 AM) ***emanuele goes dig SVN :P
(12:20:45 AM) emanuele: aha!
(12:20:48 AM) emanuele: It's a global
(12:21:12 AM) groundup: ugh... who the hell did that?
(12:21:25 AM) emanuele: always been
(12:21:51 AM) groundup: That makes tons of sense, right? no
(12:22:22 AM) emanuele: lol who knows...
(12:22:26 AM) groundup: Ugh, my master is still screwed up.

(12:22:31 AM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(12:22:31 AM) elk_core: [Elkarte] joshuaadickerson opened pull request #406: Topic participation (master...TopicParticipation)  http://git.io/ABOpYg
(12:22:31 AM) elk_core left the room.

(12:22:42 AM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/e1f0eb0c04e9638801038304557f2904c53f3bad
(12:23:03 AM) emanuele: it's like that since 1.1...
(12:25:03 AM) groundup: Did that PR for getTopics() or whatever the equivalent getTopicInfo but for multiple topics, ever get merged?
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #212

(12:30:16 AM) groundup: Norv, http://screencast.com/t/RWEwjzpT7 any reason for that rogue function?
(12:35:45 AM) Norv: Well. It's a sort of "prepareTopicContext" lol. The prepareXxxContext are functions that hang around controllers now...
(12:36:52 AM) Norv: Sending it to subs would not be that good, since it really does a lot with globals (i.e. $context) - it's a sort of controller helper function
(12:39:15 AM) groundup: It only "prepares" one variable but even still, why is it outside of the class?
(12:40:13 AM) groundup: and getTopic() is not at all telling of what it does and is very prone to be thought of as doing something else (like getTopicInfo())

(12:43:57 AM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(12:43:57 AM) elk_core: [Elkarte] emanuele45 opened pull request #407: Ajax something (master...ajax_something)  http://git.io/wTsnXw
(12:43:57 AM) elk_core left the room.

(12:44:51 AM) Norv: Agree, bad name. As for outside the class, well, thats a question. There are others, in user controllers, it's not a singular case
(12:47:49 AM) groundup: I have a solution... wait 1
(12:49:08 AM) Norv: Some will be moved, but probably not all. I think I'd prefer to have a common solution for the remaining, but I need to see better all cases. Or it might not be entirely possible, and let them be. (inside or outside) Some helper functions/methods.
(12:52:53 AM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/e081427ccd5d921b5138d8e7156343d8d12562a5 now you can get rid of that function ;)
(01:12:34 AM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/03df9499eed6fdf751b40dff66454a43564e1090 https://github.com/joshuaadickerson/NotElkarte/commit/41ea2fce047810ceccf446288e9c48dbcc90159e to complete the removal ;)
(01:13:13 AM) Norv: Ah, thank you! Will look! (need clear head and ain't got one of those)

(01:14:55 AM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(01:14:55 AM) elk_core: [Elkarte] norv pushed 32 new commits to master: http://git.io/FxSDbg
(01:14:55 AM) elk_core: Elkarte/master 813df3a Thorsten Eurich: initial commit for the white minimalistic theme (just the index.css for now).. credits go to emanuele45 :)...
(01:14:55 AM) elk_core: Elkarte/master 70c5fdd Thorsten Eurich: replaced the light blue with a light grey inside the admin section....
(01:14:55 AM) elk_core: Elkarte/master f33c014 Thorsten Eurich: added basic variant support, just testing features.....
(01:14:55 AM) elk_core left the room.

(01:15:24 AM) Norv: emanuele: oops the theme got some conflict with ajaxsomething
(01:16:56 AM) Norv: mmm obviously. But it's because everyone is after you.
(01:17:53 AM) ***emanuele was expecting something like that... :P
(01:20:05 AM) Norv: That everyone is after you? :-X
(01:20:45 AM) emanuele: that too... :O
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #213

Quote from: TestMonkey – (12:25:03 AM) groundup: Did that PR for getTopics() or whatever the equivalent getTopicInfo but for multiple topics, ever get merged?

Which one, this?
https://github.com/elkarte/Elkarte/pull/205
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #214

(02:14:43 AM) emanuele: arg right, json is 5.2...
(02:15:33 AM) groundup: load Compat.subs.php if PHP version < 5.3
(02:16:00 AM) groundup: That way you are coding for 5.3 but allow for 5.1
(02:17:39 AM) emanuele: meh...don't want to write a json_encode function... :P
(02:19:39 AM) groundup: You don't need to: http://us2.php.net/manual/en/function.json-encode.php#100835
(02:20:28 AM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/dbaeca1141b26f3e9388e7492f2a7ef7d7b1eace
(02:26:21 AM) emanuele: mmm...I don't like to rely too much on functions found "around on the internet" for default features...but maybe Norv thinks otherwise
(02:27:03 AM) groundup: It's the basis for open source development - you don't invent everything, you can use something from someone else

(02:29:50 AM) groundup: That sucks... my Netbeans project just got corrupted. Now I can't open it.
(02:30:12 AM) groundup: I was just about to add an About controller and move the coppa agreement, the registration agreement, credits, etc to that.
(02:36:52 AM) groundup: Then I was going to change the Dispatcher to send a DIC to the controllers.
(02:37:33 AM) groundup: So, in the future people will start to use it

(02:35:30 AM) Norv1: Bah.
(02:39:40 AM) Norv1: Agree Ema. And, dunno... Should we really want to add more stuff like this, compatibility for newer PHP features. In a sense it's worse than not adding it at all for this version.
(02:40:01 AM) groundup: So you're not going to allow JSON?
(02:40:36 AM) groundup: You could just bump the minimum version to one that makes sense ;)
(02:43:46 AM) Norv1: I don't know, really. More arguments welcome. Yeah, but we're talking an almost new api (well otherwise underused), a new design/implementation for it, on ajax stuffs... that's already a nice thing
(02:43:21 AM) emanuele: well...TBH go 5.2 is a bit tempting... O:-) though is json so necessary in that world?
(02:43:40 AM) emanuele: genuine question
(02:43:50 AM) groundup: Is JSON necessary? Hmm... 2000 called, they want their XML back :P
(02:45:26 AM) Norv1: ema: yes. But I don't expect use of this api as json, as much as data of relevance, for some consumer
(02:47:31 AM) Norv1: Such as sending news. Topics by user. Data.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #215

(02:47:10 AM) groundup: Here goes 1000 arguments for bumping the minimum versions in a breath: hosts are vendors*, they do what *you want, not the other way around; Elkarte is new software, you aren't going to be getting first time users that you need to worry about supporting; this is 2013, PHP 5.3 is over 5 years old; who do you care more about - people that want to use cool UI interactions or people that want to support software from a decade ago; develop for tomorrow, not for 10 years ago; At least 5.2.9.. geez

(02:49:10 AM) groundup: In Calendar.controller.php -> // There could be already a topic you are not allowed to modify that query produces two variables that aren't used. What were they for before?

(02:55:12 AM) Norv: >> who do you care more about - people that want to use cool UI interactions or people that want to support software from a decade ago
(02:55:12 AM) Norv: That's a question. My answer is the first. (within some limits). Ema?
(02:55:41 AM) emanuele: myself :P
(02:56:18 AM) ***emanuele is very, very selfish O:-)
(02:56:36 AM) Norv: lol
(02:59:18 AM) emanuele: well, it's true: I am an SMF user (1.1) and I was on php 5.1 until a year ago when I discovered 5.2 was available and now I'm on 5.3 (and I'm using one of the biggest Italian oversellers too :P )

(02:56:19 AM) Norv: >> Elkarte is new software, you aren't going to be getting first time users that you need to worry about supporting
(02:56:19 AM) Norv: *cough*. Nope. Elk supports SMF users to upgrade.
(02:58:26 AM) groundup: Although it is really just an upgrade, it is also a conversion
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #216

(02:59:58 AM) groundup: I really want to know what is up with this // There could be already a topic you are not allowed to modify
(03:00:04 AM) groundup: I feel like that there is a security issue somewhere in that
(03:00:51 AM) groundup: Hmm... it's that way in 2.1
(03:01:22 AM) emanuele: it's new from 2.1...
(03:01:27 AM) emanuele: dunno who touched that part
(03:02:08 AM) groundup: https://github.com/SimpleMachines/SMF2.1/commit/f430ae407218f54d80d32583e3ad04a5565afd3f
(03:02:51 AM) groundup: https://github.com/SimpleMachines/SMF2.1/commit/f430ae407218f54d80d32583e3ad04a5565afd3f
(03:02:56 AM) groundup: Woops
(03:04:09 AM) Norv: http://dev.simplemachines.org/mantis/view.php?id=4734
(03:04:41 AM) emanuele: http://www.simplemachines.org/community/index.php?topic=349676.msg3038934#msg3038934
(03:05:17 AM) ***emanuele feels something got lost somewhere...
(03:05:27 AM) groundup: So, Spuds committed your mistake :P
(03:05:34 AM) groundup: lmao
(03:05:43 AM) emanuele: nope, my code was right
(03:05:54 AM) groundup: Ah, I see it now
(03:06:00 AM) groundup: Do you want to fix it?
(03:08:10 AM) emanuele: it's probably one of the first bug fixes I proposed! :D
(03:08:58 AM) emanuele: I don't even remember any more which one was the better solution... lol
(03:13:10 AM) groundup: So... do you think that query should be there or no?
(03:13:19 AM) groundup: If it should, it should be replaced with getEventProperties()
(03:14:02 AM) emanuele: I should read my mind of 2 years ago...unlikely. The query is fine and fixes the issue apparently, so it could stay there

(03:14:11 AM) emanuele: YAY!
(03:14:21 AM) emanuele: Finished to change permissions, finally I can go bed!
(03:14:33 AM) emanuele left the room (quit: Remote host closed the connection).
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #217

(03:28:35 AM) groundup: Am I missing something big here: Calendar.controller.php -> // Make sure the user is allowed to edit this event.
(03:28:44 AM) groundup: The isAllowedTo() is done after everything else
(03:37:06 AM) Norv: Err. loadBoard() is used for its side-effect: that if the user doesnt see it, then it fills the globals with 0 and stuff like that, it wants to boot them out
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #218

(04:05:49 AM) groundup: Can we use the constructor in the controllers now?
(05:46:14 AM) groundup: Norv, my repo is still jacked up

(08:32:25 AM) groundup: split topics controller: return action_splitSelectTopics(); should be return $this->action_splitSelectTopics();

(02:13:16 PM) Norv1: groundup: I suspect the unfinished merge that was around, messed up. git checkout master; git pull -f elkarte master
(02:14:07 PM) Norv1: git checkout master; git reset --hard 7281526; git pull elkarte master
(02:14:25 PM) Norv1: The second is an alternative sequence.

(02:35:26 PM) Trekkie101_Away: New theme is looking snazzier

(02:37:53 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(02:37:53 PM) elk_core: [Elkarte] norv pushed 18 new commits to master: http://git.io/oCbuRA
(02:37:53 PM) elk_core: Elkarte/master 9fa3a78 emanuele: Testing suggestions on ajaxify things...
(02:37:53 PM) elk_core: Elkarte/master 180ec73 emanuele: Some more changes to properly handle the "api" requests...
(02:37:53 PM) elk_core: Elkarte/master a716a27 emanuele: And the javascript to handle the notification button...
(02:37:53 PM) elk_core left the room.

(02:44:28 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(02:44:28 PM) elk_core: [Elkarte] norv pushed 96 new commits to master: http://git.io/NPHSUw
(02:44:28 PM) elk_core: Elkarte/master f27d830 Norv: Add quick 'n dirty Util class, legacy string functions from $smcFunc....
(02:44:28 PM) elk_core: Elkarte/master 7e23d66 Norv: Quick ->elk_ replacement....
(02:44:28 PM) elk_core: Elkarte/master 0d2391f Norv: Refactor db layer. (add db classes, add init per type)...
(02:44:28 PM) elk_core left the room.

(02:58:10 PM) Norv1: Trekkie101_Away: and we haz Ema's ajaxified thingies now
(02:58:17 PM) Trekkie101_Away: :)

(03:44:39 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(03:44:39 PM) elk_core: [Elkarte] emanuele45 opened pull request #410: Templates (master...templates)  http://git.io/F4H13w
(03:44:39 PM) elk_core left the room.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #219

(07:01:31 PM) emanuele: Norv!!!! Fatal error: Access type for interface method Database::last_error() must be omitted in /sources/database/Db.php on line 181
(07:01:34 PM) emanuele: :P
(07:03:17 PM) emanuele: abstract function last_error($connection = null);
(07:03:24 PM) emanuele: Should abstract be removed?
(07:04:21 PM) emanuele: also: Deprecated: Call-time pass-by-reference has been deprecated in /sources/database/Db-mysql.subs.php on line 27
(07:12:53 PM) Norv1: OY
(07:15:39 PM) Norv1: Fixed.
(07:23:16 PM) Norv1: (err, fixed directly without PR. I won't make it a habit, promise. :))
(07:41:25 PM) emanuele: The call-time pass-by-ref is still around... :P

(11:19:20 PM) Norv: groundup: fixed, thank you!
(11:20:06 PM) Norv: ema, tbh I thought it lower priority and didn't look at, sorry
(11:25:56 PM) emanuele: oh no problem! ;D

(05/18/2013 12:09:11 AM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(12:09:11 AM) elk_core: [Elkarte] norv opened pull request #411: Fixes (master...fixes)  http://git.io/5rGtOQ
(12:09:11 AM) elk_core left the room.

(11:59:03 PM) emanuele: When a Norv's commit message contains "very basic" be sure it's scary. :P
(12:11:27 AM) Norv: Ouch.
(12:11:54 AM) Norv: What did I do now?

(12:46:14 AM) ***emanuele is breaking templates! :D

(02:16:21 AM) groundup: I really don't want to test out https://github.com/joshuaadickerson/NotElkarte/tree/Denormalize-Attachments%26Events :(
(02:51:27 AM) Norv: I think serious pre-acceptance testing is really needed in that case. We don't get a prize for performance with untested risky changes to db structure.

(02:53:09 AM) Norv: >> groundup: Can we use the constructor in the controllers now?
(02:53:09 AM) Norv: Sure. I didn't see any need (that I remember), but we could anytime.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #220

(10:25:10 PM) Norv: lol Ema. Thanks for the smf heads-up. But, will you do the same on Elk again? O:-) Or make a nice and cool page/block to pull them from github? :)
(10:28:08 PM) emanuele: http://www.elkarte.net/index.php?topic=362.0
(10:28:19 PM) emanuele: It's funnier do it by hands! :P
(10:28:31 PM) emanuele: And I can comment on things... lol
(10:29:20 PM) emanuele: SMF is just way easier to do, so I do it first.

(10:29:56 PM) emanuele: BTW there is something not working as expected again on the site I think...
(10:30:09 PM) emanuele: now I don't see the default avatars anymore

(10:55:08 PM) groundup: I need content for my about actions

(10:57:09 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(10:57:09 PM) elk_core: [Elkarte] joshuaadickerson opened pull request #419: Select messages (master...selectMessages)  http://git.io/b5HKng
(10:57:09 PM) elk_core left the room.

(05/19/2013 12:53:54 AM) ***groundup feels like standardizing names would help some.
(12:55:11 AM) groundup: createCategory(), createBoard(), registerMember(), createPost() -> createCategory(), createBoard(), createMember(), createMessage()
(12:55:28 AM) groundup: Or, add*()
(01:00:34 AM) Norv: Agree
(01:20:10 AM) Norv: Funny I was just writing something in the same direction.
(01:29:21 AM) emanuele: standardization is boring... :(
(01:29:28 AM) emanuele: :P

(09:19:56 AM) groundup: Norv, I kind of went on a rant before I read your post http://www.elkarte.net/index.php?topic=361.msg2371#msg2371
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #221

(11:23:04 AM) Norv: groundup: would you be interested to add a unit testing framework to Elk? Needs a small readme/how_to_setup for us, or a wiki page on it, and a few starting-up tests on whatever part of code, so that we can just take it as example.
(11:24:01 AM) groundup: Nope - that's what PHPUnit is for
(11:24:15 AM) groundup: Then there is the one by Fabien Pontencier.
(11:26:00 AM) Norv: Yes, to add PHPUnit if you prefer it. I was not suggesting to write a testing framework.
(11:26:35 AM) groundup: So, you're really asking me to write tests and some documentation on how to write tests? :P
(11:29:44 AM) groundup: Kind of hard to do currently. Most functions need to be broken down a lot more and most of them require way too many outside resources which make them nearly impossible to test the functionality
(11:30:46 AM) Norv: Adding unit testing per se requires: a PR with the addition, the configuration that works (extra-folder, config files), a post to announce it and encourage its use, a few start-up things for us to see: a few tests, an addition in the readme and/or wiki on the process.
(11:30:50 AM) groundup: I would start with permute(), comma_format(), shorten_text() etc
(11:31:07 AM) Norv: Agree, unfortunately. But we still have to start somewhere
(11:31:20 AM) Norv: and we will have Spuds parsebbc() I believe
(11:31:46 AM) groundup: I was just about to say that parse_bbc() would be great to test, but mocking it will be a huge pain in the booty
(11:32:13 AM) Norv: As for database data needed, that's why there are mockups. Probably we should add a few mockups if we can.
(11:32:36 AM) Norv: Well, keep it in mind
(11:32:43 AM) groundup: Adding tests for parse_bbc() in general will be a pain in the booty as there are so many permutations of tests
(11:33:26 AM) Norv: The refactoring we're doing is very risky by design. That's intended, but well. Sooner or later we'd better start doing it by the book. That is, with unit testing.
(11:33:45 AM) groundup: It's rewriting at this point
(11:33:48 AM) Norv: Yes.
(11:36:02 AM) groundup: I agree, testing should be there. Check /msg
Last Edit: May 19, 2013, 06:12:36 am by TestMonkey
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #222

(05:39:41 PM) elk_core: [Elkarte] norv opened pull request #420: Fix escape_ methods (master...fixes)  http://git.io/Jj2M4A
(05:58:31 PM) elk_core: [Elkarte] norv opened pull request #421: Removing CurveClassic from core. (master...classic)  http://git.io/V-R5dg
(06:40:17 PM) elk_core: [Elkarte] norv opened pull request #422: List (master...list)  http://git.io/O6d43g

(07:26:36 PM) Norv: Ema, if necessary, we could perhaps add a theme initialization function. Something guaranteed to be called by the core template engine before it starts outputting layers. Dunno, just a thought.
(07:27:34 PM) emanuele: isn't it template_init?
(07:28:49 PM) Norv1: I thought about that, perhaps that. I think it isn't called right before, but might work?
(07:31:55 PM) Norv1: I was thinking at something optional, like [theme_id]_layers($template) - if it exists, then it's called, with result layers.
(07:32:55 PM) ***Norv feels themes become hooked addons.
(07:40:05 PM) emanuele: not sure what it would do...
(07:46:21 PM) Norv: it would return the array for $context['template_layers']
(07:46:46 PM) Norv: That's over-complicating it, I guess, lol.
(07:51:44 PM) Norv: I think what Nao is saying is like 'sections'. The page split in sections, each with functions for before and after. Sections are 'building blocks'.
(08:05:22 PM) emanuele: yes...though I'm not sure why is the template to define the layers...or at least all of them
(08:06:22 PM) emanuele: wouldn't be something like: https://github.com/emanuele45/Dialogo/blob/theme_playing/sources/Load.php#L2656
(08:07:08 PM) emanuele: and https://github.com/emanuele45/Dialogo/blob/theme_playing/sources/Subs.php#L3033
(08:11:11 PM) Norv: Nice
(08:12:39 PM) emanuele: I think that is "mostly" what Nao and Arantor are describing, without the xml-like part
(08:12:47 PM) emanuele: well, sort of
(08:14:03 PM) emanuele: I think their situation is more: [before] BLOCK1 [after] [before] BLOCK2 [after] etc.
(08:14:33 PM) emanuele: that looks a bit overkill...but I may be wrong, that depends on many factors I think...
(08:15:49 PM) Norv: In any case, if an advanced layout so to speak, needs to change layers order or even drop one, my guess is it'd be easy to add a call to a function the theme can implement. If init is too early (not sure, but that's what I was suspecting), then from prepareContext()
(08:16:24 PM) Norv: Well... that's more like I thought layers would be used. O:-)
(09:01:36 PM) groundup: I was just thinking about this the other day (like yesterday or the day before)... it needs a constructor and then another one that goes right before it
(09:03:34 PM) groundup: There should be one function: loadView() which loads which theme to load. The theme should be a class which can be extended when you don't want to create all of your own templates.
(09:06:32 PM) groundup: abstract class Theme { public $context = array(), $settings, $options, $layers; }
(09:07:57 PM) groundup: $txt should not be part of the theme. The $txt dependency should be passed to the theme
(09:10:54 PM) groundup: All models should should return values. Those values should be passed to the view (in most cases) via the controller. Each action controller returns its results to the base controller (through the router/dispatcher)
(09:11:28 PM) Norv: Dunno. Ema, please feel free to disregard my suggestions or stuff on this, I don't have enough grasp on it, but the layers stuff really is better than our current engine.
(09:12:53 PM) groundup: loadView() (replaces the call to loadTheme() in index.php) figures out the output strategy and then loads the appropriate theme.
(09:15:29 PM) ***Norv is debugging the upgrade script and cannot really distribute attention lol sorry
(09:17:41 PM) Norv: ffs this should be the last time I do this.

(09:21:08 PM) elk_core: [Elkarte] norv opened pull request #423: Fixes (master...fixes)  http://git.io/anTpjQ
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #223

(09:27:15 PM) emanuele: > Norv   In any case, if an advanced layout so to speak, needs to change layers order or even drop one, my guess is it'd be easy to add a call to a function the theme can implement. If init is too early (not sure, but that's what I was suspecting), then from prepareContext()
(09:28:01 PM) emanuele: yeah, it may be useful to let the theme decide what to do, it's always a tiny line where it stops the realm of the "source" and where the one of the "theme"...lol
(09:30:23 PM) emanuele: The best example of this situation I can think of is the "message buttons" (i.e. quote/quick edit/more/etc.)
(09:32:57 PM) emanuele: buttons can be added from mods (in source), but it would be nice to let themers decide if they want to show everything or just something (for example because someone may want to split them up in two positions), then I thought that it may be interesting also give themes the option to support or not multiple levels (i.e. have more or not), but that has to be done for each button if we want to...
(09:32:59 PM) emanuele: ...keep the current configuration with "quote to new" as "child" of quote, etc...
(09:33:10 PM) emanuele: in other words it's a bit of a mess... lol
(09:33:19 PM) groundup: emanuele, I like your changes. One thing I don't like is that they are in the Subs file ;)
(09:33:43 PM) emanuele: which?
(09:33:59 PM) groundup: template layers
(09:35:18 PM) emanuele: well, at the moment I just split them up and left theme where they are without looking into where they should be (not that I know where they should logically be heh)
(09:36:20 PM) groundup: class Layers... Layers.subs.php
(09:36:44 PM) groundup: loadTheme() {require_once 'Layers.subs.php'; }

(10:58:22 PM) groundup: I was trying to figure out how to move the membergroups from the boards table. There is already a board_permissions table, why not just add can_see as a permission? At the same time, an easy optimization is to make the permission field a char(30)

(11:02:01 PM) groundup: Just realized a very big potential failure: id_group smallint(5) unsigned NOT NULL auto_increment
(11:03:08 PM) groundup: Since a lot of places rely on id_group being signed, making that an unsigned can cause a lot of issues if you get to >32k. Either make it signed or make everything use an unsigned integer. I prefer the later

(11:06:33 PM) Norv: Agree on location, it's for use... Could also be directly in /sources, as core class (like the combiner or browser detector are).
(11:30:31 PM) ***emanuele wants to rewrite from scratch the theme... ROFL
(11:37:23 PM) ***emanuele hates mediawiki
(11:58:50 PM) Norv: rewrite from scratch the theme? You mean, Elk's default theme?
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #224

(01:42:45 AM) elk_core: [Elkarte] norv pushed 3 new commits to master: http://git.io/TlLGpg
(01:42:45 AM) elk_core: Elkarte/master 81009b7 Norv: Fix upgrade script after db layer updates....
(01:42:45 AM) elk_core: Elkarte/master a1ec80c Norv: Small fixes for upgrade script....
(01:42:45 AM) elk_core: Elkarte/master c1ba4c1 Norv: Merge pull request #423 from norv/fixes...

(01:47:31 AM) elk_core: [Elkarte] Spuds opened pull request #424: Change literal 'null' to null in setPermissionLevel function and call (master...literalNull)  http://git.io/puomuQ

(01:52:51 AM) elk_core: [Elkarte] joshuaadickerson opened pull request #425: Post (master...Post_new)  http://git.io/U7wlkQ

(01:57:35 AM) elk_core: [Elkarte] joshuaadickerson opened pull request #426: Attachment thumb (master...AttachmentThumb_new)  http://git.io/B6XhEw

(02:44:10 AM) groundup: $context = $user_info :P
(02:57:03 AM) Norv: :(
(03:00:36 AM) Norv: It really isn't. Info on the current user is more necessary (and unavoidable) even in subs, than the_story_about_universe_and_everything

(03:01:56 AM) elk_core: [Elkarte] norv pushed 2 new commits to master: http://git.io/L-xxYw
(03:01:56 AM) elk_core: Elkarte/master 78f0b30 Spuds: ! Change literal 'null' to null...
(03:01:56 AM) elk_core: Elkarte/master ec902a0 Norv: Merge pull request #424 from Spuds/literalNull...

(03:02:28 AM) groundup: I changed it. It isn't in theory, but in practice it is the same. Right or wrong. I changed it because I agree with you.
(03:03:34 AM) groundup: I think it can be something useful and put in there, but for the limited use right now and the fact that it requires theme options, settings, and user info, it is probably more likely to be something for the view
The best moment for testing your PR is right after you merge it. Can't miss with that one.