public function generate($page, $mode = self::FRONTEND_OUTPUT_NORMAL) { $this->_Parent->Profiler->sample('Page creation process started'); $this->_page = $page; $this->__buildPage(); if ($mode == self::FRONTEND_OUTPUT_NORMAL) { if (@in_array('XML', $this->_pageData['type']) || @in_array('xml', $this->_pageData['type'])) { $this->addHeaderToPage('Content-Type', 'text/xml; charset=utf-8'); } else { $this->addHeaderToPage('Content-Type', 'text/html; charset=utf-8'); } if (@in_array('404', $this->_pageData['type'])) { $this->addHeaderToPage('HTTP/1.0 404 Not Found'); } elseif (@in_array('403', $this->_pageData['type'])) { $this->addHeaderToPage('HTTP/1.0 403 Forbidden'); } } #### # Delegate: FrontendOutputPreGenerate # Description: Immediately before generating the page. Provided with the page object, XML and XSLT # Global: Yes $this->ExtensionManager->notifyMembers('FrontendOutputPreGenerate', '/frontend/', array('page' => &$this, 'xml' => $this->_xml, 'xsl' => $this->_xsl)); $output = parent::generate(); #### # Delegate: FrontendOutputPostGenerate # Description: Immediately after generating the page. Provided with string containing page source # Global: Yes $this->ExtensionManager->notifyMembers('FrontendOutputPostGenerate', '/frontend/', array('output' => &$output)); $this->_Parent->Profiler->sample('XSLT Transformation', PROFILE_LAP); if ($mode == self::FRONTEND_OUTPUT_NORMAL && !$output) { $errstr = NULL; while (list($key, $val) = $this->Proc->getError()) { $errstr .= 'Line: ' . $val['line'] . ' - ' . $val['message'] . self::CRLF; } $this->_Parent->customError(E_USER_ERROR, NULL, trim($errstr), true, false, 'xslt-error', array('proc' => clone $this->Proc)); } $this->_Parent->Profiler->sample('Page creation complete'); ## DEBUG if ($mode == self::FRONTEND_OUTPUT_DEBUG) { include_once TOOLKIT . '/class.debugpage.php'; $debug = new DebugPage(); $output = $debug->generate($this->_pageData, $this->_xml, @file_get_contents($this->_pageData['filelocation']), $output, $this->_param); ## PROFILE } elseif ($mode == self::FRONTEND_OUTPUT_PROFILE) { include_once TOOLKIT . '/class.profilepage.php'; $profile = new ProfilePage(); $output = $profile->generate($this->_pageData, $this->_Parent->Profiler, $this->_Parent->Database); } ## EVENT DETAILS IN SOURCE if ($this->_Parent->isLoggedIn() && $this->_Parent->Configuration->get('display_event_xml_in_source', 'public') == 'yes') { $output .= self::CRLF . '<!-- ' . self::CRLF . $this->_events_xml->generate(true) . ' -->'; } return $output; }
public function __construct(PlWizard $wiz) { parent::__construct($wiz); $this->settings['section'] = new ProfileSettingSection(); $this->settings['binets'] = new ProfileSettingBinets(); $this->watched['section'] = $this->watched['binets'] = true; }
public function __construct(PlWizard $wiz) { parent::__construct($wiz); $this->settings['addresses'] = new ProfileSettingAddresses(); $this->watched['addresses'] = true; Platal::page()->assign('geocoding_removal', true); }
protected function getStyleSheets() { $stylesheets = parent::getStylesheets(); $stylesheets[] = 'styles/css/minimal/screen/custom/profilenotes.css'; return $stylesheets; }
public function __construct(PlWizard $wiz) { parent::__construct($wiz); if (S::user()->checkPerms(User::PERM_DIRECTORY_PRIVATE)) { $this->settings['cv'] = null; } $this->settings['corps'] = new ProfileSettingCorps(); $this->settings['jobs'] = new ProfileSettingJob(); $this->watched = array('cv' => true, 'jobs' => true, 'corps' => true); Platal::page()->assign('geocoding_removal', true); }
public function __construct(PlWizard $wiz) { parent::__construct($wiz); $this->settings['search_names'] = new ProfileSettingSearchNames(); $this->settings['nationality1'] = $this->settings['nationality2'] = $this->settings['nationality3'] = $this->settings['promo_display'] = $this->settings['profile_title'] = null; $this->settings['email_directory'] = new ProfileSettingEmail(); $this->settings['email_directory_new'] = new ProfileSettingEmailDirectory(); $this->settings['tels'] = new ProfileSettingPhones(); $this->settings['edus'] = new ProfileSettingEdu(); $this->settings['main_edus'] = new ProfileSettingMainEdu(); $this->settings['promo'] = new ProfileSettingPromo(); $this->settings['networking'] = new ProfileSettingNetworking(); $this->settings['hobbies'] = new ProfileSettingHobby(); $this->watched = array('tels' => true, 'networking' => true, 'edus' => true, 'nationality1' => true, 'nationality2' => true, 'nationality3' => true, 'search_names' => true); /* Some fields editable under condition */ if (!S::user()->isMe($this->owner)) { $this->settings['deathdate'] = new ProfileSettingDate(true); $this->settings['birthdate'] = new ProfileSettingDate(true); $this->settings['birthdate_ref'] = new ProfileSettingDate(true); $this->settings['axfreetext'] = null; } else { $this->settings['yourself'] = null; $this->settings['birthdate'] = new ProfileSettingDate(); } if (S::user()->checkPerms('directory_private') || S::user()->isMyProfile($this->owner)) { $this->settings['freetext'] = null; $this->settings['freetext_pub'] = $this->settings['photo_pub'] = new ProfileSettingPub(); $this->watched['freetext'] = true; } Platal::page()->assign('is_registered', $this->owner->perms ? true : false); }
public function __construct(PlWizard $wiz) { parent::__construct($wiz); $this->settings['expertise'] = null; $this->settings['terms'] = new ProfileSettingTerms(); $this->settings['countries'] = new ProfileSettingCountry(); $this->settings['competences'] = new ProfileSettingSkill('skill', 'id', 'cid', 'text_fr'); $this->settings['langues'] = new ProfileSettingSkill('langskill', 'iso_639_2b', 'lid', 'language'); }
public function save(ProfilePage $page, $field, $value) { Phone::deletePhones($page->pid(), Phone::LINK_PROFILE, null, S::user()->isMe($page->owner) || S::admin()); Phone::savePhones($value, $page->pid(), Phone::LINK_PROFILE); }
public function __construct(PlWizard $wiz) { parent::__construct($wiz); $this->settings['medals_pub'] = new ProfileSettingPub(); $this->settings['medals'] = new ProfileSettingDeco(); $this->watched['medals'] = true; }
public function __construct(PlWizard $wiz) { parent::__construct($wiz); $this->settings['message'] = null; }