Cen
Junior Member
Join us. We have cookies.
Posts: 210
inherit
87356
0
Jul 5, 2014 13:35:34 GMT -8
Cen
Join us. We have cookies.
210
August 2006
centara
|
Post by Cen on Jun 27, 2013 20:53:51 GMT -8
Under v4, we had a code that allowed us to adjust the age and birthdate of our members. I know that in updating to v5, you are now able to change the birthday for the account. The only problem is it only allows us to go back to year 1900. As an RP board, we have a few vampires who were born prior to the year of 1900 so we were able to use this code to adjust their birthdays and ages to reflect when they were actually born (such as one who was born in 776). I have the code in the global footer, however it is not working for v5. Anyone know of a way to make this code work for v5?
Any help is appreciated
And here's the code. It uses the account, the birthday, and the age as variables. I didn't change anything else.
<script type="text/javascript"> <!-- /*Change birthday*/
function changeAge(name, age, bday) { var td = document.getElementsByTagName('td'); for(i=0; i<td.length; i++) { if((location.href.match(new RegExp('viewprofile&user='+name)) || (pb_username == name && location.href.match(/viewprofile$/))) && td.item(i).width == '25%' && td.item(i).firstChild.innerHTML == 'Birthday:') { td.item(i+1).firstChild.innerHTML = bday; td.item(i+3).firstChild.innerHTML = age; } } }
changeAge('torsten','1,237','05/27/776'); changeAge('ds','278','06/05/1735');
//--> </script>
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jul 4, 2013 6:56:10 GMT -8
<script>
var change = (function(){
return { age: function(username, age, dob){ if(proboards.data("route").name == "user" && proboards.data("user") && proboards.data("user").username){ if(proboards.data("user").username == username){ var heading = $("td.headings:contains(Birthday:)"); if(heading.length){ var date = heading.next(); date.html(dob + " (Age: " + age + ")"); } } } } };
})();
change.age("torsten", "1,237", "05/27/776"); change.age("ds", "278", "06/05/1735");
</script>
Global footer.
|
|
Cen
Junior Member
Join us. We have cookies.
Posts: 210
inherit
87356
0
Jul 5, 2014 13:35:34 GMT -8
Cen
Join us. We have cookies.
210
August 2006
centara
|
Post by Cen on Jul 4, 2013 18:18:04 GMT -8
Peter, it doesn't seem to have worked. Looking at both of the members who should be affected by the code and neither have been changed by the code =/
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jul 4, 2013 23:35:16 GMT -8
Can you link me to a profile where the birthday is public?
|
|
Cen
Junior Member
Join us. We have cookies.
Posts: 210
inherit
87356
0
Jul 5, 2014 13:35:34 GMT -8
Cen
Join us. We have cookies.
210
August 2006
centara
|
Post by Cen on Jul 5, 2013 0:50:44 GMT -8
None of our birthdays look like they are public. Not sure why? I can't find any way to make them visible to guests.
|
|
Cen
Junior Member
Join us. We have cookies.
Posts: 210
inherit
87356
0
Jul 5, 2014 13:35:34 GMT -8
Cen
Join us. We have cookies.
210
August 2006
centara
|
Post by Cen on Jul 5, 2013 1:24:44 GMT -8
I actually was having a problem with not being able to upload avatars. I removed the code and for some reason now we are able to upload them again. Not sure why that happened...
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jul 5, 2013 1:58:32 GMT -8
Not sure what to suggest, maybe you have custom changes to your template? I tested it again, and it's working for me...
|
|
Cen
Junior Member
Join us. We have cookies.
Posts: 210
inherit
87356
0
Jul 5, 2014 13:35:34 GMT -8
Cen
Join us. We have cookies.
210
August 2006
centara
|
Post by Cen on Jul 5, 2013 7:14:11 GMT -8
That is strange why it won't work on my forum... Oh well. I went and just did custom fields for now until I have the energy to try and figure out why it's not working. Thanks though!
|
|