collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 56
  • Dot Hidden: 0
  • Dot Users: 2
  • Dot Users Online:

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • BCNPalomino: lol, that search doe :O
    July 18, 2014, 09:26:27 AM
  • RohailPro23: hi all
    July 18, 2014, 08:09:00 AM
  • samborabora: sorry, thought this was search, lol
    June 29, 2014, 04:45:12 AM
  • samborabora: sp_embed_image
    June 29, 2014, 04:45:01 AM
  • stanyy: Was it merely correcting the mistake made in 2.0.7 or is 2.0.8 actually faster than 2.0.6?
    June 20, 2014, 07:51:21 AM
  • AngelinaBelle: Smf 2.0.8 has been released. -- uses less memory than 2.0.7 [link]
    June 19, 2014, 03:46:47 PM
  • iSamp: [link]
    June 14, 2014, 06:42:38 AM
  • iSamp: SiNaN Plz Help
    June 14, 2014, 06:42:12 AM
  • iSamp: I need Help Plz Help Me I posted a Thing In English Support Plz read it
    June 14, 2014, 06:21:15 AM
  • Cyberkid: hey!
    June 12, 2014, 02:29:42 AM
  • AngelinaBelle: Hello!
    June 03, 2014, 01:06:04 PM
  • kal: also, hello. :)
    June 03, 2014, 08:36:43 AM
  • kal: I haven't been here in a couple months I don't think.
    June 03, 2014, 08:36:35 AM
  • AngelinaBelle: Welcome back, David
    June 02, 2014, 06:18:46 AM
  • David: I've missed this place!
    June 02, 2014, 01:04:01 AM

* Team Blog

* Recent Posts

Re: Shoutbox refresh and page reload discrepancy by Yazar8
[Today at 06:13:15 AM]


Re: Memberlist Box by [SiNaN]
[Yesterday at 01:21:44 PM]


Re: Memberlist Box by Smasher
[Yesterday at 01:21:10 PM]


Re: My online buddies block with avatars?? by [SiNaN]
[Yesterday at 11:49:35 AM]


Re: My online buddies block with avatars?? by samborabora
[Yesterday at 11:26:26 AM]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

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

0 Members and 1 Guest are viewing this topic.

Offline ARG

  • Beta Tester
  • *
  • Posts: 60
    • Files4Design
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Simple catbg/titlebg fix?
« on: November 28, 2011, 10: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: 6406
  • The Amazing Coder!
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #1 on: November 29, 2011, 02: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: 6406
  • The Amazing Coder!
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #2 on: November 29, 2011, 04: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

  • Support
  • *
  • Posts: 4885
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Simple catbg/titlebg fix?
« Reply #3 on: November 29, 2011, 08: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, 09: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: 6406
  • The Amazing Coder!
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #4 on: November 29, 2011, 10: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: 60
    • Files4Design
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #5 on: November 29, 2011, 10: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: 6406
  • The Amazing Coder!
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #6 on: November 29, 2011, 11:03:38 AM »
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: 60
    • Files4Design
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #7 on: November 29, 2011, 11:48:08 AM »
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

  • Project Manager
  • *
  • Posts: 2545
  • Gender: Female
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: Simple catbg/titlebg fix?
« Reply #8 on: November 29, 2011, 05: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 Tamerin

It 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: 60
    • Files4Design
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #9 on: November 29, 2011, 11:39:04 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! ;)

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

  • Support
  • *
  • Posts: 605
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #10 on: November 30, 2011, 07: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, 07: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

  • Support
  • *
  • Posts: 4885
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Simple catbg/titlebg fix?
« Reply #11 on: November 30, 2011, 09: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: 60
    • Files4Design
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #12 on: November 30, 2011, 11:02:34 AM »

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: 6406
  • The Amazing Coder!
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #13 on: November 30, 2011, 11:57:38 AM »
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: 60
    • Files4Design
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #14 on: November 30, 2011, 02: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: 83
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Catbg Issue Solved
« Reply #15 on: December 02, 2011, 12: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, 01:08:56 AM by Fog »

Offline Fog

  • Jr. Member
  • **
  • Posts: 83
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Catbg Issue Solved
« Reply #16 on: December 02, 2011, 12: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: 6406
  • The Amazing Coder!
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Simple catbg/titlebg fix?
« Reply #17 on: December 02, 2011, 07:57:34 AM »
And slowly, you come to realize... It's all as it should be...

Offline nikljones

  • Newbie
  • Posts: 1
  • SMF Version: 2 RC3
  • SP Version: None
Re: Simple catbg/titlebg fix?
« Reply #18 on: December 11, 2011, 10: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

  • Support
  • *
  • Posts: 4885
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Simple catbg/titlebg fix?
« Reply #19 on: January 06, 2012, 01: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?