Jump to content


Welcome to DevFuse Forums


Sign In  Log in with Facebook

Create Account
Welcome to DevFuse Forums, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of DevFuse Forums by signing in or creating an account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.
 
Guest Message by DevFuse

Tutorial info Visit support topic

  • Added on: Dec 29 2010 06:37 PM
  • Views: 3851
 


Make user profile horizzontal in topic view

Posted by najaru on Dec 29 2010 06:37 PM
The purpose of this tutorial is to eliminate, in the topic view, block the user profile in left with the other additional information, then put him (only partly) in the line containing the username.
The result is similar to that in current skinbox skin, or it can be seen in the bottom screenshots.
Which advantages this view? None, but can sometimes alleviate the unnecessary information, and can certainly be appreciated by lovers of essential graphics and optimized.
In fact, with this system will lead to a significant increase in space for the post, a reduction of user information (so that they are all visible in the popup window that appears when you click on the icon to the right of the name), all certainly very useful in skin narrow fixed width and / or additional side sidebar is always visible so that takes up space.

1) First you must open the topicviewtemplate and move the code that calls the template userinfopane, by going on line to enter the user name.
try and cut:
{parse template="userInfoPane" group="global" params="$post['author'], $post['post']['pid'], array()"}

and add after:
<span class="author vcard">
       
<a class="url fn" href='{parse url="showuser={$post['author']['member_id']}" base="public" template="showuser" seotitle="{$post['author']['members_seo_name']}"}'>{$post['author']['members_display_name']}</a>{parse template="user_popup" group="global" params="$post['author']['member_id'], $post['author']['members_seo_name']"}</span>
                        <else />
                            {$post['author']['members_display_name']}
                        </if>


1b) repeat the same procedure in the template Private Message - showConversation


2) then we're going to minimize the information displayed by the template userinfopanel, leaving only the avatar, the user group, and add custom fields but care should be monitored carefully because, when viewed in its entirety, should be to break line. It is therefore recommended first to disable all the display, then turn it back one at a time by checking the effect obtained. The advice is to make them appear only as small icons (20x20px).
Then open the userinfopane (in globalTemplate) delete all and insert the following code:

{$author['_group_formatted']}
        <if test="avatar:|:$author['member_id'] AND $author['avatar']">
            <a href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}">{$author['avatar']}</a>
        <else />
            {$author['avatar']}
        </if>

    <if test="authorcfields:|:$author['custom_fields'] != """>
            <foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data">
                <foreach loop="customFields:$author['custom_fields'][ $group ] as $field">
                    <if test="$field != ''">
                       
                            {$field}
                       
                    </if>
                </foreach>
            </foreach>
        </if>

This configuration allows you to display and then also add custom fields.
If you want to give them enough to remove the following code in the new infouserpanel

<if test="authorcfields:|:$author['custom_fields'] != """>
            <foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data">
                <foreach loop="customFields:$author['custom_fields'][ $group ] as $field">
                    <if test="$field != ''">
                       
                            {$field}
                       
                    </if>
                </foreach>
            </foreach>
        </if>




4) you will also notice that the post continues to be viewed with a large left margin. To go back to the left in ipb_style.css find:

.post_body {
    .....
.
.
.
.

}

and change the parameter margin-left: to a minimal level desired, usually 5-10px

then find
h3 img {
        margin-top: -2px;
               
         }
and replace with:
h3 img {
        margin-top: -2px;
                max-width: 40px;
                max-height: 40px;
               
         }
(you can change 40px with your preferred dimensions

The result:

Posted Image

Demo: http://www.invisionita.it/forum

Attached Thumbnails

  • newprof.jpg

Powered by Tutorials 1.5.1 © 2016, by Michael McCune