IP-Address in Profile
+3
Ape
SLGray
Eugeo Igvalt
7 posters
Page 2 of 3
Page 2 of 3 • 1, 2, 3
IP-Address in Profile
First topic message reminder :
Hello. I have been working as Administrator for a forum and They have asked me they want in the Profile area and only Administrators to see it. I need the IP to appear automatically in the text box without me having to fill each text box of each member manually. I have already created the field I just need the IP to be added automatically. is there any CSS, Javascript or Html code to make this a possibility?
Screenshot of text box: http://prntscr.com/5esvgg
Hello. I have been working as Administrator for a forum and They have asked me they want in the Profile area and only Administrators to see it. I need the IP to appear automatically in the text box without me having to fill each text box of each member manually. I have already created the field I just need the IP to be added automatically. is there any CSS, Javascript or Html code to make this a possibility?
Screenshot of text box: http://prntscr.com/5esvgg
Last edited by Eugeo Ayano on Tue Dec 16, 2014 2:56 pm; edited 1 time in total
Re: IP-Address in Profile
It;s making me have to fill out the ip at registration any fix? forum link:TPSN
Re: IP-Address in Profile
Read carefully each line that I wrote in this post: https://help.forumotion.com/t137330-ip-address-in-profile#927788FrOsTyXi wrote:It;s making me have to fill out the ip at registration any fix? forum link:TPSN
JS
Re: IP-Address in Profile
JScript wrote:Read carefully each line that I wrote in this post: https://help.forumotion.com/t137330-ip-address-in-profile#927788FrOsTyXi wrote:It;s making me have to fill out the ip at registration any fix? forum link:TPSN
JS
Yes sir i believe i read it all clearly here is what i have
At registration
I have it set to Necessarily filled ? [No] as of now due to the issue
Regards
Re: IP-Address in Profile
Thank you Jscript but i'm still having a issue with having to enter the ip upon registering.
TPSN
Maybe is you have time i can send you my test account for the forum so you can see where my error is.
Note: i followed everything to a Tee but still same issue
also thank you for your coding i find it very useful!
Regards
TPSN
Maybe is you have time i can send you my test account for the forum so you can see where my error is.
Note: i followed everything to a Tee but still same issue
also thank you for your coding i find it very useful!
Regards
Re: IP-Address in Profile
Did you do this:
Note: Change this value profile_field_XX_XX ] by the identifier that you found in step above!
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: IP-Address in Profile
SLGray wrote:Did you do this:Note: Change this value profile_field_XX_XX ] by the identifier that you found in step above!
Yes sir i did, profile_field_13_1.
Seems that when people login the ip is being posted in their profile but is i tick Yes to for that profile option no one can register due to the system wants them to type their IP in even though you can see the field to type it in.
Weird i know.
Regards
Re: IP-Address in Profile
i have no problem with the old code that adds the ip address when they make an account but the one that makes the ip address when the member is already a member don't work i get an error if you want the one that the member gets when they make an account then the code is already inplace on the thread
Re: IP-Address in Profile
APE wrote:i have no problem with the old code that adds the ip address when they make an account but the one that makes the ip address when the member is already a member don't work i get an error if you want the one that the member gets when they make an account then the code is already inplace on the thread
Thank you sir for the info.
Rehards
Re: IP-Address in Profile
Hello everybody!
I did successfully testing in IE, Chrome and Safari, but in firefox the cross-origin request is blocked in the latest versions!!!
I'm trying to work around but this problem is also reported in this link: http://stackoverflow.com/questions/25051759/how-to-solve-cross-origin-request-blocked-error-in-firefox
As soon as possible I will modify the code to be compatible with the new version of Firefox.
JS
I did successfully testing in IE, Chrome and Safari, but in firefox the cross-origin request is blocked in the latest versions!!!
I'm trying to work around but this problem is also reported in this link: http://stackoverflow.com/questions/25051759/how-to-solve-cross-origin-request-blocked-error-in-firefox
As soon as possible I will modify the code to be compatible with the new version of Firefox.
JS
Re: IP-Address in Profile
Thank you for your time JScript! Can't wait for the new code!!JScript wrote:Hello everybody!
I did successfully testing in IE, Chrome and Safari, but in firefox the cross-origin request is blocked in the latest versions!!!
I'm trying to work around but this problem is also reported in this link: http://stackoverflow.com/questions/25051759/how-to-solve-cross-origin-request-blocked-error-in-firefox
As soon as possible I will modify the code to be compatible with the new version of Firefox.
JS
Re: IP-Address in Profile
Here is the code that writes the the public IP of a member in the register and then when it is logged in on the forum the IP will be updated!
Note: This code works only when the Advanced profile is activated!
If they wish to work in the normal profile, let me know ok?
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 with placement in all pages:
Result:
The code now includes:
jQuery AJAX Cross Origin v1.3 (http://www.ajax-cross-origin.com)
jQuery plugin to bypass Same-origin_policy using Google Apps Script.
(c) 2014, Writen by Erez Ninio. site: www.dealhotelbook.com
JS
Note: This code works only when the Advanced profile is activated!
If they wish to work in the normal profile, let me know ok?
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 with placement in all pages:
- Code:
/*******************************************************************************************************
* Application: Location IP.
* Description: Shows the user's IP in the profile.
* Version: RC2 - Beta tester only!
* Made and Optimizations by JScript - 2014/12/10, 11
* Copyright (c) 2014 JScript <jscriptbrasil at live dot com>
* This work is free. You can redistribute it and/or modify it
* under the terms of the WTFPL, Version 2
********************************************************************************************************
-
Variables that can be changed by the user:
1- profile_field (change the value profile_field_XX_XX by your profile field!)
2- error_msg
3- tTimeOut
4- checkTime
Note: For those variables "tTimeout" and "checkTime" ->
- to avoid the "Request Limit" the lowest value should be 5 seconds and 10 seconds respectively!
*/
var IPLocation = {
profile_field: 'profile_field_XX_XX',
error_msg: "Warning!\n\nAn error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!",
setLoop: 0,
lInterval: 10,
tTimeOut: 10000, // Min is 5 seconds to start check.
checkTime: 60000, // Min is 30 seconds of interval to check a new IP.
TID: 0
};
/**
* jQuery AJAX Cross Origin v1.3 (http://www.ajax-cross-origin.com)
* jQuery plugin to bypass Same-origin_policy using Google Apps Script.
* (c) 2014, Writen by Erez Ninio. site: www.dealhotelbook.com
**/
AJAX_CrossOrigin();
/**
* Waits for a user registers to record the initial IP!
**/
if (location.search == "?agreed=true\x26step=2") {
IPLocation.setLoop = setInterval(function() {
if (document.getElementById(IPLocation.profile_field) !== null) {
jQuery("#" + IPLocation.profile_field).closest("dl").hide();
clearInterval(IPLocation.setLoop);
$.ajax({
type: "GET",
url: "http://api.ipify.org",
crossOrigin: true,
dataType: "text",
success: function(data) {
jQuery("#" + IPLocation.profile_field).val(data);
},
error: function(data) {
jQuery("#" + IPLocation.profile_field).val('127.0.0.0');
// alert("Warning!\n\nAn error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!");
}
});
};
}, IPLocation.lInterval);
} else {
jQuery(function() {
if (!_userdata.session_logged_in) {
return false;
}
/**
* If you are logged in, writes the current IP in the profile field...
**/
setTimeout(function() {
IPLocation.TID = jQuery('a[href*="tid="]').attr('href').split('tid=')[1].split('&')[0];
setInterval(function() {
$.ajax({
type: "GET",
url: "http://api.ipify.org",
crossOrigin: true,
dataType: "text",
success: function(data) {
jQuery.post("/ajax_profile.forum?jsoncallback=?", {
id: IPLocation.profile_field.substring(17, IPLocation.profile_field.length),
user: _userdata.user_id,
active: "1",
content: '[["' + IPLocation.profile_field + '", "' + data + '"]]',
tid: IPLocation.TID
}, function(data) {
console.log("The IP " + data + " was saved in profile!");
}, "json").fail(function() {
console.log("Error saving the IP to profile!");
});
},
error: function(data) {
console.log("Error getting public IP!");
}
});
}, IPLocation.checkTime);
}, IPLocation.tTimeOut);
});
}
/**
* If the member go on editing your profile and it is not a staff member, the IP field is removed!
**/
if (location.pathname.indexOf('/profile') == 0) {
IPLocation.setLoop = setInterval(function() {
if (document.getElementById(IPLocation.profile_field) !== null) {
if (_userdata.user_level == 0) {
jQuery("#" + IPLocation.profile_field).closest("dl").remove();
}
clearInterval(IPLocation.setLoop);
};
}, IPLocation.lInterval);
}
/**
* If the member is viewing your profile and ->
**/
if (location.pathname.indexOf('/u') == 0) {
IPLocation.setLoop = setInterval(function() {
if (document.getElementById('profile-advanced-right') !== null) {
if (!_userdata.session_logged_in) {
return false;
}
var forbid = jQuery('#field_id' + IPLocation.profile_field.substring(17, IPLocation.profile_field.length));
if (forbid.length) {
forbid.attr('id', 'forbid');
/**
* <- it is not a staff member, the IP field will be removed!
**/
if (_userdata.user_level == 0) {
forbid.remove();
}
}
/**
* Since we do not have access to the template of the advanced profile,
* then we have to modify the identifiers so we can intercept them in order
* to avoid that members can modify the IP field!
**/
var oTarget = jQuery('[id^=field_id]'),
iLen = oTarget.length,
index = 0;
for (; index < iLen; index++) {
var oThis = jQuery(oTarget[index]);
oThis.attr('id', 'JS_' + oThis.attr('id'));
IPLocation.profile_field
};
clearInterval(IPLocation.setLoop);
$('[id^=JS_field_id]').each(function() {
if ($(this).find('.field_editable').is('span, div')) {
$(this).hover(function() {
if ($(this).find('.field_editable.invisible').is('span, div')) {
$(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="http://2img.net/i/fa/invision/../edit.png" /></div>');
$(this).find('.ajax-profil_edit').attr({
alt: "{L_FIELD_EDIT_VALUE}",
title: "{L_FIELD_EDIT_VALUE}"
}).click(function() {
$(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="http://2img.net/i/fa/invision/../valid.png" class="ajax-profil_valid" />').find('input,select');
$(this).prev().find('.ajax-profil_valid').attr({
alt: "{L_VALIDATE}",
title: "{L_VALIDATE}"
}).click(function() {
var content = new Array();
$(this).parent().find('[name]').each(function() {
var type_special = $(this).is('input[type=radio],input[type=checkbox]');
if ((type_special && $(this).is(':checked')) || !type_special) {
content.push(new Array($(this).attr('name'), $(this).attr('value')));
}
});
var id_name = $(this).parents('[id^=JS_field_id]').attr('id');
var id = id_name.substring(11, id_name.length);
// console.log('id_name: ' + id_name + '\n' + 'id: ' + id);
$.post(
"/ajax_profile.forum?jsoncallback=?", {
id: id,
user: _userdata.user_id,
active: "1",
content: $.toJSON(content),
tid: jQuery('a[href*="tid="]').attr('href').split('tid=')[1].split('&')[0];
},
function(data) {
$.each(data, function(i, item) {
$('[id=JS_field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
});
},
"json"
);
});
$(this).remove();
});
}
}, function() {
if ($(this).find('.field_editable.invisible').is('span, div')) {
$(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
$(this).find('.ajax-profil_edit').remove();
}
});
}
});
};
}, 50);
}
/*
jQuery AJAX Cross Origin v1.3 (http://www.ajax-cross-origin.com)
jQuery plugin to bypass Same-origin_policy using Google Apps Script.
references:
http://en.wikipedia.org/wiki/Same-origin_policy
http://www.google.com/script/start/
(c) 2014, Writen by Erez Ninio. site: www.dealhotelbook.com
Licensed under the Creative Commons Attribution 3.0 Unported License.
For details, see http://creativecommons.org/licenses/by/3.0/.
*/
function AJAX_CrossOrigin() {
if (typeof proxyJsonp === 'undefined') {
var proxyJsonp = "https://script.google.com/macros/s/AKfycbwmqG55tt2d2FcT_WQ3WjCSKmtyFpkOcdprSITn45-4UgVJnzp9/exec";
jQuery.ajaxOrig = jQuery.ajax;
jQuery.ajax = function(a, b) {
function d(a) {
a = encodeURI(a).replace(/&/g, "%26");
return proxyJsonp + "?url=" + a + "&callback=?"
}
var c = "object" === typeof a ? a : b || {};
c.url = c.url || ("string" === typeof a ? a : "");
var c = jQuery.ajaxSetup({}, c),
e = function(a, c) {
var b = document.createElement("a");
b.href = a;
return c.crossOrigin && "http" == a.substr(0, 4).toLowerCase() && "localhost" != b.hostname && "127.0.0.1" != b.hostname && b.hostname != window.location.hostname
}(c.url, c);
c.proxy && 0 < c.proxy.length && (proxyJsonp = c.proxy, "object" === typeof a ?
a.crossDomain = !0 : "object" === typeof b && (b.crossDomain = !0));
e && ("object" === typeof a ? a.url && (a.url = d(a.url), a.charset && (a.url += "&charset=" + a.charset), a.dataType = "json") : "string" === typeof a && "object" === typeof b && (a = d(a), b.charset && (a += "&charset=" + b.charset), b.dataType = "json"));
return jQuery.ajaxOrig.apply(this, arguments)
};
jQuery.ajax.prototype = new jQuery.ajaxOrig;
jQuery.ajax.prototype.constructor = jQuery.ajax;
}
}
Result:
The code now includes:
jQuery AJAX Cross Origin v1.3 (http://www.ajax-cross-origin.com)
jQuery plugin to bypass Same-origin_policy using Google Apps Script.
(c) 2014, Writen by Erez Ninio. site: www.dealhotelbook.com
JS
Last edited by JScript on Fri Dec 12, 2014 2:51 am; edited 1 time in total
Re: IP-Address in Profile
Strange. I created an account using this new code. after I made the account I went and saw that yeah the IP did register but it wasnt my ip. Yes I used a proxy VPN, my IP was supposed to be from Brazil but the IP it registered put it me in California. Google HQ. Found that strange.
Re: IP-Address in Profile
That will be an issue if someone uses a proxy, because when they register the IP address will be different each time they log into the forum.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: IP-Address in Profile
Just tested it out by no using any proxy now I got my own IP-address registered. SUCCESS! Big thanks to @JScript
Re: IP-Address in Profile
Well that is great for you, but some people will not be able to stop using proxies, because some Internet providers use proxies.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: IP-Address in Profile
My provider uses proxies. I know this because every time I unplug the modem and plug it back in, I have a different IP address.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: IP-Address in Profile
but are external IP's supposed to be static or do they change eventually because sometimes during the week I have an IP then the another day I have another IP but still gives the same location.
Re: IP-Address in Profile
Hello!
There is a limit of requests to obtain the IP in this case I recommend the following:
JS
There is a limit of requests to obtain the IP in this case I recommend the following:
- Code:
tTimeout: 60000, // 1 minute to start check.
checkTime: 1800000 // 30 minutes to re check
JS
Re: IP-Address in Profile
Reporting a small issue, every member is sending back the error ip 127.0.0.0
Re: IP-Address in Profile
I also realized this friend, so I'm looking for other ways or another proxy that is limitless because Google has limits daily ...FrOsTyXi wrote:Reporting a small issue, every member is sending back the error ip 127.0.0.0
JS
Re: IP-Address in Profile
JScript wrote:I also realized this friend, so I'm looking for other ways or another proxy that is limitless because Google has limits daily ...FrOsTyXi wrote:Reporting a small issue, every member is sending back the error ip 127.0.0.0
JS
Ah ok thank you JScript i knew you would have a answer for the issue i await your fix!!
Re: IP-Address in Profile
Finally a version that did not fail in any of the tests that I did!
Here is the code that writes the the public IP of a member in the register and then when it is logged in on the forum the IP will be updated!
Note: This code works only when the Advanced profile is activated!
If they wish to work in the normal profile, let me know ok?
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 with placement in all pages:
Result:
Restrictions?
Now we no longer have time constraint to obtain the IP!
JS
Here is the code that writes the the public IP of a member in the register and then when it is logged in on the forum the IP will be updated!
Note: This code works only when the Advanced profile is activated!
If they wish to work in the normal profile, let me know ok?
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 with placement in all pages:
- Code:
/*******************************************************************************************************
* Application: Location IP.
* Description: Shows the user's IP in the profile.
* Version: RC2 - Beta tester only!
* Made and Optimizations by JScript - 2014/12/10, 11, 13
* Copyright (c) 2014 JScript <jscriptbrasil at live dot com>
* This work is free. You can redistribute it and/or modify it
* under the terms of the WTFPL, Version 2
********************************************************************************************************
-
Variables that can be changed by the user:
1- profile_field (change the value profile_field_XX_XX by your profile field!)
2- error_msg
3- tTimeOut
4- checkTime
Note: For those variables "tTimeout" and "checkTime" ->
- to avoid the "Request Limit" the lowest value should be 5 seconds and 10 seconds respectively!
*/
var IPLocation = {
profile_field: 'profile_field_XX_XX',
error_msg: "Warning!\n\nAn error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!",
setLoop: 0,
lInterval: 10,
tTimeOut: 10000, // Min is 10 seconds to start check.
checkTime: 300000, // Min is 5 minutes of interval to check a new IP.
TID: 0
};
/**
* jQuery.ajaxCORS - Cross Domain Ajax - Version: RC1
* Using: query.yahooapis.com, based on James Padolsey
* Made and Optimizations by JScript - 2014/12/13
**/
jQuery.ajaxCORS = (function(_cors) {
var protocol = location.protocol,
hostname = location.hostname,
patt = RegExp(protocol + '//' + hostname),
YQL = 'http' + (/^https/.test(protocol) ? 's' : '') + '://query.yahooapis.com/v1/public/yql?callback=?',
query = 'select * from html where url="{URL}" and xpath="*"';
function isExternal(url) {
return !patt.test(url) && /:\/\//.test(url);
}
return function(Obj) {
var url = Obj.url;
if (/get/i.test(Obj.type) && !/json/i.test(Obj.dataType) && isExternal(url)) {
// Manipulate options so that JSONP-x request is made to YQL
Obj.url = YQL;
Obj.dataType = 'json';
Obj.data = {
q: query.replace(
'{URL}',
url + (Obj.data ?
(/\?/.test(url) ? '&' : '?') + jQuery.param(Obj.data) : '')
),
format: 'xml'
};
// Since it's a JSONP request, then complete === success
if (!Obj.success && Obj.complete) {
Obj.success = Obj.complete;
delete Obj.complete;
}
Obj.success = (function(_success) {
return function(data) {
if (_success) {
// Fake XHR callback.
_success.call(this, {
responseText: (data.results[0] || '')
// YQL screws with tag <script>, then get rid of them...
.replace(/<script[^>]+?\/>|<script(.|\s)*?\/script>/gi, '')
}, 'success');
}
};
})(Obj.success);
}
return _cors.apply(this, arguments);
};
})(jQuery.ajax);
/**
* Waits for a user registers to record the initial IP!
**/
if (location.search == "?agreed=true\x26step=2") {
IPLocation.setLoop = setInterval(function() {
if (document.getElementById(IPLocation.profile_field) !== null) {
jQuery("#" + IPLocation.profile_field).closest("dl").hide();
clearInterval(IPLocation.setLoop);
$.ajax({
type: "GET",
// url: 'http://www.whatsmyip.net/',
url: 'http://wtfismyip.com/json',
dataType: "json",
success: function(data) {
// var ip = jQuery(data.responseText).find('h1:first input').val(); // ->http://www.whatsmyip.net/
var ip = data.YourFuckingIPAddress; // ->http://wtfismyip.com/
jQuery("#" + IPLocation.profile_field).val(ip);
},
error: function(data) {
// console.log(data);
jQuery("#" + IPLocation.profile_field).val('127.0.0.0');
alert("Warning!\n\nAn error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!");
}
});
};
}, IPLocation.lInterval);
} else {
jQuery(function() {
if (!_userdata.session_logged_in) {
return false;
}
/**
* If you are logged in, writes the current IP in the profile field...
**/
setTimeout(function() {
_SaveIPInProfile();
setInterval(function() {
_SaveIPInProfile();
}, IPLocation.checkTime);
}, IPLocation.tTimeOut);
function _SaveIPInProfile() {
IPLocation.TID = jQuery('a[href*="tid="]').attr('href').split('tid=')[1].split('&')[0];
$.ajax({
type: "GET",
// url: 'http://www.whatsmyip.net/',
url: 'http://wtfismyip.com/json',
dataType: "json",
success: function(data) {
// var ip = jQuery(data.responseText).find('h1:first input').val(); // ->http://www.whatsmyip.net/
var ip = data.YourFuckingIPAddress; // ->http://wtfismyip.com/
jQuery.post("/ajax_profile.forum?jsoncallback=?", {
id: IPLocation.profile_field.substring(17, IPLocation.profile_field.length),
user: _userdata.user_id,
active: "1",
content: '[["' + IPLocation.profile_field + '", "' + ip + '"]]',
tid: IPLocation.TID
}, function(data) {
console.log("The IP was saved in profile!");
}, "json").fail(function() {
console.log("Error saving the IP to profile!");
});
},
error: function(data) {
console.log("Error getting public IP!");
}
});
};
});
}
/**
* If the member go on editing your profile and it is not a staff member, the IP field is removed!
**/
if (location.pathname.indexOf('/profile') == 0) {
IPLocation.setLoop = setInterval(function() {
if (document.getElementById(IPLocation.profile_field) !== null) {
if (_userdata.user_level == 0) {
jQuery("#" + IPLocation.profile_field).closest("dl").remove();
}
clearInterval(IPLocation.setLoop);
};
}, IPLocation.lInterval);
}
/**
* If the member is viewing your profile and ->
**/
if (location.pathname.indexOf('/u') == 0) {
IPLocation.setLoop = setInterval(function() {
if (document.getElementById('profile-advanced-right') !== null) {
if (!_userdata.session_logged_in) {
return false;
}
var forbid = jQuery('#field_id' + IPLocation.profile_field.substring(17, IPLocation.profile_field.length));
if (forbid.length) {
forbid.attr('id', 'forbid');
/**
* <- it is not a staff member, the IP field will be removed!
**/
if (_userdata.user_level == 0) {
forbid.remove();
}
}
/**
* Since we do not have access to the template of the advanced profile,
* then we have to modify the identifiers so we can intercept them in order
* to avoid that members can modify the IP field!
**/
var oTarget = jQuery('[id^=field_id]'),
iLen = oTarget.length,
index = 0;
for (; index < iLen; index++) {
var oThis = jQuery(oTarget[index]);
oThis.attr('id', 'JS_' + oThis.attr('id'));
IPLocation.profile_field
};
clearInterval(IPLocation.setLoop);
$('[id^=JS_field_id]').each(function() {
if ($(this).find('.field_editable').is('span, div')) {
$(this).hover(function() {
if ($(this).find('.field_editable.invisible').is('span, div')) {
$(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="http://2img.net/i/fa/invision/../edit.png" /></div>');
$(this).find('.ajax-profil_edit').attr({
alt: "{L_FIELD_EDIT_VALUE}",
title: "{L_FIELD_EDIT_VALUE}"
}).click(function() {
$(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="http://2img.net/i/fa/invision/../valid.png" class="ajax-profil_valid" />').find('input,select');
$(this).prev().find('.ajax-profil_valid').attr({
alt: "{L_VALIDATE}",
title: "{L_VALIDATE}"
}).click(function() {
var content = new Array();
$(this).parent().find('[name]').each(function() {
var type_special = $(this).is('input[type=radio],input[type=checkbox]');
if ((type_special && $(this).is(':checked')) || !type_special) {
content.push(new Array($(this).attr('name'), $(this).attr('value')));
}
});
var id_name = $(this).parents('[id^=JS_field_id]').attr('id');
var id = id_name.substring(11, id_name.length);
// console.log('id_name: ' + id_name + '\n' + 'id: ' + id);
$.post(
"/ajax_profile.forum?jsoncallback=?", {
id: id,
user: _userdata.user_id,
active: "1",
content: $.toJSON(content),
tid: jQuery('a[href*="tid="]').attr('href').split('tid=')[1].split('&')[0];
},
function(data) {
$.each(data, function(i, item) {
$('[id=JS_field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
});
},
"json"
);
});
$(this).remove();
});
}
}, function() {
if ($(this).find('.field_editable.invisible').is('span, div')) {
$(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
$(this).find('.ajax-profil_edit').remove();
}
});
}
});
};
}, 50);
}
Result:
Restrictions?
Now we no longer have time constraint to obtain the IP!
JS
Re: IP-Address in Profile
It's working for me. I created an account and the ip that came out is my own. no errors or 127.0.0.1 till now.
Page 2 of 3 • 1, 2, 3
Similar topics
» Why was the SSL certificate given to the .forumotion address instead of .com address?
» Profile Rank and Avatar profile problem
» [QUERY] How to show the members' group joined in their post profile and even in their profile?
» Profile field, multiple words with different colors in the same profile filed
» Private Message, Profile buttons (and any other) in Profile / how to get rid of the boarder under the posts?
» Profile Rank and Avatar profile problem
» [QUERY] How to show the members' group joined in their post profile and even in their profile?
» Profile field, multiple words with different colors in the same profile filed
» Private Message, Profile buttons (and any other) in Profile / how to get rid of the boarder under the posts?
Page 2 of 3
Permissions in this forum:
You cannot reply to topics in this forum