Customizing SMF > Modifications and Packages

Custom Profile Field Mod

(1/625) > >>

winrules:
Link to Mod

This mod will add an unlimited number of custom profile fields to SMF. They will be configurable in "Features and Options". The following options are available (when you click on the field name on the main screen):


For text box or text area:
-Name
-Field Description
-Show in profile?
-Show in posts?
-Parse BBC?
-Text to display before field (BBC is ok if enabled above)
-Text to display after field (BBC is ok if enabled above)
-Field ID
-Add a horizontal rule before field in profile?
-Show field on registration?
-Only allow admins to edit field?
-Only allow admins to view field?

For check box:
-Name
-Field Description
-Show in profile?
-show in posts?
-Text to display when box is checked
-Text to display when box isn't checked
-Parse BBC?
-Fields ID
-Add a horizontal rule before field in profile?
-Show field on registration?
-Only allow admins to edit field?
-Only allow admins to view field?

For selection box:
-Name
-Field Description
-Show in profile?
-show in posts?
-Parse BBC?
-Fields ID
-Add a horizontal rule before field in profile?
-Show field on registration?
-Only allow admins to edit field?
-Only allow admins to view field?
-Option 1
-Option 2
-Add an option

In the text to add before and after the field you can type "%1" (without the quotes) and it will replace %1 with the content of the field. Example: If you wanted to make a MySpace Field, you could use [url=http://www.myspace.com/%1] in the before spot and [/url] in the after spot, and it would just show the username but link to the site.


Currently Known Bugs:
- None


Version History:
3.19-Fixed a small bug with fields on registration.
3.18-Fixes a security vulnerability.
3.17-Fixed a bug with moving fields.
3.16-Added compatibility for 1.1 final.
3.15-Fixed bug with moving fields up and down and deleting.
3.14-Security hole fixed (big thanks to HarzeM for discovering it). All users are strongly encouraged to upgrade.
3.13-1.1 RC3 compatibility added, 1.1 RC2 development stopped.
3.12-Fixes a bug with the before and after options on text fields.
3.11-Fixes a bug with adding options, and a bug with moving selection fields.
3.1-Adds an option to reorder and delete fields, some small changes in the admin interface, field descriptions, the text for the admin tab is now stored in language files, adds some more options for horizontal rules, fields are now enabled by default when you create them.
3.02-Fixes a bug with fields on posts.
3.01-Fixes an error with loadLanguage().
3.0-Moved almost everything into a central file for easier upgrades, fixed a bug with check boxes, and moved all the text into the language files.
2.14-Fixed some issues with selection fields.
2.13-Fixes errors in error log, other bugs.
2.12-Fixes bug with Mambo/Joomla, and fixes XHTML compliance bug.
2.11-Fixes bug when forcing field on registration.
2.1-Added permissions to view and edit fields, an option on where to display in posts, and an option to display the fields on registration.
2.0-Adds selection box fields and adds an add a field button.
1.11-Fixes bug with using "%1" in posts.
1.1-Adds "%1" functionality in before and after fields.
1.02-Fixes more compatibility issues.
1.01-Fixes compatibility issue with some other mods (there is no need to upgrade from 1.0 to 1.01 if you already have the mod installed).
1.0-Initial public release.


How to Make "Show in posts?" Work With Custom Themes (last updated for version 3.16):

In Display.template.php
Find:

--- Code: --- // Show how many posts they have made.

--- End code ---
And Replace With:

--- Code: --- global $sourcedir, $messagevars;
$messagevars = $message;
require_once($sourcedir . '/CustomProfile.php');
DisplayFieldPosts();

// Show how many posts they have made.

--- End code ---

Find:

--- Code: --- <a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['label'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . $message['member']['online']['label'] . '" border="0" />' : $message['member']['online']['label'], '</a>';

--- End code ---
And Replace With:

--- Code: --- <a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['label'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . $message['member']['online']['label'] . '" border="0" />' : $message['member']['online']['label'], '</a>';
DisplayFieldPostsPictures();

--- End code ---
Note: If your theme has it's own Profile.template.php or PersonalMessage.template.php or Register.template.php you will have to make changes to those but most themes don't. Also note that this isn't necessary on all themes, but most have their own Display.template.php.


Download Latest Version (3.19)

xtremecruiser:
Will this do links to other sites too, like blogs, or blog profiles, etc ?
Thanks

xtremecruiser:
Got some errors, using Powered by SMF 1.1 RC2 with the latest patch

Install Actions
Installations actions for "Custom Profile Mod":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/ModSettings.php    Test failed
2.    Execute Modification    ./Themes/default/Profile.template.php    Test failed
3.    Execute Modification    ./Themes/default/Display.template.php    Test successful
4.    Execute Modification    ./Themes/default/PersonalMessage.template.php    Test successful
5.    Execute Code    add_settings.php    

daragor:
some errors for me too in RC2

nice mod! fix it please

dracomiconia:
What about 1.07 users.....?

 :'( :'( :'(

Navigation

[0] Message Index

[#] Next page

Go to full version