#silverstripe IRC Log

IRC log for 2 July 2015

All timestamps are in UTC.

1: [00:00:47] * Sticks has joined #silverstripe
2: [00:01:37] <Stomach> spronk! + 24
3: [00:01:44] <Stomach> i love spearmint thickshakes
4: [00:01:51] <spronk> fukyeh.gif
5: [00:02:09] <irogue_> i'm usually all about the lime
6: [00:02:20] <irogue_> but as of last night Snickers is my new fav shake flavor
7: [00:03:18] <Stomach> nah
8: [00:03:25] <Stomach> spearmint milkshake and an american hot dog
9: [00:03:31] <Stomach> sick day lunch as a kid at mums work
10: [00:03:34] <Stomach> thanks Uncle Sams
11: [00:13:06] * DanaeNZ quit (Quit: DanaeNZ)
12: [00:15:50] * DanaeNZ has joined #silverstripe
13: [00:24:20] * ss-helper quit (Ping timeout: 250 seconds)
14: [00:30:01] * DanaeNZ quit (Quit: DanaeNZ)
15: [00:39:54] * ss-helper has joined #silverstripe
16: [00:41:12] <spronk> ughh
17: [00:41:13] <spronk> aws is so complex
18: [00:43:39] <hamror> it's great
19: [00:43:49] <hamror> shame the actual machines are hit and miss
20: [00:44:09] <hamror> i've built a number of video rendering clusters using it
21: [00:44:28] <hamror> the SQS and S3 are super useful alternatives to having a db for cooperative systems
22: [00:44:41] <hamror> as a rookie the only thing to get your head around is permissions i'd say
23: [00:44:47] <spronk> im trying to figure out the ebs-backed stuff
24: [00:44:54] <spronk> have only ever used instance storage and rdb
25: [00:45:09] <ss23> Just wait till you get to all the fucked up VPC stuff
26: [00:45:10] * micmania1 quit (Quit: micmania1)
27: [00:45:13] <spronk> heh
28: [00:45:18] <spronk> the vpc stuff isnt tooooo bad
29: [00:45:31] <ss23> till you get a funky route table where you're running your own NAT boxes and BOOM
30: [00:45:34] <ss23> Shit doesn't work and you don't know why.
31: [00:45:47] <spronk> hmm..
32: [00:45:56] <spronk> what i really want is digital ocean or linode
33: [00:45:58] <spronk> with a few more features
34: [00:45:59] <spronk> :p
35: [00:46:06] <spronk> but not as complicated as aws, lol
36: [00:46:30] <hamror> maybe you should stick to dissing yaml and vim
37: [00:46:34] <hamror> m8888
38: [00:46:49] <spronk> lol
39: [00:46:55] <spronk> nah bro.
40: [00:47:17] <spronk> i'll diss everything
41: [00:47:17] <spronk> SOMEONES GOTTA DO IT
42: [00:48:15] * Vedran__ has joined #silverstripe
43: [00:55:11] <Vedran__> whats the correct syntax for <% if ($_GET['foo'] == bar) { %> inside a template?
44: [00:59:42] * Stomach quit (Quit: zzz)
45: [01:02:51] <Colin[pi]> Vedran__: to not do it
46: [01:03:02] <Vedran__> :/
47: [01:03:04] <Colin[pi]> Vedran__: make a controller method instead that you can call from the template
48: [01:03:32] <Vedran__> hrm...
49: [01:05:30] <Vedran__> Is there access to refferer inside SS?
50: [01:08:01] * stecman quit (Quit: This computer has gone to sleep)
51: [01:14:11] * Tanger has joined #silverstripe
52: [01:15:36] * novaweb quit (Remote host closed the connection)
53: [01:16:22] <Colin[pi]> Vedran__: in SS it's usually done via $request->getHeader('Referer')
54: [01:16:35] <Colin[pi]> Vedran__: or you could try $_SERVER['HTTP_REFERER']
55: [01:16:38] <Vedran__> Colin[pi]: thank you (x2)
56: [01:16:38] <Vedran__> :)
57: [01:17:59] * Stomach has joined #silverstripe
58: [01:19:41] * Stomach quit (Client Quit)
59: [01:24:55] <Vedran__> Colin[pi]: I created a method that checks for a _GET. If I $fooMethod inside the Page.ss it shows what I want, however as soon as I put it inside an if the page stops rendering. Any ideas why?
60: [01:26:17] * micmania1 has joined #silverstripe
61: [01:26:20] <Colin[pi]> Vedran__: you have <% if $fooMethod %> bla bla <% end_if %> ?
62: [01:26:52] <Vedran__> there is a else_if in there as well
63: [01:27:43] <Vedran__> i tried both <% if $fooMethod == X and <% if $fooMethod
64: [01:32:30] * Stomach has joined #silverstripe
65: [01:35:24] * glenn-bautista quit (Quit: Leaving.)
66: [01:37:41] * DanaeNZ has joined #silverstripe
67: [01:38:32] <hamror> how do i go about rendering with template inheritance from my controller? right now i've added to my base page controller a function like this to solve it, but i get the feeling i'm not doing it right https://gist.github.com/jotham/fc1c88bec971bcf95d7c
68: [01:42:27] * Error404NotFound quit (Disconnected by services)
69: [01:42:27] * Err404NotFound has joined #silverstripe
70: [01:56:47] * Ryan-Toast quit (Quit: Ryan-Toast)
71: [02:03:43] <DanaeNZ> ugh i hate dealing with routes
72: [02:04:48] <DanaeNZ> http://sspaste.com/paste/show/55949c31253e5
73: [02:04:51] <DanaeNZ> Looks right, right?
74: [02:07:05] * adrexia quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
75: [02:07:55] <DanaeNZ> Debug (line 250 of RequestHandler.php): Testing '$Action//$ID/$OtherID' with '' on ErrorPage_Controller
76: [02:07:59] <DanaeNZ> why ErrorPage
77: [02:07:59] <DanaeNZ> why
78: [02:13:27] * Ryan-Toast has joined #silverstripe
79: [02:14:08] <Colin[pi]> DanaeNZ: wait allowed actions is supposed to be the method name not the route name
80: [02:14:30] <DanaeNZ> mm changed the method name to passes and it’s still not working
81: [02:14:35] <DanaeNZ> good catch tho
82: [02:14:42] <Colin[pi]> bah
83: [02:14:55] <Colin[pi]> did you flush?
84: [02:14:55] <Colin[pi]> :D
85: [02:15:00] <DanaeNZ> alwaaays
86: [02:15:02] <Colin[pi]> dem private statics
87: [02:15:13] <DanaeNZ> maybe it’s the order
88: [02:15:21] <DanaeNZ> I might be getting the After block wrong
89: [02:16:07] * novaweb has joined #silverstripe
90: [02:17:43] <Ryan-Toast> Stomach: which repo adds the dropdown modeladmin?
91: [02:19:16] <DanaeNZ> yaaa that was it
92: [02:19:25] <DanaeNZ> After: '#modelascontrollerroutes'
93: [02:19:40] * Stomach quit (Quit: zzz)
94: [02:21:17] * novaweb quit (Ping timeout: 252 seconds)
95: [02:21:27] * Stomach has joined #silverstripe
96: [02:21:27] <Stomach> the dropdown?
97: [02:26:25] <Ryan-Toast> Stomach: yeah
98: [02:26:45] <Ryan-Toast> e.g Requests > Foo
99: [02:26:52] <Ryan-Toast> Settings > Foo
100: [02:29:42] * Stomach quit (Quit: zzz)
101: [02:32:25] * Stomach has joined #silverstripe
102: [02:34:03] * Stomach quit (Client Quit)
103: [02:34:57] * Stomach has joined #silverstripe
104: [02:34:57] <Stomach> oh
105: [02:34:57] <Stomach> um
106: [02:36:04] <Stomach> GridFieldAddNewMultiClass
107: [02:36:09] <Ryan-Toast> chur
108: [02:36:10] <Stomach> from GridFieldExtensions
109: [02:36:55] <Ryan-Toast> Why do you use sortablegridfield in your catalogue manager if you use extensions as well?
110: [02:36:59] * LimRes has joined #silverstripe
111: [02:38:47] <Stomach> because I like it
112: [02:39:02] <Ryan-Toast> More than the extensions drag and drop?
113: [02:39:04] <Hailwood> So - Which ecommerce package do the devs at silverstripe.com actually use when they require ecommerce?
114: [02:39:10] <Stomach> swipestripe
115: [02:39:13] <Stomach> or shop
116: [02:39:14] <Ryan-Toast> Hailwood: ss-shop for me
117: [02:39:15] <Stomach> or heystack
118: [02:39:35] <Stomach> Ryan-Toast - yeah I dunno, just habit more than anything
119: [02:39:51] <Ryan-Toast> Stomach: I’m using your catalogue amanager, just enabling extensions on it :P
120: [02:40:07] <Ryan-Toast> just has the sortable folder sitting in my folder being neglected.
121: [02:40:22] <Stomach> haha
122: [02:40:30] <Stomach> one of those should just be in core
123: [02:40:33] <Stomach> for CMS
124: [02:40:38] <Stomach> its fucking standard shit right
125: [02:40:39] <Ryan-Toast> Agreed.
126: [02:41:38] <Ryan-Toast> default framework has a fuzzy image...
127: [02:41:46] <Ryan-Toast> must.fix
128: [02:42:53] <Hailwood> Stomach, Which version of swipestripe?
129: [02:43:06] <Stomach> 2.1.*@dev
130: [02:43:09] <Stomach> or something like that
131: [02:44:17] <Hailwood> Stomach, so the 3.0 branch should be ignored then yeah?
132: [02:47:48] * hp101 quit (Ping timeout: 264 seconds)
133: [02:48:29] * hp101 has joined #silverstripe
134: [02:49:18] * Stomach quit (Quit: zzz)
135: [02:49:59] * r_hector has joined #silverstripe
136: [02:50:02] * Stomach has joined #silverstripe
137: [02:50:07] <Stomach> hailwood yeah I would ignore it
138: [02:52:57] <Ryan-Toast> Stomach: oh, I meant this dropdown: http://stevie-mayhew.github.io/sitetree-less-sites-talk/results-2.png
139: [02:53:05] <Ryan-Toast> “Requests”, “Settings”
140: [02:53:16] <Stomach> https://github.com/silverstripe-australia/silverstripe-grouped-cms-menu
141: [02:53:23] <Ryan-Toast> +1
142: [02:53:26] <Ryan-Toast> take your points
143: [02:54:42] <Hailwood> Cheers Stomach
144: [02:54:52] <Stomach> I LOVE POINTS
145: [02:54:57] <Stomach> no worries Hailwood
146: [02:54:57] <Ryan-Toast> I KNOW YOU DO
147: [02:55:01] <Ryan-Toast> +7
148: [02:55:08] * Stomach drowns
149: [02:55:11] <Stomach> too many points
150: [02:55:17] <Colin[pi]> +9000
151: [02:55:39] * Error404NotFound has joined #silverstripe
152: [02:58:28] * Err404NotFound quit (Ping timeout: 264 seconds)
153: [02:59:18] <LimRes> Hey there SS Peeps, anyone have a tip for handling a Post request from a manually hard-coded form submission? When I try raw php to detect a post request, it doesn't, and I see the posted vars as query string params...
154: [03:02:52] <LimRes> using jquery wizard, which provided a great foundation, but just can't get the post out! grrr
155: [03:05:20] * Error404NotFound quit (Ping timeout: 246 seconds)
156: [03:05:58] <Zauberfisch> LimRes: best give the form its own route
157: [03:06:08] <Zauberfisch> like when the form is on mysite.tdl/foo
158: [03:06:12] <Zauberfisch> make a action
159: [03:06:22] <Zauberfisch> so the form submits to mysite.tdl/foo/bar
160: [03:06:45] <LimRes> Zauberfisch: hey thanks, so I did that, the form is on foo, the action is correctly heading to foo/bar
161: [03:06:53] <LimRes> which is also an allowed action
162: [03:06:59] <Zauberfisch> public function bar(SS_HTTPRequest $r) { ... }
163: [03:07:02] <Zauberfisch> ok
164: [03:07:03] <Zauberfisch> good
165: [03:07:27] <LimRes> but then can't access $this->request->param('xyz'), nor does it detect a POST with if($_SERVER['REQUEST_METHOD'] === 'POST'){
166: [03:07:31] * gordon has joined #silverstripe
167: [03:07:42] <Zauberfisch> $r->postVar() is what you are looking for
168: [03:07:50] <LimRes> ah, was not passing the httprequest
169: [03:07:55] * gordon is now known as Guest86292
170: [03:08:03] <Zauberfisch> $r in this case is the same as $this->request or $this->getRequest()
171: [03:08:07] <LimRes> but i woulda thought it would have got something from the direct access of server var
172: [03:08:22] <Zauberfisch> param() // url param, will get you URLSegment or Action
173: [03:08:25] * Guest86292 is now known as nontgor
174: [03:08:30] <Zauberfisch> getVar() // will fetch stuff from $_GET
175: [03:08:39] <Zauberfisch> postVar() // will fetch stuff from $_POST
176: [03:09:11] <Zauberfisch> there is probably also a $r->params() or $r->allParams() or something
177: [03:09:15] <Zauberfisch> same for get and post
178: [03:09:22] <LimRes> I should be able to just do $r->isPost() to see if it is receiving a post right?
179: [03:10:01] <Zauberfisch> yes
180: [03:10:04] <Zauberfisch> http://api.silverstripe.org/3.0/source-class-SS_HTTPRequest.html#480-483
181: [03:10:19] <LimRes> yeah read that
182: [03:10:24] <Zauberfisch> http://api.silverstripe.org/3.0/source-class-SS_HTTPRequest.html#153
183: [03:10:32] <LimRes> so wierd
184: [03:10:43] <LimRes> I don't really care if I deal with POST or query params
185: [03:10:46] <LimRes> just not seeing anything
186: [03:11:15] <Zauberfisch> so $r->postVars() is empty?
187: [03:12:16] <LimRes> http://www.sspaste.com/paste/show/5594ac065b239
188: [03:12:30] <LimRes> gets nothin after param:
189: [03:12:55] <LimRes> normally, on any controller anywhere I can $this->request->param('ID')
190: [03:13:04] <Zauberfisch> postvars is an array
191: [03:13:05] <Zauberfisch> p
192: [03:13:11] <LimRes> I can see the params in the query string but can't get at them this way
193: [03:13:12] <Zauberfisch> better use print_r
194: [03:13:23] <Zauberfisch> in the query string?
195: [03:13:35] <DanaeNZ> guuuhhh SiteTree::get() always puts the current SubsiteID in there, can’t force it to give me filtered pages
196: [03:13:36] <Zauberfisch> like ?param1=foo&param2=bar ?
197: [03:13:56] <LimRes> right, print_r is empty
198: [03:14:07] <LimRes> yes
199: [03:14:35] <Zauberfisch> DanaeNZ: yes, the extesion puts that into every query. if you want to disable it, there is a Subsite::disable_something method (can't remember the name, look at the docs)
200: [03:14:42] <Zauberfisch> LimRes: then this soulds like a get request
201: [03:14:46] <Zauberfisch> use $r->getVars()
202: [03:14:48] <DanaeNZ> Zauberfisch: cheeerrrsss :D
203: [03:15:50] <DanaeNZ> Zauberfisch: yeaahh that worked! Subsite::disable_subsite_filter()
204: [03:16:36] <LimRes> Zauberfish: lol I can't believe that I assumed it was a post
205: [03:16:46] <LimRes> thanks for the sanity check :)
206: [03:16:57] <Zauberfisch> DanaeNZ: but its probably a good idea to turn the filter back on after you did your query
207: [03:17:11] <Zauberfisch> DanaeNZ: I think that is done with: Subsite::disable_subsite_filter(false)
208: [03:17:24] <DanaeNZ> Zauberfisch: it’s in the context of a single Controller request (API endpoint)
209: [03:17:28] <DanaeNZ> Best to add it anyway?
210: [03:17:33] <Zauberfisch> LimRes: it's always the silly small mistakes that are the hardest to figure out
211: [03:17:37] <Zauberfisch> LimRes: no worries ;)
212: [03:17:51] <LimRes> Gotta go buy a rubber ducky :)
213: [03:17:59] <LimRes> But you guys are way more fun
214: [03:18:03] <Zauberfisch> DanaeNZ: if the request is ended afterwards, then it doesn't matter.
215: [03:18:08] <Vedran__> is it possible using <% control ChildrenOf to render out a Menu?
216: [03:18:12] <DanaeNZ> Zauberfisch: sweet thought so
217: [03:18:20] <DanaeNZ> I’ll test anyway
218: [03:18:35] * Stomach quit (Quit: zzz)
219: [03:18:42] <Zauberfisch> DanaeNZ: though I would still put it in. just in case some other dev has to change stuff here later. to avoid convusion
220: [03:18:54] <DanaeNZ> Zauberfisch: heheh righto
221: [03:19:05] <Zauberfisch> Vedran__: yes. though in 3.x you should use <% loop ... %>
222: [03:20:00] <Zauberfisch> also, I dislike CildrenOf, because it means you can never change the urlsegment of the page you need for it. if the users changes the page in the cms, this part of the website stops working
223: [03:20:26] <Zauberfisch> if it's like a special page type like "BlogHolder", you could create a php method to fetch it:
224: [03:20:50] <Zauberfisch> public function BlogHolder() { return BlogHolder::get()->first(); }
225: [03:20:57] <Zauberfisch> in your Page class
226: [03:21:49] <Zauberfisch> and in template: <h3>Latest Blog posts</h3><ul><% loop BlogHolder.Children %><li>$Title</li><% end_loop %></ul>
227: [03:22:17] <Vedran__> Zauberfisch: I think thats a better way than I was going to go about it
228: [03:22:32] <Zauberfisch> I think so too ;)
229: [03:22:36] <Vedran__> does return BlogHolder:get() return everything?
230: [03:22:49] <Zauberfisch> BlogHolder::get() is a list of all BlogHolders
231: [03:22:59] <Zauberfisch> then you have to loop it
232: [03:23:36] <Zauberfisch> anyway, I have to leave now
233: [03:23:39] <Zauberfisch> cya
234: [03:25:04] <Vedran__> thanks Zauberfisch
235: [03:35:09] * novaweb has joined #silverstripe
236: [03:47:25] * Phlunk3 quit (Quit: Leaving)
237: [03:47:33] * LimRes quit (Ping timeout: 246 seconds)
238: [03:47:42] * Shrike_Finland has joined #silverstripe
239: [03:52:59] * Stomach has joined #silverstripe
240: [04:07:13] <Vedran__> whats the best way to make the homepage render with a different/static page
241: [04:07:13] <Vedran__> ?
242: [04:07:40] <Stomach> add HomePage.ss into themes/mytheme/templates/HomePage.ss
243: [04:07:41] <Stomach> ?
244: [04:08:48] <Vedran__> wasnt sure if it was called HomePage. Cheers Stomach :)
245: [04:09:04] <Vedran__> oh i need a HomePage class as well?
246: [04:09:51] <Stomach> yeah :)
247: [04:10:03] * Vedran__ nods
248: [04:14:21] <Vedran__> hrm... Its not rendering using the HomePage.ss template
249: [04:14:31] <Vedran__> in either /templates/ or template/Layout
250: [04:14:43] <Colin[pi]> anyone got a good example/code/css for doing that "sidebar changes to fixed after scroll and moves again once approaching bottom of page" trick?
251: [04:24:50] <DanaeNZ> https://i.imgur.com/QYO6sGg.gifv
252: [04:25:35] <Ryan-Toast> Come with me, I’ll take you to a magical land.
253: [04:28:47] <Zauberfisch> Vedran__: ?flush=1
254: [04:28:55] <Vedran__> Zauberfisch: didnt work :/
255: [04:28:59] <Zauberfisch> Vedran__: you have to flush for templates to be found
256: [04:29:08] <Zauberfisch> did you ?flush=1 on a /dev/build?
257: [04:29:22] <Zauberfisch> templates are not flushed when you do /dev/build?flush=1
258: [04:29:49] <Zauberfisch> (I believe that bug has been fixed in 3.2, but you are probably on an earlier version)
259: [04:30:01] <Vedran__> i dont all three. /dev/build. /dev/build?flush=1 and ?flush=1
260: [04:30:22] <Zauberfisch> is the classname the same as the template?
261: [04:30:48] <Zauberfisch> class HomePage extends Page {} and the file templates/HomePage.ss or templates/Layout/HomePage.ss?
262: [04:31:02] <Zauberfisch> also, are you sure that the page in the CMS is created as type HomePage?
263: [04:31:16] <DanaeNZ> Colin[pi]: this one’s aight: http://leafo.net/sticky-kit/
264: [04:32:24] <Vedran__> Zauberfisch: yep for all them. I have two .ss files. One inside /templates/ and one inside /templates/Layout
265: [04:32:33] <Vedran__> page is set as home (and even includes the icon)
266: [04:32:42] <Zauberfisch> hmmm
267: [04:32:50] <Colin[pi]> DanaeNZ: nice, thanks
268: [04:32:53] <Vedran__> homepage need a controller?
269: [04:33:04] <Vedran__> class HomePage extends Page {
270: [04:33:07] <Vedran__> atm its jsut
271: [04:33:10] <Zauberfisch> well, it was required before 3.1.something
272: [04:33:18] <Zauberfisch> a Page class always needed a controller
273: [04:33:33] <Zauberfisch> but that changed a few weeks ago or something
274: [04:33:57] <Vedran__> that got it firing :)
275: [04:34:11] <Vedran__> cheers Zauberfisch
276: [04:38:55] <irogue_> FYI all, there is now a thorough AD integration for SilverStripe
277: [04:38:57] <irogue_> https://github.com/silverstripe/silverstripe-activedirectory/
278: [04:39:57] <Ryan-Toast> So many fuzzy icons in framework...
279: [04:40:05] <Ryan-Toast> WHO DID THIS?
280: [04:40:32] <irogue_> I blame adrexia, since she's not here
281: [04:40:47] <Ryan-Toast> those last two: https://github.com/silverstripe/silverstripe-framework/blob/3.2/admin/images/btn-icon-scb653ce8a9.png
282: [04:41:02] <spronk> yeesh
283: [04:41:09] <Ryan-Toast> and the table one.
284: [04:41:21] <Ryan-Toast> the diabled cross is a different icon.
285: [04:41:33] <spronk> ITS SO FUZZY IM GONNA DIE
286: [04:41:40] <Ryan-Toast> If I fix this can someone pull request it for me?
287: [04:41:41] <Colin[pi]> spronk: I understood that reference
288: [04:41:47] <spronk> :D:D
289: [04:42:04] <spronk> despicable, Colin[pi], despicable
290: [04:42:30] <irogue_> Ryan-Toast: why can't you pull request it?!?
291: [04:42:41] <Ryan-Toast> irogue_: I cbf setting up a framework environment
292: [04:42:46] <irogue_> ah lol
293: [04:43:28] <irogue_> if you email stuff to me I can do it when I get a chance
294: [04:43:39] <Colin[pi]> what is this..... email
295: [04:43:58] <Ryan-Toast> irogue_: cool, I’ll do it tomorrow some time
296: [04:44:04] <irogue_> already in the middle of a fix for doc.ss.org and a major fix for staticpublishqueue
297: [04:44:06] <spronk> yeah
298: [04:44:11] <spronk> email, wtf
299: [04:44:19] <spronk> i think there's an app for that?
300: [04:44:22] <Ryan-Toast> … I probs could have just done it instead of this: https://github.com/Rhym/silverstripe-cms-theme/commit/0b9a54b1373e8654831ade54b4e6e9df918dc8b0
301: [04:45:13] <irogue_> spronk: I'll forget unless its sitting in my inbox harassing me :P
302: [04:45:20] <spronk> haha
303: [04:45:30] <irogue_> i do the zero inbox thing so its an ideal todo list
304: [04:45:44] <spronk> hmmm
305: [04:45:51] <irogue_> for things that aren't on JIRA, anyway
306: [04:45:52] <spronk> i do inboxzero too
307: [04:45:59] <spronk> but it really doesnt work well for me as a todo list :p
308: [04:51:37] <Colin[pi]> I do inbox 9000
309: [04:51:45] <Colin[pi]> as in "nuke it from orbit"
310: [04:52:01] <Zauberfisch> irogue_: wow
311: [04:52:02] <Zauberfisch> nice
312: [04:52:17] <irogue_> Zauberfisch: ??
313: [04:52:20] <Zauberfisch> AD
314: [04:52:23] <irogue_> ahh
315: [04:52:32] <irogue_> yeah, its a pretty full-featured integration
316: [04:52:38] <irogue_> unlike the old ss-ldap that just did basic login
317: [04:53:28] <irogue_> and all paid for by the government :P
318: [04:53:42] <Zauberfisch> :D
319: [04:53:43] <Zauberfisch> very good
320: [04:53:55] <irogue_> blog post: http://www.silverstripe.org/blog/reducing-user-management-headaches-with-new-active-directory-integration/
321: [04:55:07] * micmania1 quit (Quit: micmania1)
322: [04:58:36] * novaweb quit ()
323: [05:00:30] * UncleCheese has joined #silverstripe
324: [05:00:55] * micmania1 has joined #silverstripe
325: [05:03:12] <Vedran__> can I have two checkboxes side by side? using $fields->addFieldToTab("Root.Content.Main", new CheckboxField
326: [05:03:35] <Vedran__> atm I have two 'add field to tab'
327: [05:11:05] * EasyCo has joined #silverstripe
328: [05:11:46] <Zauberfisch> well, you can do
329: [05:12:11] <Zauberfisch> $fields->addFieldsToTab('Root.Content.Main', [new CheckboxField(...), new CheckboxField(...)]);
330: [05:12:26] <Zauberfisch> but they will still be below each other in the cms (visually speaking)
331: [05:12:39] <Zauberfisch> also, Root.Content.Main? are you still on 2.4?
332: [05:12:42] * Shrike_Finland quit (Read error: Connection reset by peer)
333: [05:12:51] * Shrike_Finland has joined #silverstripe
334: [05:12:56] * Ryan-Toast quit (Quit: Ryan-Toast)
335: [05:16:03] * adrexia has joined #silverstripe
336: [05:17:03] * Shrike_Finland1 has joined #silverstripe
337: [05:17:03] * Shrike_Finland quit (Read error: Connection reset by peer)
338: [05:23:39] * Stomach quit (Quit: zzz)
339: [05:24:33] * ss-helper quit (Ping timeout: 255 seconds)
340: [05:29:17] * Shrike_Finland1 quit (Quit: Leaving.)
341: [05:34:18] * micmania1 quit (Quit: micmania1)
342: [05:35:04] * Hailwood quit (Quit: Leaving)
343: [05:36:13] * UncleCheese quit (Ping timeout: 246 seconds)
344: [05:39:27] * vanny has joined #silverstripe
345: [05:39:35] <vanny> Hi All
346: [05:39:42] <DanaeNZ> vanny: o/
347: [05:39:48] * ss-helper has joined #silverstripe
348: [05:40:18] <vanny> Its been a while, i've been experimenting with SS on my own. But trying to do something a little wierd
349: [05:40:32] <vanny> wondering if my attack on the problem is a little wrong
350: [05:41:58] <vanny> im trying to use a form with start and end dates as a filter, and then pull a report in the action, but all it returns is a datalist
351: [05:42:31] * Shrike_Finland has joined #silverstripe
352: [05:42:38] * frostfire_ has joined #silverstripe
353: [05:43:36] * Shrike_Finland1 has joined #silverstripe
354: [05:45:54] <Vedran__> $fields->addFieldToTab("Root.Main",
355: [05:45:54] <Vedran__> [new CheckboxField ("ProjectA"), new CheckboxField ("ProjectB")], 'Content');
356: [05:45:55] * Shrike_Finland1 quit (Read error: Connection reset by peer)
357: [05:45:58] * Shrike_Finland2 has joined #silverstripe
358: [05:45:58] <Vedran__> gah
359: [05:46:00] <Vedran__> !paste
360: [05:46:00] <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.
361: [05:46:28] <Vedran__> Zauberfisch: http://www.sspaste.com/paste/show/5594d028635ff like that?
362: [05:46:52] * Shrike_Finland quit (Ping timeout: 256 seconds)
363: [05:49:09] * Shrike_Finland2 quit (Client Quit)
364: [05:49:16] * guci0 has joined #silverstripe
365: [05:49:21] <guci0> Hello Wolrd!
366: [05:49:29] <guci0> World :)
367: [05:50:59] * vanny waves
368: [05:51:16] * frostfire_ quit (Ping timeout: 264 seconds)
369: [05:52:43] * zlinux has joined #silverstripe
370: [05:53:53] * veb quit (Quit: veb-irc: &)
371: [05:54:09] * nontgor quit (Ping timeout: 276 seconds)
372: [05:57:47] <vanny> Ok, my other way to solve this is, there a way, I can just put a dateField on the form with its nice config, with creating a form?
373: [06:03:00] <Zauberfisch> Vedran__: addFieldsToTab
374: [06:03:03] <Zauberfisch> note that S
375: [06:03:09] <Vedran__> ohhhh
376: [06:05:18] <Zauberfisch> also, if you are still using 2.x, then 'Content' as last paramter will not work
377: [06:05:24] <Zauberfisch> (the insert before option)
378: [06:05:25] <Vedran__> nah im on 3
379: [06:05:32] <Zauberfisch> this only got added in 3.1 I think
380: [06:05:36] <Zauberfisch> good
381: [06:05:39] <Vedran__> *3.1.13 i think
382: [06:05:42] * nontgor has joined #silverstripe
383: [06:05:50] <Zauberfisch> also, [] instead of array() requires php5.4
384: [06:06:26] <irogue_> which makes me cry
385: [06:06:41] <irogue_> cos all of the projects I work on are php5.3
386: [06:07:28] <Zauberfisch> :O
387: [06:07:36] * Mike123 has joined #silverstripe
388: [06:07:46] <Zauberfisch> hasn't 5.3 reached end of life?
389: [06:07:51] <Mike123> Morning
390: [06:08:00] <Zauberfisch> Mike123: you went away yesterday before I could find it
391: [06:08:03] <Zauberfisch> do you still need it
392: [06:08:04] <Zauberfisch> ?
393: [06:08:25] <Mike123> Yes !! :)
394: [06:08:26] * veb has joined #silverstripe
395: [06:08:34] <Mike123> if you can :) please
396: [06:11:44] <irogue_> Zauberfisch: yes. unfortunately it's also the last version in a couple of widely used old versions of distros, so upgrading will require a full distro upgrade.
397: [06:12:17] <irogue_> and that's stuff out of our control (large 3rd party I.T. company managing the servers)
398: [06:13:46] <Zauberfisch> Mike123: you have composer?
399: [06:13:51] <Zauberfisch> require the package "league/csv"
400: [06:14:07] <Mike123> yes
401: [06:14:08] <Mike123> ok
402: [06:15:24] <simon_w|air> Zauberfisch, PHP 5.4 is also EOL, 5.5 is security only
403: [06:16:20] <ss23> Debian still do security updates for 5.3 though
404: [06:16:32] <ss23> Not that I trust their lts team
405: [06:16:50] <irogue_> as do Red Hat for PHP 5.3 on RHEL5
406: [06:17:41] <irogue_> but that client is switching to RHEL7.1 soon which means PHP 5.5
407: [06:18:19] <irogue_> also this is in their upgrade notes: "Move to MariaDB due to Oracle takeover of MySQL"
408: [06:18:33] <Mike123> Zauberfisch , i think i have php 5.3 , and this league/csv needs 5.4
409: [06:26:10] <Zauberfisch> simon_w|air: it is already EOL? I missed that. though I care very little since I am on 5.5
410: [06:26:40] <simon_w|air> Zauberfisch, yup. One year after security only, it goes EOL
411: [06:26:56] <Zauberfisch> Mike123: hmmm
412: [06:27:03] <Zauberfisch> Mike123: check for an earlier version
413: [06:27:13] <Zauberfisch> Mike123: also, here you go: http://paste2.org/zHHUpfny
414: [06:27:42] <Zauberfisch> ah, I named it controller, my mistake
415: [06:27:51] <Zauberfisch> usually name those things Task
416: [06:28:00] <Zauberfisch> ProjectImportTask
417: [06:28:16] <Zauberfisch> then you can access the task from the list at mysite.tdl/dev/tasks
418: [06:29:02] * darjus01 has joined #silverstripe
419: [06:29:18] <Zauberfisch> Mike123: hmmm, they seem to require 5.4 since the beginning
420: [06:29:31] <Zauberfisch> no chance to upgrade?
421: [06:30:31] <Mike123> nop :(
422: [06:31:30] <Mike123> the thing is that could write my own , without modules, but i don't understand how it works , what csv structure should be with relations e.t.c
423: [06:32:11] * frostfire_ has joined #silverstripe
424: [06:33:59] * DanaeNZ quit (Quit: DanaeNZ)
425: [06:34:22] <Zauberfisch> Mike123: I assumed this is already know
426: [06:34:27] <Zauberfisch> don't you have the data already?
427: [06:34:37] <Zauberfisch> or do you have to specify how the csv should look like?
428: [06:34:55] <Zauberfisch> I would do relations with separate csv files
429: [06:35:27] <Zauberfisch> so there is 1 file called Players.csv and one called Teams.csv
430: [06:35:32] <Mike123> not, i need to create csv structure so that client could fill it , and i dont even image how to create it with relations, mby you have any example csv's with relations ?
431: [06:35:42] <Zauberfisch> and Players.csv refences a Team by ID or something
432: [06:36:09] <Zauberfisch> I have a train to catch now
433: [06:36:14] <Zauberfisch> will be back in 1.5h
434: [06:36:26] <Mike123> ok , thank you anyway :)
435: [06:37:24] <Zauberfisch> basically:
436: [06:37:29] <Zauberfisch> players.csv
437: [06:37:37] <Zauberfisch> Name,City,TeamID
438: [06:37:47] <Zauberfisch> Mike,Somewhere,15
439: [06:37:53] <Zauberfisch> Zauberfisch,Fishbowl,42
440: [06:37:56] <Zauberfisch> teams.csv
441: [06:38:06] <Zauberfisch> ID,Name
442: [06:38:20] <Zauberfisch> 15,Team Blue
443: [06:38:25] <Zauberfisch> 42,Team Pink
444: [06:38:32] <Zauberfisch> or something like that. just like in any database
445: [06:38:54] <Zauberfisch> (though I would not import the team IDs into silverstripe, but instead assign new ones, but thats up to you)
446: [06:38:58] <Mike123> hmm i understood you , so i need different csv's for every object?
447: [06:39:06] <Zauberfisch> yeah, I would do it like that
448: [06:39:18] <Zauberfisch> I mean you can also cramp everything into a csv file and make it hacky
449: [06:39:19] <Zauberfisch> like:
450: [06:39:23] <Mike123> the problem is client want to do it with "one click"
451: [06:39:24] <Zauberfisch> players.csv
452: [06:40:15] <Zauberfisch> (lets assume you have many_many images)
453: [06:40:32] <Zauberfisch> Name,Team,GalleryImage1,GalleryImage2,GalleryImage3,GalleryImage4,....
454: [06:40:48] <Zauberfisch> Zauberfisch,Team Pink,foo.jpg,bar.jpg,....
455: [06:41:00] <Zauberfisch> Mike,Team Pink,1.png,2.png,3.png
456: [06:41:02] * spronk quit (Quit: I may need a longer sleep timer...)
457: [06:41:31] <Zauberfisch> so
458: [06:41:35] <Zauberfisch> now, I really have to leave
459: [06:41:36] <Zauberfisch> o/
460: [06:42:13] <Mike123> ok, thank you
461: [06:50:35] * irogue_ quit (Quit: Textual IRC Client: www.textualapp.com)
462: [06:52:31] * Stomach has joined #silverstripe
463: [06:56:36] * Stomach quit (Client Quit)
464: [07:06:41] * swaiba has joined #silverstripe
465: [07:12:47] <swaiba> morning all o/
466: [07:12:54] <swaiba> anyone use composer on windows?
467: [07:20:01] * arnhoe has joined #silverstripe
468: [07:25:54] <Colin[pi]> swaiba: yarp
469: [07:26:18] <Zauberfisch> I am back
470: [07:27:11] <swaiba> Colin[pi] - http://snag.gy/Poh3t.jpg
471: [07:27:23] <swaiba> have you see this before?
472: [07:28:16] <vanny> col dog, you cold there?
473: [07:40:02] * Error404NotFound has joined #silverstripe
474: [07:43:09] * Sticks quit (Quit: Leaving)
475: [07:50:30] * Err404NotFound has joined #silverstripe
476: [07:50:30] * Error404NotFound quit (Disconnected by services)
477: [07:53:36] * cupcake quit (Ping timeout: 246 seconds)
478: [08:02:10] <Mike123> Zauberfich ur here ? :)
479: [08:06:23] <Zauberfisch> yes
480: [08:06:29] <Zauberfisch> though you have written my name wrong
481: [08:06:40] <Zauberfisch> if you do that, I don't get a notification
482: [08:07:45] <Mike123> oh :) sorry, mistype, ia have writen to you in private , can u look a bit ?
483: [08:08:45] <Zauberfisch> ah, I see
484: [08:09:02] <Zauberfisch> I usually notice private messages very late
485: [08:09:17] <Zauberfisch> I have 60 open chat windows, and new ones get added at the end
486: [08:11:36] * zlinux quit (Read error: Connection reset by peer)
487: [08:11:46] * kinglozzer has joined #silverstripe
488: [08:12:01] * zlinux has joined #silverstripe
489: [08:16:37] * veb quit (Quit: veb-irc: &)
490: [08:17:23] * vanny quit (Quit: Page closed)
491: [08:20:11] * GioVdK has joined #silverstripe
492: [08:23:56] * simon_w has joined #silverstripe
493: [08:26:54] * Err404NotFound quit (Quit: User guilty of hitting the Big Red X...)
494: [08:38:38] * firefox2kx quit ()
495: [08:38:56] * Error404NotFound has joined #silverstripe
496: [08:44:24] * zlinux quit (Ping timeout: 250 seconds)
497: [08:45:21] * zlinux has joined #silverstripe
498: [08:49:49] * Shrike_Finland has joined #silverstripe
499: [08:52:03] <NETim> Morning, is there any way to get a list of dataobject that extend a root object in silverstripe?
500: [08:52:13] <Vedran__> what would be the best way to custom style the last element inside Menu? (Contact need to be positioned absolutely Right: 0)?
501: [08:52:27] * Colin[pi] quit (Ping timeout: 255 seconds)
502: [08:55:41] <NETim> Vedran__: CSS?
503: [08:55:43] <NETim> last-child
504: [08:55:50] <Vedran__> hrm..
505: [08:56:05] <NETim> .class:last-child {}
506: [08:56:30] <Vedran__> that would work
507: [08:56:36] * Vedran__ nods head in agreement
508: [08:58:03] <Vedran__> NETim: u know if its ie8 comp?
509: [08:59:25] <NETim> Given it's IE, probably not. leme check.
510: [08:59:55] <NETim> (Where's the act surprised button) It isn't IE8 compatible.
511: [08:59:59] <NETim> IE9 and above.
512: [09:00:00] <NETim> :(
513: [09:00:29] <swaiba> NETim - ClassInfo::subclassesFor('RoomObject')
514: [09:00:35] <NETim> If you're dynamically adding them using the templater you can use if Last and add an extra class.
515: [09:00:39] <Vedran__> my nav is wrappd in a container, so absolute will only position it to the edge of the container. :/
516: [09:00:40] <NETim> swaiba: Awesome.
517: [09:00:48] <NETim> Mys headache just went away :)
518: [09:01:04] <Vedran__> NETim: 'the templater' ?
519: [09:01:35] <NETim> the silverstripe template engine, it has a name but I haven't had enough coffee to go find it yet
520: [09:04:39] * Colin[pi] has joined #silverstripe
521: [09:09:48] * marvanni has joined #silverstripe
522: [09:10:54] * Pyfernk has joined #silverstripe
523: [09:12:32] <kinglozzer> Vedran__: <% if $Last %>
524: [09:12:38] <kinglozzer> Just add an extra class
525: [09:12:50] <kinglozzer> As NETim said ^^ :P
526: [09:14:42] <Pyfernk> Vedran__: NETim: no, css 2.1 only supports first-child, although many browsers also did last-child, it wasn't ever officially part of the spec.
527: [09:14:43] <Vedran__> thanks guys/gals
528: [09:14:57] <Pyfernk> so yeah, like kinglozzer said, <% if $Last %>
529: [09:14:59] <Pyfernk> :>
530: [09:15:08] <Vedran__> removing the container (which wasnted needed cause the rest of the menu is centered) sorted the issue
531: [09:15:28] <Vedran__> Im not sure where to throw $last
532: [09:15:37] <Pyfernk> well it's just a test
533: [09:15:38] <Vedran__> *<% if $Last %>
534: [09:15:47] <Pyfernk> in html for example:
535: [09:16:07] <Vedran__> err... Sorry guys
536: [09:16:14] <Vedran__> i didnt realise $menu was in a loop
537: [09:16:24] <Vedran__> I thought it was just $Menu that causes the rendering
538: [09:16:29] <Pyfernk> <div id="zomgadiv" class="$LinkingMode<% if $Last %> lastitem<% end_if %>">
539: [09:16:46] <kinglozzer> Pyfernk: ids in a loop? ;)
540: [09:16:50] <Pyfernk> no, SS gives you complete control over output :)
541: [09:17:02] <Pyfernk> kinglozzer: well no, it's an example chap :P
542: [09:17:06] <kinglozzer> :P
543: [09:17:17] <Pyfernk> hence 'zomg' (I thought wtf was perhaps a bit unPC)
544: [09:17:57] <Vedran__> lol
545: [09:18:00] <Vedran__> thanks guys
546: [09:18:03] <Vedran__> apprecaite the help
547: [09:18:06] <Vedran__> *appreciate even
548: [09:18:51] <Pyfernk> :>
549: [09:19:35] <Pyfernk> kinglozzer: Vedran__ although id="zomgwtfanid$Pos" would be ok :P (ugly as all hell, but ok.)
550: [09:20:04] * Tanger quit (Quit: sleep())
551: [09:20:31] <Vedran__> ok guys its 7:20pm time to go home! thanks all for the help!
552: [09:20:39] * Vedran__ quit ()
553: [09:21:49] <NETim> Anyone know how to generate an add new link in the CMS from a custom button?
554: [09:22:19] <Zauberfisch> not sure what you mean
555: [09:22:24] <Zauberfisch> but there is LiteralField
556: [09:22:39] <Zauberfisch> which can be added to getCMSFields and contain any html
557: [09:23:29] <Zauberfisch> $fields->addFieldToTab('Root.Main', '<a href="http://zauberfisch.at">visit this beautiful website</a>');
558: [09:23:44] <Pyfernk> lulz the highlighting in the webclient
559: [09:23:47] * Tanger has joined #silverstripe
560: [09:23:59] <Pyfernk> http://zauberfisch.at">visit <-- all one link :P
561: [09:24:05] <NETim> Zauberfisch: trying to allow a user to select the DO type from a dropdown and then click add.
562: [09:24:37] <ss-helper> Adding a widget to all blog entries (using the blog module) - http://stackoverflow.com/questions/31180584/adding-a-widget-to-all-blog-entries-using-the-blog-module
563: [09:24:53] <NETim> All the options extend a root object so they'll fit into one gridfield.
564: [09:24:54] <Pyfernk> NETim: on another note, you've got subclasses for right, but you can also use baseclassfor which gets the base data class
565: [09:25:04] <NETim> Pyfernk: thanks.
566: [09:25:06] <Pyfernk> or something ilke that, see !api.ClassInfo
567: [09:25:30] <NETim> I've got everything displaying, just need to get the add button to work.
568: [09:25:44] <NETim> Right now it tries to add a new page, or just screws the whole CMS.
569: [09:30:10] <Pyfernk> NETim: so you're trying to programmatically add a new page from the front end?
570: [09:30:21] <Pyfernk> or from within the CMS?
571: [09:31:53] <NETim> within the CMS.
572: [09:32:18] <NETim> So a page has 'widgets' and a 'widget' can be of many types.
573: [09:32:42] <NETim> What I'm trying to do is add a dropdown to the add button so that the user can choose the 'widget' type.
574: [09:32:46] <NETim> make sense?
575: [09:33:44] <Pyfernk> yeah, except 'the add button'
576: [09:33:51] <Pyfernk> can you a bit more specific?
577: [09:35:24] <Pyfernk> and 'widget'? You mean silverstripe-widgets ?
578: [09:35:49] <NETim> I'm being generic when i say widget. And it's a gridfield add button.
579: [09:36:16] <NETim> I've created a custom gridfield_config that adds a customised gridfield_addbutton.
580: [09:48:08] <Pyfernk> Right sorry, being talked to
581: [09:48:27] <NETim> not a problem.
582: [09:48:35] <Pyfernk> so what's this gotta do with pages?
583: [09:48:39] <NETim> I've been confused, so time well spent.
584: [09:48:48] <Pyfernk> you're trying to add a random dataobject to a page, or a page to a page?
585: [09:48:49] <Pyfernk> or...
586: [09:48:56] <NETim> The issue is that for some reason my add button is adding a new page, instead of a dataobject.
587: [09:49:04] <NETim> DataObject to a page.
588: [09:49:10] <Pyfernk> sounds like a programatic issue to me.
589: [09:49:49] <NETim> Well, yes...
590: [10:09:52] * ss-helper quit (Remote host closed the connection)
591: [10:10:08] * ss-helper has joined #silverstripe
592: [10:22:18] <Mike123> Zauberfisch ur here ? :)
593: [10:28:18] <Pyfernk> Morgen Mike123 :)
594: [10:28:31] <Pyfernk> NETim: sorry, finally stopped being talked at.
595: [10:29:20] <Pyfernk> so check that only the applicable events are firing (in CMS JS), if they are, then check that you're YourObject::create, not SomePage::create
596: [10:30:54] <Mike123> Morgen :)
597: [10:31:12] <Mike123> Pyfernk , maybe you could help me
598: [10:32:56] <Mike123> i need to create import module (with simple import interface, upload field for csv). can't find anything on the web about it , i will have to import Object info with relations
599: [10:38:12] * zlinux quit (Ping timeout: 255 seconds)
600: [10:39:57] <marvanni> Does anyone knows if there is work in progress somewhere to achieve this ? :
601: [10:39:58] <marvanni> $listWithHasOneRelationsInOneQuery = Appointment::get()->with(array('Manager','Employee'));
602: [10:40:36] * cloph_away quit (Remote host closed the connection)
603: [10:40:54] <swaiba> marvanni - is that not just a filter where Field IN (Manager,Employee) ?
604: [10:41:17] <swaiba> Can anyone help me with this error please - http://snag.gy/Poh3t.jpg ?
605: [10:41:22] <simon_w> marvanni, you can't
606: [10:41:31] <simon_w> Or, there isn't as far as I'm aware
607: [10:41:44] <marvanni> no, I have a sample setup to query has_one relation data in 1 query like Laravel has.
608: [10:42:51] <marvanni> so you dont have to query each Manager, Employee inside a loop of Appointmens. (5 appointments, will result in 15 queries, where 5 should be enough)
609: [10:43:06] <marvanni> ehm, not really 11 queries
610: [10:43:36] <Pyfernk> Mike123: there is csv import gridfield component afaik
611: [10:43:44] * cloph_away has joined #silverstripe
612: [10:43:50] <Pyfernk> I've not handled imports before though, I can only point you in the right direction
613: [10:44:45] <Mike123> i need to override import action
614: [10:44:59] <marvanni> pff I mean, 11 queries where 1 should be enough….
615: [10:45:02] <Pyfernk> marvanni: you can't do that in SS. Even if your query is ok, a DataQuery formats results into DataObjects, thus result fields not relevant to the queried object are dropped.
616: [10:45:14] <Pyfernk> marvanni: you have 11 has_ones on a single object o.0
617: [10:45:25] <mobiusnz> swaiba: try deleting your composer.lock file and updating again
618: [10:45:40] * cloph_away is now known as cloph
619: [10:46:05] <Pyfernk> mobiusnz: that's create-project, not update project :<
620: [10:46:16] <marvanni> no, but if you loop over Appointments and want to display $Manager.Name and $Employee.Name you have to query the Manager and Employee for each Appointment in de loop
621: [10:46:25] <swaiba> mobiusnz: and the folder is empty, nothing to delete within it
622: [10:46:37] <Pyfernk> swaiba: the folder exists?
623: [10:46:39] <Pyfernk> delete it
624: [10:46:58] <mobiusnz> swaiba: also try a composer self-update
625: [10:47:01] <Pyfernk> iirc composer creates the project folder
626: [10:47:07] <marvanni> google “n+1 problem”
627: [10:47:09] <Pyfernk> yeah self-upate probably best bet
628: [10:47:29] <mobiusnz> and put —verbose after your create-project to get the full stack trace, might give more useful info
629: [10:47:50] <mobiusnz> I should go to bed
630: [10:47:52] <Pyfernk> marvanni: well, you could do it by directly accessing a result set using SQLQuery
631: [10:47:59] <Pyfernk> but... not idea afaik
632: [10:48:02] <mobiusnz> but my beer is tasting *really* good right now
633: [10:48:12] <Pyfernk> mobiusnz: best :>
634: [10:48:26] <swaiba> Pyfernk cool it seems to be moving now :)
635: [10:48:39] <Pyfernk> swaiba: just deleting the folder?
636: [10:48:51] <swaiba> did both... so couldn't say
637: [10:48:59] <Pyfernk> ah, yeah. Probably the update that did it :>
638: [10:52:17] <marvanni> I need to clean this up, but this works for the has_ones :
639: [10:52:18] <marvanni> http://sspaste.com/paste/show/559517a3e8eb2
640: [10:53:06] <Pyfernk> marvanni: if ($result = DB::query($sqlQuery->sql())) {
641: [10:53:24] <Pyfernk> marvanni: $sqlQuery->query()
642: [10:54:23] <Pyfernk> But yeah, that looks pretty good.
643: [10:54:25] <marvanni> ofcourse :)
644: [10:54:57] * cupcake has joined #silverstripe
645: [10:55:13] <marvanni> in this way all casting properties still work. but other query params like sort and where are missing
646: [10:55:14] <cupcake> is it possible to add a gridfield to a widget?
647: [10:56:15] <Pyfernk> cupcake: well... probably, yeah
648: [10:56:15] * Colin[pi] quit (Ping timeout: 265 seconds)
649: [10:56:36] <Pyfernk> They're just form fields. The question is more whether or not they'll work as expected within the CMS widget editor.
650: [10:56:45] <Pyfernk> but there's only one way to find out!
651: [10:56:48] <cupcake> yeh thats the same question i had Pyfernk
652: [10:56:53] <cupcake> yeh try it out right
653: [10:56:53] <cupcake> ?
654: [10:56:54] <cupcake> lol
655: [10:57:00] <Pyfernk> Yup :>
656: [10:57:12] <marvanni> 10 records with 5 hasOne properties needed = 1 query instead of 51….
657: [10:57:21] <Pyfernk> nice marvanni, very nice.
658: [10:58:09] <Pyfernk> Turn it into an extension for DataList (personally I'd name the function 'include' and accept either null (default to all) or an array of has_one relation names to include)
659: [10:58:15] <Pyfernk> then share it :>
660: [10:58:41] <Pyfernk> and/or just submit a PR against core :>
661: [10:59:57] <marvanni> Yeah, it should be core I think.. will test it further and try to add it so, all other chained methods will still work
662: [11:00:14] * zlinux has joined #silverstripe
663: [11:01:30] <marvanni> and maybe also $list->withFirstFoundHasOrManyManyItemBasedOnSort(‘MyManyManyRelationName’)
664: [11:02:04] <marvanni> but thats a little tricky i’m afraid…
665: [11:02:06] * mobiusnz quit (Ping timeout: 248 seconds)
666: [11:03:19] * Error404NotFound quit (Quit: User guilty of hitting the Big Red X...)
667: [11:05:08] * mobiusnz has joined #silverstripe
668: [11:05:10] * Colin[pi] has joined #silverstripe
669: [11:09:23] * Colin[pi] quit (Ping timeout: 246 seconds)
670: [11:17:27] <Pyfernk> marvanni: don't forget to return a NEW datalist & dataquery - they are immutable.
671: [11:17:32] <Pyfernk> clone if need be.
672: [11:17:37] * Audlex has joined #silverstripe
673: [11:18:27] * swaiba quit (Remote host closed the connection)
674: [11:18:56] <marvanni> Im not sure if you can return a DataList after that query assembling…
675: [11:27:47] * cloph quit (Ping timeout: 252 seconds)
676: [11:28:59] * Arunas has joined #silverstripe
677: [11:29:14] <Arunas> morning
678: [11:29:28] <darjus01> day
679: [11:29:40] <darjus01> Arunas: day
680: [11:35:06] * cloph_away has joined #silverstripe
681: [11:35:15] * cloph_away is now known as cloph
682: [11:39:02] * zlinux quit (Ping timeout: 250 seconds)
683: [11:47:24] * adrexia quit (Quit: Textual IRC Client: www.textualapp.com)
684: [11:49:09] * mobiusnz quit (Quit: Leaving.)
685: [11:49:41] * mobiusnz has joined #silverstripe
686: [11:51:32] * swaiba has joined #silverstripe
687: [11:59:00] * Hailwood has joined #silverstripe
688: [12:10:57] * jpbroadwater has joined #silverstripe
689: [12:11:06] <jpbroadwater> Hello
690: [12:11:42] <jpbroadwater> Can anyone here help with a pagination/sorting issue please?
691: [12:13:06] <Pyfernk> use PaginatedList. There's a tutorial on the docs
692: [12:13:19] * r_hector quit (Remote host closed the connection)
693: [12:13:27] * Hailwood quit (Remote host closed the connection)
694: [12:13:28] <jpbroadwater> Saw that and implemented it but problem still isn't solved
695: [12:13:52] <Pyfernk> you'll have to tell us what the problem is before we can help.
696: [12:13:55] <jpbroadwater> Sorting is taking place within each page (set of 10 articles displayed) but not across the whole paginated list
697: [12:14:17] <Pyfernk> sort the list BEFORE creating the paginated list.
698: [12:14:20] <jpbroadwater> OK
699: [12:14:34] <jpbroadwater> Can I check I'm doing that right... can I paste some code here?
700: [12:15:16] <jpbroadwater> So in /public_html/cms/code/search/ContentControllerSearchExtension.php I've got the following
701: [12:15:27] <jpbroadwater> public function results($data, $form, $request) { $data = array( 'Results' => $form->getResults(), 'Query' => $form->getSearchQuery(), 'Title' => _t('SearchForm.SearchResults', 'Search Results') ); return $this->owner->customise($data)->renderWith(array('Page_results', 'Page')); }
702: [12:15:57] * UndefinedOffset has joined #silverstripe
703: [12:15:58] <Pyfernk> no, paste code on a paste site then give the link.
704: [12:16:53] <jpbroadwater> can you recommend a paste site please
705: [12:18:38] <jpbroadwater> Try this: http://paste.ofcode.org/DmPEdFmwJN6mvjatrHsDuN
706: [12:19:20] <jpbroadwater> Not sure if you're still there :)
707: [12:20:04] <jpbroadwater> @pyfernk
708: [12:21:19] <jpbroadwater> OK, can anyone help with this issue please?
709: [12:21:31] * lerni_ has joined #silverstripe
710: [12:22:07] <Pyfernk> going for lunch, back later
711: [12:22:20] <jpbroadwater> Thanks very much
712: [12:22:38] <Pyfernk> but you've made neither a paginated list, nor I think understood form actions.
713: [12:23:12] <Pyfernk> http://www.silverstripe.org/learn/lessons/lists-and-pagination
714: [12:23:18] <Pyfernk> read that while I'm gone
715: [12:23:59] <jpbroadwater> Haven't given you everything, not sure what parts you needed
716: [12:24:00] <jpbroadwater> Here's the form
717: [12:24:01] <jpbroadwater> http://paste.ofcode.org/T2wpJBEasS7MAbr9ZsEJ89
718: [12:24:37] <jpbroadwater> OK thank you
719: [12:30:22] <NETim> Anyone know of a way to add sort ordering (preferably drag and drop) of composite field lists?
720: [12:31:07] * arnhoe quit ()
721: [12:39:22] * arnhoe has joined #silverstripe
722: [12:47:15] <marvanni> Something I still don’t understand : How is it that $list = MyDO::get(); gives an object. but foreach($list as $item) gives the result of the query… where does that magic happens?
723: [12:48:29] <swaiba> marvanni i belive it in "->toArray()"
724: [12:48:58] <swaiba> NETim - GridFieldOrderableRows - https://github.com/silverstripe-australia/silverstripe-gridfieldextensions
725: [12:49:57] <jpbroadwater> When paginating the results of the search (page_results.ss) do I follow the same pagination tutorial in the docs, please? Or is it different
726: [12:50:11] <marvanni> But ->toArray is never called when doing a foreach() ?
727: [12:51:02] <Pyfernk> marvanni: swaiba nah it implements the iterable interface (a php native)
728: [12:51:21] <marvanni> ah yes, I see it now…
729: [12:51:30] <swaiba> Pyfernk marvanni - that was my second gues :)
730: [12:51:32] <jpbroadwater> Welcome back Pyfernk, hope lunch was nice ;)
731: [12:51:44] <Pyfernk> just got it, devouring now
732: [12:52:12] <marvanni> yep there is it :) query->execute();
733: [12:53:57] <jpbroadwater> My issue is that there isn't a .php corresponding to the page_results.ss so I don't know where to create the method in the controller
734: [12:54:16] <jpbroadwater> As I say this is to paginate the search results (page_results.ss) not just the blog
735: [12:54:41] <Pyfernk> page.php
736: [12:54:55] <Pyfernk> Class_method.ss
737: [12:55:37] <jpbroadwater> Oh OK, trying that, give me a min
738: [13:00:53] * frostfire_ quit (Ping timeout: 264 seconds)
739: [13:03:53] <NETim> swaiba: thanks. Bit messy by default, but I'm sure I'll be able to sort that.
740: [13:08:24] <jpbroadwater> sighs
741: [13:08:59] <jpbroadwater> Now it seems the search is just looking for the total number of pages, not the search result
742: [13:09:56] <ss-helper> CanView effect on DataExtension - Silverstripe 3.1.12 - http://stackoverflow.com/questions/31185452/canview-effect-on-dataextension-silverstripe-3-1-12
743: [13:13:45] <jpbroadwater> Slowly getting somewhere I think... now can see the search results... :)
744: [13:14:20] <jpbroadwater> @Pyfernk how do I modify the method in the controller to sort the list please
745: [13:16:16] <jpbroadwater> Pyfernk
746: [13:17:09] <jpbroadwater> Is it just $list = Page::get()->sort('Date','DESC');
747: [13:17:56] <jpbroadwater> Anyone please?
748: [13:18:15] <jpbroadwater> Am trying to sort the paginated list and am not sure how to modify the method
749: [13:22:05] <Pyfernk> yes.
750: [13:22:29] <Pyfernk> PaginatedList::create(Page::get()->filter(searchterms)->sort())
751: [13:22:36] <Pyfernk> PaginatedList::create(Page::get()->filter(searchterms)->sort(), $request)
752: [13:22:37] <Pyfernk> iirc
753: [13:23:39] <marvanni> need to do some tests and more complex queries, but this looks nice http://sspaste.com/paste/show/55953b2ee87f5
754: [13:23:42] <jpbroadwater> Can I paste another snippet at you please
755: [13:23:57] <Pyfernk> nothing stopping you :>
756: [13:24:11] <jpbroadwater> Thanks mate
757: [13:24:14] <jpbroadwater> At the moment I have this
758: [13:24:15] <jpbroadwater> http://www.sspaste.com/paste/show/55953b716869b
759: [13:24:27] <jpbroadwater> Where do I add your bit please: PaginatedList::create(Page::get()->filter(searchterms)->sort(), $request)
760: [13:25:47] <marvanni> $list = WithDataList::create('Vacancy')->with(array('Country','Region','Sector','Education','Consultant'));
761: [13:26:19] <marvanni> $object->Country->Title, etc in 1 query
762: [13:28:36] <jpbroadwater> Um.. Pyfernk? :) pleaseee help am tearing my hair out :)
763: [13:29:54] <kinglozzer> jpbroadwater: Just add the sort to the end of your $list = Page::get();
764: [13:30:14] <kinglozzer> Like you said, $list = Page::get()->sort('Date','DESC');
765: [13:30:44] <Pyfernk> marvanni: yeh, seems cool, only I dislike 'with' (no particular reason, just prefer 'include'). But if the method accepted no params (ie, with($things=null)) and include ALL the has_ones ($obj->has_one() returns a list of all of them I think)
766: [13:31:13] <Pyfernk> just because lazy folks be lazy (like me :P)
767: [13:31:55] <marvanni> yea, thats a good idea. I cam up with ‘with’ since Laraval calls it this way..
768: [13:32:18] <Pyfernk> marvanni: yaeh I know, that's probably actually the main reason I dislike it :P
769: [13:32:24] <marvanni> I really wonder what happens with a Inherited DataObject…. I think it will break then…
770: [13:32:38] <marvanni> Laravel is cool :)
771: [13:32:42] <Pyfernk> :<
772: [13:32:52] <Pyfernk> Silverstripe is cool!
773: [13:32:59] <marvanni> also
774: [13:33:10] <marvanni> but for different usecases
775: [13:34:30] <Pyfernk> Yeah I can understand that.
776: [13:34:58] <jpbroadwater> Nope, results in Parse error: syntax error, unexpected T_RETURN in /public_html/mysite/code/Page.php on line 36
777: [13:35:10] <Pyfernk> you forgot to semicolon.
778: [13:35:26] <Pyfernk> are you not a developer jpbroadwater?
779: [13:35:44] <Pyfernk> if you indicate your skill level to us we can explain more or less in depth :)
780: [13:36:00] <jpbroadwater> I entered exactly as written $list = Page::get()->sort('Date','DESC');
781: [13:36:47] <jpbroadwater> semicolons there afaics :)
782: [13:38:25] <jpbroadwater> Ah, silly mistake on another line, have removed that, and page loads now but items still not in a list
783: [13:38:33] <jpbroadwater> Is there anything else you can suggest please
784: [13:38:42] <jpbroadwater> sort order appears random
785: [13:44:36] <Pyfernk> how many appear?
786: [13:46:13] <jpbroadwater> 10
787: [13:46:26] <jpbroadwater> but there doesn't seem to be any connection with date... in any order at all
788: [13:46:32] <kinglozzer> jpbroadwater: Do you definitely have a "Date" field you defined in Page.php?
789: [13:46:34] <jpbroadwater> just random sequence
790: [13:48:31] <jpbroadwater> kinglozzer i see what you're saying but the date field is in ArticlePage.php where the search is supposed to be getting results from
791: [13:48:50] <kinglozzer> jpbroadwater: Then you shouldn't be doing Page::get()
792: [13:48:56] <kinglozzer> That will get *all* pages, not just ArticlePages
793: [13:49:08] <kinglozzer> ArticlePage::get()->sort('Date', 'DESC')
794: [13:49:38] <jpbroadwater> ahhhhhhh
795: [13:49:48] <Pyfernk> :)
796: [13:50:11] <jpbroadwater> Nope, still hasn't helped
797: [13:50:28] <jpbroadwater> Hasn't made any difference actually :(
798: [13:53:04] <Pyfernk> return PaginatedList::(ArticlePage::get()->sort('Date','desc'), $this->request);//yeah?
799: [13:53:05] <jpbroadwater> My method in page.php is http://www.sspaste.com/paste/show/5595420442e6b
800: [13:53:11] <jpbroadwater> And my page_results.ss is now: http://www.sspaste.com/paste/show/55954231840be
801: [13:53:49] <Pyfernk> ...
802: [13:53:59] <Pyfernk> what does your Results method look like.
803: [13:54:01] <guci0> Is bug with 3.2 – when press enter for "Link Existing". Style lost, js – won't work.
804: [13:54:15] <Pyfernk> guci0: huh?
805: [13:54:25] <Pyfernk> in cms? TinyMCE?
806: [13:54:49] <guci0> after click via mouse too – sometimes.
807: [13:55:05] <Pyfernk> guci0: what comes back in console?
808: [13:55:06] <guci0> No in GridField with relations
809: [13:55:26] <jpbroadwater> Sorry Pyfernk, which bit please? Didn't I get the link above?
810: [13:55:57] <Pyfernk> ... just paste your entire Page.php
811: [13:56:33] <jpbroadwater> http://www.sspaste.com/paste/show/5595430971818
812: [13:56:36] <Pyfernk> I think
813: [13:56:37] <Pyfernk> You're returning paginated list from a function, then you're rendering search results - the two have nothing to do with each other :<
814: [13:56:46] <jpbroadwater> Ah
815: [13:57:07] <Pyfernk> so are you trying to get search results?
816: [13:57:11] <jpbroadwater> When I used PaginatedPages instead of Results the page_results.ss just threw errors
817: [13:57:15] <Pyfernk> or are you trying to just list a paginated list of all articles?
818: [13:57:22] <jpbroadwater> Yes trying to get rsearch results
819: [13:57:38] <Pyfernk> so this works by default after you enable the search, no?
820: [13:58:16] <jpbroadwater> Yes
821: [13:58:39] <Pyfernk> so, ... what's wrong?
822: [13:58:45] <jpbroadwater> Search is already enabled on the site, so I just want users to be able to search and get a paginated list of search results, all sorted in date desc order
823: [13:58:58] <jpbroadwater> All the search results come from articlepage's
824: [14:00:06] * toddvalentine has joined #silverstripe
825: [14:00:15] <Pyfernk> jpbroadwater: how are you doing this search?
826: [14:01:00] * toddvalentine quit (Client Quit)
827: [14:01:04] <guci0> Pyfernk: now I cannot broke this :( Testing
828: [14:01:07] <jpbroadwater> through the ss search facility which you can enable in the config
829: [14:01:32] <Pyfernk> so mysite/_config.php: FulltextSearch::enable(); ?
830: [14:01:45] <jpbroadwater> Yes
831: [14:01:55] <Pyfernk> that searches all pages, and files.
832: [14:02:01] <Pyfernk> not just articlepages
833: [14:02:18] <jpbroadwater> OK well I guess that isn't a problem
834: [14:02:48] <kinglozzer> guci0: That's not happening for me
835: [14:02:50] <kinglozzer> It's working fine
836: [14:02:51] <jpbroadwater> So are you saying that the problem is that not all my pages have date fields?
837: [14:03:00] <Pyfernk> Yes.
838: [14:03:13] <guci0> Good to know ;)
839: [14:03:14] <Pyfernk> and that you're quite confused about how all this works I think.
840: [14:03:30] <jpbroadwater> I see
841: [14:03:39] <jpbroadwater> Yes, I am
842: [14:04:02] <Pyfernk> well, by making that call in _config.php, all things are handled for you.
843: [14:04:05] <jpbroadwater> So basically the search in ss can't do what I want it to do
844: [14:04:15] <Pyfernk> It provides basic (shit) search funcationality, and isn't very flexible.
845: [14:04:20] <Pyfernk> however it suits most needs.
846: [14:04:27] <jpbroadwater> it isn't being handled, as I want the results to be sorted by date
847: [14:04:38] <jpbroadwater> I understand
848: [14:04:48] <Pyfernk> (the shit bit can't be rectified, it relies on database's search faciliyt, and default (MySQL) is VERY bad at it).
849: [14:04:56] <jpbroadwater> is there an alternative search code I can use instead which would do what I want please
850: [14:05:05] <jpbroadwater> I'm with you now
851: [14:05:45] <Pyfernk> well not easily. If all pages aren't a problem, then this is easily adaptable.
852: [14:06:01] <guci0>
853: [14:06:07] * sminnee has left #silverstripe
854: [14:06:07] <Pyfernk> but again all pages need date, otherwise the field cannot be used.
855: [14:06:14] * sminnee has joined #silverstripe
856: [14:06:25] <Pyfernk> afternoon sminnee :)
857: [14:07:12] <Pyfernk> but by default jpbroadwater - the search ALREADY returns a paged list.
858: [14:07:19] <Pyfernk> should do from what I see at least.
859: [14:07:23] <jpbroadwater> CAn I resolve this by simply adding date field to other page types... even if nothing is in the field, will that solve the problem?
860: [14:07:23] <guci0> It's depends a Lang – Error: cannot call methods on button prior to initialization; attempted to call method 'option'
861: [14:08:05] <Pyfernk> jpbroadwater: I think it's much easier to just build your own search.
862: [14:08:15] <Pyfernk> the default one is... not so flexible.
863: [14:10:08] * ss-helper quit (Remote host closed the connection)
864: [14:10:14] * Shrike_Finland quit (Quit: Leaving.)
865: [14:10:21] * ss-helper has joined #silverstripe
866: [14:11:12] <Pyfernk> jpbroadwater: return PaginatedList::create(ArticlePage::get()->sort('Date', 'desc'), $this->request);
867: [14:11:47] <Pyfernk> jpbroadwater: from your PagedArticles or whatever it was, just change the template to reference $PagedArticles instead of $Results
868: [14:11:52] <Pyfernk> see if that works.
869: [14:12:02] <Pyfernk> It won't search, but you should be able to see if it works.
870: [14:12:19] <Pyfernk> (pages and sorts)
871: [14:13:05] * darjus01 quit (Read error: Connection reset by peer)
872: [14:13:50] <jpbroadwater> OK many thanks Pyfernk
873: [14:13:54] <jpbroadwater> Appreciate your time and help
874: [14:14:11] <jpbroadwater> Thanks kinglozzer too
875: [14:14:13] <jpbroadwater> Bye all
876: [14:14:21] <Pyfernk> bye, good luck
877: [14:18:36] * jpbroadwater quit (Ping timeout: 246 seconds)
878: [14:19:01] <Zauberfisch> Pyfernk:
879: [14:19:43] <Zauberfisch> do you have a plugin for your irc client that pickes names for you? or do you change that by hand every day?
880: [14:20:23] * swaiba quit (Remote host closed the connection)
881: [14:25:03] * frostfire_ has joined #silverstripe
882: [14:25:26] <Pyfernk> Zauberfisch: hand.
883: [14:25:31] <Pyfernk> I'm using webchat
884: [14:25:40] <Pyfernk> thus it's often the captcha of the day.
885: [14:25:52] <Pyfernk> but Py<numbers>k was becoming silly
886: [14:26:13] <Pyfernk> well, boring.
887: [14:41:43] <guci0> :)
888: [14:52:06] * Mike123 quit (Quit: Page closed)
889: [14:54:47] * EasyCo quit (Quit: Connection closed for inactivity)
890: [14:55:33] <Zauberfisch> Pyfernk: haha
891: [14:55:47] <Zauberfisch> Pyfernk: ok, so you at least have the captcha as your generator
892: [14:56:09] <Zauberfisch> also
893: [14:56:11] <Pyfernk> Zauberfisch: sometimes, yeah
894: [14:56:14] <Zauberfisch> webchat? :O
895: [14:56:40] <Pyfernk> sometimes it's on what I feel like, or smoething that's happened, or the kind of work I've got to do (eg PyStoredProceeduresk)
896: [14:56:57] <Pyfernk> and yeah, webchat. At work, behind proxy & firewall.
897: [14:57:15] <Pyfernk> so https://webchat.freenode.net
898: [14:57:18] <Zauberfisch> ssh to remote and use irssi?
899: [14:57:27] <Pyfernk> then I'd need port 22 to be open.
900: [14:57:32] <Zauberfisch> lol woot?
901: [14:57:35] <Pyfernk> or tunnel out over 80
902: [14:57:40] <Zauberfisch> a tech company that doesn't let you use ssh?
903: [14:57:51] <Pyfernk> not a tech company. A car sales company.
904: [14:57:59] <Zauberfisch> oh, one of those fun places where all you have is a weird http man in the middle proxy?
905: [14:58:06] <Pyfernk> Yup, basically.
906: [14:58:12] <kinglozzer> Pyfernk: Do they block Facebook too?
907: [14:58:13] <kinglozzer> :P
908: [14:58:18] <Pyfernk> Thus don't want to auth to freenode (which isn't exactly secure at the best of times)
909: [14:58:33] <Zauberfisch> Pyfernk: well, just tunnle through http then
910: [14:58:42] <Pyfernk> so started with bogus names before I found that webchat.freenode does https (irc.silverstripe.org doesn't)
911: [14:58:53] <Pyfernk> but now it's more an indication that I'm at work (use normal names at home)
912: [14:59:12] <Pyfernk> Zauberfisch: yeah but tunnelling would mean that I have a remote ;)
913: [14:59:24] <Zauberfisch> who doesn't have a remote?
914: [14:59:28] <Pyfernk> and I cannot be bothered setting up my raspberry pi for that.
915: [14:59:30] <Pyfernk> well, me :<
916: [14:59:30] <kinglozzer> me
917: [14:59:31] <kinglozzer> :P
918: [14:59:36] <Zauberfisch> nabs
919: [14:59:37] <Pyfernk> I don't get paid enough for remotes.
920: [14:59:43] <Pyfernk> lulz
921: [14:59:51] <kinglozzer> I'm just too lazy
922: [14:59:58] <Pyfernk> We can't all have a very sweet hackerspace :D
923: [15:00:05] <Zauberfisch> :)
924: [15:00:06] * Error404NotFound has joined #silverstripe
925: [15:00:16] <Zauberfisch> though my boxes are all hosted at hosting companies
926: [15:00:19] <Zauberfisch> I rent them myself
927: [15:01:13] <kinglozzer> Zauberfisch: What else do you use it for then?
928: [15:01:15] <Zauberfisch> Pyfernk: there is a company that hosts raspberries for you
929: [15:02:04] <Zauberfisch> kinglozzer: (dedicated) managed server(s) for clients, dedicated "root" and v server for dev/testing/fun
930: [15:02:29] <Zauberfisch> and irc is actually currently hosted on a raspberry at that company I mentioned
931: [15:02:50] <Zauberfisch> http://raspberrycolocation.com/
932: [15:03:21] <Zauberfisch> they either buy a new pi for you, or you send yours in and they put it up
933: [15:03:49] <Zauberfisch> oh, they don-'t order them for you anymore, you have to send in your own
934: [15:05:04] <kinglozzer> Heh, cool!
935: [15:05:18] * cloph quit (Ping timeout: 248 seconds)
936: [15:06:54] <Pyfernk> Zauberfisch: oh?
937: [15:06:56] <Pyfernk> hmm
938: [15:07:18] <Pyfernk> I have a pi. I'd just need to punch a hole in my home router.
939: [15:07:25] <Pyfernk> but... also set it up.
940: [15:07:44] <Pyfernk> I'm not so much fussed, just for IRC at work :P
941: [15:11:11] * PenguinMan98 has joined #silverstripe
942: [15:19:11] <hamror> hey guys
943: [15:19:49] <hamror> any idea why $BaseTag in my theme doesn't seem to be producing a base tag on my Security/login page
944: [15:20:11] <Pyfernk> because it's <% base_tag %>
945: [15:20:14] <hamror> oh hurr, doesn't look like it's doing it anywhere - my bad
946: [15:20:30] <Pyfernk> or maybe you're after $BaseHref
947: [15:20:42] <hamror> wonder where $BaseTag came from in the first place
948: [15:20:51] <hamror> (this is a template from another project)
949: [15:21:26] <Pyfernk> migth hav ebeen someone who didn't know about BaseHref
950: [15:21:31] <Pyfernk> and made their own function
951: [15:21:33] <Pyfernk> to return it.
952: [15:21:34] <hamror> ahh a cloudflare specific base tag controller in the old project
953: [15:21:40] <Pyfernk> on Controller
954: [15:21:46] <Pyfernk> mmhmm
955: [15:21:58] <hamror> thanks man
956: [15:22:50] <hamror> another question
957: [15:23:01] <Pyfernk> Zauberfisch: hmm, this pi business seems really cool. Kinda like a container solution (eg CoreOS) but with actual whole systems :P
958: [15:23:57] <hamror> i've made a member extension to add a belongs_many_many to a particular dataobject since each member can manage only their specific do's
959: [15:24:20] <hamror> in this case it's Project, I was wondering if this should be done with some kind of security policy rather than just a straight DO relationship
960: [15:24:29] * marvanni quit (Read error: Connection reset by peer)
961: [15:24:55] <Pyfernk> hamror: well has_many would do it better probably.
962: [15:25:06] * marvanni has joined #silverstripe
963: [15:25:08] <Pyfernk> if they're all specific to a single member
964: [15:25:26] <hamror> that side of it's fine
965: [15:25:32] <Pyfernk> then you can just check the has_one in canview/edit/delete
966: [15:25:35] <hamror> the main question is when should i use a security policy
967: [15:25:41] <Pyfernk> yes.
968: [15:25:48] <Pyfernk> can't hurt.
969: [15:26:21] <hamror> later i'm going to have to differentiate members that have access to the same project by their role of editor or approver
970: [15:26:25] <Pyfernk> And sures things up if eg. requirements expand to where vulns could be introduced
971: [15:26:29] <hamror> i guess that's where i'd have a security policy around it
972: [15:27:11] <hamror> right now i'm just building a proof of concept so i'm trying to keep it simple but understand the consiquence of my choices
973: [15:27:43] <Pyfernk> mm. Put //TODO:
974: [15:27:50] <hamror> yeah i do that religiously
975: [15:27:58] <hamror> so i can grep it later or get a quickfix of it
976: [15:28:16] <Pyfernk> I believe there are editors out there that track TODO comments.
977: [15:28:20] <Pyfernk> too
978: [15:28:22] <hamror> yeah most of them
979: [15:28:30] * Pyfernk wouldn't know
980: [15:28:34] <hamror> i have a script in vim that gives me a quickfix window for it
981: [15:29:19] * Alboes has joined #silverstripe
982: [15:30:31] <Alboes> hi. How can I get the content and title of a page (by urlsegment) in a dataobject?
983: [15:34:18] * arnhoe quit ()
984: [15:35:45] <Zauberfisch> Pyfernk: there is also: http://www.online.net/en
985: [15:36:15] <Zauberfisch> Pyfernk: which is like digital ocean/aws cloud but on real hardware
986: [15:37:12] <Pyfernk> heh, wow.
987: [15:37:15] <Pyfernk> cheap for bare metal!
988: [15:37:22] <Zauberfisch> (the cloud thing)
989: [15:37:27] <Zauberfisch> https://www.scaleway.com/
990: [15:39:21] <Zauberfisch> 9.9 is not super cheap for what you get, but its ok. and I like the idea
991: [15:39:28] <Pyfernk> mm.
992: [15:39:44] <Pyfernk> To be fair I'm probably more happy with proper metal abstract clustered cloud.
993: [15:40:03] <Pyfernk> ie, proper cloud, not 'cloud' as in 'connected to the internet'.
994: [15:40:17] <Pyfernk> (pet peeve how people misuse the cloud term these days)
995: [15:41:45] <Zauberfisch> I have not used clouds (as in digital ocean and co) that much really
996: [15:42:03] * cloph_away has joined #silverstripe
997: [15:42:13] <Zauberfisch> I have alaways used webhosting and now managed server for simple web stuff
998: [15:42:25] <Zauberfisch> and for VMs I have dedicated hardware running my own VMs
999: [15:43:02] <PenguinMan98> Should I have the reasonable expectation that the parsing of the .ss file starts at the top and works its way down?
1000: [15:43:04] <Pyfernk> Yeah, I've not used them either tbh.
1001: [15:43:22] <PenguinMan98> Or could it go in whatever order the parser deems?
1002: [15:43:31] <Pyfernk> PenguinMan98: you should have the reasonable expectation that you shouldn't care.
1003: [15:43:37] <Pyfernk> shouldn't have to*
1004: [15:43:42] <Pyfernk> care.
1005: [15:43:46] <Zauberfisch> PenguinMan98: well, yes. but ...
1006: [15:43:54] <Zauberfisch> it does some caching and stuff
1007: [15:43:59] <PenguinMan98> Pyfernk, i understand, but it's become important to troubleshoot stuff
1008: [15:44:00] <Pyfernk> what kind of pickle have you gotten into today?
1009: [15:44:06] <Zauberfisch> so you can not count on methods being called in a specifc order
1010: [15:44:16] <Zauberfisch> because the cache might have cached one thing but not the other
1011: [15:44:19] <Pyfernk> PenguinMan98: if it has become important, you've probably done something extremely... wrong.
1012: [15:44:31] <Zauberfisch> and yeah, what Pyfernk just said
1013: [15:44:36] <PenguinMan98> be that as it may...
1014: [15:45:08] <kinglozzer> PenguinMan98: the parser parses them out to PHP files and saves them in a temp directory somewhere. They then run from top to bottom like normal PHP code
1015: [15:45:35] <kinglozzer> If you look at the parsed templates, it's all just PHP
1016: [15:45:50] * cloph_away is now known as cloph
1017: [15:45:51] <PenguinMan98> I'm using <% if $getAPIQuery(someVar) %> in multiple places in my file. I have an output in the php to tell me when the function gets called. It seems to work fine for the first two of these, then dies completely and wrecks the page parsing.
1018: [15:45:52] <Pyfernk> if you explain why it's important, perhaps we can suggest how we might approach the problem
1019: [15:46:25] <Pyfernk> well, this is why I hate that param passing was added to the template lang
1020: [15:46:26] * lerni_ quit ()
1021: [15:46:31] <Pyfernk> the abuse is just too easy
1022: [15:46:38] <PenguinMan98> Even though the parameter is exactly the same
1023: [15:46:46] <PenguinMan98> ergo, it should do the same thing
1024: [15:46:57] <Pyfernk> ergo, no.
1025: [15:47:17] <Zauberfisch> no, if its the same parameter being passed, it's probably cached
1026: [15:47:22] <Pyfernk> you've probably shifted scope or somethign
1027: [15:47:30] <Zauberfisch> or that
1028: [15:47:42] <Pyfernk> loop shifts both iterations AND scope.
1029: [15:47:43] <Zauberfisch> I actually grow to hate the template engine more and more
1030: [15:47:50] <Pyfernk> oh?
1031: [15:48:08] <Pyfernk> I only don't like that people complain, and so slowly more and more functional logic is added to it.
1032: [15:48:23] <Pyfernk> Soon we'll have + * / and - and people will be doing all kinds of nasty.
1033: [15:48:52] <Pyfernk> PenguinMan98: logic doesn't go in the view. Do as much as you can in the controller.
1034: [15:48:56] <Zauberfisch> Pyfernk: well, yeah, its good to stop people from putting logic in it, but I often need simple text operations or something, which I would like to do in template, but I have to create php methods for them
1035: [15:49:19] <PenguinMan98> The logic is done. I'm just asking the view to give me variables
1036: [15:49:31] <Pyfernk> Zauberfisch: in that case I'd either add them as extensions to StringField, or make some kind of global
1037: [15:49:52] <Pyfernk> PenguinMan98: no you're not, you're asking the view to call a function passing a variable in (ie, logic).
1038: [15:50:24] <PenguinMan98> Well in vanilla php I would just send an array to the template and then use the bits wherever I needed them
1039: [15:50:38] <PenguinMan98> but .SS doesn't quite work this way that I've been able to get working
1040: [15:50:40] <kinglozzer> PenguinMan98: Probable causes: your <% if $getAPIQuery() %> that's failing is in a loop or with, or you're passing a $Variable to it
1041: [15:50:41] * cloph is now known as cloph_away
1042: [15:50:43] <Pyfernk> yeah in vanilla PHP you'd just code PHP straight in amongst the HTML. IE, logic in a view.
1043: [15:51:02] <PenguinMan98> taking an element out of an array is hardly logic
1044: [15:51:03] <Zauberfisch> PenguinMan98: you can do that here aswell
1045: [15:51:13] <Pyfernk> PenguinMan98: no arrays in the templates.
1046: [15:51:16] <Zauberfisch> you can for example make 1 method per thing you want
1047: [15:51:20] <Pyfernk> so that's probably your issue.
1048: [15:51:25] <Zauberfisch> or you pass an ArrayData object
1049: [15:51:27] <Zauberfisch> like so:
1050: [15:51:29] <Pyfernk> ^
1051: [15:51:32] <PenguinMan98> Zauber: That's fine if you have a small number of things to get
1052: [15:51:43] <Pyfernk> PenguinMan98: I think you've made a mess again.
1053: [15:51:46] <PenguinMan98> Otherwise it seems to violate DRY
1054: [15:51:54] <Pyfernk> You really should view the tutorials
1055: [15:51:58] <kinglozzer> Why don't you just cast your query to ArrayData? Then to <% if $ApiQuery.ParameterName %>
1056: [15:52:01] <Zauberfisch> public function getAPIQuery() { return new ArrayData(['SomeItem' => ..., 'SomeOtherItem' => ...]); }
1057: [15:52:06] <kinglozzer> that ^^
1058: [15:52:09] <Pyfernk> indeed, that.
1059: [15:52:10] <kinglozzer> Thanks Zauberfisch
1060: [15:52:11] <kinglozzer> :P
1061: [15:52:12] <Zauberfisch> in templtae: what kinglozzer just did
1062: [15:52:19] <Pyfernk> there really isn't any DRY violation.
1063: [15:52:34] <Pyfernk> if anything you can view it as simply generating viewmodels.
1064: [15:53:11] <Zauberfisch> Pyfernk: but I most hate the template language for its bugs
1065: [15:53:34] <Zauberfisch> includes with parameters would be great, if they would work properly
1066: [15:53:50] <Pyfernk> haha, yeah that's true.
1067: [15:53:55] <kinglozzer> Zauberfisch: Eh? What's wrong with them? :(
1068: [15:53:59] <Pyfernk> I tend to shy off of includes for that reason :P
1069: [15:54:09] <Zauberfisch> <% include Foo=Bar %>
1070: [15:54:19] <Pyfernk> kinglozzer: if nothing, then the fact that they've been very flakey in the past destroying trust in their abilities
1071: [15:54:20] <Zauberfisch> $Foo == 'Bar'
1072: [15:54:36] <Zauberfisch> <% loop $SomeList %>$Foo also == 'Bar'<% end_loop %>
1073: [15:54:45] <kinglozzer> Ohh yeah that thing
1074: [15:54:48] <kinglozzer> Yeah that sucks
1075: [15:54:49] <kinglozzer> :P
1076: [15:54:52] <Pyfernk> haha
1077: [15:54:52] <Zauberfisch> yeah
1078: [15:55:05] <kinglozzer> And this https://github.com/silverstripe/silverstripe-framework/issues/4015
1079: [15:55:16] <Zauberfisch> yep
1080: [15:55:53] <Zauberfisch> and includes also break the list operations like $First, $Pos and so on. or at least they used to (not sure if that has already been fixed)
1081: [15:56:18] <Zauberfisch> and then there is the <% if %>
1082: [15:56:39] <Zauberfisch> I love that we can do || and &&, but it's still very limited
1083: [15:57:25] <PenguinMan98> I'm hearing lots of reasons not to trust SS
1084: [15:57:36] <PenguinMan98> It's discouraging
1085: [15:57:49] <Zauberfisch> like you can't do not and ||. or || and =>< operators I think
1086: [15:57:53] <Pyfernk> PenguinMan98: you already hate it, in no short manner to the CMS not being like workpress.
1087: [15:58:11] <Pyfernk> Zauberfisch: well, you can actually just plug another parser into it :>
1088: [15:58:13] <PenguinMan98> Pyfernk: That, my friend, is an assumption
1089: [15:58:20] <Zauberfisch> PenguinMan98: ss can really suck at times. but it sucks a lot less like all the other crap out there
1090: [15:58:27] <Pyfernk> PenguinMan98: not true. Was the first thing I ever saw you come at us with.
1091: [15:58:46] <Pyfernk> 'SS is shit becuase WP supports this'
1092: [15:58:53] <PenguinMan98> Pyfernk: No, I came at you with a problem of trying to add a wordpress feature to SS.
1093: [15:59:02] <Alboes> can I do: SiteTree::get()->filter('ParentID', 19); ?
1094: [15:59:08] <kinglozzer> Alboes: Yes
1095: [15:59:08] <Pyfernk> yes
1096: [15:59:09] <Zauberfisch> Alboes: yes
1097: [15:59:11] <kinglozzer> :P
1098: [15:59:15] <kinglozzer> hivemind
1099: [15:59:16] <Alboes> it works, nut it is also the right way?
1100: [15:59:17] <Pyfernk> all abord the yes train!
1101: [15:59:17] <PenguinMan98> I never said Wordpress was better or SS was shit. I just said I needed feature A from wordpress in SS.
1102: [15:59:20] <Zauberfisch> Pyfernk: no, I don't think its really plug&play yet
1103: [15:59:22] <Pyfernk> Alboes: yes :>
1104: [15:59:34] <Zauberfisch> afk
1105: [15:59:37] <Zauberfisch> later o/
1106: [15:59:59] <PenguinMan98> I've made some good progress on that front but I'm not done yet.
1107: [16:00:25] <Alboes> thanks
1108: [16:00:28] <kinglozzer> Fixd https://github.com/camspiers/silverstripe-twig
1109: [16:00:28] <Pyfernk> PenguinMan98: yeah but since then there has been a reasonable list of instances where you've been very frustrated and circumvented the framework in some convoluted way, then come in to ask classic examples of X=>Y problems
1110: [16:00:29] * Alboes quit (Remote host closed the connection)
1111: [16:00:56] <PenguinMan98> Pyfernk: Maybe so, but that's not a condemnation of anything but my own skills.
1112: [16:01:39] <PenguinMan98> Pyfernk: and asking: "How do I get data from the controller into the view" is hardly a X=>Y problem
1113: [16:02:46] <kinglozzer> PenguinMan98: The simple answer to that last question is: ArrayData and ArrayList
1114: [16:03:08] <kinglozzer> ArrayData for associative arrays, ArrayList for numeric
1115: [16:05:11] <Pyfernk> PenguinMan98: well not so much your skills, more it seems to the frantic pace at which you work, where you need answers before you can formulate understanding to generate a question :<
1116: [16:05:56] <PenguinMan98> I don't work fast enough...
1117: [16:08:17] <Pyfernk> PenguinMan98: mm. A bit of investment at the beginning leads to speed at the end :>
1118: [16:09:01] <Pyfernk> data is cast into lists or model type, I think.
1119: [16:09:41] <Pyfernk> strings become StringField subtypes, arrays become either ArrayList or ArrayData
1120: [16:09:46] <Pyfernk> objects to ArrayData, etc.
1121: [16:09:49] <Pyfernk> iirc
1122: [16:10:16] <Pyfernk> I've explained it recently, but perhaps not to you.
1123: [16:10:34] <Pyfernk> Anything that subclasses ViewableData doubles as a ViewModel.
1124: [16:11:47] <Pyfernk> this includes Controller, DataObject (and thus Page(_Controller)), SS_Lists (DataList, ArrayList), and ArrayData.
1125: [16:12:21] <PenguinMan98> I try to use my existing knowledge to springboard me into a new cms or project and every single time I fall on my stupid face and end up crawling back to the 'HelloWorld'
1126: [16:12:23] <Pyfernk> so to get something into a template, either create a property or a method to store or return the value
1127: [16:13:07] <Pyfernk> PenguinMan98: yeh, thus I'm saying just start at the bottom :>
1128: [16:13:50] <Pyfernk> Your core knowledge will still be of great use, but more in aiding your understanding of the basics rather than trying to keep afloat in the deep end.
1129: [16:14:14] <Pyfernk> ie, learn fast, don't flutter around going nowhere ;)
1130: [16:14:26] <PenguinMan98> I started a fresh silverstripe on my home computer last night and spent three hours going through the first 5 lessons in depth
1131: [16:14:33] <Pyfernk> cool :)
1132: [16:14:57] <PenguinMan98> My buddy has been using the written tutorials despite the deprecated notice on them
1133: [16:15:06] <Pyfernk> They're still relevant.
1134: [16:15:11] <Pyfernk> well... except the search one.
1135: [16:15:16] <PenguinMan98> He's been able to help me bridge the gaps in a few important ways
1136: [16:15:17] <Pyfernk> although it gives some concepts still.
1137: [16:15:32] * zlinux has joined #silverstripe
1138: [16:15:40] <Pyfernk> the core concepts are still the same for the most part.
1139: [16:15:55] <PenguinMan98> I only hope I can get this all before it's too late
1140: [16:16:06] <Pyfernk> you have models (dataobject), views (templates & ssviewer) and controllers (... Controller)
1141: [16:16:48] <Pyfernk> keep things segregated, things will be simplier
1142: [16:17:10] <PenguinMan98> I'm pretty solidly grounded in MVC. I teach it often enough.
1143: [16:17:12] <Pyfernk> the power of SS comes more in its form library & routing.
1144: [16:17:43] <Pyfernk> PenguinMan98: well, I don't know you or how skilled you are, but I've heard MANY a person say that in the past, then demonstrate a rudimentary understanding but not really 'getting it'
1145: [16:18:10] <Pyfernk> but the more knowledgable you are on that, the easier SS will be.
1146: [16:18:12] <PenguinMan98> heh. Trust me. I've had to fix some really weird ass projects.
1147: [16:18:24] <PenguinMan98> People with queries in the view and html in the model
1148: [16:18:30] <PenguinMan98> *shudder*
1149: [16:18:39] <Pyfernk> right, so perhaps the docs page on "Execution Pipeline" will be of great use to you.
1150: [16:18:50] <Pyfernk> to start with
1151: [16:18:56] <Pyfernk> then read Controller sections
1152: [16:18:58] <PenguinMan98> Sounds very interesting
1153: [16:19:49] <Pyfernk> that's the core entry and how shit happens.
1154: [16:20:13] <Pyfernk> basically web server re-writes the request, some basic setup happens, then Director::direct.
1155: [16:20:20] <PenguinMan98> Good. I like me a top-level understanding.
1156: [16:20:28] <Pyfernk> that matches URL to routes
1157: [16:20:44] <Pyfernk> then passes control to that implementation of RequestHandler (usually Controller)
1158: [16:20:57] <Pyfernk> (but could also be Form or FormField within)
1159: [16:21:31] <Pyfernk> so Controller looks at it's options/variables in route to decide which action to execute.
1160: [16:21:44] <Pyfernk> actions being basically public methods on the controller.
1161: [16:22:00] <Pyfernk> default is 'index' (not defined by default, but you can implement it)
1162: [16:22:56] <PenguinMan98> I rewrite the getAPIQuery as APIQuery which returns an arraylist. However, not all of the data elements I need on the page will always exist in that list. SS seems to choke and die if I ask for an element that doesnt' exist. Is there a way in SS to default it to a '' or do I have to write that myself?
1163: [16:22:57] <Pyfernk> so rewrite -> bootstrap -> director::direct, requesthandler::handlerequest, requesthandler::handleaction
1164: [16:23:36] <Pyfernk> which then goes backwards through ssviewer to generate output (usually)
1165: [16:23:50] <PenguinMan98> cool
1166: [16:23:58] <Pyfernk> so there are a couple of caveats with magic methods on things
1167: [16:24:11] <Pyfernk> getThing() can be called as $obj->Thing
1168: [16:24:24] <Pyfernk> (ie, automatic getter for unknown properties via __get())
1169: [16:24:41] <PenguinMan98> PHP recommends only using those for error handling
1170: [16:24:43] <Pyfernk> similar with __call() - this is how Extensions work (basically a type of 'mixin')
1171: [16:24:53] <PenguinMan98> since they are slow
1172: [16:25:04] <Pyfernk> well, it is what it is.
1173: [16:25:57] <Pyfernk> they don't come into it much, more when templates call things.
1174: [16:26:11] <Pyfernk> so getAPIQuery and APIQuery are equivalent from template perspective.
1175: [16:26:30] <Pyfernk> can be a little gotcha.
1176: [16:26:39] <kinglozzer> Pyfernk: Except for when you pass arguments
1177: [16:26:46] <kinglozzer> Because one of them doesn't work IIRC
1178: [16:26:47] <Pyfernk> true, then it's obviously a function.
1179: [16:27:05] <kinglozzer> http://docs.silverstripe.org/en/3.1/developer_guides/templates/rendering_templates/
1180: [16:27:09] <kinglozzer> lol
1181: [16:27:09] <Pyfernk> same in php kinglozzer, you can't call APIQuery()
1182: [16:27:10] <kinglozzer> wrong link
1183: [16:27:15] <kinglozzer> https://github.com/silverstripe/silverstripe-framework/issues/2505
1184: [16:27:27] <Pyfernk> must be as a property (that doesn't exist)
1185: [16:27:38] <kinglozzer> yup
1186: [16:27:43] <kinglozzer> HOME INNIT
1187: [16:27:44] <kinglozzer> ciao
1188: [16:27:46] * kinglozzer quit ()
1189: [16:29:11] <PenguinMan98> later
1190: [16:31:21] <Pyfernk> reet, home indeed.
1191: [16:31:26] <Pyfernk> maybe I can help you more from there
1192: [16:31:27] * Pyfernk quit ()
1193: [16:33:16] <PenguinMan98> ugh. troubleshooting by printing arraylists is a lot less fun than normal php arrays
1194: [16:37:24] * cloph_away is now known as cloph
1195: [16:42:20] <Zauberfisch> troubleshooting by printing anything is not fun
1196: [16:42:29] <Zauberfisch> use a debugger
1197: [16:42:46] <Zauberfisch> though, to be fair, in template you might actually need to print stuff to debug it
1198: [16:45:00] * darjus01 has joined #silverstripe
1199: [16:45:04] <PenguinMan98> Can you spot anything wrong with this: <% if $APIQuery.sortdir == 'asc' %>First->Last<% else_if %>Last->First<% end_if %>
1200: [16:45:15] <PenguinMan98> Assuming $APIQuery.sortdir resolves to a value
1201: [16:45:17] <darjus01> how to set up timezone in silverstripe?
1202: [16:46:03] <PenguinMan98> darjus01: Put one of these: http://php.net/manual/en/datetime.settimezone.php in the index.php?
1203: [16:46:25] <PenguinMan98> Setting it in the php.ini is better usually
1204: [16:47:21] <darjus01> I thought that SS has var or something because then swipestripe saves SS_date type its not like created
1205: [16:48:13] <darjus01> I go to security user acount edit and see what times that shows in format selection is diferent than in last login
1206: [16:48:19] <PenguinMan98> This <% if $APIQuery.sortdir == 'asc' %>First->Last<% else_if %>Last->First<% end_if %> is killing my template
1207: [16:51:08] <Zauberfisch> PenguinMan98: yes
1208: [16:51:14] <Zauberfisch> else_if expects a condition
1209: [16:51:20] <Zauberfisch> if you just want else, then use <% else %>
1210: [16:51:37] <Zauberfisch> <% else_if $isSupposeTo == 'look-like-this' %>
1211: [16:51:49] <PenguinMan98> oh derp
1212: [16:52:32] <Zauberfisch> darjus01: that stuff is just for admins to select what date format to displays date in the cms in. but even that is not working everywhere in the cms.
1213: [16:52:35] <PenguinMan98> thanks
1214: [16:52:40] <Zauberfisch> there is no real handling for that I think
1215: [16:53:36] <Zauberfisch> darjus01: as PenguinMan98 pointed out, you can set the datetime_zone as php ini configuration (using either php.ini, .htacces or ini_set())
1216: [16:54:29] <PenguinMan98> http://pastebin.com/a96JDjxM
1217: [16:54:39] <PenguinMan98> Line 77 is crashing the template
1218: [16:55:05] <PenguinMan98> Though I've made triple sure that $APIQuery.sortdir does have a value in it.
1219: [16:55:32] <Zauberfisch> PenguinMan98: <% %> is only for keyword operations like with, loop, include, cache, ...
1220: [16:55:43] <Zauberfisch> if you just want to output a variable, just put it in the template
1221: [16:55:49] <PenguinMan98> oh crap. that's the second time I've done that.
1222: [16:55:51] <Zauberfisch> sort dir: $APIQuery.sortdir
1223: [16:56:02] <Zauberfisch> or, if you need to encapsulate it:
1224: [16:56:13] <Zauberfisch> sort dir: {APIQuery.sortdir}some string afterwards
1225: [16:57:05] <PenguinMan98> Well now it doesn't crash but it doesn't show a value either
1226: [16:57:13] * PenguinMan98 slumps
1227: [16:59:44] <Zauberfisch> if no value is set, then it is always an empty string in the template
1228: [16:59:57] <Zauberfisch> PenguinMan98: try $APIQuery.debug
1229: [17:00:01] <Zauberfisch> or $APIQuery.Debug
1230: [17:03:30] <PenguinMan98> http://screencast.com/t/27q3NUNEB
1231: [17:03:42] <PenguinMan98> The value is there
1232: [17:11:03] <PenguinMan98> I'm not in a loop as you can see from my source
1233: [17:12:27] * GioVdK quit (Ping timeout: 252 seconds)
1234: [17:15:42] <PenguinMan98> but when I try to output $APIQuery.sortdir, it returns ''
1235: [17:16:45] <PenguinMan98> http://screencast.com/t/RH7vmaoTg
1236: [17:16:53] <marvanni> Those SiteTree queries are massive if you have some nested menus on a Page…
1237: [17:17:00] <darjus01> thx all
1238: [17:21:26] <PenguinMan98> Better view: http://screencast.com/t/vBsle14ji7
1239: [17:23:32] * Guits quit (Ping timeout: 246 seconds)
1240: [17:24:12] <Zauberfisch> PenguinMan98: is sort dir an int?
1241: [17:25:13] <PenguinMan98> no
1242: [17:31:28] <PenguinMan98> I can't get any satisfaction from templating languages. *sigh*
1243: [17:32:19] <PenguinMan98> Somebody told me the word for when you write a language to do what the other language was built to do therefore all you add is complexity and slowness.
1244: [17:32:34] <PenguinMan98> And PHP was built to be a templating language
1245: [17:33:19] <PenguinMan98> It's why SMARTY is floundering
1246: [17:33:52] <PenguinMan98> but even SMARTY lets you just break out and use PHP to get the job done if you get pissed off
1247: [17:35:15] <PenguinMan98> Here I don't have that option. Or if I do, I have no idea how.
1248: [17:35:33] <PenguinMan98> I hate being stuck
1249: [17:36:23] <marvanni> :) So 10 records with 10 has_one titles. in a template loop this results to 101 queries….
1250: [17:36:38] <marvanni> whit this its only 1 query : $list = WithDataList::create('JobAd')->limit(10)->with();
1251: [17:38:58] <PenguinMan98> I thought SS docs said it cached the queries and only executes them when you call for the data
1252: [17:41:47] * Pyrmnk has joined #silverstripe
1253: [17:41:57] <marvanni> <% loop $Posts(10) %> $Member.FirstName<% end_loop %> will query $Member for each Post….
1254: [17:43:01] <Pyrmnk> not that queries themselves are bad, but a saving is a saving! :)
1255: [17:44:23] <PenguinMan98> marvanni: Shouldn't you query the posts in the init and store the results in an arraylist that you give the template so you don't have to do any queries?
1256: [17:44:42] <marvanni> but unnecessary queries are, and I really have a situation where I need values from 10 has_ones on a page that displayes 10 records..
1257: [17:44:53] <Pyrmnk> init is wrong place for that
1258: [17:45:07] <PenguinMan98> How so?
1259: [17:45:46] <Pyrmnk> why run it every time when you might not use it?
1260: [17:45:46] <marvanni> and in a loop it will still query the has_one for each record with SELECT * FROM Member WHERE ID = $Blog.MemberID
1261: [17:46:24] <Pyrmnk> getter is best
1262: [17:46:31] <PenguinMan98> There are always cases when ORM's aren't the most efficient way to do things
1263: [17:46:44] <Pyrmnk> most cases really
1264: [17:47:19] <Pyrmnk> but we try to be as efficient as we can
1265: [17:47:36] <Pyrmnk> of course.
1266: [17:47:50] <marvanni> agree, but I found out, laravel as a with() method for the n+1 problem… SS should have one to… Did not tested it with inherited has_ones relations though
1267: [17:48:12] <PenguinMan98> abstracting the db has always felt really stupid to me. It's always done so that on the off chance you change database languages down the road, you dont' have to rewrite. But I've talked to hundreds of developers in hundreds of applications in hundreds of companies and nobody has EVER changed databases.
1268: [17:48:14] <marvanni> I think 101 to 1 is a pretty significant change
1269: [17:49:22] * Pyromanik has joined #silverstripe
1270: [17:49:23] * catcher has joined #silverstripe
1271: [17:49:27] <marvanni> agree with tath, but DO::get()->limit(10)->where(“Somewheres”); looks nicer then SELECT blah etc…
1272: [17:49:43] <Pyromanik> it has been suggested a number of times in the past marvanni
1273: [17:49:47] <PenguinMan98> Yeah, I can agree with that
1274: [17:49:51] <Pyromanik> but no one has ever gotten around to actually writing it.
1275: [17:49:56] <Pyromanik> now you have :)
1276: [17:50:02] <PenguinMan98> but the loss of control isn't worth the better syntax IMHO
1277: [17:50:08] <Pyromanik> as for ORMs, it's not for CHANGING databases per se.
1278: [17:50:12] <Pyromanik> although you could.
1279: [17:50:22] <PenguinMan98> ORM's aren't specifically for abstracting the db
1280: [17:50:26] <marvanni> I will test it for inherited do’s a well.. might write up a PR
1281: [17:50:34] <Pyromanik> more to provide a basic uniform way of querying info out of any particular database a project happens to be using.
1282: [17:50:56] <Pyromanik> so I don't have to be an expert in web scale, if I'm employed to work on an SS project.
1283: [17:51:17] <marvanni> and you don’t want this shit in your classes : SELECT DISTINCT "SiteTree_Live"."ClassName", "SiteTree_Live"."Created", "SiteTree_Live"."LastEdited", "SiteTree_Live"."URLSegment"
1284: [17:51:27] <Pyromanik> also for control, the ORM is built to solve a more simple problem.
1285: [17:51:48] <Pyromanik> ie, perform basic queries without fear of injection, etc.
1286: [17:51:51] <Pyromanik> and simply.
1287: [17:51:53] <Pyromanik> from within code.
1288: [17:52:18] <Pyromanik> so we have ORM. Beyond basic ORM, there is modifying the query object.
1289: [17:52:29] <Pyromanik> there is extending query object, or list.
1290: [17:52:42] <Pyromanik> and there is even DB::query()
1291: [17:52:58] <Pyromanik> It's not completely hidden, just not recommended.
1292: [17:53:35] <Pyromanik> One of course could always define stored proceedures and all sorts. But then you have a project stretching over more than a simple single domain.
1293: [17:53:40] <Pyromanik> in terms of logic.
1294: [17:53:57] <Pyromanik> Which is fine - it really depends on what your usecase is.
1295: [17:54:11] <Pyromanik> and your experience as a developer, in all things involved.
1296: [17:54:18] <Pyromanik> or your teams.
1297: [17:54:27] <Pyromanik> team's experience that is.
1298: [17:55:22] <Pyromanik> also PenguinMan98 there are not so many cases of changing database, sure. But there are quite a few where more than one data storage facility is utalised.
1299: [17:55:28] <Pyromanik> utilised*
1300: [17:55:47] <Pyromanik> so having a common way to pull info makes code more readable and maintainable.
1301: [17:55:53] <Pyromanik> :>
1302: [17:56:47] <Pyromanik> marvanni> agree with tath, but DO::get()->limit(10)->where(“Somewheres”); looks nicer then SELECT blah etc…
1303: [17:56:53] <Pyromanik> filter not where! :P
1304: [17:57:12] <marvanni> hm, I prefer where ;)
1305: [17:57:14] <Pyromanik> well, filter and exclude
1306: [17:57:18] <Pyromanik> yeah well...
1307: [17:57:50] <Pyromanik> then you're back to manual escapes and writing full SQL fragments in code strings ;)
1308: [17:57:56] <marvanni> DO::get->where(implode(“ AND ”, wheres));
1309: [17:57:59] <marvanni> ;)
1310: [18:00:25] <Pyromanik> That's the power of a flexible framework. More than one way to do things marvanni! (rather than trying to bend you to 'the one true way') :)
1311: [18:00:35] <Pyromanik> so long as you know what you're doing, then it's not so bad.
1312: [18:01:29] <Pyromanik> (to use where)
1313: [18:01:50] <marvanni> well, I like boundaries with best practices applied in general… so you also know where to look if someone else wrote the code you have to dig in
1314: [18:02:22] <marvanni> I have to admit that I never fully explored the filter method…..
1315: [18:02:35] <marvanni> coming from 2.x a long time ago…
1316: [18:03:29] <Pyromanik> ah, I see.
1317: [18:04:50] <Pyromanik> so anyway, did you solve your issue PenguinMan98?
1318: [18:10:24] * ss-helper quit (Remote host closed the connection)
1319: [18:10:40] * ss-helper has joined #silverstripe
1320: [18:14:35] <PenguinMan98> no
1321: [18:15:06] <PenguinMan98> http://screencast.com/t/vBsle14ji7
1322: [18:15:13] <PenguinMan98> This is still kicking my butt
1323: [18:18:10] <PenguinMan98> I feel like i'm running into every pothole I can possibly run into to get this working
1324: [18:20:08] <marvanni> have you tried {$APIQuery.sortdir}<br>
1325: [18:20:10] * Error404NotFound quit (Quit: User guilty of hitting the Big Red X...)
1326: [18:20:34] <PenguinMan98> that would be too easy
1327: [18:20:36] <PenguinMan98> hang on
1328: [18:22:12] <marvanni> nah, should’nt matter I see now…
1329: [18:22:26] <PenguinMan98> Yeah, no change
1330: [18:22:27] <marvanni> can you show the $APIQUERY class
1331: [18:22:36] <PenguinMan98> a what?
1332: [18:22:49] <PenguinMan98> oh
1333: [18:22:51] <PenguinMan98> sec
1334: [18:23:46] <PenguinMan98> http://pastebin.com/7Gd0jehD
1335: [18:23:55] <PenguinMan98> This is the FlightSearchResult.php
1336: [18:24:25] <PenguinMan98> APIQuery is defined around lien 135
1337: [18:27:38] <marvanni> Im not sure but would this not be enough return new ArrayData($this->apiQuery);
1338: [18:27:58] <PenguinMan98> What's the difference?
1339: [18:28:35] <marvanni> you are now creating an ArrayList with 1 ArrayData for each key value pair…
1340: [18:28:55] <PenguinMan98> aaaaaaand, that's bad?
1341: [18:29:07] <marvanni> well it does not work right?
1342: [18:29:15] <PenguinMan98> the debug works
1343: [18:29:21] <PenguinMan98> *sheepish grin*
1344: [18:29:38] <marvanni> true…
1345: [18:29:38] <PenguinMan98> It's how I did it for all the pulldowns
1346: [18:29:47] <PenguinMan98> those work fine
1347: [18:31:12] <PenguinMan98> huh
1348: [18:31:16] <PenguinMan98> doing it your way fixed tings
1349: [18:31:27] <marvanni> ahh… are you sure $this->apiQuery['sortdir'] is empty? what happens if you remove that check
1350: [18:31:45] <marvanni> doing my things alway fix things…
1351: [18:31:47] <PenguinMan98> The check only fills it if it is empty
1352: [18:31:48] <marvanni> s
1353: [18:31:59] <Pyromanik> PenguinMan98, oh, if you're using arraylist instead of array data, yeah you'll have issues.
1354: [18:32:17] <Pyromanik> that's like going $classinstance[0]
1355: [18:32:17] <PenguinMan98> I was under the impression that an ArrayList was supposed to be an array of ArrayData objects
1356: [18:32:34] <Pyromanik> yeah, but it depends on how you access it.
1357: [18:32:40] <Pyromanik> from what I saw you were not in a loop.
1358: [18:32:47] <PenguinMan98> Nope
1359: [18:32:49] <Pyromanik> thus you're trying to get the info out of the list itself.
1360: [18:32:55] <marvanni> So let me think about a nice pothole….
1361: [18:32:55] <Pyromanik> which is obviously not your data.
1362: [18:33:02] <PenguinMan98> nope
1363: [18:34:16] <marvanni> I also woulr really recommend move all that business logic out of your controller into a seperate class
1364: [18:35:56] <PenguinMan98> That would be good. How is that accomplished in SS?
1365: [18:36:20] <Pyromanik> make class. Put logic. ??? profit.
1366: [18:36:33] <Pyromanik> (so like, the same as always anywhere ever)
1367: [18:36:36] <PenguinMan98> My brain is telling me just make the class.. yeah. let the manifest find it and include it
1368: [18:36:46] <PenguinMan98> No, this is not the same
1369: [18:36:50] <Pyromanik> Yup, dev/build and/or ?flush
1370: [18:36:59] <Pyromanik> so autoloader finds it.
1371: [18:36:59] <PenguinMan98> Some projects use includes, others an autoloader, others namespaces
1372: [18:37:09] <PenguinMan98> This uses manifest
1373: [18:37:23] <Pyromanik> if they're using pure namespaces then they are using an autoloader. Just predefined one
1374: [18:37:27] <marvanni> I would create a DayFlight extends ViewableData as a sort of DataObject, but then with a single API item
1375: [18:37:34] <Pyromanik> no, autoloader uses manifest.
1376: [18:37:43] <Pyromanik> still an autoloader.
1377: [18:37:57] <marvanni> and the API “Connector” in a seperate class that creates an ArrayList of DayFlight objects
1378: [18:38:03] <PenguinMan98> It's still different on what you have to do to get the classes loaded
1379: [18:38:38] <PenguinMan98> Sounds like an excercise for when I'm not under the gun
1380: [18:38:44] <Pyromanik> there's 1 extra step, true.
1381: [18:38:45] <PenguinMan98> For now, it works
1382: [18:38:52] <Pyromanik> Yeah, it works.
1383: [18:39:06] <Pyromanik> not bad being in controller, just better if abstracted.
1384: [18:39:14] <Pyromanik> Nothing stopping you creating another controller
1385: [18:39:24] <Pyromanik> if you need another query instance, for example
1386: [18:39:24] <marvanni> It will boomerang on you ;)
1387: [18:39:28] <PenguinMan98> Understood. but this logic will only ever be used here on this controller so I'm not too worried about it
1388: [18:39:52] <Pyromanik> so anyway, where am I looking and what is the problem?
1389: [18:40:03] <PenguinMan98> marvanni: fixed it already
1390: [18:40:06] <marvanni> I really learned the hard way with having massive Controllers full of logic, Forms, validation, queries etc…
1391: [18:40:37] <PenguinMan98> What do you get by implementing 'ViewableData
1392: [18:40:38] <Pyromanik> Yeah, but also depends on complexity of use case marvanni :>
1393: [18:40:59] <marvanni> projects always get more complex down the road..
1394: [18:41:15] <marvanni> not implementing, extending
1395: [18:41:16] <Pyromanik> for eg. I would usually tell PenguinMan98 to stop screwing around and use SS's Form (and related) class(es), but it's so far already.
1396: [18:41:34] <Pyromanik> plus time contraints
1397: [18:41:39] <PenguinMan98> This form does not need any data from SS
1398: [18:41:44] <Pyromanik> what you're saying is of cousre sensible :)
1399: [18:41:45] <PenguinMan98> It's purely API driven
1400: [18:41:58] <Pyromanik> PenguinMan98, that doesn't matter, forms aren't SS specific.
1401: [18:42:01] <PenguinMan98> So I'm skirting the learning curve of your forms to get it done
1402: [18:42:09] <Pyromanik> yeah, I understand that.
1403: [18:42:11] <PenguinMan98> Which will bite me soon enough I know
1404: [18:42:19] <PenguinMan98> But for now it works
1405: [18:42:22] <Pyromanik> the form lib gives so much benefit though.
1406: [18:42:30] <Pyromanik> but yeah. What works, works.
1407: [18:42:32] <Pyromanik> for now.
1408: [18:42:37] <PenguinMan98> From where I'm sitting, it only offers complexity
1409: [18:42:42] <Pyromanik> it's simple.
1410: [18:42:45] <Pyromanik> not complex.
1411: [18:43:01] <Pyromanik> and the benefit is around checking, parsing, error display, etc.
1412: [18:43:11] <Pyromanik> (validating input)
1413: [18:43:15] <marvanni> it gives code that you are able to read next year as well…
1414: [18:43:21] <Pyromanik> haha, yup.
1415: [18:43:27] <PenguinMan98> lol
1416: [18:43:29] <marvanni> writing is easy… reading sucks…
1417: [18:43:39] <PenguinMan98> My code is not hard to read
1418: [18:43:40] <Pyromanik> the forms might look complex at first, but they're actually incredibly simple.
1419: [18:43:54] <Pyromanik> you sound like my colleague.
1420: [18:43:57] <marvanni> next year it is..
1421: [18:44:02] <PenguinMan98> yeah, I know
1422: [18:44:05] <Pyromanik> who's code is ... uniformly formatted... but rather hard to read.
1423: [18:44:18] <PenguinMan98> I use phpstorm to format it for me
1424: [18:44:25] <Pyromanik> hehe
1425: [18:44:25] <PenguinMan98> cuz I can never agree with myself on a standard
1426: [18:44:30] <marvanni> autoformat in PHPStorm is not enough :)
1427: [18:44:39] <Pyromanik> Gonna go cook.
1428: [18:44:56] <marvanni> just use PSR…
1429: [18:44:57] <PenguinMan98> I need to duck out and connect to a VPN that will kill my internets
1430: [18:53:46] <PenguinMan98> OK
1431: [18:53:50] <PenguinMan98> Next question
1432: [18:54:05] <PenguinMan98> Inside a loop, I need to compare the looping variable to something outside the loop
1433: [18:54:09] <PenguinMan98> How can I do this?
1434: [18:54:56] <marvanni> By moving the logic outside your template in seperate classes;)
1435: [18:55:11] <marvanni> or check put it in the controller for now….
1436: [18:56:15] <marvanni> you might try $Up.Variable to jump out of the loop
1437: [18:57:01] <PenguinMan98> Up worked
1438: [18:57:56] <PenguinMan98> but the comparison failed
1439: [18:58:26] <PenguinMan98> <option value="$value" <% if $APIQuery.query_date2 == $value %> selected<% end_if %>>$title ($Up.APIQuery.query_date2 == $value)</option>
1440: [18:58:47] <PenguinMan98> oh
1441: [18:58:48] <PenguinMan98> oops
1442: [19:00:01] <PenguinMan98> nope
1443: [19:00:10] <PenguinMan98> still doesn't
1444: [19:00:13] <marvanni> why not in you ArrayList push check for $this->APIQuery->date and set a ArrayData key Checked => $checked ?
1445: [19:00:45] <PenguinMan98> I'll work on setting that up, thanks
1446: [19:00:51] <marvanni> In my opinion a template should only present data, not do checks like that…
1447: [19:01:11] <marvanni> brb
1448: [19:02:02] <PenguinMan98> Checks like that are what PHP was built to do. You've abstracted away PHP's original functionality.
1449: [19:03:18] <catcher> PenguinMan98, he's talking about the template engine, not php.
1450: [19:03:43] <catcher> PenguinMan98, he's saying they should in fact be in php via model/controller.
1451: [19:04:17] <PenguinMan98> Which is why sometimes I'd rather not use the .ss templates when html/php is easier, quicker, and more reliable, if less readable.
1452: [19:04:45] <catcher> PenguinMan98, some argue non-php templates force better mvc practices for that very reason
1453: [19:05:19] <PenguinMan98> True strict MVC is awful
1454: [19:06:30] <catcher> All design patterns have flaws, mvc is pretty much the front runner for web atm.
1455: [19:06:39] <PenguinMan98> True enough
1456: [19:06:55] <PenguinMan98> My gripe is that I dont' have a choice
1457: [19:08:15] <PenguinMan98> the DateList() function isn't specific to date1 or date2
1458: [19:08:23] <PenguinMan98> It returns the same dropdown
1459: [19:09:04] <catcher> PenguinMan98, which DateList function?
1460: [19:09:06] <PenguinMan98> To make the check in the php I have to either pass a parameter to the function from the template( which makes you guys groan ) or throw DRY out the window and duplicate the function for each field.
1461: [19:09:12] <PenguinMan98> My DateList function
1462: [19:09:58] <catcher> I pass arguments from templates to functions from time to time, I don't think it's so bad.
1463: [19:10:44] <catcher> It can be abused, but given the choice between that and repetition, I'll take the args.
1464: [19:11:45] <Pyromanik> PenguinMan98, $Up.Thing or $Top.Thing (depending on how deep you are)
1465: [19:12:23] <PenguinMan98> That much worked Pyromanik . The problem was even if the two strings were equal, <% if $Up.APIQuery.query_date2 == $value %> didn't fire
1466: [19:13:24] <Pyromanik> <marvanni> In my opinion a template should only present data, not do checks like that…
1467: [19:13:27] <Pyromanik> correct ^
1468: [19:14:10] <PenguinMan98> That's an opinion IMHO. And it goes against 9 years of convention.
1469: [19:14:50] <Pyromanik> longer = correct => fallacy == true
1470: [19:15:10] <Pyromanik> simple check, maybe sure.
1471: [19:15:21] <Pyromanik> but, yeah.
1472: [19:16:20] <PenguinMan98> And it makes it take longer to code
1473: [19:16:22] <Pyromanik> also if true strict mvc is aweful, you're probably doing it wrong.
1474: [19:16:38] * marvanni quit (Quit: marvanni)
1475: [19:16:46] <PenguinMan98> It's like the carnot engine. It's the ideal case, but it can't truly ever exist.
1476: [19:16:54] <Pyromanik> and if you stick at your logic, PHP's original functionality was a wrapper around C. You should code all your websites in C.
1477: [19:17:31] <PenguinMan98> Regardless of HOW PHP was built, it was built to do simple template scripting
1478: [19:17:53] <Pyromanik> and the web itself has moved far beyond that problem domain.
1479: [19:18:03] <PenguinMan98> Which is why it boggles the mind how many people seem to want to take that responsibility away from it.
1480: [19:18:08] <Pyromanik> gotta groove with the times chap!
1481: [19:18:33] <PenguinMan98> The times are making it take longer to code.
1482: [19:18:55] <Pyromanik> well if you leave it with that responsibility and only that responsiblity, then you end up implementing all your logic in CGI and drawing the result with PHP.
1483: [19:18:59] <Pyromanik> not optimal.
1484: [19:19:12] <Pyromanik> no, the times are making it possible to code all in one language.
1485: [19:19:22] <PenguinMan98> what, Javascript?
1486: [19:19:24] <PenguinMan98> lol
1487: [19:19:24] <Pyromanik> PHP itself has evolved far beyond a 'simple templating language'
1488: [19:19:38] <Pyromanik> yeh bro, node.js ALLLLLLL the things!
1489: [19:19:51] <PenguinMan98> True. but at its core PHP is still a templating language
1490: [19:19:54] <Pyromanik> (that's a joke, if you don't see the sarcasm)
1491: [19:19:57] <PenguinMan98> hehe
1492: [19:20:00] <Pyromanik> Not true.
1493: [19:20:15] <PenguinMan98> Node.JS + Mongo + Angular or React
1494: [19:20:18] <Pyromanik> Templates don't need classes, sophisticated control structures, etc.
1495: [19:20:56] <PenguinMan98> True PHP has evolved but it didn't lose it's original functionality for templating
1496: [19:21:34] <Pyromanik> yeah but you could also write templates in any language you want. Even C. Why bother with PHP?
1497: [19:21:45] <PenguinMan98> C wasn't built for it. PHP was
1498: [19:22:00] <Pyromanik> C++ then.
1499: [19:22:02] * marvanni has joined #silverstripe
1500: [19:22:08] <PenguinMan98> c++ wasn't built for it either
1501: [19:22:09] <Pyromanik> use the Standard TEMPLATE Library!
1502: [19:22:27] <PenguinMan98> That's a different kind of template
1503: [19:23:24] <Pyromanik> the point is, albeit demonstrated in a round about fashion, people abstract for the same reasons they've always abstracted.
1504: [19:23:41] <Pyromanik> improve maintainablility and ease of development in the problem domain.
1505: [19:24:23] <Pyromanik> If you just want to display template data use SSI
1506: [19:24:27] <Pyromanik> ;)
1507: [19:24:37] <PenguinMan98> LISP
1508: [19:25:14] <PenguinMan98> The good abstractions still let you do it the old way if you need the control
1509: [19:25:15] <Pyromanik> Haskell all the things. Gosh, functional programming is all the rage.
1510: [19:25:20] <PenguinMan98> .ss does not let you
1511: [19:25:26] <PenguinMan98> That's my frustration
1512: [19:25:38] <Pyromanik> Tool for the job, yada yada
1513: [19:25:49] <Pyromanik> it's a tool IN php. Not a tool to replace php.
1514: [19:26:05] <Pyromanik> it tackles a problem domain with a specific solution.
1515: [19:26:11] <Pyromanik> that is MVC.
1516: [19:26:30] <Pyromanik> You're trying to C in your V
1517: [19:26:57] <PenguinMan98> Yeah, but now I need ot do something super simple I've been allowed to do for 9+ years and I can't
1518: [19:28:47] <Pyromanik> <% if $Up.Value != $value %>UpVal=$Up.Value - Val=$Val<% end_if %>
1519: [19:29:27] <PenguinMan98> I've no idea what that is or how to use it
1520: [19:29:47] <Pyromanik> same thing that's failing, but in reverse.
1521: [19:29:51] <Pyromanik> ... negated.
1522: [19:29:55] <PenguinMan98> ok
1523: [19:30:02] <PenguinMan98> with some output added in
1524: [19:30:04] <Pyromanik> if NOT equal, then show me the values.
1525: [19:30:17] <Pyromanik> encapsulate in <span> or something, make it obvious
1526: [19:30:30] <Pyromanik> or <pre style="background:red">
1527: [19:30:32] <Pyromanik> something like that
1528: [19:39:07] <Pyromanik> winning?
1529: [19:39:16] <Pyromanik> PenguinMan98 ?
1530: [19:39:39] <PenguinMan98> Oh, I'd already moved the check into the controller
1531: [19:39:43] <PenguinMan98> It works there
1532: [19:40:26] <PenguinMan98> now I'm looking into error handling
1533: [19:41:10] <Pyromanik> how so?
1534: [19:41:39] <Pyromanik> errors are trapped and thrown as exceptions... or the other way around. I don't remember.
1535: [19:41:53] <Pyromanik> stacktrace in dev, silent death in live.
1536: [19:42:30] <Pyromanik> PenguinMan98, ?
1537: [19:42:54] <PenguinMan98> user_error("The query to the API failed.");
1538: [19:43:17] <Pyromanik> gets intercepted and thrown.
1539: [19:43:37] <PenguinMan98> On live it just silently fails?
1540: [19:44:20] <Pyromanik> http://api.silverstripe.org/3.2/class-Debug.html
1541: [19:44:25] <marvanni> depends of the error
1542: [19:44:38] <Pyromanik> well no, but it doesn't display errors to the general public either (as it shouldn't!)
1543: [19:44:50] <Pyromanik> white screen of death, usually. Depends on the error.
1544: [19:45:15] <marvanni> Notices will fail silently, maybe others im not sure, but a fatal will just 500 on you
1545: [19:46:15] <Pyromanik> user_error is fatal.
1546: [19:46:37] <Pyromanik> if you've typed user_error, generally throw new Exception('message') is a better idea.
1547: [19:52:43] <Pyromanik> of course if you set up error logging, then it's all logged anyway.
1548: [20:03:22] * darjus01 quit (Quit: Leaving)
1549: [20:04:09] * veb has joined #silverstripe
1550: [20:13:24] <PenguinMan98> interesting
1551: [20:13:51] <Pyromanik> ?
1552: [20:14:15] <PenguinMan98> delayed response. sorry
1553: [20:14:23] <PenguinMan98> got my head in the code
1554: [20:14:39] <Pyromanik> mm, as one does
1555: [20:17:42] * cupcake quit (Ping timeout: 246 seconds)
1556: [20:28:14] * Stomach has joined #silverstripe
1557: [20:30:35] * Phlunk3 has joined #silverstripe
1558: [20:30:59] * UndefinedOffset quit (Quit: Leaving.)
1559: [20:40:55] <Pyromanik> 8:40am, where are my bitches?
1560: [20:41:59] * antmas has joined #silverstripe
1561: [20:42:30] <PenguinMan98> barking in the yard?
1562: [20:42:40] <antmas> morning all o/
1563: [20:42:44] <PenguinMan98> wakin the neighbors
1564: [20:42:48] <PenguinMan98> sup antmas
1565: [20:48:22] <catcher> happy weekend!
1566: [20:48:26] * catcher quit (Quit: Leaving)
1567: [20:50:58] <Stomach> sup sup
1568: [20:51:02] <Stomach> FRIDAY
1569: [20:51:19] * veb quit (Quit: veb-irc: &)
1570: [20:51:30] <antmas> Friday indeed
1571: [20:51:43] <antmas> been haaaaaaanging out for this week to finish :S
1572: [20:52:23] * micmania1 has joined #silverstripe
1573: [20:52:29] <antmas> micmania1: o/
1574: [20:52:32] <antmas> areet
1575: [20:52:40] <micmania1> antmas: areeeet
1576: [20:53:03] <antmas> anyone going to rugby tomorrow?
1577: [20:55:00] * DanaeNZ has joined #silverstripe
1578: [20:57:59] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
1579: [20:58:50] <antmas> DanaeNZ: o/
1580: [20:58:56] <DanaeNZ> suuup
1581: [21:03:02] <Stomach> how do you make silverstripe not end urls in slashes?
1582: [21:03:07] <Stomach> clients are dumb.
1583: [21:04:33] * zlinux quit (Ping timeout: 252 seconds)
1584: [21:04:50] <marvanni> you could overwrite Link() in page and strip the trailing slash
1585: [21:05:05] * veb has joined #silverstripe
1586: [21:07:03] <Pyromanik> areet
1587: [21:07:33] * Ryan-Toast has joined #silverstripe
1588: [21:07:37] <Pyromanik> Stomach, how to make silverstripe always end urls in slashes?
1589: [21:07:44] <Pyromanik> SEO 'experts' are dumb.
1590: [21:08:37] <Pyromanik> PenguinMan98, here are my bitches :D
1591: [21:08:38] <Pyromanik> xD
1592: [21:08:50] <Pyromanik> WHO LET THE DOGS OUT?
1593: [21:08:55] <Pyromanik> Friday friday friday
1594: [21:09:27] <PenguinMan98> Still very Thursday over here
1595: [21:09:28] <Pyromanik> I forgot that tomorrow is Friday. Thanks for the pickup antmas :D
1596: [21:09:36] <Stomach> FRIDAY
1597: [21:09:49] <PenguinMan98> Thor's Day
1598: [21:09:50] <Pyromanik> suns gaan down.
1599: [21:09:59] <PenguinMan98> Freya's Day
1600: [21:10:32] * stecman has joined #silverstripe
1601: [21:10:47] <simon_w> Friday started with banana bread
1602: [21:10:49] <simon_w> Good way to start
1603: [21:10:52] <Pyromanik> nom
1604: [21:11:12] <Pyromanik> Thursday started with a bacon sandwich.
1605: [21:11:14] <simon_w> Got a packet of chips and some dip at work too
1606: [21:11:17] <Pyromanik> was good.
1607: [21:11:34] <DanaeNZ> 2nd cup of coffee gogo
1608: [21:11:39] <DanaeNZ> stayed up late watching anime
1609: [21:11:40] <micmania1> areet Pyromanik
1610: [21:11:43] <DanaeNZ> what is my life coming to
1611: [21:11:44] <Pyromanik> reet micmania1
1612: [21:11:45] <Pyromanik> :>
1613: [21:11:54] <Pyromanik> DanaeNZ, umm, 30?
1614: [21:12:09] <DanaeNZ> far from it bro
1615: [21:12:17] <simon_w> Ooh, and I've got some V too
1616: [21:12:20] * DanaeNZ shifts nervously
1617: [21:12:20] <Pyromanik> Yeah I know, that's the 'coming to' bit.
1618: [21:12:24] <simon_w> The red one, which NZ doesn't seem to have
1619: [21:12:29] <Pyromanik> berry?
1620: [21:12:32] <Pyromanik> has.
1621: [21:12:39] <Pyromanik> not common tho
1622: [21:12:39] <DanaeNZ> cherry
1623: [21:12:41] <DanaeNZ> ?
1624: [21:12:43] <Pyromanik> neg.
1625: [21:12:47] <simon_w> "Reactor"
1626: [21:12:50] <simon_w> Is a berry
1627: [21:12:50] <Pyromanik> oh.
1628: [21:12:57] <DanaeNZ> random buzzword flavour? yum my fave
1629: [21:13:04] <simon_w> At least, it has a strawberry texture
1630: [21:13:05] <Pyromanik> interesting. On the other side, I found V here. I got excited.
1631: [21:13:17] <Pyromanik> Vanilla V.
1632: [21:13:23] <Pyromanik> that is to say it's original flavour.
1633: [21:14:06] <simon_w> The petrol station across the road has orange Vs
1634: [21:14:13] <Pyromanik> Then it said "Specifically formulated for UK and ROI" on the back, and I was all 'pffft, gonna taste shit then'. But it didn't. So I was happy.
1635: [21:14:14] <simon_w> Haven't found them anywhere else
1636: [21:14:20] <Pyromanik> not orange?
1637: [21:14:31] * glenn-bautista has joined #silverstripe
1638: [21:14:32] <Pyromanik> Was a thing before I left. So... 2 years back.
1639: [21:14:55] <Pyromanik> Graphite was in before I left. That was my favourite at the time.
1640: [21:15:07] <Pyromanik> kinda... sherberty
1641: [21:15:18] <simon_w> Yeah, it's in the normal places in NZ
1642: [21:15:34] <simon_w> Welp, off to work time
1643: [21:15:53] <Pyromanik> glhf!
1644: [21:16:50] * camfindlay has joined #silverstripe
1645: [21:17:52] <Pyromanik> cam the cam arrives.
1646: [21:21:10] * veb quit (Quit: veb-irc: &)
1647: [21:22:02] * antmas sighs heavily
1648: [21:22:48] <Ryan-Toast> antmas: vaguebook.com
1649: [21:23:21] <Stomach> DanaeNZ whats that bulk editing thing
1650: [21:23:27] <Stomach> with the delete all button
1651: [21:23:33] <Stomach> https://github.com/colymba/GridFieldBulkEditingTools
1652: [21:23:35] <Stomach> thats it right?
1653: [21:23:53] <DanaeNZ> yaa
1654: [21:24:10] <DanaeNZ> it’s noice
1655: [21:24:34] <DanaeNZ> assemble otakus ss23 Ryan-Toast + anyone else
1656: [21:24:38] <DanaeNZ> the fuck should i watch
1657: [21:25:01] <Ryan-Toast> DanaeNZ: Psycho Pass
1658: [21:25:03] <Stomach> shigirui
1659: [21:25:13] * DanaeNZ takes notes
1660: [21:25:17] <antmas> ummm
1661: [21:25:17] <Stomach> shigurui even
1662: [21:25:20] <antmas> Dark City
1663: [21:25:41] <antmas> Wicked City*
1664: [21:25:59] <antmas> Beserker if you haven't already
1665: [21:26:05] <Ryan-Toast> DanaeNZ: http://myanimelist.net/animelist/Rhym
1666: [21:26:20] <antmas> getting all the names wrong this morning
1667: [21:26:23] <DanaeNZ> ofc you have an anime list
1668: [21:26:29] <antmas> Berserk*
1669: [21:27:10] <DanaeNZ> omg i haven’t seen FMA brotherhood
1670: [21:27:13] <DanaeNZ> wtf is wrong with me
1671: [21:27:20] <DanaeNZ> omfgomfg
1672: [21:27:35] <Ryan-Toast> DanaeNZ: probs my favorite anime.
1673: [21:27:49] <DanaeNZ> I’ve only seen FMA
1674: [21:28:03] <DanaeNZ> i thought they were the same thing
1675: [21:28:13] <antmas> mm I haven't seen brotherhood either
1676: [21:29:00] <antmas> I rewatched most of Trigun recently
1677: [21:29:06] <DanaeNZ> antmas: yesyesyeysyeysys
1678: [21:29:18] <DanaeNZ> i lvoe the style
1679: [21:29:28] <DanaeNZ> aslso manga is A+
1680: [21:29:39] * DanaeNZ strokes DVD boxset
1681: [21:29:51] <antmas> DanaeNZ: :D
1682: [21:29:54] <antmas> hi5 o/
1683: [21:29:57] <DanaeNZ> \o
1684: [21:30:01] <DanaeNZ> *smack
1685: [21:30:12] <antmas> Samurai Champloo
1686: [21:30:22] <DanaeNZ> oooh I’ve been meaning to watch that
1687: [21:30:42] * camfindlay quit (Quit: camfindlay)
1688: [21:33:16] <Stomach> samurai champloo is fucking awesome
1689: [21:33:16] * camfindlay has joined #silverstripe
1690: [21:33:26] <antmas> Stomach: +1
1691: [21:33:49] <DanaeNZ> after I move house I’ll have time for four extra anime episodes a day
1692: [21:33:55] <DanaeNZ> frreeeal
1693: [21:33:56] <Stomach> hahaha
1694: [21:33:58] <antmas> DanaeNZ: mentioned it before, but the Vampire Hunter D movies are pretty cool
1695: [21:34:08] <DanaeNZ> I’ll keep them in mind
1696: [21:34:17] <antmas> especially the old one
1697: [21:36:01] <antmas> I used to like Hellsing
1698: [21:36:12] <antmas> but then it got lame after first 2 seasons
1699: [21:38:23] <DanaeNZ> I’ve revoked my right to have opinions about anime
1700: [21:40:33] * camfindlay quit (Ping timeout: 276 seconds)
1701: [21:41:11] <Ryan-Toast> can you overload a forTemplate method in a DataExtension?
1702: [21:42:05] * camfindlay has joined #silverstripe
1703: [21:44:29] * micmania1 quit (Quit: micmania1)
1704: [21:47:54] <PenguinMan98> bah
1705: [21:48:02] <PenguinMan98> The template won't call my function again
1706: [21:48:18] <PenguinMan98> <a href="{$SortURL('departure')}" class="sorted descending">
1707: [21:48:27] <PenguinMan98> public function SortURL( $sortby ){
1708: [21:48:46] <Ryan-Toast> !paste PenguinMan98
1709: [21:48:50] <ss-helper> PenguinMan98: 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.
1710: [21:49:08] <PenguinMan98> The most important bits are there
1711: [21:49:16] <PenguinMan98> Can you spot a bug?
1712: [21:49:33] <DanaeNZ> the most important bit is missing
1713: [21:49:37] <DanaeNZ> the return statement
1714: [21:49:39] <antmas> ^^
1715: [21:49:47] <Ryan-Toast> looks like your fucntion only has one line.
1716: [21:49:55] <Ryan-Toast> that could be the issue
1717: [21:49:56] <PenguinMan98> the function doesn't even get invoked
1718: [21:50:05] <PenguinMan98> and it returns a string url
1719: [21:50:10] <PenguinMan98> well,, should
1720: [21:50:27] <DanaeNZ> !past
1721: [21:50:29] <DanaeNZ> !paste
1722: [21:50:29] <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.
1723: [21:50:29] <Ryan-Toast> paste the method...
1724: [21:50:31] <DanaeNZ> !paste
1725: [21:50:31] <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.
1726: [21:50:33] <DanaeNZ> !paste
1727: [21:50:33] <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.
1728: [21:50:36] <PenguinMan98> oh fine
1729: [21:50:56] * adrexia has joined #silverstripe
1730: [21:51:06] <PenguinMan98> http://pastebin.com/PLssfaZS
1731: [21:51:33] <antmas> DanaeNZ: !paste
1732: [21:51:41] <DanaeNZ> ha!
1733: [21:51:42] <Ryan-Toast> !paste antmas
1734: [21:51:42] <ss-helper> antmas: 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.
1735: [21:51:45] <Ryan-Toast> noob
1736: [21:51:46] <antmas> LAME
1737: [21:51:48] <antmas> lol
1738: [21:52:23] <PenguinMan98> silly
1739: [21:52:33] <PenguinMan98> ^^
1740: [21:52:34] <DanaeNZ> PenguinMan98: is it returning anything at all?
1741: [21:52:43] <PenguinMan98> The function isn't getting invoked at all
1742: [21:53:07] <PenguinMan98> oooooooh...
1743: [21:53:11] <PenguinMan98> I'm in a loop
1744: [21:53:14] <PenguinMan98> my bad
1745: [21:53:25] <DanaeNZ> so $Top.SortURL will fix
1746: [21:53:45] * antmas passes PenguinMan98 a coffee
1747: [21:54:00] <Ryan-Toast> PenguinMan98: Try some rubber ducky testing, always helps me.
1748: [21:54:11] * DanaeNZ intercepts the coffee and sculls it
1749: [21:54:55] <antmas> DanaeNZ: did you see that amazing batman cosplay?
1750: [21:55:01] <DanaeNZ> probably
1751: [21:55:06] <DanaeNZ> i see all cosplays
1752: [21:55:13] * DanaeNZ doesn’t blink for a full minute
1753: [21:55:24] <antmas> lol
1754: [21:55:29] <antmas> http://nerdist.com/the-batman-cosplay-we-deserve-is-the-best-weve-ever-seen/
1755: [21:55:40] <DanaeNZ> yeah i saw it
1756: [21:55:40] <DanaeNZ> haha
1757: [21:55:48] <antmas> :P
1758: [21:55:48] <DanaeNZ> it’s better than in the moview
1759: [21:55:53] <antmas> mm
1760: [21:56:00] <DanaeNZ> oh KevinLeProps
1761: [21:56:02] <antmas> new batman movie makes him look like a regal cat
1762: [22:05:08] <Ryan-Toast> Image needs a $htmlattributes hook.
1763: [22:08:14] <antmas> what's the best way to remove images from search?
1764: [22:08:38] <Pyromanik> Ryan-Toast, <img src="$Image.URL" alt="wachoo talk'n 'bout Willis?" data-honestly="not so hard bruv" />
1765: [22:08:56] <Pyromanik> data-thing="$ExtensionMethod"
1766: [22:09:04] <Pyromanik> antmas, don't search for them.
1767: [22:09:16] <Ryan-Toast> Pyromanik: And what If I want a method to invoke the same thing every time?
1768: [22:09:19] <antmas> :|
1769: [22:09:26] <Pyromanik> Ryan-Toast, hard code it.
1770: [22:09:28] <Ryan-Toast> Don’t want to have to hard code in my templates over and over
1771: [22:09:29] <Pyromanik> -.-
1772: [22:09:40] <Ryan-Toast> Pretty silly :P
1773: [22:09:42] <Pyromanik> yeah EXTENSXUNHUUK BRUV
1774: [22:09:50] <Pyromanik> gosh
1775: [22:10:12] <Pyromanik> cf. line immediately succeeding the one you're fixing on.
1776: [22:10:24] <Pyromanik> ;)
1777: [22:10:36] <Ryan-Toast> Extensions still can’t hook into the getTag method :P
1778: [22:10:54] <Pyromanik> cf. line preceeding the one I just told you to look at.
1779: [22:11:26] <Ryan-Toast> Pyromanik: How do you mean?
1780: [22:11:38] <Pyromanik> $Image
1781: [22:11:43] <Pyromanik> renders forTemplate
1782: [22:12:20] <Pyromanik> $Image.URL renders a string of a url from base tag href to image location.
1783: [22:12:34] <Pyromanik> You'll catch up in about 3 sips of coffee :>
1784: [22:13:44] <antmas> maybe I should tell users to name images randomly
1785: [22:14:09] <Pyromanik> Like, totally fuck you regex. http://api.silverstripe.org/3.2/source-class-Image.html#150
1786: [22:14:18] <Pyromanik> y 4 no comment in code :,
1787: [22:14:19] <Pyromanik> :<
1788: [22:16:26] <Pyromanik> a rite. It takes 'path/to/file.ext' and returns 'file'
1789: [22:17:03] <Pyromanik> iff ext is between 3 and 6 chars (inclusive)
1790: [22:17:14] <Pyromanik> oh,no, 1 and 6, my bad
1791: [22:17:31] * Pyromanik sighs
1792: [22:17:33] <Pyromanik> idek
1793: [22:17:44] <Pyromanik> Ryan-Toast, make sense yet bruv?
1794: [22:18:19] <Pyromanik> ie, manually compile your img tag, but you only gotta do it once.
1795: [22:18:24] * camfindlay quit (Quit: camfindlay)
1796: [22:18:34] <Pyromanik> that or subclass image and work some Injector magics.
1797: [22:18:40] <Pyromanik> if you can figure that out :>
1798: [22:18:56] <Pyromanik> or make PR to framework.
1799: [22:19:01] <Pyromanik> that'd do it too.
1800: [22:19:18] <Pyromanik> But you'd have to use bleeding edge.
1801: [22:19:44] <Ryan-Toast> Pyromanik: how would you go about doing something like $Image.srcSet(“100, 100”, “200, 200”)
1802: [22:19:46] <Pyromanik> erre1 dun gone quiet, must be time to make it friday.
1803: [22:19:54] <Pyromanik> wtf is srcset>
1804: [22:20:20] <Pyromanik> Ryan-Toast, wtf is srcSet()?
1805: [22:20:47] <Ryan-Toast> Pyromanik: geenric method name
1806: [22:20:53] <Pyromanik> if it's a manipulation, then remember than Image.manipulation also returns Image.
1807: [22:21:13] <Ryan-Toast> Hmm.
1808: [22:21:27] <Ryan-Toast> Which is why I want to be able to pass htmlattributes to image :P
1809: [22:21:34] <Pyromanik> $Image.SetWidth(200).Greyscale.CroppedImage(199,372).SetHeight(100).URL
1810: [22:21:53] <Ryan-Toast> Don’t want the url.
1811: [22:21:56] <Pyromanik> same shit as above. Stop overthinking and just do it already
1812: [22:21:58] <Pyromanik> yes you do.
1813: [22:22:03] <Ryan-Toast> No, I don’t :P
1814: [22:22:09] <Pyromanik> how will browser request it without URL!?
1815: [22:22:24] <Ryan-Toast> I want: <img src=“foo.png” srcset=“herpder”>
1816: [22:22:47] <Pyromanik> http://www.underconsideration.com/brandnew/archives/google_broken_image_00_a_logo.gif
1817: [22:23:11] <PenguinMan98> 404
1818: [22:23:21] <Ryan-Toast> lol.
1819: [22:23:28] <PenguinMan98> 403 anyway
1820: [22:23:29] <Pyromanik> yeah, so class MyImageExtension extends DataExtension { public funciton srcset() { return 'herpder'; } }
1821: [22:23:43] <Pyromanik> apply image
1822: [22:23:47] <Pyromanik> err, extension
1823: [22:23:48] <Pyromanik> to image
1824: [22:24:07] <Ryan-Toast> Pyromanik: So I’d have to build all the caching biz and stuff as well?
1825: [22:24:45] <Pyromanik> then <img src="$Image.CroppedImage(200,300).URL" alt="$Title" srcset="$srcset" />
1826: [22:24:49] <Pyromanik> Ryan-Toast, wtf?
1827: [22:24:57] <Pyromanik> what caching biz and stuff?
1828: [22:25:00] <Ryan-Toast> Pyromanik: Hmm, that would work actually.
1829: [22:25:05] <Pyromanik> yes I know!
1830: [22:25:12] <Ryan-Toast> :P
1831: [22:25:14] <Ryan-Toast> SHHH
1832: [22:25:28] <Pyromanik> I knew it 20 mins ago when I first said it too!
1833: [22:25:41] <Pyromanik> You must be on your third sip of coffee :D
1834: [22:26:02] <Ryan-Toast> Pyromanik: Can you overload the forTemplate method in an extension?
1835: [22:26:17] <Pyromanik> Ryan-Toast, you can overload whatever has a $this->extend() call in it
1836: [22:26:23] <Pyromanik> or add new methods.
1837: [22:26:24] <Ryan-Toast> Damn :(
1838: [22:26:47] <Ryan-Toast> I’m going to go have a play with this and see how I go
1839: [22:26:54] <Pyromanik> if you want to change default behaviour, then you need to subclass.
1840: [22:27:06] <Pyromanik> but then you must use YourImage everywhere instead of Image.
1841: [22:27:15] <Pyromanik> I don't particularly recommend it.
1842: [22:27:21] <Pyromanik> PITA.
1843: [22:27:24] <Ryan-Toast> Yeah, don’t want that.
1844: [22:27:37] <Pyromanik> That's where Injector comes in.
1845: [22:27:44] <Pyromanik> Image: class: MyImage
1846: [22:28:04] <Pyromanik> but I dunno quite what that does for class heirarchy vs instantiation.
1847: [22:28:10] <Pyromanik> and circular dependencies.
1848: [22:28:31] <Pyromanik> I seem to recall issues with it in the past. Ask Stomach about it these days I guess. He'd have more of an idea.
1849: [22:28:41] <Stomach> what
1850: [22:28:43] * Azure has joined #silverstripe
1851: [22:29:02] <Pyromanik> Stomach, MyClass extends SomeBaseClass
1852: [22:29:15] <Stomach> it changes the class name
1853: [22:29:17] <Pyromanik> Injector give me MyClass instead of SomeBaseClass
1854: [22:29:30] <Stomach> so if it relies on the classname (like Member) then it doesnt work
1855: [22:29:34] <Pyromanik> then you SomeBaseClass::create() and it BRO I CANNAE DO THAT!
1856: [22:29:56] <Pyromanik> is that fixed yet?
1857: [22:30:04] <Stomach> yeah it works now
1858: [22:30:09] <Stomach> but the class issue is a pain
1859: [22:30:13] <Pyromanik> so what are you talking about?
1860: [22:30:25] <Pyromanik> like, new Thing?
1861: [22:30:34] <Pyromanik> because old code and not everything uses ::create() ?
1862: [22:31:02] <Stomach> yeah and some of the validation etc relies on the class name not calling the new object and shit
1863: [22:31:03] <Pyromanik> please, clarify
1864: [22:31:07] <Stomach> its a bit higgilty piggilty
1865: [22:31:15] <Pyromanik> yeah, as expected.
1866: [22:31:16] <Stomach> we needed to validate members
1867: [22:31:26] <Pyromanik> your mum validated a member once.
1868: [22:31:27] <Stomach> so tried doing ValidateMember extends Member
1869: [22:31:43] <Stomach> and just making validate a public function validate() {return parent::validate()}
1870: [22:31:47] <Stomach> and it broke all kinds of shit
1871: [22:31:53] <Stomach> why is validate protected
1872: [22:31:54] <Stomach> stupid shit.
1873: [22:32:05] <Pyromanik> hahaha, yeah. Never extend your member. Always decorate it, much more fun.
1874: [22:32:06] * PenguinMan98 quit (Ping timeout: 246 seconds)
1875: [22:32:26] <Stomach> yeah swipestripe you bastards!
1876: [22:32:31] * Stomach looks the other way
1877: [22:32:35] <Ryan-Toast> Pyromanik: Can you actually render Image with a template?
1878: [22:32:36] <Pyromanik> haha, tankr yeh.
1879: [22:32:45] <Pyromanik> Ryan-Toast, well, yeah of course.
1880: [22:32:46] <Ryan-Toast> Looks like it just returns the html
1881: [22:32:56] <Pyromanik> Ryan-Toast, well forTempalte does, yeah.
1882: [22:33:05] <Pyromanik> but you don't have to call that.
1883: [22:33:19] <Pyromanik> You can do $Image.RenderThisSmutWithATemplate
1884: [22:33:34] <Stomach> Pyromanik - I'm actually a core contributer on that too, but time and stuff...
1885: [22:33:47] <Pyromanik> Stomach, on what?
1886: [22:33:52] <Stomach> swipestripe
1887: [22:33:55] <Pyromanik> oh, right
1888: [22:34:02] * simon_w|air quit (Excess Flood)
1889: [22:34:11] <Pyromanik> solid ideas, but does need caressing.
1890: [22:34:13] <Pyromanik> fo sho
1891: [22:34:37] <Pyromanik> haha, simon_w's client made an NZ joke.
1892: [22:34:44] * simon_w|air has joined #silverstripe
1893: [22:35:42] <Pyromanik> anyways. z time.
1894: [22:35:44] <Pyromanik> zzzzzzzzzzzzzz
1895: [22:35:50] * Pyromanik quit (Quit: (zzzzz))
1896: [22:37:04] <Stomach> [10:34:37] <Pyromanik> haha, simon_w's client made an NZ joke.
1897: [22:37:09] <Stomach> wut.
1898: [22:37:10] <Stomach> oh
1899: [22:37:12] <Stomach> hes gone
1900: [22:37:14] <Stomach> balls..
1901: [22:39:16] <simon_w|air> Ugh, who broke the logs
1902: [22:40:24] <antmas> simon_w|air: ss23
1903: [22:40:39] <simon_w|air> Or maybe it's just our internet
1904: [22:40:44] <simon_w|air> Still, it's all ss23's fault
1905: [22:40:45] * ss-helper quit (Read error: Connection reset by peer)
1906: [22:40:59] * ss-helper has joined #silverstripe
1907: [22:41:15] * micmania1 has joined #silverstripe
1908: [22:42:21] * helenclarko has joined #silverstripe
1909: [22:43:35] <helenclarko> The Forums are a real mess this morning, whats going on? I'm missing posts all over the place.
1910: [22:47:42] * camfindlay has joined #silverstripe
1911: [22:47:44] * camfindlay quit (Client Quit)
1912: [22:48:54] * guci0 quit (Ping timeout: 246 seconds)
1913: [22:53:53] <Stomach> cam broke it
1914: [23:02:48] * zlinux has joined #silverstripe
1915: [23:05:39] * camfindlay has joined #silverstripe
1916: [23:07:07] * micmania1 quit (Ping timeout: 256 seconds)
1917: [23:07:19] <ss23> :(
1918: [23:07:21] <ss23> NO IT'S NOT
1919: [23:07:29] * micmania1 has joined #silverstripe
1920: [23:07:39] <ss23> I dunno who to get to fix it
1921: [23:08:39] <ss23> The team that normally would is too busy dealing with other stuff
1922: [23:08:45] * joelpittet has joined #silverstripe
1923: [23:09:51] * zippy has joined #silverstripe
1924: [23:10:01] <zippy> Right guys, two things.
1925: [23:10:01] * camfindlay quit (Ping timeout: 246 seconds)
1926: [23:10:02] <zippy> 1 - Anyone played with a FPV quadcopter?
1927: [23:10:03] <antmas> zippy: joelpittet o/
1928: [23:10:12] <zippy> 2 - antmas why does the water still taste like shit? fix it.
1929: [23:10:26] <joelpittet> antmas: Sup?
1930: [23:10:33] <zippy> antmas: no waves until you fix the wter
1931: [23:10:34] <antmas> zippy: yes and that's ss23 's fault
1932: [23:10:47] <ss23> :(
1933: [23:11:03] * camfindlay has joined #silverstripe
1934: [23:11:04] <ss23> I've never played with a FPV quadcopter IRL, but I have played with non-FPV ones!
1935: [23:11:12] <antmas> zippy: we have filtered water here. #not peasants
1936: [23:11:41] <ss23> Kingy[a]: You know why the prod server is going under high loads in the mornings atm? 9:30am today and yesterday I think, shot up to ~6 load
1937: [23:11:58] <zippy> I am tempted to get http://www.hobbystation.co.nz/hubsan-h107d-fpv-x4-5-8g-4ch-6-axis-rc-quadcopter-rtf/ as a starter
1938: [23:12:00] <ss23> Eh, yesterday it got to 4, but not 6
1939: [23:12:34] <zippy> ss23: that might be my daily cron. ab -n 1000 -c 20 http://silverstripe.org/
1940: [23:12:40] <antmas> zippy: any video reviews of it?
1941: [23:12:41] <simon_w|air> 6 load? That's tiny!
1942: [23:12:56] <ss23> lol zippy
1943: [23:13:05] <zippy> antmas: a few. for $200 it's not awesome but something to start with
1944: [23:13:17] <antmas> yeah it's pretty cheap
1945: [23:13:25] <zippy> along with http://www.amazon.com/gp/product/B00M4SWGAS?psc=1&redirect=true&ref_=ox_sc_act_title_1&smid=A1Z5N93LV61K2T
1946: [23:13:47] * Vedran__ has joined #silverstripe
1947: [23:14:09] <antmas> I find them much easier to fly than non fpv
1948: [23:14:47] <zippy> you fly them?
1949: [23:15:09] * NETim quit (Ping timeout: 246 seconds)
1950: [23:15:17] <antmas> my dad does
1951: [23:15:25] <antmas> he's got like 7 different quads :O
1952: [23:15:30] <zippy> interesting
1953: [23:15:58] <zippy> wonder what he'd go with for a starter
1954: [23:16:08] <zippy> I don't want a non fpv...
1955: [23:16:17] <antmas> he only has 1 fpv, and that was $1000
1956: [23:16:27] * frostfire_ quit (Ping timeout: 255 seconds)
1957: [23:16:37] <zippy> mmm yea they get up there fo sure
1958: [23:17:01] <antmas> I don't think he thought much about it, just saw in in the shop in auckland and just through money at the hobby shop counter
1959: [23:17:16] <zippy> lol
1960: [23:17:16] <antmas> threw*
1961: [23:18:30] <zippy> watching some of the quad racing and it's just like this; http://i.imgur.com/J9GFRUR.gif
1962: [23:18:40] <zippy> obv that one above isn't for racing, just for play play
1963: [23:18:45] * Colin[pi] has joined #silverstripe
1964: [23:19:12] <Colin[pi]> moin moin o/
1965: [23:19:21] * camfindlay quit (Quit: camfindlay)
1966: [23:20:09] <antmas> Colin[pi]: o/
1967: [23:20:11] <zippy> Colin[pi]: morning
1968: [23:20:16] * Stomach quit (Quit: zzz)
1969: [23:20:21] <zippy> antmas: so when is the water getting rid of the chlorine?
1970: [23:20:23] <Colin[pi]> zippy antmas: o/
1971: [23:20:45] <antmas> zippy: when the chemtrails stop
1972: [23:20:53] <antmas> idk
1973: [23:20:56] <zippy> antmas: http://www.tasman.govt.nz/council/media-centre/public-notices/richmond-water-being-treated-with-chlorine/ needs update
1974: [23:21:10] <zippy> been buying water, that shit is gross
1975: [23:21:36] <antmas> I'll ask
1976: [23:22:21] * Stomach has joined #silverstripe
1977: [23:22:40] <antmas> wonder what the contamination was
1978: [23:23:15] <Colin[pi]> antmas: spooge
1979: [23:23:21] <antmas> LOL
1980: [23:24:33] <antmas> zippy: updated :P
1981: [23:24:39] <antmas> not sure who just did that
1982: [23:25:09] <zippy> :P
1983: [23:25:49] <antmas> lol seems a bird decided to fly in and die in the water supply
1984: [23:26:11] <Colin[pi]> ick
1985: [23:26:20] <DanaeNZ> urgh
1986: [23:26:56] <antmas> zippy: so it *should* taste fine again soon?
1987: [23:27:25] <antmas> zippy: lol when I asked our media team if that was supposed to be updated, they looked at me like 'OH FUCK o.O
1988: [23:27:45] <Colin[pi]> haha
1989: [23:27:46] <zippy> lol
1990: [23:27:57] <zippy> us developers are always fixing things eh
1991: [23:28:14] <antmas> mm
1992: [23:29:12] <Colin[pi]> mmm, chlorinated dead bird water... YUMMY.
1993: [23:30:19] <zippy> nutritious
1994: [23:30:37] <zippy> you'd think the volume of water, it wouldn't of mattered, it'd get diluted a lot
1995: [23:30:56] <zippy> I guess could still effect someone
1996: [23:31:09] <zippy> last thing need is a bunch of silver tops dropping off at a rest home
1997: [23:31:12] <Colin[pi]> I think you've just summed up homeopathy zippy
1998: [23:31:15] <antmas> I think the test equiptment is pretty sensitive
1999: [23:31:32] <antmas> and nz govt has pretty strict regs on what is 'high' or 'low'
2000: [23:31:46] <Colin[pi]> better safe than soz
2001: [23:32:46] <Colin[pi]> jesus: http://www.theguardian.com/australia-news/2015/jul/03/adelaide-crows-coach-phil-walsh-murdered-police-say
2002: [23:32:54] <Colin[pi]> his own son :\
2003: [23:33:21] * camfindlay has joined #silverstripe
2004: [23:34:18] <Stomach> allegedly :P
2005: [23:34:24] * micmania1 quit (Read error: No route to host)
2006: [23:34:26] <Colin[pi]> :P
2007: [23:34:55] * camfindlay quit (Client Quit)
2008: [23:35:05] <antmas> mm saw that
2009: [23:35:14] <antmas> that gassing of the family is pretty bad too
2010: [23:35:31] <simon_w|air> It's okay, the minister will just revoke his citizenship
2011: [23:35:48] <Colin[pi]> simon_w|air: reluctant chuckle
2012: [23:37:06] <zippy> antmas: broken; http://www.tasman.govt.nz/tasman/webcams-in-tasman/construction-webcam/
2013: [23:37:41] <antmas> those cameras
2014: [23:37:51] <antmas> :|
2015: [23:38:22] <Colin[pi]> what is this, zippy criticise antmas' work day?
2016: [23:38:44] <zippy> Colin[pi]: he works at the council, my rates pay his wage, he's my slave
2017: [23:38:52] <zippy> antmas: I need a coffee
2018: [23:39:22] <zippy> The walls of the treatment plant have a textured surface to provide interest.
2019: [23:39:22] <zippy> lol
2020: [23:39:28] <antmas> zippy: corporate service salary budget isn't paid by rates \o/
2021: [23:39:47] <zippy> where does it come from? bribes and kick backs?
2022: [23:40:01] <antmas> fiik :P
2023: [23:40:34] <antmas> zippy: that cam runs on solar
2024: [23:40:45] <antmas> coming down this weekend apparently
2025: [23:40:47] <Colin[pi]> you see? coal is better
2026: [23:40:53] <antmas> :P
2027: [23:40:56] <zippy> :)
2028: [23:40:58] <Colin[pi]> abet was right
2029: [23:41:49] <antmas> someone mooned the rotoiti one recently
2030: [23:41:51] <antmas> :P
2031: [23:41:51] * veb has joined #silverstripe
2032: [23:42:50] * antmas sneaks in and adds targeted rates to zippy's account
2033: [23:43:02] <antmas> haaaaaayyyyyya! o/
2034: [23:43:21] * veb quit (Client Quit)
2035: [23:43:45] <Colin[pi]> antmas: http://i.imgur.com/zRJA4Ob.gif
2036: [23:48:23] * camfindlay has joined #silverstripe
2037: [23:49:08] <zippy> Command+` on the mac is very useful, for moving between windows of the same program
2038: [23:49:19] <hamror> yeah
2039: [23:49:25] <hamror> it's taken me 4 months to get used to osx
2040: [23:49:35] <hamror> but i can't imagine using windows to dev on anymore
2041: [23:49:44] <Stomach> zippy - I used that command all the time
2042: [23:49:55] <hamror> 2 terminal.app instances 50/50 split on my 11.6" macbook air
2043: [23:50:01] <hamror> 4g tethering
2044: [23:50:08] <hamror> all the heavy lifting on large vps machines
2045: [23:50:12] <hamror> mosh + ssh + screen
2046: [23:50:14] <hamror> = solid
2047: [23:50:22] <hamror> use cmd+` all the time
2048: [23:50:48] <hamror> shame one of my companies is a windows 8 based startup :<
2049: [23:52:09] <zippy> the pbcopy command on the termal is also quite good
2050: [23:52:21] <antmas> windows 8 based startup
2051: [23:52:27] <antmas> hamror: quit, now.
2052: [23:52:37] <hamror> i'm cofounder and it took 2 years to write the software
2053: [23:52:42] <hamror> so i'm a fair bit commited
2054: [23:53:04] <hamror> anyway working on a new startup now with silverstripe, so see how that one goes
2055: [23:53:46] <antmas> hamror: what is it?
2056: [23:54:02] <antmas> they had some big startup week in Nelson this week
2057: [23:54:04] <hamror> the new one? work flow tool for media scheduling
2058: [23:54:16] <hamror> we've already got 2 clients funding our build
2059: [23:54:18] <antmas> got copious requests for 'can you do some free work for us pls'
2060: [23:54:22] <hamror> going okay
2061: [23:54:25] <antmas> hamror: nice
2062: [23:58:23] * JohnJ_ has joined #silverstripe
2063: [23:59:10] * zlinux quit (Ping timeout: 250 seconds)

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