Jump to content
DevFuse Forums

Scum

Members
  • Posts

    6
  • Joined

  • Last visited

Previous Fields

  • IP.Board Version
    IPB 3.0.x

Scum's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks for the reply MPFF, forgive me if I misunderstand but it seems to me your are suggesting I do an sql query to retreive the data I want every time the hook is run. Rather than running another query I was hoping I would be able to hook into the original page query results. Here is the skin code I am hooking into on Global->userInfoPane... <if test="authorcfields:|:$author['custom_fields'] != """> <foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data"> <foreach loop="customFields:$author['custom_fields'][ $group ] as $field"> <if test="$field != ''"> <li> {$field} </li> </if> </foreach> </foreach> </if> Literally all I need is a single custom field entry from here passed to my hook. If I query every member when the hook is run then that will result in many extra sql queries per page view. All I want to do is pass that specific custom field to the hook... That said, I'm going to try the above and see if it mysteriously references the current member and populates the array without needing to do anything, although I don't see how it would without running another query or passing some sort of reference from within a hook call. Really appreciate the advice, I've been coding PHP for a good while but this is a complicated beast with little documentation :P Cheers!
  2. Bumpety bump? Is this the right forum for this question? perhaps I'm aiming beyond the scope of a mere hook. In summary I'm simply trying to pass each users custom field to a display hook. I.e. under my Group on the left here <------------ I pass the group to the hook and the hook displays based on the value.
  3. Repeating monthly goals would be an awesome addition.
  4. Hi folks, I'm coding a hook which takes a custom field per user and uses it to retreive data from an external source. The official IPB forums seem very short on coding advice so I'm asking here instead... So I'm familiar now with retreiving a member (http://resources.invisionpower.com/index.php?appcomponent=cms&module=articles&article=7533) However, from within a hook that would surely be a big waste of mysql queries retreiving a particular member per page. What I want to do is query $this user that I am currently hooked into.... so my hook is in the profileinfopane (just to the left of every post). I'm hooking to the end of the user_details query. Really what I want to do is be able to query that current user from within my hook class OR pass the custom field entry from the skin as a parameter to my hook. Any help would be much appreciated! PS - The donation plugin is awesome, best IPB purchase I've ever made! :)
×
×
  • Create New...