SimplePortal

Customization => Themes and Graphics => Topic started by: dirtymind on February 10, 2010, 01:04:53 PM

Title: Title Class and Png
Post by: dirtymind on February 10, 2010, 01:04:53 PM
Hi,
I have a problem about "Default Title Class".

Into the forum, with CSS i have setted borders (top-margin-left-right) for classes (catbg titlebg ecc).
But in Portal this border are differents to my setting in forum.
I don't try where i can set the borders in Portal.

The other question is about image .PNG. I don't find them. I find just .gif, but i try .PNG, like expand and collapse.

Someone who can help me?

Thank you  :D
Title: Re: Title Class and Png
Post by: Nathaniel on February 10, 2010, 05:46:17 PM
Could you please either post a screenshot of your issue or a link to your forum?
Title: Re: Title Class and Png
Post by: dirtymind on February 10, 2010, 06:20:51 PM
http://fpmleague.altervista.org/forum/index.php

 :D
Title: Re: Title Class and Png
Post by: dirtymind on February 12, 2010, 06:11:20 AM
news?  :0
Title: Re: Title Class and Png
Post by: dirtymind on February 15, 2010, 07:36:54 PM
Nothing?   :'(
Title: Re: Title Class and Png
Post by: [SiNaN] on February 27, 2010, 05:58:32 AM
Go to Admin > SimplePortal > Blocks and edit each of yours and set Title Default Class to "catbg". Currently it seems like they are all set to "catbg3".
Title: Re: Title Class and Png
Post by: dirtymind on February 27, 2010, 08:14:17 AM
That's the problem!  :D

Now is setted "catbg3" in Portal, but is not "catbg3" of Forum.

So also "catbg" is not "catbg" of Forum.

Example:

(http://img6.imageshack.us/img6/8083/catbg3.jpg) (http://img6.imageshack.us/i/catbg3.jpg/)
Title: Re: Title Class and Png
Post by: dirtymind on March 02, 2010, 05:10:44 AM
news?
Title: Re: Title Class and Png
Post by: [SiNaN] on March 09, 2010, 11:58:48 AM
Change Title Default Class for all your blocks to catbg. Then apply this edit:

Themes/default/portal.css

Code: (Find) [Select]
table.sp_block
{
border-collapse: collapse;
border-spacing: 0;
width: 100%;
}

Code: (Replace) [Select]
table.sp_block
{
width: 100%;
}
Title: Re: Title Class and Png
Post by: dirtymind on March 09, 2010, 12:07:56 PM
it was not necessary, for me, to change in catbg cause i want ctbg3  :D

but it is great! the problem is resolved!  :nervous-happy:

so... it seems that the problem was that "collapse"  :0

anyway..... thank you very very very very much!  ;D
Title: Re: Title Class and Png
Post by: [SiNaN] on March 09, 2010, 12:09:22 PM
You're welcome. I'm glad I could be of help. ;)
Title: Re: Title Class and Png
Post by: dirtymind on March 09, 2010, 12:24:09 PM
oh sorry... there is yet the problem for PNG  :0


The other question is about image .PNG. I don't find them. I find just .gif, but i try .PNG, like expand and collapse.

Thank you  :D

Well.... Now it is visibile just a couple of buttons for show/hide blocks.

But I Would 2 couple of buttons, cause i would something like:

at left: the "hide/show left block" button

at right: the "hide/show right block" button

So now instead i have two equal button "show/hide" for both of columns
Title: Re: Title Class and Png
Post by: [SiNaN] on March 09, 2010, 12:29:31 PM
Sorry, I missed that.

So you want a single button to hide/show both (left and right) columns?
Title: Re: Title Class and Png
Post by: dirtymind on March 09, 2010, 12:40:16 PM
if it is possibile, yes.

if is not a problem i can link my space so you can better understand that i mean  :nervous-happy:
Title: Re: Title Class and Png
Post by: [SiNaN] on March 09, 2010, 12:49:17 PM
Sources/Subs-Portal.php

Code: (Find) [Select]
function sp_collapseSide(id)
{
var sp_sides = new Array();
sp_sides[1] = "sp_left";
sp_sides[4] = "sp_right";
mode = document.getElementById(sp_sides[id]).style.display == "" ? 0 : 1;' . ($context['user']['is_guest'] ? '
document.cookie = sp_sides[id] + "=" + (mode ? 0 : 1);' : '
smf_setThemeOption(sp_sides[id], mode ? 0 : 1, null, "' . $context['session_id'] . '");') . '
document.getElementById("sp_collapse_side" + id).src = sp_images_url + (mode ? "/collapse.png" : "/expand.png");
document.getElementById(sp_sides[id]).style.display = mode ? "" : "none";
}';

Code: (Replace) [Select]
function sp_collapseSide()
{
mode = document.getElementById("sp_left").style.display == "" ? 0 : 1;' . ($context['user']['is_guest'] ? '
document.cookie = "sp_side_collapse=" + (mode ? 0 : 1);' : '
smf_setThemeOption("sp_side_collapse", mode ? 0 : 1, null, "' . $context['session_id'] . '");') . '
document.getElementById("sp_collapse_side").src = sp_images_url + (mode ? "/collapse.png" : "/expand.png");
document.getElementById("sp_left").style.display = mode ? "" : "none";
document.getElementById("sp_right").style.display = mode ? "" : "none";
}';

Code: (Find) [Select]
$context['SPortal']['sides'][$side['id']]['collapsed'] = $context['user']['is_guest'] ? !empty($_COOKIE['sp_' . $side['name']]) : !empty($options['sp_' . $side['name']]);
Code: (Replace) [Select]
$context['SPortal']['sides'][$side['id']]['collapsed'] = $context['user']['is_guest'] ? !empty($_COOKIE['sp_side_collapse']) : !empty($options['sp_side_collapse']);
Themes/default/Portal.template.php

Code: (Find) [Select]
if (!empty($modSettings['showleft']) && !empty($context['SPortal']['blocks'][1]))
echo '
<a href="#side" onclick="return sp_collapseSide(1)">', sp_embed_image($context['SPortal']['sides'][1]['collapsed'] ? 'expand' : 'collapse', '', null, null, true, 'sp_collapse_side1'), '</a>';

if (!empty($modSettings['showright']) && !empty($context['SPortal']['blocks'][4]))
echo '
<a href="#side" onclick="return sp_collapseSide(4)">', sp_embed_image($context['SPortal']['sides'][4]['collapsed'] ? 'expand' : 'collapse', '', null, null, true, 'sp_collapse_side4'), '</a>';

Code: (Replace) [Select]
echo '
<a href="#side" onclick="return sp_collapseSide()">', sp_embed_image($context['SPortal']['sides'][1]['collapsed'] ? 'expand' : 'collapse', '', null, null, true, 'sp_collapse_side'), '</a>';
Title: Re: Title Class and Png
Post by: dirtymind on March 09, 2010, 01:24:51 PM
SiNaN I'm very very afraid....  :'(

I don't mean that....

it is cause my english is very bad....

you have write

So you want a single button to hide/show both (left and right) columns?

and i understand just now....   :(


i try to explain......

now there are 2 png (collpase and expand) and 4 button.

i would 4 different png, so it can show

hide left column
show left column
hide right column
show right column

now it show for right and left columns the same 2 buttons.

and if it is possibile i would the couple of buttons for left column, aligned to left. now both of couple of buttons are aligned to right.....

if there is a problem i canlink my space in PM. i believe tha i can be clearer.

anyway, sorry.... and thank you
Title: Re: Title Class and Png
Post by: [SiNaN] on March 10, 2010, 04:57:16 AM
Oh, I see. Revert that back and try this:

Sources/Subs-Portal.php

Code: (Find) [Select]
document.getElementById("sp_collapse_side" + id).src = sp_images_url + (mode ? "/collapse.png" : "/expand.png");
Code: (Replace) [Select]
document.getElementById("sp_collapse_side" + id).src = sp_images_url + (mode ? "/collapse" + id + ".png" : "/expand" + id + ".png");
Themes/default/Portal.template.php

Code: (Find) [Select]
sp_embed_image($context['SPortal']['sides'][1]['collapsed'] ? 'expand' : 'collapse', '', null, null, true, 'sp_collapse_side1'), '</a>';
Code: (Replace) [Select]
sp_embed_image($context['SPortal']['sides'][1]['collapsed'] ? 'expand1' : 'collapse1', '', null, null, true, 'sp_collapse_side1'), '</a>';
Code: (Find) [Select]
sp_embed_image($context['SPortal']['sides'][4]['collapsed'] ? 'expand' : 'collapse', '', null, null, true, 'sp_collapse_side4'), '</a>';
Code: (Replace) [Select]
sp_embed_image($context['SPortal']['sides'][4]['collapsed'] ? 'expand4' : 'collapse4', '', null, null, true, 'sp_collapse_side4'), '</a>';
Then you can have expand1.png and collapse1.png for left side and expand4.png and collapse4.png for right side. We don't have collapse option for top and bottom sides.
Title: Re: Title Class and Png
Post by: dirtymind on March 10, 2010, 12:03:57 PM
Thank you so much!

It is not important for me collapse option for top and bottom side  ;D
Title: Re: Title Class and Png
Post by: [SiNaN] on March 10, 2010, 02:40:07 PM
So should I mark this as solved?
Title: Re: Title Class and Png
Post by: dirtymind on March 10, 2010, 03:16:43 PM
So should I mark this as solved?

Yes, absolutely!

Thank You so much!  :D
SimplePortal 2.3.8 © 2008-2024, SimplePortal