Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
main.php
1 <?php
2 Yii::setPathOfAlias('unit', dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'unit');
3 Yii::setPathOfAlias('site', '..');
4 return array(
5  //frontend directory path
6  'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
7  //Name of the application. Will be shown in window title
8  'name' => 'Gentics Portal.Node',
9  //the language that the application is written in. This mainly refers to
10  //the language that the messages and view files are in. Defaults to 'en_us'
11  'sourceLanguage' => 'en_us',
12  //Aliases for directory pathes
13  'aliases' => array(
14  'common' => 'site.common',
15  ),
16  //the IDs of the application components that should be preloaded. For better performance
17  'preload' => array('log', 'session', 'notificator', 'language', 'personalisation'),
18  //String the charset currently used for the application. Defaults to 'UTF-8'.
19  'charset' => 'UTF-8',
20  //import folders with files, classes
21  //Importing a class is like including the corresponding class file.
22  //The main difference is that importing a class is much lighter because it only
23  //includes the class file when the class is referenced the first time.
24  //Importing a directory is equivalent to adding a directory into the PHP include path.
25  //If multiple directories are imported, the directories imported later will take
26  //precedence in class file searching (i.e., they are added to the front of the PHP include path).
27  'import' => array(
28  'common.models.*',
29  'common.helpers.*',
30  'common.components.*',
31  'common.components.notification.*',
32  'common.extensions.*',
33  'common.components.content.*',
34  'common.modules.contentSource.components.*',
35  'common.modules.comments.*',
36  'common.modules.comments.models.*',
37  'common.modules.user.*',
38  'common.modules.user.models.*',
39  'common.modules.user.helpers.*',
40  'common.modules.user.components.*',
41  'common.modules.user.services.*',
42  'common.modules.user.widgets.*',
43  'common.modules.rights.*',
44  'common.modules.rights.models.*',
45  'common.modules.rights.components.*',
46  'common.extensions.eauth.*',
47  'common.extensions.eauth.services.*',
48  'common.modules.language.*',
49  'common.extensions.ExtendedClientScript.*',
50  'common.modules.vote.*',
51  'common.modules.vote.controllers.*',
52  'common.modules.vote.models.*',
53  'application.components.*',
54  'application.controllers.*',
55  'zii.widgets.jui.CJuiWidget',
56  'ext.*',
57  'system.caching.*',
58  'site.frontend.extensions.*',
59  'site.common.modules.apalines.commands.*',
60 // 'application.modules.comments.*'
61  ),
62  //The configuration of the currently installed modules (module ID => configuration).
63  //detail config is in /modules folder
64  'modules' => array(
65  'gii' => array(
66  'class' => 'system.gii.GiiModule',
67  'password' => 'cru9',
68  // If removed, Gii defaults to localhost only. Edit carefully to taste.
69  'ipFilters' => array('127.0.0.1', '::1'),
70  ),
71  //Comments module
72  'comments' => array(
73  'class' => 'common.modules.comments.CommentsModule',
74  //salt which is used for every hash operation in this module
75  'hashSalt' => 'h1ads29ds1a91hgj29jl451',
76  'cacheTime' => 60
77  ),
78  //Like module
79  'like' => array(
80  //Module class location
81  'class' => 'common.modules.like.LikeModule',
82  /* quantity of likes to be shown after like/unlike button */
83  'topLikesQty' => 3,
84  /* quantity of likes to be shown in overlay */
85  'lastLikesQty' => 2,
86 
87  /* cache life time in seconds */
88  'cacheTime' => 0,
89  ),
90  'remember' => array(
91  'class' => 'common.modules.remember.RememberModule',
92  'facebookApplicationId' => '441157159266533',
93  'signSalt' => 'sign-salt',
94  'shareByMailEmail' => 'portal.remember@gentics.com',
95  'shareByMailSubject' => 'Remember subject',
96  'allowedURL' => '.gentics.com',
97  'pdfname' => 'Remembered_Pages.pdf',
98  'tmpFolder' => '/tmp/'
99  ),
100  'history' => array(
101  'class' => 'common.modules.history.HistoryModule',
102  'cacheTime' => null,
103  'autoSave' => false,
104  ),
105  //Module for working with File System Content Renderer and Dynamic Content Renderer
106  'contentSource' => array(
107  //Module class location
108  'class' => 'common.modules.contentSource.ContentSourceModule',
109  //Current content renderer class
110  //Allowed values:
111  // - DynamicContentSource
112  // - FileSystemContentSource
113  'sourceClass' => 'FileSystemContentSource',
114  //Content repository settings
115  'sourceSettings' => array(
116  //Dynamic Content Renderer settings
117  'DynamicContentSource' => array(
118  //folder into which content will be cached
119  'cacheFolder' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '../runtime/contentSource/',
120  //If use personalization for current content source
121  'usePersonalisation' => true,
122  //Array of fields which will be additionally request from Gentics Content Connector
123  //and used in personalisation checking algorithm
124  'personalisationFields' => array('permissions')
125  ),
126  //File System Content Renderer settings
127  'FileSystemContentSource' => array(
128  //folder which contained File System Content Renderer content
129  'contentFolder' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '../runtime/contentSource/',
130  //If use personalization for current content source
131  'usePersonalisation' => true,
132  //Array of fields which will be additionally request from Gentics Content Connector
133  //and used in personalisation checking algorithm
134  'personalisationFields' => array('permissions')
135  ),
136  ),
137  'homePage' => 'Content.Node/index.html',
138  //the number of seconds in which the cached value will expire. 0 means never expire.
139  //used for caching content personalisation attributes and modification time
140  'cacheTime' => 1
141  ),
142  //yii-user module
143  'user' => array(
144  //Module class location
145  'class' => 'common.modules.user.UserModule',
146  //encrypting method (php hash function)
147 // 'hash' => 'sha1',
148  //send activation email
149  'sendActivationMail' => true,
150  //Subject of mail in activation mail. site_name - replaced by value 'name' in main.php
151  'activationMailSubject' => "You registered from {site_name}",
152  //email which is displayed in 'Send from:" in activation mail
153  'activationEmail' => 'gportal.activation@example.com',
154  //allow access for non-activated users
155  'loginNotActiv' => false,
156  //automatically login from registration
157  'autoLogin' => true,
158  //registration path
159  //registration path
160  'registrationUrl' => array(
161  'en' => '/Content.Node/service/Registration.en.html'
162  ),
163  //recovery password path
164  'recoveryUrl' => array(
165  'en' => '/Content.Node/service/Password-Recovery.en.html',
166  'de' => '/Content.Node/service/Password-Recovery.de.html'
167  ),
168  //login form path
169  'loginUrl' => array(
170  'en' => '/Content.Node/service/Login.en.html',
171  'de' => '/Content.Node/service/Login.de.html',
172  'ru' => '/widgetsTests/userLogin?language=ru'
173  ),
174  //page after login
175  'returnUrl' => array(
176  'en' => '/Content.Node/service/Login.en.html',
177  'de' => '/Content.Node/service/Login.de.html',
178  ),
179  //page after logout
180  'returnLogoutUrl' => array(
181  'en' => '/Content.Node/service/Login.en.html',
182  'de' => '/Content.Node/service/Login.de.html',
183  ),
184  //if user has no permissions, go to this site
185  'noPermissionsUrl' => array(
186  'en' => '/site/noPermissions'
187  ),
188  'homePageUrl' => array(
189  'en' => '/Content.Node/index.html'
190  ),
191  //int number of seconds that the user can remain in logged-in status. Defaults to 0, meaning login till the user closes the browser.
192  //If greater than 0, cookie-based login will be used.
193  'loggedInDuration' => 60 * 60 * 24 * 30,
194  //define which user field will be used in login process. 'email' or 'username'. If field != 'email' then username will be used
195  'authField' => 'username',
196  //define if username will be shown in register process
197  'usernameRequired' => true,
198  //define if username should be unique during registration
199  'usernameUnique' => true,
200 
201  'relations' => array(
202  array(CActiveRecord::HAS_MANY, 'UserPersonalisationAttribute', 'user_id')
203  )
204  ),
205  //yii-rights module
206  'rights' => array(
207  //Module class location
208  'class' => 'common.modules.rights.RightsModule',
209  //the name of the username column in the user table. displayed in admin section
210  'userNameColumn' => 'email'
211  ),
212  //language module
213  'language' => array(
214  'class' => 'common.modules.language.LanguageModule',
215  //array of used languages
216  'languages' => array(
217  'en' => 'en',
218  'ru' => 'ru',
219  'sv' => 'sv',
220  'uk_ua' => 'uk_ua',
221  'de' => 'de'
222  )
223  ),
224  //
225  'updates' => array(
226  'class' => 'common.modules.updates.UpdatesModule',
227  'currentVersion' => 0.1
228  ),
229  //bulk module - allows to fill database with lots of data
230  'bulk' => array(
231  //Module class location
232  'class' => 'common.modules.bulk.BulkModule',
233  ),
234  //navigation module - allows to show navigation panels like topmenu, leftmenu, etc.
235  'navigation' => array(
236  //Module class location
237  'class' => 'common.modules.navigation.NavigationModule',
238  /* cache life time in seconds */
239  'cacheTime' => 0,
240  ),
241  //search module
242  'search' => array(
243  // class
244  'class' => 'common.modules.search.SearchModule',
245  // cache life time in seconds
246  'cacheTime' => 0,
247  // CMS page that contains SearchResultWidget
248  'defaultLandingPage' => 'Content.Node/service/search/search1.html',
249  // CMS landing pages for every language(pages with SearchResultWidget in different languages)
250  'landingPages' => array(),
251  // personalisation delimiter. Used to split personalisation string after search request
252  'personalisationDelimiter' => ' ',
253  //perPage defines how many found results should be displayed per page
254  'perPage' => 5,
255 
256 
257  'mimetype' => array(
258  //show or not this field on advanced form
259  'showOnAdvancedSearchForm' => true,
260  //list of allowed mimetypes
261  'options' => array(
262  'html',
263  'php',
264  'pdf',
265  'doc',
266  ),
267  //default value
268  'default' => 'html'
269  ),
270  'whereToSearch' => array(
271  //show dropdown list on advanced search form to select where to search
272  'showOnAdvancedSearchForm' => true,
273  //list of options
274  'options' => array(
275  'content',
276  'name',
277  ),
278  //default value
279  'default' => 'content'
280  ),
281  'searchType' => array(
282  'showOnAdvancedSearchForm' => true,
283  //list of options
284  'options' => array(
285  // OR means any of given words must be present in result
286  'OR',
287  // EXACT means the searcher would search for exact phrase
288  'EXACT',
289  // AND means all words must be present in result
290  'AND',
291  // NOT will exclude all words except for the first one
292  'NOT'
293  ),
294  //default value
295  'default' => 'OR'
296  ),
297  //this string will always be added to th end of all search requests
298  // should start with AND
299  'staticString' => '',
300  ),
301  'shoppingcart' => array(
302  'class' => 'common.modules.shoppingcart.ShoppingCartModule',
303  'usermail_template' => 'usermail_template',
304  'adminemail_template' => 'adminemail_template',
305  'cookie_domain' => '.gentics.com',
306  'thankyoupage' => array(
307  'de'=>'/Content.Node/service/Shopping_Cart_Thank_You.de.html',
308  'en'=>'/Content.Node/service/Shopping_Cart_Thank_You.en.html',
309  ),
310  'max_lifetime' => 50,
311  'shipping_costs' => 100,
312  'currency' => '&euro;',
313  'notificationsEmail' => 'portal.shoppingcart@gentics.com',
314  'captchaEnabled' => false
315  ),
316 
317  'personalisation' => array(
318  'class' => 'common.modules.personalisation.PersonalisationModule',
319  'rule' => 'personalisation.components.BasicPersonalisationRule',
320  'cacheTime' => 0
321  ),
322 
323  'settings' => array(
324  'class' => 'common.modules.settings.SettingsModule',
325  'fields' => array(),
326  ),
327  'friends' => array(
328  'class' => 'common.modules.friends.FriendsModule',
329  'notificationsEmail' => 'gportal.friends@gentics.com'
330  ),
331  'tagcloud' => array(
332  'class' => 'common.modules.tagcloud.tagcloudModule',
333  'cacheTime' => -1,
334  'defaultOverviewPage' => '/Content.Node/testing/Overview.en.html',
335  'overviewPages' => array(
336  'en' => '/Content.Node/testing/Overview.en.html',
337  'de' => '/Content.Node/testing/Overview.de.html',
338  ),
339  'tagsSeparator' => ', ',
340  'tagstyles' => array(
341  'tagsize_1', //ex.: 10px
342  'tagsize_2', //ex.: 14px
343  'tagsize_3', //ex.: 16px
344  )
345  ),
346  'apalines' => array(
347  'class' => 'site.common.modules.apalines.APALinesModule',
348  'customer_number' => 'CB86E6F1-1847-4BD9-8FA7-E5606B97BCE8',
349  'video_url' => 'http://videoservice.apa.at/Player/UniversalPlayer.aspx',
350  'cacheTime' => 60,
351  'total_max_age_of_news' => 24*30*5, //about 5 months
352  'total_max_count_of_news' => 50,
353  'channels' =>
354  array(
355  'unit_test' => array(
356  'delivery_path' => 'unit.apalines.content.work',
357  'max_age_of_news' => 99999999
358  ),
359  ),
360  ),
361  ),
362 
363  //The application components (indexed by their IDs).
364  //detail config is in /components folder
365  'components' => array(
366  //Gentics Content Connector configuration
367  'repositoryApi' => array(
368  'class' => 'common.components.RepositoryApi',
369  'url' => 'http://gportal-dev.gentics.com:8080',
370  //path to component that processes navigation requests
371  'navigation' => '/ccr/nav',
372  'binaryContent' => '/ccr/content',
373  'contentRepositorySearch' => '/ccr/ccr',
374  //path to component that processes search requests
375  'search' => '/ccr/search',
376  //path to component that processes active paths requests
377  'activePath' => '/ccr/ap',
378  //path to component that processes autosuggest requests
379  'autosuggest' => '/ccr/autocomplete',
380  //parameters which will be added to every request to gentics content connector
381  'additionalRequestParameters' => array(
382  'node_id' => 3
383  )
384  ),
385  'messages' => array(
386  'class' => 'PhpMessageSource',
387  //If true try to use dictionary files from custom section
388  'customI18n' => true,
389  ),
390  //Component for Yii::app()->user {@link RWebUser}
391  'user' => array(
392  //Component class
393  'class' => 'rights.components.RWebUser',
394  // enable cookie-based authentication
395  'allowAutoLogin' => true,
396  //the URL for login
397 // 'loginUrl' => array('/user/login'),
398  ),
399  //Component for checking RBAC rights
400  'authManager' => array(
401  //Component class
402  'class' => 'RDbAuthManager',
403  //array list of role names that are assigned to all users implicitly.
404  //These roles do not need to be explicitly assigned to any user.
405  //When calling {@link checkAccess}, these roles will be checked first.
406  //For performance reason, you should minimize the number of such roles.
407  'defaultRoles' => array('Guest', 'Authenticated')
408  ),
409  //Components manages the URLs of Web applications.
410  'urlManager' => array(
411  //The URL format. Defaults to 'path'. Valid values include 'path' and 'get'.
412  'urlFormat' => 'path',
413  //whether to show entry script name in the constructed URL. Defaults to true
414  'showScriptName' => false,
415  //array the URL rules (pattern=>route).
416  'rules' => array(
417  'user/assignment/<action:\w+>' => 'user/rightsAssignment/<action>',
418  '<path:Content\.Node\/.+\.(php|html)>' => 'contentSource/renderer/dynamic',
419  '<path:Content\.Node\/.+>' => 'contentSource/renderer/static',
420 // '<path:GenticsImageStore\/.+>' => 'contentSource/renderer/static',
421  '<controller:\w+>/<id:\d+>' => '<controller>/view',
422  '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
423  '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
424  '<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',
425  '<controller:\w+>' => '<controller>/index',
426 
427  ),
428  ),
429  //AssetManager is a Web application component that manages private files (called assets) and makes them accessible by Web clients
430  'assetManager' => array(
431  'class' => 'common.components.AssetsManager',
432  'basePath' => 'tests/assets'
433  ),
434  //ClientScript manages JavaScript and CSS stylesheets for views.
435  //Can compress and combine CSS and JS files depends of settings
436  'clientScript' => array(
437  'class' => 'common.extensions.ExtendedClientScript.ExtendedClientScript',
438  //JS and CSS compression tool settings
439  //Used for garbage collection. After that period (in days) clean files.
440  'disableRegisterFiles' => true,
441  'ttlDays' => 1,
442  //combine css files to single file
443  'combineCss' => true,
444  //compress css files
445  'compressCombinedCss' => true,
446  //combine js files to single file
447  'combineJs' => true,
448  //compress js files
449  'compressCombinedJs' => true,
450  //javascript minificator class location
451  'jsMinPath' => 'common.extensions.ExtendedClientScript.jsmin.*',
452  //CSS minificator class location
453  'cssMinPath' => 'common.extensions.ExtendedClientScript.cssmin.*'
454  ),
455  //Component manager of database connections
456  'db' => array(
457  //Db component class
458  'class' => 'DbConnectionMan',
459  //DB connection string
460  'connectionString' => 'mysql:host=qa-db-mysql55.office;port=3306;dbname=gpnphp_unittests_random_15502910420909',
461  //'connectionString' => 'mysql:host=qa-db-mysql55.office;port=3306;dbname=gpnphp_unittests_random_15502910420909',
462  //whether to turn on prepare emulation. Defaults to false, meaning PDO will use the native prepare support if available.
463  'emulatePrepare' => true,
464  //the default prefix for table names. Defaults to null, meaning no table prefix.
465  'tablePrefix' => 'gportal_',
466  //DB username
467  'username' => 'root',
468  //DB Password
469  'password' => '',
470  //'password' => '',
471  'charset' => 'utf8',
472  //whether the database connection should be automatically established the component is being initialized.
473  'autoConnect' => false,
474  //whether to enable profiling the SQL statements being executed. This should be mainly enabled and used during development
475  //to find out the bottleneck of SQL executions.
476  'enableProfiling' => true,
477  //whether to log the values that are bound to a prepare SQL statement
478  'enableParamLogging' => true,
479  //number of seconds that table metadata can remain valid in cache. 86400, 0 - disabled
480  'schemaCachingDuration' => 0,
481  //Read write splitting function is swithable.You can specify this value to false to disable it.
482  'enableSlave' => false,
483  //slave connection config is same as CDbConnection
484  'slaves' => array(),
485  ),
486  //Cache settings
487  'cache' => array(
488  //Class for caching
489  //CMemCache: uses PHP memcache extension.
490  //CApcCache: uses PHP APC extension.
491  //CXCache: uses PHP XCache extension.
492  //CEAcceleratorCache: uses PHP EAccelerator extension.
493  //CDbCache: uses a database table to store cached data. By default, it will create and use a SQLite3 database under the runtime directory.
494  //You can explicitly specify a database for it to use by setting its connectionID property.
495  //CZendDataCache: uses Zend Data Cache as the underlying caching medium.
496  //CFileCache: uses files to store cached data. This is particular suitable to cache large chunk of data (such as pages).
497  //CDummyCache: is a placeholder cache component.
498  'class' => 'system.caching.CMemCache',
499  //List of memcache server configurations. Each element is a CMemCacheServerConfiguration.
500 // 'servers' => array(),
501  ),
502  //Component for storing session.
503  //It implements a session component using cache as storage medium.
504  'session' => array(
505  'class' => 'system.web.CCacheHttpSession', /*http://www.yiiframework.com/doc/api/1.1/CCacheHttpSession/*/
506  //The session cookie parameters.
507  'cookieParams' => array( //If true cookie will only be sent over secure connections.
508 // 'secure' => true,
509  //Cookie domain, for example 'www.php.net'. To make cookies visible on all subdomains then
510  //the domain must be prefixed with a dot like '.php.net'.
511 // 'domain' => 'gportal.loc'
512  //Lifetime of the session cookie, defined in seconds.
513 // 'lifetime' => 0,
514  //Path on the domain where the cookie will work. Use a single slash ('/') for all paths on the domain.
515 // 'path' => '/'
516  //If set to true then PHP will attempt to send the httponly flag when setting the session cookie.
517 // 'httponly' => false
518 
519  ),
520  ),
521  //CHttpRequest component settings
522  'request' => array(
523  //whether cookies should be validated to ensure they are not tampered. Defaults to false
524  'enableCookieValidation' => true, /*http://www.yiiframework.com/doc/guide/1.1/en/topics.security#cookie-attack-prevention*/
525  ),
526  //logger settings
527  'log' => array(
528  //Component class
529  'class' => 'CLogRouter',
530  'routes' => array(
531  //php error log
532  'errorLog' => array(
533  'class' => 'CFileLogRoute',
534  'levels' => 'error, warning',
535  'logPath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'custom/runtime',
536  ),
537  array(
538  'class' => 'CProfileLogRoute',
539  'levels' => 'profile',
540  ),
541  'file'=>array(
542  'class' => 'CFileLogRoute',
543  'levels' => 'error, warning, info',
544  'logPath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'common/runtime',
545  ),
546  ),
547  ),
548  //Notification manager component
549  'notificationManager' => array(
550  //Component class
551  'class' => 'common.components.notification.NotificationManager',
552  //cache time for user model
553  'cacheTime' => 0,
554  //notificators for handling notificators
555  'notificators' => array(
556  'mail' => array(
557  //notificator class
558  'class' => 'common.components.notification.MailNotificator',
559  //PhpMailer extension options
560  'phpMailer' => array(
561  'CharSet' => 'UTF-8',
562  )
563  ),
564  'file' => array(
565  //notificator class
566  'class' => 'common.components.notification.FileLogNotificator',
567  )
568  )
569  ),
570  //TPA extension settings
571  'eauth' => array(
572  //Component class
573  'class' => 'common.extensions.eauth.EAuth',
574  // Use the popup window instead of redirecting.
575  'popup' => true,
576  //currenly using services for authentication
577  'services' => array()
578  ),
579  //extension needed for TPA
580  'loid' => array(
581  //Component class
582  'class' => 'common.extensions.lightopenid.loid',
583  ),
584  //
585  'errorHandler' => array(
586  'class' => 'ErrorHandler',
587  'errorAction' => 'site/error',
588  'errorPages' => array(
589  400 => '/site/error400',
590  404 => '/site/error404'
591  )
592  ),
593  'fixture' => array(
594  'class' => 'system.test.CDbFixtureManager',
595  'basePath' => dirname(__FILE__) . '/../fixtures/'
596  ),
597  ),
598  //Additional params
599  'params' => array(
600  //If true try to use view files from custom section
601  'customViews' => true,
602  'emailForAllMails' => array('iaia@meta.ua'),
603  'ldap' => array(
604  'host' => 'mail.gentics.com',
605  'ou' => 'Users',
606  'dc' => array('gentics', 'com')
607  ),
608  'captcha' => 'polomo'
609  ),
610 );