Advertisement:

Get all members and save into Array?

Aloittaja bobdole2281, elokuu 19, 2013, 01:44:38 AP

« edellinen - seuraava »

Sir Osis of Liver


Hmm, looks like this isn't necessary either -



     settype($members,"array");



When in Emor, do as the Snamors.
                              - D. Lister

emanuele

Lainaus käyttäjältä: Krash. - elokuu 20, 2013, 12:45:48 AP
That only works if you have an idea which member you're looking for.  If OP wants a complete, scrollable list of all members that users can select from, that's a whole different magilla.
And depending on the size of the forum, it may be as useless as the autosuggest (imagine scrolling a bow with all the users (in one single page) of this forum).


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Arantor

Which is why I wanted to know what the OP is actually trying to achieve with a list of all the members because of all these things...

You know, it's almost like I'm an Analyst/Programmer. Oh wait...
Holder of controversial views, all of which my own.


emanuele

Lainaus käyttäjältä: Arantor - elokuu 20, 2013, 08:46:05 AP
You know, it's almost like I'm an Analyst/Programmer. Oh wait...
Stop doing your job! :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Arantor

You should see the company whose books I'm on. I'm *officially* listed as Code Monkey.
Holder of controversial views, all of which my own.


bobdole2281

Lainaus käyttäjältä: Arantor - elokuu 20, 2013, 08:46:05 AP
Which is why I wanted to know what the OP is actually trying to achieve with a list of all the members because of all these things...

You know, it's almost like I'm an Analyst/Programmer. Oh wait...


Good point. There are going to be way to many member to choose from. Is their a better way to have a user select a member? Like maybe a Search box?  Seems like way too much programming for a legit search bar though, am I wrong?

margarett

This
Lainaus käyttäjältä: Labradoodle-360 - elokuu 20, 2013, 12:40:09 AP
In which case...a better solution may be what SMF does for sending new PMs and other similar tasks that involve defining a specific member (or members), which is to put an input field with the JS suggestion object behind it.
Maybe?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

-sigh- This is why I'm trying to find out what you're actually trying to achieve, and you're making it incredibly difficult because you're fixated on how you think you have to do it.

So, just humour me... you're making a system to pick a user out of all the users on the site. What exactly are you planning on doing having picked a member through some methodology?
Holder of controversial views, all of which my own.


Sir Osis of Liver


Um, I know this is a stoopid suggestion, but why not use the existing Members feature?  Sounds like it pretty much does what you want.

When in Emor, do as the Snamors.
                              - D. Lister

bobdole2281

Lainaus käyttäjältä: Arantor - elokuu 20, 2013, 11:42:43 AP
-sigh- This is why I'm trying to find out what you're actually trying to achieve, and you're making it incredibly difficult because you're fixated on how you think you have to do it.

So, just humour me... you're making a system to pick a user out of all the users on the site. What exactly are you planning on doing having picked a member through some methodology?

I'm making a custom profile page. It will involve an awards system for each member through a program I developed. I need a way for the users to select a member.

Matthew K.

Knowing that, I would definitely suggest what I posted before...using SMF's JavaScript suggest object, similarly to PMs and such.
Lainaus käyttäjältä: Labradoodle-360 - elokuu 20, 2013, 12:40:09 AP
In which case...a better solution may be what SMF does for sending new PMs and other similar tasks that involve defining a specific member (or members), which is to put an input field with the JS suggestion object behind it.

Arantor

I wouldn't do it that way.

I'd personally have it set up to use their profile - if people want to select someone, the odds are they're going to do it from seeing their posts and clicking on their name.
Holder of controversial views, all of which my own.


Matthew K.

That's true, that would be a much more wise approach.

bobdole2281

Lainaus käyttäjältä: Labradoodle-360 - elokuu 21, 2013, 12:17:00 AP
Knowing that, I would definitely suggest what I posted before...using SMF's JavaScript suggest object, similarly to PMs and such.
Lainaus käyttäjältä: Labradoodle-360 - elokuu 20, 2013, 12:40:09 AP
In which case...a better solution may be what SMF does for sending new PMs and other similar tasks that involve defining a specific member (or members), which is to put an input field with the JS suggestion object behind it.

I am going to do it both ways. Basically changing the profile page, but that is a whole other question in which I will post a new thread about. How would I approach this javascript function you mentioned. It sounds perfect! Is their anymore information you have on it? Thanks a ton!

Arantor

No, the autosuggest is basically undocumented like most of the intricate stuff in SMF and for a single user account it's actually not as effective because it behaves in a very strange and slightly unreliable way (though I doubt many people actually knows where in SMF uses the auto suggester for a single username, rather than the multi-user name for PMs, there are 3 places buried in the guts)

Though I'd note that there's already multiple award systems as mods, I'd wonder why you need to reimplement things when they already handle it... including awarding them. Start with the closest thing to what you want (though I still have no real idea what you're trying to achieve anyway or why you seem somewhat determined to make it the most complex way possible...)

I don't think I'm going to be any more "help" at this point, best of luck with whatever it is you're trying to implement.
Holder of controversial views, all of which my own.


Advertisement: