• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Modifing/Rearranging Profile Tabs

dwdmadmac

Active member
#1
The template is member_view.
I understand that part @Brogan , however I wanted to re-arrrange the position of the profile tabs and when I did that this happened.

Permission was given for stats being displayed.

What am I missing? Is there more to it then just rearrange this bit?
Code:
        <div class="section primaryUserBlock">
            <ul class="tabs Tabs" data-panes="#ProfilePanes > li" data-history="on">
                <li><a href="{$requestPaths.requestUri}#info">{xen:phrase information}</a></li>
                <li><a href="{$requestPaths.requestUri}#profilePosts">{xen:phrase profile_posts}</a></li>
                <xen:if is="{$showRecentActivity}">
                                    <li><a href="{$requestPaths.requestUri}#recentActivity">{xen:phrase recent_activity}</a></li>
                                </xen:if>
                <li><a href="{$requestPaths.requestUri}#postings">{xen:phrase postings}</a></li>
                <xen:if is="{$warningCount}">
                                    <li><a href="{$requestPaths.requestUri}#warnings">{xen:phrase warnings} ({xen:number $warningCount})</a></li>
                                </xen:if>
                <xen:hook name="member_view_tabs_heading" params="{xen:array 'user={$user}'}" />
            </ul>
        </div>
 

Chris D

XenForo developer
Staff member
#2
Yes, there's more to it.

There's two parts.

The tabs, which is the bit you have posted above.

Then, the tab content.

You get a clue as to where the tab content is by this:

Code:
data-panes="#ProfilePanes > li"
You will find a container further down the page with an ID of "ProfilePanes". In that there will be a series of <li> elements. They directly correspond in position to the tabs. So if you change the tab position, then you must also move the corresponding section in the ProfilePanes container.

There is another aspect here...

Your profiles seem to contain some tabs that are added by add-ons. You won't be able to change their position by editing the member_view template. Only the default tabs.
 

dwdmadmac

Active member
#3
Yes, there's more to it.

There's two parts.

The tabs, which is the bit you have posted above.

Then, the tab content.

You get a clue as to where the tab content is by this:

Code:
data-panes="#ProfilePanes > li"
You will find a container further down the page with an ID of "ProfilePanes". In that there will be a series of <li> elements. They directly correspond in position to the tabs. So if you change the tab position, then you must also move the corresponding section in the ProfilePanes container.

There is another aspect here...

Your profiles seem to contain some tabs that are added by add-ons. You won't be able to change their position by editing the member_view template. Only the default tabs.
I did that, now profile page does not display at all.

Template Edit
http://pastebin.com/rqprdzWK
 

Chris D

XenForo developer
Staff member
#4
I would start by reverting the template to get it back to normal.

What did you move?

What is the end result you are hoping for?
 

Chris D

XenForo developer
Staff member
#6
It looks like the entire template is a mess.

All you need to do is move this bit:
Code:
<li><a href="{$requestPaths.requestUri}#info">{xen:phrase information}</a></li>
And this bit:
Code:
            <li id="info" class="profileContent">

                <xen:if hascontent="true">
                    <div class="section">
                        <h3 class="textHeading">{xen:phrase about}</h3>

                        <div class="primaryContent">
                            <xen:contentcheck>
                                <xen:if hascontent="true">
                                    <div class="pairsColumns aboutPairs">
                                    <xen:contentcheck>
                                        <xen:if is="{$user.gender}">
                                            <dl><dt>{xen:phrase gender}:</dt> <dd><xen:if is="{$user.gender} == 'male'">{xen:phrase male}<xen:else />{xen:phrase female}</xen:if></dd></dl>
                                        </xen:if>

                                        <xen:if is="{$birthday}">
                                            <dl><dt>{xen:phrase birthday}:</dt> <dd>{xen:date $birthday.timeStamp, $birthday.format} <xen:if is="{$birthday.age}">({xen:phrase age}: {xen:number $birthday.age})</xen:if></dd></dl>
                                        </xen:if>

                                        <xen:if is="{$user.homepage}">
                                            <dl><dt>{xen:phrase home_page}:</dt> <dd><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank">{xen:string censor, $user.homepage}</a></dd></dl>
                                        </xen:if>

                                        <xen:if is="{$user.location}">
                                            <dl><dt>{xen:phrase location}:</dt> <dd>{xen:string censor, $user.location}</dd></dl>
                                        </xen:if>

                                        <xen:if is="{$user.occupation}">
                                            <dl><dt>{xen:phrase occupation}:</dt> <dd>{xen:string censor, $user.occupation}</dd></dl>
                                        </xen:if>
                                       
                                        <xen:if is="{$customFieldsGrouped.personal}">
                                            <xen:foreach loop="$customFieldsGrouped.personal" value="$field">
                                                <xen:include template="custom_field_view" />
                                            </xen:foreach>
                                        </xen:if>
                                    </xen:contentcheck>
                                    </div>
                                </xen:if>

                                <xen:if is="{$user.about}"><div class="baseHtml ugc">{xen:raw $user.aboutHtml}</div></xen:if>
                            </xen:contentcheck>
                        </div>
                    </div>
                </xen:if>

                <div class="section">
                    <h3 class="textHeading">{xen:phrase interact}</h3>

                    <div class="primaryContent">
                        <div class="pairsColumns contactInfo">
                            <dl>
                                <dt>{xen:phrase content}:</dt>
                                <dd><ul>
                                    <xen:hook name="member_view_search_content_types">
                                    <li><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" rel="nofollow">{xen:phrase find_all_content_by_x, 'name={$user.username}'}</a></li>
                                    <li><a href="{xen:link search/member, '', 'user_id={$user.user_id}', 'content=thread'}" rel="nofollow">{xen:phrase find_all_threads_by_x, 'name={$user.username}'}</a></li>
                                    </xen:hook>
                                </ul></dd>
                            </dl>
                            <xen:if is="{$canStartConversation}">
                                <dl><dt>{xen:phrase conversation}:</dt> <dd><a href="{xen:link 'conversations/add', '', 'to={$user.username}'}">{xen:phrase start_conversation}</a></dd></dl>
                            </xen:if>
                            <xen:if is="{$customFieldsGrouped.contact}">
                                <xen:foreach loop="$customFieldsGrouped.contact" value="$field">
                                    <xen:include template="custom_field_view" />
                                </xen:foreach>
                            </xen:if>
                        </div>
                    </div>
                </div>
               
                <xen:if is="{$user.signature}">
                    <div class="section">
                        <h3 class="textHeading">{xen:phrase signature}</h3>
                        <div class="primaryContent">
                            <div class="baseHtml signature ugc">{xen:raw $user.signatureHtml}</div>
                        </div>
                    </div>
                </xen:if>

            </li>
 

dwdmadmac

Active member
#7
I added some sidebar bits into the info tab. Making it into an Overview tab and removing the sidebar on profile pages. (Assuming you was referring to that bit of as you called "mess".)

I tried that, when I said it made profile page blank, it was that edit that made it a blank page w/ header and footer showing only.
@Chris Deeming

Thanks Inadvanced. (y)
 

Chris D

XenForo developer
Staff member
#8
I think you ought to do one thing at a time,

Get the tabs in the right order first. Then once that is working, add the sidebar bits.

With so many changes it's too hard to ascertain what exactly is making it go wrong.