Index: branches/RC/themes/default2009/in-news/module_info.xml =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/module_info.xml (revision 12747) +++ branches/RC/themes/default2009/in-news/module_info.xml (revision 0) @@ -1,5 +0,0 @@ - - - in-news/index - in-news/detail - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/designs/detail.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/designs/detail.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/designs/detail.tpl (revision 0) @@ -1,191 +0,0 @@ - - - - - - - - - -
-
- -
-
- -
-
- -
-
-
- - - - - - " class="thickbox" rel="article-images" title=""> - " title="" alt="" border="0" />
-
- - - - img/s.gif" width="8" height="1" alt="" /> - - -
- - - - -
-
- -
-
- - - - - - - - - - - -
- - - - - -
- img/articles_icon.gif" width="16" height="23" alt="" /> - - - - - - - - " target="_blank"> - - - img/icon_hot.gif" alt=""/> - img/icon_new.gif" alt=""/> - img/icon_popular.gif" alt=""/> - img/icon_pick.gif" alt=""/> - img/icon_favorite.gif" alt=""/> - - -
- - - : , - : , - : , - : , - : - -
- - - - - - - - -
- - " class="thickbox" rel="article-images"> -
-
- -
-
-
- - -
- - img/ic_removefromfav.gif" width="11" height="10" alt="" /> - - img/ic_addtofav.gif" width="11" height="10" alt="" /> "> - -
- -
- - - - - - - -
-
- - - - - - - - -
-

-
- -
-
- -
- -
- - - - - - - - () - - - - -
- - -
- -
- -
- - - - - - - - - -
-
- - - - -
- - - - - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/designs/.smsignore =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/designs/.smsignore (revision 12747) +++ branches/RC/themes/default2009/in-news/designs/.smsignore (revision 0) @@ -1 +0,0 @@ -.*\.tpl \ No newline at end of file Index: branches/RC/themes/default2009/in-news/designs/section.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/designs/section.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/designs/section.tpl (revision 0) @@ -1,117 +0,0 @@ - - - - - - - - - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- - - - -
- - - -
- -
- - - -
- -
- -
- -
- - - - - - - - - - -
-
- -
- -
- - - - - - - () - - - - - - -
- - - -
- "> -
-
- -
- - - - -
- - - - - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/my_account/my_articles.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/my_account/my_articles.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/my_account/my_articles.tpl (revision 0) @@ -1,58 +0,0 @@ - - - - - - - - - - - -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - () - - - - - - - -
- - -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/my_account/my_items.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/my_account/my_items.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/my_account/my_items.elm.tpl (revision 0) @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/pick_articles.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/pick_articles.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/pick_articles.tpl (revision 0) @@ -1,66 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - () - - - - - - - -
- - -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/pop_articles.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/pop_articles.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/pop_articles.tpl (revision 0) @@ -1,66 +0,0 @@ - - - - - - - - - -\ -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - () - - - - - - - -
- - -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/suggest_article.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/suggest_article.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/suggest_article.tpl (revision 0) @@ -1,84 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - - - - *

- - - - - - img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" />

- -
- - - - - - - - - - - - - - - - - - - - "/> - -

-
- - -
-
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/new_articles.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/new_articles.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/new_articles.tpl (revision 0) @@ -1,66 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - () - - - - - - - -
- - -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/modify_article.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/modify_article.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/modify_article.tpl (revision 0) @@ -1,85 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - - - - *

- - - - - - img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" />

- -
- - - - - - - - - - - - - - - - - - "/> - -

-
- - -
-
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/search_results.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/search_results.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/search_results.tpl (revision 0) @@ -1,67 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- - - - -
- -
- -
- - - - - () - - - - - - - - - -
- - -
-
- -
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/add_review_confirm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/add_review_confirm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/add_review_confirm.tpl (revision 0) @@ -1,49 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - -

- "> -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/modify_pending_confirm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/modify_pending_confirm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/modify_pending_confirm.tpl (revision 0) @@ -1,49 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - -

- "> -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/modify_confirm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/modify_confirm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/modify_confirm.tpl (revision 0) @@ -1,49 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - -

- "> -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/hot_articles.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/hot_articles.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/hot_articles.tpl (revision 0) @@ -1,66 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - () - - - - - - - -
- - -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/add_review.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/add_review.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/add_review.tpl (revision 0) @@ -1,140 +0,0 @@ - - - - - - - - - - - - -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - -
- - - - - - -
- img/articles_icon.gif" width="16" height="23" alt="" /> - - - - - img/icon_hot.gif" alt=""/> - img/icon_new.gif" alt=""/> - img/icon_popular.gif" alt=""/> - img/icon_pick.gif" alt=""/> - img/icon_favorite.gif" alt=""/> - - -
- - - : , - : , - : , - : , - : - -
- - - - - - -
- - " class="thickbox" rel="article-images" title=""> -
-
- -
-
-
- -
-
-
-
- -
- - - - - - - - - - - -
- - - - *

- - - - - - img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" />

- -
- - - - - - - - "/> - -
-
-
- - -
-
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/suggest_confirm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/suggest_confirm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/suggest_confirm.tpl (revision 0) @@ -1,49 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - -

- "> -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/add_review_pending_confirm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/add_review_pending_confirm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/add_review_pending_confirm.tpl (revision 0) @@ -1,49 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - -

- "> -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/articles/suggest_pending_confirm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/articles/suggest_pending_confirm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/articles/suggest_pending_confirm.tpl (revision 0) @@ -1,49 +0,0 @@ - - - - - - - - - - -
-
- -
-
- -
-
- -
-
-
- - - -
-
- -
-
- - - - - - -

- "> -
- -
-
-
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/img/articles_icon.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/themes/default2009/in-news/img/menu_articles.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/themes/default2009/in-news/img/ic_myarticles46.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/themes/default2009/in-news/inc/styles.css =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/inc/styles.css (revision 12747) +++ branches/RC/themes/default2009/in-news/inc/styles.css (revision 0) @@ -1,39 +0,0 @@ -.article-picture-padding { - padding: 20px 5px 20px 20px; - width: 120px; - vertical-align: top; -} - -.lead-article-picture-padding { - padding: 0px 20px 0px 30px; - width: 120px; - vertical-align: top; -} - -.articles-icon-cell - { - width:22px; - padding: 5px 5px 5px 5px; - } - -/* --- Category Lead Story & Site Lead Story Styles --- */ -.category-lead-article, .site-lead-article { - text-align: right; - padding: 1px 4px; - margin: 1px 0px; - font-size: 10px; -} - -.category-lead-article { - background-color: #EBEBEB; - color: #666666; -} - -.site-lead-article { - background-color: #FFC2C2; - color: #165A9B; -} - -.category-lead-article-padding, .site-lead-article-padding { - padding: 8px; -} \ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/html_head.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/html_head.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/html_head.elm.tpl (revision 0) @@ -1,3 +0,0 @@ -inc/styles.css" type="text/css" /> - - Index: branches/RC/themes/default2009/in-news/elements/sorting.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/sorting.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/sorting.elm.tpl (revision 0) @@ -1,41 +0,0 @@ - - - - - -
- :  |  : - - : -
-img/s.gif" width="1" height="4" alt="" />
-img/grey_pix.gif" width="100%" height="1" alt="" />
-
- - - - - -
-
- : - - - " value="" /> - -
- -img/s.gif" width="1" height="10" alt="" />
\ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/rss.xml.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/rss.xml.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/rss.xml.tpl (revision 0) @@ -1,13 +0,0 @@ - - - - <inp2:m_GetConfig name="Site_Name"/> - - - - m - - - - - Index: branches/RC/themes/default2009/in-news/elements/content_boxes/search_results.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/content_boxes/search_results.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/content_boxes/search_results.elm.tpl (revision 0) @@ -1,26 +0,0 @@ - - - - - () - - - - - - - -
- -
img/s.gif" width="1" height="1" alt="" />
- - - - - - - img/s.gif" width="1" height="5" alt="" />
- ">... -
- -
\ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/content_boxes/related_items.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/content_boxes/related_items.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/content_boxes/related_items.elm.tpl (revision 0) @@ -1,6 +0,0 @@ - - - - -
- \ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/content_boxes/site_lead_article.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/content_boxes/site_lead_article.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/content_boxes/site_lead_article.elm.tpl (revision 0) @@ -1,15 +0,0 @@ - - - - - - - - - - - - - -
-
\ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/content_boxes/home_page_items.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/content_boxes/home_page_items.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/content_boxes/home_page_items.elm.tpl (revision 0) @@ -1 +0,0 @@ - Index: branches/RC/themes/default2009/in-news/elements/content_boxes/my_favorites.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/content_boxes/my_favorites.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/content_boxes/my_favorites.elm.tpl (revision 0) @@ -1,22 +0,0 @@ - - - - - - () - - - - - - -
- - - - - - -
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/side_boxes/new.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/side_boxes/new.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/side_boxes/new.elm.tpl (revision 0) @@ -1,18 +0,0 @@ - - - - - "> () - - - - - - "> - - - - -
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/side_boxes/pick.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/side_boxes/pick.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/side_boxes/pick.elm.tpl (revision 0) @@ -1,18 +0,0 @@ - - - - - "> () - - - - - - "> - - - - -
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/side_boxes/pop.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/side_boxes/pop.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/side_boxes/pop.elm.tpl (revision 0) @@ -1,18 +0,0 @@ - - - - - "> () - - - - - - "> - - - - -
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/side_boxes/hot.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/side_boxes/hot.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/side_boxes/hot.elm.tpl (revision 0) @@ -1,18 +0,0 @@ - - - - - "> () - - - - - - "> - - - - -
- - \ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/side_boxes/action_box.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/side_boxes/action_box.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/side_boxes/action_box.elm.tpl (revision 0) @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - "> - - - -
- - "> -
\ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/.smsignore =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/.smsignore (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/.smsignore (revision 0) @@ -1 +0,0 @@ -.*\.xml\.tpl \ No newline at end of file Index: branches/RC/themes/default2009/in-news/elements/articles.elm.tpl =================================================================== diff -u -N --- branches/RC/themes/default2009/in-news/elements/articles.elm.tpl (revision 12747) +++ branches/RC/themes/default2009/in-news/elements/articles.elm.tpl (revision 0) @@ -1,302 +0,0 @@ - - - - -
img/s.gif" width="1" height="1" alt="" />
-
- - - - - -
- -
-
- " title=""> -
- " class="text-title"> - - - img/icon_hot.gif" alt=""/> - img/icon_new.gif" alt=""/> - img/icon_popular.gif" alt=""/> - img/icon_pick.gif" alt=""/> - img/icon_favorite.gif" alt=""/> - - -
- - : , - : , - : , - : , - : - - -
- - - img/ic_removefromfav.gif" width="11" height="10" alt="" /> - - img/ic_addtofav.gif" width="11" height="10" alt="" /> "> - - -  |  - - img/reviews.gif" width="14" height="10" alt="" /> "> - -
img/s.gif" width="1" height="4" alt="" />
- - -
-
-
- -
- -
- - - - - img/articles_icon.gif" width="16" height="23" alt="" /> - " class="text-title"> - - - - - - -
img/s.gif" width="1" height="1" alt="" />
- - - - - -
- " title="">
-
- "> - - img/icon_hot.gif" alt=""/> - img/icon_new.gif" alt=""/> - img/icon_popular.gif" alt=""/> - img/icon_pick.gif" alt=""/> - img/icon_favorite.gif" alt=""/> - - -
- -
- - -

-
-
- - - : , - : , - : , - : , - : - - - - - - - - - - - - - - -
- img/ic_details.gif" width="14" height="13" alt="" /> "> - -  |  img/ic_edit.gif" width="11" height="10" alt="" /> "> - -  |  img/ic_delete.gif" width="11" height="10" alt="" /> " onclick="return confirm('');"> -
- - -
- -
- - - - -
img/s.gif" alt=""/>

- - - - - -
- img/articles_icon.gif" width="22" height="18" alt="" />
-
- " class="text-title"> - - img/icon_hot.gif" alt=""/> - img/icon_new.gif" alt=""/> - img/icon_popular.gif" alt=""/> - img/icon_pick.gif" alt=""/> - img/icon_favorite.gif" alt=""/> - - -
- (: , - : , - : , - : , - : ) -
-
-
- - - - - - -
- " title=""> - - -
- -
- - -
- - - - - - - - - - -
- img/articles_icon.gif" width="22" height="18" alt="" />
-
- " class="text-title"> - - img/icon_hot.gif" alt=""/> - img/icon_new.gif" alt=""/> - img/icon_popular.gif" alt=""/> - img/icon_pick.gif" alt=""/> - img/icon_favorite.gif" alt=""/> - - -
- (: , - : , - : , - : , - : ) -
-
-
- - - - - -
- " title=""> - - -
- - - -
- - - - "> - - - - - - - - - - - <inp2:Field name="Title" html_escape="1"/> - - - - - - - - - -
img/s.gif" width="1" height="1" alt="" />
-
- - - - - -
- -
-
- " title=""> -
- " class="text-title"> - - - img/icon_hot.gif" alt=""/> - img/icon_new.gif" alt=""/> - img/icon_popular.gif" alt=""/> - img/icon_pick.gif" alt=""/> - img/icon_favorite.gif" alt=""/> - - -
- - : , - : , - : , - : , - : - - -
- - - img/ic_removefromfav.gif" width="11" height="10" alt="" /> - - img/ic_addtofav.gif" width="11" height="10" alt="" /> "> - - -  |  - - img/reviews.gif" width="14" height="10" alt="" /> "> - -
- -
- -
\ No newline at end of file Index: branches/5.0.x/in-news/install/prerequisites.php =================================================================== diff -u -N --- branches/5.0.x/in-news/install/prerequisites.php (revision 12747) +++ branches/5.0.x/in-news/install/prerequisites.php (revision 0) @@ -1,79 +0,0 @@ -_toolkit =& $instance; - } - - /** - * Checks minimal version, that could be upgradeable - * - * @param string $mode when called mode {install, standalone, upgrade) - */ - function CheckPrerequisites($versions, $mode) - { - $errors = Array (); - - if ($mode == 'standalone') { - if (!$this->Application->isModuleEnabled('In-Portal')) { - $errors[] = 'Please install or enable "In-Portal" module first'; - } - } - - if ($mode == 'upgrade') { - $sql = 'SELECT Version - FROM ' . TABLE_PREFIX . 'Modules - WHERE Name = "In-Portal"'; - $inportal_version = $this->Conn->GetOne($sql); - - if ($inportal_version === false) { - // only, when In-Portal was installed - return $errors; - } - - $min_version = '4.3.1'; - - $current_version = $this->_toolkit->ConvertModuleVersion($inportal_version); - $needed_version = $this->_toolkit->ConvertModuleVersion($min_version); - if ($current_version < $needed_version) { - $errors[] = 'Please upgrade "In-Portal" to version ' . $min_version; - } - } - - return $errors; - } - } \ No newline at end of file Index: branches/5.0.x/in-news/install/install_data.sql =================================================================== diff -u -N --- branches/5.0.x/in-news/install/install_data.sql (revision 12747) +++ branches/5.0.x/in-news/install/install_data.sql (revision 0) @@ -1,248 +0,0 @@ -INSERT INTO ConfigurationAdmin VALUES ('News_Search_Id', 'la_Text_Search', 'la_prompt_for_Id', 'checkbox', '', '', 1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_CatNewDays', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 10.05, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 10.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News_Short', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 10.04, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopRating', 'la_Text_Articles', 'la_fld_News_MinPopRating', 'text', '', '', 10.06, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MaxHotNumber', 'la_Text_Articles', 'la_fld_News_MaxHotNumber', 'text', '', '', 10.08, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ShowPick', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 10.1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_Archive', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10.09, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn', 20.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 20.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn', 20.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 20.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopVotes', 'la_Text_Articles', 'la_fld_News_MinPopVotes', 'text', '', '', 10.07, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews_Short', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Interval', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.12, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Value', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.12, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Interval', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.11, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Value', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 10.11, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('n_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 30.02, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_MaxImageCount', 'la_section_ImageSettings', 'la_config_MaxImageCount', 'text', '', '', 40.01, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ThumbnailImageWidth', 'la_section_ImageSettings', 'la_config_ThumbnailImageWidth', 'text', '', '', 40.02, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ThumbnailImageHeight', 'la_section_ImageSettings', 'la_config_ThumbnailImageHeight', 'text', '', '', 40.03, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_FullImageWidth', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 40.04, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_FullImageHeight', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 40.05, 0, 0); - -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_articles', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_articles', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_articles', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_articles', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_articles', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1); - -INSERT INTO ConfigurationAdmin VALUES ('n_MaxCategories', 'la_Text_Articles', 'la_fld_MaxCategories', 'text', NULL, NULL, 10.13, 0, 1); - -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_News', '8', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_PopCount', '4', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_ArticleSort', 'CreatedOn desc, Title asc', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_CatSort', 'cat_date desc, cat_name asc', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_MinPopRating', '4', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Archive', '0', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_ShowPick', '1', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_CatNewDays', '5', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_ShowMulti', '1', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Admin_Notice_New', '1', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Admin_Notice_Modify', '1', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Admin_Notice_Suggest', '1', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_New', '1', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_Approve', '1', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_Deny', '1', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_Modify', '1', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_Modify_Approve', '1', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_Modify_Deny', '1', 'inportal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_MaxHotNumber', '5', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_MinPopVotes', '20', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Article_Root', '{NewsCatId}', 'In-Portal', ''); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Highlight_OpenTag', '', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Highlight_CloseTag', '', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'n_CategoryTemplate', '/in-news/designs/section', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'n_ItemTemplate', 'in-news/designs/detail', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'n_MaxImageCount', 5, 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'n_ThumbnailImageWidth', 120, 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'n_ThumbnailImageHeight', 120, 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'n_FullImageWidth', 450, 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'n_FullImageHeight', 450, 'In-News', 'in-news:configuration_output'); - -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Keyword_articles', '90', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Pop_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Rating_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search'); - -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'n_MaxCategories', '3', 'In-News', 'in-news:configuration_output'); - -INSERT INTO Events VALUES(DEFAULT, 'NEWS.ADD', NULL, 1, 1, NULL, 'In-News', 'la_event_article.add', 1); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.ADD', NULL, 1, 0, NULL, 'In-News', 'la_event_article.add', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.ADD.PENDING', NULL, 1, 1, NULL, 'In-News', 'la_event_news.add.pending', 1); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.ADD.PENDING', NULL, 1, 0, NULL, 'In-News', 'la_event_news.add.pending', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.MODIFY', NULL, 1, 1, NULL, 'In-News', 'la_event_article.modify', 1); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.MODIFY', NULL, 1, 0, NULL, 'In-News', 'la_event_article.modify', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.MODIFY.PENDING', NULL, 1, 1, NULL, 'In-News', 'la_event_news.modify.pending', 1); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.MODIFY.PENDING', NULL, 1, 0, NULL, 'In-News', 'la_event_news.modify.pending', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.MODIFY.APPROVE', NULL, 1, 0, NULL, 'In-News', 'la_event_article.modify.approve', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.MODIFY.DENY', NULL, 1, 0, NULL, 'In-News', 'la_event_article.modify.deny', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.APPROVE', NULL, 1, 0, NULL, 'In-News', 'la_event_article.approve', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.DENY', NULL, 1, 0, NULL, 'In-News', 'la_event_article.deny', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.REVIEW.ADD', NULL, 1, 1, NULL, 'In-News', 'la_event_article.review.add', 1); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.REVIEW.ADD', NULL, 1, 0, NULL, 'In-News', 'la_event_article.review.add', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.REVIEW.APPROVE', NULL, 1, 0, NULL, 'In-News', 'la_event_article.review.approve', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.REVIEW.DENY', NULL, 1, 0, NULL, 'In-News', 'la_event_article.review.deny', 0); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.REVIEW.ADD.PENDING', NULL, 1, 0, NULL, 'In-News', 'la_event_article.review.add.pending', 1); -INSERT INTO Events VALUES(DEFAULT, 'NEWS.REVIEW.ADD.PENDING', NULL, 1, 0, NULL, 'In-News', 'la_event_article.review.add.pending', 0); - -INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article'); - -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.ADD', 'lu_PermName_News.Add_desc', 'lu_PermName_News.Add_desc', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.VIEW', 'lu_PermName_News.View_desc', 'lu_PermName_News.View_desc', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.ADD.PENDING', 'lu_PermName_News.Add.Pending_desc', 'lu_PermName_News.Add.Pending_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.MODIFY', 'lu_PermName_News.Modify_desc', 'lu_PermName_News.Modify_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.DELETE', 'lu_PermName_News.Delete_desc', 'lu_PermName_News.Delete_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.RATE', 'lu_PermName_News.Rate_desc', 'lu_PermName_News.Rate_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.REVIEW', 'lu_PermName_News.Review_desc', 'lu_PermName_News.Review_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 'lu_PermName_News.Review.Pending_desc', 'lu_PermName_News.Review.Pending_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.MODIFY.PENDING', 'lu_PermName_News.Modify.Pending_desc', 'lu_PermName_News.Modify.Pending_desc', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 'lu_PermName_News.Owner.Modify_desc', 'lu_PermName_News.Owner.Modify_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 'lu_PermName_News.Owner.Modify.Pending_desc', 'lu_PermName_News.Owner.Modify.Pending_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.OWNER.DELETE', 'lu_PermName_News.Owner.Delete_desc', 'lu_PermName_News.Owner.Delete_error', 'In-News'); - -INSERT INTO SearchConfig VALUES ('News', 'Title', 1, 1, 'lu_fielddesc_news_title', 'lu_field_title', 'In-News', 'la_text_article', 2, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Excerpt', 1, 1, 'lu_fielddesc_news_excerpt', 'lu_field_excerpt', 'In-News', 'la_text_article', 3, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Author', 1, 1, 'lu_fielddesc_news_author', 'lu_field_author', 'In-News', 'la_text_article', 4, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Body', 1, 1, 'lu_fielddesc_news_body', 'lu_field_body', 'In-News', 'la_text_article', 5, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedOn', 0, 1, 'lu_fielddesc_news_createdon', 'lu_field_createdon', 'In-News', 'la_text_article', 6, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EndOn', 0, 1, 'lu_fielddesc_news_endon', 'lu_field_endon', 'In-News', 'la_text_article', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Hits', 0, 1, 'lu_fielddesc_news_hits', 'lu_field_hits', 'In-News', 'la_text_article', 8, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedRating', 0, 1, 'lu_fielddesc_news_cachedrating', 'lu_field_cachedrating', 'In-News', 'la_text_article', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedVotesQty', 0, 1, 'lu_fielddesc_news_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-News', 'la_text_article', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedById', 0, 1, 'lu_fielddesc_news_createdbyid', 'lu_field_createdbyid', 'In-News', 'la_text_article', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Priority', 0, 1, 'lu_fielddesc_news_priority', 'lu_field_priority', 'In-News', 'la_text_article', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Status', 0, 1, 'lu_fielddesc_news_status', 'lu_field_status', 'In-News', 'la_text_article', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EditorsPick', 0, 1, 'lu_fielddesc_news_editorspick', 'lu_field_editorspick', 'In-News', 'la_text_article', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadStory', 0, 1, 'lu_fielddesc_news_leadstory', 'lu_field_leadstory', 'In-News', 'la_text_article', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadCatStory', 0, 1, 'lu_fielddesc_news_leadcatstory', 'lu_field_leadcatstory', 'In-News', 'la_text_article', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ResourceId', 0, 1, 'lu_fielddesc_news_resourceid', 'lu_field_resourceid', 'In-News', 'la_text_article', 17, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_news_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-News', 'la_text_article', 18, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'StartDate', 0, 1, 'lu_fielddesc_news_startdate', 'lu_field_startdate', 'In-News', 'la_text_article', 19, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewItem', 0, 1, 'lu_fielddesc_news_newitem', 'lu_field_newitem', 'In-News', 'la_text_article', 20, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'PopItem', 0, 1, 'lu_fielddesc_news_popitem', 'lu_field_popitem', 'In-News', 'la_text_article', 21, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'HotItem', 0, 1, 'lu_fielddesc_news_hotitem', 'lu_field_hotitem', 'In-News', 'la_text_article', 22, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Archived', 0, 1, 'lu_fielddesc_news_archived', 'lu_field_archived', 'In-News', 'la_text_article', 23, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Modified', 0, 1, 'lu_fielddesc_news_modified', 'lu_field_modified', 'In-News', 'la_text_article', 24, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ModifiedById', 0, 1, 'lu_fielddesc_news_modifiedbyid', 'lu_field_modifiedbyid', 'In-News', 'la_text_article', 25, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'OrgId', 0, 0, 'lu_fielddesc_news_orgid', 'lu_field_orgid', 'In-News', 'la_text_article', 26, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewsId', 0, 1, 'lu_fielddesc_news_newsid', 'lu_field_newsid', 'In-News', 'la_text_article', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('CustomField', 'RssOriginalURL', 1, 0, 'la_fld_RssOriginalURL', 'lu_fld_RssOriginalURL', 'In-News', 'la_section_CustomFields', 0, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssExpireInterval', 'la_fld_RssExpireInterval', 0, 'la_title_SystemCF', 'la_fld_RssExpireInterval', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssUpdateInterval', 'la_fld_RssUpdateInterval', 0, 'la_title_SystemCF', 'la_fld_RssUpdateInterval', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssLastUpdated', 'la_fld_RssLastUpdated', 0, 'la_title_SystemCF', 'la_fld_RssLastUpdated', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssDeleteExpired', 'la_fld_RssDeleteExpired', 0, 'la_title_SystemCF', 'la_fld_RssDeleteExpired', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 2, 'RssOriginalURL', 'lu_fld_RssOriginalURL', 0, 'la_section_CustomFields', 'la_fld_RssOriginalURL', 'label', 'cut_first="100"', '', 0, 1, 0, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssUpdateIntervalType', 'la_fld_RssUpdateIntervalType', 0, 'la_title_SystemCF', 'la_fld_RssUpdateIntervalType', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssSource', 'la_fld_RssSource', 0, 'la_title_SystemCF', 'la_fld_RssSource', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssExpireIntervalType', 'la_fld_RssExpireIntervalType', 0, 'la_title_SystemCF', 'la_fld_RssExpireIntervalType', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssDefaultExpiration', 'la_fld_RssDefaultExpiration', 0, 'la_title_SystemCF', 'la_fld_RssDefaultExpiration', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssDefaultExpirationType', 'la_fld_RssDefaultExpirationType', 0, 'la_title_SystemCF', 'la_fld_RssDefaultExpirationType', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssLastExpired', 'la_fld_RssLastExpired', 0, 'la_title_SystemCF', 'la_fld_RssLastExpired', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 2, 'RssArticleCRC', 'la_fld_RssArticleCRC', 0, 'la_section_SystemCF', 'la_fld_RssArticleCRC', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'n_ItemTemplate', 'la_fld_cust_n_ItemTemplate', 0, 'la_title_SystemCF', 'la_fld_cust_n_ItemTemplate', 'text', NULL, '', 0, 0, 1, 0); - -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, 'la_prompt_PopularArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2); - -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.DELETE', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD.PENDING', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.DELETE', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD.PENDING', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY.PENDING', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.DELETE', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:articles.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:setting_folder.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_email.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_email.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.add', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.delete', 11, 1, 1, 0); - -INSERT INTO ImportScripts VALUES (DEFAULT, 'Articles from CSV file [In-News]', '', 'n', 'In-News', '', 'CSV', '1'); - -INSERT INTO Modules VALUES ('In-News', 'in-news/', 'n', DEFAULT, 1, 2, 'in-news/', {NewsCatId}, NULL); \ No newline at end of file Index: branches/5.0.x/in-news/install/install_order.txt =================================================================== diff -u -N --- branches/5.0.x/in-news/install/install_order.txt (revision 12747) +++ branches/5.0.x/in-news/install/install_order.txt (revision 0) @@ -1 +0,0 @@ -103 \ No newline at end of file Index: branches/5.0.x/in-news/install/english.lang =================================================================== diff -u -N --- branches/5.0.x/in-news/install/english.lang (revision 12747) +++ branches/5.0.x/in-news/install/english.lang (revision 0) @@ -1,178 +0,0 @@ - - m/d/Yg:i Am/d/Yg:i:s A.,utf-8http://docs.in-portal.org/eng/index.php2 - - QXV0aG9y - RGF0ZQ== - QXJ0aWNsZSBFeGNlcnB0 - SGl0cw== - UmF0aW5n - QXJ0aWNsZSBUaXRsZQ== - QXV0aG9y - QXJjaGl2YXRpb24gRGF0ZQ== - U2VjdGlvbiBMZWFk - U2l0ZSBMZWFk - U3RhcnQgRGF0ZQ== - QWRkIEFydGljbGU= - QXBwcm92ZSBBcnRpY2xl - RGVjbGluZSBBcnRpY2xl - TW9kaWZ5IEFydGljbGU= - QXBwcm92ZSBBcnRpY2xlIE1vZGlmaWNhdGlvbg== - RGVjbGluZSBBcnRpY2xlIE1vZGlmaWNhdGlvbg== - QXJ0aWNsZSBDb21tZW50IEFkZGVk - QXJ0aWNsZSBDb21tZW50IFBlbmRpbmc= - QXJ0aWNsZSBDb21tZW50IEFwcHJvdmVk - QXJ0aWNsZSBDb21tZW50IERlY2xpbmVk - QXJ0aWNsZSBBZGQgUGVuZGluZw== - QXJ0aWNsZSBNb2RpZnkgUGVuZGluZw== - QXV0aG9y - QXJ0aWNsZSBCb2R5 - TmV3cyBJdGVtIFRlbXBsYXRl - QXJjaGl2YXRpb24gRGF0ZQ== - QXJ0aWNsZSBFeGNlcnB0 - U2VjdGlvbiBMZWFkIFN0b3J5 - U2l0ZSBMZWFkIFN0b3J5 - TWF4aW11bSBudW1iZXIgb2YgSE9UIGFydGljbGVz - TWluaW11bSByYXRpbmcgdG8gY29uc2lkZXIgYXJ0aWNsZSBQT1A= - TWluaW11bSBudW1iZXIgb2Ygdm90ZXMgdG8gY29uc2lkZXIgYXJ0aWNsZSBQT1A= - UlNTIEFydGljbGUgQ1JDMzI= - RGVmYXVsdCBFeHBpcmF0aW9u - RGVmYXVsdCBFeHBpcmF0aW9uIFR5cGU= - RGVsZXRlIEV4cGlyZWQ= - RXhwaXJhdGlvbiBDaGVjayBJbnRlcnZhbA== - RXhwaXJhdGlvbiBJbnRlcnZhbCBUeXBl - TGFzdCBFeHBpcmVkIE9u - TGFzdCBVcGRhdGVk - RmVlZCBPcmlnaW5hbCBVUkw= - U291cmNlIFVSTA== - VXBkYXRlIEludGVydmFs - VXBkYXRlIEludGVydmFsIFR5cGU= - U3RhcnQgRGF0ZQ== - SW4tTmV3cw== - QXJ0aWNsZXM= - TnVtYmVyIG9mIGRheXMgdG8gYXJjaGl2ZSBhcnRpY2xlcyBhdXRvbWF0aWNhbGx5 - RGlzcGxheSBlZGl0b3IgUElDS3MgYWJvdmUgcmVndWxhciBhcnRpY2xlcw== - TnVtYmVyIG9mIGRheXMgZm9yIGEgYXJ0aWNsZSB0byBiZSBORVc= - TnVtYmVyIG9mIGFydGljbGVzIHBlciBwYWdl - QXJ0aWNsZXMgUGVyIFBhZ2UgKFNob3J0bGlzdCk= - QW5kIHRoZW4gYnk= - T3JkZXIgYXJ0aWNsZXMgYnk= - QW5kIHRoZW4gYnk= - U29ydCBDb21tZW50cyBieQ== - QWN0aXZlIEFydGljbGVz - QXZlcmFnZSBSYXRpbmcgb2YgQXJ0aWNsZXM= - VG90YWwgQXJ0aWNsZSBDb21tZW50cw== - QWN0aXZlIEFydGljbGVz - QXJjaGl2ZWQgQXJ0aWNsZXM= - UGVuZGluZyBBcnRpY2xlcw== - VG90YWwgQXJ0aWNsZXM= - U2VjdGlvbiBMZWFkIFN0b3J5IEFydGljbGVz - RGlzYWJsZWQgQXJ0aWNsZXM= - RWRpdG9yJ3MgUGljayBBcnRpY2xlcw== - SG90IEFydGljbGVz - TGFzdCBVcGRhdGVkIEFydGljbGU= - TGVhZCBTdG9yeSBBcnRpY2xlcw== - TWF4aW11bSBIaXRzIG9mIGFuIEFydGljbGU= - TWF4aW11bSBWb3RlcyBvZiBhbiBBcnRpY2xl - TmV3IEFydGljbGVz - TmV3ZXN0IEFydGljbGUgRGF0ZQ== - UG9wdWxhciBBcnRpY2xlcw== - QXJ0aWNsZQ== - UlNTIEZlZWQgQXJ0aWNsZSBFeHBpcmF0aW9u - UlNTIEZlZWQgUHJvcGVydGllcw== - QXJ0aWNsZXM= - QXJ0aWNsZQ== - QXJ0aWNsZXM= - QWRkaW5nIEFydGljbGU= - QXJ0aWNsZXM= - RWRpdGluZyBBcnRpY2xl - SW1wb3J0IEFydGljbGVz - TmV3cw== - TmV3IEFydGljbGU= - TmV3IEFydGljbGU= - TGFzdCB1cGRhdGVkIG9u - VGl0bGUgQSB0byBa - VGl0bGUgWiB0byBB - QXV0aG9yIEEgdG8gWg== - QXV0aG9yIFogdG8gQQ== - UmF0ZSB0aGlzIGFydGljbGU= - Q29tbWVudCB0aGlzIEFydGljbGU= - Q2F0ZWdvcnkgTGVhZCBTdG9yeQ== - QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSB0aGUgYXJ0aWNsZT8NClRoaXMgYWN0aW9uIGNhbm5vdCBiZSB1bmRvbmUu - TWFuYWdlIHlvdXIgQXJ0aWNsZXMgaGVyZQ== - QXJ0aWNsZSBJRA== - RmVlZCBPcmlnaW5hbCBVUkw= - TXkgQXJ0aWNsZXM= - Tm8gQXJ0aWNsZXM= - QWRkIFBlbmRpbmcgTmV3cw== - QWRkIE5ld3M= - RGVsZXRlIE5ld3M= - TW9kaWZ5IEFydGljbGUgUGVuZGluZw== - TW9kaWZ5IE5ld3M= - QXJ0aWNsZSBEZWxldGUgYnkgT3duZXI= - QXJ0aWNsZSBNb2RpZnkgUGVuZGluZyBieSBPd25lcg== - QXJ0aWNsZSBNb2RpZnkgYnkgT3duZXI= - UmF0ZSBOZXdz - UmV2aWV3IE5ld3MgUGVuZGluZw== - Q29tbWVudCBBcnRpY2xl - VmlldyBOZXdz - UlNTIEZlZWQ= - QXJ0aWNsZSBEZXRhaWxz - c2l0ZSBsZWFkIHN0b3J5 - U29ydCBBcnRpY2xlcyBCeQ== - U3VnZ2VzdCBBcnRpY2xl - VGhhbmsgeW91IGZvciBjb21tZW50aW5nIHRoaXMgYXJ0aWNsZS4= - VGhhbmsgeW91IGZvciBjb21tZW50aW5nIHRoaXMgYXJ0aWNsZSAtIGl0J3Mgd2FpdGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwu - VGhhbmsgeW91IGZvciB1cGRhdGluZyB5b3VyIGFydGljbGUu - VGhhbmsgeW91IGZvciB1cGRhdGluZyB5b3VyIGFydGljbGUuIFlvdXIgbW9kaWZpY2F0aW9ucyBhcmUgcGVuZGluZyBhZG1pbmlzdHJhdGl2ZSBhcHByb3ZhbC4= - Tm8gcGVybWlzc2lvbnMgdG8gY29tbWVudCB0aGlzIGFydGljbGUu - Tm8gcGVybWlzc2lvbnMgdG8gbW9kaWZ5IHRoaXMgYXJ0aWNsZS4= - Tm8gcGVybWlzc2lvbnMgdG8gc3VnZ2VzdCBhcnRpY2xlIGludG8gdGhlIGN1cnJlbnQgY2F0ZWdvcnku - VGhhbmsgeW91IGZvciBzdWJtaXR0aW5nIHlvdXIgYXJ0aWNsZS4= - VGhhbmsgeW91IGZvciBzdWJtaXR0aW5nIHlvdXIgYXJ0aWNsZS4gQ3VycmVudGx5IGl0J3Mgd2FpdGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWw= - QXJ0aWNsZSBDb21tZW50IEFkZGVk - QXJ0aWNsZSBDb21tZW50IFBlbmRpbmc= - QXJ0aWNsZSBEZXRhaWxz - QXJ0aWNsZXM= - QXJ0aWNsZXMgU2VhcmNoIFJlc3VsdHM= - Q2F0ZWdvcnkgTGVhZCBTdG9yeQ== - RmF2b3JpdGUgQXJ0aWNsZXM= - SG90IEFydGljbGVz - TW9kaWZ5IEFydGljbGU= - QXJ0aWNsZSBNb2RpZmllZA== - QXJ0aWNsZSBNb2RpZmljYXRpb25zIFBlbmRpbmc= - TW9kaWZ5IFRvcGlj - TXkgQXJ0aWNsZXM= - TXkgVG9waWNz - TmV3IEFydGljbGVz - QXJ0aWNsZXM= - RWRpdG9yJ3MgUGljayBBcnRpY2xlcw== - UG9wdWxhciBBcnRpY2xlcw== - Q29tbWVudCBBcnRpY2xl - TGVhZCBTdG9yeQ== - U3VnZ2VzdCBBcnRpY2xl - QXJ0aWNsZSBBZGRlZA== - QXJ0aWNsZSBQZW5kaW5n - VG90YWwgQXJ0aWNsZXM= - - - U3ViamVjdDogWW91ciBOZXcgQXJ0aWNsZSAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBBZGRlZAoKVGhhbmsgeW91IGZvciBzdWJtaXR0aW5nIHlvdXIgQXJ0aWNsZSB0byBvdXIgd2Vic2l0ZSE8YnIvPjxici8+DQ1BcnRpY2xlIGRldGFpbHMgYXJlIGxpc3RlZCBiZWxvdzo8YnIvPjxici8+DQ1BcnRpY2xlIFRpdGxlOiA8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+PGJyLz4NPGlucDI6bV9pZiBjaGVjaz0ibl9GaWVsZCIgbmFtZT0iQm9keSI+DUJvZHk6IDxpbnAyOm5fRmllbGQgbmFtZT0iQm9keSIvPjxici8+DTwvaW5wMjptX2lmPg08YnIvPjxici8+DQ1Zb3UgY2FuIHZpZXcgeW91ciBhcnRpY2xlIGhlcmUgPGEgaHJlZj0iPGlucDI6bl9BcnRpY2xlTGluayB0ZW1wbGF0ZT0iX19kZWZhdWx0X18iLz4iPjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz48L2E+ - U3ViamVjdDogTmV3IEFydGljbGUgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIGhhcyBiZWVuIEFkZGVkCgpOZXcgQXJ0aWNsZSBoYXMgYmVlbiBzdWJtaXR0ZWQgdG8gb3VyIHdlYnNpdGUhPGJyLz48YnIvPg0NQXJ0aWNsZSBkZXRhaWxzIGFyZSBsaXN0ZWQgYmVsb3c6PGJyLz48YnIvPg0NQXJ0aWNsZSBUaXRsZTogPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPjxici8+DTxpbnAyOm1faWYgY2hlY2s9Im5fRmllbGQiIG5hbWU9IkJvZHkiPg1Cb2R5OiA8aW5wMjpuX0ZpZWxkIG5hbWU9IkJvZHkiLz48YnIvPg08L2lucDI6bV9pZj4NPGJyLz48YnIvPg0NWW91IGNhbiB2aWV3IHlvdXIgYXJ0aWNsZSBoZXJlIDxhIGhyZWY9IjxpbnAyOm5fQXJ0aWNsZUxpbmsgdGVtcGxhdGU9Il9fZGVmYXVsdF9fIi8+Ij48aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+PC9hPg== - U3ViamVjdDogTmV3IEFydGljbGUgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIC0gUGVuZGluZwoKTmV3IEFydGljbGUgaGFzIGJlZW4gc3VibWl0dGVkIHRvIG91ciB3ZWJzaXRlIGFuZCBwZW5kaW5nIGZvciBhZG1pbmlzdHJhdGl2ZSBhcHByb3ZhbCE8YnIvPjxici8+DQoNCkFydGljbGUgZGV0YWlscyBhcmUgbGlzdGVkIGJlbG93Ojxici8+PGJyLz4NCg0KQXJ0aWNsZSBUaXRsZTogPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPjxici8+DQo8aW5wMjptX2lmIGNoZWNrPSJuX0ZpZWxkIiBuYW1lPSJCb2R5Ij4NCkJvZHk6IDxpbnAyOm5fRmllbGQgbmFtZT0iQm9keSIvPjxici8+DQo8L2lucDI6bV9pZj4NCjxici8+PGJyLz4NCg0KWW91IGNhbiB2aWV3IHlvdXIgYXJ0aWNsZSBoZXJlIDxhIGhyZWY9IjxpbnAyOm5fQXJ0aWNsZUxpbmsgdGVtcGxhdGU9Il9fZGVmYXVsdF9fIi8+Ij48aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+PC9hPg== - U3ViamVjdDogTmV3IEFydGljbGUgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIC0gUGVuZGluZwoKTmV3IEFydGljbGUgaGFzIGJlZW4gc3VibWl0dGVkIHRvIG91ciB3ZWJzaXRlIGFuZCBwZW5kaW5nIGZvciBhZG1pbmlzdHJhdGl2ZSBhcHByb3ZhbCE8YnIvPjxici8+DQoNCkFydGljbGUgZGV0YWlscyBhcmUgbGlzdGVkIGJlbG93Ojxici8+PGJyLz4NCg0KQXJ0aWNsZSBUaXRsZTogPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPjxici8+DQo8aW5wMjptX2lmIGNoZWNrPSJuX0ZpZWxkIiBuYW1lPSJCb2R5Ij4NCkJvZHk6IDxpbnAyOm5fRmllbGQgbmFtZT0iQm9keSIvPjxici8+DQo8L2lucDI6bV9pZj4NCjxici8+PGJyLz4NCg0KWW91IGNhbiB2aWV3IHlvdXIgYXJ0aWNsZSBoZXJlIDxhIGhyZWY9IjxpbnAyOm5fQXJ0aWNsZUxpbmsgdGVtcGxhdGU9Il9fZGVmYXVsdF9fIi8+Ij48aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+PC9hPg== - U3ViamVjdDogWW91ciBBcnRpY2xlICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiAtIEFwcHJvdmVkCgpZb3VyIEFydGljbGUgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIGhhcyBiZWVuIGFwcHJvdmVk - U3ViamVjdDogWW91ciBBcnRpY2xlICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiAtIERlY2xpbmVkCgpZb3VyIEFydGljbGUgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIGhhcyBiZWVuIGRlY2xpbmVkLg== - U3ViamVjdDogWW91ciBBcnRpY2xlICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiAtIFVwZGF0ZWQKCllvdXIgQXJ0aWNsZSAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgaGFzIGJlZW4gdXBkYXRlZC4= - U3ViamVjdDogQXJ0aWNsZSAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBVcGRhdGVkCgpBcnRpY2xlICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiBoYXMgYmVlbiB1cGRhdGVkLg== - U3ViamVjdDogWW91ciBNb2RpZmljYXRpb25zIGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIgLz4iIC0gQXBwcm92ZWQhCgpZb3VyIE1vZGlmaWNhdGlvbnMgZm9yICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIiAvPiIgbGluayB3ZXJlIGFwcHJvdmVkIGJ5IHRoZSB3ZWJzaXRlLg== - U3ViamVjdDogWW91ciBNb2RpZmljYXRpb25zIGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBEZWNsaW5lZAoKWW91ciBtb2RpZmljYXRpb25zIGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgYXJ0aWNsZSB3ZXJlIGRlY2xpbmVkLg== - U3ViamVjdDogTW9kaWZpY2F0aW9ucyBmb3IgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIC0gUGVuZGluZwoKTW9kaWZpY2F0aW9ucyBmb3IgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iIGFydGljbGUgYXJlIHBlbmRpbmcgZm9yIGFkbWluaXN0cmF0aXZlIGFwcHJvdmFsLg== - U3ViamVjdDogQXJ0aWNsZSBNb2RpZmljYXRpb25zIGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBQZW5kaW5nCgpNb2RpZmljYXRpb25zIGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgYXJ0aWNsZSBhcmUgcGVuZGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwu - U3ViamVjdDogWW91ciBDb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgYXJ0aWNsZSAtIFB1Ymxpc2hlZAoKWW91ciBjb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgYXJ0aWNsZSBoYXMgYmVlbiBwdWJsaXNoZWQu - U3ViamVjdDogTmV3IENvbW1lbnQgZm9yICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiBBcnRpY2xlIFN1Ym1pdHRlZAoKTmV3IGNvbW1lbnQgZm9yICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiBhcnRpY2xlIGhhcyBiZWVuIHN1Ym1pdHRlZC4= - U3ViamVjdDogWW91ciBDb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBQZW5kaW5nCgpUaGFuayB5b3UgZm9yIHN1Ym1pdHRpbmcgeW91ciBjb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIuPGJyLz48YnIvPg0KDQpDdXJyZW50bHkgaXQncyBwZW5kaW5nIGZvciBhZG1pbmlzdHJhdGl2ZSBhcHByb3ZhbCBhbmQgd2lsbCBiZSBwdWJsaXNoZWQgc2hvcnRseS4= - WC1NYWlsZXI6IEluLVBvcnRhbApTdWJqZWN0OiBZb3VyIENvbW1lbnQgZm9yICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiAtIFBlbmRpbmcgW2FkbWluXQoKVGhhbmsgeW91IGZvciBzdWJtaXR0aW5nIHlvdXIgY29tbWVudCBmb3IgIjxpbnAyOm5fRmllbGQgbmFtZT0iVGl0bGUiLz4iLjxici8+PGJyLz4NCg0KQ3VycmVudGx5IGl0J3MgcGVuZGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwgYW5kIHdpbGwgYmUgcHVibGlzaGVkIHNob3J0bHku - U3ViamVjdDogWW91ciBDb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBQdWJsaXNoZWQKClRoYW5rIHlvdSBmb3Igc3VibWl0dGluZyB5b3VyIGNvbW1lbnQgZm9yICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+Ii48YnIvPjxici8+DQoNCkl0J3MgYWxyZWFkeSBwdWJsaXNoZWQgb24gdGhlIHdlYnNpdGUh - U3ViamVjdDogWW91ciBDb21tZW50IGZvciAiPGlucDI6bl9GaWVsZCBuYW1lPSJUaXRsZSIvPiIgLSBEZWNsaW5lZAoKU29ycnksIGJ1dCB5b3VyIGNvbW1lbnQgZm9yICI8aW5wMjpuX0ZpZWxkIG5hbWU9IlRpdGxlIi8+IiBhcnRpY2xlIGhhcyBiZWVuIGRlY2xpbmVkLg== - - - \ No newline at end of file Index: branches/5.0.x/in-news/install/install_schema.sql =================================================================== diff -u -N --- branches/5.0.x/in-news/install/install_schema.sql (revision 12747) +++ branches/5.0.x/in-news/install/install_schema.sql (revision 0) @@ -1,86 +0,0 @@ -CREATE TABLE News ( - NewsId int(11) NOT NULL AUTO_INCREMENT, - Title varchar(255) NOT NULL DEFAULT '', - l1_Title varchar(255) NOT NULL DEFAULT '', - l2_Title varchar(255) NOT NULL DEFAULT '', - l3_Title varchar(255) NOT NULL DEFAULT '', - l4_Title varchar(255) NOT NULL DEFAULT '', - l5_Title varchar(255) NOT NULL DEFAULT '', - AutomaticFilename tinyint(3) unsigned NOT NULL DEFAULT '1', - Excerpt text, - l1_Excerpt text, - l2_Excerpt text, - l3_Excerpt text, - l4_Excerpt text, - l5_Excerpt text, - Author varchar(255) NOT NULL DEFAULT '', - Body text, - l1_Body text, - l2_Body text, - l3_Body text, - l4_Body text, - l5_Body text, - MetaKeywords varchar(255) DEFAULT NULL, - MetaDescription text, - CreatedOn int(11) DEFAULT NULL, - TextFormat int(11) NOT NULL DEFAULT '0', - EndOn int(11) DEFAULT NULL, - Hits double(20,6) NOT NULL DEFAULT '0.000000', - CachedRating varchar(10) DEFAULT '0', - CachedVotesQty int(11) NOT NULL DEFAULT '0', - CreatedById int(11) NOT NULL DEFAULT '-1', - Priority int(11) NOT NULL DEFAULT '0', - `Status` tinyint(4) NOT NULL DEFAULT '2', - EditorsPick tinyint(4) NOT NULL DEFAULT '0', - LeadStory tinyint(4) NOT NULL DEFAULT '0', - LeadCatStory tinyint(4) NOT NULL DEFAULT '0', - ResourceId int(11) DEFAULT NULL, - CachedReviewsQty int(11) NOT NULL DEFAULT '0', - StartDate int(11) DEFAULT NULL, - NewItem tinyint(4) NOT NULL DEFAULT '2', - PopItem tinyint(4) NOT NULL DEFAULT '2', - HotItem tinyint(4) NOT NULL DEFAULT '2', - Archived int(11) NOT NULL DEFAULT '0', - Modified int(11) DEFAULT NULL, - ModifiedById int(11) NOT NULL DEFAULT '-1', - OrgId int(11) DEFAULT NULL, - PRIMARY KEY (NewsId), - UNIQUE KEY ResourceId (ResourceId), - KEY Title (Title), - KEY l1_Title (l1_Title), - KEY l2_Title (l2_Title), - KEY l3_Title (l3_Title), - KEY l4_Title (l4_Title), - KEY l5_Title (l5_Title), - KEY Excerpt (Excerpt(5)), - KEY l1_Excerpt (l1_Excerpt(5)), - KEY l2_Excerpt (l2_Excerpt(5)), - KEY l3_Excerpt (l3_Excerpt(5)), - KEY l4_Excerpt (l4_Excerpt(5)), - KEY l5_Excerpt (l5_Excerpt(5)), - KEY Body (Body(5)), - KEY l1_Body (l1_Body(5)), - KEY l2_Body (l2_Body(5)), - KEY l3_Body (l3_Body(5)), - KEY l4_Body (l4_Body(5)), - KEY l5_Body (l5_Body(5)), - KEY CreatedOn (CreatedOn), - KEY EndOn (EndOn), - KEY Priority (Priority), - KEY `Status` (`Status`), - KEY EditorsPick (EditorsPick), - KEY Hits (Hits), - KEY Modified (Modified), - KEY NewItem (NewItem), - KEY PopItem (PopItem), - KEY HotItem (HotItem), - KEY StartDate (StartDate), - KEY Archived (Archived) -); - -CREATE TABLE NewsCustomData ( - CustomDataId int(11) NOT NULL auto_increment, - ResourceId int(10) unsigned NOT NULL default '0', - KEY ResourceId (ResourceId), - PRIMARY KEY (CustomDataId) -); \ No newline at end of file Index: branches/5.0.x/in-news/install/remove_schema.sql =================================================================== diff -u -N --- branches/5.0.x/in-news/install/remove_schema.sql (revision 12747) +++ branches/5.0.x/in-news/install/remove_schema.sql (revision 0) @@ -1,2 +0,0 @@ -DROP TABLE News; -DROP TABLE NewsCustomData; \ No newline at end of file Index: branches/5.0.x/in-news/install/upgrades.php =================================================================== diff -u -N --- branches/5.0.x/in-news/install/upgrades.php (revision 12747) +++ branches/5.0.x/in-news/install/upgrades.php (revision 0) @@ -1,118 +0,0 @@ -_toolkit =& $instance; - } - - /** - * Changes table structure, where multilingual fields of TEXT type are present - * - * @param string $mode when called mode {before, after) - */ - function Upgrade_5_0_0($mode) - { - if ($mode == 'after') { - $root_category = $this->Application->findModule('Name', 'In-News', 'RootCat'); - - $sql = 'UPDATE ' . $this->Application->getUnitOption('c', 'TableName') . ' - SET UseMenuIconUrl = 1, MenuIconUrl = "in-news/img/menu_articles.gif" - WHERE ' . $this->Application->getUnitOption('c', 'IDField') . ' = ' . $root_category; - $this->Conn->Query($sql); - - $this->_updateDetailTemplate('n', 'innews/detail', 'in-news/designs/detail'); - } - } - - /** - * Replaces deprecated detail template design with new one - * - * @param string $prefix - * @param string $from_template - * @param string $to_template - */ - function _updateDetailTemplate($prefix, $from_template, $to_template) - { - $sql = 'SELECT CustomFieldId - FROM ' . TABLE_PREFIX . 'CustomField - WHERE FieldName = "' . $prefix . '_ItemTemplate"'; - $custom_field_id = $this->Conn->GetOne($sql); - - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - /* @var $ml_formatter kMultiLanguage */ - - $field = $ml_formatter->LangFieldName('cust_' . $custom_field_id, true); - - $sql = 'UPDATE ' . TABLE_PREFIX . 'CategoryCustomData - SET ' . $field . ' = "' . $to_template . '" - WHERE ' . $field . ' = "' . $from_template . '"'; - $this->Conn->Query($sql); - } - - /** - * Update to 5.0.1 - * - * @param string $mode when called mode {before, after) - */ - function Upgrade_5_0_1($mode) - { - if ($mode == 'after') { - $this->_updateDetailTemplate('n', 'in-news/designs/detail', 'in-news/articles/article_detail'); - - // delete old events - $events_to_delete = Array ( 'NEWS.OWNER.MODIFY.PENDING', 'NEWS.OWNER.MODIFY' ); - - $sql = 'SELECT EventId FROM ' . TABLE_PREFIX . 'Events - WHERE Event IN ("' . implode('","', $events_to_delete) . '")'; - $event_ids = $this->Conn->GetCol($sql); - - if ($event_ids) { - $sql = 'DELETE FROM ' . TABLE_PREFIX . 'EmailMessage - WHERE EventId IN (' . implode(',', $event_ids) . ')'; - $this->Conn->Query($sql); - - $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Events - WHERE EventId IN (' . implode(',', $event_ids) . ')'; - $this->Conn->Query($sql); - - $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase - WHERE Phrase IN ("la_event_news.owner.modify", "la_event_news.owner.modify.pending")'; - $this->Conn->Query($sql); - } - } - } - } \ No newline at end of file Index: branches/5.0.x/in-news/install/upgrades.sql =================================================================== diff -u -N --- branches/5.0.x/in-news/install/upgrades.sql (revision 12747) +++ branches/5.0.x/in-news/install/upgrades.sql (revision 0) @@ -1,58 +0,0 @@ -# ===== v 4.3.9 ===== - -INSERT INTO ImportScripts VALUES (DEFAULT, 'Articles from CSV file [In-News]', '', 'n', 'In-News', '', 'CSV', '1'); - -# ===== v 5.0.0 ===== -ALTER TABLE News ADD INDEX (StartDate), ADD INDEX (Archived); - -UPDATE Category SET Template = '/in-news/designs/section' WHERE Template = 'innews/index'; -UPDATE Category SET CachedTemplate = '/in-news/designs/section' WHERE CachedTemplate = 'innews/index'; - -UPDATE ConfigurationValues SET VariableValue = '/in-news/designs/section' WHERE VariableName = 'n_CategoryTemplate'; -UPDATE ConfigurationValues SET VariableValue = 'in-news/designs/detail' WHERE VariableName = 'n_ItemTemplate'; - -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:articles.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:setting_folder.view', 11, 1, 1, 0); -DELETE FROM Permissions WHERE Permission LIKE 'in-news:innews_general.%'; - -UPDATE Phrase SET Module = 'In-News' WHERE ((Phrase LIKE '%Article%' OR Phrase LIKE '%News%') AND (Module = 'Core') AND Phrase NOT IN ('la_ToolTip_NewSearchConfig', 'la_tooltip_newstylesheet')); - -UPDATE Phrase SET Module = 'In-News' WHERE Phrase = 'la_title_In-News'; - -# ===== v 5.0.1 ===== -UPDATE ConfigurationValues SET VariableValue = 'in-news/articles/article_detail' WHERE VariableName = 'n_ItemTemplate'; - -UPDATE ConfigurationAdmin -SET ValueList = 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn' -WHERE VariableName IN ('News_SortReviews', 'News_SortReviews2'); - -UPDATE ConfigurationAdmin SET ValueList = 'ASC=la_common_Ascending,DESC=la_common_Descending' -WHERE VariableName IN ('News_SortReviewsOrder', 'News_SortReviewsOrder2'); - -UPDATE ConfigurationAdmin -SET ValueList = '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year' -WHERE VariableName IN ('News_ReviewDelay_Interval', 'News_RatingDelay_Interval'); - -UPDATE CustomField SET FieldLabel = 'la_fld_RssSource', Prompt = 'la_fld_RssSource' WHERE FieldName = 'RssSource'; -UPDATE CustomField SET FieldLabel = 'la_fld_RssDefaultExpiration', Prompt = 'la_fld_RssDefaultExpiration' WHERE FieldName = 'RssDefaultExpiration'; -UPDATE CustomField SET FieldLabel = 'la_fld_RssUpdateInterval', Prompt = 'la_fld_RssUpdateInterval' WHERE FieldName = 'RssUpdateInterval'; -UPDATE CustomField SET FieldLabel = 'la_fld_RssExpireInterval', Prompt = 'la_fld_RssExpireInterval' WHERE FieldName = 'RssExpireInterval'; -UPDATE CustomField SET FieldLabel = 'la_fld_RssDeleteExpired', Prompt = 'la_fld_RssDeleteExpired' WHERE FieldName = 'RssDeleteExpired'; - -UPDATE CustomField SET FieldLabel = 'la_fld_RssLastExpired', Prompt = 'la_fld_RssLastExpired' WHERE FieldName = 'RssLastExpired'; -UPDATE CustomField SET FieldLabel = 'la_fld_RssDefaultExpirationType', Prompt = 'la_fld_RssDefaultExpirationType' WHERE FieldName = 'RssDefaultExpirationType'; -UPDATE CustomField SET FieldLabel = 'la_fld_RssExpireIntervalType', Prompt = 'la_fld_RssExpireIntervalType' WHERE FieldName = 'RssExpireIntervalType'; -UPDATE CustomField SET FieldLabel = 'la_fld_RssUpdateIntervalType', Prompt = 'la_fld_RssUpdateIntervalType' WHERE FieldName = 'RssUpdateIntervalType'; -UPDATE CustomField SET FieldLabel = 'la_fld_RssLastUpdated', Prompt = 'la_fld_RssLastUpdated' WHERE FieldName = 'RssLastUpdated'; -UPDATE CustomField SET FieldLabel = 'la_fld_RssArticleCRC', Prompt = 'la_fld_RssArticleCRC' WHERE FieldName = 'RssArticleCRC'; -UPDATE CustomField SET FieldLabel = 'la_fld_cust_n_ItemTemplate', Prompt = 'la_fld_cust_n_ItemTemplate' WHERE FieldName = 'n_ItemTemplate'; - -INSERT INTO Events VALUES(DEFAULT, 'NEWS.REVIEW.ADD.PENDING', NULL, 1, 0, NULL, 'In-News', 'la_event_article.review.add.pending', 1); - -UPDATE ConfigurationAdmin SET ValueList = 'style="width: 50px;"' WHERE VariableName IN ('News_ReviewDelay_Value', 'News_RatingDelay_Value'); - -# ===== v 5.0.2-B1 ===== -ALTER TABLE News - CHANGE CreatedOn CreatedOn INT(11) NULL DEFAULT NULL, - CHANGE StartDate StartDate INT(11) NULL DEFAULT NULL, - CHANGE Modified Modified INT(11) NULL DEFAULT NULL; \ No newline at end of file Index: branches/5.0.x/in-news/install.php =================================================================== diff -u -N --- branches/5.0.x/in-news/install.php (revision 12747) +++ branches/5.0.x/in-news/install.php (revision 0) @@ -1,53 +0,0 @@ -toolkit; - /* @var $toolkit kInstallToolkit */ - } - - $application =& kApplication::Instance(); - $application->Init(); - - if ($application->RecallVar('user_id') != -1) { - die('restricted access!'); - } - - $category =& $toolkit->createModuleCategory('News', 'News Articles', '/in-news/designs/section', 'in-news/img/menu_articles.gif'); - - $toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql'); - $toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{NewsCatId}', $category->GetID()); - $toolkit->ImportLanguage('/' . $module_folder . '/install/english'); - - $toolkit->SetModuleRootCategory($module_folder, $category->GetID()); - - $toolkit->linkCustomFields($module_folder, 'n', 2); // to create Custom Fields for News - $toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field - $toolkit->setModuleItemTemplate($category, 'n', 'in-news/articles/article_detail'); - - $toolkit->finalizeModuleInstall($module_folder, true); \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/import.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/import.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/import.tpl (revision 0) @@ -1,232 +0,0 @@ - - - - - - - - - - - - - -
- -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
- " id="_1" checked value="1" /> - - - - " id="" onclick="check_radio('_1');"> -
- " id="_2" checked value="2" /> - - - - -
-
- - - - - - - - - - - -
- " id="btn_move_up" onclick="move_options_up('', 1)" class="button"> - " id="btn_move_down" onclick="move_options_down('', 1)" class="button">
-
-

:
- - " value="" /> - - ', '')" class="button">
-
- ', ''); select_sort('');" class="button"> -
- -
-
- - - ', 'ImportCategory', null, 'OnSaveSettings');"> -
- - - - - - - - - - -
- checked name="" id="_1" value="1" /> - - -
- checked name="" id="_2" value="2" /> - - - - - -
-
-
- - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/export_progress.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/export_progress.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/export_progress.tpl (revision 0) @@ -1,14 +0,0 @@ - - - - - - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/import_progress.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/import_progress.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/import_progress.tpl (revision 0) @@ -1,14 +0,0 @@ - - - - - - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/catalog_tab.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/catalog_tab.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/catalog_tab.tpl (revision 0) @@ -1,64 +0,0 @@ - - - - - a_toolbar.AddButton( - new ToolBarButton( - 'in-news:new_article', - '', - add_item, - true - ) - ); - - - -
" view_template="in-news/catalog_tab" edit_template="in-news/articles/articles_edit" category_id="-1" dep_buttons="new_article" class="catalog-tab">
- -
- - - $Catalog.setItemCount('', ''); - - - - - - - - - - $Catalog.setItemCount('', ''); - $Catalog.setCurrentCategory('', ); - $Catalog.saveSearch('', '', ''); - - - - - - - - - - - - - - Grids[''].AddAlternativeGrid('', true); - - Grids[''].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6')); - $Catalog.reflectPasteButton(); - $Catalog.setViewMenu(''); - - Grids[''].DblClick = function() {return false}; - - #separator# - - - - - -
-
- - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/export.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/export.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/export.tpl (revision 0) @@ -1,127 +0,0 @@ - - - - - - - - - - - - -
- -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
- " onclick="move_options_up('', 1)" class="button"> - " onclick="move_options_down('', 1)" class="button">
-
-

:
- - " value="" /> - - ', '')" class="button">
-
- ', ''); select_sort('');" class="button"> -
- -
-
- - - - - - - - - - - - - -
- checked name="" id="_1" value="1" /> - - -
- error"> *: - " id="" value="" size="2" maxlength="1" />
- (will look like "Category:Sub-category:Sub-sub-category") - -
- checked name="" id="_2" value="2" /> - -
- (the fields will be titled Category1..CategoryN accordingly) -
-
-
- - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/category_properties.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/category_properties.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/category_properties.tpl (revision 0) @@ -1,32 +0,0 @@ - - - - - - - - " id="" value="" tabindex="" size="" maxlength="" class="" onblur=""> - - - - - - - - - - - - - - - - - - Index: branches/5.0.x/in-news/admin_templates/articles/relations_edit.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/relations_edit.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/relations_edit.tpl (revision 0) @@ -1,49 +0,0 @@ - - - - - - - - - - -
- -
- - - - - - -
- - - - - - - - - - - - - -
-
- - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/articles/file_edit.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/file_edit.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/file_edit.tpl (revision 0) @@ -1,41 +0,0 @@ - - - - - - - - - - -
- -
- - - - -
- - - - - - - -
-
- - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/articles/articles_images.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/articles_images.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/articles_images.tpl (revision 0) @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - -
- -
- - - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/articles/articles_reviews.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/articles_reviews.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/articles_reviews.tpl (revision 0) @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - -
- -
- - - - - - - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/articles/images_edit.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/images_edit.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/images_edit.tpl (revision 0) @@ -1,60 +0,0 @@ - - - - - - - - - - - - -
- -
- - - - -
- - - - - - - - - - - - - - - - - - - -
-
- - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/articles/articles_custom.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/articles_custom.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/articles_custom.tpl (revision 0) @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - -
- -
- - - - - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/articles/articles_files.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/articles_files.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/articles_files.tpl (revision 0) @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - -
- -
- - - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/articles/articles_relations.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/articles_relations.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/articles_relations.tpl (revision 0) @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - -
- -
- - - -"> -"> - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/articles/review_edit.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/review_edit.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/review_edit.tpl (revision 0) @@ -1,59 +0,0 @@ - - - - - - - - - - -
- -
- - - - -
- - - - - - - - - - - - -
-
- - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/articles/articles_categories.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/articles_categories.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/articles_categories.tpl (revision 0) @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - -
- -
- - - - - - - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/articles/articles_edit.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/articles/articles_edit.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/articles/articles_edit.tpl (revision 0) @@ -1,146 +0,0 @@ - - - - - - - - - - - - -
- -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " /> - - - - - - - -
-
- - -
- -
-
- - - - \ No newline at end of file Index: branches/5.0.x/in-news/admin_templates/user_item_tab.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/user_item_tab.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/user_item_tab.tpl (revision 0) @@ -1,43 +0,0 @@ - - - - -
" view_template="in-news/user_item_tab" edit_template="in-news/articles/articles_edit" dep_buttons="new_article" category_id="-1" class="catalog-tab">
- -
- - - - - - - - - - - $Catalog.setItemCount('', ''); - $Catalog.setCurrentCategory('', ); - $Catalog.saveSearch('', '', ''); - - - - - - - - - - - - Grids[''].SetDependantToolbarButtons( new Array('edit','delete')); - $Catalog.setViewMenu(''); - #separator# - - - - - -
-
- - \ No newline at end of file Index: branches/RC/in-news/admin_templates/img/logo_bg.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/itemicons/icon16_article.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/itemicons/icon16_article_disabled.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/itemicons/icon16_article_new.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/itemicons/icon16_article_pick.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/itemicons/icon16_article_pending.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/itemicons/icon16_article_pop.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/itemicons/icon16_article_hot.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/icons/icon46_articles.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/icons/icon46_list_settings_in-newz.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/icons/icon46_settings_in-newz.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/icons/icon24_settings_in-newz.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/toolbar/tool_new_article.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/toolbar/tool_new_article_f3.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/RC/in-news/admin_templates/img/toolbar/tool_new_article_f2.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/5.0.x/in-news/admin_templates/export_finish.tpl =================================================================== diff -u -N --- branches/5.0.x/in-news/admin_templates/export_finish.tpl (revision 12747) +++ branches/5.0.x/in-news/admin_templates/export_finish.tpl (revision 0) @@ -1,43 +0,0 @@ - - - - - - - - - - -
- -
- -
- - - - - - - - - - - -
- -   - "> -
-
- - \ No newline at end of file Index: branches/5.0.x/in-news/units/articles/articles_tag_processor.php =================================================================== diff -u -N --- branches/5.0.x/in-news/units/articles/articles_tag_processor.php (revision 12747) +++ branches/5.0.x/in-news/units/articles/articles_tag_processor.php (revision 0) @@ -1,33 +0,0 @@ -PrintList2($params); - } - - function ListArticles($params) - { - return $this->PrintList2($params); - } - - function ArticleLink($params) - { - return $this->ItemLink($params, 'article'); - } - } \ No newline at end of file Index: branches/5.0.x/in-news/units/articles/articles_config.php =================================================================== diff -u -N --- branches/5.0.x/in-news/units/articles/articles_config.php (revision 12747) +++ branches/5.0.x/in-news/units/articles/articles_config.php (revision 0) @@ -1,476 +0,0 @@ - 'n', - - 'ItemClass' => Array('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - - 'ConfigPriority' => 0, - - 'RewritePriority' => 102, - 'RewriteListener' => 'ModRewriteHelper:CategoryItemRewriteListener', - - 'Hooks' => Array ( - Array ( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'c', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUpdateCategoryCustomFields', - ), - - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => '', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => '#file', - 'DoSpecial' => '*', - 'DoEvent' => 'OnDefineFiles', - ), - - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => '', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => 'cdata', - 'DoSpecial' => '*', - 'DoEvent' => 'OnDefineCustomFields', - ), - ), - - 'CatalogItem' => true, - 'AdminTemplatePath' => 'articles', - 'AdminTemplatePrefix' => 'articles_', - 'SearchConfigPostfix' => 'articles', - - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'event', - 4 => 'mode', - ), - - 'RegularEvents' => Array( - 'rss_category_update' => Array('EventName' => 'OnUpdateRSSAtricles', 'RunInterval' => 0, 'Type' => reBEFORE), - ), - - 'IDField' => 'NewsId', - 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events - - 'TitleField' => 'Title', // field, used in bluebar when editing existing item - 'TitlePhrase' => 'la_Text_Article', // phrase used to specify item type in relationship list - - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('n' => '!la_title_AddingArticle!'), - 'edit_status_labels' => Array('n' => '!la_title_EditingArticle!'), - 'new_titlefield' => Array('n' => '!la_title_NewArticle!'), - ), - - 'articles_edit' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_General!"), - - 'articles_categories'=>Array('prefixes' => Array('n','n-ci_List'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Categories!"), - 'articles_relations'=> Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Relations!"), - 'articles_images' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Images!"), - 'articles_files' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Files!"), - 'articles_reviews' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Reviews!"), - 'articles_custom' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Custom!"), - - 'images_edit' => Array( 'prefixes' => Array('n', 'n-img'), - 'new_status_labels' => Array('n-img'=>'!la_title_Adding_Image!'), - 'edit_status_labels' => Array('n-img'=>'!la_title_Editing_Image!'), - 'new_titlefield' => Array('n-img'=>'!la_title_New_Image!'), - 'format' => "#n_status# '#n_titlefield#' - #n-img_status# '#n-img_titlefield#'", - ), - 'file_edit' => Array ( - 'prefixes' => Array ('n', 'n-file'), - 'new_status_labels' => Array ('n-file' => "!la_title_AddingFile!"), - 'edit_status_labels' => Array ('n-file' => '!la_title_EditingFile!'), - 'new_titlefield' => Array ('n-file' => '!la_title_NewFile!'), - 'format' => "#n_status# '#n_titlefield#' - #n-file_status# '#n-file_titlefield#'", - ), - - 'reviews_edit' => Array( 'prefixes' => Array('n', 'n-rev'), - 'new_status_labels' => Array('n-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"), - 'edit_status_labels' => Array('n-rev'=>'!la_title_Editing_Review!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rev_status#", - ), - - 'relations_edit' => Array( 'prefixes' => Array('n', 'n-rel'), - 'new_status_labels' => Array('n-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), - 'edit_status_labels' => Array('n-rel'=>'!la_title_Editing_Relationship!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rel_status#", - ), - - 'tree_in-news' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-News', 'Version')), - - 'articles_export' => Array('format' => '!la_title_ArticlesExport!'), - - 'articles_import' => Array('format' => '!la_title_ImportArticles!'), - ), - - 'EditTabPresets' => Array ( - 'Default' => Array ( - Array ('title' => 'la_tab_General', 't' => 'in-news/articles/articles_edit', 'priority' => 1), - Array ('title' => 'la_tab_Categories', 't' => 'in-news/articles/articles_categories', 'priority' => 2), - Array ('title' => 'la_tab_Relations', 't' => 'in-news/articles/articles_relations', 'priority' => 3), - Array ('title' => 'la_tab_Images', 't' => 'in-news/articles/articles_images', 'priority' => 4), - Array ('title' => 'la_tab_Files', 't' => 'in-news/articles/articles_files', 'priority' => 5), - Array ('title' => 'la_tab_Reviews', 't' => 'in-news/articles/articles_reviews', 'priority' => 6), - Array ('title' => 'la_tab_Custom', 't' => 'in-news/articles/articles_custom', 'priority' => 7), - ), - ), - - 'PermItemPrefix' => 'NEWS', - - 'PermTabText' => 'In-News', - 'PermSection' => Array('main' => 'CATEGORY:in-news:articles_list', 'search' => 'in-news:configuration_search', 'email' => 'in-news:configuration_email', 'custom' => 'in-news:configuration_custom'), - - 'Sections' => Array( - /*'in-news' => Array( - 'parent' => 'in-portal:root', - 'icon' => 'settings_in-newz', - 'label' => 'la_title_In-News', - 'url' => Array('t' => 'index', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view'), - 'priority' => 3.2, - 'container' => true, - 'type' => stTREE, - ),*/ - - 'in-news:articles' => Array( - 'parent' => 'in-portal:site', - 'icon' => 'articles', - 'label' => 'la_tab_Articles', - 'url' => Array('t' => 'catalog/advanced_view', 'anchor' => 'tab-n.showall', 'pass' => 'm'), - 'onclick' => 'setCatalogTab(\'n.showall\')', - 'permissions' => Array('view'), - 'priority' => 3.3, - 'type' => stTREE, - ), - - // article settings - 'in-news:setting_folder' => Array ( - 'parent' => 'in-portal:system', - 'icon' => 'conf_news', - 'label' => 'la_title_In-News', - 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view'), - 'priority' => 3.4, - 'container' => true, - 'type' => stTREE, - ), - - /*'in-news:innews_general' => Array( - 'parent' => 'in-news:setting_folder', - 'icon' => 'core:settings_general', - 'label' => 'la_tab_GeneralSettings', - 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 0.9, - 'type' => stTREE, - ),*/ - - 'in-news:configuration_output' => Array( - 'parent' => 'in-news:setting_folder', - 'icon' => 'core:conf_output', - 'label' => 'la_tab_ConfigOutput', - 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 1, - 'type' => stTREE, - ), - - 'in-news:configuration_search' => Array( - 'parent' => 'in-news:setting_folder', - 'icon' => 'core:conf_search', - 'label' => 'la_tab_ConfigSearch', - 'url' => Array('t' => 'config/config_search', 'module_key' => 'articles', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 2, - 'type' => stTREE, - ), - - 'in-news:configuration_email' => Array( - 'parent' => 'in-news:setting_folder', - 'icon' => 'core:conf_email', - 'label' => 'la_tab_ConfigE-mail', - 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 3, - 'type' => stTREE, - ), - - 'in-news:configuration_custom' => Array( - 'parent' => 'in-news:setting_folder', - 'icon' => 'core:conf_customfields', - 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 2, 'pass_section' => true, 'pass' => 'm,cf'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), - 'priority' => 4, - 'type' => stTREE, - ), - - ), - - 'FilterMenu' => Array( - 'Groups' => Array( - Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER), - ), - 'Filters' => Array( - 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), - 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ), - 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), - 's1' => Array(), - 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), - 'show_hot' => Array('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), - 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), - 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), - ) - ), - - 'CatalogSelectorName' => 'newslist', - - 'ItemPropertyMappings' => Array( - 'NewDays' => 'News_CatNewDays', // number of days item to be NEW - 'MinPopVotes' => 'News_MinPopVotes', // minimum number of votes for an item to be POP - 'MinPopRating' => 'News_MinPopRating',// minimum rating for an item to be POP - 'MaxHotNumber' => 'News_MaxHotNumber',// maximum number of HOT items - - 'HotLimit' => 'News_HotLimit', // variable name in inp_Cache table - 'ClickField' => 'Hits', // item click count is stored here (in item table) - ), - - 'ItemType' => 2, // this is used when relation to product is added from in-portal and via-versa - - 'ViewMenuPhrase' => 'la_title_Articles', - 'CatalogTabIcon' => 'in-news:icon16_articles.png', - 'UsePendingEditing' => true, // item editing is controlled by NEWS.ADD/EDIT, NEWS.ADD/EDIT.PENDING permissions - - 'StatisticsInfo' => Array( - 'pending' => Array( - 'icon' => 'icon16_article_pending.gif', - 'label' => 'la_Text_Articles', - 'js_url' => '#url#', - 'url' => Array('t' => 'catalog/advanced_view', 'SetTab' => 'n', 'pass' => 'm,n.showall', 'n.showall_event' => 'OnSetFilterPattern', 'n.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'), - 'status' => STATUS_PENDING, - ), - ), - - 'TableName' => TABLE_PREFIX.'News', - - 'CalculatedFields' => Array( - '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = -1, "root", IF (%1$s.CreatedById = -2, "Guest", "n/a")), u.Login)', - 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', - 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', - 'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath', - 'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat', - 'ParentPath' => TABLE_PREFIX.'Category.ParentPath', - - 'SameImages' => 'img.SameImages', - 'LocalThumb' => 'img.LocalThumb', - 'ThumbPath' => 'img.ThumbPath', - 'ThumbUrl' => 'img.ThumbUrl', - 'LocalImage' => 'img.LocalImage', - 'LocalPath' => 'img.LocalPath', - 'FullUrl' => 'img.Url', - ), - ), - - 'CacheModRewrite' => true, - - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'Images img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 - LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId', - ), // key - special, value - list select sql - - 'ListSortings' => Array( - '' => Array( - 'ForcedSorting' => Array('Priority' => 'desc'), - 'Sorting' => Array('Title' => 'asc'), - ) - ), - 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'Images img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId'), - - 'SubItems' => Array('n-rev', 'n-ci', 'n-rel', 'n-img', 'n-cdata', 'n-fav', 'n-file'), - - 'Fields' => Array ( - 'NewsId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Title' => Array('type' => 'string', /*'formatter' => 'kMultiLanguage', */'not_null' => 1, 'required' => 1, 'default' => '', 'max_len' => 255), - 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1), - 'Excerpt' => Array('type' => 'string', /*'formatter' => 'kMultiLanguage',*/ 'default' => null), - 'Author' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Body' => Array('type' => 'string', 'formatter' => 'kFormatter',/*'kMultiLanguage'*/ 'using_fck' => 1, 'required' => 1, 'default' => null), - 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), - 'TextFormat' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'EndOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), - 'Hits' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), - 'CachedRating' => Array('type' => 'string', 'default' => 0), - 'CachedVotesQty' => Array('type' => 'int','not_null' => 1,'default' => 0), - 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => -1), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), - 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadCatStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array('type' => 'int', 'default' => null), - 'CachedReviewsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StartDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), - 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'Archived' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => -1), - 'OrgId' => Array('type' => 'int', 'default' => null), - 'MetaKeywords' => Array('type' => 'string', 'default' => null), - 'MetaDescription' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - ), - - 'VirtualFields' => Array ( - 'MoreCategories' => Array ('type' => 'string', 'default' => ''), - - 'UserName' => Array('type' => 'string', 'default' => ''), - 'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0), - - 'cust_RssOriginalURL' => Array('type' => 'string', 'default' => ''), - 'cust_RssArticleCRC' => Array('type' => 'int', 'default' => 0), - 'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'CachedNavbar' => Array('type' => 'string', 'default' => ''), - 'ParentPath' => Array('type' => 'string', 'default' => ''), - - // for primary image - 'SameImages' => Array('type' => 'string', 'default' => ''), - 'LocalThumb' => Array('type' => 'string', 'default' => ''), - 'ThumbPath' => Array('type' => 'string', 'default' => ''), - 'ThumbUrl' => Array('type' => 'string', 'default' => ''), - 'LocalImage' => Array('type' => 'string', 'default' => ''), - 'LocalPath' => Array('type' => 'string', 'default' => ''), - 'FullUrl' => Array('type' => 'string', 'default' => ''), - - // export related fields: begin - 'CategoryId' => Array('type' => 'int', 'default' => 0), - 'ExportFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CSV', /*2 => 'XML'*/), 'default' => 1), - 'ExportFilename' => Array('type' => 'string', 'default' => ''), - 'FieldsSeparatedBy' => Array('type' => 'string', 'default' => ','), - 'FieldsEnclosedBy' => Array('type' => 'string', 'default' => '"'), - 'LineEndings' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Windows', 2 => 'UNIX'), 'default' => 1), - 'LineEndingsInside' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CRLF', 2 => 'LF'), 'default' => 2), - 'IncludeFieldTitles' => Array('type' => 'int', 'default' => 1), - 'ExportColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()), - 'AvailableColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()), - 'CategoryFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1), - 'CategorySeparator' => Array('type' => 'string', 'default' => ':'), - 'IsBaseCategory' => Array('type' => 'int', 'default' => 0), - // export related fields: end - - // import related fields: begin - 'FieldTitles' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1), - 'ImportSource' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2), - 'ImportFilename' => Array('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/admin/export') . '/'), - 'ImportLocalFilename' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''), - 'CheckDuplicatesMethod' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1), - 'ReplaceDuplicates' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0), - 'DuplicateCheckFields' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('Title' => 'TITLE'), 'default' => '|Title|'), - 'SkipFirstRow' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1), - // import related fields: end - ), - - 'Grids' => Array( - 'Default' => Array ( - 'Icons' => Array ( - 0 => 'icon16_article_disabled.png', - 1 => 'icon16_article.png', - 2 => 'icon16_article_pending.png', - 'NEW' => 'icon16_article_new.png', - ), - - 'Fields' => Array ( - 'NewsId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Title' => Array ('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'UserName' => Array ('title' => 'la_col_Author', 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'LeadStory' => Array('title' => 'la_col_LeadStory', 'filter_block' => 'grid_options_filter', 'width' => 80, ), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory', 'filter_block' => 'grid_options_filter', 'width' => 85, ), - 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ), - 'StartDate' => Array('title' => 'la_col_StartDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - ), - ), - - - 'Radio' => Array ( - 'Icons' => Array ( - 0 => 'icon16_article_disabled.png', - 1 => 'icon16_article.png', - 2 => 'icon16_article_pending.png', - -2 => 'icon16_article_pending.png', // pending DUPLICATE item - 'NEW' => 'icon16_article_new.gif', - ), - - 'Selector' => 'radio', - 'Fields' => Array ( - 'NewsId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Title' => Array ('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'UserName' => Array ('title' => 'la_col_Author', 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'LeadStory' => Array('title' => 'la_col_LeadStory', 'filter_block' => 'grid_options_filter', 'width' => 80, ), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory', 'filter_block' => 'grid_options_filter', 'width' => 85, ), - 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ), - 'StartDate' => Array('title' => 'la_col_StartDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - ), - ), - ), - - 'ConfigMapping' => Array( - 'PerPage' => 'Perpage_News', - 'ShortListPerPage' => 'Perpage_News_Short', - 'ForceEditorPick' => 'News_ShowPick', - 'DefaultSorting1Field' => 'News_SortField', - 'DefaultSorting2Field' => 'News_SortField2', - 'DefaultSorting1Dir' => 'News_SortOrder', - 'DefaultSorting2Dir' => 'News_SortOrder2', - - 'RatingDelayValue' => 'News_RatingDelay_Value', - 'RatingDelayInterval' => 'News_RatingDelay_Interval', - ), - ); \ No newline at end of file Index: branches/5.0.x/in-news/units/articles/articles_event_handler.php =================================================================== diff -u -N --- branches/5.0.x/in-news/units/articles/articles_event_handler.php (revision 12747) +++ branches/5.0.x/in-news/units/articles/articles_event_handler.php (revision 0) @@ -1,503 +0,0 @@ -getObject(); - - if (!$this->Application->isAdminUser) { - $where_clause = '(Archived = 0) AND (StartDate < '.adodb_mktime().' OR StartDate = 0) AND (EndOn > '.adodb_mktime().' OR EndOn IS NULL)'; - $object->addFilter('archived_filter', $where_clause); - } - } - - /** - * Return type clauses for list bulding on front - * - * @param kEvent $event - * @return Array - */ - function getTypeClauses(&$event) - { - $type_clauses = parent::getTypeClauses($event); - - $type_clauses['site_lead']['include']='%1$s.LeadStory = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; - $type_clauses['site_lead']['except']='%1$s.LeadStory <> 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; - $type_clauses['site_lead']['having_filter'] = false; - - $type_clauses['cat_lead']['include']='%1$s.LeadCatStory = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; - $type_clauses['cat_lead']['except']='%1$s.LeadCatStory <> 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; - $type_clauses['cat_lead']['having_filter'] = false; - - return $type_clauses; - } - - - /** - * [REGULAR EVENT] Deletes expired articles + update existing articles from rss feed with new data (key - article url) - * - * @param kEvent $event - */ - function OnUpdateRSSAtricles(&$event) - { - $category_table = $this->Application->getUnitOption('c', 'TableName'); - $custom_table = $this->Application->getUnitOption('c-cdata', 'TableName'); - - $category_custom_fields = $this->getCustomColumns('c'); - $article_custom_fields = $this->getCustomColumns($event->Prefix); - - - // update categories which sould be updated - $sql = 'SELECT cd.*, c.CategoryId - FROM '.$category_table.' c - LEFT JOIN '.$custom_table.' cd ON c.ResourceId = cd.ResourceId - WHERE (IF(cd.'.$category_custom_fields['RssLastUpdated'].' IS NULL, 0, cd.'.$category_custom_fields['RssLastUpdated'].') + - cd.'.$category_custom_fields['RssUpdateInterval'].' * cd.'.$category_custom_fields['RssUpdateIntervalType'].' <= - '.adodb_mktime().') AND (LENGTH('.$category_custom_fields['RssSource'].') > 0)'; - $categories = $this->Conn->Query($sql, 'CategoryId'); - if ($categories) { - $resource_ids = Array(); - foreach ($categories as $category_id => $category_data) { - $resource_ids[] = $category_data['ResourceId']; - $event->setEventParam('source_url', $category_data[ $category_custom_fields['RssSource'] ]); - $event->setEventParam('category_id', $category_id); - $event->setEventParam('custom_fields', $article_custom_fields); - $event->setEventParam('life_time', $category_data[ $category_custom_fields['RssDefaultExpiration'] ] * $category_data[ $category_custom_fields['RssDefaultExpirationType'] ]); - $this->parseFeed($event); - } - - $sql = 'UPDATE '.$custom_table.' - SET '.$category_custom_fields['RssLastUpdated'].' = '.adodb_mktime().' - WHERE ResourceId IN ('.implode(',', $resource_ids).')'; - $this->Conn->Query($sql); - } - - // delete expired articles from feed categories - $sql = 'SELECT c.CategoryId, c.ResourceId - FROM '.$category_table.' c - LEFT JOIN '.$custom_table.' cd ON c.ResourceId = cd.ResourceId - WHERE ( IF(cd.'.$category_custom_fields['RssLastExpired'].' IS NULL, 0, cd.'.$category_custom_fields['RssLastExpired'].') + - cd.'.$category_custom_fields['RssExpireInterval'].' * cd.'.$category_custom_fields['RssExpireIntervalType'].' <= - '.adodb_mktime().') AND (cd.'.$category_custom_fields['RssDeleteExpired'].' = 1)'; - - $categories = $this->Conn->GetCol($sql, 'ResourceId'); - - $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); - $table = $this->Application->getUnitOption($event->Prefix, 'TableName'); - $ci_table = $this->Application->getUnitOption($event->Prefix.'-ci', 'TableName'); - - if ($categories) { - $article_custom_table = $this->Application->getUnitOption($event->Prefix.'-cdata', 'TableName'); - - $sql = 'SELECT main_table.'.$id_field.' - FROM '.$table.' main_table - LEFT JOIN '.$ci_table.' ci ON main_table.ResourceId = ci.ItemResourceId - LEFT JOIN '.$article_custom_table.' cd ON main_table.ResourceId = cd.ResourceId - WHERE (ci.PrimaryCat = 1) AND - (ci.CategoryId IN ('.implode(',', $categories).')) AND - (main_table.EndOn < '.adodb_mktime().' AND main_table.EndOn IS NOT NULL) AND - (LENGTH(cd.'.$article_custom_fields['RssOriginalURL'].') > 0)'; - $article_ids = $this->Conn->GetCol($sql); - if ($article_ids) { - $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); - $temp->DeleteItems($event->Prefix, $event->Special, $article_ids); - } - - $sql = 'UPDATE '.$custom_table.' - SET '.$category_custom_fields['RssLastExpired'].' = '.adodb_mktime().' - WHERE ResourceId IN ('.implode(',', array_keys($categories)).')'; - $this->Conn->Query($sql); - } - } - - /** - * Returns article ids & crc, that are created during feed import - * - * @param kEvent $event - * @return Array - */ - function getFeedArticles(&$event) - { - $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); - $table = $this->Application->getUnitOption($event->Prefix, 'TableName'); - $custom_table = $this->Application->getUnitOption($event->Prefix.'-cdata', 'TableName'); - - $crc_field = $event->getEventParam('custom_fields', 'RssArticleCRC'); - - $sql = 'SELECT main_table.'.$id_field.', cd.'.$crc_field.' - FROM '.$table.' main_table - LEFT JOIN '.$custom_table.' cd ON cd.ResourceId = main_table.ResourceId - WHERE LENGTH(cd.'.$crc_field.') > 0'; - return $this->Conn->GetCol($sql, $crc_field); - } - - /** - * Creates new, updates existing articles from feed url specified - * - * @param kEvent $event - */ - function parseFeed(&$event) - { - $source_urls = explode(',', $event->getEventParam('source_url')); - if (count($source_urls) > 1) { - foreach ($source_urls as $source_url) { - $event->setEventParam('source_url', $source_url); - $this->parseFeed($event); - } - return true; - } - - $curl_helper =& $this->Application->recallObject('CurlHelper'); - /* @var $curl_helper kCurlHelper */ - - $curl_helper->followLocation = true; - $curl_helper->setOptions( Array (CURLOPT_USERAGENT => 'Wget/1.10.2') ); // otherwise FeedBurner will return HTML - - $xml_data = $curl_helper->Send($event->getEventParam('source_url')); - - if (!$xml_data) { - return false; - } - - $xml_helper =& $this->Application->recallObject('kXMLHelper'); - /* @var $xml_helper kXMLHelper */ - - $root_node =& $xml_helper->Parse($xml_data, XML_WITH_TEXT_NODES); - - $feed_types = Array ( - 'rss_2.0' => 'channel', 'atom' => 'feed', - ); - - foreach ($feed_types as $feed_type => $node_name) { - $article_node =& $root_node->FindChild($node_name); - if (is_object($article_node)) { - break; - } - } - - if (!$article_node) { - return false; - } - - $category_id = $event->getEventParam('category_id'); - $backup_category_id = $this->Application->GetVar('m_cat_id'); - $this->Application->SetVar('m_cat_id', $category_id); - - switch ($feed_type) { - case 'rss_2.0': - $this->parseRssFeed($article_node, $event); - break; - - case 'atom': - $this->parseAtomFeed($article_node, $event); - break; - } - - $this->Application->SetVar('m_cat_id', $backup_category_id); - } - - /** - * Returns ML field names for article record - * - * @return Array - */ - function _getMLFields() - { - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - /* @var $ml_formatter kMultiLanguage */ - - $title_field = $ml_formatter->LangFieldName('Title'); - $body_field = $ml_formatter->LangFieldName('Body'); - - return Array ('Title', 'Body'); - return Array ($title_field, $body_field); - } - - /** - * Parses RSS 2.0 feed - * - * @param kXMLNode $root_node - * @param kEvent $event - */ - function parseRssFeed(&$root_node, &$event) - { - $current_node = $root_node->firstChild; - $feed_articles = $this->getFeedArticles($event); - - $object =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true)); - /* @var $object kDBItem */ - - list ($title_field, $body_field) = $this->_getMLFields(); - - do { - // IMAGE is information about channel and is not useful here - if ($current_node->Name != 'ITEM') continue; - // collect item data - $data = Array(); - $sub_node =& $current_node->firstChild; - /* @var $sub_node kXMLNode */ - - do { - if ($sub_node->Name == 'ATOM:SUMMARY') { - $data[$sub_node->Name] = $this->getNodeContent($sub_node); - } else { - if ($sub_node->Children) { - foreach ($sub_node->Children as $child_node) { - $data[$sub_node->Name].= $child_node->Data; // was $sub_node->Data; - } - } - } - - } while ( ($sub_node =& $sub_node->NextSibling()) ); - - // create/update article - $article_crc = crc32($data['LINK'].$data['TITLE']); - $article_id = getArrayValue($feed_articles, $article_crc); - if ($article_id) { - $object->Load($article_id); - } - else { - $object->Clear(); - } - - $object->SetDBField($title_field, $data['TITLE']); - $object->SetDBField('cust_RssOriginalURL', $data['LINK']); - $object->SetDBField('cust_RssArticleCRC', $article_crc); - $object->SetDBField($body_field, !array_key_exists('DESCRIPTION', $data) ? $data['ATOM:SUMMARY'] : $data['DESCRIPTION']); - $expiration_time = adodb_mktime() + $event->getEventParam('life_time'); - $object->SetDBField('EndOn_date', $expiration_time); - $object->SetDBField('EndOn_time', $expiration_time); - $object->SetDBField('Status', STATUS_ACTIVE); - $object->SetDBField('Author', 'root'); - $object->SetDBField('CreatedById', -1); - - $status = $object->isLoaded() ? $object->Update() : $object->Create(); - } while (($current_node =& $current_node->NextSibling())); - } - - /** - * Returns parsed node content - * - * @param kXMLNode $node - * @return string - */ - function getNodeContent(&$node) - { - $content_type = array_key_exists('TYPE', $node->Attributes) ? $node->Attributes['TYPE'] : false; - - switch ($content_type) { - case 'xhtml': - $data = $node->GetXML(true); - break; - - case 'html': - $data = unhtmlentities($node->firstChild->Data); // $node->Data - break; - - default: - $data = $node->firstChild->Data; // $node->Data; also for 'text' - break; - } - - return trim($data); - } - - /** - * Parses ATOM feed - * - * @param kXMLNode $root_node - * @param kEvent $event - */ - function parseAtomFeed(&$root_node, &$event) - { - $current_node = $root_node->firstChild; - $feed_articles = $this->getFeedArticles($event); - - $object =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true)); - /* @var $object kDBItem */ - - list ($title_field, $body_field) = $this->_getMLFields(); - - do { - if ($current_node->Name != 'ENTRY') continue; - // collect item data - $data = Array(); - $sub_node =& $current_node->firstChild; - /* @var $sub_node kXMLNode */ - - do { - if ($sub_node->Name == 'LINK') { - if ($sub_node->Attributes['REL'] == 'alternate') { - $data[$sub_node->Name] = $sub_node->Attributes['HREF']; - } - } - elseif ($sub_node->Name == 'CONTENT' || $sub_node->Name == 'SUMMARY' || $sub_node->Name == 'TITLE') { - $data[$sub_node->Name] = $this->getNodeContent($sub_node); - } - else { - $data[$sub_node->Name] = $sub_node->firstChild->Data; // $sub_node->Data - } - } while ( ($sub_node =& $sub_node->NextSibling()) ); - - // create/update article - $article_crc = crc32($data['LINK'].$data['TITLE']); - $article_id = getArrayValue($feed_articles, $article_crc); - if ($article_id) { - $object->Load($article_id); - } - else { - $object->Clear(); - } - - $object->SetDBField($title_field, $data['TITLE']); - $object->SetDBField('cust_RssOriginalURL', $data['LINK']); - $object->SetDBField('cust_RssArticleCRC', $article_crc); - $object->SetDBField($body_field, !array_key_exists('CONTENT', $data) ? $data['SUMMARY'] : $data['CONTENT']); - $expiration_time = adodb_mktime() + $event->getEventParam('life_time'); - $object->SetDBField('EndOn_date', $expiration_time); - $object->SetDBField('EndOn_time', $expiration_time); - $object->SetDBField('Status', STATUS_ACTIVE); - $object->SetDBField('Author', 'root'); - $object->SetDBField('CreatedById', -1); - - $status = $object->isLoaded() ? $object->Update() : $object->Create(); - } while (($current_node =& $current_node->NextSibling())); - } - - function getCustomColumns($prefix) - { - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - - $custom_fields = array_flip($this->Application->getUnitOption($prefix, 'CustomFields')); - foreach ($custom_fields as $custom_name => $custom_id) { - $custom_fields[$custom_name] = $ml_formatter->LangFieldName('cust_'.$custom_id); - } - - return $custom_fields; - } - - /** - * Create missing excerpt - * - * @param kEvent $event - */ - function OnBeforeItemUpdate(&$event) - { - parent::OnBeforeItemUpdate($event); - - $this->createExcerpt($event); - $this->cacheItemOwner($event, 'CreatedById', 'Author'); - } - - /** - * Create missing excerpt - * - * @param kEvent $event - */ - function OnBeforeItemCreate(&$event) - { - parent::OnBeforeItemCreate($event); - - $this->createExcerpt($event); - $this->cacheItemOwner($event, 'CreatedById', 'Author'); - } - - /** - * Create excerpt if missing - * - * @param kEvent $event - */ - function createExcerpt(&$event) - { - $object =& $event->getObject(); - - if (!$object->GetField('Excerpt') || $this->Application->GetVar('generate_excerpt')) { - $excerpt = strip_tags( $object->GetField('Body') ); - - - $length = mb_strlen($excerpt); - if ($length > 100) { - $excerpt = mb_substr(strip_tags($excerpt), 0, 100); - if (mb_substr($excerpt,-1) != ' ') { - $pos = mb_strrpos($excerpt, ' '); - if ($pos) { - $excerpt = mb_substr($excerpt, 0, $pos); - } - } - $excerpt .= '...'; - } - - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - /* @var $ml_formatter kMultiLanguage */ - - $object->SetDBField($ml_formatter->LangFieldName('Excerpt'), $excerpt); - } - } - - /** - * [HOOK] Updates category custom fields options in config - * - * @param kEvent $event - */ - function OnUpdateCategoryCustomFields(&$event) - { - $new_virtual_fields = Array( - 'cust_RssSource' => Array('type' => 'string', 'default' => ''), - 'cust_RssDefaultExpiration' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), - 'cust_RssDefaultExpirationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month', 29030400 => 'la_opt_year'), 'default' => 60), - 'cust_RssExpireInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), - 'cust_RssExpireIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60), - 'cust_RssDeleteExpired' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'default' => 0), - 'cust_RssUpdateInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), - 'cust_RssUpdateIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60), - 'cust_RssLastUpdated' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''), - 'cust_RssLastExpired' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''), - ); - $virtual_fields = $this->Application->getUnitOption('c', 'VirtualFields'); - $virtual_fields = array_merge_recursive2($virtual_fields, $new_virtual_fields); - $this->Application->setUnitOption('c', 'VirtualFields', $virtual_fields); - } - - /** - * Sets default expiration based on module setting - * - * @param kEvent $event - */ - function OnPreCreate(&$event) - { - parent::OnPreCreate($event); - - if ($event->status == erSUCCESS) { - $object =& $event->getObject(); - - $archive_days = $this->Application->ConfigValue('News_Archive'); - if ($archive_days) { - $expire_date = adodb_mktime() + $archive_days * 3600 * 24; - $object->SetDBField('EndOn_date', $expire_date); - $object->SetDBField('EndOn_time', $expire_date); - } - } - } - } \ No newline at end of file Index: branches/unlabeled/unlabeled-1.5.2/themes/default/innews/index.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.5.2/themes/default/innews/index.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.5.2/themes/default/innews/index.tpl (revision 0) @@ -1,121 +0,0 @@ - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -



- - - - - - - - - - -

- - - - - - -

- - - - - - - -
" width="18" height="12" alt="" />
   
-
- -
- - - -
- - - - - - -


:  
- - - - - - - - - - - -


- - - - - - - -

- - -
- - - - - - - -

- - - - - - - -


- - ">

-
- - -

-
- - - Index: branches/unlabeled/unlabeled-1.5.2/in-news/admin/include/navmenu.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.5.2/in-news/admin/include/navmenu.php (revision 12747) +++ branches/unlabeled/unlabeled-1.5.2/in-news/admin/include/navmenu.php (revision 0) @@ -1,117 +0,0 @@ -AddSection("in-news:editarticle_general","la_tab_General", NULL, "in-news/admin/", - "javascript:edit_submit('article','NewsEditStatus','in-news/admin/addarticle.php',0);", - $admin."/icons/icon46_catalog.gif", $admin."/icons/icon24_catalog.gif", - NULL, "in-portal:browse", NULL, "in-news:editarticle_category",-1,""); - -$objSections->AddSection("in-news:editarticle_category","la_tab_Categories", NULL, "in-news/admin/", - "javascript:edit_submit('article','NewsEditStatus','in-news/admin/addarticle_category.php',0);", - $admin."/icons/icon46_catalog.gif", $admin."/icons/icon24_navigate.gif", - NULL, "in-portal:browse","in-news:editarticle_general", "in-news:editarticle_relations",-1,""); - -$objSections->AddSection("in-news:editarticle_relations", "la_tab_Relations", NULL, "in-news/admin/", - "javascript:edit_submit('article','NewsEditStatus','in-news/admin/addarticle_relations.php',0);", - $admin."/icons/icon46_catalog.gif", $admin."/icons/icon24_navigate.gif", - NULL, "in-portal:browse", "in-news:editarticle_category","in-news:editarticle_images",-1,""); - -$objSections->AddSection("in-news:editarticle_images","la_tab_Images", NULL,"in-news/admin/", - "javascript:edit_submit('article','NewsEditStatus','in-news/admin/addarticle_images.php',0);", - "aadmin/icons/icon46_catalog.gif", $admin."/icons/icon24_navigate.gif", - NULL, "in-portal:browse", "in-news:editarticle_relations", "in-news:editarticle_reviews",-1,""); - -$objSections->AddSection("in-news:editarticle_reviews","la_tab_Reviews", NULL,"in-news/admin/", - "javascript:edit_submit('article','NewsEditStatus','in-news/admin/addarticle_reviews.php',0);", - $admin."/icons/icon46_catalog.gif", $admin."/icons/icon24_navigate.gif", - NULL, "in-portal:browse",'in-news:editarticle_images', "in-news:editarticle_custom", -1,""); - -$objSections->AddSection("in-news:editarticle_custom","la_tab_Custom", NULL, "in-news/admin/", - "javascript:edit_submit('article','NewsEditStatus','in-news/admin/addarticle_custom.php',0);", - $admin."/icons/icon46_catalog.gif", $admin."/icons/icon24_navigate.gif", - NULL, "in-portal:browse", 'in-news:editarticle_reviews', NULL, -1); - -/* article edit subitems */ -$objSections->AddSection("in-news:editarticle_image","la_tab_Images","la_title_edit_article","in-news/admin/", - "javascript:edit_submit('article','NewsEditStatus','in-news/admin/addimage.php',0);", - $admin."/icons/icon46_catalog.gif", $admin."/icons/icon24_navigate.gif", - NULL, NULL, NULL,NULL,-1); - -$objSections->AddSection("in-news:editarticle_relation","la_tab_Relations","la_title_edit_article","in-news/admin/", - "javascript:edit_submit('article','NewsEditStatus','in-news/admin/addrelation.php',0);", - $admin."/icons/icon46_catalog.gif", $admin."/icons/icon24_navigate.gif", - NULL, NULL, NULL,NULL,-1); - -$objSections->AddSection("in-news:editarticle_review","la_tab_Reviews", "la_title_edit_article", "in-news/admin/", - "javascript:edit_submit('article','NewsEditStatus','in-news/admin/addreview.php',0);", - $admin."/icons/icon46_catalog.gif", $admin."/icons/icon24_navigate.gif", - NULL, NULL, NULL,NULL,-1); -/* tree items */ - -// Load In-News module to get it's version -$mod = $objModules->GetModule("In-News"); -$ModVersion = $mod ? $mod->Get('Version') : ''; - -$objSections->AddSection("in-news","la_title_In-News","la_title_In-News",$admin."/","subitems.php", - "in-news/admin/images/icon46_settings_in-newz.gif","in-news/admin/images/icon24_settings_in-newz.gif", - NULL,"in-portal:modules",NULL,NULL,0,"",1, - NULL,NULL,NULL,"in-news/admin/images/icon46_list_settings_in-newz.gif","la_Text_Version"," $ModVersion"); - -$objSections->AddSection("in-news:innews_general", "la_tab_GeneralSettings","la_tab_General", - "in-news/admin/","config_general.php", - $admin."/icons/icon46_settings_general.gif",$admin."/icons/icon24_settings_general.gif", - NULL,"in-news", NULL,"in-news:configuration_output",0,"",1, - NULL,NULL,NULL,$admin."/icons/icon46_list_settings_general.gif","la_updating_config"); - -$objSections->AddSection("in-news:configuration_output", "la_tab_ConfigOutput","la_tab_ConfigOutput", - $admin.'/index4.php?section=in-news:configuration_output&module=In-News','kernel4:config/config_universal', - $admin."/icons/icon46_settings_output.gif",$admin."/icons/icon24_settings_output.gif", - NULL,"in-news", "in-news:innews_general", "in-news:configuration_search",0,"",1, - NULL,NULL,NULL,$admin."/icons/icon46_list_settings_output.gif","la_updating_config"); - -$objSections->AddSection("in-news:configuration_search", "la_tab_ConfigSearch","la_tab_ConfigSearch", - $admin.'/index4.php?module=In-News§ion=in-news:configuration_search&module_key=articles', - 'kernel4:config/config_search', - $admin."/icons/icon46_settings_search.gif",$admin."/icons/icon24_settings_search.gif", - NULL,"in-news", "in-news:configuration_output","in-news:configuration_email",0,"",1, - NULL,NULL,NULL,$admin."/icons/icon46_list_settings_search.gif","la_updating_config"); - -$objSections->AddSection("in-news:configuration_email", "la_tab_ConfigE-mail", "la_tab_ConfigE-mail", $admin."/config/", - "module_email.php?&module=In-News§ion=in-news:configuration_email&lpn=1", - $admin."/icons/icon46_settings_email.gif",$admin."/icons/icon24_settings_email.gif", - NULL, "in-news", "in-news:configuration_search","in-news:configuration_custom",0,"",1, - NULL,NULL,NULL,$admin."/icons/icon46_list_settings_email.gif","la_updating_config"); - -$objSections->AddSection("in-news:configuration_custom","la_tab_ConfigCustom","la_tab_ConfigCustom", $admin.'/index4.php', - "kernel4:custom_fields/custom_fields_list:cf----2-", - $admin."/icons/icon46_settings_custom.gif",$admin."/icons/icon24_settings_custom.gif", - NULL, "in-news", "in-news:configuration_email", NULL,0,"",1, - NULL,NULL,NULL,$admin."/icons/icon46_list_settings_custom.gif","la_updating_config"); - -$objSections->AddSection("in-news:editarticle_userselect","la_tab_UserSelect","la_title_UserSelect", - $admin."/users","user_select.php", - $admin."/icons/icon46_community.gif",$admin."/icons/icon24_usergroups.gif", - NULL,NULL,NULL,NULL,-1,"",1,0,1,1); - -$name = admin_language("lu_btn_NewArticle"); - -$NewButtons[] = array( - "ImagePath" => $rootURL."in-news/admin/images/", - "Action" => "new_news", - "Alt" => $name, - "Tab" => "news"); - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.5.2/in-news/admin_templates/catalog_tab.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.5.2/in-news/admin_templates/catalog_tab.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.5.2/in-news/admin_templates/catalog_tab.tpl (revision 0) @@ -1,58 +0,0 @@ - - - - a_toolbar.AddButton( new ToolBarButton('in-news:new_article', '', function() { - $form_name = $Catalog.queryTabRegistry('prefix', '', 'tab_id') + '_form'; - std_precreate_item('', 'in-news/articles/articles_edit'); - }, true - ) ); - - - -
" view_template="in-news/catalog_tab" edit_template="in-news/articles/articles_edit" category_id="-1" dep_buttons="new_article" class="catalog-tab">
- -
- - - - - $Catalog.setItemCount('', ''); - $Catalog.setCurrentCategory('', ); - - - - - Grids[''].AddAlternativeGrid('', true); - - Grids[''].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6')); - $Catalog.reflectPasteButton(); - $Catalog.setViewMenu(''); - - Grids[''].RadioMode = true; - Grids[''].DblClick = function() {return false}; - - #separator# - - - - - - - - - - - - - - - - - - - - -
-
- - \ No newline at end of file Index: branches/unlabeled/unlabeled-1.40.2/in-news/units/articles/articles_config.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.40.2/in-news/units/articles/articles_config.php (revision 12747) +++ branches/unlabeled/unlabeled-1.40.2/in-news/units/articles/articles_config.php (revision 0) @@ -1,313 +0,0 @@ - 'n', - - 'ItemClass' => Array('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'c', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUpdateCategoryCustomFields', - ), - ), - 'CatalogItem' => true, - 'AdminTemplatePath' => 'articles', - 'AdminTemplatePrefix' => 'articles_', - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'Reviews_Page', - 4 => 'event', - 5 => 'mode', - ), - - 'RegularEvents' => Array( - 'rss_category_update' => Array('EventName' => 'OnUpdateRSSAtricles', 'RunInterval' => 0, 'Type' => reBEFORE), - ), - - 'IDField' => 'NewsId', - 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events - - 'TitleField' => 'Title', // field, used in bluebar when editing existing item - 'TitlePhrase' => 'la_Text_Article', // phrase used to specify item type in relationship list - - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('n' => '!la_title_AddingArticle!'), - 'edit_status_labels' => Array('n' => '!la_title_EditingArticle!'), - 'new_titlefield' => Array('n' => '!la_title_NewArticle!'), - ), - - 'articles_edit' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_General!"), - - 'articles_categories'=>Array('prefixes' => Array('n','n-ci_List'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Categories!"), - 'articles_relations'=> Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Relations!"), - 'articles_images' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Images!"), - 'articles_reviews' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Reviews!"), - 'articles_custom' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Custom!"), - - 'images_edit' => Array( 'prefixes' => Array('n', 'n-img'), - 'new_status_labels' => Array('n-img'=>'!la_title_Adding_Image!'), - 'edit_status_labels' => Array('n-img'=>'!la_title_Editing_Image!'), - 'new_titlefield' => Array('n-img'=>'!la_title_New_Image!'), - 'format' => "#n_status# '#n_titlefield#' - #n-img_status# '#n-img_titlefield#'", - ), - - 'reviews_edit' => Array( 'prefixes' => Array('n', 'n-rev'), - 'new_status_labels' => Array('n-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"), - 'edit_status_labels' => Array('n-rev'=>'!la_title_Editing_Review!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rev_status#", - ), - - 'relations_edit' => Array( 'prefixes' => Array('n', 'n-rel'), - 'new_status_labels' => Array('n-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), - 'edit_status_labels' => Array('n-rel'=>'!la_title_Editing_Relationship!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rel_status#", - ), - - 'tree_in-news' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-News', 'Version')), - ), - - 'PermItemPrefix' => 'NEWS', - - 'PermTabText' => 'In-News', - 'PermSection' => Array('main' => 'CATEGORY:in-news:articles_list', 'search' => 'in-news:configuration_search', 'email' => 'in-news:configuration_email', 'custom' => 'in-news:configuration_custom'), - - 'Sections' => Array( - 'in-news' => Array( - 'parent' => 'in-portal:root', - 'icon' => 'settings_in-newz', - 'label' => 'la_title_In-News', - 'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view'), - 'priority' => 3.2, - 'type' => stTREE, - ), - - 'in-news:innews_general' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_general', - 'label' => 'la_tab_GeneralSettings', - 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 1, - 'type' => stTREE, - ), - - 'in-news:configuration_output' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_output', - 'label' => 'la_tab_ConfigOutput', - 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 2, - 'type' => stTREE, - ), - - 'in-news:configuration_search' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_search', - 'label' => 'la_tab_ConfigSearch', - 'url' => Array('t' => 'config/config_search', 'module_key' => 'articles', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 3, - 'type' => stTREE, - ), - - 'in-news:configuration_email' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_email', - 'label' => 'la_tab_ConfigE-mail', - 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 4, - 'type' => stTREE, - ), - - 'in-news:configuration_custom' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_custom', - 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 2, 'pass_section' => true, 'pass' => 'm,cf'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), - 'priority' => 5, - 'type' => stTREE, - ), - - ), - - 'FilterMenu' => Array( - 'Groups' => Array( - Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER), - ), - 'Filters' => Array( - 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), - 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ), - 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), - 's1' => Array(), - 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), - 'show_hot' => Array('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), - 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), - 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), - ) - ), - - 'CatalogSelectorName' => 'newslist', - - 'ItemPropertyMappings' => Array( - 'NewDays' => 'News_CatNewDays', // number of days item to be NEW - 'MinPopVotes' => 'News_MinPopVotes', // minimum number of votes for an item to be POP - 'MinPopRating' => 'News_MinPopRating',// minimum rating for an item to be POP - 'MaxHotNumber' => 'News_MaxHotNumber',// maximum number of HOT items - - 'HotLimit' => 'News_HotLimit', // variable name in inp_Cache table - 'ClickField' => 'Hits', // item click count is stored here (in item table) - ), - - 'ItemType' => 2, // this is used when relation to product is added from in-portal and via-versa - - 'ViewMenuPhrase' => 'la_title_Articles', - - 'StatisticsInfo' => Array( - 'pending' => Array( - 'icon' => 'icon16_article_pending.gif', - 'label' => 'la_Text_Articles', - 'js_url' => '#url#', - 'url' => Array('t' => 'in-portal/advanced_view', 'SetTab' => 'n', 'pass' => 'm,n.showall', 'n.showall_event' => 'OnSetFilterPattern', 'n.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'), - 'status' => STATUS_PENDING, - ), - ), - - 'TableName' => TABLE_PREFIX.'News', - - 'CalculatedFields' => Array( - '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = -1, "root", IF (%1$s.CreatedById = -2, "Guest", "n/a")), u.Login)', - 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', - 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', - 'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath', - ), - ), - - 'CacheModRewrite' => true, - - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId', - ), // key - special, value - list select sql - - 'ListSortings' => Array( - '' => Array( - 'ForcedSorting' => Array('EditorsPick' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array('Title' => 'asc'), - ) - ), - 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId'), - - 'SubItems' => Array('n-rev', 'n-ci', 'n-rel', 'n-img', 'n-cdata'), - - 'Fields' => Array ( - 'NewsId' => Array(), - 'Title' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => '1'), - 'Excerpt' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Author' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Body' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1,'default' => '#NOW#'), - 'TextFormat' => Array('type' => 'int', 'not_null' => 1, 'default' => '0'), - 'EndOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => ''), - 'Hits' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), - 'CachedRating' => Array('type' => 'string', 'default' => 0), - 'CachedVotesQty' => Array('type' => 'int','not_null' => 1,'default' => '0'), - 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => -1), - 'Priority' => Array('type' => 'int','default' => ''), - 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), - 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadCatStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array('type' => 'int', 'default' => ''), - 'CachedReviewsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StartDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1, 'default' => '#NOW#'), - 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'Archived' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => '#NOW#'), - 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => -1), - 'OrgId' => Array('type' => 'int','default' => ''), - ), - - 'VirtualFields' => Array( - 'UserName' => Array('type' => 'string', 'default' => ''), - 'CategoryId' => Array('type' => 'int', 'default' => 0), - 'cust_RssOriginalURL' => Array('type' => 'string', 'default' => ''), - 'cust_RssArticleCRC' => Array('type' => 'int', 'default' => 0), - 'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'CachedNavbar' => Array('type' => 'string', 'default' => ''), - ), - - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), -// 'PrimaryCategory' => Array('title' => 'la_col_PrimaryCategory', 'data_block' => 'grid_category_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - - - 'Radio' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_radio_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - ), - - 'ConfigMapping' => Array( - 'PerPage' => 'Perpage_News', - 'ShortListPerPage' => 'Perpage_News_Short', - 'DefaultSorting1Field' => 'News_SortField', - 'DefaultSorting2Field' => 'News_SortField2', - 'DefaultSorting1Dir' => 'News_SortOrder', - 'DefaultSorting2Dir' => 'News_SortOrder2', - ), - ); - - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.7.38/in-news/admin/include/toolbar/advanced_view.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.7.38/in-news/admin/include/toolbar/advanced_view.php (revision 12747) +++ branches/unlabeled/unlabeled-1.7.38/in-news/admin/include/toolbar/advanced_view.php (revision 0) @@ -1,238 +0,0 @@ -Get("News_View"); -if(!is_numeric($NewsView)) -{ - $NewsView = $News_AllValue; -} - -$News_SortField = $objConfig->Get('News_SortField'); -if( !strlen($News_SortField) ) $News_SortField = 'Priority'; - -$News_SortOrder = $objConfig->Get('News_SortOrder'); -if( !strlen($News_SortOrder) ) $News_SortOrder = 'desc'; - -$Perpage_News = (int)$objConfig->Get("Perpage_News"); - -if(!$Perpage_News) - $Perpage_News=20; - -if($NewsView == $News_AllValue) -{ - $News_ShowAll = 1; -} -else - $News_ShowAll = 0; - -if($News_ShowAll) -{ - $News_Filter = ""; - $News_View=127; -} -else -{ - // FILTERING CODE V. 1.2 - $where_clauses = Array(); $q = ''; - - // Group #1: Article Statuses (active,pending,disabled) - $Status = array(-1); - if($NewsView & $Bit_Pending) $Status[] = STATUS_PENDING; - if($NewsView & $Bit_Active) $Status[] = STATUS_ACTIVE; - if($NewsView & $Bit_Disabled) $Status[] = STATUS_DISABLED; - if( count($Status) ) $where_clauses[] = 'Status IN ('.implode(',', $Status).')'; - - // Group #2: Article Statistics (new,popular,hot,pick) - $Status = array(); - if(!($NewsView & $Bit_New)) - { - $cutoff = adodb_date("U") - ($objConfig->Get("News_NewDays") * 86400); - if($cutoff > 0) $q = 'CreatedOn > '.$cutoff; - $q .= ' AND CachedVotesQty >= '.$objConfig->Get('News_MinVotes'); - $q .= (!empty($q) ? ' OR ' : '').'NewItem = 1'; - $Status[] = "NOT ($q)"; - } - - if(!($NewsView & $Bit_Pop)) - { - $cutoff = $objArticleList->GetPopValue(); - if($cutoff > 0) $q = 'CachedRating >= '.$cutoff; - $q .= (!empty($q) ? ' OR ' : '').'PopItem = 1'; - $Status[] = "NOT ($q)"; - } - - if(!($NewsView & $Bit_Hot)) - { - $cutoff = $objArticleList->GetHotValue(); - if($cutoff > 0) $q = 'Hits >= '.$cutoff; - $q .= (!empty($q) ? ' OR ' : '').'HotItem = 1'; - $Status[] = "NOT ($q)"; - } - - if(!($NewsView & $Bit_Archived)) $Status[] = 'NOT (Archived = 1)'; - if(!($NewsView & $Bit_LeadCat)) $Status[] = 'NOT (LeadCatStory = 1)'; - if(!($NewsView & $Bit_FontLead)) $Status[] = 'NOT (LeadStory = 1)'; - if(!($NewsView & $Bit_Ed)) $Status[] = 'NOT (EditorsPick = 1)'; - - if( count($Status) ) - $where_clauses[] = '('.implode(') AND (', $Status).')'; - - $NewsFilter = count($where_clauses) ? '('.implode(') AND (', $where_clauses).')' : ''; -} - -$list = $objSession->GetVariable("n_adv_view_search"); -$objArticleList->Clear(); - -$objArticleList->EnablePaging = TRUE; - - - $OrderBy = $objArticleList->QueryOrderByClause(TRUE,TRUE,TRUE); - - if(strlen($list)==0) - { - $where = $NewsFilter; - $SearchQuery = ''; - $objArticleList->LoadArticles($where,$OrderBy,false,false,'set_last'); - } - else - { - $SearchQuery = $objArticleList->AdminSearchWhereClause($list); - - if(strlen($SearchQuery)) - { - $SearchQuery = " (".$SearchQuery.")".($NewsFilter ? 'AND ('.$NewsFilter.')' : ''); - $objArticleList->LoadArticles($SearchQuery,$OrderBy, false,false,'set_last'); - } - else - $objArticleList->LoadArticles($NewsFilter,$OrderBy, false,false,'set_last'); - } - - $objArticleList->QueryItemCount = TableCount($objArticleList->SourceTable,($SearchQuery ? $SearchQuery : $NewsFilter),0); - $CatTotal = TableCount($objArticleList->SourceTable,null,0); - - - $caption = language("la_ItemTab_News"); - $ItemTabs->AddTab(language("la_ItemTab_News"),"news",$objArticleList->QueryItemCount, $m_tab_News_hide,$CatTotal); - - $TotalItemCount += $objArticleList->QueryItemCount; - - $News_Paste = "false"; - if($objArticleList->ItemsOnClipboard()>0) - $News_Paste = "true"; - -$lang_Leading = language("la_Text_Leading"); -$lang_Archived = language("la_Text_Archived"); -$lang_Title = language("la_Prompt_Title"); -$lang_Excerpt = language("la_prompt_ArticleExcerpt"); -$lang_Author = language("la_prompt_Author"); -$lang_Body = language("la_prompt_ArticleBody"); -$lang_StartDate = language("la_prompt_StartDate"); -$lang_ArchiveDate = language("la_prompt_ArchiveDate"); -$lang_Catlead = language("la_prompt_LeadCat"); -$lang_FrontLead = language("la_prompt_FrontLead"); -$lang_Articles = language("la_Text_Articles"); - -print << -var News_SortField = '$News_SortField'; -var News_SortOrder = '$News_SortOrder'; -var News_Perpage = $Perpage_News; -var NewsView = $NewsView; -var NewsTitle = '$caption'; - -//News Related language vars -var lang_Leading = '$lang_Leading'; -var lang_Archived = '$lang_Archived'; -var lang_Title = '$lang_Title'; -var lang_Author = '$lang_Author'; -var lang_Body = '$lang_Body'; -var lang_Excerpt = '$lang_Excerpt'; -var lang_StartDate = '$lang_StartDate'; -var lang_ArchiveDate = '$lang_ArchiveDate'; -var lang_CatLead = "$lang_Catlead"; -var lang_FrontLead = "$lang_FrontLead"; -var lang_Articles = "$lang_Articles"; -var News_Paste = $News_Paste; - -PasteButton = PasteButton || News_Paste; - - \$fw_menus['n_view_menu'] = function() - { - // filtring menu - \$Menus['n_filtring_menu'] = new Menu(lang_View); - \$Menus['n_filtring_menu'].addMenuItem(lang_All,"config_val('News_View', $News_AllValue);",NewsView==$News_AllValue); - \$Menus['n_filtring_menu'].addMenuItem(lang_None,"config_val('News_View', 0);",NewsView==0); - \$Menus['n_filtring_menu'].addMenuSeparator(); - \$Menus['n_filtring_menu'].addMenuItem(lang_Active,"FlipBit('News_View',NewsView,6);",BitStatus(NewsView,6)); - \$Menus['n_filtring_menu'].addMenuItem(lang_Pending,"FlipBit('News_View',NewsView,5);", BitStatus(NewsView,5)); - \$Menus['n_filtring_menu'].addMenuItem(lang_Disabled,"FlipBit('News_View',NewsView,4);",BitStatus(NewsView,4)); - \$Menus['n_filtring_menu'].addMenuSeparator(); - \$Menus['n_filtring_menu'].addMenuItem(lang_New,"FlipBit('News_View',NewsView,3);",BitStatus(NewsView,3)); - \$Menus['n_filtring_menu'].addMenuItem(lang_Pop,"FlipBit('News_View',NewsView,2);",BitStatus(NewsView,2)); - \$Menus['n_filtring_menu'].addMenuItem(lang_Hot,"FlipBit('News_View',NewsView,1);",BitStatus(NewsView,1)); - \$Menus['n_filtring_menu'].addMenuItem(lang_EdPick,"FlipBit('News_View',NewsView,0);",BitStatus(NewsView,0)); - \$Menus['n_filtring_menu'].addMenuItem(lang_CatLead,"FlipBit('News_View',NewsView,8);",BitStatus(NewsView,8)); - \$Menus['n_filtring_menu'].addMenuItem(lang_FrontLead,"FlipBit('News_View',NewsView,9);",BitStatus(NewsView,9)); - \$Menus['n_filtring_menu'].addMenuItem(lang_Archived,"FlipBit('News_View',NewsView,7);",BitStatus(NewsView,7)); - - // sorting menu - \$Menus['n_sorting_menu'] = new Menu(lang_Sort); - \$Menus['n_sorting_menu'].addMenuItem(lang_Asc,"config_val('News_SortOrder','asc');",RadioIsSelected(News_SortOrder,'asc')); - \$Menus['n_sorting_menu'].addMenuItem(lang_Desc,"config_val('News_SortOrder','desc');",RadioIsSelected(News_SortOrder,'desc')); - \$Menus['n_sorting_menu'].addMenuSeparator(); - \$Menus['n_sorting_menu'].addMenuItem(lang_Default,"config_val('News_SortField','Title');",""); - \$Menus['n_sorting_menu'].addMenuItem(lang_Title,"config_val('News_SortField','Title');",RadioIsSelected(News_SortField,'Title')); - \$Menus['n_sorting_menu'].addMenuItem(lang_Author,"config_val('News_SortField','Author');",RadioIsSelected(News_SortField,'Author')); - \$Menus['n_sorting_menu'].addMenuItem(lang_Body,"config_val('News_SortField','Body');",RadioIsSelected(News_SortField,'Body')); - \$Menus['n_sorting_menu'].addMenuItem(lang_Excerpt,"config_val('News_SortField','Excerpt');",RadioIsSelected(News_SortField,'Excerpt')); - \$Menus['n_sorting_menu'].addMenuItem(lang_CreatedOn,"config_val('News_SortField','CreatedOn');",RadioIsSelected(News_SortField,'CreatedOn')); - \$Menus['n_sorting_menu'].addMenuItem(lang_StartDate,"config_val('News_SortField','StartDate');",RadioIsSelected(News_SortField,'StartDate')); - \$Menus['n_sorting_menu'].addMenuItem(lang_ArchiveDate,"config_val('News_SortField','EndOn');",RadioIsSelected(News_SortField,'EndOn')); - \$Menus['n_sorting_menu'].addMenuItem(lang_Rating,"config_val('News_SortField','CachedRating');",RadioIsSelected(News_SortField,'CachedRating')); - \$Menus['n_sorting_menu'].addMenuItem(lang_Votes,"config_val('News_SortField','CachedVotesQty');",RadioIsSelected(News_SortField,'CachedVotesQty')); - \$Menus['n_sorting_menu'].addMenuItem(lang_Views,"config_val('News_SortField','Hits');",RadioIsSelected(News_SortField,'Hits')); - - // perpage menu - \$Menus['n_perpage_menu'] = new Menu(lang_PerPage); - \$Menus['n_perpage_menu'].addMenuItem("10","config_val('Perpage_News', '10');",RadioIsSelected(News_Perpage,10)); - \$Menus['n_perpage_menu'].addMenuItem("20","config_val('Perpage_News', '20');",RadioIsSelected(News_Perpage,20)); - \$Menus['n_perpage_menu'].addMenuItem("50","config_val('Perpage_News', '50');",RadioIsSelected(News_Perpage,50)); - \$Menus['n_perpage_menu'].addMenuItem("100","config_val('Perpage_News', '100');",RadioIsSelected(News_Perpage,100)); - \$Menus['n_perpage_menu'].addMenuItem("500","config_val('Perpage_News', '500');",RadioIsSelected(News_Perpage,500)); - - // select menu - \$Menus['n_select_menu'] = new Menu(lang_Select); - \$Menus['n_select_menu'].addMenuItem(lang_All,"javascript:selectAllC('"+activeTab.id+"');",""); - \$Menus['n_select_menu'].addMenuItem(lang_Unselect,"javascript:unselectAll('"+activeTab.id+"');",""); - \$Menus['n_select_menu'].addMenuItem(lang_Invert,"javascript:invert('"+activeTab.id+"');",""); - - // view menu - \$Menus['n_view_menu'] = new Menu(NewsTitle); - \$Menus['n_view_menu'].addMenuItem( \$Menus['n_filtring_menu'] ); - \$Menus['n_view_menu'].addMenuItem( \$Menus['n_sorting_menu'] ); - \$Menus['n_view_menu'].addMenuItem( \$Menus['n_perpage_menu'] ); - \$Menus['n_view_menu'].addMenuItem( \$Menus['n_select_menu'] ); - } - - -END; -?> Index: branches/unlabeled/unlabeled-1.29.2/in-news/action.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.29.2/in-news/action.php (revision 12747) +++ branches/unlabeled/unlabeled-1.29.2/in-news/action.php (revision 0) @@ -1,478 +0,0 @@ -HasSystemPermission("SYSTEM_ACCESS.READONLY"); - require_login( !admin_login() && $Action, 'expired=1', true ); - - // permission checking: begin - $action_mapping = Array( - 'n_article_delete' => 'NEWS.DELETE', - 'n_article_move_up' => 'NEWS.ADD|NEWS.MODIFY', - 'n_article_move_down' => 'NEWS.ADD|NEWS.MODIFY', - 'n_article_approve' => 'NEWS.ADD|NEWS.MODIFY', - 'n_article_decline' => 'NEWS.ADD|NEWS.MODIFY', - 'n_add_article' => 'NEWS.ADD', - 'n_edit_article' => 'NEWS.MODIFY', - - ); - checkActionPermission($action_mapping, $Action); - // permission checking: end - - switch($Action) - { - case "m_cat_delete": - if($ro_perm) break; - if(isset($CatDeleteList)) - { - $CatList = $CatDeleteList; - if(is_array($CatList)) - { - for($i=0;$iClearCategoryItems($c,"CategoryItems"); - } - } - else - if(is_numeric($CatList)) - { - $objArticleList->ClearCategoryItems($CatList,"CategoryItems"); - - } - if(!is_array($CatList)) $CatList=Array($CatList); - UpdateCategoryCount("Article", $CatList, $objArticleList->GetListTypes()); - } - break; - - case "m_paste": /* category paste */ - if($ro_perm) break; - if($PastedCatIds) - { - $cache_cat_ids=Array(); - foreach($PastedCatIds as $SourceCat => $DestCat) - { - $cache_cat_ids[$SourceCat]=1; - $cache_cat_ids[$DestCat]=1; - $objArticleList->Clear(); - $objArticleList->LoadArticles("CategoryId=$SourceCat",""); - if($objArticleList->NumItems()>0) - { - foreach($objArticleList->Items as $item) - { - /* fields from categoryitems table */ - $item->UnsetField("CategoryId"); - $item->UnsetField("ItemResourceId"); - $item->UnsetField("PrimaryCat"); - - $item->CopyToNewResource($DestCat, 'Title'); - $item->AddToCategory($DestCat); - } - } - } - UpdateCategoryCount("Article", array_keys($cache_cat_ids), $objArticleList->GetListTypes()); - } - break; - - case "n_article_delete": - if($ro_perm) break; - if (count($_POST["newslist"]) != 0) - { - $objArticleList->FlushCache($_POST["newslist"]); - foreach($_POST["newslist"] as $newsid) - $objArticleList->Delete_Item($newsid); - } - break; - - case "n_article_move_up": - if($ro_perm) break; - if (isset($_POST["newslist"])) - foreach($_POST["newslist"] as $id) - { - $a = $objArticleList->GetItem($id); - $a->MoveUp(); - } - break; - - case "n_article_move_down": - if($ro_perm) break; - if (isset($_POST["newslist"])) - { - $newslist=array_reverse($_POST["newslist"]); - foreach($newslist as $id) - { - $a = $objArticleList->GetItem($id); - $a->MoveDown(); - } - } - break; - - case "n_article_approve": - if($ro_perm) break; - if (isset($_POST["newslist"])) - { - $cat_ids=Array(); - foreach($_POST["newslist"] as $id) - { - $a = $objArticleList->GetItem($id); - if($a->Get("Status")==-2) - { - $OrgId = $a->Get("OrgId"); - if($OrgId) - { - $org = $objArticleList->GetItem($OrgId); - $OldResId = $org->Get("ResourceId"); - $NewResId = $a->Get("ResourceId"); - //$ExpireInterval = $objConfig->Get("link_ExpireMod_Value") * $objConfig->Get("link_ExpireMod_Interval"); - //if($ExpireInterval>0) - // $l->Set("Expire",adodb_date("U")+$ExpireInterval); - $a->Set("OrgId",0); - $a->Approve(); - $cat_ids[]=$org->GetPrimaryCategory(); - $org->DeleteCustomData(); - $org->Delete(TRUE); - } - } - else - { - $a->Approve(); - $cat_ids[]=$a->GetPrimaryCategory(); - } - } - if($cat_ids) UpdateCategoryCount("Article",$cat_ids,$objArticleList->GetListTypes()); - } - break; - - case "n_article_decline": - if($ro_perm) break; - if (isset($_POST["newslist"])) - { - $cat_ids = Array(); - foreach($_POST["newslist"] as $id) - { - $a = $objArticleList->GetItem($id); - $cat_ids[] = $a->GetPrimaryCategory(); - if($a->Get("Status")==-2) - { - $a->Delete(); - } - else - $a->Deny(); - } - UpdateCategoryCount("Article", $cat_ids, $objArticleList->GetListTypes()); - } - break; - - case "n_add_category": - $objEditItems = new clsNewsList(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - $r = $_POST["ResourceId"]; - $i = $objEditItems->GetItemByField("ResourceId",$_POST["ResourceId"]); - $Primary = $i->GetPrimaryCategory($objSession->GetEditTable("CategoryItems")); - $objSession->SetVariable("HasChanges", 1); - if(is_object($i)) - { - $table = $objSession->GetEditTable("CategoryItems"); - $CatList = explode(",",$_POST["CatList"]); - - // Get List of currect categories article is in - $link_cats = $i->CategoryMemberList($table); - $link_cats_arr = explode(",", $link_cats); - - if (count($CatList)) - { - for($j=0; $j < count($CatList);$j++) - { - if($CatList[$j]) - { - $c = $objCatList->GetByResource($CatList[$j]); - $cat = $c->Get("CategoryId"); - - if(($cat>0) && !in_array($cat, $link_cats_arr)) - { - $i->AddToCategory($cat,$table); - } - } - } - } - } - break; - case "n_cat_delete": - $objSession->SetVariable("HasChanges", 1); - $objEditItems = new clsNewsList(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - $table = $objSession->GetEditTable("CategoryItems"); - $r = $_POST["ResourceId"]; - $i = $objEditItems->GetItemByField("ResourceId",$_POST["ResourceId"]); - if(is_object($i)) - { - $CatCount = $i->CategoryMemberCount($table); - $Primary = $i->GetPrimaryCategory(); - if($CatCount==count($CatList)) - { - $sql = "DELETE FROM $table WHERE CategoryId=$cat AND ItemResourceId=$r AND PrimaryCat=0"; - $ado->Execute($sql); - } - else - { - $CatList = $_POST["itemlist"]; - $ado = &GetADODBConnection(); - for($x=0;$xExecute($sql); - $CatCount--; - } - } - } - - for($x=0;$x0)) - { - if($cat==$Primary && $CatCount>1) - { - $sql = "DELETE FROM $table WHERE CategoryId=$cat AND ItemResourceId=$r"; - if((int)$_GLOBALS["debuglevel"]) - echo $sql; - $ado->Execute($sql); - $CatCount--; - } - } - } - } - } - break; - - case 'n_primary_cat': - // change primary category of the link - $objEditItems = new clsNewsList(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - $article = $objEditItems->GetItemByField('ResourceId', $_REQUEST['ResourceId']); - if( is_object($article) ) - { - $new_cat = array_shift($_REQUEST['itemlist']); - $ci_table = $objSession->GetEditTable('CategoryItems'); - $article->SetPrimaryCategory($new_cat, $ci_table); - } - break; - - case "n_add_article": - $application =& kApplication::Instance(); - $application->SetVar('n_mode', 't'); - if($_POST["NewsEditStatus"]!=2) - { - $CreatedOn = DateTimestamp($_POST["news_date"],GetDateFormat(0, true)); - $EndOn = DateTimestamp($_POST["news_enddate"],GetDateFormat(0, true)); - $StartDate = DateTimestamp($_POST["news_startdate"],GetDateFormat(0, true)); - - $login = trim($_POST["news_author"]); - if(strlen($login)) - { - $u = $objUsers->GetItemByField("Login",$login); - if(is_object($u)) - { - $CreatedById = $u->Get("PortalUserId"); - if($CreatedById==0) - $CreatedById = $objSession->Get("PortalUserId"); - } - else - $CreatedById = $objSession->Get("PortalUserId"); - } - else - $CreatedById = $objSession->Get("PortalUserId"); - $html = (int)$_POST["html_enable"]; - - $Status = (int)$_POST["status"]; - $Hot = (int)$_POST["itemhot"]; - $Pop = (int)$_POST["itempop"]; - $New = (int)$_POST["itemnew"]; - - $pick = (int)$_POST["news_pick"]; - $leading = (int)$_POST["news_leading"]; - $leading_cat = (int)$_POST["news_leading_cat"]; - $Priority = (int)$_POST["news_priority"]; - - $news_excerpt = $_POST["news_excerpt"]; - if($_POST["excerpt_generate"] == 1 || strlen($news_excerpt)==0) - { - $tempbody = strip_tags($_POST["news_body"]); - $len = strlen($tempbody); - if ($len < 100) - $news_excerpt = $tempbody; - else - { - $news_excerpt = substr(strip_tags($tempbody), 0, 100); - if(substr($news_excerpt,-1)!=" ") - { - $pos = strrpos($news_excerpt," "); - if($pos) - $news_excerpt = substr($news_excerpt,0,$pos); - } - $news_excerpt .= ".."; - } - } - - $objEditItems = new clsNewsList(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - - $posted_hits = $_POST['news_hits_show']; - - $posted_hits_arr = explode('.', $_POST['news_hits']); - - - $save_hits = $_POST['news_hits']; - if ($posted_hits_arr[0] != $posted_hits) { - $save_hits = $posted_hits; - } - - $l = $objEditItems->Add_News($_POST["CategoryId"], - inp_escape($_POST["news_title"], $html), - inp_escape($news_excerpt, $html), - inp_escape($_POST["news_author"]), - inp_escape($_POST["news_body"], $html), - $CreatedOn, $EndOn, $StartDate, $Status, - $pick, $New,$Pop,$Hot, - $_POST["news_rating"],$_POST["news_votes"],$save_hits, - $leading, $leading_cat, $Priority,$CreatedById,$html, - GetVar('auto_filename'), GetVar('filename') ); - saveCustomFields('n', $l->Get('ResourceId'), 2); - } - break; - - case "n_edit_article": - $application =& kApplication::Instance(); - $application->SetVar('n_mode', 't'); - if($_POST["NewsEditStatus"]!=2) - { - $CreatedOn = DateTimestamp($_POST["news_date"],GetDateFormat(0, true)); - $EndOn = DateTimestamp($_POST["news_enddate"],GetDateFormat(0, true)); - $StartDate = DateTimestamp($_POST["news_startdate"],GetDateFormat(0, true)); - - $login = trim($_POST["news_author"]); - if(strlen($login)) - { - $u = $objUsers->GetItemByField("Login",$login); - if(is_object($u)) - { - $CreatedById = $u->Get("PortalUserId"); - if($CreatedById==0) - $CreatedById = $objSession->Get("PortalUserId"); - } - else - $CreatedById = $objSession->Get("PortalUserId"); - } - else - $CreatedById = $objSession->Get("PortalUserId"); - - $html = (int)$_POST["html_enable"]; - - $Status = (int)$_POST["status"]; - $Hot = (int)$_POST["itemhot"]; - $Pop = (int)$_POST["itempop"]; - $New = (int)$_POST["itemnew"]; - - $pick = (int)$_POST["news_pick"]; - $leading = (int)$_POST["news_leading"]; - $leading_cat = (int)$_POST["news_leading_cat"]; - $Priority = (int)$_POST["news_priority"]; - - if ($_POST["excerpt_generate"] == 1 || strlen($news_excerpt)==0) - { - $len = strlen($_POST["news_body"]); - if ($len < 100) - $news_excerpt = $_POST["news_body"]; - else - $news_excerpt = substr(strip_tags($_POST["news_body"]), 0, 100); - } - else { - $news_excerpt = $_POST["news_excerpt"]; - } - - $objEditItems = new clsNewsList(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - - $posted_hits = $_POST['news_hits_show']; - - $posted_hits_arr = explode('.', $_POST['news_hits']); - - - $save_hits = $_POST['news_hits']; - if ($posted_hits_arr[0] != $posted_hits) { - $save_hits = $posted_hits; - } - - $l = $objEditItems->Edit_News($_POST["NewsId"], - inp_escape($_POST["news_title"],$html), - inp_escape($news_excerpt, $html), - inp_escape($_POST["news_author"]), - inp_escape($_POST["news_body"], $html), - $CreatedOn, $EndOn, $StartDate, $Status, $pick, $New, $Pop, - $Hot, $_POST["news_rating"], $_POST["news_votes"], - $save_hits, $CreatedById,$leading, $leading_cat, $Priority,$html, - GetVar('auto_filename'), GetVar('filename') ); - saveCustomFields('n', $l->Get("ResourceId"), 2); - } - break; - - case "n_article_cut": - if($ro_perm) break; - if(isset($_POST["newslist"])) - { - $objArticleList->CopyToClipboard("CUT","NewsId",$_POST["newslist"]); - } - break; - - case "n_article_copy": - if($ro_perm) break; - if(isset($_POST["newslist"])) - { - $objArticleList->CopyToClipboard("COPY","NewsId",$_POST["newslist"]); - } - break; - - // Used from JS - case "news_paste": - if($ro_perm) break; - if($objArticleList->ItemsOnClipboard()>0) - { - $objArticleList->PasteFromClipboard($objCatList->CurrentCategoryID(),"Title"); - UpdateCategoryCount("Article", $objCatList->CurrentCategoryID(), $objArticleList->ListType); - } - break; - - } - -if( ! $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY") ) -{ - /* Handle the status of news item edit tabs */ - if( GetVar('NewsEditStatus') == 1) - { - $article_ids = $objArticleList->CopyFromEditTable("NewsId"); - if ($article_ids) { - $objCustomDataList->CopyFromEditTable('n'); - } - - $objArticleList->Clear(); - $objImages = new clsImageList(); - $objImages->CopyFromEditTable("ImageId"); - $objArticleList->FlushCache($article_ids); - - } - /* user hit the cancel button */ - if( GetVar('NewsEditStatus') == 2) - { - $objArticleList->PurgeEditTable("NewsId"); - $objArticleList->PurgeCatListEditTable(); - $objCustomDataList->PurgeEditTable('n'); - $objImages = new clsImageList(); - $objImages->PurgeEditTable("ImageId"); - $objArticleList->Clear(); - } -} -?> Index: branches/unlabeled/unlabeled-1.44.2/in-news/units/articles/articles_config.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.44.2/in-news/units/articles/articles_config.php (revision 12747) +++ branches/unlabeled/unlabeled-1.44.2/in-news/units/articles/articles_config.php (revision 0) @@ -1,326 +0,0 @@ - 'n', - - 'ItemClass' => Array('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - - 'ConfigPriority' => 0, - 'Hooks' => Array ( - Array ( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'c', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUpdateCategoryCustomFields', - ), - - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => '', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => 'cdata', - 'DoSpecial' => '*', - 'DoEvent' => 'OnDefineCustomFields', - ), - ), - - 'CatalogItem' => true, - 'AdminTemplatePath' => 'articles', - 'AdminTemplatePrefix' => 'articles_', - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'Reviews_Page', - 4 => 'event', - 5 => 'mode', - ), - - 'RegularEvents' => Array( - 'rss_category_update' => Array('EventName' => 'OnUpdateRSSAtricles', 'RunInterval' => 0, 'Type' => reBEFORE), - ), - - 'IDField' => 'NewsId', - 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events - - 'TitleField' => 'Title', // field, used in bluebar when editing existing item - 'TitlePhrase' => 'la_Text_Article', // phrase used to specify item type in relationship list - - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('n' => '!la_title_AddingArticle!'), - 'edit_status_labels' => Array('n' => '!la_title_EditingArticle!'), - 'new_titlefield' => Array('n' => '!la_title_NewArticle!'), - ), - - 'articles_edit' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_General!"), - - 'articles_categories'=>Array('prefixes' => Array('n','n-ci_List'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Categories!"), - 'articles_relations'=> Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Relations!"), - 'articles_images' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Images!"), - 'articles_reviews' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Reviews!"), - 'articles_custom' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Custom!"), - - 'images_edit' => Array( 'prefixes' => Array('n', 'n-img'), - 'new_status_labels' => Array('n-img'=>'!la_title_Adding_Image!'), - 'edit_status_labels' => Array('n-img'=>'!la_title_Editing_Image!'), - 'new_titlefield' => Array('n-img'=>'!la_title_New_Image!'), - 'format' => "#n_status# '#n_titlefield#' - #n-img_status# '#n-img_titlefield#'", - ), - - 'reviews_edit' => Array( 'prefixes' => Array('n', 'n-rev'), - 'new_status_labels' => Array('n-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"), - 'edit_status_labels' => Array('n-rev'=>'!la_title_Editing_Review!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rev_status#", - ), - - 'relations_edit' => Array( 'prefixes' => Array('n', 'n-rel'), - 'new_status_labels' => Array('n-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), - 'edit_status_labels' => Array('n-rel'=>'!la_title_Editing_Relationship!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rel_status#", - ), - - 'tree_in-news' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-News', 'Version')), - ), - - 'PermItemPrefix' => 'NEWS', - - 'PermTabText' => 'In-News', - 'PermSection' => Array('main' => 'CATEGORY:in-news:articles_list', 'search' => 'in-news:configuration_search', 'email' => 'in-news:configuration_email', 'custom' => 'in-news:configuration_custom'), - - 'Sections' => Array( - 'in-news' => Array( - 'parent' => 'in-portal:root', - 'icon' => 'settings_in-newz', - 'label' => 'la_title_In-News', - 'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view'), - 'priority' => 3.2, - 'type' => stTREE, - ), - - 'in-news:innews_general' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_general', - 'label' => 'la_tab_GeneralSettings', - 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 1, - 'type' => stTREE, - ), - - 'in-news:configuration_output' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_output', - 'label' => 'la_tab_ConfigOutput', - 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 2, - 'type' => stTREE, - ), - - 'in-news:configuration_search' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_search', - 'label' => 'la_tab_ConfigSearch', - 'url' => Array('t' => 'config/config_search', 'module_key' => 'articles', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 3, - 'type' => stTREE, - ), - - 'in-news:configuration_email' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_email', - 'label' => 'la_tab_ConfigE-mail', - 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 4, - 'type' => stTREE, - ), - - 'in-news:configuration_custom' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_custom', - 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 2, 'pass_section' => true, 'pass' => 'm,cf'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), - 'priority' => 5, - 'type' => stTREE, - ), - - ), - - 'FilterMenu' => Array( - 'Groups' => Array( - Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER), - ), - 'Filters' => Array( - 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), - 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ), - 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), - 's1' => Array(), - 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), - 'show_hot' => Array('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), - 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), - 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), - ) - ), - - 'CatalogSelectorName' => 'newslist', - - 'ItemPropertyMappings' => Array( - 'NewDays' => 'News_CatNewDays', // number of days item to be NEW - 'MinPopVotes' => 'News_MinPopVotes', // minimum number of votes for an item to be POP - 'MinPopRating' => 'News_MinPopRating',// minimum rating for an item to be POP - 'MaxHotNumber' => 'News_MaxHotNumber',// maximum number of HOT items - - 'HotLimit' => 'News_HotLimit', // variable name in inp_Cache table - 'ClickField' => 'Hits', // item click count is stored here (in item table) - ), - - 'ItemType' => 2, // this is used when relation to product is added from in-portal and via-versa - - 'ViewMenuPhrase' => 'la_title_Articles', - - 'StatisticsInfo' => Array( - 'pending' => Array( - 'icon' => 'icon16_article_pending.gif', - 'label' => 'la_Text_Articles', - 'js_url' => '#url#', - 'url' => Array('t' => 'in-portal/advanced_view', 'SetTab' => 'n', 'pass' => 'm,n.showall', 'n.showall_event' => 'OnSetFilterPattern', 'n.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'), - 'status' => STATUS_PENDING, - ), - ), - - 'TableName' => TABLE_PREFIX.'News', - - 'CalculatedFields' => Array( - '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = -1, "root", IF (%1$s.CreatedById = -2, "Guest", "n/a")), u.Login)', - 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', - 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', - 'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath', - ), - ), - - 'CacheModRewrite' => true, - - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId', - ), // key - special, value - list select sql - - 'ListSortings' => Array( - '' => Array( - 'ForcedSorting' => Array('EditorsPick' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array('Title' => 'asc'), - ) - ), - 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId'), - - 'SubItems' => Array('n-rev', 'n-ci', 'n-rel', 'n-img', 'n-cdata'), - - 'Fields' => Array ( - 'NewsId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Title' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1), - 'Excerpt' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Author' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Body' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1,'default' => '#NOW#'), - 'TextFormat' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'EndOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), - 'Hits' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), - 'CachedRating' => Array('type' => 'string', 'default' => 0), - 'CachedVotesQty' => Array('type' => 'int','not_null' => 1,'default' => 0), - 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => -1), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), - 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadCatStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array('type' => 'int', 'default' => null), - 'CachedReviewsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StartDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1, 'default' => '#NOW#'), - 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'Archived' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => '#NOW#'), - 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => -1), - 'OrgId' => Array('type' => 'int', 'default' => null), - ), - - 'VirtualFields' => Array( - 'UserName' => Array('type' => 'string', 'default' => ''), - 'CategoryId' => Array('type' => 'int', 'default' => 0), - 'cust_RssOriginalURL' => Array('type' => 'string', 'default' => ''), - 'cust_RssArticleCRC' => Array('type' => 'int', 'default' => 0), - 'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'CachedNavbar' => Array('type' => 'string', 'default' => ''), - ), - - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), -// 'PrimaryCategory' => Array('title' => 'la_col_PrimaryCategory', 'data_block' => 'grid_category_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - - - 'Radio' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_radio_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - ), - - 'ConfigMapping' => Array( - 'PerPage' => 'Perpage_News', - 'ShortListPerPage' => 'Perpage_News_Short', - 'DefaultSorting1Field' => 'News_SortField', - 'DefaultSorting2Field' => 'News_SortField2', - 'DefaultSorting1Dir' => 'News_SortOrder', - 'DefaultSorting2Dir' => 'News_SortOrder2', - ), - ); - - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.23.2/in-news/admin/install.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.23.2/in-news/admin/install.php (revision 12747) +++ branches/unlabeled/unlabeled-1.23.2/in-news/admin/install.php (revision 0) @@ -1,78 +0,0 @@ -Init(); - - require_once FULL_PATH.'/admin/install/install_lib.php'; - require_once FULL_PATH.'/kernel/include/tag-class.php'; - if( !is_object($objTagList) ) $objTagList = new clsTagList(); - - $ado =& GetADODBConnection(); - - // create module category - $cat =& $application->recallObject('c', null, Array('skip_autoload' => true)); - $cat_fields = Array('Name' => 'News', 'AutomaticFilename' => 1, 'Filename' => 'News', - 'Description' => 'News Articles', 'Status' => 1, 'ParentId' => 0, - 'CategoryTemplate' => 'innews/index', 'ItemTemplate' => 'innews/detail', - 'CachedCategoryTemplate' => 'innews/index', 'CachedItemTemplate' => 'innews/detail'); - $cat->SetDBFieldsFromHash($cat_fields); - $cat->Create(); - - $cat_id = $cat->GetId(); - - $filename = FULL_PATH.'/'.$MODULE_NAME.'/admin/install/inportal_schema.sql'; - if (file_exists($filename)) RunSchemaFile($ado, $filename); - - $filename = FULL_PATH.'/'.$MODULE_NAME.'/admin/install/inportal_data.sql'; - if (file_exists($filename)) - { - $sql = file($filename); - for ($x = 0; $x < count($sql); $x++) - { - $sql[$x] = str_replace('{NewsCatId}', $cat_id, $sql[$x]); - } - RunSQLText($ado, $sql); - - $sql = 'SELECT Version FROM '.TABLE_PREFIX.'Modules WHERE Name = '.$ado->qstr('In-News'); - $mod_version = $application->Conn->GetOne($sql); - - if ($ini_file == '') { - $ini_file = FULL_PATH.'/config.php'; - $ini_vars = inst_parse_portal_ini($ini_file, true); - } - - set_ini_value('Module Versions', 'In-News', $mod_version); - save_values(); - - $objTagList->ParseFile(FULL_PATH.'/'.$MODULE_NAME.'/parser.php'); - } - - linkCustomFields($MODULE_NAME, 'n', 2); - linkCustomFields('KERNEL', 'c', 1); // because in-news module creates some custom fields for categories - - $sql = 'DELETE FROM '.TABLE_PREFIX.'Cache WHERE (VarName = "config_files") OR (VarName LIKE "%_parsed")'; - $application->Conn->Query($sql); - - $objModules->Refresh(); - $objModules->SetModuleRoot('In-News', $cat_id); - - $inp_cat =& $objCatList->GetCategory($cat_id); - $inp_cat->UpdateCachedPath(); - $inp_cat->UpdateACL(); - - finalizeModuleInstall($MODULE_NAME); - -?> Index: branches/unlabeled/unlabeled-1.20.2/in-news/admin/install/inportal_data.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.20.2/in-news/admin/install/inportal_data.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.20.2/in-news/admin/install/inportal_data.sql (revision 0) @@ -1,183 +0,0 @@ -INSERT INTO ConfigurationAdmin VALUES ('News_Search_Id', 'la_Text_Search', 'la_prompt_for_Id', 'checkbox', '', '', 1,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortField', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT FieldLabel as OptionName, FieldName as OptionValue FROM CustomField WHERE Type=2', 0,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 1,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortField2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT FieldLabel as OptionName, FieldName as OptionValue FROM CustomField WHERE Type=2', 2,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 3,1) -INSERT INTO ConfigurationAdmin VALUES ('News_CatNewDays', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 5,1) -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 4,1) -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News_Short', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 4,1) -INSERT INTO ConfigurationAdmin VALUES ('News_TopCount', 'la_Text_Articles', 'la_news_newstopminrating_prompt', 'text', '', '', 6,1) -INSERT INTO ConfigurationAdmin VALUES ('News_VotesToHot', 'la_Text_Articles', 'la_news_votestohot_prompt', 'text', '', '', 7,1) -INSERT INTO ConfigurationAdmin VALUES ('News_ShowPick', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 9,1) -INSERT INTO ConfigurationAdmin VALUES ('News_Archive', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 10,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 11,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 12,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 13,1) -INSERT INTO ConfigurationAdmin VALUES ('News_MinVotes', 'la_Text_Articles', 'la_news_MinVotes_prompt', 'text', '', '', 8,1) -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 5,1) -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews_Short', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 6,1) -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Interval', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 17,1) -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Value', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', '', 16,1) -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Interval', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 15,1) -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Value', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', '', 14,1) -INSERT INTO ConfigurationAdmin VALUES ('n_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 1, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 1, 0); - -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_articles', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_articles', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_articles', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_articles', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_articles', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 1); - -INSERT INTO ConfigurationValues VALUES ('Perpage_News', '8', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_PopCount', '4', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_ArticleSort', 'CreatedOn desc, Title asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_CatSort', 'cat_date desc, cat_name asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_TopCount', '4', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_Archive', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_ShowPick', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_CatNewDays', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_ShowMulti', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_Admin_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_Admin_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_Admin_Notice_Suggest', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_User_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_User_Notice_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_User_Notice_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_User_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_User_Notice_Modify_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_User_Notice_Modify_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES ('News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_VotesToHot', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_SortField2', 'Title', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_MinVotes', '20', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('Article_Root', '{NewsCatId}', 'In-Portal', '') -INSERT INTO ConfigurationValues VALUES ('Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_Highlight_OpenTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('News_Highlight_CloseTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES ('n_CategoryTemplate', 'innews/index', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES ('n_ItemTemplate', 'innews/detail', 'In-News', 'in-news:configuration_output'); - -INSERT INTO ConfigurationValues VALUES ('SearchRel_Keyword_articles', '90', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES ('SearchRel_Pop_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES ('SearchRel_Rating_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES ('SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES ('Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search'); - -INSERT INTO Events VALUES (18, 'ARTICLE.ADD', 2, 0, 'In-News', 'la_event_article.add', 1) -INSERT INTO Events VALUES (19, 'ARTICLE.MODIFY', 2, 0, 'In-News', 'la_event_article.modify', 1) -INSERT INTO Events VALUES (20, 'ARTICLE.REVIEW.ADD', 2, 0, 'In-News', 'la_event_article.review.add', 1) -INSERT INTO Events VALUES (21, 'ARTICLE.ADD', 1, 0, 'In-News', 'la_event_article.add', 0) -INSERT INTO Events VALUES (22, 'ARTICLE.APPROVE', 1, 0, 'In-News', 'la_event_article.approve', 0) -INSERT INTO Events VALUES (23, 'ARTICLE.DENY', 1, 0, 'In-News', 'la_event_article.deny', 0) -INSERT INTO Events VALUES (24, 'ARTICLE.MODIFY', 1, 0, 'In-News', 'la_event_article.modify', 0) -INSERT INTO Events VALUES (25, 'ARTICLE.MODIFY.APPROVE', 1, 0, 'In-News', 'la_event_article.modify.approve', 0) -INSERT INTO Events VALUES (26, 'ARTICLE.MODIFY.DENY', 1, 0, 'In-News', 'la_event_article.modify.deny', 0) -INSERT INTO Events VALUES (27, 'ARTICLE.REVIEW.ADD', 1, 0, 'In-News', 'la_event_article.review.add', 0) -INSERT INTO Events VALUES (28, 'ARTICLE.REVIEW.APPROVE', 1, 0, 'In-News', 'la_event_article.review.approve', 0) -INSERT INTO Events VALUES (29, 'ARTICLE.REVIEW.DENY', 1, 0, 'In-News', 'la_event_article.review.deny', 0) -INSERT INTO Events VALUES (44, 'ARTICLE.REVIEW.ADD.PENDING', 1, 0, 'In-News', 'la_event_article.review.add.pending', 0) - -INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article'); - -INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-News', 'in-news/', 'n', '1.1.6', 1, 2, 'innews/', {NewsCatId}, '1054738405'); - -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.VIEW', 'lu_PermName_News.View_desc', 'lu_PermName_News.View_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.ADD', 'lu_PermName_News.Add_desc', 'lu_PermName_News.Add_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.DELETE', 'lu_PermName_News.Delete_desc', 'lu_PermName_News.Delete_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.MODIFY', 'lu_PermName_News.Modify_desc', 'lu_PermName_News.Modify_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.RATE', 'lu_PermName_News.Rate_desc', 'lu_PermName_News.Rate_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW', 'lu_PermName_News.Review_desc', 'lu_PermName_News.Review_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW.PENDING', 'lu_PermName_News.Review.Pending_desc', 'lu_PermName_News.Review.Pending_error', 'In-News'); - -INSERT INTO SearchConfig VALUES ('News', 'Title', 1, 1, 'lu_fielddesc_news_title', 'lu_field_title', 'In-News', 'la_text_article', 2, 0, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Excerpt', 1, 1, 'lu_fielddesc_news_excerpt', 'lu_field_excerpt', 'In-News', 'la_text_article', 3, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Author', 1, 1, 'lu_fielddesc_news_author', 'lu_field_author', 'In-News', 'la_text_article', 4, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Body', 1, 1, 'lu_fielddesc_news_body', 'lu_field_body', 'In-News', 'la_text_article', 5, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedOn', 0, 1, 'lu_fielddesc_news_createdon', 'lu_field_createdon', 'In-News', 'la_text_article', 6, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EndOn', 0, 1, 'lu_fielddesc_news_endon', 'lu_field_endon', 'In-News', 'la_text_article', 7, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Hits', 0, 1, 'lu_fielddesc_news_hits', 'lu_field_hits', 'In-News', 'la_text_article', 8, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedRating', 0, 1, 'lu_fielddesc_news_cachedrating', 'lu_field_cachedrating', 'In-News', 'la_text_article', 9, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedVotesQty', 0, 1, 'lu_fielddesc_news_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-News', 'la_text_article', 10, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedById', 0, 1, 'lu_fielddesc_news_createdbyid', 'lu_field_createdbyid', 'In-News', 'la_text_article', 11, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Priority', 0, 1, 'lu_fielddesc_news_priority', 'lu_field_priority', 'In-News', 'la_text_article', 12, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Status', 0, 1, 'lu_fielddesc_news_status', 'lu_field_status', 'In-News', 'la_text_article', 13, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EditorsPick', 0, 1, 'lu_fielddesc_news_editorspick', 'lu_field_editorspick', 'In-News', 'la_text_article', 14, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadStory', 0, 1, 'lu_fielddesc_news_leadstory', 'lu_field_leadstory', 'In-News', 'la_text_article', 15, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadCatStory', 0, 1, 'lu_fielddesc_news_leadcatstory', 'lu_field_leadcatstory', 'In-News', 'la_text_article', 16, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ResourceId', 0, 1, 'lu_fielddesc_news_resourceid', 'lu_field_resourceid', 'In-News', 'la_text_article', 17, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_news_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-News', 'la_text_article', 18, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'StartDate', 0, 1, 'lu_fielddesc_news_startdate', 'lu_field_startdate', 'In-News', 'la_text_article', 19, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewItem', 0, 1, 'lu_fielddesc_news_newitem', 'lu_field_newitem', 'In-News', 'la_text_article', 20, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'PopItem', 0, 1, 'lu_fielddesc_news_popitem', 'lu_field_popitem', 'In-News', 'la_text_article', 21, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'HotItem', 0, 1, 'lu_fielddesc_news_hotitem', 'lu_field_hotitem', 'In-News', 'la_text_article', 22, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Archived', 0, 1, 'lu_fielddesc_news_archived', 'lu_field_archived', 'In-News', 'la_text_article', 23, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Modified', 0, 1, 'lu_fielddesc_news_modified', 'lu_field_modified', 'In-News', 'la_text_article', 24, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ModifiedById', 0, 1, 'lu_fielddesc_news_modifiedbyid', 'lu_field_modifiedbyid', 'In-News', 'la_text_article', 25, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'OrgId', 0, 0, 'lu_fielddesc_news_orgid', 'lu_field_orgid', 'In-News', 'la_text_article', 26, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewsId', 0, 1, 'lu_fielddesc_news_newsid', 'lu_field_newsid', 'In-News', 'la_text_article', 0, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_VotesToHot"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, '(*) la_prompt_PopularArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2); - -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD.PENDING', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 15, 0, 0, 0); - Index: branches/unlabeled/unlabeled-1.24.2/in-news/admin/install.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.24.2/in-news/admin/install.php (revision 12747) +++ branches/unlabeled/unlabeled-1.24.2/in-news/admin/install.php (revision 0) @@ -1,87 +0,0 @@ -Init(); - - require_once FULL_PATH.'/admin/install/install_lib.php'; - require_once FULL_PATH.'/kernel/include/tag-class.php'; - if( !isset($objTagList) ) $objTagList = new clsTagList(); - - $ado =& GetADODBConnection(); - - // create module category - $ml_formatter =& $application->recallObject('kMultiLanguage'); - $name_field = $ml_formatter->LangFieldName('Name'); - $description_field = $ml_formatter->LangFieldName('Description'); - - $cat =& $application->recallObject('c', null, Array('skip_autoload' => true)); - $cat->Clear(); - $cat_fields = Array($name_field => 'News', 'AutomaticFilename' => 1, 'Filename' => 'News', - $description_field => 'News Articles', 'Status' => 1, 'ParentId' => 0, - 'CategoryTemplate' => 'innews/index', 'CachedCategoryTemplate' => 'innews/index'); - $cat->SetDBFieldsFromHash($cat_fields); - $cat->Create(); - - $cat_id = $cat->GetID(); - - $filename = FULL_PATH.'/'.$MODULE_NAME.'/admin/install/inportal_schema.sql'; - if (file_exists($filename)) RunSchemaFile($ado, $filename); - - $filename = FULL_PATH.'/'.$MODULE_NAME.'/admin/install/inportal_data.sql'; - if (file_exists($filename)) - { - $sql = file($filename); - for ($x = 0; $x < count($sql); $x++) - { - $sql[$x] = str_replace('{NewsCatId}', $cat_id, $sql[$x]); - } - RunSQLText($ado, $sql); - - $sql = 'SELECT Version FROM '.TABLE_PREFIX.'Modules WHERE Name = '.$ado->qstr('In-News'); - $mod_version = $application->Conn->GetOne($sql); - - if (!(isset($ini_file) && $ini_file)) { - $ini_file = FULL_PATH.'/config.php'; - $ini_vars = inst_parse_portal_ini($ini_file, true); - } - - set_ini_value('Module Versions', 'In-News', $mod_version); - save_values(); - - $objTagList->ParseFile(FULL_PATH.'/'.$MODULE_NAME.'/parser.php'); - } - - linkCustomFields($MODULE_NAME, 'n', 2); - linkCustomFields('KERNEL', 'c', 1); // because in-news module creates some custom fields for categories - - $cat->defineFields(); - $application->removeObject('c-cdata'); - $cat->SetDBField('cust_n_ItemTemplate', 'innews/detail'); - $cat->Update(); - - $sql = 'DELETE FROM '.TABLE_PREFIX.'Cache WHERE (VarName = "config_files") OR (VarName LIKE "%_parsed")'; - $application->Conn->Query($sql); - - $objModules->Refresh(); - $objModules->SetModuleRoot('In-News', $cat_id); - - $inp_cat =& $objCatList->GetCategory($cat_id); - $inp_cat->UpdateCachedPath(); - $inp_cat->UpdateACL(); - - finalizeModuleInstall($MODULE_NAME); - -?> Index: branches/unlabeled/unlabeled-1.8.2/in-news/admin/install/langpacks/english.lang =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.8.2/in-news/admin/install/langpacks/english.lang (revision 12747) +++ branches/unlabeled/unlabeled-1.8.2/in-news/admin/install/langpacks/english.lang (revision 0) @@ -1,45 +0,0 @@ - - m/d/Yg:i:s Am/d/Yg:i:s A.,iso-8859-12 - - QXV0aG9y - QXJjaGl2YXRpb24gRGF0ZQ== - Q2F0ZWdvcnkgTGVhZA== - U2l0ZSBMZWFk - U3RhcnQgRGF0ZQ== - QXV0aG9y - QXJ0aWNsZSBCb2R5 - TmV3cyBJdGVtIFRlbXBsYXRl - QXJjaGl2YXRpb24gRGF0ZQ== - QXJ0aWNsZSBFeGNlcnB0 - Q2F0ZWdvcnkgTGVhZCBTdG9yeQ== - U2l0ZSBMZWFkIFN0b3J5 - TWF4aW11bSBudW1iZXIgb2YgSE9UIGFydGljbGVz - TWluaW11bSByYXRpbmcgdG8gY29uc2lkZXIgYXJ0aWNsZSBQT1A= - TWluaW11bSBudW1iZXIgb2Ygdm90ZXMgdG8gY29uc2lkZXIgYXJ0aWNsZSBQT1A= - RGVmYXVsdCBFeHBpcmF0aW9u - RGVsZXRlIEV4cGlyZWQ= - RXhwaXJhdGlvbiBDaGVjayBJbnRlcnZhbA== - RmVlZCBPcmlnaW5hbCBVUkw= - U291cmNlIFVSTA== - VXBkYXRlIEludGVydmFs - U3RhcnQgRGF0ZQ== - SW4tbmV3eg== - QXJ0aWNsZQ== - UlNTIEZlZWQgQXJ0aWNsZSBFeHBpcmF0aW9u - UlNTIEZlZWQgUHJvcGVydGllcw== - QWRkaW5nIEFydGljbGU= - QXJ0aWNsZXM= - RWRpdGluZyBBcnRpY2xl - TmV3IEFydGljbGU= - TmV3IEFydGljbGU= - RmVlZCBPcmlnaW5hbCBVUkw= - UlNTIEZlZWQ= - - - U3ViamVjdDogQXJ0aWNsZSBhZGRlZAoKWW91ciBhcnRpY2xlIGhhcyBiZWVuIGFkZGVk - WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogQXJ0aWNsZSBhZGRlZAoKQW4gYXJ0aWNsZSBoYXMgYmVlbiBhZGRlZA== - WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogQXJ0aWNsZSBhcHByb3ZlZAoKWW91ciBzdWJtaXR0ZWQgYXJ0aWNsZSBoYXMgYmVlbiBhcHByb3ZlZA== - WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogQXJ0aWNsZSBkZWNsaW5lZAoKWW91ciBzdWJtaXR0ZWQgYXJ0aWNsZSBoYXMgYmVlbiBkZWNsaW5lZA== - - - \ No newline at end of file Index: branches/unlabeled/unlabeled-1.8.2/in-news/admin/install/inportal_schema.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.8.2/in-news/admin/install/inportal_schema.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.8.2/in-news/admin/install/inportal_schema.sql (revision 0) @@ -1,41 +0,0 @@ -CREATE TABLE News ( - NewsId int(11) NOT NULL auto_increment, - Title varchar(255) NOT NULL default '', - Filename varchar(255) NOT NULL, - AutomaticFilename tinyint(3) unsigned NOT NULL default '0', - Excerpt text NOT NULL, - Author varchar(255) NOT NULL default '', - Body text NOT NULL, - CreatedOn double NOT NULL default '0', - TextFormat int(11) NOT NULL default '0', - EndOn double NOT NULL default '0', - Hits double(20,6) NOT NULL default '0', - CachedRating varchar(10) default '0', - CachedVotesQty int(11) NOT NULL default '0', - CreatedById int(11) NOT NULL default '0', - Priority int(11) default NULL, - Status tinyint(4) NOT NULL default '2', - EditorsPick tinyint(4) default '0', - LeadStory tinyint(4) NOT NULL default '0', - LeadCatStory tinyint(4) NOT NULL default '0', - ResourceId int(11) default NULL, - CachedReviewsQty int(11) NOT NULL default '0', - StartDate int(11) NOT NULL default '0', - NewItem tinyint(4) NOT NULL default '2', - PopItem tinyint(4) NOT NULL default '2', - HotItem tinyint(4) NOT NULL default '2', - Archived int(11) NOT NULL default '0', - Modified double NOT NULL default '0', - ModifiedById int(11) NOT NULL default '0', - OrgId int(11) default NULL, - PRIMARY KEY (NewsId), - UNIQUE KEY ResourceId (ResourceId), - KEY Filename (Filename(5)) -) -# -------------------------------------------------------- -CREATE TABLE NewsCustomData ( - CustomDataId int(11) NOT NULL auto_increment, - ResourceId int(10) unsigned NOT NULL default '0', - PRIMARY KEY (CustomDataId) -) -# -------------------------------------------------------- \ No newline at end of file Index: branches/unlabeled/unlabeled-1.3.10/in-news/admin/install/langpacks/english.lang =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.3.10/in-news/admin/install/langpacks/english.lang (revision 12747) +++ branches/unlabeled/unlabeled-1.3.10/in-news/admin/install/langpacks/english.lang (revision 0) @@ -1,10 +0,0 @@ - - m/d/Yg:i:s Am/d/Yg:i:s A.,iso-8859-12 - - U3ViamVjdDogQXJ0aWNsZSBhZGRlZAoKWW91ciBhcnRpY2xlIGhhcyBiZWVuIGFkZGVk - WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogQXJ0aWNsZSBhZGRlZAoKQW4gYXJ0aWNsZSBoYXMgYmVlbiBhZGRlZA== - WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogQXJ0aWNsZSBhcHByb3ZlZAoKWW91ciBzdWJtaXR0ZWQgYXJ0aWNsZSBoYXMgYmVlbiBhcHByb3ZlZA== - WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogQXJ0aWNsZSBkZWNsaW5lZAoKWW91ciBzdWJtaXR0ZWQgYXJ0aWNsZSBoYXMgYmVlbiBkZWNsaW5lZA== - - - \ No newline at end of file Index: branches/unlabeled/unlabeled-1.2.2/in-news/admin/install/upgrades/inportal_upgrade_v1.1.6.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.2.2/in-news/admin/install/upgrades/inportal_upgrade_v1.1.6.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.2.2/in-news/admin/install/upgrades/inportal_upgrade_v1.1.6.sql (revision 0) @@ -1,23 +0,0 @@ -UPDATE ConfigurationValues SET ModuleOwner = 'In-News', Section = 'in-news:configuration_search' WHERE VariableName LIKE 'SearchRel_%_article' OR VariableName = 'Search_ShowMultiple_article'; - -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_articles', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_articles', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_articles', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_articles', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_articles', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 1); - -UPDATE ConfigurationValues SET VariableName = 'SearchRel_Keyword_articles' WHERE VariableName = 'SearchRel_Keyword_article'; -UPDATE ConfigurationValues SET VariableName = 'SearchRel_Pop_articles' WHERE VariableName = 'SearchRel_Pop_article'; -UPDATE ConfigurationValues SET VariableName = 'SearchRel_Rating_articles' WHERE VariableName = 'SearchRel_Rating_article'; -UPDATE ConfigurationValues SET VariableName = 'SearchRel_Increase_articles' WHERE VariableName = 'SearchRel_Increase_article'; -UPDATE ConfigurationValues SET VariableName = 'Search_ShowMultiple_articles' WHERE VariableName = 'Search_ShowMultiple_article'; - -CREATE TABLE NewsCustomData (CustomDataId int(11) NOT NULL auto_increment, ResourceId int(10) unsigned NOT NULL default '0', PRIMARY KEY (CustomDataId)); - -INSERT INTO ConfigurationAdmin VALUES ('n_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 1, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 1, 0); - -INSERT INTO ConfigurationValues VALUES ('n_CategoryTemplate', 'innews/index', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES ('n_ItemTemplate', 'innews/detail', 'In-News', 'in-news:configuration_output'); - -UPDATE Modules SET Version = '1.1.6' WHERE Name = 'In-News'; \ No newline at end of file Index: branches/unlabeled/unlabeled-1.2.2/in-news/admin_templates/articles/articles_images.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.2.2/in-news/admin_templates/articles/articles_images.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.2.2/in-news/admin_templates/articles/articles_images.tpl (revision 0) @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - -
- -
- - - - - \ No newline at end of file Index: branches/unlabeled/unlabeled-1.2.2/in-news/admin_templates/articles/images_edit.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.2.2/in-news/admin_templates/articles/images_edit.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.2.2/in-news/admin_templates/articles/images_edit.tpl (revision 0) @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - -
- - - - \ No newline at end of file Index: branches/unlabeled/unlabeled-1.2.2/in-news/admin_templates/articles/articles_custom.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.2.2/in-news/admin_templates/articles/articles_custom.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.2.2/in-news/admin_templates/articles/articles_custom.tpl (revision 0) @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - -
- -
- - - - - Index: branches/unlabeled/unlabeled-1.34.2/in-news/news.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.34.2/in-news/news.php (revision 12747) +++ branches/unlabeled/unlabeled-1.34.2/in-news/news.php (revision 0) @@ -1,1105 +0,0 @@ -clsCatItem(TRUE); - $this->tablename=GetTablePrefix()."News"; - $this->type=TYPE_NEWS; - $this->Prefix = 'n'; - $this->BasePermission="NEWS"; - $this->id_field = "NewsId"; - $this->TagPrefix="article"; - $this->TitleField = 'Title'; - if(isset($NewsId)) - $this->LoadFromDatabase($NewsId); - if($objSession->HasSystemPermission("DEBUG.ITEM")) - { - $this->SetDebugLevel(1); - } - - /* keyword highlighting */ - $this->OpenTagVar = "News_Highlight_OpenTag"; - $this->CloseTagVar = "News_Highlight_CloseTag"; - - } - - - function Validate() - { - global $objSession, $Errors; - - $dataValid = true; - if(!strlen($this->Get("Title"))) - { - $Errors->AddError("error.fieldIsRequired",'Name',"","",get_class($this),"Validate"); - $dataValid = false; - } - - if(!(int)($this->Get("CreatedOn"))) - { - $Errors->AddError("error.fieldIsRequired",'CreatedOn',"","",get_class($this),"Validate"); - $dataValid = false; - } - return $dataValid; - } - - - function SetNewItem() - { - global $objConfig; - - $value = $this->Get("CreatedOn"); - - $cutoff = adodb_date("U") - ($objConfig->Get("News_NewDays") * 86400); - $this->IsNew = FALSE; - if($value>$cutoff) - $this->IsNew = TRUE; - return $this->IsNew; - } - - function SetPopItem() - { - global $objConfig, $objArticleList; - - $cutoff = $objArticleList->GetPopValue(); - $this->IsPop = FALSE; - if($cutoff>0) - { - if($this->Get('CachedRating') >= $cutoff - && $this->Get('CachedVotesQty') >= $objConfig->Get('News_MinPopVotes')) - { - $this->IsPop = TRUE; - } - } - return $this->IsPop; - } - - function SetHotItem() - { - global $objConfig, $objArticleList; - - $this->IsHot = FALSE; - $cutoff = $objArticleList->GetHotValue(); - if($cutoff>0) - { - if($this->Get("Hits")>=$cutoff) - $this->IsHot = TRUE; - } - return $this->IsHot; - } - - function Approve() - { - if($this->Get("Status")==-2) - { - $this->SendUserEventMail("ARTICLE.MODIFY.APPROVE",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.MODIFY.APPROVE"); - } - else - { - $this->SendUserEventMail("ARTICLE.APPROVE",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.APPROVE"); - } - $this->Set("Status", 1); - $this->Update(); - } - - function Deny() - { - if($this->Get("Status")==-2) - { - $this->SendUserEventMail("ARTICLE.DENY.PENDING",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.DENY.PENDING"); - } - else - { - $this->SendUserEventMail("ARTICLE.DENY",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.DENY"); - } - $this->Set("Status", 0); - $this->Update(); - } - - function LoadFromDatabase($Id) - { - global $Errors; - - if(!isset($Id)) - { - $Errors->AddError("error.AppError",NULL,'Internal error: LoadFromDatabase id',"",get_class($this),"LoadFromDatabase"); - return false; - } - - $sql = sprintf("SELECT * FROM ".$this->tablename." WHERE ".$this->IdField()." = '%s'", $Id); - $result = $this->adodbConnection->Execute($sql); - if ($result === false) - { - $Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"LoadFromDatabase"); - return false; - } - - $data = $result->fields; - if(is_array($data)) - $this->SetFromArray($data); - $this->Clean(); - } - function LoadFromResourceId($Id) - { - global $objSession, $Errors; - if(!isset($Id)) - { - $Errors->AddError("error.AppError",NULL,'Internal error: LoadFromDatabase id',"",get_class($this),"LoadFromResourceId"); - return false; - } - $sql = sprintf("SELECT * FROM ".$this->tablename." WHERE ResourceId = '%s'",$Id); - $result = $this->adodbConnection->Execute($sql); - if ($result === false) - { - $Errors->AddError("error.DatabaseError",NULL,$adodbConnection->ErrorMsg(),"",get_class($this),"LoadFromResourceId"); - return false; - } - $data = $result->fields; - if(is_array($data)) - { - $this->SetFromArray($data); - $this->Clean(); - } - return TRUE; - } - - function GetGroupIcon() - { - $ret = "groupicons/".$this->m_GroupId.".gif"; - return $ret; - } - - function StatusIcon() - { - global $rootURL; - - $ret = $rootURL."/in-news/admin/images/"; - - switch($this->Get("Status")) - { - case STATUS_DISABLED: - $ret .= "icon16_article_disabled.gif"; - break; - case STATUS_PENDING: - $ret .= "icon16_article_pending.gif"; - break; - case STATUS_ACTIVE: - $img = "icon16_article.gif"; - if($this->IsPopItem()) - $img = "icon16_article_pop.gif"; - if($this->IsHotItem()) - $img = "icon16_article_hot.gif"; - if($this->IsNewItem()) - $img = "icon16_article_new.gif"; - if($this->Is("EditorsPick")) - $img = "icon16_article_pick.gif"; - $ret .= $img; - break; - } - return $ret; - } - - function ItemURL($Template=NULL,$SetCat=FALSE,$Action=NULL) - { - global $var_list_update,$var_list,$n_var_list_update,$m_var_list_update; - - $url_params = Array(); - $var_list_update["t"] = $Template ? $Template : $var_list["t"]; - -// if($SetCat) -// { - $cat = $this->Get("CategoryId"); - if( !is_numeric($cat) ) $cat = $this->GetPrimaryCategory(); - $m_var_list_update["cat"] = $cat; -// } - - $n_var_list_update["id"] = $this->Get("NewsId"); - - if( isset($Action) && $Action ) $url_params['Action'] = $Action; - - $ret = HREF_Wrapper('', $url_params); - unset($n_var_list_update["id"], $var_list_update["t"],$m_var_list_update["cat"]); - return $ret; - } - - function ParseObject($element) - { - global $objConfig, $objCatList, $var_list_update, $var_list, $n_var_list_update, $m_var_list_update, $objSession, $objUsers; - - $extra_attribs = ExtraAttributes($element->attributes); - if(strtolower($element->name)==$this->TagPrefix) - { - $field = strtolower($element->attributes["_field"]); - switch($field) - { - case "excerpt": - /* - @field:article.excerpt - @description Returns the artcle excerpt - */ - $ret = $this->HighlightField("Excerpt"); - break; - case "body": - /* - @field:article.body - @description:The main body of the article - @attrib:_parsed:bool:If set, HTML and In-Portal tags in the body are preserved, otherwise they are escaped - */ - $this->Increment("Hits", true); - $parsed = $element->attributes["_parsed"]; - if($parsed) - { - $body = inp_unescape($this->Get("Body")); - $body = $this->HighlightText($body); - if($this->Get("TextFormat")!=1) - { - $body = nl2br($body); - } - $ret = $this->ParseTemplateText($body); - } - else - $ret = inp_unescape($this->Get("Body")); - $ret = $this->HighlightText($ret); - break; - case "title": - /* - @field:article.title - @description: Article Title (headline) - */ - $ret = $this->HighlightField("Title"); - break; - case "author": - /* - @field:article.author - @description:text by-line of the article - */ - $ret = $this->HighlightField("Author"); - break; - case "createdby": - /* - @field:article.createdby - @description:parse a user field of the user that created the article - @attrib:_usertag::User field to return (defaults to login ID) - */ - $field = $element->attributes["_usertag"]; - if(!strlen($field)) - { - $field = "user_login"; - } - - $userId = $this->Get("CreatedById"); - if (!empty($userId) && ($userId > 0)) - { - $u =& $objUsers->GetItem($userId); - if (is_object($u)) - { - $ret = $u->parsetag($field); - } - } - else - $ret = " "; - break; - case "date": - /* - @field:article.date - @description:Returns the date/time the article was created - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - $d = $this->Get("CreatedOn"); - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - case "modified": - /* - @field:article.modified - @description:Returns the date/time the article was last modified - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - $d = $this->Get("Modified"); - if($d<=0) - $d = $this->Get("CreatedOn"); - - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - - case "enddate": - /* - @field:article.enddate - @description:Returns the date/time the article is to be archived - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - $d = $this->Get("EndOn"); - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - /* - @field:article.startdate - @description:Returns the date/time the article is to begin being displayed - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - case "startdate": - $d = $this->Get("StartDate"); - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - case "add_favorite_link": - /* - @field:article.add_favorite_link - @description:Returns a URL to add this article to the user's favorites - @attrib:_template:tpl:Template URL should point to - */ - if($objSession->HasCatPermission("FAVORITES")) - { - $t = $element->attributes["_template"]; - if(!strlen($t)) - $t = $var_list["t"]; - $ret = $this->ItemURL($t,FALSE,"n_add_favorite"); - } - else - { - $t = $element->attributes["_errortemplate"]; - if(!strlen($t)) - $t = "favorite_error.tpl"; - $ret = $this->ItemURL($t,FALSE,""); - } - break; - case "del_favorite_link": - /* - @field:article.del_favorite_link - @description:Returns a URL to remove this article from the user's favorites - @attrib:_template:tpl:Template URL should point to - */ - if($objSession->HasCatPermission("FAVORITES")) - { - $t = $element->attributes["_template"]; - if(!strlen($t)) - $t = $var_list["t"]; - $ret = $this->ItemURL($t,FALSE,"n_del_favorite"); - } - else - { - $t = $element->attributes["_errortemplate"]; - if(!strlen($t)) - $t = "favorite_error.tpl"; - $ret = $this->ItemURL($t,FALSE,""); - } - break; - /* - @field:article.favorite_toggle - @description: Returns a link to set or reset the favorite flag for the current user - @attrib: _template:tpl:Template to link to if user has the FAVORITES permission (defaults to current template) - @attrib: _denytemplate:tpl: Template to link to if user does not have favorites permission (ie Guest) Defaults to current template - @attrib: _addlabel:lang:Language tag to display if link is to add favorite - @attrib: _addimage::Image url to include in link if adding favorite - @attrib: _dellabel:lang:Language tag to display if item is already a favorite - @attrib: _delimage::Image url to include in link if removing the favorite - */ - case "favorite_toggle": - $catid = $this->GetPrimaryCategory(); - $t = $element->attributes["_template"]; - if(!strlen($t)) - $t = $var_list["t"]; - if($objSession->HasCatPermission('FAVORITES', $catid)) - { - if(!$this->IsFavorite($objSession->Get("PortalUserId"), $this->GetPrimaryCategory())) - { - $action = "n_add_favorite"; - $label = $element->attributes["_addlabel"]; - } - else - { - $action = "n_del_favorite"; - $label = $element->attributes["_dellabel"]; - } - } - else - { - $action=""; - $label = $element->attributes["_addlabel"]; - $t = $element->attributes["_errortemplate"]; - if(!strlen($t)) - $t = "favorite_error.tpl"; - } - $ret = "ItemURL($t,FALSE,$action)."\">".language($label).""; - break; - - /* - @field:article.hits - @description:Returns number of hits for item - */ - case "hits": - $ret=round($this->Get("Hits")); - break; - - -/* - @field:article.link - @description:Returns a URL setting the link to the article - @attrib:_template:tpl:Template URL should point to -*/ -/* - @field:article.cat_link - @description:Returns a URL setting the article to the current article and the article's category to the current category - @attrib:_template:tpl:Template URL should point to -*/ -/* - @field:article.category - @description:Return a category field from the article's category - @attrib:_cattag::Category field to parse -*/ -/* - @field:article.reviews - @description:Return the number of reviews for the article - @attrib:_today:bool:Count reviews added today only -*/ -/* - @field:article.new - @description:returns text if article's status is "new" - @attrib:_label:lang: Text to return if status is new -*/ -/* - @field:article.pop - @description:returns text if article's status is "popular" - @attrib:_label:lang: Text to return if status is popular -*/ -/* - @field:article.hot - @description:returns text if article's status is "hot" - @attrib:_label:lang: Text to return if status is "hot" -*/ -/* - @field:article.pick - @description:returns text if article's status is "hot" - @attrib:_label:lang: Text to return if status is "hot" -*/ -/* - @field:article.rating - @description:Displays the article rating - @attrib:_displaymode:: How the rating should be displayed
-
    -
  • "Numerical": Show the decimal value -
  • "Text": Show the text version -
  • "Graphical":Show images representing the rating -
- @attrib:_onimage::on image tick shown in graphical display mode - @attrib:_offimage::off image tick shown in graphical display mode - @attrib:_separator::In graphical display mode, this html is placed between each tick image -*/ -/* - @field:article.custom - @description:Returns a custom field - @attrib:_customfield::field name to return - @attrib:_default::default value -*/ -/* - @field:article.fullpath - @description:The full category path of the item -*/ -/* - @field:article.relevance - @description:Displays the article relevance in search results - @attrib:_displaymode:: How the relevance should be displayed
-
    -
  • "Numerical": Show the decimal value -
  • "Bar": Show the HTML representing the relevance. Returns two HTML cells ≶td< with specified background colors -
  • "Graphical":Show image representing the relevance -
- @attrib:_onimage::Zero relevance image shown in graphical display mode. Also used as prefix to build other images (i.e. prefix+"_"+percentage+".file_extension" - @attrib:_OffBackGroundColor::Off background color of HTML cell in bar display mode - @attrib:_OnBackGroundColor::On background color of HTML cell in bar display mode -*/ - - } - if(!isset($ret) || !strlen($ret)) - $ret = parent::ParseObject($element); - } - else - { - $ret = $this->parsetag($element->name); - } - return $ret; - } - - - function parsetag($tag) - { - global $n_var_list, $var_list, $n_var_list_update, $var_list_update, $objConfig; - - $tagname = $tag; - - switch($tagname) - { - case "article_category": - return $this->Get("CategoryId"); - break; - case "article_id": - return $this->Get("NewsId"); - break; - case "article_title": - return inp_unescape($this->Get("Title")); - break; - case "article_excerpt": - return inp_textarea_unescape($this->Get("Excerpt")); - break; - case "article_author": - return $this->Get("Author"); - break; - case "article_body": - $ret = inp_unescape($this->Get("Body")); - //$ret = $this->ParseTemplateText($body); - return $ret; - break; - case "article_footer": - return inp_textarea_unescape($this->Get("Footer")); - break; - case "article_priority": - return (int)$this->Get("Priority"); - break; - case "article_date": - if ($this->Get('CreatedOn') <= 0) { - return ''; - } - return LangDate($this->Get('CreatedOn'), 0, true); - break; - - case "article_enddate": - if ($this->Get('EndOn') <= 0) { - return ''; - } - return LangDate($this->Get('EndOn'), 0, true); - break; - - case "article_startdate": - if ($this->Get('StartDate') <= 0) { - return ''; - } - return LangDate($this->Get('StartDate'), 0, true); - break; - - case "article_hits": - return $this->Get("Hits"); - break; - case "article_views": - return $this->Get("Hits"); - break; - case "article_rating": - return round($this->Get("CachedRating"),1); - break; - case "article_rating_img": - return "inlink/rating/".RatingImage($this->Get("CachedRating")).".gif"; - break; - case "article_votes": - return $this->Get("CachedVotesQty"); - break; - case "article_pick": - if ($this->Is("EditorsPick")) - return "pick"; - break; - - case "article_new": - if($this->IsNewItem()) - return "new"; - break; - case "article_pop": - if($this->IsPopItem()) - return "pop"; - break; - case "article_hot": - if($this->IsHotItem()) - return "new"; - break; - - case "article_admin_icon": - return $this->StatusIcon(); - break; - - case "article_email_action": - $var_list_update["t"] = "window_close"; - $n_var_list_update["id"] = $this->Get("NewsId"); - $ret = HREF_Wrapper(); - unset($var_list_update["t"],$n_var_list_update["id"]); - return $ret; - break; - case "article_group_icon": - return $this->GetGroupIcon(); - break; - case "article_resourceid": - return $this->Get("ResourceId"); - break; - case "article_rating_txt": - return RatingText($this->Get("CachedRating")); - break; - default: - return "Undefined:$tagname"; - break; - } - } - - function Update($UpdatedBy=NULL,$modificationDate = null) - { - DeleteModuleTagCache('innews'); - return parent::Update($UpdatedBy, $modificationDate); - } - - function Delete () - { - DeleteModuleTagCache('innews'); - return parent::Delete(); - } - - function Create () - { - DeleteModuleTagCache('innews'); - return parent::Create(); - } -} /*clsNews*/ - -class _clsNewsList extends clsCatItemList -{ - function _clsNewsList() - { - $this->clsCatItemList(); - $this->Prefix = 'n'; - $this->classname="clsNews"; - - $this->SetTable('live', GetTablePrefix().'News'); - $this->AdminSearchFields = array("Title","Excerpt","Body","Author"); - $this->BasePermission="NEWS"; - - $this->Page = 1; - $this->PerPageVar = "Perpage_News"; - $this->PageEnvar = "n_var_list_update"; - $this->PageEnvarIndex = 'p'; - - $this->PerPageVarLong = "Perpage_News"; - $this->PerPageShortVar = "Perpage_News_Short"; - $this->AddSortField("News_SortField","News_SortOrder"); - $this->AddSortField("News_SortField2","News_SortOrder2"); - $this->ItemType = TYPE_NEWS; - } - - function GetCountSQL($PermName,$CatId=NULL, $GroupId=NULL, $AdditonalWhere="") - { - $sql = parent::GetCountSQL($PermName,$CatId,$GroupId,$AdditonalWhere); - - if (!IsAdmin()) - { - $sql .= ' AND ('.$this->SourceTable.'.Archived = 0)'; - } - - return $sql; - } - - function SaveNewPage() - { - global $n_var_list; - $n_var_list["p"] = $this->Page; - } - - function GetCurrentArticle() - { - global $objCatList, $n_var_list; - - if(!$this->CurrentItem) - { - $id = $n_var_list["id"]; - if($id) - { - $this->SetCurrentItem($id); - } - else - { - $CurrentCat = $objCatList->CurrentCategoryID(); - $sql = "SELECT NewsId FROM ".$this->tablename." WHERE LeadCatStory=1 AND CategoryId=" . $CurrentCat; - $result = $this->adodbConnection->Execute($sql); - if ($result && !$result->EOF) - { - $this->SetCurrentItem($result->fields["NewsId"]); - } - } - } - return $this->GetCurrentItem(); - } - - function SetCurrentItem() - { - global $n_var_list; - parent::SetCurrentItem($n_var_list["id"]); - } - - function CurrentArticleID() - { - global $n_var_list; - - return (int)$n_var_list["id"]; - } - - function LoadArticles($whereClause, $orderBy, $JoinCats=TRUE,$SkipCount=FALSE,$fix_method='set_first') - { - global $objConfig; - - $this->Clear(); - - if(!$SkipCount) - $this->QueryItemCount=TableCount($this->SourceTable,$whereClause,$JoinCats); - - return $this->Query_List($whereClause, $orderBy,$JoinCats,$fix_method); - } - - function CountPending() - { - return TableCount($this->SourceTable,"Status=".STATUS_PENDING,0); - } - - function GetAdminPageLinkList($url) - { - global $objConfig, $n_var_list_update, $var_list_update, $var_list; - - if(strlen($this->PerPageVar)==0) - $this->PerPageVar = "Perpage_News"; - - $PerPage = $objConfig->Get($this->PerPageVar); - if($PerPage<1) - $PerPage=20; - - $NumPages = ceil($this->GetNumPages($PerPage)); - - //echo $this->CurrentPage." of ".$NumPages." Pages"; - - $o = ""; - if($this->Page>$NumPages) - $this->Page=$NumPages; - - $StartPage = $this->Page - 5; - if($StartPage<1) - $StartPage=1; - $EndPage = $StartPage+9; - if($EndPage>$NumPages) - { - $EndPage = $NumPages; - $StartPage = $EndPage-9; - if($StartPage<1) - $StartPage=1; - } - - $o = ""; - - if($StartPage>1) - { - $n_var_list_update["p"] = $this->Page-10; - $prev_url = $url."?env=".BuildEnv(); - $o .= "<<"; - } - - - for($p=$StartPage;$p<=$EndPage;$p++) - { - if($p!=$this->Page) - { - $n_var_list_update["p"]=$p; - $href = $url."?env=".BuildEnv(); - $o .= " $p "; - } - else - { - $o .= "$p"; - } - } - if($EndPage<$NumPages) - { - $n_var_list_update["p"]=$this->Page+10; - $next_url = $url."?env=".BuildEnv(); - $o .= " >>"; - } - unset($n_var_list_update["p"]); - return $o; - } - - function &Add_News($CategoryId, $Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New=2, $Pop=2, $Hot=2, $Rating=0, $Votes=0, $Hits=0, $LeadStory=0, - $LeadCatStory=0,$Priority=0,$CreatedBy="",$Format=0, $auto_filename = 1, $filename = '') - { - global $objSession; - - if($CreatedBy == '') $CreatedBy = $objSession->Get("PortalUserId"); - - $n = new clsNews(NULL); - $filename = $n->StripDisallowed($filename); - - $n->tablename = $this->SourceTable; - $n->Set(array("Title", "Excerpt", "Author", "Body", "CreatedOn", "EndOn", "StartDate", - "Status", "EditorsPick", "NewItem","PopItem","HotItem","CachedRating","CachedVotesQty","Hits", - "LeadStory", "LeadCatStory","Priority","CreatedById","TextFormat", 'AutomaticFilename', 'Filename'), - array($Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New, $Pop, $Hot, $Rating, $Votes, $Hits, - $LeadStory, $LeadCatStory,$Priority,$CreatedBy,$Format, $auto_filename, $filename) ); - $n->Create(); - $ci_table = $objSession->GetEditTable( GetTablePrefix().'CategoryItems' ); - $n->AddToCategory($CategoryId, $ci_table, 1); - - $n->SendUserEventMail("ARTICLE.ADD",$CreatedBy); - $n->SendAdminEventMail("ARTICLE.ADD"); - return $n; - } - - function &Edit_News($NewsId, $Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New, $Pop, $Hot, $Rating, $Votes, $Hits,$CreatedBy,$LeadStory=0, - $LeadCatStory=0, $Priority=0, $Format=0, $auto_filename = 1, $filename = '') - { - global $objSession; - - $n = $this->GetItem($NewsId); - $filename = $n->StripDisallowed($filename); - - $n->Set(array("Title", "Excerpt", "Author", "Body", "CreatedOn", "EndOn", "StartDate", - "Status", "EditorsPick", "NewItem","PopItem","HotItem","CachedRating","CachedVotesQty", - "Hits", "LeadStory", "LeadCatStory", "Priority","CreatedById","TextFormat", - 'AutomaticFilename', 'Filename'), - array($Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New, $Pop, $Hot, $Rating, $Votes, $Hits, - $LeadStory, $LeadCatStory, $Priority,$CreatedBy,$Format, $auto_filename, $filename) ); - $n->Update(); - $n->SendUserEventMail("ARTICLE.MODIFY",$objSession->Get("PortalUserId")); - $n->SendAdminEventMail("ARTICLE.MODIFY"); - return $n; - } - - function GetJoinedSQL($PermName, $CatId=NULL, $AdditionalWhere="", $LoadOnlyPrimary = true) - { - $sql = parent::GetJoinedSQL($PermName,$CatId,$AdditionalWhere, $LoadOnlyPrimary); - $today = adodb_date("U"); - $t = $this->SourceTable; - $where ="(($t.StartDate<$today OR $t.StartDate=0) AND ($t.EndOn>$today OR $t.EndOn=0 OR $t.EndOn IS NULL))"; - $sql .= " AND ".$where; - return $sql; - -// echo $sql; - } - - function LoadListCategory($attribs=array()) - { - global $objCatList, $objSession, $objConfig, $content_set; - - $t = $this->SourceTable; - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - $sql = "SELECT ".$this->SourceTable.".*, ".$ml_formatter->LangFieldName('CachedNavbar')." AS CachedNavbar,".GetTablePrefix()."Category.CategoryId as CategoryId FROM ".$this->SourceTable." "; - - $this->Clear(); - $catid=$attribs["_catid"]; - if(!is_numeric($catid)) - $catid = (int)$objCatList->CurrentCategoryID(); - - $where = $t.".Status=1 "; - if(strlen($attribs["_catlead"])) - { - switch($attribs["_catlead"]) - { - case "exclusive": - $where .= " AND $t.LeadCatStory=1"; - $orderby = " $t.CreatedOn DESC "; - break; - case "inclusive": - $orderby = " $t.CreatedOn DESC "; - break; - case "primary": - $orderby = " $t.LeadCatStory DESC"; - break; - } - } - else - { - $orderby = "$t.CreatedOn DESC "; - } - if((int)$attribs["_archived"]) - { - $where .= " AND $t.archived=1"; - } - else - $where .= " AND $t.archived=0"; - - $sql .= $this->GetJoinedSQL("NEWS.VIEW",$catid,$where, false); - if(!strlen($orderby)) - { - $orderby = $this->QueryOrderByClause(TRUE,TRUE,TRUE); - $sql .= " ".$orderby; - } - else { - $tmp_orderby = $this->QueryOrderByClause(TRUE,TRUE,TRUE); - if (strlen($tmp_orderby)) { - $sql .= $tmp_orderby; - } - else { - $sql .= " ORDER BY ".$orderby; - } - } - //echo $sql."

"; - $this->QueryItemCount = QueryCount($sql); - $this->Query_Item($sql); - } - - function LoadLeadStories($attribs=array()) - { - global $objItemTypes,$objPermissions, $objSession, $objConfig; - - $acl = $objSession->GetACLClause(); - $this->Clear(); - $ntable = $this->SourceTable; - $catitems = GetTablePrefix()."CategoryItems"; - $cattable = GetTablePrefix()."Category"; - $ptable = GetTablePrefix()."PermCache"; - - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - $sql = "SELECT $ntable.*,$cattable.CategoryId,$cattable.".$ml_formatter->LangFieldName('CachedNavbar')." AS CachedNavbar FROM $ntable "; - $sql .= $this->GetJoinedSQL("NEWS.VIEW",NULL,"LeadStory=1 AND Archived=0 AND ".$this->SourceTable.".Status=1"); - $sql .= "ORDER BY EditorsPick DESC, Priority DESC"; - if(strlen(trim($objConfig->Get("News_SortField")))) - { - $OrderBy = trim($objConfig->Get("News_SortField")." ".$objConfig->Get("News_SortOrder")); - $sql .= ", ".$OrderBy; - } - if($objSession->HasSystemPermission("DEBUG.LIST")) - echo htmlentities($sql,ENT_NOQUOTES)."
\n"; - - if (is_numeric($attribs["_maxcount"]) && (int)$attribs["_maxcount"]>0) - $ret = $this->Query_Item($sql, "LIMIT ".$attribs["_maxcount"]); - else - $ret = $this->Query_Item($sql); - - return $ret; - } - - function GetNewValue($CategoryId=NULL) - { - global $NewValues,$objConfig, $objSystemCache; - - if(is_numeric($NewValues["news"])) - { - return $NewValues["news"]; - } - else - { - $CachedValue = $objSystemCache->GetValue("NewsNewValue","innews",""); - if(strlen($CachedValue)) - { - $NewValues["news"] = $CachedValue; - return $CachedValue; - } - - $ado = &GetADODBConnection(); - if ($CategoryId) - { - $days = (int)$objConfig->Get("News_CatNewDays"); - $cutoffdate = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d")-$days,adodb_date("Y")); - $sql = "SELECT CreatedOn FROM ".GetTablePrefix()."News INNER JOIN ".GetTablePrefix()."CategoryItems AS cat ON (".GetTablePrefix()."News.ResourceId = cat.ItemResourceId) WHERE cat.CategoryId=$CategoryId AND CreatedOn>=$cutoffdate ORDER BY CreatedOn DESC "; - } - else - { - $days = (int)$objConfig->Get("News_CatNewDays"); - $cutoffdate = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d")-$days,adodb_date("Y")); - $sql = "SELECT CreatedOn FROM ".GetTablePrefix()."News WHERE CreatedOn>=$cutoffdate ORDER BY CreatedOn DESC "; - } - $rs = $ado->Execute($sql); - - $NewValues["news"] = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d")-$days,adodb_date("Y")); - - while($rs && !$rs->EOF) - { - $NewValues["news"] = $rs->fields["CreatedOn"]; - $rs->MoveNext(); - } - return $NewValues["news"]; - } - } - - function GetPopValue() - { - global $PopValues, $objConfig, $objSystemCache; - - if(is_numeric($PopValues['news'])) - { - return $PopValues['news']; - } - else - { - $PopValues['news'] = $objConfig->Get('News_MinPopRating'); - /*$CachedValue = $objSystemCache->GetValue("NewsPopValue","innews",""); - if(strlen($CachedValue)) - { - $PopValues["news"] = $CachedValue; - return $CachedValue; - } - $ado = &GetADODBConnection(); - $sql = "SELECT CachedRating FROM ".GetTablePrefix()."News WHERE CachedVotesQty > ".(int)$objConfig->Get("News_MinPopVotes")." ORDER BY CachedRating DESC,CachedVotesQty DESC LIMIT 0,".(int)$objConfig->Get("News_MaxHotNumber"); - $rs = $ado->Execute($sql); - $PopValues["news"] = 0; - while($rs && !$rs->EOF) - { - //echo $rs->fields["CachedRating"]."
"; - $PopValues["news"] = $rs->fields["CachedRating"]; - $rs->MoveNext(); - }*/ - $objSystemCache->EditCacheItem('NewsPopValue',$PopValues['news'],'innews',adodb_mktime()+3600,''); - return $PopValues['news']; - } - } - - function GetHotValue() - { - global $objConfig; - - static $cached_value = null; - - if (!isset($cached_value)) { - $ado =& GetADODBConnection(); - $sql = 'SELECT Hits - FROM '.GetTablePrefix().'News - ORDER BY Hits DESC LIMIT 0,'.$objConfig->Get('News_MaxHotNumber'); - $rs = $ado->Execute($sql); - - $cached_value = 0; - while ($rs && !$rs->EOF) { - if ($rs->fields['Hits'] > 0) { - $cached_value = $rs->fields['Hits']; - } - $rs->MoveNext(); - } - } - - return $cached_value; - } -} - -function News_Custom($ResourceId, $tag) -{ - $adodbConnection = &GetADODBConnection(); - - $fieldname= substr($tag, 7); - - $sql = "SELECT Value FROM ".GetTablePrefix()."CustomMetaData LEFT JOIN ".GetTablePrefix()."CustomField USING (CustomFieldId) where ".GetTablePrefix()."CustomMetaData.ResourceId=$ResourceId AND ".GetTablePrefix()."CustomField.FieldName='$fieldname'"; - - $result = $adodbConnection->Execute($sql); - - if ($result->EOF) - return ""; - else - return $result->fields[0]; - -} - - - -?> Index: branches/unlabeled/unlabeled-1.34.2/in-news/admin/install/inportal_data.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.34.2/in-news/admin/install/inportal_data.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.34.2/in-news/admin/install/inportal_data.sql (revision 0) @@ -1,210 +0,0 @@ -INSERT INTO ConfigurationAdmin VALUES ('News_Search_Id', 'la_Text_Search', 'la_prompt_for_Id', 'checkbox', '', '', 1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_CatNewDays', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 10.05, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 10.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News_Short', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 10.04, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopRating', 'la_Text_Articles', 'la_fld_News_MinPopRating', 'text', '', '', 10.06, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MaxHotNumber', 'la_Text_Articles', 'la_fld_News_MaxHotNumber', 'text', '', '', 10.08, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ShowPick', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 10.1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_Archive', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10.09, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopVotes', 'la_Text_Articles', 'la_fld_News_MinPopVotes', 'text', '', '', 10.07, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews_Short', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Interval', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.12, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Value', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', '', 10.12, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Interval', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.11, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Value', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', '', 10.11, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('n_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 30.02, 0, 0); - -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_articles', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_articles', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_articles', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_articles', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_articles', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1); - -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News', '8', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_PopCount', '4', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ArticleSort', 'CreatedOn desc, Title asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatSort', 'cat_date desc, cat_name asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinPopRating', '4', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Archive', '0', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowPick', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatNewDays', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowMulti', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Suggest', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MaxHotNumber', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinPopVotes', '20', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Article_Root', '{NewsCatId}', 'In-Portal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_OpenTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_CloseTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'n_CategoryTemplate', 'innews/index', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (NULL, 'n_ItemTemplate', 'innews/detail', 'In-News', 'in-news:configuration_output'); - -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Keyword_articles', '90', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Pop_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Rating_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search'); - -INSERT INTO Events VALUES (18, 'ARTICLE.ADD', 2, 0, 'In-News', 'la_event_article.add', 1) -INSERT INTO Events VALUES (19, 'ARTICLE.MODIFY', 2, 0, 'In-News', 'la_event_article.modify', 1) -INSERT INTO Events VALUES (20, 'ARTICLE.REVIEW.ADD', 2, 0, 'In-News', 'la_event_article.review.add', 1) -INSERT INTO Events VALUES (21, 'ARTICLE.ADD', 1, 0, 'In-News', 'la_event_article.add', 0) -INSERT INTO Events VALUES (22, 'ARTICLE.APPROVE', 1, 0, 'In-News', 'la_event_article.approve', 0) -INSERT INTO Events VALUES (23, 'ARTICLE.DENY', 1, 0, 'In-News', 'la_event_article.deny', 0) -INSERT INTO Events VALUES (24, 'ARTICLE.MODIFY', 1, 0, 'In-News', 'la_event_article.modify', 0) -INSERT INTO Events VALUES (25, 'ARTICLE.MODIFY.APPROVE', 1, 0, 'In-News', 'la_event_article.modify.approve', 0) -INSERT INTO Events VALUES (26, 'ARTICLE.MODIFY.DENY', 1, 0, 'In-News', 'la_event_article.modify.deny', 0) -INSERT INTO Events VALUES (27, 'ARTICLE.REVIEW.ADD', 1, 0, 'In-News', 'la_event_article.review.add', 0) -INSERT INTO Events VALUES (28, 'ARTICLE.REVIEW.APPROVE', 1, 0, 'In-News', 'la_event_article.review.approve', 0) -INSERT INTO Events VALUES (29, 'ARTICLE.REVIEW.DENY', 1, 0, 'In-News', 'la_event_article.review.deny', 0) -INSERT INTO Events VALUES (44, 'ARTICLE.REVIEW.ADD.PENDING', 1, 0, 'In-News', 'la_event_article.review.add.pending', 0) - -INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article'); - -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.VIEW', 'lu_PermName_News.View_desc', 'lu_PermName_News.View_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.ADD', 'lu_PermName_News.Add_desc', 'lu_PermName_News.Add_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.DELETE', 'lu_PermName_News.Delete_desc', 'lu_PermName_News.Delete_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.MODIFY', 'lu_PermName_News.Modify_desc', 'lu_PermName_News.Modify_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.RATE', 'lu_PermName_News.Rate_desc', 'lu_PermName_News.Rate_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW', 'lu_PermName_News.Review_desc', 'lu_PermName_News.Review_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW.PENDING', 'lu_PermName_News.Review.Pending_desc', 'lu_PermName_News.Review.Pending_error', 'In-News'); - -INSERT INTO SearchConfig VALUES ('News', 'Title', 1, 1, 'lu_fielddesc_news_title', 'lu_field_title', 'In-News', 'la_text_article', 2, 0, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Excerpt', 1, 1, 'lu_fielddesc_news_excerpt', 'lu_field_excerpt', 'In-News', 'la_text_article', 3, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Author', 1, 1, 'lu_fielddesc_news_author', 'lu_field_author', 'In-News', 'la_text_article', 4, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Body', 1, 1, 'lu_fielddesc_news_body', 'lu_field_body', 'In-News', 'la_text_article', 5, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedOn', 0, 1, 'lu_fielddesc_news_createdon', 'lu_field_createdon', 'In-News', 'la_text_article', 6, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EndOn', 0, 1, 'lu_fielddesc_news_endon', 'lu_field_endon', 'In-News', 'la_text_article', 7, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Hits', 0, 1, 'lu_fielddesc_news_hits', 'lu_field_hits', 'In-News', 'la_text_article', 8, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedRating', 0, 1, 'lu_fielddesc_news_cachedrating', 'lu_field_cachedrating', 'In-News', 'la_text_article', 9, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedVotesQty', 0, 1, 'lu_fielddesc_news_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-News', 'la_text_article', 10, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedById', 0, 1, 'lu_fielddesc_news_createdbyid', 'lu_field_createdbyid', 'In-News', 'la_text_article', 11, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Priority', 0, 1, 'lu_fielddesc_news_priority', 'lu_field_priority', 'In-News', 'la_text_article', 12, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Status', 0, 1, 'lu_fielddesc_news_status', 'lu_field_status', 'In-News', 'la_text_article', 13, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EditorsPick', 0, 1, 'lu_fielddesc_news_editorspick', 'lu_field_editorspick', 'In-News', 'la_text_article', 14, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadStory', 0, 1, 'lu_fielddesc_news_leadstory', 'lu_field_leadstory', 'In-News', 'la_text_article', 15, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadCatStory', 0, 1, 'lu_fielddesc_news_leadcatstory', 'lu_field_leadcatstory', 'In-News', 'la_text_article', 16, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ResourceId', 0, 1, 'lu_fielddesc_news_resourceid', 'lu_field_resourceid', 'In-News', 'la_text_article', 17, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_news_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-News', 'la_text_article', 18, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'StartDate', 0, 1, 'lu_fielddesc_news_startdate', 'lu_field_startdate', 'In-News', 'la_text_article', 19, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewItem', 0, 1, 'lu_fielddesc_news_newitem', 'lu_field_newitem', 'In-News', 'la_text_article', 20, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'PopItem', 0, 1, 'lu_fielddesc_news_popitem', 'lu_field_popitem', 'In-News', 'la_text_article', 21, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'HotItem', 0, 1, 'lu_fielddesc_news_hotitem', 'lu_field_hotitem', 'In-News', 'la_text_article', 22, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Archived', 0, 1, 'lu_fielddesc_news_archived', 'lu_field_archived', 'In-News', 'la_text_article', 23, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Modified', 0, 1, 'lu_fielddesc_news_modified', 'lu_field_modified', 'In-News', 'la_text_article', 24, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ModifiedById', 0, 1, 'lu_fielddesc_news_modifiedbyid', 'lu_field_modifiedbyid', 'In-News', 'la_text_article', 25, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'OrgId', 0, 0, 'lu_fielddesc_news_orgid', 'lu_field_orgid', 'In-News', 'la_text_article', 26, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewsId', 0, 1, 'lu_fielddesc_news_newsid', 'lu_field_newsid', 'In-News', 'la_text_article', 0, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('CustomField', 'RssOriginalURL', 1, 0, 'la_fld_RssOriginalURL', 'lu_fld_RssOriginalURL', 'In-News', 'la_section_CustomFields', 0, 283, 1, 'text', '', '', '', '', '', '', 0); - -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireInterval', 'RssExpireInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateInterval', 'RssUpdateInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastUpdated', 'RssLastUpdated', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDeleteExpired', 'RssDeleteExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssOriginalURL', 'lu_fld_RssOriginalURL', 'la_section_CustomFields', 'la_fld_RssOriginalURL', 'label', 'cut_first="100"', 0, 1, 0); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateIntervalType', 'RssUpdateIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssSource', 'RssSource', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireIntervalType', 'RssExpireIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpiration', 'RssDefaultExpiration', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpirationType', 'RssDefaultExpirationType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastExpired', 'RssLastExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssArticleCRC', 'RssArticleCRC', 'la_section_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'n_ItemTemplate', 'n_ItemTemplate', 'la_title_SystemCF', 'n_ItemTemplate', 'text', NULL, 0, 0, 1); - -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, '(*) la_prompt_PopularArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2); - -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD.PENDING', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.add', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.delete', 11, 1, 1, 0); - -INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-News', 'in-news/', 'n', '1.3.0', 1, 2, 'innews/', {NewsCatId}, '1054738405'); \ No newline at end of file Index: branches/unlabeled/unlabeled-1.6.2/in-news/admin_templates/catalog_tab.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.6.2/in-news/admin_templates/catalog_tab.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.6.2/in-news/admin_templates/catalog_tab.tpl (revision 0) @@ -1,58 +0,0 @@ - - - - a_toolbar.AddButton( new ToolBarButton('in-news:new_article', '', function() { - $form_name = $Catalog.queryTabRegistry('prefix', '', 'tab_id') + '_form'; - std_precreate_item('', 'in-news/articles/articles_edit'); - }, true - ) ); - - - -
" view_template="in-news/catalog_tab" edit_template="in-news/articles/articles_edit" category_id="-1" dep_buttons="new_article" class="catalog-tab">
- -
- - - - - $Catalog.setItemCount('', ''); - $Catalog.setCurrentCategory('', ); - - - - - Grids[''].AddAlternativeGrid('', true); - - Grids[''].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6')); - $Catalog.reflectPasteButton(); - $Catalog.setViewMenu(''); - - Grids[''].RadioMode = true; - Grids[''].DblClick = function() {return false}; - - #separator# - - - - - - - - - - - - - - - - - - - - -
-
- - \ No newline at end of file Index: branches/unlabeled/unlabeled-1.35.2/in-news/admin/install/inportal_data.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.35.2/in-news/admin/install/inportal_data.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.35.2/in-news/admin/install/inportal_data.sql (revision 0) @@ -1,210 +0,0 @@ -INSERT INTO ConfigurationAdmin VALUES ('News_Search_Id', 'la_Text_Search', 'la_prompt_for_Id', 'checkbox', '', '', 1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_CatNewDays', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 10.05, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 10.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News_Short', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 10.04, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopRating', 'la_Text_Articles', 'la_fld_News_MinPopRating', 'text', '', '', 10.06, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MaxHotNumber', 'la_Text_Articles', 'la_fld_News_MaxHotNumber', 'text', '', '', 10.08, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ShowPick', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 10.1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_Archive', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10.09, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopVotes', 'la_Text_Articles', 'la_fld_News_MinPopVotes', 'text', '', '', 10.07, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews_Short', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Interval', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.12, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Value', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', '', 10.12, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Interval', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.11, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Value', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', '', 10.11, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('n_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 30.02, 0, 0); - -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_articles', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_articles', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_articles', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_articles', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_articles', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1); - -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News', '8', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_PopCount', '4', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ArticleSort', 'CreatedOn desc, Title asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatSort', 'cat_date desc, cat_name asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinPopRating', '4', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Archive', '0', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowPick', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatNewDays', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowMulti', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Suggest', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MaxHotNumber', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinPopVotes', '20', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Article_Root', '{NewsCatId}', 'In-Portal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_OpenTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_CloseTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'n_CategoryTemplate', 'innews/index', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (NULL, 'n_ItemTemplate', 'innews/detail', 'In-News', 'in-news:configuration_output'); - -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Keyword_articles', '90', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Pop_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Rating_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search'); - -INSERT INTO Events VALUES (18, 'ARTICLE.ADD', 2, 0, 'In-News', 'la_event_article.add', 1) -INSERT INTO Events VALUES (19, 'ARTICLE.MODIFY', 2, 0, 'In-News', 'la_event_article.modify', 1) -INSERT INTO Events VALUES (20, 'ARTICLE.REVIEW.ADD', 2, 0, 'In-News', 'la_event_article.review.add', 1) -INSERT INTO Events VALUES (21, 'ARTICLE.ADD', 1, 0, 'In-News', 'la_event_article.add', 0) -INSERT INTO Events VALUES (22, 'ARTICLE.APPROVE', 1, 0, 'In-News', 'la_event_article.approve', 0) -INSERT INTO Events VALUES (23, 'ARTICLE.DENY', 1, 0, 'In-News', 'la_event_article.deny', 0) -INSERT INTO Events VALUES (24, 'ARTICLE.MODIFY', 1, 0, 'In-News', 'la_event_article.modify', 0) -INSERT INTO Events VALUES (25, 'ARTICLE.MODIFY.APPROVE', 1, 0, 'In-News', 'la_event_article.modify.approve', 0) -INSERT INTO Events VALUES (26, 'ARTICLE.MODIFY.DENY', 1, 0, 'In-News', 'la_event_article.modify.deny', 0) -INSERT INTO Events VALUES (27, 'ARTICLE.REVIEW.ADD', 1, 0, 'In-News', 'la_event_article.review.add', 0) -INSERT INTO Events VALUES (28, 'ARTICLE.REVIEW.APPROVE', 1, 0, 'In-News', 'la_event_article.review.approve', 0) -INSERT INTO Events VALUES (29, 'ARTICLE.REVIEW.DENY', 1, 0, 'In-News', 'la_event_article.review.deny', 0) -INSERT INTO Events VALUES (44, 'ARTICLE.REVIEW.ADD.PENDING', 1, 0, 'In-News', 'la_event_article.review.add.pending', 0) - -INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article'); - -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.VIEW', 'lu_PermName_News.View_desc', 'lu_PermName_News.View_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.ADD', 'lu_PermName_News.Add_desc', 'lu_PermName_News.Add_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.DELETE', 'lu_PermName_News.Delete_desc', 'lu_PermName_News.Delete_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.MODIFY', 'lu_PermName_News.Modify_desc', 'lu_PermName_News.Modify_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.RATE', 'lu_PermName_News.Rate_desc', 'lu_PermName_News.Rate_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW', 'lu_PermName_News.Review_desc', 'lu_PermName_News.Review_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW.PENDING', 'lu_PermName_News.Review.Pending_desc', 'lu_PermName_News.Review.Pending_error', 'In-News'); - -INSERT INTO SearchConfig VALUES ('News', 'Title', 1, 1, 'lu_fielddesc_news_title', 'lu_field_title', 'In-News', 'la_text_article', 2, 0, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Excerpt', 1, 1, 'lu_fielddesc_news_excerpt', 'lu_field_excerpt', 'In-News', 'la_text_article', 3, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Author', 1, 1, 'lu_fielddesc_news_author', 'lu_field_author', 'In-News', 'la_text_article', 4, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Body', 1, 1, 'lu_fielddesc_news_body', 'lu_field_body', 'In-News', 'la_text_article', 5, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedOn', 0, 1, 'lu_fielddesc_news_createdon', 'lu_field_createdon', 'In-News', 'la_text_article', 6, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EndOn', 0, 1, 'lu_fielddesc_news_endon', 'lu_field_endon', 'In-News', 'la_text_article', 7, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Hits', 0, 1, 'lu_fielddesc_news_hits', 'lu_field_hits', 'In-News', 'la_text_article', 8, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedRating', 0, 1, 'lu_fielddesc_news_cachedrating', 'lu_field_cachedrating', 'In-News', 'la_text_article', 9, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedVotesQty', 0, 1, 'lu_fielddesc_news_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-News', 'la_text_article', 10, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedById', 0, 1, 'lu_fielddesc_news_createdbyid', 'lu_field_createdbyid', 'In-News', 'la_text_article', 11, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Priority', 0, 1, 'lu_fielddesc_news_priority', 'lu_field_priority', 'In-News', 'la_text_article', 12, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Status', 0, 1, 'lu_fielddesc_news_status', 'lu_field_status', 'In-News', 'la_text_article', 13, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EditorsPick', 0, 1, 'lu_fielddesc_news_editorspick', 'lu_field_editorspick', 'In-News', 'la_text_article', 14, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadStory', 0, 1, 'lu_fielddesc_news_leadstory', 'lu_field_leadstory', 'In-News', 'la_text_article', 15, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadCatStory', 0, 1, 'lu_fielddesc_news_leadcatstory', 'lu_field_leadcatstory', 'In-News', 'la_text_article', 16, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ResourceId', 0, 1, 'lu_fielddesc_news_resourceid', 'lu_field_resourceid', 'In-News', 'la_text_article', 17, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_news_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-News', 'la_text_article', 18, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'StartDate', 0, 1, 'lu_fielddesc_news_startdate', 'lu_field_startdate', 'In-News', 'la_text_article', 19, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewItem', 0, 1, 'lu_fielddesc_news_newitem', 'lu_field_newitem', 'In-News', 'la_text_article', 20, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'PopItem', 0, 1, 'lu_fielddesc_news_popitem', 'lu_field_popitem', 'In-News', 'la_text_article', 21, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'HotItem', 0, 1, 'lu_fielddesc_news_hotitem', 'lu_field_hotitem', 'In-News', 'la_text_article', 22, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Archived', 0, 1, 'lu_fielddesc_news_archived', 'lu_field_archived', 'In-News', 'la_text_article', 23, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Modified', 0, 1, 'lu_fielddesc_news_modified', 'lu_field_modified', 'In-News', 'la_text_article', 24, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ModifiedById', 0, 1, 'lu_fielddesc_news_modifiedbyid', 'lu_field_modifiedbyid', 'In-News', 'la_text_article', 25, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'OrgId', 0, 0, 'lu_fielddesc_news_orgid', 'lu_field_orgid', 'In-News', 'la_text_article', 26, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewsId', 0, 1, 'lu_fielddesc_news_newsid', 'lu_field_newsid', 'In-News', 'la_text_article', 0, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('CustomField', 'RssOriginalURL', 1, 0, 'la_fld_RssOriginalURL', 'lu_fld_RssOriginalURL', 'In-News', 'la_section_CustomFields', 0, 283, 1, 'text', '', '', '', '', '', '', 0); - -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireInterval', 'RssExpireInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateInterval', 'RssUpdateInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastUpdated', 'RssLastUpdated', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDeleteExpired', 'RssDeleteExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssOriginalURL', 'lu_fld_RssOriginalURL', 'la_section_CustomFields', 'la_fld_RssOriginalURL', 'label', 'cut_first="100"', 0, 1, 0); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateIntervalType', 'RssUpdateIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssSource', 'RssSource', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireIntervalType', 'RssExpireIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpiration', 'RssDefaultExpiration', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpirationType', 'RssDefaultExpirationType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastExpired', 'RssLastExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssArticleCRC', 'RssArticleCRC', 'la_section_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'n_ItemTemplate', 'n_ItemTemplate', 'la_title_SystemCF', 'n_ItemTemplate', 'text', NULL, 0, 0, 1); - -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, '(*) la_prompt_PopularArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2); - -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD.PENDING', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.add', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.delete', 11, 1, 1, 0); - -INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-News', 'in-news/', 'n', '4.0.1', 1, 2, 'innews/', {NewsCatId}, '1054738405'); \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/relations_edit.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/relations_edit.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/relations_edit.txt (revision 0) @@ -1,8 +0,0 @@ -This tab contains a list of all relations of this article. To create a new relation, click the �New' button (two opposite green arrows with a little sun). This will pop up an item picker, where you can choose one category or item of any module that supports relations. -
    -
  • Relation ID � this is a read-only field, the internal system ID of the relation, guaranteed to be unique throughout the system. It is blank when a new relation is created. -
  • Item � this is a read-only field, displaying the name of the item that you are creating a relation to, and its type. In the current version, articles can be related to categories, links (if In-link is installed) and topics (if In-bulletin is installed). -
  • Type � this field designated the type of the relation. A �reciprocal' type denotes a two-way relation, and �one way' � a one directional relation, from the article to the item. -
  • Enabled � this field is the status flag of the relation. -
  • Priority � this field is the numerical priority of the relation. -
\ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/config_list_general.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/config_list_general.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/config_list_general.txt (revision 0) @@ -1,3 +0,0 @@ -This section contains general In-newz settings, which are not related to articles. In the current version, it has only one setting. �Select Module Root Category' allows the administrator to specify the module root category of In-newz. Clicking on the folder shortcut button will pop up a category picker. -The module root category is used in several ways. On the front-end, in the Default theme, the top menu links each module to its module root category. Therefore, the �News' menu item will open this category and its contents. In the Administrative Console, this setting provides a faster way to navigate in the module, as it presets the category for module-specific actions. -Logically, the module root category defines the portion of the catalog tree that is designated only for the In-newz categories. If you are using the categories to store items from multiple modules, this setting is not applicable to your situation. \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_categories.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_categories.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_categories.txt (revision 0) @@ -1,3 +0,0 @@ - -

This tab manages the categories of the article. The list shows all categories to which this article belongs. The administrator can add and remove additional categories on this list. At least one category must be listed, and exactly one category must be designated as the primary. The primary category determines the permissions for the article. To designate the primary category of the article, select the category and click on the Primary Category icon in the toolbar. The �primary' marker will move from the previous Primary Category to the one you have selected.

-The article will appear in all of the categories it belongs to, in the Administrative Console as well as on the front-end. All of the article's attributes (such as the Category Lead Story) will be applied in all categories as well. Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/images_edit.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/images_edit.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/images_edit.txt (revision 0) @@ -1,14 +0,0 @@ -This tab contains all images associated with the article. To create a new image, click on the �New' button (the icon like the Windows GIF icon with a little sun). This will open a new page where you specify the image details. -
    -
  • Image ID � a read-only field, the internal system ID of the image, guaranteed to be unique throughout the system. It is blank when a new image is created. -
  • Name � this field contains the image name, used on the front-end, in side the In-tags to refer to this image. -
  • Alt Value � this field contains the text value, which will be displayed in the �alt' tag of the image on the front end, in side the page HTML code, and when a mouse pointer hovers over the image (in Internet Explorer). -
  • Status � this field contains the status of the image, enabled or disabled. -
  • Primary � this flag designates the primary image. There can be only one primary image per list (for one article). When you check this box on an image, the previous primary image is unset (if there is more than one image in the list). -
  • Priority � this field contains the numerical priority of the image. -
  • Thumbnail location (upload from PC) � Using this control, you can upload an image from the workstation you are at to the In-portal server. The image will be stored in the �in-portal/kernel/images' directory. -
  • Thumbnail location (remote URL) � Here you can enter a remote URL address of an image. It will be linked from the remote server. -
  • Same As Thumbnail � This check box sets the full-size image to be the same as the thumbnail image. When this option is checked, you cannot upload a full-size image. -
  • Thumbnail location (upload from PC) - Using this control, you can upload an image from the workstation you are at to the In-portal server. The image will be stored in the �in-portal/kernel/images' directory. -
  • Thumbnail location (remote URL) - Here you can enter a remote URL address of an image. It will be linked to from the remote server. -
Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_images.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_images.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_images.txt (revision 0) @@ -1,14 +0,0 @@ -This tab contains all images associated with the article. To create a new image, click on the �New' button (the icon like the Windows GIF icon with a little sun). This will open a new page where you specify the image details. -
    -
  • Image ID � a read-only field, the internal system ID of the image, guaranteed to be unique throughout the system. It is blank when a new image is created. -
  • Name � this field contains the image name, used on the front-end, in side the In-tags to refer to this image. -
  • Alt Value � this field contains the text value, which will be displayed in the �alt' tag of the image on the front end, in side the page HTML code, and when a mouse pointer hovers over the image (in Internet Explorer). -
  • Status � this field contains the status of the image, enabled or disabled. -
  • Primary � this flag designates the primary image. There can be only one primary image per list (for one article). When you check this box on an image, the previous primary image is unset (if there is more than one image in the list). -
  • Priority � this field contains the numerical priority of the image. -
  • Thumbnail location (upload from PC) � Using this control, you can upload an image from the workstation you are at to the In-portal server. The image will be stored in the �in-portal/kernel/images' directory. -
  • Thumbnail location (remote URL) � Here you can enter a remote URL address of an image. It will be linked from the remote server. -
  • Same As Thumbnail � This check box sets the full-size image to be the same as the thumbnail image. When this option is checked, you cannot upload a full-size image. -
  • Thumbnail location (upload from PC) - Using this control, you can upload an image from the workstation you are at to the In-portal server. The image will be stored in the �in-portal/kernel/images' directory. -
  • Thumbnail location (remote URL) - Here you can enter a remote URL address of an image. It will be linked to from the remote server. -
Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_relations.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_relations.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_relations.txt (revision 0) @@ -1,8 +0,0 @@ -This tab contains a list of all relations of this article. To create a new relation, click the �New' button (two opposite green arrows with a little sun). This will pop up an item picker, where you can choose one category or item of any module that supports relations. -
    -
  • Relation ID � this is a read-only field, the internal system ID of the relation, guaranteed to be unique throughout the system. It is blank when a new relation is created. -
  • Item � this is a read-only field, displaying the name of the item that you are creating a relation to, and its type. In the current version, articles can be related to categories, links (if In-link is installed) and topics (if In-bulletin is installed). -
  • Type � this field designated the type of the relation. A �reciprocal' type denotes a two-way relation, and �one way' � a one directional relation, from the article to the item. -
  • Enabled � this field is the status flag of the relation. -
  • Priority � this field is the numerical priority of the relation. -
\ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_edit.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_edit.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_edit.txt (revision 0) @@ -1,24 +0,0 @@ -This tab contains the main attributes of the article. -
    -
  • News Article Id � this read-only field displays the unique internal system ID of the article. -
  • Title * - this field contains the article name. -
  • Author* - this field contains the name of the user who is the designated author of the article. It can be an In-portal user, or somebody else � this field accepts plain text as well as user names. By default, the article author is the user who creates the article. The administrator may change the article author, by entering a different user name, by selecting it through a user pop up (shortcut to a user icon), or by entering any other text in this field. -
  • Article Body* � this field contains the main body of the article. The shortcut to the HTML editor next to this field will open a pop-up with an online HTML editor -
  • Article Excerpt - this field contains the summary of the article body. It should be significantly shorter then the main text. The option to �Generate from the article body' will automatically take a portion of the main text and insert it into the excerpt when you save the article. -
  • Automatic Filename � specifies whether the Filename used for mod_rewrite should be generated automatically from the article name, or entered manually. If checked, the Filename will be generated from the article name, replacing all special characters ( !@#$%^&*()+|\=-~`{}][:��;,./?>< ) by the underscore character (�_�), and all multiple underscores with a single underscore. If the resulting name ends with an underscore followed by number, an additional letter will be appended, since the names ending with a number are reserved for system use. The resulting name will also be checked for uniqueness, and if it�s not unique, additional letters will be appended to the end of the name -
  • Custom Filename � the filename used for the URL generation when using mod_rewrite. The field is disabled if Automatic Filename is On. If Automatic Filename is Off, the administrator may enter the filename manually, however it will still be checked for uniqueness, special characters and whether it ends with a number. In such cases the Filename will be automatically corrected before saving. -
  • Status � this field contains the article status. -
  • New � this field controls how the article �new' status is calculated by In-newz. -
  • Hot � this field controls how the article�s �hot� status is calculated by In-newz. In automatic mode, In-newz will consider as �hot� the X number of articles with the most views. X is defined under the In-newz Output options. -
  • Popularity � this field controls how the article�s �pop� status is calculated by In-newz. In automatic mode, In-newz will consider those articles as �popular�, which have at least X number of votes and have a rating above the predefined threshold. The number of votes and rating threshold are defined in the Output options section. -
  • Editor's Pick � this flags sets the Editor's Pick attribute of the article. -
  • Site Lead Story � this flags sets the Site Lead attribute of the article. The default theme is designed for one Site Lead articles, but you may change that depending on your implementation needs. -
  • Category Lead Story � this flags sets the Category Lead attribute of the article. The default theme is designed for three lead articles in each category, but you may change that depending on your implementation needs. -
  • Priority - this field contains the numeric article priority. -
  • Created on * - this field contains the creation date of the article. It is automatically set by the system when the article is created, however it can be changed by the administrator. The date can be entered directly into the field, or by using the visual calendar tool. -
  • Start Date - this field contains the date starting on which the article should be displayed on the front-end. It is automatically set by the system to be the same as the creation date, however it can be changed by the administrator. The date can be entered directly into the field, or by using the visual calendar tool. -
  • Archivation Date - this field contains the date when the article will be archived. Archived articles are not displayed on the front-end. This date is automatically set by the system when the article is created, using the creation date plus the predefined number of days, set in the In-newz configuration. It can be changed by the administrator, by being entered directly into the field, or by using the visual calendar tool. -
  • Rating � this field contains the numeric rating of the article. The rating is calculated as the average value of all ratings selected by users for this article. The range of the value is predefined, and displayed to the right as a hint. The administrator can manually change the rating if necessary. -
  • Votes � this field contains the number of votes for the article. Each time a user votes (selects rating) for the article on the front-end, this value is incremented by one. This value is important for the rating calculating, it is used in the formula to calculate the average. The administrator can manually change the number of votes if necessary. -
  • Hits � this field contains the number of article's hits. This value is incremented each time a user views the article. The administrator can manually change the hits if necessary. -
Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/custom_fields_list.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/custom_fields_list.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/custom_fields_list.txt (revision 0) @@ -1,11 +0,0 @@ -This section allows the administrator to manage the article custom fields. The article custom fields are useful when you need to store additional information about the articles. For example, the articles may have such custom fields, as the language of the article, the safe audience rating, the country where the even occurred, etc. All custom fields will be automatically used in the Administrative Console, in the Article Management section. You will need to edit the theme templates for them to appear on the front-end. -
    -
  • Field Id � this is a read-only field displaying the unique system ID of the custom field. -
  • Field Name � sets the internal name of the custom field. This is the name you would use to refer to the custom field in the In-tags when designing templates. -
  • Field Label � this is a read-only field, which displays the language variable name associated with the label of that field, and the value of the variable in the current language (after the colon). The label is used on the front end, and in the Administrative Console, to describe the field to the user who is entering information into it. -
  • Show on the general tab � this setting controls whether the custom field will be also displayed on the General tab in the Administrative Console, when editing the articles. It is a short cut for frequently used custom fields. All settings below apply only when this is checked. -
  • Heading � this field contains the language variable of the section heading, under which the field appear on the general tab. -
  • Field Prompt � this field contains the language variable, which text will appear as the hint bind the field. -
  • Input Type � this drop down allows the administrator to designate the type of the information stored in the custom field, by specifying the HTML control to be used on the General form. -
  • List of Values � this field contains all choices for the above HTML controls of type �radio button' or �drop down'. The choices must be in the format: �value1 = language variabe1, value2=language variable2�. For example, to create a drop down with three choices (One, Two, Three) and their respective numerical values, this field would contain the following: �1=la_one,2=la_two,3=la_three). -
\ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/config_list_output.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/config_list_output.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/config_list_output.txt (revision 0) @@ -1,18 +0,0 @@ -This section allows the administrator to specify the default values for various article settings in In-newz. -
    -
  • Order articles by � this setting specifies the default primary sort order for the article listings. It applies both on the front-end, and in the Administrative Console � in the catalog. The first dropdown allows to select the field (an attribute of the article), and the second dropdown � the direction of the sort. -
  • And then by � this setting specifies the default secondary sort order. It is set in the same way as the primary, and used when the primary order values are ambiguous. For example, when the primary sort value is �Article Title', the secondary order will be used to sort among articles with the same title. -
  • Number of articles per page � specifies the default number of articles shown per page. This value applies both to the front-end and to the Administrative Console. In the latter, this value can be changed for each session through the View menu. -
  • Articles Per Page (Shortlist) � this setting is similar to the � Number of articles per page', but it applies to the front-end short article lists only. It can be overridden by setting the tag attributes in the appropriate templates. -
  • Number of days for an article to be NEW � this setting specifies the number of days, from the date of creation, during which the article will be automatically marked �New' by the system. This setting will only apply to the articles with the �New' flag set to �Automatic'. -
  • Minimum rating for an article to be POP� this setting specifies the minimum rating of an article for it to be automatically marked �Popular� by the system. This setting will only apply to the articles with the �Popularity� flag set to �Automatic�. Note, that for an article to be �popular� it will need to meet the �minimum votes� requirement set below. -
  • Maximum number of HOT articles � this setting specifies the maximum number �hot� articles in the database. A �hot� article is the one that has more views than the other articles. For example, if this option is set to �2�, the In-portal system will pick the two articles with the most views and mark them as hot. (Of course, this will change real-time as the articles� view counters are updated, or as this setting changes). Please note, if more than one article has the maximum number of hits, the system will still enforce the maximum number requirement; therefore, there may be situations when an article with the most views is not marked as �hot�. -
  • Minimum # of votes for rating consideration � this setting specifies the minimum number of votes required for the article rating to be effective. Usually, when only a small number of users have voted on an article, its rating will not be statistically accurate - it is likely, that only biased users have voted. When a larger number of users vote, the rating becomes more accurate. This setting affects the �popularity� property of an article � articles with less than required number of votes will not be considered �popular�, even if their rating is high enough. -
  • Display editor PICKs above regular articles � this setting will force all articles, marked as �Editor's pick' to be displayed above the other articles, regardless of their priority or sort order. Among themselves, �Editor's pick' articles will be sorted according to the regular rules. -
  • Number of days to archive articles automatically � this setting contains the number of days to be added to the article creation date to set the archivation date. -
  • Allow Duplicate Reviews � this setting specifies the period during which the same user cannot submit another review on the same article. The time can be entered in seconds, minutes, hours, days, months or years. If it is set to zero, the users can submit reviews without this limitation. Please note, that regardless of this setting, the same user will be able to submit a review on another article immediately after the first review. -
  • Allow Duplicate Rating Votes - this setting specifies the period during which the same user cannot rate the same article again. The time can be entered in seconds, minutes, hours, days, months or years. If it is set to zero, the users can rate articles without this limitation. Please note, that regardless of this setting, the same user will be able to rate another article immediately after the first rating. -
  • Reviews Per Page - specifies the default number of reviews shown per page. This value applies both to the front-end and to the Administrative Console. -
  • Sort reviews by - this setting specifies the default primary sort order for the review listings. It applies both on the front-end, and in the Administrative Console � in the article management section, Reviews tab. The first dropdown allows to select the field (an attribute of the review), and the second dropdown � the direction of the sort. -
  • and then by - this setting specifies the default secondary sort order. It is set in the same way as the primary, and used when the primary order values are ambiguous. For example, when the primary sort value is �Review Text', the secondary order will be used to sort among reviews with the same body. -
Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_custom.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_custom.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_custom.txt (revision 0) @@ -1 +0,0 @@ -This tab displays all custom fields configured in In-newz, and allows the administrator to edit their information for this article. \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/email_settings_list.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/email_settings_list.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/email_settings_list.txt (revision 0) @@ -1 +0,0 @@ -This section lists all possible In-newz events. Each event has a description, a type � �User' or �Admin', a status � �Enabled', �Front-end Only', and a �From/To User'. The description hints about when the event occurs. The type indicates whether the email notification will be sent to the front-end user, or the administrator. The status �Enabled' signifies that the email notifications for this event are enabled for both the front-end and the Administrative Console. The Front-end Only' status means that the notifications will be sent only when the event occurs on the front end. The �Disabled' status means no notifications will be sent when this event occurs. The �From/To User' field specifies the �From' email for front-end user notifications, and the �To' email for the administrative notifications. The other, matching pair of addresses (�To' for the front, and �From' for the admin) is automatically determined by the system based on who initiated the event. The event notification status can be changed by clicking on the toolbar buttons � �Enable' to enable the notification, �Disable' to disable it, and �Front Only' (icon with a monitor) to set to �Front-end Only' status. \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/reviews_edit.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/reviews_edit.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/reviews_edit.txt (revision 0) @@ -1,12 +0,0 @@ -This tab lists all reviews of the article, and allows the administrator to manage them. Reviews are user responses to the article. They can be used to collect feedback from the front-end users, to provide details of the ratings, and for many other purposes. -Reviews have their own status, independent from the article. They can be active, pending or disabled. The idea is very similar to the article status � only active reviews are displayed on the article detail page, or wherever specified in the theme design. The category permissions specify the status of a new review created on the front-end. -
    -
  • Enable HTML? � this check box enables or disables HTML code in the review body. When checked, it will render the HTML (for example, a <B> tag will actually make the text bold). When unchecked, it will display the HTML as regular text (the <B> tag will appear exactly as �<B>'). This is a very important setting, since some HTML tags can break the page layout, and in some instances can be a security concern (the Java Script, for example). -
  • Review ID -this field is a read-only unique system ID of the review. -
  • Created by* - this field contains the name of the user who submitted the review. This information will be displayed, along with the text of the review and the date, on the front-end, unless specified otherwise in the active theme. The administrator may change the review author by entering a different user name in this field, or by selecting it through a user picker (shortcut to a user icon will pop up the picker in a new window). -
  • Review Text* - this field contains the main body of the review. To use the online HTML editor, click on the �Editor' button next to this field. -
  • Status - this is the status field of the review. -
  • Priority � this field contains the numerical priority of the review. -
  • Created on � this field contains the creation date of the review. It is automatically set by the system when the review is submitted, however it can be changed by the administrator. The date can be entered directly into the field, or by using the visual calendar tool. -
  • Created at - this field contains the creation time of the review. It is automatically set by the system when the review is submitted, however it can be changed by the administrator. The date can be entered directly into the field, or by using the visual calendar tool. -
\ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_reviews.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_reviews.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/module_help/articles_reviews.txt (revision 0) @@ -1,12 +0,0 @@ -This tab lists all reviews of the article, and allows the administrator to manage them. Reviews are user responses to the article. They can be used to collect feedback from the front-end users, to provide details of the ratings, and for many other purposes. -Reviews have their own status, independent from the article. They can be active, pending or disabled. The idea is very similar to the article status � only active reviews are displayed on the article detail page, or wherever specified in the theme design. The category permissions specify the status of a new review created on the front-end. -
    -
  • Enable HTML? � this check box enables or disables HTML code in the review body. When checked, it will render the HTML (for example, a <B> tag will actually make the text bold). When unchecked, it will display the HTML as regular text (the <B> tag will appear exactly as �<B>'). This is a very important setting, since some HTML tags can break the page layout, and in some instances can be a security concern (the Java Script, for example). -
  • Review ID -this field is a read-only unique system ID of the review. -
  • Created by* - this field contains the name of the user who submitted the review. This information will be displayed, along with the text of the review and the date, on the front-end, unless specified otherwise in the active theme. The administrator may change the review author by entering a different user name in this field, or by selecting it through a user picker (shortcut to a user icon will pop up the picker in a new window). -
  • Review Text* - this field contains the main body of the review. To use the online HTML editor, click on the �Editor' button next to this field. -
  • Status - this is the status field of the review. -
  • Priority � this field contains the numerical priority of the review. -
  • Created on � this field contains the creation date of the review. It is automatically set by the system when the review is submitted, however it can be changed by the administrator. The date can be entered directly into the field, or by using the visual calendar tool. -
  • Created at - this field contains the creation time of the review. It is automatically set by the system when the review is submitted, however it can be changed by the administrator. The date can be entered directly into the field, or by using the visual calendar tool. -
\ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.2.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.2.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.2.sql (revision 0) @@ -1 +0,0 @@ -UPDATE Modules SET Version = '1.2.2' WHERE Name = 'In-News'; \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_2_2.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_2_2.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_2_2.txt (revision 0) @@ -1,8 +0,0 @@ -Readme notes for In-newz 1.2.2 -Intechnic Corporation, Nov 10, 2006 - - -Mainly a maintenance release with a few bug fixes: - -- Language encodings in Ajax Admin Catalog were fixed -- Shortcuts on Summary page to Advanced View section fixed Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v4.1.0.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v4.1.0.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v4.1.0.sql (revision 0) @@ -1,5 +0,0 @@ -ALTER TABLE News CHANGE AutomaticFilename AutomaticFilename TINYINT(3) UNSIGNED NOT NULL DEFAULT '1', CHANGE CreatedById CreatedById INT(11) NOT NULL DEFAULT '-1', CHANGE ModifiedById ModifiedById INT(11) NOT NULL DEFAULT '-1', CHANGE EndOn EndOn INT(11) NULL DEFAULT NULL, CHANGE Priority Priority INT(11) NOT NULL DEFAULT '0'; -ALTER TABLE News DROP Filename; -UPDATE News SET EndOn = NULL WHERE EndOn = 0; - -UPDATE Modules SET Version = '4.1.0' WHERE Name = 'In-News'; \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v1.3.0.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v1.3.0.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v1.3.0.sql (revision 0) @@ -1,3 +0,0 @@ -UPDATE ItemReview SET Module = 'In-News' WHERE ItemId IN (SELECT ResourceId FROM News); - -UPDATE Modules SET Version = '1.3.0' WHERE Name = 'In-News'; \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.1.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.1.php (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.1.php (revision 0) @@ -1,21 +0,0 @@ -Conn->Query($query); - - moveItemTemplatesToCustom('In-News', 'n'); - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_2_1.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_2_1.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_2_1.txt (revision 0) @@ -1,61 +0,0 @@ -File in-news/in-news/action.php changed -File in-news/in-news/news.php changed -File in-news/in-news/admin/install.php changed -File in-news/in-news/admin/include/help/configuration_custom.txt is removed; release_1_2_0 revision 1.1 -File in-news/in-news/admin/include/help/configuration_email.txt is removed; release_1_2_0 revision 1.1 -File in-news/in-news/admin/include/help/dummy is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/admin/include/help/editarticle_category.txt is removed; release_1_2_0 revision 1.2 -File in-news/in-news/admin/include/help/editarticle_custom.txt is removed; release_1_2_0 revision 1.1 -File in-news/in-news/admin/include/help/editarticle_general.txt is removed; release_1_2_0 revision 1.3 -File in-news/in-news/admin/include/help/editarticle_image.txt is removed; release_1_2_0 revision 1.1 -File in-news/in-news/admin/include/help/editarticle_images.txt is removed; release_1_2_0 revision 1.1 -File in-news/in-news/admin/include/help/editarticle_relation.txt is removed; release_1_2_0 revision 1.1 -File in-news/in-news/admin/include/help/editarticle_relations.txt is removed; release_1_2_0 revision 1.1 -File in-news/in-news/admin/include/help/editarticle_review.txt is removed; release_1_2_0 revision 1.1 -File in-news/in-news/admin/include/help/editarticle_reviews.txt is removed; release_1_2_0 revision 1.1 -File in-news/in-news/admin/include/help/innews_general.txt is removed; release_1_2_0 revision 1.1 -File in-news/in-news/admin/include/toolbar/advanced_view.php changed -File in-news/in-news/admin/install/inportal_data.sql changed -File in-news/in-news/admin/install/inportal_schema.sql changed -File in-news/in-news/admin/install/langpacks/english.lang changed -File in-news/in-news/admin/install/upgrades/changelog_1_2_1.txt is new; release_1_2_1 revision 1.1.2.6 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v1.2.1.php is new; release_1_2_1 revision 1.1.2.2 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v1.2.1.sql is new; release_1_2_1 revision 1.4.2.1 -File in-news/in-news/admin/install/upgrades/readme_1_2_1.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/admin_templates/catalog_tab.tpl is new; release_1_2_1 revision 1.5.2.7 -File in-news/in-news/admin_templates/category_items.tpl is removed; release_1_2_0 revision 1.3 -File in-news/in-news/admin_templates/category_properties.tpl is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/articles/articles_categories.tpl is new; release_1_2_1 revision 1.1.2.6 -File in-news/in-news/admin_templates/articles/articles_custom.tpl is new; release_1_2_1 revision 1.2.2.4 -File in-news/in-news/admin_templates/articles/articles_edit.tpl is new; release_1_2_1 revision 1.1.2.4 -File in-news/in-news/admin_templates/articles/articles_images.tpl is new; release_1_2_1 revision 1.2.2.2 -File in-news/in-news/admin_templates/articles/articles_relations.tpl is new; release_1_2_1 revision 1.1.2.5 -File in-news/in-news/admin_templates/articles/articles_reviews.tpl is new; release_1_2_1 revision 1.1.2.2 -File in-news/in-news/admin_templates/articles/articles_tabs.tpl is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/articles/images_edit.tpl is new; release_1_2_1 revision 1.2.2.3 -File in-news/in-news/admin_templates/articles/relations_edit.tpl is new; release_1_2_1 revision 1.1.2.3 -File in-news/in-news/admin_templates/articles/review_edit.tpl is new; release_1_2_1 revision 1.1.2.2 -File in-news/in-news/admin_templates/img/icons/icon46_articles.gif is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/img/itemicons/icon16_article.gif is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/img/itemicons/icon16_article_disabled.gif is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/img/itemicons/icon16_article_hot.gif is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/img/itemicons/icon16_article_new.gif is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/img/itemicons/icon16_article_pick.gif is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/img/itemicons/icon16_article_pop.gif is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/img/toolbar/tool_new_article.gif is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/img/toolbar/tool_new_article_f2.gif is new; release_1_2_1 revision 1.1 -File in-news/in-news/admin_templates/img/toolbar/tool_new_article_f3.gif is new; release_1_2_1 revision 1.1 -File in-news/in-news/module_help/articles_categories.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/articles_custom.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/articles_edit.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/articles_images.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/articles_relations.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/articles_reviews.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/config_list_general.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/custom_fields_list.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/email_settings_list.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/images_edit.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/relations_edit.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/module_help/reviews_edit.txt is new; release_1_2_1 revision 1.1.2.1 -File in-news/in-news/units/articles/articles_config.php changed -File in-news/in-news/units/articles/articles_event_handler.php changed Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_4_1_0.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_4_1_0.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_4_1_0.txt (revision 0) @@ -1,12 +0,0 @@ -File in-news/in-news/admin/install/inportal_data.sql changed -File in-news/in-news/admin/install/inportal_schema.sql changed -File in-news/in-news/admin/install/upgrades/changelog_4_0_1.txt changed -File in-news/in-news/admin/install/upgrades/changelog_4_1_0.txt is new; release_4_1_0 revision 1.1.2.6 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v4.0.1.sql changed -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v4.1.0.sql is new; release_4_1_0 revision 1.1.2.1 -File in-news/in-news/admin/install/upgrades/readme_4_1_0.txt is new; release_4_1_0 revision 1.1.2.1 -File in-news/in-news/admin_templates/catalog_tab.tpl changed -File in-news/in-news/admin_templates/category_properties.tpl changed -File in-news/in-news/admin_templates/articles/articles_edit.tpl changed -File in-news/in-news/units/articles/articles_config.php changed -File in-news/in-news/units/articles/articles_event_handler.php changed Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_2_0.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_2_0.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_2_0.txt (revision 0) @@ -1,8 +0,0 @@ -Readme notes for In-newz 1.2.0 -Intechnic Corporation, July 4, 2006 - -This release is necessary to support the new features introduced in In-portal Platform 1.2.0 (such as Section Permissions in the Administrative Console). -Please refer to the release notes for In-portal Platform 1.2.0 for more information. - -New In-newz features: - - Added RSS support - importing and exporting In-newz articles into the RSS format \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_3_0.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_3_0.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_3_0.txt (revision 0) @@ -1,8 +0,0 @@ -Readme notes for In-newz 1.3.0 -Intechnic Corporation, Feb 23, 2007 - -Fixes: - -- Shortcuts on Summary page to Advanced View section fixed - -This release is a maintenance release. Please refer to the release notes for In-portal Platform 1.4.0 for more information. Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_2_0.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_2_0.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_2_0.txt (revision 0) @@ -1,40 +0,0 @@ -File in-news/in-news/action.php changed -File in-news/in-news/parser.php changed -File in-news/in-news/admin/addarticle.php changed -File in-news/in-news/admin/addimage.php changed -File in-news/in-news/admin/addreview.php changed -File in-news/in-news/admin/advanced_view.php changed -File in-news/in-news/admin/config_general.php is removed; release_1_1_6 revision 1.6 -File in-news/in-news/admin/install.php changed -File in-news/in-news/admin/images/icon24_settings_in-newz.gif is removed; release_1_1_6 revision 1.1 -File in-news/in-news/admin/images/icon46_list_settings_in-newz.gif is removed; release_1_1_6 revision 1.1 -File in-news/in-news/admin/images/icon46_settings_in-newz.gif is removed; release_1_1_6 revision 1.1 -File in-news/in-news/admin/include/toolbar/advanced_view.php changed -File in-news/in-news/admin/install/inportal_data.sql changed -File in-news/in-news/admin/install/inportal_schema.sql changed -File in-news/in-news/admin/install/langpacks/english.lang changed -File in-news/in-news/admin/install/upgrades/changelog_1_2_0.txt is new; release_1_2_0 revision 1.1.2.9 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v1.1.6.php changed -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v1.2.0.php is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v1.2.0.sql is new; release_1_2_0 revision 1.3.2.1 -File in-news/in-news/admin/install/upgrades/readme_1_2_0.txt is new; release_1_2_0 revision 1.1.2.2 -File in-news/in-news/admin_templates/category_items.tpl is new; release_1_2_0 revision 1.3 -File in-news/in-news/admin_templates/img/icons/icon24_settings_custom.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon24_settings_email.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon24_settings_general.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon24_settings_in-link.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon24_settings_in-newz.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon24_settings_output.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon24_settings_search.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon46_list_settings_custom.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon46_list_settings_email.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon46_list_settings_general.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon46_list_settings_in-newz.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon46_list_settings_output.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon46_list_settings_search.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/icons/icon46_settings_in-newz.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/admin_templates/img/itemicons/icon16_article_pending.gif is new; release_1_2_0 revision 1.1 -File in-news/in-news/units/articles/articles_config.php changed -File in-news/in-news/units/articles/articles_event_handler.php changed -File in-news/themes/default/innews/index.tpl changed -File in-news/themes/default/innews/rss_feed.tpl is new; release_1_2_0 revision 1.2 Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v4.0.1.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v4.0.1.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/inportal_upgrade_v4.0.1.sql (revision 0) @@ -1,2 +0,0 @@ -ALTER TABLE News CHANGE Priority Priority INT( 11 ) NOT NULL DEFAULT '0'; -UPDATE Modules SET Version = '4.0.1' WHERE Name = 'In-News'; \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_1_6.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_1_6.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_1_6.txt (revision 0) @@ -1,5 +0,0 @@ -Readme notes for In-newz 1.1.6 -Intechnic Corporation, May 4, 2006 - -This is a maintenance release to support new features introduced in In-portal Platform 1.1.8 such as Category and Item Templates and custom field mechanism refactoring. -Please refer to the release notes for In-portal Platform 1.1.8 \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_4_1_0.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_4_1_0.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_4_1_0.txt (revision 0) @@ -1,11 +0,0 @@ -Readme notes for In-newz 4.1.0 -Intechnic Corporation, May 23, 2007 - - -****** MySQL 5 database server is fully supported starting with this release ****** - -Fixes: - -- Improved List Articles mechanism - -Please refer to the release notes for In-portal Platform 4.1.0 for more information. Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_2_2.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_2_2.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_2_2.txt (revision 0) @@ -1,7 +0,0 @@ -File in-news/in-news/admin/install/inportal_data.sql changed -File in-news/in-news/admin/install/upgrades/changelog_1_2_2.txt is new; release_1_2_2 revision 1.1.2.4 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v1.2.2.sql is new; release_1_2_2 revision 1.1.2.1 -File in-news/in-news/admin/install/upgrades/readme_1_2_2.txt is new; release_1_2_2 revision 1.1.2.1 -File in-news/in-news/admin_templates/catalog_tab.tpl changed -File in-news/in-news/units/articles/articles_config.php changed -File in-news/in-news/units/articles/articles_tag_processor.php changed Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_4_0_1.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_4_0_1.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_4_0_1.txt (revision 0) @@ -1,6 +0,0 @@ -Readme notes for In-newz 4.0.1 -Intechnic Corporation, Apr 5, 2007 - - -This is a maintenance release of In-newz. -Please refer to the release notes for In-portal Platform 4.0.1 for more information. Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_1_6.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_1_6.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_1_6.txt (revision 0) @@ -1,53 +0,0 @@ -File in-news/in-news/action.php changed -File in-news/in-news/frontaction.php changed -File in-news/in-news/news.php changed -File in-news/in-news/parser.php changed -File in-news/in-news/admin/addarticle.php changed -File in-news/in-news/admin/addarticle_custom.php changed -File in-news/in-news/admin/install.php changed -File in-news/in-news/admin/include/navmenu.php changed -File in-news/in-news/admin/include/help/configuration_output.txt is removed; release_1_1_5 revision 1.2 -File in-news/in-news/admin/include/help/configuration_search.txt is removed; release_1_1_5 revision 1.1 -File in-news/in-news/admin/install/inportal_data.sql changed -File in-news/in-news/admin/install/inportal_schema.sql changed -File in-news/in-news/admin/install/upgrades/changelog_1_1_6.txt is new; release_1_1_6 revision 1.1.2.8 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v1.1.6.php is new; release_1_1_6 revision 1.2 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v1.1.6.sql is new; release_1_1_6 revision 1.2.2.2 -File in-news/in-news/admin/install/upgrades/readme_1_1_5.txt is new; release_1_1_6 revision 1.1.2.1 -File in-news/in-news/admin/install/upgrades/readme_1_1_6.txt is new; release_1_1_6 revision 1.1.2.2 -File in-news/in-news/admin_templates/img/logo_bg.gif is new; release_1_1_6 revision 1.1.2.1 -File in-news/in-news/module_help/config_list_output.txt is new; release_1_1_6 revision 1.1.2.1 -File in-news/in-news/module_help/config_list_search.txt is new; release_1_1_6 revision 1.1 -File in-news/in-news/units/articles/articles_config.php changed -File in-news/themes/default/innews/addreview.tpl changed -File in-news/themes/default/innews/catindex.tpl changed -File in-news/themes/default/innews/detail.tpl changed -File in-news/themes/default/innews/get_rated.tpl changed -File in-news/themes/default/innews/index.tpl changed -File in-news/themes/default/innews/main.tpl changed -File in-news/themes/default/innews/myitem_element.tpl changed -File in-news/themes/default/innews/new.tpl changed -File in-news/themes/default/innews/pick.tpl changed -File in-news/themes/default/innews/rate.tpl changed -File in-news/themes/default/innews/related_element.tpl changed -File in-news/themes/default/innews/reviews.tpl changed -File in-news/themes/default/innews/addreview/addreview_form.tpl changed -File in-news/themes/default/innews/addreview/review_confirm.tpl changed -File in-news/themes/default/innews/catindex/catindex.tpl changed -File in-news/themes/default/innews/index/article_element.tpl changed -File in-news/themes/default/innews/index/catlead_element.tpl changed -File in-news/themes/default/innews/index/sitelead_element.tpl changed -File in-news/themes/default/innews/index/sitemap_cat_element.tpl changed -File in-news/themes/default/innews/index/sitemap_subcat_element.tpl changed -File in-news/themes/default/innews/index/subcat_element.tpl changed -File in-news/themes/default/innews/main/favorites_element.tpl changed -File in-news/themes/default/innews/main/topstories.tpl changed -File in-news/themes/default/innews/main/edpick/articles_element.tpl changed -File in-news/themes/default/innews/my_account/new_articles.tpl changed -File in-news/themes/default/innews/new/article_element.tpl changed -File in-news/themes/default/innews/pick/article_element.tpl changed -File in-news/themes/default/innews/quicklinks/articles_element.tpl changed -File in-news/themes/default/innews/rate/getting_rated.tpl changed -File in-news/themes/default/innews/rate/rate_form.tpl changed -File in-news/themes/default/innews/search_results/search_result_element.tpl changed -File in-news/themes/default/innews/trash/article_element.tpl changed Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_4_0_1.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_4_0_1.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_4_0_1.txt (revision 0) @@ -1,7 +0,0 @@ -File in-news/in-news/admin/install/inportal_data.sql changed -File in-news/in-news/admin/install/inportal_schema.sql changed -File in-news/in-news/admin/install/upgrades/changelog_1_3_0.txt changed -File in-news/in-news/admin/install/upgrades/changelog_4_0_1.txt is new; release_4_0_1 revision 1.1.2.11 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v4.0.1.sql is new; release_4_0_1 revision 1.1.2.2 -File in-news/in-news/admin/install/upgrades/readme_4_0_1.txt is new; release_4_0_1 revision 1.1.2.1 -File in-news/in-news/units/articles/articles_config.php changed Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_1_5.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_1_5.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_1_5.txt (revision 0) @@ -1,4 +0,0 @@ -Readme notes for In-newz 1.1.5 -Intechnic Corporation, April 4, 2006 - -Please refer to release notes for In-portal Platform 1.1.7. \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_1_5.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_1_5.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_1_5.txt (revision 0) @@ -1,14 +0,0 @@ -File in-news/in-news/action.php changed -File in-news/in-news/frontaction.php changed -File in-news/in-news/module_init.php changed -File in-news/in-news/news.php changed -File in-news/in-news/admin/addarticle.php changed -File in-news/in-news/admin/addreview.php changed -File in-news/in-news/admin/include/toolbar/editarticle_reviews.php changed -File in-news/in-news/admin/install/inportal_data.sql changed -File in-news/in-news/admin/install/langpacks/english.lang changed -File in-news/in-news/admin/install/upgrades/changelog_1_1_5.txt is new; release_1_1_5 revision 1.1.2.9 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v1.1.5.sql is new; release_1_1_5 revision 1.1 -File in-news/in-news/units/articles/articles_config.php changed -File in-news/in-news/units/articles/articles_event_handler.php is new; release_1_1_5 revision 1.2 -File in-news/in-news/units/articles/articles_tag_processor.php changed Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_2_1.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_2_1.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/readme_1_2_1.txt (revision 0) @@ -1,5 +0,0 @@ -Readme notes for In-newz 1.2.1 -Intechnic Corporation, July 25, 2006 - -This release is necessary to support the new features introduced in In-portal Platform 1.2.1 (such as Section Permissions in the Administrative Console). -Please refer to the release notes for In-portal Platform 1.2.1 for more information. Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_3_0.txt =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_3_0.txt (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/install/upgrades/changelog_1_3_0.txt (revision 0) @@ -1,12 +0,0 @@ -File in-news/in-news/admin/install/inportal_data.sql changed -File in-news/in-news/admin/install/upgrades/changelog_1_3_0.txt is new; release_1_3_0 revision 1.1.2.15 -File in-news/in-news/admin/install/upgrades/inportal_upgrade_v1.3.0.sql is new; release_1_3_0 revision 1.1.2.2 -File in-news/in-news/admin/install/upgrades/readme_1_3_0.txt is new; release_1_3_0 revision 1.1.2.1 -File in-news/in-news/admin_templates/catalog_tab.tpl changed -File in-news/in-news/admin_templates/articles/articles_custom.tpl changed -File in-news/in-news/admin_templates/articles/articles_edit.tpl changed -File in-news/in-news/admin_templates/articles/articles_images.tpl changed -File in-news/in-news/admin_templates/articles/images_edit.tpl changed -File in-news/in-news/admin_templates/articles/relations_edit.tpl changed -File in-news/in-news/units/articles/articles_config.php changed -File in-news/themes/default/innews/index.tpl changed Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin/include/help/dummy =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin/include/help/dummy (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin/include/help/dummy (revision 0) @@ -1 +0,0 @@ \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/category_properties.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/category_properties.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/category_properties.tpl (revision 0) @@ -1,31 +0,0 @@ - - - "> - - - " id="" value="" tabindex="" size="" maxlength="" class="" onblur=""> - - - - - -   - - - - - - - - - - - - - Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/relations_edit.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/relations_edit.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/relations_edit.tpl (revision 0) @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - -
- Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_reviews.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_reviews.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_reviews.tpl (revision 0) @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - -
- -
- - - - " id=""> - img/itemicons/">  - - - - - - - - Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_relations.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_relations.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_relations.tpl (revision 0) @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - -
- -
- - - -"> -"> - - - \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/review_edit.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/review_edit.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/review_edit.tpl (revision 0) @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - -
- Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_categories.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_categories.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_categories.tpl (revision 0) @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - -
- -
- - - - " id=""> - ">  - - - - - - - - Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_edit.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_edit.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/articles/articles_edit.tpl (revision 0) @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - "> - - - - - - - - - - - - - - - - - - - - - - - - - - - " /> - - - - - -
- error"> - *:
- ');"> -
-
- -
 
- - - Index: branches/unlabeled/unlabeled-1.1.2/in-news/admin_templates/img/logo_bg.gif =================================================================== diff -u -N -r12747 -r12832 Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/in-news/units/rss/lastrss.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/units/rss/lastrss.php (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/units/rss/lastrss.php (revision 0) @@ -1,184 +0,0 @@ -cache_dir != '') { - $cache_file = $this->cache_dir . '/rsscache_' . md5($rss_url); - $timedif = @(time() - filemtime($cache_file)); - if ($timedif < $this->cache_time) { - // cached file is fresh enough, return cached array - $result = unserialize(join('', file($cache_file))); - // set 'cached' to 1 only if cached file is correct - if ($result) $result['cached'] = 1; - } else { - // cached file is too old, create new - $result = $this->Parse($rss_url); - $serialized = serialize($result); - if ($f = @fopen($cache_file, 'w')) { - fwrite ($f, $serialized, strlen($serialized)); - fclose($f); - } - if ($result) $result['cached'] = 0; - } - } - // If CACHE DISABLED >> load and parse the file directly - else { - $result = $this->Parse($rss_url); - if ($result) $result['cached'] = 0; - } - // return result - return $result; - } - - // ------------------------------------------------------------------- - // Modification of preg_match(); return trimed field with index 1 - // from 'classic' preg_match() array output - // ------------------------------------------------------------------- - function my_preg_match ($pattern, $subject) { - preg_match($pattern, $subject, $out); - return trim($out[1]); - } - - // ------------------------------------------------------------------- - // Replace HTML entities &something; by real characters - // ------------------------------------------------------------------- - function unhtmlentities ($string) { - $trans_tbl = get_html_translation_table (HTML_ENTITIES); - $trans_tbl = array_flip ($trans_tbl); - return strtr ($string, $trans_tbl); - } - - // ------------------------------------------------------------------- - // Encoding conversion functiuon - // ------------------------------------------------------------------- - function MyConvertEncoding($in_charset, $out_charset, $string) { - // if substitute_character - if ($this->subs_char) { - // Iconv() to UTF-8. mb_convert_encoding() to $out_charset - $utf = iconv($in_charset, 'UTF-8', $string); - mb_substitute_character($this->subs_char); - return mb_convert_encoding ($utf, $out_charset, 'UTF-8'); - } else { - // Iconv() to $out_charset - return iconv($in_charset, $out_charset, $string); - } - } - - // ------------------------------------------------------------------- - // Parse() is private method used by Get() to load and parse RSS file. - // Don't use Parse() in your scripts - use Get($rss_file) instead. - // ------------------------------------------------------------------- - function Parse ($rss_url) { - // Open and load RSS file - if ($f = @fopen($rss_url, 'r')) { - $rss_content = ''; - while (!feof($f)) { - $rss_content .= fgets($f, 4096); - } - fclose($f); - - // Parse document encoding - $result['encoding'] = $this->my_preg_match("'encoding=[\'\"](.*?)[\'\"]'si", $rss_content); - - // If code page is set convert character encoding to required - if ($this->cp != '') - $rss_content = $this->MyConvertEncoding($result['encoding'], $this->cp, $rss_content); - - // Parse CHANNEL info - preg_match("'(.*?)'si", $rss_content, $out_channel); - foreach($this->channeltags as $channeltag) - { - $temp = $this->my_preg_match("'<$channeltag.*?>(.*?)'si", $out_channel[1]); - if ($temp != '') $result[$channeltag] = $temp; // Set only if not empty - - } - - // Parse TEXTINPUT info - preg_match("']*[^/])>(.*?)'si", $rss_content, $out_textinfo); - // This a little strange regexp means: - // Look for tag with or without any attributes, but skip truncated version (it's not beggining tag) - if ($out_textinfo[2]) { - foreach($this->textinputtags as $textinputtag) { - $temp = $this->my_preg_match("'<$textinputtag.*?>(.*?)'si", $out_textinfo[2]); - if ($temp != '') $result['textinput_'.$textinputtag] = $temp; // Set only if not empty - } - } - // Parse IMAGE info - preg_match("'(.*?)'si", $rss_content, $out_imageinfo); - if ($out_imageinfo[1]) { - foreach($this->imagetags as $imagetag) { - $temp = $this->my_preg_match("'<$imagetag.*?>(.*?)'si", $out_imageinfo[1]); - if ($temp != '') $result['image_'.$imagetag] = $temp; // Set only if not empty - } - } - // Parse ITEMS - preg_match_all("'(.*?)'si", $rss_content, $items); - $rss_items = $items[2]; - $result['items_count'] = count($items[1]); - $i = 0; - $result['items'] = array(); // create array even if there are no items - foreach($rss_items as $rss_item) { - // Parse one item - foreach($this->itemtags as $itemtag) - { - $temp = $this->my_preg_match("'<$itemtag.*?>(.*?)'si", $rss_item); - if ($temp != '') $result[items][$i][$itemtag] = $temp; // Set only if not empty - } - // Strip HTML tags and other bullshit from DESCRIPTION (if description is presented) - if ($result['items'][$i]['description']) - $result['items'][$i]['description'] = strip_tags($this->unhtmlentities(strip_tags($result['items'][$i]['description']))); - // Item counter - $i++; - } - return $result; - } - else // Error in opening return False - { - return False; - } - } -} - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/units/rss/rss_config.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/units/rss/rss_config.php (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/units/rss/rss_config.php (revision 0) @@ -1,24 +0,0 @@ - 'rss', - 'EventHandlerClass' => Array('class'=>'kEventHandler','file'=>'','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'RssTagProcessor','file'=>'rss_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'Hooks' => Array(), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 4 => 'event', - ), - - ); - - - - - - - - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/in-news/units/rss/rss_tag_processor.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.1.2/in-news/units/rss/rss_tag_processor.php (revision 12747) +++ branches/unlabeled/unlabeled-1.1.2/in-news/units/rss/rss_tag_processor.php (revision 0) @@ -1,78 +0,0 @@ -cache_dir = realpath(KERNEL_PATH.'/../cache'); - $rss->cache_time = 3600; - - $block_params = $this->prepareTagParams($params); - $block_params['name'] = $this->SelectParam($params,'render_as,name'); - - $records_processed = 0; - if( $rs = $rss->get($params['feed_url']) ) - { - $records_limit = getArrayValue($params,'limit'); - if($records_limit === false || $records_limit == -1) $records_limit = count($rs['items']); - foreach($rs['items'] as $news_item) // process each news in each channel - { - $block_params = array_merge_recursive2($block_params, $news_item); - $ret .= $this->Application->ParseBlock($block_params); - $records_processed++; - if($records_processed == $records_limit) break; - } - } - return $ret; - } - - /** - * Returns passed value cut to chars specified - * - * @param Array $params - * @return string - */ - function CutValue($params) - { - $ret = $params['value']; - $cut_first = getArrayValue($params, 'cut_first'); - if($cut_first && strlen($ret) > $cut_first) - { - $ret = substr($ret, 0, $cut_first).' ...'; - } - return $ret; - } - - /** - * Checks if no other items available for showing, then show rss file with @rss_ListFeed tag - * - * @param Array $params - * @return bool - */ - function IsAllowed($params) - { - $ret = true; - $module_prefixes = explode(',', $params['prefixes']); - foreach($module_prefixes as $prefix) - { - $ret = $ret && $this->Application->GetVar($prefix.'_HasRecords'); - } - return !$ret; - } - - } - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.9.2/in-news/units/articles/articles_event_handler.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.9.2/in-news/units/articles/articles_event_handler.php (revision 12747) +++ branches/unlabeled/unlabeled-1.9.2/in-news/units/articles/articles_event_handler.php (revision 0) @@ -1,269 +0,0 @@ -getObject(); - - if (!$this->Application->IsAdmin()) { - $where_clause = '(Archived = 0) AND (StartDate < '.adodb_mktime().' OR StartDate = 0) AND (EndOn > '.adodb_mktime().' OR EndOn = 0)'; - $object->addFilter('archived_filter', $where_clause); - } - } - - /** - * [REGULAR EVENT] Deletes expired articles + update existing articles from rss feed with new data (key - article url) - * - * @param kEvent $event - */ - function OnUpdateRSSAtricles(&$event) - { - $category_table = $this->Application->getUnitOption('c', 'TableName'); - $custom_table = $this->Application->getUnitOption('c-cdata', 'TableName'); - - $category_custom_fields = $this->getCustomColumns('c'); - $article_custom_fields = $this->getCustomColumns($event->Prefix); - - - // update categories which sould be updated - $sql = 'SELECT cd.*, c.CategoryId - FROM '.$category_table.' c - LEFT JOIN '.$custom_table.' cd ON c.ResourceId = cd.ResourceId - WHERE (cd.'.$category_custom_fields['RssLastUpdated'].' + - cd.'.$category_custom_fields['RssUpdateInterval'].' * cd.'.$category_custom_fields['RssUpdateIntervalType'].' <= - UNIX_TIMESTAMP()) AND (LENGTH('.$category_custom_fields['RssSource'].') > 0)'; - $categories = $this->Conn->Query($sql, 'CategoryId'); - if ($categories) { - $resource_ids = Array(); - foreach ($categories as $category_id => $category_data) { - $resource_ids[] = $category_data['ResourceId']; - $event->setEventParam('source_url', $category_data[ $category_custom_fields['RssSource'] ]); - $event->setEventParam('category_id', $category_id); - $event->setEventParam('custom_fields', $article_custom_fields); - $event->setEventParam('life_time', $category_data[ $category_custom_fields['RssDefaultExpiration'] ] * $category_data[ $category_custom_fields['RssDefaultExpirationType'] ]); - $this->parseRSSFeed($event); - } - - $sql = 'UPDATE '.$custom_table.' - SET '.$category_custom_fields['RssLastUpdated'].' = '.adodb_mktime().' - WHERE ResourceId IN ('.implode(',', $resource_ids).')'; - $this->Conn->Query($sql); - } - - // delete expired articles from feed categories - $sql = 'SELECT c.CategoryId, c.ResourceId - FROM '.$category_table.' c - LEFT JOIN '.$custom_table.' cd ON c.ResourceId = cd.ResourceId - WHERE ( cd.'.$category_custom_fields['RssLastExpired'].' + - cd.'.$category_custom_fields['RssExpireInterval'].' * cd.'.$category_custom_fields['RssExpireIntervalType'].' <= - UNIX_TIMESTAMP()) AND (cd.'.$category_custom_fields['RssDeleteExpired'].' = 1)'; - - $categories = $this->Conn->GetCol($sql, 'ResourceId'); - - $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); - $table = $this->Application->getUnitOption($event->Prefix, 'TableName'); - $ci_table = $this->Application->getUnitOption($event->Prefix.'-ci', 'TableName'); - - if ($categories) { - $article_custom_table = $this->Application->getUnitOption($event->Prefix.'-cdata', 'TableName'); - - $sql = 'SELECT main_table.'.$id_field.' - FROM '.$table.' main_table - LEFT JOIN '.$ci_table.' ci ON main_table.ResourceId = ci.ItemResourceId - LEFT JOIN '.$article_custom_table.' cd ON main_table.ResourceId = cd.ResourceId - WHERE (ci.PrimaryCat = 1) AND - (ci.CategoryId IN ('.implode(',', $categories).')) AND - (main_table.EndOn < '.adodb_mktime().' AND main_table.EndOn <> 0) AND - (LENGTH(cd.'.$article_custom_fields['RssOriginalURL'].') > 0)'; - $article_ids = $this->Conn->GetCol($sql); - if ($article_ids) { - $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); - $temp->DeleteItems($event->Prefix, $event->Special, $article_ids); - } - - $sql = 'UPDATE '.$custom_table.' - SET '.$category_custom_fields['RssLastExpired'].' = '.adodb_mktime().' - WHERE ResourceId IN ('.implode(',', array_keys($categories)).')'; - $this->Conn->Query($sql); - } - } - - /** - * Creates new, updates existing articles from feed url specified - * - * @param kEvent $event - */ - function parseRSSFeed(&$event) - { - $source_urls = explode(',', $event->getEventParam('source_url')); - if (count($source_urls) > 1) { - foreach ($source_urls as $source_url) { - $event->setEventParam('source_url', $source_url); - $this->parseRSSFeed($event); - } - return true; - } - - $xml_data = curl_post($event->getEventParam('source_url'), '', null, 'GET'); - if (!$xml_data) { - return false; - } - - // get previously created feed articles in current category - $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); - $table = $this->Application->getUnitOption($event->Prefix, 'TableName'); - $custom_table = $this->Application->getUnitOption($event->Prefix.'-cdata', 'TableName'); - - $crc_field = $event->getEventParam('custom_fields', 'RssArticleCRC'); - - $sql = 'SELECT main_table.'.$id_field.', cd.'.$crc_field.' - FROM '.$table.' main_table - LEFT JOIN '.$custom_table.' cd ON cd.ResourceId = main_table.ResourceId - WHERE LENGTH(cd.'.$crc_field.') > 0'; - $articles = $this->Conn->GetCol($sql, $crc_field); - $object =& $event->getObject(Array('skip_autoload' => true)); - - $xml_helper =& $this->Application->recallObject('kXMLHelper'); - $root_node =& $xml_helper->Parse($xml_data); - $root_node =& $root_node->FindChild('channel'); - if(!$root_node) { - return false; - } - - $category_id = $event->getEventParam('category_id'); - $backup_category_id = $this->Application->GetVar('m_cat_id'); - $this->Application->SetVar('m_cat_id', $category_id); - - $current_node = $root_node->firstChild; - - do { - // IMAGE is information about channel and is not useful here - if ($current_node->Name != 'ITEM') continue; - // collect item data - $data = Array(); - $sub_node =& $current_node->firstChild; - do { - $data[$sub_node->Name] = $sub_node->Data; - - }while ( ($sub_node =& $sub_node->NextSibling()) ); - - // create/update article - $article_crc = crc32($data['LINK'].$data['TITLE']); - $article_id = getArrayValue($articles, $article_crc); - if ($article_id) { - $object->Load($article_id); - } - else { - $object->Clear(); - } - - $object->SetDBField('Title', $data['TITLE']); - $object->SetDBField('cust_RssOriginalURL', $data['LINK']); - $object->SetDBField('cust_RssArticleCRC', $article_crc); - $object->SetDBField('Body', $data['DESCRIPTION']); - $expiration_time = adodb_mktime() + $event->getEventParam('life_time'); - $object->SetDBField('EndOn_date', $expiration_time); - $object->SetDBField('EndOn_time', $expiration_time); - $object->SetDBField('Status', STATUS_ACTIVE); - $object->SetDBField('Author', 'root'); - $object->SetDBField('CreatedById', -1); - - $status = $object->isLoaded() ? $object->Update() : $object->Create(); - } while (($current_node =& $current_node->NextSibling())); - - $this->Application->SetVar('m_cat_id', $backup_category_id); - } - - function getCustomColumns($prefix) - { - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - - $custom_fields = array_flip($this->Application->getUnitOption($prefix, 'CustomFields')); - foreach ($custom_fields as $custom_name => $custom_id) { - $custom_fields[$custom_name] = $ml_formatter->LangFieldName('cust_'.$custom_id); - } - - return $custom_fields; - } - - /** - * Create missing excerpt - * - * @param kEvent $event - */ - function OnBeforeItemUpdate(&$event) - { - $this->createExcerpt($event); - } - - /** - * Create missing excerpt - * - * @param kEvent $event - */ - function OnBeforeItemCreate(&$event) - { - $this->createExcerpt($event); - } - - /** - * Create excerpt if missing - * - * @param kEvent $event - */ - function createExcerpt(&$event) - { - $object =& $event->getObject(); - if (!$object->GetDBField('Excerpt')) { - $excerpt = strip_tags( $object->GetDBField('Body') ); - - - $length = strlen($excerpt); - if ($length > 100) { - $excerpt = substr(strip_tags($excerpt), 0, 100); - if (substr($excerpt,-1) != ' ') { - $pos = strrpos($excerpt, ' '); - if ($pos) { - $excerpt = substr($excerpt, 0, $pos); - } - } - $excerpt .= '...'; - } - - $object->SetDBField('Excerpt', $excerpt); - } - } - - /** - * [HOOK] Updates category custom fields options in config - * - * @param kEvent $event - */ - function OnUpdateCategoryCustomFields(&$event) - { - $new_virtual_fields = Array( - 'cust_RssSource' => Array('type' => 'string', 'default' => ''), - 'cust_RssDefaultExpiration' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), - 'cust_RssDefaultExpirationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month', 29030400 => 'la_opt_year'), 'default' => 60), - 'cust_RssExpireInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), - 'cust_RssExpireIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60), - 'cust_RssDeleteExpired' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'default' => 0), - 'cust_RssUpdateInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), - 'cust_RssUpdateIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60), - 'cust_RssLastUpdated' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''), - 'cust_RssLastExpired' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''), - ); - $virtual_fields = $this->Application->getUnitOption('c', 'VirtualFields'); - $virtual_fields = array_merge_recursive2($virtual_fields, $new_virtual_fields); - $this->Application->setUnitOption('c', 'VirtualFields', $virtual_fields); - } - } -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.10.2/in-news/admin_templates/catalog_tab.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.10.2/in-news/admin_templates/catalog_tab.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.10.2/in-news/admin_templates/catalog_tab.tpl (revision 0) @@ -1,60 +0,0 @@ - - - - a_toolbar.AddButton( new ToolBarButton('in-news:new_article', '', function() { - $form_name = $Catalog.queryTabRegistry('prefix', '', 'tab_id') + '_form'; - std_precreate_item('', 'in-news/articles/articles_edit'); - }, true - ) ); - - - -
" view_template="in-news/catalog_tab" edit_template="in-news/articles/articles_edit" category_id="-1" dep_buttons="new_article" class="catalog-tab">
- -
- - - - - - - $Catalog.setItemCount('', ''); - $Catalog.setCurrentCategory('', ); - - - - - Grids[''].AddAlternativeGrid('', true); - - Grids[''].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6')); - $Catalog.reflectPasteButton(); - $Catalog.setViewMenu(''); - - Grids[''].EnableRadioMode(); - Grids[''].DblClick = function() {return false}; - - #separator# - - - - - - - - - - - - - - - - - - - - -
-
- - \ No newline at end of file Index: branches/unlabeled/unlabeled-1.2.44/in-news/admin/include/toolbar/editarticle_reviews.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.2.44/in-news/admin/include/toolbar/editarticle_reviews.php (revision 12747) +++ branches/unlabeled/unlabeled-1.2.44/in-news/admin/include/toolbar/editarticle_reviews.php (revision 0) @@ -1,219 +0,0 @@ -Get("NewsRev_View"); - -if(!is_numeric($RevView)) -{ - $RevView = $Rev_AllValue; -} -else -{ - $StatusList = array(); - - if($RevView & $Bit_Disabled) - $StatusList[] = 0; - - if($RevView & $Bit_Enabled) - $StatusList[] = 1; - - if($RevView & $Bit_Pending) - $StatusList[] = 2; - - if(count($StatusList)) - { - $status = " r.Status IN (".implode(",",$StatusList).") "; - } - else - $status = " r.Status = -1 "; - - $RevFilter = $status; -} - -$Perpage_Reviews = (int)$objConfig->Get("Perpage_Reviews"); -if(!$Perpage_Reviews) - $PerPage_Reviews = 20; - -$SortOrder = $objConfig->Get("NewsReview_LV_Sortorder"); -if(!strlen($SortOrder)) - $SortOrder = "desc"; - -$SortField = $objConfig->Get("NewsReview_LV_Sortfield"); -if(!strlen($SortField)) - $SortField = "DatePosted"; - -$lang_ReviewText = admin_language("la_prompt_ReviewText"); -$lang_Reviewer = admin_language("la_Prompt_ReviewedBy"); -$lang_Reviews = admin_language("la_Text_Reviews"); - -print<< - - - -END; -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.39.2/in-news/units/articles/articles_config.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.39.2/in-news/units/articles/articles_config.php (revision 12747) +++ branches/unlabeled/unlabeled-1.39.2/in-news/units/articles/articles_config.php (revision 0) @@ -1,313 +0,0 @@ - 'n', - - 'ItemClass' => Array('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'c', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUpdateCategoryCustomFields', - ), - ), - 'CatalogItem' => true, - 'AdminTemplatePath' => 'articles', - 'AdminTemplatePrefix' => 'articles_', - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'Reviews_Page', - 4 => 'event', - 5 => 'mode', - ), - - 'RegularEvents' => Array( - 'rss_category_update' => Array('EventName' => 'OnUpdateRSSAtricles', 'RunInterval' => 0, 'Type' => reBEFORE), - ), - - 'IDField' => 'NewsId', - 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events - - 'TitleField' => 'Title', // field, used in bluebar when editing existing item - 'TitlePhrase' => 'la_Text_Article', // phrase used to specify item type in relationship list - - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('n' => '!la_title_AddingArticle!'), - 'edit_status_labels' => Array('n' => '!la_title_EditingArticle!'), - 'new_titlefield' => Array('n' => '!la_title_NewArticle!'), - ), - - 'articles_edit' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_General!"), - - 'articles_categories'=>Array('prefixes' => Array('n','n-ci_List'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Categories!"), - 'articles_relations'=> Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Relations!"), - 'articles_images' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Images!"), - 'articles_reviews' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Reviews!"), - 'articles_custom' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Custom!"), - - 'images_edit' => Array( 'prefixes' => Array('n', 'n-img'), - 'new_status_labels' => Array('n-img'=>'!la_title_Adding_Image!'), - 'edit_status_labels' => Array('n-img'=>'!la_title_Editing_Image!'), - 'new_titlefield' => Array('n-img'=>'!la_title_New_Image!'), - 'format' => "#n_status# '#n_titlefield#' - #n-img_status# '#n-img_titlefield#'", - ), - - 'reviews_edit' => Array( 'prefixes' => Array('n', 'n-rev'), - 'new_status_labels' => Array('n-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"), - 'edit_status_labels' => Array('n-rev'=>'!la_title_Editing_Review!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rev_status#", - ), - - 'relations_edit' => Array( 'prefixes' => Array('n', 'n-rel'), - 'new_status_labels' => Array('n-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), - 'edit_status_labels' => Array('n-rel'=>'!la_title_Editing_Relationship!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rel_status#", - ), - - 'tree_in-news' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-News', 'Version')), - ), - - 'PermItemPrefix' => 'NEWS', - - 'PermTabText' => 'In-News', - 'PermSection' => Array('main' => 'CATEGORY:in-news:articles_list', 'search' => 'in-news:configuration_search', 'email' => 'in-news:configuration_email', 'custom' => 'in-news:configuration_custom'), - - 'Sections' => Array( - 'in-news' => Array( - 'parent' => 'in-portal:root', - 'icon' => 'settings_in-newz', - 'label' => 'la_title_In-News', - 'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view'), - 'priority' => 3.2, - 'type' => stTREE, - ), - - 'in-news:innews_general' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_general', - 'label' => 'la_tab_GeneralSettings', - 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 1, - 'type' => stTREE, - ), - - 'in-news:configuration_output' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_output', - 'label' => 'la_tab_ConfigOutput', - 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 2, - 'type' => stTREE, - ), - - 'in-news:configuration_search' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_search', - 'label' => 'la_tab_ConfigSearch', - 'url' => Array('t' => 'config/config_search', 'module_key' => 'articles', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 3, - 'type' => stTREE, - ), - - 'in-news:configuration_email' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_email', - 'label' => 'la_tab_ConfigE-mail', - 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 4, - 'type' => stTREE, - ), - - 'in-news:configuration_custom' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_custom', - 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 2, 'pass_section' => true, 'pass' => 'm,cf'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), - 'priority' => 5, - 'type' => stTREE, - ), - - ), - - 'FilterMenu' => Array( - 'Groups' => Array( - Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER), - ), - 'Filters' => Array( - 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), - 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ), - 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), - 's1' => Array(), - 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), - 'show_hot' => Array('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), - 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), - 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), - ) - ), - - 'CatalogSelectorName' => 'newslist', - - 'ItemPropertyMappings' => Array( - 'NewDays' => 'News_CatNewDays', // number of days item to be NEW - 'MinPopVotes' => 'News_MinPopVotes', // minimum number of votes for an item to be POP - 'MinPopRating' => 'News_MinPopRating',// minimum rating for an item to be POP - 'MaxHotNumber' => 'News_MaxHotNumber',// maximum number of HOT items - - 'HotLimit' => 'News_HotLimit', // variable name in inp_Cache table - 'ClickField' => 'Hits', // item click count is stored here (in item table) - ), - - 'ItemType' => 2, // this is used when relation to product is added from in-portal and via-versa - - 'ViewMenuPhrase' => 'la_title_Articles', - - 'StatisticsInfo' => Array( - 'pending' => Array( - 'icon' => 'icon16_article_pending.gif', - 'label' => 'la_Text_Articles', - 'js_url' => '#url#', - 'url' => Array('t' => 'advanced_view', 'SetTab' => 'n', 'pass' => 'm,n.showall', 'n.showall_event' => 'OnSetFilterPattern', 'n.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'), - 'status' => STATUS_PENDING, - ), - ), - - 'TableName' => TABLE_PREFIX.'News', - - 'CalculatedFields' => Array( - '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = -1, "root", IF (%1$s.CreatedById = -2, "Guest", "n/a")), u.Login)', - 'CategoryId' => TABLE_PREFIX.'CategoryItems.CategoryId', - 'Filename' => TABLE_PREFIX.'CategoryItems.Filename', - 'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath', - ), - ), - - 'CacheModRewrite' => true, - - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON '.TABLE_PREFIX.'CategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId', - ), // key - special, value - list select sql - - 'ListSortings' => Array( - '' => Array( - 'ForcedSorting' => Array('EditorsPick' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array('Title' => 'asc'), - ) - ), - 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON '.TABLE_PREFIX.'CategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId'), - - 'SubItems' => Array('n-rev', 'n-ci', 'n-rel', 'n-img', 'n-cdata'), - - 'Fields' => Array ( - 'NewsId' => Array(), - 'Title' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => '1'), - 'Excerpt' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Author' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Body' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1,'default' => '#NOW#'), - 'TextFormat' => Array('type' => 'int', 'not_null' => 1, 'default' => '0'), - 'EndOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => ''), - 'Hits' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), - 'CachedRating' => Array('type' => 'string', 'default' => 0), - 'CachedVotesQty' => Array('type' => 'int','not_null' => 1,'default' => '0'), - 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => -1), - 'Priority' => Array('type' => 'int','default' => ''), - 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), - 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadCatStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array('type' => 'int', 'default' => ''), - 'CachedReviewsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StartDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1, 'default' => '#NOW#'), - 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'Archived' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => '#NOW#'), - 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => -1), - 'OrgId' => Array('type' => 'int','default' => ''), - ), - - 'VirtualFields' => Array( - 'UserName' => Array('type' => 'string', 'default' => ''), - 'CategoryId' => Array('type' => 'int', 'default' => 0), - 'cust_RssOriginalURL' => Array('type' => 'string', 'default' => ''), - 'cust_RssArticleCRC' => Array('type' => 'int', 'default' => 0), - 'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'CachedNavbar' => Array('type' => 'string', 'default' => ''), - ), - - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), -// 'PrimaryCategory' => Array('title' => 'la_col_PrimaryCategory', 'data_block' => 'grid_category_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - - - 'Radio' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_radio_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - ), - - 'ConfigMapping' => Array( - 'PerPage' => 'Perpage_News', - 'ShortListPerPage' => 'Perpage_News_Short', - 'DefaultSorting1Field' => 'News_SortField', - 'DefaultSorting2Field' => 'News_SortField2', - 'DefaultSorting1Dir' => 'News_SortOrder', - 'DefaultSorting2Dir' => 'News_SortOrder2', - ), - ); - - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.32.2/in-news/parser.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.32.2/in-news/parser.php (revision 12747) +++ branches/unlabeled/unlabeled-1.32.2/in-news/parser.php (revision 0) @@ -1,1101 +0,0 @@ -\n"; - $str = $objSession->GetVariable("Env_News"); - n_ParseEnv($str); -} - -function n_SaveEnv($str="") -{ - global $objSession; - - $str = $objSession->SetVariable("Env_News",$str); -} - -function n_BuildEnv($dbg=0) -{ - $module_vars = Array('id','p','rp'); - return GenerateModuleEnv('n', $module_vars); -} - -function n_BuildEnv_NEW($dbg=0) -{ - $module_vars = Array('id' => 'n_id', 'p' => 'n_Page', 'rp' => 'n_Reviews_Page'); - return GenerateModuleEnv_NEW('n', $module_vars); -} - -/* - @description: returns the date of the last modification to the news article table - @attrib: _Part:: part of the date to display - @attrib: _local:bool: If set, returns the modified date for the current category (and subcats) - @example: -*/ -function n_article_modified($attribs) -{ - global $objConfig, $objCatList; - $ret=''; - $CachedValue = GetTagCache("innews","n_article_modified",$attribs,""); - if(strlen($CachedValue)) - { - return $CachedValue; - } - - $ado = &GetADODBConnection(); - - if( getArrayValue($attribs,'_local') && $objCatList->CurrentCategoryID() != 0) - { - $c = $objCatList->GetItem($objCatList->CurrentCategoryID()); - $catlist = $c->GetSubCatIds(); - - $catwhere = "CategoryId IN (".explode(",",$catlist).")"; - $sql = "SELECT MAX(Modified) as ModDate,MAX(CreatedOn) as NewDate FROM ".GetTablePrefix()."News "; - $sql .= "INNER JOIN ".GetTablePrefix()."CategoryItems ON (".GetTablePrefix()."News.ResourceId=".GetTablePrefix()."CategoryItems.ItemResourceId) "; - $sql .= "WHERE Status=1 AND $catwhere LIMIT 1"; - } - else - { - $sql = "SELECT MAX(Modified) as ModDate, MAX(CreatedOn) As NewDate FROM ".GetTablePrefix()."News WHERE Status=1 LIMIT 1"; - } - - $rs = $ado->Execute($sql); - if($rs && ! $rs->EOF) - { - $new = $rs->fields["NewDate"]; - $mod = $rs->fields["ModDate"]; - if($new>$mod) - $mod = $new; - - if($mod) - { - $part = strtolower(getArrayValue($attribs, '_part')); - $ret=$part?ExtractDatePart($part,$mod):LangDate($mod); - } - } - if($ret) SaveTagCache("innews","n_article_modified",$attribs,"",$ret); - return $ret; -} - -/* - @description: returns a link to the news root category - @attrib: _Category:int: Override the In-News root category - @attrib: _Template:tpl: The template to link to - @example: -*/ -function n_root_link($attribs = array()) -{ - global $objConfig, $n_var_list_update, $objModules; - - //$RootCat = (int)$objConfig->Get("Article_Root"); - $RootCat = $objModules->GetModuleRoot("In-News"); - if($RootCat != -1) - $attribs["_category"] = $RootCat; - $n_var_list_update["p"] = 0; - $n_var_list_update["id"] = 0; - $n_var_list_update["rp"] = 0; - unset($n_var_list_update["p"],$n_var_list_update["id"],$n_var_list_update["rp"]); - $o = m_template_link($attribs); - unset($n_var_list_update["p"],$n_var_list_update["id"],$n_var_list_update["rp"]); - - return $o; -} - -/* not a tag, used to load article lists */ -function LoadArticleList($attribs=array()) -{ - global $objArticleList, $objSession, $n_var_list,$n_var_list_update; - - static $PagingList, $original_page = null; - - if (is_null($original_page)) { - $original_page = $n_var_list['p']; - } - - $ListType = strtolower( getArrayValue($attribs,'_listtype') ); - $force_paging = getArrayValue($attribs,'_forcepaging'); - - if(!strlen($ListType)) $ListType="category"; - $LastList = $objSession->GetVariable("NewsListType"); - $LastShortType = (int)$objSession->GetVariable("NewsShortList"); - - $NoPaging = ( getArrayValue($attribs,'_paging')=='0' | getArrayValue($attribs,'_paging')=='false'); - //echo "Paging: $NoPaging
"; - - if(!$NoPaging && !strlen($PagingList)) - { - $PagingList=$ListType; - } - - //echo "Last: $LastList, Short: $LastShortType Current: $ListType, Short:".$attribs["_shortlist"]." PageList: $PagingList
\n"; - - if($ListType==$PagingList) - { - $objArticleList->EnablePaging = true; - if($LastList != $ListType || $LastShortType != (int)$attribs["_shortlist"]) - { - //echo "Resetting Page..
\n"; - $n_var_list_update["p"] = 0; - $n_var_list["p"] = 1; -// $original_page = 1; - $objArticleList->Page = 1; - $objSession->SetVariable("NewsListType",$ListType); - $objSession->SetVariable("NewsShortList",(int)$attribs["_shortlist"]); - } - else { - $objArticleList->Page = $original_page; - } - } - else - { - if(is_numeric( getArrayValue($attribs,'_maxcount') )) - { - $objArticleList->MaxListCount = $attribs["_maxcount"]; - } - else - { - $objArticleList->MaxListCount = 10; - } - $objArticleList->EnablePaging = false; - - if ($force_paging == 1) - { - $objArticleList->EnablePaging = true; - $objArticleList->Page = $original_page; - } - } - - $objArticleList->ListType = $ListType; - $objArticleList->Clear(); - - //echo "ListType: $ListType
\n"; - switch($ListType) - { - case "category": - $objArticleList->LoadListCategory($attribs); - break; - case "leadstory": - $objArticleList->LoadLeadStories($attribs); - break; - case "pop": - $objArticleList->LoadPopItems($attribs); - break; - case "hot": - $objArticleList->LoadHotItems($attribs); - break; - case "pick": - $objArticleList->LoadPickItems($attribs); - break; - case "new": - $objArticleList->LoadNewItems($attribs); - break; - case "my_new": - $scope = $objSession->CurrentUser->Vars["LastLogin"]; - $attribs["_scope"] = $scope; - $attribs["_show_since_last"] = 1; - //print_pre($objSession->CurrentUser); - if (is_numeric($scope) && $scope > 0) { - $objArticleList->LoadNewItems($attribs); - } - break; - case "myitems": - $objArticleList->LoadMyItems($attribs); - break; - case "favorites": - $objArticleList->LoadFavorites($attribs); - break; - case "search": - $attribs['multiple'] = 'articles'; - $objArticleList->LoadSearchItems($attribs); - break; - } - -} - -/* - @description: Used in conjuction with n_list_news. This function generates the page navigation - for the list. If this tag is called before the list tag, this function will load - the articles. For that reason, the _ListType attribute is required if the pagnav - tag preceeds the l_list_news tag in the template. Generally, it is good practice to - duplicate all attributes set for n_list_news. - @attrib: _PagesToList:int: Number of pages to list (default is 10) - @attrib: _ShortList:bool: If set, uses the shortlist configuration value for articles - @attrib: _Template:tpl: Template page links should redirect to (defaults to current template) - @attrib: _label:lang: language tag to include in the output if there are pages to list. If there are no pages - listed, this text will not be included (resulting in an empty output) -*/ -function n_news_pagenav($attribs = array()) -{ - global $objArticleList, $objCatList, $objSession, $objConfig; - - $DestTemplate = $attribs["_template"]; - $PagesToList = $attribs["_pagestolist"]; - $image = $attribs["_PageIcon"]; - if(!is_numeric($PagesToList)) - $PagesToList = 10; - - $CatId = $attribs["_catid"]; - if(!is_numeric($CatId)) - $CatId = $objCatList->CurrentCategoryID(); - - if ($attribs['_shortlist'] && $objConfig->Get('Perpage_News_Short') ) { - $objArticleList->PerPageVar = 'Perpage_News_Short'; - } - else { - $objArticleList->PerPageVar = 'Perpage_News'; - } - - $ListType = strtolower($attribs["_listtype"]); - - if(!strlen($ListType)) - $ListType="category"; - - if($objArticleList->ListType != $ListType) - LoadArticleList($attribs); - - $o = $objArticleList->GetPageLinkList($DestTemplate,'',10,true,'', ExtraAttributes($attribs)); - if (strlen($image)) { - $o_i = ' '; - } - if(strlen($o) && strlen($attribs["_label"])) - $o = $o_i.language($attribs["_label"]).' '.$o; - return $o; -} - -/* - @description: Used in conjuction with n_list_news. This function generates a navigation link which is - used to switch from a short list to a longer list. The page number is not changed. - If this tag is called before the list tag, this function will load the article list. - For that reason, the _ListType attribute is required if the pagnav - tag preceeds the n_list_news tag in the template. Generally, it is good practice to - duplicate all attributes set for n_list_news. - @attrib: _root:bool: If set, the current category is set to In-News's root category - @attrib: _text:lang: language tag to include as text for the anchor tag - @attrib: _ShortList:bool: If set, uses the shortlist configuration value for links - @attrib: _plaintext:: plain text to include as text for the anchor tag. The _text attribute takes presedence - if both are included. - @attrib: _image:: URL to an image to include inside the anchor tag. -*/ -function n_link_more($attribs = array()) -{ - global $objArticleList, $objConfig,$n_var_list_update; - - $n_var_list_update['id'] = 0; - - $html_attribs = ExtraAttributes($attribs); - $DestTemplate = $attribs["_template"]; - - if ($attribs['_shortlist'] && $objConfig->Get('Perpage_News_Short') ) { - $objArticleList->PerPageVar = 'Perpage_News_Short'; - } - else { - $objArticleList->PerPageVar = 'Perpage_News'; - } - - $ListType = strtolower($attribs["_listtype"]); - - if(!strlen($ListType)) - $ListType="category"; - - if($objArticleList->ListType != $ListType) - LoadArticleList($attribs); - - if($objArticleList->QueryItemCount > $objConfig->Get($objArticleList->PerPageVar)) - { - if($attribs["_root"]) - { - $url = n_root_link($attribs); - } - else - { - $n_var_list_update["p"]=0; - $url = m_template_link($attribs); - unset($n_var_list_update["p"]); - } - $o = ""; - $text = $attribs["_text"]; - if(!strlen($text)) - { - $text = $attribs["_plaintext"]; - if(!strlen($text)) - { - } - $o .= $text.""; - } - else - $o .= language($text); - if(strlen($attribs["_image"])) - { - $o .= ""; - } - $o .= ""; - } - return $o; -} - -/* - @description: returns a list of news articles - @attrib: _CatId:int: Override the current category - @attrib: _useroot:bool: If set, the current category is changed to In-News's root category - @attrib: _ShortList:bool: If set, the Perpage_News_Short setting is used instead of Perpage_news - @attrib: _Paging:bool: If set to 0 or false, paging will not be allowed for this list (only one paging list is allowed per item type per page load) - @attrib: _maxcount:int: If paging is not used on this list, this value determines how many items to load - @attrib: _ListType::Determines the type of list to generate
- Possible values:
    -
  • Category: List links from the current category (default) -
  • Top: Most Popular & highest rated links -
  • Pop: Most Popular links -
  • New: List new links -
  • Hot: List links with the most click-throughs -
  • Pick: List editor's picks -
  • myitems: List topics created by the current user -
  • favorites: List topics marked as favorites by the current user -
  • search: List search results -
- @attrib: _FirstItemTemplate:tpl: Template used for the first article listed - @attrib: _LastItemTemplate:tpl: Template used for the last article listed - @attrib: _EdItemTemplate:tpl: Editors Pick template used for article list items - @attrib: _ItemTemplate:tpl: default template used for article list items - @example: -*/ -function n_list_news($attribs = array()) -{ - global $objConfig, $objSession, $var_list, $var_list_update, $n_var_list, $n_var_list_update, $objArticleList, $objCatList, $content_set; - - $template = getArrayValue($attribs,'_itemtemplate'); - $force_paging = getArrayValue($attribs,'_forcepaging'); - - if(!strlen($template)) - { - $content_set = 0; - return "ERROR -1"; - } - - if ($attribs['_shortlist'] && $objConfig->Get('Perpage_News_Short') ) { - $objArticleList->PerPageVar = 'Perpage_News_Short'; - } - else { - $objArticleList->PerPageVar = 'Perpage_News'; - } - - $CatId = getArrayValue($attribs,'_catid'); - if(!is_numeric($CatId)) $CatId = $objCatList->CurrentCategoryID(); - - $ListType = strtolower($attribs["_listtype"]); - if(!strlen($ListType)) $ListType="category"; - - if($ListType != "search") - { - $evar = $evar = $_GET["env"]; //m_BuildEnv().$objSession->GetVariable("Env_Link"); - - $tagname = "n_list_news-".$ListType."-".(int)$attribs["_shortlist"]; - $CachedList = GetTagCache("innews",$tagname,$attribs,$evar); - if(strlen($CachedList)) - { - return $CachedList; - } - } - - if(($objArticleList->ListType != $ListType) || ($objCatList->CurrentCategoryID() != $attribs["_catid"]) || $force_paging == 1) - { - LoadArticleList($attribs); - } - if($objArticleList->NumItems()== 0) - { - $content_set = 0; - return ""; - } - - $keywords = $objSession->GetVariable("Search_Keywords"); - - $max_articles = min($objConfig->Get($objArticleList->PerPageVar), $objArticleList->NumItems()); - $articles_showed = 0; //nl - - //$max_articles = $objConfig->Get($objArticleList->PerPageVar); //nl - - foreach($objArticleList->Items as $index => $news) - { - - $objArticleList->CurrentItem = $index; - $parsed = 0; - if($row==0 && strlen($attribs["_firstitemtemplate"])) - { - $o .= $news->ParseTemplate($attribs["_firstitemtemplate"]); - $parsed = 1; - } - if($row==$objArticleList->NumItems()-1 && !$parsed && strlen($attribs["_lastitemtemplate"])>0) - { - $o .= $news->ParseTemplate($attribs["_lastitemtemplate"]); - $parsed = 1; - } - if(!$parsed) - { - if (getArrayValue($attribs, '_editemtemplate') && (int)$news->Get('EditorsPick')) - { - $o .= $news->ParseTemplate($attribs["_editemtemplate"]); - } - else - { - $o .= $news->ParseTemplate($attribs['_itemtemplate']); - } - } - - $articles_showed++; // nl - if($articles_showed == $max_articles) break; //nl - - - } - $objArticleList->SetCurrentItem(); - - if(strlen($o)) { - SaveTagCache("innews",$tagname,$attribs,$evar,$o); - } - - return $o; -} - - - -/* - @description: returns a list of news articles - @attrib: _CatId:int: Override the current category - @attrib: _useroot:bool: If set, the current category is changed to In-News's root category - @attrib: _ShortList:bool: If set, the Perpage_Links_Short setting is used instead of Perpage_links - @attrib: _ListType::Determines the type of list to generate
- Possible values:
    -
  • Category: List links from the current category (default) -
  • Top: Most Popular & highest rated links -
  • Pop: Most Popular links -
  • New: List new links -
  • Hot: List links with the most click-throughs -
  • Pick: List editor's picks -
  • myitems: List topics created by the current user -
  • favorites: List topics marked as favorites by the current user -
  • search: List search results -
- @example: -*/ -function n_list_count($attribs = array()) -{ - global $objCatList, $objArticleList, $objConfig, $objSession; - - if ($attribs['_shortlist'] && $objConfig->Get('Perpage_News_Short') ) { - $objArticleList->PerPageVar = 'Perpage_News_Short'; - } - else { - $objArticleList->PerPageVar = 'Perpage_News'; - } - - $ListType = strtolower($attribs["_listtype"]); - if(!strlen($ListType)) - $ListType="category"; - - if(!$attribs["_today"]) - { - if($objArticleList->ListType != $ListType) - LoadArticleList($attribs); - - $o = 0; - $keywords = $objSession->GetVariable("Search_Keywords"); - if ($keywords || ($_REQUEST['Action']=='m_adv_search')) { -/* foreach ($objArticleList->Items as $cat) { - if (strstr(strip_tags(strtolower($cat->Data['Title'])), strtolower($keywords)) || strstr(strip_tags(strtolower($cat->Data['Body'])), strtolower($keywords)) || strstr(strip_tags(strtolower($cat->Data['Excerpt'])), strtolower($keywords))) { - $o++; - } - } - } - else {*/ - } - $o = $objArticleList->QueryItemCount; - } - else - { - $o = $objArticleList->PerformItemCount($attribs); - } - - if ($o == '') { - $o = 0; - } - return $o; -} - -/* - @description: Parse an article field and return the value - @attrib: _Field:: Article field to parse - @attrib: _ArticleId:int: Article ID to parse (uses current article if not set) -*/ -function n_news_field($attribs = array()) -{ - global $objArticleList; - - $o = ""; - $field = $attribs["_field"]; - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $a = $objArticleList->GetItem($NewsId); - } - else - { - $a = $objArticleList->GetCurrentItem(); - } - if(strlen($field)) - { - if(is_object($a)) - { - - $element = new clsHtmlTag(); - $element->name = $a->TagPrefix; - $element->attributes = $attribs; - $o = $a->ParseObject($element); - } - else - $o = ""; - } - return $o; -} - -/* - @description: Parse an article item template - @attrib: _ItemTemplate:tpl: Article template to parse - @attrib: _ArticleId:: Article ID to parse (uses current article if not set) -*/ -function n_news_detail($attribs = array()) -{ - global $objArticleList,$n_var_list; - - $t = $attribs["_itemtemplate"]; - if(strlen($t)) - { - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $news =& $objArticleList->GetItem($NewsId); - } - else - $news =& $objArticleList->GetItem($n_var_list["id"]); - if(is_object($news)) - { - $o = $news->ParseTemplate($t); - } - } - return $o; -} - -/* - @description: returns the date of the last review for an article - @attrib: _Part:: part of the date to display - @attrib: _ArticleId:int: if set, the link to display the review modified date - @example: -*/ -function n_review_modified($attribs) -{ - global $objConfig, $objArticleList; - - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $a = $objArticleList->GetItem($NewsId); - } - else - $a = $objArticleList->GetCurrentItem(); - if(is_object($a)) - { - $ado = &GetADODBConnection(); - $ResId = $a->Get("ResourceId"); - $sql = "SELECT MAX(CreatedOn) as ModDate FROM ".GetTablePrefix()."ItemReview WHERE ItemId=$ResId AND Status=1 LIMIT 1"; - $rs = $ado->Execute($sql); - if($rs && ! $rs->EOF) - { - $mod = $rs->fields["ModDate"]; - if($mod) - { - $part = strtolower($attribs["_part"]); - if(strlen($part)) - { - $ret = ExtractDatePart($part,$mod); - } - else - { - $ret = LangDate($mod); - } - } - } - } - return $ret; -} - -/* - @description: Returns a list of reviews for an article - @attrib: _ArticleId:int: the link to use (If not set, the current article is used) - @attrib: _ShortList:bool: If set, uses the shortlist configuration value for article reviews - @attrib: _ReviewTemplate:tpl: template used to display the reviews -*/ -function n_list_reviews($attribs = array()) -{ - global $objArticleList,$content_set, $n_var_list; - - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $a =& $objArticleList->GetItem($NewsId); - } - else - $a =& $objArticleList->GetCurrentItem(); - - if(is_object($a)) - { - if($a->ReviewsLoaded()==0) - { - if($attribs["_shortlist"]) - { - $a->ReviewPerPageVar = "Perpage_NewsReviews_Short"; - } - else - { - $a->ReviewPerPageVar = "Perpage_NewsReviews"; - } - $ReviewList =& $a->GetItemReviews($n_var_list["rp"]); - } - else - $ReviewList =& $a->Reviews; - - $o = ""; - $t = $attribs["_reviewtemplate"]; - if($ReviewList->NumItems()>0 && strlen($t)) - { - foreach($ReviewList->Items as $r) - { - $o .= $r->ParseTemplate($t); - $i++; - } - } - } - if(!strlen($o)) - $content_set =0; - return $o; -} - -/* - @description: Used in conjuction with n_list_reviews. This function generates a navigation link which is - used to switch from a short list to a longer list. The page number is not changed. - If this tag is called before the list tag, this function will load the review list. - Any extra HTML attributes are passed to the anchor tag used to create the link. - @attrib: _ArticleId:: If set, the this value is used for a Article ID (default to the current link) - @attrib: _root:bool: If set, the current category is set to In-News's root category - @attrib: _text:lang: language tag to include as text for the anchor tag - @attrib: _Template:tpl: Destination template of More link - @attrib: _plaintext:: plain text to include as text for the anchor tag. The _text attribute takes presedence - if both are included. - @attrib: _ShortList:bool: If set, uses the shortlist configuration value for article reviews - @attrib: _image:: URL to an image to include inside the anchor tag. -*/ -function n_review_more($attribs) -{ - global $objArticleList, $objConfig; - - $html_attribs = ExtraAttributes($attribs); - $DestTemplate = $attribs["_template"]; - - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $a =& $objArticleList->GetItem($NewsId); - } - else - $a =& $objArticleList->GetCurrentItem(); - - if(is_object($a)) - { - if($a->ReviewsLoaded()==0) - { - if($attribs["_shortlist"]) - { - $a->ReviewPerPageVar = "Perpage_NewsReviews_Short"; - } - else - { - $a->ReviewPerPageVar = "Perpage_NewsReviews"; - } - $ReviewList =& $a->GetItemReviews($n_var_list["rp"]); - } - else - $ReviewList =& $a->Reviews; - - if($ReviewList->ItemCount() < $ReviewList->QueryItemCount) - { - if($attribs["_root"]) - { - $url = n_root_link($attribs); - } - else - $url = m_template_link($attribs); - $o = ""; - $text = $attribs["_text"]; - if(!strlen($text)) - { - $text = $attribs["_plaintext"]; - if(!strlen($text)) - { - } - $o .= $text.""; - } - else - $o .= language($text); - if(strlen($attribs["_image"])) - { - $o .= ""; - } - $o .= ""; - } - } - return $o; -} - -/* - @description: Used in conjuction with n_list_reviews. This function generates the page navigation - for the list of reviews. If this tag is called before the list tag, this function will load - the reviews. For that reason, the _ListType attribute is required if the pagnav - tag preceeds the n_list_reviews tag in the template. Generally, it is good practice to - duplicate all attributes set for n_list_reviews. - @attrib: _PagesToList:int: Number of pages to list (default is 10) - @attrib: _Template:tpl: destination template for page links (defaults to current template) - @attrib: _ShortList:bool: If set, uses the shortlist configuration value for article reviews - @attrib: _ArticleId:int: If set, the this value is used for an Article ID (default to the current link) - @attrib: _label:lang: language tag to include in the output if there are pages to list. If there are no pages - listed, this text will not be included (resulting in an empty output) -*/ -function n_review_pagenav($attribs) -{ - global $l_var_list, $n_var_list_update, $objArticleList; - - $DestTemplate = $attribs["_template"]; - $PagesToList = $attribs["_pagestolist"]; - if(!is_numeric($PagesToList)) - $PagesToList = 10; - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $a =& $objArticleList->GetItem($NewsId); - } - else - $a =& $objArticleList->GetCurrentItem(); - - if(is_object($a)) - { - if($a->ReviewsLoaded()==0) - { - if($attribs["_shortlist"]) - { - $a->ReviewPerPageVar = "Perpage_NewsReviews_Short"; - } - else - { - $a->ReviewPerPageVar = "Perpage_NewsReviews"; - } - $ReviewList =& $a->GetItemReviews($n_var_list["rp"]); - } - else - $ReviewList =& $a->Reviews; - $o = $ReviewList->GetPageLinkList($n_var_list_update,$DestTemplate); - } - if(strlen($o) && strlen($attribs["_label"])) - $o = language($attribs["_label"]).$o; - return $o; -} - - -/* - @description: Returns the number of items related to the current article - @attrib: _ItemId:int: the article to use (If not set, the current article is used) - @attrib: _ItemType:: Name of item to count (ie: _ItemType="Category,Topic") - @example: -*/ -function n_related_count($attribs) -{ - global $objItemTypes, $objArticleList, $content_set; - global $ArticleRelations; - - $id = $attribs["_itemid"]; - $item_type = strtolower($attribs["_itemtype"]); - $count = 0; - if(!is_numeric($id)) - { - $c =& $objArticleList->GetCurrentItem(); - } - else - $c =& $objArticleList->GetItem($id); - - if(is_object($c)) - { - $ResourceId = $c->Get("ResourceId"); - if(!is_object($ArticleRelations)) - { - $ArticleRelations = new clsMultiTypeList(); - LoadRelatedItems($Related, $ArticleRelations,$c->Get("ResourceId")); - } - - if(strlen($attribs["_itemtype"])) - { - $objType = $objItemTypes->GetTypeByName($item_type); - if(is_object($objType)) - { - $TargetType = $objType->Get("ItemType"); - } - else - $TargetType=""; - } - - if($ArticleRelations->NumItems()>0) - { - for($x=0;$x<$ArticleRelations->NumItems();$x++) - { - $a = $ArticleRelations->GetItemByIndex($x); - if($a->type == $TargetType || !strlen($TargetType)) - { - $count++; - } - } - } - } - return $count; -} - -/* - @description: List items related to the current article - @attrib: _ItemId:int: the article to use (If not set, the current article is used) - @attrib: _ListItems:: List of item types to include (ie: _ListItems="Category,Topic") - @attrib: _*Template:none: For each item type lsted in _ListItems, an item type template must be included - (ie: _CategoryTemplate=".." _TopicTemplate="..") - @example: -*/ -function n_related_items($attribs) -{ - global $objItemTypes, $objArticleList, $objCatList, $content_set, $objSession; - static $Related; - - global $ArticleRelations; - -// echo "
"; print_r($ArticleRelations); echo "
"; - $id = $attribs["_itemid"]; - if(!is_numeric($id)) - { - $c =& $objArticleList->GetCurrentItem(); - } - else - $c =& $objArticleList->GetItem($id); - - $data_sent=0; - - if(is_object($c)) - { - $ResourceId = $c->Get("ResourceId"); - $IncludeList = explode(",",trim(strtolower($attribs["_listitems"]))); - $o = ""; - if(!is_object($ArticleRelations)) - { - $ArticleRelations = new clsMultiTypeList(); - LoadRelatedItems($Related, $ArticleRelations,$c->Get("ResourceId")); - } - - if($ArticleRelations->NumItems()>0) - { - for($inc=0;$incGetTypeByName($item_type); - if(is_object($objType)) - { - foreach($ArticleRelations->Items as $item) - { - if(is_object($item)) - { - if(strtolower($objType->Get("ItemName")) == strtolower($item_type) && $item->type==$objType->Get("ItemType")) - { - if(strlen($item->BasePermissionName)) - { - $perm = $item->BasePermissionName.".VIEW"; - $haspem = $objSession->HasCatPermission($perm,$item->Get("CategoryId")); - } - else - $hasperm = 1; - - if($hasperm) - { - $data_sent =1; - $classname = $objType->Get("ClassName"); - if(strlen($classname)) - { - $l = new $classname; - $l->Data = $item->Data; - $o .= $l->ParseTemplate($t); - } - } - } - } - $item = NULL; - } - } - else - echo $item_type." not found
\n"; - } - } - if($data_sent) - { - return $o; - } - else - { - $content_set=0; - return ""; - } - } - else - { - $content_set = 0; - return ""; - } - } - else - { - $content_set = 0; - return ""; - } -} - -/* - @description: Generates the ACTTION property for a FORM tag used by In-Link - @attrib: _Template:tpl: If set, this is the template the form submits to (default is the current template) - @attrib: _Form:: The form name
Possible Values: -
    -
  • n_rate: Form used to rate an article -
  • n_rate_confirm: Confirm for rate article -
  • n_addreview: add a review for an article -
  • n_review_confirm: Review confirmation -
  • n_sort_articles: Sort articles -
  • n_getting_rated: Form for external rating -
- @example:
"> -*/ -function n_form_action($attribs = array()) -{ - global $var_list_update, $var_list, $n_var_list_update, $objSession, $objArticleList; - - $var_list_update['t'] = getArrayValue($attribs, '_template') ? $attribs['_template'] : $var_list['t']; - - if( is_object($objArticleList) && $objArticleList->CurrentItem ) $n_var_list_update['id'] = $objArticleList->CurrentItem; - - $ret = ''; - $form = strtolower( $attribs['_form'] ); - $url_params = Array(); - - switch($form) - { - case 'n_addreview': - if( !$objSession->SessionEnabled() ) - { - $var_list_update['t'] = 'error_session'; - } - else - { - $url_params = Array( 'Action' => 'n_add_review', 'DestTemplate' => $attribs['_finishtemplate'] ); - if ( $objSession->HasCatPermission('NEWS.REVIEW.PENDING') ) - { - $url_params['Confirm'] = $attribs[ getArrayValue($attribs, '_confirmpending') ? '_confirmpending' : '_confirm' ]; - } - - if ( $objSession->HasCatPermission('NEWS.REVIEW') ) - { - $url_params['Confirm'] = $attribs['_confirm']; - } - - $n_var_list_update['id'] = $objArticleList->CurrentItem; - if( !$url_params['Confirm'] ) unset($url_params['Confirm']); - } - break; - - case 'n_review_confirm': - $var_list_update['t'] = getArrayValue($_GET, 'DestTemplate') ? $_GET['DestTemplate'] : $var_list['t']; - $n_var_list_update['id'] = $objArticleList->CurrentItem; - break; - - case 'n_rate': - if( !$objSession->SessionEnabled() ) - { - $var_list_update['t'] = 'error_session'; - } - else - { - $url_params = Array( 'Action' => 'n_rate_news', 'DestTemplate' => $attribs['_finishtemplate'] ); - if ( $objSession->HasCatPermission('NEWS.RATE') && getArrayValue($attribs, '_confirm') ) $url_params['Confirm'] = $attribs['_confirm']; - - $n_var_list_update['id'] = $objArticleList->CurrentItem; - if( getArrayValue($attribs, '_duplicate') ) $url_params['Duplicate'] = $attribs['_duplicate']; - } - break; - - case 'n_getting_rated': - if( !$objSession->SessionEnabled() ) - { - $var_list_update['t'] = 'error_session'; - } - else - { - $url_params = Array( 'Action' => 'n_rate_news', 'DestTemplate' => $attribs['_finishtemplate'] ); - if ( $objSession->HasCatPermission('NEWS.RATE') && getArrayValue($attribs, '_confirm') ) $url_params['Confirm'] = $attribs['_confirm']; - - $n_var_list_update['id'] = $objArticleList->CurrentItem; - $var_list_update['t'] = 'innews/rate'; - - if( getArrayValue($attribs, '_duplicate') ) $url_params['Duplicate'] = $attribs['_duplicate']; - } - break; - - case 'n_rate_confirm': - $var_list_update['t'] = getArrayValue($_GET, 'DestTemplate') ? $_GET['DestTemplate'] : $var_list['t']; - $n_var_list_update['id'] = $objArticleList->CurrentItem; - break; - - case 'n_sort_articles': - $url_params = Array('Action' => 'n_sort_articles'); - break; - - } - - return HREF_Wrapper('', $url_params); -} - -?> Index: branches/unlabeled/unlabeled-1.32.2/in-news/admin/install/inportal_data.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.32.2/in-news/admin/install/inportal_data.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.32.2/in-news/admin/install/inportal_data.sql (revision 0) @@ -1,210 +0,0 @@ -INSERT INTO ConfigurationAdmin VALUES ('News_Search_Id', 'la_Text_Search', 'la_prompt_for_Id', 'checkbox', '', '', 1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_CatNewDays', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 10.05, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 10.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News_Short', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 10.04, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopRating', 'la_Text_Articles', 'la_fld_News_MinPopRating', 'text', '', '', 10.06, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MaxHotNumber', 'la_Text_Articles', 'la_fld_News_MaxHotNumber', 'text', '', '', 10.08, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ShowPick', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 10.1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_Archive', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10.09, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopVotes', 'la_Text_Articles', 'la_fld_News_MinPopVotes', 'text', '', '', 10.07, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews_Short', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Interval', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.12, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Value', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', '', 10.12, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Interval', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.11, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Value', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', '', 10.11, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('n_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 30.02, 0, 0); - -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_articles', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_articles', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_articles', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_articles', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_articles', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1); - -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News', '8', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_PopCount', '4', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ArticleSort', 'CreatedOn desc, Title asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatSort', 'cat_date desc, cat_name asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinPopRating', '4', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Archive', '0', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowPick', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatNewDays', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowMulti', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Suggest', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MaxHotNumber', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinPopVotes', '20', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Article_Root', '{NewsCatId}', 'In-Portal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_OpenTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_CloseTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'n_CategoryTemplate', 'innews/index', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (NULL, 'n_ItemTemplate', 'innews/detail', 'In-News', 'in-news:configuration_output'); - -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Keyword_articles', '90', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Pop_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Rating_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search'); - -INSERT INTO Events VALUES (18, 'ARTICLE.ADD', 2, 0, 'In-News', 'la_event_article.add', 1) -INSERT INTO Events VALUES (19, 'ARTICLE.MODIFY', 2, 0, 'In-News', 'la_event_article.modify', 1) -INSERT INTO Events VALUES (20, 'ARTICLE.REVIEW.ADD', 2, 0, 'In-News', 'la_event_article.review.add', 1) -INSERT INTO Events VALUES (21, 'ARTICLE.ADD', 1, 0, 'In-News', 'la_event_article.add', 0) -INSERT INTO Events VALUES (22, 'ARTICLE.APPROVE', 1, 0, 'In-News', 'la_event_article.approve', 0) -INSERT INTO Events VALUES (23, 'ARTICLE.DENY', 1, 0, 'In-News', 'la_event_article.deny', 0) -INSERT INTO Events VALUES (24, 'ARTICLE.MODIFY', 1, 0, 'In-News', 'la_event_article.modify', 0) -INSERT INTO Events VALUES (25, 'ARTICLE.MODIFY.APPROVE', 1, 0, 'In-News', 'la_event_article.modify.approve', 0) -INSERT INTO Events VALUES (26, 'ARTICLE.MODIFY.DENY', 1, 0, 'In-News', 'la_event_article.modify.deny', 0) -INSERT INTO Events VALUES (27, 'ARTICLE.REVIEW.ADD', 1, 0, 'In-News', 'la_event_article.review.add', 0) -INSERT INTO Events VALUES (28, 'ARTICLE.REVIEW.APPROVE', 1, 0, 'In-News', 'la_event_article.review.approve', 0) -INSERT INTO Events VALUES (29, 'ARTICLE.REVIEW.DENY', 1, 0, 'In-News', 'la_event_article.review.deny', 0) -INSERT INTO Events VALUES (44, 'ARTICLE.REVIEW.ADD.PENDING', 1, 0, 'In-News', 'la_event_article.review.add.pending', 0) - -INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article'); - -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.VIEW', 'lu_PermName_News.View_desc', 'lu_PermName_News.View_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.ADD', 'lu_PermName_News.Add_desc', 'lu_PermName_News.Add_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.DELETE', 'lu_PermName_News.Delete_desc', 'lu_PermName_News.Delete_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.MODIFY', 'lu_PermName_News.Modify_desc', 'lu_PermName_News.Modify_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.RATE', 'lu_PermName_News.Rate_desc', 'lu_PermName_News.Rate_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW', 'lu_PermName_News.Review_desc', 'lu_PermName_News.Review_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW.PENDING', 'lu_PermName_News.Review.Pending_desc', 'lu_PermName_News.Review.Pending_error', 'In-News'); - -INSERT INTO SearchConfig VALUES ('News', 'Title', 1, 1, 'lu_fielddesc_news_title', 'lu_field_title', 'In-News', 'la_text_article', 2, 0, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Excerpt', 1, 1, 'lu_fielddesc_news_excerpt', 'lu_field_excerpt', 'In-News', 'la_text_article', 3, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Author', 1, 1, 'lu_fielddesc_news_author', 'lu_field_author', 'In-News', 'la_text_article', 4, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Body', 1, 1, 'lu_fielddesc_news_body', 'lu_field_body', 'In-News', 'la_text_article', 5, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedOn', 0, 1, 'lu_fielddesc_news_createdon', 'lu_field_createdon', 'In-News', 'la_text_article', 6, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EndOn', 0, 1, 'lu_fielddesc_news_endon', 'lu_field_endon', 'In-News', 'la_text_article', 7, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Hits', 0, 1, 'lu_fielddesc_news_hits', 'lu_field_hits', 'In-News', 'la_text_article', 8, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedRating', 0, 1, 'lu_fielddesc_news_cachedrating', 'lu_field_cachedrating', 'In-News', 'la_text_article', 9, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedVotesQty', 0, 1, 'lu_fielddesc_news_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-News', 'la_text_article', 10, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedById', 0, 1, 'lu_fielddesc_news_createdbyid', 'lu_field_createdbyid', 'In-News', 'la_text_article', 11, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Priority', 0, 1, 'lu_fielddesc_news_priority', 'lu_field_priority', 'In-News', 'la_text_article', 12, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Status', 0, 1, 'lu_fielddesc_news_status', 'lu_field_status', 'In-News', 'la_text_article', 13, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EditorsPick', 0, 1, 'lu_fielddesc_news_editorspick', 'lu_field_editorspick', 'In-News', 'la_text_article', 14, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadStory', 0, 1, 'lu_fielddesc_news_leadstory', 'lu_field_leadstory', 'In-News', 'la_text_article', 15, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadCatStory', 0, 1, 'lu_fielddesc_news_leadcatstory', 'lu_field_leadcatstory', 'In-News', 'la_text_article', 16, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ResourceId', 0, 1, 'lu_fielddesc_news_resourceid', 'lu_field_resourceid', 'In-News', 'la_text_article', 17, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_news_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-News', 'la_text_article', 18, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'StartDate', 0, 1, 'lu_fielddesc_news_startdate', 'lu_field_startdate', 'In-News', 'la_text_article', 19, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewItem', 0, 1, 'lu_fielddesc_news_newitem', 'lu_field_newitem', 'In-News', 'la_text_article', 20, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'PopItem', 0, 1, 'lu_fielddesc_news_popitem', 'lu_field_popitem', 'In-News', 'la_text_article', 21, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'HotItem', 0, 1, 'lu_fielddesc_news_hotitem', 'lu_field_hotitem', 'In-News', 'la_text_article', 22, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Archived', 0, 1, 'lu_fielddesc_news_archived', 'lu_field_archived', 'In-News', 'la_text_article', 23, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Modified', 0, 1, 'lu_fielddesc_news_modified', 'lu_field_modified', 'In-News', 'la_text_article', 24, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ModifiedById', 0, 1, 'lu_fielddesc_news_modifiedbyid', 'lu_field_modifiedbyid', 'In-News', 'la_text_article', 25, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'OrgId', 0, 0, 'lu_fielddesc_news_orgid', 'lu_field_orgid', 'In-News', 'la_text_article', 26, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewsId', 0, 1, 'lu_fielddesc_news_newsid', 'lu_field_newsid', 'In-News', 'la_text_article', 0, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('CustomField', 'RssOriginalURL', 1, 0, 'la_fld_RssOriginalURL', 'lu_fld_RssOriginalURL', 'In-News', 'la_section_CustomFields', 0, 283, 1, 'text', '', '', '', '', '', '', 0); - -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireInterval', 'RssExpireInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateInterval', 'RssUpdateInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastUpdated', 'RssLastUpdated', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDeleteExpired', 'RssDeleteExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssOriginalURL', 'lu_fld_RssOriginalURL', 'la_section_CustomFields', 'la_fld_RssOriginalURL', 'label', 'cut_first="100"', 0, 1, 0); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateIntervalType', 'RssUpdateIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssSource', 'RssSource', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireIntervalType', 'RssExpireIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpiration', 'RssDefaultExpiration', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpirationType', 'RssDefaultExpirationType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastExpired', 'RssLastExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssArticleCRC', 'RssArticleCRC', 'la_section_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'n_ItemTemplate', 'n_ItemTemplate', 'la_title_SystemCF', 'n_ItemTemplate', 'text', NULL, 0, 0, 1); - -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_VotesToHot"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, '(*) la_prompt_PopularArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2); - -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD.PENDING', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.add', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.delete', 11, 1, 1, 0); - -INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-News', 'in-news/', 'n', '1.2.1', 1, 2, 'innews/', {NewsCatId}, '1054738405'); \ No newline at end of file Index: branches/unlabeled/unlabeled-1.38.2/in-news/admin/install/inportal_data.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.38.2/in-news/admin/install/inportal_data.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.38.2/in-news/admin/install/inportal_data.sql (revision 0) @@ -1,210 +0,0 @@ -INSERT INTO ConfigurationAdmin VALUES ('News_Search_Id', 'la_Text_Search', 'la_prompt_for_Id', 'checkbox', '', '', 1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_CatNewDays', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 10.05, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 10.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News_Short', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 10.04, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopRating', 'la_Text_Articles', 'la_fld_News_MinPopRating', 'text', '', '', 10.06, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MaxHotNumber', 'la_Text_Articles', 'la_fld_News_MaxHotNumber', 'text', '', '', 10.08, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ShowPick', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 10.1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_Archive', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10.09, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopVotes', 'la_Text_Articles', 'la_fld_News_MinPopVotes', 'text', '', '', 10.07, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews_Short', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Interval', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.12, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Value', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', '', 10.12, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Interval', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.11, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Value', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', '', 10.11, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('n_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 30.02, 0, 0); - -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_articles', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_articles', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_articles', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_articles', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_articles', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1); - -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_News', '8', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_PopCount', '4', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_ArticleSort', 'CreatedOn desc, Title asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_CatSort', 'cat_date desc, cat_name asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_MinPopRating', '4', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Archive', '0', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_ShowPick', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_CatNewDays', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_ShowMulti', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Admin_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Admin_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Admin_Notice_Suggest', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_Modify_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_User_Notice_Modify_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_MaxHotNumber', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_MinPopVotes', '20', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Article_Root', '{NewsCatId}', 'In-Portal', '') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Highlight_OpenTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'News_Highlight_CloseTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'n_CategoryTemplate', 'innews/index', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'n_ItemTemplate', 'innews/detail', 'In-News', 'in-news:configuration_output'); - -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Keyword_articles', '90', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Pop_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Rating_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search'); - -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.ADD', NULL, 2, 0, 'In-News', 'la_event_article.add', 1); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.MODIFY', NULL, 2, 0, 'In-News', 'la_event_article.modify', 1); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.REVIEW.ADD', NULL, 2, 0, 'In-News', 'la_event_article.review.add', 1); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.ADD', NULL, 1, 0, 'In-News', 'la_event_article.add', 0); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.APPROVE', NULL, 1, 0, 'In-News', 'la_event_article.approve', 0); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.DENY', NULL, 1, 0, 'In-News', 'la_event_article.deny', 0); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.MODIFY', NULL, 1, 0, 'In-News', 'la_event_article.modify', 0); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.MODIFY.APPROVE', NULL, 1, 0, 'In-News', 'la_event_article.modify.approve', 0); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.MODIFY.DENY', NULL, 1, 0, 'In-News', 'la_event_article.modify.deny', 0); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.REVIEW.ADD', NULL, 1, 0, 'In-News', 'la_event_article.review.add', 0); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.REVIEW.APPROVE', NULL, 1, 0, 'In-News', 'la_event_article.review.approve', 0); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.REVIEW.DENY', NULL, 1, 0, 'In-News', 'la_event_article.review.deny', 0); -INSERT INTO Events VALUES (DEFAULT, 'ARTICLE.REVIEW.ADD.PENDING', NULL, 1, 0, 'In-News', 'la_event_article.review.add.pending', 0); - -INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article'); - -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.VIEW', 'lu_PermName_News.View_desc', 'lu_PermName_News.View_desc', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.ADD', 'lu_PermName_News.Add_desc', 'lu_PermName_News.Add_desc', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.DELETE', 'lu_PermName_News.Delete_desc', 'lu_PermName_News.Delete_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.MODIFY', 'lu_PermName_News.Modify_desc', 'lu_PermName_News.Modify_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.RATE', 'lu_PermName_News.Rate_desc', 'lu_PermName_News.Rate_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.REVIEW', 'lu_PermName_News.Review_desc', 'lu_PermName_News.Review_error', 'In-News'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 'lu_PermName_News.Review.Pending_desc', 'lu_PermName_News.Review.Pending_error', 'In-News'); - -INSERT INTO SearchConfig VALUES ('News', 'Title', 1, 1, 'lu_fielddesc_news_title', 'lu_field_title', 'In-News', 'la_text_article', 2, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Excerpt', 1, 1, 'lu_fielddesc_news_excerpt', 'lu_field_excerpt', 'In-News', 'la_text_article', 3, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Author', 1, 1, 'lu_fielddesc_news_author', 'lu_field_author', 'In-News', 'la_text_article', 4, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Body', 1, 1, 'lu_fielddesc_news_body', 'lu_field_body', 'In-News', 'la_text_article', 5, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedOn', 0, 1, 'lu_fielddesc_news_createdon', 'lu_field_createdon', 'In-News', 'la_text_article', 6, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EndOn', 0, 1, 'lu_fielddesc_news_endon', 'lu_field_endon', 'In-News', 'la_text_article', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Hits', 0, 1, 'lu_fielddesc_news_hits', 'lu_field_hits', 'In-News', 'la_text_article', 8, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedRating', 0, 1, 'lu_fielddesc_news_cachedrating', 'lu_field_cachedrating', 'In-News', 'la_text_article', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedVotesQty', 0, 1, 'lu_fielddesc_news_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-News', 'la_text_article', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedById', 0, 1, 'lu_fielddesc_news_createdbyid', 'lu_field_createdbyid', 'In-News', 'la_text_article', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Priority', 0, 1, 'lu_fielddesc_news_priority', 'lu_field_priority', 'In-News', 'la_text_article', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Status', 0, 1, 'lu_fielddesc_news_status', 'lu_field_status', 'In-News', 'la_text_article', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EditorsPick', 0, 1, 'lu_fielddesc_news_editorspick', 'lu_field_editorspick', 'In-News', 'la_text_article', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadStory', 0, 1, 'lu_fielddesc_news_leadstory', 'lu_field_leadstory', 'In-News', 'la_text_article', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadCatStory', 0, 1, 'lu_fielddesc_news_leadcatstory', 'lu_field_leadcatstory', 'In-News', 'la_text_article', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ResourceId', 0, 1, 'lu_fielddesc_news_resourceid', 'lu_field_resourceid', 'In-News', 'la_text_article', 17, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_news_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-News', 'la_text_article', 18, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'StartDate', 0, 1, 'lu_fielddesc_news_startdate', 'lu_field_startdate', 'In-News', 'la_text_article', 19, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewItem', 0, 1, 'lu_fielddesc_news_newitem', 'lu_field_newitem', 'In-News', 'la_text_article', 20, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'PopItem', 0, 1, 'lu_fielddesc_news_popitem', 'lu_field_popitem', 'In-News', 'la_text_article', 21, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'HotItem', 0, 1, 'lu_fielddesc_news_hotitem', 'lu_field_hotitem', 'In-News', 'la_text_article', 22, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Archived', 0, 1, 'lu_fielddesc_news_archived', 'lu_field_archived', 'In-News', 'la_text_article', 23, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Modified', 0, 1, 'lu_fielddesc_news_modified', 'lu_field_modified', 'In-News', 'la_text_article', 24, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ModifiedById', 0, 1, 'lu_fielddesc_news_modifiedbyid', 'lu_field_modifiedbyid', 'In-News', 'la_text_article', 25, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'OrgId', 0, 0, 'lu_fielddesc_news_orgid', 'lu_field_orgid', 'In-News', 'la_text_article', 26, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewsId', 0, 1, 'lu_fielddesc_news_newsid', 'lu_field_newsid', 'In-News', 'la_text_article', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('CustomField', 'RssOriginalURL', 1, 0, 'la_fld_RssOriginalURL', 'lu_fld_RssOriginalURL', 'In-News', 'la_section_CustomFields', 0, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssExpireInterval', 'RssExpireInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssUpdateInterval', 'RssUpdateInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssLastUpdated', 'RssLastUpdated', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssDeleteExpired', 'RssDeleteExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 2, 'RssOriginalURL', 'lu_fld_RssOriginalURL', 'la_section_CustomFields', 'la_fld_RssOriginalURL', 'label', 'cut_first="100"', 0, 1, 0); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssUpdateIntervalType', 'RssUpdateIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssSource', 'RssSource', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssExpireIntervalType', 'RssExpireIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssDefaultExpiration', 'RssDefaultExpiration', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssDefaultExpirationType', 'RssDefaultExpirationType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'RssLastExpired', 'RssLastExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 2, 'RssArticleCRC', 'RssArticleCRC', 'la_section_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField VALUES (DEFAULT, 1, 'n_ItemTemplate', 'n_ItemTemplate', 'la_title_SystemCF', 'n_ItemTemplate', 'text', NULL, 0, 0, 1); - -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, '(*) la_prompt_PopularArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2); - -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.DELETE', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 15, 0, 0, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:innews_general.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:innews_general.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_email.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_email.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.add', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.delete', 11, 1, 1, 0); - -INSERT INTO Modules VALUES ('In-News', 'in-news/', 'n', '4.1.0', 1, 2, 'innews/', {NewsCatId}, '1054738405'); Index: branches/unlabeled/unlabeled-1.38.2/in-news/units/articles/articles_config.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.38.2/in-news/units/articles/articles_config.php (revision 12747) +++ branches/unlabeled/unlabeled-1.38.2/in-news/units/articles/articles_config.php (revision 0) @@ -1,313 +0,0 @@ - 'n', - - 'ItemClass' => Array('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'c', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUpdateCategoryCustomFields', - ), - ), - 'CatalogItem' => true, - 'AdminTemplatePath' => 'articles', - 'AdminTemplatePrefix' => 'articles_', - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'Reviews_Page', - 4 => 'event', - 5 => 'mode', - ), - - 'RegularEvents' => Array( - 'rss_category_update' => Array('EventName' => 'OnUpdateRSSAtricles', 'RunInterval' => 0, 'Type' => reBEFORE), - ), - - 'IDField' => 'NewsId', - 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events - - 'TitleField' => 'Title', // field, used in bluebar when editing existing item - 'TitlePhrase' => 'la_Text_Article', // phrase used to specify item type in relationship list - - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('n' => '!la_title_AddingArticle!'), - 'edit_status_labels' => Array('n' => '!la_title_EditingArticle!'), - 'new_titlefield' => Array('n' => '!la_title_NewArticle!'), - ), - - 'articles_edit' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_General!"), - - 'articles_categories'=>Array('prefixes' => Array('n','n-ci_List'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Categories!"), - 'articles_relations'=> Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Relations!"), - 'articles_images' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Images!"), - 'articles_reviews' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Reviews!"), - 'articles_custom' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Custom!"), - - 'images_edit' => Array( 'prefixes' => Array('n', 'n-img'), - 'new_status_labels' => Array('n-img'=>'!la_title_Adding_Image!'), - 'edit_status_labels' => Array('n-img'=>'!la_title_Editing_Image!'), - 'new_titlefield' => Array('n-img'=>'!la_title_New_Image!'), - 'format' => "#n_status# '#n_titlefield#' - #n-img_status# '#n-img_titlefield#'", - ), - - 'reviews_edit' => Array( 'prefixes' => Array('n', 'n-rev'), - 'new_status_labels' => Array('n-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"), - 'edit_status_labels' => Array('n-rev'=>'!la_title_Editing_Review!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rev_status#", - ), - - 'relations_edit' => Array( 'prefixes' => Array('n', 'n-rel'), - 'new_status_labels' => Array('n-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), - 'edit_status_labels' => Array('n-rel'=>'!la_title_Editing_Relationship!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rel_status#", - ), - - 'tree_in-news' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-News', 'Version')), - ), - - 'PermItemPrefix' => 'NEWS', - - 'PermTabText' => 'In-News', - 'PermSection' => Array('main' => 'CATEGORY:in-news:articles_list', 'search' => 'in-news:configuration_search', 'email' => 'in-news:configuration_email', 'custom' => 'in-news:configuration_custom'), - - 'Sections' => Array( - 'in-news' => Array( - 'parent' => 'in-portal:root', - 'icon' => 'settings_in-newz', - 'label' => 'la_title_In-News', - 'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view'), - 'priority' => 3.2, - 'type' => stTREE, - ), - - 'in-news:innews_general' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_general', - 'label' => 'la_tab_GeneralSettings', - 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 1, - 'type' => stTREE, - ), - - 'in-news:configuration_output' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_output', - 'label' => 'la_tab_ConfigOutput', - 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 2, - 'type' => stTREE, - ), - - 'in-news:configuration_search' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_search', - 'label' => 'la_tab_ConfigSearch', - 'url' => Array('t' => 'config/config_search', 'module_key' => 'articles', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 3, - 'type' => stTREE, - ), - - 'in-news:configuration_email' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_email', - 'label' => 'la_tab_ConfigE-mail', - 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 4, - 'type' => stTREE, - ), - - 'in-news:configuration_custom' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_custom', - 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 2, 'pass_section' => true, 'pass' => 'm,cf'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), - 'priority' => 5, - 'type' => stTREE, - ), - - ), - - 'FilterMenu' => Array( - 'Groups' => Array( - Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER), - ), - 'Filters' => Array( - 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), - 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ), - 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), - 's1' => Array(), - 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), - 'show_hot' => Array('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), - 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), - 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), - ) - ), - - 'CatalogSelectorName' => 'newslist', - - 'ItemPropertyMappings' => Array( - 'NewDays' => 'News_CatNewDays', // number of days item to be NEW - 'MinPopVotes' => 'News_MinPopVotes', // minimum number of votes for an item to be POP - 'MinPopRating' => 'News_MinPopRating',// minimum rating for an item to be POP - 'MaxHotNumber' => 'News_MaxHotNumber',// maximum number of HOT items - - 'HotLimit' => 'News_HotLimit', // variable name in inp_Cache table - 'ClickField' => 'Hits', // item click count is stored here (in item table) - ), - - 'ItemType' => 2, // this is used when relation to product is added from in-portal and via-versa - - 'ViewMenuPhrase' => 'la_title_Articles', - - 'StatisticsInfo' => Array( - 'pending' => Array( - 'icon' => 'icon16_article_pending.gif', - 'label' => 'la_Text_Articles', - 'js_url' => "set_persistant_var('News_View', 943, 'advanced_view', '#url#')", - 'url' => Array('t' => 'advanced_view', 'index_file' => 'advanced_view.php', 'SetTab' => 'news', 'pass' => 'm'), - 'status' => STATUS_PENDING, - ), - ), - - 'TableName' => TABLE_PREFIX.'News', - - 'CalculatedFields' => Array( - '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = -1, "root", IF (%1$s.CreatedById = -2, "Guest", "n/a")), u.Login)', - 'CategoryId' => TABLE_PREFIX.'CategoryItems.CategoryId', - 'Filename' => TABLE_PREFIX.'CategoryItems.Filename', - 'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath', - ), - ), - - 'CacheModRewrite' => true, - - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON '.TABLE_PREFIX.'CategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId', - ), // key - special, value - list select sql - - 'ListSortings' => Array( - '' => Array( - 'ForcedSorting' => Array('EditorsPick' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array('Title' => 'asc'), - ) - ), - 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON '.TABLE_PREFIX.'CategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId'), - - 'SubItems' => Array('n-rev', 'n-ci', 'n-rel', 'n-img', 'n-cdata'), - - 'Fields' => Array ( - 'NewsId' => Array(), - 'Title' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => '1'), - 'Excerpt' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Author' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Body' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1,'default' => '#NOW#'), - 'TextFormat' => Array('type' => 'int', 'not_null' => 1, 'default' => '0'), - 'EndOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => ''), - 'Hits' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), - 'CachedRating' => Array('type' => 'string', 'default' => 0), - 'CachedVotesQty' => Array('type' => 'int','not_null' => 1,'default' => '0'), - 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => -1), - 'Priority' => Array('type' => 'int','default' => ''), - 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), - 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadCatStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array('type' => 'int', 'default' => ''), - 'CachedReviewsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StartDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1, 'default' => '#NOW#'), - 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'Archived' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => '#NOW#'), - 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => -1), - 'OrgId' => Array('type' => 'int','default' => ''), - ), - - 'VirtualFields' => Array( - 'UserName' => Array('type' => 'string', 'default' => ''), - 'CategoryId' => Array('type' => 'int', 'default' => 0), - 'cust_RssOriginalURL' => Array('type' => 'string', 'default' => ''), - 'cust_RssArticleCRC' => Array('type' => 'int', 'default' => 0), - 'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'CachedNavbar' => Array('type' => 'string', 'default' => ''), - ), - - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), -// 'PrimaryCategory' => Array('title' => 'la_col_PrimaryCategory', 'data_block' => 'grid_category_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - - - 'Radio' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_radio_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - ), - - 'ConfigMapping' => Array( - 'PerPage' => 'Perpage_News', - 'ShortListPerPage' => 'Perpage_News_Short', - 'DefaultSorting1Field' => 'News_SortField', - 'DefaultSorting2Field' => 'News_SortField2', - 'DefaultSorting1Dir' => 'News_SortOrder', - 'DefaultSorting2Dir' => 'News_SortOrder2', - ), - ); - - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.4.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.1.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.4.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.1.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.4.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.1.sql (revision 0) @@ -1,42 +0,0 @@ -UPDATE ConfigurationAdmin SET VariableName = 'News_MinPopVotes', prompt = 'la_fld_News_MinPopVotes' WHERE VariableName = 'News_MinVotes'; -UPDATE ConfigurationAdmin SET VariableName = 'News_MinPopRating', prompt = 'la_fld_News_MinPopRating' WHERE VariableName = 'News_TopCount'; -UPDATE ConfigurationAdmin SET VariableName = 'News_MaxHotNumber', prompt = 'la_fld_News_MaxHotNumber' WHERE VariableName = 'News_VotesToHot'; - -UPDATE ConfigurationValues SET VariableName = 'News_MinPopVotes' WHERE VariableName = 'News_MinVotes'; -UPDATE ConfigurationValues SET VariableName = 'News_MinPopRating' WHERE VariableName = 'News_TopCount'; -UPDATE ConfigurationValues SET VariableName = 'News_MaxHotNumber' WHERE VariableName = 'News_VotesToHot'; - -UPDATE ConfigurationAdmin SET DisplayOrder = '10.01', GroupDisplayOrder = 1 WHERE VariableName = 'News_SortField'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.01', GroupDisplayOrder = 2 WHERE VariableName = 'News_SortOrder'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.02', GroupDisplayOrder = 1 WHERE VariableName = 'News_SortField2'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.02', GroupDisplayOrder = 2 WHERE VariableName = 'News_SortOrder2'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.03' WHERE VariableName = 'Perpage_News'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.04' WHERE VariableName = 'Perpage_News_Short'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.05' WHERE VariableName = 'News_CatNewDays'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.06' WHERE VariableName = 'News_MinPopRating'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.07' WHERE VariableName = 'News_MinPopVotes'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.08' WHERE VariableName = 'News_MaxHotNumber'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.09' WHERE VariableName = 'News_Archive'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.10' WHERE VariableName = 'News_ShowPick'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.11', GroupDisplayOrder = 1 WHERE VariableName = 'News_ReviewDelay_Value'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.11', GroupDisplayOrder = 2 WHERE VariableName = 'News_ReviewDelay_Interval'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.12', GroupDisplayOrder = 1 WHERE VariableName = 'News_RatingDelay_Value'; -UPDATE ConfigurationAdmin SET DisplayOrder = '10.12', GroupDisplayOrder = 2 WHERE VariableName = 'News_RatingDelay_Interval'; -UPDATE ConfigurationAdmin SET DisplayOrder = '20.01', GroupDisplayOrder = 1 WHERE VariableName = 'News_SortReviews'; -UPDATE ConfigurationAdmin SET DisplayOrder = '20.01', GroupDisplayOrder = 2 WHERE VariableName = 'News_SortReviewsOrder'; -UPDATE ConfigurationAdmin SET DisplayOrder = '20.02', GroupDisplayOrder = 1 WHERE VariableName = 'News_SortReviews2'; -UPDATE ConfigurationAdmin SET DisplayOrder = '20.02', GroupDisplayOrder = 2 WHERE VariableName = 'News_SortReviewsOrder2'; -UPDATE ConfigurationAdmin SET DisplayOrder = '20.03' WHERE VariableName = 'Perpage_NewsReviews'; -UPDATE ConfigurationAdmin SET DisplayOrder = '20.03' WHERE VariableName = 'Perpage_NewsReviews_Short'; -UPDATE ConfigurationAdmin SET DisplayOrder = '30.01' WHERE VariableName = 'n_CategoryTemplate'; -UPDATE ConfigurationAdmin SET DisplayOrder = '30.02' WHERE VariableName = 'n_ItemTemplate'; - -UPDATE ConfigurationValues SET VariableValue = 0 WHERE VariableName = 'News_Archive'; -ALTER TABLE News CHANGE EditorsPick EditorsPick TINYINT(4) NOT NULL DEFAULT '0'; -ALTER TABLE News CHANGE EndOn EndOn INT NOT NULL DEFAULT '0'; -ALTER TABLE News CHANGE CreatedOn CreatedOn INT NOT NULL DEFAULT '0'; -ALTER TABLE News CHANGE Modified Modified INT NOT NULL DEFAULT '0'; - -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'n_ItemTemplate', 'n_ItemTemplate', 'la_title_SystemCF', 'n_ItemTemplate', 'text', NULL, 0, 0, 1); - -UPDATE Modules SET Version = '1.2.1' WHERE Name = 'In-News'; \ No newline at end of file Index: branches/unlabeled/unlabeled-1.27.2/in-news/admin/install/inportal_data.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.27.2/in-news/admin/install/inportal_data.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.27.2/in-news/admin/install/inportal_data.sql (revision 0) @@ -1,209 +0,0 @@ -INSERT INTO ConfigurationAdmin VALUES ('News_Search_Id', 'la_Text_Search', 'la_prompt_for_Id', 'checkbox', '', '', 1,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortField', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 0,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 1,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortField2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 2,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 3,1) -INSERT INTO ConfigurationAdmin VALUES ('News_CatNewDays', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 5,1) -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 4,1) -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News_Short', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 4,1) -INSERT INTO ConfigurationAdmin VALUES ('News_TopCount', 'la_Text_Articles', 'la_news_newstopminrating_prompt', 'text', '', '', 6,1) -INSERT INTO ConfigurationAdmin VALUES ('News_VotesToHot', 'la_Text_Articles', 'la_news_votestohot_prompt', 'text', '', '', 7,1) -INSERT INTO ConfigurationAdmin VALUES ('News_ShowPick', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 9,1) -INSERT INTO ConfigurationAdmin VALUES ('News_Archive', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 10,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 11,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 12,1) -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 13,1) -INSERT INTO ConfigurationAdmin VALUES ('News_MinVotes', 'la_Text_Articles', 'la_news_MinVotes_prompt', 'text', '', '', 8,1) -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 5,1) -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews_Short', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 6,1) -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Interval', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 17,1) -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Value', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', '', 16,1) -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Interval', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 15,1) -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Value', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', '', 14,1) -INSERT INTO ConfigurationAdmin VALUES ('n_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 1, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 1, 0); - -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_articles', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_articles', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_articles', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_articles', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_articles', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 1); - -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News', '8', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_PopCount', '4', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ArticleSort', 'CreatedOn desc, Title asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatSort', 'cat_date desc, cat_name asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_TopCount', '4', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Archive', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowPick', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatNewDays', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowMulti', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Suggest', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_VotesToHot', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinVotes', '20', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Article_Root', '{NewsCatId}', 'In-Portal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_OpenTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_CloseTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'n_CategoryTemplate', 'innews/index', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (NULL, 'n_ItemTemplate', 'innews/detail', 'In-News', 'in-news:configuration_output'); - -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Keyword_articles', '90', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Pop_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Rating_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search'); - -INSERT INTO Events VALUES (18, 'ARTICLE.ADD', 2, 0, 'In-News', 'la_event_article.add', 1) -INSERT INTO Events VALUES (19, 'ARTICLE.MODIFY', 2, 0, 'In-News', 'la_event_article.modify', 1) -INSERT INTO Events VALUES (20, 'ARTICLE.REVIEW.ADD', 2, 0, 'In-News', 'la_event_article.review.add', 1) -INSERT INTO Events VALUES (21, 'ARTICLE.ADD', 1, 0, 'In-News', 'la_event_article.add', 0) -INSERT INTO Events VALUES (22, 'ARTICLE.APPROVE', 1, 0, 'In-News', 'la_event_article.approve', 0) -INSERT INTO Events VALUES (23, 'ARTICLE.DENY', 1, 0, 'In-News', 'la_event_article.deny', 0) -INSERT INTO Events VALUES (24, 'ARTICLE.MODIFY', 1, 0, 'In-News', 'la_event_article.modify', 0) -INSERT INTO Events VALUES (25, 'ARTICLE.MODIFY.APPROVE', 1, 0, 'In-News', 'la_event_article.modify.approve', 0) -INSERT INTO Events VALUES (26, 'ARTICLE.MODIFY.DENY', 1, 0, 'In-News', 'la_event_article.modify.deny', 0) -INSERT INTO Events VALUES (27, 'ARTICLE.REVIEW.ADD', 1, 0, 'In-News', 'la_event_article.review.add', 0) -INSERT INTO Events VALUES (28, 'ARTICLE.REVIEW.APPROVE', 1, 0, 'In-News', 'la_event_article.review.approve', 0) -INSERT INTO Events VALUES (29, 'ARTICLE.REVIEW.DENY', 1, 0, 'In-News', 'la_event_article.review.deny', 0) -INSERT INTO Events VALUES (44, 'ARTICLE.REVIEW.ADD.PENDING', 1, 0, 'In-News', 'la_event_article.review.add.pending', 0) - -INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article'); - -INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-News', 'in-news/', 'n', '1.2.0', 1, 2, 'innews/', {NewsCatId}, '1054738405'); - -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.VIEW', 'lu_PermName_News.View_desc', 'lu_PermName_News.View_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.ADD', 'lu_PermName_News.Add_desc', 'lu_PermName_News.Add_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.DELETE', 'lu_PermName_News.Delete_desc', 'lu_PermName_News.Delete_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.MODIFY', 'lu_PermName_News.Modify_desc', 'lu_PermName_News.Modify_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.RATE', 'lu_PermName_News.Rate_desc', 'lu_PermName_News.Rate_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW', 'lu_PermName_News.Review_desc', 'lu_PermName_News.Review_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW.PENDING', 'lu_PermName_News.Review.Pending_desc', 'lu_PermName_News.Review.Pending_error', 'In-News'); - -INSERT INTO SearchConfig VALUES ('News', 'Title', 1, 1, 'lu_fielddesc_news_title', 'lu_field_title', 'In-News', 'la_text_article', 2, 0, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Excerpt', 1, 1, 'lu_fielddesc_news_excerpt', 'lu_field_excerpt', 'In-News', 'la_text_article', 3, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Author', 1, 1, 'lu_fielddesc_news_author', 'lu_field_author', 'In-News', 'la_text_article', 4, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Body', 1, 1, 'lu_fielddesc_news_body', 'lu_field_body', 'In-News', 'la_text_article', 5, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedOn', 0, 1, 'lu_fielddesc_news_createdon', 'lu_field_createdon', 'In-News', 'la_text_article', 6, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EndOn', 0, 1, 'lu_fielddesc_news_endon', 'lu_field_endon', 'In-News', 'la_text_article', 7, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Hits', 0, 1, 'lu_fielddesc_news_hits', 'lu_field_hits', 'In-News', 'la_text_article', 8, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedRating', 0, 1, 'lu_fielddesc_news_cachedrating', 'lu_field_cachedrating', 'In-News', 'la_text_article', 9, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedVotesQty', 0, 1, 'lu_fielddesc_news_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-News', 'la_text_article', 10, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedById', 0, 1, 'lu_fielddesc_news_createdbyid', 'lu_field_createdbyid', 'In-News', 'la_text_article', 11, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Priority', 0, 1, 'lu_fielddesc_news_priority', 'lu_field_priority', 'In-News', 'la_text_article', 12, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Status', 0, 1, 'lu_fielddesc_news_status', 'lu_field_status', 'In-News', 'la_text_article', 13, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EditorsPick', 0, 1, 'lu_fielddesc_news_editorspick', 'lu_field_editorspick', 'In-News', 'la_text_article', 14, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadStory', 0, 1, 'lu_fielddesc_news_leadstory', 'lu_field_leadstory', 'In-News', 'la_text_article', 15, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadCatStory', 0, 1, 'lu_fielddesc_news_leadcatstory', 'lu_field_leadcatstory', 'In-News', 'la_text_article', 16, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ResourceId', 0, 1, 'lu_fielddesc_news_resourceid', 'lu_field_resourceid', 'In-News', 'la_text_article', 17, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_news_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-News', 'la_text_article', 18, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'StartDate', 0, 1, 'lu_fielddesc_news_startdate', 'lu_field_startdate', 'In-News', 'la_text_article', 19, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewItem', 0, 1, 'lu_fielddesc_news_newitem', 'lu_field_newitem', 'In-News', 'la_text_article', 20, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'PopItem', 0, 1, 'lu_fielddesc_news_popitem', 'lu_field_popitem', 'In-News', 'la_text_article', 21, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'HotItem', 0, 1, 'lu_fielddesc_news_hotitem', 'lu_field_hotitem', 'In-News', 'la_text_article', 22, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Archived', 0, 1, 'lu_fielddesc_news_archived', 'lu_field_archived', 'In-News', 'la_text_article', 23, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Modified', 0, 1, 'lu_fielddesc_news_modified', 'lu_field_modified', 'In-News', 'la_text_article', 24, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ModifiedById', 0, 1, 'lu_fielddesc_news_modifiedbyid', 'lu_field_modifiedbyid', 'In-News', 'la_text_article', 25, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'OrgId', 0, 0, 'lu_fielddesc_news_orgid', 'lu_field_orgid', 'In-News', 'la_text_article', 26, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewsId', 0, 1, 'lu_fielddesc_news_newsid', 'lu_field_newsid', 'In-News', 'la_text_article', 0, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('CustomField', 'RssOriginalURL', 1, 0, 'la_fld_RssOriginalURL', 'lu_fld_RssOriginalURL', 'In-News', 'la_section_CustomFields', 0, 283, 1, 'text', '', '', '', '', '', '', 0); - -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireInterval', 'RssExpireInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateInterval', 'RssUpdateInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastUpdated', 'RssLastUpdated', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDeleteExpired', 'RssDeleteExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssOriginalURL', 'lu_fld_RssOriginalURL', 'la_section_CustomFields', 'la_fld_RssOriginalURL', 'label', 'cut_first="100"', 0, 1, 0); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateIntervalType', 'RssUpdateIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssSource', 'RssSource', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireIntervalType', 'RssExpireIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpiration', 'RssDefaultExpiration', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpirationType', 'RssDefaultExpirationType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastExpired', 'RssLastExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssArticleCRC', 'RssArticleCRC', 'la_section_SystemCF', NULL, 'text', NULL, 0, 0, 1); - -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_VotesToHot"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, '(*) la_prompt_PopularArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2); - -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD.PENDING', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.add', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.delete', 11, 1, 1, 0); Index: branches/unlabeled/unlabeled-1.7.24/in-news/admin/advanced_view.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.7.24/in-news/admin/advanced_view.php (revision 12747) +++ branches/unlabeled/unlabeled-1.7.24/in-news/admin/advanced_view.php (revision 0) @@ -1,68 +0,0 @@ -Get("Site_Path"); - -$localURL=$rootURL."in-news/"; - -//$imagesURL = $rootURL."admin/images"; -//admin only util - -$pathtolocal = $pathtoroot."in-news/"; - -require_once ($pathtolocal."admin/include/navmenu.php"); - - -//Set Environment Variable -$envar = "env=" . BuildEnv($mod_prefixes); - -//Display header -$section = 'in-news:advanced_view'; - -?> - -
- - - - - - - - -
- - GetAdminPageLinkList($_SERVER["PHP_SELF"]); ?> - - - -
-
- - - - - AdminPrintItems($pathtolocal."admin/templates/news_tab_element_av.tpl"); - ?> - -
- -
- Index: branches/unlabeled/unlabeled-1.7.2/in-news/admin_templates/catalog_tab.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.7.2/in-news/admin_templates/catalog_tab.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.7.2/in-news/admin_templates/catalog_tab.tpl (revision 0) @@ -1,60 +0,0 @@ - - - - a_toolbar.AddButton( new ToolBarButton('in-news:new_article', '', function() { - $form_name = $Catalog.queryTabRegistry('prefix', '', 'tab_id') + '_form'; - std_precreate_item('', 'in-news/articles/articles_edit'); - }, true - ) ); - - - -
" view_template="in-news/catalog_tab" edit_template="in-news/articles/articles_edit" category_id="-1" dep_buttons="new_article" class="catalog-tab">
- -
- - - - - - - $Catalog.setItemCount('', ''); - $Catalog.setCurrentCategory('', ); - - - - - Grids[''].AddAlternativeGrid('', true); - - Grids[''].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6')); - $Catalog.reflectPasteButton(); - $Catalog.setViewMenu(''); - - Grids[''].RadioMode = true; - Grids[''].DblClick = function() {return false}; - - #separator# - - - - - - - - - - - - - - - - - - - - -
-
- - \ No newline at end of file Index: branches/unlabeled/unlabeled-1.41.2/in-news/units/articles/articles_config.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.41.2/in-news/units/articles/articles_config.php (revision 12747) +++ branches/unlabeled/unlabeled-1.41.2/in-news/units/articles/articles_config.php (revision 0) @@ -1,313 +0,0 @@ - 'n', - - 'ItemClass' => Array('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'c', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUpdateCategoryCustomFields', - ), - ), - 'CatalogItem' => true, - 'AdminTemplatePath' => 'articles', - 'AdminTemplatePrefix' => 'articles_', - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'Reviews_Page', - 4 => 'event', - 5 => 'mode', - ), - - 'RegularEvents' => Array( - 'rss_category_update' => Array('EventName' => 'OnUpdateRSSAtricles', 'RunInterval' => 0, 'Type' => reBEFORE), - ), - - 'IDField' => 'NewsId', - 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events - - 'TitleField' => 'Title', // field, used in bluebar when editing existing item - 'TitlePhrase' => 'la_Text_Article', // phrase used to specify item type in relationship list - - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('n' => '!la_title_AddingArticle!'), - 'edit_status_labels' => Array('n' => '!la_title_EditingArticle!'), - 'new_titlefield' => Array('n' => '!la_title_NewArticle!'), - ), - - 'articles_edit' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_General!"), - - 'articles_categories'=>Array('prefixes' => Array('n','n-ci_List'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Categories!"), - 'articles_relations'=> Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Relations!"), - 'articles_images' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Images!"), - 'articles_reviews' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Reviews!"), - 'articles_custom' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Custom!"), - - 'images_edit' => Array( 'prefixes' => Array('n', 'n-img'), - 'new_status_labels' => Array('n-img'=>'!la_title_Adding_Image!'), - 'edit_status_labels' => Array('n-img'=>'!la_title_Editing_Image!'), - 'new_titlefield' => Array('n-img'=>'!la_title_New_Image!'), - 'format' => "#n_status# '#n_titlefield#' - #n-img_status# '#n-img_titlefield#'", - ), - - 'reviews_edit' => Array( 'prefixes' => Array('n', 'n-rev'), - 'new_status_labels' => Array('n-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"), - 'edit_status_labels' => Array('n-rev'=>'!la_title_Editing_Review!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rev_status#", - ), - - 'relations_edit' => Array( 'prefixes' => Array('n', 'n-rel'), - 'new_status_labels' => Array('n-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), - 'edit_status_labels' => Array('n-rel'=>'!la_title_Editing_Relationship!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rel_status#", - ), - - 'tree_in-news' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-News', 'Version')), - ), - - 'PermItemPrefix' => 'NEWS', - - 'PermTabText' => 'In-News', - 'PermSection' => Array('main' => 'CATEGORY:in-news:articles_list', 'search' => 'in-news:configuration_search', 'email' => 'in-news:configuration_email', 'custom' => 'in-news:configuration_custom'), - - 'Sections' => Array( - 'in-news' => Array( - 'parent' => 'in-portal:root', - 'icon' => 'settings_in-newz', - 'label' => 'la_title_In-News', - 'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view'), - 'priority' => 3.2, - 'type' => stTREE, - ), - - 'in-news:innews_general' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_general', - 'label' => 'la_tab_GeneralSettings', - 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 1, - 'type' => stTREE, - ), - - 'in-news:configuration_output' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_output', - 'label' => 'la_tab_ConfigOutput', - 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 2, - 'type' => stTREE, - ), - - 'in-news:configuration_search' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_search', - 'label' => 'la_tab_ConfigSearch', - 'url' => Array('t' => 'config/config_search', 'module_key' => 'articles', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 3, - 'type' => stTREE, - ), - - 'in-news:configuration_email' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_email', - 'label' => 'la_tab_ConfigE-mail', - 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 4, - 'type' => stTREE, - ), - - 'in-news:configuration_custom' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_custom', - 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 2, 'pass_section' => true, 'pass' => 'm,cf'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), - 'priority' => 5, - 'type' => stTREE, - ), - - ), - - 'FilterMenu' => Array( - 'Groups' => Array( - Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER), - ), - 'Filters' => Array( - 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), - 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ), - 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), - 's1' => Array(), - 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), - 'show_hot' => Array('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), - 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), - 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), - ) - ), - - 'CatalogSelectorName' => 'newslist', - - 'ItemPropertyMappings' => Array( - 'NewDays' => 'News_CatNewDays', // number of days item to be NEW - 'MinPopVotes' => 'News_MinPopVotes', // minimum number of votes for an item to be POP - 'MinPopRating' => 'News_MinPopRating',// minimum rating for an item to be POP - 'MaxHotNumber' => 'News_MaxHotNumber',// maximum number of HOT items - - 'HotLimit' => 'News_HotLimit', // variable name in inp_Cache table - 'ClickField' => 'Hits', // item click count is stored here (in item table) - ), - - 'ItemType' => 2, // this is used when relation to product is added from in-portal and via-versa - - 'ViewMenuPhrase' => 'la_title_Articles', - - 'StatisticsInfo' => Array( - 'pending' => Array( - 'icon' => 'icon16_article_pending.gif', - 'label' => 'la_Text_Articles', - 'js_url' => '#url#', - 'url' => Array('t' => 'in-portal/advanced_view', 'SetTab' => 'n', 'pass' => 'm,n.showall', 'n.showall_event' => 'OnSetFilterPattern', 'n.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'), - 'status' => STATUS_PENDING, - ), - ), - - 'TableName' => TABLE_PREFIX.'News', - - 'CalculatedFields' => Array( - '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = -1, "root", IF (%1$s.CreatedById = -2, "Guest", "n/a")), u.Login)', - 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', - 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', - 'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath', - ), - ), - - 'CacheModRewrite' => true, - - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId', - ), // key - special, value - list select sql - - 'ListSortings' => Array( - '' => Array( - 'ForcedSorting' => Array('EditorsPick' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array('Title' => 'asc'), - ) - ), - 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId'), - - 'SubItems' => Array('n-rev', 'n-ci', 'n-rel', 'n-img', 'n-cdata'), - - 'Fields' => Array ( - 'NewsId' => Array(), - 'Title' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => '1'), - 'Excerpt' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Author' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Body' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1,'default' => '#NOW#'), - 'TextFormat' => Array('type' => 'int', 'not_null' => 1, 'default' => '0'), - 'EndOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => ''), - 'Hits' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), - 'CachedRating' => Array('type' => 'string', 'default' => 0), - 'CachedVotesQty' => Array('type' => 'int','not_null' => 1,'default' => '0'), - 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => -1), - 'Priority' => Array('type' => 'int','default' => 0, 'not_null'=>1), - 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), - 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadCatStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array('type' => 'int', 'default' => ''), - 'CachedReviewsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StartDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1, 'default' => '#NOW#'), - 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'Archived' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => '#NOW#'), - 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => -1), - 'OrgId' => Array('type' => 'int','default' => ''), - ), - - 'VirtualFields' => Array( - 'UserName' => Array('type' => 'string', 'default' => ''), - 'CategoryId' => Array('type' => 'int', 'default' => 0), - 'cust_RssOriginalURL' => Array('type' => 'string', 'default' => ''), - 'cust_RssArticleCRC' => Array('type' => 'int', 'default' => 0), - 'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'CachedNavbar' => Array('type' => 'string', 'default' => ''), - ), - - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), -// 'PrimaryCategory' => Array('title' => 'la_col_PrimaryCategory', 'data_block' => 'grid_category_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - - - 'Radio' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_radio_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - ), - - 'ConfigMapping' => Array( - 'PerPage' => 'Perpage_News', - 'ShortListPerPage' => 'Perpage_News_Short', - 'DefaultSorting1Field' => 'News_SortField', - 'DefaultSorting2Field' => 'News_SortField2', - 'DefaultSorting1Dir' => 'News_SortOrder', - 'DefaultSorting2Dir' => 'News_SortOrder2', - ), - ); - - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.3.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.0.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.3.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.0.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.3.2/in-news/admin/install/upgrades/inportal_upgrade_v1.2.0.sql (revision 0) @@ -1,34 +0,0 @@ -ALTER TABLE NewsCustomData ADD INDEX (ResourceId); - -INSERT INTO SearchConfig VALUES ('CustomField', 'RssOriginalURL', 1, 0, 'la_fld_RssOriginalURL', 'lu_fld_RssOriginalURL', 'In-News', 'la_section_CustomFields', 0, 283, 1, 'text', '', '', '', '', '', '', 0); - -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireInterval', 'RssExpireInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateInterval', 'RssUpdateInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastUpdated', 'RssLastUpdated', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDeleteExpired', 'RssDeleteExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssOriginalURL', 'lu_fld_RssOriginalURL', 'la_section_CustomFields', 'la_fld_RssOriginalURL', 'label', 'cut_first="100"', 0, 1, 0); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateIntervalType', 'RssUpdateIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssSource', 'RssSource', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireIntervalType', 'RssExpireIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpiration', 'RssDefaultExpiration', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpirationType', 'RssDefaultExpirationType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastExpired', 'RssLastExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssArticleCRC', 'RssArticleCRC', 'la_section_SystemCF', NULL, 'text', NULL, 0, 0, 1); - -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.add', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.delete', 11, 1, 1, 0); - -UPDATE ConfigurationAdmin SET ValueList = 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)' WHERE VariableName IN ('News_SortField', 'News_SortField2'); - -UPDATE Modules SET Version = '1.2.0' WHERE Name = 'In-News'; \ No newline at end of file Index: branches/unlabeled/unlabeled-1.3.2/in-news/admin_templates/articles/articles_edit.tpl =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.3.2/in-news/admin_templates/articles/articles_edit.tpl (revision 12747) +++ branches/unlabeled/unlabeled-1.3.2/in-news/admin_templates/articles/articles_edit.tpl (revision 0) @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - "> - - - - - - - - - - - - - - - - - - - - - - - - - - - " /> - - - - - -
- error"> - *:
- ');"> -
-
- -
 
- - - Index: branches/unlabeled/unlabeled-1.3.2/in-news/units/articles/articles_tag_processor.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.3.2/in-news/units/articles/articles_tag_processor.php (revision 12747) +++ branches/unlabeled/unlabeled-1.3.2/in-news/units/articles/articles_tag_processor.php (revision 0) @@ -1,21 +0,0 @@ -PrintList2($params); - } - - function ListArticles($params) - { - return $this->PrintList2($params); - } - - function ArticleLink($params) - { - return $this->ItemLink($params, 'article'); - } - } - -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.14.20/in-news/admin/addarticle.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.14.20/in-news/admin/addarticle.php (revision 12747) +++ branches/unlabeled/unlabeled-1.14.20/in-news/admin/addarticle.php (revision 0) @@ -1,721 +0,0 @@ -SourceTable = $objSession->GetEditTable("News"); -$objEditItems->EnablePaging = FALSE; - -$objRelList = new clsRelationshipList(); -$objReviewList = new clsItemReviewList(); - -$objCustomFields = new clsCustomFieldList(2); -$objCustomDataList = new clsCustomDataList(); -$objImages = new clsImageList(); - -//Multiedit init -if ($_GET["new"] == 1) -{ - $c = new clsNews(NULL); - $c->Set("CreatedOn", adodb_mktime()); -// echo "val: ".$objConfig->Get("News_Archive")."
\n"; - if($objConfig->Get("News_Archive")>0) - { - $e = ((int)$objConfig->Get("News_Archive")*86400) + (int)adodb_date("U"); - $c->Set("EndOn", $e); - } - else - $c->Set("EndOn",0); - $c->Set("StartDate",0); - $c->Set("CategoryId",$objCatList->CurrentCategoryID()); - $c->Set("HotItem",2); - $c->Set("NewItem",2); - $c->Set("PopItem",2); - $c->Set("Status",2); - $c->Set('AutomaticFilename', 1); - $c->Set("TextFormat",1); //html enabled - if($objSession->Get("PortalUserId")>0) - { - $u = $objUsers->GetUser($objSession->Get("PortalUserId")); - $c->Set("Author",$u->Get("Login")); - } - else - { - $c->Set("Author","root"); - } - $en = 0; - $action = "n_add_article"; - $objArticleList->CreateEmptyEditTable("NewsId"); - $objRelList->CreateEmptyEditTable("SourceId"); - $objCustomDataList->CreateEmptyEditTable("CustomDataId"); - $objArticleList->CreateEmptyCatListTable("ItemResourceId"); - $objReviewList->CreateEmptyEditTable("ReviewId"); - $objImages->CreateEmptyEditTable("ResourceId"); - - $TitleVerb = prompt_language("la_Text_Adding"); - $Org = NULL; -} -else -{ - $env_id=$n_var_list['id']; - if($env_id) $_POST['newslist']=Array($env_id); - - $en = (int)$_GET["en"]; - if($_GET["item"]) - { - if($_GET["newsession"]==1) - { - $objSession->CopyToNewSession(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - } - - /*shortcut to edit link */ - $objArticleList->CopyToEditTable("ResourceId",$_GET["item"]); - } - else - { - if (isset($_POST["newslist"])) - { - $objArticleList->CopyToEditTable("NewsId",$_POST["newslist"]); - } - } - $objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable); - /* make a copy of the relationship records */ - if(isset($_POST["newslist"]) || $_GET["item"]) - { - $ids = $objEditItems->GetResourceIDList(); - $objRelList->CopyToEditTable("SourceId",$ids); - $objCustomDataList->CopyToEditTable("ResourceId",$ids); - $objArticleList->CopyCatListToEditTable("ItemResourceId", $ids); - $objReviewList->CopyToEditTable("ItemId",$ids); - $objImages->CopyToEditTable("ResourceId",$ids); - } - $itemcount=$objEditItems->NumItems(); - $c = $objEditItems->GetItemByIndex($en); - - if($itemcount>1) - { - if ($en+1 == $itemcount) - $en_next = -1; - else - $en_next = $en+1; - - if ($en == 0) - $en_prev = -1; - else - $en_prev = $en-1; - } - $action = "n_edit_article"; - $TitleVerb = prompt_language("la_Text_Editing"); - /* check to see if this is a pending item */ - if((int)$c->Get("OrgId")>0 && $c->Get("Status")==-2) - { - $Org = new clsNews($c->Get("OrgId")); - } - else - $Org = NULL; -} - -$envar = "env=" . BuildEnv() . "&en=$en"; -//$formaction = "addarticle.php?".$envar; - -//Set Section - -//if (isset($itemlist)) - $section = 'in-news:editarticle_general'; -//else -// $section = 'in-news:addarticle_general'; - -//Set Environment Variable -$saveURL = $admin."/".$objSession->GetVariable('ReturnScript'); -//Display header -$sec = $objSections->GetSection($section); -$objCatToolBar = new clsToolBar(); -$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('article','NewsEditStatus','$saveURL',1);","tool_select.gif"); -$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('article','NewsEditStatus','$saveURL',2);","tool_cancel.gif"); - -if ( isset($en_prev) || isset($en_next) ) -{ - $url = $RootUrl."in-news/admin/addarticle.php"; - $StatusField = "NewsEditStatus"; - $form = "article"; - MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick")); - //$objCatToolBar->Add("divider"); -} - -$article_t = inp_textarea_unescape($c->parsetag("article_title")); - -if (strlen($article_t)) - $editing_title = "'".$article_t."' "; -else - $editing_title = ""; - -$title = $TitleVerb." ".prompt_language("la_Text_Article")." $editing_title- ".prompt_language("la_tab_General"); - int_header($objCatToolBar,NULL,$title); -if ($objSession->GetVariable("HasChanges") == 1) { -?> - - - - -
- -
- - - - > - - - - > - - - - > - - - - - > - - - - - > - - - - - > - - - - - - > - - - - - > - - - - - - - - > - - - - - > - - - - - > - - - - - > - - - - - > - - - - - - > - - - - - > - - - - - - > - - - - - - > - - - - - > - - - - - > - - - - - - - > - - - - - > - - - - - > - - - - -GetFieldUIList(TRUE); -if($CustomFieldUI->NumItems()>0) -{ - $objCustomDataList->SourceTable = $objSession->GetEditTable("CustomMetaData"); - if((int)$c->Get("ResourceId")>0) - { - $objCustomDataList->LoadResource($c->Get("ResourceId")); - } - $headings = $CustomFieldUI->GetHeadingList(); - //echo "
";print_r($objCustomFields); echo "
"; - $tab_index = 21; - for($i=0;$i<=count($headings);$i++) - { - $h = $headings[$i]; - if(strlen($h)) - { - int_subsection_title(prompt_language($h)); - $Items = $CustomFieldUI->GetHeadingItems($h); - foreach($Items as $f) - { - $n = substr($f->name,1); - $cfield = $objCustomFields->GetItemByField("FieldName",$n,FALSE); - if(is_object($cfield)) - { - $cv = $objCustomDataList->GetDataItem($cfield->Get("CustomFieldId")); - if(is_object($cv)) - { - $f->default_value = $cv->Get("Value"); - } - } - print "\n"; - print " \n"; - print " "; - if(is_object($f->NextItem)) - { - $n = $f->NextItem; - print " "; - } - else - print " \n"; - print "\n"; - } - } - } -} -?> - - "> - - - -
-Get("TextFormat")==1) - $checked=" checked"; -?> - > -
- -
Get("NewsId"); ?> -
- "> - -Get("Title"); - $NewValue = $c->Get("Title"); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "".inp_textarea_unescape($OrgValue).""; - } -?> -
- "> - - - - -Get("Author"); - $NewValue = $c->Get("Author"); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "".inp_textarea_unescape($OrgValue).""; - } -?> -

- - - -
- - -Get("Body"); - $NewValue = $c->Get("Body"); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "".substr(strip_tags($OrgValue),0,100); - if(strlen($OrgValue)>100) - echo " .."; - echo ""; - } -?> -
- -
-
-Get("Excerpt"); - $NewValue = $c->Get("Excerpt"); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "".inp_textarea_unescape($OrgValue).""; - } -?> -
- Get('AutomaticFilename') == 1) echo ' checked'; ?> onchange="reflect_filename();"> -  
- -  
- Get("Status") == 1) echo "checked"; ?>> - - Get("Status") == $PendingVal) echo "checked"; ?>> - Get("Status") == 0) echo "checked"; ?>> - - -
- Get("NewItem") == 2) echo "checked"; ?>> - Get("NewItem") == 1) echo "checked"; ?>> - Get("NewItem") == 0) echo "checked"; ?>> - -Get("NewItem")) - { - case 2: - echo prompt_language("la_val_Auto"); - break; - case 1: - echo prompt_language("la_val_Always"); - break; - case 0: - echo prompt_language("la_val_Never"); - break; - } - } -?> -
- Get("HotItem") == 2) echo "checked"; ?>> - Get("HotItem") == 1) echo "checked"; ?>> - Get("HotItem") == 0) echo "checked"; ?>> - - -Get("HotItem")) - { - case 2: - echo prompt_language("la_val_Auto"); - break; - case 1: - echo prompt_language("la_val_Always"); - break; - case 0: - echo prompt_language("la_val_Never"); - break; - } - } -?> -
- Get("PopItem") == 2) echo "checked"; ?>> - Get("PopItem") == 1) echo "checked"; ?>> - Get("PopItem") == 0) echo "checked"; ?>> - - -Get("PopItem")) - { - case 2: - echo prompt_language("la_val_Auto"); - break; - case 1: - echo prompt_language("la_val_Always"); - break; - case 0: - echo prompt_language("la_val_Never"); - break; - } - } -?> -
- Get("EditorsPick") == 1) echo "checked"; ?>> -Get("EditorsPick")) - { - echo prompt_language("lu_yes"); - } - else - echo prompt_language("lu_no"); - } -?> -
- Get("LeadStory") == 1) echo "checked"; ?>> - -Get("LeadStory")) - { - echo prompt_language("lu_yes"); - } - else - echo prompt_language("lu_no"); - } -?> -
- Get("LeadCatStory") == 1) echo "checked"; ?>> - -Get("LeadCatStory")) - { - echo prompt_language("lu_yes"); - } - else - echo prompt_language("lu_no"); - } -?> -
- "> - -Get("Priority"); - $NewValue = (int)$c->Get("Priority"); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "$OrgValue"; - } -?> -
- - -parsetag('article_date'); - $NewValue = $c->parsetag('article_date'); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "$OrgValue"; - } -?> -
- - -parsetag('article_startdate'); - $NewValue = $c->parsetag('article_startdate'); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "$OrgValue"; - } -?> -
- - -parsetag('article_enddate'); - $NewValue = $c->parsetag('article_enddate'); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "$OrgValue"; - } -?> -
- "> - -Get("CachedRating"); - $NewValue = (int)$c->Get("CachedRating"); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "$OrgValue"; - } -?> -
- "> - -Get("CachedVotesQty"); - $NewValue = (int)$c->Get("CachedVotesQty"); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "$OrgValue"; - } -?> -
- "> - "> - -Get("Views"); - $NewValue = (int)$c->Get("Views"); - if($OrgValue != $NewValue) - { - $class = "error"; - } - else - $class = "text"; - echo "$OrgValue"; - } -?> -
".$f->GetPrompt()."".$f->ItemFormElement($tab_index++)."".$n->ItemFormElement($tab_index++)." 
- - - - \ No newline at end of file Index: branches/unlabeled/unlabeled-1.30.12/in-news/news.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.30.12/in-news/news.php (revision 12747) +++ branches/unlabeled/unlabeled-1.30.12/in-news/news.php (revision 0) @@ -1,1101 +0,0 @@ -clsCatItem(TRUE); - $this->tablename=GetTablePrefix()."News"; - $this->type=TYPE_NEWS; - $this->BasePermission="NEWS"; - $this->id_field = "NewsId"; - $this->TagPrefix="article"; - $this->TitleField = 'Title'; - if(isset($NewsId)) - $this->LoadFromDatabase($NewsId); - if($objSession->HasSystemPermission("DEBUG.ITEM")) - { - $this->SetDebugLevel(1); - } - - /* keyword highlighting */ - $this->OpenTagVar = "News_Highlight_OpenTag"; - $this->CloseTagVar = "News_Highlight_CloseTag"; - - } - - - function Validate() - { - global $objSession, $Errors; - - $dataValid = true; - if(!strlen($this->Get("Title"))) - { - $Errors->AddError("error.fieldIsRequired",'Name',"","",get_class($this),"Validate"); - $dataValid = false; - } - - if(!(int)($this->Get("CreatedOn"))) - { - $Errors->AddError("error.fieldIsRequired",'CreatedOn',"","",get_class($this),"Validate"); - $dataValid = false; - } - return $dataValid; - } - - - function SetNewItem() - { - global $objConfig; - - $value = $this->Get("CreatedOn"); - - $cutoff = adodb_date("U") - ($objConfig->Get("News_NewDays") * 86400); - $this->IsNew = FALSE; - if($value>$cutoff) - $this->IsNew = TRUE; - return $this->IsNew; - } - - function SetPopItem() - { - global $objConfig, $objArticleList; - - $cutoff = $objArticleList->GetPopValue(); - $this->IsPop = FALSE; - if($cutoff>0) - { - if($this->Get('CachedRating') >= $cutoff - && $this->Get('CachedVotesQty') >= $objConfig->Get('News_MinVotes')) - { - $this->IsPop = TRUE; - } - } - return $this->IsPop; - } - - function SetHotItem() - { - global $objConfig, $objArticleList; - - $this->IsHot = FALSE; - $cutoff = $objArticleList->GetHotValue(); - if($cutoff>0) - { - if($this->Get("Hits")>=$cutoff) - $this->IsHot = TRUE; - } - return $this->IsHot; - } - - function Approve() - { - if($this->Get("Status")==-2) - { - $this->SendUserEventMail("ARTICLE.MODIFY.APPROVE",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.MODIFY.APPROVE"); - } - else - { - $this->SendUserEventMail("ARTICLE.APPROVE",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.APPROVE"); - } - $this->Set("Status", 1); - $this->Update(); - } - - function Deny() - { - if($this->Get("Status")==-2) - { - $this->SendUserEventMail("ARTICLE.DENY.PENDING",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.DENY.PENDING"); - } - else - { - $this->SendUserEventMail("ARTICLE.DENY",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.DENY"); - } - $this->Set("Status", 0); - $this->Update(); - } - - function LoadFromDatabase($Id) - { - global $Errors; - - if(!isset($Id)) - { - $Errors->AddError("error.AppError",NULL,'Internal error: LoadFromDatabase id',"",get_class($this),"LoadFromDatabase"); - return false; - } - - $sql = sprintf("SELECT * FROM ".$this->tablename." WHERE ".$this->IdField()." = '%s'", $Id); - $result = $this->adodbConnection->Execute($sql); - if ($result === false) - { - $Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"LoadFromDatabase"); - return false; - } - - $data = $result->fields; - if(is_array($data)) - $this->SetFromArray($data); - $this->Clean(); - } - function LoadFromResourceId($Id) - { - global $objSession, $Errors; - if(!isset($Id)) - { - $Errors->AddError("error.AppError",NULL,'Internal error: LoadFromDatabase id',"",get_class($this),"LoadFromResourceId"); - return false; - } - $sql = sprintf("SELECT * FROM ".$this->tablename." WHERE ResourceId = '%s'",$Id); - $result = $this->adodbConnection->Execute($sql); - if ($result === false) - { - $Errors->AddError("error.DatabaseError",NULL,$adodbConnection->ErrorMsg(),"",get_class($this),"LoadFromResourceId"); - return false; - } - $data = $result->fields; - if(is_array($data)) - { - $this->SetFromArray($data); - $this->Clean(); - } - return TRUE; - } - - function GetGroupIcon() - { - $ret = "groupicons/".$this->m_GroupId.".gif"; - return $ret; - } - - function StatusIcon() - { - global $rootURL; - - $ret = $rootURL."/in-news/admin/images/"; - - switch($this->Get("Status")) - { - case STATUS_DISABLED: - $ret .= "icon16_article_disabled.gif"; - break; - case STATUS_PENDING: - $ret .= "icon16_article_pending.gif"; - break; - case STATUS_ACTIVE: - $img = "icon16_article.gif"; - if($this->IsPopItem()) - $img = "icon16_article_pop.gif"; - if($this->IsHotItem()) - $img = "icon16_article_hot.gif"; - if($this->IsNewItem()) - $img = "icon16_article_new.gif"; - if($this->Is("EditorsPick")) - $img = "icon16_article_pick.gif"; - $ret .= $img; - break; - } - return $ret; - } - - function ItemURL($Template=NULL,$SetCat=FALSE,$Action=NULL) - { - global $var_list_update,$var_list,$n_var_list_update,$m_var_list_update; - - $url_params = Array(); - $var_list_update["t"] = $Template ? $Template : $var_list["t"]; - -// if($SetCat) -// { - $cat = $this->Get("CategoryId"); - if( !is_numeric($cat) ) $cat = $this->GetPrimaryCategory(); - $m_var_list_update["cat"] = $cat; -// } - - $n_var_list_update["id"] = $this->Get("NewsId"); - - if( isset($Action) && $Action ) $url_params['Action'] = $Action; - - $ret = HREF_Wrapper('', $url_params); - unset($n_var_list_update["id"], $var_list_update["t"],$m_var_list_update["cat"]); - return $ret; - } - - function ParseObject($element) - { - global $objConfig, $objCatList, $var_list_update, $var_list, $n_var_list_update, $m_var_list_update, $objSession, $objUsers; - - $extra_attribs = ExtraAttributes($element->attributes); - if(strtolower($element->name)==$this->TagPrefix) - { - $field = strtolower($element->attributes["_field"]); - switch($field) - { - case "excerpt": - /* - @field:article.excerpt - @description Returns the artcle excerpt - */ - $ret = $this->HighlightField("Excerpt"); - break; - case "body": - /* - @field:article.body - @description:The main body of the article - @attrib:_parsed:bool:If set, HTML and In-Portal tags in the body are preserved, otherwise they are escaped - */ - $this->Increment("Hits", true); - $parsed = $element->attributes["_parsed"]; - if($parsed) - { - $body = inp_unescape($this->Get("Body")); - $body = $this->HighlightText($body); - if($this->Get("TextFormat")!=1) - { - $body = nl2br($body); - } - $ret = $this->ParseTemplateText($body); - } - else - $ret = inp_unescape($this->Get("Body")); - $ret = $this->HighlightText($ret); - break; - case "title": - /* - @field:article.title - @description: Article Title (headline) - */ - $ret = $this->HighlightField("Title"); - break; - case "author": - /* - @field:article.author - @description:text by-line of the article - */ - $ret = $this->HighlightField("Author"); - break; - case "createdby": - /* - @field:article.createdby - @description:parse a user field of the user that created the article - @attrib:_usertag::User field to return (defaults to login ID) - */ - $field = $element->attributes["_usertag"]; - if(!strlen($field)) - { - $field = "user_login"; - } - - $userId = $this->Get("CreatedById"); - if (!empty($userId) && ($userId > 0)) - { - $u =& $objUsers->GetItem($userId); - if (is_object($u)) - { - $ret = $u->parsetag($field); - } - } - else - $ret = " "; - break; - case "date": - /* - @field:article.date - @description:Returns the date/time the article was created - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - $d = $this->Get("CreatedOn"); - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - case "modified": - /* - @field:article.modified - @description:Returns the date/time the article was last modified - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - $d = $this->Get("Modified"); - if($d<=0) - $d = $this->Get("CreatedOn"); - - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - - case "enddate": - /* - @field:article.enddate - @description:Returns the date/time the article is to be archived - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - $d = $this->Get("EndOn"); - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - /* - @field:article.startdate - @description:Returns the date/time the article is to begin being displayed - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - case "startdate": - $d = $this->Get("StartDate"); - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - case "add_favorite_link": - /* - @field:article.add_favorite_link - @description:Returns a URL to add this article to the user's favorites - @attrib:_template:tpl:Template URL should point to - */ - if($objSession->HasCatPermission("FAVORITES")) - { - $t = $element->attributes["_template"]; - if(!strlen($t)) - $t = $var_list["t"]; - $ret = $this->ItemURL($t,FALSE,"n_add_favorite"); - } - else - { - $t = $element->attributes["_errortemplate"]; - if(!strlen($t)) - $t = "favorite_error.tpl"; - $ret = $this->ItemURL($t,FALSE,""); - } - break; - case "del_favorite_link": - /* - @field:article.del_favorite_link - @description:Returns a URL to remove this article from the user's favorites - @attrib:_template:tpl:Template URL should point to - */ - if($objSession->HasCatPermission("FAVORITES")) - { - $t = $element->attributes["_template"]; - if(!strlen($t)) - $t = $var_list["t"]; - $ret = $this->ItemURL($t,FALSE,"n_del_favorite"); - } - else - { - $t = $element->attributes["_errortemplate"]; - if(!strlen($t)) - $t = "favorite_error.tpl"; - $ret = $this->ItemURL($t,FALSE,""); - } - break; - /* - @field:article.favorite_toggle - @description: Returns a link to set or reset the favorite flag for the current user - @attrib: _template:tpl:Template to link to if user has the FAVORITES permission (defaults to current template) - @attrib: _denytemplate:tpl: Template to link to if user does not have favorites permission (ie Guest) Defaults to current template - @attrib: _addlabel:lang:Language tag to display if link is to add favorite - @attrib: _addimage::Image url to include in link if adding favorite - @attrib: _dellabel:lang:Language tag to display if item is already a favorite - @attrib: _delimage::Image url to include in link if removing the favorite - */ - case "favorite_toggle": - $catid = $this->GetPrimaryCategory(); - $t = $element->attributes["_template"]; - if(!strlen($t)) - $t = $var_list["t"]; - if($objSession->HasCatPermission('FAVORITES', $catid)) - { - if(!$this->IsFavorite($objSession->Get("PortalUserId"), $this->GetPrimaryCategory())) - { - $action = "n_add_favorite"; - $label = $element->attributes["_addlabel"]; - } - else - { - $action = "n_del_favorite"; - $label = $element->attributes["_dellabel"]; - } - } - else - { - $action=""; - $label = $element->attributes["_addlabel"]; - $t = $element->attributes["_errortemplate"]; - if(!strlen($t)) - $t = "favorite_error.tpl"; - } - $ret = "ItemURL($t,FALSE,$action)."\">".language($label).""; - break; - - /* - @field:article.hits - @description:Returns number of hits for item - */ - case "hits": - $ret=round($this->Get("Hits")); - break; - - -/* - @field:article.link - @description:Returns a URL setting the link to the article - @attrib:_template:tpl:Template URL should point to -*/ -/* - @field:article.cat_link - @description:Returns a URL setting the article to the current article and the article's category to the current category - @attrib:_template:tpl:Template URL should point to -*/ -/* - @field:article.category - @description:Return a category field from the article's category - @attrib:_cattag::Category field to parse -*/ -/* - @field:article.reviews - @description:Return the number of reviews for the article - @attrib:_today:bool:Count reviews added today only -*/ -/* - @field:article.new - @description:returns text if article's status is "new" - @attrib:_label:lang: Text to return if status is new -*/ -/* - @field:article.pop - @description:returns text if article's status is "popular" - @attrib:_label:lang: Text to return if status is popular -*/ -/* - @field:article.hot - @description:returns text if article's status is "hot" - @attrib:_label:lang: Text to return if status is "hot" -*/ -/* - @field:article.pick - @description:returns text if article's status is "hot" - @attrib:_label:lang: Text to return if status is "hot" -*/ -/* - @field:article.rating - @description:Displays the article rating - @attrib:_displaymode:: How the rating should be displayed
-
    -
  • "Numerical": Show the decimal value -
  • "Text": Show the text version -
  • "Graphical":Show images representing the rating -
- @attrib:_onimage::on image tick shown in graphical display mode - @attrib:_offimage::off image tick shown in graphical display mode - @attrib:_separator::In graphical display mode, this html is placed between each tick image -*/ -/* - @field:article.custom - @description:Returns a custom field - @attrib:_customfield::field name to return - @attrib:_default::default value -*/ -/* - @field:article.fullpath - @description:The full category path of the item -*/ -/* - @field:article.relevance - @description:Displays the article relevance in search results - @attrib:_displaymode:: How the relevance should be displayed
-
    -
  • "Numerical": Show the decimal value -
  • "Bar": Show the HTML representing the relevance. Returns two HTML cells ≶td< with specified background colors -
  • "Graphical":Show image representing the relevance -
- @attrib:_onimage::Zero relevance image shown in graphical display mode. Also used as prefix to build other images (i.e. prefix+"_"+percentage+".file_extension" - @attrib:_OffBackGroundColor::Off background color of HTML cell in bar display mode - @attrib:_OnBackGroundColor::On background color of HTML cell in bar display mode -*/ - - } - if(!isset($ret) || !strlen($ret)) - $ret = parent::ParseObject($element); - } - else - { - $ret = $this->parsetag($element->name); - } - return $ret; - } - - - function parsetag($tag) - { - global $n_var_list, $var_list, $n_var_list_update, $var_list_update, $objConfig; - - $tagname = $tag; - - switch($tagname) - { - case "article_category": - return $this->Get("CategoryId"); - break; - case "article_id": - return $this->Get("NewsId"); - break; - case "article_title": - return inp_unescape($this->Get("Title")); - break; - case "article_excerpt": - return inp_textarea_unescape($this->Get("Excerpt")); - break; - case "article_author": - return $this->Get("Author"); - break; - case "article_body": - $ret = inp_unescape($this->Get("Body")); - //$ret = $this->ParseTemplateText($body); - return $ret; - break; - case "article_footer": - return inp_textarea_unescape($this->Get("Footer")); - break; - case "article_priority": - return (int)$this->Get("Priority"); - break; - case "article_date": - if ($this->Get('CreatedOn') <= 0) { - return ''; - } - return LangDate($this->Get('CreatedOn'), 0, true); - break; - - case "article_enddate": - if ($this->Get('EndOn') <= 0) { - return ''; - } - return LangDate($this->Get('EndOn'), 0, true); - break; - - case "article_startdate": - if ($this->Get('StartDate') <= 0) { - return ''; - } - return LangDate($this->Get('StartDate'), 0, true); - break; - - case "article_hits": - return $this->Get("Hits"); - break; - case "article_views": - return $this->Get("Hits"); - break; - case "article_rating": - return round($this->Get("CachedRating"),1); - break; - case "article_rating_img": - return "inlink/rating/".RatingImage($this->Get("CachedRating")).".gif"; - break; - case "article_votes": - return $this->Get("CachedVotesQty"); - break; - case "article_pick": - if ($this->Is("EditorsPick")) - return "pick"; - break; - - case "article_new": - if($this->IsNewItem()) - return "new"; - break; - case "article_pop": - if($this->IsPopItem()) - return "pop"; - break; - case "article_hot": - if($this->IsHotItem()) - return "new"; - break; - - case "article_admin_icon": - return $this->StatusIcon(); - break; - - case "article_email_action": - $var_list_update["t"] = "window_close"; - $n_var_list_update["id"] = $this->Get("NewsId"); - $ret = HREF_Wrapper(); - unset($var_list_update["t"],$n_var_list_update["id"]); - return $ret; - break; - case "article_group_icon": - return $this->GetGroupIcon(); - break; - case "article_resourceid": - return $this->Get("ResourceId"); - break; - case "article_rating_txt": - return RatingText($this->Get("CachedRating")); - break; - default: - return "Undefined:$tagname"; - break; - } - } - - function Update($UpdatedBy=NULL,$modificationDate = null) - { - DeleteModuleTagCache('innews'); - return parent::Update($UpdatedBy, $modificationDate); - } - - function Delete () - { - DeleteModuleTagCache('innews'); - return parent::Delete(); - } - - function Create () - { - DeleteModuleTagCache('innews'); - return parent::Create(); - } -} /*clsNews*/ - -class _clsNewsList extends clsCatItemList -{ - function _clsNewsList() - { - $this->clsCatItemList(); - $this->classname="clsNews"; - - $this->SetTable('live', GetTablePrefix().'News'); - $this->AdminSearchFields = array("Title","Excerpt","Body","Author"); - $this->BasePermission="NEWS"; - - $this->Page = 1; - $this->PerPageVar = "Perpage_News"; - $this->PageEnvar = "n_var_list_update"; - $this->PageEnvarIndex = 'p'; - - $this->PerPageVarLong = "Perpage_News"; - $this->PerPageShortVar = "Perpage_News_Short"; - $this->AddSortField("News_SortField","News_SortOrder"); - $this->AddSortField("News_SortField2","News_SortOrder2"); - $this->ItemType = TYPE_NEWS; - } - - function GetCountSQL($PermName,$CatId=NULL, $GroupId=NULL, $AdditonalWhere="") - { - $sql = parent::GetCountSQL($PermName,$CatId,$GroupId,$AdditonalWhere); - - if (!IsAdmin()) - { - $sql .= ' AND ('.$this->SourceTable.'.Archived = 0)'; - } - - return $sql; - } - - function SaveNewPage() - { - global $n_var_list; - $n_var_list["p"] = $this->Page; - } - - function GetCurrentArticle() - { - global $objCatList, $n_var_list; - - if(!$this->CurrentItem) - { - $id = $n_var_list["id"]; - if($id) - { - $this->SetCurrentItem($id); - } - else - { - $CurrentCat = $objCatList->CurrentCategoryID(); - $sql = "SELECT NewsId FROM ".$this->tablename." WHERE LeadCatStory=1 AND CategoryId=" . $CurrentCat; - $result = $this->adodbConnection->Execute($sql); - if ($result && !$result->EOF) - { - $this->SetCurrentItem($result->fields["NewsId"]); - } - } - } - return $this->GetCurrentItem(); - } - - function SetCurrentItem() - { - global $n_var_list; - parent::SetCurrentItem($n_var_list["id"]); - } - - function CurrentArticleID() - { - global $n_var_list; - - return (int)$n_var_list["id"]; - } - - function LoadArticles($whereClause, $orderBy, $JoinCats=TRUE,$SkipCount=FALSE,$fix_method='set_first') - { - global $objConfig; - - $this->Clear(); - - if(!$SkipCount) - $this->QueryItemCount=TableCount($this->SourceTable,$whereClause,$JoinCats); - - return $this->Query_List($whereClause, $orderBy,$JoinCats,$fix_method); - } - - function CountPending() - { - return TableCount($this->SourceTable,"Status=".STATUS_PENDING,0); - } - - function GetAdminPageLinkList($url) - { - global $objConfig, $n_var_list_update, $var_list_update, $var_list; - - if(strlen($this->PerPageVar)==0) - $this->PerPageVar = "Perpage_News"; - - $PerPage = $objConfig->Get($this->PerPageVar); - if($PerPage<1) - $PerPage=20; - - $NumPages = ceil($this->GetNumPages($PerPage)); - - //echo $this->CurrentPage." of ".$NumPages." Pages"; - - $o = ""; - if($this->Page>$NumPages) - $this->Page=$NumPages; - - $StartPage = $this->Page - 5; - if($StartPage<1) - $StartPage=1; - $EndPage = $StartPage+9; - if($EndPage>$NumPages) - { - $EndPage = $NumPages; - $StartPage = $EndPage-9; - if($StartPage<1) - $StartPage=1; - } - - $o = ""; - - if($StartPage>1) - { - $n_var_list_update["p"] = $this->Page-10; - $prev_url = $url."?env=".BuildEnv(); - $o .= "<<"; - } - - - for($p=$StartPage;$p<=$EndPage;$p++) - { - if($p!=$this->Page) - { - $n_var_list_update["p"]=$p; - $href = $url."?env=".BuildEnv(); - $o .= " $p "; - } - else - { - $o .= "$p"; - } - } - if($EndPage<$NumPages) - { - $n_var_list_update["p"]=$this->Page+10; - $next_url = $url."?env=".BuildEnv(); - $o .= " >>"; - } - unset($n_var_list_update["p"]); - return $o; - } - - function &Add_News($CategoryId, $Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New=2, $Pop=2, $Hot=2, $Rating=0, $Votes=0, $Hits=0, $LeadStory=0, - $LeadCatStory=0,$Priority=0,$CreatedBy="",$Format=0, $auto_filename = 1, $filename = '') - { - global $objSession; - - if($CreatedBy == '') $CreatedBy = $objSession->Get("PortalUserId"); - - $n = new clsNews(NULL); - $filename = $n->StripDisallowed($filename); - - $n->tablename = $this->SourceTable; - $n->Set(array("Title", "Excerpt", "Author", "Body", "CreatedOn", "EndOn", "StartDate", - "Status", "EditorsPick", "NewItem","PopItem","HotItem","CachedRating","CachedVotesQty","Hits", - "LeadStory", "LeadCatStory","Priority","CreatedById","TextFormat", 'AutomaticFilename', 'Filename'), - array($Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New, $Pop, $Hot, $Rating, $Votes, $Hits, - $LeadStory, $LeadCatStory,$Priority,$CreatedBy,$Format, $auto_filename, $filename) ); - $n->Create(); - $ci_table = $objSession->GetEditTable( GetTablePrefix().'CategoryItems' ); - $n->AddToCategory($CategoryId, $ci_table, 1); - - $n->SendUserEventMail("ARTICLE.ADD",$CreatedBy); - $n->SendAdminEventMail("ARTICLE.ADD"); - return $n; - } - - function &Edit_News($NewsId, $Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New, $Pop, $Hot, $Rating, $Votes, $Hits,$CreatedBy,$LeadStory=0, - $LeadCatStory=0, $Priority=0, $Format=0, $auto_filename = 1, $filename = '') - { - global $objSession; - - $n = $this->GetItem($NewsId); - $filename = $n->StripDisallowed($filename); - - $n->Set(array("Title", "Excerpt", "Author", "Body", "CreatedOn", "EndOn", "StartDate", - "Status", "EditorsPick", "NewItem","PopItem","HotItem","CachedRating","CachedVotesQty", - "Hits", "LeadStory", "LeadCatStory", "Priority","CreatedById","TextFormat", - 'AutomaticFilename', 'Filename'), - array($Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New, $Pop, $Hot, $Rating, $Votes, $Hits, - $LeadStory, $LeadCatStory, $Priority,$CreatedBy,$Format, $auto_filename, $filename) ); - $n->Update(); - $n->SendUserEventMail("ARTICLE.MODIFY",$objSession->Get("PortalUserId")); - $n->SendAdminEventMail("ARTICLE.MODIFY"); - return $n; - } - - function GetJoinedSQL($PermName, $CatId=NULL, $AdditionalWhere="", $LoadOnlyPrimary = true) - { - $sql = parent::GetJoinedSQL($PermName,$CatId,$AdditionalWhere, $LoadOnlyPrimary); - $today = adodb_date("U"); - $t = $this->SourceTable; - $where ="(($t.StartDate<$today OR $t.StartDate=0) AND ($t.EndOn>$today OR $t.EndOn=0))"; - $sql .= " AND ".$where; - return $sql; - -// echo $sql; - } - - function LoadListCategory($attribs=array()) - { - global $objCatList, $objSession, $objConfig, $content_set; - - $t = $this->SourceTable; - $sql = "SELECT ".$this->SourceTable.".*,CachedNavbar,".GetTablePrefix()."Category.CategoryId as CategoryId FROM ".$this->SourceTable." "; - - $this->Clear(); - $catid=$attribs["_catid"]; - if(!is_numeric($catid)) - $catid = (int)$objCatList->CurrentCategoryID(); - - $where = $t.".Status=1 "; - if(strlen($attribs["_catlead"])) - { - switch($attribs["_catlead"]) - { - case "exclusive": - $where .= " AND $t.LeadCatStory=1"; - $orderby = " $t.CreatedOn DESC "; - break; - case "inclusive": - $orderby = " $t.CreatedOn DESC "; - break; - case "primary": - $orderby = " $t.LeadCatStory DESC"; - break; - } - } - else - { - $orderby = "$t.CreatedOn DESC "; - } - if((int)$attribs["_archived"]) - { - $where .= " AND $t.archived=1"; - } - else - $where .= " AND $t.archived=0"; - - $sql .= $this->GetJoinedSQL("NEWS.VIEW",$catid,$where, false); - if(!strlen($orderby)) - { - $orderby = $this->QueryOrderByClause(TRUE,TRUE,TRUE); - $sql .= " ".$orderby; - } - else { - $tmp_orderby = $this->QueryOrderByClause(TRUE,TRUE,TRUE); - if (strlen($tmp_orderby)) { - $sql .= $tmp_orderby; - } - else { - $sql .= " ORDER BY ".$orderby; - } - } - //echo $sql."

"; - $this->QueryItemCount = QueryCount($sql); - $this->Query_Item($sql); - } - - function LoadLeadStories($attribs=array()) - { - global $objItemTypes,$objPermissions, $objSession, $objConfig; - - $acl = $objSession->GetACLClause(); - $this->Clear(); - $ntable = $this->SourceTable; - $catitems = GetTablePrefix()."CategoryItems"; - $cattable = GetTablePrefix()."Category"; - $ptable = GetTablePrefix()."PermCache"; - - $sql = "SELECT $ntable.*,$cattable.CategoryId,$cattable.CachedNavbar FROM $ntable "; - $sql .= $this->GetJoinedSQL("NEWS.VIEW",NULL,"LeadStory=1 AND Archived=0 AND ".$this->SourceTable.".Status=1"); - $sql .= "ORDER BY EditorsPick DESC, Priority DESC"; - if(strlen(trim($objConfig->Get("News_SortField")))) - { - $OrderBy = trim($objConfig->Get("News_SortField")." ".$objConfig->Get("News_SortOrder")); - $sql .= ", ".$OrderBy; - } - if($objSession->HasSystemPermission("DEBUG.LIST")) - echo htmlentities($sql,ENT_NOQUOTES)."
\n"; - - if (is_numeric($attribs["_maxcount"]) && (int)$attribs["_maxcount"]>0) - $ret = $this->Query_Item($sql, "LIMIT ".$attribs["_maxcount"]); - else - $ret = $this->Query_Item($sql); - - return $ret; - } - - function GetNewValue($CategoryId=NULL) - { - global $NewValues,$objConfig, $objSystemCache; - - if(is_numeric($NewValues["news"])) - { - return $NewValues["news"]; - } - else - { - $CachedValue = $objSystemCache->GetValue("NewsNewValue","innews",""); - if(strlen($CachedValue)) - { - $NewValues["news"] = $CachedValue; - return $CachedValue; - } - - $ado = &GetADODBConnection(); - if ($CategoryId) - { - $days = (int)$objConfig->Get("News_CatNewDays"); - $cutoffdate = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d")-$days,adodb_date("Y")); - $sql = "SELECT CreatedOn FROM ".GetTablePrefix()."News INNER JOIN ".GetTablePrefix()."CategoryItems AS cat ON (".GetTablePrefix()."News.ResourceId = cat.ItemResourceId) WHERE cat.CategoryId=$CategoryId AND CreatedOn>=$cutoffdate ORDER BY CreatedOn DESC "; - } - else - { - $days = (int)$objConfig->Get("News_CatNewDays"); - $cutoffdate = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d")-$days,adodb_date("Y")); - $sql = "SELECT CreatedOn FROM ".GetTablePrefix()."News WHERE CreatedOn>=$cutoffdate ORDER BY CreatedOn DESC "; - } - $rs = $ado->Execute($sql); - - $NewValues["news"] = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d")-$days,adodb_date("Y")); - - while($rs && !$rs->EOF) - { - $NewValues["news"] = $rs->fields["CreatedOn"]; - $rs->MoveNext(); - } - return $NewValues["news"]; - } - } - - function GetPopValue() - { - global $PopValues, $objConfig, $objSystemCache; - - if(is_numeric($PopValues['news'])) - { - return $PopValues['news']; - } - else - { - $PopValues['news'] = $objConfig->Get('News_TopCount'); - /*$CachedValue = $objSystemCache->GetValue("NewsPopValue","innews",""); - if(strlen($CachedValue)) - { - $PopValues["news"] = $CachedValue; - return $CachedValue; - } - $ado = &GetADODBConnection(); - $sql = "SELECT CachedRating FROM ".GetTablePrefix()."News WHERE CachedVotesQty > ".(int)$objConfig->Get("News_MinVotes")." ORDER BY CachedRating DESC,CachedVotesQty DESC LIMIT 0,".(int)$objConfig->Get("News_VotesToHot"); - $rs = $ado->Execute($sql); - $PopValues["news"] = 0; - while($rs && !$rs->EOF) - { - //echo $rs->fields["CachedRating"]."
"; - $PopValues["news"] = $rs->fields["CachedRating"]; - $rs->MoveNext(); - }*/ - $objSystemCache->EditCacheItem('NewsPopValue',$PopValues['news'],'innews',adodb_mktime()+3600,''); - return $PopValues['news']; - } - } - - function GetHotValue() - { - global $objConfig; - - static $cached_value = null; - - if (!isset($cached_value)) { - $ado =& GetADODBConnection(); - $sql = 'SELECT Hits - FROM '.GetTablePrefix().'News - ORDER BY Hits DESC LIMIT 0,'.$objConfig->Get('News_VotesToHot'); - $rs = $ado->Execute($sql); - - $cached_value = 0; - while ($rs && !$rs->EOF) { - if ($rs->fields['Hits'] > 0) { - $cached_value = $rs->fields['Hits']; - } - $rs->MoveNext(); - } - } - - return $cached_value; - } -} - -function News_Custom($ResourceId, $tag) -{ - $adodbConnection = &GetADODBConnection(); - - $fieldname= substr($tag, 7); - - $sql = "SELECT Value FROM ".GetTablePrefix()."CustomMetaData LEFT JOIN ".GetTablePrefix()."CustomField USING (CustomFieldId) where ".GetTablePrefix()."CustomMetaData.ResourceId=$ResourceId AND ".GetTablePrefix()."CustomField.FieldName='$fieldname'"; - - $result = $adodbConnection->Execute($sql); - - if ($result->EOF) - return ""; - else - return $result->fields[0]; - -} - - - -?> Index: branches/unlabeled/unlabeled-1.33.2/in-news/news.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.33.2/in-news/news.php (revision 12747) +++ branches/unlabeled/unlabeled-1.33.2/in-news/news.php (revision 0) @@ -1,1105 +0,0 @@ -clsCatItem(TRUE); - $this->tablename=GetTablePrefix()."News"; - $this->type=TYPE_NEWS; - $this->Prefix = 'n'; - $this->BasePermission="NEWS"; - $this->id_field = "NewsId"; - $this->TagPrefix="article"; - $this->TitleField = 'Title'; - if(isset($NewsId)) - $this->LoadFromDatabase($NewsId); - if($objSession->HasSystemPermission("DEBUG.ITEM")) - { - $this->SetDebugLevel(1); - } - - /* keyword highlighting */ - $this->OpenTagVar = "News_Highlight_OpenTag"; - $this->CloseTagVar = "News_Highlight_CloseTag"; - - } - - - function Validate() - { - global $objSession, $Errors; - - $dataValid = true; - if(!strlen($this->Get("Title"))) - { - $Errors->AddError("error.fieldIsRequired",'Name',"","",get_class($this),"Validate"); - $dataValid = false; - } - - if(!(int)($this->Get("CreatedOn"))) - { - $Errors->AddError("error.fieldIsRequired",'CreatedOn',"","",get_class($this),"Validate"); - $dataValid = false; - } - return $dataValid; - } - - - function SetNewItem() - { - global $objConfig; - - $value = $this->Get("CreatedOn"); - - $cutoff = adodb_date("U") - ($objConfig->Get("News_NewDays") * 86400); - $this->IsNew = FALSE; - if($value>$cutoff) - $this->IsNew = TRUE; - return $this->IsNew; - } - - function SetPopItem() - { - global $objConfig, $objArticleList; - - $cutoff = $objArticleList->GetPopValue(); - $this->IsPop = FALSE; - if($cutoff>0) - { - if($this->Get('CachedRating') >= $cutoff - && $this->Get('CachedVotesQty') >= $objConfig->Get('News_MinPopVotes')) - { - $this->IsPop = TRUE; - } - } - return $this->IsPop; - } - - function SetHotItem() - { - global $objConfig, $objArticleList; - - $this->IsHot = FALSE; - $cutoff = $objArticleList->GetHotValue(); - if($cutoff>0) - { - if($this->Get("Hits")>=$cutoff) - $this->IsHot = TRUE; - } - return $this->IsHot; - } - - function Approve() - { - if($this->Get("Status")==-2) - { - $this->SendUserEventMail("ARTICLE.MODIFY.APPROVE",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.MODIFY.APPROVE"); - } - else - { - $this->SendUserEventMail("ARTICLE.APPROVE",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.APPROVE"); - } - $this->Set("Status", 1); - $this->Update(); - } - - function Deny() - { - if($this->Get("Status")==-2) - { - $this->SendUserEventMail("ARTICLE.DENY.PENDING",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.DENY.PENDING"); - } - else - { - $this->SendUserEventMail("ARTICLE.DENY",$this->Get("CreatedById")); - $this->SendAdminEventMail("ARTICLE.DENY"); - } - $this->Set("Status", 0); - $this->Update(); - } - - function LoadFromDatabase($Id) - { - global $Errors; - - if(!isset($Id)) - { - $Errors->AddError("error.AppError",NULL,'Internal error: LoadFromDatabase id',"",get_class($this),"LoadFromDatabase"); - return false; - } - - $sql = sprintf("SELECT * FROM ".$this->tablename." WHERE ".$this->IdField()." = '%s'", $Id); - $result = $this->adodbConnection->Execute($sql); - if ($result === false) - { - $Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"LoadFromDatabase"); - return false; - } - - $data = $result->fields; - if(is_array($data)) - $this->SetFromArray($data); - $this->Clean(); - } - function LoadFromResourceId($Id) - { - global $objSession, $Errors; - if(!isset($Id)) - { - $Errors->AddError("error.AppError",NULL,'Internal error: LoadFromDatabase id',"",get_class($this),"LoadFromResourceId"); - return false; - } - $sql = sprintf("SELECT * FROM ".$this->tablename." WHERE ResourceId = '%s'",$Id); - $result = $this->adodbConnection->Execute($sql); - if ($result === false) - { - $Errors->AddError("error.DatabaseError",NULL,$adodbConnection->ErrorMsg(),"",get_class($this),"LoadFromResourceId"); - return false; - } - $data = $result->fields; - if(is_array($data)) - { - $this->SetFromArray($data); - $this->Clean(); - } - return TRUE; - } - - function GetGroupIcon() - { - $ret = "groupicons/".$this->m_GroupId.".gif"; - return $ret; - } - - function StatusIcon() - { - global $rootURL; - - $ret = $rootURL."/in-news/admin/images/"; - - switch($this->Get("Status")) - { - case STATUS_DISABLED: - $ret .= "icon16_article_disabled.gif"; - break; - case STATUS_PENDING: - $ret .= "icon16_article_pending.gif"; - break; - case STATUS_ACTIVE: - $img = "icon16_article.gif"; - if($this->IsPopItem()) - $img = "icon16_article_pop.gif"; - if($this->IsHotItem()) - $img = "icon16_article_hot.gif"; - if($this->IsNewItem()) - $img = "icon16_article_new.gif"; - if($this->Is("EditorsPick")) - $img = "icon16_article_pick.gif"; - $ret .= $img; - break; - } - return $ret; - } - - function ItemURL($Template=NULL,$SetCat=FALSE,$Action=NULL) - { - global $var_list_update,$var_list,$n_var_list_update,$m_var_list_update; - - $url_params = Array(); - $var_list_update["t"] = $Template ? $Template : $var_list["t"]; - -// if($SetCat) -// { - $cat = $this->Get("CategoryId"); - if( !is_numeric($cat) ) $cat = $this->GetPrimaryCategory(); - $m_var_list_update["cat"] = $cat; -// } - - $n_var_list_update["id"] = $this->Get("NewsId"); - - if( isset($Action) && $Action ) $url_params['Action'] = $Action; - - $ret = HREF_Wrapper('', $url_params); - unset($n_var_list_update["id"], $var_list_update["t"],$m_var_list_update["cat"]); - return $ret; - } - - function ParseObject($element) - { - global $objConfig, $objCatList, $var_list_update, $var_list, $n_var_list_update, $m_var_list_update, $objSession, $objUsers; - - $extra_attribs = ExtraAttributes($element->attributes); - if(strtolower($element->name)==$this->TagPrefix) - { - $field = strtolower($element->attributes["_field"]); - switch($field) - { - case "excerpt": - /* - @field:article.excerpt - @description Returns the artcle excerpt - */ - $ret = $this->HighlightField("Excerpt"); - break; - case "body": - /* - @field:article.body - @description:The main body of the article - @attrib:_parsed:bool:If set, HTML and In-Portal tags in the body are preserved, otherwise they are escaped - */ - $this->Increment("Hits", true); - $parsed = $element->attributes["_parsed"]; - if($parsed) - { - $body = inp_unescape($this->Get("Body")); - $body = $this->HighlightText($body); - if($this->Get("TextFormat")!=1) - { - $body = nl2br($body); - } - $ret = $this->ParseTemplateText($body); - } - else - $ret = inp_unescape($this->Get("Body")); - $ret = $this->HighlightText($ret); - break; - case "title": - /* - @field:article.title - @description: Article Title (headline) - */ - $ret = $this->HighlightField("Title"); - break; - case "author": - /* - @field:article.author - @description:text by-line of the article - */ - $ret = $this->HighlightField("Author"); - break; - case "createdby": - /* - @field:article.createdby - @description:parse a user field of the user that created the article - @attrib:_usertag::User field to return (defaults to login ID) - */ - $field = $element->attributes["_usertag"]; - if(!strlen($field)) - { - $field = "user_login"; - } - - $userId = $this->Get("CreatedById"); - if (!empty($userId) && ($userId > 0)) - { - $u =& $objUsers->GetItem($userId); - if (is_object($u)) - { - $ret = $u->parsetag($field); - } - } - else - $ret = " "; - break; - case "date": - /* - @field:article.date - @description:Returns the date/time the article was created - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - $d = $this->Get("CreatedOn"); - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - case "modified": - /* - @field:article.modified - @description:Returns the date/time the article was last modified - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - $d = $this->Get("Modified"); - if($d<=0) - $d = $this->Get("CreatedOn"); - - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - - case "enddate": - /* - @field:article.enddate - @description:Returns the date/time the article is to be archived - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - $d = $this->Get("EndOn"); - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - /* - @field:article.startdate - @description:Returns the date/time the article is to begin being displayed - @attrib:_tz:bool:Convert the date to the user's local time - @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ - case "startdate": - $d = $this->Get("StartDate"); - $ret = $this->ParseTimeStamp($d,$element->attributes); - break; - case "add_favorite_link": - /* - @field:article.add_favorite_link - @description:Returns a URL to add this article to the user's favorites - @attrib:_template:tpl:Template URL should point to - */ - if($objSession->HasCatPermission("FAVORITES")) - { - $t = $element->attributes["_template"]; - if(!strlen($t)) - $t = $var_list["t"]; - $ret = $this->ItemURL($t,FALSE,"n_add_favorite"); - } - else - { - $t = $element->attributes["_errortemplate"]; - if(!strlen($t)) - $t = "favorite_error.tpl"; - $ret = $this->ItemURL($t,FALSE,""); - } - break; - case "del_favorite_link": - /* - @field:article.del_favorite_link - @description:Returns a URL to remove this article from the user's favorites - @attrib:_template:tpl:Template URL should point to - */ - if($objSession->HasCatPermission("FAVORITES")) - { - $t = $element->attributes["_template"]; - if(!strlen($t)) - $t = $var_list["t"]; - $ret = $this->ItemURL($t,FALSE,"n_del_favorite"); - } - else - { - $t = $element->attributes["_errortemplate"]; - if(!strlen($t)) - $t = "favorite_error.tpl"; - $ret = $this->ItemURL($t,FALSE,""); - } - break; - /* - @field:article.favorite_toggle - @description: Returns a link to set or reset the favorite flag for the current user - @attrib: _template:tpl:Template to link to if user has the FAVORITES permission (defaults to current template) - @attrib: _denytemplate:tpl: Template to link to if user does not have favorites permission (ie Guest) Defaults to current template - @attrib: _addlabel:lang:Language tag to display if link is to add favorite - @attrib: _addimage::Image url to include in link if adding favorite - @attrib: _dellabel:lang:Language tag to display if item is already a favorite - @attrib: _delimage::Image url to include in link if removing the favorite - */ - case "favorite_toggle": - $catid = $this->GetPrimaryCategory(); - $t = $element->attributes["_template"]; - if(!strlen($t)) - $t = $var_list["t"]; - if($objSession->HasCatPermission('FAVORITES', $catid)) - { - if(!$this->IsFavorite($objSession->Get("PortalUserId"), $this->GetPrimaryCategory())) - { - $action = "n_add_favorite"; - $label = $element->attributes["_addlabel"]; - } - else - { - $action = "n_del_favorite"; - $label = $element->attributes["_dellabel"]; - } - } - else - { - $action=""; - $label = $element->attributes["_addlabel"]; - $t = $element->attributes["_errortemplate"]; - if(!strlen($t)) - $t = "favorite_error.tpl"; - } - $ret = "ItemURL($t,FALSE,$action)."\">".language($label).""; - break; - - /* - @field:article.hits - @description:Returns number of hits for item - */ - case "hits": - $ret=round($this->Get("Hits")); - break; - - -/* - @field:article.link - @description:Returns a URL setting the link to the article - @attrib:_template:tpl:Template URL should point to -*/ -/* - @field:article.cat_link - @description:Returns a URL setting the article to the current article and the article's category to the current category - @attrib:_template:tpl:Template URL should point to -*/ -/* - @field:article.category - @description:Return a category field from the article's category - @attrib:_cattag::Category field to parse -*/ -/* - @field:article.reviews - @description:Return the number of reviews for the article - @attrib:_today:bool:Count reviews added today only -*/ -/* - @field:article.new - @description:returns text if article's status is "new" - @attrib:_label:lang: Text to return if status is new -*/ -/* - @field:article.pop - @description:returns text if article's status is "popular" - @attrib:_label:lang: Text to return if status is popular -*/ -/* - @field:article.hot - @description:returns text if article's status is "hot" - @attrib:_label:lang: Text to return if status is "hot" -*/ -/* - @field:article.pick - @description:returns text if article's status is "hot" - @attrib:_label:lang: Text to return if status is "hot" -*/ -/* - @field:article.rating - @description:Displays the article rating - @attrib:_displaymode:: How the rating should be displayed
-
    -
  • "Numerical": Show the decimal value -
  • "Text": Show the text version -
  • "Graphical":Show images representing the rating -
- @attrib:_onimage::on image tick shown in graphical display mode - @attrib:_offimage::off image tick shown in graphical display mode - @attrib:_separator::In graphical display mode, this html is placed between each tick image -*/ -/* - @field:article.custom - @description:Returns a custom field - @attrib:_customfield::field name to return - @attrib:_default::default value -*/ -/* - @field:article.fullpath - @description:The full category path of the item -*/ -/* - @field:article.relevance - @description:Displays the article relevance in search results - @attrib:_displaymode:: How the relevance should be displayed
-
    -
  • "Numerical": Show the decimal value -
  • "Bar": Show the HTML representing the relevance. Returns two HTML cells ≶td< with specified background colors -
  • "Graphical":Show image representing the relevance -
- @attrib:_onimage::Zero relevance image shown in graphical display mode. Also used as prefix to build other images (i.e. prefix+"_"+percentage+".file_extension" - @attrib:_OffBackGroundColor::Off background color of HTML cell in bar display mode - @attrib:_OnBackGroundColor::On background color of HTML cell in bar display mode -*/ - - } - if(!isset($ret) || !strlen($ret)) - $ret = parent::ParseObject($element); - } - else - { - $ret = $this->parsetag($element->name); - } - return $ret; - } - - - function parsetag($tag) - { - global $n_var_list, $var_list, $n_var_list_update, $var_list_update, $objConfig; - - $tagname = $tag; - - switch($tagname) - { - case "article_category": - return $this->Get("CategoryId"); - break; - case "article_id": - return $this->Get("NewsId"); - break; - case "article_title": - return inp_unescape($this->Get("Title")); - break; - case "article_excerpt": - return inp_textarea_unescape($this->Get("Excerpt")); - break; - case "article_author": - return $this->Get("Author"); - break; - case "article_body": - $ret = inp_unescape($this->Get("Body")); - //$ret = $this->ParseTemplateText($body); - return $ret; - break; - case "article_footer": - return inp_textarea_unescape($this->Get("Footer")); - break; - case "article_priority": - return (int)$this->Get("Priority"); - break; - case "article_date": - if ($this->Get('CreatedOn') <= 0) { - return ''; - } - return LangDate($this->Get('CreatedOn'), 0, true); - break; - - case "article_enddate": - if ($this->Get('EndOn') <= 0) { - return ''; - } - return LangDate($this->Get('EndOn'), 0, true); - break; - - case "article_startdate": - if ($this->Get('StartDate') <= 0) { - return ''; - } - return LangDate($this->Get('StartDate'), 0, true); - break; - - case "article_hits": - return $this->Get("Hits"); - break; - case "article_views": - return $this->Get("Hits"); - break; - case "article_rating": - return round($this->Get("CachedRating"),1); - break; - case "article_rating_img": - return "inlink/rating/".RatingImage($this->Get("CachedRating")).".gif"; - break; - case "article_votes": - return $this->Get("CachedVotesQty"); - break; - case "article_pick": - if ($this->Is("EditorsPick")) - return "pick"; - break; - - case "article_new": - if($this->IsNewItem()) - return "new"; - break; - case "article_pop": - if($this->IsPopItem()) - return "pop"; - break; - case "article_hot": - if($this->IsHotItem()) - return "new"; - break; - - case "article_admin_icon": - return $this->StatusIcon(); - break; - - case "article_email_action": - $var_list_update["t"] = "window_close"; - $n_var_list_update["id"] = $this->Get("NewsId"); - $ret = HREF_Wrapper(); - unset($var_list_update["t"],$n_var_list_update["id"]); - return $ret; - break; - case "article_group_icon": - return $this->GetGroupIcon(); - break; - case "article_resourceid": - return $this->Get("ResourceId"); - break; - case "article_rating_txt": - return RatingText($this->Get("CachedRating")); - break; - default: - return "Undefined:$tagname"; - break; - } - } - - function Update($UpdatedBy=NULL,$modificationDate = null) - { - DeleteModuleTagCache('innews'); - return parent::Update($UpdatedBy, $modificationDate); - } - - function Delete () - { - DeleteModuleTagCache('innews'); - return parent::Delete(); - } - - function Create () - { - DeleteModuleTagCache('innews'); - return parent::Create(); - } -} /*clsNews*/ - -class _clsNewsList extends clsCatItemList -{ - function _clsNewsList() - { - $this->clsCatItemList(); - $this->Prefix = 'n'; - $this->classname="clsNews"; - - $this->SetTable('live', GetTablePrefix().'News'); - $this->AdminSearchFields = array("Title","Excerpt","Body","Author"); - $this->BasePermission="NEWS"; - - $this->Page = 1; - $this->PerPageVar = "Perpage_News"; - $this->PageEnvar = "n_var_list_update"; - $this->PageEnvarIndex = 'p'; - - $this->PerPageVarLong = "Perpage_News"; - $this->PerPageShortVar = "Perpage_News_Short"; - $this->AddSortField("News_SortField","News_SortOrder"); - $this->AddSortField("News_SortField2","News_SortOrder2"); - $this->ItemType = TYPE_NEWS; - } - - function GetCountSQL($PermName,$CatId=NULL, $GroupId=NULL, $AdditonalWhere="") - { - $sql = parent::GetCountSQL($PermName,$CatId,$GroupId,$AdditonalWhere); - - if (!IsAdmin()) - { - $sql .= ' AND ('.$this->SourceTable.'.Archived = 0)'; - } - - return $sql; - } - - function SaveNewPage() - { - global $n_var_list; - $n_var_list["p"] = $this->Page; - } - - function GetCurrentArticle() - { - global $objCatList, $n_var_list; - - if(!$this->CurrentItem) - { - $id = $n_var_list["id"]; - if($id) - { - $this->SetCurrentItem($id); - } - else - { - $CurrentCat = $objCatList->CurrentCategoryID(); - $sql = "SELECT NewsId FROM ".$this->tablename." WHERE LeadCatStory=1 AND CategoryId=" . $CurrentCat; - $result = $this->adodbConnection->Execute($sql); - if ($result && !$result->EOF) - { - $this->SetCurrentItem($result->fields["NewsId"]); - } - } - } - return $this->GetCurrentItem(); - } - - function SetCurrentItem() - { - global $n_var_list; - parent::SetCurrentItem($n_var_list["id"]); - } - - function CurrentArticleID() - { - global $n_var_list; - - return (int)$n_var_list["id"]; - } - - function LoadArticles($whereClause, $orderBy, $JoinCats=TRUE,$SkipCount=FALSE,$fix_method='set_first') - { - global $objConfig; - - $this->Clear(); - - if(!$SkipCount) - $this->QueryItemCount=TableCount($this->SourceTable,$whereClause,$JoinCats); - - return $this->Query_List($whereClause, $orderBy,$JoinCats,$fix_method); - } - - function CountPending() - { - return TableCount($this->SourceTable,"Status=".STATUS_PENDING,0); - } - - function GetAdminPageLinkList($url) - { - global $objConfig, $n_var_list_update, $var_list_update, $var_list; - - if(strlen($this->PerPageVar)==0) - $this->PerPageVar = "Perpage_News"; - - $PerPage = $objConfig->Get($this->PerPageVar); - if($PerPage<1) - $PerPage=20; - - $NumPages = ceil($this->GetNumPages($PerPage)); - - //echo $this->CurrentPage." of ".$NumPages." Pages"; - - $o = ""; - if($this->Page>$NumPages) - $this->Page=$NumPages; - - $StartPage = $this->Page - 5; - if($StartPage<1) - $StartPage=1; - $EndPage = $StartPage+9; - if($EndPage>$NumPages) - { - $EndPage = $NumPages; - $StartPage = $EndPage-9; - if($StartPage<1) - $StartPage=1; - } - - $o = ""; - - if($StartPage>1) - { - $n_var_list_update["p"] = $this->Page-10; - $prev_url = $url."?env=".BuildEnv(); - $o .= "<<"; - } - - - for($p=$StartPage;$p<=$EndPage;$p++) - { - if($p!=$this->Page) - { - $n_var_list_update["p"]=$p; - $href = $url."?env=".BuildEnv(); - $o .= " $p "; - } - else - { - $o .= "$p"; - } - } - if($EndPage<$NumPages) - { - $n_var_list_update["p"]=$this->Page+10; - $next_url = $url."?env=".BuildEnv(); - $o .= " >>"; - } - unset($n_var_list_update["p"]); - return $o; - } - - function &Add_News($CategoryId, $Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New=2, $Pop=2, $Hot=2, $Rating=0, $Votes=0, $Hits=0, $LeadStory=0, - $LeadCatStory=0,$Priority=0,$CreatedBy="",$Format=0, $auto_filename = 1, $filename = '') - { - global $objSession; - - if($CreatedBy == '') $CreatedBy = $objSession->Get("PortalUserId"); - - $n = new clsNews(NULL); - $filename = $n->StripDisallowed($filename); - - $n->tablename = $this->SourceTable; - $n->Set(array("Title", "Excerpt", "Author", "Body", "CreatedOn", "EndOn", "StartDate", - "Status", "EditorsPick", "NewItem","PopItem","HotItem","CachedRating","CachedVotesQty","Hits", - "LeadStory", "LeadCatStory","Priority","CreatedById","TextFormat", 'AutomaticFilename', 'Filename'), - array($Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New, $Pop, $Hot, $Rating, $Votes, $Hits, - $LeadStory, $LeadCatStory,$Priority,$CreatedBy,$Format, $auto_filename, $filename) ); - $n->Create(); - $ci_table = $objSession->GetEditTable( GetTablePrefix().'CategoryItems' ); - $n->AddToCategory($CategoryId, $ci_table, 1); - - $n->SendUserEventMail("ARTICLE.ADD",$CreatedBy); - $n->SendAdminEventMail("ARTICLE.ADD"); - return $n; - } - - function &Edit_News($NewsId, $Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New, $Pop, $Hot, $Rating, $Votes, $Hits,$CreatedBy,$LeadStory=0, - $LeadCatStory=0, $Priority=0, $Format=0, $auto_filename = 1, $filename = '') - { - global $objSession; - - $n = $this->GetItem($NewsId); - $filename = $n->StripDisallowed($filename); - - $n->Set(array("Title", "Excerpt", "Author", "Body", "CreatedOn", "EndOn", "StartDate", - "Status", "EditorsPick", "NewItem","PopItem","HotItem","CachedRating","CachedVotesQty", - "Hits", "LeadStory", "LeadCatStory", "Priority","CreatedById","TextFormat", - 'AutomaticFilename', 'Filename'), - array($Title, $Excerpt, $Author, $Body, $CreatedOn, $EndOn, $StartDate, - $Status, $EditorsPick, $New, $Pop, $Hot, $Rating, $Votes, $Hits, - $LeadStory, $LeadCatStory, $Priority,$CreatedBy,$Format, $auto_filename, $filename) ); - $n->Update(); - $n->SendUserEventMail("ARTICLE.MODIFY",$objSession->Get("PortalUserId")); - $n->SendAdminEventMail("ARTICLE.MODIFY"); - return $n; - } - - function GetJoinedSQL($PermName, $CatId=NULL, $AdditionalWhere="", $LoadOnlyPrimary = true) - { - $sql = parent::GetJoinedSQL($PermName,$CatId,$AdditionalWhere, $LoadOnlyPrimary); - $today = adodb_date("U"); - $t = $this->SourceTable; - $where ="(($t.StartDate<$today OR $t.StartDate=0) AND ($t.EndOn>$today OR $t.EndOn=0))"; - $sql .= " AND ".$where; - return $sql; - -// echo $sql; - } - - function LoadListCategory($attribs=array()) - { - global $objCatList, $objSession, $objConfig, $content_set; - - $t = $this->SourceTable; - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - $sql = "SELECT ".$this->SourceTable.".*, ".$ml_formatter->LangFieldName('CachedNavbar')." AS CachedNavbar,".GetTablePrefix()."Category.CategoryId as CategoryId FROM ".$this->SourceTable." "; - - $this->Clear(); - $catid=$attribs["_catid"]; - if(!is_numeric($catid)) - $catid = (int)$objCatList->CurrentCategoryID(); - - $where = $t.".Status=1 "; - if(strlen($attribs["_catlead"])) - { - switch($attribs["_catlead"]) - { - case "exclusive": - $where .= " AND $t.LeadCatStory=1"; - $orderby = " $t.CreatedOn DESC "; - break; - case "inclusive": - $orderby = " $t.CreatedOn DESC "; - break; - case "primary": - $orderby = " $t.LeadCatStory DESC"; - break; - } - } - else - { - $orderby = "$t.CreatedOn DESC "; - } - if((int)$attribs["_archived"]) - { - $where .= " AND $t.archived=1"; - } - else - $where .= " AND $t.archived=0"; - - $sql .= $this->GetJoinedSQL("NEWS.VIEW",$catid,$where, false); - if(!strlen($orderby)) - { - $orderby = $this->QueryOrderByClause(TRUE,TRUE,TRUE); - $sql .= " ".$orderby; - } - else { - $tmp_orderby = $this->QueryOrderByClause(TRUE,TRUE,TRUE); - if (strlen($tmp_orderby)) { - $sql .= $tmp_orderby; - } - else { - $sql .= " ORDER BY ".$orderby; - } - } - //echo $sql."

"; - $this->QueryItemCount = QueryCount($sql); - $this->Query_Item($sql); - } - - function LoadLeadStories($attribs=array()) - { - global $objItemTypes,$objPermissions, $objSession, $objConfig; - - $acl = $objSession->GetACLClause(); - $this->Clear(); - $ntable = $this->SourceTable; - $catitems = GetTablePrefix()."CategoryItems"; - $cattable = GetTablePrefix()."Category"; - $ptable = GetTablePrefix()."PermCache"; - - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - $sql = "SELECT $ntable.*,$cattable.CategoryId,$cattable.".$ml_formatter->LangFieldName('CachedNavbar')." AS CachedNavbar FROM $ntable "; - $sql .= $this->GetJoinedSQL("NEWS.VIEW",NULL,"LeadStory=1 AND Archived=0 AND ".$this->SourceTable.".Status=1"); - $sql .= "ORDER BY EditorsPick DESC, Priority DESC"; - if(strlen(trim($objConfig->Get("News_SortField")))) - { - $OrderBy = trim($objConfig->Get("News_SortField")." ".$objConfig->Get("News_SortOrder")); - $sql .= ", ".$OrderBy; - } - if($objSession->HasSystemPermission("DEBUG.LIST")) - echo htmlentities($sql,ENT_NOQUOTES)."
\n"; - - if (is_numeric($attribs["_maxcount"]) && (int)$attribs["_maxcount"]>0) - $ret = $this->Query_Item($sql, "LIMIT ".$attribs["_maxcount"]); - else - $ret = $this->Query_Item($sql); - - return $ret; - } - - function GetNewValue($CategoryId=NULL) - { - global $NewValues,$objConfig, $objSystemCache; - - if(is_numeric($NewValues["news"])) - { - return $NewValues["news"]; - } - else - { - $CachedValue = $objSystemCache->GetValue("NewsNewValue","innews",""); - if(strlen($CachedValue)) - { - $NewValues["news"] = $CachedValue; - return $CachedValue; - } - - $ado = &GetADODBConnection(); - if ($CategoryId) - { - $days = (int)$objConfig->Get("News_CatNewDays"); - $cutoffdate = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d")-$days,adodb_date("Y")); - $sql = "SELECT CreatedOn FROM ".GetTablePrefix()."News INNER JOIN ".GetTablePrefix()."CategoryItems AS cat ON (".GetTablePrefix()."News.ResourceId = cat.ItemResourceId) WHERE cat.CategoryId=$CategoryId AND CreatedOn>=$cutoffdate ORDER BY CreatedOn DESC "; - } - else - { - $days = (int)$objConfig->Get("News_CatNewDays"); - $cutoffdate = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d")-$days,adodb_date("Y")); - $sql = "SELECT CreatedOn FROM ".GetTablePrefix()."News WHERE CreatedOn>=$cutoffdate ORDER BY CreatedOn DESC "; - } - $rs = $ado->Execute($sql); - - $NewValues["news"] = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d")-$days,adodb_date("Y")); - - while($rs && !$rs->EOF) - { - $NewValues["news"] = $rs->fields["CreatedOn"]; - $rs->MoveNext(); - } - return $NewValues["news"]; - } - } - - function GetPopValue() - { - global $PopValues, $objConfig, $objSystemCache; - - if(is_numeric($PopValues['news'])) - { - return $PopValues['news']; - } - else - { - $PopValues['news'] = $objConfig->Get('News_MinPopRating'); - /*$CachedValue = $objSystemCache->GetValue("NewsPopValue","innews",""); - if(strlen($CachedValue)) - { - $PopValues["news"] = $CachedValue; - return $CachedValue; - } - $ado = &GetADODBConnection(); - $sql = "SELECT CachedRating FROM ".GetTablePrefix()."News WHERE CachedVotesQty > ".(int)$objConfig->Get("News_MinPopVotes")." ORDER BY CachedRating DESC,CachedVotesQty DESC LIMIT 0,".(int)$objConfig->Get("News_MaxHotNumber"); - $rs = $ado->Execute($sql); - $PopValues["news"] = 0; - while($rs && !$rs->EOF) - { - //echo $rs->fields["CachedRating"]."
"; - $PopValues["news"] = $rs->fields["CachedRating"]; - $rs->MoveNext(); - }*/ - $objSystemCache->EditCacheItem('NewsPopValue',$PopValues['news'],'innews',adodb_mktime()+3600,''); - return $PopValues['news']; - } - } - - function GetHotValue() - { - global $objConfig; - - static $cached_value = null; - - if (!isset($cached_value)) { - $ado =& GetADODBConnection(); - $sql = 'SELECT Hits - FROM '.GetTablePrefix().'News - ORDER BY Hits DESC LIMIT 0,'.$objConfig->Get('News_MaxHotNumber'); - $rs = $ado->Execute($sql); - - $cached_value = 0; - while ($rs && !$rs->EOF) { - if ($rs->fields['Hits'] > 0) { - $cached_value = $rs->fields['Hits']; - } - $rs->MoveNext(); - } - } - - return $cached_value; - } -} - -function News_Custom($ResourceId, $tag) -{ - $adodbConnection = &GetADODBConnection(); - - $fieldname= substr($tag, 7); - - $sql = "SELECT Value FROM ".GetTablePrefix()."CustomMetaData LEFT JOIN ".GetTablePrefix()."CustomField USING (CustomFieldId) where ".GetTablePrefix()."CustomMetaData.ResourceId=$ResourceId AND ".GetTablePrefix()."CustomField.FieldName='$fieldname'"; - - $result = $adodbConnection->Execute($sql); - - if ($result->EOF) - return ""; - else - return $result->fields[0]; - -} - - - -?> Index: branches/unlabeled/unlabeled-1.33.2/in-news/admin/install/inportal_data.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.33.2/in-news/admin/install/inportal_data.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.33.2/in-news/admin/install/inportal_data.sql (revision 0) @@ -1,210 +0,0 @@ -INSERT INTO ConfigurationAdmin VALUES ('News_Search_Id', 'la_Text_Search', 'la_prompt_for_Id', 'checkbox', '', '', 1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortField2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 2) AND (IsSystem = 0)', 10.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortOrder2', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_CatNewDays', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 10.05, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 10.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_News_Short', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 10.04, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopRating', 'la_Text_Articles', 'la_fld_News_MinPopRating', 'text', '', '', 10.06, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MaxHotNumber', 'la_Text_Articles', 'la_fld_News_MaxHotNumber', 'text', '', '', 10.08, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ShowPick', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 10.1, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_Archive', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10.09, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.01, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.01, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviews2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_common_ReviewText,date=la_common_CreatedOn', 20.02, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_SortReviewsOrder2', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 20.02, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_MinPopVotes', 'la_Text_Articles', 'la_fld_News_MinPopVotes', 'text', '', '', 10.07, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Perpage_NewsReviews_Short', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.03, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Interval', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.12, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_RatingDelay_Value', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', '', 10.12, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Interval', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 10.11, 2, 1); -INSERT INTO ConfigurationAdmin VALUES ('News_ReviewDelay_Value', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', '', 10.11, 1, 1); -INSERT INTO ConfigurationAdmin VALUES ('n_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('n_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 30.02, 0, 0); - -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_articles', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_articles', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_articles', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_articles', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_articles', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1); - -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News', '8', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_PopCount', '4', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ArticleSort', 'CreatedOn desc, Title asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatSort', 'cat_date desc, cat_name asc', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinPopRating', '4', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Archive', '0', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowPick', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_CatNewDays', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ShowMulti', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Admin_Notice_Suggest', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_New', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Approve', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_User_Notice_Modify_Deny', '1', 'inportal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MaxHotNumber', '5', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_MinPopVotes', '20', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Article_Root', '{NewsCatId}', 'In-Portal', '') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_OpenTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'News_Highlight_CloseTag', '', 'In-News', 'in-news:configuration_output') -INSERT INTO ConfigurationValues VALUES (NULL, 'n_CategoryTemplate', 'innews/index', 'In-News', 'in-news:configuration_output'); -INSERT INTO ConfigurationValues VALUES (NULL, 'n_ItemTemplate', 'innews/detail', 'In-News', 'in-news:configuration_output'); - -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Keyword_articles', '90', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Pop_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Rating_articles', '10', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search'); -INSERT INTO ConfigurationValues VALUES (NULL, 'Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search'); - -INSERT INTO Events VALUES (18, 'ARTICLE.ADD', 2, 0, 'In-News', 'la_event_article.add', 1) -INSERT INTO Events VALUES (19, 'ARTICLE.MODIFY', 2, 0, 'In-News', 'la_event_article.modify', 1) -INSERT INTO Events VALUES (20, 'ARTICLE.REVIEW.ADD', 2, 0, 'In-News', 'la_event_article.review.add', 1) -INSERT INTO Events VALUES (21, 'ARTICLE.ADD', 1, 0, 'In-News', 'la_event_article.add', 0) -INSERT INTO Events VALUES (22, 'ARTICLE.APPROVE', 1, 0, 'In-News', 'la_event_article.approve', 0) -INSERT INTO Events VALUES (23, 'ARTICLE.DENY', 1, 0, 'In-News', 'la_event_article.deny', 0) -INSERT INTO Events VALUES (24, 'ARTICLE.MODIFY', 1, 0, 'In-News', 'la_event_article.modify', 0) -INSERT INTO Events VALUES (25, 'ARTICLE.MODIFY.APPROVE', 1, 0, 'In-News', 'la_event_article.modify.approve', 0) -INSERT INTO Events VALUES (26, 'ARTICLE.MODIFY.DENY', 1, 0, 'In-News', 'la_event_article.modify.deny', 0) -INSERT INTO Events VALUES (27, 'ARTICLE.REVIEW.ADD', 1, 0, 'In-News', 'la_event_article.review.add', 0) -INSERT INTO Events VALUES (28, 'ARTICLE.REVIEW.APPROVE', 1, 0, 'In-News', 'la_event_article.review.approve', 0) -INSERT INTO Events VALUES (29, 'ARTICLE.REVIEW.DENY', 1, 0, 'In-News', 'la_event_article.review.deny', 0) -INSERT INTO Events VALUES (44, 'ARTICLE.REVIEW.ADD.PENDING', 1, 0, 'In-News', 'la_event_article.review.add.pending', 0) - -INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article'); - -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.VIEW', 'lu_PermName_News.View_desc', 'lu_PermName_News.View_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.ADD', 'lu_PermName_News.Add_desc', 'lu_PermName_News.Add_desc', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.DELETE', 'lu_PermName_News.Delete_desc', 'lu_PermName_News.Delete_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.MODIFY', 'lu_PermName_News.Modify_desc', 'lu_PermName_News.Modify_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.RATE', 'lu_PermName_News.Rate_desc', 'lu_PermName_News.Rate_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW', 'lu_PermName_News.Review_desc', 'lu_PermName_News.Review_error', 'In-News'); -INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('NEWS.REVIEW.PENDING', 'lu_PermName_News.Review.Pending_desc', 'lu_PermName_News.Review.Pending_error', 'In-News'); - -INSERT INTO SearchConfig VALUES ('News', 'Title', 1, 1, 'lu_fielddesc_news_title', 'lu_field_title', 'In-News', 'la_text_article', 2, 0, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Excerpt', 1, 1, 'lu_fielddesc_news_excerpt', 'lu_field_excerpt', 'In-News', 'la_text_article', 3, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Author', 1, 1, 'lu_fielddesc_news_author', 'lu_field_author', 'In-News', 'la_text_article', 4, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Body', 1, 1, 'lu_fielddesc_news_body', 'lu_field_body', 'In-News', 'la_text_article', 5, 0, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedOn', 0, 1, 'lu_fielddesc_news_createdon', 'lu_field_createdon', 'In-News', 'la_text_article', 6, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EndOn', 0, 1, 'lu_fielddesc_news_endon', 'lu_field_endon', 'In-News', 'la_text_article', 7, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Hits', 0, 1, 'lu_fielddesc_news_hits', 'lu_field_hits', 'In-News', 'la_text_article', 8, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedRating', 0, 1, 'lu_fielddesc_news_cachedrating', 'lu_field_cachedrating', 'In-News', 'la_text_article', 9, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedVotesQty', 0, 1, 'lu_fielddesc_news_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-News', 'la_text_article', 10, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CreatedById', 0, 1, 'lu_fielddesc_news_createdbyid', 'lu_field_createdbyid', 'In-News', 'la_text_article', 11, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Priority', 0, 1, 'lu_fielddesc_news_priority', 'lu_field_priority', 'In-News', 'la_text_article', 12, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Status', 0, 1, 'lu_fielddesc_news_status', 'lu_field_status', 'In-News', 'la_text_article', 13, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'EditorsPick', 0, 1, 'lu_fielddesc_news_editorspick', 'lu_field_editorspick', 'In-News', 'la_text_article', 14, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadStory', 0, 1, 'lu_fielddesc_news_leadstory', 'lu_field_leadstory', 'In-News', 'la_text_article', 15, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'LeadCatStory', 0, 1, 'lu_fielddesc_news_leadcatstory', 'lu_field_leadcatstory', 'In-News', 'la_text_article', 16, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ResourceId', 0, 1, 'lu_fielddesc_news_resourceid', 'lu_field_resourceid', 'In-News', 'la_text_article', 17, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_news_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-News', 'la_text_article', 18, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'StartDate', 0, 1, 'lu_fielddesc_news_startdate', 'lu_field_startdate', 'In-News', 'la_text_article', 19, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewItem', 0, 1, 'lu_fielddesc_news_newitem', 'lu_field_newitem', 'In-News', 'la_text_article', 20, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'PopItem', 0, 1, 'lu_fielddesc_news_popitem', 'lu_field_popitem', 'In-News', 'la_text_article', 21, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'HotItem', 0, 1, 'lu_fielddesc_news_hotitem', 'lu_field_hotitem', 'In-News', 'la_text_article', 22, 0, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Archived', 0, 1, 'lu_fielddesc_news_archived', 'lu_field_archived', 'In-News', 'la_text_article', 23, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'Modified', 0, 1, 'lu_fielddesc_news_modified', 'lu_field_modified', 'In-News', 'la_text_article', 24, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'ModifiedById', 0, 1, 'lu_fielddesc_news_modifiedbyid', 'lu_field_modifiedbyid', 'In-News', 'la_text_article', 25, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'OrgId', 0, 0, 'lu_fielddesc_news_orgid', 'lu_field_orgid', 'In-News', 'la_text_article', 26, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('News', 'NewsId', 0, 1, 'lu_fielddesc_news_newsid', 'lu_field_newsid', 'In-News', 'la_text_article', 0, 0, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('CustomField', 'RssOriginalURL', 1, 0, 'la_fld_RssOriginalURL', 'lu_fld_RssOriginalURL', 'In-News', 'la_section_CustomFields', 0, 283, 1, 'text', '', '', '', '', '', '', 0); - -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireInterval', 'RssExpireInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateInterval', 'RssUpdateInterval', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastUpdated', 'RssLastUpdated', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDeleteExpired', 'RssDeleteExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssOriginalURL', 'lu_fld_RssOriginalURL', 'la_section_CustomFields', 'la_fld_RssOriginalURL', 'label', 'cut_first="100"', 0, 1, 0); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssUpdateIntervalType', 'RssUpdateIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssSource', 'RssSource', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssExpireIntervalType', 'RssExpireIntervalType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpiration', 'RssDefaultExpiration', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssDefaultExpirationType', 'RssDefaultExpirationType', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'RssLastExpired', 'RssLastExpired', 'la_title_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (2, 'RssArticleCRC', 'RssArticleCRC', 'la_section_SystemCF', NULL, 'text', NULL, 0, 0, 1); -INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'n_ItemTemplate', 'n_ItemTemplate', 'la_title_SystemCF', 'n_ItemTemplate', 'text', NULL, 0, 0, 1); - -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, '(*) la_prompt_PopularArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2); -INSERT INTO StatItem VALUES (0, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2); - -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 14, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD.PENDING', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 13, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 11, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('FAVORITES', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId}); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.VIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.ADD', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.DELETE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.MODIFY', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.RATE', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('NEWS.REVIEW.PENDING', 15, 0, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:innews_general.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_output.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_search.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_email.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.add', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-news:configuration_custom.delete', 11, 1, 1, 0); - -INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-News', 'in-news/', 'n', '1.2.2', 1, 2, 'innews/', {NewsCatId}, '1054738405'); \ No newline at end of file Index: branches/unlabeled/unlabeled-1.30.2/in-news/parser.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.30.2/in-news/parser.php (revision 12747) +++ branches/unlabeled/unlabeled-1.30.2/in-news/parser.php (revision 0) @@ -1,1096 +0,0 @@ -\n"; - $str = $objSession->GetVariable("Env_News"); - n_ParseEnv($str); -} - -function n_SaveEnv($str="") -{ - global $objSession; - - $str = $objSession->SetVariable("Env_News",$str); -} - -function n_BuildEnv($dbg=0) -{ - $module_vars = Array('id','p','rp'); - return GenerateModuleEnv('n', $module_vars); -} - -function n_BuildEnv_NEW($dbg=0) -{ - $module_vars = Array('id' => 'n_id', 'p' => 'n_Page', 'rp' => 'n_Reviews_Page'); - return GenerateModuleEnv_NEW('n', $module_vars); -} - -/* - @description: returns the date of the last modification to the news article table - @attrib: _Part:: part of the date to display - @attrib: _local:bool: If set, returns the modified date for the current category (and subcats) - @example: -*/ -function n_article_modified($attribs) -{ - global $objConfig, $objCatList; - $ret=''; - $CachedValue = GetTagCache("innews","n_article_modified",$attribs,""); - if(strlen($CachedValue)) - { - return $CachedValue; - } - - $ado = &GetADODBConnection(); - - if( getArrayValue($attribs,'_local') && $objCatList->CurrentCategoryID() != 0) - { - $c = $objCatList->GetItem($objCatList->CurrentCategoryID()); - $catlist = $c->GetSubCatIds(); - - $catwhere = "CategoryId IN (".explode(",",$catlist).")"; - $sql = "SELECT MAX(Modified) as ModDate,MAX(CreatedOn) as NewDate FROM ".GetTablePrefix()."News "; - $sql .= "INNER JOIN ".GetTablePrefix()."CategoryItems ON (".GetTablePrefix()."News.ResourceId=".GetTablePrefix()."CategoryItems.ItemResourceId) "; - $sql .= "WHERE Status=1 AND $catwhere LIMIT 1"; - } - else - { - $sql = "SELECT MAX(Modified) as ModDate, MAX(CreatedOn) As NewDate FROM ".GetTablePrefix()."News WHERE Status=1 LIMIT 1"; - } - - $rs = $ado->Execute($sql); - if($rs && ! $rs->EOF) - { - $new = $rs->fields["NewDate"]; - $mod = $rs->fields["ModDate"]; - if($new>$mod) - $mod = $new; - - if($mod) - { - $part = strtolower($attribs["_part"]); - $ret=$part?ExtractDatePart($part,$mod):LangDate($mod); - } - } - if($ret) SaveTagCache("innews","n_article_modified",$attribs,"",$ret); - return $ret; -} - -/* - @description: returns a link to the news root category - @attrib: _Category:int: Override the In-News root category - @attrib: _Template:tpl: The template to link to - @example: -*/ -function n_root_link($attribs = array()) -{ - global $objConfig, $n_var_list_update, $objModules; - - //$RootCat = (int)$objConfig->Get("Article_Root"); - $RootCat = $objModules->GetModuleRoot("In-News"); - if($RootCat != -1) - $attribs["_category"] = $RootCat; - $n_var_list_update["p"] = 0; - $n_var_list_update["id"] = 0; - $n_var_list_update["rp"] = 0; - unset($n_var_list_update["p"],$n_var_list_update["id"],$n_var_list_update["rp"]); - $o = m_template_link($attribs); - unset($n_var_list_update["p"],$n_var_list_update["id"],$n_var_list_update["rp"]); - - return $o; -} - -/* not a tag, used to load article lists */ -function LoadArticleList($attribs=array()) -{ - global $objArticleList, $objSession, $n_var_list,$n_var_list_update; - - static $PagingList; - - $ListType = strtolower( getArrayValue($attribs,'_listtype') ); - $force_paging = getArrayValue($attribs,'_forcepaging'); - - if(!strlen($ListType)) $ListType="category"; - $LastList = $objSession->GetVariable("NewsListType"); - $LastShortType = (int)$objSession->GetVariable("NewsShortList"); - - $NoPaging = ( getArrayValue($attribs,'_paging')=='0' | getArrayValue($attribs,'_paging')=='false'); - //echo "Paging: $NoPaging
"; - - if(!$NoPaging && !strlen($PagingList)) - { - $PagingList=$ListType; - } - - //echo "Last: $LastList, Short: $LastShortType Current: $ListType, Short:".$attribs["_shortlist"]." PageList: $PagingList
\n"; - - if($ListType==$PagingList) - { - $objArticleList->EnablePaging = TRUE; - if($LastList != $ListType || $LastShortType != (int)$attribs["_shortlist"]) - { - //echo "Resetting Page..
\n"; - $n_var_list_update["p"] = 0; - $n_var_list["p"]=1; - $objArticleList->Page = 1; - $objSession->SetVariable("NewsListType",$ListType); - $objSession->SetVariable("NewsShortList",(int)$attribs["_shortlist"]); - } - else { - $objArticleList->Page = $n_var_list["p"]; - } - } - else - { - if(is_numeric( getArrayValue($attribs,'_maxcount') )) - { - $objArticleList->MaxListCount = $attribs["_maxcount"]; - } - else - { - $objArticleList->MaxListCount = 10; - } - $objArticleList->EnablePaging = FALSE; - - if ($force_paging == 1) - { - $objArticleList->EnablePaging = TRUE; - $objArticleList->Page = $n_var_list["p"]; - } - } - - $objArticleList->ListType = $ListType; - $objArticleList->Clear(); - - //echo "ListType: $ListType
\n"; - switch($ListType) - { - case "category": - $objArticleList->LoadListCategory($attribs); - break; - case "leadstory": - $objArticleList->LoadLeadStories($attribs); - break; - case "pop": - $objArticleList->LoadPopItems($attribs); - break; - case "hot": - $objArticleList->LoadHotItems($attribs); - break; - case "pick": - $objArticleList->LoadPickItems($attribs); - break; - case "new": - $objArticleList->LoadNewItems($attribs); - break; - case "my_new": - $scope = $objSession->CurrentUser->Vars["LastLogin"]; - $attribs["_scope"] = $scope; - $attribs["_show_since_last"] = 1; - //print_pre($objSession->CurrentUser); - if (is_numeric($scope) && $scope > 0) { - $objArticleList->LoadNewItems($attribs); - } - break; - case "myitems": - $objArticleList->LoadMyItems($attribs); - break; - case "favorites": - $objArticleList->LoadFavorites($attribs); - break; - case "search": - $attribs['multiple'] = 'articles'; - $objArticleList->LoadSearchItems($attribs); - break; - } - -} - -/* - @description: Used in conjuction with n_list_news. This function generates the page navigation - for the list. If this tag is called before the list tag, this function will load - the articles. For that reason, the _ListType attribute is required if the pagnav - tag preceeds the l_list_news tag in the template. Generally, it is good practice to - duplicate all attributes set for n_list_news. - @attrib: _PagesToList:int: Number of pages to list (default is 10) - @attrib: _ShortList:bool: If set, uses the shortlist configuration value for articles - @attrib: _Template:tpl: Template page links should redirect to (defaults to current template) - @attrib: _label:lang: language tag to include in the output if there are pages to list. If there are no pages - listed, this text will not be included (resulting in an empty output) -*/ -function n_news_pagenav($attribs = array()) -{ - global $objArticleList, $objCatList, $objSession, $objConfig; - - $DestTemplate = $attribs["_template"]; - $PagesToList = $attribs["_pagestolist"]; - $image = $attribs["_PageIcon"]; - if(!is_numeric($PagesToList)) - $PagesToList = 10; - - $CatId = $attribs["_catid"]; - if(!is_numeric($CatId)) - $CatId = $objCatList->CurrentCategoryID(); - - if ($attribs['_shortlist'] && $objConfig->Get('Perpage_News_Short') ) { - $objArticleList->PerPageVar = 'Perpage_News_Short'; - } - else { - $objArticleList->PerPageVar = 'Perpage_News'; - } - - $ListType = strtolower($attribs["_listtype"]); - - if(!strlen($ListType)) - $ListType="category"; - - if($objArticleList->ListType != $ListType) - LoadArticleList($attribs); - - $o = $objArticleList->GetPageLinkList($DestTemplate,'',10,true,'', ExtraAttributes($attribs)); - if (strlen($image)) { - $o_i = ' '; - } - if(strlen($o) && strlen($attribs["_label"])) - $o = $o_i.language($attribs["_label"]).' '.$o; - return $o; -} - -/* - @description: Used in conjuction with n_list_news. This function generates a navigation link which is - used to switch from a short list to a longer list. The page number is not changed. - If this tag is called before the list tag, this function will load the article list. - For that reason, the _ListType attribute is required if the pagnav - tag preceeds the n_list_news tag in the template. Generally, it is good practice to - duplicate all attributes set for n_list_news. - @attrib: _root:bool: If set, the current category is set to In-News's root category - @attrib: _text:lang: language tag to include as text for the anchor tag - @attrib: _ShortList:bool: If set, uses the shortlist configuration value for links - @attrib: _plaintext:: plain text to include as text for the anchor tag. The _text attribute takes presedence - if both are included. - @attrib: _image:: URL to an image to include inside the anchor tag. -*/ -function n_link_more($attribs = array()) -{ - global $objArticleList, $objConfig,$n_var_list_update; - - $n_var_list_update['id'] = 0; - - $html_attribs = ExtraAttributes($attribs); - $DestTemplate = $attribs["_template"]; - - if ($attribs['_shortlist'] && $objConfig->Get('Perpage_News_Short') ) { - $objArticleList->PerPageVar = 'Perpage_News_Short'; - } - else { - $objArticleList->PerPageVar = 'Perpage_News'; - } - - $ListType = strtolower($attribs["_listtype"]); - - if(!strlen($ListType)) - $ListType="category"; - - if($objArticleList->ListType != $ListType) - LoadArticleList($attribs); - - if($objArticleList->QueryItemCount > $objConfig->Get($objArticleList->PerPageVar)) - { - if($attribs["_root"]) - { - $url = n_root_link($attribs); - } - else - { - $n_var_list_update["p"]=0; - $url = m_template_link($attribs); - unset($n_var_list_update["p"]); - } - $o = ""; - $text = $attribs["_text"]; - if(!strlen($text)) - { - $text = $attribs["_plaintext"]; - if(!strlen($text)) - { - } - $o .= $text.""; - } - else - $o .= language($text); - if(strlen($attribs["_image"])) - { - $o .= ""; - } - $o .= ""; - } - return $o; -} - -/* - @description: returns a list of news articles - @attrib: _CatId:int: Override the current category - @attrib: _useroot:bool: If set, the current category is changed to In-News's root category - @attrib: _ShortList:bool: If set, the Perpage_News_Short setting is used instead of Perpage_news - @attrib: _Paging:bool: If set to 0 or false, paging will not be allowed for this list (only one paging list is allowed per item type per page load) - @attrib: _maxcount:int: If paging is not used on this list, this value determines how many items to load - @attrib: _ListType::Determines the type of list to generate
- Possible values:
    -
  • Category: List links from the current category (default) -
  • Top: Most Popular & highest rated links -
  • Pop: Most Popular links -
  • New: List new links -
  • Hot: List links with the most click-throughs -
  • Pick: List editor's picks -
  • myitems: List topics created by the current user -
  • favorites: List topics marked as favorites by the current user -
  • search: List search results -
- @attrib: _FirstItemTemplate:tpl: Template used for the first article listed - @attrib: _LastItemTemplate:tpl: Template used for the last article listed - @attrib: _EdItemTemplate:tpl: Editors Pick template used for article list items - @attrib: _ItemTemplate:tpl: default template used for article list items - @example: -*/ -function n_list_news($attribs = array()) -{ - global $objConfig, $objSession, $var_list, $var_list_update, $n_var_list, $n_var_list_update, $objArticleList, $objCatList, $content_set; - - $template = getArrayValue($attribs,'_itemtemplate'); - $force_paging = getArrayValue($attribs,'_forcepaging'); - - if(!strlen($template)) - { - $content_set = 0; - return "ERROR -1"; - } - - if ($attribs['_shortlist'] && $objConfig->Get('Perpage_News_Short') ) { - $objArticleList->PerPageVar = 'Perpage_News_Short'; - } - else { - $objArticleList->PerPageVar = 'Perpage_News'; - } - - $CatId = getArrayValue($attribs,'_catid'); - if(!is_numeric($CatId)) $CatId = $objCatList->CurrentCategoryID(); - - $ListType = strtolower($attribs["_listtype"]); - if(!strlen($ListType)) $ListType="category"; - - if($ListType != "search") - { - $evar = $evar = $_GET["env"]; //m_BuildEnv().$objSession->GetVariable("Env_Link"); - - $tagname = "n_list_news-".$ListType."-".(int)$attribs["_shortlist"]; - $CachedList = GetTagCache("innews",$tagname,$attribs,$evar); - if(strlen($CachedList)) - { - return $CachedList; - } - } - - if(($objArticleList->ListType != $ListType) || ($objCatList->CurrentCategoryID() != $attribs["_catid"]) || $force_paging == 1) - { - LoadArticleList($attribs); - } - if($objArticleList->NumItems()== 0) - { - $content_set = 0; - return ""; - } - - $keywords = $objSession->GetVariable("Search_Keywords"); - - $max_articles = min($objConfig->Get($objArticleList->PerPageVar), $objArticleList->NumItems()); - $articles_showed = 0; //nl - - //$max_articles = $objConfig->Get($objArticleList->PerPageVar); //nl - - foreach($objArticleList->Items as $index => $news) - { - - $objArticleList->CurrentItem = $index; - $parsed = 0; - if($row==0 && strlen($attribs["_firstitemtemplate"])) - { - $o .= $news->ParseTemplate($attribs["_firstitemtemplate"]); - $parsed = 1; - } - if($row==$objArticleList->NumItems()-1 && !$parsed && strlen($attribs["_lastitemtemplate"])>0) - { - $o .= $news->ParseTemplate($attribs["_lastitemtemplate"]); - $parsed = 1; - } - if(!$parsed) - { - if (getArrayValue($attribs, '_editemtemplate') && (int)$news->Get('EditorsPick')) - { - $o .= $news->ParseTemplate($attribs["_editemtemplate"]); - } - else - { - $o .= $news->ParseTemplate($attribs['_itemtemplate']); - } - } - - $articles_showed++; // nl - if($articles_showed == $max_articles) break; //nl - - - } - $objArticleList->SetCurrentItem(); - - if(strlen($o)) { - SaveTagCache("innews",$tagname,$attribs,$evar,$o); - } - - return $o; -} - - - -/* - @description: returns a list of news articles - @attrib: _CatId:int: Override the current category - @attrib: _useroot:bool: If set, the current category is changed to In-News's root category - @attrib: _ShortList:bool: If set, the Perpage_Links_Short setting is used instead of Perpage_links - @attrib: _ListType::Determines the type of list to generate
- Possible values:
    -
  • Category: List links from the current category (default) -
  • Top: Most Popular & highest rated links -
  • Pop: Most Popular links -
  • New: List new links -
  • Hot: List links with the most click-throughs -
  • Pick: List editor's picks -
  • myitems: List topics created by the current user -
  • favorites: List topics marked as favorites by the current user -
  • search: List search results -
- @example: -*/ -function n_list_count($attribs = array()) -{ - global $objCatList, $objArticleList, $objConfig, $objSession; - - if ($attribs['_shortlist'] && $objConfig->Get('Perpage_News_Short') ) { - $objArticleList->PerPageVar = 'Perpage_News_Short'; - } - else { - $objArticleList->PerPageVar = 'Perpage_News'; - } - - $ListType = strtolower($attribs["_listtype"]); - if(!strlen($ListType)) - $ListType="category"; - - if(!$attribs["_today"]) - { - if($objArticleList->ListType != $ListType) - LoadArticleList($attribs); - - $o = 0; - $keywords = $objSession->GetVariable("Search_Keywords"); - if ($keywords || ($_REQUEST['Action']=='m_adv_search')) { -/* foreach ($objArticleList->Items as $cat) { - if (strstr(strip_tags(strtolower($cat->Data['Title'])), strtolower($keywords)) || strstr(strip_tags(strtolower($cat->Data['Body'])), strtolower($keywords)) || strstr(strip_tags(strtolower($cat->Data['Excerpt'])), strtolower($keywords))) { - $o++; - } - } - } - else {*/ - } - $o = $objArticleList->QueryItemCount; - } - else - { - $o = $objArticleList->PerformItemCount($attribs); - } - - if ($o == '') { - $o = 0; - } - return $o; -} - -/* - @description: Parse an article field and return the value - @attrib: _Field:: Article field to parse - @attrib: _ArticleId:int: Article ID to parse (uses current article if not set) -*/ -function n_news_field($attribs = array()) -{ - global $objArticleList; - - $o = ""; - $field = $attribs["_field"]; - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $a = $objArticleList->GetItem($NewsId); - } - else - { - $a = $objArticleList->GetCurrentItem(); - } - if(strlen($field)) - { - if(is_object($a)) - { - - $element = new clsHtmlTag(); - $element->name = $a->TagPrefix; - $element->attributes = $attribs; - $o = $a->ParseObject($element); - } - else - $o = ""; - } - return $o; -} - -/* - @description: Parse an article item template - @attrib: _ItemTemplate:tpl: Article template to parse - @attrib: _ArticleId:: Article ID to parse (uses current article if not set) -*/ -function n_news_detail($attribs = array()) -{ - global $objArticleList,$n_var_list; - - $t = $attribs["_itemtemplate"]; - if(strlen($t)) - { - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $news =& $objArticleList->GetItem($NewsId); - } - else - $news =& $objArticleList->GetItem($n_var_list["id"]); - if(is_object($news)) - { - $o = $news->ParseTemplate($t); - } - } - return $o; -} - -/* - @description: returns the date of the last review for an article - @attrib: _Part:: part of the date to display - @attrib: _ArticleId:int: if set, the link to display the review modified date - @example: -*/ -function n_review_modified($attribs) -{ - global $objConfig, $objArticleList; - - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $a = $objArticleList->GetItem($NewsId); - } - else - $a = $objArticleList->GetCurrentItem(); - if(is_object($a)) - { - $ado = &GetADODBConnection(); - $ResId = $a->Get("ResourceId"); - $sql = "SELECT MAX(CreatedOn) as ModDate FROM ".GetTablePrefix()."ItemReview WHERE ItemId=$ResId AND Status=1 LIMIT 1"; - $rs = $ado->Execute($sql); - if($rs && ! $rs->EOF) - { - $mod = $rs->fields["ModDate"]; - if($mod) - { - $part = strtolower($attribs["_part"]); - if(strlen($part)) - { - $ret = ExtractDatePart($part,$mod); - } - else - { - $ret = LangDate($mod); - } - } - } - } - return $ret; -} - -/* - @description: Returns a list of reviews for an article - @attrib: _ArticleId:int: the link to use (If not set, the current article is used) - @attrib: _ShortList:bool: If set, uses the shortlist configuration value for article reviews - @attrib: _ReviewTemplate:tpl: template used to display the reviews -*/ -function n_list_reviews($attribs = array()) -{ - global $objArticleList,$content_set, $n_var_list; - - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $a =& $objArticleList->GetItem($NewsId); - } - else - $a =& $objArticleList->GetCurrentItem(); - - if(is_object($a)) - { - if($a->ReviewsLoaded()==0) - { - if($attribs["_shortlist"]) - { - $a->ReviewPerPageVar = "Perpage_NewsReviews_Short"; - } - else - { - $a->ReviewPerPageVar = "Perpage_NewsReviews"; - } - $ReviewList =& $a->GetItemReviews($n_var_list["rp"]); - } - else - $ReviewList =& $a->Reviews; - - $o = ""; - $t = $attribs["_reviewtemplate"]; - if($ReviewList->NumItems()>0 && strlen($t)) - { - foreach($ReviewList->Items as $r) - { - $o .= $r->ParseTemplate($t); - $i++; - } - } - } - if(!strlen($o)) - $content_set =0; - return $o; -} - -/* - @description: Used in conjuction with n_list_reviews. This function generates a navigation link which is - used to switch from a short list to a longer list. The page number is not changed. - If this tag is called before the list tag, this function will load the review list. - Any extra HTML attributes are passed to the anchor tag used to create the link. - @attrib: _ArticleId:: If set, the this value is used for a Article ID (default to the current link) - @attrib: _root:bool: If set, the current category is set to In-News's root category - @attrib: _text:lang: language tag to include as text for the anchor tag - @attrib: _Template:tpl: Destination template of More link - @attrib: _plaintext:: plain text to include as text for the anchor tag. The _text attribute takes presedence - if both are included. - @attrib: _ShortList:bool: If set, uses the shortlist configuration value for article reviews - @attrib: _image:: URL to an image to include inside the anchor tag. -*/ -function n_review_more($attribs) -{ - global $objArticleList, $objConfig; - - $html_attribs = ExtraAttributes($attribs); - $DestTemplate = $attribs["_template"]; - - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $a =& $objArticleList->GetItem($NewsId); - } - else - $a =& $objArticleList->GetCurrentItem(); - - if(is_object($a)) - { - if($a->ReviewsLoaded()==0) - { - if($attribs["_shortlist"]) - { - $a->ReviewPerPageVar = "Perpage_NewsReviews_Short"; - } - else - { - $a->ReviewPerPageVar = "Perpage_NewsReviews"; - } - $ReviewList =& $a->GetItemReviews($n_var_list["rp"]); - } - else - $ReviewList =& $a->Reviews; - - if($ReviewList->ItemCount() < $ReviewList->QueryItemCount) - { - if($attribs["_root"]) - { - $url = n_root_link($attribs); - } - else - $url = m_template_link($attribs); - $o = ""; - $text = $attribs["_text"]; - if(!strlen($text)) - { - $text = $attribs["_plaintext"]; - if(!strlen($text)) - { - } - $o .= $text.""; - } - else - $o .= language($text); - if(strlen($attribs["_image"])) - { - $o .= ""; - } - $o .= ""; - } - } - return $o; -} - -/* - @description: Used in conjuction with n_list_reviews. This function generates the page navigation - for the list of reviews. If this tag is called before the list tag, this function will load - the reviews. For that reason, the _ListType attribute is required if the pagnav - tag preceeds the n_list_reviews tag in the template. Generally, it is good practice to - duplicate all attributes set for n_list_reviews. - @attrib: _PagesToList:int: Number of pages to list (default is 10) - @attrib: _Template:tpl: destination template for page links (defaults to current template) - @attrib: _ShortList:bool: If set, uses the shortlist configuration value for article reviews - @attrib: _ArticleId:int: If set, the this value is used for an Article ID (default to the current link) - @attrib: _label:lang: language tag to include in the output if there are pages to list. If there are no pages - listed, this text will not be included (resulting in an empty output) -*/ -function n_review_pagenav($attribs) -{ - global $l_var_list, $n_var_list_update, $objArticleList; - - $DestTemplate = $attribs["_template"]; - $PagesToList = $attribs["_pagestolist"]; - if(!is_numeric($PagesToList)) - $PagesToList = 10; - $NewsId = (int)$attribs["_articleid"]; - if($NewsId) - { - $a =& $objArticleList->GetItem($NewsId); - } - else - $a =& $objArticleList->GetCurrentItem(); - - if(is_object($a)) - { - if($a->ReviewsLoaded()==0) - { - if($attribs["_shortlist"]) - { - $a->ReviewPerPageVar = "Perpage_NewsReviews_Short"; - } - else - { - $a->ReviewPerPageVar = "Perpage_NewsReviews"; - } - $ReviewList =& $a->GetItemReviews($n_var_list["rp"]); - } - else - $ReviewList =& $a->Reviews; - $o = $ReviewList->GetPageLinkList($n_var_list_update,$DestTemplate); - } - if(strlen($o) && strlen($attribs["_label"])) - $o = language($attribs["_label"]).$o; - return $o; -} - - -/* - @description: Returns the number of items related to the current article - @attrib: _ItemId:int: the article to use (If not set, the current article is used) - @attrib: _ItemType:: Name of item to count (ie: _ItemType="Category,Topic") - @example: -*/ -function n_related_count($attribs) -{ - global $objItemTypes, $objArticleList, $content_set; - global $ArticleRelations; - - $id = $attribs["_itemid"]; - $item_type = strtolower($attribs["_itemtype"]); - $count = 0; - if(!is_numeric($id)) - { - $c =& $objArticleList->GetCurrentItem(); - } - else - $c =& $objArticleList->GetItem($id); - - if(is_object($c)) - { - $ResourceId = $c->Get("ResourceId"); - if(!is_object($ArticleRelations)) - { - $ArticleRelations = new clsMultiTypeList(); - LoadRelatedItems($Related, $ArticleRelations,$c->Get("ResourceId")); - } - - if(strlen($attribs["_itemtype"])) - { - $objType = $objItemTypes->GetTypeByName($item_type); - if(is_object($objType)) - { - $TargetType = $objType->Get("ItemType"); - } - else - $TargetType=""; - } - - if($ArticleRelations->NumItems()>0) - { - for($x=0;$x<$ArticleRelations->NumItems();$x++) - { - $a = $ArticleRelations->GetItemByIndex($x); - if($a->type == $TargetType || !strlen($TargetType)) - { - $count++; - } - } - } - } - return $count; -} - -/* - @description: List items related to the current article - @attrib: _ItemId:int: the article to use (If not set, the current article is used) - @attrib: _ListItems:: List of item types to include (ie: _ListItems="Category,Topic") - @attrib: _*Template:none: For each item type lsted in _ListItems, an item type template must be included - (ie: _CategoryTemplate=".." _TopicTemplate="..") - @example: -*/ -function n_related_items($attribs) -{ - global $objItemTypes, $objArticleList, $objCatList, $content_set, $objSession; - static $Related; - - global $ArticleRelations; - -// echo "
"; print_r($ArticleRelations); echo "
"; - $id = $attribs["_itemid"]; - if(!is_numeric($id)) - { - $c =& $objArticleList->GetCurrentItem(); - } - else - $c =& $objArticleList->GetItem($id); - - $data_sent=0; - - if(is_object($c)) - { - $ResourceId = $c->Get("ResourceId"); - $IncludeList = explode(",",trim(strtolower($attribs["_listitems"]))); - $o = ""; - if(!is_object($ArticleRelations)) - { - $ArticleRelations = new clsMultiTypeList(); - LoadRelatedItems($Related, $ArticleRelations,$c->Get("ResourceId")); - } - - if($ArticleRelations->NumItems()>0) - { - for($inc=0;$incGetTypeByName($item_type); - if(is_object($objType)) - { - foreach($ArticleRelations->Items as $item) - { - if(is_object($item)) - { - if(strtolower($objType->Get("ItemName")) == strtolower($item_type) && $item->type==$objType->Get("ItemType")) - { - if(strlen($item->BasePermissionName)) - { - $perm = $item->BasePermissionName.".VIEW"; - $haspem = $objSession->HasCatPermission($perm,$item->Get("CategoryId")); - } - else - $hasperm = 1; - - if($hasperm) - { - $data_sent =1; - $classname = $objType->Get("ClassName"); - if(strlen($classname)) - { - $l = new $classname; - $l->Data = $item->Data; - $o .= $l->ParseTemplate($t); - } - } - } - } - $item = NULL; - } - } - else - echo $item_type." not found
\n"; - } - } - if($data_sent) - { - return $o; - } - else - { - $content_set=0; - return ""; - } - } - else - { - $content_set = 0; - return ""; - } - } - else - { - $content_set = 0; - return ""; - } -} - -/* - @description: Generates the ACTTION property for a FORM tag used by In-Link - @attrib: _Template:tpl: If set, this is the template the form submits to (default is the current template) - @attrib: _Form:: The form name
Possible Values: -
    -
  • n_rate: Form used to rate an article -
  • n_rate_confirm: Confirm for rate article -
  • n_addreview: add a review for an article -
  • n_review_confirm: Review confirmation -
  • n_sort_articles: Sort articles -
  • n_getting_rated: Form for external rating -
- @example:
"> -*/ -function n_form_action($attribs = array()) -{ - global $var_list_update, $var_list, $n_var_list_update, $objSession, $objArticleList; - - $var_list_update['t'] = getArrayValue($attribs, '_template') ? $attribs['_template'] : $var_list['t']; - - if( is_object($objArticleList) && $objArticleList->CurrentItem ) $n_var_list_update['id'] = $objArticleList->CurrentItem; - - $ret = ''; - $form = strtolower( $attribs['_form'] ); - $url_params = Array(); - - switch($form) - { - case 'n_addreview': - if( !$objSession->SessionEnabled() ) - { - $var_list_update['t'] = 'error_session'; - } - else - { - $url_params = Array( 'Action' => 'n_add_review', 'DestTemplate' => $attribs['_finishtemplate'] ); - if ( $objSession->HasCatPermission('NEWS.REVIEW.PENDING') ) - { - $url_params['Confirm'] = $attribs[ getArrayValue($attribs, '_confirmpending') ? '_confirmpending' : '_confirm' ]; - } - - if ( $objSession->HasCatPermission('NEWS.REVIEW') ) - { - $url_params['Confirm'] = $attribs['_confirm']; - } - - $n_var_list_update['id'] = $objArticleList->CurrentItem; - if( !$url_params['Confirm'] ) unset($url_params['Confirm']); - } - break; - - case 'n_review_confirm': - $var_list_update['t'] = getArrayValue($_GET, 'DestTemplate') ? $_GET['DestTemplate'] : $var_list['t']; - $n_var_list_update['id'] = $objArticleList->CurrentItem; - break; - - case 'n_rate': - if( !$objSession->SessionEnabled() ) - { - $var_list_update['t'] = 'error_session'; - } - else - { - $url_params = Array( 'Action' => 'n_rate_news', 'DestTemplate' => $attribs['_finishtemplate'] ); - if ( $objSession->HasCatPermission('NEWS.RATE') && getArrayValue($attribs, '_confirm') ) $url_params['Confirm'] = $attribs['_confirm']; - - $n_var_list_update['id'] = $objArticleList->CurrentItem; - if( getArrayValue($attribs, '_duplicate') ) $url_params['Duplicate'] = $attribs['_duplicate']; - } - break; - - case 'n_getting_rated': - if( !$objSession->SessionEnabled() ) - { - $var_list_update['t'] = 'error_session'; - } - else - { - $url_params = Array( 'Action' => 'n_rate_news', 'DestTemplate' => $attribs['_finishtemplate'] ); - if ( $objSession->HasCatPermission('NEWS.RATE') && getArrayValue($attribs, '_confirm') ) $url_params['Confirm'] = $attribs['_confirm']; - - $n_var_list_update['id'] = $objArticleList->CurrentItem; - $var_list_update['t'] = 'innews/rate'; - - if( getArrayValue($attribs, '_duplicate') ) $url_params['Duplicate'] = $attribs['_duplicate']; - } - break; - - case 'n_rate_confirm': - $var_list_update['t'] = getArrayValue($_GET, 'DestTemplate') ? $_GET['DestTemplate'] : $var_list['t']; - $n_var_list_update['id'] = $objArticleList->CurrentItem; - break; - - case 'n_sort_articles': - $url_params = Array('Action' => 'n_sort_articles'); - break; - - } - - return HREF_Wrapper('', $url_params); -} - -?> Index: branches/unlabeled/unlabeled-1.11.2/in-news/admin/install/inportal_schema.sql =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.11.2/in-news/admin/install/inportal_schema.sql (revision 12747) +++ branches/unlabeled/unlabeled-1.11.2/in-news/admin/install/inportal_schema.sql (revision 0) @@ -1,42 +0,0 @@ -CREATE TABLE News ( - NewsId int(11) NOT NULL auto_increment, - Title varchar(255) NOT NULL default '', - Filename varchar(255) NOT NULL default '', - AutomaticFilename tinyint(3) unsigned NOT NULL default '0', - Excerpt text NOT NULL, - Author varchar(255) NOT NULL default '', - Body text NOT NULL, - CreatedOn int(11) NOT NULL default '0', - TextFormat int(11) NOT NULL default '0', - EndOn int(11) NOT NULL default '0', - Hits double(20,6) NOT NULL default '0.000000', - CachedRating varchar(10) default '0', - CachedVotesQty int(11) NOT NULL default '0', - CreatedById int(11) NOT NULL default '0', - Priority int(11) NOT NULL default '0', - `Status` tinyint(4) NOT NULL default '2', - EditorsPick tinyint(4) NOT NULL default '0', - LeadStory tinyint(4) NOT NULL default '0', - LeadCatStory tinyint(4) NOT NULL default '0', - ResourceId int(11) default NULL, - CachedReviewsQty int(11) NOT NULL default '0', - StartDate int(11) NOT NULL default '0', - NewItem tinyint(4) NOT NULL default '2', - PopItem tinyint(4) NOT NULL default '2', - HotItem tinyint(4) NOT NULL default '2', - Archived int(11) NOT NULL default '0', - Modified int(11) NOT NULL default '0', - ModifiedById int(11) NOT NULL default '0', - OrgId int(11) default NULL, - PRIMARY KEY (NewsId), - UNIQUE KEY ResourceId (ResourceId), - KEY Filename (Filename(5)) -) -# -------------------------------------------------------- -CREATE TABLE NewsCustomData ( - CustomDataId int(11) NOT NULL auto_increment, - ResourceId int(10) unsigned NOT NULL default '0', - KEY ResourceId (ResourceId), - PRIMARY KEY (CustomDataId) -) -# -------------------------------------------------------- \ No newline at end of file Index: branches/unlabeled/unlabeled-1.11.2/in-news/units/articles/articles_event_handler.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.11.2/in-news/units/articles/articles_event_handler.php (revision 12747) +++ branches/unlabeled/unlabeled-1.11.2/in-news/units/articles/articles_event_handler.php (revision 0) @@ -1,317 +0,0 @@ -getObject(); - - if (!$this->Application->IsAdmin()) { - $where_clause = '(Archived = 0) AND (StartDate < '.adodb_mktime().' OR StartDate = 0) AND (EndOn > '.adodb_mktime().' OR EndOn = 0)'; - $object->addFilter('archived_filter', $where_clause); - } - } - - /** - * Return type clauses for list bulding on front - * - * @param kEvent $event - * @return Array - */ - function getTypeClauses(&$event) - { - $types=$event->getEventParam('types'); - $except_types=$event->getEventParam('except'); - $object =& $event->getObject(); - $type_clauses = parent::getTypeClauses($event); - - $type_clauses['site_lead']['include']='%1$s.LeadStory=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; - $type_clauses['site_lead']['except']='%1$s.LeadStory!=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; - $type_clauses['site_lead']['having_filter']=false; - - $type_clauses['cat_lead']['include']='%1$s.LeadCatStory=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; - $type_clauses['cat_lead']['except']='%1$s.LeadCatStory!=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; - $type_clauses['cat_lead']['having_filter']=false; - - return $type_clauses; - } - - - /** - * [REGULAR EVENT] Deletes expired articles + update existing articles from rss feed with new data (key - article url) - * - * @param kEvent $event - */ - function OnUpdateRSSAtricles(&$event) - { - $category_table = $this->Application->getUnitOption('c', 'TableName'); - $custom_table = $this->Application->getUnitOption('c-cdata', 'TableName'); - - $category_custom_fields = $this->getCustomColumns('c'); - $article_custom_fields = $this->getCustomColumns($event->Prefix); - - - // update categories which sould be updated - $sql = 'SELECT cd.*, c.CategoryId - FROM '.$category_table.' c - LEFT JOIN '.$custom_table.' cd ON c.ResourceId = cd.ResourceId - WHERE (cd.'.$category_custom_fields['RssLastUpdated'].' + - cd.'.$category_custom_fields['RssUpdateInterval'].' * cd.'.$category_custom_fields['RssUpdateIntervalType'].' <= - UNIX_TIMESTAMP()) AND (LENGTH('.$category_custom_fields['RssSource'].') > 0)'; - $categories = $this->Conn->Query($sql, 'CategoryId'); - if ($categories) { - $resource_ids = Array(); - foreach ($categories as $category_id => $category_data) { - $resource_ids[] = $category_data['ResourceId']; - $event->setEventParam('source_url', $category_data[ $category_custom_fields['RssSource'] ]); - $event->setEventParam('category_id', $category_id); - $event->setEventParam('custom_fields', $article_custom_fields); - $event->setEventParam('life_time', $category_data[ $category_custom_fields['RssDefaultExpiration'] ] * $category_data[ $category_custom_fields['RssDefaultExpirationType'] ]); - $this->parseRSSFeed($event); - } - - $sql = 'UPDATE '.$custom_table.' - SET '.$category_custom_fields['RssLastUpdated'].' = '.adodb_mktime().' - WHERE ResourceId IN ('.implode(',', $resource_ids).')'; - $this->Conn->Query($sql); - } - - // delete expired articles from feed categories - $sql = 'SELECT c.CategoryId, c.ResourceId - FROM '.$category_table.' c - LEFT JOIN '.$custom_table.' cd ON c.ResourceId = cd.ResourceId - WHERE ( cd.'.$category_custom_fields['RssLastExpired'].' + - cd.'.$category_custom_fields['RssExpireInterval'].' * cd.'.$category_custom_fields['RssExpireIntervalType'].' <= - UNIX_TIMESTAMP()) AND (cd.'.$category_custom_fields['RssDeleteExpired'].' = 1)'; - - $categories = $this->Conn->GetCol($sql, 'ResourceId'); - - $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); - $table = $this->Application->getUnitOption($event->Prefix, 'TableName'); - $ci_table = $this->Application->getUnitOption($event->Prefix.'-ci', 'TableName'); - - if ($categories) { - $article_custom_table = $this->Application->getUnitOption($event->Prefix.'-cdata', 'TableName'); - - $sql = 'SELECT main_table.'.$id_field.' - FROM '.$table.' main_table - LEFT JOIN '.$ci_table.' ci ON main_table.ResourceId = ci.ItemResourceId - LEFT JOIN '.$article_custom_table.' cd ON main_table.ResourceId = cd.ResourceId - WHERE (ci.PrimaryCat = 1) AND - (ci.CategoryId IN ('.implode(',', $categories).')) AND - (main_table.EndOn < '.adodb_mktime().' AND main_table.EndOn <> 0) AND - (LENGTH(cd.'.$article_custom_fields['RssOriginalURL'].') > 0)'; - $article_ids = $this->Conn->GetCol($sql); - if ($article_ids) { - $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); - $temp->DeleteItems($event->Prefix, $event->Special, $article_ids); - } - - $sql = 'UPDATE '.$custom_table.' - SET '.$category_custom_fields['RssLastExpired'].' = '.adodb_mktime().' - WHERE ResourceId IN ('.implode(',', array_keys($categories)).')'; - $this->Conn->Query($sql); - } - } - - /** - * Creates new, updates existing articles from feed url specified - * - * @param kEvent $event - */ - function parseRSSFeed(&$event) - { - $source_urls = explode(',', $event->getEventParam('source_url')); - if (count($source_urls) > 1) { - foreach ($source_urls as $source_url) { - $event->setEventParam('source_url', $source_url); - $this->parseRSSFeed($event); - } - return true; - } - - $xml_data = curl_post($event->getEventParam('source_url'), '', null, 'GET'); - if (!$xml_data) { - return false; - } - - // get previously created feed articles in current category - $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); - $table = $this->Application->getUnitOption($event->Prefix, 'TableName'); - $custom_table = $this->Application->getUnitOption($event->Prefix.'-cdata', 'TableName'); - - $crc_field = $event->getEventParam('custom_fields', 'RssArticleCRC'); - - $sql = 'SELECT main_table.'.$id_field.', cd.'.$crc_field.' - FROM '.$table.' main_table - LEFT JOIN '.$custom_table.' cd ON cd.ResourceId = main_table.ResourceId - WHERE LENGTH(cd.'.$crc_field.') > 0'; - $articles = $this->Conn->GetCol($sql, $crc_field); - $object =& $event->getObject(Array('skip_autoload' => true)); - - $xml_helper =& $this->Application->recallObject('kXMLHelper'); - $root_node =& $xml_helper->Parse($xml_data); - $root_node =& $root_node->FindChild('channel'); - if(!$root_node) { - return false; - } - - $category_id = $event->getEventParam('category_id'); - $backup_category_id = $this->Application->GetVar('m_cat_id'); - $this->Application->SetVar('m_cat_id', $category_id); - - $current_node = $root_node->firstChild; - - do { - // IMAGE is information about channel and is not useful here - if ($current_node->Name != 'ITEM') continue; - // collect item data - $data = Array(); - $sub_node =& $current_node->firstChild; - do { - $data[$sub_node->Name] = $sub_node->Data; - - }while ( ($sub_node =& $sub_node->NextSibling()) ); - - // create/update article - $article_crc = crc32($data['LINK'].$data['TITLE']); - $article_id = getArrayValue($articles, $article_crc); - if ($article_id) { - $object->Load($article_id); - } - else { - $object->Clear(); - } - - $object->SetDBField('Title', $data['TITLE']); - $object->SetDBField('cust_RssOriginalURL', $data['LINK']); - $object->SetDBField('cust_RssArticleCRC', $article_crc); - $object->SetDBField('Body', $data['DESCRIPTION']); - $expiration_time = adodb_mktime() + $event->getEventParam('life_time'); - $object->SetDBField('EndOn_date', $expiration_time); - $object->SetDBField('EndOn_time', $expiration_time); - $object->SetDBField('Status', STATUS_ACTIVE); - $object->SetDBField('Author', 'root'); - $object->SetDBField('CreatedById', -1); - - $status = $object->isLoaded() ? $object->Update() : $object->Create(); - } while (($current_node =& $current_node->NextSibling())); - - $this->Application->SetVar('m_cat_id', $backup_category_id); - } - - function getCustomColumns($prefix) - { - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - - $custom_fields = array_flip($this->Application->getUnitOption($prefix, 'CustomFields')); - foreach ($custom_fields as $custom_name => $custom_id) { - $custom_fields[$custom_name] = $ml_formatter->LangFieldName('cust_'.$custom_id); - } - - return $custom_fields; - } - - /** - * Create missing excerpt - * - * @param kEvent $event - */ - function OnBeforeItemUpdate(&$event) - { - $this->createExcerpt($event); - $this->cacheItemOwner($event, 'CreatedById', 'Author'); - } - - /** - * Create missing excerpt - * - * @param kEvent $event - */ - function OnBeforeItemCreate(&$event) - { - $this->createExcerpt($event); - $this->cacheItemOwner($event, 'CreatedById', 'Author'); - } - - /** - * Create excerpt if missing - * - * @param kEvent $event - */ - function createExcerpt(&$event) - { - $object =& $event->getObject(); - if (!$object->GetDBField('Excerpt') || $this->Application->GetVar('generate_excerpt')) { - $excerpt = strip_tags( $object->GetDBField('Body') ); - - - $length = strlen($excerpt); - if ($length > 100) { - $excerpt = substr(strip_tags($excerpt), 0, 100); - if (substr($excerpt,-1) != ' ') { - $pos = strrpos($excerpt, ' '); - if ($pos) { - $excerpt = substr($excerpt, 0, $pos); - } - } - $excerpt .= '...'; - } - - $object->SetDBField('Excerpt', $excerpt); - } - } - - /** - * [HOOK] Updates category custom fields options in config - * - * @param kEvent $event - */ - function OnUpdateCategoryCustomFields(&$event) - { - $new_virtual_fields = Array( - 'cust_RssSource' => Array('type' => 'string', 'default' => ''), - 'cust_RssDefaultExpiration' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), - 'cust_RssDefaultExpirationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month', 29030400 => 'la_opt_year'), 'default' => 60), - 'cust_RssExpireInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), - 'cust_RssExpireIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60), - 'cust_RssDeleteExpired' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'default' => 0), - 'cust_RssUpdateInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), - 'cust_RssUpdateIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60), - 'cust_RssLastUpdated' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''), - 'cust_RssLastExpired' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''), - ); - $virtual_fields = $this->Application->getUnitOption('c', 'VirtualFields'); - $virtual_fields = array_merge_recursive2($virtual_fields, $new_virtual_fields); - $this->Application->setUnitOption('c', 'VirtualFields', $virtual_fields); - } - - /** - * Sets default expiration based on module setting - * - * @param kEvent $event - */ - function OnPreCreate(&$event) - { - parent::OnPreCreate($event); - - if ($event->status == erSUCCESS) { - $object =& $event->getObject(); - - $archive_days = $this->Application->ConfigValue('News_Archive'); - if ($archive_days) { - $expire_date = adodb_mktime() + $archive_days * 3600 * 24; - $object->SetDBField('EndOn_date', $expire_date); - $object->SetDBField('EndOn_time', $expire_date); - } - } - } - } -?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.9.24/in-news/admin/addreview.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.9.24/in-news/admin/addreview.php (revision 12747) +++ branches/unlabeled/unlabeled-1.9.24/in-news/admin/addreview.php (revision 0) @@ -1,219 +0,0 @@ -SourceTable = $objSession->GetEditTable("News"); -$objEditCat->EnablePaging = FALSE; -//Multiedit init -$en = (int)$_GET["en"]; -$objEditCat->Query_Item("SELECT * FROM ".$objEditCat->SourceTable); -$itemcount=$objEditCat->NumItems(); -$c = $objEditCat->GetItemByIndex($en); - -unset($objEditItems); - -$objEditItems = new clsItemReviewList(); -$objEditItems->SourceTable = $objSession->GetEditTable("ItemReview"); - -if(isset($_POST["itemlist"])) -{ - if(is_array($_POST["itemlist"])) - { - $ReviewId = $_POST["itemlist"][0]; - } - else - { - $ReviewId = $_POST["itemlist"]; - } - $Rev = $objEditItems->GetItem($ReviewId); - $action = "m_review_edit"; -} -else -{ - $Rev = new clsItemReview(); - $Rev->Set("ItemId",$c->Get("ResourceId")); - $Rev->Set("ItemType",2); - $Rev->Set("Status",2); - $Rev->Set("Priority",0); - $Rev->Set("CreatedById",$objSession->Get("PortalUserId")); - $Rev->Set("CreatedOn",adodb_date("U")); - $action = "m_review_add"; -} - -$envar = "env=" . BuildEnv() . "&en=$en"; - -$section = 'in-news:editarticle_review'; - -$ado = &GetADODBConnection(); - - -if(is_numeric($Rev->Get("CreatedById"))) -{ - if($Rev->Get("CreatedById")>0) - { - $u = $objUsers->GetUser($Rev->Get("CreatedById")); - $login_name = $u->Get("Login"); - } - else - $login_name = "root"; -} -else -{ - if($objSession->Get("PortalUserId")>0) - { - $u = $objUsers->Get($objSession->Get("PortalUserId")); - $login_name = $u->Get("CreatedById"); - } - else - $login_name="root"; -} - -$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Article")." '".$c->Get("Title")."' - ".prompt_language("la_tab_Reviews")." by ".$login_name; - -$objListToolBar = new clsToolBar(); -$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_save_review('article','in-news/admin/addarticle_reviews.php',0);",$imagesURL."/toolbar/tool_select.gif"); -$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_save_review('article','in-news/admin/addarticle_reviews.php',-1);",$imagesURL."/toolbar/tool_cancel.gif"); -int_header($objListToolBar,NULL,$title); - -if ($objSession->GetVariable("HasChanges") == 1) { -?> - - - - -
- -
- - - - - > - - - > - - - - - - > - - - - - - - > - - - - - - - - > - - - - - - > - - - - - - > - - - - - > - - - - - "> - "> - "> - "> - - - -
- Get("TextFormat")==1) echo "CHECKED"; ?>> -
- -
- Get("ReviewId"); ?> -  
- - - - - - -  

- - - -
- -
- Get("Status") == 1) echo "checked"; ?>> - Get("Status") == 2) echo "checked"; ?>> - Get("Status") == 0) echo "checked"; ?>> -  
- "> -  
- "> -
- "> -
-
- -
- -
" name="viewmenu"> - - - - -
- - - - Index: branches/unlabeled/unlabeled-1.24.20/in-news/action.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.24.20/in-news/action.php (revision 12747) +++ branches/unlabeled/unlabeled-1.24.20/in-news/action.php (revision 0) @@ -1,523 +0,0 @@ -HasSystemPermission("SYSTEM_ACCESS.READONLY"); - -// Session expiration related - -require_login( !admin_login() && $Action, 'expired=1', true ); - -// End session exipration related - - switch($Action) - { - case "m_cat_delete": - if($ro_perm) break; - if(isset($CatDeleteList)) - { - $CatList = $CatDeleteList; - if(is_array($CatList)) - { - for($i=0;$iClearCategoryItems($c,"CategoryItems"); - } - } - else - if(is_numeric($CatList)) - { - $objArticleList->ClearCategoryItems($CatList,"CategoryItems"); - - } - if(!is_array($CatList)) $CatList=Array($CatList); - UpdateCategoryCount("Article", $CatList, $objArticleList->GetListTypes()); - } - break; - - case "m_paste": /* category paste */ - if($ro_perm) break; - if($PastedCatIds) - { - $cache_cat_ids=Array(); - foreach($PastedCatIds as $SourceCat => $DestCat) - { - $cache_cat_ids[$SourceCat]=1; - $cache_cat_ids[$DestCat]=1; - $objArticleList->Clear(); - $objArticleList->LoadArticles("CategoryId=$SourceCat",""); - if($objArticleList->NumItems()>0) - { - foreach($objArticleList->Items as $item) - { - /* fields from categoryitems table */ - $item->UnsetField("CategoryId"); - $item->UnsetField("ItemResourceId"); - $item->UnsetField("PrimaryCat"); - - $item->CopyToNewResource($DestCat); - $item->AddToCategory($DestCat); - } - } - } - UpdateCategoryCount("Article", array_keys($cache_cat_ids), $objArticleList->GetListTypes()); - } - break; - - case "n_article_delete": - if($ro_perm) break; - if (count($_POST["newslist"]) != 0) - { - $objArticleList->FlushCache($_POST["newslist"]); - foreach($_POST["newslist"] as $newsid) - $objArticleList->Delete_Item($newsid); - } - break; - - case "n_article_move_up": - if($ro_perm) break; - if (isset($_POST["newslist"])) - foreach($_POST["newslist"] as $id) - { - $a = $objArticleList->GetItem($id); - $a->MoveUp(); - } - break; - - case "n_article_move_down": - if($ro_perm) break; - if (isset($_POST["newslist"])) - { - $newslist=array_reverse($_POST["newslist"]); - foreach($newslist as $id) - { - $a = $objArticleList->GetItem($id); - $a->MoveDown(); - } - } - break; - - case "n_article_approve": - if($ro_perm) break; - if (isset($_POST["newslist"])) - { - $cat_ids=Array(); - foreach($_POST["newslist"] as $id) - { - $a = $objArticleList->GetItem($id); - if($a->Get("Status")==-2) - { - $OrgId = $a->Get("OrgId"); - if($OrgId) - { - $org = $objArticleList->GetItem($OrgId); - $OldResId = $org->Get("ResourceId"); - $NewResId = $a->Get("ResourceId"); - //$ExpireInterval = $objConfig->Get("link_ExpireMod_Value") * $objConfig->Get("link_ExpireMod_Interval"); - //if($ExpireInterval>0) - // $l->Set("Expire",adodb_date("U")+$ExpireInterval); - $a->Set("OrgId",0); - $a->Approve(); - $cat_ids[]=$org->GetPrimaryCategory(); - $org->DeleteCustomData(); - $org->Delete(TRUE); - } - } - else - { - $a->Approve(); - $cat_ids[]=$a->GetPrimaryCategory(); - } - } - if($cat_ids) UpdateCategoryCount("Article",$cat_ids,$objArticleList->GetListTypes()); - } - break; - - case "n_article_decline": - if($ro_perm) break; - if (isset($_POST["newslist"])) - { - $cat_ids = Array(); - foreach($_POST["newslist"] as $id) - { - $a = $objArticleList->GetItem($id); - $cat_ids[] = $a->GetPrimaryCategory(); - if($a->Get("Status")==-2) - { - $a->Delete(); - } - else - $a->Deny(); - } - UpdateCategoryCount("Article", $cat_ids, $objArticleList->GetListTypes()); - } - break; - - case "n_add_category": - $objEditItems = new clsNewsList(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - $r = $_POST["ResourceId"]; - $i = $objEditItems->GetItemByField("ResourceId",$_POST["ResourceId"]); - $Primary = $i->GetPrimaryCategory($objSession->GetEditTable("CategoryItems")); - $objSession->SetVariable("HasChanges", 1); - if(is_object($i)) - { - $table = $objSession->GetEditTable("CategoryItems"); - $CatList = explode(",",$_POST["CatList"]); - - // Get List of currect categories article is in - $link_cats = $i->CategoryMemberList($table); - $link_cats_arr = explode(",", $link_cats); - - if (count($CatList)) - { - for($j=0; $j < count($CatList);$j++) - { - if($CatList[$j]) - { - $c = $objCatList->GetByResource($CatList[$j]); - $cat = $c->Get("CategoryId"); - - if(($cat>0) && !in_array($cat, $link_cats_arr)) - { - $i->AddToCategory($cat,$table); - } - } - } - } - } - break; - case "n_cat_delete": - $objSession->SetVariable("HasChanges", 1); - $objEditItems = new clsNewsList(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - $table = $objSession->GetEditTable("CategoryItems"); - $r = $_POST["ResourceId"]; - $i = $objEditItems->GetItemByField("ResourceId",$_POST["ResourceId"]); - if(is_object($i)) - { - $CatCount = $i->CategoryMemberCount($table); - $Primary = $i->GetPrimaryCategory(); - if($CatCount==count($CatList)) - { - $sql = "DELETE FROM $table WHERE CategoryId=$cat AND ItemResourceId=$r AND PrimaryCat=0"; - $ado->Execute($sql); - } - else - { - $CatList = $_POST["itemlist"]; - $ado = &GetADODBConnection(); - for($x=0;$xExecute($sql); - $CatCount--; - } - } - } - - for($x=0;$x0)) - { - if($cat==$Primary && $CatCount>1) - { - $sql = "DELETE FROM $table WHERE CategoryId=$cat AND ItemResourceId=$r"; - if((int)$_GLOBALS["debuglevel"]) - echo $sql; - $ado->Execute($sql); - $CatCount--; - } - } - } - } - } - break; - - case 'n_primary_cat': - // change primary category of the link - $objEditItems = new clsNewsList(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - $article = $objEditItems->GetItemByField('ResourceId', $_REQUEST['ResourceId']); - if( is_object($article) ) - { - $new_cat = array_shift($_REQUEST['itemlist']); - $ci_table = $objSession->GetEditTable('CategoryItems'); - $article->SetPrimaryCategory($new_cat, $ci_table); - } - break; - - case "n_add_article": - if($_POST["NewsEditStatus"]!=2) - { - $CreatedOn = DateTimestamp($_POST["news_date"],GetDateFormat(0, true)); - $EndOn = DateTimestamp($_POST["news_enddate"],GetDateFormat(0, true)); - $StartDate = DateTimestamp($_POST["news_startdate"],GetDateFormat(0, true)); - - $login = trim($_POST["news_author"]); - if(strlen($login)) - { - $u = $objUsers->GetItemByField("Login",$login); - if(is_object($u)) - { - $CreatedById = $u->Get("PortalUserId"); - if($CreatedById==0) - $CreatedById = $objSession->Get("PortalUserId"); - } - else - $CreatedById = $objSession->Get("PortalUserId"); - } - else - $CreatedById = $objSession->Get("PortalUserId"); - $html = (int)$_POST["html_enable"]; - - $Status = (int)$_POST["status"]; - $Hot = (int)$_POST["itemhot"]; - $Pop = (int)$_POST["itempop"]; - $New = (int)$_POST["itemnew"]; - - $pick = (int)$_POST["news_pick"]; - $leading = (int)$_POST["news_leading"]; - $leading_cat = (int)$_POST["news_leading_cat"]; - $Priority = (int)$_POST["news_priority"]; - - $news_excerpt = $_POST["news_excerpt"]; - if($_POST["excerpt_generate"] == 1 || strlen($news_excerpt)==0) - { - $tempbody = strip_tags($_POST["news_body"]); - $len = strlen($tempbody); - if ($len < 100) - $news_excerpt = $tempbody; - else - { - $news_excerpt = substr($tempbody, 0, 100); - if(substr($news_excerpt,-1)!=" ") - { - $pos = strrpos($news_excerpt," "); - if($pos) - $news_excerpt = substr($news_excerpt,0,$pos); - } - $news_excerpt .= ".."; - } - } - - $objEditItems = new clsNewsList(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - - $posted_hits = $_POST['news_hits_show']; - - $posted_hits_arr = explode('.', $_POST['news_hits']); - - - $save_hits = $_POST['news_hits']; - if ($posted_hits_arr[0] != $posted_hits) { - $save_hits = $posted_hits; - } - - $l = $objEditItems->Add_News($_POST["CategoryId"], - inp_escape($_POST["news_title"], $html), - inp_escape($news_excerpt, $html), - inp_escape($_POST["news_author"]), - inp_escape($_POST["news_body"], $html), - $CreatedOn, $EndOn, $StartDate, $Status, - $pick, $New,$Pop,$Hot, - $_POST["news_rating"],$_POST["news_votes"],$save_hits, - $leading, $leading_cat, $Priority,$CreatedById,$html, - GetVar('auto_filename'), GetVar('filename') ); - - $objCustomEdit = new clsCustomDataList($objSession->GetEditTable("CustomMetaData")); - $objCustomEdit->LoadResource($l->Get("ResourceId")); - $CustomFields = new clsCustomFieldList(2); - $DataChanged = FALSE; - foreach($_POST as $key=>$value) - { - if(substr($key,0,1)=="_") - { - $field = substr($key,1); - $cvalue = $CustomFields->GetItemByField("FieldName",$field,FALSE); - - if(is_object($cvalue)) - { - $objCustomEdit->SetFieldValue($cvalue->Get("CustomFieldId"),$l->Get("ResourceId"),$value); - $DataChanged = TRUE; - } - } - } - if($DataChanged) - $objCustomEdit->SaveData(); - } - break; - - case "n_edit_article": - if($_POST["NewsEditStatus"]!=2) - { - $CreatedOn = DateTimestamp($_POST["news_date"],GetDateFormat(0, true)); - $EndOn = DateTimestamp($_POST["news_enddate"],GetDateFormat(0, true)); - $StartDate = DateTimestamp($_POST["news_startdate"],GetDateFormat(0, true)); - - $login = trim($_POST["news_author"]); - if(strlen($login)) - { - $u = $objUsers->GetItemByField("Login",$login); - if(is_object($u)) - { - $CreatedById = $u->Get("PortalUserId"); - if($CreatedById==0) - $CreatedById = $objSession->Get("PortalUserId"); - } - else - $CreatedById = $objSession->Get("PortalUserId"); - } - else - $CreatedById = $objSession->Get("PortalUserId"); - - $html = (int)$_POST["html_enable"]; - - $Status = (int)$_POST["status"]; - $Hot = (int)$_POST["itemhot"]; - $Pop = (int)$_POST["itempop"]; - $New = (int)$_POST["itemnew"]; - - $pick = (int)$_POST["news_pick"]; - $leading = (int)$_POST["news_leading"]; - $leading_cat = (int)$_POST["news_leading_cat"]; - $Priority = (int)$_POST["news_priority"]; - - if ($_POST["excerpt_generate"] == 1) - { - $len = strlen($_POST["news_body"]); - if ($len < 100) - $news_excerpt = $_POST["news_body"]; - else - $news_excerpt = substr($_POST["news_body"], 0, 100); - } - else - $news_excerpt = $_POST["news_excerpt"]; - - $objEditItems = new clsNewsList(); - $objEditItems->SourceTable = $objSession->GetEditTable("News"); - - $posted_hits = $_POST['news_hits_show']; - - $posted_hits_arr = explode('.', $_POST['news_hits']); - - - $save_hits = $_POST['news_hits']; - if ($posted_hits_arr[0] != $posted_hits) { - $save_hits = $posted_hits; - } - - $l = $objEditItems->Edit_News($_POST["NewsId"], - inp_escape($_POST["news_title"],$html), - inp_escape($news_excerpt, $html), - inp_escape($_POST["news_author"]), - inp_escape($_POST["news_body"], $html), - $CreatedOn, $EndOn, $StartDate, $Status, $pick, $New, $Pop, - $Hot, $_POST["news_rating"], $_POST["news_votes"], - $save_hits, $CreatedById,$leading, $leading_cat, $Priority,$html, - GetVar('auto_filename'), GetVar('filename') ); - - $objCustomEdit = new clsCustomDataList($objSession->GetEditTable("CustomMetaData")); - $objCustomEdit->LoadResource($l->Get("ResourceId")); - $CustomFields = new clsCustomFieldList(2); - $DataChanged = FALSE; - foreach($_POST as $key=>$value) - { - if(substr($key,0,1)=="_") - { - $field = substr($key,1); - $cvalue = $CustomFields->GetItemByField("FieldName",$field,FALSE); - - if(is_object($cvalue)) - { - $objCustomEdit->SetFieldValue($cvalue->Get("CustomFieldId"),$l->Get("ResourceId"),$value); - $DataChanged = TRUE; - } - } - } - if($DataChanged) - $objCustomEdit->SaveData(); - } - break; - - case "n_article_cut": - if($ro_perm) break; - if(isset($_POST["newslist"])) - { - $objArticleList->CopyToClipboard("CUT","NewsId",$_POST["newslist"]); - } - break; - - case "n_article_copy": - if($ro_perm) break; - if(isset($_POST["newslist"])) - { - $objArticleList->CopyToClipboard("COPY","NewsId",$_POST["newslist"]); - } - break; - - // Used from JS - case "news_paste": - if($ro_perm) break; - if($objArticleList->ItemsOnClipboard()>0) - { - $objArticleList->PasteFromClipboard($objCatList->CurrentCategoryID(),"Title"); - UpdateCategoryCount("Article", $objCatList->CurrentCategoryID(), $objArticleList->ListType); - } - break; - - case "n_config_general": - if($ro_perm) break; - $init = $_POST["init_cat"]; - $newcat = (int)$_POST["rootcat"]; - if($init != $newcat) - { - if($newcat != 0) - { - $c = $objCatList->GetItemByField('ResourceId',$newcat); - $newcat = is_object($c)? $c->UniqueId() : 0; - } - $objModules->SetModuleRoot("In-News", $newcat); - } - break; - - } - -if( ! $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY") ) -{ - /* Handle the status of news item edit tabs */ - if( GetVar('NewsEditStatus') == 1) - { - $article_ids = $objArticleList->CopyFromEditTable("NewsId"); - if($article_ids) - { - $db =& GetADODBConnection(); - $sql = 'SELECT ResourceId FROM '.$objArticleList->SourceTable.' WHERE NewsId IN ('.implode(',', $article_ids).')'; - $rids = $db->GetCol($sql); - $objCustomDataList->CopyFromEditTable("CustomDataId", $rids); - } - - $objArticleList->Clear(); - $objImages = new clsImageList(); - $objImages->CopyFromEditTable("ImageId"); - $objArticleList->FlushCache($article_ids); - - } - /* user hit the cancel button */ - if( GetVar('NewsEditStatus') == 2) - { - $objArticleList->PurgeEditTable("NewsId"); - $objArticleList->PurgeCatListEditTable(); - $objCustomDataList->PurgeEditTable("CustomDataId"); - $objImages = new clsImageList(); - $objImages->PurgeEditTable("ImageId"); - $objArticleList->Clear(); - } -} -?> Index: branches/unlabeled/unlabeled-1.37.2/in-news/units/articles/articles_config.php =================================================================== diff -u -N --- branches/unlabeled/unlabeled-1.37.2/in-news/units/articles/articles_config.php (revision 12747) +++ branches/unlabeled/unlabeled-1.37.2/in-news/units/articles/articles_config.php (revision 0) @@ -1,293 +0,0 @@ - 'n', - - 'ItemClass' => Array('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'c', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUpdateCategoryCustomFields', - ), - ), - 'CatalogItem' => true, - 'AdminTemplatePath' => 'articles', - 'AdminTemplatePrefix' => 'articles_', - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'Reviews_Page', - 4 => 'event', - 5 => 'mode', - ), - - 'RegularEvents' => Array( - 'rss_category_update' => Array('EventName' => 'OnUpdateRSSAtricles', 'RunInterval' => 0, 'Type' => reBEFORE), - ), - - 'IDField' => 'NewsId', - 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events - - 'TitleField' => 'Title', // field, used in bluebar when editing existing item - 'TitlePhrase' => 'la_Text_Article', // phrase used to specify item type in relationship list - - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('n' => '!la_title_AddingArticle!'), - 'edit_status_labels' => Array('n' => '!la_title_EditingArticle!'), - 'new_titlefield' => Array('n' => '!la_title_NewArticle!'), - ), - - 'articles_edit' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_General!"), - - 'articles_categories'=>Array('prefixes' => Array('n','n-ci_List'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Categories!"), - 'articles_relations'=> Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Relations!"), - 'articles_images' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Images!"), - 'articles_reviews' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Reviews!"), - 'articles_custom' => Array('prefixes' => Array('n'), 'format' => "#n_status# '#n_titlefield#' - !la_title_Custom!"), - - 'images_edit' => Array( 'prefixes' => Array('n', 'n-img'), - 'new_status_labels' => Array('n-img'=>'!la_title_Adding_Image!'), - 'edit_status_labels' => Array('n-img'=>'!la_title_Editing_Image!'), - 'new_titlefield' => Array('n-img'=>'!la_title_New_Image!'), - 'format' => "#n_status# '#n_titlefield#' - #n-img_status# '#n-img_titlefield#'", - ), - - 'reviews_edit' => Array( 'prefixes' => Array('n', 'n-rev'), - 'new_status_labels' => Array('n-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"), - 'edit_status_labels' => Array('n-rev'=>'!la_title_Editing_Review!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rev_status#", - ), - - 'relations_edit' => Array( 'prefixes' => Array('n', 'n-rel'), - 'new_status_labels' => Array('n-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), - 'edit_status_labels' => Array('n-rel'=>'!la_title_Editing_Relationship!'), - 'format' => "#n_status# '#n_titlefield#' - #n-rel_status#", - ), - - 'tree_in-news' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-News', 'Version')), - ), - - 'PermItemPrefix' => 'NEWS', - - 'PermTabText' => 'In-News', - 'PermSection' => Array('main' => 'CATEGORY:in-news:articles_list', 'search' => 'in-news:configuration_search', 'email' => 'in-news:configuration_email', 'custom' => 'in-news:configuration_custom'), - - 'Sections' => Array( - 'in-news' => Array( - 'parent' => 'in-portal:root', - 'icon' => 'settings_in-newz', - 'label' => 'la_title_In-News', - 'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view'), - 'priority' => 3.2, - 'type' => stTREE, - ), - - 'in-news:innews_general' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_general', - 'label' => 'la_tab_GeneralSettings', - 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 1, - 'type' => stTREE, - ), - - 'in-news:configuration_output' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_output', - 'label' => 'la_tab_ConfigOutput', - 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 2, - 'type' => stTREE, - ), - - 'in-news:configuration_search' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_search', - 'label' => 'la_tab_ConfigSearch', - 'url' => Array('t' => 'config/config_search', 'module_key' => 'articles', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 3, - 'type' => stTREE, - ), - - 'in-news:configuration_email' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_email', - 'label' => 'la_tab_ConfigE-mail', - 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), - 'priority' => 4, - 'type' => stTREE, - ), - - 'in-news:configuration_custom' => Array( - 'parent' => 'in-news', - 'icon' => 'settings_custom', - 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 2, 'pass_section' => true, 'pass' => 'm,cf'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), - 'priority' => 5, - 'type' => stTREE, - ), - - ), - - 'CatalogSelectorName' => 'newslist', - - 'ItemPropertyMappings' => Array( - 'NewDays' => 'News_CatNewDays', // number of days item to be NEW - 'MinPopVotes' => 'News_MinPopVotes', // minimum number of votes for an item to be POP - 'MinPopRating' => 'News_MinPopRating',// minimum rating for an item to be POP - 'MaxHotNumber' => 'News_MaxHotNumber',// maximum number of HOT items - - 'HotLimit' => 'News_HotLimit', // variable name in inp_Cache table - 'ClickField' => 'Hits', // item click count is stored here (in item table) - ), - - 'ItemType' => 2, // this is used when relation to product is added from in-portal and via-versa - - 'ViewMenuPhrase' => 'la_title_Articles', - - 'StatisticsInfo' => Array( - 'pending' => Array( - 'icon' => 'icon16_article_pending.gif', - 'label' => 'la_Text_Articles', - 'js_url' => "set_persistant_var('News_View', 943, 'advanced_view', '#url#')", - 'url' => Array('t' => 'advanced_view', 'index_file' => 'advanced_view.php', 'SetTab' => 'news', 'pass' => 'm'), - 'status' => STATUS_PENDING, - ), - ), - - 'TableName' => TABLE_PREFIX.'News', - - 'CalculatedFields' => Array( - '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = -1, "root", IF (%1$s.CreatedById = -2, "Guest", "n/a")), u.Login)', - 'CategoryId' => TABLE_PREFIX.'CategoryItems.CategoryId', - 'Filename' => TABLE_PREFIX.'CategoryItems.Filename', - 'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath', - ), - ), - - 'CacheModRewrite' => true, - - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON '.TABLE_PREFIX.'CategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId', - ), // key - special, value - list select sql - - 'ListSortings' => Array( - '' => Array( - 'ForcedSorting' => Array('EditorsPick' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array('Title' => 'asc'), - ) - ), - 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON '.TABLE_PREFIX.'CategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'%3$sNewsCustomData cust ON %1$s.ResourceId = cust.ResourceId'), - - 'SubItems' => Array('n-rev', 'n-ci', 'n-rel', 'n-img', 'n-cdata'), - - 'Fields' => Array ( - 'NewsId' => Array(), - 'Title' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => '1'), - 'Excerpt' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Author' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Body' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1,'default' => '#NOW#'), - 'TextFormat' => Array('type' => 'int', 'not_null' => 1, 'default' => '0'), - 'EndOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => ''), - 'Hits' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), - 'CachedRating' => Array('type' => 'string', 'default' => 0), - 'CachedVotesQty' => Array('type' => 'int','not_null' => 1,'default' => '0'), - 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => -1), - 'Priority' => Array('type' => 'int','default' => ''), - 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), - 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'LeadCatStory' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array('type' => 'int', 'default' => ''), - 'CachedReviewsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StartDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'not_null' => 1, 'default' => '#NOW#'), - 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'Archived' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1,'default' => '#NOW#'), - 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => -1), - 'OrgId' => Array('type' => 'int','default' => ''), - ), - - 'VirtualFields' => Array( - 'UserName' => Array('type' => 'string', 'default' => ''), - 'CategoryId' => Array('type' => 'int', 'default' => 0), - 'cust_RssOriginalURL' => Array('type' => 'string', 'default' => ''), - 'cust_RssArticleCRC' => Array('type' => 'int', 'default' => 0), - 'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'CachedNavbar' => Array('type' => 'string', 'default' => ''), - ), - - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), -// 'PrimaryCategory' => Array('title' => 'la_col_PrimaryCategory', 'data_block' => 'grid_category_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - - - 'Radio' => Array( - 'Icons' => Array(1 => 'icon16_article.gif', 2 => 'icon16_article_pending.gif', 0 => 'icon16_article_disabled.gif', 'HOT' => 'icon16_article_hot.gif', 'POP' => 'icon16_article_pop.gif', 'NEW' => 'icon16_article_new.gif', 'PICK' => 'icon16_article_pick.gif'), - 'Fields' => Array( - 'NewsId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_radio_td'), - 'Title' => Array('title' => 'la_col_Title', 'data_block' => 'grid_catitem_td'), - 'UserName' => Array('title' => 'la_col_Author'), - 'LeadStory' => Array('title' => 'la_col_LeadStory'), - 'LeadCatStory' => Array('title' => 'la_col_LeadCatStory'), - 'StartDate' => Array('title' => 'la_col_StartDate'), - 'EndOn' => Array('title' => 'la_col_EndOn', 'data_block' => 'article_expire_td'), - ), - ), - ), - - 'ConfigMapping' => Array( - 'PerPage' => 'Perpage_News', - 'ShortListPerPage' => 'Perpage_News_Short', - 'DefaultSorting1Field' => 'News_SortField', - 'DefaultSorting2Field' => 'News_SortField2', - 'DefaultSorting1Dir' => 'News_SortOrder', - 'DefaultSorting2Dir' => 'News_SortOrder2', - ), - ); - - -?> \ No newline at end of file