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: 470
  • 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: Title bar problem with some themes  (Read 6252 times)

0 Members and 1 Guest are viewing this topic.

Offline genimac

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Title bar problem with some themes
« on: March 07, 2011, 02:59:26 PM »
We have moved our forum to a SMF 2.0R C4 with SimplePortal 2.3.3.
Now I want to try some themes and have problems in the title bars. The extrange thing is that the problem appears with some themes not with all of them.
I show you what happens with Analysys from Crisp as I think it's the better one to see the problem.
The first attachment is what the forum shows with the theme just instaled.
After searching for similar problems I copied the portal.css to the theme css folder and get the second attachment.
So, it seems the problem is with left background image.
What do I need to change to get it show properly?
Thanks.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Title bar problem with some themes
« Reply #1 on: March 07, 2011, 03:02:16 PM »
Please copy portal.css from the default theme into the css folder of each problem theme, and see if that fixes it.
If not, there are some small changes you can make to catbg to make this work, in most cases.
 
 
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 genimac

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Title bar problem with some themes
« Reply #2 on: March 07, 2011, 04:40:17 PM »
I have the portal.css and portal_rtl.css on the theme css folder. Same problem as on pass2.
The code generated to the browser is:
Quote
<td id="sp_center">
   <h3 class="catbg"><span class="left"></span>
      <a class="sp_float_right" style="padding-top: 7px;" href="javascript:void(0);" onclick="sp_collapseBlock('7')"><img id="sp_collapse_7" src="http : //my.domain/smf/Themes/analysis205/images/collapse.gif" alt="*" /></a>
      Novedades
   </h3>
   <div id="sp_block_7">
      <div class="windowbg">

         <span class="topslice"><span></span></span>
         <div class="sp_block">
                        <h2 style="text-align: center;">Portal de pruebasl!</h2>
         </div>
         <span class="botslice"><span></span></span>
      </div>
   </div>
   <br />
"http : //my.domain" is typed withou the spaces.

I tried to modify portal.css (on the theme css folder) to this so I can change the background image:
Quote
/* ************************************* */
/* Compatibility styles                  */
/* ************************************* */
h4.catbg span.left, h4.catbg2 span.left, h3.catbg2 span.left, .table_list tbody.header td span.left
{
   float: left;
   display: block;
   width: 9px;
   height: 31px;
   background: url(../images/theme/main_block.png) no-repeat 0 -160px;
}

/* added for left problem */
h3.catbg span.left
{
   float: left;
   display: block;
   width: 9px;
   height: 31px;
   background: url(../images/theme/main_block.png) no-repeat 0 -160px;
}

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

and get as the new attachment. I can't found where to change the leftmost image on the title bar.

Can you tell me what can I try with the catbg? in wich .css file?
Thanks again.
« Last Edit: March 07, 2011, 06:36:08 PM by genimac »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Title bar problem with some themes
« Reply #3 on: March 07, 2011, 06:39:42 PM »
If you give me a link, I'll show you how to narrow this down a bit.
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 genimac

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Title bar problem with some themes
« Reply #4 on: March 08, 2011, 04:43:52 AM »
This is the address of the test forum, http://38.100.22.35/smf/. You can see some themes added, the ones with the wrong left part are, Analysis, Skm light and Skm Night.
Analysis is the default theme and the one of the attached images. I'm shure the problem is the same for all of them.

Thanks.

Offline AST3R1X

  • Semi Newbie
  • *
  • Posts: 13
    • Demon-Pixels
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Title bar problem with some themes
« Reply #5 on: March 08, 2011, 09:51:39 AM »
In portal.css
Find  (around line 576)
Code: [Select]
h4.titlebg span.left, h3.titlebg span.left
{
float: left;
display: block;
width: 9px;
height: 31px;
background: url(../images/theme/main_block.png) no-repeat 0 -200px;
}

Replace with

Code: [Select]
h4.titlebg span.left, h3.titlebg span.left
{
float: left;
display: block;
height: 31px;
background: url(../images/theme/main_block.png) no-repeat 0 -200px;
}

Offline genimac

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Title bar problem with some themes
« Reply #6 on: March 08, 2011, 10:10:31 AM »
Thanks, but don't worked. It keeps at the pass2 attatchment.
First a rectangle and then the left curve. Also, if I comment out all the "Compatibility styles", at the final part of portal.css, I have the tittle bar without the left side curve.
« Last Edit: March 08, 2011, 10:20:17 AM by genimac »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Title bar problem with some themes
« Reply #7 on: March 08, 2011, 04:46:13 PM »
Your theme is not very compatable with SimplePortal.
 
This means you are going to have to make some changes in portal.css for improved compatability. This is pretty fiddly work.
 
I recommend using firebug for firefox, or IE developers tools (which come with IE7 and IE8).  This will help you figure out which part of the CSS is causing you the problem, and will even let you "check" and "uncheck" parts of CSS, or change inline styles on the fly.
 
Once you figure out what you need to do, you make the changes in portal.css.
 
 
One other possibility is not to fool with the CSS, but to change the blocks template.
Something like the advice I gave in http://simpleportal.net/index.php?topic=7540.msg42650#msg42650
 
Please - try this on a test forum first!
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 genimac

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Title bar problem with some themes
« Reply #8 on: March 08, 2011, 06:46:18 PM »
...
 
One other possibility is not to fool with the CSS, but to change the blocks template.
Something like the advice I gave in http://simpleportal.net/index.php?topic=7540.msg42650#msg42650
 
Please - try this on a test forum first!

That link helped to get the problem near fixed.
I don't have the "<div class="cat_bar">" so I added it. My portal.template.php on the default theme now looks like this:
Code: [Select]
function template_block_curve($block)
{
global $settings;

if (empty($block['style']['no_title']))
{
echo '
       <div class="cat_bar">
       <h3 class="', $block['style']['title']['class'], '"', !empty($block['style']['title']['style']) ? ' style="' . $block['style']['title']['style'] . '"' : '', '><span class="left"></span>';

if (empty($block['force_view']))
echo '
<a class="sp_float_right" style="padding-top: 7px;" href="javascript:void(0);" onclick="sp_collapseBlock(\'', $block['id'], '\')"><img id="sp_collapse_', $block['id'], '" src="', $settings['images_url'], $block['collapsed'] ? '/expand.gif' : '/collapse.gif', '" alt="*" /></a>';

echo '
', parse_bbc($block['label']), '
</h3>
    </div>';
}
   ... more code

This puts the left title bar with the curve look but I need to also comment out the "Compatibility styles" on the portal.css file on the problematic themes:
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;
   // left: -30px
   display: block;
   width: 9px;
   height: 31px;
   background: url(../images/theme/main_block.png) no-repeat 0px -160px;
}

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

After that I get the part4.jpg attatchment.
The "normal?" blocks render OK but the "news?" ones still are rectangular on the left. In the "Board news" block there is no "Style options" on that block.
Any way to put the "catbg" on the "board news"? that will solve the problem completly.

Thanks again AngelinaBelle.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Title bar problem with some themes
« Reply #9 on: March 09, 2011, 08:53:50 AM »
Board News is different from the other blocks.  It does not use that template. It has its template right in PortalBlocks.php. You can make the same change there (function spboardNews).


You'll see that the sp_articles block is a similar case.
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 genimac

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Title bar problem with some themes
« Reply #10 on: March 09, 2011, 03:47:47 PM »
Ok. I edited PortalBlocks.php ---> function sp_boardNews from:
Code: [Select]
echo '
               
<h3 class="catbg"><span class="left"></span>
<span class="sp_float_left sp_article_icon">', $news['icon'], '</span><a href="', $news['href'], '" >', $news['subject'], '</a>
</h3>
             
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="sp_content_padding">';
to:
Code: [Select]
echo '
               <div class="cat_bar">
<h3 class="catbg"><span class="left"></span>
<span class="sp_float_left sp_article_icon">', $news['icon'], '</span><a href="', $news['href'], '" >', $news['subject'], '</a>
</h3>
              </div>
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="sp_content_padding">';

And get the problem solved for the themes I want, see pass5.
To avoid conflicts with other themes I need to copy the modified "PortalBlocks.php" to the root folder of the conflicting themes.
But i haven`t found a way to modifie PortalTemplate.php so that "all" theme curves work. They show like pass6 now.
It seems I can`t move PortalTemplate.php to a theme folder.
Are there a way to do it? or can I "define" the sp_boardNews function locally on the theme?

Thanks a lot.

Edited: sorry mixed PortalBlocks and PortalTemplate. Fixed.
« Last Edit: March 09, 2011, 06:38:14 PM by genimac »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Title bar problem with some themes
« Reply #11 on: March 09, 2011, 06:12:20 PM »
PortalBlocks.php is run, just the same, for every theme.


I would have thought that PortalTemplate.php could be copied to every theme.
I have not checked to see if it is respected, though.
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 genimac

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Title bar problem with some themes
« Reply #12 on: March 09, 2011, 06:51:01 PM »
Sorry EvangelinaBelle, i mixed the names of the two files. I edited my last post.

The one I moved to the bad themes folders is PortalBlocks.php
The changes in PortalTemplate.php are the ones that I think translatting to a theme folder file, as I do with PortalBlocks.php, will end the problem.
By now the PortalTemplate.php is in the sources folder, is OK to make a copy on the bad themes folders? That way I keep the original files for the "normal" themes and move portal.css, PortalBlocks.php and PortalTemplate.php to the themes that have problems and edit the copy.
Maybe I can define the function sp_boardNews on PortalBlocks? so it is not used from the sources folder.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Title bar problem with some themes
« Reply #13 on: March 09, 2011, 07:51:38 PM »
Does the modified Portal.template.php mess up the default theme? At first glance, I would have thought it would be OK, if you are rewriting the template to do the same as CURVE RC5 does.


If you have just one copy of this file, in Themes/default, then every theme will use it.


If this does not work for you, then you have a slight problem. You can have only one PortalBlocks.php, and it must be in Sources.
If you look in this file, you will see it does things one way for CURVE and another way for CORE themes. It has a very simple way to detect which themes are which.


If you need YET ANOTHER way for some themes, you have to give it a way to detect something about the theme it can use to decide when to use the THIRD way of doing things.


If that's the case, it is just a little more complicated...
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 genimac

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Title bar problem with some themes
« Reply #14 on: March 10, 2011, 09:14:19 AM »
No, it seems that PortalBlocks.php is.
If I leave the PortalBlocks.php as is, then I have rectangular left tittles on the board news on some curve themes. Always after editing and placing the PortalTemplate.php on the theme. Other curve themes look OK.
If I modify PortalBlocks then the previous bad ones look OK, and the ones who looked OK now have the rectangular left tittle bar on the board news.
That's why I asked if I could move the "sp_boardNews" function to another file, something like I have done wit the PortalTemplate.php

Here is the code of sp_boardNews in the current PortalTemplate.php:
Code: [Select]
else
{
foreach ($return as $news)
{
echo '
               <div class="cat_bar">      // added for left side problem
<h3 class="catbg"><span class="left"></span>
<span class="sp_float_left sp_article_icon">', $news['icon'], '</span><a href="', $news['href'], '" >', $news['subject'], '</a>
</h3>
              </div>      // added for left side problem
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="sp_content_padding">';

So, without <div class="cat_bar"> some themes have the left tittle bar rectangular, and viceversa.
And it's only a curve theme problem, all the cores ones I tried are unaffected. I Have no idea if I can do another "if" to separate the "good" curve themes from the "bad" ones.
Any idea to go beyond this point?
Thanks for your help.

Edit: EvangelinaBelle, sorry again. I have mixed the name of the files. I reedited the post. If you enter again at the forum address http://38.100.22.35/smf/ yo will see that the Analysis theme looks OK, but if you change it to the SMF Default one the newsBoard titles have the left side problem.
« Last Edit: March 10, 2011, 02:33:40 PM by genimac »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Title bar problem with some themes
« Reply #15 on: March 10, 2011, 02:33:56 PM »
I think that, if you get rid of the "span left" bit in the curve part of the theme, and make the sp_boardnews template compatible with CURVE RC5, then your blocks will look good with all CURVE RC5-based themes.


Of course, this could cause some problems for CURVE-style themes which have not been updated to RC5.


You may be able to accomplish some more with some fiddling around in the CSS for some of your problematic themes.


At some point, all CURVE themes should be updated for compatability with RC5.
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 genimac

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Title bar problem with some themes
« Reply #16 on: March 11, 2011, 09:45:45 AM »
Thanks AngelinaBelle, I will try that.

Anyway I have been able to get the three themes we like for the forum to look well so I think the thread could be closed.
As SMF seems near to be released sure themes will be more compatible.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Title bar problem with some themes
« Reply #17 on: March 14, 2011, 03:06:08 PM »
I'm glad you have found a workaround.
I think you are correct -- after SMF 2.0 final is released, more themes will be "RC5" compatible, and, eventually, SimplePortal will eventually also have its block templates made to match CURVE SMF 2.0 final.
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?