For some reason, the feature that resizes the user's image in the guestbook was removed in 4.7.0. Also, instead, they introduced a much more complicated and unneeded code. I haven't had the time to go through the image section to remove any uneeded code, however, it won't affect the page whatsoever.
Replace this:
}
$output .= "<div class=\"picture\">$picture</div>";
}
With:
}
if (variable_get('user_pictures', 0)) {
if ($account->picture && file_exists($account->picture)) {
$pic = file_create_url($account->picture);
}
}
$output .= "<div align=\"right\"><a href=\"?q=user/$uid\"><img src=\"$pic\" height=70></a></div>";
}
Simply change the value for 'height=70' to whatever you want and it will proportionally resize in your guestbook.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | guestbook_8.module | 26.82 KB | Popboard |
| #2 | guestbook_7.module | 26.82 KB | Popboard |
| #1 | guestbook_6.module | 26.82 KB | Popboard |
Comments
Comment #1
Popboard commentedHere's the actualy module file. I just simply regenerated the URL to the user's image with $pic. You can change this to whatever you want, obvisouly.
Comment #2
Popboard commentedI appologize but I made a stupid error. You DON'T want
Comment #3
Popboard commentedI appologize but I made a stupid error. You DON'T want:
<div align=\"right\"></code You want: <code><div class=\"picture\">. This will display your images correctly. I uploaded the new file. Sorry again.Comment #4
scroogie commentedI would recommend using imagecache for creating a cached copy of the resized image instead of just scaling it down with HTML. Additionally, i dont believe this should go in the module, you can change that behaviour by overriding the theme function.
Comment #5
sunAgreeing with scroogie.