I can add blocks to user page, but there is still some stuff which I'd like to arrange in a different way, e.g Send this user a message, Add this user as friend, etc...
How can I cut print $user_profile; to a smaller pieces ?
Thanks!

Comments

benone’s picture

Any ideas ?

benone’s picture

I understand there is no choice.
can someone recommend a good reading , which can clearly explain with examples, how to start using preprocess ?
I read that one on drupal.org and still don't know how to get user registration date into variable..

Canine Coaches’s picture

I am not entirely clear as to what you are trying to do, but have you tried panels? homebox? You have posted 3 times in 3 days with almost no information as to what you are using, and exactly what you are trying to do. All the information you need is out there. If not on this site try a google search. There are hundreds (if not more) resources for learning to use drupal. There are also usually at least 3 ways to do anything you want, so if the module you are using doesn't work, try a different approach. If you really need help you need to post more than 2 lines.

Chris

benone’s picture

Ok. Thank you for your response.
My first question was about contemplate for user page.
I think that panels are overloaded, there is to much theory for really simple tasks.
I just want to have the same possibility for user page as for nodes.
Contemplate is really good concept and I've been using it for a long time.
When I saw what Advanced Profile Kit did and what modules it requires I was simply scared.

So third day reading and I still don't know how to get for example user register date, which originaly is a variable for profile tpl file.
I thought there is maybe simple solution to get those variables for printing in tpl.
That's all I wanted to know.
Sorry if my questions where not clear. They are just a kind of mirror of my 3 days self-learning attempts. :(

Canine Coaches’s picture

Totally understand your frustration. Check out http://mustardseedmedia.com they have great podcast on theming. You can do much more by editing the theme than you can with any module. My experience with contemplate is very minimal so I cannot help specifically with that. If you check out the podcasts above I think you can do what you want. There is one on user profiles (using core) but it will show you how to find the variables you need and work with them (e.g. add them to content profile). This is not exactly what you're looking for, but it will get the job done and help you build your skills and knowledge as you work through it. Hope this helps, feel free to post back additional questions.

Chris

benone’s picture

hey, it's just $account variable needed. thx for recommending the video.
so , why not to implement that to contemplate ?
it works exactly the same way, isn't it ?

for those who read this obvious topic and want to do the same:

if you want to have your user page html markup created by YOU, you must:

1) copy user-profile.tpl.php from /modules/user to your_theme/
2) clear cache
3) edit the file and add: print '<pre>'. print_r($account) .'</pre>';
after this step you will get the same variables view, which normally contemplate gives you in a Body Variables area. Not exactly the same, because you need to construct your variable by yourself. Conteplate gives you the deepest level of each array in a different color and linked, so it's easy to find what you need. For example: $node->links['nodequeue-ajax-toggle nodequeue-toggle-q-1 nodequeue-toggle-sq-1 nodequeue-toggle-ref-1']['title'] - this is what contemplate gives you, and you must only use it.

For user page you need to do it by yourself going down deep to the array and you will find the same. So to get the text how long time ago user registered you need to paste this into user-profile.tpl.php file:
print $account->content[summary][member_for]['#value'];

4) save, refresh, enjoy creating your markup with any variables you want :)

MY QUESTION and request:

Can it be implemented to contemplate ?