2024-05-22, 01:53 AM
(This post was last modified: 2024-05-22, 01:55 AM by Omar G.. Edited 2 times in total.)
I recently released OUGC File Profile Fields as a free plugin.
The following is an Example Configuration that will help you implement a custom cover for user profiles.
The reasoning to share this tutorial is for it to be an alternative to third-party plugins that are not optimized, and sometimes even have potential or actual vulnerabilities which might result in risky forum setups.
Custom Profile Cover Image
https://github.com/OUGC-Network/OUGC-Fil...e_examples
Custom Profile Field
Title
Short Description
Field Type
File Types
Maximum File Size (Kilobytes)
Uploads Path
Custom Output
Only Image Files
Minimum Image Dimensions
Maximum Image Dimensions
Display on profile?
Display on postbit?
Viewable By
Editable By
Custom Template
A custom template should be created either in the
Template Name
Contents The CLASS selector will target the profile user table in the stock MyBB theme.
Template Modifications
Template Name
Find
Add before
Preview
* This is configuration set in a stock MyBB installation. For custom setups (themes), modifications or adaptations are expected.
The following is an Example Configuration that will help you implement a custom cover for user profiles.
The reasoning to share this tutorial is for it to be an alternative to third-party plugins that are not optimized, and sometimes even have potential or actual vulnerabilities which might result in risky forum setups.
Custom Profile Cover Image
https://github.com/OUGC-Network/OUGC-Fil...e_examples
Custom Profile Field
Title
Profile Cover
Short Description
Upload an image to be used as your profile cover.
Field Type
File
File Types
PNG Image (png)
Maximum File Size (Kilobytes)
2048
Uploads Path
./uploads/covers
(chmod 777
)Custom Output
Yes
Only Image Files
Yes
Minimum Image Dimensions
600|200
Maximum Image Dimensions
1000|400
Display on profile?
Yes
Display on postbit?
No
Viewable By
All groups
Editable By
All groups
Custom Template
A custom template should be created either in the
Global Templates
set for all themes or in each template set for each theme.Template Name
ougcfileprofilefields_profile_file_10
Contents The CLASS selector will target the profile user table in the stock MyBB theme.
<style>
#content > div:nth-child(1) > fieldset:nth-child(5) {
background-image: url('{$mybb->settings['bburl']}/ougc_fileprofilefields.php?aid={$aid}');
}
</style>
Template Modifications
Template Name
member_profile
Find
{$footer}
Add before
{$GLOBALS['ougc_fileprofilefields']['fid10']}
where 10
is the custom profile field identifier (fid
).Preview
* This is configuration set in a stock MyBB installation. For custom setups (themes), modifications or adaptations are expected.