コード例 #1
0
ファイル: view.raw.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $params = JoaktreeHelper::getJTParams();
     // 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'] = JText::_('JT_LASTUPDATED') . ': ' . JoaktreeHelper::convertDateTime($this->person->lastUpdateDate);
     // copyright
     $lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     $this->assignRef('personId', $personId);
     $this->assignRef('lists', $lists);
     parent::display($tpl);
 }
コード例 #2
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $app = JFactory::getApplication('site');
     $document =& JFactory::getDocument();
     // Load the parameters.
     $params = $app->getParams();
     $params->merge(JoaktreeHelper::getTheme(true, true));
     // 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'));
     }
     // Logs
     $this->name = $this->get('personName');
     $this->items = $this->get('items');
     $this->pagination = $this->get('pagination');
     // check display method
     $tmpl = $this->get('tmpl');
     if ($tmpl) {
         //return
         $retObject = $this->get('returnObject');
         if (!is_object($retObject)) {
             $retObject = new stdClass();
             $retObject->object = 'prsn';
         }
         $this->lists['link'] = 'index.php?option=com_joaktree' . '&view=changehistory' . '&tmpl=' . $tmpl . '&retId=' . base64_encode(json_encode($retObject));
     } else {
         $this->lists['link'] = 'index.php?option=com_joaktree' . '&view=changehistory';
     }
     $this->lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     if (count($this->items) > 0) {
         // set title, meta title
         $title = $this->name ? $this->name : JText::_('JT_CHANGEHISTORY');
         $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'));
         }
         if ($params->get('robots')) {
             $document->setMetadata('robots', $params->get('robots'));
         }
     }
     parent::display($tpl);
 }
コード例 #3
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // First load the treeId!
     $this->lists['treeId'] = $this->get('treeId');
     // Load the parameters.
     $this->params = JoaktreeHelper::getJTParams(true);
     if ($this->params->get('siteedit', 1)) {
         $this->canDo = JoaktreeHelper::getActions();
     } else {
         $this->canDo = null;
     }
     // set up style sheets and javascript files
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::stylesheet(JoaktreeHelper::joaktreecss($this->params->get('theme')));
     $document =& JFactory::getDocument();
     $document->addScript(JoaktreeHelper::joaktreejs('toggle.js'));
     $this->lists['lineEnd'] = $document->_getLineEnd();
     // Initialiase variables.
     $this->form = $this->get('Form');
     $this->lists['appId'] = $this->get('applicationId');
     $this->lists['appName'] = $this->get('applicationName');
     $relationId = $this->get('relationId');
     if (isset($relationId)) {
         $this->relation = $this->get('relation');
         $this->lists['action'] = $this->get('action');
     }
     $this->lists['action'] = isset($this->lists['action']) ? $this->lists['action'] : 'new';
     $this->picture = $this->get('picture');
     $personId = $this->get('personId');
     if (isset($personId)) {
         $this->lists['userAccess'] = $this->get('access');
         $this->item = $this->get('Item');
         $this->lists['indLiving'] = $this->item->living;
     } else {
         $this->lists['userAccess'] = true;
         $this->lists['indLiving'] = false;
     }
     $patronym = $this->params->get('patronym', 0);
     $this->lists['indPatronym'] = $patronym == 0 ? false : true;
     $familyname = $this->params->get('familyname', 0);
     $this->lists['indNamePreposition'] = $familyname == 1 ? true : false;
     $this->lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     if ($this->lists['userAccess']) {
         // set title
         if (isset($personId)) {
             $title = $this->item->firstName . ' ' . $this->item->familyName;
             $document->setTitle($title);
         }
     }
     parent::display($tpl);
 }
コード例 #4
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     if ($tpl == null) {
         $this->lists = array();
         $app = JFactory::getApplication('site');
         $document =& JFactory::getDocument();
         // Load the parameters.
         $this->params = $app->getParams();
         $this->params->merge(JoaktreeHelper::getGedCom());
         $this->params->merge(JoaktreeHelper::getTheme(true, true));
         if ($this->params->get('siteedit', 1)) {
             $this->canDo = JoaktreeHelper::getActions(false);
         } else {
             $this->canDo = null;
         }
         // set up style sheets and javascript files
         JHTML::stylesheet(JoaktreeHelper::joaktreecss());
         JHTML::stylesheet(JoaktreeHelper::joaktreecss($this->params->get('theme')));
         // Initialiase variables.
         $this->form = $this->get('Form');
         $this->item = $this->get('Item');
         $this->lists['userAccess'] = $this->get('access');
         $this->lists['action'] = $this->get('action');
         if ($this->lists['action'] == 'select') {
             $this->lists['link'] = 'index.php?option=com_joaktree' . '&view=repository' . '&tmpl=component' . '&action=' . $this->lists['action'];
         } else {
             $this->lists['link'] = 'index.php?option=com_joaktree' . '&view=repository';
         }
         $this->lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     }
     if ($this->lists['userAccess']) {
         // set title, meta title
         if ($this->params->get('gedcomName')) {
             $title = $this->params->get('gedcomName');
             $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'));
         }
         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)
 {
     $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);
 }
コード例 #6
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $this->lists = array();
     $app = JFactory::getApplication('site');
     $document =& JFactory::getDocument();
     // Load the parameters.
     $this->map = $this->get('map');
     $this->params = $app->getParams();
     $this->params->merge(JoaktreeHelper::getTheme(true, true));
     // set up style sheets and javascript files
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::stylesheet(JoaktreeHelper::joaktreecss($this->params->get('theme')));
     if ($this->map->params['service'] == 'staticmap') {
         // Get data from the model
         $this->mapview = $this->get('mapView');
         $this->lists['userAccess'] = $this->mapview ? true : false;
         if ($this->lists['userAccess']) {
             // set title, meta title
             if ($this->map->params['name']) {
                 $title = $this->map->params['name'];
                 $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'));
             }
             if ($this->params->get('robots')) {
                 $document->setMetadata('robots', $this->params->get('robots'));
             }
         }
     }
     if ($this->map->params['service'] == 'interactivemap') {
         $this->lists['href'] = 'index.php?option=com_joaktree' . '&tmpl=component' . '&format=raw' . '&view=interactivemap' . '&mapId=' . $this->map->params['id'];
     }
     // user interaction
     $this->lists['mapHtmlId'] = 'jt-map-id';
     $this->lists['uicontrol'] = $this->map->getUIControl($this->lists['mapHtmlId']);
     // copyright
     $this->lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     parent::display($tpl);
 }
コード例 #7
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);
     }
 }
コード例 #8
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);
 }
コード例 #9
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);
 }
コード例 #10
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $this->lists = array();
     $app = JFactory::getApplication('site');
     $document =& JFactory::getDocument();
     // Load the parameters.
     $params = $app->getParams();
     $params->merge(JoaktreeHelper::getGedCom());
     $params->merge(JoaktreeHelper::getTheme(true, true));
     // set up style sheets and javascript files
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::stylesheet(JoaktreeHelper::joaktreecss($params->get('theme')));
     $document->addScript(JoaktreeHelper::joaktreejs('toggle.js'));
     // get user info
     $userId = $this->get('userId');
     if (!$userId || $userId == 0) {
         $document->addScript(JoaktreeHelper::joaktreejs('jtform.js'));
     }
     // Get data from the model
     $this->items = $this->get('items');
     $this->pagination = $this->get('pagination');
     $this->lists['app_id'] = $this->get('applicationId');
     $this->lists['userAccess'] = $this->get('access');
     $statusObj = $this->get('returnObject');
     $this->lists['source_id'] = is_object($statusObj) ? $statusObj->object_id : null;
     $this->lists['status'] = is_object($statusObj) ? $statusObj->status : null;
     if ($this->lists['status'] == 'new') {
         $this->newItem = $this->get('newlyAddedItem');
     }
     $this->lists['action'] = $this->get('action');
     if ($this->lists['action'] == 'select') {
         $this->lists['link'] = 'index.php?option=com_joaktree' . '&view=sources' . '&appId=' . $this->lists['app_id'] . '&tmpl=component' . '&action=' . $this->lists['action'];
         // in case of "select" - what are the details
         $this->lists['counter'] = $this->get('counter');
     } else {
         $this->lists['link'] = 'index.php?option=com_joaktree' . '&view=sources' . '&appId=' . $this->lists['app_id'];
     }
     if ($params->get('siteedit', 1)) {
         $this->canDo = JoaktreeHelper::getActions(false);
     } else {
         $this->canDo = null;
     }
     //Filter
     $context = 'com_joaktree.source.list.';
     $search1 = $app->getUserStateFromRequest($context . 'search1', 'search1', '', 'string');
     $search1 = JString::strtolower($search1);
     // search filter
     $this->lists['search1'] = $search1;
     // Find the value for tech
     $this->lists['technology'] = $this->get('technology');
     // copyright
     $this->lists['CR'] = JoaktreeHelper::getJoaktreeCR();
     $this->lists['showchange'] = (int) $params->get('indLogging', 0);
     //return
     $retObject = new stdClass();
     $retObject->object = 'sour';
     $this->lists['retId'] = base64_encode(json_encode($retObject));
     if ($this->lists['userAccess']) {
         // set title, meta title
         if ($params->get('gedcomName')) {
             $title = $params->get('gedcomName');
             $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'));
         }
         if ($params->get('robots')) {
             $document->setMetadata('robots', $params->get('robots'));
         }
     }
     parent::display($tpl);
 }
コード例 #11
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);
 }