public function install() { $strReturn = ""; $objManager = new class_orm_schemamanager(); $strReturn .= "Installing table votings_voting...\n"; $objManager->createTable("class_module_votings_voting"); $strReturn .= "Installing table votings_answer...\n"; $objManager->createTable("class_module_votings_answer"); //register the module $strSystemID = $this->registerModule($this->objMetadata->getStrTitle(), _votings_module_id_, "class_module_votings_portal.php", "class_module_votings_admin.php", $this->objMetadata->getStrVersion(), true); //modify default rights to allow guests to vote $strReturn .= "Modifying modules' rights node...\n"; class_carrier::getInstance()->getObjRights()->addGroupToRight(class_module_system_setting::getConfigValue("_guests_group_id_"), $strSystemID, "right1"); $strReturn .= "Registering votings-element...\n"; if (class_module_pages_element::getElement("votings") == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("votings"); $objElement->setStrClassAdmin("class_element_votings_admin.php"); $objElement->setStrClassPortal("class_element_votings_portal.php"); $objElement->setIntCachetime(-1); $objElement->setIntRepeat(1); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } $strReturn .= "Setting aspect assignments...\n"; if (class_module_system_aspect::getAspectByName("content") != null) { $objModule = class_module_system_module::getModuleByName($this->objMetadata->getStrTitle()); $objModule->setStrAspect(class_module_system_aspect::getAspectByName("content")->getSystemid()); $objModule->updateObjectToDb(); } return $strReturn; }
public function install() { $strReturn = ""; //Table for page-element $strReturn .= "Installing tellafriend-element table...\n"; $objManager = new class_orm_schemamanager(); $objManager->createTable("class_element_tellafriend_admin"); //Register the element $strReturn .= "Registering tellafriend-element...\n"; //check, if not already existing if (class_module_pages_element::getElement("tellafriend") == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("tellafriend"); $objElement->setStrClassAdmin("class_element_tellafriend_admin.php"); $objElement->setStrClassPortal("class_element_tellafriend_portal.php"); $objElement->setIntCachetime(-1); $objElement->setIntRepeat(0); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } return $strReturn; }
public function install() { $strReturn = ""; if (class_module_system_module::getModuleByName("mediamanager") == null) { return "Mediamanger not installed, skipping element\n"; } //Table for page-element $strReturn .= "Installing downloads-element table...\n"; $objManager = new class_orm_schemamanager(); $objManager->createTable("class_element_downloads_admin"); //Register the element $strReturn .= "Registering downloads-element...\n"; if (class_module_system_module::getModuleByName("pages") !== null && class_module_pages_element::getElement("downloads") == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("downloads"); $objElement->setStrClassAdmin("class_element_downloads_admin.php"); $objElement->setStrClassPortal("class_element_downloads_portal.php"); $objElement->setIntCachetime(3600); $objElement->setIntRepeat(1); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed or pages module not installed!...\n"; } return $strReturn; }
public function install() { $objManager = new class_orm_schemamanager(); //Install Index Tables $strReturn = $this->installIndexTables(); //Table for search $strReturn .= "Installing table search_search...\n"; $objManager->createTable("class_module_search_search"); //Table for search log entry $strReturn .= "Installing search-log table...\n"; $arrFields = array(); $arrFields["search_log_id"] = array("char20", false); $arrFields["search_log_date"] = array("int", true); $arrFields["search_log_query"] = array("char254", true); $arrFields["search_log_language"] = array("char10", true); if (!$this->objDB->createTable("search_log", $arrFields, array("search_log_id"))) { $strReturn .= "An error occurred! ...\n"; } //Table for the index queue $strReturn .= "Installing search-queue table...\n"; $arrFields = array(); $arrFields["search_queue_id"] = array("char20", false); $arrFields["search_queue_systemid"] = array("char20", true); $arrFields["search_queue_action"] = array("char20", true); if (!$this->objDB->createTable("search_queue", $arrFields, array("search_queue_id"))) { $strReturn .= "An error occurred! ...\n"; } //Table for page-element $strReturn .= "Installing search-element table...\n"; $objPackageManager = new class_module_packagemanager_manager(); if ($objPackageManager->getPackage("pages") !== null) { $objManager->createTable("class_element_search_admin"); } $strReturn .= "Registering module...\n"; //register the module $this->registerModule("search", _search_module_id_, "class_module_search_portal.php", "class_module_search_admin.php", $this->objMetadata->getStrVersion(), true, "class_module_search_portal_xml.php"); $strReturn .= "Registering config-values...\n"; $this->registerConstant("_search_deferred_indexer_", "false", class_module_system_setting::$int_TYPE_BOOL, _search_module_id_); if (class_module_system_module::getModuleByName("pages") !== null && class_module_pages_element::getElement("search") == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("search"); $objElement->setStrClassAdmin("class_element_search_admin.php"); $objElement->setStrClassPortal("class_element_search_portal.php"); $objElement->setIntCachetime(3600); $objElement->setIntRepeat(0); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } $strReturn .= "Rebuilding search index...\n"; $this->updateIndex(); return $strReturn; }
public function install() { $strReturn = ""; $objSchemamanager = new class_orm_schemamanager(); //faqs cat------------------------------------------------------------------------------------- $strReturn .= "Installing table faqs_category...\n"; $objSchemamanager->createTable("class_module_faqs_category"); //faqs---------------------------------------------------------------------------------- $strReturn .= "Installing table faqs...\n"; $objSchemamanager->createTable("class_module_faqs_faq"); //register the module $this->registerModule("faqs", _faqs_module_id_, "class_module_faqs_portal.php", "class_module_faqs_admin.php", $this->objMetadata->getStrVersion(), true); //Table for page-element $strReturn .= "Installing faqs-element table...\n"; $arrFields = array(); $arrFields["content_id"] = array("char20", false); $arrFields["faqs_category"] = array("char20", true); $arrFields["faqs_template"] = array("char254", true); if (!$this->objDB->createTable("element_faqs", $arrFields, array("content_id"))) { $strReturn .= "An error occurred! ...\n"; } //Register the element $strReturn .= "Registering faqs-element...\n"; //check, if not already existing $objElement = class_module_pages_element::getElement("faqs"); if ($objElement == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("faqs"); $objElement->setStrClassAdmin("class_element_faqs_admin.php"); $objElement->setStrClassPortal("class_element_faqs_portal.php"); $objElement->setIntCachetime(3600); $objElement->setIntRepeat(1); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } $strReturn .= "Setting aspect assignments...\n"; if (class_module_system_aspect::getAspectByName("content") != null) { $objModule = class_module_system_module::getModuleByName($this->objMetadata->getStrTitle()); $objModule->setStrAspect(class_module_system_aspect::getAspectByName("content")->getSystemid()); $objModule->updateObjectToDb(); } return $strReturn; }
public function install() { $strReturn = ""; //Register the element $strReturn .= "Registering flash-element...\n"; if (class_module_pages_element::getElement("flash") == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("flash"); $objElement->setStrClassAdmin("class_element_flash_admin.php"); $objElement->setStrClassPortal("class_element_flash_portal.php"); $objElement->setIntCachetime(3600); $objElement->setIntRepeat(0); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } return $strReturn; }
public function install() { $strReturn = ""; $objManager = new class_orm_schemamanager(); //tags_tag -------------------------------------------------------------------------------------- $strReturn .= "Installing table tags_tag...\n"; $objManager->createTable("class_module_tags_tag"); $strReturn .= "Installing table tags_member...\n"; $arrFields = array(); $arrFields["tags_memberid"] = array("char20", false); $arrFields["tags_systemid"] = array("char20", false); $arrFields["tags_tagid"] = array("char20", false); $arrFields["tags_attribute"] = array("char254", true); $arrFields["tags_owner"] = array("char20", true); if (!$this->objDB->createTable("tags_member", $arrFields, array("tags_memberid"), array("tags_systemid", "tags_tagid", "tags_attribute", "tags_owner"))) { $strReturn .= "An error occurred! ...\n"; } $strReturn .= "Installing table tags_favorite...\n"; $objManager->createTable("class_module_tags_favorite"); //register the module $this->registerModule("tags", _tags_modul_id_, "", "class_module_tags_admin.php", $this->objMetadata->getStrVersion(), true, "", "class_module_tags_admin_xml.php"); $strReturn .= "Registering system-constants...\n"; $this->registerConstant("_tags_defaultprivate_", "false", class_module_system_setting::$int_TYPE_BOOL, _tags_modul_id_); //Register the element $strReturn .= "Registering tags-element...\n"; //check, if not already existing if (class_module_system_module::getModuleByName("pages") !== null && class_module_pages_element::getElement("tags") == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("tags"); $objElement->setStrClassAdmin("class_element_tags_admin.php"); $objElement->setStrClassPortal("class_element_tags_portal.php"); $objElement->setIntCachetime(3600 * 24 * 30); $objElement->setIntRepeat(0); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } return $strReturn; }
public function install() { //Register the element $strReturn = "Registering languageswitch-element...\n"; //check, if not already existing $objElement = class_module_pages_element::getElement("languageswitch"); if ($objElement == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("languageswitch"); $objElement->setStrClassAdmin("class_element_languageswitch_admin.php"); $objElement->setStrClassPortal("class_element_languageswitch_portal.php"); $objElement->setIntCachetime(3600 * 24 * 30); $objElement->setIntRepeat(0); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } return $strReturn; }
public function install() { $strReturn = ""; $objManager = new class_orm_schemamanager(); $strReturn .= "Installing table news_category...\n"; $objManager->createTable("class_module_news_category"); $strReturn .= "Installing table news...\n"; $objManager->createTable("class_module_news_news"); $strReturn .= "Installing table news_feed...\n"; $objManager->createTable("class_module_news_feed"); //register the module $this->registerModule("news", _news_module_id_, "class_module_news_portal.php", "class_module_news_admin.php", $this->objMetadata->getStrVersion(), true, "class_module_news_portal_xml.php"); $strReturn .= "Installing news-element table...\n"; $objManager->createTable("class_element_news_admin"); //Register the element $strReturn .= "Registering news-element...\n"; //check, if not already existing if (class_module_pages_element::getElement("news") == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("news"); $objElement->setStrClassAdmin("class_element_news_admin.php"); $objElement->setStrClassPortal("class_element_news_portal.php"); $objElement->setIntCachetime(3600); $objElement->setIntRepeat(1); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } $strReturn .= "Setting aspect assignments...\n"; if (class_module_system_aspect::getAspectByName("content") != null) { $objModule = class_module_system_module::getModuleByName($this->objMetadata->getStrTitle()); $objModule->setStrAspect(class_module_system_aspect::getAspectByName("content")->getSystemid()); $objModule->updateObjectToDb(); } $strReturn .= "Registering config settings...\n"; $this->registerConstant("_news_news_datetime_", "false", class_module_system_setting::$int_TYPE_BOOL, _news_module_id_); return $strReturn; }
public function install() { $strReturn = "Installing " . $this->objMetadata->getStrTitle() . "...\n"; $objManager = new class_orm_schemamanager(); $strReturn .= "Installing table navigation...\n"; $objManager->createTable("class_module_navigation_point"); //register the module $this->registerModule("navigation", _navigation_modul_id_, "class_module_navigation_portal.php", "class_module_navigation_admin.php", $this->objMetadata->getStrVersion(), true); $strReturn .= "Installing navigation-element table...\n"; $objManager->createTable("class_element_navigation_admin"); //Register the element $strReturn .= "Registering navigation-element...\n"; //check, if not already existing $objElement = null; try { $objElement = class_module_pages_element::getElement("navigation"); } catch (class_exception $objEx) { } if ($objElement == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("navigation"); $objElement->setStrClassAdmin("class_element_navigation_admin.php"); $objElement->setStrClassPortal("class_element_navigation_portal.php"); $objElement->setIntCachetime(3600); $objElement->setIntRepeat(0); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } $strReturn .= "Setting aspect assignments...\n"; if (class_module_system_aspect::getAspectByName("content") != null) { $objModule = class_module_system_module::getModuleByName($this->objMetadata->getStrTitle()); $objModule->setStrAspect(class_module_system_aspect::getAspectByName("content")->getSystemid()); $objModule->updateObjectToDb(); } return $strReturn; }
public function install() { $strReturn = ""; $objManager = new class_orm_schemamanager(); $strReturn .= "Installing table guestbook_book...\n"; $objManager->createTable("class_module_guestbook_guestbook"); $strReturn .= "Installing table guestbook_post...\n"; $objManager->createTable("class_module_guestbook_post"); //register the module $this->registerModule("guestbook", _guestbook_module_id_, "class_module_guestbook_portal.php", "class_module_guestbook_admin.php", $this->objMetadata->getStrVersion(), true); //Table for page-element $strReturn .= "Installing guestbook-element table...\n"; $objManager->createTable("class_element_guestbook_admin"); //Register the element $strReturn .= "Registering guestbook-element...\n"; //check, if not already existing $objElement = class_module_pages_element::getElement("guestbook"); if ($objElement === null) { $objElement = new class_module_pages_element(); $objElement->setStrName("guestbook"); $objElement->setStrClassAdmin("class_element_guestbook_admin.php"); $objElement->setStrClassPortal("class_element_guestbook_portal.php"); $objElement->setIntCachetime(3600); $objElement->setIntRepeat(1); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } $strReturn .= "Setting aspect assignments...\n"; if (class_module_system_aspect::getAspectByName("content") != null) { $objModule = class_module_system_module::getModuleByName($this->objMetadata->getStrTitle()); $objModule->setStrAspect(class_module_system_aspect::getAspectByName("content")->getSystemid()); $objModule->updateObjectToDb(); } return $strReturn; }
public function install() { $strReturn = "Installing " . $this->objMetadata->getStrTitle() . "...\n"; $objManager = new class_orm_schemamanager(); $strReturn .= "Installing table pages...\n"; $objManager->createTable("class_module_pages_page"); $strReturn .= "Installing table page_folder...\n"; $objManager->createTable("class_module_pages_folder"); //folder_properties $strReturn .= "Installing table page_properties...\n"; $arrFields = array(); $arrFields["pageproperties_id"] = array("char20", false); $arrFields["pageproperties_browsername"] = array("char254", true); $arrFields["pageproperties_keywords"] = array("char254", true); $arrFields["pageproperties_description"] = array("char254", true); $arrFields["pageproperties_template"] = array("char254", true); $arrFields["pageproperties_seostring"] = array("char254", true); $arrFields["pageproperties_language"] = array("char20", true); $arrFields["pageproperties_alias"] = array("char254", true); $arrFields["pageproperties_path"] = array("char254", true); $arrFields["pageproperties_target"] = array("char254", true); if (!$this->objDB->createTable("page_properties", $arrFields, array("pageproperties_id", "pageproperties_language"), array("pageproperties_language"))) { $strReturn .= "An error occurred! ...\n"; } $strReturn .= "Installing table element...\n"; $objManager->createTable("class_module_pages_element"); $strReturn .= "Installing table page_element...\n"; $objManager->createTable("class_module_pages_pageelement"); //Now we have to register module by module //the pages $this->registerModule("pages", _pages_modul_id_, "class_module_pages_portal.php", "class_module_pages_admin.php", $this->objMetadata->getStrVersion(), true); //The pages_content $this->registerModule("pages_content", _pages_content_modul_id_, "", "class_module_pages_content_admin.php", $this->objMetadata->getStrVersion(), false); $strReturn .= "Registering system-constants...\n"; $this->registerConstant("_pages_templatechange_", "false", class_module_system_setting::$int_TYPE_BOOL, _pages_modul_id_); $this->registerConstant("_pages_indexpage_", "index", class_module_system_setting::$int_TYPE_PAGE, _pages_modul_id_); $this->registerConstant("_pages_errorpage_", "error", class_module_system_setting::$int_TYPE_PAGE, _pages_modul_id_); $this->registerConstant("_pages_defaulttemplate_", "standard.tpl", class_module_system_setting::$int_TYPE_STRING, _pages_modul_id_); //2.1.1: overall cachetime $this->registerConstant("_pages_cacheenabled_", "true", class_module_system_setting::$int_TYPE_BOOL, _pages_modul_id_); //2.1.1: possibility, to create new pages disabled $this->registerConstant("_pages_newdisabled_", "false", class_module_system_setting::$int_TYPE_BOOL, _pages_modul_id_); //portaleditor $this->registerConstant("_pages_portaleditor_", "true", class_module_system_setting::$int_TYPE_BOOL, _pages_modul_id_); $strReturn .= "Shifting pages to third position...\n"; $objModule = class_module_system_module::getModuleByName("pages"); $objModule->setAbsolutePosition(3); //Table for paragraphes $strReturn .= "Installing paragraph table...\n"; $objManager->createTable("class_element_paragraph_admin"); //Register the element $strReturn .= "Registering paragraph...\n"; //check, if not already existing $objElement = null; try { $objElement = class_module_pages_element::getElement("paragraph"); } catch (class_exception $objEx) { } if ($objElement == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("paragraph"); $objElement->setStrClassAdmin("class_element_paragraph_admin.php"); $objElement->setStrClassPortal("class_element_paragraph_portal.php"); $objElement->setIntCachetime(3600 * 24 * 30); $objElement->setIntRepeat(1); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } $strReturn .= "Registering row...\n"; //check, if not already existing $objElement = null; try { $objElement = class_module_pages_element::getElement("row"); } catch (class_exception $objEx) { } if ($objElement == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("row"); $objElement->setStrClassAdmin("class_element_row_admin.php"); $objElement->setStrClassPortal("class_element_row_portal.php"); $objElement->setIntCachetime(3600 * 24 * 30); $objElement->setIntRepeat(0); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } //Table for images $strReturn .= "Installing image table...\n"; $objManager->createTable("class_element_image_admin"); //Register the element $strReturn .= "Registering image...\n"; //check, if not already existing $objElement = null; try { $objElement = class_module_pages_element::getElement("image"); } catch (class_exception $objEx) { } if ($objElement == null) { $objElement = new class_module_pages_element(); $objElement->setStrName("image"); $objElement->setStrClassAdmin("class_element_image_admin.php"); $objElement->setStrClassPortal("class_element_image_portal.php"); $objElement->setIntCachetime(3600 * 24 * 30); $objElement->setIntRepeat(1); $objElement->setStrVersion($this->objMetadata->getStrVersion()); $objElement->updateObjectToDb(); $strReturn .= "Element registered...\n"; } else { $strReturn .= "Element already installed!...\n"; } $strReturn .= "Installing universal element table...\n"; $arrFields = array(); $arrFields["content_id"] = array("char20", false); $arrFields["char1"] = array("char254", true); $arrFields["char2"] = array("char254", true); $arrFields["char3"] = array("char254", true); $arrFields["int1"] = array("int", true); $arrFields["int2"] = array("int", true); $arrFields["int3"] = array("int", true); $arrFields["text"] = array("text", true); if (!$this->objDB->createTable("element_universal", $arrFields, array("content_id"))) { $strReturn .= "An error occurred! ...\n"; } $strReturn .= "Setting aspect assignments...\n"; if (class_module_system_aspect::getAspectByName("content") != null) { $objModule = class_module_system_module::getModuleByName($this->objMetadata->getStrTitle()); $objModule->setStrAspect(class_module_system_aspect::getAspectByName("content")->getSystemid()); $objModule->updateObjectToDb(); } return $strReturn; }