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  'contentSource' => array(
81  //Current content renderer class
82  //Allowed values:
83  // - DynamicContentSource
84  // - FileSystemContentSource
85  'sourceClass' => 'DynamicContentSource',
86  //Content repository settings
87  'sourceSettings' => array(
88  //Dynamic Content Renderer settings
89  'DynamicContentSource' => array(
90  //folder into which content will be cached
91  'cacheFolder' => '/var/www/gPortal/DCR',
92  //If use personalization for current content source
93  'usePersonalisation' => true,
94  //Array of fields which will be additionally request from Gentics Content Connector
95  //and used in personalisation checking algorithm
96  'personalisationFields' => array('permissions')
97  ),
98  //File System Content Renderer settings
99  'FileSystemContentSource' => array(
100  //folder which contained File System Content Renderer content
101  'contentFolder' => '/var/www/gPortal/DCR',
102  //If use personalization for current content source
103  'usePersonalisation' => true,
104  //Array of fields which will be additionally request from Gentics Content Connector
105  //and used in personalisation checking algorithm
106  'personalisationFields' => array('permissions')
107  ),
108  ),
109  'homePage' => 'Content.Node/index.html',
110  //the number of seconds in which the cached value will expire. 0 means never expire.
111  //used for caching content personalisation attributes and modification time
112  'cacheTime' => 60
113  ),
114  //tagcloud module
115  'tagcloud' => array(
116  //Component class
117  'class' => 'common.modules.tagcloud.tagcloudModule',
118  // cache life time in seconds
119  'cacheTime' => 60,
120  //default CMS page with personalizedOverview widget
121  'defaultOverviewPage' => '/Content.Node/testing/Overview.en.html',
122  //CMS pages with personalizedOverview widget per language
123  'overviewPages' => array(
124  'en' => '/Content.Node/testing/Overview.en.html',
125  'de' => '/Content.Node/testing/Overview.de.html',
126  ),
127  //String that will be used as tags separator
128  'tagsSeparator' => ', ',
129  //tagstyles. Array of styles for tags. Controls weights gradations and styles.
130  // So if 3 gradations defined - tags would be separated into 3 categories
131  //must be defined from most light(rare) to most heavy(frequent)
132  'tagstyles' => array(
133  'tagsize_1', //ex.: 10px
134  'tagsize_2', //ex.: 14px
135  'tagsize_3', //ex.: 16px
136  )
137  ),
138  'language' => array(
139  //array of used languages
140  'languages' => array(
141  'en' => 'en',
142  'de' => 'de'
143  )
144  ),
145  ),
146 
147  //The application components (indexed by their IDs).
148  //detail config is in /components folder
149  'components' => array(
150  'repositoryApi' => array(
151  'url' => 'http://localhost:8080',
152  'failover_urls' => array(
153  'http://gportal-devsssss-fscr-frontend.gentics.com:8080',
154  'http://10.0.1.9:8080'
155  ),
156  'additionalRequestParameters' => array(
157  'contentRepositorySearch' => array(
158  'filter' => 'object.node_id=="4"',
159  ),
160  'binaryContent' => array(
161  'filter' => 'object.node_id=="4"'
162  ),
163  'search' => array(
164  'filter' => 'node_id:4'
165  )
166  )
167  ),
168  'messages' => array(
169  //If true try to use dictionary files from custom section
170  'customI18n' => true,
171  ),
172  //Component for Yii::app()->user {@link RWebUser}
173  'user' => array(
174  ),
175  //Component manager of database connections
176  'db' => array(
177  'connectionString' => 'mysql:host=localhost;dbname=gportal', // 'connectionString' => 'mysql:host=localhost:42006;dbname=gportal',
178  'tablePrefix' => 'gportal_',
179  //DB username
180  'username' => 'root',
181  //DB Password
182  'password' => 'smw99', // no pw
183  //number of seconds that table metadata can remain valid in cache. 86400, 0 - disabled
184  'schemaCachingDuration' => 30,
185  //slave connection config is same as CDbConnection
186  'slaves' => array(
187  'slave1' => array(
188  'connectionString' => 'mysql:host=slave1;dbname=xxx',
189  'username' => 'root',
190  'password' => '********'
191  ),
192  ),
193  ),
194  //Cache settings
195  'cache' => array(
196  'servers' => array(
197  'server1' => array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 60),
198  ),
199  ),
200  'eauth' => array(
201  //Component class
202  'class' => 'common.extensions.eauth.EAuth',
203  // Use the popup window instead of redirecting.
204  'popup' => true,
205  //currenly using services for authentication /var/www/gportalapp
206  'services' => array(
207  'standard' => array(
208  'title' => 'With username/password'
209  ),
210  'google' => array(
211  'class' => 'site.common.modules.user.services.GoogleService',
212  'title' => 'Google open Id'
213  ),
214  'facebook' => array(
215  // application register at: https://developers.facebook.com/apps/
216  'title' => 'Facebook',
217  'class' => 'site.common.modules.user.services.FacebookService',
218  'client_id' => '310892639000191', //'330781883695574'
219  'client_secret' => '0bb580b40a8244a111d600e9088ecdb8', // 'ee246ffcf9e54b99cd6b92357b160009'
220  'scope' => 'email'
221  ),
222  )
223  ),
224  //
225  'errorHandler' => array(
226  'errorPages' => array(
227  'e400' => array(
228  'en' => '/site/error400',
229  ),
230  'e403' => array(
231  'en' => '/site/error403',
232  ),
233  'e404' => array(
234  'en' => '/Content.Node/error/404.en.html',
235  'de' => '/Content.Node/error/404.de.html'
236  )
237  )
238  )
239  ),
240 );
241 
242 if ( isset( $_GET['cssjs'] ) ) {
243 
244 if ( $_GET['cssjs'] == 'combinedcssonly' )
245  {
246  $client_config['components']['clientScript'] = array(
247  'disableRegisterFiles' => true,
248  //combine css files to single file
249  'combineCss' => true,
250  //compress css files
251  'compressCombinedCss' => false,
252 // //combine js files to single file
253  'combineJs' => false,
254 // //compress js files
255  'compressCombinedJs' => false
256  );
257  }
258 
259 if ( $_GET['cssjs'] == 'combinedandcompressedcss' )
260  {
261  $client_config['components']['clientScript'] = array(
262  'disableRegisterFiles' => true,
263  //combine css files to single file
264  'combineCss' => true,
265  //compress css files
266  'compressCombinedCss' => true,
267 // //combine js files to single file
268  'combineJs' => false,
269 // //compress js files
270  'compressCombinedJs' => false
271  );
272  }
273 
274 if ( $_GET['cssjs'] == 'combinedonly' )
275  {
276  $client_config['components']['clientScript'] = array(
277  'disableRegisterFiles' => true,
278  //combine css files to single file
279  'combineCss' => true,
280  //compress css files
281  'compressCombinedCss' => true,
282 // //combine js files to single file
283  'combineJs' => true,
284 // //compress js files
285  'compressCombinedJs' => false
286  );
287  }
288 
289 if ( $_GET['cssjs'] == 'combinedandcompressed' )
290  {
291  $client_config['components']['clientScript'] = array(
292  'disableRegisterFiles' => true,
293  //combine css files to single file
294  'combineCss' => true,
295  //compress css files
296  'compressCombinedCss' => true,
297 // //combine js files to single file
298  'combineJs' => true,
299 // //compress js files
300  'compressCombinedJs' => true
301  );
302  }
303 
304 }
305 if ( $_SERVER['HTTP_HOST'] == 'portaldemo.gentics.com' ) {
306  $client_config['components']['db'] = array (
307  'connectionString' => 'mysql:host=localhost:42006;dbname=gportal',
308  'tablePrefix' => 'gportal_',
309  //DB username
310  'username' => 'root',
311  //DB Password
312  'password' => '', // no pw
313  //number of seconds that table metadata can remain valid in cache. 86400, 0 - disabled
314  'schemaCachingDuration' => 300,
315  //slave connection config is same as CDbConnection
316  'slaves' => array(
317  ),
318  );
319  $client_config['components']['eauth'] = array(
320  //Component class
321  'class' => 'common.extensions.eauth.EAuth',
322  // Use the popup window instead of redirecting.
323  'popup' => true,
324  //currenly using services for authentication /var/www/gportalapp
325  'services' => array(
326  'standard' => array(
327  'title' => 'With username/password'
328  ),
329  'google' => array(
330  'class' => 'site.common.modules.user.services.GoogleService',
331  'title' => 'Google open Id'
332  ),
333  'facebook' => array(
334  // application register at: https://developers.facebook.com/apps/
335  'title' => 'Facebook',
336  'class' => 'site.common.modules.user.services.FacebookService',
337  'client_id' => '330781883695574',
338  'client_secret' => 'ee246ffcf9e54b99cd6b92357b160009',
339  'scope' => 'email'
340  )
341  )
342  );
343 
344 }
345 return $client_config;
346