[PHP] include() and duplicate function definition

2010-11-03 Thread David Nelson
Hi, :-) I'm making a child theme for WordPress. I need to rewrite one function defined in ../sometheme/functions/actions.php and put that rewritten function in wp-content/themes/sometheme-child/functions/actions.php. But I want to preserve ../sometheme/functions/actions.php unchanged in any way.

Re: [PHP] include() and duplicate function definition

2010-11-03 Thread Thijs Lensselink
On Wed, 3 Nov 2010 17:59:06 +0800, David Nelson comme...@traduction.biz wrote: Hi, :-) I'm making a child theme for WordPress. I need to rewrite one function defined in ../sometheme/functions/actions.php and put that rewritten function in

[PHP] include() and duplicate function definition

2010-11-03 Thread David Nelson
Hi Thijs, :-) On Wed, Nov 3, 2010 at 18:18, Thijs Lensselink d...@lenss.nl wrote: As far as I know it is not possible to overwrite functions in PHP (unless you use runkit, apd). Inside classes this is possible. But that's not the case here. Why do the functions have to be equally named? If

Re: [PHP] include() and duplicate function definition

2010-11-03 Thread Peter Lind
You can check with function_exists to see if a function is already defined. If not, create it. Regards Peter On Nov 3, 2010 11:40 AM, David Nelson comme...@traduction.biz wrote: Hi Thijs, :-) On Wed, Nov 3, 2010 at 18:18, Thijs Lensselink d...@lenss.nl wrote: As far as I know it is not

Re: [PHP] include() and duplicate function definition

2010-11-03 Thread David Nelson
Hi Peter, :-) On Wed, Nov 3, 2010 at 18:44, Peter Lind peter.e.l...@gmail.com wrote: You can check with function_exists to see if a function is already defined. If not, create it. The function is definitely already defined, I just need to replace it without touching the file in which it's

Re: [PHP] include() and duplicate function definition

2010-11-03 Thread Peter Lind
That's not going to happen. My point was you could check in the original file if the function is defined and if not then define it. On Nov 3, 2010 11:55 AM, David Nelson comme...@traduction.biz wrote: Hi Peter, :-) On Wed, Nov 3, 2010 at 18:44, Peter Lind peter.e.l...@gmail.com wrote: You can

Re: [PHP] include() and duplicate function definition

2010-11-03 Thread David Nelson
Hi, :-) On Wed, Nov 3, 2010 at 19:29, Peter Lind peter.e.l...@gmail.com wrote: That's not going to happen. My point was you could check in the original file if the function is defined and if not then define it. OK, thanks, Thijs and Peter, it looks like I'm trying to do something that is not

Re: [PHP] include() and duplicate function definition

2010-11-03 Thread Thijs Lensselink
On Wed, 3 Nov 2010 19:53:52 +0800, David Nelson comme...@traduction.biz wrote: Hi, :-) On Wed, Nov 3, 2010 at 19:29, Peter Lind peter.e.l...@gmail.com wrote: That's not going to happen. My point was you could check in the original file if the function is defined and if not then define it.

[PHP] Re: Execute a php page and don't wait for it to finish

2010-11-03 Thread Ferdi
On 19 October 2010 18:50, Ferdi ferdinan...@printo.in wrote: Hi List, I have a php page that updates data from one database to another when it is run. My query is, how can I trigger the execution of this update page from another php / javascript without the calling page having to wait for

Re: [PHP] Integrating zend-facebook error

2010-11-03 Thread nitesh nandy
Can you paste a dump of complete error stack ? On Sun, Oct 31, 2010 at 10:12 PM, Yuri Yarlei yuriyar...@gmail.com wrote: Hi, I'm trying to integrate facebook to show the wall in a site. ok, i generate the auth_token here: https://login.facebook.com/code_gen.php?api_key=API_KEYv=1.0 And

[PHP] include() and duplicate function definition

2010-11-03 Thread David Nelson
Hi Thijs, :-) On Wed, Nov 3, 2010 at 20:38, Thijs Lensselink d...@lenss.nl wrote: I re-read your original post. And noticed you include the function inside your child action.php Is there a special reason for that? You want to overwrite the original function in a child theme. probably to get

Re: [PHP] include() and duplicate function definition

2010-11-03 Thread Steve Staples
On Thu, 2010-11-04 at 00:00 +0800, David Nelson wrote: Hi Thijs, :-) On Wed, Nov 3, 2010 at 20:38, Thijs Lensselink d...@lenss.nl wrote: I re-read your original post. And noticed you include the function inside your child action.php Is there a special reason for that? You want to

Re: [PHP] include() and duplicate function definition

2010-11-03 Thread David Nelson
Hi guys, :-) Just FYI, I got this answer from the theme dev: David, You don't need the include statement. If you create your function in wp-content/themes/suffusion-child/functions.php it will get automatically included. Secondly, using the same function name wouldn't work, because it would

[PHP] Apache mod_pagespeed

2010-11-03 Thread Thiago H. Pojda
Guys, Google announced this morninghttp://googlewebmastercentral.blogspot.com/2010/11/make-your-websites-run-faster.htmltheir mod_pagespeed http://code.google.com/speed/page-speed/docs/module.html to improve Apache's performance. It really looks promising, what do you guys think? Me and Daniel

Re: [PHP] Apache mod_pagespeed

2010-11-03 Thread Shreyas Agasthya
Thiago, I would like to join this. Let me know how I can help you with this. Please be explicit with your requests so that we can totally test it and see if it could pose any risk to acceleration services provided by CDNs. Regards, Shreyas On Wed, Nov 3, 2010 at 11:51 PM, Thiago H. Pojda

Re: [PHP] Apache mod_pagespeed

2010-11-03 Thread Daniel P. Brown
On Wed, Nov 3, 2010 at 14:48, Shreyas Agasthya shreya...@gmail.com wrote: Thiago, I would like to join this. Let me know how I can help you with this. Please be explicit with your requests so that we can totally test it  and see if it could pose any risk to acceleration services provided by

Re: [PHP] Apache mod_pagespeed

2010-11-03 Thread Jim Jagielski
They are doing a preso about it @ ApacheCon. On Wed, Nov 03, 2010 at 03:34:01PM -0400, Daniel P. Brown wrote: On Wed, Nov 3, 2010 at 14:48, Shreyas Agasthya shreya...@gmail.com wrote: Thiago, I would like to join this. Let me know how I can help you with this. Please be explicit with

[PHP] Problems converting strings with 0 to integer

2010-11-03 Thread robert mena
Hi, I have a text file (utf-8 encoded) which contains lines with numbers and text separated by \t. I need to convert the numbers that contains 0 (at left) to integers. For some reason one line that contains 0002 is casted to 0 instead of 2. Bellow the output of the cast (int) $field[0]

Re: [PHP] Problems converting strings with 0 to integer

2010-11-03 Thread Alexander Holodny
To exclude unexcepted behavior in case of wrongly formated input data, it would be much better to use such type-casting method: intval(ltrim(trim($inStr), '0')) 2010/11/3, Nicholas Kell n...@monkeyknight.com: On Nov 3, 2010, at 4:22 PM, robert mena wrote: Hi, I have a text file (utf-8

Re: [PHP] Problems converting strings with 0 to integer

2010-11-03 Thread Nicholas Kell
On Nov 3, 2010, at 4:22 PM, robert mena wrote: Hi, I have a text file (utf-8 encoded) which contains lines with numbers and text separated by \t. I need to convert the numbers that contains 0 (at left) to integers. For some reason one line that contains 0002 is casted to 0 instead