Jump to content

boardIndexOnlineUsers data hook


Michael

Recommended Posts

Can you change this data hook so that some more relevant data is exposed? Namely, it would be nice if we had an array of real data about the active users. All we actually get about the active users is an HTML link to their profile, we don't know their member group, and we'd have to do some trickeration on the HTML link to extract the member ID and/or name.

Here's a sample of what I get for data for this hook point on my localhost board:

Array

(

    [TOTAL] => 1

    [NAMES] => Array

        (

            [0] => <a href='http://localhost:8080/ipsdev/dev31/index.php?/user/1-michael/' title='Today, 01:01 AM'><span style='color:red;'>Michael</span></a>

        )


    [GUESTS] => 0

    [MEMBERS] => 1

    [ANON] => 0

    [text] => Our members have made a total of <b>25</b> posts<br />We have <b>2</b> registered members<br />The newest member is <b><a href='http://localhost:8080/ipsdev/dev31/index.php?/user/3-test/'>test</a></b>

    [posts] => 25

    [active] => 1

    [members] => 2

    [cut_off] => 15

    [info] => Array

        (

            [most_time] => 10 May 2010 - 02:32 PM

            [most_online] => 2

            [total_posts] => 25

            [mem_count] => 2

            [last_mem_seo] => test

            [last_mem_link] => http://localhost:8080/ipsdev/dev31/index.php?/user/3-test/

            [last_mem_name] => test

            [last_mem_id] => 3

        )


)


There's really not a whole lot of good data there that I can do anything with. I am asking for this because one of the most common requests I get on my mods is to bring back the Group Name Indicator's ability to sort active users based on the group sorting for the mod. Because I have no access to the group ID numbers of the active members, there's no way I could do this. The only conceivable way I could achieve this right now is to extract the member IDs from these links and then query for their groups, that's dreadfully inefficient. It would be nice if we just got raw data in this data hook that we could reorder, and then the actual construction of URLs was done either later in the source code or in the template.

Link to comment
Share on other sites

  • 1 month later...

+1 for your suggestion. Although I'm only about 75% understanding what you are asking I can see the usefulness of the data provided could be improved with your suggestions (as I 'can' see the workaround you suggested is highly likely to be resource intensive)

Link to comment
Share on other sites


Although I'm only about 75% understanding what you are asking...



What I'm asking is that they change this data hook to not create the full link to the active users profiles before sending this data to the hook. It would be better if they only had raw data about the active users (name, ID, group number, session running time, etc.) that they made available to data hooks instead of just a fully formed hyperlink to their profiles.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...