Dr.CustUmz
03-16-2016, 05:32 PM
im trying to replace this string in postbit and postbit_legacy template through a plugin.
<img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
the plugin is hooked to postbit_display_complete
this is what im messing around with but cant find a solution to.
$search = '<img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />';
$replace = '<div id="drcltrav" style="background-color:'.$color.';"><span>'.strtoupper($drcltrav_lgth).'</span></div>';
$vbulletin->templatecache['postbit'] = str_replace($search, $replace, $vbulletin->templatecache['postbit']);
$show['avatar'] = true;
can someone help me out, and how would i go about replacing it in both postbits?
<img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
the plugin is hooked to postbit_display_complete
this is what im messing around with but cant find a solution to.
$search = '<img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />';
$replace = '<div id="drcltrav" style="background-color:'.$color.';"><span>'.strtoupper($drcltrav_lgth).'</span></div>';
$vbulletin->templatecache['postbit'] = str_replace($search, $replace, $vbulletin->templatecache['postbit']);
$show['avatar'] = true;
can someone help me out, and how would i go about replacing it in both postbits?