Jump to content

WPI v5.0.1


Recommended Posts


Yeah, I like the look of it significantly more. Although, it does leave a <label> with no associated <input>. Oh well, not that big of a deal. It still looks fine. I suppose it may be best to test in IE7, though. I don't have it.

Also, here's that png alpha-index fix (put this in the header of wpi.htm:

<!--[if lt IE 7]>
<script defer type="text/javascript">

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

if ((version >= 5.5) && (document.body.filters))
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
if (img.align == "left") imgStyle = "float:left;" + imgStyle
if (img.align == "right") imgStyle = "float:right;" + imgStyle
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
</script>
<![endif]-->

That tweak allows for 8bit alpha indexing with png images. I just tested it and it worked. I didn't even have to specify the height/width (unlike some of the older methods).

Edited by Dumpy Dooby
Link to comment
Share on other sites

Kel,

in your %OEM% archive in the 1st post, you may be missing the "Theme" folder in between the "Resources" & "Royale" ones.

At least to match the "DllName" value of the included "Theme.reg".

Link to comment
Share on other sites

I'm sorry for my question -Timer on-

I'm dumb a** :}

Should be likie this

Timer=true;
Seconds=6;
InstallByCategory=true;
ReallyForce=false;
DiscPath='';

:P

Edited by Yurek3
Link to comment
Share on other sites

Hi -

the Downloadable $OEM$ folder ,for autostart WPI after Unattended installation, doesnt work right.

The runonceex.cmd hasnt the CD search routine included. So it will install from drive c: (or where ever your system is).

Also with this method there could be problems, if you have an other drive(s), which is empty. Windows will stop the process and generate a splashscreen, what to do ( ignore etc...). Not very unattended anymore.

Here is a better solution. This small autoitscript doesnt search for the CDrom anymore, it starts wpi.hta exactly from the drive where the script runs from. Also shows no black dos-screen.

Just replace runonceex.cmd in $OEM$ folder by my WPI.exe and replace the entry "runonceex.cmd" in the cmdlines.txt through "WPI.exe"

One thing: WPI folder must be in the root of the CD (as usual).

DOWNLOAD: WPI.exe

this is the Autoit- code - very simple, isnt it?

FileChangeDir("..\")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\999","1","REG_SZ",@WorkingDir& '\WPI\WPI.hta')

Edited by wixfigura
Link to comment
Share on other sites

To make the timer go away when you stop it (presumably by clicking anywhere on the page), you can do the following...

Find the following in wpi.htm:

<!-- Timer and StopWatch -->
<tr>

Replace with:

<!-- Timer and StopWatch -->
<tr id="countdown">

Now in timers.js, find the following:

position="timers.js";
whatfunc="stopInterval()";

And add the following after it:

timertr = document.getElementById("countdown");
timertr.style.visibility="hidden";

So the stopInterval() function should look something like this:

function stopInterval()
{
position="timers.js";
whatfunc="stopInterval()";

timertr = document.getElementById("countdown");
timertr.style.visibility="hidden";

window.clearInterval(interval);
interval="";

}

I'm going to work on replacing the timer section with a stop sign or something. I intend to use stop2.png from the PNG Collection pack that Kels posted a while back.

Edited by Dumpy Dooby
Link to comment
Share on other sites

Okay, this will be a little more complex. If you're a newbie, you can give this a shot, but just make sure you know how to undo anything you mess up (back up any files before editing if you're unsure). This will only look right if you used my PNG tweak above (due to 8-bit alpha indexing in stop.png).

Again, we're going to edit WPI.HTM.

  1. Find (this is from the post above; if you already did that one, then you can skip this step):
    	<img id="stoppedimage" src="./themes/Glossy/stop.png" alt="Timer stopped" height="0" width="0" style="position: absolute; visibility: hidden;" />
    <div id="stopped" height="0" width="0" style="position: absolute; visibility: hidden;">
    <table class="text" width="100%" border="0" cellpadding="0" cellspacing="1">
    <tr>
    <td valign="middle" align="center"><b><!-- <script type="text/javascript">document.write(getText(TimerStopped));
    </script> -->Stopped</b></td></tr></table></div>


    (Note the commented javascript. That's in case this gets implemented into WPI permanently. But for now, just ignore it and keep it commented.)
    (Also, note stop.png. I will be providing that image in just a second. Make sure you put it in ./themes/Glossy/)

Now we will edit timers.js...

Find:

function stopInterval()
{
position="timers.js";
whatfunc="stopInterval()";

window.clearInterval(interval);
interval="";
}

Replace with:

{
position="timers.js";
whatfunc="stopInterval()";

if (Timer) {
timertr = document.getElementById("countdown");
stoppedimg = document.getElementById("stoppedimage");
stoppeddiv = document.getElementById("stopped");

/**********************************************************************************
* These are just estimations that tend to look okay with the various resolutions.
* I'm sure they could definitely go for some improvement.
**********************************************************************************/
spacel = document.body.clientWidth / 60;
spaceb = document.body.clientHeight / 10;

timertr.style.visibility="hidden";
stoppeddiv.style.visibility="visible";
stoppeddiv.style.width = "120px";
stoppeddiv.style.height = "120px";
stoppeddiv.style.left = spacel;
stoppeddiv.style.bottom = spaceb - 35;
stoppeddiv.style.valign = "middle";
stoppeddiv.style.align = "center";

stoppedimg.style.visibility="visible";
stoppedimg.style.width = "120px";
stoppedimg.style.height = "120px"
stoppedimg.style.left = spacel;
stoppedimg.style.bottom = spaceb;
}

window.clearInterval(interval);
interval="";

}

Here is stop.png (right-click, save, and rename accordingly):

post-56247-1149681130_thumb.png

And finally, here's a screenshot that shows off my modifications (for those that care).

wpi-modified_thumb.png

Click the image for the full size version.

Edited by Kelsenellenelvian
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...