New themes installed

Started by Feline, 11 years ago

previous topic - next topic

0 Members and 1 Guest are viewing this topic.

Feline

*
#25
11 years ago
Good Morning  8)

Now I have make the Image Prelod conform to correct Javascript and SMF ..

Insert the code in the index.template.php just before:
Code Select
echo '
</head>
<body>';


The Image Preload code:
Code Select
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var PreloadImages = new Array(
"/images/submenu_top.png",
"/images/submenu_bg.png",
"/images/submenu_bottom.png"
);

var myImages = new Array();
for(var i = 0; i < PreloadImages.length; i++)
{
myImages[i] = new Image();
myImages[i].src = "'. $settings['theme_url'] .'" + PreloadImages[i];
}
// ]]></script>';


Now you must ony change the content of first array (path, name of image).

Fel
Many are stubborn in relation to the way, but less in relation to the target.

antechinus

*
#26
11 years ago
Awesome. Thanks for that. I was playing with it myself but didn't get it working without using the absolute path. I was actually thinking I might do it as a separate js file in the theme and call it like this:

Code Select
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/drop_preload.js?b4"></script>

with the same preload code in the js file of course. Makes for a neater template that way.
Using Internet Explorer 6 on the internet is like urinating in a public swimming pool.
It's rude, there's no excuse for it, and anyone who does it should be ashamed of themselves.

Feline

*
#27
11 years ago
That do not works, the php code is'nt evaluated.

But you can uses this:
Index.template.php
Code Select
// Load the javascrip code
echo '
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/imageloader.js"></script>';

// define the preload images
$images = array(
'"submenu_top.png"',
'"submenu_bg.png"',
'"submenu_bottom.png"'
);

// now call the javascrip loader
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
PreloadImages("', $settings['theme_url'], '/images/",', implode(',', $images),');
// ]]></script>';


and the javascript (imageloader.js) shown as:
Code Select
// Javascript Image loader
function PreloadImages(arg)
{
var myImages = new Array();
for(var i = 1; i < PreloadImages.arguments.length; i++)
{
myImages[i] = new Image();
myImages[i].src =  PreloadImages.arguments[0] + PreloadImages.arguments[i];
}
}


That works.

Fel
Many are stubborn in relation to the way, but less in relation to the target.

Guest

*
#28
11 years ago
fel, what did you change to widen the display?

Feline

*
#29
11 years ago
Look at the theme style.ccs and find the .wrapper entry.
For DS I have change that to:
Highlighted code

.wrapper {
	
width97%;
	
margin0 auto;
	
padding0;
}

Fel
Many are stubborn in relation to the way, but less in relation to the target.

antechinus

*
#30
11 years ago
It's the same with most Dziner themes, Bob. Bikken usually does the width control in the wrapper div and by default he usually sets it to around 950px. There are a couple of exceptions but not many. I always change it to a percentage. Generally I prefer them around 90-95% depending on the style of the theme.
Using Internet Explorer 6 on the internet is like urinating in a public swimming pool.
It's rude, there's no excuse for it, and anyone who does it should be ashamed of themselves.

Feline

*
#31
11 years ago
Agree .. 950px definitively tooo small  ;)
Many are stubborn in relation to the way, but less in relation to the target.

Guest

*
#32
11 years ago
Thanks feline 8)

* Shouts

Feline
a year ago
Today we update our Forum to the Version 1.45
Feline
a year ago
Today we update our Forum to Version 1.4
This release is full compatible with the EU GDPR
Feline
a year ago
Update for PortaMx 1.54 ecl released.
With this updates the Portal works with PHP 7.x and SMF 2.0.15
Feline
a year ago
PortaMx Forum 1.3
released !

*
Feline
2 years ago
Today we switched to PHP 7.2 and activate Opcode caching.
Fast .. Very fast *
Feline
2 years ago
Today we upgrade our old SMF 2.0 Forum to PortaMx Forum *

* Calendar

Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31