This topic is locked
[SOLVED]

 How To Create User Profile Page Using Phprunner?

2/10/2013 6:42:10 PM
PHPRunner General questions
V
Vinice1981 author

I like the user profile page feature in this PHPrunner Forum.
Is there a way to create user profile page using PHPrunner?

I am using classified template to build my website.
example of user profile page as below:

http://www.asprunner.com/forums/user/21109-vinice/
Basic feature of user profile needed:

a) Find Post Function (same as PHPrunner Forum)

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=20655&image=1&table=forumtopics' class='bbc_emoticon' alt='B)' /> Comments (same as PHPrunner Forum)

c) User rating
Note 1:Registered user can rate and give comment to the user profile

Note 2:Guest user can only view the rating and comment of the user profile
Regards,

Vinice

Sergey Kornilov admin 2/11/2013

Yes, it's definitely possible though it will require some coding.
You will need to add two more tables to store comments and ratings for each user. Then you can use clusers table View page as a user profile page. Create Master-Details relationships between clusers (master) and clmain, comments and ratings (details). make sure those details are displayed on the View page of master table (clmain). This gives you an option to view all posts, comments and ratings that belong to any given user.

V
Vinice1981 author 2/12/2013

Hi Sergey

Thanks for your reply and sharing with us on user profile page creation.

Objective:To use clusers table View page as a user profile page.
Question 1: I did the step 1 as below to create Master-Details relationships between clusers (master) and clmain, clcomments and clratings (details), is it correct?
Step 1.1: Create Master-Details relationships between clusers (master) and clmain, clcomments and clratings (details).

table name1 (i.e. clusers) (master)= field name 1( i.e.comments) & field name 2 (i.e. ratings)

table name2 (i.e. clmain) (details)= field name 1( i.e.comments) & field name 2 (i.e. ratings)
Step 1.2: Create Master-Details relationships between clusers (master) and clmain, clcomments and clratings (details).

table name1 (i.e. clusers) (master)= field name 1( i.e.comments) & field name 2 (i.e. ratings)

table name3(i.e. clcomments) (details)= field name 1( i.e.comments)

table name4 (i.e. clratings) (details)= field name 2 (i.e. ratings)
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Question 2: Do we need to display any field of table clusers?

We need to hide the email, password & fullname of table clusers.
Info from Sergey:

" make sure those details are displayed on the View page of master table (clmain).
This gives you an option to view all posts, comments and ratings that belong to any given user. "
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Question 3:Can we add one more table cluserprofile instead of using clusers to be displayed to public?

table cluserprofile is to exclude sensitive info such as email, password and fullname.

Is it necessary to do so?
table name1 (i.e. clusers) (master)= field name 1( i.e.comments) , field name 2 (i.e. ratings)& field name 3 (i.e.username)

table name 5 (i.e. cluserprofile) (details)= field name 1( i.e.comments) , field name 2 (i.e. ratings)& field name 3 (i.e.username)
Security permission made as below:

default user for table name 5 (i.e. cluserprofile): add & view allowed

Guest user for table name 5 (i.e. cluserprofile): view allowed

Admin user for table name 5 (i.e. cluserprofile): add,view & edit allowed
0000000000000000000000000000000000000000000000000000000000000000000000000000
Question 4: What are the coding needed?
Regards,

Vinice
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Yes, it's definitely possible though it will require some coding.
You will need to add two more tables to store comments and ratings for each user. Then you can use clusers table View page as a user profile page. Create Master-Details relationships between clusers (master) and clmain, comments and ratings (details). make sure those details are displayed on the View page of master table (clmain). This gives you an option to view all posts, comments and ratings that belong to any given user.