Post by Cam on May 5, 2011 3:20:02 GMT
[CB] Short BIO in mini-profile version 1
Here is a semi-long not long description/how to use this code, it is probably quite hard for some of our users to understand how to use, so in the best possible way, I will attempt to show how you could use it, what it does and how to add users. Note this is version one, in the future I have a few other ideas for it which I won't add in this version.
How could you use it? An example of how you could use it could be you make a thread and members can choose to have a biography and what it says. I would recommend limiting the amount of letters allowed, this is a great code for RPG sites because you can have a biography about the users character!
Description This pretty much just adds a special little place in the mini-profile for a nice biography of the user, I would recommend letting the user choose what you add to it
How to use it OK, here it goes, I will attempt to master the art of explaining
So as you will see in the actual code, I have explained a little about it. For each user you add you need to add:
if(username=='USER'){
td[x].innerHTML += "<br /><br />Insert bio for user here! ";
}
Change the underlined USER to the username of the user, eg. admin, tony etc. Then changed the bold/underline text to the bio the user wants in their profile. You add the code above and change the things for each user, so if you had three users with the usernames: admin, user1, user2 you would see something looking like:
if(username=='admin'){
td[x].innerHTML += "<br /><br />Insert bio for user here! ";
}
if(username=='user1'){
td[x].innerHTML += "<br /><br />Insert bio for user here! ";
}
if(username=='user2'){
td[x].innerHTML += "<br /><br />Insert bio for user here! ";
}
You add that under:
// INSERT ALL BIOS BELOW HERE!
And above:
// INSERT ALL BIO'S ABOVE HERE!
and then you can have biography's for members! If you need ANY support, use the requests board on www.codercommunity.proboards.com
Now here is the code, put it in your footers!
Well, enjoy!
Here is a semi-long not long description/how to use this code, it is probably quite hard for some of our users to understand how to use, so in the best possible way, I will attempt to show how you could use it, what it does and how to add users. Note this is version one, in the future I have a few other ideas for it which I won't add in this version.
How could you use it? An example of how you could use it could be you make a thread and members can choose to have a biography and what it says. I would recommend limiting the amount of letters allowed, this is a great code for RPG sites because you can have a biography about the users character!
Description This pretty much just adds a special little place in the mini-profile for a nice biography of the user, I would recommend letting the user choose what you add to it
How to use it OK, here it goes, I will attempt to master the art of explaining
So as you will see in the actual code, I have explained a little about it. For each user you add you need to add:
if(username=='USER'){
td[x].innerHTML += "<br /><br />Insert bio for user here! ";
}
Change the underlined USER to the username of the user, eg. admin, tony etc. Then changed the bold/underline text to the bio the user wants in their profile. You add the code above and change the things for each user, so if you had three users with the usernames: admin, user1, user2 you would see something looking like:
if(username=='admin'){
td[x].innerHTML += "<br /><br />Insert bio for user here! ";
}
if(username=='user1'){
td[x].innerHTML += "<br /><br />Insert bio for user here! ";
}
if(username=='user2'){
td[x].innerHTML += "<br /><br />Insert bio for user here! ";
}
You add that under:
// INSERT ALL BIOS BELOW HERE!
And above:
// INSERT ALL BIO'S ABOVE HERE!
and then you can have biography's for members! If you need ANY support, use the requests board on www.codercommunity.proboards.com
Now here is the code, put it in your footers!
<script type="text/javascript">
<!--
// [CB] Short BIO in mini-profile version 1
// [url]http://codercommunity.proboards.com[/url]
/*
OK, since this is probably going to be another complicated code for some people, I will try explain how you add members bio's here.
So, for every member you want to add, you need to add the following below the sign which says // INSERT ALL BIOS BELOW HERE!
if(member=='USERNAME'){
td[x].innerHTML += "INSERT BIO HERE!";
}
Add the above changing the USERNAME part to the users username, eg. admin etc.
Where it says INSERT BIO HERE! Put the user's bio there. To get a bio from a user just ask them, or create a thread where
they can order/ask for one. you can keep repeating adding the part above as many times you want.
Help time is over =[ go to codercommunity.proboards.com if you need help =]
*/
if(pb_username=='admin'){
if(pb_action == "display" || pb_action == "viewprofile") {
for(var td = document.getElementsByTagName("td"), x = 6; x < td.length; x++) {
if(td[x].width == "20%" && td[x].getElementsByTagName("center")[0]) {
var a = td[x].getElementsByTagName("a"), b = a.length, c = 0, username;
while(c < b){
if(a[c].className && a[c].className.match(/group/i)){
username = a[c].href.split("=")[2];
break;
}
c++;
}
//START of BIOS
// INSERT ALL BIOS BELOW HERE!
if(username=='admin'){
td[x].innerHTML += "<br /><br />Insert bio for user here! ";
}
// INSERT ALL BIO'S ABOVE HERE!
}
}
}
}
//-->
</script>
Well, enjoy!