friendsterTalk - Friendster Forum

friendsterTalk - Friendster Forum

Welcome guest! Please Login or Register.

  • Multiply
  •  » pageViewer/OwnerFName Basis

#1  2008-01-07 21:52:31

xavierkym
» Retired Moderator
The Sinister
Class-S
Location: London, England
Registered: 2007-06-10
Posts: 5370
Reputation: 129
Friendster

pageViewer/OwnerFName Basis

Friendster uses the variables:
- pageViewerFName for the Viewer's Name and
- pageOwnerFName for the Owner's Name

In friendster, without coding the basis in our JS Codes we can easily call the variables because it is already included in the Page Source =) but in multiply we don't have any.. So, to call the pageOwnerFName and pageViewerFName we create our own variables in our JS File. Here's how to do it.

:arrow: CLICK HERE FOR PREVIEW

Copy and Paste the code :thumbsdown:

Code:

var pageOwnerFName;
var pageViewerFName;

pageOwnerFName = window.location.href.slice(7, window.location.href.indexOf("."));

try {
    pageViewerFName = getElementsByClassName(null,"span","signoutid")[0].firstChild.innerHTML.replace(/Hi,\s+?/gim, "");
}catch(e) {
    pageViewerFName = "";
}

function getElementsByClassName(oElm,sTag,sClass) {
        var elm = [];
        if (!oElm)oElm = document;
        if (!sTag)sTag = "*";
    var els = oElm.getElementsByTagName(sTag) || document.all;
            for (var j=0,k=els.length;j<k;j++) {
                 if (new RegExp(sClass).test(els[j].className)) {
                     elm.push(els[j]);
                 }
            }
             return elm;
}

And save it in your JS Files. How to use it?

Just simply use the variable in your scripts. :D

Example: Welcome Alert Box

Code:

alert("Hello! Welcome to my Profile "+pageViewerFName+"!!")


Example: Goodbye Alert Box

Code:

function init(){
  alert("Goodbye "+pageViewerFName+"!");
}
parent.window.onunload = init;


Example: Viewer's Name on Title Page

Code:

document.title = "Welcome to my Profile "+pageViewerFName+" ^_^"


Example: Force the Viewer to Login

Code:

if (pageViewerFName == "") {
    alert("Please Login your Multiply account to View My Page!");
    window.location.href="http://multiply.com";
}


Example: Block User/Enemy Ripper

if
(
pageViewerFName=="USERNAME1" ||
pageViewerFName=="USERNAME2" ||
pageViewerFName=="USERNAME3" ||
pageViewerFName=="USERNAME4" ||
pageViewerFName=="USERNAME5" ||
pageViewerFName=="USERNAME6"
){
    alert("You are BANNED to view this Profile!");
    top.location.href="http://multiply.com/user/signout";
}


Example: Special Greeting to Someone Special

if ( pageViewerFName=="USERNAME1" ) {
    alert("How are you today? I LOVE YOU");
}

It's up to you on where you want to put it.. =) Those are just some Examples. :D


Big Credits to Feruzz. :thumbsup:

Last edited by xavierkym (2008-01-07 23:31:35)


#2  2008-01-07 21:56:18

regiehiozn
» FriendsterWhiz
regiehiozn's display avatar
friendship :]
Location: your place
Registered: 2007-08-27
Posts: 3054
Reputation: 79
Friendster

Re: pageViewer/OwnerFName Basis

ooh.. nice!!! i havent seen this section before!!! :D

#3  2008-01-07 21:57:42

xavierkym
» Retired Moderator
The Sinister
Class-S
Location: London, England
Registered: 2007-06-10
Posts: 5370
Reputation: 129
Friendster

Re: pageViewer/OwnerFName Basis

Yeah. It's actually a New Section.

Just built 7hours ago. :lol:


#4  2008-01-07 22:26:09

blurrycloud
» Moderator
blurrycloud's display avatar
[ - AchilleS - ]
Class-S
Location: Aikhee's Heaven
Registered: 2007-09-07
Posts: 2568
Reputation: 98

Re: pageViewer/OwnerFName Basis

nice xave... thanks.. now i can make a tweak out of this one.. i hope..


Back to my default status: School mode

#5  2008-01-08 12:35:13

Lyas-rowkz
» Moderator
Lyas-rowkz's display avatar
Location: Mesia ♥
Registered: 2007-11-27
Posts: 10507
Reputation: 100
Friendster

Re: pageViewer/OwnerFName Basis

thx for sharing xave.. :thumbsup:



| p/s: i love you :P |

#6  2008-01-08 12:56:36

regiehiozn
» FriendsterWhiz
regiehiozn's display avatar
friendship :]
Location: your place
Registered: 2007-08-27
Posts: 3054
Reputation: 79
Friendster

Re: pageViewer/OwnerFName Basis

xave xavy xavier xavierkym..lots of nick names.. hihi..
@topic really?? who built it?? the admin you or the combined forces if programmers/ftalkers  :D  :D  lols..  :eh:

Last edited by regiehiozn (2008-01-08 12:56:51)

#7  2008-01-08 15:27:33

Ellakoi
» FriendsterTalker
Ellakoi's display avatar
Do you feel better now?:D
Laymakers Society
Location: 643-KSW
Registered: 2007-09-26
Posts: 247
Last visit: 2008-11-12
Reputation: 1

Re: pageViewer/OwnerFName Basis

Thanks for sharing!



#8  2008-01-09 02:15:10

agau
» Promoter
agau's display avatar
Everything's magic
.White Protector.
Location: ~in the dark~
Registered: 2007-06-27
Posts: 2839
Last visit: 2008-11-23
Reputation: 32

Re: pageViewer/OwnerFName Basis

weeew  :D  :D  nice..thank's for sharing :thumbsup:


1st account

2nd account

                   

#9  2008-01-09 02:56:10

dhruva_lady
» FriendsterNewbie
Registered: 2008-01-08
Posts: 1
Last visit: 2008-01-14
Reputation: ~

Re: pageViewer/OwnerFName Basis

susah susah susah

#10  2008-01-09 04:58:26

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

Re: pageViewer/OwnerFName Basis

you can apply this code into anti "poser"  :question:  cbox  :thumbsup:

Last edited by feruzz (2008-01-09 04:58:50)

#11  2008-01-09 07:16:22

sahabat.peterpan
» SuperFriendster
sahabat.peterpan's display avatar
Rockstars
Registered: 2007-10-31
Posts: 8431
Reputation: 58

Re: pageViewer/OwnerFName Basis

Very nice, Thanks for sharing  =)  :thumbsup:


#12  2008-01-09 19:00:14

xavierkym
» Retired Moderator
The Sinister
Class-S
Location: London, England
Registered: 2007-06-10
Posts: 5370
Reputation: 129
Friendster

Re: pageViewer/OwnerFName Basis

feruzz wrote:

you can apply this code into anti "poser"  :question:  cbox  :thumbsup:

Nice idea :o


#13  2008-01-22 18:12:16

karuro72002
» Promoter
karuro72002's display avatar
My Monster Cousin! ^^
Class-S
Registered: 2007-05-02
Posts: 4041
Reputation: 111

Re: pageViewer/OwnerFName Basis

ow yeh! thanks for sharing! :D




physical is the Illusion

#14  2008-02-11 20:36:30

kangkong10
» Promoter
kangkong10's display avatar
Registered: 2008-01-09
Posts: 1290
Reputation: 14

Re: pageViewer/OwnerFName Basis

thanks for sharing...


elow guys, I'm Back again

#15  2008-02-25 03:13:34

redphoenix_04
» FriendsterManiac
redphoenix_04's display avatar
_**donna**_
The Scandalers
Location: _**in ur hearts**_
Registered: 2007-06-20
Posts: 862
Last visit: 2008-10-30
Reputation: 9

Re: pageViewer/OwnerFName Basis

thanks for sharing!! :)



Click HERE   





ava and sig made by me. :)

#16  2008-02-29 19:27:24

usercp12
» FriendsterTalker
Registered: 2008-02-29
Posts: 111
Last visit: 2008-04-30
Reputation: ~

Re: pageViewer/OwnerFName Basis

wow...
sir xavierkym is a moderator here..
:thumbsup: go sir xavierkym..

  • Multiply
  •  » pageViewer/OwnerFName Basis

Search Friendstertalk

Moderated by Ephemeral, blurrycloud, dale

Board footer

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

[ 24 queries - 0.496 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. =)