![]() |
yet another replace issue php, img to div
so i have been playing with this for a couple days, and i still cant get it. im trying to replace the avatar img in postbit to be a div instead.
this is the line to be changed: Code:
<img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /> some methods i have used with no results: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Your playing around with regular expressions so you need to escape every non-standard character otherwise they all have particular meanings for the regular expression engine other than their plain text characters.
So your search string would need to be something like: Code:
'\<img src=\"\$post\[avatarurl\]\" \$post\[avwidth\] \$post\[avheight\] alt=\"\<phrase 1=\"\$post\[username\]\"\>\$vbphrase\[xs_avatar\]\<\/phrase\>\" border=\"0\" \/\>' |
Quote:
PHP Code:
|
Try <img src\="\$post\[avatarurl\]".*/> as the pattern.
|
PHP Code:
|
Try the pattern:
PHP Code:
|
again nothing, lol this is becoming such a headache for such a little task =(
--------------- Added [DATE]1458277099[/DATE] at [TIME]1458277099[/TIME] --------------- just for popped in my head so i tried. postbit_display_complete Code:
$search = 'img'; --------------- Added [DATE]1458322966[/DATE] at [TIME]1458322966[/TIME] --------------- seems postbit isnt cached in the hook i was using using Code:
$vbulletin->templatecache['postbit'] = str_replace('<img src=\"$post[avatarurl]', 'SHIT', $vbulletin->templatecache['postbit']); example in red: Code:
str_replace('<img src=\"$post[avatarurl]'\"*/>, ...... |
All times are GMT. The time now is 03:58 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|