12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
- if (!defined('STATUSNET')) {
- exit(1);
- }
- class ExtendedProfilePlugin extends Plugin
- {
- function onPluginVersion(array &$versions)
- {
- $versions[] = array(
- 'name' => 'ExtendedProfile',
- 'version' => GNUSOCIAL_VERSION,
- 'author' => 'Brion Vibber, Samantha Doherty, Zach Copley',
- 'homepage' => 'http://status.net/wiki/Plugin:ExtendedProfile',
-
- 'rawdescription' => _m('UI extensions for additional profile fields.')
- );
- return true;
- }
-
- public function onStartInitializeRouter(URLMapper $m)
- {
- $m->connect(
- ':nickname/detail',
- array('action' => 'profiledetail'),
- array('nickname' => Nickname::DISPLAY_FMT)
- );
- $m->connect(
- '/settings/profile/finduser',
- array('action' => 'Userautocomplete')
- );
- $m->connect(
- 'settings/profile/detail',
- array('action' => 'profiledetailsettings')
- );
- return true;
- }
- function onCheckSchema()
- {
- $schema = Schema::get();
- $schema->ensureTable('profile_detail', Profile_detail::schemaDef());
- return true;
- }
- function onEndShowAccountProfileBlock(HTMLOutputter $out, Profile $profile) {
- $user = User::getKV('id', $profile->id);
- if ($user) {
- $url = common_local_url('profiledetail', array('nickname' => $user->nickname));
-
- $out->element('a', array('href' => $url, 'class' => 'profiledetail'), _m('More details...'));
- }
- }
- }
|