Using dynamic width

English Style Support

Using dynamic width

Beitragvon gfrojdh » Mi 10. Mär 2010, 10:39

Hi Marc.

Would like to upgrade to 1.2.4, but it seems that you pulled the nice javascript based width changer that you used in 1.0.2. Any method of getting this back in? I'm using the theme together with a php script for rotating banners in three different page widths at http://www.tacs.nu/forum and dynamic width doesn't work with the background images.

Thanks,

Goran
gfrojdh
Mitglied / Member
Mitglied / Member
 
Beiträge: 8
Registriert: Do 13. Nov 2008, 16:03

Re: Using dynamic width

Beitragvon Marc » Mi 10. Mär 2010, 18:00

I'm pretty sure it will work with the new dynamic width. Could you send me the script or post it here?
Bild
Benutzeravatar
Marc
Administrator
Administrator
 
Beiträge: 383
Registriert: Di 2. Sep 2008, 23:48
Wohnort: Munich

Re: Using dynamic width

Beitragvon gfrojdh » Do 11. Mär 2010, 09:46

Sure, here's the script I'm using. Your're calling it instead of a picture, and it rotates the pictures inside a specified folder (in this case "wide", "wider", and "widest" as declared in overall_header.html:

/*
Style semi-dynamic width by Marc Alexander (c) 2008
Parts based on styleswitcher.js contained in prosilver

*/


var x,y;
if (self.innerHeight) // all except Explorer
{
x = self.innerWidth;
y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
// Explorer 6 Strict Mode
{
x = document.documentElement.clientWidth;
y = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
x = document.body.clientWidth;
y = document.body.clientHeight;
}

if (x >= 1420)
{
document.write("<link type='text/css' href='{T_THEME_PATH}/widest.css' rel='stylesheet' />");
} else if (x >= 1220)
{
document.write("<link type='text/css' href='{T_THEME_PATH}/wider.css' rel='stylesheet' />");
} else if (x >= 1070)
{
document.write("<link type='text/css' href='{T_THEME_PATH}/wide.css' rel='stylesheet' />");
} else
{
document.write("<link type='text/css' href='{T_THEME_PATH}/standard.css' rel='stylesheet' />");
}
// ]]>
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
gfrojdh
Mitglied / Member
Mitglied / Member
 
Beiträge: 8
Registriert: Do 13. Nov 2008, 16:03

Re: Using dynamic width

Beitragvon Marc » Do 11. Mär 2010, 21:04

I was actually more wondering how the rotating banner script is integrated.
Bild
Benutzeravatar
Marc
Administrator
Administrator
 
Beiträge: 383
Registriert: Di 2. Sep 2008, 23:48
Wohnort: Munich

Re: Using dynamic width

Beitragvon gfrojdh » Do 11. Mär 2010, 23:16

The rotate.php is called in the files wide.css, wider.css and widest.css like this:

/*
Style semi-dynamic width by Marc Alexander (c) 2008
*/
.outside {
width : 1400px;
}

.inside {
background-image: url("images/bg_body_widest.gif");
background-repeat: repeat-y;
}

#wrap {
width: 1350px;
}

.headerbar {
background-image: url("images/widest/rotate.php");
width: auto;
}
The folders wide, wider, widest each have a copy of the rotate.php, and the images that you want to randomize.

Contents of theme/images/wide:

-rw-r--r-- 1 32374 32374 18125 2008-12-14 13:54 header_random_wide_1.jpg
-rw-r--r-- 1 32374 32374 20479 2008-12-14 13:54 header_random_wide_2.jpg
-rw-r--r-- 1 32374 32374 9779 2008-12-14 13:54 header_random_wide_3.jpg
-rw-r--r-- 1 32374 32374 20348 2008-12-14 13:54 header_random_wide_4.jpg
-rw-r--r-- 1 32374 32374 5818 2008-12-20 00:55 rotate.php

//Goran
gfrojdh
Mitglied / Member
Mitglied / Member
 
Beiträge: 8
Registriert: Do 13. Nov 2008, 16:03

Re: Using dynamic width

Beitragvon Marc » So 14. Mär 2010, 12:54

I'll see if I get some time to adapt this for proFormell 1.2.4. ;)

What size do your banners have?


P.S: Moved to Styles Support.
Bild
Benutzeravatar
Marc
Administrator
Administrator
 
Beiträge: 383
Registriert: Di 2. Sep 2008, 23:48
Wohnort: Munich

Re: Using dynamic width

Beitragvon gfrojdh » Mo 22. Mär 2010, 18:09

Thank you for your support.

The banner sizes are:

866x150px
1150x150px
1350x150px
gfrojdh
Mitglied / Member
Mitglied / Member
 
Beiträge: 8
Registriert: Do 13. Nov 2008, 16:03


Zurück zu Styles Support - EN

Wer ist online?

Mitglieder in diesem Forum: Rhonin und 0 Gäste

x
Wer ist online?

Eine neue Private Nachricht wartet auf dich in deinem Posteingang.

Persönlicher Bereich

x