vova07 / yii2-start

Yii2-Start application
Other
273 stars 115 forks source link

blog comment cannot handle alias from settings #119

Closed golles closed 10 months ago

golles commented 9 years ago

I've the following config in my frontend main:

'users' => [
    'avatarUrl' => '@web/statics/web/users/avatars/',
],

The alias is not parsed in the comments module.

You should update the following file

yii2-start-comments-module/widgets/views/_index_item.php#19

change:

<img src="<?= $avatar ?>" class="avatar img-circle width-50" alt="<?= $comment->author->profile->fullName ?>"/>

to

<img src="<?= Url::to($avatar) ?>" class="avatar img-circle width-50" alt="<?= $comment->author->profile->fullName ?>"/>
vova07 commented 9 years ago

URL aliases are available starting 2.0.2 version, so, I'll do a little update to fix some specific moments. Thanks!

golles commented 9 years ago

Great I'll post some more issues which you can maybe fix as well

vova07 commented 9 years ago

Thanks!