[icq_photo=номер] - появится фотка пользователя ICQ.
<?php
function icq_online($msg){
return preg_replace('#\[icq=(\d{5,9})\]#','<img src="http://web.icq.com/whitepages/online?icq=\1&img=5" alt="\1"/>',$msg);
}
function icq_photo($msg){
return preg_replace('#\[icq_photo=(\d{5,9})\]#','<img src="http://c.icq.com/people/img/show_photo.phpc?uin=\1" alt="\1"/>',$msg);
}
echo icq_online('тра-ля-ля [icq=3257090]');
echo icq_photo('<br/>тра-ля-ля [icq_photo=3257090]');
?>