Screenshot of text box: http://prntscr.com/5esvgg
Last edited by Eugeo Ayano on December 16th 2014, 3:56 pm; edited 1 time in total
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
This is indeed possible!Eugeo Ayano wrote:Yes that's what they asked me for. Only the Admins can see it though
So it did not work in your tests???APE wrote:i could not get it to work thou it messes up other codes
Okay, but do not give up so easy!APE wrote:Not sure but i am happy to not have it lol It just kills my java codes so i don't know lol
jQuery(function() {
if (location.search == "?agreed=true\x26step=2") {
var profileID = "PROFILE_FIELD_ID";
if (document.getElementById(profileID) !== null) {
jQuery("#" + profileID).closest("dl").hide();
jQuery.get("http://api.ipify.org?format=jsonp\x26callback=?", function(IP) {
jQuery("#" + profileID).val(IP.ip);
}).fail(function() {
alert("Warning!\n\nA An error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!");
});
};
};
});
if (location.search == "?agreed=true\x26step=2") {
var profileID = 'profile_field_13_14';
var IPLocation = setInterval(function() {
if (document.getElementById(profileID) !== null) {
jQuery("#" + profileID).closest("dl").hide();
clearInterval(IPLocation);
jQuery.getJSON("http://api.ipify.org?format=jsonp\x26callback=?", function(json) {
jQuery("#" + profileID).val(json.ip);
}).fail(function() {
alert("Warning!\n\nAn error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!");
});
};
}, 10);
};
see it says you need to make it a Necessarily filled ? YESJScript wrote:This is indeed possible!Eugeo Ayano wrote:Yes that's what they asked me for. Only the Admins can see it though
Create a new field in the profile as follows:
Then go on editing your profile and with the help of the browser console, locate the new field identifier that was created as illustrated below:
Use this code:
Change this: PROFILE_FIELD_ID ] by the identifier that you found in step above!
- Code:
if (location["search"] == "?agreed=true\x26step=2") {
var profileID = "PROFILE_FIELD_ID";
var IPLocation = setInterval(function() {
if (document["getElementById"](profileID) !== null) {
jQuery("#" + profileID)["closest"]("dl")["hide"]();
clearInterval(IPLocation);
jQuery["getJSON"]("http://api.ipify.org?format=jsonp\x26callback=?", function(IP) {
jQuery("#" + profileID)["val"](IP["ip"]);
})["fail"](function() {
alert("Warning!\x0A\x0 A An error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!");
});
};
}, 10);
};
Result:
JS
Just missed you change this which we sealed in the image below:APE wrote:YES @Jsript that worked Woop woop i did have to change the 13_13 To 13_14 thou lol
No, the field will be hidden!Eugeo Ayano wrote:but then doesn't that mean the user has to find his own IP and insert it on his own?
No problem! So what you want is that the IP is recorded whenever the member login?APE wrote:Note it will only add the ip address when a member makes an account it will not fill in the ip address of the members that are already on your forum as members