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: 404
  • 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]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Simple catbg/titlebg fix?  (Read 18557 times)

0 Members and 1 Guest are viewing this topic.

Offline ARG

  • Beta Tester
  • *
  • Posts: 56
    • Simple Mode Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Simple catbg/titlebg fix?
« on: November 28, 2011, 11:53:09 PM »
This has been discussed but so far no true solution for SMF 2.0.1 with SP 2.3.4

The old issue was solved simply by placing a copy of the portal.css in the custom themes css folder.
For some custom themes one also needed to make a simple alteration to this line in portal.css
Code: [Select]
background: url(../images/theme/main_block.png) no-repeat 0 -200px;
Now with SP 2.3.4 neither options works and the portal.css file no longer carries that particular line of code. Adding the code does no good either.

In the attachment you will see the issue for titlebg.
Live look at the issue

Now, this has been discussed at Dziner Studio as we are used to these types of custom theme versus portal issues but this one has us stumped.

Any changes to index.css and portal.css makes no difference. For some reason when using Firebug it is showing it in index.php. You may need to ask them over at SP.

That's because it IS in index.php as far as the browser is concerned. The style is being applied directly into the page header during the page setup. (Look in the source in the browser, you'll find it in index.php)

Wrong way to fix that particular issue, eek.

Now after reading a few posts here I truly do not expect a valid solution other that the obvious "put a copy of portal.css in your custom theme css folder" as this is not a functional solution with SP 2.3.4 as it was with previous versions and apparently nobody has a working solution.

I was very impressed with the latest SP update and newly added functions but my one question here is, why in the world would SP create an update and not fix this never ending issue that SP is so famous for, but also take away the only "easy" fix available?

I will eventually find my own solution to this issue. But after realizing that this issue was not considered a major factor of the update as many suspected that it would be, I just felt the need to vent.

Until then if anyone has a slightest idea, please feel free to share.

 ;)

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Simple catbg/titlebg fix?
« Reply #1 on: November 29, 2011, 03:06:32 AM »
Yeah, it's very unfortunate indeed. The new fix should have worked. I'm not sure what's wrong myself. We may even release a new patch to deal with this problem.
And slowly, you come to realize... It's all as it should be...

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Simple catbg/titlebg fix?
« Reply #2 on: November 29, 2011, 05:55:04 AM »
Okay. It seems like the themes that we get reports about uses a main_block.png image different from the one that's in SMF 2.0 Curve theme. The one in the Curve is 2300x864 and the one in your theme is 2300x304. Obviously the CSS declarations are different too.

The method we have been using works perfect for themes that use the same structure as Curve. I don't know why people would want to change that. They could have done the same with that standard structure and it wouldn't cause any issues like this.

Anyway, we'll have to fix it properly by applying the latest Curve markup for the headers but that means dropping pre-RC5 support for SMF 2.0 versions, which I didn't want to with 2.3 versions. I'll see what we can do.
And slowly, you come to realize... It's all as it should be...

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Simple catbg/titlebg fix?
« Reply #3 on: November 29, 2011, 09:31:05 AM »
ARG -- that's a fresh take on Dziner's Zentoa theme. It uses cat_bar. Is it based on Curve in its final form?
In your case, I think you could probably make it all work by fiddling with the sprite positions in span.left.
In your theme, h3.catbg has a background-position-y: -166px, but h3.catbg span.left has background-position-y: -160px.  Adjusting this fixes the problem perfectly. The problem is exactly the same with titlebg, only the correct background-position-y: is 212 px.  It looks like someone left in the span.left definitions, even though they are not used, and didn't bother to update them when the widths of bars in main_block got updated.
----
In general, I'm seeing problems from other users of cat_bar themes, related to span_left, which is obsolete in CURVE 2.0. The simple portal settings for class=left match well with CURVE, but don't work with these custom cat_bar themes, at least in part because "nobody" cares about the span_left in these themes.
If Simple Portal moved to the cat_bar for its block title template, it would probably do a better job supporting themes which are fully CURVE 2.0 compliant, but it would probably do a worse job supporting themes which are more like "old curve".
Would it be possible to add a third option, with something like this after the compat_core logic in sportal_load_compat:
Code: [Select]
$context['SPortal']['curve_compat'] = '';
 if ( $context['SPortal']['core_compat'] == false
   && isset($settings['theme_version'])
   && ($settings['theme_version'] != '2.0')
   && version_compare($settings['theme_version'], '2.0 RC5', '<')
     )
   $context['SPortal']['curve_compat'] = '_old';
   
    $context['SPortal']['template_block'] = 'template_block' .
                      ( $context['SPortal']['core_compat')
                                 ? 'core'
                                 : 'curve'. $context['SPortal']['curve_compat']

Then, in function template_block, something like:
Code: [Select]
   $context['SPortal']['template_block]($block);
The current function template_block_curve would become template_block_curve_old, and one with cat_bar would be the new function template_block, of course.
« Last Edit: November 29, 2011, 10:21:16 AM by AngelinaBelle »
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Simple catbg/titlebg fix?
« Reply #4 on: November 29, 2011, 11:37:21 AM »
The problem is, there are quite a few places where we use of Curve style headers. It doesn't sound viable to have them all with such a conditional. Our "hack" should have worked if theme authors used the sprites as they are used in Curve, but look like some of them don't.

The best we can do at this point is to change the markup in SimplePortal and drop pre-RC5 support.
And slowly, you come to realize... It's all as it should be...

Offline ARG

  • Beta Tester
  • *
  • Posts: 56
    • Simple Mode Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #5 on: November 29, 2011, 11:58:30 AM »
Yes, some of our Dziner Studio themes use different proportions with the main_block.png image than the standard default. The thing is that I personally test all of our themes with each portal and this is not an issue with any other available portal, only SP 2.3.4.
I am sure that I could come up with a resolution if I can only find where the settings actually are. When using any web tools it shows it in index.php and that is the way that browsers are seeing it but we all know that it is not in index,php
This should be a simple css fix and would be a different setting for certain custom themes. The problem is detecting where these settings actually are and why browsers are reading them from index.php.

Thanx for the replies.  ;)

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Simple catbg/titlebg fix?
« Reply #6 on: November 29, 2011, 12:03:38 PM »
We have moved the related code to Subs-Portal.php file with 2.3.4, so that admins won't need to copy portal.css to all custom themes they have. However, now, you changes will affect all themes. It would have worked in all themes that has the standard images and CSS declarations.

The difference between other portals and 2.3.4 is the SMF versions they support. We tried really hard to keep compatibility with older versions of SMF.

We are discussing how we want to deal with this at the moment. We'll get it solved as soon as possible. Thanks for your cooperation!
And slowly, you come to realize... It's all as it should be...

Offline ARG

  • Beta Tester
  • *
  • Posts: 56
    • Simple Mode Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #7 on: November 29, 2011, 12:48:08 PM »
Well I did find a fix for mine. I dropped the portal.css in my custom themes css folder and then made these adjustments.

Default settings:
Code: [Select]
/* ************************************* */
/* Compatibility styles                  */
/* ************************************* */
h4.catbg span.left, h4.catbg2 span.left, h3.catbg span.left, h3.catbg2 span.left, .table_list tbody.header td span.left
{
float: left;
display: block;
width: 9px;
height: 31px;
}
h4.titlebg span.left, h3.titlebg span.left
{
float: left;
display: block;
width: 9px;
height: 31px;
}

Altered:
Code: [Select]
/* ************************************* */
/* Compatibility styles                  */
/* ************************************* */
h4.catbg span.left, h4.catbg2 span.left, h3.catbg span.left, h3.catbg2 span.left, .table_list tbody.header td span.left
{
float: left;
display: block;
width: 9px;
height: 36px;
margin: -6px 0 0 0;
background: url(../images/theme/main_block.png) no-repeat 0 -166px;
}

h4.titlebg span.left, h3.titlebg span.left
{
float: left;
display: block;
width: 9px;
height: 36px;
margin: -12px 0 0 0;
background: url(../images/theme/main_block.png) no-repeat 0 -222px;
}

Of course the the margins, heights and (-) positions will vary for certain custom themes but this may give others with similar issues something to go by.

Thanx for the support   ;)

Offline Eliana Tamerin

  • Comrade
  • *
  • Posts: 2889
  • Gender: Female
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: Simple catbg/titlebg fix?
« Reply #8 on: November 29, 2011, 06:32:35 PM »
ARG, just as a side note, if you haven't posted your site in Website Showcases, you should! I really like how you've arranged the portal, and the site looks very professional, it's a great one to show off SP with! ;)
Ms. Eliana TamerinIt should be painfully obvious by now that I don't respond to support PMs. Don't send me PMs for support. They will be ignored and deleted, post on the Support Boards to get support.

Offline ARG

  • Beta Tester
  • *
  • Posts: 56
    • Simple Mode Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #9 on: November 30, 2011, 12:39:04 AM »
ARG, just as a side note, if you haven't posted your site in Website Showcases, you should! I really like how you've arranged the portal, and the site looks very professional, it's a great one to show off SP with! ;)

Thanx Eliana. I have considerd doing so but I figured that I would wait until the site is actually open it to the public. Still have a bit of work to do but it is scheduled to open about 35 hours from now.
After I get that site going I will be re-opening my smf Hack site as well to offer custom theme and graphic support. Of course it will be under a different domain as some state that they have issues connecting to sites wit the word "hack" in the domain.

@Fog: Exactly what file are you looking for?

 ;)

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Simple catbg/titlebg fix?
« Reply #10 on: November 30, 2011, 08:33:30 AM »
Still same problem on a new Bloc theme which doesnt use the corner images or main block background ... forgot exactly but I think I just deleted a reference to it (main block image) in the css file
« Last Edit: November 30, 2011, 08:37:43 AM by igirisjin »
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Simple catbg/titlebg fix?
« Reply #11 on: November 30, 2011, 10:02:46 AM »
My mistake.  That span.left stuff was not in index.css -- it is emitted by sportal_init_headers.
This takes care of the "wrong span.left stuff" problem in 2.3.3 (portal.css was loaded from default, and so the background URL used in span.left was also coming from default)

In themes where the sprites are not the same width as they are in curve, it is necessary to properly define the y-distance for the span.left background. So putting that into either index.css or portal.css makes sense.

This will work fine unless the span.left background uses transparent corners -- an issue that has popped up from time to time here.
In that case, the h3.catbg background will show through the span.left background.
For these themes, it will be better to have a cat_bar template for the block title bar.

It would be very difficult to come up with a single block template that will work universally with both "old curve" and "new curve" themes with different sprite widths than the default.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline ARG

  • Beta Tester
  • *
  • Posts: 56
    • Simple Mode Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #12 on: November 30, 2011, 12:02:34 PM »

It would be very difficult to come up with a single block template that will work universally with both "old curve" and "new curve" themes with different sprite widths than the default.

I understand the difficulty but other portals do not have this issue. If I get some spare time I will try to dig through various portals to see what the differences may be as far as catbg and titlebg settings.

 ;)

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Simple catbg/titlebg fix?
« Reply #13 on: November 30, 2011, 12:57:38 PM »
As I said, we are using the "old curve" markup for headers along with a hack that works as long as the sprites are used as they are used in "old/new curve". This is to support older versions of SMF. SimplePortal is probably the only portal that worries about compatibility with older versions of SMF. So that's why others just updated their header markup. From the looks of it, we'll have to do the same as well.
And slowly, you come to realize... It's all as it should be...

Offline ARG

  • Beta Tester
  • *
  • Posts: 56
    • Simple Mode Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #14 on: November 30, 2011, 03:11:04 PM »
Understandable. Since Dziner Studio no longer develops themes for SMF 1.1.x we are considering dropping support completely for outdated versions of SMF (RC's and anything below 1.1.14) and concentrating only on 2.0 and above. We may keep support for RC5 for a bit longer but eventually it too will be dropped. Nothing is set in stone yet but my point is concentrating on the modern instead of the past is the best way to go.

 ;)

Offline Fog

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Catbg Issue Solved
« Reply #15 on: December 02, 2011, 01:30:34 AM »
OK...at least with my themes it's solved.

I found this code in the Sources Folder

Look for the Sub-Portal php

Find the header fuction and look for this code

Code: [Select]
$context['html_headers'] .= '
// ]]></script>
<style type="text/css">
h4.catbg span.left, h4.catbg2 span.left, h3.catbg span.left, h3.catbg2 span.left, .table_list tbody.header td span.left
{
background: url(' . $settings['images_url'] . '/theme/main_block1.png) no-repeat 0 -160px;
}
h4.titlebg span.left, h3.titlebg span.left
{
background: url(' . $settings['images_url'] . '/theme/main_block.png) no-repeat 0 -200px;
}
</style>';

$initialized = true;

You can edit the Image URL to get rid of the left hand side problem

BEWARE when editing a PHP file you could crash your site if not done right.

I'm not sure this will work on other themes...

Thanks

Fog
« Last Edit: December 02, 2011, 02:08:56 AM by Fog »

Offline Fog

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Catbg Issue Solved
« Reply #16 on: December 02, 2011, 01:38:30 AM »
Can we get rid of this part of the PHP file?

Code: [Select]
h4.catbg span.left, h4.catbg2 span.left, h3.catbg span.left, h3.catbg2 span.left, .table_list tbody.header td span.left
{
background: url(' . $settings['images_url'] . '/theme/main_block1.png) no-repeat 0 -160px;
}
h4.titlebg span.left, h3.titlebg span.left
{
background: url(' . $settings['images_url'] . '/theme/main_block.png) no-repeat 0 -200px;
}

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Simple catbg/titlebg fix?
« Reply #17 on: December 02, 2011, 08:57:34 AM »
And slowly, you come to realize... It's all as it should be...

Offline nikljones

  • Just Registered
  • Posts: 1
  • SMF Version: 2 RC3
  • SP Version: None
Re: Simple catbg/titlebg fix?
« Reply #18 on: December 11, 2011, 11:32:00 AM »
Here's what worked for me with the Blocweb custom theme. I modified portal.css as such:

Default:
Code: [Select]
h4.catbg span.left, h4.catbg2 span.left, h3.catbg span.left, h3.catbg2 span.left, .table_list tbody.header td span.left
{
float: left;
display: block;
width: 9px;
height: 31px;
}
h4.titlebg span.left, h3.titlebg span.left
{

Changed:
Code: [Select]
4.catbg span.left, h4.catbg2 span.left, h3.catbg span.left, h3.catbg2 span.left, .table_list tbody.header td span.left
{
float: left;
display: block;
width: 9px;
height: 32px;
margin-top: -31px;
}

I didn't change titlebg because it wasn't affected. Hope this helps those with blocweb themes. Worked for me; no guarantees for you. Always backup first.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Simple catbg/titlebg fix?
« Reply #19 on: January 06, 2012, 02:25:53 PM »
Thanks, nikljones.  That workaround could be a big help to some users.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?