TinyPortal

Development => Block Codes => Topic started by: alan s on September 01, 2006, 06:56:56 PM

Title: Msn Login Snippet
Post by: alan s on September 01, 2006, 06:56:56 PM
I made a msn web messenger mod for smf yesterday and i decided to edit it a bit to work with tinyportal aswell.

I have 2 methods.

1st Method : Requires a small bit of effort but not too much.

Looks Like :

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Ftheteenzone.net%2Fmsn1.gif&hash=11dba1a9ceac7d5986a160a8596249e54a118dee)

Step 1 : Upload package attached to this post via the smf package manager. That will place a file called msn.php in your forum folder.

Step 2 : In a block add this code ( editing the url to the name of your site and smf directory eg. http://mysite.com/smf/msn.php )

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=400,left = 470,top = 250');");
}
// End -->
</script>
<A HREF="javascript:popUp('http://YOURURLHERE/YOURSMFDIRECTORY/msn.php')">Login To Msn Via The Web!</A>


Also instead of text you could replace the " login to msn via the web" with a image by using the html image tag

<img src="http://yourimage.gif">

Or alternatively you could use a button by using this code


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=400,left = 470,top = 250');");
}
// End -->
</script>
<form>
<input type=button value="Button Text!" onClick="javascript:popUp('http://YOURSITE.COM/SMFDIR/msn.php')">
</form>


Note * When applying the package file it will come up as a modification to the index.template.php file , no code is added to the file , thats just there to make it install properly through the package manager , fell free to look at the msn.xml file if you dont believe me.

2nd Method: Requires no effort

Looks Like (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Ftheteenzone.net%2Fmsn2.gif&hash=c6317afdfe3fb384dc53396dbbc320903b8099e7)

Create a javascript/html block with this code in it.

<!--Thanks to Alan S for the code--!>
<form action="http://sofia.ebuddy.com//v6246/login.jsp" method="post" class="loginBETA" target="beta">
  <div align="center">
    <input value="290591" name="password" id="beta_password" type="hidden">
    <input name="network" value="msn" type="hidden">
    <label><font color="black"><b>Email</label>
    <br>
    <input name="passport" class="wide" value="@email.com" type="text">
    <br>
    <label>Password</label>
    <br>
    <input class="wide" id="beta_p" type="password">
    <br>
    <label>Initial Status</label>
    <br>
    <select name="initial" class="wide">
      <option value="NLN" selected="selected">Online</option>
      <option value="AWY">Away</option>
      <option value="BSY">Busy</option>
      <option value="BRB">Be Right Back</option>
      <option value="PHN">On The Phone</option>
      <option value="LUN">Out To Lunch</option>
      <option value="HDN">Appear Offline</option>
    </select>
    <br>
    <label>Secure Login</label>
    <input name="securelogin" id="secure" value="1" onclick="clickSecure('beta')" type="checkbox">
    <input class="formButton" value="Submit" onclick="javascript:doBetaLogin();" type="submit">
    <br>
  </div>
<center><font size=1pt><a href="http://theteenzone.net">Snippet By Alan S</a></font></center>



Demo of both : http://theteenzone.net/testforum


It doesnt matter what version of smf your using for the package manager install by the way , i've tested on Rc2 & Rc3 but it should work on the 1.0 series.

Enjoy!

-Edit forgot the package ! ooops
Title: Re: Msn Login Snippet
Post by: RoarinRow on September 02, 2006, 04:58:06 AM
Cool snippet Alan!   :up:
Title: Re: Msn Login Snippet
Post by: rctxtreme on September 02, 2006, 05:50:57 AM
e-buddy has more features than web messenger, even nudges
Title: Re: Msn Login Snippet
Post by: alan s on September 02, 2006, 11:37:22 AM
Yep im aware of that thats why i choose it over the official web messenger , eventually its on my plan to intergrate yahoo messenger and aim messenger login , first into the smf mod i created and then i'll work something out for a block.

By the way if anyone wants a screenshot of the web messening screen its the 2nd one here

http://mods.simplemachines.org/index.php?mod=446
Title: Re: Msn Login Snippet
Post by: whoesa on September 02, 2006, 01:51:22 PM
That's very cool, thx  ;)
Title: Re: Msn Login Snippet
Post by: timothy082003 on December 29, 2006, 09:54:01 PM
I'm having something weird happen with the second method. It's showing the bottom of the page in the block insteadÃ,  of the messenger.

I copied it exactly from the code above into a scriptbox.

Take a look at it here:

http://aroundtheusa.webpal.info/index.php

You'll need to login to see it. It's on the right.

Username: test
Password: test
Title: Re: Msn Login Snippet
Post by: timothy082003 on December 30, 2006, 02:36:57 AM
I gave the test account permission to edit the block so that you will be able to see the code.

It seems that the code changes every time I enter it and it will not load the rest of the block edit page. It's really unusual.
Title: Re: Msn Login Snippet
Post by: alan s on December 30, 2006, 06:00:17 PM
Quote from: timothy082003 on December 30, 2006, 02:36:57 AM
I gave the test account permission to edit the block so that you will be able to see the code.

It seems that the code changes every time I enter it and it will not load the rest of the block edit page. It's really unusual.
Thats strange , whats even stranger isthat a advertisment is appearing in its place , Is it only for that block or is it for all of them?
Title: Re: Msn Login Snippet
Post by: timothy082003 on December 30, 2006, 06:04:31 PM
It only changes that particular block but the rest of the blocks below it will not load. It alsodisables the ability to modify the block from the edit screen.