Extended Profile v3.04
PHP-Fusion: v7.00.06+
original author for v5: Ronald Iwema
email author: sxqsxqsxq@hotmail.com
web author: http://ronald.selwerd.nl
From updates to v6.00.207 onwards: muscapaul
email: muscapaul@gmail.com
web: http://www.muscapaul.com
Last updated: 15 December 2009
-------------------------------------------
Released under the Affero GPL license. You can
redistribute it and/or modify it under the terms of
this license which you can read by viewing the
included agpl.txt or online at
www.gnu.org/licenses/agpl.html. Removal of this
copyright header is strictly prohibited without
written permission from the original author(s).
-------------------------------------------

CHANGED FILES
-------------
../profile.php
../edit_profile.php
../administration/members.php
../administration/updateuser.php
../includes/update_profile_include.php

FEATURES
--------
* Define your own, additional profile fields.


INSTALLATION INFUSION
---------------------
1. Upload the 'extended_profile' folder to your infusions folder.
2. Go through Admin Panel -> System Admin to Infusions/Infusions Management and install the Extended Profile infusion.
3. Access the administration panel of the Extended Profile, after the file modifications described below, through Admin Panel -> Infusions -> Extended Profile.

FILE MODIFICATIONS - AUTOMATIC
------------------------------

1. Make a buckup of the five files mentioned above.
2. Upload the files in the folder changed-files to their corresponding folders (relative to the root).
3. Finished.


FILE MODIFICATIONS - MANUAL
---------------------------

1. Make a buckup of the five files mentioned above.


2. Open the file ../profile.php in a text editor of your choice and find approx. on lines 118-120:

		echo "</tr>\n".$user_fields_output[2];
		echo "</table>\n";
	}

Immediately AFTER add the following code:

	echo "<div style='margin:5px'></div>\n";

@include INFUSIONS."extended_profile/includes/profile.php";

Save the file and close it.


3. Open the file ../edit_profile.php in a text editor of your choice and find approx. on lines 120-121:

echo "<tr>\n<td align='center' colspan='2' class='tbl'><br />\n";
echo "<input type='hidden' name='user_hash' value='".$user_data['user_password']."' />\n";

Immediately BEFORE add the following code:

@include INFUSIONS."extended_profile/includes/edit_profile.php";

Save the file and close it.


4. Open the file ../administration/members.php in a text editor of your choice and find approx. on lines 186-188:

		echo "</tr>\n".$user_fields_output[4];		
		echo "</table>\n";
	}

Immediately AFTER add the following code:

	echo "<div style='margin:5px'></div>\n";

@include INFUSIONS."extended_profile/includes/profile_admin.php";

In the same file find approx. on lines 289-290:

		echo "<tr>\n<td align='center' colspan='2' class='tbl'><br />\n";
		echo "<input type='hidden' name='user_hash' value='".$user_data['user_password']."' />\n";

Immediately BEFORE add the following code:

@include INFUSIONS."extended_profile/includes/edit_profile.php";

Save the file and close it.


5. Open the file ../administration/updateuser.php in a text editor of your choice and find approx. on lines 20-21:

if (!checkrights("M") || !defined("iAUTH") || $_GET['aid'] != iAUTH) { redirect("../index.php"); }
if (!isset($_GET['user_id']) || !isnum($_GET['user_id'])) { redirect(FUSION_SELF.$aidlink); }

Immediately AFTER add the following code:

@include INFUSIONS."extended_profile/includes/update_profile_include.php";

Save the file and close it.


6. Open the file ../includes/update_profile_include.php in a text editor of your choice and find approx. on line 20:

if (!iMEMBER || !isset($_POST['user_hash']) || $_POST['user_hash'] != $user_data['user_password']) { redirect("index.php"); }

Immediately AFTER add the following code:

@include INFUSIONS."extended_profile/includes/update_profile_include.php";

Save the file and close it.


NOTE
----
This infusion/modification is based on v1.00 as made available by Martina Weidemann on http://www.php-fusion.de. Apparently she perfomed her update to v1.00 from v0.3.2004.12.16 as mentioned below in the CHANGELOG and not from v0.4.2005.06.10. This is made clear by the fact that the readme mentions that it is and update to work under PHP-Fusion v6.00 and by the fact that it was not possible in v1.00 for administrators to edit extended profile fields filled in by users. The latter was included in v0.4.2005.06.10 by colgate. For completeness sake, the changes introduced by colgate in v0.4.2005.06.10 are mentioned below, but they did not play a role in the update of this infusion/mod to v2.00. Still, the Danish and Swedish language files were derived from that version.


UPGRADING FROM PHP-FUSION v6 TO PHP-FUSION v7
---------------------------------------------
Upgrading starts by uploading the infusion files, overwriting the existing ones, and uploading the modified core files or updating them manually (see above).
PHP-Fusion v7 utilises a somewhat different system for administering admin rights for Infusions. In v6 it used to be a single setting that gave rights to all Infusions. Under the new version every infusion will be given its own code for admin rights. As a result it is necessary to run an upgrade script (../infusions/extended_profile/v6-7upgrade.php) that will at least at the rights for the primary Superadministrator. The file has checkboxes to indicate whether all superadmins should be given access rights to the Extended Profile Infusion and/or whether all admins with Member Administration rights should be given those rights.
This script only needs to be run if a site is upgraded from PHP-Fusion v6 to v7. Even though a check has been built in to prevent the script from being run after the upgrade has already been performed, it is advised to delete the script from your server after upgrading.


CHANGELOG
---------
v3.04 (muscapaul)
* Modified core files ../profile.php, ../administration/members.php, ../administration/updateuser.php and ..includes/update_profile_include.php updated to PHP-Fusion v7.00.06.
* Error fixed: Upgrade script was faulty for updating the admin rights in the admin table. If you experience any problems related to admin rights, please run the code as given in the forum on http://www.muscapaul.com/forum/viewthread.php?thread_id=38.

v3.03 (muscapaul)
* Bug fixed in extended_profile_admin.php: wrong display in (some?) <div> based themes.

v3.02 (muscapaul)
* Modified core files updated to the final version of PHP-Fusion v7.00.
* Small update to the v6-7 upgrade script to set administrator rights correctly in the admin table.

v3.01 (muscapaul)
* Modified ../profile.php, ../administration/members.php and ../includes/update_user_include.php updated because of change in core file.
* Modified ../includes/update_profile_include.php updated because of change in core file.
* Corrected the upgrade script: due to a change in ../maincore.php the part for updating the non-Superadministrators malfunctioned.
* Updated Danish locale added.

v3.00 (muscapaul)
* Fully updated to comply with PHP-Fusion v7.00 and for XHTML 1.0 compliancy.
* Dropped ../includes/edit_profile_admin.php (identical to ../includes/edit_profile.php) and ../includes/update_profile_include_admin.php (identical to ../includes/update_profile_include.php).

v2.20 (muscapaul)
* Optimalisation query code in ../includes/edit_profile.php, ../includes/edit_profile_admin.php, ../includes/profile.php and ../includes/profile_admin.php REVOKED.

v2.19 (muscapaul)
* Bug corrected: In some browsers Extended Profile fields after the first one did not show in the infusion's admin panel.
* Code updated to comply with both HTML 4.01 Transitional and XHTML 1.01 Transitional standards.
* Query code optimised and adapted to PHP-Fusion standards in ../includes/edit_profile.php, ../includes/edit_profile_admin.php and ../includes/profile.php.

v2.18 (muscapaul)
* All special characters are now also displayed properly in the Extended Profile field names. Thanks to SoulSmasher for pointing out the omission.

v2.17 (muscapaul)
* Modded versions of ../edit_profile.php, ../profile.php and ../administration/members.php updated after core update of PHP-Fusion.

v2.16 (muscapaul)
* Modded versions of ../includes/update_profile_include.php, ../administration/members.php and ../administration/updateuser.php updated after core update of PHP-Fusion.

v2.15 (muscapaul)
* All special characters are now displayed properly in the Extended Profile fields and escape slashes are striped. (It may not work on sites with PHP versions before 4.3.0.)
(Note: The Turkish support site also distributed a v2.15 that should display all Turkish special characters properly. The full version here displays ALL special characters and strips slashes.)
* Turkish locale file added.

v2.14 (muscapaul)
* Bug while editing field fixed (field ordering collapsed because the order of an edited field was set to 0) (the bug was fixed by colgate in a branched of version of the Extended Profile but the fix was overlooked)
* A few corrections in the code of extended_profile_admin.php for HTML compliancy
* Version corrected in infusion.php (was not updated since v2.01...)
* Minor corrections in includes/edit_profile.php and includes/edit_profile_admin.php

v2.13 (muscapaul)
* Modded version of ../edit_profile.php updated after core update of PHP-Fusion.

v2.12 (muscapaul)
* Modded version of ../includes/update_profile_include.php updated after core update of PHP-Fusion.

v2.11 (muscapaul)
* Modified core files adapted after update to PHP-Fusion v6.01.4
* Empty index.php files added to all folders

v2.10 (muscapaul)
* Modified core files adapted after update to PHP-Fusion v6.01.1

v2.03 (muscapaul)
* Modified core files adapted after critical update to PHP-Fusion v6.00.307

v2.02 (muscapaul)
* Modified core files adapted after critical update to PHP-Fusion v6.00.305

v2.01 (muscapaul)
* Modified core files adapted after critical update to PHP-Fusion v6.00.303

v2.00 (muscapaul)
* Complete update to run under v6.00.207 and v6.00.301/2
* Addition of possibility for administrator to edit data in the extended profile fields from the admin panel (member management)
* Display of profile page addapted for v6.00.2xx and v6.00.301/2

v1.00 (Martina Weidemann; not released on http://www.phpfusion-mods.com)
* Incomplete update to run under v6.00.1xx (language support malfunctioning)

[   v0.4.2005.06.10 (colgate) -> see note above]
* All files updated to be compatible with PHP-Fusion v600.103
* Fixed Bug in edit field (screwed up the ordering by setting edited fields to 0)
* Added the custom fields to ./administration/members.php, making it possible for admins to edit the fields of users.
* German language file included (thx Carsten Pukass aka MrX2003)   ]

v0.3.2004.12.16 (scor3p)
* Swedish language included (thx Stefan Svensson)
* Dutch language included (thx me)
* Ignored language file for developement, now corrected :)
* Alfanumeric is spelt Alphanumeric (thx Rayxen)
* Fixed: Screwed up directory structure last release (thx Rayxen)
* Database Name changed to DB Field Name, several ppl suggested several things, maybe this is clear
* Fixed: Ordering did not update on delete (thx for reporting Rayxen)
* Default new order is Last, not First (thx for reporting Rayxen)
* Length custom fields is now identical to existing fields (thx for reporting Rayxen)

v0.2.2004.12.15 (scor3p)
* nice arrows to move fields
* English lang --> "not defined" becomes "Not Specified"
* Underscores allowed in fieldnames
* Danish language included (thx Helmuth Mikkelsen)
