• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Vista Sidebar Gadgets

krakjoe

stop staring
NLC
Anyone made any yet ???

They are just javascript and html .....

Heres a little one I made to get information about my wireless network

Do this :

Win Key + R
%userprofile%\AppData\Local\Microsoft\Windows Sidebar\Gadgets
Create a folder named Wifi-info.Gadget
Create a file inside the above folder named "Wifi-info.html"

HTML:
<html>
<head>
    <title>Wifi-info</title>
    <style>
        body
        {
            width: 130px;
            height: 100%;
            text-align: center;
            font-family: Tahoma;
            font-size: 10pt;
            position: absolute;
        }
    </style>
    <script language="javascript">
    
    var ssid ;
    var secure ;
    var ip ;
    
    function load( )
    {
		if( ssid )
		{
			ssidContent.innerText = ssid ;
			secureContent.innerText = secure ? 'Secure Network' : 'Insecure';	
			signalContent.innerText = 'Signal : ' + strength + '%';
			addressContent.innerText = 'IP : ' + address ;
		}
		else
		{
			ssidContent.innerText = 'Not Connected';
			secureContent.innerText = '';
			signalContent.innerText = '';
			addressContent.innerText = '';
		}
	}
	function detect( )
	{
	 	window.setTimeout( 'detect()', 1000 );
		ssid = System.Network.Wireless.ssid ;
		if( ssid )
		{
			strength = System.Network.Wireless.signalStrength ;
			address = System.Network.Wireless.address ;
			secure = System.Network.Wireless.secureConnection ;	
		}
		load( );
	}
    </script>
</head>
<body onload="detect( );">
<span id="ssidContent"></span>
<br />
<span id="secureContent"></span>
<br />
<span id="signalContent"></span>
<br />
<span id="addressContent"></span>
</body>
</html>

Create another file named "gadget.xml"

HTML:
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
    <name>Wifi-Info</name>
    <namespace>Wifi-Info</namespace>
    <version>1.0.0.0</version>
    <author name="Joe Watkins aka krakjoe">
        <info url="www.krakjoe.com" />
    </author>
    <copyright>© 2008-2010 J Watkins</copyright>
    <description>Simple Wifi Monitor</description>
    <hosts>
        <host name="sidebar">
            <base type="HTML" apiVersion="1.0.0" src="Wifi-info.html" />
            <permissions>Full</permissions>
            <platform minPlatformVersion="1.0" />
        </host>
    </hosts>
</gadget>

Now open the sidebar, and it'll be in the list of gadgets [ + at top of screen ]

Seriously, I think microsoft got it right for once, javascript is REAL easy to use and if I knew how to make things look nice that would be real easy too.....

Anyone have any suggestions for cool gadgets, I'm ---- at coming up with ideas .....
 
Have a screeny of your gadget?

I had an idea for one but I have no idea if it would be simple or not. Something that would check the number of Unread posts at various forums, like here and refresh by itself. Now that would make me more productive!
 
I can do that, you can use ajax so it's possible to achieve it I think, I'll mess around for a while.....

The one I made so far is real plain, just a white box with the information about my wifi network in it ....

http://krakjoe.com/images/Wifi-info.png

I'm gonna have a mess about to see if it'll make ajax requests across networks without giving error messages, ajax can do that, but in interenet explorer the requests are blocked to squash xss, I don't imagine it to be a problem the weather gadget will be doing exactly that .....

EDIT:

Wait ......
 
Last edited:
I did it ....

that tells you new posts since last visit and number of pms, however it only works for fws as the data is different on this website to other vb forums .....

http://krakjoe.com/images/FWStatos.png preview .....

just gonna put some finishing touches on it, couple of bugs arisen .....
 
Last edited:
You are the man, simply put.

Finish it up and hook me up with the download link!!!! I'd give you a +rep but I can't yet...
 
Awesome. Love it. My only recommendation would be that you could click on it and launch freewebspace.net/forums

Love it man, seriously.
 
Well... I might have a look at developing some gadgets... just upgraded to Home Premium from a RC1 version Rofl, I must say... way more stable and quicker too! :lol:

Edit:

wth do you need all that code for in prototype.js? It makes me cry :)
 
Last edited:
Awesome. Love it. My only recommendation would be that you could click on it and launch freewebspace.net/forums

Love it man, seriously.

done, download it again and as if by magic your wish will come true ....

I'm glad you like it, it was fun to make .......

@stuff .... prototype is hardly ever needed completely, it's a habit of mine when I work with ( marginally ) complicated js - not to reinvent the wheel everytime, prototype has a LOT of very useful functions, it's always good to have around.....although the js code for communication is only a few lines, had I coded it entirely myself without prototype it would be far far more .......
 
I'm trying to rewrite it, but for some reason, krakjoe.com is allowed to post data to here, but localhost ( 127.0.0.1 ) isn't, see at the moment, I wrote a sort of "Webservice" for it, as you would if you were using asp.net ajax ( which is what you should do ), the code for the service is good, and it's working really well ( as you know ) I'm just a little worried about security, don't panic, it's as secure as code can be, it would be far better for your own computer to make the requests though ......

I don't see the difference between your pc making a request automatically and you making request physically on the site ( browsing ), I don't suppose you know anything about the rules surrounding posting data to here ???

I want to make some more "features" like the ability to change your usertitle to something else, as I noticed you stay logged in even when you're not here, simply because you keep creating a session to get the data you want, and also, the ability to stop polling would be good ( you can set the frequency below 30 to do that, but still a button would be nice ), and the ability to carry on the session ( when you click on the gadget, it logs you in ), I can't do that with a webservice, the session is invalid for the ip, but if I can generate a session with javascripts only, then I can store the session id and append it to the url when you click on the gadget like ?s=sessionid

Can someone tell me why I can't post, it's quite unlikely I'm doing something wrong I think ...... also why can krakjoe.com post here ??? ( for the love of god don't change that ) ?????

If you don't know the answer to that, you have any more ideas ??? couple of hours to kill tonight .....
 
Last edited:
do you need something else for the Wifi Info gadget? all it says for me when i copy your code is...

Not Connected
 
did you try clicking on the wrench tool bar thing and entering any info? I'm guessing you have to do that... haven't personally tried it
 
There is no settings for the wifi one, and that's not really a "gadget" as such, it's an example of how to make a gadget, it worked on my system, but I don't plan to "make" it work on others .....

All of those methods are part of the gadget object, so it's not real programming, I just read it off the msdn website and wrote it down, hence it's too boring to bother with really .....

I have written a javascript, akin to prototype, with an Ajax.Request method not unlike prototypes, only my one is about 3kb and prototype is 70 ..... it has some neat features, like you can replace most methods with your own on initialization, you can specify a loading message or html, or a loading function to perform while requests are in progress, you can poll ( make continuous requests ) at set intervals, just like PeriodicalUpdater, it is written with gadgets in mind however it works cross browser anyway for websites, but I'm looking for a couple of javascript know it alls, ( or some at least ), to test this out for me, and find bugs with it ( possibly even develop it ), which I'm sure there are plenty, as it's quite an unbelivable size difference ......

Anyone up for testing it ?? I'm not so keen on just posting the code, not unless I have some takers .......

The reason I wrote my own, is mostly boredom, NOT to be better than prototype, nor as advanced as prototype is, I dunno how to use JSON or anything like that, apart from boredom, I took on board what stuff said, and 70kb is quite large when most of it is not needed, this object is for AJAX ONLY, not document manipulation, so it uses native methods and doesn't rely on prototype itself ......
 
well, ,if you decide to make the wifi thing work on other comps too, let me know. i would like to utilize its functionality.

also, i am up for testing your script. get on MSN to message me
 
Your FWS gadget sounds cool. Too bad I don't have Vista, else I would use it for sure. ;)
 
I'd love them, but I don't plan on getting Vista. You should try making some widgets for wxWidgets (Which is free for WinXP) as well krakjoe.
 
i made a couple small gadgets just ot see how easy it was, and now my work, ITtoolbox. is going to have me make gadgets for them that will relay how many messages you have, new connection posts ect. i got the idea from the FWS gadget you made. thanks. :D
 
Back
Top