Closed (fixed)
Project:
MySite
Version:
master
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
5 Feb 2007 at 11:31 UTC
Updated:
17 May 2007 at 15:06 UTC
My client asked me why there are no pictures in the listing of mysites nor at the top of mysites and if I could enable them. I've looked and I can't see how to?
I think this is a bug as the SQL calls the picture but the code doesn't output it? I've looked round the setting and can't see a switch anywhere.
If it isn't a bug could it be a feature request please!
Comments
Comment #1
agentrickardThe module should support most of this already. Read up on layout and format files in the README.
Are you referring to the picture of the owner of the MySite page or the pictures of the creators of content on the MySite page?
In the case of #1, the $owner object contains everything you should need (it's identical to the $user object), and you could add the owner picture by editing the following files:
a) plugins > layouts > default.php (line 16 is a good candidate for adding a picture)
b) plugins -> layouts > columns.php
Or you could create a new layout file.
In the case of #2, we'd have to change the API for the .inc files to include the author photo. Then we'd have to rewrite the format files to print the picture where appropriate.
Comment #2
agentrickardIt's not really a bug. It's just never been requested.
Comment #3
csc4 commentedWell it has now ;)
I tried your suggestion - but I must be missing something - I've tried editing default.php as you suggest and it seems to make absolutely no difference - I've put
's in and all sorts and can't seem to change what's being rendered on the page at all?
Comment #4
agentrickardTry this for a start. You'll need to do some tweaking to make it exactly as you want.
File: mysite/plugins/layouts/default.phpLine 16
There are some conditions that must be met for this to work:
1) User pictures must be enabled.
2) The user must have loaded a picture.
3) The user must be using the default MySite layout. (For the columns.php layout, change line 22 instead of line 16).
4) The user viewing the page must have 'access user profiles' permissions.
You will likely want to adjust the output to suit your design. But the code above should get you started. If you want to manipulate the image directly, access it as
$owner->pictureComment #5
agentrickardI'm going to mark this 'by design.' I think modifying the default theme is a sufficient solution.
Comment #6
csc4 commentedThanks so much for the heads up (and sorry for my previous post being truncated).
Embarrassingly I was there - but had forgotten point 3- the user in question was using columns.
I still think in the best of all possible worlds it would be nice to let the users choose with a check box in their mysite setup...
Comment #7
agentrickardTrue, but that might also be creeping featurism. http://en.wikipedia.org/wiki/Creeping_featurism
The system was designed to have pluggable Layouts to address specific needs. I've had other user's complain about the presence of the Profile page link. The solution is either:
1) Have settings for every item on a layout.
2) Encourage people to use the API code to modify their installation.
There is a #3, which is "do #2 until I get around to #1."
New features, btw, only go into the v5 branch, so I've updated the status again.
Comment #8
agentrickardComment #9
agentrickardA profile.inc has been committed to HEAD and solves this issue.
Comment #10
agentrickardRelease in 5.x.2-beta3