コード例 #1
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     $this->canDo = JoaktreeHelper::getActions();
     // Get data from the model
     $this->items =& $this->get('Data');
     $this->pagination =& $this->get('Pagination');
     $this->mapSettings =& $this->get('mapSettings');
     //Filter
     $context = 'com_joaktree.jt_maps.list.';
     $filter_order = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'jmp.name', 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search = $app->getUserStateFromRequest($context . 'search', 'search', '', 'string');
     $search = JString::strtolower($search);
     // table ordering
     $this->lists['order_Dir'] = $filter_order_Dir;
     $this->lists['order'] = $filter_order;
     // search filter
     $this->lists['search'] = $search;
     JoaktreeHelper::addSubmenu('maps');
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
コード例 #2
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::script(JoaktreeHelper::jsfile());
     // what is the layout
     $this->layout = JFactory::getApplication()->input->get('layout');
     // Get data from the model
     if ($this->layout == 'personevent') {
         $this->items =& $this->get('DataPersEvent');
         $this->pagination =& $this->get('personPagination');
     } else {
         if ($this->layout == 'personname') {
             $this->items =& $this->get('DataPersName');
             $this->pagination =& $this->get('namePagination');
         } else {
             if ($this->layout == 'relationevent') {
                 $this->items =& $this->get('DataRelaEvent');
                 $this->pagination =& $this->get('relationPagination');
             } else {
                 $this->items =& $this->get('DataPersEvent');
                 $this->pagination =& $this->get('personPagination');
             }
         }
     }
     //Filter
     $context = 'com_joaktree.jt_settings.list.';
     JoaktreeHelper::addSubmenu($this->layout);
     $this->addToolbar($this->layout);
     $this->sidebar = JHtmlSidebar::render();
     $this->html = $this->getHtml();
     parent::display($tpl);
 }
コード例 #3
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::script(JoaktreeHelper::jsfile());
     $this->addToolbar();
     $items =& $this->get('Data');
     $this->assignRef('items', $items);
     parent::display($tpl);
 }
コード例 #4
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     $this->canDo = JoaktreeHelper::getActions();
     // Get data from the model
     $this->items =& $this->get('Data');
     $this->pagination =& $this->get('Pagination');
     $this->mapSettings =& $this->get('mapSettings');
     //Filter
     $context = 'com_joaktree.jt_locations.list.';
     $this->lists['order'] = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'jln.value', 'cmd');
     $this->lists['order_Dir'] = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $this->lists['server'] = $app->getUserStateFromRequest($context . 'filter_server', 'filter_server', '', 'word');
     $this->lists['status'] = $app->getUserStateFromRequest($context . 'filter_status', 'filter_status', '', 'word');
     // search filter
     $search = $app->getUserStateFromRequest($context . 'search', 'search', '', 'string');
     $search = JString::strtolower($search);
     $this->lists['search'] = $search;
     //		$select_attr = array();
     //		$select_attr['class'] = 'inputbox';
     //		$select_attr['size'] = '1';
     //		$select_attr['onchange'] = 'submitform( );';
     // server filter
     $this->server = array();
     $selectObj = new StdClass();
     $selectObj->value = 'Y';
     $selectObj->text = JText::_('JT_FILTER_SERVER_YES');
     $this->server[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 'N';
     $selectObj->text = JText::_('JT_FILTER_SERVER_NO');
     $this->server[] = $selectObj;
     unset($selectObj);
     // geocoding status filter
     $this->status = array();
     $selectObj = new StdClass();
     $selectObj->value = 'N';
     $selectObj->text = JText::_('JT_FILTER_STATUS_NO');
     $this->status[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 'Y';
     $selectObj->text = JText::_('JT_FILTER_STATUS_YES');
     $this->status[] = $selectObj;
     unset($selectObj);
     JoaktreeHelper::addSubmenu('maps');
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
コード例 #5
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $this->lists = array();
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     //load the language file
     MBJService::setLanguage();
     $this->lists['version'] = JoaktreeHelper::getJoaktreeVersion();
     $this->lists['providers'] = $this->get('providers');
     JoaktreeHelper::addSubmenu('default');
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
コード例 #6
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);
 }
コード例 #7
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);
 }
コード例 #8
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);
 }
コード例 #9
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::script(JoaktreeHelper::jsfile());
     $this->canDo = JoaktreeHelper::getActions();
     // Get data from the model
     $this->items =& $this->get('Data');
     $this->pagination =& $this->get('Pagination');
     //Filter
     $context = 'com_joaktree.jt_trees.list.';
     $this->filter['state'] = $app->getUserStateFromRequest($context . 'filter_state', 'filter_state', '', 'cmd');
     $this->filter['apptitle'] = $app->getUserStateFromRequest($context . 'filter_apptitle', 'filter_apptitle', '', 'int');
     $this->filter['gendex'] = $app->getUserStateFromRequest($context . 'filter_gendex', 'filter_gendex', '', 'int');
     $this->filter['order'] = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'jte.id', 'cmd');
     $this->filter['order_Dir'] = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search = $app->getUserStateFromRequest($context . 'search', 'search', '', 'string');
     $search = JString::strtolower($search);
     // table ordering
     $this->lists['order_Dir'] = $this->filter['order_Dir'];
     $this->lists['order'] = $this->filter['order'];
     // search filter
     $this->lists['search'] = $search;
     // state filter
     $this->state = array('published' => 1, 'unpublished' => 1, 'archived' => 0, 'trash' => 0, 'all' => 0);
     // application filter
     $this->appTitle = JoaktreeHelper::getApplications();
     // gendex filter
     $this->gendex = array();
     $selectObj = new StdClass();
     $selectObj->value = 1;
     $selectObj->text = JText::_('JNO');
     $this->gendex[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 2;
     $selectObj->text = JText::_('JYES');
     $this->gendex[] = $selectObj;
     unset($selectObj);
     $this->lists['jsscript'] = $this->getJTscript();
     $this->lists['action'] = $this->get('action');
     if ($this->lists['action'] == 'assign') {
         $this->lists['act_treeId'] = $this->get('treeId');
     }
     JoaktreeHelper::addSubmenu('trees');
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
コード例 #10
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);
 }
コード例 #11
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     // Initialiase variables.
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     parent::display($tpl);
 }
コード例 #12
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);
 }
コード例 #13
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     // Initialiase variables.
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // use cookies
     $params = JComponentHelper::getParams('com_joaktree');
     $this->indCookie = $params->get('indCookies', true);
     $this->canDo = JoaktreeHelper::getActions();
     $this->addToolbar();
     parent::display($tpl);
 }
コード例 #14
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);
 }
コード例 #15
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);
 }
コード例 #16
0
 * @license	GNU/GPL
 *
 * Module showing events in the past
 *
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only once
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
require_once JPATH_BASE . DS . 'components' . DS . 'com_joaktree' . DS . 'models' . DS . 'todaymanyyearsago.php';
$modHelper = new JoaktreeModelTodaymanyyearsago();
// include stylesheets and javascript
//JHTML::stylesheet( 'joaktree.css', 'components/com_joaktree/assets/css/' );
$theme = $modHelper->getThemeName();
JHTML::stylesheet(JoaktreeHelper::joaktreecss());
JHTML::stylesheet(JoaktreeHelper::joaktreecss($theme));
// scripts
$document =& JFactory::getDocument();
$document->addScript(JURI::base(true) . '/components/com_joaktree/assets/js/toggle.js');
$document->addScript(JURI::base(true) . '/components/com_joaktree/assets/js/jtajax.js');
// Include language file from Joaktree component;
$jtlang = JFactory::getLanguage();
$jtlang->load('com_joaktree');
$jtlang->load('com_joaktree.gedcom', JPATH_ADMINISTRATOR);
$day = $modHelper->getDay();
$days = $modHelper->getDays();
$month = $modHelper->getMonth();
$months = $modHelper->getMonths();
$jtlist = $modHelper->getList($module->id);
$title = $modHelper->getTitle();
$sorting = $modHelper->getSorting();
コード例 #17
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);
     }
 }
コード例 #18
0
ファイル: view.html.php プロジェクト: Lothurm/J3.x
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     JHTML::stylesheet(JoaktreeHelper::joaktreecss());
     JHTML::script(JoaktreeHelper::jsfile());
     // add script
     $document =& JFactory::getDocument();
     $document->addScriptDeclaration($this->addScript());
     // Get data from the model
     $this->items = $this->get('Persons');
     $trees = $this->get('Trees');
     $this->pagination = $this->get('Pagination');
     $this->lists['patronym'] = $this->get('patronymShowing');
     $this->columns = $this->get('columnSettings');
     //Filter
     $context = 'com_joaktree.jt_persons.list.';
     $this->filter['state'] = $app->getUserStateFromRequest($context . 'filter_state', 'filter_state', '', 'cmd');
     $this->filter['living'] = $app->getUserStateFromRequest($context . 'filter_living', 'filter_living', '', 'word');
     $this->filter['page'] = $app->getUserStateFromRequest($context . 'filter_page', 'filter_page', '', 'word');
     $this->filter['map'] = $app->getUserStateFromRequest($context . 'filter_map', 'filter_map', '', 'int');
     $this->filter['tree'] = $app->getUserStateFromRequest($context . 'filter_tree', 'filter_tree', '', 'int');
     $this->filter['apptitle'] = $app->getUserStateFromRequest($context . 'filter_apptitle', 'filter_apptitle', '', 'int');
     $this->filter['robots'] = $app->getUserStateFromRequest($context . 'filter_robots', 'filter_robots', '', 'int');
     $this->filter['order'] = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'jpn.id', 'cmd');
     $this->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);
     // table ordering
     $this->lists['order_Dir'] = $this->filter['order_Dir'];
     $this->lists['order'] = $this->filter['order'];
     // search filter
     $this->lists['search1'] = $search1;
     $this->lists['search2'] = $search2;
     $this->lists['search3'] = $search3;
     // application filter
     $this->appTitle = JoaktreeHelper::getApplications();
     // default family tree filter
     $this->tree = array();
     for ($i = 1; $i <= count($trees); $i++) {
         $selectObj = new StdClass();
         $selectObj->value = $trees[$i - 1]->id;
         $selectObj->text = $trees[$i - 1]->name;
         $this->tree[] = $selectObj;
         unset($selectObj);
     }
     // state filter
     $this->state = array('published' => 1, 'unpublished' => 1, 'archived' => 0, 'trash' => 0, 'all' => 0);
     //		$select_attr = array();
     //		$select_attr['class'] = 'inputbox';
     //		$select_attr['size'] = '1';
     //		$select_attr['onchange'] = 'submitform( );';
     // living filter
     $this->living = array();
     $selectObj = new StdClass();
     $selectObj->value = 'L';
     $selectObj->text = JText::_('JT_FILTER_VAL_LIVING');
     $this->living[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 'D';
     $selectObj->text = JText::_('JT_FILTER_VAL_NOTLIVING');
     $this->living[] = $selectObj;
     unset($selectObj);
     // page filter
     $this->page = array();
     $selectObj = new StdClass();
     $selectObj->value = 'Y';
     $selectObj->text = JText::_('JT_FILTER_VAL_PAGE');
     $this->page[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 'N';
     $selectObj->text = JText::_('JT_FILTER_VAL_NOPAGE');
     $this->page[] = $selectObj;
     unset($selectObj);
     // map filter
     $this->map = array();
     $selectObj = new StdClass();
     $selectObj->value = 2;
     $selectObj->text = JText::_('JT_FILTER_VAL_STATMAP');
     $this->map[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 3;
     $selectObj->text = JText::_('JT_FILTER_VAL_DYNMAP');
     $this->map[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 1;
     $selectObj->text = JText::_('JT_FILTER_VAL_NOMAP');
     $this->map[] = $selectObj;
     unset($selectObj);
     // robots filter
     $this->robots = array();
     $selectObj = new StdClass();
     $selectObj->value = 1;
     $selectObj->text = JText::_('JT_ROBOT_USE_TREE');
     $this->robots[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 2;
     $selectObj->text = JText::_('JGLOBAL_INDEX_FOLLOW');
     $this->robots[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 3;
     $selectObj->text = JText::_('JGLOBAL_NOINDEX_FOLLOW');
     $this->robots[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 4;
     $selectObj->text = JText::_('JGLOBAL_INDEX_NOFOLLOW');
     $this->robots[] = $selectObj;
     unset($selectObj);
     $selectObj = new StdClass();
     $selectObj->value = 5;
     $selectObj->text = JText::_('JGLOBAL_NOINDEX_NOFOLLOW');
     $this->robots[] = $selectObj;
     unset($selectObj);
     // end of filters
     JoaktreeHelper::addSubmenu('persons');
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
コード例 #19
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);
 }
コード例 #20
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);
 }