Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: jsx on November 25, 2018, 07:22:59 AM

Title: Change the location of the user profile
Post by: jsx on November 25, 2018, 07:22:59 AM
Hi,

I want to move this user profile to the right side. How to do it? I use this theme Mr.Truckman (https://custom.simplemachines.org/themes/index.php?lemma=2754)

(https://i.imgur.com/5nqR7Fu.png)
Title: Re: Change the location of the user profile
Post by: Gary on November 25, 2018, 07:30:25 AM
You should be able to get away with changing the floats from left to right in the div#upper_section div.user related elements in index.css.
Title: Re: Change the location of the user profile
Post by: jsx on November 25, 2018, 12:28:21 PM
This is the code, I changed "float" to right and this solution does not work correctly.

div#upper_section div.user
{
color:#999;
width: 50%;
float: left;
overflow: auto;
}
div#upper_section div.user p
{
float: left;
margin: 0 1em 1em 0;
padding: 0;
}
div#upper_section div.user ul
{
margin: 0;
padding-left: 10px;
}
div#upper_section div.user ul li
{
margin-bottom: 2px;
}
div#upper_section div.news p
{
display: inline;
}
div#upper_section div.news form
{
padding-bottom: 10px;
}


(https://i.imgur.com/XXTOVyT.png)

(https://i.imgur.com/6av9xTH.png)
Title: Re: Change the location of the user profile
Post by: Sir Osis of Liver on November 25, 2018, 04:36:17 PM
Which theme is it?  You may have to tinker with width: 50%.  Add a border so you can see the div.
Title: Re: Change the location of the user profile
Post by: jsx on November 25, 2018, 05:08:12 PM
This is the theme:

https://custom.simplemachines.org/themes/index.php?lemma=2754

Title: Re: Change the location of the user profile
Post by: Sir Osis of Liver on November 25, 2018, 05:23:52 PM
Have you removed the search feature right side?
Title: Re: Change the location of the user profile
Post by: Sir Osis of Liver on November 25, 2018, 05:39:15 PM
Try this -

index.css



/* Styles for the basic search section.
------------------------------------------------- */

#search_form
{
display: none;
}





div#upper_section div.user
{
color:#999;
width: auto;
float: right;
overflow: auto;
}




Title: Re: Change the location of the user profile
Post by: jsx on November 26, 2018, 05:03:05 AM
Quote from: Sir Osis of Liver on November 25, 2018, 05:23:52 PM
Have you removed the search feature right side?

Yes, I removed this code in index.template.php file. In the folder Mr.Truckman.

echo '
</div>
<div class="news normaltext">
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />&nbsp;
<input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';


So I have to change this code for the search engine in css?

I changed the data in div#upper_section div.user and now the profile is constricted, how can I extend it?

(https://i.imgur.com/dGAesvm.png)
Title: Re: Change the location of the user profile
Post by: jsx on November 26, 2018, 09:05:28 AM
I set width 30% and the profile is no longer constricted.

(https://i.imgur.com/t5eMfIb.png)
Title: Re: Change the location of the user profile
Post by: Sir Osis of Liver on November 26, 2018, 11:42:32 AM
Set width: auto, it will accommodate long user names.
Title: Re: Change the location of the user profile
Post by: jsx on November 27, 2018, 04:55:39 AM
Quote from: Sir Osis of Liver on November 26, 2018, 11:42:32 AM
Set width: auto, it will accommodate long user names.

When I set the "width: auto" this profile looks like this again:

(https://i.imgur.com/dGAesvm.png)
Title: Re: Change the location of the user profile
Post by: Sir Osis of Liver on November 27, 2018, 03:50:14 PM
That shouldn't happen if you use the code I posted above.  May have something to do with the way you removed search.  Cleaner to remove it with css than editing the template.
Title: Re: Change the location of the user profile
Post by: jsx on November 28, 2018, 08:39:20 AM
I changed the theme. Now I'm using the "Express" theme from ex DzinerStudio.

This is a user profile:

(https://i.imgur.com/ZkSOmYu.png)

This is the code in which this profile is:

#site_login {
position: absolute;
top: 25px;
right: 0;
font-size: 12px;
width: 350px;
height: 80px;
overflow: hidden;
}
#site_login ul.logged_out {
margin: 10px 0 0;
padding: 0;
}
#site_login ul.logged_out li {
float: left;
list-style: none;
margin: 0;
padding: 0 0 0 8px;
}
#site_login ul.logged_out li a {
height: 42px;
width: 165px;
display: block;
float: left;
outline: 0;
}
#site_login ul.logged_out li a.login {
background: url(../images/custom/login.png) no-repeat;
}
#site_login ul.logged_out li a.register {
background: url(../images/custom/register.png) no-repeat;
}
#site_login ul.logged_in {
margin: 0;
padding: 0 5px 0 15px;
float: right;
}
#site_login ul.logged_in li  {
list-style: none;
padding: 0;
margin: 0;
font-weight: bold;
}
#site_login ul.logged_in li a.dot {
background: url(../images/custom/list_arrow.png) 0 50% no-repeat;
padding: 0 5px 0 10px;
color: #1c1c1c;
}
#site_login ul.logged_in li.greeting {
color: #eee;
font-size: 14px;
padding: 4px 0;
}
#site_login ul.logged_in li.notice, #site_login ul.logged_in li.notice a {
color: #c43a00;
}
p.ds-avatar {
float: right;
padding: 0;
margin: 5px 0 0;
}
.ds-avatar img {
width: 50px;
height: 50px;
}


When I enter these longer lines:

Show unread posts since last visit
Show new replies to your posts

(https://i.imgur.com/ymS4xcP.png)

Then the avatar disappears, what should I change in the code so that the avatar stays in place? And how to set the display of these lines one below the other?

Exactly:

> Show unread posts since last visit
> Show new replies to your posts

I am asking for help. :)
Title: Re: Change the location of the user profile
Post by: Sir Osis of Liver on November 28, 2018, 10:49:00 AM
Don't have DS Express, believe that was a premium theme.  You'll have to add a linebreak in index.template.php.
Title: Re: Change the location of the user profile
Post by: jsx on November 28, 2018, 12:00:27 PM
Yes, this is the premium theme I bought a long time ago.

Someone will help me?
Title: Re: Change the location of the user profile
Post by: Sir Osis of Liver on November 28, 2018, 09:57:00 PM
Quote from: Sir Osis of Liver on November 28, 2018, 10:49:00 AM
You'll have to add a linebreak in index.template.php.

Title: Re: Change the location of the user profile
Post by: jsx on November 29, 2018, 01:59:13 AM
I am asking for a solution. Because I do not know what to do exactly.
Title: Re: Change the location of the user profile
Post by: Sir Osis of Liver on November 29, 2018, 03:26:36 PM
Attach your index.template.php.
Title: Re: Change the location of the user profile
Post by: jsx on November 30, 2018, 07:05:34 AM
Okay, I added an attachment.
Title: Re: Change the location of the user profile
Post by: Gwenwyfar on November 30, 2018, 05:19:16 PM
Find this:

<li><a class="dot" href="', $scripturl, '?action=unread">', $txt['view_unread'], '</a>
<a class="dot" href="', $scripturl, '?action=unreadreplies">', $txt['view_replies'], '</a></li>


Change it to:

<li><a class="dot" href="', $scripturl, '?action=unread">', $txt['view_unread'], '</a></li>
<li><a class="dot" href="', $scripturl, '?action=unreadreplies">', $txt['view_replies'], '</a></li>
Title: Re: Change the location of the user profile
Post by: jsx on December 01, 2018, 10:11:43 AM
Gwenwyfar thank you for your help.