#silverstripe IRC Log

IRC log for 23 September 2016

All timestamps are in UTC.

1: [00:00:01] * ss-helper quit (Remote host closed the connection)
2: [00:00:03] * MichalKl_ has joined #silverstripe
3: [00:00:15] * ss-helper has joined #silverstripe
4: [00:00:53] * MichalKl_ quit (Remote host closed the connection)
5: [00:00:53] * MichalKleiner quit (Read error: No route to host)
6: [00:01:28] * MichalKleiner has joined #silverstripe
7: [00:01:57] * micmania1 quit (Quit: micmania1)
8: [00:05:50] * micmania1 has joined #silverstripe
9: [00:22:52] * spronk has joined #silverstripe
10: [00:45:24] * veb is now known as hype
11: [00:45:31] * hype is now known as veb
12: [00:46:44] * wat has joined #silverstripe
13: [00:47:58] <wat> Wierd issue. When saving a 'draft' of a page, the modified flag is not showing in the sitetree. The publish button also appears grey, indicating no difference between stage and live.
14: [00:48:04] * DanaeNZ quit (Quit: TIME TO FEED)
15: [00:48:13] <wat> There IS a difference, and the draft data is not being presented until the actual publish button is pressed, but its very confusing for the users.
16: [00:54:48] <wat> anyone ever seen anything like this?
17: [00:56:23] * micmania1 quit (Quit: micmania1)
18: [01:12:41] * cloph quit (Ping timeout: 240 seconds)
19: [01:13:59] * Azure|dc is now known as Azure
20: [01:17:40] * ahr3n quit (Ping timeout: 260 seconds)
21: [01:20:13] * cloph_away has joined #silverstripe
22: [01:20:15] * micmania1 has joined #silverstripe
23: [01:26:30] * ahr3n has joined #silverstripe
24: [01:36:49] * cloph_away quit (Ping timeout: 265 seconds)
25: [01:37:12] * wat quit (Ping timeout: 240 seconds)
26: [01:41:13] * cloph_away has joined #silverstripe
27: [02:39:19] * micmania1 quit (Quit: micmania1)
28: [02:39:40] * micmania1 has joined #silverstripe
29: [02:53:02] * Hailwood quit (Remote host closed the connection)
30: [03:31:34] * micmania1 quit (Quit: micmania1)
31: [04:00:43] * Nightjar has joined #silverstripe
32: [04:00:55] <Nightjar> waddup
33: [04:01:25] <Nightjar> spronk, i c u
34: [04:01:49] <Nightjar> well, good chat.
35: [04:01:56] <Nightjar> ciao, have good weekend
36: [04:01:58] <spronk> Nightjar
37: [04:01:58] * spronk nods
38: [04:02:05] <Nightjar> o/
39: [04:02:08] <Nightjar> :D
40: [04:02:10] <spronk> ;D
41: [04:02:31] <spronk> battling fucking android :@
42: [04:02:41] <Nightjar> oh yeh
43: [04:02:45] <Nightjar> that's a thing
44: [04:04:05] <Nightjar> I fight with android too sometimes, and I'm only a user!
45: [04:04:53] <spronk> yeahhh
46: [04:05:04] <spronk> currently my nexus 5 is being maaamed by google play services
47: [04:05:05] <Nightjar> anyway, I'm spent. Must be home time.
48: [04:05:09] <Nightjar> haha
49: [04:05:10] <Nightjar> rekt
50: [04:05:11] <spronk> its not even 5pm
51: [04:05:14] <Nightjar> ikr
52: [04:05:16] <spronk> slack shit
53: [04:05:21] <Nightjar> but I started at 7, sif call me slack
54: [04:05:28] <spronk> ;D
55: [04:05:32] <Nightjar> xD
56: [04:05:52] <Nightjar> actually imma go upstairs C if I can help someone
57: [04:05:59] <Nightjar> C what I did there?
58: [04:06:01] <Nightjar> C
59: [04:06:09] <Nightjar> C C C C C IM HELPING SOMEONE LEARN C
60: [04:06:17] <Nightjar> such sublte
61: [04:06:21] <Nightjar> wow
62: [04:06:23] <Nightjar> ciao
63: [04:06:25] * Nightjar quit (Quit: Leaving)
64: [04:06:28] <spronk> HAHA
65: [04:30:02] * micmania1 has joined #silverstripe
66: [04:30:06] <ss-helper> SS_HTTPRequest could not be converted to a string - http://stackoverflow.com/questions/39639965/ss-httprequest-could-not-be-converted-to-a-string
67: [04:36:26] * Admonish quit (Quit: Going offline, see ya! (www.adiirc.com))
68: [05:26:48] * Stomach quit (Quit: zzz)
69: [05:35:07] * ahr3n quit (Ping timeout: 255 seconds)
70: [05:38:39] * wmk has joined #silverstripe
71: [06:02:31] * Stomach has joined #silverstripe
72: [06:15:13] * Stomach quit (Quit: zzz)
73: [06:16:51] * micmania1 quit (Quit: micmania1)
74: [06:29:38] * spronk quit (Quit: I may need a longer sleep timer...)
75: [06:49:04] * Stomach has joined #silverstripe
76: [06:50:55] * janneklouman-- has joined #silverstripe
77: [06:54:05] * Stomach quit (Ping timeout: 272 seconds)
78: [06:54:31] * janneklouman-- quit (Read error: No route to host)
79: [06:55:55] * janneklouman-- has joined #silverstripe
80: [07:12:40] * darianno has joined #silverstripe
81: [07:24:49] * spronk has joined #silverstripe
82: [07:45:13] * zippy has joined #silverstripe
83: [07:45:30] * cloph_away quit (Ping timeout: 264 seconds)
84: [07:50:09] * cloph_away has joined #silverstripe
85: [08:04:38] * kinglozzer has joined #silverstripe
86: [08:10:01] * swaiba has joined #silverstripe
87: [08:10:15] * janneklouman-- quit (Ping timeout: 276 seconds)
88: [08:12:18] * janneklouman-- has joined #silverstripe
89: [08:13:41] <zippy> evening
90: [08:13:45] <zippy> 4 alpha 2 eh!
91: [08:16:21] <zippy> https://i.redd.it/9tavwaesj6nx.jpg haha
92: [08:16:36] <spronk> LOL
93: [08:16:43] <spronk> http://projects.borg.ch/jokes/guide-to-fuse-replacement.jpg
94: [08:34:13] * Mike123 has joined #silverstripe
95: [08:34:23] <Mike123> Hey guys
96: [08:36:29] * micmania1 has joined #silverstripe
97: [08:38:11] * otterpocket has joined #silverstripe
98: [08:40:41] <otterpocket> Hello, My Comment model is a has one of lets say a Picture, it has many ChildComments which is also of the class Comment. How do I count the total number of comments including child comments of the picture
99: [08:40:42] <otterpocket> ?
100: [08:42:15] * micmania1 quit (Quit: micmania1)
101: [08:47:23] * spronka has joined #silverstripe
102: [08:49:43] <wmk> spronk, do you have a 16amp fuse for me?
103: [08:50:13] <wmk> 2kA reminds me of the story, when someone accidantly put a screwdriver over both poles of a car battery
104: [08:51:37] <wmk> otterpocket, ?? so Comment 1:1 picture 1:n ChildComments ??
105: [08:54:51] <otterpocket> Sorry I mean: Picture has many comments (Comment), Comments has many ChildComments (Comment)
106: [08:55:32] * spronk quit (Quit: I may need a longer sleep timer...)
107: [09:05:47] <zippy> otterpocket: I would consider a table to keep a track of the count
108: [09:06:10] <zippy> Otherwise, you are going to have to do quite a few queries... given you could be nested 20 levels deep
109: [09:06:21] <zippy> so for a single image you could do a dozen queries
110: [09:06:26] <zippy> 10 images could be 120 querues
111: [09:09:31] <zippy> If the comment always has the picture id, even if it's a nested comment then you could just count them that way.
112: [09:09:39] <zippy> I would possibly be inclined to actually do it that way
113: [09:16:01] <wmk> otterpocket, get all Picture IDs
114: [09:16:32] <wmk> get all comments for ID IN (currenpage, PictureIDs...)
115: [09:17:30] * janneklouman-- quit (Ping timeout: 265 seconds)
116: [09:19:41] <otterpocket> What if each comment had one Picture? which would obviously be the has one of all the comments of the picture
117: [09:20:14] <zippy> where $this = the picture. $this->Comments()->count(); would do it
118: [09:20:42] * janneklouman-- has joined #silverstripe
119: [09:20:51] * kinglozzer quit (Read error: Connection reset by peer)
120: [09:20:57] * kinglozz_ has joined #silverstripe
121: [09:23:46] * kinglozzer has joined #silverstripe
122: [09:25:20] * kinglozz_ quit (Ping timeout: 260 seconds)
123: [09:27:29] <otterpocket> zippy, hmm, no that causes a problem with the view logic, I think I will just display the count of top level comments
124: [09:28:06] <zippy> How does it create a view logic problem... whats the models look like
125: [09:30:47] <otterpocket> because I am recurring a template in a loop to get around the unknown nest levels
126: [09:31:18] <otterpocket> * an Include
127: [09:31:42] <zippy> thats all good, wanna drop in your models (namely the db, $has_one and $has_many $many_many etc?
128: [09:31:43] <zippy> !paste
129: [09:31:43] <ss-helper> Please paste your code using something like http://kopy.io/ or http://www.sspaste.com/ or https://gist.github.com/ and then paste the link here.
130: [09:34:18] <wmk> !paste tooth
131: [09:34:18] <ss-helper> Please paste your code using something like http://kopy.io/ or http://www.sspaste.com/ or https://gist.github.com/ and then paste the link here.
132: [09:35:46] * Stomach has joined #silverstripe
133: [09:37:24] <zippy> https://www.youtube.com/watch?v=uHAEcx_LlYE - lol...
134: [09:37:26] <zippy> Stomach: rain eh!
135: [09:37:35] <Stomach> what where!?
136: [09:37:48] <Stomach> oh yeah
137: [09:37:49] <Stomach> india
138: [09:37:52] <Stomach> fucking hell
139: [09:38:09] <Stomach> just after I thought we were actually doing okay
140: [09:39:15] <zippy> mmm
141: [09:40:13] * janneklouman-- quit (Ping timeout: 265 seconds)
142: [09:40:57] <otterpocket> https://gist.github.com/Otterpocket/2874372ce0ba4b66064ab854fd98457a
143: [09:41:04] <otterpocket> Views
144: [09:41:47] <otterpocket> Submission (I was calling this Picture) https://gist.github.com/Otterpocket/f2d8142a3c9352c1600423102ee724ae
145: [09:41:55] <otterpocket> and finally Comment:
146: [09:42:08] <otterpocket> https://gist.github.com/Otterpocket/b951b3a9b560ceaf2f8fc671905ce84f
147: [09:43:03] <zippy> so for a child comment, the Submission relation is empty/null?
148: [09:43:30] <otterpocket> yes
149: [09:43:32] <zippy> and a parent comment has a Submission and a empty/null ParentComment
150: [09:43:43] <otterpocket> yep
151: [09:44:37] <zippy> I would set the submission on all the comments. Then in your Submission you can do Submission -> Comments which gives you ALL comments
152: [09:45:04] <zippy> then add a function; public function RootComments() { return $this->Comments()->Filter('ParentCommentID', 0); }
153: [09:45:27] <zippy> I can't recall if it's 0 or null, and if it's null you will have to do that a bit different
154: [09:45:45] <zippy> and then update CommentPanel.ss to be <% loop RootComments %>
155: [09:45:48] <otterpocket> Ok that makes sense
156: [09:46:21] <otterpocket> So basically create a scope on comments
157: [09:46:30] <zippy> yeap
158: [09:46:53] <zippy> no need to add scope to the start of the function thou ;-)
159: [09:47:03] <otterpocket> hadn't thought of that, thanks zippy
160: [09:47:39] <zippy> I can't remmber if the relation will be 0 or null, so check the DB
161: [09:48:42] <zippy> return $this->Comments()->where('ParentCommentID IS NULL'); } // note that is not escaped so be aware of sql injection if you decide to put anything in from user
162: [09:49:22] * jonners99 has joined #silverstripe
163: [09:50:16] <jonners99> Is it possible to change the link style used for images added into tinymce using the "update media" tool? Our site does not have a base href so links to assets/Uploads instead of /assets/Uploads don't work
164: [09:50:51] <jonners99> If I alter the HTML and save, Silverstripe resets it again.
165: [10:11:20] * janneklouman-- has joined #silverstripe
166: [10:17:42] * Mike123 quit (Ping timeout: 240 seconds)
167: [10:26:41] * r3v3rb has joined #silverstripe
168: [10:26:47] <r3v3rb> phew, its the weekend
169: [10:27:20] <r3v3rb> and i do believe it's coffee time swaiba :)
170: [10:27:50] <zippy> otterpocket: win?
171: [10:31:11] <r3v3rb> counter in template loop to do x-0 , x-3, x-6 << why am I not computing the way forward
172: [10:32:32] <otterpocket> zippy, the designer changed their mind about showing the total amount of comments :D
173: [10:32:41] <zippy> haha
174: [10:33:04] <otterpocket> and instead show amount of comments per top level and per parent comment
175: [10:33:13] <otterpocket> I think that's what reddit does
176: [10:41:59] <r3v3rb> am i being an idiot or is simple math not allowed in between { } in a template - ie {$pos+3 }
177: [10:45:03] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
178: [10:47:50] <kinglozzer> r3v3rb: Nope, can't do that
179: [10:48:01] <r3v3rb> kinglozzer, in 2016!
180: [10:48:06] <kinglozzer> You can do $Pos(3) or something though
181: [10:48:18] <kinglozzer> So it starts counting from a different number
182: [10:48:26] <r3v3rb> kinglozzer, that just starts the counter there I need count and offset
183: [10:48:44] <r3v3rb> css3 animation delay - 0, 3, 6, 9 etc
184: [10:49:01] <r3v3rb> for each item in a loop
185: [10:49:14] <r3v3rb> a tad annoying
186: [10:49:32] <kinglozzer> Hmm
187: [10:49:46] <kinglozzer> I'm sure I've done something similar... I just can't think of the project :(
188: [10:50:30] <r3v3rb> me too
189: [10:52:09] <kinglozzer> OOO FOUND IT r3v3rb
190: [10:52:13] <kinglozzer> Lemme paste it, sec
191: [10:52:27] <kinglozzer> (it was for our website, of course >.<)
192: [10:52:58] <kinglozzer> r3v3rb: https://gist.github.com/kinglozzer/bf1ea91fd49d8b7248743dab17c7ac5a
193: [10:53:12] <kinglozzer> I'm sure you can adapt that to add instead of multiply :P
194: [10:54:26] <r3v3rb> lol, talk about a sledgehammer to put in a nail!
195: [10:55:43] <r3v3rb> multiplying works the same :P kinglozzer for what I need
196: [10:58:56] <kinglozzer> r3v3rb: Yeah I remember the pain of trying to work out how the hell to do it :P
197: [10:59:16] <r3v3rb> kinglozzer, thanks - I'll see how I get on :)
198: [11:01:38] <slievr> what if you just make a multiple/addition method
199: [11:01:46] <slievr> and pass $pos as a param
200: [11:02:38] <otterpocket> $Item.delay($Pos)
201: [11:02:51] <kinglozzer> COWARDS WAY OUT
202: [11:02:51] <kinglozzer> :P
203: [11:03:00] <kinglozzer> Yeah that could work ^^
204: [11:03:28] <otterpocket> When i have done this in the past I have just used jquery
205: [11:04:08] * zippy has joined #silverstripe
206: [11:05:30] <otterpocket> also, with that type of increment if you have a massive list they delay will be real big on the last elements? Which might be below the fold.
207: [11:06:02] <otterpocket> Maybe use a the not dry approach of nth-child and if you are using sass, make it a mixin ?
208: [11:06:58] <otterpocket> @for $i from 1 to 10 { .results div:nth-child(#{$i}) { animation-delay: $i * 0.25s; }}
209: [11:10:29] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
210: [11:25:16] * spronka quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
211: [11:26:08] * spronka has joined #silverstripe
212: [11:26:11] * Stomach quit (Quit: zzz)
213: [11:34:22] * pweh has joined #silverstripe
214: [11:38:29] * jonners99 quit ()
215: [12:23:29] * UndefinedOffset has joined #silverstripe
216: [12:41:09] * janneklouman-- quit (Ping timeout: 272 seconds)
217: [12:45:17] * spronka quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
218: [13:18:48] <wmk> with requirements... is there a way to force e.g. jquery to be first in line?
219: [13:19:04] <wmk> if i define it in my header template it's included after some requirements from page layouts
220: [13:19:15] <wmk> as templates are parsed inside out...?
221: [13:23:44] * janneklouman-- has joined #silverstripe
222: [13:30:23] <wmk> beside requiring in in controller::init()... I'd like to require everything in templates
223: [14:00:15] <ss-helper> Silverstripe fulltextsearch on custom field - http://stackoverflow.com/questions/39640546/silverstripe-fulltextsearch-on-custom-field
224: [14:04:13] * muskie9 has joined #silverstripe
225: [14:06:07] <otterpocket> Is there something you have to do in order to render a Form that is being called from an include view? I'm having a problem which I recall having previously
226: [14:06:17] <otterpocket> Something to do with scope
227: [14:06:34] <muskie9> otterpocket maybe $Top.YourForm or $Up.YourForm
228: [14:06:47] <kinglozzer> $Top disappears inside includes ^^
229: [14:06:59] <kinglozzer> You need to pass it in: <% include Foo Top=$Top %>
230: [14:07:02] <otterpocket> Do you have to Pass Top as a Param
231: [14:07:07] <otterpocket> ahh yea, thats it
232: [14:07:15] <kinglozzer> Might be best to name it something else
233: [14:07:20] <kinglozzer> Page=$Top or something
234: [14:08:15] <otterpocket> Thanks kinglozzer
235: [14:10:27] <slievr> you can pass scope?
236: [14:10:52] <slievr> that's cool
237: [14:13:18] * janneklouman-- quit (Ping timeout: 265 seconds)
238: [14:21:30] <muskie9> alpha2 is out 😳
239: [14:23:18] * pweh quit (Read error: Connection reset by peer)
240: [14:24:02] <kinglozzer> muskie9: 😁
241: [14:24:16] <kinglozzer> It's getting closer!
242: [14:24:36] <muskie9> such excite!
243: [14:26:58] <slievr> is there a goal for release, or is it a when ready deal?
244: [14:27:17] <kinglozzer> mfw I can finally write properly namespaced code http://i0.kym-cdn.com/entries/icons/facebook/000/006/077/so_good.jpg
245: [14:27:40] <muskie9> lol
246: [14:28:09] <kinglozzer> slievr: There's no fixed goal that I know of, the draft support doc suggested it would be released around new year
247: [14:28:09] <muskie9> slievr I think the general statement when everything was gearing up was late 2016
248: [14:33:08] * guzzlefry has left #silverstripe
249: [14:33:21] <slievr> oh nice, I was thinking it would be a 2017 deal.
250: [14:33:30] <slievr> I need to stop saying deal.
251: [15:39:39] <otterpocket> namespacing you say?
252: [15:43:38] * otterpocket quit (Quit: Leaving)
253: [15:52:23] <r3v3rb> kinglozzer, thanks for the iterator - works a treat and now I have a fully functional CSS3 slider = no js/jquery required + it auto calculates timings and animation-delays based on iterator and totalitems :D
254: [15:52:36] <kinglozzer> np r3v3rb :D
255: [15:57:48] <r3v3rb> time to go, nn
256: [15:58:01] * r3v3rb quit (Quit: Leaving)
257: [15:58:19] * kinglozzer quit ()
258: [15:59:39] * wmk quit (Read error: Connection reset by peer)
259: [16:41:51] * Azure|dc has joined #silverstripe
260: [16:44:24] * Azure quit (Ping timeout: 276 seconds)
261: [18:11:01] * darianno quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
262: [18:26:22] * UndefinedOffset quit (Quit: Leaving.)
263: [18:36:14] * zippy has joined #silverstripe
264: [18:38:00] * DimiStripe quit (Quit: DimiStripe)
265: [18:42:18] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
266: [19:10:19] * CodeTrap has joined #silverstripe
267: [19:50:46] * darianno has joined #silverstripe
268: [20:16:45] * UndefinedOffset has joined #silverstripe
269: [20:26:01] * darianno quit (Quit: Textual IRC Client: www.textualapp.com)
270: [20:38:05] * gelignite has joined #silverstripe
271: [20:47:45] * UndefinedOffset quit (Quit: Leaving.)
272: [20:59:42] * CodeTrap quit (Ping timeout: 265 seconds)
273: [21:13:09] * DimiStripe has joined #silverstripe
274: [21:47:55] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
275: [23:03:27] * Stomach has joined #silverstripe
276: [23:13:17] * Stomach quit (Quit: zzz)

These logs were automatically created by ss-log on irc.freenode.net.