]> git.mxchange.org Git - friendica.git/commitdiff
add more plugin hooks, etc.
authorFriendika <info@friendika.com>
Thu, 23 Dec 2010 04:23:41 +0000 (20:23 -0800)
committerFriendika <info@friendika.com>
Thu, 23 Dec 2010 04:23:41 +0000 (20:23 -0800)
boot.php
mod/profile.php
mod/settings.php
view/en/profile_advanced.php

index 7e630eba895ced848ee2ead843fbbedb52401ba8..3a6886fd116767b68495c7307404f2c944d847db 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1118,6 +1118,23 @@ function set_config($family,$key,$value) {
 }}
 
 
+if(! function_exists('load_pconfig')) {
+function load_pconfig($uid,$family) {
+       global $a;
+       $r = q("SELECT * FROM `pconfig` WHERE `cat` = '%s' AND `uid` = %d",
+               dbesc($family),
+               intval($uid)
+       );
+       if(count($r)) {
+               foreach($r as $rr) {
+                       $k = $rr['k'];
+                       $a->config[$uid][$family][$k] = $rr['v'];
+               }
+       }
+}}
+
+
+
 if(! function_exists('get_pconfig')) {
 function get_pconfig($uid,$family, $key, $instore = false) {
 
@@ -1759,6 +1776,8 @@ function contact_block() {
                $o .=  '<div id="viewcontacts"><a id="viewcontacts-link" href="viewcontacts/' . $a->profile['nickname'] . '">' . t('View Contacts') . '</a></div>';
                
        }
+
+       call_hooks('contact_block_end', $o);
        return $o;
 
 }}
@@ -2018,6 +2037,8 @@ function profile_sidebar($profile) {
                '$homepage' => $homepage
        ));
 
+       call_hooks('profile_sidebar', $o);
+
        return $o;
 }}
 
index b40617d03b1d23eda51086918b308b3d9321bfd5..b1f0209307d218bd9eb267e3327c109efaee611b 100644 (file)
@@ -97,6 +97,9 @@ function profile_content(&$a, $update = 0) {
                                require_once("view/$profile_lang/profile_advanced.php");
                        else
                                require_once('view/profile_advanced.php');
+
+                       call_hooks('profile_advanced',$o);
+
                        return $o;
                }
 
index b86ff4c1c858a0409a90535cf628221d967a9740..4743ecd6611aef05eff2bf1b8b9e477cc91239e0 100644 (file)
@@ -14,6 +14,9 @@ function settings_post(&$a) {
                notice( t('Permission denied.') . EOL);
                return;
        }
+
+       call_hooks('settings_post', $_POST);
+
        if(count($a->user) && x($a->user,'uid') && $a->user['uid'] != local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
@@ -298,6 +301,9 @@ function settings_content(&$a) {
                '$pagetype' => $pagetype
        ));
 
+       call_hooks('settings_page',$o);
+
        return $o;
 
-}}
\ No newline at end of file
+}}
+
index 7e2036890b6ac3f6952b3620417af039f13bdf58..82c66adece9fe6791bc1dafcd7e9adeb01ae22e5 100644 (file)
@@ -223,3 +223,4 @@ $o .= <<< EOT
 EOT;
 }
 
+