Topic: GetProfile of all users

I need to generate profiles of all users on a single page. What DB query should I make and how do I do that?

Re: GetProfile of all users


create an instance of the user db for later use. … in.php#L22

Using View::factory to output the content or you could loop through the result and create HTML … #L222-L226

The actual Select statement but without values, so returning all … n.php#L224

Select class with example statements … #L427-L435

Have a look through other Plugins to see more examples of the Select statement in use.

Re: GetProfile of all users

I was able to generate individual profile of each user. Well, that will suffice for now. Now there is one more thing I need to do: "create a upload image" field in each user's profile so that when they upload the image, the links is saved in ther users database. Is there a way to do it? I've created the file upload php script, which works independently, but I don't know a way to integrate it to the monstra system for each user.

Re: GetProfile of all users


You could simply rename the image to something like avatar-#.jpg where # is the user  id value... If that's what your trying to achieve and security obscuration is not an issue.

If you definatly want to store the name of a file in the user db, you will need to add a new field:

$users = new Table('users');

See db scheme for existing fields: … ase-schema

You will need to add some script for saving the file via the upload and modify the box/Users Plugin to allow usage and saving  of the link to db if you go that route.

If you do modify the User Plugin you will have to be careful of future Monstra updates that could undo your changes.

Re: GetProfile of all users

Okay, that helped to some extent @will. Is there a simple way to use "select" html tag and store the values in user database? I know I need to edit the edit.view.php file in box/users/frontend. But I want to know the way to display the current selection and storing the new one.