We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Non-editable Visible User ID profile field
Topic Started: Aug 18 2015, 11:18 AM (410 Views)
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
ZB
Url in profile
is it possible to create a profile field that'll display the user's ID but it's non-editable?
Offline Profile Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
Just hover over a members link and the ID becomes visible. Or click their link and it will show in the URL.
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
To be slightly more helpful, would this code suffice? http://support.zathyus.com/topic/5183681/1
Offline Profile Goto Top
 
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
Yeah, that works. Thanks :D
Oh wait, I thought this added it to all users so the staff can see them? :O
Edited by Tyler Dream, Aug 20 2015, 09:14 PM.
Offline Profile Goto Top
 
Roby
Member Avatar
#27

How's this (Below the Board)
Code:
 
<script type='text/javascript'>
$(function() {
var current_location = location.href;
if (current_location.indexOf('/topic/') !==-1 || current_location.indexOf('/profile/') !==-1 || current_location.indexOf('/single/') !==-1) {
$('dl.user_profile').append('<dt>Member ID</dt><dd>' + $.zb.stat.mid + '</dd>');
}
});
</script>
Offline Profile Goto Top
 
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
That's good. Thanks :D
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Note: That applies the currently logged in users ID to every users mini profile, not the user ID of the mini profile owner itself.
Offline Profile Goto Top
 
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
Oh, can that be fixed?
Offline Profile Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Code:
 
<script type="text/javascript">
$(function() {
var current_location = location.href;
if (current_location.indexOf('/topic/') !== -1 || current_location.indexOf('/single/') !== -1) {
$('td.c_user').each(function() {
$(this).find('dl.user_profile').append('<dt>Member ID</dt><dd>' + removeJunkFrom($(this).parent('tr').prev('tr').find('td.c_username a.member').attr('href')) + '</dd>');
});
} else if (current_location.indexOf('/profile/') !== -1) {
$('dl.user_profile').append('<dt>Member ID</dt><dd>' + removeJunkFrom(current_location) + '</dd>');
}

function removeJunkFrom($this) {
return $this.replace(main_url + 'profile/', '').replace('/', '');
}
});
</script>
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I'd personally suggest making it apply to dl.user_info instead of dl.user_profile, since the aforementioned is always visible.
Offline Profile Goto Top
 
Roby
Member Avatar
#27

Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic