Advertisement:

Author Topic: Kindly request for 2 tips (footer css section+main page return in a header)  (Read 1492 times)

Offline rq82

  • Semi-Newbie
  • *
  • Posts: 11
Hi!

It's my 1st installation of SMF. I added a forum to my website. I use a SMF 2.0.12 with Reseller theme. It looks very well but I have got two issues.

1st issue is:
 
My forum is under URL mypage.com/forum and I would like to add a Return button in a header which would provide on my main page. There is only Home button which provide to the home page of the forum. I'd like to add a return button as a 1st, before Home. Is there any automatic function like this under the admin panel (i haven't found a one) or should I modify some file? Which one? And how?

2nd issue is:

I modified reseller.css file and now it looks like this:

Code: [Select]
img
{
   max-width: 100%;
   height: auto;
}
table, form, fielset
{
   max-width: 100%;
}
/* Navbar */
.navbar-default
{
   background-color: #26282b;
   border-color: #222427;
   border-bottom-width: 0;
   box-shadow: 0 -3px #222427 inset;
}
.navbar-default .navbar-collapse, .navbar-default .navbar-form
{
   border-bottom-width: 0;
   border-color: #222427;
}
.navbar-default .navbar-nav > li > a, .navbar-default .navbar-brand
{
   color: #FFF;
   font-weight: bold;
   font-family: "Segoe UI";
   text-shadow: 0 2px #1b1c1e;
}
.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus,
.navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus,
.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus
{
   color: #FFF;
   background-color: #2a3038;
   box-shadow: 0 -3px #272d35 inset;
}
@media (max-width: 768px) {
   .navbar-default .navbar-nav .open .dropdown-menu > li > a
   {
      color: #FFF;
   }
   .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus
   {
      color: #FFF;
      background-color: #2a3038;
      box-shadow: 0 -3px #272d35 inset;
   }
}
/* Header */
header
{
   background: #28333b;
   box-shadow: 0 -3px #39444b inset;
   padding: 20px 0;
}
@media (max-width: 970px) {
   header
   {
      text-align: center;
   }
}
header .btn
{
   font-size: 13px;
   font-family: "Segoe UI";
   font-weight: bold;
   letter-spacing: 1px;
   text-transform: uppercase;
   padding: 13px 20px 16px;
   -webkit-transition: all .5s;
    transition: all .5s;
}
header .btn-success
{
   background-color: #2ecc71;
   border-color: transparent;
   border-width: 0;
   box-shadow: 0 -4px #27ae60 inset;   
   text-shadow: 0 1px #27ae60;
}
header .btn-primary
{
   background-color: #34495e;
   border-color: transparent;
   border-width: 0;
   box-shadow: 0 -4px #2c3e50 inset;   
   text-shadow: 0 1px #2c3e50;
}
header .btn-success:hover, header .btn-success:focus, header .btn-success:active
{
   background-color: #2ecc71;
   border-color: transparent;
   border-width: 0;
   box-shadow: none;   
   padding-bottom: 13px;
}
header .btn-primary:hover, header .btn-primary:focus, header .btn-primary:active
{
   background-color: #34495e;
   border-color: transparent;
   border-width: 0;
   box-shadow: none;   
   padding-bottom: 13px;
}
header .modal-content
{
   -webkit-box-shadow: none;
   box-shadow: none;
   border: none;
}
header .modal-header
{
   border-bottom: 1px solid #34495e;
   background-color: #34495e;
   border-radius: 4px 4px 0 0;
}
header .modal-header h4
{
   color: #FFF;
}
header .modal-header .close
{
   text-shadow: none;
}
header .checkbox, header .form-control
{
   font-size: 13px;
}
header .avatar
{
   float: right;
   margin-left: 15px;
   width: 84px;
   height: 84px;
}
header ul.reset
{
   text-align: right;
}
header ul.reset li, header ul.reset li a
{
   color: #FFF;
   font-family: "Segoe UI";
   font-size: 12px;
}
header ul.reset li a:hover
{
   color: #0e3e5e;
   text-decoration: none;
}   
header ul.reset li.user
{
   font-size: 16px;
   font-weight: bold;
}
@media (max-width: 970px) {
   header ul.reset
   {
      text-align: center;
   }
   header .avatar
   {
      float: none;
   }
}
.breadcrumb
{
   margin-bottom: 0;
   background-color: #FFF;
   border-radius: 3px;
}
.breadcrumb > li > a
{
   color: #828282;
}
footer
{
   margin-top: 20px;
   background: #28333b;
   padding: 20px 0;
   text-align: center;
   box-shadow: 0 -7px #39444b;
   font-family: "Segoe UI";
}
footer, footer a
{
   color: #c9bab0;
}
.btn-group
{
   margin: 5px 0;
}
.display-info
{
   text-align: center;
   overflow: hidden;
}
.display-info h1
{
   font-size: 36px;
}
.display-info ul.info li
{
   float: left;
   font-size: 1.5em;   
   margin-left: 5px;
}
.display-info ul.info li.replies
{
   color: #5bc0de;
}
.display-info ul.info li.replies img, .display-info ul.info li.views img
{
   width: 64px;
}
.display-info ul.info li.views
{
   color: #f0ad4e;
}
.social_icons
{
   margin-bottom: 10px;
}
.social_icons a
{
   margin: 0 5px;
   opacity: 0.5;
   transition: opacity .25s ease-in;
   -moz-transition: opacity .25s ease-in;
   -webkit-transition: opacity .25s ease-in;
}
.social_icons a:hover
{
   opacity: 1;
}

But in a footer section letters of links were not modified. It looks like this:



So, the question is, where and what should I modify, to make a color hex #c9bab0 for the whole text in a footer?

Sorry for my silly questions. I am a newbie here and I am not fluent with programing (CSS, et cetera).

Best regards!

Offline Looking

  • SMF Hero
  • ******
  • Posts: 2,126
  • SMF Customization
    • jeanborde on Facebook
    • SMF Custom Themes
The return button there may be a Mod that can add that for you rather than editing files.

For CSS look for color under the class: "footer".

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,115
  • Gender: Male
    • Kindred-999 on GitHub
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline rq82

  • Semi-Newbie
  • *
  • Posts: 11
@Kindred

Thank you for a tips. Now I know which file I have to modify: /Sources/Subs.php

I need only a simple link - to the main page. I don't need to nor want to translate the button etc. So I think I can simply add a code of a new button before the 'home'. You see, the origin file looks like this (lines starts from 3921):

Code: [Select]
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),

I think it should look more less like this:

Code: [Select]
$buttons = array(
'main' => array(
'title' => $txt['Main Page']
'href' => $[color=red][HOW TO PUT HERE A DIRECT LINK TO THE HTTP://MYPAGE.COM?][/color],
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),

As I wrote, I am not fluent in programing. Can you tell me, how to put there a direct link in a "'href' => ...," code line?

@Looking

Thank you, I know that. I have been looking for this section in a file reseller.css and I modified this file. The origin version looks like this:

Code: [Select]
footer
{
margin-top: 20px;
background: #34495e;
padding: 20px 0;
text-align: center;
box-shadow: 0 -7px #2c3e50;
font-family: "Segoe UI";
}
footer, footer a
{
color: #17191c;
}
.btn-group
{
margin: 5px 0;
}
.display-info
{
text-align: center;
overflow: hidden;
}
.display-info h1
{
font-size: 36px;
}
.display-info ul.info li
{
float: left;
font-size: 1.5em;
margin-left: 5px;
}
.display-info ul.info li.replies
{
color: #5bc0de;
}
.display-info ul.info li.replies img, .display-info ul.info li.views img
{
width: 64px;
}
.display-info ul.info li.views
{
color: #f0ad4e;
}
.social_icons
{
margin-bottom: 10px;
}
.social_icons a
{
margin: 0 5px;
opacity: 0.5;
transition: opacity .25s ease-in;
-moz-transition: opacity .25s ease-in;
-webkit-transition: opacity .25s ease-in;
}
.social_icons a:hover
{
opacity: 1;
}

and my modified version of the footer section looks like this:

Code: [Select]
footer
{
   margin-top: 20px;
   background: #28333b;
   padding: 20px 0;
   text-align: center;
   box-shadow: 0 -7px #39444b;
   font-family: "Segoe UI";
}
footer, footer a
{
   color: #c9bab0;
}
.btn-group
{
   margin: 5px 0;
}
.display-info
{
   text-align: center;
   overflow: hidden;
}
.display-info h1
{
   font-size: 36px;
}
.display-info ul.info li
{
   float: left;
   font-size: 1.5em;   
   margin-left: 5px;
}
.display-info ul.info li.replies
{
   color: #5bc0de;
}
.display-info ul.info li.replies img, .display-info ul.info li.views img
{
   width: 64px;
}
.display-info ul.info li.views
{
   color: #f0ad4e;
}
.social_icons
{
   margin-bottom: 10px;
}
.social_icons a
{
   margin: 0 5px;
   opacity: 0.5;
   transition: opacity .25s ease-in;
   -moz-transition: opacity .25s ease-in;
   -webkit-transition: opacity .25s ease-in;
}
.social_icons a:hover
{
   opacity: 1;
}

I have replaced:

Code: [Select]
footer, footer a
{
color: #17191c;
}

with:

Code: [Select]
footer, footer a
{
   color: #c9bab0;
}

So... The question is, why it does not work with all text in a footer. I mean, the links stay untouched. So, in which file is this footer section I have to modify?

Thank you for your help. And sorry for my English - I am not a native speaker.

Best regards!

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,115
  • Gender: Male
    • Kindred-999 on GitHub
ummm..... no

Code: [Select]
$buttons = array(
'main' => array(
'title' => 'Main Page',                         //unless you plan to add a string to your language/text strings, what you had is wrong. You would use 'Main Page',
'href' => 'http://yourlink.com',          //NO COLOR or BBC!!! nothing but the link
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline rq82

  • Semi-Newbie
  • *
  • Posts: 11
Hi @Kindred

Something is wrong.

Code: [Select]
Parse error: syntax error, unexpected ''href'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /home/NAME-OF-MY-SERVER/ftp/SITE-NAME/forum/Sources/Subs.php on line 3924

The line 3924 is:

Code: [Select]
'href' => 'http://mysite.com',

I've checked this out before I've asked you in my previous post for the proper parameter.
I have noticed on your post, that you change the line 3923 too:

Code: [Select]
'title' => 'Main Page',

I thought it might change something so I repeat my test but the result is the same. I don't know how to make it correct?

Code: [Select]
'href' => [AND WHAT HERE NOW]

The colour red in a bbc code was to point my words only here - in this topic. I would not put them in a code.

Best regards!

Offline sǝๅqɯɐɥS

  • SMF Hero
  • ******
  • Posts: 4,511
  • Gender: Male
    • i30 Owners Club
Attach that file (Sources/Subs.php) to your next post

Offline rq82

  • Semi-Newbie
  • *
  • Posts: 11
@Kindred

I did what @Looking said. I used a mod: http://custom.simplemachines.org/mods/index.php?mod=1402

And I have got an addicional button now - a link to my main page.
But it was shown as a 3rd, just after the Help.

So I had to correct the code of the Subs.php file by manual. Now it looks like this:

Code: [Select]
$buttons = array(
'custom' => array(
'title' => !empty($modSettings['custom_tab_label']) ? $modSettings['custom_tab_label'] : $txt['custom_tab_label_default'],
'href' => !empty($modSettings['custom_tab_execute_url']) ? $modSettings['custom_tab_execute_url'] : $scripturl,
'show' => $user_info['is_guest'] ? !empty($modSettings['custom_tab_enable_guest_access']) : !empty($modSettings['custom_tab_enable_member_access']),
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),

And it works!

Thank you guys! One problem off, one issue left. What about CSS and the colour of links in a footer section?

Best regards!

Offline rq82

  • Semi-Newbie
  • *
  • Posts: 11
I guess I've found what I've been looking for.

css/index.css

Here is a code:

Code: [Select]
/* Normal, standard links. */
a:link, a:visited
{
   color: #17191c;
   text-decoration: none;
}
a:hover
{
   text-decoration: underline;
   cursor: pointer;
}

/* Links that open in a new window. */
a.new_win:link, a.new_win:visited
{
   color: #17191c;
   text-decoration: none;
}

But that means the all links are defined the same way. How can I add an exception for links in a footer. Does anyone can help me?

Best regards!