2021-04-01, 11:11 AM
I would like to know what's the variable for the thread starter avatar on the showthread.php page. If there's src or full <img> tag that represents the thread starter's avatar I'd be happy to know if there's a default one.
{$thread['uid']}
and {$thread['username']}
variables respectively.eval("\$showthread = \"".$templates->get("showthread")."\";");
$starter = get_user($thread['uid']);
$thread['starter_avatar'] = empty($starter['avatar']) ? $mybb->settings['useravatar'] : $starter['avatar'];
$thread['starter_avatar']
(2021-04-01, 11:31 AM)effone Wrote: [ -> ]Further, speaking to core edit:
Open your showthread.php and find this line near about line no. 1600eval("\$showthread = \"".$templates->get("showthread")."\";");
and add before it:$starter = get_user($thread['uid']); $thread['starter_avatar'] = empty($starter['avatar']) ? $mybb->settings['useravatar'] : $starter['avatar'];
Save your file and replace with original.
Now you can access the thread starter's avatar image url anywhere in your thread (showthread) using the variable$thread['starter_avatar']
(2021-04-01, 12:22 PM)effone Wrote: [ -> ]Core edits are likely to be lost after an update.
You need to re-apply all core edits you have committed after every update.
Or to preserve the edits you can use Patches plugin:
https://github.com/frostschutz/MyBB-Patches