
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.
CLICK HERE FOR PREVIEW
Copy and Paste the 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.
Example: Welcome Alert Box
alert("Hello! Welcome to my Profile "+pageViewerFName+"!!")
Example: Goodbye Alert Box
function init(){
alert("Goodbye "+pageViewerFName+"!");
}
parent.window.onunload = init;
Example: Viewer's Name on Title Page
document.title = "Welcome to my Profile "+pageViewerFName+" ^_^"
Example: Force the Viewer to Login
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.
Big Credits to Feruzz. ![]()
Last edited by xavierkym (2008-01-07 23:31:35)

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


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

thx for sharing xave.. ![]()

|
xave xavy xavier xavierkym..lots of nick names.. hihi..
@topic really?? who built it?? the admin you or the combined forces if programmers/ftalkers
lols.. 
Last edited by regiehiozn (2008-01-08 12:56:51)
-Offline- |

-Offline- |
susah susah susah
-Offline- |

Very nice, Thanks for sharing
![]()


feruzz wrote:
you can apply this code into anti "poser"
cbox
Nice idea 

ow yeh! thanks for sharing! 


thanks for sharing...

-Offline- |
wow...
sir xavierkym is a moderator here..
go sir xavierkym..
-Offline- |