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
[ C ] Profile Covers
Topic Started: Aug 4 2015, 09:03 PM (512 Views)
FB92
Member Avatar
Member
[ *  * ]
Board Address: http://chattervault.xyz
Board Software: ZB
Description: I am wanting a way even through custom profile fields to display a profile cover at the top of member profile pages.
Offline Profile Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Could you explain a bit better? I don't quite understand.
Offline Profile Goto Top
 
FB92
Member Avatar
Member
[ *  * ]
Similar to Facebook covers, but for profiles. It's an image that is displayed at the top of the members profile. They get to choose the image. Was thinking more custom profile fields but haven't touched any part of ZB for ages.
Offline Profile Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

How about this code?
Offline Profile Goto Top
 
Revillution.com
Who ate all the pecan sandies?
[ *  * ]
That's not what he's asking....what he's lookin for is something similar to a FB cover photo feature......

something like this:
Posted Image

Offline Profile Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Is this for the profile page only? Above the tables?
Offline Profile Goto Top
 
FB92
Member Avatar
Member
[ *  * ]
Yes it is.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Users & Groups Posted Image Profile Fields

Create a new 1 line text field with the following specifications:

Title: Profile Cover Image URL
On Registration: Your Choice
Show field in topics: No
Admin Only Edit: No
Maximum input length: Your Choice

Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$(function() {
$('table.profile td.c_desc:contains(Profile Cover Image URL)').parent('tr').hide();
var iURL = $('table.profile td.c_desc:contains(Profile Cover Image URL)').next('td').text();
$('table.profile:eq(0)').before('<img src="' + iURL + '" alt="Profile Cover" style="width: 100%; height: 250px" />');
});
//]]>
</script>
Offline Profile Goto Top
 
FB92
Member Avatar
Member
[ *  * ]
That's great. Is there any way to make it so that if there is no image chosen by the member that there perhaps is a link to edit their cover?
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
So you just want the link to direct to the Editing Profile page?
Offline Profile Goto Top
 
FB92
Member Avatar
Member
[ *  * ]
Cory
Aug 11 2015, 01:40 AM
So you just want the link to direct to the Editing Profile page?
For those who do not have a profile cover set.
But only have the editing profile link visible to that profiles owner?

I'm not sure how extended ZB can get.
Offline Profile Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Code:
 
<script type="text/javascript">
//<![CDATA[
$(function() {
if (location.href.indexOf(main_url + 'profile/' + $.zb.stat.mid) !== -1 && !$('table.profile td.c_desc:contains(Profile Cover Image URL)').length) {
$('table.profile:eq(0)').before('<a href="http://support.zathyus.com/home/?c=6">Update Your Profile</a> with a Profile Cover Image URL.');
} else {
$('table.profile td.c_desc:contains(Profile Cover Image URL)').parent('tr').hide();
var iURL = $('table.profile td.c_desc:contains(Profile Cover Image URL)').next('td').text();
$('table.profile:eq(0)').before('<img src="' + iURL + '" alt="Profile Cover" style="width: 100%; height: 250px" />');
}
});
//]]>
</script>
Edited by DaPizzaMan, Aug 11 2015, 06:30 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
You left support.zathyus.com in there and did not use main_url.

I would use a DIV with the c class personally, looks better that way.

If you're using indexOf, there's really no need to use main_url.

It appears I should have added an if statement in the first place, the else statement needs to be modified so it doesn't apply a broken image on other users profiles that don't have a profile cover:
Code:
 
} else if ($('table.profile td.c_desc:contains(Profile Cover Image URL)').length) {
Offline Profile Goto Top
 
FB92
Member Avatar
Member
[ *  * ]
Could you provide an updated code with your ideas Cody, so I can copy and paste.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this:
Code:
 
<script type="text/javascript">
//<![CDATA[
$(function() {
if (location.href.indexOf('/profile/' + $.zb.stat.mid) !== -1 && !$('table.profile td.c_desc:contains(Profile Cover Image URL)').length) {
$('table.profile:eq(0)').before('<div class="c"><a href="' + main_url + 'home/?c=6">Update Your Profile</a> with a Profile Cover Image URL.</div>');
} else if ($('table.profile td.c_desc:contains(Profile Cover Image URL)').length) {
$('table.profile td.c_desc:contains(Profile Cover Image URL)').parent('tr').hide();
var iURL = $('table.profile td.c_desc:contains(Profile Cover Image URL)').next('td').text();
$('table.profile:eq(0)').before('<img src="' + iURL + '" alt="Profile Cover" style="width: 100%; height: 250px" />');
}
});
//]]>
</script>
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