Post by Peter on Oct 29, 2004 14:56:33 GMT
Code created by Awesome Andrew[/color]
*I figured I'd post it here since Web closed down his site and this is the only other good one I know for PB modifications*
Description: This script will allow users to choose permanent (well until they decide to change it) styles to their own profiles. I got the idea from ezBoard, which uses "global" member accounts and allows users to access the profiles and add CSS. It is very simple to add more styles from users to choose from too. The CSS classes in the profile are the normal Proboards CSS classes, so you'd only need to modify and upload those.
[ADDED]
1. In the code find "Style Name 1", "Style Name 2", and "Style Name 3" and rename them to what you want the style to be labeled as.
Example:
StyleName = Array("Red Skin", "Twinkle Star", "Epilepse")
2. Take your CSS coding, save it to a file with the extension ".CSS" and then upload it to a server. You are going to want to use more then 1 style sheet so that users can choose more than 1 option.
3. In the code find "http://yoursite.com/style1.css", "http://yoursite.com/style2.css", and "http://yoursite.com/style3.css". Change all of those to the addresses of the corresponding style sheets.
Example:
StyleURL = Array("http://mysite.com/RedLook.css","http://mysite.com/Stars.css", "http://mysite.com/MYEYESHurt.css")
4. Place the code in your main page footers.
5. Go to edit your profile and you will be able to select the style. The look will not appear in your "profile2" url.
6. When users view your profile page the style you have chosen will take over the look of your profile.#nosmileys
*I figured I'd post it here since Web closed down his site and this is the only other good one I know for PB modifications*
Description: This script will allow users to choose permanent (well until they decide to change it) styles to their own profiles. I got the idea from ezBoard, which uses "global" member accounts and allows users to access the profiles and add CSS. It is very simple to add more styles from users to choose from too. The CSS classes in the profile are the normal Proboards CSS classes, so you'd only need to modify and upload those.
<script language="vbscript">
'Brought to you by
'Awesome AnDrEw & Web Wonders
'http://w2.proboards16.com/index.cgi
Dim Looper, Looper2, Looper3, StyleName, StyleURL, Theme
StyleName = Array("Style Name 1", "Style Name 2", "Style Name 3")
StyleURL = Array("http://yoursite.com/style1.css","http://yoursite.com/style2.css","http://yoursite.com/style3.css")
If instr(location.href, "action=profile&") Then
For Looper = 0 to (document.getElementsByTagName("FONT").length - 1)
If instr(document.getElementsByTagName("FONT")(Looper).innerHTML, "name=location") Then
document.getElementsByTagName("FONT")(Looper).innerHTML = "<select name='location'></select>"
For Looper2 = 0 to Ubound(StyleName)
document.creator.location.add(document.createElement("OPTION"))
document.creator.location(Looper2).innerText = StyleName(Looper2)
document.creator.location(Looper2).value = StyleURL(Looper2)
Next
End If
Next
document.body.innerHTML = replace(document.body.innerHTML, "Locat" & "ion: ", "Profile Style: ")
Elseif instr(location.href, "action=viewprofile&username=") Then
For Looper = 0 to (document.getElementsByTagName("FONT").length - 1)
If Looper > 1 Then
Looper2 = (Looper - 1)
End If
If instr(document.getElementsByTagName("FONT")(Looper2).innerHTML, "Location: ") Then
Theme = document.getElementsByTagName("FONT")(Looper).innerText
For Looper3 = 0 to Ubound(StyleURL)
If Theme = StyleURL(Looper3) Then
document.getElementsByTagName("FONT")(Looper).innerText = StyleName(Looper3)
End If
Next
End If
Next
document.body.innerHTML = replace(document.body.innerHTML, "Locat" & "ion: ", "Style: ")
document.write("<" & "LINK REL='stylesheet' TYPE='text/css' HREF='" & Theme & "'>")
End If
</script>
[ADDED]
1. In the code find "Style Name 1", "Style Name 2", and "Style Name 3" and rename them to what you want the style to be labeled as.
Example:
StyleName = Array("Red Skin", "Twinkle Star", "Epilepse")
2. Take your CSS coding, save it to a file with the extension ".CSS" and then upload it to a server. You are going to want to use more then 1 style sheet so that users can choose more than 1 option.
3. In the code find "http://yoursite.com/style1.css", "http://yoursite.com/style2.css", and "http://yoursite.com/style3.css". Change all of those to the addresses of the corresponding style sheets.
Example:
StyleURL = Array("http://mysite.com/RedLook.css","http://mysite.com/Stars.css", "http://mysite.com/MYEYESHurt.css")
4. Place the code in your main page footers.
5. Go to edit your profile and you will be able to select the style. The look will not appear in your "profile2" url.
6. When users view your profile page the style you have chosen will take over the look of your profile.#nosmileys