collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 401
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: Top Alignment problem.  (Read 22913 times)

0 Members and 3 Guests are viewing this topic.

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Top Alignment problem.
« on: March 08, 2014, 09:12:02 PM »
I just installed simpleportal and I like it.  :)

However, I've got a bit of an alignment problem on top, and I don't know if this is a theme problem, or a portal problem. I think a portal problem, because without portal, I don't have this issue.

Simpleportal 2.3.5. on SMF 2.0.7 is used.

See the attached images. On the portal the top alignment is ok.
But on the forum, the right blocks are a little bit higher. This -only- happens on the forum and on the search page. On the search page it's even a bit more difference.

See the screenshots, I've put arrows in them so point out the alignment difference.
First screenshot is from the portal and all is ok, on the second screenshot, the difference in height is visible if you take a good look.
Greetings, Black Tiger

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Top Alignment problem.
« Reply #1 on: March 09, 2014, 12:22:47 AM »
  I see you have just center blocks and right blocks on your forum whereas the 2 are not vertically aligned correctly?  The navigation container above it is 100% width therefore atm I do not see what is causing the issue however I can suggest a fix for that theme specifically.

  Attached is a portal css file that you can put into that theme's css folder which will override the default css for that theme.

put the attachment in the directory path:
../Themes/ProRedV1-u/css

  All I did was adjust/add a padding-top attribute to your top block within the css file.
You can adjust the attributes within the css file yourself to fine tune the display. I will put what you need to look for within the file in this code block:
Code: [Select]
#sp_main
{
width: 100%;
border-spacing: 5px;
table-layout: fixed;
}
#sp_header, #sp_footer
{
vertical-align: top;
margin: 0 0.4em;
}
#sp_left
{
vertical-align: top;
}
#sp_right
{
vertical-align: top;
}
#sp_center
{
vertical-align: top;
padding-top:13px;
}




I added padding-top:13px; to the sp_center container because it worked while testing in my browser. However you can change 2 of the containers to what you see below if that does not work as expected:
Code: [Select]
#sp_right
{
vertical-align: top;
padding-top:2px;
}
#sp_center
{
vertical-align: top;
padding-top:0px;
}

Regards.

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Top Alignment problem.
« Reply #2 on: March 09, 2014, 09:28:46 AM »
Wow this is great and fast support! :applause:

Thank you very much, I will build it in later today.

Great, thanks!!
Greetings, Black Tiger

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Top Alignment problem.
« Reply #3 on: March 09, 2014, 10:09:23 PM »
I just tried... unfortunately it won't do it all.
If I use it, it makes things worse. So I had to make the second adjustment you suggested.
When doing that, the forum is oke but other things, even the portalpage, is out of sync.

If I change the padding top in #sp_right to 0px then we're back to original.

So it's no global thing but really specific for a couple of them. I can't remember if I had a good look when I tried the other portal, so I can't say if it's the portal or the Theme.

However, I like support here so I stick to this portal anyway. :)
Greetings, Black Tiger

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Top Alignment problem.
« Reply #4 on: March 09, 2014, 11:50:24 PM »

  Yes I see that it has to do with the alignment of the first board container. I can think of 2 possible options
  • create two Hosting Fun right-top blocks and designate one to show on the portal only and the other to show on the forum but add padding-top to its custom title style
~ or ~
  • I can give you a custom edit to the Portal.template.php php file and you put it in that custom theme's directory

  I suggest the first option which you can probably manage to do yourself.

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Top Alignment problem.
« Reply #5 on: March 10, 2014, 09:19:23 AM »
Well if it would work, the second solution might be best.
Because at this time it's a Hosting Fun ad, next time the Adsense will be on top, or it will be another kind of thing. What I'm trying to say is that normally the right side blocks will vary from time to time.

But take your time, this is low priority, no hurry at all.
Greetings, Black Tiger

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Top Alignment problem.
« Reply #6 on: March 10, 2014, 05:16:36 PM »
Put the attached file into this path:
../Themes/ProRedV1-u

All I did was add a custom style to the sp_right table cell whereas I added padding-top:17px; which seems to align the right blocks with your top board container. The conditional logic should only have it apply where that container is viewed (action=forum).

  It may require your own fine tuning if it does not line up properly when you apply it. To do that just edit the 17px to your own adjustment. The line shown below is in the file at approx. line 87.

Code: [Select]
<td id="sp_right"', !empty($modSettings['rightwidth']) ? ' width="' . $modSettings['rightwidth'] . '"' : '', $context['SPortal']['sides'][4]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : ((!empty($_REQUEST['action'])) && $_REQUEST['action'] === 'forum' ? 'style="padding-top:17px;"' : ''), '>';


  By putting it in that theme's directory, it will not effect other themes.

Regards.
« Last Edit: March 10, 2014, 05:20:08 PM by Underdog »

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Top Alignment problem.
« Reply #7 on: March 10, 2014, 06:52:54 PM »
Great, that almost did it. Almost everything is aligned now, except for the search section. Which also had more difference then other sections before the fix. Nothing changed on that one.

I provided a screenshot.

Maybe a quick question in between. How do I change the "Index" (navbar next to forum on the left) to "Home" like you have here?
Greetings, Black Tiger

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Top Alignment problem.
« Reply #8 on: March 10, 2014, 07:19:11 PM »
The Index text seems to be what is in your Norwegian language file.

edit the files:
../Themes/default/languages/index.norwegian.php
../Themes/default/languages/index.norwegian-utf8.php       (<-- if it exists)

find:
Code: [Select]
$txt['home'] = 'Index';

replace with:
Code: [Select]
$txt['home'] = 'Home';



The action in the url itself is search??
ie. ../index.php?action=search

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Top Alignment problem.
« Reply #9 on: March 10, 2014, 07:38:39 PM »
Thanks for the code.

Yes correct, the action in the url itself is search, just as in your example.
Greetings, Black Tiger

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Top Alignment problem.
« Reply #10 on: March 10, 2014, 07:52:23 PM »

  I'm not sure if the vertical alignment is exactly the same because I can not access search as a guest.
Would you be able to temporarily allow guests to use that feature so I can test it?

Regards.

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Top Alignment problem.
« Reply #11 on: March 10, 2014, 08:28:49 PM »
Ofcourse! And done, you should be able to use the search function now. The alignment was a little bit different then the other alignment. A little more height difference.
I think I might have not enabled the English language, so it's the "Zoek" button. ;)
Greetings, Black Tiger

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Top Alignment problem.
« Reply #12 on: March 10, 2014, 08:46:20 PM »
Put the attached file into this path (overwrite old file):
../Themes/ProRedV1-u

Regards.

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Top Alignment problem.
« Reply #13 on: March 10, 2014, 08:53:30 PM »
Superb! :applause:
That fixed it, thank you very much!
Greetings, Black Tiger

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Top Alignment problem.
« Reply #14 on: March 12, 2014, 09:17:09 AM »
I marked it unsolved again.
Reason: I decided to use standalone option.

You've read about my problem and reinstalling Simpleportal again. The custom portal template was not removed.
The funny thing is, at the moment, the search page alignment is ok.
As is the portal page, the help page and the member page.
Downloads, contact and forum are out of sync again.

Could it be there are differences when using standalone option?
Greetings, Black Tiger

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Top Alignment problem.
« Reply #15 on: March 12, 2014, 08:58:26 PM »
Put the attached file into this path (overwrite old file):
../Themes/ProRedV1-u

An action that does not exist will still cause an issue unless you add the following edit to index.php
File: ../index.php

find:
Code: [Select]
// Get the function and file to include - if it's not there, do the board index.
if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']]))
{
// Catch the action with the theme?
if (!empty($settings['catch_action']))
{
require_once($sourcedir . '/Themes.php');
return 'WrapAction';
}

// Fall through to the board index then...
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}

replace with (or just add the obvious 2 changes):
Code: [Select]
// Get the function and file to include - if it's not there, do the board index.
if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']]))
{
$_SESSION['smf_no_action'] = 'none';
// Catch the action with the theme?
if (!empty($settings['catch_action']))
{
require_once($sourcedir . '/Themes.php');
return 'WrapAction';
}

// Fall through to the board index then...
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}
else
$_SESSION['smf_no_action'] = false;


Regards.
« Last Edit: March 12, 2014, 09:47:39 PM by Underdog »

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Top Alignment problem.
« Reply #16 on: March 13, 2014, 09:18:59 AM »
Oeps, this one made it worse. Now everything is out of line again. :)
Greetings, Black Tiger

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Top Alignment problem.
« Reply #17 on: March 13, 2014, 05:03:57 PM »

Tell me your exact setup regarding file paths & urls that you adjusted for this standalone setup.
Also include changes you made to your Subs.php since your forum link is .../forum/index.php

I need to adjust a local installation to the same set up for testing else I will not observe the same behavior.

Offline Black Tiger

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Top Alignment problem.
« Reply #18 on: March 13, 2014, 05:34:03 PM »
My PortalStandalone.php is renamed to index.php and present in /home/user/public_html/index.php so in my root folder.
Portal is at this moment setup as standalone. And indeed the forum itself is in /home/user/public_html/forum/index.php as you correctly stated.

Owz... changes to Subs.php? I wouldn't know. I did not manually made any changes to that.
But I've got the following mods installed:
1. SimplePortal - Dutch    2.3.5
2. Remove "Last edit" mod    0.2.5
3. SimplePortal    2.3.5
4. Downloads System    2.0
5. Contact Page    3.2

I don't know if they made any changes to Subs.php.
Would I have this problem with any portal?
Greetings, Black Tiger

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Top Alignment problem.
« Reply #19 on: March 13, 2014, 07:48:03 PM »
Black Tiger,

  That is a standard setup for standalone but I wanted to make sure before posing another file.



  Ensure the edit that I previously mentioned for index.php was performed.

Put the attached file into this path (overwrite old file):
../Themes/ProRedV1-u

Regards.

« Last Edit: March 13, 2014, 07:52:32 PM by Underdog »