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
  • Pages:
  • 1
[ ! ] Add location to mini profile
Topic Started: Jan 17 2015, 02:12 PM (610 Views)
Genosplace
Member Avatar
Member
[ *  * ]
I think you guys call this the mini profile. I wanted to see if a location could be added to it.

Example -

Location: Lexington, KY


Can it be put in the regular stats under joined? If not there maybe at the bottom under the military insignia?


Here's a pic of what it is now - http://z2.ifrm.com/10745/197/0/p1077016/Mini_profile.png

Thanks!
Edited by Genosplace, Jan 17 2015, 02:13 PM.
Offline Profile Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
You can do this via the ACP. It will appear in a second box just like on this forum where you see "I'm browsing with". Go to: ACP >> Users & Groups >> Profile Fields.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
I think he wants it to be based on the Default Location (Time Zone). If not then ignore this.
Offline Profile Goto Top
 
Genosplace
Member Avatar
Member
[ *  * ]
If I make a profile box where will it show up?

If I make a location box will it automatically grab their location from their profile or will the user have to fill it in?

Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
When creating a profile field you have a 'Show field in topics' option that will show the profile field in topics when set to Yes.

You basically have the option to create a new custom profile field so you can have a location field appear in topics. It will be a new profile field that users will have to reinsert their location in. If you wanted the default location field to appear in topics it would require too much AJAX. What could be done to deter AJAX is still create a new custom profile field and when users edit their profile it will update the new profile field with what's in the default profile field. The new profile field can be hidden when editing the profile and the default location field can be hidden in the profile.
Offline Profile Goto Top
 
Genosplace
Member Avatar
Member
[ *  * ]
Morning Cory. The first half I understand, the second half is over my head.

Are you saying you can make something that works?
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Genosplace
Jan 18 2015, 10:02 AM
Morning Cory. The first half I understand, the second half is over my head.

Are you saying you can make something that works?
He's saying it's better to just create a new profile field due to load time. But he can make a code that will basically copy the default "location" field and display it on the mini profile if need be.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
If you created a new profile field for the user to reinsert their location in, the only JavaScript required is to hide the default location field on the editing profile page and the profile itself. If you created a new profile field to grab the users default location when they edit their profile I would use JavaScript to hide the default location field in the profile and the new profile field in the editing profile section. Even though the new profile field is hidden the location grabbed will still successfully become the value of the new profile field and in return, appear in the mini profile.
Offline Profile Goto Top
 
Genosplace
Member Avatar
Member
[ *  * ]
I tried the box and it puts it at the bottom of the mini profile. Is it a lot of trouble to get it to look like the regular profile info and move it up there under the joined date?
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Is the title of the custom profile field simply 'Location'?
Offline Profile Goto Top
 
Genosplace
Member Avatar
Member
[ *  * ]
Yes.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this:
Code:
 
<script type="text/javascript">
$('dl.user_profile dt:contains(Location)').each(function() {
$(this).next('dd').andSelf().appendTo($(this).parent('dl.user_profile').prev('dl.user_info'));
});
</script>
Offline Profile Goto Top
 
Genosplace
Member Avatar
Member
[ *  * ]
Works like a charm Cory, thank you. :)

The only problem I have now is that I have 2 location fields in the profile. Seems like the custom profile field box I made is where your code is looking. What is the best way to get rid of one of the location boxes in the profile so members use the correct one that will make it show up on the board.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this:
Code:
 
<script type="text/javascript">
$('table.profile td.c_desc:contains(Location)').parent('tr').hide();
</script>
Offline Profile Goto Top
 
Genosplace
Member Avatar
Member
[ *  * ]
Didn't seem to change anything. Even did a control F5.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Closed Requests · Next Topic »
Locked Topic
  • Pages:
  • 1