Adding A New Function?

Started by zoolman, February 21, 2011, 05:08:51 AM

Previous topic - Next topic

Arantor

Look at $memberContext['avatar']['href']
Holder of controversial views, all of which my own.


zoolman

Thanks. How did I miss that. It's now working.

zoolman

Sorry I think my brain has finally given in on all this. My custom array was built like this:

$context['post_approve'] = array( 'id_member' => $row['id_member'], 'comment' => $row['comment'] .....etc.....

I decided what I wanted to do was this:

$context['post_approve'][$row['id_member'] = array('comment' => $row['comment'], .....etc.....

The "etc" bits are just the other fields like real_name, avatar, etc

However, this has screwed up my foreach loops and I can't get my head round how to adjust them. Any help appreciated.

Arantor

Would be useful to see some of the other foreach loops...
Holder of controversial views, all of which my own.


zoolman

I solved the problem in a different way without changing the array layout.

This mod is now finished with. I'm not going to release it as it's for too specific a requirement and has too much hard coded in it. It just wouldn't be of any use to anyone. However, everything I've learnt from this will now help with the rsvp mod which I will be releasing in due course.

Thanks for all the help.

Advertisement: