Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
client_main.php
1 
2 
3 <?php
4 /**
5  * Gentics Portal.Node PHP
6  * Author & Copyright (c) by Gentics Software GmbH
7  * sales@gentics.com
8  * http://www.gentics.com
9  * Licenses can be found in the LICENSE.txt file in the root-folder of this installation
10  * You must not use this software without a valid license agreement.
11  *
12  *
13  */
14 $client_config = array(
15  //The configuration of the currently installed modules (module ID => configuration).
16  //detail config is in /modules folder
17  // languagecode,name,node_id,sortorder,permissions,navhidden,url,title,entry_media,teaser,creationdate,creator,tagging,hideinoverview
18  'modules' => array(
19  //personalized content module
20  'personalizedContent' => array(
21  //Component class
22  'class' => 'common.modules.personalizedContent.PersonalizedContentModule',
23  // cache life time in seconds
24  'cacheTime' => 60,
25  // excludeURLs - URL's that should not be shown in navigation widgets like ''(empty) or '#' or '/', etc.
26  'excludeURLs' => array('', '/', '#'),
27  // GCC request params. Comma separated. Example: name,name_en.
28  //Do not include personalisation attributes here, they will be added automatically.
29  //updatetimestamp will also be added - because it is required
30  'gccRequestParams' => 'languagecode,name,node_id,sortorder,permissions,navhidden,url,title,entry_media,teaser,creationdate,creator,tagging,hideinoverview',
31  'perPage' => 5,
32  ),
33 
34  //yii-user module
35  'user' => array(
36  'authField' => 'email',
37  // define startpages for portal
38  'homePageUrl' => array(
39  'en' => '/Content.Node/index.html',
40  'de' => '/Content.Node/index.de.html'
41  ),
42  // needed for changing email in edit profile
43  'profileEditUrl' => array(
44  'en' => '/Content.Node/service/UserProfileEditWidget.en.html',
45  'de' => '/Content.Node/service/UserProfileEditWidget.de.html',
46  ),
47  // admin email for registration approval
48  'registrationNotifyAdminEmail'=>'km.schremser@gentics.com',
49  'registrationNotifyAdminTemplate'=>'notifyAdminAboutRegister',
50 
51  'sendActivationMail' => true,
52  // should the user be activated after registration
53  'activeAfterRegister' => true,
54  ),
55  'comments' => array(
56  'cacheTime' => 30
57  ),
58  'fg' => array(
59  'class' => 'common.modules.fg.FgModule',
60  'clientBasePath' => 'http://cms.gportal-dev.gentics.com/formgenerator',
61  // editor client server local path
62  'clientLocalPath' => '/Node/var/httpd/htdocs/formgenerator',
63  'proxyPath' => '',
64  'notificationsEmail' => 'gportal.formgenerator@gentics.com',
65  'defaultLogin' => array(
66  'username' => 'dummyuser@gentics.com',
67  'password' => 'dummy'
68  ),
69  'thankYouPage' => "/danke.html"
70 
71  ),
72  // cms user authentication module
73  'cmsuserauthentication' => array(
74  'class' => 'common.modules.cmsuserauthentication.CmsuserauthenticationModule',
75  'authUrl' => 'http://'.$_SERVER['HTTP_HOST'].'/gcnproxy/CNPortletapp/rest/auth/login',
76  'salt_secretkey' => 'SecretSalt1234#',
77  'username_sessionattr' => 'email',
78  'cmsBackendUrl' => 'http://cms.gportal-dev.gentics.com/backend.php'
79  ),
80  'shoppingcart' => array(
81  'usermail_template' => 'usermail_template',
82  'adminemail_template' => 'adminemail_template',
83  'max_lifetime' => 50,
84  'shipping_costs' => 100,
85  'currency' => '&euro;',
86  ),
87 
88  'contentSource' => array(
89  //Current content renderer class
90  //Allowed values:
91  // - DynamicContentSource
92  // - FileSystemContentSource
93  'sourceClass' => 'DynamicContentSource',
94  //Content repository settings
95  'sourceSettings' => array(
96  //Dynamic Content Renderer settings
97  'DynamicContentSource' => array(
98  //folder into which content will be cached
99  'cacheFolder' => '/var/www/gPortal/DCR',
100  //If use personalization for current content source
101  'usePersonalisation' => true,
102  //Array of fields which will be additionally request from Gentics Content Connector
103  //and used in personalisation checking algorithm
104  'personalisationFields' => array('permissions')
105  ),
106  //File System Content Renderer settings
107  'FileSystemContentSource' => array(
108  //folder which contained File System Content Renderer content
109  'contentFolder' => '/var/www/gPortal/DCR',
110  //If use personalization for current content source
111  'usePersonalisation' => true,
112  //Array of fields which will be additionally request from Gentics Content Connector
113  //and used in personalisation checking algorithm
114  'personalisationFields' => array('permissions')
115  ),
116  ),
117  'homePage' => 'Content.Node/index.html',
118  //the number of seconds in which the cached value will expire. 0 means never expire.
119  //used for caching content personalisation attributes and modification time
120  'cacheTime' => 60
121  ),
122  //tagcloud module
123  'tagcloud' => array(
124  //Component class
125  'class' => 'common.modules.tagcloud.tagcloudModule',
126  // cache life time in seconds
127  'cacheTime' => 60,
128  //default CMS page with personalizedOverview widget
129  'defaultOverviewPage' => '/Content.Node/testing/Overview.en.html',
130  //CMS pages with personalizedOverview widget per language
131  'overviewPages' => array(
132  'en' => '/Content.Node/testing/Overview.en.html',
133  'de' => '/Content.Node/testing/Overview.de.html',
134  ),
135  //String that will be used as tags separator
136  'tagsSeparator' => ', ',
137  //tagstyles. Array of styles for tags. Controls weights gradations and styles.
138  // So if 3 gradations defined - tags would be separated into 3 categories
139  //must be defined from most light(rare) to most heavy(frequent)
140  'tagstyles' => array(
141  'tagsize_1', //ex.: 10px
142  'tagsize_2', //ex.: 14px
143  'tagsize_3', //ex.: 16px
144  )
145  ),
146  'language' => array(
147  //array of used languages
148  'languages' => array(
149  'en' => 'en',
150  'de' => 'de'
151  )
152  ),
153  ),
154 
155 
156 
157 
158  //The application components (indexed by their IDs).
159  //detail config is in /components folder
160  'components' => array(
161 
162  'repositoryApi' => array(
163  'url' => 'http://localhost:8080',
164  'failover_urls' => array(
165  'http://gportal-devsssss-fscr-frontend.gentics.com:8080',
166  'http://10.0.1.9:8080'
167  ),
168  'additionalRequestParameters' => array(
169  'contentRepositorySearch' => array(
170  'filter' => 'object.node_id=="4"',
171  ),
172  'binaryContent' => array(
173  'filter' => 'object.node_id=="4"'
174  ),
175  'search' => array(
176  'filter' => 'node_id:4'
177  )
178  )
179  ),
180  'messages' => array(
181  //If true try to use dictionary files from custom section
182  'customI18n' => true,
183  ),
184  //Component for Yii::app()->user {@link RWebUser}
185  'user' => array(
186  ),
187  //Component manager of database connections
188  'db' => array(
189  'connectionString' => 'mysql:host=localhost;dbname=gportal', // 'connectionString' => 'mysql:host=localhost:42006;dbname=gportal',
190  'tablePrefix' => 'gportal_',
191  //DB username
192  'username' => 'root',
193  //DB Password
194  'password' => '',
195  //number of seconds that table metadata can remain valid in cache. 86400, 0 - disabled
196  'schemaCachingDuration' => 30,
197  //slave connection config is same as CDbConnection
198  'slaves' => array(
199  'slave1' => array(
200  'connectionString' => 'mysql:host=slave1;dbname=xxx',
201  'username' => 'root',
202  'password' => '********'
203  ),
204  ),
205  ),
206  //Cache settings
207  'cache' => array(
208  'servers' => array(
209  'server1' => array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 60),
210  ),
211  ),
212  'eauth' => array(
213  //Component class
214  'class' => 'common.extensions.eauth.EAuth',
215  // Use the popup window instead of redirecting.
216  'popup' => true,
217  //currenly using services for authentication /var/www/gportalapp
218  'services' => array(
219  'standard' => array(
220  'title' => 'With username/password'
221  ),
222  'google' => array(
223  'class' => 'site.common.modules.user.services.GoogleService',
224  'title' => 'Google open Id'
225  ),
226  'facebook' => array(
227  // application register at: https://developers.facebook.com/apps/
228  'title' => 'Facebook',
229  'class' => 'site.common.modules.user.services.FacebookService',
230  'client_id' => '310892639000191', //'330781883695574'
231  'client_secret' => '0bb580b40a8244a111d600e9088ecdb8', // 'ee246ffcf9e54b99cd6b92357b160009'
232  'scope' => 'email'
233  ),
234  )
235  ),
236  //
237  'errorHandler' => array(
238  'errorPages' => array(
239  'e400' => array(
240  'en' => '/site/error400',
241  ),
242  'e403' => array(
243  'en' => '/site/error403',
244  ),
245  'e404' => array(
246  'en' => '/Content.Node/error/404.en.html',
247  'de' => '/Content.Node/error/404.de.html'
248  )
249  )
250  )
251  ),
252 );
253 
254 if ( isset( $_GET['cssjs'] ) ) {
255 
256 if ( $_GET['cssjs'] == 'combinedcssonly' )
257  {
258  $client_config['components']['clientScript'] = array(
259  'disableRegisterFiles' => true,
260  //combine css files to single file
261  'combineCss' => true,
262  //compress css files
263  'compressCombinedCss' => false,
264 // //combine js files to single file
265  'combineJs' => false,
266 // //compress js files
267  'compressCombinedJs' => false
268  );
269  }
270 
271 if ( $_GET['cssjs'] == 'combinedandcompressedcss' )
272  {
273  $client_config['components']['clientScript'] = array(
274  'disableRegisterFiles' => true,
275  //combine css files to single file
276  'combineCss' => true,
277  //compress css files
278  'compressCombinedCss' => true,
279 // //combine js files to single file
280  'combineJs' => false,
281 // //compress js files
282  'compressCombinedJs' => false
283  );
284  }
285 
286 if ( $_GET['cssjs'] == 'combinedonly' )
287  {
288  $client_config['components']['clientScript'] = array(
289  'disableRegisterFiles' => true,
290  //combine css files to single file
291  'combineCss' => true,
292  //compress css files
293  'compressCombinedCss' => true,
294 // //combine js files to single file
295  'combineJs' => true,
296 // //compress js files
297  'compressCombinedJs' => false
298  );
299  }
300 
301 if ( $_GET['cssjs'] == 'combinedandcompressed' )
302  {
303  $client_config['components']['clientScript'] = array(
304  'disableRegisterFiles' => true,
305  //combine css files to single file
306  'combineCss' => true,
307  //compress css files
308  'compressCombinedCss' => true,
309 // //combine js files to single file
310  'combineJs' => true,
311 // //compress js files
312  'compressCombinedJs' => true
313  );
314  }
315 
316 }
317 if ( $_SERVER['HTTP_HOST'] == 'portaldemo.gentics.com' ) {
318  $client_config['components']['db'] = array (
319  'connectionString' => 'mysql:host=localhost:42006;dbname=gportal',
320  'tablePrefix' => 'gportal_',
321  //DB username
322  'username' => 'root',
323  //DB Password
324  'password' => '', // no pw
325  //number of seconds that table metadata can remain valid in cache. 86400, 0 - disabled
326  'schemaCachingDuration' => 300,
327  //slave connection config is same as CDbConnection
328  'slaves' => array(
329  ),
330  );
331  $client_config['components']['eauth'] = array(
332  //Component class
333  'class' => 'common.extensions.eauth.EAuth',
334  // Use the popup window instead of redirecting.
335  'popup' => true,
336  //currenly using services for authentication /var/www/gportalapp
337  'services' => array(
338  'standard' => array(
339  'title' => 'With username/password'
340  ),
341  'google' => array(
342  'class' => 'site.common.modules.user.services.GoogleService',
343  'title' => 'Google open Id'
344  ),
345  'facebook' => array(
346  // application register at: https://developers.facebook.com/apps/
347  'title' => 'Facebook',
348  'class' => 'site.common.modules.user.services.FacebookService',
349  'client_id' => '330781883695574',
350  'client_secret' => 'ee246ffcf9e54b99cd6b92357b160009',
351  'scope' => 'email'
352  )
353  )
354  );
355 
356 }
357 return $client_config;
358