]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Added event to let the site owner add more information into <address>
authorSarven Capadisli <csarven@controlyourself.ca>
Thu, 2 Jul 2009 16:06:06 +0000 (16:06 +0000)
committerSarven Capadisli <csarven@controlyourself.ca>
Thu, 2 Jul 2009 16:06:06 +0000 (16:06 +0000)
for contact e.g., email, location, tagline

EVENTS.txt
lib/action.php

index 8e917f11de864605b5e561caf1b797f33a3d0e96..2c43469d4642c3e8a9edc5f1bd5f6da2fd33831c 100644 (file)
@@ -1,5 +1,4 @@
-InitializePlugin: a chance to initialize a plugin in a complete
-                 environment
+InitializePlugin: a chance to initialize a plugin in a complete environment
 
 CleanupPlugin: a chance to cleanup a plugin at the end of a program
 
@@ -117,3 +116,9 @@ EndLogout: After logging out
 
 ArgsInitialized: After the argument array has been initialized
 - $args: associative array of arguments, can be modified
+
+StartAddressData: Allows the site owner to provide additional information about themselves for contact (e.g., tagline, email, location)
+- $action: the current action
+
+EndAddressData: At the end of <address>
+- $action: the current action
index 3bfa6ba15bd78d4b0818d457ded8635effe9e0c8..c89fe180ab43679acbd30b35c9b40699be77dfc5 100644 (file)
@@ -383,15 +383,18 @@ class Action extends HTMLOutputter // lawsuit
     {
         $this->elementStart('address', array('id' => 'site_contact',
                                              'class' => 'vcard'));
-        $this->elementStart('a', array('class' => 'url home bookmark',
-                                       'href' => common_local_url('public')));
-        if (common_config('site', 'logo') || file_exists(theme_file('logo.png'))) {
-            $this->element('img', array('class' => 'logo photo',
-                                        'src' => (common_config('site', 'logo')) ? common_config('site', 'logo') : theme_path('logo.png'),
-                                        'alt' => common_config('site', 'name')));
+        if (Event::handle('StartAddressData', array($this))) {
+            $this->elementStart('a', array('class' => 'url home bookmark',
+                                           'href' => common_local_url('public')));
+            if (common_config('site', 'logo') || file_exists(theme_file('logo.png'))) {
+                $this->element('img', array('class' => 'logo photo',
+                                            'src' => (common_config('site', 'logo')) ? common_config('site', 'logo') : theme_path('logo.png'),
+                                            'alt' => common_config('site', 'name')));
+            }
+            $this->element('span', array('class' => 'fn org'), common_config('site', 'name'));
+            $this->elementEnd('a');
+            Event::handle('EndAddressData', array($this));
         }
-        $this->element('span', array('class' => 'fn org'), common_config('site', 'name'));
-        $this->elementEnd('a');
         $this->elementEnd('address');
     }