#silverstripe IRC Log

IRC log for 2 December 2016

All timestamps are in UTC.

1: [00:03:16] * micmania1 has joined #silverstripe
2: [00:03:39] * bubaphex has joined #silverstripe
3: [00:08:33] * bubaphex quit (Quit: bubaphex)
4: [00:11:47] * bubaphex has joined #silverstripe
5: [00:12:54] * Azure quit (Remote host closed the connection)
6: [00:15:09] * Azure has joined #silverstripe
7: [00:15:34] * bubaphex quit (Client Quit)
8: [00:27:22] * bubaphex has joined #silverstripe
9: [00:39:21] * trash_ quit (Ping timeout: 260 seconds)
10: [00:54:02] * bubaphex quit (Quit: bubaphex)
11: [01:09:38] <Nightjar> SPRONKS T'WERKING
12: [01:11:22] * darianno quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13: [01:11:57] * bubaphex has joined #silverstripe
14: [01:14:56] * statefundedbees has joined #silverstripe
15: [01:14:57] <ss-helper> statefundedbees: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
16: [01:15:13] <statefundedbees> can i tell my controller to use 1 theme for previewing 1 part of the site tree, and another theme for the default?
17: [01:15:27] <Nightjar> Sure, why not
18: [01:15:36] <statefundedbees> how do i go about that
19: [01:16:20] <Nightjar> if(Stage is Stage) SSViewer::set_theme('preview')
20: [01:17:04] <statefundedbees> ahh cool
21: [01:17:49] <Nightjar> probably in handleAction(){ $theme = get current theme; set theme; parent::__FUNCTION__(); set theme to $theme; }
22: [01:18:11] <Nightjar> probably save parent call, then return it after resetting theme
23: [01:20:42] <Nightjar> spronk, was Foxcommerce a KF thing?
24: [01:22:41] * Hailwood has joined #silverstripe
25: [01:23:26] <Nightjar> look closer Hailwood
26: [01:24:37] <statefundedbees> Nightjar: seems to work, something like this eh? http://dpaste.com/3AYJ8SA (also, thanks)
27: [01:24:53] <Nightjar> Yeh, something like that.
28: [01:25:09] <Nightjar> Maybe the more modern way is to use Config, but sure, basically that.
29: [01:26:52] <spronk> spronk uhhh, dont think so, no idea
30: [01:28:51] <Nightjar> heh
31: [01:28:56] <Nightjar> hope not, for Hailwood's sake :>
32: [01:30:41] <Hailwood> So spronk does Foxcommerce mean what Nightjar thinks it means.. I'm not sure what he thinks it means... But he told me to ask you.
33: [01:30:58] <Nightjar> he just replied ;)
34: [01:31:07] <spronk> haha, indeed Nightjar
35: [01:31:19] <spronk> i'm pretty sure it isn't.
36: [01:31:26] <Nightjar> phew :P
37: [01:31:35] <Nightjar> Hailwood, why is it named Foxcommerce?
38: [01:31:47] <Hailwood> Nightjar: I work at WebFox
39: [01:31:51] * bubaphex quit (Quit: bubaphex)
40: [01:31:56] <Nightjar> lol bl2u
41: [01:32:01] <Hailwood> It's our inhouse platform.
42: [01:32:07] <Hailwood> Lol why?
43: [01:32:41] <Nightjar> Yeh, it's a bit shit that your company name (and product lineup) resembles that of a ... rather disreputable one that used to exist in CHC.
44: [01:33:04] <Hailwood> There was a webfox in chc?
45: [01:34:38] <spronk> nah, fox web solutions iirc
46: [01:34:52] <Hailwood> These guys maybe? http://www.foxwebsites.co.nz/
47: [01:35:07] <Nightjar> oh fuck me, that site is still around :o
48: [01:35:26] <Hailwood> The guy looks creepy AF
49: [01:35:34] <Nightjar> yeh, that's the >unnice person< in the slides there, haha
50: [01:35:57] <Nightjar> because he is, and an arsehole to boot.
51: [01:36:21] <Hailwood> Ha well we're nothing to do with them XD we're in the Hawkes Bay and this is us (although our website is getting overhauled atm) http://www.webfox.co.nz/
52: [01:36:26] <Nightjar> They used to offer a product range of basically rebranded SS tools
53: [01:36:38] <Nightjar> good oh then Hailwood !
54: [01:37:08] <Nightjar> school links still a TKO FOX client spronk ?
55: [01:37:14] <spronk> nah
56: [01:37:31] <spronk> not for long time
57: [01:37:47] <Nightjar> lol, still listed on products page xD
58: [01:37:57] <spronk> sigh
59: [01:38:23] <Nightjar> http://www.foxwebsites.co.nz/portfolio-web-applications/
60: [01:38:38] <spronk> mm
61: [01:38:41] <spronk> saw
62: [01:39:07] <Nightjar> unscrupulous person you see Hailwood. Not a good thing to be associated with :>
63: [01:40:16] <Hailwood> Yeah, understandable, thankfully no one in the bay seems to make any link like that so we're safe.But yeah.. our apps do seem rather similar in purpose.
64: [01:41:09] <Hailwood> Reminds me of this guy up this way that we were chating to during an office party (he didn't know it was us) and we asked him why we should go with him instead of *insert name of 4 other companies including ours*.
65: [01:41:24] <Hailwood> He didn't talk his up, instead he bagged every one of the companies we named.
66: [01:42:18] <spronk> bleh.
67: [01:56:56] <xyphoid> dumb dataobject question - i have my Spoon dataobject and an id. i can load via Spoon::get_by_id('Spoon',$id); - is there an quivalent where I don't have to provide the classname in core?
68: [01:59:40] <xyphoid> (if that's the idiom i'll deal with it)
69: [02:00:40] <Nightjar> xyphoid, I don't understand your question
70: [02:00:56] <xyphoid> like i was expecting Spoon::get_by_id($id);
71: [02:01:10] <Nightjar> Hailwood, in other words, he acted the same way politicians around the western world have for the past... 3 election cycles?
72: [02:01:53] <Nightjar> xyphoid, oh, because it's supposed to be DataObject::get_by_id($class, $id) and is deprecated in favour of Spoon::get()->byID($id)
73: [02:02:13] <Nightjar> well, I don't think it's technically deprecated, just... is old.
74: [02:05:27] <xyphoid> cool, get()->byID( is what i was after
75: [02:05:28] <xyphoid> cheers
76: [02:09:32] * Azure quit (Ping timeout: 250 seconds)
77: [02:12:51] * Azure has joined #silverstripe
78: [02:29:50] * bubaphex has joined #silverstripe
79: [02:30:38] * bubaphex quit (Client Quit)
80: [02:38:27] * spronk quit (Quit: I may need a longer sleep timer...)
81: [03:02:07] * micmania1 quit (Quit: micmania1)
82: [03:09:22] * micmania1 has joined #silverstripe
83: [03:12:49] * micmania1 quit (Client Quit)
84: [03:14:57] * janneklouman-- has joined #silverstripe
85: [03:19:51] * janneklouman-- quit (Ping timeout: 260 seconds)
86: [03:30:43] * bubaphex has joined #silverstripe
87: [03:34:44] * bubaphex quit (Client Quit)
88: [03:48:22] * Hailwood quit (Quit: Konversation terminated!)
89: [04:04:15] * Nightjar quit (Quit: PARTY!)
90: [06:11:01] * helenclarko quit (Ping timeout: 268 seconds)
91: [06:31:28] * Shrike_Finland has joined #silverstripe
92: [07:00:34] * wmk has joined #silverstripe
93: [07:38:44] * janneklouman-- has joined #silverstripe
94: [07:43:06] * janneklouman-- quit (Ping timeout: 246 seconds)
95: [08:03:42] <wmk> anyone tested SS on php7.1?
96: [08:06:26] * darianno has joined #silverstripe
97: [08:17:16] * janneklouman-- has joined #silverstripe
98: [08:27:35] * lerni has joined #silverstripe
99: [08:50:29] <Robdgreat> wmk: I believe it's well published that 4.0 is the first version to be compatible
100: [08:51:32] <wmk> Robdgreat, of course, unless you patch SS3 yourself for php7+ http://silverstrip.es/blog/more-speed-with-php7-on-silverstripe-3/
101: [08:51:57] <Robdgreat> oh snap
102: [08:52:03] <wmk> i wonder how fast my ISP is to provide 7.1 on my machine - and if it's another speed improvement
103: [08:52:41] <Robdgreat> I'd be impressed if it were
104: [08:52:54] <Robdgreat> probably a little surprised
105: [08:54:36] <wmk> well, every dot version was faster than the one before in the past... 5.4 -> 5.5. -> 5.6 -> 7 (huge shift)...
106: [08:56:46] <Robdgreat> >PHP 5.6 uses around 50% less memory than 5.3
107: [08:56:48] <Robdgreat> TIL
108: [09:00:43] * pweh has joined #silverstripe
109: [09:01:17] * kinglozzer has joined #silverstripe
110: [09:18:38] * Doniz has joined #silverstripe
111: [09:25:03] * Shrike_Finland quit (Quit: Leaving.)
112: [09:40:37] * Doniz quit (Remote host closed the connection)
113: [09:41:09] * Doniz has joined #silverstripe
114: [09:56:15] <slievr> can I define belongs_many_many in yml?
115: [10:04:37] <wmk> slievr, theoretically: yes
116: [10:04:59] <wmk> you can define db in yml afaik. I might be wrong though
117: [10:06:13] <wmk> slievr, seems so: $manyMany = (array)Config::inst()->get($this->class, 'belongs_many_many', Config::INHERITED);
118: [10:08:01] <slievr> how would I set up the yml, as it takes associative?
119: [10:08:28] <wmk> MyClass:
120: [10:08:31] <wmk> belongs_many_many:
121: [10:08:41] <wmk> Foo: Bar
122: [10:08:49] <wmk> oops with one more intendation
123: [10:08:56] <slievr> cool thx
124: [10:09:43] <slievr> Indentation is fine, just not done anything more than simple arrays in yml. Thanks for the help
125: [10:10:37] <wmk> slievr, no problem
126: [10:10:44] <wmk> yml is quite fine if you get used to it
127: [10:11:30] <slievr> I thought it'd be a better way to manage a tag relation that's going to be used over lots of classes
128: [10:12:56] <kinglozzer> wmk: Have you ever used the "references" stuff that YAML supports?
129: [10:13:13] <kinglozzer> I only found out about it recently, thought it was pretty cool
130: [10:13:30] <kinglozzer> e.g. this sort of thing: https://gist.github.com/bowsersenior/979804
131: [10:14:27] <wmk> nope
132: [10:23:21] <wmk> kinglozzer, any example with silverstripe for that references stuff?
133: [10:23:58] <kinglozzer> Nope :P
134: [10:24:11] <kinglozzer> I never really found a good reason to use it
135: [10:24:20] <kinglozzer> I'm sure I'll come across something that needs it one day
136: [10:24:21] <wmk> as SS does array merging it's own way i dunno if it really works
137: [10:25:14] <kinglozzer> Well the yaml references would be resolved before it gets passed to SilverStripe
138: [10:25:53] <kinglozzer> But the example I linked you can already do by using SS's merging like you mentioned
139: [10:33:09] * Shrike_Finland has joined #silverstripe
140: [10:45:14] <ss-helper> call redirect on extended class silver strips CMS - http://stackoverflow.com/questions/40930166/call-redirect-on-extended-class-silver-strips-cms
141: [10:48:50] * Shrike_Finland1 has joined #silverstripe
142: [10:48:51] * Shrike_Finland quit (Read error: Connection reset by peer)
143: [10:58:23] * wmk quit (Ping timeout: 268 seconds)
144: [11:20:41] * Shrike_Finland1 quit (Quit: Leaving.)
145: [11:25:08] * brewJay has joined #silverstripe
146: [11:25:33] <brewJay> I'm trying to remove the 'Upload from Files' button from the ImageUploadField. But it appears there is no method to hide the button? IS there an easy way of doing it or do I need to overwrite the template?
147: [11:27:12] <slievr> setCanUpload() and setCanAttachExisting() are what you're looking for
148: [11:28:27] <brewJay> We've used the setCanUpload in the Yml file, but that only removes the ability to Upload a new files rather than pick from files. We're trying to remove the 'Delete from Files' button on images already uploaded to a field.
149: [11:28:39] <brewJay> We only want them to be able to Unlink and Choose from existing
150: [11:29:11] <brewJay> Sorry I meant 'Delete from Files' in my first question. We've found the setCanUpload() method now :)
151: [11:30:09] * Shrike_Finland has joined #silverstripe
152: [11:33:40] <slievr> I'd think that'd come from the files permissions, I could be wrong.
153: [11:34:28] <brewJay> We've just figured out we can just over write the css for left and main. And display none the delete button class
154: [11:34:30] * brewJay quit (Quit: Page closed)
155: [12:40:22] * samsam has joined #silverstripe
156: [12:52:09] * samsam__ has joined #silverstripe
157: [12:54:19] <samsam__> anyone know how to create a hook in entwine to any <input type="submit">?
158: [12:56:41] * samsam quit (Ping timeout: 260 seconds)
159: [12:57:28] * samsam__ is now known as samsam
160: [12:58:05] * Mike123 has joined #silverstripe
161: [12:58:43] <Mike123> SpecificationItem::get()->filter('ParentID', $this->getSelectionIDs())
162: [12:58:57] <Mike123> how do i remove all ducblicates form here...is exists..
163: [13:00:57] <samsam> define duplicate, any record which ParentID == SelectionID ?
164: [13:03:36] <Mike123> hmm, no i guess, just item with the same ID
165: [13:05:32] <Mike123> oohh wait
166: [13:05:34] <Mike123> i get it
167: [13:05:36] <Mike123> thanks ! :)
168: [13:05:46] <samsam> Mike123: what happened? :p
169: [13:06:33] <Mike123> nevermind :D it's friday and I'm tired allready :) thought that ID might be a dublicate of one class :DD
170: [13:06:59] <samsam> hehe
171: [13:21:46] <samsam> kinglozzer: I need your entwine expertise on a small issue
172: [13:22:37] <samsam> I used this to refresh the sitetree (in the cms) after clicking on *any* action button: http://www.sspaste.com/paste/show/58417583b24fb
173: [13:22:53] <samsam> but it just disables the action button
174: [13:39:25] <Shrike_Finland> What is the right way of calling icon in ModelAdmin? private static $icon = 'mysite/images/icons/specialicon.png'; does not seem to work. It prints out database like icon.
175: [13:43:56] * Mike123 quit (Ping timeout: 260 seconds)
176: [13:46:38] <samsam> Shrike_Finland: private static $menu_icon = 'mysite/images/icons/specialicon.png';
177: [14:18:31] * zueri has joined #silverstripe
178: [14:18:31] <ss-helper> zueri: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
179: [14:19:09] * Shrike_Finland quit (Quit: Leaving.)
180: [14:24:05] * janneklouman-- quit (Ping timeout: 248 seconds)
181: [14:27:50] <zueri> Does anybody know if lekoala/silverstripe-debugbar is working with 3.4? I tried to get it running without success but also without any indicator that something is happening.
182: [14:40:50] * trash_ has joined #silverstripe
183: [14:56:44] * helenclarko has joined #silverstripe
184: [15:04:54] * ninty9notout has joined #silverstripe
185: [15:05:00] <ninty9notout> afternoon chaps
186: [15:10:23] <samsam> joly day to you mate
187: [15:11:44] <ninty9notout> I have a question regarding iterator functions in SS3/4 such as FirstLast, EvenOdd, etc. Is there any way to add a custom function into the mix? I'm upgrading a very old website from 2 where we had a decorator for DataObject that did the job but obv that no longer works.
188: [15:18:04] <ninty9notout> AH nevermind.. figured it out
189: [15:18:12] <ninty9notout> Helps to look at the code!
190: [15:18:47] * Doniz_ has joined #silverstripe
191: [15:21:52] * Doniz quit (Ping timeout: 260 seconds)
192: [15:31:51] * muskie9 has joined #silverstripe
193: [15:35:21] * zueri quit (Ping timeout: 260 seconds)
194: [15:42:10] <ninty9notout> Bit of copy and paste required, but meh.. saved me hours of work. For future reference: http://pastebin.com/xf5Qw8k3
195: [15:44:54] * darianno quit (Quit: Textual IRC Client: www.textualapp.com)
196: [15:47:10] <samsam> ninty9notout: or just bookmark this: https://docs.silverstripe.org/en/3.4/developer_guides/templates/syntax/
197: [15:55:00] <slievr> what does middle do for a list with an even number of items? do you get two or none?
198: [15:55:56] * Doniz has joined #silverstripe
199: [15:57:04] <samsam> slievr: asking the real questions here
200: [15:57:10] <samsam> it divides by zero and resets the universe
201: [15:57:22] <kinglozzer> slievr: None
202: [15:57:23] <kinglozzer> :P
203: [15:57:27] <kinglozzer> Well
204: [15:57:31] <kinglozzer> No
205: [15:57:38] <kinglozzer> You'd get none if it was 2 items
206: [15:57:49] <samsam> It uses entwine to piss off developers.
207: [15:57:49] <kinglozzer> Otherwise, it's just "anything that isn't the first or last item"
208: [15:58:06] <kinglozzer> Rather than the middle point
209: [15:58:15] <slievr> samsam: +
210: [15:58:49] <samsam> my answer is upvoted to yours kinglozzer
211: [15:59:04] <slievr> also kinglozzer, speaking of entwine why doesn't your site have a favicon?
212: [15:59:19] * Doniz_ quit (Ping timeout: 268 seconds)
213: [16:04:27] * kinglozzer shrugs
214: [16:04:38] <kinglozzer> The main site does, dunno what happened there
215: [16:04:56] <kinglozzer> We're rebranding anyway so the site will be gone soon :P
216: [16:06:00] * Doniz quit ()
217: [16:15:52] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
218: [16:19:25] <samsam> guys, in a page controller I can easily overwrite page variables like Title
219: [16:19:39] <samsam> within init() I can just $this->Title = "Foo";
220: [16:19:55] <samsam> but for some reason you can't for MetaDescription and MetaKeywords
221: [16:19:57] <samsam> any idea why?
222: [16:26:32] <kinglozzer> samsam: Try $this->data()->MetaDescription
223: [16:27:53] <samsam> kinglozzer: hmm, doesnt work for metadesc and metakey
224: [16:28:35] * DimiStripe quit (Remote host closed the connection)
225: [16:28:43] <samsam> oh wait a sec
226: [16:29:06] <samsam> kinglozzer: yes taht does work... but why?!
227: [16:29:06] * DimiStripe has joined #silverstripe
228: [16:29:23] <samsam> because metadescription is built through MetaTags() ?
229: [16:29:27] <kinglozzer> When you do $Title in template, it'll look at the controller (to check if $this->Title is set) first, then fall back to the page. When you do, it'll check the controller and not find anything, so it'll fall back to calling SiteTree::MetaTags()
230: [16:29:30] <kinglozzer> Yep
231: [16:29:31] <kinglozzer> :P
232: [16:29:37] <samsam> :')
233: [16:30:08] <kinglozzer> So $this->MetaDescription is useless as you're setting that on the controller, not the SiteTree instance
234: [16:36:53] <samsam> makes sense
235: [16:37:09] <samsam> kinglozzer: do you have experience with any other framework than silverstripe?
236: [16:37:35] <kinglozzer> Not much, I've used Laravel a few times but not for a while now
237: [16:38:35] <samsam> SS looks clean, but I wonder if there is a more "cleaner" framework out there
238: [16:38:46] <samsam> they say laravel is very well organised
239: [16:39:54] <kinglozzer> Yeah Laravel is very good
240: [16:40:06] <kinglozzer> Obviously you don't get an admin interface out of the box
241: [16:43:27] <samsam> yeah building a whole cms from bottom is quite a task
242: [16:45:19] <slievr> There's October and I'm sure some others, can't attest to how good they are though.
243: [16:47:25] <samsam> slievr: I've tested October, trust me you can't sell that to clients :p
244: [16:47:32] <slievr> That bad?
245: [16:47:40] <samsam> it's actually really nice, but made for developers
246: [16:48:29] <slievr> might have to give it an install, see what's up
247: [16:49:11] <samsam> you should, it's pretty fun to play with
248: [16:53:23] <kinglozzer> https://www.toptal.com/php/interview-questions
249: [16:53:31] <kinglozzer> If I got those questions in an interview, I think I'd just walk out
250: [16:53:32] <kinglozzer> :P
251: [16:57:35] <slievr> the second one is great. =D
252: [16:59:30] * slievr has left #silverstripe
253: [16:59:42] * slievr has joined #silverstripe
254: [16:59:50] <kinglozzer> And a JavaScript one which did an excellent job or reminding me why I hate JavaScript so much :D https://www.toptal.com/javascript/interview-questions
255: [16:59:58] <kinglozzer> 0.1 + 0.2 === 0.3
256: [16:59:59] <kinglozzer> FALSE
257: [17:00:07] <kinglozzer> 0.1 + 0.2 is 0.3000000000004
258: [17:00:11] <kinglozzer> OF COURSE IT IS
259: [17:00:14] <kinglozzer> :P
260: [17:03:01] <kinglozzer> Anyway, have a good weekend all!
261: [17:03:01] * kinglozzer quit ()
262: [17:12:17] * lerni quit (Quit: Connection closed for inactivity)
263: [17:27:44] <ninty9notout> Wow I go away for one second! @kinglozzer... thanks for saving my buttt.
264: [17:28:19] <ninty9notout> @samsam Symfony is love, Symfony is life.
265: [18:04:06] * samsam quit (Ping timeout: 260 seconds)
266: [18:33:51] * ninty9notout quit (Ping timeout: 260 seconds)
267: [19:01:11] * Shrike_Finland has joined #silverstripe
268: [20:36:06] * UncleCheese has joined #silverstripe
269: [21:02:01] * cupcake quit (Ping timeout: 260 seconds)
270: [21:07:55] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
271: [21:12:31] * trash_ quit (Ping timeout: 260 seconds)
272: [21:29:19] * Shrike_Finland quit (Quit: Leaving.)
273: [22:00:26] <ss-helper> Filter MySQL return by date range - http://stackoverflow.com/questions/40941286/filter-mysql-return-by-date-range
274: [22:56:43] * pweh has joined #silverstripe
275: [23:00:01] * ss-helper quit (Remote host closed the connection)
276: [23:00:17] * ss-helper has joined #silverstripe

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