How to string replace a returned data guestbook_info
for example, in the following code ( gb module, drupal )
function _guestbook_info($uid, $data) {
global $user;
static $info;
$guestbook_mode = variable_get('guestbook_mode', GUESTBOOK_SITE_GUESTBOOK | GUESTBOOK_USER_GUESTBOOKS);
if (!isset($info[$uid])) {
if ($uid == 0 && ($guestbook_mode & GUESTBOOK_SITE_GUESTBOOK)) {
$info[$uid]['title'] = variable_get('guestbook_site_title', t('site guestbook'));
$info[$uid]['intro'] = variable_get('guestbook_site_intro', '');
}
else if ($guestbook_mode & GUESTBOOK_USER_GUESTBOOKS) {
$guestbook_user = ($uid != $user->uid) ? user_load(array('uid' => $uid, 'status' => 1)) : $user;
if ($guestbook_user->uid && $guestbook_user->guestbook_status == 0) {
$info[$uid]['title'] = t("%name's guestbook", array('%name' => $guestbook_user->name));
$info[$uid]['intro'] = $guestbook_user->guestbook_intro;
}
}
}
return $info[$uid][$data];
}
if I want to change :) to a gif in the html output in browser fromreturn $info[$uid][$data];
where in the above code do I get to do that ?
I tried something like
$data = str_replace("[:--)","
", $data);
but, errr .............................. that does not work :-(
Comments
Comment #1
sunSorry, I don't get what you want to achieve, and I'm trying to clean the issue queue.
Feel free to re-open this issue if you want to provide further information.