Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+12 votes
2.1k views
in Plugins by
edited by

I really want to get started restructuring the User Profile Page, better design, easier to get an overview etc.

rahularyan did a great job with his themes, demo, however, it is still not clear for me how he is doing it.

I checked qa-page-user-profile.php and saw that all the data is coming by $qa_content['form_profile']. However, in the qa-theme-base.php I cannot find any class that lets me change the style and reposition elements.

So how to tweak the page?

The hard way would be to read-in all the data from $qa_content['form_profile'] and then output it with own elements. From the demo of rahularyan's site (see HTML) I would say that is exactly what he is doing. It seems he has created his own layout completely and is reading in the data into it.

 

---

 

Edit: As I said the hard way is reading all values in, you can do it like that (outputting them into the theme):

                $this->output($content['form_profile']['fields']['duration']['label']);
                $this->output($content['form_profile']['fields']['duration']['value']);
                $this->output('<br />');
                $this->output($content['form_profile']['fields']['level']['label']);
                $this->output($content['form_profile']['fields']['level']['value']);
                $this->output('<br />');
                $this->output($content['form_profile']['fields']['lastlogin']['label']);
                $this->output($content['form_profile']['fields']['lastlogin']['value']);
                $this->output('<br />');
                $this->output($content['form_profile']['fields']['lastwrite']['label']);
                $this->output($content['form_profile']['fields']['lastwrite']['value']);
                $this->output('<br />');
                $this->output($content['form_profile']['fields']['name']['label']);
                $this->output($content['form_profile']['fields']['name']['value']);
                $this->output('<br />');
                $this->output($content['form_profile']['fields']['location']['label']);
                $this->output($content['form_profile']['fields']['location']['value']);
                $this->output('<br />');
                $this->output($content['form_profile']['fields']['website']['label']);
                $this->output($content['form_profile']['fields']['website']['value']);
                $this->output('<br />');
                $this->output($content['form_profile']['fields']['about']['label']);
                $this->output($content['form_profile']['fields']['about']['value']);

etc.

 

---

 

Update Sep 2014: I was able to tweak the profile page a bit more, this is the current result:

Q2A version: 1.6.3

2 Answers

+5 votes
by

Search qa-theme-base.php for reorder and you'll find various functions that might help.

by
Thx. I found function reorder_parts(), function form_reorder_fields(), function form_reorder_buttons().

However, as far as I see the table structure and everything related to the design cannot be changed. I guess I need to extract the data / or do queries accordingly and then output my own theming.
by
Yes, that sounds right.
+3 votes
by

That was kind of tough...  this is my first simplified result:

 

1. Lithuanian interface with q2apro theme:

screenshot

 

2. English interface with q2a default theme:

en

by
Can you share your results / findings here?
by
I have remodeled the user page again, now with recent answer list, screenshot: http://www.question2answer.org/qa/?qa=blob&qa_blobid=9316844799303601909
by
may be he is asking about the code ref. :P
by
Can you please share the steps or some instructions here?????
...