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