#silverstripe IRC Log

IRC log for 11 October 2013

All timestamps are in UTC.

1: [00:03:54] * wilr_ has joined #silverstripe
2: [00:06:19] * Jakx has joined #silverstripe
3: [00:08:27] <Jakx> simon_w, your suggestion to put the top level js files in the Contact/ template was a good one :D
4: [00:08:53] * UncleCheese quit (Quit: UncleCheese)
5: [00:12:06] * chillu quit (Quit: chillu)
6: [00:24:27] * Jakx quit (Ping timeout: 248 seconds)
7: [00:37:32] <unsignedint> row row row bite the flowah
8: [00:40:22] * Nmle has joined #silverstripe
9: [00:40:28] <Nmle> Hi guys,
10: [00:40:35] <guzzlefry> evening
11: [00:40:42] <Nmle> does anyone know who to sort by column in template
12: [00:40:58] <Nmle> I use sortable gridfield
13: [00:41:08] <Nmle> where there is a field called Sort with int value
14: [00:41:39] <Nmle> I call <% loop myItems %>
15: [00:41:46] <Nmle> but they are ordered by ID
16: [00:42:10] <Nmle> I want to call like <% loop myItems.BySort %>
17: [00:42:14] <guzzlefry> <% loop myItems.Sort(field) %> should do.
18: [00:43:04] <guzzlefry> http://doc.silverstripe.com/framework/en/reference/templates
19: [00:43:36] <Nmle> it works, thank you very much
20: [00:43:44] <guzzlefry> There's also $myItems.Limit(3) and $myItems.Reverse if you need those.
21: [00:43:46] <guzzlefry> Probably more.
22: [00:44:30] <Nmle> cool
23: [00:44:33] <Nmle> thanks
24: [00:44:33] <guzzlefry> Nmle: I *think* you can most of the functions in here: http://api.silverstripe.org/3.1/class-DataList.html
25: [00:44:36] <guzzlefry> np
26: [00:49:34] * UncleCheese has joined #silverstripe
27: [01:24:43] * Marvanni quit ()
28: [01:28:40] <BPower> If $Member instanceof Member, how do I get the CMS edit link for the $Member?
29: [01:29:02] * Pyromanik doof doofs all over the show
30: [01:29:29] <ss23> doof doof
31: [01:32:26] <wilr_> BPower it's always at admin/myprofile
32: [01:32:49] <BPower> wilr_: correct, for the current Member, but what if it's another member?
33: [01:32:54] <BPower> (and thanks)
34: [01:32:59] <wilr_> Or /admin/security/EditForm/field/Members/item/ $Member->ID /edit
35: [01:35:58] * SightUnseen has joined #silverstripe
36: [01:36:32] * SightUnseen has left #silverstripe
37: [01:46:28] * simon_w quit (Quit: This computer has gone to sleep)
38: [02:04:18] * DigNZ quit (Quit: DigNZ)
39: [02:26:30] <guzzlefry> So with template Layouts/Pages, will the template engine just keep moving up through the hierarchy until it finds a template that matches one of the class names?
40: [02:27:10] * DigNZ has joined #silverstripe
41: [02:27:11] * DigNZ quit (Remote host closed the connection)
42: [02:27:25] * DigNZ has joined #silverstripe
43: [02:34:13] <Pyromanik> ss23: yeh, doof doof.
44: [02:34:15] <Pyromanik> http://www.youtube.com/watch?v=18D3s_s0di4
45: [02:34:52] <Colin[pi]> nice pic on that video ;o
46: [02:36:23] <guzzlefry> recommended videos also :P
47: [02:36:32] <guzzlefry> It's a trap!
48: [02:39:34] <guzzlefry> hm
49: [02:40:39] <guzzlefry> Given a dataobject, I need to find the previous and next one as well.
50: [02:40:50] <Colin[pi]> in terms of what?
51: [02:40:51] <Colin[pi]> ID?
52: [02:40:55] <Colin[pi]> position in list?
53: [02:41:15] <guzzlefry> position in list
54: [02:41:28] <guzzlefry> They're going to be sorted on a certain field.
55: [02:41:36] <guzzlefry> and filtered by type.
56: [02:42:26] <Colin[pi]> so the DO itself needs to know it's position in the list?
57: [02:42:32] <guzzlefry> yep
58: [02:44:16] * Colin[pi] quit (*.net *.split)
59: [02:44:18] * ooystein quit (*.net *.split)
60: [02:44:22] * SightUnseen has joined #silverstripe
61: [02:44:35] * Colin[pi] has joined #silverstripe
62: [02:44:36] * ooystein has joined #silverstripe
63: [02:44:46] <Colin[pi]> guzzlefry: so the DO will need a reference to it's own list
64: [02:47:58] <Colin[pi]> I hate you so much IE
65: [02:48:16] <guzzlefry> ah okay
66: [02:48:30] <guzzlefry> is there a "search for X in list" function?
67: [02:48:46] <guzzlefry> wait, I'll check. :P
68: [02:48:53] <Colin[pi]> :P
69: [02:56:34] <guzzlefry> Can you compare DataObjects with ==?
70: [02:57:32] <Pyromanik> Colin[pi]: yeh, you'd doof doof that eh.
71: [02:57:53] <Colin[pi]> Pyromanik: I'd doof doof the hell outta it
72: [02:58:09] <Colin[pi]> guzzlefry: std php oop allows for == and === on objects
73: [02:59:33] <guzzlefry> Colin[pi]: I thought that just compared references unless __equals() or something was implemented?
74: [02:59:50] <Colin[pi]> try it and see
75: [03:00:59] <guzzlefry> ah, nevermind, found something else.
76: [03:01:07] <guzzlefry> So I don't have to ghetto implement. :P
77: [03:01:17] <guzzlefry> DataObject::getIDList()
78: [03:05:15] <Pyromanik> guzzlefry: I think you're thinking of Java, or C++
79: [03:05:30] <guzzlefry> probably...
80: [03:05:32] <Pyromanik> idk
81: [03:05:37] <guzzlefry> taking a class in Java at the moment. :P
82: [03:05:39] <Pyromanik> Just chiming in with shit I dunno
83: [03:06:45] <guzzlefry> well
84: [03:06:50] <guzzlefry> I'm mixing the two up now. :P
85: [03:07:04] <guzzlefry> forgetting to put $ in front of variables in PHP, and forgetting to declare types on variables in Java.
86: [03:07:06] <guzzlefry> fun times :)
87: [03:10:21] * zippy__ quit (Quit: zippy__)
88: [03:15:35] <Pyromanik> That moment when you tell jquery to make an ajax post, and it gets instead.
89: [03:15:39] <Pyromanik> wtf
90: [03:16:19] <ss23> lol
91: [03:16:19] <Colin[pi]> 100% sure it was supposed to be a post?
92: [03:16:35] <Pyromanik> turns out
93: [03:17:17] <Pyromanik> $.ajax({url:"blah", method:'POST'})... the method setting declaration is "type"
94: [03:17:35] <Colin[pi]> wat
95: [03:18:35] <Pyromanik> $.ajax({url:"blah", type:'POST'})
96: [03:18:45] <Colin[pi]> oh
97: [03:18:58] <Colin[pi]> well that's not keeping with the nomenclature
98: [03:20:40] <Colin[pi]> method isn't a reserved word in JS is it?
99: [03:22:03] <Pyromanik> not inside an object definition
100: [03:22:08] <Pyromanik> object literal
101: [03:22:14] * SightUnseen quit (Quit: Leaving.)
102: [03:25:46] * EasyCo has joined #silverstripe
103: [03:26:19] <Colin[pi]> JS always annoys the crap out of me
104: [03:27:28] <guzzlefry> yay prototypical oop :P
105: [03:31:16] * cloph quit (Read error: Operation timed out)
106: [03:31:56] * cloph_away has joined #silverstripe
107: [03:34:23] * joelpittet quit (*.net *.split)
108: [03:34:24] * AlphaCactus quit (*.net *.split)
109: [03:34:25] * Mayzie quit (*.net *.split)
110: [03:34:26] * mobiusnz quit (Quit: Leaving.)
111: [03:34:34] * Mayzie has joined #silverstripe
112: [03:34:40] * Mayzie quit (Changing host)
113: [03:34:40] * Mayzie has joined #silverstripe
114: [03:34:55] * AlphaCactus has joined #silverstripe
115: [03:34:56] * joelpittet has joined #silverstripe
116: [03:37:20] * Jakx has joined #silverstripe
117: [03:39:25] <Pyromanik> WEEKEND! \o/
118: [03:39:27] * Pyromanik quit (Quit: leaving)
119: [03:39:52] <guzzlefry> what
120: [03:39:55] <guzzlefry> it's only Thursday!
121: [03:40:53] <ss23> :O
122: [03:40:55] <ss23> NO IT'S NOT
123: [03:40:59] <ss23> DON"T PLAY GAMES WITH MY HEART, guzzlefry
124: [03:41:12] <guzzlefry> It is in AMERICA
125: [03:41:13] <guzzlefry> well
126: [03:41:21] <guzzlefry> it will be Friday in 22 minutes. :P
127: [03:46:30] * wilr_ quit (Quit: wilr_)
128: [03:47:57] <Colin[pi]> OOMPA LOOMPA
129: [03:48:50] <guzzlefry> DOOPITY DOO
130: [03:49:11] <Colin[pi]> I'VE GOT ANOTHER RIDDLE FOR YOU
131: [03:49:37] * Jakx has left #silverstripe
132: [03:49:49] <guzzlefry> bring it bro
133: [03:50:59] <EasyCo> How do I keep Silverstripe from rendering a URL in its infrastructure?
134: [03:51:20] <EasyCo> I've got this random folder with an index.html file but SS keeps handling the URL
135: [03:51:43] * SightUnseen has joined #silverstripe
136: [03:51:59] <UncleCheese> if you look at the .htaccess file, it explicitly says if the request is for a file that exists, then show it
137: [03:52:20] <UncleCheese> that allows for things like images and css, but also custom php scripts
138: [03:52:23] * SightUnseen has left #silverstripe
139: [03:53:20] <EasyCo> Hm, yah that's what I thought. Thanks. Something weird is amiss
140: [03:53:35] <UncleCheese> you'll have to mod the htaccess to excludeit
141: [03:54:02] <EasyCo> No no, I want that behaviour
142: [03:54:06] <EasyCo> and that's the behaviour I'm' used to
143: [03:54:23] <EasyCo> But for some reason, some new folder not he server is throwing a 404
144: [03:55:07] * DigNZ quit (Quit: DigNZ)
145: [04:01:31] * nickmolhoek quit (Quit: nickmolhoek)
146: [04:02:24] * coldblooded01 quit (Quit: coldblooded01)
147: [04:05:20] * stecman quit (Quit: This computer has gone to sleep)
148: [04:05:32] * UncleCheese quit (Quit: UncleCheese)
149: [04:06:24] * stecman has joined #silverstripe
150: [04:13:12] * stecman quit (Quit: This computer has gone to sleep)
151: [04:15:33] * Shrike_Finland1 quit (Quit: Leaving.)
152: [04:49:22] * DesignerX has joined #silverstripe
153: [04:58:48] <spronk> omfg
154: [04:58:48] <spronk> FUCK PDO
155: [04:58:53] <spronk> and FUCK PDO_ODBC
156: [05:01:19] * willr has joined #silverstripe
157: [05:20:42] <Nmle> Guys, I have a constant defined in _config.php like define('defaultChannel', 'Online'); SS 3.1.1 complains Notice: Use of undefined constant defaultChannel - assumed 'defaultChannel' in C:\xampp\htdocs\sfc\framework\core\manifest\ConfigStaticManifest.php(333) : eval()'d code on line 1
158: [05:21:17] <Nmle> it seems it is accessed before declaration is reached
159: [05:21:19] * joelpittet quit (Remote host closed the connection)
160: [05:24:16] * geekdenz has joined #silverstripe
161: [05:24:50] <BPower> I heard "Replace File" was coming to UploadFields in 3.1... How do I enable it?
162: [05:25:05] <willr> Nmle where do you access it?
163: [05:26:40] <geekdenz> hopefully a quick question: how do i removeFieldFromTab the "Navigation label" from settings in a page class that extends SiteTree?
164: [05:27:17] * Shrike_Finland has joined #silverstripe
165: [05:28:35] <geekdenz> in fact i had trouble removing any fields from the settings tab
166: [05:29:18] <willr> geekdenz removeByName('MenuTitle')
167: [05:29:45] <Nmle> @willr, accessing in databobjects and pages but all was good in SS 3.0
168: [05:30:00] <Nmle> it happened in SS 3.1.1
169: [05:30:12] <Nmle> as I declare it in _config of mysite
170: [05:30:21] <Nmle> it should be available everywhere, right?
171: [05:30:33] <willr> sounds like something is loading before your _config.php file
172: [05:30:50] <Nmle> yah
173: [05:30:55] <geekdenz> Thanks! How do I figure out the names?
174: [05:31:14] <Nmle> there is this one in config.yml. can it affect?
175: [05:31:15] <Nmle> Name: ticketsdotcom After: 'framework/*','cms/*'
176: [05:31:45] <Nmle> can the After force this module to be loaded after framework?
177: [05:31:57] <geekdenz> i think i found it in SiteTree->fieldLabels() Thanks again!
178: [05:32:41] <willr> geekdenz you can see the names by looking at the source of the CMS markup as well. That is what I normally do on sites I've never worked with
179: [05:38:03] <geekdenz> mh i found $labels['ParentType'] = _t('SiteTree.PARENTTYPE', "Page location");
180: [05:38:04] <geekdenz> and wanted to remove it by
181: [05:38:04] <geekdenz> $fields->removeByName('ParentType');
182: [05:38:04] <geekdenz> but that didn't work. Am i still looking in the wrong place?
183: [05:46:01] <geekdenz> seems like i cannot remove fields from the Settings tab
184: [05:48:15] <geekdenz> running ss 3.1
185: [05:51:45] <geekdenz> needed to overwrite
186: [05:51:46] <geekdenz> public function getSettingsFields
187: [05:51:46] <geekdenz> cheers
188: [05:53:37] * willr quit (Quit: willr)
189: [05:53:54] <Colin[pi]> "Haven’t used SilverStripe before but I am sure the kiwis couldn’t have gone too crazy with their CMS"
190: [05:54:00] <Colin[pi]> actual quote from someone on email lol
191: [05:59:15] * EasyCo_ has joined #silverstripe
192: [06:00:37] * EasyCo quit (Ping timeout: 272 seconds)
193: [06:00:38] * EasyCo_ is now known as EasyCo
194: [06:03:12] <BPower> Colin[pi]: HAH!
195: [06:12:28] * EasyCo quit (Ping timeout: 264 seconds)
196: [06:23:45] * SightUnseen has joined #silverstripe
197: [06:23:47] * SightUnseen has left #silverstripe
198: [06:33:16] * simon_w has joined #silverstripe
199: [06:37:42] <Nmle> It looks like SS 3.1.1 loads modules alphabetically
200: [06:37:53] <Nmle> wondering whether there is a way to define priority
201: [06:37:57] <Nmle> it is very strange
202: [06:38:09] <Nmle> it didnt happen in SS 3.0
203: [06:38:39] <Nmle> I want the project module to load first
204: [06:38:59] * SightUnseen has joined #silverstripe
205: [06:39:16] * SightUnseen has left #silverstripe
206: [06:57:30] <simon_w> Nmle, the problem comes from you using a constant as the value of one of your statics, and the static manifest then tries to load that value before it's defined
207: [07:02:37] * Bollig|DesignCty has joined #silverstripe
208: [07:03:23] <guzzlefry> So is the routes.yml file the only way to set routes up?
209: [07:03:56] <simon_w> Nope
210: [07:04:03] <guzzlefry> oh wait, I see it now.
211: [07:04:30] <guzzlefry> Wish I had known about this months ago.
212: [07:04:38] <guzzlefry> I was doing ugly things like ?id :P
213: [07:06:18] * spronk2 has joined #silverstripe
214: [07:07:17] * Nmle quit (Ping timeout: 250 seconds)
215: [07:07:37] * Marvanni has joined #silverstripe
216: [07:08:04] * Sjohn has joined #silverstripe
217: [07:08:21] <Sjohn> Morning
218: [07:11:58] <spronk2> 'evening
219: [07:12:22] <Colin[pi]> evening
220: [07:16:53] * Stomach quit (Ping timeout: 248 seconds)
221: [07:17:39] <Sjohn> you guys still working?
222: [07:18:05] <Bollig|DesignCty> working hard or harld working, amirite?
223: [07:18:16] <spronk2> harld?
224: [07:18:18] <spronk2> lul.
225: [07:19:12] <Bollig|DesignCty> yup, it's a typo. not really a funny one either, if i'd accidentally written penis, that might have warranted a lul
226: [07:19:41] <lewellyn> working hard or penis working
227: [07:19:48] <lewellyn> nope
228: [07:20:22] <guzzlefry> 0.o
229: [07:29:40] * ocm has joined #silverstripe
230: [07:29:48] <ocm> howdy!
231: [07:37:37] <Sjohn> Good day to you sir,
232: [07:40:46] * violetina has joined #silverstripe
233: [07:44:53] <guzzlefry> eep
234: [07:45:27] <guzzlefry> simon_w: Do I need :ExactMatch on 3.1-dev in order to filter many-many relations?
235: [07:52:28] * BPower quit (Remote host closed the connection)
236: [07:55:56] * zfmf1 has joined #silverstripe
237: [07:57:47] <zfmf1> did anyone know a catalog module without shopping features , only to show categories, subcategories, subsubcategories... products :)
238: [07:57:53] * zfmf1 is now known as zfmf
239: [07:58:13] * zfmf is now known as skorp
240: [07:58:31] * Marvanni quit (Ping timeout: 245 seconds)
241: [07:59:03] * chillu has joined #silverstripe
242: [07:59:33] <spronk2> skorp: its pretty easy just to buld yourself one
243: [07:59:59] <spronk2> class Product extends Page {} class Category extends Page { $allowed_children = array('Product')
244: [08:00:03] <spronk2> etc
245: [08:00:23] * Marvanni has joined #silverstripe
246: [08:02:01] <skorp> spronk2: i know , but i want to know if there is an existing one :)
247: [08:02:23] * spronk2 isn't aware of any… looked at addons.ss.org?
248: [08:03:16] <skorp> yep nothing found about catalog :) thanks
249: [08:15:26] * qlex has joined #silverstripe
250: [08:20:43] * ARNHOE has joined #silverstripe
251: [08:25:20] * kinglozzer has joined #silverstripe
252: [08:25:49] * outrunthewolf has joined #silverstripe
253: [08:26:11] <guzzlefry> guys, before I go through a lot of coding, is there a way, given an ID, to get the two adjacent DataObjects in a DataList?
254: [08:28:16] <guzzlefry> oh, SS_Map looks promising.
255: [08:29:35] * Zauberfisch__ has joined #silverstripe
256: [08:33:20] * Zauberfisch_ quit (Ping timeout: 245 seconds)
257: [08:34:08] <guzzlefry> Think everyone passed out. :P
258: [08:44:04] * micmania1 has joined #silverstripe
259: [08:55:47] <simon_w> guzzlefry, $list->filter('ID:LessThan', $item->ID)->Last() and $list->filter('ID:GreaterThan', $item->ID)->First() (assuming sorted from lowest to highest)
260: [08:56:29] <guzzlefry> simon_w: I've already ghetto implemented! :P
261: [08:57:46] <guzzlefry> simon_w: http://bpaste.net/show/YHsgM8TJRClNSWez7htM/ cringe at its hideousness. :P
262: [08:57:50] <guzzlefry> Also, thank you
263: [08:57:56] * guzzlefry deletes the hideous.
264: [09:00:21] * Marvanni quit (Ping timeout: 248 seconds)
265: [09:00:41] * Marvanni has joined #silverstripe
266: [09:01:36] * Guits has joined #silverstripe
267: [09:02:15] * guci0 has joined #silverstripe
268: [09:02:19] <guci0> Hello Moto!
269: [09:04:44] <Guits> How can you handle unique values in the CMS .. I can have a unique key but there is no error handling for that as far as i can see
270: [09:07:18] * SightUnseen has joined #silverstripe
271: [09:07:47] * SightUnseen quit (Client Quit)
272: [09:11:25] <Guits> anyone? uniqe textfield?
273: [09:11:34] <Guits> ..Unique
274: [09:13:05] * osterlaus has joined #silverstripe
275: [09:13:06] <guzzlefry> Guits, Check in onBeforeWrite?
276: [09:13:12] * osterlaus has left #silverstripe
277: [09:13:16] * ARNHOE quit (Read error: Connection reset by peer)
278: [09:13:49] * ARNHOE has joined #silverstripe
279: [09:16:53] <guzzlefry> Guits: You might run into race conditions, but I'm not positive.
280: [09:17:22] <kinglozzer> Guits: Would this help? https://github.com/svandragt/silverstripe-ajaxuniquetextfield
281: [09:51:31] <chillu> simon_w: https://github.com/silverstripe/silverstripe-framework/pull/2525
282: [09:51:52] <chillu> What a mission...
283: [10:00:27] * Marvanni quit (Ping timeout: 248 seconds)
284: [10:00:55] * Marvanni has joined #silverstripe
285: [10:09:52] * Bollig|DesignCty quit (Quit: Bollig|DesignCty)
286: [10:11:25] <Guits> Thanx guzzlefry and kinglozzer .. will check asap
287: [10:11:26] * travis-ci has joined #silverstripe
288: [10:11:27] <travis-ci> [travis-ci] chillu/silverstripe-framework#89 (pulls/tree-node-parent-refresh - a1fb430 : Ingo Schommer): The build has errored.
289: [10:11:27] <travis-ci> [travis-ci] Change view : https://github.com/chillu/silverstripe-framework/compare/e49d247fba68^...a1fb43005c99
290: [10:11:27] <travis-ci> [travis-ci] Build details : http://travis-ci.org/chillu/silverstripe-framework/builds/12409865
291: [10:11:27] * travis-ci has left #silverstripe
292: [10:11:48] * travis-ci has joined #silverstripe
293: [10:11:49] <travis-ci> [travis-ci] chillu/silverstripe-framework#90 (pulls/tree-node-parent-refresh - 6c96c49 : Ingo Schommer): The build passed.
294: [10:11:49] <travis-ci> [travis-ci] Change view : https://github.com/chillu/silverstripe-framework/compare/a1fb43005c99...6c96c490c6d6
295: [10:11:49] <travis-ci> [travis-ci] Build details : http://travis-ci.org/chillu/silverstripe-framework/builds/12409957
296: [10:11:49] * travis-ci has left #silverstripe
297: [10:13:49] * ARNHOE_ has joined #silverstripe
298: [10:13:52] * travis-ci has joined #silverstripe
299: [10:13:53] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#1224 (3.1 - 9c75fc0 : Ingo Schommer): The build passed.
300: [10:13:53] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/829b45af67f6...9c75fc06e7d4
301: [10:13:53] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/12410206
302: [10:13:53] * travis-ci has left #silverstripe
303: [10:17:45] * ARNHOE quit (Ping timeout: 272 seconds)
304: [10:40:56] * chillu quit (Quit: chillu)
305: [11:00:36] * Marvanni quit (Ping timeout: 252 seconds)
306: [11:09:16] * qlex has left #silverstripe
307: [11:11:25] * Alexw has joined #silverstripe
308: [11:11:32] <Alexw> Hi guys
309: [11:15:42] <Colin[pi]> hiya
310: [11:17:14] * Marvanni has joined #silverstripe
311: [11:19:45] <Alexw> Is it possible to create a module that adds a global form on each page, at the bottom?
312: [11:19:54] <Alexw> A contact form
313: [11:27:55] <ocm> create a ContactForm class and in your page controller call your ContactForm
314: [11:28:01] <ocm> atleast I would do it that way
315: [11:28:27] <ocm> or put the form in your page class self
316: [11:28:36] <ocm> which you can call in your template
317: [11:29:25] <Alexw> Maybe create an extension that include it in the page
318: [11:29:48] <Alexw> So it does not conflict with other modules that modify the page class
319: [11:32:34] <ss23> Alexw: It would have to be in the template
320: [11:33:03] <Alexw> Is it possible to do it globally, so every theme works with it
321: [11:33:25] <ss23> Alexw: Uh, not really. How would it know where in the HTML to put it?
322: [11:33:32] * swordsmanz has joined #silverstripe
323: [11:33:49] <ss23> SilverStripe doesn't impose strict requirements on HTML that would be needed to do that
324: [11:34:27] <Alexw> And it is not possible to modify the $Layout variable to include a template from a module
325: [11:34:30] <Alexw> ?
326: [11:34:49] <ss23> Probably is, but that doesn't help, because themes don't split up templates in teh right ways to make that work
327: [11:34:53] <ss23> You would still end up with broken stuff
328: [11:35:18] <ss23> It just doesn't make sense, conceptually, to allow or do that
329: [11:36:11] <Alexw> I guess the only way is then to override Page.ss with a module
330: [11:36:18] <Alexw> Is it possible to create a theme inside a module
331: [11:36:51] <Alexw> If not I guess I just add the theme to be required for the module
332: [11:37:50] <Alexw> Using the underscore right
333: [11:37:52] <Alexw> For modules
334: [11:45:12] <Colin[pi]> up late ss23?
335: [11:45:44] <Alexw> It's 13:45 here lol
336: [11:45:53] <Colin[pi]> not in NZ!
337: [11:46:18] <ss23> :D
338: [11:46:23] <ss23> Colin[pi]: went out tonight, but not too late for a FRiday
339: [11:46:47] <Colin[pi]> ^.^
340: [11:48:10] <Alexw> Btw, I added a _ss_environment.php file. But SS does not load it
341: [11:48:20] <Alexw> Now it complains about the databaseConfig variable
342: [11:52:00] <Alexw> I read: http://doc.silverstripe.org/framework/en/topics/environment-management
343: [11:52:10] <Alexw> I also tried to include "require_once("conf/ConfigureFromEnv.php");"
344: [11:52:16] <Alexw> Although I don that file
345: [11:53:06] <Alexw> Any suggestions?
346: [11:54:08] <Alexw> Oh, I have that file in the framework fo;der
347: [11:54:31] <Alexw> Nvm, fixed it
348: [11:55:01] <kinglozzer> Hmm, if I've an API such as 'api/search/{model}/{filters}' and the 'model' is invalid, which status code should I return?
349: [11:55:31] <kinglozzer> 200 and some error text? Or 4xx/5xx?
350: [11:55:39] <kinglozzer> Well, probably not 5xx
351: [11:56:24] <ocm> 200 neither, since it was not succesful
352: [11:56:36] <ocm> somewhere in the 400 should be good
353: [11:56:42] <kinglozzer> 403?
354: [11:56:49] <ocm> 418!
355: [11:56:55] <kinglozzer> Sounds wrong, but when you read all the descriptions it's the most accurate
356: [11:57:09] <Alexw> There is no 418 :)
357: [11:57:10] <kinglozzer> Heh
358: [11:57:16] <ocm> there is a 418 alex
359: [11:57:20] <kinglozzer> Alexw: Yes there is :P
360: [11:57:21] <Alexw> http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
361: [11:57:23] <kinglozzer> 418: I'm a teapot
362: [11:57:24] <ocm> certainly you dont like any tea!
363: [11:57:47] <kinglozzer> "The request was a valid request, but the server is refusing to respond to it."
364: [11:57:51] <kinglozzer> 403 sounds like the one
365: [11:57:54] <ss23> 00:50:28 < Alexw> Btw, I added a _ss_environment.php file. But SS does not load it
366: [11:57:55] <Alexw> Maybe a 410 :)
367: [11:57:58] <ss23> spell it right
368: [11:58:00] <ss23> :P
369: [11:58:02] <ss23> wait
370: [11:58:03] <ss23> you did
371: [11:58:04] <ss23> my bad!
372: [11:58:09] <ocm> what about 406 ?
373: [11:58:09] <Alexw> lol
374: [11:58:21] <ocm> invalid vs. not acceptable
375: [11:58:35] <Alexw> 410 Gone
376: [11:58:43] <Alexw> "he requested resource is no longer available at the server."
377: [11:58:58] <ocm> but it never was available, because it was invalid
378: [11:59:03] <Alexw> 400 Bad Request
379: [11:59:05] <ocm> something that never was cannot be gone
380: [11:59:07] <kinglozzer> Well, it was never available :P
381: [11:59:23] <ocm> so its nog gone kinglozzer
382: [11:59:34] <kinglozzer> 406 specifies that the request failed because of the 'Accept' headers, though
383: [11:59:45] <Alexw> What if it did exists in the past?
384: [11:59:51] <kinglozzer> It didn't :)
385: [11:59:58] <Alexw> For example from a previous version
386: [12:00:05] * Marvanni quit (Ping timeout: 272 seconds)
387: [12:00:10] <ocm> then its outdated
388: [12:00:11] <ocm> not gone
389: [12:00:35] <Alexw> Maybe 501 Not Implemented?
390: [12:00:39] <kinglozzer> Screw it, 403 and a message :P
391: [12:00:46] * Marvanni has joined #silverstripe
392: [12:00:52] <ocm> cant you put a combination of errorcodes?
393: [12:00:58] <ocm> combined up to a sum of 666
394: [12:00:59] <Alexw> Nope
395: [12:01:05] <Alexw> But you can change the message
396: [12:01:06] <ocm> and rturn the message "this is the devils work"
397: [12:01:07] <ocm> :D
398: [12:01:14] <Alexw> For example: 404 Nothing to see here
399: [12:01:42] <Alexw> The browser (as far as I know) only look at the HTTP Code
400: [12:01:45] <Alexw> Not the message
401: [12:02:04] <kinglozzer> SilverStripe doesn't support 418 :(
402: [12:02:18] <lewellyn> how about 420?
403: [12:02:59] <kinglozzer> lewellyn: SilverStripe doesn't like 420 either :/
404: [12:03:16] <Alexw> Btw, why not use a 404 code?
405: [12:03:18] <kinglozzer> https://github.com/silverstripe/silverstripe-framework/blob/3.1/control/HTTPResponse.php#L113-L120
406: [12:03:20] <Alexw> Since it does not exists
407: [12:04:39] <lewellyn> no 402!? :(
408: [12:04:55] <Alexw> So we can't accept any payments...damn!
409: [12:05:05] <kinglozzer> :(
410: [12:05:06] <ocm> kinglozzer, looking at that list, wouldnt 422 do it?
411: [12:05:14] <ocm> 420 message? what is that about
412: [12:05:18] <ocm> to high to respond?
413: [12:05:21] <kinglozzer> :P
414: [12:05:21] <ocm> to stoned to think?
415: [12:05:35] <lewellyn> 422 is webdav-related.
416: [12:05:43] <ocm> or does it just start throwing marijuana out? :d
417: [12:05:52] <Alexw> 417 Expectation Failed
418: [12:05:54] <kinglozzer> Why are SS_HTTPResponse::$status_codes not private static? :(
419: [12:05:59] <kinglozzer> Then we could add them :D
420: [12:06:00] <lewellyn> ocm: http://httpstatusdogs.com/420-enhance-your-calm
421: [12:06:15] <lewellyn> Alexw: only valid if an Expect header was sent by the UA
422: [12:06:20] <ocm> haha
423: [12:06:42] <Alexw> "the server has unambiguous evidence" :)
424: [12:06:59] <lewellyn> that's why i find the lack of 402 odd, since things like 417 wouldn't likely ever be sent by silverstripe. especially not 422.
425: [12:07:21] <Alexw> Or you could just throw: 504 On coffee break
426: [12:07:34] <Alexw> Oh wait
427: [12:07:39] <Alexw> Should be 503 :)
428: [12:07:40] * UndefinedOffset has joined #silverstripe
429: [12:07:52] <Alexw> 503 On coffee break
430: [12:08:05] <ocm> 503 is just unavaible server
431: [12:08:06] <ocm> isnt it?
432: [12:08:10] <Alexw> Yes
433: [12:08:18] <Alexw> Service Unavailable
434: [12:08:26] <ocm> server should have been service there
435: [12:08:26] <ocm> haha
436: [12:09:10] * kinglozzer lunch
437: [12:09:17] <lewellyn> why isn't it available? would 451 do it?
438: [12:09:17] <lewellyn> 451 is probably legit to add to that list
439: [12:09:17] <lewellyn> http://tools.ietf.org/html/draft-tbray-http-legally-restricted-status-03
440: [12:10:25] <Alexw> http://tinyurl.com/63sdu6h
441: [12:15:06] <ocm> why you think 451 needs to be added to silverstripe?
442: [12:15:27] <ocm> when the law takes down your site all contents get wiped
443: [12:17:09] <lewellyn> it's not "the law takes down your site", it's "we can't show this to you"
444: [12:17:49] <ocm> I thought 451 was supposed for website that had been taken down by legal means
445: [12:18:12] <lewellyn> no, it's intended for locality-imposed censorship. specifically .uk's right now.
446: [12:18:39] <Alexw> 450 Blocked by Parental Controls:
447: [12:19:09] <lewellyn> pretty much, if you end up on the censorship list, you get two choices: 1) get your whole domain blocked by all ISPs in the country; 2) you return an error for the URIs in question for people visiting from the country.
448: [12:19:35] <ocm> ah I see
449: [12:19:40] <lewellyn> google proposes 451 (reference to the book) since 403 isn't specific enough.
450: [12:20:06] <lewellyn> wikipedia was subject to #1 a couple times briefly in .uk, btw.
451: [12:21:37] <lewellyn> the one in 2008 was when ISPs started being a bit more... careful... with wikipedia. http://en.wikinews.org/wiki/British_ISPs_restrict_access_to_Wikipedia_amid_child_pornography_allegations
452: [12:22:12] <ss23> Every time a person view that pages, that little girl is violated and abused again.
453: [12:22:30] <Alexw> Does anyone know a good tutorial to add a admin page to the cms?
454: [12:23:08] <ss23> Alexw: There are no good tutorials on it I've found >.<
455: [12:23:16] <ss23> Though if you find one, a link would be apperciated, Alexw :D
456: [12:23:41] <lewellyn> this is also why most uk isps have transparent proxies
457: [12:24:43] <ss23> I fucking hate censorship
458: [12:24:56] <ss23> Like somehow Western societys morales these days mean jack shit
459: [12:24:56] <ss23> rawr
460: [12:24:58] <ss23> Makes me so mad
461: [12:25:33] <ocm> ss23 did you join Anonymous?
462: [12:25:49] <ocm> I think they provide a way of censorship, starting with censoring themselves out, to become anonymous
463: [12:25:59] <Alexw> Did you know that Pirate Bay is blocked here in The Netherlands :)
464: [12:26:12] <ss23> lol
465: [12:26:14] <ocm> alexw
466: [12:26:20] <ocm> www.pirateproxy.me
467: [12:26:23] <ocm> works like a charm here
468: [12:26:24] <Alexw> Yes, I know
469: [12:26:35] <ocm> even on the 3g and 4g
470: [12:26:38] <ocm> atleast on vodafone
471: [12:26:42] <Alexw> I wanted to make an example how good censorshipment is :)
472: [12:26:55] <ss23> Alexw: ;_;
473: [12:27:00] <ss23> I hope that's sarcasm, boy!
474: [12:27:05] <ocm> hahaha
475: [12:27:12] <ocm> the censorship in the netherlands is rediculous
476: [12:27:22] <ocm> piratebay gets blocked
477: [12:27:34] <Alexw> Downloading torrent did not decrease like Brein expected, But it increased
478: [12:27:34] <ocm> netflixs breaks into our privacy, and we cannot do anything against it
479: [12:27:38] <ocm> because its not a dutch company
480: [12:28:05] <Alexw> I tried Netflix for a month here. But the assortment is not big enough yet
481: [12:28:17] <ocm> oh I like to browse randomness
482: [12:28:23] <ocm> netflix is the perfect hangover entertainment
483: [12:28:27] <ocm> justy press play and its keeps going
484: [12:28:27] <ocm> :D
485: [12:28:34] <Alexw> :)
486: [12:40:06] <Alexw> Is that hard to create a new admin page
487: [12:40:14] <Alexw> That uses a custom controller
488: [12:42:46] <Alexw> Maybe I used ModelAdmin
489: [12:43:00] <Alexw> But how to modify it that it don't need models
490: [12:43:19] <Alexw> I want to create an admin page where I can manage the module that got installed
491: [12:43:34] <Alexw> modules*
492: [12:59:33] <Alexw> Does nobody have any suggestion??
493: [13:01:32] * Marvanni quit (Ping timeout: 272 seconds)
494: [13:01:41] <kinglozzer> Alexw: You'll need to extend LeftAndMain instead of ModelAdmin, look at SecurityAdmin for an example
495: [13:01:50] <kinglozzer> Ignore that
496: [13:01:55] <Alexw> hm
497: [13:01:57] <kinglozzer> Look at the CMS site settings admin
498: [13:02:05] <Alexw> ok
499: [13:02:44] <kinglozzer> CMSSettingsController.php
500: [13:09:30] <Alexw> Ok thanks
501: [13:09:35] <Colin[pi]> how the cock do I get $_FILE_TO_URL_MAPPING working on winblows?
502: [13:09:46] <Colin[pi]> doesn't seem to work no matter what path I use
503: [13:09:50] <Alexw> Do you know how to fix the blank screen when refreshing the new controller
504: [13:10:43] <Alexw> When you refresh a standard page he will load the cms again and then the page
505: [13:10:51] <Alexw> With my custom page he just stay blank
506: [13:10:58] <kinglozzer> Anyone know if it's possible to insert routes before framework#coreroutes?
507: [13:11:29] <Alexw> Wow, a lot of question in the last 2 min :)
508: [13:11:39] <Alexw> 3 different people, all got a question
509: [13:11:54] <Colin[pi]> when it rains it pours
510: [13:11:56] <Colin[pi]> :D
511: [13:12:26] <Alexw> Fixed my issue, seems a ?flush=all issue
512: [13:12:57] <Colin[pi]> I want a t-shirt that says KEEP CALM AND ?FLUSH=ALL
513: [13:14:12] <ocm> how to attach a file from uploadfield in a form to the email that got send?
514: [13:14:16] <ocm> 4th question there
515: [13:14:23] <ocm> though I would like some usable answer
516: [13:14:24] <ocm> I gave up
517: [13:14:47] <ocm> http://sspaste.com/paste/show/525565cc07ba1 line #51
518: [13:14:57] <ocm> its incorrect, that is all I know
519: [13:20:50] * svandragt has joined #silverstripe
520: [13:21:54] <svandragt> I have a datalist but one of the row's values is dynamically determined by a dataclass' method, can I filter the datalist for the resulting value?
521: [13:22:05] <svandragt> in this case it's dependent on today's date
522: [13:23:49] <Sjohn> How can i use a function on a different controller on the Page.php?
523: [13:35:03] * Marvanni has joined #silverstripe
524: [13:37:09] <Alexw> I'm trying to find the default template of my new custom admin page
525: [13:37:27] <Alexw> But every template that I duplicate and name the same as my controller
526: [13:37:37] <Alexw> Gets exacly output as in the template
527: [13:37:42] <Alexw> Without the cms around it
528: [13:38:37] <kinglozzer> For anyone curious about my routing issue: http://pastie.org/8395013
529: [13:39:03] <kinglozzer> It has to be called #rootroutes
530: [13:39:18] <kinglozzer> Or it'll try and merge it before AND after rootroutes >.<
531: [13:39:54] * spronk2 quit (Quit: spronk2)
532: [13:40:41] <Marvanni> Kinglozzer pleas let me know if you managed that...
533: [13:40:50] <kinglozzer> Marvanni: Yeah
534: [13:40:59] <kinglozzer> See the pastie :) it works
535: [13:41:06] <Marvanni> I ended up with adding a myurlsemgnet => Controller
536: [13:41:17] <Marvanni> but does dev/build still work?
537: [13:41:21] <kinglozzer> Yeah :)
538: [13:41:34] <Marvanni> puh
539: [13:41:36] <Marvanni> ;)
540: [13:41:40] <Alexw> How to pass variables into the content template from the controller
541: [13:41:42] * catcher has joined #silverstripe
542: [13:42:02] <Alexw> So pass variables to MyAdmin_Content.ss
543: [13:42:16] * DesignerX quit (Ping timeout: 245 seconds)
544: [13:43:34] * Shrike_Finland quit (Quit: Leaving.)
545: [13:45:13] <Marvanni> wow. nice job kinglozzer
546: [13:46:02] <kinglozzer> Marvanni: I've been trying to work it out for ages, gave up after we spoke about it but then I needed to do the same thing today :P
547: [13:46:09] <kinglozzer> Lucky guess in the end >.<
548: [13:46:31] <micmania1> anybody worked with DOMDocument before? How do you get the title? (ie <title>GET ME</title>)
549: [13:47:10] <Marvanni> Now I can make wy elastic search proxy working without the need of an urlsegment....
550: [13:47:13] <Marvanni> nice, nice, nie
551: [13:47:13] * Colin[pi] quit ()
552: [13:49:21] <Marvanni> thanks again :)
553: [13:49:30] <Marvanni> time for a beer!
554: [13:53:53] * g4b0 has joined #silverstripe
555: [13:57:42] * Alexw quit (Ping timeout: 252 seconds)
556: [14:00:27] * Marvanni quit (Ping timeout: 252 seconds)
557: [14:00:40] * Marvanni2 has joined #silverstripe
558: [14:19:47] * outrunthewolf_ has joined #silverstripe
559: [14:21:25] * micmania1 quit (Ping timeout: 248 seconds)
560: [14:22:13] * outrunthewolf quit (Ping timeout: 272 seconds)
561: [14:25:08] <guci0> 3.1.1: When duplicate Page & Subpage, CMS needs to refresh. Tree dosen't update. Anyway it works well!
562: [14:29:18] <guci0> *doesn't :)
563: [14:32:35] * travis-ci has joined #silverstripe
564: [14:32:35] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#1226 (3.1 - 3f7b3fd : Andrew Short): The build has errored.
565: [14:32:35] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/9c75fc06e7d4...3f7b3fddc99d
566: [14:32:35] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/12420088
567: [14:32:35] * travis-ci has left #silverstripe
568: [14:42:49] * ARNHOE_ quit (Remote host closed the connection)
569: [14:49:10] * UndefinedOffset quit (Quit: Leaving.)
570: [14:49:21] <kinglozzer> guci0: Create an issue on Github :)
571: [14:51:12] <g4b0> hi all
572: [14:51:27] <g4b0> does anybody is using staticpublisher on SS 3.1.1?
573: [14:51:54] <g4b0> I'm having some problem adding/removing pages
574: [14:53:39] <kinglozzer> g4b0: I'm not using it at the moment, I did manage to get it working on 3.1.0 a few days ago
575: [14:53:54] <kinglozzer> Nothing significant has changed between 3.1.0 and 3.1.1, so it should still work
576: [14:54:05] <kinglozzer> Just as a test ^^ not using it on a live site yet
577: [14:54:46] <g4b0> yep, it apparently works
578: [14:54:57] <g4b0> but there are some issue
579: [14:55:02] <g4b0> for example
580: [14:57:23] <guci0> kinglozzer: don't have account ;/
581: [14:57:45] * micmania1 has joined #silverstripe
582: [14:57:54] <guci0> g4b0: http://www.silverstripe.org/general-questions/show/24723#post324589
583: [14:58:09] <guci0> What issue?
584: [14:59:29] <Sjohn> gnight all
585: [14:59:32] * Sjohn quit ()
586: [14:59:33] <guci0> it is still before me:)
587: [14:59:47] <g4b0> guci0: for example if you delete a page
588: [15:00:02] <g4b0> the cache is not automatically updated
589: [15:00:15] <guci0> I need to refrashe cache
590: [15:00:20] <guci0> *refresh
591: [15:00:28] <guci0> You :P
592: [15:01:06] * Marvanni2 quit (Ping timeout: 265 seconds)
593: [15:01:13] <g4b0> I need to run the task at every page add/delete ?
594: [15:01:17] <guci0> For example, SPublisher needs to refresh nav.
595: [15:01:41] <guci0> It's depends
596: [15:01:48] <guci0> what part of page was deleted
597: [15:03:04] * travis-ci has joined #silverstripe
598: [15:03:04] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#1228 (3.1 - 024d46c : Andrew Short): The build passed.
599: [15:03:04] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/3f7b3fddc99d...024d46ceb573
600: [15:03:04] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/12421329
601: [15:03:04] * travis-ci has left #silverstripe
602: [15:04:01] <g4b0> the entire page :)
603: [15:05:55] <guci0> Then save "entire page" and SP refresh date of this page only.
604: [15:06:57] * UndefinedOffset has joined #silverstripe
605: [15:11:54] <g4b0> mmm. let's have some test :0
606: [15:11:58] <g4b0> :)
607: [15:14:38] * PigeonFriend quit ()
608: [15:14:42] * tiny-zebra has joined #silverstripe
609: [15:15:16] <tiny-zebra> please forgive a dumb question, but, I am going through the silverstripe book and I keep getting this error:
610: [15:15:18] <tiny-zebra> Notice at line 174 of /Applications/MAMP/htdocs/silver-stripe-testing/framework/dev/Deprecation.php
611: [15:15:25] <tiny-zebra> I am not sure how to trace it down
612: [15:18:05] * outrunthewolf_ quit (Remote host closed the connection)
613: [15:18:34] <kinglozzer> tiny-zebra It's a deprecation notice, it means you're using a bit of code that worked in an old SilverStripe version, but has been replaced since
614: [15:18:57] <kinglozzer> The rest of the error should tell you what's deprecated :)
615: [15:19:10] <kinglozzer> I.e. what you need to replace
616: [15:19:28] <tiny-zebra> but that is all of the error that it shows, is there an error log I am missing?
617: [15:19:58] * dangerdan has joined #silverstripe
618: [15:21:06] <dangerdan> If i want to override a method in a controller with a method from an extension, how can I do it? google says I cant, is there a way around this?
619: [15:21:43] <dangerdan> and inside an extension class what does $this->extend('some-string', $some_variable); do?
620: [15:22:49] <kinglozzer> tiny-zebra: In your php.ini make sure you have: error_reporting = E_ALL
621: [15:23:28] <g4b0> dangerdan: $this->extend('some-string', $some_variable); must be present into the controller you want to extend
622: [15:23:59] <g4b0> and in you extension you can so implement some-string() function
623: [15:24:04] <kinglozzer> dangerdan: $this->extend('somestring', $some_variable); will call the method 'somestring' in an extension you apply to that class
624: [15:24:11] <kinglozzer> $some_variable is passed as an argument
625: [15:26:10] <dangerdan> Ah okay and what about my first question?
626: [15:26:50] <dangerdan> I want to override a method in a class, im guessing i cant
627: [15:28:05] <kinglozzer> dangerdan: You can
628: [15:28:13] <kinglozzer> The old way of doing it was Object::useCustomClass()
629: [15:28:18] <kinglozzer> Not sure any more
630: [15:28:40] <dangerdan> is that not for overriding the whole class?
631: [15:28:45] <kinglozzer> Though I think that only works on certain classes (they must use Class::create())
632: [15:28:53] <kinglozzer> Yeah, but that's the only way you can do it as far as I know :P
633: [15:29:23] <dangerdan> hmmm :( cos i want to extend, but override a method
634: [15:30:30] <dangerdan> I have a header() method that renders my header in pagecontrollers, i want pages with my extension to render a different template if the extension is enabled for those templates
635: [15:30:42] <dangerdan> *those controllers i mean
636: [15:30:48] <dangerdan> well pages...
637: [15:31:01] <kinglozzer> Well, you could still do it with an extension
638: [15:32:12] <dangerdan> but when i apply my extension, the method doesnt get overwritten, it uses the original method in the page controller
639: [15:33:46] <kinglozzer> http://pastie.org/8395270
640: [15:34:07] <kinglozzer> Something along those lines might work - pass the header by reference and completely override the variable
641: [15:36:07] <dangerdan> yesss that works :) nice one
642: [15:45:10] <micmania1> are there any docs on adding mysql indexes to DataObjects?
643: [15:46:18] * tiny-zebra quit (Quit: tiny-zebra)
644: [15:50:29] * kinglozzer quit (Remote host closed the connection)
645: [15:51:22] <dangerdan> Im not sure if there are or not but what do you want to know? i might be able to help you out
646: [15:51:52] <dangerdan> in the past i've used "static $indexes = array( "fulltext (Title, Content)" );" for example
647: [16:00:43] * dangerdan quit (Ping timeout: 250 seconds)
648: [16:15:02] * g4b0 quit (Quit: Sto andando via)
649: [16:22:55] * svandragt quit (Ping timeout: 272 seconds)
650: [16:28:46] * swordsmanz quit (Quit: swordsmanz)
651: [16:34:31] * swordsmanz has joined #silverstripe
652: [16:38:53] * UndefinedOffset quit (Read error: Connection reset by peer)
653: [16:58:36] * joelpittet has joined #silverstripe
654: [17:34:23] * Alexw has joined #silverstripe
655: [17:35:18] * Alexw quit (Client Quit)
656: [17:36:48] * Alexw has joined #silverstripe
657: [17:43:19] <Alexw> How to pass variables from controller to view?
658: [17:45:59] <catcher> Alexw, by defining a function that returns the expected variable, or passing it through Customise / renderWith
659: [17:46:21] <Alexw> And the function name is the variable?
660: [17:46:28] <catcher> Alexw, correct-o
661: [17:46:33] <Alexw> Ah ok, ty
662: [17:46:54] <Alexw> Is it also possible to use variables that are attached to class?
663: [17:47:00] <Alexw> Or only functions
664: [17:47:33] <catcher> Alexw, you can retrieve object properties once you're in that object's context in the template.
665: [17:48:10] <Alexw> Ok thanks
666: [17:48:13] <catcher> <% with $MyArticleObject %>$title<% end_with %>, where title is a db property of Article
667: [17:48:51] <Alexw> So if I that with the name of the controller
668: [17:48:56] <Alexw> I can get properties of that class?
669: [17:49:02] <Alexw> do that*
670: [17:49:30] <catcher> Alexw, controllers don't have DB properties
671: [17:49:41] <Alexw> I know
672: [17:50:23] <catcher> Alexw, your controller will know to look on the corresponding model though.
673: [17:51:02] <Alexw> But it is not possible to use variables from your controller onto the template without functions?
674: [17:53:00] <catcher> Alexw, yes, with customise() or renderWith()
675: [17:53:11] <catcher> renderWith actually just passes along a customise().
676: [17:53:41] <catcher> for ex, a controller action can return $this->Customise('MyVar' => $var);, and that will be available in the template as $MyVar
677: [17:55:16] <Alexw> According to the function code it does not attach the input to somewhere
678: [17:55:21] <Alexw> Only returns a ViewableData_Customised
679: [17:55:56] <Alexw> But do you mean that $this->Customise needs to be used inside a function?
680: [17:57:50] <catcher> Alexw, a controller action (which happens to be a function)
681: [17:57:56] <Alexw> ok
682: [17:58:15] <Alexw> What is the constant called to get the directory of the root?
683: [17:58:25] <Alexw> I want to load a file that is located in the root
684: [17:59:21] <catcher> Alexw, in the template?
685: [17:59:27] <Alexw> No, in the controller
686: [18:00:08] <Alexw> I'm trying to create a page that output a overview of all modules that are installed using composer.json
687: [18:00:19] <catcher> Director::baseURL() iirc
688: [18:00:38] <Alexw> Not the URL
689: [18:00:42] <Alexw> The Path itself
690: [18:00:54] <Alexw> Director::baseFolder()
691: [18:00:55] <Alexw> Found it:)
692: [18:01:08] <catcher> :)
693: [18:02:00] <Alexw> Maybe I need to use composer.lock
694: [18:02:11] <Alexw> Because that is the known state atm
695: [18:07:57] <Alexw> I"m now using: "return new ArrayObject($this->getInstalledModules());"
696: [18:08:05] <Alexw> But when I loop it I dont get the variables
697: [18:08:13] <Alexw> It is a Object
698: [18:08:34] <catcher> Alexw, you can only loop over SS_List and ArrayList
699: [18:08:48] * skorp has left #silverstripe
700: [18:09:00] <Alexw> <% loop Packages %>
701: [18:09:00] <Alexw> $name ($version)<br />
702: [18:09:00] <Alexw> <% end_loop %>
703: [18:09:05] <Alexw> But get:
704: [18:09:06] <Alexw> ()
705: [18:09:06] <Alexw> ()
706: [18:09:06] <Alexw> ()
707: [18:09:06] <Alexw> ()
708: [18:09:15] <catcher> Is arrayobject a real thing?
709: [18:09:19] <Alexw> Yes
710: [18:09:29] <Alexw> My IDE says it exsits
711: [18:09:41] <Alexw> Got no errors from PHP that says otherwise
712: [18:10:03] <catcher> Alexw, that's a PHP class
713: [18:10:11] <Alexw> yes
714: [18:10:26] <Alexw> From SS
715: [18:10:50] <catcher> You'll want to pass the template something SS knows how to view (i.e. extends ViewableData)
716: [18:11:20] <catcher> http://api.silverstripe.org/master/class-ArrayList.html
717: [18:12:31] <Alexw> ArrayObject => This class allows objects to work as arrays.
718: [18:12:51] <Alexw> Uhm
719: [18:12:53] <Alexw> Oh
720: [18:13:06] <Alexw> It is a standard object
721: [18:13:09] <Alexw> Very confusing
722: [18:13:46] <Alexw> Ok got it working now
723: [18:27:59] * micmania1 has joined #silverstripe
724: [18:33:38] * SightUnseen has joined #silverstripe
725: [18:33:41] * SightUnseen has left #silverstripe
726: [18:55:44] * Alexw quit ()
727: [19:45:54] * CodeTrap has joined #silverstripe
728: [19:48:20] * CodeTrap quit (Remote host closed the connection)
729: [19:48:39] * CodeTrap has joined #silverstripe
730: [19:51:04] * CodeTrap quit (Remote host closed the connection)
731: [19:51:15] * CodeTrap has joined #silverstripe
732: [20:37:02] * geekdenz quit (Remote host closed the connection)
733: [20:44:13] * joelpittet quit (Remote host closed the connection)
734: [20:52:22] * hutou has joined #silverstripe
735: [20:53:12] <hutou> ?
736: [20:56:47] <hutou> ?help
737: [21:27:46] * SightUnseen has joined #silverstripe
738: [21:27:49] * SightUnseen has left #silverstripe
739: [21:36:30] * catcher quit (Quit: Leaving)
740: [21:58:04] * CodeTrap quit (Quit: CodeTrap)
741: [22:40:45] * DesignerX has joined #silverstripe
742: [22:57:28] * mobiusnz has joined #silverstripe
743: [23:12:27] * SightUnseen1 has joined #silverstripe
744: [23:12:37] * SightUnseen1 has left #silverstripe
745: [23:13:37] * guci0 quit (Ping timeout: 250 seconds)
746: [23:38:34] * joelpittet has joined #silverstripe

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