| @@ -1,8 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace MBSocial; |
| 3 | 3 | |
| 4 | -/** Remote Custom Network Class */ | |
| 5 | 4 | class customNetwork extends mbNetwork |
| 6 | 5 | { |
| 7 | 6 | |
| 8 | 7 | protected $priority = 'readmore'; |
| @@ -7,34 +6,14 @@ | ||
| 7 | 6 | |
| 8 | 7 | protected $priority = 'readmore'; |
| 9 | 8 | protected $is_native = false; |
| 10 | 9 | |
| 11 | - /** Function to set default for custom networks to the data that was imported from remote. | |
| 12 | - * | |
| 13 | - * Start state of custom network is all these defaults, but no save on the main settings branch | |
| 14 | - */ | |
| 15 | - public function get_all_defaults() | |
| 10 | + | |
| 11 | +/* public function set() | |
| 16 | 12 | { |
| 17 | - $network = MBSocial()->networks()->getNetworkSettings(); | |
| 18 | 13 | |
| 19 | - if (isset($network['custom'][$this->network])) | |
| 20 | - { | |
| 21 | - | |
| 22 | - $settings = $network['custom'][$this->network]; | |
| 23 | - | |
| 24 | - $all_options = $this->get_all_options(); | |
| 25 | - | |
| 26 | - foreach($all_options as $option => $value) | |
| 27 | - { | |
| 28 | - if (isset($settings[$option])) | |
| 29 | - { | |
| 30 | - $all_options[$option] = $settings[$option]; | |
| 31 | - } | |
| 32 | - } | |
| 33 | - } | |
| 34 | - return $all_options; | |
| 35 | 14 | } |
| 36 | - | |
| 15 | +*/ | |
| 37 | 16 | public function load_settings($settings) |
| 38 | 17 | { |
| 39 | 18 | parent::load_settings($settings); |
| 40 | 19 | |
| @@ -41,6 +20,20 @@ | ||
| 41 | 20 | if (isset($settings['name'])) |
| 42 | 21 | { |
| 43 | 22 | $this->network = $settings['name']; |
| 44 | 23 | } |
| 24 | + | |
| 25 | + /* foreach($fields as $name => $value) | |
| 26 | + { | |
| 27 | + if ($name == 'name') | |
| 28 | + $name = 'network'; | |
| 29 | + if ($name == 'popup') | |
| 30 | + $name = 'is_popup'; | |
| 31 | + | |
| 32 | + echo " $name - $value <BR>"; | |
| 33 | + | |
| 34 | + if ($value && strlen($value) > 0) | |
| 35 | + $this->{$name} = $value; | |
| 36 | + } | |
| 37 | +*/ | |
| 45 | 38 | } |
| 46 | 39 | } |