friendsterTalk - Friendster Forum

friendsterTalk - Friendster Forum

Welcome guest! Please Login or Register.

  • Myspace
  •  » Spawn User's Photo in Primary Photo

#1  2008-04-20 12:41:53

feruzz
» Retired Moderator
feruzz's display avatar
X-Mod
Class-S
Location: Malaysia
Registered: 2007-02-18
Posts: 8262
Reputation: 134
???

Spawn User's Photo in Primary Photo

Well I'm back to my business :crybaby:
since I've decided to move from Filster :lol: to Myspace :thumbsup:
nothing special about this trick
Its similar to my work in Filster lol :cry:
Preview :arrow: My Profile (log-in your myspace account to see the effect =D )

no innerHTML has been applied in this trick =D

I'll post many tricks if Myspace didnt filter the linker because they are better than Filster in that case :o :thumbsup:

the code

Code:

if (typeof VIEWERPIC == "undefined" || ! VIEWERPIC)
 {VIEWERPIC = window.VIEWERPIC || {};
 }
(function()
 {VIEWERPIC =  { // private property
    photo: null, 
    info:  {photo: null}, 
    regexp:  {photo: /ctl00_Main_ctl00_UserBasicInformation1_hlDefaultImage"[\S\s]*?src="([\S]*?)"/i}, 
    init: function()
   {   if (MySpace.ClientContext.IsLoggedIn !== false)
     {try 
       {VIEWERPIC.ajaxRequest("GET", "http://" + location.hostname + 
          "/index.cfm?fuseaction=user.viewprofile&friendid=" + MySpace.ClientContext.UserId, true, null, 
          VIEWERPIC.viewer, null);
       }
     catch (e){}
     }
   }
 , 
    viewer: function(htm)
   {if (htm.replace( /^\s*|\s*$/g, "") === "")
     {alert("ERROR: Empty xmlresponse! \n Unable to parse your details!");
      return;
     }
    else if (htm)
     {try 
       {VIEWERPIC.info.photo = new RegExp(VIEWERPIC.regexp.photo).exec(htm)[1].replace( /^(\d)$/, 
          "0$1");
       }
     catch (e)
       {       VIEWERPIC.info.photo = "";
       }
     }
    ctl00_Main_ctl00_UserBasicInformation1_hlDefaultImage.getElementsByTagName("img")[0].src = 
      VIEWERPIC.info.photo;
   }
 , 
    ajaxRequest: function(type, 
    url, 
    cont, 
    param, 
    func, 
    handlerparam)
   {var httprequest = null;
    var msxml =["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", 
      "Microsoft.XMLHTTP"];
    for (var x = 0, len = msxml.length;x < len;x++)
     {try 
       {httprequest = window.XMLHttpRequest ? new XMLHttpRequest(): new ActiveXObject(msxml[x]);
        break;
       }
     catch (e)
       {httprequest = null;
       }
     }
    if (typeof func === "function")
     {httprequest.onreadystatechange = function()
       {if (httprequest.readyState === 4)
         {if (httprequest.status === 200)
           {func(httprequest.responseText, handlerparam);
           }
         }
       };
     }
    httprequest.open(type, url, cont);
    httprequest.setRequestHeader("ajaxRequest", "true");
    httprequest.setRequestHeader("X-Requested-With", "XMLHttpRequest");
    httprequest.setRequestHeader("Accept", 
      "text/javascript, text/html, application/xml, text/xml, */*");
    if (type === "POST")
     {var contentLength = param ? param.length: 0;
      httprequest.setRequestHeader("Content-type", 
        "application/x-www-form-urlencoded");
      httprequest.setRequestHeader("Content-length", contentLength);
      if (httprequest.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || 
        [0, 2005])[1] < 2005)
       {httprequest.setRequestHeader("Connection", "close");
       }
     }
    httprequest.send(param);
   }
 };
 })();
VIEWERPIC.init();

if you found a bug just comment me in this thread
thanks to shakiro for the JS linker :cool: :thumbsup:

Last edited by feruzz (2008-04-23 04:54:15)

#2  2008-04-20 23:21:36

losher29
» FriendsterWhiz
losher29's display avatar
weirdo.
Alchemy Explicit AE
Location: isolated island
Registered: 2008-04-02
Posts: 2532
Last visit: Today
Reputation: 9

Re: Spawn User's Photo in Primary Photo

thank you!!..coool !!



tђเร เร ๓א ฬђєภ เ๓ Ŧгєคкเภﻮ ๏ยt.

#3  2008-04-21 03:11:09

shakiro214
» FriendsterGeek
shakiro214's display avatar
[ Eternal Scientist ]
Class-S
Location: I'm@work
Registered: 2007-08-12
Posts: 1378
Reputation: 90
Friendster

Re: Spawn User's Photo in Primary Photo

I noticed this earlier bro.  It really fooled me :wasted: ehehe
:lol: :thumbsup: I'll look forward to more of your creations

shakiro dash! ~~~ :penguin:


#4  2008-04-22 14:02:47

feruzz
» Retired Moderator
feruzz's display avatar
X-Mod
Class-S
Location: Malaysia
Registered: 2007-02-18
Posts: 8262
Reputation: 134
???

Re: Spawn User's Photo in Primary Photo

thanks guys :cool: :thumbsup:
I'm just a noob about myspace but thats not a problem anyway :crybaby:

#5  2008-05-06 06:35:25

klaralalatotx
» FriendsterNewbie
Location: LAGUNA
Registered: 2008-05-06
Posts: 3
Last visit: 2008-05-06
Reputation: ~
Friendster

Re: Spawn User's Photo in Primary Photo

:]:)

#6  2008-05-08 07:02:24

losher29
» FriendsterWhiz
losher29's display avatar
weirdo.
Alchemy Explicit AE
Location: isolated island
Registered: 2008-04-02
Posts: 2532
Last visit: Today
Reputation: 9

Re: Spawn User's Photo in Primary Photo

hey feruzz you might wanna edit the title
its DEFAULT photo not primary :D



tђเร เร ๓א ฬђєภ เ๓ Ŧгєคкเภﻮ ๏ยt.

#7  2008-05-08 14:53:58

feruzz
» Retired Moderator
feruzz's display avatar
X-Mod
Class-S
Location: Malaysia
Registered: 2007-02-18
Posts: 8262
Reputation: 134
???

Re: Spawn User's Photo in Primary Photo

^ nah...whatever
as long as the code works its ok :lol:

#8  2008-05-09 07:24:01

losher29
» FriendsterWhiz
losher29's display avatar
weirdo.
Alchemy Explicit AE
Location: isolated island
Registered: 2008-04-02
Posts: 2532
Last visit: Today
Reputation: 9

Re: Spawn User's Photo in Primary Photo

OKAY
&&Thanks for the code
everybodys asking me
how to do that but then I
just keeeep it as a SECRET :D:thumbsup:
&the linkers too

Last edited by losher29 (2008-05-09 07:25:03)



tђเร เร ๓א ฬђєภ เ๓ Ŧгєคкเภﻮ ๏ยt.

#9  2008-06-30 02:54:24

CoWoCuPu
» Promoter
CoWoCuPu's display avatar
.White Protector.
Registered: 2008-04-01
Posts: 3912
Last visit: Today
Reputation: 175

Re: Spawn User's Photo in Primary Photo

feruzz wrote:

as long as the code works its ok

yup...
exactly sir....
hohoho...

btw,, it's cool man!!
keep on sharing!! ;):thumbsup:

  • Myspace
  •  » Spawn User's Photo in Primary Photo

Moderated by dale

Board footer

FriendsterTalk is not affiliated with Friendster.com
Copyright © 2002–2008 PunBB

[ 17 queries - 0.183 second ]

Pay Per Click Ads by pay per click advertising by Kontera

FriendsterTalk.com x

Welcome to FriendsterTalk! You'll need to login in order to fully use all the features and view all the sections of this site.

Please register if you're not yet a member. =)