#silverstripe IRC Log

IRC log for 31 December 2013

All timestamps are in UTC.

1: [00:27:33] * spronk has joined #silverstripe
2: [00:29:28] * mobiusnz has joined #silverstripe
3: [00:33:15] * Liquide has joined #silverstripe
4: [00:34:17] * mobiusnz quit (Ping timeout: 272 seconds)
5: [00:49:22] * joelpittet quit (Remote host closed the connection)
6: [00:54:40] * joelpittet has joined #silverstripe
7: [00:55:35] * Liquide quit ()
8: [01:00:24] * violetina quit (Remote host closed the connection)
9: [01:30:10] * mobiusnz has joined #silverstripe
10: [01:34:33] * mobiusnz quit (Ping timeout: 246 seconds)
11: [01:36:56] * joelpittet quit ()
12: [01:52:14] * UncleCheese quit (Quit: UncleCheese)
13: [01:58:16] * spronk quit (Ping timeout: 240 seconds)
14: [02:20:45] * oleginchat has joined #silverstripe
15: [02:28:09] * mojo5000 quit (Remote host closed the connection)
16: [02:29:01] * oleginchat quit (Remote host closed the connection)
17: [02:30:54] * mobiusnz has joined #silverstripe
18: [02:35:47] * mobiusnz quit (Ping timeout: 272 seconds)
19: [02:48:06] * joelpittet has joined #silverstripe
20: [04:00:08] * joelpittet quit (Remote host closed the connection)
21: [04:24:26] * cloph has joined #silverstripe
22: [04:24:51] * cloph_away quit (Ping timeout: 252 seconds)
23: [04:32:18] * mobiusnz has joined #silverstripe
24: [04:37:29] * mobiusnz quit (Ping timeout: 272 seconds)
25: [05:10:44] * jrthomer quit (Remote host closed the connection)
26: [05:15:04] * jrthomer has joined #silverstripe
27: [06:37:44] * joelpittet has joined #silverstripe
28: [07:57:44] * UncleCheese has joined #silverstripe
29: [08:34:31] * mobiusnz has joined #silverstripe
30: [08:38:54] * mobiusnz quit (Ping timeout: 240 seconds)
31: [09:05:59] * Ara has joined #silverstripe
32: [09:06:22] * Ara is now known as Guest79310
33: [09:06:23] <Guest79310> hi
34: [09:07:15] <Guest79310> how to convert DataObject to Versioned DataObject?
35: [09:07:27] * ocm has joined #silverstripe
36: [09:07:32] <ocm> howdy!
37: [09:13:17] * joelpittet quit (Remote host closed the connection)
38: [09:35:16] * mobiusnz has joined #silverstripe
39: [09:40:13] * mobiusnz quit (Ping timeout: 272 seconds)
40: [09:40:23] * UncleCheese quit (Quit: UncleCheese)
41: [09:47:33] * Guest79310 quit (Ping timeout: 272 seconds)
42: [09:54:21] * NZ_DRE has joined #silverstripe
43: [09:54:40] * Shrike_Finland has joined #silverstripe
44: [10:00:15] * NZ_DRE has left #silverstripe
45: [10:11:58] * NZ_DRE has joined #silverstripe
46: [10:12:17] * violetina has joined #silverstripe
47: [10:13:26] * NZ_DRE is now known as nz_dre
48: [10:23:48] <ocm> is it possible to allow an action globally?
49: [10:24:03] <ocm> I have a function in my page controller, included in allowed actions
50: [10:24:23] <ocm> however I get the message it is not allowed in another class (which extends Page_Controller)
51: [10:39:51] <Snowman23> If the subclass redefines that function, it must add it to allowed_actions again
52: [10:40:04] <Snowman23> The idea being of course if you enable it in Page.php, you want *that* method enabled, not the subclassed versions
53: [10:49:25] * gelignite has joined #silverstripe
54: [11:22:52] * Shrike_Finland quit (Quit: Leaving.)
55: [11:24:49] * nz_dre quit (Quit: nz_dre)
56: [11:25:31] * qlex has joined #silverstripe
57: [11:25:39] * qlex says hi
58: [11:52:51] <ocm> Snowman23, though if I add a function to allowed_actions in Page_Controller and then extend this controller (lets say Bullshit_Controller), shouldnt I be allowed to use my function as declared in the PageContrller?
59: [11:57:59] <Snowman23> ocm: Yes, as long as you don't also redefine the function that you've allowed_actions
60: [11:58:04] <Snowman23> hihi qlex
61: [12:55:47] * qlex has left #silverstripe
62: [13:02:51] * UndefinedOffset has joined #silverstripe
63: [13:15:46] * shakesoda has left #silverstripe
64: [14:14:49] <ocm> right, time to sign off
65: [14:14:49] * ocm quit (Quit: HydraIRC -> http://www.hydrairc.com <- \o/)
66: [14:54:54] * catcher has joined #silverstripe
67: [15:42:40] * kerosene has joined #silverstripe
68: [15:50:23] * nalogrus has joined #silverstripe
69: [16:01:40] * UndefinedOffset quit (Read error: Connection reset by peer)
70: [16:01:42] * nalogrus quit (K-Lined)
71: [16:13:26] * kerosene quit (Quit: how *did* people party in 1999?)
72: [16:23:47] * guzzlefry quit (Ping timeout: 240 seconds)
73: [16:24:00] * guzzlefry has joined #silverstripe
74: [16:26:08] * guzzlefry quit (Changing host)
75: [16:26:08] * guzzlefry has joined #silverstripe
76: [16:44:40] <catcher> Having trouble with RequiredFields via getCMSValidator. The constructor sets the protected 'required' property, but it's unset by the time the php() method is called.
77: [16:55:44] <catcher> Can anyone else reproduce this issue? I'm in SS 3.1.2
78: [16:56:09] * guzzlefry quit (Ping timeout: 240 seconds)
79: [16:56:14] * guzzlefry has joined #silverstripe
80: [16:58:17] * guzzlefry quit (Changing host)
81: [16:58:17] * guzzlefry has joined #silverstripe
82: [17:13:45] * guzzlefry has left #silverstripe
83: [17:13:48] * guzzlefry has joined #silverstripe
84: [17:45:59] * gelignite quit (Quit: http://bit.ly/nkczDT)
85: [17:50:48] <catcher> Anyone successfully using getCMSValidator() in SS3?
86: [17:54:27] * joelpittet has joined #silverstripe
87: [18:06:01] <guzzlefry> guys
88: [18:06:22] <guzzlefry> How can I use <input type="image"> instead of <submit> in the forms?
89: [18:10:10] * Azure quit (Quit: Textual IRC Client: www.textualapp.com)
90: [18:11:07] * Azure has joined #silverstripe
91: [18:11:53] * violetina quit (Remote host closed the connection)
92: [18:30:30] * blindMoe has joined #silverstripe
93: [18:30:30] * blindMoe quit (Changing host)
94: [18:30:30] * blindMoe has joined #silverstripe
95: [18:34:41] * blindMoe|2 quit (Ping timeout: 265 seconds)
96: [18:45:14] * UncleCheese has joined #silverstripe
97: [18:50:07] * UncleCheese quit (Client Quit)
98: [19:19:12] * joelpittet quit (Remote host closed the connection)
99: [19:26:56] * Zauberfisch23 quit (Read error: Operation timed out)
100: [19:27:03] * Zauberfisch23 has joined #silverstripe
101: [19:39:10] * joelpittet has joined #silverstripe
102: [20:15:38] * Shrike_Finland has joined #silverstripe
103: [20:16:14] * ss_newbie has joined #silverstripe
104: [20:17:40] <ss_newbie> hi,
105: [20:17:57] <ss_newbie> I have a funtion that loops so <% loop functionname
106: [20:18:16] <ss_newbie> i want to call another function inside that loop but its not working
107: [20:18:19] <ss_newbie> is this possible
108: [20:26:47] <guzzlefry> ss_newbie: try $Up.otherfunction
109: [20:27:12] <guzzlefry> Whenever you're in the loop, the scope is relative to whatever functionname is looping over.
110: [20:27:34] <guzzlefry> So you need to use $Up to access things in the scope above.
111: [20:30:04] <ss_newbie> i tried $up, no luck!
112: [20:30:47] <ss_newbie> I also tried Top, for now my function just returns "abc" just to test it, if I call the function outside the loop it works fine
113: [20:31:38] <guzzlefry> ss_newbie: $Up, not $up
114: [20:31:53] <ss_newbie> ignore what I said
115: [20:32:02] <ss_newbie> it is working, thank you so much :)
116: [20:35:23] <guzzlefry> yay
117: [20:35:27] <guzzlefry> you're welcome
118: [20:42:02] <ss_newbie> is it possible to change the scope so that $this->ID on the child function is the ID of the loop?
119: [20:44:22] * joelpittet quit (Remote host closed the connection)
120: [20:47:50] <guzzlefry> Could you restate that?
121: [20:47:56] <guzzlefry> I'm having trouble understanding what you want.
122: [20:52:21] <ss_newbie> I have a loop that goes through books holder page, inside that loop i have another loop (function) that loops and gets the book genre
123: [20:53:06] <ss_newbie> what I want is inside my second loop call a function with the genre ID to get all the books of that genre
124: [20:54:02] <guzzlefry> ah so
125: [20:54:08] <guzzlefry> The function is on the page controller?
126: [20:54:15] <ss_newbie> yes
127: [20:54:27] <guzzlefry> $Top.function($ID) should work
128: [20:54:47] <guzzlefry> If I'm understanding correctly.
129: [20:57:01] <ss_newbie> no luck, i do not think i am explaining myself correctly, sorry! Ok so I have a Father > Child > Grandchild, currently if I run $this->ID on Child it gets the ID of Father
130: [20:57:31] <ss_newbie> But if i do $this->ID on grandchild i get nothing
131: [20:57:40] <guzzlefry> Is this in the template?
132: [20:57:51] <ss_newbie> yes
133: [20:58:06] <guzzlefry> $this->ID shouldn't work. 0.o
134: [20:58:46] <ss_newbie> In my function return $this->ID works for Child works
135: [20:59:24] * joelpittet has joined #silverstripe
136: [21:03:05] <ss_newbie> here is my temple code
137: [21:03:05] <ss_newbie> http://codetidy.com/7671/
138: [21:04:10] <guzzlefry> oh
139: [21:04:12] <guzzlefry> just do:
140: [21:04:19] <guzzlefry> $Top.GetBooks($ID)
141: [21:05:24] <ss_newbie> no, no luck
142: [21:07:00] <guzzlefry> :(
143: [21:07:11] <guzzlefry> What does GetBooks look like?
144: [21:08:01] <ss_newbie> no it just says return $this->ID, I also have some echo debug code, it works when i call it outside the loop
145: [21:08:12] <ss_newbie> it seems that inside the loop it does not work
146: [21:08:35] <guzzlefry> What does GetBooks() return?
147: [21:09:36] <ss_newbie> $this->ID, which should be the ID of the parent
148: [21:11:42] <guzzlefry> hm, not sure
149: [21:12:09] <ss_newbie> ok is there a way to pass variable between nested loops?
150: [21:12:31] <ss_newbie> the thing is, it works fine for the first loop
151: [21:12:40] <guzzlefry> yeah...
152: [21:12:42] <guzzlefry> trying to remember
153: [21:13:40] <catcher> ss_newbie, can you paste some code and explain what you're trying to do? There may be an easier way.
154: [21:13:57] <ss_newbie> catcher
155: [21:13:57] <ss_newbie> http://codetidy.com/7671/
156: [21:20:18] <catcher> ss_newbie, Authors/Genres have a many_many relationship?
157: [21:20:45] <ss_newbie> yes
158: [21:24:10] <ss_newbie> so i am looping through authors to get the genres and I want to loop through the genres to get the books , I loop through the authors and my genre function gets the parent ID using $this->ID, but when i try to go another level down and call GetBooks within the genre loop it does not work
159: [21:33:10] <catcher> ss_newbie, but your GetBooks function wouldn't know which Author to filter by, right? And you'd need to be looping over the results of GetBooks to display info.
160: [21:33:56] <ss_newbie> in the db books have the genre ID
161: [21:34:21] <catcher> ss_newbie, but that'd get all books with that genre each time, it wouldn't be filtered by Author
162: [21:35:56] <catcher> I usually handle this type of thing in the controller. That way your filtering/grouping happens closer to the DB, and your template stays simple.
163: [21:37:13] <ss_newbie> hmm it seems I am looking at the the wrong way
164: [21:37:33] <ss_newbie> thanks for you help guys, let me see if i can do this differnlty
165: [21:45:54] * ss_newbie quit (Quit: Page closed)
166: [21:55:18] * mobiusnz has joined #silverstripe
167: [22:23:51] * UncleCheese has joined #silverstripe
168: [22:48:36] <catcher> Happy new year #SS!
169: [23:01:14] * catcher quit (Quit: Leaving)
170: [23:41:07] * spronk has joined #silverstripe
171: [23:45:16] * DigNZ has joined #silverstripe
172: [23:46:00] * DigNZ quit (Client Quit)

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