Cheetah
ChWsbTextModule.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbViews');
9 ch_import('ChWsbAlerts');
10 ch_import('ChWsbModule');
11 ch_import('ChWsbPaginate');
12 ch_import('ChWsbCategories');
13 ch_import('ChWsbRssFactory');
14 ch_import('ChWsbSubscription');
15 ch_import('ChWsbAdminSettings');
16 ch_import('ChTemplTagsModule');
17 ch_import('ChTemplCategoriesModule');
18 
19 
20 
22 {
25 
27  {
28  parent::__construct($aModule);
29 
30  $this->_oConfig->init($this->_oDb);
31  $this->_oTemplate->setModule($this);
32 
33  $sClassPrefix = $this->_oConfig->getClassPrefix();
34 
35  $sClassName = $sClassPrefix . 'Privacy';
36  $this->_oPrivacy = class_exists($sClassName) ? new $sClassName($this) : null;
37 
38  $sClassName = $sClassPrefix . 'Data';
39  $this->_oTextData = class_exists($sClassName) ? new $sClassName($this) : null;
40  }
41  function getBlockView($sUri)
42  {
43  $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
44  if(empty($aEntry) || !is_array($aEntry))
45  $this->_oTemplate->displayPageNotFound();
46 
47  $sModuleUri = $this->_oConfig->getUri();
48  $oView = new ChWsbViews($this->_oConfig->getViewsSystemName(), $aEntry['id']);
49  $oView->makeView();
50 
51  $this->_oTemplate->setPageTitle($aEntry['caption']);
52  $GLOBALS['oTopMenu']->setCustomSubHeader($aEntry['caption']);
53  $GLOBALS['oTopMenu']->setCustomSubHeaderUrl(CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aEntry['uri']);
54  $GLOBALS['oTopMenu']->setCustomBreadcrumbs(array(
55  _t('_' . $sModuleUri . '_top_menu_item') => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'index/',
56  $aEntry['caption'] => '')
57  );
58  return $this->_oTemplate->displayList(array(
59  'sample_type' => 'view',
60  'viewer_type' => $this->_oTextData->getViewerType(),
61  'uri' => $aEntry['uri']
62  ));
63  }
64  function getBlockComment($sUri)
65  {
66  $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
67  if(!$this->_oConfig->isCommentsEnabled() || !$this->_isCommentsAllowed($aEntry))
68  return '';
69 
70  $sModuleUri = $this->_oConfig->getUri();
71  if($aEntry['status'] != CH_TD_STATUS_ACTIVE)
72  return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
73 
74  $this->_oTemplate->addCss(array('cmts.css'));
75  $oComments = $this->_createObjectCmts($aEntry['id']);
76  return $oComments->getCommentsFirst('comment');
77  }
78  function getBlockVote($sUri)
79  {
80  $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
81  if(!$this->_oConfig->isVotesEnabled() || !$this->_isVotesAllowed($aEntry))
82  return '';
83 
84  $sModuleUri = $this->_oConfig->getUri();
85  if($aEntry['status'] != CH_TD_STATUS_ACTIVE)
86  return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
87 
88  $oVotes = $this->_createObjectVoting($aEntry['id']);
89  return $oVotes->getBigVoting();
90  }
91  function getBlockInfo($sUri)
92  {
93  $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
94  if(empty($aEntry) || !is_array($aEntry))
95  return '';
96 
97  return array($this->_oTemplate->displayBlockInfo($aEntry));
98  }
99  function getBlockAction($sUri)
100  {
101  $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
102 
103  $sModuleUri = $this->_oConfig->getUri();
104  $sModuleBaseUri = $this->_oConfig->getBaseUri();
105  if($aEntry['status'] != CH_TD_STATUS_ACTIVE)
106  return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
107 
108  $sModuleUri = $this->_oConfig->getUri();
110  $aButton = $oSubscription->getButton($this->getUserId(), $this->_oConfig->getSubscriptionsSystemName(), '', $aEntry['id']);
111 
112  $aReplacement['sbs_' . $sModuleUri . '_title'] = $aButton['title'];
113  $aReplacement['sbs_' . $sModuleUri . '_script'] = $aButton['script'];
114 
115  $aReplacement['del_' . $sModuleUri . '_title'] = '';
116  if($this->_isDeleteAllowed()) {
117  $this->_oTemplate->addJsTranslation(array('_' . $sModuleUri . '_msg_success_delete', '_' . $sModuleUri . '_msg_failed_delete'));
118 
119  $aReplacement['del_' . $sModuleUri . '_title'] = _t('_' . $sModuleUri . '_actions_delete');
120  $aReplacement['del_' . $sModuleUri . '_script'] = $this->_oConfig->getJsObject() . '.deleteEntry(' . $aEntry['id'] . ')';
121  }
122 
123  $aReplacement['share_' . $sModuleUri . '_title'] = '';
124  if($this->_isShareAllowed($aEntry)) {
125  $aReplacement['share_' . $sModuleUri . '_title'] = _t('_Share');
126  $aReplacement['share_' . $sModuleUri . '_script'] = "showPopupAnyHtml('" . $sModuleBaseUri . "share_popup/" . $aEntry['id'] . "')";
127  }
128 
129  return $oSubscription->getData() . $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $this->_oConfig->getActionsViewSystemName());
130  }
131  function getBlockSocialSharing($sUri)
132  {
133  $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
134  if(!$aEntry || $aEntry['status'] != CH_TD_STATUS_ACTIVE)
135  return '';
136 
137  $sUrl = CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aEntry['uri'];
138  $sTitle = $aEntry['caption'];
139 
140  ch_import('ChTemplSocialSharing');
142  return array($s, array(), array(), false);
143  }
144  function getCalendar($iYear = 0, $iMonth = 0)
145  {
146  $sClassName = $this->_oConfig->getClassPrefix() . 'Calendar';
147  return new $sClassName($iYear, $iMonth, $this->_oDb, $this->_oConfig);
148  }
149 
150  function getSearchResult()
151  {
152  $sClassName = $this->_oConfig->getClassPrefix() . 'SearchResult';
153  return new $sClassName($this);
154  }
155 
156  function getSearchContent($aRestrictions, $sUri, $iPage = 1, $iPerPage = 0)
157  {
158  $iPerPage = !empty($iPerPage) ? $iPerPage : $this->_oConfig->getPerPage();
159 
160  $sClassName = $this->_oConfig->getClassPrefix() . 'SearchResult';
161  $oSearchResult = new $sClassName($this);
162  foreach($aRestrictions as $sKey => $mixedValue)
163  if(is_array($mixedValue))
164  $oSearchResult->aCurrent['restriction'][$sKey] = $mixedValue;
165  else if(is_string($mixedValue))
166  $oSearchResult->aCurrent['restriction'][$sKey]['value'] = $mixedValue;
167  $oSearchResult->aCurrent['paginate']['forcePage'] = $iPage;
168  $oSearchResult->aCurrent['paginate']['perPage'] = $iPerPage;
169  $sCode = $oSearchResult->displayResultBlock();
170 
171  if(!empty($sCode)) {
172  $oPaginate = new ChWsbPaginate(array(
173  'page_url' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . $sUri . '{page}/{per_page}',
174  'count' => $oSearchResult->aCurrent['paginate']['totalNum'],
175  'per_page' => $iPerPage,
176  'page' => $iPage,
177  ));
178  $sCode .= $oPaginate->getPaginate();
179  }
180 
181  return $sCode;
182  }
183  function getCategoryContent($sCategory, $iPage = 1, $iPerPage = 0)
184  {
185  $sCategory = uri2title(process_db_input($sCategory, CH_TAGS_STRIP));
186  $iPage = (int)$iPage;
187  $iPerPage = (int)$iPerPage;
188 
189  $sCategoryDisplay = $GLOBALS['MySQL']->unescape($sCategory);
190  return array(
191  $sCategoryDisplay,
192  $this->getSearchContent(array('category' => $sCategory), 'category/' . title2uri($sCategoryDisplay) . '/', $iPage, $iPerPage)
193  );
194  }
195  function getTagContent($sTag = '', $iPage = 1, $iPerPage = 0)
196  {
197  $sTag = uri2title(process_db_input($sTag, CH_TAGS_STRIP));
198  $iPage = (int)$iPage;
199  $iPerPage = (int)$iPerPage;
200 
201  $sTagDisplay = $GLOBALS['MySQL']->unescape($sTag);
202  return array(
203  $sTagDisplay,
204  $this->getSearchContent(array('tag' => $sTag), 'tag/' . title2uri($sTagDisplay) . '/', $iPage, $iPerPage)
205  );
206  }
207  function getCalendarContent($iYear, $iMonth, $iDay, $iPage, $iPerPage)
208  {
209  $iYear = (int)$iYear;
210  $iMonth = (int)$iMonth;
211  $iDay = (int)$iDay;
212  $iPage = (int)$iPage;
213  $iPerPage = (int)$iPerPage;
214 
215  return $this->getSearchContent(
216  array(
217  'calendar-min' => array('value' => "UNIX_TIMESTAMP('" . $iYear . "-" . $iMonth . "-" . $iDay . " 00:00:00')", 'field' => 'when', 'operator' => '>=', 'no_quote_value' => true),
218  'calendar-max' => array('value' => "UNIX_TIMESTAMP('" . $iYear . "-" . $iMonth . "-" . $iDay . " 23:59:59')", 'field' => 'when', 'operator' => '<=', 'no_quote_value' => true),
219  ),
220  'calendar/' . $iYear . '/' . $iMonth . '/' . $iDay . '/',
221  $iPage,
222  $iPerPage
223  );
224  }
225 
229  function getSettingsForm($mixedResult)
230  {
231  $sUri = $this->_oConfig->getUri();
232 
233  $iId = (int)$this->_oDb->getOne("SELECT `ID` FROM `sys_options_cats` WHERE `name`='" . ucwords(str_replace('_', ' ', $sUri)) . "'");
234  if(empty($iId))
235  return MsgBox('_' . $sUri . '_msg_no_results');
236 
237  $oSettings = new ChWsbAdminSettings($iId, CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'admin');
238  $sResult = $oSettings->getForm();
239 
240  if($mixedResult !== true && !empty($mixedResult))
241  $sResult = $mixedResult . $sResult;
242 
243  return $sResult;
244  }
245  function setSettings($aData)
246  {
247  $sUri = $this->_oConfig->getUri();
248 
249  $iId = (int)$this->_oDb->getOne("SELECT `ID` FROM `sys_options_cats` WHERE `name`='" . ucwords(str_replace('_', ' ', $sUri)) . "'");
250  if(empty($iId))
251  return MsgBox(_t('_' . $sUri . '_msg_no_results'));
252 
254  return $oSettings->saveChanges($_POST);
255  }
256 
260  function servicePostBlock()
261  {
262  $aVariables = array(
263  'include_css' => $this->_oTemplate->addCss(array('post.css'), true),
264  'post_form' => $this->_oTextData->getPostForm()
265  );
266  return $this->_oTemplate->parseHtmlByName('post.html', $aVariables);
267  }
268  function serviceEditBlock($mixed)
269  {
270  if(is_string($mixed))
271  $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $mixed));
272  else if(is_int($mixed))
273  $aEntry = $this->_oDb->getEntries(array('sample_type' => 'id', 'id' => $mixed));
274 
275  $aVariables = array(
276  'include_css' => $this->_oTemplate->addCss(array('post.css'), true),
277  'post_form' => $this->_oTextData->getEditForm($aEntry)
278  );
279  return $this->_oTemplate->parseHtmlByName('post.html', $aVariables);
280  }
281  function serviceAdminBlock($iStart = 0, $iPerPage = 0, $sFilterValue = '')
282  {
283  if(empty($iPerPage))
284  $iPerPage = $this->_oConfig->getPerPage();
285 
286  return $this->_oTemplate->displayAdminBlock(array(
287  'sample_type' => 'admin',
288  'viewer_type' => $this->_oTextData->getViewerType(),
289  'start' => $iStart,
290  'count' => $iPerPage,
291  'admin_panel' => true,
292  'filter_value' => $sFilterValue,
293  'search_result_object' => $this->getSearchResult()
294  ));
295  }
296  function serviceArchiveBlockIndex($iStart = 0, $iPerPage = 0, $bShowEmpty = true)
297  {
298  if(empty($iPerPage))
299  $iPerPage = $this->_oConfig->getIndexNumber();
300 
301  return $this->serviceArchiveBlock($iStart, $iPerPage, $bShowEmpty);
302  }
303  function serviceArchiveBlockMember($iStart = 0, $iPerPage = 0, $bShowEmpty = true)
304  {
305  if(empty($iPerPage))
306  $iPerPage = $this->_oConfig->getMemberNumber();
307 
308  return $this->serviceArchiveBlock($iStart, $iPerPage, $bShowEmpty);
309  }
310  function serviceArchiveBlock($iStart = 0, $iPerPage = 0, $bShowEmpty = true)
311  {
312  if(empty($iPerPage))
313  $iPerPage = $this->_oConfig->getPerPage();
314 
315  return $this->_oTemplate->displayBlock(array(
316  'sample_type' => 'archive',
317  'viewer_type' => $this->_oTextData->getViewerType(),
318  'start' => $iStart,
319  'count' => $iPerPage,
320  'show_empty' => $bShowEmpty
321  ));
322  }
323  function serviceFeaturedBlockIndex($iStart = 0, $iPerPage = 0, $bShowEmpty = true)
324  {
325  if(empty($iPerPage))
326  $iPerPage = $this->_oConfig->getIndexNumber();
327 
328  return $this->serviceFeaturedBlock($iStart, $iPerPage, $bShowEmpty);
329  }
330  function serviceFeaturedBlockMember($iStart = 0, $iPerPage = 0, $bShowEmpty = true)
331  {
332  if(empty($iPerPage))
333  $iPerPage = $this->_oConfig->getMemberNumber();
334 
335  return $this->serviceFeaturedBlock($iStart, $iPerPage, $bShowEmpty);
336  }
337  function serviceFeaturedBlock($iStart = 0, $iPerPage = 0, $bShowEmpty = true)
338  {
339  if(empty($iPerPage))
340  $iPerPage = $this->_oConfig->getPerPage();
341 
342  return $this->_oTemplate->displayBlock(array(
343  'sample_type' => 'featured',
344  'viewer_type' => $this->_oTextData->getViewerType(),
345  'start' => $iStart,
346  'count' => $iPerPage,
347  'show_empty' => $bShowEmpty
348  ));
349  }
350  function serviceTopRatedBlock($iStart = 0, $iPerPage = 0)
351  {
352  if(empty($iPerPage))
353  $iPerPage = $this->_oConfig->getPerPage();
354 
355  return $this->_oTemplate->displayBlock(array(
356  'sample_type' => 'top_rated',
357  'viewer_type' => $this->_oTextData->getViewerType(),
358  'start' => $iStart,
359  'count' => $iPerPage
360  ));
361  }
362  function serviceCategoriesBlock($iBlockId)
363  {
364  $sUri = $this->_oConfig->getUri();
365  $oCategories = new ChTemplCategoriesModule(array('type' => $this->_oConfig->getCategoriesSystemName()), _t('_categ_users'), CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'category');
366 
367  return $oCategories->getBlockCode_Common($iBlockId, true);
368  }
369  function serviceTagsBlock($iBlockId)
370  {
371  $sUri = $this->_oConfig->getUri();
372  $oTags = new ChTemplTagsModule(array('type' => $this->_oConfig->getTagsSystemName(), 'orderby' => 'popular'), _t('_' . $sUri . '_bcaption_all_tags'), CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'tags');
373 
374  $aResult = $oTags->getBlockCode_All($iBlockId);
375  return $aResult[0];
376  }
377  function serviceGetCalendarBlock($iBlockID, $aParams = array())
378  {
379  $isMiniMode = isset($aParams['mini_mode']) && $aParams['mini_mode'] === true;
380  $sDynamicUrl = isset($aParams['dynamic_url']) ? $aParams['dynamic_url'] : CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'index/';
381 
382  $aDateParams = array();
383  $sDate = ch_get('date');
384  if($sDate) {
385  $aDateParams = explode('/', $sDate);
386  }
387 
388  $oCalendar = $this->_createObjectCalendar((int)$aDateParams[0], (int)$aDateParams[1]);
389  $oCalendar->setBlockId($iBlockID);
390  $oCalendar->setDynamicUrl($sDynamicUrl);
391 
392  return $oCalendar->display($isMiniMode);
393  }
394  function servicePopularBlock($iStart = 0, $iPerPage = 0)
395  {
396  if(empty($iPerPage))
397  $iPerPage = $this->_oConfig->getPerPage();
398 
399  return $this->_oTemplate->displayBlock(array(
400  'sample_type' => 'popular',
401  'viewer_type' => $this->_oTextData->getViewerType(),
402  'start' => $iStart,
403  'count' => $iPerPage
404  ));
405  }
406  function serviceGetSubscriptionParams($sUnit, $sAction, $iObjectId)
407  {
408  $sUnit = str_replace('ch_', '', $sUnit);
409  if(empty($sAction))
410  $sAction = 'main';
411 
412  $aItem = $this->_oDb->getEntries(array('sample_type' => 'id', 'id' => $iObjectId));
413 
414  return array(
415  'template' => array(
416  'Subscription' => _t('_' . $sUnit . '_sbs_' . $sAction, $aItem['caption']),
417  'ViewLink' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aItem['uri']
418  )
419  );
420  }
421 
425  function actionRss($iLength = 0, $sType = 'archive')
426  {
427  $iLength = $iLength != 0 ? $iLength : (int)$this->_oConfig->getRssLength();
428 
429  $aEntries = $this->_oDb->getEntries(array(
430  'sample_type' => $sType,
431  'viewer_type' => $this->_oTextData->getViewerType(),
432  'start' => 0,
433  'count' => $iLength
434  ));
435 
436  $aRssData = array();
437  $sRssViewUrl = CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/';
438  foreach($aEntries as $aEntry) {
439  if(empty($aEntry['caption'])) continue;
440 
441  $aRssData[$aEntry['id']] = array(
442  'UnitID' => $aEntry['id'],
443  'OwnerID' => $aEntry['id'],
444  'UnitTitle' => $aEntry['caption'],
445  'UnitLink' => $sRssViewUrl . $aEntry['uri'],
446  'UnitDesc' => $aEntry['content'],
447  'UnitDateTimeUTS' => $aEntry['when_uts'],
448  'UnitIcon' => ''
449  );
450  }
451 
452  $oRss = new ChWsbRssFactory();
453  $oRss->SetRssHeader();
454  if($sType == 'archive') {
455  return $oRss->GenRssByData($aRssData, _t('_news_rss_caption'), $this->_oConfig->getBaseUri() . 'act_rss/');
456  } else {
457  return $oRss->GenRssByData($aRssData, _t('_news_rss_caption'), $this->_oConfig->getBaseUri() . 'act_rss/' . $iLength . '/' . $sType . '/');
458  }
459  }
460  function actionGetEntries($sSampleType = 'all', $iStart = 0, $iPerPage = 0)
461  {
462  check_logged();
463 
464  if(empty($iPerPage))
465  $iPerPage = $this->_oConfig->getPerPage();
466 
467  return $this->_oTemplate->displayList(array(
468  'sample_type' => $sSampleType,
469  'sample_params' => isset($_POST['params']) ? unserialize(urldecode($_POST['params'])) : '',
470  'viewer_type' => $this->_oTextData->getViewerType(),
471  'start' => $iStart,
472  'count' => $iPerPage,
473  'filter_value' => isset($_POST['filter_value']) ? process_db_input($_POST['filter_value'], CH_TAGS_STRIP) : ''
474  ));
475  }
477  {
478  $iId = (int)$_POST['id'];
479 
480  return !empty($iId) ? $this->_actFeatured($iId) : false;
481  }
482  function actionPublish()
483  {
484  $iId = (int)$_POST['id'];
485 
486  return !empty($iId) ? $this->_actPublish($iId) : false;
487  }
488  function actionDelete()
489  {
490  $iId = (int)$_POST['id'];
491 
492  return !empty($iId) ? $this->_actDelete($iId) : false;
493  }
494  function actionSharePopup($iEntry)
495  {
496  header('Content-type:text/html;charset=utf-8');
497 
498  $sUri = $this->_oConfig->getUri();
499  $aEntry = $this->_oDb->getEntries(array('sample_type' => 'id', 'id' => (int)$iEntry));
500  if(!$aEntry) {
501  echo MsgBox(_t('_' . $sUri . '_msg_no_results'));
502  exit;
503  }
504 
505  $sEntryUrl = CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aEntry['uri'];
506 
507  require_once (CH_DIRECTORY_PATH_INC . "shared_sites.inc.php");
508  echo getSitesHtml($sEntryUrl);
509  exit;
510  }
511  function actionArchive($iStart = 0, $iPerPage = 0)
512  {
513  $sUri = $this->_oConfig->getUri();
514 
515  $aParams = array(
516  'title' => array(
517  'page' => _t('_' . $sUri . '_pcaption_archive'),
518  'block' => _t('_' . $sUri . '_bcaption_archive')
519  ),
520  'content' => array(
521  'page_main_code' => $this->serviceArchiveBlock((int)$iStart, (int)$iPerPage)
522  )
523  );
524  $this->_oTemplate->getPageCode($aParams);
525  }
526  function actionPopular()
527  {
528  $sUri = $this->_oConfig->getUri();
529 
530  $aParams = array(
531  'title' => array(
532  'page' => _t('_' . $sUri . '_pcaption_popular'),
533  'block' => _t('_' . $sUri . '_bcaption_popular')
534  ),
535  'content' => array(
536  'page_main_code' => $this->servicePopularBlock()
537  )
538  );
539  $this->_oTemplate->getPageCode($aParams);
540  }
541  function actionTop()
542  {
543  $sUri = $this->_oConfig->getUri();
544 
545  $aParams = array(
546  'title' => array(
547  'page' => _t('_' . $sUri . '_pcaption_top_rated'),
548  'block' => _t('_' . $sUri . '_bcaption_top_rated')
549  ),
550  'content' => array(
551  'page_main_code' => $this->serviceTopRatedBlock()
552  )
553  );
554  $this->_oTemplate->getPageCode($aParams);
555  }
556  function actionCalendar($iYear = 0, $iMonth = 0, $iDay = 0, $iStart = 1, $iPerPage = 0)
557  {
558  $sUri = $this->_oConfig->getUri();
559 
560  $iArgs = func_num_args();
561  if($iArgs == 1 && is_string($iYear))
562  $iArgs = 0;
563 
564  $sContent = '';
565  switch($iArgs) {
566  case 0:
567  case 2:
568  $oCalendar = $this->getCalendar((int)$iYear, (int)$iMonth);
569  $sContent = $oCalendar->display();
570  break;
571  case 3:
572  case 5:
573  $sContent = $this->getCalendarContent((int)$iYear, (int)$iMonth, (int)$iDay, (int)$iStart, (int)$iPerPage);
574  $sContent = strlen($sContent) > 0 ? $sContent : _t('_' . $sUri . '_msg_no_results');
575  break;
576  }
577 
578  $sBlockTitle = !$iDay
579  ? _t('_' . $sUri . '_bcaption_calendar')
580  : _t('_' . $sUri . '_bcaption_calendar_browse') . ': ' . getLocaleDate(
581  strtotime("{$iYear}-{$iMonth}-{$iDay}"), CH_WSB_LOCALE_DATE_SHORT);
582 
583  $sPageTitle = !$iDay
584  ? _t('_' . $sUri . '_pcaption_calendar')
585  : $sBlockTitle;
586 
587  $aParams = array(
588  'title' => array(
589  'page' => $sPageTitle,
590  'block' => $sBlockTitle,
591  ),
592  'content' => array(
593  'page_main_code' => $sContent
594  )
595  );
596  $this->_oTemplate->getPageCode($aParams);
597  }
598  function actionCategories()
599  {
600  $sUri = $this->_oConfig->getUri();
601  $oCategories = new ChTemplCategoriesModule(array('type' => $this->_oConfig->getCategoriesSystemName()), _t('_categ_users'), CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'categories');
602 
603  $aParams = array(
604  'index' => 1,
605  'css' => array('view.css'),
606  'title' => array(
607  'page' => _t('_' . $sUri . '_pcaption_categories')
608  ),
609  'content' => array(
610  'page_main_code' => $oCategories->getCode()
611  )
612  );
613  $this->_oTemplate->getPageCode($aParams);
614  }
615  function actionCategory($sCategory = '', $iPage = 1, $iPerPage = 0)
616  {
617  $sUri = $this->_oConfig->getUri();
618  $sBaseUri = CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri();
619 
620  $sContent = MsgBox(_t('_' . $sUri . '_msg_no_results'));
621  if(!empty($sCategory))
622  list($sCategoryDisplay, $sContent) = $this->getCategoryContent($sCategory, $iPage, $iPerPage);
623 
624  $aParams = array(
625  'css' => array('view.css'),
626  'title' => array(
627  'page' => _t('_' . $sUri . '_pcaption_category', $sCategoryDisplay),
628  'block' => _t('_' . $sUri . '_bcaption_category', $sCategoryDisplay)
629  ),
630  'breadcrumb' => array(
631  _t('_' . $sUri . '_top_menu_item') => $sBaseUri . 'home/',
632  _t('_' . $sUri . '_categories_top_menu_sitem') => $sBaseUri . 'categories/',
633  $sCategoryDisplay => ''
634  ),
635  'content' => array(
636  'page_main_code' => $sContent
637  )
638  );
639  $this->_oTemplate->getPageCode($aParams);
640  }
641  function actionTags()
642  {
643  $sUri = $this->_oConfig->getUri();
644  $oTags = new ChTemplTagsModule(array('type' => $this->_oConfig->getTagsSystemName(), 'orderby' => 'popular'), _t('_' . $sUri . '_bcaption_all_tags'), CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'tags');
645 
646  $aParams = array(
647  'index' => 1,
648  'css' => array('view.css'),
649  'title' => array(
650  'page' => _t('_' . $sUri . '_pcaption_tags')
651  ),
652  'content' => array(
653  'page_main_code' => $oTags->getCode()
654  )
655  );
656  $this->_oTemplate->getPageCode($aParams);
657  }
658  function actionTag($sTag = '', $iPage = 1, $iPerPage = 0)
659  {
660  $sUri = $this->_oConfig->getUri();
661  $sBaseUri = CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri();
662 
663  $sContent = MsgBox(_t('_' . $sUri . '_msg_no_results'));
664  if(!empty($sTag))
665  list($sTagDisplay, $sContent) = $this->getTagContent($sTag, $iPage, $iPerPage);
666 
667  $aParams = array(
668  'css' => array('view.css'),
669  'title' => array(
670  'page' => _t('_' . $sUri . '_pcaption_tag', $sTagDisplay),
671  'block' => _t('_' . $sUri . '_bcaption_tag', $sTagDisplay)
672  ),
673  'breadcrumb' => array(
674  _t('_' . $sUri . '_top_menu_item') => $sBaseUri . 'home/',
675  _t('_' . $sUri . '_tags_top_menu_sitem') => $sBaseUri . 'tags/',
676  $sTagDisplay => ''
677  ),
678  'content' => array(
679  'page_main_code' => $sContent
680  )
681  );
682  $this->_oTemplate->getPageCode($aParams);
683  }
684  function actionFeatured()
685  {
686  $sUri = $this->_oConfig->getUri();
687 
688  $aParams = array(
689  'title' => array(
690  'page' => _t('_' . $sUri . '_pcaption_featured'),
691  'block' => _t('_' . $sUri . '_bcaption_featured')
692  ),
693  'content' => array(
694  'page_main_code' => $this->serviceFeaturedBlock()
695  )
696  );
697  $this->_oTemplate->getPageCode($aParams);
698  }
699  function actionHome()
700  {
701  $this->actionIndex();
702  }
703  function actionIndex()
704  {
705  $sUri = $this->_oConfig->getUri();
706  $oPage = ch_instance($this->_oConfig->getClassPrefix() . 'PageMain', array($this), $this->_aModule);
707 
708  $aParams = array(
709  'index' => 1,
710  'css' => array('view.css', 'cmts.css'),
711  'title' => array(
712  'page' => _t('_' . $sUri . '_pcaption_home')
713  ),
714  'content' => array(
715  'page_main_code' => $oPage->getCode()
716  )
717  );
718  $this->_oTemplate->getPageCode($aParams);
719  }
720  function actionView($sName)
721  {
722  $sUri = $this->_oConfig->getUri();
723  $oPage = ch_instance($this->_oConfig->getClassPrefix() . 'PageView', array($sName, $this), $this->_aModule);
724 
725  $aParams = array(
726  'index' => 1,
727  'js' => array('main.js'),
728  'css' => array('view.css', 'cmts.css'),
729  'content' => array(
730  'page_main_code' => $this->_oTemplate->getViewJs(true) . $oPage->getCode()
731  )
732  );
733  $this->_oTemplate->getPageCode($aParams);
734  }
735  function actionAdmin($sName = '')
736  {
737  $GLOBALS['iAdminPage'] = 1;
738  require_once(CH_DIRECTORY_PATH_INC . 'admin_design.inc.php');
739 
740  $sUri = $this->_oConfig->getUri();
741 
742  check_logged();
743  if(!@isAdmin()) {
745  login_form("", 1);
746  exit;
747  }
748 
749  //--- Process actions ---//
751  if(isset($_POST['save']) && isset($_POST['cat'])) {
752  $mixedResultSettings = $this->setSettings($_POST);
753  }
754 
755  if(isset($_POST[$sUri . '-publish']))
756  $this->_actPublish($_POST[$sUri . '-ids'], true);
757  else if(isset($_POST[$sUri . '-unpublish']))
758  $this->_actPublish($_POST[$sUri . '-ids'], false);
759  else if(isset($_POST[$sUri . '-featured']))
760  $this->_actFeatured($_POST[$sUri . '-ids'], true);
761  else if(isset($_POST[$sUri . '-unfeatured']))
762  $this->_actFeatured($_POST[$sUri . '-ids'], false);
763  else if(isset($_POST[$sUri . '-delete']))
764  $this->_actDelete($_POST[$sUri . '-ids']);
765  //--- Process actions ---//
766 
767  //--- Get New/Edit form ---//
768  $sPostForm = '';
769  if(!empty($sName))
770  $sPostForm = $this->serviceEditBlock(process_db_input($sName, CH_TAGS_STRIP));
771  else if(isset($_POST['id']))
772  $sPostForm = $this->serviceEditBlock((int)$_POST['id']);
773  else
774  $sPostForm = $this->servicePostBlock();
775  //--- Get New/Edit form ---//
776 
777  $sFilterValue = '';
778  if(isset($_GET[$sUri . '-filter']))
779  $sFilterValue = process_db_input($_GET[$sUri . '-filter'], CH_TAGS_STRIP);
780 
781  $sContent = DesignBoxAdmin(_t('_' . $sUri . '_bcaption_settings'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $this->getSettingsForm($mixedResultSettings))));
782  $sContent .= DesignBoxAdmin(_t('_' . $sUri . '_bcaption_post'), $sPostForm);
783  $sContent .= DesignBoxAdmin(_t('_' . $sUri . '_bcaption_all'), $this->serviceAdminBlock(0, 0, $sFilterValue));
784 
785  $aParams = array(
786  'title' => array(
787  'page' => _t('_' . $sUri . '_pcaption_admin')
788  ),
789  'content' => array(
790  'page_main_code' => $sContent
791  )
792  );
793  $this->_oTemplate->getPageCodeAdmin($aParams);
794  }
795 
800  {
801  $sUri = $this->_oConfig->getUri();
802 
803  $iPerPage = 10;
804  $iPage = (int)$iPage;
805  if ($iPage < 1)
806  $iPage = 1;
807 
808  ch_import('ChWsbMobileTemplate');
809  $oMobileTemplate = new ChWsbMobileTemplate($this->_oConfig, $this->_oDb);
810  $oMobileTemplate->pageStart();
811 
812  $sCaption = _t('_' . $sUri . '_bcaption_latest');
813 
814  $aParams = array(
815  'sample_type' => 'archive',
816  'sample_params' => '',
817  'viewer_type' => $this->_oTextData->getViewerType(),
818  'start' => ($iPage - 1) * $iPerPage,
819  'count' => $iPerPage,
820  'filter_value' => '',
821  );
822  $iTotalCount = $this->_oDb->getCount($aParams);
823  $aEntries = $iTotalCount ? $this->_oDb->getEntries($aParams) : array();
824 
825  if (empty($aEntries)) {
826  $oMobileTemplate->displayNoData($sCaption);
827  return;
828  }
829 
830  foreach ($aEntries as $aEntry) {
831  $aVars = array (
832  'content' => '<h2>' . $aEntry['caption'] . '</h2>' . getLocaleDate($aEntry['when_uts'], CH_WSB_LOCALE_DATE),
833  'url' => ch_js_string(CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'mobile_entry/' . $aEntry['id']),
834  );
835  echo $oMobileTemplate->parseHtmlByName('mobile_row.html', $aVars);
836  }
837 
838  ch_import('ChWsbPaginate');
839  $oPaginate = new ChWsbPaginate(array(
840  'page_url' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'mobile_latest_entries/{page}',
841  'count' => $iTotalCount,
842  'per_page' => $iPerPage,
843  'page' => $iPage,
844  ));
845  echo $oPaginate->getMobilePaginate();
846 
847  $oMobileTemplate->pageCode($sCaption, false);
848  }
849 
854  {
855  ch_import('ChWsbMobileTemplate');
856  $oMobileTemplate = new ChWsbMobileTemplate($this->_oConfig, $this->_oDb);
857  $oMobileTemplate->pageStart();
858 
859  $aParams = array(
860  'sample_type' => 'id',
861  'id' => (int)$iId,
862  );
863  $aEntry = $this->_oDb->getEntries($aParams);
864 
865  if (empty($aEntry)) {
866  $oMobileTemplate->displayPageNotFound();
867  return;
868  }
869 
870  echo '<h1>' . $aEntry['caption'] . '</h1>';
871  echo getLocaleDate($aEntry['when_uts'], CH_WSB_LOCALE_DATE);
872  echo $aEntry['content'];
873 
874  $oMobileTemplate->pageCode($aEntry['caption']);
875  }
876 
880  function _actFeatured($aIds, $bPositive = true)
881  {
882  if(!isAdmin())
883  return false;
884 
885  if(is_int($aIds) || is_string($aIds))
886  $aIds = array((int)$aIds);
887 
888  $bResult = $this->_oDb->updateEntry($aIds, array('featured' => ($bPositive ? 1 : 0)));
889  if($bResult)
890  foreach($aIds as $iId) {
891  //--- Entry -> Featured for Alerts Engine ---//
892  ch_import('ChWsbAlerts');
893  $oAlert = new ChWsbAlerts($this->_oConfig->getAlertsSystemName(), 'featured', $iId, ChWsbTextData::getAuthorId());
894  $oAlert->alert();
895  //--- Entry -> Featured for Alerts Engine ---//
896  }
897 
898  return $bResult;
899  }
900  function _actPublish($aIds, $bPositive = true)
901  {
902  if(!isAdmin())
903  return false;
904 
905  if(is_int($aIds) || is_string($aIds))
906  $aIds = array((int)$aIds);
907 
908  $bResult = $this->_oDb->updateEntry($aIds, array('status' => ($bPositive ? CH_TD_STATUS_ACTIVE : CH_TD_STATUS_INACTIVE)));
909  if($bResult)
910  foreach($aIds as $iId) {
911  //--- Entry -> Publish/Unpublish for Alerts Engine ---//
912  $oAlert = new ChWsbAlerts($this->_oConfig->getAlertsSystemName(), ($bPositive ? 'publish' : 'unpublish'), $iId, ChWsbTextData::getAuthorId());
913  $oAlert->alert();
914  //--- Entry -> Publish/Unpublish for Alerts Engine ---//
915 
916  //--- Reparse Global Tags ---//
917  $oTags = new ChWsbTags();
918  $oTags->reparseObjTags($this->_oConfig->getTagsSystemName(), $iId);
919  //--- Reparse Global Tags ---//
920 
921  //--- Reparse Global Categories ---//
922  $oCategories = new ChWsbCategories();
923  $oCategories->reparseObjTags($this->_oConfig->getCategoriesSystemName(), $iId);
924  //--- Reparse Global Categories ---//
925  }
926 
927  return $bResult;
928  }
929  function _actDelete($aIds)
930  {
931  if(!$this->_isDeleteAllowed(true))
932  return false;
933 
934  if(is_int($aIds) || is_string($aIds))
935  $aIds = array((int)$aIds);
936 
937  $bResult = $this->_oDb->deleteEntries($aIds);
938  if($bResult) {
939  $oTags = new ChWsbTags();
940  $oCategories = new ChWsbCategories();
942 
943  foreach($aIds as $iId) {
944  //--- Entry -> Delete for Alerts Engine ---//
945  $oAlert = new ChWsbAlerts($this->_oConfig->getAlertsSystemName(), 'delete', $iId, ChWsbTextData::getAuthorId());
946  $oAlert->alert();
947  //--- Entry -> Delete for Alerts Engine ---//
948 
949  //--- Reparse Global Tags ---//
950  $oTags->reparseObjTags($this->_oConfig->getTagsSystemName(), $iId);
951  //--- Reparse Global Tags ---//
952 
953  //--- Reparse Global Categories ---//
954  $oCategories->reparseObjTags($this->_oConfig->getCategoriesSystemName(), $iId);
955  //--- Reparse Global Categories ---//
956 
957  //--- Remove all subscriptions ---//
958  $oSubscription->unsubscribe(array('type' => 'object_id', 'unit' => $this->_oConfig->getSubscriptionsSystemName(), 'object_id' => $iId));
959  //--- Remove all subscriptions ---//
960  }
961  }
962  return $bResult;
963  }
964  function _isCommentsAllowed(&$aEntry)
965  {
966  return true;
967  }
968  function _isVotesAllowed(&$aEntry)
969  {
970  return true;
971  }
972  function _isShareAllowed(&$aEntry)
973  {
974  return true;
975  }
976 }
process_db_input
process_db_input($sText, $iStripTags=0)
Definition: utils.inc.php:256
header
</code > Be careful enabling this directive if you have a redirector script that does not use the< code > Location</code > HTTP header
Definition: URI.MungeResources.txt:10
CH_WSB_LOCALE_DATE
const CH_WSB_LOCALE_DATE
Definition: utils.inc.php:16
$oSettings
$oSettings
Definition: advanced_settings.php:20
ChWsbTextModule\_isVotesAllowed
_isVotesAllowed(&$aEntry)
Definition: ChWsbTextModule.php:968
ChWsbSocialSharing\getInstance
static getInstance()
Definition: ChWsbSocialSharing.php:50
ChWsbTextModule\_isShareAllowed
_isShareAllowed(&$aEntry)
Definition: ChWsbTextModule.php:972
ChWsbTextModule\$_oPrivacy
$_oPrivacy
Definition: ChWsbTextModule.php:24
ChTemplTagsModule
Definition: ChTemplTagsModule.php:11
$sPageTitle
$sPageTitle
Definition: antispam.php:374
ChWsbTextModule\actionArchive
actionArchive($iStart=0, $iPerPage=0)
Definition: ChWsbTextModule.php:511
MsgBox
MsgBox($sText, $iTimer=0)
Definition: design.inc.php:175
check_logged
check_logged()
Definition: admin.inc.php:238
ChWsbTextModule\actionHome
actionHome()
Definition: ChWsbTextModule.php:699
ch_js_string
ch_js_string($mixedInput, $iQuoteType=CH_ESCAPE_STR_AUTO)
Definition: utils.inc.php:1294
ChWsbTextData\getAuthorId
static getAuthorId()
Definition: ChWsbTextData.php:283
$sCode
$sCode
Definition: explanation.php:19
$sResult
$sResult
Definition: advanced_settings.php:26
ChWsbModule\getUserId
getUserId()
Definition: ChWsbModule.php:122
$aModule
$aModule
Definition: classifieds.php:21
ChWsbTextModule\getCalendar
getCalendar($iYear=0, $iMonth=0)
Definition: ChWsbTextModule.php:144
ChWsbTextModule\actionIndex
actionIndex()
Definition: ChWsbTextModule.php:703
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
$aResult
$aResult
Definition: index.php:19
ch_get
ch_get($sName)
Definition: utils.inc.php:1664
$oAlert
$oAlert
Definition: embed.php:15
ChWsbTextModule\serviceArchiveBlockMember
serviceArchiveBlockMember($iStart=0, $iPerPage=0, $bShowEmpty=true)
Definition: ChWsbTextModule.php:303
ChWsbTextModule\actionPublish
actionPublish()
Definition: ChWsbTextModule.php:482
ChWsbTextModule\actionFeatured
actionFeatured()
Definition: ChWsbTextModule.php:684
uri2title
uri2title($sValue)
Definition: utils.inc.php:51
$sUrl
$sUrl
Definition: cart.php:15
php
ChWsbTextModule\actionCategories
actionCategories()
Definition: ChWsbTextModule.php:598
ChWsbTags
Definition: ChWsbTags.php:15
$iId
$iId
Definition: license.php:15
login_form
login_form($text="", $member=0, $bAjaxMode=false, $sLoginFormParams='')
Definition: admin.inc.php:13
ChWsbTextModule\getSettingsForm
getSettingsForm($mixedResult)
Definition: ChWsbTextModule.php:229
ChWsbTextModule\getCategoryContent
getCategoryContent($sCategory, $iPage=1, $iPerPage=0)
Definition: ChWsbTextModule.php:183
ChWsbTextModule\actionTop
actionTop()
Definition: ChWsbTextModule.php:541
$oPage
$oPage
Definition: search_home.php:83
send_headers_page_changed
send_headers_page_changed()
Definition: design.inc.php:99
ChWsbTextModule\serviceTagsBlock
serviceTagsBlock($iBlockId)
Definition: ChWsbTextModule.php:369
ChWsbSubscription\getInstance
static getInstance()
Definition: ChWsbSubscription.php:67
ChWsbTextModule\getBlockSocialSharing
getBlockSocialSharing($sUri)
Definition: ChWsbTextModule.php:131
ChWsbTextModule\serviceTopRatedBlock
serviceTopRatedBlock($iStart=0, $iPerPage=0)
Definition: ChWsbTextModule.php:350
ChTemplCategoriesModule
Definition: ChTemplCategoriesModule.php:11
$iPerPage
else $iPerPage
Definition: browse.php:61
ChWsbCategories
Definition: ChWsbCategories.php:13
ChWsbTextModule\serviceFeaturedBlockIndex
serviceFeaturedBlockIndex($iStart=0, $iPerPage=0, $bShowEmpty=true)
Definition: ChWsbTextModule.php:323
ChWsbTextModule\servicePostBlock
servicePostBlock()
Definition: ChWsbTextModule.php:260
ChWsbTextModule\_actDelete
_actDelete($aIds)
Definition: ChWsbTextModule.php:929
isAdmin
isAdmin()
Definition: index.php:649
ChWsbTextModule\actionGetEntries
actionGetEntries($sSampleType='all', $iStart=0, $iPerPage=0)
Definition: ChWsbTextModule.php:460
ChWsbTextModule\serviceGetSubscriptionParams
serviceGetSubscriptionParams($sUnit, $sAction, $iObjectId)
Definition: ChWsbTextModule.php:406
ChWsbMobileTemplate
Definition: ChWsbMobileTemplate.php:11
ChWsbTextModule\actionCategory
actionCategory($sCategory='', $iPage=1, $iPerPage=0)
Definition: ChWsbTextModule.php:615
ChWsbTextModule\getSearchContent
getSearchContent($aRestrictions, $sUri, $iPage=1, $iPerPage=0)
Definition: ChWsbTextModule.php:156
DesignBoxAdmin
DesignBoxAdmin($sTitle, $sContent, $mixedTopItems='', $sBottomItems='', $iIndex=1)
Definition: admin_design.inc.php:50
ChWsbAlerts
Definition: ChWsbAlerts.php:39
ChWsbTextModule\getBlockView
getBlockView($sUri)
Definition: ChWsbTextModule.php:41
ChWsbTextModule\getBlockAction
getBlockAction($sUri)
Definition: ChWsbTextModule.php:99
getSitesHtml
getSitesHtml($sLink, $sTitle=false)
Definition: shared_sites.inc.php:37
exit
exit
Definition: cart.php:21
$sType
$sType
Definition: actions.inc.php:11
$_GET
$_GET['debug']
Definition: index.php:67
ChWsbTextModule\getBlockVote
getBlockVote($sUri)
Definition: ChWsbTextModule.php:78
ChWsbTextModule\serviceAdminBlock
serviceAdminBlock($iStart=0, $iPerPage=0, $sFilterValue='')
Definition: ChWsbTextModule.php:281
ChWsbTextModule\setSettings
setSettings($aData)
Definition: ChWsbTextModule.php:245
ChWsbRssFactory
Definition: ChWsbRssFactory.php:9
ChWsbTextModule\_isCommentsAllowed
_isCommentsAllowed(&$aEntry)
Definition: ChWsbTextModule.php:964
ChWsbTextModule\actionMobileEntry
actionMobileEntry($iId)
Definition: ChWsbTextModule.php:853
$sTitle
$sTitle
Definition: actions.inc.php:13
ChWsbTextModule\getTagContent
getTagContent($sTag='', $iPage=1, $iPerPage=0)
Definition: ChWsbTextModule.php:195
ChWsbTextModule\actionCalendar
actionCalendar($iYear=0, $iMonth=0, $iDay=0, $iStart=1, $iPerPage=0)
Definition: ChWsbTextModule.php:556
ChWsbTextModule\serviceCategoriesBlock
serviceCategoriesBlock($iBlockId)
Definition: ChWsbTextModule.php:362
ChWsbTextModule\actionDelete
actionDelete()
Definition: ChWsbTextModule.php:488
CH_TD_STATUS_INACTIVE
const CH_TD_STATUS_INACTIVE
Definition: ChWsbTextData.php:13
title2uri
title2uri($sValue)
Definition: utils.inc.php:42
ChWsbViews
Definition: ChWsbViews.php:38
ChWsbTextModule\getBlockInfo
getBlockInfo($sUri)
Definition: ChWsbTextModule.php:91
ch_instance
ch_instance($sClassName, $aParams=array(), $aModule=array())
Definition: utils.inc.php:1264
ChWsbTextModule\servicePopularBlock
servicePopularBlock($iStart=0, $iPerPage=0)
Definition: ChWsbTextModule.php:394
ChWsbPaginate
Definition: ChWsbPaginate.php:69
ChWsbTextModule\actionView
actionView($sName)
Definition: ChWsbTextModule.php:720
ChWsbModule
Definition: ChWsbModule.php:41
$bResult
$bResult
Definition: get_file.php:11
$sContent
$sContent
Definition: bottom_menu_compose.php:169
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
ChWsbTextModule\serviceArchiveBlockIndex
serviceArchiveBlockIndex($iStart=0, $iPerPage=0, $bShowEmpty=true)
Definition: ChWsbTextModule.php:296
CH_WSB_LOCALE_DATE_SHORT
const CH_WSB_LOCALE_DATE_SHORT
Definition: utils.inc.php:15
ChWsbTextModule\__construct
__construct($aModule)
Definition: ChWsbTextModule.php:26
ChWsbTextModule\_actPublish
_actPublish($aIds, $bPositive=true)
Definition: ChWsbTextModule.php:900
ChWsbAdminSettings
Definition: ChWsbAdminSettings.php:35
ChWsbTextModule\$_oTextData
$_oTextData
Definition: ChWsbTextModule.php:23
$mixedResultSettings
$mixedResultSettings
Definition: admin.php:36
CH_TAGS_STRIP
const CH_TAGS_STRIP
Definition: utils.inc.php:22
CH_TD_STATUS_ACTIVE
const CH_TD_STATUS_ACTIVE
Definition: ChWsbTextData.php:12
$aVars
$aVars
Definition: license.php:101
ChWsbTextModule\serviceGetCalendarBlock
serviceGetCalendarBlock($iBlockID, $aParams=array())
Definition: ChWsbTextModule.php:377
ChWsbTextModule\serviceFeaturedBlockMember
serviceFeaturedBlockMember($iStart=0, $iPerPage=0, $bShowEmpty=true)
Definition: ChWsbTextModule.php:330
$s
$s
Definition: embed.php:13
ChWsbTextModule\_actFeatured
_actFeatured($aIds, $bPositive=true)
Definition: ChWsbTextModule.php:880
ChWsbTextModule\actionSharePopup
actionSharePopup($iEntry)
Definition: ChWsbTextModule.php:494
$iPage
$iPage
Definition: browse.php:50
ChWsbTextModule\serviceArchiveBlock
serviceArchiveBlock($iStart=0, $iPerPage=0, $bShowEmpty=true)
Definition: ChWsbTextModule.php:310
ChWsbTextModule\actionAdmin
actionAdmin($sName='')
Definition: ChWsbTextModule.php:735
ChWsbTextModule\actionTag
actionTag($sTag='', $iPage=1, $iPerPage=0)
Definition: ChWsbTextModule.php:658
ChWsbTextModule
Definition: ChWsbTextModule.php:22
ChWsbTextModule\getBlockComment
getBlockComment($sUri)
Definition: ChWsbTextModule.php:64
ChWsbTextModule\serviceFeaturedBlock
serviceFeaturedBlock($iStart=0, $iPerPage=0, $bShowEmpty=true)
Definition: ChWsbTextModule.php:337
$sCaption
$sCaption
Definition: tellfriend.php:39
ChWsbTextModule\getSearchResult
getSearchResult()
Definition: ChWsbTextModule.php:150
$sAction
$sAction
Definition: categories.php:274
ChWsbTextModule\actionRss
actionRss($iLength=0, $sType='archive')
Definition: ChWsbTextModule.php:425
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
ChWsbTextModule\actionTags
actionTags()
Definition: ChWsbTextModule.php:641
getLocaleDate
getLocaleDate($sTimestamp='', $iCode=CH_WSB_LOCALE_DATE_SHORT)
Definition: utils.inc.php:70
as
as
Definition: Filter.ExtractStyleBlocks.Escaping.txt:10
ChWsbTextModule\actionMobileLatestEntries
actionMobileLatestEntries($iPage=1)
Definition: ChWsbTextModule.php:799
$sName
$sName
Definition: ChWsbAdminTools.php:853
ChWsbTextModule\actionPopular
actionPopular()
Definition: ChWsbTextModule.php:526
$GLOBALS
$GLOBALS['iAdminPage']
Definition: advanced_settings.php:10
ChWsbTextModule\serviceEditBlock
serviceEditBlock($mixed)
Definition: ChWsbTextModule.php:268
ChWsbTextModule\actionMarkFeatured
actionMarkFeatured()
Definition: ChWsbTextModule.php:476
$oSubscription
$oSubscription
Definition: notifies.php:28
ChWsbTextModule\getCalendarContent
getCalendarContent($iYear, $iMonth, $iDay, $iPage, $iPerPage)
Definition: ChWsbTextModule.php:207