Beispiel #1
0
 public function __construct()
 {
     // Construct any possible parent, parse the configuration meanwhile;
     parent::__construct();
     // Tie in common configuration data;
     $this->tieInCommonConfiguration();
     // Get the confiuration data ...
     self::$objAudioTable = $this->getConfigKey(new S('audio_table'));
     self::$objAudioTableFId = $this->getConfigKey(new S('audio_table_field_id'));
     self::$objAudioTableFFile = $this->getConfigKey(new S('audio_table_field_file'));
     self::$objAudioTableFArtwork = $this->getConfigKey(new S('audio_table_field_artwork'));
     self::$objAudioTableFTitle = $this->getConfigKey(new S('audio_table_field_title'));
     self::$objAudioTableFSEO = $this->getConfigKey(new S('audio_table_field_seo'));
     self::$objAudioTableFArtist = $this->getConfigKey(new S('audio_table_field_artist'));
     self::$objAudioTableFAlbum = $this->getConfigKey(new S('audio_table_field_album'));
     self::$objAudioTableFLyrics = $this->getConfigKey(new S('audio_table_field_lyrics'));
     self::$objAudioTableFDescription = $this->getConfigKey(new S('audio_table_field_description'));
     self::$objAudioTableFUploadedDate = $this->getConfigKey(new S('audio_table_field_date_uploaded'));
     self::$objAudioTableFUploaderId = $this->getConfigKey(new S('audio_table_field_uploader_id'));
     self::$objAudioTableFCategoryId = $this->getConfigKey(new S('audio_table_field_category_id'));
     self::$objAudioTableFApproved = $this->getConfigKey(new S('audio_table_field_approved'));
     self::$objAudioTableFCanComment = $this->getConfigKey(new S('audio_table_field_can_comment'));
     self::$objAudioTableFViews = $this->getConfigKey(new S('audio_table_field_views'));
     // Comments ...
     self::$objCommentsTable = $this->getConfigKey(new S('audio_comments_table'));
     self::$objCommentsTableFId = $this->getConfigKey(new S('audio_comments_table_id'));
     self::$objCommentsTableFName = $this->getConfigKey(new S('audio_comments_table_name'));
     self::$objCommentsTableFEML = $this->getConfigKey(new S('audio_comments_table_email'));
     self::$objCommentsTableFURL = $this->getConfigKey(new S('audio_comments_table_website'));
     self::$objCommentsTableFRUId = $this->getConfigKey(new S('audio_comments_table_registered_user_id'));
     self::$objCommentsTableFComment = $this->getConfigKey(new S('audio_comments_table_comment'));
     self::$objCommentsTableFApproved = $this->getConfigKey(new S('audio_comments_table_approved'));
     self::$objCommentsTableFDate = $this->getConfigKey(new S('audio_comments_table_date'));
     self::$objCommentsTableFAudioFileId = $this->getConfigKey(new S('audio_comments_table_audio_file_id'));
     // Categories ...
     self::$objCategoryTable = $this->getConfigKey(new S('audio_category_table'));
     self::$objCategoryTableFId = $this->getConfigKey(new S('audio_category_table_id'));
     self::$objCategoryTableFName = $this->getConfigKey(new S('audio_category_table_name'));
     self::$objCategoryTableFSEO = $this->getConfigKey(new S('audio_category_table_seo'));
     self::$objCategoryTableFDescription = $this->getConfigKey(new S('audio_category_table_description'));
     self::$objCategoryTableFDate = $this->getConfigKey(new S('audio_category_table_date'));
     // Configuration ...
     self::$objItemsPerPage = $this->getConfigKey(new S('audio_settings_audio_items_per_page'));
     // Load'em defaults ... ATH, STG and others ...
     $this->ATH = MOD::activateModule(new FilePath('mod/authentication'), new B(TRUE));
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
     // Get an MPTT Object, build the ROOT, make sure the table is OK;
     self::$objMPTT = new MPTT(self::$objCategoryTable, MPTT::mpttAddUnique(new S(__CLASS__), new S((string) $_SERVER['REQUEST_TIME'])));
     // Get some JSS data ...
     $this->objPathToSkinJSS = $this->getPathToSkinJSS()->toRelativePath();
     $this->objPathToSkinCSS = $this->getPathToSkinCSS()->toRelativePath();
     // CALL them specific TPL methods, add JSS & CSS to page <head'er ...
     TPL::manageJSS(new FilePath($this->objPathToSkinJSS . self::AUDIO_PLAYER_JS_PATH), new S(self::AUDIO_PLAYER_JS_STRING));
 }