#silverstripe IRC Log

IRC log for 16 February 2008

All timestamps are in NZT (New Zealand Time).

1: [00:02:00] <WebGuest961> hmm this might be a solution
2: [00:02:00] <WebGuest961> http://api.silverstripe.com/forms/fields-relational/TreeMultiselectField.html
3: [00:51:00] <Gnx> is there some way to debug getting an empty DataObject?:)
4: [00:52:00] <Gnx> also can you lock a page type to 1 instance?
5: [01:00:00] <Gnx> for example with Footer, Contact etc.
6: [01:00:00] <dio5> so a user cannot create it?
7: [01:00:00] <Gnx> well basically so that if I make StaticGlobalPage.php
8: [01:00:00] <Gnx> so that there could be only one of those
9: [01:01:00] <dio5> hmm.. well, if it's you who makes them, just don't make 2 of them :)
10: [01:01:00] <dio5> otherwise, you could do something with canCreate()
11: [01:02:00] <Gnx> dio5: hmm that'll work, thanks
12: [01:02:00] <dio5> check if there is one of that type already
13: [01:02:00] <dio5> and return false
14: [01:02:00] <Gnx> dio5: well true, but I was just thinking again if someone else takes over the project/clients mess around with the pages
15: [01:43:00] * WebGuest961 quit ("CGI:IRC (EOF)")
16: [01:50:00] * dio5 quit (Read error: 104 (Connection reset by peer))
17: [01:51:00] * dio5 has joined #silverstripe
18: [03:06:00] * WebGuest695 has joined #silverstripe
19: [03:10:00] <WebGuest695> Sorry to bother you, but is there a downloadable version of the tutorials?
20: [03:11:00] <WebGuest695> Or do I just, save them manually?
21: [03:11:00] <Gnx> the code is available in zips
22: [03:12:00] <WebGuest695> I saw... at the end it is told. But the tutorial instructions aren't included in the code.
23: [03:14:00] <Gnx> well, dl'ing the zip at the beginning of tutorial3 essentially gives you working versions of what is done in tutorials 1 and 2
24: [03:45:00] <WebGuest695> Does SS uses Clientside caching? If so, how do I tell it to turn it off?
25: [03:49:00] <dio5> if you change yr templates, you always have to do ?flush=1
26: [03:50:00] <dio5> you can turn off all caching by putting HTTP::set_cache_age(0) in _config.php
27: [03:50:00] <dio5> but you'll still have to do ?flush=1 when a template changes
28: [03:51:00] <Gnx> dio5: hmm oh you do?
29: [03:51:00] <Gnx> where does that get stuck in
30: [03:52:00] <dio5> I dunno, it's what I noticed
31: [03:52:00] <dio5> at least for template changes that get called by an <% include %>
32: [03:53:00] <dio5> yeah, it does some sort of caching
33: [03:53:00] <Gnx> interesting, because I was in the belief SS isn't even capable of caching
34: [03:54:00] <WebGuest695> And this is to prevent Client-side caching as well?
35: [03:54:00] <dio5> but I'm not sure how either
36: [03:55:00] <dio5> not sure, haven't really studied it
37: [03:56:00] <Gnx> which is most of the problem
38: [03:56:00] <Gnx> well that HTTP::set I think sets the headers so that browser doesn't cache anything
39: [03:56:00] <dio5> yeah
40: [03:56:00] <Gnx> since caching in executing php shouldn't really happen
41: [03:58:00] <dio5> visible immediatly in the backend
42: [03:58:00] <dio5> it should prevent clientside caching, because I had to set it to 0 because uploaded images weren't
43: [03:59:00] * jam13 has joined #silverstripe
44: [04:00:00] <jam13> afternoon
45: [04:01:00] <dio5> hi, sorry for spamming you :)
46: [04:02:00] <jam13> been in meetings all morning
47: [04:02:00] <jam13> so'k
48: [04:03:00] <jam13> another project signed up
49: [04:32:00] <WebGuest113> i want use a condition into template
50: [04:32:00] * WebGuest113 has joined #silverstripe
51: [04:32:00] <WebGuest113> Hi Guys
52: [04:32:00] <WebGuest113> Please help in small problem
53: [04:33:00] <WebGuest113> like there is link.. <a href="" >Edit </a>
54: [04:33:00] <WebGuest113> but that link only show when user is login
55: [04:33:00] <Gnx> what do you want to condition to?
56: [04:34:00] <WebGuest113> i have one template that listing data with memberID
57: [04:34:00] <WebGuest113> suppose a data created by 2 member A,B
58: [04:34:00] <WebGuest113> then listing will be data of both user
59: [04:35:00] <WebGuest113> i want that link apper only when user logged in into application
60: [04:35:00] <WebGuest113> there is one edit button with every line like name surname <a href="{$MemeberID}"> edit </a>
61: [04:36:00] <WebGuest113> <% end_if %>
62: [04:36:00] <WebGuest113> and that link was created by logged in user.
63: [04:36:00] <WebGuest113> <% if CurrentMember %>
64: [04:36:00] <WebGuest113> <a href="{$Link}editproperty?id=<% control ShowPreviousAddProperty %>$ID <% end_control %>">$CurrentMember.ID Edit</a>
65: [04:36:00] <WebGuest113> that code is working for checking current user..
66: [04:37:00] <WebGuest113> is anybody help me?
67: [04:37:00] <WebGuest113> logged in condition
68: [04:37:00] <WebGuest113> but not working for checking that link is data of logged in user
69: [04:37:00] * jam13 is reading back
70: [04:38:00] <WebGuest113> i want like this condtion
71: [04:38:00] <WebGuest113> <% if CurrentMember && CurrentMember.ID = $ID %>
72: [04:38:00] <jam13> you can't do that afaik
73: [04:39:00] <WebGuest113> how can i call a method into template ?
74: [04:39:00] <jam13> the template logic is very simple
75: [04:39:00] <jam13> you'll need to create a method in your controller to do the logic
76: [04:39:00] <jam13> and then refer to that in the template
77: [04:40:00] <WebGuest113> i have created a method into my controller ..
78: [04:41:00] <WebGuest113> if($CurrentMember.ID == $id )
79: [04:41:00] <WebGuest113> like this...
80: [04:41:00] <WebGuest113> function retUserStatus($id){
81: [04:41:00] <dio5> function $Method() --> in template $Method or <% control Method %>
82: [04:41:00] <WebGuest113> return true;
83: [04:42:00] <WebGuest113> else return false ;
84: [04:42:00] <dio5> <% if method(id) %>
85: [04:44:00] <WebGuest113> this is my controller code please see http://pastie.caboo.se/152715
86: [04:45:00] <WebGuest113> that is my output ..i want here
87: [04:45:00] <WebGuest113> this template code http://pastie.caboo.se/152716
88: [04:45:00] <WebGuest113> please see this http://localhost/vancouverlivingdev/property-listing/
89: [04:46:00] <WebGuest113> http://test.vancouverlivingdev.com/real-estate-listings/
90: [04:47:00] <WebGuest113> are you looking my tempate ???
91: [04:48:00] * dio5 quit ()
92: [04:51:00] <jam13> sorry - bit busy at the moment
93: [04:52:00] <jam13> what you've got in the template won't work
94: [04:52:00] <jam13> you can't pass vars in the control
95: [04:53:00] <WebGuest113> yes
96: [04:53:00] <jam13> <% control retUserStatus(ShowPreviousAddProperty.$ID) %>
97: [04:53:00] <WebGuest113> but i need to pass id
98: [04:53:00] <WebGuest113> then i can check ..that recored created by ..which user
99: [04:53:00] <jam13> surely the controller knows the id?
100: [04:53:00] <WebGuest113> see this..http://test.vancouverlivingdev.com/real-estate-listings/
101: [04:54:00] <jam13> <% control retUserStatus %>
102: [04:54:00] <WebGuest113> that is generating by that controller and tempate..
103: [04:54:00] <jam13> the template language is very simple
104: [04:54:00] <jam13> you need to do the logic in the controller
105: [04:54:00] <jam13> so you just do:
106: [04:54:00] <WebGuest113> please check this.. http://pastie.caboo.se/152715
107: [04:54:00] <WebGuest113> i did this.. i have created a method
108: [04:55:00] <WebGuest113> so how can i get the current recored member id
109: [04:55:00] <jam13> as I said - that won't work
110: [04:55:00] <WebGuest113> ok...
111: [04:55:00] <jam13> you can't pass args from the template
112: [04:55:00] <jam13> the template parser doesn't work that way yet
113: [04:56:00] <WebGuest113> ok let me try
114: [04:56:00] <WebGuest113> yes..its giving error
115: [04:56:00] <jam13> you should be able to get it in the controller itself
116: [04:56:00] <WebGuest113> when i am supplying argument
117: [04:56:00] <WebGuest113> ok.. $this->Id
118: [04:56:00] <WebGuest113> like this..
119: [04:56:00] <jam13> yes
120: [04:58:00] <WebGuest113> like this.. $o->allowedit=true
121: [04:58:00] <WebGuest113> $o = DataObject::get("RealEstateListingDataObject", null, $order, null, $limit);
122: [04:58:00] <WebGuest113> should i add extra variable in my $o object
123: [04:58:00] <WebGuest113> and can i get value of allowedit into template ?
124: [05:05:00] <jam13> I'd need to read the docs
125: [05:05:00] <jam13> not sure
126: [05:05:00] <WebGuest113> ok..
127: [05:06:00] <WebGuest113> i tried and its not giving error but not printing value into template
128: [05:07:00] <jam13> there are some things you can pass in the url for debugging
129: [05:08:00] <WebGuest113> if i want get the value of any filed ...
130: [05:08:00] <jam13> search for debugging on the ss site
131: [05:08:00] <WebGuest113> ok please tell me i run this code
132: [05:08:00] <WebGuest113> $o = DataObject::get("RealEstateListingDataObject", null, $order, null, $limit);
133: [05:08:00] <WebGuest113> and data filled into $o
134: [05:09:00] <WebGuest113> how can i get.. it
135: [05:10:00] <jam13> friday PM is not the best time :)
136: [05:10:00] <jam13> sorry - don't have a lot of time just now
137: [05:10:00] <jam13> it's early saturday AM in NZ too
138: [05:11:00] <jam13> it's an object
139: [05:11:00] <WebGuest113> ok plz just tell me...how can get value of filled object
140: [05:11:00] <jam13> which value do you want
141: [05:11:00] <jam13> it has many
142: [05:12:00] <WebGuest113> yes
143: [05:12:00] <jam13> read the docs on dataobject
144: [05:12:00] <WebGuest113> RealEstateListingDataObject has one field ID
145: [05:12:00] <jam13> $o is a dataobject
146: [05:12:00] <WebGuest113> i want that field
147: [05:13:00] <WebGuest113> but $o->ID , returning ..blank
148: [05:13:00] <WebGuest113> i ran this $o = DataObject::get("RealEstateListingDataObject", null, $order, null, $limit);
149: [05:13:00] <WebGuest113> i want to assign like this $this->id=$o->ID;
150: [05:13:00] <WebGuest113> but its have data..
151: [05:14:00] <WebGuest113> please
152: [05:14:00] <WebGuest113> anyidea?
153: [05:14:00] <jam13> sorry - don't have time to help just now
154: [05:14:00] <jam13> try monday
155: [05:14:00] <WebGuest113> ohhh
156: [05:14:00] <jam13> SS devs back then
157: [05:14:00] <WebGuest113> i am worker for a company
158: [05:15:00] <WebGuest113> since 4 hour
159: [05:15:00] <WebGuest113> and today is my deadline
160: [05:15:00] <WebGuest113> client want to see this code run.
161: [05:15:00] <WebGuest113> i am fighting with this line only..
162: [05:16:00] <jam13> read the docs for dataobject: http://doc.silverstripe.com/doku.php?id=datamodel
163: [05:17:00] <WebGuest113> i read it
164: [05:17:00] <jam13> you need get_by_id or get_one
165: [05:17:00] <WebGuest113> but..there is long listing and pagination also there
166: [05:18:00] <WebGuest113> so how can i use get_one
167: [05:22:00] * xera1 has joined #silverstripe
168: [05:27:00] * jam13 quit ("Leaving")
169: [05:35:00] * xeraa quit (Read error: 110 (Connection timed out))
170: [05:52:00] * WebGuest113 quit ("CGI:IRC (EOF)")
171: [05:57:00] * Zerrvox quit (Read error: 110 (Connection timed out))
172: [06:05:00] * Zerrvox has joined #silverstripe
173: [06:29:00] * dao777 has joined #silverstripe
174: [06:31:00] * WebGuest695 quit ("CGI:IRC (EOF)")
175: [07:01:00] * Zerrvox quit (Read error: 110 (Connection timed out))
176: [07:09:00] * xeraa has joined #silverstripe
177: [07:18:00] * xera2 has joined #silverstripe
178: [07:22:00] * romanix_ quit ("ChatZilla 0.9.80 [Firefox 2.0.0.12/2008020121]")
179: [07:27:00] * dio5 has joined #silverstripe
180: [07:28:00] * xera1 quit (Read error: 110 (Connection timed out))
181: [07:37:00] * xeraa quit (Read error: 110 (Connection timed out))
182: [07:52:00] * dao777 hates flu sickness
183: [07:52:00] <dao777> um i'm having a big brainfart - what is the component which tells you where you are in the site?
184: [07:52:00] <dao777> trail or something
185: [07:57:00] <Gnx> eh, stupid problem, but how do I use checkbox data in template?:)
186: [08:20:00] * simon_w has joined #silverstripe
187: [08:29:00] * Zerrvox has joined #silverstripe
188: [08:56:00] <simon_w> Gnx, $Name
189: [08:56:00] <simon_w> should be true or false
190: [09:02:00] <simon_w> test the bot
191: [09:02:00] * ss-log-simon_w has joined #silverstripe
192: [09:02:00] * ss-log-simon_w quit (Remote closed the connection)
193: [09:15:00] * ss-log-simon_w has joined #silverstripe
194: [09:15:00] <simon_w> and another test
195: [09:16:00] <simon_w> woo! It works! (:
196: [09:17:00] <simon_w> now, tidy up some stuff
197: [09:24:00] * ss-log-simon_w quit (Remote closed the connection)
198: [09:25:00] * ss-log-simon_w has joined #silverstripe
199: [09:26:00] <simon_w> woo! it did!
200: [09:26:00] <simon_w> did it work?
201: [09:35:00] * Zerrvox quit (Read error: 110 (Connection timed out))
202: [10:19:00] * sminnee has joined #silverstripe
203: [10:29:00] * simon_w quit (Read error: 104 (Connection reset by peer))
204: [10:32:00] * ss-log-simon_w quit (Read error: 104 (Connection reset by peer))
205: [10:36:00] <dio5> anyone filtered newsletter recipients?
206: [11:07:00] * emma3_ quit ()
207: [11:07:00] * sminnee quit ()
208: [11:13:00] * simon_w has joined #silverstripe
209: [11:32:00] <Gnx> umm my checkbox is still not working
210: [11:33:00] <Gnx> but like <% if $Variable = 1> Print stuff <% end_if %>
211: [11:33:00] <Gnx> do I have to make a function of it or something?
212: [11:33:00] <simon_w> shouldn't have to
213: [11:33:00] <Gnx> (just need some conditional html based on the checkbox value)
214: [11:33:00] <simon_w> is the checkbox being stored in the database?
215: [11:34:00] <simon_w> drop the dollar sign
216: [11:35:00] <dio5> anyone linked SS to a SMS - gateway?
217: [11:36:00] <Gnx> simon_w: parse error
218: [11:40:00] <simon_w> dio5, in which way?
219: [11:40:00] <dio5> <% if Var %> <% end_if %>
220: [11:40:00] <dio5> in both ways :)
221: [11:41:00] <simon_w> decorate Member, and use augmentWrite
222: [11:41:00] <Gnx> this can't be so hard :)
223: [11:41:00] <dio5> I'm not sure how it will work though, waiting on information
224: [11:41:00] <Gnx> parse error
225: [11:41:00] <dio5> no, I'm gonna need to add members to the SS db as well as to a SMS db
226: [11:42:00] <Gnx> but I can't find any example
227: [11:42:00] <simon_w> Gnx, what's the error?
228: [11:43:00] <Gnx> parse error: unexpected '}'....etc.
229: [11:44:00] <simon_w> is the variable name correct? (including case)
230: [11:44:00] <Gnx> is..I'll do some more testing with that now
231: [11:48:00] <Gnx> okay now I can't even save the page since changing the variable broke it
232: [11:49:00] <Gnx> for some reason db/build doesn't update the name into the db
233: [11:49:00] <simon_w> It should make a new column...
234: [11:53:00] <Gnx> okay wtf now the subpages won't open
235: [11:55:00] <Gnx> apparently variable names don't like numbers
236: [11:55:00] <Gnx> but the condition works now ;)
237: [11:56:00] <Gnx> which leads to me another question, how to affect the description text in the cms whilst having sound variable name?
238: [11:57:00] <Gnx> the links don't work, even thought they point at right address
239: [11:57:00] <simon_w> new CheckboxField('Variable', 'Description') (:
240: [11:57:00] <Gnx> oh
241: [11:57:00] <Gnx> well that probably won't crash my site to do ;)
242: [11:57:00] <Gnx> thanks
243: [11:57:00] <Gnx> but this is weird
244: [11:57:00] <Gnx> and if I paste them manually then they do
245: [11:59:00] <simon_w> Gnx, that's weird...
246: [11:59:00] * HellBoy has joined #silverstripe
247: [11:59:00] <HellBoy> Good evening, gents
248: [11:59:00] <simon_w> Morning HellBoy
249: [11:59:00] <Gnx> simon_w: extremely, either FF is confused or the server is doing something
250: [12:00:00] <simon_w> Gnx, try a different browser then
251: [12:00:00] <HellBoy> I'm having some trouble with my fresh Silverstripe install, anyone here who might be able to help me out?
252: [12:00:00] <simon_w> HellBoy, maybe...
253: [12:01:00] <HellBoy> Right after the # Building database schema...
254: [12:01:00] <HellBoy> I'm getting Fatal error: Class 'ReflectionClass' not found in ********/sapphire/core/Object.php on line 249 when I try to install.
255: [12:02:00] <HellBoy> A little Googling didn't turn up anything useful
256: [12:03:00] <simon_w> which version of SilverStripe?
257: [12:03:00] <HellBoy> Latest, 2.2.1.
258: [12:03:00] <HellBoy> Fresh database and fresh install
259: [12:04:00] <HellBoy> PHP Version 5.2.5-pl1-gentoo
260: [12:04:00] <simon_w> and which PHP version?
261: [12:05:00] * dao777_ has joined #silverstripe
262: [12:05:00] <simon_w> that's weird...
263: [12:06:00] <simon_w> ReflectionClass is part of PHP 5...
264: [12:06:00] <HellBoy> I'd say.
265: [12:06:00] <HellBoy> Hmm
266: [12:07:00] <simon_w> that explains it
267: [12:07:00] <simon_w> in a phpinfo(); is there a section on Reflection?
268: [12:07:00] <HellBoy> '--disable-reflection'
269: [12:07:00] <HellBoy> Righty-O
270: [12:08:00] <simon_w> PHP 5 comes with a complete reflection API that adds the ability to reverse-engineer classes, interfaces, functions and methods as well as extensions. Additionally, the reflection API also offers ways of retrieving doc comments for functions, classes and methods.
271: [12:08:00] <HellBoy> What does the Reflection class do?
272: [12:10:00] <HellBoy> I would assume there's not a security risk involved in enabling this?
273: [12:11:00] <simon_w> not that I know of
274: [12:11:00] <HellBoy> Goodie
275: [12:12:00] * dao__ has joined #silverstripe
276: [12:25:00] * dao777 quit (Read error: 110 (Connection timed out))
277: [12:30:00] * dao777_ quit (Read error: 110 (Connection timed out))
278: [12:37:00] * sminnee has joined #silverstripe
279: [13:23:00] * dio5 quit (Read error: 110 (Connection timed out))
280: [13:24:00] <HellBoy> simon_w: Seems like your solution worked :)
281: [13:27:00] * emma3 has joined #silverstripe
282: [13:30:00] <simon_w> yay! (:
283: [13:39:00] <HellBoy> I'm still having some problems though, regarding Allowoverride and mod_rewrite.
284: [13:40:00] <HellBoy> Fatal error: Call to undefined function ctype_digit() in /home/nsgp/helskjegg/almostsober.no/sapphire/misc/Browscap.php on line 522
285: [13:41:00] <simon_w> did you compile with --disable-ctype?
286: [13:42:00] <HellBoy> Anything else I should be aware of?
287: [13:42:00] <HellBoy> Arr, it seems like that one's present.
288: [13:43:00] <simon_w> what else do you have disabled?
289: [13:43:00] <simon_w> no idea
290: [13:44:00] <HellBoy> arr
291: [13:44:00] <HellBoy> The commands look like this
292: [13:44:00] <HellBoy> ./configure' '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu' '--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' '--without-pear' '--disable-bcmath' '--without-bz2' '--disable-calendar' '--disable-ctype' '--without-cur
293: [13:44:00] <HellBoy> './configure' '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu' '--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' '--without-pear' '--disable-bcmath' '--without-bz2' '--disable-calendar' '--disable-ctype' '--without-c
294: [13:48:00] <simon_w> doesn't look like it
295: [13:49:00] <HellBoy> Goodie!
296: [13:49:00] <HellBoy> Recompiling now
297: [13:50:00] <HellBoy> Been using Drupal before, and thought about switching to Wordpress for this project, but it seems to be plagued with security flaws.
298: [13:50:00] <HellBoy> I've got high hopes for Silverstripe, the system looks really sweet
299: [13:50:00] <simon_w> (:
300: [13:53:00] * Tate has joined #silverstripe
301: [14:04:00] <simon_w> They aren't settings yet, and not every template has them
302: [14:04:00] <HellBoy> Quick question, though
303: [14:04:00] <simon_w> yes?
304: [14:04:00] <HellBoy> I can't find where I define the site name and site tagline
305: [14:04:00] <HellBoy> I would assume I don't have to use FTP access to change that.
306: [14:04:00] <simon_w> in the template
307: [14:05:00] <HellBoy> Oh
308: [14:06:00] * Tatey quit (Read error: 110 (Connection timed out))
309: [14:06:00] <Gnx> you could of course make those into fields if desired
310: [14:06:00] <HellBoy> Can I define the default template for the site within the backend or have I got to do this through FTP access as well?
311: [14:06:00] <Gnx> ftp
312: [14:06:00] <simon_w> at the moment, that requires FTP as well
313: [14:06:00] <simon_w> my last GHOP task was making a way of changing that
314: [14:07:00] <Gnx> simon_w: and don't you dare joomlaze what is good and clean ;)
315: [14:07:00] <Gnx> the cms is meant for the content
316: [14:08:00] <simon_w> Gnx, but not every person that can run a site should be given FTP access, so how are they supposed to change theme or install widgets?
317: [14:09:00] <Gnx> okay for those maybe
318: [14:09:00] <HellBoy> I guess this'll be a one-time job setting up the template and design for the site, and from what I've seen of the backend it seems pretty much superiour to the tools I've used before.
319: [14:10:00] <Gnx> HellBoy: yup
320: [14:10:00] <Gnx> simon_w: but it will inevitably convolute the gui more
321: [14:10:00] <HellBoy> And seeing how the site is to be used by people whose tech-knowledge is limited to Word, this should be great for them.
322: [14:10:00] <Gnx> and those ppl should not be allowed into the html or css anyway
323: [14:10:00] <Gnx> you can make custom fields for them in the CMS
324: [14:11:00] <Gnx> simon_w: well you said theme
325: [14:11:00] <simon_w> yes, a drop down to select which one to test, and a button to install
326: [14:11:00] <simon_w> Gnx, two extra drop downs and buttons is clutter?
327: [14:12:00] <Gnx> I thought editing
328: [14:12:00] <simon_w> nope, just installing
329: [14:12:00] <Gnx> thats cluttertastic
330: [14:12:00] <Gnx> ah
331: [14:12:00] <Gnx> thats a different matter
332: [14:13:00] <Gnx> that would create a nice layer actually
333: [14:13:00] * Gnx knows from experience ordinary people are very scared of even html
334: [14:14:00] <Gnx> well it says on the blog module page
335: [14:14:00] <simon_w> (:
336: [14:14:00] <Gnx> and some unfortunately are not
337: [14:14:00] <Gnx> and insist they know stuff (tm)
338: [14:14:00] <HellBoy> How do I add modules, such as the blog module?
339: [14:15:00] <simon_w> upload them to your main directory, then run db/build?flush=1
340: [14:16:00] <HellBoy> Thanks for all the help, much appreciated :)
341: [14:16:00] <HellBoy> Goodie
342: [14:16:00] <HellBoy> I'll have to read up on this tomorrow, it's already 02:16am here.
343: [14:16:00] <simon_w> ooh, your 12 hours behind me (:
344: [14:17:00] <simon_w> NZ (:
345: [14:17:00] <Gnx> its an hour more here, and I'm not tired ;)
346: [14:17:00] <HellBoy> simon_w: It's the 16th here, so I might be 12 hours ahead ;)
347: [14:17:00] <Gnx> HellBoy: get a nice text editor/ftp setup
348: [14:17:00] <Gnx> it'll help a lot
349: [14:17:00] <simon_w> 16th here as well (:
350: [14:17:00] <HellBoy> Oh.
351: [14:17:00] <HellBoy> :P
352: [14:17:00] <HellBoy> Australia?
353: [14:17:00] <simon_w> not quiet
354: [14:18:00] <HellBoy> g'nite
355: [14:18:00] <HellBoy> Ah, close but no cigar, then.
356: [14:18:00] <Gnx> New Zardoz
357: [14:18:00] <HellBoy> Anyways, I'm off to bed :)
358: [14:18:00] <simon_w> night HellBoy
359: [14:22:00] <Gnx> don't remember this job was like this before SS ;)
360: [14:22:00] <Gnx> kinda like...fun ;)
361: [14:22:00] <Gnx> I'm working on 3 sites..and its is fun..and often I can directly paste code between them
362: [14:34:00] <sminnee> instead of copy and paste
363: [14:34:00] <sminnee> that way, if you fix a bug in the common class, it's fixed in all the sites, without doing more copy and paste
364: [14:34:00] <sminnee> Gnx: You should try and create some common classes that you then subclass
365: [14:35:00] <sminnee> You could even make your own "kitchen sink" Page.php class, and on each of your sites you just change the templates.
366: [14:35:00] <sminnee> depending on how similar your projects are.
367: [14:35:00] * xeraa has joined #silverstripe
368: [14:39:00] * xeraa has left #silverstripe
369: [14:39:00] * simon_w hopes Chris remembers to ask Leslie
370: [14:42:00] <Gnx> sminnee: good point
371: [14:42:00] <sminnee> simon_w: what are you talking about? :p
372: [14:43:00] <simon_w> sminnee, He said he'll try and get me a free trip to Google as well (:
373: [14:43:00] <Gnx> but for now its been mostly tweaking existing modules
374: [14:44:00] <simon_w> (:
375: [14:44:00] <sminnee> that would be pretty cool! :)
376: [14:44:00] <sminnee> heh sweet.
377: [14:45:00] <sminnee> If you haven't heard about it in a week or so, you might want to give him an email or something; they're generally pretty generous but they're busy and so may sometimes forget things :)
378: [14:45:00] <sminnee> Or just talk to Sig about it :p
379: [14:46:00] <simon_w> ooh, buggies!
380: [14:46:00] <Gnx> the cms writes urls from umlauts to "-"
381: [14:46:00] <Gnx> hmm a bug
382: [14:47:00] <Gnx> when � should be a and � should be o
383: [14:50:00] <simon_w> oh, I've got an update for ss-log that puts anchors in the logs and reorganises the index page
384: [14:51:00] <Gnx> thats actually quite annoying, what I described above
385: [14:51:00] <simon_w> Gnx, can a varchar handle umlauts?
386: [14:52:00] * xera2 quit (Read error: 110 (Connection timed out))
387: [14:52:00] <Gnx> umm, good question
388: [14:53:00] <Gnx> $segment = ereg_replace('-+','-',$segment);
389: [14:53:00] <Gnx> that regexp can't do umlauts since they're not in the standard charset
390: [14:53:00] <Gnx> (from SiteTree.php line 749)
391: [14:53:00] <Gnx> $this->changed['URLSegment']) {
392: [14:53:00] <Gnx> } else if(isset($this->changed['URLSegment']) &&
393: [14:53:00] <Gnx> // Keep it clean
394: [14:53:00] <Gnx> I think I found whats the problem
395: [14:53:00] <Gnx> $segment = ereg_replace('[^A-Za-z0-9]+','-',$this->URLSegment);
396: [14:59:00] * sminnee_ has joined #silverstripe
397: [14:59:00] * sminnee quit (Read error: 104 (Connection reset by peer))
398: [14:59:00] <sminnee_> Gnx: For best results, you would need to find a function that mapped characters with diacritical marks (umlaut, acute, grave, macron, etc) to regular A-Z characters.
399: [15:00:00] <Gnx> yeah
400: [15:00:00] * sminnee_ quit (Read error: 104 (Connection reset by peer))
401: [15:00:00] <Gnx> and then stick that to the regexp part
402: [15:03:00] * sminnee has joined #silverstripe
403: [15:03:00] <sminnee> If you had to make a manual map, it would be difficult to ensure that you had covered *everything*.
404: [15:04:00] <Gnx> well I don't need to cover everything
405: [15:04:00] <sminnee> This might help: http://nz2.php.net/strtr
406: [15:04:00] <sminnee> look in the comments
407: [15:04:00] <Gnx> its just that those 2 umlauts occur in finnish about as frequently as any other vowel
408: [15:05:00] <Gnx> thanks, that is helpful
409: [15:05:00] <simon_w> Couldn't you use MySQL to convert it as well?
410: [15:06:00] <Gnx> well the it gets Converted in the SiteTree.php to "-"
411: [15:06:00] <sminnee> yeah
412: [15:06:00] <Gnx> so I would have to fix it there
413: [15:06:00] * _3dkiwi has joined #silverstripe
414: [15:07:00] <Gnx> then it should be fine
415: [15:07:00] <sminnee> I don't recommend using MySQL
416: [15:07:00] <Gnx> but if I translate the chars
417: [15:07:00] <simon_w> http://nz2.php.net/convert_cyr_string may be helpful?
418: [15:07:00] <Gnx> before they reach the reg exp
419: [15:07:00] <sminnee> I'm not sure that MySQL deals with the utf8 encoded strings that SilverStripe passes it very well
420: [15:07:00] <Gnx> exactly
421: [15:08:00] <sminnee> I'm not sure that we're dealing with crylic, really.
422: [15:08:00] * HellBoy quit ("...Kaptein Krok er kanskje en heller lunken onanist, men en glimrende voldtektsmann.")
423: [15:08:00] <Gnx> well I wouldn't want to pass anything except standard chars to urls anyway :)
424: [15:08:00] <sminnee> Also, we're looking at supporting postgresql in the next few months, and so we want to minimise any db-specific code
425: [15:09:00] <Gnx> nope
426: [15:10:00] * xera1 has joined #silverstripe
427: [15:10:00] <Gnx> not me
428: [15:10:00] * xera1 has left #silverstripe
429: [15:10:00] <Gnx> at least
430: [15:10:00] <Gnx> I'm fine with translating umlauts to standard chars
431: [15:12:00] <sminnee> Gnx: It would be good if you could make a patch that converted acutes, graves, etc as well as umlauts
432: [15:12:00] <sminnee> then we will be able to merge it into the standard release so that you'll be able to upgrade more easily.
433: [15:13:00] <Gnx> if it works I can just stick a bigger translation set on it
434: [15:13:00] <Gnx> well, I'll first try something simple like converting just the umlauts
435: [15:15:00] <simon_w> You can't even cheat and remove a constant amount...
436: [15:17:00] <Gnx> allthough its a bit complicated
437: [15:17:00] <Gnx> since its also about deciding to what ascii char the special character will be written to
438: [15:17:00] <Gnx> I mean its just a decision that in finnish urls are written with a and o
439: [15:18:00] <Gnx> could also be ae and oe
440: [15:20:00] <sminnee> Gnx: Doing a language-specific translation could get quite nasty
441: [15:21:00] <sminnee> would be a big improvement on what we currently have.
442: [15:21:00] <sminnee> Just "removing the umlaut", turning é into e and ë into e
443: [15:21:00] <sminnee> also strtr() seems to only support translation of 1 character into another single character?
444: [15:22:00] <sminnee> really?
445: [15:22:00] <Gnx> and currently I'm having no luck with it
446: [15:22:00] <Gnx> yup
447: [15:23:00] <sminnee> You might need to specify the umlaut characters by using an escaped notation
448: [15:23:00] <sminnee> and that your text editor may not be saving your ë character using unicode encodin.
449: [15:23:00] <sminnee> oh ok
450: [15:23:00] <simon_w> I got strtr to change two characters into 3
451: [15:23:00] <sminnee> remember that the characters will be in unicode
452: [15:24:00] <sminnee> you might want to look in the /lang folder to see how things are encoded there.
453: [15:28:00] <Gnx> yup, and also I can't figure out how everything is done in SiteTree.php either
454: [15:36:00] * CIA-33 hugs simon_w
455: [15:36:00] * simon_w hugs CIA-33
456: [15:36:00] <CIA-33> silverstripe: simonw * r49624 /open/modules/embargoexpiry/trunk/ (README INSTALL): Added instructions for installing the single page type or the decorator. Updated the readme, as the patch isn't always required.
457: [15:43:00] <sminnee> jheh
458: [15:43:00] <sminnee> where is it?
459: [15:43:00] <simon_w> sminnee, can you have a look at my patch for can()?
460: [15:43:00] <simon_w> http://open.silverstripe.com/ticket/2198
461: [15:44:00] <simon_w> http://svn.silverstripe.com/open/modules/embargoexpiry/trunk/code/EmbargoExpiryDecorator.php
462: [15:44:00] <sminnee> Where have you used augmentCan() ?
463: [15:44:00] <sminnee> extend() isn't normally used to return values.
464: [15:48:00] <sminnee> Hmm.
465: [15:48:00] <sminnee> The whole Can() API is a bit messed up.
466: [15:48:00] <sminnee> Like - it seems that code should be broken out into SiteTree::canView() and SiteTree::canEdit()
467: [15:52:00] <simon_w> but there's still the problem of decorators not being able to override any of the can*() functions
468: [15:55:00] <sminnee> Yeah
469: [15:56:00] <sminnee> We'd need augmentCanView() and augmentCanEdit(), in that case.
470: [16:05:00] <simon_w> done in the same way as my current patch?
471: [16:06:00] <CIA-33> silverstripe: simonw * r49627 /open/modules/embargoexpiry/trunk/INSTALL: Need to edit _config.php if not using the decorator
472: [16:31:00] * sminnee quit ()
473: [16:32:00] * sminnee has joined #silverstripe
474: [16:45:00] * Tatey has joined #silverstripe
475: [16:46:00] <simon_w> can someone hurry up and make a way for LifeType to get imported into SilverStripe?
476: [16:49:00] <sminnee> simon_w: Yes - the same way as the current patch should be fine. Except that you should only need to pass the boolean as an argument, rather than the array.
477: [16:50:00] <sminnee> simon_w: What's LifeType?
478: [16:50:00] <sminnee> Does it have any export support?
479: [16:50:00] <simon_w> yeah
480: [16:50:00] <sminnee> So you want to be able to export lifeType data into silverstirpe/
481: [16:50:00] <simon_w> far too hard to hack
482: [16:50:00] <simon_w> Blogging system I use
483: [16:51:00] <simon_w> nope
484: [16:51:00] <sminnee> What's the back-end database
485: [16:52:00] <sminnee> Is your lifetype database on the same server as your silverstripe database?
486: [16:52:00] <simon_w> articles, articles_text, articles_comments, articles_notifications
487: [16:53:00] <sminnee> So something like
488: [16:53:00] <simon_w> It will end up like that
489: [16:53:00] <sminnee> You could make LifeTypeImporter extends Controller, with a function index()
490: [16:53:00] <sminnee> $b->write();
491: [16:53:00] <sminnee> $b = new BlogEntry(); $b->Title = $record['Title']; $b->Content = $record['Content'];
492: [16:53:00] <sminnee> foreach($records as $record)
493: [16:53:00] <sminnee> $records = DB::query("SELECT * FROM lifetype.articles");
494: [16:54:00] <sminnee> That code is obviously a little bit hand-wavy
495: [16:54:00] <sminnee> but do you get the idea?
496: [16:54:00] <simon_w> yeah
497: [16:54:00] <sminnee> If you wanted, you could make it generate a new BlogHolder() page, and then create BlogEntry() pages under that.
498: [16:56:00] <simon_w> and then just call the class using URL handling
499: [17:09:00] * Tate quit (Read error: 110 (Connection timed out))
500: [17:28:00] * simon_w loves his widget installer (:
501: [17:42:00] <simon_w> quick question. With a theme from SS.com, am I allowed to change the created by string to a comment, and add Powered by SilverStripe instead?
502: [17:54:00] * Wojtek-I`m-18-no has joined #silverstripe
503: [17:54:00] <Wojtek-I`m-18-no> howdy!
504: [17:54:00] * Wojtek-I`m-18-no is now known as Wojtek
505: [17:54:00] <simon_w> afternoon Wojtek-I`m-18-no
506: [17:54:00] <Wojtek> what a party it was!
507: [17:54:00] <Wojtek> my head still hurts a bit
508: [17:54:00] <simon_w> you might be able to answer my question:
509: [17:54:00] <simon_w> With a theme from SS.com, am I allowed to change the created by string to a comment, and add Powered by SilverStripe instead?
510: [17:54:00] <Wojtek> but it was a good one
511: [17:54:00] <Wojtek> =)
512: [17:55:00] <simon_w> I meet Leslie's boss last night (:
513: [17:55:00] <Wojtek> do you mean just changing the footer?
514: [17:55:00] <Wojtek> nice
515: [17:55:00] <simon_w> WebStock
516: [17:55:00] <Wojtek> where?
517: [17:56:00] <Wojtek> should be... templates/includes/footer.php
518: [17:56:00] <simon_w> yeah
519: [17:57:00] <simon_w> templates/Includes/Footer.ss q:
520: [17:57:00] <Wojtek> it depends how
521: [17:57:00] <simon_w> comment it out, stick in powered by silverstripe
522: [17:57:00] <Wojtek> templates/Includes/Footer.php to be precise
523: [17:57:00] <simon_w> It'll still be in the source code, just not visible
524: [17:57:00] <simon_w> but am I allowed to change it?
525: [17:58:00] <Wojtek> if he agrees to that, sure then, but if not...
526: [17:58:00] <Wojtek> ehm it depends on the theme creator
527: [17:58:00] <Wojtek> well, certainly you're not allowed to totally remove the "created by" label
528: [17:59:00] <Wojtek> and if it's my theme
529: [17:59:00] <simon_w> Jo?o's
530: [17:59:00] * Wojtek quit ("Leaving")
531: [17:59:00] <simon_w> laters
532: [17:59:00] <Wojtek> cy
533: [17:59:00] * Wojtek is going to sleep now
534: [17:59:00] <Wojtek> :p
535: [17:59:00] <Wojtek> so nevermind
536: [17:59:00] <Wojtek> k
537: [17:59:00] <simon_w> I'll just paraphrase it then
538: [18:33:00] <Gnx> damn, don't get why my umlaut fix doesn't work
539: [18:33:00] <Gnx> well I found the lines where it corrects the ampersand for example
540: [18:33:00] <simon_w> it doesn't like you?
541: [18:35:00] <Gnx> or then its the wrong line
542: [18:38:00] <Gnx> the comments are a bit vague at times ;)
543: [18:40:00] <Gnx> damn, wasn't that either
544: [18:46:00] <Gnx> changed the code
545: [18:46:00] <Gnx> and nothing happens
546: [18:46:00] <Gnx> funny, I found exactly where the auto-urling is done
547: [18:52:00] <Gnx> bah, I'll try more tomorrow
548: [18:57:00] <sminnee> I have a suspicion that the method is implemented twice :P
549: [18:57:00] <sminnee> Are you having trouble finding which piece of code to correct?
550: [18:57:00] <sminnee> Are you working in the JS or the PHP?
551: [19:00:00] <Gnx> sminnee: well I found in php the function that does formatting for the url in cms
552: [19:01:00] <sminnee> And is it getting passed an undecoded URL?
553: [19:02:00] <sminnee> I would suggest that you add some debugging command to see what that method is getting passed
554: [19:02:00] <sminnee> If you just Debug::show() the data, then the save method will give you an error message listing the data.
555: [19:02:00] <sminnee> because it's possible that there's another stage in the pipeline that's already stripping the ö out of the URL
556: [19:02:00] <sminnee> and that's why your method fails.
557: [19:03:00] <sminnee> in the CMS
558: [19:04:00] <Gnx> hmm okay, I'll try that tomorrow
559: [19:04:00] <Gnx> now I need sleep
560: [19:08:00] <sminnee> It's 7pm here :P
561: [19:08:00] <sminnee> ah where are you?
562: [19:10:00] * sminnee quit ()
563: [19:14:00] * sminnee has joined #silverstripe
564: [19:21:00] * dao__ quit (Read error: 110 (Connection timed out))
565: [19:22:00] <simon_w> aah, the template's for the old version of the blog
566: [19:22:00] * sminnee_ has joined #silverstripe
567: [19:29:00] * sminnee_ quit (Read error: 104 (Connection reset by peer))
568: [19:35:00] * sminnee quit (Read error: 110 (Connection timed out))
569: [19:39:00] * sminnee has joined #silverstripe
570: [19:42:00] * simon_w haxors the blog modules
571: [19:42:00] <simon_w> *module
572: [19:44:00] * sminnee_ has joined #silverstripe
573: [19:48:00] * sminnee_ has joined #silverstripe
574: [19:48:00] * sminnee_ quit (Read error: 104 (Connection reset by peer))
575: [19:51:00] * sminnee_ quit (Read error: 104 (Connection reset by peer))
576: [19:52:00] <simon_w> is there any function I can pass stuff through to close any open HTML tags?
577: [19:52:00] * sminnee_ has joined #silverstripe
578: [19:59:00] * sminnee quit (Read error: 110 (Connection timed out))
579: [20:01:00] * dao777 has joined #silverstripe
580: [20:06:00] <simon_w> sminnee_, any ideas?
581: [20:09:00] * sminnee_ quit (Read error: 110 (Connection timed out))
582: [20:20:00] * dao777 quit (Read error: 110 (Connection timed out))
583: [20:21:00] * sminnee has joined #silverstripe
584: [20:43:00] * Tate has joined #silverstripe
585: [20:50:00] * sminnee quit ()
586: [20:57:00] * Tatey quit (Read error: 110 (Connection timed out))
587: [21:12:00] * Grazyag has joined #silverstripe
588: [21:17:00] * Grazyag quit ("CGI:IRC (EOF)")
589: [21:30:00] * simon_w quit ("This computer has gone to sleepy land with its Leopard")
590: [21:33:00] * _3dkiwi quit ("Konversation terminated!")
591: [21:48:00] * WebGuest988 has joined #silverstripe
592: [21:49:00] <WebGuest988> i am getting one problem in template
593: [21:49:00] <WebGuest988> is good time to call you for help??
594: [21:50:00] <WebGuest988> when i am using <% control MethodName %> and using this link <a href="{$Link}">link</a>
595: [21:50:00] <WebGuest988> that $link giving me blank/null value
596: [21:51:00] <WebGuest988> its giving me correct output.. {$link} returing write ans..
597: [21:51:00] <WebGuest988> but when i am calling <a href="{$link}"> outsite of <% Control method %></% end_control %>
598: [21:51:00] <WebGuest988> Why this happing please help ??
599: [23:07:00] * xeraa has joined #silverstripe
600: [23:33:00] * xeraa has left #silverstripe
601: [23:37:00] <WebGuest988> Hello
602: [23:37:00] <WebGuest988> please tell me
603: [23:38:00] <WebGuest988> <% end_if % >
604: [23:38:00] <WebGuest988> how can i impletement
605: [23:38:00] <WebGuest988> that condition into template
606: [23:38:00] <WebGuest988> <% if CurrentMember.ID= Id %>
607: [23:38:00] <WebGuest988> is this possible??
608: [23:40:00] <WebGuest988> help
609: [23:40:00] <WebGuest988> HELLO SS GROUP
610: [23:40:00] <WebGuest988> Is any HELP HERE
611: [23:40:00] <WebGuest988> i am looking for helo
612: [23:40:00] <WebGuest988> pleas
613: [23:41:00] <WebGuest988> Is any SS DEVELOPER HERE ????
614: [23:41:00] <WebGuest988> Is any SS DEVELOPER HERE ????
615: [23:45:00] <WebGuest988> NO HELPPPPPPPPPPPPPPPPPPP
616: [23:45:00] <WebGuest988> HUHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHh
617: [23:54:00] * WebGuest988 quit ("CGI:IRC (EOF)")

These logs were automatically created by ss-log on irc.freenode.net. This site is powered by code available under a BSD license.