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:
Add Reply
  • Pages:
  • 1
  • 7
Horizontal Profile; with an option for a user-specified background (in both the topic and profile views)!
Topic Started: Aug 30 2014, 11:52 AM (7,658 Views)
DaPizzaMan
Member Avatar
#TeamSupport

Code Name: Horizontal Profile

What the code does: The user information that usually sits next to a post will now be displayed above the post. For an idea of what this may look like with a background as well see here.

How to use the code: For the background option, you'll need to create a custom profile field. The name you give to that profile field should replace Profile Background in the first code. The user should put the URL for the profile background in this field.

How to install the code: Admin CP -> Board Template -> Below the Board

Extra notes: There may be compatibility issues with certain themes and modifications. I know of one theme that doesn't work well with this code, so I'm going to work on that now. If you find any issues with the code, such as compatibility issues or something that doesn't show up or work as it should, please PM DaPizzaMan or post in this topic. I will try to get back to you as soon as possible. Thanks. :)

Code:
 
<script type="text/javascript">
var horizontalProfileBackgroundFieldName = "Profile Background";
var horizontalProfileDefaultBackground = "Default Profile Background URL";
var profileCoverPhoto = false; // Set to true to include profile background above user's actual profile page, false to not include it.
var horizontalProfileHeight = 141; // Number only (pixel value)
$.ajax({url:'http://z4.ifrm.com/30296/128/0/p1163575/HorizontalProfile.js', dataType:'script', cache:true});
</script>
The above code is where you replace what is between the quotation marks for the first variable with your custom profile field title. The second variable is for the default background URL for users who have yet to set a background. Find an image that you like, and leave the link between the quotation marks of the second variable. Again, the above goes in the Below the Board section of the Board Template.

Update: If you use Dynamo, replace the second code with the code found in this post.

Update: If you want to move the team icons/pips to the top right corner of the mini profile, see this post.

Update: If you want to include the profile background image/cover photo on the profile page, see this post.

Update: If your users want to disable the code, see this post.

Update: If you want to choose the height of the horizontal profile, see this post.

Update If you want to remove the Profile Background profile field from the mini profile even when the code is disabled via Cory's Code CP, see this post.
Edited by DaPizzaMan, Dec 6 2016, 07:47 PM.
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Does this still collide with Dynamo or did you already fix that issue?
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

It should work with Dynamo.
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
Just tested it with Dynamo, it doesn't display correctly (as Dynamo's user profile loads afterwards - though it does find the new user_info section, but it doesn't display horizontally). If you want it to work, you could do the following:

Code:
 
var changeProfileDisplay = function() {/* everything in your code in the function block*/};
if("dynamo_options" in window) {
$("body").on("dynamo_loaded", changeProfileDisplay);
} else {
changeProfileDisplay();
}
Edited by Viral, Aug 30 2014, 12:47 PM.
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Viral
Aug 30 2014, 12:46 PM
Just tested it with Dynamo, it doesn't display correctly (as Dynamo's user profile loads afterwards - though it does find the new user_info section, but it doesn't display horizontally).
I believe this would work.

Code:
 
<script type="text/javascript">
var changeProfileDisplay = function() {$.ajax({url:'http://z4.ifrm.com/30296/128/0/p1163575/HorizontalProfile.js', dataType:'script', cache:true});};
if("dynamo_options" in window) {
$("body").on("dynamo_loaded", changeProfileDisplay);
} else {
changeProfileDisplay();
}
</script>
Offline Profile Quote Post Goto Top
 
Jason
Member Avatar
Member
[ *  *  *  *  * ]
Yep that works DPM.
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Lout
Aug 30 2014, 12:59 PM
Yep that works DPM.
Thanks for confirming that. I have updated the first post.
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Nice code, I can't use it however. It seems to clash with avatars, profile fields, and awards.

But I'm sure others will enjoy this :)
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

kankuro865
Aug 30 2014, 01:18 PM
Nice code, I can't use it however. It seems to clash with avatars, profile fields, and awards.

But I'm sure others will enjoy this :)
I'd be happy to work with you to resolve those issues for the better of the code and for you to be able to use the code. PM me if you would like.
Offline Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
This is my view...
Attached to this post:
Attachments: 4578976.png (214.95 KB)
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Ferby
Aug 30 2014, 02:35 PM
This is my view...
It's because of Alphacide. Pick another theme and look again.
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Ferby
Aug 30 2014, 02:35 PM
This is my view...
Kankuro is right. That's the one theme (ironically my own) that has compatibility issues. I think I have an idea to fix that, which I plan to look into tomorrow when I apply all the fixes Kankuro notified me of privately.
Offline Profile Quote Post Goto Top
 
Jason
Member Avatar
Member
[ *  *  *  *  * ]
This prevents Joe's Advanced Money System from displaying in topics. It does still show on the profile page though.

Board link - http://w11.zetaboards.com/Louts_Test_Board/index/

EDIT: Also is there a way to have a default image for members that have not added their own?

Edited by Jason, Aug 31 2014, 08:02 AM.
Offline Profile Quote Post Goto Top
 
anothermember
Member
[ * ]
^ Good suggestion. I think a default background would be easier when implementing the code.

The horizontal profile looks really good.


Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Thank you all for the criticism, ideas, and more. I have updated the first post (including the Dynamo fix) with some things that needed to be fixed. In addition, thanks to Lout's suggestion, you can now set a default background for users who have yet to decide on a background they want to use. Please read the first post for information on that.

Still to come:
  • Fix for Alphacide
  • Fix for Joe's money system
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply
  • Pages:
  • 1
  • 7