Posted 9 years ago
·
Author
These code snippets will allow you to prevent people who are not logged in from viewing your homepage.
Note: These are not 100% effective, anyone with a javascript blocker can view your page and anyone who uses the "view source" menu option can see your homepage code (Granted they would need to go run that code through an html tester to see anything unless they just want raw data).
This code will hide all of your panels on the screen but leave everything else visible
[code=javascript file=Untitled.txt]
if(window.IMVU.data.customerID == 0)
{
$("div[id*='_panel']" ).hide();
}[/code]
This code will delete your panels from your homepage (don't worry they aren't gone forever, you just have to refresh the page)
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
$("div[id*='_panel']" ).remove();
}[/code]
This code will erase everything inside the body of your homepage leaving nothing but the IMVU header
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
$("body" ).remove();
}[/code]
This code will erase the entire page
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
$("html" ).remove();
}[/code]
This code will force your visitor to load another webpage instead of your homepage. It can also be combined with the other codes above for extra security.
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
document.location.href = "http://google.com";
}[/code]
Note: These are not 100% effective, anyone with a javascript blocker can view your page and anyone who uses the "view source" menu option can see your homepage code (Granted they would need to go run that code through an html tester to see anything unless they just want raw data).
This code will hide all of your panels on the screen but leave everything else visible
[code=javascript file=Untitled.txt]
if(window.IMVU.data.customerID == 0)
{
$("div[id*='_panel']" ).hide();
}[/code]
This code will delete your panels from your homepage (don't worry they aren't gone forever, you just have to refresh the page)
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
$("div[id*='_panel']" ).remove();
}[/code]
This code will erase everything inside the body of your homepage leaving nothing but the IMVU header
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
$("body" ).remove();
}[/code]
This code will erase the entire page
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
$("html" ).remove();
}[/code]
This code will force your visitor to load another webpage instead of your homepage. It can also be combined with the other codes above for extra security.
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
document.location.href = "http://google.com";
}[/code]