vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Customization Options Button between Sidebar and Member List Link and Username (https://vborg.vbsupport.ru/showthread.php?t=292804)

Amaury 12-09-2012 03:24 PM

Customization Options Button between Sidebar and Member List Link and Username
 
Is it possible to move the Customization Options / Hide User Customizations / Show User Customizations button here and have it centered between those areas?

I know where where the code for it is in the MEMBERINFO template, I just don't know how to get it in that area and center it.

http://i101.photobucket.com/albums/m...atsProfile.png

WorldCraft 12-09-2012 09:27 PM

Step 1: remove the 'floatright' class from the button and wrap the entire <vb:if> </vb:if> in div tags

Step 2: add style="text-align:center;" to the div tag you made

Step 3: place the entire div one line under this div
HTML Code:

                <div class="profile_widgets member_summary userprof_moduleinactive userprof_moduleinactive_border<vb:if condition="$stylevar['textdirection'] == 'ltr'"> sidebarleft</vb:if>" id="sidebar_container">

Below is how it should look.


HTML Code:

                <div class="profile_widgets member_summary userprof_moduleinactive userprof_moduleinactive_border<vb:if condition="$stylevar['textdirection'] == 'ltr'"> sidebarleft</vb:if>" id="sidebar_container">
<!--Place button below-->
<div style="text-align:center;">
                                <vb:if condition="$show_customize_profile">
                                        <button class="userprof_button hidden" id="profile_customization_button"><img src="{vb:stylevar imgdir_misc}/userprofile/paintbucket_icon.png" alt=""/>&nbsp;{vb:rawphrase customize_my_profile}</button>
                                <vb:else />
                                        <vb:if condition="$show['userhastheme']">
                                                <form action="{vb:link member, {vb:raw userinfo}}" method="get" id="profile_swap_form" class="floatright">
                                                        <input type="hidden" name="do" value="swapcss" />
                                                        <input type="hidden" name="u" value="{vb:raw prepared.userid}" />
                                                        <input type="hidden" name="token" value="{vb:raw bbuserinfo.securitytoken}" />
                                                        <input type="submit" tabindex="1" name="swapcss" value="{vb:raw usercss_switch_phrase}" class="userprof_button" id="profile_swap_button" />
                                                </form>
                                        </vb:if>
                                </vb:if>
</div>


Amaury 12-09-2012 09:54 PM

Quote:

Originally Posted by WorldCraft (Post 2389596)
Step 1: remove the 'floatright' class from the button and wrap the entire <vb:if> </vb:if> in div tags

Step 2: add style="text-align:center;" to the div tag you made

Step 3: place the entire div one line under this div
HTML Code:

        <div class="profile_widgets member_summary userprof_moduleinactive userprof_moduleinactive_border<vb:if condition="$stylevar['textdirection'] == 'ltr'"> sidebarleft</vb:if>" id="sidebar_container">
Below is how it should look.


HTML Code:

        <div class="profile_widgets member_summary userprof_moduleinactive userprof_moduleinactive_border<vb:if condition="$stylevar['textdirection'] == 'ltr'"> sidebarleft</vb:if>" id="sidebar_container">
<!--Place button below-->
<div style="text-align:center;">
                <vb:if condition="$show_customize_profile">
                    <button class="userprof_button hidden" id="profile_customization_button"><img src="{vb:stylevar imgdir_misc}/userprofile/paintbucket_icon.png" alt=""/>&nbsp;{vb:rawphrase customize_my_profile}</button>
                <vb:else />
                    <vb:if condition="$show['userhastheme']">
                        <form action="{vb:link member, {vb:raw userinfo}}" method="get" id="profile_swap_form" class="floatright">
                            <input type="hidden" name="do" value="swapcss" />
                            <input type="hidden" name="u" value="{vb:raw prepared.userid}" />
                            <input type="hidden" name="token" value="{vb:raw bbuserinfo.securitytoken}" />
                            <input type="submit" tabindex="1" name="swapcss" value="{vb:raw usercss_switch_phrase}" class="userprof_button" id="profile_swap_button" />
                        </form>
                    </vb:if>
                </vb:if>
</div>


Is this good? I just copied and pasted your code to make it easier and save time.

http://i101.photobucket.com/albums/m...MEMBERINFO.png

WorldCraft 12-09-2012 10:03 PM

No, you need to delete the button from its original position, and find
HTML Code:

<div class="profile_widgets member_summary userprof_moduleinactive userprof_moduleinactive_border<vb:if condition="$stylevar['textdirection'] == 'ltr'"> sidebarleft</vb:if>" id="sidebar_container">
in the template (it's somewhere up above) and place the button with the centered div under it.

If you would prefer, you can copy paste your template here and I'll make the change for you.

Amaury 12-09-2012 10:12 PM

Quote:

Originally Posted by WorldCraft (Post 2389604)
No, you need to delete the button from its original position, and find
HTML Code:

<div class="profile_widgets member_summary userprof_moduleinactive userprof_moduleinactive_border<vb:if condition="$stylevar['textdirection'] == 'ltr'"> sidebarleft</vb:if>" id="sidebar_container">
in the template (it's somewhere up above) and place the button with the centered div under it.

If you would prefer, you can copy paste your template here and I'll make the change for you.

I usually understand template changes when it's something like "find this" and "change it to this." For some reason, I'm just not understanding this. It's me, the way you're explaining it, or both. XD

It's not letting me post the template here. It's 2,568 character too long.

I can create you a temporary admin account, though, if you want and PM you the details. You'd just need access to styles, right?

WorldCraft 12-09-2012 10:21 PM

Sorry, this may be an easier explanation. :P

Find
HTML Code:

<div class="profile_widgets member_summary userprof_moduleinactive userprof_moduleinactive_border<vb:if condition="$stylevar['textdirection'] == 'ltr'"> sidebarleft</vb:if>" id="sidebar_container">
Add one line below
HTML Code:

<div style="text-align:center;">
                <vb:if condition="$show_customize_profile">
                    <button class="userprof_button hidden" id="profile_customization_button"><img src="{vb:stylevar imgdir_misc}/userprofile/paintbucket_icon.png" alt=""/>&nbsp;{vb:rawphrase customize_my_profile}</button>
                <vb:else />
                    <vb:if condition="$show['userhastheme']">
                        <form action="{vb:link member, {vb:raw userinfo}}" method="get" id="profile_swap_form" class="floatright">
                            <input type="hidden" name="do" value="swapcss" />
                            <input type="hidden" name="u" value="{vb:raw prepared.userid}" />
                            <input type="hidden" name="token" value="{vb:raw bbuserinfo.securitytoken}" />
                            <input type="submit" tabindex="1" name="swapcss" value="{vb:raw usercss_switch_phrase}" class="userprof_button" id="profile_swap_button" />
                        </form>
                    </vb:if>
                </vb:if>
</div>

Just make sure to backup or comment out the original button should you need to restore it.

If you do need more help just send me a PM and I'll take a look at it for you.

Amaury 12-09-2012 10:34 PM

Quote:

Originally Posted by WorldCraft (Post 2389608)
Sorry, this may be an easier explanation. :P

Find
HTML Code:

<div class="profile_widgets member_summary userprof_moduleinactive userprof_moduleinactive_border<vb:if condition="$stylevar['textdirection'] == 'ltr'"> sidebarleft</vb:if>" id="sidebar_container">
Add one line below
HTML Code:

<div style="text-align:center;">
                <vb:if condition="$show_customize_profile">
                    <button class="userprof_button hidden" id="profile_customization_button"><img src="{vb:stylevar imgdir_misc}/userprofile/paintbucket_icon.png" alt=""/>&nbsp;{vb:rawphrase customize_my_profile}</button>
                <vb:else />
                    <vb:if condition="$show['userhastheme']">
                        <form action="{vb:link member, {vb:raw userinfo}}" method="get" id="profile_swap_form" class="floatright">
                            <input type="hidden" name="do" value="swapcss" />
                            <input type="hidden" name="u" value="{vb:raw prepared.userid}" />
                            <input type="hidden" name="token" value="{vb:raw bbuserinfo.securitytoken}" />
                            <input type="submit" tabindex="1" name="swapcss" value="{vb:raw usercss_switch_phrase}" class="userprof_button" id="profile_swap_button" />
                        </form>
                    </vb:if>
                </vb:if>
</div>

Just make sure to backup or comment out the original button should you need to restore it.

If you do need more help just send me a PM and I'll take a look at it for you.

I actually wanted it outside of the sidebar under the Member List link, but that actually looks pretty good.

Now, how would I move it down a bit? It's going up right against the the border of the sidebar, and I don't want that. :)

http://i101.photobucket.com/albums/m...stomButton.png

WorldCraft 12-09-2012 10:40 PM

Add padding-top:5px (or however much you want) to the div's style.

Amaury 12-09-2012 10:44 PM

Quote:

Originally Posted by WorldCraft (Post 2389615)
Add padding-top:5px (or however much you want) to the div's style.

In the code you gave me?

Also, if you look here, the Hide / Show User Customizations button isn't centered like the Customization Options button.

Additionally, there's a duplicate like you said. Where's the code that I delete or comment out?

WorldCraft 12-09-2012 10:48 PM

Find this div around the button
HTML Code:

<div style="text-align:center;">
After change text-align:center; to text-align:center;padding-top:5px;

And the Customize buttons are not available for guests to see, but if you are talking about removing the original button, you just need to locate it in the template (where it was originally) and just delete it, or comment it out with <!-- old button code --> if you just want to hide it from displaying on the page.


All times are GMT. The time now is 11:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01856 seconds
  • Memory Usage 1,800KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (11)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete