#silverstripe IRC Log

IRC log for 14 September 2014

All timestamps are in UTC.

1: [00:02:34] * gelignite quit (Quit: http://bit.ly/nkczDT)
2: [00:08:44] * ezero has joined #silverstripe
3: [00:11:01] <ezero> hi all, does any one know about using environment variable in silverstrpe config yml file? .. specifically around building API or Service URLs e.g my_service: http://MY_SERVER:MY_PORT/blah
4: [00:12:23] <ezero> i'd like to define those based on dev / test/ live environments i.e MY_SERVER and MY_PORT .. . just not sure if that is possible
5: [00:13:30] * vebb has joined #silverstripe
6: [00:13:31] <ezero> guess i should just put it in and find out :P
7: [00:23:16] <irogue_> ezero: it sure is
8: [00:24:19] <ezero> really ?
9: [00:24:33] <ezero> about to find out :)
10: [00:25:55] <irogue_> just use the exclusionary rules
11: [00:26:17] <ezero> like
12: [00:26:18] <ezero> Only:
13: [00:26:22] <ezero> Except:
14: [00:26:40] <irogue_> yup
15: [00:26:52] <irogue_> Only: environment: 'live'
16: [00:27:00] <irogue_> (just imagine the linebreaks and indentation :P)
17: [00:27:07] <ezero> but then i would be hard code the configuration parameters :(
18: [00:27:26] <ezero> specific to each env
19: [00:27:36] <ezero> i wanted them to e _ss_environment driven
20: [00:27:52] <irogue_> ohhh
21: [00:28:05] <irogue_> thought you wanted to do it based on dev/test/live
22: [00:28:22] <ezero> yeah that too :P
23: [00:28:39] <irogue_> i'm very confused what you're trying to do
24: [00:29:22] <ezero> I just want to define something in config.yml which supports constants from _ss_environment.php
25: [00:30:05] <ezero> what i wasn't sure of was that if yml do interpolation as such http://MY_SERVICE_URL:MYPORT/blah
26: [00:30:49] <irogue_> if you mean you're trying to set MY_SERVICE_URL and MYPORT as constants in _ss_env and then create the URL using yaml, then no
27: [00:31:12] <irogue_> you can check *if* a constant is set with yaml, but you should just build the URL within the _ss_env
28: [00:31:49] <ezero> correct irogue_
29: [00:31:52] <ezero> :)
30: [00:32:03] <ezero> i think my best bet would be todo it in _config.php instead ;)
31: [00:36:33] * irogue_ quit ()
32: [00:54:52] * Zopiclone has joined #silverstripe
33: [01:08:30] * travis-ci has joined #silverstripe
34: [01:08:30] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#3339 (3.1 - 4084da8 : Sean Harvey): The build was broken.
35: [01:08:30] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/12411b7aa3a3...4084da82b2b4
36: [01:08:30] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/35109584
37: [01:08:30] * travis-ci has left #silverstripe
38: [02:14:33] * Azure quit (Ping timeout: 260 seconds)
39: [02:14:51] * FrozenFire[alt] is now known as FrozenFIre
40: [02:14:54] * FrozenFIre is now known as FrozenFire
41: [02:43:01] * gordon__ has joined #silverstripe
42: [02:44:23] * Guest73117 quit (Ping timeout: 240 seconds)
43: [03:28:57] * Pathum has joined #silverstripe
44: [03:31:25] * vebbb has joined #silverstripe
45: [03:31:25] * vebb quit (Read error: Connection reset by peer)
46: [03:33:06] * gordon has joined #silverstripe
47: [03:33:09] * simon_w quit (Quit: Ping timeout: your mum)
48: [03:33:16] * vebb has joined #silverstripe
49: [03:33:30] * gordon is now known as Guest7706
50: [03:34:23] * vebbb quit (Read error: Connection reset by peer)
51: [03:35:10] * gordon__ quit (Ping timeout: 272 seconds)
52: [03:52:07] * cloph_away has joined #silverstripe
53: [03:52:22] * cloph quit (Ping timeout: 245 seconds)
54: [04:39:38] * simon_w has joined #silverstripe
55: [05:22:52] * Guest7706 quit (Ping timeout: 240 seconds)
56: [05:23:16] * Guest7706 has joined #silverstripe
57: [06:06:34] * gordon__ has joined #silverstripe
58: [06:09:12] * Guest7706 quit (Ping timeout: 260 seconds)
59: [06:15:07] * gordon__ quit (Read error: No route to host)
60: [06:52:30] * crapwago1 quit (Changing host)
61: [06:52:31] * crapwago1 has joined #silverstripe
62: [06:52:33] * crapwago1 is now known as crapwagon
63: [07:01:13] * willr quit (Quit: willr)
64: [07:08:31] * vebb quit (Read error: Connection reset by peer)
65: [07:08:47] * vebb has joined #silverstripe
66: [07:29:00] * willr has joined #silverstripe
67: [07:32:58] * vebb quit (Read error: Connection reset by peer)
68: [07:33:10] * Zopiclone quit (Ping timeout: 250 seconds)
69: [07:36:31] * vebb has joined #silverstripe
70: [07:37:48] * Zopiclone has joined #silverstripe
71: [07:38:07] <ss23> Anyone use pingdom and noticed they're being icnredibly slow with SMS notifications these days?
72: [07:38:11] <ss23> I'm getting mine 10 - 60 minutes after something happens
73: [07:40:56] <simon_w> I just use nagios
74: [07:48:16] * Shrike_Finland has joined #silverstripe
75: [08:15:59] * willr quit (Quit: willr)
76: [08:22:40] * wmk has joined #silverstripe
77: [08:54:24] * ezero quit (Ping timeout: 260 seconds)
78: [09:26:03] * Error404NotFound has joined #silverstripe
79: [09:26:40] * Shrike_Finland quit (Quit: Leaving.)
80: [09:57:28] * wmk quit (Ping timeout: 250 seconds)
81: [09:57:28] * Zopiclone quit (Read error: Connection reset by peer)
82: [10:00:50] * CodeTrap has joined #silverstripe
83: [10:06:45] * ezero has joined #silverstripe
84: [10:18:53] * ezero quit (Ping timeout: 240 seconds)
85: [10:19:36] * gelignite has joined #silverstripe
86: [10:32:08] * simon_w quit (Quit: Ping timeout: your mum)
87: [10:33:18] * Pathum quit (Read error: Connection reset by peer)
88: [10:33:35] * Pathum has joined #silverstripe
89: [10:48:02] * Shrike_Finland has joined #silverstripe
90: [10:48:06] * simon_w has joined #silverstripe
91: [10:59:47] * spronk2 has joined #silverstripe
92: [11:18:27] <spronk2> hmm
93: [11:18:47] * vebb quit (Quit: .)
94: [11:19:00] * Pathum quit (Quit: Leaving)
95: [11:19:20] <ss23> ho hum
96: [11:24:10] * babak has joined #silverstripe
97: [11:27:16] <simon_w> $ ansible sitehost -m ping -o
98: [11:27:16] <simon_w> mirrors.simon.geek.nz | success >> {"changed": false, "ping": "pong"}
99: [11:27:17] <simon_w> logs.simon.geek.nz | success >> {"changed": false, "ping": "pong"}
100: [11:27:19] <simon_w> Huzzah!
101: [11:31:01] * Azure has joined #silverstripe
102: [11:56:52] * Error404NotFound quit (Ping timeout: 260 seconds)
103: [12:07:06] * simon_w quit (Quit: Ping timeout: your mum)
104: [12:24:59] <ss23> Hmmmm
105: [12:25:08] <ss23> So I have a SilverStripe application and I want to track usage stats of it
106: [12:25:13] <ss23> Is there any... modules for this?
107: [12:25:23] <ss23> Similiar to Google Analytics, but I'd prefer to keep the data within SilverSripe
108: [12:25:28] <ss23> Mainly just like "this many people click this stuff" etc
109: [12:52:20] <crapwagon> i haven't seen one
110: [13:04:27] <ss23> Yeah, I'm thinking it'll be fine just to write some DO's and do stats based off those
111: [13:10:55] * Shrike_Finland quit (Quit: Leaving.)
112: [13:37:20] * spronk2 quit (Quit: spronk2)
113: [13:43:07] <Zauberfisch> ss23: basic tracking like page views or link clicks should be pretty simple
114: [13:43:21] <Zauberfisch> but I am not aware of any module for it
115: [13:43:40] <ss23> Yeah, I just whipped one up for what I needed
116: [13:43:56] <ss23> https://github.com/ss23/deploynaut-statistics/
117: [13:44:05] <ss23> https://github.com/ss23/deploynaut-statistics/blob/master/code/DNRootExtension.php Cant' get much more simple
118: [13:44:08] <ss23> :D
119: [15:24:53] * eagles0513875 quit (Ping timeout: 246 seconds)
120: [15:34:41] * Liquide has joined #silverstripe
121: [15:35:51] * eagles0513875 has joined #silverstripe
122: [15:46:09] * spronk quit (Ping timeout: 260 seconds)
123: [15:47:15] * eagles0513875 quit (Changing host)
124: [15:47:15] * eagles0513875 has joined #silverstripe
125: [17:43:41] * spronk has joined #silverstripe
126: [18:59:58] * Shrike_Finland has joined #silverstripe
127: [20:12:50] * muskie9 has joined #silverstripe
128: [20:19:56] * eagles0513875 quit (Ping timeout: 260 seconds)
129: [20:28:45] * Ryan-Toast has joined #silverstripe
130: [20:40:18] * eagles0513875 has joined #silverstripe
131: [20:51:55] * Stomach has joined #silverstripe
132: [20:52:57] * Olliepop has joined #silverstripe
133: [21:06:26] * micmania1 has joined #silverstripe
134: [21:11:22] <Kingy^> morning
135: [21:16:57] * Kingy^ is now known as Kingy
136: [21:17:20] * willr has joined #silverstripe
137: [21:19:02] * antmas has joined #silverstripe
138: [21:19:50] * nickmolhoek has joined #silverstripe
139: [21:21:12] <Kingy> going hard again this morning ss23 :)
140: [21:23:35] * irogue_ has joined #silverstripe
141: [21:27:33] * Colin[pi] has joined #silverstripe
142: [21:33:43] * gelignite quit (Quit: http://bit.ly/nkczDT)
143: [21:40:40] * micmania1 quit (Quit: micmania1)
144: [21:41:57] * simon_w has joined #silverstripe
145: [21:43:17] * Cheddam has joined #silverstripe
146: [21:46:19] * antmas quit (Ping timeout: 246 seconds)
147: [21:49:42] * micmania1 has joined #silverstripe
148: [21:53:47] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
149: [21:58:48] * hailwood has joined #silverstripe
150: [22:12:27] * UncleCheese has joined #silverstripe
151: [22:12:38] <simon_w> Oh no, him again!
152: [22:12:39] * simon_w quit (Quit: Ping timeout: your mum)
153: [22:19:50] * ezero has joined #silverstripe
154: [22:22:16] * Shrike_Finland quit (Quit: Leaving.)
155: [22:31:45] * ezero quit (Read error: Connection reset by peer)
156: [22:39:04] <Colin[pi]> simon_w is avoiding UncleCheese?
157: [22:39:15] <UncleCheese> aye?
158: [22:39:30] <Stomach> internet feud
159: [22:39:51] <spronk> O_o
160: [22:40:15] <Colin[pi]> but UncleCheese is like the nicest internet guy o_O
161: [22:40:35] <Stomach> wait until you meet him in real life
162: [22:40:41] <Ryan-Toast> http://i.imgur.com/BhA29.gif
163: [22:40:42] <UncleCheese> i'm an evil extranet guy, though
164: [22:40:44] <Stomach> and his dog is all like "what you looking at fool"
165: [22:41:13] <UncleCheese> yeah, my dog doesn't take any shit
166: [22:41:18] <UncleCheese> leaves a lot of shit, though
167: [22:41:38] <UncleCheese> especially right by the front door.. mmm... client hospitality...
168: [22:41:38] <Stomach> at least he doesn't eat all of your stuff
169: [22:41:56] <Colin[pi]> UncleCheese: my dog used to leave them right near the ramp onto the grass
170: [22:42:13] <Stomach> desk drawer handles? yeah I can eat those. stupid rocket
171: [22:42:17] <Colin[pi]> walking outside at night = 100% guaranteed chance of dog shit on foot
172: [22:42:26] <UncleCheese> lol
173: [22:44:06] <irogue_> UncleCheese is a nicer guy IRL than I expected. Especially cos, y'know' American, so the expectation is low ;)
174: [22:44:43] <UncleCheese> nice
175: [22:44:55] <UncleCheese> then i probably look really skinny, too
176: [22:45:03] <irogue_> definitely
177: [22:46:27] <Stomach> skinnier than the average bear
178: [22:47:46] * irogue_ sniggers
179: [22:49:47] <Colin[pi]> irogue_: that's just american tourists
180: [22:50:01] <Colin[pi]> regular americans at home or abroad are usually pretty nice folks
181: [22:50:40] <Colin[pi]> when I went to the US, everyone was super polite.. well except for the douchenozzle security guard at san fran airport
182: [22:51:17] <UncleCheese> Colin[pi] where in the USA?
183: [22:51:49] <Colin[pi]> where did I go? I went to cali, arizona, and NYC + NY state
184: [22:51:59] <UncleCheese> ah, nice
185: [22:52:05] <UncleCheese> yeah, those are all nice places, save AZ
186: [22:52:09] <Colin[pi]> arizona was awesome
187: [22:52:14] <Colin[pi]> so many cool things to see
188: [22:52:18] <UncleCheese> it's nice looking..
189: [22:52:23] <UncleCheese> the culture leaves a lot to be desired
190: [22:52:28] <Colin[pi]> mm true
191: [22:52:29] <UncleCheese> but definitely fun to visit
192: [22:52:38] <UncleCheese> did you drive the Painted Desert?
193: [22:52:43] <Colin[pi]> yep!
194: [22:52:46] <Colin[pi]> it was amazing
195: [22:52:47] <UncleCheese> yeah, nuts
196: [22:52:51] <Colin[pi]> and the canyon too
197: [22:53:07] <Colin[pi]> and that giant meteor crater
198: [22:53:08] <UncleCheese> it's about 5 hours of "oh fuck, please don't break down"
199: [22:53:16] <Colin[pi]> lol yeah
200: [22:53:32] <Colin[pi]> I thought it was pretty funny to be standing on the edge of Meteor Crater and smelling Subway cooking
201: [22:53:34] * ezero has joined #silverstripe
202: [22:53:35] <Colin[pi]> 'merica!
203: [22:53:40] <UncleCheese> HA!
204: [22:54:00] <UncleCheese> dude.. one thing about America is that nothing is too sacred to augment with cheap food
205: [22:54:05] <Colin[pi]> hehe
206: [22:54:08] <Colin[pi]> I learned that
207: [22:54:20] <Colin[pi]> but wtf is with corn syrup in freakin everything??
208: [22:54:25] <Colin[pi]> everything tastes sweet!
209: [22:54:34] <UncleCheese> you go to a national park, and they'll show some 15 minute video, and half the audience is stuffing their faces with $9 bags of popcorn
210: [22:54:40] <UncleCheese> yeah, we get that a lot
211: [22:54:41] <Colin[pi]> lol
212: [22:54:50] <UncleCheese> my mum in law is visiting, and she drank a coke here
213: [22:54:54] <Colin[pi]> like, just regular loaf of bread tastes like it's laced with suger
214: [22:54:56] <irogue_> Colin[pi]: yeah, my god. some dairies around auckland sell american coke
215: [22:54:57] <Colin[pi]> *sugar
216: [22:54:58] <UncleCheese> and she's like, "omg! this is the best coke I've ever had!"
217: [22:55:10] <irogue_> tried it once... insta headache
218: [22:55:15] <UncleCheese> yeah
219: [22:55:20] <Colin[pi]> UncleCheese: because.. less sugar?
220: [22:55:24] <UncleCheese> it's actually not a sweetness thing so much as it is an ecomonical thing
221: [22:55:30] <irogue_> Colin[pi]: and actual sugar
222: [22:55:34] <Colin[pi]> oic
223: [22:55:43] <UncleCheese> lots of subsudies and price ceilings left over from the Great Depression
224: [22:55:54] <irogue_> UncleCheese: yeah, it's a whole shitstorm over there with the corn subsidies
225: [22:55:57] <UncleCheese> price ceilings on corn was one way they "protected" american industry
226: [22:55:58] <irogue_> MAKE EVERYTHING FROM CORN
227: [22:56:07] <UncleCheese> yeah, you should watch this movie King Corn
228: [22:56:09] <Colin[pi]> I heard that the US produces a buttload of corn syrup and needed to do something with it all, so they just inject it into all the food?
229: [22:56:15] <Colin[pi]> might be a myth
230: [22:56:20] <UncleCheese> all about how fucked up the corn industry is in the USA
231: [22:56:29] <UncleCheese> nah, it's just subsudy
232: [22:57:00] <UncleCheese> there are thousands of farmers in the USA who get paid to grow their crops and plow them down every year
233: [22:57:15] <UncleCheese> as a means of controlling supply
234: [22:57:44] <Colin[pi]> wow that movie looks interesting, will check it out
235: [22:57:47] <UncleCheese> one of the really shit things is that they feed corn to all the cattle
236: [22:57:57] <UncleCheese> and cattle are not meant to eat corn
237: [22:58:00] <Colin[pi]> mm I heard about that
238: [22:58:04] <UncleCheese> so they produce a fuckton of methane
239: [22:58:14] <UncleCheese> and they're unhealthy and malnourished because of it
240: [22:58:18] <Colin[pi]> :(
241: [22:58:27] <UncleCheese> that's why "grassfed" beef in the USA is such a big deal
242: [22:58:30] <Colin[pi]> so the US basically smells like cow farts
243: [22:58:34] <UncleCheese> you have to look hard to find it
244: [22:58:39] <UncleCheese> yeah, i'll take Rotarua anyday
245: [22:59:34] <Colin[pi]> isn't it interesting the effects that decisions like that can have on a macro-scale
246: [23:00:07] <Colin[pi]> I suppose take anything and ramp it up exponentially and the effects are magnified\
247: [23:00:56] <irogue_> [10:58] <UncleCheese> that's why "grassfed" beef in the USA is such a big deal
248: [23:01:14] <UncleCheese> yeah, i mean
249: [23:01:33] <irogue_> I used to do IT for a company who sold "organic beef" from the waikato to Whole Foods in the USA
250: [23:01:41] <UncleCheese> oooh!
251: [23:01:56] <UncleCheese> hang on, i want to hear about htat... brb, meeting.. tsk, work
252: [23:02:22] * Colin[pi] pauses irogue_
253: [23:02:25] <irogue_> it was just normal beef, same as we'd buy at Pak N Save here
254: [23:02:44] <irogue_> all they did differently was get USDA to certify it as organic
255: [23:03:28] <irogue_> cos, y'know, basically all NZ beef is fully grass-fed, cos grass is free
256: [23:03:52] <Colin[pi]> mm NZ has a crapload of grass amirite?
257: [23:05:06] <irogue_> yeah
258: [23:05:25] <irogue_> rarely gets hot/dry enough for grass to die
259: [23:05:37] * antmas has joined #silverstripe
260: [23:05:47] <antmas> morning all
261: [23:05:53] <Colin[pi]> HAI ANTMAS
262: [23:07:00] * ezero quit (Ping timeout: 250 seconds)
263: [23:07:31] * ezero has joined #silverstripe
264: [23:08:24] <antmas> Colin[pi]: HAI2U
265: [23:09:58] <antmas> I'm having an issue with addExtraClass() to the submit button on userforms
266: [23:10:10] <antmas> ... I can't find where the button is created
267: [23:10:20] <antmas> FormFields are fine, just not this bloody button
268: [23:10:23] <antmas> :<
269: [23:12:22] <antmas> it's probably staring me right in the face -___-
270: [23:13:22] <Kingy> antmas: It's in the formaction
271: [23:13:35] <Kingy> $actions = new FieldList(FormAction::create('enter')->setTitle('Submit')->addExtraClass('btn-success btn-large'));
272: [23:13:59] <antmas> Kingy: in userdefinedforms.php?
273: [23:14:02] <antmas> form*
274: [23:14:20] <Kingy> ah, that's just a custom form
275: [23:14:24] <Colin[pi]> antmas: method getFormActions() in UserDefinedForm.php ?
276: [23:14:25] * ezero quit (Read error: Connection reset by peer)
277: [23:14:38] <Colin[pi]> $actions = new FieldList(new FormAction("process", $submitText));
278: [23:15:15] <Colin[pi]> method calls updateFormActions if you're using an extension
279: [23:15:35] <Kingy> ^
280: [23:15:41] <antmas> ahhhh
281: [23:15:44] <antmas> ok lemme try
282: [23:15:50] <antmas> ... after this meeting :P
283: [23:16:03] * simon_w|work has joined #silverstripe
284: [23:16:22] <simon_w|work> All those underscores
285: [23:16:24] <simon_w|work> Poor ss-log__
286: [23:19:14] * Selay has joined #silverstripe
287: [23:23:04] <Colin[pi]> HAI simon_w|work!
288: [23:24:31] * terryapodaca has joined #silverstripe
289: [23:25:36] <simon_w|work> Morning Colin[pi]
290: [23:25:58] <simon_w|work> Don't forget, you can give me money to build a thing! http://www.gofundme.com/91carriage
291: [23:26:04] <ss23> moin moin
292: [23:26:15] <Colin[pi]> heya ss23
293: [23:26:56] <Colin[pi]> 91 carriage?
294: [23:26:58] <Selay> Hi guys, I am wondering if there is any known solution to inclusion of dataobject fulltext search to site search in ss 3.1.6 My code was good until upgrade but now it doesnt work. It seems there is something in new release. I just put the code here. I want Event also to be searched in site search. It was all good until now. http://www.sspaste.com/paste/show/54161edca3706
295: [23:27:28] <simon_w|work> Colin[pi], yup! Is going to be awesome!
296: [23:27:35] <Colin[pi]> where does the name come from?
297: [23:27:42] <simon_w|work> My brain
298: [23:28:28] <terryapodaca> Quick question....I have a ShowType DO that has_many ShowCategory....
299: [23:28:45] <Colin[pi]> simon_w|work: cool :) maybe i can chuck some dollars your way
300: [23:28:53] <simon_w|work> <3
301: [23:29:07] <simon_w|work> Colin[pi], some what related, what's your going rate?
302: [23:29:08] <terryapodaca> in my has_many array...the plural for Category, does that matter ?
303: [23:29:17] <simon_w|work> terryapodaca, nope
304: [23:29:23] <terryapodaca> 'ShowCategories' => 'ShowCategory'
305: [23:29:28] <Colin[pi]> simon_w|work: depends on the client, but typically $85/h
306: [23:30:00] <terryapodaca> I don't need to put static plural_name = "ShowCategories" in the ShowCategory DO?
307: [23:30:12] <simon_w|work> terryapodaca, nope
308: [23:30:23] <simon_w|work> The name of the relation has no bearing on the relation at all
309: [23:30:51] <terryapodaca> ok, so I am basically declaring the 'plural' name in the ShowType has_many relationship
310: [23:33:28] <Zauberfisch> terryapodaca: plural name is just for displaying to the user in the CMS
311: [23:33:35] <Zauberfisch> it has no functionallity whatsoever
312: [23:33:56] <Zauberfisch> and in fact I dislike even using it
313: [23:34:10] <Zauberfisch> in my opinion that should be defined in a language file anyway
314: [23:34:18] <terryapodaca> right...it could be "Categories" in one DO and if used again, it could be called "ShowCategories"
315: [23:34:29] <Zauberfisch> uhm
316: [23:35:01] <simon_w|work> Zauberfisch, $plural_name is automatically passed through the i18n layer for you
317: [23:35:28] <Zauberfisch> simon_w|work: not sure what you mean.
318: [23:35:55] <terryapodaca> so if I did use $plural_name in the main DO, would I have to use that? Or could I still name it what ever I wanted in the other relation?
319: [23:35:56] <Zauberfisch> terryapodaca: just to me clear, $has_many = ['Foo' => 'Bar'];
320: [23:36:09] <Zauberfisch> Foo in this case is NOT the plural name of the dataobject.
321: [23:36:15] <antmas> Colin[pi]: Kingy would I be applying addExtraClass() to $actions in this case?
322: [23:36:15] <Zauberfisch> its just the name you have the relation
323: [23:36:15] <simon_w|work> Zauberfisch, https://github.com/simonwelsh/silverstripe-framework/blob/3.1/model/DataObject.php#L733-L737
324: [23:36:40] <Zauberfisch> ah, right
325: [23:36:49] <Zauberfisch> well, I suppose thats a point
326: [23:37:00] <Colin[pi]> antmas: you'd have to get the FormAction out of $actions (which is a FieldList) and apply it to that
327: [23:38:38] <antmas> ah true
328: [23:39:02] <antmas> what about if I'm applying it to any button/form action?
329: [23:39:19] <irogue_> I have a GridField of type Thing, which of course shows both Thing and OtherThing (which extends Thing). I want the add button on that GridField to add OtherThing, not Thing. Any ideas?
330: [23:40:15] <Zauberfisch> irogue_: you want both or just otherthing?
331: [23:40:35] <Colin[pi]> antmas: within the list?
332: [23:40:41] <antmas> Colin[pi]: yes
333: [23:40:42] <Zauberfisch> irogue_: if you want the user to be able to add both, checkout andrew shorts gridfieldextensions module
334: [23:40:56] <Colin[pi]> antmas: foreach the list and ->addExtraClass() on each
335: [23:40:57] <Zauberfisch> irogue_: it has a "Add Multiple" button thing
336: [23:41:06] <antmas> Colin[pi]: ah nice cheers
337: [23:41:17] <Zauberfisch> https://github.com/ajshort/silverstripe-gridfieldextensions
338: [23:41:24] <irogue_> Zauberfisch: just OtherThing, never Thing
339: [23:41:37] <Colin[pi]> antmas: also, took me most of saturday but it went OK... http://i.imgur.com/F1SH1hs.jpg
340: [23:41:47] <Zauberfisch> irogue_: https://github.com/ajshort/silverstripe-gridfieldextensions/blob/master/docs/en/index.md#multi-class-adding
341: [23:41:50] <Zauberfisch> irogue_: oh
342: [23:41:52] <antmas> Colin[pi]: looks good!
343: [23:42:20] <Zauberfisch> irogue_: hmmm, so you want to show thing+otherthing but only allow adding otherthing?
344: [23:42:22] <Colin[pi]> antmas: scariest part was splicing to this tiny parker wire in cramped space :(
345: [23:42:37] <Zauberfisch> irogue_: or is just showing otherthing enough?
346: [23:45:07] <irogue_> Zauberfisch: well, I'm actually only showing OtherThing, but the relationship is on Thing. I'll pastie some code so you can understand
347: [23:45:47] <Zauberfisch> irogue_: well, I see 2 ways you can try:
348: [23:46:26] <Zauberfisch> set model_class on the gridfield, that should tell the addbutton/gridfielddetailsform to create new records of that type (not sure if any sideeffects)
349: [23:47:18] <Zauberfisch> actually, just this 1 way
350: [23:47:24] <Zauberfisch> the other idea is invalid
351: [23:48:08] <Zauberfisch> $gridField->setModelClass('OtherThing');
352: [23:48:23] <UncleCheese> Zauberfisch you pumped for the meetup?
353: [23:48:41] <simon_w|work> Ooh, it's pay raise day!
354: [23:48:52] <UncleCheese> what's a pay raise?
355: [23:49:13] <ss23> haha
356: [23:49:15] <antmas> lol
357: [23:49:18] <antmas> UncleCheese: +10
358: [23:49:23] <irogue_> Zauberfisch: ooh, that sounds promising
359: [23:49:49] <Zauberfisch> irogue_: in fact, the only side effect I see so far is that gridfield will also pull summary_fields from modelclass
360: [23:50:08] <UncleCheese> composer update --dont-take-all-day
361: [23:50:12] <Zauberfisch> singleton($gridfield->getModelClass)->summaryFields()
362: [23:50:19] <irogue_> that's fine, in this case there's no difference between OtherThing and Thing's summaryfields
363: [23:50:29] <UncleCheese> composer update --sometime-this-century
364: [23:50:42] <Zauberfisch> also, you can just manually set the display fields
365: [23:52:06] <antmas> Colin[pi]: Kingy chur, that works
366: [23:52:18] <Colin[pi]> antmas: w00t
367: [23:52:22] <Kingy> :)
368: [23:53:49] <Stomach> you can also adjust the fields of both by wrapping if ($this->modelClass == 'OtherThing') {}
369: [23:54:14] <Stomach> but then you have to write your own gridfielditemrequest thingamabob

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