We've scheduled some more PHP training courses up to June next year, running monthly.
People who are active members of Birmingham, Wolverhampton or Redditch and Bromsgrove LUGs or PHPWM can receive a discount of £25/day
See here for more details
With the impending 'Month of Bugs' for PHP, and the new release of version 5.2.1 the other day it seemed as if it would be a good time to upgrade.
I've put the slides we presented to Oxford computer society online - see here - it's based on a shorter version we gave to the UK Linux Expo thing a few months ago.
When using Smarty, I've been trying to embed something like the following to chain method calls together :
{$theObject->getUser()->getName()}
That, at least with Smarty 2.4.14, doesn't work.
Thankfully, #smarty on freenode, provided the following fix which I'll include here, just incase the link breaks :
Index: Smarty_Compiler.class.php
===================================================================
RCS file: /repository/smarty/libs/Smarty_Compiler.class.php,v
retrieving revision 1.382
diff -u -r1.382 Smarty_Compiler.class.php
--- Smarty_Compiler.class.php 28 May 2006 17:35:05 -0000 1.382
+++ Smarty_Compiler.class.php 11 Jul 2006 14:57:13 -0000
@@ -161,7 +161,7 @@
$this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp
. '(?:\s*,\s*' . $this->_obj_single_param_regexp . ')*)?\)';
$this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
- $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)';
+ $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . '' . '(?:' . $this->_obj_ext_regexp . $this->_obj_params_regexp . ')*' . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)';
// matches valid modifier syntax:
// |foo
So that now works properly, and I don't have to do something nasty like :
Recent comments
2 days 16 hours ago
3 days 3 hours ago
3 days 9 hours ago
3 days 14 hours ago
3 days 17 hours ago
3 days 19 hours ago
1 week 3 days ago
1 week 4 days ago
1 week 5 days ago
1 week 6 days ago