#silverstripe IRC Log

IRC log for 20 November 2015

All timestamps are in UTC.

1: [00:03:52] * [Fate] quit (Ping timeout: 284 seconds)
2: [00:03:56] * micmania1 has joined #silverstripe
3: [00:04:23] * [Fate] has joined #silverstripe
4: [00:05:05] * sealan has joined #silverstripe
5: [00:09:05] * sealan quit (Remote host closed the connection)
6: [00:13:25] * camfindlay quit (Quit: camfindlay)
7: [00:24:49] * Selay has joined #silverstripe
8: [00:28:19] <Selay> Hi guys, what is the best way to set time zone for Silverstripe instance? As I have more than one sites, I can not change the settings in mysql and php.ini. Well, I can change using ini_set in config file but then it doesnt change mysql time zone. Mysql requires mysql> SET time_zone = timezone; to be run before each session. Wordpress changes both when you change in settings but I can't find anyway how to do it in silverstripe
9: [00:37:21] <Selay> Just found it. in config, need to put DB::query("SET time_zone = 'Australia/Brisbane'"); it changes subsequent queries
10: [00:37:43] * micmania1 quit (Quit: micmania1)
11: [00:37:50] * nontgor quit (Ping timeout: 260 seconds)
12: [00:45:01] <hailwood> Hmm, is it possible to have self-applying extensions? So extensions that say "I apply to this class" rather than requiring a config setup
13: [00:46:44] * Colin[pi] quit (Ping timeout: 246 seconds)
14: [00:51:08] * nontgor has joined #silverstripe
15: [00:58:24] * Selay quit (Ping timeout: 246 seconds)
16: [01:04:06] <hailwood> Does anyone know if with Dropzone (FileAttachmentField) you can modify the image data (e.g. title) the same you could with UploadField?
17: [01:17:21] * BrewNaked quit (Remote host closed the connection)
18: [01:34:31] * joelpittet quit (Remote host closed the connection)
19: [01:34:32] <jules0x> has anyone used silverstripe / contentreview ?
20: [01:40:54] * hailwood quit (Remote host closed the connection)
21: [01:46:56] * Tanger has joined #silverstripe
22: [01:47:04] * micmania1 has joined #silverstripe
23: [02:05:30] <eolant> does SilverStripe keeps history op page changes somewhere? I just multiselected couple of pages that had weird "deleted from draft" label and published them and SilverStripe erased all data O_O
24: [02:06:28] <Stomach> eolant yeah it does
25: [02:06:31] <Stomach> in the "History" tab
26: [02:09:09] * Phlunk3 has joined #silverstripe
27: [02:11:20] <eolant> Does it saves it in database?
28: [02:11:28] <eolant> Because they are missing
29: [02:11:38] <eolant> I can't edit them in admin
30: [02:11:54] <micmania1> eolant: there’s an option somewhere to view archived pages I think
31: [02:12:10] <eolant> SS is fucked up guys
32: [02:13:19] <micmania1> eolant: use the filter panel in the CMS to view all pages, including archived.
33: [02:13:36] <eolant> They are not archived
34: [02:15:18] <eolant> They had label "deleted from draft" and I used milti-select tool in SS and published them. SS erased all of the content of these pages and they are floating in the start of page tree without title or anything and if I try to edit them I get redirected to home page editing screen. I guess SS decided to delete these pages instead of publishing xD
35: [02:15:22] <eolant> Good stuff
36: [02:16:20] <micmania1> Can you reproduce?
37: [02:18:24] <eolant> I think I can
38: [02:18:37] <eolant> let me try that
39: [02:18:55] <micmania1> Try here: https://demo.silverstripe.org/admin/pages
40: [02:19:00] * Stomach quit (Quit: zzz)
41: [02:22:02] <eolant> Oh, this website runs a bit earlier version
42: [02:22:19] <eolant> On the latest version it's not possible to delete page from draft site
43: [02:24:14] <eolant> On 3.1 if you go to page edit and choose "Delete from draft site" in the more dropdown and after that go to site tree and using multi-select select this page and publish it using actions it will be deleted.
44: [02:24:16] <micmania1> eolant: it is, its just called archive now.
45: [02:26:00] * Stomach has joined #silverstripe
46: [02:28:01] <eolant> micmania1: apparently they this issue is not present on 3.2 now. you can't publish archived page.
47: [02:43:06] * Stomach quit (Quit: zzz)
48: [02:51:32] * Stomach has joined #silverstripe
49: [02:54:17] <ss-helper> Re: Beep Boop - https://groups.google.com/d/msg/silverstripe-dev/EJU0gyGVfNY/kl8PFRZmBwAJ
50: [02:59:43] <helenclarko> ^^^ That guy!
51: [03:05:00] * spronk quit (Read error: Connection reset by peer)
52: [03:06:18] * BrewNaked has joined #silverstripe
53: [03:08:24] * Stomach quit (Quit: zzz)
54: [03:11:26] * BrewNaked quit (Ping timeout: 276 seconds)
55: [03:13:48] * Colin[pi] has joined #silverstripe
56: [03:13:55] * micmania1 quit (Quit: micmania1)
57: [03:24:19] <ss-helper> SilverStripe showcases - https://groups.google.com/d/msg/silverstripe-dev/v-vG8_dWois/-3zpOyRoBwAJ
58: [03:31:08] * helenclarko quit (Quit: Ain't no lie, baby bye bye bye.)
59: [03:35:22] * joelpittet has joined #silverstripe
60: [03:39:35] * joelpittet quit (Ping timeout: 240 seconds)
61: [03:46:09] * jules0x quit (Quit: Leaving)
62: [03:47:54] * Stomach has joined #silverstripe
63: [03:51:57] * r_hector has joined #silverstripe
64: [03:53:06] * mahfuz quit (Quit: Page closed)
65: [04:02:47] * Phlunk3 quit (Remote host closed the connection)
66: [04:03:23] * DanaeNZ quit (Quit: TIME TO FEED)
67: [04:11:08] * Pyrmnk has joined #silverstripe
68: [04:11:27] <Pyrmnk> kia ora boys and girls
69: [04:11:45] <Pyrmnk> :D
70: [04:20:50] <Pyrmnk> hmm, must be beer o'clock!
71: [04:24:34] * r_hector quit (Remote host closed the connection)
72: [04:29:15] * MichaelHabib quit (Ping timeout: 252 seconds)
73: [04:30:01] <Tanger> Hi guys! What's the standard with creating groups with a default set of permissions in code?
74: [04:41:14] <Pyrmnk> eh?
75: [04:43:39] <Pyrmnk> create group object, set perms, write?
76: [04:43:46] <Pyrmnk> idk.
77: [04:50:28] <Pyrmnk> well, it's after 5 on a Friday, so this is boring.
78: [04:51:07] <Pyrmnk> ciao
79: [04:55:09] * BrewNaked has joined #silverstripe
80: [04:59:40] * BrewNaked quit (Ping timeout: 265 seconds)
81: [05:04:46] * Stomach quit (Quit: zzz)
82: [05:05:47] * Stomach has joined #silverstripe
83: [05:16:34] * Stomach quit (Quit: zzz)
84: [05:36:17] * joelpittet has joined #silverstripe
85: [05:39:24] <ss-helper> Re: SilverStripe showcases - https://groups.google.com/d/msg/silverstripe-dev/v-vG8_dWois/RO2X_MhuBwAJ
86: [05:40:26] * joelpittet quit (Ping timeout: 240 seconds)
87: [05:45:19] * MichaelHabib has joined #silverstripe
88: [05:54:39] * Stomach has joined #silverstripe
89: [06:18:42] * Stomach quit (Quit: zzz)
90: [06:43:59] * BrewNaked has joined #silverstripe
91: [06:47:19] <Tanger> ss23: when I use ContentController::LoginForm and log in with it, it just redirects me to the current URL with '/login' appended, which doesn't actually log me in, just gives me a 404 error
92: [06:48:44] <Tanger> Is there some kind of config I need to set to make it go to /Security/login like it's meant to?
93: [06:48:47] * BrewNaked quit (Ping timeout: 264 seconds)
94: [06:50:51] * Stomach has joined #silverstripe
95: [06:51:06] * Stomach quit (Read error: Connection reset by peer)
96: [06:51:58] * wmk has joined #silverstripe
97: [07:04:50] * MichaelHabib1 has joined #silverstripe
98: [07:05:25] * sealan has joined #silverstripe
99: [07:06:58] * MichaelHabib quit (Ping timeout: 272 seconds)
100: [07:06:59] * MichaelHabib1 is now known as MichaelHabib
101: [07:10:17] * sealan quit (Remote host closed the connection)
102: [07:10:44] * sealan has joined #silverstripe
103: [07:13:14] * Colin[pi] quit (Ping timeout: 276 seconds)
104: [07:18:23] * TRB143 quit (Ping timeout: 265 seconds)
105: [07:21:11] <UncleCheese> where is Zauberfisch
106: [07:21:38] * MichaelHabib quit (Ping timeout: 244 seconds)
107: [07:24:50] * TRB143 has joined #silverstripe
108: [07:28:23] * sealan_ has joined #silverstripe
109: [07:32:24] * sealan quit (Ping timeout: 265 seconds)
110: [07:34:21] * zlinux has joined #silverstripe
111: [07:37:11] * joelpittet has joined #silverstripe
112: [07:39:17] * Azure|dc has joined #silverstripe
113: [07:39:18] * Azure quit (Read error: Connection reset by peer)
114: [07:41:15] * joelpittet quit (Ping timeout: 240 seconds)
115: [07:43:56] * Mike123 has joined #silverstripe
116: [07:46:46] <Tanger> Gone fischin
117: [07:48:39] * sealan_ quit (Remote host closed the connection)
118: [07:52:56] * arnhoe has joined #silverstripe
119: [07:58:58] <Mike123> Morning
120: [08:05:17] * sealan has joined #silverstripe
121: [08:06:00] * sealan quit (Client Quit)
122: [08:09:15] * Stomach has joined #silverstripe
123: [08:11:21] * Stomach quit (Read error: Connection reset by peer)
124: [08:12:30] * MichaelHabib has joined #silverstripe
125: [08:12:59] * Stomach has joined #silverstripe
126: [08:17:28] * Stomach quit (Read error: Connection reset by peer)
127: [08:20:16] * Stomach has joined #silverstripe
128: [08:20:17] * Stomach quit (Read error: Connection reset by peer)
129: [08:20:39] * swaiba has joined #silverstripe
130: [08:21:45] * Stomach has joined #silverstripe
131: [08:25:14] <wmk> anyone knows if github can show version tags in the repo history?
132: [08:32:53] * Stomach quit (Read error: Connection reset by peer)
133: [08:32:54] * BrewNaked has joined #silverstripe
134: [08:37:34] * BrewNaked quit (Ping timeout: 260 seconds)
135: [08:40:45] * Stomach has joined #silverstripe
136: [08:46:49] * Stomach quit (Read error: Connection reset by peer)
137: [08:56:55] * MichaelHabib quit (Quit: MichaelHabib)
138: [09:07:25] * kinglozzer has joined #silverstripe
139: [09:08:25] * krofek quit (Ping timeout: 250 seconds)
140: [09:29:24] * Mike123 quit (Ping timeout: 246 seconds)
141: [09:31:14] * cloph_away is now known as cloph
142: [09:38:03] * joelpittet has joined #silverstripe
143: [09:43:02] * joelpittet quit (Ping timeout: 260 seconds)
144: [09:43:44] * Mike123 has joined #silverstripe
145: [09:53:51] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
146: [10:11:08] * Tanger quit (Remote host closed the connection)
147: [10:21:46] * BrewNaked has joined #silverstripe
148: [10:25:59] * BrewNaked quit (Ping timeout: 246 seconds)
149: [10:28:25] * Colin[pi] has joined #silverstripe
150: [10:53:05] * NETim has joined #silverstripe
151: [11:02:21] * MarkGuinn has joined #silverstripe
152: [11:19:34] * Colin[pi] quit (Ping timeout: 265 seconds)
153: [11:38:55] * joelpittet has joined #silverstripe
154: [11:39:36] * Mike123 quit (Ping timeout: 246 seconds)
155: [11:43:26] * joelpittet quit (Ping timeout: 260 seconds)
156: [11:43:40] * Mike123 has joined #silverstripe
157: [12:05:30] <swaiba> no idea wmk
158: [12:10:42] * BrewNaked has joined #silverstripe
159: [12:15:06] * BrewNaked quit (Ping timeout: 244 seconds)
160: [12:20:42] <wmk> swaiba, :(
161: [12:20:55] <wmk> well, packagist does, but inside github it would be totally neat
162: [12:42:20] <kinglozzer> wmk: I'm confused, you don't mean the list of tags under the "branches" menu do you?
163: [12:42:39] <kinglozzer> Or this? https://github.com/silverstripe/silverstripe-framework/tags
164: [12:45:27] <wmk> well, more in "history" where i see all commits... which commit was the new version...
165: [12:52:55] <swaiba> i know wmk, but I wanted to get you at least one answer :)
166: [13:12:16] <elgabbu> any easy way to get the distinct values of className in siteTree?
167: [13:21:16] * UndefinedOffset has joined #silverstripe
168: [13:28:50] <MarkGuinn> elgabbu - all the possible ones? or just the ones that actually have pages present?
169: [13:31:33] <elgabbu> MarkGuinn just the ones present in the SiteTree table itself so basically SELECT DISTINCT ClassName FROM SiteTree
170: [13:31:45] <swaiba> elgabbu - singleton('SiteTree')->dbObject('ClassName')->enumValues() ?
171: [13:32:20] <swaiba> although the DB:Query(' SELECT DISTINCT ClassName FROM SiteTree'); is shorter...
172: [13:32:53] <elgabbu> hehe isn't it possible to do it via ORM?
173: [13:33:18] <elgabbu> SiteTree::get()-> ....
174: [13:33:25] <swaiba> technically using the singlton and getting enum values, if it works, doesn't even touch the database!
175: [13:33:37] <elgabbu> mmmm
176: [13:33:44] <elgabbu> lemme try
177: [13:33:44] <swaiba> you could do it via the ORM and then ->removeDuplicate('ClassNAme')
178: [13:34:11] <elgabbu> i think that would be more expensive performance wise
179: [13:34:27] <MarkGuinn> I wonder if SiteTree::get()->map('ClassName','ClassName') might work? Not sure what kind of query that would product though
180: [13:34:41] <MarkGuinn> I'm guessing not the right one but it would get the job done :)
181: [13:35:11] <elgabbu> Uncaught Exception: Object->__call(): the method 'enumvalues' does not exist on 'Varchar'
182: [13:36:31] <swaiba> sounds like DB:Query(' SELECT DISTINCT ClassName FROM SiteTree'); it is...
183: [13:36:52] <elgabbu> mmm siteTree provides SiteTree::page_type_classes
184: [13:36:55] <elgabbu> mmm siteTree provides SiteTree::page_type_classes()
185: [13:39:45] * joelpittet has joined #silverstripe
186: [13:44:42] * joelpittet quit (Ping timeout: 272 seconds)
187: [13:48:03] <MarkGuinn> swaiba - you guys need to get some search going on your silverstrip.es site
188: [13:48:20] <swaiba> wmk, MarkGuinn is tlaking to you lol
189: [13:48:38] <MarkGuinn> sorry, wrong person :)
190: [13:49:05] <MarkGuinn> Anybody know an easy way to hide/remove some but not all of the reports in the CMS?
191: [13:53:47] <swaiba> MarkGuinn - I'm just a guest blogger - wmk set the qhole thing up :)
192: [13:54:43] * Copperis has joined #silverstripe
193: [13:54:55] <MarkGuinn> It's a great resource. I'm starting to look there before I ask here, but it'd be easier with search (although the tags are pretty thorough)
194: [13:56:02] <swaiba> i agree MarkGuinn I actually thought that last time I looked for an item to send to you!
195: [13:56:18] <swaiba> I'm sure wmk will add it when he has a minute
196: [13:59:35] * BrewNaked has joined #silverstripe
197: [14:02:39] * BackEndCoder quit (Ping timeout: 240 seconds)
198: [14:04:22] * BrewNaked quit (Ping timeout: 260 seconds)
199: [14:04:48] <MarkGuinn> There's no way to express a subquery (e.g. inner join (select * from...) with SQLQuery is there?
200: [14:05:57] * BackEndCoder has joined #silverstripe
201: [14:20:19] <kinglozzer> MarkGuinn: I know there are methods for it in DataQuery, not sure how they're applied to the underlying SQLQuery though
202: [14:22:21] * Mike123 quit (Ping timeout: 246 seconds)
203: [14:26:06] * Mike123 has joined #silverstripe
204: [14:26:21] <MarkGuinn> interesting. thanks!
205: [14:38:06] <ss-helper> SilverStripe - Pass data from controller to html form through jQuery.ajax - http://stackoverflow.com/questions/33829149/silverstripe-pass-data-from-controller-to-html-form-through-jquery-ajax
206: [14:49:19] * Alboes has joined #silverstripe
207: [14:50:14] <Alboes> hi. An INT field get always 0 as defaut value. Can I change this to NULL ?
208: [14:50:49] <wmk> swaiba, MarkGuinn ok, i write it on my todo llist
209: [14:51:27] <swaiba> Alboes I'm sure there is a way, but I'd comment for you to not take that road, it's bad
210: [14:51:32] <swaiba> IMHO
211: [14:51:36] <swaiba> thanks wmk!
212: [14:52:03] <wmk> swaiba, with searchableDataObject it should be easy
213: [14:52:32] <swaiba> I'm sure it'll make a super blog post!
214: [14:52:48] <wmk> sooo meta
215: [14:52:51] <swaiba> no chance of solar or luscne
216: [14:53:07] <swaiba> only because when I get around to doing a better search I'd like to include them
217: [14:53:08] <wmk> well, i dream of elasticsearch, but didn't find time to set it up
218: [14:53:17] <kinglozzer> Alboes / swaiba: 'Foo' => 'Int(null)' ?
219: [14:53:29] <wmk> nontgor had some research on it
220: [14:53:32] <swaiba> kinglozzer I don't want to know!
221: [14:53:42] <wmk> swaiba, take this knowledge!
222: [14:53:51] <swaiba> it's bad, databases shouldn't have nulls
223: [14:53:53] <Alboes> the thing is that my numeric form field shows 0 if they are empty in fact. This is because it's set to 0 in de database
224: [14:53:53] <nontgor> wmk: what, what! #WatchingCricket
225: [14:54:05] <wmk> nontgor, swaiba search / elastic search
226: [14:54:09] * swaiba considers leaving until nulls in DB discussion is over
227: [14:54:27] <wmk> swaiba, ain't "null" just a "not set"
228: [14:54:28] <wmk> ?
229: [14:54:39] <swaiba> and therein lies the game wmk
230: [14:54:56] <swaiba> doesn't it complicate types like number enough?
231: [14:55:04] * kinglozzer sigh
232: [14:55:07] * muskie9 has joined #silverstripe
233: [14:55:08] <kinglozzer> it doesn't work anyway swaiba
234: [14:55:09] <kinglozzer> :P
235: [14:55:29] <wmk> well, i once had to make a drop down "yes, no, unset"...
236: [14:55:35] <wmk> it was a major pain
237: [14:56:18] * jcwacky has joined #silverstripe
238: [14:56:45] <swaiba> it's standard stuff for databases to avoid null's, just like "normalizing" the data
239: [14:58:01] <slievr> How would I go about hiding root page ( of class) from cms sitetree?
240: [14:58:43] <wmk> slievr, canCreate...?
241: [14:59:15] <wmk> slievr, see also: http://www.silverstrip.es/blog/silverstripe-3-2-clean-up-the-cms/
242: [14:59:19] <slievr> I still need permissions as I want to manage them through a model admin
243: [14:59:57] <wmk> so - do you want to hide the "create a new page" or do you want to hide it from the tree itself?
244: [15:00:08] <slievr> tree itself
245: [15:00:24] <wmk> https://github.com/Little-Giant/silverstripe-catalogmanager does it...
246: [15:00:59] <wmk> https://github.com/Little-Giant/silverstripe-catalogmanager/blob/master/code/Extensions/CategoryPageHierarchyExtension.php#L16
247: [15:01:14] <slievr> oh cool
248: [15:01:21] <slievr> I used to use this
249: [15:01:21] <slievr> https://github.com/micschk/silverstripe-excludechildren
250: [15:01:22] <wmk> ^^^^ here is the magic, if a page has a special extension (that does nothing than exist on that page)
251: [15:01:50] <wmk> slievr, you might also want to use catalogmanager for managin pages in modeladmin
252: [15:02:00] <slievr> yeah it looks much better
253: [15:02:25] <wmk> ok, have to go, cu
254: [15:03:07] <slievr> bye o/
255: [15:03:18] <slievr> nd thx
256: [15:04:28] <swaiba> Why oh why does silverstripe have to parse the form again when it is sumitted?!?
257: [15:04:55] <swaiba> so I build a form that uses a param like $ID and then when I submit it that param isn't there and I get an error
258: [15:05:13] <swaiba> I must have bee over this ground so many times, and each time I feel I hack a solution
259: [15:05:29] <swaiba> anyone got any logic as to why and best method to handle it?
260: [15:06:22] <jcwacky> kinglozzer: Quick question: I’m trying to customise a method from SilverStripe’s Oembed class. Am I correct that I can’t use the Injector, Extension or useCustomClass techniques on the Oembed class?
261: [15:06:50] * wmk quit (Ping timeout: 240 seconds)
262: [15:08:38] <kinglozzer> jcwacky: It looks like you can't :(
263: [15:09:19] <jcwacky> Thanks for confirming :( So there’s no way I can currently customise a method in oEmbed?
264: [15:10:10] * cloph is now known as cloph_away
265: [15:10:33] <jcwacky> Hmm, unless I customise all methods that use it, telling them to use my custom Oembed class perhaps…
266: [15:15:02] <nontgor> swaiba: I have search based on Elasticsearch working with SilverStripe, though having just double checked my demo site it's currently broken. Trying to get 100% coverage and at around 95+ for most of the module
267: [15:16:55] <MarkGuinn> swaiba - i usually add a hiddenfield in the form with the ID and then check both ->param('ID') and ->postVar('ID')
268: [15:19:19] <MarkGuinn> i suppose ideally too the form definition would be decoupled from populating it
269: [15:19:53] <MarkGuinn> but that's not always possible of course if the contents of the form depend on a specific page or dataobject
270: [15:21:12] <jcwacky> Got it working, just had to override the shortcode handler in config to use my custom oembed class.
271: [15:24:57] <swaiba> you know that's what I'm sure I've done before and what I'm doing now (and it isn't working :( )
272: [15:25:21] <swaiba> I'm just thinking there must be a better way - or there must be a reason it parses this as it does...
273: [15:29:23] * stehonor has joined #silverstripe
274: [15:29:23] <ss-helper> stehonor: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
275: [15:29:53] <stehonor> hey
276: [15:30:03] <muskie9> stehonor o/
277: [15:30:15] <stehonor> got a quick question, does anyone have an example of an inline form button for within the cms?
278: [15:31:08] <stehonor> without using the InlineFormAction which appears to have issues with the Behaviour.js (and was stated it would be getting deprecated in some posts I have read)
279: [15:31:18] * Mike123 quit (Ping timeout: 246 seconds)
280: [15:36:09] <muskie9> stehonor this might be something to look through: https://github.com/unclecheese/silverstripe-gridfield-betterbuttons
281: [15:36:46] <nontgor> swaiba: Try http://elastica.weboftalent.asia/gutenberg-search - has find as you type search on the titles and bold highlights of search terms cc wmk MarkGuinn (username/password for basic auth is search/search)
282: [15:37:17] <swaiba> nontgor - I appreciate all this but I'm not looking at it right now
283: [15:37:42] <swaiba> a suggestion for search on silverstrip.es was made and wmk then included you
284: [15:38:11] <swaiba> I'm interested long-term, but not right now
285: [15:38:16] <nontgor> swaiba: k, no problem
286: [15:40:42] * joelpittet has joined #silverstripe
287: [15:45:30] * joelpittet quit (Ping timeout: 260 seconds)
288: [15:48:29] * BrewNaked has joined #silverstripe
289: [15:52:58] <Alboes> is there a way to avoid showing the default 0 from int db fields in a form field?
290: [15:53:06] * BrewNaked quit (Ping timeout: 260 seconds)
291: [15:56:33] <MarkGuinn> That's pretty cool, nontgor
292: [16:01:16] <nontgor> MarkGuinn: Thanks. Try also likes of http://elastica.weboftalent.asia/search-examples/flickr-text-results//similar/FlickrPhoto/4149 - 'more like this' aka similar.
293: [16:03:14] <leomeloxp> Hi o/ Can anyone point me in the right direction here. I need to hide a ModelAdmin based on provided permissions but still want the DataObject to be publicly available if not viewed through the CMS interface
294: [16:05:32] * BrewNaked has joined #silverstripe
295: [16:06:04] <nontgor> leomeloxp: Just off the top of my head the only thing I can think of to differentiate editing between normal CMS and model admin is to check the URL in the canEdit method of the model in question using the $_GET variable
296: [16:06:44] <muskie9> leomeloxp maybe check the getManagedModels() method in the ModelAdmin class... rather than setting the static var you could return the managed models programmatically based on permissions
297: [16:07:07] <muskie9> you would likely override it in your ModelAdmin class
298: [16:07:31] <muskie9> leomeloxp http://api.silverstripe.org/3.2/source-class-ModelAdmin.html#264-290
299: [16:07:46] <swaiba> Alboes display-logic module? $myint->hideIf("Price")->isEqualTo(0);
300: [16:08:16] <MarkGuinn> leomeloxp - i'll often create a LeftAndMain extension for the purpose of modifying menu items in the CMS
301: [16:08:48] <swaiba> or just if ($this->myint == 0) $fields->removeByName('MyInt');
302: [16:08:52] <MarkGuinn> it has the double bonus of not loading up admin classes for frontend requests and also means that things like the user session are available when you're doing the modifications
303: [16:09:01] <leomeloxp> Well, I think I managed to get around it by adding a canView in the ModelAdmin extension with implemented PermissionProvider
304: [16:09:23] <MarkGuinn> so you can just check the permissions and CMSMenu::remove_menu_item
305: [16:10:02] <Alboes> swaiba: with display logic you hide the whole field i think? I just want an empty field if the db int field is set to the default 0. Now it shows the 0 in the field
306: [16:10:20] <leomeloxp> Something like https://gist.github.com/leomeloxp/b0ff7ab629ec969f4be4
307: [16:13:20] <swaiba> I think that is what I've answered lol
308: [16:13:29] <swaiba> oh maybe not
309: [16:13:57] <swaiba> ok, then I'm not sure
310: [16:14:07] <swaiba> why is it so important... users?
311: [16:16:20] * arnhoe quit (Ping timeout: 246 seconds)
312: [16:16:24] <leomeloxp> It's for a local sports website. Some people will be in charge of managing fixtures, others content and so on. I just want to try and make it as granular as possible whilst keeping the interface clean and objective
313: [16:16:36] <Alboes> well, because it's not nice, when you leave it empty and come back there is a 0
314: [16:17:08] * sealan has joined #silverstripe
315: [16:21:10] <muskie9> Alboes couldn't you do something like if($this->YourNumberValue == 0) { $yourNumberField->setValue(''); }
316: [16:24:10] <swaiba> Alboes ah then, use populateDefaults fucntion to ensure it is populated with 0 on first view
317: [16:30:37] * muskie9 quit (Read error: Connection reset by peer)
318: [16:30:56] * muskie9 has joined #silverstripe
319: [16:47:02] <swaiba> have a great weekend folks!
320: [16:47:07] * swaiba quit (Remote host closed the connection)
321: [16:52:59] * zlinux quit (Ping timeout: 264 seconds)
322: [16:55:00] <ss-helper> Re: [silverstripe-dev] Re: Beep Boop - https://groups.google.com/d/msg/silverstripe-dev/EJU0gyGVfNY/MlbvuGKUBwAJ
323: [17:04:35] * gelignite has joined #silverstripe
324: [17:04:46] * kinglozzer quit ()
325: [17:04:53] <stehonor> bb
326: [17:09:18] * stehonor quit (Ping timeout: 246 seconds)
327: [17:32:30] * NETim quit (Quit: Leaving)
328: [17:37:00] * MarkGuinn quit ()
329: [17:40:23] <Alboes> i did it jquery
330: [17:41:35] * joelpittet has joined #silverstripe
331: [17:43:39] * Alboes quit (Remote host closed the connection)
332: [17:46:09] * joelpittet quit (Ping timeout: 255 seconds)
333: [17:57:51] * sealan quit (Remote host closed the connection)
334: [18:03:18] * Stomach has joined #silverstripe
335: [18:19:55] * joelpittet has joined #silverstripe
336: [18:40:06] <ss-helper> Re: [silverstripe-dev] Re: SilverStripe showcases - https://groups.google.com/d/msg/silverstripe-dev/v-vG8_dWois/vO7Md4mZBwAJ
337: [18:57:35] * Stomach quit (Quit: zzz)
338: [19:33:32] * zlinux has joined #silverstripe
339: [19:35:53] * mobiusnz quit (Quit: Leaving.)
340: [19:55:10] <ss-helper> Re: [silverstripe-dev] Re: Module scaffolding - https://groups.google.com/d/msg/silverstripe-dev/ZCKj-mBWv9Q/8UQws9GdBwAJ
341: [19:57:52] * UncleCheese has joined #silverstripe
342: [20:27:42] * r_hector has joined #silverstripe
343: [20:41:17] * sealan has joined #silverstripe
344: [20:42:03] * sealan quit (Remote host closed the connection)
345: [21:07:37] * Copperis is now known as VonSchnitzel
346: [21:11:56] <zlinux> hi all
347: [21:12:16] <zlinux> execuse me for this paste, but it's not long and mostly just comments...
348: [21:12:46] <zlinux> from the class DataObject:
349: [21:13:04] <zlinux> 3968 /**
350: [21:13:04] <zlinux> 3969 * User defined labels for searchable_fields, used to override
351: [21:13:04] <zlinux> 3970 * default display in the search form.
352: [21:13:04] <zlinux> 3971 * @config
353: [21:13:04] <zlinux> 3972 */
354: [21:13:04] <zlinux> 3973 private static $field_labels = null;
355: [21:13:18] <zlinux> my question is:
356: [21:13:42] <zlinux> is this for searchable fields only?
357: [21:14:52] <muskie9> zlinux I think it's also for summary_fields
358: [21:15:16] <muskie9> might be for scaffold fields too, but not 100% on that
359: [21:16:22] <zlinux> when I read the code, I think it's for all fields. but not 100% sure too because understanding the code is not straight forward.
360: [21:32:51] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
361: [21:35:14] * UndefinedOffset quit (Quit: Leaving.)
362: [21:57:49] * sealan has joined #silverstripe
363: [21:58:29] * sealan quit (Remote host closed the connection)
364: [22:11:35] * zlinux quit (Ping timeout: 264 seconds)
365: [22:21:17] * VonSchnitzel quit (Remote host closed the connection)
366: [22:24:34] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
367: [22:28:46] * BrewNaked quit (Ping timeout: 240 seconds)
368: [22:31:23] * BrewNaked has joined #silverstripe
369: [22:48:54] * BrewNaked quit (Remote host closed the connection)
370: [22:50:01] * Zauberfisch quit (Ping timeout: 250 seconds)
371: [22:51:33] * BrewNaked has joined #silverstripe
372: [22:54:34] * joelpittet quit ()
373: [22:55:21] <ss-helper> Re: [silverstripe-dev] Re: Module scaffolding - https://groups.google.com/d/msg/silverstripe-dev/ZCKj-mBWv9Q/XAe9oWGnBwAJ
374: [22:56:58] * Zauberfisch has joined #silverstripe
375: [23:09:30] * Zauberfisch quit (Remote host closed the connection)
376: [23:10:45] * Stomach has joined #silverstripe
377: [23:13:39] * Stomach quit (Client Quit)
378: [23:24:01] * Zauberfisch has joined #silverstripe
379: [23:34:51] * UncleCheese has joined #silverstripe
380: [23:38:17] <ss-helper> permission to access /framework/main.php - http://stackoverflow.com/questions/33837799/permission-to-access-framework-main-php
381: [23:42:52] * zlinux has joined #silverstripe
382: [23:59:51] * zlinux_ has joined #silverstripe

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