コード例 #1
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $params = JoaktreeHelper::getJTParams();
     $document =& JFactory::getDocument();
     // set up style sheets and javascript files
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::stylesheet(JoaktreeHelper::joaktreecss($params->get('theme')));
     // Access
     $lists['userAccess'] = $this->get('access');
     $lists['treeId'] = $this->get('treeId');
     $lists['technology'] = $this->get('technology');
     // Person + generations
     $personId = array();
     $this->person = $this->get('person');
     $personId[] = $this->person->id . '|1';
     $lists['ancestorLevel'] = $params->get('ancestorlevel', 1);
     $lists['startGenNum'] = 1;
     $lists['endGenNum'] = $lists['ancestorLevel'] + 4;
     $lists['app_id'] = $this->person->app_id;
     // show dates
     $lists['showDates'] = $params->get('ancestordates', 0);
     // last update
     $lists['lastUpdate'] = JoaktreeHelper::lastUpdateDateTimePerson($this->person->lastUpdateDate);
     // copyright
     $lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     $this->assignRef('personId', $personId);
     $this->assignRef('lists', $lists);
     if ($lists['userAccess']) {
         // set title, meta title
         $document->setTitle($this->person->fullName);
         $document->setMetadata('title', $this->person->fullName);
         // set additional meta tags
         if ($params->get('menu-meta_description')) {
             $document->setDescription($params->get('menu-meta_description'));
         }
         if ($params->get('menu-meta_keywords')) {
             $document->setMetadata('keywords', $params->get('menu-meta_keywords'));
         }
         // robots
         if ($this->person->robots > 0) {
             $document->setMetadata('robots', JoaktreeHelper::stringRobots($this->person->robots));
         } else {
             if ($params->get('robots')) {
                 $document->setMetadata('robots', $params->get('robots'));
             }
         }
     }
     parent::display($tpl);
 }
コード例 #2
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     // Load the parameters.
     $app = JFactory::getApplication('site');
     $params = JoaktreeHelper::getJTParams();
     $document =& JFactory::getDocument();
     // Find the value for tech
     $technology = $this->get('technology');
     // set up style sheets and javascript files
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::stylesheet(JoaktreeHelper::joaktreecss($params->get('theme')));
     // get user info
     $userId = $this->get('userId');
     if (!$userId || $userId == 0) {
         $document->addScript(JoaktreeHelper::joaktreejs('jtform.js'));
     }
     // Get data from the model
     $personlist = $this->get('personlist');
     $pagination =& $this->get('Pagination');
     $tree_id = $this->get('treeId');
     $patronymSetting = $this->get('patronymSetting');
     $userAccess = $this->get('access');
     $menus1 =& $this->get('menusJoaktree');
     $menus2 =& $this->get('menusJoaktreelist');
     // Id's and settings
     $lists['tree_id'] = $tree_id;
     $lists['relationId'] = $this->get('relationId');
     $lists['menuItemId'] = $menus1[$tree_id];
     $lists['menuItemId2'] = $menus2[$tree_id];
     $lists['patronym'] = $patronymSetting;
     $lists['userAccess'] = $userAccess;
     $lists['technology'] = $technology;
     $lists['action'] = JoaktreeHelper::getAction();
     //Filter
     $context = 'com_joaktree.joaktreelist.list.';
     $filter_order = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'jpn.familyName', 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search1 = $app->getUserStateFromRequest($context . 'search1', 'search1', '', 'string');
     $search1 = JString::strtolower($search1);
     $search2 = $app->getUserStateFromRequest($context . 'search2', 'search2', '', 'string');
     $search2 = JString::strtolower($search2);
     $search3 = $app->getUserStateFromRequest($context . 'search3', 'search3', '', 'string');
     $search3 = JString::strtolower($search3);
     $search4 = $app->getUserStateFromRequest($context . 'search4', 'search4', '', 'string');
     $search4 = base64_decode($search4);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['searchWidth'] = (int) $params->get('search_width', '120');
     $lists['search1'] = $search1;
     $lists['search2'] = $search2;
     $lists['search3'] = $search3;
     $lists['search4'] = $search4;
     // last update
     $lists['lastUpdate'] = $this->get('lastUpdate');
     // copyright
     $lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     $this->assignRef('pagination', $pagination);
     $this->assignRef('personlist', $personlist);
     $this->assignRef('lists', $lists);
     if (($lists['action'] == 'save' || $lists['action'] == 'saveparent1') && count($personlist) == 0) {
         JFactory::getDocument()->addScriptDeclaration('window.parent.jtSavePerson();');
     } else {
         if ($lists['userAccess']) {
             // set title, meta title
             if ($params->get('treeName')) {
                 $title = $params->get('treeName');
                 $document->setTitle($title);
                 $document->setMetadata('title', $title);
             }
             // set additional meta tags
             if ($params->get('menu-meta_description')) {
                 $document->setDescription($params->get('menu-meta_description'));
             }
             if ($params->get('menu-meta_keywords')) {
                 $document->setMetadata('keywords', $params->get('menu-meta_keywords'));
             }
             // robots
             if ($params->get('treeRobots') > 0) {
                 $document->setMetadata('robots', JoaktreeHelper::stringRobots($params->get('treeRobots')));
             } else {
                 if ($params->get('robots')) {
                     $document->setMetadata('robots', $params->get('robots'));
                 }
             }
         }
         parent::display($tpl);
     }
 }
コード例 #3
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $this->lists = array();
     // Load the parameters.
     $this->params = JoaktreeHelper::getJTParams();
     $document =& JFactory::getDocument();
     $app = JFactory::getApplication('site');
     // Get data from the model
     $this->treeinfo = $this->get('treeinfo');
     $menus = $this->get('menus');
     // set up style sheets and javascript files
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::stylesheet(JoaktreeHelper::joaktreecss($this->params->get('theme')));
     // add script
     $this->lists['interactiveMap'] = $this->get('interactiveMap');
     $this->lists['indFilter'] = $this->get('locationFilter');
     $this->lists['tree_id'] = $this->get('treeId');
     $this->lists['script'] = $this->addScript();
     // get text
     $this->articles = Tree::getArticles($this->lists['tree_id']);
     // Id's and settings
     $this->lists['userAccess'] = $this->get('access');
     $this->lists['menuItemId'] = $menus[$this->lists['tree_id']];
     $this->lists['indMap'] = false;
     $tmp = $this->get('mapUrl');
     if ($tmp) {
         $this->lists['indMap'] = true;
         $this->lists['map'] = explode("|", $tmp);
     }
     // distance options
     if ($this->lists['interactiveMap']) {
         $distance = $app->getUserStateFromRequest('com_joaktree.map.distance', 'distance', 0, 'int');
         $this->lists['distance'] = $this->getDistanceSelect($distance);
     }
     //location list
     $this->lists['index'] = $this->get('locationIndex');
     $this->lists['columns'] = (int) $this->params->get('columnsLoc', '3');
     $this->locationlist = $this->get('locationlist');
     $this->lists['numberRows'] = (int) ceil(count($this->locationlist) / $this->lists['columns']);
     $this->lists['linkMap'] = 'index.php?option=com_joaktree' . '&view=interactivemap' . '&tmpl=component' . '&format=raw' . '&treeId=' . $this->lists['tree_id'];
     $this->lists['linkList'] = 'index.php?option=com_joaktree' . '&view=joaktreelist' . '&tmpl=component' . '&layout=location' . '&treeId=' . $this->lists['tree_id'];
     // last update
     $this->lists['lastUpdate'] = $this->get('lastUpdate');
     // copyright
     $this->lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     if ($this->lists['userAccess']) {
         // set title, meta title
         if ($this->params->get('treeName')) {
             $title = $this->params->get('treeName');
             $document->setTitle($title);
             $document->setMetadata('title', $title);
         }
         // set additional meta tags
         if ($this->params->get('menu-meta_description')) {
             $document->setDescription($this->params->get('menu-meta_description'));
         }
         if ($this->params->get('menu-meta_keywords')) {
             $document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
         }
         // robots
         if ($this->params->get('treeRobots') > 0) {
             $document->setMetadata('robots', JoaktreeHelper::stringRobots($this->params->get('treeRobots')));
         } else {
             if ($this->params->get('robots')) {
                 $document->setMetadata('robots', $this->params->get('robots'));
             }
         }
     }
     parent::display($tpl);
 }
コード例 #4
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     // Load the parameters.
     $model = $this->getModel();
     $this->params = JoaktreeHelper::getJTParams();
     $document =& JFactory::getDocument();
     if ($this->params->get('siteedit', 1)) {
         $canDo = JoaktreeHelper::getActions();
     } else {
         $canDo = null;
     }
     // Find the value for tech
     $technology = $this->get('technology');
     // set up style sheets and javascript files
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::stylesheet(JoaktreeHelper::joaktreecss($this->params->get('theme')));
     // Set up shadowbox
     JHTML::stylesheet(JoaktreeHelper::shadowboxcss());
     $document->addScript(JoaktreeHelper::shadowboxjs());
     // Set up modal behavior
     JHtml::_('behavior.modal', 'a.modal');
     if ($technology != 'b') {
         // javascript template - no ajax
         // default template includes ajax
         JHTML::stylesheet(JoaktreeHelper::briaskcss());
         $document->addScript(JoaktreeHelper::joaktreejs('mod_briaskISS.js'));
         $document->addScript(JoaktreeHelper::joaktreejs('toggle.js'));
     }
     if ($technology != 'b' and $technology != 'j') {
         // default template includes ajax
         $document->addScript(JoaktreeHelper::joaktreejs('jtajax.js'));
     }
     // Access
     $lists['userAccess'] = $this->get('access');
     $lists['technology'] = $technology;
     $edit = $this->get('action');
     $lists['edit'] = $edit == 'edit' ? true : false;
     // Person
     $this->person = $this->get('person');
     $model->setCookie();
     $Html['lineage'] = $this->showLineage();
     $lists['showAncestors'] = (int) $this->params->get('ancestorchart', 0);
     $lists['showDescendants'] = (int) $this->params->get('descendantchart', 0);
     $lists['numberArticles'] = $this->person->getArticleCount();
     // Pictures
     $Html['pictures'] = $this->showPictures();
     $lists['nextDelay'] = round((int) $this->params->get('nextDelay', 0) / 1000, 3);
     $lists['transDelay'] = round((int) $this->params->get('transDelay', 0) / 1000, 3);
     // Static map
     if ($this->person->map == 1) {
         $Html['staticmap'] = $this->person->getStaticMap();
         $lists['indStaticMap'] = $Html['staticmap'] ? true : false;
     }
     // Interactive map
     if ($this->person->map == 2) {
         $Html['interactivemap'] = $this->person->getInteractiveMap();
         $lists['indInteractiveMap'] = $Html['interactivemap'] ? true : false;
         $lists['pxHeightMap'] = (int) $this->params->get('pxHeight', 0);
     }
     // last update
     $lists['showUpdate '] = $this->params->get('show_update');
     if ($lists['showUpdate '] != 'N') {
         $lists['lastUpdate'] = JoaktreeHelper::lastUpdateDateTimePerson($this->person->lastUpdateDate);
         $lists['showchange'] = (int) $this->params->get('indLogging', 0);
     }
     // copyright
     $lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     //return
     $retObject = new stdClass();
     $retObject->object = 'prsn';
     $retObject->app_id = $this->person->app_id;
     $retObject->object_id = $this->person->id;
     $lists['retId'] = base64_encode(json_encode($retObject));
     // tab behavior
     if ((int) $this->params->get('indTabBehavior') == 1) {
         $lists['action'] = 'onClick';
     } else {
         $lists['action'] = 'onMouseOver';
     }
     $this->assignRef('Html', $Html);
     $this->assignRef('canDo', $canDo);
     $this->assignRef('lists', $lists);
     if ($lists['userAccess']) {
         // set title, meta title
         $title = $this->person->firstName . ' ' . $this->person->familyName;
         $document->setTitle($title);
         $document->setMetadata('title', $title);
         // set additional meta tags
         if ($this->params->get('menu-meta_description')) {
             $document->setDescription($this->params->get('menu-meta_description'));
         }
         if ($this->params->get('menu-meta_keywords')) {
             $document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
         }
         // robots
         if ($this->person->robots > 0) {
             $document->setMetadata('robots', JoaktreeHelper::stringRobots($this->person->robots));
         } else {
             if ($this->params->get('robots')) {
                 $document->setMetadata('robots', $this->params->get('robots'));
             }
         }
     }
     parent::display($tpl);
 }
コード例 #5
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $this->lists = array();
     // Load the parameters.
     $this->params = JoaktreeHelper::getJTParams();
     $document =& JFactory::getDocument();
     $app = JFactory::getApplication('site');
     // Get data from the model
     $this->treeinfo = $this->get('treeinfo');
     $menus = $this->get('menus');
     // set up style sheets and javascript files
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::stylesheet(JoaktreeHelper::joaktreecss($this->params->get('theme')));
     // add script
     $this->lists['indFilter'] = $this->get('nameFilter');
     $this->lists['tree_id'] = $this->get('treeId');
     $this->lists['script'] = $this->addScript();
     // get text
     $this->articles = Tree::getArticles($this->lists['tree_id']);
     // Id's and settings
     $this->lists['userAccess'] = $this->get('access');
     $this->lists['menuItemId'] = $menus[$this->lists['tree_id']];
     if ($this->treeinfo->indPersonCount) {
         $this->lists['personCount'] = $this->get('personCount');
     }
     if ($this->treeinfo->indMarriageCount) {
         $this->lists['marriageCount'] = $this->get('marriageCount');
     }
     //namelist
     $this->lists['index'] = $this->get('nameIndex');
     $this->lists['columns'] = (int) $this->params->get('columns', '3');
     $this->namelist = $this->get('namelist');
     $this->lists['numberRows'] = (int) ceil(count($this->namelist) / $this->lists['columns']);
     $this->lists['link'] = 'index.php?option=com_joaktree' . '&view=joaktreelist' . '&Itemid=' . $this->lists['menuItemId'] . '&treeId=' . $this->lists['tree_id'];
     // last update
     $this->lists['lastUpdate'] = $this->get('lastUpdate');
     // copyright
     $this->lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     $this->assignRef('treeinfo', $this->treeinfo);
     $this->assignRef('html', $html);
     $this->assignRef('lists', $this->lists);
     if ($this->lists['userAccess']) {
         // set title, meta title
         if ($this->params->get('treeName')) {
             $title = $this->params->get('treeName');
             $document->setTitle($title);
             $document->setMetadata('title', $title);
         }
         // set additional meta tags
         if ($this->params->get('menu-meta_description')) {
             $document->setDescription($this->params->get('menu-meta_description'));
         }
         if ($this->params->get('menu-meta_keywords')) {
             $document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
         }
         // robots
         if ($this->params->get('treeRobots') > 0) {
             $document->setMetadata('robots', JoaktreeHelper::stringRobots($this->params->get('treeRobots')));
         } else {
             if ($this->params->get('robots')) {
                 $document->setMetadata('robots', $this->params->get('robots'));
             }
         }
     }
     parent::display($tpl);
 }