Search for users and display profile image...How???

I want people to be able to search for users and have the users profile image come up next to each user name.

I have been looking through CGridView straight from the autogenerated code but I can’t get the CLinkColumn class to work…the imageUrl property appears to be static…ie: can’t be set dynamically.

The other option I looked at was to use CListView…but I’m not sure how to search using this?

Does anyone have any info on how to manage this?

Cheers

Tom

Hi Tommo,

I understand that from your location, Yii Page Search is broken, right? Hm… must open a bug ticket and inform Dev Team about it…

Immediately after reading your post, I moved my mouse pointer to the right top corner of this page, clicked with left mouse button in the field I found there (it is marked with an icon representing magnifying glass) then I used my keyboard to enter these two words to this field: image column and… you know what… surprisingly these forum topics pop up:

  • Displaying an image in CDataColumn
  • CGridView show images in column
  • how to show image in CGridView column filter

It took me exactly ten seconds! Ten or even times less then writing this answer to you and probably ten or even more times less then it took you to write that question.

In general: It is possible to display one or many images in CGridView, but as more experienced users stated often for complex purposes like this it is worth considering using CListView, where each row is generated basing on provided view file so it thousand times more flexible and lets you do virtually anything.

It would have taken you much less time to simply answer the question… what a waste of space <_<

Two of those links you posted don’t even come close to addressing the question.

Oh!.. and guess what?

And what, if the same question will be asked by ten users? We should write answer ten times instead of sent them to use search? Wouldn’t that be a waste of time?

And what about common behaviour of many, many,. many (if not most/all of them) forums, where users are asked to use search BEFORE they ask already answered question?

I am not impressed.

Maybe I have been using forum software for way too long, but I can spot a /#%& from miles away.

The only thing wasted here is our breath on you.

Trejder took the time to help you help yourself, unlike a lot of other people who just skips answering your post.

And you flame him for doing so?

That is pathetic.

Change your attitude, dude.

None of us are getting paid for answering questions on this forum. ;)

And, yes:

The search sucks.

jacmoe – thanks for supporting me! :]

And – most of all – SO GOOD to have you back! :]

And for the people not understanding, what forum search is for… let’s just CValidator.skipOnError on them! :]

Cheers,

Trejder