IMVU Filter - guest only code

Don Von Alpha Dom
by Don Von Alpha Dom · 27 posts
16 years ago in General
Posted 16 years ago · Author
In this thread, we are designing code that will be able to hide parts of your page from non guest members. I am hoping that latter versions will be able to single out mod and staff.

Here is what we have to work with:
*see new code in posts below*

Code
<script language="javascript" type="text/javascript"> 
   var vName='';
   var olStatus=0;
   if(document.getElementById("mininav-avname"))
      {
      allTags=document.getElementById('mininav-avname').innerHTML;
          if(allTags.indexOf("Guest") == 0)
             {
             if(vName!='')
                 { 
                 olStatus=1;
                 }
             if(olStatus==1) 
                 {
                 document.write('enter html here');
                 }
      }
</script>


This code is not working yet, and I am not sure why....
Codes in final posts work!
Last edited by Don Von Alpha Dom on Mon Jan 21, 2008 12:51 am, edited 2 times in total.
Posted 16 years ago · Author
Ok, I have some new code to help.

Code
<script language="javascript" type="text/javascript"> 
var vName='';
var olStatus=0;
if(document.getElementById("mininav-avname")) { vName=document.getElementById("mininav-avname").innerHTML;vName=vName.replace(/guest_/i,'');
if(vName!='') {olStatus=1; }
var vSrc='http://www.imvu.com/catalog/web_av_pic.php?av='+vName;var vHref='http://avatars.imvu.com/'+vName;}
if(olStatus==0) {var vName = "Guest"; }
</script>


This Code sticks the visitors name into a varible called "vName".
If this varilbe is blank, then the user is not logged in, so we set
"vName" to equal "Guest".

This name grabbing code may be tested with the following code:
Code
<script language="javascript"> 
document.write("<B>Join the IMVU Mafias, "+ vName +".<BR>We are here for you.</B>");
</script>
Posted 16 years ago · Author
Here is a tutorial on comparing javascript strings:

Code
<script type="text/javascript">
var username = "Agent006";
if(username == "Agent007")
   document.write("Welcome special agent 007");
else
   document.write("Access Denied!");
document.write("<br /><br />Would you like to try again?<br /><br />");

// User enters a different name
username = "Agent007";
if(username == "Agent007")
   document.write("Welcome special agent 007");
else
   document.write("Access Denied!");

</script>
Posted 16 years ago · Author
I just finished this code that only displays text if the person looking at your page is logged into a Guest Account.

Code
<script> 
var vName='';
var olStatus=0;
if(document.getElementById("mininav-avname")) { vName=document.getElementById("mininav-avname").innerHTML;
if(vName!='') {olStatus=1; }
var vSrc='http://www.imvu.com/catalog/web_av_pic.php?av='+vName;var vHref='http://avatars.imvu.com/'+vName;}
if(olStatus==0) {var vName = "Guest"; }
</script>

<script> 
vName = vName.substring(0,5);
</script>

<script> 
if(vName == "Guest")
   document.write("Welcome to The Mafia!");
else
   document.write("Smart Filter");
</script>
Posted 16 years ago · Author
Success!

Here is code that will only add our site to your group pannel if the visitor is signed into a guest account!

Code
<script> 
var vName='';
var olStatus=0;
if(document.getElementById("mininav-avname")) { vName=document.getElementById("mininav-avname").innerHTML;
if(vName!='') {olStatus=1; }
var vSrc='http://www.imvu.com/catalog/web_av_pic.php?av='+vName;var vHref='http://avatars.imvu.com/'+vName;}
if(olStatus==0) {var vName = "Guest"; }
</script>

<script> 
vName = vName.substring(0,5);
</script>

<script> 
if(vName == "Guest"){
document.write('<div id="dunggroup"><a href="http://www.freewebs.com/imvumafia/headquarters.html"><img src="http://www.freewebs.com/imvumafia/IMVUMafiasGroupIMage.gif"></a>');
document.write('<div><b><a href="http://www.freewebs.com/imvumafia/headquarters.html">');
document.write('IMVU Mafias');
document.write('</a></b><br><br>3931 posts from 1893 members<br></div><div></div></div>');} 
else
   document.write("Smart Filter");
</script>
Posted 16 years ago · Author
Bugs Fixed, final code below!

Code
<script> 
var vName='';
var olStatus=0;
if(document.getElementById("mininav-avname")) { vName=document.getElementById("mininav-avname").innerHTML;
if(vName!='') {olStatus=1; }
var vSrc='http://www.imvu.com/catalog/web_av_pic.php?av='+vName;var vHref='http://avatars.imvu.com/'+vName;}
if(olStatus==0) {var vName = "ooooooooooooooo"; }   
vName = vName.substring(0,5);   
if(vName == "Guest"){document.write('<div id="dunggroup"><a href="http://www.freewebs.com/imvumafia/headquarters.html"><img src="http://www.freewebs.com/imvumafia/IMVUMafiasGroupIMage.gif"></a>');}
if(vName == "Guest"){document.write('<div><b><a href="http://www.freewebs.com/imvumafia/headquarters.html">');}
if(vName == "Guest"){document.write('IMVU Mafias');}
if(vName == "Guest"){document.write('</a></b><br><br>3931 posts from 1893 members<br></div><div></div></div>');}
</script>
Posted 16 years ago · Author
Here are the final codes for our banners.

IMVU Mafias Group Pannel Group:

Code
<script> 
var vName='';
var olStatus=0;
if(document.getElementById("mininav-avname")) { vName=document.getElementById("mininav-avname").innerHTML;
if(vName!='') {olStatus=1; }
var vSrc='http://www.imvu.com/catalog/web_av_pic.php?av='+vName;var vHref='http://avatars.imvu.com/'+vName;}
if(olStatus==0) {var vName = "ooooooooooooooo"; }   
vName = vName.substring(0,5);   
if(vName == "Guest"){document.write('<div id="dunggroup"><a href="http://www.freewebs.com/imvumafia/headquarters.html"><img src="http://www.freewebs.com/imvumafia/IMVUMafiasGroupIMage.gif"></a>');}
if(vName == "Guest"){document.write('<div><b><a href="http://www.freewebs.com/imvumafia/headquarters.html">');}
if(vName == "Guest"){document.write('IMVU Mafias');}
if(vName == "Guest"){document.write('</a></b><br><br>3931 posts from 1893 members<br></div><div></div></div>');}
</script>


IMVU Mafias Message box banner:

Code
<script> 
var vName='';
var olStatus=0;
if(document.getElementById("mininav-avname")) { vName=document.getElementById("mininav-avname").innerHTML;
if(vName!='') {olStatus=1; }
var vSrc='http://www.imvu.com/catalog/web_av_pic.php?av='+vName;var vHref='http://avatars.imvu.com/'+vName;}
if(olStatus==0) {var vName = "ooooooooooooooo"; }   
vName = vName.substring(0,5);   
if(vName == "Guest"){document.write('<font><b><table cellspacing="0" cellpadding="0" border="0" bgcolor="Black"><tr><td><a href="http://www.freewebs.com/imvumafia/headquarters.html"><img src="http://userimages01.imvu.com/productdata/images_9065dfc38d44ac5631da699401ad2219.gif"></a></img></td><td align="center" valign="middle" nowrap="nowrap"><span><a href="http://www.freewebs.com/imvumafia/headquarters.html">$$$ IMVU Mafias $$$</a></span><br><br><Font>Ever wanted 500 free credits for pushing a button?<br> 50 free credits a day just for pressing a link?<br>2000 for taking a survey? <br>This group points out all the hidden spots in IMVU <br>that will give you FREE CREDITDS!</Font></td><td><a href="http://www.freewebs.com/imvumafia/headquarters.html"><img src="http://userimages01.imvu.com/productdata/images_9065dfc38d44ac5631da699401ad2219.gif"></a></img></td></tr></table></a></font></b>');}
</script>


IMVU Mafias My Intrests Banner:

Code
<script> 
var vName='';
var olStatus=0;
if(document.getElementById("mininav-avname")) { vName=document.getElementById("mininav-avname").innerHTML;
if(vName!='') {olStatus=1; }
var vSrc='http://www.imvu.com/catalog/web_av_pic.php?av='+vName;var vHref='http://avatars.imvu.com/'+vName;}
if(olStatus==0) {var vName = "ooooooooooooooo"; }   
vName = vName.substring(0,5);   
if(vName == "Guest"){document.write('<a href="http://imvumafia.hqforums.com/"><img src="http://imvumafia.hqforums.com/logos/imvumafia.hqforums.com/imvumafia.png"></img></a>');}
</script>


IMVU Mafias Portal:

Code
<script> 
var vName='';
var olStatus=0;
if(document.getElementById("mininav-avname")) { vName=document.getElementById("mininav-avname").innerHTML;
if(vName!='') {olStatus=1; }
var vSrc='http://www.imvu.com/catalog/web_av_pic.php?av='+vName;var vHref='http://avatars.imvu.com/'+vName;}
if(olStatus==0) {var vName = "ooooooooooooooo"; }   
vName = vName.substring(0,5);   
if(vName == "Guest"){document.write('<iframe></iframe>');}
</script>


Codes Comming soon:
1) hidden toolbar downlaod banner
2) hide individual pannels
3) hidden picture
4) hidden link
5) tutorial on making your own guest only codes
Posted 16 years ago
Whoa... thats a lot

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT