#silverstripe IRC Log

IRC log for 4 January 2016

All timestamps are in UTC.

1: [00:17:02] * Stomach has joined #silverstripe
2: [00:17:52] <madmatt> Firesphere: pong
3: [00:20:14] <Firesphere> Hey Matt, how are you?
4: [00:21:02] * Gfactor has joined #silverstripe
5: [00:21:23] * Colin[pi] has joined #silverstripe
6: [00:21:41] <madmatt> Not bad, yourself? Did you have a good Christmas/New Year break?
7: [00:22:10] <Firesphere> I'm ok. I don't do much over christmas/NY anyway :)
8: [00:22:19] <Firesphere> So I had a relaxing week :)
9: [00:22:25] * Colin[pi] has left #silverstripe
10: [00:22:26] <Firesphere> Back to work tomorrow I guess :(
11: [00:23:01] <madmatt> Good to hear :) Yeah, back to work tomorrow for me
12: [00:23:20] <Firesphere> I did get an awesome Christmas present though. And I guess we're both going to have to babysit Sam the upcoming year.
13: [00:23:28] <madmatt> Watching AGDQ2016 today
14: [00:23:29] <Firesphere> Or his child, I'm unsure which is worse :P
15: [00:23:54] <madmatt> hah, true
16: [00:25:19] <Firesphere> How's AGDQ in 2016? I've never actually took part in it. Just looked at it and was too lazy to do anything :$
17: [00:27:47] <Firesphere> At least, you're talking about the challenge, right?
18: [00:28:35] <madmatt> I'm talking about http://gamesdonequick.com
19: [00:29:07] <Firesphere> Yep, we're on the same thought :)
20: [00:30:13] <madmatt> I used to speedrun Quake 1 (way back when it was the only game basically)
21: [00:30:24] <madmatt> But I was never good enough to actually get an IL record :<
22: [00:30:48] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
23: [00:31:03] <Firesphere> Heh, I tried Quake once... never again..... I think it's best to say "let's forget that shameful moment"
24: [00:31:11] <madmatt> haha
25: [00:31:28] <Firesphere> And that's not even on AGDQ :X
26: [00:32:00] <Firesphere> I just suck at FPS games I guess :)
27: [00:32:21] <madmatt> Haha yeah, well it hasn't really changed in a few years now I don't think
28: [00:32:34] <madmatt> It was last year IIRC
29: [00:32:46] <madmatt> Quake is still my favourite game
30: [00:33:20] <Firesphere> I love the gameplay, that's for sure. But I suck at it as well :)
31: [00:34:03] <Firesphere> For some reason, I'm better at adventure-typing. Give me an adventure and I'll probably beat any non-pro player :D
32: [00:34:44] <madmatt> Like Diablo-style games?
33: [00:34:55] <Firesphere> The weird thing is.... I actually have Quake, Battlefield 3, Battlefield 4, and all those kind of things here at home :|
34: [00:35:51] <Firesphere> Diablo, Tomb Raider (God I loved the old games! and the new one is great too, just slightly less discovery)
35: [00:36:30] <Firesphere> Also, for some divine reason, I love Goat Simulator. It's packed with discoveries
36: [00:36:56] <Firesphere> It sounds weird, but damn that was fun discovering I could be the "satan goat"
37: [00:37:04] <madmatt> hahaha, I've not played it, just seen it being played on YT
38: [00:37:07] <madmatt> Looks pretty amusing
39: [00:38:03] <Firesphere> Goat Simulator?
40: [00:38:07] <madmatt> yea
41: [00:38:38] <Firesphere> It's so much fun. You just have to let go of the thought of "I'm playing to accomplish something"
42: [00:39:16] <Firesphere> It's kinda weird actually. I would never thought I would have such fun, doing useless shit :D
43: [00:39:48] <Firesphere> I got an axe stuck to my tongue, and destroyed homes with it....
44: [00:40:02] <Firesphere> I'm not sure what is the great part in that, but it was fun!
45: [00:41:30] <Firesphere> But, admitted, you have to have a feel for the game :) If you're into the feeling of random of the game, it's hard to have fun :)
46: [00:42:29] <Firesphere> But, anyway, I'll see you in february, I really should go to bed. I'm tired and it's my last few days until the metal tube takes off :)
47: [00:42:57] <madmatt> hah true, yeah there's a lot more games like that now. 'Do random stuff to have fun'
48: [00:43:07] <madmatt> Fair enough - good luck packing and things, see you in Feb :)
49: [01:30:37] * r_hector has joined #silverstripe
50: [02:31:38] * Stomach quit (Quit: zzz)
51: [03:25:19] * Stomach has joined #silverstripe
52: [04:00:24] * spronk has joined #silverstripe
53: [04:07:14] * zlinux quit (Ping timeout: 245 seconds)
54: [04:15:19] * Stomach quit (Quit: zzz)
55: [04:22:05] * Gfactor quit (Ping timeout: 246 seconds)
56: [04:37:30] * Stomach has joined #silverstripe
57: [04:38:04] * spronk quit (Read error: Connection reset by peer)
58: [04:46:15] * BackEndCoder quit (Ping timeout: 240 seconds)
59: [04:46:40] * BackEndCoder has joined #silverstripe
60: [04:46:50] * apuckey has joined #silverstripe
61: [04:47:28] <apuckey> question regarding cache-control
62: [04:47:52] <apuckey> is there a reason Expires isnt set to something in teh past when cache_age is 0 ?
63: [04:48:31] <apuckey> seems to be only set if these conditions are set: (self::$modification_date && $cacheAge > 0)
64: [04:50:47] <apuckey> ref: https://github.com/silverstripe/silverstripe-framework/blob/3/control/HTTP.php#L393
65: [05:57:09] * Stomach quit (Quit: zzz)
66: [06:18:08] * Stomach has joined #silverstripe
67: [06:23:47] * Liquide quit ()
68: [07:13:10] * Stomach quit (Quit: zzz)
69: [08:02:54] * arnhoe has joined #silverstripe
70: [08:13:14] * Eliseth has joined #silverstripe
71: [08:14:35] <Eliseth> Best wishes all
72: [08:19:12] * zlinux has joined #silverstripe
73: [08:20:54] * swaiba has joined #silverstripe
74: [08:31:11] * TheVoid quit (Quit: TheVoid)
75: [08:36:50] * TheVoid has joined #silverstripe
76: [08:44:18] * elgabbu quit (Ping timeout: 252 seconds)
77: [08:48:58] * zlinux quit (Ping timeout: 256 seconds)
78: [09:06:24] * swaiba quit (Ping timeout: 245 seconds)
79: [09:23:23] * r_hector quit (Remote host closed the connection)
80: [09:31:02] * Error404NotFound has joined #silverstripe
81: [09:31:12] * Error404NotFound quit (Remote host closed the connection)
82: [09:47:57] * swaiba has joined #silverstripe
83: [09:48:11] * wmk has joined #silverstripe
84: [09:59:07] * Error404NotFound has joined #silverstripe
85: [10:14:25] * Gfactor has joined #silverstripe
86: [10:15:58] <Eliseth> When using an export addon like: silverstripe-excel-export, is it possible to export some value from related object instead of related object ID? Example: instead of it exporting UserID (a useless int) I want it to export User.FirstName (a usefull string)
87: [10:18:12] * swaiba_ has joined #silverstripe
88: [10:19:38] * swaiba quit (Ping timeout: 250 seconds)
89: [10:22:13] <wmk> Eliseth, yes
90: [10:22:48] <Eliseth> Oh hey wmk, best wishes man!
91: [10:23:11] <wmk> 10x, u2
92: [10:24:22] <wmk> Eliseth, you have a getExportFields() in your DO?
93: [10:24:59] <Eliseth> hmm, no
94: [10:25:45] <wmk> that's what the exporter is calling to grab an array of fields to export
95: [10:25:58] <wmk> i just see, i have this method cause admin can export some more fields
96: [10:27:04] <Eliseth> Hmm, so by default it takes all fields, and by creating the getExportFields function I can change that?
97: [10:27:11] <wmk> seems so
98: [10:27:24] <Eliseth> I'll give it a shot ^^
99: [10:32:00] <wmk> Eliseth, see also https://docs.silverstripe.org/en/3.1/developer_guides/customising_the_admin_interface/modeladmin/#data-export
100: [10:32:09] * wmk has left #silverstripe
101: [10:32:19] * wmk has joined #silverstripe
102: [10:32:56] <wmk> so assuming you're exporting in modeladmin
103: [10:35:07] * swaiba_ quit (Ping timeout: 265 seconds)
104: [10:53:04] * Gfactor quit (Ping timeout: 256 seconds)
105: [10:54:13] * Gfactor has joined #silverstripe
106: [11:03:36] * Error404NotFound quit (Quit: User guilty of hitting the Big Red X...)
107: [11:15:49] <Eliseth> Well, that seems to work perfectly... when using the default csv export
108: [11:16:06] <Eliseth> http://addons.silverstripe.org/add-ons/firebrandhq/silverstripe-excel-export does not seem to respect or listen to that function unfortunately...
109: [11:34:03] * apuckey quit (Ping timeout: 255 seconds)
110: [11:46:22] * Error404NotFound has joined #silverstripe
111: [11:47:01] * Error404NotFound quit (Remote host closed the connection)
112: [11:47:04] <wmk> Eliseth, worked for me with axyr/silverstripe-phpexcel
113: [11:47:23] <wmk> in modeladmin
114: [12:15:53] * Mike123 has joined #silverstripe
115: [12:16:00] * Gfactor quit (Ping timeout: 245 seconds)
116: [12:16:11] * Gfactor has joined #silverstripe
117: [12:20:26] <Mike123> hey guys
118: [12:20:27] <Mike123> how do i take only year from $this->Created
119: [12:22:02] * swaiba has joined #silverstripe
120: [12:29:55] <Mike123> got it, needed to use strtotime
121: [12:31:48] <swaiba> anyone got any good / recommended ideas on storing an "empty" in in a SS datetime field on a databoject?
122: [12:59:02] * MarkGuin_ has joined #silverstripe
123: [13:46:55] <Eliseth> wmk, axyr/silverstripe-phpexcel seems to export the summary_fields only...
124: [13:49:34] * UndefinedOffset has joined #silverstripe
125: [13:49:44] <wmk> Eliseth, are you on a modeladmin?
126: [13:49:50] <Eliseth> yes
127: [13:50:00] <wmk> well, over here it seems to do so
128: [13:50:13] <Eliseth> :/
129: [13:51:02] <wmk> oh key, i also modified my modeladmin to either use getExportfields() or summaryFields()
130: [13:55:16] <swaiba> Eliseth by default all summary feilds are exported
131: [13:55:35] <swaiba> however you can, as wmk is advising, override this to export any set of fields
132: [13:55:57] <swaiba> I assume the php excel thing is just ensuring the default is sent to xls instead of csv
133: [13:56:36] <wmk> swaiba, Eliseth i have this: $exportButton = new GridFieldExportToExcelButton('before');
134: [13:56:36] <wmk> $exportButton->setExportColumns($this->getExportFields());
135: [13:56:46] <wmk> in my ModelAdmin
136: [13:57:05] <swaiba> ah, I've missed part of the conversation haven't I?
137: [13:57:13] * wmk puts this on the "blog about" list
138: [13:57:28] <swaiba> internet has been up and down this morning like father christmas and chimmneys
139: [13:57:54] <Eliseth> Haha
140: [13:57:57] * Gfactor quit (Quit: Leaving)
141: [13:58:06] * swaiba agrees with wmk wise choice to blog :)
142: [13:58:13] <Eliseth> $exportButton = new GridFieldExportToExcelButton('before');
143: [13:58:13] <Eliseth> $exportButton->setExportColumns($this->getExportFields());
144: [13:58:35] <Eliseth> That did the trick
145: [13:59:47] <wmk> Eliseth, yup, just tell that button what fields to export
146: [13:59:58] <wmk> no magic here, just manual configuration
147: [14:01:55] <Eliseth> Still feels like magic to me at times :P
148: [14:27:13] * MarkGuin_ quit (Remote host closed the connection)
149: [14:30:01] * MarkGuin_ has joined #silverstripe
150: [14:34:38] * Werner_2_ has joined #silverstripe
151: [14:34:56] * wmk quit (Read error: Connection reset by peer)
152: [14:39:06] * Werner_2_ is now known as wmk
153: [14:40:44] * MarkGuin_ quit (Remote host closed the connection)
154: [14:43:22] * zlinux has joined #silverstripe
155: [15:33:29] <swaiba> anyone know of a "one time login" passowrd solution
156: [15:33:43] <swaiba> e.g. ensuring the user changes their password on very first login?
157: [15:37:44] <wmk> swaiba, wasn't there a module for it?
158: [15:37:47] <wmk> or built in?
159: [15:37:49] <swaiba> which one?
160: [15:38:01] <wmk> there is something for password valid until...
161: [15:38:33] <wmk> Member has a PasswordExpiry field
162: [15:38:40] <wmk> this should do the trick
163: [15:38:49] <wmk> (untested)
164: [15:39:58] <swaiba> ooooo now why didn't I think to try that?
165: [15:44:52] * krofek_ has joined #silverstripe
166: [15:48:18] * krofek quit (Ping timeout: 255 seconds)
167: [15:56:17] * zlinux quit (Ping timeout: 276 seconds)
168: [16:11:28] * Mike123 quit (Ping timeout: 252 seconds)
169: [16:15:50] * Eliseth quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
170: [16:23:08] * arnhoe quit ()
171: [16:41:32] * MarkGuin_ has joined #silverstripe
172: [16:55:10] * MarkGuin_ quit (Ping timeout: 245 seconds)
173: [16:55:15] * r_hector has joined #silverstripe
174: [16:58:56] * r_hector quit (Remote host closed the connection)
175: [17:00:04] * r_hector has joined #silverstripe
176: [17:03:04] * r_hector quit (Remote host closed the connection)
177: [17:18:03] * swaiba quit (Remote host closed the connection)
178: [17:40:13] * r_hector has joined #silverstripe
179: [17:44:23] * muskie9 has joined #silverstripe
180: [17:50:08] * r_hector quit (Remote host closed the connection)
181: [18:00:40] * gelignite has joined #silverstripe
182: [18:14:15] * wmk quit (Ping timeout: 240 seconds)
183: [18:51:43] * MarkGuin_ has joined #silverstripe
184: [18:56:59] * wmk has joined #silverstripe
185: [19:04:56] * MarkGuin_ quit (Ping timeout: 255 seconds)
186: [19:12:41] * MarkGuin_ has joined #silverstripe
187: [19:36:38] * muskie9 quit (Ping timeout: 246 seconds)
188: [19:49:16] * Stomach has joined #silverstripe
189: [19:50:06] * muskie9 has joined #silverstripe
190: [19:54:35] * Liquide has joined #silverstripe
191: [20:05:06] * micmania1 has joined #silverstripe
192: [20:15:59] * MarkGuin_ quit (Remote host closed the connection)
193: [20:17:45] * Stomach quit (Quit: zzz)
194: [20:25:37] * MarkGuin_ has joined #silverstripe
195: [20:28:19] * TRB143 quit (Remote host closed the connection)
196: [20:28:31] * TRB143 has joined #silverstripe
197: [20:31:04] * MarkGuin_ quit (Ping timeout: 265 seconds)
198: [20:31:56] * DimiStripe quit (Quit: DimiStripe)
199: [20:38:05] * Stomach has joined #silverstripe
200: [20:39:40] * micmania1 quit (Quit: micmania1)
201: [20:45:43] * micmania1 has joined #silverstripe
202: [21:09:16] * Stomach quit (Quit: zzz)
203: [21:14:25] * UndefinedOffset quit (Quit: Leaving.)
204: [21:53:30] * saysora has joined #silverstripe
205: [21:55:49] <saysora> Is there a simple way to have Silverstripe check if $this->Title->exists() then to save the object with a Title-1 or Title-2?
206: [22:02:36] <muskie9> saysora you could use onBeforeWrite and so something like if(YourClass::get()->filter('Title', $this->Title)){ $this->Title = $this->Title.'-2'; } or something...
207: [22:03:03] <muskie9> actually more along the lines of YourClass::get()->filter('Title', $this->Title)->first()->exists()
208: [22:03:06] <saysora> muskie9 ok. Cool, that's what I was starting to code up. Figured it'd be in there.
209: [22:03:58] <muskie9> I've dug into SiteTree.php in the cms to see the url segment stuff as that auto-appends -# to a url segment depending on what's already in the db
210: [22:04:22] <saysora> Right. I thought I remembered it doing that.
211: [22:04:35] <saysora> I'm doing it for the same reason to, to handle the potential urlsegment creation with the same object title.
212: [22:05:35] <saysora> On point by the way. That worked like a charm. I'm gonna try and hack it together more for the urlsegment. Thanks man. :)
213: [22:07:48] <muskie9> sure, the main portion that does the heavy lifting for the cms is URLSegmentFilter I think... that's located here: https://github.com/silverstripe/silverstripe-framework/blob/3/model/URLSegmentFilter.php
214: [22:07:57] <saysora> Thanks.
215: [22:11:29] <micmania1> saysora: https://github.com/silverstripe/silverstripe-blog/blob/master/code/extensions/URLSegmentExtension.php
216: [22:11:39] <saysora> Thanks micmania1
217: [22:11:43] <saysora> I'm looking through this right now
218: [22:11:44] <saysora> https://gist.github.com/Zauberfisch/9460395
219: [22:11:49] <micmania1> That’s how its done in Blog for categories and tags.
220: [22:11:52] <saysora> Zauber seems to have killed it pretty nicely.
221: [22:14:59] * wmk quit (Ping timeout: 265 seconds)
222: [22:22:43] * chillu_23 has joined #silverstripe
223: [22:26:57] * Audlex has joined #silverstripe
224: [22:35:15] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
225: [22:43:19] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
226: [23:00:19] * spronk has joined #silverstripe
227: [23:11:58] <ss-helper> Time saver: withif and loopif blocks - https://groups.google.com/d/msg/silverstripe-dev/m7sEw-Cqgdw/9ANr-ok-CQAJ
228: [23:25:49] * zlinux has joined #silverstripe
229: [23:33:29] * chillu_23 quit (Quit: chillu_23)
230: [23:41:59] <ss-helper> Re: [silverstripe-dev] Time saver: withif and loopif blocks - https://groups.google.com/d/msg/silverstripe-dev/m7sEw-Cqgdw/J8WqDZE_CQAJ
231: [23:41:59] <ss-helper> Re: [silverstripe-dev] Time saver: withif and loopif blocks - https://groups.google.com/d/msg/silverstripe-dev/m7sEw-Cqgdw/Go1FJHY_CQAJ
232: [23:45:09] <saysora> Hmm. The one thing I've seen people do to check is use while()
233: [23:45:22] <saysora> But I'm a little confused on their function to check for it.
234: [23:45:35] <saysora> http://www.silverstripe.org/community/forums/data-model-questions/show/20135
235: [23:45:47] <saysora> His function at the bottom seems worthwhile but the function seems a bit outdated.
236: [23:46:47] <micmania1> saysora: while() is needed in case the url segment is already in use. It needs to run the same function again to look for a new segment recursively until it finds one it can use.
237: [23:47:12] <saysora> micmania1 Right. I'm trying to duplicate his type of function, but am hitting some errors.
238: [23:47:21] <saysora> Cause the while seems the best way to go through and check it.
239: [23:51:26] <saysora> Hmm. is get_one gone now?
240: [23:51:29] <saysora> That might be the issue.
241: [23:56:07] <saysora> Oh. Nevermind, I got it.
242: [23:56:12] <saysora> Thanks micmania1

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