#silverstripe IRC Log

IRC log for 22 January 2013

All timestamps are in UTC.

1: [00:00:00] <catcher> Yes, and where do you say which Page the WidgetArea belongs to?
2: [00:00:00] <catcher> When?
3: [00:00:00] <DesignerX> I have Page has_one WidgetArea
4: [00:00:00] <DesignerX> Shouldnt that write the ID to the Page table ?
5: [00:01:00] <DesignerX> I dont
6: [00:01:00] <DesignerX> I usualkly do basic Object has_one OtherObject or Has_many & all this get writtrn automatilly
7: [00:01:00] <DesignerX> I get what U say
8: [00:02:00] <DesignerX> ok, where do I write the relation ? onBeforeWrite() or other plate (like onWrite if it exists ) >
9: [00:02:00] <catcher> How are you adding the WidgetArea?
10: [00:03:00] <DesignerX> its a basi9c page has_one widget area , thats the only line I have for this relation. Am i missing anything
11: [00:03:00] <catcher> DesignerX, do you have an interface on each Page for adding its WidgetArea?
12: [00:04:00] <DesignerX> catcher: Interface being "$fields->addFieldToTab("Root.Column4", new WidgetAreaEditor("Column4"));" ?
13: [00:05:00] * Iseroy has left #silverstripe
14: [00:05:00] <catcher> DesignerX, have you set the reverse relationship?
15: [00:06:00] <DesignerX> catcher: no . the docs on https://github.com/silverstripe/silverstripe-widgets doesnt request a revers relation
16: [00:07:00] <DesignerX> catcher: I w as thinking it would be the same as page has_one Image . The image.ID get written to ImageID on the Page
17: [00:09:00] <DesignerX> on it . I think I have done dev/build & saved the page few times, but lets be sure
18: [00:09:00] <catcher> DesignerX, if you add & save a WidgetArea on a Page after /dev/build, I believe it should set the ID automatically.
19: [00:12:00] <DesignerX> in my case, I have 4 Widget areas , Column1,Column2,Column3,Column4
20: [00:12:00] <DesignerX> catcher: nope, still MyWidgetAreaID = 0
21: [00:13:00] <catcher> Page has_one array('Column1' => 'WidgetArea'); ?
22: [00:13:00] <catcher> well.
23: [00:13:00] <DesignerX> yep
24: [00:13:00] <catcher> But Page has_one WidgetArea?
25: [00:13:00] <catcher> Column2 => WidgetArea, etc?
26: [00:13:00] <DesignerX> yeh
27: [00:13:00] <DesignerX> all of them set using has_one relation
28: [00:14:00] <catcher> I think it has difficulty determining the IDs in those cases. I'd indeed look into setting them manually in onBeforeWrite();
29: [00:15:00] <DesignerX> so $this->Column1ID = $this->Column1-.ID ?
30: [00:19:00] <Pyromanik> what do irogue?
31: [00:19:00] <Pyromanik> that moment when you want a drink of juice but there isn't any, so you open a can of L&P, then find 2 bottles of juice hiding in the bottom of the pantry.
32: [00:21:00] * catcher quit (Quit: Leaving)
33: [00:22:00] <DesignerX> Pyromanik: The moment when I read someone posting a story that happens to me alot .
34: [00:31:00] <Pyromanik> DesignerX: but you don't have L&P in Australia...
35: [00:32:00] <irogue> add vodka to the L&P
36: [00:32:00] <irogue> [13:19] <Pyromanik> what do irogue?
37: [00:33:00] * nickmolhoek has joined #silverstripe
38: [00:33:00] <Pyromanik> Get some snow queen in me
39: [00:33:00] <Pyromanik> I wish
40: [00:33:00] <Pyromanik> hahahaha
41: [00:34:00] * nickmolhoek quit (Remote host closed the connection)
42: [00:34:00] * nickmolhoek has joined #silverstripe
43: [00:34:00] <Pyromanik> irogue: it turns out the answer is pour a handle of warm juice, drink that, then proceed to consume the now semi-warm open L&P
44: [00:35:00] <Pyromanik> like "how to run online business"
45: [00:35:00] <Pyromanik> Webstock seems like a lot of faff
46: [00:35:00] <Pyromanik> more about online universe in all facets rather than interesting stuff for web developers.
47: [00:36:00] <Pyromanik> "how to write content for iphones"
48: [00:36:00] <Pyromanik> or "what online means for your city"
49: [00:37:00] <Pyromanik> and it's in 2 weeks
50: [00:37:00] <Pyromanik> topic=>topics*
51: [00:37:00] <Pyromanik> topic*
52: [00:37:00] <Pyromanik> mildly interesting topic, but nothing much geeky.
53: [00:37:00] <Pyromanik> well, almost 3 I guess
54: [00:38:00] <simon_w> Just send me the money instead?
55: [00:38:00] <Pyromanik> OMG
56: [00:38:00] <Pyromanik> HE'S BACK
57: [00:38:00] <Pyromanik> simon_w: tell me inside info about WDC
58: [00:38:00] <simon_w> WDC?
59: [00:38:00] <Pyromanik> OMG
60: [00:39:00] <simon_w> ss23, doing it wrong.
61: [00:39:00] <Pyromanik> because for a thing in like a month (or 5, whatever), there's zero info. Just a big "Hey, pay heaps of money for something you know nothing about yet"
62: [00:39:00] <Pyromanik> http://wdcnz.com
63: [00:39:00] <ss23> simon_w simon_w!
64: [00:39:00] <ss23> I have an issue with the nz php mirror
65: [00:39:00] <Pyromanik> lol
66: [00:39:00] <simon_w> Ask sminnee of hfried. They've both given talks there
67: [00:39:00] <ss23> nu uh
68: [00:40:00] <ss23> infinite loop
69: [00:40:00] <ss23> When I go to php.net/server-status, it redirections to nz1.php.net/manual-lookup.php?pattern=server-status&lang=en&scope=404quickref, and the first result of that page is php.net/server-status
70: [00:41:00] <ss23> It's a bug
71: [00:41:00] <simon_w> Stop trying to get to mod_status pages
72: [00:41:00] <ss23> Why?
73: [00:41:00] <ss23> If they're on the search, they're legit pages
74: [00:41:00] <simon_w> Because I don't have mod_status enabled
75: [00:41:00] <ss23> Either take off search, or don't list it in search!
76: [00:41:00] <simon_w> Yeah, doing it wrong
77: [00:41:00] <ss23> sif
78: [00:42:00] <simon_w> That's an embedded google search
79: [00:42:00] <lewellyn> i'm not finding any mirrors with it enabled right now
80: [00:42:00] <simon_w> From script kiddies like you finding that the main php.net has it enabled and linking to it
81: [00:42:00] <ss23> Yes
82: [00:43:00] <ss23> Bitch, I didn't link to anything
83: [00:43:00] <lewellyn> ss23: because google sucks.
84: [00:43:00] <lewellyn> simon_w: i'm no script kiddie. too much gray hair :)
85: [00:43:00] <simon_w> ss23, script kiddies like you finding that the main php.net has it enabled and linking to it
86: [00:43:00] <ss23> lol
87: [00:43:00] <ss23> THEN WHY IS IT IN SEARCH?
88: [00:44:00] <simon_w> nz1.php.net/server-status doesn't
89: [00:44:00] <ss23> Besides, I don't care what the reasons are, I call bug!
90: [00:44:00] <simon_w> and I don't
91: [00:44:00] <ss23> nu uh
92: [00:44:00] <simon_w> php.net/server-status actually exists
93: [00:44:00] <simon_w> The link's fine, and the redirect's fine
94: [00:45:00] <simon_w> the link's for the former
95: [00:48:00] <simon_w> Where?
96: [00:48:00] <aznain> @simon_w: [09:14] <aznain> "A" dataobject has 1-M relationship with "B" dataobject. "A" has textfield named "a_name". "B" has textfield "b_name". My requirement is that When creating the "B" at back end. When new form displays, then "b_name" field should populate with value of parent "a_name" as default value in editable form. [09:15] <aznain> I am unable to get Parent ID on that stage. But I can see that ID in URL appearing
97: [00:48:00] <aznain> please give directions
98: [00:49:00] <simon_w> And just grab the ID from the request object
99: [00:51:00] <lewellyn> simon_w: php.net/server-status redirected me to usN.php.net so i can see his complaint :)
100: [00:51:00] * OomElvis quit (Ping timeout: 256 seconds)
101: [00:52:00] <lewellyn> i say google's to blame here though
102: [00:52:00] <lewellyn> they are obviously not crawling like a normal UA
103: [00:54:00] <simon_w> ss23, no, that's how the redirect's supposed to work
104: [00:54:00] <ss23> simon_w: Then there is a bug where the link for the former redirects to nz.php.net, which is a 404 :)
105: [00:54:00] <aznain> There is built function to get request object ?
106: [00:55:00] <simon_w> You can infinite loop looking for server status if you really want to
107: [00:55:00] <ss23> So, it's expected that the search results will come up with an infinite loop?
108: [00:55:00] <simon_w> any non-whitelisted page should redirect to your chosen mirror
109: [00:55:00] <ss23> Good to know
110: [00:56:00] <Pyromanik> the browser should say "no, this is derp" shouldn't it?
111: [00:57:00] <simon_w> aznain, ->getRequest() on the controller
112: [00:57:00] <Pyromanik> so ss23 should derp out after too many redirects
113: [00:57:00] <Pyromanik> oh
114: [00:57:00] <simon_w> Pyromanik, you have to click after each redirect
115: [00:58:00] <aznain> @simon_w: thanks
116: [00:58:00] * nickmolhoek quit (Quit: nickmolhoek)
117: [00:59:00] <ss23> Pyromanik: Yeah, the issue is that the search result link is a link to a search result... which has the link to the search result
118: [00:59:00] <ss23> Its like "I found your page!"
119: [00:59:00] <ss23> Then when you click on it its like "I found it it's on these search results"
120: [01:00:00] <ss23> then you click it and it's like "It's here on these search results!"
121: [01:31:00] <DesignerX> Hi again, need help with WidgetArea , here is my code : http://www.sspaste.com/paste/show/50fdebe36889b
122: [01:32:00] <DesignerX> Problem is, the rel;ation is not getting written
123: [01:32:00] <DesignerX> IF you see my code , Column1,Column2,Column3,Column4 is always 0 on Page table\
124: [01:33:00] <DesignerX> when it shoul be the ID of the WidgetArea its relating to
125: [01:35:00] <simon_w> DesignerX, your onBeforeWrite() is setting them to 0
126: [01:36:00] <DesignerX> simon_w: That code is an attempt to fix it, I have them commented out
127: [01:36:00] <DesignerX> simon_w: I was told I need to manually write the relation so Column1ID = COlumn1->ID
128: [01:38:00] <DesignerX> as simple Page has_one WidgetArea is setting the WidgetAreaID to 0
129: [01:40:00] * willr_ has joined #silverstripe
130: [01:42:00] <DesignerX> simon_w: I change my code to this :http://www.sspaste.com/paste/show/50fdebe36889b#PasteComment-50fdee2e670b4 simple page has_one Column1 & Column1ID is always 0 !
131: [01:44:00] * AshKyd_ has joined #silverstripe
132: [02:02:00] * MichaelDesignerX has joined #silverstripe
133: [02:03:00] * DesignerX quit (Ping timeout: 255 seconds)
134: [02:04:00] * instabil has joined #silverstripe
135: [02:04:00] * instabil2 quit (Read error: Connection reset by peer)
136: [02:10:00] * robert_ has joined #silverstripe
137: [02:11:00] * SightUnseen has joined #silverstripe
138: [02:12:00] * SightUnseen has left #silverstripe
139: [02:18:00] * robert_ quit (Ping timeout: 276 seconds)
140: [02:18:00] <aznain> static $allowed_actions = array( 'handleA' => 'CMSMain' );
141: [02:18:00] <aznain> What does CMSMain means here
142: [02:19:00] <aznain> it is in dataobject controller class
143: [02:26:00] <willr_> Its a subclass of controller
144: [02:28:00] <aznain> if i define and function in controller class then how can i access in the dataobject class ?
145: [02:29:00] <aznain> if i define a function in dataobject_controller class then how can i access that function in the dataobject class ?
146: [02:32:00] * willr_ quit (Ping timeout: 252 seconds)
147: [02:33:00] <simon_w> aznain, it's the name of a permission
148: [02:33:00] <simon_w> I wrote docs about this!
149: [02:35:00] <simon_w> http://doc.silverstripe.org/framework/en/trunk/topics/controller#access-control
150: [02:37:00] <simon_w> aznain, to go from a controller to the model, you can usually just use $this->whatever, or there's $this->data() if you need it explicitly. You can't go the other way.
151: [02:37:00] * funkygibbon quit (Quit: Leaving)
152: [02:38:00] <aznain> let me read ... sorry did not see ur answer
153: [02:38:00] <simon_w> You can't
154: [02:38:00] <aznain> @simon_w: thanks ... one more thing, how can i call one of allowed action in dataobject class itself ?
155: [02:40:00] <simon_w> right
156: [02:40:00] <aznain> we can go from controller to model but can no go from model to controller .. right ?
157: [02:40:00] <aznain> model means dataobject class ...
158: [02:41:00] <simon_w> usually
159: [02:43:00] <aznain> @simon_w: thanks ... let me try to get request object ...
160: [02:48:00] <aznain> I made one function handleAznain() which return a text .... then in onbeforeWrite , i tried to call $this->handleAznain() .... but getting error
161: [02:48:00] <aznain> function does not exist
162: [02:54:00] <aznain> any help
163: [03:00:00] <Pyromanik> aznain: you have scope error
164: [03:00:00] <Pyromanik> you probably defined the function in the controller, not the model.
165: [03:01:00] <Pyromanik> move it to model.
166: [03:01:00] <aznain> Pyromanik: yes, i have defined there ... i want to access that function in model
167: [03:02:00] <aznain> I want to access request object
168: [03:02:00] <Pyromanik> Controller::curr()
169: [03:03:00] <aznain> let me try
170: [03:03:00] <aznain> thanks
171: [03:04:00] * DesignerX has joined #silverstripe
172: [03:07:00] * MichaelDesignerX quit (Ping timeout: 248 seconds)
173: [03:16:00] * DesignerX quit (Ping timeout: 244 seconds)
174: [03:16:00] * reefer quit (Ping timeout: 245 seconds)
175: [03:35:00] <aznain> It seems that from request object, i have to get url then truncate url to get parent id
176: [03:35:00] <aznain> after whole day, i am again on the same place ....
177: [03:36:00] <Pyromanik> $this->ParentID ?
178: [03:37:00] <Pyromanik> you're asking Y, tell X instead.
179: [03:37:00] <aznain> Pyromanik: i can not get this as relationship is not done yet ...
180: [03:37:00] <Pyromanik> aznain: X -> Y problem.
181: [03:38:00] <aznain> <aznain> "A" dataobject has 1-M relationship with "B" dataobject. "A" has textfield named "a_name". "B" has textfield "b_name". My requirement is that When creating the "B" at back end. When new form displays, then "b_name" field should populate with value of parent "a_name" as default value in editable form.
182: [03:38:00] <Pyromanik> oh
183: [03:38:00] <Pyromanik> hook the GridField and get it's parent ID.
184: [03:39:00] <Pyromanik> that's what one would do with a CTF. Might be different now that GridField is more abstract
185: [03:39:00] <Pyromanik> at least
186: [03:40:00] <aznain> but i spent whole day to just avoid that
187: [03:40:00] <aznain> yes! question is how ... one solution is get url and take id from that then query the database to get value of parent field
188: [03:45:00] * reefer has joined #silverstripe
189: [03:53:00] * funkygibbon has joined #silverstripe
190: [03:54:00] <Pyromanik> iirc it's something to do with auto return?
191: [03:54:00] <Pyromanik> is <?= a valid php open tag?
192: [03:55:00] <Pyromanik> ah yes, shorthand echo
193: [03:55:00] <Pyromanik> echo shorthand or something
194: [03:55:00] <Pyromanik> sweet, thanks nz1.php.net
195: [03:56:00] <Pyromanik> aznain: try asking FrozenFire
196: [03:56:00] <Pyromanik> he's pretty GridField guru
197: [03:57:00] <simon_w> You can get the DataList out of the GridField, is somewhat harder to get the parent out
198: [03:57:00] <FrozenFire> He's asked this question before
199: [03:58:00] <simon_w> Home time! :)
200: [03:58:00] <FrozenFire> It's not feasible.
201: [03:58:00] <FrozenFire> He wants to know the parent a has_one is being saved to before it's saved.
202: [03:59:00] * instabil2 has joined #silverstripe
203: [04:02:00] * instabil quit (Ping timeout: 245 seconds)
204: [04:06:00] <lewellyn> Pyromanik: ew. <?=
205: [04:18:00] * reefer quit (Ping timeout: 248 seconds)
206: [04:29:00] * instabil2 quit (Read error: Connection reset by peer)
207: [04:46:00] * simon_w|air has joined #silverstripe
208: [04:52:00] * cloph_away has joined #silverstripe
209: [04:53:00] * cloph_away1 quit (Ping timeout: 245 seconds)
210: [05:01:00] * michaelmichael quit (Quit: Computer has gone to sleep.)
211: [05:05:00] * EPIK quit (Ping timeout: 240 seconds)
212: [05:05:00] * reefer has joined #silverstripe
213: [05:20:00] * DesignerX has joined #silverstripe
214: [05:25:00] * Colin[pi] has joined #silverstripe
215: [05:28:00] * Emil_Blume quit (Ping timeout: 256 seconds)
216: [05:29:00] * Emil_Blume has joined #silverstripe
217: [05:34:00] <Colin[pi]> is canCreate() combined with a existence check (DataObject::get_one('class')) sufficient to allow one and only one type of page in the sitetree? (think of it as a page singleton)
218: [05:34:00] <Colin[pi]> *an
219: [05:41:00] * willr_ has joined #silverstripe
220: [05:44:00] * DesignerX quit (Ping timeout: 248 seconds)
221: [05:46:00] * reefer quit (Ping timeout: 244 seconds)
222: [05:48:00] * willr_ quit (Quit: willr_)
223: [05:51:00] * Colin[pi] quit (Ping timeout: 256 seconds)
224: [05:52:00] <ss23> simon_w|air: But you were mean before
225: [05:52:00] <ss23> simon_w|air: You called me... a...
226: [05:56:00] <simon_w|air> script kiddie?
227: [05:57:00] * dendeffe has joined #silverstripe
228: [06:05:00] * aznain quit (Quit: Page closed)
229: [06:12:00] <ss23> simon_w|air: I'MT NOT A SCRIPT KIDDE
230: [06:12:00] <ss23> simon_w|air: :<
231: [06:12:00] <ss23> WHY WON'T YOU LOVE ME? ;_;
232: [06:14:00] <FrozenFire> Because you smell of curdled milk
233: [06:14:00] <FrozenFire> This is not an attractive feature in a mate
234: [06:14:00] <ss23> ..<
235: [06:14:00] <ss23> >.<
236: [06:16:00] <lewellyn> especially if one can't have milk
237: [06:28:00] * Error404NotFound has joined #silverstripe
238: [06:55:00] * mirrors has joined #silverstripe
239: [06:55:00] <mirrors> hey can somebody please tell me how I can DataObject::get(); a live table
240: [06:56:00] <mirrors> when I do that it gets the stage table
241: [06:58:00] <FrozenFire> mirrors, See http://api.silverstripe.org/trunk/framework/model/Versioned.html
242: [07:00:00] <FrozenFire> Not actually sure what the preferred syntax is in SS3 ORM's style.
243: [07:02:00] <mirrors> cheers
244: [07:02:00] <mirrors> you sir are a bloody legend
245: [07:09:00] * DesignerX has joined #silverstripe
246: [07:10:00] * mirrors quit (Quit: Page closed)
247: [07:11:00] * MichaelDesignerX has joined #silverstripe
248: [07:12:00] <MichaelDesignerX> hi guys
249: [07:13:00] * dendeffe quit (Quit: dendeffe)
250: [07:13:00] <MichaelDesignerX> How can I get a list of all cities in Australia ? is this done through connecting to google somehow ?
251: [07:13:00] <MichaelDesignerX> I need it to create a form with a list of cities as dropdown, something like in here http://www.hallsforhire.com.au/
252: [07:14:00] * SightUnseen has left #silverstripe
253: [07:14:00] * SightUnseen has joined #silverstripe
254: [07:15:00] * MichaelDesignerX is now known as DesignerX
255: [07:15:00] * DesignerX quit (Ping timeout: 256 seconds)
256: [07:17:00] <FrozenFire> DesignerX, Zend_Locale or Zend_Date might have what you need
257: [07:17:00] <FrozenFire> No idea if it's bundled
258: [07:17:00] <FrozenFire> Just for shits and giggles, try calling Debug::dump(Zend_Date_Cities::getCityList());
259: [07:19:00] <DesignerX> cool
260: [07:19:00] <FrozenFire> I do have my own list of cities in Australia. I'd have to dig it up, though
261: [07:19:00] <FrozenFire> Zend_Locale itself contains information down to the region (province/state)
262: [07:22:00] <FrozenFire> http://thefrozenfire.com/data/postalcodes.sql
263: [07:22:00] <FrozenFire> I think that includes it
264: [07:23:00] <DesignerX> where u got it from ?
265: [07:24:00] <FrozenFire> Can't say where it was originally from, but I've modified it in ways that eliminate any copyright that others might have on the information
266: [07:25:00] <DesignerX> ah :D
267: [07:25:00] <simon_w|air> Can't copyright it :p
268: [07:25:00] <FrozenFire> As for my own copyright, consider it public domain. :P
269: [07:25:00] <simon_w|air> It's like the whitepages
270: [07:26:00] <FrozenFire> Depends on the laws of the land, I suppose.
271: [07:26:00] <lewellyn> that's order
272: [07:26:00] <lewellyn> that's not structure.
273: [07:26:00] <DesignerX> FrozenFire: I can make a copy & change the order of few cities :D
274: [07:26:00] <FrozenFire> It's the unique structuring of the information that I'd have a right to
275: [07:26:00] <FrozenFire> Technically I could copyright my database dump.
276: [07:27:00] <DesignerX> then I will copyright it as Its my own unique "order"
277: [07:27:00] <lewellyn> though, as simon_w|air notes, it's trivial data with no real owner, and is therefore not copyrightable in most locales
278: [07:27:00] <FrozenFire> Regardless, it's far too late at night for me to be discussing copyright of source code. :P
279: [07:28:00] <FrozenFire> Because their system is used to handle many millions of dollars of hospitality-related transactions every day. :P
280: [07:28:00] <lewellyn> you could easily independently arrive at the same data without ever having seen that.
281: [07:28:00] <FrozenFire> One thing I do note on this is that Nebraska is spelt Nebraksa in my database dump. :P
282: [07:28:00] <FrozenFire> That's... interesting, considering where the data came from
283: [07:29:00] <DesignerX> ok, need help in PHP , IF a website post data to ther, how can I just collect everything being posted on the recieving website ? (if possible?!)
284: [07:29:00] <lewellyn> FrozenFire: it's an amazingly common typo.
285: [07:29:00] <lewellyn> along with akransas
286: [07:29:00] <FrozenFire> If it's in SS, you'd do SS_HTTPRequest::requestVars()
287: [07:29:00] <FrozenFire> *All* data, or all data minus the data you already know about?
288: [07:29:00] <DesignerX> post data to "other"
289: [07:30:00] * Shrike_Finland quit (Quit: Leaving.)
290: [07:30:00] <DesignerX> FrozenFire: well, what ver is easier , I need it for test now then refine later
291: [07:31:00] <FrozenFire> Well, either way you're doing SS_HTTPRequest::requestVars()
292: [07:31:00] <FrozenFire> Alright
293: [07:31:00] <DesignerX> its not SS
294: [07:31:00] <FrozenFire> E.g. $request->requestVars()
295: [07:31:00] <FrozenFire> Though that's not very testable
296: [07:31:00] <FrozenFire> So $_REQUEST
297: [07:32:00] <lewellyn> FrozenFire: amazingly, nebraksa brought up this image: http://www.kenyan-post.com/2012/06/never-marry-nairobi-waitress.html i see nothing related to nebraska there...
298: [07:34:00] <DesignerX> FrozenFire: oh .. alot of data .. let me narrow it down
299: [07:34:00] <FrozenFire> DesignerX, Keep in mind, though, that $_REQUEST includes POST, GET *and* cookie vars
300: [07:35:00] <DesignerX> FrozenFire: the Payment website has to send data back to MyWebsite , so I use $_Post in MyWebsite/MyPage.php ?
301: [07:35:00] <FrozenFire> Or just use $_POST
302: [07:35:00] <FrozenFire> Might want to do array_merge($_POST, $_GET)
303: [07:35:00] <FrozenFire> Depends on what you need
304: [07:36:00] <DesignerX> its an update I have to do on a project I done a while back
305: [07:36:00] <DesignerX> paypal *
306: [07:36:00] <DesignerX> Pypal
307: [07:36:00] <FrozenFire> Out of curiosity, which payment processor?
308: [07:37:00] <DesignerX> Now I know how it works, I have all the code I need so my next project is to make it work for SS
309: [07:37:00] <DesignerX> kk
310: [07:37:00] <FrozenFire> Right, yeah, that'll be sent by POST
311: [07:37:00] <DesignerX> WP+WooComemrce & now updating the Payment
312: [07:38:00] <DesignerX> You heard of Paypal PayFlow Link :D thats the name of this "Plan"
313: [07:38:00] <FrozenFire> I typically just use PayPal Express Checkout
314: [07:39:00] <FrozenFire> That being said, I don't know why you're using the silent POST method of receiving transaction confirmations.
315: [07:39:00] <DesignerX> all it does it accept CC payments & process it through PayPal then send the money directly to the owner's bank
316: [07:39:00] <FrozenFire> Yep
317: [07:40:00] <FrozenFire> The process that PayPal Express Checkout uses is SetExpressCheckout, which produces a transaction token
318: [07:40:00] <DesignerX> mm, what other way ? not an expert with this kind of intergations
319: [07:41:00] <DesignerX> now thats something I need to learn
320: [07:41:00] <FrozenFire> Then it sends them back to your return URL as specified in the checkout token
321: [07:41:00] <FrozenFire> They authorize the transaction
322: [07:41:00] <FrozenFire> You take that token, verify the payment, and then DoExpressCheckoutPayment
323: [07:41:00] <FrozenFire> The token looks up the transaction, shows your cart
324: [07:41:00] <FrozenFire> Then you forward the user to the PayPal site with that token
325: [07:42:00] <FrozenFire> Despite how much I despise PayPal, it's really, really easy to do checkouts using them
326: [07:42:00] <FrozenFire> That finalizes the transaction, bills the user, and returns the success or failure
327: [07:42:00] <DesignerX> do u have that as SS module ?
328: [07:43:00] <FrozenFire> There's my own for a current project, though it of course includes a lot of cruft
329: [07:43:00] <FrozenFire> http://www.sspaste.com/paste/show/50fe4328c60a5
330: [07:45:00] <FrozenFire> On my cart page controller, I have http://www.sspaste.com/paste/show/50fe4393829f0
331: [07:46:00] <FrozenFire> So to check the user out using PayPal, I just redirect them to the paypal action, which creates a transaction token and sends them along
332: [07:46:00] <DesignerX> My lack of info about this kind of integration + My very strong hate for WP is pushing me to use the fastest way to do it. even if I had the client to manually confirm orders !
333: [07:46:00] <FrozenFire> Heh
334: [07:46:00] <FrozenFire> Yeah, I don't envy you the project
335: [07:47:00] <FrozenFire> Oh believe me, I'm no stranger to Wordpress
336: [07:47:00] <DesignerX> but I will look at your code , just reading PHP used in SS explains alot to me .. try reading WP code !
337: [07:48:00] * chillu has joined #silverstripe
338: [07:48:00] <FrozenFire> I've convinced my boss to blacklist Joomla and Wordpress as potential project "frameworks"
339: [07:48:00] <FrozenFire> In that, we'll utterly refuse any project which calls for it
340: [07:48:00] <FrozenFire> For new projects, anyways.
341: [07:48:00] <DesignerX> yeh, its time ppl used a good framework
342: [07:48:00] <FrozenFire> Which Wordpress isn't.
343: [07:48:00] <FrozenFire> Or any framework
344: [07:48:00] <FrozenFire> That's arguably what confuses most people about it.
345: [07:49:00] <FrozenFire> It's not a framework by any means.
346: [07:49:00] <DesignerX> I agree, WP is nothing closew to a framework
347: [07:49:00] <DesignerX> I started learing PHP with SS , cabt imagin working without it
348: [07:49:00] * dendeffe has joined #silverstripe
349: [08:09:00] * g4b0 has joined #silverstripe
350: [08:11:00] <g4b0> morning
351: [08:15:00] <DesignerX> g4b0: afternoon
352: [08:22:00] * zfmf has joined #silverstripe
353: [08:28:00] * Err404NotFound has joined #silverstripe
354: [08:28:00] * Error404NotFound quit (Disconnected by services)
355: [08:29:00] * Colin[pi] has joined #silverstripe
356: [08:30:00] * Emil_Blume quit (Remote host closed the connection)
357: [08:31:00] * Emil_Blume has joined #silverstripe
358: [08:55:00] * dendeffe quit (Ping timeout: 240 seconds)
359: [08:58:00] * Colin[pi] quit (Ping timeout: 256 seconds)
360: [09:12:00] * Shrike_Finland has joined #silverstripe
361: [09:14:00] * Marvanni has joined #silverstripe
362: [09:17:00] * ARNHOFF has joined #silverstripe
363: [09:19:00] <Marvanni> how do i set autorelation in GridField with Page has_many PageSlides
364: [09:19:00] <Marvanni> I added GridFieldConfig_RelationEditor, but in detailview it still shows the PageDropdown
365: [09:33:00] <simon_w|air> so remove it in your getCMSFields() in PageSlides
366: [09:37:00] <Marvanni> ah ok... this was not needed with CTF :)
367: [09:38:00] <Marvanni> ty
368: [09:48:00] * DesignerX quit (Ping timeout: 248 seconds)
369: [10:14:00] * kinglozzer has joined #silverstripe
370: [10:15:00] * ugly_duck has joined #silverstripe
371: [10:15:00] * ugly_duck has joined #silverstripe
372: [10:15:00] * ugly_duck quit (Changing host)
373: [10:47:00] * wmk has joined #silverstripe
374: [11:11:00] * priithansen has joined #silverstripe
375: [11:27:00] <ARNHOFF> Anyone willing to give a snippet for SilverStripe using Ajax? I want to be able to sort my products per category
376: [11:28:00] * simon_w|air quit (Quit: This computer has gone to sleep)
377: [11:33:00] <kinglozzer> ARNHOFF: What do you need? I don't have an example, but there's a little bit of documentation on it http://doc.silverstripe.org/framework/en/topics/javascript#return-html-json-and-httpresponse-class-for-ajax-responses
378: [11:34:00] <ARNHOFF> I will have a Products Page which shows every product, then on that page I want to be able to sort the products, so clicking "Kinglozzer" will show only products that are tagged with "Kinglozzer"
379: [11:36:00] <kinglozzer> Take a look at the documentation I linked. Instead of doing 'autocomplete()', you could create one called 'filter($request)', which then does a MyDataObject::get()->filter('tag', $request->getVar('tag'));
380: [11:37:00] <kinglozzer> Then render that with a template and return it how they have in the example
381: [11:39:00] <kinglozzer> If your products are listed in <div id="products">, you can do $('#products').html(result), when you get your result returned. I'll see if I can find something that might help
382: [11:40:00] <ARNHOFF> oke, let me try :)
383: [11:42:00] * travis-ci has left #silverstripe
384: [11:42:00] * travis-ci has joined #silverstripe
385: [11:42:00] <travis-ci> [travis-ci] silverstripe/sapphire#1212 (3.0 - f833226 : Ingo Schommer): The build passed.
386: [11:42:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/6c7e3afab3fb...f833226da082
387: [11:42:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/4304079
388: [11:46:00] <ARNHOFF> kinglozzer: I can't really see the idea in that example, how could I get this to use in the template?
389: [11:48:00] <kinglozzer> You'll need to use javascript, add an onclick event handler to the tags. Then when someone clicks a tag, send an AJAX request to the CMS
390: [11:48:00] <kinglozzer> And replace your product div content with the data returned by the AJAX request
391: [11:51:00] <ARNHOFF> do I need to call just jquery .js or another jquery?
392: [11:52:00] <kinglozzer> You'll need to load jquery.js, I'd also create a separate javascript file for you to write your code in.
393: [11:54:00] * Bollig|DesignCty quit (Quit: Bollig|DesignCty)
394: [11:57:00] <ARNHOFF> so hard :)
395: [12:03:00] <ARNHOFF> products are show in a div#productsList, then ul > li
396: [12:03:00] <ARNHOFF> kinglozzer; So I think I got the ajax request working, /assortiment/filter?title=test shows up what I want, I am using a simple thing now, so I can try to get it working on categories later
397: [12:03:00] * DesignerX has joined #silverstripe
398: [12:03:00] <ARNHOFF> now, how did you say, I could try to show tihs?
399: [12:06:00] <kinglozzer> Create a template of just the ul> li for the products, then replace the contents of div#productsList with the template
400: [12:08:00] <kinglozzer> So you'd create a template called 'ProductList' for example, which contains everything inside the div#productsList. Then do ->renderWith('ProductList') how it's done in the example. Then use javascript to replace the contents of div#productsList with what's being rendered
401: [12:09:00] <ARNHOFF> in my theme, or in mysite
402: [12:09:00] <ARNHOFF> Where should I actually place ProductList.ss ?
403: [12:10:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/be780980652c...072b485f66cd
404: [12:10:00] * travis-ci has left #silverstripe
405: [12:10:00] * travis-ci has joined #silverstripe
406: [12:10:00] <travis-ci> [travis-ci] silverstripe/sapphire#1213 (3.1 - 072b485 : Ingo Schommer): The build was broken.
407: [12:10:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/4304095
408: [12:11:00] <ARNHOFF> kinglozzer: Is this the way to be doing it in my custom.js ? http://pastebin.com/QM4kvjvg
409: [12:12:00] * EPIK has joined #silverstripe
410: [12:13:00] <ARNHOFF> assortiment/filter?title=test is actually showing up the right way, but in my template nothing is happening, I think something with the js
411: [12:15:00] <kinglozzer> http://pastebin.com/0PuP33Fb
412: [12:15:00] <kinglozzer> The resultsEL is probably not relevant for your site
413: [12:15:00] <kinglozzer> Do your tags have a class?
414: [12:15:00] <kinglozzer> Something similar to that.
415: [12:16:00] <ARNHOFF> the li's ?, they have #id product
416: [12:17:00] <ARNHOFF> but when I use that autocomplete input stuff, nothing happens
417: [12:17:00] <ARNHOFF> and assortiment/filter?title=test gives me a blank page with just the productlist.ss
418: [12:17:00] * zfmf quit (Read error: Connection reset by peer)
419: [12:18:00] <kinglozzer> What exactly do you want to achieve? I thought you wanted clickable tags, not a text box to search with
420: [12:18:00] * zfmf has joined #silverstripe
421: [12:19:00] <ARNHOFF> yes that is what I want, the clickable tags
422: [12:19:00] <ARNHOFF> but I don't know how I can dot hat on the template side, since the doc doesn't have a example like that
423: [12:20:00] <kinglozzer> Okay. I'd loop out the product tags, give them each a class of '.productTag' or smomething similar, so you can do $('.productTag).click(function(){... etc
424: [12:22:00] <kinglozzer> Then your javascript would look more like this http://pastebin.com/AFph1c8P
425: [12:24:00] * lobarvaz has joined #silverstripe
426: [12:24:00] <ARNHOFF> kinglozzer: <span class="productTag">$Title</span> ?
427: [12:25:00] <lobarvaz> just encountered this again, ss3.0.3: http://open.silverstripe.org/ticket/8070
428: [12:26:00] * webguest has joined #silverstripe
429: [12:27:00] <ARNHOFF> is that the way to do it?
430: [12:28:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/4304103
431: [12:28:00] <webguest> with the name ending with @2x
432: [12:28:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/47e0531babb0...b51b09ac6d95
433: [12:28:00] * travis-ci has left #silverstripe
434: [12:28:00] <webguest> hello, i finally managed to get a htaccess working to search for @2x images if you are on a retina screen.. now i would like to subclass Image it a very simple way. When you use $image.setWidth(100) the new class should also add a 200px image
435: [12:28:00] * travis-ci has joined #silverstripe
436: [12:28:00] <travis-ci> [travis-ci] silverstripe/sapphire#1214 (master - b51b09a : Ingo Schommer): The build passed.
437: [12:29:00] <kinglozzer> ARNHOFF: Yes that should do it
438: [12:29:00] <webguest> where can i find an example to do this?
439: [12:30:00] <ARNHOFF> im not able to click on the span then
440: [12:30:00] <kinglozzer> Do it as an anchor then, <a href="#" class="productTag">$Title</a>
441: [12:31:00] <ARNHOFF> doesnt seem to work, kinglozzer neither does the ProductList.ss show any products when using <% loop Results %>
442: [12:32:00] <ARNHOFF> and I am sure I am working in the righ tcontroller, as I returned a simple function
443: [12:33:00] <kinglozzer> If you visit the url '/assortiment/filter?title=test' it should show a plain list of the products
444: [12:33:00] <kinglozzer> If not, something is wrong with your function.
445: [12:34:00] <ARNHOFF> yes it does
446: [12:34:00] <kinglozzer> Do you have firebug? If so, look at the console for any errors.
447: [12:34:00] <ARNHOFF> that works
448: [12:34:00] * ugly_duck quit (Ping timeout: 240 seconds)
449: [12:34:00] <kinglozzer> Check the URL for the $.ajax request
450: [12:36:00] * Iseroy has joined #silverstripe
451: [12:39:00] <ARNHOFF> it must go wrong in the js?
452: [12:39:00] <ARNHOFF> I do have firebug, but I dont really know, it doesnt really show up errors and I don't really konw either how to actualyl debug through that
453: [12:40:00] <kinglozzer> Yes it appears to be going wrong in the JS. Is the URL for the ajax request definitely correct?
454: [12:41:00] <Iseroy> Hello all, my problem: if a editor unpublished a page in silverstripe - all children unpublished too. Where i find this function?
455: [12:41:00] <kinglozzer> The url: '/something' parameter for $.ajax
456: [12:44:00] <ARNHOFF> kinglozzer: The example of silverstripe the link you sent, didn';t seem to work either btw, mabye it is something there
457: [12:45:00] <ARNHOFF> url: 'assortiment/filter?title=' + $(this).text()
458: [12:46:00] <ARNHOFF> nah, this is the site: http://vanderhelmv4.klant/assortiment/
459: [12:46:00] <ARNHOFF> Uncaught ReferenceError: data is not defined
460: [12:46:00] <ARNHOFF> Uncaught ReferenceError: data is not defined custom.js:6
461: [12:46:00] <kinglozzer> I don't know if that is correct. If your site is in a subfolder, http://me.local:8888/somesite/, then it might not be correct.
462: [12:47:00] * r3v3rb has joined #silverstripe
463: [12:47:00] <ARNHOFF> callback
464: [12:47:00] <ARNHOFF> that is what the console returns, sorry for the spam
465: [12:47:00] <ARNHOFF> (anonymous function) custom.js:6
466: [12:47:00] <ARNHOFF> fire jquery.js:1075
467: [12:47:00] <ARNHOFF> self.fireWith jquery.js:1193
468: [12:47:00] <ARNHOFF> done jquery.js:7553
469: [12:48:00] <kinglozzer> ARNHOFF: Try this http://pastebin.com/JfDPKhmi
470: [12:48:00] <kinglozzer> Hopefully it will give you a more useful error message
471: [12:49:00] <kinglozzer> Hold on
472: [12:49:00] <ARNHOFF> incase that could be confusing you
473: [12:49:00] <ARNHOFF> also, I dont have products/ before assortiment
474: [12:49:00] <kinglozzer> http://pastebin.com/zxqrnPq6
475: [12:49:00] <ARNHOFF> ah
476: [12:49:00] <ARNHOFF> rrequest failed
477: [12:49:00] <kinglozzer> Ahhh no
478: [12:50:00] <ARNHOFF> now it doesnt give a error
479: [12:50:00] <kinglozzer> It should say 'request failed' and then give you something else?
480: [12:51:00] <kinglozzer> Use that code and look at Firebug console, it should save the raw HTML to the console
481: [12:51:00] <kinglozzer> http://pastebin.com/Nq2wmQP0
482: [12:51:00] <ARNHOFF> but its weird that loop Results isnt showing anything in AssortimentPage.ss, but it does when in assortiment/filter?title=test
483: [12:52:00] <ARNHOFF> it does, and inside UL its empty
484: [12:52:00] <ARNHOFF> wait
485: [12:52:00] <ARNHOFF> Found 0 elements
486: [12:53:00] <ARNHOFF> it returns it
487: [12:53:00] <ARNHOFF> so it does seem to work right now :o
488: [12:53:00] <ARNHOFF> the information that I want
489: [12:53:00] <ARNHOFF> in responseText
490: [12:54:00] <kinglozzer> But it's not displaying on the page?
491: [12:54:00] <ARNHOFF> yeap
492: [12:54:00] <kinglozzer> returning*
493: [12:54:00] <kinglozzer> So the AJAX request is return the correct HTML?
494: [12:54:00] * robert_ has joined #silverstripe
495: [12:55:00] <ARNHOFF> My function btw on the controller, http://www.sspaste.com/paste/show/50fe8c4c01f32
496: [12:55:00] <kinglozzer> The 'data' variable contains the HTML that's returned, so you just need to get that onto your page
497: [12:55:00] * funkygibbon quit (Quit: Leaving)
498: [12:55:00] <ARNHOFF> no
499: [12:56:00] <ARNHOFF> using #productsList instead of div#productsList, now gives me a white space
500: [12:56:00] <priithansen> Is there any lightweight html fields around for ss3? In ss2.4 days the dom plugin had one very simple bundled with it. Just bold and couple other options.
501: [12:57:00] <ARNHOFF> but, it isnt showing the responseText
502: [12:57:00] <ARNHOFF> oh it looked like there was a typo there
503: [12:57:00] <ARNHOFF> so there seems to be changing something
504: [12:58:00] <ARNHOFF> it is just removing the include ProductsList
505: [12:58:00] * robert_ quit (Ping timeout: 245 seconds)
506: [12:59:00] <kinglozzer> In the javascript
507: [12:59:00] <kinglozzer> Try replacing the complete( with done(
508: [13:00:00] <ARNHOFF> you're an absolute boss
509: [13:00:00] <ARNHOFF> damn
510: [13:00:00] <ARNHOFF> that worked
511: [13:00:00] <kinglozzer> Haha thanks
512: [13:01:00] <ARNHOFF> now it would be awesome to be able to give an active/current to the categories, is there some command for that where I can look for on the internetwebs?
513: [13:01:00] <kinglozzer> Do you mean too add a class 'active' or something?
514: [13:02:00] <r3v3rb> am i being dumb: http://www.sspaste.com/paste/show/50fe8dd388cf0
515: [13:02:00] <ARNHOFF> yeah, and I probably need to use LeftJoin so it will actualyl search the ProductCategories instead of the title now?
516: [13:03:00] <kinglozzer> http://pastebin.com/a5Rw6L8Z That should handle the classes
517: [13:03:00] <kinglozzer> I hate doing joins so I'll let you figure that one out ARNHOFF ;)
518: [13:03:00] <r3v3rb> how do I only show the menu items when on that item that has children?
519: [13:04:00] <r3v3rb> fixed
520: [13:04:00] * kinglozzer Lunch time
521: [13:04:00] <r3v3rb> forget LinkingMode in the code lol
522: [13:04:00] <r3v3rb> me too kinglozzer what you having?
523: [13:05:00] * UndefinedOffset has joined #silverstripe
524: [13:05:00] <ARNHOFF> But that is the way to do it right, kinglozzer ?
525: [13:06:00] * r3v3rb quit (Quit: r3v3rb)
526: [13:07:00] <ARNHOFF> kinglozzer: It doesnt seem to add active :o
527: [13:10:00] * Iseroy quit (Quit: Page closed)
528: [13:14:00] * r3v3rb has joined #silverstripe
529: [13:14:00] * r3v3rb quit (Client Quit)
530: [13:17:00] * r3v3rb has joined #silverstripe
531: [13:24:00] * pn has left #silverstripe
532: [13:45:00] * EPIK quit (Ping timeout: 248 seconds)
533: [13:46:00] <ARNHOFF> kinglozzer: I got the categories working aswell, thanks again., One last question, the addClass "active" doesn't seem to work
534: [13:47:00] * feejin has joined #silverstripe
535: [13:55:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/4306134
536: [13:55:00] * travis-ci has left #silverstripe
537: [13:55:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/f833226da082...4892c11aaaad
538: [13:55:00] <travis-ci> [travis-ci] silverstripe/sapphire#1215 (3.0 - 4892c11 : Ingo Schommer): The build passed.
539: [13:55:00] * travis-ci has joined #silverstripe
540: [14:10:00] * webguest quit (Ping timeout: 245 seconds)
541: [14:12:00] * ferge has joined #silverstripe
542: [14:27:00] * DesignerX quit (Ping timeout: 240 seconds)
543: [14:28:00] * ferge quit (Quit: Leaving.)
544: [14:29:00] * ferge has left #silverstripe
545: [14:29:00] * ferge has joined #silverstripe
546: [14:35:00] <zri> anyone had the text collector task return
547: [14:35:00] <zri> hi guys
548: [14:35:00] <zri> Fatal error: Maximum function nesting level of '200' reached, aborting!
549: [14:35:00] * zri has joined #silverstripe
550: [14:36:00] * travis-ci has joined #silverstripe
551: [14:36:00] <travis-ci> [travis-ci] silverstripe/sapphire#1216 (master - 786d051 : Ingo Schommer): The build passed.
552: [14:36:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/b51b09ac6d95...786d0516da97
553: [14:36:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/4306971
554: [14:36:00] * travis-ci has left #silverstripe
555: [14:42:00] * r3v3rb quit (Quit: r3v3rb)
556: [14:46:00] <zri> am I doing something wrong with the text collector?
557: [14:47:00] * feejin quit (Remote host closed the connection)
558: [14:48:00] <kinglozzer> ARNHOFF: Try to use this: http://pastebin.com/duwpmKGb. The difference is it's storing $(this) as a variable called $tag
559: [14:48:00] <kinglozzer> Hopefully that should solve it
560: [14:49:00] <ARNHOFF> yeap that fixed it
561: [14:49:00] <ARNHOFF> thanks!
562: [14:57:00] * Shrike_Finland quit (Quit: Leaving.)
563: [15:01:00] <ec8or> Zauberfisch:
564: [15:01:00] <ec8or> where are the germans at?
565: [15:08:00] <kinglozzer> Anyone done a 'members only area' on their site? I'm curious how others do it. I've subclassed Member and added a dropdown to 'SiteTree' called Access Level
566: [15:09:00] <ec8or> kinglozzer: i normally assign members to a custom group and use the built-in Access tab
567: [15:09:00] <ec8or> then people will get redirected properly etc.
568: [15:13:00] <kinglozzer> The redirections are okay by using Security::permissionFailure()
569: [15:13:00] <ARNHOFF> Anyone here extended BreadCrumbs in SS3? The example of SSBits doesn't seem to work the same in ss3
570: [15:13:00] <kinglozzer> I was going to do it that way, but I need to give our client the ability to add/edit/remove members, without being able to add/remove Administrators etc
571: [15:14:00] <Zauberfisch> ec8or hmm?
572: [15:14:00] <ec8or> kinglozzer: ok in that case i'd add a function on your subclassed member, like isCustomer() { return True; }, and then test for that wherever you need to
573: [15:14:00] <kinglozzer> ARNHOFF: Yes it's possible, I'll see if I can find the code
574: [15:14:00] <ARNHOFF> kinglozzer: I want to be able to breadcrumb my custom dataobjects
575: [15:15:00] <ec8or> Zauberfisch: how would you say "client pages" in german?
576: [15:15:00] <Zauberfisch> ec8or please some more context
577: [15:15:00] <kinglozzer> I'm using 'implements PermissionProvider' which works fairly well, I'll need to create that function anyway to hide/unhide certain things from the nav :)
578: [15:15:00] <ec8or> Zauberfisch: hi
579: [15:16:00] <ec8or> Zauberfisch: http://lorensbergs.se/client-pages
580: [15:16:00] <ec8or> an area where you can find more resources and more importantly log in to your account
581: [15:16:00] <ec8or> no like that
582: [15:16:00] <Zauberfisch> ec8or client pages as in "this are the websites of our clients"?
583: [15:17:00] <ec8or> it will only go in the url so not super important as long as it looks ok
584: [15:17:00] <ec8or> yeah it does here as well
585: [15:17:00] <Zauberfisch> I would call it resources, client area or so
586: [15:17:00] <ec8or> actually it is probably better to name it "resources"
587: [15:17:00] <Zauberfisch> ah, so its a page where clients can log in and access awesome stuff?
588: [15:17:00] <ec8or> exactly
589: [15:17:00] <Zauberfisch> in my opinion client pages sounds weird here
590: [15:18:00] <kinglozzer> ARNHOFF: http://pastie.org/5823567
591: [15:18:00] <ec8or> what is resources?
592: [15:18:00] <Zauberfisch> "resources" => "Ressourcen"
593: [15:18:00] <Zauberfisch> "client area" => "Kundenbereich"
594: [15:18:00] * perverse has joined #silverstripe
595: [15:18:00] <ec8or> that's why i put resources in the menu
596: [15:19:00] <Zauberfisch> the best choice in my opinion would be "Kundenbereich"
597: [15:19:00] <Zauberfisch> (which is client area)
598: [15:19:00] <Zauberfisch> "client pages" => "Kunden Seiten" // but that one sounds weird in german as well I think
599: [15:21:00] <ARNHOFF> thanks kinglozzer!
600: [15:22:00] <Zauberfisch> np
601: [15:22:00] <ec8or> Zauberfisch: nice one, i'll go with Kundenbereich
602: [15:22:00] <ec8or> danke sch?n
603: [15:23:00] * perverse`w quit (Ping timeout: 248 seconds)
604: [15:26:00] <zri> hey guys
605: [15:27:00] <zri> Fatal error: Maximum function nesting level of '200' reached, aborting!
606: [15:27:00] <zri> and
607: [15:27:00] <zri> anyone can help about the text collector
608: [15:27:00] <zri> makes this error
609: [15:27:00] <zri> 3.03
610: [15:27:00] <zri> and older SS versions
611: [15:27:00] <zri> worked like a charm on ss 3.01
612: [15:27:00] <zri> worked like a charm on ss 3.01
613: [15:27:00] <zri> I have php unit installed
614: [15:42:00] * hubertusanton quit (Ping timeout: 252 seconds)
615: [15:42:00] * ray__ has joined #silverstripe
616: [15:50:00] * r3v3rb has left #silverstripe
617: [15:50:00] * r3v3rb has joined #silverstripe
618: [15:56:00] * hubertusanton has joined #silverstripe
619: [16:00:00] <kinglozzer> Using SilverStripe Mobile module: Expiry date cannot have a year greater then 9999
620: [16:08:00] <kinglozzer> I'd like to think my site will still be around then, but I'm not sure
621: [16:08:00] <kinglozzer> Uhhh, it's trying to set a cookie expiry date that's 3.7 million years in the future...
622: [16:11:00] * zri quit (Ping timeout: 245 seconds)
623: [16:18:00] * howardgrigg has joined #silverstripe
624: [16:18:00] * howardgrigg quit (Ping timeout: 256 seconds)
625: [16:19:00] <zfmf> :D
626: [16:33:00] <kinglozzer> Cookie::set() has always used days... how has this not been noticed before?!
627: [16:36:00] * vic__ has joined #silverstripe
628: [16:37:00] <vic__> hey anyone is available?
629: [16:38:00] * kinglozzer quit (Remote host closed the connection)
630: [16:40:00] * zfmf has left #silverstripe
631: [16:41:00] * kinglozzer has joined #silverstripe
632: [16:41:00] * wmk quit (Quit: nice to meet you ;))
633: [16:42:00] <kinglozzer> Hmm, maybe they didn't have E_ALL set for error reporting
634: [16:44:00] <kinglozzer> Ugh stupid MAMP
635: [16:44:00] * kinglozzer quit (Remote host closed the connection)
636: [16:46:00] * kinglozzer has joined #silverstripe
637: [16:49:00] <kinglozzer> Post your question and someone might be able to help
638: [16:49:00] <vic__> ehh, i got a silverstripe project due soon and its driving me crazy, anyone could help me please? its a paid work.
639: [16:51:00] <vic__> thats it..
640: [16:51:00] <vic__> its a module, duplicate the tree hierarchy structure, able to select menu item, send the result to server in array structure
641: [16:52:00] <vic__> i guess its not hard..but its drive me crazy
642: [16:53:00] <ARNHOFF> I have a has_one page in ModelAdmin, butit never seems to save the id of that page. So it doesn't show up in the frontend list, is there a way that I can auto fill with onbeforewrite or something?
643: [16:53:00] <vic__> it would be big help if someone can help me, will pay in cash
644: [16:57:00] <ARNHOFF> yeap, there is no problem with that
645: [16:57:00] <kinglozzer> ARNHOFF: Have you set up the relationship the other way round as well?
646: [16:57:00] <kinglozzer> I.E. in Page, $has_many = array('YourDataObject
647: [16:57:00] <ARNHOFF> as soon as I assign the has_one manually
648: [16:57:00] <ARNHOFF> it works perfect
649: [16:57:00] * catcher has joined #silverstripe
650: [16:58:00] <ARNHOFF> yeap, the relationship is right
651: [16:58:00] <ARNHOFF> the has_one has a has_many, and the has_many has the has_one :P
652: [16:59:00] * howardgrigg quit (Ping timeout: 256 seconds)
653: [16:59:00] <kinglozzer> Hmm, maybe it's something to do with SiteTree specifically
654: [16:59:00] * howardgrigg has joined #silverstripe
655: [17:00:00] <catcher> ARNHOFF, you need to choose which page should be assigned in the modeladmin interface
656: [17:00:00] <ARNHOFF> well, I have some projects where I have the user fill it in the SiteTree
657: [17:00:00] * g4b0 quit (Quit: Sto andando via)
658: [17:00:00] <ARNHOFF> catcher: yeah, indeed, but is there a way that it auto selecst the first one? Instead of just saving empty?
659: [17:01:00] <ARNHOFF> well, I have a has_one AssortimentPage
660: [17:01:00] <ARNHOFF> but there will only be one in the SiteTree
661: [17:01:00] <catcher> ARNHOFF, sure, but what do you mean by the first one? Which page is considered first in your context?
662: [17:02:00] <kinglozzer> ARNHOFF: To have a page by default instead of empty, you'll need to create the field yourself in getCMSFields() if you aren't already (I think)
663: [17:02:00] <ARNHOFF> so in ModelAdmin, it should select that pagetype if there is just ONE, instead of saving empty
664: [17:02:00] <catcher> function onAfterWrite(){ $this->PageID = $this->PageID == 0 ? AssortimentPage::get()->first()->ID; parent::onAfterWrite(); }
665: [17:03:00] <kinglozzer> Or that ^^. I was thinking of having a dropdown menu that doesn't allow empty
666: [17:03:00] <catcher> Yeah, that'd work too, just set a valid default option on the dropdown.
667: [17:04:00] <discorpia> catcher: you forget the fallback, or can one do ternary with just a "?"?
668: [17:05:00] <ARNHOFF> I rather do your option catcher, I think
669: [17:05:00] <catcher> discorpia, right :)
670: [17:05:00] <FrozenFire> Should produce a hierarchical map of ID => (children)
671: [17:05:00] <FrozenFire> Not sure if closures can be referred to using __FUNCTION__ as a callback
672: [17:05:00] <discorpia> oh you were just giving an example ;p
673: [17:05:00] <FrozenFire> vic__, Something like http://www.sspaste.com/paste/show/50fec6b781a88 maybe?
674: [17:06:00] <catcher> $this->PageID = $this->PageID == 0 ? AssortimentPage::get()->first()->ID : $this->PageID;
675: [17:06:00] <ARNHOFF> but your function seems to give a syntax problem and I cant see the problem
676: [17:06:00] <catcher> ARNHOFF, ^
677: [17:06:00] * Gue______ has joined #silverstripe
678: [17:07:00] <ARNHOFF> ofc, I had to change it to this right? $this->AssortimentPageID = $this->AssortimentPageID == 0 ? AssortimentPage::get()->first()->ID : $this->AssortimentPageID;
679: [17:07:00] <ARNHOFF> yup, thanks man
680: [17:07:00] <catcher> np
681: [17:08:00] <catcher> if the relationship is has_one (AssortimentPage => AssortimentPage), then yes
682: [17:09:00] <catcher> I misread above, thought it had_one Page that you wanted to default to the first AssortimentPage.
683: [17:09:00] <ARNHOFF> oke, then I got it write. I just got confused becuase you did use AssortimentPage, but not on the others
684: [17:10:00] <ARNHOFF> right* btw, and ah oke :) Well, it is working great, so thanks once again
685: [17:10:00] <catcher> np
686: [17:11:00] <FrozenFire> I don't know if it's working
687: [17:11:00] <vic__> FrozenFir its working?
688: [17:11:00] <catcher> New way to Version: had_one
689: [17:11:00] <FrozenFire> It's just an example
690: [17:11:00] <FrozenFire> vic__, http://www.sspaste.com/paste/show/50fec83d20289 is my new iteration of it
691: [17:12:00] <FrozenFire> :P
692: [17:12:00] <FrozenFire> Not necessarily looking to collect on the bounty. Just interesting mental gymnastics for this morning
693: [17:13:00] <vic__> how to show the tree structure like the one in menu page?
694: [17:13:00] <vic__> hmmm
695: [17:14:00] <FrozenFire> Are you sure you're not looking for TreeDropdownField?
696: [17:16:00] <vic__> nah...
697: [17:16:00] <vic__> sorry, i wrote wrong
698: [17:17:00] <vic__> and using jsTree to do the selection of menu item, the result of the selection will be in array format
699: [17:17:00] * Gue______ quit (Quit: Computer has gone to sleep.)
700: [17:17:00] <vic__> the siteTree structure in the Page page in the backend
701: [17:18:00] <vic__> but i dont know how to show the siteTree exactly like the one in the Page
702: [17:19:00] <webguest> does any one know this? http://support.dev7studios.com/discussions/nivo-slider-jquery-plugin/UH-645506
703: [17:19:00] * webguest has joined #silverstripe
704: [17:20:00] <webguest> using nivo-slider, i want to center the images vertically, i can do this with jquery, but that jquery script doesnt have affect on the the transition slides :(
705: [17:20:00] <FrozenFire> webguest, Fairly certain that's not possible using nivo slider. It uses a lot of Javascript tomfoolery to get the effects working
706: [17:21:00] <catcher> Maybe injecting on nivo's transition callback
707: [17:21:00] <FrozenFire> If it's possible, it'll be through positioning the slider itself vertically
708: [17:21:00] <FrozenFire> Yeah, I guess you could also augment its Javascript tomfoolery
709: [17:21:00] <vic__> FrozenFire, do you have any idea please?
710: [17:22:00] <webguest> also the images in #slider div.nivo-slice img
711: [17:22:00] <webguest> hmm, $.each($('#slider img') should get all images in the div slider right?
712: [17:22:00] <webguest> not that my code is wrong
713: [17:23:00] <catcher> webguest, that each() expression will indeed select #slider div.nivo-slice img, provided the elements exist at the time your .each() runs.
714: [17:24:00] <FrozenFire> vic__, https://github.com/silverstripe/silverstripe-cms/blob/3.0/templates/Includes/CMSMain_TreeView.ss
715: [17:24:00] <kinglozzer> webguest: $('#slider img').each(function(){ }); is considered a better way of writing it :)
716: [17:25:00] <FrozenFire> But more likely than not, it's a lot of hardcoded Javascript and HTML
717: [17:25:00] <catcher> webguest, it's possible you're binding before the images exist, in which case you may want to bind in window.load() instead of document.ready()
718: [17:25:00] <catcher> webguest, but this is a better chat for #jquery
719: [17:25:00] <FrozenFire> That's where it's displayed in the CMS
720: [17:25:00] <FrozenFire> Might want to work your way up through the code to figure out
721: [17:26:00] <vic__> interesting, will try now
722: [17:26:00] <vic__> FrozenFire, thanks a lot!
723: [17:27:00] * kinglozzer quit (Remote host closed the connection)
724: [17:31:00] * ivoba has joined #silverstripe
725: [17:31:00] * Gue______ has joined #silverstripe
726: [17:33:00] <Gue______> hi all, I'm trying to discern the best way to run some js after a page has been saved, in the admin - as far as I can tell the documented approach of using "Behaviour.regster??? " doesn't seem to work
727: [17:33:00] * Gue______ is now known as michael_13
728: [17:33:00] * popeshoe quit (Quit: Leaving)
729: [17:35:00] <webguest> ok thx everyone
730: [17:40:00] * Shrike_Finland has joined #silverstripe
731: [17:40:00] <ivoba> can someone point me to how i use gridfield with has_one?
732: [17:41:00] <FrozenFire> You don't
733: [17:41:00] <ivoba> ok what to do?
734: [17:41:00] <FrozenFire> Depends on what sort of has_one you're trying to fulfill
735: [17:42:00] <ivoba> first i simply used getCMSFields
736: [17:42:00] <ivoba> but there you have to take care of writing and deleting with the onBeforeWrite stuff
737: [17:43:00] <FrozenFire> Might so what you need
738: [17:43:00] <ivoba> i thought maybe gridfield could handle this
739: [17:43:00] <ivoba> its a DO in has_one with some textfields
740: [17:43:00] <FrozenFire> simon_w wrote https://github.com/simonwelsh/silverstripe-GridFieldRelationHandler
741: [17:44:00] <FrozenFire> do**
742: [17:47:00] <ivoba> i guess that operates on exisiting objects
743: [17:48:00] <vic__> FrozenFire, sorry...i mean to duplicate the tree structure in a new module, not the fronted..
744: [17:48:00] <FrozenFire> You might be able to add a GridFieldAddNewButton to it
745: [17:49:00] <FrozenFire> vic__, Still not sure what you're looking for.
746: [17:50:00] <vic__> i actually need that menu tree
747: [17:50:00] <FrozenFire> Which I linked you to
748: [17:50:00] <ivoba> weird that there is such a easy tool like gridfield for has_many but for has_one none
749: [17:50:00] <FrozenFire> http://api.silverstripe.org/trunk/cms/controller/CMSMain.html#methodSiteTreeAsUL
750: [17:50:00] <vic__> but i need to put the tree in module, not the template..
751: [17:50:00] <FrozenFire> Yes
752: [17:50:00] <vic__> sure, if you go to your site/SilverStripe-cms-v3.0.3/admin/pages/, you will see a tree under "your site name" right?
753: [17:51:00] <FrozenFire> ivoba, It's actually not all that weird. has_one relations are... tricky
754: [17:51:00] <FrozenFire> There are several ways that one might want to handle them
755: [17:52:00] <ivoba> ok i guess i take the onBeforeWrite road
756: [17:52:00] <ivoba> ok i guess i take onBeforeWrite road
757: [17:53:00] * robert_ has joined #silverstripe
758: [17:53:00] * robert_ has joined #silverstripe
759: [17:53:00] * robert_ quit (Changing host)
760: [17:53:00] <ivoba> i took this for example: http://www.silverstripe.org/data-model-questions/show/11044
761: [17:53:00] <michael_13> ivoba, I'm encountering a similar issue, could you say a little more about your approach?
762: [17:55:00] * lobarvaz has left #silverstripe
763: [17:57:00] <michael_13> ivoba, thanks!
764: [17:57:00] <michael_13> that's not so bad
765: [17:57:00] <michael_13> and it was getting much gnarlier than that
766: [17:57:00] <michael_13> I was starting to write some custom fields
767: [17:58:00] * robert_ quit (Ping timeout: 252 seconds)
768: [18:00:00] * webguest quit (Ping timeout: 245 seconds)
769: [18:04:00] <ivoba> na with the gridfield and the GridFieldHasOneRelationHandler i get "GridField doesn't have a modelClassName"
770: [18:05:00] <FrozenFire> I wonder if something like this wouldn't work: http://www.sspaste.com/paste/show/50fed4e58ff65
771: [18:06:00] <FrozenFire> Err, the first getComponent was supposed to be followed by getCMSFields()->Fields()
772: [18:06:00] <FrozenFire> Instead of just ->Fields()
773: [18:10:00] <michael_13> ivoba, were you able to get the persisted has_one data to render in the form?
774: [18:11:00] <michael_13> ah
775: [18:11:00] <ivoba> therefor the onBeforeWrite
776: [18:11:00] <michael_13> even though everything looks good in the db
777: [18:11:00] <michael_13> after I save, the fields for the has_one are re-rendered with empty values
778: [18:11:00] <ivoba> yes thats the problem
779: [18:12:00] <FrozenFire> When you save the CMS EditForm, it actually gets the object you're writing, then if it has save<FieldName> it'll call that with the data
780: [18:12:00] <FrozenFire> Handling it in the onBeforeWrite probably isn't the right way to do it.
781: [18:13:00] * r3v3rb has joined #silverstripe
782: [18:13:00] <FrozenFire> Otherwise it'll try setting that field, and letting the setter figure it out
783: [18:14:00] <FrozenFire> By loading all of the has_one's fields into a complex named field, you should be able to then have it pass that data to a saveYourHasOne method and then update your has_one with that data.
784: [18:14:00] * r3v3rb has left #silverstripe
785: [18:15:00] <ivoba> does it also create one if there is no one yet?
786: [18:15:00] <FrozenFire> DataObject::getComponent will return either the existing has_one, or create an "empty object"
787: [18:15:00] <michael_13> aren't complex table fields deprecated?
788: [18:16:00] <FrozenFire> In that, it'll create a new instance of the type of the has_one and return that
789: [18:17:00] <FrozenFire> michael_13, And I'm not talking about a CTF
790: [18:18:00] <FrozenFire> I'm talking about a complex form field
791: [18:18:00] <michael_13> got it
792: [18:18:00] <FrozenFire> E.g. FieldName[SubFieldName]
793: [18:18:00] <FrozenFire> PHP will interpret that as an associative array
794: [18:20:00] <ivoba> im sorry it doesnt write her
795: [18:22:00] <FrozenFire> Or perhaps you have to name your CompositeField
796: [18:23:00] <FrozenFire> Hard to tell exactly
797: [18:26:00] * Shrike_Finland quit (Quit: Leaving.)
798: [18:26:00] <ivoba> the fields get rendered but it wont call the save method
799: [18:27:00] <FrozenFire> Yeah, it occurs to me that the logic is that it'll try to call saveFieldName[subFieldName]()
800: [18:27:00] <FrozenFire> It's a tough one, that's for sure
801: [18:28:00] <michael_13> assuming we can get the saving to work, how do you get the persisted values of the has_one to render?
802: [18:29:00] <michael_13> ah
803: [18:29:00] <FrozenFire> You would call FieldList::setValues($this->getComponent("MyHasOne")->data())
804: [18:29:00] <FrozenFire> I suppose
805: [18:30:00] <michael_13> (thanks for the pointers FrozenFire)
806: [18:31:00] <FrozenFire> Maybe I'll write something like a HasOneField at some point
807: [18:31:00] <ivoba> i give up :) i ll make a decorator for that
808: [18:39:00] * robert_ has joined #silverstripe
809: [18:43:00] * simon_w|air has joined #silverstripe
810: [18:45:00] * ugly_duck has joined #silverstripe
811: [18:45:00] * ugly_duck quit (Changing host)
812: [18:45:00] * ugly_duck has joined #silverstripe
813: [18:45:00] * Nivery has joined #silverstripe
814: [18:46:00] * robert_ quit (Ping timeout: 276 seconds)
815: [18:47:00] * michael_13 quit (Quit: Computer has gone to sleep.)
816: [18:50:00] * ugly_duck quit (Ping timeout: 246 seconds)
817: [18:53:00] * gelignite has joined #silverstripe
818: [18:53:00] * Gue______ has joined #silverstripe
819: [19:13:00] * ivoba quit (Quit: Leaving)
820: [19:29:00] * zfmf has joined #silverstripe
821: [19:41:00] * nickmolhoek has joined #silverstripe
822: [19:41:00] * nickmolhoek quit (Remote host closed the connection)
823: [19:42:00] * nickmolhoek has joined #silverstripe
824: [19:42:00] * nickmolhoek quit (Client Quit)
825: [19:42:00] * nickmolhoek has joined #silverstripe
826: [19:56:00] * Bollig|DesignCty has joined #silverstripe
827: [20:01:00] * tankr has joined #silverstripe
828: [20:03:00] <catcher> shouldn't $errorMessage available in ErrorPage.ss if set by a controller?
829: [20:09:00] * instabil has joined #silverstripe
830: [20:10:00] <Pyromanik> vic__: still in here?
831: [20:11:00] <Pyromanik> templates is what you're after.
832: [20:11:00] <Pyromanik> oh yeah, FrozenFire got you sorted in the end, never mind.
833: [20:12:00] <Pyromanik> catcher: should be I guess. But only if it's on the active controlelr.
834: [20:12:00] <Pyromanik> it's gotta be in scope
835: [20:13:00] * tankr quit (Quit: Leaving.)
836: [20:16:00] <priithansen> Is there any lightweight html fields around for ss3? In ss2.4 days the dom plugin had one very simple bundled with just bold and couple other options.
837: [20:17:00] <FrozenFire> Huh
838: [20:19:00] * willr_ has joined #silverstripe
839: [20:23:00] * robert_ has joined #silverstripe
840: [20:28:00] * robert_ quit (Ping timeout: 245 seconds)
841: [20:32:00] * UndefinedOffset quit (Quit: Leaving.)
842: [20:38:00] * robert_ has joined #silverstripe
843: [20:39:00] * tankr has joined #silverstripe
844: [20:41:00] * tankr quit (Client Quit)
845: [20:43:00] * robert_ quit (Max SendQ exceeded)
846: [20:45:00] * zfmf has left #silverstripe
847: [20:54:00] * Nivery quit (Remote host closed the connection)
848: [20:54:00] * Nivery has joined #silverstripe
849: [20:57:00] * UndefinedOffset has joined #silverstripe
850: [21:07:00] * UndefinedOffset quit (Quit: Leaving.)
851: [21:10:00] * mirrors has joined #silverstripe
852: [21:11:00] * ARNHOFF quit (Read error: Connection reset by peer)
853: [21:12:00] <mirrors> hey guys. I am using SS 2.4+ and I was hoping somebody could tell me how I can DataObject::get() all the Live page so I can change some content. If i just DataObject::get() is only gets the non Live version of the page
854: [21:12:00] <mirrors> I have tried Versioned::get_by_stage('Page', 'Live'); but when I write() is doesnt save
855: [21:14:00] <mirrors> awesome I will give that ago
856: [21:14:00] <simon_w> writeToStage('Live')
857: [21:15:00] <mirrors> yup
858: [21:15:00] <mirrors> am i correct in getting the live objects like this Versioned::get_by_stage('Page', 'Live');
859: [21:15:00] <simon_w> This is all in the backend, right?
860: [21:15:00] <mirrors> I am running a task
861: [21:16:00] <simon_w> Versioned::reading_stage('Live');
862: [21:16:00] <mirrors> and how do you do that
863: [21:16:00] <simon_w> It does sound like it'll be easier if you just set the reading mode
864: [21:17:00] <mirrors> oh nice
865: [21:17:00] <mirrors> then can I simply DataObject::get() and then write()
866: [21:17:00] <simon_w> yes
867: [21:18:00] <mirrors> wicked
868: [21:18:00] <mirrors> and will it only set the reading_stage for that task
869: [21:18:00] <simon_w> Yeas
870: [21:18:00] <mirrors> cheers
871: [21:21:00] <mirrors> one more thing. When I try to even run db/build via sake I am getting a Can't find extension class error
872: [21:22:00] <mirrors> however if i run through the url it works fine
873: [21:22:00] <mirrors> i have set up $_FILE_TO_URL_MAPPING etc
874: [21:25:00] <simon_w> flush
875: [21:25:00] <simon_w> or use dev/build like you're supposed to
876: [21:26:00] <mirrors> and via sake
877: [21:26:00] <simon_w> sake dev/build flush=1
878: [21:26:00] <mirrors> ah
879: [21:26:00] <mirrors> yeah I have tried dev/build
880: [21:26:00] <simon_w> Though you'll probably still need to flush if it's because of a _config call
881: [21:26:00] <mirrors> i tried flush=all on the front end
882: [21:27:00] <mirrors> i was still using ?
883: [21:27:00] <mirrors> cheers
884: [21:32:00] <Pyromanik> is there a word derp migration task for blog module?
885: [21:33:00] <Pyromanik> FrozenFire: ?
886: [21:34:00] <irogue> sounds like something i'd write
887: [21:34:00] <irogue> class DerpMigrationTask
888: [21:35:00] <Pyromanik> ah shit, it's no wordderp
889: [21:35:00] <Pyromanik> posterous.com
890: [21:35:00] <Pyromanik> sballs
891: [21:42:00] * chrisrio has joined #silverstripe
892: [21:42:00] <simon_w> Write one
893: [21:42:00] <chrisrio> hey gents, funny question
894: [21:43:00] <chrisrio> I mean, I know I can - I just want to do it without hacking up core
895: [21:43:00] <chrisrio> I can define the sort order of my SiteTree in my _config.php (I want the newest stuff to appear first in the tree view)
896: [21:43:00] <chrisrio> works great.
897: [21:43:00] <chrisrio> my only question now is - can I get pages when they are first created to appear at the top rather than the bottom? (they'll appear down the bottom, and then when you refresh the page they will assume their rightful place at the top)
898: [21:44:00] <chrisrio> laziness dictates that it appears at the top..
899: [21:44:00] <chrisrio> context - imagine you've got 200 pages and you make a bunch of new ones, you have to scroll down a lot :<
900: [21:45:00] * r3v3rb has joined #silverstripe
901: [21:46:00] * r3v3rb has left #silverstripe
902: [21:51:00] <chrisrio> sorted gents, cheers for your ears! :)
903: [22:12:00] * SightUnseen has joined #silverstripe
904: [22:15:00] * SightUnseen has left #silverstripe
905: [22:22:00] * DanielFarbox has joined #silverstripe
906: [22:25:00] * Nivery has left #silverstripe
907: [22:29:00] * gelignite quit (Quit: http://bit.ly/nkczDT)
908: [22:30:00] <DanielFarbox> Hi all, I'm using SS3, I can't get styles to appear in tiny mce editor, I've set .subheading in typography.css but does not work, I've tried .typography .subheading also, any ideas where I might find some information on this in the silverstripe docs?
909: [22:31:00] <simon_w> DanielFarbox, you need to put them in editor.css as .typography .blah and then flush your browser's cache like crazy
910: [22:37:00] <perverse> g'morning all
911: [22:40:00] <DanielFarbox> I flushed and flushed and that thing won't go down. Is there something silly I might be doing. Here is the html for the select I got from firebox <a id="Form_EditForm_Content_styleselect_text" class="mceText mceTitle" onmousedown="return false;" onclick="return false;" href="javascript:;" tabindex="-1">Styles</a>
912: [22:41:00] <DanielFarbox> I have this in editor.css .typograhpy .subheading { margin-top: -10px; color: #00ff00; }
913: [22:42:00] <DanielFarbox> I show the html from firebug wondering if the onmousedown="return false;" is a clue to my problem.
914: [22:49:00] <DanielFarbox> Ok so forgetting my new style the style drop down does not drop down at all to show any styles in firefox. BUT it does work absolutely fine in Safari.
915: [22:49:00] * Emil_Blume quit (Quit: Leaving.)
916: [22:53:00] * Colin[pi] has joined #silverstripe
917: [23:05:00] * vic__ quit (Ping timeout: 245 seconds)
918: [23:06:00] <DanielFarbox> Ok so in case it helps anyone else who has the same problem I'm mentioned above I found this http://www.tinymce.com/forum/viewtopic.php?id=10974 which told me to "remove css conflicts" so I removed this from typography.css @import url(http://fonts.googleapis.com/css?family=Lato:400,700,900,400italic); and the select drop down now works in firefox :)
919: [23:09:00] * wwwalker has joined #silverstripe
920: [23:11:00] * wwwalker has joined #silverstripe
921: [23:11:00] * wwwalker quit (Read error: Connection reset by peer)
922: [23:12:00] <wwwalker> can't run ss 3.0.3 on php 5.2.9, what version will?
923: [23:14:00] * wwwalker quit (Read error: Connection reset by peer)
924: [23:14:00] <simon_w> PHP 5.3.2 and above
925: [23:15:00] <wwwalker> I found answer - ss 2.4 works on PHP 5.2.9 http://www.silverstripe.org/installing-silverstripe/show/22026
926: [23:15:00] * wwwalker has joined #silverstripe
927: [23:16:00] <FrozenFire> It exists only as a skeleton in the closet of the project, shameful to all involved.
928: [23:16:00] <FrozenFire> The PHP project has officially abandoned it completely.
929: [23:16:00] <FrozenFire> wwwalker, Please. Please. Please do not use PHP 5.2
930: [23:16:00] <simon_w> Though you really should run a newer version of PHP
931: [23:16:00] <FrozenFire> :P
932: [23:16:00] <FrozenFire> Though perhaps not as bad as PHP 4
933: [23:17:00] <Colin[pi]> yeah use 5.3 at least
934: [23:18:00] <simon_w> Should use 5.5!
935: [23:18:00] <Colin[pi]> like living on the edge? :P
936: [23:18:00] <simon_w> Yes.
937: [23:18:00] <FrozenFire> At least 5.3.10
938: [23:18:00] <FrozenFire> And not early 5.3
939: [23:18:00] <Colin[pi]> no
940: [23:19:00] <ss23> lol
941: [23:19:00] <Colin[pi]> this.. is PHP we are talking about :P
942: [23:19:00] <wwwalker> is there is wrapper so php 5.2.9 works on ss 3.0.3?
943: [23:19:00] <simon_w> Pfft, they're starting the betas. Hardly living on the edge :p
944: [23:20:00] <simon_w> You should be using 5.3 at least
945: [23:20:00] <FrozenFire> Oh, by the way, any thoughts on moving things like the Versioned extension into a trait when 5.4 becomes the requirement for SS?
946: [23:20:00] <wwwalker> is php 5.3.18 ok?
947: [23:20:00] <simon_w> FrozenFire, need to be able to add traits at runtime
948: [23:20:00] <FrozenFire> wwwalker, Yes
949: [23:20:00] <FrozenFire> Why?
950: [23:20:00] <simon_w> wwwalker, no. That is also a bad idea.
951: [23:21:00] <wwwalker> you are very quick - thanks
952: [23:21:00] <FrozenFire> If a DataObject is versioned, it should implement the versioned trait
953: [23:21:00] <FrozenFire> Same with the hierarchy extension
954: [23:21:00] <simon_w> If you want to version Members, you're screwed
955: [23:21:00] * EPIK has joined #silverstripe
956: [23:21:00] <wwwalker> good I have another host in US that has that - the Melbourne has 5.2.9
957: [23:21:00] <FrozenFire> simon_w, Loose horizontal inheritance is not a good thing.
958: [23:21:00] <FrozenFire> It's a bug, not a feature.
959: [23:21:00] <FrozenFire> Extensions should be used to augment core features. Not implement them.
960: [23:22:00] <FrozenFire> Apply the trait as an extension.
961: [23:22:00] <simon_w> Also, passing in arguments to the constructors (especially for Versioned) is important
962: [23:22:00] <FrozenFire> How hard is that?
963: [23:22:00] <FrozenFire> Then make Extension support having traits
964: [23:23:00] * robert_ has joined #silverstripe
965: [23:23:00] <FrozenFire> Though yes, a wrapper class is what it would be, at the base of it.
966: [23:23:00] * robert_ quit (Changing host)
967: [23:23:00] * robert_ has joined #silverstripe
968: [23:23:00] <FrozenFire> Such as the stage names, staging process, etc.
969: [23:23:00] <FrozenFire> Versioned has certain behaviours that need to be handled explicitly by the implementor.
970: [23:23:00] <FrozenFire> Not just a wrapper class.
971: [23:23:00] <simon_w> So, just add a wrapper class for every trait? That seems kinda redundant
972: [23:24:00] <Colin[pi]> I was using DOMPDF before.... *sad face*
973: [23:24:00] <Colin[pi]> btw, if anyone is generating PDFs from code, I recently discovered wkhtmltopdf, it's simply awesome
974: [23:24:00] <FrozenFire> Moving it back a step in theory to move it forward three steps in practise is always an easy choice.
975: [23:24:00] <simon_w> Colin[pi], could've told you that :p
976: [23:24:00] <Colin[pi]> well you didn't sir, so ner
977: [23:24:00] <Colin[pi]> ;P
978: [23:24:00] <simon_w> Colin[pi], search the logs and I have :p
979: [23:25:00] <simon_w> FrozenFire, there's still other things that Extension provides that traits can't. How would you do something like updateCMSFields() with traits?
980: [23:25:00] <Colin[pi]> logs schmogs
981: [23:25:00] <Colin[pi]> I can't remember what I had for breakfast, let alone what you told me before ;D
982: [23:26:00] <simon_w> hfried and I have had this discussion a couple of times now. It'll be great if we could use traits but there's certain things that make it infeasible with the way Extensions get used
983: [23:26:00] * wwwalker quit (Read error: Connection reset by peer)
984: [23:27:00] <willr_> Colin[pi] whatever sublime gives me .
985: [23:27:00] <FrozenFire> simon_w, I didn't say replace extensions with traits.
986: [23:27:00] <FrozenFire> I said make certain core extensions that are used purely in the form of traits, as traits.
987: [23:27:00] <Colin[pi]> stupid question, what is everyone's favored font for coding?
988: [23:27:00] <willr_> simon_w I'm pretty sure I've asked this before as well but meh, any of your dps recurring billing stuff worth open sourcing?
989: [23:27:00] <FrozenFire> Versioned is almost never used as an additional sort of thing.
990: [23:27:00] <simon_w> willr_, I should bug James about that sometime
991: [23:27:00] <FrozenFire> If it is, then create an extension which wraps that trait and allows you to augment the functionality.
992: [23:29:00] <FrozenFire> I'm not familiar with those specifically, but yeah, it wouldn't be a 1:1 mapping.
993: [23:29:00] <simon_w> FrozenFire, augmentDatabase() and augmentSQL() (the two main parts of Versioned) don't work in the context of a trait
994: [23:29:00] <Colin[pi]> ah I was meaning to try out sublime, thanks for reminding me :)
995: [23:29:00] * chillu quit (Quit: chillu)
996: [23:29:00] <FrozenFire> Some things would have to change.
997: [23:30:00] <FrozenFire> Especially such an inconsequential API change as augmentDatabase
998: [23:30:00] <FrozenFire> Since it's also requiring 5.4, I think that's far enough into the future for an API change to be okay.
999: [23:30:00] <simon_w> Hierarchy, on the other hand, would work great as a trait
1000: [23:30:00] <FrozenFire> :P
1001: [23:31:00] <FrozenFire> FulltextSearchable as well
1002: [23:31:00] <simon_w> That's what used to build the _Live and _version tables
1003: [23:31:00] <simon_w> augmentSQL is used to query the right table for the current stage
1004: [23:33:00] <simon_w> Lunch time!
1005: [23:33:00] <FrozenFire> Also, methods can be overloaded from traits
1006: [23:33:00] <FrozenFire> If you need your own implementation of augmentSQL, then you could implement it
1007: [23:33:00] * mirrors quit (Quit: Page closed)
1008: [23:34:00] <simon_w> Until you have two things that do that
1009: [23:34:00] <FrozenFire> Not sure what you mean
1010: [23:35:00] <simon_w> Two extensions with augmentSQL can't be moved to traits if they're ever used on the same object
1011: [23:35:00] <Colin[pi]> Lunch time? it's 10:30 ;)
1012: [23:35:00] <simon_w> like, Translatable and Versioned
1013: [23:35:00] <FrozenFire> I'd have to look at the exact use-case, but I would be very surprised if SS stumbled upon a language feature in userspace that cannot be implemented in PHP
1014: [23:35:00] <FrozenFire> simon_w, You would rename the trait method
1015: [23:36:00] <simon_w> Yay, coupling!
1016: [23:36:00] <FrozenFire> And then call it in your own augmentSQL
1017: [23:36:00] <simon_w> And hope the 5.4 handles that properly :p
1018: [23:37:00] <FrozenFire> Of course with whatever other syntax
1019: [23:37:00] <simon_w> Anyway, I really need to go get some food or something
1020: [23:37:00] <FrozenFire> use Versioned, Hierarchy { Versioned::augmentSQL as versionedAugmentSQL; Hierarchy::augmentSQL as hierarchyAugmentSQL; } public function augmentSQL() { $this->versionedAugmentSQL(); $this->hierarchyAugmentSQL(); }
1021: [23:37:00] <FrozenFire> But I'm sure you get the point
1022: [23:43:00] * Motoservo_ has joined #silverstripe
1023: [23:45:00] * funkygibbon has joined #silverstripe
1024: [23:46:00] * Motoservo quit (Ping timeout: 260 seconds)
1025: [23:47:00] * Motoservo_ quit (Ping timeout: 256 seconds)
1026: [23:48:00] * nickmolhoek quit (Quit: nickmolhoek)
1027: [23:50:00] <Colin[pi]> is there a particular preferred php cache for SS?
1028: [23:53:00] <simon_w> Well, most of the core will recommend xcache, since it gets updated reasonably quickly for new versions and stuff
1029: [23:53:00] * chrisrio quit (Quit: Page closed)
1030: [23:54:00] <FrozenFire> I too recommend xcache
1031: [23:54:00] <FrozenFire> Assuming you're talking about an opcode cache
1032: [23:54:00] <simon_w> It also has this optimiser thing that may or may not work
1033: [23:55:00] * SightUnseen has joined #silverstripe
1034: [23:55:00] <FrozenFire> memcached is the most popular arbitrary data cache for PHP
1035: [23:55:00] * DesignerX has joined #silverstripe
1036: [23:58:00] * SightUnseen has left #silverstripe
1037: [23:59:00] * catcher quit (Quit: Leaving)

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