#silverstripe IRC Log

IRC log for 16 February 2008

Logging kindly sponsored by Stripe The Net: Hosting and Deployment, made simple.

All timestamps are in AET (Australian Eastern Time).

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

Logging kindly sponsored by Stripe The Net: Hosting and Deployment, made simple.

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