From e3b86cc583c693071a9fda462f2145b7a5d55400 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Sat, 10 Jul 2010 08:18:58 -0700 Subject: [PATCH] adding profile fields --- mod/profiles.php | 11 +++ updates.sql | 6 +- view/profile_edit.tpl | 174 +++++++++++++++++++++++++++++++++++++++--- view/style.css | 18 +++-- 4 files changed, 191 insertions(+), 18 deletions(-) diff --git a/mod/profiles.php b/mod/profiles.php index 34678a237d..c74586b07b 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -225,6 +225,17 @@ function profiles_content(&$a) { '$sexual' => sexpref_selector($r[0]['sexual']), '$about' => $r[0]['about'], '$homepage' => $r[0]['homepage'], + '$politic' => $r[0]['politic'], + '$religion' => $r[0]['religion'], + '$music' => $r[0]['music'], + '$book' => $r[0]['book'], + '$tv' => $r[0]['tv'], + '$film' => $r[0]['film'], + '$interest' => $r[0]['interest'], + '$romance' => $r[0]['romance'], + '$work' => $r[0]['work'], + '$education' => $r[0]['education'], + '$contact' => $r[0]['contact'], '$profile_in_dir' => (($is_default) ? $profile_in_dir : '') )); diff --git a/updates.sql b/updates.sql index 07c4c760c0..de7bfa1e42 100644 --- a/updates.sql +++ b/updates.sql @@ -21,4 +21,8 @@ ALTER TABLE `profile` ADD `summary` CHAR( 255 ) NOT NULL AFTER `about` ; ALTER TABLE `profile` ADD `dob_hide` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `dob` ; ALTER TABLE `profile` DROP `age`; - ALTER TABLE `profile` DROP `dob_hide` ; \ No newline at end of file + ALTER TABLE `profile` DROP `dob_hide` ; + ALTER TABLE `profile` CHANGE `school` `education` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ; + ALTER TABLE `profile` DROP `employer` ; + +ALTER TABLE `profile` ADD `contact` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `education` ; \ No newline at end of file diff --git a/view/profile_edit.tpl b/view/profile_edit.tpl index ff0e2f8e44..a56d4f78f6 100644 --- a/view/profile_edit.tpl +++ b/view/profile_edit.tpl @@ -9,13 +9,13 @@ $default
-
*
+
*
- +
@@ -26,29 +26,34 @@ $gender
-

Leave year blank to suppress age.

$dob
+
+ +
+
+ +
- +
- +
- +
@@ -73,6 +78,10 @@ $dob
+
+ +
+
@@ -90,28 +99,171 @@ $sexual
- +
+
+ + +
+
+ +
+ + +
+
+ + $profile_in_dir + +
+ +
+
+

Tell us about yourself.

- +
-
- +
+

+Hobbies/Interests. +

+ + +
-
+
+
+ + +
+

+Contact information. +

+ + + +
+
+ + + +
+ +
+
+ + +
+

+Musical interests. +

+ + + +
+
+ + +
+

+Books, literature. +

+ + + +
+
+ + + + +
+

+Television. +

+ + + +
+
+ + + + +
+

+Film/dance/culture/entertainment. +

+ + + +
+
+ + + +
+ +
+
+ + +
+

+Love/romance. +

+ + + +
+
+ + + + +
+

+Work/employment. +

+ + + +
+
+ + + + +
+

+School/education. +

+ + + +
+
+ + + + +
+ +
+
diff --git a/view/style.css b/view/style.css index 06dd6581cd..35f66ccff8 100644 --- a/view/style.css +++ b/view/style.css @@ -278,11 +278,11 @@ input#dfrn-url { margin-left: 50px; margin-bottom: 20px; } -#profile-edit-dob-hide-label { - margin-left: 20px; - width: 150px; -} +.profile-edit-submit-wrapper { + margin-top: 20px; + margin-bottom: 20px; +} #profile-edit-profile-name-label, #profile-edit-name-label, @@ -295,6 +295,8 @@ input#dfrn-url { #profile-edit-country-name-label, #profile-edit-marital-label, #profile-edit-sexual-label, +#profile-edit-politic-label, +#profile-edit-religion-label, #profile-edit-homepage-label { float: left; width: 175px; @@ -311,6 +313,8 @@ input#dfrn-url { #profile-edit-country-name, #marital-select, #sexual-select, +#profile-edit-politic, +#profile-edit-religion, #profile-in-dir-yes, #profile-in-dir-no { float: left; @@ -339,14 +343,16 @@ input#dfrn-url { #profile-edit-country-name-end, #profile-edit-marital-end, #profile-edit-sexual-end, +#profile-edit-politic-end, +#profile-edit-religion-end, #profile-edit-homepage-end, #profile-in-dir-break, #profile-in-dir-end { clear: both; } -#gender-select, #marital-select { - width: 145px; +#gender-select, #marital-select, #sexual-select { + width: 220px; } #profile-edit-profile-name-wrapper .required {