Implemented an extended user profile based on a patch from Jethro Carr (issue 510).

Changes with respect to the original patch:
- use Gconf instead of separate table / data scheme
- better form validation for URLs and emails
- no htmlentity-encoded contents in the database (pluf automatically safe-encodes
  stuff before it writes out contents into templates)
- add visual separators in the form views to have a distinct view of basic
  (important) data and other data which are only displayed in the public profile
- give a hint about the maximum display size of 60x60 px^2 and use max-width and
  max-height in the templates to avoid nasty distortions by the browser
- use target=_blank and rel=nofollow on the twitter and website links in the profile
- some whitespace / formatting / code style fixes
This commit is contained in:
Thomas Keller
2010-12-05 01:22:32 +01:00
parent 874b5aa7e9
commit 784c9718eb
18 changed files with 490 additions and 66 deletions

View File

@@ -46,7 +46,7 @@ class IDF_Gconf extends Pluf_Model
array(
'type' => 'Pluf_DB_Field_Sequence',
//It is automatically added.
'blank' => true,
'blank' => true,
),
'model_class' =>
array(
@@ -108,7 +108,7 @@ class IDF_Gconf extends Pluf_Model
*/
function setVal($key, $value)
{
if (!is_null($this->getVal($key, null))
if (!is_null($this->getVal($key, null))
and $value == $this->getVal($key)) {
return;
}
@@ -121,7 +121,7 @@ class IDF_Gconf extends Pluf_Model
$this->datacache[$key] = $value;
return;
}
}
}
// we insert
$conf = new IDF_Gconf();
$conf->model_class = $this->_mod->_model;