/**
  * This callback is triggered on a users' first login into the system.
  * You may use this method to install a widget as a default widget to
  * a users dashboard.
  *
  * @param $strUserid
  *
  * @return bool
  */
 public function onFistLogin($strUserid)
 {
     if (class_module_system_aspect::getAspectByName("content") !== null) {
         $objDashboard = new class_module_dashboard_widget();
         $objDashboard->setStrColumn("column2");
         $objDashboard->setStrUser($strUserid);
         $objDashboard->setStrClass(__CLASS__);
         $objDashboard->setStrContent("a:1:{s:7:\"content\";s:1460:\"Welcome to Kajona V4!<br /><br  />Kajona is developed by volunteers all over the world - show them your support by liking Kajona on facebook or donating a beer.<div id=\"fb-root\"></div><script>(function(d, s, id) {  var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = \"//connect.facebook.net/en_US/all.js#appId=141503865945925&xfbml=1\"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script><div class=\"fb-like\" data-href=\"https://www.facebook.com/pages/Kajona%C2%B3/156841314360532\" data-send=\"false\" data-layout=\"button_count\" data-width=\"60\" data-show-faces=\"false\"></div><form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\"><input type=\"hidden\" name=\"cmd\" value=\"_donations\" /> <input type=\"hidden\" name=\"business\" value=\"donate@kajona.de\" /> <input type=\"hidden\" name=\"item_name\" value=\"Kajona Development\" /> <input type=\"hidden\" name=\"no_shipping\" value=\"0\" /> <input type=\"hidden\" name=\"no_note\" value=\"1\" /> <input type=\"hidden\" name=\"currency_code\" value=\"EUR\" /> <input type=\"hidden\" name=\"tax\" value=\"0\" /> <input type=\"hidden\" name=\"bn\" value=\"PP-DonationsBF\" /> <input type=\"image\" border=\"0\" src=\"https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" /> <img height=\"1\" width=\"1\" border=\"0\" alt=\"\" src=\"https://www.paypal.com/en_US/i/scr/pixel.gif\" /></form>\";}");
         return $objDashboard->updateObjectToDb(class_module_dashboard_widget::getWidgetsRootNodeForUser($strUserid, class_module_system_aspect::getAspectByName("content")->getSystemid()));
     }
     return true;
 }
 /**
  * This callback is triggered on a users' first login into the system.
  * You may use this method to install a widget as a default widget to
  * a users dashboard.
  *
  * @param $strUserid
  *
  * @return bool
  */
 public function onFistLogin($strUserid)
 {
     if (class_module_system_module::getModuleByName("system") !== null && class_module_system_aspect::getAspectByName("management") !== null) {
         $objDashboard = new class_module_dashboard_widget();
         $objDashboard->setStrColumn("column3");
         $objDashboard->setStrUser($strUserid);
         $objDashboard->setStrClass(__CLASS__);
         $objDashboard->setStrContent("a:1:{s:8:\"nrofrows\";s:1:\"1\";}");
         return $objDashboard->updateObjectToDb(class_module_dashboard_widget::getWidgetsRootNodeForUser($strUserid, class_module_system_aspect::getAspectByName("management")->getSystemid()));
     }
     return true;
 }
 /**
  * This callback is triggered on a users' first login into the system.
  * You may use this method to install a widget as a default widget to
  * a users dashboard.
  *
  * @param $strUserid
  *
  * @return bool
  */
 public function onFistLogin($strUserid)
 {
     if (class_module_system_aspect::getAspectByName("content") !== null) {
         $objDashboard = new class_module_dashboard_widget();
         $objDashboard->setStrColumn("column3");
         $objDashboard->setStrUser($strUserid);
         $objDashboard->setStrClass(__CLASS__);
         $objDashboard->setStrContent("a:2:{s:7:\"feedurl\";s:39:\"http://www.kajona.de/kajona_news_en.rss\";s:5:\"posts\";s:1:\"4\";}");
         return $objDashboard->updateObjectToDb(class_module_dashboard_widget::getWidgetsRootNodeForUser($strUserid, class_module_system_aspect::getAspectByName("content")->getSystemid()));
     }
     return true;
 }
 /**
  * This callback is triggered on a users' first login into the system.
  * You may use this method to install a widget as a default widget to
  * a users dashboard.
  *
  * @param $strUserid
  *
  * @return bool
  */
 public function onFistLogin($strUserid)
 {
     if (class_module_system_module::getModuleByName("stats") !== null && class_module_system_aspect::getAspectByName("management") !== null) {
         $objDashboard = new class_module_dashboard_widget();
         $objDashboard->setStrColumn("column2");
         $objDashboard->setStrUser($strUserid);
         $objDashboard->setStrClass(__CLASS__);
         $objDashboard->setStrContent("a:5:{s:7:\"current\";s:7:\"checked\";s:3:\"day\";s:7:\"checked\";s:4:\"last\";s:7:\"checked\";s:6:\"nrLast\";s:1:\"4\";s:5:\"chart\";s:7:\"checked\";}");
         return $objDashboard->updateObjectToDb(class_module_dashboard_widget::getWidgetsRootNodeForUser($strUserid, class_module_system_aspect::getAspectByName("management")->getSystemid()));
     }
     return true;
 }
 /**
  * Creates the form to edit a widget (NOT the dashboard entry!)
  *
  * @throws class_exception
  * @return string "" in case of success
  * @permissions edit
  */
 protected function actionEditWidget()
 {
     $strReturn = "";
     $this->setArrModuleEntry("template", "/folderview.tpl");
     if ($this->getParam("saveWidget") == "") {
         $objDashboardwidget = new class_module_dashboard_widget($this->getSystemid());
         $objWidget = $objDashboardwidget->getConcreteAdminwidget();
         //ask the widget to generate its form-parts and wrap our elements around
         $strReturn .= $this->objToolkit->formHeader(class_link::getLinkAdminHref("dashboard", "editWidget"));
         $strReturn .= $objWidget->getEditForm();
         $strReturn .= $this->objToolkit->formInputHidden("systemid", $this->getSystemid());
         $strReturn .= $this->objToolkit->formInputHidden("saveWidget", "1");
         $strReturn .= $this->objToolkit->formInputSubmit($this->getLang("commons_save"));
         $strReturn .= $this->objToolkit->formClose();
     } elseif ($this->getParam("saveWidget") == "1") {
         //the dashboard entry
         $objDashboardwidget = new class_module_dashboard_widget($this->getSystemid());
         //the concrete widget
         $objConcreteWidget = $objDashboardwidget->getConcreteAdminwidget();
         $objConcreteWidget->loadFieldsFromArray($this->getAllParams());
         $objDashboardwidget->setStrContent($objConcreteWidget->getFieldsAsString());
         if (!$objDashboardwidget->updateObjectToDb()) {
             throw new class_exception("Error updating widget to db!", class_exception::$level_ERROR);
         }
         $this->adminReload(class_link::getLinkAdminHref($this->getArrModule("modul"), "", "&peClose=1&blockAction=1"));
     }
     return $strReturn;
 }